# fluent-community/2.8.1/assets/admin_app.js

FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS &amp; Online Courses, version 2.8.1. 1,520 lines.

- Page: https://pluginprobe.com/plugins/fluent-community/2.8.1/code/assets/admin_app.js
- Raw: https://pluginprobe.com/plugins/fluent-community/2.8.1/raw/assets/admin_app.js
- Modified: 2026-08-20T15:43:26+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-community/2.8.1/code/assets/admin_app.js#L10-L20`.

````javascript
var Xj=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var FS=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var Yt=(t,e,n)=>(FS(t,e,"read from private field"),n?n.call(t):e.get(t)),ea=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},qi=(t,e,n,i)=>(FS(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);var YSt=Xj((Eo,Mo)=>{const Kj="modulepreload",Zj=function(t){return"/"+t},NS={},bu=function(e,n,i){if(!n||n.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=Zj(o),o in NS)return;NS[o]=!0;const r=o.endsWith(".css"),a=r?'[rel="stylesheet"]':"";if(!!i)for(let u=s.length-1;u>=0;u--){const d=s[u];if(d.href===o&&(!r||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${o}"]${a}`))return;const c=document.createElement("link");if(c.rel=r?"stylesheet":Kj,r||(c.as="script",c.crossOrigin=""),c.href=o,document.head.appendChild(c),r)return new Promise((u,d)=>{c.addEventListener("load",u),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${o}`)))})})).then(()=>e()).catch(o=>{const r=new Event("vite:preloadError",{cancelable:!0});if(r.payload=o,window.dispatchEvent(r),!r.defaultPrevented)throw o})};/**
* @vue/shared v3.4.23
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**//*! #__NO_SIDE_EFFECTS__ */function Ro(t,e){const n=new Set(t.split(","));return e?i=>n.has(i.toLowerCase()):i=>n.has(i)}const xn={},Vh=[],Tt=()=>{},a0=()=>!1,wd=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),UC=t=>t.startsWith("onUpdate:"),yn=Object.assign,jC=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},Jj=Object.prototype.hasOwnProperty,Dt=(t,e)=>Jj.call(t,e),Ee=Array.isArray,Fh=t=>Gf(t)==="[object Map]",kd=t=>Gf(t)==="[object Set]",S_=t=>Gf(t)==="[object Date]",Qj=t=>Gf(t)==="[object RegExp]",et=t=>typeof t=="function",Ke=t=>typeof t=="string",cr=t=>typeof t=="symbol",yt=t=>t!==null&&typeof t=="object",nd=t=>(yt(t)||et(t))&&et(t.then)&&et(t.catch),tP=Object.prototype.toString,Gf=t=>tP.call(t),eW=t=>Gf(t).slice(8,-1),ag=t=>Gf(t)==="[object Object]",WC=t=>Ke(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,hc=Ro(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),tW=Ro("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),Uy=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},nW=/-(\w)/g,es=Uy(t=>t.replace(nW,(e,n)=>n?n.toUpperCase():"")),sW=/\B([A-Z])/g,eo=Uy(t=>t.replace(sW,"-$1").toLowerCase()),Dc=Uy(t=>t.charAt(0).toUpperCase()+t.slice(1)),Fu=Uy(t=>t?`on${Dc(t)}`:""),Rr=(t,e)=>!Object.is(t,e),Nh=(t,e)=>{for(let n=0;n<t.length;n++)t[n](e)},nP=(t,e,n)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:n})},$_=t=>{const e=parseFloat(t);return isNaN(e)?t:e},A_=t=>{const e=Ke(t)?Number(t):NaN;return isNaN(e)?t:e};let BS;const sP=()=>BS||(BS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}),iW="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error",oW=Ro(iW);function Xe(t){if(Ee(t)){const e={};for(let n=0;n<t.length;n++){const i=t[n],s=Ke(i)?iP(i):Xe(i);if(s)for(const o in s)e[o]=s[o]}return e}else if(Ke(t)||yt(t))return t}const rW=/;(?![^(]*\))/g,aW=/:([^]+)/,lW=/\/\*[^]*?\*\//g;function iP(t){const e={};return t.replace(lW,"").split(rW).forEach(n=>{if(n){const i=n.split(aW);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function G(t){let e="";if(Ke(t))e=t;else if(Ee(t))for(let n=0;n<t.length;n++){const i=G(t[n]);i&&(e+=i+" ")}else if(yt(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function Bh(t){if(!t)return null;let{class:e,style:n}=t;return e&&!Ke(e)&&(t.class=G(e)),n&&(t.style=Xe(n)),t}const cW="html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot",uW="svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view",dW="annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics",hW="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",fW=Ro(cW),pW=Ro(uW),mW=Ro(dW),gW=Ro(hW),vW="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",_W=Ro(vW);function oP(t){return!!t||t===""}function yW(t,e){if(t.length!==e.length)return!1;let n=!0;for(let i=0;n&&i<t.length;i++)n=xc(t[i],e[i]);return n}function xc(t,e){if(t===e)return!0;let n=S_(t),i=S_(e);if(n||i)return n&&i?t.getTime()===e.getTime():!1;if(n=cr(t),i=cr(e),n||i)return t===e;if(n=Ee(t),i=Ee(e),n||i)return n&&i?yW(t,e):!1;if(n=yt(t),i=yt(e),n||i){if(!n||!i)return!1;const s=Object.keys(t).length,o=Object.keys(e).length;if(s!==o)return!1;for(const r in t){const a=t.hasOwnProperty(r),l=e.hasOwnProperty(r);if(a&&!l||!a&&l||!xc(t[r],e[r]))return!1}}return String(t)===String(e)}function jy(t,e){return t.findIndex(n=>xc(n,e))}const S=t=>Ke(t)?t:t==null?"":Ee(t)||yt(t)&&(t.toString===tP||!et(t.toString))?JSON.stringify(t,rP,2):String(t),rP=(t,e)=>e&&e.__v_isRef?rP(t,e.value):Fh(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,s],o)=>(n[I2(i,o)+" =>"]=s,n),{})}:kd(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>I2(n))}:cr(e)?I2(e):yt(e)&&!Ee(e)&&!ag(e)?String(e):e,I2=(t,e="")=>{var n;return cr(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};/**
* @vue/reactivity v3.4.23
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/let ko;class YC{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this.parent=ko,!e&&ko&&(this.index=(ko.scopes||(ko.scopes=[])).push(this)-1)}get active(){return this._active}run(e){if(this._active){const n=ko;try{return ko=this,e()}finally{ko=n}}}on(){ko=this}off(){ko=this.parent}stop(e){if(this._active){let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.scopes)for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);if(!this.detached&&this.parent&&!e){const s=this.parent.scopes.pop();s&&s!==this&&(this.parent.scopes[this.index]=s,s.index=this.index)}this.parent=void 0,this._active=!1}}}function Wy(t){return new YC(t)}function aP(t,e=ko){e&&e.active&&e.effects.push(t)}function Yy(){return ko}function qy(t){ko&&ko.cleanups.push(t)}let Nu;class uf{constructor(e,n,i,s){this.fn=e,this.trigger=n,this.scheduler=i,this.active=!0,this.deps=[],this._dirtyLevel=4,this._trackId=0,this._runnings=0,this._shouldSchedule=!1,this._depsLength=0,aP(this,s)}get dirty(){if(this._dirtyLevel===2||this._dirtyLevel===3){this._dirtyLevel=1,Rc();for(let e=0;e<this._depsLength;e++){const n=this.deps[e];if(n.computed&&(bW(n.computed),this._dirtyLevel>=4))break}this._dirtyLevel===1&&(this._dirtyLevel=0),Vc()}return this._dirtyLevel>=4}set dirty(e){this._dirtyLevel=e?4:0}run(){if(this._dirtyLevel=0,!this.active)return this.fn();let e=fc,n=Nu;try{return fc=!0,Nu=this,this._runnings++,zS(this),this.fn()}finally{HS(this),this._runnings--,Nu=n,fc=e}}stop(){var e;this.active&&(zS(this),HS(this),(e=this.onStop)==null||e.call(this),this.active=!1)}}function bW(t){return t.value}function zS(t){t._trackId++,t._depsLength=0}function HS(t){if(t.deps.length>t._depsLength){for(let e=t._depsLength;e<t.deps.length;e++)lP(t.deps[e],t);t.deps.length=t._depsLength}}function lP(t,e){const n=t.get(e);n!==void 0&&e._trackId!==n&&(t.delete(e),t.size===0&&t.cleanup())}function wW(t,e){t.effect instanceof uf&&(t=t.effect.fn);const n=new uf(t,Tt,()=>{n.dirty&&n.run()});e&&(yn(n,e),e.scope&&aP(n,e.scope)),(!e||!e.lazy)&&n.run();const i=n.run.bind(n);return i.effect=n,i}function kW(t){t.effect.stop()}let fc=!0,R3=0;const cP=[];function Rc(){cP.push(fc),fc=!1}function Vc(){const t=cP.pop();fc=t===void 0?!0:t}function qC(){R3++}function GC(){for(R3--;!R3&&V3.length;)V3.shift()()}function uP(t,e,n){if(e.get(t)!==t._trackId){e.set(t,t._trackId);const i=t.deps[t._depsLength];i!==e?(i&&lP(i,t),t.deps[t._depsLength++]=e):t._depsLength++}}const V3=[];function dP(t,e,n){qC();for(const i of t.keys()){let s;i._dirtyLevel<e&&(s??(s=t.get(i)===i._trackId))&&(i._shouldSchedule||(i._shouldSchedule=i._dirtyLevel===0),i._dirtyLevel=e),i._shouldSchedule&&(s??(s=t.get(i)===i._trackId))&&(i.trigger(),(!i._runnings||i.allowRecurse)&&i._dirtyLevel!==2&&(i._shouldSchedule=!1,i.scheduler&&V3.push(i.scheduler)))}GC()}const hP=(t,e)=>{const n=new Map;return n.cleanup=t,n.computed=e,n},E_=new WeakMap,Bu=Symbol(""),F3=Symbol("");function lo(t,e,n){if(fc&&Nu){let i=E_.get(t);i||E_.set(t,i=new Map);let s=i.get(n);s||i.set(n,s=hP(()=>i.delete(n))),uP(Nu,s)}}function Za(t,e,n,i,s,o){const r=E_.get(t);if(!r)return;let a=[];if(e==="clear")a=[...r.values()];else if(n==="length"&&Ee(t)){const l=Number(i);r.forEach((c,u)=>{(u==="length"||!cr(u)&&u>=l)&&a.push(c)})}else switch(n!==void 0&&a.push(r.get(n)),e){case"add":Ee(t)?WC(n)&&a.push(r.get("length")):(a.push(r.get(Bu)),Fh(t)&&a.push(r.get(F3)));break;case"delete":Ee(t)||(a.push(r.get(Bu)),Fh(t)&&a.push(r.get(F3)));break;case"set":Fh(t)&&a.push(r.get(Bu));break}qC();for(const l of a)l&&dP(l,4);GC()}function CW(t,e){var n;return(n=E_.get(t))==null?void 0:n.get(e)}const xW=Ro("__proto__,__v_isRef,__isVue"),fP=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(cr)),US=SW();function SW(){const t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...n){const i=nn(this);for(let o=0,r=this.length;o<r;o++)lo(i,"get",o+"");const s=i[e](...n);return s===-1||s===!1?i[e](...n.map(nn)):s}}),["push","pop","shift","unshift","splice"].forEach(e=>{t[e]=function(...n){Rc(),qC();const i=nn(this)[e].apply(this,n);return GC(),Vc(),i}}),t}function $W(t){cr(t)||(t=String(t));const e=nn(this);return lo(e,"has",t),e.hasOwnProperty(t)}class pP{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,i){const s=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!s;if(n==="__v_isReadonly")return s;if(n==="__v_isShallow")return o;if(n==="__v_raw")return i===(s?o?bP:yP:o?_P:vP).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const r=Ee(e);if(!s){if(r&&Dt(US,n))return Reflect.get(US,n,i);if(n==="hasOwnProperty")return $W}const a=Reflect.get(e,n,i);return(cr(n)?fP.has(n):xW(n))||(s||lo(e,"get",n),o)?a:gn(a)?r&&WC(n)?a:a.value:yt(a)?s?Cd(a):In(a):a}}class mP extends pP{constructor(e=!1){super(!1,e)}set(e,n,i,s){let o=e[n];if(!this._isShallow){const l=df(o);if(!lg(i)&&!df(i)&&(o=nn(o),i=nn(i)),!Ee(e)&&gn(o)&&!gn(i))return l?!1:(o.value=i,!0)}const r=Ee(e)&&WC(n)?Number(n)<e.length:Dt(e,n),a=Reflect.set(e,n,i,s);return e===nn(s)&&(r?Rr(i,o)&&Za(e,"set",n,i):Za(e,"add",n,i)),a}deleteProperty(e,n){const i=Dt(e,n);e[n];const s=Reflect.deleteProperty(e,n);return s&&i&&Za(e,"delete",n,void 0),s}has(e,n){const i=Reflect.has(e,n);return(!cr(n)||!fP.has(n))&&lo(e,"has",n),i}ownKeys(e){return lo(e,"iterate",Ee(e)?"length":Bu),Reflect.ownKeys(e)}}class gP extends pP{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}}const AW=new mP,EW=new gP,MW=new mP(!0),TW=new gP(!0),XC=t=>t,Gy=t=>Reflect.getPrototypeOf(t);function dv(t,e,n=!1,i=!1){t=t.__v_raw;const s=nn(t),o=nn(e);n||(Rr(e,o)&&lo(s,"get",e),lo(s,"get",o));const{has:r}=Gy(s),a=i?XC:n?JC:cg;if(r.call(s,e))return a(t.get(e));if(r.call(s,o))return a(t.get(o));t!==s&&t.get(e)}function hv(t,e=!1){const n=this.__v_raw,i=nn(n),s=nn(t);return e||(Rr(t,s)&&lo(i,"has",t),lo(i,"has",s)),t===s?n.has(t):n.has(t)||n.has(s)}function fv(t,e=!1){return t=t.__v_raw,!e&&lo(nn(t),"iterate",Bu),Reflect.get(t,"size",t)}function jS(t){t=nn(t);const e=nn(this);return Gy(e).has.call(e,t)||(e.add(t),Za(e,"add",t,t)),this}function WS(t,e){e=nn(e);const n=nn(this),{has:i,get:s}=Gy(n);let o=i.call(n,t);o||(t=nn(t),o=i.call(n,t));const r=s.call(n,t);return n.set(t,e),o?Rr(e,r)&&Za(n,"set",t,e):Za(n,"add",t,e),this}function YS(t){const e=nn(this),{has:n,get:i}=Gy(e);let s=n.call(e,t);s||(t=nn(t),s=n.call(e,t)),i&&i.call(e,t);const o=e.delete(t);return s&&Za(e,"delete",t,void 0),o}function qS(){const t=nn(this),e=t.size!==0,n=t.clear();return e&&Za(t,"clear",void 0,void 0),n}function pv(t,e){return function(i,s){const o=this,r=o.__v_raw,a=nn(r),l=e?XC:t?JC:cg;return!t&&lo(a,"iterate",Bu),r.forEach((c,u)=>i.call(s,l(c),l(u),o))}}function mv(t,e,n){return function(...i){const s=this.__v_raw,o=nn(s),r=Fh(o),a=t==="entries"||t===Symbol.iterator&&r,l=t==="keys"&&r,c=s[t](...i),u=n?XC:e?JC:cg;return!e&&lo(o,"iterate",l?F3:Bu),{next(){const{value:d,done:h}=c.next();return h?{value:d,done:h}:{value:a?[u(d[0]),u(d[1])]:u(d),done:h}},[Symbol.iterator](){return this}}}}function Cl(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function PW(){const t={get(o){return dv(this,o)},get size(){return fv(this)},has:hv,add:jS,set:WS,delete:YS,clear:qS,forEach:pv(!1,!1)},e={get(o){return dv(this,o,!1,!0)},get size(){return fv(this)},has:hv,add:jS,set:WS,delete:YS,clear:qS,forEach:pv(!1,!0)},n={get(o){return dv(this,o,!0)},get size(){return fv(this,!0)},has(o){return hv.call(this,o,!0)},add:Cl("add"),set:Cl("set"),delete:Cl("delete"),clear:Cl("clear"),forEach:pv(!0,!1)},i={get(o){return dv(this,o,!0,!0)},get size(){return fv(this,!0)},has(o){return hv.call(this,o,!0)},add:Cl("add"),set:Cl("set"),delete:Cl("delete"),clear:Cl("clear"),forEach:pv(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{t[o]=mv(o,!1,!1),n[o]=mv(o,!0,!1),e[o]=mv(o,!1,!0),i[o]=mv(o,!0,!0)}),[t,n,e,i]}const[IW,LW,OW,DW]=PW();function Xy(t,e){const n=e?t?DW:OW:t?LW:IW;return(i,s,o)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?i:Reflect.get(Dt(n,s)&&s in i?n:i,s,o)}const RW={get:Xy(!1,!1)},VW={get:Xy(!1,!0)},FW={get:Xy(!0,!1)},NW={get:Xy(!0,!0)},vP=new WeakMap,_P=new WeakMap,yP=new WeakMap,bP=new WeakMap;function BW(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function zW(t){return t.__v_skip||!Object.isExtensible(t)?0:BW(eW(t))}function In(t){return df(t)?t:Ky(t,!1,AW,RW,vP)}function KC(t){return Ky(t,!1,MW,VW,_P)}function Cd(t){return Ky(t,!0,EW,FW,yP)}function HW(t){return Ky(t,!0,TW,NW,bP)}function Ky(t,e,n,i,s){if(!yt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=s.get(t);if(o)return o;const r=zW(t);if(r===0)return t;const a=new Proxy(t,r===2?i:n);return s.set(t,a),a}function pc(t){return df(t)?pc(t.__v_raw):!!(t&&t.__v_isReactive)}function df(t){return!!(t&&t.__v_isReadonly)}function lg(t){return!!(t&&t.__v_isShallow)}function ZC(t){return t?!!t.__v_raw:!1}function nn(t){const e=t&&t.__v_raw;return e?nn(e):t}function Si(t){return Object.isExtensible(t)&&nP(t,"__v_skip",!0),t}const cg=t=>yt(t)?In(t):t,JC=t=>yt(t)?Cd(t):t;class wP{constructor(e,n,i,s){this.getter=e,this._setter=n,this.dep=void 0,this.__v_isRef=!0,this.__v_isReadonly=!1,this.effect=new uf(()=>e(this._value),()=>zh(this,this.effect._dirtyLevel===2?2:3)),this.effect.computed=this,this.effect.active=this._cacheable=!s,this.__v_isReadonly=i}get value(){const e=nn(this);return(!e._cacheable||e.effect.dirty)&&Rr(e._value,e._value=e.effect.run())&&zh(e,4),QC(e),e.effect._dirtyLevel>=2&&zh(e,2),e._value}set value(e){this._setter(e)}get _dirty(){return this.effect.dirty}set _dirty(e){this.effect.dirty=e}}function UW(t,e,n=!1){let i,s;const o=et(t);return o?(i=t,s=Tt):(i=t.get,s=t.set),new wP(i,s,o||!s,n)}function QC(t){var e;fc&&Nu&&(t=nn(t),uP(Nu,(e=t.dep)!=null?e:t.dep=hP(()=>t.dep=void 0,t instanceof wP?t:void 0)))}function zh(t,e=4,n){t=nn(t);const i=t.dep;i&&dP(i,e)}function gn(t){return!!(t&&t.__v_isRef===!0)}function J(t){return kP(t,!1)}function Hn(t){return kP(t,!0)}function kP(t,e){return gn(t)?t:new jW(t,e)}class jW{constructor(e,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?e:nn(e),this._value=n?e:cg(e)}get value(){return QC(this),this._value}set value(e){const n=this.__v_isShallow||lg(e)||df(e);e=n?e:nn(e),Rr(e,this._rawValue)&&(this._rawValue=e,this._value=n?e:cg(e),zh(this,4))}}function Am(t){zh(t,4)}function E(t){return gn(t)?t.value:t}function N3(t){return et(t)?t():E(t)}const WW={get:(t,e,n)=>E(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const s=t[e];return gn(s)&&!gn(n)?(s.value=n,!0):Reflect.set(t,e,n,i)}};function ex(t){return pc(t)?t:new Proxy(t,WW)}class YW{constructor(e){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:i}=e(()=>QC(this),()=>zh(this));this._get=n,this._set=i}get value(){return this._get()}set value(e){this._set(e)}}function CP(t){return new YW(t)}function co(t){const e=Ee(t)?new Array(t.length):{};for(const n in t)e[n]=xP(t,n);return e}class qW{constructor(e,n,i){this._object=e,this._key=n,this._defaultValue=i,this.__v_isRef=!0}get value(){const e=this._object[this._key];return e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return CW(nn(this._object),this._key)}}class GW{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0}get value(){return this._getter()}}function Sn(t,e,n){return gn(t)?t:et(t)?new GW(t):yt(t)&&arguments.length>1?xP(t,e,n):J(t)}function xP(t,e,n){const i=t[e];return gn(i)?i:new qW(t,e,n)}const XW={GET:"get",HAS:"has",ITERATE:"iterate"},KW={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"};/**
* @vue/runtime-core v3.4.23
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/function ZW(t,e){}const JW={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",WATCH_GETTER:2,2:"WATCH_GETTER",WATCH_CALLBACK:3,3:"WATCH_CALLBACK",WATCH_CLEANUP:4,4:"WATCH_CLEANUP",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER"},QW={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."};function Ja(t,e,n,i){try{return i?t(...i):t()}catch(s){xd(s,e,n)}}function To(t,e,n,i){if(et(t)){const s=Ja(t,e,n,i);return s&&nd(s)&&s.catch(o=>{xd(o,e,n)}),s}if(Ee(t)){const s=[];for(let o=0;o<t.length;o++)s.push(To(t[o],e,n,i));return s}}function xd(t,e,n,i=!0){const s=e?e.vnode:null;if(e){let o=e.parent;const r=e.proxy,a=`https://vuejs.org/error-reference/#runtime-${n}`;for(;o;){const c=o.ec;if(c){for(let u=0;u<c.length;u++)if(c[u](t,r,a)===!1)return}o=o.parent}const l=e.appContext.config.errorHandler;if(l){Rc(),Ja(l,null,10,[t,r,a]),Vc();return}}eY(t,n,s,i)}function eY(t,e,n,i=!0){console.error(t)}let ug=!1,B3=!1;const bi=[];let ua=0;const Hh=[];let Yl=null,wu=0;const SP=Promise.resolve();let tx=null;function ot(t){const e=tx||SP;return t?e.then(this?t.bind(this):t):e}function tY(t){let e=ua+1,n=bi.length;for(;e<n;){const i=e+n>>>1,s=bi[i],o=dg(s);o<t||o===t&&s.pre?e=i+1:n=i}return e}function Zy(t){(!bi.length||!bi.includes(t,ug&&t.allowRecurse?ua+1:ua))&&(t.id==null?bi.push(t):bi.splice(tY(t.id),0,t),$P())}function $P(){!ug&&!B3&&(B3=!0,tx=SP.then(AP))}function nY(t){const e=bi.indexOf(t);e>ua&&bi.splice(e,1)}function M_(t){Ee(t)?Hh.push(...t):(!Yl||!Yl.includes(t,t.allowRecurse?wu+1:wu))&&Hh.push(t),$P()}function GS(t,e,n=ug?ua+1:0){for(;n<bi.length;n++){const i=bi[n];if(i&&i.pre){if(t&&i.id!==t.uid)continue;bi.splice(n,1),n--,i()}}}function T_(t){if(Hh.length){const e=[...new Set(Hh)].sort((n,i)=>dg(n)-dg(i));if(Hh.length=0,Yl){Yl.push(...e);return}for(Yl=e,wu=0;wu<Yl.length;wu++)Yl[wu]();Yl=null,wu=0}}const dg=t=>t.id==null?1/0:t.id,sY=(t,e)=>{const n=dg(t)-dg(e);if(n===0){if(t.pre&&!e.pre)return-1;if(e.pre&&!t.pre)return 1}return n};function AP(t){B3=!1,ug=!0,bi.sort(sY);const e=Tt;try{for(ua=0;ua<bi.length;ua++){const n=bi[ua];n&&n.active!==!1&&Ja(n,null,14)}}finally{ua=0,bi.length=0,T_(),ug=!1,tx=null,(bi.length||Hh.length)&&AP()}}let fh,gv=[];function EP(t,e){var n,i;fh=t,fh?(fh.enabled=!0,gv.forEach(({event:s,args:o})=>fh.emit(s,...o)),gv=[]):typeof window<"u"&&window.HTMLElement&&!((i=(n=window.navigator)==null?void 0:n.userAgent)!=null&&i.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{EP(o,e)}),setTimeout(()=>{fh||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,gv=[])},3e3)):gv=[]}function iY(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||xn;let s=n;const o=e.startsWith("update:"),r=o&&e.slice(7);if(r&&r in i){const u=`${r==="modelValue"?"model":r}Modifiers`,{number:d,trim:h}=i[u]||xn;h&&(s=n.map(f=>Ke(f)?f.trim():f)),d&&(s=n.map($_))}let a,l=i[a=Fu(e)]||i[a=Fu(es(e))];!l&&o&&(l=i[a=Fu(eo(e))]),l&&To(l,t,6,s);const c=i[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,To(c,t,6,s)}}function MP(t,e,n=!1){const i=e.emitsCache,s=i.get(t);if(s!==void 0)return s;const o=t.emits;let r={},a=!1;if(!et(t)){const l=c=>{const u=MP(c,e,!0);u&&(a=!0,yn(r,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!o&&!a?(yt(t)&&i.set(t,null),null):(Ee(o)?o.forEach(l=>r[l]=null):yn(r,o),yt(t)&&i.set(t,r),r)}function Jy(t,e){return!t||!wd(e)?!1:(e=e.slice(2).replace(/Once$/,""),Dt(t,e[0].toLowerCase()+e.slice(1))||Dt(t,eo(e))||Dt(t,e))}let Ms=null,Qy=null;function hg(t){const e=Ms;return Ms=t,Qy=t&&t.type.__scopeId||null,e}function TP(t){Qy=t}function PP(){Qy=null}const oY=t=>w;function w(t,e=Ms,n){if(!e||t._n)return t;const i=(...s)=>{i._d&&X3(-1);const o=hg(e);let r;try{r=t(...s)}finally{hg(o),i._d&&X3(1)}return r};return i._n=!0,i._c=!0,i._d=!0,i}function l0(t){const{type:e,vnode:n,proxy:i,withProxy:s,props:o,propsOptions:[r],slots:a,attrs:l,emit:c,render:u,renderCache:d,data:h,setupState:f,ctx:p,inheritAttrs:m}=t;let y,b;const k=hg(t);try{if(n.shapeFlag&4){const $=s||i,x=$;y=xo(u.call(x,$,d,o,f,h,p)),b=l}else{const $=e;y=xo($.length>1?$(o,{attrs:l,slots:a,emit:c}):$(o,null)),b=e.props?l:aY(l)}}catch($){Tm.length=0,xd($,t,1),y=_(ks)}let C=y;if(b&&m!==!1){const $=Object.keys(b),{shapeFlag:x}=C;$.length&&x&7&&(r&&$.some(UC)&&(b=lY(b,r)),C=ur(C,b))}return n.dirs&&(C=ur(C),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition&&(C.transition=n.transition),y=C,hg(k),y}function rY(t,e=!0){let n;for(let i=0;i<t.length;i++){const s=t[i];if(ls(s)){if(s.type!==ks||s.children==="v-if"){if(n)return;n=s}}else return}return n}const aY=t=>{let e;for(const n in t)(n==="class"||n==="style"||wd(n))&&((e||(e={}))[n]=t[n]);return e},lY=(t,e)=>{const n={};for(const i in t)(!UC(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function cY(t,e,n){const{props:i,children:s,component:o}=t,{props:r,children:a,patchFlag:l}=e,c=o.emitsOptions;if(e.dirs||e.transition)return!0;if(n&&l>=0){if(l&1024)return!0;if(l&16)return i?XS(i,r,c):!!r;if(l&8){const u=e.dynamicProps;for(let d=0;d<u.length;d++){const h=u[d];if(r[h]!==i[h]&&!Jy(c,h))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:i===r?!1:i?r?XS(i,r,c):!0:!!r;return!1}function XS(t,e,n){const i=Object.keys(e);if(i.length!==Object.keys(t).length)return!0;for(let s=0;s<i.length;s++){const o=i[s];if(e[o]!==t[o]&&!Jy(n,o))return!0}return!1}function nx({vnode:t,parent:e},n){for(;e;){const i=e.subTree;if(i.suspense&&i.suspense.activeBranch===t&&(i.el=t.el),i===t)(t=e.vnode).el=n,e=e.parent;else break}}const sx="components",uY="directives";function W(t,e){return ix(sx,t,!0,e)||t}const IP=Symbol.for("v-ndc");function Ct(t){return Ke(t)?ix(sx,t,!1)||t:t||IP}function xt(t){return ix(uY,t)}function ix(t,e,n=!0,i=!1){const s=Ms||Vs;if(s){const o=s.type;if(t===sx){const a=ek(o,!1);if(a&&(a===e||a===es(e)||a===Dc(es(e))))return o}const r=KS(s[t]||o[t],e)||KS(s.appContext[t],e);return!r&&i?o:r}}function KS(t,e){return t&&(t[e]||t[es(e)]||t[Dc(es(e))])}const LP=t=>t.__isSuspense;let z3=0;const dY={name:"Suspense",__isSuspense:!0,process(t,e,n,i,s,o,r,a,l,c){if(t==null)fY(e,n,i,s,o,r,a,l,c);else{if(o&&o.deps>0&&!t.suspense.isInFallback){e.suspense=t.suspense,e.suspense.vnode=e,e.el=t.el;return}pY(t,e,n,i,s,r,a,l,c)}},hydrate:mY,create:ox,normalize:gY},hY=dY;function fg(t,e){const n=t.props&&t.props[e];et(n)&&n()}function fY(t,e,n,i,s,o,r,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),h=t.suspense=ox(t,s,i,e,d,n,o,r,a,l);c(null,h.pendingBranch=t.ssContent,d,null,i,h,o,r),h.deps>0?(fg(t,"onPending"),fg(t,"onFallback"),c(null,t.ssFallback,e,n,i,null,o,r),Uh(h,t.ssFallback)):h.resolve(!1,!0)}function pY(t,e,n,i,s,o,r,a,{p:l,um:c,o:{createElement:u}}){const d=e.suspense=t.suspense;d.vnode=e,e.el=t.el;const h=e.ssContent,f=e.ssFallback,{activeBranch:p,pendingBranch:m,isInFallback:y,isHydrating:b}=d;if(m)d.pendingBranch=h,Cr(h,m)?(l(m,h,d.hiddenContainer,null,s,d,o,r,a),d.deps<=0?d.resolve():y&&(b||(l(p,f,n,i,s,null,o,r,a),Uh(d,f)))):(d.pendingId=z3++,b?(d.isHydrating=!1,d.activeBranch=m):c(m,s,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),y?(l(null,h,d.hiddenContainer,null,s,d,o,r,a),d.deps<=0?d.resolve():(l(p,f,n,i,s,null,o,r,a),Uh(d,f))):p&&Cr(h,p)?(l(p,h,n,i,s,d,o,r,a),d.resolve(!0)):(l(null,h,d.hiddenContainer,null,s,d,o,r,a),d.deps<=0&&d.resolve()));else if(p&&Cr(h,p))l(p,h,n,i,s,d,o,r,a),Uh(d,h);else if(fg(e,"onPending"),d.pendingBranch=h,h.shapeFlag&512?d.pendingId=h.component.suspenseId:d.pendingId=z3++,l(null,h,d.hiddenContainer,null,s,d,o,r,a),d.deps<=0)d.resolve();else{const{timeout:k,pendingId:C}=d;k>0?setTimeout(()=>{d.pendingId===C&&d.fallback(f)},k):k===0&&d.fallback(f)}}function ox(t,e,n,i,s,o,r,a,l,c,u=!1){const{p:d,m:h,um:f,n:p,o:{parentNode:m,remove:y}}=c;let b;const k=vY(t);k&&e!=null&&e.pendingBranch&&(b=e.pendingId,e.deps++);const C=t.props?A_(t.props.timeout):void 0,$=o,x={vnode:t,parent:e,parentComponent:n,namespace:r,container:i,hiddenContainer:s,deps:0,pendingId:z3++,timeout:typeof C=="number"?C:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(M=!1,P=!1){const{vnode:T,activeBranch:I,pendingBranch:L,pendingId:R,effects:V,parentComponent:H,container:F}=x;let z=!1;x.isHydrating?x.isHydrating=!1:M||(z=I&&L.transition&&L.transition.mode==="out-in",z&&(I.transition.afterLeave=()=>{R===x.pendingId&&(h(L,F,o===$?p(I):o,0),M_(V))}),I&&(m(I.el)!==x.hiddenContainer&&(o=p(I)),f(I,H,x,!0)),z||h(L,F,o,0)),Uh(x,L),x.pendingBranch=null,x.isInFallback=!1;let N=x.parent,q=!1;for(;N;){if(N.pendingBranch){N.effects.push(...V),q=!0;break}N=N.parent}!q&&!z&&M_(V),x.effects=[],k&&e&&e.pendingBranch&&b===e.pendingId&&(e.deps--,e.deps===0&&!P&&e.resolve()),fg(T,"onResolve")},fallback(M){if(!x.pendingBranch)return;const{vnode:P,activeBranch:T,parentComponent:I,container:L,namespace:R}=x;fg(P,"onFallback");const V=p(T),H=()=>{x.isInFallback&&(d(null,M,L,V,I,null,R,a,l),Uh(x,M))},F=M.transition&&M.transition.mode==="out-in";F&&(T.transition.afterLeave=H),x.isInFallback=!0,f(T,I,null,!0),F||H()},move(M,P,T){x.activeBranch&&h(x.activeBranch,M,P,T),x.container=M},next(){return x.activeBranch&&p(x.activeBranch)},registerDep(M,P){const T=!!x.pendingBranch;T&&x.deps++;const I=M.vnode.el;M.asyncDep.catch(L=>{xd(L,M,0)}).then(L=>{if(M.isUnmounted||x.isUnmounted||x.pendingId!==M.suspenseId)return;M.asyncResolved=!0;const{vnode:R}=M;J3(M,L,!1),I&&(R.el=I);const V=!I&&M.subTree.el;P(M,R,m(I||M.subTree.el),I?null:p(M.subTree),x,r,l),V&&y(V),nx(M,R.el),T&&--x.deps===0&&x.resolve()})},unmount(M,P){x.isUnmounted=!0,x.activeBranch&&f(x.activeBranch,n,M,P),x.pendingBranch&&f(x.pendingBranch,n,M,P)}};return x}function mY(t,e,n,i,s,o,r,a,l){const c=e.suspense=ox(e,i,n,t.parentNode,document.createElement("div"),null,s,o,r,a,!0),u=l(t,c.pendingBranch=e.ssContent,n,c,o,r);return c.deps===0&&c.resolve(!1,!0),u}function gY(t){const{shapeFlag:e,children:n}=t,i=e&32;t.ssContent=ZS(i?n.default:n),t.ssFallback=i?ZS(n.fallback):_(ks)}function ZS(t){let e;if(et(t)){const n=id&&t._c;n&&(t._d=!1,v()),t=t(),n&&(t._d=!0,e=no,hI())}return Ee(t)&&(t=rY(t)),t=xo(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function OP(t,e){e&&e.pendingBranch?Ee(t)?e.effects.push(...t):e.effects.push(t):M_(t)}function Uh(t,e){t.activeBranch=e;const{vnode:n,parentComponent:i}=t;let s=e.el;for(;!s&&e.component;)e=e.component.subTree,s=e.el;n.el=s,i&&i.subTree===n&&(i.vnode.el=s,nx(i,s))}function vY(t){var e;return((e=t.props)==null?void 0:e.suspensible)!=null&&t.props.suspensible!==!1}const DP=Symbol.for("v-scx"),RP=()=>qe(DP);function sl(t,e){return o1(t,null,e)}function VP(t,e){return o1(t,null,{flush:"post"})}function FP(t,e){return o1(t,null,{flush:"sync"})}const vv={};function Te(t,e,n){return o1(t,e,n)}function o1(t,e,{immediate:n,deep:i,flush:s,once:o,onTrack:r,onTrigger:a}=xn){if(e&&o){const M=e;e=(...P)=>{M(...P),x()}}const l=Vs,c=M=>i===!0?M:Su(M,i===!1?1:void 0);let u,d=!1,h=!1;if(gn(t)?(u=()=>t.value,d=lg(t)):pc(t)?(u=()=>c(t),d=!0):Ee(t)?(h=!0,d=t.some(M=>pc(M)||lg(M)),u=()=>t.map(M=>{if(gn(M))return M.value;if(pc(M))return c(M);if(et(M))return Ja(M,l,2)})):et(t)?e?u=()=>Ja(t,l,2):u=()=>(f&&f(),To(t,l,3,[p])):u=Tt,e&&i){const M=u;u=()=>Su(M())}let f,p=M=>{f=C.onStop=()=>{Ja(M,l,4),f=C.onStop=void 0}},m;if(a1)if(p=Tt,e?n&&To(e,l,3,[u(),h?[]:void 0,p]):u(),s==="sync"){const M=RP();m=M.__watcherHandles||(M.__watcherHandles=[])}else return Tt;let y=h?new Array(t.length).fill(vv):vv;const b=()=>{if(!(!C.active||!C.dirty))if(e){const M=C.run();(i||d||(h?M.some((P,T)=>Rr(P,y[T])):Rr(M,y)))&&(f&&f(),To(e,l,3,[M,y===vv?void 0:h&&y[0]===vv?[]:y,p]),y=M)}else C.run()};b.allowRecurse=!!e;let k;s==="sync"?k=b:s==="post"?k=()=>Js(b,l&&l.suspense):(b.pre=!0,l&&(b.id=l.uid),k=()=>Zy(b));const C=new uf(u,Tt,k),$=Yy(),x=()=>{C.stop(),$&&jC($.effects,C)};return e?n?b():y=C.run():s==="post"?Js(C.run.bind(C),l&&l.suspense):C.run(),m&&m.push(x),x}function _Y(t,e,n){const i=this.proxy,s=Ke(t)?t.includes(".")?NP(i,t):()=>i[t]:t.bind(i,i);let o;et(e)?o=e:(o=e.handler,n=e);const r=od(this),a=o1(s,o.bind(i),n);return r(),a}function NP(t,e){const n=e.split(".");return()=>{let i=t;for(let s=0;s<n.length&&i;s++)i=i[n[s]];return i}}function Su(t,e,n=0,i){if(!yt(t)||t.__v_skip)return t;if(e&&e>0){if(n>=e)return t;n++}if(i=i||new Set,i.has(t))return t;if(i.add(t),gn(t))Su(t.value,e,n,i);else if(Ee(t))for(let s=0;s<t.length;s++)Su(t[s],e,n,i);else if(kd(t)||Fh(t))t.forEach(s=>{Su(s,e,n,i)});else if(ag(t))for(const s in t)Su(t[s],e,n,i);return t}function De(t,e){if(Ms===null)return t;const n=nb(Ms)||Ms.proxy,i=t.dirs||(t.dirs=[]);for(let s=0;s<e.length;s++){let[o,r,a,l=xn]=e[s];o&&(et(o)&&(o={mounted:o,updated:o}),o.deep&&Su(r),i.push({dir:o,instance:n,value:r,oldValue:void 0,arg:a,modifiers:l}))}return t}function la(t,e,n,i){const s=t.dirs,o=e&&e.dirs;for(let r=0;r<s.length;r++){const a=s[r];o&&(a.oldValue=o[r].value);let l=a.dir[i];l&&(Rc(),To(l,n,8,[t.el,a,t,e]),Vc())}}const ql=Symbol("_leaveCb"),_v=Symbol("_enterCb");function rx(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ft(()=>{t.isMounted=!0}),bn(()=>{t.isUnmounting=!0}),t}const jo=[Function,Array],ax={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:jo,onEnter:jo,onAfterEnter:jo,onEnterCancelled:jo,onBeforeLeave:jo,onLeave:jo,onAfterLeave:jo,onLeaveCancelled:jo,onBeforeAppear:jo,onAppear:jo,onAfterAppear:jo,onAppearCancelled:jo},yY={name:"BaseTransition",props:ax,setup(t,{slots:e}){const n=bt(),i=rx();return()=>{const s=e.default&&eb(e.default(),!0);if(!s||!s.length)return;let o=s[0];if(s.length>1){for(const h of s)if(h.type!==ks){o=h;break}}const r=nn(t),{mode:a}=r;if(i.isLeaving)return L2(o);const l=JS(o);if(!l)return L2(o);const c=hf(l,r,i,n);sd(l,c);const u=n.subTree,d=u&&JS(u);if(d&&d.type!==ks&&!Cr(l,d)){const h=hf(d,r,i,n);if(sd(d,h),a==="out-in")return i.isLeaving=!0,h.afterLeave=()=>{i.isLeaving=!1,n.update.active!==!1&&(n.effect.dirty=!0,n.update())},L2(o);a==="in-out"&&l.type!==ks&&(h.delayLeave=(f,p,m)=>{const y=zP(i,d);y[String(d.key)]=d,f[ql]=()=>{p(),f[ql]=void 0,delete c.delayedLeave},c.delayedLeave=m})}return o}}},BP=yY;function zP(t,e){const{leavingVNodes:n}=t;let i=n.get(e.type);return i||(i=Object.create(null),n.set(e.type,i)),i}function hf(t,e,n,i){const{appear:s,mode:o,persisted:r=!1,onBeforeEnter:a,onEnter:l,onAfterEnter:c,onEnterCancelled:u,onBeforeLeave:d,onLeave:h,onAfterLeave:f,onLeaveCancelled:p,onBeforeAppear:m,onAppear:y,onAfterAppear:b,onAppearCancelled:k}=e,C=String(t.key),$=zP(n,t),x=(T,I)=>{T&&To(T,i,9,I)},M=(T,I)=>{const L=I[1];x(T,I),Ee(T)?T.every(R=>R.length<=1)&&L():T.length<=1&&L()},P={mode:o,persisted:r,beforeEnter(T){let I=a;if(!n.isMounted)if(s)I=m||a;else return;T[ql]&&T[ql](!0);const L=$[C];L&&Cr(t,L)&&L.el[ql]&&L.el[ql](),x(I,[T])},enter(T){let I=l,L=c,R=u;if(!n.isMounted)if(s)I=y||l,L=b||c,R=k||u;else return;let V=!1;const H=T[_v]=F=>{V||(V=!0,F?x(R,[T]):x(L,[T]),P.delayedLeave&&P.delayedLeave(),T[_v]=void 0)};I?M(I,[T,H]):H()},leave(T,I){const L=String(t.key);if(T[_v]&&T[_v](!0),n.isUnmounting)return I();x(d,[T]);let R=!1;const V=T[ql]=H=>{R||(R=!0,I(),H?x(p,[T]):x(f,[T]),T[ql]=void 0,$[L]===t&&delete $[L])};$[L]=t,h?M(h,[T,V]):V()},clone(T){return hf(T,e,n,i)}};return P}function L2(t){if(r1(t))return t=ur(t),t.children=null,t}function JS(t){return r1(t)?t.children?t.children[0]:void 0:t}function sd(t,e){t.shapeFlag&6&&t.component?sd(t.component.subTree,e):t.shapeFlag&128?(t.ssContent.transition=e.clone(t.ssContent),t.ssFallback.transition=e.clone(t.ssFallback)):t.transition=e}function eb(t,e=!1,n){let i=[],s=0;for(let o=0;o<t.length;o++){let r=t[o];const a=n==null?r.key:String(n)+String(r.key!=null?r.key:o);r.type===ee?(r.patchFlag&128&&s++,i=i.concat(eb(r.children,e,a))):(e||r.type!==ks)&&i.push(a!=null?ur(r,{key:a}):r)}if(s>1)for(let o=0;o<i.length;o++)i[o].patchFlag=-2;return i}/*! #__NO_SIDE_EFFECTS__ */function ce(t,e){return et(t)?(()=>yn({name:t.name},e,{setup:t}))():t}const zu=t=>!!t.type.__asyncLoader;/*! #__NO_SIDE_EFFECTS__ */function bY(t){et(t)&&(t={loader:t});const{loader:e,loadingComponent:n,errorComponent:i,delay:s=200,timeout:o,suspensible:r=!0,onError:a}=t;let l=null,c,u=0;const d=()=>(u++,l=null,h()),h=()=>{let f;return l||(f=l=e().catch(p=>{if(p=p instanceof Error?p:new Error(String(p)),a)return new Promise((m,y)=>{a(p,()=>m(d()),()=>y(p),u+1)});throw p}).then(p=>f!==l&&l?l:(p&&(p.__esModule||p[Symbol.toStringTag]==="Module")&&(p=p.default),c=p,p)))};return ce({name:"AsyncComponentWrapper",__asyncLoader:h,get __asyncResolved(){return c},setup(){const f=Vs;if(c)return()=>O2(c,f);const p=k=>{l=null,xd(k,f,13,!i)};if(r&&f.suspense||a1)return h().then(k=>()=>O2(k,f)).catch(k=>(p(k),()=>i?_(i,{error:k}):null));const m=J(!1),y=J(),b=J(!!s);return s&&setTimeout(()=>{b.value=!1},s),o!=null&&setTimeout(()=>{if(!m.value&&!y.value){const k=new Error(`Async component timed out after ${o}ms.`);p(k),y.value=k}},o),h().then(()=>{m.value=!0,f.parent&&r1(f.parent.vnode)&&(f.parent.effect.dirty=!0,Zy(f.parent.update))}).catch(k=>{p(k),y.value=k}),()=>{if(m.value&&c)return O2(c,f);if(y.value&&i)return _(i,{error:y.value});if(n&&!b.value)return _(n)}}})}function O2(t,e){const{ref:n,props:i,children:s,ce:o}=e.vnode,r=_(t,i,s);return r.ref=n,r.ce=o,delete e.vnode.ce,r}const r1=t=>t.type.__isKeepAlive,wY={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const n=bt(),i=n.ctx;if(!i.renderer)return()=>{const k=e.default&&e.default();return k&&k.length===1?k[0]:k};const s=new Map,o=new Set;let r=null;const a=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:d}}}=i,h=d("div");i.activate=(k,C,$,x,M)=>{const P=k.component;c(k,C,$,0,a),l(P.vnode,k,C,$,P,a,x,k.slotScopeIds,M),Js(()=>{P.isDeactivated=!1,P.a&&Nh(P.a);const T=k.props&&k.props.onVnodeMounted;T&&Qi(T,P.parent,k)},a)},i.deactivate=k=>{const C=k.component;c(k,h,null,1,a),Js(()=>{C.da&&Nh(C.da);const $=k.props&&k.props.onVnodeUnmounted;$&&Qi($,C.parent,k),C.isDeactivated=!0},a)};function f(k){D2(k),u(k,n,a,!0)}function p(k){s.forEach((C,$)=>{const x=ek(C.type);x&&(!k||!k(x))&&m($)})}function m(k){const C=s.get(k);!r||!Cr(C,r)?f(C):r&&D2(r),s.delete(k),o.delete(k)}Te(()=>[t.include,t.exclude],([k,C])=>{k&&p($=>zp(k,$)),C&&p($=>!zp(C,$))},{flush:"post",deep:!0});let y=null;const b=()=>{y!=null&&s.set(y,R2(n.subTree))};return Ft(b),ul(b),bn(()=>{s.forEach(k=>{const{subTree:C,suspense:$}=n,x=R2(C);if(k.type===x.type&&k.key===x.key){D2(x);const M=x.component.da;M&&Js(M,$);return}f(k)})}),()=>{if(y=null,!e.default)return r=null;const k=e.default(),C=k[0];if(k.length>1)return r=null,k;if(!ls(C)||!(C.shapeFlag&4)&&!(C.shapeFlag&128))return r=null,C;let $=R2(C);const x=$.type,M=ek(zu($)?$.type.__asyncResolved||{}:x),{include:P,exclude:T,max:I}=t;if(P&&(!M||!zp(P,M))||T&&M&&zp(T,M))return r=$,C;const L=$.key==null?x:$.key,R=s.get(L);return $.el&&($=ur($),C.shapeFlag&128&&(C.ssContent=$)),y=L,R?($.el=R.el,$.component=R.component,$.transition&&sd($,$.transition),$.shapeFlag|=512,o.delete(L),o.add(L)):(o.add(L),I&&o.size>parseInt(I,10)&&m(o.values().next().value)),$.shapeFlag|=256,r=$,LP(C.type)?C:$}}},kY=wY;function zp(t,e){return Ee(t)?t.some(n=>zp(n,e)):Ke(t)?t.split(",").includes(e):Qj(t)?t.test(e):!1}function lx(t,e){HP(t,"a",e)}function cx(t,e){HP(t,"da",e)}function HP(t,e,n=Vs){const i=t.__wdc||(t.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(tb(e,i,n),n){let s=n.parent;for(;s&&s.parent;)r1(s.parent.vnode)&&CY(i,e,n,s),s=s.parent}}function CY(t,e,n,i){const s=tb(e,t,i,!0);dl(()=>{jC(i[e],s)},n)}function D2(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function R2(t){return t.shapeFlag&128?t.ssContent:t}function tb(t,e,n=Vs,i=!1){if(n){const s=n[t]||(n[t]=[]),o=e.__weh||(e.__weh=(...r)=>{if(n.isUnmounted)return;Rc();const a=od(n),l=To(e,n,t,r);return a(),Vc(),l});return i?s.unshift(o):s.push(o),o}}const cl=t=>(e,n=Vs)=>(!a1||t==="sp")&&tb(t,(...i)=>e(...i),n),Sd=cl("bm"),Ft=cl("m"),ux=cl("bu"),ul=cl("u"),bn=cl("bum"),dl=cl("um"),UP=cl("sp"),jP=cl("rtg"),WP=cl("rtc");function YP(t,e=Vs){tb("ec",t,e)}function Ce(t,e,n,i){let s;const o=n&&n[i];if(Ee(t)||Ke(t)){s=new Array(t.length);for(let r=0,a=t.length;r<a;r++)s[r]=e(t[r],r,void 0,o&&o[r])}else if(typeof t=="number"){s=new Array(t);for(let r=0;r<t;r++)s[r]=e(r+1,r,void 0,o&&o[r])}else if(yt(t))if(t[Symbol.iterator])s=Array.from(t,(r,a)=>e(r,a,void 0,o&&o[a]));else{const r=Object.keys(t);s=new Array(r.length);for(let a=0,l=r.length;a<l;a++){const c=r[a];s[a]=e(t[c],c,a,o&&o[a])}}else s=[];return n&&(n[i]=s),s}function cs(t,e){for(let n=0;n<e.length;n++){const i=e[n];if(Ee(i))for(let s=0;s<i.length;s++)t[i[s].name]=i[s].fn;else i&&(t[i.name]=i.key?(...s)=>{const o=i.fn(...s);return o&&(o.key=i.key),o}:i.fn)}return t}function le(t,e,n={},i,s){if(Ms.isCE||Ms.parent&&zu(Ms.parent)&&Ms.parent.isCE)return e!=="default"&&(n.name=e),_("slot",n,i&&i());let o=t[e];o&&o._c&&(o._d=!1),v();const r=o&&qP(o(n)),a=D(ee,{key:n.key||r&&r.key||`_${e}`},r||(i?i():[]),r&&t._===1?64:-2);return!s&&a.scopeId&&(a.slotScopeIds=[a.scopeId+"-s"]),o&&o._c&&(o._d=!0),a}function qP(t){return t.some(e=>ls(e)?!(e.type===ks||e.type===ee&&!qP(e.children)):!0)?t:null}function GP(t,e){const n={};for(const i in t)n[e&&/[A-Z]/.test(i)?`on:${i}`:Fu(i)]=t[i];return n}const H3=t=>t?gI(t)?nb(t)||t.proxy:H3(t.parent):null,Em=yn(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>H3(t.parent),$root:t=>H3(t.root),$emit:t=>t.emit,$options:t=>dx(t),$forceUpdate:t=>t.f||(t.f=()=>{t.effect.dirty=!0,Zy(t.update)}),$nextTick:t=>t.n||(t.n=ot.bind(t.proxy)),$watch:t=>_Y.bind(t)}),V2=(t,e)=>t!==xn&&!t.__isScriptSetup&&Dt(t,e),U3={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:i,data:s,props:o,accessCache:r,type:a,appContext:l}=t;let c;if(e[0]!=="$"){const f=r[e];if(f!==void 0)switch(f){case 1:return i[e];case 2:return s[e];case 4:return n[e];case 3:return o[e]}else{if(V2(i,e))return r[e]=1,i[e];if(s!==xn&&Dt(s,e))return r[e]=2,s[e];if((c=t.propsOptions[0])&&Dt(c,e))return r[e]=3,o[e];if(n!==xn&&Dt(n,e))return r[e]=4,n[e];j3&&(r[e]=0)}}const u=Em[e];let d,h;if(u)return e==="$attrs"&&lo(t.attrs,"get",""),u(t);if((d=a.__cssModules)&&(d=d[e]))return d;if(n!==xn&&Dt(n,e))return r[e]=4,n[e];if(h=l.config.globalProperties,Dt(h,e))return h[e]},set({_:t},e,n){const{data:i,setupState:s,ctx:o}=t;return V2(s,e)?(s[e]=n,!0):i!==xn&&Dt(i,e)?(i[e]=n,!0):Dt(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(o[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:i,appContext:s,propsOptions:o}},r){let a;return!!n[r]||t!==xn&&Dt(t,r)||V2(e,r)||(a=o[0])&&Dt(a,r)||Dt(i,r)||Dt(Em,r)||Dt(s.config.globalProperties,r)},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Dt(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}},xY=yn({},U3,{get(t,e){if(e!==Symbol.unscopables)return U3.get(t,e,t)},has(t,e){return e[0]!=="_"&&!oW(e)}});function SY(){return null}function $Y(){return null}function AY(t){}function EY(t){}function MY(){return null}function TY(){}function PY(t,e){return null}function di(){return XP().slots}function $d(){return XP().attrs}function XP(){const t=bt();return t.setupContext||(t.setupContext=bI(t))}function pg(t){return Ee(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function IY(t,e){const n=pg(t);for(const i in e){if(i.startsWith("__skip"))continue;let s=n[i];s?Ee(s)||et(s)?s=n[i]={type:s,default:e[i]}:s.default=e[i]:s===null&&(s=n[i]={default:e[i]}),s&&e[`__skip_${i}`]&&(s.skipFactory=!0)}return n}function LY(t,e){return!t||!e?t||e:Ee(t)&&Ee(e)?t.concat(e):yn({},pg(t),pg(e))}function OY(t,e){const n={};for(const i in t)e.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>t[i]});return n}function DY(t){const e=bt();let n=t();return Z3(),nd(n)&&(n=n.catch(i=>{throw od(e),i})),[n,()=>od(e)]}let j3=!0;function RY(t){const e=dx(t),n=t.proxy,i=t.ctx;j3=!1,e.beforeCreate&&QS(e.beforeCreate,t,"bc");const{data:s,computed:o,methods:r,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:f,updated:p,activated:m,deactivated:y,beforeDestroy:b,beforeUnmount:k,destroyed:C,unmounted:$,render:x,renderTracked:M,renderTriggered:P,errorCaptured:T,serverPrefetch:I,expose:L,inheritAttrs:R,components:V,directives:H,filters:F}=e;if(c&&VY(c,i,null),r)for(const q in r){const K=r[q];et(K)&&(i[q]=K.bind(n))}if(s){const q=s.call(n,n);yt(q)&&(t.data=In(q))}if(j3=!0,o)for(const q in o){const K=o[q],X=et(K)?K.bind(n,n):et(K.get)?K.get.bind(n,n):Tt,U=!et(K)&&et(K.set)?K.set.bind(n):Tt,Q=Y({get:X,set:U});Object.defineProperty(i,q,{enumerable:!0,configurable:!0,get:()=>Q.value,set:ne=>Q.value=ne})}if(a)for(const q in a)KP(a[q],i,n,q);if(l){const q=et(l)?l.call(n):l;Reflect.ownKeys(q).forEach(K=>{It(K,q[K])})}u&&QS(u,t,"c");function N(q,K){Ee(K)?K.forEach(X=>q(X.bind(n))):K&&q(K.bind(n))}if(N(Sd,d),N(Ft,h),N(ux,f),N(ul,p),N(lx,m),N(cx,y),N(YP,T),N(WP,M),N(jP,P),N(bn,k),N(dl,$),N(UP,I),Ee(L))if(L.length){const q=t.exposed||(t.exposed={});L.forEach(K=>{Object.defineProperty(q,K,{get:()=>n[K],set:X=>n[K]=X})})}else t.exposed||(t.exposed={});x&&t.render===Tt&&(t.render=x),R!=null&&(t.inheritAttrs=R),V&&(t.components=V),H&&(t.directives=H)}function VY(t,e,n=Tt){Ee(t)&&(t=W3(t));for(const i in t){const s=t[i];let o;yt(s)?"default"in s?o=qe(s.from||i,s.default,!0):o=qe(s.from||i):o=qe(s),gn(o)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):e[i]=o}}function QS(t,e,n){To(Ee(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function KP(t,e,n,i){const s=i.includes(".")?NP(n,i):()=>n[i];if(Ke(t)){const o=e[t];et(o)&&Te(s,o)}else if(et(t))Te(s,t.bind(n));else if(yt(t))if(Ee(t))t.forEach(o=>KP(o,e,n,i));else{const o=et(t.handler)?t.handler.bind(n):e[t.handler];et(o)&&Te(s,o,t)}}function dx(t){const e=t.type,{mixins:n,extends:i}=e,{mixins:s,optionsCache:o,config:{optionMergeStrategies:r}}=t.appContext,a=o.get(e);let l;return a?l=a:!s.length&&!n&&!i?l=e:(l={},s.length&&s.forEach(c=>P_(l,c,r,!0)),P_(l,e,r)),yt(e)&&o.set(e,l),l}function P_(t,e,n,i=!1){const{mixins:s,extends:o}=e;o&&P_(t,o,n,!0),s&&s.forEach(r=>P_(t,r,n,!0));for(const r in e)if(!(i&&r==="expose")){const a=FY[r]||n&&n[r];t[r]=a?a(t[r],e[r]):e[r]}return t}const FY={data:e9,props:t9,emits:t9,methods:Hp,computed:Hp,beforeCreate:Li,created:Li,beforeMount:Li,mounted:Li,beforeUpdate:Li,updated:Li,beforeDestroy:Li,beforeUnmount:Li,destroyed:Li,unmounted:Li,activated:Li,deactivated:Li,errorCaptured:Li,serverPrefetch:Li,components:Hp,directives:Hp,watch:BY,provide:e9,inject:NY};function e9(t,e){return e?t?function(){return yn(et(t)?t.call(this,this):t,et(e)?e.call(this,this):e)}:e:t}function NY(t,e){return Hp(W3(t),W3(e))}function W3(t){if(Ee(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function Li(t,e){return t?[...new Set([].concat(t,e))]:e}function Hp(t,e){return t?yn(Object.create(null),t,e):e}function t9(t,e){return t?Ee(t)&&Ee(e)?[...new Set([...t,...e])]:yn(Object.create(null),pg(t),pg(e??{})):e}function BY(t,e){if(!t)return e;if(!e)return t;const n=yn(Object.create(null),t);for(const i in e)n[i]=Li(t[i],e[i]);return n}function ZP(){return{app:null,config:{isNativeTag:a0,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 zY=0;function HY(t,e){return function(i,s=null){et(i)||(i=yn({},i)),s!=null&&!yt(s)&&(s=null);const o=ZP(),r=new WeakSet;let a=!1;const l=o.app={_uid:zY++,_component:i,_props:s,_container:null,_context:o,_instance:null,version:kI,get config(){return o.config},set config(c){},use(c,...u){return r.has(c)||(c&&et(c.install)?(r.add(c),c.install(l,...u)):et(c)&&(r.add(c),c(l,...u))),l},mixin(c){return o.mixins.includes(c)||o.mixins.push(c),l},component(c,u){return u?(o.components[c]=u,l):o.components[c]},directive(c,u){return u?(o.directives[c]=u,l):o.directives[c]},mount(c,u,d){if(!a){const h=_(i,s);return h.appContext=o,d===!0?d="svg":d===!1&&(d=void 0),u&&e?e(h,c):t(h,c,d),a=!0,l._container=c,c.__vue_app__=l,nb(h.component)||h.component.proxy}},unmount(){a&&(t(null,l._container),delete l._container.__vue_app__)},provide(c,u){return o.provides[c]=u,l},runWithContext(c){const u=jh;jh=l;try{return c()}finally{jh=u}}};return l}}let jh=null;function It(t,e){if(Vs){let n=Vs.provides;const i=Vs.parent&&Vs.parent.provides;i===n&&(n=Vs.provides=Object.create(i)),n[t]=e}}function qe(t,e,n=!1){const i=Vs||Ms;if(i||jh){const s=i?i.parent==null?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:jh._context.provides;if(s&&t in s)return s[t];if(arguments.length>1)return n&&et(e)?e.call(i&&i.proxy):e}}function JP(){return!!(Vs||Ms||jh)}const QP=Object.create(null),Y3=()=>Object.create(QP),eI=t=>Object.getPrototypeOf(t)===QP;function UY(t,e,n,i=!1){const s={},o=Y3();t.propsDefaults=Object.create(null),tI(t,e,s,o);for(const r in t.propsOptions[0])r in s||(s[r]=void 0);n?t.props=i?s:KC(s):t.type.props?t.props=s:t.props=o,t.attrs=o}function jY(t,e,n,i){const{props:s,attrs:o,vnode:{patchFlag:r}}=t,a=nn(s),[l]=t.propsOptions;let c=!1;if((i||r>0)&&!(r&16)){if(r&8){const u=t.vnode.dynamicProps;for(let d=0;d<u.length;d++){let h=u[d];if(Jy(t.emitsOptions,h))continue;const f=e[h];if(l)if(Dt(o,h))f!==o[h]&&(o[h]=f,c=!0);else{const p=es(h);s[p]=q3(l,a,p,f,t,!1)}else f!==o[h]&&(o[h]=f,c=!0)}}}else{tI(t,e,s,o)&&(c=!0);let u;for(const d in a)(!e||!Dt(e,d)&&((u=eo(d))===d||!Dt(e,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(s[d]=q3(l,a,d,void 0,t,!0)):delete s[d]);if(o!==a)for(const d in o)(!e||!Dt(e,d))&&(delete o[d],c=!0)}c&&Za(t.attrs,"set","")}function tI(t,e,n,i){const[s,o]=t.propsOptions;let r=!1,a;if(e)for(let l in e){if(hc(l))continue;const c=e[l];let u;s&&Dt(s,u=es(l))?!o||!o.includes(u)?n[u]=c:(a||(a={}))[u]=c:Jy(t.emitsOptions,l)||(!(l in i)||c!==i[l])&&(i[l]=c,r=!0)}if(o){const l=nn(n),c=a||xn;for(let u=0;u<o.length;u++){const d=o[u];n[d]=q3(s,l,d,c[d],t,!Dt(c,d))}}return r}function q3(t,e,n,i,s,o){const r=t[n];if(r!=null){const a=Dt(r,"default");if(a&&i===void 0){const l=r.default;if(r.type!==Function&&!r.skipFactory&&et(l)){const{propsDefaults:c}=s;if(n in c)i=c[n];else{const u=od(s);i=c[n]=l.call(null,e),u()}}else i=l}r[0]&&(o&&!a?i=!1:r[1]&&(i===""||i===eo(n))&&(i=!0))}return i}function nI(t,e,n=!1){const i=e.propsCache,s=i.get(t);if(s)return s;const o=t.props,r={},a=[];let l=!1;if(!et(t)){const u=d=>{l=!0;const[h,f]=nI(d,e,!0);yn(r,h),f&&a.push(...f)};!n&&e.mixins.length&&e.mixins.forEach(u),t.extends&&u(t.extends),t.mixins&&t.mixins.forEach(u)}if(!o&&!l)return yt(t)&&i.set(t,Vh),Vh;if(Ee(o))for(let u=0;u<o.length;u++){const d=es(o[u]);n9(d)&&(r[d]=xn)}else if(o)for(const u in o){const d=es(u);if(n9(d)){const h=o[u],f=r[d]=Ee(h)||et(h)?{type:h}:yn({},h);if(f){const p=o9(Boolean,f.type),m=o9(String,f.type);f[0]=p>-1,f[1]=m<0||p<m,(p>-1||Dt(f,"default"))&&a.push(d)}}}const c=[r,a];return yt(t)&&i.set(t,c),c}function n9(t){return t[0]!=="$"&&!hc(t)}function s9(t){return t===null?"null":typeof t=="function"?t.name||"":typeof t=="object"&&t.constructor&&t.constructor.name||""}function i9(t,e){return s9(t)===s9(e)}function o9(t,e){return Ee(e)?e.findIndex(n=>i9(n,t)):et(e)&&i9(e,t)?0:-1}const sI=t=>t[0]==="_"||t==="$stable",hx=t=>Ee(t)?t.map(xo):[xo(t)],WY=(t,e,n)=>{if(e._n)return e;const i=w((...s)=>hx(e(...s)),n);return i._c=!1,i},iI=(t,e,n)=>{const i=t._ctx;for(const s in t){if(sI(s))continue;const o=t[s];if(et(o))e[s]=WY(s,o,i);else if(o!=null){const r=hx(o);e[s]=()=>r}}},oI=(t,e)=>{const n=hx(e);t.slots.default=()=>n},YY=(t,e)=>{if(t.vnode.shapeFlag&32){const n=e._;n?(t.slots=nn(e),nP(t.slots,"_",n)):iI(e,t.slots=Y3())}else t.slots=Y3(),e&&oI(t,e)},qY=(t,e,n)=>{const{vnode:i,slots:s}=t;let o=!0,r=xn;if(i.shapeFlag&32){const a=e._;a?n&&a===1?o=!1:(yn(s,e),!n&&a===1&&delete s._):(o=!e.$stable,iI(e,s)),r=e}else e&&(oI(t,e),r={default:1});if(o)for(const a in s)!sI(a)&&r[a]==null&&delete s[a]};function I_(t,e,n,i,s=!1){if(Ee(t)){t.forEach((h,f)=>I_(h,e&&(Ee(e)?e[f]:e),n,i,s));return}if(zu(i)&&!s)return;const o=i.shapeFlag&4?nb(i.component)||i.component.proxy:i.el,r=s?null:o,{i:a,r:l}=t,c=e&&e.r,u=a.refs===xn?a.refs={}:a.refs,d=a.setupState;if(c!=null&&c!==l&&(Ke(c)?(u[c]=null,Dt(d,c)&&(d[c]=null)):gn(c)&&(c.value=null)),et(l))Ja(l,a,12,[r,u]);else{const h=Ke(l),f=gn(l);if(h||f){const p=()=>{if(t.f){const m=h?Dt(d,l)?d[l]:u[l]:l.value;s?Ee(m)&&jC(m,o):Ee(m)?m.includes(o)||m.push(o):h?(u[l]=[o],Dt(d,l)&&(d[l]=u[l])):(l.value=[o],t.k&&(u[t.k]=l.value))}else h?(u[l]=r,Dt(d,l)&&(d[l]=r)):f&&(l.value=r,t.k&&(u[t.k]=r))};r?(p.id=-1,Js(p,n)):p()}}}let xl=!1;const GY=t=>t.namespaceURI.includes("svg")&&t.tagName!=="foreignObject",XY=t=>t.namespaceURI.includes("MathML"),yv=t=>{if(GY(t))return"svg";if(XY(t))return"mathml"},bv=t=>t.nodeType===8;function KY(t){const{mt:e,p:n,o:{patchProp:i,createText:s,nextSibling:o,parentNode:r,remove:a,insert:l,createComment:c}}=t,u=(C,$)=>{if(!$.hasChildNodes()){n(null,C,$),T_(),$._vnode=C;return}xl=!1,d($.firstChild,C,null,null,null),T_(),$._vnode=C,xl&&console.error("Hydration completed but contains mismatches.")},d=(C,$,x,M,P,T=!1)=>{T=T||!!$.dynamicChildren;const I=bv(C)&&C.data==="[",L=()=>m(C,$,x,M,P,I),{type:R,ref:V,shapeFlag:H,patchFlag:F}=$;let z=C.nodeType;$.el=C,F===-2&&(T=!1,$.dynamicChildren=null);let N=null;switch(R){case il:z!==3?$.children===""?(l($.el=s(""),r(C),C),N=C):N=L():(C.data!==$.children&&(xl=!0,C.data=$.children),N=o(C));break;case ks:k(C)?(N=o(C),b($.el=C.content.firstChild,C,x)):z!==8||I?N=L():N=o(C);break;case Hu:if(I&&(C=o(C),z=C.nodeType),z===1||z===3){N=C;const q=!$.children.length;for(let K=0;K<$.staticCount;K++)q&&($.children+=N.nodeType===1?N.outerHTML:N.data),K===$.staticCount-1&&($.anchor=N),N=o(N);return I?o(N):N}else L();break;case ee:I?N=p(C,$,x,M,P,T):N=L();break;default:if(H&1)(z!==1||$.type.toLowerCase()!==C.tagName.toLowerCase())&&!k(C)?N=L():N=h(C,$,x,M,P,T);else if(H&6){$.slotScopeIds=P;const q=r(C);if(I?N=y(C):bv(C)&&C.data==="teleport start"?N=y(C,C.data,"teleport end"):N=o(C),e($,q,null,x,M,yv(q),T),zu($)){let K;I?(K=_(ee),K.anchor=N?N.previousSibling:q.lastChild):K=C.nodeType===3?B(""):_("div"),K.el=C,$.component.subTree=K}}else H&64?z!==8?N=L():N=$.type.hydrate(C,$,x,M,P,T,t,f):H&128&&(N=$.type.hydrate(C,$,x,M,yv(r(C)),P,T,t,d))}return V!=null&&I_(V,null,M,$),N},h=(C,$,x,M,P,T)=>{T=T||!!$.dynamicChildren;const{type:I,props:L,patchFlag:R,shapeFlag:V,dirs:H,transition:F}=$,z=I==="input"||I==="option";if(z||R!==-1){H&&la($,null,x,"created");let N=!1;if(k(C)){N=cI(M,F)&&x&&x.vnode.props&&x.vnode.props.appear;const K=C.content.firstChild;N&&F.beforeEnter(K),b(K,C,x),$.el=C=K}if(V&16&&!(L&&(L.innerHTML||L.textContent))){let K=f(C.firstChild,$,C,x,M,P,T);for(;K;){xl=!0;const X=K;K=K.nextSibling,a(X)}}else V&8&&C.textContent!==$.children&&(xl=!0,C.textContent=$.children);if(L)if(z||!T||R&48)for(const K in L)(z&&(K.endsWith("value")||K==="indeterminate")||wd(K)&&!hc(K)||K[0]===".")&&i(C,K,null,L[K],void 0,void 0,x);else L.onClick&&i(C,"onClick",null,L.onClick,void 0,void 0,x);let q;(q=L&&L.onVnodeBeforeMount)&&Qi(q,x,$),H&&la($,null,x,"beforeMount"),((q=L&&L.onVnodeMounted)||H||N)&&OP(()=>{q&&Qi(q,x,$),N&&F.enter(C),H&&la($,null,x,"mounted")},M)}return C.nextSibling},f=(C,$,x,M,P,T,I)=>{I=I||!!$.dynamicChildren;const L=$.children,R=L.length;for(let V=0;V<R;V++){const H=I?L[V]:L[V]=xo(L[V]);if(C)C=d(C,H,M,P,T,I);else{if(H.type===il&&!H.children)continue;xl=!0,n(null,H,x,null,M,P,yv(x),T)}}return C},p=(C,$,x,M,P,T)=>{const{slotScopeIds:I}=$;I&&(P=P?P.concat(I):I);const L=r(C),R=f(o(C),$,L,x,M,P,T);return R&&bv(R)&&R.data==="]"?o($.anchor=R):(xl=!0,l($.anchor=c("]"),L,R),R)},m=(C,$,x,M,P,T)=>{if(xl=!0,$.el=null,T){const R=y(C);for(;;){const V=o(C);if(V&&V!==R)a(V);else break}}const I=o(C),L=r(C);return a(C),n(null,$,L,I,x,M,yv(L),P),I},y=(C,$="[",x="]")=>{let M=0;for(;C;)if(C=o(C),C&&bv(C)&&(C.data===$&&M++,C.data===x)){if(M===0)return o(C);M--}return C},b=(C,$,x)=>{const M=$.parentNode;M&&M.replaceChild(C,$);let P=x;for(;P;)P.vnode.el===$&&(P.vnode.el=P.subTree.el=C),P=P.parent},k=C=>C.nodeType===1&&C.tagName.toLowerCase()==="template";return[u,d]}const Js=OP;function rI(t){return lI(t)}function aI(t){return lI(t,KY)}function lI(t,e){const n=sP();n.__VUE__=!0;const{insert:i,remove:s,patchProp:o,createElement:r,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:f=Tt,insertStaticContent:p}=t,m=(te,se,ve,$e=null,Se=null,Fe=null,Ye=void 0,Re=null,He=!!se.dynamicChildren)=>{if(te===se)return;te&&!Cr(te,se)&&($e=oe(te),ne(te,Se,Fe,!0),te=null),se.patchFlag===-2&&(He=!1,se.dynamicChildren=null);const{type:Me,ref:Ne,shapeFlag:st}=se;switch(Me){case il:y(te,se,ve,$e);break;case ks:b(te,se,ve,$e);break;case Hu:te==null&&k(se,ve,$e,Ye);break;case ee:V(te,se,ve,$e,Se,Fe,Ye,Re,He);break;default:st&1?x(te,se,ve,$e,Se,Fe,Ye,Re,He):st&6?H(te,se,ve,$e,Se,Fe,Ye,Re,He):(st&64||st&128)&&Me.process(te,se,ve,$e,Se,Fe,Ye,Re,He,re)}Ne!=null&&Se&&I_(Ne,te&&te.ref,Fe,se||te,!se)},y=(te,se,ve,$e)=>{if(te==null)i(se.el=a(se.children),ve,$e);else{const Se=se.el=te.el;se.children!==te.children&&c(Se,se.children)}},b=(te,se,ve,$e)=>{te==null?i(se.el=l(se.children||""),ve,$e):se.el=te.el},k=(te,se,ve,$e)=>{[te.el,te.anchor]=p(te.children,se,ve,$e,te.el,te.anchor)},C=({el:te,anchor:se},ve,$e)=>{let Se;for(;te&&te!==se;)Se=h(te),i(te,ve,$e),te=Se;i(se,ve,$e)},$=({el:te,anchor:se})=>{let ve;for(;te&&te!==se;)ve=h(te),s(te),te=ve;s(se)},x=(te,se,ve,$e,Se,Fe,Ye,Re,He)=>{se.type==="svg"?Ye="svg":se.type==="math"&&(Ye="mathml"),te==null?M(se,ve,$e,Se,Fe,Ye,Re,He):I(te,se,Se,Fe,Ye,Re,He)},M=(te,se,ve,$e,Se,Fe,Ye,Re)=>{let He,Me;const{props:Ne,shapeFlag:st,transition:it,dirs:ye}=te;if(He=te.el=r(te.type,Fe,Ne&&Ne.is,Ne),st&8?u(He,te.children):st&16&&T(te.children,He,null,$e,Se,F2(te,Fe),Ye,Re),ye&&la(te,null,$e,"created"),P(He,te,te.scopeId,Ye,$e),Ne){for(const Pe in Ne)Pe!=="value"&&!hc(Pe)&&o(He,Pe,null,Ne[Pe],Fe,te.children,$e,Se,we);"value"in Ne&&o(He,"value",null,Ne.value,Fe),(Me=Ne.onVnodeBeforeMount)&&Qi(Me,$e,te)}ye&&la(te,null,$e,"beforeMount");const ge=cI(Se,it);ge&&it.beforeEnter(He),i(He,se,ve),((Me=Ne&&Ne.onVnodeMounted)||ge||ye)&&Js(()=>{Me&&Qi(Me,$e,te),ge&&it.enter(He),ye&&la(te,null,$e,"mounted")},Se)},P=(te,se,ve,$e,Se)=>{if(ve&&f(te,ve),$e)for(let Fe=0;Fe<$e.length;Fe++)f(te,$e[Fe]);if(Se){let Fe=Se.subTree;if(se===Fe){const Ye=Se.vnode;P(te,Ye,Ye.scopeId,Ye.slotScopeIds,Se.parent)}}},T=(te,se,ve,$e,Se,Fe,Ye,Re,He=0)=>{for(let Me=He;Me<te.length;Me++){const Ne=te[Me]=Re?Gl(te[Me]):xo(te[Me]);m(null,Ne,se,ve,$e,Se,Fe,Ye,Re)}},I=(te,se,ve,$e,Se,Fe,Ye)=>{const Re=se.el=te.el;let{patchFlag:He,dynamicChildren:Me,dirs:Ne}=se;He|=te.patchFlag&16;const st=te.props||xn,it=se.props||xn;let ye;if(ve&&tu(ve,!1),(ye=it.onVnodeBeforeUpdate)&&Qi(ye,ve,se,te),Ne&&la(se,te,ve,"beforeUpdate"),ve&&tu(ve,!0),Me?L(te.dynamicChildren,Me,Re,ve,$e,F2(se,Se),Fe):Ye||K(te,se,Re,null,ve,$e,F2(se,Se),Fe,!1),He>0){if(He&16)R(Re,se,st,it,ve,$e,Se);else if(He&2&&st.class!==it.class&&o(Re,"class",null,it.class,Se),He&4&&o(Re,"style",st.style,it.style,Se),He&8){const ge=se.dynamicProps;for(let Pe=0;Pe<ge.length;Pe++){const Ie=ge[Pe],ht=st[Ie],Bt=it[Ie];(Bt!==ht||Ie==="value")&&o(Re,Ie,ht,Bt,Se,te.children,ve,$e,we)}}He&1&&te.children!==se.children&&u(Re,se.children)}else!Ye&&Me==null&&R(Re,se,st,it,ve,$e,Se);((ye=it.onVnodeUpdated)||Ne)&&Js(()=>{ye&&Qi(ye,ve,se,te),Ne&&la(se,te,ve,"updated")},$e)},L=(te,se,ve,$e,Se,Fe,Ye)=>{for(let Re=0;Re<se.length;Re++){const He=te[Re],Me=se[Re],Ne=He.el&&(He.type===ee||!Cr(He,Me)||He.shapeFlag&70)?d(He.el):ve;m(He,Me,Ne,null,$e,Se,Fe,Ye,!0)}},R=(te,se,ve,$e,Se,Fe,Ye)=>{if(ve!==$e){if(ve!==xn)for(const Re in ve)!hc(Re)&&!(Re in $e)&&o(te,Re,ve[Re],null,Ye,se.children,Se,Fe,we);for(const Re in $e){if(hc(Re))continue;const He=$e[Re],Me=ve[Re];He!==Me&&Re!=="value"&&o(te,Re,Me,He,Ye,se.children,Se,Fe,we)}"value"in $e&&o(te,"value",ve.value,$e.value,Ye)}},V=(te,se,ve,$e,Se,Fe,Ye,Re,He)=>{const Me=se.el=te?te.el:a(""),Ne=se.anchor=te?te.anchor:a("");let{patchFlag:st,dynamicChildren:it,slotScopeIds:ye}=se;ye&&(Re=Re?Re.concat(ye):ye),te==null?(i(Me,ve,$e),i(Ne,ve,$e),T(se.children||[],ve,Ne,Se,Fe,Ye,Re,He)):st>0&&st&64&&it&&te.dynamicChildren?(L(te.dynamicChildren,it,ve,Se,Fe,Ye,Re),(se.key!=null||Se&&se===Se.subTree)&&fx(te,se,!0)):K(te,se,ve,Ne,Se,Fe,Ye,Re,He)},H=(te,se,ve,$e,Se,Fe,Ye,Re,He)=>{se.slotScopeIds=Re,te==null?se.shapeFlag&512?Se.ctx.activate(se,ve,$e,Ye,He):F(se,ve,$e,Se,Fe,Ye,He):z(te,se,He)},F=(te,se,ve,$e,Se,Fe,Ye)=>{const Re=te.component=mI(te,$e,Se);if(r1(te)&&(Re.ctx.renderer=re),vI(Re),Re.asyncDep){if(Se&&Se.registerDep(Re,N),!te.el){const He=Re.subTree=_(ks);b(null,He,se,ve)}}else N(Re,te,se,ve,Se,Fe,Ye)},z=(te,se,ve)=>{const $e=se.component=te.component;if(cY(te,se,ve))if($e.asyncDep&&!$e.asyncResolved){q($e,se,ve);return}else $e.next=se,nY($e.update),$e.effect.dirty=!0,$e.update();else se.el=te.el,$e.vnode=se},N=(te,se,ve,$e,Se,Fe,Ye)=>{const Re=()=>{if(te.isMounted){let{next:Ne,bu:st,u:it,parent:ye,vnode:ge}=te;{const Qe=uI(te);if(Qe){Ne&&(Ne.el=ge.el,q(te,Ne,Ye)),Qe.asyncDep.then(()=>{te.isUnmounted||Re()});return}}let Pe=Ne,Ie;tu(te,!1),Ne?(Ne.el=ge.el,q(te,Ne,Ye)):Ne=ge,st&&Nh(st),(Ie=Ne.props&&Ne.props.onVnodeBeforeUpdate)&&Qi(Ie,ye,Ne,ge),tu(te,!0);const ht=l0(te),Bt=te.subTree;te.subTree=ht,m(Bt,ht,d(Bt.el),oe(Bt),te,Se,Fe),Ne.el=ht.el,Pe===null&&nx(te,ht.el),it&&Js(it,Se),(Ie=Ne.props&&Ne.props.onVnodeUpdated)&&Js(()=>Qi(Ie,ye,Ne,ge),Se)}else{let Ne;const{el:st,props:it}=se,{bm:ye,m:ge,parent:Pe}=te,Ie=zu(se);if(tu(te,!1),ye&&Nh(ye),!Ie&&(Ne=it&&it.onVnodeBeforeMount)&&Qi(Ne,Pe,se),tu(te,!0),st&&je){const ht=()=>{te.subTree=l0(te),je(st,te.subTree,te,Se,null)};Ie?se.type.__asyncLoader().then(()=>!te.isUnmounted&&ht()):ht()}else{const ht=te.subTree=l0(te);m(null,ht,ve,$e,te,Se,Fe),se.el=ht.el}if(ge&&Js(ge,Se),!Ie&&(Ne=it&&it.onVnodeMounted)){const ht=se;Js(()=>Qi(Ne,Pe,ht),Se)}(se.shapeFlag&256||Pe&&zu(Pe.vnode)&&Pe.vnode.shapeFlag&256)&&te.a&&Js(te.a,Se),te.isMounted=!0,se=ve=$e=null}},He=te.effect=new uf(Re,Tt,()=>Zy(Me),te.scope),Me=te.update=()=>{He.dirty&&He.run()};Me.id=te.uid,tu(te,!0),Me()},q=(te,se,ve)=>{se.component=te;const $e=te.vnode.props;te.vnode=se,te.next=null,jY(te,se.props,$e,ve),qY(te,se.children,ve),Rc(),GS(te),Vc()},K=(te,se,ve,$e,Se,Fe,Ye,Re,He=!1)=>{const Me=te&&te.children,Ne=te?te.shapeFlag:0,st=se.children,{patchFlag:it,shapeFlag:ye}=se;if(it>0){if(it&128){U(Me,st,ve,$e,Se,Fe,Ye,Re,He);return}else if(it&256){X(Me,st,ve,$e,Se,Fe,Ye,Re,He);return}}ye&8?(Ne&16&&we(Me,Se,Fe),st!==Me&&u(ve,st)):Ne&16?ye&16?U(Me,st,ve,$e,Se,Fe,Ye,Re,He):we(Me,Se,Fe,!0):(Ne&8&&u(ve,""),ye&16&&T(st,ve,$e,Se,Fe,Ye,Re,He))},X=(te,se,ve,$e,Se,Fe,Ye,Re,He)=>{te=te||Vh,se=se||Vh;const Me=te.length,Ne=se.length,st=Math.min(Me,Ne);let it;for(it=0;it<st;it++){const ye=se[it]=He?Gl(se[it]):xo(se[it]);m(te[it],ye,ve,null,Se,Fe,Ye,Re,He)}Me>Ne?we(te,Se,Fe,!0,!1,st):T(se,ve,$e,Se,Fe,Ye,Re,He,st)},U=(te,se,ve,$e,Se,Fe,Ye,Re,He)=>{let Me=0;const Ne=se.length;let st=te.length-1,it=Ne-1;for(;Me<=st&&Me<=it;){const ye=te[Me],ge=se[Me]=He?Gl(se[Me]):xo(se[Me]);if(Cr(ye,ge))m(ye,ge,ve,null,Se,Fe,Ye,Re,He);else break;Me++}for(;Me<=st&&Me<=it;){const ye=te[st],ge=se[it]=He?Gl(se[it]):xo(se[it]);if(Cr(ye,ge))m(ye,ge,ve,null,Se,Fe,Ye,Re,He);else break;st--,it--}if(Me>st){if(Me<=it){const ye=it+1,ge=ye<Ne?se[ye].el:$e;for(;Me<=it;)m(null,se[Me]=He?Gl(se[Me]):xo(se[Me]),ve,ge,Se,Fe,Ye,Re,He),Me++}}else if(Me>it)for(;Me<=st;)ne(te[Me],Se,Fe,!0),Me++;else{const ye=Me,ge=Me,Pe=new Map;for(Me=ge;Me<=it;Me++){const Le=se[Me]=He?Gl(se[Me]):xo(se[Me]);Le.key!=null&&Pe.set(Le.key,Me)}let Ie,ht=0;const Bt=it-ge+1;let Qe=!1,kt=0;const pt=new Array(Bt);for(Me=0;Me<Bt;Me++)pt[Me]=0;for(Me=ye;Me<=st;Me++){const Le=te[Me];if(ht>=Bt){ne(Le,Se,Fe,!0);continue}let ue;if(Le.key!=null)ue=Pe.get(Le.key);else for(Ie=ge;Ie<=it;Ie++)if(pt[Ie-ge]===0&&Cr(Le,se[Ie])){ue=Ie;break}ue===void 0?ne(Le,Se,Fe,!0):(pt[ue-ge]=Me+1,ue>=kt?kt=ue:Qe=!0,m(Le,se[ue],ve,null,Se,Fe,Ye,Re,He),ht++)}const _e=Qe?ZY(pt):Vh;for(Ie=_e.length-1,Me=Bt-1;Me>=0;Me--){const Le=ge+Me,ue=se[Le],Oe=Le+1<Ne?se[Le+1].el:$e;pt[Me]===0?m(null,ue,ve,Oe,Se,Fe,Ye,Re,He):Qe&&(Ie<0||Me!==_e[Ie]?Q(ue,ve,Oe,2):Ie--)}}},Q=(te,se,ve,$e,Se=null)=>{const{el:Fe,type:Ye,transition:Re,children:He,shapeFlag:Me}=te;if(Me&6){Q(te.component.subTree,se,ve,$e);return}if(Me&128){te.suspense.move(se,ve,$e);return}if(Me&64){Ye.move(te,se,ve,re);return}if(Ye===ee){i(Fe,se,ve);for(let st=0;st<He.length;st++)Q(He[st],se,ve,$e);i(te.anchor,se,ve);return}if(Ye===Hu){C(te,se,ve);return}if($e!==2&&Me&1&&Re)if($e===0)Re.beforeEnter(Fe),i(Fe,se,ve),Js(()=>Re.enter(Fe),Se);else{const{leave:st,delayLeave:it,afterLeave:ye}=Re,ge=()=>i(Fe,se,ve),Pe=()=>{st(Fe,()=>{ge(),ye&&ye()})};it?it(Fe,ge,Pe):Pe()}else i(Fe,se,ve)},ne=(te,se,ve,$e=!1,Se=!1)=>{const{type:Fe,props:Ye,ref:Re,children:He,dynamicChildren:Me,shapeFlag:Ne,patchFlag:st,dirs:it}=te;if(Re!=null&&I_(Re,null,ve,te,!0),Ne&256){se.ctx.deactivate(te);return}const ye=Ne&1&&it,ge=!zu(te);let Pe;if(ge&&(Pe=Ye&&Ye.onVnodeBeforeUnmount)&&Qi(Pe,se,te),Ne&6)me(te.component,ve,$e);else{if(Ne&128){te.suspense.unmount(ve,$e);return}ye&&la(te,null,se,"beforeUnmount"),Ne&64?te.type.remove(te,se,ve,Se,re,$e):Me&&(Fe!==ee||st>0&&st&64)?we(Me,se,ve,!1,!0):(Fe===ee&&st&384||!Se&&Ne&16)&&we(He,se,ve),$e&&Z(te)}(ge&&(Pe=Ye&&Ye.onVnodeUnmounted)||ye)&&Js(()=>{Pe&&Qi(Pe,se,te),ye&&la(te,null,se,"unmounted")},ve)},Z=te=>{const{type:se,el:ve,anchor:$e,transition:Se}=te;if(se===ee){ae(ve,$e);return}if(se===Hu){$(te);return}const Fe=()=>{s(ve),Se&&!Se.persisted&&Se.afterLeave&&Se.afterLeave()};if(te.shapeFlag&1&&Se&&!Se.persisted){const{leave:Ye,delayLeave:Re}=Se,He=()=>Ye(ve,Fe);Re?Re(te.el,Fe,He):He()}else Fe()},ae=(te,se)=>{let ve;for(;te!==se;)ve=h(te),s(te),te=ve;s(se)},me=(te,se,ve)=>{const{bum:$e,scope:Se,update:Fe,subTree:Ye,um:Re}=te;$e&&Nh($e),Se.stop(),Fe&&(Fe.active=!1,ne(Ye,te,se,ve)),Re&&Js(Re,se),Js(()=>{te.isUnmounted=!0},se),se&&se.pendingBranch&&!se.isUnmounted&&te.asyncDep&&!te.asyncResolved&&te.suspenseId===se.pendingId&&(se.deps--,se.deps===0&&se.resolve())},we=(te,se,ve,$e=!1,Se=!1,Fe=0)=>{for(let Ye=Fe;Ye<te.length;Ye++)ne(te[Ye],se,ve,$e,Se)},oe=te=>te.shapeFlag&6?oe(te.component.subTree):te.shapeFlag&128?te.suspense.next():h(te.anchor||te.el);let fe=!1;const ie=(te,se,ve)=>{te==null?se._vnode&&ne(se._vnode,null,null,!0):m(se._vnode||null,te,se,null,null,null,ve),fe||(fe=!0,GS(),T_(),fe=!1),se._vnode=te},re={p:m,um:ne,m:Q,r:Z,mt:F,mc:T,pc:K,pbc:L,n:oe,o:t};let ke,je;return e&&([ke,je]=e(re)),{render:ie,hydrate:ke,createApp:HY(ie,ke)}}function F2({type:t,props:e},n){return n==="svg"&&t==="foreignObject"||n==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:n}function tu({effect:t,update:e},n){t.allowRecurse=e.allowRecurse=n}function cI(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function fx(t,e,n=!1){const i=t.children,s=e.children;if(Ee(i)&&Ee(s))for(let o=0;o<i.length;o++){const r=i[o];let a=s[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=s[o]=Gl(s[o]),a.el=r.el),n||fx(r,a)),a.type===il&&(a.el=r.el)}}function ZY(t){const e=t.slice(),n=[0];let i,s,o,r,a;const l=t.length;for(i=0;i<l;i++){const c=t[i];if(c!==0){if(s=n[n.length-1],t[s]<c){e[i]=s,n.push(i);continue}for(o=0,r=n.length-1;o<r;)a=o+r>>1,t[n[a]]<c?o=a+1:r=a;c<t[n[o]]&&(o>0&&(e[i]=n[o-1]),n[o]=i)}}for(o=n.length,r=n[o-1];o-- >0;)n[o]=r,r=e[r];return n}function uI(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:uI(e)}const JY=t=>t.__isTeleport,Mm=t=>t&&(t.disabled||t.disabled===""),r9=t=>typeof SVGElement<"u"&&t instanceof SVGElement,a9=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,G3=(t,e)=>{const n=t&&t.to;return Ke(n)?e?e(n):null:n},QY={name:"Teleport",__isTeleport:!0,process(t,e,n,i,s,o,r,a,l,c){const{mc:u,pc:d,pbc:h,o:{insert:f,querySelector:p,createText:m,createComment:y}}=c,b=Mm(e.props);let{shapeFlag:k,children:C,dynamicChildren:$}=e;if(t==null){const x=e.el=m(""),M=e.anchor=m("");f(x,n,i),f(M,n,i);const P=e.target=G3(e.props,p),T=e.targetAnchor=m("");P&&(f(T,P),r==="svg"||r9(P)?r="svg":(r==="mathml"||a9(P))&&(r="mathml"));const I=(L,R)=>{k&16&&u(C,L,R,s,o,r,a,l)};b?I(n,M):P&&I(P,T)}else{e.el=t.el;const x=e.anchor=t.anchor,M=e.target=t.target,P=e.targetAnchor=t.targetAnchor,T=Mm(t.props),I=T?n:M,L=T?x:P;if(r==="svg"||r9(M)?r="svg":(r==="mathml"||a9(M))&&(r="mathml"),$?(h(t.dynamicChildren,$,I,s,o,r,a),fx(t,e,!0)):l||d(t,e,I,L,s,o,r,a,!1),b)T?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):wv(e,n,x,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const R=e.target=G3(e.props,p);R&&wv(e,R,null,c,0)}else T&&wv(e,M,P,c,1)}dI(e)},remove(t,e,n,i,{um:s,o:{remove:o}},r){const{shapeFlag:a,children:l,anchor:c,targetAnchor:u,target:d,props:h}=t;if(d&&o(u),r&&o(c),a&16){const f=r||!Mm(h);for(let p=0;p<l.length;p++){const m=l[p];s(m,e,n,f,!!m.dynamicChildren)}}},move:wv,hydrate:eq};function wv(t,e,n,{o:{insert:i},m:s},o=2){o===0&&i(t.targetAnchor,e,n);const{el:r,anchor:a,shapeFlag:l,children:c,props:u}=t,d=o===2;if(d&&i(r,e,n),(!d||Mm(u))&&l&16)for(let h=0;h<c.length;h++)s(c[h],e,n,2);d&&i(a,e,n)}function eq(t,e,n,i,s,o,{o:{nextSibling:r,parentNode:a,querySelector:l}},c){const u=e.target=G3(e.props,l);if(u){const d=u._lpa||u.firstChild;if(e.shapeFlag&16)if(Mm(e.props))e.anchor=c(r(t),e,a(t),n,i,s,o),e.targetAnchor=d;else{e.anchor=r(t);let h=d;for(;h;)if(h=r(h),h&&h.nodeType===8&&h.data==="teleport anchor"){e.targetAnchor=h,u._lpa=e.targetAnchor&&r(e.targetAnchor);break}c(d,e,u,n,i,s,o)}dI(e)}return e.anchor&&r(e.anchor)}const Sa=QY;function dI(t){const e=t.ctx;if(e&&e.ut){let n=t.children[0].el;for(;n&&n!==t.targetAnchor;)n.nodeType===1&&n.setAttribute("data-v-owner",e.uid),n=n.nextSibling;e.ut()}}const ee=Symbol.for("v-fgt"),il=Symbol.for("v-txt"),ks=Symbol.for("v-cmt"),Hu=Symbol.for("v-stc"),Tm=[];let no=null;function v(t=!1){Tm.push(no=t?null:[])}function hI(){Tm.pop(),no=Tm[Tm.length-1]||null}let id=1;function X3(t){id+=t}function fI(t){return t.dynamicChildren=id>0?no||Vh:null,hI(),id>0&&no&&no.push(t),t}function A(t,e,n,i,s,o){return fI(g(t,e,n,i,s,o,!0))}function D(t,e,n,i,s){return fI(_(t,e,n,i,s,!0))}function ls(t){return t?t.__v_isVNode===!0:!1}function Cr(t,e){return t.type===e.type&&t.key===e.key}function tq(t){}const pI=({key:t})=>t??null,c0=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Ke(t)||gn(t)||et(t)?{i:Ms,r:t,k:e,f:!!n}:t:null);function g(t,e=null,n=null,i=0,s=null,o=t===ee?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&pI(e),ref:e&&c0(e),scopeId:Qy,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:Ms};return a?(px(l,n),o&128&&t.normalize(l)):n&&(l.shapeFlag|=Ke(n)?8:16),id>0&&!r&&no&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&no.push(l),l}const _=nq;function nq(t,e=null,n=null,i=0,s=null,o=!1){if((!t||t===IP)&&(t=ks),ls(t)){const a=ur(t,e,!0);return n&&px(a,n),id>0&&!o&&no&&(a.shapeFlag&6?no[no.indexOf(t)]=a:no.push(a)),a.patchFlag|=-2,a}if(lq(t)&&(t=t.__vccOpts),e){e=Wh(e);let{class:a,style:l}=e;a&&!Ke(a)&&(e.class=G(a)),yt(l)&&(ZC(l)&&!Ee(l)&&(l=yn({},l)),e.style=Xe(l))}const r=Ke(t)?1:LP(t)?128:JY(t)?64:yt(t)?4:et(t)?2:0;return g(t,e,n,i,s,r,o,!0)}function Wh(t){return t?ZC(t)||eI(t)?yn({},t):t:null}function ur(t,e,n=!1){const{props:i,ref:s,patchFlag:o,children:r}=t,a=e?Zt(i||{},e):i;return{__v_isVNode:!0,__v_skip:!0,type:t.type,props:a,key:a&&pI(a),ref:e&&e.ref?n&&s?Ee(s)?s.concat(c0(e)):[s,c0(e)]:c0(e):s,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:r,target:t.target,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==ee?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:t.transition,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&ur(t.ssContent),ssFallback:t.ssFallback&&ur(t.ssFallback),el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce}}function B(t=" ",e=0){return _(il,null,t,e)}function $a(t,e){const n=_(Hu,null,t);return n.staticCount=e,n}function O(t="",e=!1){return e?(v(),D(ks,null,t)):_(ks,null,t)}function xo(t){return t==null||typeof t=="boolean"?_(ks):Ee(t)?_(ee,null,t.slice()):typeof t=="object"?Gl(t):_(il,null,String(t))}function Gl(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:ur(t)}function px(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(Ee(e))n=16;else if(typeof e=="object")if(i&65){const s=e.default;s&&(s._c&&(s._d=!1),px(t,s()),s._c&&(s._d=!0));return}else{n=32;const s=e._;!s&&!eI(e)?e._ctx=Ms:s===3&&Ms&&(Ms.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else et(e)?(e={default:e,_ctx:Ms},n=32):(e=String(e),i&64?(n=16,e=[B(e)]):n=8);t.children=e,t.shapeFlag|=n}function Zt(...t){const e={};for(let n=0;n<t.length;n++){const i=t[n];for(const s in i)if(s==="class")e.class!==i.class&&(e.class=G([e.class,i.class]));else if(s==="style")e.style=Xe([e.style,i.style]);else if(wd(s)){const o=e[s],r=i[s];r&&o!==r&&!(Ee(o)&&o.includes(r))&&(e[s]=o?[].concat(o,r):r)}else s!==""&&(e[s]=i[s])}return e}function Qi(t,e,n,i=null){To(t,e,7,[n,i])}const sq=ZP();let iq=0;function mI(t,e,n){const i=t.type,s=(e?e.appContext:t.appContext)||sq,o={uid:iq++,vnode:t,type:i,parent:e,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,scope:new YC(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(s.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:nI(i,s),emitsOptions:MP(i,s),emit:null,emitted:null,propsDefaults:xn,inheritAttrs:i.inheritAttrs,ctx:xn,data:xn,props:xn,attrs:xn,slots:xn,refs:xn,setupState:xn,setupContext:null,attrsProxy:null,slotsProxy:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=e?e.root:o,o.emit=iY.bind(null,o),t.ce&&t.ce(o),o}let Vs=null;const bt=()=>Vs||Ms;let L_,K3;{const t=sP(),e=(n,i)=>{let s;return(s=t[n])||(s=t[n]=[]),s.push(i),o=>{s.length>1?s.forEach(r=>r(o)):s[0](o)}};L_=e("__VUE_INSTANCE_SETTERS__",n=>Vs=n),K3=e("__VUE_SSR_SETTERS__",n=>a1=n)}const od=t=>{const e=Vs;return L_(t),t.scope.on(),()=>{t.scope.off(),L_(e)}},Z3=()=>{Vs&&Vs.scope.off(),L_(null)};function gI(t){return t.vnode.shapeFlag&4}let a1=!1;function vI(t,e=!1){e&&K3(e);const{props:n,children:i}=t.vnode,s=gI(t);UY(t,n,s,e),YY(t,i);const o=s?oq(t,e):void 0;return e&&K3(!1),o}function oq(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,U3);const{setup:i}=n;if(i){const s=t.setupContext=i.length>1?bI(t):null,o=od(t);Rc();const r=Ja(i,t,0,[t.props,s]);if(Vc(),o(),nd(r)){if(r.then(Z3,Z3),e)return r.then(a=>{J3(t,a,e)}).catch(a=>{xd(a,t,0)});t.asyncDep=r}else J3(t,r,e)}else yI(t,e)}function J3(t,e,n){et(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:yt(e)&&(t.setupState=ex(e)),yI(t,n)}let O_,Q3;function _I(t){O_=t,Q3=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,xY))}}const rq=()=>!O_;function yI(t,e,n){const i=t.type;if(!t.render){if(!e&&O_&&!i.render){const s=i.template||dx(t).template;if(s){const{isCustomElement:o,compilerOptions:r}=t.appContext.config,{delimiters:a,compilerOptions:l}=i,c=yn(yn({isCustomElement:o,delimiters:a},r),l);i.render=O_(s,c)}}t.render=i.render||Tt,Q3&&Q3(t)}{const s=od(t);Rc();try{RY(t)}finally{Vc(),s()}}}const aq={get(t,e){return lo(t,"get",""),t[e]}};function bI(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,aq),slots:t.slots,emit:t.emit,expose:e}}function nb(t){if(t.exposed)return t.exposeProxy||(t.exposeProxy=new Proxy(ex(Si(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in Em)return Em[n](t)},has(e,n){return n in e||n in Em}}))}function ek(t,e=!0){return et(t)?t.displayName||t.name:t.name||e&&t.__name}function lq(t){return et(t)&&"__vccOpts"in t}const Y=(t,e)=>UW(t,e,a1);function cq(t,e,n=xn){const i=bt(),s=es(e),o=eo(e),r=CP((l,c)=>{let u;return FP(()=>{const d=t[e];Rr(u,d)&&(u=d,c())}),{get(){return l(),n.get?n.get(u):u},set(d){const h=i.vnode.props;!(h&&(e in h||s in h||o in h)&&(`onUpdate:${e}`in h||`onUpdate:${s}`in h||`onUpdate:${o}`in h))&&Rr(d,u)&&(u=d,c()),i.emit(`update:${e}`,n.set?n.set(d):d)}}}),a=e==="modelValue"?"modelModifiers":`${e}Modifiers`;return r[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?t[a]||{}:r,done:!1}:{done:!0}}}},r}function vt(t,e,n){const i=arguments.length;return i===2?yt(e)&&!Ee(e)?ls(e)?_(t,null,[e]):_(t,e):_(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&ls(n)&&(n=[n]),_(t,e,n))}function uq(){}function dq(t,e,n,i){const s=n[i];if(s&&wI(s,t))return s;const o=e();return o.memo=t.slice(),n[i]=o}function wI(t,e){const n=t.memo;if(n.length!=e.length)return!1;for(let i=0;i<n.length;i++)if(Rr(n[i],e[i]))return!1;return id>0&&no&&no.push(t),!0}const kI="3.4.23",CI=Tt,hq=QW,fq=fh,pq=EP,mq={createComponentInstance:mI,setupComponent:vI,renderComponentRoot:l0,setCurrentRenderingInstance:hg,isVNode:ls,normalizeVNode:xo},gq=mq,vq=null,_q=null,yq=null;/**
* @vue/runtime-dom v3.4.23
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const bq="http://www.w3.org/2000/svg",wq="http://www.w3.org/1998/Math/MathML",Xl=typeof document<"u"?document:null,l9=Xl&&Xl.createElement("template"),kq={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,i)=>{const s=e==="svg"?Xl.createElementNS(bq,t):e==="mathml"?Xl.createElementNS(wq,t):Xl.createElement(t,n?{is:n}:void 0);return t==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:t=>Xl.createTextNode(t),createComment:t=>Xl.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Xl.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,i,s,o){const r=n?n.previousSibling:e.lastChild;if(s&&(s===o||s.nextSibling))for(;e.insertBefore(s.cloneNode(!0),n),!(s===o||!(s=s.nextSibling)););else{l9.innerHTML=i==="svg"?`<svg>${t}</svg>`:i==="mathml"?`<math>${t}</math>`:t;const a=l9.content;if(i==="svg"||i==="mathml"){const l=a.firstChild;for(;l.firstChild;)a.appendChild(l.firstChild);a.removeChild(l)}e.insertBefore(a,n)}return[r?r.nextSibling:e.firstChild,n?n.previousSibling:e.lastChild]}},Sl="transition",Tp="animation",ff=Symbol("_vtc"),ji=(t,{slots:e})=>vt(BP,SI(t),e);ji.displayName="Transition";const xI={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},Cq=ji.props=yn({},ax,xI),nu=(t,e=[])=>{Ee(t)?t.forEach(n=>n(...e)):t&&t(...e)},c9=t=>t?Ee(t)?t.some(e=>e.length>1):t.length>1:!1;function SI(t){const e={};for(const V in t)V in xI||(e[V]=t[V]);if(t.css===!1)return e;const{name:n="v",type:i,duration:s,enterFromClass:o=`${n}-enter-from`,enterActiveClass:r=`${n}-enter-active`,enterToClass:a=`${n}-enter-to`,appearFromClass:l=o,appearActiveClass:c=r,appearToClass:u=a,leaveFromClass:d=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=t,p=xq(s),m=p&&p[0],y=p&&p[1],{onBeforeEnter:b,onEnter:k,onEnterCancelled:C,onLeave:$,onLeaveCancelled:x,onBeforeAppear:M=b,onAppear:P=k,onAppearCancelled:T=C}=e,I=(V,H,F)=>{Pl(V,H?u:a),Pl(V,H?c:r),F&&F()},L=(V,H)=>{V._isLeaving=!1,Pl(V,d),Pl(V,f),Pl(V,h),H&&H()},R=V=>(H,F)=>{const z=V?P:k,N=()=>I(H,V,F);nu(z,[H,N]),u9(()=>{Pl(H,V?l:o),Va(H,V?u:a),c9(z)||d9(H,i,m,N)})};return yn(e,{onBeforeEnter(V){nu(b,[V]),Va(V,o),Va(V,r)},onBeforeAppear(V){nu(M,[V]),Va(V,l),Va(V,c)},onEnter:R(!1),onAppear:R(!0),onLeave(V,H){V._isLeaving=!0;const F=()=>L(V,H);Va(V,d),AI(),Va(V,h),u9(()=>{V._isLeaving&&(Pl(V,d),Va(V,f),c9($)||d9(V,i,y,F))}),nu($,[V,F])},onEnterCancelled(V){I(V,!1),nu(C,[V])},onAppearCancelled(V){I(V,!0),nu(T,[V])},onLeaveCancelled(V){L(V),nu(x,[V])}})}function xq(t){if(t==null)return null;if(yt(t))return[N2(t.enter),N2(t.leave)];{const e=N2(t);return[e,e]}}function N2(t){return A_(t)}function Va(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[ff]||(t[ff]=new Set)).add(e)}function Pl(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[ff];n&&(n.delete(e),n.size||(t[ff]=void 0))}function u9(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let Sq=0;function d9(t,e,n,i){const s=t._endId=++Sq,o=()=>{s===t._endId&&i()};if(n)return setTimeout(o,n);const{type:r,timeout:a,propCount:l}=$I(t,e);if(!r)return i();const c=r+"end";let u=0;const d=()=>{t.removeEventListener(c,h),o()},h=f=>{f.target===t&&++u>=l&&d()};setTimeout(()=>{u<l&&d()},a+1),t.addEventListener(c,h)}function $I(t,e){const n=window.getComputedStyle(t),i=p=>(n[p]||"").split(", "),s=i(`${Sl}Delay`),o=i(`${Sl}Duration`),r=h9(s,o),a=i(`${Tp}Delay`),l=i(`${Tp}Duration`),c=h9(a,l);let u=null,d=0,h=0;e===Sl?r>0&&(u=Sl,d=r,h=o.length):e===Tp?c>0&&(u=Tp,d=c,h=l.length):(d=Math.max(r,c),u=d>0?r>c?Sl:Tp:null,h=u?u===Sl?o.length:l.length:0);const f=u===Sl&&/\b(transform|all)(,|$)/.test(i(`${Sl}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:f}}function h9(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((n,i)=>f9(n)+f9(t[i])))}function f9(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function AI(){return document.body.offsetHeight}function $q(t,e,n){const i=t[ff];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const D_=Symbol("_vod"),EI=Symbol("_vsh"),Ut={beforeMount(t,{value:e},{transition:n}){t[D_]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):Pp(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:i}){!e!=!n&&(i?e?(i.beforeEnter(t),Pp(t,!0),i.enter(t)):i.leave(t,()=>{Pp(t,!1)}):Pp(t,e))},beforeUnmount(t,{value:e}){Pp(t,e)}};function Pp(t,e){t.style.display=e?t[D_]:"none",t[EI]=!e}function Aq(){Ut.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const MI=Symbol("");function Eq(t){const e=bt();if(!e)return;const n=e.ut=(s=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(o=>nk(o,s))},i=()=>{const s=t(e.proxy);tk(e.subTree,s),n(s)};Ft(()=>{VP(i);const s=new MutationObserver(i);s.observe(e.subTree.el.parentNode,{childList:!0}),dl(()=>s.disconnect())})}function tk(t,e){if(t.shapeFlag&128){const n=t.suspense;t=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{tk(n.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)nk(t.el,e);else if(t.type===ee)t.children.forEach(n=>tk(n,e));else if(t.type===Hu){let{el:n,anchor:i}=t;for(;n&&(nk(n,e),n!==i);)n=n.nextSibling}}function nk(t,e){if(t.nodeType===1){const n=t.style;let i="";for(const s in e)n.setProperty(`--${s}`,e[s]),i+=`--${s}: ${e[s]};`;n[MI]=i}}const Mq=/(^|;)\s*display\s*:/;function Tq(t,e,n){const i=t.style,s=Ke(n);let o=!1;if(n&&!s){if(e)if(Ke(e))for(const r of e.split(";")){const a=r.slice(0,r.indexOf(":")).trim();n[a]==null&&u0(i,a,"")}else for(const r in e)n[r]==null&&u0(i,r,"");for(const r in n)r==="display"&&(o=!0),u0(i,r,n[r])}else if(s){if(e!==n){const r=i[MI];r&&(n+=";"+r),i.cssText=n,o=Mq.test(n)}}else e&&t.removeAttribute("style");D_ in t&&(t[D_]=o?i.display:"",t[EI]&&(i.display="none"))}const p9=/\s*!important$/;function u0(t,e,n){if(Ee(n))n.forEach(i=>u0(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=Pq(t,e);p9.test(n)?t.setProperty(eo(i),n.replace(p9,""),"important"):t[i]=n}}const m9=["Webkit","Moz","ms"],B2={};function Pq(t,e){const n=B2[e];if(n)return n;let i=es(e);if(i!=="filter"&&i in t)return B2[e]=i;i=Dc(i);for(let s=0;s<m9.length;s++){const o=m9[s]+i;if(o in t)return B2[e]=o}return e}const g9="http://www.w3.org/1999/xlink";function Iq(t,e,n,i,s){if(i&&e.startsWith("xlink:"))n==null?t.removeAttributeNS(g9,e.slice(6,e.length)):t.setAttributeNS(g9,e,n);else{const o=_W(e);n==null||o&&!oP(n)?t.removeAttribute(e):t.setAttribute(e,o?"":n)}}function Lq(t,e,n,i,s,o,r){if(e==="innerHTML"||e==="textContent"){i&&r(i,s,o),t[e]=n??"";return}const a=t.tagName;if(e==="value"&&a!=="PROGRESS"&&!a.includes("-")){const c=a==="OPTION"?t.getAttribute("value")||"":t.value,u=n??"";(c!==u||!("_value"in t))&&(t.value=u),n==null&&t.removeAttribute(e),t._value=n;return}let l=!1;if(n===""||n==null){const c=typeof t[e];c==="boolean"?n=oP(n):n==null&&c==="string"?(n="",l=!0):c==="number"&&(n=0,l=!0)}try{t[e]=n}catch{}l&&t.removeAttribute(e)}function ja(t,e,n,i){t.addEventListener(e,n,i)}function Oq(t,e,n,i){t.removeEventListener(e,n,i)}const v9=Symbol("_vei");function Dq(t,e,n,i,s=null){const o=t[v9]||(t[v9]={}),r=o[e];if(i&&r)r.value=i;else{const[a,l]=Rq(e);if(i){const c=o[e]=Nq(i,s);ja(t,a,c,l)}else r&&(Oq(t,a,r,l),o[e]=void 0)}}const _9=/(?:Once|Passive|Capture)$/;function Rq(t){let e;if(_9.test(t)){e={};let i;for(;i=t.match(_9);)t=t.slice(0,t.length-i[0].length),e[i[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):eo(t.slice(2)),e]}let z2=0;const Vq=Promise.resolve(),Fq=()=>z2||(Vq.then(()=>z2=0),z2=Date.now());function Nq(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;To(Bq(i,n.value),e,5,[i])};return n.value=t,n.attached=Fq(),n}function Bq(t,e){if(Ee(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(i=>s=>!s._stopped&&i&&i(s))}else return e}const y9=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,zq=(t,e,n,i,s,o,r,a,l)=>{const c=s==="svg";e==="class"?$q(t,i,c):e==="style"?Tq(t,n,i):wd(e)?UC(e)||Dq(t,e,n,i,r):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Hq(t,e,i,c))?Lq(t,e,i,o,r,a,l):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),Iq(t,e,i,c))};function Hq(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&y9(e)&&et(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const s=t.tagName;if(s==="IMG"||s==="VIDEO"||s==="CANVAS"||s==="SOURCE")return!1}return y9(e)&&Ke(n)?!1:e in t}/*! #__NO_SIDE_EFFECTS__ */function TI(t,e){const n=ce(t);class i extends sb{constructor(o){super(n,o,e)}}return i.def=n,i}/*! #__NO_SIDE_EFFECTS__ */const Uq=t=>TI(t,zI),jq=typeof HTMLElement<"u"?HTMLElement:class{};class sb extends jq{constructor(e,n={},i){super(),this._def=e,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this._ob=null,this.shadowRoot&&i?i(this._createVNode(),this.shadowRoot):(this.attachShadow({mode:"open"}),this._def.__asyncLoader||this._resolveProps(this._def))}connectedCallback(){this._connected=!0,this._instance||(this._resolved?this._update():this._resolveDef())}disconnectedCallback(){this._connected=!1,this._ob&&(this._ob.disconnect(),this._ob=null),ot(()=>{this._connected||(ol(null,this.shadowRoot),this._instance=null)})}_resolveDef(){this._resolved=!0;for(let i=0;i<this.attributes.length;i++)this._setAttr(this.attributes[i].name);this._ob=new MutationObserver(i=>{for(const s of i)this._setAttr(s.attributeName)}),this._ob.observe(this,{attributes:!0});const e=(i,s=!1)=>{const{props:o,styles:r}=i;let a;if(o&&!Ee(o))for(const l in o){const c=o[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=A_(this._props[l])),(a||(a=Object.create(null)))[es(l)]=!0)}this._numberProps=a,s&&this._resolveProps(i),this._applyStyles(r),this._update()},n=this._def.__asyncLoader;n?n().then(i=>e(i,!0)):e(this._def)}_resolveProps(e){const{props:n}=e,i=Ee(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&i.includes(s)&&this._setProp(s,this[s],!0,!1);for(const s of i.map(es))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(o){this._setProp(s,o)}})}_setAttr(e){let n=this.hasAttribute(e)?this.getAttribute(e):void 0;const i=es(e);this._numberProps&&this._numberProps[i]&&(n=A_(n)),this._setProp(i,n,!1)}_getProp(e){return this._props[e]}_setProp(e,n,i=!0,s=!0){n!==this._props[e]&&(this._props[e]=n,s&&this._instance&&this._update(),i&&(n===!0?this.setAttribute(eo(e),""):typeof n=="string"||typeof n=="number"?this.setAttribute(eo(e),n+""):n||this.removeAttribute(eo(e))))}_update(){ol(this._createVNode(),this.shadowRoot)}_createVNode(){const e=_(this._def,yn({},this._props));return this._instance||(e.ce=n=>{this._instance=n,n.isCE=!0;const i=(o,r)=>{this.dispatchEvent(new CustomEvent(o,{detail:r}))};n.emit=(o,...r)=>{i(o,r),eo(o)!==o&&i(eo(o),r)};let s=this;for(;s=s&&(s.parentNode||s.host);)if(s instanceof sb){n.parent=s._instance,n.provides=s._instance.provides;break}}),e}_applyStyles(e){e&&e.forEach(n=>{const i=document.createElement("style");i.textContent=n,this.shadowRoot.appendChild(i)})}}function Wq(t="$style"){{const e=bt();if(!e)return xn;const n=e.type.__cssModules;if(!n)return xn;const i=n[t];return i||xn}}const PI=new WeakMap,II=new WeakMap,R_=Symbol("_moveCb"),b9=Symbol("_enterCb"),LI={name:"TransitionGroup",props:yn({},Cq,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=bt(),i=rx();let s,o;return ul(()=>{if(!s.length)return;const r=t.moveClass||`${t.name||"v"}-move`;if(!Kq(s[0].el,n.vnode.el,r))return;s.forEach(qq),s.forEach(Gq);const a=s.filter(Xq);AI(),a.forEach(l=>{const c=l.el,u=c.style;Va(c,r),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[R_]=h=>{h&&h.target!==c||(!h||/transform$/.test(h.propertyName))&&(c.removeEventListener("transitionend",d),c[R_]=null,Pl(c,r))};c.addEventListener("transitionend",d)})}),()=>{const r=nn(t),a=SI(r);let l=r.tag||ee;if(s=[],o)for(let c=0;c<o.length;c++){const u=o[c];u.el&&u.el instanceof Element&&(s.push(u),sd(u,hf(u,a,i,n)),PI.set(u,u.el.getBoundingClientRect()))}o=e.default?eb(e.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&sd(u,hf(u,a,i,n))}return _(l,null,o)}}},Yq=t=>delete t.mode;LI.props;const ib=LI;function qq(t){const e=t.el;e[R_]&&e[R_](),e[b9]&&e[b9]()}function Gq(t){II.set(t,t.el.getBoundingClientRect())}function Xq(t){const e=PI.get(t),n=II.get(t),i=e.left-n.left,s=e.top-n.top;if(i||s){const o=t.el.style;return o.transform=o.webkitTransform=`translate(${i}px,${s}px)`,o.transitionDuration="0s",t}}function Kq(t,e,n){const i=t.cloneNode(),s=t[ff];s&&s.forEach(a=>{a.split(/\s+/).forEach(l=>l&&i.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&i.classList.add(a)),i.style.display="none";const o=e.nodeType===1?e:e.parentNode;o.appendChild(i);const{hasTransform:r}=$I(i);return o.removeChild(i),r}const Sc=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Ee(e)?n=>Nh(e,n):e};function Zq(t){t.target.composing=!0}function w9(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const ir=Symbol("_assign"),rd={created(t,{modifiers:{lazy:e,trim:n,number:i}},s){t[ir]=Sc(s);const o=i||s.props&&s.props.type==="number";ja(t,e?"change":"input",r=>{if(r.target.composing)return;let a=t.value;n&&(a=a.trim()),o&&(a=$_(a)),t[ir](a)}),n&&ja(t,"change",()=>{t.value=t.value.trim()}),e||(ja(t,"compositionstart",Zq),ja(t,"compositionend",w9),ja(t,"change",w9))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,modifiers:{lazy:n,trim:i,number:s}},o){if(t[ir]=Sc(o),t.composing)return;const r=(s||t.type==="number")&&!/^0\d/.test(t.value)?$_(t.value):t.value,a=e??"";r!==a&&(document.activeElement===t&&t.type!=="range"&&(n||i&&t.value.trim()===a)||(t.value=a))}},l1={deep:!0,created(t,e,n){t[ir]=Sc(n),ja(t,"change",()=>{const i=t._modelValue,s=pf(t),o=t.checked,r=t[ir];if(Ee(i)){const a=jy(i,s),l=a!==-1;if(o&&!l)r(i.concat(s));else if(!o&&l){const c=[...i];c.splice(a,1),r(c)}}else if(kd(i)){const a=new Set(i);o?a.add(s):a.delete(s),r(a)}else r(DI(t,o))})},mounted:k9,beforeUpdate(t,e,n){t[ir]=Sc(n),k9(t,e,n)}};function k9(t,{value:e,oldValue:n},i){t._modelValue=e,Ee(e)?t.checked=jy(e,i.props.value)>-1:kd(e)?t.checked=e.has(i.props.value):e!==n&&(t.checked=xc(e,DI(t,!0)))}const c1={created(t,{value:e},n){t.checked=xc(e,n.props.value),t[ir]=Sc(n),ja(t,"change",()=>{t[ir](pf(t))})},beforeUpdate(t,{value:e,oldValue:n},i){t[ir]=Sc(i),e!==n&&(t.checked=xc(e,i.props.value))}},OI={deep:!0,created(t,{value:e,modifiers:{number:n}},i){const s=kd(e);ja(t,"change",()=>{const o=Array.prototype.filter.call(t.options,r=>r.selected).map(r=>n?$_(pf(r)):pf(r));t[ir](t.multiple?s?new Set(o):o:o[0]),t._assigning=!0,ot(()=>{t._assigning=!1})}),t[ir]=Sc(i)},mounted(t,{value:e,modifiers:{number:n}}){C9(t,e)},beforeUpdate(t,e,n){t[ir]=Sc(n)},updated(t,{value:e,modifiers:{number:n}}){t._assigning||C9(t,e)}};function C9(t,e,n){const i=t.multiple,s=Ee(e);if(!(i&&!s&&!kd(e))){for(let o=0,r=t.options.length;o<r;o++){const a=t.options[o],l=pf(a);if(i)if(s){const c=typeof l;c==="string"||c==="number"?a.selected=e.some(u=>String(u)===String(l)):a.selected=jy(e,l)>-1}else a.selected=e.has(l);else if(xc(pf(a),e)){t.selectedIndex!==o&&(t.selectedIndex=o);return}}!i&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function pf(t){return"_value"in t?t._value:t.value}function DI(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const RI={created(t,e,n){kv(t,e,n,null,"created")},mounted(t,e,n){kv(t,e,n,null,"mounted")},beforeUpdate(t,e,n,i){kv(t,e,n,i,"beforeUpdate")},updated(t,e,n,i){kv(t,e,n,i,"updated")}};function VI(t,e){switch(t){case"SELECT":return OI;case"TEXTAREA":return rd;default:switch(e){case"checkbox":return l1;case"radio":return c1;default:return rd}}}function kv(t,e,n,i,s){const r=VI(t.tagName,n.props&&n.props.type)[s];r&&r(t,e,n,i)}function Jq(){rd.getSSRProps=({value:t})=>({value:t}),c1.getSSRProps=({value:t},e)=>{if(e.props&&xc(e.props.value,t))return{checked:!0}},l1.getSSRProps=({value:t},e)=>{if(Ee(t)){if(e.props&&jy(t,e.props.value)>-1)return{checked:!0}}else if(kd(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},RI.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const n=VI(e.type.toUpperCase(),e.props&&e.props.type);if(n.getSSRProps)return n.getSSRProps(t,e)}}const Qq=["ctrl","shift","alt","meta"],eG={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>Qq.some(n=>t[`${n}Key`]&&!e.includes(n))},Ae=(t,e)=>{const n=t._withMods||(t._withMods={}),i=e.join(".");return n[i]||(n[i]=(s,...o)=>{for(let r=0;r<e.length;r++){const a=eG[e[r]];if(a&&a(s,e))return}return t(s,...o)})},tG={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},ut=(t,e)=>{const n=t._withKeys||(t._withKeys={}),i=e.join(".");return n[i]||(n[i]=s=>{if(!("key"in s))return;const o=eo(s.key);if(e.some(r=>r===o||tG[r]===o))return t(s)})},FI=yn({patchProp:zq},kq);let Pm,x9=!1;function NI(){return Pm||(Pm=rI(FI))}function BI(){return Pm=x9?Pm:aI(FI),x9=!0,Pm}const ol=(...t)=>{NI().render(...t)},zI=(...t)=>{BI().hydrate(...t)},mx=(...t)=>{const e=NI().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=UI(i);if(!s)return;const o=e._component;!et(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.innerHTML="";const r=n(s,!1,HI(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},e},nG=(...t)=>{const e=BI().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=UI(i);if(s)return n(s,!0,HI(s))},e};function HI(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function UI(t){return Ke(t)?document.querySelector(t):t}let S9=!1;const sG=()=>{S9||(S9=!0,Jq(),Aq())},iG=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:BP,BaseTransitionPropsValidators:ax,Comment:ks,DeprecationTypes:yq,EffectScope:YC,ErrorCodes:JW,ErrorTypeStrings:hq,Fragment:ee,KeepAlive:kY,ReactiveEffect:uf,Static:Hu,Suspense:hY,Teleport:Sa,Text:il,TrackOpTypes:XW,Transition:ji,TransitionGroup:ib,TriggerOpTypes:KW,VueElement:sb,assertNumber:ZW,callWithAsyncErrorHandling:To,callWithErrorHandling:Ja,camelize:es,capitalize:Dc,cloneVNode:ur,compatUtils:_q,computed:Y,createApp:mx,createBlock:D,createCommentVNode:O,createElementBlock:A,createElementVNode:g,createHydrationRenderer:aI,createPropsRestProxy:OY,createRenderer:rI,createSSRApp:nG,createSlots:cs,createStaticVNode:$a,createTextVNode:B,createVNode:_,customRef:CP,defineAsyncComponent:bY,defineComponent:ce,defineCustomElement:TI,defineEmits:$Y,defineExpose:AY,defineModel:TY,defineOptions:EY,defineProps:SY,defineSSRCustomElement:Uq,defineSlots:MY,devtools:fq,effect:wW,effectScope:Wy,getCurrentInstance:bt,getCurrentScope:Yy,getTransitionRawChildren:eb,guardReactiveProps:Wh,h:vt,handleError:xd,hasInjectionContext:JP,hydrate:zI,initCustomFormatter:uq,initDirectivesForSSR:sG,inject:qe,isMemoSame:wI,isProxy:ZC,isReactive:pc,isReadonly:df,isRef:gn,isRuntimeOnly:rq,isShallow:lg,isVNode:ls,markRaw:Si,mergeDefaults:IY,mergeModels:LY,mergeProps:Zt,nextTick:ot,normalizeClass:G,normalizeProps:Bh,normalizeStyle:Xe,onActivated:lx,onBeforeMount:Sd,onBeforeUnmount:bn,onBeforeUpdate:ux,onDeactivated:cx,onErrorCaptured:YP,onMounted:Ft,onRenderTracked:WP,onRenderTriggered:jP,onScopeDispose:qy,onServerPrefetch:UP,onUnmounted:dl,onUpdated:ul,openBlock:v,popScopeId:PP,provide:It,proxyRefs:ex,pushScopeId:TP,queuePostFlushCb:M_,reactive:In,readonly:Cd,ref:J,registerRuntimeCompiler:_I,render:ol,renderList:Ce,renderSlot:le,resolveComponent:W,resolveDirective:xt,resolveDynamicComponent:Ct,resolveFilter:vq,resolveTransitionHooks:hf,setBlockTracking:X3,setDevtoolsHook:pq,setTransitionHooks:sd,shallowReactive:KC,shallowReadonly:HW,shallowRef:Hn,ssrContextKey:DP,ssrUtils:gq,stop:kW,toDisplayString:S,toHandlerKey:Fu,toHandlers:GP,toRaw:nn,toRef:Sn,toRefs:co,toValue:N3,transformVNodeArgs:tq,triggerRef:Am,unref:E,useAttrs:$d,useCssModule:Wq,useCssVars:Eq,useModel:cq,useSSRContext:RP,useSlots:di,useTransitionState:rx,vModelCheckbox:l1,vModelDynamic:RI,vModelRadio:c1,vModelSelect:OI,vModelText:rd,vShow:Ut,version:kI,warn:CI,watch:Te,watchEffect:sl,watchPostEffect:VP,watchSyncEffect:FP,withAsyncContext:DY,withCtx:w,withDefaults:PY,withDirectives:De,withKeys:ut,withMemo:dq,withModifiers:Ae,withScopeId:oY},Symbol.toStringTag,{value:"Module"}));/**
* @vue/compiler-core v3.4.23
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const mg=Symbol(""),Im=Symbol(""),gx=Symbol(""),V_=Symbol(""),jI=Symbol(""),ad=Symbol(""),WI=Symbol(""),YI=Symbol(""),vx=Symbol(""),_x=Symbol(""),u1=Symbol(""),yx=Symbol(""),qI=Symbol(""),bx=Symbol(""),wx=Symbol(""),kx=Symbol(""),Cx=Symbol(""),xx=Symbol(""),Sx=Symbol(""),GI=Symbol(""),XI=Symbol(""),ob=Symbol(""),F_=Symbol(""),$x=Symbol(""),Ax=Symbol(""),gg=Symbol(""),d1=Symbol(""),Ex=Symbol(""),sk=Symbol(""),oG=Symbol(""),ik=Symbol(""),N_=Symbol(""),rG=Symbol(""),aG=Symbol(""),Mx=Symbol(""),lG=Symbol(""),cG=Symbol(""),Tx=Symbol(""),KI=Symbol(""),mf={[mg]:"Fragment",[Im]:"Teleport",[gx]:"Suspense",[V_]:"KeepAlive",[jI]:"BaseTransition",[ad]:"openBlock",[WI]:"createBlock",[YI]:"createElementBlock",[vx]:"createVNode",[_x]:"createElementVNode",[u1]:"createCommentVNode",[yx]:"createTextVNode",[qI]:"createStaticVNode",[bx]:"resolveComponent",[wx]:"resolveDynamicComponent",[kx]:"resolveDirective",[Cx]:"resolveFilter",[xx]:"withDirectives",[Sx]:"renderList",[GI]:"renderSlot",[XI]:"createSlots",[ob]:"toDisplayString",[F_]:"mergeProps",[$x]:"normalizeClass",[Ax]:"normalizeStyle",[gg]:"normalizeProps",[d1]:"guardReactiveProps",[Ex]:"toHandlers",[sk]:"camelize",[oG]:"capitalize",[ik]:"toHandlerKey",[N_]:"setBlockTracking",[rG]:"pushScopeId",[aG]:"popScopeId",[Mx]:"withCtx",[lG]:"unref",[cG]:"isRef",[Tx]:"withMemo",[KI]:"isMemoSame"};function uG(t){Object.getOwnPropertySymbols(t).forEach(e=>{mf[e]=t[e]})}const Vo={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function dG(t,e=""){return{type:0,source:e,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:Vo}}function vg(t,e,n,i,s,o,r,a=!1,l=!1,c=!1,u=Vo){return t&&(a?(t.helper(ad),t.helper(_f(t.inSSR,c))):t.helper(vf(t.inSSR,c)),r&&t.helper(xx)),{type:13,tag:e,props:n,children:i,patchFlag:s,dynamicProps:o,directives:r,isBlock:a,disableTracking:l,isComponent:c,loc:u}}function h1(t,e=Vo){return{type:17,loc:e,elements:t}}function er(t,e=Vo){return{type:15,loc:e,properties:t}}function vs(t,e){return{type:16,loc:Vo,key:Ke(t)?qt(t,!0):t,value:e}}function qt(t,e=!1,n=Vo,i=0){return{type:4,loc:n,content:t,isStatic:e,constType:e?3:i}}function Er(t,e=Vo){return{type:8,loc:e,children:t}}function Rs(t,e=[],n=Vo){return{type:14,loc:n,callee:t,arguments:e}}function gf(t,e=void 0,n=!1,i=!1,s=Vo){return{type:18,params:t,returns:e,newline:n,isSlot:i,loc:s}}function ok(t,e,n,i=!0){return{type:19,test:t,consequent:e,alternate:n,newline:i,loc:Vo}}function hG(t,e,n=!1){return{type:20,index:t,value:e,isVNode:n,loc:Vo}}function fG(t){return{type:21,body:t,loc:Vo}}function vf(t,e){return t||e?vx:_x}function _f(t,e){return t||e?WI:YI}function Px(t,{helper:e,removeHelper:n,inSSR:i}){t.isBlock||(t.isBlock=!0,n(vf(i,t.isComponent)),e(ad),e(_f(i,t.isComponent)))}const $9=new Uint8Array([123,123]),A9=new Uint8Array([125,125]);function E9(t){return t>=97&&t<=122||t>=65&&t<=90}function Co(t){return t===32||t===10||t===9||t===12||t===13}function $l(t){return t===47||t===62||Co(t)}function B_(t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}const mi={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};class pG{constructor(e,n){this.stack=e,this.cbs=n,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=$9,this.delimiterClose=A9,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=$9,this.delimiterClose=A9}getPos(e){let n=1,i=e+1;for(let s=this.newlines.length-1;s>=0;s--){const o=this.newlines[s];if(e>o){n=s+2,i=e-o;break}}return{column:i,line:n,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){e===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const n=this.index+1-this.delimiterOpen.length;n>this.sectionStart&&this.cbs.ontext(this.sectionStart,n),this.state=3,this.sectionStart=n}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const n=this.sequenceIndex===this.currentSequence.length;if(!(n?$l(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!n){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(e===62||Co(e)){const n=this.index-this.currentSequence.length;if(this.sectionStart<n){const i=this.index;this.index=n,this.cbs.ontext(this.sectionStart,n),this.index=i}this.sectionStart=n+2,this.stateInClosingTagName(e),this.inRCDATA=!1;return}this.sequenceIndex=0}(e|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===mi.TitleEnd||this.currentSequence===mi.TextareaEnd&&!this.inSFCRoot?e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(e===60)}stateCDATASequence(e){e===mi.Cdata[this.sequenceIndex]?++this.sequenceIndex===mi.Cdata.length&&(this.state=28,this.currentSequence=mi.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);if(n===10&&this.newlines.push(this.index),n===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===mi.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,n){this.enterRCDATA(e,n),this.state=31}enterRCDATA(e,n){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=n}stateBeforeTagName(e){e===33?(this.state=22,this.sectionStart=this.index+1):e===63?(this.state=24,this.sectionStart=this.index+1):E9(e)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:e===116?this.state=30:this.state=e===115?29:6):e===47?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){$l(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if($l(e)){const n=this.buffer.slice(this.sectionStart,this.index);n!=="template"&&this.enterRCDATA(B_("</"+n),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){Co(e)||(e===62?(this.state=1,this.sectionStart=this.index+1):(this.state=E9(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(e===62||Co(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){e===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){e===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):e===47?this.state=7:e===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):Co(e)||this.handleAttrStart(e)}handleAttrStart(e){e===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):e===46||e===58||e===64||e===35?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){e===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):Co(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(e===61||$l(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){e===61||$l(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):e===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){e===61||$l(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===91?this.state=15:e===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){e===93?this.state=14:(e===61||$l(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){e===61||$l(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===46&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){e===61?this.state=18:e===47||e===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):Co(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){e===34?(this.state=19,this.sectionStart=this.index+1):e===39?(this.state=20,this.sectionStart=this.index+1):Co(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,n){(e===n||this.fastForwardTo(n))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(n===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){Co(e)||e===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):(e===39||e===60||e===61||e===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){e===91?(this.state=26,this.sequenceIndex=0):this.state=e===45?25:23}stateInDeclaration(e){(e===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(e===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){e===45?(this.state=28,this.currentSequence=mi.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(e===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===mi.ScriptEnd[3]?this.startSpecial(mi.ScriptEnd,4):e===mi.StyleEnd[3]?this.startSpecial(mi.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===mi.TitleEnd[3]?this.startSpecial(mi.TitleEnd,4):e===mi.TextareaEnd[3]?this.startSpecial(mi.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){const n=this.buffer.charCodeAt(this.index);switch(n===10&&this.newlines.push(this.index),this.state){case 1:{this.stateText(n);break}case 2:{this.stateInterpolationOpen(n);break}case 3:{this.stateInterpolation(n);break}case 4:{this.stateInterpolationClose(n);break}case 31:{this.stateSpecialStartSequence(n);break}case 32:{this.stateInRCDATA(n);break}case 26:{this.stateCDATASequence(n);break}case 19:{this.stateInAttrValueDoubleQuotes(n);break}case 12:{this.stateInAttrName(n);break}case 13:{this.stateInDirName(n);break}case 14:{this.stateInDirArg(n);break}case 15:{this.stateInDynamicDirArg(n);break}case 16:{this.stateInDirModifier(n);break}case 28:{this.stateInCommentLike(n);break}case 27:{this.stateInSpecialComment(n);break}case 11:{this.stateBeforeAttrName(n);break}case 6:{this.stateInTagName(n);break}case 34:{this.stateInSFCRootTagName(n);break}case 9:{this.stateInClosingTagName(n);break}case 5:{this.stateBeforeTagName(n);break}case 17:{this.stateAfterAttrName(n);break}case 20:{this.stateInAttrValueSingleQuotes(n);break}case 18:{this.stateBeforeAttrValue(n);break}case 8:{this.stateBeforeClosingTagName(n);break}case 10:{this.stateAfterClosingTagName(n);break}case 29:{this.stateBeforeSpecialS(n);break}case 30:{this.stateBeforeSpecialT(n);break}case 21:{this.stateInAttrValueNoQuotes(n);break}case 7:{this.stateInSelfClosingTag(n);break}case 23:{this.stateInDeclaration(n);break}case 22:{this.stateBeforeDeclaration(n);break}case 25:{this.stateBeforeComment(n);break}case 24:{this.stateInProcessingInstruction(n);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length;this.sectionStart>=e||(this.state===28?this.currentSequence===mi.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,n){}}function M9(t,{compatConfig:e}){const n=e&&e[t];return t==="MODE"?n||3:n}function Uu(t,e){const n=M9("MODE",e),i=M9(t,e);return n===3?i===!0:i!==!1}function _g(t,e,n,...i){return Uu(t,e)}function Ix(t){throw t}function ZI(t){}function rs(t,e,n,i){const s=`https://vuejs.org/error-reference/#compiler-${t}`,o=new SyntaxError(String(s));return o.code=t,o.loc=e,o}const so=t=>t.type===4&&t.isStatic;function JI(t){switch(t){case"Teleport":case"teleport":return Im;case"Suspense":case"suspense":return gx;case"KeepAlive":case"keep-alive":return V_;case"BaseTransition":case"base-transition":return jI}}const mG=/^\d|[^\$\w]/,Lx=t=>!mG.test(t),gG=/[A-Za-z_$\xA0-\uFFFF]/,vG=/[\.\?\w$\xA0-\uFFFF]/,_G=/\s+[.[]\s*|\s*[.[]\s+/g,yG=t=>{t=t.trim().replace(_G,r=>r.trim());let e=0,n=[],i=0,s=0,o=null;for(let r=0;r<t.length;r++){const a=t.charAt(r);switch(e){case 0:if(a==="[")n.push(e),e=1,i++;else if(a==="(")n.push(e),e=2,s++;else if(!(r===0?gG:vG).test(a))return!1;break;case 1:a==="'"||a==='"'||a==="`"?(n.push(e),e=3,o=a):a==="["?i++:a==="]"&&(--i||(e=n.pop()));break;case 2:if(a==="'"||a==='"'||a==="`")n.push(e),e=3,o=a;else if(a==="(")s++;else if(a===")"){if(r===t.length-1)return!1;--s||(e=n.pop())}break;case 3:a===o&&(e=n.pop(),o=null);break}}return!i&&!s},QI=yG;function wr(t,e,n=!1){for(let i=0;i<t.props.length;i++){const s=t.props[i];if(s.type===7&&(n||s.exp)&&(Ke(e)?s.name===e:e.test(s.name)))return s}}function rb(t,e,n=!1,i=!1){for(let s=0;s<t.props.length;s++){const o=t.props[s];if(o.type===6){if(n)continue;if(o.name===e&&(o.value||i))return o}else if(o.name==="bind"&&(o.exp||i)&&$u(o.arg,e))return o}}function $u(t,e){return!!(t&&so(t)&&t.content===e)}function bG(t){return t.props.some(e=>e.type===7&&e.name==="bind"&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function H2(t){return t.type===5||t.type===2}function wG(t){return t.type===7&&t.name==="slot"}function z_(t){return t.type===1&&t.tagType===3}function H_(t){return t.type===1&&t.tagType===2}const kG=new Set([gg,d1]);function eL(t,e=[]){if(t&&!Ke(t)&&t.type===14){const n=t.callee;if(!Ke(n)&&kG.has(n))return eL(t.arguments[0],e.concat(t))}return[t,e]}function U_(t,e,n){let i,s=t.type===13?t.props:t.arguments[2],o=[],r;if(s&&!Ke(s)&&s.type===14){const a=eL(s);s=a[0],o=a[1],r=o[o.length-1]}if(s==null||Ke(s))i=er([e]);else if(s.type===14){const a=s.arguments[0];!Ke(a)&&a.type===15?T9(e,a)||a.properties.unshift(e):s.callee===Ex?i=Rs(n.helper(F_),[er([e]),s]):s.arguments.unshift(er([e])),!i&&(i=s)}else s.type===15?(T9(e,s)||s.properties.unshift(e),i=s):(i=Rs(n.helper(F_),[er([e]),s]),r&&r.callee===d1&&(r=o[o.length-2]));t.type===13?r?r.arguments[0]=i:t.props=i:r?r.arguments[0]=i:t.arguments[2]=i}function T9(t,e){let n=!1;if(t.key.type===4){const i=t.key.content;n=e.properties.some(s=>s.key.type===4&&s.key.content===i)}return n}function yg(t,e){return`_${e}_${t.replace(/[^\w]/g,(n,i)=>n==="-"?"_":t.charCodeAt(i).toString())}`}function CG(t){return t.type===14&&t.callee===Tx?t.arguments[1].returns:t}const xG=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,tL={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:a0,isPreTag:a0,isCustomElement:a0,onError:Ix,onWarn:ZI,comments:!1,prefixIdentifiers:!1};let An=tL,bg=null,Qa="",yi=null,fn=null,Ki="",Fa=-1,lu=-1,j_=0,Kl=!1,rk=null;const ps=[],gs=new pG(ps,{onerr:Oa,ontext(t,e){Cv(Ks(t,e),t,e)},ontextentity(t,e,n){Cv(t,e,n)},oninterpolation(t,e){if(Kl)return Cv(Ks(t,e),t,e);let n=t+gs.delimiterOpen.length,i=e-gs.delimiterClose.length;for(;Co(Qa.charCodeAt(n));)n++;for(;Co(Qa.charCodeAt(i-1));)i--;let s=Ks(n,i);s.includes("&")&&(s=An.decodeEntities(s,!1)),ak({type:5,content:h0(s,!1,Os(n,i)),loc:Os(t,e)})},onopentagname(t,e){const n=Ks(t,e);yi={type:1,tag:n,ns:An.getNamespace(n,ps[0],An.ns),tagType:0,props:[],children:[],loc:Os(t-1,e),codegenNode:void 0}},onopentagend(t){I9(t)},onclosetag(t,e){const n=Ks(t,e);if(!An.isVoidTag(n)){let i=!1;for(let s=0;s<ps.length;s++)if(ps[s].tag.toLowerCase()===n.toLowerCase()){i=!0,s>0&&Oa(24,ps[0].loc.start.offset);for(let r=0;r<=s;r++){const a=ps.shift();d0(a,e,r<s)}break}i||Oa(23,nL(t,60))}},onselfclosingtag(t){var e;const n=yi.tag;yi.isSelfClosing=!0,I9(t),((e=ps[0])==null?void 0:e.tag)===n&&d0(ps.shift(),t)},onattribname(t,e){fn={type:6,name:Ks(t,e),nameLoc:Os(t,e),value:void 0,loc:Os(t)}},ondirname(t,e){const n=Ks(t,e),i=n==="."||n===":"?"bind":n==="@"?"on":n==="#"?"slot":n.slice(2);if(!Kl&&i===""&&Oa(26,t),Kl||i==="")fn={type:6,name:n,nameLoc:Os(t,e),value:void 0,loc:Os(t)};else if(fn={type:7,name:i,rawName:n,exp:void 0,arg:void 0,modifiers:n==="."?["prop"]:[],loc:Os(t)},i==="pre"){Kl=gs.inVPre=!0,rk=yi;const s=yi.props;for(let o=0;o<s.length;o++)s[o].type===7&&(s[o]=OG(s[o]))}},ondirarg(t,e){if(t===e)return;const n=Ks(t,e);if(Kl)fn.name+=n,Au(fn.nameLoc,e);else{const i=n[0]!=="[";fn.arg=h0(i?n:n.slice(1,-1),i,Os(t,e),i?3:0)}},ondirmodifier(t,e){const n=Ks(t,e);if(Kl)fn.name+="."+n,Au(fn.nameLoc,e);else if(fn.name==="slot"){const i=fn.arg;i&&(i.content+="."+n,Au(i.loc,e))}else fn.modifiers.push(n)},onattribdata(t,e){Ki+=Ks(t,e),Fa<0&&(Fa=t),lu=e},onattribentity(t,e,n){Ki+=t,Fa<0&&(Fa=e),lu=n},onattribnameend(t){const e=fn.loc.start.offset,n=Ks(e,t);fn.type===7&&(fn.rawName=n),yi.props.some(i=>(i.type===7?i.rawName:i.name)===n)&&Oa(2,e)},onattribend(t,e){if(yi&&fn){if(Au(fn.loc,e),t!==0)if(Ki.includes("&")&&(Ki=An.decodeEntities(Ki,!0)),fn.type===6)fn.name==="class"&&(Ki=iL(Ki).trim()),t===1&&!Ki&&Oa(13,e),fn.value={type:2,content:Ki,loc:t===1?Os(Fa,lu):Os(Fa-1,lu+1)},gs.inSFCRoot&&yi.tag==="template"&&fn.name==="lang"&&Ki&&Ki!=="html"&&gs.enterRCDATA(B_("</template"),0);else{let n=0;fn.exp=h0(Ki,!1,Os(Fa,lu),0,n),fn.name==="for"&&(fn.forParseResult=$G(fn.exp));let i=-1;fn.name==="bind"&&(i=fn.modifiers.indexOf("sync"))>-1&&_g("COMPILER_V_BIND_SYNC",An,fn.loc,fn.rawName)&&(fn.name="model",fn.modifiers.splice(i,1))}(fn.type!==7||fn.name!=="pre")&&yi.props.push(fn)}Ki="",Fa=lu=-1},oncomment(t,e){An.comments&&ak({type:3,content:Ks(t,e),loc:Os(t-4,e+3)})},onend(){const t=Qa.length;for(let e=0;e<ps.length;e++)d0(ps[e],t-1),Oa(24,ps[e].loc.start.offset)},oncdata(t,e){ps[0].ns!==0?Cv(Ks(t,e),t,e):Oa(1,t-9)},onprocessinginstruction(t){(ps[0]?ps[0].ns:An.ns)===0&&Oa(21,t-1)}}),P9=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,SG=/^\(|\)$/g;function $G(t){const e=t.loc,n=t.content,i=n.match(xG);if(!i)return;const[,s,o]=i,r=(d,h,f=!1)=>{const p=e.start.offset+h,m=p+d.length;return h0(d,!1,Os(p,m),0,f?1:0)},a={source:r(o.trim(),n.indexOf(o,s.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let l=s.trim().replace(SG,"").trim();const c=s.indexOf(l),u=l.match(P9);if(u){l=l.replace(P9,"").trim();const d=u[1].trim();let h;if(d&&(h=n.indexOf(d,c+l.length),a.key=r(d,h,!0)),u[2]){const f=u[2].trim();f&&(a.index=r(f,n.indexOf(f,a.key?h+d.length:c+l.length),!0))}}return l&&(a.value=r(l,c,!0)),a}function Ks(t,e){return Qa.slice(t,e)}function I9(t){gs.inSFCRoot&&(yi.innerLoc=Os(t+1,t+1)),ak(yi);const{tag:e,ns:n}=yi;n===0&&An.isPreTag(e)&&j_++,An.isVoidTag(e)?d0(yi,t):(ps.unshift(yi),(n===1||n===2)&&(gs.inXML=!0)),yi=null}function Cv(t,e,n){var i;{const r=(i=ps[0])==null?void 0:i.tag;r!=="script"&&r!=="style"&&t.includes("&")&&(t=An.decodeEntities(t,!1))}const s=ps[0]||bg,o=s.children[s.children.length-1];(o==null?void 0:o.type)===2?(o.content+=t,Au(o.loc,n)):s.children.push({type:2,content:t,loc:Os(e,n)})}function d0(t,e,n=!1){n?Au(t.loc,nL(e,60)):Au(t.loc,AG(e,62)+1),gs.inSFCRoot&&(t.children.length?t.innerLoc.end=yn({},t.children[t.children.length-1].loc.end):t.innerLoc.end=yn({},t.innerLoc.start),t.innerLoc.source=Ks(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:i,ns:s}=t;Kl||(i==="slot"?t.tagType=2:L9(t)?t.tagType=3:MG(t)&&(t.tagType=1)),gs.inRCDATA||(t.children=sL(t.children,t.tag)),s===0&&An.isPreTag(i)&&j_--,rk===t&&(Kl=gs.inVPre=!1,rk=null),gs.inXML&&(ps[0]?ps[0].ns:An.ns)===0&&(gs.inXML=!1);{const o=t.props;if(!gs.inSFCRoot&&Uu("COMPILER_NATIVE_TEMPLATE",An)&&t.tag==="template"&&!L9(t)){const a=ps[0]||bg,l=a.children.indexOf(t);a.children.splice(l,1,...t.children)}const r=o.find(a=>a.type===6&&a.name==="inline-template");r&&_g("COMPILER_INLINE_TEMPLATE",An,r.loc)&&t.children.length&&(r.value={type:2,content:Ks(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:r.loc})}}function AG(t,e){let n=t;for(;Qa.charCodeAt(n)!==e&&n<Qa.length-1;)n++;return n}function nL(t,e){let n=t;for(;Qa.charCodeAt(n)!==e&&n>=0;)n--;return n}const EG=new Set(["if","else","else-if","for","slot"]);function L9({tag:t,props:e}){if(t==="template"){for(let n=0;n<e.length;n++)if(e[n].type===7&&EG.has(e[n].name))return!0}return!1}function MG({tag:t,props:e}){var n;if(An.isCustomElement(t))return!1;if(t==="component"||TG(t.charCodeAt(0))||JI(t)||(n=An.isBuiltInComponent)!=null&&n.call(An,t)||An.isNativeTag&&!An.isNativeTag(t))return!0;for(let i=0;i<e.length;i++){const s=e[i];if(s.type===6){if(s.name==="is"&&s.value){if(s.value.content.startsWith("vue:"))return!0;if(_g("COMPILER_IS_ON_ELEMENT",An,s.loc))return!0}}else if(s.name==="bind"&&$u(s.arg,"is")&&_g("COMPILER_IS_ON_ELEMENT",An,s.loc))return!0}return!1}function TG(t){return t>64&&t<91}const PG=/\r\n/g;function sL(t,e){var n,i;const s=An.whitespace!=="preserve";let o=!1;for(let r=0;r<t.length;r++){const a=t[r];if(a.type===2)if(j_)a.content=a.content.replace(PG,`
`);else if(IG(a.content)){const l=(n=t[r-1])==null?void 0:n.type,c=(i=t[r+1])==null?void 0:i.type;!l||!c||s&&(l===3&&(c===3||c===1)||l===1&&(c===3||c===1&&LG(a.content)))?(o=!0,t[r]=null):a.content=" "}else s&&(a.content=iL(a.content))}if(j_&&e&&An.isPreTag(e)){const r=t[0];r&&r.type===2&&(r.content=r.content.replace(/^\r?\n/,""))}return o?t.filter(Boolean):t}function IG(t){for(let e=0;e<t.length;e++)if(!Co(t.charCodeAt(e)))return!1;return!0}function LG(t){for(let e=0;e<t.length;e++){const n=t.charCodeAt(e);if(n===10||n===13)return!0}return!1}function iL(t){let e="",n=!1;for(let i=0;i<t.length;i++)Co(t.charCodeAt(i))?n||(e+=" ",n=!0):(e+=t[i],n=!1);return e}function ak(t){(ps[0]||bg).children.push(t)}function Os(t,e){return{start:gs.getPos(t),end:e==null?e:gs.getPos(e),source:e==null?e:Ks(t,e)}}function Au(t,e){t.end=gs.getPos(e),t.source=Ks(t.start.offset,e)}function OG(t){const e={type:6,name:t.rawName,nameLoc:Os(t.loc.start.offset,t.loc.start.offset+t.rawName.length),value:void 0,loc:t.loc};if(t.exp){const n=t.exp.loc;n.end.offset<t.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),e.value={type:2,content:t.exp.content,loc:n}}return e}function h0(t,e=!1,n,i=0,s=0){return qt(t,e,n,i)}function Oa(t,e,n){An.onError(rs(t,Os(e,e)))}function DG(){gs.reset(),yi=null,fn=null,Ki="",Fa=-1,lu=-1,ps.length=0}function RG(t,e){if(DG(),Qa=t,An=yn({},tL),e){let s;for(s in e)e[s]!=null&&(An[s]=e[s])}gs.mode=An.parseMode==="html"?1:An.parseMode==="sfc"?2:0,gs.inXML=An.ns===1||An.ns===2;const n=e==null?void 0:e.delimiters;n&&(gs.delimiterOpen=B_(n[0]),gs.delimiterClose=B_(n[1]));const i=bg=dG([],t);return gs.parse(Qa),i.loc=Os(0,t.length),i.children=sL(i.children),bg=null,i}function VG(t,e){f0(t,e,oL(t,t.children[0]))}function oL(t,e){const{children:n}=t;return n.length===1&&e.type===1&&!H_(e)}function f0(t,e,n=!1){const{children:i}=t,s=i.length;let o=0;for(let r=0;r<i.length;r++){const a=i[r];if(a.type===1&&a.tagType===0){const l=n?0:tr(a,e);if(l>0){if(l>=2){a.codegenNode.patchFlag="-1",a.codegenNode=e.hoist(a.codegenNode),o++;continue}}else{const c=a.codegenNode;if(c.type===13){const u=cL(c);if((!u||u===512||u===1)&&aL(a,e)>=2){const d=lL(a);d&&(c.props=e.hoist(d))}c.dynamicProps&&(c.dynamicProps=e.hoist(c.dynamicProps))}}}if(a.type===1){const l=a.tagType===1;l&&e.scopes.vSlot++,f0(a,e),l&&e.scopes.vSlot--}else if(a.type===11)f0(a,e,a.children.length===1);else if(a.type===9)for(let l=0;l<a.branches.length;l++)f0(a.branches[l],e,a.branches[l].children.length===1)}if(o&&e.transformHoist&&e.transformHoist(i,e,t),o&&o===s&&t.type===1&&t.tagType===0&&t.codegenNode&&t.codegenNode.type===13&&Ee(t.codegenNode.children)){const r=e.hoist(h1(t.codegenNode.children));e.hmr&&(r.content=`[...${r.content}]`),t.codegenNode.children=r}}function tr(t,e){const{constantCache:n}=e;switch(t.type){case 1:if(t.tagType!==0)return 0;const i=n.get(t);if(i!==void 0)return i;const s=t.codegenNode;if(s.type!==13||s.isBlock&&t.tag!=="svg"&&t.tag!=="foreignObject")return 0;if(cL(s))return n.set(t,0),0;{let a=3;const l=aL(t,e);if(l===0)return n.set(t,0),0;l<a&&(a=l);for(let c=0;c<t.children.length;c++){const u=tr(t.children[c],e);if(u===0)return n.set(t,0),0;u<a&&(a=u)}if(a>1)for(let c=0;c<t.props.length;c++){const u=t.props[c];if(u.type===7&&u.name==="bind"&&u.exp){const d=tr(u.exp,e);if(d===0)return n.set(t,0),0;d<a&&(a=d)}}if(s.isBlock){for(let c=0;c<t.props.length;c++)if(t.props[c].type===7)return n.set(t,0),0;e.removeHelper(ad),e.removeHelper(_f(e.inSSR,s.isComponent)),s.isBlock=!1,e.helper(vf(e.inSSR,s.isComponent))}return n.set(t,a),a}case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return tr(t.content,e);case 4:return t.constType;case 8:let r=3;for(let a=0;a<t.children.length;a++){const l=t.children[a];if(Ke(l)||cr(l))continue;const c=tr(l,e);if(c===0)return 0;c<r&&(r=c)}return r;default:return 0}}const FG=new Set([$x,Ax,gg,d1]);function rL(t,e){if(t.type===14&&!Ke(t.callee)&&FG.has(t.callee)){const n=t.arguments[0];if(n.type===4)return tr(n,e);if(n.type===14)return rL(n,e)}return 0}function aL(t,e){let n=3;const i=lL(t);if(i&&i.type===15){const{properties:s}=i;for(let o=0;o<s.length;o++){const{key:r,value:a}=s[o],l=tr(r,e);if(l===0)return l;l<n&&(n=l);let c;if(a.type===4?c=tr(a,e):a.type===14?c=rL(a,e):c=0,c===0)return c;c<n&&(n=c)}}return n}function lL(t){const e=t.codegenNode;if(e.type===13)return e.props}function cL(t){const e=t.patchFlag;return e?parseInt(e,10):void 0}function NG(t,{filename:e="",prefixIdentifiers:n=!1,hoistStatic:i=!1,hmr:s=!1,cacheHandlers:o=!1,nodeTransforms:r=[],directiveTransforms:a={},transformHoist:l=null,isBuiltInComponent:c=Tt,isCustomElement:u=Tt,expressionPlugins:d=[],scopeId:h=null,slotted:f=!0,ssr:p=!1,inSSR:m=!1,ssrCssVars:y="",bindingMetadata:b=xn,inline:k=!1,isTS:C=!1,onError:$=Ix,onWarn:x=ZI,compatConfig:M}){const P=e.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),T={filename:e,selfName:P&&Dc(es(P[1])),prefixIdentifiers:n,hoistStatic:i,hmr:s,cacheHandlers:o,nodeTransforms:r,directiveTransforms:a,transformHoist:l,isBuiltInComponent:c,isCustomElement:u,expressionPlugins:d,scopeId:h,slotted:f,ssr:p,inSSR:m,ssrCssVars:y,bindingMetadata:b,inline:k,isTS:C,onError:$,onWarn:x,compatConfig:M,root:t,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],constantCache:new WeakMap,temps:0,cached:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,currentNode:t,childIndex:0,inVOnce:!1,helper(I){const L=T.helpers.get(I)||0;return T.helpers.set(I,L+1),I},removeHelper(I){const L=T.helpers.get(I);if(L){const R=L-1;R?T.helpers.set(I,R):T.helpers.delete(I)}},helperString(I){return`_${mf[T.helper(I)]}`},replaceNode(I){T.parent.children[T.childIndex]=T.currentNode=I},removeNode(I){const L=T.parent.children,R=I?L.indexOf(I):T.currentNode?T.childIndex:-1;!I||I===T.currentNode?(T.currentNode=null,T.onNodeRemoved()):T.childIndex>R&&(T.childIndex--,T.onNodeRemoved()),T.parent.children.splice(R,1)},onNodeRemoved:Tt,addIdentifiers(I){},removeIdentifiers(I){},hoist(I){Ke(I)&&(I=qt(I)),T.hoists.push(I);const L=qt(`_hoisted_${T.hoists.length}`,!1,I.loc,2);return L.hoisted=I,L},cache(I,L=!1){return hG(T.cached++,I,L)}};return T.filters=new Set,T}function BG(t,e){const n=NG(t,e);ab(t,n),e.hoistStatic&&VG(t,n),e.ssr||zG(t,n),t.helpers=new Set([...n.helpers.keys()]),t.components=[...n.components],t.directives=[...n.directives],t.imports=n.imports,t.hoists=n.hoists,t.temps=n.temps,t.cached=n.cached,t.transformed=!0,t.filters=[...n.filters]}function zG(t,e){const{helper:n}=e,{children:i}=t;if(i.length===1){const s=i[0];if(oL(t,s)&&s.codegenNode){const o=s.codegenNode;o.type===13&&Px(o,e),t.codegenNode=o}else t.codegenNode=s}else if(i.length>1){let s=64;t.codegenNode=vg(e,n(mg),void 0,t.children,s+"",void 0,void 0,!0,void 0,!1)}}function HG(t,e){let n=0;const i=()=>{n--};for(;n<t.children.length;n++){const s=t.children[n];Ke(s)||(e.parent=t,e.childIndex=n,e.onNodeRemoved=i,ab(s,e))}}function ab(t,e){e.currentNode=t;const{nodeTransforms:n}=e,i=[];for(let o=0;o<n.length;o++){const r=n[o](t,e);if(r&&(Ee(r)?i.push(...r):i.push(r)),e.currentNode)t=e.currentNode;else return}switch(t.type){case 3:e.ssr||e.helper(u1);break;case 5:e.ssr||e.helper(ob);break;case 9:for(let o=0;o<t.branches.length;o++)ab(t.branches[o],e);break;case 10:case 11:case 1:case 0:HG(t,e);break}e.currentNode=t;let s=i.length;for(;s--;)i[s]()}function uL(t,e){const n=Ke(t)?i=>i===t:i=>t.test(i);return(i,s)=>{if(i.type===1){const{props:o}=i;if(i.tagType===3&&o.some(wG))return;const r=[];for(let a=0;a<o.length;a++){const l=o[a];if(l.type===7&&n(l.name)){o.splice(a,1),a--;const c=e(i,l,s);c&&r.push(c)}}return r}}}const lb="/*#__PURE__*/",dL=t=>`${mf[t]}: _${mf[t]}`;function UG(t,{mode:e="function",prefixIdentifiers:n=e==="module",sourceMap:i=!1,filename:s="template.vue.html",scopeId:o=null,optimizeImports:r=!1,runtimeGlobalName:a="Vue",runtimeModuleName:l="vue",ssrRuntimeModuleName:c="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:h=!1}){const f={mode:e,prefixIdentifiers:n,sourceMap:i,filename:s,scopeId:o,optimizeImports:r,runtimeGlobalName:a,runtimeModuleName:l,ssrRuntimeModuleName:c,ssr:u,isTS:d,inSSR:h,source:t.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(m){return`_${mf[m]}`},push(m,y=-2,b){f.code+=m},indent(){p(++f.indentLevel)},deindent(m=!1){m?--f.indentLevel:p(--f.indentLevel)},newline(){p(f.indentLevel)}};function p(m){f.push(`
`+"  ".repeat(m),0)}return f}function jG(t,e={}){const n=UG(t,e);e.onContextCreated&&e.onContextCreated(n);const{mode:i,push:s,prefixIdentifiers:o,indent:r,deindent:a,newline:l,scopeId:c,ssr:u}=n,d=Array.from(t.helpers),h=d.length>0,f=!o&&i!=="module";WG(t,n);const m=u?"ssrRender":"render",b=(u?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(s(`function ${m}(${b}) {`),r(),f&&(s("with (_ctx) {"),r(),h&&(s(`const { ${d.map(dL).join(", ")} } = _Vue
`,-1),l())),t.components.length&&(U2(t.components,"component",n),(t.directives.length||t.temps>0)&&l()),t.directives.length&&(U2(t.directives,"directive",n),t.temps>0&&l()),t.filters&&t.filters.length&&(l(),U2(t.filters,"filter",n),l()),t.temps>0){s("let ");for(let k=0;k<t.temps;k++)s(`${k>0?", ":""}_temp${k}`)}return(t.components.length||t.directives.length||t.temps)&&(s(`
`,0),l()),u||s("return "),t.codegenNode?ki(t.codegenNode,n):s("null"),f&&(a(),s("}")),a(),s("}"),{ast:t,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function WG(t,e){const{ssr:n,prefixIdentifiers:i,push:s,newline:o,runtimeModuleName:r,runtimeGlobalName:a,ssrRuntimeModuleName:l}=e,c=a,u=Array.from(t.helpers);if(u.length>0&&(s(`const _Vue = ${c}
`,-1),t.hoists.length)){const d=[vx,_x,u1,yx,qI].filter(h=>u.includes(h)).map(dL).join(", ");s(`const { ${d} } = _Vue
`,-1)}YG(t.hoists,e),o(),s("return ")}function U2(t,e,{helper:n,push:i,newline:s,isTS:o}){const r=n(e==="filter"?Cx:e==="component"?bx:kx);for(let a=0;a<t.length;a++){let l=t[a];const c=l.endsWith("__self");c&&(l=l.slice(0,-6)),i(`const ${yg(l,e)} = ${r}(${JSON.stringify(l)}${c?", true":""})${o?"!":""}`),a<t.length-1&&s()}}function YG(t,e){if(!t.length)return;e.pure=!0;const{push:n,newline:i,helper:s,scopeId:o,mode:r}=e;i();for(let a=0;a<t.length;a++){const l=t[a];l&&(n(`const _hoisted_${a+1} = `),ki(l,e),i())}e.pure=!1}function Ox(t,e){const n=t.length>3||!1;e.push("["),n&&e.indent(),f1(t,e,n),n&&e.deindent(),e.push("]")}function f1(t,e,n=!1,i=!0){const{push:s,newline:o}=e;for(let r=0;r<t.length;r++){const a=t[r];Ke(a)?s(a,-3):Ee(a)?Ox(a,e):ki(a,e),r<t.length-1&&(n?(i&&s(","),o()):i&&s(", "))}}function ki(t,e){if(Ke(t)){e.push(t,-3);return}if(cr(t)){e.push(e.helper(t));return}switch(t.type){case 1:case 9:case 11:ki(t.codegenNode,e);break;case 2:qG(t,e);break;case 4:hL(t,e);break;case 5:GG(t,e);break;case 12:ki(t.codegenNode,e);break;case 8:fL(t,e);break;case 3:KG(t,e);break;case 13:ZG(t,e);break;case 14:QG(t,e);break;case 15:eX(t,e);break;case 17:tX(t,e);break;case 18:nX(t,e);break;case 19:sX(t,e);break;case 20:iX(t,e);break;case 21:f1(t.body,e,!0,!1);break}}function qG(t,e){e.push(JSON.stringify(t.content),-3,t)}function hL(t,e){const{content:n,isStatic:i}=t;e.push(i?JSON.stringify(n):n,-3,t)}function GG(t,e){const{push:n,helper:i,pure:s}=e;s&&n(lb),n(`${i(ob)}(`),ki(t.content,e),n(")")}function fL(t,e){for(let n=0;n<t.children.length;n++){const i=t.children[n];Ke(i)?e.push(i,-3):ki(i,e)}}function XG(t,e){const{push:n}=e;if(t.type===8)n("["),fL(t,e),n("]");else if(t.isStatic){const i=Lx(t.content)?t.content:JSON.stringify(t.content);n(i,-2,t)}else n(`[${t.content}]`,-3,t)}function KG(t,e){const{push:n,helper:i,pure:s}=e;s&&n(lb),n(`${i(u1)}(${JSON.stringify(t.content)})`,-3,t)}function ZG(t,e){const{push:n,helper:i,pure:s}=e,{tag:o,props:r,children:a,patchFlag:l,dynamicProps:c,directives:u,isBlock:d,disableTracking:h,isComponent:f}=t;u&&n(i(xx)+"("),d&&n(`(${i(ad)}(${h?"true":""}), `),s&&n(lb);const p=d?_f(e.inSSR,f):vf(e.inSSR,f);n(i(p)+"(",-2,t),f1(JG([o,r,a,l,c]),e),n(")"),d&&n(")"),u&&(n(", "),ki(u,e),n(")"))}function JG(t){let e=t.length;for(;e--&&t[e]==null;);return t.slice(0,e+1).map(n=>n||"null")}function QG(t,e){const{push:n,helper:i,pure:s}=e,o=Ke(t.callee)?t.callee:i(t.callee);s&&n(lb),n(o+"(",-2,t),f1(t.arguments,e),n(")")}function eX(t,e){const{push:n,indent:i,deindent:s,newline:o}=e,{properties:r}=t;if(!r.length){n("{}",-2,t);return}const a=r.length>1||!1;n(a?"{":"{ "),a&&i();for(let l=0;l<r.length;l++){const{key:c,value:u}=r[l];XG(c,e),n(": "),ki(u,e),l<r.length-1&&(n(","),o())}a&&s(),n(a?"}":" }")}function tX(t,e){Ox(t.elements,e)}function nX(t,e){const{push:n,indent:i,deindent:s}=e,{params:o,returns:r,body:a,newline:l,isSlot:c}=t;c&&n(`_${mf[Mx]}(`),n("(",-2,t),Ee(o)?f1(o,e):o&&ki(o,e),n(") => "),(l||a)&&(n("{"),i()),r?(l&&n("return "),Ee(r)?Ox(r,e):ki(r,e)):a&&ki(a,e),(l||a)&&(s(),n("}")),c&&(t.isNonScopedSlot&&n(", undefined, true"),n(")"))}function sX(t,e){const{test:n,consequent:i,alternate:s,newline:o}=t,{push:r,indent:a,deindent:l,newline:c}=e;if(n.type===4){const d=!Lx(n.content);d&&r("("),hL(n,e),d&&r(")")}else r("("),ki(n,e),r(")");o&&a(),e.indentLevel++,o||r(" "),r("? "),ki(i,e),e.indentLevel--,o&&c(),o||r(" "),r(": ");const u=s.type===19;u||e.indentLevel++,ki(s,e),u||e.indentLevel--,o&&l(!0)}function iX(t,e){const{push:n,helper:i,indent:s,deindent:o,newline:r}=e;n(`_cache[${t.index}] || (`),t.isVNode&&(s(),n(`${i(N_)}(-1),`),r()),n(`_cache[${t.index}] = `),ki(t.value,e),t.isVNode&&(n(","),r(),n(`${i(N_)}(1),`),r(),n(`_cache[${t.index}]`),o()),n(")")}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");const oX=uL(/^(if|else|else-if)$/,(t,e,n)=>rX(t,e,n,(i,s,o)=>{const r=n.parent.children;let a=r.indexOf(i),l=0;for(;a-->=0;){const c=r[a];c&&c.type===9&&(l+=c.branches.length)}return()=>{if(o)i.codegenNode=D9(s,l,n);else{const c=aX(i.codegenNode);c.alternate=D9(s,l+i.branches.length-1,n)}}}));function rX(t,e,n,i){if(e.name!=="else"&&(!e.exp||!e.exp.content.trim())){const s=e.exp?e.exp.loc:t.loc;n.onError(rs(28,e.loc)),e.exp=qt("true",!1,s)}if(e.name==="if"){const s=O9(t,e),o={type:9,loc:t.loc,branches:[s]};if(n.replaceNode(o),i)return i(o,s,!0)}else{const s=n.parent.children;let o=s.indexOf(t);for(;o-->=-1;){const r=s[o];if(r&&r.type===3){n.removeNode(r);continue}if(r&&r.type===2&&!r.content.trim().length){n.removeNode(r);continue}if(r&&r.type===9){e.name==="else-if"&&r.branches[r.branches.length-1].condition===void 0&&n.onError(rs(30,t.loc)),n.removeNode();const a=O9(t,e);r.branches.push(a);const l=i&&i(r,a,!1);ab(a,n),l&&l(),n.currentNode=null}else n.onError(rs(30,t.loc));break}}}function O9(t,e){const n=t.tagType===3;return{type:10,loc:t.loc,condition:e.name==="else"?void 0:e.exp,children:n&&!wr(t,"for")?t.children:[t],userKey:rb(t,"key"),isTemplateIf:n}}function D9(t,e,n){return t.condition?ok(t.condition,R9(t,e,n),Rs(n.helper(u1),['""',"true"])):R9(t,e,n)}function R9(t,e,n){const{helper:i}=n,s=vs("key",qt(`${e}`,!1,Vo,2)),{children:o}=t,r=o[0];if(o.length!==1||r.type!==1)if(o.length===1&&r.type===11){const l=r.codegenNode;return U_(l,s,n),l}else{let l=64;return vg(n,i(mg),er([s]),o,l+"",void 0,void 0,!0,!1,!1,t.loc)}else{const l=r.codegenNode,c=CG(l);return c.type===13&&Px(c,n),U_(c,s,n),l}}function aX(t){for(;;)if(t.type===19)if(t.alternate.type===19)t=t.alternate;else return t;else t.type===20&&(t=t.value)}const lX=uL("for",(t,e,n)=>{const{helper:i,removeHelper:s}=n;return cX(t,e,n,o=>{const r=Rs(i(Sx),[o.source]),a=z_(t),l=wr(t,"memo"),c=rb(t,"key"),u=c&&(c.type===6?qt(c.value.content,!0):c.exp),d=c?vs("key",u):null,h=o.source.type===4&&o.source.constType>0,f=h?64:c?128:256;return o.codegenNode=vg(n,i(mg),void 0,r,f+"",void 0,void 0,!0,!h,!1,t.loc),()=>{let p;const{children:m}=o,y=m.length!==1||m[0].type!==1,b=H_(t)?t:a&&t.children.length===1&&H_(t.children[0])?t.children[0]:null;if(b?(p=b.codegenNode,a&&d&&U_(p,d,n)):y?p=vg(n,i(mg),d?er([d]):void 0,t.children,"64",void 0,void 0,!0,void 0,!1):(p=m[0].codegenNode,a&&d&&U_(p,d,n),p.isBlock!==!h&&(p.isBlock?(s(ad),s(_f(n.inSSR,p.isComponent))):s(vf(n.inSSR,p.isComponent))),p.isBlock=!h,p.isBlock?(i(ad),i(_f(n.inSSR,p.isComponent))):i(vf(n.inSSR,p.isComponent))),l){const k=gf(lk(o.parseResult,[qt("_cached")]));k.body=fG([Er(["const _memo = (",l.exp,")"]),Er(["if (_cached",...u?[" && _cached.key === ",u]:[],` && ${n.helperString(KI)}(_cached, _memo)) return _cached`]),Er(["const _item = ",p]),qt("_item.memo = _memo"),qt("return _item")]),r.arguments.push(k,qt("_cache"),qt(String(n.cached++)))}else r.arguments.push(gf(lk(o.parseResult),p,!0))}})});function cX(t,e,n,i){if(!e.exp){n.onError(rs(31,e.loc));return}const s=e.forParseResult;if(!s){n.onError(rs(32,e.loc));return}pL(s);const{addIdentifiers:o,removeIdentifiers:r,scopes:a}=n,{source:l,value:c,key:u,index:d}=s,h={type:11,loc:e.loc,source:l,valueAlias:c,keyAlias:u,objectIndexAlias:d,parseResult:s,children:z_(t)?t.children:[t]};n.replaceNode(h),a.vFor++;const f=i&&i(h);return()=>{a.vFor--,f&&f()}}function pL(t,e){t.finalized||(t.finalized=!0)}function lk({value:t,key:e,index:n},i=[]){return uX([t,e,n,...i])}function uX(t){let e=t.length;for(;e--&&!t[e];);return t.slice(0,e+1).map((n,i)=>n||qt("_".repeat(i+1),!1))}const V9=qt("undefined",!1),dX=(t,e)=>{if(t.type===1&&(t.tagType===1||t.tagType===3)){const n=wr(t,"slot");if(n)return n.exp,e.scopes.vSlot++,()=>{e.scopes.vSlot--}}},hX=(t,e,n,i)=>gf(t,n,!1,!0,n.length?n[0].loc:i);function fX(t,e,n=hX){e.helper(Mx);const{children:i,loc:s}=t,o=[],r=[];let a=e.scopes.vSlot>0||e.scopes.vFor>0;const l=wr(t,"slot",!0);if(l){const{arg:y,exp:b}=l;y&&!so(y)&&(a=!0),o.push(vs(y||qt("default",!0),n(b,void 0,i,s)))}let c=!1,u=!1;const d=[],h=new Set;let f=0;for(let y=0;y<i.length;y++){const b=i[y];let k;if(!z_(b)||!(k=wr(b,"slot",!0))){b.type!==3&&d.push(b);continue}if(l){e.onError(rs(37,k.loc));break}c=!0;const{children:C,loc:$}=b,{arg:x=qt("default",!0),exp:M,loc:P}=k;let T;so(x)?T=x?x.content:"default":a=!0;const I=wr(b,"for"),L=n(M,I,C,$);let R,V;if(R=wr(b,"if"))a=!0,r.push(ok(R.exp,xv(x,L,f++),V9));else if(V=wr(b,/^else(-if)?$/,!0)){let H=y,F;for(;H--&&(F=i[H],F.type===3););if(F&&z_(F)&&wr(F,"if")){i.splice(y,1),y--;let z=r[r.length-1];for(;z.alternate.type===19;)z=z.alternate;z.alternate=V.exp?ok(V.exp,xv(x,L,f++),V9):xv(x,L,f++)}else e.onError(rs(30,V.loc))}else if(I){a=!0;const H=I.forParseResult;H?(pL(H),r.push(Rs(e.helper(Sx),[H.source,gf(lk(H),xv(x,L),!0)]))):e.onError(rs(32,I.loc))}else{if(T){if(h.has(T)){e.onError(rs(38,P));continue}h.add(T),T==="default"&&(u=!0)}o.push(vs(x,L))}}if(!l){const y=(b,k)=>{const C=n(b,void 0,k,s);return e.compatConfig&&(C.isNonScopedSlot=!0),vs("default",C)};c?d.length&&d.some(b=>mL(b))&&(u?e.onError(rs(39,d[0].loc)):o.push(y(void 0,d))):o.push(y(void 0,i))}const p=a?2:p0(t.children)?3:1;let m=er(o.concat(vs("_",qt(p+"",!1))),s);return r.length&&(m=Rs(e.helper(XI),[m,h1(r)])),{slots:m,hasDynamicSlots:a}}function xv(t,e,n){const i=[vs("name",t),vs("fn",e)];return n!=null&&i.push(vs("key",qt(String(n),!0))),er(i)}function p0(t){for(let e=0;e<t.length;e++){const n=t[e];switch(n.type){case 1:if(n.tagType===2||p0(n.children))return!0;break;case 9:if(p0(n.branches))return!0;break;case 10:case 11:if(p0(n.children))return!0;break}}return!1}function mL(t){return t.type!==2&&t.type!==12?!0:t.type===2?!!t.content.trim():mL(t.content)}const gL=new WeakMap,pX=(t,e)=>function(){if(t=e.currentNode,!(t.type===1&&(t.tagType===0||t.tagType===1)))return;const{tag:i,props:s}=t,o=t.tagType===1;let r=o?mX(t,e):`"${i}"`;const a=yt(r)&&r.callee===wx;let l,c,u,d=0,h,f,p,m=a||r===Im||r===gx||!o&&(i==="svg"||i==="foreignObject");if(s.length>0){const y=vL(t,e,void 0,o,a);l=y.props,d=y.patchFlag,f=y.dynamicPropNames;const b=y.directives;p=b&&b.length?h1(b.map(k=>vX(k,e))):void 0,y.shouldUseBlock&&(m=!0)}if(t.children.length>0)if(r===V_&&(m=!0,d|=1024),o&&r!==Im&&r!==V_){const{slots:b,hasDynamicSlots:k}=fX(t,e);c=b,k&&(d|=1024)}else if(t.children.length===1&&r!==Im){const b=t.children[0],k=b.type,C=k===5||k===8;C&&tr(b,e)===0&&(d|=1),C||k===2?c=b:c=t.children}else c=t.children;d!==0&&(u=String(d),f&&f.length&&(h=_X(f))),t.codegenNode=vg(e,r,l,c,u,h,p,!!m,!1,o,t.loc)};function mX(t,e,n=!1){let{tag:i}=t;const s=ck(i),o=rb(t,"is",!1,!0);if(o)if(s||Uu("COMPILER_IS_ON_ELEMENT",e)){let a;if(o.type===6?a=o.value&&qt(o.value.content,!0):(a=o.exp,a||(a=qt("is",!1,o.loc))),a)return Rs(e.helper(wx),[a])}else o.type===6&&o.value.content.startsWith("vue:")&&(i=o.value.content.slice(4));const r=JI(i)||e.isBuiltInComponent(i);return r?(n||e.helper(r),r):(e.helper(bx),e.components.add(i),yg(i,"component"))}function vL(t,e,n=t.props,i,s,o=!1){const{tag:r,loc:a,children:l}=t;let c=[];const u=[],d=[],h=l.length>0;let f=!1,p=0,m=!1,y=!1,b=!1,k=!1,C=!1,$=!1;const x=[],M=I=>{c.length&&(u.push(er(F9(c),a)),c=[]),I&&u.push(I)},P=({key:I,value:L})=>{if(so(I)){const R=I.content,V=wd(R);if(V&&(!i||s)&&R.toLowerCase()!=="onclick"&&R!=="onUpdate:modelValue"&&!hc(R)&&(k=!0),V&&hc(R)&&($=!0),V&&L.type===14&&(L=L.arguments[0]),L.type===20||(L.type===4||L.type===8)&&tr(L,e)>0)return;R==="ref"?m=!0:R==="class"?y=!0:R==="style"?b=!0:R!=="key"&&!x.includes(R)&&x.push(R),i&&(R==="class"||R==="style")&&!x.includes(R)&&x.push(R)}else C=!0};for(let I=0;I<n.length;I++){const L=n[I];if(L.type===6){const{loc:R,name:V,nameLoc:H,value:F}=L;let z=!0;if(V==="ref"&&(m=!0,e.scopes.vFor>0&&c.push(vs(qt("ref_for",!0),qt("true")))),V==="is"&&(ck(r)||F&&F.content.startsWith("vue:")||Uu("COMPILER_IS_ON_ELEMENT",e)))continue;c.push(vs(qt(V,!0,H),qt(F?F.content:"",z,F?F.loc:R)))}else{const{name:R,arg:V,exp:H,loc:F,modifiers:z}=L,N=R==="bind",q=R==="on";if(R==="slot"){i||e.onError(rs(40,F));continue}if(R==="once"||R==="memo"||R==="is"||N&&$u(V,"is")&&(ck(r)||Uu("COMPILER_IS_ON_ELEMENT",e))||q&&o)continue;if((N&&$u(V,"key")||q&&h&&$u(V,"vue:before-update"))&&(f=!0),N&&$u(V,"ref")&&e.scopes.vFor>0&&c.push(vs(qt("ref_for",!0),qt("true"))),!V&&(N||q)){if(C=!0,H)if(N){if(M(),Uu("COMPILER_V_BIND_OBJECT_ORDER",e)){u.unshift(H);continue}u.push(H)}else M({type:14,loc:F,callee:e.helper(Ex),arguments:i?[H]:[H,"true"]});else e.onError(rs(N?34:35,F));continue}N&&z.includes("prop")&&(p|=32);const K=e.directiveTransforms[R];if(K){const{props:X,needRuntime:U}=K(L,t,e);!o&&X.forEach(P),q&&V&&!so(V)?M(er(X,a)):c.push(...X),U&&(d.push(L),cr(U)&&gL.set(L,U))}else tW(R)||(d.push(L),h&&(f=!0))}}let T;if(u.length?(M(),u.length>1?T=Rs(e.helper(F_),u,a):T=u[0]):c.length&&(T=er(F9(c),a)),C?p|=16:(y&&!i&&(p|=2),b&&!i&&(p|=4),x.length&&(p|=8),k&&(p|=32)),!f&&(p===0||p===32)&&(m||$||d.length>0)&&(p|=512),!e.inSSR&&T)switch(T.type){case 15:let I=-1,L=-1,R=!1;for(let F=0;F<T.properties.length;F++){const z=T.properties[F].key;so(z)?z.content==="class"?I=F:z.content==="style"&&(L=F):z.isHandlerKey||(R=!0)}const V=T.properties[I],H=T.properties[L];R?T=Rs(e.helper(gg),[T]):(V&&!so(V.value)&&(V.value=Rs(e.helper($x),[V.value])),H&&(b||H.value.type===4&&H.value.content.trim()[0]==="["||H.value.type===17)&&(H.value=Rs(e.helper(Ax),[H.value])));break;case 14:break;default:T=Rs(e.helper(gg),[Rs(e.helper(d1),[T])]);break}return{props:T,directives:d,patchFlag:p,dynamicPropNames:x,shouldUseBlock:f}}function F9(t){const e=new Map,n=[];for(let i=0;i<t.length;i++){const s=t[i];if(s.key.type===8||!s.key.isStatic){n.push(s);continue}const o=s.key.content,r=e.get(o);r?(o==="style"||o==="class"||wd(o))&&gX(r,s):(e.set(o,s),n.push(s))}return n}function gX(t,e){t.value.type===17?t.value.elements.push(e.value):t.value=h1([t.value,e.value],t.loc)}function vX(t,e){const n=[],i=gL.get(t);i?n.push(e.helperString(i)):(e.helper(kx),e.directives.add(t.name),n.push(yg(t.name,"directive")));const{loc:s}=t;if(t.exp&&n.push(t.exp),t.arg&&(t.exp||n.push("void 0"),n.push(t.arg)),Object.keys(t.modifiers).length){t.arg||(t.exp||n.push("void 0"),n.push("void 0"));const o=qt("true",!1,s);n.push(er(t.modifiers.map(r=>vs(r,o)),s))}return h1(n,t.loc)}function _X(t){let e="[";for(let n=0,i=t.length;n<i;n++)e+=JSON.stringify(t[n]),n<i-1&&(e+=", ");return e+"]"}function ck(t){return t==="component"||t==="Component"}const yX=(t,e)=>{if(H_(t)){const{children:n,loc:i}=t,{slotName:s,slotProps:o}=bX(t,e),r=[e.prefixIdentifiers?"_ctx.$slots":"$slots",s,"{}","undefined","true"];let a=2;o&&(r[2]=o,a=3),n.length&&(r[3]=gf([],n,!1,!1,i),a=4),e.scopeId&&!e.slotted&&(a=5),r.splice(a),t.codegenNode=Rs(e.helper(GI),r,i)}};function bX(t,e){let n='"default"',i;const s=[];for(let o=0;o<t.props.length;o++){const r=t.props[o];if(r.type===6)r.value&&(r.name==="name"?n=JSON.stringify(r.value.content):(r.name=es(r.name),s.push(r)));else if(r.name==="bind"&&$u(r.arg,"name")){if(r.exp)n=r.exp;else if(r.arg&&r.arg.type===4){const a=es(r.arg.content);n=r.exp=qt(a,!1,r.arg.loc)}}else r.name==="bind"&&r.arg&&so(r.arg)&&(r.arg.content=es(r.arg.content)),s.push(r)}if(s.length>0){const{props:o,directives:r}=vL(t,e,s,!1,!1);i=o,r.length&&e.onError(rs(36,r[0].loc))}return{slotName:n,slotProps:i}}const wX=/^\s*([\w$_]+|(async\s*)?\([^)]*?\))\s*(:[^=]+)?=>|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/,_L=(t,e,n,i)=>{const{loc:s,modifiers:o,arg:r}=t;!t.exp&&!o.length&&n.onError(rs(35,s));let a;if(r.type===4)if(r.isStatic){let d=r.content;d.startsWith("vue:")&&(d=`vnode-${d.slice(4)}`);const h=e.tagType!==0||d.startsWith("vnode")||!/[A-Z]/.test(d)?Fu(es(d)):`on:${d}`;a=qt(h,!0,r.loc)}else a=Er([`${n.helperString(ik)}(`,r,")"]);else a=r,a.children.unshift(`${n.helperString(ik)}(`),a.children.push(")");let l=t.exp;l&&!l.content.trim()&&(l=void 0);let c=n.cacheHandlers&&!l&&!n.inVOnce;if(l){const d=QI(l.content),h=!(d||wX.test(l.content)),f=l.content.includes(";");(h||c&&d)&&(l=Er([`${h?"$event":"(...args)"} => ${f?"{":"("}`,l,f?"}":")"]))}let u={props:[vs(a,l||qt("() => {}",!1,s))]};return i&&(u=i(u)),c&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach(d=>d.key.isHandlerKey=!0),u},kX=(t,e,n)=>{const{modifiers:i,loc:s}=t,o=t.arg;let{exp:r}=t;if(r&&r.type===4&&!r.content.trim()&&(r=void 0),!r){if(o.type!==4||!o.isStatic)return n.onError(rs(52,o.loc)),{props:[vs(o,qt("",!0,s))]};const a=es(o.content);r=t.exp=qt(a,!1,o.loc)}return o.type!==4?(o.children.unshift("("),o.children.push(') || ""')):o.isStatic||(o.content=`${o.content} || ""`),i.includes("camel")&&(o.type===4?o.isStatic?o.content=es(o.content):o.content=`${n.helperString(sk)}(${o.content})`:(o.children.unshift(`${n.helperString(sk)}(`),o.children.push(")"))),n.inSSR||(i.includes("prop")&&N9(o,"."),i.includes("attr")&&N9(o,"^")),{props:[vs(o,r)]}},N9=(t,e)=>{t.type===4?t.isStatic?t.content=e+t.content:t.content=`\`${e}\${${t.content}}\``:(t.children.unshift(`'${e}' + (`),t.children.push(")"))},CX=(t,e)=>{if(t.type===0||t.type===1||t.type===11||t.type===10)return()=>{const n=t.children;let i,s=!1;for(let o=0;o<n.length;o++){const r=n[o];if(H2(r)){s=!0;for(let a=o+1;a<n.length;a++){const l=n[a];if(H2(l))i||(i=n[o]=Er([r],r.loc)),i.children.push(" + ",l),n.splice(a,1),a--;else{i=void 0;break}}}}if(!(!s||n.length===1&&(t.type===0||t.type===1&&t.tagType===0&&!t.props.find(o=>o.type===7&&!e.directiveTransforms[o.name])&&t.tag!=="template")))for(let o=0;o<n.length;o++){const r=n[o];if(H2(r)||r.type===8){const a=[];(r.type!==2||r.content!==" ")&&a.push(r),!e.ssr&&tr(r,e)===0&&a.push("1"),n[o]={type:12,content:r,loc:r.loc,codegenNode:Rs(e.helper(yx),a)}}}}},B9=new WeakSet,xX=(t,e)=>{if(t.type===1&&wr(t,"once",!0))return B9.has(t)||e.inVOnce||e.inSSR?void 0:(B9.add(t),e.inVOnce=!0,e.helper(N_),()=>{e.inVOnce=!1;const n=e.currentNode;n.codegenNode&&(n.codegenNode=e.cache(n.codegenNode,!0))})},yL=(t,e,n)=>{const{exp:i,arg:s}=t;if(!i)return n.onError(rs(41,t.loc)),Sv();const o=i.loc.source,r=i.type===4?i.content:o,a=n.bindingMetadata[o];if(a==="props"||a==="props-aliased")return n.onError(rs(44,i.loc)),Sv();const l=!1;if(!r.trim()||!QI(r)&&!l)return n.onError(rs(42,i.loc)),Sv();const c=s||qt("modelValue",!0),u=s?so(s)?`onUpdate:${es(s.content)}`:Er(['"onUpdate:" + ',s]):"onUpdate:modelValue";let d;const h=n.isTS?"($event: any)":"$event";d=Er([`${h} => ((`,i,") = $event)"]);const f=[vs(c,t.exp),vs(u,d)];if(t.modifiers.length&&e.tagType===1){const p=t.modifiers.map(y=>(Lx(y)?y:JSON.stringify(y))+": true").join(", "),m=s?so(s)?`${s.content}Modifiers`:Er([s,' + "Modifiers"']):"modelModifiers";f.push(vs(m,qt(`{ ${p} }`,!1,t.loc,2)))}return Sv(f)};function Sv(t=[]){return{props:t}}const SX=/[\w).+\-_$\]]/,$X=(t,e)=>{Uu("COMPILER_FILTERS",e)&&(t.type===5&&W_(t.content,e),t.type===1&&t.props.forEach(n=>{n.type===7&&n.name!=="for"&&n.exp&&W_(n.exp,e)}))};function W_(t,e){if(t.type===4)z9(t,e);else for(let n=0;n<t.children.length;n++){const i=t.children[n];typeof i=="object"&&(i.type===4?z9(i,e):i.type===8?W_(t,e):i.type===5&&W_(i.content,e))}}function z9(t,e){const n=t.content;let i=!1,s=!1,o=!1,r=!1,a=0,l=0,c=0,u=0,d,h,f,p,m=[];for(f=0;f<n.length;f++)if(h=d,d=n.charCodeAt(f),i)d===39&&h!==92&&(i=!1);else if(s)d===34&&h!==92&&(s=!1);else if(o)d===96&&h!==92&&(o=!1);else if(r)d===47&&h!==92&&(r=!1);else if(d===124&&n.charCodeAt(f+1)!==124&&n.charCodeAt(f-1)!==124&&!a&&!l&&!c)p===void 0?(u=f+1,p=n.slice(0,f).trim()):y();else{switch(d){case 34:s=!0;break;case 39:i=!0;break;case 96:o=!0;break;case 40:c++;break;case 41:c--;break;case 91:l++;break;case 93:l--;break;case 123:a++;break;case 125:a--;break}if(d===47){let b=f-1,k;for(;b>=0&&(k=n.charAt(b),k===" ");b--);(!k||!SX.test(k))&&(r=!0)}}p===void 0?p=n.slice(0,f).trim():u!==0&&y();function y(){m.push(n.slice(u,f).trim()),u=f+1}if(m.length){for(f=0;f<m.length;f++)p=AX(p,m[f],e);t.content=p}}function AX(t,e,n){n.helper(Cx);const i=e.indexOf("(");if(i<0)return n.filters.add(e),`${yg(e,"filter")}(${t})`;{const s=e.slice(0,i),o=e.slice(i+1);return n.filters.add(s),`${yg(s,"filter")}(${t}${o!==")"?","+o:o}`}}const H9=new WeakSet,EX=(t,e)=>{if(t.type===1){const n=wr(t,"memo");return!n||H9.has(t)?void 0:(H9.add(t),()=>{const i=t.codegenNode||e.currentNode.codegenNode;i&&i.type===13&&(t.tagType!==1&&Px(i,e),t.codegenNode=Rs(e.helper(Tx),[n.exp,gf(void 0,i),"_cache",String(e.cached++)]))})}};function MX(t){return[[xX,oX,EX,lX,$X,yX,pX,dX,CX],{on:_L,bind:kX,model:yL}]}function TX(t,e={}){const n=e.onError||Ix,i=e.mode==="module";e.prefixIdentifiers===!0?n(rs(47)):i&&n(rs(48));const s=!1;e.cacheHandlers&&n(rs(49)),e.scopeId&&!i&&n(rs(50));const o=yn({},e,{prefixIdentifiers:s}),r=Ke(t)?RG(t,o):t,[a,l]=MX();return BG(r,yn({},o,{nodeTransforms:[...a,...e.nodeTransforms||[]],directiveTransforms:yn({},l,e.directiveTransforms||{})})),jG(r,o)}const PX=()=>({props:[]});/**
* @vue/compiler-dom v3.4.23
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const bL=Symbol(""),wL=Symbol(""),kL=Symbol(""),CL=Symbol(""),uk=Symbol(""),xL=Symbol(""),SL=Symbol(""),$L=Symbol(""),AL=Symbol(""),EL=Symbol("");uG({[bL]:"vModelRadio",[wL]:"vModelCheckbox",[kL]:"vModelText",[CL]:"vModelSelect",[uk]:"vModelDynamic",[xL]:"withModifiers",[SL]:"withKeys",[$L]:"vShow",[AL]:"Transition",[EL]:"TransitionGroup"});let Gd;function IX(t,e=!1){return Gd||(Gd=document.createElement("div")),e?(Gd.innerHTML=`<div foo="${t.replace(/"/g,"&quot;")}">`,Gd.children[0].getAttribute("foo")):(Gd.innerHTML=t,Gd.textContent)}const LX={parseMode:"html",isVoidTag:gW,isNativeTag:t=>fW(t)||pW(t)||mW(t),isPreTag:t=>t==="pre",decodeEntities:IX,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return AL;if(t==="TransitionGroup"||t==="transition-group")return EL},getNamespace(t,e,n){let i=e?e.ns:n;if(e&&i===2)if(e.tag==="annotation-xml"){if(t==="svg")return 1;e.props.some(s=>s.type===6&&s.name==="encoding"&&s.value!=null&&(s.value.content==="text/html"||s.value.content==="application/xhtml+xml"))&&(i=0)}else/^m(?:[ions]|text)$/.test(e.tag)&&t!=="mglyph"&&t!=="malignmark"&&(i=0);else e&&i===1&&(e.tag==="foreignObject"||e.tag==="desc"||e.tag==="title")&&(i=0);if(i===0){if(t==="svg")return 1;if(t==="math")return 2}return i}},OX=t=>{t.type===1&&t.props.forEach((e,n)=>{e.type===6&&e.name==="style"&&e.value&&(t.props[n]={type:7,name:"bind",arg:qt("style",!0,e.loc),exp:DX(e.value.content,e.loc),modifiers:[],loc:e.loc})})},DX=(t,e)=>{const n=iP(t);return qt(JSON.stringify(n),!1,e,3)};function mc(t,e){return rs(t,e)}const RX=(t,e,n)=>{const{exp:i,loc:s}=t;return i||n.onError(mc(53,s)),e.children.length&&(n.onError(mc(54,s)),e.children.length=0),{props:[vs(qt("innerHTML",!0,s),i||qt("",!0))]}},VX=(t,e,n)=>{const{exp:i,loc:s}=t;return i||n.onError(mc(55,s)),e.children.length&&(n.onError(mc(56,s)),e.children.length=0),{props:[vs(qt("textContent",!0),i?tr(i,n)>0?i:Rs(n.helperString(ob),[i],s):qt("",!0))]}},FX=(t,e,n)=>{const i=yL(t,e,n);if(!i.props.length||e.tagType===1)return i;t.arg&&n.onError(mc(58,t.arg.loc));const{tag:s}=e,o=n.isCustomElement(s);if(s==="input"||s==="textarea"||s==="select"||o){let r=kL,a=!1;if(s==="input"||o){const l=rb(e,"type");if(l){if(l.type===7)r=uk;else if(l.value)switch(l.value.content){case"radio":r=bL;break;case"checkbox":r=wL;break;case"file":a=!0,n.onError(mc(59,t.loc));break}}else bG(e)&&(r=uk)}else s==="select"&&(r=CL);a||(i.needRuntime=n.helper(r))}else n.onError(mc(57,t.loc));return i.props=i.props.filter(r=>!(r.key.type===4&&r.key.content==="modelValue")),i},NX=Ro("passive,once,capture"),BX=Ro("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),zX=Ro("left,right"),ML=Ro("onkeyup,onkeydown,onkeypress",!0),HX=(t,e,n,i)=>{const s=[],o=[],r=[];for(let a=0;a<e.length;a++){const l=e[a];l==="native"&&_g("COMPILER_V_ON_NATIVE",n)||NX(l)?r.push(l):zX(l)?so(t)?ML(t.content)?s.push(l):o.push(l):(s.push(l),o.push(l)):BX(l)?o.push(l):s.push(l)}return{keyModifiers:s,nonKeyModifiers:o,eventOptionModifiers:r}},U9=(t,e)=>so(t)&&t.content.toLowerCase()==="onclick"?qt(e,!0):t.type!==4?Er(["(",t,`) === "onClick" ? "${e}" : (`,t,")"]):t,UX=(t,e,n)=>_L(t,e,n,i=>{const{modifiers:s}=t;if(!s.length)return i;let{key:o,value:r}=i.props[0];const{keyModifiers:a,nonKeyModifiers:l,eventOptionModifiers:c}=HX(o,s,n,t.loc);if(l.includes("right")&&(o=U9(o,"onContextmenu")),l.includes("middle")&&(o=U9(o,"onMouseup")),l.length&&(r=Rs(n.helper(xL),[r,JSON.stringify(l)])),a.length&&(!so(o)||ML(o.content))&&(r=Rs(n.helper(SL),[r,JSON.stringify(a)])),c.length){const u=c.map(Dc).join("");o=so(o)?qt(`${o.content}${u}`,!0):Er(["(",o,`) + "${u}"`])}return{props:[vs(o,r)]}}),jX=(t,e,n)=>{const{exp:i,loc:s}=t;return i||n.onError(mc(61,s)),{props:[],needRuntime:n.helper($L)}},WX=(t,e)=>{t.type===1&&t.tagType===0&&(t.tag==="script"||t.tag==="style")&&e.removeNode()},YX=[OX],qX={cloak:PX,html:RX,text:VX,model:FX,on:UX,show:jX};function GX(t,e={}){return TX(t,yn({},LX,e,{nodeTransforms:[WX,...YX,...e.nodeTransforms||[]],directiveTransforms:yn({},qX,e.directiveTransforms||{}),transformHoist:null}))}/**
* vue v3.4.23
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const j9=new WeakMap;function XX(t){let e=j9.get(t??xn);return e||(e=Object.create(null),j9.set(t??xn,e)),e}function KX(t,e){if(!Ke(t))if(t.nodeType)t=t.innerHTML;else return Tt;const n=t,i=XX(e),s=i[n];if(s)return s;if(t[0]==="#"){const l=document.querySelector(t);t=l?l.innerHTML:""}const o=yn({hoistStatic:!0,onError:void 0,onWarn:Tt},e);!o.isCustomElement&&typeof customElements<"u"&&(o.isCustomElement=l=>!!customElements.get(l));const{code:r}=GX(t,o),a=new Function("Vue",r)(iG);return a._rc=!0,i[n]=a}_I(KX);/*!
  * vue-router v4.3.2
  * (c) 2024 Eduardo San Martin Morote
  * @license MIT
  */const ph=typeof document<"u";function ZX(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const On=Object.assign;function j2(t,e){const n={};for(const i in e){const s=e[i];n[i]=Vr(s)?s.map(t):t(s)}return n}const Lm=()=>{},Vr=Array.isArray,TL=/#/g,JX=/&/g,QX=/\//g,eK=/=/g,tK=/\?/g,PL=/\+/g,nK=/%5B/g,sK=/%5D/g,IL=/%5E/g,iK=/%60/g,LL=/%7B/g,oK=/%7C/g,OL=/%7D/g,rK=/%20/g;function Dx(t){return encodeURI(""+t).replace(oK,"|").replace(nK,"[").replace(sK,"]")}function aK(t){return Dx(t).replace(LL,"{").replace(OL,"}").replace(IL,"^")}function dk(t){return Dx(t).replace(PL,"%2B").replace(rK,"+").replace(TL,"%23").replace(JX,"%26").replace(iK,"`").replace(LL,"{").replace(OL,"}").replace(IL,"^")}function lK(t){return dk(t).replace(eK,"%3D")}function cK(t){return Dx(t).replace(TL,"%23").replace(tK,"%3F")}function uK(t){return t==null?"":cK(t).replace(QX,"%2F")}function wg(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const dK=/\/$/,hK=t=>t.replace(dK,"");function W2(t,e,n="/"){let i,s={},o="",r="";const a=e.indexOf("#");let l=e.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(i=e.slice(0,l),o=e.slice(l+1,a>-1?a:e.length),s=t(o)),a>-1&&(i=i||e.slice(0,a),r=e.slice(a,e.length)),i=gK(i??e,n),{fullPath:i+(o&&"?")+o+r,path:i,query:s,hash:wg(r)}}function fK(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function W9(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function pK(t,e,n){const i=e.matched.length-1,s=n.matched.length-1;return i>-1&&i===s&&yf(e.matched[i],n.matched[s])&&DL(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function yf(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function DL(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!mK(t[n],e[n]))return!1;return!0}function mK(t,e){return Vr(t)?Y9(t,e):Vr(e)?Y9(e,t):t===e}function Y9(t,e){return Vr(e)?t.length===e.length&&t.every((n,i)=>n===e[i]):t.length===1&&t[0]===e}function gK(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),i=t.split("/"),s=i[i.length-1];(s===".."||s===".")&&i.push("");let o=n.length-1,r,a;for(r=0;r<i.length;r++)if(a=i[r],a!==".")if(a==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+i.slice(r).join("/")}var kg;(function(t){t.pop="pop",t.push="push"})(kg||(kg={}));var Om;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Om||(Om={}));function vK(t){if(!t)if(ph){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),hK(t)}const _K=/^[^#]+#/;function yK(t,e){return t.replace(_K,"#")+e}function bK(t,e){const n=document.documentElement.getBoundingClientRect(),i=t.getBoundingClientRect();return{behavior:e.behavior,left:i.left-n.left-(e.left||0),top:i.top-n.top-(e.top||0)}}const cb=()=>({left:window.scrollX,top:window.scrollY});function wK(t){let e;if("el"in t){const n=t.el,i=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?i?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;e=bK(s,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function q9(t,e){return(history.state?history.state.position-e:-1)+t}const hk=new Map;function kK(t,e){hk.set(t,e)}function CK(t){const e=hk.get(t);return hk.delete(t),e}let xK=()=>location.protocol+"//"+location.host;function RL(t,e){const{pathname:n,search:i,hash:s}=e,o=t.indexOf("#");if(o>-1){let a=s.includes(t.slice(o))?t.slice(o).length:1,l=s.slice(a);return l[0]!=="/"&&(l="/"+l),W9(l,"")}return W9(n,t)+i+s}function SK(t,e,n,i){let s=[],o=[],r=null;const a=({state:h})=>{const f=RL(t,location),p=n.value,m=e.value;let y=0;if(h){if(n.value=f,e.value=h,r&&r===p){r=null;return}y=m?h.position-m.position:0}else i(f);s.forEach(b=>{b(n.value,p,{delta:y,type:kg.pop,direction:y?y>0?Om.forward:Om.back:Om.unknown})})};function l(){r=n.value}function c(h){s.push(h);const f=()=>{const p=s.indexOf(h);p>-1&&s.splice(p,1)};return o.push(f),f}function u(){const{history:h}=window;h.state&&h.replaceState(On({},h.state,{scroll:cb()}),"")}function d(){for(const h of o)h();o=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function G9(t,e,n,i=!1,s=!1){return{back:t,current:e,forward:n,replaced:i,position:window.history.length,scroll:s?cb():null}}function $K(t){const{history:e,location:n}=window,i={value:RL(t,n)},s={value:e.state};s.value||o(i.value,{back:null,current:i.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function o(l,c,u){const d=t.indexOf("#"),h=d>-1?(n.host&&document.querySelector("base")?t:t.slice(d))+l:xK()+t+l;try{e[u?"replaceState":"pushState"](c,"",h),s.value=c}catch(f){console.error(f),n[u?"replace":"assign"](h)}}function r(l,c){const u=On({},e.state,G9(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});o(l,u,!0),i.value=l}function a(l,c){const u=On({},s.value,e.state,{forward:l,scroll:cb()});o(u.current,u,!0);const d=On({},G9(i.value,l,null),{position:u.position+1},c);o(l,d,!1),i.value=l}return{location:i,state:s,push:a,replace:r}}function VL(t){t=vK(t);const e=$K(t),n=SK(t,e.state,e.location,e.replace);function i(o,r=!0){r||n.pauseListeners(),history.go(o)}const s=On({location:"",base:t,go:i,createHref:yK.bind(null,t)},e,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>e.state.value}),s}function AK(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),VL(t)}function EK(t){return typeof t=="string"||t&&typeof t=="object"}function FL(t){return typeof t=="string"||typeof t=="symbol"}const Al={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},NL=Symbol("");var X9;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(X9||(X9={}));function bf(t,e){return On(new Error,{type:t,[NL]:!0},e)}function Da(t,e){return t instanceof Error&&NL in t&&(e==null||!!(t.type&e))}const K9="[^/]+?",MK={sensitive:!1,strict:!1,start:!0,end:!0},TK=/[.+*?^${}()[\]/\\]/g;function PK(t,e){const n=On({},MK,e),i=[];let s=n.start?"^":"";const o=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(s+="/");for(let d=0;d<c.length;d++){const h=c[d];let f=40+(n.sensitive?.25:0);if(h.type===0)d||(s+="/"),s+=h.value.replace(TK,"\\$&"),f+=40;else if(h.type===1){const{value:p,repeatable:m,optional:y,regexp:b}=h;o.push({name:p,repeatable:m,optional:y});const k=b||K9;if(k!==K9){f+=10;try{new RegExp(`(${k})`)}catch($){throw new Error(`Invalid custom RegExp for param "${p}" (${k}): `+$.message)}}let C=m?`((?:${k})(?:/(?:${k}))*)`:`(${k})`;d||(C=y&&c.length<2?`(?:/${C})`:"/"+C),y&&(C+="?"),s+=C,f+=20,y&&(f+=-8),m&&(f+=-20),k===".*"&&(f+=-50)}u.push(f)}i.push(u)}if(n.strict&&n.end){const c=i.length-1;i[c][i[c].length-1]+=.7000000000000001}n.strict||(s+="/?"),n.end?s+="$":n.strict&&(s+="(?:/|$)");const r=new RegExp(s,n.sensitive?"":"i");function a(c){const u=c.match(r),d={};if(!u)return null;for(let h=1;h<u.length;h++){const f=u[h]||"",p=o[h-1];d[p.name]=f&&p.repeatable?f.split("/"):f}return d}function l(c){let u="",d=!1;for(const h of t){(!d||!u.endsWith("/"))&&(u+="/"),d=!1;for(const f of h)if(f.type===0)u+=f.value;else if(f.type===1){const{value:p,repeatable:m,optional:y}=f,b=p in c?c[p]:"";if(Vr(b)&&!m)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const k=Vr(b)?b.join("/"):b;if(!k)if(y)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${p}"`);u+=k}}return u||"/"}return{re:r,score:i,keys:o,parse:a,stringify:l}}function IK(t,e){let n=0;for(;n<t.length&&n<e.length;){const i=e[n]-t[n];if(i)return i;n++}return t.length<e.length?t.length===1&&t[0]===40+40?-1:1:t.length>e.length?e.length===1&&e[0]===40+40?1:-1:0}function LK(t,e){let n=0;const i=t.score,s=e.score;for(;n<i.length&&n<s.length;){const o=IK(i[n],s[n]);if(o)return o;n++}if(Math.abs(s.length-i.length)===1){if(Z9(i))return 1;if(Z9(s))return-1}return s.length-i.length}function Z9(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const OK={type:0,value:""},DK=/[a-zA-Z0-9_]/;function RK(t){if(!t)return[[]];if(t==="/")return[[OK]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(f){throw new Error(`ERR (${n})/"${c}": ${f}`)}let n=0,i=n;const s=[];let o;function r(){o&&s.push(o),o=[]}let a=0,l,c="",u="";function d(){c&&(n===0?o.push({type:0,value:c}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function h(){c+=l}for(;a<t.length;){if(l=t[a++],l==="\\"&&n!==2){i=n,n=4;continue}switch(n){case 0:l==="/"?(c&&d(),r()):l===":"?(d(),n=1):h();break;case 4:h(),n=i;break;case 1:l==="("?n=2:DK.test(l)?h():(d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--);break;case 2:l===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+l:n=3:u+=l;break;case 3:d(),n=0,l!=="*"&&l!=="?"&&l!=="+"&&a--,u="";break;default:e("Unknown state");break}}return n===2&&e(`Unfinished custom RegExp for param "${c}"`),d(),r(),s}function VK(t,e,n){const i=PK(RK(t.path),n),s=On(i,{record:t,parent:e,children:[],alias:[]});return e&&!s.record.aliasOf==!e.record.aliasOf&&e.children.push(s),s}function FK(t,e){const n=[],i=new Map;e=e7({strict:!1,end:!0,sensitive:!1},e);function s(u){return i.get(u)}function o(u,d,h){const f=!h,p=NK(u);p.aliasOf=h&&h.record;const m=e7(e,u),y=[p];if("alias"in u){const C=typeof u.alias=="string"?[u.alias]:u.alias;for(const $ of C)y.push(On({},p,{components:h?h.record.components:p.components,path:$,aliasOf:h?h.record:p}))}let b,k;for(const C of y){const{path:$}=C;if(d&&$[0]!=="/"){const x=d.record.path,M=x[x.length-1]==="/"?"":"/";C.path=d.record.path+($&&M+$)}if(b=VK(C,d,m),h?h.alias.push(b):(k=k||b,k!==b&&k.alias.push(b),f&&u.name&&!Q9(b)&&r(u.name)),p.children){const x=p.children;for(let M=0;M<x.length;M++)o(x[M],b,h&&h.children[M])}h=h||b,(b.record.components&&Object.keys(b.record.components).length||b.record.name||b.record.redirect)&&l(b)}return k?()=>{r(k)}:Lm}function r(u){if(FL(u)){const d=i.get(u);d&&(i.delete(u),n.splice(n.indexOf(d),1),d.children.forEach(r),d.alias.forEach(r))}else{const d=n.indexOf(u);d>-1&&(n.splice(d,1),u.record.name&&i.delete(u.record.name),u.children.forEach(r),u.alias.forEach(r))}}function a(){return n}function l(u){let d=0;for(;d<n.length&&LK(u,n[d])>=0&&(u.record.path!==n[d].record.path||!BL(u,n[d]));)d++;n.splice(d,0,u),u.record.name&&!Q9(u)&&i.set(u.record.name,u)}function c(u,d){let h,f={},p,m;if("name"in u&&u.name){if(h=i.get(u.name),!h)throw bf(1,{location:u});m=h.record.name,f=On(J9(d.params,h.keys.filter(k=>!k.optional).concat(h.parent?h.parent.keys.filter(k=>k.optional):[]).map(k=>k.name)),u.params&&J9(u.params,h.keys.map(k=>k.name))),p=h.stringify(f)}else if(u.path!=null)p=u.path,h=n.find(k=>k.re.test(p)),h&&(f=h.parse(p),m=h.record.name);else{if(h=d.name?i.get(d.name):n.find(k=>k.re.test(d.path)),!h)throw bf(1,{location:u,currentLocation:d});m=h.record.name,f=On({},d.params,u.params),p=h.stringify(f)}const y=[];let b=h;for(;b;)y.unshift(b.record),b=b.parent;return{name:m,path:p,params:f,matched:y,meta:zK(y)}}return t.forEach(u=>o(u)),{addRoute:o,resolve:c,removeRoute:r,getRoutes:a,getRecordMatcher:s}}function J9(t,e){const n={};for(const i of e)i in t&&(n[i]=t[i]);return n}function NK(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:BK(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function BK(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const i in t.components)e[i]=typeof n=="object"?n[i]:n;return e}function Q9(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function zK(t){return t.reduce((e,n)=>On(e,n.meta),{})}function e7(t,e){const n={};for(const i in t)n[i]=i in e?e[i]:t[i];return n}function BL(t,e){return e.children.some(n=>n===t||BL(t,n))}function HK(t){const e={};if(t===""||t==="?")return e;const i=(t[0]==="?"?t.slice(1):t).split("&");for(let s=0;s<i.length;++s){const o=i[s].replace(PL," "),r=o.indexOf("="),a=wg(r<0?o:o.slice(0,r)),l=r<0?null:wg(o.slice(r+1));if(a in e){let c=e[a];Vr(c)||(c=e[a]=[c]),c.push(l)}else e[a]=l}return e}function t7(t){let e="";for(let n in t){const i=t[n];if(n=lK(n),i==null){i!==void 0&&(e+=(e.length?"&":"")+n);continue}(Vr(i)?i.map(o=>o&&dk(o)):[i&&dk(i)]).forEach(o=>{o!==void 0&&(e+=(e.length?"&":"")+n,o!=null&&(e+="="+o))})}return e}function UK(t){const e={};for(const n in t){const i=t[n];i!==void 0&&(e[n]=Vr(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const jK=Symbol(""),n7=Symbol(""),Rx=Symbol(""),zL=Symbol(""),fk=Symbol("");function Ip(){let t=[];function e(i){return t.push(i),()=>{const s=t.indexOf(i);s>-1&&t.splice(s,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function Zl(t,e,n,i,s,o=r=>r()){const r=i&&(i.enterCallbacks[s]=i.enterCallbacks[s]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(bf(4,{from:n,to:e})):h instanceof Error?l(h):EK(h)?l(bf(2,{from:e,to:h})):(r&&i.enterCallbacks[s]===r&&typeof h=="function"&&r.push(h),a())},u=o(()=>t.call(i&&i.instances[s],e,n,c));let d=Promise.resolve(u);t.length<3&&(d=d.then(c)),d.catch(h=>l(h))})}function Y2(t,e,n,i,s=o=>o()){const o=[];for(const r of t)for(const a in r.components){let l=r.components[a];if(!(e!=="beforeRouteEnter"&&!r.instances[a]))if(WK(l)){const u=(l.__vccOpts||l)[e];u&&o.push(Zl(u,n,i,r,a,s))}else{let c=l();o.push(()=>c.then(u=>{if(!u)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${r.path}"`));const d=ZX(u)?u.default:u;r.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&Zl(f,n,i,r,a,s)()}))}}return o}function WK(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function s7(t){const e=qe(Rx),n=qe(zL),i=Y(()=>{const l=E(t.to);return e.resolve(l)}),s=Y(()=>{const{matched:l}=i.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const h=d.findIndex(yf.bind(null,u));if(h>-1)return h;const f=i7(l[c-2]);return c>1&&i7(u)===f&&d[d.length-1].path!==f?d.findIndex(yf.bind(null,l[c-2])):h}),o=Y(()=>s.value>-1&&XK(n.params,i.value.params)),r=Y(()=>s.value>-1&&s.value===n.matched.length-1&&DL(n.params,i.value.params));function a(l={}){return GK(l)?e[E(t.replace)?"replace":"push"](E(t.to)).catch(Lm):Promise.resolve()}return{route:i,href:Y(()=>i.value.href),isActive:o,isExactActive:r,navigate:a}}const YK=ce({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:s7,setup(t,{slots:e}){const n=In(s7(t)),{options:i}=qe(Rx),s=Y(()=>({[o7(t.activeClass,i.linkActiveClass,"router-link-active")]:n.isActive,[o7(t.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=e.default&&e.default(n);return t.custom?o:vt("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),qK=YK;function GK(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function XK(t,e){for(const n in e){const i=e[n],s=t[n];if(typeof i=="string"){if(i!==s)return!1}else if(!Vr(s)||s.length!==i.length||i.some((o,r)=>o!==s[r]))return!1}return!0}function i7(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const o7=(t,e,n)=>t??e??n,KK=ce({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const i=qe(fk),s=Y(()=>t.route||i.value),o=qe(n7,0),r=Y(()=>{let c=E(o);const{matched:u}=s.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=Y(()=>s.value.matched[r.value]);It(n7,Y(()=>r.value+1)),It(jK,a),It(fk,s);const l=J();return Te(()=>[l.value,a.value,t.name],([c,u,d],[h,f,p])=>{u&&(u.instances[d]=c,f&&f!==u&&c&&c===h&&(u.leaveGuards.size||(u.leaveGuards=f.leaveGuards),u.updateGuards.size||(u.updateGuards=f.updateGuards))),c&&u&&(!f||!yf(u,f)||!h)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=s.value,u=t.name,d=a.value,h=d&&d.components[u];if(!h)return r7(n.default,{Component:h,route:c});const f=d.props[u],p=f?f===!0?c.params:typeof f=="function"?f(c):f:null,y=vt(h,On({},p,e,{onVnodeUnmounted:b=>{b.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return r7(n.default,{Component:y,route:c})||y}}});function r7(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const ZK=KK;function a7(t){const e=FK(t.routes,t),n=t.parseQuery||HK,i=t.stringifyQuery||t7,s=t.history,o=Ip(),r=Ip(),a=Ip(),l=Hn(Al);let c=Al;ph&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=j2.bind(null,oe=>""+oe),d=j2.bind(null,uK),h=j2.bind(null,wg);function f(oe,fe){let ie,re;return FL(oe)?(ie=e.getRecordMatcher(oe),re=fe):re=oe,e.addRoute(re,ie)}function p(oe){const fe=e.getRecordMatcher(oe);fe&&e.removeRoute(fe)}function m(){return e.getRoutes().map(oe=>oe.record)}function y(oe){return!!e.getRecordMatcher(oe)}function b(oe,fe){if(fe=On({},fe||l.value),typeof oe=="string"){const se=W2(n,oe,fe.path),ve=e.resolve({path:se.path},fe),$e=s.createHref(se.fullPath);return On(se,ve,{params:h(ve.params),hash:wg(se.hash),redirectedFrom:void 0,href:$e})}let ie;if(oe.path!=null)ie=On({},oe,{path:W2(n,oe.path,fe.path).path});else{const se=On({},oe.params);for(const ve in se)se[ve]==null&&delete se[ve];ie=On({},oe,{params:d(se)}),fe.params=d(fe.params)}const re=e.resolve(ie,fe),ke=oe.hash||"";re.params=u(h(re.params));const je=fK(i,On({},oe,{hash:aK(ke),path:re.path})),te=s.createHref(je);return On({fullPath:je,hash:ke,query:i===t7?UK(oe.query):oe.query||{}},re,{redirectedFrom:void 0,href:te})}function k(oe){return typeof oe=="string"?W2(n,oe,l.value.path):On({},oe)}function C(oe,fe){if(c!==oe)return bf(8,{from:fe,to:oe})}function $(oe){return P(oe)}function x(oe){return $(On(k(oe),{replace:!0}))}function M(oe){const fe=oe.matched[oe.matched.length-1];if(fe&&fe.redirect){const{redirect:ie}=fe;let re=typeof ie=="function"?ie(oe):ie;return typeof re=="string"&&(re=re.includes("?")||re.includes("#")?re=k(re):{path:re},re.params={}),On({query:oe.query,hash:oe.hash,params:re.path!=null?{}:oe.params},re)}}function P(oe,fe){const ie=c=b(oe),re=l.value,ke=oe.state,je=oe.force,te=oe.replace===!0,se=M(ie);if(se)return P(On(k(se),{state:typeof se=="object"?On({},ke,se.state):ke,force:je,replace:te}),fe||ie);const ve=ie;ve.redirectedFrom=fe;let $e;return!je&&pK(i,re,ie)&&($e=bf(16,{to:ve,from:re}),Q(re,re,!0,!1)),($e?Promise.resolve($e):L(ve,re)).catch(Se=>Da(Se)?Da(Se,2)?Se:U(Se):K(Se,ve,re)).then(Se=>{if(Se){if(Da(Se,2))return P(On({replace:te},k(Se.to),{state:typeof Se.to=="object"?On({},ke,Se.to.state):ke,force:je}),fe||ve)}else Se=V(ve,re,!0,te,ke);return R(ve,re,Se),Se})}function T(oe,fe){const ie=C(oe,fe);return ie?Promise.reject(ie):Promise.resolve()}function I(oe){const fe=ae.values().next().value;return fe&&typeof fe.runWithContext=="function"?fe.runWithContext(oe):oe()}function L(oe,fe){let ie;const[re,ke,je]=JK(oe,fe);ie=Y2(re.reverse(),"beforeRouteLeave",oe,fe);for(const se of re)se.leaveGuards.forEach(ve=>{ie.push(Zl(ve,oe,fe))});const te=T.bind(null,oe,fe);return ie.push(te),we(ie).then(()=>{ie=[];for(const se of o.list())ie.push(Zl(se,oe,fe));return ie.push(te),we(ie)}).then(()=>{ie=Y2(ke,"beforeRouteUpdate",oe,fe);for(const se of ke)se.updateGuards.forEach(ve=>{ie.push(Zl(ve,oe,fe))});return ie.push(te),we(ie)}).then(()=>{ie=[];for(const se of je)if(se.beforeEnter)if(Vr(se.beforeEnter))for(const ve of se.beforeEnter)ie.push(Zl(ve,oe,fe));else ie.push(Zl(se.beforeEnter,oe,fe));return ie.push(te),we(ie)}).then(()=>(oe.matched.forEach(se=>se.enterCallbacks={}),ie=Y2(je,"beforeRouteEnter",oe,fe,I),ie.push(te),we(ie))).then(()=>{ie=[];for(const se of r.list())ie.push(Zl(se,oe,fe));return ie.push(te),we(ie)}).catch(se=>Da(se,8)?se:Promise.reject(se))}function R(oe,fe,ie){a.list().forEach(re=>I(()=>re(oe,fe,ie)))}function V(oe,fe,ie,re,ke){const je=C(oe,fe);if(je)return je;const te=fe===Al,se=ph?history.state:{};ie&&(re||te?s.replace(oe.fullPath,On({scroll:te&&se&&se.scroll},ke)):s.push(oe.fullPath,ke)),l.value=oe,Q(oe,fe,ie,te),U()}let H;function F(){H||(H=s.listen((oe,fe,ie)=>{if(!me.listening)return;const re=b(oe),ke=M(re);if(ke){P(On(ke,{replace:!0}),re).catch(Lm);return}c=re;const je=l.value;ph&&kK(q9(je.fullPath,ie.delta),cb()),L(re,je).catch(te=>Da(te,12)?te:Da(te,2)?(P(te.to,re).then(se=>{Da(se,20)&&!ie.delta&&ie.type===kg.pop&&s.go(-1,!1)}).catch(Lm),Promise.reject()):(ie.delta&&s.go(-ie.delta,!1),K(te,re,je))).then(te=>{te=te||V(re,je,!1),te&&(ie.delta&&!Da(te,8)?s.go(-ie.delta,!1):ie.type===kg.pop&&Da(te,20)&&s.go(-1,!1)),R(re,je,te)}).catch(Lm)}))}let z=Ip(),N=Ip(),q;function K(oe,fe,ie){U(oe);const re=N.list();return re.length?re.forEach(ke=>ke(oe,fe,ie)):console.error(oe),Promise.reject(oe)}function X(){return q&&l.value!==Al?Promise.resolve():new Promise((oe,fe)=>{z.add([oe,fe])})}function U(oe){return q||(q=!oe,F(),z.list().forEach(([fe,ie])=>oe?ie(oe):fe()),z.reset()),oe}function Q(oe,fe,ie,re){const{scrollBehavior:ke}=t;if(!ph||!ke)return Promise.resolve();const je=!ie&&CK(q9(oe.fullPath,0))||(re||!ie)&&history.state&&history.state.scroll||null;return ot().then(()=>ke(oe,fe,je)).then(te=>te&&wK(te)).catch(te=>K(te,oe,fe))}const ne=oe=>s.go(oe);let Z;const ae=new Set,me={currentRoute:l,listening:!0,addRoute:f,removeRoute:p,hasRoute:y,getRoutes:m,resolve:b,options:t,push:$,replace:x,go:ne,back:()=>ne(-1),forward:()=>ne(1),beforeEach:o.add,beforeResolve:r.add,afterEach:a.add,onError:N.add,isReady:X,install(oe){const fe=this;oe.component("RouterLink",qK),oe.component("RouterView",ZK),oe.config.globalProperties.$router=fe,Object.defineProperty(oe.config.globalProperties,"$route",{enumerable:!0,get:()=>E(l)}),ph&&!Z&&l.value===Al&&(Z=!0,$(s.location).catch(ke=>{}));const ie={};for(const ke in Al)Object.defineProperty(ie,ke,{get:()=>l.value[ke],enumerable:!0});oe.provide(Rx,fe),oe.provide(zL,KC(ie)),oe.provide(fk,l);const re=oe.unmount;ae.add(oe),oe.unmount=function(){ae.delete(oe),ae.size<1&&(c=Al,H&&H(),H=null,l.value=Al,Z=!1,q=!1),re()}}};function we(oe){return oe.reduce((fe,ie)=>fe.then(()=>I(ie)),Promise.resolve())}return me}function JK(t,e){const n=[],i=[],s=[],o=Math.max(e.matched.length,t.matched.length);for(let r=0;r<o;r++){const a=e.matched[r];a&&(t.matched.find(c=>yf(c,a))?i.push(a):n.push(a));const l=t.matched[r];l&&(e.matched.find(c=>yf(c,l))||s.push(l))}return[n,i,s]}const Ue={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"},QK=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],Mt="update:modelValue",un="change",Po="input",hl=["","default","small","large"],Vx=11,eZ=2;var tZ=typeof global=="object"&&global&&global.Object===Object&&global;const HL=tZ;var nZ=typeof self=="object"&&self&&self.Object===Object&&self,sZ=HL||nZ||Function("return this")();const zr=sZ;var iZ=zr.Symbol;const dr=iZ;var UL=Object.prototype,oZ=UL.hasOwnProperty,rZ=UL.toString,Lp=dr?dr.toStringTag:void 0;function aZ(t){var e=oZ.call(t,Lp),n=t[Lp];try{t[Lp]=void 0;var i=!0}catch{}var s=rZ.call(t);return i&&(e?t[Lp]=n:delete t[Lp]),s}var lZ=Object.prototype,cZ=lZ.toString;function uZ(t){return cZ.call(t)}var dZ="[object Null]",hZ="[object Undefined]",l7=dr?dr.toStringTag:void 0;function Ad(t){return t==null?t===void 0?hZ:dZ:l7&&l7 in Object(t)?aZ(t):uZ(t)}function va(t){return t!=null&&typeof t=="object"}var fZ="[object Symbol]";function ub(t){return typeof t=="symbol"||va(t)&&Ad(t)==fZ}function Fx(t,e){for(var n=-1,i=t==null?0:t.length,s=Array(i);++n<i;)s[n]=e(t[n],n,t);return s}var pZ=Array.isArray;const Ni=pZ;var mZ=1/0,c7=dr?dr.prototype:void 0,u7=c7?c7.toString:void 0;function jL(t){if(typeof t=="string")return t;if(Ni(t))return Fx(t,jL)+"";if(ub(t))return u7?u7.call(t):"";var e=t+"";return e=="0"&&1/t==-mZ?"-0":e}var gZ=/\s/;function vZ(t){for(var e=t.length;e--&&gZ.test(t.charAt(e)););return e}var _Z=/^\s+/;function yZ(t){return t&&t.slice(0,vZ(t)+1).replace(_Z,"")}function Bi(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var d7=0/0,bZ=/^[-+]0x[0-9a-f]+$/i,wZ=/^0b[01]+$/i,kZ=/^0o[0-7]+$/i,CZ=parseInt;function Yh(t){if(typeof t=="number")return t;if(ub(t))return d7;if(Bi(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Bi(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=yZ(t);var n=wZ.test(t);return n||kZ.test(t)?CZ(t.slice(2),n?2:8):bZ.test(t)?d7:+t}var h7=1/0,xZ=17976931348623157e292;function SZ(t){if(!t)return t===0?t:0;if(t=Yh(t),t===h7||t===-h7){var e=t<0?-1:1;return e*xZ}return t===t?t:0}function $Z(t){var e=SZ(t),n=e%1;return e===e?n?e-n:e:0}function Nx(t){return t}var AZ="[object AsyncFunction]",EZ="[object Function]",MZ="[object GeneratorFunction]",TZ="[object Proxy]";function Bx(t){if(!Bi(t))return!1;var e=Ad(t);return e==EZ||e==MZ||e==AZ||e==TZ}var PZ=zr["__core-js_shared__"];const q2=PZ;var f7=function(){var t=/[^.]+$/.exec(q2&&q2.keys&&q2.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function IZ(t){return!!f7&&f7 in t}var LZ=Function.prototype,OZ=LZ.toString;function Ed(t){if(t!=null){try{return OZ.call(t)}catch{}try{return t+""}catch{}}return""}var DZ=/[\\^$.*+?()[\]{}|]/g,RZ=/^\[object .+?Constructor\]$/,VZ=Function.prototype,FZ=Object.prototype,NZ=VZ.toString,BZ=FZ.hasOwnProperty,zZ=RegExp("^"+NZ.call(BZ).replace(DZ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function HZ(t){if(!Bi(t)||IZ(t))return!1;var e=Bx(t)?zZ:RZ;return e.test(Ed(t))}function UZ(t,e){return t==null?void 0:t[e]}function Md(t,e){var n=UZ(t,e);return HZ(n)?n:void 0}var jZ=Md(zr,"WeakMap");const pk=jZ;var p7=Object.create,WZ=function(){function t(){}return function(e){if(!Bi(e))return{};if(p7)return p7(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();const YZ=WZ;function qZ(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function WL(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}var GZ=800,XZ=16,KZ=Date.now;function ZZ(t){var e=0,n=0;return function(){var i=KZ(),s=XZ-(i-n);if(n=i,s>0){if(++e>=GZ)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function JZ(t){return function(){return t}}var QZ=function(){try{var t=Md(Object,"defineProperty");return t({},"",{}),t}catch{}}();const Y_=QZ;var eJ=Y_?function(t,e){return Y_(t,"toString",{configurable:!0,enumerable:!1,value:JZ(e),writable:!0})}:Nx;const tJ=eJ;var nJ=ZZ(tJ);const YL=nJ;function sJ(t,e){for(var n=-1,i=t==null?0:t.length;++n<i&&e(t[n],n,t)!==!1;);return t}function iJ(t,e,n,i){for(var s=t.length,o=n+(i?1:-1);i?o--:++o<s;)if(e(t[o],o,t))return o;return-1}var oJ=9007199254740991,rJ=/^(?:0|[1-9]\d*)$/;function db(t,e){var n=typeof t;return e=e??oJ,!!e&&(n=="number"||n!="symbol"&&rJ.test(t))&&t>-1&&t%1==0&&t<e}function zx(t,e,n){e=="__proto__"&&Y_?Y_(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function p1(t,e){return t===e||t!==t&&e!==e}var aJ=Object.prototype,lJ=aJ.hasOwnProperty;function Hx(t,e,n){var i=t[e];(!(lJ.call(t,e)&&p1(i,n))||n===void 0&&!(e in t))&&zx(t,e,n)}function Xf(t,e,n,i){var s=!n;n||(n={});for(var o=-1,r=e.length;++o<r;){var a=e[o],l=i?i(n[a],t[a],a,n,t):void 0;l===void 0&&(l=t[a]),s?zx(n,a,l):Hx(n,a,l)}return n}var m7=Math.max;function qL(t,e,n){return e=m7(e===void 0?t.length-1:e,0),function(){for(var i=arguments,s=-1,o=m7(i.length-e,0),r=Array(o);++s<o;)r[s]=i[e+s];s=-1;for(var a=Array(e+1);++s<e;)a[s]=i[s];return a[e]=n(r),qZ(t,this,a)}}function cJ(t,e){return YL(qL(t,e,Nx),t+"")}var uJ=9007199254740991;function Ux(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=uJ}function Kf(t){return t!=null&&Ux(t.length)&&!Bx(t)}function dJ(t,e,n){if(!Bi(n))return!1;var i=typeof e;return(i=="number"?Kf(n)&&db(e,n.length):i=="string"&&e in n)?p1(n[e],t):!1}function hJ(t){return cJ(function(e,n){var i=-1,s=n.length,o=s>1?n[s-1]:void 0,r=s>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(s--,o):void 0,r&&dJ(n[0],n[1],r)&&(o=s<3?void 0:o,s=1),e=Object(e);++i<s;){var a=n[i];a&&t(e,a,i,o)}return e})}var fJ=Object.prototype;function jx(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||fJ;return t===n}function pJ(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}var mJ="[object Arguments]";function g7(t){return va(t)&&Ad(t)==mJ}var GL=Object.prototype,gJ=GL.hasOwnProperty,vJ=GL.propertyIsEnumerable,_J=g7(function(){return arguments}())?g7:function(t){return va(t)&&gJ.call(t,"callee")&&!vJ.call(t,"callee")};const Cg=_J;function yJ(){return!1}var XL=typeof Eo=="object"&&Eo&&!Eo.nodeType&&Eo,v7=XL&&typeof Mo=="object"&&Mo&&!Mo.nodeType&&Mo,bJ=v7&&v7.exports===XL,_7=bJ?zr.Buffer:void 0,wJ=_7?_7.isBuffer:void 0,kJ=wJ||yJ;const xg=kJ;var CJ="[object Arguments]",xJ="[object Array]",SJ="[object Boolean]",$J="[object Date]",AJ="[object Error]",EJ="[object Function]",MJ="[object Map]",TJ="[object Number]",PJ="[object Object]",IJ="[object RegExp]",LJ="[object Set]",OJ="[object String]",DJ="[object WeakMap]",RJ="[object ArrayBuffer]",VJ="[object DataView]",FJ="[object Float32Array]",NJ="[object Float64Array]",BJ="[object Int8Array]",zJ="[object Int16Array]",HJ="[object Int32Array]",UJ="[object Uint8Array]",jJ="[object Uint8ClampedArray]",WJ="[object Uint16Array]",YJ="[object Uint32Array]",Zn={};Zn[FJ]=Zn[NJ]=Zn[BJ]=Zn[zJ]=Zn[HJ]=Zn[UJ]=Zn[jJ]=Zn[WJ]=Zn[YJ]=!0;Zn[CJ]=Zn[xJ]=Zn[RJ]=Zn[SJ]=Zn[VJ]=Zn[$J]=Zn[AJ]=Zn[EJ]=Zn[MJ]=Zn[TJ]=Zn[PJ]=Zn[IJ]=Zn[LJ]=Zn[OJ]=Zn[DJ]=!1;function qJ(t){return va(t)&&Ux(t.length)&&!!Zn[Ad(t)]}function Wx(t){return function(e){return t(e)}}var KL=typeof Eo=="object"&&Eo&&!Eo.nodeType&&Eo,Dm=KL&&typeof Mo=="object"&&Mo&&!Mo.nodeType&&Mo,GJ=Dm&&Dm.exports===KL,G2=GJ&&HL.process,XJ=function(){try{var t=Dm&&Dm.require&&Dm.require("util").types;return t||G2&&G2.binding&&G2.binding("util")}catch{}}();const wf=XJ;var y7=wf&&wf.isTypedArray,KJ=y7?Wx(y7):qJ;const Yx=KJ;var ZJ=Object.prototype,JJ=ZJ.hasOwnProperty;function ZL(t,e){var n=Ni(t),i=!n&&Cg(t),s=!n&&!i&&xg(t),o=!n&&!i&&!s&&Yx(t),r=n||i||s||o,a=r?pJ(t.length,String):[],l=a.length;for(var c in t)(e||JJ.call(t,c))&&!(r&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||db(c,l)))&&a.push(c);return a}function JL(t,e){return function(n){return t(e(n))}}var QJ=JL(Object.keys,Object);const eQ=QJ;var tQ=Object.prototype,nQ=tQ.hasOwnProperty;function sQ(t){if(!jx(t))return eQ(t);var e=[];for(var n in Object(t))nQ.call(t,n)&&n!="constructor"&&e.push(n);return e}function m1(t){return Kf(t)?ZL(t):sQ(t)}function iQ(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var oQ=Object.prototype,rQ=oQ.hasOwnProperty;function aQ(t){if(!Bi(t))return iQ(t);var e=jx(t),n=[];for(var i in t)i=="constructor"&&(e||!rQ.call(t,i))||n.push(i);return n}function g1(t){return Kf(t)?ZL(t,!0):aQ(t)}var lQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cQ=/^\w*$/;function qx(t,e){if(Ni(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||ub(t)?!0:cQ.test(t)||!lQ.test(t)||e!=null&&t in Object(e)}var uQ=Md(Object,"create");const Sg=uQ;function dQ(){this.__data__=Sg?Sg(null):{},this.size=0}function hQ(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var fQ="__lodash_hash_undefined__",pQ=Object.prototype,mQ=pQ.hasOwnProperty;function gQ(t){var e=this.__data__;if(Sg){var n=e[t];return n===fQ?void 0:n}return mQ.call(e,t)?e[t]:void 0}var vQ=Object.prototype,_Q=vQ.hasOwnProperty;function yQ(t){var e=this.__data__;return Sg?e[t]!==void 0:_Q.call(e,t)}var bQ="__lodash_hash_undefined__";function wQ(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Sg&&e===void 0?bQ:e,this}function ld(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}ld.prototype.clear=dQ;ld.prototype.delete=hQ;ld.prototype.get=gQ;ld.prototype.has=yQ;ld.prototype.set=wQ;function kQ(){this.__data__=[],this.size=0}function hb(t,e){for(var n=t.length;n--;)if(p1(t[n][0],e))return n;return-1}var CQ=Array.prototype,xQ=CQ.splice;function SQ(t){var e=this.__data__,n=hb(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():xQ.call(e,n,1),--this.size,!0}function $Q(t){var e=this.__data__,n=hb(e,t);return n<0?void 0:e[n][1]}function AQ(t){return hb(this.__data__,t)>-1}function EQ(t,e){var n=this.__data__,i=hb(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}function fl(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}fl.prototype.clear=kQ;fl.prototype.delete=SQ;fl.prototype.get=$Q;fl.prototype.has=AQ;fl.prototype.set=EQ;var MQ=Md(zr,"Map");const $g=MQ;function TQ(){this.size=0,this.__data__={hash:new ld,map:new($g||fl),string:new ld}}function PQ(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function fb(t,e){var n=t.__data__;return PQ(e)?n[typeof e=="string"?"string":"hash"]:n.map}function IQ(t){var e=fb(this,t).delete(t);return this.size-=e?1:0,e}function LQ(t){return fb(this,t).get(t)}function OQ(t){return fb(this,t).has(t)}function DQ(t,e){var n=fb(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}function pl(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}pl.prototype.clear=TQ;pl.prototype.delete=IQ;pl.prototype.get=LQ;pl.prototype.has=OQ;pl.prototype.set=DQ;var RQ="Expected a function";function Gx(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(RQ);var n=function(){var i=arguments,s=e?e.apply(this,i):i[0],o=n.cache;if(o.has(s))return o.get(s);var r=t.apply(this,i);return n.cache=o.set(s,r)||o,r};return n.cache=new(Gx.Cache||pl),n}Gx.Cache=pl;var VQ=500;function FQ(t){var e=Gx(t,function(i){return n.size===VQ&&n.clear(),i}),n=e.cache;return e}var NQ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,BQ=/\\(\\)?/g,zQ=FQ(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(NQ,function(n,i,s,o){e.push(s?o.replace(BQ,"$1"):i||n)}),e});const HQ=zQ;function UQ(t){return t==null?"":jL(t)}function Zf(t,e){return Ni(t)?t:qx(t,e)?[t]:HQ(UQ(t))}var jQ=1/0;function Jf(t){if(typeof t=="string"||ub(t))return t;var e=t+"";return e=="0"&&1/t==-jQ?"-0":e}function pb(t,e){e=Zf(e,t);for(var n=0,i=e.length;t!=null&&n<i;)t=t[Jf(e[n++])];return n&&n==i?t:void 0}function Vi(t,e,n){var i=t==null?void 0:pb(t,e);return i===void 0?n:i}function Xx(t,e){for(var n=-1,i=e.length,s=t.length;++n<i;)t[s+n]=e[n];return t}var b7=dr?dr.isConcatSpreadable:void 0;function WQ(t){return Ni(t)||Cg(t)||!!(b7&&t&&t[b7])}function Kx(t,e,n,i,s){var o=-1,r=t.length;for(n||(n=WQ),s||(s=[]);++o<r;){var a=t[o];e>0&&n(a)?e>1?Kx(a,e-1,n,i,s):Xx(s,a):i||(s[s.length]=a)}return s}function q_(t){var e=t==null?0:t.length;return e?Kx(t,1):[]}function QL(t){return YL(qL(t,void 0,q_),t+"")}var YQ=JL(Object.getPrototypeOf,Object);const Zx=YQ;var qQ="[object Object]",GQ=Function.prototype,XQ=Object.prototype,eO=GQ.toString,KQ=XQ.hasOwnProperty,ZQ=eO.call(Object);function Jx(t){if(!va(t)||Ad(t)!=qQ)return!1;var e=Zx(t);if(e===null)return!0;var n=KQ.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&eO.call(n)==ZQ}function JQ(t,e,n){var i=-1,s=t.length;e<0&&(e=-e>s?0:s+e),n=n>s?s:n,n<0&&(n+=s),s=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(s);++i<s;)o[i]=t[i+e];return o}function Us(){if(!arguments.length)return[];var t=arguments[0];return Ni(t)?t:[t]}function QQ(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function tO(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=Yh(n),n=n===n?n:0),e!==void 0&&(e=Yh(e),e=e===e?e:0),QQ(Yh(t),e,n)}function eee(){this.__data__=new fl,this.size=0}function tee(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function nee(t){return this.__data__.get(t)}function see(t){return this.__data__.has(t)}var iee=200;function oee(t,e){var n=this.__data__;if(n instanceof fl){var i=n.__data__;if(!$g||i.length<iee-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new pl(i)}return n.set(t,e),this.size=n.size,this}function Mr(t){var e=this.__data__=new fl(t);this.size=e.size}Mr.prototype.clear=eee;Mr.prototype.delete=tee;Mr.prototype.get=nee;Mr.prototype.has=see;Mr.prototype.set=oee;function ree(t,e){return t&&Xf(e,m1(e),t)}function aee(t,e){return t&&Xf(e,g1(e),t)}var nO=typeof Eo=="object"&&Eo&&!Eo.nodeType&&Eo,w7=nO&&typeof Mo=="object"&&Mo&&!Mo.nodeType&&Mo,lee=w7&&w7.exports===nO,k7=lee?zr.Buffer:void 0,C7=k7?k7.allocUnsafe:void 0;function sO(t,e){if(e)return t.slice();var n=t.length,i=C7?C7(n):new t.constructor(n);return t.copy(i),i}function cee(t,e){for(var n=-1,i=t==null?0:t.length,s=0,o=[];++n<i;){var r=t[n];e(r,n,t)&&(o[s++]=r)}return o}function iO(){return[]}var uee=Object.prototype,dee=uee.propertyIsEnumerable,x7=Object.getOwnPropertySymbols,hee=x7?function(t){return t==null?[]:(t=Object(t),cee(x7(t),function(e){return dee.call(t,e)}))}:iO;const Qx=hee;function fee(t,e){return Xf(t,Qx(t),e)}var pee=Object.getOwnPropertySymbols,mee=pee?function(t){for(var e=[];t;)Xx(e,Qx(t)),t=Zx(t);return e}:iO;const oO=mee;function gee(t,e){return Xf(t,oO(t),e)}function rO(t,e,n){var i=e(t);return Ni(t)?i:Xx(i,n(t))}function mk(t){return rO(t,m1,Qx)}function aO(t){return rO(t,g1,oO)}var vee=Md(zr,"DataView");const gk=vee;var _ee=Md(zr,"Promise");const vk=_ee;var yee=Md(zr,"Set");const _k=yee;var S7="[object Map]",bee="[object Object]",$7="[object Promise]",A7="[object Set]",E7="[object WeakMap]",M7="[object DataView]",wee=Ed(gk),kee=Ed($g),Cee=Ed(vk),xee=Ed(_k),See=Ed(pk),cu=Ad;(gk&&cu(new gk(new ArrayBuffer(1)))!=M7||$g&&cu(new $g)!=S7||vk&&cu(vk.resolve())!=$7||_k&&cu(new _k)!=A7||pk&&cu(new pk)!=E7)&&(cu=function(t){var e=Ad(t),n=e==bee?t.constructor:void 0,i=n?Ed(n):"";if(i)switch(i){case wee:return M7;case kee:return S7;case Cee:return $7;case xee:return A7;case See:return E7}return e});const Ag=cu;var $ee=Object.prototype,Aee=$ee.hasOwnProperty;function Eee(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&Aee.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var Mee=zr.Uint8Array;const G_=Mee;function e4(t){var e=new t.constructor(t.byteLength);return new G_(e).set(new G_(t)),e}function Tee(t,e){var n=e?e4(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var Pee=/\w*$/;function Iee(t){var e=new t.constructor(t.source,Pee.exec(t));return e.lastIndex=t.lastIndex,e}var T7=dr?dr.prototype:void 0,P7=T7?T7.valueOf:void 0;function Lee(t){return P7?Object(P7.call(t)):{}}function lO(t,e){var n=e?e4(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var Oee="[object Boolean]",Dee="[object Date]",Ree="[object Map]",Vee="[object Number]",Fee="[object RegExp]",Nee="[object Set]",Bee="[object String]",zee="[object Symbol]",Hee="[object ArrayBuffer]",Uee="[object DataView]",jee="[object Float32Array]",Wee="[object Float64Array]",Yee="[object Int8Array]",qee="[object Int16Array]",Gee="[object Int32Array]",Xee="[object Uint8Array]",Kee="[object Uint8ClampedArray]",Zee="[object Uint16Array]",Jee="[object Uint32Array]";function Qee(t,e,n){var i=t.constructor;switch(e){case Hee:return e4(t);case Oee:case Dee:return new i(+t);case Uee:return Tee(t,n);case jee:case Wee:case Yee:case qee:case Gee:case Xee:case Kee:case Zee:case Jee:return lO(t,n);case Ree:return new i;case Vee:case Bee:return new i(t);case Fee:return Iee(t);case Nee:return new i;case zee:return Lee(t)}}function cO(t){return typeof t.constructor=="function"&&!jx(t)?YZ(Zx(t)):{}}var ete="[object Map]";function tte(t){return va(t)&&Ag(t)==ete}var I7=wf&&wf.isMap,nte=I7?Wx(I7):tte;const ste=nte;var ite="[object Set]";function ote(t){return va(t)&&Ag(t)==ite}var L7=wf&&wf.isSet,rte=L7?Wx(L7):ote;const ate=rte;var lte=1,cte=2,ute=4,uO="[object Arguments]",dte="[object Array]",hte="[object Boolean]",fte="[object Date]",pte="[object Error]",dO="[object Function]",mte="[object GeneratorFunction]",gte="[object Map]",vte="[object Number]",hO="[object Object]",_te="[object RegExp]",yte="[object Set]",bte="[object String]",wte="[object Symbol]",kte="[object WeakMap]",Cte="[object ArrayBuffer]",xte="[object DataView]",Ste="[object Float32Array]",$te="[object Float64Array]",Ate="[object Int8Array]",Ete="[object Int16Array]",Mte="[object Int32Array]",Tte="[object Uint8Array]",Pte="[object Uint8ClampedArray]",Ite="[object Uint16Array]",Lte="[object Uint32Array]",Yn={};Yn[uO]=Yn[dte]=Yn[Cte]=Yn[xte]=Yn[hte]=Yn[fte]=Yn[Ste]=Yn[$te]=Yn[Ate]=Yn[Ete]=Yn[Mte]=Yn[gte]=Yn[vte]=Yn[hO]=Yn[_te]=Yn[yte]=Yn[bte]=Yn[wte]=Yn[Tte]=Yn[Pte]=Yn[Ite]=Yn[Lte]=!0;Yn[pte]=Yn[dO]=Yn[kte]=!1;function Rm(t,e,n,i,s,o){var r,a=e&lte,l=e&cte,c=e&ute;if(n&&(r=s?n(t,i,s,o):n(t)),r!==void 0)return r;if(!Bi(t))return t;var u=Ni(t);if(u){if(r=Eee(t),!a)return WL(t,r)}else{var d=Ag(t),h=d==dO||d==mte;if(xg(t))return sO(t,a);if(d==hO||d==uO||h&&!s){if(r=l||h?{}:cO(t),!a)return l?gee(t,aee(r,t)):fee(t,ree(r,t))}else{if(!Yn[d])return s?t:{};r=Qee(t,d,a)}}o||(o=new Mr);var f=o.get(t);if(f)return f;o.set(t,r),ate(t)?t.forEach(function(y){r.add(Rm(y,e,n,y,t,o))}):ste(t)&&t.forEach(function(y,b){r.set(b,Rm(y,e,n,b,t,o))});var p=c?l?aO:mk:l?g1:m1,m=u?void 0:p(t);return sJ(m||t,function(y,b){m&&(b=y,y=t[b]),Hx(r,b,Rm(y,e,n,b,t,o))}),r}var Ote=1,Dte=4;function ju(t){return Rm(t,Ote|Dte)}var Rte="__lodash_hash_undefined__";function Vte(t){return this.__data__.set(t,Rte),this}function Fte(t){return this.__data__.has(t)}function X_(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new pl;++e<n;)this.add(t[e])}X_.prototype.add=X_.prototype.push=Vte;X_.prototype.has=Fte;function Nte(t,e){for(var n=-1,i=t==null?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}function Bte(t,e){return t.has(e)}var zte=1,Hte=2;function fO(t,e,n,i,s,o){var r=n&zte,a=t.length,l=e.length;if(a!=l&&!(r&&l>a))return!1;var c=o.get(t),u=o.get(e);if(c&&u)return c==e&&u==t;var d=-1,h=!0,f=n&Hte?new X_:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var p=t[d],m=e[d];if(i)var y=r?i(m,p,d,e,t,o):i(p,m,d,t,e,o);if(y!==void 0){if(y)continue;h=!1;break}if(f){if(!Nte(e,function(b,k){if(!Bte(f,k)&&(p===b||s(p,b,n,i,o)))return f.push(k)})){h=!1;break}}else if(!(p===m||s(p,m,n,i,o))){h=!1;break}}return o.delete(t),o.delete(e),h}function Ute(t){var e=-1,n=Array(t.size);return t.forEach(function(i,s){n[++e]=[s,i]}),n}function jte(t){var e=-1,n=Array(t.size);return t.forEach(function(i){n[++e]=i}),n}var Wte=1,Yte=2,qte="[object Boolean]",Gte="[object Date]",Xte="[object Error]",Kte="[object Map]",Zte="[object Number]",Jte="[object RegExp]",Qte="[object Set]",ene="[object String]",tne="[object Symbol]",nne="[object ArrayBuffer]",sne="[object DataView]",O7=dr?dr.prototype:void 0,X2=O7?O7.valueOf:void 0;function ine(t,e,n,i,s,o,r){switch(n){case sne:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case nne:return!(t.byteLength!=e.byteLength||!o(new G_(t),new G_(e)));case qte:case Gte:case Zte:return p1(+t,+e);case Xte:return t.name==e.name&&t.message==e.message;case Jte:case ene:return t==e+"";case Kte:var a=Ute;case Qte:var l=i&Wte;if(a||(a=jte),t.size!=e.size&&!l)return!1;var c=r.get(t);if(c)return c==e;i|=Yte,r.set(t,e);var u=fO(a(t),a(e),i,s,o,r);return r.delete(t),u;case tne:if(X2)return X2.call(t)==X2.call(e)}return!1}var one=1,rne=Object.prototype,ane=rne.hasOwnProperty;function lne(t,e,n,i,s,o){var r=n&one,a=mk(t),l=a.length,c=mk(e),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in e:ane.call(e,h)))return!1}var f=o.get(t),p=o.get(e);if(f&&p)return f==e&&p==t;var m=!0;o.set(t,e),o.set(e,t);for(var y=r;++d<l;){h=a[d];var b=t[h],k=e[h];if(i)var C=r?i(k,b,h,e,t,o):i(b,k,h,t,e,o);if(!(C===void 0?b===k||s(b,k,n,i,o):C)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var $=t.constructor,x=e.constructor;$!=x&&"constructor"in t&&"constructor"in e&&!(typeof $=="function"&&$ instanceof $&&typeof x=="function"&&x instanceof x)&&(m=!1)}return o.delete(t),o.delete(e),m}var cne=1,D7="[object Arguments]",R7="[object Array]",$v="[object Object]",une=Object.prototype,V7=une.hasOwnProperty;function dne(t,e,n,i,s,o){var r=Ni(t),a=Ni(e),l=r?R7:Ag(t),c=a?R7:Ag(e);l=l==D7?$v:l,c=c==D7?$v:c;var u=l==$v,d=c==$v,h=l==c;if(h&&xg(t)){if(!xg(e))return!1;r=!0,u=!1}if(h&&!u)return o||(o=new Mr),r||Yx(t)?fO(t,e,n,i,s,o):ine(t,e,l,n,i,s,o);if(!(n&cne)){var f=u&&V7.call(t,"__wrapped__"),p=d&&V7.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,y=p?e.value():e;return o||(o=new Mr),s(m,y,n,i,o)}}return h?(o||(o=new Mr),lne(t,e,n,i,s,o)):!1}function mb(t,e,n,i,s){return t===e?!0:t==null||e==null||!va(t)&&!va(e)?t!==t&&e!==e:dne(t,e,n,i,mb,s)}var hne=1,fne=2;function pne(t,e,n,i){var s=n.length,o=s,r=!i;if(t==null)return!o;for(t=Object(t);s--;){var a=n[s];if(r&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++s<o;){a=n[s];var l=a[0],c=t[l],u=a[1];if(r&&a[2]){if(c===void 0&&!(l in t))return!1}else{var d=new Mr;if(i)var h=i(c,u,l,t,e,d);if(!(h===void 0?mb(u,c,hne|fne,i,d):h))return!1}}return!0}function pO(t){return t===t&&!Bi(t)}function mne(t){for(var e=m1(t),n=e.length;n--;){var i=e[n],s=t[i];e[n]=[i,s,pO(s)]}return e}function mO(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function gne(t){var e=mne(t);return e.length==1&&e[0][2]?mO(e[0][0],e[0][1]):function(n){return n===t||pne(n,t,e)}}function vne(t,e){return t!=null&&e in Object(t)}function _ne(t,e,n){e=Zf(e,t);for(var i=-1,s=e.length,o=!1;++i<s;){var r=Jf(e[i]);if(!(o=t!=null&&n(t,r)))break;t=t[r]}return o||++i!=s?o:(s=t==null?0:t.length,!!s&&Ux(s)&&db(r,s)&&(Ni(t)||Cg(t)))}function gO(t,e){return t!=null&&_ne(t,e,vne)}var yne=1,bne=2;function wne(t,e){return qx(t)&&pO(e)?mO(Jf(t),e):function(n){var i=Vi(n,t);return i===void 0&&i===e?gO(n,t):mb(e,i,yne|bne)}}function kne(t){return function(e){return e==null?void 0:e[t]}}function Cne(t){return function(e){return pb(e,t)}}function xne(t){return qx(t)?kne(Jf(t)):Cne(t)}function vO(t){return typeof t=="function"?t:t==null?Nx:typeof t=="object"?Ni(t)?wne(t[0],t[1]):gne(t):xne(t)}function Sne(t){return function(e,n,i){for(var s=-1,o=Object(e),r=i(e),a=r.length;a--;){var l=r[t?a:++s];if(n(o[l],l,o)===!1)break}return e}}var $ne=Sne();const _O=$ne;function Ane(t,e){return t&&_O(t,e,m1)}function Ene(t,e){return function(n,i){if(n==null)return n;if(!Kf(n))return t(n,i);for(var s=n.length,o=e?s:-1,r=Object(n);(e?o--:++o<s)&&i(r[o],o,r)!==!1;);return n}}var Mne=Ene(Ane);const Tne=Mne;var Pne=function(){return zr.Date.now()};const K2=Pne;var Ine="Expected a function",Lne=Math.max,One=Math.min;function cd(t,e,n){var i,s,o,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(Ine);e=Yh(e)||0,Bi(n)&&(u=!!n.leading,d="maxWait"in n,o=d?Lne(Yh(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(M){var P=i,T=s;return i=s=void 0,c=M,r=t.apply(T,P),r}function p(M){return c=M,a=setTimeout(b,e),u?f(M):r}function m(M){var P=M-l,T=M-c,I=e-P;return d?One(I,o-T):I}function y(M){var P=M-l,T=M-c;return l===void 0||P>=e||P<0||d&&T>=o}function b(){var M=K2();if(y(M))return k(M);a=setTimeout(b,m(M))}function k(M){return a=void 0,h&&i?f(M):(i=s=void 0,r)}function C(){a!==void 0&&clearTimeout(a),c=0,i=l=s=a=void 0}function $(){return a===void 0?r:k(K2())}function x(){var M=K2(),P=y(M);if(i=arguments,s=this,l=M,P){if(a===void 0)return p(l);if(d)return clearTimeout(a),a=setTimeout(b,e),f(l)}return a===void 0&&(a=setTimeout(b,e)),r}return x.cancel=C,x.flush=$,x}function yk(t,e,n){(n!==void 0&&!p1(t[e],n)||n===void 0&&!(e in t))&&zx(t,e,n)}function Dne(t){return va(t)&&Kf(t)}function bk(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Rne(t){return Xf(t,g1(t))}function Vne(t,e,n,i,s,o,r){var a=bk(t,n),l=bk(e,n),c=r.get(l);if(c){yk(t,n,c);return}var u=o?o(a,l,n+"",t,e,r):void 0,d=u===void 0;if(d){var h=Ni(l),f=!h&&xg(l),p=!h&&!f&&Yx(l);u=l,h||f||p?Ni(a)?u=a:Dne(a)?u=WL(a):f?(d=!1,u=sO(l,!0)):p?(d=!1,u=lO(l,!0)):u=[]:Jx(l)||Cg(l)?(u=a,Cg(a)?u=Rne(a):(!Bi(a)||Bx(a))&&(u=cO(l))):d=!1}d&&(r.set(l,u),s(u,l,i,o,r),r.delete(l)),yk(t,n,u)}function yO(t,e,n,i,s){t!==e&&_O(e,function(o,r){if(s||(s=new Mr),Bi(o))Vne(t,e,r,n,yO,i,s);else{var a=i?i(bk(t,r),o,r+"",t,e,s):void 0;a===void 0&&(a=o),yk(t,r,a)}},g1)}function Fne(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var Nne=Math.max,Bne=Math.min;function zne(t,e,n){var i=t==null?0:t.length;if(!i)return-1;var s=i-1;return n!==void 0&&(s=$Z(n),s=n<0?Nne(i+s,0):Bne(s,i-1)),iJ(t,vO(e),s,!0)}function Hne(t,e){var n=-1,i=Kf(t)?Array(t.length):[];return Tne(t,function(s,o,r){i[++n]=e(s,o,r)}),i}function Une(t,e){var n=Ni(t)?Fx:Hne;return n(t,vO(e))}function bO(t,e){return Kx(Une(t,e),1)}function kf(t){for(var e=-1,n=t==null?0:t.length,i={};++e<n;){var s=t[e];i[s[0]]=s[1]}return i}function jne(t,e){return e.length<2?t:pb(t,JQ(e,0,-1))}function Fi(t,e){return mb(t,e)}function ai(t){return t==null}function gb(t){return t===null}function Wne(t){return t===void 0}var Yne=hJ(function(t,e,n){yO(t,e,n)});const wO=Yne;var qne=Object.prototype,Gne=qne.hasOwnProperty;function Xne(t,e){e=Zf(e,t);var n=-1,i=e.length;if(!i)return!0;for(var s=t==null||typeof t!="object"&&typeof t!="function";++n<i;){var o=e[n];if(typeof o=="string"){if(o==="__proto__"&&!Gne.call(t,"__proto__"))return!1;if(o==="constructor"&&n+1<i&&typeof e[n+1]=="string"&&e[n+1]==="prototype"){if(s&&n===0)continue;return!1}}}var r=jne(t,e);return r==null||delete r[Jf(Fne(e))]}function Kne(t){return Jx(t)?void 0:t}var Zne=1,Jne=2,Qne=4,ese=QL(function(t,e){var n={};if(t==null)return n;var i=!1;e=Fx(e,function(o){return o=Zf(o,t),i||(i=o.length>1),o}),Xf(t,aO(t),n),i&&(n=Rm(n,Zne|Jne|Qne,Kne));for(var s=e.length;s--;)Xne(n,e[s]);return n});const vb=ese;function kO(t,e,n,i){if(!Bi(t))return t;e=Zf(e,t);for(var s=-1,o=e.length,r=o-1,a=t;a!=null&&++s<o;){var l=Jf(e[s]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(s!=r){var u=a[l];c=i?i(u,l,a):void 0,c===void 0&&(c=Bi(u)?u:db(e[s+1])?[]:{})}Hx(a,l,c),a=a[l]}return t}function tse(t,e,n){for(var i=-1,s=e.length,o={};++i<s;){var r=e[i],a=pb(t,r);n(a,r)&&kO(o,Zf(r,t),a)}return o}function nse(t,e){return tse(t,e,function(n,i){return gO(t,i)})}var sse=QL(function(t,e){return t==null?{}:nse(t,e)});const t4=sse;function ise(t,e,n){return t==null?t:kO(t,e,n)}var ose="Expected a function";function Av(t,e,n){var i=!0,s=!0;if(typeof t!="function")throw new TypeError(ose);return Bi(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),cd(t,e,{leading:i,maxWait:e,trailing:s})}const tn=t=>t===void 0,Xn=t=>typeof t=="boolean",_t=t=>typeof t=="number",n4=t=>!t&&t!==0||Ee(t)&&t.length===0||yt(t)&&!Object.keys(t).length,$o=t=>typeof Element>"u"?!1:t instanceof Element,ha=t=>ai(t),rse=t=>Ke(t)?!Number.isNaN(Number(t)):!1,ase=t=>t===window,K_=t=>Object.keys(t),CO=t=>Object.entries(t),gc=(t,e,n)=>({get value(){return Vi(t,e,n)},set value(i){ise(t,e,i)}}),xO="__epPropKey",he=t=>t,lse=t=>yt(t)&&!!t[xO],_b=(t,e)=>{if(!yt(t)||lse(t))return t;const{values:n,required:i,default:s,type:o,validator:r}=t,a={type:o,required:!!i,validator:n||r?l=>{let c=!1,u=[];if(n&&(u=Array.from(n),Dt(t,"default")&&u.push(s),c||(c=u.includes(l))),r&&(c||(c=r(l))),!c&&u.length>0){const d=[...new Set(u)].map(h=>JSON.stringify(h)).join(", ");CI(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`)}return c}:void 0,[xO]:!0};return Dt(t,"default")&&(a.default=s),a},Ge=t=>kf(Object.entries(t).map(([e,n])=>[e,_b(n,e)])),s4=Ge({to:{type:he([String,Object]),required:!0},disabled:Boolean});var SO=class extends Error{constructor(t){super(t),this.name="ElementPlusError"}};function uo(t,e){throw new SO(`[${t}] ${e}`)}function Pt(t,e){{const n=Ke(t)?new SO(`[${t}] ${e}`):t;console.warn(n)}}const cse=["class","style"],use=/^on[A-Z]/,yb=(t={})=>{const{excludeListeners:e=!1,excludeKeys:n}=t,i=Y(()=>((n==null?void 0:n.value)||[]).concat(cse)),s=bt();return s?Y(()=>{var o;return kf(Object.entries((o=s.proxy)==null?void 0:o.$attrs).filter(([r])=>!i.value.includes(r)&&!(e&&use.test(r))))}):(Pt("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),Y(()=>({})))};function $O(t,e){var n;const i=Hn();return sl(()=>{i.value=t()},{...e,flush:(n=e==null?void 0:e.flush)!=null?n:"sync"}),Cd(i)}function Td(t){return Yy()?(qy(t),!0):!1}function Io(t){return typeof t=="function"?t():E(t)}function dse(t){if(!gn(t))return In(t);const e=new Proxy({},{get(n,i,s){return E(Reflect.get(t.value,i,s))},set(n,i,s){return gn(t.value[i])&&!gn(s)?t.value[i].value=s:t.value[i]=s,!0},deleteProperty(n,i){return Reflect.deleteProperty(t.value,i)},has(n,i){return Reflect.has(t.value,i)},ownKeys(){return Object.keys(t.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}});return In(e)}function hse(t){return dse(Y(t))}const Xt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const fse=t=>typeof t<"u",AO=t=>t!=null,pse=Object.prototype.toString,mse=t=>pse.call(t)==="[object Object]",EO=(t,e,n)=>Math.min(n,Math.max(e,t)),Tr=()=>{},wk=gse();function gse(){var t,e;return Xt&&((t=window==null?void 0:window.navigator)==null?void 0:t.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((e=window==null?void 0:window.navigator)==null?void 0:e.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function MO(t,e){function n(...i){return new Promise((s,o)=>{Promise.resolve(t(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(s).catch(o)})}return n}function vse(t,e={}){let n,i,s=Tr;const o=a=>{clearTimeout(a),s(),s=Tr};return a=>{const l=Io(t),c=Io(e.maxWait);return n&&o(n),l<=0||c!==void 0&&c<=0?(i&&(o(i),i=null),Promise.resolve(a())):new Promise((u,d)=>{s=e.rejectOnCancel?d:u,c&&!i&&(i=setTimeout(()=>{n&&o(n),i=null,u(a())},c)),n=setTimeout(()=>{i&&o(i),i=null,u(a())},l)})}}function _se(...t){let e=0,n,i=!0,s=Tr,o,r,a,l,c;!gn(t[0])&&typeof t[0]=="object"?{delay:r,trailing:a=!0,leading:l=!0,rejectOnCancel:c=!1}=t[0]:[r,a=!0,l=!0,c=!1]=t;const u=()=>{n&&(clearTimeout(n),n=void 0,s(),s=Tr)};return h=>{const f=Io(r),p=Date.now()-e,m=()=>o=h();return u(),f<=0?(e=Date.now(),m()):(p>f&&(l||!i)?(e=Date.now(),m()):a&&(o=new Promise((y,b)=>{s=c?b:y,n=setTimeout(()=>{e=Date.now(),i=!0,y(m()),u()},Math.max(0,f-p))})),!l&&!n&&(n=setTimeout(()=>i=!0,f)),i=!1,o)}}function yse(t){return t||bt()}function TO(t,e=200,n={}){return MO(vse(e,n),t)}function bse(t,e=200,n={}){const i=J(t.value),s=TO(()=>{i.value=t.value},e,n);return Te(t,()=>s()),i}function wse(t,e=200,n=!1,i=!0,s=!1){return MO(_se(e,n,i,s),t)}function PO(t,e=!0,n){yse()?Ft(t,n):e?t():ot(t)}function kk(t,e,n={}){const{immediate:i=!0}=n,s=J(!1);let o=null;function r(){o&&(clearTimeout(o),o=null)}function a(){s.value=!1,r()}function l(...c){r(),s.value=!0,o=setTimeout(()=>{s.value=!1,o=null,t(...c)},Io(e))}return i&&(s.value=!0,Xt&&l()),Td(a),{isPending:Cd(s),start:l,stop:a}}const ml=Xt?window:void 0,kse=Xt?window.document:void 0;function js(t){var e;const n=Io(t);return(e=n==null?void 0:n.$el)!=null?e:n}function zn(...t){let e,n,i,s;if(typeof t[0]=="string"||Array.isArray(t[0])?([n,i,s]=t,e=ml):[e,n,i,s]=t,!e)return Tr;Array.isArray(n)||(n=[n]),Array.isArray(i)||(i=[i]);const o=[],r=()=>{o.forEach(u=>u()),o.length=0},a=(u,d,h,f)=>(u.addEventListener(d,h,f),()=>u.removeEventListener(d,h,f)),l=Te(()=>[js(e),Io(s)],([u,d])=>{if(r(),!u)return;const h=mse(d)?{...d}:d;o.push(...n.flatMap(f=>i.map(p=>a(u,f,p,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),r()};return Td(c),c}let F7=!1;function IO(t,e,n={}){const{window:i=ml,ignore:s=[],capture:o=!0,detectIframe:r=!1}=n;if(!i)return Tr;wk&&!F7&&(F7=!0,Array.from(i.document.body.children).forEach(m=>m.addEventListener("click",Tr)),i.document.documentElement.addEventListener("click",Tr));let a=!0;const l=m=>Io(s).some(y=>{if(typeof y=="string")return Array.from(i.document.querySelectorAll(y)).some(b=>b===m.target||m.composedPath().includes(b));{const b=js(y);return b&&(m.target===b||m.composedPath().includes(b))}});function c(m){const y=Io(m);return y&&y.$.subTree.shapeFlag===16}function u(m,y){const b=Io(m),k=b.$.subTree&&b.$.subTree.children;return k==null||!Array.isArray(k)?!1:k.some(C=>C.el===y.target||y.composedPath().includes(C.el))}const d=m=>{const y=js(t);if(m.target!=null&&!(!(y instanceof Element)&&c(t)&&u(t,m))&&!(!y||y===m.target||m.composedPath().includes(y))){if(m.detail===0&&(a=!l(m)),!a){a=!0;return}e(m)}};let h=!1;const f=[zn(i,"click",m=>{h||(h=!0,setTimeout(()=>{h=!1},0),d(m))},{passive:!0,capture:o}),zn(i,"pointerdown",m=>{const y=js(t);a=!l(m)&&!!(y&&!m.composedPath().includes(y))},{passive:!0}),r&&zn(i,"blur",m=>{setTimeout(()=>{var y;const b=js(t);((y=i.document.activeElement)==null?void 0:y.tagName)==="IFRAME"&&!(b!=null&&b.contains(i.document.activeElement))&&e(m)},0)})].filter(Boolean);return()=>f.forEach(m=>m())}function Cse(){const t=J(!1),e=bt();return e&&Ft(()=>{t.value=!0},e),t}function bb(t){const e=Cse();return Y(()=>(e.value,!!t()))}function xse(t,e,n={}){const{window:i=ml,...s}=n;let o;const r=bb(()=>i&&"MutationObserver"in i),a=()=>{o&&(o.disconnect(),o=void 0)},l=Y(()=>{const h=Io(t),f=(Array.isArray(h)?h:[h]).map(js).filter(AO);return new Set(f)}),c=Te(()=>l.value,h=>{a(),r.value&&h.size&&(o=new MutationObserver(e),h.forEach(f=>o.observe(f,s)))},{immediate:!0,flush:"post"}),u=()=>o==null?void 0:o.takeRecords(),d=()=>{c(),a()};return Td(d),{isSupported:r,stop:d,takeRecords:u}}function Sse(t,e={}){const{window:n=ml}=e,i=bb(()=>n&&"matchMedia"in n&&typeof n.matchMedia=="function");let s;const o=J(!1),r=c=>{o.value=c.matches},a=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",r):s.removeListener(r))},l=sl(()=>{i.value&&(a(),s=n.matchMedia(Io(t)),"addEventListener"in s?s.addEventListener("change",r):s.addListener(r),o.value=s.matches)});return Td(()=>{l(),a(),s=void 0}),o}function $se(t){return JSON.parse(JSON.stringify(t))}function Ase(t={}){const{document:e=kse}=t;if(!e)return J("visible");const n=J(e.visibilityState);return zn(e,"visibilitychange",()=>{n.value=e.visibilityState}),n}function Es(t,e,n={}){const{window:i=ml,...s}=n;let o;const r=bb(()=>i&&"ResizeObserver"in i),a=()=>{o&&(o.disconnect(),o=void 0)},l=Y(()=>{const d=Io(t);return Array.isArray(d)?d.map(h=>js(h)):[js(d)]}),c=Te(l,d=>{if(a(),r.value&&i){o=new ResizeObserver(e);for(const h of d)h&&o.observe(h,s)}},{immediate:!0,flush:"post"}),u=()=>{a(),c()};return Td(u),{isSupported:r,stop:u}}function N7(t,e={width:0,height:0},n={}){const{window:i=ml,box:s="content-box"}=n,o=Y(()=>{var d,h;return(h=(d=js(t))==null?void 0:d.namespaceURI)==null?void 0:h.includes("svg")}),r=J(e.width),a=J(e.height),{stop:l}=Es(t,([d])=>{const h=s==="border-box"?d.borderBoxSize:s==="content-box"?d.contentBoxSize:d.devicePixelContentBoxSize;if(i&&o.value){const f=js(t);if(f){const p=f.getBoundingClientRect();r.value=p.width,a.value=p.height}}else if(h){const f=Array.isArray(h)?h:[h];r.value=f.reduce((p,{inlineSize:m})=>p+m,0),a.value=f.reduce((p,{blockSize:m})=>p+m,0)}else r.value=d.contentRect.width,a.value=d.contentRect.height},n);PO(()=>{const d=js(t);d&&(r.value="offsetWidth"in d?d.offsetWidth:e.width,a.value="offsetHeight"in d?d.offsetHeight:e.height)});const c=Te(()=>js(t),d=>{r.value=d?e.width:0,a.value=d?e.height:0});function u(){l(),c()}return{width:r,height:a,stop:u}}function Ese(t,e,n={}){const{root:i,rootMargin:s="0px",threshold:o=0,window:r=ml,immediate:a=!0}=n,l=bb(()=>r&&"IntersectionObserver"in r),c=Y(()=>{const p=Io(t);return(Array.isArray(p)?p:[p]).map(js).filter(AO)});let u=Tr;const d=J(a),h=l.value?Te(()=>[c.value,js(i),d.value],([p,m])=>{if(u(),!d.value||!p.length)return;const y=new IntersectionObserver(e,{root:js(m),rootMargin:s,threshold:o});p.forEach(b=>b&&y.observe(b)),u=()=>{y.disconnect(),u=Tr}},{immediate:a,flush:"post"}):Tr,f=()=>{u(),h(),d.value=!1};return Td(f),{isSupported:l,isActive:d,pause(){u(),d.value=!1},resume(){d.value=!0},stop:f}}function Mse(t,e,n,i={}){var s,o,r;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:d,shouldEmit:h}=i,f=bt(),p=n||(f==null?void 0:f.emit)||((s=f==null?void 0:f.$emit)==null?void 0:s.bind(f))||((r=(o=f==null?void 0:f.proxy)==null?void 0:o.$emit)==null?void 0:r.bind(f==null?void 0:f.proxy));let m=c;e||(e="modelValue"),m=m||`update:${e.toString()}`;const y=C=>a?typeof a=="function"?a(C):$se(C):C,b=()=>fse(t[e])?y(t[e]):d,k=C=>{h?h(C)&&p(m,C):p(m,C)};if(l){const C=b(),$=J(C);let x=!1;return Te(()=>t[e],M=>{x||(x=!0,$.value=y(M),ot(()=>x=!1))}),Te($,M=>{!x&&(M!==t[e]||u)&&k(M)},{deep:u}),$}else return Y({get(){return b()},set(C){k(C)}})}function Tse(t={}){const{window:e=ml}=t;if(!e)return J(!1);const n=J(e.document.hasFocus());return zn(e,"blur",()=>{n.value=!1}),zn(e,"focus",()=>{n.value=!0}),n}function Pse(t={}){const{window:e=ml,initialWidth:n=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:o=!0,type:r="inner"}=t,a=J(n),l=J(i),c=()=>{e&&(r==="outer"?(a.value=e.outerWidth,l.value=e.outerHeight):o?(a.value=e.innerWidth,l.value=e.innerHeight):(a.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight))};if(c(),PO(c),zn("resize",c,{passive:!0}),s){const u=Sse("(orientation: portrait)");Te(u,()=>c())}return{width:a,height:l}}function LO(){const t=Hn(),e=J(0),n=Y(()=>({minWidth:`${Math.max(e.value,Vx)}px`}));return Es(t,()=>{var s;e.value=((s=t.value)==null?void 0:s.getBoundingClientRect().width)??0}),{calculatorRef:t,calculatorWidth:e,inputStyle:n}}const el=({from:t,replacement:e,scope:n,version:i,ref:s,type:o="API"},r)=>{Te(()=>E(r),a=>{a&&Pt(n,`[${o}] ${t} is about to be deprecated in version ${i}, please use ${e} instead.
For more detail, please visit: ${s}
`)},{immediate:!0})},Ise='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',OO=t=>typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot,B7=t=>typeof Element>"u"?!1:t instanceof Element,Lse=t=>getComputedStyle(t).position==="fixed"?!1:t.offsetParent!==null,z7=t=>Array.from(t.querySelectorAll(Ise)).filter(e=>Eg(e)&&Lse(e)),Eg=t=>{if(t.tabIndex>0||t.tabIndex===0&&t.getAttribute("tabIndex")!==null)return!0;if(t.tabIndex<0||t.hasAttribute("disabled")||t.getAttribute("aria-disabled")==="true")return!1;switch(t.nodeName){case"A":return!!t.href&&t.rel!=="ignore";case"INPUT":return!(t.type==="hidden"||t.type==="file");case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},i4=(t,e)=>{if(!t||!t.focus)return;let n=!1;B7(t)&&!Eg(t)&&!t.getAttribute("tabindex")&&(t.setAttribute("tabindex","-1"),n=!0),t.focus(e),B7(t)&&n&&t.removeAttribute("tabindex")},o4=()=>Xt&&/firefox/i.test(window.navigator.userAgent),DO=()=>Xt&&/android/i.test(window.navigator.userAgent),Ose=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),Z2=t=>Dc(t),Dse="utils/dom/style",RO=(t="")=>t.split(" ").filter(e=>!!e.trim()),tl=(t,e)=>{if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList.contains(e)},ud=(t,e)=>{!t||!e.trim()||t.classList.add(...RO(e))},_a=(t,e)=>{!t||!e.trim()||t.classList.remove(...RO(e))},Wa=(t,e)=>{var i;if(!Xt||!t||!e||OO(t))return"";let n=es(e);n==="float"&&(n="cssFloat");try{const s=t.style[n];if(s)return s;const o=(i=document.defaultView)==null?void 0:i.getComputedStyle(t,"");return o?o[n]:""}catch{return t.style[n]}},VO=(t,e,n)=>{if(!(!t||!e))if(yt(e))CO(e).forEach(([i,s])=>VO(t,i,s));else{const i=es(e);t.style[i]=n}};function ci(t,e="px"){if(!t&&t!==0)return"";if(_t(t)||rse(t))return`${t}${e}`;if(Ke(t))return t;Pt(Dse,"binding value must be a string or number")}const FO=(t,e,n,i)=>{const s={offsetX:0,offsetY:0},o=J(!1),r=(h,f)=>{if(t.value){const{offsetX:p,offsetY:m}=s,y=t.value.getBoundingClientRect(),b=y.left,k=y.top,C=y.width,$=y.height,x=document.documentElement.clientWidth,M=document.documentElement.clientHeight,P=-b+p,T=-k+m,I=x-b-C+p,L=M-k-($<M?$:0)+m;i!=null&&i.value||(h=Math.min(Math.max(h,P),I),f=Math.min(Math.max(f,T),L)),s.offsetX=h,s.offsetY=f,t.value.style.transform=`translate(${ci(h)}, ${ci(f)})`}},a=h=>{const f=h.clientX,p=h.clientY,{offsetX:m,offsetY:y}=s,b=C=>{o.value||(o.value=!0),r(m+C.clientX-f,y+C.clientY-p)},k=()=>{o.value=!1,document.removeEventListener("mousemove",b),document.removeEventListener("mouseup",k)};document.addEventListener("mousemove",b),document.addEventListener("mouseup",k)},l=()=>{e.value&&t.value&&(e.value.addEventListener("mousedown",a),window.addEventListener("resize",d))},c=()=>{e.value&&t.value&&(e.value.removeEventListener("mousedown",a),window.removeEventListener("resize",d))},u=()=>{s.offsetX=0,s.offsetY=0,t.value&&(t.value.style.transform="")},d=()=>{const{offsetX:h,offsetY:f}=s;r(h,f)};return Ft(()=>{sl(()=>{n.value?l():c()})}),bn(()=>{c()}),{isDragging:o,resetPosition:u,updatePosition:d}};var Rse={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};const Vse=t=>(e,n)=>Fse(e,n,E(t)),Fse=(t,e,n)=>Vi(n,t,t).replace(/\{(\w+)\}/g,(i,s)=>`${(e==null?void 0:e[s])??`{${s}}`}`),Nse=t=>({lang:Y(()=>E(t).name),locale:gn(t)?t:J(t),t:Vse(t)}),NO=Symbol("localeContextKey"),Qt=t=>{const e=t||qe(NO,J());return Nse(Y(()=>e.value||Rse))},Vm="el",Bse="is-",su=(t,e,n,i,s)=>{let o=`${t}-${e}`;return n&&(o+=`-${n}`),i&&(o+=`__${i}`),s&&(o+=`--${s}`),o},BO=Symbol("namespaceContextKey"),r4=t=>{const e=t||(bt()?qe(BO,J(Vm)):J(Vm));return Y(()=>E(e)||Vm)},ze=(t,e)=>{const n=r4(e);return{namespace:n,b:(m="")=>su(n.value,t,m,"",""),e:m=>m?su(n.value,t,"",m,""):"",m:m=>m?su(n.value,t,"","",m):"",be:(m,y)=>m&&y?su(n.value,t,m,y,""):"",em:(m,y)=>m&&y?su(n.value,t,"",m,y):"",bm:(m,y)=>m&&y?su(n.value,t,m,"",y):"",bem:(m,y,b)=>m&&y&&b?su(n.value,t,m,y,b):"",is:(m,...y)=>{const b=y.length>=1?y[0]:!0;return m&&b?`${Bse}${m}`:""},cssVar:m=>{const y={};for(const b in m)m[b]&&(y[`--${n.value}-${b}`]=m[b]);return y},cssVarName:m=>`--${n.value}-${m}`,cssVarBlock:m=>{const y={};for(const b in m)m[b]&&(y[`--${n.value}-${t}-${b}`]=m[b]);return y},cssVarBlockName:m=>`--${n.value}-${t}-${m}`}},Mg=t=>Xt?window.requestAnimationFrame(t):setTimeout(t,16),zse=t=>Xt?window.cancelAnimationFrame(t):clearTimeout(t),Hse=(t,e)=>{if(!Xt)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(e)],i=Wa(t,n);return["scroll","auto","overlay"].some(s=>i.includes(s))},Use=(t,e)=>{if(!Xt)return;let n=t;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(Hse(n,e))return n;OO(n)?n=n.host:n=n.parentNode}return n};let Ev;const jse=t=>{var o;if(!Xt)return 0;if(Ev!==void 0)return Ev;const e=document.createElement("div");e.className=`${t}-scrollbar__wrap`,e.style.visibility="hidden",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);const n=e.offsetWidth;e.style.overflow="scroll";const i=document.createElement("div");i.style.width="100%",e.appendChild(i);const s=i.offsetWidth;return(o=e.parentNode)==null||o.removeChild(e),Ev=n-s,Ev};function Wse(t,e){if(!Xt)return;if(!e){t.scrollTop=0;return}const n=[];let i=e.offsetParent;for(;i!==null&&t!==i&&t.contains(i);)n.push(i),i=i.offsetParent;const s=e.offsetTop+n.reduce((l,c)=>l+c.offsetTop,0),o=s+e.offsetHeight,r=t.scrollTop,a=r+t.clientHeight;s<r?t.scrollTop=s:o>a&&(t.scrollTop=o-t.clientHeight)}const a4=(t,e={})=>{gn(t)||uo("[useLockscreen]","You need to pass a ref param to this function");const n=e.ns||ze("popup"),i=Y(()=>n.bm("parent","hidden"));let s=0,o=!1,r="0",a=!1;const l=()=>{a||(a=!0,setTimeout(()=>{typeof document>"u"||o&&document&&(document.body.style.width=r,_a(document.body,i.value))},200))};Te(t,c=>{if(!c){l();return}a=!1,o=!tl(document.body,i.value),o&&(r=document.body.style.width,ud(document.body,i.value)),s=jse(n.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,d=Wa(document.body,"overflowY");s>0&&(u||d==="scroll")&&o&&(document.body.style.width=`calc(100% - ${s}px)`)}),qy(()=>l())},As=(t,e,{checkForDefaultPrevented:n=!0}={})=>s=>{const o=t==null?void 0:t(s);if(n===!1||!o)return e==null?void 0:e(s)},H7=t=>e=>e.pointerType==="mouse"?t(e):void 0,ss=t=>{if(t.code&&t.code!=="Unidentified")return t.code;const e=zO(t);if(e){if(Object.values(Ue).includes(e))return e;switch(e){case" ":return Ue.space;default:return""}}return""},zO=t=>{let e=t.key&&t.key!=="Unidentified"?t.key:"";if(!e&&t.type==="keyup"&&DO()){const n=t.target;e=n.value.charAt(n.selectionStart-1)}return e},Yse=_b({type:he(Boolean),default:null}),qse=_b({type:he(Function)}),HO=t=>{const e=`update:${t}`,n=`onUpdate:${t}`,i=[e],s={[t]:Yse,[n]:qse};return{useModelToggle:({indicator:r,toggleReason:a,shouldHideWhenRouteChanges:l,shouldProceed:c,onShow:u,onHide:d})=>{const h=bt(),{emit:f}=h,p=h.props,m=Y(()=>et(p[n])),y=Y(()=>p[t]===null),b=P=>{r.value!==!0&&(r.value=!0,a&&(a.value=P),et(u)&&u(P))},k=P=>{r.value!==!1&&(r.value=!1,a&&(a.value=P),et(d)&&d(P))},C=P=>{if(p.disabled===!0||et(c)&&!c())return;const T=m.value&&Xt;T&&f(e,!0),(y.value||!T)&&b(P)},$=P=>{if(p.disabled===!0||!Xt)return;const T=m.value&&Xt;T&&f(e,!1),(y.value||!T)&&k(P)},x=P=>{Xn(P)&&(p.disabled&&P?m.value&&f(e,!1):r.value!==P&&(P?b():k()))},M=()=>{r.value?$():C()};return Te(()=>p[t],x),l&&h.appContext.config.globalProperties.$route!==void 0&&Te(()=>({...h.proxy.$route}),()=>{l.value&&r.value&&$()}),Ft(()=>{x(p[t])}),{hide:$,show:C,toggle:M,hasUpdateHandler:m}},useModelToggleProps:s,useModelToggleEmits:i}};HO("modelValue");const UO=t=>{const e=bt();return Y(()=>{var n,i;return(i=(n=e==null?void 0:e.proxy)==null?void 0:n.$props)==null?void 0:i[t]})};var oo="top",hr="bottom",fr="right",ro="left",l4="auto",v1=[oo,hr,fr,ro],Cf="start",Tg="end",Gse="clippingParents",jO="viewport",Op="popper",Xse="reference",U7=v1.reduce(function(t,e){return t.concat([e+"-"+Cf,e+"-"+Tg])},[]),Qf=[].concat(v1,[l4]).reduce(function(t,e){return t.concat([e,e+"-"+Cf,e+"-"+Tg])},[]),Kse="beforeRead",Zse="read",Jse="afterRead",Qse="beforeMain",eie="main",tie="afterMain",nie="beforeWrite",sie="write",iie="afterWrite",oie=[Kse,Zse,Jse,Qse,eie,tie,nie,sie,iie];function ya(t){return t?(t.nodeName||"").toLowerCase():null}function Hr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function xf(t){var e=Hr(t).Element;return t instanceof e||t instanceof Element}function or(t){var e=Hr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function c4(t){if(typeof ShadowRoot>"u")return!1;var e=Hr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function rie(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var i=e.styles[n]||{},s=e.attributes[n]||{},o=e.elements[n];!or(o)||!ya(o)||(Object.assign(o.style,i),Object.keys(s).forEach(function(r){var a=s[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function aie(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(i){var s=e.elements[i],o=e.attributes[i]||{},r=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:n[i]),a=r.reduce(function(l,c){return l[c]="",l},{});!or(s)||!ya(s)||(Object.assign(s.style,a),Object.keys(o).forEach(function(l){s.removeAttribute(l)}))})}}var WO={name:"applyStyles",enabled:!0,phase:"write",fn:rie,effect:aie,requires:["computeStyles"]};function pa(t){return t.split("-")[0]}var Wu=Math.max,Z_=Math.min,Sf=Math.round;function $f(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),i=1,s=1;if(or(t)&&e){var o=t.offsetHeight,r=t.offsetWidth;r>0&&(i=Sf(n.width)/r||1),o>0&&(s=Sf(n.height)/o||1)}return{width:n.width/i,height:n.height/s,top:n.top/s,right:n.right/i,bottom:n.bottom/s,left:n.left/i,x:n.left/i,y:n.top/s}}function u4(t){var e=$f(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function YO(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&c4(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function rl(t){return Hr(t).getComputedStyle(t)}function lie(t){return["table","td","th"].indexOf(ya(t))>=0}function Fc(t){return((xf(t)?t.ownerDocument:t.document)||window.document).documentElement}function wb(t){return ya(t)==="html"?t:t.assignedSlot||t.parentNode||(c4(t)?t.host:null)||Fc(t)}function j7(t){return!or(t)||rl(t).position==="fixed"?null:t.offsetParent}function cie(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&or(t)){var i=rl(t);if(i.position==="fixed")return null}var s=wb(t);for(c4(s)&&(s=s.host);or(s)&&["html","body"].indexOf(ya(s))<0;){var o=rl(s);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||e&&o.willChange==="filter"||e&&o.filter&&o.filter!=="none")return s;s=s.parentNode}return null}function _1(t){for(var e=Hr(t),n=j7(t);n&&lie(n)&&rl(n).position==="static";)n=j7(n);return n&&(ya(n)==="html"||ya(n)==="body"&&rl(n).position==="static")?e:n||cie(t)||e}function d4(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Fm(t,e,n){return Wu(t,Z_(e,n))}function uie(t,e,n){var i=Fm(t,e,n);return i>n?n:i}function qO(){return{top:0,right:0,bottom:0,left:0}}function GO(t){return Object.assign({},qO(),t)}function XO(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var die=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,GO(typeof t!="number"?t:XO(t,v1))};function hie(t){var e,n=t.state,i=t.name,s=t.options,o=n.elements.arrow,r=n.modifiersData.popperOffsets,a=pa(n.placement),l=d4(a),c=[ro,fr].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!r)){var d=die(s.padding,n),h=u4(o),f=l==="y"?oo:ro,p=l==="y"?hr:fr,m=n.rects.reference[u]+n.rects.reference[l]-r[l]-n.rects.popper[u],y=r[l]-n.rects.reference[l],b=_1(o),k=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,C=m/2-y/2,$=d[f],x=k-h[u]-d[p],M=k/2-h[u]/2+C,P=Fm($,M,x),T=l;n.modifiersData[i]=(e={},e[T]=P,e.centerOffset=P-M,e)}}function fie(t){var e=t.state,n=t.options,i=n.element,s=i===void 0?"[data-popper-arrow]":i;s!=null&&(typeof s=="string"&&(s=e.elements.popper.querySelector(s),!s)||!YO(e.elements.popper,s)||(e.elements.arrow=s))}var pie={name:"arrow",enabled:!0,phase:"main",fn:hie,effect:fie,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Af(t){return t.split("-")[1]}var mie={top:"auto",right:"auto",bottom:"auto",left:"auto"};function gie(t){var e=t.x,n=t.y,i=window,s=i.devicePixelRatio||1;return{x:Sf(e*s)/s||0,y:Sf(n*s)/s||0}}function W7(t){var e,n=t.popper,i=t.popperRect,s=t.placement,o=t.variation,r=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,u=t.roundOffsets,d=t.isFixed,h=r.x,f=h===void 0?0:h,p=r.y,m=p===void 0?0:p,y=typeof u=="function"?u({x:f,y:m}):{x:f,y:m};f=y.x,m=y.y;var b=r.hasOwnProperty("x"),k=r.hasOwnProperty("y"),C=ro,$=oo,x=window;if(c){var M=_1(n),P="clientHeight",T="clientWidth";if(M===Hr(n)&&(M=Fc(n),rl(M).position!=="static"&&a==="absolute"&&(P="scrollHeight",T="scrollWidth")),M=M,s===oo||(s===ro||s===fr)&&o===Tg){$=hr;var I=d&&M===x&&x.visualViewport?x.visualViewport.height:M[P];m-=I-i.height,m*=l?1:-1}if(s===ro||(s===oo||s===hr)&&o===Tg){C=fr;var L=d&&M===x&&x.visualViewport?x.visualViewport.width:M[T];f-=L-i.width,f*=l?1:-1}}var R=Object.assign({position:a},c&&mie),V=u===!0?gie({x:f,y:m}):{x:f,y:m};if(f=V.x,m=V.y,l){var H;return Object.assign({},R,(H={},H[$]=k?"0":"",H[C]=b?"0":"",H.transform=(x.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",H))}return Object.assign({},R,(e={},e[$]=k?m+"px":"",e[C]=b?f+"px":"",e.transform="",e))}function vie(t){var e=t.state,n=t.options,i=n.gpuAcceleration,s=i===void 0?!0:i,o=n.adaptive,r=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:pa(e.placement),variation:Af(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,W7(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,W7(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var KO={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:vie,data:{}},Mv={passive:!0};function _ie(t){var e=t.state,n=t.instance,i=t.options,s=i.scroll,o=s===void 0?!0:s,r=i.resize,a=r===void 0?!0:r,l=Hr(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,Mv)}),a&&l.addEventListener("resize",n.update,Mv),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Mv)}),a&&l.removeEventListener("resize",n.update,Mv)}}var ZO={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:_ie,data:{}},yie={left:"right",right:"left",bottom:"top",top:"bottom"};function m0(t){return t.replace(/left|right|bottom|top/g,function(e){return yie[e]})}var bie={start:"end",end:"start"};function Y7(t){return t.replace(/start|end/g,function(e){return bie[e]})}function h4(t){var e=Hr(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function f4(t){return $f(Fc(t)).left+h4(t).scrollLeft}function wie(t){var e=Hr(t),n=Fc(t),i=e.visualViewport,s=n.clientWidth,o=n.clientHeight,r=0,a=0;return i&&(s=i.width,o=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(r=i.offsetLeft,a=i.offsetTop)),{width:s,height:o,x:r+f4(t),y:a}}function kie(t){var e,n=Fc(t),i=h4(t),s=(e=t.ownerDocument)==null?void 0:e.body,o=Wu(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=Wu(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+f4(t),l=-i.scrollTop;return rl(s||n).direction==="rtl"&&(a+=Wu(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function p4(t){var e=rl(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function JO(t){return["html","body","#document"].indexOf(ya(t))>=0?t.ownerDocument.body:or(t)&&p4(t)?t:JO(wb(t))}function Nm(t,e){var n;e===void 0&&(e=[]);var i=JO(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=Hr(i),r=s?[o].concat(o.visualViewport||[],p4(i)?i:[]):i,a=e.concat(r);return s?a:a.concat(Nm(wb(r)))}function Ck(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Cie(t){var e=$f(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function q7(t,e){return e===jO?Ck(wie(t)):xf(e)?Cie(e):Ck(kie(Fc(t)))}function xie(t){var e=Nm(wb(t)),n=["absolute","fixed"].indexOf(rl(t).position)>=0,i=n&&or(t)?_1(t):t;return xf(i)?e.filter(function(s){return xf(s)&&YO(s,i)&&ya(s)!=="body"}):[]}function Sie(t,e,n){var i=e==="clippingParents"?xie(t):[].concat(e),s=[].concat(i,[n]),o=s[0],r=s.reduce(function(a,l){var c=q7(t,l);return a.top=Wu(c.top,a.top),a.right=Z_(c.right,a.right),a.bottom=Z_(c.bottom,a.bottom),a.left=Wu(c.left,a.left),a},q7(t,o));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function QO(t){var e=t.reference,n=t.element,i=t.placement,s=i?pa(i):null,o=i?Af(i):null,r=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(s){case oo:l={x:r,y:e.y-n.height};break;case hr:l={x:r,y:e.y+e.height};break;case fr:l={x:e.x+e.width,y:a};break;case ro:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=s?d4(s):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case Cf:l[c]=l[c]-(e[u]/2-n[u]/2);break;case Tg:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function Pg(t,e){e===void 0&&(e={});var n=e,i=n.placement,s=i===void 0?t.placement:i,o=n.boundary,r=o===void 0?Gse:o,a=n.rootBoundary,l=a===void 0?jO:a,c=n.elementContext,u=c===void 0?Op:c,d=n.altBoundary,h=d===void 0?!1:d,f=n.padding,p=f===void 0?0:f,m=GO(typeof p!="number"?p:XO(p,v1)),y=u===Op?Xse:Op,b=t.rects.popper,k=t.elements[h?y:u],C=Sie(xf(k)?k:k.contextElement||Fc(t.elements.popper),r,l),$=$f(t.elements.reference),x=QO({reference:$,element:b,strategy:"absolute",placement:s}),M=Ck(Object.assign({},b,x)),P=u===Op?M:$,T={top:C.top-P.top+m.top,bottom:P.bottom-C.bottom+m.bottom,left:C.left-P.left+m.left,right:P.right-C.right+m.right},I=t.modifiersData.offset;if(u===Op&&I){var L=I[s];Object.keys(T).forEach(function(R){var V=[fr,hr].indexOf(R)>=0?1:-1,H=[oo,hr].indexOf(R)>=0?"y":"x";T[R]+=L[H]*V})}return T}function $ie(t,e){e===void 0&&(e={});var n=e,i=n.placement,s=n.boundary,o=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Qf:l,u=Af(i),d=u?a?U7:U7.filter(function(p){return Af(p)===u}):v1,h=d.filter(function(p){return c.indexOf(p)>=0});h.length===0&&(h=d);var f=h.reduce(function(p,m){return p[m]=Pg(t,{placement:m,boundary:s,rootBoundary:o,padding:r})[pa(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}function Aie(t){if(pa(t)===l4)return[];var e=m0(t);return[Y7(t),e,Y7(e)]}function Eie(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var s=n.mainAxis,o=s===void 0?!0:s,r=n.altAxis,a=r===void 0?!0:r,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,p=f===void 0?!0:f,m=n.allowedAutoPlacements,y=e.options.placement,b=pa(y),k=b===y,C=l||(k||!p?[m0(y)]:Aie(y)),$=[y].concat(C).reduce(function(ae,me){return ae.concat(pa(me)===l4?$ie(e,{placement:me,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):me)},[]),x=e.rects.reference,M=e.rects.popper,P=new Map,T=!0,I=$[0],L=0;L<$.length;L++){var R=$[L],V=pa(R),H=Af(R)===Cf,F=[oo,hr].indexOf(V)>=0,z=F?"width":"height",N=Pg(e,{placement:R,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),q=F?H?fr:ro:H?hr:oo;x[z]>M[z]&&(q=m0(q));var K=m0(q),X=[];if(o&&X.push(N[V]<=0),a&&X.push(N[q]<=0,N[K]<=0),X.every(function(ae){return ae})){I=R,T=!1;break}P.set(R,X)}if(T)for(var U=p?3:1,Q=function(ae){var me=$.find(function(we){var oe=P.get(we);if(oe)return oe.slice(0,ae).every(function(fe){return fe})});if(me)return I=me,"break"},ne=U;ne>0;ne--){var Z=Q(ne);if(Z==="break")break}e.placement!==I&&(e.modifiersData[i]._skip=!0,e.placement=I,e.reset=!0)}}var Mie={name:"flip",enabled:!0,phase:"main",fn:Eie,requiresIfExists:["offset"],data:{_skip:!1}};function G7(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function X7(t){return[oo,fr,hr,ro].some(function(e){return t[e]>=0})}function Tie(t){var e=t.state,n=t.name,i=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=Pg(e,{elementContext:"reference"}),a=Pg(e,{altBoundary:!0}),l=G7(r,i),c=G7(a,s,o),u=X7(l),d=X7(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var Pie={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Tie};function Iie(t,e,n){var i=pa(t),s=[ro,oo].indexOf(i)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[ro,fr].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function Lie(t){var e=t.state,n=t.options,i=t.name,s=n.offset,o=s===void 0?[0,0]:s,r=Qf.reduce(function(u,d){return u[d]=Iie(d,e.rects,o),u},{}),a=r[e.placement],l=a.x,c=a.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[i]=r}var Oie={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Lie};function Die(t){var e=t.state,n=t.name;e.modifiersData[n]=QO({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var eD={name:"popperOffsets",enabled:!0,phase:"read",fn:Die,data:{}};function Rie(t){return t==="x"?"y":"x"}function Vie(t){var e=t.state,n=t.options,i=t.name,s=n.mainAxis,o=s===void 0?!0:s,r=n.altAxis,a=r===void 0?!1:r,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=h===void 0?!0:h,p=n.tetherOffset,m=p===void 0?0:p,y=Pg(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=pa(e.placement),k=Af(e.placement),C=!k,$=d4(b),x=Rie($),M=e.modifiersData.popperOffsets,P=e.rects.reference,T=e.rects.popper,I=typeof m=="function"?m(Object.assign({},e.rects,{placement:e.placement})):m,L=typeof I=="number"?{mainAxis:I,altAxis:I}:Object.assign({mainAxis:0,altAxis:0},I),R=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,V={x:0,y:0};if(M){if(o){var H,F=$==="y"?oo:ro,z=$==="y"?hr:fr,N=$==="y"?"height":"width",q=M[$],K=q+y[F],X=q-y[z],U=f?-T[N]/2:0,Q=k===Cf?P[N]:T[N],ne=k===Cf?-T[N]:-P[N],Z=e.elements.arrow,ae=f&&Z?u4(Z):{width:0,height:0},me=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:qO(),we=me[F],oe=me[z],fe=Fm(0,P[N],ae[N]),ie=C?P[N]/2-U-fe-we-L.mainAxis:Q-fe-we-L.mainAxis,re=C?-P[N]/2+U+fe+oe+L.mainAxis:ne+fe+oe+L.mainAxis,ke=e.elements.arrow&&_1(e.elements.arrow),je=ke?$==="y"?ke.clientTop||0:ke.clientLeft||0:0,te=(H=R==null?void 0:R[$])!=null?H:0,se=q+ie-te-je,ve=q+re-te,$e=Fm(f?Z_(K,se):K,q,f?Wu(X,ve):X);M[$]=$e,V[$]=$e-q}if(a){var Se,Fe=$==="x"?oo:ro,Ye=$==="x"?hr:fr,Re=M[x],He=x==="y"?"height":"width",Me=Re+y[Fe],Ne=Re-y[Ye],st=[oo,ro].indexOf(b)!==-1,it=(Se=R==null?void 0:R[x])!=null?Se:0,ye=st?Me:Re-P[He]-T[He]-it+L.altAxis,ge=st?Re+P[He]+T[He]-it-L.altAxis:Ne,Pe=f&&st?uie(ye,Re,ge):Fm(f?ye:Me,Re,f?ge:Ne);M[x]=Pe,V[x]=Pe-Re}e.modifiersData[i]=V}}var Fie={name:"preventOverflow",enabled:!0,phase:"main",fn:Vie,requiresIfExists:["offset"]};function Nie(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Bie(t){return t===Hr(t)||!or(t)?h4(t):Nie(t)}function zie(t){var e=t.getBoundingClientRect(),n=Sf(e.width)/t.offsetWidth||1,i=Sf(e.height)/t.offsetHeight||1;return n!==1||i!==1}function Hie(t,e,n){n===void 0&&(n=!1);var i=or(e),s=or(e)&&zie(e),o=Fc(e),r=$f(t,s),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((ya(e)!=="body"||p4(o))&&(a=Bie(e)),or(e)?(l=$f(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=f4(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function Uie(t){var e=new Map,n=new Set,i=[];t.forEach(function(o){e.set(o.name,o)});function s(o){n.add(o.name);var r=[].concat(o.requires||[],o.requiresIfExists||[]);r.forEach(function(a){if(!n.has(a)){var l=e.get(a);l&&s(l)}}),i.push(o)}return t.forEach(function(o){n.has(o.name)||s(o)}),i}function jie(t){var e=Uie(t);return oie.reduce(function(n,i){return n.concat(e.filter(function(s){return s.phase===i}))},[])}function Wie(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Yie(t){var e=t.reduce(function(n,i){var s=n[i.name];return n[i.name]=s?Object.assign({},s,i,{options:Object.assign({},s.options,i.options),data:Object.assign({},s.data,i.data)}):i,n},{});return Object.keys(e).map(function(n){return e[n]})}var K7={placement:"bottom",modifiers:[],strategy:"absolute"};function Z7(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(i){return!(i&&typeof i.getBoundingClientRect=="function")})}function m4(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,i=n===void 0?[]:n,s=e.defaultOptions,o=s===void 0?K7:s;return function(r,a,l){l===void 0&&(l=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},K7,o),modifiersData:{},elements:{reference:r,popper:a},attributes:{},styles:{}},u=[],d=!1,h={state:c,setOptions:function(m){var y=typeof m=="function"?m(c.options):m;p(),c.options=Object.assign({},o,c.options,y),c.scrollParents={reference:xf(r)?Nm(r):r.contextElement?Nm(r.contextElement):[],popper:Nm(a)};var b=jie(Yie([].concat(i,c.options.modifiers)));return c.orderedModifiers=b.filter(function(k){return k.enabled}),f(),h.update()},forceUpdate:function(){if(!d){var m=c.elements,y=m.reference,b=m.popper;if(Z7(y,b)){c.rects={reference:Hie(y,_1(b),c.options.strategy==="fixed"),popper:u4(b)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(T){return c.modifiersData[T.name]=Object.assign({},T.data)});for(var k=0;k<c.orderedModifiers.length;k++){if(c.reset===!0){c.reset=!1,k=-1;continue}var C=c.orderedModifiers[k],$=C.fn,x=C.options,M=x===void 0?{}:x,P=C.name;typeof $=="function"&&(c=$({state:c,options:M,name:P,instance:h})||c)}}}},update:Wie(function(){return new Promise(function(m){h.forceUpdate(),m(c)})}),destroy:function(){p(),d=!0}};if(!Z7(r,a))return h;h.setOptions(l).then(function(m){!d&&l.onFirstUpdate&&l.onFirstUpdate(m)});function f(){c.orderedModifiers.forEach(function(m){var y=m.name,b=m.options,k=b===void 0?{}:b,C=m.effect;if(typeof C=="function"){var $=C({state:c,name:y,instance:h,options:k}),x=function(){};u.push($||x)}})}function p(){u.forEach(function(m){return m()}),u=[]}return h}}m4();var qie=[ZO,eD,KO,WO];m4({defaultModifiers:qie});var Gie=[ZO,eD,KO,WO,Oie,Mie,Fie,pie,Pie],Xie=m4({defaultModifiers:Gie});const Kie=(t,e,n={})=>{const i={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const c=Zie(l);Object.assign(r.value,c)},requires:["computeStyles"]},s=Y(()=>{const{onFirstUpdate:l,placement:c,strategy:u,modifiers:d}=E(n);return{onFirstUpdate:l,placement:c||"bottom",strategy:u||"absolute",modifiers:[...d||[],i,{name:"applyStyles",enabled:!1}]}}),o=Hn(),r=J({styles:{popper:{position:E(s).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=()=>{o.value&&(o.value.destroy(),o.value=void 0)};return Te(s,l=>{const c=E(o);c&&c.setOptions(l)},{deep:!0}),Te([t,e],([l,c])=>{a(),!(!l||!c)&&(o.value=Xie(l,c,E(s)))}),bn(()=>{a()}),{state:Y(()=>{var l;return{...((l=E(o))==null?void 0:l.state)||{}}}),styles:Y(()=>E(r).styles),attributes:Y(()=>E(r).attributes),update:()=>{var l;return(l=E(o))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=E(o))==null?void 0:l.forceUpdate()},instanceRef:Y(()=>E(o))}};function Zie(t){const e=Object.keys(t.elements);return{styles:kf(e.map(n=>[n,t.styles[n]||{}])),attributes:kf(e.map(n=>[n,t.attributes[n]]))}}const g4=t=>{if(!t)return{onClick:Tt,onMousedown:Tt,onMouseup:Tt};let e=!1,n=!1;return{onClick:r=>{e&&n&&t(r),e=n=!1},onMousedown:r=>{e=r.target===r.currentTarget},onMouseup:r=>{n=r.target===r.currentTarget}}},Jie=(t,e=0)=>{if(e===0)return t;const n=J(yt(e)&&!!e.initVal);let i=null;const s=r=>{if(tn(r)){n.value=t.value;return}i&&clearTimeout(i),i=setTimeout(()=>{n.value=t.value},r)},o=r=>{r==="leading"?_t(e)?s(e):s(e.leading):yt(e)?s(e.trailing):n.value=!1};return Ft(()=>o("leading")),Te(()=>t.value,r=>{o(r?"leading":"trailing")}),n};function J7(){let t;const e=(i,s)=>{n(),t=window.setTimeout(i,s)},n=()=>window.clearTimeout(t);return Td(()=>n()),{registerTimeout:e,cancelTimeout:n}}const xk={prefix:Math.floor(Math.random()*1e4),current:0},Qie=Symbol("elIdInjection"),v4=()=>bt()?qe(Qie,xk):xk,pr=t=>{const e=v4();!Xt&&e===xk&&Pt("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed
usage: app.provide(ID_INJECTION_KEY, {
  prefix: number,
  current: number,
})`);const n=r4();return $O(()=>E(t)||`${n.value}-id-${e.prefix}-${e.current++}`)};let mh=[];const Q7=t=>{ss(t)===Ue.esc&&mh.forEach(e=>e(t))},eoe=t=>{Ft(()=>{mh.length===0&&document.addEventListener("keydown",Q7),Xt&&mh.push(t)}),bn(()=>{mh=mh.filter(e=>e!==t),mh.length===0&&Xt&&document.removeEventListener("keydown",Q7)})},tD=()=>{const t=r4(),e=v4(),n=Y(()=>`${t.value}-popper-container-${e.prefix}`);return{id:n,selector:Y(()=>`#${n.value}`)}},toe=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},noe=()=>{const{id:t,selector:e}=tD();return Sd(()=>{Xt&&(document.body.querySelector(e.value)||toe(t.value))}),{id:t,selector:e}},soe=Ge({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),ioe=({showAfter:t,hideAfter:e,autoClose:n,open:i,close:s})=>{const{registerTimeout:o}=J7(),{registerTimeout:r,cancelTimeout:a}=J7();return{onOpen:(u,d=E(t))=>{o(()=>{i(u);const h=E(n);_t(h)&&h>0&&r(()=>{s(u)},h)},d)},onClose:(u,d=E(e))=>{a(),o(()=>{s(u)},d)}}},nD=Symbol("elForwardRef"),ooe=t=>{It(nD,{setForwardRef:n=>{t.value=n}})},roe=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),e$={current:0},t$=J(0),sD=2e3,n$=Symbol("elZIndexContextKey"),iD=Symbol("zIndexContextKey"),kb=t=>{const e=bt()?qe(n$,e$):e$,n=t||(bt()?qe(iD,void 0):void 0),i=Y(()=>{const r=E(n);return _t(r)?r:sD}),s=Y(()=>i.value+t$.value),o=()=>(e.current++,t$.value=e.current,s.value);return!Xt&&!qe(n$)&&Pt("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:i,currentZIndex:s,nextZIndex:o}},s$=Math.min,Bm=Math.max,J_=Math.round,$c=t=>({x:t,y:t}),aoe={left:"right",right:"left",bottom:"top",top:"bottom"},loe={start:"end",end:"start"};function _4(t,e){return typeof t=="function"?t(e):t}function Ef(t){return t.split("-")[0]}function Cb(t){return t.split("-")[1]}function coe(t){return t==="x"?"y":"x"}function oD(t){return t==="y"?"height":"width"}function y4(t){return["top","bottom"].includes(Ef(t))?"y":"x"}function rD(t){return coe(y4(t))}function uoe(t,e,n){n===void 0&&(n=!1);const i=Cb(t),s=rD(t),o=oD(s);let r=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(r=Q_(r)),[r,Q_(r)]}function doe(t){const e=Q_(t);return[Sk(t),e,Sk(e)]}function Sk(t){return t.replace(/start|end/g,e=>loe[e])}function hoe(t,e,n){const i=["left","right"],s=["right","left"],o=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?s:i:e?i:s;case"left":case"right":return e?o:r;default:return[]}}function foe(t,e,n,i){const s=Cb(t);let o=hoe(Ef(t),n==="start",i);return s&&(o=o.map(r=>r+"-"+s),e&&(o=o.concat(o.map(Sk)))),o}function Q_(t){return t.replace(/left|right|bottom|top/g,e=>aoe[e])}function poe(t){return{top:0,right:0,bottom:0,left:0,...t}}function moe(t){return typeof t!="number"?poe(t):{top:t,right:t,bottom:t,left:t}}function ey(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}function i$(t,e,n){let{reference:i,floating:s}=t;const o=y4(e),r=rD(e),a=oD(r),l=Ef(e),c=o==="y",u=i.x+i.width/2-s.width/2,d=i.y+i.height/2-s.height/2,h=i[a]/2-s[a]/2;let f;switch(l){case"top":f={x:u,y:i.y-s.height};break;case"bottom":f={x:u,y:i.y+i.height};break;case"right":f={x:i.x+i.width,y:d};break;case"left":f={x:i.x-s.width,y:d};break;default:f={x:i.x,y:i.y}}switch(Cb(e)){case"start":f[r]-=h*(n&&c?-1:1);break;case"end":f[r]+=h*(n&&c?-1:1);break}return f}const goe=async(t,e,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:o=[],platform:r}=n,a=o.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(e));let c=await r.getElementRects({reference:t,floating:e,strategy:s}),{x:u,y:d}=i$(c,i,l),h=i,f={},p=0;for(let m=0;m<a.length;m++){const{name:y,fn:b}=a[m],{x:k,y:C,data:$,reset:x}=await b({x:u,y:d,initialPlacement:i,placement:h,strategy:s,middlewareData:f,rects:c,platform:r,elements:{reference:t,floating:e}});u=k??u,d=C??d,f={...f,[y]:{...f[y],...$}},x&&p<=50&&(p++,typeof x=="object"&&(x.placement&&(h=x.placement),x.rects&&(c=x.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:s}):x.rects),{x:u,y:d}=i$(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:s,middlewareData:f}};async function voe(t,e){var n;e===void 0&&(e={});const{x:i,y:s,platform:o,rects:r,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=_4(e,t),p=moe(f),y=a[h?d==="floating"?"reference":"floating":d],b=ey(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(y)))==null||n?y:y.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),k=d==="floating"?{...r.floating,x:i,y:s}:r.reference,C=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),$=await(o.isElement==null?void 0:o.isElement(C))?await(o.getScale==null?void 0:o.getScale(C))||{x:1,y:1}:{x:1,y:1},x=ey(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:k,offsetParent:C,strategy:l}):k);return{top:(b.top-x.top+p.top)/$.y,bottom:(x.bottom-b.bottom+p.bottom)/$.y,left:(b.left-x.left+p.left)/$.x,right:(x.right-b.right+p.right)/$.x}}const _oe=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,i;const{placement:s,middlewareData:o,rects:r,initialPlacement:a,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:m=!0,...y}=_4(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=Ef(s),k=Ef(a)===a,C=await(l.isRTL==null?void 0:l.isRTL(c.floating)),$=h||(k||!m?[Q_(a)]:doe(a));!h&&p!=="none"&&$.push(...foe(a,m,p,C));const x=[a,...$],M=await voe(e,y),P=[];let T=((i=o.flip)==null?void 0:i.overflows)||[];if(u&&P.push(M[b]),d){const V=uoe(s,r,C);P.push(M[V[0]],M[V[1]])}if(T=[...T,{placement:s,overflows:P}],!P.every(V=>V<=0)){var I,L;const V=(((I=o.flip)==null?void 0:I.index)||0)+1,H=x[V];if(H)return{data:{index:V,overflows:T},reset:{placement:H}};let F=(L=T.filter(z=>z.overflows[0]<=0).sort((z,N)=>z.overflows[1]-N.overflows[1])[0])==null?void 0:L.placement;if(!F)switch(f){case"bestFit":{var R;const z=(R=T.map(N=>[N.placement,N.overflows.filter(q=>q>0).reduce((q,K)=>q+K,0)]).sort((N,q)=>N[1]-q[1])[0])==null?void 0:R[0];z&&(F=z);break}case"initialPlacement":F=a;break}if(s!==F)return{reset:{placement:F}}}return{}}}};async function yoe(t,e){const{placement:n,platform:i,elements:s}=t,o=await(i.isRTL==null?void 0:i.isRTL(s.floating)),r=Ef(n),a=Cb(n),l=y4(n)==="y",c=["left","top"].includes(r)?-1:1,u=o&&l?-1:1,d=_4(e,t);let{mainAxis:h,crossAxis:f,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof p=="number"&&(f=a==="end"?p*-1:p),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}const $k=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,i;const{x:s,y:o,placement:r,middlewareData:a}=e,l=await yoe(e,t);return r===((n=a.offset)==null?void 0:n.placement)&&(i=a.arrow)!=null&&i.alignmentOffset?{}:{x:s+l.x,y:o+l.y,data:{...l,placement:r}}}}};function Ac(t){return aD(t)?(t.nodeName||"").toLowerCase():"#document"}function Lo(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Nc(t){var e;return(e=(aD(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function aD(t){return t instanceof Node||t instanceof Lo(t).Node}function al(t){return t instanceof Element||t instanceof Lo(t).Element}function ba(t){return t instanceof HTMLElement||t instanceof Lo(t).HTMLElement}function o$(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Lo(t).ShadowRoot}function y1(t){const{overflow:e,overflowX:n,overflowY:i,display:s}=mr(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(s)}function boe(t){return["table","td","th"].includes(Ac(t))}function b4(t){const e=w4(),n=mr(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function woe(t){let e=Mf(t);for(;ba(e)&&!xb(e);){if(b4(e))return e;e=Mf(e)}return null}function w4(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function xb(t){return["html","body","#document"].includes(Ac(t))}function mr(t){return Lo(t).getComputedStyle(t)}function Sb(t){return al(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Mf(t){if(Ac(t)==="html")return t;const e=t.assignedSlot||t.parentNode||o$(t)&&t.host||Nc(t);return o$(e)?e.host:e}function lD(t){const e=Mf(t);return xb(e)?t.ownerDocument?t.ownerDocument.body:t.body:ba(e)&&y1(e)?e:lD(e)}function Ak(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=lD(t),o=s===((i=t.ownerDocument)==null?void 0:i.body),r=Lo(s);return o?e.concat(r,r.visualViewport||[],y1(s)?s:[],r.frameElement&&n?Ak(r.frameElement):[]):e.concat(s,Ak(s,[],n))}function cD(t){const e=mr(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=ba(t),o=s?t.offsetWidth:n,r=s?t.offsetHeight:i,a=J_(n)!==o||J_(i)!==r;return a&&(n=o,i=r),{width:n,height:i,$:a}}function uD(t){return al(t)?t:t.contextElement}function qh(t){const e=uD(t);if(!ba(e))return $c(1);const n=e.getBoundingClientRect(),{width:i,height:s,$:o}=cD(e);let r=(o?J_(n.width):n.width)/i,a=(o?J_(n.height):n.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const koe=$c(0);function dD(t){const e=Lo(t);return!w4()||!e.visualViewport?koe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Coe(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Lo(t)?!1:e}function Ig(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),o=uD(t);let r=$c(1);e&&(i?al(i)&&(r=qh(i)):r=qh(t));const a=Coe(o,n,i)?dD(o):$c(0);let l=(s.left+a.x)/r.x,c=(s.top+a.y)/r.y,u=s.width/r.x,d=s.height/r.y;if(o){const h=Lo(o),f=i&&al(i)?Lo(i):i;let p=h,m=p.frameElement;for(;m&&i&&f!==p;){const y=qh(m),b=m.getBoundingClientRect(),k=mr(m),C=b.left+(m.clientLeft+parseFloat(k.paddingLeft))*y.x,$=b.top+(m.clientTop+parseFloat(k.paddingTop))*y.y;l*=y.x,c*=y.y,u*=y.x,d*=y.y,l+=C,c+=$,p=Lo(m),m=p.frameElement}}return ey({width:u,height:d,x:l,y:c})}const xoe=[":popover-open",":modal"];function hD(t){return xoe.some(e=>{try{return t.matches(e)}catch{return!1}})}function Soe(t){let{elements:e,rect:n,offsetParent:i,strategy:s}=t;const o=s==="fixed",r=Nc(i),a=e?hD(e.floating):!1;if(i===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=$c(1);const u=$c(0),d=ba(i);if((d||!d&&!o)&&((Ac(i)!=="body"||y1(r))&&(l=Sb(i)),ba(i))){const h=Ig(i);c=qh(i),u.x=h.x+i.clientLeft,u.y=h.y+i.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function $oe(t){return Array.from(t.getClientRects())}function fD(t){return Ig(Nc(t)).left+Sb(t).scrollLeft}function Aoe(t){const e=Nc(t),n=Sb(t),i=t.ownerDocument.body,s=Bm(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=Bm(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let r=-n.scrollLeft+fD(t);const a=-n.scrollTop;return mr(i).direction==="rtl"&&(r+=Bm(e.clientWidth,i.clientWidth)-s),{width:s,height:o,x:r,y:a}}function Eoe(t,e){const n=Lo(t),i=Nc(t),s=n.visualViewport;let o=i.clientWidth,r=i.clientHeight,a=0,l=0;if(s){o=s.width,r=s.height;const c=w4();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a,y:l}}function Moe(t,e){const n=Ig(t,!0,e==="fixed"),i=n.top+t.clientTop,s=n.left+t.clientLeft,o=ba(t)?qh(t):$c(1),r=t.clientWidth*o.x,a=t.clientHeight*o.y,l=s*o.x,c=i*o.y;return{width:r,height:a,x:l,y:c}}function r$(t,e,n){let i;if(e==="viewport")i=Eoe(t,n);else if(e==="document")i=Aoe(Nc(t));else if(al(e))i=Moe(e,n);else{const s=dD(t);i={...e,x:e.x-s.x,y:e.y-s.y}}return ey(i)}function pD(t,e){const n=Mf(t);return n===e||!al(n)||xb(n)?!1:mr(n).position==="fixed"||pD(n,e)}function Toe(t,e){const n=e.get(t);if(n)return n;let i=Ak(t,[],!1).filter(a=>al(a)&&Ac(a)!=="body"),s=null;const o=mr(t).position==="fixed";let r=o?Mf(t):t;for(;al(r)&&!xb(r);){const a=mr(r),l=b4(r);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||y1(r)&&!l&&pD(t,r))?i=i.filter(u=>u!==r):s=a,r=Mf(r)}return e.set(t,i),i}function Poe(t){let{element:e,boundary:n,rootBoundary:i,strategy:s}=t;const r=[...n==="clippingAncestors"?Toe(e,this._c):[].concat(n),i],a=r[0],l=r.reduce((c,u)=>{const d=r$(e,u,s);return c.top=Bm(d.top,c.top),c.right=s$(d.right,c.right),c.bottom=s$(d.bottom,c.bottom),c.left=Bm(d.left,c.left),c},r$(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ioe(t){const{width:e,height:n}=cD(t);return{width:e,height:n}}function Loe(t,e,n){const i=ba(e),s=Nc(e),o=n==="fixed",r=Ig(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=$c(0);if(i||!i&&!o)if((Ac(e)!=="body"||y1(s))&&(a=Sb(e)),i){const d=Ig(e,!0,o,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else s&&(l.x=fD(s));const c=r.left+a.scrollLeft-l.x,u=r.top+a.scrollTop-l.y;return{x:c,y:u,width:r.width,height:r.height}}function a$(t,e){return!ba(t)||mr(t).position==="fixed"?null:e?e(t):t.offsetParent}function mD(t,e){const n=Lo(t);if(!ba(t)||hD(t))return n;let i=a$(t,e);for(;i&&boe(i)&&mr(i).position==="static";)i=a$(i,e);return i&&(Ac(i)==="html"||Ac(i)==="body"&&mr(i).position==="static"&&!b4(i))?n:i||woe(t)||n}const Ooe=async function(t){const e=this.getOffsetParent||mD,n=this.getDimensions;return{reference:Loe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,...await n(t.floating)}}};function Doe(t){return mr(t).direction==="rtl"}const Roe={convertOffsetParentRelativeRectToViewportRelativeRect:Soe,getDocumentElement:Nc,getClippingRect:Poe,getOffsetParent:mD,getElementRects:Ooe,getClientRects:$oe,getDimensions:Ioe,getScale:qh,isElement:al,isRTL:Doe},Ek=_oe,Mk=(t,e,n)=>{const i=new Map,s={platform:Roe,...n},o={...s.platform,_c:i};return goe(t,e,{...s,platform:o})};function Voe(t){let e;function n(){if(t.value==null)return;const{selectionStart:s,selectionEnd:o,value:r}=t.value;s==null||o==null||(e={selectionStart:s,selectionEnd:o,value:r,beforeTxt:r.slice(0,Math.max(0,s)),afterTxt:r.slice(Math.max(0,o))})}function i(){if(t.value==null||e==null)return;const{value:s}=t.value,{beforeTxt:o,afterTxt:r,selectionStart:a}=e;if(o==null||r==null||a==null)return;let l=s.length;if(s.endsWith(r))l=s.length-r.length;else if(s.startsWith(o))l=o.length;else{const c=o[a-1],u=s.indexOf(c,a-1);u!==-1&&(l=u+1)}t.value.setSelectionRange(l,l)}return[n,i]}let J2=function(t){return t[t.TEXT=1]="TEXT",t[t.CLASS=2]="CLASS",t[t.STYLE=4]="STYLE",t[t.PROPS=8]="PROPS",t[t.FULL_PROPS=16]="FULL_PROPS",t[t.HYDRATE_EVENTS=32]="HYDRATE_EVENTS",t[t.STABLE_FRAGMENT=64]="STABLE_FRAGMENT",t[t.KEYED_FRAGMENT=128]="KEYED_FRAGMENT",t[t.UNKEYED_FRAGMENT=256]="UNKEYED_FRAGMENT",t[t.NEED_PATCH=512]="NEED_PATCH",t[t.DYNAMIC_SLOTS=1024]="DYNAMIC_SLOTS",t[t.HOISTED=-1]="HOISTED",t[t.BAIL=-2]="BAIL",t}({});function Foe(t){return ls(t)&&t.type===ks}const lc=t=>{const e=Ee(t)?t:[t],n=[];return e.forEach(i=>{var s;Ee(i)?n.push(...lc(i)):ls(i)&&((s=i.component)!=null&&s.subTree)?n.push(i,...lc(i.component.subTree)):ls(i)&&Ee(i.children)?n.push(...lc(i.children)):ls(i)&&i.shapeFlag===2?n.push(...lc(i.type())):n.push(i)}),n},Noe=(t,e,n)=>lc(t.subTree).filter(i=>{var s;return ls(i)&&((s=i.type)==null?void 0:s.name)===e&&!!i.component}).map(i=>i.component.uid).map(i=>n[i]).filter(i=>!!i),Boe=(t,e)=>{const n=Hn({}),i=Hn([]),s=new WeakMap,o=c=>{n.value[c.uid]=c,Am(n),Ft(()=>{const u=c.getVnode().el,d=u.parentNode;if(!s.has(d)){s.set(d,[]);const h=d.insertBefore.bind(d);d.insertBefore=(f,p)=>(s.get(d).some(m=>f===m||p===m)&&Am(n),h(f,p))}s.get(d).push(u)})},r=c=>{delete n.value[c.uid],Am(n);const u=c.getVnode().el,d=u.parentNode,h=s.get(d),f=h.indexOf(u);h.splice(f,1)},a=()=>{i.value=Noe(t,e,n.value)},l=c=>c.render();return{children:i,addChild:o,removeChild:r,ChildrenSorter:ce({setup(c,{slots:u}){return()=>(a(),u.default?vt(l,{render:u.default}):null)}})}},Wi=_b({type:String,values:hl,required:!1}),gD=Symbol("size"),vD=()=>{const t=qe(gD,{});return Y(()=>E(t.size)||"")};function ep(t,{disabled:e,beforeFocus:n,afterFocus:i,beforeBlur:s,afterBlur:o}={}){const{emit:r}=bt(),a=Hn(),l=J(!1),c=h=>{const f=et(n)?n(h):!1;E(e)||l.value||f||(l.value=!0,r("focus",h),i==null||i())},u=h=>{var p;const f=et(s)?s(h):!1;E(e)||h.relatedTarget&&((p=a.value)!=null&&p.contains(h.relatedTarget))||f||(l.value=!1,r("blur",h),o==null||o())},d=h=>{var f,p;E(e)||Eg(h.target)||(f=a.value)!=null&&f.contains(document.activeElement)&&a.value!==document.activeElement||(p=t.value)==null||p.focus()};return Te([a,()=>E(e)],([h,f])=>{h&&(f?h.removeAttribute("tabindex"):h.setAttribute("tabindex","-1"))}),zn(a,"focus",c,!0),zn(a,"blur",u,!0),zn(a,"click",d,!0),{isFocused:l,wrapperRef:a,handleFocus:c,handleBlur:u}}function k4({afterComposition:t,emit:e}){const n=J(!1),i=a=>{e==null||e("compositionstart",a),n.value=!0},s=a=>{e==null||e("compositionupdate",a),n.value=!0},o=a=>{e==null||e("compositionend",a),n.value&&(n.value=!1,ot(()=>t(a)))};return{isComposing:n,handleComposition:a=>{a.type==="compositionend"?o(a):s(a)},handleCompositionStart:i,handleCompositionUpdate:s,handleCompositionEnd:o}}const _D=Symbol("emptyValuesContextKey"),zoe="use-empty-values",Hoe=["",void 0,null],Uoe=void 0,b1=Ge({emptyValues:Array,valueOnClear:{type:he([String,Number,Boolean,Function]),default:void 0,validator:t=>(t=et(t)?t():t,Ee(t)?t.every(e=>!e):!t)}}),C4=(t,e)=>{const n=bt()?qe(_D,J({})):J({}),i=Y(()=>t.emptyValues||n.value.emptyValues||Hoe),s=Y(()=>et(t.valueOnClear)?t.valueOnClear():t.valueOnClear!==void 0?t.valueOnClear:et(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:e!==void 0?e:Uoe),o=r=>{let a=!0;return Ee(r)?a=i.value.some(l=>Fi(r,l)):a=i.value.includes(r),a};return o(s.value)||Pt(zoe,"value-on-clear should be a value of empty-values"),{emptyValues:i,valueOnClear:s,isEmptyValue:o}},joe=Ge({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),vr=t=>t4(joe,t),yD=t=>{const e=t.props,n=Ee(e)?kf(e.map(i=>[i,{}])):e;t.setPropsDefaults=i=>{if(n){for(const[s,o]of Object.entries(i)){const r=n[s];if(Dt(n,s)){if(Jx(r)){n[s]={...r,default:o};continue}n[s]={type:r,default:o}}}t.props=n}}},jt=(t,e)=>{if(t.install=n=>{for(const i of[t,...Object.values(e??{})])n.component(i.name,i)},e)for(const[n,i]of Object.entries(e))t[n]=i;return yD(t),t},Woe=(t,e)=>(t.install=n=>{t._context=n._context,n.config.globalProperties[e]=t},t),Yoe=(t,e)=>(t.install=n=>{n.directive(e,t)},t),Is=t=>(t.install=Tt,yD(t),t);var qoe=ce({__name:"teleport",props:s4,setup(t){return(e,n)=>e.disabled?le(e.$slots,"default",{key:0}):(v(),D(Sa,{key:1,to:e.to},[le(e.$slots,"default")],8,["to"]))}}),Goe=qoe;const $b=jt(Goe);/*! Element Plus Icons Vue v2.3.2 */var Xoe=ce({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.59 30.59 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.59 30.59 0 0 0-42.752 0z"})]))}}),tp=Xoe,Koe=ce({name:"ArrowLeft",__name:"arrow-left",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0"})]))}}),Tf=Koe,Zoe=ce({name:"ArrowRight",__name:"arrow-right",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),ma=Zoe,Joe=ce({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),x4=Joe,Qoe=ce({name:"Calendar",__name:"calendar",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M128 384v512h768V192H768v32a32 32 0 1 1-64 0v-32H320v32a32 32 0 0 1-64 0v-32H128v128h768v64zm192-256h384V96a32 32 0 1 1 64 0v32h160a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H96a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h160V96a32 32 0 0 1 64 0zm-32 384h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m192-192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64m0 192h64a32 32 0 1 1 0 64h-64a32 32 0 1 1 0-64"})]))}}),ere=Qoe,tre=ce({name:"Check",__name:"check",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),bD=tre,nre=ce({name:"CircleCheck",__name:"circle-check",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),g("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752z"})]))}}),S4=nre,sre=ce({name:"CircleCloseFilled",__name:"circle-close-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"})]))}}),wD=sre,ire=ce({name:"CircleClose",__name:"circle-close",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m466.752 512-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248z"}),g("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"})]))}}),Bc=ire,ore=ce({name:"Clock",__name:"clock",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768m0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896"}),g("path",{fill:"currentColor",d:"M480 256a32 32 0 0 1 32 32v256a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"}),g("path",{fill:"currentColor",d:"M480 512h256q32 0 32 32t-32 32H480q-32 0-32-32t32-32"})]))}}),kD=ore,rre=ce({name:"Close",__name:"close",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),Fr=rre,are=ce({name:"DArrowLeft",__name:"d-arrow-left",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M529.408 149.376a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L197.76 534.272a32 32 0 0 1 0-44.672zm256 0a29.12 29.12 0 0 1 41.728 0 30.59 30.59 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.59 30.59 0 0 1-.512 43.264 29.12 29.12 0 0 1-41.216-.512L453.76 534.272a32 32 0 0 1 0-44.672z"})]))}}),Ec=are,lre=ce({name:"DArrowRight",__name:"d-arrow-right",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M452.864 149.312a29.12 29.12 0 0 1 41.728.064L826.24 489.664a32 32 0 0 1 0 44.672L494.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L764.736 512 452.864 192a30.59 30.59 0 0 1 0-42.688m-256 0a29.12 29.12 0 0 1 41.728.064L570.24 489.664a32 32 0 0 1 0 44.672L238.592 874.624a29.12 29.12 0 0 1-41.728 0 30.59 30.59 0 0 1 0-42.752L508.736 512 196.864 192a30.59 30.59 0 0 1 0-42.688"})]))}}),Mc=lre,cre=ce({name:"Delete",__name:"delete",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),ure=cre,dre=ce({name:"Document",__name:"document",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),hre=dre,fre=ce({name:"FullScreen",__name:"full-screen",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),pre=fre,mre=ce({name:"Hide",__name:"hide",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4s-12.8-9.6-22.4-9.6-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176S0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4s3.2 16 9.6 22.4 12.8 9.6 22.4 9.6 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4m-646.4 528Q115.2 579.2 76.8 512q43.2-72 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4m140.8-96Q352 555.2 352 512c0-44.8 16-83.2 48-112s67.2-48 112-48c28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6q-43.2 72-153.6 172.8c-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176S1024 528 1024 512s-48.001-73.6-134.401-176"}),g("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112s-67.2 48-112 48"})]))}}),gre=mre,vre=ce({name:"InfoFilled",__name:"info-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),Tk=vre,_re=ce({name:"Loading",__name:"loading",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"})]))}}),Pf=_re,yre=ce({name:"Minus",__name:"minus",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64"})]))}}),bre=yre,wre=ce({name:"MoreFilled",__name:"more-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),l$=wre,kre=ce({name:"PictureFilled",__name:"picture-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M96 896a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h832a32 32 0 0 1 32 32v704a32 32 0 0 1-32 32zm315.52-228.48-68.928-68.928a32 32 0 0 0-45.248 0L128 768.064h778.688l-242.112-290.56a32 32 0 0 0-49.216 0L458.752 665.408a32 32 0 0 1-47.232 2.112M256 384a96 96 0 1 0 192.064-.064A96 96 0 0 0 256 384"})]))}}),Cre=kre,xre=ce({name:"Plus",__name:"plus",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),CD=xre,Sre=ce({name:"RefreshLeft",__name:"refresh-left",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),$re=Sre,Are=ce({name:"RefreshRight",__name:"refresh-right",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M784.512 230.272v-50.56a32 32 0 1 1 64 0v149.056a32 32 0 0 1-32 32H667.52a32 32 0 1 1 0-64h92.992A320 320 0 1 0 524.8 833.152a320 320 0 0 0 320-320h64a384 384 0 0 1-384 384 384 384 0 0 1-384-384 384 384 0 0 1 643.712-282.88"})]))}}),Ere=Are,Mre=ce({name:"ScaleToOriginal",__name:"scale-to-original",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M813.176 180.706a60.235 60.235 0 0 1 60.236 60.235v481.883a60.235 60.235 0 0 1-60.236 60.235H210.824a60.235 60.235 0 0 1-60.236-60.235V240.94a60.235 60.235 0 0 1 60.236-60.235h602.352zm0-60.235H210.824A120.47 120.47 0 0 0 90.353 240.94v481.883a120.47 120.47 0 0 0 120.47 120.47h602.353a120.47 120.47 0 0 0 120.471-120.47V240.94a120.47 120.47 0 0 0-120.47-120.47zm-120.47 180.705a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118m-361.412 0a30.12 30.12 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.12 30.12 0 0 0-30.118-30.118M512 361.412a30.12 30.12 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.12 30.12 0 0 0 512 361.412M512 512a30.12 30.12 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.12 30.12 0 0 0 512 512"})]))}}),Tre=Mre,Pre=ce({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),xD=Pre,Ire=ce({name:"View",__name:"view",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288m0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.19 160.19 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),Lre=Ire,Ore=ce({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"})]))}}),$4=Ore,Dre=ce({name:"ZoomIn",__name:"zoom-in",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),SD=Dre,Rre=ce({name:"ZoomOut",__name:"zoom-out",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),Vre=Rre;const as=he([String,Object,Function]),Fre={Close:Fr},$D={Close:Fr,SuccessFilled:xD,InfoFilled:Tk,WarningFilled:$4,CircleCloseFilled:wD},If={primary:Tk,success:xD,warning:$4,error:wD,info:Tk},A4={validating:Pf,success:S4,error:Bc},Nre=["light","dark"],Bre=Ge({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:K_(If),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:Nre,default:"light"}}),zre={close:t=>t instanceof MouseEvent},Hre=Ge({size:{type:he([Number,String])},color:{type:String}});var Ure=ce({name:"ElIcon",inheritAttrs:!1,__name:"icon",props:Hre,setup(t){const e=t,n=ze("icon"),i=Y(()=>{const{size:s,color:o}=e,r=ci(s);return!r&&!o?{}:{fontSize:r,"--color":o}});return(s,o)=>(v(),A("i",Zt({class:E(n).b(),style:i.value},s.$attrs),[le(s.$slots,"default")],16))}}),jre=Ure;const be=jt(jre);var Wre=ce({name:"ElAlert",__name:"alert",props:Bre,emits:zre,setup(t,{emit:e}){const{Close:n}=$D,i=t,s=e,o=di(),r=ze("alert"),a=J(!0),l=Y(()=>If[i.type]),c=Y(()=>{var h;if(i.description)return!0;const d=(h=o.default)==null?void 0:h.call(o);return d?lc(d).some(f=>!Foe(f)):!1}),u=d=>{a.value=!1,s("close",d)};return(d,h)=>(v(),D(ji,{name:E(r).b("fade"),persisted:""},{default:w(()=>[De(g("div",{class:G([E(r).b(),E(r).m(t.type),E(r).is("center",t.center),E(r).is(t.effect)]),role:"alert"},[t.showIcon&&(d.$slots.icon||l.value)?(v(),D(E(be),{key:0,class:G([E(r).e("icon"),E(r).is("big",c.value)])},{default:w(()=>[le(d.$slots,"icon",{},()=>[(v(),D(Ct(l.value)))])]),_:3},8,["class"])):O("v-if",!0),g("div",{class:G(E(r).e("content"))},[t.title||d.$slots.title?(v(),A("span",{key:0,class:G([E(r).e("title"),{"with-description":c.value}])},[le(d.$slots,"title",{},()=>[B(S(t.title),1)])],2)):O("v-if",!0),c.value?(v(),A("p",{key:1,class:G(E(r).e("description"))},[le(d.$slots,"default",{},()=>[B(S(t.description),1)])],2)):O("v-if",!0),t.closable?(v(),A(ee,{key:2},[t.closeText?(v(),A("div",{key:0,class:G([E(r).e("close-btn"),E(r).is("customed")]),onClick:u},S(t.closeText),3)):(v(),D(E(be),{key:1,class:G(E(r).e("close-btn")),onClick:u},{default:w(()=>[_(E(n))]),_:1},8,["class"]))],64)):O("v-if",!0)],2)],2),[[Ut,a.value]])]),_:3},8,["name"]))}}),Yre=Wre;const Ur=jt(Yre),AD=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],ED=Ge({role:{type:String,values:AD,default:"tooltip"}}),E4=Symbol("popper"),MD=Symbol("popperContent");var qre=ce({name:"ElPopperArrow",inheritAttrs:!1,__name:"arrow",setup(t,{expose:e}){const n=ze("popper"),{arrowRef:i,arrowStyle:s}=qe(MD,void 0);return bn(()=>{i.value=void 0}),e({arrowRef:i}),(o,r)=>(v(),A("span",{ref_key:"arrowRef",ref:i,class:G(E(n).e("arrow")),style:Xe(E(s)),"data-popper-arrow":""},null,6))}}),Gre=qre;const TD=Ge({virtualRef:{type:he(Object)},virtualTriggering:Boolean,onMouseenter:{type:he(Function)},onMouseleave:{type:he(Function)},onClick:{type:he(Function)},onKeydown:{type:he(Function)},onFocus:{type:he(Function)},onBlur:{type:he(Function)},onContextmenu:{type:he(Function)},id:String,open:Boolean}),Q2="ElOnlyChild",PD=ce({name:Q2,setup(t,{slots:e,attrs:n}){var s;const i=roe(((s=qe(nD))==null?void 0:s.setForwardRef)??Tt);return()=>{var l;const o=(l=e.default)==null?void 0:l.call(e,n);if(!o)return null;const[r,a]=ID(o);return r?(a>1&&Pt(Q2,"requires exact only one valid child."),De(ur(r,n),[[i]])):(Pt(Q2,"no valid child node found"),null)}}});function ID(t){if(!t)return[null,0];const e=t,n=e.filter(i=>i.type!==ks).length;for(const i of e){if(yt(i))switch(i.type){case ks:continue;case il:case"svg":return[c$(i),n];case ee:return ID(i.children);default:return[i,n]}return[c$(i),n]}return[null,0]}function c$(t){const e=ze("only-child");return _("span",{class:e.e("content")},[t])}var Xre=ce({name:"ElPopperTrigger",inheritAttrs:!1,__name:"trigger",props:TD,setup(t,{expose:e}){const n=t,{role:i,triggerRef:s}=qe(E4,void 0);ooe(s);const o=Y(()=>a.value?n.id:void 0),r=Y(()=>{if(i&&i.value==="tooltip")return n.open&&n.id?n.id:void 0}),a=Y(()=>{if(i&&i.value!=="tooltip")return i.value}),l=Y(()=>a.value?`${n.open}`:void 0);let c;const u=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return Ft(()=>{Te(()=>n.virtualRef,d=>{d&&(s.value=js(d))},{immediate:!0}),Te(s,(d,h)=>{c==null||c(),c=void 0,$o(h)&&u.forEach(f=>{const p=n[f];p&&h.removeEventListener(f.slice(2).toLowerCase(),p,["onFocus","onBlur"].includes(f))}),$o(d)&&(u.forEach(f=>{const p=n[f];p&&d.addEventListener(f.slice(2).toLowerCase(),p,["onFocus","onBlur"].includes(f))}),Eg(d)&&(c=Te([o,r,a,l],f=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((p,m)=>{ai(f[m])?d.removeAttribute(p):d.setAttribute(p,f[m])})},{immediate:!0}))),$o(h)&&Eg(h)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(f=>h.removeAttribute(f))},{immediate:!0})}),bn(()=>{if(c==null||c(),c=void 0,s.value&&$o(s.value)){const d=s.value;u.forEach(h=>{const f=n[h];f&&d.removeEventListener(h.slice(2).toLowerCase(),f,["onFocus","onBlur"].includes(h))}),s.value=void 0}}),e({triggerRef:s}),(d,h)=>t.virtualTriggering?O("v-if",!0):(v(),D(E(PD),Zt({key:0},d.$attrs,{"aria-controls":o.value,"aria-describedby":r.value,"aria-expanded":l.value,"aria-haspopup":a.value}),{default:w(()=>[le(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}}),Kre=Xre;const LD=Ge({arrowOffset:{type:Number,default:5}}),Zre=["fixed","absolute"],Jre=Ge({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:he(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:Qf,default:"bottom"},popperOptions:{type:he(Object),default:()=>({})},strategy:{type:String,values:Zre,default:"absolute"}}),OD=Ge({...Jre,...LD,id:String,style:{type:he([String,Array,Object])},className:{type:he([String,Array,Object])},effect:{type:he(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:Boolean,trapping:Boolean,popperClass:{type:he([String,Array,Object])},popperStyle:{type:he([String,Array,Object])},referenceEl:{type:he(Object)},triggerTargetEl:{type:he(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...vr(["ariaLabel"]),loop:Boolean}),Qre={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},eae=Ge({size:{type:String,values:hl},disabled:Boolean}),tae=Ge({...eae,model:Object,rules:{type:he(Object)},labelPosition:{type:String,values:["left","right","top"],default:"right"},requireAsteriskPosition:{type:String,values:["left","right"],default:"left"},labelWidth:{type:[String,Number],default:""},labelSuffix:{type:String,default:""},inline:Boolean,inlineMessage:Boolean,statusIcon:Boolean,showMessage:{type:Boolean,default:!0},validateOnRuleChange:{type:Boolean,default:!0},hideRequiredAsterisk:Boolean,scrollToError:Boolean,scrollIntoViewOptions:{type:he([Object,Boolean]),default:!0}}),nae={validate:(t,e,n)=>(Ee(t)||Ke(t))&&Xn(e)&&Ke(n)},Pd=Symbol("formContextKey"),dd=Symbol("formItemContextKey"),$i=(t,e={})=>{const n=J(void 0),i=e.prop?n:UO("size"),s=e.global?n:vD(),o=e.form?{size:void 0}:qe(Pd,void 0),r=e.formItem?{size:void 0}:qe(dd,void 0);return Y(()=>i.value||E(t)||(r==null?void 0:r.size)||(o==null?void 0:o.size)||s.value||"")},ys=t=>{const e=UO("disabled"),n=qe(Pd,void 0);return Y(()=>e.value??E(t)??(n==null?void 0:n.disabled)??!1)},ho=()=>({form:qe(Pd,void 0),formItem:qe(dd,void 0)}),gl=(t,{formItemContext:e,disableIdGeneration:n,disableIdManagement:i})=>{n||(n=J(!1)),i||(i=J(!1));const s=bt(),o=()=>{let c=s==null?void 0:s.parent;for(;c;){if(c.type.name==="ElFormItem")return!1;if(c.type.name==="ElLabelWrap")return!0;c=c.parent}return!1},r=J();let a;const l=Y(()=>{var c;return!!(!(t.label||t.ariaLabel)&&e&&e.inputIds&&((c=e.inputIds)==null?void 0:c.length)<=1)});return Ft(()=>{a=Te([Sn(t,"id"),n],([c,u])=>{const d=c??(u?void 0:pr().value);d!==r.value&&(e!=null&&e.removeInputId&&!o()&&(r.value&&e.removeInputId(r.value),!(i!=null&&i.value)&&!u&&d&&e.addInputId(d)),r.value=d)},{immediate:!0})}),dl(()=>{a&&a(),e!=null&&e.removeInputId&&r.value&&e.removeInputId(r.value)}),{isLabeledByFormItem:l,inputId:r}},sae=["","error","validating","success"],iae=Ge({label:String,labelWidth:{type:[String,Number]},labelPosition:{type:String,values:["left","right","top",""],default:""},prop:{type:he([String,Array])},required:{type:Boolean,default:void 0},rules:{type:he([Object,Array])},error:String,validateStatus:{type:String,values:sae},for:String,inlineMessage:{type:Boolean,default:void 0},showMessage:{type:Boolean,default:!0},size:{type:String,values:hl}}),Dp=t=>Ee(t)?t[0]:t,to=t=>!t&&t!==0?[]:Ee(t)?t:[t],oae="ElForm";function rae(){const t=J([]),e=Y(()=>{if(!t.value.length)return"0";const o=Math.max(...t.value);return o?`${o}px`:""});function n(o){const r=t.value.indexOf(o);return r===-1&&e.value==="0"&&Pt(oae,`unexpected width ${o}`),r}function i(o,r){if(o&&r){const a=n(r);t.value.splice(a,1,o)}else o&&t.value.push(o)}function s(o){const r=n(o);r>-1&&t.value.splice(r,1)}return{autoLabelWidth:e,registerLabelWidth:i,deregisterLabelWidth:s}}const Tv=(t,e)=>{const n=Us(e).map(i=>Ee(i)?i.join("."):i);return n.length>0?t.filter(i=>i.propString&&n.includes(i.propString)):t},Xd="ElForm";var aae=ce({name:Xd,__name:"form",props:tae,emits:nae,setup(t,{expose:e,emit:n}){const i=t,s=n,o=J(),r=In([]),a=new Map,l=$i(),c=ze("form"),u=Y(()=>{const{labelPosition:P,inline:T}=i;return[c.b(),c.m(l.value||"default"),{[c.m(`label-${P}`)]:P,[c.m("inline")]:T}]}),d=P=>Tv(r,[P])[0],h=P=>{r.push(P),P.propString&&(a.has(P.propString)?P.setInitialValue(a.get(P.propString)):a.set(P.propString,ju(P.fieldValue)))},f=P=>{P.prop&&r.splice(r.indexOf(P),1)},p=P=>{if(!i.model){Pt(Xd,"model is required for setInitialValues to work.");return}if(!P){Pt(Xd,"initModel is required for setInitialValues to work.");return}for(const T of a.keys())a.set(T,ju(gc(P,T).value));r.forEach(T=>{T.prop&&T.setInitialValue(gc(P,T.prop).value)})},m=(P=[])=>{if(!i.model){Pt(Xd,"model is required for resetFields to work.");return}Tv(r,P).forEach(L=>L.resetField());const T=new Set(r.map(L=>L.propString).filter(Boolean)),I=P.length>0?Us(P).map(L=>Ee(L)?L.join("."):L):[...a.keys()];for(const L of I)!T.has(L)&&a.has(L)&&(gc(i.model,L).value=ju(a.get(L)))},y=(P=[])=>{Tv(r,P).forEach(T=>T.clearValidate())},b=Y(()=>{const P=!!i.model;return P||Pt(Xd,"model is required for validate to work."),P}),k=P=>{if(r.length===0)return[];const T=Tv(r,P);return T.length?T:(Pt(Xd,"please pass correct props!"),[])},C=async P=>x(void 0,P),$=async(P=[])=>{if(!b.value)return!1;const T=k(P);if(T.length===0)return!0;let I={};for(const L of T)try{await L.validate(""),L.validateState==="error"&&!L.error&&L.resetField()}catch(R){I={...I,...R}}return Object.keys(I).length===0?!0:Promise.reject(I)},x=async(P=[],T)=>{var R;let I=!1;const L=!et(T);try{return I=await $(P),I===!0&&await(T==null?void 0:T(I)),I}catch(V){if(V instanceof Error)throw V;const H=V;return i.scrollToError&&o.value&&((R=o.value.querySelector(`.${c.b()}-item.is-error`))==null||R.scrollIntoView(i.scrollIntoViewOptions)),!I&&await(T==null?void 0:T(!1,H)),L&&Promise.reject(H)}},M=P=>{var I;const T=d(P);T&&((I=T.$el)==null||I.scrollIntoView(i.scrollIntoViewOptions))};return Te(()=>i.rules,()=>{i.validateOnRuleChange&&C().catch(P=>Pt(P))},{deep:!0,flush:"post"}),It(Pd,In({...co(i),emit:s,resetFields:m,clearValidate:y,validateField:x,getField:d,addField:h,removeField:f,setInitialValues:p,...rae()})),e({validate:C,validateField:x,resetFields:m,clearValidate:y,scrollToField:M,getField:d,fields:r,setInitialValues:p}),(P,T)=>(v(),A("form",{ref_key:"formRef",ref:o,class:G(u.value)},[le(P.$slots,"default")],2))}}),lae=aae;const u$="ElLabelWrap";var cae=ce({name:u$,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(t,{slots:e}){const n=qe(Pd,void 0),i=qe(dd);i||uo(u$,"usage: <el-form-item><label-wrap /></el-form-item>");const s=ze("form"),o=J(),r=J(0),a=()=>{var u;if((u=o.value)!=null&&u.firstElementChild){const d=window.getComputedStyle(o.value.firstElementChild).width;return Math.ceil(Number.parseFloat(d))}else return 0},l=(u="update")=>{ot(()=>{e.default&&t.isAutoWidth&&(u==="update"?r.value=a():u==="remove"&&(n==null||n.deregisterLabelWidth(r.value)))})},c=()=>l("update");return Ft(()=>{c()}),bn(()=>{l("remove")}),ul(()=>c()),Te(r,(u,d)=>{t.updateAll&&(n==null||n.registerLabelWidth(u,d))}),Es(Y(()=>{var u;return((u=o.value)==null?void 0:u.firstElementChild)??null}),c),()=>{var d,h;if(!e)return null;const{isAutoWidth:u}=t;if(u){const f=n==null?void 0:n.autoLabelWidth,p=i==null?void 0:i.hasLabel,m={};if(p&&f&&f!=="auto"){const y=Math.max(0,Number.parseInt(f,10)-r.value),b=(i.labelPosition||n.labelPosition)==="left"?"marginRight":"marginLeft";y&&(m[b]=`${y}px`)}return _("div",{ref:o,class:[s.be("item","label-wrap")],style:m},[(d=e.default)==null?void 0:d.call(e)])}else return _(ee,{ref:o},[(h=e.default)==null?void 0:h.call(e)])}}});function Eu(){return Eu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Eu.apply(this,arguments)}function uae(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Lg(t,e)}function Pk(t){return Pk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Pk(t)}function Lg(t,e){return Lg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,s){return i.__proto__=s,i},Lg(t,e)}function dae(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function g0(t,e,n){return dae()?g0=Reflect.construct.bind():g0=function(s,o,r){var a=[null];a.push.apply(a,o);var l=Function.bind.apply(s,a),c=new l;return r&&Lg(c,r.prototype),c},g0.apply(null,arguments)}function hae(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Ik(t){var e=typeof Map=="function"?new Map:void 0;return Ik=function(i){if(i===null||!hae(i))return i;if(typeof i!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(i))return e.get(i);e.set(i,s)}function s(){return g0(i,arguments,Pk(this).constructor)}return s.prototype=Object.create(i.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),Lg(s,i)},Ik(t)}var fae=/%[sdj%]/g,pae=function(){};typeof process<"u"&&process.env;function Lk(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var i=n.field;e[i]=e[i]||[],e[i].push(n)}),e}function Ao(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];var s=0,o=n.length;if(typeof t=="function")return t.apply(null,n);if(typeof t=="string"){var r=t.replace(fae,function(a){if(a==="%%")return"%";if(s>=o)return a;switch(a){case"%s":return String(n[s++]);case"%d":return Number(n[s++]);case"%j":try{return JSON.stringify(n[s++])}catch{return"[Circular]"}break;default:return a}});return r}return t}function mae(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function Bs(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||mae(e)&&typeof t=="string"&&!t)}function gae(t,e,n){var i=[],s=0,o=t.length;function r(a){i.push.apply(i,a||[]),s++,s===o&&n(i)}t.forEach(function(a){e(a,r)})}function d$(t,e,n){var i=0,s=t.length;function o(r){if(r&&r.length){n(r);return}var a=i;i=i+1,a<s?e(t[a],o):n([])}o([])}function vae(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,t[n]||[])}),e}var h$=function(t){uae(e,t);function e(n,i){var s;return s=t.call(this,"Async Validation Error")||this,s.errors=n,s.fields=i,s}return e}(Ik(Error));function _ae(t,e,n,i,s){if(e.first){var o=new Promise(function(h,f){var p=function(b){return i(b),b.length?f(new h$(b,Lk(b))):h(s)},m=vae(t);d$(m,n,p)});return o.catch(function(h){return h}),o}var r=e.firstFields===!0?Object.keys(t):e.firstFields||[],a=Object.keys(t),l=a.length,c=0,u=[],d=new Promise(function(h,f){var p=function(y){if(u.push.apply(u,y),c++,c===l)return i(u),u.length?f(new h$(u,Lk(u))):h(s)};a.length||(i(u),h(s)),a.forEach(function(m){var y=t[m];r.indexOf(m)!==-1?d$(y,n,p):gae(y,n,p)})});return d.catch(function(h){return h}),d}function yae(t){return!!(t&&t.message!==void 0)}function bae(t,e){for(var n=t,i=0;i<e.length;i++){if(n==null)return n;n=n[e[i]]}return n}function f$(t,e){return function(n){var i;return t.fullFields?i=bae(e,t.fullFields):i=e[n.field||t.fullField],yae(n)?(n.field=n.field||t.fullField,n.fieldValue=i,n):{message:typeof n=="function"?n():n,fieldValue:i,field:n.field||t.fullField}}}function p$(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];typeof i=="object"&&typeof t[n]=="object"?t[n]=Eu({},t[n],i):t[n]=i}}return t}var DD=function(e,n,i,s,o,r){e.required&&(!i.hasOwnProperty(e.field)||Bs(n,r||e.type))&&s.push(Ao(o.messages.required,e.fullField))},wae=function(e,n,i,s,o){(/^\s+$/.test(n)||n==="")&&s.push(Ao(o.messages.whitespace,e.fullField))},Pv,kae=function(){if(Pv)return Pv;var t="[a-fA-F\\d:]",e=function($){return $&&$.includeBoundaries?"(?:(?<=\\s|^)(?="+t+")|(?<="+t+")(?=\\s|$))":""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",i="[a-fA-F\\d]{1,4}",s=(`
(?:
(?:`+i+":){7}(?:"+i+`|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8
(?:`+i+":){6}(?:"+n+"|:"+i+`|:)|                             // 1:2:3:4:5:6::    1:2:3:4:5:6::8   1:2:3:4:5:6::8  1:2:3:4:5:6::1.2.3.4
(?:`+i+":){5}(?::"+n+"|(?::"+i+`){1,2}|:)|                   // 1:2:3:4:5::      1:2:3:4:5::7:8   1:2:3:4:5::8    1:2:3:4:5::7:1.2.3.4
(?:`+i+":){4}(?:(?::"+i+"){0,1}:"+n+"|(?::"+i+`){1,3}|:)| // 1:2:3:4::        1:2:3:4::6:7:8   1:2:3:4::8      1:2:3:4::6:7:1.2.3.4
(?:`+i+":){3}(?:(?::"+i+"){0,2}:"+n+"|(?::"+i+`){1,4}|:)| // 1:2:3::          1:2:3::5:6:7:8   1:2:3::8        1:2:3::5:6:7:1.2.3.4
(?:`+i+":){2}(?:(?::"+i+"){0,3}:"+n+"|(?::"+i+`){1,5}|:)| // 1:2::            1:2::4:5:6:7:8   1:2::8          1:2::4:5:6:7:1.2.3.4
(?:`+i+":){1}(?:(?::"+i+"){0,4}:"+n+"|(?::"+i+`){1,6}|:)| // 1::              1::3:4:5:6:7:8   1::8            1::3:4:5:6:7:1.2.3.4
(?::(?:(?::`+i+"){0,5}:"+n+"|(?::"+i+`){1,7}|:))             // ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8  ::8             ::1.2.3.4
)(?:%[0-9a-zA-Z]{1,})?                                             // %eth0            %1
`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),o=new RegExp("(?:^"+n+"$)|(?:^"+s+"$)"),r=new RegExp("^"+n+"$"),a=new RegExp("^"+s+"$"),l=function($){return $&&$.exact?o:new RegExp("(?:"+e($)+n+e($)+")|(?:"+e($)+s+e($)+")","g")};l.v4=function(C){return C&&C.exact?r:new RegExp(""+e(C)+n+e(C),"g")},l.v6=function(C){return C&&C.exact?a:new RegExp(""+e(C)+s+e(C),"g")};var c="(?:(?:[a-z]+:)?//)",u="(?:\\S+(?::\\S*)?@)?",d=l.v4().source,h=l.v6().source,f="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",p="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",m="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",y="(?::\\d{2,5})?",b='(?:[/?#][^\\s"]*)?',k="(?:"+c+"|www\\.)"+u+"(?:localhost|"+d+"|"+h+"|"+f+p+m+")"+y+b;return Pv=new RegExp("(?:^"+k+"$)","i"),Pv},m$={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Up={integer:function(e){return Up.number(e)&&parseInt(e,10)===e},float:function(e){return Up.number(e)&&!Up.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch{return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!Up.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(m$.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(kae())},hex:function(e){return typeof e=="string"&&!!e.match(m$.hex)}},Cae=function(e,n,i,s,o){if(e.required&&n===void 0){DD(e,n,i,s,o);return}var r=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=e.type;r.indexOf(a)>-1?Up[a](n)||s.push(Ao(o.messages.types[a],e.fullField,e.type)):a&&typeof n!==e.type&&s.push(Ao(o.messages.types[a],e.fullField,e.type))},xae=function(e,n,i,s,o){var r=typeof e.len=="number",a=typeof e.min=="number",l=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,u=n,d=null,h=typeof n=="number",f=typeof n=="string",p=Array.isArray(n);if(h?d="number":f?d="string":p&&(d="array"),!d)return!1;p&&(u=n.length),f&&(u=n.replace(c,"_").length),r?u!==e.len&&s.push(Ao(o.messages[d].len,e.fullField,e.len)):a&&!l&&u<e.min?s.push(Ao(o.messages[d].min,e.fullField,e.min)):l&&!a&&u>e.max?s.push(Ao(o.messages[d].max,e.fullField,e.max)):a&&l&&(u<e.min||u>e.max)&&s.push(Ao(o.messages[d].range,e.fullField,e.min,e.max))},Kd="enum",Sae=function(e,n,i,s,o){e[Kd]=Array.isArray(e[Kd])?e[Kd]:[],e[Kd].indexOf(n)===-1&&s.push(Ao(o.messages[Kd],e.fullField,e[Kd].join(", ")))},$ae=function(e,n,i,s,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||s.push(Ao(o.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var r=new RegExp(e.pattern);r.test(n)||s.push(Ao(o.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},dn={required:DD,whitespace:wae,type:Cae,range:xae,enum:Sae,pattern:$ae},Aae=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n,"string")&&!e.required)return i();dn.required(e,n,s,r,o,"string"),Bs(n,"string")||(dn.type(e,n,s,r,o),dn.range(e,n,s,r,o),dn.pattern(e,n,s,r,o),e.whitespace===!0&&dn.whitespace(e,n,s,r,o))}i(r)},Eae=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return i();dn.required(e,n,s,r,o),n!==void 0&&dn.type(e,n,s,r,o)}i(r)},Mae=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(n===""&&(n=void 0),Bs(n)&&!e.required)return i();dn.required(e,n,s,r,o),n!==void 0&&(dn.type(e,n,s,r,o),dn.range(e,n,s,r,o))}i(r)},Tae=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return i();dn.required(e,n,s,r,o),n!==void 0&&dn.type(e,n,s,r,o)}i(r)},Pae=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return i();dn.required(e,n,s,r,o),Bs(n)||dn.type(e,n,s,r,o)}i(r)},Iae=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return i();dn.required(e,n,s,r,o),n!==void 0&&(dn.type(e,n,s,r,o),dn.range(e,n,s,r,o))}i(r)},Lae=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return i();dn.required(e,n,s,r,o),n!==void 0&&(dn.type(e,n,s,r,o),dn.range(e,n,s,r,o))}i(r)},Oae=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(n==null&&!e.required)return i();dn.required(e,n,s,r,o,"array"),n!=null&&(dn.type(e,n,s,r,o),dn.range(e,n,s,r,o))}i(r)},Dae=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return i();dn.required(e,n,s,r,o),n!==void 0&&dn.type(e,n,s,r,o)}i(r)},Rae="enum",Vae=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return i();dn.required(e,n,s,r,o),n!==void 0&&dn[Rae](e,n,s,r,o)}i(r)},Fae=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n,"string")&&!e.required)return i();dn.required(e,n,s,r,o),Bs(n,"string")||dn.pattern(e,n,s,r,o)}i(r)},Nae=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n,"date")&&!e.required)return i();if(dn.required(e,n,s,r,o),!Bs(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),dn.type(e,l,s,r,o),l&&dn.range(e,l.getTime(),s,r,o)}}i(r)},Bae=function(e,n,i,s,o){var r=[],a=Array.isArray(n)?"array":typeof n;dn.required(e,n,s,r,o,a),i(r)},ew=function(e,n,i,s,o){var r=e.type,a=[],l=e.required||!e.required&&s.hasOwnProperty(e.field);if(l){if(Bs(n,r)&&!e.required)return i();dn.required(e,n,s,a,o,r),Bs(n,r)||dn.type(e,n,s,a,o)}i(a)},zae=function(e,n,i,s,o){var r=[],a=e.required||!e.required&&s.hasOwnProperty(e.field);if(a){if(Bs(n)&&!e.required)return i();dn.required(e,n,s,r,o)}i(r)},zm={string:Aae,method:Eae,number:Mae,boolean:Tae,regexp:Pae,integer:Iae,float:Lae,array:Oae,object:Dae,enum:Vae,pattern:Fae,date:Nae,url:ew,hex:ew,email:ew,required:Bae,any:zae};function Ok(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var Dk=Ok(),w1=function(){function t(n){this.rules=null,this._messages=Dk,this.define(n)}var e=t.prototype;return e.define=function(i){var s=this;if(!i)throw new Error("Cannot configure a schema with no rules");if(typeof i!="object"||Array.isArray(i))throw new Error("Rules must be an object");this.rules={},Object.keys(i).forEach(function(o){var r=i[o];s.rules[o]=Array.isArray(r)?r:[r]})},e.messages=function(i){return i&&(this._messages=p$(Ok(),i)),this._messages},e.validate=function(i,s,o){var r=this;s===void 0&&(s={}),o===void 0&&(o=function(){});var a=i,l=s,c=o;if(typeof l=="function"&&(c=l,l={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(null,a),Promise.resolve(a);function u(m){var y=[],b={};function k($){if(Array.isArray($)){var x;y=(x=y).concat.apply(x,$)}else y.push($)}for(var C=0;C<m.length;C++)k(m[C]);y.length?(b=Lk(y),c(y,b)):c(null,a)}if(l.messages){var d=this.messages();d===Dk&&(d=Ok()),p$(d,l.messages),l.messages=d}else l.messages=this.messages();var h={},f=l.keys||Object.keys(this.rules);f.forEach(function(m){var y=r.rules[m],b=a[m];y.forEach(function(k){var C=k;typeof C.transform=="function"&&(a===i&&(a=Eu({},a)),b=a[m]=C.transform(b)),typeof C=="function"?C={validator:C}:C=Eu({},C),C.validator=r.getValidationMethod(C),C.validator&&(C.field=m,C.fullField=C.fullField||m,C.type=r.getType(C),h[m]=h[m]||[],h[m].push({rule:C,value:b,source:a,field:m}))})});var p={};return _ae(h,l,function(m,y){var b=m.rule,k=(b.type==="object"||b.type==="array")&&(typeof b.fields=="object"||typeof b.defaultField=="object");k=k&&(b.required||!b.required&&m.value),b.field=m.field;function C(M,P){return Eu({},P,{fullField:b.fullField+"."+M,fullFields:b.fullFields?[].concat(b.fullFields,[M]):[M]})}function $(M){M===void 0&&(M=[]);var P=Array.isArray(M)?M:[M];!l.suppressWarning&&P.length&&t.warning("async-validator:",P),P.length&&b.message!==void 0&&(P=[].concat(b.message));var T=P.map(f$(b,a));if(l.first&&T.length)return p[b.field]=1,y(T);if(!k)y(T);else{if(b.required&&!m.value)return b.message!==void 0?T=[].concat(b.message).map(f$(b,a)):l.error&&(T=[l.error(b,Ao(l.messages.required,b.field))]),y(T);var I={};b.defaultField&&Object.keys(m.value).map(function(V){I[V]=b.defaultField}),I=Eu({},I,m.rule.fields);var L={};Object.keys(I).forEach(function(V){var H=I[V],F=Array.isArray(H)?H:[H];L[V]=F.map(C.bind(null,V))});var R=new t(L);R.messages(l.messages),m.rule.options&&(m.rule.options.messages=l.messages,m.rule.options.error=l.error),R.validate(m.value,m.rule.options||l,function(V){var H=[];T&&T.length&&H.push.apply(H,T),V&&V.length&&H.push.apply(H,V),y(H.length?H:null)})}}var x;if(b.asyncValidator)x=b.asyncValidator(b,m.value,$,m.source,l);else if(b.validator){try{x=b.validator(b,m.value,$,m.source,l)}catch(M){console.error==null||console.error(M),l.suppressValidatorError||setTimeout(function(){throw M},0),$(M.message)}x===!0?$():x===!1?$(typeof b.message=="function"?b.message(b.fullField||b.field):b.message||(b.fullField||b.field)+" fails"):x instanceof Array?$(x):x instanceof Error&&$(x.message)}x&&x.then&&x.then(function(){return $()},function(M){return $(M)})},function(m){u(m)},a)},e.getType=function(i){if(i.type===void 0&&i.pattern instanceof RegExp&&(i.type="pattern"),typeof i.validator!="function"&&i.type&&!zm.hasOwnProperty(i.type))throw new Error(Ao("Unknown rule type %s",i.type));return i.type||"string"},e.getValidationMethod=function(i){if(typeof i.validator=="function")return i.validator;var s=Object.keys(i),o=s.indexOf("message");return o!==-1&&s.splice(o,1),s.length===1&&s[0]==="required"?zm.required:zm[this.getType(i)]||void 0},t}();w1.register=function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");zm[e]=n};w1.warning=pae;w1.messages=Dk;w1.validators=zm;const Hae=["role","aria-labelledby"];var Uae=ce({name:"ElFormItem",__name:"form-item",props:iae,setup(t,{expose:e}){const n=t,i=di(),s=qe(Pd,void 0),o=qe(dd,void 0),r=$i(void 0,{formItem:!1}),a=ze("form-item"),l=pr().value,c=J([]),u=J(""),d=bse(u,100),h=J(""),f=J();let p,m=!1;const y=Y(()=>n.labelPosition||(s==null?void 0:s.labelPosition)),b=Y(()=>y.value==="top"?{}:{width:ci(n.labelWidth??(s==null?void 0:s.labelWidth))}),k=Y(()=>{if(y.value==="top"||s!=null&&s.inline)return{};if(!n.label&&!n.labelWidth&&L)return{};const ie=ci(n.labelWidth??(s==null?void 0:s.labelWidth));return!n.label&&!i.label?{marginLeft:ie}:{}}),C=Y(()=>[a.b(),a.m(r.value),a.is("error",u.value==="error"),a.is("validating",u.value==="validating"),a.is("success",u.value==="success"),a.is("required",z.value||n.required),a.is("no-asterisk",s==null?void 0:s.hideRequiredAsterisk),(s==null?void 0:s.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[a.m("feedback")]:s==null?void 0:s.statusIcon,[a.m(`label-${y.value}`)]:y.value}]),$=Y(()=>Xn(n.inlineMessage)?n.inlineMessage:(s==null?void 0:s.inlineMessage)||!1),x=Y(()=>[a.e("error"),{[a.em("error","inline")]:$.value}]),M=Y(()=>n.prop?Ee(n.prop)?n.prop.join("."):n.prop:""),P=Y(()=>!!(n.label||i.label)),T=Y(()=>n.for??(c.value.length===1?c.value[0]:void 0)),I=Y(()=>!T.value&&P.value),L=!!o,R=Y(()=>{const ie=s==null?void 0:s.model;if(!(!ie||!n.prop))return gc(ie,n.prop).value}),V=Y(()=>{const{required:ie}=n,re=[];n.rules&&re.push(...Us(n.rules));const ke=s==null?void 0:s.rules;if(ke&&n.prop){const je=gc(ke,n.prop).value;je&&re.push(...Us(je))}if(ie!==void 0){const je=re.map((te,se)=>[te,se]).filter(([te])=>"required"in te);if(je.length>0)for(const[te,se]of je)te.required!==ie&&(re[se]={...te,required:ie});else re.push({required:ie})}return re}),H=Y(()=>V.value.length>0),F=ie=>V.value.filter(re=>!re.trigger||!ie?!0:Ee(re.trigger)?re.trigger.includes(ie):re.trigger===ie).map(({trigger:re,...ke})=>ke),z=Y(()=>V.value.some(ie=>ie.required)),N=Y(()=>d.value==="error"&&n.showMessage&&((s==null?void 0:s.showMessage)??!0)),q=Y(()=>`${n.label||""}${(s==null?void 0:s.labelSuffix)||""}`),K=ie=>{u.value=ie},X=ie=>{var je;const{errors:re,fields:ke}=ie;(!re||!ke)&&console.error(ie),K("error"),h.value=re?((je=re==null?void 0:re[0])==null?void 0:je.message)??`${n.prop} is required`:"",s==null||s.emit("validate",n.prop,!1,h.value)},U=()=>{K("success"),s==null||s.emit("validate",n.prop,!0,"")},Q=async ie=>{const re=M.value;return new w1({[re]:ie}).validate({[re]:R.value},{firstFields:!0}).then(()=>(U(),!0)).catch(ke=>(X(ke),Promise.reject(ke)))},ne=async(ie,re)=>{if(m||!n.prop)return!1;const ke=et(re);if(!H.value)return re==null||re(!1),!1;const je=F(ie);return je.length===0?(re==null||re(!0),!0):(K("validating"),Q(je).then(()=>(re==null||re(!0),!0)).catch(te=>{const{fields:se}=te;return re==null||re(!1,se),ke?!1:Promise.reject(se)}))},Z=()=>{K(""),h.value="",m=!1},ae=async()=>{const ie=s==null?void 0:s.model;if(!ie||!n.prop)return;const re=gc(ie,n.prop);m=!0,re.value=ju(p),await ot(),Z(),m=!1},me=ie=>{c.value.includes(ie)||c.value.push(ie)},we=ie=>{c.value=c.value.filter(re=>re!==ie)},oe=ie=>{p=ju(ie)};Te(()=>n.error,ie=>{h.value=ie||"",K(ie?"error":"")},{immediate:!0}),Te(()=>n.validateStatus,ie=>K(ie||""));const fe=In({...co(n),$el:f,size:r,validateMessage:h,validateState:u,labelId:l,inputIds:c,isGroup:I,hasLabel:P,fieldValue:R,addInputId:me,removeInputId:we,resetField:ae,clearValidate:Z,validate:ne,propString:M,setInitialValue:oe});return It(dd,fe),Ft(()=>{n.prop&&(oe(R.value),s==null||s.addField(fe))}),bn(()=>{s==null||s.removeField(fe)}),e({size:r,validateMessage:h,validateState:u,validate:ne,clearValidate:Z,resetField:ae,setInitialValue:oe}),(ie,re)=>{var ke;return v(),A("div",{ref_key:"formItemRef",ref:f,class:G(C.value),role:I.value?"group":void 0,"aria-labelledby":I.value?E(l):void 0},[_(E(cae),{"is-auto-width":b.value.width==="auto","update-all":((ke=E(s))==null?void 0:ke.labelWidth)==="auto"},{default:w(()=>[t.label||ie.$slots.label?(v(),D(Ct(T.value?"label":"div"),{key:0,id:E(l),for:T.value,class:G(E(a).e("label")),style:Xe(b.value)},{default:w(()=>[le(ie.$slots,"label",{label:q.value},()=>[B(S(q.value),1)])]),_:3},8,["id","for","class","style"])):O("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),g("div",{class:G(E(a).e("content")),style:Xe(k.value)},[le(ie.$slots,"default"),_(ib,{name:`${E(a).namespace.value}-zoom-in-top`},{default:w(()=>[N.value?le(ie.$slots,"error",{key:0,error:h.value},()=>[g("div",{class:G(x.value)},S(h.value),3)]):O("v-if",!0)]),_:3},8,["name"])],6)],10,Hae)}}}),RD=Uae;const sn=jt(lae,{FormItem:RD}),en=Is(RD),tw="focus-trap.focus-after-trapped",nw="focus-trap.focus-after-released",jae="focus-trap.focusout-prevented",g$={cancelable:!0,bubbles:!1},Wae={cancelable:!0,bubbles:!1},v$="focusAfterTrapped",_$="focusAfterReleased",VD=Symbol("elFocusTrap"),M4=J(),Ab=J(0),T4=J(0);let Iv=0;const FD=t=>{const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0||i===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e},y$=(t,e)=>{for(const n of t)if(!Yae(n,e))return n},Yae=(t,e)=>{if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1},qae=t=>{const e=FD(t);return[y$(e,t),y$(e.reverse(),t)]},Gae=t=>t instanceof HTMLInputElement&&"select"in t,Il=(t,e)=>{if(t){const n=document.activeElement;i4(t,{preventScroll:!0}),T4.value=window.performance.now(),t!==n&&Gae(t)&&e&&t.select()}};function b$(t,e){const n=[...t],i=t.indexOf(e);return i!==-1&&n.splice(i,1),n}const Xae=()=>{let t=[];return{push:i=>{const s=t[0];s&&i!==s&&s.pause(),t=b$(t,i),t.unshift(i)},remove:i=>{var s,o;t=b$(t,i),(o=(s=t[0])==null?void 0:s.resume)==null||o.call(s)}}},Kae=(t,e=!1)=>{const n=document.activeElement;for(const i of t)if(Il(i,e),document.activeElement!==n)return},w$=Xae(),Zae=()=>Ab.value>T4.value,Lv=()=>{M4.value="pointer",Ab.value=window.performance.now()},k$=()=>{M4.value="keyboard",Ab.value=window.performance.now()},Jae=()=>(Ft(()=>{Iv===0&&(document.addEventListener("mousedown",Lv),document.addEventListener("touchstart",Lv),document.addEventListener("keydown",k$)),Iv++}),bn(()=>{Iv--,Iv<=0&&(document.removeEventListener("mousedown",Lv),document.removeEventListener("touchstart",Lv),document.removeEventListener("keydown",k$))}),{focusReason:M4,lastUserFocusTimestamp:Ab,lastAutomatedFocusTimestamp:T4}),Ov=t=>new CustomEvent(jae,{...Wae,detail:t});var Qae=ce({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[v$,_$,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const n=J();let i,s;const{focusReason:o}=Jae();eoe(p=>{t.trapped&&!r.paused&&e("release-requested",p)});const r={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},a=p=>{if(!t.loop&&!t.trapped||r.paused)return;const{altKey:m,ctrlKey:y,metaKey:b,currentTarget:k,shiftKey:C}=p,{loop:$}=t,x=ss(p)===Ue.tab&&!m&&!y&&!b,M=document.activeElement;if(x&&M){const P=k,[T,I]=qae(P);if(T&&I){if(!C&&M===I){const L=Ov({focusReason:o.value});e("focusout-prevented",L),L.defaultPrevented||(p.preventDefault(),$&&Il(T,!0))}else if(C&&[T,P].includes(M)){const L=Ov({focusReason:o.value});e("focusout-prevented",L),L.defaultPrevented||(p.preventDefault(),$&&Il(I,!0))}}else if(M===P){const L=Ov({focusReason:o.value});e("focusout-prevented",L),L.defaultPrevented||p.preventDefault()}}};It(VD,{focusTrapRef:n,onKeydown:a}),Te(()=>t.focusTrapEl,p=>{p&&(n.value=p)},{immediate:!0}),Te([n],([p],[m])=>{p&&(p.addEventListener("keydown",a),p.addEventListener("focusin",u),p.addEventListener("focusout",d)),m&&(m.removeEventListener("keydown",a),m.removeEventListener("focusin",u),m.removeEventListener("focusout",d))});const l=p=>{e(v$,p)},c=p=>e(_$,p),u=p=>{const m=E(n);if(!m)return;const y=p.target,b=p.relatedTarget,k=y&&m.contains(y);t.trapped||b&&m.contains(b)||(i=b),k&&e("focusin",p),!r.paused&&t.trapped&&(k?s=y:Il(s,!0))},d=p=>{const m=E(n);if(!(r.paused||!m))if(t.trapped){const y=p.relatedTarget;!ai(y)&&!m.contains(y)&&setTimeout(()=>{if(!r.paused&&t.trapped){const b=Ov({focusReason:o.value});e("focusout-prevented",b),b.defaultPrevented||Il(s,!0)}},0)}else{const y=p.target;y&&m.contains(y)||e("focusout",p)}};async function h(){await ot();const p=E(n);if(p){w$.push(r);const m=p.contains(document.activeElement)?i:document.activeElement;if(i=m,!p.contains(m)){const y=new Event(tw,g$);p.addEventListener(tw,l),p.dispatchEvent(y),y.defaultPrevented||ot(()=>{let b=t.focusStartEl;Ke(b)||(Il(b),document.activeElement!==b&&(b="first")),b==="first"&&Kae(FD(p),!0),(document.activeElement===m||b==="container")&&Il(p)})}}}function f(){const p=E(n);if(p){p.removeEventListener(tw,l);const m=new CustomEvent(nw,{...g$,detail:{focusReason:o.value}});p.addEventListener(nw,c),p.dispatchEvent(m),!m.defaultPrevented&&(o.value=="keyboard"||!Zae()||p.contains(document.activeElement))&&Il(i??document.body),p.removeEventListener(nw,c),w$.remove(r),i=null,s=null}}return Ft(()=>{t.trapped&&h(),Te(()=>t.trapped,p=>{p?h():f()})}),bn(()=>{t.trapped&&f(),n.value&&(n.value.removeEventListener("keydown",a),n.value.removeEventListener("focusin",u),n.value.removeEventListener("focusout",d),n.value=void 0),i=null,s=null}),{onKeydown:a}}}),hi=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n};function ele(t,e,n,i,s,o){return le(t.$slots,"default",{handleKeydown:t.onKeydown})}var tle=hi(Qae,[["render",ele]]),k1=tle;const nle=(t,e=[])=>{const{placement:n,strategy:i,popperOptions:s}=t,o={placement:n,strategy:i,...s,modifiers:[...ile(t),...e]};return ole(o,s==null?void 0:s.modifiers),o},sle=t=>{if(Xt)return js(t)};function ile(t){const{offset:e,gpuAcceleration:n,fallbackPlacements:i}=t;return[{name:"offset",options:{offset:[0,e??12]}},{name:"preventOverflow",options:{padding:{top:0,bottom:0,left:0,right:0}}},{name:"flip",options:{padding:5,fallbackPlacements:i}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function ole(t,e){e&&(t.modifiers=[...t.modifiers,...e??[]])}const rle=0,ale=t=>{const{popperInstanceRef:e,contentRef:n,triggerRef:i,role:s}=qe(E4,void 0),o=J(),r=Y(()=>t.arrowOffset),a=Y(()=>({name:"eventListeners",enabled:!!t.visible})),l=Y(()=>{const k=E(o),C=E(r)??rle;return{name:"arrow",enabled:!Wne(k),options:{element:k,padding:C}}}),c=Y(()=>({onFirstUpdate:()=>{p()},...nle(t,[E(l),E(a)])})),u=Y(()=>sle(t.referenceEl)||E(i)),{attributes:d,state:h,styles:f,update:p,forceUpdate:m,instanceRef:y}=Kie(u,n,c);Te(y,k=>e.value=k,{flush:"sync"}),Ft(()=>{Te(()=>{var k,C;return(C=(k=E(u))==null?void 0:k.getBoundingClientRect)==null?void 0:C.call(k)},()=>{p()})});let b;return Te(()=>t.visible,k=>{b==null||b(),b=void 0,k&&(b=Es(n,p).stop)}),bn(()=>{e.value=void 0,b==null||b(),b=void 0}),{attributes:d,arrowRef:o,contentRef:n,instanceRef:y,state:h,styles:f,role:s,forceUpdate:m,update:p}},lle=(t,{attributes:e,styles:n,role:i})=>{const{nextZIndex:s}=kb(),o=ze("popper"),r=Y(()=>E(e).popper),a=J(_t(t.zIndex)?t.zIndex:s()),l=Y(()=>[o.b(),o.is("pure",t.pure),o.is(t.effect),t.popperClass]),c=Y(()=>[{zIndex:E(a)},E(n).popper,t.popperStyle||{}]),u=Y(()=>i.value==="dialog"?"false":void 0),d=Y(()=>E(n).arrow||{});return{ariaModal:u,arrowStyle:d,contentAttrs:r,contentClass:l,contentStyle:c,contentZIndex:a,updateZIndex:()=>{a.value=_t(t.zIndex)?t.zIndex:s()}}},cle=(t,e)=>{const n=J(!1),i=J(),s=()=>{e("focus")},o=c=>{var u;((u=c.detail)==null?void 0:u.focusReason)!=="pointer"&&(i.value="first",e("blur"))},r=c=>{t.visible&&!n.value&&(c.target&&(i.value=c.target),n.value=!0)},a=c=>{t.trapping||(c.detail.focusReason==="pointer"&&c.preventDefault(),n.value=!1)},l=()=>{n.value=!1,e("close")};return bn(()=>{i.value=void 0}),{focusStartRef:i,trapped:n,onFocusAfterReleased:o,onFocusAfterTrapped:s,onFocusInTrap:r,onFocusoutPrevented:a,onReleaseRequested:l}};var ule=ce({name:"ElPopperContent",__name:"content",props:OD,emits:Qre,setup(t,{expose:e,emit:n}){const i=n,s=t,{focusStartRef:o,trapped:r,onFocusAfterReleased:a,onFocusAfterTrapped:l,onFocusInTrap:c,onFocusoutPrevented:u,onReleaseRequested:d}=cle(s,i),{attributes:h,arrowRef:f,contentRef:p,styles:m,instanceRef:y,role:b,update:k}=ale(s),{ariaModal:C,arrowStyle:$,contentAttrs:x,contentClass:M,contentStyle:P,updateZIndex:T}=lle(s,{styles:m,attributes:h,role:b}),I=qe(dd,void 0);It(MD,{arrowStyle:$,arrowRef:f}),I&&It(dd,{...I,addInputId:Tt,removeInputId:Tt});let L;const R=(H=!0)=>{k(),H&&T()},V=()=>{R(!1),s.visible&&s.focusOnShow?r.value=!0:s.visible===!1&&(r.value=!1)};return Ft(()=>{Te(()=>s.triggerTargetEl,(H,F)=>{L==null||L(),L=void 0;const z=E(H||p.value),N=E(F||p.value);$o(z)&&(L=Te([b,()=>s.ariaLabel,C,()=>s.id],q=>{["role","aria-label","aria-modal","id"].forEach((K,X)=>{ai(q[X])?z.removeAttribute(K):z.setAttribute(K,q[X])})},{immediate:!0})),N!==z&&$o(N)&&["role","aria-label","aria-modal","id"].forEach(q=>{N.removeAttribute(q)})},{immediate:!0}),Te(()=>s.visible,V,{immediate:!0})}),bn(()=>{L==null||L(),L=void 0,p.value=void 0}),e({popperContentRef:p,popperInstanceRef:y,updatePopper:R,contentStyle:P}),(H,F)=>(v(),A("div",Zt({ref_key:"contentRef",ref:p},E(x),{style:E(P),class:E(M),tabindex:"-1",onMouseenter:F[0]||(F[0]=z=>H.$emit("mouseenter",z)),onMouseleave:F[1]||(F[1]=z=>H.$emit("mouseleave",z))}),[_(E(k1),{loop:t.loop,trapped:E(r),"trap-on-focus-in":!0,"focus-trap-el":E(p),"focus-start-el":E(o),onFocusAfterTrapped:E(l),onFocusAfterReleased:E(a),onFocusin:E(c),onFocusoutPrevented:E(u),onReleaseRequested:E(d)},{default:w(()=>[le(H.$slots,"default")]),_:3},8,["loop","trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}}),dle=ule,hle=ce({name:"ElPopper",inheritAttrs:!1,__name:"popper",props:ED,setup(t,{expose:e}){const n=t,i={triggerRef:J(),popperInstanceRef:J(),contentRef:J(),referenceRef:J(),role:Y(()=>n.role)};return e(i),It(E4,i),(s,o)=>le(s.$slots,"default")}}),fle=hle;const ple=jt(fle),Bn=Ge({...soe,...OD,appendTo:{type:s4.to.type},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:he(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...vr(["ariaLabel"])}),vc=Ge({...TD,disabled:Boolean,trigger:{type:he([String,Array]),default:"hover"},triggerKeys:{type:he(Array),default:()=>[Ue.enter,Ue.numpadEnter,Ue.space]},focusOnTarget:Boolean}),{useModelToggleProps:mle,useModelToggleEmits:gle,useModelToggle:vle}=HO("visible"),_le=Ge({...ED,...mle,...Bn,...vc,...LD,showArrow:{type:Boolean,default:!0}}),yle=[...gle,"before-show","before-hide","show","hide","open","close"],P4=Symbol("elTooltip"),Rk=(t,e)=>Ee(t)?t.includes(e):t===e,Zd=(t,e,n)=>i=>{Rk(E(t),e)&&n(i)};var ble=ce({name:"ElTooltipTrigger",__name:"trigger",props:vc,setup(t,{expose:e}){const n=t,i=ze("tooltip"),{controlled:s,id:o,open:r,onOpen:a,onClose:l,onToggle:c}=qe(P4,void 0),u=J(null),d=()=>{if(E(s)||n.disabled)return!0},h=Sn(n,"trigger"),f=As(d,Zd(h,"hover",$=>{a($),n.focusOnTarget&&$.target&&ot(()=>{i4($.target,{preventScroll:!0})})})),p=As(d,Zd(h,"hover",l)),m=As(d,Zd(h,"click",$=>{$.button===0&&c($)})),y=As(d,Zd(h,"focus",a)),b=As(d,Zd(h,"focus",l)),k=As(d,Zd(h,"contextmenu",$=>{$.preventDefault(),c($)})),C=As(d,$=>{const x=ss($);n.triggerKeys.includes(x)&&($.preventDefault(),c($))});return e({triggerRef:u}),($,x)=>(v(),D(E(Kre),{id:E(o),"virtual-ref":t.virtualRef,open:E(r),"virtual-triggering":t.virtualTriggering,class:G(E(i).e("trigger")),onBlur:E(b),onClick:E(m),onContextmenu:E(k),onFocus:E(y),onMouseenter:E(f),onMouseleave:E(p),onKeydown:E(C)},{default:w(()=>[le($.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}}),wle=ble,kle=ce({name:"ElTooltipContent",inheritAttrs:!1,__name:"content",props:Bn,setup(t,{expose:e}){const n=t,{selector:i}=tD(),s=ze("tooltip"),o=J(),r=$O(()=>{var K;return(K=o.value)==null?void 0:K.popperContentRef});let a;const{controlled:l,id:c,open:u,trigger:d,onClose:h,onOpen:f,onShow:p,onHide:m,onBeforeShow:y,onBeforeHide:b}=qe(P4,void 0),k=Y(()=>n.transition||`${s.namespace.value}-fade-in-linear`),C=Y(()=>n.persistent);bn(()=>{a==null||a()});const $=Y(()=>E(C)?!0:E(u)),x=Y(()=>n.disabled?!1:E(u)),M=Y(()=>n.appendTo||i.value),P=Y(()=>n.style??{}),T=J(!0),I=()=>{m(),q()&&i4(document.body,{preventScroll:!0}),T.value=!0},L=()=>{if(E(l))return!0},R=As(L,()=>{n.enterable&&Rk(E(d),"hover")&&f()}),V=As(L,()=>{Rk(E(d),"hover")&&h()}),H=()=>{var K,X;(X=(K=o.value)==null?void 0:K.updatePopper)==null||X.call(K),y==null||y()},F=()=>{b==null||b()},z=()=>{p()},N=()=>{n.virtualTriggering||h()},q=K=>{var Q;const X=(Q=o.value)==null?void 0:Q.popperContentRef,U=(K==null?void 0:K.relatedTarget)||document.activeElement;return X==null?void 0:X.contains(U)};return Te(()=>E(u),K=>{K?(T.value=!1,a=IO(r,()=>{E(l)||to(E(d)).every(X=>X!=="hover"&&X!=="focus")&&h()},{detectIframe:!0})):a==null||a()},{flush:"post"}),e({contentRef:o,isFocusInsideContent:q}),(K,X)=>(v(),D(E($b),{disabled:!t.teleported,to:M.value},{default:w(()=>[$.value||!T.value?(v(),D(ji,{key:0,name:k.value,appear:!C.value,onAfterLeave:I,onBeforeEnter:H,onAfterEnter:z,onBeforeLeave:F,persisted:""},{default:w(()=>[De(_(E(dle),Zt({id:E(c),ref_key:"contentRef",ref:o},K.$attrs,{"aria-label":t.ariaLabel,"aria-hidden":T.value,"boundaries-padding":t.boundariesPadding,"fallback-placements":t.fallbackPlacements,"gpu-acceleration":t.gpuAcceleration,offset:t.offset,placement:t.placement,"popper-options":t.popperOptions,"arrow-offset":t.arrowOffset,strategy:t.strategy,effect:t.effect,enterable:t.enterable,pure:t.pure,"popper-class":t.popperClass,"popper-style":[t.popperStyle,P.value],"reference-el":t.referenceEl,"trigger-target-el":t.triggerTargetEl,visible:x.value,"z-index":t.zIndex,loop:t.loop,onMouseenter:E(R),onMouseleave:E(V),onBlur:N,onClose:E(h)}),{default:w(()=>[le(K.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","arrow-offset","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","loop","onMouseenter","onMouseleave","onClose"]),[[Ut,x.value]])]),_:3},8,["name","appear"])):O("v-if",!0)]),_:3},8,["disabled","to"]))}}),Cle=kle;const xle=["innerHTML"],Sle={key:1};var $le=ce({name:"ElTooltip",__name:"tooltip",props:_le,emits:yle,setup(t,{expose:e,emit:n}){const i=t,s=n;noe();const o=ze("tooltip"),r=pr(),a=J(),l=J(),c=()=>{var x;const $=E(a);$&&((x=$.popperInstanceRef)==null||x.update())},u=J(!1),d=J(),{show:h,hide:f,hasUpdateHandler:p}=vle({indicator:u,toggleReason:d}),{onOpen:m,onClose:y}=ioe({showAfter:Sn(i,"showAfter"),hideAfter:Sn(i,"hideAfter"),autoClose:Sn(i,"autoClose"),open:h,close:f}),b=Y(()=>Xn(i.visible)&&!p.value),k=Y(()=>[o.b(),i.popperClass]);It(P4,{controlled:b,id:r,open:Cd(u),trigger:Sn(i,"trigger"),onOpen:m,onClose:y,onToggle:$=>{E(u)?y($):m($)},onShow:()=>{s("show",d.value)},onHide:()=>{s("hide",d.value)},onBeforeShow:()=>{s("before-show",d.value)},onBeforeHide:()=>{s("before-hide",d.value)},updatePopper:c}),Te(()=>i.disabled,$=>{$&&u.value&&(u.value=!1),!$&&Xn(i.visible)&&(u.value=i.visible)});const C=$=>{var x;return(x=l.value)==null?void 0:x.isFocusInsideContent($)};return cx(()=>u.value&&f()),bn(()=>{d.value=void 0}),e({popperRef:a,contentRef:l,isFocusInsideContent:C,updatePopper:c,onOpen:m,onClose:y,hide:f}),($,x)=>(v(),D(E(ple),{ref_key:"popperRef",ref:a,role:t.role},{default:w(()=>[_(wle,{disabled:t.disabled,trigger:t.trigger,"trigger-keys":t.triggerKeys,"virtual-ref":t.virtualRef,"virtual-triggering":t.virtualTriggering,"focus-on-target":t.focusOnTarget},{default:w(()=>[$.$slots.default?le($.$slots,"default",{key:0}):O("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering","focus-on-target"]),_(Cle,{ref_key:"contentRef",ref:l,"aria-label":t.ariaLabel,"boundaries-padding":t.boundariesPadding,content:t.content,disabled:t.disabled,effect:t.effect,enterable:t.enterable,"fallback-placements":t.fallbackPlacements,"hide-after":t.hideAfter,"gpu-acceleration":t.gpuAcceleration,offset:t.offset,persistent:t.persistent,"popper-class":k.value,"popper-style":t.popperStyle,placement:t.placement,"popper-options":t.popperOptions,"arrow-offset":t.arrowOffset,pure:t.pure,"raw-content":t.rawContent,"reference-el":t.referenceEl,"trigger-target-el":t.triggerTargetEl,"show-after":t.showAfter,strategy:t.strategy,teleported:t.teleported,transition:t.transition,"virtual-triggering":t.virtualTriggering,"z-index":t.zIndex,"append-to":t.appendTo,loop:t.loop},{default:w(()=>[le($.$slots,"content",{},()=>[t.rawContent?(v(),A("span",{key:0,innerHTML:t.content},null,8,xle)):(v(),A("span",Sle,S(t.content),1))]),t.showArrow?(v(),D(E(Gre),{key:0})):O("v-if",!0)]),_:3},8,["aria-label","boundaries-padding","content","disabled","effect","enterable","fallback-placements","hide-after","gpu-acceleration","offset","persistent","popper-class","popper-style","placement","popper-options","arrow-offset","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to","loop"])]),_:3},8,["role"]))}}),Ale=$le;const Cs=jt(Ale),ii=t=>t,Ele=Ge({id:{type:String,default:void 0},size:Wi,disabled:{type:Boolean,default:void 0},modelValue:{type:he([String,Number,Object]),default:""},modelModifiers:{type:he(Object),default:()=>({})},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:he(String),default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:he([Boolean,Object]),default:!1},autocomplete:{type:he(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:as,default:Bc},showPassword:Boolean,showWordLimit:Boolean,wordLimitPosition:{type:String,values:["inside","outside"],default:"inside"},suffixIcon:{type:as},prefixIcon:{type:as},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:he([Object,Array,String]),default:()=>ii({})},autofocus:Boolean,rows:{type:Number,default:2},...vr(["ariaLabel"]),inputmode:{type:he(String),default:void 0},name:String}),Mle={[Mt]:t=>Ke(t),input:t=>Ke(t),change:(t,e)=>Ke(t)&&(e instanceof Event||e===void 0),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:t=>t===void 0||t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,mouseenter:t=>t instanceof MouseEvent,keydown:t=>t instanceof Event,compositionstart:t=>t instanceof CompositionEvent,compositionupdate:t=>t instanceof CompositionEvent,compositionend:t=>t instanceof CompositionEvent};Si(Bc);let gi;const Tle={height:"0",visibility:"hidden",overflow:o4()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Ple=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break"],C$=t=>{const e=Number.parseFloat(t);return Number.isNaN(e)?t:e};function Ile(t){const e=window.getComputedStyle(t),n=e.getPropertyValue("box-sizing"),i=Number.parseFloat(e.getPropertyValue("padding-bottom"))+Number.parseFloat(e.getPropertyValue("padding-top")),s=Number.parseFloat(e.getPropertyValue("border-bottom-width"))+Number.parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:Ple.map(o=>[o,e.getPropertyValue(o)]),paddingSize:i,borderSize:s,boxSizing:n}}function x$(t,e=1,n){var u;if(!gi){gi=document.createElement("textarea");let d=document.body;!o4()&&t.parentNode&&(d=t.parentNode),d.appendChild(gi)}const{paddingSize:i,borderSize:s,boxSizing:o,contextStyle:r}=Ile(t);r.forEach(([d,h])=>gi==null?void 0:gi.style.setProperty(d,h)),Object.entries(Tle).forEach(([d,h])=>gi==null?void 0:gi.style.setProperty(d,h,"important")),gi.value=t.value||t.placeholder||"";let a=gi.scrollHeight;const l={};o==="border-box"?a=a+s:o==="content-box"&&(a=a-i),gi.value="";const c=gi.scrollHeight-i;if(_t(e)){let d=c*e;o==="border-box"&&(d=d+i+s),a=Math.max(d,a),l.minHeight=`${d}px`}if(_t(n)){let d=c*n;o==="border-box"&&(d=d+i+s),a=Math.min(d,a)}return l.height=`${a}px`,(u=gi.parentNode)==null||u.removeChild(gi),gi=void 0,l}const Lle=["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode"],Ole=["id","name","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","inputmode"],S$="ElInput";var Dle=ce({name:S$,inheritAttrs:!1,__name:"input",props:Ele,emits:Mle,setup(t,{expose:e,emit:n}){const i=t,s=n,o=$d(),r=yb(),a=di(),l=Y(()=>[i.type==="textarea"?y.b():m.b(),m.m(f.value),m.is("disabled",p.value),m.is("exceed",Z.value),{[m.b("group")]:a.prepend||a.append,[m.m("prefix")]:a.prefix||i.prefixIcon,[m.m("suffix")]:a.suffix||i.suffixIcon||i.clearable||i.showPassword,[m.bm("suffix","password-clear")]:X.value&&U.value,[m.b("hidden")]:i.type==="hidden"},o.class]),c=Y(()=>[m.e("wrapper"),m.is("focus",I.value)]),{form:u,formItem:d}=ho(),{inputId:h}=gl(i,{formItemContext:d}),f=$i(),p=ys(),m=ze("input"),y=ze("textarea"),b=Hn(),k=Hn(),C=J(!1),$=J(!1),x=J(),M=Hn(i.inputStyle),P=Y(()=>b.value||k.value),{wrapperRef:T,isFocused:I,handleFocus:L,handleBlur:R}=ep(P,{disabled:p,afterBlur(){var ge;i.validateEvent&&((ge=d==null?void 0:d.validate)==null||ge.call(d,"blur").catch(Pe=>Pt(Pe)))}}),V=Y(()=>(u==null?void 0:u.statusIcon)??!1),H=Y(()=>(d==null?void 0:d.validateState)||""),F=Y(()=>H.value&&A4[H.value]),z=Y(()=>$.value?Lre:gre),N=Y(()=>[o.style]),q=Y(()=>[i.inputStyle,M.value,{resize:i.resize}]),K=Y(()=>ai(i.modelValue)?"":String(i.modelValue)),X=Y(()=>i.clearable&&!p.value&&!i.readonly&&!!K.value&&(I.value||C.value)),U=Y(()=>i.showPassword&&!p.value&&!!K.value),Q=Y(()=>i.showWordLimit&&!!i.maxlength&&(i.type==="text"||i.type==="textarea")&&!p.value&&!i.readonly&&!i.showPassword),ne=Y(()=>K.value.length),Z=Y(()=>!!Q.value&&ne.value>Number(i.maxlength)),ae=Y(()=>!!a.suffix||!!i.suffixIcon||X.value||i.showPassword||Q.value||!!H.value&&V.value),me=Y(()=>!!Object.keys(i.modelModifiers).length),[we,oe]=Voe(b);Es(k,ge=>{if(re(),!Q.value||i.resize!=="both"&&i.resize!=="horizontal")return;const{width:Pe}=ge[0].contentRect;x.value={right:`calc(100% - ${Pe+22-10}px)`}});const fe=()=>{const{type:ge,autosize:Pe}=i;if(!(!Xt||ge!=="textarea"||!k.value))if(Pe){const Ie=yt(Pe)?Pe.minRows:void 0,ht=yt(Pe)?Pe.maxRows:void 0,Bt=x$(k.value,Ie,ht);M.value={overflowY:"hidden",...Bt},ot(()=>{k.value.offsetHeight,M.value=Bt})}else M.value={minHeight:x$(k.value).minHeight}},re=(ge=>{let Pe=!1;return()=>{var Ie;Pe||!i.autosize||((Ie=k.value)==null?void 0:Ie.offsetParent)!==null&&(setTimeout(ge),Pe=!0)}})(fe),ke=()=>{const ge=P.value,Pe=i.formatter?i.formatter(K.value):K.value;!ge||ge.value===Pe||i.type==="file"||(ge.value=Pe)},je=ge=>{const{trim:Pe,number:Ie}=i.modelModifiers;return Pe&&(ge=ge.trim()),Ie&&(ge=`${C$(ge)}`),i.formatter&&i.parser&&(ge=i.parser(ge)),ge},te=async ge=>{if(ve.value)return;const{lazy:Pe}=i.modelModifiers;let{value:Ie}=ge.target;if(Pe){s(Po,Ie);return}if(Ie=je(Ie),String(Ie)===K.value){i.formatter&&ke();return}we(),s(Mt,Ie),s(Po,Ie),await ot(),(i.formatter&&i.parser||!me.value)&&ke(),oe()},se=async ge=>{let{value:Pe}=ge.target;Pe=je(Pe),i.modelModifiers.lazy&&s(Mt,Pe),s(un,Pe,ge),await ot(),ke()},{isComposing:ve,handleCompositionStart:$e,handleCompositionUpdate:Se,handleCompositionEnd:Fe}=k4({emit:s,afterComposition:te}),Ye=()=>{$.value=!$.value},Re=()=>{var ge;return(ge=P.value)==null?void 0:ge.focus()},He=()=>{var ge;return(ge=P.value)==null?void 0:ge.blur()},Me=ge=>{C.value=!1,s("mouseleave",ge)},Ne=ge=>{C.value=!0,s("mouseenter",ge)},st=ge=>{s("keydown",ge)},it=()=>{var ge;(ge=P.value)==null||ge.select()},ye=ge=>{s(Mt,""),s(un,""),s("clear",ge),s(Po,"")};return Te(()=>i.modelValue,()=>{var ge;ot(()=>fe()),i.validateEvent&&((ge=d==null?void 0:d.validate)==null||ge.call(d,"change").catch(Pe=>Pt(Pe)))}),Te(K,ge=>{if(!P.value)return;const{trim:Pe,number:Ie}=i.modelModifiers,ht=P.value.value,Bt=(Ie||i.type==="number")&&!/^0\d/.test(ht)?`${C$(ht)}`:ht;Bt!==ge&&(document.activeElement===P.value&&P.value.type!=="range"&&Pe&&Bt.trim()===ge||ke())}),Te(()=>i.type,async()=>{await ot(),ke(),fe()}),Ft(()=>{!i.formatter&&i.parser&&Pt(S$,"If you set the parser, you also need to set the formatter."),ke(),ot(fe)}),e({input:b,textarea:k,ref:P,textareaStyle:q,autosize:Sn(i,"autosize"),isComposing:ve,focus:Re,blur:He,select:it,clear:ye,resizeTextarea:fe}),(ge,Pe)=>(v(),A("div",{class:G([l.value,{[E(m).bm("group","append")]:ge.$slots.append,[E(m).bm("group","prepend")]:ge.$slots.prepend}]),style:Xe(N.value),onMouseenter:Ne,onMouseleave:Me},[O(" input "),t.type!=="textarea"?(v(),A(ee,{key:0},[O(" prepend slot "),ge.$slots.prepend?(v(),A("div",{key:0,class:G(E(m).be("group","prepend"))},[le(ge.$slots,"prepend")],2)):O("v-if",!0),g("div",{ref_key:"wrapperRef",ref:T,class:G(c.value)},[O(" prefix slot "),ge.$slots.prefix||t.prefixIcon?(v(),A("span",{key:0,class:G(E(m).e("prefix"))},[g("span",{class:G(E(m).e("prefix-inner"))},[le(ge.$slots,"prefix"),t.prefixIcon?(v(),D(E(be),{key:0,class:G(E(m).e("icon"))},{default:w(()=>[(v(),D(Ct(t.prefixIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)):O("v-if",!0),g("input",Zt({id:E(h),ref_key:"input",ref:b,class:E(m).e("inner")},E(r),{name:t.name,minlength:t.minlength,maxlength:t.maxlength,type:t.showPassword?$.value?"text":"password":t.type,disabled:E(p),readonly:t.readonly,autocomplete:t.autocomplete,tabindex:t.tabindex,"aria-label":t.ariaLabel,placeholder:t.placeholder,style:t.inputStyle,form:t.form,autofocus:t.autofocus,role:t.containerRole,inputmode:t.inputmode,onCompositionstart:Pe[0]||(Pe[0]=(...Ie)=>E($e)&&E($e)(...Ie)),onCompositionupdate:Pe[1]||(Pe[1]=(...Ie)=>E(Se)&&E(Se)(...Ie)),onCompositionend:Pe[2]||(Pe[2]=(...Ie)=>E(Fe)&&E(Fe)(...Ie)),onInput:te,onChange:se,onKeydown:st}),null,16,Lle),O(" suffix slot "),ae.value?(v(),A("span",{key:1,class:G(E(m).e("suffix"))},[g("span",{class:G(E(m).e("suffix-inner"))},[!X.value||!U.value||!Q.value?(v(),A(ee,{key:0},[le(ge.$slots,"suffix"),t.suffixIcon?(v(),D(E(be),{key:0,class:G(E(m).e("icon"))},{default:w(()=>[(v(),D(Ct(t.suffixIcon)))]),_:1},8,["class"])):O("v-if",!0)],64)):O("v-if",!0),X.value?(v(),D(E(be),{key:1,class:G([E(m).e("icon"),E(m).e("clear")]),onMousedown:Ae(E(Tt),["prevent"]),onClick:ye},{default:w(()=>[(v(),D(Ct(t.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0),U.value?(v(),D(E(be),{key:2,class:G([E(m).e("icon"),E(m).e("password")]),onClick:Ye,onMousedown:Ae(E(Tt),["prevent"]),onMouseup:Ae(E(Tt),["prevent"])},{default:w(()=>[le(ge.$slots,"password-icon",{visible:$.value},()=>[(v(),D(Ct(z.value)))])]),_:3},8,["class","onMousedown","onMouseup"])):O("v-if",!0),Q.value?(v(),A("span",{key:3,class:G([E(m).e("count"),E(m).is("outside",t.wordLimitPosition==="outside")])},[g("span",{class:G(E(m).e("count-inner"))},S(ne.value)+" / "+S(t.maxlength),3)],2)):O("v-if",!0),H.value&&F.value&&V.value?(v(),D(E(be),{key:4,class:G([E(m).e("icon"),E(m).e("validateIcon"),E(m).is("loading",H.value==="validating")])},{default:w(()=>[(v(),D(Ct(F.value)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)):O("v-if",!0)],2),O(" append slot "),ge.$slots.append?(v(),A("div",{key:1,class:G(E(m).be("group","append"))},[le(ge.$slots,"append")],2)):O("v-if",!0)],64)):(v(),A(ee,{key:1},[O(" textarea "),g("textarea",Zt({id:E(h),ref_key:"textarea",ref:k,class:[E(y).e("inner"),E(m).is("focus",E(I)),E(y).is("clearable",t.clearable)]},E(r),{name:t.name,minlength:t.minlength,maxlength:t.maxlength,tabindex:t.tabindex,disabled:E(p),readonly:t.readonly,autocomplete:t.autocomplete,style:q.value,"aria-label":t.ariaLabel,placeholder:t.placeholder,form:t.form,autofocus:t.autofocus,rows:t.rows,role:t.containerRole,inputmode:t.inputmode,onCompositionstart:Pe[3]||(Pe[3]=(...Ie)=>E($e)&&E($e)(...Ie)),onCompositionupdate:Pe[4]||(Pe[4]=(...Ie)=>E(Se)&&E(Se)(...Ie)),onCompositionend:Pe[5]||(Pe[5]=(...Ie)=>E(Fe)&&E(Fe)(...Ie)),onInput:te,onFocus:Pe[6]||(Pe[6]=(...Ie)=>E(L)&&E(L)(...Ie)),onBlur:Pe[7]||(Pe[7]=(...Ie)=>E(R)&&E(R)(...Ie)),onChange:se,onKeydown:st}),null,16,Ole),X.value?(v(),D(E(be),{key:0,class:G([E(y).e("icon"),E(y).e("clear")]),onMousedown:Ae(E(Tt),["prevent"]),onClick:ye},{default:w(()=>[(v(),D(Ct(t.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0),Q.value?(v(),A("span",{key:1,style:Xe(x.value),class:G([E(m).e("count"),E(m).is("outside",t.wordLimitPosition==="outside")])},S(ne.value)+" / "+S(t.maxlength),7)):O("v-if",!0)],64))],38))}}),Rle=Dle;const ft=jt(Rle),Vle=Ge({distance:{type:Number,default:0},height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:Boolean,wrapStyle:{type:he([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...vr(["ariaLabel","ariaOrientation"])}),ND={"end-reached":t=>["left","right","top","bottom"].includes(t),scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(_t)},Jd=4,Fle={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}},Nle=({move:t,size:e,bar:n})=>({[n.size]:e,transform:`translate${n.axis}(${t}%)`}),Ble=Ge({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),I4=Symbol("scrollbarContextKey"),zle=Ge({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),Hle="Thumb";var Ule=ce({__name:"thumb",props:Ble,setup(t){const e=t,n=qe(I4),i=ze("scrollbar");n||uo(Hle,"can not inject scrollbar context");const s=J(),o=J(),r=J({}),a=J(!1);let l=!1,c=!1,u=0,d=0,h=Xt?document.onselectstart:null;const f=Y(()=>Fle[e.vertical?"vertical":"horizontal"]),p=Y(()=>Nle({size:e.size,move:e.move,bar:f.value})),m=Y(()=>s.value[f.value.offset]**2/n.wrapElement[f.value.scrollSize]/e.ratio/o.value[f.value.offset]),y=T=>{var L;if(T.stopPropagation(),T.ctrlKey||[1,2].includes(T.button))return;(L=window.getSelection())==null||L.removeAllRanges(),k(T);const I=T.currentTarget;I&&(r.value[f.value.axis]=I[f.value.offset]-(T[f.value.client]-I.getBoundingClientRect()[f.value.direction]))},b=T=>{if(!o.value||!s.value||!n.wrapElement)return;const I=(Math.abs(T.target.getBoundingClientRect()[f.value.direction]-T[f.value.client])-o.value[f.value.offset]/2)*100*m.value/s.value[f.value.offset];n.wrapElement[f.value.scroll]=I*n.wrapElement[f.value.scrollSize]/100},k=T=>{T.stopImmediatePropagation(),l=!0,u=n.wrapElement.scrollHeight,d=n.wrapElement.scrollWidth,document.addEventListener("mousemove",C),document.addEventListener("mouseup",$),h=document.onselectstart,document.onselectstart=()=>!1},C=T=>{if(!s.value||!o.value||l===!1)return;const I=r.value[f.value.axis];if(!I)return;const L=((s.value.getBoundingClientRect()[f.value.direction]-T[f.value.client])*-1-(o.value[f.value.offset]-I))*100*m.value/s.value[f.value.offset];f.value.scroll==="scrollLeft"?n.wrapElement[f.value.scroll]=L*d/100:n.wrapElement[f.value.scroll]=L*u/100},$=()=>{l=!1,r.value[f.value.axis]=0,document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",$),P(),c&&(a.value=!1)},x=()=>{c=!1,a.value=!!e.size},M=()=>{c=!0,a.value=l};bn(()=>{P(),document.removeEventListener("mouseup",$)});const P=()=>{document.onselectstart!==h&&(document.onselectstart=h)};return zn(Sn(n,"scrollbarElement"),"mousemove",x),zn(Sn(n,"scrollbarElement"),"mouseleave",M),(T,I)=>(v(),D(ji,{name:E(i).b("fade"),persisted:""},{default:w(()=>[De(g("div",{ref_key:"instance",ref:s,class:G([E(i).e("bar"),E(i).is(f.value.key)]),onMousedown:b,onClick:I[0]||(I[0]=Ae(()=>{},["stop"]))},[g("div",{ref_key:"thumb",ref:o,class:G(E(i).e("thumb")),style:Xe(p.value),onMousedown:y},null,38)],34),[[Ut,t.always||a.value]])]),_:1},8,["name"]))}}),$$=Ule,jle=ce({__name:"bar",props:zle,setup(t,{expose:e}){const n=t,i=qe(I4),s=J(0),o=J(0),r=J(""),a=J(""),l=J(1),c=J(1);return e({handleScroll:h=>{if(h){const f=h.offsetHeight-Jd,p=h.offsetWidth-Jd;o.value=h.scrollTop*100/f*l.value,s.value=h.scrollLeft*100/p*c.value}},update:()=>{const h=i==null?void 0:i.wrapElement;if(!h)return;const f=h.offsetHeight-Jd,p=h.offsetWidth-Jd,m=f**2/h.scrollHeight,y=p**2/h.scrollWidth,b=Math.max(m,n.minSize),k=Math.max(y,n.minSize);l.value=m/(f-m)/(b/(f-b)),c.value=y/(p-y)/(k/(p-k)),a.value=b+Jd<f?`${b}px`:"",r.value=k+Jd<p?`${k}px`:""}}),(h,f)=>(v(),A(ee,null,[_($$,{move:s.value,ratio:c.value,size:r.value,always:t.always},null,8,["move","ratio","size","always"]),_($$,{move:o.value,ratio:l.value,size:a.value,vertical:"",always:t.always},null,8,["move","ratio","size","always"])],64))}}),Wle=jle;const Yle=["tabindex"],sw="ElScrollbar";var qle=ce({name:sw,__name:"scrollbar",props:Vle,emits:ND,setup(t,{expose:e,emit:n}){const i=t,s=n,o=ze("scrollbar");let r,a,l,c=0,u=0,d="";const h={bottom:!1,top:!1,right:!1,left:!1},f=J(),p=J(),m=J(),y=J(),b=Y(()=>{const V={},H=ci(i.height),F=ci(i.maxHeight);return H&&(V.height=H),F&&(V.maxHeight=F),[i.wrapStyle,V]}),k=Y(()=>[i.wrapClass,o.e("wrap"),{[o.em("wrap","hidden-default")]:!i.native}]),C=Y(()=>[o.e("view"),i.viewClass]),$=V=>h[V]??!1,x={top:"bottom",bottom:"top",left:"right",right:"left"},M=V=>{const H=x[d];if(!H)return;const F=V[d],z=V[H];F&&!h[d]&&(h[d]=!0),!z&&h[H]&&(h[H]=!1)},P=()=>{var V;if(p.value){(V=y.value)==null||V.handleScroll(p.value);const H=c,F=u;c=p.value.scrollTop,u=p.value.scrollLeft;const z={bottom:c+p.value.clientHeight>=p.value.scrollHeight-i.distance,top:c<=i.distance&&H!==0,right:u+p.value.clientWidth>=p.value.scrollWidth-i.distance&&F!==u,left:u<=i.distance&&F!==0};if(s("scroll",{scrollTop:c,scrollLeft:u}),H!==c&&(d=c>H?"bottom":"top"),F!==u&&(d=u>F?"right":"left"),i.distance>0){if($(d))return;M(z)}z[d]&&s("end-reached",d)}};function T(V,H){yt(V)?p.value.scrollTo(V):_t(V)&&_t(H)&&p.value.scrollTo(V,H)}const I=V=>{if(!_t(V)){Pt(sw,"value must be a number");return}p.value.scrollTop=V},L=V=>{if(!_t(V)){Pt(sw,"value must be a number");return}p.value.scrollLeft=V},R=()=>{var V;(V=y.value)==null||V.update(),h[d]=!1};return Te(()=>i.noresize,V=>{V?(r==null||r(),a==null||a(),l==null||l()):({stop:r}=Es(m,R),{stop:a}=Es(p,R),l=zn("resize",R))},{immediate:!0}),Te(()=>[i.maxHeight,i.height],()=>{i.native||ot(()=>{var V;R(),p.value&&((V=y.value)==null||V.handleScroll(p.value))})}),It(I4,In({scrollbarElement:f,wrapElement:p})),lx(()=>{p.value&&(p.value.scrollTop=c,p.value.scrollLeft=u)}),Ft(()=>{i.native||ot(()=>{R()})}),ul(()=>R()),e({wrapRef:p,update:R,scrollTo:T,setScrollTop:I,setScrollLeft:L,handleScroll:P}),(V,H)=>(v(),A("div",{ref_key:"scrollbarRef",ref:f,class:G(E(o).b())},[g("div",{ref_key:"wrapRef",ref:p,class:G(k.value),style:Xe(b.value),tabindex:t.tabindex,onScroll:P},[(v(),D(Ct(t.tag),{id:t.id,ref_key:"resizeRef",ref:m,class:G(C.value),style:Xe(t.viewStyle),role:t.role,"aria-label":t.ariaLabel,"aria-orientation":t.ariaOrientation},{default:w(()=>[le(V.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,Yle),t.native?O("v-if",!0):(v(),D(Wle,{key:0,ref_key:"barRef",ref:y,always:t.always,"min-size":t.minSize},null,8,["always","min-size"]))],2))}}),Gle=qle;const Ai=jt(Gle),Xle=Ge({size:{type:[Number,String],values:hl,validator:t=>_t(t)},shape:{type:String,values:["circle","square"]},icon:{type:as},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:he(String),default:"cover"}}),Kle={error:t=>t instanceof Event},BD=Symbol("avatarGroupContextKey"),Zle={size:{type:he([Number,String]),values:hl,validator:t=>_t(t)},shape:{type:he(String),values:["circle","square"]},collapseAvatars:Boolean,collapseAvatarsTooltip:Boolean,maxCollapseAvatars:{type:Number,default:1},effect:{type:he(String),default:"light"},placement:{type:he(String),values:Qf,default:"top"},popperClass:Bn.popperClass,popperStyle:Bn.popperStyle,collapseClass:String,collapseStyle:{type:he([String,Array,Object])}},Jle=["src","alt","srcset"];var Qle=ce({name:"ElAvatar",__name:"avatar",props:Xle,emits:Kle,setup(t,{emit:e}){const n=t,i=e,s=qe(BD,void 0),o=ze("avatar"),r=J(!1),a=Y(()=>n.size??(s==null?void 0:s.size)),l=Y(()=>n.shape??(s==null?void 0:s.shape)??"circle"),c=Y(()=>{const{icon:f}=n,p=[o.b()];return Ke(a.value)&&p.push(o.m(a.value)),f&&p.push(o.m("icon")),l.value&&p.push(o.m(l.value)),p}),u=Y(()=>_t(a.value)?o.cssVarBlock({size:ci(a.value)}):void 0),d=Y(()=>({objectFit:n.fit}));Te(()=>[n.src,n.srcSet],()=>r.value=!1);function h(f){r.value=!0,i("error",f)}return(f,p)=>(v(),A("span",{class:G(c.value),style:Xe(u.value)},[(t.src||t.srcSet)&&!r.value?(v(),A("img",{key:0,src:t.src,alt:t.alt,srcset:t.srcSet,style:Xe(d.value),onError:h},null,44,Jle)):t.icon?(v(),D(E(be),{key:1},{default:w(()=>[(v(),D(Ct(t.icon)))]),_:1})):le(f.$slots,"default",{key:2})],6))}}),zD=Qle,HD=ce({name:"ElAvatarGroup",props:Zle,setup(t,{slots:e}){const n=ze("avatar-group");return It(BD,In({size:Sn(t,"size"),shape:Sn(t,"shape")})),()=>{var o;const i=lc(((o=e.default)==null?void 0:o.call(e))??[]);let s=i;if(t.collapseAvatars&&i.length>t.maxCollapseAvatars){s=i.slice(0,t.maxCollapseAvatars);const r=i.slice(t.maxCollapseAvatars);s.push(_(Cs,{popperClass:t.popperClass,popperStyle:t.popperStyle,placement:t.placement,effect:t.effect,disabled:!t.collapseAvatarsTooltip},{default:()=>_(zD,{size:t.size,shape:t.shape,class:t.collapseClass,style:t.collapseStyle},{default:()=>[B("+ "),r.length]}),content:()=>_("div",{class:n.e("collapse-avatars")},[r.map((a,l)=>ls(a)?ur(a,{key:a.key??l}):a)])}))}return _("div",{class:n.b()},[s])}}});const L4=jt(zD,{AvatarGroup:HD});Is(HD);const ece=Ge({separator:{type:String,default:"/"},separatorIcon:{type:as}}),UD=Symbol("breadcrumbKey"),tce=Ge({to:{type:he([String,Object]),default:""},replace:Boolean}),nce=["aria-label"];var sce=ce({name:"ElBreadcrumb",__name:"breadcrumb",props:ece,setup(t){const{t:e}=Qt(),n=t,i=ze("breadcrumb"),s=J();return It(UD,n),Ft(()=>{const o=s.value.querySelectorAll(`.${i.e("item")}`);o.length&&o[o.length-1].setAttribute("aria-current","page")}),(o,r)=>(v(),A("div",{ref_key:"breadcrumb",ref:s,class:G(E(i).b()),"aria-label":E(e)("el.breadcrumb.label"),role:"navigation"},[le(o.$slots,"default")],10,nce))}}),ice=sce,oce=ce({name:"ElBreadcrumbItem",__name:"breadcrumb-item",props:tce,setup(t){const e=t,n=bt(),i=qe(UD,void 0),s=ze("breadcrumb"),o=n.appContext.config.globalProperties.$router,r=()=>{!e.to||!o||(e.replace?o.replace(e.to):o.push(e.to))};return(a,l)=>{var c,u;return v(),A("span",{class:G(E(s).e("item"))},[g("span",{class:G([E(s).e("inner"),E(s).is("link",!!t.to)]),role:"link",onClick:r},[le(a.$slots,"default")],2),(c=E(i))!=null&&c.separatorIcon?(v(),D(E(be),{key:0,class:G(E(s).e("separator"))},{default:w(()=>[(v(),D(Ct(E(i).separatorIcon)))]),_:1},8,["class"])):(v(),A("span",{key:1,class:G(E(s).e("separator")),role:"presentation"},S((u=E(i))==null?void 0:u.separator),3))],2)}}}),jD=oce;const rce=jt(ice,{BreadcrumbItem:jD}),ace=Is(jD),lce=["default","primary","success","warning","info","danger","text",""],cce=["button","submit","reset"],Vk=Ge({size:Wi,disabled:{type:Boolean,default:void 0},type:{type:String,values:lce,default:""},icon:{type:as},nativeType:{type:String,values:cce,default:"button"},loading:Boolean,loadingIcon:{type:as,default:()=>Pf},plain:{type:Boolean,default:void 0},text:{type:Boolean,default:void 0},link:Boolean,bg:Boolean,autofocus:Boolean,round:{type:Boolean,default:void 0},circle:Boolean,dashed:{type:Boolean,default:void 0},color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:he([String,Object]),default:"button"}}),uce={click:t=>t instanceof MouseEvent},WD=Symbol(),ty=J();function zc(t,e=void 0){const n=bt()?qe(WD,ty):ty;return t?Y(()=>{var i;return((i=n.value)==null?void 0:i[t])??e}):n}function O4(t,e){const n=zc(),i=ze(t,Y(()=>{var a;return((a=n.value)==null?void 0:a.namespace)||Vm})),s=Qt(Y(()=>{var a;return(a=n.value)==null?void 0:a.locale})),o=kb(Y(()=>{var a;return((a=n.value)==null?void 0:a.zIndex)||sD})),r=Y(()=>{var a;return E(e)||((a=n.value)==null?void 0:a.size)||""});return YD(Y(()=>E(n)||{})),{ns:i,locale:s,zIndex:o,size:r}}const YD=(t,e,n=!1)=>{const i=!!bt(),s=i?zc():void 0,o=(e==null?void 0:e.provide)??(i?It:void 0);if(!o){Pt("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const r=Y(()=>{const a=E(t);return s!=null&&s.value?dce(s.value,a):a});return o(WD,r),o(NO,Y(()=>r.value.locale)),o(BO,Y(()=>r.value.namespace)),o(iD,Y(()=>r.value.zIndex)),o(gD,{size:Y(()=>r.value.size||"")}),o(_D,Y(()=>({emptyValues:r.value.emptyValues,valueOnClear:r.value.valueOnClear}))),(n||!ty.value)&&(ty.value=r.value),r},dce=(t,e)=>{const n=[...new Set([...K_(t),...K_(e)])],i={};for(const s of n)i[s]=e[s]!==void 0?e[s]:t[s];return i},hce=Ge({a11y:{type:Boolean,default:!0},locale:{type:he(Object)},size:Wi,button:{type:he(Object)},card:{type:he(Object)},dialog:{type:he(Object)},link:{type:he(Object)},experimentalFeatures:{type:he(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:he(Object)},zIndex:Number,namespace:{type:String,default:"el"},table:{type:he(Object)},...b1}),fce={placement:"top"},pce=ce({name:"ElConfigProvider",props:hce,setup(t,{slots:e}){const n=YD(t);return Te(()=>t.message,i=>{var s;Object.assign(fce,((s=n==null?void 0:n.value)==null?void 0:s.message)??{},i??{})},{immediate:!0,deep:!0}),()=>le(e,"default",{config:n==null?void 0:n.value})}}),mce=jt(pce),qD=Symbol("buttonGroupContextKey"),gce=(t,e)=>{el({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},Y(()=>t.type==="text"));const n=qe(qD,void 0),i=zc("button"),{form:s}=ho(),o=$i(Y(()=>n==null?void 0:n.size)),r=ys(),a=J(),l=di(),c=Y(()=>{var k;return t.type||(n==null?void 0:n.type)||((k=i.value)==null?void 0:k.type)||""}),u=Y(()=>{var k;return t.autoInsertSpace??((k=i.value)==null?void 0:k.autoInsertSpace)??!1}),d=Y(()=>{var k;return t.plain??((k=i.value)==null?void 0:k.plain)??!1}),h=Y(()=>{var k;return t.round??((k=i.value)==null?void 0:k.round)??!1}),f=Y(()=>{var k;return t.text??((k=i.value)==null?void 0:k.text)??!1}),p=Y(()=>{var k;return t.dashed??((k=i.value)==null?void 0:k.dashed)??!1}),m=Y(()=>t.tag==="button"?{ariaDisabled:r.value||t.loading,disabled:r.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),y=Y(()=>{var C;const k=(C=l.default)==null?void 0:C.call(l);if(u.value&&(k==null?void 0:k.length)===1){const $=k[0];if(($==null?void 0:$.type)===il){const x=$.children;return/^\p{Unified_Ideograph}{2}$/u.test(x.trim())}}return!1});return{_disabled:r,_size:o,_type:c,_ref:a,_props:m,_plain:d,_round:h,_text:f,_dashed:p,shouldAddSpace:y,handleClick:k=>{if(r.value||t.loading){k.stopPropagation();return}t.nativeType==="reset"&&(s==null||s.resetFields()),e("click",k)}}};function li(t,e){vce(t)&&(t="100%");const n=_ce(t);return t=e===360?t:Math.min(e,Math.max(0,parseFloat(t))),n&&(t=parseInt(String(t*e),10)/100),Math.abs(t-e)<1e-6?1:(e===360?t=(t<0?t%e+e:t%e)/parseFloat(String(e)):t=t%e/parseFloat(String(e)),t)}function Dv(t){return Math.min(1,Math.max(0,t))}function vce(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function _ce(t){return typeof t=="string"&&t.indexOf("%")!==-1}function GD(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Rv(t){return Number(t)<=1?`${Number(t)*100}%`:t}function Mu(t){return t.length===1?"0"+t:String(t)}function yce(t,e,n){return{r:li(t,255)*255,g:li(e,255)*255,b:li(n,255)*255}}function A$(t,e,n){t=li(t,255),e=li(e,255),n=li(n,255);const i=Math.max(t,e,n),s=Math.min(t,e,n);let o=0,r=0;const a=(i+s)/2;if(i===s)r=0,o=0;else{const l=i-s;switch(r=a>.5?l/(2-i-s):l/(i+s),i){case t:o=(e-n)/l+(e<n?6:0);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4;break}o/=6}return{h:o,s:r,l:a}}function iw(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*(6*n):n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function bce(t,e,n){let i,s,o;if(t=li(t,360),e=li(e,100),n=li(n,100),e===0)s=n,o=n,i=n;else{const r=n<.5?n*(1+e):n+e-n*e,a=2*n-r;i=iw(a,r,t+1/3),s=iw(a,r,t),o=iw(a,r,t-1/3)}return{r:i*255,g:s*255,b:o*255}}function E$(t,e,n){t=li(t,255),e=li(e,255),n=li(n,255);const i=Math.max(t,e,n),s=Math.min(t,e,n);let o=0;const r=i,a=i-s,l=i===0?0:a/i;if(i===s)o=0;else{switch(i){case t:o=(e-n)/a+(e<n?6:0);break;case e:o=(n-t)/a+2;break;case n:o=(t-e)/a+4;break}o/=6}return{h:o,s:l,v:r}}function wce(t,e,n){t=li(t,360)*6,e=li(e,100),n=li(n,100);const i=Math.floor(t),s=t-i,o=n*(1-e),r=n*(1-s*e),a=n*(1-(1-s)*e),l=i%6,c=[n,r,o,o,a,n][l],u=[a,n,n,r,o,o][l],d=[o,o,a,n,n,r][l];return{r:c*255,g:u*255,b:d*255}}function M$(t,e,n,i){const s=[Mu(Math.round(t).toString(16)),Mu(Math.round(e).toString(16)),Mu(Math.round(n).toString(16))];return i&&s[0].startsWith(s[0].charAt(1))&&s[1].startsWith(s[1].charAt(1))&&s[2].startsWith(s[2].charAt(1))?s[0].charAt(0)+s[1].charAt(0)+s[2].charAt(0):s.join("")}function kce(t,e,n,i,s){const o=[Mu(Math.round(t).toString(16)),Mu(Math.round(e).toString(16)),Mu(Math.round(n).toString(16)),Mu(xce(i))];return s&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join("")}function Cce(t,e,n,i){const s=t/100,o=e/100,r=n/100,a=i/100,l=255*(1-s)*(1-a),c=255*(1-o)*(1-a),u=255*(1-r)*(1-a);return{r:l,g:c,b:u}}function T$(t,e,n){let i=1-t/255,s=1-e/255,o=1-n/255,r=Math.min(i,s,o);return r===1?(i=0,s=0,o=0):(i=(i-r)/(1-r)*100,s=(s-r)/(1-r)*100,o=(o-r)/(1-r)*100),r*=100,{c:Math.round(i),m:Math.round(s),y:Math.round(o),k:Math.round(r)}}function xce(t){return Math.round(parseFloat(t)*255).toString(16)}function P$(t){return yo(t)/255}function yo(t){return parseInt(t,16)}function Sce(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}const Fk={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function $ce(t){let e={r:0,g:0,b:0},n=1,i=null,s=null,o=null,r=!1,a=!1;return typeof t=="string"&&(t=Mce(t)),typeof t=="object"&&(vo(t.r)&&vo(t.g)&&vo(t.b)?(e=yce(t.r,t.g,t.b),r=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):vo(t.h)&&vo(t.s)&&vo(t.v)?(i=Rv(t.s),s=Rv(t.v),e=wce(t.h,i,s),r=!0,a="hsv"):vo(t.h)&&vo(t.s)&&vo(t.l)?(i=Rv(t.s),o=Rv(t.l),e=bce(t.h,i,o),r=!0,a="hsl"):vo(t.c)&&vo(t.m)&&vo(t.y)&&vo(t.k)&&(e=Cce(t.c,t.m,t.y,t.k),r=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=GD(n),{ok:r,format:t.format||a,r:Math.min(255,Math.max(e.r,0)),g:Math.min(255,Math.max(e.g,0)),b:Math.min(255,Math.max(e.b,0)),a:n}}const Ace="[-\\+]?\\d+%?",Ece="[-\\+]?\\d*\\.\\d+%?",cc="(?:"+Ece+")|(?:"+Ace+")",ow="[\\s|\\(]+("+cc+")[,|\\s]+("+cc+")[,|\\s]+("+cc+")\\s*\\)?",Vv="[\\s|\\(]+("+cc+")[,|\\s]+("+cc+")[,|\\s]+("+cc+")[,|\\s]+("+cc+")\\s*\\)?",Yo={CSS_UNIT:new RegExp(cc),rgb:new RegExp("rgb"+ow),rgba:new RegExp("rgba"+Vv),hsl:new RegExp("hsl"+ow),hsla:new RegExp("hsla"+Vv),hsv:new RegExp("hsv"+ow),hsva:new RegExp("hsva"+Vv),cmyk:new RegExp("cmyk"+Vv),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function Mce(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;let e=!1;if(Fk[t])t=Fk[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let n=Yo.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Yo.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Yo.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Yo.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Yo.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Yo.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Yo.cmyk.exec(t),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=Yo.hex8.exec(t),n?{r:yo(n[1]),g:yo(n[2]),b:yo(n[3]),a:P$(n[4]),format:e?"name":"hex8"}:(n=Yo.hex6.exec(t),n?{r:yo(n[1]),g:yo(n[2]),b:yo(n[3]),format:e?"name":"hex"}:(n=Yo.hex4.exec(t),n?{r:yo(n[1]+n[1]),g:yo(n[2]+n[2]),b:yo(n[3]+n[3]),a:P$(n[4]+n[4]),format:e?"name":"hex8"}:(n=Yo.hex3.exec(t),n?{r:yo(n[1]+n[1]),g:yo(n[2]+n[2]),b:yo(n[3]+n[3]),format:e?"name":"hex"}:!1))))))))))}function vo(t){return typeof t=="number"?!Number.isNaN(t):Yo.CSS_UNIT.test(t)}class Kn{constructor(e="",n={}){if(e instanceof Kn)return e;typeof e=="number"&&(e=Sce(e)),this.originalInput=e;const i=$ce(e);this.originalInput=e,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=n.format??i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}isDark(){return this.getBrightness()<128}isLight(){return!this.isDark()}getBrightness(){const e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3}getLuminance(){const e=this.toRgb();let n,i,s;const o=e.r/255,r=e.g/255,a=e.b/255;return o<=.03928?n=o/12.92:n=Math.pow((o+.055)/1.055,2.4),r<=.03928?i=r/12.92:i=Math.pow((r+.055)/1.055,2.4),a<=.03928?s=a/12.92:s=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*i+.0722*s}getAlpha(){return this.a}setAlpha(e){return this.a=GD(e),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:e}=this.toHsl();return e===0}toHsv(){const e=E$(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}}toHsvString(){const e=E$(this.r,this.g,this.b),n=Math.round(e.h*360),i=Math.round(e.s*100),s=Math.round(e.v*100);return this.a===1?`hsv(${n}, ${i}%, ${s}%)`:`hsva(${n}, ${i}%, ${s}%, ${this.roundA})`}toHsl(){const e=A$(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}}toHslString(){const e=A$(this.r,this.g,this.b),n=Math.round(e.h*360),i=Math.round(e.s*100),s=Math.round(e.l*100);return this.a===1?`hsl(${n}, ${i}%, ${s}%)`:`hsla(${n}, ${i}%, ${s}%, ${this.roundA})`}toHex(e=!1){return M$(this.r,this.g,this.b,e)}toHexString(e=!1){return"#"+this.toHex(e)}toHex8(e=!1){return kce(this.r,this.g,this.b,this.a,e)}toHex8String(e=!1){return"#"+this.toHex8(e)}toHexShortString(e=!1){return this.a===1?this.toHexString(e):this.toHex8String(e)}toRgb(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}}toRgbString(){const e=Math.round(this.r),n=Math.round(this.g),i=Math.round(this.b);return this.a===1?`rgb(${e}, ${n}, ${i})`:`rgba(${e}, ${n}, ${i}, ${this.roundA})`}toPercentageRgb(){const e=n=>`${Math.round(li(n,255)*100)}%`;return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}}toPercentageRgbString(){const e=n=>Math.round(li(n,255)*100);return this.a===1?`rgb(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%)`:`rgba(${e(this.r)}%, ${e(this.g)}%, ${e(this.b)}%, ${this.roundA})`}toCmyk(){return{...T$(this.r,this.g,this.b)}}toCmykString(){const{c:e,m:n,y:i,k:s}=T$(this.r,this.g,this.b);return`cmyk(${e}, ${n}, ${i}, ${s})`}toName(){if(this.a===0)return"transparent";if(this.a<1)return!1;const e="#"+M$(this.r,this.g,this.b,!1);for(const[n,i]of Object.entries(Fk))if(e===i)return n;return!1}toString(e){const n=!!e;e=e??this.format;let i=!1;const s=this.a<1&&this.a>=0;return!n&&s&&(e.startsWith("hex")||e==="name")?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(i=this.toRgbString()),e==="prgb"&&(i=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(i=this.toHexString()),e==="hex3"&&(i=this.toHexString(!0)),e==="hex4"&&(i=this.toHex8String(!0)),e==="hex8"&&(i=this.toHex8String()),e==="name"&&(i=this.toName()),e==="hsl"&&(i=this.toHslString()),e==="hsv"&&(i=this.toHsvString()),e==="cmyk"&&(i=this.toCmykString()),i||this.toHexString())}toNumber(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)}clone(){return new Kn(this.toString())}lighten(e=10){const n=this.toHsl();return n.l+=e/100,n.l=Dv(n.l),new Kn(n)}brighten(e=10){const n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(e/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(e/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(e/100)))),new Kn(n)}darken(e=10){const n=this.toHsl();return n.l-=e/100,n.l=Dv(n.l),new Kn(n)}tint(e=10){return this.mix("white",e)}shade(e=10){return this.mix("black",e)}desaturate(e=10){const n=this.toHsl();return n.s-=e/100,n.s=Dv(n.s),new Kn(n)}saturate(e=10){const n=this.toHsl();return n.s+=e/100,n.s=Dv(n.s),new Kn(n)}greyscale(){return this.desaturate(100)}spin(e){const n=this.toHsl(),i=(n.h+e)%360;return n.h=i<0?360+i:i,new Kn(n)}mix(e,n=50){const i=this.toRgb(),s=new Kn(e).toRgb(),o=n/100,r={r:(s.r-i.r)*o+i.r,g:(s.g-i.g)*o+i.g,b:(s.b-i.b)*o+i.b,a:(s.a-i.a)*o+i.a};return new Kn(r)}analogous(e=6,n=30){const i=this.toHsl(),s=360/n,o=[this];for(i.h=(i.h-(s*e>>1)+720)%360;--e;)i.h=(i.h+s)%360,o.push(new Kn(i));return o}complement(){const e=this.toHsl();return e.h=(e.h+180)%360,new Kn(e)}monochromatic(e=6){const n=this.toHsv(),{h:i}=n,{s}=n;let{v:o}=n;const r=[],a=1/e;for(;e--;)r.push(new Kn({h:i,s,v:o})),o=(o+a)%1;return r}splitcomplement(){const e=this.toHsl(),{h:n}=e;return[this,new Kn({h:(n+72)%360,s:e.s,l:e.l}),new Kn({h:(n+216)%360,s:e.s,l:e.l})]}onBackground(e){const n=this.toRgb(),i=new Kn(e).toRgb(),s=n.a+i.a*(1-n.a);return new Kn({r:(n.r*n.a+i.r*i.a*(1-n.a))/s,g:(n.g*n.a+i.g*i.a*(1-n.a))/s,b:(n.b*n.a+i.b*i.a*(1-n.a))/s,a:s})}triad(){return this.polyad(3)}tetrad(){return this.polyad(4)}polyad(e){const n=this.toHsl(),{h:i}=n,s=[this],o=360/e;for(let r=1;r<e;r++)s.push(new Kn({h:(i+r*o)%360,s:n.s,l:n.l}));return s}equals(e){const n=new Kn(e);return this.format==="cmyk"||n.format==="cmyk"?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}}function El(t,e=20){return t.mix("#141414",e).toString()}function Tce(t){const e=ys(),n=ze("button");return Y(()=>{let i={},s=t.color;if(s){const o=s.match(/var\((.*?)\)/);o&&(s=window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1]));const r=new Kn(s),a=t.dark?r.tint(20).toString():El(r,20);if(t.plain)i=n.cssVarBlock({"bg-color":t.dark?El(r,90):r.tint(90).toString(),"text-color":s,"border-color":t.dark?El(r,50):r.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":s,"hover-border-color":s,"active-bg-color":a,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":a}),e.value&&(i[n.cssVarBlockName("disabled-bg-color")]=t.dark?El(r,90):r.tint(90).toString(),i[n.cssVarBlockName("disabled-text-color")]=t.dark?El(r,50):r.tint(50).toString(),i[n.cssVarBlockName("disabled-border-color")]=t.dark?El(r,80):r.tint(80).toString());else{const l=t.dark?El(r,30):r.tint(30).toString(),c=r.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(i=n.cssVarBlock({"bg-color":s,"text-color":c,"border-color":s,"hover-bg-color":l,"hover-text-color":c,"hover-border-color":l,"active-bg-color":a,"active-border-color":a}),e.value){const u=t.dark?El(r,50):r.tint(50).toString();i[n.cssVarBlockName("disabled-bg-color")]=u,i[n.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,i[n.cssVarBlockName("disabled-border-color")]=u}}}return i})}var Pce=ce({name:"ElButton",__name:"button",props:Vk,emits:uce,setup(t,{expose:e,emit:n}){const i=t,s=n,o=Tce(i),r=ze("button"),{_ref:a,_size:l,_type:c,_disabled:u,_props:d,_plain:h,_round:f,_text:p,_dashed:m,shouldAddSpace:y,handleClick:b}=gce(i,s),k=Y(()=>[r.b(),r.m(c.value),r.m(l.value),r.is("disabled",u.value),r.is("loading",i.loading),r.is("plain",h.value),r.is("round",f.value),r.is("circle",i.circle),r.is("text",p.value),r.is("dashed",m.value),r.is("link",i.link),r.is("has-bg",i.bg)]);return e({ref:a,size:l,type:c,disabled:u,shouldAddSpace:y}),(C,$)=>(v(),D(Ct(t.tag),Zt({ref_key:"_ref",ref:a},E(d),{class:k.value,style:E(o),onClick:E(b)}),{default:w(()=>[t.loading?(v(),A(ee,{key:0},[C.$slots.loading?le(C.$slots,"loading",{key:0}):(v(),D(E(be),{key:1,class:G(E(r).is("loading"))},{default:w(()=>[(v(),D(Ct(t.loadingIcon)))]),_:1},8,["class"]))],64)):t.icon||C.$slots.icon?(v(),D(E(be),{key:1},{default:w(()=>[t.icon?(v(),D(Ct(t.icon),{key:0})):le(C.$slots,"icon",{key:1})]),_:3})):O("v-if",!0),C.$slots.default?(v(),A("span",{key:2,class:G({[E(r).em("text","expand")]:E(y)})},[le(C.$slots,"default")],2)):O("v-if",!0)]),_:3},16,["class","style","onClick"]))}}),Ice=Pce;const Lce={size:Vk.size,type:Vk.type,direction:{type:he(String),values:["horizontal","vertical"],default:"horizontal"}};var Oce=ce({name:"ElButtonGroup",__name:"button-group",props:Lce,setup(t){const e=t;It(qD,In({size:Sn(e,"size"),type:Sn(e,"type")}));const n=ze("button");return(i,s)=>(v(),A("div",{class:G([E(n).b("group"),E(n).bm("group",e.direction)])},[le(i.$slots,"default")],2))}}),XD=Oce;const We=jt(Ice,{ButtonGroup:XD});Is(XD);const I$=["hours","minutes","seconds"],wa="EP_PICKER_BASE",KD="ElPopperOptions",ZD=Symbol("commonPickerContextKey"),Og="HH:mm:ss",tc="YYYY-MM-DD",Dce={date:tc,dates:tc,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${tc} ${Og}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:tc,datetimerange:`${tc} ${Og}`};var ws=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ei(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var JD={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(ws,function(){var n=1e3,i=6e4,s=36e5,o="millisecond",r="second",a="minute",l="hour",c="day",u="week",d="month",h="quarter",f="year",p="date",m="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(F){var z=["th","st","nd","rd"],N=F%100;return"["+F+(z[(N-20)%10]||z[N]||z[0])+"]"}},C=function(F,z,N){var q=String(F);return!q||q.length>=z?F:""+Array(z+1-q.length).join(N)+F},$={s:C,z:function(F){var z=-F.utcOffset(),N=Math.abs(z),q=Math.floor(N/60),K=N%60;return(z<=0?"+":"-")+C(q,2,"0")+":"+C(K,2,"0")},m:function F(z,N){if(z.date()<N.date())return-F(N,z);var q=12*(N.year()-z.year())+(N.month()-z.month()),K=z.clone().add(q,d),X=N-K<0,U=z.clone().add(q+(X?-1:1),d);return+(-(q+(N-K)/(X?K-U:U-K))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:d,y:f,w:u,d:c,D:p,h:l,m:a,s:r,ms:o,Q:h}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},x="en",M={};M[x]=k;var P="$isDayjsObject",T=function(F){return F instanceof V||!(!F||!F[P])},I=function F(z,N,q){var K;if(!z)return x;if(typeof z=="string"){var X=z.toLowerCase();M[X]&&(K=X),N&&(M[X]=N,K=X);var U=z.split("-");if(!K&&U.length>1)return F(U[0])}else{var Q=z.name;M[Q]=z,K=Q}return!q&&K&&(x=K),K||!q&&x},L=function(F,z){if(T(F))return F.clone();var N=typeof z=="object"?z:{};return N.date=F,N.args=arguments,new V(N)},R=$;R.l=I,R.i=T,R.w=function(F,z){return L(F,{locale:z.$L,utc:z.$u,x:z.$x,$offset:z.$offset})};var V=function(){function F(N){this.$L=I(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[P]=!0}var z=F.prototype;return z.parse=function(N){this.$d=function(q){var K=q.date,X=q.utc;if(K===null)return new Date(NaN);if(R.u(K))return new Date;if(K instanceof Date)return new Date(K);if(typeof K=="string"&&!/Z$/i.test(K)){var U=K.match(y);if(U){var Q=U[2]-1||0,ne=(U[7]||"0").substring(0,3);return X?new Date(Date.UTC(U[1],Q,U[3]||1,U[4]||0,U[5]||0,U[6]||0,ne)):new Date(U[1],Q,U[3]||1,U[4]||0,U[5]||0,U[6]||0,ne)}}return new Date(K)}(N),this.init()},z.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},z.$utils=function(){return R},z.isValid=function(){return this.$d.toString()!==m},z.isSame=function(N,q){var K=L(N);return this.startOf(q)<=K&&K<=this.endOf(q)},z.isAfter=function(N,q){return L(N)<this.startOf(q)},z.isBefore=function(N,q){return this.endOf(q)<L(N)},z.$g=function(N,q,K){return R.u(N)?this[q]:this.set(K,N)},z.unix=function(){return Math.floor(this.valueOf()/1e3)},z.valueOf=function(){return this.$d.getTime()},z.startOf=function(N,q){var K=this,X=!!R.u(q)||q,U=R.p(N),Q=function(ie,re){var ke=R.w(K.$u?Date.UTC(K.$y,re,ie):new Date(K.$y,re,ie),K);return X?ke:ke.endOf(c)},ne=function(ie,re){return R.w(K.toDate()[ie].apply(K.toDate("s"),(X?[0,0,0,0]:[23,59,59,999]).slice(re)),K)},Z=this.$W,ae=this.$M,me=this.$D,we="set"+(this.$u?"UTC":"");switch(U){case f:return X?Q(1,0):Q(31,11);case d:return X?Q(1,ae):Q(0,ae+1);case u:var oe=this.$locale().weekStart||0,fe=(Z<oe?Z+7:Z)-oe;return Q(X?me-fe:me+(6-fe),ae);case c:case p:return ne(we+"Hours",0);case l:return ne(we+"Minutes",1);case a:return ne(we+"Seconds",2);case r:return ne(we+"Milliseconds",3);default:return this.clone()}},z.endOf=function(N){return this.startOf(N,!1)},z.$set=function(N,q){var K,X=R.p(N),U="set"+(this.$u?"UTC":""),Q=(K={},K[c]=U+"Date",K[p]=U+"Date",K[d]=U+"Month",K[f]=U+"FullYear",K[l]=U+"Hours",K[a]=U+"Minutes",K[r]=U+"Seconds",K[o]=U+"Milliseconds",K)[X],ne=X===c?this.$D+(q-this.$W):q;if(X===d||X===f){var Z=this.clone().set(p,1);Z.$d[Q](ne),Z.init(),this.$d=Z.set(p,Math.min(this.$D,Z.daysInMonth())).$d}else Q&&this.$d[Q](ne);return this.init(),this},z.set=function(N,q){return this.clone().$set(N,q)},z.get=function(N){return this[R.p(N)]()},z.add=function(N,q){var K,X=this;N=Number(N);var U=R.p(q),Q=function(ae){var me=L(X);return R.w(me.date(me.date()+Math.round(ae*N)),X)};if(U===d)return this.set(d,this.$M+N);if(U===f)return this.set(f,this.$y+N);if(U===c)return Q(1);if(U===u)return Q(7);var ne=(K={},K[a]=i,K[l]=s,K[r]=n,K)[U]||1,Z=this.$d.getTime()+N*ne;return R.w(Z,this)},z.subtract=function(N,q){return this.add(-1*N,q)},z.format=function(N){var q=this,K=this.$locale();if(!this.isValid())return K.invalidDate||m;var X=N||"YYYY-MM-DDTHH:mm:ssZ",U=R.z(this),Q=this.$H,ne=this.$m,Z=this.$M,ae=K.weekdays,me=K.months,we=K.meridiem,oe=function(re,ke,je,te){return re&&(re[ke]||re(q,X))||je[ke].slice(0,te)},fe=function(re){return R.s(Q%12||12,re,"0")},ie=we||function(re,ke,je){var te=re<12?"AM":"PM";return je?te.toLowerCase():te};return X.replace(b,function(re,ke){return ke||function(je){switch(je){case"YY":return String(q.$y).slice(-2);case"YYYY":return R.s(q.$y,4,"0");case"M":return Z+1;case"MM":return R.s(Z+1,2,"0");case"MMM":return oe(K.monthsShort,Z,me,3);case"MMMM":return oe(me,Z);case"D":return q.$D;case"DD":return R.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return oe(K.weekdaysMin,q.$W,ae,2);case"ddd":return oe(K.weekdaysShort,q.$W,ae,3);case"dddd":return ae[q.$W];case"H":return String(Q);case"HH":return R.s(Q,2,"0");case"h":return fe(1);case"hh":return fe(2);case"a":return ie(Q,ne,!0);case"A":return ie(Q,ne,!1);case"m":return String(ne);case"mm":return R.s(ne,2,"0");case"s":return String(q.$s);case"ss":return R.s(q.$s,2,"0");case"SSS":return R.s(q.$ms,3,"0");case"Z":return U}return null}(re)||U.replace(":","")})},z.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},z.diff=function(N,q,K){var X,U=this,Q=R.p(q),ne=L(N),Z=(ne.utcOffset()-this.utcOffset())*i,ae=this-ne,me=function(){return R.m(U,ne)};switch(Q){case f:X=me()/12;break;case d:X=me();break;case h:X=me()/3;break;case u:X=(ae-Z)/6048e5;break;case c:X=(ae-Z)/864e5;break;case l:X=ae/s;break;case a:X=ae/i;break;case r:X=ae/n;break;default:X=ae}return K?X:R.a(X)},z.daysInMonth=function(){return this.endOf(d).$D},z.$locale=function(){return M[this.$L]},z.locale=function(N,q){if(!N)return this.$L;var K=this.clone(),X=I(N,q,!0);return X&&(K.$L=X),K},z.clone=function(){return R.w(this.$d,this)},z.toDate=function(){return new Date(this.valueOf())},z.toJSON=function(){return this.isValid()?this.toISOString():null},z.toISOString=function(){return this.$d.toISOString()},z.toString=function(){return this.$d.toUTCString()},F}(),H=V.prototype;return L.prototype=H,[["$ms",o],["$s",r],["$m",a],["$H",l],["$W",c],["$M",d],["$y",f],["$D",p]].forEach(function(F){H[F[1]]=function(z){return this.$g(z,F[0],F[1])}}),L.extend=function(F,z){return F.$i||(F(z,V,L),F.$i=!0),L},L.locale=I,L.isDayjs=T,L.unix=function(F){return L(1e3*F)},L.en=M[x],L.Ls=M,L.p={},L})})(JD);var Rce=JD.exports;const dt=Ei(Rce),rw=(t,e)=>[t>0?t-1:void 0,t,t<e?t+1:void 0],QD=t=>Array.from(Array.from({length:t}).keys()),eR=t=>t.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),tR=t=>t.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),L$=function(t,e){const n=S_(t),i=S_(e);return n&&i?t.getTime()===e.getTime():!n&&!i?t===e:!1},nR=function(t,e){const n=Ee(t),i=Ee(e);return n&&i?t.length!==e.length?!1:t.every((s,o)=>L$(s,e[o])):!n&&!i?L$(t,e):!1},O$=function(t,e,n){const i=n4(e)||e==="x"?dt(t).locale(n):dt(t,e).locale(n);return i.isValid()?i:void 0},D$=function(t,e,n){return n4(e)?t:e==="x"?+t:dt(t).locale(n).format(e)},aw=(t,e)=>{const n=[],i=e==null?void 0:e();for(let s=0;s<t;s++)n.push((i==null?void 0:i.includes(s))??!1);return n},v0=t=>Ee(t)?t.map(e=>e.toDate()):t.toDate(),D4=Ge({disabledHours:{type:he(Function)},disabledMinutes:{type:he(Function)},disabledSeconds:{type:he(Function)}}),Vce=Ge({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),sR=Ge({automaticDropdown:{type:Boolean,default:!0},id:{type:he([Array,String])},name:{type:he([Array,String])},popperClass:Bn.popperClass,popperStyle:Bn.popperStyle,format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:he([String,Object]),default:Bc},editable:{type:Boolean,default:!0},saveOnBlur:{type:Boolean,default:!0},prefixIcon:{type:he([String,Object]),default:""},size:Wi,readonly:Boolean,disabled:{type:Boolean,default:void 0},placeholder:{type:String,default:""},popperOptions:{type:he(Object),default:()=>({})},modelValue:{type:he([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:he([Date,Array])},defaultTime:{type:he([Date,Array])},isRange:Boolean,...D4,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:he([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:he(String),values:Qf,default:"bottom"},fallbackPlacements:{type:he(Array),default:["bottom","top","right","left"]},...b1,...vr(["ariaLabel"]),showNow:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean}),Fce=Ge({id:{type:he(Array)},name:{type:he(Array)},modelValue:{type:he([Array,String])},startPlaceholder:String,endPlaceholder:String,disabled:Boolean}),iR=(t,e)=>{const{lang:n}=Qt(),i=J(!1),s=J(!1),o=J(null),r=Y(()=>{const{modelValue:p}=t;return!p||Ee(p)&&!p.filter(Boolean).length}),a=p=>{if(!nR(t.modelValue,p)){let m;Ee(p)?m=p.map(y=>D$(y,t.valueFormat,n.value)):p&&(m=D$(p,t.valueFormat,n.value)),e(Mt,p&&m,n.value)}},l=Y(()=>{let p;if(r.value?c.value.getDefaultValue&&(p=c.value.getDefaultValue()):Ee(t.modelValue)?p=t.modelValue.map(m=>O$(m,t.valueFormat,n.value)):p=O$(t.modelValue??"",t.valueFormat,n.value),c.value.getRangeAvailableTime){const m=c.value.getRangeAvailableTime(p);Fi(m,p)||(p=m,r.value||a(v0(p)))}return Ee(p)&&p.some(m=>!m)&&(p=[]),p}),c=J({});return{parsedValue:l,pickerActualVisible:s,pickerOptions:c,pickerVisible:i,userInput:o,valueIsEmpty:r,emitInput:a,onCalendarChange:p=>{e("calendar-change",p)},onPanelChange:(p,m,y)=>{e("panel-change",p,m,y)},onPick:(p="",m=!1)=>{i.value=m;let y;Ee(p)?y=p.map(b=>b.toDate()):y=p&&p.toDate(),o.value=null,a(y)},onSetPickerOption:p=>{c.value[p[0]]=p[1],c.value.panelReady=!0}}},Nce=["id","name","placeholder","value","disabled"],Bce=["id","name","placeholder","value","disabled"];var zce=ce({name:"PickerRangeTrigger",inheritAttrs:!1,__name:"picker-range-trigger",props:Fce,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(t,{expose:e,emit:n}){const i=t,s=n,{formItem:o}=ho(),{inputId:r}=gl(In({id:Y(()=>{var T;return(T=i.id)==null?void 0:T[0]})}),{formItemContext:o}),a=yb(),l=ze("date"),c=ze("range"),u=J(),d=J(),{wrapperRef:h,isFocused:f}=ep(u,{disabled:Y(()=>i.disabled)}),p=T=>{s("click",T)},m=T=>{s("mouseenter",T)},y=T=>{s("mouseleave",T)},b=T=>{s("touchstart",T)},k=T=>{s("startInput",T)},C=T=>{s("endInput",T)},$=T=>{s("startChange",T)},x=T=>{s("endChange",T)};return e({focus:()=>{var T;(T=u.value)==null||T.focus()},blur:()=>{var T,I;(T=u.value)==null||T.blur(),(I=d.value)==null||I.blur()}}),(T,I)=>(v(),A("div",{ref_key:"wrapperRef",ref:h,class:G([E(l).is("active",E(f)),T.$attrs.class]),style:Xe(T.$attrs.style),onClick:p,onMouseenter:m,onMouseleave:y,onTouchstartPassive:b},[le(T.$slots,"prefix"),g("input",Zt(E(a),{id:E(r),ref_key:"inputRef",ref:u,name:T.name&&T.name[0],placeholder:T.startPlaceholder,value:T.modelValue&&T.modelValue[0],class:E(c).b("input"),disabled:T.disabled,onInput:k,onChange:$}),null,16,Nce),le(T.$slots,"range-separator"),g("input",Zt(E(a),{id:T.id&&T.id[1],ref_key:"endInputRef",ref:d,name:T.name&&T.name[1],placeholder:T.endPlaceholder,value:T.modelValue&&T.modelValue[1],class:E(c).b("input"),disabled:T.disabled,onInput:C,onChange:x}),null,16,Bce),le(T.$slots,"suffix")],38))}}),Hce=zce,Uce=ce({name:"Picker",__name:"picker",props:sR,emits:[Mt,un,"focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(t,{expose:e,emit:n}){const i=t,s=n,o=$d(),r=ze("date"),a=ze("input"),l=ze("range"),{formItem:c}=ho(),u=qe(KD,{}),d=C4(i,null),h=J(),f=J(),p=J(null);let m=!1;const y=ys(),b=iR(i,s),{parsedValue:k,pickerActualVisible:C,userInput:$,pickerVisible:x,pickerOptions:M,valueIsEmpty:P,emitInput:T,onPick:I,onSetPickerOption:L,onCalendarChange:R,onPanelChange:V}=b,{isFocused:H,handleFocus:F,handleBlur:z}=ep(f,{disabled:y,beforeFocus(){return i.readonly},afterFocus(){i.automaticDropdown&&(x.value=!0)},beforeBlur(ue){var Oe;return!m&&((Oe=h.value)==null?void 0:Oe.isFocusInsideContent(ue))},afterBlur(){var ue,Oe;re.value&&!i.saveOnBlur?P.value||(Oe=(ue=M.value).handleCancel)==null||Oe.call(ue):it(),x.value=!1,m=!1,i.validateEvent&&(c==null||c.validate("blur").catch(gt=>Pt(gt)))}}),N=J(!1),q=Y(()=>[r.b("editor"),r.bm("editor",i.type),a.e("wrapper"),r.is("disabled",y.value),r.is("active",x.value),l.b("editor"),Me?l.bm("editor",Me.value):"",o.class]),K=Y(()=>[a.e("icon"),l.e("close-icon"),ve.value?"":l.em("close-icon","hidden")]);Te(x,ue=>{ue?ot(()=>{ue&&(p.value=i.modelValue)}):($.value=null,ot(()=>{X(i.modelValue)}))});const X=(ue,Oe)=>{(Oe||!nR(ue,p.value))&&(s(un,ue),Oe&&(p.value=ue),i.validateEvent&&(c==null||c.validate("change").catch(gt=>Pt(gt))))},U=ue=>{s("keydown",ue)},Q=Y(()=>f.value?Array.from(f.value.$el.querySelectorAll("input")):[]),ne=(ue,Oe,gt)=>{const _n=Q.value;_n.length&&(!gt||gt==="min"?(_n[0].setSelectionRange(ue,Oe),_n[0].focus()):gt==="max"&&(_n[1].setSelectionRange(ue,Oe),_n[1].focus()))},Z=()=>{C.value=!0},ae=()=>{s("visible-change",!0)},me=()=>{C.value=!1,x.value=!1,s("visible-change",!1)},we=()=>{x.value=!0},oe=()=>{x.value=!1},fe=Y(()=>{const ue=ge(k.value);return Ee($.value)?[$.value[0]||ue&&ue[0]||"",$.value[1]||ue&&ue[1]||""]:$.value!==null?$.value:re.value&&P.value&&!i.saveOnBlur||!re.value&&P.value||!x.value&&P.value?"":ue?ke.value||je.value||te.value?ue.join(", "):ue:""}),ie=Y(()=>i.type.includes("time")),re=Y(()=>i.type.startsWith("time")),ke=Y(()=>i.type==="dates"),je=Y(()=>i.type==="months"),te=Y(()=>i.type==="years"),se=Y(()=>i.prefixIcon||(ie.value?kD:ere)),ve=Y(()=>i.clearable&&!y.value&&!i.readonly&&!P.value&&(N.value||H.value)),$e=ue=>{i.readonly||y.value||(ve.value&&(ue==null||ue.stopPropagation(),M.value.handleClear?M.value.handleClear():T(d.valueOnClear.value),X(d.valueOnClear.value,!0),me()),s("clear"))},Se=async ue=>{var Oe;i.readonly||y.value||(((Oe=ue.target)==null?void 0:Oe.tagName)!=="INPUT"||H.value||!i.automaticDropdown)&&(x.value=!0)},Fe=()=>{i.readonly||y.value||!P.value&&i.clearable&&(N.value=!0)},Ye=()=>{N.value=!1},Re=ue=>{var Oe;i.readonly||y.value||(((Oe=ue.touches[0].target)==null?void 0:Oe.tagName)!=="INPUT"||H.value||!i.automaticDropdown)&&(x.value=!0)},He=Y(()=>i.type.includes("range")),Me=$i(),Ne=Y(()=>{var ue,Oe;return(Oe=(ue=E(h))==null?void 0:ue.popperRef)==null?void 0:Oe.contentRef}),st=IO(f,ue=>{const Oe=E(Ne),gt=js(f);Oe&&(ue.target===Oe||ue.composedPath().includes(Oe))||ue.target===gt||gt&&ue.composedPath().includes(gt)||(x.value=!1)});bn(()=>{st==null||st()});const it=()=>{if(!(re.value&&!i.saveOnBlur)){if($.value){const ue=ye(fe.value);ue&&(Pe(ue)&&T(v0(ue)),$.value=null)}$.value===""&&(T(d.valueOnClear.value),X(d.valueOnClear.value,!0),$.value=null)}},ye=ue=>ue?M.value.parseUserInput(ue):null,ge=ue=>ue?Ee(ue)?ue.map(Oe=>Oe.format(i.format)):ue.format(i.format):null,Pe=ue=>M.value.isValidValue(ue),Ie=async ue=>{if(i.readonly||y.value)return;const Oe=ss(ue);if(U(ue),Oe===Ue.esc){x.value===!0&&(x.value=!1,ue.preventDefault(),ue.stopPropagation());return}if(Oe===Ue.down&&(M.value.handleFocusPicker&&(ue.preventDefault(),ue.stopPropagation()),x.value===!1&&(x.value=!0,await ot()),M.value.handleFocusPicker)){M.value.handleFocusPicker();return}if(Oe===Ue.tab){m=!0;return}if(Oe===Ue.enter||Oe===Ue.numpadEnter){x.value?($.value===null||$.value===""||Pe(ye(fe.value)))&&(it(),x.value=!1):x.value=!0,ue.preventDefault(),ue.stopPropagation();return}if($.value){ue.stopPropagation();return}M.value.handleKeydownInput&&M.value.handleKeydownInput(ue)},ht=ue=>{$.value=ue,x.value||(x.value=!0)},Bt=ue=>{const Oe=ue.target;$.value?$.value=[Oe.value,$.value[1]]:$.value=[Oe.value,null]},Qe=ue=>{const Oe=ue.target;$.value?$.value=[$.value[0],Oe.value]:$.value=[null,Oe.value]},kt=()=>{var _n;const ue=$.value,Oe=ye(ue&&ue[0]),gt=E(k);if(Oe&&Oe.isValid()){$.value=[ge(Oe),((_n=fe.value)==null?void 0:_n[1])||null];const fs=[Oe,gt&&(gt[1]||null)];Pe(fs)&&(T(v0(fs)),$.value=null)}},pt=()=>{var _n;const ue=E($),Oe=ye(ue&&ue[1]),gt=E(k);if(Oe&&Oe.isValid()){$.value=[((_n=E(fe))==null?void 0:_n[0])||null,ge(Oe)];const fs=[gt&&gt[0],Oe];Pe(fs)&&(T(v0(fs)),$.value=null)}},_e=()=>{var ue;(ue=f.value)==null||ue.focus()},Le=()=>{var ue;(ue=f.value)==null||ue.blur()};return It(wa,{props:i,emptyValues:d}),It(ZD,b),e({focus:_e,blur:Le,handleOpen:we,handleClose:oe,onPick:I}),(ue,Oe)=>(v(),D(E(Cs),Zt({ref_key:"refPopper",ref:h,visible:E(x),effect:"light",pure:"",trigger:"click"},ue.$attrs,{role:"dialog",teleported:"",transition:`${E(r).namespace.value}-zoom-in-top`,"popper-class":[`${E(r).namespace.value}-picker__popper`,ue.popperClass],"popper-style":ue.popperStyle,"popper-options":E(u),"fallback-placements":ue.fallbackPlacements,"gpu-acceleration":!1,placement:ue.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:Z,onShow:ae,onHide:me}),{default:w(()=>[He.value?(v(),D(Hce,{key:1,id:ue.id,ref_key:"inputRef",ref:f,"model-value":fe.value,name:ue.name,disabled:E(y),readonly:!ue.editable||ue.readonly,"start-placeholder":ue.startPlaceholder,"end-placeholder":ue.endPlaceholder,class:G(q.value),style:Xe(ue.$attrs.style),"aria-label":ue.ariaLabel,tabindex:ue.tabindex,autocomplete:"off",role:"combobox",onClick:Se,onFocus:E(F),onBlur:E(z),onStartInput:Bt,onStartChange:kt,onEndInput:Qe,onEndChange:pt,onMousedown:Se,onMouseenter:Fe,onMouseleave:Ye,onTouchstartPassive:Re,onKeydown:Ie},{prefix:w(()=>[se.value?(v(),D(E(be),{key:0,class:G([E(a).e("icon"),E(l).e("icon")])},{default:w(()=>[(v(),D(Ct(se.value)))]),_:1},8,["class"])):O("v-if",!0)]),"range-separator":w(()=>[le(ue.$slots,"range-separator",{},()=>[g("span",{class:G(E(l).b("separator"))},S(ue.rangeSeparator),3)])]),suffix:w(()=>[ue.clearIcon?(v(),D(E(be),{key:0,class:G(K.value),onMousedown:Ae(E(Tt),["prevent"]),onClick:$e},{default:w(()=>[(v(),D(Ct(ue.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0)]),_:3},8,["id","model-value","name","disabled","readonly","start-placeholder","end-placeholder","class","style","aria-label","tabindex","onFocus","onBlur"])):(v(),D(E(ft),{key:0,id:ue.id,ref_key:"inputRef",ref:f,"container-role":"combobox","model-value":fe.value,name:ue.name,size:E(Me),disabled:E(y),placeholder:ue.placeholder,class:G([E(r).b("editor"),E(r).bm("editor",ue.type),E(r).is("focus",E(x)),ue.$attrs.class]),style:Xe(ue.$attrs.style),readonly:!ue.editable||ue.readonly||ke.value||je.value||te.value||ue.type==="week","aria-label":ue.ariaLabel,tabindex:ue.tabindex,"validate-event":!1,onInput:ht,onFocus:E(F),onBlur:E(z),onKeydown:Ie,onChange:it,onMousedown:Se,onMouseenter:Fe,onMouseleave:Ye,onTouchstartPassive:Re,onClick:Oe[0]||(Oe[0]=Ae(()=>{},["stop"]))},{prefix:w(()=>[se.value?(v(),D(E(be),{key:0,class:G(E(a).e("icon")),onMousedown:Ae(Se,["prevent"]),onTouchstartPassive:Re},{default:w(()=>[(v(),D(Ct(se.value)))]),_:1},8,["class"])):O("v-if",!0)]),suffix:w(()=>[ve.value&&ue.clearIcon?(v(),D(E(be),{key:0,class:G(`${E(a).e("icon")} clear-icon`),onMousedown:Ae(E(Tt),["prevent"]),onClick:$e},{default:w(()=>[(v(),D(Ct(ue.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onFocus","onBlur"]))]),content:w(()=>[le(ue.$slots,"default",{visible:E(x),actualVisible:E(C),parsedValue:E(k),format:ue.format,dateFormat:ue.dateFormat,timeFormat:ue.timeFormat,unlinkPanels:ue.unlinkPanels,type:ue.type,defaultValue:ue.defaultValue,showNow:ue.showNow,showConfirm:ue.showConfirm,showFooter:ue.showFooter,showWeekNumber:ue.showWeekNumber,onPick:Oe[1]||(Oe[1]=(...gt)=>E(I)&&E(I)(...gt)),onSelectRange:ne,onSetPickerOption:Oe[2]||(Oe[2]=(...gt)=>E(L)&&E(L)(...gt)),onCalendarChange:Oe[3]||(Oe[3]=(...gt)=>E(R)&&E(R)(...gt)),onClear:$e,onPanelChange:Oe[4]||(Oe[4]=(...gt)=>E(V)&&E(V)(...gt)),onMousedown:Oe[5]||(Oe[5]=Ae(()=>{},["stop"]))})]),_:3},16,["visible","transition","popper-class","popper-style","popper-options","fallback-placements","placement"]))}}),jce=Uce;const Ll=new Map;if(Xt){let t;document.addEventListener("mousedown",e=>t=e),document.addEventListener("mouseup",e=>{if(t){for(const n of Ll.values())for(const{documentHandler:i}of n)i(e,t);t=void 0}})}function R$(t,e){let n=[];return Ee(e.arg)?n=e.arg:$o(e.arg)&&n.push(e.arg),function(i,s){const o=e.instance.popperRef,r=i.target,a=s==null?void 0:s.target,l=!e||!e.instance,c=!r||!a,u=t.contains(r)||t.contains(a),d=t===r,h=n.length&&n.some(p=>p==null?void 0:p.contains(r))||n.length&&n.includes(a),f=o&&(o.contains(r)||o.contains(a));l||c||u||d||h||f||e.value(i,s)}}const Dg={beforeMount(t,e){Ll.has(t)||Ll.set(t,[]),Ll.get(t).push({documentHandler:R$(t,e),bindingFn:e.value})},updated(t,e){Ll.has(t)||Ll.set(t,[]);const n=Ll.get(t),i=n.findIndex(o=>o.bindingFn===e.oldValue),s={documentHandler:R$(t,e),bindingFn:e.value};i>=0?n.splice(i,1,s):n.push(s)},unmounted(t){Ll.delete(t)}},Wce=100,Yce=600,Fv="_RepeatClick",ny={beforeMount(t,e){const n=e.value,{interval:i=Wce,delay:s=Yce}=et(n)?{}:n;let o,r;const a=()=>et(n)?n():n.handler(),l=()=>{r&&(clearTimeout(r),r=void 0),o&&(clearInterval(o),o=void 0)},c=u=>{u.button===0&&(l(),a(),document.addEventListener("mouseup",l,{once:!0}),r=setTimeout(()=>{o=setInterval(()=>{a()},i)},s))};t[Fv]={start:c,clear:l},t.addEventListener("mousedown",c)},unmounted(t){if(!t[Fv])return;const{start:e,clear:n}=t[Fv];e&&t.removeEventListener("mousedown",e),n&&(n(),document.removeEventListener("mouseup",n)),t[Fv]=null}},Nk="_trap-focus-children",Tu=[],V$=t=>{if(Tu.length===0)return;const e=ss(t),n=Tu[Tu.length-1][Nk];if(n.length>0&&e===Ue.tab){if(n.length===1){t.preventDefault(),document.activeElement!==n[0]&&n[0].focus();return}const i=t.shiftKey,s=t.target===n[0],o=t.target===n[n.length-1];s&&i&&(t.preventDefault(),n[n.length-1].focus()),o&&!i&&(t.preventDefault(),n[0].focus())}},qce={beforeMount(t){t[Nk]=z7(t),Tu.push(t),Tu.length<=1&&document.addEventListener("keydown",V$)},updated(t){ot(()=>{t[Nk]=z7(t)})},unmounted(){Tu.shift(),Tu.length===0&&document.removeEventListener("keydown",V$)}};var F$=!1,ku,Bk,zk,_0,y0,oR,b0,Hk,Uk,jk,rR,Wk,Yk,aR,lR;function Gi(){if(!F$){F$=!0;var t=navigator.userAgent,e=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(t),n=/(Mac OS X)|(Windows)|(Linux)/.exec(t);if(Wk=/\b(iPhone|iP[ao]d)/.exec(t),Yk=/\b(iP[ao]d)/.exec(t),jk=/Android/i.exec(t),aR=/FBAN\/\w+;/i.exec(t),lR=/Mobile/i.exec(t),rR=!!/Win64/.exec(t),e){ku=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,ku&&document&&document.documentMode&&(ku=document.documentMode);var i=/(?:Trident\/(\d+.\d+))/.exec(t);oR=i?parseFloat(i[1])+4:ku,Bk=e[2]?parseFloat(e[2]):NaN,zk=e[3]?parseFloat(e[3]):NaN,_0=e[4]?parseFloat(e[4]):NaN,_0?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),y0=e&&e[1]?parseFloat(e[1]):NaN):y0=NaN}else ku=Bk=zk=y0=_0=NaN;if(n){if(n[1]){var s=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);b0=s?parseFloat(s[1].replace("_",".")):!0}else b0=!1;Hk=!!n[2],Uk=!!n[3]}else b0=Hk=Uk=!1}}var qk={ie:function(){return Gi()||ku},ieCompatibilityMode:function(){return Gi()||oR>ku},ie64:function(){return qk.ie()&&rR},firefox:function(){return Gi()||Bk},opera:function(){return Gi()||zk},webkit:function(){return Gi()||_0},safari:function(){return qk.webkit()},chrome:function(){return Gi()||y0},windows:function(){return Gi()||Hk},osx:function(){return Gi()||b0},linux:function(){return Gi()||Uk},iphone:function(){return Gi()||Wk},mobile:function(){return Gi()||Wk||Yk||jk||lR},nativeApp:function(){return Gi()||aR},android:function(){return Gi()||jk},ipad:function(){return Gi()||Yk}},Gce=qk,Nv=!!(typeof window<"u"&&window.document&&window.document.createElement),Xce={canUseDOM:Nv,canUseWorkers:typeof Worker<"u",canUseEventListeners:Nv&&!!(window.addEventListener||window.attachEvent),canUseViewport:Nv&&!!window.screen,isInWorker:!Nv},cR=Xce,uR;cR.canUseDOM&&(uR=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function Kce(t,e){if(!cR.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,i=n in document;if(!i){var s=document.createElement("div");s.setAttribute(n,"return;"),i=typeof s[n]=="function"}return!i&&uR&&t==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var Zce=Kce,N$=10,B$=40,z$=800;function dR(t){var e=0,n=0,i=0,s=0;return"detail"in t&&(n=t.detail),"wheelDelta"in t&&(n=-t.wheelDelta/120),"wheelDeltaY"in t&&(n=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=n,n=0),i=e*N$,s=n*N$,"deltaY"in t&&(s=t.deltaY),"deltaX"in t&&(i=t.deltaX),(i||s)&&t.deltaMode&&(t.deltaMode==1?(i*=B$,s*=B$):(i*=z$,s*=z$)),i&&!e&&(e=i<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:e,spinY:n,pixelX:i,pixelY:s}}dR.getEventType=function(){return Gce.firefox()?"DOMMouseScroll":Zce("wheel")?"wheel":"mousewheel"};var Jce=dR;/**
* Checks if an event is supported in the current execution environment.
*
* NOTE: This will not work correctly for non-generic events such as `change`,
* `reset`, `load`, `error`, and `select`.
*
* Borrows from Modernizr.
*
* @param {string} eventNameSuffix Event name, e.g. "click".
* @param {?boolean} capture Check if the capture phase is supported.
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr 3.0.0pre (Custom Build) | MIT
*/const w0="_Mousewheel",H$=function(t,e){if(t&&t.addEventListener){hR(t);const n=function(i){const s=Jce(i);e&&Reflect.apply(e,this,[i,s])};t[w0]={wheelHandler:n},t.addEventListener("wheel",n,{passive:!0})}},hR=t=>{var e;(e=t[w0])!=null&&e.wheelHandler&&(t.removeEventListener("wheel",t[w0].wheelHandler),t[w0]=null)},Qce={beforeMount(t,e){H$(t,e.value)},unmounted(t){hR(t)},updated(t,e){e.value!==e.oldValue&&H$(t,e.value)}},eue=Ge({...Vce,datetimeRole:String,parsedValue:{type:he(Object)}}),tue=({getAvailableHours:t,getAvailableMinutes:e,getAvailableSeconds:n})=>{const i=(r,a,l,c)=>{const u={hour:t,minute:e,second:n};let d=r;return["hour","minute","second"].forEach(h=>{if(u[h]){let f;const p=u[h];switch(h){case"minute":f=p(d.hour(),a,c);break;case"second":f=p(d.hour(),d.minute(),a,c);break;default:f=p(a,c);break}if(f!=null&&f.length&&!f.includes(d[h]())){const m=l?0:f.length-1;d=d[h](f[m])}}}),d},s={};return{timePickerOptions:s,getAvailableTime:i,onSetOption:([r,a])=>{s[r]=a}}},lw=t=>{const e=(i,s)=>i||s,n=i=>i!==!0;return t.map(e).filter(n)},fR=(t,e,n)=>({getHoursList:(r,a)=>aw(24,t&&(()=>t==null?void 0:t(r,a))),getMinutesList:(r,a,l)=>aw(60,e&&(()=>e==null?void 0:e(r,a,l))),getSecondsList:(r,a,l,c)=>aw(60,n&&(()=>n==null?void 0:n(r,a,l,c)))}),nue=(t,e,n)=>{const{getHoursList:i,getMinutesList:s,getSecondsList:o}=fR(t,e,n);return{getAvailableHours:(c,u)=>lw(i(c,u)),getAvailableMinutes:(c,u,d)=>lw(s(c,u,d)),getAvailableSeconds:(c,u,d,h)=>lw(o(c,u,d,h))}},sue=(t,e)=>{const n=J(t.parsedValue);return Te(()=>t.visible,i=>{const s=N3(e.modelValue),o=N3(e.valueOnClear);if(i&&s===o){n.value=o;return}i||(n.value=t.parsedValue)}),n},iue=Ge({role:{type:String,required:!0},spinnerDate:{type:he(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:he(String),default:""},...D4}),oue=["onClick"],rue=["onMouseenter"];var aue=ce({__name:"basic-time-spinner",props:iue,emits:[un,"select-range","set-option"],setup(t,{emit:e}){const n=t,{isRange:i,format:s,saveOnBlur:o}=qe(wa).props,r=e,a=ze("time"),{getHoursList:l,getMinutesList:c,getSecondsList:u}=fR(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let d=!1;const h={hours:!1,minutes:!1,seconds:!1},f=J(),p={hours:J(),minutes:J(),seconds:J()},m=Y(()=>n.showSeconds?I$:I$.slice(0,2)),y=Y(()=>{const{spinnerDate:Q}=n;return{hours:Q.hour(),minutes:Q.minute(),seconds:Q.second()}}),b=Y(()=>{const{hours:Q,minutes:ne}=E(y),{role:Z,spinnerDate:ae}=n,me=i?void 0:ae;return{hours:l(Z,me),minutes:c(Q,Z,me),seconds:u(Q,ne,Z,me)}}),k=Y(()=>{const{hours:Q,minutes:ne,seconds:Z}=E(y);return{hours:rw(Q,23),minutes:rw(ne,59),seconds:rw(Z,59)}}),C=cd(Q=>{d=!1,M(Q)},200),$=Q=>{if(!n.amPmMode)return"";const ne=n.amPmMode==="A";let Z=Q<12?" am":" pm";return ne&&(Z=Z.toUpperCase()),Z},x=Q=>{let ne=[0,0];const Z=s||Og,ae=Z.indexOf("HH"),me=Z.indexOf("mm"),we=Z.indexOf("ss");switch(Q){case"hours":ae!==-1&&(ne=[ae,ae+2]);break;case"minutes":me!==-1&&(ne=[me,me+2]);break;case"seconds":we!==-1&&(ne=[we,we+2]);break}const[oe,fe]=ne;r("select-range",oe,fe),f.value=Q},M=Q=>{I(Q,E(y)[Q])},P=()=>{M("hours"),M("minutes"),M("seconds")},T=Q=>Q.querySelector(`.${a.namespace.value}-scrollbar__wrap`),I=(Q,ne)=>{if(n.arrowControl)return;const Z=E(p[Q]);Z&&Z.$el&&(o||(h[Q]=!0,Mg(()=>{h[Q]=!1})),T(Z.$el).scrollTop=Math.max(0,ne*L(Q)))},L=Q=>{var Z;const ne=(Z=E(p[Q]))==null?void 0:Z.$el.querySelector("li");return ne&&Number.parseFloat(Wa(ne,"height"))||0},R=()=>{H(1)},V=()=>{H(-1)},H=Q=>{f.value||x("hours");const ne=f.value,Z=E(y)[ne],ae=F(ne,Z,Q,f.value==="hours"?24:60);z(ne,ae),I(ne,ae),ot(()=>x(ne))},F=(Q,ne,Z,ae)=>{let me=(ne+Z+ae)%ae;const we=E(b)[Q];for(;we[me]&&me!==ne;)me=(me+Z+ae)%ae;return me},z=(Q,ne)=>{if(E(b)[Q][ne])return;const{hours:Z,minutes:ae,seconds:me}=E(y);let we;switch(Q){case"hours":we=n.spinnerDate.hour(ne).minute(ae).second(me);break;case"minutes":we=n.spinnerDate.hour(Z).minute(ne).second(me);break;case"seconds":we=n.spinnerDate.hour(Z).minute(ae).second(ne);break}r(un,we)},N=(Q,{value:ne,disabled:Z})=>{Z||(z(Q,ne),x(Q),I(Q,ne))},q=Q=>{if(!o&&h[Q])return;const ne=E(p[Q]);ne&&(d=!0,C(Q),z(Q,Math.min(Math.round((T(ne.$el).scrollTop-(K(Q)*.5-10)/L(Q)+3)/L(Q)),Q==="hours"?23:59)))},K=Q=>E(p[Q]).$el.offsetHeight,X=()=>{const Q=ne=>{const Z=E(p[ne]);Z&&Z.$el&&(T(Z.$el).onscroll=()=>{q(ne)})};Q("hours"),Q("minutes"),Q("seconds")};Ft(()=>{ot(()=>{!n.arrowControl&&X(),P(),n.role==="start"&&x("hours")})});const U=(Q,ne)=>{p[ne].value=Q??void 0};return r("set-option",[`${n.role}_scrollDown`,H]),r("set-option",[`${n.role}_emitSelectRange`,x]),Te(()=>n.spinnerDate,()=>{d||P()}),(Q,ne)=>(v(),A("div",{class:G([E(a).b("spinner"),{"has-seconds":Q.showSeconds}])},[Q.arrowControl?O("v-if",!0):(v(!0),A(ee,{key:0},Ce(m.value,Z=>(v(),D(E(Ai),{key:Z,ref_for:!0,ref:ae=>U(ae,Z),class:G(E(a).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":E(a).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:ae=>x(Z),onMousemove:ae=>M(Z)},{default:w(()=>[(v(!0),A(ee,null,Ce(b.value[Z],(ae,me)=>(v(),A("li",{key:me,class:G([E(a).be("spinner","item"),E(a).is("active",me===y.value[Z]),E(a).is("disabled",ae)]),onClick:we=>N(Z,{value:me,disabled:ae})},[Z==="hours"?(v(),A(ee,{key:0},[B(S(("0"+(Q.amPmMode?me%12||12:me)).slice(-2))+S($(me)),1)],64)):(v(),A(ee,{key:1},[B(S(("0"+me).slice(-2)),1)],64))],10,oue))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),Q.arrowControl?(v(!0),A(ee,{key:1},Ce(m.value,Z=>(v(),A("div",{key:Z,class:G([E(a).be("spinner","wrapper"),E(a).is("arrow")]),onMouseenter:ae=>x(Z)},[De((v(),D(E(be),{class:G(["arrow-up",E(a).be("spinner","arrow")])},{default:w(()=>[_(E(x4))]),_:1},8,["class"])),[[E(ny),V]]),De((v(),D(E(be),{class:G(["arrow-down",E(a).be("spinner","arrow")])},{default:w(()=>[_(E(tp))]),_:1},8,["class"])),[[E(ny),R]]),g("ul",{class:G(E(a).be("spinner","list"))},[(v(!0),A(ee,null,Ce(k.value[Z],(ae,me)=>(v(),A("li",{key:me,class:G([E(a).be("spinner","item"),E(a).is("active",ae===y.value[Z]),E(a).is("disabled",b.value[Z][ae])])},[E(_t)(ae)?(v(),A(ee,{key:0},[Z==="hours"?(v(),A(ee,{key:0},[B(S(("0"+(Q.amPmMode?ae%12||12:ae)).slice(-2))+S($(ae)),1)],64)):(v(),A(ee,{key:1},[B(S(("0"+ae).slice(-2)),1)],64))],64)):O("v-if",!0)],2))),128))],2)],42,rue))),128)):O("v-if",!0)],2))}}),lue=aue,cue=ce({__name:"panel-time-pick",props:eue,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,i=e,s=qe(wa),{arrowControl:o,disabledHours:r,disabledMinutes:a,disabledSeconds:l,defaultValue:c}=s.props,{getAvailableHours:u,getAvailableMinutes:d,getAvailableSeconds:h}=nue(r,a,l),f=ze("time"),{t:p,lang:m}=Qt(),y=J([0,2]),b=sue(n,{modelValue:Y(()=>s.props.modelValue),valueOnClear:Y(()=>s!=null&&s.emptyValues?s.emptyValues.valueOnClear.value:null)}),k=Y(()=>tn(n.actualVisible)?`${f.namespace.value}-zoom-in-top`:""),C=Y(()=>n.format.includes("ss")),$=Y(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),x=K=>{const X=dt(K).locale(m.value),U=z(X);return X.isSame(U)},M=()=>{const K=b.value;i("pick",K,!1),ot(()=>{b.value=K})},P=(K=!1,X=!1)=>{X||i("pick",n.parsedValue,K)},T=K=>{n.visible&&i("pick",z(K).millisecond(0),!0)},I=(K,X)=>{i("select-range",K,X),y.value=[K,X]},L=K=>{const X=n.format,U=X.indexOf("HH"),Q=X.indexOf("mm"),ne=X.indexOf("ss"),Z=[],ae=[];U!==-1&&(Z.push(U),ae.push("hours")),Q!==-1&&(Z.push(Q),ae.push("minutes")),ne!==-1&&C.value&&(Z.push(ne),ae.push("seconds"));const me=(Z.indexOf(y.value[0])+K+Z.length)%Z.length;V.start_emitSelectRange(ae[me])},R=K=>{const X=ss(K),{left:U,right:Q,up:ne,down:Z}=Ue;if([U,Q].includes(X)){L(X===U?-1:1),K.preventDefault();return}if([ne,Z].includes(X)){const ae=X===ne?-1:1;V.start_scrollDown(ae),K.preventDefault();return}},{timePickerOptions:V,onSetOption:H,getAvailableTime:F}=tue({getAvailableHours:u,getAvailableMinutes:d,getAvailableSeconds:h}),z=K=>F(K,n.datetimeRole||"",!0),N=K=>K?dt(K,n.format).locale(m.value):null,q=()=>dt(c).locale(m.value);return i("set-picker-option",["isValidValue",x]),i("set-picker-option",["parseUserInput",N]),i("set-picker-option",["handleKeydownInput",R]),i("set-picker-option",["getRangeAvailableTime",z]),i("set-picker-option",["getDefaultValue",q]),i("set-picker-option",["handleCancel",M]),(K,X)=>(v(),D(ji,{name:k.value},{default:w(()=>[K.actualVisible||K.visible?(v(),A("div",{key:0,class:G(E(f).b("panel"))},[g("div",{class:G([E(f).be("panel","content"),{"has-seconds":C.value}])},[_(lue,{ref:"spinner",role:K.datetimeRole||"start","arrow-control":E(o),"show-seconds":C.value,"am-pm-mode":$.value,"spinner-date":K.parsedValue,"disabled-hours":E(r),"disabled-minutes":E(a),"disabled-seconds":E(l),onChange:T,onSetOption:E(H),onSelectRange:I},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),g("div",{class:G(E(f).be("panel","footer"))},[g("button",{type:"button",class:G([E(f).be("panel","btn"),"cancel"]),onClick:M},S(E(p)("el.datepicker.cancel")),3),g("button",{type:"button",class:G([E(f).be("panel","btn"),"confirm"]),onClick:X[0]||(X[0]=U=>P())},S(E(p)("el.datepicker.confirm")),3)],2)],2)):O("v-if",!0)]),_:1},8,["name"]))}}),Gk=cue,pR={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(ws,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,o=/\d\d/,r=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},c=function(y){return(y=+y)+(y>68?1900:2e3)},u=function(y){return function(b){this[y]=+b}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var k=b.match(/([+-]|\d\d)/g),C=60*k[1]+(+k[2]||0);return C===0?0:k[0]==="+"?-C:C}(y)}],h=function(y){var b=l[y];return b&&(b.indexOf?b:b.s.concat(b.f))},f=function(y,b){var k,C=l.meridiem;if(C){for(var $=1;$<=24;$+=1)if(y.indexOf(C($,0,b))>-1){k=$>12;break}}else k=y===(b?"pm":"PM");return k},p={A:[a,function(y){this.afternoon=f(y,!1)}],a:[a,function(y){this.afternoon=f(y,!0)}],Q:[s,function(y){this.month=3*(y-1)+1}],S:[s,function(y){this.milliseconds=100*+y}],SS:[o,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[r,u("seconds")],ss:[r,u("seconds")],m:[r,u("minutes")],mm:[r,u("minutes")],H:[r,u("hours")],h:[r,u("hours")],HH:[r,u("hours")],hh:[r,u("hours")],D:[r,u("day")],DD:[o,u("day")],Do:[a,function(y){var b=l.ordinal,k=y.match(/\d+/);if(this.day=k[0],b)for(var C=1;C<=31;C+=1)b(C).replace(/\[|\]/g,"")===y&&(this.day=C)}],w:[r,u("week")],ww:[o,u("week")],M:[r,u("month")],MM:[o,u("month")],MMM:[a,function(y){var b=h("months"),k=(h("monthsShort")||b.map(function(C){return C.slice(0,3)})).indexOf(y)+1;if(k<1)throw new Error;this.month=k%12||k}],MMMM:[a,function(y){var b=h("months").indexOf(y)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(y){this.year=c(y)}],YYYY:[/\d{4}/,u("year")],Z:d,ZZ:d};function m(y){var b,k;b=y,k=l&&l.formats;for(var C=(y=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(L,R,V){var H=V&&V.toUpperCase();return R||k[V]||n[V]||k[H].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,z,N){return z||N.slice(1)})})).match(i),$=C.length,x=0;x<$;x+=1){var M=C[x],P=p[M],T=P&&P[0],I=P&&P[1];C[x]=I?{regex:T,parser:I}:M.replace(/^\[|\]$/g,"")}return function(L){for(var R={},V=0,H=0;V<$;V+=1){var F=C[V];if(typeof F=="string")H+=F.length;else{var z=F.regex,N=F.parser,q=L.slice(H),K=z.exec(q)[0];N.call(R,K),L=L.replace(K,"")}}return function(X){var U=X.afternoon;if(U!==void 0){var Q=X.hours;U?Q<12&&(X.hours+=12):Q===12&&(X.hours=0),delete X.afternoon}}(R),R}}return function(y,b,k){k.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(c=y.parseTwoDigitYear);var C=b.prototype,$=C.parse;C.parse=function(x){var M=x.date,P=x.utc,T=x.args;this.$u=P;var I=T[1];if(typeof I=="string"){var L=T[2]===!0,R=T[3]===!0,V=L||R,H=T[2];R&&(H=T[2]),l=this.$locale(),!L&&H&&(l=k.Ls[H]),this.$d=function(q,K,X,U){try{if(["x","X"].indexOf(K)>-1)return new Date((K==="X"?1e3:1)*q);var Q=m(K)(q),ne=Q.year,Z=Q.month,ae=Q.day,me=Q.hours,we=Q.minutes,oe=Q.seconds,fe=Q.milliseconds,ie=Q.zone,re=Q.week,ke=new Date,je=ae||(ne||Z?1:ke.getDate()),te=ne||ke.getFullYear(),se=0;ne&&!Z||(se=Z>0?Z-1:ke.getMonth());var ve,$e=me||0,Se=we||0,Fe=oe||0,Ye=fe||0;return ie?new Date(Date.UTC(te,se,je,$e,Se,Fe,Ye+60*ie.offset*1e3)):X?new Date(Date.UTC(te,se,je,$e,Se,Fe,Ye)):(ve=new Date(te,se,je,$e,Se,Fe,Ye),re&&(ve=U(ve).week(re).toDate()),ve)}catch{return new Date("")}}(M,I,P,k),this.init(),H&&H!==!0&&(this.$L=this.locale(H).$L),V&&M!=this.format(I)&&(this.$d=new Date("")),l={}}else if(I instanceof Array)for(var F=I.length,z=1;z<=F;z+=1){T[1]=I[z-1];var N=k.apply(this,T);if(N.isValid()){this.$d=N.$d,this.$L=N.$L,this.init();break}z===F&&(this.$d=new Date(""))}else $.call(this,x)}}})})(pR);var uue=pR.exports;const mR=Ei(uue),Rg=Ge({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:hl},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),due={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},hue=["aria-label"],fue=["aria-label"];var pue=ce({name:"ElTag",__name:"tag",props:Rg,emits:due,setup(t,{emit:e}){const n=t,i=e,s=$i(),{t:o}=Qt(),r=ze("tag"),a=Y(()=>{const{type:d,hit:h,effect:f,closable:p,round:m}=n;return[r.b(),r.is("closable",p),r.m(d||"primary"),r.m(s.value),r.m(f),r.is("hit",h),r.is("round",m)]}),l=d=>{i("close",d)},c=d=>{i("click",d)},u=d=>{var h,f,p;(p=(f=(h=d==null?void 0:d.component)==null?void 0:h.subTree)==null?void 0:f.component)!=null&&p.bum&&(d.component.subTree.component.bum=null)};return(d,h)=>t.disableTransitions?(v(),A("span",{key:0,class:G(a.value),style:Xe({backgroundColor:t.color}),onClick:c},[g("span",{class:G(E(r).e("content"))},[le(d.$slots,"default")],2),t.closable?(v(),A("button",{key:0,"aria-label":E(o)("el.tag.close"),class:G(E(r).e("close")),type:"button",onClick:Ae(l,["stop"])},[_(E(be),null,{default:w(()=>[_(E(Fr))]),_:1})],10,hue)):O("v-if",!0)],6)):(v(),D(ji,{key:1,name:`${E(r).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:u},{default:w(()=>[g("span",{class:G(a.value),style:Xe({backgroundColor:t.color}),onClick:c},[g("span",{class:G(E(r).e("content"))},[le(d.$slots,"default")],2),t.closable?(v(),A("button",{key:0,"aria-label":E(o)("el.tag.close"),class:G(E(r).e("close")),type:"button",onClick:Ae(l,["stop"])},[_(E(be),null,{default:w(()=>[_(E(Fr))]),_:1})],10,fue)):O("v-if",!0)],6)]),_:3},8,["name"]))}}),mue=pue;const Ci=jt(mue),gR=Symbol("ElSelectGroup"),Eb=Symbol("ElSelect"),Xk={label:"label",value:"value",disabled:"disabled",options:"options"};function gue(t){const e=J({...Xk,...t.props});let n={...t.props};return Te(()=>t.props,a=>{Fi(a,n)||(e.value={...Xk,...a},n={...a})},{deep:!0}),{aliasProps:e,getLabel:a=>Vi(a,e.value.label),getValue:a=>Vi(a,e.value.value),getDisabled:a=>Vi(a,e.value.disabled),getOptions:a=>Vi(a,e.value.options)}}const vue=Ge({name:String,id:String,modelValue:{type:he([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Wi,effect:{type:he(String),default:"light"},disabled:{type:Boolean,default:void 0},clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperStyle:{type:he([String,Object])},popperOptions:{type:he(Object),default:()=>({})},remote:Boolean,debounce:{type:Number,default:300},loadingText:String,noMatchText:String,noDataText:String,remoteMethod:{type:he(Function)},filterMethod:{type:he(Function)},multiple:Boolean,multipleLimit:{type:Number,default:0},placeholder:{type:String},defaultFirstOption:Boolean,reserveKeyword:{type:Boolean,default:!0},valueKey:{type:String,default:"value"},collapseTags:Boolean,collapseTagsTooltip:Boolean,tagTooltip:{type:he(Object),default:()=>({})},maxCollapseTags:{type:Number,default:1},teleported:Bn.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:as,default:Bc},fitInputWidth:Boolean,suffixIcon:{type:as,default:tp},tagType:{...Rg.type,default:"info"},tagEffect:{...Rg.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:he(String),values:Qf,default:"bottom-start"},fallbackPlacements:{type:he(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:Bn.appendTo,options:{type:he(Array)},props:{type:he(Object),default:()=>Xk},...b1,...vr(["ariaLabel"])});Mt+"",un+"",ND.scroll;const Kk="ElOption",_ue=Ge({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean});function yue(t,e){const n=qe(Eb);n||uo(Kk,"usage: <el-select><el-option /></el-select/>");const i=qe(gR,{disabled:!1}),s=Y(()=>u(Us(n.props.modelValue),t.value)),o=Y(()=>{if(n.props.multiple){const f=Us(n.props.modelValue??[]);return!s.value&&f.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),r=Y(()=>t.label??(yt(t.value)?"":t.value)),a=Y(()=>t.value||t.label||""),l=Y(()=>t.disabled||e.groupDisabled||o.value),c=bt(),u=(f=[],p)=>{if(yt(t.value)){const m=n.props.valueKey;return f&&f.some(y=>nn(Vi(y,m))===Vi(p,m))}else return f&&f.includes(p)},d=()=>{l.value||(n.states.hoveringIndex=n.optionsArray.indexOf(c.proxy))},h=f=>{e.visible=new RegExp(Ose(f),"i").test(String(r.value))||t.created};return Te(()=>r.value,()=>{!t.created&&!n.props.remote&&n.setSelected()}),Te(()=>t.value,(f,p)=>{const{remote:m,valueKey:y}=n.props;if((m?f!==p:!Fi(f,p))&&(n.onOptionDestroy(p,c.proxy),n.onOptionCreate(c.proxy)),!t.created&&!m){if(y&&yt(f)&&yt(p)&&f[y]===p[y])return;n.setSelected()}}),Te(()=>i.disabled,()=>{e.groupDisabled=i.disabled},{immediate:!0}),{select:n,currentLabel:r,currentValue:a,itemSelected:s,isDisabled:l,hoverItem:d,updateOption:h}}var bue=ce({name:Kk,componentName:Kk,props:_ue,setup(t){const e=ze("select"),n=pr(),i=Y(()=>[e.be("dropdown","item"),e.is("disabled",E(a)),e.is("selected",E(r)),e.is("hovering",E(h))]),s=In({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:o,itemSelected:r,isDisabled:a,select:l,hoverItem:c,updateOption:u}=yue(t,s),{visible:d,hover:h}=co(s),f=bt().proxy;l.onOptionCreate(f),bn(()=>{const m=f.value;ot(()=>{const{selected:y}=l.states,b=y.some(k=>k.value===f.value);l.states.cachedOptions.get(m)===f&&!b&&l.states.cachedOptions.delete(m)}),l.onOptionDestroy(m,f)});function p(){a.value||l.handleOptionSelect(f)}return{ns:e,id:n,containerKls:i,currentLabel:o,itemSelected:r,isDisabled:a,select:l,visible:d,hover:h,states:s,hoverItem:c,updateOption:u,selectOptionClick:p}}});const wue=["id","aria-disabled","aria-selected"];function kue(t,e,n,i,s,o){return De((v(),A("li",{id:t.id,class:G(t.containerKls),role:"option","aria-disabled":t.isDisabled||void 0,"aria-selected":t.itemSelected,onMousemove:e[0]||(e[0]=(...r)=>t.hoverItem&&t.hoverItem(...r)),onClick:e[1]||(e[1]=Ae((...r)=>t.selectOptionClick&&t.selectOptionClick(...r),["stop"]))},[le(t.$slots,"default",{},()=>[g("span",null,S(t.currentLabel),1)])],42,wue)),[[Ut,t.visible]])}var R4=hi(bue,[["render",kue]]),Cue=ce({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=ze("select"),n=J(),i=bt(),s=J([]);It(gR,In({...co(t)}));const o=Y(()=>s.value.some(c=>c.visible===!0)),r=c=>{var u;return c.type.name==="ElOption"&&!!((u=c.component)!=null&&u.proxy)},a=c=>{const u=Us(c),d=[];return u.forEach(h=>{var f;ls(h)&&(r(h)?d.push(h.component.proxy):Ee(h.children)&&h.children.length?d.push(...a(h.children)):(f=h.component)!=null&&f.subTree&&d.push(...a(h.component.subTree)))}),d},l=()=>{s.value=a(i.subTree)};return Ft(()=>{l()}),xse(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:o,ns:e}}});function xue(t,e,n,i,s,o){return De((v(),A("ul",{ref:"groupRef",class:G(t.ns.be("group","wrap"))},[g("li",{class:G(t.ns.be("group","title"))},S(t.label),3),g("li",null,[g("ul",{class:G(t.ns.b("group"))},[le(t.$slots,"default")],2)])],2)),[[Ut,t.visible]])}var V4=hi(Cue,[["render",xue]]),Sue=ce({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=qe(Eb),e=ze("select"),n=Y(()=>t.props.popperClass),i=Y(()=>t.props.multiple),s=Y(()=>t.props.fitInputWidth),o=J("");function r(){var l;const a=(l=t.selectRef)==null?void 0:l.offsetWidth;a?o.value=`${a-eZ}px`:o.value=""}return Ft(()=>{r(),Es(t.selectRef,r)}),{ns:e,minWidth:o,popperClass:n,isMultiple:i,isFitInputWidth:s}}});function $ue(t,e,n,i,s,o){return v(),A("div",{class:G([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:Xe({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(v(),A("div",{key:0,class:G(t.ns.be("dropdown","header"))},[le(t.$slots,"header")],2)):O("v-if",!0),le(t.$slots,"default"),t.$slots.footer?(v(),A("div",{key:1,class:G(t.ns.be("dropdown","footer"))},[le(t.$slots,"footer")],2)):O("v-if",!0)],6)}var Aue=hi(Sue,[["render",$ue]]);const Eue=(t,e)=>{const{t:n}=Qt(),i=di(),s=pr(),o=ze("select"),r=ze("input"),a=In({inputValue:"",options:new Map,cachedOptions:new Map,optionValues:[],selected:[],selectionWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),l=J(),c=J(),u=J(),d=J(),h=J(),f=J(),p=J(),m=J(),y=J(),b=J(),k=J(),C=J(!1),$=J(),x=J(!1),{form:M,formItem:P}=ho(),{inputId:T}=gl(t,{formItemContext:P}),{valueOnClear:I,isEmptyValue:L}=C4(t),{isComposing:R,handleCompositionStart:V,handleCompositionUpdate:H,handleCompositionEnd:F}=k4({afterComposition:xe=>ht(xe)}),z=ys(),{wrapperRef:N,isFocused:q,handleBlur:K}=ep(h,{disabled:z,afterFocus(){t.automaticDropdown&&!C.value&&(C.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(xe){var Ze,$t;return((Ze=u.value)==null?void 0:Ze.isFocusInsideContent(xe))||(($t=d.value)==null?void 0:$t.isFocusInsideContent(xe))},afterBlur(){var xe;C.value=!1,a.menuVisibleOnFocus=!1,t.validateEvent&&((xe=P==null?void 0:P.validate)==null||xe.call(P,"blur").catch(Ze=>Pt(Ze)))}}),X=Y(()=>Ee(t.modelValue)?t.modelValue.length>0:!L(t.modelValue)),U=Y(()=>(M==null?void 0:M.statusIcon)??!1),Q=Y(()=>t.clearable&&!z.value&&X.value&&(q.value||a.inputHovering)),ne=Y(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),Z=Y(()=>o.is("reverse",!!(ne.value&&C.value))),ae=Y(()=>(P==null?void 0:P.validateState)||""),me=Y(()=>ae.value&&A4[ae.value]),we=Y(()=>t.remote?t.debounce:0),oe=Y(()=>t.remote&&!a.inputValue&&a.options.size===0),fe=Y(()=>t.loading?t.loadingText||n("el.select.loading"):t.filterable&&a.inputValue&&a.options.size>0&&ie.value===0?t.noMatchText||n("el.select.noMatch"):a.options.size===0?t.noDataText||n("el.select.noData"):null),ie=Y(()=>re.value.filter(xe=>xe.visible).length),re=Y(()=>{const xe=Array.from(a.options.values()),Ze=[];return a.optionValues.forEach($t=>{const Mn=xe.findIndex(bs=>bs.value===$t);Mn>-1&&Ze.push(xe[Mn])}),Ze.length>=xe.length?Ze:xe}),ke=Y(()=>Array.from(a.cachedOptions.values())),je=Y(()=>{const xe=re.value.filter(Ze=>!Ze.created).some(Ze=>Ze.currentLabel===a.inputValue);return t.filterable&&t.allowCreate&&a.inputValue!==""&&!xe}),te=()=>{t.filterable&&et(t.filterMethod)||t.filterable&&t.remote&&et(t.remoteMethod)||re.value.forEach(xe=>{var Ze;(Ze=xe.updateOption)==null||Ze.call(xe,a.inputValue)})},se=$i(),ve=Y(()=>["small"].includes(se.value)?"small":"default"),$e=Y({get(){return C.value&&(t.loading||!oe.value||t.remote&&!!i.empty)&&(!x.value||!n4(a.previousQuery)||a.options.size>0)},set(xe){C.value=xe}}),Se=Y(()=>{if(t.multiple&&!tn(t.modelValue))return Us(t.modelValue).length===0&&!a.inputValue;const xe=Ee(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||tn(xe)?!a.inputValue:!0}),Fe=Y(()=>{const xe=t.placeholder??n("el.select.placeholder");return t.multiple||!X.value?xe:a.selectedLabel}),Ye=Y(()=>wk?null:"mouseenter");Te(()=>t.modelValue,(xe,Ze)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(a.inputValue="",Re("")),Me(),!Fi(xe,Ze)&&t.validateEvent&&(P==null||P.validate("change").catch($t=>Pt($t)))},{flush:"post",deep:!0}),Te(()=>C.value,xe=>{xe?Re(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0,a.menuVisibleOnFocus=!1)}),Te(()=>a.options.entries(),()=>{Xt&&(Me(),t.defaultFirstOption&&(t.filterable||t.remote)&&ie.value&&He())},{flush:"post"}),Te([()=>a.hoveringIndex,re],([xe])=>{_t(xe)&&xe>-1?$.value=re.value[xe]||{}:$.value={},re.value.forEach(Ze=>{Ze.hover=$.value===Ze})}),sl(()=>{a.isBeforeHide||te()});const Re=xe=>{a.previousQuery===xe||R.value||(a.previousQuery=xe,t.filterable&&et(t.filterMethod)?t.filterMethod(xe):t.filterable&&t.remote&&et(t.remoteMethod)&&t.remoteMethod(xe),t.defaultFirstOption&&(t.filterable||t.remote)&&ie.value?ot(He):ot(st))},He=()=>{const xe=re.value.filter(Mn=>Mn.visible&&!Mn.disabled&&!Mn.states.groupDisabled),Ze=xe.find(Mn=>Mn.created),$t=xe[0];a.hoveringIndex=Oe(re.value.map(Mn=>Mn.value),Ze||$t)},Me=()=>{if(t.multiple)a.selectedLabel="";else{const Ze=Ne(Ee(t.modelValue)?t.modelValue[0]:t.modelValue);a.selectedLabel=Ze.currentLabel,a.selected=[Ze];return}const xe=[];tn(t.modelValue)||Us(t.modelValue).forEach(Ze=>{xe.push(Ne(Ze))}),a.selected=xe},Ne=xe=>{let Ze;const $t=ag(xe);for(let Mn=a.cachedOptions.size-1;Mn>=0;Mn--){const bs=ke.value[Mn];if($t?Vi(bs.value,t.valueKey)===Vi(xe,t.valueKey):bs.value===xe){Ze={index:re.value.filter(qs=>!qs.created).indexOf(bs),value:xe,currentLabel:bs.currentLabel,get isDisabled(){return bs.isDisabled}};break}}return Ze||{index:-1,value:xe,currentLabel:$t?xe.label:xe??""}},st=()=>{const xe=a.selected.length;if(xe>0){const Ze=a.selected[xe-1];a.hoveringIndex=re.value.findIndex($t=>Uo(Ze)===Uo($t))}else a.hoveringIndex=-1},it=()=>{a.selectionWidth=Number.parseFloat(window.getComputedStyle(c.value).width)},ye=()=>{a.collapseItemWidth=b.value.getBoundingClientRect().width},ge=()=>{var xe,Ze;(Ze=(xe=u.value)==null?void 0:xe.updatePopper)==null||Ze.call(xe)},Pe=()=>{var xe,Ze;(Ze=(xe=d.value)==null?void 0:xe.updatePopper)==null||Ze.call(xe)},Ie=()=>{a.inputValue.length>0&&!C.value&&(C.value=!0),Re(a.inputValue)},ht=xe=>{if(a.inputValue=xe.target.value,t.remote)x.value=!0,Bt();else return Ie()},Bt=TO(()=>{Ie(),x.value=!1},we),Qe=xe=>{Fi(t.modelValue,xe)||e(un,xe)},kt=xe=>zne(xe,Ze=>{const $t=a.cachedOptions.get(Ze);return!($t!=null&&$t.disabled)&&!($t!=null&&$t.states.groupDisabled)}),pt=xe=>{const Ze=ss(xe);if(t.multiple&&Ze!==Ue.delete&&xe.target.value.length<=0){const $t=Us(t.modelValue).slice(),Mn=kt($t);if(Mn<0)return;const bs=$t[Mn];$t.splice(Mn,1),e(Mt,$t),Qe($t),e("remove-tag",bs)}},_e=(xe,Ze)=>{const $t=a.selected.indexOf(Ze);if($t>-1&&!z.value){const Mn=Us(t.modelValue).slice();Mn.splice($t,1),e(Mt,Mn),Qe(Mn),e("remove-tag",Ze.value)}xe.stopPropagation(),wl()},Le=xe=>{xe.stopPropagation();const Ze=t.multiple?[]:I.value;if(t.multiple)for(const $t of a.selected)$t.isDisabled&&Ze.push($t.value);e(Mt,Ze),Qe(Ze),a.hoveringIndex=-1,C.value=!1,e("clear"),wl()},ue=xe=>{if(t.multiple){const Ze=Us(t.modelValue??[]).slice(),$t=Oe(Ze,xe);$t>-1?Ze.splice($t,1):(t.multipleLimit<=0||Ze.length<t.multipleLimit)&&Ze.push(xe.value),e(Mt,Ze),Qe(Ze),xe.created&&Re(""),t.filterable&&(xe.created||!t.reserveKeyword)&&(a.inputValue="")}else!Fi(t.modelValue,xe.value)&&e(Mt,xe.value),Qe(xe.value),C.value=!1;wl(),!C.value&&ot(()=>{gt(xe)})},Oe=(xe,Ze)=>tn(Ze)?-1:yt(Ze.value)?xe.findIndex($t=>Fi(Vi($t,t.valueKey),Uo(Ze))):xe.indexOf(Ze.value),gt=xe=>{var Mn,bs,qs,Ep,VS;const Ze=Ee(xe)?xe[xe.length-1]:xe;let $t=null;if(!ai(Ze==null?void 0:Ze.value)){const Mp=re.value.filter(Gj=>Gj.value===Ze.value);Mp.length>0&&($t=Mp[0].$el)}if(u.value&&$t){const Mp=(Ep=(qs=(bs=(Mn=u.value)==null?void 0:Mn.popperRef)==null?void 0:bs.contentRef)==null?void 0:qs.querySelector)==null?void 0:Ep.call(qs,`.${o.be("dropdown","wrap")}`);Mp&&Wse(Mp,$t)}(VS=k.value)==null||VS.handleScroll()},_n=xe=>{a.options.set(xe.value,xe),a.cachedOptions.set(xe.value,xe)},fs=(xe,Ze)=>{a.options.get(xe)===Ze&&a.options.delete(xe)},Qc=Y(()=>{var xe,Ze;return(Ze=(xe=u.value)==null?void 0:xe.popperRef)==null?void 0:Ze.contentRef}),$p=()=>{a.isBeforeHide=!1,ot(()=>{var xe;(xe=k.value)==null||xe.update(),gt(a.selected)})},wl=()=>{var xe;(xe=h.value)==null||xe.focus()},Qr=()=>{var xe;if(C.value){C.value=!1,ot(()=>{var Ze;return(Ze=h.value)==null?void 0:Ze.blur()});return}(xe=h.value)==null||xe.blur()},$n=xe=>{Le(xe)},Pi=xe=>{if(C.value=!1,q.value){const Ze=new FocusEvent("blur",xe);ot(()=>K(Ze))}},tt=()=>{a.inputValue.length>0?a.inputValue="":C.value=!1},at=xe=>{var Ze;z.value||t.filterable&&C.value&&xe&&!((Ze=p.value)!=null&&Ze.contains(xe.target))||(wk&&(a.inputHovering=!0),a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:C.value=!C.value)},mt=()=>{if(!C.value)at();else{const xe=re.value[a.hoveringIndex];xe&&!xe.isDisabled&&ue(xe)}},Uo=xe=>yt(xe.value)?Vi(xe.value,t.valueKey):xe.value,kl=Y(()=>re.value.filter(xe=>xe.visible).every(xe=>xe.isDisabled)),eu=Y(()=>t.multiple?t.collapseTags?a.selected.slice(0,t.maxCollapseTags):a.selected:[]),Hj=Y(()=>t.multiple?t.collapseTags?a.selected.slice(t.maxCollapseTags):[]:[]),cv=xe=>{if(!C.value){C.value=!0;return}if(!(a.options.size===0||ie.value===0||R.value)&&!kl.value){xe==="next"?(a.hoveringIndex++,a.hoveringIndex===a.options.size&&(a.hoveringIndex=0)):xe==="prev"&&(a.hoveringIndex--,a.hoveringIndex<0&&(a.hoveringIndex=a.options.size-1));const Ze=re.value[a.hoveringIndex];(Ze.isDisabled||!Ze.visible)&&cv(xe),ot(()=>gt($.value))}},RS=(xe,Ze,$t,Mn)=>{for(let bs=Ze;bs>=0&&bs<Mn;bs+=$t){const qs=xe[bs];if(!(qs!=null&&qs.isDisabled)&&(qs!=null&&qs.visible))return bs}return null},uv=(xe,Ze)=>{const $t=a.options.size;if($t===0)return;const Mn=tO(xe,0,$t-1),bs=re.value,qs=Ze==="up"?-1:1,Ep=RS(bs,Mn,qs,$t)??RS(bs,Mn-qs,-qs,$t);Ep!=null&&(a.hoveringIndex=Ep,ot(()=>gt($.value)))},Uj=xe=>{const Ze=ss(xe);let $t=!0;switch(Ze){case Ue.up:cv("prev");break;case Ue.down:cv("next");break;case Ue.enter:case Ue.numpadEnter:R.value||mt();break;case Ue.esc:tt();break;case Ue.backspace:$t=!1,pt(xe);return;case Ue.home:if(!C.value)return;uv(0,"down");break;case Ue.end:if(!C.value)return;uv(a.options.size-1,"up");break;case Ue.pageUp:if(!C.value)return;uv(a.hoveringIndex-10,"up");break;case Ue.pageDown:if(!C.value)return;uv(a.hoveringIndex+10,"down");break;default:$t=!1;break}$t&&(xe.preventDefault(),xe.stopPropagation())},jj=()=>{if(!c.value)return 0;const xe=window.getComputedStyle(c.value);return Number.parseFloat(xe.gap||"6px")},Wj=Y(()=>{const xe=jj(),Ze=t.filterable?xe+Vx:0;return{maxWidth:`${b.value&&t.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-xe-Ze:a.selectionWidth-Ze}px`}}),Yj=Y(()=>({maxWidth:`${a.selectionWidth}px`})),qj=xe=>{e("popup-scroll",xe)};Es(c,it),Es(N,ge),Es(y,Pe),Es(b,ye);let Ap;return Te(()=>$e.value,xe=>{xe?Ap=Es(m,ge).stop:(Ap==null||Ap(),Ap=void 0),e("visible-change",xe)}),Ft(()=>{Me()}),{inputId:T,contentId:s,nsSelect:o,nsInput:r,states:a,isFocused:q,expanded:C,optionsArray:re,hoverOption:$,selectSize:se,filteredOptionsCount:ie,updateTooltip:ge,updateTagTooltip:Pe,debouncedOnInputChange:Bt,onInput:ht,deletePrevTag:pt,deleteTag:_e,deleteSelected:Le,handleOptionSelect:ue,scrollToOption:gt,hasModelValue:X,shouldShowPlaceholder:Se,currentPlaceholder:Fe,mouseEnterEventName:Ye,needStatusIcon:U,showClearBtn:Q,iconComponent:ne,iconReverse:Z,validateState:ae,validateIcon:me,showNewOption:je,updateOptions:te,collapseTagSize:ve,setSelected:Me,selectDisabled:z,emptyText:fe,handleCompositionStart:V,handleCompositionUpdate:H,handleCompositionEnd:F,handleKeydown:Uj,onOptionCreate:_n,onOptionDestroy:fs,handleMenuEnter:$p,focus:wl,blur:Qr,handleClearClick:$n,handleClickOutside:Pi,handleEsc:tt,toggleMenu:at,selectOption:mt,getValueKey:Uo,navigateOptions:cv,dropdownMenuVisible:$e,showTagList:eu,collapseTagList:Hj,popupScroll:qj,getOption:Ne,tagStyle:Wj,collapseTagStyle:Yj,popperRef:Qc,inputRef:h,tooltipRef:u,tagTooltipRef:d,prefixRef:f,suffixRef:p,selectRef:l,wrapperRef:N,selectionRef:c,scrollbarRef:k,menuRef:m,tagMenuRef:y,collapseItemRef:b}};var Mue=ce({name:"ElOptions",setup(t,{slots:e}){const n=qe(Eb);let i=[];return()=>{var a,l;const s=(a=e.default)==null?void 0:a.call(e),o=[];function r(c){Ee(c)&&c.forEach(u=>{var h,f,p,m;const d=(h=(u==null?void 0:u.type)||{})==null?void 0:h.name;d==="ElOptionGroup"?r(!Ke(u.children)&&!Ee(u.children)&&et((f=u.children)==null?void 0:f.default)?(p=u.children)==null?void 0:p.default():u.children):d==="ElOption"?o.push((m=u.props)==null?void 0:m.value):Ee(u.children)&&r(u.children)})}return s.length&&r((l=s[0])==null?void 0:l.children),Fi(o,i)||(i=o,n&&(n.states.optionValues=o)),s}}});const U$="ElSelect",Vg=new WeakMap,Tue=t=>(...e)=>{var s,o;const n=e[0];if(!n||n.includes('Slot "default" invoked outside of the render function')&&((s=e[2])!=null&&s.includes("ElTreeSelect")))return;const i=(o=Vg.get(t))==null?void 0:o.originalWarnHandler;if(i){i(...e);return}console.warn(...e)},Pue=t=>{let e=Vg.get(t);return e||(e={originalWarnHandler:t.config.warnHandler,handler:Tue(t),count:0},Vg.set(t,e)),e};var Iue=ce({name:U$,componentName:U$,components:{ElSelectMenu:Aue,ElOption:R4,ElOptions:Mue,ElOptionGroup:V4,ElTag:Ci,ElScrollbar:Ai,ElTooltip:Cs,ElIcon:be},directives:{ClickOutside:Dg},props:vue,emits:[Mt,un,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(t,{emit:e,slots:n}){const i=bt(),s=Pue(i.appContext);s.count+=1,i.appContext.config.warnHandler=s.handler;const o=Y(()=>{const{modelValue:k,multiple:C}=t,$=C?[]:void 0;return Ee(k)?C?k:$:C?$:k}),r=In({...co(t),modelValue:o}),a=Eue(r,e),{calculatorRef:l,inputStyle:c}=LO(),{getLabel:u,getValue:d,getOptions:h,getDisabled:f}=gue(t),p=k=>({label:u(k),value:d(k),disabled:f(k)}),m=k=>k.reduce((C,$)=>(C.push($),$.children&&$.children.length>0&&C.push(...m($.children)),C),[]),y=k=>{lc(k||[]).forEach(C=>{var $;if(yt(C)&&(C.type.name==="ElOption"||C.type.name==="ElTree")){const x=C.type.name;if(x==="ElTree")m((($=C.props)==null?void 0:$.data)||[]).forEach(M=>{M.currentLabel=M.label??(yt(M.value)?"":M.value),a.onOptionCreate(M)});else if(x==="ElOption"){const M={...C.props};M.currentLabel=M.label??(yt(M.value)?"":M.value),a.onOptionCreate(M)}}})};Te(()=>{var k;return[t.persistent||a.expanded.value||!n.default||(k=n.default)==null?void 0:k.call(n),o.value]},()=>{var k;t.persistent||a.expanded.value||n.default&&(a.states.options.clear(),y((k=n.default)==null?void 0:k.call(n)))},{immediate:!0}),It(Eb,In({props:r,states:a.states,selectRef:a.selectRef,optionsArray:a.optionsArray,setSelected:a.setSelected,handleOptionSelect:a.handleOptionSelect,onOptionCreate:a.onOptionCreate,onOptionDestroy:a.onOptionDestroy}));const b=Y(()=>t.multiple?a.states.selected.map(k=>k.currentLabel):a.states.selectedLabel);return bn(()=>{const k=Vg.get(i.appContext);k&&(k.count-=1,k.count<=0&&(i.appContext.config.warnHandler=k.originalWarnHandler,Vg.delete(i.appContext)))}),{...a,modelValue:o,selectedLabel:b,calculatorRef:l,inputStyle:c,getLabel:u,getValue:d,getOptions:h,getDisabled:f,getOptionProps:p}}});const Lue=["id","value","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],Oue=["textContent"],Due={key:1};function Rue(t,e,n,i,s,o){const r=W("el-tag"),a=W("el-tooltip"),l=W("el-icon"),c=W("el-option"),u=W("el-option-group"),d=W("el-options"),h=W("el-scrollbar"),f=W("el-select-menu"),p=xt("click-outside");return De((v(),A("div",Zt({ref:"selectRef",class:[t.nsSelect.b(),t.nsSelect.m(t.selectSize)]},{[Fu(t.mouseEnterEventName)]:e[11]||(e[11]=m=>t.states.inputHovering=!0)},{onMouseleave:e[12]||(e[12]=m=>t.states.inputHovering=!1)}),[_(a,{ref:"tooltipRef",visible:t.dropdownMenuVisible,placement:t.placement,teleported:t.teleported,"popper-class":[t.nsSelect.e("popper"),t.popperClass],"popper-style":t.popperStyle,"popper-options":t.popperOptions,"fallback-placements":t.fallbackPlacements,effect:t.effect,pure:"",trigger:"click",transition:`${t.nsSelect.namespace.value}-zoom-in-top`,"stop-popper-mouse-event":!1,"gpu-acceleration":!1,persistent:t.persistent,"append-to":t.appendTo,"show-arrow":t.showArrow,offset:t.offset,onBeforeShow:t.handleMenuEnter,onHide:e[10]||(e[10]=m=>t.states.isBeforeHide=!1)},{default:w(()=>{var m;return[g("div",{ref:"wrapperRef",class:G([t.nsSelect.e("wrapper"),t.nsSelect.is("focused",t.isFocused),t.nsSelect.is("hovering",t.states.inputHovering),t.nsSelect.is("filterable",t.filterable),t.nsSelect.is("disabled",t.selectDisabled)]),onClick:e[7]||(e[7]=Ae((...y)=>t.toggleMenu&&t.toggleMenu(...y),["prevent"]))},[t.$slots.prefix?(v(),A("div",{key:0,ref:"prefixRef",class:G(t.nsSelect.e("prefix"))},[le(t.$slots,"prefix")],2)):O("v-if",!0),g("div",{ref:"selectionRef",class:G([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.states.selected.length)])},[t.multiple?le(t.$slots,"tag",{key:0,data:t.states.selected,deleteTag:t.deleteTag,selectDisabled:t.selectDisabled},()=>{var y,b,k,C,$,x,M,P,T,I,L,R,V;return[(v(!0),A(ee,null,Ce(t.showTagList,H=>(v(),A("div",{key:t.getValueKey(H),class:G(t.nsSelect.e("selected-item"))},[_(r,{closable:!t.selectDisabled&&!H.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:Xe(t.tagStyle),onClose:F=>t.deleteTag(F,H)},{default:w(()=>[g("span",{class:G(t.nsSelect.e("tags-text"))},[le(t.$slots,"label",{index:H.index,label:H.currentLabel,value:H.value},()=>[B(S(H.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.states.selected.length>t.maxCollapseTags?(v(),D(a,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":((y=t.tagTooltip)==null?void 0:y.fallbackPlacements)??["bottom","top","right","left"],effect:((b=t.tagTooltip)==null?void 0:b.effect)??t.effect,placement:((k=t.tagTooltip)==null?void 0:k.placement)??"bottom","popper-class":((C=t.tagTooltip)==null?void 0:C.popperClass)??t.popperClass,"popper-style":(($=t.tagTooltip)==null?void 0:$.popperStyle)??t.popperStyle,teleported:((x=t.tagTooltip)==null?void 0:x.teleported)??t.teleported,"append-to":((M=t.tagTooltip)==null?void 0:M.appendTo)??t.appendTo,"popper-options":((P=t.tagTooltip)==null?void 0:P.popperOptions)??t.popperOptions,transition:(T=t.tagTooltip)==null?void 0:T.transition,"show-after":(I=t.tagTooltip)==null?void 0:I.showAfter,"hide-after":(L=t.tagTooltip)==null?void 0:L.hideAfter,"auto-close":(R=t.tagTooltip)==null?void 0:R.autoClose,offset:(V=t.tagTooltip)==null?void 0:V.offset},{default:w(()=>[g("div",{ref:"collapseItemRef",class:G(t.nsSelect.e("selected-item"))},[_(r,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:Xe(t.collapseTagStyle)},{default:w(()=>[g("span",{class:G(t.nsSelect.e("tags-text"))}," + "+S(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:w(()=>[g("div",{ref:"tagMenuRef",class:G(t.nsSelect.e("selection"))},[(v(!0),A(ee,null,Ce(t.collapseTagList,H=>(v(),A("div",{key:t.getValueKey(H),class:G(t.nsSelect.e("selected-item"))},[_(r,{class:"in-tooltip",closable:!t.selectDisabled&&!H.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:F=>t.deleteTag(F,H)},{default:w(()=>[g("span",{class:G(t.nsSelect.e("tags-text"))},[le(t.$slots,"label",{index:H.index,label:H.currentLabel,value:H.value},()=>[B(S(H.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","fallback-placements","effect","placement","popper-class","popper-style","teleported","append-to","popper-options","transition","show-after","hide-after","auto-close","offset"])):O("v-if",!0)]}):O("v-if",!0),g("div",{class:G([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable||t.selectDisabled||!t.states.inputValue&&!t.isFocused)])},[g("input",{id:t.inputId,ref:"inputRef",value:t.states.inputValue,type:"text",name:t.name,class:G([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:Xe(t.inputStyle),tabindex:t.tabindex,role:"combobox",readonly:!t.filterable,spellcheck:"false","aria-activedescendant":((m=t.hoverOption)==null?void 0:m.id)||"","aria-controls":t.contentId,"aria-expanded":t.dropdownMenuVisible,"aria-label":t.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:e[0]||(e[0]=(...y)=>t.handleKeydown&&t.handleKeydown(...y)),onCompositionstart:e[1]||(e[1]=(...y)=>t.handleCompositionStart&&t.handleCompositionStart(...y)),onCompositionupdate:e[2]||(e[2]=(...y)=>t.handleCompositionUpdate&&t.handleCompositionUpdate(...y)),onCompositionend:e[3]||(e[3]=(...y)=>t.handleCompositionEnd&&t.handleCompositionEnd(...y)),onInput:e[4]||(e[4]=(...y)=>t.onInput&&t.onInput(...y)),onChange:e[5]||(e[5]=Ae(()=>{},["stop"])),onClick:e[6]||(e[6]=Ae((...y)=>t.toggleMenu&&t.toggleMenu(...y),["stop"]))},null,46,Lue),t.filterable?(v(),A("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:G(t.nsSelect.e("input-calculator")),textContent:S(t.states.inputValue)},null,10,Oue)):O("v-if",!0)],2),t.shouldShowPlaceholder?(v(),A("div",{key:1,class:G([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?le(t.$slots,"label",{key:0,index:t.getOption(t.modelValue).index,label:t.currentPlaceholder,value:t.modelValue},()=>[g("span",null,S(t.currentPlaceholder),1)]):(v(),A("span",Due,S(t.currentPlaceholder),1))],2)):O("v-if",!0)],2),g("div",{ref:"suffixRef",class:G(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClearBtn?(v(),D(l,{key:0,class:G([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:w(()=>[(v(),D(Ct(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),t.showClearBtn&&t.clearIcon?(v(),D(l,{key:1,class:G([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.nsSelect.e("clear")]),onClick:t.handleClearClick},{default:w(()=>[(v(),D(Ct(t.clearIcon)))]),_:1},8,["class","onClick"])):O("v-if",!0),t.validateState&&t.validateIcon&&t.needStatusIcon?(v(),D(l,{key:2,class:G([t.nsInput.e("icon"),t.nsInput.e("validateIcon"),t.nsInput.is("loading",t.validateState==="validating")])},{default:w(()=>[(v(),D(Ct(t.validateIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)]}),content:w(()=>[_(f,{ref:"menuRef"},{default:w(()=>[t.$slots.header?(v(),A("div",{key:0,class:G(t.nsSelect.be("dropdown","header")),onClick:e[8]||(e[8]=Ae(()=>{},["stop"]))},[le(t.$slots,"header")],2)):O("v-if",!0),De(_(h,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:G([t.nsSelect.is("empty",t.filteredOptionsCount===0)]),role:"listbox","aria-label":t.ariaLabel,"aria-orientation":"vertical",onScroll:t.popupScroll},{default:w(()=>[t.showNewOption?(v(),D(c,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):O("v-if",!0),_(d,null,{default:w(()=>[le(t.$slots,"default",{},()=>[(v(!0),A(ee,null,Ce(t.options,(m,y)=>{var b;return v(),A(ee,{key:y},[(b=t.getOptions(m))!=null&&b.length?(v(),D(u,{key:0,label:t.getLabel(m),disabled:t.getDisabled(m)},{default:w(()=>[(v(!0),A(ee,null,Ce(t.getOptions(m),k=>(v(),D(c,Zt({key:t.getValue(k)},{ref_for:!0},t.getOptionProps(k)),null,16))),128))]),_:2},1032,["label","disabled"])):(v(),D(c,Zt({key:1,ref_for:!0},t.getOptionProps(m)),null,16))],64)}),128))])]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[Ut,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(v(),A("div",{key:1,class:G(t.nsSelect.be("dropdown","loading"))},[le(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(v(),A("div",{key:2,class:G(t.nsSelect.be("dropdown","empty"))},[le(t.$slots,"empty",{},()=>[g("span",null,S(t.emptyText),1)])],2)):O("v-if",!0),t.$slots.footer?(v(),A("div",{key:3,class:G(t.nsSelect.be("dropdown","footer")),onClick:e[9]||(e[9]=Ae(()=>{},["stop"]))},[le(t.$slots,"footer")],2)):O("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-style","popper-options","fallback-placements","effect","transition","persistent","append-to","show-arrow","offset","onBeforeShow"])],16)),[[p,t.handleClickOutside,t.popperRef]])}var Vue=hi(Iue,[["render",Rue]]);const Jt=jt(Vue,{Option:R4,OptionGroup:V4}),on=Is(R4),Mb=Is(V4);var vR={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(ws,function(){return function(n,i,s){var o=i.prototype,r=function(d){return d&&(d.indexOf?d:d.s)},a=function(d,h,f,p,m){var y=d.name?d:d.$locale(),b=r(y[h]),k=r(y[f]),C=b||k.map(function(x){return x.slice(0,p)});if(!m)return C;var $=y.weekStart;return C.map(function(x,M){return C[(M+($||0))%7]})},l=function(){return s.Ls[s.locale()]},c=function(d,h){return d.formats[h]||function(f){return f.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(p,m,y){return m||y.slice(1)})}(d.formats[h.toUpperCase()])},u=function(){var d=this;return{months:function(h){return h?h.format("MMMM"):a(d,"months")},monthsShort:function(h){return h?h.format("MMM"):a(d,"monthsShort","months",3)},firstDayOfWeek:function(){return d.$locale().weekStart||0},weekdays:function(h){return h?h.format("dddd"):a(d,"weekdays")},weekdaysMin:function(h){return h?h.format("dd"):a(d,"weekdaysMin","weekdays",2)},weekdaysShort:function(h){return h?h.format("ddd"):a(d,"weekdaysShort","weekdays",3)},longDateFormat:function(h){return c(d.$locale(),h)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return u.bind(this)()},s.localeData=function(){var d=l();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return s.weekdays()},weekdaysShort:function(){return s.weekdaysShort()},weekdaysMin:function(){return s.weekdaysMin()},months:function(){return s.months()},monthsShort:function(){return s.monthsShort()},longDateFormat:function(h){return c(d,h)},meridiem:d.meridiem,ordinal:d.ordinal}},s.months=function(){return a(l(),"months")},s.monthsShort=function(){return a(l(),"monthsShort","months",3)},s.weekdays=function(d){return a(l(),"weekdays",null,null,d)},s.weekdaysShort=function(d){return a(l(),"weekdaysShort","weekdays",3,d)},s.weekdaysMin=function(d){return a(l(),"weekdaysMin","weekdays",2,d)}}})})(vR);var Fue=vR.exports;const Nue=Ei(Fue),_R={modelValue:{type:[Number,String,Boolean],default:void 0},label:{type:[String,Boolean,Number,Object],default:void 0},value:{type:[String,Boolean,Number,Object],default:void 0},indeterminate:Boolean,disabled:{type:Boolean,default:void 0},checked:Boolean,name:{type:String,default:void 0},trueValue:{type:[String,Number],default:void 0},falseValue:{type:[String,Number],default:void 0},trueLabel:{type:[String,Number],default:void 0},falseLabel:{type:[String,Number],default:void 0},id:{type:String,default:void 0},border:Boolean,size:Wi,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},ariaLabel:String,...vr(["ariaControls"])},yR={[Mt]:t=>Ke(t)||_t(t)||Xn(t),change:t=>Ke(t)||_t(t)||Xn(t)},np=Symbol("checkboxGroupContextKey"),Bue=Ge({modelValue:{type:he(Array),default:()=>[]},disabled:{type:Boolean,default:void 0},min:Number,max:Number,size:Wi,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},options:{type:he(Array)},props:{type:he(Object),default:()=>bR},type:{type:String,values:["checkbox","button"],default:"checkbox"},...vr(["ariaLabel"])}),zue={[Mt]:t=>Ee(t),change:t=>Ee(t)},bR={label:"label",value:"value",disabled:"disabled"},Hue=({model:t,isChecked:e})=>{const n=qe(np,void 0),i=qe(Pd,void 0),s=Y(()=>{var a,l;const o=(a=n==null?void 0:n.max)==null?void 0:a.value,r=(l=n==null?void 0:n.min)==null?void 0:l.value;return!tn(o)&&t.value.length>=o&&!e.value||!tn(r)&&t.value.length<=r&&e.value});return{isDisabled:ys(Y(()=>{var o;return n===void 0?(i==null?void 0:i.disabled)??s.value:((o=n.disabled)==null?void 0:o.value)||s.value})),isLimitDisabled:s}},Uue=(t,{model:e,isLimitExceeded:n,hasOwnLabel:i,isDisabled:s,isLabeledByFormItem:o})=>{const r=qe(np,void 0),{formItem:a}=ho(),{emit:l}=bt();function c(p){return[!0,t.trueValue,t.trueLabel].includes(p)?t.trueValue??t.trueLabel??!0:t.falseValue??t.falseLabel??!1}function u(p,m){l(un,c(p),m)}function d(p){if(n.value)return;const m=p.target;l(un,c(m.checked),p)}async function h(p){n.value||!i.value&&!s.value&&o.value&&(p.composedPath().some(m=>m.tagName==="LABEL")||(e.value=c([!1,t.falseValue,t.falseLabel].includes(e.value)),await ot(),u(e.value,p)))}const f=Y(()=>(r==null?void 0:r.validateEvent)||t.validateEvent);return Te(()=>t.modelValue,()=>{f.value&&(a==null||a.validate("change").catch(p=>Pt(p)))}),{handleChange:d,onClickRoot:h}},jue=t=>{const e=J(!1),{emit:n}=bt(),i=qe(np,void 0),s=Y(()=>tn(i)===!1),o=J(!1),r=Y({get(){var a;return s.value?(a=i==null?void 0:i.modelValue)==null?void 0:a.value:t.modelValue??e.value},set(a){var l,c;s.value&&Ee(a)?(o.value=((l=i==null?void 0:i.max)==null?void 0:l.value)!==void 0&&a.length>(i==null?void 0:i.max.value)&&a.length>r.value.length,o.value===!1&&((c=i==null?void 0:i.changeEvent)==null||c.call(i,a))):(n(Mt,a),e.value=a)}});return{model:r,isGroup:s,isLimitExceeded:o}},Wue=(t,e,{model:n})=>{const i=qe(np,void 0),s=J(!1),o=Y(()=>ha(t.value)?t.label:t.value),r=Y(()=>{const a=n.value;return Xn(a)?a:Ee(a)?yt(o.value)?a.map(nn).some(l=>Fi(l,o.value)):a.map(nn).includes(o.value):a!=null?a===t.trueValue||a===t.trueLabel:!!a});return{checkboxButtonSize:$i(Y(()=>{var a;return(a=i==null?void 0:i.size)==null?void 0:a.value}),{prop:!0}),isChecked:r,isFocused:s,checkboxSize:$i(Y(()=>{var a;return(a=i==null?void 0:i.size)==null?void 0:a.value})),hasOwnLabel:Y(()=>!!e.default||!ha(o.value)),actualValue:o}},wR=(t,e)=>{const{formItem:n}=ho(),{model:i,isGroup:s,isLimitExceeded:o}=jue(t),{isFocused:r,isChecked:a,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:u,actualValue:d}=Wue(t,e,{model:i}),{isDisabled:h}=Hue({model:i,isChecked:a}),{inputId:f,isLabeledByFormItem:p}=gl(t,{formItemContext:n,disableIdGeneration:u,disableIdManagement:s}),{handleChange:m,onClickRoot:y}=Uue(t,{model:i,isLimitExceeded:o,hasOwnLabel:u,isDisabled:h,isLabeledByFormItem:p});return(()=>{function k(){Ee(i.value)&&!i.value.includes(d.value)?i.value.push(d.value):i.value=t.trueValue??t.trueLabel??!0}t.checked&&k()})(),el({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},Y(()=>s.value&&ha(t.value))),el({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},Y(()=>!!t.trueLabel)),el({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},Y(()=>!!t.falseLabel)),{inputId:f,isLabeledByFormItem:p,isChecked:a,isDisabled:h,isFocused:r,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:u,model:i,actualValue:d,handleChange:m,onClickRoot:y}},Yue=["id","indeterminate","name","tabindex","disabled"];var que=ce({name:"ElCheckbox",__name:"checkbox",props:_R,emits:yR,setup(t){const e=t,{inputId:n,isLabeledByFormItem:i,isChecked:s,isDisabled:o,isFocused:r,checkboxSize:a,hasOwnLabel:l,model:c,actualValue:u,handleChange:d,onClickRoot:h}=wR(e,di()),f=Y(()=>e.trueValue||e.falseValue||e.trueLabel||e.falseLabel?{"true-value":e.trueValue??e.trueLabel??!0,"false-value":e.falseValue??e.falseLabel??!1}:{value:u.value}),p=ze("checkbox"),m=Y(()=>[p.b(),p.m(a.value),p.is("disabled",o.value),p.is("bordered",e.border),p.is("checked",s.value)]),y=Y(()=>[p.e("input"),p.is("disabled",o.value),p.is("checked",s.value),p.is("indeterminate",e.indeterminate),p.is("focus",r.value)]);return(b,k)=>(v(),D(Ct(!E(l)&&E(i)?"span":"label"),{for:!E(l)&&E(i)?null:E(n),class:G(m.value),"aria-controls":t.indeterminate?t.ariaControls:null,"aria-checked":t.indeterminate?"mixed":void 0,"aria-label":t.ariaLabel,onClick:E(h)},{default:w(()=>[g("span",{class:G(y.value)},[De(g("input",Zt({id:E(n),"onUpdate:modelValue":k[0]||(k[0]=C=>gn(c)?c.value=C:null),class:E(p).e("original"),type:"checkbox",indeterminate:t.indeterminate,name:t.name,tabindex:t.tabindex,disabled:E(o)},f.value,{onChange:k[1]||(k[1]=(...C)=>E(d)&&E(d)(...C)),onFocus:k[2]||(k[2]=C=>r.value=!0),onBlur:k[3]||(k[3]=C=>r.value=!1),onClick:k[4]||(k[4]=Ae(()=>{},["stop"]))}),null,16,Yue),[[l1,E(c)]]),g("span",{class:G(E(p).e("inner"))},null,2)],2),E(l)?(v(),A("span",{key:0,class:G(E(p).e("label"))},[le(b.$slots,"default"),b.$slots.default?O("v-if",!0):(v(),A(ee,{key:0},[B(S(t.label),1)],64))],2)):O("v-if",!0)]),_:3},8,["for","class","aria-controls","aria-checked","aria-label","onClick"]))}}),kR=que;const Gue=["name","tabindex","disabled"];var Xue=ce({name:"ElCheckboxButton",__name:"checkbox-button",props:_R,emits:yR,setup(t){const e=t,{isFocused:n,isChecked:i,isDisabled:s,checkboxButtonSize:o,model:r,actualValue:a,handleChange:l}=wR(e,di()),c=Y(()=>e.trueValue||e.falseValue||e.trueLabel||e.falseLabel?{"true-value":e.trueValue??e.trueLabel??!0,"false-value":e.falseValue??e.falseLabel??!1}:{value:a.value}),u=qe(np,void 0),d=ze("checkbox"),h=Y(()=>{var m,y;const p=((m=u==null?void 0:u.fill)==null?void 0:m.value)??"";return{backgroundColor:p,borderColor:p,color:((y=u==null?void 0:u.textColor)==null?void 0:y.value)??"",boxShadow:p?`-1px 0 0 0 ${p}`:void 0}}),f=Y(()=>[d.b("button"),d.bm("button",o.value),d.is("disabled",s.value),d.is("checked",i.value),d.is("focus",n.value)]);return(p,m)=>(v(),A("label",{class:G(f.value)},[De(g("input",Zt({"onUpdate:modelValue":m[0]||(m[0]=y=>gn(r)?r.value=y:null),class:E(d).be("button","original"),type:"checkbox",name:t.name,tabindex:t.tabindex,disabled:E(s)},c.value,{onChange:m[1]||(m[1]=(...y)=>E(l)&&E(l)(...y)),onFocus:m[2]||(m[2]=y=>n.value=!0),onBlur:m[3]||(m[3]=y=>n.value=!1),onClick:m[4]||(m[4]=Ae(()=>{},["stop"]))}),null,16,Gue),[[l1,E(r)]]),p.$slots.default||t.label?(v(),A("span",{key:0,class:G(E(d).be("button","inner")),style:Xe(E(i)?h.value:void 0)},[le(p.$slots,"default",{},()=>[B(S(t.label),1)])],6)):O("v-if",!0)],2))}}),F4=Xue,Kue=ce({name:"ElCheckboxGroup",__name:"checkbox-group",props:Bue,emits:zue,setup(t,{emit:e}){const n=t,i=e,s=ze("checkbox"),o=ys(),{formItem:r}=ho(),{inputId:a,isLabeledByFormItem:l}=gl(n,{formItemContext:r}),c=async p=>{i(Mt,p),await ot(),i(un,p)},u=Y({get(){return n.modelValue},set(p){c(p)}}),d=Y(()=>({...bR,...n.props})),h=p=>{const{label:m,value:y,disabled:b}=d.value,k={label:p[m],value:p[y],disabled:p[b]};return{...vb(p,[m,y,b]),...k}},f=Y(()=>n.type==="button"?F4:kR);return It(np,{...t4(co(n),["size","min","max","validateEvent","fill","textColor"]),disabled:o,modelValue:u,changeEvent:c}),Te(()=>n.modelValue,(p,m)=>{n.validateEvent&&!Fi(p,m)&&(r==null||r.validate("change").catch(y=>Pt(y)))}),(p,m)=>{var y;return v(),D(Ct(t.tag),{id:E(a),class:G(E(s).b("group")),role:"group","aria-label":E(l)?void 0:t.ariaLabel||"checkbox-group","aria-labelledby":E(l)?(y=E(r))==null?void 0:y.labelId:void 0},{default:w(()=>[le(p.$slots,"default",{},()=>[(v(!0),A(ee,null,Ce(t.options,(b,k)=>(v(),D(Ct(f.value),Zt({key:k},{ref_for:!0},h(b)),null,16))),128))])]),_:3},8,["id","class","aria-label","aria-labelledby"])}}}),CR=Kue;const Gt=jt(kR,{CheckboxButton:F4,CheckboxGroup:CR});Is(F4);const N4=Is(CR),xR=Ge({modelValue:{type:[String,Number,Boolean],default:void 0},size:Wi,disabled:{type:Boolean,default:void 0},label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),Zue=Ge({...xR,border:Boolean}),SR={[Mt]:t=>Ke(t)||_t(t)||Xn(t),[un]:t=>Ke(t)||_t(t)||Xn(t)},$R=Symbol("radioGroupKey"),Jue=Ge({...xR}),AR={label:"label",value:"value",disabled:"disabled"},Que=Ge({id:{type:String,default:void 0},size:Wi,disabled:{type:Boolean,default:void 0},modelValue:{type:[String,Number,Boolean],default:void 0},fill:{type:String,default:""},textColor:{type:String,default:""},name:{type:String,default:void 0},validateEvent:{type:Boolean,default:!0},options:{type:he(Array)},props:{type:he(Object),default:()=>AR},type:{type:String,values:["radio","button"],default:"radio"},...vr(["ariaLabel"])}),ede=SR,ER=(t,e)=>{const n=J(),i=qe($R,void 0),s=Y(()=>!!i),o=Y(()=>ha(t.value)?t.label:t.value),r=Y({get(){return s.value?i.modelValue:t.modelValue},set(d){s.value?i.changeEvent(d):e&&e(Mt,d),n.value.checked=t.modelValue===o.value}}),a=$i(Y(()=>i==null?void 0:i.size)),l=ys(Y(()=>i==null?void 0:i.disabled)),c=J(!1),u=Y(()=>l.value||s.value&&r.value!==o.value?-1:0);return el({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},Y(()=>s.value&&ha(t.value))),{radioRef:n,isGroup:s,radioGroup:i,focus:c,size:a,disabled:l,tabIndex:u,modelValue:r,actualValue:o}},tde=["value","name","disabled","checked"];var nde=ce({name:"ElRadio",__name:"radio",props:Zue,emits:SR,setup(t,{emit:e}){const n=t,i=e,s=ze("radio"),{radioRef:o,radioGroup:r,focus:a,size:l,disabled:c,modelValue:u,actualValue:d}=ER(n,i);function h(){ot(()=>i(un,u.value))}return(f,p)=>{var m;return v(),A("label",{class:G([E(s).b(),E(s).is("disabled",E(c)),E(s).is("focus",E(a)),E(s).is("bordered",t.border),E(s).is("checked",E(u)===E(d)),E(s).m(E(l))])},[g("span",{class:G([E(s).e("input"),E(s).is("disabled",E(c)),E(s).is("checked",E(u)===E(d))])},[De(g("input",{ref_key:"radioRef",ref:o,"onUpdate:modelValue":p[0]||(p[0]=y=>gn(u)?u.value=y:null),class:G(E(s).e("original")),value:E(d),name:t.name||((m=E(r))==null?void 0:m.name),disabled:E(c),checked:E(u)===E(d),type:"radio",onFocus:p[1]||(p[1]=y=>a.value=!0),onBlur:p[2]||(p[2]=y=>a.value=!1),onChange:h,onClick:p[3]||(p[3]=Ae(()=>{},["stop"]))},null,42,tde),[[c1,E(u)]]),g("span",{class:G(E(s).e("inner"))},null,2)],2),g("span",{class:G(E(s).e("label")),onKeydown:p[4]||(p[4]=Ae(()=>{},["stop"]))},[le(f.$slots,"default",{},()=>[B(S(t.label),1)])],34)],2)}}}),MR=nde;const sde=["value","name","disabled"];var ide=ce({name:"ElRadioButton",__name:"radio-button",props:Jue,setup(t){const e=t,n=ze("radio"),{radioRef:i,focus:s,size:o,disabled:r,modelValue:a,radioGroup:l,actualValue:c}=ER(e),u=Y(()=>({backgroundColor:(l==null?void 0:l.fill)||"",borderColor:(l==null?void 0:l.fill)||"",boxShadow:l!=null&&l.fill?`-1px 0 0 0 ${l.fill}`:"",color:(l==null?void 0:l.textColor)||""}));return(d,h)=>{var f;return v(),A("label",{class:G([E(n).b("button"),E(n).is("active",E(a)===E(c)),E(n).is("disabled",E(r)),E(n).is("focus",E(s)),E(n).bm("button",E(o))])},[De(g("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":h[0]||(h[0]=p=>gn(a)?a.value=p:null),class:G(E(n).be("button","original-radio")),value:E(c),type:"radio",name:t.name||((f=E(l))==null?void 0:f.name),disabled:E(r),onFocus:h[1]||(h[1]=p=>s.value=!0),onBlur:h[2]||(h[2]=p=>s.value=!1),onClick:h[3]||(h[3]=Ae(()=>{},["stop"]))},null,42,sde),[[c1,E(a)]]),g("span",{class:G(E(n).be("button","inner")),style:Xe(E(a)===E(c)?u.value:{}),onKeydown:h[4]||(h[4]=Ae(()=>{},["stop"]))},[le(d.$slots,"default",{},()=>[B(S(t.label),1)])],38)],2)}}}),B4=ide;const ode=["id","aria-label","aria-labelledby"];var rde=ce({name:"ElRadioGroup",__name:"radio-group",props:Que,emits:ede,setup(t,{emit:e}){const n=t,i=e,s=ze("radio"),o=pr(),r=J(),{formItem:a}=ho(),{inputId:l,isLabeledByFormItem:c}=gl(n,{formItemContext:a}),u=m=>{i(Mt,m),ot(()=>i(un,m))};Ft(()=>{const m=r.value.querySelectorAll("[type=radio]"),y=m[0];!Array.from(m).some(b=>b.checked)&&y&&(y.tabIndex=0)});const d=Y(()=>n.name||o.value),h=Y(()=>({...AR,...n.props})),f=m=>{const{label:y,value:b,disabled:k}=h.value,C={label:m[y],value:m[b],disabled:m[k]};return{...vb(m,[y,b,k]),...C}},p=Y(()=>n.type==="button"?B4:MR);return It($R,In({...co(n),changeEvent:u,name:d})),Te(()=>n.modelValue,(m,y)=>{n.validateEvent&&!Fi(m,y)&&(a==null||a.validate("change").catch(b=>Pt(b)))}),(m,y)=>(v(),A("div",{id:E(l),ref_key:"radioGroupRef",ref:r,class:G(E(s).b("group")),role:"radiogroup","aria-label":E(c)?void 0:t.ariaLabel||"radio-group","aria-labelledby":E(c)?E(a).labelId:void 0},[le(m.$slots,"default",{},()=>[(v(!0),A(ee,null,Ce(t.options,(b,k)=>(v(),D(Ct(p.value),Zt({key:k},{ref_for:!0},f(b)),null,16))),128))])],10,ode))}}),TR=rde;const Mi=jt(MR,{RadioButton:B4,RadioGroup:TR}),xs=Is(TR),sp=Is(B4),ade=Ge({tag:{type:String,default:"div"},span:{type:Number,default:24},offset:{type:Number,default:0},pull:{type:Number,default:0},push:{type:Number,default:0},xs:{type:he([Number,Object]),default:()=>ii({})},sm:{type:he([Number,Object]),default:()=>ii({})},md:{type:he([Number,Object]),default:()=>ii({})},lg:{type:he([Number,Object]),default:()=>ii({})},xl:{type:he([Number,Object]),default:()=>ii({})}}),lde=["start","center","end","space-around","space-between","space-evenly"],cde=["top","middle","bottom"],ude=Ge({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:lde,default:"start"},align:{type:String,values:cde}}),PR=Symbol("rowContextKey");var dde=ce({name:"ElRow",__name:"row",props:ude,setup(t){const e=t,n=ze("row");It(PR,{gutter:Y(()=>e.gutter)});const i=Y(()=>{const o={};return e.gutter&&(o.marginRight=o.marginLeft=`-${e.gutter/2}px`),o}),s=Y(()=>[n.b(),n.is(`justify-${e.justify}`,e.justify!=="start"),n.is(`align-${e.align}`,!!e.align)]);return(o,r)=>(v(),D(Ct(t.tag),{class:G(s.value),style:Xe(i.value)},{default:w(()=>[le(o.$slots,"default")]),_:3},8,["class","style"]))}}),hde=dde;const Id=jt(hde);var fde=ce({name:"ElCol",__name:"col",props:ade,setup(t){const e=t,{gutter:n}=qe(PR,{gutter:Y(()=>0)}),i=ze("col"),s=Y(()=>{const r={};return n.value&&(r.paddingLeft=r.paddingRight=`${n.value/2}px`),r}),o=Y(()=>{const r=[];return["span","offset","pull","push"].forEach(a=>{const l=e[a];_t(l)&&(a==="span"?r.push(i.b(`${e[a]}`)):l>0&&r.push(i.b(`${a}-${e[a]}`)))}),["xs","sm","md","lg","xl"].forEach(a=>{_t(e[a])?r.push(i.b(`${a}-${e[a]}`)):yt(e[a])&&Object.entries(e[a]).forEach(([l,c])=>{r.push(l!=="span"?i.b(`${a}-${l}-${c}`):i.b(`${a}-${c}`))})}),n.value&&r.push(i.is("guttered")),[i.b(),r]});return(r,a)=>(v(),D(Ct(t.tag),{class:G(o.value),style:Xe(s.value)},{default:w(()=>[le(r.$slots,"default")]),_:3},8,["class","style"]))}}),pde=fde;const Ld=jt(pde),j$=t=>_t(t)||Ke(t)||Ee(t),mde=Ge({accordion:Boolean,modelValue:{type:he([Array,String,Number]),default:()=>ii([])},expandIconPosition:{type:he([String]),default:"right"},beforeCollapse:{type:he(Function)}}),gde={[Mt]:j$,[un]:j$},IR=Symbol("collapseContextKey"),vde=Ge({title:{type:String,default:""},name:{type:he([String,Number]),default:void 0},icon:{type:as,default:ma},disabled:Boolean});var _de=ce({name:"ElCollapseTransition",__name:"collapse-transition",setup(t){const e=ze("collapse-transition"),n=s=>{s.style.maxHeight="",s.style.overflow=s.dataset.oldOverflow,s.style.paddingTop=s.dataset.oldPaddingTop,s.style.paddingBottom=s.dataset.oldPaddingBottom},i={beforeEnter(s){s.dataset||(s.dataset={}),s.dataset.oldPaddingTop=s.style.paddingTop,s.dataset.oldPaddingBottom=s.style.paddingBottom,s.style.height&&(s.dataset.elExistsHeight=s.style.height),s.style.maxHeight=0,s.style.paddingTop=0,s.style.paddingBottom=0},enter(s){requestAnimationFrame(()=>{s.dataset.oldOverflow=s.style.overflow,s.dataset.elExistsHeight?s.style.maxHeight=s.dataset.elExistsHeight:s.scrollHeight!==0?s.style.maxHeight=`${s.scrollHeight}px`:s.style.maxHeight=0,s.style.paddingTop=s.dataset.oldPaddingTop,s.style.paddingBottom=s.dataset.oldPaddingBottom,s.style.overflow="hidden"})},afterEnter(s){s.style.maxHeight="",s.style.overflow=s.dataset.oldOverflow},enterCancelled(s){n(s)},beforeLeave(s){s.dataset||(s.dataset={}),s.dataset.oldPaddingTop=s.style.paddingTop,s.dataset.oldPaddingBottom=s.style.paddingBottom,s.dataset.oldOverflow=s.style.overflow,s.style.maxHeight=`${s.scrollHeight}px`,s.style.overflow="hidden"},leave(s){s.scrollHeight!==0&&(s.style.maxHeight=0,s.style.paddingTop=0,s.style.paddingBottom=0)},afterLeave(s){n(s)},leaveCancelled(s){n(s)}};return(s,o)=>(v(),D(ji,Zt({name:E(e).b()},GP(i)),{default:w(()=>[le(s.$slots,"default")]),_:3},16,["name"]))}}),yde=_de;const bde=jt(yde),W$="ElCollapse",wde=(t,e)=>{const n=J(Us(t.modelValue)),i=r=>{n.value=r;const a=t.accordion?n.value[0]:n.value;e(Mt,a),e(un,a)},s=r=>{if(t.accordion)i([n.value[0]===r?"":r]);else{const a=[...n.value],l=a.indexOf(r);l>-1?a.splice(l,1):a.push(r),i(a)}},o=async r=>{const{beforeCollapse:a}=t;if(!a){s(r);return}const l=a(r);[nd(l),Xn(l)].includes(!0)||uo(W$,"beforeCollapse must return type `Promise<boolean>` or `boolean`"),nd(l)?l.then(c=>{c!==!1&&s(r)}).catch(c=>{Pt(W$,`some error occurred: ${c}`)}):l&&s(r)};return Te(()=>t.modelValue,()=>n.value=Us(t.modelValue),{deep:!0}),It(IR,{activeNames:n,handleItemClick:o}),{activeNames:n,setActiveNames:i}},kde=t=>{const e=ze("collapse");return{rootKls:Y(()=>[e.b(),e.b(`icon-position-${t.expandIconPosition}`)])}};var Cde=ce({name:"ElCollapse",__name:"collapse",props:mde,emits:gde,setup(t,{expose:e,emit:n}){const i=t,{activeNames:s,setActiveNames:o}=wde(i,n),{rootKls:r}=kde(i);return e({activeNames:s,setActiveNames:o}),(a,l)=>(v(),A("div",{class:G(E(r))},[le(a.$slots,"default")],2))}}),xde=Cde;const Sde=t=>{const e=qe(IR),{namespace:n}=ze("collapse"),i=J(!1),s=J(!1),o=v4(),r=Y(()=>o.current++),a=Y(()=>t.name??`${n.value}-id-${o.prefix}-${E(r)}`),l=Y(()=>e==null?void 0:e.activeNames.value.includes(E(a)));return{focusing:i,id:r,isActive:l,handleFocus:()=>{setTimeout(()=>{s.value?s.value=!1:i.value=!0},50)},handleHeaderClick:h=>{var f;t.disabled||(f=h.target)!=null&&f.closest("input, textarea, select")||(e==null||e.handleItemClick(E(a)),i.value=!1,s.value=!0)},handleEnterClick:h=>{var f;(f=h.target)!=null&&f.closest("input, textarea, select")||(h.preventDefault(),e==null||e.handleItemClick(E(a)))}}},$de=(t,{focusing:e,isActive:n,id:i})=>{const s=ze("collapse"),o=Y(()=>[s.b("item"),s.is("active",E(n)),s.is("disabled",t.disabled)]),r=Y(()=>[s.be("item","header"),s.is("active",E(n)),{focusing:E(e)&&!t.disabled}]),a=Y(()=>[s.be("item","arrow"),s.is("active",E(n))]);return{itemTitleKls:Y(()=>[s.be("item","title")]),arrowKls:a,headKls:r,rootKls:o,itemWrapperKls:Y(()=>s.be("item","wrap")),itemContentKls:Y(()=>s.be("item","content")),scopedContentId:Y(()=>s.b(`content-${E(i)}`)),scopedHeadId:Y(()=>s.b(`head-${E(i)}`))}},Ade=["id","aria-expanded","aria-controls","aria-describedby","tabindex","aria-disabled"],Ede=["id","aria-hidden","aria-labelledby"];var Mde=ce({name:"ElCollapseItem",__name:"collapse-item",props:vde,setup(t,{expose:e}){const n=t,{focusing:i,id:s,isActive:o,handleFocus:r,handleHeaderClick:a,handleEnterClick:l}=Sde(n),{arrowKls:c,headKls:u,rootKls:d,itemTitleKls:h,itemWrapperKls:f,itemContentKls:p,scopedContentId:m,scopedHeadId:y}=$de(n,{focusing:i,isActive:o,id:s});return e({isActive:o}),(b,k)=>(v(),A("div",{class:G(E(d))},[g("div",{id:E(y),class:G(E(u)),"aria-expanded":E(o),"aria-controls":E(m),"aria-describedby":E(m),tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,role:"button",onClick:k[0]||(k[0]=(...C)=>E(a)&&E(a)(...C)),onKeydown:k[1]||(k[1]=ut(Ae((...C)=>E(l)&&E(l)(...C),["stop"]),["space","enter"])),onFocus:k[2]||(k[2]=(...C)=>E(r)&&E(r)(...C)),onBlur:k[3]||(k[3]=C=>i.value=!1)},[g("span",{class:G(E(h))},[le(b.$slots,"title",{isActive:E(o)},()=>[B(S(t.title),1)])],2),le(b.$slots,"icon",{isActive:E(o)},()=>[_(E(be),{class:G(E(c))},{default:w(()=>[(v(),D(Ct(t.icon)))]),_:1},8,["class"])])],42,Ade),_(E(bde),null,{default:w(()=>[De(g("div",{id:E(m),role:"region",class:G(E(f)),"aria-hidden":!E(o),"aria-labelledby":E(y)},[g("div",{class:G(E(p))},[le(b.$slots,"default")],2)],10,Ede),[[Ut,E(o)]])]),_:3})],2))}}),LR=Mde;const Tde=jt(xde,{CollapseItem:LR}),Pde=Is(LR),OR=Ge({modelValue:{type:he(String),default:void 0},border:{type:Boolean,default:!0},showAlpha:Boolean,colorFormat:{type:he(String)},disabled:Boolean,predefine:{type:he(Array)},validateEvent:{type:Boolean,default:!0},hueSliderClass:{type:he([String,Array,Object])},hueSliderStyle:{type:he([String,Array,Object])}}),Ide={[Mt]:t=>Ke(t)||ai(t)},DR=Symbol("colorCommonPickerKey"),RR=Symbol("colorPickerPanelContextKey"),VR=Ge({color:{type:he(Object),required:!0},vertical:Boolean,disabled:Boolean}),Lde=VR,FR=t=>{let e,n;return t.type==="touchend"?(n=t.changedTouches[0].clientY,e=t.changedTouches[0].clientX):t.type.startsWith("touch")?(n=t.touches[0].clientY,e=t.touches[0].clientX):(n=t.clientY,e=t.clientX),{clientX:e,clientY:n}};let cw=!1;function Zk(t,e){if(!Xt)return;const n=function(o){var r;(r=e.drag)==null||r.call(e,o)},i=function(o){var r;document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",i),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",i),document.onselectstart=null,document.ondragstart=null,cw=!1,(r=e.end)==null||r.call(e,o)},s=function(o){var r;cw||(document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",i),document.addEventListener("touchmove",n),document.addEventListener("touchend",i),cw=!0,(r=e.start)==null||r.call(e,o))};t.addEventListener("mousedown",s),t.addEventListener("touchstart",s,{passive:!1})}const NR=(t,{key:e,minValue:n,maxValue:i})=>{const s=bt(),o=Hn(),r=Hn(),a=Y(()=>t.color.get(e));function l(h){var f;t.disabled||(h.target!==o.value&&c(h),(f=o.value)==null||f.focus())}function c(h){if(!r.value||!o.value||t.disabled)return;const f=s.vnode.el.getBoundingClientRect(),{clientX:p,clientY:m}=FR(h);let y;if(t.vertical){let b=m-f.top;b=Math.max(o.value.offsetHeight/2,b),b=Math.min(b,f.height-o.value.offsetHeight/2),y=Math.round((b-o.value.offsetHeight/2)/(f.height-o.value.offsetHeight)*i)}else{let b=p-f.left;b=Math.max(o.value.offsetWidth/2,b),b=Math.min(b,f.width-o.value.offsetWidth/2),y=Math.round((b-o.value.offsetWidth/2)/(f.width-o.value.offsetWidth)*i)}t.color.set(e,y)}function u(h){if(t.disabled)return;const{shiftKey:f}=h,p=ss(h),m=f?10:1,y=e==="hue"?-1:1;let b=!0;switch(p){case Ue.left:case Ue.down:d(-m*y);break;case Ue.right:case Ue.up:d(m*y);break;case Ue.home:t.color.set(e,e==="hue"?i:n);break;case Ue.end:t.color.set(e,e==="hue"?n:i);break;case Ue.pageDown:d(-4*y);break;case Ue.pageUp:d(4*y);break;default:b=!1;break}b&&h.preventDefault()}function d(h){let f=a.value+h;f=f<n?n:f>i?i:f,t.color.set(e,f)}return{thumb:o,bar:r,currentValue:a,handleDrag:c,handleClick:l,handleKeydown:u}},BR=(t,{namespace:e,maxValue:n,bar:i,thumb:s,currentValue:o,handleDrag:r,getBackground:a})=>{const l=bt(),c=ze(e),u=J(0),d=J(0),h=J();function f(){if(!s.value||t.vertical)return 0;const C=l.vnode.el,$=o.value;return C?Math.round($*(C.offsetWidth-s.value.offsetWidth/2)/n):0}function p(){if(!s.value)return 0;const C=l.vnode.el;if(!t.vertical)return 0;const $=o.value;return C?Math.round($*(C.offsetHeight-s.value.offsetHeight/2)/n):0}function m(){u.value=f(),d.value=p(),h.value=a==null?void 0:a()}Ft(()=>{if(!i.value||!s.value)return;const C={drag:$=>{r($)},end:$=>{r($)}};Zk(i.value,C),Zk(s.value,C),m()}),Te(o,()=>m()),Te(()=>t.color.value,()=>m());const y=Y(()=>[c.b(),c.is("vertical",t.vertical),c.is("disabled",t.disabled)]),b=Y(()=>c.e("bar")),k=Y(()=>c.e("thumb"));return{rootKls:y,barKls:b,barStyle:Y(()=>({background:h.value})),thumbKls:k,thumbStyle:Y(()=>({left:ci(u.value),top:ci(d.value)})),thumbLeft:u,thumbTop:d,update:m}},Ode=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],Y$=0,uw=100;var Dde=ce({name:"ElColorAlphaSlider",__name:"alpha-slider",props:VR,setup(t,{expose:e}){const n=t,{currentValue:i,bar:s,thumb:o,handleDrag:r,handleClick:a,handleKeydown:l}=NR(n,{key:"alpha",minValue:Y$,maxValue:uw}),{rootKls:c,barKls:u,barStyle:d,thumbKls:h,thumbStyle:f,update:p}=BR(n,{namespace:"color-alpha-slider",maxValue:uw,currentValue:i,bar:s,thumb:o,handleDrag:r,getBackground:k}),{t:m}=Qt(),y=Y(()=>m("el.colorpicker.alphaLabel")),b=Y(()=>m("el.colorpicker.alphaDescription",{alpha:i.value,color:n.color.value}));function k(){if(n.color&&n.color.value){const{r:C,g:$,b:x}=n.color.toRgb();return`linear-gradient(to right, rgba(${C}, ${$}, ${x}, 0) 0%, rgba(${C}, ${$}, ${x}, 1) 100%)`}return""}return e({update:p,bar:s,thumb:o}),(C,$)=>(v(),A("div",{class:G(E(c))},[g("div",{ref_key:"bar",ref:s,class:G(E(u)),style:Xe(E(d)),onClick:$[0]||($[0]=(...x)=>E(a)&&E(a)(...x))},null,6),g("div",{ref_key:"thumb",ref:o,class:G(E(h)),style:Xe(E(f)),"aria-label":y.value,"aria-valuenow":E(i),"aria-valuetext":b.value,"aria-orientation":t.vertical?"vertical":"horizontal","aria-valuemin":Y$,"aria-valuemax":uw,role:"slider",tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,onKeydown:$[1]||($[1]=(...x)=>E(l)&&E(l)(...x))},null,46,Ode)],2))}}),Rde=Dde;const Vde=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],q$=0,dw=360;var Fde=ce({name:"ElColorHueSlider",__name:"hue-slider",props:Lde,setup(t,{expose:e}){const n=t,{currentValue:i,bar:s,thumb:o,handleDrag:r,handleClick:a,handleKeydown:l}=NR(n,{key:"hue",minValue:q$,maxValue:dw}),{rootKls:c,barKls:u,thumbKls:d,thumbStyle:h,thumbTop:f,update:p}=BR(n,{namespace:"color-hue-slider",maxValue:dw,currentValue:i,bar:s,thumb:o,handleDrag:r}),{t:m}=Qt(),y=Y(()=>m("el.colorpicker.hueLabel")),b=Y(()=>m("el.colorpicker.hueDescription",{hue:i.value,color:n.color.value}));return e({bar:s,thumb:o,thumbTop:f,update:p}),(k,C)=>(v(),A("div",{class:G(E(c))},[g("div",{ref_key:"bar",ref:s,class:G(E(u)),onClick:C[0]||(C[0]=(...$)=>E(a)&&E(a)(...$))},null,2),g("div",{ref_key:"thumb",ref:o,class:G(E(d)),style:Xe(E(h)),"aria-label":y.value,"aria-valuenow":E(i),"aria-valuetext":b.value,"aria-orientation":t.vertical?"vertical":"horizontal","aria-valuemin":q$,"aria-valuemax":dw,role:"slider",tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,onKeydown:C[1]||(C[1]=(...$)=>E(l)&&E(l)(...$))},null,46,Vde)],2))}}),Nde=Fde;const Bde=Ge({colors:{type:he(Array),required:!0},color:{type:he(Object),required:!0},enableAlpha:{type:Boolean,required:!0},disabled:Boolean});var sy=class{constructor(t={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this._tiny=new Kn,this._isValid=!1,this.enableAlpha=!1,this.format="",this.value="";for(const e in t)Dt(t,e)&&(this[e]=t[e]);t.value?this.fromString(t.value):this.doOnChange()}set(t,e){if(arguments.length===1&&typeof t=="object"){for(const n in t)Dt(t,n)&&this.set(n,t[n]);return}this[`_${t}`]=e,this._isValid=!0,this.doOnChange()}get(t){return["hue","saturation","value","alpha"].includes(t)?Math.round(this[`_${t}`]):this[`_${t}`]}toRgb(){return this._isValid?this._tiny.toRgb():{r:255,g:255,b:255,a:0}}fromString(t){const e=new Kn(t);if(this._isValid=e.isValid,e.isValid){const{h:n,s:i,v:s,a:o}=e.toHsv();this._hue=n,this._saturation=i*100,this._value=s*100,this._alpha=o*100}else this._hue=0,this._saturation=100,this._value=100,this._alpha=100;this.doOnChange()}clear(){this._isValid=!1,this.value="",this._hue=0,this._saturation=100,this._value=100,this._alpha=100}compare(t){const e=new Kn({h:t._hue,s:t._saturation/100,v:t._value/100,a:t._alpha/100});return this._tiny.equals(e)}doOnChange(){const{_hue:t,_saturation:e,_value:n,_alpha:i,format:s,enableAlpha:o}=this;let r=s||(o?"rgb":"hex");s==="hex"&&o&&(r="hex8"),this._tiny=new Kn({h:t,s:e/100,v:n/100,a:i/100}),this.value=this._isValid?this._tiny.toString(r):""}};const zde=t=>{const{currentColor:e}=qe(RR),n=J(s(t.colors,t.color));Te(()=>e.value,o=>{const r=new sy({value:o,enableAlpha:t.enableAlpha});n.value.forEach(a=>{a.selected=r.compare(a)})}),sl(()=>{n.value=s(t.colors,t.color)});function i(o){t.color.fromString(t.colors[o])}function s(o,r){return o.map(a=>{const l=new sy({value:a,enableAlpha:t.enableAlpha});return l.selected=l.compare(r),l})}return{rgbaColors:n,handleSelect:i}},Hde=t=>{const e=ze("color-predefine"),n=Y(()=>[e.b(),e.is("disabled",t.disabled)]),i=Y(()=>e.e("colors"));function s(o){return[e.e("color-selector"),e.is("alpha",o.get("alpha")<100),{selected:o.selected}]}return{rootKls:n,colorsKls:i,colorSelectorKls:s}},Ude=["disabled","aria-label","onClick"];var jde=ce({name:"ElColorPredefine",__name:"predefine",props:Bde,setup(t){const e=t,{rgbaColors:n,handleSelect:i}=zde(e),{rootKls:s,colorsKls:o,colorSelectorKls:r}=Hde(e),{t:a}=Qt(),l=c=>a("el.colorpicker.predefineDescription",{value:c});return(c,u)=>(v(),A("div",{class:G(E(s))},[g("div",{class:G(E(o))},[(v(!0),A(ee,null,Ce(E(n),(d,h)=>(v(),A("button",{key:t.colors[h],type:"button",disabled:t.disabled,"aria-label":l(d.value),class:G(E(r)(d)),onClick:f=>E(i)(h)},[g("div",{style:Xe({backgroundColor:d.value})},null,4)],10,Ude))),128))],2)],2))}}),Wde=jde;const Yde=Ge({color:{type:he(Object),required:!0},disabled:Boolean}),qde=t=>{const e=bt(),n=J(),i=J(0),s=J(0),o=J("hsl(0, 100%, 50%)"),r=Y(()=>t.color.get("saturation")),a=Y(()=>t.color.get("value")),l=Y(()=>t.color.get("hue"));function c(p){var m;t.disabled||(p.target!==n.value&&u(p),(m=n.value)==null||m.focus({preventScroll:!0}))}function u(p){if(t.disabled)return;const m=e.vnode.el.getBoundingClientRect(),{clientX:y,clientY:b}=FR(p);let k=y-m.left,C=b-m.top;k=Math.max(0,k),k=Math.min(k,m.width),C=Math.max(0,C),C=Math.min(C,m.height),s.value=k,i.value=C,t.color.set({saturation:k/m.width*100,value:100-C/m.height*100})}function d(p){if(t.disabled)return;const{shiftKey:m}=p,y=ss(p),b=m?10:1;let k=!0;switch(y){case Ue.left:h(-b);break;case Ue.right:h(b);break;case Ue.up:f(b);break;case Ue.down:f(-b);break;default:k=!1;break}k&&p.preventDefault()}function h(p){let m=r.value+p;m=m<0?0:m>100?100:m,t.color.set("saturation",m)}function f(p){let m=a.value+p;m=m<0?0:m>100?100:m,t.color.set("value",m)}return{cursorRef:n,cursorTop:i,cursorLeft:s,background:o,saturation:r,brightness:a,hue:l,handleClick:c,handleDrag:u,handleKeydown:d}},Gde=(t,{cursorTop:e,cursorLeft:n,background:i,handleDrag:s})=>{const o=bt(),r=ze("color-svpanel");function a(){const l=t.color.get("saturation"),c=t.color.get("value"),{clientWidth:u,clientHeight:d}=o.vnode.el;n.value=l*u/100,e.value=(100-c)*d/100,i.value=`hsl(${t.color.get("hue")}, 100%, 50%)`}return Ft(()=>{Zk(o.vnode.el,{drag:l=>{s(l)},end:l=>{s(l)}}),a()}),Te([()=>t.color.get("hue"),()=>t.color.get("value"),()=>t.color.value],()=>a()),{rootKls:Y(()=>r.b()),cursorKls:Y(()=>r.e("cursor")),rootStyle:Y(()=>({backgroundColor:i.value})),cursorStyle:Y(()=>({top:ci(e.value),left:ci(n.value)})),update:a}},Xde=["tabindex","aria-disabled","aria-label","aria-valuenow","aria-valuetext"];var Kde=ce({name:"ElSvPanel",__name:"sv-panel",props:Yde,setup(t,{expose:e}){const n=t,{cursorRef:i,cursorTop:s,cursorLeft:o,background:r,saturation:a,brightness:l,handleClick:c,handleDrag:u,handleKeydown:d}=qde(n),{rootKls:h,cursorKls:f,rootStyle:p,cursorStyle:m,update:y}=Gde(n,{cursorTop:s,cursorLeft:o,background:r,handleDrag:u}),{t:b}=Qt(),k=Y(()=>b("el.colorpicker.svLabel")),C=Y(()=>b("el.colorpicker.svDescription",{saturation:a.value,brightness:l.value,color:n.color.value}));return e({update:y}),($,x)=>(v(),A("div",{class:G(E(h)),style:Xe(E(p)),onClick:x[1]||(x[1]=(...M)=>E(c)&&E(c)(...M))},[g("div",{ref_key:"cursorRef",ref:i,class:G(E(f)),style:Xe(E(m)),tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,role:"slider","aria-valuemin":"0,0","aria-valuemax":"100,100","aria-label":k.value,"aria-valuenow":`${E(a)},${E(l)}`,"aria-valuetext":C.value,onKeydown:x[0]||(x[0]=(...M)=>E(d)&&E(d)(...M))},null,46,Xde)],6))}}),Zde=Kde;const zR=(t,e)=>{const n=In(new sy({enableAlpha:t.showAlpha,format:t.colorFormat||"",value:t.modelValue}));return Te(()=>[t.colorFormat,t.showAlpha],()=>{n.enableAlpha=t.showAlpha,n.format=t.colorFormat||n.format,n.doOnChange(),e(Mt,n.value)}),{color:n}};var Jde=ce({name:"ElColorPickerPanel",__name:"color-picker-panel",props:OR,emits:Ide,setup(t,{expose:e,emit:n}){const i=t,s=n,o=ze("color-picker-panel"),{formItem:r}=ho(),a=ys(),l=J(),c=J(),u=J(),d=J(),h=J(""),{color:f}=qe(DR,()=>zR(i,s),!0);function p(){f.fromString(h.value),f.value!==h.value&&(h.value=f.value)}function m(){var b;i.validateEvent&&((b=r==null?void 0:r.validate)==null||b.call(r,"blur").catch(k=>Pt(k)))}function y(){var b,k,C;(b=l.value)==null||b.update(),(k=c.value)==null||k.update(),(C=u.value)==null||C.update()}return Ft(()=>{i.modelValue&&(h.value=f.value),ot(y)}),Te(()=>i.modelValue,b=>{b!==f.value&&(b?f.fromString(b):f.clear())}),Te(()=>f.value,b=>{s(Mt,b),h.value=b,i.validateEvent&&(r==null||r.validate("change").catch(k=>Pt(k)))}),It(RR,{currentColor:Y(()=>f.value)}),e({color:f,inputRef:d,update:y}),(b,k)=>(v(),A("div",{class:G([E(o).b(),E(o).is("disabled",E(a)),E(o).is("border",t.border)]),onFocusout:m},[g("div",{class:G(E(o).e("wrapper"))},[_(Nde,{ref_key:"hueRef",ref:l,color:E(f),vertical:"",disabled:E(a),class:G(["hue-slider",t.hueSliderClass]),style:Xe(t.hueSliderStyle)},null,8,["color","disabled","class","style"]),_(Zde,{ref_key:"svRef",ref:c,color:E(f),disabled:E(a)},null,8,["color","disabled"])],2),t.showAlpha?(v(),D(Rde,{key:0,ref_key:"alphaRef",ref:u,color:E(f),disabled:E(a)},null,8,["color","disabled"])):O("v-if",!0),t.predefine?(v(),D(Wde,{key:1,ref:"predefine","enable-alpha":t.showAlpha,color:E(f),colors:t.predefine,disabled:E(a)},null,8,["enable-alpha","color","colors","disabled"])):O("v-if",!0),g("div",{class:G(E(o).e("footer"))},[_(E(ft),{ref_key:"inputRef",ref:d,modelValue:h.value,"onUpdate:modelValue":k[0]||(k[0]=C=>h.value=C),"validate-event":!1,size:"small",disabled:E(a),onChange:p},null,8,["modelValue","disabled"]),le(b.$slots,"footer")],2)],34))}}),Qde=Jde;const ehe=jt(Qde),the=Ge({persistent:{type:Boolean,default:!0},modelValue:{type:he(String),default:void 0},id:String,showAlpha:Boolean,colorFormat:{type:he(String)},disabled:{type:Boolean,default:void 0},clearable:{type:Boolean,default:!0},size:Wi,popperClass:Bn.popperClass,popperStyle:Bn.popperStyle,tabindex:{type:[String,Number],default:0},teleported:Bn.teleported,appendTo:Bn.appendTo,predefine:{type:he(Array)},validateEvent:{type:Boolean,default:!0},...b1,...vr(["ariaLabel"])}),nhe={[Mt]:t=>Ke(t)||ai(t),[un]:t=>Ke(t)||ai(t),activeChange:t=>Ke(t)||ai(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0},she=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"];var ihe=ce({name:"ElColorPicker",__name:"color-picker",props:the,emits:nhe,setup(t,{expose:e,emit:n}){const i=t,s=n,{t:o}=Qt(),r=ze("color"),{formItem:a}=ho(),l=$i(),c=ys(),{valueOnClear:u,isEmptyValue:d}=C4(i,null),h=zR(i,s),{inputId:f,isLabeledByFormItem:p}=gl(i,{formItemContext:a}),m=J(),y=J(),b=J(),k=J(!1),C=J(!1);let $=!0;const{isFocused:x,handleFocus:M,handleBlur:P}=ep(y,{disabled:c,beforeBlur(re){var ke;return(ke=m.value)==null?void 0:ke.isFocusInsideContent(re)},afterBlur(){var re;N(!1),U(),i.validateEvent&&((re=a==null?void 0:a.validate)==null||re.call(a,"blur").catch(ke=>Pt(ke)))}}),T=hse(()=>{var re;return((re=b.value)==null?void 0:re.color)??h.color}),I=Y(()=>t4(i,Object.keys(OR))),L=Y(()=>!i.modelValue&&!C.value?"transparent":z(T,i.showAlpha)),R=Y(()=>!i.modelValue&&!C.value?"":T.value),V=Y(()=>p.value?void 0:i.ariaLabel||o("el.colorpicker.defaultLabel")),H=Y(()=>p.value?a==null?void 0:a.labelId:void 0),F=Y(()=>[r.b("picker"),r.is("disabled",c.value),r.bm("picker",l.value),r.is("focused",x.value)]);function z(re,ke){const{r:je,g:te,b:se,a:ve}=re.toRgb();return ke?`rgba(${je}, ${te}, ${se}, ${ve})`:`rgb(${je}, ${te}, ${se})`}function N(re){k.value=re}const q=cd(N,100,{leading:!0});function K(){c.value||N(!0)}function X(){q(!1),U()}function U(){ot(()=>{i.modelValue?T.fromString(i.modelValue):(T.value="",ot(()=>{C.value=!1}))})}function Q(){c.value||(k.value&&U(),q(!k.value))}function ne(){const re=d(T.value)?u.value:T.value;s(Mt,re),s(un,re),i.validateEvent&&(a==null||a.validate("change").catch(ke=>Pt(ke))),q(!1),ot(()=>{const ke=new sy({enableAlpha:i.showAlpha,format:i.colorFormat||"",value:i.modelValue});T.compare(ke)||U()})}function Z(){q(!1),s(Mt,u.value),s(un,u.value),i.modelValue!==u.value&&i.validateEvent&&(a==null||a.validate("change").catch(re=>Pt(re))),U(),s("clear")}function ae(){var re,ke;(ke=(re=b==null?void 0:b.value)==null?void 0:re.inputRef)==null||ke.focus()}function me(){k.value&&(X(),x.value&&fe())}function we(re){re.preventDefault(),re.stopPropagation(),N(!1),U()}function oe(re){switch(ss(re)){case Ue.enter:case Ue.numpadEnter:case Ue.space:re.preventDefault(),re.stopPropagation(),K();break;case Ue.esc:we(re);break}}function fe(){y.value.focus()}function ie(){y.value.blur()}return Te(()=>R.value,re=>{$&&s("activeChange",re),$=!0}),Te(()=>T.value,()=>{!i.modelValue&&!C.value&&(C.value=!0)}),Te(()=>i.modelValue,re=>{re?re&&re!==T.value&&($=!1,T.fromString(re)):C.value=!1}),Te(()=>k.value,()=>{b.value&&ot(b.value.update)}),It(DR,h),e({color:T,show:K,hide:X,focus:fe,blur:ie}),(re,ke)=>(v(),D(E(Cs),{ref_key:"popper",ref:m,visible:k.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[E(r).be("picker","panel"),t.popperClass],"popper-style":t.popperStyle,"stop-popper-mouse-event":!1,pure:"",loop:"",role:"dialog",effect:"light",trigger:"click",teleported:t.teleported,transition:`${E(r).namespace.value}-zoom-in-top`,persistent:t.persistent,"append-to":t.appendTo,onShow:ae,onHide:ke[2]||(ke[2]=je=>N(!1))},{content:w(()=>[De((v(),D(E(ehe),Zt({ref_key:"pickerPanelRef",ref:b},I.value,{border:!1,"validate-event":!1,onKeydown:ut(we,["esc"])}),{footer:w(()=>[g("div",null,[t.clearable?(v(),D(E(We),{key:0,class:G(E(r).be("footer","link-btn")),text:"",size:"small",onClick:Z},{default:w(()=>[B(S(E(o)("el.colorpicker.clear")),1)]),_:1},8,["class"])):O("v-if",!0),_(E(We),{plain:"",size:"small",class:G(E(r).be("footer","btn")),onClick:ne},{default:w(()=>[B(S(E(o)("el.colorpicker.confirm")),1)]),_:1},8,["class"])])]),_:1},16)),[[E(Dg),me,y.value]])]),default:w(()=>[g("div",Zt({id:E(f),ref_key:"triggerRef",ref:y},re.$attrs,{class:F.value,role:"button","aria-label":V.value,"aria-labelledby":H.value,"aria-description":E(o)("el.colorpicker.description",{color:t.modelValue||""}),"aria-disabled":E(c),tabindex:E(c)?void 0:t.tabindex,onKeydown:oe,onFocus:ke[0]||(ke[0]=(...je)=>E(M)&&E(M)(...je)),onBlur:ke[1]||(ke[1]=(...je)=>E(P)&&E(P)(...je))}),[g("div",{class:G(E(r).be("picker","trigger")),onClick:Q},[g("span",{class:G([E(r).be("picker","color"),E(r).is("alpha",t.showAlpha)])},[g("span",{class:G(E(r).be("picker","color-inner")),style:Xe({backgroundColor:L.value})},[De(_(E(be),{class:G([E(r).be("picker","icon"),E(r).is("icon-arrow-down")])},{default:w(()=>[_(E(tp))]),_:1},8,["class"]),[[Ut,t.modelValue||C.value]]),De(_(E(be),{class:G([E(r).be("picker","empty"),E(r).is("icon-close")])},{default:w(()=>[_(E(Fr))]),_:1},8,["class"]),[[Ut,!t.modelValue&&!C.value]])],6)],2)],2)],16,she)]),_:1},8,["visible","popper-class","popper-style","teleported","transition","persistent","append-to"]))}}),ohe=ihe;const Hc=jt(ohe);var rhe=ce({name:"ElContainer",__name:"container",props:{direction:{type:String,required:!1}},setup(t){const e=t,n=di(),i=ze("container"),s=Y(()=>e.direction==="vertical"?!0:e.direction==="horizontal"?!1:n&&n.default?n.default().some(o=>{const r=o.type.name;return r==="ElHeader"||r==="ElFooter"}):!1);return(o,r)=>(v(),A("section",{class:G([E(i).b(),E(i).is("vertical",s.value)])},[le(o.$slots,"default")],2))}}),ahe=rhe,lhe=ce({name:"ElAside",__name:"aside",props:{width:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=ze("aside"),i=Y(()=>e.width?n.cssVarBlock({width:e.width}):{});return(s,o)=>(v(),A("aside",{class:G(E(n).b()),style:Xe(i.value)},[le(s.$slots,"default")],6))}}),HR=lhe,che=ce({name:"ElFooter",__name:"footer",props:{height:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=ze("footer"),i=Y(()=>e.height?n.cssVarBlock({height:e.height}):{});return(s,o)=>(v(),A("footer",{class:G(E(n).b()),style:Xe(i.value)},[le(s.$slots,"default")],6))}}),UR=che,uhe=ce({name:"ElHeader",__name:"header",props:{height:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=ze("header"),i=Y(()=>e.height?n.cssVarBlock({height:e.height}):{});return(s,o)=>(v(),A("header",{class:G(E(n).b()),style:Xe(i.value)},[le(s.$slots,"default")],6))}}),jR=uhe,dhe=ce({name:"ElMain",__name:"main",setup(t){const e=ze("main");return(n,i)=>(v(),A("main",{class:G(E(e).b())},[le(n.$slots,"default")],2))}}),WR=dhe;const C1=jt(ahe,{Aside:HR,Footer:UR,Header:jR,Main:WR}),x1=Is(HR);Is(UR);const S1=Is(jR),Aa=Is(WR),hhe=Ge({valueFormat:String,dateFormat:String,timeFormat:String,disabled:{type:Boolean,default:void 0},modelValue:{type:he([Date,Array,String,Number]),default:""},defaultValue:{type:he([Date,Array])},defaultTime:{type:he([Date,Array])},isRange:Boolean,...D4,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,unlinkPanels:Boolean,showNow:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:Boolean,showWeekNumber:Boolean,type:{type:he(String),default:"date"},clearable:{type:Boolean,default:!0},border:{type:Boolean,default:!0},editable:{type:Boolean,default:!0}}),z4=Symbol("rootPickerContextKey"),$1="ElIsDefaultFormat",fhe=["date","dates","year","years","month","months","week","range"],H4=Ge({cellClassName:{type:he(Function)},disabledDate:{type:he(Function)},date:{type:he(Object),required:!0},minDate:{type:he(Object)},maxDate:{type:he(Object)},parsedValue:{type:he([Object,Array])},rangeState:{type:he(Object),default:()=>({endDate:null,selecting:!1})},disabled:Boolean}),YR=Ge({type:{type:he(String),required:!0,values:QK},dateFormat:String,timeFormat:String,showNow:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean,border:Boolean,disabled:Boolean,editable:{type:Boolean,default:!0}}),U4=Ge({unlinkPanels:Boolean,visible:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:{type:Boolean,default:!0},border:Boolean,disabled:Boolean,parsedValue:{type:he(Array)}}),j4=t=>({type:String,values:fhe,default:t}),phe=Ge({...YR,parsedValue:{type:he([Object,Array])},visible:{type:Boolean,default:!0},format:{type:String,default:""}}),Fg=t=>{if(!Ee(t))return!1;const[e,n]=t;return dt.isDayjs(e)&&dt.isDayjs(n)&&dt(e).isValid()&&dt(n).isValid()&&e.isSameOrBefore(n)},Tb=(t,{lang:e,step:n=1,unit:i,unlinkPanels:s})=>{let o;if(Ee(t)){let[r,a]=t.map(l=>dt(l).locale(e));return s||(a=r.add(n,i)),[r,a]}else t?o=dt(t):o=dt();return o=o.locale(e),[o,o.add(n,i)]},mhe=(t,e,{columnIndexOffset:n,startDate:i,nextEndDate:s,now:o,unit:r,relativeDateGetter:a,setCellMetadata:l,setRowMetadata:c})=>{for(let u=0;u<t.row;u++){const d=e[u];for(let h=0;h<t.column;h++){let f=d[h+n];f||(f={row:u,column:h,type:"normal",inRange:!1,start:!1,end:!1});const p=a(u*t.column+h);f.dayjs=p,f.date=p.toDate(),f.timestamp=p.valueOf(),f.type="normal",f.inRange=!!(i&&p.isSameOrAfter(i,r)&&s&&p.isSameOrBefore(s,r))||!!(i&&p.isSameOrBefore(i,r)&&s&&p.isSameOrAfter(s,r)),i!=null&&i.isSameOrAfter(s)?(f.start=!!s&&p.isSame(s,r),f.end=i&&p.isSame(i,r)):(f.start=!!i&&p.isSame(i,r),f.end=!!s&&p.isSame(s,r)),p.isSame(o,r)&&(f.type="today"),l==null||l(f,{rowIndex:u,columnIndex:h}),d[h+n]=f}c==null||c(d)}},iy=(t,e,n,i)=>{const s=dt().locale(i).startOf("month").month(n).year(e).hour(t.hour()).minute(t.minute()).second(t.second());return QD(s.daysInMonth()).map(o=>s.add(o,"day").toDate())},Lf=(t,e,n,i,s)=>{const o=dt().year(e).month(n).startOf("month").hour(t.hour()).minute(t.minute()).second(t.second()),r=iy(t,e,n,i).find(a=>!(s!=null&&s(a)));return r?dt(r).locale(i):o.locale(i)},oy=(t,e,n)=>{const i=t.year();if(!(n!=null&&n(t.toDate())))return t.locale(e);const s=t.month();if(!iy(t,i,s,e).every(n))return Lf(t,i,s,e,n);for(let o=0;o<12;o++)if(!iy(t,i,o,e).every(n))return Lf(t,i,o,e,n);return t},Of=(t,e,n,i)=>{if(Ee(t))return t.map(s=>Of(s,e,n,i));if(Ke(t)){const s=i!=null&&i.value?dt(t):dt(t,e);if(!s.isValid())return s}return dt(t,e).locale(n)},ghe=Ge({...H4,showWeekNumber:Boolean,selectionMode:j4("date")}),vhe=["changerange","pick","select"],ry=(t="")=>["normal","today"].includes(t),_he=(t,e)=>{const{lang:n}=Qt(),i=J(),s=J(),o=J(),r=J(),a=J([[],[],[],[],[],[]]);let l=!1;const c=t.date.$locale().weekStart||7,u=t.date.locale("en").localeData().weekdaysShort().map(X=>X.toLowerCase()),d=Y(()=>c>3?7-c:-c),h=Y(()=>{const X=t.date.startOf("month");return X.subtract(X.day()||7,"day")}),f=Y(()=>u.concat(u).slice(c,c+7)),p=Y(()=>q_(E($)).some(X=>X.isCurrent)),m=Y(()=>{const X=t.date.startOf("month");return{startOfMonthDay:X.day()||7,dateCountOfMonth:X.daysInMonth(),dateCountOfLastMonth:X.subtract(1,"month").daysInMonth()}}),y=Y(()=>t.selectionMode==="dates"?to(t.parsedValue):[]),b=(X,{count:U,rowIndex:Q,columnIndex:ne})=>{const{startOfMonthDay:Z,dateCountOfMonth:ae,dateCountOfLastMonth:me}=E(m),we=E(d);if(Q>=0&&Q<=1){const oe=Z+we<0?7+Z+we:Z+we;if(ne+Q*7>=oe)return X.text=U,!0;X.text=me-(oe-ne%7)+1+Q*7,X.type="prev-month"}else return U<=ae?X.text=U:(X.text=U-ae,X.type="next-month"),!0;return!1},k=(X,{columnIndex:U,rowIndex:Q},ne)=>{const{disabledDate:Z,cellClassName:ae}=t,me=E(y),we=b(X,{count:ne,rowIndex:Q,columnIndex:U}),oe=X.dayjs.toDate();return X.selected=me.find(fe=>fe.isSame(X.dayjs,"day")),X.isSelected=!!X.selected,X.isCurrent=M(X),X.disabled=Z==null?void 0:Z(oe),X.customClass=ae==null?void 0:ae(oe),we},C=X=>{if(t.selectionMode==="week"){const[U,Q]=t.showWeekNumber?[1,7]:[0,6],ne=K(X[U+1]);X[U].inRange=ne,X[U].start=ne,X[Q].inRange=ne,X[Q].end=ne}},$=Y(()=>{const{minDate:X,maxDate:U,rangeState:Q,showWeekNumber:ne}=t,Z=E(d),ae=E(a),me="day";let we=1;if(mhe({row:6,column:7},ae,{startDate:X,columnIndexOffset:ne?1:0,nextEndDate:Q.endDate||U||Q.selecting&&X||null,now:dt().locale(E(n)).startOf(me),unit:me,relativeDateGetter:oe=>E(h).add(oe-Z,me),setCellMetadata:(...oe)=>{k(...oe,we)&&(we+=1)},setRowMetadata:C}),ne)for(let oe=0;oe<6;oe++)ae[oe][1].dayjs&&(ae[oe][0]={type:"week",text:ae[oe][1].dayjs.week()});return ae});Te(()=>t.date,async()=>{var X;(X=E(i))!=null&&X.contains(document.activeElement)&&(await ot(),await x())});const x=async()=>{var X;return(X=E(s))==null?void 0:X.focus()},M=X=>t.selectionMode==="date"&&ry(X.type)&&P(X,t.parsedValue),P=(X,U)=>U?dt(U).locale(E(n)).isSame(t.date.date(Number(X.text)),"day"):!1,T=(X,U)=>{const Q=E(m).startOfMonthDay,ne=E(d),Z=Q+ne<0?7+Q+ne:Q+ne,ae=X*7+(U-(t.showWeekNumber?1:0));return t.date.startOf("month").subtract(Z,"day").add(ae,"day")},I=X=>{var Z;if(!t.rangeState.selecting)return;let U=X.target;if(U.tagName==="SPAN"&&(U=(Z=U.parentNode)==null?void 0:Z.parentNode),U.tagName==="DIV"&&(U=U.parentNode),U.tagName!=="TD")return;const Q=U.parentNode.rowIndex-1,ne=U.cellIndex;E($)[Q][ne].disabled||(Q!==E(o)||ne!==E(r))&&(o.value=Q,r.value=ne,e("changerange",{selecting:!0,endDate:T(Q,ne)}))},L=X=>!E(p)&&(X==null?void 0:X.text)===1&&ry(X.type)||X.isCurrent,R=X=>{l||E(p)||t.selectionMode!=="date"||q(X,!0)},V=X=>{X.target.closest("td")&&(l=!0)},H=X=>{X.target.closest("td")&&(l=!1)},F=X=>{!t.rangeState.selecting||!t.minDate?(e("pick",{minDate:X,maxDate:null}),e("select",!0)):(X>=t.minDate?e("pick",{minDate:t.minDate,maxDate:X}):e("pick",{minDate:X,maxDate:t.minDate}),e("select",!1))},z=X=>{const U=X.week(),Q=`${X.year()}w${U}`;e("pick",{year:X.year(),week:U,value:Q,date:X.startOf("week")})},N=(X,U)=>{e("pick",U?to(t.parsedValue).filter(Q=>(Q==null?void 0:Q.valueOf())!==X.valueOf()):to(t.parsedValue).concat([X]))},q=(X,U=!1)=>{if(t.disabled)return;const Q=X.target.closest("td");if(!Q)return;const ne=Q.parentNode.rowIndex-1,Z=Q.cellIndex,ae=E($)[ne][Z];if(ae.disabled||ae.type==="week")return;const me=T(ne,Z);switch(t.selectionMode){case"range":F(me);break;case"date":e("pick",me,U);break;case"week":z(me);break;case"dates":N(me,!!ae.selected);break}},K=X=>{if(t.selectionMode!=="week")return!1;let U=t.date.startOf("day");if(X.type==="prev-month"&&(U=U.subtract(1,"month")),X.type==="next-month"&&(U=U.add(1,"month")),U=U.date(Number.parseInt(X.text,10)),t.parsedValue&&!Ee(t.parsedValue)){const Q=(t.parsedValue.day()-c+7)%7-1;return t.parsedValue.subtract(Q,"day").isSame(U,"day")}return!1};return{WEEKS:f,rows:$,tbodyRef:i,currentCellRef:s,focus:x,isCurrent:M,isWeekActive:K,isSelectedCell:L,handlePickDate:q,handleMouseUp:H,handleMouseDown:V,handleMouseMove:I,handleFocus:R}},yhe=(t,{isCurrent:e,isWeekActive:n})=>{const i=ze("date-table"),{t:s}=Qt(),o=Y(()=>[i.b(),i.is("week-mode",t.selectionMode==="week"&&!t.disabled)]),r=Y(()=>s("el.datepicker.dateTablePrompt")),a=c=>{const u=[];return ry(c.type)&&!c.disabled?(u.push("available"),c.type==="today"&&u.push("today")):u.push(c.type),e(c)&&u.push("current"),c.inRange&&(ry(c.type)||t.selectionMode==="week")&&(u.push("in-range"),c.start&&u.push("start-date"),c.end&&u.push("end-date")),(c.disabled||t.disabled)&&u.push("disabled"),c.selected&&u.push("selected"),c.customClass&&u.push(c.customClass),u.join(" ")},l=c=>[i.e("row"),{current:n(c)}];return{tableKls:o,tableLabel:r,weekHeaderClass:i.e("week-header"),getCellClasses:a,getRowKls:l,t:s}},bhe=Ge({cell:{type:he(Object)}});var W4=ce({name:"ElDatePickerCell",props:bhe,setup(t){const e=ze("date-table-cell"),{slots:n}=qe(z4);return()=>{const{cell:i}=t;return le(n,"default",{...i},()=>[_("div",{class:e.b()},[_("span",{class:e.e("text")},[(i==null?void 0:i.renderText)??(i==null?void 0:i.text)])])])}}});const whe=["aria-label"],khe=["aria-label"],Che=["aria-current","aria-selected","tabindex","aria-disabled"];var xhe=ce({__name:"basic-date-table",props:ghe,emits:vhe,setup(t,{expose:e,emit:n}){const i=t,{WEEKS:s,rows:o,tbodyRef:r,currentCellRef:a,focus:l,isCurrent:c,isWeekActive:u,isSelectedCell:d,handlePickDate:h,handleMouseUp:f,handleMouseDown:p,handleMouseMove:m,handleFocus:y}=_he(i,n),{tableLabel:b,tableKls:k,getCellClasses:C,getRowKls:$,weekHeaderClass:x,t:M}=yhe(i,{isCurrent:c,isWeekActive:u});let P=!1;return bn(()=>{P=!0}),e({focus:l}),(T,I)=>(v(),A("table",{"aria-label":E(b),class:G(E(k)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:I[1]||(I[1]=(...L)=>E(h)&&E(h)(...L)),onMousemove:I[2]||(I[2]=(...L)=>E(m)&&E(m)(...L)),onMousedown:I[3]||(I[3]=(...L)=>E(p)&&E(p)(...L)),onMouseup:I[4]||(I[4]=(...L)=>E(f)&&E(f)(...L))},[g("tbody",{ref_key:"tbodyRef",ref:r},[g("tr",null,[T.showWeekNumber?(v(),A("th",{key:0,scope:"col",class:G(E(x))},null,2)):O("v-if",!0),(v(!0),A(ee,null,Ce(E(s),(L,R)=>(v(),A("th",{key:R,"aria-label":E(M)("el.datepicker.weeksFull."+L),scope:"col"},S(E(M)("el.datepicker.weeks."+L)),9,khe))),128))]),(v(!0),A(ee,null,Ce(E(o),(L,R)=>(v(),A("tr",{key:R,class:G(E($)(T.showWeekNumber?L[2]:L[1]))},[(v(!0),A(ee,null,Ce(L,(V,H)=>(v(),A("td",{key:`${R}.${H}`,ref_for:!0,ref:F=>!E(P)&&E(d)(V)&&(a.value=F),class:G(E(C)(V)),"aria-current":V.isCurrent?"date":void 0,"aria-selected":V.isCurrent,tabindex:T.disabled?void 0:E(d)(V)?0:-1,"aria-disabled":T.disabled,onFocus:I[0]||(I[0]=(...F)=>E(y)&&E(y)(...F))},[_(E(W4),{cell:V},null,8,["cell"])],42,Che))),128))],2))),128))],512)],42,whe))}}),Jk=xhe;const She=Ge({...H4,selectionMode:j4("month")}),$he=["aria-label"],Ahe=["aria-selected","aria-label","tabindex","onKeydown"];var Ehe=ce({__name:"basic-month-table",props:She,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const i=t,s=n,o=ze("month-table"),{t:r,lang:a}=Qt(),l=J(),c=J(),u=J(i.date.locale("en").localeData().monthsShort().map($=>$.toLowerCase())),d=J([[],[],[]]),h=J(),f=J(),p=Y(()=>{var M,P,T;const $=d.value,x=dt().locale(a.value).startOf("month");for(let I=0;I<3;I++){const L=$[I];for(let R=0;R<4;R++){const V=L[R]||(L[R]={row:I,column:R,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1,isSelected:!1,customClass:void 0,date:void 0,dayjs:void 0,isCurrent:void 0,selected:void 0,renderText:void 0,timestamp:void 0});V.type="normal";const H=I*4+R,F=i.date.startOf("year").month(H),z=i.rangeState.endDate||i.maxDate||i.rangeState.selecting&&i.minDate||null;V.inRange=!!(i.minDate&&F.isSameOrAfter(i.minDate,"month")&&z&&F.isSameOrBefore(z,"month"))||!!(i.minDate&&F.isSameOrBefore(i.minDate,"month")&&z&&F.isSameOrAfter(z,"month")),(M=i.minDate)!=null&&M.isSameOrAfter(z)?(V.start=!!(z&&F.isSame(z,"month")),V.end=i.minDate&&F.isSame(i.minDate,"month")):(V.start=!!(i.minDate&&F.isSame(i.minDate,"month")),V.end=!!(z&&F.isSame(z,"month"))),x.isSame(F)&&(V.type="today");const N=F.toDate();V.text=H,V.disabled=((P=i.disabledDate)==null?void 0:P.call(i,N))||!1,V.date=N,V.customClass=(T=i.cellClassName)==null?void 0:T.call(i,N),V.dayjs=F,V.timestamp=F.valueOf(),V.isSelected=b(V)}}return $}),m=()=>{var $;($=c.value)==null||$.focus()},y=$=>{const x={},M=i.date.year(),P=new Date,T=$.text;return x.disabled=i.disabled||(i.disabledDate?iy(i.date,M,T,a.value).every(i.disabledDate):!1),x.current=to(i.parsedValue).some(I=>dt.isDayjs(I)&&I.year()===M&&I.month()===T),x.today=P.getFullYear()===M&&P.getMonth()===T,$.customClass&&(x[$.customClass]=!0),$.inRange&&(x["in-range"]=!0,$.start&&(x["start-date"]=!0),$.end&&(x["end-date"]=!0)),x},b=$=>{const x=i.date.year(),M=$.text;return to(i.date).some(P=>P.year()===x&&P.month()===M)},k=$=>{var T;if(!i.rangeState.selecting)return;let x=$.target;if(x.tagName==="SPAN"&&(x=(T=x.parentNode)==null?void 0:T.parentNode),x.tagName==="DIV"&&(x=x.parentNode),x.tagName!=="TD")return;const M=x.parentNode.rowIndex,P=x.cellIndex;p.value[M][P].disabled||(M!==h.value||P!==f.value)&&(h.value=M,f.value=P,s("changerange",{selecting:!0,endDate:i.date.startOf("year").month(M*4+P)}))},C=$=>{var I;if(i.disabled)return;const x=(I=$.target)==null?void 0:I.closest("td");if((x==null?void 0:x.tagName)!=="TD"||tl(x,"disabled"))return;const M=x.cellIndex,P=x.parentNode.rowIndex*4+M,T=i.date.startOf("year").month(P);if(i.selectionMode==="months"){if($.type==="keydown"){s("pick",to(i.parsedValue),!1);return}const L=Lf(i.date,i.date.year(),P,a.value,i.disabledDate);s("pick",tl(x,"current")?to(i.parsedValue).filter(R=>(R==null?void 0:R.year())!==L.year()||(R==null?void 0:R.month())!==L.month()):to(i.parsedValue).concat([dt(L)]))}else i.selectionMode==="range"?i.rangeState.selecting?(i.minDate&&T>=i.minDate?s("pick",{minDate:i.minDate,maxDate:T}):s("pick",{minDate:T,maxDate:i.minDate}),s("select",!1)):(s("pick",{minDate:T,maxDate:null}),s("select",!0)):s("pick",P)};return Te(()=>i.date,async()=>{var $,x;($=l.value)!=null&&$.contains(document.activeElement)&&(await ot(),(x=c.value)==null||x.focus())}),e({focus:m}),($,x)=>(v(),A("table",{role:"grid","aria-label":E(r)("el.datepicker.monthTablePrompt"),class:G(E(o).b()),onClick:C,onMousemove:k},[g("tbody",{ref_key:"tbodyRef",ref:l},[(v(!0),A(ee,null,Ce(p.value,(M,P)=>(v(),A("tr",{key:P},[(v(!0),A(ee,null,Ce(M,(T,I)=>(v(),A("td",{key:I,ref_for:!0,ref:L=>T.isSelected&&(c.value=L),class:G(y(T)),"aria-selected":!!T.isSelected,"aria-label":E(r)(`el.datepicker.month${+T.text+1}`),tabindex:T.isSelected?0:-1,onKeydown:[ut(Ae(C,["prevent","stop"]),["space"]),ut(Ae(C,["prevent","stop"]),["enter"])]},[_(E(W4),{cell:{...T,renderText:E(r)("el.datepicker.months."+u.value[T.text])}},null,8,["cell"])],42,Ahe))),128))]))),128))],512)],42,$he))}}),Ng=Ehe;const Mhe=Ge({...H4,selectionMode:j4("year")}),The=["aria-label"],Phe=["aria-selected","aria-label","tabindex","onKeydown"];var Ihe=ce({__name:"basic-year-table",props:Mhe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const i=(x,M)=>{const P=dt(String(x)).locale(M).startOf("year");return QD(P.endOf("year").dayOfYear()).map(T=>P.add(T,"day").toDate())},s=t,o=n,r=ze("year-table"),{t:a,lang:l}=Qt(),c=J(),u=J(),d=Y(()=>Math.floor(s.date.year()/10)*10),h=J([[],[],[]]),f=J(),p=J(),m=Y(()=>{var P,T,I;const x=h.value,M=dt().locale(l.value).startOf("year");for(let L=0;L<3;L++){const R=x[L];for(let V=0;V<4&&!(L*4+V>=10);V++){let H=R[V];H||(H={row:L,column:V,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1,isSelected:!1,customClass:void 0,date:void 0,dayjs:void 0,isCurrent:void 0,selected:void 0,renderText:void 0,timestamp:void 0}),H.type="normal";const F=L*4+V+d.value,z=dt().year(F),N=s.rangeState.endDate||s.maxDate||s.rangeState.selecting&&s.minDate||null;H.inRange=!!(s.minDate&&z.isSameOrAfter(s.minDate,"year")&&N&&z.isSameOrBefore(N,"year"))||!!(s.minDate&&z.isSameOrBefore(s.minDate,"year")&&N&&z.isSameOrAfter(N,"year")),(P=s.minDate)!=null&&P.isSameOrAfter(N)?(H.start=!!(N&&z.isSame(N,"year")),H.end=!!(s.minDate&&z.isSame(s.minDate,"year"))):(H.start=!!(s.minDate&&z.isSame(s.minDate,"year")),H.end=!!(N&&z.isSame(N,"year"))),M.isSame(z)&&(H.type="today"),H.text=F;const q=z.toDate();H.disabled=((T=s.disabledDate)==null?void 0:T.call(s,q))||!1,H.date=q,H.customClass=(I=s.cellClassName)==null?void 0:I.call(s,q),H.dayjs=z,H.timestamp=z.valueOf(),H.isSelected=k(H),R[V]=H}}return x}),y=()=>{var x;(x=u.value)==null||x.focus()},b=x=>{const M={},P=dt().locale(l.value),T=x.text;return M.disabled=s.disabled||(s.disabledDate?i(T,l.value).every(s.disabledDate):!1),M.today=P.year()===T,M.current=to(s.parsedValue).some(I=>I.year()===T),x.customClass&&(M[x.customClass]=!0),x.inRange&&(M["in-range"]=!0,x.start&&(M["start-date"]=!0),x.end&&(M["end-date"]=!0)),M},k=x=>{const M=x.text;return to(s.date).some(P=>P.year()===M)},C=x=>{var L;if(s.disabled)return;const M=(L=x.target)==null?void 0:L.closest("td");if(!M||!M.textContent||tl(M,"disabled"))return;const P=M.cellIndex,T=M.parentNode.rowIndex*4+P+d.value,I=dt().year(T);if(s.selectionMode==="range")s.rangeState.selecting?(s.minDate&&I>=s.minDate?o("pick",{minDate:s.minDate,maxDate:I}):o("pick",{minDate:I,maxDate:s.minDate}),o("select",!1)):(o("pick",{minDate:I,maxDate:null}),o("select",!0));else if(s.selectionMode==="years"){if(x.type==="keydown"){o("pick",to(s.parsedValue),!1);return}const R=oy(I.startOf("year"),l.value,s.disabledDate);o("pick",tl(M,"current")?to(s.parsedValue).filter(V=>(V==null?void 0:V.year())!==T):to(s.parsedValue).concat([R]))}else o("pick",T)},$=x=>{var I;if(!s.rangeState.selecting)return;const M=(I=x.target)==null?void 0:I.closest("td");if(!M)return;const P=M.parentNode.rowIndex,T=M.cellIndex;m.value[P][T].disabled||(P!==f.value||T!==p.value)&&(f.value=P,p.value=T,o("changerange",{selecting:!0,endDate:dt().year(d.value).add(P*4+T,"year")}))};return Te(()=>s.date,async()=>{var x,M;(x=c.value)!=null&&x.contains(document.activeElement)&&(await ot(),(M=u.value)==null||M.focus())}),e({focus:y}),(x,M)=>(v(),A("table",{role:"grid","aria-label":E(a)("el.datepicker.yearTablePrompt"),class:G(E(r).b()),onClick:C,onMousemove:$},[g("tbody",{ref_key:"tbodyRef",ref:c},[(v(!0),A(ee,null,Ce(m.value,(P,T)=>(v(),A("tr",{key:T},[(v(!0),A(ee,null,Ce(P,(I,L)=>(v(),A("td",{key:`${T}_${L}`,ref_for:!0,ref:R=>I.isSelected&&(u.value=R),class:G(["available",b(I)]),"aria-selected":I.isSelected,"aria-label":String(I.text),tabindex:I.isSelected?0:-1,onKeydown:[ut(Ae(C,["prevent","stop"]),["space"]),ut(Ae(C,["prevent","stop"]),["enter"])]},[_(E(W4),{cell:I},null,8,["cell"])],42,Phe))),128))]))),128))],512)],42,The))}}),Bg=Ihe;const Lhe=["disabled","onClick"],Ohe=["aria-label","disabled"],Dhe=["aria-label","disabled"],Rhe=["tabindex","aria-disabled"],Vhe=["tabindex","aria-disabled"],Fhe=["aria-label","disabled"],Nhe=["aria-label","disabled"];var Bhe=ce({__name:"panel-date-pick",props:phe,emits:["pick","set-picker-option","panel-change"],setup(t,{emit:e}){const n=(_e,Le,ue)=>!0,i=t,s=e,o=ze("picker-panel"),r=ze("date-picker"),a=$d(),l=di(),{t:c,lang:u}=Qt(),d=qe(wa),h=qe($1,void 0),{shortcuts:f,disabledDate:p,cellClassName:m,defaultTime:y}=d.props,b=Sn(d.props,"defaultValue"),k=J(),C=J(dt().locale(u.value)),$=J(!1);let x=!1;const M=Y(()=>dt(y).locale(u.value)),P=Y(()=>C.value.month()),T=Y(()=>C.value.year()),I=J([]),L=J(null),R=J(null),V=_e=>I.value.length>0?n(_e,I.value,i.format||"HH:mm:ss"):!0,H=_e=>y&&!Fe.value&&!$.value&&!x?M.value.year(_e.year()).month(_e.month()).date(_e.date()):ie.value?_e.millisecond(0):_e.startOf("day"),F=(_e,...Le)=>{_e?Ee(_e)?s("pick",_e.map(H),...Le):s("pick",H(_e),...Le):s("pick",_e,...Le),L.value=null,R.value=null,$.value=!1,x=!1},z=async(_e,Le)=>{if(Q.value==="date"&&dt.isDayjs(_e)){const ue=Dp(i.parsedValue);let Oe=ue?ue.year(_e.year()).month(_e.month()).date(_e.date()):_e;V(Oe)||(Oe=I.value[0][0].year(_e.year()).month(_e.month()).date(_e.date())),C.value=Oe,F(Oe,ie.value||Le)}else Q.value==="week"?F(_e.date):Q.value==="dates"&&F(_e,!0)},N=_e=>{const Le=_e?"add":"subtract";C.value=C.value[Le](1,"month"),pt("month")},q=_e=>{const Le=C.value,ue=_e?"add":"subtract";C.value=K.value==="year"?Le[ue](10,"year"):Le[ue](1,"year"),pt("year")},K=J("date"),X=Y(()=>{const _e=c("el.datepicker.year");if(K.value==="year"){const Le=Math.floor(T.value/10)*10;return _e?`${Le} ${_e} - ${Le+9} ${_e}`:`${Le} - ${Le+9}`}return`${T.value} ${_e}`}),U=_e=>{const Le=et(_e.value)?_e.value():_e.value;if(Le){x=!0,F(dt(Le).locale(u.value));return}_e.onClick&&_e.onClick({attrs:a,slots:l,emit:s})},Q=Y(()=>{const{type:_e}=i;return["week","month","months","year","years","dates"].includes(_e)?_e:"date"}),ne=Y(()=>Q.value==="dates"||Q.value==="months"||Q.value==="years"),Z=Y(()=>Q.value==="date"?K.value:Q.value),ae=Y(()=>!!f.length),me=async(_e,Le)=>{Q.value==="month"?(C.value=Lf(C.value,C.value.year(),_e,u.value,p),F(C.value,!1)):Q.value==="months"?F(_e,Le??!0):(C.value=Lf(C.value,C.value.year(),_e,u.value,p),K.value="date",["month","year","date","week"].includes(Q.value)&&(F(C.value,!0),await ot(),ht())),pt("month")},we=async(_e,Le)=>{Q.value==="year"?(C.value=oy(C.value.startOf("year").year(_e),u.value,p),F(C.value,!1)):Q.value==="years"?F(_e,Le??!0):(C.value=oy(C.value.year(_e),u.value,p),K.value="month",["month","year","date","week"].includes(Q.value)&&(F(C.value,!0),await ot(),ht())),pt("year")},oe=ys(),fe=async _e=>{oe.value||(K.value=_e,await ot(),ht())},ie=Y(()=>i.type==="datetime"||i.type==="datetimerange"),re=Y(()=>{const _e=ie.value||Q.value==="dates",Le=Q.value==="years",ue=Q.value==="months",Oe=K.value==="date",gt=K.value==="year",_n=K.value==="month";return _e&&Oe||Le&&gt||ue&&_n}),ke=Y(()=>!ne.value&&i.showNow||i.showConfirm),je=Y(()=>p?i.parsedValue?Ee(i.parsedValue)?p(i.parsedValue[0].toDate()):p(i.parsedValue.toDate()):!0:!1),te=()=>{if(ne.value)F(i.parsedValue);else{let _e=Dp(i.parsedValue);if(!_e){const Le=dt(y).locale(u.value),ue=Ie();_e=Le.year(ue.year()).month(ue.month()).date(ue.date())}C.value=_e,F(_e)}},se=Y(()=>p?p(dt().locale(u.value).toDate()):!1),ve=()=>{const _e=dt().locale(u.value).toDate();$.value=!0,(!p||!p(_e))&&V(_e)&&(C.value=dt().locale(u.value),F(C.value))},$e=Y(()=>i.timeFormat||tR(i.format)||Og),Se=Y(()=>i.dateFormat||eR(i.format)||tc),Fe=Y(()=>{if(R.value)return R.value;if(!(!i.parsedValue&&!b.value))return(Dp(i.parsedValue)||C.value).format($e.value)}),Ye=Y(()=>{if(L.value)return L.value;if(!(!i.parsedValue&&!b.value))return(Dp(i.parsedValue)||C.value).format(Se.value)}),Re=J(!1),He=()=>{Re.value=!0},Me=()=>{Re.value=!1},Ne=_e=>({hour:_e.hour(),minute:_e.minute(),second:_e.second(),year:_e.year(),month:_e.month(),date:_e.date()}),st=(_e,Le,ue)=>{const{hour:Oe,minute:gt,second:_n}=Ne(_e),fs=Dp(i.parsedValue);C.value=fs?fs.hour(Oe).minute(gt).second(_n):_e,F(C.value,!0),ue||(Re.value=Le)},it=_e=>{const Le=dt(_e,$e.value).locale(u.value);if(Le.isValid()&&V(Le)){const{year:ue,month:Oe,date:gt}=Ne(C.value);C.value=Le.year(ue).month(Oe).date(gt),R.value=null,Re.value=!1,F(C.value,!0)}},ye=_e=>{const Le=Of(_e,Se.value,u.value,h);if(Le.isValid()){if(p&&p(Le.toDate()))return;const{hour:ue,minute:Oe,second:gt}=Ne(C.value);C.value=Le.hour(ue).minute(Oe).second(gt),L.value=null,F(C.value,!0)}},ge=_e=>dt.isDayjs(_e)&&_e.isValid()&&(p?!p(_e.toDate()):!0),Pe=_e=>Of(_e,i.format,u.value,h),Ie=()=>{const _e=dt(b.value).locale(u.value);if(!b.value){const Le=M.value;return dt().hour(Le.hour()).minute(Le.minute()).second(Le.second()).locale(u.value)}return _e},ht=()=>{var _e;["week","month","year","date"].includes(Q.value)&&((_e=k.value)==null||_e.focus())},Bt=()=>{ht(),Q.value==="week"&&kt(Ue.down)},Qe=_e=>{const Le=ss(_e);[Ue.up,Ue.down,Ue.left,Ue.right,Ue.home,Ue.end,Ue.pageUp,Ue.pageDown].includes(Le)&&(kt(Le),_e.stopPropagation(),_e.preventDefault()),[Ue.enter,Ue.space,Ue.numpadEnter].includes(Le)&&L.value===null&&R.value===null&&(_e.preventDefault(),F(C.value,!1))},kt=_e=>{const{up:Le,down:ue,left:Oe,right:gt,home:_n,end:fs,pageUp:Qc,pageDown:$p}=Ue,wl={year:{[Le]:-4,[ue]:4,[Oe]:-1,[gt]:1,offset:($n,Pi)=>$n.setFullYear($n.getFullYear()+Pi)},month:{[Le]:-4,[ue]:4,[Oe]:-1,[gt]:1,offset:($n,Pi)=>$n.setMonth($n.getMonth()+Pi)},week:{[Le]:-1,[ue]:1,[Oe]:-1,[gt]:1,offset:($n,Pi)=>$n.setDate($n.getDate()+Pi*7)},date:{[Le]:-7,[ue]:7,[Oe]:-1,[gt]:1,[_n]:$n=>-$n.getDay(),[fs]:$n=>-$n.getDay()+6,[Qc]:$n=>-new Date($n.getFullYear(),$n.getMonth(),0).getDate(),[$p]:$n=>new Date($n.getFullYear(),$n.getMonth()+1,0).getDate(),offset:($n,Pi)=>$n.setDate($n.getDate()+Pi)}},Qr=C.value.toDate();for(;Math.abs(C.value.diff(Qr,"year",!0))<1;){const $n=wl[Z.value];if(!$n)return;if($n.offset(Qr,et($n[_e])?$n[_e](Qr):$n[_e]??0),p&&p(Qr))break;const Pi=dt(Qr).locale(u.value);C.value=Pi,s("pick",Pi,!0);break}},pt=_e=>{s("panel-change",C.value.toDate(),_e,K.value)};return Te(()=>Q.value,_e=>{if(["month","year"].includes(_e)){K.value=_e;return}else if(_e==="years"){K.value="year";return}else if(_e==="months"){K.value="month";return}K.value="date"},{immediate:!0}),Te(()=>b.value,_e=>{_e&&(C.value=Ie())},{immediate:!0}),Te(()=>i.parsedValue,_e=>{if(_e){if(ne.value||Ee(_e))return;C.value=_e}else C.value=Ie()},{immediate:!0}),s("set-picker-option",["isValidValue",ge]),s("set-picker-option",["parseUserInput",Pe]),s("set-picker-option",["handleFocusPicker",Bt]),(_e,Le)=>(v(),A("div",{class:G([E(o).b(),E(r).b(),E(o).is("border",_e.border),E(o).is("disabled",E(oe)),{"has-sidebar":_e.$slots.sidebar||ae.value,"has-time":ie.value}])},[g("div",{class:G(E(o).e("body-wrapper"))},[le(_e.$slots,"sidebar",{class:G(E(o).e("sidebar"))}),ae.value?(v(),A("div",{key:0,class:G(E(o).e("sidebar"))},[(v(!0),A(ee,null,Ce(E(f),(ue,Oe)=>(v(),A("button",{key:Oe,type:"button",disabled:E(oe),class:G(E(o).e("shortcut")),onClick:gt=>U(ue)},S(ue.text),11,Lhe))),128))],2)):O("v-if",!0),g("div",{class:G(E(o).e("body"))},[ie.value?(v(),A("div",{key:0,class:G(E(r).e("time-header"))},[g("span",{class:G(E(r).e("editor-wrap"))},[_(E(ft),{placeholder:E(c)("el.datepicker.selectDate"),"model-value":Ye.value,size:"small","validate-event":!1,disabled:E(oe),readonly:!_e.editable,onInput:Le[0]||(Le[0]=ue=>L.value=ue),onChange:ye},null,8,["placeholder","model-value","disabled","readonly"])],2),De((v(),A("span",{class:G(E(r).e("editor-wrap"))},[_(E(ft),{placeholder:E(c)("el.datepicker.selectTime"),"model-value":Fe.value,size:"small","validate-event":!1,disabled:E(oe),readonly:!_e.editable,onFocus:He,onInput:Le[1]||(Le[1]=ue=>R.value=ue),onChange:it},null,8,["placeholder","model-value","disabled","readonly"]),_(E(Gk),{visible:Re.value,format:$e.value,"parsed-value":C.value,onPick:st},null,8,["visible","format","parsed-value"])],2)),[[E(Dg),Me]])],2)):O("v-if",!0),De(g("div",{class:G([E(r).e("header"),(K.value==="year"||K.value==="month")&&E(r).em("header","bordered")])},[g("span",{class:G(E(r).e("prev-btn"))},[g("button",{type:"button","aria-label":E(c)("el.datepicker.prevYear"),class:G(["d-arrow-left",E(o).e("icon-btn")]),disabled:E(oe),onClick:Le[2]||(Le[2]=ue=>q(!1))},[le(_e.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Ec))]),_:1})])],10,Ohe),De(g("button",{type:"button","aria-label":E(c)("el.datepicker.prevMonth"),class:G([E(o).e("icon-btn"),"arrow-left"]),disabled:E(oe),onClick:Le[3]||(Le[3]=ue=>N(!1))},[le(_e.$slots,"prev-month",{},()=>[_(E(be),null,{default:w(()=>[_(E(Tf))]),_:1})])],10,Dhe),[[Ut,K.value==="date"]])],2),g("span",{role:"button",class:G(E(r).e("header-label")),"aria-live":"polite",tabindex:_e.disabled?void 0:0,"aria-disabled":_e.disabled,onKeydown:Le[4]||(Le[4]=ut(ue=>fe("year"),["enter"])),onClick:Le[5]||(Le[5]=ue=>fe("year"))},S(X.value),43,Rhe),De(g("span",{role:"button","aria-live":"polite",tabindex:_e.disabled?void 0:0,"aria-disabled":_e.disabled,class:G([E(r).e("header-label"),{active:K.value==="month"}]),onKeydown:Le[6]||(Le[6]=ut(ue=>fe("month"),["enter"])),onClick:Le[7]||(Le[7]=ue=>fe("month"))},S(E(c)(`el.datepicker.month${P.value+1}`)),43,Vhe),[[Ut,K.value==="date"]]),g("span",{class:G(E(r).e("next-btn"))},[De(g("button",{type:"button","aria-label":E(c)("el.datepicker.nextMonth"),class:G([E(o).e("icon-btn"),"arrow-right"]),disabled:E(oe),onClick:Le[8]||(Le[8]=ue=>N(!0))},[le(_e.$slots,"next-month",{},()=>[_(E(be),null,{default:w(()=>[_(E(ma))]),_:1})])],10,Fhe),[[Ut,K.value==="date"]]),g("button",{type:"button","aria-label":E(c)("el.datepicker.nextYear"),class:G([E(o).e("icon-btn"),"d-arrow-right"]),disabled:E(oe),onClick:Le[9]||(Le[9]=ue=>q(!0))},[le(_e.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Mc))]),_:1})])],10,Nhe)],2)],2),[[Ut,K.value!=="time"]]),g("div",{class:G(E(o).e("content")),onKeydown:Qe},[K.value==="date"?(v(),D(Jk,{key:0,ref_key:"currentViewRef",ref:k,"selection-mode":Q.value,date:C.value,"parsed-value":_e.parsedValue,"disabled-date":E(p),disabled:E(oe),"cell-class-name":E(m),"show-week-number":_e.showWeekNumber,onPick:z},null,8,["selection-mode","date","parsed-value","disabled-date","disabled","cell-class-name","show-week-number"])):O("v-if",!0),K.value==="year"?(v(),D(Bg,{key:1,ref_key:"currentViewRef",ref:k,"selection-mode":Q.value,date:C.value,"disabled-date":E(p),disabled:E(oe),"parsed-value":_e.parsedValue,"cell-class-name":E(m),onPick:we},null,8,["selection-mode","date","disabled-date","disabled","parsed-value","cell-class-name"])):O("v-if",!0),K.value==="month"?(v(),D(Ng,{key:2,ref_key:"currentViewRef",ref:k,"selection-mode":Q.value,date:C.value,"parsed-value":_e.parsedValue,"disabled-date":E(p),disabled:E(oe),"cell-class-name":E(m),onPick:me},null,8,["selection-mode","date","parsed-value","disabled-date","disabled","cell-class-name"])):O("v-if",!0)],34)],2)],2),_e.showFooter&&re.value&&ke.value?(v(),A("div",{key:0,class:G(E(o).e("footer"))},[De(_(E(We),{text:"",size:"small",class:G(E(o).e("link-btn")),disabled:se.value,onClick:ve},{default:w(()=>[B(S(E(c)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[Ut,!ne.value&&_e.showNow]]),_e.showConfirm?(v(),D(E(We),{key:0,plain:"",size:"small",class:G(E(o).e("link-btn")),disabled:je.value,onClick:te},{default:w(()=>[B(S(E(c)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):O("v-if",!0)],2)):O("v-if",!0)],2))}}),zhe=Bhe;const Hhe=Ge({...YR,...U4}),Uhe=t=>{const{emit:e}=bt(),n=$d(),i=di();return o=>{const r=et(o.value)?o.value():o.value;if(r){e("pick",[dt(r[0]).locale(t.value),dt(r[1]).locale(t.value)]);return}o.onClick&&o.onClick({attrs:n,slots:i,emit:e})}},Y4=(t,{defaultValue:e,defaultTime:n,leftDate:i,rightDate:s,step:o,unit:r,sortDates:a})=>{const{emit:l}=bt(),{pickerNs:c}=qe(z4),u=ze("date-range-picker"),{t:d,lang:h}=Qt(),f=Uhe(h),p=J(),m=J(),y=J({endDate:null,selecting:!1}),b=M=>{y.value=M},k=(M=!1)=>{const P=E(p),T=E(m);Fg([P,T])&&l("pick",[P,T],M)},C=M=>{y.value.selecting=M,M||(y.value.endDate=null)},$=M=>{if(Ee(M)&&M.length===2){const[P,T]=M;p.value=P,i.value=P,m.value=T,a(E(p),E(m))}else x()},x=()=>{let[M,P]=Tb(E(e),{lang:E(h),step:o,unit:r,unlinkPanels:t.unlinkPanels});const T=L=>L.diff(L.startOf("d"),"ms"),I=E(n);if(I){let L=0,R=0;if(Ee(I)){const[V,H]=I.map(dt);L=T(V),R=T(H)}else{const V=T(dt(I));L=V,R=V}M=M.startOf("d").add(L,"ms"),P=P.startOf("d").add(R,"ms")}p.value=void 0,m.value=void 0,i.value=M,s.value=P};return Te(e,M=>{M&&x()},{immediate:!0}),Te(()=>t.parsedValue,M=>{(!(M!=null&&M.length)||!Fi(M,[p.value,m.value]))&&$(M)},{immediate:!0}),Te(()=>t.visible,()=>{t.visible&&$(t.parsedValue)},{immediate:!0}),{minDate:p,maxDate:m,rangeState:y,lang:h,ppNs:c,drpNs:u,handleChangeRange:b,handleRangeConfirm:k,handleShortcutClick:f,onSelect:C,parseValue:$,t:d}},jhe=(t,e,n,i)=>{const s=J("date"),o=J(),r=J("date"),a=J(),{disabledDate:l}=qe(wa).props,{t:c,lang:u}=Qt(),d=Y(()=>n.value.year()),h=Y(()=>n.value.month()),f=Y(()=>i.value.year()),p=Y(()=>i.value.month());function m(x,M){const P=c("el.datepicker.year");if(x.value==="year"){const T=Math.floor(M.value/10)*10;return P?`${T} ${P} - ${T+9} ${P}`:`${T} - ${T+9}`}return`${M.value} ${P}`}function y(x){x==null||x.focus()}async function b(x,M){if(t.disabled)return;const P=x==="left"?s:r,T=x==="left"?o:a;P.value=M,await ot(),y(T.value)}async function k(x,M,P){if(t.disabled)return;const T=M==="left",I=T?n:i,L=T?i:n,R=T?s:r,V=T?o:a;x==="year"&&(I.value=oy(I.value.year(P),u.value,l)),x==="month"&&(I.value=Lf(I.value,I.value.year(),P,u.value,l)),t.unlinkPanels||(L.value=M==="left"?I.value.add(1,"month"):I.value.subtract(1,"month")),R.value=x==="year"?"month":"date",await ot(),y(V.value),C(x)}function C(x){e("panel-change",[n.value.toDate(),i.value.toDate()],x)}function $(x,M,P){const T=P?"add":"subtract";return x==="year"?M[T](10,"year"):M[T](1,"year")}return{leftCurrentView:s,rightCurrentView:r,leftCurrentViewRef:o,rightCurrentViewRef:a,leftYear:d,rightYear:f,leftMonth:h,rightMonth:p,leftYearLabel:Y(()=>m(s,d)),rightYearLabel:Y(()=>m(r,f)),showLeftPicker:x=>b("left",x),showRightPicker:x=>b("right",x),handleLeftYearPick:x=>k("year","left",x),handleRightYearPick:x=>k("year","right",x),handleLeftMonthPick:x=>k("month","left",x),handleRightMonthPick:x=>k("month","right",x),handlePanelChange:C,adjustDateByView:$}},Whe=["disabled","onClick"],Yhe=["aria-label","disabled"],qhe=["aria-label","disabled"],Ghe=["disabled","aria-label"],Xhe=["disabled","aria-label"],Khe=["tabindex","aria-disabled"],Zhe=["tabindex","aria-disabled"],Jhe=["disabled","aria-label"],Qhe=["disabled","aria-label"],efe=["aria-label","disabled"],tfe=["disabled","aria-label"],nfe=["tabindex","aria-disabled"],sfe=["tabindex","aria-disabled"],Bv="month";var ife=ce({__name:"panel-date-range",props:Hhe,emits:["pick","set-picker-option","calendar-change","panel-change","clear"],setup(t,{emit:e}){const n=t,i=e,s=qe(wa),o=qe($1,void 0),{disabledDate:r,cellClassName:a,defaultTime:l,clearable:c}=s.props,u=Sn(s.props,"format"),d=Sn(s.props,"shortcuts"),h=Sn(s.props,"defaultValue"),{lang:f}=Qt(),p=J(dt().locale(f.value)),m=J(dt().locale(f.value).add(1,Bv)),{minDate:y,maxDate:b,rangeState:k,ppNs:C,drpNs:$,handleChangeRange:x,handleRangeConfirm:M,handleShortcutClick:P,onSelect:T,parseValue:I,t:L}=Y4(n,{defaultValue:h,defaultTime:l,leftDate:p,rightDate:m,unit:Bv,sortDates:Pi});Te(()=>n.visible,tt=>{!tt&&k.value.selecting&&(I(n.parsedValue),T(!1))});const R=J({min:null,max:null}),V=J({min:null,max:null}),{leftCurrentView:H,rightCurrentView:F,leftCurrentViewRef:z,rightCurrentViewRef:N,leftYear:q,rightYear:K,leftMonth:X,rightMonth:U,leftYearLabel:Q,rightYearLabel:ne,showLeftPicker:Z,showRightPicker:ae,handleLeftYearPick:me,handleRightYearPick:we,handleLeftMonthPick:oe,handleRightMonthPick:fe,handlePanelChange:ie,adjustDateByView:re}=jhe(n,i,p,m),ke=Y(()=>!!d.value.length),je=Y(()=>R.value.min!==null?R.value.min:y.value?y.value.format(Se.value):""),te=Y(()=>R.value.max!==null?R.value.max:b.value||y.value?(b.value||y.value).format(Se.value):""),se=Y(()=>V.value.min!==null?V.value.min:y.value?y.value.format($e.value):""),ve=Y(()=>V.value.max!==null?V.value.max:b.value||y.value?(b.value||y.value).format($e.value):""),$e=Y(()=>n.timeFormat||tR(u.value||"")||Og),Se=Y(()=>n.dateFormat||eR(u.value||"")||tc),Fe=tt=>Fg(tt)&&(r?!r(tt[0].toDate())&&!r(tt[1].toDate()):!0),Ye=()=>{p.value=re(H.value,p.value,!1),n.unlinkPanels||(m.value=p.value.add(1,"month")),ie("year")},Re=()=>{p.value=p.value.subtract(1,"month"),n.unlinkPanels||(m.value=p.value.add(1,"month")),ie("month")},He=()=>{n.unlinkPanels?m.value=re(F.value,m.value,!0):(p.value=re(F.value,p.value,!0),m.value=p.value.add(1,"month")),ie("year")},Me=()=>{n.unlinkPanels?m.value=m.value.add(1,"month"):(p.value=p.value.add(1,"month"),m.value=p.value.add(1,"month")),ie("month")},Ne=()=>{p.value=re(H.value,p.value,!0),ie("year")},st=()=>{p.value=p.value.add(1,"month"),ie("month")},it=()=>{m.value=re(F.value,m.value,!1),ie("year")},ye=()=>{m.value=m.value.subtract(1,"month"),ie("month")},ge=Y(()=>{const tt=(X.value+1)%12,at=X.value+1>=12?1:0;return n.unlinkPanels&&new Date(q.value+at,tt)<new Date(K.value,U.value)}),Pe=Y(()=>n.unlinkPanels&&K.value*12+U.value-(q.value*12+X.value+1)>=12),Ie=ys(),ht=Y(()=>!(y.value&&b.value&&!k.value.selecting&&Fg([y.value,b.value])&&!Ie.value)),Bt=Y(()=>n.type==="datetime"||n.type==="datetimerange"),Qe=(tt,at)=>{if(tt)return l?dt(l[at]||l).locale(f.value).year(tt.year()).month(tt.month()).date(tt.date()):tt},kt=(tt,at=!0)=>{const mt=tt.minDate,Uo=tt.maxDate,kl=Qe(mt,0),eu=Qe(Uo,1);b.value===eu&&y.value===kl||(i("calendar-change",[mt.toDate(),Uo&&Uo.toDate()]),b.value=eu,y.value=kl,!Bt.value&&at&&(at=!kl||!eu),M(at))},pt=J(!1),_e=J(!1),Le=()=>{pt.value=!1},ue=()=>{_e.value=!1},Oe=(tt,at)=>{R.value[at]=tt;const mt=dt(tt,Se.value).locale(f.value);if(mt.isValid()){if(r&&r(mt.toDate()))return;at==="min"?(p.value=mt,y.value=(y.value||p.value).year(mt.year()).month(mt.month()).date(mt.date()),!n.unlinkPanels&&(!b.value||b.value.isBefore(y.value))&&(m.value=mt.add(1,"month"),b.value=y.value.add(1,"month"))):(m.value=mt,b.value=(b.value||m.value).year(mt.year()).month(mt.month()).date(mt.date()),!n.unlinkPanels&&(!y.value||y.value.isAfter(b.value))&&(p.value=mt.subtract(1,"month"),y.value=b.value.subtract(1,"month"))),Pi(y.value,b.value),M(!0)}},gt=(tt,at)=>{R.value[at]=null},_n=(tt,at)=>{V.value[at]=tt;const mt=dt(tt,$e.value).locale(f.value);mt.isValid()&&(at==="min"?(pt.value=!0,y.value=(y.value||p.value).hour(mt.hour()).minute(mt.minute()).second(mt.second()),p.value=y.value):(_e.value=!0,b.value=(b.value||m.value).hour(mt.hour()).minute(mt.minute()).second(mt.second()),m.value=b.value))},fs=(tt,at)=>{V.value[at]=null,at==="min"?(p.value=y.value,pt.value=!1,(!b.value||b.value.isBefore(y.value))&&(b.value=y.value)):(m.value=b.value,_e.value=!1,b.value&&b.value.isBefore(y.value)&&(y.value=b.value)),M(!0)},Qc=(tt,at,mt)=>{V.value.min||(tt&&(y.value=(y.value||p.value).hour(tt.hour()).minute(tt.minute()).second(tt.second())),mt||(pt.value=at),(!b.value||b.value.isBefore(y.value))&&(b.value=y.value,m.value=tt,ot(()=>{I(n.parsedValue)})),M(!0))},$p=(tt,at,mt)=>{V.value.max||(tt&&(b.value=(b.value||m.value).hour(tt.hour()).minute(tt.minute()).second(tt.second())),mt||(_e.value=at),b.value&&b.value.isBefore(y.value)&&(y.value=b.value),M(!0))},wl=()=>{Qr(),i("clear")},Qr=()=>{let tt=null;s!=null&&s.emptyValues&&(tt=s.emptyValues.valueOnClear.value),p.value=Tb(E(h),{lang:E(f),unit:"month",unlinkPanels:n.unlinkPanels})[0],m.value=p.value.add(1,"month"),b.value=void 0,y.value=void 0,M(!0),i("pick",tt)},$n=tt=>Of(tt,u.value||"",f.value,o);function Pi(tt,at){if(n.unlinkPanels&&at){const mt=(tt==null?void 0:tt.year())||0,Uo=(tt==null?void 0:tt.month())||0,kl=at.year(),eu=at.month();m.value=mt===kl&&Uo===eu?at.add(1,Bv):at}else m.value=p.value.add(1,Bv),at&&(m.value=m.value.hour(at.hour()).minute(at.minute()).second(at.second()))}return i("set-picker-option",["isValidValue",Fe]),i("set-picker-option",["parseUserInput",$n]),i("set-picker-option",["handleClear",Qr]),(tt,at)=>(v(),A("div",{class:G([E(C).b(),E($).b(),E(C).is("border",tt.border),E(C).is("disabled",E(Ie)),{"has-sidebar":tt.$slots.sidebar||ke.value,"has-time":Bt.value}])},[g("div",{class:G(E(C).e("body-wrapper"))},[le(tt.$slots,"sidebar",{class:G(E(C).e("sidebar"))}),ke.value?(v(),A("div",{key:0,class:G(E(C).e("sidebar"))},[(v(!0),A(ee,null,Ce(d.value,(mt,Uo)=>(v(),A("button",{key:Uo,type:"button",disabled:E(Ie),class:G(E(C).e("shortcut")),onClick:kl=>E(P)(mt)},S(mt.text),11,Whe))),128))],2)):O("v-if",!0),g("div",{class:G(E(C).e("body"))},[Bt.value?(v(),A("div",{key:0,class:G(E($).e("time-header"))},[g("span",{class:G(E($).e("editors-wrap"))},[g("span",{class:G(E($).e("time-picker-wrap"))},[_(E(ft),{size:"small",disabled:E(k).selecting||E(Ie),placeholder:E(L)("el.datepicker.startDate"),class:G(E($).e("editor")),"model-value":je.value,"validate-event":!1,readonly:!tt.editable,onInput:at[0]||(at[0]=mt=>Oe(mt,"min")),onChange:at[1]||(at[1]=mt=>gt(mt,"min"))},null,8,["disabled","placeholder","class","model-value","readonly"])],2),De((v(),A("span",{class:G(E($).e("time-picker-wrap"))},[_(E(ft),{size:"small",class:G(E($).e("editor")),disabled:E(k).selecting||E(Ie),placeholder:E(L)("el.datepicker.startTime"),"model-value":se.value,"validate-event":!1,readonly:!tt.editable,onFocus:at[2]||(at[2]=mt=>pt.value=!0),onInput:at[3]||(at[3]=mt=>_n(mt,"min")),onChange:at[4]||(at[4]=mt=>fs(mt,"min"))},null,8,["class","disabled","placeholder","model-value","readonly"]),_(E(Gk),{visible:pt.value,format:$e.value,"datetime-role":"start","parsed-value":E(y)||p.value,onPick:Qc},null,8,["visible","format","parsed-value"])],2)),[[E(Dg),Le]])],2),g("span",null,[_(E(be),null,{default:w(()=>[_(E(ma))]),_:1})]),g("span",{class:G([E($).e("editors-wrap"),"is-right"])},[g("span",{class:G(E($).e("time-picker-wrap"))},[_(E(ft),{size:"small",class:G(E($).e("editor")),disabled:E(k).selecting||E(Ie),placeholder:E(L)("el.datepicker.endDate"),"model-value":te.value,readonly:!E(y)||!tt.editable,"validate-event":!1,onInput:at[5]||(at[5]=mt=>Oe(mt,"max")),onChange:at[6]||(at[6]=mt=>gt(mt,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"])],2),De((v(),A("span",{class:G(E($).e("time-picker-wrap"))},[_(E(ft),{size:"small",class:G(E($).e("editor")),disabled:E(k).selecting||E(Ie),placeholder:E(L)("el.datepicker.endTime"),"model-value":ve.value,readonly:!E(y)||!tt.editable,"validate-event":!1,onFocus:at[7]||(at[7]=mt=>E(y)&&(_e.value=!0)),onInput:at[8]||(at[8]=mt=>_n(mt,"max")),onChange:at[9]||(at[9]=mt=>fs(mt,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"]),_(E(Gk),{"datetime-role":"end",visible:_e.value,format:$e.value,"parsed-value":E(b)||m.value,onPick:$p},null,8,["visible","format","parsed-value"])],2)),[[E(Dg),ue]])],2)],2)):O("v-if",!0),g("div",{class:G([[E(C).e("content"),E($).e("content")],"is-left"])},[g("div",{class:G(E($).e("header"))},[g("button",{type:"button",class:G([E(C).e("icon-btn"),"d-arrow-left"]),"aria-label":E(L)("el.datepicker.prevYear"),disabled:E(Ie),onClick:Ye},[le(tt.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Ec))]),_:1})])],10,Yhe),De(g("button",{type:"button",class:G([E(C).e("icon-btn"),"arrow-left"]),"aria-label":E(L)("el.datepicker.prevMonth"),disabled:E(Ie),onClick:Re},[le(tt.$slots,"prev-month",{},()=>[_(E(be),null,{default:w(()=>[_(E(Tf))]),_:1})])],10,qhe),[[Ut,E(H)==="date"]]),tt.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!Pe.value||E(Ie),class:G([[E(C).e("icon-btn"),E(C).is("disabled",!Pe.value||E(Ie))],"d-arrow-right"]),"aria-label":E(L)("el.datepicker.nextYear"),onClick:Ne},[le(tt.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Mc))]),_:1})])],10,Ghe)):O("v-if",!0),tt.unlinkPanels&&E(H)==="date"?(v(),A("button",{key:1,type:"button",disabled:!ge.value||E(Ie),class:G([[E(C).e("icon-btn"),E(C).is("disabled",!ge.value||E(Ie))],"arrow-right"]),"aria-label":E(L)("el.datepicker.nextMonth"),onClick:st},[le(tt.$slots,"next-month",{},()=>[_(E(be),null,{default:w(()=>[_(E(ma))]),_:1})])],10,Xhe)):O("v-if",!0),g("div",null,[g("span",{role:"button",class:G(E($).e("header-label")),"aria-live":"polite",tabindex:tt.disabled?void 0:0,"aria-disabled":tt.disabled,onKeydown:at[10]||(at[10]=ut(mt=>E(Z)("year"),["enter"])),onClick:at[11]||(at[11]=mt=>E(Z)("year"))},S(E(Q)),43,Khe),De(g("span",{role:"button","aria-live":"polite",tabindex:tt.disabled?void 0:0,"aria-disabled":tt.disabled,class:G([E($).e("header-label"),{active:E(H)==="month"}]),onKeydown:at[12]||(at[12]=ut(mt=>E(Z)("month"),["enter"])),onClick:at[13]||(at[13]=mt=>E(Z)("month"))},S(E(L)(`el.datepicker.month${p.value.month()+1}`)),43,Zhe),[[Ut,E(H)==="date"]])])],2),E(H)==="date"?(v(),D(Jk,{key:0,ref_key:"leftCurrentViewRef",ref:z,"selection-mode":"range",date:p.value,"min-date":E(y),"max-date":E(b),"range-state":E(k),"disabled-date":E(r),"cell-class-name":E(a),"show-week-number":tt.showWeekNumber,disabled:E(Ie),onChangerange:E(x),onPick:kt,onSelect:E(T)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","show-week-number","disabled","onChangerange","onSelect"])):O("v-if",!0),E(H)==="year"?(v(),D(Bg,{key:1,ref_key:"leftCurrentViewRef",ref:z,"selection-mode":"year",date:p.value,"disabled-date":E(r),"parsed-value":tt.parsedValue,disabled:E(Ie),onPick:E(me)},null,8,["date","disabled-date","parsed-value","disabled","onPick"])):O("v-if",!0),E(H)==="month"?(v(),D(Ng,{key:2,ref_key:"leftCurrentViewRef",ref:z,"selection-mode":"month",date:p.value,"parsed-value":tt.parsedValue,"disabled-date":E(r),disabled:E(Ie),onPick:E(oe)},null,8,["date","parsed-value","disabled-date","disabled","onPick"])):O("v-if",!0)],2),g("div",{class:G([[E(C).e("content"),E($).e("content")],"is-right"])},[g("div",{class:G(E($).e("header"))},[tt.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!Pe.value||E(Ie),class:G([[E(C).e("icon-btn"),E(C).is("disabled",!Pe.value||E(Ie))],"d-arrow-left"]),"aria-label":E(L)("el.datepicker.prevYear"),onClick:it},[le(tt.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Ec))]),_:1})])],10,Jhe)):O("v-if",!0),tt.unlinkPanels&&E(F)==="date"?(v(),A("button",{key:1,type:"button",disabled:!ge.value||E(Ie),class:G([[E(C).e("icon-btn"),E(C).is("disabled",!ge.value||E(Ie))],"arrow-left"]),"aria-label":E(L)("el.datepicker.prevMonth"),onClick:ye},[le(tt.$slots,"prev-month",{},()=>[_(E(be),null,{default:w(()=>[_(E(Tf))]),_:1})])],10,Qhe)):O("v-if",!0),g("button",{type:"button","aria-label":E(L)("el.datepicker.nextYear"),class:G([E(C).e("icon-btn"),"d-arrow-right"]),disabled:E(Ie),onClick:He},[le(tt.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Mc))]),_:1})])],10,efe),De(g("button",{type:"button",class:G([E(C).e("icon-btn"),"arrow-right"]),disabled:E(Ie),"aria-label":E(L)("el.datepicker.nextMonth"),onClick:Me},[le(tt.$slots,"next-month",{},()=>[_(E(be),null,{default:w(()=>[_(E(ma))]),_:1})])],10,tfe),[[Ut,E(F)==="date"]]),g("div",null,[g("span",{role:"button",class:G(E($).e("header-label")),"aria-live":"polite",tabindex:tt.disabled?void 0:0,"aria-disabled":tt.disabled,onKeydown:at[14]||(at[14]=ut(mt=>E(ae)("year"),["enter"])),onClick:at[15]||(at[15]=mt=>E(ae)("year"))},S(E(ne)),43,nfe),De(g("span",{role:"button","aria-live":"polite",tabindex:tt.disabled?void 0:0,"aria-disabled":tt.disabled,class:G([E($).e("header-label"),{active:E(F)==="month"}]),onKeydown:at[16]||(at[16]=ut(mt=>E(ae)("month"),["enter"])),onClick:at[17]||(at[17]=mt=>E(ae)("month"))},S(E(L)(`el.datepicker.month${m.value.month()+1}`)),43,sfe),[[Ut,E(F)==="date"]])])],2),E(F)==="date"?(v(),D(Jk,{key:0,ref_key:"rightCurrentViewRef",ref:N,"selection-mode":"range",date:m.value,"min-date":E(y),"max-date":E(b),"range-state":E(k),"disabled-date":E(r),"cell-class-name":E(a),"show-week-number":tt.showWeekNumber,disabled:E(Ie),onChangerange:E(x),onPick:kt,onSelect:E(T)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","show-week-number","disabled","onChangerange","onSelect"])):O("v-if",!0),E(F)==="year"?(v(),D(Bg,{key:1,ref_key:"rightCurrentViewRef",ref:N,"selection-mode":"year",date:m.value,"disabled-date":E(r),"parsed-value":tt.parsedValue,disabled:E(Ie),onPick:E(we)},null,8,["date","disabled-date","parsed-value","disabled","onPick"])):O("v-if",!0),E(F)==="month"?(v(),D(Ng,{key:2,ref_key:"rightCurrentViewRef",ref:N,"selection-mode":"month",date:m.value,"parsed-value":tt.parsedValue,"disabled-date":E(r),disabled:E(Ie),onPick:E(fe)},null,8,["date","parsed-value","disabled-date","disabled","onPick"])):O("v-if",!0)],2)],2)],2),tt.showFooter&&Bt.value&&(tt.showConfirm||E(c))?(v(),A("div",{key:0,class:G(E(C).e("footer"))},[E(c)?(v(),D(E(We),{key:0,text:"",size:"small",class:G(E(C).e("link-btn")),onClick:wl},{default:w(()=>[B(S(E(L)("el.datepicker.clear")),1)]),_:1},8,["class"])):O("v-if",!0),tt.showConfirm?(v(),D(E(We),{key:1,plain:"",size:"small",class:G(E(C).e("link-btn")),disabled:ht.value,onClick:at[18]||(at[18]=mt=>E(M)(!1))},{default:w(()=>[B(S(E(L)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):O("v-if",!0)],2)):O("v-if",!0)],2))}}),ofe=ife;const rfe=Ge({...U4}),afe=["pick","set-picker-option","calendar-change"],lfe=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const{t:i}=Qt();return{leftPrevYear:()=>{e.value=e.value.subtract(1,"year"),t.value||(n.value=n.value.subtract(1,"year"))},rightNextYear:()=>{t.value||(e.value=e.value.add(1,"year")),n.value=n.value.add(1,"year")},leftNextYear:()=>{e.value=e.value.add(1,"year")},rightPrevYear:()=>{n.value=n.value.subtract(1,"year")},leftLabel:Y(()=>`${e.value.year()} ${i("el.datepicker.year")}`),rightLabel:Y(()=>`${n.value.year()} ${i("el.datepicker.year")}`),leftYear:Y(()=>e.value.year()),rightYear:Y(()=>n.value.year()===e.value.year()?e.value.year()+1:n.value.year())}},cfe=["disabled","onClick"],ufe=["disabled"],dfe=["disabled"],hfe=["disabled"],ffe=["disabled"],zv="year";var pfe=ce({name:"DatePickerMonthRange",__name:"panel-month-range",props:rfe,emits:afe,setup(t,{emit:e}){const n=t,i=e,{lang:s}=Qt(),o=qe(wa),r=qe($1,void 0),{shortcuts:a,disabledDate:l,cellClassName:c}=o.props,u=Sn(o.props,"format"),d=Sn(o.props,"defaultValue"),h=J(dt().locale(s.value)),f=J(dt().locale(s.value).add(1,zv)),{minDate:p,maxDate:m,rangeState:y,ppNs:b,drpNs:k,handleChangeRange:C,handleRangeConfirm:$,handleShortcutClick:x,onSelect:M,parseValue:P}=Y4(n,{defaultValue:d,leftDate:h,rightDate:f,unit:zv,sortDates:Q}),T=Y(()=>!!a.length),{leftPrevYear:I,rightNextYear:L,leftNextYear:R,rightPrevYear:V,leftLabel:H,rightLabel:F,leftYear:z,rightYear:N}=lfe({unlinkPanels:Sn(n,"unlinkPanels"),leftDate:h,rightDate:f}),q=Y(()=>n.unlinkPanels&&N.value>z.value+1),K=(Z,ae=!0)=>{const me=Z.minDate,we=Z.maxDate;m.value===we&&p.value===me||(i("calendar-change",[me.toDate(),we&&we.toDate()]),m.value=we,p.value=me,ae&&$())},X=()=>{let Z=null;o!=null&&o.emptyValues&&(Z=o.emptyValues.valueOnClear.value),h.value=Tb(E(d),{lang:E(s),unit:"year",unlinkPanels:n.unlinkPanels})[0],f.value=h.value.add(1,"year"),i("pick",Z)},U=Z=>Of(Z,u.value,s.value,r);function Q(Z,ae){n.unlinkPanels&&ae?f.value=((Z==null?void 0:Z.year())||0)===ae.year()?ae.add(1,zv):ae:f.value=h.value.add(1,zv)}const ne=ys();return Te(()=>n.visible,Z=>{!Z&&y.value.selecting&&(P(n.parsedValue),M(!1))}),i("set-picker-option",["isValidValue",Fg]),i("set-picker-option",["parseUserInput",U]),i("set-picker-option",["handleClear",X]),(Z,ae)=>(v(),A("div",{class:G([E(b).b(),E(k).b(),E(b).is("border",Z.border),E(b).is("disabled",E(ne)),{"has-sidebar":!!Z.$slots.sidebar||T.value}])},[g("div",{class:G(E(b).e("body-wrapper"))},[le(Z.$slots,"sidebar",{class:G(E(b).e("sidebar"))}),T.value?(v(),A("div",{key:0,class:G(E(b).e("sidebar"))},[(v(!0),A(ee,null,Ce(E(a),(me,we)=>(v(),A("button",{key:we,type:"button",class:G(E(b).e("shortcut")),disabled:E(ne),onClick:oe=>E(x)(me)},S(me.text),11,cfe))),128))],2)):O("v-if",!0),g("div",{class:G(E(b).e("body"))},[g("div",{class:G([[E(b).e("content"),E(k).e("content")],"is-left"])},[g("div",{class:G(E(k).e("header"))},[g("button",{type:"button",class:G([E(b).e("icon-btn"),"d-arrow-left"]),disabled:E(ne),onClick:ae[0]||(ae[0]=(...me)=>E(I)&&E(I)(...me))},[le(Z.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Ec))]),_:1})])],10,ufe),Z.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!q.value||E(ne),class:G([[E(b).e("icon-btn"),E(b).is("disabled",!q.value||E(ne))],"d-arrow-right"]),onClick:ae[1]||(ae[1]=(...me)=>E(R)&&E(R)(...me))},[le(Z.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Mc))]),_:1})])],10,dfe)):O("v-if",!0),g("div",null,S(E(H)),1)],2),_(Ng,{"selection-mode":"range",date:h.value,"min-date":E(p),"max-date":E(m),"range-state":E(y),"disabled-date":E(l),disabled:E(ne),"cell-class-name":E(c),onChangerange:E(C),onPick:K,onSelect:E(M)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2),g("div",{class:G([[E(b).e("content"),E(k).e("content")],"is-right"])},[g("div",{class:G(E(k).e("header"))},[Z.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!q.value||E(ne),class:G([[E(b).e("icon-btn"),E(b).is("disabled",!q.value||E(ne))],"d-arrow-left"]),onClick:ae[2]||(ae[2]=(...me)=>E(V)&&E(V)(...me))},[le(Z.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Ec))]),_:1})])],10,hfe)):O("v-if",!0),g("button",{type:"button",class:G([E(b).e("icon-btn"),"d-arrow-right"]),disabled:E(ne),onClick:ae[3]||(ae[3]=(...me)=>E(L)&&E(L)(...me))},[le(Z.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Mc))]),_:1})])],10,ffe),g("div",null,S(E(F)),1)],2),_(Ng,{"selection-mode":"range",date:f.value,"min-date":E(p),"max-date":E(m),"range-state":E(y),"disabled-date":E(l),disabled:E(ne),"cell-class-name":E(c),onChangerange:E(C),onPick:K,onSelect:E(M)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2)],2)],2)],2))}}),mfe=pfe;const gfe=Ge({...U4}),vfe=["pick","set-picker-option","calendar-change"],_fe=({unlinkPanels:t,leftDate:e,rightDate:n})=>({leftPrevYear:()=>{e.value=e.value.subtract(10,"year"),t.value||(n.value=n.value.subtract(10,"year"))},rightNextYear:()=>{t.value||(e.value=e.value.add(10,"year")),n.value=n.value.add(10,"year")},leftNextYear:()=>{e.value=e.value.add(10,"year")},rightPrevYear:()=>{n.value=n.value.subtract(10,"year")},leftLabel:Y(()=>{const a=Math.floor(e.value.year()/10)*10;return`${a}-${a+9}`}),rightLabel:Y(()=>{const a=Math.floor(n.value.year()/10)*10;return`${a}-${a+9}`}),leftYear:Y(()=>Math.floor(e.value.year()/10)*10+9),rightYear:Y(()=>Math.floor(n.value.year()/10)*10)}),yfe=["disabled","onClick"],bfe=["disabled"],wfe=["disabled"],kfe=["disabled"],Cfe=["disabled"],Qd=10,Rp="year";var xfe=ce({name:"DatePickerYearRange",__name:"panel-year-range",props:gfe,emits:vfe,setup(t,{emit:e}){const n=t,i=e,{lang:s}=Qt(),o=J(dt().locale(s.value)),r=J(dt().locale(s.value).add(Qd,Rp)),a=qe($1,void 0),l=qe(wa),{shortcuts:c,disabledDate:u,cellClassName:d}=l.props,h=Sn(l.props,"format"),f=Sn(l.props,"defaultValue"),{minDate:p,maxDate:m,rangeState:y,ppNs:b,drpNs:k,handleChangeRange:C,handleRangeConfirm:$,handleShortcutClick:x,onSelect:M,parseValue:P}=Y4(n,{defaultValue:f,leftDate:o,rightDate:r,step:Qd,unit:Rp,sortDates:we}),{leftPrevYear:T,rightNextYear:I,leftNextYear:L,rightPrevYear:R,leftLabel:V,rightLabel:H,leftYear:F,rightYear:z}=_fe({unlinkPanels:Sn(n,"unlinkPanels"),leftDate:o,rightDate:r}),N=ys(),q=Y(()=>!!c.length),K=Y(()=>[b.b(),k.b(),b.is("border",n.border),b.is("disabled",N.value),{"has-sidebar":!!di().sidebar||q.value}]),X=Y(()=>({content:[b.e("content"),k.e("content"),"is-left"],arrowLeftBtn:[b.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[b.e("icon-btn"),b.is("disabled",!Q.value||N.value),"d-arrow-right"]})),U=Y(()=>({content:[b.e("content"),k.e("content"),"is-right"],arrowLeftBtn:[b.e("icon-btn"),b.is("disabled",!Q.value||N.value),"d-arrow-left"],arrowRightBtn:[b.e("icon-btn"),"d-arrow-right"]})),Q=Y(()=>n.unlinkPanels&&z.value>F.value+1),ne=(oe,fe=!0)=>{const ie=oe.minDate,re=oe.maxDate;m.value===re&&p.value===ie||(i("calendar-change",[ie.toDate(),re&&re.toDate()]),m.value=re,p.value=ie,fe&&$())},Z=oe=>Of(oe,h.value,s.value,a),ae=oe=>Fg(oe)&&(u?!u(oe[0].toDate())&&!u(oe[1].toDate()):!0),me=()=>{let oe=null;l!=null&&l.emptyValues&&(oe=l.emptyValues.valueOnClear.value);const fe=Tb(E(f),{lang:E(s),step:Qd,unit:Rp,unlinkPanels:n.unlinkPanels});o.value=fe[0],r.value=fe[1],i("pick",oe)};function we(oe,fe){if(n.unlinkPanels&&fe){const ie=(oe==null?void 0:oe.year())||0,re=fe.year();r.value=ie+Qd>re?fe.add(Qd,Rp):fe}else r.value=o.value.add(Qd,Rp)}return Te(()=>n.visible,oe=>{!oe&&y.value.selecting&&(P(n.parsedValue),M(!1))}),i("set-picker-option",["isValidValue",ae]),i("set-picker-option",["parseUserInput",Z]),i("set-picker-option",["handleClear",me]),(oe,fe)=>(v(),A("div",{class:G(K.value)},[g("div",{class:G(E(b).e("body-wrapper"))},[le(oe.$slots,"sidebar",{class:G(E(b).e("sidebar"))}),q.value?(v(),A("div",{key:0,class:G(E(b).e("sidebar"))},[(v(!0),A(ee,null,Ce(E(c),(ie,re)=>(v(),A("button",{key:re,type:"button",class:G(E(b).e("shortcut")),disabled:E(N),onClick:ke=>E(x)(ie)},S(ie.text),11,yfe))),128))],2)):O("v-if",!0),g("div",{class:G(E(b).e("body"))},[g("div",{class:G(X.value.content)},[g("div",{class:G(E(k).e("header"))},[g("button",{type:"button",class:G(X.value.arrowLeftBtn),disabled:E(N),onClick:fe[0]||(fe[0]=(...ie)=>E(T)&&E(T)(...ie))},[le(oe.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Ec))]),_:1})])],10,bfe),oe.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!Q.value||E(N),class:G(X.value.arrowRightBtn),onClick:fe[1]||(fe[1]=(...ie)=>E(L)&&E(L)(...ie))},[le(oe.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Mc))]),_:1})])],10,wfe)):O("v-if",!0),g("div",null,S(E(V)),1)],2),_(Bg,{"selection-mode":"range",date:o.value,"min-date":E(p),"max-date":E(m),"range-state":E(y),"disabled-date":E(u),disabled:E(N),"cell-class-name":E(d),onChangerange:E(C),onPick:ne,onSelect:E(M)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2),g("div",{class:G(U.value.content)},[g("div",{class:G(E(k).e("header"))},[oe.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!Q.value||E(N),class:G(U.value.arrowLeftBtn),onClick:fe[2]||(fe[2]=(...ie)=>E(R)&&E(R)(...ie))},[le(oe.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Ec))]),_:1})])],10,kfe)):O("v-if",!0),g("button",{type:"button",class:G(U.value.arrowRightBtn),disabled:E(N),onClick:fe[3]||(fe[3]=(...ie)=>E(I)&&E(I)(...ie))},[le(oe.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Mc))]),_:1})])],10,Cfe),g("div",null,S(E(H)),1)],2),_(Bg,{"selection-mode":"range",date:r.value,"min-date":E(p),"max-date":E(m),"range-state":E(y),"disabled-date":E(u),disabled:E(N),"cell-class-name":E(d),onChangerange:E(C),onPick:ne,onSelect:E(M)},null,8,["date","min-date","max-date","range-state","disabled-date","disabled","cell-class-name","onChangerange","onSelect"])],2)],2)],2)],2))}}),Sfe=xfe;const $fe=function(t){switch(t){case"daterange":case"datetimerange":return ofe;case"monthrange":return mfe;case"yearrange":return Sfe;default:return zhe}};var qR={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(ws,function(){return function(n,i){var s=i.prototype,o=s.format;s.format=function(r){var a=this,l=this.$locale();if(!this.isValid())return o.bind(this)(r);var c=this.$utils(),u=(r||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(d){switch(d){case"Q":return Math.ceil((a.$M+1)/3);case"Do":return l.ordinal(a.$D);case"gggg":return a.weekYear();case"GGGG":return a.isoWeekYear();case"wo":return l.ordinal(a.week(),"W");case"w":case"ww":return c.s(a.week(),d==="w"?1:2,"0");case"W":case"WW":return c.s(a.isoWeek(),d==="W"?1:2,"0");case"k":case"kk":return c.s(String(a.$H===0?24:a.$H),d==="k"?1:2,"0");case"X":return Math.floor(a.$d.getTime()/1e3);case"x":return a.$d.getTime();case"z":return"["+a.offsetName()+"]";case"zzz":return"["+a.offsetName("long")+"]";default:return d}});return o.bind(this)(u)}}})})(qR);var Afe=qR.exports;const Efe=Ei(Afe);var GR={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(ws,function(){var n="week",i="year";return function(s,o,r){var a=o.prototype;a.week=function(l){if(l===void 0&&(l=null),l!==null)return this.add(7*(l-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=r(this).startOf(i).add(1,i).date(c),d=r(this).endOf(n);if(u.isBefore(d))return 1}var h=r(this).startOf(i).date(c).startOf(n).subtract(1,"millisecond"),f=this.diff(h,n,!0);return f<0?r(this).startOf("week").week():Math.ceil(f)},a.weeks=function(l){return l===void 0&&(l=null),this.week(l)}}})})(GR);var Mfe=GR.exports;const Tfe=Ei(Mfe);var XR={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(ws,function(){return function(n,i){i.prototype.weekYear=function(){var s=this.month(),o=this.week(),r=this.year();return o===1&&s===11?r+1:s===0&&o>=52?r-1:r}}})})(XR);var Pfe=XR.exports;const Ife=Ei(Pfe);var KR={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(ws,function(){return function(n,i,s){i.prototype.dayOfYear=function(o){var r=Math.round((s(this).startOf("day")-s(this).startOf("year"))/864e5)+1;return o==null?r:this.add(o-r,"day")}}})})(KR);var Lfe=KR.exports;const Ofe=Ei(Lfe);var ZR={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(ws,function(){return function(n,i){i.prototype.isSameOrAfter=function(s,o){return this.isSame(s,o)||this.isAfter(s,o)}}})})(ZR);var Dfe=ZR.exports;const Rfe=Ei(Dfe);var JR={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(ws,function(){return function(n,i){i.prototype.isSameOrBefore=function(s,o){return this.isSame(s,o)||this.isBefore(s,o)}}})})(JR);var Vfe=JR.exports;const Ffe=Ei(Vfe);function Nfe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!ls(t)}dt.extend(Nue);dt.extend(Efe);dt.extend(mR);dt.extend(Tfe);dt.extend(Ife);dt.extend(Ofe);dt.extend(Rfe);dt.extend(Ffe);var Bfe=ce({name:"ElDatePickerPanel",install:null,inheritAttrs:!1,props:hhe,emits:[Mt,"calendar-change","panel-change","visible-change","clear"],setup(t,{slots:e,emit:n,attrs:i}){const s=ze("picker-panel");tn(qe(wa,void 0))&&It(wa,{props:In({...co(t)})}),It(z4,{slots:e,pickerNs:s});const{parsedValue:o,onCalendarChange:r,onPanelChange:a,onSetPickerOption:l,onPick:c}=qe(ZD,()=>iR(t,n),!0);return()=>_($fe(t.type),Zt(vb(i,"onPick"),t,{parsedValue:o.value,"onSet-picker-option":l,"onCalendar-change":r,"onPanel-change":a,onClear:()=>n("clear"),onPick:c}),Nfe(e)?e:{default:()=>[e]})}});const zfe=jt(Bfe),Hfe=Ge({...sR,type:{type:he(String),default:"date"}});function Ufe(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!ls(t)}var jfe=ce({name:"ElDatePicker",install:null,props:Hfe,emits:[Mt],setup(t,{expose:e,emit:n,slots:i}){It($1,Y(()=>!t.format)),It(KD,In(Sn(t,"popperOptions")));const s=J();e({focus:()=>{var r;(r=s.value)==null||r.focus()},blur:()=>{var r;(r=s.value)==null||r.blur()},handleOpen:()=>{var r;(r=s.value)==null||r.handleOpen()},handleClose:()=>{var r;(r=s.value)==null||r.handleClose()}});const o=r=>{n(Mt,r)};return()=>{const r=t.format??(Dce[t.type]||tc);return _(jce,Zt(t,{format:r,type:t.type,ref:s,"onUpdate:modelValue":o}),{default:a=>_(zfe,Zt({disabled:t.disabled,editable:t.editable,border:!1},a),Ufe(i)?i:{default:()=>[i]}),"range-separator":i["range-separator"]})}}});const Od=jt(jfe),QR=Ge({center:Boolean,alignCenter:{type:Boolean,default:void 0},closeIcon:{type:as},draggable:{type:Boolean,default:void 0},overflow:{type:Boolean,default:void 0},fullscreen:Boolean,headerClass:String,bodyClass:String,footerClass:String,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),Wfe={close:()=>!0},eV=Ge({...QR,appendToBody:Boolean,appendTo:{type:s4.to.type,default:"body"},beforeClose:{type:he(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},modalPenetrable:Boolean,openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,headerClass:String,bodyClass:String,footerClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"},transition:{type:he([String,Object]),default:void 0}}),tV={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[Mt]:t=>Xn(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},Yfe=Ge({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:he([String,Array,Object])},zIndex:{type:he([String,Number])}}),qfe={click:t=>t instanceof MouseEvent},Gfe="overlay";var Xfe=ce({name:"ElOverlay",props:Yfe,emits:qfe,setup(t,{slots:e,emit:n}){const i=ze(Gfe),s=l=>{n("click",l)},{onClick:o,onMousedown:r,onMouseup:a}=g4(t.customMaskEvent?void 0:s);return()=>t.mask?_("div",{class:[i.b(),t.overlayClass],style:{zIndex:t.zIndex},onClick:o,onMousedown:r,onMouseup:a},[le(e,"default")],J2.STYLE|J2.CLASS|J2.PROPS,["onClick","onMouseup","onMousedown"]):vt("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[le(e,"default")])}});const q4=Xfe,nV=Symbol("dialogInjectionKey"),hw="dialog-fade",Kfe="ElDialog",sV=(t,e)=>{const n=bt().emit,{nextZIndex:i}=kb();let s="";const o=pr(),r=pr(),a=J(!1),l=J(!1),c=J(!1),u=J(t.zIndex??i()),d=J(!1);let h,f;const p=zc(),m=Y(()=>{var U;return((U=p.value)==null?void 0:U.namespace)??Vm}),y=Y(()=>{var U;return(U=p.value)==null?void 0:U.dialog}),b=Y(()=>{const U={},Q=`--${m.value}-dialog`;if(!t.fullscreen){t.top&&(U[`${Q}-margin-top`]=t.top);const ne=ci(t.width);ne&&(U[`${Q}-width`]=ne)}return U}),k=Y(()=>{var U;return(t.draggable??((U=y.value)==null?void 0:U.draggable)??!1)&&!t.fullscreen}),C=Y(()=>{var U;return t.alignCenter??((U=y.value)==null?void 0:U.alignCenter)??!1}),$=Y(()=>{var U;return t.overflow??((U=y.value)==null?void 0:U.overflow)??!1}),x=Y(()=>C.value?{display:"flex"}:{}),M=Y(()=>{var ne;const U=t.transition??((ne=y.value)==null?void 0:ne.transition)??hw,Q={name:U,onAfterEnter:P,onBeforeLeave:I,onAfterLeave:T};if(yt(U)){const Z={...U},ae=(me,we)=>oe=>{Ee(me)?me.forEach(fe=>{et(fe)&&fe(oe)}):et(me)&&me(oe),we()};return Z.onAfterEnter=ae(Z.onAfterEnter,P),Z.onBeforeLeave=ae(Z.onBeforeLeave,I),Z.onAfterLeave=ae(Z.onAfterLeave,T),Z.name||(Z.name=hw,Pt(Kfe,`transition.name is missing when using object syntax, fallback to '${hw}'`)),Z}return Q});function P(){n("opened")}function T(){n("closed"),n(Mt,!1),t.destroyOnClose&&(c.value=!1),d.value=!1}function I(){d.value=!0,n("close")}function L(){f==null||f(),h==null||h(),t.openDelay&&t.openDelay>0?{stop:h}=kk(()=>F(),t.openDelay):F()}function R(){h==null||h(),f==null||f(),t.closeDelay&&t.closeDelay>0?{stop:f}=kk(()=>z(),t.closeDelay):z()}function V(){function U(Q){Q||(l.value=!0,a.value=!1)}t.beforeClose?t.beforeClose(U):R()}function H(){t.closeOnClickModal&&V()}function F(){Xt&&(a.value=!0)}function z(){a.value=!1}function N(){n("openAutoFocus")}function q(){n("closeAutoFocus")}function K(U){var Q;((Q=U.detail)==null?void 0:Q.focusReason)==="pointer"&&U.preventDefault()}t.lockScroll&&a4(a);function X(){t.closeOnPressEscape&&V()}return Te(()=>t.zIndex,()=>{u.value=t.zIndex??i()}),Te(()=>t.modelValue,U=>{U?(l.value=!1,d.value=!1,L(),c.value=!0,u.value=t.zIndex??i(),ot(()=>{n("open"),e.value&&(e.value.parentElement.scrollTop=0,e.value.parentElement.scrollLeft=0,e.value.scrollTop=0)})):a.value&&R()}),Te(()=>t.fullscreen,U=>{e.value&&(U?(s=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=s)}),Ft(()=>{t.modelValue&&(a.value=!0,c.value=!0,L())}),{afterEnter:P,afterLeave:T,beforeLeave:I,handleClose:V,onModalClick:H,close:R,doClose:z,onOpenAutoFocus:N,onCloseAutoFocus:q,onCloseRequested:X,onFocusoutPrevented:K,titleId:o,bodyId:r,closed:l,style:b,overlayDialogStyle:x,rendered:c,visible:a,zIndex:u,transitionConfig:M,_draggable:k,_alignCenter:C,_overflow:$,closing:d}},G4=(...t)=>e=>{t.forEach(n=>{n.value=e})},Zfe=["aria-level"],Jfe=["aria-label"],Qfe=["id"];var epe=ce({name:"ElDialogContent",__name:"dialog-content",props:QR,emits:Wfe,setup(t,{expose:e}){const{t:n}=Qt(),{Close:i}=Fre,s=t,{dialogRef:o,headerRef:r,bodyId:a,ns:l,style:c}=qe(nV),{focusTrapRef:u}=qe(VD),d=G4(u,o),h=Y(()=>!!s.draggable),{resetPosition:f,updatePosition:p,isDragging:m}=FO(o,r,h,Y(()=>!!s.overflow)),y=Y(()=>[l.b(),l.is("fullscreen",s.fullscreen),l.is("draggable",h.value),l.is("dragging",m.value),l.is("align-center",!!s.alignCenter),{[l.m("center")]:s.center}]);return e({resetPosition:f,updatePosition:p}),(b,k)=>(v(),A("div",{ref:E(d),class:G(y.value),style:Xe(E(c)),tabindex:"-1"},[g("header",{ref_key:"headerRef",ref:r,class:G([E(l).e("header"),t.headerClass,{"show-close":t.showClose}])},[le(b.$slots,"header",{},()=>[g("span",{role:"heading","aria-level":t.ariaLevel,class:G(E(l).e("title"))},S(t.title),11,Zfe)]),t.showClose?(v(),A("button",{key:0,"aria-label":E(n)("el.dialog.close"),class:G(E(l).e("headerbtn")),type:"button",onClick:k[0]||(k[0]=C=>b.$emit("close"))},[_(E(be),{class:G(E(l).e("close"))},{default:w(()=>[(v(),D(Ct(t.closeIcon||E(i))))]),_:1},8,["class"])],10,Jfe)):O("v-if",!0)],2),g("div",{id:E(a),class:G([E(l).e("body"),t.bodyClass])},[le(b.$slots,"default")],10,Qfe),b.$slots.footer?(v(),A("footer",{key:0,class:G([E(l).e("footer"),t.footerClass])},[le(b.$slots,"footer")],2)):O("v-if",!0)],6))}}),tpe=epe;const npe=["aria-label","aria-labelledby","aria-describedby"];var spe=ce({name:"ElDialog",inheritAttrs:!1,__name:"dialog",props:eV,emits:tV,setup(t,{expose:e}){const n=t,i=di();el({scope:"el-dialog",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/dialog.html#slots"},Y(()=>!!i.title));const s=ze("dialog"),o=J(),r=J(),a=J(),{visible:l,titleId:c,bodyId:u,style:d,overlayDialogStyle:h,rendered:f,transitionConfig:p,zIndex:m,_draggable:y,_alignCenter:b,_overflow:k,handleClose:C,onModalClick:$,onOpenAutoFocus:x,onCloseAutoFocus:M,onCloseRequested:P,onFocusoutPrevented:T,closing:I}=sV(n,o);It(nV,{dialogRef:o,headerRef:r,bodyId:u,ns:s,rendered:f,style:d});const L=g4($),R=Y(()=>n.modalPenetrable&&!n.modal&&!n.fullscreen);return e({visible:l,dialogContentRef:a,resetPosition:()=>{var H;(H=a.value)==null||H.resetPosition()},handleClose:C}),(H,F)=>(v(),D(E($b),{to:t.appendTo,disabled:t.appendTo!=="body"?!1:!t.appendToBody},{default:w(()=>[_(ji,Zt(E(p),{persisted:""}),{default:w(()=>[De(_(E(q4),{"custom-mask-event":"",mask:t.modal,"overlay-class":[t.modalClass??"",`${E(s).namespace.value}-modal-dialog`,E(s).is("penetrable",R.value)],"z-index":E(m)},{default:w(()=>[g("div",{role:"dialog","aria-modal":"true","aria-label":t.title||void 0,"aria-labelledby":t.title?void 0:E(c),"aria-describedby":E(u),class:G([`${E(s).namespace.value}-overlay-dialog`,E(s).is("closing",E(I))]),style:Xe(E(h)),onClick:F[0]||(F[0]=(...z)=>E(L).onClick&&E(L).onClick(...z)),onMousedown:F[1]||(F[1]=(...z)=>E(L).onMousedown&&E(L).onMousedown(...z)),onMouseup:F[2]||(F[2]=(...z)=>E(L).onMouseup&&E(L).onMouseup(...z))},[_(E(k1),{loop:"",trapped:E(l),"focus-start-el":"container",onFocusAfterTrapped:E(x),onFocusAfterReleased:E(M),onFocusoutPrevented:E(T),onReleaseRequested:E(P)},{default:w(()=>[E(f)?(v(),D(tpe,Zt({key:0,ref_key:"dialogContentRef",ref:a},H.$attrs,{center:t.center,"align-center":E(b),"close-icon":t.closeIcon,draggable:E(y),overflow:E(k),fullscreen:t.fullscreen,"header-class":t.headerClass,"body-class":t.bodyClass,"footer-class":t.footerClass,"show-close":t.showClose,title:t.title,"aria-level":t.headerAriaLevel,onClose:E(C)}),cs({header:w(()=>[H.$slots.title?le(H.$slots,"title",{key:1}):le(H.$slots,"header",{key:0,close:E(C),titleId:E(c),titleClass:E(s).e("title")})]),default:w(()=>[le(H.$slots,"default")]),_:2},[H.$slots.footer?{name:"footer",fn:w(()=>[le(H.$slots,"footer")]),key:"0"}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","header-class","body-class","footer-class","show-close","title","aria-level","onClose"])):O("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,npe)]),_:3},8,["mask","overlay-class","z-index"]),[[Ut,E(l)]])]),_:3},16)]),_:3},8,["to","disabled"]))}}),ipe=spe;const Ss=jt(ipe),ope=Ge({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:he(String),default:"solid"}});var rpe=ce({name:"ElDivider",__name:"divider",props:ope,setup(t){const e=t,n=ze("divider"),i=Y(()=>n.cssVar({"border-style":e.borderStyle}));return(s,o)=>(v(),A("div",{class:G([E(n).b(),E(n).m(t.direction)]),style:Xe(i.value),role:"separator"},[s.$slots.default&&t.direction!=="vertical"?(v(),A("div",{key:0,class:G([E(n).e("text"),E(n).is(t.contentPosition)])},[le(s.$slots,"default")],2)):O("v-if",!0)],6))}}),ape=rpe;const iV=jt(ape),lpe=Ge({...eV,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},resizable:Boolean,size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),cpe={...tV,"resize-start":(t,e)=>t instanceof MouseEvent&&typeof e=="number",resize:(t,e)=>t instanceof MouseEvent&&typeof e=="number","resize-end":(t,e)=>t instanceof MouseEvent&&typeof e=="number"};function upe(t,e,n){const{width:i,height:s}=Pse(),o=Y(()=>["ltr","rtl"].includes(t.direction)),r=Y(()=>["ltr","ttb"].includes(t.direction)?1:-1),a=Y(()=>o.value?i.value:s.value),l=Y(()=>EO(c.value+r.value*u.value,4,a.value)),c=J(0),u=J(0),d=J(!1),h=J(!1);let f=[],p=[];const m=()=>{var x;const $=(x=e.value)==null?void 0:x.closest('[aria-modal="true"]');return $?o.value?$.offsetWidth:$.offsetHeight:100};Te(()=>[t.size,t.resizable],()=>{h.value=!1,c.value=0,u.value=0,k()});const y=$=>{t.resizable&&(h.value||(c.value=m(),h.value=!0),f=[$.pageX,$.pageY],d.value=!0,n("resize-start",$,c.value),p.push(zn(window,"mouseup",k),zn(window,"mousemove",b)))},b=$=>{const{pageX:x,pageY:M}=$,P=x-f[0],T=M-f[1];u.value=o.value?P:T,n("resize",$,l.value)},k=$=>{d.value&&(f=[],c.value=l.value,u.value=0,d.value=!1,p.forEach(x=>x==null?void 0:x()),p=[],$&&n("resize-end",$,c.value))},C=zn(e,"mousedown",y);return bn(()=>{C(),k()}),{size:Y(()=>h.value?`${l.value}px`:ci(t.size)),isResizing:d,isHorizontal:o}}const dpe=["aria-label","aria-labelledby","aria-describedby"],hpe=["id","aria-level"],fpe=["aria-label"],ppe=["id"];var mpe=ce({name:"ElDrawer",inheritAttrs:!1,__name:"drawer",props:lpe,emits:cpe,setup(t,{expose:e,emit:n}){const i=t,s=n,o=di();el({scope:"el-drawer",from:"the title slot",replacement:"the header slot",version:"3.0.0",ref:"https://element-plus.org/en-US/component/drawer.html#slots"},Y(()=>!!o.title));const r=J(),a=J(),l=J(),c=ze("drawer"),{t:u}=Qt(),{afterEnter:d,afterLeave:h,beforeLeave:f,visible:p,rendered:m,titleId:y,bodyId:b,zIndex:k,onModalClick:C,onOpenAutoFocus:$,onCloseAutoFocus:x,onFocusoutPrevented:M,onCloseRequested:P,handleClose:T}=sV(i,r),{isHorizontal:I,size:L,isResizing:R}=upe(i,l,s),V=Y(()=>i.modalPenetrable&&!i.modal);return e({handleClose:T,afterEnter:d,afterLeave:h}),(H,F)=>(v(),D(E($b),{to:t.appendTo,disabled:t.appendTo!=="body"?!1:!t.appendToBody},{default:w(()=>[_(ji,{name:E(c).b("fade"),onAfterEnter:E(d),onAfterLeave:E(h),onBeforeLeave:E(f),persisted:""},{default:w(()=>[De(_(E(q4),{mask:t.modal,"overlay-class":[E(c).is("drawer"),t.modalClass??"",`${E(c).namespace.value}-modal-drawer`,E(c).is("penetrable",V.value)],"z-index":E(k),onClick:E(C)},{default:w(()=>[_(E(k1),{loop:"",trapped:E(p),"focus-trap-el":r.value,"focus-start-el":a.value,onFocusAfterTrapped:E($),onFocusAfterReleased:E(x),onFocusoutPrevented:E(M),onReleaseRequested:E(P)},{default:w(()=>[g("div",Zt({ref_key:"drawerRef",ref:r,"aria-modal":"true","aria-label":t.title||void 0,"aria-labelledby":t.title?void 0:E(y),"aria-describedby":E(b)},H.$attrs,{class:[E(c).b(),t.direction,E(p)&&"open",E(c).is("dragging",E(R))],style:{[E(I)?"width":"height"]:E(L)},role:"dialog",onClick:F[1]||(F[1]=Ae(()=>{},["stop"]))}),[g("span",{ref_key:"focusStartRef",ref:a,class:G(E(c).e("sr-focus")),tabindex:"-1"},null,2),t.withHeader?(v(),A("header",{key:0,class:G([E(c).e("header"),t.headerClass])},[H.$slots.title?le(H.$slots,"title",{key:1},()=>[O(" DEPRECATED SLOT ")]):le(H.$slots,"header",{key:0,close:E(T),titleId:E(y),titleClass:E(c).e("title")},()=>[g("span",{id:E(y),role:"heading","aria-level":t.headerAriaLevel,class:G(E(c).e("title"))},S(t.title),11,hpe)]),t.showClose?(v(),A("button",{key:2,"aria-label":E(u)("el.drawer.close"),class:G(E(c).e("close-btn")),type:"button",onClick:F[0]||(F[0]=(...z)=>E(T)&&E(T)(...z))},[_(E(be),{class:G(E(c).e("close"))},{default:w(()=>[_(E(Fr))]),_:1},8,["class"])],10,fpe)):O("v-if",!0)],2)):O("v-if",!0),E(m)?(v(),A("div",{key:1,id:E(b),class:G([E(c).e("body"),t.bodyClass])},[le(H.$slots,"default")],10,ppe)):O("v-if",!0),H.$slots.footer?(v(),A("div",{key:2,class:G([E(c).e("footer"),t.footerClass])},[le(H.$slots,"footer")],2)):O("v-if",!0),t.resizable?(v(),A("div",{key:3,ref_key:"draggerRef",ref:l,style:Xe({zIndex:E(k)}),class:G(E(c).e("dragger"))},null,6)):O("v-if",!0)],16,dpe)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[Ut,E(p)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}}),gpe=mpe;const Ea=jt(gpe),k0=Ge({trigger:{...vc.trigger,type:he([String,Array])},triggerKeys:{type:he(Array),default:()=>[Ue.enter,Ue.numpadEnter,Ue.space,Ue.down]},virtualTriggering:vc.virtualTriggering,virtualRef:vc.virtualRef,effect:{...Bn.effect,default:"light"},type:{type:he(String)},placement:{type:he(String),default:"bottom"},popperOptions:{type:he(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showArrow:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:he([Number,String]),default:0},maxHeight:{type:he([Number,String]),default:""},popperClass:Bn.popperClass,popperStyle:Bn.popperStyle,disabled:Boolean,role:{type:String,values:AD,default:"menu"},buttonProps:{type:he(Object)},teleported:Bn.teleported,appendTo:Bn.appendTo,persistent:{type:Boolean,default:!0}}),oV=Ge({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:as}}),vpe=Ge({onKeydown:{type:he(Function)}}),Pb=Symbol("elDropdown"),rV="elDropdown";var _pe=ce({inheritAttrs:!1});function ype(t,e,n,i,s,o){return le(t.$slots,"default")}var bpe=hi(_pe,[["render",ype]]),wpe=ce({name:"ElCollectionItem",inheritAttrs:!1});function kpe(t,e,n,i,s,o){return le(t.$slots,"default")}var Cpe=hi(wpe,[["render",kpe]]);const aV="data-el-collection-item",xpe=t=>{const e=`El${t}Collection`,n=`${e}Item`,i=Symbol(e),s=Symbol(n);return{COLLECTION_INJECTION_KEY:i,COLLECTION_ITEM_INJECTION_KEY:s,ElCollection:Object.assign({},bpe,{name:e,setup(){const o=J(),r=new Map;It(i,{itemMap:r,getItems:()=>{const l=E(o);if(!l)return[];const c=Array.from(l.querySelectorAll(`[${aV}]`));return[...r.values()].sort((u,d)=>c.indexOf(u.ref)-c.indexOf(d.ref))},collectionRef:o})}}),ElCollectionItem:Object.assign({},Cpe,{name:n,setup(o,{attrs:r}){const a=J(),l=qe(i,void 0);It(s,{collectionItemRef:a}),Ft(()=>{const c=E(a);c&&l.itemMap.set(c,{ref:c,...r})}),bn(()=>{const c=E(a);l.itemMap.delete(c)})}})}},Spe=Ge({style:{type:he([String,Array,Object])},currentTabId:{type:he(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:he(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:$pe,ElCollectionItem:Ape,COLLECTION_INJECTION_KEY:lV,COLLECTION_ITEM_INJECTION_KEY:Epe}=xpe("RovingFocusGroup"),X4=Symbol("elRovingFocusGroup"),cV=Symbol("elRovingFocusGroupItem"),Mpe={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},Tpe=(t,e)=>{if(e!=="rtl")return t;switch(t){case Ue.right:return Ue.left;case Ue.left:return Ue.right;default:return t}},Ppe=(t,e,n)=>{const i=Tpe(ss(t),n);if(!(e==="vertical"&&[Ue.left,Ue.right].includes(i))&&!(e==="horizontal"&&[Ue.up,Ue.down].includes(i)))return Mpe[i]},Ipe=(t,e)=>t.map((n,i)=>t[(i+e)%t.length]),G$=t=>{const{activeElement:e}=document;for(const n of t)if(n===e||(n.focus(),e!==document.activeElement))return},X$="currentTabIdChange",K$="rovingFocusGroup.entryFocus",Lpe={bubbles:!1,cancelable:!0};var Ope=ce({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:Spe,emits:[X$,"entryFocus"],setup(t,{emit:e}){const n=J((t.currentTabId||t.defaultCurrentTabId)??null),i=J(!1),s=J(!1),o=J(),{getItems:r}=qe(lV,void 0),a=Y(()=>[{outline:"none"},t.style]),l=m=>{e(X$,m)},c=()=>{i.value=!0},u=As(m=>{var y;(y=t.onMousedown)==null||y.call(t,m)},()=>{s.value=!0}),d=As(m=>{var y;(y=t.onFocus)==null||y.call(t,m)},m=>{const y=!E(s),{target:b,currentTarget:k}=m;if(b===k&&y&&!E(i)){const C=new Event(K$,Lpe);if(k==null||k.dispatchEvent(C),!C.defaultPrevented){const $=r().filter(x=>x.focusable);G$([$.find(x=>x.active),$.find(x=>x.id===E(n)),...$].filter(Boolean).map(x=>x.ref))}}s.value=!1}),h=As(m=>{var y;(y=t.onBlur)==null||y.call(t,m)},()=>{i.value=!1}),f=(...m)=>{e("entryFocus",...m)},p=m=>{const y=Ppe(m);if(y){m.preventDefault();let b=r().filter(k=>k.focusable).map(k=>k.ref);switch(y){case"last":b.reverse();break;case"prev":case"next":{y==="prev"&&b.reverse();const k=b.indexOf(m.currentTarget);b=t.loop?Ipe(b,k+1):b.slice(k+1);break}}ot(()=>{G$(b)})}};It(X4,{currentTabbedId:Cd(n),loop:Sn(t,"loop"),tabIndex:Y(()=>E(i)?-1:0),rovingFocusGroupRef:o,rovingFocusGroupRootStyle:a,orientation:Sn(t,"orientation"),dir:Sn(t,"dir"),onItemFocus:l,onItemShiftTab:c,onBlur:h,onFocus:d,onMousedown:u,onKeydown:p}),Te(()=>t.currentTabId,m=>{n.value=m??null}),zn(o,K$,f)}});function Dpe(t,e,n,i,s,o){return le(t.$slots,"default")}var Rpe=hi(Ope,[["render",Dpe]]),Vpe=ce({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:$pe,ElRovingFocusGroupImpl:Rpe}});function Fpe(t,e,n,i,s,o){const r=W("el-roving-focus-group-impl"),a=W("el-focus-group-collection");return v(),D(a,null,{default:w(()=>[_(r,Bh(Wh(t.$attrs)),{default:w(()=>[le(t.$slots,"default")]),_:3},16)]),_:3})}var Npe=hi(Vpe,[["render",Fpe]]),Bpe=ce({components:{ElRovingFocusCollectionItem:Ape},props:{focusable:{type:Boolean,default:!0},active:Boolean},emits:["mousedown","focus","keydown"],setup(t,{emit:e}){const{currentTabbedId:n,onItemFocus:i,onItemShiftTab:s,onKeydown:o}=qe(X4,void 0),r=pr(),a=J(),l=As(h=>{e("mousedown",h)},h=>{t.focusable?i(E(r)):h.preventDefault()}),c=As(h=>{e("focus",h)},()=>{i(E(r))}),u=As(h=>{e("keydown",h)},h=>{const{shiftKey:f,target:p,currentTarget:m}=h;if(ss(h)===Ue.tab&&f){s();return}p===m&&o(h)}),d=Y(()=>n.value===E(r));return It(cV,{rovingFocusGroupItemRef:a,tabIndex:Y(()=>E(d)?0:-1),handleMousedown:l,handleFocus:c,handleKeydown:u}),{id:r,handleKeydown:u,handleFocus:c,handleMousedown:l}}});function zpe(t,e,n,i,s,o){const r=W("el-roving-focus-collection-item");return v(),D(r,{id:t.id,focusable:t.focusable,active:t.active},{default:w(()=>[le(t.$slots,"default")]),_:3},8,["id","focusable","active"])}var Hpe=hi(Bpe,[["render",zpe]]),Upe=Npe;const{ButtonGroup:jpe}=We;var Wpe=ce({name:"ElDropdown",components:{ElButton:We,ElButtonGroup:jpe,ElScrollbar:Ai,ElTooltip:Cs,ElRovingFocusGroup:Upe,ElOnlyChild:PD,ElIcon:be,ArrowDown:tp},props:k0,emits:["visible-change","click","command"],setup(t,{emit:e}){const n=bt(),i=ze("dropdown"),{t:s}=Qt(),o=J(),r=J(),a=J(),l=J(),c=J(null),u=J(null),d=J(!1),h=Y(()=>({maxHeight:ci(t.maxHeight)})),f=Y(()=>[i.m($.value)]),p=Y(()=>Us(t.trigger)),m=pr().value,y=Y(()=>t.id||m);function b(){var H;(H=a.value)==null||H.onClose(void 0,0)}function k(){var H;(H=a.value)==null||H.onClose()}function C(){var H;(H=a.value)==null||H.onOpen()}const $=$i();function x(...H){e("command",...H)}function M(){}function P(){const H=E(l);p.value.includes("hover")&&(H==null||H.focus({preventScroll:!0})),u.value=null}function T(H){u.value=H}function I(){e("visible-change",!0)}function L(H){var F;d.value=(H==null?void 0:H.type)==="keydown",(F=l.value)==null||F.focus()}function R(){e("visible-change",!1)}return It(Pb,{contentRef:l,role:Y(()=>t.role),triggerId:y,isUsingKeyboard:d,onItemEnter:M,onItemLeave:P,handleClose:k}),It(rV,{instance:n,dropdownSize:$,handleClick:b,commandHandler:x,trigger:Sn(t,"trigger"),hideOnClick:Sn(t,"hideOnClick")}),{t:s,ns:i,scrollbar:c,wrapStyle:h,dropdownTriggerKls:f,dropdownSize:$,triggerId:y,currentTabId:u,handleCurrentTabIdChange:T,handlerMainButtonClick:H=>{e("click",H)},handleClose:k,handleOpen:C,handleBeforeShowTooltip:I,handleShowTooltip:L,handleBeforeHideTooltip:R,popperRef:a,contentRef:l,triggeringElementRef:o,referenceElementRef:r}}});function Ype(t,e,n,i,s,o){const r=W("el-roving-focus-group"),a=W("el-scrollbar"),l=W("el-only-child"),c=W("el-tooltip"),u=W("el-button"),d=W("arrow-down"),h=W("el-icon"),f=W("el-button-group");return v(),A("div",{class:G([t.ns.b(),t.ns.is("disabled",t.disabled)])},[_(c,{ref:"popperRef",role:t.role,effect:t.effect,"fallback-placements":["bottom","top"],"popper-options":t.popperOptions,"gpu-acceleration":!1,placement:t.placement,"popper-class":[t.ns.e("popper"),t.popperClass],"popper-style":t.popperStyle,trigger:t.trigger,"trigger-keys":t.triggerKeys,"trigger-target-el":t.contentRef,"show-arrow":t.showArrow,"show-after":t.trigger==="hover"?t.showTimeout:0,"hide-after":t.trigger==="hover"?t.hideTimeout:0,"virtual-ref":t.virtualRef??t.triggeringElementRef,"virtual-triggering":t.virtualTriggering||t.splitButton,disabled:t.disabled,transition:`${t.ns.namespace.value}-zoom-in-top`,teleported:t.teleported,"append-to":t.appendTo,pure:"","focus-on-target":"",persistent:t.persistent,onBeforeShow:t.handleBeforeShowTooltip,onShow:t.handleShowTooltip,onBeforeHide:t.handleBeforeHideTooltip},cs({content:w(()=>[_(a,{ref:"scrollbar","wrap-style":t.wrapStyle,tag:"div","view-class":t.ns.e("list")},{default:w(()=>[_(r,{loop:t.loop,"current-tab-id":t.currentTabId,orientation:"horizontal",onCurrentTabIdChange:t.handleCurrentTabIdChange},{default:w(()=>[le(t.$slots,"dropdown")]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange"])]),_:3},8,["wrap-style","view-class"])]),_:2},[t.splitButton?void 0:{name:"default",fn:w(()=>[_(l,{id:t.triggerId,ref:"triggeringElementRef",role:"button",tabindex:t.tabindex},{default:w(()=>[le(t.$slots,"default")]),_:3},8,["id","tabindex"])]),key:"0"}]),1032,["role","effect","popper-options","placement","popper-class","popper-style","trigger","trigger-keys","trigger-target-el","show-arrow","show-after","hide-after","virtual-ref","virtual-triggering","disabled","transition","teleported","append-to","persistent","onBeforeShow","onShow","onBeforeHide"]),t.splitButton?(v(),D(f,{key:0},{default:w(()=>[_(u,Zt({ref:"referenceElementRef"},t.buttonProps,{size:t.dropdownSize,type:t.type,disabled:t.disabled,tabindex:t.tabindex,onClick:t.handlerMainButtonClick}),{default:w(()=>[le(t.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),_(u,Zt({id:t.triggerId,ref:"triggeringElementRef"},t.buttonProps,{role:"button",size:t.dropdownSize,type:t.type,class:t.ns.e("caret-button"),disabled:t.disabled,tabindex:t.tabindex,"aria-label":t.t("el.dropdown.toggleDropdown")}),{default:w(()=>[_(h,{class:G(t.ns.e("icon"))},{default:w(()=>[_(d)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):O("v-if",!0)],2)}var qpe=hi(Wpe,[["render",Ype]]),Gpe=ce({name:"DropdownItemImpl",components:{ElIcon:be},props:oV,emits:["pointermove","pointerleave","click","clickimpl"],setup(t,{emit:e}){const n=ze("dropdown"),{role:i}=qe(Pb,void 0),{collectionItemRef:s}=qe(Epe,void 0),{rovingFocusGroupItemRef:o,tabIndex:r,handleFocus:a,handleKeydown:l,handleMousedown:c}=qe(cV,void 0),u=G4(s,o),d=Y(()=>i.value==="menu"?"menuitem":i.value==="navigation"?"link":"button"),h=As(f=>{const p=ss(f);if([Ue.enter,Ue.numpadEnter,Ue.space].includes(p))return f.preventDefault(),f.stopImmediatePropagation(),e("clickimpl",f),!0},l);return{ns:n,itemRef:u,dataset:{[aV]:""},role:d,tabIndex:r,handleFocus:a,handleKeydown:h,handleMousedown:c}}});const Xpe=["aria-disabled","tabindex","role"];function Kpe(t,e,n,i,s,o){const r=W("el-icon");return v(),A(ee,null,[t.divided?(v(),A("li",{key:0,role:"separator",class:G(t.ns.bem("menu","item","divided"))},null,2)):O("v-if",!0),g("li",Zt({ref:t.itemRef},{...t.dataset,...t.$attrs},{"aria-disabled":t.disabled,class:[t.ns.be("menu","item"),t.ns.is("disabled",t.disabled)],tabindex:t.tabIndex,role:t.role,onClick:e[0]||(e[0]=a=>t.$emit("clickimpl",a)),onFocus:e[1]||(e[1]=(...a)=>t.handleFocus&&t.handleFocus(...a)),onKeydown:e[2]||(e[2]=Ae((...a)=>t.handleKeydown&&t.handleKeydown(...a),["self"])),onMousedown:e[3]||(e[3]=(...a)=>t.handleMousedown&&t.handleMousedown(...a)),onPointermove:e[4]||(e[4]=a=>t.$emit("pointermove",a)),onPointerleave:e[5]||(e[5]=a=>t.$emit("pointerleave",a))}),[t.icon||t.$slots.icon?(v(),D(r,{key:0},{default:w(()=>[le(t.$slots,"icon",{},()=>[(v(),D(Ct(t.icon)))])]),_:3})):O("v-if",!0),le(t.$slots,"default")],16,Xpe)],64)}var Zpe=hi(Gpe,[["render",Kpe]]);const uV=()=>{const t=qe(rV,{});return{elDropdown:t,_elDropdownSize:Y(()=>t==null?void 0:t.dropdownSize)}};var Jpe=ce({name:"ElDropdownItem",components:{ElRovingFocusItem:Hpe,ElDropdownItemImpl:Zpe},inheritAttrs:!1,props:oV,emits:["pointermove","pointerleave","click"],setup(t,{emit:e,attrs:n}){const{elDropdown:i}=uV(),s=bt(),{onItemEnter:o,onItemLeave:r}=qe(Pb,void 0),a=As(c=>(e("pointermove",c),c.defaultPrevented),H7(c=>{if(t.disabled){r(c);return}const u=c.currentTarget;u===document.activeElement||u.contains(document.activeElement)||(o(c),c.defaultPrevented||u==null||u.focus({preventScroll:!0}))})),l=As(c=>(e("pointerleave",c),c.defaultPrevented),H7(r));return{handleClick:As(c=>{if(!t.disabled)return e("click",c),c.type!=="keydown"&&c.defaultPrevented},c=>{var u,d,h;if(t.disabled){c.stopImmediatePropagation();return}(u=i==null?void 0:i.hideOnClick)!=null&&u.value&&((d=i.handleClick)==null||d.call(i)),(h=i.commandHandler)==null||h.call(i,t.command,s,c)}),handlePointerMove:a,handlePointerLeave:l,propsAndAttrs:Y(()=>({...t,...n}))}}});function Qpe(t,e,n,i,s,o){const r=W("el-dropdown-item-impl"),a=W("el-roving-focus-item");return v(),D(a,{focusable:!t.disabled},{default:w(()=>[_(r,Zt(t.propsAndAttrs,{onPointerleave:t.handlePointerLeave,onPointermove:t.handlePointerMove,onClickimpl:t.handleClick}),cs({default:w(()=>[le(t.$slots,"default")]),_:2},[t.$slots.icon?{name:"icon",fn:w(()=>[le(t.$slots,"icon")]),key:"0"}:void 0]),1040,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])}var dV=hi(Jpe,[["render",Qpe]]),eme=ce({name:"ElDropdownMenu",props:vpe,setup(t){const e=ze("dropdown"),{_elDropdownSize:n}=uV(),i=n.value,{contentRef:s,role:o,triggerId:r,isUsingKeyboard:a,handleClose:l}=qe(Pb,void 0),{rovingFocusGroupRef:c,rovingFocusGroupRootStyle:u,onBlur:d,onFocus:h,onKeydown:f,onMousedown:p}=qe(X4,void 0),{collectionRef:m}=qe(lV,void 0),y=Y(()=>[e.b("menu"),e.bm("menu",i==null?void 0:i.value)]),b=G4(s,c,m),k=As($=>{var x;(x=t.onKeydown)==null||x.call(t,$)},$=>{const{currentTarget:x,target:M}=$,P=ss($);if(x.contains(M),Ue.tab===P)return l();f($)});function C($){a.value&&h($)}return{size:i,rovingFocusGroupRootStyle:u,dropdownKls:y,role:o,triggerId:r,dropdownListWrapperRef:b,handleKeydown:k,onBlur:d,handleFocus:C,onMousedown:p}}});const tme=["role","aria-labelledby"];function nme(t,e,n,i,s,o){return v(),A("ul",{ref:t.dropdownListWrapperRef,class:G(t.dropdownKls),style:Xe(t.rovingFocusGroupRootStyle),tabindex:-1,role:t.role,"aria-labelledby":t.triggerId,onFocusin:e[0]||(e[0]=(...r)=>t.handleFocus&&t.handleFocus(...r)),onFocusout:e[1]||(e[1]=(...r)=>t.onBlur&&t.onBlur(...r)),onKeydown:e[2]||(e[2]=Ae((...r)=>t.handleKeydown&&t.handleKeydown(...r),["self"])),onMousedown:e[3]||(e[3]=Ae((...r)=>t.onMousedown&&t.onMousedown(...r),["self"]))},[le(t.$slots,"default")],46,tme)}var hV=hi(eme,[["render",nme]]);const jr=jt(qpe,{DropdownItem:dV,DropdownMenu:hV}),Wr=Is(dV),Yr=Is(hV),sme=Ge({hideOnClickModal:Boolean,src:{type:String,default:""},fit:{type:String,values:["","contain","cover","fill","none","scale-down"],default:""},loading:{type:String,values:["eager","lazy"]},lazy:Boolean,scrollContainer:{type:he([String,Object])},previewSrcList:{type:he(Array),default:()=>ii([])},previewTeleported:Boolean,zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},scale:{type:Number,default:1},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},showProgress:Boolean,crossorigin:{type:he(String)}}),ime={load:t=>t instanceof Event,error:t=>t instanceof Event,switch:t=>_t(t),close:()=>!0,show:()=>!0},ome=Ge({urlList:{type:he(Array),default:()=>ii([])},zIndex:{type:Number},initialIndex:{type:Number,default:0},infinite:{type:Boolean,default:!0},hideOnClickModal:Boolean,teleported:Boolean,closeOnPressEscape:{type:Boolean,default:!0},zoomRate:{type:Number,default:1.2},scale:{type:Number,default:1},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},showProgress:Boolean,crossorigin:{type:he(String)}}),rme={close:()=>!0,error:t=>t instanceof Event,switch:t=>_t(t),rotate:t=>_t(t)},ame=["src","crossorigin"];var lme=ce({name:"ElImageViewer",__name:"image-viewer",props:ome,emits:rme,setup(t,{expose:e,emit:n}){const i={CONTAIN:{name:"contain",icon:Si(pre)},ORIGINAL:{name:"original",icon:Si(Tre)}},s=t,o=n;let r;const{t:a}=Qt(),l=ze("image-viewer"),{nextZIndex:c}=kb(),u=J(),d=J(),h=Wy(),f=Y(()=>{const{scale:ie,minScale:re,maxScale:ke}=s;return EO(ie,re,ke)}),p=J(!0),m=J(!1),y=J(!1),b=J(s.initialIndex),k=Hn(i.CONTAIN),C=J({scale:f.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),$=J(s.zIndex??c());a4(y,{ns:l});const x=Y(()=>{const{urlList:ie}=s;return ie.length<=1}),M=Y(()=>b.value===0),P=Y(()=>b.value===s.urlList.length-1),T=Y(()=>s.urlList[b.value]),I=Y(()=>[l.e("btn"),l.e("prev"),l.is("disabled",!s.infinite&&M.value)]),L=Y(()=>[l.e("btn"),l.e("next"),l.is("disabled",!s.infinite&&P.value)]),R=Y(()=>{const{scale:ie,deg:re,offsetX:ke,offsetY:je,enableTransition:te}=C.value;let se=ke/ie,ve=je/ie;const $e=re*Math.PI/180,Se=Math.cos($e),Fe=Math.sin($e);se=se*Se+ve*Fe,ve=ve*Se-ke/ie*Fe;const Ye={transform:`scale(${ie}) rotate(${re}deg) translate(${se}px, ${ve}px)`,transition:te?"transform .3s":""};return k.value.name===i.CONTAIN.name&&(Ye.maxWidth=Ye.maxHeight="100%"),Ye}),V=Y(()=>`${b.value+1} / ${s.urlList.length}`);function H(){z(),r==null||r(),y.value=!1,o("close")}function F(){const ie=Av(ke=>{switch(ss(ke)){case Ue.esc:s.closeOnPressEscape&&H();break;case Ue.space:Q();break;case Ue.left:Z();break;case Ue.up:me("zoomIn");break;case Ue.right:ae();break;case Ue.down:me("zoomOut");break}}),re=Av(ke=>{me((ke.deltaY||ke.deltaX)<0?"zoomIn":"zoomOut",{zoomRate:s.zoomRate,enableTransition:!1})});h.run(()=>{zn(document,"keydown",ie),zn(u,"wheel",re)})}function z(){h.stop()}function N(){p.value=!1}function q(ie){m.value=!0,p.value=!1,o("error",ie),ie.target.alt=a("el.image.error")}function K(ie){if(p.value||ie.button!==0||!u.value)return;C.value.enableTransition=!1;const{offsetX:re,offsetY:ke}=C.value,je=ie.pageX,te=ie.pageY,se=Av(Se=>{C.value={...C.value,offsetX:re+Se.pageX-je,offsetY:ke+Se.pageY-te}}),ve=zn(document,"mousemove",se),$e=zn(document,"mouseup",()=>{ve(),$e()});ie.preventDefault()}function X(ie){if(p.value||!u.value||ie.touches.length!==1)return;C.value.enableTransition=!1;const{offsetX:re,offsetY:ke}=C.value,{pageX:je,pageY:te}=ie.touches[0],se=Av(Se=>{const Fe=Se.touches[0];C.value={...C.value,offsetX:re+Fe.pageX-je,offsetY:ke+Fe.pageY-te}}),ve=zn(document,"touchmove",se),$e=zn(document,"touchend",()=>{ve(),$e()});ie.preventDefault()}function U(){C.value={scale:f.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function Q(){if(p.value||m.value)return;const ie=K_(i),re=Object.values(i),ke=k.value.name;k.value=i[ie[(re.findIndex(je=>je.name===ke)+1)%ie.length]],U()}function ne(ie){m.value=!1;const re=s.urlList.length;b.value=(ie+re)%re}function Z(){M.value&&!s.infinite||ne(b.value-1)}function ae(){P.value&&!s.infinite||ne(b.value+1)}function me(ie,re={}){if(p.value||m.value)return;const{minScale:ke,maxScale:je}=s,{zoomRate:te,rotateDeg:se,enableTransition:ve}={zoomRate:s.zoomRate,rotateDeg:90,enableTransition:!0,...re};switch(ie){case"zoomOut":C.value.scale>ke&&(C.value.scale=Number.parseFloat((C.value.scale/te).toFixed(3)));break;case"zoomIn":C.value.scale<je&&(C.value.scale=Number.parseFloat((C.value.scale*te).toFixed(3)));break;case"clockwise":C.value.deg+=se,o("rotate",C.value.deg);break;case"anticlockwise":C.value.deg-=se,o("rotate",C.value.deg);break}C.value.enableTransition=ve}function we(ie){var re;((re=ie.detail)==null?void 0:re.focusReason)==="pointer"&&ie.preventDefault()}function oe(){s.closeOnPressEscape&&H()}function fe(ie){if(ie.ctrlKey){if(ie.deltaY<0)return ie.preventDefault(),!1;if(ie.deltaY>0)return ie.preventDefault(),!1}}return Te(()=>f.value,ie=>{C.value.scale=ie}),Te(T,()=>{ot(()=>{var ie;(ie=d.value)!=null&&ie.complete||(p.value=!0)})}),Te(b,ie=>{U(),o("switch",ie)}),Ft(()=>{y.value=!0,F(),r=zn("wheel",fe,{passive:!1})}),e({setActiveItem:ne}),(ie,re)=>(v(),D(E($b),{to:"body",disabled:!t.teleported},{default:w(()=>[_(ji,{name:"viewer-fade",appear:""},{default:w(()=>[g("div",{ref_key:"wrapper",ref:u,tabindex:-1,class:G(E(l).e("wrapper")),style:Xe({zIndex:$.value})},[_(E(k1),{loop:"",trapped:"","focus-trap-el":u.value,"focus-start-el":"container",onFocusoutPrevented:we,onReleaseRequested:oe},{default:w(()=>[g("div",{class:G(E(l).e("mask")),onClick:re[0]||(re[0]=Ae(ke=>t.hideOnClickModal&&H(),["self"]))},null,2),O(" CLOSE "),g("span",{class:G([E(l).e("btn"),E(l).e("close")]),onClick:H},[_(E(be),null,{default:w(()=>[_(E(Fr))]),_:1})],2),O(" ARROW "),x.value?O("v-if",!0):(v(),A(ee,{key:0},[g("span",{class:G(I.value),onClick:Z},[_(E(be),null,{default:w(()=>[_(E(Tf))]),_:1})],2),g("span",{class:G(L.value),onClick:ae},[_(E(be),null,{default:w(()=>[_(E(ma))]),_:1})],2)],64)),ie.$slots.progress||t.showProgress?(v(),A("div",{key:1,class:G([E(l).e("btn"),E(l).e("progress")])},[le(ie.$slots,"progress",{activeIndex:b.value,total:t.urlList.length},()=>[B(S(V.value),1)])],2)):O("v-if",!0),O(" ACTIONS "),g("div",{class:G([E(l).e("btn"),E(l).e("actions")])},[g("div",{class:G(E(l).e("actions__inner"))},[le(ie.$slots,"toolbar",{actions:me,prev:Z,next:ae,reset:Q,activeIndex:b.value,setActiveItem:ne},()=>[_(E(be),{onClick:re[1]||(re[1]=ke=>me("zoomOut"))},{default:w(()=>[_(E(Vre))]),_:1}),_(E(be),{onClick:re[2]||(re[2]=ke=>me("zoomIn"))},{default:w(()=>[_(E(SD))]),_:1}),g("i",{class:G(E(l).e("actions__divider"))},null,2),_(E(be),{onClick:Q},{default:w(()=>[(v(),D(Ct(k.value.icon)))]),_:1}),g("i",{class:G(E(l).e("actions__divider"))},null,2),_(E(be),{onClick:re[3]||(re[3]=ke=>me("anticlockwise"))},{default:w(()=>[_(E($re))]),_:1}),_(E(be),{onClick:re[4]||(re[4]=ke=>me("clockwise"))},{default:w(()=>[_(E(Ere))]),_:1})])],2)],2),O(" CANVAS "),g("div",{class:G(E(l).e("canvas"))},[m.value&&ie.$slots["viewer-error"]?le(ie.$slots,"viewer-error",{key:0,activeIndex:b.value,src:T.value}):(v(),A("img",{ref_key:"imgRef",ref:d,key:T.value,src:T.value,style:Xe(R.value),class:G(E(l).e("img")),crossorigin:t.crossorigin,onLoad:N,onError:q,onMousedown:K,onTouchstart:X},null,46,ame))],2),le(ie.$slots,"default")]),_:3},8,["focus-trap-el"])],6)]),_:3})]),_:3},8,["disabled"]))}}),cme=lme;const fV=jt(cme),ume=["src","loading","crossorigin"],dme={key:0};var hme=ce({name:"ElImage",inheritAttrs:!1,__name:"image",props:sme,emits:ime,setup(t,{expose:e,emit:n}){const i=t,s=n,{t:o}=Qt(),r=ze("image"),a=$d(),l=Y(()=>kf(Object.entries(a).filter(([q])=>/^(data-|on[A-Z])/i.test(q)||["id","style"].includes(q)))),c=yb({excludeListeners:!0,excludeKeys:Y(()=>Object.keys(l.value))}),u=J(),d=J(!1),h=J(!0),f=J(!1),p=J(),m=J(),y=Xt&&"loading"in HTMLImageElement.prototype;let b;const k=Y(()=>[r.e("inner"),$.value&&r.e("preview"),h.value&&r.is("loading")]),C=Y(()=>{const{fit:q}=i;return Xt&&q?{objectFit:q}:{}}),$=Y(()=>{const{previewSrcList:q}=i;return Ee(q)&&q.length>0}),x=Y(()=>{const{previewSrcList:q,initialIndex:K}=i;let X=K;return K>q.length-1&&(X=0),X}),M=Y(()=>i.loading==="eager"?!1:!y&&i.loading==="lazy"||i.lazy),P=()=>{Xt&&(h.value=!0,d.value=!1,u.value=i.src)};function T(q){h.value=!1,d.value=!1,s("load",q)}function I(q){h.value=!1,d.value=!0,s("error",q)}function L(q){q&&(P(),H())}const R=wse(L,200,!0);async function V(){if(!Xt)return;await ot();const{scrollContainer:q}=i;if($o(q))m.value=q;else if(Ke(q)&&q!=="")m.value=document.querySelector(q)??void 0;else if(p.value){const X=Use(p.value);m.value=ase(X)?void 0:X}const{stop:K}=Ese(p,([X])=>{R(X.isIntersecting)},{root:m});b=K}function H(){!Xt||!R||(b==null||b(),m.value=void 0,b=void 0)}function F(){$.value&&(f.value=!0,s("show"))}function z(){f.value=!1,s("close")}function N(q){s("switch",q)}return Te(()=>i.src,()=>{M.value?(h.value=!0,d.value=!1,H(),V()):P()}),Ft(()=>{M.value?V():P()}),e({showPreview:F}),(q,K)=>(v(),A("div",Zt({ref_key:"container",ref:p},l.value,{class:[E(r).b(),q.$attrs.class]}),[d.value?le(q.$slots,"error",{key:0},()=>[g("div",{class:G(E(r).e("error"))},S(E(o)("el.image.error")),3)]):(v(),A(ee,{key:1},[u.value!==void 0?(v(),A("img",Zt({key:0},E(c),{src:u.value,loading:t.loading,style:C.value,class:k.value,crossorigin:t.crossorigin,onClick:F,onLoad:T,onError:I}),null,16,ume)):O("v-if",!0),h.value?(v(),A("div",{key:1,class:G(E(r).e("wrapper"))},[le(q.$slots,"placeholder",{},()=>[g("div",{class:G(E(r).e("placeholder"))},null,2)])],2)):O("v-if",!0)],64)),$.value?(v(),A(ee,{key:2},[f.value?(v(),D(E(fV),{key:0,"z-index":t.zIndex,"initial-index":x.value,infinite:t.infinite,"zoom-rate":t.zoomRate,"min-scale":t.minScale,"max-scale":t.maxScale,"show-progress":t.showProgress,"url-list":t.previewSrcList,scale:t.scale,crossorigin:t.crossorigin,"hide-on-click-modal":t.hideOnClickModal,teleported:t.previewTeleported,"close-on-press-escape":t.closeOnPressEscape,onClose:z,onSwitch:N},cs({toolbar:w(X=>[le(q.$slots,"toolbar",Bh(Wh(X)))]),default:w(()=>[q.$slots.viewer?(v(),A("div",dme,[le(q.$slots,"viewer")])):O("v-if",!0)]),_:2},[q.$slots.progress?{name:"progress",fn:w(X=>[le(q.$slots,"progress",Bh(Wh(X)))]),key:"0"}:void 0,q.$slots["viewer-error"]?{name:"viewer-error",fn:w(X=>[le(q.$slots,"viewer-error",Bh(Wh(X)))]),key:"1"}:void 0]),1032,["z-index","initial-index","infinite","zoom-rate","min-scale","max-scale","show-progress","url-list","scale","crossorigin","hide-on-click-modal","teleported","close-on-press-escape"])):O("v-if",!0)],64)):O("v-if",!0)],16))}}),fme=hme;const Fo=jt(fme),pme=Ge({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.MAX_SAFE_INTEGER},min:{type:Number,default:Number.MIN_SAFE_INTEGER},modelValue:{type:[Number,null]},readonly:Boolean,disabled:{type:Boolean,default:void 0},size:Wi,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:he([String,Number,null]),validator:t=>t===null||_t(t)||["min","max"].includes(t),default:null},name:String,placeholder:String,precision:{type:Number,validator:t=>t>=0&&t===Number.parseInt(`${t}`,10)},validateEvent:{type:Boolean,default:!0},...vr(["ariaLabel"]),inputmode:{type:he(String),default:void 0},align:{type:he(String),default:"center"},disabledScientific:Boolean}),mme={[un]:(t,e)=>e!==t,blur:t=>t instanceof FocusEvent,focus:t=>t instanceof FocusEvent,[Po]:t=>_t(t)||ai(t),[Mt]:t=>_t(t)||ai(t)},gme=["aria-label"],vme=["aria-label"];var _me=ce({name:"ElInputNumber",__name:"input-number",props:pme,emits:mme,setup(t,{expose:e,emit:n}){const i=t,s=n,{t:o}=Qt(),r=ze("input-number"),a=J(),l=In({currentValue:i.modelValue,userInput:null}),{formItem:c}=ho(),u=Y(()=>_t(i.modelValue)&&i.modelValue<=i.min),d=Y(()=>_t(i.modelValue)&&i.modelValue>=i.max),h=Y(()=>{const q=k(i.step);return tn(i.precision)?Math.max(k(i.modelValue),q):(q>i.precision&&Pt("InputNumber","precision should not be less than the decimal places of step"),i.precision)}),f=Y(()=>i.controls&&i.controlsPosition==="right"),p=$i(),m=ys(),y=Y(()=>{if(l.userInput!==null)return l.userInput;let q=l.currentValue;if(ai(q))return"";if(_t(q)){if(Number.isNaN(q))return"";tn(i.precision)||(q=q.toFixed(i.precision))}return q}),b=(q,K)=>{if(tn(K)&&(K=h.value),K===0)return Math.round(q);let X=String(q);const U=X.indexOf(".");if(U===-1||!X.replace(".","").split("")[U+K])return q;const Q=X.length;return X.charAt(Q-1)==="5"&&(X=`${X.slice(0,Math.max(0,Q-1))}6`),Number.parseFloat(Number(X).toFixed(K))},k=q=>{if(ai(q))return 0;const K=q.toString(),X=K.indexOf(".");let U=0;return X!==-1&&(U=K.length-X-1),U},C=(q,K=1)=>_t(q)?q>=Number.MAX_SAFE_INTEGER&&K===1?(Pt("InputNumber","The value has reached the maximum safe integer limit."),q):q<=Number.MIN_SAFE_INTEGER&&K===-1?(Pt("InputNumber","The value has reached the minimum safe integer limit."),q):b(q+i.step*K):l.currentValue,$=q=>{const K=ss(q),X=zO(q);if(i.disabledScientific&&["e","E"].includes(X)){q.preventDefault();return}switch(K){case Ue.up:q.preventDefault(),x();break;case Ue.down:q.preventDefault(),M();break}},x=()=>{i.readonly||m.value||d.value||(T(C(Number(y.value)||0)),s(Po,l.currentValue),z())},M=()=>{i.readonly||m.value||u.value||(T(C(Number(y.value)||0,-1)),s(Po,l.currentValue),z())},P=(q,K)=>{const{max:X,min:U,step:Q,precision:ne,stepStrictly:Z,valueOnClear:ae}=i;X<U&&uo("InputNumber","min should not be greater than max.");let me=Number(q);if(ai(q)||Number.isNaN(me))return null;if(q===""){if(ae===null)return null;me=Ke(ae)?{min:U,max:X}[ae]:ae}return Z&&(me=b(Math.round(b(me/Q))*Q,ne),me!==q&&K&&s(Mt,me)),tn(ne)||(me=b(me,ne)),(me>X||me<U)&&(me=me>X?X:U,K&&s(Mt,me)),me},T=(q,K=!0)=>{var Q;const X=l.currentValue,U=P(q);if(!K){s(Mt,U);return}l.userInput=null,!(X===U&&q)&&(s(Mt,U),X!==U&&s(un,U,X),i.validateEvent&&((Q=c==null?void 0:c.validate)==null||Q.call(c,"change").catch(ne=>Pt(ne))),l.currentValue=U)},I=q=>{l.userInput=q;const K=q===""?null:Number(q);s(Po,K),T(K,!1)},L=q=>{const K=q!==""?Number(q):"";(_t(K)&&!Number.isNaN(K)||q==="")&&T(K),z(),l.userInput=null},R=()=>{var q,K;(K=(q=a.value)==null?void 0:q.focus)==null||K.call(q)},V=()=>{var q,K;(K=(q=a.value)==null?void 0:q.blur)==null||K.call(q)},H=q=>{s("focus",q)},F=q=>{var K,X;l.userInput=null,l.currentValue===null&&((K=a.value)!=null&&K.input)&&(a.value.input.value=""),s("blur",q),i.validateEvent&&((X=c==null?void 0:c.validate)==null||X.call(c,"blur").catch(U=>Pt(U)))},z=()=>{l.currentValue!==i.modelValue&&(l.currentValue=i.modelValue)},N=q=>{document.activeElement===q.target&&q.preventDefault()};return Te(()=>i.modelValue,(q,K)=>{const X=P(q,!0);l.userInput===null&&X!==K&&(l.currentValue=X)},{immediate:!0}),Te(()=>i.precision,()=>{l.currentValue=P(i.modelValue)}),Ft(()=>{var Q;const{min:q,max:K,modelValue:X}=i,U=(Q=a.value)==null?void 0:Q.input;if(U.setAttribute("role","spinbutton"),Number.isFinite(K)?U.setAttribute("aria-valuemax",String(K)):U.removeAttribute("aria-valuemax"),Number.isFinite(q)?U.setAttribute("aria-valuemin",String(q)):U.removeAttribute("aria-valuemin"),U.setAttribute("aria-valuenow",l.currentValue||l.currentValue===0?String(l.currentValue):""),U.setAttribute("aria-disabled",String(m.value)),!_t(X)&&X!=null){let ne=Number(X);Number.isNaN(ne)&&(ne=null),s(Mt,ne)}U.addEventListener("wheel",N,{passive:!1})}),ul(()=>{var q,K;(K=(q=a.value)==null?void 0:q.input)==null||K.setAttribute("aria-valuenow",`${l.currentValue??""}`)}),e({focus:R,blur:V}),(q,K)=>(v(),A("div",{class:G([E(r).b(),E(r).m(E(p)),E(r).is("disabled",E(m)),E(r).is("without-controls",!t.controls),E(r).is("controls-right",f.value),E(r).is(t.align,!!t.align)]),onDragstart:K[0]||(K[0]=Ae(()=>{},["prevent"]))},[t.controls?De((v(),A("span",{key:0,role:"button","aria-label":E(o)("el.inputNumber.decrease"),class:G([E(r).e("decrease"),E(r).is("disabled",u.value)]),onKeydown:ut(M,["enter"])},[le(q.$slots,"decrease-icon",{},()=>[_(E(be),null,{default:w(()=>[f.value?(v(),D(E(tp),{key:0})):(v(),D(E(bre),{key:1}))]),_:1})])],42,gme)),[[E(ny),M]]):O("v-if",!0),t.controls?De((v(),A("span",{key:1,role:"button","aria-label":E(o)("el.inputNumber.increase"),class:G([E(r).e("increase"),E(r).is("disabled",d.value)]),onKeydown:ut(x,["enter"])},[le(q.$slots,"increase-icon",{},()=>[_(E(be),null,{default:w(()=>[f.value?(v(),D(E(x4),{key:0})):(v(),D(E(CD),{key:1}))]),_:1})])],42,vme)),[[E(ny),x]]):O("v-if",!0),_(E(ft),{id:t.id,ref_key:"input",ref:a,type:"number",step:t.step,"model-value":y.value,placeholder:t.placeholder,readonly:t.readonly,disabled:E(m),size:E(p),max:t.max,min:t.min,name:t.name,"aria-label":t.ariaLabel,"validate-event":!1,inputmode:t.inputmode,onKeydown:$,onBlur:F,onFocus:H,onInput:I,onChange:L},cs({_:2},[q.$slots.prefix?{name:"prefix",fn:w(()=>[le(q.$slots,"prefix")]),key:"0"}:void 0,q.$slots.suffix?{name:"suffix",fn:w(()=>[le(q.$slots,"suffix")]),key:"1"}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode"])],34))}}),yme=_me;const Ib=jt(yme),bme=Ge({modelValue:{type:he(Array)},max:Number,tagType:{...Rg.type,default:"info"},tagEffect:Rg.effect,effect:{type:he(String),default:"light"},trigger:{type:he(String),default:Ue.enter},draggable:Boolean,delimiter:{type:[String,RegExp],default:""},size:Wi,clearable:Boolean,clearIcon:{type:as,default:Bc},disabled:{type:Boolean,default:void 0},validateEvent:{type:Boolean,default:!0},readonly:Boolean,autofocus:Boolean,id:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},placeholder:String,autocomplete:{type:he(String),default:"off"},saveOnBlur:{type:Boolean,default:!0},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},ariaLabel:String}),wme={[Mt]:t=>Ee(t)||tn(t),[un]:t=>Ee(t)||tn(t),[Po]:t=>Ke(t),"add-tag":t=>Ke(t)||Ee(t),"remove-tag":(t,e)=>Ke(t)&&_t(e),"drag-tag":(t,e,n)=>_t(t)&&_t(e)&&Ke(n),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0};function kme({wrapperRef:t,handleDragged:e,afterDragged:n}){const i=ze("input-tag"),s=Hn(),o=J(!1);let r,a,l,c;function u(p){return`.${i.e("inner")} .${i.namespace.value}-tag:nth-child(${p+1})`}function d(p,m){r=m,a=t.value.querySelector(u(m)),a&&(a.style.opacity="0.5"),p.dataTransfer.effectAllowed="move"}function h(p,m){if(l=m,p.preventDefault(),p.dataTransfer.dropEffect="move",tn(r)||r===m){o.value=!1;return}const y=t.value.querySelector(u(m)).getBoundingClientRect(),b=r+1!==m,k=r-1!==m,C=p.clientX-y.left,$=b?k?.5:1:-1,x=k?b?.5:0:1;C<=y.width*$?c="before":C>y.width*x?c="after":c=void 0;const M=t.value.querySelector(`.${i.e("inner")}`),P=M.getBoundingClientRect(),T=Number.parseFloat(Wa(M,"gap"))/2,I=y.top-P.top;let L=-9999;if(c==="before")L=Math.max(y.left-P.left-T,Math.floor(-T/2));else if(c==="after"){const R=y.right-P.left;L=R+(P.width===R?Math.floor(T/2):T)}VO(s.value,{top:`${I}px`,left:`${L}px`}),o.value=!!c}function f(p){p.preventDefault(),a&&(a.style.opacity=""),c&&!tn(r)&&!tn(l)&&r!==l&&e(r,l,c),o.value=!1,r=void 0,a=null,l=void 0,c=void 0,n==null||n()}return{dropIndicatorRef:s,showDropIndicator:o,handleDragStart:d,handleDragOver:h,handleDragEnd:f}}function Cme(){const t=J(!1);return{hovering:t,handleMouseEnter:()=>{t.value=!0},handleMouseLeave:()=>{t.value=!1}}}function xme({props:t,emit:e,formItem:n}){const i=ys(),s=$i(),o=Hn(),r=J(),a=J(),l=Y(()=>["small"].includes(s.value)?"small":"default"),c=Y(()=>{var N;return(N=t.modelValue)!=null&&N.length?void 0:t.placeholder}),u=Y(()=>!(t.readonly||i.value)),d=Y(()=>{var N;return tn(t.max)?!1:(((N=t.modelValue)==null?void 0:N.length)??0)>=t.max}),h=Y(()=>{var N;return t.collapseTags?(N=t.modelValue)==null?void 0:N.slice(0,t.maxCollapseTags):t.modelValue}),f=Y(()=>{var N;return t.collapseTags?(N=t.modelValue)==null?void 0:N.slice(t.maxCollapseTags):[]}),p=N=>{const q=[...t.modelValue??[],...Us(N)];e(Mt,q),e(un,q),e("add-tag",N),r.value=void 0},m=N=>{var X;const q=N.split(t.delimiter),K=q.length>1?q.map(U=>U.trim()).filter(Boolean):[];if(t.max){const U=t.max-(((X=t.modelValue)==null?void 0:X.length)??0);K.splice(U)}return K.length===1?K[0]:K},y=N=>{var Z;const q=(Z=N.clipboardData)==null?void 0:Z.getData("text");if(t.readonly||d.value||!t.delimiter||!q)return;const{selectionStart:K=0,selectionEnd:X=0,value:U}=N.target,Q=U.slice(0,K)+q+U.slice(X),ne=m(Q);ne.length&&(p(ne),e(Po,Q),N.preventDefault())},b=N=>{if(d.value){r.value=void 0;return}if(!V.value){if(t.delimiter&&r.value){const q=m(r.value);q.length&&p(q)}e(Po,N.target.value)}},k=N=>{var q;if(!V.value)switch(ss(N)){case t.trigger:N.preventDefault(),N.stopPropagation(),$();break;case Ue.numpadEnter:t.trigger===Ue.enter&&(N.preventDefault(),N.stopPropagation(),$());break;case Ue.backspace:!r.value&&((q=t.modelValue)!=null&&q.length)&&(N.preventDefault(),N.stopPropagation(),x(t.modelValue.length-1));break}},C=N=>{if(!(V.value||!DO()))switch(ss(N)){case Ue.space:t.trigger===Ue.space&&(N.preventDefault(),N.stopPropagation(),$());break}},$=()=>{var q;const N=(q=r.value)==null?void 0:q.trim();!N||d.value||p(N)},x=N=>{const q=(t.modelValue??[]).slice(),[K]=q.splice(N,1);e(Mt,q),e(un,q),e("remove-tag",K,N)},M=()=>{r.value=void 0,e(Mt,void 0),e(un,void 0),e("clear")},P=(N,q,K)=>{const X=(t.modelValue??[]).slice(),[U]=X.splice(N,1),Q=q>N&&K==="before"?-1:q<N&&K==="after"?1:0;X.splice(q+Q,0,U),e(Mt,X),e(un,X),e("drag-tag",N,q+Q,U)},T=()=>{var N;(N=o.value)==null||N.focus()},I=()=>{var N;(N=o.value)==null||N.blur()},{wrapperRef:L,isFocused:R}=ep(o,{disabled:i,beforeBlur(N){var q;return(q=a.value)==null?void 0:q.isFocusInsideContent(N)},afterBlur(){var N;t.saveOnBlur?$():r.value=void 0,t.validateEvent&&((N=n==null?void 0:n.validate)==null||N.call(n,"blur").catch(q=>Pt(q)))}}),{isComposing:V,handleCompositionStart:H,handleCompositionUpdate:F,handleCompositionEnd:z}=k4({afterComposition:b});return Te(()=>t.modelValue,()=>{var N;t.validateEvent&&((N=n==null?void 0:n.validate)==null||N.call(n,un).catch(q=>Pt(q)))}),{inputRef:o,wrapperRef:L,tagTooltipRef:a,isFocused:R,isComposing:V,inputValue:r,size:s,tagSize:l,placeholder:c,closable:u,disabled:i,inputLimit:d,showTagList:h,collapseTagList:f,handleDragged:P,handlePaste:y,handleInput:b,handleKeydown:k,handleKeyup:C,handleAddTag:$,handleRemoveTag:x,handleClear:M,handleCompositionStart:H,handleCompositionUpdate:F,handleCompositionEnd:z,focus:T,blur:I}}function Sme({props:t,isFocused:e,hovering:n,disabled:i,inputValue:s,size:o,validateState:r,validateIcon:a,needStatusIcon:l}){const c=$d(),u=di(),d=ze("input-tag"),h=ze("input"),f=J(),p=J(),m=Y(()=>[d.b(),d.is("focused",e.value),d.is("hovering",n.value),d.is("disabled",i.value),d.m(o.value),d.e("wrapper"),c.class]),y=Y(()=>[c.style]),b=Y(()=>{var I,L;return[d.e("inner"),d.is("draggable",t.draggable),d.is("left-space",!((I=t.modelValue)!=null&&I.length)&&!u.prefix),d.is("right-space",!((L=t.modelValue)!=null&&L.length)&&!C.value)]}),k=Y(()=>{var I;return t.clearable&&!i.value&&!t.readonly&&(((I=t.modelValue)==null?void 0:I.length)||s.value)&&(e.value||n.value)}),C=Y(()=>u.suffix||k.value||r.value&&a.value&&l.value),$=In({innerWidth:0,collapseItemWidth:0}),x=()=>{if(!p.value)return 0;const I=window.getComputedStyle(p.value);return Number.parseFloat(I.gap||"6px")},M=()=>{$.innerWidth=Number.parseFloat(window.getComputedStyle(p.value).width)},P=()=>{$.collapseItemWidth=f.value.getBoundingClientRect().width},T=Y(()=>{if(!t.collapseTags)return{};const I=x(),L=I+Vx,R=f.value&&t.maxCollapseTags===1?$.innerWidth-$.collapseItemWidth-I-L:$.innerWidth-L;return{maxWidth:`${Math.max(R,0)}px`}});return Es(p,M),Es(f,P),{ns:d,nsInput:h,containerKls:m,containerStyle:y,innerKls:b,showClear:k,showSuffix:C,tagStyle:T,collapseItemRef:f,innerRef:p}}const $me=["id","minlength","maxlength","disabled","readonly","autocomplete","tabindex","placeholder","autofocus","ariaLabel"],Ame=["textContent"];var Eme=ce({name:"ElInputTag",inheritAttrs:!1,__name:"input-tag",props:bme,emits:wme,setup(t,{expose:e,emit:n}){const i=t,s=n,o=yb(),r=di(),{form:a,formItem:l}=ho(),{inputId:c}=gl(i,{formItemContext:l}),u=Y(()=>(a==null?void 0:a.statusIcon)??!1),d=Y(()=>(l==null?void 0:l.validateState)||""),h=Y(()=>d.value&&A4[d.value]),{inputRef:f,wrapperRef:p,tagTooltipRef:m,isFocused:y,inputValue:b,size:k,tagSize:C,placeholder:$,closable:x,disabled:M,showTagList:P,collapseTagList:T,handleDragged:I,handlePaste:L,handleInput:R,handleKeydown:V,handleKeyup:H,handleRemoveTag:F,handleClear:z,handleCompositionStart:N,handleCompositionUpdate:q,handleCompositionEnd:K,focus:X,blur:U}=xme({props:i,emit:s,formItem:l}),{hovering:Q,handleMouseEnter:ne,handleMouseLeave:Z}=Cme(),{calculatorRef:ae,inputStyle:me}=LO(),{dropIndicatorRef:we,showDropIndicator:oe,handleDragStart:fe,handleDragOver:ie,handleDragEnd:re}=kme({wrapperRef:p,handleDragged:I,afterDragged:X}),{ns:ke,nsInput:je,containerKls:te,containerStyle:se,innerKls:ve,showClear:$e,showSuffix:Se,tagStyle:Fe,collapseItemRef:Ye,innerRef:Re}=Sme({props:i,hovering:Q,isFocused:y,inputValue:b,disabled:M,size:k,validateState:d,validateIcon:h,needStatusIcon:u});return e({focus:X,blur:U}),(He,Me)=>(v(),A("div",{ref_key:"wrapperRef",ref:p,class:G(E(te)),style:Xe(E(se)),onMouseenter:Me[9]||(Me[9]=(...Ne)=>E(ne)&&E(ne)(...Ne)),onMouseleave:Me[10]||(Me[10]=(...Ne)=>E(Z)&&E(Z)(...Ne))},[E(r).prefix?(v(),A("div",{key:0,class:G(E(ke).e("prefix"))},[le(He.$slots,"prefix")],2)):O("v-if",!0),g("div",{ref_key:"innerRef",ref:Re,class:G(E(ve))},[(v(!0),A(ee,null,Ce(E(P),(Ne,st)=>(v(),D(E(Ci),{key:st,size:E(C),closable:E(x),type:t.tagType,effect:t.tagEffect,draggable:E(x)&&t.draggable,style:Xe(E(Fe)),"disable-transitions":"",onClose:it=>E(F)(st),onDragstart:it=>E(fe)(it,st),onDragover:it=>E(ie)(it,st),onDragend:E(re),onDrop:Me[0]||(Me[0]=Ae(()=>{},["stop"]))},{default:w(()=>[le(He.$slots,"tag",{value:Ne,index:st},()=>[B(S(Ne),1)])]),_:2},1032,["size","closable","type","effect","draggable","style","onClose","onDragstart","onDragover","onDragend"]))),128)),t.collapseTags&&t.modelValue&&t.modelValue.length>t.maxCollapseTags?(v(),D(E(Cs),{key:0,ref_key:"tagTooltipRef",ref:m,disabled:!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom"},{default:w(()=>[g("div",{ref_key:"collapseItemRef",ref:Ye,class:G(E(ke).e("collapse-tag"))},[_(E(Ci),{closable:!1,size:E(C),type:t.tagType,effect:t.tagEffect,"disable-transitions":""},{default:w(()=>[B(" + "+S(t.modelValue.length-t.maxCollapseTags),1)]),_:1},8,["size","type","effect"])],2)]),content:w(()=>[g("div",{class:G(E(ke).e("input-tag-list"))},[(v(!0),A(ee,null,Ce(E(T),(Ne,st)=>(v(),D(E(Ci),{key:st,size:E(C),closable:E(x),type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:it=>E(F)(st+t.maxCollapseTags)},{default:w(()=>[le(He.$slots,"tag",{value:Ne,index:st+t.maxCollapseTags},()=>[B(S(Ne),1)])]),_:2},1032,["size","closable","type","effect","onClose"]))),128))],2)]),_:3},8,["disabled","effect"])):O("v-if",!0),g("div",{class:G(E(ke).e("input-wrapper"))},[De(g("input",Zt({id:E(c),ref_key:"inputRef",ref:f,"onUpdate:modelValue":Me[1]||(Me[1]=Ne=>gn(b)?b.value=Ne:null)},E(o),{type:"text",minlength:t.minlength,maxlength:t.maxlength,disabled:E(M),readonly:t.readonly,autocomplete:t.autocomplete,tabindex:t.tabindex,placeholder:E($),autofocus:t.autofocus,ariaLabel:t.ariaLabel,class:E(ke).e("input"),style:E(me),onCompositionstart:Me[2]||(Me[2]=(...Ne)=>E(N)&&E(N)(...Ne)),onCompositionupdate:Me[3]||(Me[3]=(...Ne)=>E(q)&&E(q)(...Ne)),onCompositionend:Me[4]||(Me[4]=(...Ne)=>E(K)&&E(K)(...Ne)),onPaste:Me[5]||(Me[5]=(...Ne)=>E(L)&&E(L)(...Ne)),onInput:Me[6]||(Me[6]=(...Ne)=>E(R)&&E(R)(...Ne)),onKeydown:Me[7]||(Me[7]=(...Ne)=>E(V)&&E(V)(...Ne)),onKeyup:Me[8]||(Me[8]=(...Ne)=>E(H)&&E(H)(...Ne))}),null,16,$me),[[rd,E(b)]]),g("span",{ref_key:"calculatorRef",ref:ae,"aria-hidden":"true",class:G(E(ke).e("input-calculator")),textContent:S(E(b))},null,10,Ame)],2),De(g("div",{ref_key:"dropIndicatorRef",ref:we,class:G(E(ke).e("drop-indicator"))},null,2),[[Ut,E(oe)]])],2),E(Se)?(v(),A("div",{key:1,class:G(E(ke).e("suffix"))},[le(He.$slots,"suffix"),E($e)?(v(),D(E(be),{key:0,class:G([E(ke).e("icon"),E(ke).e("clear")]),onMousedown:Ae(E(Tt),["prevent"]),onClick:E(z)},{default:w(()=>[(v(),D(Ct(t.clearIcon)))]),_:1},8,["class","onMousedown","onClick"])):O("v-if",!0),d.value&&h.value&&u.value?(v(),D(E(be),{key:1,class:G([E(je).e("icon"),E(je).e("validateIcon"),E(je).is("loading",d.value==="validating")])},{default:w(()=>[(v(),D(Ct(h.value)))]),_:1},8,["class"])):O("v-if",!0)],2)):O("v-if",!0)],38))}}),Mme=Eme;const Tme=jt(Mme),Pme=Ge({type:{type:String,values:["primary","success","warning","info","danger","default"],default:void 0},underline:{type:[Boolean,String],values:[!0,!1,"always","never","hover"],default:void 0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:as}}),Ime={click:t=>t instanceof MouseEvent},Lme=["href","target"];var Ome=ce({name:"ElLink",__name:"link",props:Pme,emits:Ime,setup(t,{emit:e}){const n=t,i=e,s=zc("link");el({scope:"el-link",from:"The underline option (boolean)",replacement:"'always' | 'hover' | 'never'",version:"3.0.0",ref:"https://element-plus.org/en-US/component/link.html#underline"},Y(()=>Xn(n.underline)));const o=ze("link"),r=Y(()=>{var c;return[o.b(),o.m(n.type??((c=s.value)==null?void 0:c.type)??"default"),o.is("disabled",n.disabled),o.is("underline",a.value==="always"),o.is("hover-underline",a.value==="hover"&&!n.disabled)]}),a=Y(()=>{var c;return Xn(n.underline)?n.underline?"hover":"never":n.underline??((c=s.value)==null?void 0:c.underline)??"hover"});function l(c){n.disabled||i("click",c)}return(c,u)=>(v(),A("a",{class:G(r.value),href:t.disabled||!t.href?void 0:t.href,target:t.disabled||!t.href?void 0:t.target,onClick:l},[t.icon?(v(),D(E(be),{key:0},{default:w(()=>[(v(),D(Ct(t.icon)))]),_:1})):O("v-if",!0),c.$slots.default?(v(),A("span",{key:1,class:G(E(o).e("inner"))},[le(c.$slots,"default")],2)):O("v-if",!0),c.$slots.icon?le(c.$slots,"icon",{key:2}):O("v-if",!0)],10,Lme))}}),Dme=Ome;const K4=jt(Dme),pV=Symbol("elPaginationKey"),Rme=Ge({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:as}}),Vme={click:t=>t instanceof MouseEvent},Fme=["disabled","aria-label","aria-disabled"],Nme={key:0};var Bme=ce({name:"ElPaginationPrev",__name:"prev",props:Rme,emits:Vme,setup(t){const e=t,{t:n}=Qt(),i=Y(()=>e.disabled||e.currentPage<=1);return(s,o)=>(v(),A("button",{type:"button",class:"btn-prev",disabled:i.value,"aria-label":s.prevText||E(n)("el.pagination.prev"),"aria-disabled":i.value,onClick:o[0]||(o[0]=r=>s.$emit("click",r))},[s.prevText?(v(),A("span",Nme,S(s.prevText),1)):(v(),D(E(be),{key:1},{default:w(()=>[(v(),D(Ct(s.prevIcon)))]),_:1}))],8,Fme))}}),zme=Bme;const Hme=Ge({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:as}}),Ume=["disabled","aria-label","aria-disabled"],jme={key:0};var Wme=ce({name:"ElPaginationNext",__name:"next",props:Hme,emits:["click"],setup(t){const e=t,{t:n}=Qt(),i=Y(()=>e.disabled||e.currentPage===e.pageCount||e.pageCount===0);return(s,o)=>(v(),A("button",{type:"button",class:"btn-next",disabled:i.value,"aria-label":s.nextText||E(n)("el.pagination.next"),"aria-disabled":i.value,onClick:o[0]||(o[0]=r=>s.$emit("click",r))},[s.nextText?(v(),A("span",jme,S(s.nextText),1)):(v(),D(E(be),{key:1},{default:w(()=>[(v(),D(Ct(s.nextIcon)))]),_:1}))],8,Ume))}}),Yme=Wme;const Z4=()=>qe(pV,{}),qme=Ge({pageSize:{type:Number,required:!0},pageSizes:{type:he(Array),default:()=>ii([10,20,30,40,50,100])},popperClass:{type:String},popperStyle:{type:he([String,Object])},disabled:Boolean,teleported:Boolean,size:{type:String,values:hl},appendSizeTo:String});var Gme=ce({name:"ElPaginationSizes",__name:"sizes",props:qme,emits:["page-size-change"],setup(t,{emit:e}){const n=t,i=e,{t:s}=Qt(),o=ze("pagination"),r=Z4(),a=J(n.pageSize);Te(()=>n.pageSizes,(u,d)=>{Fi(u,d)||Ee(u)&&i("page-size-change",u.includes(n.pageSize)?n.pageSize:n.pageSizes[0])}),Te(()=>n.pageSize,u=>{a.value=u});const l=Y(()=>n.pageSizes);function c(u){var d;u!==a.value&&(a.value=u,(d=r.handleSizeChange)==null||d.call(r,Number(u)))}return(u,d)=>(v(),A("span",{class:G(E(o).e("sizes"))},[_(E(Jt),{"model-value":a.value,disabled:u.disabled,"popper-class":u.popperClass,"popper-style":u.popperStyle,size:u.size,teleported:u.teleported,"validate-event":!1,"append-to":u.appendSizeTo,onChange:c},{default:w(()=>[(v(!0),A(ee,null,Ce(l.value,h=>(v(),D(E(on),{key:h,value:h,label:h+E(s)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","popper-style","size","teleported","append-to"])],2))}}),Xme=Gme;const Kme=Ge({size:{type:String,values:hl}}),Zme=["disabled"];var Jme=ce({name:"ElPaginationJumper",__name:"jumper",props:Kme,setup(t){const{t:e}=Qt(),n=ze("pagination"),{pageCount:i,disabled:s,currentPage:o,changeEvent:r}=Z4(),a=J(),l=Y(()=>a.value??(o==null?void 0:o.value));function c(d){a.value=d?+d:""}function u(d){d=Math.trunc(+d),r==null||r(d),a.value=void 0}return(d,h)=>(v(),A("span",{class:G(E(n).e("jump")),disabled:E(s)},[g("span",{class:G([E(n).e("goto")])},S(E(e)("el.pagination.goto")),3),_(E(ft),{size:d.size,class:G([E(n).e("editor"),E(n).is("in-pagination")]),min:1,max:E(i),disabled:E(s),"model-value":l.value,"validate-event":!1,"aria-label":E(e)("el.pagination.page"),type:"number","onUpdate:modelValue":c,onChange:u},null,8,["size","class","max","disabled","model-value","aria-label"]),g("span",{class:G([E(n).e("classifier")])},S(E(e)("el.pagination.pageClassifier")),3)],10,Zme))}}),Qme=Jme;const ege=Ge({total:{type:Number,default:1e3}}),tge=["disabled"];var nge=ce({name:"ElPaginationTotal",__name:"total",props:ege,setup(t){const{t:e}=Qt(),n=ze("pagination"),{disabled:i}=Z4();return(s,o)=>(v(),A("span",{class:G(E(n).e("total")),disabled:E(i)},S(E(e)("el.pagination.total",{total:s.total})),11,tge))}}),sge=nge;const ige=Ge({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),oge=["aria-current","aria-label","tabindex"],rge=["tabindex","aria-label"],age=["aria-current","aria-label","tabindex"],lge=["tabindex","aria-label"],cge=["aria-current","aria-label","tabindex"];var uge=ce({name:"ElPaginationPager",__name:"pager",props:ige,emits:[un],setup(t,{emit:e}){const n=t,i=e,s=ze("pager"),o=ze("icon"),{t:r}=Qt(),a=J(!1),l=J(!1),c=J(!1),u=J(!1),d=J(!1),h=J(!1),f=Y(()=>{const x=n.pagerCount,M=(x-1)/2,P=Number(n.currentPage),T=Number(n.pageCount);let I=!1,L=!1;T>x&&(P>x-M&&(I=!0),P<T-M&&(L=!0));const R=[];if(I&&!L){const V=T-(x-2);for(let H=V;H<T;H++)R.push(H)}else if(!I&&L)for(let V=2;V<x;V++)R.push(V);else if(I&&L){const V=Math.floor(x/2)-1;for(let H=P-V;H<=P+V;H++)R.push(H)}else for(let V=2;V<T;V++)R.push(V);return R}),p=Y(()=>["more","btn-quickprev",o.b(),s.is("disabled",n.disabled)]),m=Y(()=>["more","btn-quicknext",o.b(),s.is("disabled",n.disabled)]),y=Y(()=>n.disabled?-1:0);Te(()=>[n.pageCount,n.pagerCount,n.currentPage],([x,M,P])=>{const T=(M-1)/2;let I=!1,L=!1;x>M&&(I=P>M-T,L=P<x-T),c.value&&(c.value=I),u.value&&(u.value=L),a.value=I,l.value=L},{immediate:!0});function b(x=!1){n.disabled||(x?c.value=!0:u.value=!0)}function k(x=!1){x?d.value=!0:h.value=!0}function C(x){const M=x.target;if(M.tagName.toLowerCase()==="li"&&Array.from(M.classList).includes("number")){const P=Number(M.textContent);P!==n.currentPage&&i(un,P)}else M.tagName.toLowerCase()==="li"&&Array.from(M.classList).includes("more")&&$(x)}function $(x){const M=x.target;if(M.tagName.toLowerCase()==="ul"||n.disabled)return;let P=Number(M.textContent);const T=n.pageCount,I=n.currentPage,L=n.pagerCount-2;M.className.includes("more")&&(M.className.includes("quickprev")?P=I-L:M.className.includes("quicknext")&&(P=I+L)),Number.isNaN(+P)||(P<1&&(P=1),P>T&&(P=T)),P!==I&&i(un,P)}return(x,M)=>(v(),A("ul",{class:G(E(s).b()),onClick:$,onKeyup:ut(C,["enter"])},[x.pageCount>0?(v(),A("li",{key:0,class:G([[E(s).is("active",x.currentPage===1),E(s).is("disabled",x.disabled)],"number"]),"aria-current":x.currentPage===1,"aria-label":E(r)("el.pagination.currentPage",{pager:1}),tabindex:y.value}," 1 ",10,oge)):O("v-if",!0),a.value?(v(),A("li",{key:1,class:G(p.value),tabindex:y.value,"aria-label":E(r)("el.pagination.prevPages",{pager:x.pagerCount-2}),onMouseenter:M[0]||(M[0]=P=>b(!0)),onMouseleave:M[1]||(M[1]=P=>c.value=!1),onFocus:M[2]||(M[2]=P=>k(!0)),onBlur:M[3]||(M[3]=P=>d.value=!1)},[(c.value||d.value)&&!x.disabled?(v(),D(E(Ec),{key:0})):(v(),D(E(l$),{key:1}))],42,rge)):O("v-if",!0),(v(!0),A(ee,null,Ce(f.value,P=>(v(),A("li",{key:P,class:G([[E(s).is("active",x.currentPage===P),E(s).is("disabled",x.disabled)],"number"]),"aria-current":x.currentPage===P,"aria-label":E(r)("el.pagination.currentPage",{pager:P}),tabindex:y.value},S(P),11,age))),128)),l.value?(v(),A("li",{key:2,class:G(m.value),tabindex:y.value,"aria-label":E(r)("el.pagination.nextPages",{pager:x.pagerCount-2}),onMouseenter:M[4]||(M[4]=P=>b()),onMouseleave:M[5]||(M[5]=P=>u.value=!1),onFocus:M[6]||(M[6]=P=>k()),onBlur:M[7]||(M[7]=P=>h.value=!1)},[(u.value||h.value)&&!x.disabled?(v(),D(E(Mc),{key:0})):(v(),D(E(l$),{key:1}))],42,lge)):O("v-if",!0),x.pageCount>1?(v(),A("li",{key:3,class:G([[E(s).is("active",x.currentPage===x.pageCount),E(s).is("disabled",x.disabled)],"number"]),"aria-current":x.currentPage===x.pageCount,"aria-label":E(r)("el.pagination.currentPage",{pager:x.pageCount}),tabindex:y.value},S(x.pageCount),11,cge)):O("v-if",!0)],34))}}),dge=uge;const Ii=t=>typeof t!="number",hge=Ge({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:t=>_t(t)&&Math.trunc(t)===t&&t>4&&t<22&&t%2===1,default:7},currentPage:Number,defaultCurrentPage:Number,layout:{type:String,default:["prev","pager","next","jumper","->","total"].join(", ")},pageSizes:{type:he(Array),default:()=>ii([10,20,30,40,50,100])},popperClass:{type:String,default:""},popperStyle:{type:he([String,Object])},prevText:{type:String,default:""},prevIcon:{type:as,default:()=>Tf},nextText:{type:String,default:""},nextIcon:{type:as,default:()=>ma},teleported:{type:Boolean,default:!0},small:Boolean,size:Wi,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),fge={"update:current-page":t=>_t(t),"update:page-size":t=>_t(t),"size-change":t=>_t(t),change:(t,e)=>_t(t)&&_t(e),"current-change":t=>_t(t),"prev-click":t=>_t(t),"next-click":t=>_t(t)},Z$="ElPagination";var pge=ce({name:Z$,props:hge,emits:fge,setup(t,{emit:e,slots:n}){const{t:i}=Qt(),s=ze("pagination"),o=bt().vnode.props||{},r=vD(),a=Y(()=>t.small?"small":t.size??r.value);el({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},Y(()=>!!t.small));const l="onUpdate:currentPage"in o||"onUpdate:current-page"in o||"onCurrentChange"in o,c="onUpdate:pageSize"in o||"onUpdate:page-size"in o||"onSizeChange"in o,u=Y(()=>{if(Ii(t.total)&&Ii(t.pageCount)||!Ii(t.currentPage)&&!l)return!1;if(t.layout.includes("sizes")){if(Ii(t.pageCount)){if(!Ii(t.total)&&!Ii(t.pageSize)&&!c)return!1}else if(!c)return!1}return!0}),d=J(Ii(t.defaultPageSize)?10:t.defaultPageSize),h=J(Ii(t.defaultCurrentPage)?1:t.defaultCurrentPage),f=Y({get(){return Ii(t.pageSize)?d.value:t.pageSize},set(x){Ii(t.pageSize)&&(d.value=x),c&&(e("update:page-size",x),e("size-change",x))}}),p=Y(()=>{let x=0;return Ii(t.pageCount)?Ii(t.total)||(x=Math.max(1,Math.ceil(t.total/f.value))):x=t.pageCount,x}),m=Y({get(){return Ii(t.currentPage)?h.value:t.currentPage},set(x){let M=x;x<1?M=1:x>p.value&&(M=p.value),Ii(t.currentPage)&&(h.value=M),l&&(e("update:current-page",M),e("current-change",M))}});Te(p,x=>{m.value>x&&(m.value=x)}),Te([m,f],x=>{e(un,...x)},{flush:"post"});function y(x){m.value=x}function b(x){f.value=x;const M=p.value;m.value>M&&(m.value=M)}function k(){t.disabled||(m.value-=1,e("prev-click",m.value))}function C(){t.disabled||(m.value+=1,e("next-click",m.value))}function $(x,M){x&&(x.props||(x.props={}),x.props.class=[x.props.class,M].join(" "))}return It(pV,{pageCount:p,disabled:Y(()=>t.disabled),currentPage:m,changeEvent:y,handleSizeChange:b}),()=>{var R;if(!u.value)return Pt(Z$,i("el.pagination.deprecationWarning")),null;if(!t.layout||t.hideOnSinglePage&&p.value<=1)return null;const x=[],M=[],P=vt("div",{class:s.e("rightwrapper")},M),T={prev:vt(zme,{disabled:t.disabled,currentPage:m.value,prevText:t.prevText,prevIcon:t.prevIcon,onClick:k}),jumper:vt(Qme,{size:a.value}),pager:vt(dge,{currentPage:m.value,pageCount:p.value,pagerCount:t.pagerCount,onChange:y,disabled:t.disabled}),next:vt(Yme,{disabled:t.disabled,currentPage:m.value,pageCount:p.value,nextText:t.nextText,nextIcon:t.nextIcon,onClick:C}),sizes:vt(Xme,{pageSize:f.value,pageSizes:t.pageSizes,popperClass:t.popperClass,popperStyle:t.popperStyle,disabled:t.disabled,teleported:t.teleported,size:a.value,appendSizeTo:t.appendSizeTo}),slot:((R=n==null?void 0:n.default)==null?void 0:R.call(n))??null,total:vt(sge,{total:Ii(t.total)?0:t.total})},I=t.layout.split(",").map(V=>V.trim());let L=!1;return I.forEach(V=>{if(V==="->"){L=!0;return}L?M.push(T[V]):x.push(T[V])}),$(x[0],s.is("first")),$(x[x.length-1],s.is("last")),L&&M.length>0&&($(M[0],s.is("first")),$(M[M.length-1],s.is("last")),x.push(P)),vt("div",{class:[s.b(),s.is("background",t.background),s.m(a.value)]},x)}}});const mge=jt(pge),gge=Ge({type:{type:String,default:"line",values:["line","circle","dashboard"]},percentage:{type:Number,default:0,validator:t=>t>=0&&t<=100},status:{type:String,default:"",values:["","success","exception","warning"]},indeterminate:Boolean,duration:{type:Number,default:3},strokeWidth:{type:Number,default:6},strokeLinecap:{type:he(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:he([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:he(Function),default:t=>`${t}%`}}),vge=["aria-valuenow"],_ge={viewBox:"0 0 100 100"},yge=["d","stroke","stroke-linecap","stroke-width"],bge=["d","stroke","opacity","stroke-linecap","stroke-width"],wge={key:0};var kge=ce({name:"ElProgress",__name:"progress",props:gge,setup(t){const e={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},n=t,i=ze("progress"),s=Y(()=>{const C={width:`${n.percentage}%`,animationDuration:`${n.duration}s`},$=k(n.percentage);return $.includes("gradient")?C.background=$:C.backgroundColor=$,C}),o=Y(()=>(n.strokeWidth/n.width*100).toFixed(1)),r=Y(()=>["circle","dashboard"].includes(n.type)?Number.parseInt(`${50-Number.parseFloat(o.value)/2}`,10):0),a=Y(()=>{const C=r.value,$=n.type==="dashboard";return`
          M 50 50
          m 0 ${$?"":"-"}${C}
          a ${C} ${C} 0 1 1 0 ${$?"-":""}${C*2}
          a ${C} ${C} 0 1 1 0 ${$?"":"-"}${C*2}
          `}),l=Y(()=>2*Math.PI*r.value),c=Y(()=>n.type==="dashboard"?.75:1),u=Y(()=>`${-1*l.value*(1-c.value)/2}px`),d=Y(()=>({strokeDasharray:`${l.value*c.value}px, ${l.value}px`,strokeDashoffset:u.value})),h=Y(()=>({strokeDasharray:`${l.value*c.value*(n.percentage/100)}px, ${l.value}px`,strokeDashoffset:u.value,transition:"stroke-dasharray 0.6s ease 0s, stroke 0.6s ease, opacity ease 0.6s"})),f=Y(()=>{let C;return n.color?C=k(n.percentage):C=e[n.status]||e.default,C}),p=Y(()=>n.status==="warning"?$4:n.type==="line"?n.status==="success"?S4:Bc:n.status==="success"?bD:Fr),m=Y(()=>n.type==="line"?12+n.strokeWidth*.4:n.width*.111111+2),y=Y(()=>n.format(n.percentage));function b(C){const $=100/C.length;return C.map((x,M)=>Ke(x)?{color:x,percentage:(M+1)*$}:x).sort((x,M)=>x.percentage-M.percentage)}const k=C=>{var x;const{color:$}=n;if(et($))return $(C);if(Ke($))return $;{const M=b($);for(const P of M)if(P.percentage>C)return P.color;return(x=M[M.length-1])==null?void 0:x.color}};return(C,$)=>(v(),A("div",{class:G([E(i).b(),E(i).m(t.type),E(i).is(t.status),{[E(i).m("without-text")]:!t.showText,[E(i).m("text-inside")]:t.textInside}]),role:"progressbar","aria-valuenow":t.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[t.type==="line"?(v(),A("div",{key:0,class:G(E(i).b("bar"))},[g("div",{class:G(E(i).be("bar","outer")),style:Xe({height:`${t.strokeWidth}px`})},[g("div",{class:G([E(i).be("bar","inner"),{[E(i).bem("bar","inner","indeterminate")]:t.indeterminate},{[E(i).bem("bar","inner","striped")]:t.striped},{[E(i).bem("bar","inner","striped-flow")]:t.stripedFlow}]),style:Xe(s.value)},[(t.showText||C.$slots.default)&&t.textInside?(v(),A("div",{key:0,class:G(E(i).be("bar","innerText"))},[le(C.$slots,"default",{percentage:t.percentage},()=>[g("span",null,S(y.value),1)])],2)):O("v-if",!0)],6)],6)],2)):(v(),A("div",{key:1,class:G(E(i).b("circle")),style:Xe({height:`${t.width}px`,width:`${t.width}px`})},[(v(),A("svg",_ge,[g("path",{class:G(E(i).be("circle","track")),d:a.value,stroke:`var(${E(i).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":t.strokeLinecap,"stroke-width":o.value,fill:"none",style:Xe(d.value)},null,14,yge),g("path",{class:G(E(i).be("circle","path")),d:a.value,stroke:f.value,fill:"none",opacity:t.percentage?1:0,"stroke-linecap":t.strokeLinecap,"stroke-width":o.value,style:Xe(h.value)},null,14,bge)]))],6)),(t.showText||C.$slots.default)&&!t.textInside?(v(),A("div",{key:2,class:G(E(i).e("text")),style:Xe({fontSize:`${m.value}px`})},[le(C.$slots,"default",{percentage:t.percentage},()=>[t.status?(v(),D(E(be),{key:1},{default:w(()=>[(v(),D(Ct(p.value)))]),_:1})):(v(),A("span",wge,S(y.value),1))])],6)):O("v-if",!0)],10,vge))}}),Cge=kge;const Lb=jt(Cge),xge="horizontal",Sge=({atEndEdge:t,atStartEdge:e,layout:n},i)=>{let s,o=0;const r=l=>l<0&&e.value||l>0&&t.value;return{hasReachedEdge:r,onWheel:l=>{zse(s);let{deltaX:c,deltaY:u}=l;l.shiftKey&&u!==0&&(c=u,u=0);const d=n.value===xge?c:u;r(d)||(o+=d,!o4()&&d!==0&&l.preventDefault(),s=Mg(()=>{i(o),o=0}))}}},$ge=Ge({animated:Boolean,count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:he([Number,Object])}}),Age=Ge({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}});var Ege=ce({name:"ElSkeletonItem",__name:"skeleton-item",props:Age,setup(t){const e=ze("skeleton");return(n,i)=>(v(),A("div",{class:G([E(e).e("item"),E(e).e(t.variant)])},[t.variant==="image"?(v(),D(E(Cre),{key:0})):O("v-if",!0)],2))}}),ay=Ege,Mge=ce({name:"ElSkeleton",__name:"skeleton",props:$ge,setup(t,{expose:e}){const n=t,i=ze("skeleton"),s=Jie(Sn(n,"loading"),n.throttle);return e({uiLoading:s}),(o,r)=>E(s)?(v(),A("div",Zt({key:0,class:[E(i).b(),E(i).is("animated",t.animated)]},o.$attrs),[(v(!0),A(ee,null,Ce(t.count,a=>(v(),A(ee,{key:a},[E(s)?le(o.$slots,"template",{key:a},()=>[_(ay,{class:G(E(i).is("first")),variant:"p"},null,8,["class"]),(v(!0),A(ee,null,Ce(t.rows,l=>(v(),D(ay,{key:l,class:G([E(i).e("paragraph"),E(i).is("last",l===t.rows&&t.rows>1)]),variant:"p"},null,8,["class"]))),128))]):O("v-if",!0)],64))),128))],16)):le(o.$slots,"default",Bh(Zt({key:1},o.$attrs)))}}),Tge=Mge;const Wt=jt(Tge,{SkeletonItem:ay});Is(ay);const mV=t=>["",...hl].includes(t),Pge=Ge({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:void 0},loading:Boolean,size:{type:String,validator:mV},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:as},activeActionIcon:{type:as},activeIcon:{type:as},inactiveIcon:{type:as},activeText:{type:String,default:""},inactiveText:{type:String,default:""},activeValue:{type:[Boolean,String,Number],default:!0},inactiveValue:{type:[Boolean,String,Number],default:!1},name:{type:String,default:""},validateEvent:{type:Boolean,default:!0},beforeChange:{type:he(Function)},id:String,tabindex:{type:[String,Number]},...vr(["ariaLabel"])}),Ige={[Mt]:t=>Xn(t)||Ke(t)||_t(t),[un]:t=>Xn(t)||Ke(t)||_t(t),[Po]:t=>Xn(t)||Ke(t)||_t(t)},Lge=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex"],Oge=["aria-hidden"],Dge={key:1},Rge={key:1},Vge=["aria-hidden"],fw="ElSwitch";var Fge=ce({name:fw,__name:"switch",props:Pge,emits:Ige,setup(t,{expose:e,emit:n}){const i=t,s=n,{formItem:o}=ho(),r=$i(),a=ze("switch"),{inputId:l}=gl(i,{formItemContext:o}),c=ys(Y(()=>{if(i.loading)return!0})),u=J(i.modelValue!==!1),d=Hn(),h=Y(()=>[a.b(),a.m(r.value),a.is("disabled",c.value),a.is("checked",b.value)]),f=Y(()=>[a.e("label"),a.em("label","left"),a.is("active",!b.value)]),p=Y(()=>[a.e("label"),a.em("label","right"),a.is("active",b.value)]),m=Y(()=>({width:ci(i.width)}));Te(()=>i.modelValue,()=>{u.value=!0});const y=Y(()=>u.value?i.modelValue:!1),b=Y(()=>y.value===i.activeValue);[i.activeValue,i.inactiveValue].includes(y.value)||(s(Mt,i.inactiveValue),s(un,i.inactiveValue),s(Po,i.inactiveValue)),Te(b,x=>{var M;d.value.checked=x,i.validateEvent&&((M=o==null?void 0:o.validate)==null||M.call(o,"change").catch(P=>Pt(P)))});const k=()=>{const x=b.value?i.inactiveValue:i.activeValue;s(Mt,x),s(un,x),s(Po,x),ot(()=>{d.value.checked=b.value})},C=()=>{if(c.value)return;const{beforeChange:x}=i;if(!x){k();return}const M=x();[nd(M),Xn(M)].includes(!0)||uo(fw,"beforeChange must return type `Promise<boolean>` or `boolean`"),nd(M)?M.then(P=>{P&&k()}).catch(P=>{Pt(fw,`some error occurred: ${P}`)}):M&&k()},$=()=>{var x,M;(M=(x=d.value)==null?void 0:x.focus)==null||M.call(x)};return Ft(()=>{d.value.checked=b.value}),e({focus:$,checked:b}),(x,M)=>(v(),A("div",{class:G(h.value),onClick:Ae(C,["prevent"])},[g("input",{id:E(l),ref_key:"input",ref:d,class:G(E(a).e("input")),type:"checkbox",role:"switch","aria-checked":b.value,"aria-disabled":E(c),"aria-label":t.ariaLabel,name:t.name,"true-value":t.activeValue,"false-value":t.inactiveValue,disabled:E(c),tabindex:t.tabindex,onChange:k,onKeydown:ut(C,["enter"])},null,42,Lge),!t.inlinePrompt&&(t.inactiveIcon||t.inactiveText||x.$slots.inactive)?(v(),A("span",{key:0,class:G(f.value)},[le(x.$slots,"inactive",{},()=>[t.inactiveIcon?(v(),D(E(be),{key:0},{default:w(()=>[(v(),D(Ct(t.inactiveIcon)))]),_:1})):O("v-if",!0),!t.inactiveIcon&&t.inactiveText?(v(),A("span",{key:1,"aria-hidden":b.value},S(t.inactiveText),9,Oge)):O("v-if",!0)])],2)):O("v-if",!0),g("span",{class:G(E(a).e("core")),style:Xe(m.value)},[t.inlinePrompt?(v(),A("div",{key:0,class:G(E(a).e("inner"))},[b.value?(v(),A("div",{key:1,class:G(E(a).e("inner-wrapper"))},[le(x.$slots,"active",{},()=>[t.activeIcon?(v(),D(E(be),{key:0},{default:w(()=>[(v(),D(Ct(t.activeIcon)))]),_:1})):O("v-if",!0),!t.activeIcon&&t.activeText?(v(),A("span",Rge,S(t.activeText),1)):O("v-if",!0)])],2)):(v(),A("div",{key:0,class:G(E(a).e("inner-wrapper"))},[le(x.$slots,"inactive",{},()=>[t.inactiveIcon?(v(),D(E(be),{key:0},{default:w(()=>[(v(),D(Ct(t.inactiveIcon)))]),_:1})):O("v-if",!0),!t.inactiveIcon&&t.inactiveText?(v(),A("span",Dge,S(t.inactiveText),1)):O("v-if",!0)])],2))],2)):O("v-if",!0),g("div",{class:G(E(a).e("action"))},[t.loading?(v(),D(E(be),{key:0,class:G(E(a).is("loading"))},{default:w(()=>[_(E(Pf))]),_:1},8,["class"])):b.value?le(x.$slots,"active-action",{key:1},()=>[t.activeActionIcon?(v(),D(E(be),{key:0},{default:w(()=>[(v(),D(Ct(t.activeActionIcon)))]),_:1})):O("v-if",!0)]):b.value?O("v-if",!0):le(x.$slots,"inactive-action",{key:2},()=>[t.inactiveActionIcon?(v(),D(E(be),{key:0},{default:w(()=>[(v(),D(Ct(t.inactiveActionIcon)))]),_:1})):O("v-if",!0)])],2)],6),!t.inlinePrompt&&(t.activeIcon||t.activeText||x.$slots.active)?(v(),A("span",{key:1,class:G(p.value)},[le(x.$slots,"active",{},()=>[t.activeIcon?(v(),D(E(be),{key:0},{default:w(()=>[(v(),D(Ct(t.activeIcon)))]),_:1})):O("v-if",!0),!t.activeIcon&&t.activeText?(v(),A("span",{key:1,"aria-hidden":!b.value},S(t.activeText),9,Vge)):O("v-if",!0)])],2)):O("v-if",!0)],2))}}),Nge=Fge;const Uc=jt(Nge),pw=function(t){var e;return(e=t.target)==null?void 0:e.closest("td")},Bge=function(t,e,n,i,s){if(!e&&!i&&(!s||Ee(s)&&!s.length))return t;Ke(n)?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const o=i?null:function(a,l){return s?bO(Us(s),c=>Ke(c)?Vi(a,c):c(a,l,t)):(e!=="$key"&&yt(a)&&"$value"in a&&(a=a.$value),[yt(a)?e?Vi(a,e):null:a])},r=function(a,l){var c,u,d,h,f;if(i)return i(a.value,l.value);for(let p=0,m=((c=a.key)==null?void 0:c.length)??0;p<m;p++){if(((u=a.key)==null?void 0:u[p])<((d=l.key)==null?void 0:d[p]))return-1;if(((h=a.key)==null?void 0:h[p])>((f=l.key)==null?void 0:f[p]))return 1}return 0};return t.map((a,l)=>({value:a,index:l,key:o?o(a,l):null})).sort((a,l)=>{let c=r(a,l);return c||(c=a.index-l.index),c*+n}).map(a=>a.value)},gV=function(t,e){let n=null;return t.columns.forEach(i=>{i.id===e&&(n=i)}),n},zge=function(t,e){let n=null;for(let i=0;i<t.columns.length;i++){const s=t.columns[i];if(s.columnKey===e){n=s;break}}return n||uo("ElTable",`No column matching with column-key: ${e}`),n},J$=function(t,e,n){const i=(e.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return i?gV(t,i[0]):null},oi=(t,e)=>{if(!t)throw new Error("Row is required when get row identity");if(Ke(e)){if(!e.includes("."))return`${t[e]}`;const n=e.split(".");let i=t;for(const s of n)i=i[s];return`${i}`}else if(et(e))return e.call(null,t);return""},Gh=function(t,e,n=!1,i="children"){const s=t||[],o={};return s.forEach((r,a)=>{if(o[oi(r,e)]={row:r,index:a},n){const l=r[i];Ee(l)&&Object.assign(o,Gh(l,e,!0,i))}}),o};function Hge(t,e){const n={};let i;for(i in t)n[i]=t[i];for(i in e)if(Dt(e,i)){const s=e[i];tn(s)||(n[i]=s)}return n}function J4(t){return t===""||tn(t)||(t=Number.parseInt(t,10),Number.isNaN(t)&&(t="")),t}function vV(t){return t===""||tn(t)||(t=J4(t),Number.isNaN(t)&&(t=80)),t}function Uge(t){return _t(t)?t:Ke(t)?/^\d+(?:px)?$/.test(t)?Number.parseInt(t,10):t:null}function jge(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...i)=>e(n(...i)))}function ly(t,e,n,i,s,o,r){let a=o??0,l=!1;const u=(()=>{if(!r)return t.indexOf(e);const m=oi(e,r);return t.findIndex(y=>oi(y,r)===m)})(),d=u!==-1,h=s==null?void 0:s.call(null,e,a),f=m=>{m==="add"?t.push(e):t.splice(u,1),l=!0},p=m=>{let y=0;const b=(i==null?void 0:i.children)&&m[i.children];return b&&Ee(b)&&(y+=b.length,b.forEach(k=>{y+=p(k)})),y};return(!s||h)&&(Xn(n)?n&&!d?f("add"):!n&&d&&f("remove"):f(d?"remove":"add")),!(i!=null&&i.checkStrictly)&&(i!=null&&i.children)&&Ee(e[i.children])&&e[i.children].forEach(m=>{const y=ly(t,m,n??!d,i,s,a+1,r);a+=p(m)+1,y&&(l=y)}),l}function Wge(t,e,n="children",i="hasChildren",s=!1){const o=a=>!(Ee(a)&&a.length);function r(a,l,c){e(a,l,c),l.forEach(u=>{if(u[i]&&s){e(u,null,c+1);return}const d=u[n];o(d)||r(u,d,c+1)})}t.forEach(a=>{if(a[i]&&s){e(a,null,0);return}const l=a[n];o(l)||r(a,l,0)})}const Yge=(t,e,n,i)=>{const s={strategy:"fixed",...t.popperOptions},o=et(i==null?void 0:i.tooltipFormatter)?i.tooltipFormatter({row:n,column:i,cellValue:gc(n,i.property).value}):void 0;return ls(o)?{slotContent:o,content:null,...t,popperOptions:s}:{slotContent:null,content:o??e,...t,popperOptions:s}};let Rn=null;function qge(t,e,n,i,s,o){var f;const r=Yge(t,e,n,i),a={...r,slotContent:void 0};if((Rn==null?void 0:Rn.trigger)===s){const p=(f=Rn.vm)==null?void 0:f.component;wO(p==null?void 0:p.props,a),p&&r.slotContent&&(p.slots.content=()=>[r.slotContent]);return}Rn==null||Rn();const l=o==null?void 0:o.refs.tableWrapper,c=l==null?void 0:l.dataset.prefix,u=_(Cs,{virtualTriggering:!0,virtualRef:s,appendTo:l,placement:"top",transition:"none",offset:0,hideAfter:0,...a},r.slotContent?{content:()=>r.slotContent}:void 0);u.appContext={...o.appContext,...o};const d=document.createElement("div");ol(u,d),u.component.exposed.onOpen();const h=l==null?void 0:l.querySelector(`.${c}-scrollbar__wrap`);Rn=()=>{var m,y;(y=(m=u.component)==null?void 0:m.exposed)!=null&&y.onClose&&u.component.exposed.onClose(),ol(null,d);const p=Rn;h==null||h.removeEventListener("scroll",p),p.trigger=void 0,p.vm=void 0,Rn=null},Rn.trigger=s??void 0,Rn.vm=u,h==null||h.addEventListener("scroll",Rn)}function _V(t){return t.children?bO(t.children,_V):[t]}function Q$(t,e){return t+e.colSpan}const yV=(t,e,n,i)=>{let s=0,o=t;const r=n.states.columns.value;if(i){const l=_V(i[t]);s=r.slice(0,r.indexOf(l[0])).reduce(Q$,0),o=s+l.reduce(Q$,0)-1}else s=t;let a;switch(e){case"left":o<n.states.fixedLeafColumnsLength.value&&(a="left");break;case"right":s>=r.length-n.states.rightFixedLeafColumnsLength.value&&(a="right");break;default:o<n.states.fixedLeafColumnsLength.value?a="left":s>=r.length-n.states.rightFixedLeafColumnsLength.value&&(a="right")}return a?{direction:a,start:s,after:o}:{}},Q4=(t,e,n,i,s,o=0)=>{const r=[],{direction:a,start:l,after:c}=yV(e,n,i,s);if(a){const u=a==="left";r.push(`${t}-fixed-column--${a}`),u&&c+o===i.states.fixedLeafColumnsLength.value-1?r.push("is-last-column"):!u&&l-o===i.states.columns.value.length-i.states.rightFixedLeafColumnsLength.value&&r.push("is-first-column")}return r};function eA(t,e){return t+(gb(e.realWidth)||Number.isNaN(e.realWidth)?Number(e.width):e.realWidth)}const e8=(t,e,n,i)=>{const{direction:s,start:o=0,after:r=0}=yV(t,e,n,i);if(!s)return;const a={},l=s==="left",c=n.states.columns.value;return l?a.left=c.slice(0,o).reduce(eA,0):a.right=c.slice(r+1).reverse().reduce(eA,0),a},Df=(t,e)=>{t&&(Number.isNaN(t[e])||(t[e]=`${t[e]}px`))};function bV(t){return t.some(e=>ls(e)?!(e.type===ks||e.type===ee&&!bV(e.children)):!0)?t:null}function Gge(t){const e=bt(),n=J(!1),i=J([]),s=(c,u)=>{const d=e.store.states.rowExpandable.value;return(d==null?void 0:d(c,u))??!0};return{updateExpandRows:()=>{const c=t.data.value||[],u=t.rowKey.value;if(n.value)i.value=e.store.states.rowExpandable.value?c.filter(s):c.slice();else if(u){const d=Gh(i.value,u);i.value=c.filter((h,f)=>!!d[oi(h,u)]&&s(h,f))}else i.value=[]},toggleRowExpansion:(c,u)=>{const d=(t.data.value||[]).indexOf(c);d>-1&&!s(c,d)||ly(i.value,c,u,void 0,void 0,void 0,t.rowKey.value)&&e.emit("expand-change",c,i.value.slice())},setExpandRowKeys:c=>{e.store.assertRowKey();const u=t.data.value||[],d=t.rowKey.value,h=Gh(u,d);i.value=c.reduce((f,p)=>{const m=h[p];return m&&s(m.row,m.index)&&f.push(m.row),f},[])},isRowExpanded:c=>{const u=t.rowKey.value;return u?!!Gh(i.value,u)[oi(c,u)]:i.value.includes(c)},states:{expandRows:i,defaultExpandAll:n}}}function Xge(t){const e=bt(),n=J(null),i=J(null),s=c=>{e.store.assertRowKey(),n.value=c,r(c)},o=()=>{n.value=null},r=c=>{const{data:u,rowKey:d}=t,h=i.value;let f=null;d.value&&(f=(E(u)||[]).find(p=>oi(p,d.value)===c)??null),i.value=f??null,e.emit("current-change",i.value,h)};return{setCurrentRowKey:s,restoreCurrentRowKey:o,setCurrentRowByKey:r,updateCurrentRow:c=>{const u=i.value;if(c&&c!==u){i.value=c,e.emit("current-change",i.value,u);return}!c&&u&&(i.value=null,e.emit("current-change",null,u))},updateCurrentRowData:()=>{const c=t.rowKey.value,u=t.data.value||[],d=i.value;d&&!u.includes(d)?c?r(oi(d,c)):(i.value=null,e.emit("current-change",null,d)):n.value&&(r(n.value),o())},states:{_currentRowKey:n,currentRow:i}}}function Kge(t){const e=J([]),n=J({}),i=J(16),s=J(!1),o=J({}),r=J("hasChildren"),a=J("children"),l=J(!1),c=bt(),u=Y(()=>t.rowKey.value?h(t.data.value||[]):{}),d=Y(()=>{const $=t.rowKey.value,x=Object.keys(o.value),M={};return x.length&&x.forEach(P=>{if(o.value[P].length){const T={children:[]};o.value[P].forEach(I=>{const L=oi(I,$);T.children.push(L),I[r.value]&&!M[L]&&(M[L]={children:[]})}),M[P]=T}}),M}),h=$=>{const x=t.rowKey.value,M={};return Wge($,(P,T,I)=>{const L=oi(P,x);Ee(T)?M[L]={children:T.map(R=>oi(R,x)),level:I}:s.value&&(M[L]={children:[],lazy:!0,level:I})},a.value,r.value,s.value),M},f=($=!1,x)=>{var L,R;x||(x=(L=c.store)==null?void 0:L.states.defaultExpandAll.value);const M=u.value,P=d.value,T=Object.keys(M),I={};if(T.length){const V=E(n),H=[],F=(N,q)=>{if($)return e.value?x||e.value.includes(q):!!(x||N!=null&&N.expanded);{const K=x||e.value&&e.value.includes(q);return!!(N!=null&&N.expanded||K)}};T.forEach(N=>{const q=V[N],K={...M[N]};if(K.expanded=F(q,N),K.lazy){const{loaded:X=!1,loading:U=!1}=q||{};K.loaded=!!X,K.loading=!!U,H.push(N)}I[N]=K});const z=Object.keys(P);s.value&&z.length&&H.length&&z.forEach(N=>{var X;const q=V[N],K=P[N].children;if(H.includes(N)){if(((X=I[N].children)==null?void 0:X.length)!==0)throw new Error("[ElTable]children must be an empty array.");I[N].children=K}else{const{loaded:U=!1,loading:Q=!1}=q||{};I[N]={lazy:!0,loaded:!!U,loading:!!Q,expanded:F(q,N),children:K,level:void 0}}})}n.value=I,(R=c.store)==null||R.updateTableScrollY()};Te(()=>e.value,()=>{f(!0)},{deep:!0}),Te(()=>u.value,()=>{f()}),Te(()=>d.value,()=>{f()});const p=$=>{e.value=$,f()},m=$=>s.value&&$&&"loaded"in $&&!$.loaded,y=($,x)=>{c.store.assertRowKey();const M=t.rowKey.value,P=oi($,M),T=P&&n.value[P];if(P&&T&&"expanded"in T){const I=T.expanded;x=tn(x)?!T.expanded:x,n.value[P].expanded=x,I!==x&&c.emit("expand-change",$,x),x&&m(T)&&k($,P,T),c.store.updateTableScrollY()}},b=$=>{c.store.assertRowKey();const x=t.rowKey.value,M=oi($,x),P=n.value[M];m(P)?k($,M,P):y($,void 0)},k=($,x,M)=>{const{load:P}=c.props;P&&!n.value[x].loaded&&(n.value[x].loading=!0,P($,M,T=>{if(!Ee(T))throw new TypeError("[ElTable] data must be an array");n.value[x].loading=!1,n.value[x].loaded=!0,n.value[x].expanded=!0,T.length&&(o.value[x]=T),c.emit("expand-change",$,!0)}))};return{loadData:k,loadOrToggle:b,toggleTreeExpansion:y,updateTreeExpandKeys:p,updateTreeData:f,updateKeyChildren:($,x)=>{const{lazy:M,rowKey:P}=c.props;if(M){if(!P)throw new Error("[Table] rowKey is required in updateKeyChild");o.value[$]&&(o.value[$]=x)}},normalize:h,states:{expandRowKeys:e,treeData:n,indent:i,lazy:s,lazyTreeNodeMap:o,lazyColumnIdentifier:r,childrenColumnName:a,checkStrictly:l}}}const Zge=(t,e)=>{const n=e.sortingColumn;return!n||Ke(n.sortable)?t:Bge(t,e.sortProp,e.sortOrder,n.sortMethod,n.sortBy)},C0=t=>{const e=[];return t.forEach(n=>{n.children&&n.children.length>0?e.push.apply(e,C0(n.children)):e.push(n)}),e};function Jge(){var Bt;const t=bt(),{size:e}=co((Bt=t.proxy)==null?void 0:Bt.$props),n=J(null),i=J([]),s=J([]),o=J(!1),r=J([]),a=J([]),l=J([]),c=J([]),u=J([]),d=J([]),h=J([]),f=J([]),p=[],m=J(0),y=J(0),b=J(0),k=J(!1),C=J([]),$=J(!1),x=J(!1),M=J(null),P=J(null),T=J({}),I=J(null),L=J(null),R=J(null),V=J(null),H=J(null),F=Y(()=>n.value?Gh(C.value,n.value):void 0);Te(i,()=>{var Qe;t.state&&(K(!1),t.props.tableLayout==="auto"&&((Qe=t.refs.tableHeaderRef)==null||Qe.updateFixedColumnStyle()))},{deep:!0});const z=()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},N=Qe=>{var kt;(kt=Qe.children)==null||kt.forEach(pt=>{pt.fixed=Qe.fixed,N(pt)})},q=()=>{r.value.forEach(Oe=>{N(Oe)}),c.value=r.value.filter(Oe=>[!0,"left"].includes(Oe.fixed));const Qe=r.value.find(Oe=>Oe.type==="selection");let kt;Qe&&Qe.fixed!=="right"&&!c.value.includes(Qe)&&r.value.indexOf(Qe)===0&&c.value.length&&(c.value.unshift(Qe),kt=!0),u.value=r.value.filter(Oe=>Oe.fixed==="right");const pt=r.value.filter(Oe=>(kt?Oe.type!=="selection":!0)&&!Oe.fixed);a.value=Array.from(c.value).concat(pt).concat(u.value);const _e=C0(pt),Le=C0(c.value),ue=C0(u.value);m.value=_e.length,y.value=Le.length,b.value=ue.length,l.value=Array.from(Le).concat(_e).concat(ue),o.value=c.value.length>0||u.value.length>0},K=(Qe,kt=!1)=>{Qe&&q(),kt?t.state.doLayout():t.state.debouncedUpdateLayout()},X=Qe=>F.value?!!F.value[oi(Qe,n.value)]:C.value.includes(Qe),U=()=>{k.value=!1;const Qe=C.value;C.value=[],Qe.length&&t.emit("selection-change",[])},Q=()=>{var kt,pt;let Qe;if(n.value){Qe=[];const _e=(pt=(kt=t==null?void 0:t.store)==null?void 0:kt.states)==null?void 0:pt.childrenColumnName.value,Le=Gh(i.value,n.value,!0,_e);for(const ue in F.value)Dt(F.value,ue)&&!Le[ue]&&Qe.push(F.value[ue].row)}else Qe=C.value.filter(_e=>!i.value.includes(_e));if(Qe.length){const _e=C.value.filter(Le=>!Qe.includes(Le));C.value=_e,t.emit("selection-change",_e.slice())}},ne=()=>(C.value||[]).slice(),Z=(Qe,kt,pt=!0,_e=!1)=>{var ue,Oe,gt,_n;const Le={children:(Oe=(ue=t==null?void 0:t.store)==null?void 0:ue.states)==null?void 0:Oe.childrenColumnName.value,checkStrictly:(_n=(gt=t==null?void 0:t.store)==null?void 0:gt.states)==null?void 0:_n.checkStrictly.value};if(ly(C.value,Qe,kt,Le,_e?void 0:M.value,i.value.indexOf(Qe),n.value)){const fs=(C.value||[]).slice();pt&&t.emit("select",fs,Qe),t.emit("selection-change",fs)}},ae=()=>{var Oe,gt;const Qe=x.value?!k.value:!(k.value||C.value.length);k.value=Qe;let kt=!1,pt=0;const _e=(gt=(Oe=t==null?void 0:t.store)==null?void 0:Oe.states)==null?void 0:gt.rowKey.value,{childrenColumnName:Le}=t.store.states,ue={children:Le.value,checkStrictly:!1};i.value.forEach((_n,fs)=>{const Qc=fs+pt;ly(C.value,_n,Qe,ue,M.value,Qc,_e)&&(kt=!0),pt+=we(oi(_n,_e))}),kt&&t.emit("selection-change",C.value?C.value.slice():[]),t.emit("select-all",(C.value||[]).slice())},me=()=>{var ue;if(((ue=i.value)==null?void 0:ue.length)===0){k.value=!1;return}const{childrenColumnName:Qe}=t.store.states;let kt=0,pt=0;const _e=Oe=>{var gt;for(const _n of Oe){const fs=M.value&&M.value.call(null,_n,kt);if(X(_n))pt++;else if(!M.value||fs)return!1;if(kt++,(gt=_n[Qe.value])!=null&&gt.length&&!_e(_n[Qe.value]))return!1}return!0},Le=_e(i.value||[]);k.value=pt===0?!1:Le},we=Qe=>{var Le;if(!t||!t.store)return 0;const{treeData:kt}=t.store.states;let pt=0;const _e=(Le=kt.value[Qe])==null?void 0:Le.children;return _e&&(pt+=_e.length,_e.forEach(ue=>{pt+=we(ue)})),pt},oe=(Qe,kt)=>{const pt={};return Us(Qe).forEach(_e=>{T.value[_e.id]=kt,pt[_e.columnKey||_e.id]=kt}),pt},fe=(Qe,kt,pt)=>{L.value&&L.value!==Qe&&(L.value.order=null),L.value=Qe,R.value=kt,V.value=pt},ie=()=>{let Qe=E(s);Object.keys(T.value).forEach(kt=>{const pt=T.value[kt];if(!pt||pt.length===0)return;const _e=gV({columns:l.value},kt);_e&&_e.filterMethod&&(Qe=Qe.filter(Le=>pt.some(ue=>_e.filterMethod.call(null,ue,Le,_e))))}),I.value=Qe},re=()=>{i.value=Zge(I.value??[],{sortingColumn:L.value,sortProp:R.value,sortOrder:V.value})},ke=(Qe=void 0)=>{Qe!=null&&Qe.filter||ie(),re()},je=Qe=>{const{tableHeaderRef:kt}=t.refs;if(!kt)return;const pt=Object.assign({},kt.filterPanels),_e=Object.keys(pt);if(_e.length)if(Ke(Qe)&&(Qe=[Qe]),Ee(Qe)){const Le=Qe.map(ue=>zge({columns:l.value},ue));_e.forEach(ue=>{const Oe=Le.find(gt=>gt.id===ue);Oe&&(Oe.filteredValue=[])}),t.store.commit("filterChange",{column:Le,values:[],silent:!0,multi:!0})}else _e.forEach(Le=>{const ue=l.value.find(Oe=>Oe.id===Le);ue&&(ue.filteredValue=[])}),T.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},te=()=>{L.value&&(fe(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:se,toggleRowExpansion:ve,updateExpandRows:$e,states:Se,isRowExpanded:Fe}=Gge({data:i,rowKey:n}),{updateTreeExpandKeys:Ye,toggleTreeExpansion:Re,updateTreeData:He,updateKeyChildren:Me,loadOrToggle:Ne,states:st}=Kge({data:i,rowKey:n}),{updateCurrentRowData:it,updateCurrentRow:ye,setCurrentRowKey:ge,states:Pe}=Xge({data:i,rowKey:n});return{assertRowKey:z,updateColumns:q,scheduleLayout:K,isSelected:X,clearSelection:U,cleanSelection:Q,getSelectionRows:ne,toggleRowSelection:Z,_toggleAllSelection:ae,toggleAllSelection:null,updateAllSelected:me,updateFilters:oe,updateCurrentRow:ye,updateSort:fe,execFilter:ie,execSort:re,execQuery:ke,clearFilter:je,clearSort:te,toggleRowExpansion:ve,setExpandRowKeysAdapter:Qe=>{se(Qe),Ye(Qe)},setCurrentRowKey:ge,toggleRowExpansionAdapter:(Qe,kt)=>{l.value.some(({type:pt})=>pt==="expand")?ve(Qe,kt):Re(Qe,kt)},isRowExpanded:Fe,updateExpandRows:$e,updateCurrentRowData:it,loadOrToggle:Ne,updateTreeData:He,updateKeyChildren:Me,states:{tableSize:e,rowKey:n,data:i,_data:s,isComplex:o,_columns:r,originColumns:a,columns:l,fixedColumns:c,rightFixedColumns:u,leafColumns:d,fixedLeafColumns:h,rightFixedLeafColumns:f,updateOrderFns:p,leafColumnsLength:m,fixedLeafColumnsLength:y,rightFixedLeafColumnsLength:b,isAllSelected:k,selection:C,reserveSelection:$,selectOnIndeterminate:x,selectable:M,rowExpandable:P,filters:T,filteredData:I,sortingColumn:L,sortProp:R,sortOrder:V,hoverRow:H,...Se,...st,...Pe}}}function Qk(t,e){return t.map(n=>{var i;return n.id===e.id?e:((i=n.children)!=null&&i.length&&(n.children=Qk(n.children,e)),n)})}function e6(t){t.forEach(e=>{var n,i;e.no=(n=e.getColumnIndex)==null?void 0:n.call(e),(i=e.children)!=null&&i.length&&e6(e.children)}),t.sort((e,n)=>e.no-n.no)}function Qge(){const t=bt(),e=Jge(),n=ze("table"),{t:i}=Qt();return{ns:n,t:i,...e,mutations:{setData(a,l){const c=E(a._data)!==l;a.data.value=l,a._data.value=l,t.store.execQuery(),t.store.updateCurrentRowData(),t.store.updateExpandRows(),t.store.updateTreeData(t.store.states.defaultExpandAll.value),E(a.reserveSelection)?t.store.assertRowKey():c?t.store.clearSelection():t.store.cleanSelection(),t.store.updateAllSelected(),t.$ready&&t.store.scheduleLayout()},insertColumn(a,l,c,u){var f;const d=E(a._columns);let h=[];c?(c&&!c.children&&(c.children=[]),(f=c.children)==null||f.push(l),h=Qk(d,c)):(d.push(l),h=d),e6(h),a._columns.value=h,a.updateOrderFns.push(u),l.type==="selection"&&(a.selectable.value=l.selectable,a.reserveSelection.value=l.reserveSelection),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},updateColumnOrder(a,l){var c;((c=l.getColumnIndex)==null?void 0:c.call(l))!==l.no&&(e6(a._columns.value),t.$ready&&t.store.updateColumns())},removeColumn(a,l,c,u){var f;const d=E(a._columns)||[];if(c)(f=c.children)==null||f.splice(c.children.findIndex(p=>p.id===l.id),1),ot(()=>{var p;((p=c.children)==null?void 0:p.length)===0&&delete c.children}),a._columns.value=Qk(d,c);else{const p=d.indexOf(l);p>-1&&(d.splice(p,1),a._columns.value=d)}const h=a.updateOrderFns.indexOf(u);h>-1&&a.updateOrderFns.splice(h,1),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},sort(a,l){const{prop:c,order:u,init:d}=l;if(c){const h=E(a.columns).find(f=>f.property===c);h&&(h.order=u,t.store.updateSort(h,c,u),t.store.commit("changeSortCondition",{init:d}))}},changeSortCondition(a,l){const{sortingColumn:c,sortProp:u,sortOrder:d}=a,h=E(c),f=E(u),p=E(d);gb(p)&&(a.sortingColumn.value=null,a.sortProp.value=null),t.store.execQuery({filter:!0}),(!l||!(l.silent||l.init))&&t.emit("sort-change",{column:h,prop:f,order:p}),t.store.updateTableScrollY()},filterChange(a,l){const{column:c,values:u,silent:d}=l,h=t.store.updateFilters(c,u);t.store.execQuery(),d||t.emit("filter-change",h),t.store.updateTableScrollY()},toggleAllSelection(){var a,l;(l=(a=t.store).toggleAllSelection)==null||l.call(a)},rowSelectedChanged(a,l){t.store.toggleRowSelection(l),t.store.updateAllSelected()},setHoverRow(a,l){a.hoverRow.value=l},setCurrentRow(a,l){t.store.updateCurrentRow(l)}},commit:function(a,...l){const c=t.store.mutations;if(c[a])c[a].apply(t,[t.store.states,...l]);else throw new Error(`Action not found: ${a}`)},updateTableScrollY:function(){ot(()=>t.layout.updateScrollY.apply(t.layout))}}}const t8={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",rowExpandable:"rowExpandable",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"},"treeProps.checkStrictly":{key:"checkStrictly",default:!1}};function e1e(t,e){if(!t)throw new Error("Table is required.");const n=Qge();return n.toggleAllSelection=cd(n._toggleAllSelection,10),Object.keys(t8).forEach(i=>{wV(kV(e,i),i,n)}),t1e(n,e),n}function t1e(t,e){Object.keys(t8).forEach(n=>{Te(()=>kV(e,n),i=>{wV(i,n,t)})})}function wV(t,e,n){let i=t,s=t8[e];yt(s)&&(i=i||s.default,s=s.key),n.states[s].value=i}function kV(t,e){if(e.includes(".")){const n=e.split(".");let i=t;return n.forEach(s=>{i=i[s]}),i}else return t[e]}var n1e=class{constructor(t){this.observers=[],this.table=null,this.store=null,this.columns=[],this.fit=!0,this.showHeader=!0,this.height=J(null),this.scrollX=J(!1),this.scrollY=J(!1),this.bodyWidth=J(null),this.fixedWidth=J(null),this.rightFixedWidth=J(null),this.gutterWidth=0;for(const e in t)Dt(t,e)&&(gn(this[e])?this[e].value=t[e]:this[e]=t[e]);if(!this.table)throw new Error("Table is required for Table Layout");if(!this.store)throw new Error("Store is required for Table Layout")}updateScrollY(){const t=this.height.value;if(gb(t))return!1;const e=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(e!=null&&e.wrapRef)){let n=!0;const i=this.scrollY.value;return n=e.wrapRef.scrollHeight>e.wrapRef.clientHeight,this.scrollY.value=n,i!==n}return!1}setHeight(t,e="height"){if(!Xt)return;const n=this.table.vnode.el;if(t=Uge(t),this.height.value=Number(t),!n&&(t||t===0)){ot(()=>this.setHeight(t,e));return}n&&_t(t)?(n.style[e]=`${t}px`,this.updateElsHeight()):n&&Ke(t)&&(n.style[e]=t,this.updateElsHeight())}setMaxHeight(t){this.setHeight(t,"max-height")}getFlattenColumns(){const t=[];return this.table.store.states.columns.value.forEach(e=>{e.isColumnGroup?t.push.apply(t,e.columns):t.push(e)}),t}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(t){if(!t)return!0;let e=t;for(;e.tagName!=="DIV";){if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}updateColumnsWidth(){var a;if(!Xt)return;const t=this.fit,e=(a=this.table.vnode.el)==null?void 0:a.clientWidth;let n=0;const i=this.getFlattenColumns(),s=i.filter(l=>!_t(l.width));if(i.forEach(l=>{_t(l.width)&&l.realWidth&&(l.realWidth=null)}),s.length>0&&t){if(i.forEach(l=>{n+=Number(l.width||l.minWidth||80)}),n<=e){this.scrollX.value=!1;const l=e-n;if(s.length===1)s[0].realWidth=Number(s[0].minWidth||80)+l;else{const c=l/s.reduce((d,h)=>d+Number(h.minWidth||80),0);let u=0;s.forEach((d,h)=>{if(h===0)return;const f=Math.floor(Number(d.minWidth||80)*c);u+=f,d.realWidth=Number(d.minWidth||80)+f}),s[0].realWidth=Number(s[0].minWidth||80)+l-u}}else this.scrollX.value=!0,s.forEach(l=>{l.realWidth=Number(l.minWidth)});this.bodyWidth.value=Math.max(n,e),this.table.state.resizeState.value.width=this.bodyWidth.value}else i.forEach(l=>{!l.width&&!l.minWidth?l.realWidth=80:l.realWidth=Number(l.width||l.minWidth),n+=l.realWidth}),this.scrollX.value=n>e,this.bodyWidth.value=n;const o=this.store.states.fixedColumns.value;if(o.length>0){let l=0;o.forEach(c=>{l+=Number(c.realWidth||c.width)}),this.fixedWidth.value=l}const r=this.store.states.rightFixedColumns.value;if(r.length>0){let l=0;r.forEach(c=>{l+=Number(c.realWidth||c.width)}),this.rightFixedWidth.value=l}this.notifyObservers("columns")}addObserver(t){this.observers.push(t)}removeObserver(t){const e=this.observers.indexOf(t);e!==-1&&this.observers.splice(e,1)}notifyObservers(t){this.observers.forEach(e=>{var n,i;switch(t){case"columns":(n=e.state)==null||n.onColumnsChange(this);break;case"scrollable":(i=e.state)==null||i.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${t}.`)}})}};const qr=Symbol("ElTable"),CV=t=>{const e=[];return t.forEach(n=>{n.children?(e.push(n),e.push.apply(e,CV(n.children))):e.push(n)}),e},xV=t=>{let e=1;const n=(s,o)=>{if(o&&(s.level=o.level+1,e<s.level&&(e=s.level)),s.children){let r=0;s.children.forEach(a=>{n(a,s),r+=a.colSpan}),s.colSpan=r}else s.colSpan=1};t.forEach(s=>{s.level=1,n(s,void 0)});const i=[];for(let s=0;s<e;s++)i.push([]);return CV(t).forEach(s=>{s.children?(s.rowSpan=1,s.children.forEach(o=>o.isSubColumn=!0)):s.rowSpan=e-s.level+1,i[s.level-1].push(s)}),i};function s1e(t){const e=qe(qr),n=Y(()=>xV(t.store.states.originColumns.value));return{isGroup:Y(()=>{const o=n.value.length>1;return o&&e&&(e.state.isGroup.value=!0),o}),toggleAllSelection:o=>{o.stopPropagation(),e==null||e.store.commit("toggleAllSelection")},columnRows:n}}var i1e=ce({name:"ElTableFilterPanel",components:{ElCheckbox:Gt,ElCheckboxGroup:N4,ElScrollbar:Ai,ElTooltip:Cs,ElIcon:be,ArrowDown:tp,ArrowUp:x4},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:Bn.appendTo},setup(t){const e=bt(),{t:n}=Qt(),i=ze("table-filter"),s=e==null?void 0:e.parent;t.column&&!s.filterPanels.value[t.column.id]&&(s.filterPanels.value[t.column.id]=e);const o=J(null),r=J(null),a=J(0),l=Y(()=>t.column&&t.column.filters),c=Y(()=>t.column&&t.column.filterClassName?`${i.b()} ${t.column.filterClassName}`:i.b()),u=Y({get:()=>{var P;return(((P=t.column)==null?void 0:P.filteredValue)||[])[0]},set:P=>{d.value&&(ha(P)?d.value.splice(0,1):d.value.splice(0,1,P))}}),d=Y({get(){return t.column?t.column.filteredValue||[]:[]},set(P){var T;t.column&&((T=t.upDataColumn)==null||T.call(t,"filteredValue",P))}}),h=Y(()=>t.column?t.column.filterMultiple:!0),f=P=>P.value===u.value,p=()=>{var P;(P=o.value)==null||P.onClose()},m=()=>{k(d.value),p()},y=()=>{d.value=[],k(d.value),p()},b=(P,T)=>{u.value=P,a.value=T,ha(P)?k([]):k(d.value),p()},k=P=>{var T,I;(T=t.store)==null||T.commit("filterChange",{column:t.column,values:P}),(I=t.store)==null||I.updateAllSelected()},C=()=>{var P,T;(P=r.value)==null||P.focus(),!h.value&&x(),t.column&&((T=t.upDataColumn)==null||T.call(t,"filterOpened",!0))},$=()=>{var P;t.column&&((P=t.upDataColumn)==null||P.call(t,"filterOpened",!1))},x=()=>{if(ha(u)){a.value=0;return}const P=(l.value||[]).findIndex(T=>T.value===u.value);a.value=P>=0?P+1:0};return{multiple:h,filterClassName:c,filteredValue:d,filterValue:u,filters:l,handleConfirm:m,handleReset:y,handleSelect:b,isPropAbsent:ha,isActive:f,t:n,ns:i,tooltipRef:o,rootRef:r,checkedIndex:a,handleShowTooltip:C,handleHideTooltip:$,handleKeydown:P=>{var V,H;const T=ss(P),I=(l.value?l.value.length:0)+1;let L=a.value,R=!0;switch(T){case Ue.down:case Ue.right:L=(L+1)%I;break;case Ue.up:case Ue.left:L=(L-1+I)%I;break;case Ue.tab:p(),R=!1;break;case Ue.enter:case Ue.space:if(L===0)b(null,0);else{const F=(l.value||[])[L-1];F.value&&b(F.value,L)}break;default:R=!1;break}R&&P.preventDefault(),a.value=L,(H=(V=r.value)==null?void 0:V.querySelector(`.${i.e("list-item")}:nth-child(${L+1})`))==null||H.focus()}}}});const o1e=["disabled"],r1e=["tabindex","aria-checked"],a1e=["tabindex","aria-checked","onClick"],l1e=["aria-label"];function c1e(t,e,n,i,s,o){const r=W("el-checkbox"),a=W("el-checkbox-group"),l=W("el-scrollbar"),c=W("arrow-up"),u=W("arrow-down"),d=W("el-icon"),h=W("el-tooltip");return v(),D(h,{ref:"tooltipRef",offset:0,placement:t.placement,"show-arrow":!1,trigger:"click",role:"dialog",teleported:"",effect:"light",pure:"",loop:"","popper-class":t.filterClassName,persistent:"","append-to":t.appendTo,onShow:t.handleShowTooltip,onHide:t.handleHideTooltip},{content:w(()=>[t.multiple?(v(),A("div",{key:0,ref:"rootRef",tabindex:"-1",class:G(t.ns.e("multiple"))},[g("div",{class:G(t.ns.e("content"))},[_(l,{"wrap-class":t.ns.e("wrap")},{default:w(()=>[_(a,{modelValue:t.filteredValue,"onUpdate:modelValue":e[0]||(e[0]=f=>t.filteredValue=f),class:G(t.ns.e("checkbox-group"))},{default:w(()=>[(v(!0),A(ee,null,Ce(t.filters,f=>(v(),D(r,{key:f.value,value:f.value},{default:w(()=>[B(S(f.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),g("div",{class:G(t.ns.e("bottom"))},[g("button",{class:G(t.ns.is("disabled",t.filteredValue.length===0)),disabled:t.filteredValue.length===0,type:"button",onClick:e[1]||(e[1]=(...f)=>t.handleConfirm&&t.handleConfirm(...f))},S(t.t("el.table.confirmFilter")),11,o1e),g("button",{type:"button",onClick:e[2]||(e[2]=(...f)=>t.handleReset&&t.handleReset(...f))},S(t.t("el.table.resetFilter")),1)],2)],2)):(v(),A("ul",{key:1,ref:"rootRef",tabindex:"-1",role:"radiogroup",class:G(t.ns.e("list")),onKeydown:e[4]||(e[4]=(...f)=>t.handleKeydown&&t.handleKeydown(...f))},[g("li",{role:"radio",class:G([t.ns.e("list-item"),t.ns.is("active",t.isPropAbsent(t.filterValue))]),tabindex:t.checkedIndex===0?0:-1,"aria-checked":t.isPropAbsent(t.filterValue),onClick:e[3]||(e[3]=f=>t.handleSelect(null,0))},S(t.t("el.table.clearFilter")),11,r1e),(v(!0),A(ee,null,Ce(t.filters,(f,p)=>(v(),A("li",{key:f.value,role:"radio",class:G([t.ns.e("list-item"),t.ns.is("active",t.isActive(f))]),tabindex:t.checkedIndex===p+1?0:-1,"aria-checked":t.isActive(f),onClick:m=>t.handleSelect(f.value,p+1)},S(f.text),11,a1e))),128))],34))]),default:w(()=>{var f;return[g("button",{type:"button",class:G(`${t.ns.namespace.value}-table__column-filter-trigger`),"aria-label":t.t("el.table.filterLabel",{column:((f=t.column)==null?void 0:f.label)||""})},[_(d,null,{default:w(()=>[le(t.$slots,"filter-icon",{},()=>{var p;return[(p=t.column)!=null&&p.filterOpened?(v(),D(c,{key:0})):(v(),D(u,{key:1}))]})]),_:3})],10,l1e)]}),_:3},8,["placement","popper-class","append-to","onShow","onHide"])}var u1e=hi(i1e,[["render",c1e]]);function n8(t){const e=bt();Sd(()=>{n.value.addObserver(e)}),Ft(()=>{i(n.value),s(n.value)}),ul(()=>{i(n.value),s(n.value)}),dl(()=>{n.value.removeObserver(e)});const n=Y(()=>{const o=t.layout;if(!o)throw new Error("Can not find table layout.");return o}),i=o=>{var c;const r=((c=t.vnode.el)==null?void 0:c.querySelectorAll("colgroup > col"))||[];if(!r.length)return;const a=o.getFlattenColumns(),l={};a.forEach(u=>{l[u.id]=u});for(let u=0,d=r.length;u<d;u++){const h=r[u],f=l[h.getAttribute("name")];f&&h.setAttribute("width",f.realWidth||f.width)}},s=o=>{var l,c;const r=((l=t.vnode.el)==null?void 0:l.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let u=0,d=r.length;u<d;u++)r[u].setAttribute("width",o.scrollY.value?o.gutterWidth:"0");const a=((c=t.vnode.el)==null?void 0:c.querySelectorAll("th.gutter"))||[];for(let u=0,d=a.length;u<d;u++){const h=a[u];h.style.width=o.scrollY.value?`${o.gutterWidth}px`:"0",h.style.display=o.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:i,onScrollableChange:s}}function d1e(t,e){const n=bt(),i=qe(qr),s=m=>{m.stopPropagation()},o=(m,y)=>{!y.filters&&y.sortable?p(m,y,!1):y.filterable&&!y.sortable&&s(m),i==null||i.emit("header-click",y,m)},r=(m,y)=>{i==null||i.emit("header-contextmenu",y,m)},a=J(null),l=J(!1),c=J(),u=(m,y)=>{var b,k,C;if(Xt&&!(y.children&&y.children.length>0)&&a.value&&t.border&&a.value.id===y.id){l.value=!0;const $=i;e("set-drag-visible",!0);const x=(b=$==null?void 0:$.vnode.el)==null?void 0:b.getBoundingClientRect().left,M=(C=(k=n==null?void 0:n.vnode)==null?void 0:k.el)==null?void 0:C.querySelector(`th.${y.id}`),P=M.getBoundingClientRect(),T=P.left-x+30;ud(M,"noclick"),c.value={startMouseLeft:m.clientX,startLeft:P.right-x,startColumnLeft:P.left-x,tableLeft:x};const I=$==null?void 0:$.refs.resizeProxy;I.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const L=V=>{const H=V.clientX-c.value.startMouseLeft,F=c.value.startLeft+H;I.style.left=`${Math.max(T,F)}px`},R=()=>{if(l.value){const{startColumnLeft:V,startLeft:H}=c.value;y.width=y.realWidth=Number.parseInt(I.style.left,10)-V,$==null||$.emit("header-dragend",y.width,H-V,y,m),requestAnimationFrame(()=>{t.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",l.value=!1,a.value=null,c.value=void 0,e("set-drag-visible",!1)}document.removeEventListener("mousemove",L),document.removeEventListener("mouseup",R),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{_a(M,"noclick")},0)};document.addEventListener("mousemove",L),document.addEventListener("mouseup",R)}},d=(m,y)=>{var I;if(!t.border||y.children&&y.children.length>0)return;const b=m.target,k=$o(b)?b.closest("th"):null;if(!k)return;const C=tl(k,"is-sortable");if(C){const L=l.value?"col-resize":"";k.style.cursor=L;const R=k.querySelector(".caret-wrapper");R&&(R.style.cursor=L)}if(!y.resizable||l.value){a.value=null;return}const $=k.getBoundingClientRect(),x=((I=k.parentNode)==null?void 0:I.lastElementChild)===k,M=t.allowDragLastColumn||!x,P=$.width>12&&$.right-m.clientX<8&&M,T=P?"col-resize":"";document.body.style.cursor=T,a.value=P?y:null,C&&(k.style.cursor=T)},h=()=>{!Xt||l.value||(document.body.style.cursor="")},f=({order:m,sortOrders:y})=>{if(m==="")return y[0];const b=y.indexOf(m||null);return y[b>y.length-2?0:b+1]},p=(m,y,b)=>{var I;m.stopPropagation();const k=y.order===b?null:b||f(y),C=(I=m.target)==null?void 0:I.closest("th");if(C&&tl(C,"noclick")){_a(C,"noclick");return}if(!y.sortable)return;const $=m.currentTarget;if(["ascending","descending"].some(L=>tl($,L)&&!y.sortOrders.includes(L)))return;const x=t.store.states;let M=x.sortProp.value,P;const T=x.sortingColumn.value;(T!==y||T===y&&gb(T.order))&&(T&&(T.order=null),x.sortingColumn.value=y,M=y.property),k?P=y.order=k:P=y.order=null,x.sortProp.value=M,x.sortOrder.value=P,i==null||i.store.commit("changeSortCondition")};return{handleHeaderClick:o,handleHeaderContextMenu:r,handleMouseDown:u,handleMouseMove:d,handleMouseOut:h,handleSortClick:p,handleFilterClick:s}}function h1e(t){const e=qe(qr),n=ze("table");return{getHeaderRowStyle:a=>{const l=e==null?void 0:e.props.headerRowStyle;return et(l)?l.call(null,{rowIndex:a}):l},getHeaderRowClass:a=>{const l=[],c=e==null?void 0:e.props.headerRowClassName;return Ke(c)?l.push(c):et(c)&&l.push(c.call(null,{rowIndex:a})),l.join(" ")},getHeaderCellStyle:(a,l,c,u)=>{let d=(e==null?void 0:e.props.headerCellStyle)??{};et(d)&&(d=d.call(null,{rowIndex:a,columnIndex:l,row:c,column:u}));const h=e8(l,u.fixed,t.store,c);return Df(h,"left"),Df(h,"right"),Object.assign({},d,h)},getHeaderCellClass:(a,l,c,u)=>{const d=Q4(n.b(),l,u.fixed,t.store,c),h=[u.id,u.order,u.headerAlign,u.className,u.labelClassName,...d];u.children||h.push("is-leaf"),u.sortable&&h.push("is-sortable");const f=e==null?void 0:e.props.headerCellClassName;return Ke(f)?h.push(f):et(f)&&h.push(f.call(null,{rowIndex:a,columnIndex:l,row:c,column:u})),h.push(n.e("cell")),h.filter(p=>!!p).join(" ")}}}var f1e=ce({name:"ElTableHeader",components:{ElCheckbox:Gt},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})},appendFilterPanelTo:{type:String},allowDragLastColumn:{type:Boolean}},setup(t,{emit:e}){const n=bt(),i=qe(qr),s=ze("table"),o=J({}),{onColumnsChange:r,onScrollableChange:a}=n8(i),l=(i==null?void 0:i.props.tableLayout)==="auto",c=In(new Map),u=J();let d;const h=()=>{d=setTimeout(()=>{c.size>0&&(c.forEach((V,H)=>{const F=u.value.querySelector(`.${H.replace(/\s/g,".")}`);F&&(V.width=F.getBoundingClientRect().width||V.width)}),c.clear())})};Te(c,h),bn(()=>{d&&(clearTimeout(d),d=void 0)}),Ft(async()=>{await ot(),await ot();const{prop:V,order:H}=t.defaultSort;i==null||i.store.commit("sort",{prop:V,order:H,init:!0}),h()});const{handleHeaderClick:f,handleHeaderContextMenu:p,handleMouseDown:m,handleMouseMove:y,handleMouseOut:b,handleSortClick:k,handleFilterClick:C}=d1e(t,e),{getHeaderRowStyle:$,getHeaderRowClass:x,getHeaderCellStyle:M,getHeaderCellClass:P}=h1e(t),{isGroup:T,toggleAllSelection:I,columnRows:L}=s1e(t),{t:R}=Qt();return n.state={onColumnsChange:r,onScrollableChange:a},n.filterPanels=o,{ns:s,t:R,filterPanels:o,onColumnsChange:r,onScrollableChange:a,columnRows:L,getHeaderRowClass:x,getHeaderRowStyle:$,getHeaderCellClass:P,getHeaderCellStyle:M,handleHeaderClick:f,handleHeaderContextMenu:p,handleMouseDown:m,handleMouseMove:y,handleMouseOut:b,handleSortClick:k,handleFilterClick:C,isGroup:T,toggleAllSelection:I,saveIndexSelection:c,isTableLayoutAuto:l,theadRef:u,updateFixedColumnStyle:h}},render(){const{ns:t,t:e,isGroup:n,columnRows:i,getHeaderCellStyle:s,getHeaderCellClass:o,getHeaderRowClass:r,getHeaderRowStyle:a,handleHeaderClick:l,handleHeaderContextMenu:c,handleMouseDown:u,handleMouseMove:d,handleSortClick:h,handleMouseOut:f,store:p,$parent:m,saveIndexSelection:y,isTableLayoutAuto:b}=this;let k=1;return vt("thead",{ref:"theadRef",class:t.is("group",n)},i.map((C,$)=>vt("tr",{class:r($),key:$,style:a($)},C.map((x,M)=>{x.rowSpan>k&&(k=x.rowSpan);const P=o($,M,C,x);return b&&x.fixed&&y.set(P,x),vt("th",{class:P,colspan:x.colSpan,key:`${x.id}-thead`,rowspan:x.rowSpan,scope:x.colSpan>1?"colgroup":"col",ariaSort:x.sortable?x.order:void 0,style:s($,M,C,x),onClick:T=>{var I;(I=T.currentTarget)!=null&&I.classList.contains("noclick")||l(T,x)},onContextmenu:T=>c(T,x),onMousedown:T=>u(T,x),onMousemove:T=>d(T,x),onMouseout:f},[vt("div",{class:["cell",x.filteredValue&&x.filteredValue.length>0?"highlight":""]},[x.renderHeader?x.renderHeader({column:x,$index:M,store:p,_self:m}):x.label,x.sortable&&vt("button",{type:"button",class:"caret-wrapper","aria-label":e("el.table.sortLabel",{column:x.label||""}),onClick:T=>h(T,x)},[vt("i",{onClick:T=>h(T,x,"ascending"),class:"sort-caret ascending"}),vt("i",{onClick:T=>h(T,x,"descending"),class:"sort-caret descending"})]),x.filterable&&vt(u1e,{store:p,placement:x.filterPlacement||"bottom-start",appendTo:m==null?void 0:m.appendFilterPanelTo,column:x,upDataColumn:(T,I)=>{x[T]=I}},{"filter-icon":()=>x.renderFilterIcon?x.renderFilterIcon({filterOpened:x.filterOpened}):null})])])}))))}});function Xh(t,e,n=.03){return t-e>n}function p1e(t){const e=qe(qr),n=J(""),i=J(vt("div")),s=(p,m,y)=>{var x,M;const b=e,k=pw(p);let C=null;const $=(x=b==null?void 0:b.vnode.el)==null?void 0:x.dataset.prefix;k&&(C=J$({columns:((M=t.store)==null?void 0:M.states.columns.value)??[]},k,$),C&&(b==null||b.emit(`cell-${y}`,m,C,k,p))),b==null||b.emit(`row-${y}`,m,C,p)},o=(p,m)=>{s(p,m,"dblclick")},r=(p,m)=>{var y;(y=t.store)==null||y.commit("setCurrentRow",m),s(p,m,"click")},a=(p,m)=>{s(p,m,"contextmenu")},l=cd(p=>{var m;(m=t.store)==null||m.commit("setHoverRow",p)},30),c=cd(()=>{var p;(p=t.store)==null||p.commit("setHoverRow",null)},30),u=p=>{const m=window.getComputedStyle(p,null);return{left:Number.parseInt(m.paddingLeft,10)||0,right:Number.parseInt(m.paddingRight,10)||0,top:Number.parseInt(m.paddingTop,10)||0,bottom:Number.parseInt(m.paddingBottom,10)||0}},d=(p,m,y)=>{var k;let b=(k=m==null?void 0:m.target)==null?void 0:k.parentNode;for(;p>1&&(b=b==null?void 0:b.nextSibling,!(!b||b.nodeName!=="TR"));)y(b,"hover-row hover-fixed-row"),p--};return{handleDoubleClick:o,handleClick:r,handleContextMenu:a,handleMouseEnter:l,handleMouseLeave:c,handleCellMouseEnter:(p,m,y)=>{var q,K,X;if(!e)return;const b=e,k=pw(p),C=(q=b==null?void 0:b.vnode.el)==null?void 0:q.dataset.prefix;let $=null;if(k){if($=J$({columns:((K=t.store)==null?void 0:K.states.columns.value)??[]},k,C),!$)return;k.rowSpan>1&&d(k.rowSpan,p,ud);const U=b.hoverState={cell:k,column:$,row:m};b==null||b.emit("cell-mouse-enter",U.row,U.column,U.cell,p)}if(!y){(Rn==null?void 0:Rn.trigger)===k&&(Rn==null||Rn());return}const x=p.target.querySelector(".cell");if(!(tl(x,`${C}-tooltip`)&&x.childNodes.length&&((X=x.textContent)!=null&&X.trim())))return;const M=document.createRange();M.setStart(x,0),M.setEnd(x,x.childNodes.length);const{width:P,height:T}=M.getBoundingClientRect(),{width:I,height:L}=x.getBoundingClientRect(),{top:R,left:V,right:H,bottom:F}=u(x),z=V+H,N=R+F;Xh(P+z,I)||Xh(T+N,L)||Xh(x.scrollWidth,I)?qge(y,((k==null?void 0:k.innerText)||(k==null?void 0:k.textContent))??"",m,$,k,b):(Rn==null?void 0:Rn.trigger)===k&&(Rn==null||Rn())},handleCellMouseLeave:p=>{const m=pw(p);if(!m)return;m.rowSpan>1&&d(m.rowSpan,p,_a);const y=e==null?void 0:e.hoverState;e==null||e.emit("cell-mouse-leave",y==null?void 0:y.row,y==null?void 0:y.column,y==null?void 0:y.cell,p)},tooltipContent:n,tooltipTrigger:i}}function m1e(t){const e=qe(qr),n=ze("table");return{getRowStyle:(c,u)=>{const d=e==null?void 0:e.props.rowStyle;return et(d)?d.call(null,{row:c,rowIndex:u}):d||null},getRowClass:(c,u,d)=>{var p;const h=[n.e("row")];e!=null&&e.props.highlightCurrentRow&&c===((p=t.store)==null?void 0:p.states.currentRow.value)&&h.push("current-row"),t.stripe&&d%2===1&&h.push(n.em("row","striped"));const f=e==null?void 0:e.props.rowClassName;return Ke(f)?h.push(f):et(f)&&h.push(f.call(null,{row:c,rowIndex:u})),h},getCellStyle:(c,u,d,h)=>{const f=e==null?void 0:e.props.cellStyle;let p=f??{};et(f)&&(p=f.call(null,{rowIndex:c,columnIndex:u,row:d,column:h}));const m=e8(u,t==null?void 0:t.fixed,t.store);return Df(m,"left"),Df(m,"right"),Object.assign({},p,m)},getCellClass:(c,u,d,h,f)=>{const p=Q4(n.b(),u,t==null?void 0:t.fixed,t.store,void 0,f),m=[h.id,h.align,h.className,...p],y=e==null?void 0:e.props.cellClassName;return Ke(y)?m.push(y):et(y)&&m.push(y.call(null,{rowIndex:c,columnIndex:u,row:d,column:h})),m.push(n.e("cell")),m.filter(b=>!!b).join(" ")},getSpan:(c,u,d,h)=>{let f=1,p=1;const m=e==null?void 0:e.props.spanMethod;if(et(m)){const y=m({row:c,column:u,rowIndex:d,columnIndex:h});Ee(y)?(f=y[0],p=y[1]):yt(y)&&(f=y.rowspan,p=y.colspan)}return{rowspan:f,colspan:p}},getColspanRealWidth:(c,u,d)=>{if(u<1)return c[d].realWidth;const h=c.map(({realWidth:f,width:p})=>f||p).slice(d,d+u);return Number(h.reduce((f,p)=>Number(f)+Number(p),-1))}}}const g1e=["colspan","rowspan"];var v1e=ce({name:"TableTdWrapper",__name:"td-wrapper",props:{colspan:{type:Number,default:1},rowspan:{type:Number,default:1}},setup(t){return(e,n)=>(v(),A("td",{colspan:t.colspan,rowspan:t.rowspan},[le(e.$slots,"default")],8,g1e))}}),_1e=v1e;function y1e(t){const e=qe(qr),n=ze("table"),{handleDoubleClick:i,handleClick:s,handleContextMenu:o,handleMouseEnter:r,handleMouseLeave:a,handleCellMouseEnter:l,handleCellMouseLeave:c,tooltipContent:u,tooltipTrigger:d}=p1e(t),{getRowStyle:h,getRowClass:f,getCellStyle:p,getCellClass:m,getSpan:y,getColspanRealWidth:b}=m1e(t);let k=-1;const C=Y(()=>{var T;return(T=t.store)==null?void 0:T.states.columns.value.findIndex(({type:I})=>I==="default")}),$=(T,I)=>{var R;const L=(R=e==null?void 0:e.props)==null?void 0:R.rowKey;return L?oi(T,L):I},x=(T,I,L,R=!1)=>{const{tooltipEffect:V,tooltipOptions:H,store:F}=t,{indent:z,columns:N}=F.states,q=[];let K=!0;return L&&(q.push(n.em("row",`level-${L.level}`)),K=!!L.display),I===0&&(k=-1),t.stripe&&K&&k++,q.push(...f(T,I,k)),vt("tr",{style:[K?null:{display:"none"},h(T,I)],class:q,key:$(T,I),onDblclick:X=>i(X,T),onClick:X=>s(X,T),onContextmenu:X=>o(X,T),onMouseenter:()=>r(I),onMouseleave:a},N.value.map((X,U)=>{const{rowspan:Q,colspan:ne}=y(T,X,I,U);if(!Q||!ne)return null;const Z=Object.assign({},X);Z.realWidth=b(N.value,ne,U);const ae={store:F,_self:t.context||e,column:Z,row:T,$index:I,cellIndex:U,expanded:R};U===C.value&&L&&(ae.treeNode={indent:L.level&&L.level*z.value,level:L.level},Xn(L.expanded)&&(ae.treeNode.expanded=L.expanded,"loading"in L&&(ae.treeNode.loading=L.loading),"noLazyChildren"in L&&(ae.treeNode.noLazyChildren=L.noLazyChildren)));const me=`${$(T,I)},${U}`,we=Z.columnKey||Z.rawColumnKey||"",oe=X.showOverflowTooltip&&wO({effect:V},H,X.showOverflowTooltip);return vt(_1e,{style:p(I,U,T,X),class:m(I,U,T,X,ne-1),key:`${we}${me}`,rowspan:Q,colspan:ne,onMouseenter:fe=>l(fe,T,oe),onMouseleave:c},{default:()=>M(U,X,ae)})}))},M=(T,I,L)=>I.renderCell(L);return{wrappedRowRender:(T,I)=>{const L=t.store,{isRowExpanded:R,assertRowKey:V}=L,{treeData:H,lazyTreeNodeMap:F,childrenColumnName:z,rowKey:N}=L.states,q=L.states.columns.value;if(q.some(({type:K})=>K==="expand")){const K=R(T),X=x(T,I,void 0,K),U=e==null?void 0:e.renderExpanded;if(!U)return console.error("[Element Error]renderExpanded is required."),X;const Q=[[X]];return(e.props.preserveExpandedContent||K)&&Q[0].push(vt("tr",{key:`expanded-row__${X.key}`,style:{display:K?"":"none"}},[vt("td",{colspan:q.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[U({row:T,$index:I,store:L,expanded:K})])])),Q}else if(Object.keys(H.value).length){V();const K=oi(T,N.value);let X=H.value[K],U=null;X&&(U={expanded:X.expanded,level:X.level,display:!0,noLazyChildren:void 0,loading:void 0},Xn(X.lazy)&&(U&&Xn(X.loaded)&&X.loaded&&(U.noLazyChildren=!(X.children&&X.children.length)),U.loading=X.loading));const Q=[x(T,I,U??void 0)];if(X){let ne=0;const Z=(ae,me)=>{ae&&ae.length&&me&&ae.forEach(we=>{const oe={display:me.display&&me.expanded,level:me.level+1,expanded:!1,noLazyChildren:!1,loading:!1},fe=oi(we,N.value);if(ha(fe))throw new Error("For nested data item, row-key is required.");X={...H.value[fe]},X&&(oe.expanded=X.expanded,X.level=X.level||oe.level,X.display=!!(X.expanded&&oe.display),Xn(X.lazy)&&(Xn(X.loaded)&&X.loaded&&(oe.noLazyChildren=!(X.children&&X.children.length)),oe.loading=X.loading)),ne++,Q.push(x(we,I+ne,oe)),X&&Z(F.value[fe]||we[z.value],X)})};X.display=!0,Z(F.value[K]||T[z.value],X)}return Q}else return x(T,I,void 0)},tooltipContent:u,tooltipTrigger:d}}const b1e={store:{required:!0,type:Object},stripe:Boolean,tooltipEffect:String,tooltipOptions:{type:Object},context:{default:()=>({}),type:Object},rowClassName:[String,Function],rowStyle:[Object,Function],fixed:{type:String,default:""},highlight:Boolean};var w1e=ce({name:"ElTableBody",props:b1e,setup(t){var u;const e=bt(),n=qe(qr),i=ze("table"),{wrappedRowRender:s,tooltipContent:o,tooltipTrigger:r}=y1e(t),{onColumnsChange:a,onScrollableChange:l}=n8(n),c=[];return Te((u=t.store)==null?void 0:u.states.hoverRow,(d,h)=>{var b,k;const f=e==null?void 0:e.vnode.el,p=Array.from((f==null?void 0:f.children)||[]).filter(C=>C==null?void 0:C.classList.contains(`${i.e("row")}`));let m=d;const y=(b=p[m])==null?void 0:b.childNodes;if(y!=null&&y.length){let C=0;Array.from(y).reduce(($,x,M)=>{var P,T;return((P=y[M])==null?void 0:P.colSpan)>1&&(C=(T=y[M])==null?void 0:T.colSpan),x.nodeName!=="TD"&&C===0&&$.push(M),C>0&&C--,$},[]).forEach($=>{var x;for(m=d;m>0;){const M=(x=p[m-1])==null?void 0:x.childNodes;if(M[$]&&M[$].nodeName==="TD"&&M[$].rowSpan>1){ud(M[$],"hover-cell"),c.push(M[$]);break}m--}})}else c.forEach(C=>_a(C,"hover-cell")),c.length=0;!((k=t.store)!=null&&k.states.isComplex.value)||!Xt||Mg(()=>{const C=p[h],$=p[d];C&&!C.classList.contains("hover-fixed-row")&&_a(C,"hover-row"),$&&ud($,"hover-row")})}),dl(()=>{Rn==null||Rn()}),{ns:i,onColumnsChange:a,onScrollableChange:l,wrappedRowRender:s,tooltipContent:o,tooltipTrigger:r}},render(){const{wrappedRowRender:t,store:e}=this;return vt("tbody",{tabIndex:-1},[((e==null?void 0:e.states.data.value)||[]).reduce((n,i)=>n.concat(t(i,n.length)),[])])}});function k1e(){var e;const t=(e=qe(qr))==null?void 0:e.store;return{leftFixedLeafCount:Y(()=>(t==null?void 0:t.states.fixedLeafColumnsLength.value)??0),rightFixedLeafCount:Y(()=>(t==null?void 0:t.states.rightFixedColumns.value.length)??0),columnsCount:Y(()=>(t==null?void 0:t.states.columns.value.length)??0),leftFixedCount:Y(()=>(t==null?void 0:t.states.fixedColumns.value.length)??0),rightFixedCount:Y(()=>(t==null?void 0:t.states.rightFixedColumns.value.length)??0),columns:Y(()=>(t==null?void 0:t.states.columns.value)??[])}}function C1e(t){const{columns:e}=k1e(),n=ze("table");return{getCellClasses:(o,r)=>{const a=o[r],l=[n.e("cell"),a.id,a.align,a.labelClassName,...Q4(n.b(),r,a.fixed,t.store)];return a.className&&l.push(a.className),a.children||l.push(n.is("leaf")),l},getCellStyles:(o,r)=>{const a=e8(r,o.fixed,t.store);return Df(a,"left"),Df(a,"right"),a},columns:e}}var x1e=ce({name:"ElTableFooter",props:{fixed:{type:String,default:""},store:{required:!0,type:Object},summaryMethod:Function,sumText:String,border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(t){const e=qe(qr),n=ze("table"),{getCellClasses:i,getCellStyles:s,columns:o}=C1e(t),{onScrollableChange:r,onColumnsChange:a}=n8(e);return{ns:n,onScrollableChange:r,onColumnsChange:a,getCellClasses:i,getCellStyles:s,columns:o}},render(){const{columns:t,getCellStyles:e,getCellClasses:n,summaryMethod:i,sumText:s}=this,o=this.store.states.data.value;let r=[];return i?r=i({columns:t,data:o}):t.forEach((a,l)=>{if(l===0){r[l]=s;return}const c=o.map(f=>Number(f[a.property])),u=[];let d=!0;c.forEach(f=>{if(!Number.isNaN(+f)){d=!1;const p=`${f}`.split(".")[1];u.push(p?p.length:0)}});const h=Math.max.apply(null,u);d?r[l]="":r[l]=c.reduce((f,p)=>{const m=Number(p);return Number.isNaN(+m)?f:Number.parseFloat((f+p).toFixed(Math.min(h,20)))},0)}),vt(vt("tfoot",[vt("tr",{},[...t.map((a,l)=>vt("td",{key:l,colspan:a.colSpan,rowspan:a.rowSpan,class:n(t,l),style:e(a,l)},[vt("div",{class:["cell",a.labelClassName]},[r[l]])]))])]))}});function S1e(t){return{setCurrentRow:d=>{t.commit("setCurrentRow",d)},getSelectionRows:()=>t.getSelectionRows(),toggleRowSelection:(d,h,f=!0)=>{t.toggleRowSelection(d,h,!1,f),t.updateAllSelected()},clearSelection:()=>{t.clearSelection()},clearFilter:d=>{t.clearFilter(d)},toggleAllSelection:()=>{t.commit("toggleAllSelection")},toggleRowExpansion:(d,h)=>{t.toggleRowExpansionAdapter(d,h)},clearSort:()=>{t.clearSort()},sort:(d,h)=>{t.commit("sort",{prop:d,order:h})},updateKeyChildren:(d,h)=>{t.updateKeyChildren(d,h)}}}function $1e(t,e,n,i){const s=J(!1),o=J(null),r=J(!1),a=z=>{r.value=z},l=J({width:null,height:null,headerHeight:null}),c=J(!1),u={display:"inline-block",verticalAlign:"middle"},d=J(),h=J(0),f=J(0),p=J(0),m=J(0),y=J(0);Te(()=>t.height,z=>{e.setHeight(z??null)},{immediate:!0}),Te(()=>t.maxHeight,z=>{e.setMaxHeight(z??null)},{immediate:!0}),Te(()=>[t.currentRowKey,n.states.rowKey],([z,N])=>{!E(N)||!E(z)||n.setCurrentRowKey(`${z}`)},{immediate:!0}),Te(()=>t.data,z=>{i.store.commit("setData",z)},{immediate:!0,deep:!0}),sl(()=>{t.expandRowKeys&&n.setExpandRowKeysAdapter(t.expandRowKeys)});const b=()=>{i.store.commit("setHoverRow",null),i.hoverState&&(i.hoverState=null)},k=(z,N)=>{const{pixelX:q,pixelY:K}=N;Math.abs(q)>=Math.abs(K)&&(i.refs.bodyWrapper.scrollLeft+=N.pixelX/5)},C=Y(()=>t.height||t.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),$=Y(()=>({width:e.bodyWidth.value?`${e.bodyWidth.value}px`:""})),x=()=>{C.value&&e.updateElsHeight(),e.updateColumnsWidth(),!(typeof window>"u")&&requestAnimationFrame(I)};Ft(async()=>{await ot(),n.updateColumns(),L(),requestAnimationFrame(x);const z=i.vnode.el,N=i.refs.headerWrapper;t.flexible&&z&&z.parentElement&&(z.parentElement.style.minWidth="0"),l.value={width:d.value=z.offsetWidth,height:z.offsetHeight,headerHeight:t.showHeader&&N?N.offsetHeight:null},n.states.columns.value.forEach(q=>{q.filteredValue&&q.filteredValue.length&&i.store.commit("filterChange",{column:q,values:q.filteredValue,silent:!0})}),i.$ready=!0});const M=(z,N)=>{if(!z)return;const q=Array.from(z.classList).filter(K=>!K.startsWith("is-scrolling-"));q.push(e.scrollX.value?N:"is-scrolling-none"),z.className=q.join(" ")},P=z=>{const{tableWrapper:N}=i.refs;M(N,z)},T=z=>{const{tableWrapper:N}=i.refs;return!!(N&&N.classList.contains(z))},I=function(){if(!i.refs.scrollBarRef)return;if(!e.scrollX.value){const Q="is-scrolling-none";T(Q)||P(Q);return}const z=i.refs.scrollBarRef.wrapRef;if(!z)return;const{scrollLeft:N,offsetWidth:q,scrollWidth:K}=z,{headerWrapper:X,footerWrapper:U}=i.refs;X&&(X.scrollLeft=N),U&&(U.scrollLeft=N),N>=K-q-1?P("is-scrolling-right"):P(N===0?"is-scrolling-left":"is-scrolling-middle")},L=()=>{i.refs.scrollBarRef&&(i.refs.scrollBarRef.wrapRef&&zn(i.refs.scrollBarRef.wrapRef,"scroll",I,{passive:!0}),t.fit?Es(i.vnode.el,R):zn(window,"resize",R),Es(i.refs.tableInnerWrapper,()=>{var z,N;R(),(N=(z=i.refs)==null?void 0:z.scrollBarRef)==null||N.update()}))},R=()=>{var Z,ae,me,we;const z=i.vnode.el;if(!i.$ready||!z)return;let N=!1;const{width:q,height:K,headerHeight:X}=l.value,U=d.value=z.offsetWidth;q!==U&&(N=!0);const Q=z.offsetHeight;(t.height||C.value)&&K!==Q&&(N=!0);const ne=t.tableLayout==="fixed"?i.refs.headerWrapper:(Z=i.refs.tableHeaderRef)==null?void 0:Z.$el;t.showHeader&&(ne==null?void 0:ne.offsetHeight)!==X&&(N=!0),h.value=((ae=i.refs.tableWrapper)==null?void 0:ae.scrollHeight)||0,p.value=(ne==null?void 0:ne.scrollHeight)||0,m.value=((me=i.refs.footerWrapper)==null?void 0:me.offsetHeight)||0,y.value=((we=i.refs.appendWrapper)==null?void 0:we.offsetHeight)||0,f.value=h.value-p.value-m.value-y.value,N&&(l.value={width:U,height:Q,headerHeight:t.showHeader&&(ne==null?void 0:ne.offsetHeight)||0},x())},V=$i(),H=Y(()=>{const{bodyWidth:z,scrollY:N,gutterWidth:q}=e;return z.value?`${z.value-(N.value?q:0)}px`:""}),F=Y(()=>t.maxHeight?"fixed":t.tableLayout);return{isHidden:s,renderExpanded:o,setDragVisible:a,isGroup:c,handleMouseLeave:b,handleHeaderFooterMousewheel:k,tableSize:V,emptyBlockStyle:Y(()=>{if(t.data&&t.data.length)return;let z="100%";t.height&&f.value&&(z=`${f.value}px`);const N=d.value;return{width:N?`${N}px`:"",height:z}}),resizeProxyVisible:r,bodyWidth:H,resizeState:l,doLayout:x,tableBodyStyles:$,tableLayout:F,scrollbarViewStyle:u,scrollbarStyle:Y(()=>t.height?{height:"100%"}:t.maxHeight?Number.isNaN(Number(t.maxHeight))?{maxHeight:`calc(${t.maxHeight} - ${p.value+m.value}px)`}:{maxHeight:`${+t.maxHeight-p.value-m.value}px`}:{})}}function A1e(t){let e;const n=()=>{const i=t.vnode.el.querySelector(".hidden-columns"),s={childList:!0,subtree:!0},o=t.store.states.updateOrderFns;e=new MutationObserver(()=>{o.forEach(r=>r())}),e.observe(i,s)};Ft(()=>{n()}),dl(()=>{e==null||e.disconnect()})}var E1e={data:{type:Array,default:()=>[]},size:Wi,width:[String,Number],height:[String,Number],maxHeight:[String,Number],fit:{type:Boolean,default:!0},stripe:Boolean,border:Boolean,rowKey:[String,Function],showHeader:{type:Boolean,default:!0},showSummary:Boolean,sumText:String,summaryMethod:Function,rowClassName:[String,Function],rowStyle:[Object,Function],cellClassName:[String,Function],cellStyle:[Object,Function],headerRowClassName:[String,Function],headerRowStyle:[Object,Function],headerCellClassName:[String,Function],headerCellStyle:[Object,Function],highlightCurrentRow:Boolean,currentRowKey:[String,Number],emptyText:String,expandRowKeys:Array,defaultExpandAll:Boolean,rowExpandable:{type:Function},defaultSort:Object,tooltipEffect:String,tooltipOptions:Object,spanMethod:Function,selectOnIndeterminate:{type:Boolean,default:!0},indent:{type:Number,default:16},treeProps:{type:Object,default:()=>({hasChildren:"hasChildren",children:"children",checkStrictly:!1})},lazy:Boolean,load:Function,style:{type:[String,Object,Array],default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,appendFilterPanelTo:String,scrollbarTabindex:{type:[Number,String],default:void 0},allowDragLastColumn:{type:Boolean,default:!0},preserveExpandedContent:Boolean,nativeScrollbar:Boolean};function SV(t){const e=t.tableLayout==="auto";let n=t.columns||[];e&&n.every(({width:s})=>tn(s))&&(n=[]);const i=s=>{const o={key:`${t.tableLayout}_${s.id}`,style:{},name:void 0};return e?o.style={width:`${s.width}px`}:o.name=s.id,o};return vt("colgroup",{},n.map(s=>vt("col",i(s))))}SV.props=["columns","tableLayout"];const M1e=()=>{const t=J(),e=(o,r)=>{const a=t.value;a&&a.scrollTo(o,r)},n=(o,r)=>{const a=t.value;a&&_t(r)&&["Top","Left"].includes(o)&&a[`setScroll${o}`](r)};return{scrollBarRef:t,scrollTo:e,setScrollTop:o=>n("Top",o),setScrollLeft:o=>n("Left",o)}};let T1e=1;var P1e=ce({name:"ElTable",directives:{Mousewheel:Qce},components:{TableHeader:f1e,TableBody:w1e,TableFooter:x1e,ElScrollbar:Ai,hColgroup:SV},props:E1e,emits:["select","select-all","selection-change","cell-mouse-enter","cell-mouse-leave","cell-contextmenu","cell-click","cell-dblclick","row-click","row-contextmenu","row-dblclick","header-click","header-contextmenu","sort-change","filter-change","current-change","header-dragend","expand-change","scroll"],setup(t){const{t:e}=Qt(),n=ze("table"),i=zc("table"),s=bt();It(qr,s);const o=e1e(s,t);s.store=o;const r=new n1e({store:s.store,table:s,fit:t.fit,showHeader:t.showHeader});s.layout=r;const a=Y(()=>(o.states.data.value||[]).length===0),{setCurrentRow:l,getSelectionRows:c,toggleRowSelection:u,clearSelection:d,clearFilter:h,toggleAllSelection:f,toggleRowExpansion:p,clearSort:m,sort:y,updateKeyChildren:b}=S1e(o),{isHidden:k,renderExpanded:C,setDragVisible:$,isGroup:x,handleMouseLeave:M,handleHeaderFooterMousewheel:P,tableSize:T,emptyBlockStyle:I,resizeProxyVisible:L,bodyWidth:R,resizeState:V,doLayout:H,tableBodyStyles:F,tableLayout:z,scrollbarViewStyle:N,scrollbarStyle:q}=$1e(t,r,o,s),{scrollBarRef:K,scrollTo:X,setScrollLeft:U,setScrollTop:Q}=M1e(),ne=cd(H,50),Z=`${n.namespace.value}-table_${T1e++}`;s.tableId=Z,s.state={isGroup:x,resizeState:V,doLayout:H,debouncedUpdateLayout:ne};const ae=Y(()=>t.sumText??e("el.table.sumText")),me=Y(()=>t.emptyText??e("el.table.emptyText")),we=Y(()=>{var ie;return t.tooltipEffect??((ie=i.value)==null?void 0:ie.tooltipEffect)}),oe=Y(()=>{var ie;return t.tooltipOptions??((ie=i.value)==null?void 0:ie.tooltipOptions)}),fe=Y(()=>xV(o.states.originColumns.value)[0]);return A1e(s),bn(()=>{ne.cancel()}),{ns:n,layout:r,store:o,columns:fe,handleHeaderFooterMousewheel:P,handleMouseLeave:M,tableId:Z,tableSize:T,isHidden:k,isEmpty:a,renderExpanded:C,resizeProxyVisible:L,resizeState:V,isGroup:x,bodyWidth:R,tableBodyStyles:F,emptyBlockStyle:I,debouncedUpdateLayout:ne,setCurrentRow:l,getSelectionRows:c,toggleRowSelection:u,clearSelection:d,clearFilter:h,toggleAllSelection:f,toggleRowExpansion:p,clearSort:m,doLayout:H,sort:y,updateKeyChildren:b,t:e,setDragVisible:$,context:s,computedSumText:ae,computedEmptyText:me,computedTooltipEffect:we,computedTooltipOptions:oe,tableLayout:z,scrollbarViewStyle:N,scrollbarStyle:q,scrollBarRef:K,scrollTo:X,setScrollLeft:U,setScrollTop:Q,allowDragLastColumn:t.allowDragLastColumn}}});const I1e=["data-prefix"],L1e={ref:"hiddenColumns",class:"hidden-columns"};function O1e(t,e,n,i,s,o){const r=W("hColgroup"),a=W("table-header"),l=W("table-body"),c=W("table-footer"),u=W("el-scrollbar"),d=xt("mousewheel");return v(),A("div",{ref:"tableWrapper",class:G([{[t.ns.m("fit")]:t.fit,[t.ns.m("striped")]:t.stripe,[t.ns.m("border")]:t.border||t.isGroup,[t.ns.m("hidden")]:t.isHidden,[t.ns.m("group")]:t.isGroup,[t.ns.m("fluid-height")]:t.maxHeight,[t.ns.m("scrollable-x")]:t.layout.scrollX.value,[t.ns.m("scrollable-y")]:t.layout.scrollY.value,[t.ns.m("enable-row-hover")]:!t.store.states.isComplex.value,[t.ns.m("enable-row-transition")]:(t.store.states.data.value||[]).length!==0&&(t.store.states.data.value||[]).length<100,"has-footer":t.showSummary},t.ns.m(t.tableSize),t.className,t.ns.b(),t.ns.m(`layout-${t.tableLayout}`)]),style:Xe(t.style),"data-prefix":t.ns.namespace.value,onMouseleave:e[1]||(e[1]=(...h)=>t.handleMouseLeave&&t.handleMouseLeave(...h))},[g("div",{ref:"tableInnerWrapper",class:G(t.ns.e("inner-wrapper"))},[g("div",L1e,[le(t.$slots,"default")],512),t.showHeader&&t.tableLayout==="fixed"?De((v(),A("div",{key:0,ref:"headerWrapper",class:G(t.ns.e("header-wrapper"))},[g("table",{ref:"tableHeader",class:G(t.ns.e("header")),style:Xe(t.tableBodyStyles),border:"0",cellpadding:"0",cellspacing:"0"},[_(r,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),_(a,{ref:"tableHeaderRef",border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,"allow-drag-last-column":t.allowDragLastColumn,onSetDragVisible:t.setDragVisible},null,8,["border","default-sort","store","append-filter-panel-to","allow-drag-last-column","onSetDragVisible"])],6)],2)),[[d,t.handleHeaderFooterMousewheel]]):O("v-if",!0),g("div",{ref:"bodyWrapper",class:G(t.ns.e("body-wrapper"))},[_(u,{ref:"scrollBarRef","view-style":t.scrollbarViewStyle,"wrap-style":t.scrollbarStyle,always:t.scrollbarAlwaysOn,tabindex:t.scrollbarTabindex,native:t.nativeScrollbar,onScroll:e[0]||(e[0]=h=>t.$emit("scroll",h))},{default:w(()=>[g("table",{ref:"tableBody",class:G(t.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:Xe({width:t.bodyWidth,tableLayout:t.tableLayout})},[_(r,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),t.showHeader&&t.tableLayout==="auto"?(v(),D(a,{key:0,ref:"tableHeaderRef",class:G(t.ns.e("body-header")),border:t.border,"default-sort":t.defaultSort,store:t.store,"append-filter-panel-to":t.appendFilterPanelTo,onSetDragVisible:t.setDragVisible},null,8,["class","border","default-sort","store","append-filter-panel-to","onSetDragVisible"])):O("v-if",!0),_(l,{context:t.context,highlight:t.highlightCurrentRow,"row-class-name":t.rowClassName,"tooltip-effect":t.computedTooltipEffect,"tooltip-options":t.computedTooltipOptions,"row-style":t.rowStyle,store:t.store,stripe:t.stripe},null,8,["context","highlight","row-class-name","tooltip-effect","tooltip-options","row-style","store","stripe"]),t.showSummary&&t.tableLayout==="auto"?(v(),D(c,{key:1,class:G(t.ns.e("body-footer")),border:t.border,"default-sort":t.defaultSort,store:t.store,"sum-text":t.computedSumText,"summary-method":t.summaryMethod},null,8,["class","border","default-sort","store","sum-text","summary-method"])):O("v-if",!0)],6),t.isEmpty?(v(),A("div",{key:0,ref:"emptyBlock",style:Xe(t.emptyBlockStyle),class:G(t.ns.e("empty-block"))},[g("span",{class:G(t.ns.e("empty-text"))},[le(t.$slots,"empty",{},()=>[B(S(t.computedEmptyText),1)])],2)],6)):O("v-if",!0),t.$slots.append?(v(),A("div",{key:1,ref:"appendWrapper",class:G(t.ns.e("append-wrapper"))},[le(t.$slots,"append")],2)):O("v-if",!0)]),_:3},8,["view-style","wrap-style","always","tabindex","native"])],2),t.showSummary&&t.tableLayout==="fixed"?De((v(),A("div",{key:1,ref:"footerWrapper",class:G(t.ns.e("footer-wrapper"))},[g("table",{class:G(t.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:Xe(t.tableBodyStyles)},[_(r,{columns:t.store.states.columns.value,"table-layout":t.tableLayout},null,8,["columns","table-layout"]),_(c,{border:t.border,"default-sort":t.defaultSort,store:t.store,"sum-text":t.computedSumText,"summary-method":t.summaryMethod},null,8,["border","default-sort","store","sum-text","summary-method"])],6)],2)),[[Ut,!t.isEmpty],[d,t.handleHeaderFooterMousewheel]]):O("v-if",!0),t.border||t.isGroup?(v(),A("div",{key:2,class:G(t.ns.e("border-left-patch"))},null,2)):O("v-if",!0)],2),De(g("div",{ref:"resizeProxy",class:G(t.ns.e("column-resize-proxy"))},null,2),[[Ut,t.resizeProxyVisible]])],46,I1e)}var D1e=hi(P1e,[["render",O1e]]);const R1e={selection:"table-column--selection",expand:"table__expand-column"},V1e={default:{order:""},selection:{width:48,minWidth:48,realWidth:48,order:""},expand:{width:48,minWidth:48,realWidth:48,order:""},index:{width:48,minWidth:48,realWidth:48,order:""}},F1e=t=>R1e[t]||"",N1e={selection:{renderHeader({store:t}){function e(){return t.states.data.value&&t.states.data.value.length===0}return vt(Gt,{disabled:e(),size:t.states.tableSize.value,indeterminate:t.states.selection.value.length>0&&!t.states.isAllSelected.value,"onUpdate:modelValue":t.toggleAllSelection??void 0,modelValue:t.states.isAllSelected.value,ariaLabel:t.t("el.table.selectAllLabel")})},renderCell({row:t,column:e,store:n,$index:i}){return vt(Gt,{disabled:e.selectable?!e.selectable.call(null,t,i):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",t)},onClick:s=>s.stopPropagation(),modelValue:n.isSelected(t),ariaLabel:n.t("el.table.selectRowLabel")})},sortable:!1,resizable:!1},index:{renderHeader({column:t}){return t.label||"#"},renderCell({column:t,$index:e}){let n=e+1;const i=t.index;return _t(i)?n=e+i:et(i)&&(n=i(e)),vt("div",{},[n])},sortable:!1},expand:{renderHeader({column:t}){return t.label||""},renderCell({column:t,row:e,store:n,expanded:i,$index:s}){var c,u;const{ns:o}=n,r=[o.e("expand-icon")];!t.renderExpand&&i&&r.push(o.em("expand-icon","expanded"));const a=function(d){d.stopPropagation(),n.toggleRowExpansion(e)},l=((u=(c=n.states.rowExpandable).value)==null?void 0:u.call(c,e,s))??!0;return l||r.push(o.is("disabled")),vt("button",{type:"button",disabled:!l,"aria-label":n.t(i?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":i,class:r,onClick:a},{default:()=>t.renderExpand?[t.renderExpand({expanded:i,expandable:l})]:[vt(be,null,{default:()=>[vt(ma)]})]})},sortable:!1,resizable:!1}};function B1e({row:t,column:e,$index:n}){var o;const i=e.property,s=i&&gc(t,i).value;return e&&e.formatter?e.formatter(t,e,s,n):((o=s==null?void 0:s.toString)==null?void 0:o.call(s))||""}function z1e({row:t,treeNode:e,store:n},i=!1){const{ns:s}=n;if(!e)return i?[vt("span",{class:s.e("placeholder")})]:null;const o=[],r=function(a){a.stopPropagation(),!e.loading&&n.loadOrToggle(t)};if(e.indent&&o.push(vt("span",{class:s.e("indent"),style:{"padding-left":`${e.indent}px`}})),Xn(e.expanded)&&!e.noLazyChildren){const a=[s.e("expand-icon"),e.expanded?s.em("expand-icon","expanded"):""];let l=ma;e.loading&&(l=Pf),o.push(vt("button",{type:"button","aria-label":n.t(e.expanded?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":e.expanded,class:a,onClick:r},{default:()=>[vt(be,{class:s.is("loading",e.loading)},{default:()=>[vt(l)]})]}))}else o.push(vt("span",{class:s.e("placeholder")}));return o}function tA(t,e){return t.reduce((n,i)=>(n[i]=i,n),e)}function H1e(t,e){const n=bt();return{registerComplexWatchers:()=>{const o=["fixed"],r={realWidth:"width",realMinWidth:"minWidth"},a=tA(o,r);Object.keys(a).forEach(l=>{const c=r[l];Dt(e,c)&&Te(()=>e[c],u=>{let d=u;c==="width"&&l==="realWidth"&&(d=J4(u)),c==="minWidth"&&l==="realMinWidth"&&(d=vV(u)),n.columnConfig.value[c]=d,n.columnConfig.value[l]=d;const h=c==="fixed";t.value.store.scheduleLayout(h)})})},registerNormalWatchers:()=>{const o=["label","filters","filterMultiple","filteredValue","sortable","index","formatter","className","labelClassName","filterClassName","showOverflowTooltip","tooltipFormatter","resizable"],r=["showOverflowTooltip"],a={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},l=tA(o,a);Object.keys(l).forEach(u=>{const d=a[u];Dt(e,d)&&Te(()=>e[d],h=>{n.columnConfig.value[u]=h,(u==="filters"||u==="filterMethod")&&(n.columnConfig.value.filterable=!!(n.columnConfig.value.filters||n.columnConfig.value.filterMethod))})}),r.forEach(u=>{Dt(t.value.props,u)&&Te(()=>t.value.props[u],d=>{n.columnConfig.value.type!=="selection"&&tn(e[u])&&(n.columnConfig.value[u]=d)})});const c=zc("table");c.value&&Dt(c.value,"showOverflowTooltip")&&Te(()=>{var u;return(u=c.value)==null?void 0:u.showOverflowTooltip},u=>{n.columnConfig.value.type!=="selection"&&(!tn(e.showOverflowTooltip)||!tn(t.value.props.showOverflowTooltip)||(n.columnConfig.value.showOverflowTooltip=u))})}}}function U1e(t,e,n){const i=bt(),s=J(""),o=J(!1),r=J(),a=J(),l=ze("table");sl(()=>{r.value=t.align?`is-${t.align}`:null,r.value}),sl(()=>{a.value=t.headerAlign?`is-${t.headerAlign}`:r.value,a.value});const c=Y(()=>{let $=i.vnode.vParent||i.parent;for(;$&&!$.tableId&&!$.columnId;)$=$.vnode.vParent||$.parent;return $}),u=Y(()=>{const{store:$}=i.parent;if(!$)return!1;const{treeData:x}=$.states,M=x.value;return M&&Object.keys(M).length>0}),d=J(J4(t.width)),h=J(vV(t.minWidth)),f=$=>(d.value&&($.width=d.value),h.value&&($.minWidth=h.value),!d.value&&h.value&&($.width=void 0),$.minWidth||($.minWidth=80),$.realWidth=Number(tn($.width)?$.minWidth:$.width),$),p=$=>{const x=$.type,M=N1e[x]||{};Object.keys(M).forEach(T=>{const I=M[T];T!=="className"&&!tn(I)&&($[T]=I)});const P=F1e(x);if(P){const T=`${E(l.namespace)}-${P}`;$.className=$.className?`${$.className} ${T}`:T}return $},m=$=>{Ee($)?$.forEach(M=>x(M)):x($);function x(M){var P;((P=M==null?void 0:M.type)==null?void 0:P.name)==="ElTableColumn"&&(M.vParent=i)}};return{columnId:s,realAlign:r,isSubColumn:o,realHeaderAlign:a,columnOrTableParent:c,setColumnWidth:f,setColumnForcedProps:p,setColumnRenders:$=>{t.renderHeader?Pt("TableColumn","Comparing to render-header, scoped-slot header is easier to use. We recommend users to use scoped-slot header."):$.type!=="selection"&&($.renderHeader=M=>{if(i.columnConfig.value.label,e.header){const P=e.header(M);if(bV(P))return vt(ee,P)}return B($.label)}),e["filter-icon"]&&($.renderFilterIcon=M=>le(e,"filter-icon",M)),e.expand&&($.renderExpand=M=>le(e,"expand",M));let x=$.renderCell;return $.type==="expand"?($.renderCell=M=>vt("div",{class:"cell"},[x(M)]),n.value.renderExpanded=M=>e.default?e.default(M):e.default):(x=x||B1e,$.renderCell=M=>{let P=null;if(e.default){const V=e.default(M);P=V.some(H=>H.type!==ks)?V:x(M)}else P=x(M);const{columns:T}=n.value.store.states,I=T.value.findIndex(V=>V.type==="default"),L=z1e(M,u.value&&M.cellIndex===I),R={class:"cell",style:{}};return $.showOverflowTooltip&&(R.class=`${R.class} ${E(l.namespace)}-tooltip`,R.style={width:`${(M.column.realWidth||Number(M.column.width))-1}px`}),m(P),vt("div",R,[L,P])}),$},getPropsData:(...$)=>$.reduce((x,M)=>(Ee(M)&&M.forEach(P=>{x[P]=t[P]}),x),{}),getColumnElIndex:($,x)=>Array.prototype.indexOf.call($,x),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",i.columnConfig.value)}}}var j1e={type:{type:String,default:"default"},label:String,className:String,labelClassName:String,property:String,prop:String,width:{type:[String,Number],default:""},minWidth:{type:[String,Number],default:""},renderHeader:Function,sortable:{type:[Boolean,String],default:!1},sortMethod:Function,sortBy:[String,Function,Array],resizable:{type:Boolean,default:!0},columnKey:String,align:String,headerAlign:String,showOverflowTooltip:{type:[Boolean,Object],default:void 0},tooltipFormatter:Function,fixed:[Boolean,String],formatter:Function,selectable:Function,reserveSelection:Boolean,filterMethod:Function,filteredValue:Array,filters:Array,filterPlacement:String,filterMultiple:{type:Boolean,default:!0},filterClassName:String,index:[Number,Function],sortOrders:{type:Array,default:()=>["ascending","descending",null],validator:t=>t.every(e=>["ascending","descending",null].includes(e))}};let W1e=1;var Y1e=ce({name:"ElTableColumn",components:{ElCheckbox:Gt},props:j1e,setup(t,{slots:e}){const n=bt(),i=zc("table"),s=J({}),o=Y(()=>{let $=n.parent;for(;$&&!$.tableId;)$=$.parent;return $}),{registerNormalWatchers:r,registerComplexWatchers:a}=H1e(o,t),{columnId:l,isSubColumn:c,realHeaderAlign:u,columnOrTableParent:d,setColumnWidth:h,setColumnForcedProps:f,setColumnRenders:p,getPropsData:m,getColumnElIndex:y,realAlign:b,updateColumnOrder:k}=U1e(t,e,o),C=d.value;l.value=`${"tableId"in C&&C.tableId||"columnId"in C&&C.columnId}_column_${W1e++}`,Sd(()=>{var L,R;c.value=o.value!==C;const $=t.type||"default",x=t.sortable===""?!0:t.sortable,M=$==="selection"?!1:tn(t.showOverflowTooltip)?C.props.showOverflowTooltip??((L=i.value)==null?void 0:L.showOverflowTooltip):t.showOverflowTooltip,P=tn(t.tooltipFormatter)?C.props.tooltipFormatter??((R=i.value)==null?void 0:R.tooltipFormatter):t.tooltipFormatter,T={...V1e[$],id:l.value,type:$,property:t.prop||t.property,align:b,headerAlign:u,showOverflowTooltip:M,tooltipFormatter:P,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:x,index:t.index,rawColumnKey:n.vnode.key};let I=m(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);I=Hge(T,I),I=jge(p,h,f)(I),s.value=I,r(),a()}),Ft(()=>{var P,T;const $=d.value,x=c.value?(P=$.vnode.el)==null?void 0:P.children:(T=$.refs.hiddenColumns)==null?void 0:T.children,M=()=>y(x||[],n.vnode.el);s.value.getColumnIndex=M,M()>-1&&o.value.store.commit("insertColumn",s.value,c.value?"columnConfig"in $&&$.columnConfig.value:null,k)}),bn(()=>{const $=s.value.getColumnIndex;($?$():-1)>-1&&o.value.store.commit("removeColumn",s.value,c.value?"columnConfig"in C&&C.columnConfig.value:null,k)}),n.columnId=l.value,n.columnConfig=s},render(){var t,e,n;try{const i=(e=(t=this.$slots).default)==null?void 0:e.call(t,{row:{},column:{},$index:-1}),s=[];if(Ee(i))for(const o of i)((n=o.type)==null?void 0:n.name)==="ElTableColumn"||o.shapeFlag&2?s.push(o):o.type===ee&&Ee(o.children)&&o.children.forEach(r=>{(r==null?void 0:r.patchFlag)!==1024&&!Ke(r==null?void 0:r.children)&&s.push(r)});return vt("div",s)}catch{return vt("div",[])}}}),$V=Y1e;const Gr=jt(D1e,{TableColumn:$V}),Xr=Is($V),Ob=Symbol("tabsRootContextKey"),q1e=Ge({tabs:{type:he(Array),default:()=>ii([])},tabRefs:{type:he(Object),default:()=>ii({})}}),nA="ElTabBar";var G1e=ce({name:nA,__name:"tab-bar",props:q1e,setup(t,{expose:e}){const n=t,i=qe(Ob);i||uo(nA,"<el-tabs><el-tab-bar /></el-tabs>");const s=ze("tabs"),o=J(),r=J(),a=Y(()=>{var f;return tn(i.props.defaultValue)||!!((f=r.value)!=null&&f.transform)}),l=()=>{let f=0,p=0;const m=["top","bottom"].includes(i.props.tabPosition)?"width":"height",y=m==="width"?"x":"y",b=y==="x"?"left":"top";return n.tabs.every(k=>{if(tn(k.paneName))return!1;const C=n.tabRefs[k.paneName];if(!C)return!1;if(!k.active)return!0;f=C[`offset${Z2(b)}`],p=C[`client${Z2(m)}`];const $=window.getComputedStyle(C);return m==="width"&&(p-=Number.parseFloat($.paddingLeft)+Number.parseFloat($.paddingRight),f+=Number.parseFloat($.paddingLeft)),!1}),{[m]:`${p}px`,transform:`translate${Z2(y)}(${f}px)`}},c=()=>r.value=l(),u=[],d=()=>{u.forEach(f=>f.stop()),u.length=0,Object.values(n.tabRefs).forEach(f=>{u.push(Es(f,c))})};Te(()=>n.tabs,async()=>{await ot(),c(),d()},{immediate:!0});const h=Es(o,()=>c());return bn(()=>{u.forEach(f=>f.stop()),u.length=0,h.stop()}),e({ref:o,update:c}),(f,p)=>a.value?(v(),A("div",{key:0,ref_key:"barRef",ref:o,class:G([E(s).e("active-bar"),E(s).is(E(i).props.tabPosition)]),style:Xe(r.value)},null,6)):O("v-if",!0)}}),X1e=G1e;const K1e=Ge({panes:{type:he(Array),default:()=>ii([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean,tabindex:{type:[String,Number],default:void 0}}),Z1e={tabClick:(t,e,n)=>n instanceof Event,tabRemove:(t,e)=>e instanceof Event},sA="ElTabNav",J1e=ce({name:sA,props:K1e,emits:Z1e,setup(t,{expose:e,emit:n}){const i=qe(Ob);i||uo(sA,"<el-tabs><tab-nav /></el-tabs>");const s=ze("tabs"),o=Ase(),r=Tse(),a=J(),l=J(),c=J(),u=J({}),d=J(),h=J(!1),f=J(0),p=J(!1),m=J(!0),y=J(!1),b=Hn(),k=Y(()=>["top","bottom"].includes(i.props.tabPosition)),C=Y(()=>k.value?"width":"height"),$=Y(()=>{const ne=C.value==="width"?"X":"Y";return{transition:y.value?"none":void 0,transform:`translate${ne}(-${f.value}px)`}}),{width:x,height:M}=N7(a),{width:P,height:T}=N7(l,{width:0,height:0},{box:"border-box"}),I=Y(()=>k.value?x.value:M.value),L=Y(()=>k.value?P.value:T.value),{onWheel:R}=Sge({atStartEdge:Y(()=>f.value<=0),atEndEdge:Y(()=>L.value-f.value<=I.value),layout:Y(()=>k.value?"horizontal":"vertical")},ne=>{f.value=tO(f.value+ne,0,L.value-I.value)}),V=ne=>{y.value=!0,R(ne),Mg(()=>{y.value=!1})},H=()=>{if(!a.value)return;const ne=a.value.getBoundingClientRect()[C.value],Z=f.value;Z&&(f.value=Z>ne?Z-ne:0)},F=()=>{if(!a.value||!l.value)return;const ne=l.value.getBoundingClientRect()[C.value],Z=a.value.getBoundingClientRect()[C.value],ae=f.value;Xh(ne-ae,Z)&&(f.value=ne-ae>Z*2?ae+Z:ne-Z)},z=async()=>{const ne=l.value;if(!h.value||!c.value||!a.value||!ne)return;await ot();const Z=u.value[t.currentName];if(!Z)return;const ae=a.value,me=Z.getBoundingClientRect(),we=ae.getBoundingClientRect(),oe=we.left+1,fe=we.right-1,ie=ne.getBoundingClientRect(),re=k.value?ie.width-we.width:ie.height-we.height,ke=f.value;let je=ke;k.value?(me.left<oe&&(je=ke-(oe-me.left)),me.right>fe&&(je=ke+me.right-fe)):(me.top<we.top&&(je=ke-(we.top-me.top)),me.bottom>we.bottom&&(je=ke+(me.bottom-we.bottom))),je=Math.max(je,0),f.value=Math.min(je,re)},N=()=>{var me;if(!l.value||!a.value)return;t.stretch&&((me=d.value)==null||me.update());const ne=l.value.getBoundingClientRect()[C.value],Z=a.value.getBoundingClientRect()[C.value],ae=f.value;Z<ne?(h.value=h.value||{},h.value.prev=ae,h.value.next=Xh(ne,ae+Z),Xh(Z,ne-ae)&&(f.value=ne-Z)):(h.value=!1,ae>0&&(f.value=0))},q=ne=>{const Z=ss(ne);let ae=0;switch(Z){case Ue.left:case Ue.up:ae=-1;break;case Ue.right:case Ue.down:ae=1;break;default:return}const me=Array.from(ne.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let we=me.indexOf(ne.target)+ae;we<0?we=me.length-1:we>=me.length&&(we=0),me[we].focus({preventScroll:!0}),me[we].click(),K()},K=()=>{m.value&&(p.value=!0)},X=()=>p.value=!1,U=(ne,Z)=>{u.value[Z]=ne},Q=async()=>{var ne;await ot(),(ne=u.value[t.currentName])==null||ne.focus({preventScroll:!0})};return Te(o,ne=>{ne==="hidden"?m.value=!1:ne==="visible"&&setTimeout(()=>m.value=!0,50)}),Te(r,ne=>{ne?setTimeout(()=>m.value=!0,50):m.value=!1}),Es(c,()=>{Mg(N)}),Ft(()=>setTimeout(()=>z(),0)),ul(()=>N()),e({scrollToActiveTab:z,removeFocus:X,focusActiveTab:Q,tabListRef:l,tabBarRef:d,scheduleRender:()=>Am(b)}),()=>{const ne=h.value?[_("span",{class:[s.e("nav-prev"),s.is("disabled",!h.value.prev)],onClick:H},[_(be,null,{default:()=>[_(Tf,null,null)]})]),_("span",{class:[s.e("nav-next"),s.is("disabled",!h.value.next)],onClick:F},[_(be,null,{default:()=>[_(ma,null,null)]})])]:null,Z=t.panes.map((ae,me)=>{var te,se;const we=ae.uid,oe=ae.props.disabled,fe=ae.props.name??ae.index??`${me}`,ie=!oe&&(ae.isClosable||ae.props.closable!==!1&&t.editable);ae.index=`${me}`;const re=ie?_(be,{class:"is-icon-close",onClick:ve=>n("tabRemove",ae,ve)},{default:()=>[_(Fr,null,null)]}):null,ke=((se=(te=ae.slots).label)==null?void 0:se.call(te))||ae.props.label,je=!oe&&ae.active?t.tabindex??i.props.tabindex:-1;return _("div",{ref:ve=>U(ve,fe),class:[s.e("item"),s.is(i.props.tabPosition),s.is("active",ae.active),s.is("disabled",oe),s.is("closable",ie),s.is("focus",p.value)],id:`tab-${fe}`,key:`tab-${we}`,"aria-controls":`pane-${fe}`,role:"tab","aria-selected":ae.active,tabindex:je,onFocus:()=>K(),onBlur:()=>X(),onClick:ve=>{X(),n("tabClick",ae,fe,ve)},onKeydown:ve=>{const $e=ss(ve);ie&&($e===Ue.delete||$e===Ue.backspace)&&n("tabRemove",ae,ve)}},[ke,re])});return b.value,_("div",{ref:c,class:[s.e("nav-wrap"),s.is("scrollable",!!h.value),s.is(i.props.tabPosition)]},[ne,_("div",{class:s.e("nav-scroll"),ref:a},[t.panes.length>0?_("div",{class:[s.e("nav"),s.is(i.props.tabPosition),s.is("stretch",t.stretch&&["top","bottom"].includes(i.props.tabPosition))],ref:l,style:$.value,role:"tablist",onKeydown:q,onWheel:V},[t.type?null:_(X1e,{ref:d,tabs:[...t.panes],tabRefs:u.value},null),Z]):null])])}}}),Q1e=Ge({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},defaultValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:he(Function),default:()=>!0},stretch:Boolean,tabindex:{type:[String,Number],default:0}}),mw=t=>Ke(t)||_t(t),eve={[Mt]:t=>mw(t),tabClick:(t,e)=>e instanceof Event,tabChange:t=>mw(t),edit:(t,e)=>["remove","add"].includes(e),tabRemove:t=>mw(t),tabAdd:()=>!0},tve=ce({name:"ElTabs",props:Q1e,emits:eve,setup(t,{emit:e,slots:n,expose:i}){const s=ze("tabs"),o=Y(()=>["left","right"].includes(t.tabPosition)),{children:r,addChild:a,removeChild:l,ChildrenSorter:c}=Boe(bt(),"ElTabPane"),u=J(),d=J((tn(t.modelValue)?t.defaultValue:t.modelValue)??"0"),h=async(k,C=!1)=>{var $,x,M,P;if(!(d.value===k||tn(k)))try{let T;if(t.beforeLeave){const I=t.beforeLeave(k,d.value);T=I instanceof Promise?await I:I}else T=!0;if(T!==!1){const I=($=r.value.find(L=>L.paneName===d.value))==null?void 0:$.isFocusInsidePane();d.value=k,C&&(e(Mt,k),e("tabChange",k)),(M=(x=u.value)==null?void 0:x.removeFocus)==null||M.call(x),I&&((P=u.value)==null||P.focusActiveTab())}}catch{}},f=(k,C,$)=>{k.props.disabled||(e("tabClick",k,$),h(C,!0))},p=(k,C)=>{k.props.disabled||tn(k.props.name)||(C.stopPropagation(),e("edit",k.props.name,"remove"),e("tabRemove",k.props.name))},m=()=>{e("edit",void 0,"add"),e("tabAdd")},y=k=>{const C=ss(k);[Ue.enter,Ue.numpadEnter].includes(C)&&m()},b=k=>{const C=k.el.firstChild,$=["bottom","right"].includes(t.tabPosition)?k.children[0].el:k.children[1].el;C!==$&&C.before($)};return Te(()=>t.modelValue,k=>h(k)),Te(d,async()=>{var k;await ot(),(k=u.value)==null||k.scrollToActiveTab()}),It(Ob,{props:t,currentName:d,registerPane:a,unregisterPane:l,nav$:u}),i({currentName:d,get tabNavRef(){return vb(u.value,["scheduleRender"])}}),()=>{const k=n["add-icon"],C=t.editable||t.addable?_("div",{class:[s.e("new-tab"),o.value&&s.e("new-tab-vertical")],tabindex:t.tabindex,onClick:m,onKeydown:y},[k?le(n,"add-icon"):_(be,{class:s.is("icon-plus")},{default:()=>[_(CD,null,null)]})]):null,$=()=>_(J1e,{ref:u,currentName:d.value,editable:t.editable,type:t.type,panes:r.value,stretch:t.stretch,onTabClick:f,onTabRemove:p},null),x=_("div",{class:[s.e("header"),o.value&&s.e("header-vertical"),s.is(t.tabPosition)]},[_(c,null,{default:$,$stable:!0}),C]),M=_("div",{class:s.e("content")},[le(n,"default")]);return _("div",{class:[s.b(),s.m(t.tabPosition),{[s.m("card")]:t.type==="card",[s.m("border-card")]:t.type==="border-card"}],onVnodeMounted:b,onVnodeUpdated:b},[M,x])}}}),nve=Ge({label:{type:String,default:""},name:{type:[String,Number]},closable:{type:Boolean,default:void 0},disabled:Boolean,lazy:Boolean}),sve=["id","aria-hidden","aria-labelledby"],iA="ElTabPane";var ive=ce({name:iA,__name:"tab-pane",props:nve,setup(t){const e=t,n=bt(),i=di(),s=qe(Ob);s||uo(iA,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const o=ze("tab-pane"),r=J(),a=J(),l=Y(()=>e.closable??s.props.closable),c=Y(()=>s.currentName.value===(e.name??a.value)),u=J(c.value),d=Y(()=>e.name??a.value),h=Y(()=>!e.lazy||u.value||c.value),f=()=>{var m;return(m=r.value)==null?void 0:m.contains(document.activeElement)};Te(c,m=>{m&&(u.value=!0)});const p=In({uid:n.uid,getVnode:()=>n.vnode,slots:i,props:e,paneName:d,active:c,index:a,isClosable:l,isFocusInsidePane:f});return s.registerPane(p),bn(()=>{s.unregisterPane(p)}),ux(()=>{var m;i.label&&((m=s.nav$.value)==null||m.scheduleRender())}),(m,y)=>h.value?De((v(),A("div",{key:0,id:`pane-${d.value}`,ref_key:"paneRef",ref:r,class:G(E(o).b()),role:"tabpanel","aria-hidden":!c.value,"aria-labelledby":`tab-${d.value}`},[le(m.$slots,"default")],10,sve)),[[Ut,c.value]]):O("v-if",!0)}}),AV=ive;const Db=jt(tve,{TabPane:AV}),Rb=Is(AV),t6="00:30",ove=Ge({format:{type:String,default:"HH:mm"},modelValue:{type:he(String)},disabled:{type:Boolean,default:void 0},editable:{type:Boolean,default:!0},effect:{type:he(String),default:"light"},clearable:{type:Boolean,default:!0},size:Wi,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:t6},minTime:{type:he(String)},maxTime:{type:he(String)},includeEndTime:Boolean,name:String,prefixIcon:{type:he([String,Object]),default:()=>kD},clearIcon:{type:he([String,Object]),default:()=>Bc},popperClass:{type:String,default:""},popperStyle:{type:he([String,Object])},...b1}),Ya=t=>{const e=(t||"").split(":");if(e.length>=2){let n=Number.parseInt(e[0],10);const i=Number.parseInt(e[1],10),s=t.toUpperCase();return s.includes("AM")&&n===12?n=0:s.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:i}}return null},gw=(t,e)=>{const n=Ya(t);if(!n)return-1;const i=Ya(e);if(!i)return-1;const s=n.minutes+n.hours*60,o=i.minutes+i.hours*60;return s===o?0:s>o?1:-1},oA=t=>`${t}`.padStart(2,"0"),gh=t=>`${oA(t.hours)}:${oA(t.minutes)}`,rve=(t,e)=>{const n=Ya(t);if(!n)return"";const i=Ya(e);if(!i)return"";const s={hours:n.hours,minutes:n.minutes};return s.minutes+=i.minutes,s.hours+=i.hours,s.hours+=Math.floor(s.minutes/60),s.minutes=s.minutes%60,gh(s)};var ave=ce({name:"ElTimeSelect",__name:"time-select",props:ove,emits:[un,"blur","focus","clear",Mt],setup(t,{expose:e}){dt.extend(mR);const{Option:n}=Jt,i=t,s=ze("input"),o=J(),r=ys(),{lang:a}=Qt(),l=Y(()=>i.modelValue),c=Y(()=>{const b=Ya(i.start);return b?gh(b):null}),u=Y(()=>{const b=Ya(i.end);return b?gh(b):null}),d=Y(()=>{const b=Ya(i.minTime||"");return b?gh(b):null}),h=Y(()=>{const b=Ya(i.maxTime||"");return b?gh(b):null}),f=Y(()=>{const b=Ya(i.step),k=!b||b.hours<0||b.minutes<0||Number.isNaN(b.hours)||Number.isNaN(b.minutes)||b.hours===0&&b.minutes===0;return k&&Pt("ElTimeSelect",`invalid step, fallback to default step (${t6}).`),k?t6:gh(b)}),p=Y(()=>{var C;const b=[],k=($,x)=>{b.push({value:$,rawValue:x,disabled:gw(x,d.value||"-1:-1")<=0||gw(x,h.value||"100:100")>=0})};if(i.start&&i.end&&i.step){let $=c.value,x;for(;$&&u.value&&gw($,u.value)<=0;)x=dt($,"HH:mm").locale(a.value).format(i.format),k(x,$),$=rve($,f.value);i.includeEndTime&&u.value&&((C=b[b.length-1])==null?void 0:C.rawValue)!==u.value&&k(dt(u.value,"HH:mm").locale(a.value).format(i.format),u.value)}return b});return e({blur:()=>{var b,k;(k=(b=o.value)==null?void 0:b.blur)==null||k.call(b)},focus:()=>{var b,k;(k=(b=o.value)==null?void 0:b.focus)==null||k.call(b)}}),(b,k)=>(v(),D(E(Jt),{ref_key:"select",ref:o,name:t.name,"model-value":l.value,disabled:E(r),clearable:t.clearable,"clear-icon":t.clearIcon,size:t.size,effect:t.effect,placeholder:t.placeholder,"default-first-option":"",filterable:t.editable,"empty-values":t.emptyValues,"value-on-clear":t.valueOnClear,"popper-class":t.popperClass,"popper-style":t.popperStyle,"onUpdate:modelValue":k[0]||(k[0]=C=>b.$emit(E(Mt),C)),onChange:k[1]||(k[1]=C=>b.$emit(E(un),C)),onBlur:k[2]||(k[2]=C=>b.$emit("blur",C)),onFocus:k[3]||(k[3]=C=>b.$emit("focus",C)),onClear:k[4]||(k[4]=()=>b.$emit("clear"))},{prefix:w(()=>[t.prefixIcon?(v(),D(E(be),{key:0,class:G(E(s).e("prefix-icon"))},{default:w(()=>[(v(),D(Ct(t.prefixIcon)))]),_:1},8,["class"])):O("v-if",!0)]),default:w(()=>[(v(!0),A(ee,null,Ce(p.value,C=>(v(),D(E(n),{key:C.value,label:C.value,value:C.value,disabled:C.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["name","model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","popper-class","popper-style"]))}}),lve=ave;const s8=jt(lve),cve="ElUpload";var uve=class extends Error{constructor(t,e,n,i){super(t),this.name="UploadAjaxError",this.status=e,this.method=n,this.url=i}};function rA(t,e,n){let i;return n.response?i=`${n.response.error||n.response}`:n.responseText?i=`${n.responseText}`:i=`fail to ${e.method} ${t} ${n.status}`,new uve(i,n.status,e.method,t)}function dve(t){const e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}const hve=t=>{typeof XMLHttpRequest>"u"&&uo(cve,"XMLHttpRequest is undefined");const e=new XMLHttpRequest,n=t.action;e.upload&&e.upload.addEventListener("progress",o=>{const r=o;r.percent=o.total>0?o.loaded/o.total*100:0,t.onProgress(r)});const i=new FormData;if(t.data)for(const[o,r]of Object.entries(t.data))Ee(r)?r.length===2&&r[0]instanceof Blob&&Ke(r[1])?i.append(o,r[0],r[1]):r.forEach(a=>{i.append(o,a)}):i.append(o,r);i.append(t.filename,t.file,t.file.name),e.addEventListener("error",()=>{t.onError(rA(n,t,e))}),e.addEventListener("load",()=>{if(e.status<200||e.status>=300)return t.onError(rA(n,t,e));t.onSuccess(dve(e))}),e.open(t.method,n,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);const s=t.headers||{};if(s instanceof Headers)s.forEach((o,r)=>e.setRequestHeader(r,o));else for(const[o,r]of Object.entries(s))ai(r)||e.setRequestHeader(o,String(r));return e.send(i),e},EV=["text","picture","picture-card"];let fve=1;const n6=()=>Date.now()+fve++,MV=Ge({action:{type:String,default:"#"},headers:{type:he(Object)},method:{type:String,default:"post"},data:{type:he([Object,Function,Promise]),default:()=>ii({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:he(Array),default:()=>ii([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:EV,default:"text"},httpRequest:{type:he(Function),default:hve},disabled:{type:Boolean,default:void 0},limit:Number,directory:Boolean}),pve=Ge({...MV,beforeUpload:{type:he(Function),default:Tt},beforeRemove:{type:he(Function)},onRemove:{type:he(Function),default:Tt},onChange:{type:he(Function),default:Tt},onPreview:{type:he(Function),default:Tt},onSuccess:{type:he(Function),default:Tt},onProgress:{type:he(Function),default:Tt},onError:{type:he(Function),default:Tt},onExceed:{type:he(Function),default:Tt},crossorigin:{type:he(String)}}),TV=Symbol("uploadContextKey"),mve=Ge({files:{type:he(Array),default:()=>ii([])},disabled:{type:Boolean,default:void 0},handlePreview:{type:he(Function),default:Tt},listType:{type:String,values:EV,default:"text"},crossorigin:{type:he(String)}}),gve={remove:t=>!!t},vve=Ge({...MV,beforeUpload:{type:he(Function),default:Tt},onRemove:{type:he(Function),default:Tt},onStart:{type:he(Function),default:Tt},onSuccess:{type:he(Function),default:Tt},onProgress:{type:he(Function),default:Tt},onError:{type:he(Function),default:Tt},onExceed:{type:he(Function),default:Tt}}),_ve=Ge({disabled:{type:Boolean,default:void 0},directory:Boolean}),yve={file:t=>Ee(t)},bve=["tabindex","aria-disabled","onKeydown"],wve=["src","crossorigin"],kve=["onClick"],Cve=["title"],xve=["onClick"],Sve=["onClick"];var $ve=ce({name:"ElUploadList",__name:"upload-list",props:mve,emits:gve,setup(t,{emit:e}){const n=t,i=e,{t:s}=Qt(),o=ze("upload"),r=ze("icon"),a=ze("list"),l=ys(),c=J(!1),u=Y(()=>[o.b("list"),o.bm("list",n.listType),o.is("disabled",l.value)]),d=h=>{i("remove",h)};return(h,f)=>(v(),D(ib,{tag:"ul",class:G(u.value),name:E(a).b()},{default:w(()=>[(v(!0),A(ee,null,Ce(t.files,(p,m)=>(v(),A("li",{key:p.uid||p.name,class:G([E(o).be("list","item"),E(o).is(p.status),{focusing:c.value}]),tabindex:E(l)?void 0:0,"aria-disabled":E(l),role:"button",onKeydown:ut(y=>!E(l)&&d(p),["delete"]),onFocus:f[0]||(f[0]=y=>c.value=!0),onBlur:f[1]||(f[1]=y=>c.value=!1),onClick:f[2]||(f[2]=y=>c.value=!1)},[le(h.$slots,"default",{file:p,index:m},()=>[t.listType==="picture"||p.status!=="uploading"&&t.listType==="picture-card"?(v(),A("img",{key:0,class:G(E(o).be("list","item-thumbnail")),src:p.url,crossorigin:t.crossorigin,alt:""},null,10,wve)):O("v-if",!0),p.status==="uploading"||t.listType!=="picture-card"?(v(),A("div",{key:1,class:G(E(o).be("list","item-info"))},[g("a",{class:G(E(o).be("list","item-name")),onClick:Ae(y=>t.handlePreview(p),["prevent"])},[_(E(be),{class:G(E(r).m("document"))},{default:w(()=>[_(E(hre))]),_:1},8,["class"]),g("span",{class:G(E(o).be("list","item-file-name")),title:p.name},S(p.name),11,Cve)],10,kve),p.status==="uploading"?(v(),D(E(Lb),{key:0,type:t.listType==="picture-card"?"circle":"line","stroke-width":t.listType==="picture-card"?6:2,percentage:Number(p.percentage),style:Xe(t.listType==="picture-card"?"":"margin-top: 0.5rem")},null,8,["type","stroke-width","percentage","style"])):O("v-if",!0)],2)):O("v-if",!0),g("label",{class:G(E(o).be("list","item-status-label"))},[t.listType==="text"?(v(),D(E(be),{key:0,class:G([E(r).m("upload-success"),E(r).m("circle-check")])},{default:w(()=>[_(E(S4))]),_:1},8,["class"])):["picture-card","picture"].includes(t.listType)?(v(),D(E(be),{key:1,class:G([E(r).m("upload-success"),E(r).m("check")])},{default:w(()=>[_(E(bD))]),_:1},8,["class"])):O("v-if",!0)],2),E(l)?O("v-if",!0):(v(),D(E(be),{key:2,class:G(E(r).m("close")),"aria-label":E(s)("el.upload.delete"),role:"button",tabindex:"0",onClick:y=>d(p),onKeydown:ut(Ae(y=>d(p),["prevent"]),["enter","space"])},{default:w(()=>[_(E(Fr))]),_:1},8,["class","aria-label","onClick","onKeydown"])),E(l)?O("v-if",!0):(v(),A("i",{key:3,class:G(E(r).m("close-tip"))},S(E(s)("el.upload.deleteTip")),3)),t.listType==="picture-card"?(v(),A("span",{key:4,class:G(E(o).be("list","item-actions"))},[g("span",{class:G(E(o).be("list","item-preview")),onClick:y=>t.handlePreview(p)},[_(E(be),{class:G(E(r).m("zoom-in"))},{default:w(()=>[_(E(SD))]),_:1},8,["class"])],10,xve),E(l)?O("v-if",!0):(v(),A("span",{key:0,class:G(E(o).be("list","item-delete")),onClick:y=>d(p)},[_(E(be),{class:G(E(r).m("delete"))},{default:w(()=>[_(E(ure))]),_:1},8,["class"])],10,Sve))],2)):O("v-if",!0)])],42,bve))),128)),le(h.$slots,"append")]),_:3},8,["class","name"]))}}),aA=$ve;const lA="ElUploadDrag";var Ave=ce({name:lA,__name:"upload-dragger",props:_ve,emits:yve,setup(t,{emit:e}){const n=t,i=e;qe(TV)||uo(lA,"usage: <el-upload><el-upload-dragger /></el-upload>");const s=ze("upload"),o=J(!1),r=ys(),a=h=>new Promise((f,p)=>h.file(f,p)),l=async h=>{try{if(h.isFile){const f=await a(h);return f.isDirectory=!1,[f]}if(h.isDirectory){const f=h.createReader(),p=()=>new Promise((k,C)=>f.readEntries(k,C)),m=[];let y=await p();for(;y.length>0;)m.push(...y),y=await p();const b=m.map(k=>l(k).catch(()=>[]));return q_(await Promise.all(b))}}catch{return[]}return[]},c=async h=>{if(r.value)return;o.value=!1,h.stopPropagation();const f=Array.from(h.dataTransfer.files),p=h.dataTransfer.items||[];if(n.directory){const m=Array.from(p).map(y=>{var b;return(b=y==null?void 0:y.webkitGetAsEntry)==null?void 0:b.call(y)}).filter(y=>y);i("file",q_(await Promise.all(m.map(l))));return}f.forEach((m,y)=>{var k,C;const b=(C=(k=p[y])==null?void 0:k.webkitGetAsEntry)==null?void 0:C.call(k);b&&(m.isDirectory=b.isDirectory)}),i("file",f)},u=()=>{r.value||(o.value=!0)},d=h=>{h.currentTarget.contains(h.relatedTarget)||(o.value=!1)};return(h,f)=>(v(),A("div",{class:G([E(s).b("dragger"),E(s).is("dragover",o.value)]),onDrop:Ae(c,["prevent"]),onDragover:Ae(u,["prevent"]),onDragleave:Ae(d,["prevent"])},[le(h.$slots,"default")],34))}}),Eve=Ave;const Mve=["tabindex","aria-disabled","onKeydown"],Tve=["name","disabled","multiple","accept","webkitdirectory"];var Pve=ce({name:"ElUploadContent",inheritAttrs:!1,__name:"upload-content",props:vve,setup(t,{expose:e}){const n=t,i=ze("upload"),s=ys(),o=Hn({}),r=Hn(),a=m=>{if(m.length===0)return;const{autoUpload:y,limit:b,fileList:k,multiple:C,onStart:$,onExceed:x}=n;if(b&&k.length+m.length>b){x(m,k);return}C||(m=m.slice(0,1));for(const M of m){const P=M;P.uid=n6(),$(P),y&&l(P)}},l=async m=>{if(r.value.value="",!n.beforeUpload)return u(m);let y,b={};try{const C=n.data,$=n.beforeUpload(m);b=ag(n.data)?ju(n.data):n.data,y=await $,ag(n.data)&&Fi(C,b)&&(b=ju(n.data))}catch{y=!1}if(y===!1){n.onRemove(m);return}let k=m;y instanceof Blob&&(y instanceof File?k=y:k=new File([y],m.name,{type:m.type})),u(Object.assign(k,{uid:m.uid}),b)},c=async(m,y)=>et(m)?m(y):m,u=async(m,y)=>{const{headers:b,data:k,method:C,withCredentials:$,name:x,action:M,onProgress:P,onSuccess:T,onError:I,httpRequest:L}=n;try{y=await c(y??k,m)}catch{n.onRemove(m);return}const{uid:R}=m,V={headers:b||{},withCredentials:$,file:m,data:y,method:C,filename:x,action:M,onProgress:F=>{P(F,m)},onSuccess:F=>{T(F,m),delete o.value[R]},onError:F=>{I(F,m),delete o.value[R]}},H=L(V);o.value[R]=H,H instanceof Promise&&H.then(V.onSuccess,V.onError)},d=m=>{const y=m.target.files;y&&a(Array.from(y))},h=()=>{s.value||(r.value.value="",r.value.click())},f=()=>{h()};return e({abort:m=>{CO(o.value).filter(m?([y])=>String(m.uid)===y:()=>!0).forEach(([y,b])=>{b instanceof XMLHttpRequest&&b.abort(),delete o.value[y]})},upload:l}),(m,y)=>(v(),A("div",{class:G([E(i).b(),E(i).m(t.listType),E(i).is("drag",t.drag),E(i).is("disabled",E(s))]),tabindex:E(s)?void 0:0,"aria-disabled":E(s),role:"button",onClick:h,onKeydown:ut(Ae(f,["self"]),["enter","space"])},[t.drag?(v(),D(Eve,{key:0,disabled:E(s),directory:t.directory,onFile:a},{default:w(()=>[le(m.$slots,"default")]),_:3},8,["disabled","directory"])):le(m.$slots,"default",{key:1}),g("input",{ref_key:"inputRef",ref:r,class:G(E(i).e("input")),name:t.name,disabled:E(s),multiple:t.multiple,accept:t.accept,webkitdirectory:t.directory||void 0,type:"file",onChange:d,onClick:y[0]||(y[0]=Ae(()=>{},["stop"]))},null,42,Tve)],42,Mve))}}),cA=Pve;const uA="ElUpload",dA=t=>{var e;(e=t.url)!=null&&e.startsWith("blob:")&&URL.revokeObjectURL(t.url)},Ive=(t,e)=>{const n=Mse(t,"fileList",void 0,{passive:!0}),i=p=>n.value.find(m=>m.uid===p.uid);function s(p){var m;(m=e.value)==null||m.abort(p)}function o(p=["ready","uploading","success","fail"]){n.value=n.value.filter(m=>!p.includes(m.status))}function r(p){n.value=n.value.filter(m=>m.uid!==p.uid)}const a=p=>{ot(()=>t.onChange(p,n.value))},l=(p,m)=>{const y=i(m);y&&(console.error(p),y.status="fail",r(y),t.onError(p,y,n.value),a(y))},c=(p,m)=>{const y=i(m);y&&(t.onProgress(p,y,n.value),y.status="uploading",y.percentage=Math.round(p.percent))},u=(p,m)=>{const y=i(m);y&&(y.status="success",y.response=p,t.onSuccess(p,y,n.value),a(y))},d=p=>{ai(p.uid)&&(p.uid=n6());const m={name:p.name,percentage:0,status:"ready",size:p.size,raw:p,uid:p.uid};if(t.listType==="picture-card"||t.listType==="picture")try{m.url=URL.createObjectURL(p)}catch(y){Pt(uA,y.message),t.onError(y,m,n.value)}n.value=[...n.value,m],a(m)},h=async p=>{const m=p instanceof File?i(p):p;m||uo(uA,"file to be removed not found");const y=b=>{s(b),r(b),t.onRemove(b,n.value),dA(b)};t.beforeRemove?await t.beforeRemove(m,n.value)!==!1&&y(m):y(m)};function f(){n.value.filter(({status:p})=>p==="ready").forEach(({raw:p})=>{var m;return p&&((m=e.value)==null?void 0:m.upload(p))})}return Te(()=>t.listType,p=>{p!=="picture-card"&&p!=="picture"||(n.value=n.value.map(m=>{const{raw:y,url:b}=m;if(!b&&y)try{m.url=URL.createObjectURL(y)}catch(k){t.onError(k,m,n.value)}return m}))}),Te(n,p=>{for(const m of p)m.uid||(m.uid=n6()),m.status||(m.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:s,clearFiles:o,handleError:l,handleProgress:c,handleStart:d,handleSuccess:u,handleRemove:h,submit:f,revokeFileObjectURL:dA}};var Lve=ce({name:"ElUpload",__name:"upload",props:pve,setup(t,{expose:e}){const n=t,i=ys(),s=Hn(),{abort:o,submit:r,clearFiles:a,uploadFiles:l,handleStart:c,handleError:u,handleRemove:d,handleSuccess:h,handleProgress:f,revokeFileObjectURL:p}=Ive(n,s),m=Y(()=>n.listType==="picture-card"),y=Y(()=>({...n,fileList:l.value,onStart:c,onProgress:f,onSuccess:h,onError:u,onRemove:d}));return bn(()=>{l.value.forEach(p)}),It(TV,{accept:Sn(n,"accept")}),e({abort:o,submit:r,clearFiles:a,handleStart:c,handleRemove:d}),(b,k)=>(v(),A("div",null,[m.value&&t.showFileList?(v(),D(aA,{key:0,disabled:E(i),"list-type":t.listType,files:E(l),crossorigin:t.crossorigin,"handle-preview":t.onPreview,onRemove:E(d)},cs({append:w(()=>[_(cA,Zt({ref_key:"uploadRef",ref:s},y.value),{default:w(()=>[b.$slots.trigger?le(b.$slots,"trigger",{key:0}):O("v-if",!0),!b.$slots.trigger&&b.$slots.default?le(b.$slots,"default",{key:1}):O("v-if",!0)]),_:3},16)]),_:2},[b.$slots.file?{name:"default",fn:w(({file:C,index:$})=>[le(b.$slots,"file",{file:C,index:$})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):O("v-if",!0),!m.value||m.value&&!t.showFileList?(v(),D(cA,Zt({key:1,ref_key:"uploadRef",ref:s},y.value),{default:w(()=>[b.$slots.trigger?le(b.$slots,"trigger",{key:0}):O("v-if",!0),!b.$slots.trigger&&b.$slots.default?le(b.$slots,"default",{key:1}):O("v-if",!0)]),_:3},16)):O("v-if",!0),b.$slots.trigger?le(b.$slots,"default",{key:2}):O("v-if",!0),le(b.$slots,"tip"),!m.value&&t.showFileList?(v(),D(aA,{key:3,disabled:E(i),"list-type":t.listType,files:E(l),crossorigin:t.crossorigin,"handle-preview":t.onPreview,onRemove:E(d)},cs({_:2},[b.$slots.file?{name:"default",fn:w(({file:C,index:$})=>[le(b.$slots,"file",{file:C,index:$})]),key:"0"}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):O("v-if",!0)]))}}),Ove=Lve;const A1=jt(Ove);function Dve(t,e){let n;const i=J(!1),s=In({...t,originalPosition:"",originalOverflow:"",visible:!1});function o(h){s.text=h}function r(){const h=s.parent,f=d.ns;if(!h.vLoadingAddClassList){let p=h.getAttribute("loading-number");p=Number.parseInt(p)-1,p?h.setAttribute("loading-number",p.toString()):(_a(h,f.bm("parent","relative")),h.removeAttribute("loading-number")),_a(h,f.bm("parent","hidden"))}a(),u.unmount()}function a(){var h,f;(f=(h=d.$el)==null?void 0:h.parentNode)==null||f.removeChild(d.$el)}function l(){var h;t.beforeClose&&!t.beforeClose()||(i.value=!0,clearTimeout(n),n=setTimeout(c,400),s.visible=!1,(h=t.closed)==null||h.call(t))}function c(){if(!i.value)return;const h=s.parent;i.value=!1,h.vLoadingAddClassList=void 0,r()}const u=mx(ce({name:"ElLoading",setup(h,{expose:f}){const{ns:p,zIndex:m}=O4("loading");return f({ns:p,zIndex:m}),()=>{const y=s.spinner||s.svg,b=vt("svg",{class:"circular",viewBox:s.svgViewBox?s.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},[vt("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),k=s.text?vt("p",{class:p.b("text")},[s.text]):void 0;return vt(ji,{name:p.b("fade"),onAfterLeave:c},{default:w(()=>[De(_("div",{style:{backgroundColor:s.background||""},class:[p.b("mask"),s.customClass,p.is("fullscreen",s.fullscreen)]},[vt("div",{class:p.b("spinner")},[b,k])]),[[Ut,s.visible]])])})}}}));Object.assign(u._context,e??{});const d=u.mount(document.createElement("div"));return{...co(s),setText:o,removeElLoadingChild:a,close:l,handleAfterLeave:c,vm:d,get $el(){return d.$el}}}let Hv;const Kh=function(t={},e){if(!Xt)return;const n=Rve(t);if(n.fullscreen&&Hv)return Hv;const i=Dve({...n,closed:()=>{var o;(o=n.closed)==null||o.call(n),n.fullscreen&&(Hv=void 0)}},e??Kh._context);Vve(n,n.parent,i),hA(n,n.parent,i),n.parent.vLoadingAddClassList=()=>hA(n,n.parent,i);let s=n.parent.getAttribute("loading-number");return s?s=`${Number.parseInt(s)+1}`:s="1",n.parent.setAttribute("loading-number",s),n.parent.appendChild(i.$el),ot(()=>i.visible.value=n.visible),n.fullscreen&&(Hv=i),i},Rve=t=>{let e;return Ke(t.target)?e=document.querySelector(t.target)??document.body:e=t.target||document.body,{parent:e===document.body||t.body?document.body:e,background:t.background||"",svg:t.svg||"",svgViewBox:t.svgViewBox||"",spinner:t.spinner||!1,text:t.text||"",fullscreen:e===document.body&&(t.fullscreen??!0),lock:t.lock??!1,customClass:t.customClass||"",visible:t.visible??!0,beforeClose:t.beforeClose,closed:t.closed,target:e}},Vve=async(t,e,n)=>{const{nextZIndex:i}=n.vm.zIndex||n.vm._.exposed.zIndex,s={};if(t.fullscreen)n.originalPosition.value=Wa(document.body,"position"),n.originalOverflow.value=Wa(document.body,"overflow"),s.zIndex=i();else if(t.parent===document.body){n.originalPosition.value=Wa(document.body,"position"),await ot();for(const o of["top","left"]){const r=o==="top"?"scrollTop":"scrollLeft";s[o]=`${t.target.getBoundingClientRect()[o]+document.body[r]+document.documentElement[r]-Number.parseInt(Wa(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])s[o]=`${t.target.getBoundingClientRect()[o]}px`}else n.originalPosition.value=Wa(e,"position");for(const[o,r]of Object.entries(s))n.$el.style[o]=r},hA=(t,e,n)=>{const i=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?_a(e,i.bm("parent","relative")):ud(e,i.bm("parent","relative")),t.fullscreen&&t.lock?ud(e,i.bm("parent","hidden")):_a(e,i.bm("parent","hidden"))};Kh._context=null;const jp=Symbol("ElLoading"),uu=t=>`element-loading-${eo(t)}`,fA=(t,e)=>{const n=e.instance,i=c=>yt(e.value)?e.value[c]:void 0,s=c=>J(Ke(c)&&(n==null?void 0:n[c])||c),o=c=>s(i(c)||t.getAttribute(uu(c))),r=i("fullscreen")??e.modifiers.fullscreen,a={text:o("text"),svg:o("svg"),svgViewBox:o("svgViewBox"),spinner:o("spinner"),background:o("background"),customClass:o("customClass"),fullscreen:r,target:i("target")??(r?void 0:t),body:i("body")??e.modifiers.body,lock:i("lock")??e.modifiers.lock},l=Kh(a);l._context=Hm._context,t[jp]={options:a,instance:l}},Fve=(t,e)=>{for(const n of Object.keys(t))gn(t[n])&&(t[n].value=e[n])},Hm={mounted(t,e){e.value&&fA(t,e)},updated(t,e){const n=t[jp];if(!e.value){n==null||n.instance.close(),t[jp]=null;return}n?Fve(n.options,yt(e.value)?e.value:{text:t.getAttribute(uu("text")),svg:t.getAttribute(uu("svg")),svgViewBox:t.getAttribute(uu("svgViewBox")),spinner:t.getAttribute(uu("spinner")),background:t.getAttribute(uu("background")),customClass:t.getAttribute(uu("customClass"))}):fA(t,e)},unmounted(t){var e;(e=t[jp])==null||e.instance.close(),t[jp]=null}};Hm._context=null;const Nve={install(t){Kh._context=t._context,Hm._context=t._context,t.directive("loading",Hm),t.config.globalProperties.$loading=Kh},directive:Hm,service:Kh};var Bve=ce({name:"ElMessageBox",directives:{TrapFocus:qce},components:{ElButton:We,ElFocusTrap:k1,ElInput:ft,ElOverlay:q4,ElIcon:be,...$D},inheritAttrs:!1,props:{buttonSize:{type:String,validator:mV},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,overflow:Boolean,roundButton:Boolean,container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(t,{emit:e}){const{locale:n,zIndex:i,ns:s,size:o}=O4("message-box",Y(()=>t.buttonSize)),{t:r}=n,{nextZIndex:a}=i,l=J(!1),c=In({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",cancelButtonType:"",confirmButtonType:"primary",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",closeIcon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:"",inputValidator:void 0,inputErrorMessage:"",message:"",modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:Si(Pf),cancelButtonLoadingIcon:Si(Pf),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:a()}),u=Y(()=>{const z=c.type;return{[s.bm("icon",z)]:z&&If[z]}}),d=pr(),h=pr(),f=Y(()=>{const z=c.type;return c.icon||z&&If[z]||""}),p=Y(()=>!!c.message),m=J(),y=J(),b=J(),k=J(),C=J(),$=Y(()=>c.confirmButtonClass);Te(()=>c.inputValue,async z=>{await ot(),t.boxType==="prompt"&&z&&R()},{immediate:!0}),Te(()=>l.value,z=>{var N;z&&(t.boxType!=="prompt"&&(c.autofocus?b.value=((N=C.value)==null?void 0:N.$el)??m.value:b.value=m.value),c.zIndex=a()),t.boxType==="prompt"&&(z?ot().then(()=>{k.value&&k.value.$el&&(c.autofocus?b.value=V()??m.value:b.value=m.value)}):(c.editorErrorMessage="",c.validateError=!1))});const{isDragging:x}=FO(m,y,Y(()=>t.draggable),Y(()=>t.overflow));Ft(async()=>{await ot(),t.closeOnHashChange&&window.addEventListener("hashchange",M)}),bn(()=>{t.closeOnHashChange&&window.removeEventListener("hashchange",M)});function M(){l.value&&(l.value=!1,ot(()=>{c.action&&e("action",c.action)}))}const P=()=>{t.closeOnClickModal&&L(c.distinguishCancelAndClose?"close":"cancel")},T=g4(P),I=z=>{var N;if(c.inputType!=="textarea"&&!((N=k.value)!=null&&N.isComposing))return z.preventDefault(),L("confirm")},L=z=>{var N;t.boxType==="prompt"&&z==="confirm"&&!R()||(c.action=z,c.beforeClose?(N=c.beforeClose)==null||N.call(c,z,c,M):M())},R=()=>{if(t.boxType==="prompt"){const z=c.inputPattern;if(z&&!z.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;const N=c.inputValidator;if(et(N)){const q=N(c.inputValue);if(q===!1)return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;if(Ke(q))return c.editorErrorMessage=q,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},V=()=>{var N;const z=(N=k.value)==null?void 0:N.$refs;return(z==null?void 0:z.input)??(z==null?void 0:z.textarea)},H=()=>{L("close")},F=()=>{t.closeOnPressEscape&&H()};return t.lockScroll&&a4(l,{ns:s}),{...co(c),ns:s,overlayEvent:T,visible:l,hasMessage:p,typeClass:u,contentId:d,inputId:h,btnSize:o,iconComponent:f,confirmButtonClasses:$,rootRef:m,focusStartRef:b,headerRef:y,inputRef:k,isDragging:x,confirmRef:C,doClose:M,handleClose:H,onCloseRequested:F,handleWrapperClick:P,handleInputEnter:I,handleAction:L,t:r}}});const zve=["aria-label","aria-describedby"],Hve=["aria-label"],Uve=["id"];function jve(t,e,n,i,s,o){const r=W("el-icon"),a=W("el-input"),l=W("el-button"),c=W("el-focus-trap"),u=W("el-overlay");return v(),D(ji,{name:"fade-in-linear",onAfterLeave:e[11]||(e[11]=d=>t.$emit("vanish")),persisted:""},{default:w(()=>[De(_(u,{"z-index":t.zIndex,"overlay-class":[t.ns.is("message-box"),t.modalClass],mask:t.modal},{default:w(()=>[g("div",{role:"dialog","aria-label":t.title,"aria-modal":"true","aria-describedby":t.showInput?void 0:t.contentId,class:G(`${t.ns.namespace.value}-overlay-message-box`),onClick:e[8]||(e[8]=(...d)=>t.overlayEvent.onClick&&t.overlayEvent.onClick(...d)),onMousedown:e[9]||(e[9]=(...d)=>t.overlayEvent.onMousedown&&t.overlayEvent.onMousedown(...d)),onMouseup:e[10]||(e[10]=(...d)=>t.overlayEvent.onMouseup&&t.overlayEvent.onMouseup(...d))},[_(c,{loop:"",trapped:t.visible,"focus-trap-el":t.rootRef,"focus-start-el":t.focusStartRef,onReleaseRequested:t.onCloseRequested},{default:w(()=>[g("div",{ref:"rootRef",class:G([t.ns.b(),t.customClass,t.ns.is("draggable",t.draggable),t.ns.is("dragging",t.isDragging),{[t.ns.m("center")]:t.center}]),style:Xe(t.customStyle),tabindex:"-1",onClick:e[7]||(e[7]=Ae(()=>{},["stop"]))},[t.title!==null&&t.title!==void 0?(v(),A("div",{key:0,ref:"headerRef",class:G([t.ns.e("header"),{"show-close":t.showClose}])},[g("div",{class:G(t.ns.e("title"))},[t.iconComponent&&t.center?(v(),D(r,{key:0,class:G([t.ns.e("status"),t.typeClass])},{default:w(()=>[(v(),D(Ct(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),g("span",null,S(t.title),1)],2),t.showClose?(v(),A("button",{key:0,type:"button",class:G(t.ns.e("headerbtn")),"aria-label":t.t("el.messagebox.close"),onClick:e[0]||(e[0]=d=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel")),onKeydown:e[1]||(e[1]=ut(Ae(d=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[_(r,{class:G(t.ns.e("close"))},{default:w(()=>[(v(),D(Ct(t.closeIcon||"close")))]),_:1},8,["class"])],42,Hve)):O("v-if",!0)],2)):O("v-if",!0),g("div",{id:t.contentId,class:G(t.ns.e("content"))},[g("div",{class:G(t.ns.e("container"))},[t.iconComponent&&!t.center&&t.hasMessage?(v(),D(r,{key:0,class:G([t.ns.e("status"),t.typeClass])},{default:w(()=>[(v(),D(Ct(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),t.hasMessage?(v(),A("div",{key:1,class:G(t.ns.e("message"))},[le(t.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(v(),D(Ct(t.showInput?"label":"p"),{key:1,for:t.showInput?t.inputId:void 0,innerHTML:t.message},null,8,["for","innerHTML"])):(v(),D(Ct(t.showInput?"label":"p"),{key:0,for:t.showInput?t.inputId:void 0,textContent:S(t.message)},null,8,["for","textContent"]))])],2)):O("v-if",!0)],2),De(g("div",{class:G(t.ns.e("input"))},[_(a,{id:t.inputId,ref:"inputRef",modelValue:t.inputValue,"onUpdate:modelValue":e[2]||(e[2]=d=>t.inputValue=d),type:t.inputType,placeholder:t.inputPlaceholder,"aria-invalid":t.validateError,class:G({invalid:t.validateError}),onKeydown:ut(t.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),g("div",{class:G(t.ns.e("errormsg")),style:Xe({visibility:t.editorErrorMessage?"visible":"hidden"})},S(t.editorErrorMessage),7)],2),[[Ut,t.showInput]])],10,Uve),g("div",{class:G(t.ns.e("btns"))},[t.showCancelButton?(v(),D(l,{key:0,type:t.cancelButtonType==="text"?"":t.cancelButtonType,text:t.cancelButtonType==="text",loading:t.cancelButtonLoading,"loading-icon":t.cancelButtonLoadingIcon,class:G([t.cancelButtonClass]),round:t.roundButton,size:t.btnSize,onClick:e[3]||(e[3]=d=>t.handleAction("cancel")),onKeydown:e[4]||(e[4]=ut(Ae(d=>t.handleAction("cancel"),["prevent"]),["enter"]))},{default:w(()=>[B(S(t.cancelButtonText||t.t("el.messagebox.cancel")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","size"])):O("v-if",!0),De(_(l,{ref:"confirmRef",type:t.confirmButtonType==="text"?"":t.confirmButtonType,text:t.confirmButtonType==="text",loading:t.confirmButtonLoading,"loading-icon":t.confirmButtonLoadingIcon,class:G([t.confirmButtonClasses]),round:t.roundButton,disabled:t.confirmButtonDisabled,size:t.btnSize,onClick:e[5]||(e[5]=d=>t.handleAction("confirm")),onKeydown:e[6]||(e[6]=ut(Ae(d=>t.handleAction("confirm"),["prevent"]),["enter"]))},{default:w(()=>[B(S(t.confirmButtonText||t.t("el.messagebox.confirm")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","disabled","size"]),[[Ut,t.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,zve)]),_:3},8,["z-index","overlay-class","mask"]),[[Ut,t.visible]])]),_:3})}var Wve=hi(Bve,[["render",jve]]);const zg=new Map,Yve=t=>{let e=document.body;return t.appendTo&&(Ke(t.appendTo)&&(e=document.querySelector(t.appendTo)),$o(t.appendTo)&&(e=t.appendTo),$o(e)||(Pt("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),e=document.body)),e},qve=(t,e,n=null)=>{const i=_(Wve,t,et(t.message)||ls(t.message)?{default:et(t.message)?t.message:()=>t.message}:null);return i.appContext=n,ol(i,e),Yve(t).appendChild(e.firstElementChild),i.component},Gve=()=>document.createElement("div"),Xve=(t,e)=>{const n=Gve();t.onVanish=()=>{ol(null,n),zg.delete(s)},t.onAction=o=>{const r=zg.get(s);let a;t.showInput?a={value:s.inputValue,action:o}:a=o,t.callback?t.callback(a,i.proxy):o==="cancel"||o==="close"?t.distinguishCancelAndClose&&o!=="cancel"?r.reject("close"):r.reject("cancel"):r.resolve(a)};const i=qve(t,n,e),s=i.proxy;for(const o in t)Dt(t,o)&&!Dt(s.$props,o)&&(o==="closeIcon"&&yt(t[o])?s[o]=Si(t[o]):s[o]=t[o]);return s.visible=!0,s};function ip(t,e=null){if(!Xt)return Promise.reject();let n;return Ke(t)||ls(t)?t={message:t}:n=t.callback,new Promise((i,s)=>{const o=Xve(t,e??ip._context);zg.set(o,{options:t,callback:n,resolve:i,reject:s})})}const Kve=["alert","confirm","prompt"],Zve={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};Kve.forEach(t=>{ip[t]=Jve(t)});function Jve(t){return(e,n,i,s)=>{let o="";return yt(n)?(i=n,o=""):tn(n)?o="":o=n,ip(Object.assign({title:o,message:e,type:"",...Zve[t]},i,{boxType:t}),s)}}ip.close=()=>{zg.forEach((t,e)=>{e.doClose()}),zg.clear()};ip._context=null;const Ol=ip;Ol.install=t=>{Ol._context=t._context,t.config.globalProperties.$msgbox=Ol,t.config.globalProperties.$messageBox=Ol,t.config.globalProperties.$alert=Ol.alert,t.config.globalProperties.$confirm=Ol.confirm,t.config.globalProperties.$prompt=Ol.prompt};const vw=Ol,PV=["primary","success","info","warning","error"],Qve=Ge({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:as},id:{type:String,default:""},message:{type:he([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:he(Function),default:()=>{}},onClose:{type:he(Function),required:!0},position:{type:String,values:["top-right","top-left","bottom-right","bottom-left"],default:"top-right"},showClose:{type:Boolean,default:!0},title:{type:String,default:""},type:{type:String,values:[...PV,""],default:""},zIndex:Number,closeIcon:{type:as,default:Fr}}),e0e={destroy:()=>!0},t0e=["id"],n0e=["textContent"],s0e={key:0},i0e=["innerHTML"];var o0e=ce({name:"ElNotification",__name:"notification",props:Qve,emits:e0e,setup(t,{expose:e}){const n=t,{ns:i,zIndex:s}=O4("notification"),{nextZIndex:o,currentZIndex:r}=s,a=J(!1);let l;const c=Y(()=>{const k=n.type;return k&&If[n.type]?i.m(k):""}),u=Y(()=>n.type&&If[n.type]||n.icon),d=Y(()=>n.position.endsWith("right")?"right":"left"),h=Y(()=>n.position.startsWith("top")?"top":"bottom"),f=Y(()=>({[h.value]:`${n.offset}px`,zIndex:n.zIndex??r.value}));function p(){n.duration>0&&({stop:l}=kk(()=>{a.value&&y()},n.duration))}function m(){l==null||l()}function y(){a.value=!1}function b(k){switch(ss(k)){case Ue.delete:case Ue.backspace:m();break;case Ue.esc:a.value&&y();break;default:p();break}}return Ft(()=>{p(),o(),a.value=!0}),zn(document,"keydown",b),e({visible:a,close:y}),(k,C)=>(v(),D(ji,{name:E(i).b("fade"),onBeforeLeave:t.onClose,onAfterLeave:C[1]||(C[1]=$=>k.$emit("destroy")),persisted:""},{default:w(()=>[De(g("div",{id:t.id,class:G([E(i).b(),t.customClass,d.value]),style:Xe(f.value),role:"alert",onMouseenter:m,onMouseleave:p,onClick:C[0]||(C[0]=(...$)=>t.onClick&&t.onClick(...$))},[u.value?(v(),D(E(be),{key:0,class:G([E(i).e("icon"),c.value])},{default:w(()=>[(v(),D(Ct(u.value)))]),_:1},8,["class"])):O("v-if",!0),g("div",{class:G(E(i).e("group"))},[g("h2",{class:G(E(i).e("title")),textContent:S(t.title)},null,10,n0e),De(g("div",{class:G(E(i).e("content")),style:Xe(t.title?void 0:{margin:0})},[le(k.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(v(),A(ee,{key:1},[O(" Caution here, message could've been compromised, never use user's input as message "),g("p",{innerHTML:t.message},null,8,i0e)],2112)):(v(),A("p",s0e,S(t.message),1))])],6),[[Ut,t.message]]),t.showClose?(v(),D(E(be),{key:0,class:G(E(i).e("closeBtn")),onClick:Ae(y,["stop"])},{default:w(()=>[(v(),D(Ct(t.closeIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],46,t0e),[[Ut,a.value]])]),_:3},8,["name","onBeforeLeave"]))}}),r0e=o0e;const Rf={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},cy=16;let a0e=1;const hd=function(t={},e){if(!Xt)return{close:()=>{}};(Ke(t)||ls(t))&&(t={message:t});const n=t.position||"top-right";let i=t.offset||0;Rf[n].forEach(({vm:u})=>{var d;i+=(((d=u.el)==null?void 0:d.offsetHeight)||0)+cy}),i+=cy;const s=`notification_${a0e++}`,o=t.onClose,r={...t,offset:i,id:s,onClose:()=>{l0e(s,n,o)}};let a=document.body;$o(t.appendTo)?a=t.appendTo:Ke(t.appendTo)&&(a=document.querySelector(t.appendTo)),$o(a)||(Pt("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),a=document.body);const l=document.createElement("div"),c=_(r0e,r,et(r.message)?r.message:ls(r.message)?()=>r.message:null);return c.appContext=tn(e)?hd._context:e,c.props.onDestroy=()=>{ol(null,l)},ol(c,l),Rf[n].push({vm:c}),a.appendChild(l.firstElementChild),{close:()=>{c.component.exposed.visible.value=!1}}};PV.forEach(t=>{hd[t]=(e={},n)=>((Ke(e)||ls(e))&&(e={message:e}),hd({...e,type:t},n))});function l0e(t,e,n){const i=Rf[e],s=i.findIndex(({vm:c})=>{var u;return((u=c.component)==null?void 0:u.props.id)===t});if(s===-1)return;const{vm:o}=i[s];if(!o)return;n==null||n(o);const r=o.el.offsetHeight,a=e.split("-")[0];i.splice(s,1);const l=i.length;if(!(l<1))for(let c=s;c<l;c++){const{el:u,component:d}=i[c].vm,h=Number.parseInt(u.style[a],10)-r-cy;d.props.offset=h}}function c0e(){for(const t of Object.values(Rf))t.forEach(({vm:e})=>{e.component.exposed.visible.value=!1})}function u0e(t="top-right"){var n,i,s,o;let e=((s=(i=(n=Rf[t][0])==null?void 0:n.vm.component)==null?void 0:i.props)==null?void 0:s.offset)||0;for(const{vm:r}of Rf[t])r.component.props.offset=e,e+=(((o=r.el)==null?void 0:o.offsetHeight)||0)+cy}hd.closeAll=c0e;hd.updateOffsets=u0e;hd._context=null;const d0e=Woe(hd,"$notify"),h0e=Ge({trigger:vc.trigger,triggerKeys:vc.triggerKeys,placement:k0.placement,disabled:vc.disabled,visible:Bn.visible,transition:Bn.transition,popperOptions:k0.popperOptions,tabindex:k0.tabindex,content:Bn.content,popperStyle:Bn.popperStyle,popperClass:Bn.popperClass,enterable:{...Bn.enterable,default:!0},effect:{...Bn.effect,default:"light"},teleported:Bn.teleported,appendTo:Bn.appendTo,title:String,width:{type:[String,Number],default:150},offset:{type:Number,default:void 0},showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0},showArrow:{type:Boolean,default:!0},persistent:{type:Boolean,default:!0},"onUpdate:visible":{type:Function}}),f0e={"update:visible":t=>Xn(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},p0e="onUpdate:visible";var m0e=ce({name:"ElPopover",__name:"popover",props:h0e,emits:f0e,setup(t,{expose:e,emit:n}){const i=t,s=n,o=Y(()=>i[p0e]),r=ze("popover"),a=J(),l=Y(()=>{var b;return(b=E(a))==null?void 0:b.popperRef}),c=Y(()=>[{width:ci(i.width)},i.popperStyle]),u=Y(()=>[r.b(),i.popperClass,{[r.m("plain")]:!!i.content}]),d=Y(()=>i.transition===`${r.namespace.value}-fade-in-linear`),h=()=>{var b;(b=a.value)==null||b.hide()},f=()=>{s("before-enter")},p=()=>{s("before-leave")},m=()=>{s("after-enter")},y=()=>{s("update:visible",!1),s("after-leave")};return e({popperRef:l,hide:h}),(b,k)=>(v(),D(E(Cs),Zt({ref_key:"tooltipRef",ref:a},b.$attrs,{trigger:t.trigger,"trigger-keys":t.triggerKeys,placement:t.placement,disabled:t.disabled,visible:t.visible,transition:t.transition,"popper-options":t.popperOptions,tabindex:t.tabindex,content:t.content,offset:t.offset,"show-after":t.showAfter,"hide-after":t.hideAfter,"auto-close":t.autoClose,"show-arrow":t.showArrow,"aria-label":t.title,effect:t.effect,enterable:t.enterable,"popper-class":u.value,"popper-style":c.value,teleported:t.teleported,"append-to":t.appendTo,persistent:t.persistent,"gpu-acceleration":d.value,"onUpdate:visible":o.value,onBeforeShow:f,onBeforeHide:p,onShow:m,onHide:y}),{content:w(()=>[t.title?(v(),A("div",{key:0,class:G(E(r).e("title")),role:"title"},S(t.title),3)):O("v-if",!0),le(b.$slots,"default",{hide:h},()=>[B(S(t.content),1)])]),default:w(()=>[b.$slots.reference?le(b.$slots,"reference",{key:0}):O("v-if",!0)]),_:3},16,["trigger","trigger-keys","placement","disabled","visible","transition","popper-options","tabindex","content","offset","show-after","hide-after","auto-close","show-arrow","aria-label","effect","enterable","popper-class","popper-style","teleported","append-to","persistent","gpu-acceleration","onUpdate:visible"]))}}),g0e=m0e;const pA=(t,e)=>{var i;const n=(i=e.arg||e.value)==null?void 0:i.popperRef;n&&(n.triggerRef=t)};var v0e={mounted(t,e){pA(t,e)},updated(t,e){pA(t,e)}};const _0e="popover",y0e=Yoe(v0e,_0e),No=jt(g0e,{directive:y0e});var b0e=!1;/*!
 * pinia v2.3.1
 * (c) 2025 Eduardo San Martin Morote
 * @license MIT
 */let IV;const Vb=t=>IV=t,LV=Symbol();function s6(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Um;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Um||(Um={}));function w0e(){const t=Wy(!0),e=t.run(()=>J({}));let n=[],i=[];const s=Si({install(o){Vb(s),s._a=o,o.provide(LV,s),o.config.globalProperties.$pinia=s,i.forEach(r=>n.push(r)),i=[]},use(o){return!this._a&&!b0e?i.push(o):n.push(o),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return s}const OV=()=>{};function mA(t,e,n,i=OV){t.push(e);const s=()=>{const o=t.indexOf(e);o>-1&&(t.splice(o,1),i())};return!n&&Yy()&&qy(s),s}function eh(t,...e){t.slice().forEach(n=>{n(...e)})}const k0e=t=>t(),gA=Symbol(),_w=Symbol();function i6(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,i)=>t.set(i,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const i=e[n],s=t[n];s6(s)&&s6(i)&&t.hasOwnProperty(n)&&!gn(i)&&!pc(i)?t[n]=i6(s,i):t[n]=i}return t}const C0e=Symbol();function x0e(t){return!s6(t)||!t.hasOwnProperty(C0e)}const{assign:Dl}=Object;function S0e(t){return!!(gn(t)&&t.effect)}function $0e(t,e,n,i){const{state:s,actions:o,getters:r}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=s?s():{});const u=co(n.state.value[t]);return Dl(u,o,Object.keys(r||{}).reduce((d,h)=>(d[h]=Si(Y(()=>{Vb(n);const f=n._s.get(t);return r[h].call(f,f)})),d),{}))}return l=DV(t,c,e,n,i,!0),l}function DV(t,e,n={},i,s,o){let r;const a=Dl({actions:{}},n),l={deep:!0};let c,u,d=[],h=[],f;const p=i.state.value[t];!o&&!p&&(i.state.value[t]={}),J({});let m;function y(T){let I;c=u=!1,typeof T=="function"?(T(i.state.value[t]),I={type:Um.patchFunction,storeId:t,events:f}):(i6(i.state.value[t],T),I={type:Um.patchObject,payload:T,storeId:t,events:f});const L=m=Symbol();ot().then(()=>{m===L&&(c=!0)}),u=!0,eh(d,I,i.state.value[t])}const b=o?function(){const{state:I}=n,L=I?I():{};this.$patch(R=>{Dl(R,L)})}:OV;function k(){r.stop(),d=[],h=[],i._s.delete(t)}const C=(T,I="")=>{if(gA in T)return T[_w]=I,T;const L=function(){Vb(i);const R=Array.from(arguments),V=[],H=[];function F(q){V.push(q)}function z(q){H.push(q)}eh(h,{args:R,name:L[_w],store:x,after:F,onError:z});let N;try{N=T.apply(this&&this.$id===t?this:x,R)}catch(q){throw eh(H,q),q}return N instanceof Promise?N.then(q=>(eh(V,q),q)).catch(q=>(eh(H,q),Promise.reject(q))):(eh(V,N),N)};return L[gA]=!0,L[_w]=I,L},$={_p:i,$id:t,$onAction:mA.bind(null,h),$patch:y,$reset:b,$subscribe(T,I={}){const L=mA(d,T,I.detached,()=>R()),R=r.run(()=>Te(()=>i.state.value[t],V=>{(I.flush==="sync"?u:c)&&T({storeId:t,type:Um.direct,events:f},V)},Dl({},l,I)));return L},$dispose:k},x=In($);i._s.set(t,x);const P=(i._a&&i._a.runWithContext||k0e)(()=>i._e.run(()=>(r=Wy()).run(()=>e({action:C}))));for(const T in P){const I=P[T];if(gn(I)&&!S0e(I)||pc(I))o||(p&&x0e(I)&&(gn(I)?I.value=p[T]:i6(I,p[T])),i.state.value[t][T]=I);else if(typeof I=="function"){const L=C(I,T);P[T]=L,a.actions[T]=I}}return Dl(x,P),Dl(nn(x),P),Object.defineProperty(x,"$state",{get:()=>i.state.value[t],set:T=>{y(I=>{Dl(I,T)})}}),i._p.forEach(T=>{Dl(x,r.run(()=>T({store:x,app:i._a,pinia:i,options:a})))}),p&&o&&n.hydrate&&n.hydrate(x.$state,p),c=!0,u=!0,x}/*! #__NO_SIDE_EFFECTS__ */function E1(t,e,n){let i,s;const o=typeof e=="function";typeof t=="string"?(i=t,s=o?n:e):(s=t,i=t.id);function r(a,l){const c=JP();return a=a||(c?qe(LV,null):null),a&&Vb(a),a=IV,a._s.has(i)||(o?DV(i,e,s,a):$0e(i,s,a)),a._s.get(i)}return r.$id=i,r}function A0e(t,e){return Array.isArray(e)?e.reduce((n,i)=>(n[i]=function(){return t(this.$pinia)[i]},n),{}):Object.keys(e).reduce((n,i)=>(n[i]=function(){const s=t(this.$pinia),o=e[i];return typeof o=="function"?o.call(this,s):s[o]},n),{})}function E0e(t,e){return Array.isArray(e)?e.reduce((n,i)=>(n[i]=function(...s){return t(this.$pinia)[i](...s)},n),{}):Object.keys(e).reduce((n,i)=>(n[i]=function(...s){return t(this.$pinia)[e[i]](...s)},n),{})}function M0e(t){return typeof t=="object"&&t!==null}function vA(t,e){return t=M0e(t)?t:Object.create(null),new Proxy(t,{get(n,i,s){return i==="key"?Reflect.get(n,i,s):Reflect.get(n,i,s)||Reflect.get(e,i,s)}})}function T0e(t,e){return e.reduce((n,i)=>n==null?void 0:n[i],t)}function P0e(t,e,n){return e.slice(0,-1).reduce((i,s)=>/^(__proto__)$/.test(s)?{}:i[s]=i[s]||{},t)[e[e.length-1]]=n,t}function I0e(t,e){return e.reduce((n,i)=>{const s=i.split(".");return P0e(n,s,T0e(t,s))},{})}function L0e(t,e){return n=>{var i;try{const{storage:s=localStorage,beforeRestore:o=void 0,afterRestore:r=void 0,serializer:a={serialize:JSON.stringify,deserialize:JSON.parse},key:l=e.$id,paths:c=null,debug:u=!1}=n;return{storage:s,beforeRestore:o,afterRestore:r,serializer:a,key:((i=t.key)!=null?i:d=>d)(typeof l=="string"?l:l(e.$id)),paths:c,debug:u}}catch(s){return n.debug&&console.error("[pinia-plugin-persistedstate]",s),null}}}function _A(t,{storage:e,serializer:n,key:i,debug:s}){try{const o=e==null?void 0:e.getItem(i);o&&t.$patch(n==null?void 0:n.deserialize(o))}catch(o){s&&console.error("[pinia-plugin-persistedstate]",o)}}function yA(t,{storage:e,serializer:n,key:i,paths:s,debug:o}){try{const r=Array.isArray(s)?I0e(t,s):t;e.setItem(i,n.serialize(r))}catch(r){o&&console.error("[pinia-plugin-persistedstate]",r)}}function O0e(t={}){return e=>{const{auto:n=!1}=t,{options:{persist:i=n},store:s,pinia:o}=e;if(!i)return;if(!(s.$id in o.state.value)){const a=o._s.get(s.$id.replace("__hot:",""));a&&Promise.resolve().then(()=>a.$persist());return}const r=(Array.isArray(i)?i.map(a=>vA(a,t)):[vA(i,t)]).map(L0e(t,s)).filter(Boolean);s.$persist=()=>{r.forEach(a=>{yA(s.$state,a)})},s.$hydrate=({runHooks:a=!0}={})=>{r.forEach(l=>{const{beforeRestore:c,afterRestore:u}=l;a&&(c==null||c(e)),_A(s,l),a&&(u==null||u(e))})},r.forEach(a=>{const{beforeRestore:l,afterRestore:c}=a;l==null||l(e),_A(s,a),c==null||c(e),s.$subscribe((u,d)=>{yA(d,a)},{detached:!0})})}}var D0e=O0e();const de=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},R0e={name:"Drawer",emits:["update:modelValue"],props:{modelValue:{type:Boolean,required:!0},title:{type:String,default:""},size:{type:String,default:"40%"},direction:{type:String,default:"right",validator:t=>["left","right","top","bottom"].includes(t)},closeOnClickModal:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!1},destroyOnClose:{type:Boolean,default:!1},modal:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},withHeader:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},zIndex:{type:Number,default:null},id:{type:String,default:""},modalClass:{type:String,default:"fcom_common_dialog"},drawerClass:{type:String,default:"fcom_high_drawer"},headerClass:{type:String,default:""},bodyClass:{type:String,default:""},footerClass:{type:String,default:""},hasCloseConfirmation:{type:Boolean,default:!1},closeConfirmationMessage:{type:String,default:""},confirmLeaveAction:{type:Function,default:null},cancelLeaveAction:{type:Function,default:null},beforeClose:{type:Function,default:null}},computed:{elDirection(){return{left:"ltr",right:"rtl",top:"ttb",bottom:"btt"}[this.direction]||"rtl"}},methods:{handleBeforeClose(t){const e=()=>{this.beforeClose?this.beforeClose(t):t()};if(this.hasCloseConfirmation){const n=this.closeConfirmationMessage||this.$t("Are you sure you want to close this?");this.$confirm(n,this.$t("Confirm"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.confirmLeaveAction&&this.confirmLeaveAction(),e()}).catch(()=>{this.cancelLeaveAction&&this.cancelLeaveAction()})}else e()}}},V0e=["id"];function F0e(t,e,n,i,s,o){const r=Ea;return v(),D(r,Zt({"model-value":n.modelValue,"onUpdate:modelValue":e[0]||(e[0]=a=>t.$emit("update:modelValue",a)),direction:o.elDirection,size:n.size,modal:n.modal,"modal-class":n.modalClass,class:n.drawerClass,"close-on-click-modal":n.closeOnClickModal,"append-to-body":n.appendToBody,"destroy-on-close":n.destroyOnClose,"show-close":n.showClose,"with-header":n.withHeader,"lock-scroll":n.lockScroll,"open-delay":n.openDelay,"close-delay":n.closeDelay},n.zIndex!==null?{"z-index":n.zIndex}:{},{id:n.id,"before-close":o.handleBeforeClose}),cs({default:w(()=>[g("div",{class:G(n.bodyClass)},[le(t.$slots,"default")],2)]),_:2},[n.withHeader?{name:"header",fn:w(({close:a,titleId:l,titleClass:c})=>[le(t.$slots,"header",{close:a,titleId:l,titleClass:c},()=>[n.title?(v(),A("h4",{key:0,id:l,class:G([c,n.headerClass]),style:{margin:"0"}},S(n.title),11,V0e)):O("",!0)])]),key:"0"}:void 0,t.$slots.footer?{name:"footer",fn:w(()=>[g("div",{class:G(n.footerClass)},[le(t.$slots,"footer")],2)]),key:"1"}:void 0]),1040,["model-value","direction","size","modal","modal-class","class","close-on-click-modal","append-to-body","destroy-on-close","show-close","with-header","lock-scroll","open-delay","close-delay","id","before-close"])}const Dd=de(R0e,[["render",F0e]]);function N0e(t,e){for(var n=-1,i=t==null?0:t.length;++n<i&&e(t[n],n,t)!==!1;);return t}var B0e=N0e;function z0e(t){return function(e,n,i){for(var s=-1,o=Object(e),r=i(e),a=r.length;a--;){var l=r[t?a:++s];if(n(o[l],l,o)===!1)break}return e}}var H0e=z0e,U0e=H0e,j0e=U0e(),W0e=j0e;function Y0e(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}var q0e=Y0e,G0e=typeof ws=="object"&&ws&&ws.Object===Object&&ws,RV=G0e,X0e=RV,K0e=typeof self=="object"&&self&&self.Object===Object&&self,Z0e=X0e||K0e||Function("return this")(),Ma=Z0e,J0e=Ma,Q0e=J0e.Symbol,Fb=Q0e,bA=Fb,VV=Object.prototype,e_e=VV.hasOwnProperty,t_e=VV.toString,Vp=bA?bA.toStringTag:void 0;function n_e(t){var e=e_e.call(t,Vp),n=t[Vp];try{t[Vp]=void 0;var i=!0}catch{}var s=t_e.call(t);return i&&(e?t[Vp]=n:delete t[Vp]),s}var s_e=n_e,i_e=Object.prototype,o_e=i_e.toString;function r_e(t){return o_e.call(t)}var a_e=r_e,wA=Fb,l_e=s_e,c_e=a_e,u_e="[object Null]",d_e="[object Undefined]",kA=wA?wA.toStringTag:void 0;function h_e(t){return t==null?t===void 0?d_e:u_e:kA&&kA in Object(t)?l_e(t):c_e(t)}var M1=h_e;function f_e(t){return t!=null&&typeof t=="object"}var T1=f_e,p_e=M1,m_e=T1,g_e="[object Arguments]";function v_e(t){return m_e(t)&&p_e(t)==g_e}var __e=v_e,CA=__e,y_e=T1,FV=Object.prototype,b_e=FV.hasOwnProperty,w_e=FV.propertyIsEnumerable,k_e=CA(function(){return arguments}())?CA:function(t){return y_e(t)&&b_e.call(t,"callee")&&!w_e.call(t,"callee")},i8=k_e,C_e=Array.isArray,Ta=C_e,uy={exports:{}};function x_e(){return!1}var S_e=x_e;uy.exports;(function(t,e){var n=Ma,i=S_e,s=e&&!e.nodeType&&e,o=s&&!0&&t&&!t.nodeType&&t,r=o&&o.exports===s,a=r?n.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||i;t.exports=c})(uy,uy.exports);var o8=uy.exports,$_e=9007199254740991,A_e=/^(?:0|[1-9]\d*)$/;function E_e(t,e){var n=typeof t;return e=e??$_e,!!e&&(n=="number"||n!="symbol"&&A_e.test(t))&&t>-1&&t%1==0&&t<e}var NV=E_e,M_e=9007199254740991;function T_e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=M_e}var r8=T_e,P_e=M1,I_e=r8,L_e=T1,O_e="[object Arguments]",D_e="[object Array]",R_e="[object Boolean]",V_e="[object Date]",F_e="[object Error]",N_e="[object Function]",B_e="[object Map]",z_e="[object Number]",H_e="[object Object]",U_e="[object RegExp]",j_e="[object Set]",W_e="[object String]",Y_e="[object WeakMap]",q_e="[object ArrayBuffer]",G_e="[object DataView]",X_e="[object Float32Array]",K_e="[object Float64Array]",Z_e="[object Int8Array]",J_e="[object Int16Array]",Q_e="[object Int32Array]",eye="[object Uint8Array]",tye="[object Uint8ClampedArray]",nye="[object Uint16Array]",sye="[object Uint32Array]",Jn={};Jn[X_e]=Jn[K_e]=Jn[Z_e]=Jn[J_e]=Jn[Q_e]=Jn[eye]=Jn[tye]=Jn[nye]=Jn[sye]=!0;Jn[O_e]=Jn[D_e]=Jn[q_e]=Jn[R_e]=Jn[G_e]=Jn[V_e]=Jn[F_e]=Jn[N_e]=Jn[B_e]=Jn[z_e]=Jn[H_e]=Jn[U_e]=Jn[j_e]=Jn[W_e]=Jn[Y_e]=!1;function iye(t){return L_e(t)&&I_e(t.length)&&!!Jn[P_e(t)]}var oye=iye;function rye(t){return function(e){return t(e)}}var aye=rye,dy={exports:{}};dy.exports;(function(t,e){var n=RV,i=e&&!e.nodeType&&e,s=i&&!0&&t&&!t.nodeType&&t,o=s&&s.exports===i,r=o&&n.process,a=function(){try{var l=s&&s.require&&s.require("util").types;return l||r&&r.binding&&r.binding("util")}catch{}}();t.exports=a})(dy,dy.exports);var lye=dy.exports,cye=oye,uye=aye,xA=lye,SA=xA&&xA.isTypedArray,dye=SA?uye(SA):cye,a8=dye,hye=q0e,fye=i8,pye=Ta,mye=o8,gye=NV,vye=a8,_ye=Object.prototype,yye=_ye.hasOwnProperty;function bye(t,e){var n=pye(t),i=!n&&fye(t),s=!n&&!i&&mye(t),o=!n&&!i&&!s&&vye(t),r=n||i||s||o,a=r?hye(t.length,String):[],l=a.length;for(var c in t)(e||yye.call(t,c))&&!(r&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||gye(c,l)))&&a.push(c);return a}var wye=bye,kye=Object.prototype;function Cye(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||kye;return t===n}var BV=Cye;function xye(t,e){return function(n){return t(e(n))}}var Sye=xye,$ye=Sye,Aye=$ye(Object.keys,Object),Eye=Aye,Mye=BV,Tye=Eye,Pye=Object.prototype,Iye=Pye.hasOwnProperty;function Lye(t){if(!Mye(t))return Tye(t);var e=[];for(var n in Object(t))Iye.call(t,n)&&n!="constructor"&&e.push(n);return e}var zV=Lye;function Oye(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var P1=Oye,Dye=M1,Rye=P1,Vye="[object AsyncFunction]",Fye="[object Function]",Nye="[object GeneratorFunction]",Bye="[object Proxy]";function zye(t){if(!Rye(t))return!1;var e=Dye(t);return e==Fye||e==Nye||e==Vye||e==Bye}var HV=zye,Hye=HV,Uye=r8;function jye(t){return t!=null&&Uye(t.length)&&!Hye(t)}var l8=jye,Wye=wye,Yye=zV,qye=l8;function Gye(t){return qye(t)?Wye(t):Yye(t)}var c8=Gye,Xye=W0e,Kye=c8;function Zye(t,e){return t&&Xye(t,e,Kye)}var Jye=Zye,Qye=l8;function ebe(t,e){return function(n,i){if(n==null)return n;if(!Qye(n))return t(n,i);for(var s=n.length,o=e?s:-1,r=Object(n);(e?o--:++o<s)&&i(r[o],o,r)!==!1;);return n}}var tbe=ebe,nbe=Jye,sbe=tbe,ibe=sbe(nbe),obe=ibe;function rbe(t){return t}var UV=rbe,abe=UV;function lbe(t){return typeof t=="function"?t:abe}var cbe=lbe,ube=B0e,dbe=obe,hbe=cbe,fbe=Ta;function pbe(t,e){var n=fbe(t)?ube:dbe;return n(t,hbe(e))}var mbe=pbe,gbe=mbe;const _c=Ei(gbe);function Nt(t){return window.fluentComAdmin.i18n[t]||t}const vbe={public:{label:Nt("Public"),description:Nt("__PUBLIC_SPACE_DESC"),space_description:Nt("__PIBLIC_SPACE_DESC_2")},private:{label:Nt("Private"),description:Nt("__PRIVATE_SPACE_DESC"),space_description:Nt("__PRIVATE_SPACE_DESC_2")},secret:{label:Nt("Secret"),description:Nt("Only invited members can view and post."),space_description:Nt("__SECRET_SPACE_DESC_2")}},_be={public:{label:Nt("Public"),description:Nt("Anyone can view and enroll the course for free")},private:{label:Nt("Private"),description:Nt("__PRIVATE_COURSE_DESC")},secret:{label:Nt("Secret"),description:Nt("Only invited students can view and enroll the course content.")}},ybe={self_paced:{label:Nt("Self Paced"),description:Nt("__SELF_PAED_COURSE_DESC")},structured:{label:Nt("Structured"),description:Nt("__STRUCTURED_COURSE_DESC")},scheduled:{label:Nt("Scheduled"),description:Nt("Course starts on a specific date. Sections are dripped relative to that date.")}},bbe={leader_board_module:{headerTitle:Nt("Leaderboard Settings"),headerDescription:Nt("Settings for Leaderboard & Gamification features"),featureImage:"leaderboard_module.png",bodyTitle:Nt("Get Leaderboard & Gamification Module"),bodyDescription:Nt("Unlock potential by creating new feeds and earning points for likes. Advance in rank based on your total points using this module")},emoji_module:{headerTitle:Nt("Emoji Module"),headerDescription:Nt("Settings for Emoji & Reaction features"),featureImage:"emoji_module.png",bodyTitle:Nt("Get Emoji & Reaction Module"),bodyDescription:Nt("Use emojis to add a personal touch and make your new article, post, or comment more expressive")},giphy_module:{headerTitle:Nt("Giphy Module"),headerDescription:Nt("Customize Your Giphy Module Settings"),featureImage:"giphy_module.png",bodyTitle:Nt("Get Giphy Module"),bodyDescription:Nt("Want to use awesome GIFs? Upgrade to Pro plan now and enjoy surfing on FluentCommunity")},user_badge_module:{headerTitle:Nt("User Badge Module"),headerDescription:Nt("Add a badge next to user profile name to highlight valued users"),featureImage:"badge_module.png",bodyTitle:Nt("Get User Badge Module"),bodyDescription:Nt("Show a customized badge on user profiles beside their names to easily recognize your admins or moderators, or to give appreciation to your power users.")},media_module:{headerTitle:Nt("Media Module"),headerDescription:Nt("Add a badge next to user profile name to highlight valued users"),featureImage:"media_module.png",bodyTitle:Nt("Get Media Module"),bodyDescription:Nt("Choose where to store your media files. Options include Local File System, Amazon S3, or Cloudflare R2 for storing and serving your media assets")},pwa_module:{headerTitle:Nt("Progressive Web App (PWA)"),headerDescription:Nt("Let members install your community as an app on their phone"),bodyTitle:Nt("Get Progressive Web App (PWA) Module"),bodyDescription:Nt("Turn your community into an installable mobile app with your own name, icon and colors, plus an Install App option right in the portal menu.")}},vh=t=>{t=parseInt(t);const e=Object.values(window.fluentComAdmin.leaderboard_levels);if(!t)return e[0];for(let n=0;n<e.length;n++)if(t>=e[n].min_points&&t<=e[n].max_points)return e[n];return e[e-1]},wbe={name:"ImageUploader",emits:["uploaded","completed","uploading"],data(){return{loading:!1}},props:{button_text:{type:String,default:""},remove_label:{type:String,default:""},additionalData:{type:Object,default:()=>({})},isMultiple:{type:Boolean,default:!1},can_remove:{type:Boolean,default:!1},confirm_remove:{type:Boolean,default:!1},isTextBtn:{type:Boolean,default:!0},removeIcon:{type:Boolean,default:!0},className:{type:String,default:"image-uploader"}},methods:{handleRemove(){if(!this.confirm_remove){this.$emit("uploaded","");return}this.$confirm(this.$t("Are you sure you want to remove this image?"),this.$t("Remove Image?"),{confirmButtonText:this.$t("Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.$emit("uploaded","")})},handleSuccess(t){this.$emit("uploaded",t.media.url),this.$emit("completed",t),this.loading=!1},handleError(t){this.$handleError(JSON.parse(t.message)),this.$emit("completed",t),this.loading=!1},inProgress(t){this.$emit("uploading"),this.loading=!0}},computed:{action_url(){return this.appVars.rest.url+"/feeds/media-upload"},headers(){return{"X-WP-Nonce":this.appVars.rest.nonce}}}};function kbe(t,e,n,i,s,o){const r=We,a=A1,l=W("CloseBold"),c=be,u=xt("loading");return v(),A(ee,null,[_(a,{class:G(n.className),multiple:n.isMultiple,action:o.action_url,headers:o.headers,accept:"image/*",data:n.additionalData,"on-success":o.handleSuccess,"on-progress":o.inProgress,"on-error":o.handleError,"show-file-list":!1},{default:w(()=>[le(t.$slots,"trigger",{loading:s.loading},()=>[le(t.$slots,"default",{loading:s.loading},()=>[De((v(),D(r,{disabled:s.loading,text:n.isTextBtn,class:"fcom_plain_button"},{default:w(()=>[B(S(n.button_text||t.$t("Upload Photo")),1)]),_:1},8,["disabled","text"])),[[u,s.loading]])])])]),_:3},8,["class","multiple","action","headers","data","on-success","on-progress","on-error"]),n.can_remove?(v(),D(r,{key:0,class:"remove_img",size:"small",type:"danger",plain:"",onClick:o.handleRemove,text:n.isTextBtn,"aria-label":n.remove_label||t.$t("Remove")},{default:w(()=>[le(t.$slots,"remove",{},()=>[n.removeIcon?(v(),D(c,{key:0},{default:w(()=>[_(l)]),_:1})):O("",!0),g("span",null,S(t.$t("Remove")),1)])]),_:3},8,["onClick","text","aria-label"])):O("",!0)],64)}const vl=de(wbe,[["render",kbe]]),Cbe={name:"SvgShapeGenerator",emits:["update"],data(){return{currentColor:"",selectedShape:"circle"}},computed:{svgShapes(){return{circle:`<svg class="fcom_shape fcom_shape_circle" viewBox="0 0 24 24" fill="${this.currentColor}" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><circle cx="12" cy="12" r="12"/></svg>`,square:`<svg class="fcom_shape fcom_shape_square" viewBox="0 0 24 24" fill="${this.currentColor}" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><rect x="0" y="0" width="24" height="24"/></svg>`,triangle:`<svg class="fcom_shape fcom_shape_triangle" viewBox="0 0 24 24" fill="${this.currentColor}" width="24px" height="24px"><path d="M0 0h24v24H0z" fill="none"/><path d="M21 12L2 2v20z"/></svg>`,star:`<svg class="fcom_shape fcom_shape_star" viewBox="0 0 24 24" width="24" height="24"><polygon points="12,2.4 14.6,8.4 21.6,8.4 15.6,13.2 18,19.6 12,15.6 6,19.6 8.4,13.2 2.4,8.4 9.4,8.4" fill="${this.currentColor}"/></svg>`,heart:`<svg class="fcom_shape fcom_shape_heart"  xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" fill="${this.currentColor}"/></svg>`,diamond:`<svg class="fcom_shape fcom_shape_diamond" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><polygon points="12,2 22,12 12,22 2,12" fill="${this.currentColor}"/></svg>`}}},methods:{selectShape(t){this.selectedShape=t,this.$emit("update",this.svgShapes[t])},colorChanged(t){this.currentColor=t,this.$emit("update",this.svgShapes[this.selectedShape])}}},xbe={class:"fcom_svg_generator"},Sbe={class:"fcom_form_item"},$be={class:"fcom_form_item"},Abe=["innerHTML"];function Ebe(t,e,n,i,s,o){const r=Hc,a=sp,l=xs;return v(),A("div",xbe,[g("div",Sbe,[g("label",null,S(t.$t("Select Shape Color:")),1),_(r,{predefine:t.appVars.suggestedColors,modelValue:s.currentColor,"onUpdate:modelValue":e[0]||(e[0]=c=>s.currentColor=c),onActiveChange:o.colorChanged,size:"large","show-alpha":""},null,8,["predefine","modelValue","onActiveChange"])]),g("div",$be,[g("label",null,S(t.$t("Select Shape:")),1),_(l,{onChange:e[1]||(e[1]=c=>o.selectShape(s.selectedShape)),modelValue:s.selectedShape,"onUpdate:modelValue":e[2]||(e[2]=c=>s.selectedShape=c)},{default:w(()=>[(v(!0),A(ee,null,Ce(o.svgShapes,(c,u)=>(v(),D(a,{key:u,value:u},{default:w(()=>[g("div",{innerHTML:c},null,8,Abe)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])])}const Mbe=de(Cbe,[["render",Ebe]]);var u8="emoji-mart";const Tbe=JSON;var jV=typeof window<"u"&&"localStorage"in window;let o6,r6;function Pbe(t){t||(t={}),o6=t.getter,r6=t.setter}function Ibe(t){u8=t}function Lbe(t){for(let e in t){let n=t[e];WV(e,n)}}function WV(t,e){if(r6)r6(t,e);else{if(!jV)return;try{window.localStorage[`${u8}.${t}`]=Tbe.stringify(e)}catch{}}}function Obe(t){if(o6)return o6(t);if(!jV)return;try{var e=window.localStorage[`${u8}.${t}`]}catch{return}if(e)return JSON.parse(e)}const Vf={update:Lbe,set:WV,get:Obe,setNamespace:Ibe,setHandlers:Pbe},yw={name:"a",unified:"b",non_qualified:"c",has_img_apple:"d",has_img_google:"e",has_img_twitter:"f",has_img_facebook:"h",keywords:"j",sheet:"k",emoticons:"l",text:"m",short_names:"n",added_in:"o"},YV=t=>{const e=[];var n=(i,s)=>{i&&(Array.isArray(i)?i:[i]).forEach(o=>{(s?o.split(/[-|_|\s]+/):[o]).forEach(r=>{r=r.toLowerCase(),e.indexOf(r)==-1&&e.push(r)})})};return n(t.short_names,!0),n(t.name,!0),n(t.keywords,!1),n(t.emoticons,!1),e.join(",")};function qV(t){var e=Object.getOwnPropertyNames(t);for(let n of e){let i=t[n];t[n]=i&&typeof i=="object"?qV(i):i}return Object.freeze(t)}const Dbe=t=>{if(!t.compressed)return t;t.compressed=!1;for(let e in t.emojis){let n=t.emojis[e];for(let i in yw)n[i]=n[yw[i]],delete n[yw[i]];n.short_names||(n.short_names=[]),n.short_names.unshift(e),n.sheet_x=n.sheet[0],n.sheet_y=n.sheet[1],delete n.sheet,n.text||(n.text=""),n.added_in||(n.added_in=6),n.added_in=n.added_in.toFixed(1),n.search=YV(n)}return t=qV(t),t},bw=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart","hankey"];let Zo,d8,a6={};function GV(){d8=!0,Zo=Vf.get("frequently")}function Rbe(t){d8||GV();var{id:e}=t;Zo||(Zo=a6),Zo[e]||(Zo[e]=0),Zo[e]+=1,Vf.set("last",e),Vf.set("frequently",Zo)}function Vbe(t){if(d8||GV(),!Zo){a6={};const r=[];let a=Math.min(t,bw.length);for(let l=0;l<a;l++)a6[bw[l]]=parseInt((a-l)/4,10)+1,r.push(bw[l]);return r}const e=t,n=[];for(let r in Zo)Zo.hasOwnProperty(r)&&n.push(r);const s=n.sort((r,a)=>Zo[r]-Zo[a]).reverse().slice(0,e),o=Vf.get("last");return o&&s.indexOf(o)==-1&&(s.pop(),s.push(o)),s}const l6={add:Rbe,get:Vbe},Fbe={activity:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12 0C5.373 0 0 5.372 0 12c0 6.627 5.373 12 12 12 6.628 0 12-5.373 12-12 0-6.628-5.372-12-12-12m9.949 11H17.05c.224-2.527 1.232-4.773 1.968-6.113A9.966 9.966 0 0 1 21.949 11M13 11V2.051a9.945 9.945 0 0 1 4.432 1.564c-.858 1.491-2.156 4.22-2.392 7.385H13zm-2 0H8.961c-.238-3.165-1.536-5.894-2.393-7.385A9.95 9.95 0 0 1 11 2.051V11zm0 2v8.949a9.937 9.937 0 0 1-4.432-1.564c.857-1.492 2.155-4.221 2.393-7.385H11zm4.04 0c.236 3.164 1.534 5.893 2.392 7.385A9.92 9.92 0 0 1 13 21.949V13h2.04zM4.982 4.887C5.718 6.227 6.726 8.473 6.951 11h-4.9a9.977 9.977 0 0 1 2.931-6.113M2.051 13h4.9c-.226 2.527-1.233 4.771-1.969 6.113A9.972 9.972 0 0 1 2.051 13m16.967 6.113c-.735-1.342-1.744-3.586-1.968-6.113h4.899a9.961 9.961 0 0 1-2.931 6.113"/></svg>',custom:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><g transform="translate(2.000000, 1.000000)"><rect id="Rectangle" x="8" y="0" width="3" height="21" rx="1.5"></rect><rect id="Rectangle" transform="translate(9.843, 10.549) rotate(60) translate(-9.843, -10.549) " x="8.343" y="0.049" width="3" height="21" rx="1.5"></rect><rect id="Rectangle" transform="translate(9.843, 10.549) rotate(-60) translate(-9.843, -10.549) " x="8.343" y="0.049" width="3" height="21" rx="1.5"></rect></g></svg>',flags:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0l6.084 24H8L1.916 0zM21 5h-4l-1-4H4l3 12h3l1 4h13L21 5zM6.563 3h7.875l2 8H8.563l-2-8zm8.832 10l-2.856 1.904L12.063 13h3.332zM19 13l-1.5-6h1.938l2 8H16l3-2z"/></svg>',foods:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M17 4.978c-1.838 0-2.876.396-3.68.934.513-1.172 1.768-2.934 4.68-2.934a1 1 0 0 0 0-2c-2.921 0-4.629 1.365-5.547 2.512-.064.078-.119.162-.18.244C11.73 1.838 10.798.023 9.207.023 8.579.022 7.85.306 7 .978 5.027 2.54 5.329 3.902 6.492 4.999 3.609 5.222 0 7.352 0 12.969c0 4.582 4.961 11.009 9 11.009 1.975 0 2.371-.486 3-1 .629.514 1.025 1 3 1 4.039 0 9-6.418 9-11 0-5.953-4.055-8-7-8M8.242 2.546c.641-.508.943-.523.965-.523.426.169.975 1.405 1.357 3.055-1.527-.629-2.741-1.352-2.98-1.846.059-.112.241-.356.658-.686M15 21.978c-1.08 0-1.21-.109-1.559-.402l-.176-.146c-.367-.302-.816-.452-1.266-.452s-.898.15-1.266.452l-.176.146c-.347.292-.477.402-1.557.402-2.813 0-7-5.389-7-9.009 0-5.823 4.488-5.991 5-5.991 1.939 0 2.484.471 3.387 1.251l.323.276a1.995 1.995 0 0 0 2.58 0l.323-.276c.902-.78 1.447-1.251 3.387-1.251.512 0 5 .168 5 6 0 3.617-4.187 9-7 9"/></svg>',nature:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M15.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 15.5 8M8.5 8a1.5 1.5 0 1 0 .001 3.001A1.5 1.5 0 0 0 8.5 8"/><path d="M18.933 0h-.027c-.97 0-2.138.787-3.018 1.497-1.274-.374-2.612-.51-3.887-.51-1.285 0-2.616.133-3.874.517C7.245.79 6.069 0 5.093 0h-.027C3.352 0 .07 2.67.002 7.026c-.039 2.479.276 4.238 1.04 5.013.254.258.882.677 1.295.882.191 3.177.922 5.238 2.536 6.38.897.637 2.187.949 3.2 1.102C8.04 20.6 8 20.795 8 21c0 1.773 2.35 3 4 3 1.648 0 4-1.227 4-3 0-.201-.038-.393-.072-.586 2.573-.385 5.435-1.877 5.925-7.587.396-.22.887-.568 1.104-.788.763-.774 1.079-2.534 1.04-5.013C23.929 2.67 20.646 0 18.933 0M3.223 9.135c-.237.281-.837 1.155-.884 1.238-.15-.41-.368-1.349-.337-3.291.051-3.281 2.478-4.972 3.091-5.031.256.015.731.27 1.265.646-1.11 1.171-2.275 2.915-2.352 5.125-.133.546-.398.858-.783 1.313M12 22c-.901 0-1.954-.693-2-1 0-.654.475-1.236 1-1.602V20a1 1 0 1 0 2 0v-.602c.524.365 1 .947 1 1.602-.046.307-1.099 1-2 1m3-3.48v.02a4.752 4.752 0 0 0-1.262-1.02c1.092-.516 2.239-1.334 2.239-2.217 0-1.842-1.781-2.195-3.977-2.195-2.196 0-3.978.354-3.978 2.195 0 .883 1.148 1.701 2.238 2.217A4.8 4.8 0 0 0 9 18.539v-.025c-1-.076-2.182-.281-2.973-.842-1.301-.92-1.838-3.045-1.853-6.478l.023-.041c.496-.826 1.49-1.45 1.804-3.102 0-2.047 1.357-3.631 2.362-4.522C9.37 3.178 10.555 3 11.948 3c1.447 0 2.685.192 3.733.57 1 .9 2.316 2.465 2.316 4.48.313 1.651 1.307 2.275 1.803 3.102.035.058.068.117.102.178-.059 5.967-1.949 7.01-4.902 7.19m6.628-8.202c-.037-.065-.074-.13-.113-.195a7.587 7.587 0 0 0-.739-.987c-.385-.455-.648-.768-.782-1.313-.076-2.209-1.241-3.954-2.353-5.124.531-.376 1.004-.63 1.261-.647.636.071 3.044 1.764 3.096 5.031.027 1.81-.347 3.218-.37 3.235"/></svg>',objects:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12 0a9 9 0 0 0-5 16.482V21s2.035 3 5 3 5-3 5-3v-4.518A9 9 0 0 0 12 0zm0 2c3.86 0 7 3.141 7 7s-3.14 7-7 7-7-3.141-7-7 3.14-7 7-7zM9 17.477c.94.332 1.946.523 3 .523s2.06-.19 3-.523v.834c-.91.436-1.925.689-3 .689a6.924 6.924 0 0 1-3-.69v-.833zm.236 3.07A8.854 8.854 0 0 0 12 21c.965 0 1.888-.167 2.758-.451C14.155 21.173 13.153 22 12 22c-1.102 0-2.117-.789-2.764-1.453z"/><path d="M14.745 12.449h-.004c-.852-.024-1.188-.858-1.577-1.824-.421-1.061-.703-1.561-1.182-1.566h-.009c-.481 0-.783.497-1.235 1.537-.436.982-.801 1.811-1.636 1.791l-.276-.043c-.565-.171-.853-.691-1.284-1.794-.125-.313-.202-.632-.27-.913-.051-.213-.127-.53-.195-.634C7.067 9.004 7.039 9 6.99 9A1 1 0 0 1 7 7h.01c1.662.017 2.015 1.373 2.198 2.134.486-.981 1.304-2.058 2.797-2.075 1.531.018 2.28 1.153 2.731 2.141l.002-.008C14.944 8.424 15.327 7 16.979 7h.032A1 1 0 1 1 17 9h-.011c-.149.076-.256.474-.319.709a6.484 6.484 0 0 1-.311.951c-.429.973-.79 1.789-1.614 1.789"/></svg>',smileys:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"/><path d="M8 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 8 7M16 7a2 2 0 1 0-.001 3.999A2 2 0 0 0 16 7M15.232 15c-.693 1.195-1.87 2-3.349 2-1.477 0-2.655-.805-3.347-2H15m3-2H6a6 6 0 1 0 12 0"/></svg>',people:'<svg xmlns:svg="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24"> <path id="path3814" d="m 3.3591089,21.17726 c 0.172036,0.09385 4.265994,2.29837 8.8144451,2.29837 4.927767,0 8.670894,-2.211883 8.82782,-2.306019 0.113079,-0.06785 0.182268,-0.190051 0.182267,-0.321923 0,-3.03119 -0.929494,-5.804936 -2.617196,-7.810712 -1.180603,-1.403134 -2.661918,-2.359516 -4.295699,-2.799791 4.699118,-2.236258 3.102306,-9.28617162 -2.097191,-9.28617162 -5.1994978,0 -6.7963103,7.04991362 -2.097192,9.28617162 -1.6337821,0.440275 -3.1150971,1.396798 -4.2956991,2.799791 -1.687703,2.005776 -2.617196,4.779522 -2.617196,7.810712 1.2e-6,0.137378 0.075039,0.263785 0.195641,0.329572 z M 8.0439319,5.8308783 C 8.0439309,2.151521 12.492107,0.30955811 15.093491,2.9109411 17.694874,5.5123241 15.852911,9.9605006 12.173554,9.9605 9.8938991,9.9579135 8.0465186,8.1105332 8.0439319,5.8308783 Z m -1.688782,7.6894977 c 1.524535,-1.811449 3.5906601,-2.809035 5.8184041,-2.809035 2.227744,0 4.293869,0.997586 5.818404,2.809035 1.533639,1.822571 2.395932,4.339858 2.439152,7.108301 -0.803352,0.434877 -4.141636,2.096112 -8.257556,2.096112 -3.8062921,0 -7.3910861,-1.671043 -8.2573681,-2.104981 0.04505,-2.765017 0.906968,-5.278785 2.438964,-7.099432 z" /> <path id="path3816" d="M 12.173828 0.38867188 C 9.3198513 0.38867187 7.3770988 2.3672285 6.8652344 4.6308594 C 6.4218608 6.5916015 7.1153562 8.7676117 8.9648438 10.126953 C 7.6141249 10.677376 6.3550511 11.480944 5.3496094 12.675781 C 3.5629317 14.799185 2.6015625 17.701475 2.6015625 20.847656 C 2.6015654 21.189861 2.7894276 21.508002 3.0898438 21.671875 C 3.3044068 21.788925 7.4436239 24.039062 12.173828 24.039062 C 17.269918 24.039062 21.083568 21.776786 21.291016 21.652344 C 21.57281 21.483266 21.746097 21.176282 21.746094 20.847656 C 21.746094 17.701475 20.78277 14.799185 18.996094 12.675781 C 17.990455 11.480591 16.733818 10.675362 15.382812 10.125 C 17.231132 8.7655552 17.925675 6.5910701 17.482422 4.6308594 C 16.970557 2.3672285 15.027805 0.38867188 12.173828 0.38867188 z M 12.792969 2.3007812 C 13.466253 2.4161792 14.125113 2.7383941 14.695312 3.3085938 C 15.835712 4.4489931 15.985604 5.9473549 15.46875 7.1953125 C 14.951896 8.4432701 13.786828 9.3984378 12.173828 9.3984375 C 10.197719 9.3961954 8.607711 7.806187 8.6054688 5.8300781 C 8.6054683 4.2170785 9.5606362 3.0520102 10.808594 2.5351562 C 11.432573 2.2767293 12.119685 2.1853833 12.792969 2.3007812 z M 12.173828 11.273438 C 14.233647 11.273438 16.133674 12.185084 17.5625 13.882812 C 18.93069 15.508765 19.698347 17.776969 19.808594 20.283203 C 18.807395 20.800235 15.886157 22.162109 12.173828 22.162109 C 8.7614632 22.162109 5.6245754 20.787069 4.5390625 20.265625 C 4.6525896 17.766717 5.4203315 15.504791 6.7851562 13.882812 C 8.2139827 12.185084 10.11401 11.273438 12.173828 11.273438 z " /> </svg>',places:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M6.5 12C5.122 12 4 13.121 4 14.5S5.122 17 6.5 17 9 15.879 9 14.5 7.878 12 6.5 12m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5M17.5 12c-1.378 0-2.5 1.121-2.5 2.5s1.122 2.5 2.5 2.5 2.5-1.121 2.5-2.5-1.122-2.5-2.5-2.5m0 3c-.275 0-.5-.225-.5-.5s.225-.5.5-.5.5.225.5.5-.225.5-.5.5"/><path d="M22.482 9.494l-1.039-.346L21.4 9h.6c.552 0 1-.439 1-.992 0-.006-.003-.008-.003-.008H23c0-1-.889-2-1.984-2h-.642l-.731-1.717C19.262 3.012 18.091 2 16.764 2H7.236C5.909 2 4.738 3.012 4.357 4.283L3.626 6h-.642C1.889 6 1 7 1 8h.003S1 8.002 1 8.008C1 8.561 1.448 9 2 9h.6l-.043.148-1.039.346a2.001 2.001 0 0 0-1.359 2.097l.751 7.508a1 1 0 0 0 .994.901H3v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h6v1c0 1.103.896 2 2 2h2c1.104 0 2-.897 2-2v-1h1.096a.999.999 0 0 0 .994-.901l.751-7.508a2.001 2.001 0 0 0-1.359-2.097M6.273 4.857C6.402 4.43 6.788 4 7.236 4h9.527c.448 0 .834.43.963.857L19.313 9H4.688l1.585-4.143zM7 21H5v-1h2v1zm12 0h-2v-1h2v1zm2.189-3H2.811l-.662-6.607L3 11h18l.852.393L21.189 18z"/></svg>',recent:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M13 4h-2l-.001 7H9v2h2v2h2v-2h4v-2h-4z"/><path d="M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0m0 22C6.486 22 2 17.514 2 12S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10"/></svg>',symbols:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path d="M0 0h11v2H0zM4 11h3V6h4V4H0v2h4zM15.5 17c1.381 0 2.5-1.116 2.5-2.493s-1.119-2.493-2.5-2.493S13 13.13 13 14.507 14.119 17 15.5 17m0-2.986c.276 0 .5.222.5.493 0 .272-.224.493-.5.493s-.5-.221-.5-.493.224-.493.5-.493M21.5 19.014c-1.381 0-2.5 1.116-2.5 2.493S20.119 24 21.5 24s2.5-1.116 2.5-2.493-1.119-2.493-2.5-2.493m0 2.986a.497.497 0 0 1-.5-.493c0-.271.224-.493.5-.493s.5.222.5.493a.497.497 0 0 1-.5.493M22 13l-9 9 1.513 1.5 8.99-9.009zM17 11c2.209 0 4-1.119 4-2.5V2s.985-.161 1.498.949C23.01 4.055 23 6 23 6s1-1.119 1-3.135C24-.02 21 0 21 0h-2v6.347A5.853 5.853 0 0 0 17 6c-2.209 0-4 1.119-4 2.5s1.791 2.5 4 2.5M10.297 20.482l-1.475-1.585a47.54 47.54 0 0 1-1.442 1.129c-.307-.288-.989-1.016-2.045-2.183.902-.836 1.479-1.466 1.729-1.892s.376-.871.376-1.336c0-.592-.273-1.178-.818-1.759-.546-.581-1.329-.871-2.349-.871-1.008 0-1.79.293-2.344.879-.556.587-.832 1.181-.832 1.784 0 .813.419 1.748 1.256 2.805-.847.614-1.444 1.208-1.794 1.784a3.465 3.465 0 0 0-.523 1.833c0 .857.308 1.56.924 2.107.616.549 1.423.823 2.42.823 1.173 0 2.444-.379 3.813-1.137L8.235 24h2.819l-2.09-2.383 1.333-1.135zm-6.736-6.389a1.02 1.02 0 0 1 .73-.286c.31 0 .559.085.747.254a.849.849 0 0 1 .283.659c0 .518-.419 1.112-1.257 1.784-.536-.651-.805-1.231-.805-1.742a.901.901 0 0 1 .302-.669M3.74 22c-.427 0-.778-.116-1.057-.349-.279-.232-.418-.487-.418-.766 0-.594.509-1.288 1.527-2.083.968 1.134 1.717 1.946 2.248 2.438-.921.507-1.686.76-2.3.76"/></svg>'},Nbe={props:{i18n:{type:Object,required:!0},color:{type:String},categories:{type:Array,required:!0},activeCategory:{type:Object,default(){return{}}}},emits:["click"],created(){this.svgs=Fbe}},Bbe={role:"tablist",class:"emoji-mart-anchors"},zbe=["aria-label","aria-selected","data-title","onClick"],Hbe=["innerHTML"];function Ube(t,e,n,i,s,o){return v(),A("div",Bbe,[(v(!0),A(ee,null,Ce(n.categories,r=>(v(),A("button",{role:"tab",type:"button","aria-label":r.name,"aria-selected":r.id==n.activeCategory.id,key:r.id,class:G({"emoji-mart-anchor":!0,"emoji-mart-anchor-selected":r.id==n.activeCategory.id}),style:Xe({color:r.id==n.activeCategory.id?n.color:""}),"data-title":n.i18n.categories[r.id],onClick:a=>t.$emit("click",r)},[g("div",{"aria-hidden":"true",innerHTML:t.svgs[r.id]},null,8,Hbe),g("span",{"aria-hidden":"true",class:"emoji-mart-anchor-bar",style:Xe({backgroundColor:n.color})},null,4)],14,zbe))),128))])}const jbe=de(Nbe,[["render",Ube]]),Wbe=String,Ybe=Wbe.fromCodePoint||function(){var e=16384,n=[],i,s,o=-1,r=arguments.length;if(!r)return"";for(var a="";++o<r;){var l=Number(arguments[o]);if(!isFinite(l)||l<0||l>1114111||Math.floor(l)!=l)throw RangeError("Invalid code point: "+l);l<=65535?n.push(l):(l-=65536,i=(l>>10)+55296,s=l%1024+56320,n.push(i,s)),(o+1===r||n.length>e)&&(a+=String.fromCharCode.apply(null,n),n.length=0)}return a};function qbe(t){var e=t.split("-"),n=e.map(i=>`0x${i}`);return Ybe.apply(null,n)}function $A(t){return t.reduce((e,n)=>(e.indexOf(n)===-1&&e.push(n),e),[])}function Gbe(t,e){const n=$A(t),i=$A(e);return n.filter(s=>i.indexOf(s)>=0)}function XV(t,e){var n={};for(let i in t){let s=t[i],o=s;e.hasOwnProperty(i)&&(o=e[i]),typeof o=="object"&&(o=XV(s,o)),n[i]=o}return n}function Xbe(){if(typeof document>"u")return 0;const t=document.createElement("div");t.style.width="100px",t.style.height="100px",t.style.overflow="scroll",t.style.position="absolute",t.style.top="-9999px",document.body.appendChild(t);const e=t.offsetWidth-t.clientWidth;return document.body.removeChild(t),e}const Kbe=61,Zbe=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/,AA=["1F3FA","1F3FB","1F3FC","1F3FD","1F3FE","1F3FF"];class Jbe{constructor(e,{emojisToShowFilter:n,include:i,exclude:s,custom:o,recent:r,recentLength:a=20}={}){this._data=Dbe(e),this._emojisFilter=n||null,this._include=i||null,this._exclude=s||null,this._custom=o||[],this._recent=r||l6.get(a),this._emojis={},this._nativeEmojis={},this._emoticons={},this._categories=[],this._recentCategory={id:"recent",name:"Recent",emojis:[]},this._customCategory={id:"custom",name:"Custom",emojis:[]},this._searchIndex={},this.buildIndex(),Object.freeze(this)}buildIndex(){let e=this._data.categories;if(this._include&&(e=e.filter(n=>this._include.includes(n.id)),e=e.sort((n,i)=>{const s=this._include.indexOf(n.id),o=this._include.indexOf(i.id);return s<o?-1:s>o?1:0})),e.forEach(n=>{if(!this.isCategoryNeeded(n.id))return;let i={id:n.id,name:n.name,emojis:[]};n.emojis.forEach(s=>{let o=this.addEmoji(s);o&&i.emojis.push(o)}),i.emojis.length&&this._categories.push(i)}),this.isCategoryNeeded("custom")){if(this._custom.length>0)for(let n of this._custom)this.addCustomEmoji(n);this._customCategory.emojis.length&&this._categories.push(this._customCategory)}this.isCategoryNeeded("recent")&&(this._recent.length&&this._recent.map(n=>{for(let i of this._customCategory.emojis)if(i.id===n){this._recentCategory.emojis.push(i);return}this.hasEmoji(n)&&this._recentCategory.emojis.push(this.emoji(n))}),this._recentCategory.emojis.length&&this._categories.unshift(this._recentCategory))}findEmoji(e,n){let i=e.match(Zbe);if(i&&(e=i[1],i[2]&&(n=parseInt(i[2],10))),this._data.aliases.hasOwnProperty(e)&&(e=this._data.aliases[e]),this._emojis.hasOwnProperty(e)){let s=this._emojis[e];return n?s.getSkin(n):s}return this._nativeEmojis.hasOwnProperty(e)?this._nativeEmojis[e]:null}categories(){return this._categories}emoji(e){this._data.aliases.hasOwnProperty(e)&&(e=this._data.aliases[e]);let n=this._emojis[e];if(!n)throw new Error("Can not find emoji by id: "+e);return n}firstEmoji(){let e=this._emojis[Object.keys(this._emojis)[0]];if(!e)throw new Error("Can not get first emoji");return e}hasEmoji(e){return this._data.aliases.hasOwnProperty(e)&&(e=this._data.aliases[e]),!!this._emojis[e]}nativeEmoji(e){return this._nativeEmojis.hasOwnProperty(e)?this._nativeEmojis[e]:null}search(e,n){if(n||(n=75),!e.length)return null;if(e=="-"||e=="-1")return[this.emoji("-1")];let i=e.toLowerCase().split(/[\s|,|\-|_]+/),s=[];i.length>2&&(i=[i[0],i[1]]),s=i.map(r=>{let a=this._emojis,l=this._searchIndex,c=0;for(let u=0;u<r.length;u++){const d=r[u];if(c++,l[d]||(l[d]={}),l=l[d],!l.results){let h={};l.results=[],l.emojis={};for(let f in a){let p=a[f],m=p._data.search,y=r.substr(0,c),b=m.indexOf(y);if(b!=-1){let k=b+1;y==f&&(k=0),l.results.push(p),l.emojis[f]=p,h[f]=k}}l.results.sort((f,p)=>{var m=h[f.id],y=h[p.id];return m-y})}a=l.emojis}return l.results}).filter(r=>r);var o=null;return s.length>1?o=Gbe.apply(null,s):s.length?o=s[0]:o=[],o&&o.length>n&&(o=o.slice(0,n)),o}addCustomEmoji(e){let n=Object.assign({},e,{id:e.short_names[0],custom:!0});n.search||(n.search=YV(n));let i=new hy(n);return this._emojis[i.id]=i,this._customCategory.emojis.push(i),i}addEmoji(e){let n=this._data.emojis[e];if(!this.isEmojiNeeded(n))return!1;let i=new hy(n);if(this._emojis[e]=i,i.native&&(this._nativeEmojis[i.native]=i),i._skins)for(let s in i._skins){let o=i._skins[s];o.native&&(this._nativeEmojis[o.native]=o)}return i.emoticons&&i.emoticons.forEach(s=>{this._emoticons[s]||(this._emoticons[s]=e)}),i}isCategoryNeeded(e){let n=this._include&&this._include.length?this._include.indexOf(e)>-1:!0,i=this._exclude&&this._exclude.length?this._exclude.indexOf(e)>-1:!1;return!(!n||i)}isEmojiNeeded(e){return this._emojisFilter?this._emojisFilter(e):!0}}class hy{constructor(e){if(this._data=Object.assign({},e),this._skins=null,this._data.skin_variations){this._skins=[];for(var n in AA){let i=AA[n],s=this._data.skin_variations[i],o=Object.assign({},e);for(let r in s)o[r]=s[r];delete o.skin_variations,o.skin_tone=parseInt(n)+1,this._skins.push(new hy(o))}}this._sanitized=Qbe(this._data);for(let i in this._sanitized)this[i]=this._sanitized[i];this.short_names=this._data.short_names,this.short_name=this._data.short_names[0],Object.freeze(this)}getSkin(e){return e&&e!="native"&&this._skins?this._skins[e-1]:this}getPosition(){let e=Kbe-1,n=+(100/e*this._data.sheet_x).toFixed(2),i=+(100/e*this._data.sheet_y).toFixed(2);return`${n}% ${i}%`}ariaLabel(){return[this.native].concat(this.short_names).filter(Boolean).join(", ")}}class KV{constructor(e,n,i,s,o,r,a){this._emoji=e,this._native=s,this._skin=n,this._set=i,this._fallback=o,this.canRender=this._canRender(),this.cssClass=this._cssClass(),this.cssStyle=this._cssStyle(a),this.content=this._content(),this.title=r===!0?e.short_name:null,this.ariaLabel=e.ariaLabel(),Object.freeze(this)}getEmoji(){return this._emoji.getSkin(this._skin)}_canRender(){return this._isCustom()||this._isNative()||this._hasEmoji()||this._fallback}_cssClass(){return["emoji-set-"+this._set,"emoji-type-"+this._emojiType()]}_cssStyle(e){let n={};return this._isCustom()?n={backgroundImage:"url("+this.getEmoji()._data.imageUrl+")",backgroundSize:"100%",width:e+"px",height:e+"px"}:this._hasEmoji()&&!this._isNative()&&(n={backgroundPosition:this.getEmoji().getPosition()}),e&&(this._isNative()?n=Object.assign(n,{fontSize:Math.round(e*.95*10)/10+"px"}):n=Object.assign(n,{width:e+"px",height:e+"px"})),n}_content(){return this._isCustom()?"":this._isNative()?this.getEmoji().native:this._hasEmoji()?"":this._fallback?this._fallback(this.getEmoji()):null}_isNative(){return this._native}_isCustom(){return this.getEmoji().custom}_hasEmoji(){if(!this.getEmoji()._data)return!1;const e=this.getEmoji()._data["has_img_"+this._set];return e===void 0?!0:e}_emojiType(){return this._isCustom()?"custom":this._isNative()?"native":this._hasEmoji()?"image":"fallback"}}function Qbe(t){var{name:e,short_names:n,skin_tone:i,skin_variations:s,emoticons:o,unified:r,custom:a,imageUrl:l}=t,c=t.id||n[0],u=`:${c}:`;return a?{id:c,name:e,colons:u,emoticons:o,custom:a,imageUrl:l}:(i&&(u+=`:skin-tone-${i}:`),{id:c,name:e,colons:u,emoticons:o,unified:r.toLowerCase(),skin:i||(s?1:null),native:qbe(r)})}const e2e={native:{type:Boolean,default:!1},tooltip:{type:Boolean,default:!1},fallback:{type:Function},skin:{type:Number,default:1},set:{type:String,default:"apple"},emoji:{type:[String,Object],required:!0},size:{type:Number,default:null},tag:{type:String,default:"span"}},t2e={perLine:{type:Number,default:9},maxSearchResults:{type:Number,default:75},emojiSize:{type:Number,default:24},title:{type:String,default:"Emoji Mart™"},emoji:{type:String,default:"department_store"},color:{type:String,default:"#ae65c5"},set:{type:String,default:"apple"},skin:{type:Number,default:null},defaultSkin:{type:Number,default:1},native:{type:Boolean,default:!1},emojiTooltip:{type:Boolean,default:!1},autoFocus:{type:Boolean,default:!1},i18n:{type:Object,default(){return{}}},showPreview:{type:Boolean,default:!0},showSearch:{type:Boolean,default:!0},showCategories:{type:Boolean,default:!0},showSkinTones:{type:Boolean,default:!0},infiniteScroll:{type:Boolean,default:!0},pickerStyles:{type:Object,default(){return{}}}},n2e={props:{...e2e,data:{type:Object,required:!0}},emits:["click","mouseenter","mouseleave"],computed:{view(){return new KV(this.emojiObject,this.skin,this.set,this.native,this.fallback,this.tooltip,this.size)},sanitizedData(){return this.emojiObject._sanitized},title(){return this.tooltip?this.emojiObject.short_name:null},emojiObject(){return typeof this.emoji=="string"?this.data.findEmoji(this.emoji):this.emoji}},created(){},methods:{onClick(){this.$emit("click",this.emojiObject)},onMouseEnter(){this.$emit("mouseenter",this.emojiObject)},onMouseLeave(){this.$emit("mouseleave",this.emojiObject)}}};function s2e(t,e,n,i,s,o){return o.view.canRender?(v(),D(Ct(t.tag),{key:0,title:o.view.title,"aria-label":o.view.ariaLabel,"data-title":o.title,class:"emoji-mart-emoji",onMouseenter:o.onMouseEnter,onMouseleave:o.onMouseLeave,onClick:o.onClick},{default:w(()=>[g("span",{class:G(o.view.cssClass),style:Xe(o.view.cssStyle)},S(o.view.content),7)]),_:1},40,["title","aria-label","data-title","onMouseenter","onMouseleave","onClick"])):O("",!0)}const ZV=de(n2e,[["render",s2e]]),i2e={props:{data:{type:Object,required:!0},i18n:{type:Object,required:!0},id:{type:String,required:!0},name:{type:String,required:!0},emojis:{type:Array},emojiProps:{type:Object,required:!0}},methods:{activeClass:function(t){return!this.emojiProps.selectedEmoji||!this.emojiProps.selectedEmojiCategory?"":this.emojiProps.selectedEmoji.id==t.id&&this.emojiProps.selectedEmojiCategory.id==this.id?"emoji-mart-emoji-selected":""}},computed:{isVisible(){return!!this.emojis},isSearch(){return this.name=="Search"},hasResults(){return this.emojis.length>0},emojiObjects(){return this.emojis.map(t=>{let e=t,n=new KV(t,this.emojiProps.skin,this.emojiProps.set,this.emojiProps.native,this.emojiProps.fallback,this.emojiProps.emojiTooltip,this.emojiProps.emojiSize);return{emojiObject:e,emojiView:n}})}},components:{Emoji:ZV}},o2e=["aria-label"],r2e={class:"emoji-mart-category-label"},a2e={class:"emoji-mart-category-label"},l2e=["aria-label","data-title","title","onMouseenter","onMouseleave","onClick"],c2e={key:0},u2e={class:"emoji-mart-no-results-label"};function d2e(t,e,n,i,s,o){const r=W("emoji");return o.isVisible&&(o.isSearch||o.hasResults)?(v(),A("section",{key:0,class:G({"emoji-mart-category":!0,"emoji-mart-no-results":!o.hasResults}),"aria-label":n.i18n.categories[n.id]},[g("div",r2e,[g("h3",a2e,S(n.i18n.categories[n.id]),1)]),(v(!0),A(ee,null,Ce(o.emojiObjects,({emojiObject:a,emojiView:l})=>(v(),A(ee,null,[l.canRender?(v(),A("button",{"aria-label":l.ariaLabel,role:"option","aria-selected":"false","aria-posinset":"1","aria-setsize":"1812",type:"button","data-title":a.short_name,key:a.id,title:l.title,class:G(["emoji-mart-emoji",o.activeClass(a)]),onMouseenter:c=>n.emojiProps.onEnter(l.getEmoji()),onMouseleave:c=>n.emojiProps.onLeave(l.getEmoji()),onClick:c=>n.emojiProps.onClick(l.getEmoji())},[g("span",{class:G(l.cssClass),style:Xe(l.cssStyle)},S(l.content),7)],42,l2e)):O("",!0)],64))),256)),o.hasResults?O("",!0):(v(),A("div",c2e,[_(r,{data:n.data,emoji:"sleuth_or_spy",native:n.emojiProps.native,skin:n.emojiProps.skin,set:n.emojiProps.set},null,8,["data","native","skin","set"]),g("div",u2e,S(n.i18n.notfound),1)]))],10,o2e)):O("",!0)}const h2e=de(i2e,[["render",d2e]]),f2e={props:{skin:{type:Number,required:!0}},emits:["change"],data(){return{opened:!1}},methods:{onClick(t){this.opened&&t!=this.skin&&this.$emit("change",t),this.opened=!this.opened}}},p2e=["onClick"];function m2e(t,e,n,i,s,o){return v(),A("div",{class:G({"emoji-mart-skin-swatches":!0,"emoji-mart-skin-swatches-opened":s.opened})},[(v(),A(ee,null,Ce(6,r=>g("span",{key:r,class:G({"emoji-mart-skin-swatch":!0,"emoji-mart-skin-swatch-selected":n.skin==r})},[g("span",{class:G("emoji-mart-skin emoji-mart-skin-tone-"+r),onClick:a=>o.onClick(r)},null,10,p2e)],2)),64))],2)}const g2e=de(f2e,[["render",m2e]]),v2e={props:{data:{type:Object,required:!0},title:{type:String,required:!0},emoji:{type:[String,Object]},idleEmoji:{type:[String,Object],required:!0},showSkinTones:{type:Boolean,default:!0},emojiProps:{type:Object,required:!0},skinProps:{type:Object,required:!0},onSkinChange:{type:Function,required:!0}},computed:{emojiData(){return this.emoji?this.emoji:{}},emojiShortNames(){return this.emojiData.short_names},emojiEmoticons(){return this.emojiData.emoticons}},components:{Emoji:ZV,Skins:g2e}},_2e={class:"emoji-mart-preview"},y2e={class:"emoji-mart-preview-emoji"},b2e={class:"emoji-mart-preview-data"},w2e={class:"emoji-mart-preview-name"},k2e={class:"emoji-mart-preview-shortnames"},C2e={class:"emoji-mart-preview-emoticons"},x2e={class:"emoji-mart-preview-emoji"},S2e={class:"emoji-mart-preview-data"},$2e={class:"emoji-mart-title-label"},A2e={key:0,class:"emoji-mart-preview-skins"};function E2e(t,e,n,i,s,o){const r=W("emoji"),a=W("skins");return v(),A("div",_2e,[n.emoji?(v(),A(ee,{key:0},[g("div",y2e,[_(r,{data:n.data,emoji:n.emoji,native:n.emojiProps.native,skin:n.emojiProps.skin,set:n.emojiProps.set},null,8,["data","emoji","native","skin","set"])]),g("div",b2e,[g("div",w2e,S(n.emoji.name),1),g("div",k2e,[(v(!0),A(ee,null,Ce(o.emojiShortNames,l=>(v(),A("span",{key:l,class:"emoji-mart-preview-shortname"},":"+S(l)+":",1))),128))]),g("div",C2e,[(v(!0),A(ee,null,Ce(o.emojiEmoticons,l=>(v(),A("span",{key:l,class:"emoji-mart-preview-emoticon"},S(l),1))),128))])])],64)):(v(),A(ee,{key:1},[g("div",x2e,[_(r,{data:n.data,emoji:n.idleEmoji,native:n.emojiProps.native,skin:n.emojiProps.skin,set:n.emojiProps.set},null,8,["data","emoji","native","skin","set"])]),g("div",S2e,[g("span",$2e,S(n.title),1)]),n.showSkinTones?(v(),A("div",A2e,[_(a,{skin:n.skinProps.skin,onChange:e[0]||(e[0]=l=>n.onSkinChange(l))},null,8,["skin"])])):O("",!0)],64))])}const M2e=de(v2e,[["render",E2e]]),T2e={props:{data:{type:Object,required:!0},i18n:{type:Object,required:!0},autoFocus:{type:Boolean,default:!1},onSearch:{type:Function,required:!0},onArrowLeft:{type:Function,required:!1},onArrowRight:{type:Function,required:!1},onArrowDown:{type:Function,required:!1},onArrowUp:{type:Function,required:!1},onEnter:{type:Function,required:!1}},emits:["search","enter","arrowUp","arrowDown","arrowRight","arrowLeft"],data(){return{value:""}},computed:{emojiIndex(){return this.data}},watch:{value(){this.$emit("search",this.value)}},methods:{clear(){this.value=""}},mounted(){let t=this.$el.querySelector("input");this.autoFocus&&t.focus()}},P2e={class:"emoji-mart-search"},I2e=["placeholder"],L2e=g("span",{class:"hidden",id:"emoji-picker-search-description"},"Use the left, right, up and down arrow keys to navigate the emoji search results.",-1);function O2e(t,e,n,i,s,o){return v(),A("div",P2e,[De(g("input",{type:"text",placeholder:n.i18n.search,role:"textbox","aria-autocomplete":"list","aria-owns":"emoji-mart-list","aria-label":"Search for an emoji","aria-describedby":"emoji-mart-search-description",onKeydown:[e[0]||(e[0]=ut(r=>t.$emit("arrowLeft",r),["left"])),e[1]||(e[1]=ut(()=>t.$emit("arrowRight"),["right"])),e[2]||(e[2]=ut(()=>t.$emit("arrowDown"),["down"])),e[3]||(e[3]=ut(r=>t.$emit("arrowUp",r),["up"])),e[4]||(e[4]=ut(()=>t.$emit("enter"),["enter"]))],"onUpdate:modelValue":e[5]||(e[5]=r=>s.value=r)},null,40,I2e),[[rd,s.value]]),L2e])}const D2e=de(T2e,[["render",O2e]]);var R2e=typeof window<"u";R2e&&function(){for(var t=0,e=["ms","moz","webkit","o"],n=0;n<e.length&&!window.requestAnimationFrame;++n)window.requestAnimationFrame=window[e[n]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[n]+"CancelAnimationFrame"]||window[e[n]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(i,s){var o=new Date().getTime(),r=Math.max(0,16-(o-t)),a=window.setTimeout(function(){i(o+r)},r);return t=o+r,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(i){clearTimeout(i)})}();class V2e{constructor(e){this._vm=e,this._data=e.data,this._perLine=e.perLine,this._categories=[],this._categories.push(...this._data.categories()),this._categories=this._categories.filter(n=>n.emojis.length>0),this._categories[0].first=!0,Object.freeze(this._categories),this.activeCategory=this._categories[0],this.searchEmojis=null,this.previewEmoji=null,this.previewEmojiCategoryIdx=0,this.previewEmojiIdx=-1}onScroll(){const n=this._vm.$refs.scroll.scrollTop;let i=this.filteredCategories[0];for(let s=0,o=this.filteredCategories.length;s<o;s++){let r=this.filteredCategories[s],a=this._vm.getCategoryComponent(s);if(a&&a.$el.offsetTop-50>n)break;i=r}this.activeCategory=i}get allCategories(){return this._categories}get filteredCategories(){return this.searchEmojis?[{id:"search",name:"Search",emojis:this.searchEmojis}]:this._categories.filter(e=>e.emojis.length>0)}get previewEmojiCategory(){return this.previewEmojiCategoryIdx>=0?this.filteredCategories[this.previewEmojiCategoryIdx]:null}onAnchorClick(e){if(this.searchEmojis)return;let n=this.filteredCategories.indexOf(e),i=this._vm.getCategoryComponent(n),s=()=>{if(i){let o=i.$el.offsetTop;e.first&&(o=0),this._vm.$refs.scroll.scrollTop=o}};this._vm.infiniteScroll?s():this.activeCategory=this.filteredCategories[n]}onSearch(e){let n=this._data.search(e,this.maxSearchResults);this.searchEmojis=n,this.previewEmojiCategoryIdx=0,this.previewEmojiIdx=0,this.updatePreviewEmoji()}onEmojiEnter(e){this.previewEmoji=e,this.previewEmojiIdx=-1,this.previewEmojiCategoryIdx=-1}onEmojiLeave(e){this.previewEmoji=null}onArrowLeft(){this.previewEmojiIdx>0?this.previewEmojiIdx-=1:(this.previewEmojiCategoryIdx-=1,this.previewEmojiCategoryIdx<0?this.previewEmojiCategoryIdx=0:this.previewEmojiIdx=this.filteredCategories[this.previewEmojiCategoryIdx].emojis.length-1),this.updatePreviewEmoji()}onArrowRight(){this.previewEmojiIdx<this.emojisLength(this.previewEmojiCategoryIdx)-1?this.previewEmojiIdx+=1:(this.previewEmojiCategoryIdx+=1,this.previewEmojiCategoryIdx>=this.filteredCategories.length?this.previewEmojiCategoryIdx=this.filteredCategories.length-1:this.previewEmojiIdx=0),this.updatePreviewEmoji()}onArrowDown(){if(this.previewEmojiIdx==-1)return this.onArrowRight();const e=this.filteredCategories[this.previewEmojiCategoryIdx].emojis.length;let n=this._perLine;this.previewEmojiIdx+n>e&&(n=e%this._perLine);for(let i=0;i<n;i++)this.onArrowRight();this.updatePreviewEmoji()}onArrowUp(){let e=this._perLine;this.previewEmojiIdx-e<0&&(this.previewEmojiCategoryIdx>0?e=this.filteredCategories[this.previewEmojiCategoryIdx-1].emojis.length%this._perLine:e=0);for(let n=0;n<e;n++)this.onArrowLeft();this.updatePreviewEmoji()}updatePreviewEmoji(){this.previewEmoji=this.filteredCategories[this.previewEmojiCategoryIdx].emojis[this.previewEmojiIdx],this._vm.$nextTick(()=>{const e=this._vm.$refs.scroll,n=e.querySelector(".emoji-mart-emoji-selected"),i=e.offsetTop-e.offsetHeight;n&&n.offsetTop+n.offsetHeight>i+e.scrollTop&&(e.scrollTop+=n.offsetHeight),n&&n.offsetTop<e.scrollTop&&(e.scrollTop-=n.offsetHeight)})}emojisLength(e){return e==-1?0:this.filteredCategories[e].emojis.length}}const F2e={search:"Search",notfound:"No Emoji Found",categories:{search:"Search Results",recent:"Frequently Used",smileys:"Smileys & Emotion",people:"People & Body",nature:"Animals & Nature",foods:"Food & Drink",activity:"Activity",places:"Travel & Places",objects:"Objects",symbols:"Symbols",flags:"Flags",custom:"Custom"}},N2e={props:{...t2e,data:{type:Object,required:!0}},emits:["select","skin-change"],data(){return{activeSkin:this.skin||Vf.get("skin")||this.defaultSkin,view:new V2e(this)}},computed:{customStyles(){return{width:this.calculateWidth+"px",...this.pickerStyles}},emojiProps(){return{native:this.native,skin:this.activeSkin,set:this.set,emojiTooltip:this.emojiTooltip,emojiSize:this.emojiSize,selectedEmoji:this.view.previewEmoji,selectedEmojiCategory:this.view.previewEmojiCategory,onEnter:this.onEmojiEnter.bind(this),onLeave:this.onEmojiLeave.bind(this),onClick:this.onEmojiClick.bind(this)}},skinProps(){return{skin:this.activeSkin}},calculateWidth(){return this.perLine*(this.emojiSize+12)+12+2+Xbe()},filteredCategories(){return this.view.filteredCategories},mergedI18n(){return Object.freeze(XV(F2e,this.i18n))},idleEmoji(){try{return this.data.emoji(this.emoji)}catch(t){return console.error("Default preview emoji `"+this.emoji+"` is not available, check the Picker `emoji` property"),console.error(t),this.data.firstEmoji()}}},watch:{skin(){this.onSkinChange(this.skin)}},methods:{onScroll(){this.infiniteScroll&&!this.waitingForPaint&&(this.waitingForPaint=!0,window.requestAnimationFrame(this.onScrollPaint.bind(this)))},onScrollPaint(){this.waitingForPaint=!1,this.view.onScroll()},onAnchorClick(t){this.view.onAnchorClick(t)},onSearch(t){this.view.onSearch(t)},onEmojiEnter(t){this.view.onEmojiEnter(t)},onEmojiLeave(t){this.view.onEmojiLeave(t)},onArrowLeft(t){const e=this.view.previewEmojiIdx;this.view.onArrowLeft(),t&&this.view.previewEmojiIdx!==e&&t.preventDefault()},onArrowRight(){this.view.onArrowRight()},onArrowDown(){this.view.onArrowDown()},onArrowUp(t){this.view.onArrowUp(),t.preventDefault()},onEnter(){this.view.previewEmoji&&(this.$emit("select",this.view.previewEmoji),l6.add(this.view.previewEmoji))},onEmojiClick(t){this.$emit("select",t),l6.add(t)},onTextSelect(t){t.stopPropagation()},onSkinChange(t){this.activeSkin=t,Vf.update({skin:t}),this.$emit("skin-change",t)},getCategoryComponent(t){let e=this.$refs["categories_"+t];return e&&"0"in e?e[0]:e}},components:{Anchors:jbe,Category:h2e,Preview:M2e,Search:D2e}},B2e={key:0,class:"emoji-mart-bar emoji-mart-bar-anchors"},z2e={id:"emoji-mart-list",ref:"scrollContent",role:"listbox","aria-expanded":"true"},H2e={key:0,class:"emoji-mart-bar emoji-mart-bar-preview"};function U2e(t,e,n,i,s,o){const r=W("anchors"),a=W("search"),l=W("category"),c=W("preview");return v(),A("section",{class:"emoji-mart emoji-mart-static",style:Xe(o.customStyles)},[t.showCategories?(v(),A("div",B2e,[_(r,{data:n.data,i18n:o.mergedI18n,color:t.color,categories:s.view.allCategories,"active-category":s.view.activeCategory,onClick:o.onAnchorClick},null,8,["data","i18n","color","categories","active-category","onClick"])])):O("",!0),le(t.$slots,"searchTemplate",{data:n.data,i18n:t.i18n,autoFocus:t.autoFocus,onSearch:o.onSearch},()=>[t.showSearch?(v(),D(a,{key:0,ref:"search",data:n.data,i18n:o.mergedI18n,"auto-focus":t.autoFocus,"on-search":o.onSearch,onSearch:o.onSearch,onArrowLeft:o.onArrowLeft,onArrowRight:o.onArrowRight,onArrowDown:o.onArrowDown,onArrowUp:o.onArrowUp,onEnter:o.onEnter,onSelect:o.onTextSelect},null,8,["data","i18n","auto-focus","on-search","onSearch","onArrowLeft","onArrowRight","onArrowDown","onArrowUp","onEnter","onSelect"])):O("",!0)]),g("div",{role:"tabpanel",class:"emoji-mart-scroll",ref:"scroll",onScroll:e[0]||(e[0]=(...u)=>o.onScroll&&o.onScroll(...u))},[g("div",z2e,[le(t.$slots,"customCategory"),(v(!0),A(ee,null,Ce(s.view.filteredCategories,(u,d)=>De((v(),D(l,{ref_for:!0,ref:"categories_"+d,key:u.id,data:n.data,i18n:o.mergedI18n,id:u.id,name:u.name,emojis:u.emojis,"emoji-props":o.emojiProps},null,8,["data","i18n","id","name","emojis","emoji-props"])),[[Ut,t.infiniteScroll||u==s.view.activeCategory]])),128))],512)],544),le(t.$slots,"previewTemplate",{data:n.data,title:t.title,emoji:s.view.previewEmoji,idleEmoji:o.idleEmoji,showSkinTones:t.showSkinTones,emojiProps:o.emojiProps,skinProps:o.skinProps,onSkinChange:o.onSkinChange},()=>[t.showPreview?(v(),A("div",H2e,[_(c,{data:n.data,title:t.title,emoji:s.view.previewEmoji,"idle-emoji":o.idleEmoji,"show-skin-tones":t.showSkinTones,"emoji-props":o.emojiProps,"skin-props":o.skinProps,"on-skin-change":o.onSkinChange},null,8,["data","title","emoji","idle-emoji","show-skin-tones","emoji-props","skin-props","on-skin-change"])])):O("",!0)])],4)}const j2e=de(N2e,[["render",U2e]]),W2e={name:"ActionPopover",emits:["show","hide"],props:{items:{type:Array,default:()=>[]},width:{type:[Number,String],default:150},placement:{type:String,default:"bottom",validator:t=>["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"].includes(t)},persistent:{type:Boolean,default:!1},teleported:{type:Boolean,default:!1}},data(){return{visible:!1}},watch:{visible(t){this.$emit(t?"show":"hide"),document[t?"addEventListener":"removeEventListener"]("click",this.onClickOutside,!0)}},methods:{toggle(){this.visible=!this.visible},hide(){this.visible=!1},onClickOutside(t){var n,i,s,o,r;const e=(i=(n=this.$refs.popoverRef)==null?void 0:n.popperRef)==null?void 0:i.contentRef;e!=null&&e.contains(t.target)||(s=this.$refs.triggerRef)!=null&&s.contains(t.target)||(r=(o=t.target).closest)!=null&&r.call(o,".el-popper")||this.hide()},handleAction(t){this.hide(),t.action&&t.action()},focusFirstItem(){this.focusItem(0)},focusItem(t){var i;const e=this.$refs.menuItems;if(!Array.isArray(e)||!e.length)return;const n=e[(t+e.length)%e.length];(i=n==null?void 0:n.focus)==null||i.call(n)},hideAndFocusTrigger(){this.hide(),this.$nextTick(()=>{var n,i;const t=this.$refs.triggerRef,e=((n=t==null?void 0:t.querySelector)==null?void 0:n.call(t,"button, a, [tabindex]"))||t;(i=e==null?void 0:e.focus)==null||i.call(e)})}},beforeUnmount(){document.removeEventListener("click",this.onClickOutside,!0)}},Y2e=["onClick","onKeydown"];function q2e(t,e,n,i,s,o){const r=W("MoreFilled"),a=be,l=We,c=No;return v(),D(c,{trigger:"manual",placement:n.placement,persistent:n.persistent,width:n.width,visible:s.visible,teleported:n.teleported,"popper-class":"fcom_menu_below_nav",onAfterEnter:o.focusFirstItem,ref:"popoverRef"},{reference:w(()=>[g("span",{ref:"triggerRef",class:"fcom_action_popover_trigger",onClick:e[0]||(e[0]=(...u)=>o.toggle&&o.toggle(...u))},[le(t.$slots,"trigger",{},()=>[_(l,{"aria-label":t.$t("View actions"),"aria-haspopup":"menu","aria-expanded":s.visible,class:"fcom_action_popover_default_trigger_button",size:"small"},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1})]),_:1},8,["aria-label","aria-expanded"])])],512)]),default:w(()=>[le(t.$slots,"default",{hide:o.hide},()=>[g("ul",{class:"actions_items",role:"menu","aria-orientation":"vertical",onKeydown:e[1]||(e[1]=ut(Ae((...u)=>o.hideAndFocusTrigger&&o.hideAndFocusTrigger(...u),["prevent","stop"]),["esc"]))},[(v(!0),A(ee,null,Ce(n.items,(u,d)=>(v(),A("li",{key:d,ref_for:!0,ref:"menuItems",class:G(["fcom_action_popover_item",u.type?"fcom_action_popover_item_"+u.type:""]),role:"menuitem",tabindex:"0",onClick:h=>o.handleAction(u),onKeydown:[ut(Ae(h=>o.handleAction(u),["prevent"]),["enter"]),ut(Ae(h=>o.handleAction(u),["prevent"]),["space"]),ut(Ae(h=>o.focusItem(d+1),["prevent"]),["down"]),ut(Ae(h=>o.focusItem(d-1),["prevent"]),["up"])]},S(u.label),43,Y2e))),128))],32)])]),_:3},8,["placement","persistent","width","visible","teleported","onAfterEnter"])}const Pa=de(W2e,[["render",q2e]]),G2e={name:"SmilyIcon"},X2e={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},K2e=$a('<g><circle cx="9.99996" cy="10.0013" r="8.33333" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></circle><path d="M6.66663 12.5C7.42673 13.512 8.6369 14.1667 9.99996 14.1667C11.363 14.1667 12.5732 13.512 13.3333 12.5" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M6.6741 7.5L6.66663 7.5Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M13.3333 7.5L13.3258 7.5Z" fill="currentColor"></path><path d="M6.6741 7.5L6.66663 7.5M13.3333 7.5L13.3258 7.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></g>',1),Z2e=[K2e];function J2e(t,e,n,i,s,o){return v(),A("svg",X2e,Z2e)}const Q2e=de(G2e,[["render",J2e]]),ewe={name:"EmojiPicker",components:{Picker:j2e,ActionPopover:Pa,SmilyIcon:Q2e},emits:["emoji-selected"],props:{close_on_select:{type:Boolean,default:!1}},data(){return{emojiIndex:null,emojiLoading:!1,errorMessage:"",isLoading:!1}},methods:{onEmojiSelect(t,e){this.$emit("emoji-selected",t.native),this.close_on_select&&e&&e()},loadEmojiAssets(){if(this.isLoading)return;if(window.fcomEmojiIndex){this.emojiIndex=window.fcomEmojiIndex,this.emojiLoading=!1;return}this.isLoading=!0;let t=this.appVars.assets_url+"libs/static/tw_emojis.json";this.emojiLoading=!0,fetch(t).then(e=>e.json()).then(e=>{e?(window.fcomEmojiIndex=new Jbe(e),this.emojiIndex=window.fcomEmojiIndex,this.emojiLoading=!1):this.errorMessage=this.$t("Emoji loading failed")}).catch(()=>{this.errorMessage=this.$t("Emoji loading failed")}).finally(()=>{this.isLoading=!1})}}},twe={class:"ffcom_emoji"},nwe={key:0,class:"emoji-mart emoji-mart-static",style:{width:"320px",padding:"10px 20px"}},swe={key:0},iwe={style:{"text-align":"center","margin-bottom":"20px"}},owe={key:1,class:"fcom_emoji_holder"};function rwe(t,e,n,i,s,o){const r=W("SmilyIcon"),a=be,l=We,c=Wt,u=W("Picker"),d=W("action-popover");return v(),D(d,{ref:"fcom_emoji_popover","close-on-click-outside":!0,placement:"bottom",persistent:!1,"trigger-interactive":!0,teleported:!0,width:350,onShow:o.loadEmojiAssets},{trigger:w(()=>[_(l,{"aria-label":"Pick Imoji",text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1})]),_:1})]),default:w(({hide:h})=>[g("div",twe,[s.emojiLoading?(v(),A("div",nwe,[s.errorMessage?(v(),A("div",swe,S(s.errorMessage),1)):(v(),A(ee,{key:1},[g("div",iwe,S(t.$t("Loading...")),1),_(c,{animated:!0,rows:3})],64))])):s.emojiIndex?(v(),A("div",owe,[_(u,{title:t.$t("Pick Emoji"),i18n:{search:t.$t("Search"),notfound:t.$t("No Emoji Found"),categories:{search:t.$t("Search Results"),recent:t.$t("Frequently Used"),smileys:t.$t("Smileys & Emotion"),people:t.$t("People & Body"),nature:t.$t("Animals & Nature"),foods:t.$t("Food & Drink"),activity:t.$t("Activity"),places:t.$t("Travel & Places"),objects:t.$t("Objects"),symbols:t.$t("Symbols"),flags:t.$t("Flags"),custom:t.$t("Custom")}},color:"#66b1ff",showPreview:!1,ref:"picker",data:s.emojiIndex,set:"twitter",onSelect:f=>o.onEmojiSelect(f,h),emojiSize:22,sheetSize:32,emojiTooltip:!1},null,8,["title","i18n","data","onSelect"])])):O("",!0)])]),_:1},8,["onShow"])}const JV=de(ewe,[["render",rwe]]),awe={name:"LogoEmojiSelector",components:{EmojiPicker:JV,ImageUploader:vl,SvgShapeGenerator:Mbe,ActionPopover:Pa},props:{config:{type:Object,required:!0,default:()=>({emoji:"",logo:"",shape_svg:""})},fallback_mark:{type:String,default:'<span class="fcom_no_avatar"></span>'},custom_svg:{type:Boolean,default:!1}},data(){return{emoji:this.config.emoji||"",logo:this.config.logo||"",shape_svg:this.config.shape_svg||"",selectedTab:"emoji"}},methods:{setData(t){t=="emoji"?(this.logo="",this.shape_svg=""):t=="shape_svg"?(this.emoji="",this.logo=""):(this.emoji="",this.shape_svg=""),this.$emit("update",{logo:this.logo,emoji:this.emoji,shape_svg:this.shape_svg})},handleLogoPhotoUpload(t){this.logo=t,this.setData("logo")},handleShapeChanged(t){this.shape_svg=t,this.setData("shape_svg")}},computed:{currentMark(){return this.logo?`<img alt="" src="${this.logo}" style="width: 20px; height: 20px; aspect-ratio: 1/1;">`:this.emoji.trim()?`<span style="font-size: 20px">${this.emoji.trim()}</span>`:this.shape_svg?'<i class="fcom_shape el-icon">'+this.shape_svg+"</i>":this.fallback_mark}},mounted(){if(this.logo)this.selectedTab="logo";else if(this.emoji)this.selectedTab="emoji";else if(this.shape_svg){if(this.custom_svg&&!/fcom_shape/.test(this.shape_svg)){this.selectedTab="shape_svg";return}this.selectedTab="shape"}}},lwe=["innerHTML"];function cwe(t,e,n,i,s,o){const r=We,a=W("EmojiPicker"),l=ft,c=Rb,u=W("SvgShapeGenerator"),d=Fo,h=W("ImageUploader"),f=Db,p=W("action-popover");return v(),D(p,{ref:"iconPicker","close-on-click-outside":!0,"trigger-interactive":!0,teleported:!0,width:t.modalWidth},{trigger:w(()=>[_(r,{"aria-label":"Pick Emoji",style:{padding:"4px 16px",display:"flex","justify-content":"center","align-items":"center"}},{default:w(()=>[g("span",{class:"logo_emoji_holder",style:{cursor:"pointer"},innerHTML:o.currentMark||""},null,8,lwe)]),_:1})]),default:w(({hide:m})=>[g("div",null,[_(f,{modelValue:s.selectedTab,"onUpdate:modelValue":e[5]||(e[5]=y=>s.selectedTab=y),type:"border-card"},{default:w(()=>[_(c,{name:"emoji",label:t.$t("Emoji")},{default:w(()=>[_(l,{onChange:e[1]||(e[1]=y=>o.setData("emoji")),modelValue:s.emoji,"onUpdate:modelValue":e[2]||(e[2]=y=>s.emoji=y),placeholder:t.$t("Select or paste your emoji here"),style:{width:"100%"}},cs({_:2},[t.has_pro?{name:"append",fn:w(()=>[_(a,{close_on_select:!0,onEmojiSelected:e[0]||(e[0]=y=>{s.emoji=y,o.setData("emoji")})})]),key:"0"}:void 0]),1032,["modelValue","placeholder"])]),_:1},8,["label"]),_(c,{name:"shape",label:t.$t("Shape")},{default:w(()=>[_(u,{onUpdate:o.handleShapeChanged},null,8,["onUpdate"])]),_:1},8,["label"]),n.custom_svg?(v(),D(c,{key:0,name:"shape_svg",label:t.$t("Custom SVG")},{default:w(()=>[_(l,{rows:4,type:"textarea",onChange:e[3]||(e[3]=y=>o.setData("shape_svg")),modelValue:s.shape_svg,"onUpdate:modelValue":e[4]||(e[4]=y=>s.shape_svg=y),placeholder:t.$t("Paste your SVG here"),style:{width:"100%"}},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):O("",!0),_(c,{name:"logo",label:t.$t("Custom Image")},{default:w(()=>[s.logo?(v(),D(d,{key:0,alt:t.$t("Logo"),src:s.logo,style:{"max-width":"100px"}},null,8,["alt","src"])):O("",!0),_(h,{can_remove:!!s.logo,isTextBtn:!1,additionalData:{resize:!0,max_width:400},onUploaded:o.handleLogoPhotoUpload},null,8,["can_remove","onUploaded"])]),_:1},8,["label"])]),_:1},8,["modelValue"]),_(r,{onClick:y=>m(),type:"success",plain:"",class:"fcom_mt_20"},{default:w(()=>[B(S(t.$t("Close")),1)]),_:2},1032,["onClick"])])]),_:1},8,["width"])}const I1=de(awe,[["render",cwe]]),uwe={name:"SlugInput",emits:["update:modelValue"],props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},is_inital_inactive:{type:Boolean,default:!1},edit_notice:{type:String,default:""},popMessage:{type:String,default:""},description:{type:String,default:""},prefix:{type:String,default:""}},watch:{modelValue(t){this.model=t}},data(){return{model:this.modelValue,showEdit:this.is_inital_inactive}},methods:{updateSlug(){this.model=this.model.replace(/\s/g,"-"),this.model=this.model.replace(/[^a-zA-Z0-9-_]/g,""),this.$emit("update:modelValue",this.model)},confirmEditInit(){this.$confirm(this.popMessage||this.$t("Are you sure you want to change the slug?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("No"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.showEdit=!1})}}},dwe={key:0,class:"fcom_slug_input_info"},hwe=["innerHTML"],fwe={key:1,class:"fcom_help_text"};function pwe(t,e,n,i,s,o){const r=We,a=ft;return v(),A(ee,null,[_(a,{class:"fcom_slug_input",disabled:n.disabled,readonly:s.showEdit,modelValue:s.model,"onUpdate:modelValue":e[1]||(e[1]=l=>s.model=l),ref:"input",placeholder:n.placeholder,onInput:o.updateSlug},cs({_:2},[n.prefix?{name:"prepend",fn:w(()=>[g("span",null,S(n.prefix),1)]),key:"0"}:void 0,s.showEdit?{name:"append",fn:w(()=>[_(r,{onClick:e[0]||(e[0]=l=>o.confirmEditInit()),text:"",type:"info"},{default:w(()=>[B(S(t.$t("change")),1)]),_:1})]),key:"1"}:void 0]),1032,["disabled","readonly","modelValue","placeholder","onInput"]),!s.showEdit&&n.edit_notice?(v(),A("div",dwe,[g("p",{innerHTML:n.edit_notice},null,8,hwe)])):O("",!0),n.description?(v(),A("div",fwe,[g("p",null,S(n.description),1)])):O("",!0)],64)}const Rd=de(uwe,[["render",pwe]]),mwe={name:"ErrorAlerts",props:{errors:{type:Array,default:()=>[]},dismissable:{type:Boolean,default:!1}},data(){return{dismissed:!1}},watch:{errors(){this.dismissed=!1}}},gwe={class:"fcom_errors_alert_list"};function vwe(t,e,n,i,s,o){const r=Ur;return n.errors.length&&!s.dismissed?(v(),D(r,{key:0,type:"warning",closable:n.dismissable,"show-icon":"",onClose:e[0]||(e[0]=a=>s.dismissed=!0)},{title:w(()=>[g("ul",gwe,[(v(!0),A(ee,null,Ce(n.errors,(a,l)=>(v(),A("li",{key:l},S(a),1))),128))])]),_:1},8,["closable"])):O("",!0)}const L1=de(mwe,[["render",vwe]]),_we={name:"TopicSelector",props:["modelValue","creatable","space_id"],emits:["update:modelValue"],components:{SlugInput:Rd,ActionPopover:Pa,ErrorAlerts:L1},data(){return{topics:[],selected:this.modelValue,loading:!1,creatingTopic:!1,newTopicErrors:[],newTopic:{title:"OK"}}},computed:{maxTopicsPerSpace(){var t;return((t=this.appVars.topicsConfig)==null?void 0:t.max_topics_per_space)||20},isTopicLimitReached(){var t;return((t=this.selected)==null?void 0:t.length)>=this.maxTopicsPerSpace}},methods:{getTopicsPlaceholder(){return this.$_n("Choose a topic","Choose up to %s topics",this.maxTopicsPerSpace)},initCreatetopic(){this.newTopicErrors=[],this.newTopic={title:"",description:"",slug:""}},validateForm(){return this.newTopicErrors=[],(!this.newTopic.title||!this.newTopic.title.trim())&&this.newTopicErrors.push(this.$t("Topic title is required.")),this.newTopicErrors.length===0},fetchTopics(){this.loading=!0,this.$get("admin/topics",{optionsOnly:!0,space_id:this.space_id}).then(t=>{this.topics=t.topics}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},createTopic(t){if(!this.validateForm())return;this.creatingTopic=!0;let e={title:this.newTopic.title,description:this.newTopic.description,slug:this.newTopic.slug,is_inline:!0};this.$post("admin/topics",e).then(n=>{this.$notify.success(n.message),this.fetchTopics(),this.selected.push(n.topic.id),t()}).catch(n=>{this.$handleError(n)}).finally(()=>{this.creatingTopic=!1})}},watch:{selected(){this.$emit("update:modelValue",this.selected)}},mounted(){this.fetchTopics()}},ywe={class:"fcom_topic_selector"},bwe={key:0,class:"fcom_meta_text"};function wwe(t,e,n,i,s,o){const r=on,a=Jt,l=W("Plus"),c=be,u=We,d=ft,h=en,f=W("slug-input"),p=W("error-alerts"),m=sn,y=W("action-popover"),b=xt("loading");return v(),A("div",ywe,[De((v(),D(a,{modelValue:s.selected,"onUpdate:modelValue":e[0]||(e[0]=k=>s.selected=k),"popper-class":"fcom_topics_from_settings",style:{width:"100%"},filterable:!0,multiple:!0,clearable:"","multiple-limit":o.maxTopicsPerSpace,placeholder:o.getTopicsPlaceholder()},{default:w(()=>[(v(!0),A(ee,null,Ce(s.topics,k=>(v(),D(r,{key:k.slug,label:k.title,value:k.id},{default:w(()=>[g("span",null,S(k.title),1),k.description?(v(),A("span",bwe,S(k.description),1)):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","multiple-limit","placeholder"])),[[b,s.loading]]),t.isAdmin()&&n.creatable?(v(),D(y,{key:0,placement:"left",width:400,onShow:o.initCreatetopic},{trigger:w(()=>[_(u,{disabled:o.isTopicLimitReached,class:"fcom_secondary_button"},{default:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1}),g("span",null,S(t.$t("New")),1)]),_:1},8,["disabled"])]),default:w(({hide:k})=>[_(m,{modelValue:s.newTopic,"onUpdate:modelValue":e[4]||(e[4]=C=>s.newTopic=C),"label-position":"top","require-asterisk-position":"right"},{default:w(()=>[_(h,{label:t.$t("Title"),required:""},{default:w(()=>[_(d,{modelValue:s.newTopic.title,"onUpdate:modelValue":e[1]||(e[1]=C=>s.newTopic.title=C),placeholder:t.$t("Title of the topic")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(h,{label:t.$t("Slug (optional)")},{default:w(()=>[_(f,{modelValue:s.newTopic.slug,"onUpdate:modelValue":e[2]||(e[2]=C=>s.newTopic.slug=C),placeholder:t.$t("Slug of the topic"),description:t.$t("No spaces or special characters allowed. Only letters, numbers, hyphens, and underscores.")},null,8,["modelValue","placeholder","description"])]),_:1},8,["label"]),_(h,{label:t.$t("Description (optional)")},{default:w(()=>[_(d,{modelValue:s.newTopic.description,"onUpdate:modelValue":e[3]||(e[3]=C=>s.newTopic.description=C),type:"textarea",rows:3,placeholder:t.$t("Description of the topic")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,{errors:s.newTopicErrors,style:{"margin-bottom":"16px"}},null,8,["errors"]),_(h,null,{default:w(()=>[_(u,{class:"fcom_primary_button",onClick:C=>o.createTopic(k),loading:s.creatingTopic},{default:w(()=>[B(S(t.$t("Create")),1)]),_:2},1032,["onClick","loading"])]),_:2},1024)]),_:2},1032,["modelValue"])]),_:1},8,["onShow"])):O("",!0)])}const QV=de(_we,[["render",wwe]]),kwe={name:"ListViewIcon"},Cwe={width:"160",height:"158",viewBox:"0 0 160 158",fill:"none",xmlns:"http://www.w3.org/2000/svg"},xwe=$a('<rect x="0.5" y="0.5" width="159" height="157" rx="5.5" fill="transparent"></rect><rect x="0.5" y="0.5" width="159" height="157" rx="5.5" stroke="var(--fcom-secondary-border)"></rect><rect x="12.5" y="12.5" width="135" height="27" rx="3.5" fill="transparent"></rect><rect x="12.5" y="12.5" width="135" height="27" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 26C20 21.5817 23.5817 18 28 18C32.4183 18 36 21.5817 36 26C36 30.4183 32.4183 34 28 34C23.5817 34 20 30.4183 20 26Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip0_3601_59265)"><ellipse cx="27.9996" cy="33.6" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="24.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 26C44 24.3431 45.3431 23 47 23H137C138.657 23 140 24.3431 140 26C140 27.6569 138.657 29 137 29H47C45.3431 29 44 27.6569 44 26Z" fill="var(--fcom-secondary-border)"></path><rect x="12.5" y="48.5" width="135" height="27" rx="3.5" fill="transparent"></rect><rect x="12.5" y="48.5" width="135" height="27" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 62C20 57.5817 23.5817 54 28 54C32.4183 54 36 57.5817 36 62C36 66.4183 32.4183 70 28 70C23.5817 70 20 66.4183 20 62Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip1_3601_59265)"><ellipse cx="27.9996" cy="69.6001" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="60.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 62C44 60.3431 45.3431 59 47 59H137C138.657 59 140 60.3431 140 62C140 63.6569 138.657 65 137 65H47C45.3431 65 44 63.6569 44 62Z" fill="var(--fcom-secondary-border)"></path><rect x="12.5" y="84.5" width="135" height="27" rx="3.5" fill="transparent"></rect><rect x="12.5" y="84.5" width="135" height="27" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 98C20 93.5817 23.5817 90 28 90C32.4183 90 36 93.5817 36 98C36 102.418 32.4183 106 28 106C23.5817 106 20 102.418 20 98Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip2_3601_59265)"><ellipse cx="27.9996" cy="105.6" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="96.3999" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 98C44 96.3431 45.3431 95 47 95H137C138.657 95 140 96.3431 140 98C140 99.6569 138.657 101 137 101H47C45.3431 101 44 99.6569 44 98Z" fill="var(--fcom-secondary-border)"></path><rect x="12.5" y="120.5" width="135" height="27" rx="3.5" fill="transparent"></rect><rect x="12.5" y="120.5" width="135" height="27" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 134C20 129.582 23.5817 126 28 126C32.4183 126 36 129.582 36 134C36 138.418 32.4183 142 28 142C23.5817 142 20 138.418 20 134Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip3_3601_59265)"><ellipse cx="27.9996" cy="141.6" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="132.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 134C44 132.343 45.3431 131 47 131H137C138.657 131 140 132.343 140 134C140 135.657 138.657 137 137 137H47C45.3431 137 44 135.657 44 134Z" fill="var(--fcom-secondary-border)"></path><defs><clipPath id="clip0_3601_59265"><rect x="20" y="18" width="16" height="16" rx="8" fill="transparent"></rect></clipPath><clipPath id="clip1_3601_59265"><rect x="20" y="54" width="16" height="16" rx="8" fill="transparent"></rect></clipPath><clipPath id="clip2_3601_59265"><rect x="20" y="90" width="16" height="16" rx="8" fill="transparent"></rect></clipPath><clipPath id="clip3_3601_59265"><rect x="20" y="126" width="16" height="16" rx="8" fill="transparent"></rect></clipPath></defs>',23),Swe=[xwe];function $we(t,e,n,i,s,o){return v(),A("svg",Cwe,Swe)}const Awe=de(kwe,[["render",$we]]),Ewe={name:"TimelineViewIcon"},Mwe={width:"160",height:"158",viewBox:"0 0 160 158",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Twe=$a('<rect x="0.5" y="0.5" width="159" height="157" rx="5.5" fill="transparent"></rect><rect x="0.5" y="0.5" width="159" height="157" rx="5.5" stroke="var(--fcom-secondary-border)"></rect><rect x="12.5" y="12.5" width="135" height="60" rx="3.5" fill="transparent"></rect><rect x="12.5" y="12.5" width="135" height="60" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 24C20 21.7909 21.7909 20 24 20H136C138.209 20 140 21.7909 140 24C140 26.2091 138.209 28 136 28H24C21.7909 28 20 26.2091 20 24Z" fill="var(--fcom-secondary-border)"></path><path d="M20 37C20 34.7909 21.7909 33 24 33H130.286C132.495 33 134.286 34.7909 134.286 37C134.286 39.2091 132.495 41 130.286 41H24C21.7909 41 20 39.2091 20 37Z" fill="var(--fcom-secondary-border)"></path><path d="M20 57C20 52.5817 23.5817 49 28 49C32.4183 49 36 52.5817 36 57C36 61.4183 32.4183 65 28 65C23.5817 65 20 61.4183 20 57Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip0_3601_59186)"><ellipse cx="27.9996" cy="64.6001" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="55.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 53C44 51.3431 45.3431 50 47 50H81C82.6569 50 84 51.3431 84 53C84 54.6569 82.6569 56 81 56H47C45.3431 56 44 54.6569 44 53Z" fill="var(--fcom-secondary-border)"></path><path d="M44 62C44 60.8954 44.8954 60 46 60H66C67.1046 60 68 60.8954 68 62C68 63.1046 67.1046 64 66 64H46C44.8954 64 44 63.1046 44 62Z" fill="var(--fcom-secondary-border)"></path><rect x="12.5" y="85.5" width="135" height="60" rx="3.5" fill="transparent"></rect><rect x="12.5" y="85.5" width="135" height="60" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 97C20 94.7909 21.7909 93 24 93H136C138.209 93 140 94.7909 140 97C140 99.2091 138.209 101 136 101H24C21.7909 101 20 99.2091 20 97Z" fill="var(--fcom-secondary-border)"></path><path d="M20 110C20 107.791 21.7909 106 24 106H130.286C132.495 106 134.286 107.791 134.286 110C134.286 112.209 132.495 114 130.286 114H24C21.7909 114 20 112.209 20 110Z" fill="var(--fcom-secondary-border)"></path><path d="M20 130C20 125.582 23.5817 122 28 122C32.4183 122 36 125.582 36 130C36 134.418 32.4183 138 28 138C23.5817 138 20 134.418 20 130Z" fill="var(--fcom-secondary-border)"></path><g clip-path="url(#clip1_3601_59186)"><ellipse cx="27.9996" cy="137.6" rx="6.4" ry="4.8" fill="var(--fcom-primary-bg)" fill-opacity="0.72"></ellipse><circle opacity="0.9" cx="27.9998" cy="128.4" r="3.2" fill="var(--fcom-primary-bg)"></circle></g><path d="M44 126C44 124.343 45.3431 123 47 123H81C82.6569 123 84 124.343 84 126C84 127.657 82.6569 129 81 129H47C45.3431 129 44 127.657 44 126Z" fill="var(--fcom-secondary-border)"></path><path d="M44 135C44 133.895 44.8954 133 46 133H66C67.1046 133 68 133.895 68 135C68 136.105 67.1046 137 66 137H46C44.8954 137 44 136.105 44 135Z" fill="var(--fcom-secondary-border)"></path><defs><clipPath id="clip0_3601_59186"><rect x="20" y="49" width="16" height="16" rx="8" fill="transparent"></rect></clipPath><clipPath id="clip1_3601_59186"><rect x="20" y="122" width="16" height="16" rx="8" fill="transparent"></rect></clipPath></defs>',19),Pwe=[Twe];function Iwe(t,e,n,i,s,o){return v(),A("svg",Mwe,Pwe)}const Lwe=de(Ewe,[["render",Iwe]]),Owe={name:"SpaceGroupSelector",props:["modelValue","space_id"],emits:["update:modelValue"],data(){return{loading:!1,selected:this.modelValue,groups:[]}},watch:{selected(t){this.$emit("update:modelValue",t)}},methods:{getGroups(){this.loading=!0,this.$get("spaces/space_groups",{options_only:"yes",space_id:this.space_id}).then(t=>{this.groups=t.groups}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.getGroups()}};function Dwe(t,e,n,i,s,o){const r=on,a=Jt,l=xt("loading");return De((v(),D(a,{placeholder:t.$t("Select Menu Group"),clearable:"",modelValue:s.selected,"onUpdate:modelValue":e[0]||(e[0]=c=>s.selected=c)},{default:w(()=>[(v(!0),A(ee,null,Ce(s.groups,c=>(v(),D(r,{key:c.id,value:c.id.toString(),label:c.title},null,8,["value","label"]))),128))]),_:1},8,["placeholder","modelValue"])),[[l,s.loading]])}const h8=de(Owe,[["render",Dwe]]),Rwe={name:"global_form_builder",props:{formData:{type:Object,required:!1,default(){return{}}},submitButtonText:{type:String,required:!1,default:"Save"},formFields:{type:Array,required:!0,default(){return[]}},disableSubmit:{type:Boolean,required:!1,default:!1}},methods:{handleSubmit(){this.$emit("submit",this.formData)}}},Vwe={class:"fcom_form_builder"},Fwe=["innerHTML"],Nwe={key:8},Bwe={key:9,class:"fcom_help_text"},zwe=["innerHTML"];function Hwe(t,e,n,i,s,o){const r=ft,a=Mi,l=xs,c=on,u=Jt,d=Gt,h=N4,f=Od,p=Hc,m=en,y=We,b=sn;return v(),A("div",Vwe,[_(b,{"label-position":"top",model:n.formData,onSubmit:Ae(t.doNothing,["prevent"])},{default:w(()=>[(v(!0),A(ee,null,Ce(n.formFields,(k,C)=>(v(),D(m,{key:t.index,label:k.label},cs({default:w(()=>[k.type=="text"?(v(),D(r,{key:0,modelValue:n.formData[C],"onUpdate:modelValue":$=>n.formData[C]=$,placeholder:k.placeholder,type:k.data_type||"text"},null,8,["modelValue","onUpdate:modelValue","placeholder","type"])):k.type=="radio"?(v(),D(l,{key:1,modelValue:n.formData[C],"onUpdate:modelValue":$=>n.formData[C]=$},{default:w(()=>[(v(!0),A(ee,null,Ce(k.options,($,x)=>(v(),D(a,{key:x,value:$.value,label:$.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):k.type=="select"?(v(),D(u,{key:2,class:"fcom_select",multiple:k.is_multiple,clearable:"",filterable:"",modelValue:n.formData[C],"onUpdate:modelValue":$=>n.formData[C]=$,placeholder:k.placeholder},{default:w(()=>[(v(!0),A(ee,null,Ce(k.options,($,x)=>(v(),D(c,{key:x,label:$.label,value:$.value},null,8,["label","value"]))),128))]),_:2},1032,["multiple","modelValue","onUpdate:modelValue","placeholder"])):k.type=="checkbox"?(v(),D(h,{key:3,modelValue:n.formData[C],"onUpdate:modelValue":$=>n.formData[C]=$},{default:w(()=>[(v(!0),A(ee,null,Ce(k.options,($,x)=>(v(),D(d,{key:x,value:$.value,label:$.label,class:"fcom_checkbox"},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):k.type=="inline_checkbox"?(v(),D(d,{key:4,modelValue:n.formData[C],"onUpdate:modelValue":$=>n.formData[C]=$,"true-value":k.true_value||"yes","false-value":k.false_value||"no",class:"fcom_checkbox"},{default:w(()=>[B(S(k.checkbox_label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","true-value","false-value"])):k.type=="date"?(v(),D(f,{key:5,modelValue:n.formData[C],"onUpdate:modelValue":$=>n.formData[C]=$,type:k.data_type||"date","value-format":k.value_format||"YYYY-MM-DD",format:k.value_format||"YYYY-MM-DD",placeholder:k.placeholder},null,8,["modelValue","onUpdate:modelValue","type","value-format","format","placeholder"])):k.type=="color_picker"?(v(),D(p,{key:6,modelValue:n.formData[C],"onUpdate:modelValue":$=>n.formData[C]=$},null,8,["modelValue","onUpdate:modelValue"])):k.type=="raw_html"?(v(),A("div",{key:7,innerHTML:k.content},null,8,Fwe)):(v(),A("div",Nwe,[g("pre",null,S(k),1)])),k.help_text?(v(),A("div",Bwe,[g("p",{innerHTML:k.help_text},null,8,zwe)])):O("",!0)]),_:2},[k.label?{name:"label",fn:w(()=>[B(S(k.label),1)]),key:"0"}:void 0]),1032,["label"]))),128)),n.disableSubmit?O("",!0):(v(),D(m,{key:0},{default:w(()=>[_(y,{class:"fcom_primary_button",onClick:Ae(o.handleSubmit,["prevent"])},{default:w(()=>[B(S(n.submitButtonText),1)]),_:1},8,["onClick"])]),_:1}))]),_:1},8,["model","onSubmit"])])}const eF=de(Rwe,[["render",Hwe]]),Uwe={name:"CardViewIcon"},jwe={xmlns:"http://www.w3.org/2000/svg",width:"160",height:"158",viewBox:"0 0 160 158",fill:"none"},Wwe=$a('<rect x="0.5" y="0.5" width="159" height="157" rx="5.5" fill="transparent"></rect><rect x="0.5" y="0.5" width="159" height="157" rx="5.5" stroke="var(--fcom-secondary-border)"></rect><rect x="12.5" y="12.5" width="63" height="62" rx="3.5" fill="transparent"></rect><rect x="12.5" y="12.5" width="63" height="62" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 24.5714C20 22.0467 22.0467 20 24.5714 20H63.4286C65.9533 20 68 22.0467 68 24.5714V42.4286C68 44.9533 65.9533 47 63.4286 47H24.5714C22.0467 47 20 44.9533 20 42.4286V24.5714Z" fill="var(--fcom-primary-border)"></path><path d="M20 56C20 54.3431 21.3431 53 23 53H65C66.6569 53 68 54.3431 68 56C68 57.6569 66.6569 59 65 59H23C21.3431 59 20 57.6569 20 56Z" fill="var(--fcom-secondary-border)"></path><path d="M20 66C20 64.3431 21.3431 63 23 63H41C42.6569 63 44 64.3431 44 66C44 67.6569 42.6569 69 41 69H23C21.3431 69 20 67.6569 20 66Z" fill="var(--fcom-secondary-border)"></path><rect x="84.5" y="12.5" width="63" height="62" rx="3.5" fill="transparent"></rect><rect x="84.5" y="12.5" width="63" height="62" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M92 24.5714C92 22.0467 94.0467 20 96.5714 20H135.429C137.953 20 140 22.0467 140 24.5714V42.4286C140 44.9533 137.953 47 135.429 47H96.5714C94.0467 47 92 44.9533 92 42.4286V24.5714Z" fill="var(--fcom-primary-border)"></path><path d="M92 56C92 54.3431 93.3431 53 95 53H137C138.657 53 140 54.3431 140 56C140 57.6569 138.657 59 137 59H95C93.3431 59 92 57.6569 92 56Z" fill="var(--fcom-secondary-border)"></path><path d="M92 66C92 64.3431 93.3431 63 95 63H113C114.657 63 116 64.3431 116 66C116 67.6569 114.657 69 113 69H95C93.3431 69 92 67.6569 92 66Z" fill="var(--fcom-secondary-border)"></path><rect x="12.5" y="83.5" width="63" height="62" rx="3.5" fill="transparent"></rect><rect x="12.5" y="83.5" width="63" height="62" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M20 95.5714C20 93.0467 22.0467 91 24.5714 91H63.4286C65.9533 91 68 93.0467 68 95.5714V113.429C68 115.953 65.9533 118 63.4286 118H24.5714C22.0467 118 20 115.953 20 113.429V95.5714Z" fill="var(--fcom-primary-border)"></path><path d="M20 127C20 125.343 21.3431 124 23 124H65C66.6569 124 68 125.343 68 127C68 128.657 66.6569 130 65 130H23C21.3431 130 20 128.657 20 127Z" fill="var(--fcom-secondary-border)"></path><path d="M20 137C20 135.343 21.3431 134 23 134H41C42.6569 134 44 135.343 44 137C44 138.657 42.6569 140 41 140H23C21.3431 140 20 138.657 20 137Z" fill="var(--fcom-secondary-border)"></path><rect x="84.5" y="83.5" width="63" height="62" rx="3.5" fill="transparent"></rect><rect x="84.5" y="83.5" width="63" height="62" rx="3.5" stroke="var(--fcom-secondary-border)"></rect><path d="M92 95.5714C92 93.0467 94.0467 91 96.5714 91H135.429C137.953 91 140 93.0467 140 95.5714V113.429C140 115.953 137.953 118 135.429 118H96.5714C94.0467 118 92 115.953 92 113.429V95.5714Z" fill="var(--fcom-primary-border)"></path><path d="M92 127C92 125.343 93.3431 124 95 124H137C138.657 124 140 125.343 140 127C140 128.657 138.657 130 137 130H95C93.3431 130 92 128.657 92 127Z" fill="var(--fcom-secondary-border)"></path><path d="M92 137C92 135.343 93.3431 134 95 134H113C114.657 134 116 135.343 116 137C116 138.657 114.657 140 113 140H95C93.3431 140 92 138.657 92 137Z" fill="var(--fcom-secondary-border)"></path>',22),Ywe=[Wwe];function qwe(t,e,n,i,s,o){return v(),A("svg",jwe,Ywe)}const Gwe=de(Uwe,[["render",qwe]]),Xwe={name:"CreateSpaceForm",emits:["completed"],components:{SpaceGroupSelector:h8,SlugInput:Rd,ImageUploader:vl,LogoEmojiSelector:I1,TopicSelector:QV,ListViewIcon:Awe,TimelineViewIcon:Lwe,FormBuilder:eF,ErrorAlerts:L1,CardViewIcon:Gwe},props:{community:{required:!1,default:null},parent_id:{required:!1,default:null},savingCount:{required:!1,default:0},disable_redirect:{required:!1,default:!1}},data(){return{saving:!1,privacies:vbe,formErrors:[],form:{title:"",slug:"",privacy:"private",parent_id:"",description:"",settings:{custom_lock_screen:"no",restricted_post_only:"no",verified_post_only:"no",emoji:"🚀",shape_svg:"",can_request_join:"yes",layout_style:"timeline",disable_layout_style:"no",show_sidebar:"yes",members_page_status:"members_only",document_library:"no",document_access:"members_only",media_gallery:"no",media_access:"members_only",document_upload:"admin_only"},topic_ids:[]},dataLoaded:!1,showingSections:["basic"],postOrderOptions:this.appVars.post_order_by_options,commentOrderOptions:this.appVars.comment_order_by_options,metaSettings:null,fetchingMetaBoxes:!1}},watch:{savingCount(){this.submit()}},computed:{isDefaultLockscreen(){return this.form.settings.custom_lock_screen=="no"&&this.form.privacy=="private"}},methods:{goToCustomization(){this.validateForm()&&(this.showingSections=["customization"])},getValidationErrors(){var e,n;const t=[];return(!this.form.title||!this.form.title.trim())&&t.push(this.$t("Space title is required.")),((e=this.form.settings)==null?void 0:e.topic_required)==="yes"&&!((n=this.form.topic_ids)!=null&&n.length)&&t.push(this.$t("Please select at least one topic when members are required to select a topic.")),t},validateForm(){return this.formErrors=this.getValidationErrors(),this.formErrors.length===0},submit(){if(this.form.id){const i=this.getValidationErrors();if(i.length){this.$notify.error(i[0]);return}}else if(!this.validateForm())return;this.saving=!0;let t="spaces",e={space:this.form},n=this.$post;if(this.form.id&&(t+="/"+this.form.id+"/by-id",e={space_id:this.form.id,data:{slug:this.form.slug,title:this.form.title,privacy:this.form.privacy,description:this.form.description,group_chat_support:this.form.group_chat_support,settings:this.form.settings,logo:this.form.logo,parent_id:this.form.parent_id??"",cover_photo:this.form.cover_photo,topic_ids:this.form.topic_ids}},n=this.$put,this.metaSettings)){let i={};this.each(this.metaSettings,(s,o)=>{i[o]=s.settings}),e.meta_settings=i}n(t,e).then(i=>{if(this.$eventBus.emit("reloadMenu"),!this.form.id&&!this.disable_redirect){let s=this.$router.resolve({name:"space_feeds",params:{space:i.space.slug}}).href;window.location.href=s;return}this.$notify.success(i.message),this.$emit("completed",i.space),i.redirect_url&&!this.disable_redirect&&(window.location.href=i.redirect_url)}).catch(i=>{this.form.id||(this.showingSections=["basic"]),this.$handleError(i)}).finally(()=>{this.saving=!1})},handleCoverPhotoUpload(t){this.form.cover_photo=t},handleLogoPhotoUpload(t){this.form.logo=t},fetchMetaBoxes(){this.community.id&&(this.fetchingMetaBoxes=!0,this.$get("spaces/"+this.community.slug+"/meta-settings",{space_id:this.community.id}).then(t=>{this.metaSettings=t.meta_settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetchingMetaBoxes=!1}))}},mounted(){if(this.community&&this.community.id){this.community.chat_thread_id&&(this.community.group_chat_support="yes"),this.form=this.community;let t=[];this.community.topics&&this.each(this.community.topics,e=>{t.push(e.id)}),this.form.topic_ids=t,this.fetchMetaBoxes(this.community.id)}else this.parent_id?this.form.parent_id=this.parent_id:this.$route.query.parent_id&&(this.form.parent_id=this.$route.query.parent_id);this.form.id&&(this.showingSections=["basic","customization"]),this.dataLoaded=!0}},Kwe={key:0},Zwe={class:"fcom_form_section"},Jwe={class:"fcom_help_text"},Qwe={class:"fcom_form_section"},e3e={style:{"font-weight":"bold"}},t3e=["innerHTML"],n3e={key:0},s3e={class:"fcom_help_text"},i3e={key:0},o3e={key:1,class:"fcom_form_section"},r3e={class:"fcom_lined_checkboxes"},a3e={key:0,class:"fcom_pro_feature"},l3e={key:0,class:"fcom_feature_nested"},c3e={key:0,class:"fcom_pro_feature"},u3e={key:1,class:"fcom_feature_nested"},d3e={class:"fcom_form_section"},h3e={class:"fcom_svg_radio_item"},f3e={class:"svg_radio_label"},p3e={class:"fcom_svg_radio_item"},m3e={class:"svg_radio_label"},g3e={class:"fcom_svg_radio_item"},v3e={class:"svg_radio_label"},_3e={class:"fcom_help_text"},y3e={key:0},b3e={key:1},w3e={class:"fcom_form_section"},k3e={class:"fcom_help_text"},C3e=["href"],x3e={class:"fcom_image_uploader_wrapper"},S3e={class:"fcom_help_text"},$3e={class:"fcom_image_uploader_wrapper"},A3e={class:"fcom_help_text"},E3e={class:"fcom_space_form_bottom"},M3e={class:"fcom_space_form_bottom"},T3e=g("span",null,null,-1),P3e={key:0},I3e={class:"fcom_form_section fcom_mt_20"};function L3e(t,e,n,i,s,o){const r=W("logo-emoji-selector"),a=ft,l=en,c=W("SlugInput"),u=W("space-group-selector"),d=on,h=Jt,f=Mi,p=xs,m=Gt,y=W("TimelineViewIcon"),b=W("ListViewIcon"),k=W("CardViewIcon"),C=W("topic-selector"),$=Fo,x=W("EditPen"),M=be,P=We,T=W("Delete"),I=W("ImageUploader"),L=W("error-alerts"),R=sn,V=W("form-builder"),H=xt("loading");return v(),A("div",null,[_(R,{onSubmit:e[32]||(e[32]=Ae(F=>t.doNothing(),["prevent"])),modelValue:s.form,"onUpdate:modelValue":e[33]||(e[33]=F=>s.form=F),"label-position":"top","require-asterisk-position":"right",class:"fcom_space_form"},{default:w(()=>[s.showingSections.indexOf("basic")!==-1?(v(),A(ee,{key:0},[s.form.id?O("",!0):(v(),A("h4",Kwe,S(t.$t("Basic Info")),1)),g("div",Zwe,[g("h4",null,S(t.$t("General")),1),_(l,{label:t.$t("Space Title"),required:""},{default:w(()=>[_(a,{type:"text",placeholder:t.$t("Your Space Title"),modelValue:s.form.title,"onUpdate:modelValue":e[1]||(e[1]=F=>s.form.title=F)},{prepend:w(()=>{var F,z;return[s.dataLoaded?(v(),D(r,{key:0,custom_svg:!0,onUpdate:e[0]||(e[0]=N=>{s.form.settings.emoji=N.emoji,s.form.logo=N.logo,s.form.settings.shape_svg=N.shape_svg}),config:{logo:s.form.logo,emoji:((F=s.form.settings)==null?void 0:F.emoji)||"",shape_svg:((z=s.form.settings)==null?void 0:z.shape_svg)||""}},null,8,["config"])):O("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),s.dataLoaded?(v(),D(l,{key:0,label:t.$t("Slug (optional)")},{default:w(()=>[_(c,{popMessage:t.$t("The URLs of this space posts will be changed to the new slug. If you have lots of contents in this space, you should not change it. Are you sure you want to change it?"),is_inital_inactive:!!s.form.id,modelValue:s.form.slug,"onUpdate:modelValue":e[2]||(e[2]=F=>s.form.slug=F),description:t.$t("No spaces or special characters allowed. Only letters, numbers, hyphens, and underscores."),placeholder:t.$t("Space Slug (no space or special chars)")},null,8,["popMessage","is_inital_inactive","modelValue","description","placeholder"])]),_:1},8,["label"])):O("",!0),_(l,{label:t.$t("Description")},{default:w(()=>[_(a,{type:"textarea",rows:3,placeholder:t.$t("Space Description"),modelValue:s.form.description,"onUpdate:modelValue":e[3]||(e[3]=F=>s.form.description=F)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),_(l,{label:t.$t("Menu Group")},{default:w(()=>[s.dataLoaded?(v(),D(u,{key:0,modelValue:s.form.parent_id,"onUpdate:modelValue":e[4]||(e[4]=F=>s.form.parent_id=F),space_id:s.form.id},null,8,["modelValue","space_id"])):O("",!0),g("div",Jwe,[g("p",null,S(t.$t("Select a menu group to where this space will be added to the sidebar. If you do not select a menu group, it will be available on the all spaces page.")),1)])]),_:1},8,["label"])]),g("div",Qwe,[g("h4",null,S(t.$t("Access Control")),1),_(l,{label:t.$t("Privacy")},{default:w(()=>[_(h,{"popper-class":"rich_select",modelValue:s.form.privacy,"onUpdate:modelValue":e[5]||(e[5]=F=>s.form.privacy=F),placeholder:t.$t("Select Privacy")},{default:w(()=>[(v(!0),A(ee,null,Ce(s.privacies,(F,z)=>(v(),D(d,{key:z,label:F.label,value:z},{default:w(()=>[g("span",e3e,S(t.$labelize(F.label)),1),g("p",{innerHTML:F.description},null,8,t3e)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),s.form.privacy=="private"?(v(),A(ee,{key:0},[_(l,{label:t.$t("Lock Screen Type")},{default:w(()=>[_(p,{modelValue:s.form.settings.custom_lock_screen,"onUpdate:modelValue":e[6]||(e[6]=F=>s.form.settings.custom_lock_screen=F),class:""},{default:w(()=>[_(f,{value:"yes"},{default:w(()=>[B(S(t.$t("Custom Lock Screen")),1)]),_:1}),_(f,{value:"no"},{default:w(()=>[B(S(t.$t("Default Lock Screen")),1)]),_:1}),_(f,{disabled:!t.has_pro,value:"redirect"},{default:w(()=>[B(S(t.$t("Redirect to an URL"))+" ",1),t.has_pro?O("",!0):(v(),A("span",n3e,S(t.$t("Require Pro")),1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),s.form.settings.custom_lock_screen=="redirect"&&t.has_pro?(v(),D(l,{key:0,label:t.$t("Provide the Redirect URL")},{default:w(()=>[_(a,{modelValue:s.form.settings.onboard_redirect_url,"onUpdate:modelValue":e[7]||(e[7]=F=>s.form.settings.onboard_redirect_url=F),type:"text",placeholder:t.$t("Redirect URL for unenrolled users")},null,8,["modelValue","placeholder"]),g("div",s3e,[g("p",null,S(t.$t("This link will be used to redirect the non-members. This may be your sales page for this space")),1)])]),_:1},8,["label"])):O("",!0)],64)):O("",!0),o.isDefaultLockscreen?(v(),D(l,{key:1,style:{"margin-bottom":"0"}},{default:w(()=>[_(m,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.can_request_join,"onUpdate:modelValue":e[8]||(e[8]=F=>s.form.settings.can_request_join=F),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Allow users to request to join this Space")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0),o.isDefaultLockscreen?(v(),D(l,{key:2},{default:w(()=>[_(m,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.show_paywalls,"onUpdate:modelValue":e[9]||(e[9]=F=>s.form.settings.show_paywalls=F),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Show Paywalls in Default Lock Screen")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0),_(l,{label:t.$t("Who can view space members")},{default:w(()=>[_(h,{modelValue:s.form.settings.members_page_status,"onUpdate:modelValue":e[10]||(e[10]=F=>s.form.settings.members_page_status=F)},{default:w(()=>[_(d,{value:"members_only",label:t.$t("Members Only")},null,8,["label"]),_(d,{value:"admin_only",label:t.$t("Admin/Moderators Only")},null,8,["label"]),_(d,{value:"logged_in",label:t.$t("Any Logged in users")},null,8,["label"]),_(d,{value:"everybody",label:t.$t("Anyone")},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"])])],64)):O("",!0),s.showingSections.indexOf("customization")!==-1?(v(),A(ee,{key:1},[s.form.id?O("",!0):(v(),A("h4",i3e,S(t.$t("Customization")),1)),s.form.settings?(v(),A("div",o3e,[g("h4",null,S(t.$t("Features Customizations")),1),_(l,null,{default:w(()=>[g("div",r3e,[_(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:s.form.settings.restricted_post_only,"onUpdate:modelValue":e[11]||(e[11]=F=>s.form.settings.restricted_post_only=F)},{default:w(()=>[B(S(t.$t("Only admin or moderators can create post")),1)]),_:1},8,["modelValue"]),_(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:s.form.settings.verified_post_only,"onUpdate:modelValue":e[12]||(e[12]=F=>s.form.settings.verified_post_only=F)},{default:w(()=>[B(S(t.$t("Only verified members can create posts (admins and moderators can always post)")),1)]),_:1},8,["modelValue"]),_(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:s.form.settings.hide_members_count,"onUpdate:modelValue":e[13]||(e[13]=F=>s.form.settings.hide_members_count=F)},{default:w(()=>[B(S(t.$t("Hide Members count from spaces page (when members page access unavailable)")),1)]),_:1},8,["modelValue"]),_(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:s.form.settings.show_sidebar,"onUpdate:modelValue":e[14]||(e[14]=F=>s.form.settings.show_sidebar=F)},{default:w(()=>[B(S(t.$t("Show Right Sidebar on Space")),1)]),_:1},8,["modelValue"]),_(m,{class:"fcom_checkbox",disabled:!t.has_pro,"true-value":"yes","false-value":"no",modelValue:s.form.settings.document_library,"onUpdate:modelValue":e[15]||(e[15]=F=>s.form.settings.document_library=F)},{default:w(()=>[B(S(t.$t("Enable File/Document Library for this space"))+" ",1),t.has_pro?O("",!0):(v(),A("span",a3e," ("+S(t.$t("Pro Feature"))+") ",1))]),_:1},8,["disabled","modelValue"]),s.form.settings.document_library=="yes"?(v(),A("div",l3e,[_(l,{label:t.$t("Document Library Access (View & Download)")},{default:w(()=>[_(p,{modelValue:s.form.settings.document_access,"onUpdate:modelValue":e[16]||(e[16]=F=>s.form.settings.document_access=F),class:"fcom_radio_group_inline"},{default:w(()=>[_(f,{value:"members_only"},{default:w(()=>[B(S(t.$t("Members of this space")),1)]),_:1}),_(f,{value:"logged_in"},{default:w(()=>[B(S(t.$t("Any Logged in users")),1)]),_:1}),_(f,{value:"everybody"},{default:w(()=>[B(S(t.$t("Public")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(l,{label:t.$t("Who can upload the documents?")},{default:w(()=>[_(p,{modelValue:s.form.settings.document_upload,"onUpdate:modelValue":e[17]||(e[17]=F=>s.form.settings.document_upload=F),class:"fcom_radio_group_inline"},{default:w(()=>[_(f,{value:"members_only"},{default:w(()=>[B(S(t.$t("Any Members")),1)]),_:1}),_(f,{value:"admin_only"},{default:w(()=>[B(S(t.$t("Admin/Moderators Only")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])])):O("",!0),_(m,{class:"fcom_checkbox",disabled:!t.has_pro,"true-value":"yes","false-value":"no",modelValue:s.form.settings.media_gallery,"onUpdate:modelValue":e[18]||(e[18]=F=>s.form.settings.media_gallery=F)},{default:w(()=>[B(S(t.$t("Enable Media Gallery for this space"))+" ",1),t.has_pro?O("",!0):(v(),A("span",c3e," ("+S(t.$t("Pro Feature"))+") ",1))]),_:1},8,["disabled","modelValue"]),t.has_pro&&s.form.settings.media_gallery=="yes"?(v(),A("div",u3e,[_(l,{label:t.$t("Media Gallery Access (View)")},{default:w(()=>[_(p,{modelValue:s.form.settings.media_access,"onUpdate:modelValue":e[19]||(e[19]=F=>s.form.settings.media_access=F),class:"fcom_radio_group_inline"},{default:w(()=>[_(f,{value:"members_only"},{default:w(()=>[B(S(t.$t("Members of this space")),1)]),_:1}),_(f,{value:"logged_in"},{default:w(()=>[B(S(t.$t("Any Logged in users")),1)]),_:1}),_(f,{value:"everybody"},{default:w(()=>[B(S(t.$t("Public")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])])):O("",!0)])]),_:1}),_(l,{label:t.$t("Default Post Sort By")},{default:w(()=>[_(h,{modelValue:s.form.settings.default_post_sort_by,"onUpdate:modelValue":e[20]||(e[20]=F=>s.form.settings.default_post_sort_by=F),clearable:"",class:"fcom_select",placeholder:t.$t("Latest Posts Sort")},{default:w(()=>[(v(!0),A(ee,null,Ce(s.postOrderOptions,(F,z)=>(v(),D(d,{key:z,value:z,label:F},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),_(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:s.form.settings.disable_post_sort_by,"onUpdate:modelValue":e[21]||(e[21]=F=>s.form.settings.disable_post_sort_by=F)},{default:w(()=>[B(S(t.$t("Disable Post Sort By Options")),1)]),_:1},8,["modelValue"]),_(l,{label:t.$t("Default Comment Sort By")},{default:w(()=>[_(h,{modelValue:s.form.settings.default_comment_sort_by,"onUpdate:modelValue":e[22]||(e[22]=F=>s.form.settings.default_comment_sort_by=F),clearable:"",class:"fcom_select",placeholder:t.$t("Latest Comments Sort")},{default:w(()=>[(v(!0),A(ee,null,Ce(s.commentOrderOptions,(F,z)=>(v(),D(d,{key:z,value:z,label:F},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])])):O("",!0),g("div",d3e,[g("h4",null,S(t.$t("Layout")),1),_(l,{label:t.$t("Default Layout Styles"),class:"fcom_mb_10"},{default:w(()=>[_(p,{modelValue:s.form.settings.layout_style,"onUpdate:modelValue":e[23]||(e[23]=F=>s.form.settings.layout_style=F),class:"fcom_svg_radio_group"},{default:w(()=>[g("div",h3e,[_(f,{value:"timeline"},{default:w(()=>[_(y,{style:{width:"100px",height:"auto"}}),g("p",f3e,S(t.$t("Timeline")),1)]),_:1})]),g("div",p3e,[_(f,{value:"list"},{default:w(()=>[_(b,{style:{width:"100px",height:"auto"}}),g("p",m3e,S(t.$t("List")),1)]),_:1})]),g("div",g3e,[_(f,{value:"card"},{default:w(()=>[_(k,{style:{width:"100px",height:"auto"}}),g("p",v3e,S(t.$t("Card")),1)]),_:1})])]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(l,{style:{"margin-top":"0"}},{default:w(()=>[_(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:s.form.settings.disable_layout_style,"onUpdate:modelValue":e[24]||(e[24]=F=>s.form.settings.disable_layout_style=F)},{default:w(()=>[B(S(t.$t("Disable Layout Style Change Option")),1)]),_:1},8,["modelValue"]),g("div",_3e,[s.form.settings.disable_layout_style==="yes"?(v(),A("p",y3e,S(t.$t("The selected layout will be applied for all members. They cannot switch to a different view.")),1)):(v(),A("p",b3e,S(t.$t("User can change the layout style to their own preference.")),1))])]),_:1})]),g("div",w3e,[g("h4",null,S(t.$t("Others")),1),t.has_pro&&s.dataLoaded?(v(),D(l,{key:0,label:t.$t("Topic navigation")},{default:w(()=>[_(C,{creatable:!0,space_id:s.form.id,modelValue:s.form.topic_ids,"onUpdate:modelValue":e[25]||(e[25]=F=>s.form.topic_ids=F)},null,8,["space_id","modelValue"]),g("div",k3e,[g("p",null,[B(S(t.$t("Categorize your posts and allow members to filter spaces with the topic navigation bar. You can define up to 20 topics per space."))+" ",1),t.isAdmin()?(v(),A("a",{key:0,target:"_blank",rel:"noopener",href:t.$getRouteLink("admin/settings/topics-settings")},S(t.$t("Manage all topics.")),9,C3e)):O("",!0)])]),_(m,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.topic_required,"onUpdate:modelValue":e[26]||(e[26]=F=>s.form.settings.topic_required=F),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Make members select a topic")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),t.appVars.has_chat?(v(),D(l,{key:1,label:t.$t("Group Chat?")},{default:w(()=>[_(m,{"true-value":"yes","false-value":"no",modelValue:s.form.group_chat_support,"onUpdate:modelValue":e[27]||(e[27]=F=>s.form.group_chat_support=F),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Enable group chat for this space members")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),_(l,{label:t.$t("Thumbnail / Open Graph Image (Recommended Size: 1200 x 630)")},{default:w(()=>[s.form.settings.og_image?(v(),D($,{key:0,alt:t.$t("Thumbnail / Open Graph Image"),src:s.form.settings.og_image,style:{"max-width":"100px",height:"auto"}},null,8,["alt","src"])):O("",!0),g("div",x3e,[_(I,{isTextBtn:!1,removeIcon:!0,can_remove:!!s.form.settings.og_image,confirm_remove:!0,additionalData:{resize:!1,disable_convert:"yes",max_width:1200,max_height:630},onUploaded:e[28]||(e[28]=F=>{s.form.settings.og_image=F})},cs({remove:w(()=>[_(M,null,{default:w(()=>[_(T)]),_:1})]),_:2},[s.form.settings.og_image?{name:"trigger",fn:w(()=>[_(P,{"aria-label":t.$t("Edit image"),class:"fcom_plain_button"},{default:w(()=>[_(M,null,{default:w(()=>[_(x)]),_:1})]),_:1},8,["aria-label"])]),key:"0"}:void 0]),1032,["can_remove"])]),g("div",S3e,[g("p",null,S(t.$t("Will be used on card preview and social sharing preview.")),1)])]),_:1},8,["label"]),_(l,{label:t.$t("Featured Image (Recommended size: 1600x500) - Optional")},{default:w(()=>[s.form.cover_photo?(v(),D($,{key:0,src:s.form.cover_photo,alt:t.$t("Featured Image Preview"),style:{"max-width":"100px",height:"auto"}},null,8,["src","alt"])):O("",!0),g("div",$3e,[_(I,{isTextBtn:!1,removeIcon:!0,can_remove:!!s.form.cover_photo,confirm_remove:!0,additionalData:{resize:!0,max_width:1600},onUploaded:o.handleCoverPhotoUpload},cs({remove:w(()=>[_(M,null,{default:w(()=>[_(T)]),_:1})]),_:2},[s.form.cover_photo?{name:"trigger",fn:w(()=>[_(P,{class:"fcom_plain_button"},{default:w(()=>[_(M,null,{default:w(()=>[_(x)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove","onUploaded"])]),g("div",A3e,[g("p",null,S(t.$t("If you add this image, it will be shown on the space homepage")),1)])]),_:1},8,["label"]),_(L,{errors:s.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),s.form.id?O("",!0):(v(),D(l,{key:2,style:{"margin-top":"45px"}},{default:w(()=>[g("div",E3e,[s.showingSections.indexOf("basic")===-1?(v(),D(P,{key:0,class:"plain_button",text:"",onClick:e[29]||(e[29]=()=>{s.showingSections=["basic"]})},{default:w(()=>[g("span",null,S(t.$t("Go Back")),1)]),_:1})):O("",!0),De((v(),D(P,{class:"fcom_primary_button",disabled:s.saving,onClick:e[30]||(e[30]=F=>o.submit())},{default:w(()=>[g("span",null,S(t.$t("Create")),1)]),_:1},8,["disabled"])),[[H,s.saving]])])]),_:1}))])],64)):(v(),A(ee,{key:2},[_(L,{errors:s.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),_(l,null,{default:w(()=>[g("div",M3e,[T3e,_(P,{onClick:e[31]||(e[31]=F=>o.goToCustomization()),class:"fcom_primary_button"},{default:w(()=>[g("span",null,S(t.$t("Next")),1)]),_:1})])]),_:1})],64))]),_:1},8,["modelValue"]),De((v(),A("div",null,[s.metaSettings&&Object.keys(s.metaSettings).length>0?(v(),A("div",P3e,[(v(!0),A(ee,null,Ce(s.metaSettings,F=>(v(),A("div",I3e,[g("h4",null,S(F.section_title),1),_(V,{formData:F.settings,formFields:F.fields,disableSubmit:!0},null,8,["formData","formFields"])]))),256))])):O("",!0)])),[[H,s.fetchingMetaBoxes]])])}const f8=de(Xwe,[["render",L3e]]);var fo=(t=>(t.docTypeError="docTypeError",t.contextNotFound="contextNotFound",t.timerNotFound="timerNotFound",t.ctxCallOutOfScope="ctxCallOutOfScope",t.createNodeInParserFail="createNodeInParserFail",t.stackOverFlow="stackOverFlow",t.parserMatchError="parserMatchError",t.serializerMatchError="serializerMatchError",t.getAtomFromSchemaFail="getAtomFromSchemaFail",t.expectDomTypeError="expectDomTypeError",t.callCommandBeforeEditorView="callCommandBeforeEditorView",t.missingRootElement="missingRootElement",t.missingNodeInSchema="missingNodeInSchema",t.missingMarkInSchema="missingMarkInSchema",t.ctxNotBind="ctxNotBind",t.missingYjsDoc="missingYjsDoc",t))(fo||{});let Bo=class extends Error{constructor(e,n){super(n),this.name="MilkdownError",this.code=e}};const O3e=(t,e)=>typeof e=="function"?"[Function]":e,Ff=t=>JSON.stringify(t,O3e);function D3e(t){return new Bo(fo.docTypeError,`Doc type error, unsupported type: ${Ff(t)}`)}function R3e(t){return new Bo(fo.contextNotFound,`Context "${t}" not found, do you forget to inject it?`)}function V3e(t){return new Bo(fo.timerNotFound,`Timer "${t}" not found, do you forget to record it?`)}function p8(){return new Bo(fo.ctxCallOutOfScope,"Should not call a context out of the plugin.")}function F3e(...t){const e=t.reduce((n,i)=>{if(!i)return n;const s=o=>Array.isArray(o)?o.map(r=>s(r)).join(", "):o.toJSON?Ff(o.toJSON()):o.spec?Ff(o.spec):o.toString();return`${n}, ${s(i)}`},"Create prosemirror node from remark failed in parser");return new Bo(fo.createNodeInParserFail,e)}function tF(){return new Bo(fo.stackOverFlow,"Stack over flow, cannot pop on an empty stack.")}function N3e(t){return new Bo(fo.parserMatchError,`Cannot match target parser for node: ${Ff(t)}.`)}function B3e(t){return new Bo(fo.serializerMatchError,`Cannot match target serializer for node: ${Ff(t)}.`)}function z3e(t,e){return new Bo(fo.getAtomFromSchemaFail,`Cannot get ${t}: ${e} from schema.`)}function Kr(t){return new Bo(fo.expectDomTypeError,`Expect to be a dom, but get: ${Ff(t)}.`)}function H3e(){return new Bo(fo.callCommandBeforeEditorView,"You're trying to call a command before editor view initialized, make sure to get commandManager from ctx after editor view has been initialized")}function nF(t){return new Bo(fo.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${t}" in schema.`)}function U3e(t){return new Bo(fo.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${t}" in schema.`)}var sF=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},wt=(t,e,n)=>(sF(t,e,"read from private field"),n?n.call(t):e.get(t)),ms=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Cn=(t,e,n,i)=>(sF(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);let iF=class{constructor(){this.sliceMap=new Map,this.get=e=>{const n=typeof e=="string"?[...this.sliceMap.values()].find(i=>i.type.name===e):this.sliceMap.get(e.id);if(!n){const i=typeof e=="string"?e:e.name;throw R3e(i)}return n},this.remove=e=>{const n=typeof e=="string"?[...this.sliceMap.values()].find(i=>i.type.name===e):this.sliceMap.get(e.id);n&&this.sliceMap.delete(n.type.id)},this.has=e=>typeof e=="string"?[...this.sliceMap.values()].some(n=>n.type.name===e):this.sliceMap.has(e.id)}};var ta,Rl,Wp;let j3e=class{constructor(e,n,i){ms(this,ta,void 0),ms(this,Rl,void 0),ms(this,Wp,void 0),Cn(this,ta,[]),Cn(this,Wp,()=>{wt(this,ta).forEach(s=>s(wt(this,Rl)))}),this.set=s=>{Cn(this,Rl,s),wt(this,Wp).call(this)},this.get=()=>wt(this,Rl),this.update=s=>{Cn(this,Rl,s(wt(this,Rl))),wt(this,Wp).call(this)},this.type=i,Cn(this,Rl,n),e.set(i.id,this)}on(e){return wt(this,ta).push(e),()=>{Cn(this,ta,wt(this,ta).filter(n=>n!==e))}}once(e){const n=this.on(i=>{e(i),n()});return n}off(e){Cn(this,ta,wt(this,ta).filter(n=>n!==e))}offAll(){Cn(this,ta,[])}};ta=new WeakMap,Rl=new WeakMap,Wp=new WeakMap;let W3e=class{constructor(e,n){this.id=Symbol(`Context-${n}`),this.name=n,this._defaultValue=e,this._typeInfo=()=>{throw p8()}}create(e,n=this._defaultValue){return new j3e(e,n,this)}};const wn=(t,e)=>new W3e(t,e);var x0,S0,$0,_h,Yp,du,qp,Gp,Xp;let Y3e=class{constructor(e,n,i){ms(this,x0,void 0),ms(this,S0,void 0),ms(this,$0,void 0),ms(this,_h,void 0),ms(this,Yp,void 0),ms(this,du,void 0),ms(this,qp,void 0),ms(this,Gp,void 0),ms(this,Xp,void 0),Cn(this,_h,new Set),Cn(this,Yp,new Set),Cn(this,du,new Map),Cn(this,qp,new Map),this.read=()=>({metadata:wt(this,x0),injectedSlices:[...wt(this,_h)].map(s=>({name:typeof s=="string"?s:s.name,value:wt(this,Gp).call(this,s)})),consumedSlices:[...wt(this,Yp)].map(s=>({name:typeof s=="string"?s:s.name,value:wt(this,Gp).call(this,s)})),recordedTimers:[...wt(this,du)].map(([s,{duration:o}])=>({name:s.name,duration:o,status:wt(this,Xp).call(this,s)})),waitTimers:[...wt(this,qp)].map(([s,{duration:o}])=>({name:s.name,duration:o,status:wt(this,Xp).call(this,s)}))}),this.onRecord=s=>{wt(this,du).set(s,{start:Date.now(),duration:0})},this.onClear=s=>{wt(this,du).delete(s)},this.onDone=s=>{const o=wt(this,du).get(s);o&&(o.duration=Date.now()-o.start)},this.onWait=(s,o)=>{const r=Date.now();o.finally(()=>{wt(this,qp).set(s,{duration:Date.now()-r})})},this.onInject=s=>{wt(this,_h).add(s)},this.onRemove=s=>{wt(this,_h).delete(s)},this.onUse=s=>{wt(this,Yp).add(s)},Cn(this,Gp,s=>wt(this,S0).get(s).get()),Cn(this,Xp,s=>wt(this,$0).get(s).status),Cn(this,S0,e),Cn(this,$0,n),Cn(this,x0,i)}};x0=new WeakMap,S0=new WeakMap,$0=new WeakMap,_h=new WeakMap,Yp=new WeakMap,du=new WeakMap,qp=new WeakMap,Gp=new WeakMap,Xp=new WeakMap;var Vl,Fl,A0,yr;const q3e=class oF{constructor(e,n,i){ms(this,Vl,void 0),ms(this,Fl,void 0),ms(this,A0,void 0),ms(this,yr,void 0),this.produce=s=>s&&Object.keys(s).length?new oF(wt(this,Vl),wt(this,Fl),{...s}):this,this.inject=(s,o)=>{var r;const a=s.create(wt(this,Vl).sliceMap);return o!=null&&a.set(o),(r=wt(this,yr))==null||r.onInject(s),this},this.remove=s=>{var o;return wt(this,Vl).remove(s),(o=wt(this,yr))==null||o.onRemove(s),this},this.record=s=>{var o;return s.create(wt(this,Fl).store),(o=wt(this,yr))==null||o.onRecord(s),this},this.clearTimer=s=>{var o;return wt(this,Fl).remove(s),(o=wt(this,yr))==null||o.onClear(s),this},this.isInjected=s=>wt(this,Vl).has(s),this.isRecorded=s=>wt(this,Fl).has(s),this.use=s=>{var o;return(o=wt(this,yr))==null||o.onUse(s),wt(this,Vl).get(s)},this.get=s=>this.use(s).get(),this.set=(s,o)=>this.use(s).set(o),this.update=(s,o)=>this.use(s).update(o),this.timer=s=>wt(this,Fl).get(s),this.done=s=>{var o;this.timer(s).done(),(o=wt(this,yr))==null||o.onDone(s)},this.wait=s=>{var o;const r=this.timer(s).start();return(o=wt(this,yr))==null||o.onWait(s,r),r},this.waitTimers=async s=>{await Promise.all(this.get(s).map(o=>this.wait(o)))},Cn(this,Vl,e),Cn(this,Fl,n),Cn(this,A0,i),i&&Cn(this,yr,new Y3e(e,n,i))}get meta(){return wt(this,A0)}get inspector(){return wt(this,yr)}};Vl=new WeakMap,Fl=new WeakMap,A0=new WeakMap,yr=new WeakMap;let G3e=q3e,X3e=class{constructor(){this.store=new Map,this.get=e=>{const n=this.store.get(e.id);if(!n)throw V3e(e.name);return n},this.remove=e=>{this.store.delete(e.id)},this.has=e=>this.store.has(e.id)}};var yh,hu,Kp,Nl,Zp,E0;let K3e=class{constructor(e,n){ms(this,yh,void 0),ms(this,hu,void 0),ms(this,Kp,void 0),ms(this,Nl,void 0),ms(this,Zp,void 0),ms(this,E0,void 0),Cn(this,yh,null),Cn(this,hu,null),Cn(this,Nl,"pending"),this.start=()=>(wt(this,yh)??Cn(this,yh,new Promise((i,s)=>{Cn(this,hu,o=>{o instanceof CustomEvent&&o.detail.id===wt(this,Kp)&&(Cn(this,Nl,"resolved"),wt(this,Zp).call(this),o.stopImmediatePropagation(),i())}),wt(this,E0).call(this,()=>{wt(this,Nl)==="pending"&&Cn(this,Nl,"rejected"),wt(this,Zp).call(this),s(new Error(`Timing ${this.type.name} timeout.`))}),Cn(this,Nl,"pending"),addEventListener(this.type.name,wt(this,hu))})),wt(this,yh)),this.done=()=>{const i=new CustomEvent(this.type.name,{detail:{id:wt(this,Kp)}});dispatchEvent(i)},Cn(this,Zp,()=>{wt(this,hu)&&removeEventListener(this.type.name,wt(this,hu))}),Cn(this,E0,i=>{setTimeout(()=>{i()},this.type.timeout)}),Cn(this,Kp,Symbol(n.name)),this.type=n,e.set(n.id,this)}get status(){return wt(this,Nl)}};yh=new WeakMap,hu=new WeakMap,Kp=new WeakMap,Nl=new WeakMap,Zp=new WeakMap,E0=new WeakMap;let Z3e=class{constructor(e,n=3e3){this.create=i=>new K3e(i,this),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=n}};const jc=(t,e=3e3)=>new Z3e(t,e);function Zs(t){this.content=t}Zs.prototype={constructor:Zs,find:function(t){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===t)return e;return-1},get:function(t){var e=this.find(t);return e==-1?void 0:this.content[e+1]},update:function(t,e,n){var i=n&&n!=t?this.remove(n):this,s=i.find(t),o=i.content.slice();return s==-1?o.push(n||t,e):(o[s+1]=e,n&&(o[s]=n)),new Zs(o)},remove:function(t){var e=this.find(t);if(e==-1)return this;var n=this.content.slice();return n.splice(e,2),new Zs(n)},addToStart:function(t,e){return new Zs([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Zs(n)},addBefore:function(t,e,n){var i=this.remove(e),s=i.content.slice(),o=i.find(t);return s.splice(o==-1?s.length:o,0,e,n),new Zs(s)},forEach:function(t){for(var e=0;e<this.content.length;e+=2)t(this.content[e],this.content[e+1])},prepend:function(t){return t=Zs.from(t),t.size?new Zs(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Zs.from(t),t.size?new Zs(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Zs.from(t);for(var n=0;n<t.content.length;n+=2)e=e.remove(t.content[n]);return e},toObject:function(){var t={};return this.forEach(function(e,n){t[e]=n}),t},get size(){return this.content.length>>1}};Zs.from=function(t){if(t instanceof Zs)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Zs(e)};function rF(t,e,n){for(let i=0;;i++){if(i==t.childCount||i==e.childCount)return t.childCount==e.childCount?null:n;let s=t.child(i),o=e.child(i);if(s==o){n+=s.nodeSize;continue}if(!s.sameMarkup(o))return n;if(s.isText&&s.text!=o.text){for(let r=0;s.text[r]==o.text[r];r++)n++;return n}if(s.content.size||o.content.size){let r=rF(s.content,o.content,n+1);if(r!=null)return r}n+=s.nodeSize}}function aF(t,e,n,i){for(let s=t.childCount,o=e.childCount;;){if(s==0||o==0)return s==o?null:{a:n,b:i};let r=t.child(--s),a=e.child(--o),l=r.nodeSize;if(r==a){n-=l,i-=l;continue}if(!r.sameMarkup(a))return{a:n,b:i};if(r.isText&&r.text!=a.text){let c=0,u=Math.min(r.text.length,a.text.length);for(;c<u&&r.text[r.text.length-c-1]==a.text[a.text.length-c-1];)c++,n--,i--;return{a:n,b:i}}if(r.content.size||a.content.size){let c=aF(r.content,a.content,n-1,i-1);if(c)return c}n-=l,i-=l}}let nt=class Oi{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let i=0;i<e.length;i++)this.size+=e[i].nodeSize}nodesBetween(e,n,i,s=0,o){for(let r=0,a=0;a<n;r++){let l=this.content[r],c=a+l.nodeSize;if(c>e&&i(l,s+a,o||null,r)!==!1&&l.content.size){let u=a+1;l.nodesBetween(Math.max(0,e-u),Math.min(l.content.size,n-u),i,s+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,i,s){let o="",r=!0;return this.nodesBetween(e,n,(a,l)=>{let c=a.isText?a.text.slice(Math.max(e,l)-l,n-l):a.isLeaf?s?typeof s=="function"?s(a):s:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&i&&(r?r=!1:o+=i),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,i=e.firstChild,s=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(i)&&(s[s.length-1]=n.withText(n.text+i.text),o=1);o<e.content.length;o++)s.push(e.content[o]);return new Oi(s,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let i=[],s=0;if(n>e)for(let o=0,r=0;r<n;o++){let a=this.content[o],l=r+a.nodeSize;l>e&&((r<e||l>n)&&(a.isText?a=a.cut(Math.max(0,e-r),Math.min(a.text.length,n-r)):a=a.cut(Math.max(0,e-r-1),Math.min(a.content.size,n-r-1))),i.push(a),s+=a.nodeSize),r=l}return new Oi(i,s)}cutByIndex(e,n){return e==n?Oi.empty:e==0&&n==this.content.length?this:new Oi(this.content.slice(e,n))}replaceChild(e,n){let i=this.content[e];if(i==n)return this;let s=this.content.slice(),o=this.size+n.nodeSize-i.nodeSize;return s[e]=n,new Oi(s,o)}addToStart(e){return new Oi([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Oi(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let n=0;n<this.content.length;n++)if(!this.content[n].eq(e.content[n]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let n=this.content[e];if(!n)throw new RangeError("Index "+e+" out of range for "+this);return n}maybeChild(e){return this.content[e]||null}forEach(e){for(let n=0,i=0;n<this.content.length;n++){let s=this.content[n];e(s,i,n),i+=s.nodeSize}}findDiffStart(e,n=0){return rF(this,e,n)}findDiffEnd(e,n=this.size,i=e.size){return aF(this,e,n,i)}findIndex(e,n=-1){if(e==0)return Uv(0,e);if(e==this.size)return Uv(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let i=0,s=0;;i++){let o=this.child(i),r=s+o.nodeSize;if(r>=e)return r==e||n>0?Uv(i+1,r):Uv(i,s);s=r}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,n){if(!n)return Oi.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Oi(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Oi.empty;let n,i=0;for(let s=0;s<e.length;s++){let o=e[s];i+=o.nodeSize,s&&o.isText&&e[s-1].sameMarkup(o)?(n||(n=e.slice(0,s)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new Oi(n||e,i)}static from(e){if(!e)return Oi.empty;if(e instanceof Oi)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Oi([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};nt.empty=new nt([],0);const ww={index:0,offset:0};function Uv(t,e){return ww.index=t,ww.offset=e,ww}function fy(t,e){if(t===e)return!0;if(!(t&&typeof t=="object")||!(e&&typeof e=="object"))return!1;let n=Array.isArray(t);if(Array.isArray(e)!=n)return!1;if(n){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!fy(t[i],e[i]))return!1}else{for(let i in t)if(!(i in e)||!fy(t[i],e[i]))return!1;for(let i in e)if(!(i in t))return!1}return!0}let En=class c6{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,i=!1;for(let s=0;s<e.length;s++){let o=e[s];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,s));else{if(o.type.excludes(this.type))return e;!i&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,s)),n.push(this),i=!0),n&&n.push(o)}}return n||(n=e.slice()),i||n.push(this),n}removeFromSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return e.slice(0,n).concat(e.slice(n+1));return e}isInSet(e){for(let n=0;n<e.length;n++)if(this.eq(e[n]))return!0;return!1}eq(e){return this==e||this.type==e.type&&fy(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Mark.fromJSON");let i=e.marks[n.type];if(!i)throw new RangeError(`There is no mark type ${n.type} in this schema`);let s=i.create(n.attrs);return i.checkAttrs(s.attrs),s}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let i=0;i<e.length;i++)if(!e[i].eq(n[i]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return c6.none;if(e instanceof c6)return[e];let n=e.slice();return n.sort((i,s)=>i.type.rank-s.type.rank),n}};En.none=[];class py extends Error{}class rt{constructor(e,n,i){this.content=e,this.openStart=n,this.openEnd=i}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let i=cF(this.content,e+this.openStart,n);return i&&new rt(i,this.openStart,this.openEnd)}removeBetween(e,n){return new rt(lF(this.content,e+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,n){if(!n)return rt.empty;let i=n.openStart||0,s=n.openEnd||0;if(typeof i!="number"||typeof s!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new rt(nt.fromJSON(e,n.content),i,s)}static maxOpen(e,n=!0){let i=0,s=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)i++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)s++;return new rt(e,i,s)}}rt.empty=new rt(nt.empty,0,0);function lF(t,e,n){let{index:i,offset:s}=t.findIndex(e),o=t.maybeChild(i),{index:r,offset:a}=t.findIndex(n);if(s==e||o.isText){if(a!=n&&!t.child(r).isText)throw new RangeError("Removing non-flat range");return t.cut(0,e).append(t.cut(n))}if(i!=r)throw new RangeError("Removing non-flat range");return t.replaceChild(i,o.copy(lF(o.content,e-s-1,n-s-1)))}function cF(t,e,n,i){let{index:s,offset:o}=t.findIndex(e),r=t.maybeChild(s);if(o==e||r.isText)return i&&!i.canReplace(s,s,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=cF(r.content,e-o-1,n);return a&&t.replaceChild(s,r.copy(a))}function J3e(t,e,n){if(n.openStart>t.depth)throw new py("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new py("Inconsistent open depths");return uF(t,e,n,0)}function uF(t,e,n,i){let s=t.index(i),o=t.node(i);if(s==e.index(i)&&i<t.depth-n.openStart){let r=uF(t,e,n,i+1);return o.copy(o.content.replaceChild(s,r))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==i&&e.depth==i){let r=t.parent,a=r.content;return qu(r,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:r,end:a}=Q3e(n,t);return qu(o,hF(t,r,a,e,i))}else return qu(o,my(t,e,i))}function dF(t,e){if(!e.type.compatibleContent(t.type))throw new py("Cannot join "+e.type.name+" onto "+t.type.name)}function u6(t,e,n){let i=t.node(n);return dF(i,e.node(n)),i}function Yu(t,e){let n=e.length-1;n>=0&&t.isText&&t.sameMarkup(e[n])?e[n]=t.withText(e[n].text+t.text):e.push(t)}function jm(t,e,n,i){let s=(e||t).node(n),o=0,r=e?e.index(n):s.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(Yu(t.nodeAfter,i),o++));for(let a=o;a<r;a++)Yu(s.child(a),i);e&&e.depth==n&&e.textOffset&&Yu(e.nodeBefore,i)}function qu(t,e){return t.type.checkContent(e),t.copy(e)}function hF(t,e,n,i,s){let o=t.depth>s&&u6(t,e,s+1),r=i.depth>s&&u6(n,i,s+1),a=[];return jm(null,t,s,a),o&&r&&e.index(s)==n.index(s)?(dF(o,r),Yu(qu(o,hF(t,e,n,i,s+1)),a)):(o&&Yu(qu(o,my(t,e,s+1)),a),jm(e,n,s,a),r&&Yu(qu(r,my(n,i,s+1)),a)),jm(i,null,s,a),new nt(a)}function my(t,e,n){let i=[];if(jm(null,t,n,i),t.depth>n){let s=u6(t,e,n+1);Yu(qu(s,my(t,e,n+1)),i)}return jm(e,null,n,i),new nt(i)}function Q3e(t,e){let n=e.depth-t.openStart,s=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)s=e.node(o).copy(nt.from(s));return{start:s.resolveNoCache(t.openStart+n),end:s.resolveNoCache(s.content.size-t.openEnd-n)}}class Hg{constructor(e,n,i){this.pos=e,this.path=n,this.parentOffset=i,this.depth=n.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,n=this.index(this.depth);if(n==e.childCount)return null;let i=this.pos-this.path[this.path.length-1],s=e.child(n);return i?e.child(n).cut(i):s}get nodeBefore(){let e=this.index(this.depth),n=this.pos-this.path[this.path.length-1];return n?this.parent.child(e).cut(0,n):e==0?null:this.parent.child(e-1)}posAtIndex(e,n){n=this.resolveDepth(n);let i=this.path[n*3],s=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)s+=i.child(o).nodeSize;return s}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return En.none;if(this.textOffset)return e.child(n).marks;let i=e.maybeChild(n-1),s=e.maybeChild(n);if(!i){let a=i;i=s,s=a}let o=i.marks;for(var r=0;r<o.length;r++)o[r].type.spec.inclusive===!1&&(!s||!o[r].isInSet(s.marks))&&(o=o[r--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let i=n.marks,s=e.parent.maybeChild(e.index());for(var o=0;o<i.length;o++)i[o].type.spec.inclusive===!1&&(!s||!i[o].isInSet(s.marks))&&(i=i[o--].removeFromSet(i));return i}sharedDepth(e){for(let n=this.depth;n>0;n--)if(this.start(n)<=e&&this.end(n)>=e)return n;return 0}blockRange(e=this,n){if(e.pos<this.pos)return e.blockRange(this);for(let i=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);i>=0;i--)if(e.pos<=this.end(i)&&(!n||n(this.node(i))))return new fF(this,e,i);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let n=1;n<=this.depth;n++)e+=(e?"/":"")+this.node(n).type.name+"_"+this.index(n-1);return e+":"+this.parentOffset}static resolve(e,n){if(!(n>=0&&n<=e.content.size))throw new RangeError("Position "+n+" out of range");let i=[],s=0,o=n;for(let r=e;;){let{index:a,offset:l}=r.content.findIndex(o),c=o-l;if(i.push(r,a,s+l),!c||(r=r.child(a),r.isText))break;o=c-1,s+=l+1}return new Hg(n,i,o)}static resolveCached(e,n){let i=EA.get(e);if(i)for(let o=0;o<i.elts.length;o++){let r=i.elts[o];if(r.pos==n)return r}else EA.set(e,i=new eke);let s=i.elts[i.i]=Hg.resolve(e,n);return i.i=(i.i+1)%tke,s}}class eke{constructor(){this.elts=[],this.i=0}}const tke=12,EA=new WeakMap;class fF{constructor(e,n,i){this.$from=e,this.$to=n,this.depth=i}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const nke=Object.create(null);let yc=class d6{constructor(e,n,i,s=En.none){this.type=e,this.attrs=n,this.marks=s,this.content=i||nt.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,n,i,s=0){this.content.nodesBetween(e,n,i,s,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,n,i,s){return this.content.textBetween(e,n,i,s)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,n,i){return this.type==e&&fy(this.attrs,n||e.defaultAttrs||nke)&&En.sameSet(this.marks,i||En.none)}copy(e=null){return e==this.content?this:new d6(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new d6(this.type,this.attrs,this.content,e)}cut(e,n=this.content.size){return e==0&&n==this.content.size?this:this.copy(this.content.cut(e,n))}slice(e,n=this.content.size,i=!1){if(e==n)return rt.empty;let s=this.resolve(e),o=this.resolve(n),r=i?0:s.sharedDepth(n),a=s.start(r),c=s.node(r).content.cut(s.pos-a,o.pos-a);return new rt(c,s.depth-r,o.depth-r)}replace(e,n,i){return J3e(this.resolve(e),this.resolve(n),i)}nodeAt(e){for(let n=this;;){let{index:i,offset:s}=n.content.findIndex(e);if(n=n.maybeChild(i),!n)return null;if(s==e||n.isText)return n;e-=s+1}}childAfter(e){let{index:n,offset:i}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:i}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:i}=this.content.findIndex(e);if(i<e)return{node:this.content.child(n),index:n,offset:i};let s=this.content.child(n-1);return{node:s,index:n-1,offset:i-s.nodeSize}}resolve(e){return Hg.resolveCached(this,e)}resolveNoCache(e){return Hg.resolve(this,e)}rangeHasMark(e,n,i){let s=!1;return n>e&&this.nodesBetween(e,n,o=>(i.isInSet(o.marks)&&(s=!0),!s)),s}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),pF(this.marks,e)}contentMatchAt(e){let n=this.type.contentMatch.matchFragment(this.content,0,e);if(!n)throw new Error("Called contentMatchAt on a node with invalid content");return n}canReplace(e,n,i=nt.empty,s=0,o=i.childCount){let r=this.contentMatchAt(e).matchFragment(i,s,o),a=r&&r.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=s;l<o;l++)if(!this.type.allowsMarks(i.child(l).marks))return!1;return!0}canReplaceWith(e,n,i,s){if(s&&!this.type.allowsMarks(s))return!1;let o=this.contentMatchAt(e).matchType(i),r=o&&o.matchFragment(this.content,n);return r?r.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),this.type.checkAttrs(this.attrs);let e=En.none;for(let n=0;n<this.marks.length;n++){let i=this.marks[n];i.type.checkAttrs(i.attrs),e=i.addToSet(e)}if(!En.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(n=>n.type.name)}`);this.content.forEach(n=>n.check())}toJSON(){let e={type:this.type.name};for(let n in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(n=>n.toJSON())),e}static fromJSON(e,n){if(!n)throw new RangeError("Invalid input for Node.fromJSON");let i;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");i=n.marks.map(e.markFromJSON)}if(n.type=="text"){if(typeof n.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(n.text,i)}let s=nt.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,s,i);return o.type.checkAttrs(o.attrs),o}};yc.prototype.text=void 0;class gy extends yc{constructor(e,n,i,s){if(super(e,n,null,s),!i)throw new RangeError("Empty text nodes are not allowed");this.text=i}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):pF(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,n){return this.text.slice(e,n)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new gy(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new gy(this.type,this.attrs,e,this.marks)}cut(e=0,n=this.text.length){return e==0&&n==this.text.length?this:this.withText(this.text.slice(e,n))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function pF(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class fd{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let i=new ske(e,n);if(i.next==null)return fd.empty;let s=mF(i);i.next&&i.err("Unexpected trailing text");let o=uke(cke(s));return dke(o,i),o}matchType(e){for(let n=0;n<this.next.length;n++)if(this.next[n].type==e)return this.next[n].next;return null}matchFragment(e,n=0,i=e.childCount){let s=this;for(let o=n;s&&o<i;o++)s=s.matchType(e.child(o).type);return s}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:n}=this.next[e];if(!(n.isText||n.hasRequiredAttrs()))return n}return null}compatible(e){for(let n=0;n<this.next.length;n++)for(let i=0;i<e.next.length;i++)if(this.next[n].type==e.next[i].type)return!0;return!1}fillBefore(e,n=!1,i=0){let s=[this];function o(r,a){let l=r.matchFragment(e,i);if(l&&(!n||l.validEnd))return nt.from(a.map(c=>c.createAndFill()));for(let c=0;c<r.next.length;c++){let{type:u,next:d}=r.next[c];if(!(u.isText||u.hasRequiredAttrs())&&s.indexOf(d)==-1){s.push(d);let h=o(d,a.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let i=0;i<this.wrapCache.length;i+=2)if(this.wrapCache[i]==e)return this.wrapCache[i+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),i=[{match:this,type:null,via:null}];for(;i.length;){let s=i.shift(),o=s.match;if(o.matchType(e)){let r=[];for(let a=s;a.type;a=a.via)r.push(a.type);return r.reverse()}for(let r=0;r<o.next.length;r++){let{type:a,next:l}=o.next[r];!a.isLeaf&&!a.hasRequiredAttrs()&&!(a.name in n)&&(!s.type||l.validEnd)&&(i.push({match:a.contentMatch,type:a,via:s}),n[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function n(i){e.push(i);for(let s=0;s<i.next.length;s++)e.indexOf(i.next[s].next)==-1&&n(i.next[s].next)}return n(this),e.map((i,s)=>{let o=s+(i.validEnd?"*":" ")+" ";for(let r=0;r<i.next.length;r++)o+=(r?", ":"")+i.next[r].type.name+"->"+e.indexOf(i.next[r].next);return o}).join(`
`)}}fd.empty=new fd(!0);class ske{constructor(e,n){this.string=e,this.nodeTypes=n,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function mF(t){let e=[];do e.push(ike(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function ike(t){let e=[];do e.push(oke(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function oke(t){let e=lke(t);for(;;)if(t.eat("+"))e={type:"plus",expr:e};else if(t.eat("*"))e={type:"star",expr:e};else if(t.eat("?"))e={type:"opt",expr:e};else if(t.eat("{"))e=rke(t,e);else break;return e}function MA(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function rke(t,e){let n=MA(t),i=n;return t.eat(",")&&(t.next!="}"?i=MA(t):i=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:e}}function ake(t,e){let n=t.nodeTypes,i=n[e];if(i)return[i];let s=[];for(let o in n){let r=n[o];r.groups.indexOf(e)>-1&&s.push(r)}return s.length==0&&t.err("No node type or group '"+e+"' found"),s}function lke(t){if(t.eat("(")){let e=mF(t);return t.eat(")")||t.err("Missing closing paren"),e}else if(/\W/.test(t.next))t.err("Unexpected token '"+t.next+"'");else{let e=ake(t,t.next).map(n=>(t.inline==null?t.inline=n.isInline:t.inline!=n.isInline&&t.err("Mixing inline and block content"),{type:"name",value:n}));return t.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function cke(t){let e=[[]];return s(o(t,0),n()),e;function n(){return e.push([])-1}function i(r,a,l){let c={term:l,to:a};return e[r].push(c),c}function s(r,a){r.forEach(l=>l.to=a)}function o(r,a){if(r.type=="choice")return r.exprs.reduce((l,c)=>l.concat(o(c,a)),[]);if(r.type=="seq")for(let l=0;;l++){let c=o(r.exprs[l],a);if(l==r.exprs.length-1)return c;s(c,a=n())}else if(r.type=="star"){let l=n();return i(a,l),s(o(r.expr,l),l),[i(l)]}else if(r.type=="plus"){let l=n();return s(o(r.expr,a),l),s(o(r.expr,l),l),[i(l)]}else{if(r.type=="opt")return[i(a)].concat(o(r.expr,a));if(r.type=="range"){let l=a;for(let c=0;c<r.min;c++){let u=n();s(o(r.expr,l),u),l=u}if(r.max==-1)s(o(r.expr,l),l);else for(let c=r.min;c<r.max;c++){let u=n();i(l,u),s(o(r.expr,l),u),l=u}return[i(l)]}else{if(r.type=="name")return[i(a,void 0,r.value)];throw new Error("Unknown expr type")}}}}function gF(t,e){return e-t}function TA(t,e){let n=[];return i(e),n.sort(gF);function i(s){let o=t[s];if(o.length==1&&!o[0].term)return i(o[0].to);n.push(s);for(let r=0;r<o.length;r++){let{term:a,to:l}=o[r];!a&&n.indexOf(l)==-1&&i(l)}}}function uke(t){let e=Object.create(null);return n(TA(t,0));function n(i){let s=[];i.forEach(r=>{t[r].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<s.length;u++)s[u][0]==a&&(c=s[u][1]);TA(t,l).forEach(u=>{c||s.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[i.join(",")]=new fd(i.indexOf(t.length-1)>-1);for(let r=0;r<s.length;r++){let a=s[r][1].sort(gF);o.next.push({type:s[r][0],next:e[a.join(",")]||n(a)})}return o}}function dke(t,e){for(let n=0,i=[t];n<i.length;n++){let s=i[n],o=!s.validEnd,r=[];for(let a=0;a<s.next.length;a++){let{type:l,next:c}=s.next[a];r.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),i.indexOf(c)==-1&&i.push(c)}o&&e.err("Only non-generatable nodes ("+r.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function vF(t){let e=Object.create(null);for(let n in t){let i=t[n];if(!i.hasDefault)return null;e[n]=i.default}return e}function _F(t,e){let n=Object.create(null);for(let i in t){let s=e&&e[i];if(s===void 0){let o=t[i];if(o.hasDefault)s=o.default;else throw new RangeError("No value supplied for attribute "+i)}n[i]=s}return n}function yF(t,e,n,i){for(let s in e)if(!(s in t))throw new RangeError(`Unsupported attribute ${s} for ${n} of type ${s}`);for(let s in t){let o=t[s];o.validate&&o.validate(e[s])}}function bF(t,e){let n=Object.create(null);if(e)for(let i in e)n[i]=new fke(t,i,e[i]);return n}let vy=class wF{constructor(e,n,i){this.name=e,this.schema=n,this.spec=i,this.markSet=null,this.groups=i.group?i.group.split(" "):[],this.attrs=bF(e,i.attrs),this.defaultAttrs=vF(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(i.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==fd.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:_F(this.attrs,e)}create(e=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new yc(this,this.computeAttrs(e),nt.from(n),En.setFrom(i))}createChecked(e=null,n,i){return n=nt.from(n),this.checkContent(n),new yc(this,this.computeAttrs(e),n,En.setFrom(i))}createAndFill(e=null,n,i){if(e=this.computeAttrs(e),n=nt.from(n),n.size){let r=this.contentMatch.fillBefore(n);if(!r)return null;n=r.append(n)}let s=this.contentMatch.matchFragment(n),o=s&&s.fillBefore(nt.empty,!0);return o?new yc(this,e,n.append(o),En.setFrom(i)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let i=0;i<e.childCount;i++)if(!this.allowsMarks(e.child(i).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){yF(this.attrs,e,"node",this.name)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let n=0;n<e.length;n++)if(!this.allowsMarkType(e[n].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let n;for(let i=0;i<e.length;i++)this.allowsMarkType(e[i].type)?n&&n.push(e[i]):n||(n=e.slice(0,i));return n?n.length?n:En.none:e}static compile(e,n){let i=Object.create(null);e.forEach((o,r)=>i[o]=new wF(o,n,r));let s=n.spec.topNode||"doc";if(!i[s])throw new RangeError("Schema is missing its top node type ('"+s+"')");if(!i.text)throw new RangeError("Every schema needs a 'text' type");for(let o in i.text.attrs)throw new RangeError("The text node type should not have attributes");return i}};function hke(t,e,n){let i=n.split("|");return s=>{let o=s===null?"null":typeof s;if(i.indexOf(o)<0)throw new RangeError(`Expected value of type ${i} for attribute ${e} on type ${t}, got ${o}`)}}class fke{constructor(e,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?hke(e,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}}class Nb{constructor(e,n,i,s){this.name=e,this.rank=n,this.schema=i,this.spec=s,this.attrs=bF(e,s.attrs),this.excluded=null;let o=vF(this.attrs);this.instance=o?new En(this,o):null}create(e=null){return!e&&this.instance?this.instance:new En(this,_F(this.attrs,e))}static compile(e,n){let i=Object.create(null),s=0;return e.forEach((o,r)=>i[o]=new Nb(o,s++,n,r)),i}removeFromSet(e){for(var n=0;n<e.length;n++)e[n].type==this&&(e=e.slice(0,n).concat(e.slice(n+1)),n--);return e}isInSet(e){for(let n=0;n<e.length;n++)if(e[n].type==this)return e[n]}checkAttrs(e){yF(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class pke{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let s in e)n[s]=e[s];n.nodes=Zs.from(e.nodes),n.marks=Zs.from(e.marks||{}),this.nodes=vy.compile(this.spec.nodes,this),this.marks=Nb.compile(this.spec.marks,this);let i=Object.create(null);for(let s in this.nodes){if(s in this.marks)throw new RangeError(s+" can not be both a node and a mark");let o=this.nodes[s],r=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=i[r]||(i[r]=fd.parse(r,this.nodes)),o.inlineContent=o.contentMatch.inlineContent,o.spec.linebreakReplacement){if(this.linebreakReplacement)throw new RangeError("Multiple linebreak nodes defined");if(!o.isInline||!o.isLeaf)throw new RangeError("Linebreak replacement nodes must be inline leaf nodes");this.linebreakReplacement=o}o.markSet=a=="_"?null:a?PA(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let s in this.marks){let o=this.marks[s],r=o.spec.excludes;o.excluded=r==null?[o]:r==""?[]:PA(this,r.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,n=null,i,s){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof vy){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(n,i,s)}text(e,n){let i=this.nodes.text;return new gy(i,i.defaultAttrs,e,En.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return yc.fromJSON(this,e)}markFromJSON(e){return En.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function PA(t,e){let n=[];for(let i=0;i<e.length;i++){let s=e[i],o=t.marks[s],r=o;if(o)n.push(o);else for(let a in t.marks){let l=t.marks[a];(s=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(s)>-1)&&n.push(r=l)}if(!r)throw new SyntaxError("Unknown mark type: '"+e[i]+"'")}return n}function mke(t){return t.tag!=null}function gke(t){return t.style!=null}let Bb=class h6{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let i=this.matchedStyles=[];n.forEach(s=>{if(mke(s))this.tags.push(s);else if(gke(s)){let o=/[^=]*/.exec(s.style)[0];i.indexOf(o)<0&&i.push(o),this.styles.push(s)}}),this.normalizeLists=!this.tags.some(s=>{if(!/^(ul|ol)\b/.test(s.tag)||!s.node)return!1;let o=e.nodes[s.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let i=new LA(this,n,!1);return i.addAll(e,En.none,n.from,n.to),i.finish()}parseSlice(e,n={}){let i=new LA(this,n,!0);return i.addAll(e,En.none,n.from,n.to),rt.maxOpen(i.finish())}matchTag(e,n,i){for(let s=i?this.tags.indexOf(i)+1:0;s<this.tags.length;s++){let o=this.tags[s];if(yke(e,o.tag)&&(o.namespace===void 0||e.namespaceURI==o.namespace)&&(!o.context||n.matchesContext(o.context))){if(o.getAttrs){let r=o.getAttrs(e);if(r===!1)continue;o.attrs=r||void 0}return o}}}matchStyle(e,n,i,s){for(let o=s?this.styles.indexOf(s)+1:0;o<this.styles.length;o++){let r=this.styles[o],a=r.style;if(!(a.indexOf(e)!=0||r.context&&!i.matchesContext(r.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=n))){if(r.getAttrs){let l=r.getAttrs(n);if(l===!1)continue;r.attrs=l||void 0}return r}}}static schemaRules(e){let n=[];function i(s){let o=s.priority==null?50:s.priority,r=0;for(;r<n.length;r++){let a=n[r];if((a.priority==null?50:a.priority)<o)break}n.splice(r,0,s)}for(let s in e.marks){let o=e.marks[s].spec.parseDOM;o&&o.forEach(r=>{i(r=OA(r)),r.mark||r.ignore||r.clearMark||(r.mark=s)})}for(let s in e.nodes){let o=e.nodes[s].spec.parseDOM;o&&o.forEach(r=>{i(r=OA(r)),r.node||r.ignore||r.mark||(r.node=s)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new h6(e,h6.schemaRules(e)))}};const kF={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},vke={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},CF={ol:!0,ul:!0},_y=1,yy=2,Wm=4;function IA(t,e,n){return e!=null?(e?_y:0)|(e==="full"?yy:0):t&&t.whitespace=="pre"?_y|yy:n&~Wm}class jv{constructor(e,n,i,s,o,r){this.type=e,this.attrs=n,this.marks=i,this.solid=s,this.options=r,this.content=[],this.activeMarks=En.none,this.match=o||(r&Wm?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(nt.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let i=this.type.contentMatch,s;return(s=i.findWrapping(e.type))?(this.match=i,s):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&_y)){let i=this.content[this.content.length-1],s;if(i&&i.isText&&(s=/[ \t\r\n\u000c]+$/.exec(i.text))){let o=i;i.text.length==s[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-s[0].length))}}let n=nt.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(nt.empty,!0))),this.type?this.type.create(this.attrs,n,this.marks):n}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!kF.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class LA{constructor(e,n,i){this.parser=e,this.options=n,this.isOpen=i,this.open=0;let s=n.topNode,o,r=IA(null,n.preserveWhitespace,0)|(i?Wm:0);s?o=new jv(s.type,s.attrs,En.none,!0,n.topMatch||s.type.contentMatch,r):i?o=new jv(null,null,En.none,!0,null,r):o=new jv(e.schema.topNodeType,null,En.none,!0,null,r),this.nodes=[o],this.find=n.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,n){e.nodeType==3?this.addTextNode(e,n):e.nodeType==1&&this.addElement(e,n)}addTextNode(e,n){let i=e.nodeValue,s=this.top;if(s.options&yy||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(i)){if(s.options&_y)s.options&yy?i=i.replace(/\r\n?/g,`
`):i=i.replace(/\r?\n|\r/g," ");else if(i=i.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(i)&&this.open==this.nodes.length-1){let o=s.content[s.content.length-1],r=e.previousSibling;(!o||r&&r.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(i=i.slice(1))}i&&this.insertNode(this.parser.schema.text(i),n),this.findInText(e)}else this.findInside(e)}addElement(e,n,i){let s=e.nodeName.toLowerCase(),o;CF.hasOwnProperty(s)&&this.parser.normalizeLists&&_ke(e);let r=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,i));if(r?r.ignore:vke.hasOwnProperty(s))this.findInside(e),this.ignoreFallback(e,n);else if(!r||r.skip||r.closeParent){r&&r.closeParent?this.open=Math.max(0,this.open-1):r&&r.skip.nodeType&&(e=r.skip);let a,l=this.top,c=this.needsBlock;if(kF.hasOwnProperty(s))l.content.length&&l.content[0].isInline&&this.open&&(this.open--,l=this.top),a=!0,l.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,n);return}let u=r&&r.skip?n:this.readStyles(e,n);u&&this.addAll(e,u),a&&this.sync(l),this.needsBlock=c}else{let a=this.readStyles(e,n);a&&this.addElementByRule(e,r,a,r.consuming===!1?o:void 0)}}leafFallback(e,n){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
`),n)}ignoreFallback(e,n){e.nodeName=="BR"&&(!this.top.type||!this.top.type.inlineContent)&&this.findPlace(this.parser.schema.text("-"),n)}readStyles(e,n){let i=e.style;if(i&&i.length)for(let s=0;s<this.parser.matchedStyles.length;s++){let o=this.parser.matchedStyles[s],r=i.getPropertyValue(o);if(r)for(let a=void 0;;){let l=this.parser.matchStyle(o,r,this,a);if(!l)break;if(l.ignore)return null;if(l.clearMark?n=n.filter(c=>!l.clearMark(c)):n=n.concat(this.parser.schema.marks[l.mark].create(l.attrs)),l.consuming===!1)a=l;else break}}return n}addElementByRule(e,n,i,s){let o,r;if(n.node)if(r=this.parser.schema.nodes[n.node],r.isLeaf)this.insertNode(r.create(n.attrs),i)||this.leafFallback(e,i);else{let l=this.enter(r,n.attrs||null,i,n.preserveWhitespace);l&&(o=!0,i=l)}else{let l=this.parser.schema.marks[n.mark];i=i.concat(l.create(n.attrs))}let a=this.top;if(r&&r.isLeaf)this.findInside(e);else if(s)this.addElement(e,i,s);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,i));else{let l=e;typeof n.contentElement=="string"?l=e.querySelector(n.contentElement):typeof n.contentElement=="function"?l=n.contentElement(e):n.contentElement&&(l=n.contentElement),this.findAround(e,l,!0),this.addAll(l,i)}o&&this.sync(a)&&this.open--}addAll(e,n,i,s){let o=i||0;for(let r=i?e.childNodes[i]:e.firstChild,a=s==null?null:e.childNodes[s];r!=a;r=r.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(r,n);this.findAtPoint(e,o)}findPlace(e,n){let i,s;for(let o=this.open;o>=0;o--){let r=this.nodes[o],a=r.findWrapping(e);if(a&&(!i||i.length>a.length)&&(i=a,s=r,!a.length)||r.solid)break}if(!i)return null;this.sync(s);for(let o=0;o<i.length;o++)n=this.enterInner(i[o],null,n,!1);return n}insertNode(e,n){if(e.isInline&&this.needsBlock&&!this.top.type){let s=this.textblockFromContext();s&&(n=this.enterInner(s,null,n))}let i=this.findPlace(e,n);if(i){this.closeExtra();let s=this.top;s.match&&(s.match=s.match.matchType(e.type));let o=En.none;for(let r of i.concat(e.marks))(s.type?s.type.allowsMarkType(r.type):DA(r.type,e.type))&&(o=r.addToSet(o));return s.content.push(e.mark(o)),!0}return!1}enter(e,n,i,s){let o=this.findPlace(e.create(n),i);return o&&(o=this.enterInner(e,n,i,!0,s)),o}enterInner(e,n,i,s=!1,o){this.closeExtra();let r=this.top;r.match=r.match&&r.match.matchType(e);let a=IA(e,o,r.options);r.options&Wm&&r.content.length==0&&(a|=Wm);let l=En.none;return i=i.filter(c=>(r.type?r.type.allowsMarkType(c.type):DA(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new jv(e,n,l,s,null,a)),this.open++,i}closeExtra(e=!1){let n=this.nodes.length-1;if(n>this.open){for(;n>this.open;n--)this.nodes[n-1].content.push(this.nodes[n].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let n=this.open;n>=0;n--)if(this.nodes[n]==e)return this.open=n,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let n=this.open;n>=0;n--){let i=this.nodes[n].content;for(let s=i.length-1;s>=0;s--)e+=i[s].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let i=0;i<this.find.length;i++)this.find[i].node==e&&this.find[i].offset==n&&(this.find[i].pos=this.currentPos)}findInside(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].pos==null&&e.nodeType==1&&e.contains(this.find[n].node)&&(this.find[n].pos=this.currentPos)}findAround(e,n,i){if(e!=n&&this.find)for(let s=0;s<this.find.length;s++)this.find[s].pos==null&&e.nodeType==1&&e.contains(this.find[s].node)&&n.compareDocumentPosition(this.find[s].node)&(i?2:4)&&(this.find[s].pos=this.currentPos)}findInText(e){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&(this.find[n].pos=this.currentPos-(e.nodeValue.length-this.find[n].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let n=e.split("/"),i=this.options.context,s=!this.isOpen&&(!i||i.parent.type==this.nodes[0].type),o=-(i?i.depth+1:0)+(s?0:1),r=(a,l)=>{for(;a>=0;a--){let c=n[a];if(c==""){if(a==n.length-1||a==0)continue;for(;l>=o;l--)if(r(a-1,l))return!0;return!1}else{let u=l>0||l==0&&s?this.nodes[l].type:i&&l>=o?i.node(l-o).type:null;if(!u||u.name!=c&&u.groups.indexOf(c)==-1)return!1;l--}}return!0};return r(n.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let n=e.depth;n>=0;n--){let i=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(i&&i.isTextblock&&i.defaultAttrs)return i}for(let n in this.parser.schema.nodes){let i=this.parser.schema.nodes[n];if(i.isTextblock&&i.defaultAttrs)return i}}}function _ke(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let i=e.nodeType==1?e.nodeName.toLowerCase():null;i&&CF.hasOwnProperty(i)&&n?(n.appendChild(e),e=n):i=="li"?n=e:i&&(n=null)}}function yke(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function OA(t){let e={};for(let n in t)e[n]=t[n];return e}function DA(t,e){let n=e.schema.nodes;for(let i in n){let s=n[i];if(!s.allowsMarkType(t))continue;let o=[],r=a=>{o.push(a);for(let l=0;l<a.edgeCount;l++){let{type:c,next:u}=a.edge(l);if(c==e||o.indexOf(u)<0&&r(u))return!0}};if(r(s.contentMatch))return!0}}class Wc{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},i){i||(i=kw(n).createDocumentFragment());let s=i,o=[];return e.forEach(r=>{if(o.length||r.marks.length){let a=0,l=0;for(;a<o.length&&l<r.marks.length;){let c=r.marks[l];if(!this.marks[c.type.name]){l++;continue}if(!c.eq(o[a][0])||c.type.spec.spanning===!1)break;a++,l++}for(;a<o.length;)s=o.pop()[1];for(;l<r.marks.length;){let c=r.marks[l++],u=this.serializeMark(c,r.isInline,n);u&&(o.push([c,s]),s.appendChild(u.dom),s=u.contentDOM||u.dom)}}s.appendChild(this.serializeNodeInner(r,n))}),i}serializeNodeInner(e,n){let{dom:i,contentDOM:s}=M0(kw(n),this.nodes[e.type.name](e),null,e.attrs);if(s){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,s)}return i}serializeNode(e,n={}){let i=this.serializeNodeInner(e,n);for(let s=e.marks.length-1;s>=0;s--){let o=this.serializeMark(e.marks[s],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(i),i=o.dom)}return i}serializeMark(e,n,i={}){let s=this.marks[e.type.name];return s&&M0(kw(i),s(e,n),null,e.attrs)}static renderSpec(e,n,i=null,s){return M0(e,n,i,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Wc(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=RA(e.nodes);return n.text||(n.text=i=>i.text),n}static marksFromSchema(e){return RA(e.marks)}}function RA(t){let e={};for(let n in t){let i=t[n].spec.toDOM;i&&(e[n]=i)}return e}function kw(t){return t.document||window.document}const VA=new WeakMap;function bke(t){let e=VA.get(t);return e===void 0&&VA.set(t,e=wke(t)),e}function wke(t){let e=null;function n(i){if(i&&typeof i=="object")if(Array.isArray(i))if(typeof i[0]=="string")e||(e=[]),e.push(i);else for(let s=0;s<i.length;s++)n(i[s]);else for(let s in i)n(i[s])}return n(t),e}function M0(t,e,n,i){if(typeof e=="string")return{dom:t.createTextNode(e)};if(e.nodeType!=null)return{dom:e};if(e.dom&&e.dom.nodeType!=null)return e;let s=e[0],o;if(typeof s!="string")throw new RangeError("Invalid array passed to renderSpec");if(i&&(o=bke(i))&&o.indexOf(e)>-1)throw new RangeError("Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.");let r=s.indexOf(" ");r>0&&(n=s.slice(0,r),s=s.slice(r+1));let a,l=n?t.createElementNS(n,s):t.createElement(s),c=e[1],u=1;if(c&&typeof c=="object"&&c.nodeType==null&&!Array.isArray(c)){u=2;for(let d in c)if(c[d]!=null){let h=d.indexOf(" ");h>0?l.setAttributeNS(d.slice(0,h),d.slice(h+1),c[d]):l.setAttribute(d,c[d])}}for(let d=u;d<e.length;d++){let h=e[d];if(h===0){if(d<e.length-1||d>u)throw new RangeError("Content hole must be the only child of its parent node");return{dom:l,contentDOM:l}}else{let{dom:f,contentDOM:p}=M0(t,h,n,i);if(l.appendChild(f),p){if(a)throw new RangeError("Multiple content holes");a=p}}}return{dom:l,contentDOM:a}}const kke={};function m8(t,e){const n=e||kke,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return xF(t,i,s)}function xF(t,e,n){if(Cke(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return FA(t.children,e,n)}return Array.isArray(t)?FA(t,e,n):""}function FA(t,e,n){const i=[];let s=-1;for(;++s<t.length;)i[s]=xF(t[s],e,n);return i.join("")}function Cke(t){return!!(t&&typeof t=="object")}const NA=document.createElement("i");function g8(t){const e="&"+t+";";NA.innerHTML=e;const n=NA.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function rr(t,e,n,i){const s=t.length;let o=0,r;if(e<0?e=-e>s?0:s+e:e=e>s?s:e,n=n>0?n:0,i.length<1e4)r=Array.from(i),r.unshift(e,n),t.splice(...r);else for(n&&t.splice(e,n);o<i.length;)r=i.slice(o,o+1e4),r.unshift(e,0),t.splice(...r),o+=1e4,e+=1e4}function Jo(t,e){return t.length>0?(rr(t,t.length,0,e),t):e}const BA={}.hasOwnProperty;function SF(t){const e={};let n=-1;for(;++n<t.length;)xke(e,t[n]);return e}function xke(t,e){let n;for(n in e){const s=(BA.call(t,n)?t[n]:void 0)||(t[n]={}),o=e[n];let r;if(o)for(r in o){BA.call(s,r)||(s[r]=[]);const a=o[r];Ske(s[r],Array.isArray(a)?a:a?[a]:[])}}}function Ske(t,e){let n=-1;const i=[];for(;++n<e.length;)(e[n].add==="after"?t:i).push(e[n]);rr(t,0,0,i)}function $F(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Pr(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Di=Yc(/[A-Za-z]/),io=Yc(/[\dA-Za-z]/),$ke=Yc(/[#-'*+\--9=?A-Z^-~]/);function by(t){return t!==null&&(t<32||t===127)}const f6=Yc(/\d/),Ake=Yc(/[\dA-Fa-f]/),Eke=Yc(/[!-/:-@[-`{-~]/);function Et(t){return t!==null&&t<-2}function Un(t){return t!==null&&(t<0||t===32)}function cn(t){return t===-2||t===-1||t===32}const zb=Yc(/\p{P}|\p{S}/u),pd=Yc(/\s/);function Yc(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function mn(t,e,n,i){const s=i?i-1:Number.POSITIVE_INFINITY;let o=0;return r;function r(l){return cn(l)?(t.enter(n),a(l)):e(l)}function a(l){return cn(l)&&o++<s?(t.consume(l),a):(t.exit(n),e(l))}}const Mke={tokenize:Tke};function Tke(t){const e=t.attempt(this.parser.constructs.contentInitial,i,s);let n;return e;function i(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),mn(t,e,"linePrefix")}function s(a){return t.enter("paragraph"),o(a)}function o(a){const l=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,r(a)}function r(a){if(a===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(a);return}return Et(a)?(t.consume(a),t.exit("chunkText"),o):(t.consume(a),r)}}const Pke={tokenize:Ike},zA={tokenize:Lke};function Ike(t){const e=this,n=[];let i=0,s,o,r;return a;function a(C){if(i<n.length){const $=n[i];return e.containerState=$[1],t.attempt($[0].continuation,l,c)(C)}return c(C)}function l(C){if(i++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,s&&k();const $=e.events.length;let x=$,M;for(;x--;)if(e.events[x][0]==="exit"&&e.events[x][1].type==="chunkFlow"){M=e.events[x][1].end;break}b(i);let P=$;for(;P<e.events.length;)e.events[P][1].end=Object.assign({},M),P++;return rr(e.events,x+1,0,e.events.slice($)),e.events.length=P,c(C)}return a(C)}function c(C){if(i===n.length){if(!s)return h(C);if(s.currentConstruct&&s.currentConstruct.concrete)return p(C);e.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(zA,u,d)(C)}function u(C){return s&&k(),b(i),h(C)}function d(C){return e.parser.lazy[e.now().line]=i!==n.length,r=e.now().offset,p(C)}function h(C){return e.containerState={},t.attempt(zA,f,p)(C)}function f(C){return i++,n.push([e.currentConstruct,e.containerState]),h(C)}function p(C){if(C===null){s&&k(),b(0),t.consume(C);return}return s=s||e.parser.flow(e.now()),t.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:s}),m(C)}function m(C){if(C===null){y(t.exit("chunkFlow"),!0),b(0),t.consume(C);return}return Et(C)?(t.consume(C),y(t.exit("chunkFlow")),i=0,e.interrupt=void 0,a):(t.consume(C),m)}function y(C,$){const x=e.sliceStream(C);if($&&x.push(null),C.previous=o,o&&(o.next=C),o=C,s.defineSkip(C.start),s.write(x),e.parser.lazy[C.start.line]){let M=s.events.length;for(;M--;)if(s.events[M][1].start.offset<r&&(!s.events[M][1].end||s.events[M][1].end.offset>r))return;const P=e.events.length;let T=P,I,L;for(;T--;)if(e.events[T][0]==="exit"&&e.events[T][1].type==="chunkFlow"){if(I){L=e.events[T][1].end;break}I=!0}for(b(i),M=P;M<e.events.length;)e.events[M][1].end=Object.assign({},L),M++;rr(e.events,T+1,0,e.events.slice(P)),e.events.length=M}}function b(C){let $=n.length;for(;$-- >C;){const x=n[$];e.containerState=x[1],x[0].exit.call(e,t)}n.length=C}function k(){s.write([null]),o=void 0,s=void 0,e.containerState._closeFlow=void 0}}function Lke(t,e,n){return mn(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function wy(t){if(t===null||Un(t)||pd(t))return 1;if(zb(t))return 2}function Hb(t,e,n){const i=[];let s=-1;for(;++s<t.length;){const o=t[s].resolveAll;o&&!i.includes(o)&&(e=o(e,n),i.push(o))}return e}const p6={name:"attention",tokenize:Dke,resolveAll:Oke};function Oke(t,e){let n=-1,i,s,o,r,a,l,c,u;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(i=n;i--;)if(t[i][0]==="exit"&&t[i][1].type==="attentionSequence"&&t[i][1]._open&&e.sliceSerialize(t[i][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[i][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[i][1].end.offset-t[i][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;l=t[i][1].end.offset-t[i][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const d=Object.assign({},t[i][1].end),h=Object.assign({},t[n][1].start);HA(d,-l),HA(h,l),r={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},t[i][1].end)},a={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},t[n][1].start),end:h},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},t[i][1].end),end:Object.assign({},t[n][1].start)},s={type:l>1?"strong":"emphasis",start:Object.assign({},r.start),end:Object.assign({},a.end)},t[i][1].end=Object.assign({},r.start),t[n][1].start=Object.assign({},a.end),c=[],t[i][1].end.offset-t[i][1].start.offset&&(c=Jo(c,[["enter",t[i][1],e],["exit",t[i][1],e]])),c=Jo(c,[["enter",s,e],["enter",r,e],["exit",r,e],["enter",o,e]]),c=Jo(c,Hb(e.parser.constructs.insideSpan.null,t.slice(i+1,n),e)),c=Jo(c,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",s,e]]),t[n][1].end.offset-t[n][1].start.offset?(u=2,c=Jo(c,[["enter",t[n][1],e],["exit",t[n][1],e]])):u=0,rr(t,i-1,n-i+3,c),n=i+c.length-u-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function Dke(t,e){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,s=wy(i);let o;return r;function r(l){return o=l,t.enter("attentionSequence"),a(l)}function a(l){if(l===o)return t.consume(l),a;const c=t.exit("attentionSequence"),u=wy(l),d=!u||u===2&&s||n.includes(l),h=!s||s===2&&u||n.includes(i);return c._open=!!(o===42?d:d&&(s||!h)),c._close=!!(o===42?h:h&&(u||!d)),e(l)}}function HA(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const Rke={name:"autolink",tokenize:Vke};function Vke(t,e,n){let i=0;return s;function s(f){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(f){return Di(f)?(t.consume(f),r):f===64?n(f):c(f)}function r(f){return f===43||f===45||f===46||io(f)?(i=1,a(f)):c(f)}function a(f){return f===58?(t.consume(f),i=0,l):(f===43||f===45||f===46||io(f))&&i++<32?(t.consume(f),a):(i=0,c(f))}function l(f){return f===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.exit("autolink"),e):f===null||f===32||f===60||by(f)?n(f):(t.consume(f),l)}function c(f){return f===64?(t.consume(f),u):$ke(f)?(t.consume(f),c):n(f)}function u(f){return io(f)?d(f):n(f)}function d(f){return f===46?(t.consume(f),i=0,u):f===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.exit("autolink"),e):h(f)}function h(f){if((f===45||io(f))&&i++<63){const p=f===45?h:d;return t.consume(f),p}return n(f)}}const O1={tokenize:Fke,partial:!0};function Fke(t,e,n){return i;function i(o){return cn(o)?mn(t,s,"linePrefix")(o):s(o)}function s(o){return o===null||Et(o)?e(o):n(o)}}const AF={name:"blockQuote",tokenize:Nke,continuation:{tokenize:Bke},exit:zke};function Nke(t,e,n){const i=this;return s;function s(r){if(r===62){const a=i.containerState;return a.open||(t.enter("blockQuote",{_container:!0}),a.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(r),t.exit("blockQuoteMarker"),o}return n(r)}function o(r){return cn(r)?(t.enter("blockQuotePrefixWhitespace"),t.consume(r),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(r))}}function Bke(t,e,n){const i=this;return s;function s(r){return cn(r)?mn(t,o,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(r):o(r)}function o(r){return t.attempt(AF,e,n)(r)}}function zke(t){t.exit("blockQuote")}const EF={name:"characterEscape",tokenize:Hke};function Hke(t,e,n){return i;function i(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),s}function s(o){return Eke(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(o)}}const MF={name:"characterReference",tokenize:Uke};function Uke(t,e,n){const i=this;let s=0,o,r;return a;function a(d){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(d),t.exit("characterReferenceMarker"),l}function l(d){return d===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(d),t.exit("characterReferenceMarkerNumeric"),c):(t.enter("characterReferenceValue"),o=31,r=io,u(d))}function c(d){return d===88||d===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(d),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,r=Ake,u):(t.enter("characterReferenceValue"),o=7,r=f6,u(d))}function u(d){if(d===59&&s){const h=t.exit("characterReferenceValue");return r===io&&!g8(i.sliceSerialize(h))?n(d):(t.enter("characterReferenceMarker"),t.consume(d),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return r(d)&&s++<o?(t.consume(d),u):n(d)}}const UA={tokenize:Wke,partial:!0},jA={name:"codeFenced",tokenize:jke,concrete:!0};function jke(t,e,n){const i=this,s={tokenize:x,partial:!0};let o=0,r=0,a;return l;function l(M){return c(M)}function c(M){const P=i.events[i.events.length-1];return o=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,a=M,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(M)}function u(M){return M===a?(r++,t.consume(M),u):r<3?n(M):(t.exit("codeFencedFenceSequence"),cn(M)?mn(t,d,"whitespace")(M):d(M))}function d(M){return M===null||Et(M)?(t.exit("codeFencedFence"),i.interrupt?e(M):t.check(UA,m,$)(M)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),h(M))}function h(M){return M===null||Et(M)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),d(M)):cn(M)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),mn(t,f,"whitespace")(M)):M===96&&M===a?n(M):(t.consume(M),h)}function f(M){return M===null||Et(M)?d(M):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),p(M))}function p(M){return M===null||Et(M)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),d(M)):M===96&&M===a?n(M):(t.consume(M),p)}function m(M){return t.attempt(s,$,y)(M)}function y(M){return t.enter("lineEnding"),t.consume(M),t.exit("lineEnding"),b}function b(M){return o>0&&cn(M)?mn(t,k,"linePrefix",o+1)(M):k(M)}function k(M){return M===null||Et(M)?t.check(UA,m,$)(M):(t.enter("codeFlowValue"),C(M))}function C(M){return M===null||Et(M)?(t.exit("codeFlowValue"),k(M)):(t.consume(M),C)}function $(M){return t.exit("codeFenced"),e(M)}function x(M,P,T){let I=0;return L;function L(z){return M.enter("lineEnding"),M.consume(z),M.exit("lineEnding"),R}function R(z){return M.enter("codeFencedFence"),cn(z)?mn(M,V,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):V(z)}function V(z){return z===a?(M.enter("codeFencedFenceSequence"),H(z)):T(z)}function H(z){return z===a?(I++,M.consume(z),H):I>=r?(M.exit("codeFencedFenceSequence"),cn(z)?mn(M,F,"whitespace")(z):F(z)):T(z)}function F(z){return z===null||Et(z)?(M.exit("codeFencedFence"),P(z)):T(z)}}}function Wke(t,e,n){const i=this;return s;function s(r){return r===null?n(r):(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),o)}function o(r){return i.parser.lazy[i.now().line]?n(r):e(r)}}const Cw={name:"codeIndented",tokenize:qke},Yke={tokenize:Gke,partial:!0};function qke(t,e,n){const i=this;return s;function s(c){return t.enter("codeIndented"),mn(t,o,"linePrefix",4+1)(c)}function o(c){const u=i.events[i.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?r(c):n(c)}function r(c){return c===null?l(c):Et(c)?t.attempt(Yke,r,l)(c):(t.enter("codeFlowValue"),a(c))}function a(c){return c===null||Et(c)?(t.exit("codeFlowValue"),r(c)):(t.consume(c),a)}function l(c){return t.exit("codeIndented"),e(c)}}function Gke(t,e,n){const i=this;return s;function s(r){return i.parser.lazy[i.now().line]?n(r):Et(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),s):mn(t,o,"linePrefix",4+1)(r)}function o(r){const a=i.events[i.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(r):Et(r)?s(r):n(r)}}const Xke={name:"codeText",tokenize:Jke,resolve:Kke,previous:Zke};function Kke(t){let e=t.length-4,n=3,i,s;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(i=n;++i<e;)if(t[i][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(i=n-1,e++;++i<=e;)s===void 0?i!==e&&t[i][1].type!=="lineEnding"&&(s=i):(i===e||t[i][1].type==="lineEnding")&&(t[s][1].type="codeTextData",i!==s+2&&(t[s][1].end=t[i-1][1].end,t.splice(s+2,i-s-2),e-=i-s-2,i=s+2),s=void 0);return t}function Zke(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Jke(t,e,n){let i=0,s,o;return r;function r(d){return t.enter("codeText"),t.enter("codeTextSequence"),a(d)}function a(d){return d===96?(t.consume(d),i++,a):(t.exit("codeTextSequence"),l(d))}function l(d){return d===null?n(d):d===32?(t.enter("space"),t.consume(d),t.exit("space"),l):d===96?(o=t.enter("codeTextSequence"),s=0,u(d)):Et(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),l):(t.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||Et(d)?(t.exit("codeTextData"),l(d)):(t.consume(d),c)}function u(d){return d===96?(t.consume(d),s++,u):s===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(d)):(o.type="codeTextData",c(d))}}class Qke{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(e,i):e>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(e,n,i){const s=n||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return i&&Fp(this.left,i),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),Fp(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Fp(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);Fp(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Fp(this.left,n.reverse())}}}function Fp(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function TF(t){const e={};let n=-1,i,s,o,r,a,l,c;const u=new Qke(t);for(;++n<u.length;){for(;n in e;)n=e[n];if(i=u.get(n),n&&i[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=i[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(i[0]==="enter")i[1].contentType&&(Object.assign(e,e6e(u,n)),n=e[n],c=!0);else if(i[1]._container){for(o=n,s=void 0;o--&&(r=u.get(o),r[1].type==="lineEnding"||r[1].type==="lineEndingBlank");)r[0]==="enter"&&(s&&(u.get(s)[1].type="lineEndingBlank"),r[1].type="lineEnding",s=o);s&&(i[1].end=Object.assign({},u.get(s)[1].start),a=u.slice(s,n),a.unshift(i),u.splice(s,n-s+1,a))}}return rr(t,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function e6e(t,e){const n=t.get(e)[1],i=t.get(e)[2];let s=e-1;const o=[],r=n._tokenizer||i.parser[n.contentType](n.start),a=r.events,l=[],c={};let u,d,h=-1,f=n,p=0,m=0;const y=[m];for(;f;){for(;t.get(++s)[1]!==f;);o.push(s),f._tokenizer||(u=i.sliceStream(f),f.next||u.push(null),d&&r.defineSkip(f.start),f._isInFirstContentOfListItem&&(r._gfmTasklistFirstContentOfListItem=!0),r.write(u),f._isInFirstContentOfListItem&&(r._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=n;++h<a.length;)a[h][0]==="exit"&&a[h-1][0]==="enter"&&a[h][1].type===a[h-1][1].type&&a[h][1].start.line!==a[h][1].end.line&&(m=h+1,y.push(m),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(r.events=[],f?(f._tokenizer=void 0,f.previous=void 0):y.pop(),h=y.length;h--;){const b=a.slice(y[h],y[h+1]),k=o.pop();l.push([k,k+b.length-1]),t.splice(k,2,b)}for(l.reverse(),h=-1;++h<l.length;)c[p+l[h][0]]=p+l[h][1],p+=l[h][1]-l[h][0]-1;return c}const t6e={tokenize:i6e,resolve:s6e},n6e={tokenize:o6e,partial:!0};function s6e(t){return TF(t),t}function i6e(t,e){let n;return i;function i(a){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),s(a)}function s(a){return a===null?o(a):Et(a)?t.check(n6e,r,o)(a):(t.consume(a),s)}function o(a){return t.exit("chunkContent"),t.exit("content"),e(a)}function r(a){return t.consume(a),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function o6e(t,e,n){const i=this;return s;function s(r){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),mn(t,o,"linePrefix")}function o(r){if(r===null||Et(r))return n(r);const a=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(r):t.interrupt(i.parser.constructs.flow,n,e)(r)}}function PF(t,e,n,i,s,o,r,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(b){return b===60?(t.enter(i),t.enter(s),t.enter(o),t.consume(b),t.exit(o),h):b===null||b===32||b===41||by(b)?n(b):(t.enter(i),t.enter(r),t.enter(a),t.enter("chunkString",{contentType:"string"}),m(b))}function h(b){return b===62?(t.enter(o),t.consume(b),t.exit(o),t.exit(s),t.exit(i),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),f(b))}function f(b){return b===62?(t.exit("chunkString"),t.exit(a),h(b)):b===null||b===60||Et(b)?n(b):(t.consume(b),b===92?p:f)}function p(b){return b===60||b===62||b===92?(t.consume(b),f):f(b)}function m(b){return!u&&(b===null||b===41||Un(b))?(t.exit("chunkString"),t.exit(a),t.exit(r),t.exit(i),e(b)):u<c&&b===40?(t.consume(b),u++,m):b===41?(t.consume(b),u--,m):b===null||b===32||b===40||by(b)?n(b):(t.consume(b),b===92?y:m)}function y(b){return b===40||b===41||b===92?(t.consume(b),m):m(b)}}function IF(t,e,n,i,s,o){const r=this;let a=0,l;return c;function c(f){return t.enter(i),t.enter(s),t.consume(f),t.exit(s),t.enter(o),u}function u(f){return a>999||f===null||f===91||f===93&&!l||f===94&&!a&&"_hiddenFootnoteSupport"in r.parser.constructs?n(f):f===93?(t.exit(o),t.enter(s),t.consume(f),t.exit(s),t.exit(i),e):Et(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),u):(t.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||Et(f)||a++>999?(t.exit("chunkString"),u(f)):(t.consume(f),l||(l=!cn(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(t.consume(f),a++,d):d(f)}}function LF(t,e,n,i,s,o){let r;return a;function a(h){return h===34||h===39||h===40?(t.enter(i),t.enter(s),t.consume(h),t.exit(s),r=h===40?41:h,l):n(h)}function l(h){return h===r?(t.enter(s),t.consume(h),t.exit(s),t.exit(i),e):(t.enter(o),c(h))}function c(h){return h===r?(t.exit(o),l(r)):h===null?n(h):Et(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),mn(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===r||h===null||Et(h)?(t.exit("chunkString"),c(h)):(t.consume(h),h===92?d:u)}function d(h){return h===r||h===92?(t.consume(h),u):u(h)}}function Ym(t,e){let n;return i;function i(s){return Et(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),n=!0,i):cn(s)?mn(t,i,n?"linePrefix":"lineSuffix")(s):e(s)}}const r6e={name:"definition",tokenize:l6e},a6e={tokenize:c6e,partial:!0};function l6e(t,e,n){const i=this;let s;return o;function o(f){return t.enter("definition"),r(f)}function r(f){return IF.call(i,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return s=Pr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),f===58?(t.enter("definitionMarker"),t.consume(f),t.exit("definitionMarker"),l):n(f)}function l(f){return Un(f)?Ym(t,c)(f):c(f)}function c(f){return PF(t,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return t.attempt(a6e,d,d)(f)}function d(f){return cn(f)?mn(t,h,"whitespace")(f):h(f)}function h(f){return f===null||Et(f)?(t.exit("definition"),i.parser.defined.push(s),e(f)):n(f)}}function c6e(t,e,n){return i;function i(a){return Un(a)?Ym(t,s)(a):n(a)}function s(a){return LF(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return cn(a)?mn(t,r,"whitespace")(a):r(a)}function r(a){return a===null||Et(a)?e(a):n(a)}}const u6e={name:"hardBreakEscape",tokenize:d6e};function d6e(t,e,n){return i;function i(o){return t.enter("hardBreakEscape"),t.consume(o),s}function s(o){return Et(o)?(t.exit("hardBreakEscape"),e(o)):n(o)}}const h6e={name:"headingAtx",tokenize:p6e,resolve:f6e};function f6e(t,e){let n=t.length-2,i=3,s,o;return t[i][1].type==="whitespace"&&(i+=2),n-2>i&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&t[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(s={type:"atxHeadingText",start:t[i][1].start,end:t[n][1].end},o={type:"chunkText",start:t[i][1].start,end:t[n][1].end,contentType:"text"},rr(t,i,n-i+1,[["enter",s,e],["enter",o,e],["exit",o,e],["exit",s,e]])),t}function p6e(t,e,n){let i=0;return s;function s(u){return t.enter("atxHeading"),o(u)}function o(u){return t.enter("atxHeadingSequence"),r(u)}function r(u){return u===35&&i++<6?(t.consume(u),r):u===null||Un(u)?(t.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(t.enter("atxHeadingSequence"),l(u)):u===null||Et(u)?(t.exit("atxHeading"),e(u)):cn(u)?mn(t,a,"whitespace")(u):(t.enter("atxHeadingText"),c(u))}function l(u){return u===35?(t.consume(u),l):(t.exit("atxHeadingSequence"),a(u))}function c(u){return u===null||u===35||Un(u)?(t.exit("atxHeadingText"),a(u)):(t.consume(u),c)}}const m6e=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],WA=["pre","script","style","textarea"],g6e={name:"htmlFlow",tokenize:b6e,resolveTo:y6e,concrete:!0},v6e={tokenize:k6e,partial:!0},_6e={tokenize:w6e,partial:!0};function y6e(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function b6e(t,e,n){const i=this;let s,o,r,a,l;return c;function c(Z){return u(Z)}function u(Z){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(Z),d}function d(Z){return Z===33?(t.consume(Z),h):Z===47?(t.consume(Z),o=!0,m):Z===63?(t.consume(Z),s=3,i.interrupt?e:U):Di(Z)?(t.consume(Z),r=String.fromCharCode(Z),y):n(Z)}function h(Z){return Z===45?(t.consume(Z),s=2,f):Z===91?(t.consume(Z),s=5,a=0,p):Di(Z)?(t.consume(Z),s=4,i.interrupt?e:U):n(Z)}function f(Z){return Z===45?(t.consume(Z),i.interrupt?e:U):n(Z)}function p(Z){const ae="CDATA[";return Z===ae.charCodeAt(a++)?(t.consume(Z),a===ae.length?i.interrupt?e:V:p):n(Z)}function m(Z){return Di(Z)?(t.consume(Z),r=String.fromCharCode(Z),y):n(Z)}function y(Z){if(Z===null||Z===47||Z===62||Un(Z)){const ae=Z===47,me=r.toLowerCase();return!ae&&!o&&WA.includes(me)?(s=1,i.interrupt?e(Z):V(Z)):m6e.includes(r.toLowerCase())?(s=6,ae?(t.consume(Z),b):i.interrupt?e(Z):V(Z)):(s=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(Z):o?k(Z):C(Z))}return Z===45||io(Z)?(t.consume(Z),r+=String.fromCharCode(Z),y):n(Z)}function b(Z){return Z===62?(t.consume(Z),i.interrupt?e:V):n(Z)}function k(Z){return cn(Z)?(t.consume(Z),k):L(Z)}function C(Z){return Z===47?(t.consume(Z),L):Z===58||Z===95||Di(Z)?(t.consume(Z),$):cn(Z)?(t.consume(Z),C):L(Z)}function $(Z){return Z===45||Z===46||Z===58||Z===95||io(Z)?(t.consume(Z),$):x(Z)}function x(Z){return Z===61?(t.consume(Z),M):cn(Z)?(t.consume(Z),x):C(Z)}function M(Z){return Z===null||Z===60||Z===61||Z===62||Z===96?n(Z):Z===34||Z===39?(t.consume(Z),l=Z,P):cn(Z)?(t.consume(Z),M):T(Z)}function P(Z){return Z===l?(t.consume(Z),l=null,I):Z===null||Et(Z)?n(Z):(t.consume(Z),P)}function T(Z){return Z===null||Z===34||Z===39||Z===47||Z===60||Z===61||Z===62||Z===96||Un(Z)?x(Z):(t.consume(Z),T)}function I(Z){return Z===47||Z===62||cn(Z)?C(Z):n(Z)}function L(Z){return Z===62?(t.consume(Z),R):n(Z)}function R(Z){return Z===null||Et(Z)?V(Z):cn(Z)?(t.consume(Z),R):n(Z)}function V(Z){return Z===45&&s===2?(t.consume(Z),N):Z===60&&s===1?(t.consume(Z),q):Z===62&&s===4?(t.consume(Z),Q):Z===63&&s===3?(t.consume(Z),U):Z===93&&s===5?(t.consume(Z),X):Et(Z)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(v6e,ne,H)(Z)):Z===null||Et(Z)?(t.exit("htmlFlowData"),H(Z)):(t.consume(Z),V)}function H(Z){return t.check(_6e,F,ne)(Z)}function F(Z){return t.enter("lineEnding"),t.consume(Z),t.exit("lineEnding"),z}function z(Z){return Z===null||Et(Z)?H(Z):(t.enter("htmlFlowData"),V(Z))}function N(Z){return Z===45?(t.consume(Z),U):V(Z)}function q(Z){return Z===47?(t.consume(Z),r="",K):V(Z)}function K(Z){if(Z===62){const ae=r.toLowerCase();return WA.includes(ae)?(t.consume(Z),Q):V(Z)}return Di(Z)&&r.length<8?(t.consume(Z),r+=String.fromCharCode(Z),K):V(Z)}function X(Z){return Z===93?(t.consume(Z),U):V(Z)}function U(Z){return Z===62?(t.consume(Z),Q):Z===45&&s===2?(t.consume(Z),U):V(Z)}function Q(Z){return Z===null||Et(Z)?(t.exit("htmlFlowData"),ne(Z)):(t.consume(Z),Q)}function ne(Z){return t.exit("htmlFlow"),e(Z)}}function w6e(t,e,n){const i=this;return s;function s(r){return Et(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),o):n(r)}function o(r){return i.parser.lazy[i.now().line]?n(r):e(r)}}function k6e(t,e,n){return i;function i(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(O1,e,n)}}const C6e={name:"htmlText",tokenize:x6e};function x6e(t,e,n){const i=this;let s,o,r;return a;function a(U){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(U),l}function l(U){return U===33?(t.consume(U),c):U===47?(t.consume(U),x):U===63?(t.consume(U),C):Di(U)?(t.consume(U),T):n(U)}function c(U){return U===45?(t.consume(U),u):U===91?(t.consume(U),o=0,p):Di(U)?(t.consume(U),k):n(U)}function u(U){return U===45?(t.consume(U),f):n(U)}function d(U){return U===null?n(U):U===45?(t.consume(U),h):Et(U)?(r=d,q(U)):(t.consume(U),d)}function h(U){return U===45?(t.consume(U),f):d(U)}function f(U){return U===62?N(U):U===45?h(U):d(U)}function p(U){const Q="CDATA[";return U===Q.charCodeAt(o++)?(t.consume(U),o===Q.length?m:p):n(U)}function m(U){return U===null?n(U):U===93?(t.consume(U),y):Et(U)?(r=m,q(U)):(t.consume(U),m)}function y(U){return U===93?(t.consume(U),b):m(U)}function b(U){return U===62?N(U):U===93?(t.consume(U),b):m(U)}function k(U){return U===null||U===62?N(U):Et(U)?(r=k,q(U)):(t.consume(U),k)}function C(U){return U===null?n(U):U===63?(t.consume(U),$):Et(U)?(r=C,q(U)):(t.consume(U),C)}function $(U){return U===62?N(U):C(U)}function x(U){return Di(U)?(t.consume(U),M):n(U)}function M(U){return U===45||io(U)?(t.consume(U),M):P(U)}function P(U){return Et(U)?(r=P,q(U)):cn(U)?(t.consume(U),P):N(U)}function T(U){return U===45||io(U)?(t.consume(U),T):U===47||U===62||Un(U)?I(U):n(U)}function I(U){return U===47?(t.consume(U),N):U===58||U===95||Di(U)?(t.consume(U),L):Et(U)?(r=I,q(U)):cn(U)?(t.consume(U),I):N(U)}function L(U){return U===45||U===46||U===58||U===95||io(U)?(t.consume(U),L):R(U)}function R(U){return U===61?(t.consume(U),V):Et(U)?(r=R,q(U)):cn(U)?(t.consume(U),R):I(U)}function V(U){return U===null||U===60||U===61||U===62||U===96?n(U):U===34||U===39?(t.consume(U),s=U,H):Et(U)?(r=V,q(U)):cn(U)?(t.consume(U),V):(t.consume(U),F)}function H(U){return U===s?(t.consume(U),s=void 0,z):U===null?n(U):Et(U)?(r=H,q(U)):(t.consume(U),H)}function F(U){return U===null||U===34||U===39||U===60||U===61||U===96?n(U):U===47||U===62||Un(U)?I(U):(t.consume(U),F)}function z(U){return U===47||U===62||Un(U)?I(U):n(U)}function N(U){return U===62?(t.consume(U),t.exit("htmlTextData"),t.exit("htmlText"),e):n(U)}function q(U){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(U),t.exit("lineEnding"),K}function K(U){return cn(U)?mn(t,X,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):X(U)}function X(U){return t.enter("htmlTextData"),r(U)}}const v8={name:"labelEnd",tokenize:T6e,resolveTo:M6e,resolveAll:E6e},S6e={tokenize:P6e},$6e={tokenize:I6e},A6e={tokenize:L6e};function E6e(t){let e=-1;for(;++e<t.length;){const n=t[e][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(t.splice(e+1,n.type==="labelImage"?4:2),n.type="data",e++)}return t}function M6e(t,e){let n=t.length,i=0,s,o,r,a;for(;n--;)if(s=t[n][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(r){if(t[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=n,s.type!=="labelLink")){i=2;break}}else s.type==="labelEnd"&&(r=n);const l={type:t[o][1].type==="labelLink"?"link":"image",start:Object.assign({},t[o][1].start),end:Object.assign({},t[t.length-1][1].end)},c={type:"label",start:Object.assign({},t[o][1].start),end:Object.assign({},t[r][1].end)},u={type:"labelText",start:Object.assign({},t[o+i+2][1].end),end:Object.assign({},t[r-2][1].start)};return a=[["enter",l,e],["enter",c,e]],a=Jo(a,t.slice(o+1,o+i+3)),a=Jo(a,[["enter",u,e]]),a=Jo(a,Hb(e.parser.constructs.insideSpan.null,t.slice(o+i+4,r-3),e)),a=Jo(a,[["exit",u,e],t[r-2],t[r-1],["exit",c,e]]),a=Jo(a,t.slice(r+1)),a=Jo(a,[["exit",l,e]]),rr(t,o,t.length,a),t}function T6e(t,e,n){const i=this;let s=i.events.length,o,r;for(;s--;)if((i.events[s][1].type==="labelImage"||i.events[s][1].type==="labelLink")&&!i.events[s][1]._balanced){o=i.events[s][1];break}return a;function a(h){return o?o._inactive?d(h):(r=i.parser.defined.includes(Pr(i.sliceSerialize({start:o.end,end:i.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelEnd"),l):n(h)}function l(h){return h===40?t.attempt(S6e,u,r?u:d)(h):h===91?t.attempt($6e,u,r?c:d)(h):r?u(h):d(h)}function c(h){return t.attempt(A6e,u,d)(h)}function u(h){return e(h)}function d(h){return o._balanced=!0,n(h)}}function P6e(t,e,n){return i;function i(d){return t.enter("resource"),t.enter("resourceMarker"),t.consume(d),t.exit("resourceMarker"),s}function s(d){return Un(d)?Ym(t,o)(d):o(d)}function o(d){return d===41?u(d):PF(t,r,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function r(d){return Un(d)?Ym(t,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?LF(t,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return Un(d)?Ym(t,u)(d):u(d)}function u(d){return d===41?(t.enter("resourceMarker"),t.consume(d),t.exit("resourceMarker"),t.exit("resource"),e):n(d)}}function I6e(t,e,n){const i=this;return s;function s(a){return IF.call(i,t,o,r,"reference","referenceMarker","referenceString")(a)}function o(a){return i.parser.defined.includes(Pr(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function r(a){return n(a)}}function L6e(t,e,n){return i;function i(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),s}function s(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),e):n(o)}}const O6e={name:"labelStartImage",tokenize:D6e,resolveAll:v8.resolveAll};function D6e(t,e,n){const i=this;return s;function s(a){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(a),t.exit("labelImageMarker"),o}function o(a){return a===91?(t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelImage"),r):n(a)}function r(a){return a===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(a):e(a)}}const R6e={name:"labelStartLink",tokenize:V6e,resolveAll:v8.resolveAll};function V6e(t,e,n){const i=this;return s;function s(r){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(r),t.exit("labelMarker"),t.exit("labelLink"),o}function o(r){return r===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(r):e(r)}}const xw={name:"lineEnding",tokenize:F6e};function F6e(t,e){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),mn(t,e,"linePrefix")}}const T0={name:"thematicBreak",tokenize:N6e};function N6e(t,e,n){let i=0,s;return o;function o(c){return t.enter("thematicBreak"),r(c)}function r(c){return s=c,a(c)}function a(c){return c===s?(t.enter("thematicBreakSequence"),l(c)):i>=3&&(c===null||Et(c))?(t.exit("thematicBreak"),e(c)):n(c)}function l(c){return c===s?(t.consume(c),i++,l):(t.exit("thematicBreakSequence"),cn(c)?mn(t,a,"whitespace")(c):a(c))}}const Zi={name:"list",tokenize:H6e,continuation:{tokenize:U6e},exit:W6e},B6e={tokenize:Y6e,partial:!0},z6e={tokenize:j6e,partial:!0};function H6e(t,e,n){const i=this,s=i.events[i.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,r=0;return a;function a(f){const p=i.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!i.containerState.marker||f===i.containerState.marker:f6(f)){if(i.containerState.type||(i.containerState.type=p,t.enter(p,{_container:!0})),p==="listUnordered")return t.enter("listItemPrefix"),f===42||f===45?t.check(T0,n,c)(f):c(f);if(!i.interrupt||f===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(f)}return n(f)}function l(f){return f6(f)&&++r<10?(t.consume(f),l):(!i.interrupt||r<2)&&(i.containerState.marker?f===i.containerState.marker:f===41||f===46)?(t.exit("listItemValue"),c(f)):n(f)}function c(f){return t.enter("listItemMarker"),t.consume(f),t.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||f,t.check(O1,i.interrupt?n:u,t.attempt(B6e,h,d))}function u(f){return i.containerState.initialBlankLine=!0,o++,h(f)}function d(f){return cn(f)?(t.enter("listItemPrefixWhitespace"),t.consume(f),t.exit("listItemPrefixWhitespace"),h):n(f)}function h(f){return i.containerState.size=o+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(f)}}function U6e(t,e,n){const i=this;return i.containerState._closeFlow=void 0,t.check(O1,s,o);function s(a){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,mn(t,e,"listItemIndent",i.containerState.size+1)(a)}function o(a){return i.containerState.furtherBlankLines||!cn(a)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,r(a)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(z6e,e,r)(a))}function r(a){return i.containerState._closeFlow=!0,i.interrupt=void 0,mn(t,t.attempt(Zi,e,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function j6e(t,e,n){const i=this;return mn(t,s,"listItemIndent",i.containerState.size+1);function s(o){const r=i.events[i.events.length-1];return r&&r[1].type==="listItemIndent"&&r[2].sliceSerialize(r[1],!0).length===i.containerState.size?e(o):n(o)}}function W6e(t){t.exit(this.containerState.type)}function Y6e(t,e,n){const i=this;return mn(t,s,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function s(o){const r=i.events[i.events.length-1];return!cn(o)&&r&&r[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}const YA={name:"setextUnderline",tokenize:G6e,resolveTo:q6e};function q6e(t,e){let n=t.length,i,s,o;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){i=n;break}t[n][1].type==="paragraph"&&(s=n)}else t[n][1].type==="content"&&t.splice(n,1),!o&&t[n][1].type==="definition"&&(o=n);const r={type:"setextHeading",start:Object.assign({},t[s][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[s][1].type="setextHeadingText",o?(t.splice(s,0,["enter",r,e]),t.splice(o+1,0,["exit",t[i][1],e]),t[i][1].end=Object.assign({},t[o][1].end)):t[i][1]=r,t.push(["exit",r,e]),t}function G6e(t,e,n){const i=this;let s;return o;function o(c){let u=i.events.length,d;for(;u--;)if(i.events[u][1].type!=="lineEnding"&&i.events[u][1].type!=="linePrefix"&&i.events[u][1].type!=="content"){d=i.events[u][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||d)?(t.enter("setextHeadingLine"),s=c,r(c)):n(c)}function r(c){return t.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===s?(t.consume(c),a):(t.exit("setextHeadingLineSequence"),cn(c)?mn(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||Et(c)?(t.exit("setextHeadingLine"),e(c)):n(c)}}const X6e={tokenize:K6e};function K6e(t){const e=this,n=t.attempt(O1,i,t.attempt(this.parser.constructs.flowInitial,s,mn(t,t.attempt(this.parser.constructs.flow,s,t.attempt(t6e,s)),"linePrefix")));return n;function i(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function s(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const Z6e={resolveAll:DF()},J6e=OF("string"),Q6e=OF("text");function OF(t){return{tokenize:e,resolveAll:DF(t==="text"?eCe:void 0)};function e(n){const i=this,s=this.parser.constructs[t],o=n.attempt(s,r,a);return r;function r(u){return c(u)?o(u):a(u)}function a(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),o(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const d=s[u];let h=-1;if(d)for(;++h<d.length;){const f=d[h];if(!f.previous||f.previous.call(i,i.previous))return!0}return!1}}}function DF(t){return e;function e(n,i){let s=-1,o;for(;++s<=n.length;)o===void 0?n[s]&&n[s][1].type==="data"&&(o=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==o+2&&(n[o][1].end=n[s-1][1].end,n.splice(o+2,s-o-2),s=o+2),o=void 0);return t?t(n,i):n}}function eCe(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const i=t[n-1][1],s=e.sliceStream(i);let o=s.length,r=-1,a=0,l;for(;o--;){const c=s[o];if(typeof c=="string"){for(r=c.length;c.charCodeAt(r-1)===32;)a++,r--;if(r)break;r=-1}else if(c===-2)l=!0,a++;else if(c!==-1){o++;break}}if(a){const c={type:n===t.length||l||a<2?"lineSuffix":"hardBreakTrailing",start:{line:i.end.line,column:i.end.column-a,offset:i.end.offset-a,_index:i.start._index+o,_bufferIndex:o?r:i.start._bufferIndex+r},end:Object.assign({},i.end)};i.end=Object.assign({},c.start),i.start.offset===i.end.offset?Object.assign(i,c):(t.splice(n,0,["enter",c,e],["exit",c,e]),n+=2)}n++}return t}function tCe(t,e,n){let i=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const s={},o=[];let r=[],a=[];const l={consume:k,enter:C,exit:$,attempt:P(x),check:P(M),interrupt:P(M,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:t,sliceStream:f,sliceSerialize:h,now:p,defineSkip:m,write:d};let u=e.tokenize.call(c,l);return e.resolveAll&&o.push(e),c;function d(R){return r=Jo(r,R),y(),r[r.length-1]!==null?[]:(T(e,0),c.events=Hb(o,c.events,c),c.events)}function h(R,V){return sCe(f(R),V)}function f(R){return nCe(r,R)}function p(){const{line:R,column:V,offset:H,_index:F,_bufferIndex:z}=i;return{line:R,column:V,offset:H,_index:F,_bufferIndex:z}}function m(R){s[R.line]=R.column,L()}function y(){let R;for(;i._index<r.length;){const V=r[i._index];if(typeof V=="string")for(R=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===R&&i._bufferIndex<V.length;)b(V.charCodeAt(i._bufferIndex));else b(V)}}function b(R){u=u(R)}function k(R){Et(R)?(i.line++,i.column=1,i.offset+=R===-3?2:1,L()):R!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===r[i._index].length&&(i._bufferIndex=-1,i._index++)),c.previous=R}function C(R,V){const H=V||{};return H.type=R,H.start=p(),c.events.push(["enter",H,c]),a.push(H),H}function $(R){const V=a.pop();return V.end=p(),c.events.push(["exit",V,c]),V}function x(R,V){T(R,V.from)}function M(R,V){V.restore()}function P(R,V){return H;function H(F,z,N){let q,K,X,U;return Array.isArray(F)?ne(F):"tokenize"in F?ne([F]):Q(F);function Q(we){return oe;function oe(fe){const ie=fe!==null&&we[fe],re=fe!==null&&we.null,ke=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(re)?re:re?[re]:[]];return ne(ke)(fe)}}function ne(we){return q=we,K=0,we.length===0?N:Z(we[K])}function Z(we){return oe;function oe(fe){return U=I(),X=we,we.partial||(c.currentConstruct=we),we.name&&c.parser.constructs.disable.null.includes(we.name)?me():we.tokenize.call(V?Object.assign(Object.create(c),V):c,l,ae,me)(fe)}}function ae(we){return R(X,U),z}function me(we){return U.restore(),++K<q.length?Z(q[K]):N}}}function T(R,V){R.resolveAll&&!o.includes(R)&&o.push(R),R.resolve&&rr(c.events,V,c.events.length-V,R.resolve(c.events.slice(V),c)),R.resolveTo&&(c.events=R.resolveTo(c.events,c))}function I(){const R=p(),V=c.previous,H=c.currentConstruct,F=c.events.length,z=Array.from(a);return{restore:N,from:F};function N(){i=R,c.previous=V,c.currentConstruct=H,c.events.length=F,a=z,L()}}function L(){i.line in s&&i.column<2&&(i.column=s[i.line],i.offset+=s[i.line]-1)}}function nCe(t,e){const n=e.start._index,i=e.start._bufferIndex,s=e.end._index,o=e.end._bufferIndex;let r;if(n===s)r=[t[n].slice(i,o)];else{if(r=t.slice(n,s),i>-1){const a=r[0];typeof a=="string"?r[0]=a.slice(i):r.shift()}o>0&&r.push(t[s].slice(0,o))}return r}function sCe(t,e){let n=-1;const i=[];let s;for(;++n<t.length;){const o=t[n];let r;if(typeof o=="string")r=o;else switch(o){case-5:{r="\r";break}case-4:{r=`
`;break}case-3:{r=`\r
`;break}case-2:{r=e?" ":"	";break}case-1:{if(!e&&s)continue;r=" ";break}default:r=String.fromCharCode(o)}s=o===-2,i.push(r)}return i.join("")}const iCe={42:Zi,43:Zi,45:Zi,48:Zi,49:Zi,50:Zi,51:Zi,52:Zi,53:Zi,54:Zi,55:Zi,56:Zi,57:Zi,62:AF},oCe={91:r6e},rCe={[-2]:Cw,[-1]:Cw,32:Cw},aCe={35:h6e,42:T0,45:[YA,T0],60:g6e,61:YA,95:T0,96:jA,126:jA},lCe={38:MF,92:EF},cCe={[-5]:xw,[-4]:xw,[-3]:xw,33:O6e,38:MF,42:p6,60:[Rke,C6e],91:R6e,92:[u6e,EF],93:v8,95:p6,96:Xke},uCe={null:[p6,Z6e]},dCe={null:[42,95]},hCe={null:[]},fCe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:dCe,contentInitial:oCe,disable:hCe,document:iCe,flow:aCe,flowInitial:rCe,insideSpan:uCe,string:lCe,text:cCe},Symbol.toStringTag,{value:"Module"}));function pCe(t){const n=SF([fCe,...(t||{}).extensions||[]]),i={defined:[],lazy:{},constructs:n,content:s(Mke),document:s(Pke),flow:s(X6e),string:s(J6e),text:s(Q6e)};return i;function s(o){return r;function r(a){return tCe(i,o,a)}}}function mCe(t){for(;!TF(t););return t}const qA=/[\0\t\n\r]/g;function gCe(){let t=1,e="",n=!0,i;return s;function s(o,r,a){const l=[];let c,u,d,h,f;for(o=e+(typeof o=="string"?o.toString():new TextDecoder(r||void 0).decode(o)),d=0,e="",n&&(o.charCodeAt(0)===65279&&d++,n=void 0);d<o.length;){if(qA.lastIndex=d,c=qA.exec(o),h=c&&c.index!==void 0?c.index:o.length,f=o.charCodeAt(h),!c){e=o.slice(d);break}if(f===10&&d===h&&i)l.push(-3),i=void 0;else switch(i&&(l.push(-5),i=void 0),d<h&&(l.push(o.slice(d,h)),t+=h-d),f){case 0:{l.push(65533),t++;break}case 9:{for(u=Math.ceil(t/4)*4,l.push(-2);t++<u;)l.push(-1);break}case 10:{l.push(-4),t=1;break}default:i=!0,t=1}d=h+1}return a&&(i&&l.push(-5),e&&l.push(e),l.push(null)),l}}const vCe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function RF(t){return t.replace(vCe,_Ce)}function _Ce(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return $F(n.slice(o?2:1),o?16:10)}return g8(n)||t}function qm(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?GA(t.position):"start"in t||"end"in t?GA(t):"line"in t||"column"in t?m6(t):""}function m6(t){return XA(t&&t.line)+":"+XA(t&&t.column)}function GA(t){return m6(t&&t.start)+"-"+m6(t&&t.end)}function XA(t){return t&&typeof t=="number"?t:1}const VF={}.hasOwnProperty;function yCe(t,e,n){return typeof e!="string"&&(n=e,e=void 0),bCe(n)(mCe(pCe(n).document().write(gCe()(t,e,!0))))}function bCe(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ye),autolinkProtocol:I,autolinkEmail:I,atxHeading:o(ve),blockQuote:o(re),characterEscape:I,characterReference:I,codeFenced:o(ke),codeFencedFenceInfo:r,codeFencedFenceMeta:r,codeIndented:o(ke,r),codeText:o(je,r),codeTextData:I,data:I,codeFlowValue:I,definition:o(te),definitionDestinationString:r,definitionLabelString:r,definitionTitleString:r,emphasis:o(se),hardBreakEscape:o($e),hardBreakTrailing:o($e),htmlFlow:o(Se,r),htmlFlowData:I,htmlText:o(Se,r),htmlTextData:I,image:o(Fe),label:r,link:o(Ye),listItem:o(He),listItemValue:h,listOrdered:o(Re,d),listUnordered:o(Re),paragraph:o(Me),reference:Z,referenceString:r,resourceDestinationString:r,resourceTitleString:r,setextHeading:o(ve),strong:o(Ne),thematicBreak:o(it)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:ie,autolinkProtocol:fe,blockQuote:l(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:we,characterReference:oe,codeFenced:l(y),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:L,codeIndented:l(b),codeText:l(z),codeTextData:L,data:L,definition:l(),definitionDestinationString:$,definitionLabelString:k,definitionTitleString:C,emphasis:l(),hardBreakEscape:l(V),hardBreakTrailing:l(V),htmlFlow:l(H),htmlFlowData:L,htmlText:l(F),htmlTextData:L,image:l(q),label:X,labelText:K,lineEnding:R,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ae,resourceDestinationString:U,resourceTitleString:Q,resource:ne,setextHeading:l(T),setextHeadingLineSequence:P,setextHeadingText:M,strong:l(),thematicBreak:l()}};FF(e,(t||{}).mdastExtensions||[]);const n={};return i;function i(ye){let ge={type:"root",children:[]};const Pe={stack:[ge],tokenStack:[],config:e,enter:a,exit:c,buffer:r,resume:u,data:n},Ie=[];let ht=-1;for(;++ht<ye.length;)if(ye[ht][1].type==="listOrdered"||ye[ht][1].type==="listUnordered")if(ye[ht][0]==="enter")Ie.push(ht);else{const Bt=Ie.pop();ht=s(ye,Bt,ht)}for(ht=-1;++ht<ye.length;){const Bt=e[ye[ht][0]];VF.call(Bt,ye[ht][1].type)&&Bt[ye[ht][1].type].call(Object.assign({sliceSerialize:ye[ht][2].sliceSerialize},Pe),ye[ht][1])}if(Pe.tokenStack.length>0){const Bt=Pe.tokenStack[Pe.tokenStack.length-1];(Bt[1]||KA).call(Pe,void 0,Bt[0])}for(ge.position={start:Ml(ye.length>0?ye[0][1].start:{line:1,column:1,offset:0}),end:Ml(ye.length>0?ye[ye.length-2][1].end:{line:1,column:1,offset:0})},ht=-1;++ht<e.transforms.length;)ge=e.transforms[ht](ge)||ge;return ge}function s(ye,ge,Pe){let Ie=ge-1,ht=-1,Bt=!1,Qe,kt,pt,_e;for(;++Ie<=Pe;){const Le=ye[Ie];switch(Le[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Le[0]==="enter"?ht++:ht--,_e=void 0;break}case"lineEndingBlank":{Le[0]==="enter"&&(Qe&&!_e&&!ht&&!pt&&(pt=Ie),_e=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:_e=void 0}if(!ht&&Le[0]==="enter"&&Le[1].type==="listItemPrefix"||ht===-1&&Le[0]==="exit"&&(Le[1].type==="listUnordered"||Le[1].type==="listOrdered")){if(Qe){let ue=Ie;for(kt=void 0;ue--;){const Oe=ye[ue];if(Oe[1].type==="lineEnding"||Oe[1].type==="lineEndingBlank"){if(Oe[0]==="exit")continue;kt&&(ye[kt][1].type="lineEndingBlank",Bt=!0),Oe[1].type="lineEnding",kt=ue}else if(!(Oe[1].type==="linePrefix"||Oe[1].type==="blockQuotePrefix"||Oe[1].type==="blockQuotePrefixWhitespace"||Oe[1].type==="blockQuoteMarker"||Oe[1].type==="listItemIndent"))break}pt&&(!kt||pt<kt)&&(Qe._spread=!0),Qe.end=Object.assign({},kt?ye[kt][1].start:Le[1].end),ye.splice(kt||Ie,0,["exit",Qe,Le[2]]),Ie++,Pe++}if(Le[1].type==="listItemPrefix"){const ue={type:"listItem",_spread:!1,start:Object.assign({},Le[1].start),end:void 0};Qe=ue,ye.splice(Ie,0,["enter",ue,Le[2]]),Ie++,Pe++,pt=void 0,_e=!0}}}return ye[ge][1]._spread=Bt,Pe}function o(ye,ge){return Pe;function Pe(Ie){a.call(this,ye(Ie),Ie),ge&&ge.call(this,Ie)}}function r(){this.stack.push({type:"fragment",children:[]})}function a(ye,ge,Pe){this.stack[this.stack.length-1].children.push(ye),this.stack.push(ye),this.tokenStack.push([ge,Pe]),ye.position={start:Ml(ge.start),end:void 0}}function l(ye){return ge;function ge(Pe){ye&&ye.call(this,Pe),c.call(this,Pe)}}function c(ye,ge){const Pe=this.stack.pop(),Ie=this.tokenStack.pop();if(Ie)Ie[0].type!==ye.type&&(ge?ge.call(this,ye,Ie[0]):(Ie[1]||KA).call(this,ye,Ie[0]));else throw new Error("Cannot close `"+ye.type+"` ("+qm({start:ye.start,end:ye.end})+"): it’s not open");Pe.position.end=Ml(ye.end)}function u(){return m8(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(ye){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(ye),10),this.data.expectingFirstListItemValue=void 0}}function f(){const ye=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=ye}function p(){const ye=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=ye}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const ye=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ye.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const ye=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ye.replace(/(\r?\n|\r)$/g,"")}function k(ye){const ge=this.resume(),Pe=this.stack[this.stack.length-1];Pe.label=ge,Pe.identifier=Pr(this.sliceSerialize(ye)).toLowerCase()}function C(){const ye=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ye}function $(){const ye=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ye}function x(ye){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Pe=this.sliceSerialize(ye).length;ge.depth=Pe}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function P(ye){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(ye).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function I(ye){const Pe=this.stack[this.stack.length-1].children;let Ie=Pe[Pe.length-1];(!Ie||Ie.type!=="text")&&(Ie=st(),Ie.position={start:Ml(ye.start),end:void 0},Pe.push(Ie)),this.stack.push(Ie)}function L(ye){const ge=this.stack.pop();ge.value+=this.sliceSerialize(ye),ge.position.end=Ml(ye.end)}function R(ye){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Pe=ge.children[ge.children.length-1];Pe.position.end=Ml(ye.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(ge.type)&&(I.call(this,ye),L.call(this,ye))}function V(){this.data.atHardBreak=!0}function H(){const ye=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ye}function F(){const ye=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ye}function z(){const ye=this.resume(),ge=this.stack[this.stack.length-1];ge.value=ye}function N(){const ye=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ye.type+="Reference",ye.referenceType=ge,delete ye.url,delete ye.title}else delete ye.identifier,delete ye.label;this.data.referenceType=void 0}function q(){const ye=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";ye.type+="Reference",ye.referenceType=ge,delete ye.url,delete ye.title}else delete ye.identifier,delete ye.label;this.data.referenceType=void 0}function K(ye){const ge=this.sliceSerialize(ye),Pe=this.stack[this.stack.length-2];Pe.label=RF(ge),Pe.identifier=Pr(ge).toLowerCase()}function X(){const ye=this.stack[this.stack.length-1],ge=this.resume(),Pe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Pe.type==="link"){const Ie=ye.children;Pe.children=Ie}else Pe.alt=ge}function U(){const ye=this.resume(),ge=this.stack[this.stack.length-1];ge.url=ye}function Q(){const ye=this.resume(),ge=this.stack[this.stack.length-1];ge.title=ye}function ne(){this.data.inReference=void 0}function Z(){this.data.referenceType="collapsed"}function ae(ye){const ge=this.resume(),Pe=this.stack[this.stack.length-1];Pe.label=ge,Pe.identifier=Pr(this.sliceSerialize(ye)).toLowerCase(),this.data.referenceType="full"}function me(ye){this.data.characterReferenceType=ye.type}function we(ye){const ge=this.sliceSerialize(ye),Pe=this.data.characterReferenceType;let Ie;Pe?(Ie=$F(ge,Pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ie=g8(ge);const ht=this.stack[this.stack.length-1];ht.value+=Ie}function oe(ye){const ge=this.stack.pop();ge.position.end=Ml(ye.end)}function fe(ye){L.call(this,ye);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(ye)}function ie(ye){L.call(this,ye);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(ye)}function re(){return{type:"blockquote",children:[]}}function ke(){return{type:"code",lang:null,meta:null,value:""}}function je(){return{type:"inlineCode",value:""}}function te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function se(){return{type:"emphasis",children:[]}}function ve(){return{type:"heading",depth:0,children:[]}}function $e(){return{type:"break"}}function Se(){return{type:"html",value:""}}function Fe(){return{type:"image",title:null,url:"",alt:null}}function Ye(){return{type:"link",title:null,url:"",children:[]}}function Re(ye){return{type:"list",ordered:ye.type==="listOrdered",start:null,spread:ye._spread,children:[]}}function He(ye){return{type:"listItem",spread:ye._spread,checked:null,children:[]}}function Me(){return{type:"paragraph",children:[]}}function Ne(){return{type:"strong",children:[]}}function st(){return{type:"text",value:""}}function it(){return{type:"thematicBreak"}}}function Ml(t){return{line:t.line,column:t.column,offset:t.offset}}function FF(t,e){let n=-1;for(;++n<e.length;){const i=e[n];Array.isArray(i)?FF(t,i):wCe(t,i)}}function wCe(t,e){let n;for(n in e)if(VF.call(e,n))switch(n){case"canContainEols":{const i=e[n];i&&t[n].push(...i);break}case"transforms":{const i=e[n];i&&t[n].push(...i);break}case"enter":case"exit":{const i=e[n];i&&Object.assign(t[n],i);break}}}function KA(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+qm({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+qm({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+qm({start:e.start,end:e.end})+") is still open")}function g6(t){const e=this;e.parser=n;function n(i){return yCe(i,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}const ZA={}.hasOwnProperty;function kCe(t,e){const n=e||{};function i(s,...o){let r=i.invalid;const a=i.handlers;if(s&&ZA.call(s,t)){const l=String(s[t]);r=ZA.call(a,l)?a[l]:i.unknown}if(r)return r.call(this,s,...o)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}const CCe={}.hasOwnProperty;function NF(t,e){let n=-1,i;if(e.extensions)for(;++n<e.extensions.length;)NF(t,e.extensions[n]);for(i in e)if(CCe.call(e,i))switch(i){case"extensions":break;case"unsafe":{JA(t[i],e[i]);break}case"join":{JA(t[i],e[i]);break}case"handlers":{xCe(t[i],e[i]);break}default:t.options[i]=e[i]}return t}function JA(t,e){e&&t.push(...e)}function xCe(t,e){e&&Object.assign(t,e)}function SCe(t,e,n,i){const s=n.enter("blockquote"),o=n.createTracker(i);o.move("> "),o.shift(2);const r=n.indentLines(n.containerFlow(t,o.current()),$Ce);return s(),r}function $Ce(t,e,n){return">"+(n?"":" ")+t}function BF(t,e){return QA(t,e.inConstruct,!0)&&!QA(t,e.notInConstruct,!1)}function QA(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let i=-1;for(;++i<e.length;)if(t.includes(e[i]))return!0;return!1}function eE(t,e,n,i){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
`&&BF(n.stack,n.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\
`}function ACe(t,e){const n=String(t);let i=n.indexOf(e),s=i,o=0,r=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===s?++o>r&&(r=o):o=1,s=i+e.length,i=n.indexOf(e,s);return r}function v6(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function ECe(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function MCe(t,e,n,i){const s=ECe(n),o=t.value||"",r=s==="`"?"GraveAccent":"Tilde";if(v6(t,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,TCe);return d(),h}const a=n.createTracker(i),l=s.repeat(Math.max(ACe(o,s)+1,3)),c=n.enter("codeFenced");let u=a.move(l);if(t.lang){const d=n.enter(`codeFencedLang${r}`);u+=a.move(n.safe(t.lang,{before:u,after:" ",encode:["`"],...a.current()})),d()}if(t.lang&&t.meta){const d=n.enter(`codeFencedMeta${r}`);u+=a.move(" "),u+=a.move(n.safe(t.meta,{before:u,after:`
`,encode:["`"],...a.current()})),d()}return u+=a.move(`
`),o&&(u+=a.move(o+`
`)),u+=a.move(l),c(),u}function TCe(t,e,n){return(n?"":"    ")+t}function _8(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function PCe(t,e,n,i){const s=_8(n),o=s==='"'?"Quote":"Apostrophe",r=n.enter("definition");let a=n.enter("label");const l=n.createTracker(i);let c=l.move("[");return c+=l.move(n.safe(n.associationId(t),{before:c,after:"]",...l.current()})),c+=l.move("]: "),a(),!t.url||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(t.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(t.url,{before:c,after:t.title?" ":`
`,...l.current()}))),a(),t.title&&(a=n.enter(`title${o}`),c+=l.move(" "+s),c+=l.move(n.safe(t.title,{before:c,after:s,...l.current()})),c+=l.move(s),a()),r(),c}function ICe(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}zF.peek=LCe;function zF(t,e,n,i){const s=ICe(n),o=n.enter("emphasis"),r=n.createTracker(i);let a=r.move(s);return a+=r.move(n.containerPhrasing(t,{before:a,after:s,...r.current()})),a+=r.move(s),o(),a}function LCe(t,e,n){return n.options.emphasis||"*"}const Ub=function(t){if(t==null)return VCe;if(typeof t=="function")return jb(t);if(typeof t=="object")return Array.isArray(t)?OCe(t):DCe(t);if(typeof t=="string")return RCe(t);throw new Error("Expected function, string, or object as test")};function OCe(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=Ub(t[n]);return jb(i);function i(...s){let o=-1;for(;++o<e.length;)if(e[o].apply(this,s))return!0;return!1}}function DCe(t){const e=t;return jb(n);function n(i){const s=i;let o;for(o in t)if(s[o]!==e[o])return!1;return!0}}function RCe(t){return jb(e);function e(n){return n&&n.type===t}}function jb(t){return e;function e(n,i,s){return!!(FCe(n)&&t.call(this,n,typeof i=="number"?i:void 0,s||void 0))}}function VCe(){return!0}function FCe(t){return t!==null&&typeof t=="object"&&"type"in t}const HF=[],NCe=!0,_6=!1,y6="skip";function UF(t,e,n,i){let s;typeof e=="function"&&typeof n!="function"?(i=n,n=e):s=e;const o=Ub(s),r=i?-1:1;a(t,void 0,[])();function a(l,c,u){const d=l&&typeof l=="object"?l:{};if(typeof d.type=="string"){const f=typeof d.tagName=="string"?d.tagName:typeof d.name=="string"?d.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(l.type+(f?"<"+f+">":""))+")"})}return h;function h(){let f=HF,p,m,y;if((!e||o(l,c,u[u.length-1]||void 0))&&(f=BCe(n(l,u)),f[0]===_6))return f;if("children"in l&&l.children){const b=l;if(b.children&&f[0]!==y6)for(m=(i?b.children.length:-1)+r,y=u.concat(b);m>-1&&m<b.children.length;){const k=b.children[m];if(p=a(k,m,y)(),p[0]===_6)return p;m=typeof p[1]=="number"?p[1]:m+r}}return f}}}function BCe(t){return Array.isArray(t)?t:typeof t=="number"?[NCe,t]:t==null?HF:[t]}function Vd(t,e,n,i){let s,o,r;typeof e=="function"&&typeof n!="function"?(o=void 0,r=e,s=n):(o=e,r=n,s=i),UF(t,o,a,s);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return r(l,d,u)}}function jF(t,e){let n=!1;return Vd(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,_6}),!!((!t.depth||t.depth<3)&&m8(t)&&(e.options.setext||n))}function zCe(t,e,n,i){const s=Math.max(Math.min(6,t.depth||1),1),o=n.createTracker(i);if(jF(t,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(t,{...o.current(),before:`
`,after:`
`});return d(),u(),h+`
`+(s===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
`))+1))}const r="#".repeat(s),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(r+" ");let c=n.containerPhrasing(t,{before:"# ",after:`
`,...o.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?r+" "+c:r,n.options.closeAtx&&(c+=" "+r),l(),a(),c}WF.peek=HCe;function WF(t){return t.value||""}function HCe(){return"<"}YF.peek=UCe;function YF(t,e,n,i){const s=_8(n),o=s==='"'?"Quote":"Apostrophe",r=n.enter("image");let a=n.enter("label");const l=n.createTracker(i);let c=l.move("![");return c+=l.move(n.safe(t.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),a(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(a=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(t.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(a=n.enter("destinationRaw"),c+=l.move(n.safe(t.url,{before:c,after:t.title?" ":")",...l.current()}))),a(),t.title&&(a=n.enter(`title${o}`),c+=l.move(" "+s),c+=l.move(n.safe(t.title,{before:c,after:s,...l.current()})),c+=l.move(s),a()),c+=l.move(")"),r(),c}function UCe(){return"!"}qF.peek=jCe;function qF(t,e,n,i){const s=t.referenceType,o=n.enter("imageReference");let r=n.enter("label");const a=n.createTracker(i);let l=a.move("![");const c=n.safe(t.alt,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),r();const u=n.stack;n.stack=[],r=n.enter("reference");const d=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return r(),n.stack=u,o(),s==="full"||!c||c!==d?l+=a.move(d+"]"):s==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function jCe(){return"!"}GF.peek=WCe;function GF(t,e,n){let i=t.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(i);)s+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++o<n.unsafe.length;){const r=n.unsafe[o],a=n.compilePattern(r);let l;if(r.atBreak)for(;l=a.exec(i);){let c=l.index;i.charCodeAt(c)===10&&i.charCodeAt(c-1)===13&&c--,i=i.slice(0,c)+" "+i.slice(l.index+1)}}return s+i+s}function WCe(){return"`"}function XF(t,e){const n=m8(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}KF.peek=YCe;function KF(t,e,n,i){const s=_8(n),o=s==='"'?"Quote":"Apostrophe",r=n.createTracker(i);let a,l;if(XF(t,n)){const u=n.stack;n.stack=[],a=n.enter("autolink");let d=r.move("<");return d+=r.move(n.containerPhrasing(t,{before:d,after:">",...r.current()})),d+=r.move(">"),a(),n.stack=u,d}a=n.enter("link"),l=n.enter("label");let c=r.move("[");return c+=r.move(n.containerPhrasing(t,{before:c,after:"](",...r.current()})),c+=r.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=n.enter("destinationLiteral"),c+=r.move("<"),c+=r.move(n.safe(t.url,{before:c,after:">",...r.current()})),c+=r.move(">")):(l=n.enter("destinationRaw"),c+=r.move(n.safe(t.url,{before:c,after:t.title?" ":")",...r.current()}))),l(),t.title&&(l=n.enter(`title${o}`),c+=r.move(" "+s),c+=r.move(n.safe(t.title,{before:c,after:s,...r.current()})),c+=r.move(s),l()),c+=r.move(")"),a(),c}function YCe(t,e,n){return XF(t,n)?"<":"["}ZF.peek=qCe;function ZF(t,e,n,i){const s=t.referenceType,o=n.enter("linkReference");let r=n.enter("label");const a=n.createTracker(i);let l=a.move("[");const c=n.containerPhrasing(t,{before:l,after:"]",...a.current()});l+=a.move(c+"]["),r();const u=n.stack;n.stack=[],r=n.enter("reference");const d=n.safe(n.associationId(t),{before:l,after:"]",...a.current()});return r(),n.stack=u,o(),s==="full"||!c||c!==d?l+=a.move(d+"]"):s==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function qCe(){return"["}function y8(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function GCe(t){const e=y8(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function XCe(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function JF(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function KCe(t,e,n,i){const s=n.enter("list"),o=n.bulletCurrent;let r=t.ordered?XCe(n):y8(n);const a=t.ordered?r==="."?")":".":GCe(n);let l=e&&n.bulletLastUsed?r===n.bulletLastUsed:!1;if(!t.ordered){const u=t.children?t.children[0]:void 0;if((r==="*"||r==="-")&&u&&(!u.children||!u.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),JF(n)===r&&u){let d=-1;for(;++d<t.children.length;){const h=t.children[d];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(r=a),n.bulletCurrent=r;const c=n.containerFlow(t,i);return n.bulletLastUsed=r,n.bulletCurrent=o,s(),c}function ZCe(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function JCe(t,e,n,i){const s=ZCe(n);let o=n.bulletCurrent||y8(n);e&&e.type==="list"&&e.ordered&&(o=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+o);let r=o.length+1;(s==="tab"||s==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(r=Math.ceil(r/4)*4);const a=n.createTracker(i);a.move(o+" ".repeat(r-o.length)),a.shift(r);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(t,a.current()),u);return l(),c;function u(d,h,f){return h?(f?"":" ".repeat(r))+d:(f?o:o+" ".repeat(r-o.length))+d}}function QCe(t,e,n,i){const s=n.enter("paragraph"),o=n.enter("phrasing"),r=n.containerPhrasing(t,i);return o(),s(),r}const exe=Ub(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function txe(t,e,n,i){return(t.children.some(function(r){return exe(r)})?n.containerPhrasing:n.containerFlow).call(n,t,i)}function nxe(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}QF.peek=sxe;function QF(t,e,n,i){const s=nxe(n),o=n.enter("strong"),r=n.createTracker(i);let a=r.move(s+s);return a+=r.move(n.containerPhrasing(t,{before:a,after:s,...r.current()})),a+=r.move(s+s),o(),a}function sxe(t,e,n){return n.options.strong||"*"}function ixe(t,e,n,i){return n.safe(t.value,i)}function oxe(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function rxe(t,e,n){const i=(JF(n)+(n.options.ruleSpaces?" ":"")).repeat(oxe(n));return n.options.ruleSpaces?i.slice(0,-1):i}const b8={blockquote:SCe,break:eE,code:MCe,definition:PCe,emphasis:zF,hardBreak:eE,heading:zCe,html:WF,image:YF,imageReference:qF,inlineCode:GF,link:KF,linkReference:ZF,list:KCe,listItem:JCe,paragraph:QCe,root:txe,strong:QF,text:ixe,thematicBreak:rxe},axe=[lxe];function lxe(t,e,n,i){if(e.type==="code"&&v6(e,i)&&(t.type==="list"||t.type===e.type&&v6(t,i)))return!1;if("spread"in n&&typeof n.spread=="boolean")return t.type==="paragraph"&&(t.type===e.type||e.type==="definition"||e.type==="heading"&&jF(e,i))?void 0:n.spread?1:0}const iu=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],cxe=[{character:"	",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"	",before:"[\\r\\n]",inConstruct:"phrasing"},{character:"	",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:iu},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:iu},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ 	\r
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:iu},{atBreak:!0,character:"+",after:`(?:[ 	\r
])`},{atBreak:!0,character:"-",after:`(?:[ 	\r
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ 	\r
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:iu},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:iu},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:iu},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:iu},{atBreak:!0,character:"~"}];function uxe(t){return t.label||!t.identifier?t.label||"":RF(t.identifier)}function dxe(t){if(!t._compiled){const e=(t.atBreak?"[\\r\\n][\\t ]*":"")+(t.before?"(?:"+t.before+")":"");t._compiled=new RegExp((e?"("+e+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(t.character)?"\\":"")+t.character+(t.after?"(?:"+t.after+")":""),"g")}return t._compiled}function hxe(t,e,n){const i=e.indexStack,s=t.children||[],o=[];let r=-1,a=n.before;i.push(-1);let l=e.createTracker(n);for(;++r<s.length;){const c=s[r];let u;if(i[i.length-1]=r,r+1<s.length){let d=e.handle.handlers[s[r+1].type];d&&d.peek&&(d=d.peek),u=d?d(s[r+1],t,e,{before:"",after:"",...l.current()}).charAt(0):""}else u=n.after;o.length>0&&(a==="\r"||a===`
`)&&c.type==="html"&&(o[o.length-1]=o[o.length-1].replace(/(\r?\n|\r)$/," "),a=" ",l=e.createTracker(n),l.move(o.join(""))),o.push(l.move(e.handle(c,t,e,{...l.current(),before:a,after:u}))),a=o[o.length-1].slice(-1)}return i.pop(),o.join("")}function fxe(t,e,n){const i=e.indexStack,s=t.children||[],o=e.createTracker(n),r=[];let a=-1;for(i.push(-1);++a<s.length;){const l=s[a];i[i.length-1]=a,r.push(o.move(e.handle(l,t,e,{before:`
`,after:`
`,...o.current()}))),l.type!=="list"&&(e.bulletLastUsed=void 0),a<s.length-1&&r.push(o.move(pxe(l,s[a+1],t,e)))}return i.pop(),r.join("")}function pxe(t,e,n,i){let s=i.join.length;for(;s--;){const o=i.join[s](t,e,n,i);if(o===!0||o===1)break;if(typeof o=="number")return`
`.repeat(1+o);if(o===!1)return`

<!---->

`}return`

`}const mxe=/\r?\n|\r/g;function gxe(t,e){const n=[];let i=0,s=0,o;for(;o=mxe.exec(t);)r(t.slice(i,o.index)),n.push(o[0]),i=o.index+o[0].length,s++;return r(t.slice(i)),n.join("");function r(a){n.push(e(a,s,!a))}}function vxe(t,e,n){const i=(n.before||"")+(e||"")+(n.after||""),s=[],o=[],r={};let a=-1;for(;++a<t.unsafe.length;){const u=t.unsafe[a];if(!BF(t.stack,u))continue;const d=t.compilePattern(u);let h;for(;h=d.exec(i);){const f="before"in u||!!u.atBreak,p="after"in u,m=h.index+(f?h[1].length:0);s.includes(m)?(r[m].before&&!f&&(r[m].before=!1),r[m].after&&!p&&(r[m].after=!1)):(s.push(m),r[m]={before:f,after:p})}}s.sort(_xe);let l=n.before?n.before.length:0;const c=i.length-(n.after?n.after.length:0);for(a=-1;++a<s.length;){const u=s[a];u<l||u>=c||u+1<c&&s[a+1]===u+1&&r[u].after&&!r[u+1].before&&!r[u+1].after||s[a-1]===u-1&&r[u].before&&!r[u-1].before&&!r[u-1].after||(l!==u&&o.push(tE(i.slice(l,u),"\\")),l=u,/[!-/:-@[-`{-~]/.test(i.charAt(u))&&(!n.encode||!n.encode.includes(i.charAt(u)))?o.push("\\"):(o.push("&#x"+i.charCodeAt(u).toString(16).toUpperCase()+";"),l++))}return o.push(tE(i.slice(l,c),n.after)),o.join("")}function _xe(t,e){return t-e}function tE(t,e){const n=/\\(?=[!-/:-@[-`{-~])/g,i=[],s=[],o=t+e;let r=-1,a=0,l;for(;l=n.exec(o);)i.push(l.index);for(;++r<i.length;)a!==i[r]&&s.push(t.slice(a,i[r])),s.push("\\"),a=i[r];return s.push(t.slice(a)),s.join("")}function yxe(t){const e=t||{},n=e.now||{};let i=e.lineShift||0,s=n.line||1,o=n.column||1;return{move:l,current:r,shift:a};function r(){return{now:{line:s,column:o},lineShift:i}}function a(c){i+=c}function l(c){const u=c||"",d=u.split(/\r?\n|\r/g),h=d[d.length-1];return s+=d.length-1,o=d.length===1?o+h.length:1+h.length+i,u}}function bxe(t,e={}){const n={enter:s,indentLines:gxe,associationId:uxe,containerPhrasing:xxe,containerFlow:Sxe,createTracker:yxe,compilePattern:dxe,safe:$xe,stack:[],unsafe:[...cxe],join:[...axe],handlers:{...b8},options:{},indexStack:[],handle:void 0};NF(n,e),n.options.tightDefinitions&&n.join.push(Cxe),n.handle=kCe("type",{invalid:wxe,unknown:kxe,handlers:n.handlers});let i=n.handle(t,void 0,n,{before:`
`,after:`
`,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=`
`),i;function s(o){return n.stack.push(o),r;function r(){n.stack.pop()}}}function wxe(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function kxe(t){const e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function Cxe(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function xxe(t,e){return hxe(t,this,e)}function Sxe(t,e){return fxe(t,this,e)}function $xe(t,e){return vxe(this,t,e)}function b6(t){const e=this;e.compiler=n;function n(i){return bxe(i,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}}function nE(t){if(t)throw t}var P0=Object.prototype.hasOwnProperty,eN=Object.prototype.toString,sE=Object.defineProperty,iE=Object.getOwnPropertyDescriptor,oE=function(e){return typeof Array.isArray=="function"?Array.isArray(e):eN.call(e)==="[object Array]"},rE=function(e){if(!e||eN.call(e)!=="[object Object]")return!1;var n=P0.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&P0.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;var s;for(s in e);return typeof s>"u"||P0.call(e,s)},aE=function(e,n){sE&&n.name==="__proto__"?sE(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},lE=function(e,n){if(n==="__proto__")if(P0.call(e,n)){if(iE)return iE(e,n).value}else return;return e[n]},Axe=function t(){var e,n,i,s,o,r,a=arguments[0],l=1,c=arguments.length,u=!1;for(typeof a=="boolean"&&(u=a,a=arguments[1]||{},l=2),(a==null||typeof a!="object"&&typeof a!="function")&&(a={});l<c;++l)if(e=arguments[l],e!=null)for(n in e)i=lE(a,n),s=lE(e,n),a!==s&&(u&&s&&(rE(s)||(o=oE(s)))?(o?(o=!1,r=i&&oE(i)?i:[]):r=i&&rE(i)?i:{},aE(a,{name:n,newValue:t(u,r,s)})):typeof s<"u"&&aE(a,{name:n,newValue:s}));return a};const Sw=Ei(Axe);function w6(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Exe(){const t=[],e={run:n,use:i};return e;function n(...s){let o=-1;const r=s.pop();if(typeof r!="function")throw new TypeError("Expected function as last argument, not "+r);a(null,...s);function a(l,...c){const u=t[++o];let d=-1;if(l){r(l);return}for(;++d<s.length;)(c[d]===null||c[d]===void 0)&&(c[d]=s[d]);s=c,u?Mxe(u,a)(...c):r(null,...c)}}function i(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),e}}function Mxe(t,e){let n;return i;function i(...r){const a=t.length>r.length;let l;a&&r.push(s);try{l=t.apply(this,r)}catch(c){const u=c;if(a&&n)throw u;return s(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(o,s):l instanceof Error?s(l):o(l))}function s(r,...a){n||(n=!0,e(r,...a))}function o(r){s(null,r)}}class po extends Error{constructor(e,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let s="",o={},r=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof e=="string"?s=e:!o.cause&&e&&(r=!0,s=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof i=="string"){const l=i.indexOf(":");l===-1?o.ruleId=i:(o.source=i.slice(0,l),o.ruleId=i.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const a=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=a?a.column:void 0,this.fatal=void 0,this.file,this.message=s,this.line=a?a.line:void 0,this.name=qm(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=r&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}po.prototype.file="";po.prototype.name="";po.prototype.reason="";po.prototype.message="";po.prototype.stack="";po.prototype.column=void 0;po.prototype.line=void 0;po.prototype.ancestors=void 0;po.prototype.cause=void 0;po.prototype.fatal=void 0;po.prototype.place=void 0;po.prototype.ruleId=void 0;po.prototype.source=void 0;const ra={basename:Txe,dirname:Pxe,extname:Ixe,join:Lxe,sep:"/"};function Txe(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');D1(t);let n=0,i=-1,s=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(o){n=s+1;break}}else i<0&&(o=!0,i=s+1);return i<0?"":t.slice(n,i)}if(e===t)return"";let r=-1,a=e.length-1;for(;s--;)if(t.codePointAt(s)===47){if(o){n=s+1;break}}else r<0&&(o=!0,r=s+1),a>-1&&(t.codePointAt(s)===e.codePointAt(a--)?a<0&&(i=s):(a=-1,i=r));return n===i?i=r:i<0&&(i=t.length),t.slice(n,i)}function Pxe(t){if(D1(t),t.length===0)return".";let e=-1,n=t.length,i;for(;--n;)if(t.codePointAt(n)===47){if(i){e=n;break}}else i||(i=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function Ixe(t){D1(t);let e=t.length,n=-1,i=0,s=-1,o=0,r;for(;e--;){const a=t.codePointAt(e);if(a===47){if(r){i=e+1;break}continue}n<0&&(r=!0,n=e+1),a===46?s<0?s=e:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||n<0||o===0||o===1&&s===n-1&&s===i+1?"":t.slice(s,n)}function Lxe(...t){let e=-1,n;for(;++e<t.length;)D1(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":Oxe(n)}function Oxe(t){D1(t);const e=t.codePointAt(0)===47;let n=Dxe(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function Dxe(t,e){let n="",i=0,s=-1,o=0,r=-1,a,l;for(;++r<=t.length;){if(r<t.length)a=t.codePointAt(r);else{if(a===47)break;a=47}if(a===47){if(!(s===r-1||o===1))if(s!==r-1&&o===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",i=0):(n=n.slice(0,l),i=n.length-1-n.lastIndexOf("/")),s=r,o=0;continue}}else if(n.length>0){n="",i=0,s=r,o=0;continue}}e&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+t.slice(s+1,r):n=t.slice(s+1,r),i=r-s-1;s=r,o=0}else a===46&&o>-1?o++:o=-1}return n}function D1(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Rxe={cwd:Vxe};function Vxe(){return"/"}function k6(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Fxe(t){if(typeof t=="string")t=new URL(t);else if(!k6(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return Nxe(t)}function Nxe(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const i=e.codePointAt(n+2);if(i===70||i===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(e)}const $w=["history","path","basename","stem","extname","dirname"];class Bxe{constructor(e){let n;e?k6(e)?n={path:e}:typeof e=="string"||zxe(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":Rxe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<$w.length;){const o=$w[i];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let s;for(s in n)$w.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?ra.basename(this.path):void 0}set basename(e){Ew(e,"basename"),Aw(e,"basename"),this.path=ra.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?ra.dirname(this.path):void 0}set dirname(e){cE(this.basename,"dirname"),this.path=ra.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?ra.extname(this.path):void 0}set extname(e){if(Aw(e,"extname"),cE(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ra.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){k6(e)&&(e=Fxe(e)),Ew(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?ra.basename(this.path,this.extname):void 0}set stem(e){Ew(e,"stem"),Aw(e,"stem"),this.path=ra.join(this.dirname||"",e+(this.extname||""))}fail(e,n,i){const s=this.message(e,n,i);throw s.fatal=!0,s}info(e,n,i){const s=this.message(e,n,i);return s.fatal=void 0,s}message(e,n,i){const s=new po(e,n,i);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function Aw(t,e){if(t&&t.includes(ra.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+ra.sep+"`")}function Ew(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function cE(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function zxe(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Hxe=function(t){const i=this.constructor.prototype,s=i[t],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,i),o},Uxe={}.hasOwnProperty;class w8 extends Hxe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Exe()}copy(){const e=new w8;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];e.use(...i)}return e.data(Sw(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(Pw("data",this.frozen),this.namespace[e]=n,this):Uxe.call(this.namespace,e)&&this.namespace[e]||void 0:e?(Pw("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const s=n.call(e,...i);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=Wv(e),i=this.parser||this.Parser;return Mw("parse",i),i(String(n),n)}process(e,n){const i=this;return this.freeze(),Mw("process",this.parser||this.Parser),Tw("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,r){const a=Wv(e),l=i.parse(a);i.run(l,a,function(u,d,h){if(u||!d||!h)return c(u);const f=d,p=i.stringify(f,h);Wxe(p)?h.value=p:h.result=p,c(u,h)});function c(u,d){u||!d?r(u):o?o(d):n(void 0,d)}}}processSync(e){let n=!1,i;return this.freeze(),Mw("processSync",this.parser||this.Parser),Tw("processSync",this.compiler||this.Compiler),this.process(e,s),dE("processSync","process",n),i;function s(o,r){n=!0,nE(o),i=r}}run(e,n,i){uE(e),this.freeze();const s=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?o(void 0,i):new Promise(o);function o(r,a){const l=Wv(n);s.run(e,l,c);function c(u,d,h){const f=d||e;u?a(u):r?r(f):i(void 0,f,h)}}}runSync(e,n){let i=!1,s;return this.run(e,n,o),dE("runSync","run",i),s;function o(r,a){nE(r),s=a,i=!0}}stringify(e,n){this.freeze();const i=Wv(n),s=this.compiler||this.Compiler;return Tw("stringify",s),uE(e),s(e,i)}use(e,...n){const i=this.attachers,s=this.namespace;if(Pw("use",this.frozen),e!=null)if(typeof e=="function")l(e,n);else if(typeof e=="object")Array.isArray(e)?a(e):r(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function o(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...d]=c;l(u,d)}else r(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function r(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");a(c.plugins),c.settings&&(s.settings=Sw(!0,s.settings,c.settings))}function a(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const d=c[u];o(d)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let d=-1,h=-1;for(;++d<i.length;)if(i[d][0]===c){h=d;break}if(h===-1)i.push([c,...u]);else if(u.length>0){let[f,...p]=u;const m=i[h][1];w6(m)&&w6(f)&&(f=Sw(!0,m,f)),i[h]=[c,f,...p]}}}}const C6=new w8().freeze();function Mw(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Tw(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Pw(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function uE(t){if(!w6(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function dE(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Wv(t){return jxe(t)?t:new Bxe(t)}function jxe(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Wxe(t){return typeof t=="string"||Yxe(t)}function Yxe(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var tN=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},an=(t,e,n)=>(tN(t,e,"read from private field"),n?n.call(t):e.get(t)),$s=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Qn=(t,e,n,i)=>(tN(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);let nN=class{},sN=class{constructor(){this.elements=[],this.size=()=>this.elements.length,this.top=()=>this.elements.at(-1),this.push=e=>{var n;(n=this.top())==null||n.push(e)},this.open=e=>{this.elements.push(e)},this.close=()=>{const e=this.elements.pop();if(!e)throw tF();return e}}},qxe=class iN extends nN{constructor(e,n,i){super(),this.type=e,this.content=n,this.attrs=i}push(e,...n){this.content.push(e,...n)}pop(){return this.content.pop()}static create(e,n,i){return new iN(e,n,i)}};var na,Jp,I0,L0,O0,Qp,em;const x6=class extends sN{constructor(e){super(),$s(this,na,void 0),$s(this,Jp,void 0),$s(this,I0,void 0),$s(this,L0,void 0),$s(this,O0,void 0),$s(this,Qp,void 0),$s(this,em,void 0),Qn(this,na,En.none),Qn(this,Jp,n=>n.isText),Qn(this,I0,(n,i)=>{if(an(this,Jp).call(this,n)&&an(this,Jp).call(this,i)&&En.sameSet(n.marks,i.marks))return this.schema.text(n.text+i.text,n.marks)}),Qn(this,L0,n=>{const i=Object.values({...this.schema.nodes,...this.schema.marks}).find(s=>s.spec.parseMarkdown.match(n));if(!i)throw N3e(n);return i}),Qn(this,O0,n=>{const i=an(this,L0).call(this,n);i.spec.parseMarkdown.runner(this,n,i)}),this.injectRoot=(n,i,s)=>(this.openNode(i,s),this.next(n.children),this),this.openNode=(n,i)=>(this.open(qxe.create(n,[],i)),this),Qn(this,Qp,()=>{Qn(this,na,En.none);const n=this.close();return an(this,em).call(this,n.type,n.attrs,n.content)}),this.closeNode=()=>(an(this,Qp).call(this),this),Qn(this,em,(n,i,s)=>{const o=n.createAndFill(i,s,an(this,na));if(!o)throw F3e(n,i,s);return this.push(o),o}),this.addNode=(n,i,s)=>(an(this,em).call(this,n,i,s),this),this.openMark=(n,i)=>{const s=n.create(i);return Qn(this,na,s.addToSet(an(this,na))),this},this.closeMark=n=>(Qn(this,na,n.removeFromSet(an(this,na))),this),this.addText=n=>{const i=this.top();if(!i)throw tF();const s=i.pop(),o=this.schema.text(n,an(this,na));if(!s)return i.push(o),this;const r=an(this,I0).call(this,s,o);return r?(i.push(r),this):(i.push(s,o),this)},this.build=()=>{let n;do n=an(this,Qp).call(this);while(this.size());return n},this.next=(n=[])=>([n].flat().forEach(i=>an(this,O0).call(this,i)),this),this.toDoc=()=>this.build(),this.run=(n,i)=>{const s=n.runSync(n.parse(i),i);return this.next(s),this},this.schema=e}};na=new WeakMap,Jp=new WeakMap,I0=new WeakMap,L0=new WeakMap,O0=new WeakMap,Qp=new WeakMap,em=new WeakMap,x6.create=(t,e)=>{const n=new x6(t);return i=>(n.run(e,i),n.toDoc())};let Gxe=x6;const S6=class extends nN{constructor(e,n,i,s={}){super(),this.type=e,this.children=n,this.value=i,this.props=s,this.push=(o,...r)=>{this.children||(this.children=[]),this.children.push(o,...r)},this.pop=()=>{var o;return(o=this.children)==null?void 0:o.pop()}}};S6.create=(t,e,n,i={})=>new S6(t,e,n,i);let hE=S6;const Xxe=t=>Object.prototype.hasOwnProperty.call(t,"size");var Na,tm,D0,R0,nm,V0,sm,F0,N0,bh,fu,B0,im;const $6=class extends sN{constructor(e){super(),$s(this,Na,void 0),$s(this,tm,void 0),$s(this,D0,void 0),$s(this,R0,void 0),$s(this,nm,void 0),$s(this,V0,void 0),$s(this,sm,void 0),$s(this,F0,void 0),$s(this,N0,void 0),$s(this,bh,void 0),$s(this,fu,void 0),$s(this,B0,void 0),$s(this,im,void 0),Qn(this,Na,En.none),Qn(this,tm,n=>{const i=Object.values({...this.schema.nodes,...this.schema.marks}).find(s=>s.spec.toMarkdown.match(n));if(!i)throw B3e(n.type);return i}),Qn(this,D0,n=>an(this,tm).call(this,n).spec.toMarkdown.runner(this,n)),Qn(this,R0,(n,i)=>an(this,tm).call(this,n).spec.toMarkdown.runner(this,n,i)),Qn(this,nm,n=>{const{marks:i}=n,s=o=>o.type.spec.priority??50;[...i].sort((o,r)=>s(o)-s(r)).every(o=>!an(this,R0).call(this,o,n))&&an(this,D0).call(this,n),i.forEach(o=>an(this,im).call(this,o))}),Qn(this,V0,(n,i)=>{var s;if(n.type===i||((s=n.children)==null?void 0:s.length)!==1)return n;const o=c=>{var u;if(c.type===i)return c;if(((u=c.children)==null?void 0:u.length)!==1)return null;const[d]=c.children;return d?o(d):null},r=o(n);if(!r)return n;const a=r.children?[...r.children]:void 0,l={...n,children:a};return l.children=a,r.children=[l],r}),Qn(this,sm,n=>{const{children:i}=n;return i&&(n.children=i.reduce((s,o,r)=>{if(r===0)return[o];const a=s.at(-1);if(a&&a.isMark&&o.isMark){o=an(this,V0).call(this,o,a.type);const{children:l,...c}=o,{children:u,...d}=a;if(o.type===a.type&&l&&u&&JSON.stringify(c)===JSON.stringify(d)){const h={...d,children:[...u,...l]};return s.slice(0,-1).concat(an(this,sm).call(this,h))}}return s.concat(o)},[])),n}),Qn(this,F0,n=>{const i={...n.props,type:n.type};return n.children&&(i.children=n.children),n.value&&(i.value=n.value),i}),this.openNode=(n,i,s)=>(this.open(hE.create(n,void 0,i,s)),this),Qn(this,N0,(n,i)=>{let s="",o="";const r=n.children;let a=-1,l=-1;const c=d=>{d&&d.forEach((h,f)=>{h.type==="text"&&h.value&&(a<0&&(a=f),l=f)})};if(r){c(r);const d=r==null?void 0:r[l],h=r==null?void 0:r[a];d&&d.value.endsWith(" ")&&(o=d.value.match(/ +$/)[0],d.value=d.value.trimEnd()),h&&h.value.startsWith(" ")&&(s=h.value.match(/^ +/)[0],h.value=h.value.trimStart())}s.length&&an(this,fu).call(this,"text",void 0,s);const u=i();return o.length&&an(this,fu).call(this,"text",void 0,o),u}),Qn(this,bh,(n=!1)=>{const i=this.close(),s=()=>an(this,fu).call(this,i.type,i.children,i.value,i.props);return n?an(this,N0).call(this,i,s):s()}),this.closeNode=()=>(an(this,bh).call(this),this),Qn(this,fu,(n,i,s,o)=>{const r=hE.create(n,i,s,o),a=an(this,sm).call(this,an(this,F0).call(this,r));return this.push(a),a}),this.addNode=(n,i,s,o)=>(an(this,fu).call(this,n,i,s,o),this),Qn(this,B0,(n,i,s,o)=>n.isInSet(an(this,Na))?this:(Qn(this,Na,n.addToSet(an(this,Na))),this.openNode(i,s,{...o,isMark:!0}))),Qn(this,im,n=>{n.isInSet(an(this,Na))&&(Qn(this,Na,n.type.removeFromSet(an(this,Na))),an(this,bh).call(this,!0))}),this.withMark=(n,i,s,o)=>(an(this,B0).call(this,n,i,s,o),this),this.closeMark=n=>(an(this,im).call(this,n),this),this.build=()=>{let n=null;do n=an(this,bh).call(this);while(this.size());return n},this.next=n=>Xxe(n)?(n.forEach(i=>{an(this,nm).call(this,i)}),this):(an(this,nm).call(this,n),this),this.toString=n=>n.stringify(this.build()),this.run=n=>(this.next(n),this),this.schema=e}};Na=new WeakMap,tm=new WeakMap,D0=new WeakMap,R0=new WeakMap,nm=new WeakMap,V0=new WeakMap,sm=new WeakMap,F0=new WeakMap,N0=new WeakMap,bh=new WeakMap,fu=new WeakMap,B0=new WeakMap,im=new WeakMap,$6.create=(t,e)=>{const n=new $6(t);return i=>(n.run(i),n.toString(e))};let Kxe=$6;const oN=65535,rN=Math.pow(2,16);function Zxe(t,e){return t+e*rN}function fE(t){return t&oN}function Jxe(t){return(t-(t&oN))/rN}const aN=1,lN=2,z0=4,cN=8;class A6{constructor(e,n,i){this.pos=e,this.delInfo=n,this.recover=i}get deleted(){return(this.delInfo&cN)>0}get deletedBefore(){return(this.delInfo&(aN|z0))>0}get deletedAfter(){return(this.delInfo&(lN|z0))>0}get deletedAcross(){return(this.delInfo&z0)>0}}class So{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&So.empty)return So.empty}recover(e){let n=0,i=fE(e);if(!this.inverted)for(let s=0;s<i;s++)n+=this.ranges[s*3+2]-this.ranges[s*3+1];return this.ranges[i*3]+n+Jxe(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,i){let s=0,o=this.inverted?2:1,r=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?s:0);if(l>e)break;let c=this.ranges[a+o],u=this.ranges[a+r],d=l+c;if(e<=d){let h=c?e==l?-1:e==d?1:n:n,f=l+s+(h<0?0:u);if(i)return f;let p=e==(n<0?l:d)?null:Zxe(a/3,e-l),m=e==l?lN:e==d?aN:z0;return(n<0?e!=l:e!=d)&&(m|=cN),new A6(f,m,p)}s+=u-c}return i?e+s:new A6(e+s,0,null)}touches(e,n){let i=0,s=fE(n),o=this.inverted?2:1,r=this.inverted?1:2;for(let a=0;a<this.ranges.length;a+=3){let l=this.ranges[a]-(this.inverted?i:0);if(l>e)break;let c=this.ranges[a+o],u=l+c;if(e<=u&&a==s*3)return!0;i+=this.ranges[a+r]-c}return!1}forEach(e){let n=this.inverted?2:1,i=this.inverted?1:2;for(let s=0,o=0;s<this.ranges.length;s+=3){let r=this.ranges[s],a=r-(this.inverted?o:0),l=r+(this.inverted?0:o),c=this.ranges[s+n],u=this.ranges[s+i];e(a,a+c,l,l+u),o+=u-c}}invert(){return new So(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?So.empty:new So(e<0?[0,-e,0]:[0,0,e])}}So.empty=new So([]);class Zh{constructor(e=[],n,i=0,s=e.length){this.maps=e,this.mirror=n,this.from=i,this.to=s}slice(e=0,n=this.maps.length){return new Zh(this.maps,this.mirror,e,n)}copy(){return new Zh(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,n){this.to=this.maps.push(e),n!=null&&this.setMirror(this.maps.length-1,n)}appendMapping(e){for(let n=0,i=this.maps.length;n<e.maps.length;n++){let s=e.getMirror(n);this.appendMap(e.maps[n],s!=null&&s<n?i+s:void 0)}}getMirror(e){if(this.mirror){for(let n=0;n<this.mirror.length;n++)if(this.mirror[n]==e)return this.mirror[n+(n%2?-1:1)]}}setMirror(e,n){this.mirror||(this.mirror=[]),this.mirror.push(e,n)}appendMappingInverted(e){for(let n=e.maps.length-1,i=this.maps.length+e.maps.length;n>=0;n--){let s=e.getMirror(n);this.appendMap(e.maps[n].invert(),s!=null&&s>n?i-s-1:void 0)}}invert(){let e=new Zh;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let i=this.from;i<this.to;i++)e=this.maps[i].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,i){let s=0;for(let o=this.from;o<this.to;o++){let r=this.maps[o],a=r.mapResult(e,n);if(a.recover!=null){let l=this.getMirror(o);if(l!=null&&l>o&&l<this.to){o=l,e=this.maps[l].recover(a.recover);continue}}s|=a.delInfo,e=a.pos}return i?e:new A6(e,s,null)}}const Iw=Object.create(null);class Ti{getMap(){return So.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let i=Iw[n.stepType];if(!i)throw new RangeError(`No step type ${n.stepType} defined`);return i.fromJSON(e,n)}static jsonID(e,n){if(e in Iw)throw new RangeError("Duplicate use of step JSON ID "+e);return Iw[e]=n,n.prototype.jsonID=e,n}}class Ts{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Ts(e,null)}static fail(e){return new Ts(null,e)}static fromReplace(e,n,i,s){try{return Ts.ok(e.replace(n,i,s))}catch(o){if(o instanceof py)return Ts.fail(o.message);throw o}}}function k8(t,e,n){let i=[];for(let s=0;s<t.childCount;s++){let o=t.child(s);o.content.size&&(o=o.copy(k8(o.content,e,o))),o.isInline&&(o=e(o,n,s)),i.push(o)}return nt.fromArray(i)}class Ga extends Ti{constructor(e,n,i){super(),this.from=e,this.to=n,this.mark=i}apply(e){let n=e.slice(this.from,this.to),i=e.resolve(this.from),s=i.node(i.sharedDepth(this.to)),o=new rt(k8(n.content,(r,a)=>!r.isAtom||!a.type.allowsMarkType(this.mark.type)?r:r.mark(this.mark.addToSet(r.marks)),s),n.openStart,n.openEnd);return Ts.fromReplace(e,this.from,this.to,o)}invert(){return new fa(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),i=e.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new Ga(n.pos,i.pos,this.mark)}merge(e){return e instanceof Ga&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ga(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Ga(n.from,n.to,e.markFromJSON(n.mark))}}Ti.jsonID("addMark",Ga);class fa extends Ti{constructor(e,n,i){super(),this.from=e,this.to=n,this.mark=i}apply(e){let n=e.slice(this.from,this.to),i=new rt(k8(n.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),n.openStart,n.openEnd);return Ts.fromReplace(e,this.from,this.to,i)}invert(){return new Ga(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),i=e.mapResult(this.to,-1);return n.deleted&&i.deleted||n.pos>=i.pos?null:new fa(n.pos,i.pos,this.mark)}merge(e){return e instanceof fa&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new fa(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new fa(n.from,n.to,e.markFromJSON(n.mark))}}Ti.jsonID("removeMark",fa);class uc extends Ti{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ts.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Ts.fromReplace(e,this.pos,this.pos+1,new rt(nt.from(i),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let i=this.mark.addToSet(n.marks);if(i.length==n.marks.length){for(let s=0;s<n.marks.length;s++)if(!n.marks[s].isInSet(i))return new uc(this.pos,n.marks[s]);return new uc(this.pos,this.mark)}}return new Nf(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new uc(n.pos,this.mark)}toJSON(){return{stepType:"addNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for AddNodeMarkStep.fromJSON");return new uc(n.pos,e.markFromJSON(n.mark))}}Ti.jsonID("addNodeMark",uc);class Nf extends Ti{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ts.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Ts.fromReplace(e,this.pos,this.pos+1,new rt(nt.from(i),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new uc(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Nf(n.pos,this.mark)}toJSON(){return{stepType:"removeNodeMark",pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(e,n){if(typeof n.pos!="number")throw new RangeError("Invalid input for RemoveNodeMarkStep.fromJSON");return new Nf(n.pos,e.markFromJSON(n.mark))}}Ti.jsonID("removeNodeMark",Nf);class ei extends Ti{constructor(e,n,i,s=!1){super(),this.from=e,this.to=n,this.slice=i,this.structure=s}apply(e){return this.structure&&E6(e,this.from,this.to)?Ts.fail("Structure replace would overwrite content"):Ts.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new So([this.from,this.to-this.from,this.slice.size])}invert(e){return new ei(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),i=e.mapResult(this.to,-1);return n.deletedAcross&&i.deletedAcross?null:new ei(n.pos,Math.max(n.pos,i.pos),this.slice)}merge(e){if(!(e instanceof ei)||e.structure||this.structure)return null;if(this.from+this.slice.size==e.from&&!this.slice.openEnd&&!e.slice.openStart){let n=this.slice.size+e.slice.size==0?rt.empty:new rt(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new ei(this.from,this.to+(e.to-e.from),n,this.structure)}else if(e.to==this.from&&!this.slice.openStart&&!e.slice.openEnd){let n=this.slice.size+e.slice.size==0?rt.empty:new rt(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new ei(e.from,this.to,n,this.structure)}else return null}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number")throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new ei(n.from,n.to,rt.fromJSON(e,n.slice),!!n.structure)}}Ti.jsonID("replace",ei);class xi extends Ti{constructor(e,n,i,s,o,r,a=!1){super(),this.from=e,this.to=n,this.gapFrom=i,this.gapTo=s,this.slice=o,this.insert=r,this.structure=a}apply(e){if(this.structure&&(E6(e,this.from,this.gapFrom)||E6(e,this.gapTo,this.to)))return Ts.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Ts.fail("Gap is not a flat range");let i=this.slice.insertAt(this.insert,n.content);return i?Ts.fromReplace(e,this.from,this.to,i):Ts.fail("Content does not fit in gap")}getMap(){return new So([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let n=this.gapTo-this.gapFrom;return new xi(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let n=e.mapResult(this.from,1),i=e.mapResult(this.to,-1),s=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?i.pos:e.map(this.gapTo,1);return n.deletedAcross&&i.deletedAcross||s<n.pos||o>i.pos?null:new xi(n.pos,i.pos,s,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,n){if(typeof n.from!="number"||typeof n.to!="number"||typeof n.gapFrom!="number"||typeof n.gapTo!="number"||typeof n.insert!="number")throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new xi(n.from,n.to,n.gapFrom,n.gapTo,rt.fromJSON(e,n.slice),n.insert,!!n.structure)}}Ti.jsonID("replaceAround",xi);function E6(t,e,n){let i=t.resolve(e),s=n-e,o=i.depth;for(;s>0&&o>0&&i.indexAfter(o)==i.node(o).childCount;)o--,s--;if(s>0){let r=i.node(o).maybeChild(i.indexAfter(o));for(;s>0;){if(!r||r.isLeaf)return!0;r=r.firstChild,s--}}return!1}function Qxe(t,e,n,i){let s=[],o=[],r,a;t.doc.nodesBetween(e,n,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!i.isInSet(d)&&u.type.allowsMarkType(i.type)){let h=Math.max(c,e),f=Math.min(c+l.nodeSize,n),p=i.addToSet(d);for(let m=0;m<d.length;m++)d[m].isInSet(p)||(r&&r.to==h&&r.mark.eq(d[m])?r.to=f:s.push(r=new fa(h,f,d[m])));a&&a.to==h?a.to=f:o.push(a=new Ga(h,f,i))}}),s.forEach(l=>t.step(l)),o.forEach(l=>t.step(l))}function e4e(t,e,n,i){let s=[],o=0;t.doc.nodesBetween(e,n,(r,a)=>{if(!r.isInline)return;o++;let l=null;if(i instanceof Nb){let c=r.marks,u;for(;u=i.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else i?i.isInSet(r.marks)&&(l=[i]):l=r.marks;if(l&&l.length){let c=Math.min(a+r.nodeSize,n);for(let u=0;u<l.length;u++){let d=l[u],h;for(let f=0;f<s.length;f++){let p=s[f];p.step==o-1&&d.eq(s[f].style)&&(h=p)}h?(h.to=c,h.step=o):s.push({style:d,from:Math.max(a,e),to:c,step:o})}}}),s.forEach(r=>t.step(new fa(r.from,r.to,r.style)))}function uN(t,e,n,i=n.contentMatch,s=!0){let o=t.doc.nodeAt(e),r=[],a=e+1;for(let l=0;l<o.childCount;l++){let c=o.child(l),u=a+c.nodeSize,d=i.matchType(c.type);if(!d)r.push(new ei(a,u,rt.empty));else{i=d;for(let h=0;h<c.marks.length;h++)n.allowsMarkType(c.marks[h].type)||t.step(new fa(a,u,c.marks[h]));if(s&&c.isText&&n.whitespace!="pre"){let h,f=/\r?\n|\r/g,p;for(;h=f.exec(c.text);)p||(p=new rt(nt.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),r.push(new ei(a+h.index,a+h.index+h[0].length,p))}}a=u}if(!i.validEnd){let l=i.fillBefore(nt.empty,!0);t.replace(a,a,new rt(l,0,0))}for(let l=r.length-1;l>=0;l--)t.step(r[l])}function t4e(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function Wb(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let i=t.depth;;--i){let s=t.$from.node(i),o=t.$from.index(i),r=t.$to.indexAfter(i);if(i<t.depth&&s.canReplace(o,r,n))return i;if(i==0||s.type.spec.isolating||!t4e(s,o,r))break}return null}function n4e(t,e,n){let{$from:i,$to:s,depth:o}=e,r=i.before(o+1),a=s.after(o+1),l=r,c=a,u=nt.empty,d=0;for(let p=o,m=!1;p>n;p--)m||i.index(p)>0?(m=!0,u=nt.from(i.node(p).copy(u)),d++):l--;let h=nt.empty,f=0;for(let p=o,m=!1;p>n;p--)m||s.after(p+1)<s.end(p)?(m=!0,h=nt.from(s.node(p).copy(h)),f++):c++;t.step(new xi(l,c,r,a,new rt(u.append(h),d,f),u.size-d,!0))}function C8(t,e,n=null,i=t){let s=s4e(t,e),o=s&&i4e(i,e);return o?s.map(pE).concat({type:e,attrs:n}).concat(o.map(pE)):null}function pE(t){return{type:t,attrs:null}}function s4e(t,e){let{parent:n,startIndex:i,endIndex:s}=t,o=n.contentMatchAt(i).findWrapping(e);if(!o)return null;let r=o.length?o[0]:e;return n.canReplaceWith(i,s,r)?o:null}function i4e(t,e){let{parent:n,startIndex:i,endIndex:s}=t,o=n.child(i),r=e.contentMatch.findWrapping(o.type);if(!r)return null;let l=(r.length?r[r.length-1]:e).contentMatch;for(let c=i;l&&c<s;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:r}function o4e(t,e,n){let i=nt.empty;for(let r=n.length-1;r>=0;r--){if(i.size){let a=n[r].type.contentMatch.matchFragment(i);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}i=nt.from(n[r].type.create(n[r].attrs,i))}let s=e.start,o=e.end;t.step(new xi(s,o,s,o,new rt(i,0,0),n.length,!0))}function r4e(t,e,n,i,s){if(!i.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let o=t.steps.length;t.doc.nodesBetween(e,n,(r,a)=>{let l=typeof s=="function"?s(r):s;if(r.isTextblock&&!r.hasMarkup(i,l)&&c4e(t.doc,t.mapping.slice(o).map(a),i)){let c=null;if(i.schema.linebreakReplacement){let f=i.whitespace=="pre",p=!!i.contentMatch.matchType(i.schema.linebreakReplacement);f&&!p?c=!1:!f&&p&&(c=!0)}c===!1&&l4e(t,r,a,o),uN(t,t.mapping.slice(o).map(a,1),i,void 0,c===null);let u=t.mapping.slice(o),d=u.map(a,1),h=u.map(a+r.nodeSize,1);return t.step(new xi(d,h,d+1,h-1,new rt(nt.from(i.create(l,null,r.marks)),0,0),1,!0)),c===!0&&a4e(t,r,a,o),!1}})}function a4e(t,e,n,i){e.forEach((s,o)=>{if(s.isText){let r,a=/\r?\n|\r/g;for(;r=a.exec(s.text);){let l=t.mapping.slice(i).map(n+1+o+r.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function l4e(t,e,n,i){e.forEach((s,o)=>{if(s.type==s.type.schema.linebreakReplacement){let r=t.mapping.slice(i).map(n+1+o);t.replaceWith(r,r+1,e.type.schema.text(`
`))}})}function c4e(t,e,n){let i=t.resolve(e),s=i.index();return i.parent.canReplaceWith(s,s+1,n)}function u4e(t,e,n,i,s){let o=t.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let r=n.create(i,null,s||o.marks);if(o.isLeaf)return t.replaceWith(e,e+o.nodeSize,r);if(!n.validContent(o.content))throw new RangeError("Invalid content for node type "+n.name);t.step(new xi(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new rt(nt.from(r),0,0),1,!0))}function Gm(t,e,n=1,i){let s=t.resolve(e),o=s.depth-n,r=i&&i[i.length-1]||s.parent;if(o<0||s.parent.type.spec.isolating||!s.parent.canReplace(s.index(),s.parent.childCount)||!r.type.validContent(s.parent.content.cutByIndex(s.index(),s.parent.childCount)))return!1;for(let c=s.depth-1,u=n-2;c>o;c--,u--){let d=s.node(c),h=s.index(c);if(d.type.spec.isolating)return!1;let f=d.content.cutByIndex(h,d.childCount),p=i&&i[u+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let m=i&&i[u]||d;if(!d.canReplace(h+1,d.childCount)||!m.type.validContent(f))return!1}let a=s.indexAfter(o),l=i&&i[0];return s.node(o).canReplaceWith(a,a,l?l.type:s.node(o+1).type)}function d4e(t,e,n=1,i){let s=t.doc.resolve(e),o=nt.empty,r=nt.empty;for(let a=s.depth,l=s.depth-n,c=n-1;a>l;a--,c--){o=nt.from(s.node(a).copy(o));let u=i&&i[c];r=nt.from(u?u.type.create(u.attrs,r):s.node(a).copy(r))}t.step(new ei(e,e,new rt(o.append(r),n,n),!0))}function Yb(t,e){let n=t.resolve(e),i=n.index();return h4e(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(i,i+1)}function h4e(t,e){return!!(t&&e&&!t.isLeaf&&t.canAppend(e))}function f4e(t,e,n){let i=new ei(e-n,e+n,rt.empty,!0);t.step(i)}function p4e(t,e,n){let i=t.resolve(e);if(i.parent.canReplaceWith(i.index(),i.index(),n))return e;if(i.parentOffset==0)for(let s=i.depth-1;s>=0;s--){let o=i.index(s);if(i.node(s).canReplaceWith(o,o,n))return i.before(s+1);if(o>0)return null}if(i.parentOffset==i.parent.content.size)for(let s=i.depth-1;s>=0;s--){let o=i.indexAfter(s);if(i.node(s).canReplaceWith(o,o,n))return i.after(s+1);if(o<i.node(s).childCount)return null}return null}function m4e(t,e,n){let i=t.resolve(e);if(!n.content.size)return e;let s=n.content;for(let o=0;o<n.openStart;o++)s=s.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let r=i.depth;r>=0;r--){let a=r==i.depth?0:i.pos<=(i.start(r+1)+i.end(r+1))/2?-1:1,l=i.index(r)+(a>0?1:0),c=i.node(r),u=!1;if(o==1)u=c.canReplace(l,l,s);else{let d=c.contentMatchAt(l).findWrapping(s.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return a==0?i.pos:a<0?i.before(r+1):i.after(r+1)}return null}function x8(t,e,n=e,i=rt.empty){if(e==n&&!i.size)return null;let s=t.resolve(e),o=t.resolve(n);return dN(s,o,i)?new ei(e,n,i):new g4e(s,o,i).fit()}function dN(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class g4e{constructor(e,n,i){this.$from=e,this.$to=n,this.unplaced=i,this.frontier=[],this.placed=nt.empty;for(let s=0;s<=e.depth;s++){let o=e.node(s);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(s))})}for(let s=e.depth;s>0;s--)this.placed=nt.from(e.node(s).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let c=this.findFittable();c?this.placeNodes(c):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),n=this.placed.size-this.depth-this.$from.depth,i=this.$from,s=this.close(e<0?this.$to:i.doc.resolve(e));if(!s)return null;let o=this.placed,r=i.depth,a=s.depth;for(;r&&a&&o.childCount==1;)o=o.firstChild.content,r--,a--;let l=new rt(o,r,a);return e>-1?new xi(i.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||i.pos!=this.$to.pos?new ei(i.pos,s.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,i=0,s=this.unplaced.openEnd;i<e;i++){let o=n.firstChild;if(n.childCount>1&&(s=0),o.type.spec.isolating&&s<=i){e=i;break}n=o.content}for(let n=1;n<=2;n++)for(let i=n==1?e:this.unplaced.openStart;i>=0;i--){let s,o=null;i?(o=Lw(this.unplaced.content,i-1).firstChild,s=o.content):s=this.unplaced.content;let r=s.firstChild;for(let a=this.depth;a>=0;a--){let{type:l,match:c}=this.frontier[a],u,d=null;if(n==1&&(r?c.matchType(r.type)||(d=c.fillBefore(nt.from(r),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:i,frontierDepth:a,parent:o,inject:d};if(n==2&&r&&(u=c.findWrapping(r.type)))return{sliceDepth:i,frontierDepth:a,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:n,openEnd:i}=this.unplaced,s=Lw(e,n);return!s.childCount||s.firstChild.isLeaf?!1:(this.unplaced=new rt(e,n+1,Math.max(i,s.size+n>=e.size-i?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:i}=this.unplaced,s=Lw(e,n);if(s.childCount<=1&&n>0){let o=e.size-n<=n+s.size;this.unplaced=new rt(om(e,n-1,1),n-1,o?n-1:i)}else this.unplaced=new rt(om(e,n,1),n,i)}placeNodes({sliceDepth:e,frontierDepth:n,parent:i,inject:s,wrap:o}){for(;this.depth>n;)this.closeFrontierNode();if(o)for(let m=0;m<o.length;m++)this.openFrontierNode(o[m]);let r=this.unplaced,a=i?i.content:r.content,l=r.openStart-e,c=0,u=[],{match:d,type:h}=this.frontier[n];if(s){for(let m=0;m<s.childCount;m++)u.push(s.child(m));d=d.matchFragment(s)}let f=a.size+e-(r.content.size-r.openEnd);for(;c<a.childCount;){let m=a.child(c),y=d.matchType(m.type);if(!y)break;c++,(c>1||l==0||m.content.size)&&(d=y,u.push(hN(m.mark(h.allowedMarks(m.marks)),c==1?l:0,c==a.childCount?f:-1)))}let p=c==a.childCount;p||(f=-1),this.placed=rm(this.placed,n,nt.from(u)),this.frontier[n].match=d,p&&f<0&&i&&i.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,y=a;m<f;m++){let b=y.lastChild;this.frontier.push({type:b.type,match:b.contentMatchAt(b.childCount)}),y=b.content}this.unplaced=p?e==0?rt.empty:new rt(om(r.content,e-1,1),e-1,f<0?r.openEnd:e-1):new rt(om(r.content,e,c),r.openStart,r.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],n;if(!e.type.isTextblock||!Ow(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(n=this.findCloseLevel(this.$to))&&n.depth==this.depth)return-1;let{depth:i}=this.$to,s=this.$to.after(i);for(;i>1&&s==this.$to.end(--i);)++s;return s}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:i,type:s}=this.frontier[n],o=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),r=Ow(e,n,s,i,o);if(r){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=Ow(e,a,c,l,!0);if(!u||u.childCount)continue e}return{depth:n,fit:r,move:o?e.doc.resolve(e.after(n+1)):e}}}}close(e){let n=this.findCloseLevel(e);if(!n)return null;for(;this.depth>n.depth;)this.closeFrontierNode();n.fit.childCount&&(this.placed=rm(this.placed,n.depth,n.fit)),e=n.move;for(let i=n.depth+1;i<=e.depth;i++){let s=e.node(i),o=s.type.contentMatch.fillBefore(s.content,!0,e.index(i));this.openFrontierNode(s.type,s.attrs,o)}return e}openFrontierNode(e,n=null,i){let s=this.frontier[this.depth];s.match=s.match.matchType(e),this.placed=rm(this.placed,this.depth,nt.from(e.create(n,i))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(nt.empty,!0);n.childCount&&(this.placed=rm(this.placed,this.frontier.length,n))}}function om(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(om(t.firstChild.content,e-1,n)))}function rm(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(rm(t.lastChild.content,e-1,n)))}function Lw(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function hN(t,e,n){if(e<=0)return t;let i=t.content;return e>1&&(i=i.replaceChild(0,hN(i.firstChild,e-1,i.childCount==1?n-1:0))),e>0&&(i=t.type.contentMatch.fillBefore(i).append(i),n<=0&&(i=i.append(t.type.contentMatch.matchFragment(i).fillBefore(nt.empty,!0)))),t.copy(i)}function Ow(t,e,n,i,s){let o=t.node(e),r=s?t.indexAfter(e):t.index(e);if(r==o.childCount&&!n.compatibleContent(o.type))return null;let a=i.fillBefore(o.content,!0,r);return a&&!v4e(n,o.content,r)?a:null}function v4e(t,e,n){for(let i=n;i<e.childCount;i++)if(!t.allowsMarks(e.child(i).marks))return!0;return!1}function _4e(t){return t.spec.defining||t.spec.definingForContent}function y4e(t,e,n,i){if(!i.size)return t.deleteRange(e,n);let s=t.doc.resolve(e),o=t.doc.resolve(n);if(dN(s,o,i))return t.step(new ei(e,n,i));let r=pN(s,t.doc.resolve(n));r[r.length-1]==0&&r.pop();let a=-(s.depth+1);r.unshift(a);for(let h=s.depth,f=s.pos-1;h>0;h--,f--){let p=s.node(h).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;r.indexOf(h)>-1?a=h:s.before(h)==f&&r.splice(1,0,-h)}let l=r.indexOf(a),c=[],u=i.openStart;for(let h=i.content,f=0;;f++){let p=h.firstChild;if(c.push(p),f==i.openStart)break;h=p.content}for(let h=u-1;h>=0;h--){let f=c[h],p=_4e(f.type);if(p&&!f.sameMarkup(s.node(Math.abs(a)-1)))u=h;else if(p||!f.type.isTextblock)break}for(let h=i.openStart;h>=0;h--){let f=(h+u+1)%(i.openStart+1),p=c[f];if(p)for(let m=0;m<r.length;m++){let y=r[(m+l)%r.length],b=!0;y<0&&(b=!1,y=-y);let k=s.node(y-1),C=s.index(y-1);if(k.canReplaceWith(C,C,p.type,p.marks))return t.replace(s.before(y),b?o.after(y):n,new rt(fN(i.content,0,i.openStart,f),f,i.openEnd))}}let d=t.steps.length;for(let h=r.length-1;h>=0&&(t.replace(e,n,i),!(t.steps.length>d));h--){let f=r[h];f<0||(e=s.before(f),n=o.after(f))}}function fN(t,e,n,i,s){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(fN(o.content,e+1,n,i,o)))}if(e>i){let o=s.contentMatchAt(0),r=o.fillBefore(t).append(t);t=r.append(o.matchFragment(r).fillBefore(nt.empty,!0))}return t}function b4e(t,e,n,i){if(!i.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let s=p4e(t.doc,e,i.type);s!=null&&(e=n=s)}t.replaceRange(e,n,new rt(nt.from(i),0,0))}function w4e(t,e,n){let i=t.doc.resolve(e),s=t.doc.resolve(n),o=pN(i,s);for(let r=0;r<o.length;r++){let a=o[r],l=r==o.length-1;if(l&&a==0||i.node(a).type.contentMatch.validEnd)return t.delete(i.start(a),s.end(a));if(a>0&&(l||i.node(a-1).canReplace(i.index(a-1),s.indexAfter(a-1))))return t.delete(i.before(a),s.after(a))}for(let r=1;r<=i.depth&&r<=s.depth;r++)if(e-i.start(r)==i.depth-r&&n>i.end(r)&&s.end(r)-n!=s.depth-r)return t.delete(i.before(r),n);t.delete(e,n)}function pN(t,e){let n=[],i=Math.min(t.depth,e.depth);for(let s=i;s>=0;s--){let o=t.start(s);if(o<t.pos-(t.depth-s)||e.end(s)>e.pos+(e.depth-s)||t.node(s).type.spec.isolating||e.node(s).type.spec.isolating)break;(o==e.start(s)||s==t.depth&&s==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&s&&e.start(s-1)==o-1)&&n.push(s)}return n}class Jh extends Ti{constructor(e,n,i){super(),this.pos=e,this.attr=n,this.value=i}apply(e){let n=e.nodeAt(this.pos);if(!n)return Ts.fail("No node at attribute step's position");let i=Object.create(null);for(let o in n.attrs)i[o]=n.attrs[o];i[this.attr]=this.value;let s=n.type.create(i,null,n.marks);return Ts.fromReplace(e,this.pos,this.pos+1,new rt(nt.from(s),0,n.isLeaf?0:1))}getMap(){return So.empty}invert(e){return new Jh(this.pos,this.attr,e.nodeAt(this.pos).attrs[this.attr])}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Jh(n.pos,this.attr,this.value)}toJSON(){return{stepType:"attr",pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.pos!="number"||typeof n.attr!="string")throw new RangeError("Invalid input for AttrStep.fromJSON");return new Jh(n.pos,n.attr,n.value)}}Ti.jsonID("attr",Jh);class Ug extends Ti{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let s in e.attrs)n[s]=e.attrs[s];n[this.attr]=this.value;let i=e.type.create(n,e.content,e.marks);return Ts.ok(i)}getMap(){return So.empty}invert(e){return new Ug(this.attr,e.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:"docAttr",attr:this.attr,value:this.value}}static fromJSON(e,n){if(typeof n.attr!="string")throw new RangeError("Invalid input for DocAttrStep.fromJSON");return new Ug(n.attr,n.value)}}Ti.jsonID("docAttr",Ug);let Bf=class extends Error{};Bf=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Bf.prototype=Object.create(Error.prototype);Bf.prototype.constructor=Bf;Bf.prototype.name="TransformError";class mN{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Zh}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Bf(n.failed);return this}maybeStep(e){let n=e.apply(this.doc);return n.failed||this.addStep(e,n.doc),n}get docChanged(){return this.steps.length>0}addStep(e,n){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=n}replace(e,n=e,i=rt.empty){let s=x8(this.doc,e,n,i);return s&&this.step(s),this}replaceWith(e,n,i){return this.replace(e,n,new rt(nt.from(i),0,0))}delete(e,n){return this.replace(e,n,rt.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,i){return y4e(this,e,n,i),this}replaceRangeWith(e,n,i){return b4e(this,e,n,i),this}deleteRange(e,n){return w4e(this,e,n),this}lift(e,n){return n4e(this,e,n),this}join(e,n=1){return f4e(this,e,n),this}wrap(e,n){return o4e(this,e,n),this}setBlockType(e,n=e,i,s=null){return r4e(this,e,n,i,s),this}setNodeMarkup(e,n,i=null,s){return u4e(this,e,n,i,s),this}setNodeAttribute(e,n,i){return this.step(new Jh(e,n,i)),this}setDocAttribute(e,n){return this.step(new Ug(e,n)),this}addNodeMark(e,n){return this.step(new uc(e,n)),this}removeNodeMark(e,n){if(!(n instanceof En)){let i=this.doc.nodeAt(e);if(!i)throw new RangeError("No node at position "+e);if(n=n.isInSet(i.marks),!n)return this}return this.step(new Nf(e,n)),this}split(e,n=1,i){return d4e(this,e,n,i),this}addMark(e,n,i){return Qxe(this,e,n,i),this}removeMark(e,n,i){return e4e(this,e,n,i),this}clearIncompatible(e,n,i){return uN(this,e,n,i),this}}const Dw=Object.create(null);class Ht{constructor(e,n,i){this.$anchor=e,this.$head=n,this.ranges=i||[new ky(e.min(n),e.max(n))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let n=0;n<e.length;n++)if(e[n].$from.pos!=e[n].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,n=rt.empty){let i=n.content.lastChild,s=null;for(let a=0;a<n.openEnd;a++)s=i,i=i.lastChild;let o=e.steps.length,r=this.ranges;for(let a=0;a<r.length;a++){let{$from:l,$to:c}=r[a],u=e.mapping.slice(o);e.replaceRange(u.map(l.pos),u.map(c.pos),a?rt.empty:n),a==0&&vE(e,o,(i?i.isInline:s&&s.isTextblock)?-1:1)}}replaceWith(e,n){let i=e.steps.length,s=this.ranges;for(let o=0;o<s.length;o++){let{$from:r,$to:a}=s[o],l=e.mapping.slice(i),c=l.map(r.pos),u=l.map(a.pos);o?e.deleteRange(c,u):(e.replaceRangeWith(c,u,n),vE(e,i,n.isInline?-1:1))}}static findFrom(e,n,i=!1){let s=e.parent.inlineContent?new Ot(e):wh(e.node(0),e.parent,e.pos,e.index(),n,i);if(s)return s;for(let o=e.depth-1;o>=0;o--){let r=n<0?wh(e.node(0),e.node(o),e.before(o+1),e.index(o),n,i):wh(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,n,i);if(r)return r}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new Oo(e.node(0))}static atStart(e){return wh(e,e,0,0,1)||new Oo(e)}static atEnd(e){return wh(e,e,e.content.size,e.childCount,-1)||new Oo(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=Dw[n.type];if(!i)throw new RangeError(`No selection type ${n.type} defined`);return i.fromJSON(e,n)}static jsonID(e,n){if(e in Dw)throw new RangeError("Duplicate use of selection JSON ID "+e);return Dw[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Ot.between(this.$anchor,this.$head).getBookmark()}}Ht.prototype.visible=!0;class ky{constructor(e,n){this.$from=e,this.$to=n}}let mE=!1;function gE(t){!mE&&!t.parent.inlineContent&&(mE=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Ot extends Ht{constructor(e,n=e){gE(e),gE(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let i=e.resolve(n.map(this.head));if(!i.parent.inlineContent)return Ht.near(i);let s=e.resolve(n.map(this.anchor));return new Ot(s.parent.inlineContent?s:i,i)}replace(e,n=rt.empty){if(super.replace(e,n),n==rt.empty){let i=this.$from.marksAcross(this.$to);i&&e.ensureMarks(i)}}eq(e){return e instanceof Ot&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new qb(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,n){if(typeof n.anchor!="number"||typeof n.head!="number")throw new RangeError("Invalid input for TextSelection.fromJSON");return new Ot(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,i=n){let s=e.resolve(n);return new this(s,i==n?s:e.resolve(i))}static between(e,n,i){let s=e.pos-n.pos;if((!i||s)&&(i=s>=0?1:-1),!n.parent.inlineContent){let o=Ht.findFrom(n,i,!0)||Ht.findFrom(n,-i,!0);if(o)n=o.$head;else return Ht.near(n,i)}return e.parent.inlineContent||(s==0?e=n:(e=(Ht.findFrom(e,-i,!0)||Ht.findFrom(e,i,!0)).$anchor,e.pos<n.pos!=s<0&&(e=n))),new Ot(e,n)}}Ht.jsonID("text",Ot);class qb{constructor(e,n){this.anchor=e,this.head=n}map(e){return new qb(e.map(this.anchor),e.map(this.head))}resolve(e){return Ot.between(e.resolve(this.anchor),e.resolve(this.head))}}class Rt extends Ht{constructor(e){let n=e.nodeAfter,i=e.node(0).resolve(e.pos+n.nodeSize);super(e,i),this.node=n}map(e,n){let{deleted:i,pos:s}=n.mapResult(this.anchor),o=e.resolve(s);return i?Ht.near(o):new Rt(o)}content(){return new rt(nt.from(this.node),0,0)}eq(e){return e instanceof Rt&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new S8(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Rt(e.resolve(n.anchor))}static create(e,n){return new Rt(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}Rt.prototype.visible=!1;Ht.jsonID("node",Rt);class S8{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:i}=e.mapResult(this.anchor);return n?new qb(i,i):new S8(i)}resolve(e){let n=e.resolve(this.anchor),i=n.nodeAfter;return i&&Rt.isSelectable(i)?new Rt(n):Ht.near(n)}}class Oo extends Ht{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=rt.empty){if(n==rt.empty){e.delete(0,e.doc.content.size);let i=Ht.atStart(e.doc);i.eq(e.selection)||e.setSelection(i)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Oo(e)}map(e){return new Oo(e)}eq(e){return e instanceof Oo}getBookmark(){return k4e}}Ht.jsonID("all",Oo);const k4e={map(){return this},resolve(t){return new Oo(t)}};function wh(t,e,n,i,s,o=!1){if(e.inlineContent)return Ot.create(t,n);for(let r=i-(s>0?0:1);s>0?r<e.childCount:r>=0;r+=s){let a=e.child(r);if(a.isAtom){if(!o&&Rt.isSelectable(a))return Rt.create(t,n-(s<0?a.nodeSize:0))}else{let l=wh(t,a,n+s,s<0?a.childCount:0,s,o);if(l)return l}n+=a.nodeSize*s}return null}function vE(t,e,n){let i=t.steps.length-1;if(i<e)return;let s=t.steps[i];if(!(s instanceof ei||s instanceof xi))return;let o=t.mapping.maps[i],r;o.forEach((a,l,c,u)=>{r==null&&(r=u)}),t.setSelection(Ht.near(t.doc.resolve(r),n))}const _E=1,Yv=2,yE=4;class C4e extends mN{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw new RangeError("Selection passed to setSelection must point at the current document");return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|_E)&~Yv,this.storedMarks=null,this}get selectionSet(){return(this.updated&_E)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=Yv,this}ensureMarks(e){return En.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&Yv)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~Yv,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let i=this.selection;return n&&(e=e.mark(this.storedMarks||(i.empty?i.$from.marks():i.$from.marksAcross(i.$to)||En.none))),i.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,i){let s=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(s.text(e),!0):this.deleteSelection();{if(i==null&&(i=n),i=i??n,!e)return this.deleteRange(n,i);let o=this.storedMarks;if(!o){let r=this.doc.resolve(n);o=i==n?r.marks():r.marksAcross(this.doc.resolve(i))}return this.replaceRangeWith(n,i,s.text(e,o)),this.selection.empty||this.setSelection(Ht.near(this.selection.$to)),this}}setMeta(e,n){return this.meta[typeof e=="string"?e:e.key]=n,this}getMeta(e){return this.meta[typeof e=="string"?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=yE,this}get scrolledIntoView(){return(this.updated&yE)>0}}function bE(t,e){return!e||!t?t:t.bind(e)}class am{constructor(e,n,i){this.name=e,this.init=bE(n.init,i),this.apply=bE(n.apply,i)}}const x4e=[new am("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new am("selection",{init(t,e){return t.selection||Ht.atStart(e.doc)},apply(t){return t.selection}}),new am("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,i){return i.selection.$cursor?t.storedMarks:null}}),new am("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class Rw{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=x4e.slice(),n&&n.forEach(i=>{if(this.pluginsByKey[i.key])throw new RangeError("Adding different instances of a keyed plugin ("+i.key+")");this.plugins.push(i),this.pluginsByKey[i.key]=i,i.spec.state&&this.fields.push(new am(i.key,i.spec.state,i))})}}class Pu{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,n=-1){for(let i=0;i<this.config.plugins.length;i++)if(i!=n){let s=this.config.plugins[i];if(s.spec.filterTransaction&&!s.spec.filterTransaction.call(s,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],i=this.applyInner(e),s=null;for(;;){let o=!1;for(let r=0;r<this.config.plugins.length;r++){let a=this.config.plugins[r];if(a.spec.appendTransaction){let l=s?s[r].n:0,c=s?s[r].state:this,u=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,i);if(u&&i.filterTransaction(u,r)){if(u.setMeta("appendedTransaction",e),!s){s=[];for(let d=0;d<this.config.plugins.length;d++)s.push(d<r?{state:i,n:n.length}:{state:this,n:0})}n.push(u),i=i.applyInner(u),o=!0}s&&(s[r]={state:i,n:n.length})}}if(!o)return{state:i,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new Pu(this.config),i=this.config.fields;for(let s=0;s<i.length;s++){let o=i[s];n[o.name]=o.apply(e,this[o.name],this,n)}return n}get tr(){return new C4e(this)}static create(e){let n=new Rw(e.doc?e.doc.type.schema:e.schema,e.plugins),i=new Pu(n);for(let s=0;s<n.fields.length;s++)i[n.fields[s].name]=n.fields[s].init(e,i);return i}reconfigure(e){let n=new Rw(this.schema,e.plugins),i=n.fields,s=new Pu(n);for(let o=0;o<i.length;o++){let r=i[o].name;s[r]=this.hasOwnProperty(r)?this[r]:i[o].init(e,s)}return s}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(i=>i.toJSON())),e&&typeof e=="object")for(let i in e){if(i=="doc"||i=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let s=e[i],o=s.spec.state;o&&o.toJSON&&(n[i]=o.toJSON.call(s,this[s.key]))}return n}static fromJSON(e,n,i){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let s=new Rw(e.schema,e.plugins),o=new Pu(s);return s.fields.forEach(r=>{if(r.name=="doc")o.doc=yc.fromJSON(e.schema,n.doc);else if(r.name=="selection")o.selection=Ht.fromJSON(o.doc,n.selection);else if(r.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(i)for(let a in i){let l=i[a],c=l.spec.state;if(l.key==r.name&&c&&c.fromJSON&&Object.prototype.hasOwnProperty.call(n,a)){o[r.name]=c.fromJSON.call(l,e,n[a],o);return}}o[r.name]=r.init(e,o)}}),o}}function gN(t,e,n){for(let i in t){let s=t[i];s instanceof Function?s=s.bind(e):i=="handleDOMEvents"&&(s=gN(s,e,{})),n[i]=s}return n}class ts{constructor(e){this.spec=e,this.props={},e.props&&gN(e.props,this,this.props),this.key=e.key?e.key.key:vN("plugin")}getState(e){return e[this.key]}}const Vw=Object.create(null);function vN(t){return t in Vw?t+"$"+ ++Vw[t]:(Vw[t]=0,t+"$")}class ds{constructor(e="key"){this.key=vN(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}class zo{constructor(e,n,i={}){this.match=e,this.match=e,this.handler=typeof n=="string"?S4e(n):n,this.undoable=i.undoable!==!1,this.inCode=i.inCode||!1}}function S4e(t){return function(e,n,i,s){let o=t;if(n[1]){let r=n[0].lastIndexOf(n[1]);o+=n[0].slice(r+n[1].length),i+=r;let a=i-s;a>0&&(o=n[0].slice(r-a,r)+o,i=s)}return e.tr.insertText(o,i,s)}}const $4e=(t,e)=>{let n=t.plugins;for(let i=0;i<n.length;i++){let s=n[i],o;if(s.spec.isInputRules&&(o=s.getState(t))){if(e){let r=t.tr,a=o.transform;for(let l=a.steps.length-1;l>=0;l--)r.step(a.steps[l].invert(a.docs[l]));if(o.text){let l=r.doc.resolve(o.from).marks();r.replaceWith(o.from,o.to,t.schema.text(o.text,l))}else r.delete(o.from,o.to);e(r)}return!0}}return!1};new zo(/--$/,"—");new zo(/\.\.\.$/,"…");new zo(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“");new zo(/"$/,"”");new zo(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘");new zo(/'$/,"’");function $8(t,e,n=null,i){return new zo(t,(s,o,r,a)=>{let l=n instanceof Function?n(o):n,c=s.tr.delete(r,a),u=c.doc.resolve(r),d=u.blockRange(),h=d&&C8(d,e,l);if(!h)return null;c.wrap(d,h);let f=c.doc.resolve(r-1).nodeBefore;return f&&f.type==e&&Yb(c.doc,r-1)&&(!i||i(o,f))&&c.join(r-1),c})}function _N(t,e,n=null){return new zo(t,(i,s,o,r)=>{let a=i.doc.resolve(o),l=n instanceof Function?n(s):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),e)?i.tr.delete(o,r).setBlockType(o,o,e,l):null})}const Tc=typeof navigator<"u"?navigator:null,wE=typeof document<"u"?document:null,qc=Tc&&Tc.userAgent||"",M6=/Edge\/(\d+)/.exec(qc),yN=/MSIE \d/.exec(qc),T6=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(qc),Gb=!!(yN||T6||M6),A4e=yN?document.documentMode:T6?+T6[1]:M6?+M6[1]:0,bN=!Gb&&/gecko\/(\d+)/i.test(qc),E4e=bN&&+(/Firefox\/(\d+)/.exec(qc)||[0,0])[1],P6=!Gb&&/Chrome\/(\d+)/.exec(qc),M4e=!!P6,T4e=P6?+P6[1]:0,wN=!Gb&&!!Tc&&/Apple Computer/.test(Tc.vendor),kN=wN&&(/Mobile\/\w+/.test(qc)||!!Tc&&Tc.maxTouchPoints>2),P4e=kN||(Tc?/Mac/.test(Tc.platform):!1),I4e=/Android \d/.test(qc),CN=!!wE&&"webkitFontSmoothing"in wE.documentElement.style,L4e=CN?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;var qv=Object.freeze({__proto__:null,android:I4e,chrome:M4e,chrome_version:T4e,gecko:bN,gecko_version:E4e,ie:Gb,ie_version:A4e,ios:kN,mac:P4e,safari:wN,webkit:CN,webkit_version:L4e});function Fw(t,e,n,i,s,o){if(t.composing)return!1;const r=t.state,a=r.doc.resolve(e);if(a.parent.type.spec.code)return!1;const l=a.parent.textBetween(Math.max(0,a.parentOffset-500),a.parentOffset,void 0,"￼")+i;for(let c=0;c<s.length;c++){const u=s[c].match.exec(l),d=u&&u[0]&&s[c].handler(r,u,e-(u[0].length-i.length),n);if(d)return t.dispatch(d.setMeta(o,{transform:d,from:e,to:n,text:i})),!0}return!1}const O4e=new ds("MILKDOWN_CUSTOM_INPUTRULES");function D4e({rules:t}){const e=new ts({key:O4e,isInputRules:!0,state:{init(){return null},apply(n,i){const s=n.getMeta(this);return s||(n.selectionSet||n.docChanged?null:i)}},props:{handleTextInput(n,i,s,o){return Fw(n,i,s,o,t,e)},handleDOMEvents:{compositionend:n=>(setTimeout(()=>{const{$cursor:i}=n.state.selection;i&&Fw(n,i.pos,i.pos,"",t,e)}),!1)},handleKeyDown(n,i){if(i.key!=="Enter")return!1;const{$cursor:s}=n.state.selection;return s?Fw(n,s.pos,s.pos,`
`,t,e):!1}}});return e}function R1(t,e,n={}){return new zo(t,(i,s,o,r)=>{var a,l,c,u;const{tr:d}=i,h=s.length;let f=s[h-1],p=s[0],m=[],y=r;const b={group:f,fullMatch:p,start:o,end:r},k=(a=n.updateCaptured)==null?void 0:a.call(n,b);if(Object.assign(b,k),{group:f,fullMatch:p,start:o,end:r}=b,p===null||(f==null?void 0:f.trim())==="")return null;if(f){const C=p.search(/\S/),$=o+p.indexOf(f),x=$+f.length;m=(l=d.storedMarks)!=null?l:[],x<r&&d.delete(x,r),$>o&&d.delete(o+C,$),y=o+C+f.length;const M=(c=n.getAttr)==null?void 0:c.call(n,s);d.addMark(o,y,e.create(M)),d.setStoredMarks(m),(u=n.beforeDispatch)==null||u.call(n,{match:s,start:o,end:r,tr:d})}return d})}var R4e=Object.defineProperty,V4e=Object.defineProperties,F4e=Object.getOwnPropertyDescriptors,kE=Object.getOwnPropertySymbols,N4e=Object.prototype.hasOwnProperty,B4e=Object.prototype.propertyIsEnumerable,CE=(t,e,n)=>e in t?R4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,z4e=(t,e)=>{for(var n in e||(e={}))N4e.call(e,n)&&CE(t,n,e[n]);if(kE)for(var n of kE(e))B4e.call(e,n)&&CE(t,n,e[n]);return t},H4e=(t,e)=>V4e(t,F4e(e));function xE(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function Xb(t,e,n){const s=t.state.doc.content.size,o=xE(e,0,s),r=xE(n,0,s),a=t.coordsAtPos(o),l=t.coordsAtPos(r,-1),c=Math.min(a.top,l.top),u=Math.max(a.bottom,l.bottom),d=Math.min(a.left,l.left),h=Math.max(a.right,l.right),f=h-d,p=u-c,b={top:c,bottom:u,left:d,right:h,width:f,height:p,x:d,y:c};return H4e(z4e({},b),{toJSON:()=>b})}function Kb(t){return Object.assign(Object.create(t),t).setTime(Date.now())}function U4e(t,e){return Array.isArray(t)&&t.includes(e.type)||e.type===t}function A8(t){return e=>{for(let n=e.depth;n>0;n-=1){const i=e.node(n);if(t(i)){const s=e.before(n),o=e.after(n);return{from:s,to:o,node:i}}}}}function j4e(t,e){return A8(n=>n.type===e)(t)}function W4e(t,e){const n=e.nodes[t];if(!n)throw z3e("node",t);return n}function E8(t){return e=>{for(let n=e.depth;n>0;n--){const i=e.node(n);if(t(i))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:i}}}}function Y4e(t){return e=>E8(t)(e.$from)}function q4e(t,e){if(!(t instanceof Rt))return;const{node:n,$from:i}=t;if(U4e(e,n))return{node:n,pos:i.pos,start:i.start(i.depth),depth:i.depth}}const M8=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function G4e(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const xN=(t,e,n)=>{let i=G4e(t,n);if(!i)return!1;let s=$N(i);if(!s){let r=i.blockRange(),a=r&&Wb(r);return a==null?!1:(e&&e(t.tr.lift(r,a).scrollIntoView()),!0)}let o=s.nodeBefore;if(EN(t,s,e,-1))return!0;if(i.parent.content.size==0&&(zf(o,"end")||Rt.isSelectable(o)))for(let r=i.depth;;r--){let a=x8(t.doc,i.before(r),i.after(r),rt.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(zf(o,"end")?Ht.findFrom(l.doc.resolve(l.mapping.map(s.pos,-1)),-1):Rt.create(l.doc,s.pos-o.nodeSize)),e(l.scrollIntoView())}return!0}if(r==1||i.node(r-1).childCount>1)break}return o.isAtom&&s.depth==i.depth-1?(e&&e(t.tr.delete(s.pos-o.nodeSize,s.pos).scrollIntoView()),!0):!1};function zf(t,e,n=!1){for(let i=t;i;i=e=="start"?i.firstChild:i.lastChild){if(i.isTextblock)return!0;if(n&&i.childCount!=1)return!1}return!1}const SN=(t,e,n)=>{let{$head:i,empty:s}=t.selection,o=i;if(!s)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):i.parentOffset>0)return!1;o=$N(i)}let r=o&&o.nodeBefore;return!r||!Rt.isSelectable(r)?!1:(e&&e(t.tr.setSelection(Rt.create(t.doc,o.pos-r.nodeSize)).scrollIntoView()),!0)};function $N(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){if(t.index(e)>0)return t.doc.resolve(t.before(e+1));if(t.node(e).type.spec.isolating)break}return null}function X4e(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const K4e=(t,e,n)=>{let i=X4e(t,n);if(!i)return!1;let s=AN(i);if(!s)return!1;let o=s.nodeAfter;if(EN(t,s,e,1))return!0;if(i.parent.content.size==0&&(zf(o,"start")||Rt.isSelectable(o))){let r=x8(t.doc,i.before(),i.after(),rt.empty);if(r&&r.slice.size<r.to-r.from){if(e){let a=t.tr.step(r);a.setSelection(zf(o,"start")?Ht.findFrom(a.doc.resolve(a.mapping.map(s.pos)),1):Rt.create(a.doc,a.mapping.map(s.pos))),e(a.scrollIntoView())}return!0}}return o.isAtom&&s.depth==i.depth-1?(e&&e(t.tr.delete(s.pos,s.pos+o.nodeSize).scrollIntoView()),!0):!1},Z4e=(t,e,n)=>{let{$head:i,empty:s}=t.selection,o=i;if(!s)return!1;if(i.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):i.parentOffset<i.parent.content.size)return!1;o=AN(i)}let r=o&&o.nodeAfter;return!r||!Rt.isSelectable(r)?!1:(e&&e(t.tr.setSelection(Rt.create(t.doc,o.pos)).scrollIntoView()),!0)};function AN(t){if(!t.parent.type.spec.isolating)for(let e=t.depth-1;e>=0;e--){let n=t.node(e);if(t.index(e)+1<n.childCount)return t.doc.resolve(t.after(e+1));if(n.type.spec.isolating)break}return null}const J4e=(t,e)=>{let{$head:n,$anchor:i}=t.selection;return!n.parent.type.spec.code||!n.sameParent(i)?!1:(e&&e(t.tr.insertText(`
`).scrollIntoView()),!0)};function T8(t){for(let e=0;e<t.edgeCount;e++){let{type:n}=t.edge(e);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}const Q4e=(t,e)=>{let{$head:n,$anchor:i}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(i))return!1;let s=n.node(-1),o=n.indexAfter(-1),r=T8(s.contentMatchAt(o));if(!r||!s.canReplaceWith(o,o,r))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,r.createAndFill());l.setSelection(Ht.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},e8e=(t,e)=>{let n=t.selection,{$from:i,$to:s}=n;if(n instanceof Oo||i.parent.inlineContent||s.parent.inlineContent)return!1;let o=T8(s.parent.contentMatchAt(s.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let r=(!i.parentOffset&&s.index()<s.parent.childCount?i:s).pos,a=t.tr.insert(r,o.createAndFill());a.setSelection(Ot.create(a.doc,r+1)),e(a.scrollIntoView())}return!0},t8e=(t,e)=>{let{$cursor:n}=t.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let o=n.before();if(Gm(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let i=n.blockRange(),s=i&&Wb(i);return s==null?!1:(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)};function n8e(t){return(e,n)=>{let{$from:i,$to:s}=e.selection;if(e.selection instanceof Rt&&e.selection.node.isBlock)return!i.parentOffset||!Gm(e.doc,i.pos)?!1:(n&&n(e.tr.split(i.pos).scrollIntoView()),!0);if(!i.parent.isBlock)return!1;if(n){let o=s.parentOffset==s.parent.content.size,r=e.tr;(e.selection instanceof Ot||e.selection instanceof Oo)&&r.deleteSelection();let a=i.depth==0?null:T8(i.node(-1).contentMatchAt(i.indexAfter(-1))),l=t&&t(s.parent,o,i),c=l?[l]:o&&a?[{type:a}]:void 0,u=Gm(r.doc,r.mapping.map(i.pos),1,c);if(!c&&!u&&Gm(r.doc,r.mapping.map(i.pos),1,a?[{type:a}]:void 0)&&(a&&(c=[{type:a}]),u=!0),u&&(r.split(r.mapping.map(i.pos),1,c),!o&&!i.parentOffset&&i.parent.type!=a)){let d=r.mapping.map(i.before()),h=r.doc.resolve(d);a&&i.node(-1).canReplaceWith(h.index(),h.index()+1,a)&&r.setNodeMarkup(r.mapping.map(i.before()),a)}n(r.scrollIntoView())}return!0}}const s8e=n8e(),i8e=(t,e)=>(e&&e(t.tr.setSelection(new Oo(t.doc))),!0);function o8e(t,e,n){let i=e.nodeBefore,s=e.nodeAfter,o=e.index();return!i||!s||!i.type.compatibleContent(s.type)?!1:!i.content.size&&e.parent.canReplace(o-1,o)?(n&&n(t.tr.delete(e.pos-i.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(s.isTextblock||Yb(t.doc,e.pos))?!1:(n&&n(t.tr.clearIncompatible(e.pos,i.type,i.contentMatchAt(i.childCount)).join(e.pos).scrollIntoView()),!0)}function EN(t,e,n,i){let s=e.nodeBefore,o=e.nodeAfter,r,a,l=s.type.spec.isolating||o.type.spec.isolating;if(!l&&o8e(t,e,n))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(r=(a=s.contentMatchAt(s.childCount)).findWrapping(o.type))&&a.matchType(r[0]||o.type).validEnd){if(n){let f=e.pos+o.nodeSize,p=nt.empty;for(let b=r.length-1;b>=0;b--)p=nt.from(r[b].create(null,p));p=nt.from(s.copy(p));let m=t.tr.step(new xi(e.pos-1,f,e.pos,f,new rt(p,1,0),r.length,!0)),y=f+2*r.length;Yb(m.doc,y)&&m.join(y),n(m.scrollIntoView())}return!0}let u=o.type.spec.isolating||i>0&&l?null:Ht.findFrom(e,1),d=u&&u.$from.blockRange(u.$to),h=d&&Wb(d);if(h!=null&&h>=e.depth)return n&&n(t.tr.lift(d,h).scrollIntoView()),!0;if(c&&zf(o,"start",!0)&&zf(s,"end")){let f=s,p=[];for(;p.push(f),!f.isTextblock;)f=f.lastChild;let m=o,y=1;for(;!m.isTextblock;m=m.firstChild)y++;if(f.canReplace(f.childCount,f.childCount,m.content)){if(n){let b=nt.empty;for(let C=p.length-1;C>=0;C--)b=nt.from(p[C].copy(b));let k=t.tr.step(new xi(e.pos-p.length,e.pos+o.nodeSize,e.pos+y,e.pos+o.nodeSize-y,new rt(b,p.length,0),0,!0));n(k.scrollIntoView())}return!0}}return!1}function MN(t){return function(e,n){let i=e.selection,s=t<0?i.$from:i.$to,o=s.depth;for(;s.node(o).isInline;){if(!o)return!1;o--}return s.node(o).isTextblock?(n&&n(e.tr.setSelection(Ot.create(e.doc,t<0?s.start(o):s.end(o)))),!0):!1}}const r8e=MN(-1),a8e=MN(1);function P8(t,e=null){return function(n,i){let{$from:s,$to:o}=n.selection,r=s.blockRange(o),a=r&&C8(r,t,e);return a?(i&&i(n.tr.wrap(r,a).scrollIntoView()),!0):!1}}function jg(t,e=null){return function(n,i){let s=!1;for(let o=0;o<n.selection.ranges.length&&!s;o++){let{$from:{pos:r},$to:{pos:a}}=n.selection.ranges[o];n.doc.nodesBetween(r,a,(l,c)=>{if(s)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)s=!0;else{let u=n.doc.resolve(c),d=u.index();s=u.parent.canReplaceWith(d,d+1,t)}})}if(!s)return!1;if(i){let o=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:a},$to:{pos:l}}=n.selection.ranges[r];o.setBlockType(a,l,t,e)}i(o.scrollIntoView())}return!0}}function l8e(t,e,n,i){for(let s=0;s<e.length;s++){let{$from:o,$to:r}=e[s],a=o.depth==0?t.inlineContent&&t.type.allowsMarkType(n):!1;if(t.nodesBetween(o.pos,r.pos,(l,c)=>{if(a||!i&&l.isAtom&&l.isInline&&c>=o.pos&&c+l.nodeSize<=r.pos)return!1;a=l.inlineContent&&l.type.allowsMarkType(n)}),a)return!0}return!1}function c8e(t){let e=[];for(let n=0;n<t.length;n++){let{$from:i,$to:s}=t[n];i.doc.nodesBetween(i.pos,s.pos,(o,r)=>{if(o.isAtom&&o.content.size&&o.isInline&&r>=i.pos&&r+o.nodeSize<=s.pos)return r+1>i.pos&&e.push(new ky(i,i.doc.resolve(r+1))),i=i.doc.resolve(r+1+o.content.size),!1}),i.pos<s.pos&&e.push(new ky(i,s))}return e}function Zb(t,e=null,n){let i=(n&&n.removeWhenPresent)!==!1,s=(n&&n.enterInlineAtoms)!==!1;return function(o,r){let{empty:a,$cursor:l,ranges:c}=o.selection;if(a&&!l||!l8e(o.doc,c,t,s))return!1;if(r)if(l)t.isInSet(o.storedMarks||l.marks())?r(o.tr.removeStoredMark(t)):r(o.tr.addStoredMark(t.create(e)));else{let u,d=o.tr;s||(c=c8e(c)),i?u=!c.some(h=>o.doc.rangeHasMark(h.$from.pos,h.$to.pos,t)):u=!c.every(h=>{let f=!1;return d.doc.nodesBetween(h.$from.pos,h.$to.pos,(p,m,y)=>{if(f)return!1;f=!t.isInSet(p.marks)&&!!y&&y.type.allowsMarkType(t)&&!(p.isText&&/^\s*$/.test(p.textBetween(Math.max(0,h.$from.pos-m),Math.min(p.nodeSize,h.$to.pos-m))))}),!f});for(let h=0;h<c.length;h++){let{$from:f,$to:p}=c[h];if(!u)d.removeMark(f.pos,p.pos,t);else{let m=f.pos,y=p.pos,b=f.nodeAfter,k=p.nodeBefore,C=b&&b.isText?/^\s*/.exec(b.text)[0].length:0,$=k&&k.isText?/\s*$/.exec(k.text)[0].length:0;m+C<y&&(m+=C,y-=$),d.addMark(m,y,t.create(e))}}r(d.scrollIntoView())}return!0}}function Jb(...t){return function(e,n,i){for(let s=0;s<t.length;s++)if(t[s](e,n,i))return!0;return!1}}let Nw=Jb(M8,xN,SN),SE=Jb(M8,K4e,Z4e);const Ha={Enter:Jb(J4e,e8e,t8e,s8e),"Mod-Enter":Q4e,Backspace:Nw,"Mod-Backspace":Nw,"Shift-Backspace":Nw,Delete:SE,"Mod-Delete":SE,"Mod-a":i8e},TN={"Ctrl-h":Ha.Backspace,"Alt-Backspace":Ha["Mod-Backspace"],"Ctrl-d":Ha.Delete,"Ctrl-Alt-Backspace":Ha["Mod-Delete"],"Alt-Delete":Ha["Mod-Delete"],"Alt-d":Ha["Mod-Delete"],"Ctrl-a":r8e,"Ctrl-e":a8e};for(let t in Ha)TN[t]=Ha[t];const u8e=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,d8e=u8e?TN:Ha;var Pc={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Cy={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},h8e=typeof navigator<"u"&&/Mac/.test(navigator.platform),f8e=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ti=0;ti<10;ti++)Pc[48+ti]=Pc[96+ti]=String(ti);for(var ti=1;ti<=24;ti++)Pc[ti+111]="F"+ti;for(var ti=65;ti<=90;ti++)Pc[ti]=String.fromCharCode(ti+32),Cy[ti]=String.fromCharCode(ti);for(var Bw in Pc)Cy.hasOwnProperty(Bw)||(Cy[Bw]=Pc[Bw]);function p8e(t){var e=h8e&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||f8e&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Cy:Pc)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}const m8e=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function g8e(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let i,s,o,r;for(let a=0;a<e.length-1;a++){let l=e[a];if(/^(cmd|meta|m)$/i.test(l))r=!0;else if(/^a(lt)?$/i.test(l))i=!0;else if(/^(c|ctrl|control)$/i.test(l))s=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))m8e?r=!0:s=!0;else throw new Error("Unrecognized modifier name: "+l)}return i&&(n="Alt-"+n),s&&(n="Ctrl-"+n),r&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function v8e(t){let e=Object.create(null);for(let n in t)e[g8e(n)]=t[n];return e}function zw(t,e,n=!0){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n&&e.shiftKey&&(t="Shift-"+t),t}function PN(t){return new ts({props:{handleKeyDown:IN(t)}})}function IN(t){let e=v8e(t);return function(n,i){let s=p8e(i),o,r=e[zw(s,i)];if(r&&r(n.state,n.dispatch,n))return!0;if(s.length==1&&s!=" "){if(i.shiftKey){let a=e[zw(s,i,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((i.shiftKey||i.altKey||i.metaKey||s.charCodeAt(0)>127)&&(o=Pc[i.keyCode])&&o!=s){let a=e[zw(o,i)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const ni=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Wg=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let I6=null;const za=function(t,e,n){let i=I6||(I6=document.createRange());return i.setEnd(t,n??t.nodeValue.length),i.setStart(t,e||0),i},_8e=function(){I6=null},md=function(t,e,n,i){return n&&($E(t,e,n,i,-1)||$E(t,e,n,i,1))},y8e=/^(img|br|input|textarea|hr)$/i;function $E(t,e,n,i,s){for(;;){if(t==n&&e==i)return!0;if(e==(s<0?0:da(t))){let o=t.parentNode;if(!o||o.nodeType!=1||V1(t)||y8e.test(t.nodeName)||t.contentEditable=="false")return!1;e=ni(t)+(s<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(s<0?-1:0)],t.contentEditable=="false")return!1;e=s<0?da(t):0}else return!1}}function da(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function b8e(t,e){for(;;){if(t.nodeType==3&&e)return t;if(t.nodeType==1&&e>0){if(t.contentEditable=="false")return null;t=t.childNodes[e-1],e=da(t)}else if(t.parentNode&&!V1(t))e=ni(t),t=t.parentNode;else return null}}function w8e(t,e){for(;;){if(t.nodeType==3&&e<t.nodeValue.length)return t;if(t.nodeType==1&&e<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[e],e=0}else if(t.parentNode&&!V1(t))e=ni(t)+1,t=t.parentNode;else return null}}function k8e(t,e,n){for(let i=e==0,s=e==da(t);i||s;){if(t==n)return!0;let o=ni(t);if(t=t.parentNode,!t)return!1;i=i&&o==0,s=s&&o==da(t)}}function V1(t){let e;for(let n=t;n&&!(e=n.pmViewDesc);n=n.parentNode);return e&&e.node&&e.node.isBlock&&(e.dom==t||e.contentDOM==t)}const Qb=function(t){return t.focusNode&&md(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Cu(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function C8e(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function x8e(t,e,n){if(t.caretPositionFromPoint)try{let i=t.caretPositionFromPoint(e,n);if(i)return{node:i.offsetNode,offset:i.offset}}catch{}if(t.caretRangeFromPoint){let i=t.caretRangeFromPoint(e,n);if(i)return{node:i.startContainer,offset:i.startOffset}}}const ka=typeof navigator<"u"?navigator:null,AE=typeof document<"u"?document:null,Gc=ka&&ka.userAgent||"",L6=/Edge\/(\d+)/.exec(Gc),LN=/MSIE \d/.exec(Gc),O6=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Gc),ao=!!(LN||O6||L6),bc=LN?document.documentMode:O6?+O6[1]:L6?+L6[1]:0,Nr=!ao&&/gecko\/(\d+)/i.test(Gc);Nr&&+(/Firefox\/(\d+)/.exec(Gc)||[0,0])[1];const D6=!ao&&/Chrome\/(\d+)/.exec(Gc),wi=!!D6,ON=D6?+D6[1]:0,zi=!ao&&!!ka&&/Apple Computer/.test(ka.vendor),Hf=zi&&(/Mobile\/\w+/.test(Gc)||!!ka&&ka.maxTouchPoints>2),Xo=Hf||(ka?/Mac/.test(ka.platform):!1),S8e=ka?/Win/.test(ka.platform):!1,kr=/Android \d/.test(Gc),F1=!!AE&&"webkitFontSmoothing"in AE.documentElement.style,$8e=F1?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function A8e(t){let e=t.defaultView&&t.defaultView.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.documentElement.clientWidth,top:0,bottom:t.documentElement.clientHeight}}function Ra(t,e){return typeof t=="number"?t:t[e]}function E8e(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,i=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*i}}function EE(t,e,n){let i=t.someProp("scrollThreshold")||0,s=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let r=n||t.dom;r;r=Wg(r)){if(r.nodeType!=1)continue;let a=r,l=a==o.body,c=l?A8e(o):E8e(a),u=0,d=0;if(e.top<c.top+Ra(i,"top")?d=-(c.top-e.top+Ra(s,"top")):e.bottom>c.bottom-Ra(i,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+Ra(s,"top")-c.top:e.bottom-c.bottom+Ra(s,"bottom")),e.left<c.left+Ra(i,"left")?u=-(c.left-e.left+Ra(s,"left")):e.right>c.right-Ra(i,"right")&&(u=e.right-c.right+Ra(s,"right")),u||d)if(l)o.defaultView.scrollBy(u,d);else{let h=a.scrollLeft,f=a.scrollTop;d&&(a.scrollTop+=d),u&&(a.scrollLeft+=u);let p=a.scrollLeft-h,m=a.scrollTop-f;e={left:e.left-p,top:e.top-m,right:e.right-p,bottom:e.bottom-m}}if(l||/^(fixed|sticky)$/.test(getComputedStyle(r).position))break}}function M8e(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),i,s;for(let o=(e.left+e.right)/2,r=n+1;r<Math.min(innerHeight,e.bottom);r+=5){let a=t.root.elementFromPoint(o,r);if(!a||a==t.dom||!t.dom.contains(a))continue;let l=a.getBoundingClientRect();if(l.top>=n-20){i=a,s=l.top;break}}return{refDOM:i,refTop:s,stack:DN(t.dom)}}function DN(t){let e=[],n=t.ownerDocument;for(let i=t;i&&(e.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),t!=n);i=Wg(i));return e}function T8e({refDOM:t,refTop:e,stack:n}){let i=t?t.getBoundingClientRect().top:0;RN(n,i==0?0:i-e)}function RN(t,e){for(let n=0;n<t.length;n++){let{dom:i,top:s,left:o}=t[n];i.scrollTop!=s+e&&(i.scrollTop=s+e),i.scrollLeft!=o&&(i.scrollLeft=o)}}let th=null;function P8e(t){if(t.setActive)return t.setActive();if(th)return t.focus(th);let e=DN(t);t.focus(th==null?{get preventScroll(){return th={preventScroll:!0},!0}}:void 0),th||(th=!1,RN(e,0))}function VN(t,e){let n,i=2e8,s,o=0,r=e.top,a=e.top,l,c;for(let u=t.firstChild,d=0;u;u=u.nextSibling,d++){let h;if(u.nodeType==1)h=u.getClientRects();else if(u.nodeType==3)h=za(u).getClientRects();else continue;for(let f=0;f<h.length;f++){let p=h[f];if(p.top<=r&&p.bottom>=a){r=Math.max(p.bottom,r),a=Math.min(p.top,a);let m=p.left>e.left?p.left-e.left:p.right<e.left?e.left-p.right:0;if(m<i){n=u,i=m,s=m&&n.nodeType==3?{left:p.right<e.left?p.right:p.left,top:e.top}:e,u.nodeType==1&&m&&(o=d+(e.left>=(p.left+p.right)/2?1:0));continue}}else p.top>e.top&&!l&&p.left<=e.left&&p.right>=e.left&&(l=u,c={left:Math.max(p.left,Math.min(p.right,e.left)),top:p.top});!n&&(e.left>=p.right&&e.top>=p.top||e.left>=p.left&&e.top>=p.bottom)&&(o=d+1)}}return!n&&l&&(n=l,s=c,i=0),n&&n.nodeType==3?I8e(n,s):!n||i&&n.nodeType==1?{node:t,offset:o}:VN(n,s)}function I8e(t,e){let n=t.nodeValue.length,i=document.createRange();for(let s=0;s<n;s++){i.setEnd(t,s+1),i.setStart(t,s);let o=Bl(i,1);if(o.top!=o.bottom&&I8(e,o))return{node:t,offset:s+(e.left>=(o.left+o.right)/2?1:0)}}return{node:t,offset:0}}function I8(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function L8e(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function O8e(t,e,n){let{node:i,offset:s}=VN(e,n),o=-1;if(i.nodeType==1&&!i.firstChild){let r=i.getBoundingClientRect();o=r.left!=r.right&&n.left>(r.left+r.right)/2?1:-1}return t.docView.posFromDOM(i,s,o)}function D8e(t,e,n,i){let s=-1;for(let o=e,r=!1;o!=t.dom;){let a=t.docView.nearestDesc(o,!0);if(!a)return null;if(a.dom.nodeType==1&&(a.node.isBlock&&a.parent||!a.contentDOM)){let l=a.dom.getBoundingClientRect();if(a.node.isBlock&&a.parent&&(!r&&l.left>i.left||l.top>i.top?s=a.posBefore:(!r&&l.right<i.left||l.bottom<i.top)&&(s=a.posAfter),r=!0),!a.contentDOM&&s<0&&!a.node.isText)return(a.node.isBlock?i.top<(l.top+l.bottom)/2:i.left<(l.left+l.right)/2)?a.posBefore:a.posAfter}o=a.dom.parentNode}return s>-1?s:t.docView.posFromDOM(e,n,-1)}function FN(t,e,n){let i=t.childNodes.length;if(i&&n.top<n.bottom)for(let s=Math.max(0,Math.min(i-1,Math.floor(i*(e.top-n.top)/(n.bottom-n.top))-2)),o=s;;){let r=t.childNodes[o];if(r.nodeType==1){let a=r.getClientRects();for(let l=0;l<a.length;l++){let c=a[l];if(I8(e,c))return FN(r,e,c)}}if((o=(o+1)%i)==s)break}return t}function R8e(t,e){let n=t.dom.ownerDocument,i,s=0,o=x8e(n,e.left,e.top);o&&({node:i,offset:s}=o);let r=(t.root.elementFromPoint?t.root:n).elementFromPoint(e.left,e.top),a;if(!r||!t.dom.contains(r.nodeType!=1?r.parentNode:r)){let c=t.dom.getBoundingClientRect();if(!I8(e,c)||(r=FN(t.dom,e,c),!r))return null}if(zi)for(let c=r;i&&c;c=Wg(c))c.draggable&&(i=void 0);if(r=L8e(r,e),i){if(Nr&&i.nodeType==1&&(s=Math.min(s,i.childNodes.length),s<i.childNodes.length)){let u=i.childNodes[s],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&s++}let c;F1&&s&&i.nodeType==1&&(c=i.childNodes[s-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&s--,i==t.dom&&s==i.childNodes.length-1&&i.lastChild.nodeType==1&&e.top>i.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(s==0||i.nodeType!=1||i.childNodes[s-1].nodeName!="BR")&&(a=D8e(t,i,s,e))}a==null&&(a=O8e(t,r,e));let l=t.docView.nearestDesc(r,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function ME(t){return t.top<t.bottom||t.left<t.right}function Bl(t,e){let n=t.getClientRects();if(n.length){let i=n[e<0?0:n.length-1];if(ME(i))return i}return Array.prototype.find.call(n,ME)||t.getBoundingClientRect()}const V8e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function NN(t,e,n){let{node:i,offset:s,atom:o}=t.docView.domFromPos(e,n<0?-1:1),r=F1||Nr;if(i.nodeType==3)if(r&&(V8e.test(i.nodeValue)||(n<0?!s:s==i.nodeValue.length))){let l=Bl(za(i,s,s),n);if(Nr&&s&&/\s/.test(i.nodeValue[s-1])&&s<i.nodeValue.length){let c=Bl(za(i,s-1,s-1),-1);if(c.top==l.top){let u=Bl(za(i,s,s+1),-1);if(u.top!=l.top)return Np(u,u.left<c.left)}}return l}else{let l=s,c=s,u=n<0?1:-1;return n<0&&!s?(c++,u=-1):n>=0&&s==i.nodeValue.length?(l--,u=1):n<0?l--:c++,Np(Bl(za(i,l,c),u),u<0)}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&s&&(n<0||s==da(i))){let l=i.childNodes[s-1];if(l.nodeType==1)return Hw(l.getBoundingClientRect(),!1)}if(o==null&&s<da(i)){let l=i.childNodes[s];if(l.nodeType==1)return Hw(l.getBoundingClientRect(),!0)}return Hw(i.getBoundingClientRect(),n>=0)}if(o==null&&s&&(n<0||s==da(i))){let l=i.childNodes[s-1],c=l.nodeType==3?za(l,da(l)-(r?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return Np(Bl(c,1),!1)}if(o==null&&s<da(i)){let l=i.childNodes[s];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?za(l,0,r?0:1):l.nodeType==1?l:null:null;if(c)return Np(Bl(c,-1),!0)}return Np(Bl(i.nodeType==3?za(i):i,-n),n>=0)}function Np(t,e){if(t.width==0)return t;let n=e?t.left:t.right;return{top:t.top,bottom:t.bottom,left:n,right:n}}function Hw(t,e){if(t.height==0)return t;let n=e?t.top:t.bottom;return{top:n,bottom:n,left:t.left,right:t.right}}function BN(t,e,n){let i=t.state,s=t.root.activeElement;i!=e&&t.updateState(e),s!=t.dom&&t.focus();try{return n()}finally{i!=e&&t.updateState(i),s!=t.dom&&s&&s.focus()}}function F8e(t,e,n){let i=e.selection,s=n=="up"?i.$from:i.$to;return BN(t,e,()=>{let{node:o}=t.docView.domFromPos(s.pos,n=="up"?-1:1);for(;;){let a=t.docView.nearestDesc(o,!0);if(!a)break;if(a.node.isBlock){o=a.contentDOM||a.dom;break}o=a.dom.parentNode}let r=NN(t,s.pos,1);for(let a=o.firstChild;a;a=a.nextSibling){let l;if(a.nodeType==1)l=a.getClientRects();else if(a.nodeType==3)l=za(a,0,a.nodeValue.length).getClientRects();else continue;for(let c=0;c<l.length;c++){let u=l[c];if(u.bottom>u.top+1&&(n=="up"?r.top-u.top>(u.bottom-r.top)*2:u.bottom-r.bottom>(r.bottom-u.top)*2))return!1}}return!0})}const N8e=/[\u0590-\u08ac]/;function B8e(t,e,n){let{$head:i}=e.selection;if(!i.parent.isTextblock)return!1;let s=i.parentOffset,o=!s,r=s==i.parent.content.size,a=t.domSelection();return a?!N8e.test(i.parent.textContent)||!a.modify?n=="left"||n=="backward"?o:r:BN(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=t.domSelectionRange(),h=a.caretBidiLevel;a.modify("move",n,"character");let f=i.depth?t.docView.domAfterPos(i.before()):t.dom,{focusNode:p,focusOffset:m}=t.domSelectionRange(),y=p&&!f.contains(p.nodeType==1?p:p.parentNode)||l==p&&c==m;try{a.collapse(u,d),l&&(l!=u||c!=d)&&a.extend&&a.extend(l,c)}catch{}return h!=null&&(a.caretBidiLevel=h),y}):i.pos==i.start()||i.pos==i.end()}let TE=null,PE=null,IE=!1;function z8e(t,e,n){return TE==e&&PE==n?IE:(TE=e,PE=n,IE=n=="up"||n=="down"?F8e(t,e,n):B8e(t,e,n))}const ar=0,LE=1,Iu=2,Ca=3;class N1{constructor(e,n,i,s){this.parent=e,this.children=n,this.dom=i,this.contentDOM=s,this.dirty=ar,i.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,i){return!1}matchesHack(e){return!1}parseRule(){return null}stopEvent(e){return!1}get size(){let e=0;for(let n=0;n<this.children.length;n++)e+=this.children[n].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let n=0,i=this.posAtStart;;n++){let s=this.children[n];if(s==e)return i;i+=s.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,n,i){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(i<0){let o,r;if(e==this.contentDOM)o=e.childNodes[n-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.previousSibling}for(;o&&!((r=o.pmViewDesc)&&r.parent==this);)o=o.previousSibling;return o?this.posBeforeChild(r)+r.size:this.posAtStart}else{let o,r;if(e==this.contentDOM)o=e.childNodes[n];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;o=e.nextSibling}for(;o&&!((r=o.pmViewDesc)&&r.parent==this);)o=o.nextSibling;return o?this.posBeforeChild(r):this.posAtEnd}let s;if(e==this.dom&&this.contentDOM)s=n>ni(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))s=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let o=e;;o=o.parentNode){if(o==this.dom){s=!1;break}if(o.previousSibling)break}if(s==null&&n==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){s=!0;break}if(o.nextSibling)break}}return s??i>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let i=!0,s=e;s;s=s.parentNode){let o=this.getDesc(s),r;if(o&&(!n||o.node))if(i&&(r=o.nodeDOM)&&!(r.nodeType==1?r.contains(e.nodeType==1?e:e.parentNode):r==e))i=!1;else return o}}getDesc(e){let n=e.pmViewDesc;for(let i=n;i;i=i.parent)if(i==this)return n}posFromDOM(e,n,i){for(let s=e;s;s=s.parentNode){let o=this.getDesc(s);if(o)return o.localPosFromDOM(e,n,i)}return-1}descAt(e){for(let n=0,i=0;n<this.children.length;n++){let s=this.children[n],o=i+s.size;if(i==e&&o!=i){for(;!s.border&&s.children.length;)s=s.children[0];return s}if(e<o)return s.descAt(e-i-s.border);i=o}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let i=0,s=0;for(let o=0;i<this.children.length;i++){let r=this.children[i],a=o+r.size;if(a>e||r instanceof HN){s=e-o;break}o=a}if(s)return this.children[i].domFromPos(s-this.children[i].border,n);for(let o;i&&!(o=this.children[i-1]).size&&o instanceof zN&&o.side>=0;i--);if(n<=0){let o,r=!0;for(;o=i?this.children[i-1]:null,!(!o||o.dom.parentNode==this.contentDOM);i--,r=!1);return o&&n&&r&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?ni(o.dom)+1:0}}else{let o,r=!0;for(;o=i<this.children.length?this.children[i]:null,!(!o||o.dom.parentNode==this.contentDOM);i++,r=!1);return o&&r&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?ni(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,i=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let s=-1,o=-1;for(let r=i,a=0;;a++){let l=this.children[a],c=r+l.size;if(s==-1&&e<=c){let u=r+l.border;if(e>=u&&n<=c-l.border&&l.node&&l.contentDOM&&this.contentDOM.contains(l.contentDOM))return l.parseRange(e,n,u);e=r;for(let d=a;d>0;d--){let h=this.children[d-1];if(h.size&&h.dom.parentNode==this.contentDOM&&!h.emptyChildAt(1)){s=ni(h.dom)+1;break}e-=h.size}s==-1&&(s=0)}if(s>-1&&(c>n||a==this.children.length-1)){n=c;for(let u=a+1;u<this.children.length;u++){let d=this.children[u];if(d.size&&d.dom.parentNode==this.contentDOM&&!d.emptyChildAt(-1)){o=ni(d.dom);break}n+=d.size}o==-1&&(o=this.contentDOM.childNodes.length);break}r=c}return{node:this.contentDOM,from:e,to:n,fromOffset:s,toOffset:o}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let n=this.children[e<0?0:this.children.length-1];return n.size==0||n.emptyChildAt(e)}domAfterPos(e){let{node:n,offset:i}=this.domFromPos(e,0);if(n.nodeType!=1||i==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[i]}setSelection(e,n,i,s=!1){let o=Math.min(e,n),r=Math.max(e,n);for(let h=0,f=0;h<this.children.length;h++){let p=this.children[h],m=f+p.size;if(o>f&&r<m)return p.setSelection(e-f-p.border,n-f-p.border,i,s);f=m}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),c=i.getSelection(),u=!1;if((Nr||zi)&&e==n){let{node:h,offset:f}=a;if(h.nodeType==3){if(u=!!(f&&h.nodeValue[f-1]==`
`),u&&f==h.nodeValue.length)for(let p=h,m;p;p=p.parentNode){if(m=p.nextSibling){m.nodeName=="BR"&&(a=l={node:m.parentNode,offset:ni(m)+1});break}let y=p.pmViewDesc;if(y&&y.node&&y.node.isBlock)break}}else{let p=h.childNodes[f-1];u=p&&(p.nodeName=="BR"||p.contentEditable=="false")}}if(Nr&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let h=c.focusNode.childNodes[c.focusOffset];h&&h.contentEditable=="false"&&(s=!0)}if(!(s||u&&zi)&&md(a.node,a.offset,c.anchorNode,c.anchorOffset)&&md(l.node,l.offset,c.focusNode,c.focusOffset))return;let d=!1;if((c.extend||e==n)&&!u){c.collapse(a.node,a.offset);try{e!=n&&c.extend(l.node,l.offset),d=!0}catch{}}if(!d){if(e>n){let f=a;a=l,l=f}let h=document.createRange();h.setEnd(l.node,l.offset),h.setStart(a.node,a.offset),c.removeAllRanges(),c.addRange(h)}}ignoreMutation(e){return!this.contentDOM&&e.type!="selection"}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,n){for(let i=0,s=0;s<this.children.length;s++){let o=this.children[s],r=i+o.size;if(i==r?e<=r&&n>=i:e<r&&n>i){let a=i+o.border,l=r-o.border;if(e>=a&&n<=l){this.dirty=e==i||n==r?Iu:LE,e==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Ca:o.markDirty(e-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?Iu:Ca}i=r}this.dirty=Iu}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let i=e==1?Iu:LE;n.dirty<i&&(n.dirty=i)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class zN extends N1{constructor(e,n,i,s){let o,r=n.type.toDOM;if(typeof r=="function"&&(r=r(i,()=>{if(!o)return s;if(o.parent)return o.parent.posBeforeChild(o)})),!n.type.spec.raw){if(r.nodeType!=1){let a=document.createElement("span");a.appendChild(r),r=a}r.contentEditable="false",r.classList.add("ProseMirror-widget")}super(e,[],r,null),this.widget=n,this.widget=n,o=this}matchesWidget(e){return this.dirty==ar&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let n=this.widget.spec.stopEvent;return n?n(e):!1}ignoreMutation(e){return e.type!="selection"||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get side(){return this.widget.type.side}}class H8e extends N1{constructor(e,n,i,s){super(e,[],n,null),this.textDOM=i,this.text=s}get size(){return this.text.length}localPosFromDOM(e,n){return e!=this.textDOM?this.posAtStart+(n?this.size:0):this.posAtStart+n}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type==="characterData"&&e.target.nodeValue==e.oldValue}}class gd extends N1{constructor(e,n,i,s){super(e,[],i,s),this.mark=n}static create(e,n,i,s){let o=s.nodeViews[n.type.name],r=o&&o(n,s,i);return(!r||!r.dom)&&(r=Wc.renderSpec(document,n.type.spec.toDOM(n,i),null,n.attrs)),new gd(e,n,r.dom,r.contentDOM||r.dom)}parseRule(){return this.dirty&Ca||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Ca&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=ar){let i=this.parent;for(;!i.node;)i=i.parent;i.dirty<this.dirty&&(i.dirty=this.dirty),this.dirty=ar}}slice(e,n,i){let s=gd.create(this.parent,this.mark,!0,i),o=this.children,r=this.size;n<r&&(o=F6(o,n,r,i)),e>0&&(o=F6(o,0,e,i));for(let a=0;a<o.length;a++)o[a].parent=s;return s.children=o,s}}class wc extends N1{constructor(e,n,i,s,o,r,a,l,c){super(e,[],o,r),this.node=n,this.outerDeco=i,this.innerDeco=s,this.nodeDOM=a}static create(e,n,i,s,o,r){let a=o.nodeViews[n.type.name],l,c=a&&a(n,o,()=>{if(!l)return r;if(l.parent)return l.parent.posBeforeChild(l)},i,s),u=c&&c.dom,d=c&&c.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(u.nodeType!=3)throw new RangeError("Text must be rendered as a DOM text node")}else u||({dom:u,contentDOM:d}=Wc.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs));!d&&!n.isText&&u.nodeName!="BR"&&(u.hasAttribute("contenteditable")||(u.contentEditable="false"),n.type.spec.draggable&&(u.draggable=!0));let h=u;return u=WN(u,i,n),c?l=new U8e(e,n,i,s,u,d||null,h,c,o,r+1):n.isText?new e2(e,n,i,s,u,h,o):new wc(e,n,i,s,u,d||null,h,o,r+1)}parseRule(){if(this.node.type.spec.reparseInView)return null;let e={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace=="pre"&&(e.preserveWhitespace="full"),!this.contentDOM)e.getContent=()=>this.node.content;else if(!this.contentLost)e.contentElement=this.contentDOM;else{for(let n=this.children.length-1;n>=0;n--){let i=this.children[n];if(this.dom.contains(i.dom.parentNode)){e.contentElement=i.dom.parentNode;break}}e.contentElement||(e.getContent=()=>nt.empty)}return e}matchesNode(e,n,i){return this.dirty==ar&&e.eq(this.node)&&V6(n,this.outerDeco)&&i.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let i=this.node.inlineContent,s=n,o=e.composing?this.localCompositionInfo(e,n):null,r=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new W8e(this,r&&r.node,e);G8e(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,i,e):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?En.none:this.node.child(u).marks,i,e),l.placeWidget(c,e,s)},(c,u,d,h)=>{l.syncToMarks(c.marks,i,e);let f;l.findNodeMatch(c,u,d,h)||a&&e.state.selection.from>s&&e.state.selection.to<s+c.nodeSize&&(f=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(c,u,d,f,e)||l.updateNextNode(c,u,d,e,h,s)||l.addNode(c,u,d,e,s),s+=c.nodeSize}),l.syncToMarks([],i,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==Iu)&&(r&&this.protectLocalComposition(e,r),UN(this.contentDOM,this.children,e),Hf&&X8e(this.dom))}localCompositionInfo(e,n){let{from:i,to:s}=e.state.selection;if(!(e.state.selection instanceof Ot)||i<n||s>n+this.node.content.size)return null;let o=e.input.compositionNode;if(!o||!this.dom.contains(o.parentNode))return null;if(this.node.inlineContent){let r=o.nodeValue,a=K8e(this.node.content,r,i-n,s-n);return a<0?null:{node:o,pos:a,text:r}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:i,text:s}){if(this.getDesc(n))return;let o=n;for(;o.parentNode!=this.contentDOM;o=o.parentNode){for(;o.previousSibling;)o.parentNode.removeChild(o.previousSibling);for(;o.nextSibling;)o.parentNode.removeChild(o.nextSibling);o.pmViewDesc&&(o.pmViewDesc=void 0)}let r=new H8e(this,o,n,s);e.input.compositionNodes.push(r),this.children=F6(this.children,i,i+s.length,e,r)}update(e,n,i,s){return this.dirty==Ca||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,i,s),!0)}updateInner(e,n,i,s){this.updateOuterDeco(n),this.node=e,this.innerDeco=i,this.contentDOM&&this.updateChildren(s,this.posAtStart),this.dirty=ar}updateOuterDeco(e){if(V6(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,i=this.dom;this.dom=jN(this.dom,this.nodeDOM,R6(this.outerDeco,this.node,n),R6(e,this.node,n)),this.dom!=i&&(i.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){this.nodeDOM.nodeType==1&&this.nodeDOM.classList.add("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&(this.dom.draggable=!0)}deselectNode(){this.nodeDOM.nodeType==1&&(this.nodeDOM.classList.remove("ProseMirror-selectednode"),(this.contentDOM||!this.node.type.spec.draggable)&&this.dom.removeAttribute("draggable"))}get domAtom(){return this.node.isAtom}}function OE(t,e,n,i,s){WN(i,e,t);let o=new wc(void 0,t,e,n,i,i,i,s,0);return o.contentDOM&&o.updateChildren(s,0),o}class e2 extends wc{constructor(e,n,i,s,o,r,a){super(e,n,i,s,o,null,r,a,0)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,n,i,s){return this.dirty==Ca||this.dirty!=ar&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=ar||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,s.trackWrites==this.nodeDOM&&(s.trackWrites=null)),this.node=e,this.dirty=ar,!0)}inParent(){let e=this.parent.contentDOM;for(let n=this.nodeDOM;n;n=n.parentNode)if(n==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,n,i){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,i)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,i){let s=this.node.cut(e,n),o=document.createTextNode(s.text);return new e2(this.parent,s,this.outerDeco,this.innerDeco,o,o,i)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=Ca)}get domAtom(){return!1}isText(e){return this.node.text==e}}class HN extends N1{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==ar&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class U8e extends wc{constructor(e,n,i,s,o,r,a,l,c,u){super(e,n,i,s,o,r,a,c,u),this.spec=l}update(e,n,i,s){if(this.dirty==Ca)return!1;if(this.spec.update){let o=this.spec.update(e,n,i);return o&&this.updateInner(e,n,i,s),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,i,s)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,i,s){this.spec.setSelection?this.spec.setSelection(e,n,i):super.setSelection(e,n,i,s)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}}function UN(t,e,n){let i=t.firstChild,s=!1;for(let o=0;o<e.length;o++){let r=e[o],a=r.dom;if(a.parentNode==t){for(;a!=i;)i=DE(i),s=!0;i=i.nextSibling}else s=!0,t.insertBefore(a,i);if(r instanceof gd){let l=i?i.previousSibling:t.lastChild;UN(r.contentDOM,r.children,n),i=l?l.nextSibling:t.firstChild}}for(;i;)i=DE(i),s=!0;s&&n.trackWrites==t&&(n.trackWrites=null)}const Xm=function(t){t&&(this.nodeName=t)};Xm.prototype=Object.create(null);const Lu=[new Xm];function R6(t,e,n){if(t.length==0)return Lu;let i=n?Lu[0]:new Xm,s=[i];for(let o=0;o<t.length;o++){let r=t[o].type.attrs;if(r){r.nodeName&&s.push(i=new Xm(r.nodeName));for(let a in r){let l=r[a];l!=null&&(n&&s.length==1&&s.push(i=new Xm(e.isInline?"span":"div")),a=="class"?i.class=(i.class?i.class+" ":"")+l:a=="style"?i.style=(i.style?i.style+";":"")+l:a!="nodeName"&&(i[a]=l))}}}return s}function jN(t,e,n,i){if(n==Lu&&i==Lu)return e;let s=e;for(let o=0;o<i.length;o++){let r=i[o],a=n[o];if(o){let l;a&&a.nodeName==r.nodeName&&s!=t&&(l=s.parentNode)&&l.nodeName.toLowerCase()==r.nodeName||(l=document.createElement(r.nodeName),l.pmIsDeco=!0,l.appendChild(s),a=Lu[0]),s=l}j8e(s,a||Lu[0],r)}return s}function j8e(t,e,n){for(let i in e)i!="class"&&i!="style"&&i!="nodeName"&&!(i in n)&&t.removeAttribute(i);for(let i in n)i!="class"&&i!="style"&&i!="nodeName"&&n[i]!=e[i]&&t.setAttribute(i,n[i]);if(e.class!=n.class){let i=e.class?e.class.split(" ").filter(Boolean):[],s=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<i.length;o++)s.indexOf(i[o])==-1&&t.classList.remove(i[o]);for(let o=0;o<s.length;o++)i.indexOf(s[o])==-1&&t.classList.add(s[o]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let i=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,s;for(;s=i.exec(e.style);)t.style.removeProperty(s[1])}n.style&&(t.style.cssText+=n.style)}}function WN(t,e,n){return jN(t,t,Lu,R6(e,n,t.nodeType!=1))}function V6(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].type.eq(e[n].type))return!1;return!0}function DE(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class W8e{constructor(e,n,i){this.lock=n,this.view=i,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=Y8e(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let i=e;i<n;i++)this.top.children[i].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,i){let s=0,o=this.stack.length>>1,r=Math.min(o,e.length);for(;s<r&&(s==o-1?this.top:this.stack[s+1<<1]).matchesMark(e[s])&&e[s].type.spec.spanning!==!1;)s++;for(;s<o;)this.destroyRest(),this.top.dirty=ar,this.index=this.stack.pop(),this.top=this.stack.pop(),o--;for(;o<e.length;){this.stack.push(this.top,this.index+1);let a=-1;for(let l=this.index;l<Math.min(this.index+3,this.top.children.length);l++){let c=this.top.children[l];if(c.matchesMark(e[o])&&!this.isLocked(c.dom)){a=l;break}}if(a>-1)a>this.index&&(this.changed=!0,this.destroyBetween(this.index,a)),this.top=this.top.children[this.index];else{let l=gd.create(this.top,e[o],n,i);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}findNodeMatch(e,n,i,s){let o=-1,r;if(s>=this.preMatch.index&&(r=this.preMatch.matches[s-this.preMatch.index]).parent==this.top&&r.matchesNode(e,n,i))o=this.top.children.indexOf(r,this.index);else for(let a=this.index,l=Math.min(this.top.children.length,a+5);a<l;a++){let c=this.top.children[a];if(c.matchesNode(e,n,i)&&!this.preMatch.matched.has(c)){o=a;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,n,i,s,o){let r=this.top.children[s];return r.dirty==Ca&&r.dom==r.contentDOM&&(r.dirty=Iu),r.update(e,n,i,o)?(this.destroyBetween(this.index,s),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let i=e.pmViewDesc;if(i){for(let s=this.index;s<this.top.children.length;s++)if(this.top.children[s]==i)return s}return-1}e=n}}updateNextNode(e,n,i,s,o,r){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof wc){let c=this.preMatch.matched.get(l);if(c!=null&&c!=o)return!1;let u=l.dom,d,h=this.isLocked(u)&&!(e.isText&&l.node&&l.node.isText&&l.nodeDOM.nodeValue==e.text&&l.dirty!=Ca&&V6(n,l.outerDeco));if(!h&&l.update(e,n,i,s))return this.destroyBetween(this.index,a),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!h&&(d=this.recreateWrapper(l,e,n,i,s,r)))return this.top.children[this.index]=d,d.contentDOM&&(d.dirty=Iu,d.updateChildren(s,r+1),d.dirty=ar),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,i,s,o,r){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content))return null;let a=wc.create(this.top,n,i,s,o,r);if(a.contentDOM){a.children=e.children,e.children=[];for(let l of a.children)l.parent=a}return e.destroy(),a}addNode(e,n,i,s,o){let r=wc.create(this.top,e,n,i,s,o);r.contentDOM&&r.updateChildren(s,o+1),this.top.children.splice(this.index++,0,r),this.changed=!0}placeWidget(e,n,i){let s=this.index<this.top.children.length?this.top.children[this.index]:null;if(s&&s.matchesWidget(e)&&(e==s.widget||!s.widget.type.toDOM.parentNode))this.index++;else{let o=new zN(this.top,e,n,i);this.top.children.splice(this.index++,0,o),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],n=this.top;for(;e instanceof gd;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof e2)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((zi||wi)&&e&&e.dom.contentEditable=="false"&&this.addHackNode("IMG",n),this.addHackNode("BR",this.top))}addHackNode(e,n){if(n==this.top&&this.index<n.children.length&&n.children[this.index].matchesHack(e))this.index++;else{let i=document.createElement(e);e=="IMG"&&(i.className="ProseMirror-separator",i.alt=""),e=="BR"&&(i.className="ProseMirror-trailingBreak");let s=new HN(this.top,[],i,null);n!=this.top?n.children.push(s):n.children.splice(this.index++,0,s),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function Y8e(t,e){let n=e,i=n.children.length,s=t.childCount,o=new Map,r=[];e:for(;s>0;){let a;for(;;)if(i){let c=n.children[i-1];if(c instanceof gd)n=c,i=c.children.length;else{a=c,i--;break}}else{if(n==e)break e;i=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(s-1))break;--s,o.set(a,s),r.push(a)}}return{index:s,matched:o,matches:r.reverse()}}function q8e(t,e){return t.type.side-e.type.side}function G8e(t,e,n,i){let s=e.locals(t),o=0;if(s.length==0){for(let c=0;c<t.childCount;c++){let u=t.child(c);i(u,s,e.forChild(o,u),c),o+=u.nodeSize}return}let r=0,a=[],l=null;for(let c=0;;){let u,d;for(;r<s.length&&s[r].to==o;){let y=s[r++];y.widget&&(u?(d||(d=[u])).push(y):u=y)}if(u)if(d){d.sort(q8e);for(let y=0;y<d.length;y++)n(d[y],c,!!l)}else n(u,c,!!l);let h,f;if(l)f=-1,h=l,l=null;else if(c<t.childCount)f=c,h=t.child(c++);else break;for(let y=0;y<a.length;y++)a[y].to<=o&&a.splice(y--,1);for(;r<s.length&&s[r].from<=o&&s[r].to>o;)a.push(s[r++]);let p=o+h.nodeSize;if(h.isText){let y=p;r<s.length&&s[r].from<y&&(y=s[r].from);for(let b=0;b<a.length;b++)a[b].to<y&&(y=a[b].to);y<p&&(l=h.cut(y-o),h=h.cut(0,y-o),p=y,f=-1)}else for(;r<s.length&&s[r].to<p;)r++;let m=h.isInline&&!h.isLeaf?a.filter(y=>!y.inline):a.slice();i(h,m,e.forChild(o,h),f),o=p}}function X8e(t){if(t.nodeName=="UL"||t.nodeName=="OL"){let e=t.style.cssText;t.style.cssText=e+"; list-style: square !important",window.getComputedStyle(t).listStyle,t.style.cssText=e}}function K8e(t,e,n,i){for(let s=0,o=0;s<t.childCount&&o<=i;){let r=t.child(s++),a=o;if(o+=r.nodeSize,!r.isText)continue;let l=r.text;for(;s<t.childCount;){let c=t.child(s++);if(o+=c.nodeSize,!c.isText)break;l+=c.text}if(o>=n){if(o>=i&&l.slice(i-e.length-a,i-a)==e)return i-e.length;let c=a<i?l.lastIndexOf(e,i-a-1):-1;if(c>=0&&c+e.length+a>=n)return a+c;if(n==i&&l.length>=i+e.length-a&&l.slice(i-a,i-a+e.length)==e)return i}}return-1}function F6(t,e,n,i,s){let o=[];for(let r=0,a=0;r<t.length;r++){let l=t[r],c=a,u=a+=l.size;c>=n||u<=e?o.push(l):(c<e&&o.push(l.slice(0,e-c,i)),s&&(o.push(s),s=void 0),u>n&&o.push(l.slice(n-c,l.size,i)))}return o}function L8(t,e=null){let n=t.domSelectionRange(),i=t.state.doc;if(!n.focusNode)return null;let s=t.docView.nearestDesc(n.focusNode),o=s&&s.size==0,r=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(r<0)return null;let a=i.resolve(r),l,c;if(Qb(n)){for(l=a;s&&!s.node;)s=s.parent;let u=s.node;if(s&&u.isAtom&&Rt.isSelectable(u)&&s.parent&&!(u.isInline&&k8e(n.focusNode,n.focusOffset,s.dom))){let d=s.posBefore;c=new Rt(r==d?a:i.resolve(d))}}else{let u=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(u<0)return null;l=i.resolve(u)}if(!c){let u=e=="pointer"||t.state.selection.head<a.pos&&!o?1:-1;c=O8(t,l,a,u)}return c}function YN(t){return t.editable?t.hasFocus():GN(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function nl(t,e=!1){let n=t.state.selection;if(qN(t,n),!!YN(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&wi){let i=t.domSelectionRange(),s=t.domObserver.currentSelection;if(i.anchorNode&&s.anchorNode&&md(i.anchorNode,i.anchorOffset,s.anchorNode,s.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)J8e(t);else{let{anchor:i,head:s}=n,o,r;RE&&!(n instanceof Ot)&&(n.$from.parent.inlineContent||(o=VE(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(r=VE(t,n.to))),t.docView.setSelection(i,s,t.root,e),RE&&(o&&FE(o),r&&FE(r)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&Z8e(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const RE=zi||wi&&ON<63;function VE(t,e){let{node:n,offset:i}=t.docView.domFromPos(e,0),s=i<n.childNodes.length?n.childNodes[i]:null,o=i?n.childNodes[i-1]:null;if(zi&&s&&s.contentEditable=="false")return Uw(s);if((!s||s.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(s)return Uw(s);if(o)return Uw(o)}}function Uw(t){return t.contentEditable="true",zi&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function FE(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function Z8e(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),i=n.anchorNode,s=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=i||n.anchorOffset!=s)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!YN(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function J8e(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let i=t.cursorWrapper.dom,s=i.nodeName=="IMG";s?n.setStart(i.parentNode,ni(i)+1):n.setStart(i,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!s&&!t.state.selection.visible&&ao&&bc<=11&&(i.disabled=!0,i.disabled=!1)}function qN(t,e){if(e instanceof Rt){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(NE(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else NE(t)}function NE(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function O8(t,e,n,i){return t.someProp("createSelectionBetween",s=>s(t,e,n))||Ot.between(e,n,i)}function BE(t){return t.editable&&!t.hasFocus()?!1:GN(t)}function GN(t){let e=t.domSelectionRange();if(!e.anchorNode)return!1;try{return t.dom.contains(e.anchorNode.nodeType==3?e.anchorNode.parentNode:e.anchorNode)&&(t.editable||t.dom.contains(e.focusNode.nodeType==3?e.focusNode.parentNode:e.focusNode))}catch{return!1}}function Q8e(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return md(e.node,e.offset,n.anchorNode,n.anchorOffset)}function N6(t,e){let{$anchor:n,$head:i}=t.selection,s=e>0?n.max(i):n.min(i),o=s.parent.inlineContent?s.depth?t.doc.resolve(e>0?s.after():s.before()):null:s;return o&&Ht.findFrom(o,e)}function Jl(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function zE(t,e,n){let i=t.state.selection;if(i instanceof Ot)if(n.indexOf("s")>-1){let{$head:s}=i,o=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let r=t.state.doc.resolve(s.pos+o.nodeSize*(e<0?-1:1));return Jl(t,new Ot(i.$anchor,r))}else if(i.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let s=N6(t.state,e);return s&&s instanceof Rt?Jl(t,s):!1}else if(!(Xo&&n.indexOf("m")>-1)){let s=i.$head,o=s.textOffset?null:e<0?s.nodeBefore:s.nodeAfter,r;if(!o||o.isText)return!1;let a=e<0?s.pos-o.nodeSize:s.pos;return o.isAtom||(r=t.docView.descAt(a))&&!r.contentDOM?Rt.isSelectable(o)?Jl(t,new Rt(e<0?t.state.doc.resolve(s.pos-o.nodeSize):s)):F1?Jl(t,new Ot(t.state.doc.resolve(e<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(i instanceof Rt&&i.node.isInline)return Jl(t,new Ot(e>0?i.$to:i.$from));{let s=N6(t.state,e);return s?Jl(t,s):!1}}}function xy(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Km(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function nh(t,e){return e<0?e5e(t):t5e(t)}function e5e(t){let e=t.domSelectionRange(),n=e.focusNode,i=e.focusOffset;if(!n)return;let s,o,r=!1;for(Nr&&n.nodeType==1&&i<xy(n)&&Km(n.childNodes[i],-1)&&(r=!0);;)if(i>0){if(n.nodeType!=1)break;{let a=n.childNodes[i-1];if(Km(a,-1))s=n,o=--i;else if(a.nodeType==3)n=a,i=n.nodeValue.length;else break}}else{if(XN(n))break;{let a=n.previousSibling;for(;a&&Km(a,-1);)s=n.parentNode,o=ni(a),a=a.previousSibling;if(a)n=a,i=xy(n);else{if(n=n.parentNode,n==t.dom)break;i=0}}}r?B6(t,n,i):s&&B6(t,s,o)}function t5e(t){let e=t.domSelectionRange(),n=e.focusNode,i=e.focusOffset;if(!n)return;let s=xy(n),o,r;for(;;)if(i<s){if(n.nodeType!=1)break;let a=n.childNodes[i];if(Km(a,1))o=n,r=++i;else break}else{if(XN(n))break;{let a=n.nextSibling;for(;a&&Km(a,1);)o=a.parentNode,r=ni(a)+1,a=a.nextSibling;if(a)n=a,i=0,s=xy(n);else{if(n=n.parentNode,n==t.dom)break;i=s=0}}}o&&B6(t,o,r)}function XN(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function n5e(t,e){for(;t&&e==t.childNodes.length&&!V1(t);)e=ni(t)+1,t=t.parentNode;for(;t&&e<t.childNodes.length;){let n=t.childNodes[e];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=0}}function s5e(t,e){for(;t&&!e&&!V1(t);)e=ni(t),t=t.parentNode;for(;t&&e;){let n=t.childNodes[e-1];if(n.nodeType==3)return n;if(n.nodeType==1&&n.contentEditable=="false")break;t=n,e=t.childNodes.length}}function B6(t,e,n){if(e.nodeType!=3){let o,r;(r=n5e(e,n))?(e=r,n=0):(o=s5e(e,n))&&(e=o,n=o.nodeValue.length)}let i=t.domSelection();if(!i)return;if(Qb(i)){let o=document.createRange();o.setEnd(e,n),o.setStart(e,n),i.removeAllRanges(),i.addRange(o)}else i.extend&&i.extend(e,n);t.domObserver.setCurSelection();let{state:s}=t;setTimeout(()=>{t.state==s&&nl(t)},50)}function HE(t,e){let n=t.state.doc.resolve(e);if(!(wi||S8e)&&n.parent.inlineContent){let s=t.coordsAtPos(e);if(e>n.start()){let o=t.coordsAtPos(e-1),r=(o.top+o.bottom)/2;if(r>s.top&&r<s.bottom&&Math.abs(o.left-s.left)>1)return o.left<s.left?"ltr":"rtl"}if(e<n.end()){let o=t.coordsAtPos(e+1),r=(o.top+o.bottom)/2;if(r>s.top&&r<s.bottom&&Math.abs(o.left-s.left)>1)return o.left>s.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function UE(t,e,n){let i=t.state.selection;if(i instanceof Ot&&!i.empty||n.indexOf("s")>-1||Xo&&n.indexOf("m")>-1)return!1;let{$from:s,$to:o}=i;if(!s.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let r=N6(t.state,e);if(r&&r instanceof Rt)return Jl(t,r)}if(!s.parent.inlineContent){let r=e<0?s:o,a=i instanceof Oo?Ht.near(r,e):Ht.findFrom(r,e);return a?Jl(t,a):!1}return!1}function jE(t,e){if(!(t.state.selection instanceof Ot))return!0;let{$head:n,$anchor:i,empty:s}=t.state.selection;if(!n.sameParent(i))return!0;if(!s)return!1;if(t.endOfTextblock(e>0?"forward":"backward"))return!0;let o=!n.textOffset&&(e<0?n.nodeBefore:n.nodeAfter);if(o&&!o.isText){let r=t.state.tr;return e<0?r.delete(n.pos-o.nodeSize,n.pos):r.delete(n.pos,n.pos+o.nodeSize),t.dispatch(r),!0}return!1}function WE(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function i5e(t){if(!zi||t.state.selection.$head.parentOffset>0)return!1;let{focusNode:e,focusOffset:n}=t.domSelectionRange();if(e&&e.nodeType==1&&n==0&&e.firstChild&&e.firstChild.contentEditable=="false"){let i=e.firstChild;WE(t,i,"true"),setTimeout(()=>WE(t,i,"false"),20)}return!1}function o5e(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function r5e(t,e){let n=e.keyCode,i=o5e(e);if(n==8||Xo&&n==72&&i=="c")return jE(t,-1)||nh(t,-1);if(n==46&&!e.shiftKey||Xo&&n==68&&i=="c")return jE(t,1)||nh(t,1);if(n==13||n==27)return!0;if(n==37||Xo&&n==66&&i=="c"){let s=n==37?HE(t,t.state.selection.from)=="ltr"?-1:1:-1;return zE(t,s,i)||nh(t,s)}else if(n==39||Xo&&n==70&&i=="c"){let s=n==39?HE(t,t.state.selection.from)=="ltr"?1:-1:1;return zE(t,s,i)||nh(t,s)}else{if(n==38||Xo&&n==80&&i=="c")return UE(t,-1,i)||nh(t,-1);if(n==40||Xo&&n==78&&i=="c")return i5e(t)||UE(t,1,i)||nh(t,1);if(i==(Xo?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function KN(t,e){t.someProp("transformCopied",f=>{e=f(e,t)});let n=[],{content:i,openStart:s,openEnd:o}=e;for(;s>1&&o>1&&i.childCount==1&&i.firstChild.childCount==1;){s--,o--;let f=i.firstChild;n.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),i=f.content}let r=t.someProp("clipboardSerializer")||Wc.fromSchema(t.state.schema),a=nB(),l=a.createElement("div");l.appendChild(r.serializeFragment(i,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=tB[c.nodeName.toLowerCase()]);){for(let f=u.length-1;f>=0;f--){let p=a.createElement(u[f]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),d++}c=l.firstChild}c&&c.nodeType==1&&c.setAttribute("data-pm-slice",`${s} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",f=>f(e,t))||e.content.textBetween(0,e.content.size,`

`);return{dom:l,text:h,slice:e}}function ZN(t,e,n,i,s){let o=s.parent.type.spec.code,r,a;if(!n&&!e)return null;let l=e&&(i||o||!n);if(l){if(t.someProp("transformPastedText",h=>{e=h(e,o||i,t)}),o)return e?new rt(nt.from(t.state.schema.text(e.replace(/\r\n?/g,`
`))),0,0):rt.empty;let d=t.someProp("clipboardTextParser",h=>h(e,s,i,t));if(d)a=d;else{let h=s.marks(),{schema:f}=t.state,p=Wc.fromSchema(f);r=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let y=r.appendChild(document.createElement("p"));m&&y.appendChild(p.serializeNode(f.text(m,h)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),r=c5e(n),F1&&u5e(r);let c=r&&r.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let d=+u[3];d>0;d--){let h=r.firstChild;for(;h&&h.nodeType!=1;)h=h.nextSibling;if(!h)break;r=h}if(a||(a=(t.someProp("clipboardParser")||t.someProp("domParser")||Bb.fromSchema(t.state.schema)).parseSlice(r,{preserveWhitespace:!!(l||u),context:s,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!a5e.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)a=d5e(YE(a,+u[1],+u[2]),u[4]);else if(a=rt.maxOpen(l5e(a.content,s),!0),a.openStart||a.openEnd){let d=0,h=0;for(let f=a.content.firstChild;d<a.openStart&&!f.type.spec.isolating;d++,f=f.firstChild);for(let f=a.content.lastChild;h<a.openEnd&&!f.type.spec.isolating;h++,f=f.lastChild);a=YE(a,d,h)}return t.someProp("transformPasted",d=>{a=d(a,t)}),a}const a5e=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function l5e(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let s=e.node(n).contentMatchAt(e.index(n)),o,r=[];if(t.forEach(a=>{if(!r)return;let l=s.findWrapping(a.type),c;if(!l)return r=null;if(c=r.length&&o.length&&QN(l,o,a,r[r.length-1],0))r[r.length-1]=c;else{r.length&&(r[r.length-1]=eB(r[r.length-1],o.length));let u=JN(a,l);r.push(u),s=s.matchType(u.type),o=l}}),r)return nt.from(r)}return t}function JN(t,e,n=0){for(let i=e.length-1;i>=n;i--)t=e[i].create(null,nt.from(t));return t}function QN(t,e,n,i,s){if(s<t.length&&s<e.length&&t[s]==e[s]){let o=QN(t,e,n,i.lastChild,s+1);if(o)return i.copy(i.content.replaceChild(i.childCount-1,o));if(i.contentMatchAt(i.childCount).matchType(s==t.length-1?n.type:t[s+1]))return i.copy(i.content.append(nt.from(JN(n,t,s+1))))}}function eB(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,eB(t.lastChild,e-1)),i=t.contentMatchAt(t.childCount).fillBefore(nt.empty,!0);return t.copy(n.append(i))}function z6(t,e,n,i,s,o){let r=e<0?t.firstChild:t.lastChild,a=r.content;return t.childCount>1&&(o=0),s<i-1&&(a=z6(a,e,n,i,s+1,o)),s>=n&&(a=e<0?r.contentMatchAt(0).fillBefore(a,o<=s).append(a):a.append(r.contentMatchAt(r.childCount).fillBefore(nt.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,r.copy(a))}function YE(t,e,n){return e<t.openStart&&(t=new rt(z6(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new rt(z6(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const tB={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let qE=null;function nB(){return qE||(qE=document.implementation.createHTMLDocument("title"))}function c5e(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=nB().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(t),s;if((s=i&&tB[i[1].toLowerCase()])&&(t=s.map(o=>"<"+o+">").join("")+t+s.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=t,s)for(let o=0;o<s.length;o++)n=n.querySelector(s[o])||n;return n}function u5e(t){let e=t.querySelectorAll(wi?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let i=e[n];i.childNodes.length==1&&i.textContent==" "&&i.parentNode&&i.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),i)}}function d5e(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,i;try{i=JSON.parse(e)}catch{return t}let{content:s,openStart:o,openEnd:r}=t;for(let a=i.length-2;a>=0;a-=2){let l=n.nodes[i[a]];if(!l||l.hasRequiredAttrs())break;s=nt.from(l.create(i[a+1],s)),o++,r++}return new rt(s,o,r)}const Hi={},Ui={},h5e={touchstart:!0,touchmove:!0};class f5e{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastClick={time:0,x:0,y:0,type:""},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastAndroidDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}}function p5e(t){for(let e in Hi){let n=Hi[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=i=>{g5e(t,i)&&!D8(t,i)&&(t.editable||!(i.type in Ui))&&n(t,i)},h5e[e]?{passive:!0}:void 0)}zi&&t.dom.addEventListener("input",()=>null),H6(t)}function dc(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function m5e(t){t.domObserver.stop();for(let e in t.input.eventHandlers)t.dom.removeEventListener(e,t.input.eventHandlers[e]);clearTimeout(t.input.composingTimeout),clearTimeout(t.input.lastIOSEnterFallbackTimeout)}function H6(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=i=>D8(t,i))})}function D8(t,e){return t.someProp("handleDOMEvents",n=>{let i=n[e.type];return i?i(t,e)||e.defaultPrevented:!1})}function g5e(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target;n!=t.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(e))return!1;return!0}function v5e(t,e){!D8(t,e)&&Hi[e.type]&&(t.editable||!(e.type in Ui))&&Hi[e.type](t,e)}Ui.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!iB(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(kr&&wi&&n.keyCode==13)))if(n.keyCode!=229&&t.domObserver.forceFlush(),Hf&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let i=Date.now();t.input.lastIOSEnter=i,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==i&&(t.someProp("handleKeyDown",s=>s(t,Cu(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",i=>i(t,n))||r5e(t,n)?n.preventDefault():dc(t,"key")};Ui.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Ui.keypress=(t,e)=>{let n=e;if(iB(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Xo&&n.metaKey)return;if(t.someProp("handleKeyPress",s=>s(t,n))){n.preventDefault();return}let i=t.state.selection;if(!(i instanceof Ot)||!i.$from.sameParent(i.$to)){let s=String.fromCharCode(n.charCode);!/[\r\n]/.test(s)&&!t.someProp("handleTextInput",o=>o(t,i.$from.pos,i.$to.pos,s))&&t.dispatch(t.state.tr.insertText(s).scrollIntoView()),n.preventDefault()}};function t2(t){return{left:t.clientX,top:t.clientY}}function _5e(t,e){let n=e.x-t.clientX,i=e.y-t.clientY;return n*n+i*i<100}function R8(t,e,n,i,s){if(i==-1)return!1;let o=t.state.doc.resolve(i);for(let r=o.depth+1;r>0;r--)if(t.someProp(e,a=>r>o.depth?a(t,n,o.nodeAfter,o.before(r),s,!0):a(t,n,o.node(r),o.before(r),s,!1)))return!0;return!1}function Qh(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let i=t.state.tr.setSelection(e);n=="pointer"&&i.setMeta("pointer",!0),t.dispatch(i)}function y5e(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),i=n.nodeAfter;return i&&i.isAtom&&Rt.isSelectable(i)?(Qh(t,new Rt(n),"pointer"),!0):!1}function b5e(t,e){if(e==-1)return!1;let n=t.state.selection,i,s;n instanceof Rt&&(i=n.node);let o=t.state.doc.resolve(e);for(let r=o.depth+1;r>0;r--){let a=r>o.depth?o.nodeAfter:o.node(r);if(Rt.isSelectable(a)){i&&n.$from.depth>0&&r>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?s=o.before(n.$from.depth):s=o.before(r);break}}return s!=null?(Qh(t,Rt.create(t.state.doc,s),"pointer"),!0):!1}function w5e(t,e,n,i,s){return R8(t,"handleClickOn",e,n,i)||t.someProp("handleClick",o=>o(t,e,i))||(s?b5e(t,n):y5e(t,n))}function k5e(t,e,n,i){return R8(t,"handleDoubleClickOn",e,n,i)||t.someProp("handleDoubleClick",s=>s(t,e,i))}function C5e(t,e,n,i){return R8(t,"handleTripleClickOn",e,n,i)||t.someProp("handleTripleClick",s=>s(t,e,i))||x5e(t,n,i)}function x5e(t,e,n){if(n.button!=0)return!1;let i=t.state.doc;if(e==-1)return i.inlineContent?(Qh(t,Ot.create(i,0,i.content.size),"pointer"),!0):!1;let s=i.resolve(e);for(let o=s.depth+1;o>0;o--){let r=o>s.depth?s.nodeAfter:s.node(o),a=s.before(o);if(r.inlineContent)Qh(t,Ot.create(i,a+1,a+1+r.content.size),"pointer");else if(Rt.isSelectable(r))Qh(t,Rt.create(i,a),"pointer");else continue;return!0}}function V8(t){return Sy(t)}const sB=Xo?"metaKey":"ctrlKey";Hi.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let i=V8(t),s=Date.now(),o="singleClick";s-t.input.lastClick.time<500&&_5e(n,t.input.lastClick)&&!n[sB]&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:s,x:n.clientX,y:n.clientY,type:o};let r=t.posAtCoords(t2(n));r&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new S5e(t,r,n,!!i)):(o=="doubleClick"?k5e:C5e)(t,r.pos,r.inside,n)?n.preventDefault():dc(t,"pointer"))};class S5e{constructor(e,n,i,s){this.view=e,this.pos=n,this.event=i,this.flushed=s,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!i[sB],this.allowDefault=i.shiftKey;let o,r;if(n.inside>-1)o=e.state.doc.nodeAt(n.inside),r=n.inside;else{let u=e.state.doc.resolve(n.pos);o=u.parent,r=u.depth?u.before():0}const a=s?null:i.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:c}=e.state;(i.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof Rt&&c.from<=r&&c.to>r)&&(this.mightDrag={node:o,pos:r,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Nr&&!this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")},20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),dc(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>nl(this.view)),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let n=this.pos;this.view.state.doc!=this.startDoc&&(n=this.view.posAtCoords(t2(e))),this.updateAllowDefault(e),this.allowDefault||!n?dc(this.view,"pointer"):w5e(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||zi&&this.mightDrag&&!this.mightDrag.node.isAtom||wi&&!this.view.state.selection.visible&&Math.min(Math.abs(n.pos-this.view.state.selection.from),Math.abs(n.pos-this.view.state.selection.to))<=2)?(Qh(this.view,Ht.near(this.view.state.doc.resolve(n.pos)),"pointer"),e.preventDefault()):dc(this.view,"pointer")}move(e){this.updateAllowDefault(e),dc(this.view,"pointer"),e.buttons==0&&this.done()}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}}Hi.touchstart=t=>{t.input.lastTouch=Date.now(),V8(t),dc(t,"pointer")};Hi.touchmove=t=>{t.input.lastTouch=Date.now(),dc(t,"pointer")};Hi.contextmenu=t=>V8(t);function iB(t,e){return t.composing?!0:zi&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const $5e=kr?5e3:-1;Ui.compositionstart=Ui.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof Ot&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(i=>i.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),Sy(t,!0),t.markCursor=null;else if(Sy(t,!e.selection.empty),Nr&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let i=t.domSelectionRange();for(let s=i.focusNode,o=i.focusOffset;s&&s.nodeType==1&&o!=0;){let r=o<0?s.lastChild:s.childNodes[o-1];if(!r)break;if(r.nodeType==3){let a=t.domSelection();a&&a.collapse(r,r.nodeValue.length);break}else s=r,o=-1}}t.input.composing=!0}oB(t,$5e)};Ui.compositionend=(t,e)=>{t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e.timeStamp,t.input.compositionPendingChanges=t.domObserver.pendingRecords().length?t.input.compositionID:0,t.input.compositionNode=null,t.input.compositionPendingChanges&&Promise.resolve().then(()=>t.domObserver.flush()),t.input.compositionID++,oB(t,20))};function oB(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>Sy(t),e))}function rB(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=E5e());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function A5e(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=b8e(e.focusNode,e.focusOffset),i=w8e(e.focusNode,e.focusOffset);if(n&&i&&n!=i){let s=i.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||i==o)return o;if(!s||!s.isText(i.nodeValue))return i;if(t.input.compositionNode==i){let r=n.pmViewDesc;if(!(!r||!r.isText(n.nodeValue)))return i}}return n||i}function E5e(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function Sy(t,e=!1){if(!(kr&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),rB(t),e||t.docView&&t.docView.dirty){let n=L8(t);return n&&!n.eq(t.state.selection)?t.dispatch(t.state.tr.setSelection(n)):(t.markCursor||e)&&!t.state.selection.empty?t.dispatch(t.state.tr.deleteSelection()):t.updateState(t.state),!0}return!1}}function M5e(t,e){if(!t.dom.parentNode)return;let n=t.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(e),n.style.cssText="position: fixed; left: -10000px; top: 10px";let i=getSelection(),s=document.createRange();s.selectNodeContents(e),t.dom.blur(),i.removeAllRanges(),i.addRange(s),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const Yg=ao&&bc<15||Hf&&$8e<604;Hi.copy=Ui.cut=(t,e)=>{let n=e,i=t.state.selection,s=n.type=="cut";if(i.empty)return;let o=Yg?null:n.clipboardData,r=i.content(),{dom:a,text:l}=KN(t,r);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):M5e(t,a),s&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function T5e(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function P5e(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,i=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(i.contentEditable="true"),i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus();let s=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),i.parentNode&&i.parentNode.removeChild(i),n?qg(t,i.value,null,s,e):qg(t,i.textContent,i.innerHTML,s,e)},50)}function qg(t,e,n,i,s){let o=ZN(t,e,n,i,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,s,o||rt.empty)))return!0;if(!o)return!1;let r=T5e(o),a=r?t.state.tr.replaceSelectionWith(r,i):t.state.tr.replaceSelection(o);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function aB(t){let e=t.getData("text/plain")||t.getData("Text");if(e)return e;let n=t.getData("text/uri-list");return n?n.replace(/\r?\n/g," "):""}Ui.paste=(t,e)=>{let n=e;if(t.composing&&!kr)return;let i=Yg?null:n.clipboardData,s=t.input.shiftKey&&t.input.lastKeyCode!=45;i&&qg(t,aB(i),i.getData("text/html"),s,n)?n.preventDefault():P5e(t,n)};class lB{constructor(e,n,i){this.slice=e,this.move=n,this.node=i}}const cB=Xo?"altKey":"ctrlKey";Hi.dragstart=(t,e)=>{let n=e,i=t.input.mouseDown;if(i&&i.done(),!n.dataTransfer)return;let s=t.state.selection,o=s.empty?null:t.posAtCoords(t2(n)),r;if(!(o&&o.pos>=s.from&&o.pos<=(s instanceof Rt?s.to-1:s.to))){if(i&&i.mightDrag)r=Rt.create(t.state.doc,i.mightDrag.pos);else if(n.target&&n.target.nodeType==1){let d=t.docView.nearestDesc(n.target,!0);d&&d.node.type.spec.draggable&&d!=t.docView&&(r=Rt.create(t.state.doc,d.posBefore))}}let a=(r||t.state.selection).content(),{dom:l,text:c,slice:u}=KN(t,a);(!n.dataTransfer.files.length||!wi||ON>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Yg?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",Yg||n.dataTransfer.setData("text/plain",c),t.dragging=new lB(u,!n[cB],r)};Hi.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Ui.dragover=Ui.dragenter=(t,e)=>e.preventDefault();Ui.drop=(t,e)=>{let n=e,i=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let s=t.posAtCoords(t2(n));if(!s)return;let o=t.state.doc.resolve(s.pos),r=i&&i.slice;r?t.someProp("transformPasted",p=>{r=p(r,t)}):r=ZN(t,aB(n.dataTransfer),Yg?null:n.dataTransfer.getData("text/html"),!1,o);let a=!!(i&&!n[cB]);if(t.someProp("handleDrop",p=>p(t,n,r||rt.empty,a))){n.preventDefault();return}if(!r)return;n.preventDefault();let l=r?m4e(t.state.doc,o.pos,r):o.pos;l==null&&(l=o.pos);let c=t.state.tr;if(a){let{node:p}=i;p?p.replace(c):c.deleteSelection()}let u=c.mapping.map(l),d=r.openStart==0&&r.openEnd==0&&r.content.childCount==1,h=c.doc;if(d?c.replaceRangeWith(u,u,r.content.firstChild):c.replaceRange(u,u,r),c.doc.eq(h))return;let f=c.doc.resolve(u);if(d&&Rt.isSelectable(r.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(r.content.firstChild))c.setSelection(new Rt(f));else{let p=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,y,b,k)=>p=k),c.setSelection(O8(t,f,c.doc.resolve(p)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))};Hi.focus=t=>{t.input.lastFocus=Date.now(),t.focused||(t.domObserver.stop(),t.dom.classList.add("ProseMirror-focused"),t.domObserver.start(),t.focused=!0,setTimeout(()=>{t.docView&&t.hasFocus()&&!t.domObserver.currentSelection.eq(t.domSelectionRange())&&nl(t)},20))};Hi.blur=(t,e)=>{let n=e;t.focused&&(t.domObserver.stop(),t.dom.classList.remove("ProseMirror-focused"),t.domObserver.start(),n.relatedTarget&&t.dom.contains(n.relatedTarget)&&t.domObserver.currentSelection.clear(),t.focused=!1)};Hi.beforeinput=(t,e)=>{if(wi&&kr&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:i}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=i||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",o=>o(t,Cu(8,"Backspace")))))return;let{$cursor:s}=t.state.selection;s&&s.pos>0&&t.dispatch(t.state.tr.delete(s.pos-1,s.pos).scrollIntoView())},50)}};for(let t in Ui)Hi[t]=Ui[t];function Gg(t,e){if(t==e)return!0;for(let n in t)if(t[n]!==e[n])return!1;for(let n in e)if(!(n in t))return!1;return!0}class $y{constructor(e,n){this.toDOM=e,this.spec=n||Gu,this.side=this.spec.side||0}map(e,n,i,s){let{pos:o,deleted:r}=e.mapResult(n.from+s,this.side<0?-1:1);return r?null:new Fs(o-i,o-i,this)}valid(){return!0}eq(e){return this==e||e instanceof $y&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Gg(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class kc{constructor(e,n){this.attrs=e,this.spec=n||Gu}map(e,n,i,s){let o=e.map(n.from+s,this.spec.inclusiveStart?-1:1)-i,r=e.map(n.to+s,this.spec.inclusiveEnd?1:-1)-i;return o>=r?null:new Fs(o,r,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof kc&&Gg(this.attrs,e.attrs)&&Gg(this.spec,e.spec)}static is(e){return e.type instanceof kc}destroy(){}}class F8{constructor(e,n){this.attrs=e,this.spec=n||Gu}map(e,n,i,s){let o=e.mapResult(n.from+s,1);if(o.deleted)return null;let r=e.mapResult(n.to+s,-1);return r.deleted||r.pos<=o.pos?null:new Fs(o.pos-i,r.pos-i,this)}valid(e,n){let{index:i,offset:s}=e.content.findIndex(n.from),o;return s==n.from&&!(o=e.child(i)).isText&&s+o.nodeSize==n.to}eq(e){return this==e||e instanceof F8&&Gg(this.attrs,e.attrs)&&Gg(this.spec,e.spec)}destroy(){}}class Fs{constructor(e,n,i){this.from=e,this.to=n,this.type=i}copy(e,n){return new Fs(e,n,this.type)}eq(e,n=0){return this.type.eq(e.type)&&this.from+n==e.from&&this.to+n==e.to}map(e,n,i){return this.type.map(e,this,n,i)}static widget(e,n,i){return new Fs(e,e,new $y(n,i))}static inline(e,n,i,s){return new Fs(e,n,new kc(i,s))}static node(e,n,i,s){return new Fs(e,n,new F8(i,s))}get spec(){return this.type.spec}get inline(){return this.type instanceof kc}get widget(){return this.type instanceof $y}}const kh=[],Gu={};class Gn{constructor(e,n){this.local=e.length?e:kh,this.children=n.length?n:kh}static create(e,n){return n.length?Ay(n,e,0,Gu):_i}find(e,n,i){let s=[];return this.findInner(e??0,n??1e9,s,0,i),s}findInner(e,n,i,s,o){for(let r=0;r<this.local.length;r++){let a=this.local[r];a.from<=n&&a.to>=e&&(!o||o(a.spec))&&i.push(a.copy(a.from+s,a.to+s))}for(let r=0;r<this.children.length;r+=3)if(this.children[r]<n&&this.children[r+1]>e){let a=this.children[r]+1;this.children[r+2].findInner(e-a,n-a,i,s+a,o)}}map(e,n,i){return this==_i||e.maps.length==0?this:this.mapInner(e,n,0,0,i||Gu)}mapInner(e,n,i,s,o){let r;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,i,s);l&&l.type.valid(n,l)?(r||(r=[])).push(l):o.onRemove&&o.onRemove(this.local[a].spec)}return this.children.length?I5e(this.children,r||[],e,n,i,s,o):r?new Gn(r.sort(Xu),kh):_i}add(e,n){return n.length?this==_i?Gn.create(e,n):this.addInner(e,n,0):this}addInner(e,n,i){let s,o=0;e.forEach((a,l)=>{let c=l+i,u;if(u=dB(n,a,c)){for(s||(s=this.children.slice());o<s.length&&s[o]<l;)o+=3;s[o]==l?s[o+2]=s[o+2].addInner(a,u,c+1):s.splice(o,0,l,l+a.nodeSize,Ay(u,a,c+1,Gu)),o+=3}});let r=uB(o?hB(n):n,-i);for(let a=0;a<r.length;a++)r[a].type.valid(e,r[a])||r.splice(a--,1);return new Gn(r.length?this.local.concat(r).sort(Xu):this.local,s||this.children)}remove(e){return e.length==0||this==_i?this:this.removeInner(e,0)}removeInner(e,n){let i=this.children,s=this.local;for(let o=0;o<i.length;o+=3){let r,a=i[o]+n,l=i[o+1]+n;for(let u=0,d;u<e.length;u++)(d=e[u])&&d.from>a&&d.to<l&&(e[u]=null,(r||(r=[])).push(d));if(!r)continue;i==this.children&&(i=this.children.slice());let c=i[o+2].removeInner(r,a+1);c!=_i?i[o+2]=c:(i.splice(o,3),o-=3)}if(s.length){for(let o=0,r;o<e.length;o++)if(r=e[o])for(let a=0;a<s.length;a++)s[a].eq(r,n)&&(s==this.local&&(s=this.local.slice()),s.splice(a--,1))}return i==this.children&&s==this.local?this:s.length||i.length?new Gn(s,i):_i}forChild(e,n){if(this==_i)return this;if(n.isLeaf)return Gn.empty;let i,s;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(i=this.children[a+2]);break}let o=e+1,r=o+n.content.size;for(let a=0;a<this.local.length;a++){let l=this.local[a];if(l.from<r&&l.to>o&&l.type instanceof kc){let c=Math.max(o,l.from)-o,u=Math.min(r,l.to)-o;c<u&&(s||(s=[])).push(l.copy(c,u))}}if(s){let a=new Gn(s.sort(Xu),kh);return i?new nc([a,i]):a}return i||_i}eq(e){if(this==e)return!0;if(!(e instanceof Gn)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let n=0;n<this.local.length;n++)if(!this.local[n].eq(e.local[n]))return!1;for(let n=0;n<this.children.length;n+=3)if(this.children[n]!=e.children[n]||this.children[n+1]!=e.children[n+1]||!this.children[n+2].eq(e.children[n+2]))return!1;return!0}locals(e){return N8(this.localsInner(e))}localsInner(e){if(this==_i)return kh;if(e.inlineContent||!this.local.some(kc.is))return this.local;let n=[];for(let i=0;i<this.local.length;i++)this.local[i].type instanceof kc||n.push(this.local[i]);return n}forEachSet(e){e(this)}}Gn.empty=new Gn([],[]);Gn.removeOverlap=N8;const _i=Gn.empty;class nc{constructor(e){this.members=e}map(e,n){const i=this.members.map(s=>s.map(e,n,Gu));return nc.from(i)}forChild(e,n){if(n.isLeaf)return Gn.empty;let i=[];for(let s=0;s<this.members.length;s++){let o=this.members[s].forChild(e,n);o!=_i&&(o instanceof nc?i=i.concat(o.members):i.push(o))}return nc.from(i)}eq(e){if(!(e instanceof nc)||e.members.length!=this.members.length)return!1;for(let n=0;n<this.members.length;n++)if(!this.members[n].eq(e.members[n]))return!1;return!0}locals(e){let n,i=!0;for(let s=0;s<this.members.length;s++){let o=this.members[s].localsInner(e);if(o.length)if(!n)n=o;else{i&&(n=n.slice(),i=!1);for(let r=0;r<o.length;r++)n.push(o[r])}}return n?N8(i?n:n.sort(Xu)):kh}static from(e){switch(e.length){case 0:return _i;case 1:return e[0];default:return new nc(e.every(n=>n instanceof Gn)?e:e.reduce((n,i)=>n.concat(i instanceof Gn?i:i.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function I5e(t,e,n,i,s,o,r){let a=t.slice();for(let c=0,u=o;c<n.maps.length;c++){let d=0;n.maps[c].forEach((h,f,p,m)=>{let y=m-p-(f-h);for(let b=0;b<a.length;b+=3){let k=a[b+1];if(k<0||h>k+u-d)continue;let C=a[b]+u-d;f>=C?a[b+1]=h<=C?-2:-1:h>=u&&y&&(a[b]+=y,a[b+1]+=y)}d+=y}),u=n.maps[c].map(u,-1)}let l=!1;for(let c=0;c<a.length;c+=3)if(a[c+1]<0){if(a[c+1]==-2){l=!0,a[c+1]=-1;continue}let u=n.map(t[c]+o),d=u-s;if(d<0||d>=i.content.size){l=!0;continue}let h=n.map(t[c+1]+o,-1),f=h-s,{index:p,offset:m}=i.content.findIndex(d),y=i.maybeChild(p);if(y&&m==d&&m+y.nodeSize==f){let b=a[c+2].mapInner(n,y,u+1,t[c]+o+1,r);b!=_i?(a[c]=d,a[c+1]=f,a[c+2]=b):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=L5e(a,t,e,n,s,o,r),u=Ay(c,i,0,r);e=u.local;for(let d=0;d<a.length;d+=3)a[d+1]<0&&(a.splice(d,3),d-=3);for(let d=0,h=0;d<u.children.length;d+=3){let f=u.children[d];for(;h<a.length&&a[h]<f;)h+=3;a.splice(h,0,u.children[d],u.children[d+1],u.children[d+2])}}return new Gn(e.sort(Xu),a)}function uB(t,e){if(!e||!t.length)return t;let n=[];for(let i=0;i<t.length;i++){let s=t[i];n.push(new Fs(s.from+e,s.to+e,s.type))}return n}function L5e(t,e,n,i,s,o,r){function a(l,c){for(let u=0;u<l.local.length;u++){let d=l.local[u].map(i,s,c);d?n.push(d):r.onRemove&&r.onRemove(l.local[u].spec)}for(let u=0;u<l.children.length;u+=3)a(l.children[u+2],l.children[u]+c+1)}for(let l=0;l<t.length;l+=3)t[l+1]==-1&&a(t[l+2],e[l]+o+1);return n}function dB(t,e,n){if(e.isLeaf)return null;let i=n+e.nodeSize,s=null;for(let o=0,r;o<t.length;o++)(r=t[o])&&r.from>n&&r.to<i&&((s||(s=[])).push(r),t[o]=null);return s}function hB(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Ay(t,e,n,i){let s=[],o=!1;e.forEach((a,l)=>{let c=dB(t,a,l+n);if(c){o=!0;let u=Ay(c,a,n+l+1,i);u!=_i&&s.push(l,l+a.nodeSize,u)}});let r=uB(o?hB(t):t,-n).sort(Xu);for(let a=0;a<r.length;a++)r[a].type.valid(e,r[a])||(i.onRemove&&i.onRemove(r[a].spec),r.splice(a--,1));return r.length||s.length?new Gn(r,s):_i}function Xu(t,e){return t.from-e.from||t.to-e.to}function N8(t){let e=t;for(let n=0;n<e.length-1;n++){let i=e[n];if(i.from!=i.to)for(let s=n+1;s<e.length;s++){let o=e[s];if(o.from==i.from){o.to!=i.to&&(e==t&&(e=t.slice()),e[s]=o.copy(o.from,i.to),GE(e,s+1,o.copy(i.to,o.to)));continue}else{o.from<i.to&&(e==t&&(e=t.slice()),e[n]=i.copy(i.from,o.from),GE(e,s,i.copy(o.from,i.to)));break}}}return e}function GE(t,e,n){for(;e<t.length&&Xu(n,t[e])>0;)e++;t.splice(e,0,n)}function jw(t){let e=[];return t.someProp("decorations",n=>{let i=n(t.state);i&&i!=_i&&e.push(i)}),t.cursorWrapper&&e.push(Gn.create(t.state.doc,[t.cursorWrapper.deco])),nc.from(e)}const O5e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},D5e=ao&&bc<=11;class R5e{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}}class V5e{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new R5e,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(i=>{for(let s=0;s<i.length;s++)this.queue.push(i[s]);ao&&bc<=11&&i.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():this.flush()}),D5e&&(this.onCharData=i=>{this.queue.push({target:i.target,type:"characterData",oldValue:i.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,O5e)),this.onCharData&&this.view.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let n=0;n<e.length;n++)this.queue.push(e[n]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener("DOMCharacterDataModified",this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener("selectionchange",this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener("selectionchange",this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(BE(this.view)){if(this.suppressingSelectionUpdates)return nl(this.view);if(ao&&bc<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&md(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let n=new Set,i;for(let o=e.focusNode;o;o=Wg(o))n.add(o);for(let o=e.anchorNode;o;o=Wg(o))if(n.has(o)){i=o;break}let s=i&&this.view.docView.nearestDesc(i);if(s&&s.ignoreMutation({type:"selection",target:i.nodeType==3?i.parentNode:i}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let i=e.domSelectionRange(),s=!this.suppressingSelectionUpdates&&!this.currentSelection.eq(i)&&BE(e)&&!this.ignoreSelectionChange(i),o=-1,r=-1,a=!1,l=[];if(e.editable)for(let u=0;u<n.length;u++){let d=this.registerMutation(n[u],l);d&&(o=o<0?d.from:Math.min(d.from,o),r=r<0?d.to:Math.max(d.to,r),d.typeOver&&(a=!0))}if(Nr&&l.length){let u=l.filter(d=>d.nodeName=="BR");if(u.length==2){let[d,h]=u;d.parentNode&&d.parentNode.parentNode==h.parentNode?h.remove():d.remove()}else{let{focusNode:d}=this.currentSelection;for(let h of u){let f=h.parentNode;f&&f.nodeName=="LI"&&(!d||B5e(e,d)!=f)&&h.remove()}}}let c=null;o<0&&s&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Qb(i)&&(c=L8(e))&&c.eq(Ht.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,nl(e),this.currentSelection.set(i),e.scrollToSelection()):(o>-1||s)&&(o>-1&&(e.docView.markDirty(o,r),F5e(e)),this.handleDOMChange(o,r,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(i)||nl(e),this.currentSelection.set(i))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let i=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(i==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!i||i.ignoreMutation(e))return null;if(e.type=="childList"){for(let u=0;u<e.addedNodes.length;u++){let d=e.addedNodes[u];n.push(d),d.nodeType==3&&(this.lastChangedTextNode=d)}if(i.contentDOM&&i.contentDOM!=i.dom&&!i.contentDOM.contains(e.target))return{from:i.posBefore,to:i.posAfter};let s=e.previousSibling,o=e.nextSibling;if(ao&&bc<=11&&e.addedNodes.length)for(let u=0;u<e.addedNodes.length;u++){let{previousSibling:d,nextSibling:h}=e.addedNodes[u];(!d||Array.prototype.indexOf.call(e.addedNodes,d)<0)&&(s=d),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(o=h)}let r=s&&s.parentNode==e.target?ni(s)+1:0,a=i.localPosFromDOM(e.target,r,-1),l=o&&o.parentNode==e.target?ni(o):e.target.childNodes.length,c=i.localPosFromDOM(e.target,l,1);return{from:a,to:c}}else return e.type=="attributes"?{from:i.posAtStart-i.border,to:i.posAtEnd+i.border}:(this.lastChangedTextNode=e.target,{from:i.posAtStart,to:i.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let XE=new WeakMap,KE=!1;function F5e(t){if(!XE.has(t)&&(XE.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Nr,KE)return;console.warn("ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package."),KE=!0}}function ZE(t,e){let n=e.startContainer,i=e.startOffset,s=e.endContainer,o=e.endOffset,r=t.domAtPos(t.state.selection.anchor);return md(r.node,r.offset,s,o)&&([n,i,s,o]=[s,o,n,i]),{anchorNode:n,anchorOffset:i,focusNode:s,focusOffset:o}}function N5e(t,e){if(e.getComposedRanges){let s=e.getComposedRanges(t.root)[0];if(s)return ZE(t,s)}let n;function i(s){s.preventDefault(),s.stopImmediatePropagation(),n=s.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",i,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",i,!0),n?ZE(t,n):null}function B5e(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let i=t.docView.nearestDesc(n,!0);if(i&&i.node.isBlock)return n}return null}function z5e(t,e,n){let{node:i,fromOffset:s,toOffset:o,from:r,to:a}=t.docView.parseRange(e,n),l=t.domSelectionRange(),c,u=l.anchorNode;if(u&&t.dom.contains(u.nodeType==1?u:u.parentNode)&&(c=[{node:u,offset:l.anchorOffset}],Qb(l)||c.push({node:l.focusNode,offset:l.focusOffset})),wi&&t.input.lastKeyCode===8)for(let y=o;y>s;y--){let b=i.childNodes[y-1],k=b.pmViewDesc;if(b.nodeName=="BR"&&!k){o=y;break}if(!k||k.size)break}let d=t.state.doc,h=t.someProp("domParser")||Bb.fromSchema(t.state.schema),f=d.resolve(r),p=null,m=h.parse(i,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:s,to:o,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:H5e,context:f});if(c&&c[0].pos!=null){let y=c[0].pos,b=c[1]&&c[1].pos;b==null&&(b=y),p={anchor:y+r,head:b+r}}return{doc:m,sel:p,from:r,to:a}}function H5e(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(zi&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let n=document.createElement("div");return n.appendChild(document.createElement("li")),{skip:n}}else if(t.parentNode.lastChild==t||zi&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName=="IMG"&&t.getAttribute("mark-placeholder"))return{ignore:!0};return null}const U5e=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function j5e(t,e,n,i,s){let o=t.input.compositionPendingChanges||(t.composing?t.input.compositionID:0);if(t.input.compositionPendingChanges=0,e<0){let I=t.input.lastSelectionTime>Date.now()-50?t.input.lastSelectionOrigin:null,L=L8(t,I);if(L&&!t.state.selection.eq(L)){if(wi&&kr&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",V=>V(t,Cu(13,"Enter"))))return;let R=t.state.tr.setSelection(L);I=="pointer"?R.setMeta("pointer",!0):I=="key"&&R.scrollIntoView(),o&&R.setMeta("composition",o),t.dispatch(R)}return}let r=t.state.doc.resolve(e),a=r.sharedDepth(n);e=r.before(a+1),n=t.state.doc.resolve(n).after(a+1);let l=t.state.selection,c=z5e(t,e,n),u=t.state.doc,d=u.slice(c.from,c.to),h,f;t.input.lastKeyCode===8&&Date.now()-100<t.input.lastKeyCodeTime?(h=t.state.selection.to,f="end"):(h=t.state.selection.from,f="start"),t.input.lastKeyCode=null;let p=q5e(d.content,c.doc.content,c.from,h,f);if((Hf&&t.input.lastIOSEnter>Date.now()-225||kr)&&s.some(I=>I.nodeType==1&&!U5e.test(I.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",I=>I(t,Cu(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!p)if(i&&l instanceof Ot&&!l.empty&&l.$head.sameParent(l.$anchor)&&!t.composing&&!(c.sel&&c.sel.anchor!=c.sel.head))p={start:l.from,endA:l.to,endB:l.to};else{if(c.sel){let I=JE(t,t.state.doc,c.sel);if(I&&!I.eq(t.state.selection)){let L=t.state.tr.setSelection(I);o&&L.setMeta("composition",o),t.dispatch(L)}}return}t.input.domChangeCount++,t.state.selection.from<t.state.selection.to&&p.start==p.endB&&t.state.selection instanceof Ot&&(p.start>t.state.selection.from&&p.start<=t.state.selection.from+2&&t.state.selection.from>=c.from?p.start=t.state.selection.from:p.endA<t.state.selection.to&&p.endA>=t.state.selection.to-2&&t.state.selection.to<=c.to&&(p.endB+=t.state.selection.to-p.endA,p.endA=t.state.selection.to)),ao&&bc<=11&&p.endB==p.start+1&&p.endA==p.start&&p.start>c.from&&c.doc.textBetween(p.start-c.from-1,p.start-c.from+1)=="  "&&(p.start--,p.endA--,p.endB--);let m=c.doc.resolveNoCache(p.start-c.from),y=c.doc.resolveNoCache(p.endB-c.from),b=u.resolve(p.start),k=m.sameParent(y)&&m.parent.inlineContent&&b.end()>=p.endA,C;if((Hf&&t.input.lastIOSEnter>Date.now()-225&&(!k||s.some(I=>I.nodeName=="DIV"||I.nodeName=="P"))||!k&&m.pos<c.doc.content.size&&!m.sameParent(y)&&(C=Ht.findFrom(c.doc.resolve(m.pos+1),1,!0))&&C.head==y.pos)&&t.someProp("handleKeyDown",I=>I(t,Cu(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>p.start&&Y5e(u,p.start,p.endA,m,y)&&t.someProp("handleKeyDown",I=>I(t,Cu(8,"Backspace")))){kr&&wi&&t.domObserver.suppressSelectionUpdates();return}wi&&kr&&p.endB==p.start&&(t.input.lastAndroidDelete=Date.now()),kr&&!k&&m.start()!=y.start()&&y.parentOffset==0&&m.depth==y.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,y=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(I){return I(t,Cu(13,"Enter"))})},20));let $=p.start,x=p.endA,M,P,T;if(k){if(m.pos==y.pos)ao&&bc<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>nl(t),20)),M=t.state.tr.delete($,x),P=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(T=W5e(m.parent.content.cut(m.parentOffset,y.parentOffset),b.parent.content.cut(b.parentOffset,p.endA-b.start()))))M=t.state.tr,T.type=="add"?M.addMark($,x,T.mark):M.removeMark($,x,T.mark);else if(m.parent.child(m.index()).isText&&m.index()==y.index()-(y.textOffset?0:1)){let I=m.parent.textBetween(m.parentOffset,y.parentOffset);if(t.someProp("handleTextInput",L=>L(t,$,x,I)))return;M=t.state.tr.insertText(I,$,x)}}if(M||(M=t.state.tr.replace($,x,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let I=JE(t,M.doc,c.sel);I&&!(wi&&kr&&t.composing&&I.empty&&(p.start!=p.endB||t.input.lastAndroidDelete<Date.now()-100)&&(I.head==$||I.head==M.mapping.map(x)-1)||ao&&I.empty&&I.head==$)&&M.setSelection(I)}P&&M.ensureMarks(P),o&&M.setMeta("composition",o),t.dispatch(M.scrollIntoView())}function JE(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:O8(t,e.resolve(n.anchor),e.resolve(n.head))}function W5e(t,e){let n=t.firstChild.marks,i=e.firstChild.marks,s=n,o=i,r,a,l;for(let u=0;u<i.length;u++)s=i[u].removeFromSet(s);for(let u=0;u<n.length;u++)o=n[u].removeFromSet(o);if(s.length==1&&o.length==0)a=s[0],r="add",l=u=>u.mark(a.addToSet(u.marks));else if(s.length==0&&o.length==1)a=o[0],r="remove",l=u=>u.mark(a.removeFromSet(u.marks));else return null;let c=[];for(let u=0;u<e.childCount;u++)c.push(l(e.child(u)));if(nt.from(c).eq(t))return{mark:a,type:r}}function Y5e(t,e,n,i,s){if(n-e<=s.pos-i.pos||Ww(i,!0,!1)<s.pos)return!1;let o=t.resolve(e);if(!i.parent.isTextblock){let a=o.nodeAfter;return a!=null&&n==e+a.nodeSize}if(o.parentOffset<o.parent.content.size||!o.parent.isTextblock)return!1;let r=t.resolve(Ww(o,!0,!0));return!r.parent.isTextblock||r.pos>n||Ww(r,!0,!1)<n?!1:i.parent.content.cut(i.parentOffset).eq(r.parent.content)}function Ww(t,e,n){let i=t.depth,s=e?t.end():t.pos;for(;i>0&&(e||t.indexAfter(i)==t.node(i).childCount);)i--,s++,e=!1;if(n){let o=t.node(i).maybeChild(t.indexAfter(i));for(;o&&!o.isLeaf;)o=o.firstChild,s++}return s}function q5e(t,e,n,i,s){let o=t.findDiffStart(e,n);if(o==null)return null;let{a:r,b:a}=t.findDiffEnd(e,n+t.size,n+e.size);if(s=="end"){let l=Math.max(0,o-Math.min(r,a));i-=r+l-o}if(r<o&&t.size<e.size){let l=i<=o&&i>=r?o-i:0;o-=l,o&&o<e.size&&QE(e.textBetween(o-1,o+1))&&(o+=l?1:-1),a=o+(a-r),r=o}else if(a<o){let l=i<=o&&i>=a?o-i:0;o-=l,o&&o<t.size&&QE(t.textBetween(o-1,o+1))&&(o+=l?1:-1),r=o+(r-a),a=o}return{start:o,endA:r,endB:a}}function QE(t){if(t.length!=2)return!1;let e=t.charCodeAt(0),n=t.charCodeAt(1);return e>=56320&&e<=57343&&n>=55296&&n<=56319}class G5e{constructor(e,n){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new f5e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(iM),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement("div"),e&&(e.appendChild?e.appendChild(this.dom):typeof e=="function"?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=nM(this),tM(this),this.nodeViews=sM(this),this.docView=OE(this.state.doc,eM(this),jw(this),this.dom,this),this.domObserver=new V5e(this,(i,s,o,r)=>j5e(this,i,s,o,r)),this.domObserver.start(),p5e(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let n in e)this._props[n]=e[n];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&H6(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(iM),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let i in this._props)n[i]=this._props[i];n.state=this.state;for(let i in e)n[i]=e[i];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var i;let s=this.state,o=!1,r=!1;e.storedMarks&&this.composing&&(rB(this),r=!0),this.state=e;let a=s.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let f=sM(this);K5e(f,this.nodeViews)&&(this.nodeViews=f,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&H6(this),this.editable=nM(this),tM(this);let l=jw(this),c=eM(this),u=s.plugins!=e.plugins&&!s.doc.eq(e.doc)?"reset":e.scrollToSelection>s.scrollToSelection?"to selection":"preserve",d=o||!this.docView.matchesNode(e.doc,c,l);(d||!e.selection.eq(s.selection))&&(r=!0);let h=u=="preserve"&&r&&this.dom.style.overflowAnchor==null&&M8e(this);if(r){this.domObserver.stop();let f=d&&(ao||wi)&&!this.composing&&!s.selection.empty&&!e.selection.empty&&X5e(s.selection,e.selection);if(d){let p=wi?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=A5e(this)),(o||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=OE(e.doc,c,l,this.dom,this)),p&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Q8e(this))?nl(this,f):(qN(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(s),!((i=this.dragging)===null||i===void 0)&&i.node&&!s.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,s),u=="reset"?this.dom.scrollTop=0:u=="to selection"?this.scrollToSelection():h&&T8e(h)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(!this.someProp("handleScrollToSelection",n=>n(this)))if(this.state.selection instanceof Rt){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&EE(this,n.getBoundingClientRect(),e)}else EE(this,this.coordsAtPos(this.state.selection.head,1),e)}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n];i.spec.view&&this.pluginViews.push(i.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let i=this.state.plugins[n];i.spec.view&&this.pluginViews.push(i.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let i=this.pluginViews[n];i.update&&i.update(this,e)}}updateDraggedNode(e,n){let i=e.node,s=-1;if(this.state.doc.nodeAt(i.from)==i.node)s=i.from;else{let o=i.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==i.node&&(s=o)}this.dragging=new lB(e.slice,e.move,s<0?void 0:Rt.create(this.state.doc,s))}someProp(e,n){let i=this._props&&this._props[e],s;if(i!=null&&(s=n?n(i):i))return s;for(let r=0;r<this.directPlugins.length;r++){let a=this.directPlugins[r].props[e];if(a!=null&&(s=n?n(a):a))return s}let o=this.state.plugins;if(o)for(let r=0;r<o.length;r++){let a=o[r].props[e];if(a!=null&&(s=n?n(a):a))return s}}hasFocus(){if(ao){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable=="false")return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&P8e(this.dom),nl(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let n=this.dom.parentNode;n;n=n.parentNode)if(n.nodeType==9||n.nodeType==11&&n.host)return n.getSelection||(Object.getPrototypeOf(n).getSelection=()=>n.ownerDocument.getSelection()),this._root=n}return e||document}updateRoot(){this._root=null}posAtCoords(e){return R8e(this,e)}coordsAtPos(e,n=1){return NN(this,e,n)}domAtPos(e,n=0){return this.docView.domFromPos(e,n)}nodeDOM(e){let n=this.docView.descAt(e);return n?n.nodeDOM:null}posAtDOM(e,n,i=-1){let s=this.docView.posFromDOM(e,n,i);if(s==null)throw new RangeError("DOM position not inside the editor");return s}endOfTextblock(e,n){return z8e(this,n||this.state,e)}pasteHTML(e,n){return qg(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return qg(this,e,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(m5e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],jw(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,_8e())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return v5e(this,e)}dispatch(e){let n=this._props.dispatchTransaction;n?n.call(this,e):this.updateState(this.state.apply(e))}domSelectionRange(){let e=this.domSelection();return e?zi&&this.root.nodeType===11&&C8e(this.dom.ownerDocument)==this.dom&&N5e(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function eM(t){let e=Object.create(null);return e.class="ProseMirror",e.contenteditable=String(t.editable),t.someProp("attributes",n=>{if(typeof n=="function"&&(n=n(t.state)),n)for(let i in n)i=="class"?e.class+=" "+n[i]:i=="style"?e.style=(e.style?e.style+";":"")+n[i]:!e[i]&&i!="contenteditable"&&i!="nodeName"&&(e[i]=String(n[i]))}),e.translate||(e.translate="no"),[Fs.node(0,t.state.doc.content.size,e)]}function tM(t){if(t.markCursor){let e=document.createElement("img");e.className="ProseMirror-separator",e.setAttribute("mark-placeholder","true"),e.setAttribute("alt",""),t.cursorWrapper={dom:e,deco:Fs.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function nM(t){return!t.someProp("editable",e=>e(t.state)===!1)}function X5e(t,e){let n=Math.min(t.$anchor.sharedDepth(t.head),e.$anchor.sharedDepth(e.head));return t.$anchor.start(n)!=e.$anchor.start(n)}function sM(t){let e=Object.create(null);function n(i){for(let s in i)Object.prototype.hasOwnProperty.call(e,s)||(e[s]=i[s])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function K5e(t,e){let n=0,i=0;for(let s in t){if(t[s]!=e[s])return!0;n++}for(let s in e)i++;return n!=i}function iM(t){if(t.spec.state||t.spec.filterTransaction||t.spec.appendTransaction)throw new RangeError("Plugins passed directly to the view must not have a state component")}var fB=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},St=(t,e,n)=>(fB(t,e,"read from private field"),n?n.call(t):e.get(t)),Gs=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},us=(t,e,n,i)=>(fB(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);function Xc(t,e){return t.meta={package:"@milkdown/core",group:"System",...e},t}const pB={strong:(t,e,n,i)=>{const s=t.marker||n.options.strong||"*",o=n.enter("strong"),r=n.createTracker(i);let a=r.move(s+s);return a+=r.move(n.containerPhrasing(t,{before:a,after:s,...r.current()})),a+=r.move(s+s),o(),a},emphasis:(t,e,n,i)=>{const s=t.marker||n.options.emphasis||"*",o=n.enter("emphasis"),r=n.createTracker(i);let a=r.move(s);return a+=r.move(n.containerPhrasing(t,{before:a,after:s,...r.current()})),a+=r.move(s),o(),a}},Vn=wn({},"editorView"),lm=wn({},"editorState"),Yw=wn([],"initTimer"),oM=wn({},"editor"),Xg=wn([],"inputRules"),Br=wn([],"prosePlugins"),Kg=wn([],"remarkPlugins"),Zg=wn([],"nodeView"),Jg=wn([],"markView"),Ku=wn(C6().use(g6).use(b6),"remark"),Zm=wn({handlers:pB},"remarkStringifyOptions"),H0=jc("ConfigReady");function Z5e(t){const e=n=>(n.record(H0),async()=>(await t(n),n.done(H0),()=>{n.clearTimer(H0)}));return Xc(e,{displayName:"Config"}),e}const Zu=jc("InitReady");function J5e(t){const e=n=>(n.inject(oM,t).inject(Br,[]).inject(Kg,[]).inject(Xg,[]).inject(Zg,[]).inject(Jg,[]).inject(Zm,{handlers:pB}).inject(Ku,C6().use(g6).use(b6)).inject(Yw,[H0]).record(Zu),async()=>{await n.waitTimers(Yw);const i=n.get(Zm);return n.set(Ku,C6().use(g6).use(b6,i)),n.done(Zu),()=>{n.remove(oM).remove(Br).remove(Kg).remove(Xg).remove(Zg).remove(Jg).remove(Zm).remove(Ku).remove(Yw).clearTimer(Zu)}});return Xc(e,{displayName:"Init"}),e}const Ir=jc("SchemaReady"),qw=wn([],"schemaTimer"),Lr=wn({},"schema"),ef=wn([],"nodes"),tf=wn([],"marks");function rM(t){var e;return{...t,parseDOM:(e=t.parseDOM)==null?void 0:e.map(n=>({priority:t.priority,...n}))}}const mB=t=>(t.inject(Lr,{}).inject(ef,[]).inject(tf,[]).inject(qw,[Zu]).record(Ir),async()=>{await t.waitTimers(qw);const e=t.get(Ku),n=t.get(Kg).reduce((r,a)=>r.use(a.plugin,a.options),e);t.set(Ku,n);const i=Object.fromEntries(t.get(ef).map(([r,a])=>[r,rM(a)])),s=Object.fromEntries(t.get(tf).map(([r,a])=>[r,rM(a)])),o=new pke({nodes:i,marks:s});return t.set(Lr,o),t.done(Ir),()=>{t.remove(Lr).remove(ef).remove(tf).remove(qw).clearTimer(Ir)}});Xc(mB,{displayName:"Schema"});var Ch,pu;let gB=class{constructor(){Gs(this,Ch,void 0),Gs(this,pu,void 0),us(this,Ch,new iF),us(this,pu,null),this.setCtx=e=>{us(this,pu,e)}}get ctx(){return St(this,pu)}create(e,n){const i=e.create(St(this,Ch).sliceMap);return i.set(n),i}get(e){return St(this,Ch).get(e).get()}remove(e){return St(this,Ch).remove(e)}call(e,n){if(St(this,pu)==null)throw H3e();const i=this.get(e)(n),s=St(this,pu).get(Vn);return i(s.state,s.dispatch,s)}};Ch=new WeakMap,pu=new WeakMap;function Q5e(t="cmdKey"){return wn(()=>()=>!1,t)}const hn=wn(new gB,"commands"),Gw=wn([Ir],"commandsTimer"),Jm=jc("CommandsReady"),vB=t=>{const e=new gB;return e.setCtx(t),t.inject(hn,e).inject(Gw,[Ir]).record(Jm),async()=>(await t.waitTimers(Gw),t.done(Jm),()=>{t.remove(hn).remove(Gw).clearTimer(Jm)})};Xc(vB,{displayName:"Commands"});const U0=jc("ParserReady"),_B=()=>{throw p8()},nf=wn(_B,"parser"),Xw=wn([],"parserTimer"),yB=t=>(t.inject(nf,_B).inject(Xw,[Ir]).record(U0),async()=>{await t.waitTimers(Xw);const e=t.get(Ku),n=t.get(Lr);return t.set(nf,Gxe.create(n,e)),t.done(U0),()=>{t.remove(nf).remove(Xw).clearTimer(U0)}});Xc(yB,{displayName:"Parser"});const Qm=jc("SerializerReady"),Kw=wn([],"serializerTimer"),bB=()=>{throw p8()},sf=wn(bB,"serializer"),wB=t=>(t.inject(sf,bB).inject(Kw,[Ir]).record(Qm),async()=>{await t.waitTimers(Kw);const e=t.get(Ku),n=t.get(Lr);return t.set(sf,Kxe.create(n,e)),t.done(Qm),()=>{t.remove(sf).remove(Kw).clearTimer(Qm)}});Xc(wB,{displayName:"Serializer"});const j0=wn("","defaultValue"),W0=wn(t=>t,"stateOptions"),Zw=wn([],"editorStateTimer"),Y0=jc("EditorStateReady");function eSe(t,e,n){if(typeof t=="string")return e(t);if(t.type==="html")return Bb.fromSchema(n).parse(t.dom);if(t.type==="json")return yc.fromJSON(n,t.value);throw D3e(t)}const tSe=new ds("MILKDOWN_STATE_TRACKER");function nSe(t){const e=Jb($4e,M8,xN,SN);return t.Backspace=e,t}const kB=t=>(t.inject(j0,"").inject(lm,{}).inject(W0,e=>e).inject(Zw,[U0,Qm,Jm]).record(Y0),async()=>{await t.waitTimers(Zw);const e=t.get(Lr),n=t.get(nf),i=t.get(Xg),s=t.get(W0),o=t.get(Br),r=t.get(j0),a=eSe(r,n,e),l=[...o,new ts({key:tSe,state:{init:()=>{},apply:(d,h,f,p)=>{t.set(lm,p)}}}),D4e({rules:i}),PN(nSe(d8e))];t.set(Br,l);const c=s({schema:e,doc:a,plugins:l}),u=Pu.create(c);return t.set(lm,u),t.done(Y0),()=>{t.remove(j0).remove(lm).remove(W0).remove(Zw).clearTimer(Y0)}});Xc(kB,{displayName:"EditorState"});const q0=jc("EditorViewReady"),Jw=wn([],"editorViewTimer"),eg=wn({},"editorViewOptions"),G0=wn(null,"root"),U6=wn(null,"rootDOM"),j6=wn({},"rootAttrs");function sSe(t,e){const n=document.createElement("div");n.className="milkdown",t.appendChild(n),e.set(U6,n);const i=e.get(j6);return Object.entries(i).forEach(([s,o])=>n.setAttribute(s,o)),n}function iSe(t){t.classList.add("editor"),t.setAttribute("role","textbox")}const oSe=new ds("MILKDOWN_VIEW_CLEAR"),CB=t=>(t.inject(G0,document.body).inject(Vn,{}).inject(eg,{}).inject(U6,null).inject(j6,{}).inject(Jw,[Y0]).record(q0),async()=>{await t.wait(Zu);const e=t.get(G0)||document.body,n=typeof e=="string"?document.querySelector(e):e;t.update(Br,l=>[new ts({key:oSe,view:c=>{const u=n?sSe(n,t):void 0;return(()=>{if(u&&n){const d=c.dom;n.replaceChild(u,d),u.appendChild(d)}})(),{destroy:()=>{u!=null&&u.parentNode&&(u==null||u.parentNode.replaceChild(c.dom,u)),u==null||u.remove()}}}}),...l]),await t.waitTimers(Jw);const i=t.get(lm),s=t.get(eg),o=Object.fromEntries(t.get(Zg)),r=Object.fromEntries(t.get(Jg)),a=new G5e(n,{state:i,nodeViews:o,markViews:r,...s});return iSe(a.dom),t.set(Vn,a),t.done(q0),()=>{a==null||a.destroy(),t.remove(G0).remove(Vn).remove(eg).remove(U6).remove(j6).remove(Jw).clearTimer(q0)}});Xc(CB,{displayName:"EditorView"});var xh,qo,zl,cm,X0,K0,bo,Hl,Sh,Z0,$h,um,J0,mu,dm;const rSe=class xB{constructor(){Gs(this,xh,void 0),Gs(this,qo,void 0),Gs(this,zl,void 0),Gs(this,cm,void 0),Gs(this,X0,void 0),Gs(this,K0,void 0),Gs(this,bo,void 0),Gs(this,Hl,void 0),Gs(this,Sh,void 0),Gs(this,Z0,void 0),Gs(this,$h,void 0),Gs(this,um,void 0),Gs(this,J0,void 0),Gs(this,mu,void 0),Gs(this,dm,void 0),us(this,xh,!1),us(this,qo,"Idle"),us(this,zl,[]),us(this,cm,()=>{}),us(this,X0,new iF),us(this,K0,new X3e),us(this,bo,new Map),us(this,Hl,new Map),us(this,Sh,new G3e(St(this,X0),St(this,K0))),us(this,Z0,()=>{const e=Z5e(async i=>{await Promise.all(St(this,zl).map(s=>s(i)))}),n=[mB,yB,wB,vB,kB,CB,J5e(this),e];St(this,$h).call(this,n,St(this,Hl))}),us(this,$h,(e,n)=>{e.forEach(i=>{const s=St(this,Sh).produce(St(this,xh)?i.meta:void 0),o=i(s);n.set(i,{ctx:s,handler:o,cleanup:void 0})})}),us(this,um,(e,n=!1)=>Promise.all([e].flat().map(i=>{const s=St(this,bo).get(i),o=s==null?void 0:s.cleanup;return n?St(this,bo).delete(i):St(this,bo).set(i,{ctx:void 0,handler:void 0,cleanup:void 0}),typeof o=="function"?o():o}))),us(this,J0,async()=>{await Promise.all([...St(this,Hl).entries()].map(([e,{cleanup:n}])=>typeof n=="function"?n():n)),St(this,Hl).clear()}),us(this,mu,e=>{us(this,qo,e),St(this,cm).call(this,e)}),us(this,dm,e=>[...e.entries()].map(async([n,i])=>{const{ctx:s,handler:o}=i;if(!o)return;const r=await o();e.set(n,{ctx:s,handler:o,cleanup:r})})),this.enableInspector=(e=!0)=>(us(this,xh,e),this),this.onStatusChange=e=>(us(this,cm,e),this),this.config=e=>(St(this,zl).push(e),this),this.removeConfig=e=>(us(this,zl,St(this,zl).filter(n=>n!==e)),this),this.use=e=>{const n=[e].flat();return n.flat().forEach(i=>{St(this,bo).set(i,{ctx:void 0,handler:void 0,cleanup:void 0})}),St(this,qo)==="Created"&&St(this,$h).call(this,n,St(this,bo)),this},this.remove=async e=>St(this,qo)==="OnCreate"?(console.warn("[Milkdown]: You are trying to remove plugins when the editor is creating, this is not recommended, please check your code."),new Promise(n=>{setTimeout(()=>{n(this.remove(e))},50)})):(await St(this,um).call(this,[e].flat(),!0),this),this.create=async()=>St(this,qo)==="OnCreate"?this:(St(this,qo)==="Created"&&await this.destroy(),St(this,mu).call(this,"OnCreate"),St(this,Z0).call(this),St(this,$h).call(this,[...St(this,bo).keys()],St(this,bo)),await Promise.all([St(this,dm).call(this,St(this,Hl)),St(this,dm).call(this,St(this,bo))].flat()),St(this,mu).call(this,"Created"),this),this.destroy=async(e=!1)=>St(this,qo)==="Destroyed"||St(this,qo)==="OnDestroy"?this:St(this,qo)==="OnCreate"?new Promise(n=>{setTimeout(()=>{n(this.destroy(e))},50)}):(e&&us(this,zl,[]),St(this,mu).call(this,"OnDestroy"),await St(this,um).call(this,[...St(this,bo).keys()],e),await St(this,J0).call(this),St(this,mu).call(this,"Destroyed"),this),this.action=e=>e(St(this,Sh)),this.inspect=()=>St(this,xh)?[...St(this,Hl).values(),...St(this,bo).values()].map(({ctx:e})=>{var n;return(n=e==null?void 0:e.inspector)==null?void 0:n.read()}).filter(e=>!!e):(console.warn("[Milkdown]: You are trying to collect inspection when inspector is disabled, please enable inspector by `editor.enableInspector()` first."),[])}static make(){return new xB}get ctx(){return St(this,Sh)}get status(){return St(this,qo)}};xh=new WeakMap,qo=new WeakMap,zl=new WeakMap,cm=new WeakMap,X0=new WeakMap,K0=new WeakMap,bo=new WeakMap,Hl=new WeakMap,Sh=new WeakMap,Z0=new WeakMap,$h=new WeakMap,um=new WeakMap,J0=new WeakMap,mu=new WeakMap,dm=new WeakMap;let aSe=rSe,lSe=t=>crypto.getRandomValues(new Uint8Array(t)),cSe=(t,e,n)=>{let i=(2<<Math.log2(t.length-1))-1,s=-~(1.6*i*e/t.length);return(o=e)=>{let r="";for(;;){let a=n(s),l=s|0;for(;l--;)if(r+=t[a[l]&i]||"",r.length>=o)return r}}},uSe=(t,e=21)=>cSe(t,e|0,lSe);uSe("abcedfghicklmn",10);function rn(t,e){const n=Q5e(t),i=s=>async()=>{i.key=n,await s.wait(Jm);const o=e(s);return s.get(hn).create(n,o),i.run=r=>s.get(hn).call(t,r),()=>{s.get(hn).remove(n)}};return i}function mo(t){const e=n=>async()=>{await n.wait(Ir);const i=t(n);return n.update(Xg,s=>[...s,i]),e.inputRule=i,()=>{n.update(Xg,s=>s.filter(o=>o!==i))}};return e}function dSe(t,e){const n=i=>async()=>{const s=e(i);return i.update(tf,o=>[...o.filter(r=>r[0]!==t),[t,s]]),n.id=t,n.schema=s,()=>{i.update(tf,o=>o.filter(([r])=>r!==t))}};return n.type=i=>{const s=i.get(Lr).marks[t];if(!s)throw U3e(t);return s},n}function B8(t,e){const n=i=>async()=>{const s=e(i);return i.update(ef,o=>[...o.filter(r=>r[0]!==t),[t,s]]),n.id=t,n.schema=s,()=>{i.update(ef,o=>o.filter(([r])=>r!==t))}};return n.type=i=>{const s=i.get(Lr).nodes[t];if(!s)throw nF(t);return s},n}function Ps(t){let e;const n=i=>async()=>(await i.wait(Ir),e=t(i),i.update(Br,s=>[...s,e]),()=>{i.update(Br,s=>s.filter(o=>o!==e))});return n.plugin=()=>e,n.key=()=>e.spec.key,n}function hSe(t){const e=n=>async()=>{await n.wait(Ir);const i=t(n),s=PN(i);return n.update(Br,o=>[...o,s]),e.keymap=i,()=>{n.update(Br,o=>o.filter(r=>r!==s))}};return e}function SB(t,e){const n=i=>async()=>{await i.wait(Ir);const s=e(i);return t.type(i)instanceof vy?i.update(Zg,o=>[...o,[t.id,s]]):i.update(Jg,o=>[...o,[t.id,s]]),n.view=s,n.type=t,()=>{t.type(i)instanceof vy?i.update(Zg,o=>o.filter(r=>r[0]!==t.id)):i.update(Jg,o=>o.filter(r=>r[0]!==t.id))}};return n}function hs(t,e){const n=wn(t,e),i=s=>(s.inject(n),()=>()=>{s.remove(n)});return i.key=n,i}function zs(t,e){const n=hs(e,t),i=B8(t,o=>o.get(n.key)(o)),s=[n,i];return s.id=i.id,s.node=i,s.type=o=>i.type(o),s.schema=i.schema,s.ctx=n,s.key=n.key,s.extendSchema=o=>r=>()=>{const a=r.get(n.key),l=o(a)(r);r.update(ef,c=>[...c.filter(u=>u[0]!==t),[t,l]]),s.schema=l},s}function B1(t,e){const n=hs(e,t),i=dSe(t,o=>o.get(n.key)(o)),s=[n,i];return s.id=i.id,s.mark=i,s.type=i.type,s.schema=i.schema,s.ctx=n,s.key=n.key,s.extendSchema=o=>r=>()=>{const a=r.get(n.key),l=o(a)(r);r.update(tf,c=>[...c.filter(u=>u[0]!==t),[t,l]]),s.schema=l},s}function go(t,e){const n=Object.fromEntries(Object.entries(e).map(([r,{shortcuts:a}])=>[r,a])),i=hs(n,`${t}Keymap`),s=hSe(r=>{const a=r.get(i.key),l=Object.entries(e).flatMap(([c,{command:u}])=>[a[c]].flat().map(d=>[d,u(r)]));return Object.fromEntries(l)}),o=[i,s];return o.ctx=i,o.shortcuts=s,o.key=i.key,o.keymap=s.keymap,o}const Zr=(t,e=()=>({}))=>hs(e,`${t}Attr`),z1=(t,e=()=>({}))=>hs(e,`${t}Attr`);function Fd(t,e,n){const i=hs(n??{},t),s=r=>async()=>{await r.wait(Zu);const a={plugin:e(r),options:r.get(i.key)};return r.update(Kg,l=>[...l,a]),()=>{r.update(Kg,l=>l.filter(c=>c!==a))}},o=[i,s];return o.id=t,o.plugin=s,o.options=i,o}function fSe(){return t=>{const e=t.get(Vn);return t.get(sf)(e.state.doc)}}function pSe(t,e=!1){return n=>{const i=n.get(Vn),s=n.get(nf)(t);if(!s)return;if(!e){const{state:c}=i;return i.dispatch(c.tr.replace(0,c.doc.content.size,new rt(s.content,0,0)))}const o=n.get(Lr),r=n.get(W0),a=n.get(Br),l=Pu.create({schema:o,doc:s,plugins:a,...r});i.updateState(l)}}function n2(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const mSe=[["ß","ss"],["ẞ","Ss"],["ä","ae"],["Ä","Ae"],["ö","oe"],["Ö","Oe"],["ü","ue"],["Ü","Ue"],["À","A"],["Á","A"],["Â","A"],["Ã","A"],["Ä","Ae"],["Å","A"],["Æ","AE"],["Ç","C"],["È","E"],["É","E"],["Ê","E"],["Ë","E"],["Ì","I"],["Í","I"],["Î","I"],["Ï","I"],["Ð","D"],["Ñ","N"],["Ò","O"],["Ó","O"],["Ô","O"],["Õ","O"],["Ö","Oe"],["Ő","O"],["Ø","O"],["Ù","U"],["Ú","U"],["Û","U"],["Ü","Ue"],["Ű","U"],["Ý","Y"],["Þ","TH"],["ß","ss"],["à","a"],["á","a"],["â","a"],["ã","a"],["ä","ae"],["å","a"],["æ","ae"],["ç","c"],["è","e"],["é","e"],["ê","e"],["ë","e"],["ì","i"],["í","i"],["î","i"],["ï","i"],["ð","d"],["ñ","n"],["ò","o"],["ó","o"],["ô","o"],["õ","o"],["ö","oe"],["ő","o"],["ø","o"],["ù","u"],["ú","u"],["û","u"],["ü","ue"],["ű","u"],["ý","y"],["þ","th"],["ÿ","y"],["ẞ","SS"],["à","a"],["À","A"],["á","a"],["Á","A"],["â","a"],["Â","A"],["ã","a"],["Ã","A"],["è","e"],["È","E"],["é","e"],["É","E"],["ê","e"],["Ê","E"],["ì","i"],["Ì","I"],["í","i"],["Í","I"],["ò","o"],["Ò","O"],["ó","o"],["Ó","O"],["ô","o"],["Ô","O"],["õ","o"],["Õ","O"],["ù","u"],["Ù","U"],["ú","u"],["Ú","U"],["ý","y"],["Ý","Y"],["ă","a"],["Ă","A"],["Đ","D"],["đ","d"],["ĩ","i"],["Ĩ","I"],["ũ","u"],["Ũ","U"],["ơ","o"],["Ơ","O"],["ư","u"],["Ư","U"],["ạ","a"],["Ạ","A"],["ả","a"],["Ả","A"],["ấ","a"],["Ấ","A"],["ầ","a"],["Ầ","A"],["ẩ","a"],["Ẩ","A"],["ẫ","a"],["Ẫ","A"],["ậ","a"],["Ậ","A"],["ắ","a"],["Ắ","A"],["ằ","a"],["Ằ","A"],["ẳ","a"],["Ẳ","A"],["ẵ","a"],["Ẵ","A"],["ặ","a"],["Ặ","A"],["ẹ","e"],["Ẹ","E"],["ẻ","e"],["Ẻ","E"],["ẽ","e"],["Ẽ","E"],["ế","e"],["Ế","E"],["ề","e"],["Ề","E"],["ể","e"],["Ể","E"],["ễ","e"],["Ễ","E"],["ệ","e"],["Ệ","E"],["ỉ","i"],["Ỉ","I"],["ị","i"],["Ị","I"],["ọ","o"],["Ọ","O"],["ỏ","o"],["Ỏ","O"],["ố","o"],["Ố","O"],["ồ","o"],["Ồ","O"],["ổ","o"],["Ổ","O"],["ỗ","o"],["Ỗ","O"],["ộ","o"],["Ộ","O"],["ớ","o"],["Ớ","O"],["ờ","o"],["Ờ","O"],["ở","o"],["Ở","O"],["ỡ","o"],["Ỡ","O"],["ợ","o"],["Ợ","O"],["ụ","u"],["Ụ","U"],["ủ","u"],["Ủ","U"],["ứ","u"],["Ứ","U"],["ừ","u"],["Ừ","U"],["ử","u"],["Ử","U"],["ữ","u"],["Ữ","U"],["ự","u"],["Ự","U"],["ỳ","y"],["Ỳ","Y"],["ỵ","y"],["Ỵ","Y"],["ỷ","y"],["Ỷ","Y"],["ỹ","y"],["Ỹ","Y"],["ء","e"],["آ","a"],["أ","a"],["ؤ","w"],["إ","i"],["ئ","y"],["ا","a"],["ب","b"],["ة","t"],["ت","t"],["ث","th"],["ج","j"],["ح","h"],["خ","kh"],["د","d"],["ذ","dh"],["ر","r"],["ز","z"],["س","s"],["ش","sh"],["ص","s"],["ض","d"],["ط","t"],["ظ","z"],["ع","e"],["غ","gh"],["ـ","_"],["ف","f"],["ق","q"],["ك","k"],["ل","l"],["م","m"],["ن","n"],["ه","h"],["و","w"],["ى","a"],["ي","y"],["َ‎","a"],["ُ","u"],["ِ‎","i"],["٠","0"],["١","1"],["٢","2"],["٣","3"],["٤","4"],["٥","5"],["٦","6"],["٧","7"],["٨","8"],["٩","9"],["چ","ch"],["ک","k"],["گ","g"],["پ","p"],["ژ","zh"],["ی","y"],["۰","0"],["۱","1"],["۲","2"],["۳","3"],["۴","4"],["۵","5"],["۶","6"],["۷","7"],["۸","8"],["۹","9"],["ټ","p"],["ځ","z"],["څ","c"],["ډ","d"],["ﺫ","d"],["ﺭ","r"],["ړ","r"],["ﺯ","z"],["ږ","g"],["ښ","x"],["ګ","g"],["ڼ","n"],["ۀ","e"],["ې","e"],["ۍ","ai"],["ٹ","t"],["ڈ","d"],["ڑ","r"],["ں","n"],["ہ","h"],["ھ","h"],["ے","e"],["А","A"],["а","a"],["Б","B"],["б","b"],["В","V"],["в","v"],["Г","G"],["г","g"],["Д","D"],["д","d"],["ъе","ye"],["Ъе","Ye"],["ъЕ","yE"],["ЪЕ","YE"],["Е","E"],["е","e"],["Ё","Yo"],["ё","yo"],["Ж","Zh"],["ж","zh"],["З","Z"],["з","z"],["И","I"],["и","i"],["ый","iy"],["Ый","Iy"],["ЫЙ","IY"],["ыЙ","iY"],["Й","Y"],["й","y"],["К","K"],["к","k"],["Л","L"],["л","l"],["М","M"],["м","m"],["Н","N"],["н","n"],["О","O"],["о","o"],["П","P"],["п","p"],["Р","R"],["р","r"],["С","S"],["с","s"],["Т","T"],["т","t"],["У","U"],["у","u"],["Ф","F"],["ф","f"],["Х","Kh"],["х","kh"],["Ц","Ts"],["ц","ts"],["Ч","Ch"],["ч","ch"],["Ш","Sh"],["ш","sh"],["Щ","Sch"],["щ","sch"],["Ъ",""],["ъ",""],["Ы","Y"],["ы","y"],["Ь",""],["ь",""],["Э","E"],["э","e"],["Ю","Yu"],["ю","yu"],["Я","Ya"],["я","ya"],["ă","a"],["Ă","A"],["ș","s"],["Ș","S"],["ț","t"],["Ț","T"],["ţ","t"],["Ţ","T"],["ş","s"],["Ş","S"],["ç","c"],["Ç","C"],["ğ","g"],["Ğ","G"],["ı","i"],["İ","I"],["ա","a"],["Ա","A"],["բ","b"],["Բ","B"],["գ","g"],["Գ","G"],["դ","d"],["Դ","D"],["ե","ye"],["Ե","Ye"],["զ","z"],["Զ","Z"],["է","e"],["Է","E"],["ը","y"],["Ը","Y"],["թ","t"],["Թ","T"],["ժ","zh"],["Ժ","Zh"],["ի","i"],["Ի","I"],["լ","l"],["Լ","L"],["խ","kh"],["Խ","Kh"],["ծ","ts"],["Ծ","Ts"],["կ","k"],["Կ","K"],["հ","h"],["Հ","H"],["ձ","dz"],["Ձ","Dz"],["ղ","gh"],["Ղ","Gh"],["ճ","tch"],["Ճ","Tch"],["մ","m"],["Մ","M"],["յ","y"],["Յ","Y"],["ն","n"],["Ն","N"],["շ","sh"],["Շ","Sh"],["ո","vo"],["Ո","Vo"],["չ","ch"],["Չ","Ch"],["պ","p"],["Պ","P"],["ջ","j"],["Ջ","J"],["ռ","r"],["Ռ","R"],["ս","s"],["Ս","S"],["վ","v"],["Վ","V"],["տ","t"],["Տ","T"],["ր","r"],["Ր","R"],["ց","c"],["Ց","C"],["ու","u"],["ՈՒ","U"],["Ու","U"],["փ","p"],["Փ","P"],["ք","q"],["Ք","Q"],["օ","o"],["Օ","O"],["ֆ","f"],["Ֆ","F"],["և","yev"],["ა","a"],["ბ","b"],["გ","g"],["დ","d"],["ე","e"],["ვ","v"],["ზ","z"],["თ","t"],["ი","i"],["კ","k"],["ლ","l"],["მ","m"],["ნ","n"],["ო","o"],["პ","p"],["ჟ","zh"],["რ","r"],["ს","s"],["ტ","t"],["უ","u"],["ფ","ph"],["ქ","q"],["ღ","gh"],["ყ","k"],["შ","sh"],["ჩ","ch"],["ც","ts"],["ძ","dz"],["წ","ts"],["ჭ","tch"],["ხ","kh"],["ჯ","j"],["ჰ","h"],["č","c"],["ď","d"],["ě","e"],["ň","n"],["ř","r"],["š","s"],["ť","t"],["ů","u"],["ž","z"],["Č","C"],["Ď","D"],["Ě","E"],["Ň","N"],["Ř","R"],["Š","S"],["Ť","T"],["Ů","U"],["Ž","Z"],["ހ","h"],["ށ","sh"],["ނ","n"],["ރ","r"],["ބ","b"],["ޅ","lh"],["ކ","k"],["އ","a"],["ވ","v"],["މ","m"],["ފ","f"],["ދ","dh"],["ތ","th"],["ލ","l"],["ގ","g"],["ޏ","gn"],["ސ","s"],["ޑ","d"],["ޒ","z"],["ޓ","t"],["ޔ","y"],["ޕ","p"],["ޖ","j"],["ޗ","ch"],["ޘ","tt"],["ޙ","hh"],["ޚ","kh"],["ޛ","th"],["ޜ","z"],["ޝ","sh"],["ޞ","s"],["ޟ","d"],["ޠ","t"],["ޡ","z"],["ޢ","a"],["ޣ","gh"],["ޤ","q"],["ޥ","w"],["ަ","a"],["ާ","aa"],["ި","i"],["ީ","ee"],["ު","u"],["ޫ","oo"],["ެ","e"],["ޭ","ey"],["ޮ","o"],["ޯ","oa"],["ް",""],["α","a"],["β","v"],["γ","g"],["δ","d"],["ε","e"],["ζ","z"],["η","i"],["θ","th"],["ι","i"],["κ","k"],["λ","l"],["μ","m"],["ν","n"],["ξ","ks"],["ο","o"],["π","p"],["ρ","r"],["σ","s"],["τ","t"],["υ","y"],["φ","f"],["χ","x"],["ψ","ps"],["ω","o"],["ά","a"],["έ","e"],["ί","i"],["ό","o"],["ύ","y"],["ή","i"],["ώ","o"],["ς","s"],["ϊ","i"],["ΰ","y"],["ϋ","y"],["ΐ","i"],["Α","A"],["Β","B"],["Γ","G"],["Δ","D"],["Ε","E"],["Ζ","Z"],["Η","I"],["Θ","TH"],["Ι","I"],["Κ","K"],["Λ","L"],["Μ","M"],["Ν","N"],["Ξ","KS"],["Ο","O"],["Π","P"],["Ρ","R"],["Σ","S"],["Τ","T"],["Υ","Y"],["Φ","F"],["Χ","X"],["Ψ","PS"],["Ω","O"],["Ά","A"],["Έ","E"],["Ί","I"],["Ό","O"],["Ύ","Y"],["Ή","I"],["Ώ","O"],["Ϊ","I"],["Ϋ","Y"],["ā","a"],["ē","e"],["ģ","g"],["ī","i"],["ķ","k"],["ļ","l"],["ņ","n"],["ū","u"],["Ā","A"],["Ē","E"],["Ģ","G"],["Ī","I"],["Ķ","K"],["Ļ","L"],["Ņ","N"],["Ū","U"],["č","c"],["š","s"],["ž","z"],["Č","C"],["Š","S"],["Ž","Z"],["ą","a"],["č","c"],["ę","e"],["ė","e"],["į","i"],["š","s"],["ų","u"],["ū","u"],["ž","z"],["Ą","A"],["Č","C"],["Ę","E"],["Ė","E"],["Į","I"],["Š","S"],["Ų","U"],["Ū","U"],["Ќ","Kj"],["ќ","kj"],["Љ","Lj"],["љ","lj"],["Њ","Nj"],["њ","nj"],["Тс","Ts"],["тс","ts"],["ą","a"],["ć","c"],["ę","e"],["ł","l"],["ń","n"],["ś","s"],["ź","z"],["ż","z"],["Ą","A"],["Ć","C"],["Ę","E"],["Ł","L"],["Ń","N"],["Ś","S"],["Ź","Z"],["Ż","Z"],["Є","Ye"],["І","I"],["Ї","Yi"],["Ґ","G"],["є","ye"],["і","i"],["ї","yi"],["ґ","g"],["Ĳ","IJ"],["ĳ","ij"],["¢","c"],["¥","Y"],["߿","b"],["৳","t"],["૱","Bo"],["฿","B"],["₠","CE"],["₡","C"],["₢","Cr"],["₣","F"],["₥","m"],["₦","N"],["₧","Pt"],["₨","Rs"],["₩","W"],["₫","s"],["€","E"],["₭","K"],["₮","T"],["₯","Dp"],["₰","S"],["₱","P"],["₲","G"],["₳","A"],["₴","S"],["₵","C"],["₶","tt"],["₷","S"],["₸","T"],["₹","R"],["₺","L"],["₽","P"],["₿","B"],["﹩","$"],["￠","c"],["￥","Y"],["￦","W"],["𝐀","A"],["𝐁","B"],["𝐂","C"],["𝐃","D"],["𝐄","E"],["𝐅","F"],["𝐆","G"],["𝐇","H"],["𝐈","I"],["𝐉","J"],["𝐊","K"],["𝐋","L"],["𝐌","M"],["𝐍","N"],["𝐎","O"],["𝐏","P"],["𝐐","Q"],["𝐑","R"],["𝐒","S"],["𝐓","T"],["𝐔","U"],["𝐕","V"],["𝐖","W"],["𝐗","X"],["𝐘","Y"],["𝐙","Z"],["𝐚","a"],["𝐛","b"],["𝐜","c"],["𝐝","d"],["𝐞","e"],["𝐟","f"],["𝐠","g"],["𝐡","h"],["𝐢","i"],["𝐣","j"],["𝐤","k"],["𝐥","l"],["𝐦","m"],["𝐧","n"],["𝐨","o"],["𝐩","p"],["𝐪","q"],["𝐫","r"],["𝐬","s"],["𝐭","t"],["𝐮","u"],["𝐯","v"],["𝐰","w"],["𝐱","x"],["𝐲","y"],["𝐳","z"],["𝐴","A"],["𝐵","B"],["𝐶","C"],["𝐷","D"],["𝐸","E"],["𝐹","F"],["𝐺","G"],["𝐻","H"],["𝐼","I"],["𝐽","J"],["𝐾","K"],["𝐿","L"],["𝑀","M"],["𝑁","N"],["𝑂","O"],["𝑃","P"],["𝑄","Q"],["𝑅","R"],["𝑆","S"],["𝑇","T"],["𝑈","U"],["𝑉","V"],["𝑊","W"],["𝑋","X"],["𝑌","Y"],["𝑍","Z"],["𝑎","a"],["𝑏","b"],["𝑐","c"],["𝑑","d"],["𝑒","e"],["𝑓","f"],["𝑔","g"],["𝑖","i"],["𝑗","j"],["𝑘","k"],["𝑙","l"],["𝑚","m"],["𝑛","n"],["𝑜","o"],["𝑝","p"],["𝑞","q"],["𝑟","r"],["𝑠","s"],["𝑡","t"],["𝑢","u"],["𝑣","v"],["𝑤","w"],["𝑥","x"],["𝑦","y"],["𝑧","z"],["𝑨","A"],["𝑩","B"],["𝑪","C"],["𝑫","D"],["𝑬","E"],["𝑭","F"],["𝑮","G"],["𝑯","H"],["𝑰","I"],["𝑱","J"],["𝑲","K"],["𝑳","L"],["𝑴","M"],["𝑵","N"],["𝑶","O"],["𝑷","P"],["𝑸","Q"],["𝑹","R"],["𝑺","S"],["𝑻","T"],["𝑼","U"],["𝑽","V"],["𝑾","W"],["𝑿","X"],["𝒀","Y"],["𝒁","Z"],["𝒂","a"],["𝒃","b"],["𝒄","c"],["𝒅","d"],["𝒆","e"],["𝒇","f"],["𝒈","g"],["𝒉","h"],["𝒊","i"],["𝒋","j"],["𝒌","k"],["𝒍","l"],["𝒎","m"],["𝒏","n"],["𝒐","o"],["𝒑","p"],["𝒒","q"],["𝒓","r"],["𝒔","s"],["𝒕","t"],["𝒖","u"],["𝒗","v"],["𝒘","w"],["𝒙","x"],["𝒚","y"],["𝒛","z"],["𝒜","A"],["𝒞","C"],["𝒟","D"],["𝒢","g"],["𝒥","J"],["𝒦","K"],["𝒩","N"],["𝒪","O"],["𝒫","P"],["𝒬","Q"],["𝒮","S"],["𝒯","T"],["𝒰","U"],["𝒱","V"],["𝒲","W"],["𝒳","X"],["𝒴","Y"],["𝒵","Z"],["𝒶","a"],["𝒷","b"],["𝒸","c"],["𝒹","d"],["𝒻","f"],["𝒽","h"],["𝒾","i"],["𝒿","j"],["𝓀","h"],["𝓁","l"],["𝓂","m"],["𝓃","n"],["𝓅","p"],["𝓆","q"],["𝓇","r"],["𝓈","s"],["𝓉","t"],["𝓊","u"],["𝓋","v"],["𝓌","w"],["𝓍","x"],["𝓎","y"],["𝓏","z"],["𝓐","A"],["𝓑","B"],["𝓒","C"],["𝓓","D"],["𝓔","E"],["𝓕","F"],["𝓖","G"],["𝓗","H"],["𝓘","I"],["𝓙","J"],["𝓚","K"],["𝓛","L"],["𝓜","M"],["𝓝","N"],["𝓞","O"],["𝓟","P"],["𝓠","Q"],["𝓡","R"],["𝓢","S"],["𝓣","T"],["𝓤","U"],["𝓥","V"],["𝓦","W"],["𝓧","X"],["𝓨","Y"],["𝓩","Z"],["𝓪","a"],["𝓫","b"],["𝓬","c"],["𝓭","d"],["𝓮","e"],["𝓯","f"],["𝓰","g"],["𝓱","h"],["𝓲","i"],["𝓳","j"],["𝓴","k"],["𝓵","l"],["𝓶","m"],["𝓷","n"],["𝓸","o"],["𝓹","p"],["𝓺","q"],["𝓻","r"],["𝓼","s"],["𝓽","t"],["𝓾","u"],["𝓿","v"],["𝔀","w"],["𝔁","x"],["𝔂","y"],["𝔃","z"],["𝔄","A"],["𝔅","B"],["𝔇","D"],["𝔈","E"],["𝔉","F"],["𝔊","G"],["𝔍","J"],["𝔎","K"],["𝔏","L"],["𝔐","M"],["𝔑","N"],["𝔒","O"],["𝔓","P"],["𝔔","Q"],["𝔖","S"],["𝔗","T"],["𝔘","U"],["𝔙","V"],["𝔚","W"],["𝔛","X"],["𝔜","Y"],["𝔞","a"],["𝔟","b"],["𝔠","c"],["𝔡","d"],["𝔢","e"],["𝔣","f"],["𝔤","g"],["𝔥","h"],["𝔦","i"],["𝔧","j"],["𝔨","k"],["𝔩","l"],["𝔪","m"],["𝔫","n"],["𝔬","o"],["𝔭","p"],["𝔮","q"],["𝔯","r"],["𝔰","s"],["𝔱","t"],["𝔲","u"],["𝔳","v"],["𝔴","w"],["𝔵","x"],["𝔶","y"],["𝔷","z"],["𝔸","A"],["𝔹","B"],["𝔻","D"],["𝔼","E"],["𝔽","F"],["𝔾","G"],["𝕀","I"],["𝕁","J"],["𝕂","K"],["𝕃","L"],["𝕄","M"],["𝕆","N"],["𝕊","S"],["𝕋","T"],["𝕌","U"],["𝕍","V"],["𝕎","W"],["𝕏","X"],["𝕐","Y"],["𝕒","a"],["𝕓","b"],["𝕔","c"],["𝕕","d"],["𝕖","e"],["𝕗","f"],["𝕘","g"],["𝕙","h"],["𝕚","i"],["𝕛","j"],["𝕜","k"],["𝕝","l"],["𝕞","m"],["𝕟","n"],["𝕠","o"],["𝕡","p"],["𝕢","q"],["𝕣","r"],["𝕤","s"],["𝕥","t"],["𝕦","u"],["𝕧","v"],["𝕨","w"],["𝕩","x"],["𝕪","y"],["𝕫","z"],["𝕬","A"],["𝕭","B"],["𝕮","C"],["𝕯","D"],["𝕰","E"],["𝕱","F"],["𝕲","G"],["𝕳","H"],["𝕴","I"],["𝕵","J"],["𝕶","K"],["𝕷","L"],["𝕸","M"],["𝕹","N"],["𝕺","O"],["𝕻","P"],["𝕼","Q"],["𝕽","R"],["𝕾","S"],["𝕿","T"],["𝖀","U"],["𝖁","V"],["𝖂","W"],["𝖃","X"],["𝖄","Y"],["𝖅","Z"],["𝖆","a"],["𝖇","b"],["𝖈","c"],["𝖉","d"],["𝖊","e"],["𝖋","f"],["𝖌","g"],["𝖍","h"],["𝖎","i"],["𝖏","j"],["𝖐","k"],["𝖑","l"],["𝖒","m"],["𝖓","n"],["𝖔","o"],["𝖕","p"],["𝖖","q"],["𝖗","r"],["𝖘","s"],["𝖙","t"],["𝖚","u"],["𝖛","v"],["𝖜","w"],["𝖝","x"],["𝖞","y"],["𝖟","z"],["𝖠","A"],["𝖡","B"],["𝖢","C"],["𝖣","D"],["𝖤","E"],["𝖥","F"],["𝖦","G"],["𝖧","H"],["𝖨","I"],["𝖩","J"],["𝖪","K"],["𝖫","L"],["𝖬","M"],["𝖭","N"],["𝖮","O"],["𝖯","P"],["𝖰","Q"],["𝖱","R"],["𝖲","S"],["𝖳","T"],["𝖴","U"],["𝖵","V"],["𝖶","W"],["𝖷","X"],["𝖸","Y"],["𝖹","Z"],["𝖺","a"],["𝖻","b"],["𝖼","c"],["𝖽","d"],["𝖾","e"],["𝖿","f"],["𝗀","g"],["𝗁","h"],["𝗂","i"],["𝗃","j"],["𝗄","k"],["𝗅","l"],["𝗆","m"],["𝗇","n"],["𝗈","o"],["𝗉","p"],["𝗊","q"],["𝗋","r"],["𝗌","s"],["𝗍","t"],["𝗎","u"],["𝗏","v"],["𝗐","w"],["𝗑","x"],["𝗒","y"],["𝗓","z"],["𝗔","A"],["𝗕","B"],["𝗖","C"],["𝗗","D"],["𝗘","E"],["𝗙","F"],["𝗚","G"],["𝗛","H"],["𝗜","I"],["𝗝","J"],["𝗞","K"],["𝗟","L"],["𝗠","M"],["𝗡","N"],["𝗢","O"],["𝗣","P"],["𝗤","Q"],["𝗥","R"],["𝗦","S"],["𝗧","T"],["𝗨","U"],["𝗩","V"],["𝗪","W"],["𝗫","X"],["𝗬","Y"],["𝗭","Z"],["𝗮","a"],["𝗯","b"],["𝗰","c"],["𝗱","d"],["𝗲","e"],["𝗳","f"],["𝗴","g"],["𝗵","h"],["𝗶","i"],["𝗷","j"],["𝗸","k"],["𝗹","l"],["𝗺","m"],["𝗻","n"],["𝗼","o"],["𝗽","p"],["𝗾","q"],["𝗿","r"],["𝘀","s"],["𝘁","t"],["𝘂","u"],["𝘃","v"],["𝘄","w"],["𝘅","x"],["𝘆","y"],["𝘇","z"],["𝘈","A"],["𝘉","B"],["𝘊","C"],["𝘋","D"],["𝘌","E"],["𝘍","F"],["𝘎","G"],["𝘏","H"],["𝘐","I"],["𝘑","J"],["𝘒","K"],["𝘓","L"],["𝘔","M"],["𝘕","N"],["𝘖","O"],["𝘗","P"],["𝘘","Q"],["𝘙","R"],["𝘚","S"],["𝘛","T"],["𝘜","U"],["𝘝","V"],["𝘞","W"],["𝘟","X"],["𝘠","Y"],["𝘡","Z"],["𝘢","a"],["𝘣","b"],["𝘤","c"],["𝘥","d"],["𝘦","e"],["𝘧","f"],["𝘨","g"],["𝘩","h"],["𝘪","i"],["𝘫","j"],["𝘬","k"],["𝘭","l"],["𝘮","m"],["𝘯","n"],["𝘰","o"],["𝘱","p"],["𝘲","q"],["𝘳","r"],["𝘴","s"],["𝘵","t"],["𝘶","u"],["𝘷","v"],["𝘸","w"],["𝘹","x"],["𝘺","y"],["𝘻","z"],["𝘼","A"],["𝘽","B"],["𝘾","C"],["𝘿","D"],["𝙀","E"],["𝙁","F"],["𝙂","G"],["𝙃","H"],["𝙄","I"],["𝙅","J"],["𝙆","K"],["𝙇","L"],["𝙈","M"],["𝙉","N"],["𝙊","O"],["𝙋","P"],["𝙌","Q"],["𝙍","R"],["𝙎","S"],["𝙏","T"],["𝙐","U"],["𝙑","V"],["𝙒","W"],["𝙓","X"],["𝙔","Y"],["𝙕","Z"],["𝙖","a"],["𝙗","b"],["𝙘","c"],["𝙙","d"],["𝙚","e"],["𝙛","f"],["𝙜","g"],["𝙝","h"],["𝙞","i"],["𝙟","j"],["𝙠","k"],["𝙡","l"],["𝙢","m"],["𝙣","n"],["𝙤","o"],["𝙥","p"],["𝙦","q"],["𝙧","r"],["𝙨","s"],["𝙩","t"],["𝙪","u"],["𝙫","v"],["𝙬","w"],["𝙭","x"],["𝙮","y"],["𝙯","z"],["𝙰","A"],["𝙱","B"],["𝙲","C"],["𝙳","D"],["𝙴","E"],["𝙵","F"],["𝙶","G"],["𝙷","H"],["𝙸","I"],["𝙹","J"],["𝙺","K"],["𝙻","L"],["𝙼","M"],["𝙽","N"],["𝙾","O"],["𝙿","P"],["𝚀","Q"],["𝚁","R"],["𝚂","S"],["𝚃","T"],["𝚄","U"],["𝚅","V"],["𝚆","W"],["𝚇","X"],["𝚈","Y"],["𝚉","Z"],["𝚊","a"],["𝚋","b"],["𝚌","c"],["𝚍","d"],["𝚎","e"],["𝚏","f"],["𝚐","g"],["𝚑","h"],["𝚒","i"],["𝚓","j"],["𝚔","k"],["𝚕","l"],["𝚖","m"],["𝚗","n"],["𝚘","o"],["𝚙","p"],["𝚚","q"],["𝚛","r"],["𝚜","s"],["𝚝","t"],["𝚞","u"],["𝚟","v"],["𝚠","w"],["𝚡","x"],["𝚢","y"],["𝚣","z"],["𝚤","l"],["𝚥","j"],["𝛢","A"],["𝛣","B"],["𝛤","G"],["𝛥","D"],["𝛦","E"],["𝛧","Z"],["𝛨","I"],["𝛩","TH"],["𝛪","I"],["𝛫","K"],["𝛬","L"],["𝛭","M"],["𝛮","N"],["𝛯","KS"],["𝛰","O"],["𝛱","P"],["𝛲","R"],["𝛳","TH"],["𝛴","S"],["𝛵","T"],["𝛶","Y"],["𝛷","F"],["𝛸","x"],["𝛹","PS"],["𝛺","O"],["𝛻","D"],["𝛼","a"],["𝛽","b"],["𝛾","g"],["𝛿","d"],["𝜀","e"],["𝜁","z"],["𝜂","i"],["𝜃","th"],["𝜄","i"],["𝜅","k"],["𝜆","l"],["𝜇","m"],["𝜈","n"],["𝜉","ks"],["𝜊","o"],["𝜋","p"],["𝜌","r"],["𝜍","s"],["𝜎","s"],["𝜏","t"],["𝜐","y"],["𝜑","f"],["𝜒","x"],["𝜓","ps"],["𝜔","o"],["𝜕","d"],["𝜖","E"],["𝜗","TH"],["𝜘","K"],["𝜙","f"],["𝜚","r"],["𝜛","p"],["𝜜","A"],["𝜝","V"],["𝜞","G"],["𝜟","D"],["𝜠","E"],["𝜡","Z"],["𝜢","I"],["𝜣","TH"],["𝜤","I"],["𝜥","K"],["𝜦","L"],["𝜧","M"],["𝜨","N"],["𝜩","KS"],["𝜪","O"],["𝜫","P"],["𝜬","S"],["𝜭","TH"],["𝜮","S"],["𝜯","T"],["𝜰","Y"],["𝜱","F"],["𝜲","X"],["𝜳","PS"],["𝜴","O"],["𝜵","D"],["𝜶","a"],["𝜷","v"],["𝜸","g"],["𝜹","d"],["𝜺","e"],["𝜻","z"],["𝜼","i"],["𝜽","th"],["𝜾","i"],["𝜿","k"],["𝝀","l"],["𝝁","m"],["𝝂","n"],["𝝃","ks"],["𝝄","o"],["𝝅","p"],["𝝆","r"],["𝝇","s"],["𝝈","s"],["𝝉","t"],["𝝊","y"],["𝝋","f"],["𝝌","x"],["𝝍","ps"],["𝝎","o"],["𝝏","a"],["𝝐","e"],["𝝑","i"],["𝝒","k"],["𝝓","f"],["𝝔","r"],["𝝕","p"],["𝝖","A"],["𝝗","B"],["𝝘","G"],["𝝙","D"],["𝝚","E"],["𝝛","Z"],["𝝜","I"],["𝝝","TH"],["𝝞","I"],["𝝟","K"],["𝝠","L"],["𝝡","M"],["𝝢","N"],["𝝣","KS"],["𝝤","O"],["𝝥","P"],["𝝦","R"],["𝝧","TH"],["𝝨","S"],["𝝩","T"],["𝝪","Y"],["𝝫","F"],["𝝬","X"],["𝝭","PS"],["𝝮","O"],["𝝯","D"],["𝝰","a"],["𝝱","v"],["𝝲","g"],["𝝳","d"],["𝝴","e"],["𝝵","z"],["𝝶","i"],["𝝷","th"],["𝝸","i"],["𝝹","k"],["𝝺","l"],["𝝻","m"],["𝝼","n"],["𝝽","ks"],["𝝾","o"],["𝝿","p"],["𝞀","r"],["𝞁","s"],["𝞂","s"],["𝞃","t"],["𝞄","y"],["𝞅","f"],["𝞆","x"],["𝞇","ps"],["𝞈","o"],["𝞉","a"],["𝞊","e"],["𝞋","i"],["𝞌","k"],["𝞍","f"],["𝞎","r"],["𝞏","p"],["𝞐","A"],["𝞑","V"],["𝞒","G"],["𝞓","D"],["𝞔","E"],["𝞕","Z"],["𝞖","I"],["𝞗","TH"],["𝞘","I"],["𝞙","K"],["𝞚","L"],["𝞛","M"],["𝞜","N"],["𝞝","KS"],["𝞞","O"],["𝞟","P"],["𝞠","S"],["𝞡","TH"],["𝞢","S"],["𝞣","T"],["𝞤","Y"],["𝞥","F"],["𝞦","X"],["𝞧","PS"],["𝞨","O"],["𝞩","D"],["𝞪","av"],["𝞫","g"],["𝞬","d"],["𝞭","e"],["𝞮","z"],["𝞯","i"],["𝞰","i"],["𝞱","th"],["𝞲","i"],["𝞳","k"],["𝞴","l"],["𝞵","m"],["𝞶","n"],["𝞷","ks"],["𝞸","o"],["𝞹","p"],["𝞺","r"],["𝞻","s"],["𝞼","s"],["𝞽","t"],["𝞾","y"],["𝞿","f"],["𝟀","x"],["𝟁","ps"],["𝟂","o"],["𝟃","a"],["𝟄","e"],["𝟅","i"],["𝟆","k"],["𝟇","f"],["𝟈","r"],["𝟉","p"],["𝟊","F"],["𝟋","f"],["⒜","(a)"],["⒝","(b)"],["⒞","(c)"],["⒟","(d)"],["⒠","(e)"],["⒡","(f)"],["⒢","(g)"],["⒣","(h)"],["⒤","(i)"],["⒥","(j)"],["⒦","(k)"],["⒧","(l)"],["⒨","(m)"],["⒩","(n)"],["⒪","(o)"],["⒫","(p)"],["⒬","(q)"],["⒭","(r)"],["⒮","(s)"],["⒯","(t)"],["⒰","(u)"],["⒱","(v)"],["⒲","(w)"],["⒳","(x)"],["⒴","(y)"],["⒵","(z)"],["Ⓐ","(A)"],["Ⓑ","(B)"],["Ⓒ","(C)"],["Ⓓ","(D)"],["Ⓔ","(E)"],["Ⓕ","(F)"],["Ⓖ","(G)"],["Ⓗ","(H)"],["Ⓘ","(I)"],["Ⓙ","(J)"],["Ⓚ","(K)"],["Ⓛ","(L)"],["Ⓝ","(N)"],["Ⓞ","(O)"],["Ⓟ","(P)"],["Ⓠ","(Q)"],["Ⓡ","(R)"],["Ⓢ","(S)"],["Ⓣ","(T)"],["Ⓤ","(U)"],["Ⓥ","(V)"],["Ⓦ","(W)"],["Ⓧ","(X)"],["Ⓨ","(Y)"],["Ⓩ","(Z)"],["ⓐ","(a)"],["ⓑ","(b)"],["ⓒ","(b)"],["ⓓ","(c)"],["ⓔ","(e)"],["ⓕ","(f)"],["ⓖ","(g)"],["ⓗ","(h)"],["ⓘ","(i)"],["ⓙ","(j)"],["ⓚ","(k)"],["ⓛ","(l)"],["ⓜ","(m)"],["ⓝ","(n)"],["ⓞ","(o)"],["ⓟ","(p)"],["ⓠ","(q)"],["ⓡ","(r)"],["ⓢ","(s)"],["ⓣ","(t)"],["ⓤ","(u)"],["ⓥ","(v)"],["ⓦ","(w)"],["ⓧ","(x)"],["ⓨ","(y)"],["ⓩ","(z)"],["Ċ","C"],["ċ","c"],["Ġ","G"],["ġ","g"],["Ħ","H"],["ħ","h"],["Ż","Z"],["ż","z"],["𝟎","0"],["𝟏","1"],["𝟐","2"],["𝟑","3"],["𝟒","4"],["𝟓","5"],["𝟔","6"],["𝟕","7"],["𝟖","8"],["𝟗","9"],["𝟘","0"],["𝟙","1"],["𝟚","2"],["𝟛","3"],["𝟜","4"],["𝟝","5"],["𝟞","6"],["𝟟","7"],["𝟠","8"],["𝟡","9"],["𝟢","0"],["𝟣","1"],["𝟤","2"],["𝟥","3"],["𝟦","4"],["𝟧","5"],["𝟨","6"],["𝟩","7"],["𝟪","8"],["𝟫","9"],["𝟬","0"],["𝟭","1"],["𝟮","2"],["𝟯","3"],["𝟰","4"],["𝟱","5"],["𝟲","6"],["𝟳","7"],["𝟴","8"],["𝟵","9"],["𝟶","0"],["𝟷","1"],["𝟸","2"],["𝟹","3"],["𝟺","4"],["𝟻","5"],["𝟼","6"],["𝟽","7"],["𝟾","8"],["𝟿","9"],["①","1"],["②","2"],["③","3"],["④","4"],["⑤","5"],["⑥","6"],["⑦","7"],["⑧","8"],["⑨","9"],["⑩","10"],["⑪","11"],["⑫","12"],["⑬","13"],["⑭","14"],["⑮","15"],["⑯","16"],["⑰","17"],["⑱","18"],["⑲","19"],["⑳","20"],["⑴","1"],["⑵","2"],["⑶","3"],["⑷","4"],["⑸","5"],["⑹","6"],["⑺","7"],["⑻","8"],["⑼","9"],["⑽","10"],["⑾","11"],["⑿","12"],["⒀","13"],["⒁","14"],["⒂","15"],["⒃","16"],["⒄","17"],["⒅","18"],["⒆","19"],["⒇","20"],["⒈","1."],["⒉","2."],["⒊","3."],["⒋","4."],["⒌","5."],["⒍","6."],["⒎","7."],["⒏","8."],["⒐","9."],["⒑","10."],["⒒","11."],["⒓","12."],["⒔","13."],["⒕","14."],["⒖","15."],["⒗","16."],["⒘","17."],["⒙","18."],["⒚","19."],["⒛","20."],["⓪","0"],["⓫","11"],["⓬","12"],["⓭","13"],["⓮","14"],["⓯","15"],["⓰","16"],["⓱","17"],["⓲","18"],["⓳","19"],["⓴","20"],["⓵","1"],["⓶","2"],["⓷","3"],["⓸","4"],["⓹","5"],["⓺","6"],["⓻","7"],["⓼","8"],["⓽","9"],["⓾","10"],["⓿","0"],["🙰","&"],["🙱","&"],["🙲","&"],["🙳","&"],["🙴","&"],["🙵","&"],["🙶",'"'],["🙷",'"'],["🙸",'"'],["‽","?!"],["🙹","?!"],["🙺","?!"],["🙻","?!"],["🙼","/"],["🙽","\\"],["🜇","AR"],["🜈","V"],["🜉","V"],["🜆","VR"],["🜅","VF"],["🜩","2"],["🜪","5"],["🝡","f"],["🝢","W"],["🝣","U"],["🝧","V"],["🝨","T"],["🝪","V"],["🝫","MB"],["🝬","VB"],["🝲","3B"],["🝳","3B"],["💯","100"],["🔙","BACK"],["🔚","END"],["🔛","ON!"],["🔜","SOON"],["🔝","TOP"],["🔞","18"],["🔤","abc"],["🔠","ABCD"],["🔡","abcd"],["🔢","1234"],["🔣","T&@%"],["#️⃣","#"],["*️⃣","*"],["0️⃣","0"],["1️⃣","1"],["2️⃣","2"],["3️⃣","3"],["4️⃣","4"],["5️⃣","5"],["6️⃣","6"],["7️⃣","7"],["8️⃣","8"],["9️⃣","9"],["🔟","10"],["🅰️","A"],["🅱️","B"],["🆎","AB"],["🆑","CL"],["🅾️","O"],["🅿","P"],["🆘","SOS"],["🅲","C"],["🅳","D"],["🅴","E"],["🅵","F"],["🅶","G"],["🅷","H"],["🅸","I"],["🅹","J"],["🅺","K"],["🅻","L"],["🅼","M"],["🅽","N"],["🆀","Q"],["🆁","R"],["🆂","S"],["🆃","T"],["🆄","U"],["🆅","V"],["🆆","W"],["🆇","X"],["🆈","Y"],["🆉","Z"]],gSe=(t,e)=>{for(const[n,i]of e)t=t.replace(new RegExp(n2(n),"g"),i);return t};function vSe(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={customReplacements:[],...e};const n=new Map([...mSe,...e.customReplacements]);return t=t.normalize(),t=gSe(t,n),t=t.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),t}const _Se=[["&"," and "],["🦄"," unicorn "],["♥"," love "]],ySe=t=>t.replace(/([A-Z]{2,})(\d+)/g,"$1 $2").replace(/([a-z\d]+)([A-Z]{2,})/g,"$1 $2").replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-rt-z\d]+)/g,"$1 $2"),bSe=(t,e)=>{const n=n2(e);return t.replace(new RegExp(`${n}{2,}`,"g"),e).replace(new RegExp(`^${n}|${n}$`,"g"),"")},wSe=t=>{let e="a-z\\d";if(e+=t.lowercase?"":"A-Z",t.preserveCharacters.length>0)for(const n of t.preserveCharacters){if(n===t.separator)throw new Error(`The separator character \`${t.separator}\` cannot be included in preserved characters: ${t.preserveCharacters}`);e+=n2(n)}return new RegExp(`[^${e}]+`,"g")};function kSe(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={separator:"-",lowercase:!0,decamelize:!0,customReplacements:[],preserveLeadingUnderscore:!1,preserveTrailingDash:!1,preserveCharacters:[],...e};const n=e.preserveLeadingUnderscore&&t.startsWith("_"),i=e.preserveTrailingDash&&t.endsWith("-"),s=new Map([..._Se,...e.customReplacements]);t=vSe(t,{customReplacements:s}),e.decamelize&&(t=ySe(t));const o=wSe(e);return e.lowercase&&(t=t.toLowerCase()),t=t.replace(/([a-zA-Z\d]+)'([ts])(\s|$)/g,"$1$2$3"),t=t.replace(o,e.separator),t=t.replace(/\\/g,""),e.separator&&(t=bSe(t,e.separator)),n&&(t=`_${t}`),i&&(t=`${t}-`),t}function CSe(t,e){return function(n,i){let{$from:s,$to:o,node:r}=n.selection;if(r&&r.isBlock||s.depth<2||!s.sameParent(o))return!1;let a=s.node(-1);if(a.type!=t)return!1;if(s.parent.content.size==0&&s.node(-1).childCount==s.indexAfter(-1)){if(s.depth==3||s.node(-3).type!=t||s.index(-2)!=s.node(-2).childCount-1)return!1;if(i){let d=nt.empty,h=s.index(-1)?1:s.index(-2)?2:3;for(let b=s.depth-h;b>=s.depth-3;b--)d=nt.from(s.node(b).copy(d));let f=s.indexAfter(-1)<s.node(-2).childCount?1:s.indexAfter(-2)<s.node(-3).childCount?2:3;d=d.append(nt.from(t.createAndFill()));let p=s.before(s.depth-(h-1)),m=n.tr.replace(p,s.after(-f),new rt(d,4-h,0)),y=-1;m.doc.nodesBetween(p,m.doc.content.size,(b,k)=>{if(y>-1)return!1;b.isTextblock&&b.content.size==0&&(y=k+1)}),y>-1&&m.setSelection(Ht.near(m.doc.resolve(y))),i(m.scrollIntoView())}return!0}let l=o.pos==s.end()?a.contentMatchAt(0).defaultType:null,c=n.tr.delete(s.pos,o.pos),u=l?[e?{type:t,attrs:e}:null,{type:l}]:void 0;return Gm(c.doc,s.pos,2,u)?(i&&i(c.split(s.pos,2,u).scrollIntoView()),!0):!1}}function $B(t){return function(e,n){let{$from:i,$to:s}=e.selection,o=i.blockRange(s,r=>r.childCount>0&&r.firstChild.type==t);return o?n?i.node(o.depth-1).type==t?xSe(e,n,t,o):SSe(e,n,o):!0:!1}}function xSe(t,e,n,i){let s=t.tr,o=i.end,r=i.$to.end(i.depth);o<r&&(s.step(new xi(o-1,r,o,r,new rt(nt.from(n.create(null,i.parent.copy())),1,0),1,!0)),i=new fF(s.doc.resolve(i.$from.pos),s.doc.resolve(r),i.depth));const a=Wb(i);if(a==null)return!1;s.lift(i,a);let l=s.mapping.map(o,-1)-1;return Yb(s.doc,l)&&s.join(l),e(s.scrollIntoView()),!0}function SSe(t,e,n){let i=t.tr,s=n.parent;for(let f=n.end,p=n.endIndex-1,m=n.startIndex;p>m;p--)f-=s.child(p).nodeSize,i.delete(f-1,f+1);let o=i.doc.resolve(n.start),r=o.nodeAfter;if(i.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==s.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,r.content.append(l?nt.empty:nt.from(s))))return!1;let d=o.pos,h=d+r.nodeSize;return i.step(new xi(d-(a?1:0),h+(l?1:0),d+1,h-1,new rt((a?nt.empty:nt.from(s.copy(nt.empty))).append(l?nt.empty:nt.from(s.copy(nt.empty))),a?0:1,l?0:1),a?0:1)),e(i.scrollIntoView()),!0}function $Se(t){return function(e,n){let{$from:i,$to:s}=e.selection,o=i.blockRange(s,c=>c.childCount>0&&c.firstChild.type==t);if(!o)return!1;let r=o.startIndex;if(r==0)return!1;let a=o.parent,l=a.child(r-1);if(l.type!=t)return!1;if(n){let c=l.lastChild&&l.lastChild.type==a.type,u=nt.from(c?t.create():null),d=new rt(nt.from(t.create(null,nt.from(a.type.create(null,u)))),c?3:1,0),h=o.start,f=o.end;n(e.tr.step(new xi(h-(c?3:1),f,h,f,d,1,!0)).scrollIntoView())}return!0}}function ASe(t){const e=new Map;if(!t||!t.type)throw new Error("mdast-util-definitions expected node");return Vd(t,"definition",function(i){const s=aM(i.identifier);s&&!e.get(s)&&e.set(s,i)}),n;function n(i){const s=aM(i);return e.get(s)}}function aM(t){return String(t||"").toUpperCase()}function ESe(){return function(t){const e=ASe(t);Vd(t,function(n,i,s){if(n.type==="definition"&&s!==void 0&&typeof i=="number")return s.children.splice(i,1),[y6,i];if(n.type==="imageReference"||n.type==="linkReference"){const o=e(n.identifier);if(o&&s&&typeof i=="number")return s.children[i]=n.type==="imageReference"?{type:"image",url:o.url,title:o.title,alt:n.alt}:{type:"link",url:o.url,title:o.title,children:n.children},[y6,i]}})}}function AB(t,e){var n;if(!(e.childCount>=1&&((n=e.lastChild)==null?void 0:n.type.name)==="hardbreak")){t.next(e.content);return}const i=[];e.content.forEach((s,o,r)=>{r!==e.childCount-1&&i.push(s)}),t.next(nt.fromArray(i))}function Ve(t,e){return Object.assign(t,{meta:{package:"@milkdown/preset-commonmark",...e}}),t}const z8=z1("emphasis");Ve(z8,{displayName:"Attr<emphasis>",group:"Emphasis"});const Nd=B1("emphasis",t=>({attrs:{marker:{default:t.get(Zm).emphasis||"*"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:e=>e==="italic"}],toDOM:e=>["em",t.get(z8.key)(e)],parseMarkdown:{match:e=>e.type==="emphasis",runner:(e,n,i)=>{e.openMark(i,{marker:n.marker}),e.next(n.children),e.closeMark(i)}},toMarkdown:{match:e=>e.type.name==="emphasis",runner:(e,n)=>{e.withMark(n,"emphasis",void 0,{marker:n.attrs.marker})}}}));Ve(Nd.mark,{displayName:"MarkSchema<emphasis>",group:"Emphasis"});Ve(Nd.ctx,{displayName:"MarkSchemaCtx<emphasis>",group:"Emphasis"});const s2=rn("ToggleEmphasis",t=>()=>Zb(Nd.type(t)));Ve(s2,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});const EB=mo(t=>R1(/(?:^|[^*])\*([^*]+)\*$/,Nd.type(t),{getAttr:()=>({marker:"*"}),updateCaptured:({fullMatch:e,start:n})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:n+1}}));Ve(EB,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});const MB=mo(t=>R1(/(?:^|[^_])_([^_]+)_$/,Nd.type(t),{getAttr:()=>({marker:"_"}),updateCaptured:({fullMatch:e,start:n})=>e.startsWith("_")?{}:{fullMatch:e.slice(1),start:n+1}}));Ve(MB,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});const H8=go("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:t=>{const e=t.get(hn);return()=>e.call(s2.key)}}});Ve(H8.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"});Ve(H8.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});const U8=z1("strong");Ve(U8,{displayName:"Attr<strong>",group:"Strong"});const op=B1("strong",t=>({attrs:{marker:{default:t.get(Zm).strong||"*"}},parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:e=>e==="bold"}],toDOM:e=>["strong",t.get(U8.key)(e)],parseMarkdown:{match:e=>e.type==="strong",runner:(e,n,i)=>{e.openMark(i,{marker:n.marker}),e.next(n.children),e.closeMark(i)}},toMarkdown:{match:e=>e.type.name==="strong",runner:(e,n)=>{e.withMark(n,"strong",void 0,{marker:n.attrs.marker})}}}));Ve(op.mark,{displayName:"MarkSchema<strong>",group:"Strong"});Ve(op.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});const i2=rn("ToggleStrong",t=>()=>Zb(op.type(t)));Ve(i2,{displayName:"Command<toggleStrongCommand>",group:"Strong"});const TB=mo(t=>R1(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,op.type(t),{getAttr:e=>({marker:e[0].startsWith("*")?"*":"_"})}));Ve(TB,{displayName:"InputRule<strong>",group:"Strong"});const j8=go("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:t=>{const e=t.get(hn);return()=>e.call(i2.key)}}});Ve(j8.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"});Ve(j8.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});const W8=z1("inlineCode");Ve(W8,{displayName:"Attr<inlineCode>",group:"InlineCode"});const Xa=B1("inlineCode",t=>({priority:100,code:!0,inclusive:!1,parseDOM:[{tag:"code"}],toDOM:e=>["code",t.get(W8.key)(e)],parseMarkdown:{match:e=>e.type==="inlineCode",runner:(e,n,i)=>{e.openMark(i),e.addText(n.value),e.closeMark(i)}},toMarkdown:{match:e=>e.type.name==="inlineCode",runner:(e,n,i)=>{e.withMark(n,"inlineCode",i.text||"")}}}));Ve(Xa.mark,{displayName:"MarkSchema<inlineCode>",group:"InlineCode"});Ve(Xa.ctx,{displayName:"MarkSchemaCtx<inlineCode>",group:"InlineCode"});const o2=rn("ToggleInlineCode",t=>()=>(e,n)=>{const{selection:i,tr:s}=e;if(i.empty)return!1;const{from:o,to:r}=i;return e.doc.rangeHasMark(o,r,Xa.type(t))?(n==null||n(s.removeMark(o,r,Xa.type(t))),!0):(Object.keys(e.schema.marks).filter(a=>a!==Xa.type.name).map(a=>e.schema.marks[a]).forEach(a=>{s.removeMark(o,r,a)}),n==null||n(s.addMark(o,r,Xa.type(t).create())),!0)});Ve(o2,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});const PB=mo(t=>R1(/(?:\`)([^\`]+)(?:\`)$/,Xa.type(t)));Ve(PB,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});const Y8=go("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:t=>{const e=t.get(hn);return()=>e.call(o2.key)}}});Ve(Y8.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"});Ve(Y8.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});const q8=z1("link");Ve(q8,{displayName:"Attr<link>",group:"Link"});const Or=B1("link",t=>({attrs:{href:{},title:{default:null}},parseDOM:[{tag:"a[href]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw Kr(e);return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM:e=>["a",{...t.get(q8.key)(e),...e.attrs}],parseMarkdown:{match:e=>e.type==="link",runner:(e,n,i)=>{const s=n.url,o=n.title;e.openMark(i,{href:s,title:o}),e.next(n.children),e.closeMark(i)}},toMarkdown:{match:e=>e.type.name==="link",runner:(e,n)=>{e.withMark(n,"link",void 0,{title:n.attrs.title,url:n.attrs.href})}}}));Ve(Or.mark,{displayName:"MarkSchema<link>",group:"Link"});const IB=rn("ToggleLink",t=>(e={})=>Zb(Or.type(t),e));Ve(IB,{displayName:"Command<toggleLinkCommand>",group:"Link"});const LB=rn("UpdateLink",t=>(e={})=>(n,i)=>{if(!i)return!1;let s,o=-1;const{selection:r}=n,{from:a,to:l}=r;if(n.doc.nodesBetween(a,a===l?l+1:l,(p,m)=>{if(Or.type(t).isInSet(p.marks))return s=p,o=m,!1}),!s)return!1;const c=s.marks.find(({type:p})=>p===Or.type(t));if(!c)return!1;const u=o,d=o+s.nodeSize,{tr:h}=n,f=Or.type(t).create({...c.attrs,...e});return f?(i(h.removeMark(u,d,c).addMark(u,d,f).setSelection(new Ot(h.selection.$anchor)).scrollIntoView()),!0):!1});Ve(LB,{displayName:"Command<updateLinkCommand>",group:"Link"});const OB=B8("doc",()=>({content:"block+",parseMarkdown:{match:({type:t})=>t==="root",runner:(t,e,n)=>{t.injectRoot(e,n)}},toMarkdown:{match:t=>t.type.name==="doc",runner:(t,e)=>{t.openNode("root"),t.next(e.content)}}}));Ve(OB,{displayName:"NodeSchema<doc>",group:"Doc"});const G8=Zr("paragraph");Ve(G8,{displayName:"Attr<paragraph>",group:"Paragraph"});const _l=zs("paragraph",t=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:e=>["p",t.get(G8.key)(e),0],parseMarkdown:{match:e=>e.type==="paragraph",runner:(e,n,i)=>{e.openNode(i),n.children?e.next(n.children):e.addText(n.value||""),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="paragraph",runner:(e,n)=>{e.openNode("paragraph"),AB(e,n),e.closeNode()}}}));Ve(_l.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"});Ve(_l.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});const X8=rn("TurnIntoText",t=>()=>jg(_l.type(t)));Ve(X8,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});const K8=go("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:t=>{const e=t.get(hn);return()=>e.call(X8.key)}}});Ve(K8.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"});Ve(K8.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});const MSe=Array(6).fill(0).map((t,e)=>e+1);function TSe(t){return kSe(t.textContent)}const r2=hs(TSe,"headingIdGenerator");Ve(r2,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});const Z8=Zr("heading");Ve(Z8,{displayName:"Attr<heading>",group:"Heading"});const ga=zs("heading",t=>{const e=t.get(r2.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:""},level:{default:1}},parseDOM:MSe.map(n=>({tag:`h${n}`,getAttrs:i=>{if(!(i instanceof HTMLElement))throw Kr(i);return{level:n,id:i.id}}})),toDOM:n=>[`h${n.attrs.level}`,{...t.get(Z8.key)(n),id:n.attrs.id||e(n)},0],parseMarkdown:{match:({type:n})=>n==="heading",runner:(n,i,s)=>{const o=i.depth;n.openNode(s,{level:o}),n.next(i.children),n.closeNode()}},toMarkdown:{match:n=>n.type.name==="heading",runner:(n,i)=>{n.openNode("heading",void 0,{depth:i.attrs.level}),AB(n,i),n.closeNode()}}}});Ve(ga.node,{displayName:"NodeSchema<heading>",group:"Heading"});Ve(ga.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});const DB=mo(t=>_N(/^(?<hashes>#+)\s$/,ga.type(t),e=>{var n,i;const s=((i=(n=e.groups)==null?void 0:n.hashes)==null?void 0:i.length)||0,o=t.get(Vn),{$from:r}=o.state.selection,a=r.node();if(a.type.name==="heading"){let l=Number(a.attrs.level)+Number(s);return l>6&&(l=6),{level:l}}return{level:s}}));Ve(DB,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});const Ql=rn("WrapInHeading",t=>e=>(e??(e=1),e<1?jg(_l.type(t)):jg(ga.type(t),{level:e})));Ve(Ql,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});const J8=rn("DowngradeHeading",t=>()=>(e,n,i)=>{const{$from:s}=e.selection,o=s.node();if(o.type!==ga.type(t)||!e.selection.empty||s.parentOffset!==0)return!1;const r=o.attrs.level-1;return r?(n==null||n(e.tr.setNodeMarkup(e.selection.$from.before(),void 0,{...o.attrs,level:r})),!0):jg(_l.type(t))(e,n,i)});Ve(J8,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});const Q8=go("headingKeymap",{TurnIntoH1:{shortcuts:"Mod-Alt-1",command:t=>{const e=t.get(hn);return()=>e.call(Ql.key,1)}},TurnIntoH2:{shortcuts:"Mod-Alt-2",command:t=>{const e=t.get(hn);return()=>e.call(Ql.key,2)}},TurnIntoH3:{shortcuts:"Mod-Alt-3",command:t=>{const e=t.get(hn);return()=>e.call(Ql.key,3)}},TurnIntoH4:{shortcuts:"Mod-Alt-4",command:t=>{const e=t.get(hn);return()=>e.call(Ql.key,4)}},TurnIntoH5:{shortcuts:"Mod-Alt-5",command:t=>{const e=t.get(hn);return()=>e.call(Ql.key,5)}},TurnIntoH6:{shortcuts:"Mod-Alt-6",command:t=>{const e=t.get(hn);return()=>e.call(Ql.key,6)}},DowngradeHeading:{shortcuts:["Delete","Backspace"],command:t=>{const e=t.get(hn);return()=>e.call(J8.key)}}});Ve(Q8.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"});Ve(Q8.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});const e5=Zr("blockquote");Ve(e5,{displayName:"Attr<blockquote>",group:"Blockquote"});const rp=zs("blockquote",t=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:e=>["blockquote",t.get(e5.key)(e),0],parseMarkdown:{match:({type:e})=>e==="blockquote",runner:(e,n,i)=>{e.openNode(i).next(n.children).closeNode()}},toMarkdown:{match:e=>e.type.name==="blockquote",runner:(e,n)=>{e.openNode("blockquote").next(n.content).closeNode()}}}));Ve(rp.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"});Ve(rp.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});const RB=mo(t=>$8(/^\s*>\s$/,rp.type(t)));Ve(RB,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});const t5=rn("WrapInBlockquote",t=>()=>P8(rp.type(t)));Ve(t5,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});const n5=go("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:t=>{const e=t.get(hn);return()=>e.call(t5.key)}}});Ve(n5.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"});Ve(n5.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});const s5=Zr("codeBlock",()=>({pre:{},code:{}}));Ve(s5,{displayName:"Attr<codeBlock>",group:"CodeBlock"});const ap=zs("code_block",t=>({content:"text*",group:"block",marks:"",defining:!0,code:!0,attrs:{language:{default:""}},parseDOM:[{tag:"pre",preserveWhitespace:"full",getAttrs:e=>{if(!(e instanceof HTMLElement))throw Kr(e);return{language:e.dataset.language}}}],toDOM:e=>{const n=t.get(s5.key)(e);return["pre",{...n.pre,"data-language":e.attrs.language},["code",n.code,0]]},parseMarkdown:{match:({type:e})=>e==="code",runner:(e,n,i)=>{const s=n.lang,o=n.value;e.openNode(i,{language:s}),o&&e.addText(o),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="code_block",runner:(e,n)=>{var i;e.addNode("code",void 0,((i=n.content.firstChild)==null?void 0:i.text)||"",{lang:n.attrs.language})}}}));Ve(ap.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"});Ve(ap.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});const VB=mo(t=>_N(/^```(?<language>[a-z]*)?[\s\n]$/,ap.type(t),e=>{var n;return{language:((n=e.groups)==null?void 0:n.language)??""}}));Ve(VB,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});const i5=rn("CreateCodeBlock",t=>(e="")=>jg(ap.type(t),{language:e}));Ve(i5,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"});const PSe=rn("UpdateCodeBlockLanguage",()=>({pos:t,language:e}={pos:-1,language:""})=>(n,i)=>t>=0?(i==null||i(n.tr.setNodeAttribute(t,"language",e)),!0):!1);Ve(PSe,{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});const o5=go("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:t=>{const e=t.get(hn);return()=>e.call(i5.key)}}});Ve(o5.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"});Ve(o5.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});const r5=Zr("image");Ve(r5,{displayName:"Attr<image>",group:"Image"});const Bd=zs("image",t=>({inline:!0,group:"inline",selectable:!0,draggable:!0,marks:"",atom:!0,defining:!0,isolating:!0,attrs:{src:{default:""},alt:{default:""},title:{default:""}},parseDOM:[{tag:"img[src]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw Kr(e);return{src:e.getAttribute("src")||"",alt:e.getAttribute("alt")||"",title:e.getAttribute("title")||e.getAttribute("alt")||""}}}],toDOM:e=>["img",{...t.get(r5.key)(e),...e.attrs}],parseMarkdown:{match:({type:e})=>e==="image",runner:(e,n,i)=>{const s=n.url,o=n.alt,r=n.title;e.addNode(i,{src:s,alt:o,title:r})}},toMarkdown:{match:e=>e.type.name==="image",runner:(e,n)=>{e.addNode("image",void 0,void 0,{title:n.attrs.title,url:n.attrs.src,alt:n.attrs.alt})}}}));Ve(Bd.node,{displayName:"NodeSchema<image>",group:"Image"});Ve(Bd.ctx,{displayName:"NodeSchemaCtx<image>",group:"Image"});const FB=rn("InsertImage",t=>(e={})=>(n,i)=>{if(!i)return!0;const{src:s="",alt:o="",title:r=""}=e,a=Bd.type(t).create({src:s,alt:o,title:r});return a&&i(n.tr.replaceSelectionWith(a).scrollIntoView()),!0});Ve(FB,{displayName:"Command<insertImageCommand>",group:"Image"});const NB=rn("UpdateImage",t=>(e={})=>(n,i)=>{const s=q4e(n.selection,Bd.type(t));if(!s)return!1;const{node:o,pos:r}=s,a={...o.attrs},{src:l,alt:c,title:u}=e;return l!==void 0&&(a.src=l),c!==void 0&&(a.alt=c),u!==void 0&&(a.title=u),i==null||i(n.tr.setNodeMarkup(r,void 0,a).scrollIntoView()),!0});Ve(NB,{displayName:"Command<updateImageCommand>",group:"Image"});const ISe=mo(t=>new zo(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,(e,n,i,s)=>{const[o,r,a="",l]=n;return o?e.tr.replaceWith(i,s,Bd.type(t).create({src:a,alt:r,title:l})):null}));Ve(ISe,{displayName:"InputRule<insertImageInputRule>",group:"Image"});const Ey=Zr("hardbreak",t=>({"data-type":"hardbreak","data-is-inline":t.attrs.isInline}));Ve(Ey,{displayName:"Attr<hardbreak>",group:"Hardbreak"});const Ju=zs("hardbreak",t=>({inline:!0,group:"inline",attrs:{isInline:{default:!1}},selectable:!1,parseDOM:[{tag:"br"},{tag:'span[data-type="hardbreak"]',getAttrs:()=>({isInline:!0})}],toDOM:e=>e.attrs.isInline?["span",t.get(Ey.key)(e)," "]:["br",t.get(Ey.key)(e)],parseMarkdown:{match:({type:e})=>e==="break",runner:(e,n,i)=>{var s;e.addNode(i,{isInline:!!((s=n.data)!=null&&s.isInline)})}},leafText:()=>`
`,toMarkdown:{match:e=>e.type.name==="hardbreak",runner:(e,n)=>{n.attrs.isInline?e.addNode("text",void 0,`
`):e.addNode("break")}}}));Ve(Ju.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"});Ve(Ju.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});const a5=rn("InsertHardbreak",t=>()=>(e,n)=>{var i;const{selection:s,tr:o}=e;if(!(s instanceof Ot))return!1;if(s.empty){const r=s.$from.node();if(r.childCount>0&&((i=r.lastChild)==null?void 0:i.type.name)==="hardbreak")return n==null||n(o.replaceRangeWith(s.to-1,s.to,e.schema.node("paragraph")).setSelection(Ht.near(o.doc.resolve(s.to))).scrollIntoView()),!0}return n==null||n(o.setMeta("hardbreak",!0).replaceSelectionWith(Ju.type(t).create()).scrollIntoView()),!0});Ve(a5,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});const l5=go("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:t=>{const e=t.get(hn);return()=>e.call(a5.key)}}});Ve(l5.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"});Ve(l5.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});const c5=Zr("hr");Ve(c5,{displayName:"Attr<hr>",group:"Hr"});const lp=zs("hr",t=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:e=>["hr",t.get(c5.key)(e)],parseMarkdown:{match:({type:e})=>e==="thematicBreak",runner:(e,n,i)=>{e.addNode(i)}},toMarkdown:{match:e=>e.type.name==="hr",runner:e=>{e.addNode("thematicBreak")}}}));Ve(lp.node,{displayName:"NodeSchema<hr>",group:"Hr"});Ve(lp.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});const BB=mo(t=>new zo(/^(?:---|___\s|\*\*\*\s)$/,(e,n,i,s)=>{const{tr:o}=e;return n[0]&&o.replaceWith(i-1,s,lp.type(t).create()),o}));Ve(BB,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});const zB=rn("InsertHr",t=>()=>(e,n)=>{if(!n)return!0;const i=_l.node.type(t).create(),{tr:s,selection:o}=e,{from:r}=o,a=lp.type(t).create();if(!a)return!0;const l=s.replaceSelectionWith(a).insert(r,i),c=Ht.findFrom(l.doc.resolve(r),1,!0);return c&&n(l.setSelection(c).scrollIntoView()),!0});Ve(zB,{displayName:"Command<insertHrCommand>",group:"Hr"});const u5=Zr("bulletList");Ve(u5,{displayName:"Attr<bulletList>",group:"BulletList"});const zd=zs("bullet_list",t=>({content:"listItem+",group:"block",attrs:{spread:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>{if(!(e instanceof HTMLElement))throw Kr(e);return{spread:e.dataset.spread}}}],toDOM:e=>["ul",{...t.get(u5.key)(e),"data-spread":e.attrs.spread},0],parseMarkdown:{match:({type:e,ordered:n})=>e==="list"&&!n,runner:(e,n,i)=>{const s=n.spread!=null?`${n.spread}`:"false";e.openNode(i,{spread:s}).next(n.children).closeNode()}},toMarkdown:{match:e=>e.type.name==="bullet_list",runner:(e,n)=>{e.openNode("list",void 0,{ordered:!1,spread:n.attrs.spread==="true"}).next(n.content).closeNode()}}}));Ve(zd.node,{displayName:"NodeSchema<bulletList>",group:"BulletList"});Ve(zd.ctx,{displayName:"NodeSchemaCtx<bulletList>",group:"BulletList"});const HB=mo(t=>$8(/^\s*([-+*])\s$/,zd.type(t)));Ve(HB,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});const d5=rn("WrapInBulletList",t=>()=>P8(zd.type(t)));Ve(d5,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});const h5=go("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:t=>{const e=t.get(hn);return()=>e.call(d5.key)}}});Ve(h5.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"});Ve(h5.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});const f5=Zr("orderedList");Ve(f5,{displayName:"Attr<orderedList>",group:"OrderedList"});const Hd=zs("ordered_list",t=>({content:"listItem+",group:"block",attrs:{order:{default:1},spread:{default:!1}},parseDOM:[{tag:"ol",getAttrs:e=>{if(!(e instanceof HTMLElement))throw Kr(e);return{spread:e.dataset.spread,order:e.hasAttribute("start")?Number(e.getAttribute("start")):1}}}],toDOM:e=>["ol",{...t.get(f5.key)(e),...e.attrs.order===1?{}:e.attrs.order,"data-spread":e.attrs.spread},0],parseMarkdown:{match:({type:e,ordered:n})=>e==="list"&&!!n,runner:(e,n,i)=>{const s=n.spread!=null?`${n.spread}`:"true";e.openNode(i,{spread:s}).next(n.children).closeNode()}},toMarkdown:{match:e=>e.type.name==="ordered_list",runner:(e,n)=>{e.openNode("list",void 0,{ordered:!0,start:1,spread:n.attrs.spread==="true"}),e.next(n.content),e.closeNode()}}}));Ve(Hd.node,{displayName:"NodeSchema<orderedList>",group:"OrderedList"});Ve(Hd.ctx,{displayName:"NodeSchemaCtx<orderedList>",group:"OrderedList"});const UB=mo(t=>$8(/^\s*(\d+)\.\s$/,Hd.type(t),e=>({order:Number(e[1])}),(e,n)=>n.childCount+n.attrs.order===Number(e[1])));Ve(UB,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});const p5=rn("WrapInOrderedList",t=>()=>P8(Hd.type(t)));Ve(p5,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});const m5=go("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:t=>{const e=t.get(hn);return()=>e.call(p5.key)}}});Ve(m5.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"});Ve(m5.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});const g5=Zr("listItem");Ve(g5,{displayName:"Attr<listItem>",group:"ListItem"});const xa=zs("list_item",t=>({group:"listItem",content:"(paragraph|blockquote) block*",attrs:{label:{default:"•"},listType:{default:"bullet"},spread:{default:"true"}},defining:!0,parseDOM:[{tag:"li",getAttrs:e=>{if(!(e instanceof HTMLElement))throw Kr(e);return{label:e.dataset.label,listType:e.dataset.listType,spread:e.dataset.spread}}}],toDOM:e=>["li",{...t.get(g5.key)(e),"data-label":e.attrs.label,"data-list-type":e.attrs.listType,"data-spread":e.attrs.spread},0],parseMarkdown:{match:({type:e})=>e==="listItem",runner:(e,n,i)=>{const s=n.label!=null?`${n.label}.`:"•",o=n.label!=null?"ordered":"bullet",r=n.spread!=null?`${n.spread}`:"true";e.openNode(i,{label:s,listType:o,spread:r}),e.next(n.children),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="list_item",runner:(e,n)=>{e.openNode("listItem",void 0,{spread:n.attrs.spread==="true"}),e.next(n.content),e.closeNode()}}}));Ve(xa.node,{displayName:"NodeSchema<listItem>",group:"ListItem"});Ve(xa.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});const v5=rn("SinkListItem",t=>()=>$Se(xa.type(t)));Ve(v5,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});const _5=rn("LiftListItem",t=>()=>$B(xa.type(t)));Ve(_5,{displayName:"Command<liftListItemCommand>",group:"ListItem"});const y5=rn("SplitListItem",t=>()=>CSe(xa.type(t)));Ve(y5,{displayName:"Command<splitListItemCommand>",group:"ListItem"});function LSe(t){return(e,n,i)=>{const{selection:s}=e;if(!(s instanceof Ot))return!1;const{empty:o,$from:r}=s;if(!o||r.parentOffset!==0)return!1;const a=r.node(-1);return a.type!==xa.type(t)||a.firstChild!==r.node()||r.node(-2).childCount>1?!1:$B(xa.type(t))(e,n,i)}}const b5=rn("LiftFirstListItem",t=>()=>LSe(t));Ve(b5,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});const w5=go("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:t=>{const e=t.get(hn);return()=>e.call(y5.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:t=>{const e=t.get(hn);return()=>e.call(v5.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:t=>{const e=t.get(hn);return()=>e.call(_5.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:t=>{const e=t.get(hn);return()=>e.call(b5.key)}}});Ve(w5.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"});Ve(w5.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});const jB=B8("text",()=>({group:"inline",parseMarkdown:{match:({type:t})=>t==="text",runner:(t,e)=>{t.addText(e.value)}},toMarkdown:{match:t=>t.type.name==="text",runner:(t,e)=>{t.addNode("text",void 0,e.text)}}}));Ve(jB,{displayName:"NodeSchema<text>",group:"Text"});const k5=Zr("html");Ve(k5,{displayName:"Attr<html>",group:"Html"});const C5=zs("html",t=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:""}},toDOM:e=>{const n=document.createElement("span"),i={...t.get(k5.key)(e),"data-value":e.attrs.value,"data-type":"html"};return n.textContent=e.attrs.value,["span",i,e.attrs.value]},parseDOM:[{tag:'span[data-type="html"]',getAttrs:e=>({value:e.dataset.value??""})}],parseMarkdown:{match:({type:e})=>e==="html",runner:(e,n,i)=>{e.addNode(i,{value:n.value})}},toMarkdown:{match:e=>e.type.name==="html",runner:(e,n)=>{e.addNode("html",void 0,n.attrs.value)}}}));Ve(C5.node,{displayName:"NodeSchema<html>",group:"Html"});Ve(C5.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});const OSe=[OB,G8,_l,r2,Z8,ga,Ey,Ju,e5,rp,s5,ap,c5,lp,r5,Bd,u5,zd,f5,Hd,g5,xa,z8,Nd,U8,op,W8,Xa,q8,Or,k5,C5,jB].flat(),DSe=[RB,HB,UB,VB,BB,DB].flat(),RSe=[EB,MB,PB,TB],VSe=[X8,t5,Ql,J8,i5,a5,zB,FB,NB,p5,d5,v5,y5,_5,b5,s2,o2,i2,IB,LB],FSe=[n5,o5,l5,Q8,w5,m5,h5,K8,H8,Y8,j8].flat(),x5=Fd("remarkAddOrderInList",()=>()=>t=>{Vd(t,"list",e=>{if(e.ordered){const n=e.start??1;e.children.forEach((i,s)=>{i.label=s+n})}})});Ve(x5.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"});Ve(x5.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});const S5=Fd("remarkLineBreak",()=>()=>t=>{const e=/[\t ]*(?:\r?\n|\r)/g;Vd(t,"text",(n,i,s)=>{if(!n.value||typeof n.value!="string")return;const o=[];let r=0;e.lastIndex=0;let a=e.exec(n.value);for(;a;){const l=a.index;r!==l&&o.push({type:"text",value:n.value.slice(r,l)}),o.push({type:"break",data:{isInline:!0}}),r=l+a[0].length,a=e.exec(n.value)}if(o.length>0&&s&&typeof i=="number")return r<n.value.length&&o.push({type:"text",value:n.value.slice(r)}),s.children.splice(i,1,...o),i+o.length})});Ve(S5.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"});Ve(S5.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});const $5=Fd("remarkInlineLink",()=>ESe);Ve($5.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"});Ve($5.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});const NSe=t=>!!t.children,BSe=t=>t.type==="html";function zSe(t,e){return n(t,0,null)[0];function n(i,s,o){if(NSe(i)){const r=[];for(let a=0,l=i.children.length;a<l;a++){const c=i.children[a];if(c){const u=n(c,a,i);if(u)for(let d=0,h=u.length;d<h;d++){const f=u[d];f&&r.push(f)}}}i.children=r}return e(i,s,o)}}const A5=Fd("remarkHTMLTransformer",()=>()=>t=>{zSe(t,(e,n,i)=>BSe(e)?((i==null?void 0:i.type)==="root"&&(e.children=[{...e}],delete e.value,e.type="paragraph"),[e]):[e])});Ve(A5.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"});Ve(A5.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});const E5=Fd("remarkMarker",()=>()=>(t,e)=>{const n=i=>e.value.charAt(i.position.start.offset);Vd(t,i=>["strong","emphasis"].includes(i.type),i=>{i.marker=n(i)})});Ve(E5.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"});Ve(E5.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});const WB=Ps(()=>{let t=!1;const e=new ds("MILKDOWN_INLINE_NODES_CURSOR"),n=new ts({key:e,state:{init(){return!1},apply(i){if(!i.selection.empty)return!1;const s=i.selection.$from,o=s.nodeBefore,r=s.nodeAfter;return!!(o&&r&&o.isInline&&!o.isText&&r.isInline&&!r.isText)}},props:{handleDOMEvents:{compositionend:(i,s)=>t?(t=!1,requestAnimationFrame(()=>{if(n.getState(i.state)){const o=i.state.selection.from;s.preventDefault(),i.dispatch(i.state.tr.insertText(s.data||"",o))}}),!0):!1,compositionstart:i=>(n.getState(i.state)&&(t=!0),!1),beforeinput:(i,s)=>{if(n.getState(i.state)&&s instanceof InputEvent&&s.data&&!t){const o=i.state.selection.from;return s.preventDefault(),i.dispatch(i.state.tr.insertText(s.data||"",o)),!0}return!1}},decorations(i){if(n.getState(i)){const s=i.selection.$from.pos,o=document.createElement("span"),r=Fs.widget(s,o,{side:-1}),a=document.createElement("span"),l=Fs.widget(s,a);return setTimeout(()=>{o.contentEditable="true",a.contentEditable="true"}),Gn.create(i.doc,[r,l])}return Gn.empty}}});return n});Ve(WB,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});const YB=Ps(t=>new ts({key:new ds("MILKDOWN_HARDBREAK_MARKS"),appendTransaction:(e,n,i)=>{if(!e.length)return;const[s]=e;if(!s)return;const[o]=s.steps;if(s.getMeta("hardbreak")){if(!(o instanceof ei))return;const{from:r}=o;return i.tr.setNodeMarkup(r,Ju.type(t),void 0,[])}if(o instanceof Ga){let r=i.tr;const{from:a,to:l}=o;return i.doc.nodesBetween(a,l,(c,u)=>{c.type===Ju.type(t)&&(r=r.setNodeMarkup(u,Ju.type(t),void 0,[]))}),r}}}));Ve(YB,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});const M5=hs(["table","code_block"],"hardbreakFilterNodes");Ve(M5,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});const qB=Ps(t=>{const e=t.get(M5.key);return new ts({key:new ds("MILKDOWN_HARDBREAK_FILTER"),filterTransaction:(n,i)=>{const s=n.getMeta("hardbreak"),[o]=n.steps;if(s&&o){const{from:r}=o,a=i.doc.resolve(r);let l=a.depth,c=!0;for(;l>0;)e.includes(a.node(l).type.name)&&(c=!1),l--;return c}return!0}})});Ve(qB,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});const GB=Ps(t=>{const e=new ds("MILKDOWN_HEADING_ID"),n=i=>{if(i.composing)return;const s=t.get(r2.key),o=i.state.tr.setMeta("addToHistory",!1);let r=!1;i.state.doc.descendants((a,l)=>{if(a.type===ga.type(t)){if(a.textContent.trim().length===0)return;const c=a.attrs,u=s(a);c.id!==u&&(r=!0,o.setMeta(e,!0).setNodeMarkup(l,void 0,{...c,id:u}))}}),r&&i.dispatch(o)};return new ts({key:e,view:i=>(n(i),{update:(s,o)=>{s.state.doc.eq(o.doc)||n(s)}})})});Ve(GB,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});const XB=Ps(t=>{const e=n=>{if(n.composing||!n.editable)return;const i=Hd.type(t),s=zd.type(t),o=xa.type(t),r=n.state,a=(u,d)=>{let h=!1;const f=`${d+1}.`;return u.label!==f&&(u.label=f,h=!0),h};let l=r.tr,c=!1;r.doc.descendants((u,d,h,f)=>{if(u.type===s){const p=u.maybeChild(0);(p==null?void 0:p.type)===o&&p.attrs.listType==="ordered"&&(c=!0,l.setNodeMarkup(d,i,{spread:"true"}),u.descendants((m,y,b,k)=>{if(m.type===o){const C={...m.attrs};a(C,k)&&(l=l.setNodeMarkup(y,void 0,C))}return!1}))}else if(u.type===o&&(h==null?void 0:h.type)===i){const p={...u.attrs};let m=!1;p.listType!=="ordered"&&(p.listType="ordered",m=!0),h!=null&&h.maybeChild(0)&&(m=a(p,f)),m&&(l=l.setNodeMarkup(d,void 0,p),c=!0)}}),c&&n.dispatch(l.setMeta("addToHistory",!1))};return new ts({key:new ds("MILKDOWN_KEEP_LIST_ORDER"),view:n=>(e(n),{update:i=>{e(i)}})})});Ve(XB,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});const HSe=[YB,M5,qB,WB,x5,$5,S5,A5,E5,GB,XB].flat(),USe=[OSe,DSe,RSe,VSe,FSe,HSe].flat();var W6,Y6;if(typeof WeakMap<"u"){let t=new WeakMap;W6=e=>t.get(e),Y6=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;W6=i=>{for(let s=0;s<t.length;s+=2)if(t[s]==i)return t[s+1]},Y6=(i,s)=>(n==10&&(n=0),t[n++]=i,t[n++]=s)}var Pn=class{constructor(t,e,n,i){this.width=t,this.height=e,this.map=n,this.problems=i}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const i=e%this.width,s=e/this.width|0;let o=i+1,r=s+1;for(let a=1;o<this.width&&this.map[e+a]==n;a++)o++;for(let a=1;r<this.height&&this.map[e+this.width*a]==n;a++)r++;return{left:i,top:s,right:o,bottom:r}}throw new RangeError(`No cell with offset ${t} found`)}colCount(t){for(let e=0;e<this.map.length;e++)if(this.map[e]==t)return e%this.width;throw new RangeError(`No cell with offset ${t} found`)}nextCell(t,e,n){const{left:i,right:s,top:o,bottom:r}=this.findCell(t);return e=="horiz"?(n<0?i==0:s==this.width)?null:this.map[o*this.width+(n<0?i-1:s)]:(n<0?o==0:r==this.height)?null:this.map[i+this.width*(n<0?o-1:r)]}rectBetween(t,e){const{left:n,right:i,top:s,bottom:o}=this.findCell(t),{left:r,right:a,top:l,bottom:c}=this.findCell(e);return{left:Math.min(n,r),top:Math.min(s,l),right:Math.max(i,a),bottom:Math.max(o,c)}}cellsInRect(t){const e=[],n={};for(let i=t.top;i<t.bottom;i++)for(let s=t.left;s<t.right;s++){const o=i*this.width+s,r=this.map[o];n[r]||(n[r]=!0,!(s==t.left&&s&&this.map[o-1]==r||i==t.top&&i&&this.map[o-this.width]==r)&&e.push(r))}return e}positionAt(t,e,n){for(let i=0,s=0;;i++){const o=s+n.child(i).nodeSize;if(i==t){let r=e+t*this.width;const a=(t+1)*this.width;for(;r<a&&this.map[r]<s;)r++;return r==a?o-1:this.map[r]}s=o}}static get(t){return W6(t)||Y6(t,jSe(t))}};function jSe(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=WSe(t),n=t.childCount,i=[];let s=0,o=null;const r=[];for(let c=0,u=e*n;c<u;c++)i[c]=0;for(let c=0,u=0;c<n;c++){const d=t.child(c);u++;for(let p=0;;p++){for(;s<i.length&&i[s]!=0;)s++;if(p==d.childCount)break;const m=d.child(p),{colspan:y,rowspan:b,colwidth:k}=m.attrs;for(let C=0;C<b;C++){if(C+c>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:b-C});break}const $=s+C*e;for(let x=0;x<y;x++){i[$+x]==0?i[$+x]=u:(o||(o=[])).push({type:"collision",row:c,pos:u,n:y-x});const M=k&&k[x];if(M){const P=($+x)%e*2,T=r[P];T==null||T!=M&&r[P+1]==1?(r[P]=M,r[P+1]=1):T==M&&r[P+1]++}}}s+=y,u+=m.nodeSize}const h=(c+1)*e;let f=0;for(;s<h;)i[s++]==0&&f++;f&&(o||(o=[])).push({type:"missing",row:c,n:f}),u++}const a=new Pn(e,n,i,o);let l=!1;for(let c=0;!l&&c<r.length;c+=2)r[c]!=null&&r[c+1]<n&&(l=!0);return l&&YSe(a,r,t),a}function WSe(t){let e=-1,n=!1;for(let i=0;i<t.childCount;i++){const s=t.child(i);let o=0;if(n)for(let r=0;r<i;r++){const a=t.child(r);for(let l=0;l<a.childCount;l++){const c=a.child(l);r+c.attrs.rowspan>i&&(o+=c.attrs.colspan)}}for(let r=0;r<s.childCount;r++){const a=s.child(r);o+=a.attrs.colspan,a.attrs.rowspan>1&&(n=!0)}e==-1?e=o:e!=o&&(e=Math.max(e,o))}return e}function YSe(t,e,n){t.problems||(t.problems=[]);const i={};for(let s=0;s<t.map.length;s++){const o=t.map[s];if(i[o])continue;i[o]=!0;const r=n.nodeAt(o);if(!r)throw new RangeError(`No cell with offset ${o} found`);let a=null;const l=r.attrs;for(let c=0;c<l.colspan;c++){const u=(s+c)%t.width,d=e[u*2];d!=null&&(!l.colwidth||l.colwidth[c]!=d)&&((a||(a=qSe(l)))[c]=d)}a&&t.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}function qSe(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function lM(t,e){if(typeof t=="string")return{};const n=t.getAttribute("data-colwidth"),i=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map(r=>Number(r)):null,s=Number(t.getAttribute("colspan")||1),o={colspan:s,rowspan:Number(t.getAttribute("rowspan")||1),colwidth:i&&i.length==s?i:null};for(const r in e){const a=e[r].getFromDOM,l=a&&a(t);l!=null&&(o[r]=l)}return o}function cM(t,e){const n={};t.attrs.colspan!=1&&(n.colspan=t.attrs.colspan),t.attrs.rowspan!=1&&(n.rowspan=t.attrs.rowspan),t.attrs.colwidth&&(n["data-colwidth"]=t.attrs.colwidth.join(","));for(const i in e){const s=e[i].setDOMAttr;s&&s(t.attrs[i],n)}return n}function GSe(t){const e=t.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(const i in e)n[i]={default:e[i].default};return{table:{content:"table_row+",tableRole:"table",isolating:!0,group:t.tableGroup,parseDOM:[{tag:"table"}],toDOM(){return["table",["tbody",0]]}},table_row:{content:"(table_cell | table_header)*",tableRole:"row",parseDOM:[{tag:"tr"}],toDOM(){return["tr",0]}},table_cell:{content:t.cellContent,attrs:n,tableRole:"cell",isolating:!0,parseDOM:[{tag:"td",getAttrs:i=>lM(i,e)}],toDOM(i){return["td",cM(i,e),0]}},table_header:{content:t.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:i=>lM(i,e)}],toDOM(i){return["th",cM(i,e),0]}}}}function gr(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const i=t.nodes[n],s=i.spec.tableRole;s&&(e[s]=i)}}return e}var sc=new ds("selectingCells");function H1(t){for(let e=t.depth-1;e>0;e--)if(t.node(e).type.spec.tableRole=="row")return t.node(0).resolve(t.before(e+1));return null}function _r(t){const e=t.selection.$head;for(let n=e.depth;n>0;n--)if(e.node(n).type.spec.tableRole=="row")return!0;return!1}function a2(t){const e=t.selection;if("$anchorCell"in e&&e.$anchorCell)return e.$anchorCell.pos>e.$headCell.pos?e.$anchorCell:e.$headCell;if("node"in e&&e.node&&e.node.type.spec.tableRole=="cell")return e.$anchor;const n=H1(e.$head)||XSe(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function XSe(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const i=e.type.spec.tableRole;if(i=="cell"||i=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const i=e.type.spec.tableRole;if(i=="cell"||i=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function q6(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function KSe(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function T5(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function KB(t,e,n){const i=t.node(-1),s=Pn.get(i),o=t.start(-1),r=s.nextCell(t.pos-o,e,n);return r==null?null:t.node(0).resolve(o+r)}function vd(t,e,n=1){const i={...t,colspan:t.colspan-n};return i.colwidth&&(i.colwidth=i.colwidth.slice(),i.colwidth.splice(e,n),i.colwidth.some(s=>s>0)||(i.colwidth=null)),i}function ZSe(t,e,n=1){const i={...t,colspan:t.colspan+n};if(i.colwidth){i.colwidth=i.colwidth.slice();for(let s=0;s<n;s++)i.colwidth.splice(e,0,0)}return i}function JSe(t,e,n){const i=gr(e.type.schema).header_cell;for(let s=0;s<t.height;s++)if(e.nodeAt(t.map[n+s*t.width]).type!=i)return!1;return!0}var ns=class Ba extends Ht{constructor(e,n=e){const i=e.node(-1),s=Pn.get(i),o=e.start(-1),r=s.rectBetween(e.pos-o,n.pos-o),a=e.node(0),l=s.cellsInRect(r).filter(u=>u!=n.pos-o);l.unshift(n.pos-o);const c=l.map(u=>{const d=i.nodeAt(u);if(!d)throw RangeError(`No cell with offset ${u} found`);const h=o+u+1;return new ky(a.resolve(h),a.resolve(h+d.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=n}map(e,n){const i=e.resolve(n.map(this.$anchorCell.pos)),s=e.resolve(n.map(this.$headCell.pos));if(q6(i)&&q6(s)&&T5(i,s)){const o=this.$anchorCell.node(-1)!=i.node(-1);return o&&this.isRowSelection()?Ba.rowSelection(i,s):o&&this.isColSelection()?Ba.colSelection(i,s):new Ba(i,s)}return Ot.between(i,s)}content(){const e=this.$anchorCell.node(-1),n=Pn.get(e),i=this.$anchorCell.start(-1),s=n.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i),o={},r=[];for(let l=s.top;l<s.bottom;l++){const c=[];for(let u=l*n.width+s.left,d=s.left;d<s.right;d++,u++){const h=n.map[u];if(o[h])continue;o[h]=!0;const f=n.findCell(h);let p=e.nodeAt(h);if(!p)throw RangeError(`No cell with offset ${h} found`);const m=s.left-f.left,y=f.right-s.right;if(m>0||y>0){let b=p.attrs;if(m>0&&(b=vd(b,0,m)),y>0&&(b=vd(b,b.colspan-y,y)),f.left<s.left){if(p=p.type.createAndFill(b),!p)throw RangeError(`Could not create cell with attrs ${JSON.stringify(b)}`)}else p=p.type.create(b,p.content)}if(f.top<s.top||f.bottom>s.bottom){const b={...p.attrs,rowspan:Math.min(f.bottom,s.bottom)-Math.max(f.top,s.top)};f.top<s.top?p=p.type.createAndFill(b):p=p.type.create(b,p.content)}c.push(p)}r.push(e.child(l).copy(nt.from(c)))}const a=this.isColSelection()&&this.isRowSelection()?e:r;return new rt(nt.from(a),1,1)}replace(e,n=rt.empty){const i=e.steps.length,s=this.ranges;for(let r=0;r<s.length;r++){const{$from:a,$to:l}=s[r],c=e.mapping.slice(i);e.replace(c.map(a.pos),c.map(l.pos),r?rt.empty:n)}const o=Ht.findFrom(e.doc.resolve(e.mapping.slice(i).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,n){this.replace(e,new rt(nt.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),i=Pn.get(n),s=this.$anchorCell.start(-1),o=i.cellsInRect(i.rectBetween(this.$anchorCell.pos-s,this.$headCell.pos-s));for(let r=0;r<o.length;r++)e(n.nodeAt(o[r]),s+o[r])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const i=e+this.$anchorCell.nodeAfter.attrs.rowspan,s=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(i,s)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const i=e.node(-1),s=Pn.get(i),o=e.start(-1),r=s.findCell(e.pos-o),a=s.findCell(n.pos-o),l=e.node(0);return r.top<=a.top?(r.top>0&&(e=l.resolve(o+s.map[r.left])),a.bottom<s.height&&(n=l.resolve(o+s.map[s.width*(s.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(o+s.map[a.left])),r.bottom<s.height&&(e=l.resolve(o+s.map[s.width*(s.height-1)+r.right-1]))),new Ba(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=Pn.get(e),i=this.$anchorCell.start(-1),s=n.colCount(this.$anchorCell.pos-i),o=n.colCount(this.$headCell.pos-i);if(Math.min(s,o)>0)return!1;const r=s+this.$anchorCell.nodeAfter.attrs.colspan,a=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(r,a)==n.width}eq(e){return e instanceof Ba&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const i=e.node(-1),s=Pn.get(i),o=e.start(-1),r=s.findCell(e.pos-o),a=s.findCell(n.pos-o),l=e.node(0);return r.left<=a.left?(r.left>0&&(e=l.resolve(o+s.map[r.top*s.width])),a.right<s.width&&(n=l.resolve(o+s.map[s.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(o+s.map[a.top*s.width])),r.right<s.width&&(e=l.resolve(o+s.map[s.width*(r.top+1)-1]))),new Ba(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Ba(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,i=n){return new Ba(e.resolve(n),e.resolve(i))}getBookmark(){return new QSe(this.$anchorCell.pos,this.$headCell.pos)}};ns.prototype.visible=!1;Ht.jsonID("cell",ns);var QSe=class ZB{constructor(e,n){this.anchor=e,this.head=n}map(e){return new ZB(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),i=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&i.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&i.index()<i.parent.childCount&&T5(n,i)?new ns(n,i):Ht.near(i,1)}};function e9e(t){if(!(t.selection instanceof ns))return null;const e=[];return t.selection.forEachCell((n,i)=>{e.push(Fs.node(i,i+n.nodeSize,{class:"selectedCell"}))}),Gn.create(t.doc,e)}function t9e({$from:t,$to:e}){if(t.pos==e.pos||t.pos<t.pos-6)return!1;let n=t.pos,i=e.pos,s=t.depth;for(;s>=0&&!(t.after(s+1)<t.end(s));s--,n++);for(let o=e.depth;o>=0&&!(e.before(o+1)>e.start(o));o--,i--);return n==i&&/row|table/.test(t.node(s).type.spec.tableRole)}function n9e({$from:t,$to:e}){let n,i;for(let s=t.depth;s>0;s--){const o=t.node(s);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){n=o;break}}for(let s=e.depth;s>0;s--){const o=e.node(s);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){i=o;break}}return n!==i&&e.parentOffset===0}function s9e(t,e,n){const i=(e||t).selection,s=(e||t).doc;let o,r;if(i instanceof Rt&&(r=i.node.type.spec.tableRole)){if(r=="cell"||r=="header_cell")o=ns.create(s,i.from);else if(r=="row"){const a=s.resolve(i.from+1);o=ns.rowSelection(a,a)}else if(!n){const a=Pn.get(i.node),l=i.from+1,c=l+a.map[a.width*a.height-1];o=ns.create(s,l+1,c)}}else i instanceof Ot&&t9e(i)?o=Ot.create(s,i.from):i instanceof Ot&&n9e(i)&&(o=Ot.create(s,i.$from.start(),i.$from.end()));return o&&(e||(e=t.tr)).setSelection(o),e}var i9e=new ds("fix-tables");function JB(t,e,n,i){const s=t.childCount,o=e.childCount;e:for(let r=0,a=0;r<o;r++){const l=e.child(r);for(let c=a,u=Math.min(s,r+3);c<u;c++)if(t.child(c)==l){a=c+1,n+=l.nodeSize;continue e}i(l,n),a<s&&t.child(a).sameMarkup(l)?JB(t.child(a),l,n+1,i):l.nodesBetween(0,l.content.size,i,n+1),n+=l.nodeSize}}function o9e(t,e){let n;const i=(s,o)=>{s.type.spec.tableRole=="table"&&(n=r9e(t,s,o,n))};return e?e.doc!=t.doc&&JB(e.doc,t.doc,0,i):t.doc.descendants(i),n}function r9e(t,e,n,i){const s=Pn.get(e);if(!s.problems)return i;i||(i=t.tr);const o=[];for(let l=0;l<s.height;l++)o.push(0);for(let l=0;l<s.problems.length;l++){const c=s.problems[l];if(c.type=="collision"){const u=e.nodeAt(c.pos);if(!u)continue;const d=u.attrs;for(let h=0;h<d.rowspan;h++)o[c.row+h]+=c.n;i.setNodeMarkup(i.mapping.map(n+1+c.pos),null,vd(d,d.colspan-c.n,c.n))}else if(c.type=="missing")o[c.row]+=c.n;else if(c.type=="overlong_rowspan"){const u=e.nodeAt(c.pos);if(!u)continue;i.setNodeMarkup(i.mapping.map(n+1+c.pos),null,{...u.attrs,rowspan:u.attrs.rowspan-c.n})}else if(c.type=="colwidth mismatch"){const u=e.nodeAt(c.pos);if(!u)continue;i.setNodeMarkup(i.mapping.map(n+1+c.pos),null,{...u.attrs,colwidth:c.colwidth})}}let r,a;for(let l=0;l<o.length;l++)o[l]&&(r==null&&(r=l),a=l);for(let l=0,c=n+1;l<s.height;l++){const u=e.child(l),d=c+u.nodeSize,h=o[l];if(h>0){let f="cell";u.firstChild&&(f=u.firstChild.type.spec.tableRole);const p=[];for(let y=0;y<h;y++){const b=gr(t.schema)[f].createAndFill();b&&p.push(b)}const m=(l==0||r==l-1)&&a==l?c+1:d-1;i.insert(i.mapping.map(m),p)}c=d}return i.setMeta(i9e,{fixTables:!0})}function Kc(t){const e=t.selection,n=a2(t),i=n.node(-1),s=n.start(-1),o=Pn.get(i);return{...e instanceof ns?o.rectBetween(e.$anchorCell.pos-s,e.$headCell.pos-s):o.findCell(n.pos-s),tableStart:s,map:o,table:i}}function QB(t,{map:e,tableStart:n,table:i},s){let o=s>0?-1:0;JSe(e,i,s+o)&&(o=s==0||s==e.width?null:0);for(let r=0;r<e.height;r++){const a=r*e.width+s;if(s>0&&s<e.width&&e.map[a-1]==e.map[a]){const l=e.map[a],c=i.nodeAt(l);t.setNodeMarkup(t.mapping.map(n+l),null,ZSe(c.attrs,s-e.colCount(l))),r+=c.attrs.rowspan-1}else{const l=o==null?gr(i.type.schema).cell:i.nodeAt(e.map[a+o]).type,c=e.positionAt(r,s,i);t.insert(t.mapping.map(n+c),l.createAndFill())}}return t}function a9e(t,e){if(!_r(t))return!1;if(e){const n=Kc(t);e(QB(t.tr,n,n.left))}return!0}function l9e(t,e){if(!_r(t))return!1;if(e){const n=Kc(t);e(QB(t.tr,n,n.right))}return!0}function c9e(t,{map:e,table:n,tableStart:i},s){const o=t.mapping.maps.length;for(let r=0;r<e.height;){const a=r*e.width+s,l=e.map[a],c=n.nodeAt(l),u=c.attrs;if(s>0&&e.map[a-1]==l||s<e.width-1&&e.map[a+1]==l)t.setNodeMarkup(t.mapping.slice(o).map(i+l),null,vd(u,s-e.colCount(l)));else{const d=t.mapping.slice(o).map(i+l);t.delete(d,d+c.nodeSize)}r+=u.rowspan}}function u9e(t,e){if(!_r(t))return!1;if(e){const n=Kc(t),i=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let s=n.right-1;c9e(i,n,s),s!=n.left;s--){const o=n.tableStart?i.doc.nodeAt(n.tableStart-1):i.doc;if(!o)throw RangeError("No table found");n.table=o,n.map=Pn.get(o)}e(i)}return!0}function d9e(t,{map:e,table:n,tableStart:i},s){let o=0;for(let c=0;c<s;c++)o+=n.child(c).nodeSize;const r=o+n.child(s).nodeSize,a=t.mapping.maps.length;t.delete(o+i,r+i);const l=new Set;for(let c=0,u=s*e.width;c<e.width;c++,u++){const d=e.map[u];if(!l.has(d)){if(l.add(d),s>0&&d==e.map[u-e.width]){const h=n.nodeAt(d).attrs;t.setNodeMarkup(t.mapping.slice(a).map(d+i),null,{...h,rowspan:h.rowspan-1}),c+=h.colspan-1}else if(s<e.height&&d==e.map[u+e.width]){const h=n.nodeAt(d),f=h.attrs,p=h.type.create({...f,rowspan:h.attrs.rowspan-1},h.content),m=e.positionAt(s+1,c,n);t.insert(t.mapping.slice(a).map(i+m),p),c+=f.colspan-1}}}}function h9e(t,e){if(!_r(t))return!1;if(e){const n=Kc(t),i=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let s=n.bottom-1;d9e(i,n,s),s!=n.top;s--){const o=n.tableStart?i.doc.nodeAt(n.tableStart-1):i.doc;if(!o)throw RangeError("No table found");n.table=o,n.map=Pn.get(n.table)}e(i)}return!0}function f9e(t,e){return function(n,i){if(!_r(n))return!1;const s=a2(n);if(s.nodeAfter.attrs[t]===e)return!1;if(i){const o=n.tr;n.selection instanceof ns?n.selection.forEachCell((r,a)=>{r.attrs[t]!==e&&o.setNodeMarkup(a,null,{...r.attrs,[t]:e})}):o.setNodeMarkup(s.pos,null,{...s.nodeAfter.attrs,[t]:e}),i(o)}return!0}}function p9e(t){return function(e,n){if(!_r(e))return!1;if(n){const i=gr(e.schema),s=Kc(e),o=e.tr,r=s.map.cellsInRect(t=="column"?{left:s.left,top:0,right:s.right,bottom:s.map.height}:t=="row"?{left:0,top:s.top,right:s.map.width,bottom:s.bottom}:s),a=r.map(l=>s.table.nodeAt(l));for(let l=0;l<r.length;l++)a[l].type==i.header_cell&&o.setNodeMarkup(s.tableStart+r[l],i.cell,a[l].attrs);if(o.steps.length==0)for(let l=0;l<r.length;l++)o.setNodeMarkup(s.tableStart+r[l],i.header_cell,a[l].attrs);n(o)}return!0}}function uM(t,e,n){const i=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let s=0;s<i.length;s++){const o=e.table.nodeAt(i[s]);if(o&&o.type!==n.header_cell)return!1}return!0}function P5(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?p9e(t):function(n,i){if(!_r(n))return!1;if(i){const s=gr(n.schema),o=Kc(n),r=n.tr,a=uM("row",o,s),l=uM("column",o,s),u=(t==="column"?a:t==="row"?l:!1)?1:0,d=t=="column"?{left:0,top:u,right:1,bottom:o.map.height}:t=="row"?{left:u,top:0,right:o.map.width,bottom:1}:o,h=t=="column"?l?s.cell:s.header_cell:t=="row"?a?s.cell:s.header_cell:s.cell;o.map.cellsInRect(d).forEach(f=>{const p=f+o.tableStart,m=r.doc.nodeAt(p);m&&r.setNodeMarkup(p,h,m.attrs)}),i(r)}return!0}}P5("row",{useDeprecatedLogic:!0});P5("column",{useDeprecatedLogic:!0});P5("cell",{useDeprecatedLogic:!0});function m9e(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let i=t.index(-1)-1,s=t.before();i>=0;i--){const o=t.node(-1).child(i),r=o.lastChild;if(r)return s-1-r.nodeSize;s-=o.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let i=t.indexAfter(-1),s=t.after();i<n.childCount;i++){const o=n.child(i);if(o.childCount)return s+1;s+=o.nodeSize}}return null}function ez(t){return function(e,n){if(!_r(e))return!1;const i=m9e(a2(e),t);if(i==null)return!1;if(n){const s=e.doc.resolve(i);n(e.tr.setSelection(Ot.between(s,KSe(s))).scrollIntoView())}return!0}}function g9e(t,e){const n=t.selection.$anchor;for(let i=n.depth;i>0;i--)if(n.node(i).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(i),n.after(i)).scrollIntoView()),!0;return!1}function Gv(t,e){const n=t.selection;if(!(n instanceof ns))return!1;if(e){const i=t.tr,s=gr(t.schema).cell.createAndFill().content;n.forEachCell((o,r)=>{o.content.eq(s)||i.replace(i.mapping.map(r+1),i.mapping.map(r+o.nodeSize-1),new rt(s,0,0))}),i.docChanged&&e(i)}return!0}function v9e(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:i}=t;for(;e.childCount==1&&(n>0&&i>0||e.child(0).type.spec.tableRole=="table");)n--,i--,e=e.child(0).content;const s=e.child(0),o=s.type.spec.tableRole,r=s.type.schema,a=[];if(o=="row")for(let l=0;l<e.childCount;l++){let c=e.child(l).content;const u=l?0:Math.max(0,n-1),d=l<e.childCount-1?0:Math.max(0,i-1);(u||d)&&(c=G6(gr(r).row,new rt(c,u,d)).content),a.push(c)}else if(o=="cell"||o=="header_cell")a.push(n||i?G6(gr(r).row,new rt(e,n,i)).content:e);else return null;return _9e(r,a)}function _9e(t,e){const n=[];for(let s=0;s<e.length;s++){const o=e[s];for(let r=o.childCount-1;r>=0;r--){const{rowspan:a,colspan:l}=o.child(r).attrs;for(let c=s;c<s+a;c++)n[c]=(n[c]||0)+l}}let i=0;for(let s=0;s<n.length;s++)i=Math.max(i,n[s]);for(let s=0;s<n.length;s++)if(s>=e.length&&e.push(nt.empty),n[s]<i){const o=gr(t).cell.createAndFill(),r=[];for(let a=n[s];a<i;a++)r.push(o);e[s]=e[s].append(nt.from(r))}return{height:e.length,width:i,rows:e}}function G6(t,e){const n=t.createAndFill();return new mN(n).replace(0,n.content.size,e).doc}function y9e({width:t,height:e,rows:n},i,s){if(t!=i){const o=[],r=[];for(let a=0;a<n.length;a++){const l=n[a],c=[];for(let u=o[a]||0,d=0;u<i;d++){let h=l.child(d%l.childCount);u+h.attrs.colspan>i&&(h=h.type.createChecked(vd(h.attrs,h.attrs.colspan,u+h.attrs.colspan-i),h.content)),c.push(h),u+=h.attrs.colspan;for(let f=1;f<h.attrs.rowspan;f++)o[a+f]=(o[a+f]||0)+h.attrs.colspan}r.push(nt.from(c))}n=r,t=i}if(e!=s){const o=[];for(let r=0,a=0;r<s;r++,a++){const l=[],c=n[a%e];for(let u=0;u<c.childCount;u++){let d=c.child(u);r+d.attrs.rowspan>s&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,s-d.attrs.rowspan)},d.content)),l.push(d)}o.push(nt.from(l))}n=o,e=s}return{width:t,height:e,rows:n}}function b9e(t,e,n,i,s,o,r){const a=t.doc.type.schema,l=gr(a);let c,u;if(s>e.width)for(let d=0,h=0;d<e.height;d++){const f=n.child(d);h+=f.nodeSize;const p=[];let m;f.lastChild==null||f.lastChild.type==l.cell?m=c||(c=l.cell.createAndFill()):m=u||(u=l.header_cell.createAndFill());for(let y=e.width;y<s;y++)p.push(m);t.insert(t.mapping.slice(r).map(h-1+i),p)}if(o>e.height){const d=[];for(let p=0,m=(e.height-1)*e.width;p<Math.max(e.width,s);p++){const y=p>=e.width?!1:n.nodeAt(e.map[m+p]).type==l.header_cell;d.push(y?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const h=l.row.create(null,nt.from(d)),f=[];for(let p=e.height;p<o;p++)f.push(h);t.insert(t.mapping.slice(r).map(i+n.nodeSize-2),f)}return!!(c||u)}function dM(t,e,n,i,s,o,r,a){if(r==0||r==e.height)return!1;let l=!1;for(let c=s;c<o;c++){const u=r*e.width+c,d=e.map[u];if(e.map[u-e.width]==d){l=!0;const h=n.nodeAt(d),{top:f,left:p}=e.findCell(d);t.setNodeMarkup(t.mapping.slice(a).map(d+i),null,{...h.attrs,rowspan:r-f}),t.insert(t.mapping.slice(a).map(e.positionAt(r,p,n)),h.type.createAndFill({...h.attrs,rowspan:f+h.attrs.rowspan-r})),c+=h.attrs.colspan-1}}return l}function hM(t,e,n,i,s,o,r,a){if(r==0||r==e.width)return!1;let l=!1;for(let c=s;c<o;c++){const u=c*e.width+r,d=e.map[u];if(e.map[u-1]==d){l=!0;const h=n.nodeAt(d),f=e.colCount(d),p=t.mapping.slice(a).map(d+i);t.setNodeMarkup(p,null,vd(h.attrs,r-f,h.attrs.colspan-(r-f))),t.insert(p+h.nodeSize,h.type.createAndFill(vd(h.attrs,0,r-f))),c+=h.attrs.rowspan-1}}return l}function fM(t,e,n,i,s){let o=n?t.doc.nodeAt(n-1):t.doc;if(!o)throw new Error("No table found");let r=Pn.get(o);const{top:a,left:l}=i,c=l+s.width,u=a+s.height,d=t.tr;let h=0;function f(){if(o=n?d.doc.nodeAt(n-1):d.doc,!o)throw new Error("No table found");r=Pn.get(o),h=d.mapping.maps.length}b9e(d,r,o,n,c,u,h)&&f(),dM(d,r,o,n,l,c,a,h)&&f(),dM(d,r,o,n,l,c,u,h)&&f(),hM(d,r,o,n,a,u,l,h)&&f(),hM(d,r,o,n,a,u,c,h)&&f();for(let p=a;p<u;p++){const m=r.positionAt(p,l,o),y=r.positionAt(p,c,o);d.replace(d.mapping.slice(h).map(m+n),d.mapping.slice(h).map(y+n),new rt(s.rows[p-a],0,0))}f(),d.setSelection(new ns(d.doc.resolve(n+r.positionAt(a,l,o)),d.doc.resolve(n+r.positionAt(u-1,c-1,o)))),e(d)}var w9e=IN({ArrowLeft:Xv("horiz",-1),ArrowRight:Xv("horiz",1),ArrowUp:Xv("vert",-1),ArrowDown:Xv("vert",1),"Shift-ArrowLeft":Kv("horiz",-1),"Shift-ArrowRight":Kv("horiz",1),"Shift-ArrowUp":Kv("vert",-1),"Shift-ArrowDown":Kv("vert",1),Backspace:Gv,"Mod-Backspace":Gv,Delete:Gv,"Mod-Delete":Gv});function Q0(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function Xv(t,e){return(n,i,s)=>{if(!s)return!1;const o=n.selection;if(o instanceof ns)return Q0(n,i,Ht.near(o.$headCell,e));if(t!="horiz"&&!o.empty)return!1;const r=tz(s,t,e);if(r==null)return!1;if(t=="horiz")return Q0(n,i,Ht.near(n.doc.resolve(o.head+e),e));{const a=n.doc.resolve(r),l=KB(a,t,e);let c;return l?c=Ht.near(l,1):e<0?c=Ht.near(n.doc.resolve(a.before(-1)),-1):c=Ht.near(n.doc.resolve(a.after(-1)),1),Q0(n,i,c)}}}function Kv(t,e){return(n,i,s)=>{if(!s)return!1;const o=n.selection;let r;if(o instanceof ns)r=o;else{const l=tz(s,t,e);if(l==null)return!1;r=new ns(n.doc.resolve(l))}const a=KB(r.$headCell,t,e);return a?Q0(n,i,new ns(r.$anchorCell,a)):!1}}function k9e(t,e){const n=t.state.doc,i=H1(n.resolve(e));return i?(t.dispatch(t.state.tr.setSelection(new ns(i))),!0):!1}function C9e(t,e,n){if(!_r(t.state))return!1;let i=v9e(n);const s=t.state.selection;if(s instanceof ns){i||(i={width:1,height:1,rows:[nt.from(G6(gr(t.state.schema).cell,n))]});const o=s.$anchorCell.node(-1),r=s.$anchorCell.start(-1),a=Pn.get(o).rectBetween(s.$anchorCell.pos-r,s.$headCell.pos-r);return i=y9e(i,a.right-a.left,a.bottom-a.top),fM(t.state,t.dispatch,r,a,i),!0}else if(i){const o=a2(t.state),r=o.start(-1);return fM(t.state,t.dispatch,r,Pn.get(o.node(-1)).findCell(o.pos-r),i),!0}else return!1}function x9e(t,e){var n;if(e.ctrlKey||e.metaKey)return;const i=pM(t,e.target);let s;if(e.shiftKey&&t.state.selection instanceof ns)o(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&i&&(s=H1(t.state.selection.$anchor))!=null&&((n=Qw(t,e))==null?void 0:n.pos)!=s.pos)o(s,e),e.preventDefault();else if(!i)return;function o(l,c){let u=Qw(t,c);const d=sc.getState(t.state)==null;if(!u||!T5(l,u))if(d)u=l;else return;const h=new ns(l,u);if(d||!t.state.selection.eq(h)){const f=t.state.tr.setSelection(h);d&&f.setMeta(sc,l.pos),t.dispatch(f)}}function r(){t.root.removeEventListener("mouseup",r),t.root.removeEventListener("dragstart",r),t.root.removeEventListener("mousemove",a),sc.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(sc,-1))}function a(l){const c=l,u=sc.getState(t.state);let d;if(u!=null)d=t.state.doc.resolve(u);else if(pM(t,c.target)!=i&&(d=Qw(t,e),!d))return r();d&&o(d,c)}t.root.addEventListener("mouseup",r),t.root.addEventListener("dragstart",r),t.root.addEventListener("mousemove",a)}function tz(t,e,n){if(!(t.state.selection instanceof Ot))return null;const{$head:i}=t.state.selection;for(let s=i.depth-1;s>=0;s--){const o=i.node(s);if((n<0?i.index(s):i.indexAfter(s))!=(n<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){const a=i.before(s),l=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(l)?a:null}}return null}function pM(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Qw(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?H1(t.state.doc.resolve(n.pos)):null}var S9e=class{constructor(t,e){this.node=t,this.cellMinWidth=e,this.dom=document.createElement("div"),this.dom.className="tableWrapper",this.table=this.dom.appendChild(document.createElement("table")),this.colgroup=this.table.appendChild(document.createElement("colgroup")),X6(t,this.colgroup,this.table,e),this.contentDOM=this.table.appendChild(document.createElement("tbody"))}update(t){return t.type!=this.node.type?!1:(this.node=t,X6(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function X6(t,e,n,i,s,o){var r;let a=0,l=!0,c=e.firstChild;const u=t.firstChild;if(u){for(let d=0,h=0;d<u.childCount;d++){const{colspan:f,colwidth:p}=u.child(d).attrs;for(let m=0;m<f;m++,h++){const y=s==h?o:p&&p[m],b=y?y+"px":"";a+=y||i,y||(l=!1),c?(c.style.width!=b&&(c.style.width=b),c=c.nextSibling):e.appendChild(document.createElement("col")).style.width=b}}for(;c;){const d=c.nextSibling;(r=c.parentNode)==null||r.removeChild(c),c=d}l?(n.style.width=a+"px",n.style.minWidth=""):(n.style.width="",n.style.minWidth=a+"px")}}var Qo=new ds("tableColumnResizing");function $9e({handleWidth:t=5,cellMinWidth:e=25,View:n=S9e,lastColumnResizable:i=!0}={}){const s=new ts({key:Qo,state:{init(o,r){var a,l;const c=(l=(a=s.spec)==null?void 0:a.props)==null?void 0:l.nodeViews,u=gr(r.schema).table.name;return n&&c&&(c[u]=(d,h)=>new n(d,e,h)),new A9e(-1,!1)},apply(o,r){return r.apply(o)}},props:{attributes:o=>{const r=Qo.getState(o);return r&&r.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,r)=>{E9e(o,r,t,e,i)},mouseleave:o=>{M9e(o)},mousedown:(o,r)=>{T9e(o,r,e)}},decorations:o=>{const r=Qo.getState(o);if(r&&r.activeHandle>-1)return R9e(o,r.activeHandle)},nodeViews:{}}});return s}var A9e=class e_{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,i=e.getMeta(Qo);if(i&&i.setHandle!=null)return new e_(i.setHandle,!1);if(i&&i.setDragging!==void 0)return new e_(n.activeHandle,i.setDragging);if(n.activeHandle>-1&&e.docChanged){let s=e.mapping.map(n.activeHandle,-1);return q6(e.doc.resolve(s))||(s=-1),new e_(s,n.dragging)}return n}};function E9e(t,e,n,i,s){const o=Qo.getState(t.state);if(o&&!o.dragging){const r=I9e(e.target);let a=-1;if(r){const{left:l,right:c}=r.getBoundingClientRect();e.clientX-l<=n?a=mM(t,e,"left",n):c-e.clientX<=n&&(a=mM(t,e,"right",n))}if(a!=o.activeHandle){if(!s&&a!==-1){const l=t.state.doc.resolve(a),c=l.node(-1),u=Pn.get(c),d=l.start(-1);if(u.colCount(l.pos-d)+l.nodeAfter.attrs.colspan-1==u.width-1)return}nz(t,a)}}}function M9e(t){const e=Qo.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&nz(t,-1)}function T9e(t,e,n){var i;const s=(i=t.dom.ownerDocument.defaultView)!=null?i:window,o=Qo.getState(t.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const r=t.state.doc.nodeAt(o.activeHandle),a=P9e(t,o.activeHandle,r.attrs);t.dispatch(t.state.tr.setMeta(Qo,{setDragging:{startX:e.clientX,startWidth:a}}));function l(u){s.removeEventListener("mouseup",l),s.removeEventListener("mousemove",c);const d=Qo.getState(t.state);d!=null&&d.dragging&&(L9e(t,d.activeHandle,gM(d.dragging,u,n)),t.dispatch(t.state.tr.setMeta(Qo,{setDragging:null})))}function c(u){if(!u.which)return l(u);const d=Qo.getState(t.state);if(d&&d.dragging){const h=gM(d.dragging,u,n);O9e(t,d.activeHandle,h,n)}}return s.addEventListener("mouseup",l),s.addEventListener("mousemove",c),e.preventDefault(),!0}function P9e(t,e,{colspan:n,colwidth:i}){const s=i&&i[i.length-1];if(s)return s;const o=t.domAtPos(e);let a=o.node.childNodes[o.offset].offsetWidth,l=n;if(i)for(let c=0;c<n;c++)i[c]&&(a-=i[c],l--);return a/l}function I9e(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function mM(t,e,n,i){const s=n=="right"?-i:i,o=t.posAtCoords({left:e.clientX+s,top:e.clientY});if(!o)return-1;const{pos:r}=o,a=H1(t.state.doc.resolve(r));if(!a)return-1;if(n=="right")return a.pos;const l=Pn.get(a.node(-1)),c=a.start(-1),u=l.map.indexOf(a.pos-c);return u%l.width==0?-1:c+l.map[u-1]}function gM(t,e,n){const i=e.clientX-t.startX;return Math.max(n,t.startWidth+i)}function nz(t,e){t.dispatch(t.state.tr.setMeta(Qo,{setHandle:e}))}function L9e(t,e,n){const i=t.state.doc.resolve(e),s=i.node(-1),o=Pn.get(s),r=i.start(-1),a=o.colCount(i.pos-r)+i.nodeAfter.attrs.colspan-1,l=t.state.tr;for(let c=0;c<o.height;c++){const u=c*o.width+a;if(c&&o.map[u]==o.map[u-o.width])continue;const d=o.map[u],h=s.nodeAt(d).attrs,f=h.colspan==1?0:a-o.colCount(d);if(h.colwidth&&h.colwidth[f]==n)continue;const p=h.colwidth?h.colwidth.slice():D9e(h.colspan);p[f]=n,l.setNodeMarkup(r+d,null,{...h,colwidth:p})}l.docChanged&&t.dispatch(l)}function O9e(t,e,n,i){const s=t.state.doc.resolve(e),o=s.node(-1),r=s.start(-1),a=Pn.get(o).colCount(s.pos-r)+s.nodeAfter.attrs.colspan-1;let l=t.domAtPos(s.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&X6(o,l.firstChild,l,i,a,n)}function D9e(t){return Array(t).fill(0)}function R9e(t,e){const n=[],i=t.doc.resolve(e),s=i.node(-1);if(!s)return Gn.empty;const o=Pn.get(s),r=i.start(-1),a=o.colCount(i.pos-r)+i.nodeAfter.attrs.colspan-1;for(let l=0;l<o.height;l++){const c=a+l*o.width;if((a==o.width-1||o.map[c]!=o.map[c+1])&&(l==0||o.map[c]!=o.map[c-o.width])){const u=o.map[c],d=r+u+s.nodeAt(u).nodeSize-1,h=document.createElement("div");h.className="column-resize-handle",n.push(Fs.widget(d,h))}}return Gn.create(t.doc,n)}function V9e({allowTableNodeSelection:t=!1}={}){return new ts({key:sc,state:{init(){return null},apply(e,n){const i=e.getMeta(sc);if(i!=null)return i==-1?null:i;if(n==null||!e.docChanged)return n;const{deleted:s,pos:o}=e.mapping.mapResult(n);return s?null:o}},props:{decorations:e9e,handleDOMEvents:{mousedown:x9e},createSelectionBetween(e){return sc.getState(e.state)!=null?e.state.selection:null},handleTripleClick:k9e,handleKeyDown:w9e,handlePaste:C9e},appendTransaction(e,n,i){return s9e(i,o9e(i,n),t)}})}var My=typeof navigator<"u"?navigator:null,I5=My&&My.userAgent||"",F9e=/Edge\/(\d+)/.exec(I5),N9e=/MSIE \d/.exec(I5),B9e=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(I5),z9e=!!(N9e||B9e||F9e),H9e=!z9e&&!!My&&/Apple Computer/.test(My.vendor),sz=new ds("safari-ime-span"),K6=!1,U9e={key:sz,props:{decorations:j9e,handleDOMEvents:{compositionstart:()=>{K6=!0},compositionend:()=>{K6=!1}}}};function j9e(t){const{$from:e,$to:n,to:i}=t.selection;if(K6&&e.sameParent(n)){const s=Fs.widget(i,W9e,{ignoreSelection:!0,key:"safari-ime-span"});return Gn.create(t.doc,[s])}}function W9e(t){const e=t.dom.ownerDocument.createElement("span");return e.className="ProseMirror-safari-ime-span",e}var Y9e=new ts(H9e?U9e:{key:sz});function vM(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let i=0,s=n.indexOf(e);for(;s!==-1;)i++,s=n.indexOf(e,s+e.length);return i}function q9e(t,e,n){const s=Ub((n||{}).ignore||[]),o=G9e(e);let r=-1;for(;++r<o.length;)UF(t,"text",a);function a(c,u){let d=-1,h;for(;++d<u.length;){const f=u[d],p=h?h.children:void 0;if(s(f,p?p.indexOf(f):void 0,h))return;h=f}if(h)return l(c,u)}function l(c,u){const d=u[u.length-1],h=o[r][0],f=o[r][1];let p=0;const y=d.children.indexOf(c);let b=!1,k=[];h.lastIndex=0;let C=h.exec(c.value);for(;C;){const $=C.index,x={index:C.index,input:C.input,stack:[...u,c]};let M=f(...C,x);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?h.lastIndex=$+1:(p!==$&&k.push({type:"text",value:c.value.slice(p,$)}),Array.isArray(M)?k.push(...M):M&&k.push(M),p=$+C[0].length,b=!0),!h.global)break;C=h.exec(c.value)}return b?(p<c.value.length&&k.push({type:"text",value:c.value.slice(p)}),d.children.splice(y,1,...k)):k=[c],y+k.length}}function G9e(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!t[0]||Array.isArray(t[0])?t:[t];let i=-1;for(;++i<n.length;){const s=n[i];e.push([X9e(s[0]),K9e(s[1])])}return e}function X9e(t){return typeof t=="string"?new RegExp(n2(t),"g"):t}function K9e(t){return typeof t=="function"?t:function(){return t}}const e3="phrasing",t3=["autolink","link","image","label"];function Z9e(){return{transforms:[i7e],enter:{literalAutolink:Q9e,literalAutolinkEmail:n3,literalAutolinkHttp:n3,literalAutolinkWww:n3},exit:{literalAutolink:s7e,literalAutolinkEmail:n7e,literalAutolinkHttp:e7e,literalAutolinkWww:t7e}}}function J9e(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:e3,notInConstruct:t3},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:e3,notInConstruct:t3},{character:":",before:"[ps]",after:"\\/",inConstruct:e3,notInConstruct:t3}]}}function Q9e(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function n3(t){this.config.enter.autolinkProtocol.call(this,t)}function e7e(t){this.config.exit.autolinkProtocol.call(this,t)}function t7e(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function n7e(t){this.config.exit.autolinkEmail.call(this,t)}function s7e(t){this.exit(t)}function i7e(t){q9e(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,o7e],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),r7e]],{ignore:["link","linkReference"]})}function o7e(t,e,n,i,s){let o="";if(!iz(s)||(/^w/i.test(e)&&(n=e+n,e="",o="http://"),!a7e(n)))return!1;const r=l7e(n+i);if(!r[0])return!1;const a={type:"link",title:null,url:o+e+r[0],children:[{type:"text",value:e+r[0]}]};return r[1]?[a,{type:"text",value:r[1]}]:a}function r7e(t,e,n,i){return!iz(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function a7e(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function l7e(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],i=n.indexOf(")");const s=vM(t,"(");let o=vM(t,")");for(;i!==-1&&s>o;)t+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),o++;return[t,n]}function iz(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||pd(n)||zb(n))&&(!e||n!==47)}oz.peek=y7e;function c7e(){return{enter:{gfmFootnoteDefinition:d7e,gfmFootnoteDefinitionLabelString:h7e,gfmFootnoteCall:m7e,gfmFootnoteCallString:g7e},exit:{gfmFootnoteDefinition:p7e,gfmFootnoteDefinitionLabelString:f7e,gfmFootnoteCall:_7e,gfmFootnoteCallString:v7e}}}function u7e(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:b7e,footnoteReference:oz}}}function d7e(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function h7e(){this.buffer()}function f7e(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Pr(this.sliceSerialize(t)).toLowerCase()}function p7e(t){this.exit(t)}function m7e(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function g7e(){this.buffer()}function v7e(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Pr(this.sliceSerialize(t)).toLowerCase()}function _7e(t){this.exit(t)}function oz(t,e,n,i){const s=n.createTracker(i);let o=s.move("[^");const r=n.enter("footnoteReference"),a=n.enter("reference");return o+=s.move(n.safe(n.associationId(t),{...s.current(),before:o,after:"]"})),a(),r(),o+=s.move("]"),o}function y7e(){return"["}function b7e(t,e,n,i){const s=n.createTracker(i);let o=s.move("[^");const r=n.enter("footnoteDefinition"),a=n.enter("label");return o+=s.move(n.safe(n.associationId(t),{...s.current(),before:o,after:"]"})),a(),o+=s.move("]:"+(t.children&&t.children.length>0?" ":"")),s.shift(4),o+=s.move(n.indentLines(n.containerFlow(t,s.current()),w7e)),r(),o}function w7e(t,e,n){return e===0?t:(n?"":"    ")+t}const k7e=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];rz.peek=A7e;function C7e(){return{canContainEols:["delete"],enter:{strikethrough:S7e},exit:{strikethrough:$7e}}}function x7e(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:k7e}],handlers:{delete:rz}}}function S7e(t){this.enter({type:"delete",children:[]},t)}function $7e(t){this.exit(t)}function rz(t,e,n,i){const s=n.createTracker(i),o=n.enter("strikethrough");let r=s.move("~~");return r+=n.containerPhrasing(t,{...s.current(),before:r,after:"~"}),r+=s.move("~~"),o(),r}function A7e(){return"~"}function E7e(t,e={}){const n=(e.align||[]).concat(),i=e.stringLength||T7e,s=[],o=[],r=[],a=[];let l=0,c=-1;for(;++c<t.length;){const p=[],m=[];let y=-1;for(t[c].length>l&&(l=t[c].length);++y<t[c].length;){const b=M7e(t[c][y]);if(e.alignDelimiters!==!1){const k=i(b);m[y]=k,(a[y]===void 0||k>a[y])&&(a[y]=k)}p.push(b)}o[c]=p,r[c]=m}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<l;)s[u]=_M(n[u]);else{const p=_M(n);for(;++u<l;)s[u]=p}u=-1;const d=[],h=[];for(;++u<l;){const p=s[u];let m="",y="";p===99?(m=":",y=":"):p===108?m=":":p===114&&(y=":");let b=e.alignDelimiters===!1?1:Math.max(1,a[u]-m.length-y.length);const k=m+"-".repeat(b)+y;e.alignDelimiters!==!1&&(b=m.length+b+y.length,b>a[u]&&(a[u]=b),h[u]=b),d[u]=k}o.splice(1,0,d),r.splice(1,0,h),c=-1;const f=[];for(;++c<o.length;){const p=o[c],m=r[c];u=-1;const y=[];for(;++u<l;){const b=p[u]||"";let k="",C="";if(e.alignDelimiters!==!1){const $=a[u]-(m[u]||0),x=s[u];x===114?k=" ".repeat($):x===99?$%2?(k=" ".repeat($/2+.5),C=" ".repeat($/2-.5)):(k=" ".repeat($/2),C=k):C=" ".repeat($)}e.delimiterStart!==!1&&!u&&y.push("|"),e.padding!==!1&&!(e.alignDelimiters===!1&&b==="")&&(e.delimiterStart!==!1||u)&&y.push(" "),e.alignDelimiters!==!1&&y.push(k),y.push(b),e.alignDelimiters!==!1&&y.push(C),e.padding!==!1&&y.push(" "),(e.delimiterEnd!==!1||u!==l-1)&&y.push("|")}f.push(e.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return f.join(`
`)}function M7e(t){return t==null?"":String(t)}function T7e(t){return t.length}function _M(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function P7e(){return{enter:{table:I7e,tableData:yM,tableHeader:yM,tableRow:O7e},exit:{codeText:D7e,table:L7e,tableData:s3,tableHeader:s3,tableRow:s3}}}function I7e(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function L7e(t){this.exit(t),this.data.inTable=void 0}function O7e(t){this.enter({type:"tableRow",children:[]},t)}function s3(t){this.exit(t)}function yM(t){this.enter({type:"tableCell",children:[]},t)}function D7e(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,R7e));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function R7e(t,e){return e==="|"?e:t}function V7e(t){const e=t||{},n=e.tableCellPadding,i=e.tablePipeAlign,s=e.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:r,tableCell:l,tableRow:a}};function r(f,p,m,y){return c(u(f,m,y),f.align)}function a(f,p,m,y){const b=d(f,m,y),k=c([b]);return k.slice(0,k.indexOf(`
`))}function l(f,p,m,y){const b=m.enter("tableCell"),k=m.enter("phrasing"),C=m.containerPhrasing(f,{...y,before:o,after:o});return k(),b(),C}function c(f,p){return E7e(f,{align:p,alignDelimiters:i,padding:n,stringLength:s})}function u(f,p,m){const y=f.children;let b=-1;const k=[],C=p.enter("table");for(;++b<y.length;)k[b]=d(y[b],p,m);return C(),k}function d(f,p,m){const y=f.children;let b=-1;const k=[],C=p.enter("tableRow");for(;++b<y.length;)k[b]=l(y[b],f,p,m);return C(),k}function h(f,p,m){let y=b8.inlineCode(f,p,m);return m.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function F7e(){return{exit:{taskListCheckValueChecked:bM,taskListCheckValueUnchecked:bM,paragraph:B7e}}}function N7e(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:z7e}}}function bM(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function B7e(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const s=e.children;let o=-1,r;for(;++o<s.length;){const a=s[o];if(a.type==="paragraph"){r=a;break}}r===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(t)}function z7e(t,e,n,i){const s=t.children[0],o=typeof t.checked=="boolean"&&s&&s.type==="paragraph",r="["+(t.checked?"x":" ")+"] ",a=n.createTracker(i);o&&a.move(r);let l=b8.listItem(t,e,n,{...i,...a.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+r}}function H7e(){return[Z9e(),c7e(),C7e(),P7e(),F7e()]}function U7e(t){return{extensions:[J9e(),u7e(),x7e(),V7e(t),N7e()]}}const j7e={tokenize:K7e,partial:!0},az={tokenize:Z7e,partial:!0},lz={tokenize:J7e,partial:!0},cz={tokenize:Q7e,partial:!0},W7e={tokenize:e$e,partial:!0},uz={name:"wwwAutolink",tokenize:G7e,previous:hz},dz={name:"protocolAutolink",tokenize:X7e,previous:fz},yl={name:"emailAutolink",tokenize:q7e,previous:pz},Ia={};function Y7e(){return{text:Ia}}let ou=48;for(;ou<123;)Ia[ou]=yl,ou++,ou===58?ou=65:ou===91&&(ou=97);Ia[43]=yl;Ia[45]=yl;Ia[46]=yl;Ia[95]=yl;Ia[72]=[yl,dz];Ia[104]=[yl,dz];Ia[87]=[yl,uz];Ia[119]=[yl,uz];function q7e(t,e,n){const i=this;let s,o;return r;function r(d){return!Z6(d)||!pz.call(i,i.previous)||L5(i.events)?n(d):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(d))}function a(d){return Z6(d)?(t.consume(d),a):d===64?(t.consume(d),l):n(d)}function l(d){return d===46?t.check(W7e,u,c)(d):d===45||d===95||io(d)?(o=!0,t.consume(d),l):u(d)}function c(d){return t.consume(d),s=!0,l}function u(d){return o&&s&&Di(i.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(d)):n(d)}}function G7e(t,e,n){const i=this;return s;function s(r){return r!==87&&r!==119||!hz.call(i,i.previous)||L5(i.events)?n(r):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(j7e,t.attempt(az,t.attempt(lz,o),n),n)(r))}function o(r){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(r)}}function X7e(t,e,n){const i=this;let s="",o=!1;return r;function r(d){return(d===72||d===104)&&fz.call(i,i.previous)&&!L5(i.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(d),t.consume(d),a):n(d)}function a(d){if(Di(d)&&s.length<5)return s+=String.fromCodePoint(d),t.consume(d),a;if(d===58){const h=s.toLowerCase();if(h==="http"||h==="https")return t.consume(d),l}return n(d)}function l(d){return d===47?(t.consume(d),o?c:(o=!0,l)):n(d)}function c(d){return d===null||by(d)||Un(d)||pd(d)||zb(d)?n(d):t.attempt(az,t.attempt(lz,u),n)(d)}function u(d){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(d)}}function K7e(t,e,n){let i=0;return s;function s(r){return(r===87||r===119)&&i<3?(i++,t.consume(r),s):r===46&&i===3?(t.consume(r),o):n(r)}function o(r){return r===null?n(r):e(r)}}function Z7e(t,e,n){let i,s,o;return r;function r(c){return c===46||c===95?t.check(cz,l,a)(c):c===null||Un(c)||pd(c)||c!==45&&zb(c)?l(c):(o=!0,t.consume(c),r)}function a(c){return c===95?i=!0:(s=i,i=void 0),t.consume(c),r}function l(c){return s||i||!o?n(c):e(c)}}function J7e(t,e){let n=0,i=0;return s;function s(r){return r===40?(n++,t.consume(r),s):r===41&&i<n?o(r):r===33||r===34||r===38||r===39||r===41||r===42||r===44||r===46||r===58||r===59||r===60||r===63||r===93||r===95||r===126?t.check(cz,e,o)(r):r===null||Un(r)||pd(r)?e(r):(t.consume(r),s)}function o(r){return r===41&&i++,t.consume(r),s}}function Q7e(t,e,n){return i;function i(a){return a===33||a===34||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===63||a===95||a===126?(t.consume(a),i):a===38?(t.consume(a),o):a===93?(t.consume(a),s):a===60||a===null||Un(a)||pd(a)?e(a):n(a)}function s(a){return a===null||a===40||a===91||Un(a)||pd(a)?e(a):i(a)}function o(a){return Di(a)?r(a):n(a)}function r(a){return a===59?(t.consume(a),i):Di(a)?(t.consume(a),r):n(a)}}function e$e(t,e,n){return i;function i(o){return t.consume(o),s}function s(o){return io(o)?n(o):e(o)}}function hz(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Un(t)}function fz(t){return!Di(t)}function pz(t){return!(t===47||Z6(t))}function Z6(t){return t===43||t===45||t===46||t===95||io(t)}function L5(t){let e=t.length,n=!1;for(;e--;){const i=t[e][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const t$e={tokenize:c$e,partial:!0};function n$e(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:r$e,continuation:{tokenize:a$e},exit:l$e}},text:{91:{name:"gfmFootnoteCall",tokenize:o$e},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:s$e,resolveTo:i$e}}}}function s$e(t,e,n){const i=this;let s=i.events.length;const o=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let r;for(;s--;){const l=i.events[s][1];if(l.type==="labelImage"){r=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return a;function a(l){if(!r||!r._balanced)return n(l);const c=Pr(i.sliceSerialize({start:r.end,end:i.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?n(l):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(l),t.exit("gfmFootnoteCallLabelMarker"),e(l))}}function i$e(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},r={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},a=[t[n+1],t[n+2],["enter",i,e],t[n+3],t[n+4],["enter",s,e],["exit",s,e],["enter",o,e],["enter",r,e],["exit",r,e],["exit",o,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(n,t.length-n+1,...a),t}function o$e(t,e,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o=0,r;return a;function a(d){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),l}function l(d){return d!==94?n(d):(t.enter("gfmFootnoteCallMarker"),t.consume(d),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",c)}function c(d){if(o>999||d===93&&!r||d===null||d===91||Un(d))return n(d);if(d===93){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return s.includes(Pr(i.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(d)}return Un(d)||(r=!0),o++,t.consume(d),d===92?u:c}function u(d){return d===91||d===92||d===93?(t.consume(d),o++,c):c(d)}}function r$e(t,e,n){const i=this,s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o,r=0,a;return l;function l(p){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(p),t.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(p),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",u):n(p)}function u(p){if(r>999||p===93&&!a||p===null||p===91||Un(p))return n(p);if(p===93){t.exit("chunkString");const m=t.exit("gfmFootnoteDefinitionLabelString");return o=Pr(i.sliceSerialize(m)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(p),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return Un(p)||(a=!0),r++,t.consume(p),p===92?d:u}function d(p){return p===91||p===92||p===93?(t.consume(p),r++,u):u(p)}function h(p){return p===58?(t.enter("definitionMarker"),t.consume(p),t.exit("definitionMarker"),s.includes(o)||s.push(o),mn(t,f,"gfmFootnoteDefinitionWhitespace")):n(p)}function f(p){return e(p)}}function a$e(t,e,n){return t.check(O1,e,t.attempt(t$e,e,n))}function l$e(t){t.exit("gfmFootnoteDefinition")}function c$e(t,e,n){const i=this;return mn(t,s,"gfmFootnoteDefinitionIndent",4+1);function s(o){const r=i.events[i.events.length-1];return r&&r[1].type==="gfmFootnoteDefinitionIndent"&&r[2].sliceSerialize(r[1],!0).length===4?e(o):n(o)}}function u$e(t){let n=(t||{}).singleTilde;const i={name:"strikethrough",tokenize:o,resolveAll:s};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function s(r,a){let l=-1;for(;++l<r.length;)if(r[l][0]==="enter"&&r[l][1].type==="strikethroughSequenceTemporary"&&r[l][1]._close){let c=l;for(;c--;)if(r[c][0]==="exit"&&r[c][1].type==="strikethroughSequenceTemporary"&&r[c][1]._open&&r[l][1].end.offset-r[l][1].start.offset===r[c][1].end.offset-r[c][1].start.offset){r[l][1].type="strikethroughSequence",r[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},r[c][1].start),end:Object.assign({},r[l][1].end)},d={type:"strikethroughText",start:Object.assign({},r[c][1].end),end:Object.assign({},r[l][1].start)},h=[["enter",u,a],["enter",r[c][1],a],["exit",r[c][1],a],["enter",d,a]],f=a.parser.constructs.insideSpan.null;f&&rr(h,h.length,0,Hb(f,r.slice(c+1,l),a)),rr(h,h.length,0,[["exit",d,a],["enter",r[l][1],a],["exit",r[l][1],a],["exit",u,a]]),rr(r,c-1,l-c+3,h),l=c+h.length-2;break}}for(l=-1;++l<r.length;)r[l][1].type==="strikethroughSequenceTemporary"&&(r[l][1].type="data");return r}function o(r,a,l){const c=this.previous,u=this.events;let d=0;return h;function h(p){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(p):(r.enter("strikethroughSequenceTemporary"),f(p))}function f(p){const m=wy(c);if(p===126)return d>1?l(p):(r.consume(p),d++,f);if(d<2&&!n)return l(p);const y=r.exit("strikethroughSequenceTemporary"),b=wy(p);return y._open=!b||b===2&&!!m,y._close=!m||m===2&&!!b,a(p)}}}class d$e{constructor(){this.map=[]}add(e,n,i){h$e(this,e,n,i)}consume(e){if(this.map.sort(function(o,r){return o[0]-r[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];i.push([...e]),e.length=0;let s=i.pop();for(;s;)e.push(...s),s=i.pop();this.map.length=0}}function h$e(t,e,n,i){let s=0;if(!(n===0&&i.length===0)){for(;s<t.map.length;){if(t.map[s][0]===e){t.map[s][1]+=n,t.map[s][2].push(...i);return}s+=1}t.map.push([e,n,i])}}function f$e(t,e){let n=!1;const i=[];for(;e<t.length;){const s=t[e];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&i.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const o=i.length-1;i[o]=i[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return i}function p$e(){return{flow:{null:{name:"table",tokenize:m$e,resolveAll:g$e}}}}function m$e(t,e,n){const i=this;let s=0,o=0,r;return a;function a(L){let R=i.events.length-1;for(;R>-1;){const F=i.events[R][1].type;if(F==="lineEnding"||F==="linePrefix")R--;else break}const V=R>-1?i.events[R][1].type:null,H=V==="tableHead"||V==="tableRow"?M:l;return H===M&&i.parser.lazy[i.now().line]?n(L):H(L)}function l(L){return t.enter("tableHead"),t.enter("tableRow"),c(L)}function c(L){return L===124||(r=!0,o+=1),u(L)}function u(L){return L===null?n(L):Et(L)?o>1?(o=0,i.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),f):n(L):cn(L)?mn(t,u,"whitespace")(L):(o+=1,r&&(r=!1,s+=1),L===124?(t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),r=!0,u):(t.enter("data"),d(L)))}function d(L){return L===null||L===124||Un(L)?(t.exit("data"),u(L)):(t.consume(L),L===92?h:d)}function h(L){return L===92||L===124?(t.consume(L),d):d(L)}function f(L){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(L):(t.enter("tableDelimiterRow"),r=!1,cn(L)?mn(t,p,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):p(L))}function p(L){return L===45||L===58?y(L):L===124?(r=!0,t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),m):x(L)}function m(L){return cn(L)?mn(t,y,"whitespace")(L):y(L)}function y(L){return L===58?(o+=1,r=!0,t.enter("tableDelimiterMarker"),t.consume(L),t.exit("tableDelimiterMarker"),b):L===45?(o+=1,b(L)):L===null||Et(L)?$(L):x(L)}function b(L){return L===45?(t.enter("tableDelimiterFiller"),k(L)):x(L)}function k(L){return L===45?(t.consume(L),k):L===58?(r=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(L),t.exit("tableDelimiterMarker"),C):(t.exit("tableDelimiterFiller"),C(L))}function C(L){return cn(L)?mn(t,$,"whitespace")(L):$(L)}function $(L){return L===124?p(L):L===null||Et(L)?!r||s!==o?x(L):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(L)):x(L)}function x(L){return n(L)}function M(L){return t.enter("tableRow"),P(L)}function P(L){return L===124?(t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),P):L===null||Et(L)?(t.exit("tableRow"),e(L)):cn(L)?mn(t,P,"whitespace")(L):(t.enter("data"),T(L))}function T(L){return L===null||L===124||Un(L)?(t.exit("data"),P(L)):(t.consume(L),L===92?I:T)}function I(L){return L===92||L===124?(t.consume(L),T):T(L)}}function g$e(t,e){let n=-1,i=!0,s=0,o=[0,0,0,0],r=[0,0,0,0],a=!1,l=0,c,u,d;const h=new d$e;for(;++n<t.length;){const f=t[n],p=f[1];f[0]==="enter"?p.type==="tableHead"?(a=!1,l!==0&&(wM(h,e,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",c,e]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(i=!0,d=void 0,o=[0,0,0,0],r=[0,n+1,0,0],a&&(a=!1,u={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},h.add(n,0,[["enter",u,e]])),s=p.type==="tableDelimiterRow"?2:u?3:1):s&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(i=!1,r[2]===0&&(o[1]!==0&&(r[0]=r[1],d=Zv(h,e,o,s,void 0,d),o=[0,0,0,0]),r[2]=n)):p.type==="tableCellDivider"&&(i?i=!1:(o[1]!==0&&(r[0]=r[1],d=Zv(h,e,o,s,void 0,d)),o=r,r=[o[1],n,0,0])):p.type==="tableHead"?(a=!0,l=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(l=n,o[1]!==0?(r[0]=r[1],d=Zv(h,e,o,s,n,d)):r[1]!==0&&(d=Zv(h,e,r,s,n,d)),s=0):s&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(r[3]=n)}for(l!==0&&wM(h,e,l,c,u),h.consume(e.events),n=-1;++n<e.events.length;){const f=e.events[n];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=f$e(e.events,n))}return t}function Zv(t,e,n,i,s,o){const r=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Ah(e.events,n[0])),t.add(n[0],0,[["exit",o,e]]));const l=Ah(e.events,n[1]);if(o={type:r,start:Object.assign({},l),end:Object.assign({},l)},t.add(n[1],0,[["enter",o,e]]),n[2]!==0){const c=Ah(e.events,n[2]),u=Ah(e.events,n[3]),d={type:a,start:Object.assign({},c),end:Object.assign({},u)};if(t.add(n[2],0,[["enter",d,e]]),i!==2){const h=e.events[n[2]],f=e.events[n[3]];if(h[1].end=Object.assign({},f[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const p=n[2]+1,m=n[3]-n[2]-1;t.add(p,m,[])}}t.add(n[3]+1,0,[["exit",d,e]])}return s!==void 0&&(o.end=Object.assign({},Ah(e.events,s)),t.add(s,0,[["exit",o,e]]),o=void 0),o}function wM(t,e,n,i,s){const o=[],r=Ah(e.events,n);s&&(s.end=Object.assign({},r),o.push(["exit",s,e])),i.end=Object.assign({},r),o.push(["exit",i,e]),t.add(n+1,0,o)}function Ah(t,e){const n=t[e],i=n[0]==="enter"?"start":"end";return n[1][i]}const v$e={name:"tasklistCheck",tokenize:y$e};function _$e(){return{text:{91:v$e}}}function y$e(t,e,n){const i=this;return s;function s(l){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),o)}function o(l){return Un(l)?(t.enter("taskListCheckValueUnchecked"),t.consume(l),t.exit("taskListCheckValueUnchecked"),r):l===88||l===120?(t.enter("taskListCheckValueChecked"),t.consume(l),t.exit("taskListCheckValueChecked"),r):n(l)}function r(l){return l===93?(t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),a):n(l)}function a(l){return Et(l)?e(l):cn(l)?t.check({tokenize:b$e},e,n)(l):n(l)}}function b$e(t,e,n){return mn(t,i,"whitespace");function i(s){return s===null?n(s):e(s)}}function w$e(t){return SF([Y7e(),n$e(),u$e(t),p$e(),_$e()])}const k$e={};function C$e(t){const e=this,n=t||k$e,i=e.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),o=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),r=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(w$e(n)),o.push(H7e()),r.push(U7e(n))}function Vt(t,e){return Object.assign(t,{meta:{package:"@milkdown/preset-gfm",...e}}),t}const O5=z1("strike_through");Vt(O5,{displayName:"Attr<strikethrough>",group:"Strikethrough"});const cp=B1("strike_through",t=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:e=>e==="line-through"}],toDOM:e=>["del",t.get(O5.key)(e)],parseMarkdown:{match:e=>e.type==="delete",runner:(e,n,i)=>{e.openMark(i),e.next(n.children),e.closeMark(i)}},toMarkdown:{match:e=>e.type.name==="strike_through",runner:(e,n)=>{e.withMark(n,"delete")}}}));Vt(cp.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"});Vt(cp.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});const l2=rn("ToggleStrikeThrough",t=>()=>Zb(cp.type(t)));Vt(l2,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});const mz=mo(t=>R1(/~([^~]+)~$/,cp.type(t)));Vt(mz,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});const D5=go("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:t=>{const e=t.get(hn);return()=>e.call(l2.key)}}});Vt(D5.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"});Vt(D5.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});const U1=GSe({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:t=>t.style.textAlign||"left",setDOMAttr:(t,e)=>{e.style=`text-align: ${t||"left"}`}}}}),up=zs("table",()=>({...U1.table,content:"table_header_row table_row+",disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="table",runner:(t,e,n)=>{const i=e.align,s=e.children.map((o,r)=>({...o,align:i,isHeader:r===0}));t.openNode(n),t.next(s),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table",runner:(t,e)=>{var n;const i=(n=e.content.firstChild)==null?void 0:n.content;if(!i)return;const s=[];i.forEach(o=>{s.push(o.attrs.alignment)}),t.openNode("table",void 0,{align:s}),t.next(e.content),t.closeNode()}}}));Vt(up.node,{displayName:"NodeSchema<table>",group:"Table"});Vt(up.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});const c2=zs("table_header_row",()=>({...U1.table_row,disableDropCursor:!0,content:"(table_header)*",parseDOM:[{tag:"tr[data-is-header]"}],toDOM(){return["tr",{"data-is-header":!0},0]},parseMarkdown:{match:t=>!!(t.type==="tableRow"&&t.isHeader),runner:(t,e,n)=>{const i=e.align,s=e.children.map((o,r)=>({...o,align:i[r],isHeader:e.isHeader}));t.openNode(n),t.next(s),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table_header_row",runner:(t,e)=>{t.openNode("tableRow",void 0,{isHeader:!0}),t.next(e.content),t.closeNode()}}}));Vt(c2.node,{displayName:"NodeSchema<tableHeaderRow>",group:"Table"});Vt(c2.ctx,{displayName:"NodeSchemaCtx<tableHeaderRow>",group:"Table"});const j1=zs("table_row",()=>({...U1.table_row,disableDropCursor:!0,content:"(table_cell)*",parseMarkdown:{match:t=>t.type==="tableRow",runner:(t,e,n)=>{const i=e.align,s=e.children.map((o,r)=>({...o,align:i[r]}));t.openNode(n),t.next(s),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table_row",runner:(t,e)=>{t.openNode("tableRow"),t.next(e.content),t.closeNode()}}}));Vt(j1.node,{displayName:"NodeSchema<tableRow>",group:"Table"});Vt(j1.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});const W1=zs("table_cell",()=>({...U1.table_cell,disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="tableCell"&&!t.isHeader,runner:(t,e,n)=>{const i=e.align;t.openNode(n,{alignment:i}).openNode(t.schema.nodes.paragraph).next(e.children).closeNode().closeNode()}},toMarkdown:{match:t=>t.type.name==="table_cell",runner:(t,e)=>{t.openNode("tableCell").next(e.content).closeNode()}}}));Vt(W1.node,{displayName:"NodeSchema<tableCell>",group:"Table"});Vt(W1.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});const u2=zs("table_header",()=>({...U1.table_header,disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="tableCell"&&!!t.isHeader,runner:(t,e,n)=>{const i=e.align;t.openNode(n,{alignment:i}),t.openNode(t.schema.nodes.paragraph),t.next(e.children),t.closeNode(),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table_header",runner:(t,e)=>{t.openNode("tableCell"),t.next(e.content),t.closeNode()}}}));Vt(u2.node,{displayName:"NodeSchema<tableHeader>",group:"Table"});Vt(u2.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});function gz(t,e=3,n=3){const i=Array(n).fill(0).map(()=>W1.type(t).createAndFill()),s=Array(n).fill(0).map(()=>u2.type(t).createAndFill()),o=Array(e).fill(0).map((r,a)=>a===0?c2.type(t).create(null,s):j1.type(t).create(null,i));return up.type(t).create(null,o)}function Y1(t){return E8(e=>e.type.spec.tableRole==="table")(t)}function Eh(t,e){const n=Y1(e.$from);if(!n)return;const i=Pn.get(n.node);if(!(t<0||t>=i.width))return i.cellsInRect({left:t,right:t+1,top:0,bottom:i.height}).map(s=>{const o=n.node.nodeAt(s);if(!o)return;const r=s+n.start;return{pos:r,start:r+1,node:o}}).filter(s=>s!=null)}function Mh(t,e){const n=Y1(e.$from);if(!n)return;const i=Pn.get(n.node);if(!(t<0||t>=i.height))return i.cellsInRect({left:0,right:i.width,top:t,bottom:t+1}).map(s=>{const o=n.node.nodeAt(s);if(!o)return;const r=s+n.start;return{pos:r,start:r+1,node:o}}).filter(s=>s!=null)}function x$e(t){const e=Y1(t.$from);if(!e)return;const n=Pn.get(e.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map(i=>{const s=e.node.nodeAt(i),o=i+e.start;return{pos:o,start:o+1,node:s}})}function S$e(t){const e=x$e(t.selection);if(e&&e[0]){const n=t.doc.resolve(e[0].pos),i=e[e.length-1];if(i){const s=t.doc.resolve(i.pos);return Kb(t.setSelection(new ns(s,n)))}}return t}function vz(t,e,{map:n,tableStart:i,table:s},o){const r=Array(o).fill(0).reduce((l,c,u)=>l+s.child(u).nodeSize,i),a=Array(n.width).fill(0).map((l,c)=>{const u=s.nodeAt(n.map[c]);return W1.type(t).createAndFill({alignment:u==null?void 0:u.attrs.alignment})});return e.insert(r,j1.type(t).create(null,a)),e}function _z(t){return(e,n)=>i=>{n=n??i.selection.from;const s=i.doc.resolve(n),o=E8(l=>l.type.name==="table")(s),r=o?{node:o.node,from:o.start}:void 0,a=t==="row";if(r){const l=Pn.get(r.node);if(e>=0&&e<(a?l.height:l.width)){const c=l.positionAt(a?e:l.height-1,a?l.width-1:e,r.node),u=i.doc.resolve(r.from+c),d=a?ns.rowSelection:ns.colSelection,h=l.positionAt(a?e:0,a?0:e,r.node),f=i.doc.resolve(r.from+h);return Kb(i.setSelection(d(u,f)))}}return i}}const $$e=_z("row"),A$e=_z("col");function kM(t){return t[0].map((e,n)=>t.map(i=>i[n]))}function yz(t,e){const n=[],i=Pn.get(t);for(let s=0;s<i.height;s++){const o=t.child(s),r=[];for(let a=0;a<i.width;a++){if(!e[s][a])continue;const l=i.map[s*i.width+a],c=e[s][a],u=t.nodeAt(l).type.createChecked(Object.assign({},c.attrs),c.content,c.marks);r.push(u)}n.push(o.type.createChecked(o.attrs,r,o.marks))}return t.type.createChecked(t.attrs,n,t.marks)}function bz(t){const e=Pn.get(t),n=[];for(let i=0;i<e.height;i++){const s=[],o={};for(let r=0;r<e.width;r++){const a=e.map[i*e.width+r],l=t.nodeAt(a),c=e.findCell(a);if(o[a]||c.top!==i){s.push(null);continue}o[a]=!0,s.push(l)}n.push(s)}return n}function wz(t,e,n,i){const s=e[0]>n[0]?-1:1,o=t.splice(e[0],e.length),r=o.length%2===0?1:0;let a;return i===-1&&s===1?a=n[0]-1:i===1&&s===-1?a=n[n.length-1]-r+1:a=s===-1?n[0]:n[n.length-1]-r,t.splice(a,0,...o),t}function E$e(t,e,n,i){let s=kM(bz(t.node));return s=wz(s,e,n,i),s=kM(s),yz(t.node,s)}function M$e(t,e,n,i){let s=bz(t.node);return s=wz(s,e,n,i),yz(t.node,s)}function CM(t,e){let n=t,i=t;for(let u=t;u>=0;u--){const d=Eh(u,e.selection);d&&d.forEach(h=>{const f=h.node.attrs.colspan+u-1;f>=n&&(n=u),f>i&&(i=f)})}for(let u=t;u<=i;u++){const d=Eh(u,e.selection);d&&d.forEach(h=>{const f=h.node.attrs.colspan+u-1;h.node.attrs.colspan>1&&f>i&&(i=f)})}const s=[];for(let u=n;u<=i;u++){const d=Eh(u,e.selection);d&&d.length&&s.push(u)}n=s[0],i=s[s.length-1];const o=Eh(n,e.selection),r=Mh(0,e.selection),a=e.doc.resolve(o[o.length-1].pos);let l;for(let u=i;u>=n;u--){const d=Eh(u,e.selection);if(d&&d.length){for(let h=r.length-1;h>=0;h--)if(r[h].pos===d[0].pos){l=d[0];break}if(l)break}}const c=e.doc.resolve(l.pos);return{$anchor:a,$head:c,indexes:s}}function xM(t,e){let n=t,i=t;for(let u=t;u>=0;u--)Mh(u,e.selection).forEach(d=>{const h=d.node.attrs.rowspan+u-1;h>=n&&(n=u),h>i&&(i=h)});for(let u=t;u<=i;u++)Mh(u,e.selection).forEach(d=>{const h=d.node.attrs.rowspan+u-1;d.node.attrs.rowspan>1&&h>i&&(i=h)});const s=[];for(let u=n;u<=i;u++){const d=Mh(u,e.selection);d&&d.length&&s.push(u)}n=s[0],i=s[s.length-1];const o=Mh(n,e.selection),r=Eh(0,e.selection),a=e.doc.resolve(o[o.length-1].pos);let l;for(let u=i;u>=n;u--){const d=Mh(u,e.selection);if(d&&d.length){for(let h=r.length-1;h>=0;h--)if(r[h].pos===d[0].pos){l=d[0];break}if(l)break}}const c=e.doc.resolve(l.pos);return{$anchor:a,$head:c,indexes:s}}function T$e(t){const{tr:e,origin:n,target:i,select:s=!0,pos:o}=t,r=o!=null?e.doc.resolve(o):e.selection.$from,a=Y1(r);if(!a)return e;const{indexes:l}=CM(n,e),{indexes:c}=CM(i,e);if(l.includes(i))return e;const u=E$e(a,l,c,0),d=Kb(e).replaceWith(a.pos,a.pos+a.node.nodeSize,u);if(!s)return d;const h=Pn.get(u),f=a.start,p=i,m=h.positionAt(h.height-1,p,u),y=d.doc.resolve(f+m),b=ns.colSelection,k=h.positionAt(0,p,u),C=d.doc.resolve(f+k);return d.setSelection(b(y,C))}function P$e(t){const{tr:e,origin:n,target:i,select:s=!0,pos:o}=t,r=o!=null?e.doc.resolve(o):e.selection.$from,a=Y1(r);if(!a)return e;const{indexes:l}=xM(n,e),{indexes:c}=xM(i,e);if(l.includes(i))return e;const u=M$e(a,l,c,0),d=Kb(e).replaceWith(a.pos,a.pos+a.node.nodeSize,u);if(!s)return d;const h=Pn.get(u),f=a.start,p=i,m=h.positionAt(p,h.width-1,u),y=d.doc.resolve(f+m),b=ns.rowSelection,k=h.positionAt(p,0,u),C=d.doc.resolve(f+k);return d.setSelection(b(y,C))}const R5=rn("GoToPrevTableCell",()=>()=>ez(-1));Vt(R5,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});const V5=rn("GoToNextTableCell",()=>()=>ez(1));Vt(V5,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});const F5=rn("ExitTable",t=>()=>(e,n)=>{if(!_r(e))return!1;const{$head:i}=e.selection,s=j4e(i,up.type(t));if(!s)return!1;const{to:o}=s,r=e.tr.replaceWith(o,o,_l.type(t).createAndFill());return r.setSelection(Ht.near(r.doc.resolve(o),1)).scrollIntoView(),n==null||n(r),!0});Vt(F5,{displayName:"Command<breakTableCommand>",group:"Table"});const kz=rn("InsertTable",t=>({row:e,col:n}={})=>(i,s)=>{const{selection:o,tr:r}=i,{from:a}=o,l=gz(t,e,n),c=r.replaceSelectionWith(l),u=Ht.findFrom(c.doc.resolve(a),1,!0);return u&&c.setSelection(u),s==null||s(c),!0});Vt(kz,{displayName:"Command<insertTableCommand>",group:"Table"});const Cz=rn("MoveRow",()=>({from:t,to:e,pos:n}={})=>(i,s)=>{const{tr:o}=i;return!!(s!=null&&s(P$e({tr:o,origin:t??0,target:e??0,pos:n,select:!0})))});Vt(Cz,{displayName:"Command<moveRowCommand>",group:"Table"});const xz=rn("MoveCol",()=>({from:t,to:e,pos:n}={})=>(i,s)=>{const{tr:o}=i;return!!(s!=null&&s(T$e({tr:o,origin:t??0,target:e??0,pos:n,select:!0})))});Vt(xz,{displayName:"Command<moveColCommand>",group:"Table"});const Sz=rn("SelectRow",()=>(t={index:0})=>(e,n)=>{const{tr:i}=e;return!!(n!=null&&n($$e(t.index,t.pos)(i)))});Vt(Sz,{displayName:"Command<selectRowCommand>",group:"Table"});const $z=rn("SelectCol",()=>(t={index:0})=>(e,n)=>{const{tr:i}=e;return!!(n!=null&&n(A$e(t.index,t.pos)(i)))});Vt($z,{displayName:"Command<selectColCommand>",group:"Table"});const Az=rn("SelectTable",()=>()=>(t,e)=>{const{tr:n}=t;return!!(e!=null&&e(S$e(n)))});Vt(Az,{displayName:"Command<selectTableCommand>",group:"Table"});const Ez=rn("DeleteSelectedCells",()=>()=>(t,e)=>{const{selection:n}=t;if(!(n instanceof ns))return!1;const i=n.isRowSelection(),s=n.isColSelection();return i&&s?g9e(t,e):s?u9e(t,e):h9e(t,e)});Vt(Ez,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});const Mz=rn("AddColBefore",()=>()=>a9e);Vt(Mz,{displayName:"Command<addColBeforeCommand>",group:"Table"});const Tz=rn("AddColAfter",()=>()=>l9e);Vt(Tz,{displayName:"Command<addColAfterCommand>",group:"Table"});const Pz=rn("AddRowBefore",t=>()=>(e,n)=>{if(!_r(e))return!1;if(n){const i=Kc(e);n(vz(t,e.tr,i,i.top))}return!0});Vt(Pz,{displayName:"Command<addRowBeforeCommand>",group:"Table"});const Iz=rn("AddRowAfter",t=>()=>(e,n)=>{if(!_r(e))return!1;if(n){const i=Kc(e);n(vz(t,e.tr,i,i.bottom))}return!0});Vt(Iz,{displayName:"Command<addRowAfterCommand>",group:"Table"});const Lz=rn("SetAlign",()=>(t="left")=>f9e("alignment",t));Vt(Lz,{displayName:"Command<setAlignCommand>",group:"Table"});const Oz=mo(t=>new zo(/^\|(?<col>\d+)[xX](?<row>\d+)\|\s$/,(e,n,i,s)=>{var o,r;const a=e.doc.resolve(i);if(!a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),up.type(t)))return null;const l=gz(t,Number((o=n.groups)==null?void 0:o.row),Number((r=n.groups)==null?void 0:r.col)),c=e.tr.replaceRangeWith(i,s,l);return c.setSelection(Ot.create(c.doc,i+3)).scrollIntoView()}));Vt(Oz,{displayName:"InputRule<insertTableInputRule>",group:"Table"});const N5=go("tableKeymap",{NextCell:{shortcuts:["Mod-]","Tab"],command:t=>{const e=t.get(hn);return()=>e.call(V5.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:t=>{const e=t.get(hn);return()=>e.call(R5.key)}},ExitTable:{shortcuts:["Mod-Enter"],command:t=>{const e=t.get(hn);return()=>e.call(F5.key)}}});Vt(N5.ctx,{displayName:"KeymapCtx<table>",group:"Table"});Vt(N5.shortcuts,{displayName:"Keymap<table>",group:"Table"});const i3="footnote_definition",SM="footnoteDefinition",B5=zs("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:""}},parseDOM:[{tag:`dl[data-type="${i3}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw Kr(t);return{label:t.dataset.label}},contentElement:"dd"}],toDOM:t=>{const e=t.attrs.label;return["dl",{"data-label":e,"data-type":i3},["dt",e],["dd",0]]},parseMarkdown:{match:({type:t})=>t===SM,runner:(t,e,n)=>{t.openNode(n,{label:e.label}).next(e.children).closeNode()}},toMarkdown:{match:t=>t.type.name===i3,runner:(t,e)=>{t.openNode(SM,void 0,{label:e.attrs.label,identifier:e.attrs.label}).next(e.content).closeNode()}}}));Vt(B5.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"});Vt(B5.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});const o3="footnote_reference",z5=zs("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:""}},parseDOM:[{tag:`sup[data-type="${o3}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw Kr(t);return{label:t.dataset.label}}}],toDOM:t=>{const e=t.attrs.label;return["sup",{"data-label":e,"data-type":o3},e]},parseMarkdown:{match:({type:t})=>t==="footnoteReference",runner:(t,e,n)=>{t.addNode(n,{label:e.label})}},toMarkdown:{match:t=>t.type.name===o3,runner:(t,e)=>{t.addNode("footnoteReference",void 0,void 0,{label:e.attrs.label,identifier:e.attrs.label})}}}));Vt(z5.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"});Vt(z5.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});const Dz=xa.extendSchema(t=>e=>{const n=t(e);return{...n,attrs:{...n.attrs,checked:{default:null}},parseDOM:[{tag:'li[data-item-type="task"]',getAttrs:i=>{if(!(i instanceof HTMLElement))throw Kr(i);return{label:i.dataset.label,listType:i.dataset.listType,spread:i.dataset.spread,checked:i.dataset.checked?i.dataset.checked==="true":null}}},...(n==null?void 0:n.parseDOM)||[]],toDOM:i=>n.toDOM&&i.attrs.checked==null?n.toDOM(i):["li",{"data-item-type":"task","data-label":i.attrs.label,"data-list-type":i.attrs.listType,"data-spread":i.attrs.spread,"data-checked":i.attrs.checked},0],parseMarkdown:{match:({type:i})=>i==="listItem",runner:(i,s,o)=>{if(s.checked==null){n.parseMarkdown.runner(i,s,o);return}const r=s.label!=null?`${s.label}.`:"•",a=s.checked!=null?!!s.checked:null,l=s.label!=null?"ordered":"bullet",c=s.spread!=null?`${s.spread}`:"true";i.openNode(o,{label:r,listType:l,spread:c,checked:a}),i.next(s.children),i.closeNode()}},toMarkdown:{match:i=>i.type.name==="list_item",runner:(i,s)=>{if(s.attrs.checked==null){n.toMarkdown.runner(i,s);return}const o=s.attrs.label,r=s.attrs.listType,a=s.attrs.spread==="true",l=s.attrs.checked;i.openNode("listItem",void 0,{label:o,listType:r,spread:a,checked:l}),i.next(s.content),i.closeNode()}}}});Vt(Dz,{displayName:"NodeSchema<listItem>",group:"ListItem"});const Rz=mo(()=>new zo(/^\[(?<checked>\s|x)\]\s$/,(t,e,n,i)=>{var s;const o=t.doc.resolve(n);let r=0,a=o.node(r);for(;a&&a.type.name!=="list_item";)r--,a=o.node(r);if(!a||a.attrs.checked!=null)return null;const l=((s=e.groups)==null?void 0:s.checked)==="x",c=o.before(r),u=t.tr;return u.deleteRange(n,i).setNodeMarkup(c,void 0,{...a.attrs,checked:l}),u}));Vt(Rz,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});const I$e=[D5,N5].flat(),L$e=[Oz,Rz],O$e=[mz],Vz=Ps(()=>Y9e);Vt(Vz,{displayName:"Prose<autoInsertSpanPlugin>",group:"Prose"});const D$e=Ps(()=>$9e({}));Vt(D$e,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});const Fz=Ps(()=>V9e({allowTableNodeSelection:!0}));Vt(Fz,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});const H5=Fd("remarkGFM",()=>C$e);Vt(H5.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"});Vt(H5.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});const R$e=new ds("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");function V$e(t,e){let n=0;return e.forEach((i,s,o)=>{i===t&&(n=o)}),n}const Nz=Ps(()=>new ts({key:R$e,appendTransaction:(t,e,n)=>{let i;const s=(o,r)=>{if(i||(i=n.tr),o.type.name!=="table_cell")return;const a=n.doc.resolve(r),l=a.node(a.depth),c=a.node(a.depth-1).firstChild;if(!c)return;const u=V$e(o,l),d=c.maybeChild(u);if(!d)return;const h=d.attrs.alignment,f=o.attrs.alignment;h!==f&&i.setNodeMarkup(r,void 0,{...o.attrs,alignment:h})};return e.doc!==n.doc&&n.doc.descendants(s),i}}));Vt(Nz,{displayName:"Prose<keepTableAlignPlugin>",group:"Prose"});const F$e=[Nz,Vz,H5,Fz].flat(),N$e=[Dz,up,c2,j1,u2,W1,B5,z5,O5,cp].flat(),B$e=[V5,R5,F5,kz,Cz,xz,Sz,$z,Az,Ez,Pz,Iz,Mz,Tz,Lz,l2],z$e=[N$e,L$e,O$e,I$e,B$e,F$e].flat();var Ty=200,Ys=function(){};Ys.prototype.append=function(e){return e.length?(e=Ys.from(e),!this.length&&e||e.length<Ty&&this.leafAppend(e)||this.length<Ty&&e.leafPrepend(this)||this.appendInner(e)):this};Ys.prototype.prepend=function(e){return e.length?Ys.from(e).append(this):this};Ys.prototype.appendInner=function(e){return new H$e(this,e)};Ys.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Ys.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Ys.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Ys.prototype.forEach=function(e,n,i){n===void 0&&(n=0),i===void 0&&(i=this.length),n<=i?this.forEachInner(e,n,i,0):this.forEachInvertedInner(e,n,i,0)};Ys.prototype.map=function(e,n,i){n===void 0&&(n=0),i===void 0&&(i=this.length);var s=[];return this.forEach(function(o,r){return s.push(e(o,r))},n,i),s};Ys.from=function(e){return e instanceof Ys?e:e&&e.length?new Bz(e):Ys.empty};var Bz=function(t){function e(i){t.call(this),this.values=i}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={length:{configurable:!0},depth:{configurable:!0}};return e.prototype.flatten=function(){return this.values},e.prototype.sliceInner=function(s,o){return s==0&&o==this.length?this:new e(this.values.slice(s,o))},e.prototype.getInner=function(s){return this.values[s]},e.prototype.forEachInner=function(s,o,r,a){for(var l=o;l<r;l++)if(s(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(s,o,r,a){for(var l=o-1;l>=r;l--)if(s(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(s){if(this.length+s.length<=Ty)return new e(this.values.concat(s.flatten()))},e.prototype.leafPrepend=function(s){if(this.length+s.length<=Ty)return new e(s.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Ys);Ys.empty=new Bz([]);var H$e=function(t){function e(n,i){t.call(this),this.left=n,this.right=i,this.length=n.length+i.length,this.depth=Math.max(n.depth,i.depth)+1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},e.prototype.getInner=function(i){return i<this.left.length?this.left.get(i):this.right.get(i-this.left.length)},e.prototype.forEachInner=function(i,s,o,r){var a=this.left.length;if(s<a&&this.left.forEachInner(i,s,Math.min(o,a),r)===!1||o>a&&this.right.forEachInner(i,Math.max(s-a,0),Math.min(this.length,o)-a,r+a)===!1)return!1},e.prototype.forEachInvertedInner=function(i,s,o,r){var a=this.left.length;if(s>a&&this.right.forEachInvertedInner(i,s-a,Math.max(o,a)-a,r+a)===!1||o<a&&this.left.forEachInvertedInner(i,Math.min(s,a),o,r)===!1)return!1},e.prototype.sliceInner=function(i,s){if(i==0&&s==this.length)return this;var o=this.left.length;return s<=o?this.left.slice(i,s):i>=o?this.right.slice(i-o,s-o):this.left.slice(i,o).append(this.right.slice(0,s-o))},e.prototype.leafAppend=function(i){var s=this.right.leafAppend(i);if(s)return new e(this.left,s)},e.prototype.leafPrepend=function(i){var s=this.left.leafPrepend(i);if(s)return new e(s,this.right)},e.prototype.appendInner=function(i){return this.left.depth>=Math.max(this.right.depth,i.depth)+1?new e(this.left,new e(this.right,i)):new e(this,i)},e}(Ys);const U$e=500;class xr{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let i=this.items.length;for(;;i--)if(this.items.get(i-1).selection){--i;break}let s,o;n&&(s=this.remapping(i,this.items.length),o=s.maps.length);let r=e.tr,a,l,c=[],u=[];return this.items.forEach((d,h)=>{if(!d.step){s||(s=this.remapping(i,h+1),o=s.maps.length),o--,u.push(d);return}if(s){u.push(new aa(d.map));let f=d.step.map(s.slice(o)),p;f&&r.maybeStep(f).doc&&(p=r.mapping.maps[r.mapping.maps.length-1],c.push(new aa(p,void 0,void 0,c.length+u.length))),o--,p&&s.appendMap(p,o)}else r.maybeStep(d.step);if(d.selection)return a=s?d.selection.map(s.slice(o)):d.selection,l=new xr(this.items.slice(0,i).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:r,selection:a}}addTransform(e,n,i,s){let o=[],r=this.eventCount,a=this.items,l=!s&&a.length?a.get(a.length-1):null;for(let u=0;u<e.steps.length;u++){let d=e.steps[u].invert(e.docs[u]),h=new aa(e.mapping.maps[u],d,n),f;(f=l&&l.merge(h))&&(h=f,u?o.pop():a=a.slice(0,a.length-1)),o.push(h),n&&(r++,n=void 0),s||(l=h)}let c=r-i.depth;return c>W$e&&(a=j$e(a,c),r-=c),new xr(a.append(o),r)}remapping(e,n){let i=new Zh;return this.items.forEach((s,o)=>{let r=s.mirrorOffset!=null&&o-s.mirrorOffset>=e?i.maps.length-s.mirrorOffset:void 0;i.appendMap(s.map,r)},e,n),i}addMaps(e){return this.eventCount==0?this:new xr(this.items.append(e.map(n=>new aa(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let i=[],s=Math.max(0,this.items.length-n),o=e.mapping,r=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},s);let l=n;this.items.forEach(h=>{let f=o.getMirror(--l);if(f==null)return;r=Math.min(r,f);let p=o.maps[f];if(h.step){let m=e.steps[f].invert(e.docs[f]),y=h.selection&&h.selection.map(o.slice(l+1,f));y&&a++,i.push(new aa(p,m,y))}else i.push(new aa(p))},s);let c=[];for(let h=n;h<r;h++)c.push(new aa(o.maps[h]));let u=this.items.slice(0,s).append(c).append(i),d=new xr(u,a);return d.emptyItemCount()>U$e&&(d=d.compress(this.items.length-i.length)),d}emptyItemCount(){let e=0;return this.items.forEach(n=>{n.step||e++}),e}compress(e=this.items.length){let n=this.remapping(0,e),i=n.maps.length,s=[],o=0;return this.items.forEach((r,a)=>{if(a>=e)s.push(r),r.selection&&o++;else if(r.step){let l=r.step.map(n.slice(i)),c=l&&l.getMap();if(i--,c&&n.appendMap(c,i),l){let u=r.selection&&r.selection.map(n.slice(i));u&&o++;let d=new aa(c.invert(),l,u),h,f=s.length-1;(h=s.length&&s[f].merge(d))?s[f]=h:s.push(d)}}else r.map&&i--},this.items.length,0),new xr(Ys.from(s.reverse()),o)}}xr.empty=new xr(Ys.empty,0);function j$e(t,e){let n;return t.forEach((i,s)=>{if(i.selection&&e--==0)return n=s,!1}),t.slice(n)}class aa{constructor(e,n,i,s){this.map=e,this.step=n,this.selection=i,this.mirrorOffset=s}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new aa(n.getMap().invert(),n,this.selection)}}}class ec{constructor(e,n,i,s,o){this.done=e,this.undone=n,this.prevRanges=i,this.prevTime=s,this.prevComposition=o}}const W$e=20;function Y$e(t,e,n,i){let s=n.getMeta(Qu),o;if(s)return s.historyState;n.getMeta(X$e)&&(t=new ec(t.done,t.undone,null,0,-1));let r=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(r&&r.getMeta(Qu))return r.getMeta(Qu).redo?new ec(t.done.addTransform(n,void 0,i,t_(e)),t.undone,$M(n.mapping.maps),t.prevTime,t.prevComposition):new ec(t.done,t.undone.addTransform(n,void 0,i,t_(e)),null,t.prevTime,t.prevComposition);if(n.getMeta("addToHistory")!==!1&&!(r&&r.getMeta("addToHistory")===!1)){let a=n.getMeta("composition"),l=t.prevTime==0||!r&&t.prevComposition!=a&&(t.prevTime<(n.time||0)-i.newGroupDelay||!q$e(n,t.prevRanges)),c=r?r3(t.prevRanges,n.mapping):$M(n.mapping.maps);return new ec(t.done.addTransform(n,l?e.selection.getBookmark():void 0,i,t_(e)),xr.empty,c,n.time,a??t.prevComposition)}else return(o=n.getMeta("rebased"))?new ec(t.done.rebased(n,o),t.undone.rebased(n,o),r3(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new ec(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),r3(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function q$e(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((i,s)=>{for(let o=0;o<e.length;o+=2)i<=e[o+1]&&s>=e[o]&&(n=!0)}),n}function $M(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((i,s,o,r)=>e.push(o,r));return e}function r3(t,e){if(!t)return null;let n=[];for(let i=0;i<t.length;i+=2){let s=e.map(t[i],1),o=e.map(t[i+1],-1);s<=o&&n.push(s,o)}return n}function G$e(t,e,n){let i=t_(e),s=Qu.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,i);if(!o)return null;let r=o.selection.resolve(o.transform.doc),a=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),s,i),l=new ec(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(r).setMeta(Qu,{redo:n,historyState:l})}let a3=!1,AM=null;function t_(t){let e=t.plugins;if(AM!=e){a3=!1,AM=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){a3=!0;break}}return a3}const Qu=new ds("history"),X$e=new ds("closeHistory");function K$e(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new ts({key:Qu,state:{init(){return new ec(xr.empty,xr.empty,null,0,-1)},apply(e,n,i){return Y$e(n,i,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let i=n.inputType,s=i=="historyUndo"?Hz:i=="historyRedo"?Uz:null;return s?(n.preventDefault(),s(e.state,e.dispatch)):!1}}}})}function zz(t,e){return(n,i)=>{let s=Qu.getState(n);if(!s||(t?s.undone:s.done).eventCount==0)return!1;if(i){let o=G$e(s,n,t);o&&i(e?o.scrollIntoView():o)}return!0}}const Hz=zz(!1,!0),Uz=zz(!0,!0);function dp(t,e){return Object.assign(t,{meta:{package:"@milkdown/plugin-history",...e}}),t}const U5=rn("Undo",()=>()=>Hz);dp(U5,{displayName:"Command<undo>"});const j5=rn("Redo",()=>()=>Uz);dp(j5,{displayName:"Command<redo>"});const W5=hs({},"historyProviderConfig");dp(W5,{displayName:"Ctx<historyProviderConfig>"});const jz=Ps(t=>K$e(t.get(W5.key)));dp(jz,{displayName:"Ctx<historyProviderPlugin>"});const Y5=go("historyKeymap",{Undo:{shortcuts:"Mod-z",command:t=>{const e=t.get(hn);return()=>e.call(U5.key)}},Redo:{shortcuts:["Mod-y","Shift-Mod-z"],command:t=>{const e=t.get(hn);return()=>e.call(j5.key)}}});dp(Y5.ctx,{displayName:"KeymapCtx<history>"});dp(Y5.shortcuts,{displayName:"Keymap<history>"});const Z$e=[W5,jz,Y5,U5,j5].flat();function J6(t){if(!t)return!1;if(Array.isArray(t))return t.length>1?!1:J6(t[0]);const e=t.content;return e?J6(e):t.type==="text"}function J$e(t){if(t.content.childCount===1){const e=t.content.firstChild;if((e==null?void 0:e.type.name)==="text"&&e.marks.length===0)return e;if((e==null?void 0:e.type.name)==="paragraph"&&e.childCount===1){const n=e.firstChild;if((n==null?void 0:n.type.name)==="text"&&n.marks.length===0)return n}}return!1}const Wz=Ps(t=>{const e=t.get(Lr);t.update(eg,i=>({...i,editable:i.editable??(()=>!0)}));const n=new ds("MILKDOWN_CLIPBOARD");return new ts({key:n,props:{handlePaste:(i,s)=>{var o,r;const a=t.get(nf),l=(r=(o=i.props).editable)==null?void 0:r.call(o,i.state),{clipboardData:c}=s;if(!l||!c||i.state.selection.$from.node().type.spec.code)return!1;const u=c.getData("text/plain"),d=c.getData("vscode-editor-data");if(d){const b=JSON.parse(d),k=b==null?void 0:b.mode;if(u&&k){const{tr:C}=i.state,$=W4e("code_block",e);return C.replaceSelectionWith($.create({language:k})).setSelection(Ot.near(C.doc.resolve(Math.max(0,C.selection.from-2)))).insertText(u.replace(/\r\n?/g,`
`)),i.dispatch(C),!0}}const h=c.getData("text/html");if(h.length===0&&u.length===0)return!1;const f=Bb.fromSchema(e);let p;if(h.length===0){const b=a(u);if(!b||typeof b=="string")return!1;p=Wc.fromSchema(e).serializeFragment(b.content)}else{const b=document.createElement("template");b.innerHTML=h,p=b.content.cloneNode(!0),b.remove()}const m=f.parseSlice(p),y=J$e(m);return y?(i.dispatch(i.state.tr.replaceSelectionWith(y,!0)),!0):(i.dispatch(i.state.tr.replaceSelection(m)),!0)},clipboardTextSerializer:i=>{const s=t.get(sf);if(J6(i.content.toJSON()))return i.content.textBetween(0,i.content.size,`

`);const o=e.topNodeType.createAndFill(void 0,i.content);return o?s(o):""}}})});Wz.meta={displayName:"Prose<clipboard>",package:"@milkdown/plugin-clipboard"};const q5=hs({shouldAppend:t=>!(!t||["heading","paragraph"].includes(t.type.name)),getNode:t=>t.schema.nodes.paragraph.create()},"trailingConfig");q5.meta={package:"@milkdown/plugin-trailing",displayName:"Ctx<trailingConfig>"};const Yz=Ps(t=>{const e=new ds("MILKDOWN_TRAILING"),{shouldAppend:n,getNode:i}=t.get(q5.key),s=new ts({key:e,state:{init:(o,r)=>{const a=r.tr.doc.lastChild;return n(a,r)},apply:(o,r,a,l)=>{if(!o.docChanged)return r;const c=o.doc.lastChild;return n(c,l)}},appendTransaction:(o,r,a)=>{const{doc:l,tr:c}=a,u=i==null?void 0:i(a),d=s.getState(a),h=l.content.size;if(!(!d||!u))return c.insert(h,u)}});return s});Yz.meta={package:"@milkdown/plugin-trailing",displayName:"Prose<trailing>"};const Q$e=[q5,Yz];var qz=(t=>(t.CodeMirror="code-mirror",t.LinkTooltip="link-tooltip",t.Cursor="cursor",t.BlockEdit="block-edit",t.Toolbar="toolbar",t.Placeholder="placeholder",t.ImageBlock="image-block",t))(qz||{});const eAe={cursor:!0,"link-tooltip":!0,"block-edit":!0,placeholder:!0,toolbar:!0,"code-mirror":!0,"image-block":!0};async function tAe(t,e,n){switch(t){case"link-tooltip":{const{defineFeature:i}=await bu(()=>Promise.resolve().then(()=>S5t),void 0);return i(e,n)}case"block-edit":{const{defineFeature:i}=await bu(()=>Promise.resolve().then(()=>CSt),void 0);return i(e,n)}case"placeholder":{const{defineFeature:i}=await bu(()=>Promise.resolve().then(()=>ASt),void 0);return i(e,n)}case"toolbar":{const{defineFeature:i}=await bu(()=>Promise.resolve().then(()=>TSt),void 0);return i(e,n)}case"image-block":{const{defineFeature:i}=await bu(()=>Promise.resolve().then(()=>zSt),void 0);return i(e,n)}}}const nAe=wn([],"FeaturesCtx");function sAe(t){return e=>{e.inject(nAe,t)}}var iAe="Expected a function",EM=0/0,oAe="[object Symbol]",rAe=/^\s+|\s+$/g,aAe=/^[-+]0x[0-9a-f]+$/i,lAe=/^0b[01]+$/i,cAe=/^0o[0-7]+$/i,uAe=parseInt,dAe=typeof ws=="object"&&ws&&ws.Object===Object&&ws,hAe=typeof self=="object"&&self&&self.Object===Object&&self,fAe=dAe||hAe||Function("return this")(),pAe=Object.prototype,mAe=pAe.toString,gAe=Math.max,vAe=Math.min,l3=function(){return fAe.Date.now()};function _Ae(t,e,n){var i,s,o,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(iAe);e=MM(e)||0,Q6(n)&&(u=!!n.leading,d="maxWait"in n,o=d?gAe(MM(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(M){var P=i,T=s;return i=s=void 0,c=M,r=t.apply(T,P),r}function p(M){return c=M,a=setTimeout(b,e),u?f(M):r}function m(M){var P=M-l,T=M-c,I=e-P;return d?vAe(I,o-T):I}function y(M){var P=M-l,T=M-c;return l===void 0||P>=e||P<0||d&&T>=o}function b(){var M=l3();if(y(M))return k(M);a=setTimeout(b,m(M))}function k(M){return a=void 0,h&&i?f(M):(i=s=void 0,r)}function C(){a!==void 0&&clearTimeout(a),c=0,i=l=s=a=void 0}function $(){return a===void 0?r:k(l3())}function x(){var M=l3(),P=y(M);if(i=arguments,s=this,l=M,P){if(a===void 0)return p(l);if(d)return a=setTimeout(b,e),f(l)}return a===void 0&&(a=setTimeout(b,e)),r}return x.cancel=C,x.flush=$,x}function Q6(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function yAe(t){return!!t&&typeof t=="object"}function bAe(t){return typeof t=="symbol"||yAe(t)&&mAe.call(t)==oAe}function MM(t){if(typeof t=="number")return t;if(bAe(t))return EM;if(Q6(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Q6(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(rAe,"");var n=lAe.test(t);return n||cAe.test(t)?uAe(t.slice(2),n?2:8):aAe.test(t)?EM:+t}var wAe=_Ae;const d2=Ei(wAe);let Gz=class{constructor(){this.beforeMountedListeners=[],this.mountedListeners=[],this.updatedListeners=[],this.markdownUpdatedListeners=[],this.blurListeners=[],this.focusListeners=[],this.destroyListeners=[],this.beforeMount=e=>(this.beforeMountedListeners.push(e),this),this.mounted=e=>(this.mountedListeners.push(e),this),this.updated=e=>(this.updatedListeners.push(e),this)}get listeners(){return{beforeMount:this.beforeMountedListeners,mounted:this.mountedListeners,updated:this.updatedListeners,markdownUpdated:this.markdownUpdatedListeners,blur:this.blurListeners,focus:this.focusListeners,destroy:this.destroyListeners}}markdownUpdated(e){return this.markdownUpdatedListeners.push(e),this}blur(e){return this.blurListeners.push(e),this}focus(e){return this.focusListeners.push(e),this}destroy(e){return this.destroyListeners.push(e),this}};const eC=wn(new Gz,"listener"),kAe=new ds("MILKDOWN_LISTENER"),Xz=t=>(t.inject(eC,new Gz),async()=>{await t.wait(Zu);const e=t.get(eC),{listeners:n}=e;n.beforeMount.forEach(a=>a(t)),await t.wait(Qm);const i=t.get(sf);let s=null,o=null;const r=new ts({key:kAe,view:()=>({destroy:()=>{n.destroy.forEach(a=>a(t))}}),props:{handleDOMEvents:{focus:()=>(n.focus.forEach(a=>a(t)),!1),blur:()=>(n.blur.forEach(a=>a(t)),!1)}},state:{init:(a,l)=>{s=l.doc,o=i(l.doc)},apply:a=>!a.docChanged||a.getMeta("addToHistory")===!1?void 0:d2(()=>{const{doc:l}=a;if(n.updated.length>0&&s&&!s.eq(l)&&n.updated.forEach(c=>{c(t,l,s)}),n.markdownUpdated.length>0&&s&&!s.eq(l)){const c=i(l);n.markdownUpdated.forEach(u=>{u(t,c,o)}),o=c}s=l},200)()}});t.update(Br,a=>a.concat(r)),await t.wait(q0),n.mounted.forEach(a=>a(t))});Xz.meta={package:"@milkdown/plugin-listener",displayName:"Listener"};function CAe(t){return new Promise(e=>{const n=new FileReader;n.addEventListener("load",()=>{e({alt:t.name,src:n.result})},!1),n.readAsDataURL(t)})}const xAe=async(t,e)=>{const n=[];for(let s=0;s<t.length;s++){const o=t.item(s);o&&o.type.includes("image")&&n.push(o)}const{image:i}=e.nodes;if(!i)throw nF("image");return(await Promise.all(n.map(s=>CAe(s)))).map(({alt:s,src:o})=>i.createAndFill({src:o,alt:s}))},of=hs({uploader:xAe,enableHtmlFileUploader:!1,uploadWidgetFactory:(t,e)=>{const n=document.createElement("span");return n.textContent="Upload in progress...",Fs.widget(t,n,e)}},"uploadConfig");of.meta={package:"@milkdown/plugin-upload",displayName:"Ctx<uploadConfig>"};const Kz=Ps(t=>{const e=new ds("MILKDOWN_UPLOAD"),n=(s,o)=>{var r;const a=e.getState(s);if(!a)return-1;const l=a.find(void 0,void 0,c=>c.id===o);return l.length?((r=l[0])==null?void 0:r.from)??-1:-1},i=(s,o,r)=>{var a;if(!r||r.length<=0)return!1;const l=Symbol("upload symbol"),c=t.get(Lr),{tr:u}=s.state,d=o instanceof DragEvent?((a=s.posAtCoords({left:o.clientX,top:o.clientY}))==null?void 0:a.pos)??u.selection.from:u.selection.from;s.dispatch(u.setMeta(e,{add:{id:l,pos:d}}));const{uploader:h}=t.get(of.key);return h(r,c).then(f=>{const p=n(s.state,l);p<0||s.dispatch(s.state.tr.replaceWith(p,p,f).setMeta(e,{remove:{id:l}}))}).catch(f=>{console.error(f)}),!0};return new ts({key:e,state:{init(){return Gn.empty},apply(s,o){const r=o.map(s.mapping,s.doc),a=s.getMeta(this);if(!a)return r;if(a.add){const{uploadWidgetFactory:l}=t.get(of.key),c=l(a.add.pos,{id:a.add.id});return r.add(s.doc,[c])}if(a.remove){const l=r.find(void 0,void 0,c=>c.id===a.remove.id);return r.remove(l)}return r}},props:{decorations(s){return this.getState(s)},handlePaste:(s,o)=>{var r,a;const{enableHtmlFileUploader:l}=t.get(of.key);return!(o instanceof ClipboardEvent)||!l&&(r=o.clipboardData)!=null&&r.getData("text/html")?!1:i(s,o,(a=o.clipboardData)==null?void 0:a.files)},handleDrop:(s,o)=>{var r;return o instanceof DragEvent?i(s,o,(r=o.dataTransfer)==null?void 0:r.files):!1}}})});Kz.meta={package:"@milkdown/plugin-upload",displayName:"Prose<upload>"};const SAe=[of,Kz];var G5=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Xs=(t,e,n)=>(G5(t,e,"read from private field"),n?n.call(t):e.get(t)),sh=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},hm=(t,e,n,i)=>(G5(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),$Ae=(t,e,n)=>(G5(t,e,"access private method"),n),Go,fm,tg,n_,rf,tC,Zz;class Jz{constructor({root:e,features:n={},featureConfigs:i={},defaultValue:s="",onUpdate:o=a=>{},handleCommonActions:r=(a,l)=>{}}){var u;sh(this,tC),sh(this,Go,void 0),sh(this,fm,void 0),sh(this,tg,void 0),sh(this,n_,!0),sh(this,rf,null);const a=Object.entries({...eAe,...n}).filter(([,d])=>d).map(([d])=>d);hm(this,tg,(typeof e=="string"?document.querySelector(e):e)??document.body),hm(this,Go,aSe.make().config(sAe(a)).config(d=>{d.set(G0,Xs(this,tg)),d.set(j0,s),d.set(eg,{editable:()=>Xs(this,n_)})}).config(d=>{const h=async(f,p)=>await r("handleFileUpload",{ctx:d,files:f,schema:p});d.update(of.key,f=>({...f,uploader:h}))}).config(d=>{const h=d.get(eC);h.markdownUpdated((f,p,m)=>{p!==m&&o(p)}),h.updated((f,p,m)=>{r("editor_updated",f)})}).use(USe).use(Z$e).use(Q$e).use(Wz).use(Xz).use(SAe).use(z$e));const l=(u=i==null?void 0:i["block-edit"])==null?void 0:u.canAddImage;l&&Xs(this,Go).use(Ps(()=>new ts({filterTransaction:d=>d.docChanged?!d.steps.some(f=>{var m,y;let p=!1;return(y=(m=f.slice)==null?void 0:m.content)==null||y.forEach(b=>{var k;b.type.name.includes("image")&&(p=!0),(k=b.content)==null||k.forEach(C=>{C.type.name.includes("image")&&(p=!0)})}),p})||l():!0}))),Xs(this,Go).use(Ps(()=>new ts({props:{handleTextInput(d,h,f,p){const m=d.state.schema.marks.link;if(p!==" "||!m)return!1;const y=d.state.doc.resolve(h),b=/(?:^|\s)((?:https?:\/\/|www\.)\S+)$/.exec(y.parent.textBetween(0,y.parentOffset,void 0,"￼"));if(!b)return!1;const k=b[1].replace(/[.,)]+$/,""),C=h-b[1].length,$=C+k.length;if(d.state.doc.rangeHasMark(C,$,m))return!1;const x=(k.startsWith("http")?"":"https://")+k,M=d.state.tr.insertText(p,h).addMark(C,$,m.create({href:x})).removeStoredMark(m);return d.dispatch(M),!0}},appendTransaction:(d,h,f)=>{const p=f.schema.marks.link,m=f.selection.$cursor;if(!p||!m||!d.some(M=>M.docChanged))return null;const y=M=>M==null?void 0:M.marks.find(P=>P.type===p);if((f.storedMarks??m.marks()).some(M=>M.type===p)&&!y(m.nodeBefore)&&!y(m.nodeAfter))return f.tr.removeStoredMark(p);const C=m.pos;if(C<1||f.doc.textBetween(C-1,C)!==" "||!f.doc.rangeHasMark(C-1,C,p))return null;const $=y(f.doc.resolve(C-1).nodeBefore),x=y(f.doc.resolve(C).nodeAfter);return x&&($==null?void 0:$.attrs.href)===x.attrs.href?null:f.tr.removeMark(C-1,C,p).removeStoredMark(p)}}))),Xs(this,Go).use(Ps(()=>{let d=!1,h=!1;return new ts({view:f=>({update(){var $;const p=f.state.schema.marks.link,m=f.state.selection.$cursor,y=x=>x.type===p,b=!!p&&!!(m!=null&&m.marks().some(y)),k=document.querySelector("milkdown-link-preview"),C=(k==null?void 0:k.style.display)==="none"&&!h;if(b&&!C){k&&h&&(k.style.display=""),h=!1;const x=f.coordsAtPos(($=m.nodeBefore)!=null&&$.marks.some(y)?m.pos-1:m.pos);f.dom.dispatchEvent(new MouseEvent("mousemove",{bubbles:!0,clientX:x.left+1,clientY:(x.top+x.bottom)/2}))}else!b&&d&&(f.dom.dispatchEvent(new MouseEvent("mouseleave",{bubbles:!0})),k&&(k.style.display="none"),h=!0);d=b}})})}));const c=[];a.forEach(d=>{const h=i[d];c.push(tAe(d,Xs(this,Go),h))}),hm(this,fm,Promise.all(c))}async create(){await Xs(this,fm);const e=await Xs(this,Go).create();return $Ae(this,tC,Zz).call(this),e}async destroy(){var e;return(e=Xs(this,rf))==null||e.disconnect(),await Xs(this,fm),Xs(this,Go).destroy()}get editor(){return Xs(this,Go)}setReadonly(e){return hm(this,n_,!e),this}getMarkdown(){return Xs(this,Go).action(fSe())}getEditor(){return Xs(this,Go)}destroyEditor(){this.destroy()}}Go=new WeakMap;fm=new WeakMap;tg=new WeakMap;n_=new WeakMap;rf=new WeakMap;tC=new WeakSet;Zz=function(){const t=Xs(this,tg),e=i=>{parseFloat(i.style.left)<0&&(i.style.left="0px")},n=i=>{const s=t.querySelector(i);s&&(Xs(this,rf).observe(s,{attributes:!0,attributeFilter:["style"]}),setTimeout(()=>e(s),0))};hm(this,rf,new MutationObserver(i=>{const s=i[0];s.type==="childList"?(n("milkdown-link-edit"),n("milkdown-link-preview")):e(s.target)})),Xs(this,rf).observe(t,{childList:!0,subtree:!0})};Jz.Feature=qz;const AAe=Symbol("editorInfoCtxKey"),EAe=ce({name:"MilkdownProvider",setup:(t,{slots:e})=>{const n=J(null),i=J(void 0),s=J(void 0),o=J(!0);return It(AAe,{loading:o,dom:n,editor:s,editorFactory:i}),()=>{var r;return _(ee,null,[(r=e.default)==null?void 0:r.call(e)])}}});var MAe=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Qz=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},nC=(t,e,n)=>(MAe(t,e,"access private method"),n),s_,sC;let TAe=class{constructor({node:e,view:n,getPos:i,decorations:s,innerDecorations:o,options:r}){Qz(this,s_),this.selected=!1,this.selectNode=()=>{var a,l;this.selected=!0,(l=(a=this.options).selectNode)==null||l.call(a)},this.deselectNode=()=>{var a,l;this.selected=!1,(l=(a=this.options).deselectNode)==null||l.call(a)},this.shouldUpdate=a=>!(a.type!==this.node.type||a.sameMarkup(this.node)&&a.content.eq(this.node.content)),this.update=(a,l,c)=>{var u,d;const h=this.options.update;let f;return h&&(f=h(a,l,c)),typeof f!="boolean"&&(f=this.shouldUpdate(a)),this.node=a,this.decorations=l,this.innerDecorations=c,f&&((d=(u=this.options).onUpdate)==null||d.call(u)),f},this.shouldIgnoreMutation=a=>!this.dom||!this.contentDOM||this.node.isLeaf||this.node.isAtom?!0:a.type==="selection"?!1:this.contentDOM===a.target&&a.type==="attributes"?!0:!this.contentDOM.contains(a.target),this.ignoreMutation=a=>{if(!this.dom||!this.contentDOM)return!0;let l;const c=this.options.ignoreMutation;return c&&(l=c(a)),typeof l!="boolean"&&(l=this.shouldIgnoreMutation(a)),l},this.destroy=()=>{var a,l,c;(l=(a=this.options).destroy)==null||l.call(a),this.dom.remove(),(c=this.contentDOM)==null||c.remove()},this.setAttrs=a=>{const{dispatch:l,state:c}=this.view,u=this.getPos();if(typeof u=="number")return l(c.tr.setNodeMarkup(u,void 0,{...this.node.attrs,...a}))},this.node=e,this.view=n,this.getPos=i,this.decorations=s,this.innerDecorations=o,this.options=r,this.dom=this.createDOM(r.as),this.contentDOM=e.isLeaf?null:this.createContentDOM(r.contentAs),this.dom.setAttribute("data-node-view-root","true"),this.contentDOM&&(this.contentDOM.setAttribute("data-node-view-content","true"),this.contentDOM.style.whiteSpace="inherit"),this.setSelection=r.setSelection,this.stopEvent=r.stopEvent}createDOM(e){return nC(this,s_,sC).call(this,e)}createContentDOM(e){return nC(this,s_,sC).call(this,e)}get component(){return this.options.component}};s_=new WeakSet,sC=function(t){const{node:e}=this;return t==null?document.createElement(e.isInline?"span":"div"):t instanceof HTMLElement?t:t instanceof Function?t(e):document.createElement(t)};let PAe=class{constructor(e){this.view=e.view,this.options=e.options}get component(){return this.options.component}get root(){var e,n;let i=(n=(e=this.options).root)==null?void 0:n.call(e,this.view.dom);return i||(i=this.view.dom.parentElement??document.body),i}update(e,n){var i,s;this.view=e,this.prevState=n,(s=(i=this.options).update)==null||s.call(i,e,n)}destroy(){var e,n;(n=(e=this.options).destroy)==null||n.call(e)}};var iC,eH;let IAe=class{constructor({pos:e,spec:n,options:i}){Qz(this,iC),this.pos=e,this.options=i,this.spec=n,this.dom=nC(this,iC,eH).call(this,i.as),this.dom.setAttribute("data-widget-view-root","true")}bind(e,n){this.view=e,this.getPos=n}get component(){return this.options.component}};iC=new WeakSet,eH=function(t){return t instanceof HTMLElement?t:document.createElement(t)};let X5=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");var LAe=Object.defineProperty,OAe=(t,e,n)=>e in t?LAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,nr=(t,e,n)=>(OAe(t,typeof e!="symbol"?e+"":e,n),n);const DAe=Symbol("[ProsemirrorAdapter]nodeViewContext"),RAe=Symbol("[ProsemirrorAdapter]useNodeViewFactory");let VAe=class extends TAe{constructor(){super(...arguments),nr(this,"key",X5()),nr(this,"context",{contentRef:e=>{e&&e instanceof HTMLElement&&this.contentDOM&&e.firstChild!==this.contentDOM&&e.appendChild(this.contentDOM)},view:this.view,getPos:this.getPos,setAttrs:this.setAttrs,node:Hn(this.node),selected:Hn(this.selected),decorations:Hn(this.decorations),innerDecorations:Hn(this.innerDecorations)}),nr(this,"updateContext",()=>{Object.entries({node:this.node,selected:this.selected,decorations:this.decorations,innerDecorations:this.innerDecorations}).forEach(([e,n])=>{const i=this.context[e];i.value!==n&&(i.value=n)})}),nr(this,"render",()=>{const e=this.component;return Si(ce({name:"ProsemirrorNodeView",setup:()=>(It(DAe,this.context),()=>_(Sa,{key:this.key,to:this.dom},{default:()=>[_(e,null,null)]}))}))})}};const FAe=(t,e)=>n=>(i,s,o,r,a)=>{const l=new VAe({node:i,view:s,getPos:o,decorations:r,innerDecorations:a,options:{...n,onUpdate(){var c;(c=n.onUpdate)==null||c.call(n),l.updateContext()},selectNode(){var c;(c=n.selectNode)==null||c.call(n),l.updateContext()},deselectNode(){var c;(c=n.deselectNode)==null||c.call(n),l.updateContext()},destroy(){var c;(c=n.destroy)==null||c.call(n),e(l)}}});return t(l),l},NAe=Symbol("[ProsemirrorAdapter]nodeViewContext"),BAe=Symbol("[ProsemirrorAdapter]usePluginViewFactory");let zAe=class extends PAe{constructor(){super(...arguments),nr(this,"key",X5()),nr(this,"context",{view:Hn(this.view),prevState:Hn(this.prevState)}),nr(this,"updateContext",()=>{Object.entries({view:this.view,prevState:this.prevState}).forEach(([e,n])=>{const i=this.context[e];if(e==="view"){const s=Object.assign(Object.create(Object.getPrototypeOf(n)),n);i.value=s;return}i.value=n})}),nr(this,"render",()=>{const e=this.component;return Si(ce({name:"ProsemirrorNodeView",setup:()=>(It(NAe,this.context),()=>_(Sa,{key:this.key,to:this.root},{default:()=>[_(e,null,null)]}))}))})}};const HAe=(t,e)=>n=>i=>{const s=new zAe({view:i,options:{...n,update:(o,r)=>{var a;(a=n.update)==null||a.call(n,o,r),s.updateContext()},destroy:()=>{var o;(o=n.destroy)==null||o.call(n),e(s)}}});return t(s),s},UAe=()=>{const t=J({}),e=bt(),n=Si({});return Sd(()=>{n.updater=()=>{e==null||e.update()}}),dl(()=>{n.updater=void 0}),{portals:t,renderVueRenderer:i=>{var s;t.value[i.key]=i.render(),(s=n.updater)==null||s.call(n)},removeVueRenderer:i=>{delete t.value[i.key]}}},jAe=Symbol("[ProsemirrorAdapter]widgetViewContext"),WAe=Symbol("[ProsemirrorAdapter]useWidgetViewFactory");let YAe=class extends IAe{constructor(){super(...arguments),nr(this,"key",X5()),nr(this,"context",{view:this.view,getPos:this.getPos,spec:this.spec}),nr(this,"updateContext",()=>{Object.assign(this.context,{view:this.view,getPos:this.getPos,spec:this.spec})}),nr(this,"render",()=>{const e=this.component;return Si(ce({name:"ProsemirrorWidgetView",setup:()=>(It(jAe,this.context),()=>_(Sa,{key:this.key,to:this.dom},{default:()=>[_(e,null,null)]}))}))})}};const qAe=(t,e)=>n=>(i,s={})=>{const o=new YAe({pos:i,options:n}),r={...s,destroy:a=>{var l;(l=s.destroy)==null||l.call(s,a),e(o)}};return o.spec=r,Fs.widget(i,(a,l)=>(o.bind(a,l),o.updateContext(),t(o),o.dom),r)},GAe=ce({name:"ProsemirrorAdapterProvider",setup:(t,{slots:e})=>{const{portals:n,renderVueRenderer:i,removeVueRenderer:s}=UAe(),o=FAe(i,s),r=HAe(i,s),a=qAe(i,s);return It(RAe,o),It(BAe,r),It(WAe,a),()=>{var l;return _(ee,null,[(l=e.default)==null?void 0:l.call(e),Object.values(n.value).map(c=>vt(c))])}}}),XAe={name:"CrepeEditor",emits:["update:modelValue","handleMediaUpload","editorCreated"],props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},autofocus:{type:Boolean,default:!1},mentionQuery:{type:Object,default:()=>({})},autofocus_changed:{type:[Boolean,Number],default:!1},disable_mention:{type:Boolean,default:!1},disable_media:{type:Boolean,default:!1},defaultMentions:{type:Array,default:()=>[]},context:{type:String,default:""},is_modal:{type:Boolean,default:!1},onInlineUpload:{type:Function,default:null},canAddImage:{type:Function,default:null}},components:{MilkdownProvider:EAe,ProsemirrorAdapterProvider:GAe},data(){return{editor:null,currentContent:"",showMentionPop:!1,currentMentionSearch:"",mentionResults:[],justReplaced:!1,searchingMention:!1,hasUnsavedChanges:!1,pendingNavigation:null,activeUploadBlock:null}},watch:{autofocus_changed(t){t&&this.focusOnEditor()},currentContent(){var e;const t=this.context==="feed"||this.context==="comment";this.hasUnsavedChanges=t&&!!((e=this.currentContent)!=null&&e.replace(/&#x20;|\u00A0/gi,"").trim()),this.context==="comment"&&this.is_modal&&(window.fcom_modal_comment_unsaved=this.hasUnsavedChanges)}},methods:{onUnsavedChangesProceeded(){if(this.pendingNavigation){this.hasUnsavedChanges=!1,this.context==="comment"&&this.is_modal&&(window.fcom_modal_comment_unsaved=!1);const t=this.pendingNavigation;this.pendingNavigation=null,setTimeout(()=>t.click(),0)}},clearContent(){this.editor&&(this.editor.action(t=>{const e=t.get(Vn),{state:n}=e,i=n.tr.replaceWith(0,n.doc.content.size,n.schema.nodes.paragraph.create());e.dispatch(i)}),this.currentContent="")},updateContent(t){this.editor.action(e=>{const n=e.get(Vn),{state:i}=n,{from:s}=i.selection,o=t,r=i.tr.insertText(o,s),a=s+o.length,l=r.setSelection(Ot.create(r.doc,a));n.dispatch(l),n.focus()})},initEditor(){const t=this,e=new Jz({root:this.$refs.crepe_editor_vue,defaultValue:this.modelValue,featureConfigs:{placeholder:{text:this.placeholder||this.$t("Type your message here!"),mode:"doc"},"block-edit":{hasImageBlock:!this.disable_media&&!!this.onInlineUpload,canAddImage:this.canAddImage},"image-block":{onUpload:async n=>{if(!this.onInlineUpload)return null;this.activeUploadBlock&&this.activeUploadBlock.classList.add("uploading");try{return await this.onInlineUpload(n)}finally{this.activeUploadBlock&&(this.activeUploadBlock.classList.remove("uploading"),this.activeUploadBlock=null)}},blockUploadButton:()=>this.$t("Upload image"),blockConfirmButton:()=>this.$t("Confirm"),blockUploadPlaceholderText:this.$t("or paste link")},"link-tooltip":{inputPlaceholder:this.$t("Paste link...")}},onUpdate(n){n=n.replace(/!\[[^\]]*\]\(\s*\)/g,""),t.$emit("update:modelValue",n),t.currentContent=n},async handleCommonActions(n,i){if(n==="editor_updated"){if(t.disable_mention)return!1;t.checkforMention(i)}else if(n==="handleFileUpload")return t.disable_media?[]:await t.handleFileUpload(i)}});e.create().then(()=>{this.editor=e.getEditor(),this.focusOnEditor(),this.$emit("editorCreated")})},focusOnEditor(t=null){!t&&!this.autofocus||!this.editor||this.editor.action(e=>{const n=e.get(Vn),{state:i}=n;let s=null;t&&i.doc.descendants((r,a)=>{if(r.isText&&r.text){const l=r.text.lastIndexOf(t);l!==-1&&(s=a+l+t.length+1)}});const o=s!==null?Math.min(s,i.doc.content.size-1):Math.max(1,i.doc.content.size-1);n.dispatch(i.tr.setSelection(Ot.create(i.doc,o))),n.focus()})},checkforMention(t){if(!this.currentContent.includes("@")||this.justReplaced){this.showMentionPop=!1,this.currentMentionSearch="";return}const n=t.get(Vn),{state:i}=n,{selection:s}=i;if(!s)return;const r=i.doc.textBetween(0,s.to," ").match(/@([\p{L}\p{M}\p{N}_.-]+)$/u);if(!r){this.showMentionPop=!1,this.currentMentionSearch="";return}let a=r[1];if(!a||a.length<3){if(this.defaultMentions&&this.defaultMentions.length){let l=a.toLowerCase(),c=this.defaultMentions.filter(u=>u.username.toLowerCase().includes(l)||u.display_name.toLowerCase().includes(l));c.length&&(this.currentMentionSearch=a,this.mentionResults=c,this.showMentionPop=!0)}return}if(this.currentMentionSearch&&(this.currentMentionSearch=a,this.searchingMention))return!1;this.searchingMention=!0,this.currentMentionSearch=a,this.$get("members",{mention:this.currentMentionSearch,...this.mentionQuery}).then(l=>{this.mentionResults=l.members.data,this.showMentionPop=!0}).finally(()=>{this.searchingMention=!1})},addMention(t){if(this.disable_mention)return;const e=new RegExp(`@${this.currentMentionSearch}(?!.*@${this.currentMentionSearch})`);this.currentContent=this.currentContent.replace(e,t+" "),this.editor.action(pSe(this.currentContent)),this.focusOnEditor(t),this.showMentionPop=!1,this.currentMentionSearch="",this.justReplaced=!0,setTimeout(()=>{this.justReplaced=!1},2e3)},async handleFileUpload(t){const e=t.files;for(let n=0;n<e.length;n++){const i=e.item(n);if(i&&i.type.includes("image"))if(this.onInlineUpload){if(this.canAddImage&&!this.canAddImage())continue;await this.insertInlineImage(i)}else this.$emit("handleMediaUpload",i)}return[]},async insertInlineImage(t){try{const e=await this.onInlineUpload(t);if(!e)return;this.editor.action(n=>{const i=n.get(Vn),{state:s}=i,o=s.schema.nodes["image-block"];if(!o)return;const r=o.create({src:e,caption:"",ratio:1}),{$from:a}=s.selection,l=a.after(1),c=s.tr.insert(l,r);i.dispatch(c),i.focus()})}catch{}},handleBeforeUnload(t){this.hasUnsavedChanges&&(t.preventDefault(),t.returnValue="")},handleLinkClick(t){const e=t.target.closest("a");if(!e||!this.hasUnsavedChanges||t.metaKey||t.ctrlKey)return;const n=e.getAttribute("href"),i=this.appVars.portal_url;if(!n)return;const s=n.startsWith(i)||n.startsWith("/"),o=n===window.location.href;s&&!o&&(t.preventDefault(),t.stopPropagation(),this.pendingNavigation=e,this.$eventBus.emit("showUnsavedChangesModal",this.context))},handleImageBlockClick(t){const e=t.target.closest("milkdown-image-block");e&&(this.activeUploadBlock=e,t.target.closest(".confirm")&&!this.canAddImage()&&(t.preventDefault(),t.stopPropagation()))}},mounted(){this.initEditor(),window.addEventListener("beforeunload",this.handleBeforeUnload),document.addEventListener("click",this.handleLinkClick,!0),this.onInlineUpload&&this.$refs.crepe_editor_vue.addEventListener("click",this.handleImageBlockClick,!0),this.$eventBus.on("unsavedChangesProceeded",this.onUnsavedChangesProceeded)},beforeUnmount(){var t;this.editor&&this.editor.destroy(),this.context==="comment"&&this.is_modal&&this.hasUnsavedChanges&&(window.fcom_modal_comment_unsaved=!1),window.removeEventListener("beforeunload",this.handleBeforeUnload),document.removeEventListener("click",this.handleLinkClick,!0),this.onInlineUpload&&((t=this.$refs.crepe_editor_vue)==null||t.removeEventListener("click",this.handleImageBlockClick,!0)),this.$eventBus.off("unsavedChangesProceeded",this.onUnsavedChangesProceeded)}},KAe={style:{position:"relative"},class:"fcom_md_editor"},ZAe={ref:"crepe_editor_vue",class:"crepe-editor feed_md_content fcom_md_seditor_wrapper"},JAe={class:"fcom_mention_pop_wrap"},QAe=g("span",{style:{}},null,-1),eEe={key:0},tEe={key:0},nEe=["onClick"],sEe=["src"],iEe={key:1};function oEe(t,e,n,i,s,o){const r=W("ProsemirrorAdapterProvider"),a=W("MilkdownProvider"),l=No;return v(),A(ee,null,[_(a,null,{default:w(()=>[_(r,null,{default:w(()=>[g("div",KAe,[g("div",ZAe,null,512)])]),_:1})]),_:1}),g("div",JAe,[_(l,{"popper-class":"fcom_mention_pop",ref:"mentionPopoverRef",placement:"bottom",visible:s.showMentionPop,width:300,persistent:!1},{reference:w(()=>[QAe]),default:w(()=>[s.justReplaced?O("",!0):(v(),A("div",eEe,[s.mentionResults.length?(v(),A("ul",tEe,[(v(!0),A(ee,null,Ce(s.mentionResults,c=>(v(),A("li",{key:c.user_id,onClick:u=>o.addMention("@"+c.username)},[c.avatar?(v(),A("img",{key:0,alt:"",src:c.avatar},null,8,sEe)):O("",!0),g("span",null,S(c.display_name)+" (@"+S(c.username)+")",1)],8,nEe))),128))])):s.searchingMention?O("",!0):(v(),A("div",iEe,[g("p",null,S(t.$t("No results found. Please search by username")),1)]))]))]),_:1},8,["visible"])])],64)}const Zc=de(XAe,[["render",oEe]]),rEe={name:"CreateCorseForm",components:{FormBuilder:eF,SpaceGroupSelector:h8,TopicSelector:QV,SlugInput:Rd,ImageUploader:vl,LogoEmojiSelector:I1,ErrorAlerts:L1,CrepeEditor:Zc},emits:["completed","close"],props:{course:{required:!1,default:{title:"",description:"",privacy:"public",course_type:"self_paced",cover_photo:"",parent_id:"",status:"draft",category_ids:[],settings:{emoji:"",custom_lock_screen:"no",shape_svg:"",disable_comments:"no",hide_members_count:"no"}}},savingCount:{required:!1,default:0},parent_id:{required:!1,default:null},disable_redirect:{required:!1,default:!1}},data(){return{saving:!1,privacies:_be,formErrors:[],form:{slug:"",title:"",description:"",privacy:"public",course_type:"self_paced",cover_photo:"",parent_id:"",status:"draft",category_ids:[],settings:{emoji:"",custom_lock_screen:"no",shape_svg:"",course_details:"",course_layout:"classic"}},courseTypes:ybe,dataLoaded:!1,metaSettings:null,fetchingMetaBoxes:!1,appReady:!1,courseInstructors:[],fetchingInstructors:!1}},watch:{savingCount(){this.submit(!1)}},methods:{getValidationErrors(){const t=[];return(!this.form.title||!this.form.title.trim())&&t.push(this.$t("Course title is required.")),(!this.form.description||!this.form.description.trim())&&t.push(this.$t("Short description is required.")),t},validateForm(){return this.formErrors=this.getValidationErrors(),this.formErrors.length===0},submit(t=!1){if(this.form.id){const s=this.getValidationErrors();if(s.length){this.$notify.error(s[0]);return}}else if(!this.validateForm())return;this.saving=!0;let e="admin/courses",n=this.form,i=this.$post;if(this.form.id&&(e+="/"+this.form.id,n={title:this.form.title,privacy:this.form.privacy,course_type:this.form.course_type,description:this.form.description,status:this.form.status,slug:this.form.slug,logo:this.form.logo,cover_photo:this.form.cover_photo,space_id:this.form.id,parent_id:this.form.parent_id,settings:this.form.settings,category_ids:this.form.category_ids},i=this.$put,this.form.created_by&&this.isAdmin()&&(n.created_by=this.form.created_by),this.metaSettings)){let s={};this.each(this.metaSettings,(o,r)=>{s[r]=o.settings}),n.meta_settings=s}i(e,n).then(s=>{if(!this.form.id&&!this.disable_redirect){let o=this.$getRouteLink("admin/manage-courses/edit/"+s.course.id+"/lessons");window.location.href=o,this.form={};return}this.$eventBus.emit("reloadMenu"),this.$notify.success(s.message||this.$t("Course has been created successfully")),this.$emit("completed",s.course),t&&this.$emit("close")}).catch(s=>{this.$handleError(s)}).finally(()=>{this.saving=!1})},searchUsers(t=""){t&&t.length<3||this.fetchCourseInstructors(t)},handlePhotoUpload(t){this.form.cover_photo=t},fetchMetaBoxes(){this.course.id&&(this.fetchingMetaBoxes=!0,this.$get("admin/courses/"+this.course.id+"/meta-settings").then(t=>{this.metaSettings=t.meta_settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetchingMetaBoxes=!1}))},fetchCourseInstructors(t=""){this.fetchingInstructors=!0,this.$get("admin/courses/"+this.course.id+"/instructors/search",{search:t}).then(e=>{this.courseInstructors=e.instructors}).catch(e=>{this.$handleError(e)}).finally(()=>{this.fetchingInstructors=!1})}},mounted(){var e,n,i,s,o;this.course.id?(this.form=this.course,this.form.created_by=parseInt(this.form.created_by),this.fetchMetaBoxes(),this.fetchCourseInstructors()):this.parent_id&&(this.form.parent_id=this.parent_id);const t=(n=(e=this.course)==null?void 0:e.settings)==null?void 0:n.course_type;t&&!((i=this.form)!=null&&i.course_type)&&(this.form.course_type=t),(!((o=(s=this.form)==null?void 0:s.settings)!=null&&o.course_layout)||!this.has_pro)&&(this.form.settings.course_layout="classic"),this.dataLoaded=!0,this.$nextTick(()=>{this.appReady=!0})}},aEe={key:0},lEe={class:"fcom_form_section"},cEe={class:"fcom_help_text"},uEe={class:"fcom_help_text"},dEe={class:"fcom_form_section"},hEe={style:{"font-weight":"bold"}},fEe={key:0},pEe={class:"fcom_help_text"},mEe={style:{"font-weight":"bold"}},gEe={class:"fcom_form_section"},vEe={class:"fcom_lined_checkboxes"},_Ee={class:"fcom_checkbox_with_tooltip"},yEe={key:0},bEe=g("br",null,null,-1),wEe={key:0},kEe={class:"fcom_help_text"},CEe={key:0,class:"fcom_form_section"},xEe={class:"fcom_select_photo",style:{float:"left"}},SEe=["src","alt"],$Ee={style:{float:"right",color:"#8492a6","font-size":"13px"}},AEe={class:"fcom_lined_checkboxes"},EEe={class:"fcom_form_section"},MEe={class:"fcom_help_text"},TEe=["href"],PEe={class:"fcom_image_uploader_wrapper"},IEe={class:"fcom_help_text"},LEe={class:"fcom_space_form_bottom"},OEe=g("span",null,null,-1),DEe={key:0},REe={class:"fcom_form_section fcom_mt_20"},VEe={key:1},FEe=["href"];function NEe(t,e,n,i,s,o){const r=W("logo-emoji-selector"),a=ft,l=en,c=W("SlugInput"),u=W("crepe-editor"),d=W("space-group-selector"),h=Mi,f=xs,p=on,m=Jt,y=Gt,b=W("InfoFilled"),k=be,C=Cs,$=W("topic-selector"),x=Fo,M=W("EditPen"),P=We,T=W("Delete"),I=W("ImageUploader"),L=W("error-alerts"),R=sn,V=W("form-builder"),H=xt("loading");return t.hasFeature("has_course")?(v(),A("div",aEe,[_(R,{onSubmit:e[23]||(e[23]=Ae(F=>t.doNothing(),["prevent"])),modelValue:s.form,"onUpdate:modelValue":e[24]||(e[24]=F=>s.form=F),"label-position":"top","require-asterisk-position":"right"},{default:w(()=>[g("div",lEe,[g("h4",null,S(t.$t("General")),1),_(l,{label:t.$t("Course Title"),required:""},{default:w(()=>[_(a,{type:"text",ref:"titleInput",placeholder:t.$t("Your Course Title"),modelValue:s.form.title,"onUpdate:modelValue":e[1]||(e[1]=F=>s.form.title=F)},{prepend:w(()=>{var F,z;return[s.dataLoaded?(v(),D(r,{key:0,custom_svg:!0,config:{logo:s.form.logo,emoji:(F=s.form.settings)==null?void 0:F.emoji,shape_svg:((z=s.form.settings)==null?void 0:z.shape_svg)||""},onUpdate:e[0]||(e[0]=N=>{s.form.settings.emoji=N.emoji,s.form.logo=N.logo,s.form.settings.shape_svg=N.shape_svg})},null,8,["config"])):O("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),s.dataLoaded?(v(),D(l,{key:0,label:t.$t("Slug (optional)")},{default:w(()=>[_(c,{popMessage:t.$t("The URLs of this course lessons will be changed to the new slug. If you have lots of lessons and sections in this course, you should not change it. Are you sure you want to change it?"),is_inital_inactive:!!s.form.id,modelValue:s.form.slug,"onUpdate:modelValue":e[2]||(e[2]=F=>s.form.slug=F),description:t.$t("No spaces or special characters allowed. Only letters, numbers, hyphens, and underscores."),placeholder:t.$t("Course Slug (no spaces or special characters)")},null,8,["popMessage","is_inital_inactive","modelValue","description","placeholder"])]),_:1},8,["label"])):O("",!0),_(l,{label:t.$t("Short Description"),required:""},{default:w(()=>[_(a,{type:"textarea",placeholder:t.$t("Course Description"),modelValue:s.form.description,"onUpdate:modelValue":e[3]||(e[3]=F=>s.form.description=F)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),_(l,{class:"form_label_with_tooltip",label:t.$t("Course Details")},{default:w(()=>[s.appReady?(v(),D(u,{key:0,modelValue:s.form.settings.course_details,"onUpdate:modelValue":e[4]||(e[4]=F=>s.form.settings.course_details=F),autofocus:!1,placeholder:t.$t("Add any additional information or notes about this course here"),disable_media:!0},null,8,["modelValue","placeholder"])):O("",!0),g("div",cEe,[g("p",null,S(t.$t("This section will be displayed on the course landing page. Add extra details, notes, or instructions to help learners understand the course better.")),1)])]),_:1},8,["label"]),_(l,{label:t.$t("Menu Group")},{default:w(()=>[s.dataLoaded?(v(),D(d,{key:0,modelValue:s.form.parent_id,"onUpdate:modelValue":e[5]||(e[5]=F=>s.form.parent_id=F),space_id:s.form.id},null,8,["modelValue","space_id"])):O("",!0),g("div",uEe,[g("p",null,S(t.$t("Select a menu group to where this course will be added to the sidebar. If you do not select a menu group, it will be available on the all courses page.")),1)])]),_:1},8,["label"]),_(l,{label:t.$t("Status")},{default:w(()=>[_(f,{modelValue:s.form.status,"onUpdate:modelValue":e[6]||(e[6]=F=>s.form.status=F),class:"fcom_radio_group"},{default:w(()=>[_(h,{value:"published"},{default:w(()=>[B(S(t.$t("Published")),1)]),_:1}),_(h,{value:"draft"},{default:w(()=>[B(S(t.$t("Draft")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])]),g("div",dEe,[g("h4",null,S(t.$t("Access Control")),1),_(l,{label:t.$t("Privacy")},{default:w(()=>[_(m,{"popper-class":"rich_select",modelValue:s.form.privacy,"onUpdate:modelValue":e[7]||(e[7]=F=>s.form.privacy=F),placeholder:t.$t("Select Privacy")},{default:w(()=>[(v(!0),A(ee,null,Ce(s.privacies,(F,z)=>(v(),D(p,{key:z,label:F.label,value:z},{default:w(()=>[g("span",hEe,S(F.label),1),g("p",null,S(F.description),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),s.form.privacy=="private"?(v(),A(ee,{key:0},[_(l,{label:t.$t("Lock Screen Type")},{default:w(()=>[_(f,{modelValue:s.form.settings.custom_lock_screen,"onUpdate:modelValue":e[8]||(e[8]=F=>s.form.settings.custom_lock_screen=F),class:"fcom_radio_group"},{default:w(()=>[_(h,{value:"yes"},{default:w(()=>[B(S(t.$t("Custom")),1)]),_:1}),_(h,{value:"no"},{default:w(()=>[B(S(t.$t("Default")),1)]),_:1}),_(h,{disabled:!t.has_pro,value:"redirect"},{default:w(()=>[B(S(t.$t("Redirect to an URL"))+" ",1),t.has_pro?O("",!0):(v(),A("span",fEe,"("+S(t.$t("Pro Required"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),s.form.settings.custom_lock_screen=="redirect"&&t.has_pro?(v(),D(l,{key:0,label:t.$t("Provide the Redirect URL")},{default:w(()=>[_(a,{modelValue:s.form.settings.onboard_redirect_url,"onUpdate:modelValue":e[9]||(e[9]=F=>s.form.settings.onboard_redirect_url=F),type:"text",placeholder:t.$t("Redirect URL for unenrolled users")},null,8,["modelValue","placeholder"]),g("div",pEe,[g("p",null,S(t.$t("This link will be used to redirect the unenrolled or public users. This may be your sales page for this course")),1)])]),_:1},8,["label"])):O("",!0),s.form.settings.custom_lock_screen=="no"?(v(),D(l,{key:1,style:{"margin-bottom":"0"}},{default:w(()=>[_(y,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.show_paywalls,"onUpdate:modelValue":e[10]||(e[10]=F=>s.form.settings.show_paywalls=F),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Show Paywalls in the default lock screen")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0),s.form.settings.custom_lock_screen=="no"?(v(),D(l,{key:2},{default:w(()=>[_(y,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.show_welcome_banner,"onUpdate:modelValue":e[11]||(e[11]=F=>s.form.settings.show_welcome_banner=F),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Show Welcome Banner in the default lock screen")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0)],64)):O("",!0),_(l,{label:t.$t("Enrollment Type")},{default:w(()=>[_(m,{"popper-class":"rich_select",modelValue:s.form.course_type,"onUpdate:modelValue":e[12]||(e[12]=F=>s.form.course_type=F),placeholder:t.$t("Select Type")},{default:w(()=>[(v(!0),A(ee,null,Ce(s.courseTypes,(F,z)=>(v(),D(p,{key:z,label:F.label,value:z},{default:w(()=>[g("span",mEe,S(F.label),1),g("p",null,S(F.description),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),g("div",gEe,[g("h4",null,S(t.$t("Features Customizations")),1),_(l,null,{default:w(()=>[g("div",vEe,[s.form.privacy=="public"&&s.form.course_type=="self_paced"?(v(),D(y,{key:0,"true-value":"yes","false-value":"no",modelValue:s.form.settings.public_lesson_view,"onUpdate:modelValue":e[13]||(e[13]=F=>s.form.settings.public_lesson_view=F),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Public users can view the lessons without enrolling in the course")),1)]),_:1},8,["modelValue"])):O("",!0),_(y,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.disable_comments,"onUpdate:modelValue":e[14]||(e[14]=F=>s.form.settings.disable_comments=F),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Disable comments for all the lessons for this course")),1)]),_:1},8,["modelValue"]),_(y,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.hide_members_count,"onUpdate:modelValue":e[15]||(e[15]=F=>s.form.settings.hide_members_count=F),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Hide students count from courses page")),1)]),_:1},8,["modelValue"]),g("div",_Ee,[_(y,{disabled:!t.has_pro,"true-value":"yes","false-value":"no","model-value":t.has_pro?s.form.settings.sequential_lesson_order:"no","onUpdate:modelValue":e[16]||(e[16]=F=>{s.form.settings.sequential_lesson_order=F}),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Lesson order enforcement"))+" ",1),t.has_pro?O("",!0):(v(),A("span",yEe,"("+S(t.$t("Pro Required"))+")",1))]),_:1},8,["disabled","model-value"]),_(C,{class:"box-item fcom_checkbox_tooltip",effect:"dark",placement:"right-end"},{content:w(()=>[B(S(t.$t("Your members will have to complete each lesson")),1),bEe,B(" "+S(t.$t("in order before moving onto the next one.")),1)]),default:w(()=>[_(k,null,{default:w(()=>[_(b)]),_:1})]),_:1})])])]),_:1}),_(l,{label:t.$t("Course Layout")},{default:w(()=>[_(f,{modelValue:s.form.settings.course_layout,"onUpdate:modelValue":e[17]||(e[17]=F=>s.form.settings.course_layout=F),class:"fcom_radio_group"},{default:w(()=>[_(h,{value:"classic"},{default:w(()=>[B(S(t.$t("Classic")),1)]),_:1}),_(h,{disabled:!t.has_pro,value:"modern"},{default:w(()=>[B(S(t.$t("Modern"))+" ",1),t.has_pro?O("",!0):(v(),A("span",wEe,"("+S(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",kEe,[g("p",null,S(t.$t("Classic is the default layout. For a more visual and engaging experience, the Modern layout displays the featured image or embedded video thumbnail.")),1)])]),_:1},8,["label"])]),s.form.id?(v(),A("div",CEe,[g("h4",null,S(t.$t("Course Instructor")),1),_(l,{label:t.$t("Instructor")},{default:w(()=>[_(m,{disabled:!t.isAdmin(),class:"rich_select","fit-input-width":"",filterable:"",remote:"",loading:s.fetchingInstructors,"remote-method":o.searchUsers,placeholder:t.$t("Select User"),modelValue:s.form.created_by,"onUpdate:modelValue":e[18]||(e[18]=F=>s.form.created_by=F)},{default:w(()=>[(v(!0),A(ee,null,Ce(s.courseInstructors,F=>(v(),D(p,{class:"fcom_with_photo_option",key:F.ID,label:F.display_name+" ("+(F.user_email||F.ID)+")",value:F.ID},{default:w(()=>[g("span",xEe,[g("img",{src:F.photo,alt:F.display_name},null,8,SEe),g("span",null,S(F.display_name),1)]),g("span",$Ee,S(F.user_email||F.ID),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["disabled","loading","remote-method","placeholder","modelValue"])]),_:1},8,["label"]),_(l,null,{default:w(()=>[g("div",AEe,[_(y,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.hide_instructor_view,"onUpdate:modelValue":e[19]||(e[19]=F=>s.form.settings.hide_instructor_view=F),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Hide course instructor view from course overview page")),1)]),_:1},8,["modelValue"]),s.form.settings.hide_instructor_view!="yes"?(v(),D(y,{key:0,"true-value":"yes","false-value":"no",modelValue:s.form.settings.show_instructor_students_count,"onUpdate:modelValue":e[20]||(e[20]=F=>s.form.settings.show_instructor_students_count=F),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Show students count in course instructor view")),1)]),_:1},8,["modelValue"])):O("",!0)])]),_:1})])):O("",!0),g("div",EEe,[g("h4",null,S(t.$t("Others")),1),t.has_pro&&s.dataLoaded?(v(),D(l,{key:0,label:t.$t("Topic navigation")},{default:w(()=>[_($,{modelValue:s.form.category_ids,"onUpdate:modelValue":e[21]||(e[21]=F=>s.form.category_ids=F),creatable:!0},null,8,["modelValue"]),g("div",MEe,[g("p",null,S(t.$t("Categorize your course and allow members to filter courses with the topic navigation bar in the courses directory. You can define up to 20 topics per course.")),1),g("p",null,[t.isAdmin()?(v(),A("a",{key:0,target:"_blank",rel:"noopener",href:t.$getRouteLink("admin/settings/topics-settings")},S(t.$t("Manage all topics")),9,TEe)):O("",!0)])])]),_:1},8,["label"])):O("",!0),_(l,{label:t.$t("Thumbnail / Open Graph Image (Recommended Size: 1200 x 630)")},{default:w(()=>[s.form.cover_photo?(v(),D(x,{key:0,alt:t.$t("Cover Photo"),src:s.form.cover_photo,style:{"max-width":"100px",height:"auto"}},null,8,["alt","src"])):O("",!0),g("div",PEe,[_(I,{isTextBtn:!1,can_remove:!!s.form.cover_photo,additionalData:{resize:!1,disable_convert:"yes",max_width:1200,max_height:630},onUploaded:o.handlePhotoUpload},cs({remove:w(()=>[_(k,null,{default:w(()=>[_(T)]),_:1})]),_:2},[s.form.cover_photo?{name:"trigger",fn:w(()=>[_(P,{class:"fcom_plain_button"},{default:w(()=>[_(k,null,{default:w(()=>[_(M)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove","onUploaded"])]),g("div",IEe,[g("p",null,S(t.$t("Will be used on course card preview and social sharing preview.")),1)])]),_:1},8,["label"]),_(L,{errors:s.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),s.form.id?O("",!0):(v(),D(l,{key:1,style:{"margin-top":"45px"}},{default:w(()=>[g("div",LEe,[OEe,_(P,{class:"fcom_primary_button",disabled:s.saving,onClick:e[22]||(e[22]=F=>o.submit()),loading:s.saving},{default:w(()=>[g("span",null,S(t.$t("Create")),1)]),_:1},8,["disabled","loading"])])]),_:1}))])]),_:1},8,["modelValue"]),De((v(),A("div",null,[s.metaSettings&&Object.keys(s.metaSettings).length>0?(v(),A("div",DEe,[(v(!0),A(ee,null,Ce(s.metaSettings,F=>(v(),A("div",REe,[g("h4",null,S(F.section_title),1),_(V,{formData:F.settings,formFields:F.fields,disableSubmit:!0},null,8,["formData","formFields"])]))),256))])):O("",!0)])),[[H,s.fetchingMetaBoxes]])])):(v(),A("div",VEe,[g("p",null,S(t.$t("Course Module is disabled. Please enable the course module first")),1),g("a",{class:"el-button el-button--default fcom_primary_button fcom_mt_10",href:t.$getRouteLink("admin/settings/features")},S(t.$t("Go to features settings")),9,FEe)]))}const K5=de(rEe,[["render",NEe]]),BEe={name:"SpaceIcon",props:["space_profile"]},zEe=["alt","src"],HEe={key:1,class:"fcom_emoji"},UEe={key:2,class:"fcom_shape"},jEe={key:3,class:"fcom_no_avatar"};function WEe(t,e,n,i,s,o){var a,l,c,u;const r=be;return n.space_profile.logo?(v(),A("img",{key:0,alt:t.$t("Space Logo"),src:n.space_profile.logo},null,8,zEe)):(a=n.space_profile.settings)!=null&&a.emoji?(v(),A("span",HEe,S((l=n.space_profile.settings)==null?void 0:l.emoji),1)):(c=n.space_profile.settings)!=null&&c.shape_svg?(v(),A("span",UEe,[_(r,{innerHTML:(u=n.space_profile.settings)==null?void 0:u.shape_svg},null,8,["innerHTML"])])):(v(),A("span",jEe))}const hp=de(BEe,[["render",WEe]]),YEe={name:"SpaceCourseSelector",components:{SpaceIcon:hp},emits:["update:modelValue","selectedType","selectedSlug"],props:{modelValue:{type:[String,Number,Array],default:""},placeholder_text:{type:String,default:""},is_multiple:{type:Boolean,default:!1},memberships:{type:Array,default:[]}},data(){return{all_spaces:[],selected_spaces:"",loading:!1,formattedSpaceGroups:[],app_ready:!1}},watch:{selected_spaces(t){this.is_multiple?this.$emit("update:modelValue",Array.isArray(t)?t:[]):this.$emit("update:modelValue",t||"")}},methods:{isMemberOfSpace(t){return this.memberships&&this.memberships.includes(t.toString())},fetch(){this.loading=!0,this.$get("admin/all_space_courses").then(t=>{this.all_spaces=t.all_spaces,this.formatSpaceGroups()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},emitChanges(){this.$emit("update:modelValue",this.selected_spaces||"");const t=Array.isArray(this.selected_spaces)&&this.selected_spaces.length?this.selected_spaces[0]:this.selected_spaces,e=this.all_spaces.find(n=>n.id==t);this.$emit("selectedSlug",(e==null?void 0:e.slug)||""),this.$emit("selectedType",(e==null?void 0:e.type)=="course"?"course":"space")},formatSpaceGroups(){if(this.all_spaces.length==0)return;let t=this.all_spaces,e=this.appVars.space_groups,n=[],i=[];this.each(e,o=>{let r=t.filter(a=>{let l=a.parent_id==o.id;return l&&i.push(a.slug),l});r.length&&n.push({label:o.title,spaces:r})});let s=t.filter(o=>o.parent_id===null);s&&s.length&&n.push({label:this.$t("Uncategorized"),spaces:s}),this.formattedSpaceGroups=n}},mounted(){this.is_multiple?this.selected_spaces=Array.isArray(this.modelValue)?this.modelValue:[]:this.selected_spaces=this.modelValue||"",this.fetch(),this.app_ready=!0}},qEe={key:0,class:"fcom_space_title"},GEe={key:0},XEe={key:1};function KEe(t,e,n,i,s,o){const r=W("SpaceIcon"),a=on,l=Mb,c=Jt,u=xt("loading");return s.app_ready?(v(),D(c,{key:0,onChange:o.emitChanges,modelValue:s.selected_spaces,"onUpdate:modelValue":e[0]||(e[0]=d=>s.selected_spaces=d),filterable:"",multiple:n.is_multiple,placeholder:n.placeholder_text,style:{width:"100%"}},{default:w(()=>[(v(!0),A(ee,null,Ce(s.formattedSpaceGroups,d=>De((v(),D(l,{key:d.label,label:d.label},{default:w(()=>[(v(!0),A(ee,null,Ce(d.spaces,h=>(v(),D(a,{key:h.slug,label:h.title,disabled:o.isMemberOfSpace(h.id),value:h.id.toString()},{default:w(()=>[h.id?(v(),A("span",qEe,[_(r,{space_profile:h},null,8,["space_profile"]),g("span",null,[B(S(t.getExcerpt(h.title,50))+" ",1),h.type=="course"?(v(),A("span",GEe," ("+S(t.$t("course"))+")",1)):O("",!0)])])):(v(),A("span",XEe,S(t.getExcerpt(h.title,50)),1))]),_:2},1032,["label","disabled","value"]))),128))]),_:2},1032,["label"])),[[u,s.loading]])),128))]),_:1},8,["onChange","modelValue","multiple","placeholder"])):O("",!0)}const Z5=de(YEe,[["render",KEe]]),ZEe={name:"SidebarLinkForm",components:{SpaceGroupSelector:h8,LogoEmojiSelector:I1,SpaceCourseSelector:Z5,ErrorAlerts:L1},emits:["completed"],data(){return{saving:!1,formErrors:[],form:{title:"",privacy:"public",parent_id:"",settings:{permalink:"",new_tab:"yes",emoji:"🔗",shape_svg:"",memberships:[]}},dataLoaded:!1}},props:{link:{type:Object,default:()=>({})},parent_id:{type:[Number,String],default:null}},methods:{validateForm(){return this.formErrors=[],(!this.form.title||!this.form.title.trim())&&this.formErrors.push(this.$t("Link title is required.")),(!this.form.settings.permalink||!this.form.settings.permalink.trim())&&this.formErrors.push(this.$t("URL cannot be empty.")),this.formErrors.length===0},saveSettings(){this.validateForm()&&(this.saving=!0,this.$post("admin/links",{link:this.form}).then(t=>{this.$eventBus.emit("reloadMenu"),this.$emit("completed",t.link),this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1}))}},mounted(){this.link&&this.link.id?this.form=this.link:this.parent_id?this.form.parent_id=this.parent_id:this.$route.query.parent_id&&(this.form.parent_id=this.$route.query.parent_id),this.dataLoaded=!0}},JEe={class:"fcom_form_section"},QEe={class:"fcom_help_text"},eMe={class:"fcom_help_text"},tMe={class:"fcom_help_text"},nMe={key:0},sMe={key:1};function iMe(t,e,n,i,s,o){const r=W("logo-emoji-selector"),a=ft,l=en,c=Gt,u=W("space-group-selector"),d=Mi,h=xs,f=W("SpaceCourseSelector"),p=W("error-alerts"),m=We,y=sn,b=xt("loading");return v(),D(y,{onSubmit:e[8]||(e[8]=Ae(k=>t.doNothing(),["prevent"])),modelValue:s.form,"onUpdate:modelValue":e[9]||(e[9]=k=>s.form=k),"label-position":"top","require-asterisk-position":"right",class:"fcom_space_form"},{default:w(()=>[g("div",JEe,[_(l,{label:t.$t("Link Title"),required:""},{default:w(()=>[_(a,{type:"text",placeholder:t.$t("Your Link Title"),modelValue:s.form.title,"onUpdate:modelValue":e[1]||(e[1]=k=>s.form.title=k)},{prepend:w(()=>{var k,C;return[s.dataLoaded?(v(),D(r,{key:0,custom_svg:!0,onUpdate:e[0]||(e[0]=$=>{s.form.settings.emoji=$.emoji,s.form.logo=$.logo,s.form.settings.shape_svg=$.shape_svg}),config:{logo:s.form.logo,emoji:((k=s.form.settings)==null?void 0:k.emoji)||"",shape_svg:((C=s.form.settings)==null?void 0:C.shape_svg)||""}},null,8,["config"])):O("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),_(l,{label:t.$t("Permalink"),required:""},{default:w(()=>[_(a,{placeholder:t.$t("URL of the link"),modelValue:s.form.settings.permalink,"onUpdate:modelValue":e[2]||(e[2]=k=>s.form.settings.permalink=k)},null,8,["placeholder","modelValue"]),g("div",QEe,[_(c,{modelValue:s.form.settings.new_tab,"onUpdate:modelValue":e[3]||(e[3]=k=>s.form.settings.new_tab=k),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Open this link in new tab")),1)]),_:1},8,["modelValue"])])]),_:1},8,["label"]),_(l,{label:t.$t("Menu Group")},{default:w(()=>[s.dataLoaded?(v(),D(u,{key:0,modelValue:s.form.parent_id,"onUpdate:modelValue":e[4]||(e[4]=k=>s.form.parent_id=k),space_id:s.form.id},null,8,["modelValue","space_id"])):O("",!0),g("div",eMe,[g("p",null,S(t.$t("Select a menu group to where this link will be added to the sidebar.")),1)])]),_:1},8,["label"]),_(l,{label:t.$t("Visibility")},{default:w(()=>[_(h,{modelValue:s.form.privacy,"onUpdate:modelValue":e[5]||(e[5]=k=>s.form.privacy=k)},{default:w(()=>[_(d,{label:t.$t("Everyone"),value:"public"},null,8,["label"]),_(d,{label:t.$t("Logged-in users only"),value:"logged_in"},null,8,["label"]),_(d,{label:t.$t("By Space/Course Memberships"),value:"members_only"},null,8,["label"])]),_:1},8,["modelValue"]),g("div",tMe,[g("p",null,S(t.$t("Select who can see this link.")),1)])]),_:1},8,["label"]),s.form.privacy=="members_only"?(v(),D(l,{key:0,label:t.$t("Select Space/Course Memberships")},{default:w(()=>[_(f,{modelValue:s.form.settings.membership_ids,"onUpdate:modelValue":e[6]||(e[6]=k=>s.form.settings.membership_ids=k),placeholder_text:t.$t("Select Memberships"),is_multiple:!0},null,8,["modelValue","placeholder_text"])]),_:1},8,["label"])):O("",!0),_(p,{errors:s.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),_(l,{style:{"margin-top":"45px"}},{default:w(()=>[De((v(),D(m,{class:"fcom_primary_button",disabled:s.saving,onClick:e[7]||(e[7]=k=>o.saveSettings())},{default:w(()=>[s.form.id?(v(),A("span",nMe,S(t.$t("Update")),1)):(v(),A("span",sMe,S(t.$t("Create Link")),1))]),_:1},8,["disabled"])),[[b,s.saving]])]),_:1})])]),_:1},8,["modelValue"])}const tH=de(ZEe,[["render",iMe]]);/*! Element Plus Icons Vue v2.3.1 */var oMe=ce({name:"ArrowDownBold",__name:"arrow-down-bold",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M104.704 338.752a64 64 0 0 1 90.496 0l316.8 316.8 316.8-316.8a64 64 0 0 1 90.496 90.496L557.248 791.296a64 64 0 0 1-90.496 0L104.704 429.248a64 64 0 0 1 0-90.496z"})]))}}),rMe=oMe,aMe=ce({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})]))}}),lMe=aMe,cMe=ce({name:"ArrowLeftBold",__name:"arrow-left-bold",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M685.248 104.704a64 64 0 0 1 0 90.496L368.448 512l316.8 316.8a64 64 0 0 1-90.496 90.496L232.704 557.248a64 64 0 0 1 0-90.496l362.048-362.048a64 64 0 0 1 90.496 0z"})]))}}),uMe=cMe,dMe=ce({name:"ArrowLeft",__name:"arrow-left",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"})]))}}),hMe=dMe,fMe=ce({name:"ArrowRight",__name:"arrow-right",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),pMe=fMe,mMe=ce({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m488.832 344.32-339.84 356.672a32 32 0 0 0 0 44.16l.384.384a29.44 29.44 0 0 0 42.688 0l320-335.872 319.872 335.872a29.44 29.44 0 0 0 42.688 0l.384-.384a32 32 0 0 0 0-44.16L535.168 344.32a32 32 0 0 0-46.336 0"})]))}}),gMe=mMe,vMe=ce({name:"Avatar",__name:"avatar",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M628.736 528.896A416 416 0 0 1 928 928H96a415.872 415.872 0 0 1 299.264-399.104L512 704zM720 304a208 208 0 1 1-416 0 208 208 0 0 1 416 0"})]))}}),_Me=vMe,yMe=ce({name:"Back",__name:"back",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M224 480h640a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64"}),g("path",{fill:"currentColor",d:"m237.248 512 265.408 265.344a32 32 0 0 1-45.312 45.312l-288-288a32 32 0 0 1 0-45.312l288-288a32 32 0 1 1 45.312 45.312z"})]))}}),nH=yMe,bMe=ce({name:"Bell",__name:"bell",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a64 64 0 0 1 64 64v64H448v-64a64 64 0 0 1 64-64"}),g("path",{fill:"currentColor",d:"M256 768h512V448a256 256 0 1 0-512 0zm256-640a320 320 0 0 1 320 320v384H192V448a320 320 0 0 1 320-320"}),g("path",{fill:"currentColor",d:"M96 768h832q32 0 32 32t-32 32H96q-32 0-32-32t32-32m352 128h128a64 64 0 0 1-128 0"})]))}}),wMe=bMe,kMe=ce({name:"Bottom",__name:"bottom",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M544 805.888V168a32 32 0 1 0-64 0v637.888L246.656 557.952a30.72 30.72 0 0 0-45.312 0 35.52 35.52 0 0 0 0 48.064l288 306.048a30.72 30.72 0 0 0 45.312 0l288-306.048a35.52 35.52 0 0 0 0-48 30.72 30.72 0 0 0-45.312 0L544 805.824z"})]))}}),CMe=kMe,xMe=ce({name:"CameraFilled",__name:"camera-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M160 224a64 64 0 0 0-64 64v512a64 64 0 0 0 64 64h704a64 64 0 0 0 64-64V288a64 64 0 0 0-64-64H748.416l-46.464-92.672A64 64 0 0 0 644.736 96H379.328a64 64 0 0 0-57.216 35.392L275.776 224zm352 435.2a115.2 115.2 0 1 0 0-230.4 115.2 115.2 0 0 0 0 230.4m0 140.8a256 256 0 1 1 0-512 256 256 0 0 1 0 512"})]))}}),SMe=xMe,$Me=ce({name:"CaretBottom",__name:"caret-bottom",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m192 384 320 384 320-384z"})]))}}),AMe=$Me,EMe=ce({name:"ChatDotRound",__name:"chat-dot-round",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m174.72 855.68 135.296-45.12 23.68 11.84C388.096 849.536 448.576 864 512 864c211.84 0 384-166.784 384-352S723.84 160 512 160 128 326.784 128 512c0 69.12 24.96 139.264 70.848 199.232l22.08 28.8-46.272 115.584zm-45.248 82.56A32 32 0 0 1 89.6 896l58.368-145.92C94.72 680.32 64 596.864 64 512 64 299.904 256 96 512 96s448 203.904 448 416-192 416-448 416a461.056 461.056 0 0 1-206.912-48.384l-175.616 58.56z"}),g("path",{fill:"currentColor",d:"M512 563.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4m-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4"})]))}}),MMe=EMe,TMe=ce({name:"ChatDotSquare",__name:"chat-dot-square",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M273.536 736H800a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H224a64 64 0 0 0-64 64v570.88zM296 800 147.968 918.4A32 32 0 0 1 96 893.44V256a128 128 0 0 1 128-128h576a128 128 0 0 1 128 128v416a128 128 0 0 1-128 128z"}),g("path",{fill:"currentColor",d:"M512 499.2a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4zm192 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4zm-384 0a51.2 51.2 0 1 1 0-102.4 51.2 51.2 0 0 1 0 102.4z"})]))}}),PMe=TMe,IMe=ce({name:"Check",__name:"check",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M406.656 706.944 195.84 496.256a32 32 0 1 0-45.248 45.248l256 256 512-512a32 32 0 0 0-45.248-45.248L406.592 706.944z"})]))}}),LMe=IMe,OMe=ce({name:"CloseBold",__name:"close-bold",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z"})]))}}),sH=OMe,DMe=ce({name:"Close",__name:"close",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"})]))}}),iH=DMe,RMe=ce({name:"Comment",__name:"comment",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M736 504a56 56 0 1 1 0-112 56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112 56 56 0 0 1 0 112m-224 0a56 56 0 1 1 0-112 56 56 0 0 1 0 112M128 128v640h192v160l224-160h352V128z"})]))}}),VMe=RMe,FMe=ce({name:"CopyDocument",__name:"copy-document",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M768 832a128 128 0 0 1-128 128H192A128 128 0 0 1 64 832V384a128 128 0 0 1 128-128v64a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64z"}),g("path",{fill:"currentColor",d:"M384 128a64 64 0 0 0-64 64v448a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V192a64 64 0 0 0-64-64zm0-64h448a128 128 0 0 1 128 128v448a128 128 0 0 1-128 128H384a128 128 0 0 1-128-128V192A128 128 0 0 1 384 64"})]))}}),oH=FMe,NMe=ce({name:"DeleteFilled",__name:"delete-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M352 192V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64H96a32 32 0 0 1 0-64zm64 0h192v-64H416zM192 960a32 32 0 0 1-32-32V256h704v672a32 32 0 0 1-32 32zm224-192a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32m192 0a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32"})]))}}),BMe=NMe,zMe=ce({name:"Delete",__name:"delete",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32zm448-64v-64H416v64zM224 896h576V256H224zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32m192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32"})]))}}),J5=zMe,HMe=ce({name:"Document",__name:"document",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M832 384H576V128H192v768h640zm-26.496-64L640 154.496V320zM160 64h480l256 256v608a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h160v64H320zm0 384h384v64H320z"})]))}}),h2=HMe,UMe=ce({name:"Download",__name:"download",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),jMe=UMe,WMe=ce({name:"EditPen",__name:"edit-pen",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696zM455.04 229.248l193.92 112 56.704-98.112-193.984-112-56.64 98.112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64h-448z"})]))}}),rH=WMe,YMe=ce({name:"Edit",__name:"edit",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M832 512a32 32 0 1 1 64 0v352a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V160a32 32 0 0 1 32-32h352a32 32 0 0 1 0 64H192v640h640z"}),g("path",{fill:"currentColor",d:"m469.952 554.24 52.8-7.552L847.104 222.4a32 32 0 1 0-45.248-45.248L477.44 501.44l-7.552 52.8zm422.4-422.4a96 96 0 0 1 0 135.808l-331.84 331.84a32 32 0 0 1-18.112 9.088L436.8 623.68a32 32 0 0 1-36.224-36.224l15.104-105.6a32 32 0 0 1 9.024-18.112l331.904-331.84a96 96 0 0 1 135.744 0z"})]))}}),qMe=YMe,GMe=ce({name:"Expand",__name:"expand",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M128 192h768v128H128zm0 256h512v128H128zm0 256h768v128H128zm576-352 192 160-192 128z"})]))}}),XMe=GMe,KMe=ce({name:"FullScreen",__name:"full-screen",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"})]))}}),ZMe=KMe,JMe=ce({name:"Guide",__name:"guide",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M640 608h-64V416h64zm0 160v160a32 32 0 0 1-32 32H416a32 32 0 0 1-32-32V768h64v128h128V768zM384 608V416h64v192zm256-352h-64V128H448v128h-64V96a32 32 0 0 1 32-32h192a32 32 0 0 1 32 32z"}),g("path",{fill:"currentColor",d:"m220.8 256-71.232 80 71.168 80H768V256H220.8zm-14.4-64H800a32 32 0 0 1 32 32v224a32 32 0 0 1-32 32H206.4a32 32 0 0 1-23.936-10.752l-99.584-112a32 32 0 0 1 0-42.496l99.584-112A32 32 0 0 1 206.4 192m678.784 496-71.104 80H266.816V608h547.2l71.168 80zm-56.768-144H234.88a32 32 0 0 0-32 32v224a32 32 0 0 0 32 32h593.6a32 32 0 0 0 23.936-10.752l99.584-112a32 32 0 0 0 0-42.496l-99.584-112A32 32 0 0 0 828.48 544z"})]))}}),QMe=JMe,eTe=ce({name:"Hide",__name:"hide",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"}),g("path",{fill:"currentColor",d:"M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"})]))}}),tTe=eTe,nTe=ce({name:"Histogram",__name:"histogram",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M416 896V128h192v768zm-288 0V448h192v448zm576 0V320h192v576z"})]))}}),sTe=nTe,iTe=ce({name:"HomeFilled",__name:"home-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 128 128 447.936V896h255.936V640H640v256h255.936V447.936z"})]))}}),oTe=iTe,rTe=ce({name:"InfoFilled",__name:"info-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"})]))}}),fp=rTe,aTe=ce({name:"Iphone",__name:"iphone",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M224 768v96.064a64 64 0 0 0 64 64h448a64 64 0 0 0 64-64V768zm0-64h576V160a64 64 0 0 0-64-64H288a64 64 0 0 0-64 64zm32 288a96 96 0 0 1-96-96V128a96 96 0 0 1 96-96h512a96 96 0 0 1 96 96v768a96 96 0 0 1-96 96zm304-144a48 48 0 1 1-96 0 48 48 0 0 1 96 0"})]))}}),lTe=aTe,cTe=ce({name:"Link",__name:"link",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M715.648 625.152 670.4 579.904l90.496-90.56c75.008-74.944 85.12-186.368 22.656-248.896-62.528-62.464-173.952-52.352-248.96 22.656L444.16 353.6l-45.248-45.248 90.496-90.496c100.032-99.968 251.968-110.08 339.456-22.656 87.488 87.488 77.312 239.424-22.656 339.456l-90.496 90.496zm-90.496 90.496-90.496 90.496C434.624 906.112 282.688 916.224 195.2 828.8c-87.488-87.488-77.312-239.424 22.656-339.456l90.496-90.496 45.248 45.248-90.496 90.56c-75.008 74.944-85.12 186.368-22.656 248.896 62.528 62.464 173.952 52.352 248.96-22.656l90.496-90.496zm0-362.048 45.248 45.248L398.848 670.4 353.6 625.152z"})]))}}),aH=cTe,uTe=ce({name:"Lock",__name:"lock",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96"}),g("path",{fill:"currentColor",d:"M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32m192-160v-64a192 192 0 1 0-384 0v64zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64"})]))}}),dTe=uTe,hTe=ce({name:"Memo",__name:"memo",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",style:{"enable-background":"new 0 0 1024 1024"},viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M480 320h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"}),g("path",{fill:"currentColor",d:"M887.01 72.99C881.01 67 873.34 64 864 64H160c-9.35 0-17.02 3-23.01 8.99C131 78.99 128 86.66 128 96v832c0 9.35 2.99 17.02 8.99 23.01S150.66 960 160 960h704c9.35 0 17.02-2.99 23.01-8.99S896 937.34 896 928V96c0-9.35-3-17.02-8.99-23.01M192 896V128h96v768zm640 0H352V128h480z"}),g("path",{fill:"currentColor",d:"M480 512h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32m0 192h192c21.33 0 32-10.67 32-32s-10.67-32-32-32H480c-21.33 0-32 10.67-32 32s10.67 32 32 32"})]))}}),fTe=hTe,pTe=ce({name:"Message",__name:"message",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M128 224v512a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V224zm0-64h768a64 64 0 0 1 64 64v512a128 128 0 0 1-128 128H192A128 128 0 0 1 64 736V224a64 64 0 0 1 64-64"}),g("path",{fill:"currentColor",d:"M904 224 656.512 506.88a192 192 0 0 1-289.024 0L120 224zm-698.944 0 210.56 240.704a128 128 0 0 0 192.704 0L818.944 224H205.056"})]))}}),mTe=pTe,gTe=ce({name:"Money",__name:"money",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M256 640v192h640V384H768v-64h150.976c14.272 0 19.456 1.472 24.64 4.288a29.056 29.056 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64v493.952c0 14.272-1.472 19.456-4.288 24.64a29.056 29.056 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H233.024c-14.272 0-19.456-1.472-24.64-4.288a29.056 29.056 0 0 1-12.16-12.096c-2.688-5.184-4.224-10.368-4.224-24.576V640z"}),g("path",{fill:"currentColor",d:"M768 192H128v448h640zm64-22.976v493.952c0 14.272-1.472 19.456-4.288 24.64a29.056 29.056 0 0 1-12.096 12.16c-5.184 2.752-10.368 4.224-24.64 4.224H105.024c-14.272 0-19.456-1.472-24.64-4.288a29.056 29.056 0 0 1-12.16-12.096C65.536 682.432 64 677.248 64 663.04V169.024c0-14.272 1.472-19.456 4.288-24.64a29.056 29.056 0 0 1 12.096-12.16C85.568 129.536 90.752 128 104.96 128h685.952c14.272 0 19.456 1.472 24.64 4.288a29.056 29.056 0 0 1 12.16 12.096c2.752 5.184 4.224 10.368 4.224 24.64z"}),g("path",{fill:"currentColor",d:"M448 576a160 160 0 1 1 0-320 160 160 0 0 1 0 320m0-64a96 96 0 1 0 0-192 96 96 0 0 0 0 192"})]))}}),vTe=gTe,_Te=ce({name:"MoreFilled",__name:"more-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M176 416a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224m336 0a112 112 0 1 1 0 224 112 112 0 0 1 0-224"})]))}}),yTe=_Te,bTe=ce({name:"More",__name:"more",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M176 416a112 112 0 1 0 0 224 112 112 0 0 0 0-224m0 64a48 48 0 1 1 0 96 48 48 0 0 1 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96m336-64a112 112 0 1 1 0 224 112 112 0 0 1 0-224m0 64a48 48 0 1 0 0 96 48 48 0 0 0 0-96"})]))}}),wTe=bTe,kTe=ce({name:"Notebook",__name:"notebook",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32"}),g("path",{fill:"currentColor",d:"M672 128h64v768h-64zM96 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32m0 192h128q32 0 32 32t-32 32H96q-32 0-32-32t32-32"})]))}}),CTe=kTe,xTe=ce({name:"Operation",__name:"operation",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M389.44 768a96.064 96.064 0 0 1 181.12 0H896v64H570.56a96.064 96.064 0 0 1-181.12 0H128v-64zm192-288a96.064 96.064 0 0 1 181.12 0H896v64H762.56a96.064 96.064 0 0 1-181.12 0H128v-64zm-320-288a96.064 96.064 0 0 1 181.12 0H896v64H442.56a96.064 96.064 0 0 1-181.12 0H128v-64z"})]))}}),STe=xTe,$Te=ce({name:"Picture",__name:"picture",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M160 160v704h704V160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32"}),g("path",{fill:"currentColor",d:"M384 288q64 0 64 64t-64 64q-64 0-64-64t64-64M185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952z"})]))}}),ATe=$Te,ETe=ce({name:"Plus",__name:"plus",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64z"})]))}}),MTe=ETe,TTe=ce({name:"Postcard",__name:"postcard",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M160 224a32 32 0 0 0-32 32v512a32 32 0 0 0 32 32h704a32 32 0 0 0 32-32V256a32 32 0 0 0-32-32zm0-64h704a96 96 0 0 1 96 96v512a96 96 0 0 1-96 96H160a96 96 0 0 1-96-96V256a96 96 0 0 1 96-96"}),g("path",{fill:"currentColor",d:"M704 320a64 64 0 1 1 0 128 64 64 0 0 1 0-128M288 448h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32m0 128h256q32 0 32 32t-32 32H288q-32 0-32-32t32-32"})]))}}),PTe=TTe,ITe=ce({name:"Reading",__name:"reading",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m512 863.36 384-54.848v-638.72L525.568 222.72a96 96 0 0 1-27.136 0L128 169.792v638.72zM137.024 106.432l370.432 52.928a32 32 0 0 0 9.088 0l370.432-52.928A64 64 0 0 1 960 169.792v638.72a64 64 0 0 1-54.976 63.36l-388.48 55.488a32 32 0 0 1-9.088 0l-388.48-55.488A64 64 0 0 1 64 808.512v-638.72a64 64 0 0 1 73.024-63.36z"}),g("path",{fill:"currentColor",d:"M480 192h64v704h-64z"})]))}}),LTe=ITe,OTe=ce({name:"RefreshLeft",__name:"refresh-left",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),DTe=OTe,RTe=ce({name:"Search",__name:"search",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704"})]))}}),f2=RTe,VTe=ce({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"})]))}}),FTe=VTe,NTe=ce({name:"Tickets",__name:"tickets",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M192 128v768h640V128zm-32-64h704a32 32 0 0 1 32 32v832a32 32 0 0 1-32 32H160a32 32 0 0 1-32-32V96a32 32 0 0 1 32-32m160 448h384v64H320zm0-192h192v64H320zm0 384h384v64H320z"})]))}}),BTe=NTe,zTe=ce({name:"Timer",__name:"timer",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 896a320 320 0 1 0 0-640 320 320 0 0 0 0 640m0 64a384 384 0 1 1 0-768 384 384 0 0 1 0 768"}),g("path",{fill:"currentColor",d:"M512 320a32 32 0 0 1 32 32l-.512 224a32 32 0 1 1-64 0L480 352a32 32 0 0 1 32-32"}),g("path",{fill:"currentColor",d:"M448 576a64 64 0 1 0 128 0 64 64 0 1 0-128 0m96-448v128h-64V128h-96a32 32 0 0 1 0-64h256a32 32 0 1 1 0 64z"})]))}}),HTe=zTe,UTe=ce({name:"Top",__name:"top",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M572.235 205.282v600.365a30.118 30.118 0 1 1-60.235 0V205.282L292.382 438.633a28.913 28.913 0 0 1-42.646 0 33.43 33.43 0 0 1 0-45.236l271.058-288.045a28.913 28.913 0 0 1 42.647 0L834.5 393.397a33.43 33.43 0 0 1 0 45.176 28.913 28.913 0 0 1-42.647 0l-219.618-233.23z"})]))}}),jTe=UTe,WTe=ce({name:"UploadFilled",__name:"upload-filled",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M544 864V672h128L512 480 352 672h128v192H320v-1.6c-5.376.32-10.496 1.6-16 1.6A240 240 0 0 1 64 624c0-123.136 93.12-223.488 212.608-237.248A239.808 239.808 0 0 1 512 192a239.872 239.872 0 0 1 235.456 194.752c119.488 13.76 212.48 114.112 212.48 237.248a240 240 0 0 1-240 240c-5.376 0-10.56-1.28-16-1.6v1.6z"})]))}}),Q5=WTe,YTe=ce({name:"VideoPlay",__name:"video-play",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m-48-247.616L668.608 512 464 375.616zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"})]))}}),qTe=YTe,GTe=ce({name:"View",__name:"view",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"})]))}}),XTe=GTe;const KTe={name:"SpaceIcon"},ZTe={version:"1.1",viewBox:"0 0 128 128","xml:space":"preserve"},JTe=$a('<g><path d="M64,42c-13.2,0-24,10.8-24,24s10.8,24,24,24s24-10.8,24-24S77.2,42,64,42z M64,82c-8.8,0-16-7.2-16-16s7.2-16,16-16   s16,7.2,16,16S72.8,82,64,82z"></path><path d="M64,100.8c-14.9,0-29.2,6.2-39.4,17.1l-2.7,2.9l5.8,5.5l2.7-2.9c8.8-9.4,20.7-14.6,33.6-14.6s24.8,5.2,33.6,14.6l2.7,2.9   l5.8-5.5l-2.7-2.9C93.2,107.1,78.9,100.8,64,100.8z"></path><path d="M97,47.9v8c9.4,0,18.1,3.8,24.6,10.7l5.8-5.5C119.6,52.7,108.5,47.9,97,47.9z"></path><path d="M116.1,20c0-10.5-8.6-19.1-19.1-19.1S77.9,9.5,77.9,20S86.5,39.1,97,39.1S116.1,30.5,116.1,20z M85.9,20   c0-6.1,5-11.1,11.1-11.1s11.1,5,11.1,11.1s-5,11.1-11.1,11.1S85.9,26.1,85.9,20z"></path><path d="M31,47.9c-11.5,0-22.6,4.8-30.4,13.2l5.8,5.5c6.4-6.9,15.2-10.7,24.6-10.7V47.9z"></path><path d="M50.1,20C50.1,9.5,41.5,0.9,31,0.9S11.9,9.5,11.9,20S20.5,39.1,31,39.1S50.1,30.5,50.1,20z M31,31.1   c-6.1,0-11.1-5-11.1-11.1S24.9,8.9,31,8.9s11.1,5,11.1,11.1S37.1,31.1,31,31.1z"></path></g>',1),QTe=[JTe];function ePe(t,e,n,i,s,o){return v(),A("svg",ZTe,QTe)}const tPe=de(KTe,[["render",ePe]]),nPe={name:"CourseIcon"},sPe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},iPe=g("path",{d:"M10.734 5.84746L14.7114 6.9072M9.88139 9.01146L11.8701 9.54132M9.98031 14.9723L10.7758 15.1843C13.0258 15.7838 14.1508 16.0835 15.037 15.5747C15.9233 15.0659 16.2247 13.9473 16.8276 11.71L17.6802 8.54599C18.2831 6.3087 18.5845 5.19006 18.0728 4.30879C17.5611 3.42752 16.4362 3.12778 14.1862 2.52831L13.3907 2.31636C11.1407 1.71688 10.0157 1.41714 9.12948 1.92594C8.24322 2.43474 7.94178 3.55338 7.3389 5.79067L6.4863 8.95466C5.88342 11.1919 5.58198 12.3106 6.09367 13.1919C6.60536 14.0731 7.73034 14.3729 9.98031 14.9723Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),oPe=g("path",{d:"M9.99996 17.4559L9.20634 17.672C6.96165 18.2832 5.83931 18.5889 4.95512 18.0701C4.07093 17.5513 3.7702 16.4107 3.16874 14.1295L2.31814 10.9035C1.71668 8.62232 1.41595 7.48174 1.92643 6.58318C2.36802 5.80591 3.33329 5.83421 4.58329 5.83411",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),rPe=[iPe,oPe];function aPe(t,e,n,i,s,o){return v(),A("svg",sPe,rPe)}const lH=de(nPe,[["render",aPe]]),lPe={name:"SpaceCreateModal",components:{Drawer:Dd,CreateSpaceForm:f8,CreateCourseForm:K5,SidebarLinkForm:tH,ArrowLeftBold:uMe,SpaceIcon:tPe,CourseIcon:lH,Link:aH},data(){return{step:"choose_type",parent_id:null,showCreateSpaceModal:!1,select_type:"space_form",disable_redirect:!1,enteredForm:!1}},computed:{currentTitle(){return this.step==="choose_type"?this.$t("Choose a Space Type"):this.step==="space_form"?this.$t("Create a Discussion Space"):this.step==="course_form"?this.$t("Create a Course"):this.step==="link_form"?this.$t("Create a Link"):""},leaveMessage(){return this.enteredForm?this.$t("Some settings have been changed. Are you sure to leave this page?"):this.$t("Closing will discard your changes. Are you sure?")}},watch:{showCreateSpaceModal(t){t||(this._resetState(),this._clearUrlQuery())}},methods:{handleNextStep(){this.enteredForm=!0,this.step=this.select_type},_resetState(){this.step="choose_type",this.select_type="space_form",this.enteredForm=!1},_clearUrlQuery(){const{create_space:t,parent_id:e,...n}=this.$route.query;t===void 0&&e===void 0||this.$router.replace({query:n})},handleCompleted(t){this.enteredForm=!1,this.parent_id=null,this.showCreateSpaceModal=!1,this.$eventBus.emit("spaceCreated",t)}},beforeUnmount(){this.$eventBus.off("createSpaceModal")},created(){this.$eventBus.on("createSpaceModal",t=>{const e=this.$route.query.parent_id||null;this._resetState(),this.showCreateSpaceModal=!0,this.parent_id=t&&t.parent_id||e||null,t&&(this.disable_redirect=!!t.disable_redirect,t.spaceConfig?(this.step="space_form",this.select_type="space_form",this.enteredForm=!0):t.course_config&&(this.select_type="course_form",this.step="course_form",this.enteredForm=!0))})},mounted(){this.$router.isReady().then(()=>{const{create_space:t,parent_id:e}=this.$route.query;t==="yes"&&e&&this.$eventBus.emit("createSpaceModal",{parent_id:e})})}},cPe={class:"dialog_header"},uPe={class:"dialog_left"},dPe={class:"dialog_body"},hPe={key:0,class:"space-type-selector"},fPe={class:"space-cards"},pPe={class:"space-card-label"},mPe={class:"space-card-label"},gPe={key:0,class:"space-card-note"},vPe={class:"space-card-label"},_Pe={key:0,class:"space-card-note"},yPe={class:"dialog_footer"};function bPe(t,e,n,i,s,o){const r=W("ArrowLeftBold"),a=be,l=We,c=W("SpaceIcon"),u=W("CourseIcon"),d=W("Link"),h=W("create-space-form"),f=W("create-course-form"),p=W("sidebar-link-form"),m=W("Drawer");return v(),D(m,{modelValue:s.showCreateSpaceModal,"onUpdate:modelValue":e[5]||(e[5]=y=>s.showCreateSpaceModal=y),size:t.drawerWidth,"close-on-click-modal":!0,"has-close-confirmation":s.enteredForm,"close-confirmation-message":o.leaveMessage,drawerClass:"fcom_space_create_drawer"},cs({header:w(()=>[g("div",cPe,[g("div",uPe,[s.step!="choose_type"?(v(),D(l,{key:0,"aria-label":t.$t("Back"),onClick:e[0]||(e[0]=y=>s.step="choose_type"),text:"",size:"small"},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1})]),_:1},8,["aria-label"])):O("",!0),g("h4",null,S(o.currentTitle),1)])])]),default:w(()=>[g("div",dPe,[s.step=="choose_type"?(v(),A("div",hPe,[g("div",fPe,[g("div",{onClick:e[1]||(e[1]=y=>s.select_type="space_form"),class:G([{"is-active":s.select_type==="space_form"},"space-card"])},[_(a,{class:"space-card-icon"},{default:w(()=>[_(c)]),_:1}),g("span",pPe,S(t.$t("Discussion Space")),1)],2),g("div",{onClick:e[2]||(e[2]=y=>!!t.hasFeature("has_course")&&(s.select_type="course_form")),class:G([{"is-active":s.select_type==="course_form","is-disabled":!t.hasFeature("has_course")},"space-card"])},[_(a,{class:"space-card-icon"},{default:w(()=>[_(u)]),_:1}),g("span",mPe,S(t.$t("Course")),1),t.hasFeature("has_course")?O("",!0):(v(),A("span",gPe,S(t.$t("Course Module is disabled")),1))],2),g("div",{onClick:e[3]||(e[3]=y=>!!t.appVars.pro&&(s.select_type="link_form")),class:G([{"is-active":s.select_type==="link_form","is-disabled":!t.appVars.pro},"space-card"])},[_(a,{class:"space-card-icon"},{default:w(()=>[_(d)]),_:1}),g("span",vPe,S(t.$t("Link")),1),t.appVars.pro?O("",!0):(v(),A("span",_Pe,S(t.$t("Pro Required")),1))],2)])])):s.step=="space_form"?(v(),D(h,{key:1,disable_redirect:s.disable_redirect,parent_id:s.parent_id,onCompleted:o.handleCompleted},null,8,["disable_redirect","parent_id","onCompleted"])):s.step=="course_form"?(v(),D(f,{key:2,disable_redirect:s.disable_redirect,parent_id:s.parent_id,onCompleted:o.handleCompleted},null,8,["disable_redirect","parent_id","onCompleted"])):s.step=="link_form"?(v(),D(p,{key:3,parent_id:s.parent_id,onCompleted:o.handleCompleted},null,8,["parent_id","onCompleted"])):O("",!0)])]),_:2},[s.step=="choose_type"?{name:"footer",fn:w(()=>[g("div",yPe,[_(l,{disabled:!s.select_type,class:"fcom_primary_button",onClick:e[4]||(e[4]=y=>o.handleNextStep())},{default:w(()=>[B(S(t.$t("Next")),1)]),_:1},8,["disabled"])])]),key:"0"}:void 0]),1032,["modelValue","size","has-close-confirmation","close-confirmation-message"])}const wPe=de(lPe,[["render",bPe]]),Hs=E1("cache",{state:()=>({cache:{},stats:{hits:0,misses:0,size:0,totalSaved:0},maxSize:500,maxMemorySize:50*1024*1024}),getters:{getCacheHitRate:t=>{const e=t.stats.hits+t.stats.misses;return e>0?(t.stats.hits/e*100).toFixed(2):0},getCacheSize:t=>Object.keys(t.cache).length,getMemoryUsage:t=>{try{return(new Blob([JSON.stringify(t.cache)]).size/1024/1024).toFixed(2)+" MB"}catch{return"Unknown"}},getCacheKeys:t=>Object.keys(t.cache),getCacheEntry:t=>e=>t.cache[e]||null},actions:{get(t,e=null){const n=this.cache[t];if(!n)return this.stats.misses++,null;const i=Date.now()-n.timestamp,s=n.ttl||e||5*60*1e3;return i>s?(delete this.cache[t],this.stats.misses++,this.stats.size=Object.keys(this.cache).length,null):(this.stats.hits++,n.hits=(n.hits||0)+1,n.lastAccessed=Date.now(),n.data)},set(t,e,n=5*60*1e3){Object.keys(this.cache).length>=this.maxSize&&this.pruneLRU(50),this.cache[t]={data:e,timestamp:Date.now(),lastAccessed:Date.now(),hits:0,ttl:n},this.stats.size=Object.keys(this.cache).length,this.stats.totalSaved++},invalidate(t){this.cache[t]&&(delete this.cache[t],this.stats.size=Object.keys(this.cache).length)},invalidatePattern(t){let e=0;return Object.keys(this.cache).forEach(n=>{n.includes(t)&&(delete this.cache[n],e++)}),this.stats.size=Object.keys(this.cache).length,e},pruneLRU(t){const e=Object.entries(this.cache).map(([n,i])=>({key:n,lastAccessed:i.lastAccessed||i.timestamp})).sort((n,i)=>n.lastAccessed-i.lastAccessed).slice(0,t);return e.forEach(({key:n})=>{delete this.cache[n]}),this.stats.size=Object.keys(this.cache).length,e.length},pruneExpired(t=15*60*1e3){let e=0;const n=Date.now();return Object.entries(this.cache).forEach(([i,s])=>{n-s.timestamp>t&&(delete this.cache[i],e++)}),this.stats.size=Object.keys(this.cache).length,e},clear(){this.cache={},this.stats.hits=0,this.stats.misses=0,this.stats.size=0},getStats(){return{...this.stats,hitRate:this.getCacheHitRate,memoryUsage:this.getMemoryUsage,cacheSize:this.getCacheSize}},has(t){return t in this.cache},getKeysMatching(t){return Object.keys(this.cache).filter(e=>e.includes(t))},warmCache(t){Object.entries(t).forEach(([e,n])=>{this.set(e,n)})}}}),eS=E1("user",{state:()=>({currentUser:null,profilesByUsername:{},follows:{},followers:[],loading:{},lastFetched:{}}),getters:{getProfile:t=>e=>t.profilesByUsername[e]||null,isFollowing:t=>e=>{const n=t.follows[String(e)];return n!==void 0&&["1","2"].includes(String(n))},isBlocked:t=>e=>{const n=t.follows[String(e)];return n!==void 0&&String(n)==="0"},getFollowLevel:t=>e=>t.follows[String(e)],getCurrentUser:t=>t.currentUser,isLoading:t=>e=>t.loading[e]||!1,followingCount:t=>Object.values(t.follows).filter(e=>["1","2"].includes(String(e))).length,followersCount:t=>t.followers.length},actions:{initializeCurrentUser(){var t;(t=window.fluentComAdmin)!=null&&t.auth&&(this.currentUser=window.fluentComAdmin.auth)},setFollows(t){if(!(!t||typeof t!="object"))for(const[e,n]of Object.entries(t)){const i=String(e);n==null?delete this.follows[i]:this.follows[i]=String(n)}},removeFollow(t){delete this.follows[String(t)]},async fetchProfile(t,e=!1){const n=Hs(),i=`user-profile:${t}`;if(!e){const s=n.get(i);if(s)return this.profilesByUsername[t]=s,s.follow!==void 0&&s.user_id&&this.setFollows({[s.user_id]:s.follow}),s}this.loading[t]=!0;try{const s=await this.$api.get(`profile/${t}`),o=s.profile;return o.follow!==void 0&&o.user_id&&this.setFollows({[o.user_id]:o.follow}),s.current_user_follows&&this.setFollows(s.current_user_follows),this.profilesByUsername[t]=o,this.lastFetched[t]=Date.now(),n.set(i,o,5*60*1e3),this.loading[t]=!1,o}catch(s){throw this.loading[t]=!1,console.error("Failed to fetch user profile:",s),s}},async updateProfile(t,e=null,n=null){var s,o;const i=Hs();try{const r=n||((s=this.currentUser)==null?void 0:s.username),a=await this.$api.put(`profile/${r}`,{data:t}),l=a.profile||a.user||a;return this.currentUser={...this.currentUser,...l},e&&e!==l.username&&(delete this.profilesByUsername[e],i.invalidate(`user-profile:${e}`)),l.username&&(this.profilesByUsername[l.username]=l,i.invalidate(`user-profile:${l.username}`)),(o=window.fluentComAdmin)!=null&&o.auth&&(window.fluentComAdmin.auth={...window.fluentComAdmin.auth,...l}),l}catch(r){throw console.error("Failed to update profile:",r),r}},async toggleFollow(t,e=null){var a,l,c;const n=Hs(),i=String(t),s=this.follows[i],o=s!==void 0&&["1","2"].includes(String(s)),r=s;o?(delete this.follows[i],e&&this.profilesByUsername[e]&&(this.profilesByUsername[e].followers_count--,this.profilesByUsername[e].follow=void 0)):(this.follows[i]="1",e&&this.profilesByUsername[e]&&(this.profilesByUsername[e].followers_count++,this.profilesByUsername[e].follow="1"));try{const u=o?`profile/${e}/unfollow`:`profile/${e}/follow`,d=await this.$api.post(u);return o?delete this.follows[i]:((a=d.follow)==null?void 0:a.level)!==void 0&&this.setFollows({[i]:d.follow.level}),e&&this.profilesByUsername[e]&&(((l=d.xprofile)==null?void 0:l.followers_count)!==void 0&&(this.profilesByUsername[e].followers_count=d.xprofile.followers_count),n.invalidate(`user-profile:${e}`)),(c=window.fluentFrameworkApp)!=null&&c.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("user_follow_toggled",{userId:t,isFollowing:!o}),d}catch(u){throw o?(this.follows[i]=r,e&&this.profilesByUsername[e]&&(this.profilesByUsername[e].followers_count++,this.profilesByUsername[e].follow=r)):(delete this.follows[i],e&&this.profilesByUsername[e]&&(this.profilesByUsername[e].followers_count--,this.profilesByUsername[e].follow=void 0)),console.error("Failed to toggle follow:",u),u}},invalidateProfile(t){Hs().invalidate(`user-profile:${t}`),delete this.lastFetched[t]},clearAll(){this.currentUser=null,this.profilesByUsername={},this.follows={},this.followers=[],this.loading={},this.lastFetched={};const t=Hs();t.invalidatePattern("user-profile:"),t.invalidate("user-following")}}});var kPe=Ma,CPe=kPe["__core-js_shared__"],xPe=CPe,c3=xPe,TM=function(){var t=/[^.]+$/.exec(c3&&c3.keys&&c3.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function SPe(t){return!!TM&&TM in t}var $Pe=SPe,APe=Function.prototype,EPe=APe.toString;function MPe(t){if(t!=null){try{return EPe.call(t)}catch{}try{return t+""}catch{}}return""}var cH=MPe,TPe=HV,PPe=$Pe,IPe=P1,LPe=cH,OPe=/[\\^$.*+?()[\]{}|]/g,DPe=/^\[object .+?Constructor\]$/,RPe=Function.prototype,VPe=Object.prototype,FPe=RPe.toString,NPe=VPe.hasOwnProperty,BPe=RegExp("^"+FPe.call(NPe).replace(OPe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function zPe(t){if(!IPe(t)||PPe(t))return!1;var e=TPe(t)?BPe:DPe;return e.test(LPe(t))}var HPe=zPe;function UPe(t,e){return t==null?void 0:t[e]}var jPe=UPe,WPe=HPe,YPe=jPe;function qPe(t,e){var n=YPe(t,e);return WPe(n)?n:void 0}var pp=qPe,GPe=pp,XPe=Ma,KPe=GPe(XPe,"DataView"),ZPe=KPe,JPe=pp,QPe=Ma,eIe=JPe(QPe,"Map"),tS=eIe,tIe=pp,nIe=Ma,sIe=tIe(nIe,"Promise"),iIe=sIe,oIe=pp,rIe=Ma,aIe=oIe(rIe,"Set"),uH=aIe,lIe=pp,cIe=Ma,uIe=lIe(cIe,"WeakMap"),dIe=uIe,oC=ZPe,rC=tS,aC=iIe,lC=uH,cC=dIe,dH=M1,mp=cH,PM="[object Map]",hIe="[object Object]",IM="[object Promise]",LM="[object Set]",OM="[object WeakMap]",DM="[object DataView]",fIe=mp(oC),pIe=mp(rC),mIe=mp(aC),gIe=mp(lC),vIe=mp(cC),gu=dH;(oC&&gu(new oC(new ArrayBuffer(1)))!=DM||rC&&gu(new rC)!=PM||aC&&gu(aC.resolve())!=IM||lC&&gu(new lC)!=LM||cC&&gu(new cC)!=OM)&&(gu=function(t){var e=dH(t),n=e==hIe?t.constructor:void 0,i=n?mp(n):"";if(i)switch(i){case fIe:return DM;case pIe:return PM;case mIe:return IM;case gIe:return LM;case vIe:return OM}return e});var hH=gu,_Ie=zV,yIe=hH,bIe=i8,wIe=Ta,kIe=l8,CIe=o8,xIe=BV,SIe=a8,$Ie="[object Map]",AIe="[object Set]",EIe=Object.prototype,MIe=EIe.hasOwnProperty;function TIe(t){if(t==null)return!0;if(kIe(t)&&(wIe(t)||typeof t=="string"||typeof t.splice=="function"||CIe(t)||SIe(t)||bIe(t)))return!t.length;var e=yIe(t);if(e==$Ie||e==AIe)return!t.size;if(xIe(t))return!_Ie(t).length;for(var n in t)if(MIe.call(t,n))return!1;return!0}var PIe=TIe;const fH=Ei(PIe),IIe={name:"SocialLinks",props:["xprofile","isOwn"],computed:{hasSocialLinks(){return this.socialLinks.length>0},socialLinks(){var i;if(!this.xprofile)return[];const t=[];this.xprofile.website&&t.push({title:this.$t("Website"),icon:'<svg viewBox="0 0 40 20" fill="currentColor"><path d="M3.8 10C3.8 6.58 6.58 3.8 10 3.8H18V0H10C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20H18V16.2H10C6.58 16.2 3.8 13.42 3.8 10ZM12 12H28V8H12V12ZM30 0H22V3.8H30C33.42 3.8 36.2 6.58 36.2 10C36.2 13.42 33.42 16.2 30 16.2H22V20H30C35.52 20 40 15.52 40 10C40 4.48 35.52 0 30 0Z"></path></svg>',url:this.xprofile.website});let e=this.xprofile.social_links;if(e||(e=(i=this.xprofile.meta)==null?void 0:i.social_links),fH(e))return t;const n=this.appVars.socialLinkProviders;return n&&this.each(n,(s,o)=>{e[o]&&t.push({title:s.title,icon:s.icon_svg,url:s.domain+e[o]})}),t}}},LIe={key:0,class:"fcom_social_links"},OIe=["href","title"];function DIe(t,e,n,i,s,o){const r=be,a=W("router-link");return o.hasSocialLinks?(v(),A("div",LIe,[(v(!0),A(ee,null,Ce(o.socialLinks,l=>(v(),A("a",{rel:"noopener nofollow",target:"_blank",href:l.url,key:l.title,title:l.title},[_(r,{innerHTML:l.icon},null,8,["innerHTML"])],8,OIe))),128)),n.isOwn&&!o.hasSocialLinks?(v(),D(a,{key:0,to:{name:"update_profile",params:{username:n.xprofile.username}}},{default:w(()=>[B(S("+ "+t.$t("Add social links")),1)]),_:1},8,["to"])):O("",!0)])):O("",!0)}const RIe=de(IIe,[["render",DIe]]),pH=E1("ui",{state:()=>({lastScrollPath:null,lastScrollPosition:0,lastViewedFeed:{},layoutStyle:null,sortBy:null,layoutStyleByContext:{},sortByContext:{},listSortByContext:{},modals:{feedModal:!1,createPostModal:!1,editPostModal:!1,shareModal:!1},globalLoading:!1,sidebarCollapsed:!1,searchQuery:"",activeSpace:null,activeTopic:null}),getters:{getLastViewedFeed:t=>e=>t.lastViewedFeed[e]||null,getLayoutStyle:t=>e=>t.layoutStyleByContext[e]||t.layoutStyle||"list",getSortBy:t=>e=>t.sortByContext[e]||t.sortBy||"latest",isModalOpen:t=>e=>t.modals[e]||!1},actions:{saveScrollPosition(t,e){this.lastScrollPath=t,this.lastScrollPosition=e},restoreScrollPosition(t){return this.lastScrollPath===t&&this.lastScrollPosition>0?this.lastScrollPosition:0},consumeScrollPosition(t){const e=this.restoreScrollPosition(t);return e>0&&(this.lastScrollPath=null,this.lastScrollPosition=0),e},saveLastViewedFeed(t,e,n){this.lastViewedFeed[t]={feedId:e,index:n,timestamp:Date.now()}},setLayoutStyle(t){this.layoutStyle=t;try{localStorage.setItem("fcom_feed_layout",t)}catch(e){console.error("Failed to save layout style:",e)}},setLayoutStyleForContext(t,e){this.layoutStyleByContext[t]=e;try{localStorage.setItem("fcom_layout_by_context",JSON.stringify(this.layoutStyleByContext))}catch(n){console.error("Failed to save layout style:",n)}},setSortBy(t){this.sortBy=t;try{localStorage.setItem("fcom_feed_sort",t)}catch(e){console.error("Failed to save sort preference:",e)}},setSortByForContext(t,e){this.sortByContext[t]=e;try{localStorage.setItem("fcom_sort_by_context",JSON.stringify(this.sortByContext))}catch(n){console.error("Failed to save sort preference:",n)}},setListSort(t,e,n){this.listSortByContext[t]={field:e,dir:n};try{localStorage.setItem("fcom_list_sort_by_context",JSON.stringify(this.listSortByContext))}catch(i){console.error("Failed to save list sort preference:",i)}},getListSort(t){return this.listSortByContext[t]||null},openModal(t){this.modals[t]=!0},closeModal(t){this.modals[t]=!1},toggleModal(t){this.modals[t]=!this.modals[t]},setGlobalLoading(t){this.globalLoading=t},toggleSidebar(){this.sidebarCollapsed=!this.sidebarCollapsed},setSidebar(t){this.sidebarCollapsed=t},setSearchQuery(t){this.searchQuery=t},setActiveSpace(t){this.activeSpace=t},setActiveTopic(t){this.activeTopic=t},clearScrollPosition(){this.lastScrollPath=null,this.lastScrollPosition=0},clearLastViewedFeeds(){this.lastViewedFeed={}},initialize(){try{const t=localStorage.getItem("fcom_feed_layout");t&&(this.layoutStyle=t);const e=localStorage.getItem("fcom_layout_by_context");e&&(this.layoutStyleByContext=JSON.parse(e))}catch(t){console.error("Failed to restore layout style:",t)}try{const t=localStorage.getItem("fcom_feed_sort");t&&(this.sortBy=t);const e=localStorage.getItem("fcom_sort_by_context");e&&(this.sortByContext=JSON.parse(e));const n=localStorage.getItem("fcom_list_sort_by_context");n&&(this.listSortByContext=JSON.parse(n))}catch(t){console.error("Failed to restore sort preference:",t)}},reset(){this.lastScrollPath=null,this.lastScrollPosition=0,this.lastViewedFeed={},this.modals={feedModal:!1,createPostModal:!1,editPostModal:!1,shareModal:!1},this.globalLoading=!1,this.sidebarCollapsed=!1,this.searchQuery="",this.activeSpace=null,this.activeTopic=null}}}),RM=E1("feed",{state:()=>({feedsByContext:{},feedsById:{},stickyFeeds:{},loading:{},pagination:{},filters:{},tickerIntervals:{},tickerEnabled:{},lastTickerCheck:{},tickerPending:{},newPostsCount:{},ticker:{count:0,lastFetched:0},executionTimes:{},_pendingRequests:{},_requestSeq:{},_recentContexts:[]}),getters:{getFeedsByContext:t=>e=>{const n=t.feedsByContext[e];return n?n.data||[]:[]},getFeedById:t=>e=>t.feedsById[e]||null,getStickyFeed:t=>e=>t.stickyFeeds[e]||null,getPagination:t=>e=>t.pagination[e]||{page:1,per_page:10,total:0,last_page:1,has_more:!1},isLoading:t=>e=>t.loading[e]||!1,getExecutionTime:t=>e=>t.executionTimes[e]||"",totalFeedsInMemory:t=>{let e=Object.keys(t.feedsById).length;return Object.values(t.feedsByContext).forEach(n=>{var i;e+=((i=n.data)==null?void 0:i.length)||0}),e},disableAutoLoad:t=>e=>{const n=t.loading[e]||!1,i=t.pagination[e];return i?n||i.has_more===!1:!0},getTickerCount:t=>t.ticker.count||0,getTickerLastFetched:t=>t.ticker.lastFetched||0,isTickerActive:t=>e=>t.tickerEnabled[e]&&t.tickerIntervals[e]!==null,getNewPostsCount:t=>e=>t.newPostsCount[e]||0,getMemoryStats:t=>{let e=0,n={};Object.keys(t.feedsByContext).forEach(o=>{var a,l;const r=((l=(a=t.feedsByContext[o])==null?void 0:a.data)==null?void 0:l.length)||0;n[o]=r,e+=r});const i=Object.keys(t.feedsById).length,s=(e*5/1024).toFixed(2);return{totalFeeds:e,feedsByContextCount:n,feedsByIdCount:i,estimatedMemoryMB:s,contexts:Object.keys(t.feedsByContext).length}}},actions:{async fetchFeeds(t,e={},n=!1){var u,d,h;if(console.log("[Feed Store] fetchFeeds called:",{context:t,loadMore:n,paramsPage:e.page,currentLoading:this.loading[t],currentPage:(u=this.pagination[t])==null?void 0:u.page}),this.loading[t]){console.log("[Feed Store] Already loading for context:",t,"- ignoring duplicate request");return}const i=(this._requestSeq[t]||0)+1;this._requestSeq[t]=i;const s=n?(((d=this.pagination[t])==null?void 0:d.page)||0)+1:e.page||1,o={...e,page:s,per_page:e.per_page||10},r=`feeds:${t}:${JSON.stringify(o)}`,a=Hs(),l=JSON.stringify({search:o.search||"",order_by_type:o.order_by_type||"",topic_slug:o.topic_slug||"",status:o.status||""});if(!n&&s===1){const f=a.get(r,3e5);if(f)return this.feedsByContext[t]={...f.feedsByContext,filterKey:l},this.pagination[t]=f.pagination,this.executionTimes[t]=f.executionTime,this.touchContext(t),f.stickyFeed&&!window["viewed_sticky_posts_"+f.stickyFeed.id]?this.stickyFeeds[t]=f.stickyFeed:(this.stickyFeeds[t]=null,f.stickyFeed&&((h=this.feedsByContext[t])!=null&&h.data)&&(this.feedsByContext[t].data.some(p=>p.id===f.stickyFeed.id)||this.feedsByContext[t].data.unshift(f.stickyFeed))),f.feedsByContext.data.forEach(p=>{this.feedsById[p.id]=p}),this.loading[t]=!1,f}return this.loading[t]=!0,this.$api.get(e.feed_base_url||"feeds",o).then(f=>{var p,m,y,b;if(this._requestSeq[t]===i){if(f.sticky){const k="viewed_sticky_posts_"+f.sticky.id;window[k]?(f.feeds.data.some(C=>C.id===f.sticky.id)||f.feeds.data.unshift(f.sticky),this.stickyFeeds[t]=null):this.stickyFeeds[t]=f.sticky}else s===1&&(this.stickyFeeds[t]=null);if(n){const k=((p=this.feedsByContext[t])==null?void 0:p.data)||[];this.feedsByContext[t]={data:[...k,...f.feeds.data],timestamp:Date.now(),filterKey:l}}else this.feedsByContext[t]={data:f.feeds.data,timestamp:Date.now(),filterKey:l};if(this.pagination[t]={page:s,per_page:o.per_page,total:f.feeds.total,last_page:f.feeds.last_page,has_more:f.feeds.has_more},this.touchContext(t),console.log("[Feed Store] Updated pagination:",{context:t,page:s,has_more:f.feeds.has_more,total:f.feeds.total}),f.execution_time&&(this.executionTimes[t]=f.execution_time),f.feeds.data.forEach(k=>{this.feedsById[k.id]={...k,timestamp:Date.now()}}),n){const k=((y=(m=this.feedsByContext[t])==null?void 0:m.data)==null?void 0:y.length)||0;k>500&&(console.log("[Feed Store] Pruning feeds, count:",k),this.pruneOldFeeds(t))}return f.last_fetched_timestamp&&(this.ticker.lastFetched=f.last_fetched_timestamp,(b=window.fluentFrameworkApp)!=null&&b.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("newest_feed_fetched",{last_fetched_timestamp:f.last_fetched_timestamp})),f.current_user_follows&&eS().setFollows(f.current_user_follows),!n&&s===1&&a.set(r,{feedsByContext:this.feedsByContext[t],pagination:this.pagination[t],stickyFeed:this.stickyFeeds[t],executionTime:this.executionTimes[t]}),console.log("[Feed Store] Fetch SUCCESS, stored feeds for context:",t,{feedCount:this.feedsByContext[t].data.length,pagination:this.pagination[t],hasSticky:!!this.stickyFeeds[t]}),this.loading[t]=!1,console.log("[Feed Store] Set loading to FALSE after success for context:",t),{feeds:this.feedsByContext[t].data,pagination:this.pagination[t],sticky:this.stickyFeeds[t]}}}).catch(f=>{throw console.error("[Feed Store] Failed to fetch feeds:",f),this._requestSeq[t]===i&&(this.loading[t]=!1),f})},async fetchFeedBySlug(t){const e=`feed:slug:${t}`,n=Hs(),i=n.get(e,10*60*1e3);if(i)return this.feedsById[i.id]=i,i;try{const o=(await this.$api.get(`feeds/${t}/by-slug`)).feed;return this.feedsById[o.id]={...o,timestamp:Date.now()},n.set(e,o),window.appVars&&(window.appVars.last_feed_id=o.id),o}catch(s){throw console.error("Failed to fetch feed:",s),s}},_contextShowsUnlisted(t){const e=this.feedsByContext[t];if(!e||!e.filterKey)return!1;try{return JSON.parse(e.filterKey).status==="unlisted"}catch{return!1}},async createFeed(t,e){var n,i,s,o,r;try{const a=await this.$api.post("feeds",e),l=a.feed;if(this.feedsById[l.id]={...l,timestamp:Date.now()},!a.scheduled_at){const u=d=>{this.feedsByContext[d]||(this.feedsByContext[d]={data:[],timestamp:Date.now()}),this.stickyFeeds[d]&&(this.feedsByContext[d].data.some(f=>f.id===this.stickyFeeds[d].id)||this.feedsByContext[d].data.unshift(this.stickyFeeds[d]),this.stickyFeeds[d]=null);const h=this.feedsByContext[d].data.findIndex(f=>f.id===l.id);h===-1&&this.feedsByContext[d].data.unshift(l),this.pagination[d]?h===-1&&this.pagination[d].total++:this.pagination[d]={page:1,per_page:10,total:1,last_page:1,has_more:!1}};if(l.status==="unlisted")Object.keys(this.feedsByContext).forEach(d=>{this._contextShowsUnlisted(d)&&u(d)});else{u(t),l.space_id&&t!=="global"&&(u("global"),Hs().invalidatePattern("feeds:global"));const d=`user-${l.user_id}`;this.feedsByContext[d]&&t!==d&&u(d)}(i=(n=window.fluentFrameworkApp)==null?void 0:n.$eventBus)==null||i.emit("recent_activities_refresh")}return a.last_fetched_timestamp&&(this.ticker.lastFetched=a.last_fetched_timestamp,(s=window.FluentCommunityUtil)!=null&&s.eventBus&&((r=(o=window.fluentFrameworkApp)==null?void 0:o.$eventBus)==null||r.emit("newest_feed_fetched",{last_fetched_timestamp:a.last_fetched_timestamp}))),Hs().invalidatePattern(`feeds:${t}`),a}catch(a){throw console.error("Failed to create feed:",a),a}},async updateFeed(t,e){const n=this.feedsById[t]?{...this.feedsById[t]}:null;this.feedsById[t]&&(this.feedsById[t]={...this.feedsById[t],...e,timestamp:Date.now()}),Object.keys(this.feedsByContext).forEach(i=>{const s=this.feedsByContext[i].data.findIndex(o=>o.id===t);s!==-1&&(this.feedsByContext[i].data[s]={...this.feedsByContext[i].data[s],...e})});try{const s=(await this.$api.patch(`feeds/${t}`,e)).feed;return this.feedsById[t]={...this.feedsById[t],...s,timestamp:Date.now()},Object.keys(this.feedsByContext).forEach(r=>{const a=this.feedsByContext[r].data.findIndex(l=>l.id===t);a!==-1&&(this.feedsByContext[r].data[a]={...this.feedsByContext[r].data[a],...s})}),s.status==="unlisted"&&Object.keys(this.feedsByContext).forEach(r=>{if(this._contextShowsUnlisted(r))return;const a=this.feedsByContext[r];a!=null&&a.data&&(a.data=a.data.filter(l=>l.id!==t))}),Hs().invalidatePattern("feed:"),s}catch(i){throw n&&(this.feedsById[t]=n,Object.keys(this.feedsByContext).forEach(s=>{const o=this.feedsByContext[s].data.findIndex(r=>r.id===t);o!==-1&&(this.feedsByContext[s].data[o]=n)})),console.error("Failed to update feed:",i),i}},async deleteFeed(t,e,n=null){try{return await this.$api.delete(`feeds/${e}`),delete this.feedsById[e],n!==null&&this.feedsByContext[t]?this.feedsByContext[t].data.splice(n,1):Object.keys(this.feedsByContext).forEach(s=>{var o;(o=this.feedsByContext[s])!=null&&o.data&&(this.feedsByContext[s].data=this.feedsByContext[s].data.filter(r=>r.id!==e))}),this.pagination[t]&&this.pagination[t].total--,Hs().invalidatePattern("feed:"),!0}catch(i){throw console.error("Failed to delete feed:",i),i}},async fetchTicker(t){var e,n,i;try{const s=t||this.ticker.lastFetched;console.log("[Legacy Ticker] Fetching ticker with timestamp:",s);const o=await this.$api.get("feeds/ticker",{last_fetched_timestamp:s});if(console.log("[Legacy Ticker] Response:",{has_changes:o.has_changes,feeds:((e=o.feeds)==null?void 0:e.length)||0,new_items_count:o.new_items_count}),this.ticker={count:o.new_items_count||0,lastFetched:o.last_fetched_timestamp||Date.now()},console.log("[Legacy Ticker] Checking if we should process feeds:",{has_changes:o.has_changes,feeds_exists:!!o.feeds,feeds_length:((n=o.feeds)==null?void 0:n.length)||0,feeds_data:o.feeds}),o.has_changes&&o.feeds&&o.feeds.length>0){console.log(`[Legacy Ticker] ✅ Processing ${o.feeds.length} feed updates`);const r={};o.feeds.forEach(a=>{console.log("[Legacy Ticker] Processing feed update:",a);const l=a.context||"global";r[l]||(r[l]=[]),r[l].push(a)}),console.log("[Legacy Ticker] Updates grouped by context:",r);for(const a in r){console.log(`[Legacy Ticker] 📥 Processing context: ${a} (${r[a].length} updates)`);try{await this.processTickerUpdates(a,r[a]),console.log(`[Legacy Ticker] ✅ Successfully processed context: ${a}`)}catch(l){console.error(`[Legacy Ticker] ❌ Failed to process context: ${a}`,l)}}}else console.log("[Legacy Ticker] ⏭️  Skipping feed processing - no changes or no feeds in response");return(i=window.fluentFrameworkApp)!=null&&i.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("ticker_updated",o),this.ticker}catch(s){throw console.error("[Legacy Ticker] Failed to fetch ticker:",s),s}},resetTicker(){this.ticker.count=0},markStickyAsViewed(t,e){const n=this.stickyFeeds[t];n&&n.id===e&&(window["viewed_sticky_posts_"+e]=!0,this.feedsByContext[t]&&(this.feedsByContext[t].data.some(i=>i.id===n.id)||this.feedsByContext[t].data.unshift(n)),this.stickyFeeds[t]=null)},pruneOldFeeds(t=null){(t?[t]:Object.keys(this.feedsByContext)).forEach(i=>{var o;const s=((o=this.feedsByContext[i])==null?void 0:o.data)||[];if(s.length>500){const r=s.slice(0,s.length-500);this.feedsByContext[i].data=s.slice(s.length-500),console.log(`[Feed Store] Pruned ${r.length} old feeds from ${i}, kept ${this.feedsByContext[i].data.length}`),r.forEach(a=>{Object.values(this.feedsByContext).some(c=>{var u;return(u=c.data)==null?void 0:u.some(d=>d.id===a.id)})||delete this.feedsById[a.id]})}})},resetContext(t){this.feedsByContext[t]={data:[],timestamp:0},this.pagination[t]={page:1,per_page:10,total:0,last_page:1,has_more:!1},this.stickyFeeds[t]=null,this.loading[t]=!1,this.executionTimes[t]="",Hs().invalidatePattern(`feeds:${t}`)},touchContext(t){if(!t)return;const e=this._recentContexts.indexOf(t);e>-1&&this._recentContexts.splice(e,1),this._recentContexts.push(t);const n=10;if(this._recentContexts.length<=n)return;let i=this._recentContexts.length-n;const s=[];for(const o of this._recentContexts)i>0&&!this.loading[o]?(delete this.feedsByContext[o],delete this.pagination[o],delete this.stickyFeeds[o],delete this.executionTimes[o],i--):s.push(o);this._recentContexts=s},async softRefreshContext(t,e={}){var n,i,s,o;if((i=(n=this.feedsByContext[t])==null?void 0:n.data)!=null&&i.length&&!this.loading[t]){this.touchContext(t);try{const r=await this.$api.get(e.feed_base_url||"feeds",{...e,page:1,per_page:e.per_page||10}),a=this.feedsByContext[t];if(!((s=a==null?void 0:a.data)!=null&&s.length))return;const l=a.data,c=((o=r.feeds)==null?void 0:o.data)||[];if(!c.length){a.timestamp=Date.now();return}const u=new Map(c.map(m=>[m.id,m])),d=new Set(l.map(m=>m.id)),h=l.map(m=>{const y=u.get(m.id);return y?{...m,...y}:m}),f=c.filter(m=>!d.has(m.id));this.feedsByContext[t]={...a,data:[...f,...h],timestamp:Date.now()};const p=Date.now();if(c.forEach(m=>{this.feedsById[m.id]={...this.feedsById[m.id]||{},...m,timestamp:p}}),r.sticky){const m="viewed_sticky_posts_"+r.sticky.id;window[m]||(this.stickyFeeds[t]=r.sticky)}}catch(r){console.warn("[Feed Store] Soft refresh failed for context",t,r)}}},startTicker(t="global",e=3e4){this.lastTickerCheck[t]||(this.lastTickerCheck[t]=new Date().toISOString()),this.stopTicker(t),this.tickerEnabled[t]=!0,this.newPostsCount[t]=0,this.tickerIntervals[t]=setInterval(()=>{this.checkForUpdates(t)},e),console.log(`[Feed Store] Ticker started for ${t} (interval: ${e}ms)`),this.checkForUpdates(t)},stopTicker(t){this.tickerIntervals[t]&&(clearInterval(this.tickerIntervals[t]),this.tickerIntervals[t]=null,this.tickerEnabled[t]=!1,console.log(`[Feed Store] Ticker stopped for ${t}`))},stopAllTickers(){Object.keys(this.tickerIntervals).forEach(t=>{this.stopTicker(t)})},async checkForUpdates(t="global"){if(!this.tickerPending[t]){this.tickerPending[t]=!0;try{const e=await this.$api.get("feeds/ticker-updates",{context:t,since:this.lastTickerCheck[t]||new Date().toISOString()});this.lastTickerCheck[t]=e.timestamp,e.has_changes&&e.updates.length>0&&(console.log(`[Feed Store] Ticker found ${e.updates.length} changes for ${t}`),await this.processTickerUpdates(t,e.updates))}catch(e){e.xhr_status!==404&&console.error("[Feed Store] Ticker check failed:",e)}finally{this.tickerPending[t]=!1}}},async processTickerUpdates(t,e){var s;console.log(`[processTickerUpdates] Called for context: ${t} with ${e.length} updates`),console.log("[processTickerUpdates] Updates:",e);const n=[],i=[];if(e.forEach(o=>{console.log("[processTickerUpdates] Processing update:",{id:o.id,action:o.action,updated_at:o.updated_at});const r=this.feedsById[o.id];console.log("[processTickerUpdates] Existing feed in store:",r?{id:r.id,updated_at:r.updated_at}:"NOT IN STORE"),o.action==="deleted"?(console.log(`[processTickerUpdates] ➡️ Marking feed ${o.id} for DELETION`),i.push(o.id)):o.action==="created"?(console.log(`[processTickerUpdates] ➡️ Marking feed ${o.id} for FETCH (CREATED)`),n.push(o.id)):o.action==="updated"&&(!r||new Date(r.updated_at)<new Date(o.updated_at)?(console.log(`[processTickerUpdates] ➡️ Marking feed ${o.id} for FETCH (UPDATED - ${r?"outdated":"not in store"})`),n.push(o.id)):console.log(`[processTickerUpdates] ⏭️  Skipping feed ${o.id} - already have latest version`))}),console.log("[processTickerUpdates] Summary:",{toFetch:n.length,toDelete:i.length,fetchIds:n,deleteIds:i}),i.length>0&&(console.log(`[processTickerUpdates] 🗑️  Deleting ${i.length} feeds from ${t}`),this.deleteFeedsFromStore(t,i)),n.length>0){console.log(`[processTickerUpdates] 📥 Fetching ${n.length} feeds for ${t}`),await this.fetchFeedsByIds(t,n);const o=e.filter(r=>r.action==="created").length;o>0&&(this.newPostsCount[t]=(this.newPostsCount[t]||0)+o)}(s=window.fluentFrameworkApp)!=null&&s.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("feeds_updated",{context:t,added:n.filter(o=>!this.feedsById[o]).length,updated:n.filter(o=>this.feedsById[o]).length,removed:i.length})},async fetchFeedsByIds(t,e){if(e.length===0)return;console.log("[Feed Store] fetchFeedsByIds called:",{context:t,count:e.length,ids:e});const n=20;try{if(e.length>n){console.log(`[Feed Store] Batching ${e.length} feeds into chunks of ${n}`);for(let i=0;i<e.length;i+=n){const s=e.slice(i,i+n);await this.fetchFeedBatch(t,s)}}else await this.fetchFeedBatch(t,e);console.log(`[Feed Store] Successfully fetched ${e.length} feeds for ${t}`)}catch(i){console.error("[Feed Store] Failed to fetch feeds by IDs:",{context:t,feedIds:e,error:i})}},async fetchFeedBatch(t,e){try{console.log("[Feed Store] Fetching feeds:",{context:t,feedIds:e});const n=await this.$api.post("feeds/batch",{feed_ids:e,context:t});if(console.log("[Feed Store] API response:",n),!n||!Array.isArray(n.feeds)){console.error("[Feed Store] Invalid response from /feeds/batch:",n);return}console.log(`[Feed Store] Received ${n.feeds.length} feeds for context: ${t}`),n.feeds.forEach(i=>{this.feedsById[i.id]=i,this.feedsByContext[t]||(this.feedsByContext[t]={data:[],timestamp:Date.now()});const s=this.feedsByContext[t].data,o=s.findIndex(r=>r.id===i.id);o===-1?s.unshift(i):s[o]=i})}catch(n){throw console.error("[Feed Store] Failed to fetch batch for context:",t,n),n}},deleteFeedsFromStore(t,e){e.forEach(n=>{var s;delete this.feedsById[n],(s=this.feedsByContext[t])!=null&&s.data&&(this.feedsByContext[t].data=this.feedsByContext[t].data.filter(o=>o.id!==n)),Hs().invalidate(`feed:${n}`)}),console.log(`[Feed Store] Deleted ${e.length} feeds from ${t}`)},clearNewPostsCount(t){this.newPostsCount[t]=0},clearAll(){this.stopAllTickers(),this.feedsByContext={},this.feedsById={},this.stickyFeeds={},this.loading={},this.pagination={},this.filters={},this.ticker={count:0,lastFetched:0},this.executionTimes={},this._pendingRequests={},this.tickerIntervals={},this.tickerEnabled={},this.lastTickerCheck={},this.tickerPending={},this.newPostsCount={}}}}),VIe=E1("space",{state:()=>({spacesBySlug:{},currentSpace:null,mySpaces:[],topicsBySpace:{},loading:{},mySpacesLoading:!1,lastFetched:{}}),getters:{getSpaceBySlug:t=>e=>t.spacesBySlug[e]||null,getCurrentSpace:t=>t.currentSpace,getSpaceTopics:t=>e=>t.topicsBySpace[e]||[],isJoinedSpace:t=>e=>t.mySpaces.some(n=>n.slug===e),getMySpaces:t=>[...t.mySpaces].sort((e,n)=>e.title.localeCompare(n.title)),isLoading:t=>e=>t.loading[e]||!1,joinedSpacesCount:t=>t.mySpaces.length},actions:{async fetchSpace(t,e=!1){const n=Hs(),i=`space:${t}`;if(!e){const s=n.get(i);if(s)return this.spacesBySlug[t]=s,this.currentSpace=s,s}this.loading[t]=!0;try{const s=await this.$api.get(`spaces/${t}/by-slug`),o=s.space||s;return this.spacesBySlug[t]=o,this.currentSpace=o,this.lastFetched[t]=Date.now(),s.topics&&(this.topicsBySpace[t]=s.topics),s.pending_count!==void 0&&(o.pending_count=s.pending_count),n.set(i,o,15*60*1e3),typeof window<"u"&&(window.fcom_current_community=o),this.loading[t]=!1,o}catch(s){throw this.loading[t]=!1,console.error("Failed to fetch space:",s),s}},async joinSpace(t,e=null){var o,r,a;const n=Hs(),i=e||this.spacesBySlug[t];if(!i)throw new Error("Space not found");const s=((o=i.user_status)==null?void 0:o.status)==="active";s||(i.user_status||(i.user_status={}),i.user_status.status="active",i.members_count=(i.members_count||0)+1,this.mySpaces.find(l=>l.slug===t)||this.mySpaces.push(i));try{const l=await this.$api.post(`spaces/${t}/join`),c=(r=l.membership)==null?void 0:r.status;if(c&&(i.user_status.status=c),c&&c!=="active"&&!s){i.members_count=Math.max(0,(i.members_count||1)-1);const u=this.mySpaces.findIndex(d=>d.slug===t);u!==-1&&this.mySpaces.splice(u,1)}return n.invalidate(`space:${t}`),n.invalidate("my-spaces"),(a=window.fluentFrameworkApp)!=null&&a.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("space_joined",i),l}catch(l){if(!s){i.user_status.status=null,i.members_count=Math.max(0,(i.members_count||1)-1);const c=this.mySpaces.findIndex(u=>u.slug===t);c!==-1&&this.mySpaces.splice(c,1)}throw console.error("Failed to join space:",l),l}},async leaveSpace(t){var r,a,l,c;const e=Hs(),n=this.spacesBySlug[t];if(!n)throw new Error("Space not found");const i=((r=n.user_status)==null?void 0:r.status)==="active",s=(a=n.user_status)==null?void 0:a.status,o=n.members_count;if(i){n.user_status.status=null,n.members_count=Math.max(0,(n.members_count||1)-1);const u=this.mySpaces.findIndex(d=>d.slug===t);u!==-1&&this.mySpaces.splice(u,1)}try{const u=await this.$api.post(`spaces/${t}/leave`),d=u.space||u;return this.spacesBySlug[t]=d,((l=this.currentSpace)==null?void 0:l.slug)===t&&(this.currentSpace=d),e.invalidate(`space:${t}`),e.invalidate("my-spaces"),(c=window.fluentFrameworkApp)!=null&&c.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("space_left",d),d}catch(u){throw i&&(n.user_status.status=s,n.members_count=o,this.mySpaces.push(n)),console.error("Failed to leave space:",u),u}},setCurrentSpace(t){const e=this.spacesBySlug[t];e&&(this.currentSpace=e,typeof window<"u"&&(window.fcom_current_community=e))},clearCurrentSpace(){this.currentSpace=null,typeof window<"u"&&(window.fcom_current_community=null)},invalidateSpace(t){const e=Hs();e.invalidate(`space:${t}`),e.invalidate(`space-topics:${t}`),delete this.lastFetched[t]},clearAll(){this.spacesBySlug={},this.currentSpace=null,this.mySpaces=[],this.topicsBySpace={},this.loading={},this.mySpacesLoading=!1,this.lastFetched={};const t=Hs();t.invalidatePattern("space:"),t.invalidatePattern("space-topics:"),t.invalidate("my-spaces")}}}),FIe={name:"FollowAction",props:{profile:{type:Object,required:!0},followButtonText:{type:String,default:""}},emits:["refetch"],setup(){return{userStore:eS()}},data(){return{loading:!1,hovering:!1}},watch:{profile:{immediate:!0,handler(t){t!=null&&t.user_id&&(t==null?void 0:t.follow)!==void 0&&this.userStore.setFollows({[t.user_id]:t.follow})}}},computed:{isFollowing(){var t;return(t=this.profile)!=null&&t.user_id?this.userStore.isFollowing(this.profile.user_id):!1},showFollowAction(){var n;const t=(n=this.profile)==null?void 0:n.user_id,e=this.auth.user_id;return this.hasFeature("followers_module")&&t&&e&&t!=e},isBlocked(){var t;return(t=this.profile)!=null&&t.user_id?this.userStore.isBlocked(this.profile.user_id):!1},followBtnText(){var t;return this.followButtonText?this.followButtonText:(t=this.profile)!=null&&t.is_follower?this.$t("Follow Back"):this.$t("Follow")}},methods:{confirmUnfollow(){this.unfollowUser()},async followUser(){this.loading=!0;try{const t=await this.userStore.toggleFollow(this.profile.user_id,this.profile.username);this.$notify.success((t==null?void 0:t.message)||this.$t("Successfully followed user")),this.$emit("refetch")}catch(t){this.$handleError(t)}finally{this.loading=!1}},async unfollowUser(){this.loading=!0;try{const t=await this.userStore.toggleFollow(this.profile.user_id,this.profile.username);this.$notify.success((t==null?void 0:t.message)||this.$t("Successfully unfollowed user")),this.$emit("refetch")}catch(t){this.$handleError(t)}finally{this.loading=!1}},unblockUser(){this.loading=!0,this.$post("profile/"+this.profile.username+"/unblock").then(t=>{this.userStore.removeFollow(this.profile.user_id),this.$notify.success(t.message)}).finally(()=>{this.loading=!1})}}},NIe={key:0},BIe={key:1},zIe={key:0},HIe={key:1};function UIe(t,e,n,i,s,o){const r=We;return o.showFollowAction?(v(),A(ee,{key:0},[o.isBlocked?(v(),D(r,{key:0,class:"fcom_secondary_button danger_button",loading:s.loading,disabled:s.loading,style:{"min-width":"90px","max-height":"30px"},onClick:o.unblockUser,onMouseenter:e[0]||(e[0]=a=>s.hovering=!0),onMouseleave:e[1]||(e[1]=a=>s.hovering=!1)},{default:w(()=>[s.hovering?(v(),A("span",BIe,S(t.$t("Unblock")),1)):(v(),A("span",NIe,S(t.$t("Blocked")),1))]),_:1},8,["loading","disabled","onClick"])):o.isFollowing?(v(),D(r,{key:1,onClick:o.confirmUnfollow,class:G(["fcom_secondary_button",{danger_button:s.hovering}]),style:{"min-width":"95px","max-height":"30px"},loading:s.loading,disabled:s.loading,onMouseenter:e[2]||(e[2]=a=>s.hovering=!0),onMouseleave:e[3]||(e[3]=a=>s.hovering=!1)},{default:w(()=>[s.hovering?(v(),A("span",HIe,S(t.$t("Unfollow")),1)):(v(),A("span",zIe,S(t.$t("Following")),1))]),_:1},8,["onClick","class","loading","disabled"])):(v(),D(r,{key:2,onClick:o.followUser,class:"fcom_color_button",style:{"max-height":"30px"},loading:s.loading,disabled:s.loading},{default:w(()=>[g("span",null,S(o.followBtnText),1)]),_:1},8,["onClick","loading","disabled"]))],64)):O("",!0)}const jIe=de(FIe,[["render",UIe]]),WIe={name:"UserRouteLink",props:{xprofile:{default:()=>({})},show_pop:{type:Boolean,default:!0},show_badge:{type:Boolean,default:!1},show_verified:{type:Boolean,default:!0},show_follow:{type:Boolean,default:!1},virtualRef:{default:null}},emits:["popover-mouseenter","popover-mouseleave"],components:{SocialLinks:RIe,FollowAction:jIe},data(){return{}},computed:{userLevel(){var t;return this.has_leaderboard&&((t=this.xprofile)!=null&&t.total_points)?vh(this.xprofile.total_points):null}},methods:{initShow(){document.addEventListener("scroll",this.onScroll,!0)},onHide(){document.removeEventListener("scroll",this.onScroll,!0)},onScroll(){var t,e;(e=(t=this.$refs.popoverRef)==null?void 0:t.hide)==null||e.call(t),this.virtualRef&&this.$eventBus.emit("hide_mention_popover")}},beforeUnmount(){document.removeEventListener("scroll",this.onScroll,!0)}},YIe=["href"],qIe={class:"fcom_user_display_name"},GIe={key:1,class:"user_route"},XIe=["href"],KIe={class:"fcom_user_display_name"},ZIe={class:"fcom_profile_pop_avatar"},JIe={key:0,class:"fcom_prfile_tagline"},QIe={class:"fcom_level_name"},eLe={style:{display:"block"},class:"fcoml_level_sub meta_line"},tLe={class:"fcom_profile_pop_info"},nLe={class:"pop_info_header"},sLe={class:"header_name"},iLe=["href"],oLe={class:"fcom_user_display_name"},rLe={class:"fcom_user_name"},aLe={key:0,class:"header_actions"},lLe={key:0,class:"fcom_profile_pop_bio"},cLe=["title"],uLe=["title"],dLe={class:"pop_info_btns"},hLe=["href"],fLe=["href"];function pLe(t,e,n,i,s,o){const r=W("verified-sign"),a=W("UserBadge"),l=W("UserAvatar"),c=Ld,u=W("follow-action"),d=W("SocialLinks"),h=Id,f=No;return n.show_pop?(v(),A("span",GIe,[_(f,{ref:"popoverRef",visible:n.virtualRef?!0:null,"virtual-ref":n.virtualRef,"virtual-triggering":!!n.virtualRef,width:500,"show-after":n.virtualRef?0:500,trigger:n.virtualRef?null:"hover",onShow:o.initShow,onHide:o.onHide,persistent:!1,"popper-class":"fcom_profile_popper",placement:"top","popper-style":"padding: 0;"},{reference:w(()=>[le(t.$slots,"default",{},()=>[g("a",{href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[g("p",KIe,S(n.xprofile.display_name),1)],8,XIe)])]),default:w(()=>[g("div",{class:"fcom_profile_pop",onMouseenter:e[0]||(e[0]=p=>n.virtualRef&&t.$emit("popover-mouseenter")),onMouseleave:e[1]||(e[1]=p=>n.virtualRef&&t.$emit("popover-mouseleave"))},[n.xprofile&&n.xprofile.username?(v(),D(h,{key:0,gutter:20},{default:w(()=>[_(c,{sm:24,md:8},{default:w(()=>[g("div",ZIe,[_(l,{xprofile:n.xprofile},null,8,["xprofile"]),o.userLevel?(v(),A("div",JIe,[g("div",QIe,S(o.userLevel.title),1),g("div",eLe,S(o.userLevel.tagline),1)])):O("",!0)])]),_:1}),_(c,{sm:24,md:16},{default:w(()=>{var p,m;return[g("div",tLe,[g("div",nLe,[g("div",sLe,[g("a",{href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[g("p",oLe,S(n.xprofile.display_name),1),n.xprofile.is_verified?(v(),D(r,{key:0})):O("",!0),n.show_badge?(v(),D(a,{key:1,profile:n.xprofile},null,8,["profile"])):O("",!0)],8,iLe),g("span",rLe," @"+S(n.xprofile.username),1)]),n.show_follow?(v(),A("div",aLe,[_(u,{profile:n.xprofile},null,8,["profile"])])):O("",!0)]),(p=n.xprofile.meta)!=null&&p.short_description_rendered||n.xprofile.short_description_rendered?(v(),A("div",lLe,S(t.getExcerpt(((m=n.xprofile.meta)==null?void 0:m.short_description_rendered)||n.xprofile.short_description_rendered,160)),1)):O("",!0),n.xprofile.created_at?(v(),A("div",{key:1,title:n.xprofile.created_at,class:"meta_line"},S(t.$t("Joined: %s",t.humanDateDiff(n.xprofile.created_at))),9,cLe)):O("",!0),n.xprofile.last_activity?(v(),A("div",{key:2,title:n.xprofile.last_activity,class:"meta_line"},S(t.$t("Last seen: %s",t.humanDateDiff(n.xprofile.last_activity))),9,uLe)):O("",!0),g("div",dLe,[g("a",{class:"el-button el-button--primary is-text is-has-bg",href:t.$getRouteLink("u/:username",{username:n.xprofile.username})},S(t.$t("View Profile")),9,hLe),t.appVars.has_chat&&t.hasPermission("can_initiate_message")?(v(),A("a",{key:0,class:"el-button el-button--primary is-text is-has-bg",href:t.$getRouteLink("chat/?user_id=:user_id",{user_id:n.xprofile.user_id})},S(t.$t("Message")),9,fLe)):O("",!0)]),_(d,{style:{"justify-content":"left"},xprofile:n.xprofile,isOwn:!1},null,8,["xprofile"])])]}),_:1})]),_:1})):O("",!0)],32)]),_:3},8,["visible","virtual-ref","virtual-triggering","show-after","trigger","onShow","onHide"]),n.show_verified&&n.xprofile.is_verified?(v(),D(r,{key:0})):O("",!0),n.show_badge?(v(),D(a,{key:1,profile:n.xprofile},null,8,["profile"])):O("",!0)])):(v(),A("a",{key:0,href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[le(t.$slots,"default",{},()=>[g("p",qIe,S(n.xprofile.display_name),1)]),n.show_verified&&n.xprofile.is_verified?(v(),D(r,{key:0})):O("",!0),n.show_badge?(v(),D(a,{key:1,profile:n.xprofile},null,8,["profile"])):O("",!0)],8,YIe))}const Jr=de(WIe,[["render",pLe]]),mLe={name:"MentionPopover",components:{UserRouteLink:Jr},setup(){return{userStore:eS()}},data(){return{xprofile:null,virtualRef:null,hideTimeout:null,cache:{},cacheTTL:5*60*1e3,requestId:0}},methods:{getCached(t){const e=this.cache[t];return e?Date.now()-e.timestamp>this.cacheTTL?(delete this.cache[t],null):e.data:null},setCache(t,e){this.cache[t]={data:e,timestamp:Date.now()}},async showPopover({username:t,triggerElement:e}){this.cancelHide();const n=++this.requestId;let i=this.getCached(t);if(!i){try{i=await this.userStore.fetchProfile(t)}catch{return}this.setCache(t,i)}n===this.requestId&&(this.xprofile=i,this.virtualRef=e)},cancelHide(){clearTimeout(this.hideTimeout)},startHideTimeout(){this.cancelHide(),this.hideTimeout=setTimeout(()=>{this.virtualRef=null},200)}},mounted(){this.$eventBus.on("show_mention_popover",this.showPopover),this.$eventBus.on("hide_mention_popover",this.startHideTimeout)},beforeUnmount(){this.$eventBus.off("show_mention_popover",this.showPopover),this.$eventBus.off("hide_mention_popover",this.startHideTimeout),clearTimeout(this.hideTimeout)}};function gLe(t,e,n,i,s,o){const r=W("UserRouteLink");return s.virtualRef&&s.xprofile?(v(),D(r,{key:0,xprofile:s.xprofile,virtualRef:s.virtualRef,show_badge:!0,show_follow:!0,onPopoverMouseenter:o.cancelHide,onPopoverMouseleave:o.startHideTimeout},null,8,["xprofile","virtualRef","onPopoverMouseenter","onPopoverMouseleave"])):O("",!0)}const vLe=de(mLe,[["render",gLe]]),_Le={name:"UnfinishedChangesModal",emits:["proceed"],data(){return{isVisible:!1,message:""}},methods:{handleCancel(){this.isVisible=!1,window.fcom_pending_modal_close=!1},handleProceed(){this.isVisible=!1,window.fcom_pending_modal_close?(this.$emit("proceed"),window.fcom_pending_modal_close=!1,window.fcom_modal_comment_unsaved=!1):this.$eventBus.emit("unsavedChangesProceeded")},showModal(t){t==="feed"?this.message=this.$t("You haven't finished your post yet. Do you want to leave without finishing?"):t==="comment"&&(this.message=this.$t("You haven't finished your comment yet. Do you want to leave without finishing?")),this.isVisible=!0}},mounted(){this.$eventBus.on("showUnsavedChangesModal",this.showModal)},beforeUnmount(){this.$eventBus.off("showUnsavedChangesModal",this.showModal)}},yLe={class:"dialog_header"},bLe={class:"dialog_left"},wLe={class:"dialog_body"},kLe={class:"dialog_footer"};function CLe(t,e,n,i,s,o){const r=We,a=Ss;return v(),D(a,{"modal-class":"fcom_common_dialog fcom_editor_unfinished_dialog",modelValue:s.isVisible,"onUpdate:modelValue":e[0]||(e[0]=l=>s.isVisible=l),width:t.modalWidth,"close-on-click-modal":!1,"close-on-press-escape":!1,"append-to-body":!0,"show-close":!1},{header:w(()=>[g("div",yLe,[g("div",bLe,[g("h4",null,S(t.$t("Leave Page?")),1)])])]),footer:w(()=>[g("div",kLe,[_(r,{class:"fcom_secondary_button",onClick:o.handleCancel},{default:w(()=>[B(S(t.$t("Cancel")),1)]),_:1},8,["onClick"]),_(r,{class:"fcom_primary_button",onClick:o.handleProceed},{default:w(()=>[B(S(t.$t("Leave")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",wLe,[g("span",null,S(s.message),1)])]),_:1},8,["modelValue","width"])}const xLe=de(_Le,[["render",CLe]]),SLe={name:"Pagination",emits:["fetch","per_page_change"],props:{pagination:{required:!0,type:Object},extra_sizes:{required:!1,type:Array,default(){return[]}},hide_on_single:{required:!1,type:Boolean,default(){return!0}}},computed:{page_sizes(){const t=[];this.pagination.per_page<10&&t.push(this.pagination.per_page);const e=[10,20,50,80,100,120,150];return[...t,...e,...this.extra_sizes]},pager_layout(){return this.isMobile?"total, sizes, jumper, prev, next":"total, sizes, jumper , prev, pager, next"}},methods:{changePage(t){this.pagination.page=t,this.$emit("fetch")},changeSize(t){this.pagination.per_page=t,this.$emit("per_page_change",t),this.$emit("fetch")}}},$Le={class:"fcom_pagination_wrap"};function ALe(t,e,n,i,s,o){const r=mge;return v(),A("div",$Le,[_(r,{background:!1,size:"small","pager-count":5,layout:o.pager_layout,onCurrentChange:o.changePage,onSizeChange:o.changeSize,"hide-on-single-page":n.hide_on_single,"current-page":n.pagination.page,"page-sizes":o.page_sizes,"page-size":n.pagination.per_page,total:n.pagination.total},null,8,["layout","onCurrentChange","onSizeChange","hide-on-single-page","current-page","page-sizes","page-size","total"])])}const Jc=de(SLe,[["render",ALe]]),ELe={name:"ReportReviewModal",components:{Pagination:Jc},data(){return{isOpen:!1,loading:!1,content:{},postReports:[],report:null,type:null,ignoring:!1,unpublishing:!1,pagination:{page:1,per_page:10,total:0}}},computed:{getReason(){return t=>this.appVars.report_reasons[t]},isContentLive(){var t;return((t=this.content)==null?void 0:t.status)=="published"},getPublishBtnText(){return this.isContentLive?this.$t("Dismiss Reports"):this.$t("Approve")+" "+this.$t(this.ucFirst(this.type))},getUnpublishBtnText(){return this.isContentLive?this.$t("Unpublish")+" "+this.$t(this.ucFirst(this.type)):this.$t("Remove")+" "+this.$t(this.ucFirst(this.type))}},methods:{closeModal(){this.isOpen=!1,this.content={},this.type=null,this.postReports=[],this.report=null,this.pagination={page:1,per_page:10,total:0}},showReportReviewModal(t){this.isOpen=!0,this.content=t.content,this.type=t.type,this.getPostReports()},getPostReports(){var e;this.loading=!0;let t={page:this.pagination.page,per_page:this.pagination.per_page,content_type:this.type,space_id:(e=this.content)==null?void 0:e.space_id};this.type=="comment"?t.parent_id=this.content.id:t.post_id=this.content.id,this.$get("moderation/reports",t).then(n=>{this.postReports=n.reports.data,this.report=n.reports.data[0]||null,this.pagination.total=n.reports.total}).catch(n=>{this.$handleError(n)}).finally(()=>{this.loading=!1})},ignoreReport(){var t,e;if(!((t=this.report)!=null&&t.id)){this.$notify.error(this.$t("No moderation report found for this content."));return}this.ignoring=!0,this.$put("moderation/reports/"+this.report.id,{space_id:(e=this.content)==null?void 0:e.space_id,status:"ignored"}).then(n=>{this.$notify.success(n.message),this.isOpen=!1,this.$eventBus.emit("updateModerationReport",{content:n.content,action:"ignored",type:this.type}),this.closeModal()}).catch(n=>{this.$handleError(n)}).finally(()=>{this.ignoring=!1})},unpublishReport(){var t,e;if(!((t=this.report)!=null&&t.id)){this.$notify.error(this.$t("No moderation report found for this content."));return}this.unpublishing=!0,this.$put("moderation/reports/"+this.report.id,{space_id:(e=this.content)==null?void 0:e.space_id,status:"unpublished"}).then(n=>{this.$notify.success(n.message),this.isOpen=!1,this.$eventBus.emit("updateModerationReport",{content:n.content,action:"unpublished",type:this.type}),this.closeModal()}).catch(n=>{this.$handleError(n)}).finally(()=>{this.unpublishing=!1})}},created(){this.$eventBus.on("showReportReviewModal",this.showReportReviewModal)},beforeUnmount(){this.$eventBus.off("showReportReviewModal",this.showReportReviewModal)}},MLe={class:"dialog_body"},TLe={class:"report_details"},PLe={class:"report_details_header"},ILe={class:"report_details_header_left"},LLe={class:"report_details_header_right"},OLe={key:0},DLe={key:1},RLe={key:1},VLe={class:"report_reason"},FLe=["title"],NLe={key:0,class:"report_details_body"},BLe=["textContent"],zLe={key:2,role:"region","aria-label":"Pagination",class:"pagination_wrap"},HLe={class:"dialog_footer report_footer"};function ULe(t,e,n,i,s,o){const r=W("UserAvatar"),a=W("UserRouteLink"),l=Wt,c=W("Pagination"),u=We,d=Ss;return v(),D(d,{modelValue:s.isOpen,"onUpdate:modelValue":e[3]||(e[3]=h=>s.isOpen=h),"modal-class":"fcom_common_dialog",id:"fluent_comminity_body",width:t.dialogWidth,"append-to-body":!0,"close-on-click-modal":!1,direction:"rtl",onClose:o.closeModal},{footer:w(()=>[g("div",HLe,[_(u,{class:"fcom_secondary_button",onClick:e[1]||(e[1]=h=>o.unpublishReport()),loading:s.unpublishing,disabled:!s.loading&&!s.report},{default:w(()=>[B(S(o.getUnpublishBtnText),1)]),_:1},8,["loading","disabled"]),_(u,{class:"fcom_primary_button",onClick:e[2]||(e[2]=h=>o.ignoreReport()),loading:s.ignoring,disabled:!s.loading&&!s.report},{default:w(()=>[B(S(o.getPublishBtnText),1)]),_:1},8,["loading","disabled"])])]),default:w(()=>{var h,f;return[g("div",MLe,[g("h4",null,S(t.$t("Reports")+" ("+((f=(h=s.content)==null?void 0:h.meta)==null?void 0:f.reports_count)+")"),1),g("div",TLe,[s.loading?(v(),D(l,{key:1,rows:5,animated:!0})):(v(!0),A(ee,{key:0},Ce(s.postReports,p=>(v(),A("div",{key:p.id,class:"report_details_item"},[g("div",PLe,[g("div",ILe,[p.reporter?(v(),D(r,{key:0,with_level:!1,xprofile:p.reporter},null,8,["xprofile"])):O("",!0)]),g("div",LLe,[!p.reporter&&!o.getReason(p.reason)?(v(),A("div",OLe,S(t.$t("Flagged automatically by the site rule")),1)):(v(),A("div",DLe,[p.reporter?(v(),D(a,{key:0,show_verified:!1,xprofile:p.reporter},null,8,["xprofile"])):(v(),A("span",RLe,S(t.$t("By System ")),1)),o.getReason(p.reason)?(v(),A(ee,{key:2},[g("span",null,S(t.$t("reported for ")),1),g("span",VLe,S(o.getReason(p.reason)),1)],64)):O("",!0)])),g("div",{title:p.created_at,class:"meta_line"},S(t.humanDateDiff(p.created_at)),9,FLe)])]),p.explanation?(v(),A("div",NLe,[g("div",{textContent:S(p.explanation)},null,8,BLe)])):O("",!0)]))),128)),s.pagination.total?(v(),A("div",zLe,[_(c,{hide_on_single:!0,onFetch:e[0]||(e[0]=p=>o.getPostReports()),pagination:s.pagination},null,8,["pagination"])])):O("",!0)])])]}),_:1},8,["modelValue","width","onClose"])}const jLe=de(ELe,[["render",ULe]]),WLe={name:"ReportContentModal",data(){return{reportConfig:null,showModal:!1,saving:!1,contentType:"",reportReason:"",reportExplanation:""}},computed:{currentTitle(){return this.contentType=="comment"?this.$t("Report Comment"):this.$t("Report Post")}},methods:{closeModal(){this.showModal=!1},showReportContentModal(t){this.showModal=!0,this.reportReason="",this.reportExplanation="",this.contentType=t.type,this.reportConfig=t.reportConfig},validateAndSubmit(){if(!this.reportReason){this.$handleError(this.$t("Please select a reason for reporting this content"));return}this.submitReport()},getParentId(){return this.contentType=="comment"?this.reportConfig.id:null},getPostId(){return this.contentType=="post"?this.reportConfig.id:this.reportConfig.post_id},submitReport(){this.saving=!0,this.$post("moderation/report",{content_type:this.contentType,user_id:this.auth.user_id,post_id:this.getPostId(),parent_id:this.getParentId(),reason:this.reportReason,explanation:this.reportExplanation}).then(t=>{this.$notify.success(t.message),this.$eventBus.emit("updateModerationReport",{content:t.content,action:"reported"}),this.closeModal()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},created(){this.$eventBus.on("showReportContentModal",this.showReportContentModal)},beforeUnmount(){this.$eventBus.off("showReportContentModal",this.showReportContentModal)}},YLe={class:"dialog_header"},qLe={class:"dialog_left"},GLe={class:"dialog_body"},XLe={class:"fcom_report_content_form"},KLe={class:"dialog_footer"};function ZLe(t,e,n,i,s,o){const r=on,a=Jt,l=en,c=ft,u=sn,d=We,h=Ss;return s.showModal?(v(),D(h,{key:0,"modal-class":"fcom_common_dialog","append-to-body":!0,"close-on-click-modal":!1,width:t.drawerWidth,modelValue:s.showModal,"onUpdate:modelValue":e[4]||(e[4]=f=>s.showModal=f),direction:"rtl",onClose:o.closeModal},{header:w(()=>[g("div",YLe,[g("div",qLe,[g("h4",null,S(o.currentTitle),1)])])]),footer:w(()=>[g("div",KLe,[_(d,{class:"fcom_secondary_button",onClick:e[2]||(e[2]=f=>o.closeModal())},{default:w(()=>[B(S(t.$t("Cancel")),1)]),_:1}),_(d,{class:"fcom_primary_button",onClick:e[3]||(e[3]=f=>o.validateAndSubmit()),loading:s.saving},{default:w(()=>[B(S(t.$t("Report")),1)]),_:1},8,["loading"])])]),default:w(()=>[g("div",GLe,[g("div",XLe,[_(u,{ref:"reportForm","label-position":"top"},{default:w(()=>[_(l,{label:t.$t("Reason")},{default:w(()=>[_(a,{modelValue:s.reportReason,"onUpdate:modelValue":e[0]||(e[0]=f=>s.reportReason=f),placeholder:t.$t("Please select a reason for reporting this content")},{default:w(()=>[(v(!0),A(ee,null,Ce(t.appVars.report_reasons,(f,p)=>(v(),D(r,{key:p,label:f,value:p},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),_(l,{label:t.$t("Explanation")},{default:w(()=>[_(c,{modelValue:s.reportExplanation,"onUpdate:modelValue":e[1]||(e[1]=f=>s.reportExplanation=f),placeholder:t.$t("Provide an explanation (Optional)"),type:"textarea",rows:4,maxlength:1e3,"show-word-limit":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1},512)])])]),_:1},8,["width","modelValue","onClose"])):O("",!0)}const JLe=de(WLe,[["render",ZLe]]);/*! Element Plus v2.13.6 */var mH={name:"en",el:{breadcrumb:{label:"Breadcrumb"},colorpicker:{confirm:"OK",clear:"Clear",defaultLabel:"color picker",description:"current color is {color}. press enter to select a new color.",alphaLabel:"pick alpha value",alphaDescription:"alpha {alpha}, current color is {color}",hueLabel:"pick hue value",hueDescription:"hue {hue}, current color is {color}",svLabel:"pick saturation and brightness value",svDescription:"saturation {saturation}, brightness {brightness}, current color is {color}",predefineDescription:"select {value} as the color"},datepicker:{now:"Now",today:"Today",cancel:"Cancel",clear:"Clear",confirm:"OK",dateTablePrompt:"Use the arrow keys and enter to select the day of the month",monthTablePrompt:"Use the arrow keys and enter to select the month",yearTablePrompt:"Use the arrow keys and enter to select the year",selectedDate:"Selected date",selectDate:"Select date",selectTime:"Select time",startDate:"Start Date",startTime:"Start Time",endDate:"End Date",endTime:"End Time",prevYear:"Previous Year",nextYear:"Next Year",prevMonth:"Previous Month",nextMonth:"Next Month",year:"",month1:"January",month2:"February",month3:"March",month4:"April",month5:"May",month6:"June",month7:"July",month8:"August",month9:"September",month10:"October",month11:"November",month12:"December",weeks:{sun:"Sun",mon:"Mon",tue:"Tue",wed:"Wed",thu:"Thu",fri:"Fri",sat:"Sat"},weeksFull:{sun:"Sunday",mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday"},months:{jan:"Jan",feb:"Feb",mar:"Mar",apr:"Apr",may:"May",jun:"Jun",jul:"Jul",aug:"Aug",sep:"Sep",oct:"Oct",nov:"Nov",dec:"Dec"}},inputNumber:{decrease:"decrease number",increase:"increase number"},select:{loading:"Loading",noMatch:"No matching data",noData:"No data",placeholder:"Select"},mention:{loading:"Loading"},dropdown:{toggleDropdown:"Toggle Dropdown"},cascader:{noMatch:"No matching data",loading:"Loading",placeholder:"Select",noData:"No data"},pagination:{goto:"Go to",pagesize:"/page",total:"Total {total}",pageClassifier:"",page:"Page",prev:"Go to previous page",next:"Go to next page",currentPage:"page {pager}",prevPages:"Previous {pager} pages",nextPages:"Next {pager} pages",deprecationWarning:"Deprecated usages detected, please refer to the el-pagination documentation for more details"},dialog:{close:"Close this dialog"},drawer:{close:"Close this dialog"},messagebox:{title:"Message",confirm:"OK",cancel:"Cancel",error:"Illegal input",close:"Close this dialog"},upload:{deleteTip:"press delete to remove",delete:"Delete",preview:"Preview",continue:"Continue"},slider:{defaultLabel:"slider between {min} and {max}",defaultRangeStartLabel:"pick start value",defaultRangeEndLabel:"pick end value"},table:{emptyText:"No Data",confirmFilter:"Confirm",resetFilter:"Reset",clearFilter:"All",sumText:"Sum",selectAllLabel:"Select all rows",selectRowLabel:"Select this row",expandRowLabel:"Expand this row",collapseRowLabel:"Collapse this row",sortLabel:"Sort by {column}",filterLabel:"Filter by {column}"},tag:{close:"Close this tag"},tour:{next:"Next",previous:"Previous",finish:"Finish",close:"Close this dialog"},tree:{emptyText:"No Data"},transfer:{noMatch:"No matching data",noData:"No data",titles:["List 1","List 2"],filterPlaceholder:"Enter keyword",noCheckedFormat:"{total} items",hasCheckedFormat:"{checked}/{total} checked"},image:{error:"FAILED"},pageHeader:{title:"Back"},popconfirm:{confirmButtonText:"Yes",cancelButtonText:"No"},carousel:{leftArrow:"Carousel arrow left",rightArrow:"Carousel arrow right",indicator:"Carousel switch to index {index}"}}};let QLe=window.fluentComAdmin.el_i18n;for(const[t,e]of Object.entries(QLe))mH.el[t]=e;const eOe={name:"PortalApplication",components:{Back:nH,SpaceCreateModal:wPe,CourseIcon:lH,AnalyticsIcon:sTe,MentionPopover:vLe,UnfinishedChangesModal:xLe,ReportReviewModal:jLe,ReportContentModal:JLe},data(){return{loading:!1,hasSearchHolder:!1,hasNotificationHolder:!1,isSmallScreen:!1,menuItems:this.appVars.portalSettingsMenus,enLang:mH}},created(){this.isSmallScreen=window.innerWidth<=1024}},tOe={class:"fcom_general_menu"},nOe=["href"],sOe={class:"el-icon fcom_arrow_icon"},iOe={class:"fcom_communities_menu fcom_admin_menu"},oOe={class:"fcom_general_menu"},rOe={class:"community_avatar"},aOe={class:"fcom_shape"},lOe={class:"community_name"},cOe={class:"fcom_general_menu"},uOe={class:"community_avatar"},dOe={class:"fcom_shape"},hOe={class:"community_name"},fOe={class:"fcom_general_menu"},pOe={class:"community_avatar"},mOe={class:"fcom_shape"},gOe={class:"community_name"};function vOe(t,e,n,i,s,o){const r=W("router-view"),a=W("Back"),l=be,c=W("router-link"),u=W("CourseIcon"),d=W("AnalyticsIcon"),h=W("space-create-modal"),f=W("mention-popover"),p=W("unfinished-changes-modal"),m=W("report-review-modal"),y=W("report-content-modal"),b=mce;return v(),D(b,{locale:s.enLang},{default:w(()=>[_(r),(v(),D(Sa,{to:"#fcom_menu_sidebar"},[g("ul",tOe,[g("li",null,[g("a",{href:t.appVars.portal_url},[g("i",sOe,[_(a)]),g("span",null,S(t.$t("Back to home")),1)],8,nOe)])]),g("div",iOe,[Object.keys(s.menuItems).length>0?(v(),A(ee,{key:0},[g("h4",null,S(t.$t("Portal Settings")),1),g("ul",oOe,[(v(!0),A(ee,null,Ce(s.menuItems,k=>(v(),A("li",{key:k.route,class:G("settings_inner_menu_"+k.route)},[_(c,{to:{name:k.route}},{default:w(()=>[g("div",rOe,[g("span",aOe,[_(l,{innerHTML:k.icon_svg},null,8,["innerHTML"])])]),g("span",lOe,S(k.label),1)]),_:2},1032,["to"])],2))),128))])],64)):O("",!0),t.hasFeature("has_course")&&t.hasCourseCreatorAccess()?(v(),A(ee,{key:1},[g("h4",null,S(t.$t("Course Management")),1),g("ul",cOe,[g("li",null,[_(c,{to:{name:"manage_courses"}},{default:w(()=>[g("div",uOe,[g("span",dOe,[_(l,null,{default:w(()=>[_(u)]),_:1})])]),g("span",hOe,S(t.$t("Manage Courses")),1)]),_:1})])])],64)):O("",!0),t.hasFeature("has_analytics")&&t.isAdmin()?(v(),A(ee,{key:2},[g("h4",null,S(t.$t("Reports")),1),g("ul",fOe,[g("li",null,[_(c,{to:{name:"analytics_overview"}},{default:w(()=>[g("div",pOe,[g("span",mOe,[_(l,null,{default:w(()=>[_(d)]),_:1})])]),g("span",gOe,S(t.$t("Analytics")),1)]),_:1})])])],64)):O("",!0)])])),_(h),_(f),_(p),_(m),_(y)]),_:1},8,["locale"])}const _Oe=de(eOe,[["render",vOe]]),yOe={name:"AddMembersForm",components:{SpaceCourseSelector:Z5},props:{context:{type:String,required:!0},target:{type:Object,required:!0}},emits:["completed","membersAdded"],data(){return{sourceMode:"wp_users",wpUsers:[],wpLoading:!1,currentSearch:"",inviting:!1,selectedUserIds:[],role:"member",saving:!1,selectedSourceId:"",selectedSourceType:"",selectedSourceSlug:"",csvRows:[],csvFileName:"",createMissingUsers:!1,sendWelcomeEmailCsv:!1,sendWelcomeEmailCrm:!1,wpUsersLoaded:!1,crmTags:[],crmTagsLoading:!1,crmTagsLoaded:!1,selectedTagId:null,createMissingCrmUsers:!1,batchRunning:!1,batchProgress:0,batchProcessed:0,batchTotal:0,importDone:null}},computed:{isEmail(){return/^\S+@\S+\.\S+$/.test(this.currentSearch)}},watch:{sourceMode(t){t==="wp_users"&&!this.wpUsersLoaded&&this.fetchWpUsers(),t==="crm_tag"&&this.appVars.pro&&!this.crmTagsLoaded&&this.fetchCrmTags()},createMissingUsers(t){t||(this.sendWelcomeEmailCsv=!1)},createMissingCrmUsers(t){t||(this.sendWelcomeEmailCrm=!1)}},methods:{invitingLabel(t){return t?this.$t("Send Invitation to %s",t):this.$t("Send Invitation")},searchWpUsers(t=""){this.currentSearch=(t||"").trim(),!(t&&t.length<2)&&this.fetchWpUsers(t)},fetchWpUsers(t=""){this.wpLoading=!0;const e=this.context==="course",n=e?`admin/courses/${this.target.id}/users/search`:"spaces/users/search",i=e?{search:t}:{context:"add_member",search:t,space_id:this.target.id};this.$get(n,i).then(s=>{this.wpUsers=s.users.data,this.wpUsersLoaded=!0}).catch(s=>{this.$handleError(s)}).finally(()=>{this.wpLoading=!1})},addWpUsers(){if(!this.selectedUserIds.length)return;const t=this.context==="course";if(this.selectedUserIds.length===1){this.saving=!0;const i=t?"admin/courses/"+this.target.id+"/students":"spaces/"+this.target.slug+"/members",s=t?{user_id:this.selectedUserIds[0]}:{user_id:this.selectedUserIds[0],role:this.role};this.$post(i,s).then(o=>{this.$notify.success(o.message),this.$emit("completed")}).catch(o=>{this.$handleError(o)}).finally(()=>{this.saving=!1});return}const e=t?"admin/courses/"+this.target.id+"/students/bulk-add":"spaces/"+this.target.slug+"/members/bulk-add",n=t?{}:{role:this.role};this.runChunkedImport(this.selectedUserIds,i=>({url:e,data:{user_ids:i,...n}}))},inviteToSpace(){if(this.context!=="space")return;const t=this.currentSearch;this.inviting=!0,this.$post("invitations",{email:t,space_id:this.target.id}).then(e=>{this.$notify.success(e.message||this.$t("Invitation sent.")),this.currentSearch="",this.fetchWpUsers("")}).catch(e=>{this.$handleError(e)}).finally(()=>this.inviting=!1)},importFromSource(){if(!this.selectedSourceId){this.$notify.error(this.$t("Please select a source space or course."));return}const t=this.context==="course",e=this.selectedSourceType==="course";if(e&&!parseInt(this.selectedSourceId,10)){this.$notify.error(this.$t("Invalid source course."));return}if(!e&&!this.selectedSourceSlug){this.$notify.error(this.$t("Invalid source space."));return}const n=t?"admin/courses/"+this.target.id+"/students/bulk-add":"spaces/"+this.target.slug+"/members/bulk-add",i=e?{from_course_id:parseInt(this.selectedSourceId,10)}:{from_space_slug:this.selectedSourceSlug};this.runOffsetImport(n,i)},downloadSampleCsv(){this.$exportToCsv([{Name:"John Doe",Email:"john@example.com",Username:"johndoe"},{Name:"Jane Smith",Email:"jane@example.com",Username:"janesmith"},{Name:"Bob Lee",Email:"bob@example.com",Username:"boblee"}],"fcom-bulk-import-sample-"+this.context+".csv")},onCsvFileChange(t){if(t&&t.status&&t.status!=="ready")return;const e=t.raw||t;if(!e)return;this.csvFileName=e.name||"import.csv";const n=new FileReader;n.onload=i=>{this.csvRows=this.parseCsvText(i.target.result.trim()),this.csvRows.length||this.$notify.error(this.$t("No valid rows found. Ensure columns are Name, Email, Username."))},n.readAsText(e)},resetCsvImport(){this.csvRows=[],this.csvFileName=""},splitCsvLine(t){return t.split(/,(?=(?:[^"]*"[^"]*")*[^"]*$)/).map(e=>e.trim().replace(/^"|"$/g,"").replace(/""/g,'"'))},parseCsvText(t){const e=t.split(/\r?\n/).map(d=>d.trim()).filter(Boolean);if(!e.length)return[];const n=this.splitCsvLine(e[0]).map(d=>d.toLowerCase()),i=["name","email","username"],s=n.some(d=>i.includes(d));let o=0,r=1,a=2,l=0;s&&(l=1,o=n.indexOf("name"),r=n.indexOf("email"),a=n.indexOf("username"));const c=new Set,u=[];for(let d=l;d<e.length;d++){const h=this.splitCsvLine(e[d]),f=o>=0&&h[o]||"",p=r>=0?(h[r]||"").toLowerCase():"",m=a>=0&&h[a]||"";!p.includes("@")||c.has(p)||(c.add(p),u.push({name:f,email:p,username:m}))}return u},importCsv(){if(!this.csvRows.length)return;let t=`spaces/${this.target.slug}/members/bulk-import`;this.context==="course"&&(t=`admin/courses/${this.target.id}/students/bulk-import`);const e=100,n=this.csvRows.length,i={added:0,skipped:0,failed:0};this.batchRunning=!0,this.batchTotal=n,this.batchProcessed=0,this.batchProgress=0;const s=o=>{if(o>=n){this.batchRunning=!1,this.importDone={...i,total:n},this.$emit("membersAdded");return}const r=this.csvRows.slice(o,o+e);this.$post(t,{rows:r,create_missing:this.createMissingUsers,notify_new_users:this.sendWelcomeEmailCsv}).then(a=>{i.added+=a.added||0,i.skipped+=a.skipped||0,i.failed+=a.failed||0;const l=a.processed&&a.processed>0?a.processed:r.length,c=o+l;this.batchProcessed=Math.min(n,c),this.batchProgress=Math.round(this.batchProcessed/n*100),s(c)}).catch(a=>{this.$handleError(a),this.batchRunning=!1,this.importDone={...i,total:n},this.$emit("membersAdded")})};s(0)},fetchCrmTags(){this.crmTagsLoading=!0,this.$get("settings/crm-tagging-config").then(t=>{this.crmTags=t.crm_tags||[],this.crmTagsLoaded=!0}).catch(t=>{this.$handleError(t)}).finally(()=>{this.crmTagsLoading=!1})},addFromCrmTag(){if(!this.selectedTagId)return;const t=this.context==="course",e=t?`admin/courses/${this.target.id}/students/resolve-crm-tag`:`spaces/${this.target.slug}/members/resolve-crm-tag`,n=t?`admin/courses/${this.target.id}/students/bulk-add`:`spaces/${this.target.slug}/members/bulk-add`,i=[];let s=0;this.batchRunning=!0,this.batchTotal=0,this.batchProcessed=0,this.batchProgress=0;const o=()=>{this.batchRunning=!1;const a=i.length+s;this.importDone={added:0,skipped:0,failed:s,total:a},this.$emit("membersAdded")},r=a=>{this.$post(e,{tag_id:this.selectedTagId,create_missing:this.createMissingCrmUsers,notify_new_users:this.sendWelcomeEmailCrm,offset:a,per_page:200}).then(l=>{if(l.user_ids&&l.user_ids.length&&i.push(...l.user_ids),s+=l.failed||0,l.has_more){r(l.next_offset);return}if(!i.length){o();return}this.runChunkedImport(i,c=>({url:n,data:{user_ids:c}}),s)}).catch(l=>{this.$handleError(l),this.batchRunning=!1;const c=i.length+s;this.importDone={added:0,skipped:0,failed:s,total:c},this.$emit("membersAdded")})};r(0)},runChunkedImport(t,e,n=0){const s=t.length,o={added:0,skipped:0,failed:n},r=s+n;this.batchRunning=!0,this.batchTotal=s,this.batchProcessed=0,this.batchProgress=0;const a=l=>{if(l>=s){this.batchRunning=!1,this.importDone={...o,total:r},this.$emit("membersAdded");return}const c=t.slice(l,l+500),{url:u,data:d}=e(c);this.$post(u,d).then(h=>{o.added+=h.added||0,o.skipped+=h.skipped||0,o.failed+=h.failed||0;const f=h.processed&&h.processed>0?h.processed:c.length,p=l+f;this.batchProcessed=Math.min(s,p),this.batchProgress=Math.round(this.batchProcessed/s*100),a(p)}).catch(h=>{this.$handleError(h),this.batchRunning=!1,this.importDone={...o,total:r},this.$emit("membersAdded")})};a(0)},runOffsetImport(t,e){const n={added:0,skipped:0,failed:0};this.batchRunning=!0,this.batchTotal=0,this.batchProcessed=0,this.batchProgress=0;const i=s=>{this.$post(t,{...e,offset:s,per_page:500}).then(o=>{n.added+=o.added||0,n.skipped+=o.skipped||0,n.failed+=o.failed||0,o.total&&!this.batchTotal&&(this.batchTotal=o.total),this.batchProcessed=o.next_offset||s+(o.processed||0),this.batchProgress=this.batchTotal?Math.min(99,Math.round(this.batchProcessed/this.batchTotal*100)):50,o.has_more?i(o.next_offset||this.batchProcessed):(this.batchProgress=100,this.batchRunning=!1,this.importDone={...n,total:this.batchTotal||n.added+n.skipped+n.failed},this.$emit("membersAdded"))}).catch(o=>{this.$handleError(o),this.batchRunning=!1,this.importDone={...n,total:this.batchTotal||n.added+n.skipped+n.failed},this.$emit("membersAdded")})};i(0)}},mounted(){this.sourceMode==="wp_users"&&!this.wpUsersLoaded&&this.fetchWpUsers()}},bOe={class:"fcom_add_members_form"},wOe={key:0,class:"fcom_source_selector_wrap fcom_mb_20"},kOe={key:1,class:"fcom_import_done"},COe=g("div",{class:"fcom_done_icon_wrap"},[g("div",{class:"fcom_done_circle"},[g("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[g("path",{d:"M4 10l4.5 4.5L16 6",stroke:"white","stroke-width":"2.2","stroke-linecap":"round","stroke-linejoin":"round"})])])],-1),xOe={class:"fcom_done_title"},SOe={class:"fcom_done_subtitle"},$Oe={class:"fcom_import_summary"},AOe={class:"fcom_import_summary_title"},EOe={class:"fcom_import_summary_row"},MOe={class:"fcom_import_summary_row"},TOe={key:0,class:"fcom_import_summary_row"},POe={key:1,class:"fcom_import_summary_row"},IOe={key:2,class:"fcom_import_progress_wrap"},LOe={class:"fcom_help_text fcom_mb_15"},OOe={key:0,class:"fcom_muted_text fcom_mt_10"},DOe={class:"fcom_select_photo",style:{float:"left"}},ROe=["src","alt"],VOe={style:{float:"right",color:"#8492a6","font-size":"13px"}},FOe={style:{padding:"4px","text-align":"center"}},NOe={style:{margin:"0 0 8px"}},BOe={key:0},zOe={key:1},HOe={key:2},UOe={key:1,style:{margin:"4px 0 0","font-size":"12px"}},jOe={key:0,class:"fcom_help_text fcom_mb_10"},WOe=["href"],YOe={class:"fcom_help_text fcom_mb_15"},qOe={key:0},GOe={key:2},XOe={class:"fcom_spaced_flex fcom_mb_10"},KOe=g("span",null,null,-1),ZOe={class:"fcom_csv_drop_inner"},JOe=g("div",{class:"fcom_csv_drop_arrow"},"↑",-1),QOe={class:"el-upload__text fcom_mt_10"},eDe={key:0},tDe={class:"el-upload__tip"},nDe={class:"fcom_spaced_flex fcom_mb_10"},sDe={class:"fcom_muted_text",style:{"margin-left":"8px"}},iDe={key:0,class:"fcom_muted_text fcom_mb_10"},oDe=["aria-label"],rDe={class:"fcom_help_text fcom_mb_15"},aDe=["aria-label"],lDe={class:"fcom_help_text fcom_mb_15"},cDe={key:0};function uDe(t,e,n,i,s,o){const r=sp,a=xs,l=Lb,c=on,u=We,d=Jt,h=en,f=sn,p=W("SpaceCourseSelector"),m=A1,y=Xr,b=Gr,k=Gt,C=xt("loading");return v(),A("div",bOe,[!s.batchRunning&&!s.importDone?(v(),A("div",wOe,[_(a,{modelValue:s.sourceMode,"onUpdate:modelValue":e[0]||(e[0]=$=>s.sourceMode=$),size:"small"},{default:w(()=>[_(r,{value:"wp_users"},{default:w(()=>[B(S(t.$t("WP Users")),1)]),_:1}),_(r,{value:"from_source"},{default:w(()=>[B(S(t.$t("From Space/Course")),1)]),_:1}),_(r,{value:"csv"},{default:w(()=>[B(S(t.$t("CSV Import")),1)]),_:1}),t.appVars.has_fluentcrm?(v(),D(r,{key:0,value:"crm_tag"},{default:w(()=>[B(S(t.$t("CRM Tag")),1)]),_:1})):O("",!0)]),_:1},8,["modelValue"])])):O("",!0),s.importDone?(v(),A("div",kOe,[COe,g("h3",xOe,S(t.$t("All Done!")),1),g("p",SOe,S(t.$t("Import has been completed. You may close this now.")),1),g("div",$Oe,[g("strong",AOe,S(t.$t("Import Summary")),1),g("p",EOe,S(t.$t("Total Records:"))+" "+S(s.importDone.total),1),g("p",MOe,S(n.context==="course"?t.$t("Enrolled:"):t.$t("Added:"))+" "+S(s.importDone.added),1),s.importDone.skipped?(v(),A("p",TOe,S(t.$t("Skipped:"))+" "+S(s.importDone.skipped),1)):O("",!0),s.importDone.failed?(v(),A("p",POe,S(t.$t("Failed:"))+" "+S(s.importDone.failed),1)):O("",!0)])])):s.batchRunning?(v(),A("div",IOe,[g("div",LOe,[g("p",null,S(t.$t("Importing… Please do not close this window.")),1)]),_(l,{percentage:s.batchProgress,"stroke-width":12},null,8,["percentage"]),s.batchTotal?(v(),A("p",OOe,S(s.batchProcessed)+" / "+S(s.batchTotal)+" "+S(t.$t("processed")),1)):O("",!0)])):(v(),A(ee,{key:3},[s.sourceMode==="wp_users"?(v(),D(f,{key:0,onSubmit:e[5]||(e[5]=Ae(()=>{},["prevent"])),"label-position":"top"},{default:w(()=>[_(h,{label:t.$t("Users")},{default:w(()=>[_(d,{class:"rich_select","fit-input-width":"",multiple:"",filterable:"",remote:"","default-first-option":"","reserve-keyword":!1,loading:s.wpLoading,"remote-method":o.searchWpUsers,placeholder:t.$t("Search and select users"),modelValue:s.selectedUserIds,"onUpdate:modelValue":e[2]||(e[2]=$=>s.selectedUserIds=$)},{empty:w(()=>[g("div",FOe,[g("p",NOe,[o.isEmail?(v(),A("span",BOe,[B(S(t.$t("User not registered:"))+" ",1),g("strong",null,S(s.currentSearch),1)])):s.currentSearch?(v(),A("span",zOe,S(t.$t("No matching user found.")),1)):(v(),A("span",HOe,S(t.$t("No data")),1))]),n.context==="space"?(v(),A(ee,{key:0},[o.isEmail?(v(),D(u,{key:0,size:"small",class:"fcom_primary_button",loading:s.inviting,disabled:s.inviting,"aria-label":o.invitingLabel(s.currentSearch),onClick:e[1]||(e[1]=$=>o.inviteToSpace())},{default:w(()=>[B(S(t.$t("Send Email Invitation")),1)]),_:1},8,["loading","disabled","aria-label"])):s.currentSearch?(v(),A("p",UOe,S(t.$t("Type a valid email to invite.")),1)):O("",!0)],64)):O("",!0)])]),default:w(()=>[(v(!0),A(ee,null,Ce(s.wpUsers,$=>(v(),D(c,{class:"fcom_with_photo_option",key:$.ID,label:`${$.display_name} (${$.user_email||$.ID})`,value:$.ID},{default:w(()=>[g("span",DOe,[g("img",{src:$.photo,alt:$.display_name},null,8,ROe),g("span",null,S($.display_name),1)]),g("span",VOe,S($.user_email||$.ID),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["loading","remote-method","placeholder","modelValue"])]),_:1},8,["label"]),n.context==="space"?(v(),D(h,{key:0,label:t.$t("Membership Role")},{default:w(()=>[_(d,{modelValue:s.role,"onUpdate:modelValue":e[3]||(e[3]=$=>s.role=$),placeholder:t.$t("Select Role")},{default:w(()=>[_(c,{label:t.$t("Member"),value:"member"},null,8,["label"]),_(c,{label:t.$t("Moderator"),value:"moderator"},null,8,["label"]),_(c,{label:t.$t("Admin"),value:"admin"},null,8,["label"])]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])):O("",!0),_(h,null,{default:w(()=>[s.selectedUserIds.length>1&&!t.appVars.pro?(v(),A("div",jOe,[g("p",null,[B(S(t.$t("Bulk adding requires FluentCommunity Pro."))+" ",1),t.appVars.upgrade_url?(v(),A("a",{key:0,href:t.$upgradeUrl("feature_lock_bulk_add_members"),target:"_blank"},S(t.$t("Upgrade")),9,WOe)):O("",!0)])])):O("",!0),De((v(),D(u,{class:"fcom_primary_button",onClick:e[4]||(e[4]=$=>o.addWpUsers())},{default:w(()=>[B(S(n.context==="course"?t.$t("Add Students"):t.$t("Add as %s",s.role)),1)]),_:1})),[[C,s.saving]])]),_:1})]),_:1})):s.sourceMode==="from_source"?(v(),D(f,{key:1,"label-position":"top"},{default:w(()=>[_(h,{label:t.$t("Select Source Space or Course")},{default:w(()=>[_(p,{modelValue:s.selectedSourceId,"onUpdate:modelValue":e[6]||(e[6]=$=>s.selectedSourceId=$),placeholder_text:t.$t("Select a space or course..."),memberships:[n.target.id.toString()],onSelectedType:e[7]||(e[7]=$=>s.selectedSourceType=$),onSelectedSlug:e[8]||(e[8]=$=>s.selectedSourceSlug=$)},null,8,["modelValue","placeholder_text","memberships"])]),_:1},8,["label"]),g("div",YOe,[g("p",null,S(n.context==="course"?t.$t("All users will be enrolled as Student."):t.$t("All users will be added as Member.")),1)]),_(u,{class:"fcom_primary_button",onClick:e[9]||(e[9]=$=>o.importFromSource())},{default:w(()=>[B(S(n.context==="course"?t.$t("Import Students"):t.$t("Import Members"))+" ",1),t.appVars.pro?O("",!0):(v(),A("span",qOe,"  ("+S(t.$t("Pro"))+")",1))]),_:1})]),_:1})):s.sourceMode==="csv"?(v(),A("div",GOe,[s.csvRows.length?(v(),A(ee,{key:1},[g("div",nDe,[g("div",null,[g("strong",null,S(s.csvFileName),1),g("span",sDe,S(s.csvRows.length)+" "+S(t.$t("contacts")),1)]),_(u,{link:"",size:"small",onClick:e[11]||(e[11]=$=>o.resetCsvImport())},{default:w(()=>[B(S(t.$t("Change")),1)]),_:1})]),_(b,{data:s.csvRows.slice(0,5),size:"small",class:"fcom_mb_10"},{default:w(()=>[_(y,{prop:"name",label:t.$t("Name"),"min-width":"120"},null,8,["label"]),_(y,{prop:"email",label:t.$t("Email"),"min-width":"160"},null,8,["label"]),_(y,{prop:"username",label:t.$t("Username"),"min-width":"110"},null,8,["label"])]),_:1},8,["data"]),s.csvRows.length>5?(v(),A("p",iDe," + "+S(s.csvRows.length-5)+" "+S(t.$t("more rows")),1)):O("",!0),_(f,{"label-position":"top"},{default:w(()=>[_(h,null,{default:w(()=>[g("div",{role:"group","aria-label":t.$t("Create WordPress accounts for new email addresses")},[g("div",null,[_(k,{modelValue:s.createMissingUsers,"onUpdate:modelValue":e[12]||(e[12]=$=>s.createMissingUsers=$),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Create WordPress accounts for new email addresses")),1)]),_:1},8,["modelValue"])]),g("div",null,[De(_(k,{modelValue:s.sendWelcomeEmailCsv,"onUpdate:modelValue":e[13]||(e[13]=$=>s.sendWelcomeEmailCsv=$),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),[[Ut,s.createMissingUsers]])])],8,oDe)]),_:1}),g("div",rDe,[g("p",null,S(n.context==="course"?t.$t("All contacts with this tag will be enrolled as Student."):t.$t("All contacts with this tag will be added as Member.")),1)]),_(h,null,{default:w(()=>[_(u,{class:"fcom_primary_button",onClick:e[14]||(e[14]=$=>o.importCsv())},{default:w(()=>[B(S(n.context==="course"?t.$t("Import Students"):t.$t("Import Members")),1)]),_:1})]),_:1})]),_:1})],64)):(v(),A(ee,{key:0},[g("div",XOe,[KOe,t.appVars.pro?(v(),D(u,{key:0,link:"",size:"small",onClick:e[10]||(e[10]=$=>o.downloadSampleCsv())},{default:w(()=>[B("↓ "+S(t.$t("Sample CSV")),1)]),_:1})):O("",!0)]),_(m,{drag:"",accept:".csv,.txt","auto-upload":!1,"show-file-list":!1,"on-change":o.onCsvFileChange,disabled:!t.appVars.pro},{tip:w(()=>[g("div",tDe,S(t.$t("Columns: Name, Email, Username")),1)]),default:w(()=>[g("div",ZOe,[JOe,g("div",QOe,[B(S(t.$t("Drop CSV here or"))+" ",1),g("em",null,S(t.$t("click to browse")),1),B(),t.appVars.pro?O("",!0):(v(),A("span",eDe,"  ("+S(t.$t("Pro"))+")",1))])])]),_:1},8,["on-change","disabled"])],64))])):s.sourceMode==="crm_tag"?(v(),D(f,{key:3,"label-position":"top"},{default:w(()=>[_(h,{label:t.$t("FluentCRM Tag")},{default:w(()=>[_(d,{modelValue:s.selectedTagId,"onUpdate:modelValue":e[15]||(e[15]=$=>s.selectedTagId=$),loading:s.crmTagsLoading,placeholder:t.$t("Select a tag"),style:{width:"100%"}},{default:w(()=>[(v(!0),A(ee,null,Ce(s.crmTags,$=>(v(),D(c,{key:$.id,label:$.title,value:$.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","placeholder"])]),_:1},8,["label"]),_(h,null,{default:w(()=>[g("div",{role:"group","aria-label":t.$t("Create WordPress accounts for contacts without an existing account")},[g("div",null,[_(k,{modelValue:s.createMissingCrmUsers,"onUpdate:modelValue":e[16]||(e[16]=$=>s.createMissingCrmUsers=$),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Create WordPress accounts for contacts without an existing account")),1)]),_:1},8,["modelValue"])]),g("div",null,[De(_(k,{modelValue:s.sendWelcomeEmailCrm,"onUpdate:modelValue":e[17]||(e[17]=$=>s.sendWelcomeEmailCrm=$),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),[[Ut,s.createMissingCrmUsers]])])],8,aDe)]),_:1}),g("div",lDe,[g("p",null,S(n.context==="course"?t.$t("All contacts with this tag will be enrolled as Student."):t.$t("All contacts with this tag will be added as Member.")),1)]),_(u,{class:"fcom_primary_button",onClick:e[18]||(e[18]=$=>o.addFromCrmTag())},{default:w(()=>[B(S(n.context==="course"?t.$t("Add Students"):t.$t("Add Members")),1),t.appVars.pro?O("",!0):(v(),A("span",cDe,"  ("+S(t.$t("Pro"))+")",1))]),_:1})]),_:1})):O("",!0)],64))])}const dDe=de(yOe,[["render",uDe]]),hDe={name:"SortDirIcon",props:{dir:{type:String,default:"desc"}},computed:{arrowPath(){return this.dir==="asc"?"M12 12.5 V4 M10 6 L12 4 L14 6":"M12 3.5 V12 M10 10 L12 12 L14 10"}}},fDe={viewBox:"0 0 16 16",width:"1em",height:"1em",fill:"none",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"},pDe=g("line",{x1:"2.5",y1:"4",x2:"8.5",y2:"4"},null,-1),mDe=g("line",{x1:"2.5",y1:"8",x2:"6.5",y2:"8"},null,-1),gDe=g("line",{x1:"2.5",y1:"12",x2:"4.5",y2:"12"},null,-1),vDe=["d"];function _De(t,e,n,i,s,o){return v(),A("svg",fDe,[pDe,mDe,gDe,g("path",{d:o.arrowPath},null,8,vDe)])}const yDe=de(hDe,[["render",_De]]);let bDe=0;const wDe={name:"SortControl",components:{SortDirIcon:yDe},emits:["update:field","update:dir","change"],props:{field:{type:String,required:!0},dir:{type:String,default:"desc",validator:t=>["asc","desc"].includes(t)},options:{type:Array,required:!0}},data(){const t=++bDe;return{sortLabelId:"fcom_sort_by_"+t,orderLabelId:"fcom_sort_order_"+t}},computed:{currentLabel(){const t=this.options.find(e=>e.value===this.field);return t?t.label:""},ariaLabel(){const t=this.dir==="asc"?this.$t("Ascending"):this.$t("Descending");return this.$t("Sort by")+": "+this.currentLabel+", "+t}},methods:{selectField(t){t.value!==this.field&&(this.$emit("update:field",t.value),this.$emit("update:dir",t.defaultDir||"asc"),this.$emit("change"))},selectDir(t){t!==this.dir&&(this.$emit("update:dir",t),this.$emit("change"))}}},kDe={class:"fcom_feed_filter_icon"},CDe={class:"fcom_feed_filter_value"},xDe={role:"presentation",class:"fcom_feed_filter_group"},SDe=["id"],$De=["aria-labelledby"],ADe={role:"presentation",class:"fcom_feed_filter_group"},EDe=["id"],MDe=["aria-labelledby"],TDe={class:"fcom_sort_option"},PDe={class:"fcom_sort_option"};function IDe(t,e,n,i,s,o){const r=W("SortDirIcon"),a=W("ArrowDown"),l=be,c=We,u=Wr,d=Yr,h=jr;return v(),D(h,{class:"fcom_feed_filter_dropdown","popper-class":"fcom_feed_filter_pop",trigger:"click",placement:"bottom-end","hide-on-click":!1},{dropdown:w(()=>[_(d,{class:"fcom_feed_filter_menu"},{default:w(()=>[g("li",xDe,[g("span",{id:s.sortLabelId,class:"fcom_feed_filter_group_label"},S(t.$t("Sort by")),9,SDe),g("ul",{role:"group","aria-labelledby":s.sortLabelId,class:"fcom_feed_filter_group_list"},[(v(!0),A(ee,null,Ce(n.options,f=>(v(),D(u,{key:f.value,role:"menuitemradio","aria-checked":n.field===f.value,"aria-current":n.field===f.value?"true":void 0,class:G({fcom_feed_filter_selected:n.field===f.value}),onClick:p=>o.selectField(f)},{default:w(()=>[B(S(f.label),1)]),_:2},1032,["aria-checked","aria-current","class","onClick"]))),128))],8,$De)]),g("li",ADe,[g("span",{id:s.orderLabelId,class:"fcom_feed_filter_group_label fcom_feed_filter_group_divided"},S(t.$t("Order")),9,EDe),g("ul",{role:"group","aria-labelledby":s.orderLabelId,class:"fcom_feed_filter_group_list"},[_(u,{role:"menuitemradio","aria-checked":n.dir==="asc","aria-current":n.dir==="asc"?"true":void 0,class:G({fcom_feed_filter_selected:n.dir==="asc"}),onClick:e[0]||(e[0]=f=>o.selectDir("asc"))},{default:w(()=>[g("span",TDe,[_(r,{dir:"asc"}),B(S(t.$t("Ascending")),1)])]),_:1},8,["aria-checked","aria-current","class"]),_(u,{role:"menuitemradio","aria-checked":n.dir==="desc","aria-current":n.dir==="desc"?"true":void 0,class:G({fcom_feed_filter_selected:n.dir==="desc"}),onClick:e[1]||(e[1]=f=>o.selectDir("desc"))},{default:w(()=>[g("span",PDe,[_(r,{dir:"desc"}),B(S(t.$t("Descending")),1)])]),_:1},8,["aria-checked","aria-current","class"])],8,MDe)])]),_:1})]),default:w(()=>[_(c,{text:"",class:"fcom_feed_filter_trigger","aria-label":o.ariaLabel},{default:w(()=>[g("span",kDe,[_(r,{dir:n.dir},null,8,["dir"])]),g("span",CDe,S(o.currentLabel),1),_(l,{class:"fcom_feed_filter_caret"},{default:w(()=>[_(a)]),_:1})]),_:1},8,["aria-label"])]),_:1})}const LDe=de(wDe,[["render",IDe]]),ODe={name:"ExportIcon"},DDe={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},RDe=g("path",{d:"M8.00001 9.66667L8.00001 3M8.00001 9.66667C7.53319 9.66667 6.66103 8.33713 6.33334 8M8.00001 9.66667C8.46683 9.66667 9.33899 8.33713 9.66668 8",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),VDe=g("path",{d:"M13.3333 11C13.3333 12.6547 12.988 13 11.3333 13H4.66666C3.01199 13 2.66666 12.6547 2.66666 11",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),FDe=[RDe,VDe];function NDe(t,e,n,i,s,o){return v(),A("svg",DDe,FDe)}const gH=de(ODe,[["render",NDe]]),BDe={name:"CourseMembers",props:["course"],components:{Search:f2,UserRouteLink:Jr,Pagination:Jc,AddMembersForm:dDe,ExportIcon:gH,SortControl:LDe},setup(){return{uiStore:pH()}},data(){return{students:[],search:"",sort_by:"created_at",sort_dir:"desc",loading:!0,exporting:!1,isAddStdOpen:!1,pagination:{page:1,per_page:20,total:0}}},computed:{sortOptions(){return[{value:"display_name",label:this.$t("Name"),defaultDir:"asc"},{value:"created_at",label:this.$t("Start Date"),defaultDir:"desc"},{value:"last_activity",label:this.$t("Last Seen"),defaultDir:"desc"}]}},methods:{onSortChange(){this.uiStore.setListSort("course-students",this.sort_by,this.sort_dir),this.toSearch()},restoreSortPreference(){const t=this.uiStore.getListSort("course-students");t&&this.sortOptions.some(e=>e.value===t.field)&&(this.sort_by=t.field,this.sort_dir=t.dir==="asc"?"asc":"desc")},exportStudents(){if(!this.has_pro){this.$handleError(this.$t("Please upgrade to Pro to use this feature"));return}this.exporting=!0,this.$get("admin/courses/"+this.course.id+"/export/students",{search:this.search}).then(t=>{this.$exportToCsv(t.students,"course-students-"+this.course.slug+".csv")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.exporting=!1})},updateStudents(t){this.students=this.students.filter(e=>e.user_id!==t.user_id)},studentAdded(){this.isAddStdOpen=!1,this.fetchStudents()},handleSearch(){this.search&&this.search.length<3||this.toSearch()},toSearch(){this.pagination.page=1,this.fetchStudents()},restartStudent(t){this.$confirm(this.$t("Restart progress for %s?",t.display_name),this.$t("Restart Progress"),{confirmButtonText:this.$t("Yes, restart"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.$del("admin/courses/"+this.course.id+"/students/"+t.user_id+"/progress").then(e=>{this.$notify.success(e.message),this.fetchStudents()}).catch(e=>{this.$handleError(e)})}).catch(()=>{})},removeStudentPrompt(t){this.$confirm(this.$t("Are you sure you want to remove this student from this course?"),this.$t("Remove Student?"),{confirmButtonText:this.$t("Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"error"}).then(()=>{this.removeStudent(t)})},removeStudent(t){this.$del("admin/courses/"+this.course.id+"/students/"+t.user_id).then(e=>{this.$notify.success(e.message),this.updateStudents(t)}).catch(e=>{this.$handleError(e)})},fetchStudents(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/students",{page:this.pagination.page,per_page:this.pagination.per_page,search:this.search,sort_by:this.sort_by,sort_dir:this.sort_dir}).then(t=>{this.students=t.students.data,this.pagination.total=t.students.total,window.scrollTo(0,0)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.restoreSortPreference(),this.fetchStudents()}},zDe={class:"fcom_course_members"},HDe={class:"fcom_course_member_header"},UDe={class:"fcom_course_member_actions"},jDe={key:0},WDe={key:1},YDe={class:"search_member fcom_mb_20"},qDe={class:"feed_filters"},GDe=g("div",{class:"fcom_feed_divider"},null,-1),XDe={class:"table_user_card"},KDe={class:"card_avatar"},ZDe={class:"card_info"},JDe={class:"card_name"},QDe={key:0,class:"meta_line"},eRe={class:"progress_wrap"},tRe=["title"],nRe=["title"];function sRe(t,e,n,i,s,o){const r=W("ExportIcon"),a=be,l=We,c=W("Search"),u=ft,d=W("SortControl"),h=W("UserAvatar"),f=W("UserRouteLink"),p=Xr,m=Lb,y=W("MoreFilled"),b=Wr,k=Yr,C=jr,$=Gr,x=W("pagination"),M=W("add-members-form"),P=Ea,T=xt("loading");return v(),A("div",zDe,[g("div",HDe,[g("h3",null,S(t.$t("Course Students")),1),g("div",UDe,[t.hasCourseCreatorAccess()?(v(),D(l,{key:0,class:"fcom_secondary_button",loading:s.exporting,onClick:e[0]||(e[0]=I=>o.exportStudents())},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),t.has_pro?(v(),A("span",jDe,S(t.$t("Export")),1)):(v(),A("span",WDe,S(t.$t("Export (Pro)")),1))]),_:1},8,["loading"])):O("",!0),t.hasCourseCreatorAccess()?(v(),D(l,{key:1,class:"fcom_primary_button",onClick:e[1]||(e[1]=I=>s.isAddStdOpen=!0)},{default:w(()=>[B(S(t.$t("Add Student")),1)]),_:1})):O("",!0)])]),g("div",YDe,[_(u,{onKeydown:ut(o.toSearch,["enter"]),onInput:o.handleSearch,modelValue:s.search,"onUpdate:modelValue":e[2]||(e[2]=I=>s.search=I),clearable:"",onClear:o.toSearch,placeholder:t.$t("Search Members...")},{prefix:w(()=>[_(a,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["onKeydown","onInput","modelValue","onClear","placeholder"])]),g("div",qDe,[GDe,_(d,{field:s.sort_by,"onUpdate:field":e[3]||(e[3]=I=>s.sort_by=I),dir:s.sort_dir,"onUpdate:dir":e[4]||(e[4]=I=>s.sort_dir=I),options:o.sortOptions,onChange:o.onSortChange},null,8,["field","dir","options","onChange"])]),De((v(),D($,{data:s.students,style:{width:"100%","border-radius":"8px"},"empty-text":t.$t("No Students Found")},{default:w(()=>[_(p,{prop:"ID",label:t.$t("Name"),"min-width":"200"},{default:w(I=>{var L;return[g("div",XDe,[g("div",KDe,[_(h,{xprofile:I.row},null,8,["xprofile"])]),g("div",ZDe,[g("div",JDe,[_(f,{show_badge:!0,xprofile:I.row},null,8,["xprofile"])]),I.row.short_description?(v(),A("div",QDe,S(t.getExcerpt(((L=I.row.meta)==null?void 0:L.short_description_rendered)||I.row.short_description,160)),1)):O("",!0)])])]}),_:1},8,["label"]),_(p,{width:"160",prop:"progress",label:t.$t("Progress")},{default:w(I=>[g("div",eRe,[_(m,{class:"fcom_progress",percentage:parseInt(I.row.progress)},null,8,["percentage"])])]),_:1},8,["label"]),_(p,{width:"160",label:t.$t("Start Date")},{default:w(I=>[g("div",{title:I.row.space_pivot.created_at},S(t.smartDate(I.row.space_pivot.created_at,!0)),9,tRe)]),_:1},8,["label"]),_(p,{width:"150",label:t.$t("Last Seen")},{default:w(I=>[g("div",{title:I.row.last_activity},S(t.humanDateDiff(I.row.last_activity)),9,nRe)]),_:1},8,["label"]),_(p,{width:"60"},{default:w(I=>[t.hasCourseCreatorAccess()?(v(),D(C,{key:0,trigger:"click"},{dropdown:w(()=>[_(k,null,{default:w(()=>[O("",!0),_(b,{onClick:L=>o.removeStudentPrompt(I.row)},{default:w(()=>[B(S(t.$t("Remove")),1)]),_:2},1032,["onClick"])]),_:2},1024)]),default:w(()=>[_(l,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(y)]),_:1})]),_:1},8,["aria-label"])]),_:2},1024)):O("",!0)]),_:1})]),_:1},8,["data","empty-text"])),[[T,s.loading]]),_(x,{hide_on_single:!0,onFetch:o.fetchStudents,pagination:s.pagination},null,8,["onFetch","pagination"]),_(P,{modelValue:s.isAddStdOpen,"onUpdate:modelValue":e[6]||(e[6]=I=>s.isAddStdOpen=I),"close-on-click-modal":!1,"append-to-body":!0,size:t.drawerWidth,direction:"rtl"},{header:w(()=>[g("h4",null,S(t.$t("Add Student")),1)]),default:w(()=>[s.isAddStdOpen?(v(),D(M,{key:0,context:"course",target:n.course,onCompleted:o.studentAdded,onMembersAdded:e[5]||(e[5]=I=>o.fetchStudents())},null,8,["target","onCompleted"])):O("",!0)]),_:1},8,["modelValue","size"])])}const iRe=de(BDe,[["render",sRe]]),oRe={name:"ViewQuizResult",props:["result","course"],emits:["close","updateResult"],components:{Check:LMe},data(){return{openModal:!0,lesson:this.result.lesson,xprofile:this.result.xprofile,userAnswers:this.result.message,currentStatus:["passed","failed"].includes(this.result.status)?this.result.status:"",statuses:{passed:this.$t("Passed"),failed:this.$t("Failed")}}},watch:{openModal(){this.$emit("close")}},computed:{questions(){var t,e;return((e=(t=this.lesson)==null?void 0:t.meta)==null?void 0:e.quiz_questions)||[]}},methods:{closeModal(){this.openModal=!1,this.$emit("close")},showQuestion(t){return!!this.userAnswers[t.slug]},showQuestionImage(t){return t.image_enabled&&t.image_url},isQuestionCorrect(t){var e;return(e=this.userAnswers[t.slug])==null?void 0:e.is_correct},isOptionSelected(t,e){var i;const n=(i=this.userAnswers[t.slug])==null?void 0:i.user_answer;return Array.isArray(n)?n.includes(e.label):n===e.label},isSingleChoice(t){return t.type==="single_choice"},isWrittenAnswer(t){return t.type==="written_answer"},isExactMatchQuestion(t){return t.grading_mode==="exact_match"},freeTextBadgeClass(t){return this.isExactMatchQuestion(t)?this.isQuestionCorrect(t)?"correct":"incorrect":"correct"},handleOptionChange(){},updateResult(){this.$post("admin/courses/"+this.course.id+"/quiz-results/"+this.result.id,{status:this.currentStatus}).then(t=>{this.$notify.success(t.message),this.closeModal(),this.$emit("updateResult")})}}},rRe={class:"dialog_header"},aRe={class:"dialog_left"},lRe={class:"fcom_view_quiz_result"},cRe={class:"fcom_result_details"},uRe={class:"fcom_questions_wrap"},dRe={key:0,class:"fcom_question_image"},hRe={class:"fcom_question_header"},fRe=["innerHTML"],pRe={class:"fcom_question_body"},mRe={key:0,class:"correct_text"},gRe={key:1,class:"correct_text"},vRe={class:"fcom_written_answer_answer"},_Re={class:"fcom_user_answer_text"},yRe={key:0,class:"correct_text"},bRe={key:1,class:"correct_text"},wRe={class:"fcom_question_options"},kRe={key:2,class:"question_help_text"},CRe={class:"fcom_result_info"},xRe={class:"result_info_item"},SRe={class:"left_side"},$Re={class:"sub_title"},ARe={class:"right_side"},ERe={class:"result_info_item"},MRe={class:"left_side"},TRe={class:"title"},PRe={class:"sub_title"},IRe={class:"result_info_item"},LRe={class:"left_side"},ORe={class:"title"},DRe={class:"sub_title"},RRe={class:"result_info_item"},VRe={class:"left_side"},FRe={class:"title"},NRe={class:"score"},BRe={class:"right_side"},zRe={class:"title"},HRe={class:"score"},URe={class:"result_info_item"},jRe={class:"left_side"},WRe={class:"title"},YRe={class:"dialog_footer"};function qRe(t,e,n,i,s,o){const r=Fo,a=W("Check"),l=be,c=W("Close"),u=Gt,d=W("UserRouteLink"),h=W("UserAvatar"),f=on,p=Jt,m=We,y=Ss;return v(),D(y,{modelValue:s.openModal,"onUpdate:modelValue":e[1]||(e[1]=b=>s.openModal=b),"close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,"modal-class":"fcom_common_dialog result_dialog",onClose:o.closeModal},{header:w(()=>[g("div",rRe,[g("div",aRe,[g("h4",null,S(t.$t("Quiz Result")),1)])])]),footer:w(()=>[g("div",YRe,[_(m,{class:"fcom_secondary_button",onClick:o.closeModal},{default:w(()=>[B(S(t.$t("Cancel")),1)]),_:1},8,["onClick"]),_(m,{class:"fcom_primary_button",onClick:o.updateResult},{default:w(()=>[B(S(t.$t("Update Result")),1)]),_:1},8,["onClick"])])]),default:w(()=>{var b;return[g("div",lRe,[g("div",cRe,[g("div",uRe,[(v(!0),A(ee,null,Ce(o.questions,k=>{var C;return v(),A(ee,{key:k.slug},[o.showQuestion(k)?(v(),A("div",{key:0,class:G(["fcom_question",k.type])},[o.showQuestionImage(k)?(v(),A("div",dRe,[_(r,{src:k.image_url},null,8,["src"])])):O("",!0),g("div",hRe,[g("div",{innerHTML:k.label_rendered,class:"fcom_question_label"},null,8,fRe)]),g("div",pRe,[o.isWrittenAnswer(k)?(v(),A(ee,{key:0},[g("div",{class:G(["fcom_is_correct",o.freeTextBadgeClass(k)])},[o.isExactMatchQuestion(k)?(v(),A("p",mRe,[o.isQuestionCorrect(k)?(v(),A(ee,{key:0},[_(l,null,{default:w(()=>[_(a)]),_:1}),B(" "+S(t.$t("Correct")),1)],64)):(v(),A(ee,{key:1},[_(l,null,{default:w(()=>[_(c)]),_:1}),B(" "+S(t.$t("Incorrect")),1)],64))])):(v(),A("p",gRe,[_(l,null,{default:w(()=>[_(a)]),_:1}),B(" "+S(t.$t("Answered")),1)]))],2),g("div",vRe,[g("div",_Re,S((C=s.userAnswers[k.slug])==null?void 0:C.user_answer),1)])],64)):(v(),A(ee,{key:1},[g("div",{class:G(["fcom_is_correct",o.isQuestionCorrect(k)?"correct":"incorrect"])},[o.isQuestionCorrect(k)?(v(),A("p",yRe,[_(l,null,{default:w(()=>[_(a)]),_:1}),B(" "+S(t.$t("Correct")),1)])):(v(),A("p",bRe,[_(l,null,{default:w(()=>[_(c)]),_:1}),B(" "+S(t.$t("Incorrect")),1)]))],2),g("div",wRe,[(v(!0),A(ee,null,Ce(k.options,$=>(v(),A("div",{key:$.label,class:"fcom_question_option"},[_(u,{class:G({single_choice:o.isSingleChoice(k)}),"model-value":o.isOptionSelected(k,$),onChange:x=>o.handleOptionChange(k,$)},{default:w(()=>[B(S($.label),1)]),_:2},1032,["class","model-value","onChange"])]))),128))])],64)),k.help_text?(v(),A("div",kRe,S(k.help_text),1)):O("",!0)])],2)):O("",!0)],64)}),128))])]),g("div",CRe,[g("div",xRe,[g("div",SRe,[_(d,{show_badge:!0,xprofile:s.xprofile},null,8,["xprofile"]),g("div",$Re,S(t.$t("Attempts")+": "+n.result.meta.attempts),1)]),g("div",ARe,[_(h,{xprofile:s.xprofile,with_level:!1},null,8,["xprofile"])])]),g("div",ERe,[g("div",MRe,[g("div",TRe,S(n.result.lesson.title),1),g("div",PRe,S((b=n.course)==null?void 0:b.title),1)])]),g("div",IRe,[g("div",LRe,[g("div",ORe,S(t.$t("Submitted")),1),g("div",DRe,S(t.smartDate(n.result.updated_at,!0)),1)])]),g("div",RRe,[g("div",VRe,[g("div",FRe,S(t.$t("Score")),1),g("div",NRe,S(n.result.score+"%"),1)]),g("div",BRe,[g("div",zRe,S(t.$t("Correct")),1),g("div",HRe,S(n.result.meta.correct_answers+"/"+n.result.meta.total_questions),1)])]),g("div",URe,[g("div",jRe,[g("div",WRe,S(t.$t("Did the student pass or fail?")),1),_(p,{modelValue:s.currentStatus,"onUpdate:modelValue":e[0]||(e[0]=k=>s.currentStatus=k),placeholder:t.$t("-- Select --")},{default:w(()=>[(v(!0),A(ee,null,Ce(Object.keys(s.statuses),k=>(v(),D(f,{key:k,label:s.statuses[k],value:k},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])])])])]}),_:1},8,["modelValue","width","onClose"])}const GRe=de(oRe,[["render",qRe]]),XRe={name:"QuizResults",props:["course","course_id"],components:{UserRouteLink:Jr,Pagination:Jc,ViewQuizResult:GRe,Search:f2,ExportIcon:gH},data(){return{results:[],search:"",loading:!1,working:!1,exporting:!1,openResult:!1,result:null,pagination:{page:1,per_page:20,total:0},filter_by:"all"}},methods:{isOpenResult(t){this.result=t,this.openResult=!0},closeResult(){this.openResult=!1,this.result=null},getTagType(t){return["passed","failed"].includes(t)?t==="passed"?"success":"danger":"info"},getResultText(t){return["passed","failed"].includes(t)?this.$t(t):this.$t("n/a")},toSearch(){this.pagination.page=1,this.fetchResults()},handleSearch(){this.search&&this.search.length<3||this.toSearch()},fetchResults(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/quiz-results",{page:this.pagination.page,per_page:this.pagination.per_page,search:this.search,filter_by:this.filter_by}).then(t=>{this.results=t.results.data,this.pagination.total=t.results.total,window.scrollTo(0,0)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},exportResults(){this.exporting=!0,this.$get("admin/courses/"+this.course.id+"/export/quiz-results",{search:this.search,filter_by:this.filter_by}).then(t=>{this.$exportToCsv(t.results,"quiz-results-"+this.course.slug+".csv")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.exporting=!1})}},mounted(){this.has_pro&&this.fetchResults()}},KRe={class:"fcom_course_members"},ZRe={class:"fcom_course_member_header"},JRe={key:0,class:"fcom_course_member_actions"},QRe={class:"search_member"},eVe={class:"feed_filters"},tVe=g("div",{class:"fcom_feed_divider"},null,-1),nVe={id:"feed_short_by",class:"fcom_feed_filter_label"},sVe={class:"table_user_card"},iVe={class:"card_avatar"},oVe={class:"card_info"},rVe={class:"card_name"},aVe={class:"meta_line"};function lVe(t,e,n,i,s,o){const r=W("ExportIcon"),a=be,l=We,c=W("Search"),u=ft,d=on,h=Jt,f=W("UserAvatar"),p=W("UserRouteLink"),m=Xr,y=Ci,b=Gr,k=W("pagination"),C=W("ViewQuizResult"),$=xt("loading");return v(),A("div",KRe,[g("div",ZRe,[g("h3",null,S(t.$t("Quiz Results")),1),t.has_pro?(v(),A("div",JRe,[_(l,{class:"fcom_secondary_button",loading:s.exporting,onClick:e[0]||(e[0]=x=>o.exportResults())},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,S(t.$t("Export")),1)]),_:1},8,["loading"])])):O("",!0)]),g("div",QRe,[_(u,{clearable:"",onClear:o.toSearch,onKeydown:ut(o.toSearch,["enter"]),onInput:o.handleSearch,modelValue:s.search,"onUpdate:modelValue":e[1]||(e[1]=x=>s.search=x),placeholder:t.$t("Search by Name or Quiz")},{prefix:w(()=>[_(a,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["onClear","onKeydown","onInput","modelValue","placeholder"])]),g("div",eVe,[tVe,g("span",nVe,S(t.$t("Filter by:")),1),_(h,{"aria-label":t.$t("Sort members by"),modelValue:s.filter_by,"onUpdate:modelValue":e[2]||(e[2]=x=>s.filter_by=x),class:"fcom_minimal_select","popper-class":"plain_select",placeholder:t.$t("All"),onChange:e[3]||(e[3]=x=>o.fetchResults())},{default:w(()=>[_(d,{value:"all",label:t.$t("All")},null,8,["label"]),_(d,{value:"passed",label:t.$t("Passed")},null,8,["label"]),_(d,{value:"failed",label:t.$t("Failed")},null,8,["label"]),_(d,{value:"n/a",label:t.$t("Not Set")},null,8,["label"])]),_:1},8,["aria-label","modelValue","placeholder"])]),De((v(),D(b,{data:s.results,style:{width:"100%","border-radius":"8px"},"empty-text":t.$t("No Results Found")},{default:w(()=>[_(m,{prop:"ID",label:t.$t("Name & Quiz"),"min-width":"260"},{default:w(x=>{var M;return[g("div",sVe,[g("div",iVe,[_(f,{xprofile:x.row.xprofile},null,8,["xprofile"])]),g("div",oVe,[g("div",rVe,[_(p,{show_badge:!0,xprofile:x.row.xprofile},null,8,["xprofile"])]),g("div",aVe,S(t.getExcerpt((M=x.row.lesson)==null?void 0:M.title,160)),1)])])]}),_:1},8,["label"]),_(m,{width:"260",label:t.$t("Submitted Date")},{default:w(x=>[B(S(t.smartDate(x.row.updated_at,!0)),1)]),_:1},8,["label"]),_(m,{width:"120",label:t.$t("Score")},{default:w(x=>[B(S(x.row.score)+"% ",1)]),_:1},8,["label"]),_(m,{width:"120",label:t.$t("Result")},{default:w(x=>[_(y,{type:o.getTagType(x.row.status),size:"small"},{default:w(()=>[B(S(o.getResultText(x.row.status)),1)]),_:2},1032,["type"])]),_:1},8,["label"]),_(m,{width:"160",label:t.$t("Actions")},{default:w(x=>[_(l,{class:"fcom_secondary_button",onClick:M=>o.isOpenResult(x.row)},{default:w(()=>[B(S(t.$t("View")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[$,s.loading]]),_(k,{hide_on_single:!0,onFetch:o.fetchResults,pagination:s.pagination},null,8,["onFetch","pagination"]),s.openResult?(v(),D(C,{key:0,open:s.openResult,result:s.result,course:n.course,onClose:o.closeResult,onUpdateResult:o.fetchResults},null,8,["open","result","course","onClose","onUpdateResult"])):O("",!0)])}const cVe=de(XRe,[["render",lVe]]),uVe={name:"ChatIcon"},dVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},hVe=g("path",{d:"M6.66732 11.25H13.334M6.66732 7.08333H10.0007",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),fVe=g("path",{d:"M5.08267 15.833C3.99924 15.7264 3.18762 15.401 2.6433 14.8567C1.66699 13.8804 1.66699 12.309 1.66699 9.16634V8.74967C1.66699 5.60698 1.66699 4.03563 2.6433 3.05932C3.61961 2.08301 5.19096 2.08301 8.33366 2.08301H11.667C14.8097 2.08301 16.381 2.08301 17.3573 3.05932C18.3337 4.03563 18.3337 5.60698 18.3337 8.74967V9.16634C18.3337 12.309 18.3337 13.8804 17.3573 14.8567C16.381 15.833 14.8097 15.833 11.667 15.833C11.1999 15.8434 10.8279 15.879 10.4625 15.9622C9.46385 16.1921 8.5391 16.7031 7.62522 17.1487C6.32307 17.7837 5.67199 18.1012 5.2634 17.8039C4.48174 17.2218 5.24577 15.4179 5.41699 14.583",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),pVe=[hVe,fVe];function mVe(t,e,n,i,s,o){return v(),A("svg",dVe,pVe)}const vH=de(uVe,[["render",mVe]]),gVe={name:"HeartIcon",props:{filled:{default:!1}}},vVe={key:0,viewBox:"0 0 24 24","aria-hidden":"true"},_Ve=g("g",null,[g("path",{d:"M20.884 13.19c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z"})],-1),yVe=[_Ve],bVe={key:1,viewBox:"0 0 24 24","aria-hidden":"true"},wVe=g("g",null,[g("path",{d:"M16.697 5.5c-1.222-.06-2.679.51-3.89 2.16l-.805 1.09-.806-1.09C9.984 6.01 8.526 5.44 7.304 5.5c-1.243.07-2.349.78-2.91 1.91-.552 1.12-.633 2.78.479 4.82 1.074 1.97 3.257 4.27 7.129 6.61 3.87-2.34 6.052-4.64 7.126-6.61 1.111-2.04 1.03-3.7.477-4.82-.561-1.13-1.666-1.84-2.908-1.91zm4.187 7.69c-1.351 2.48-4.001 5.12-8.379 7.67l-.503.3-.504-.3c-4.379-2.55-7.029-5.19-8.382-7.67-1.36-2.5-1.41-4.86-.514-6.67.887-1.79 2.647-2.91 4.601-3.01 1.651-.09 3.368.56 4.798 2.01 1.429-1.45 3.146-2.1 4.796-2.01 1.954.1 3.714 1.22 4.601 3.01.896 1.81.846 4.17-.514 6.67z"})],-1),kVe=[wVe];function CVe(t,e,n,i,s,o){return n.filled?(v(),A("svg",vVe,yVe)):(v(),A("svg",bVe,kVe))}const p2=de(gVe,[["render",CVe]]),xVe={name:"ImageIcon"},SVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},$Ve=g("path",{d:"M7.49996 18.3327H12.5C16.6666 18.3327 18.3333 16.666 18.3333 12.4993V7.49935C18.3333 3.33268 16.6666 1.66602 12.5 1.66602H7.49996C3.33329 1.66602 1.66663 3.33268 1.66663 7.49935V12.4993C1.66663 16.666 3.33329 18.3327 7.49996 18.3327Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),AVe=g("path",{d:"M7.50004 8.33333C8.42052 8.33333 9.16671 7.58714 9.16671 6.66667C9.16671 5.74619 8.42052 5 7.50004 5C6.57957 5 5.83337 5.74619 5.83337 6.66667C5.83337 7.58714 6.57957 8.33333 7.50004 8.33333Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),EVe=g("path",{d:"M2.22498 15.7918L6.33331 13.0335C6.99164 12.5918 7.94164 12.6418 8.53331 13.1501L8.80831 13.3918C9.45831 13.9501 10.5083 13.9501 11.1583 13.3918L14.625 10.4168C15.275 9.85846 16.325 9.85846 16.975 10.4168L18.3333 11.5835",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),MVe=[$Ve,AVe,EVe];function TVe(t,e,n,i,s,o){return v(),A("svg",SVe,MVe)}const _H=de(xVe,[["render",TVe]]),PVe={name:"PollIcon"},IVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},LVe=g("path",{d:"M1.66663 18.334H18.3333",stroke:"currentColor","stroke-width":"1.5","stroke-miterlimit":"10","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),OVe=g("path",{d:"M8.125 3.33268V18.3327H11.875V3.33268C11.875 2.41602 11.5 1.66602 10.375 1.66602H9.625C8.5 1.66602 8.125 2.41602 8.125 3.33268Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),DVe=g("path",{d:"M2.5 8.33268V18.3327H5.83333V8.33268C5.83333 7.41602 5.5 6.66602 4.5 6.66602H3.83333C2.83333 6.66602 2.5 7.41602 2.5 8.33268Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),RVe=g("path",{d:"M14.1666 12.5007V18.334H17.5V12.5007C17.5 11.584 17.1666 10.834 16.1666 10.834H15.5C14.5 10.834 14.1666 11.584 14.1666 12.5007Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),VVe=[LVe,OVe,DVe,RVe];function FVe(t,e,n,i,s,o){return v(),A("svg",IVe,VVe)}const NVe=de(PVe,[["render",FVe]]),BVe={name:"SurveyEditForm",props:{form:{type:Object,required:!0},is_editing:{type:Boolean,default:!1}},emits:["cancel"],data(){return{}},methods:{addOption(){this.form.options.push({label:"",slug:""})},removeOption(t){this.form.options.splice(t,1)}}},zVe={class:"fcom_compose_app_form"},HVe={class:"fcom_app_header"},UVe={class:"fcom_app_options"},jVe={class:"fcom_app_pref"},WVe={class:"fcom_app_footer"},YVe=g("br",null,null,-1),qVe={style:{"font-weight":"500",color:"var(--el-text-color-regular)","font-size":"14px"}};function GVe(t,e,n,i,s,o){const r=We,a=ft,l=W("Plus"),c=be,u=Gt,d=Od;return v(),A("div",zVe,[g("div",HVe,[g("h5",null,S(t.$t("Poll Options")),1),g("div",null,[_(r,{onClick:e[0]||(e[0]=h=>t.$emit("cancel")),size:"small",text:""},{default:w(()=>[B(S(t.$t("cancel")),1)]),_:1})])]),g("div",UVe,[(v(!0),A(ee,null,Ce(n.form.options,(h,f)=>(v(),A("div",{class:"fcom_app_option",key:"option_"+f},[_(a,{modelValue:h.label,"onUpdate:modelValue":p=>h.label=p,type:"text",placeholder:t.$t("Your option text")},cs({_:2},[!h.slug&&f!==0?{name:"suffix",fn:w(()=>[_(r,{onClick:p=>o.removeOption(f),text:"",size:"small"},{default:w(()=>[B("x")]),_:2},1032,["onClick"])]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128)),g("div",jVe,[_(r,{onClick:o.addOption,text:"",size:"small"},{default:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1}),g("span",null,S(t.$t("Add More")),1)]),_:1},8,["onClick"])])]),g("div",WVe,[g("h5",null,S(t.$t("Poll Settings")),1),n.is_editing?O("",!0):(v(),D(u,{key:0,modelValue:n.form.type,"onUpdate:modelValue":e[1]||(e[1]=h=>n.form.type=h),"true-value":"multi_choice","false-value":"single_choice",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Users can choose multiple options")),1)]),_:1},8,["modelValue"])),YVe,g("label",qVe,S(t.$t("End Date:")),1),g("div",null,[_(d,{style:{"min-width":"50%"},placeholder:t.$t("Leave blank for not end"),clearable:!0,type:"datetime",modelValue:n.form.end_date,"onUpdate:modelValue":e[2]||(e[2]=h=>n.form.end_date=h),"value-format":"YYYY-MM-DD HH:mm:ss"},null,8,["placeholder","modelValue"])])])])}const XVe=de(BVe,[["render",GVe]]),KVe={name:"GiphyIcon"},ZVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},JVe=$a('<path d="M12.9287 10.09H14.7095" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M15.0781 8.20333H12.9277V11.98" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M10.3458 8.19998V11.98" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7.74961 8.2H6.48961C5.44549 8.2 4.59961 9.04588 4.59961 10.09V10.09C4.59961 11.1341 5.44549 11.98 6.48961 11.98H7.74961V10.09H6.69961" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"></path><path d="M4.5 19C2.567 19 1 17.433 1 15.5L1 4.49999C1 2.567 2.567 0.999992 4.5 0.999992H15.5C17.433 0.999992 19 2.567 19 4.49999V15.5C19 17.433 17.433 19 15.5 19H4.5Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>',5),QVe=[JVe];function eFe(t,e,n,i,s,o){return v(),A("svg",ZVe,QVe)}const tFe=de(KVe,[["render",eFe]]);var nFe=Ma,sFe=function(){return nFe.Date.now()},iFe=sFe,oFe=/\s/;function rFe(t){for(var e=t.length;e--&&oFe.test(t.charAt(e)););return e}var aFe=rFe,lFe=aFe,cFe=/^\s+/;function uFe(t){return t&&t.slice(0,lFe(t)+1).replace(cFe,"")}var dFe=uFe,hFe=M1,fFe=T1,pFe="[object Symbol]";function mFe(t){return typeof t=="symbol"||fFe(t)&&hFe(t)==pFe}var m2=mFe,gFe=dFe,VM=P1,vFe=m2,FM=0/0,_Fe=/^[-+]0x[0-9a-f]+$/i,yFe=/^0b[01]+$/i,bFe=/^0o[0-7]+$/i,wFe=parseInt;function kFe(t){if(typeof t=="number")return t;if(vFe(t))return FM;if(VM(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=VM(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=gFe(t);var n=yFe.test(t);return n||bFe.test(t)?wFe(t.slice(2),n?2:8):_Fe.test(t)?FM:+t}var CFe=kFe,xFe=P1,u3=iFe,NM=CFe,SFe="Expected a function",$Fe=Math.max,AFe=Math.min;function EFe(t,e,n){var i,s,o,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(SFe);e=NM(e)||0,xFe(n)&&(u=!!n.leading,d="maxWait"in n,o=d?$Fe(NM(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(M){var P=i,T=s;return i=s=void 0,c=M,r=t.apply(T,P),r}function p(M){return c=M,a=setTimeout(b,e),u?f(M):r}function m(M){var P=M-l,T=M-c,I=e-P;return d?AFe(I,o-T):I}function y(M){var P=M-l,T=M-c;return l===void 0||P>=e||P<0||d&&T>=o}function b(){var M=u3();if(y(M))return k(M);a=setTimeout(b,m(M))}function k(M){return a=void 0,h&&i?f(M):(i=s=void 0,r)}function C(){a!==void 0&&clearTimeout(a),c=0,i=l=s=a=void 0}function $(){return a===void 0?r:k(u3())}function x(){var M=u3(),P=y(M);if(i=arguments,s=this,l=M,P){if(a===void 0)return p(l);if(d)return clearTimeout(a),a=setTimeout(b,e),f(l)}return a===void 0&&(a=setTimeout(b,e)),r}return x.cancel=C,x.flush=$,x}var MFe=EFe;const TFe=Ei(MFe),PFe={name:"Giphy",components:{GiphyIcon:tFe},data(){return{gifs:[],searchQuery:"",offset:0,limit:20,loading:!1}},methods:{loadGifs(){var e,n;if(this.offset===0&&((n=(e=this.$gloablStorage)==null?void 0:e.gifs)==null?void 0:n.length)>0&&!this.searchQuery){this.gifs=this.$gloablStorage.gifs;return}this.loading=!0;const t={limit:this.limit,offset:this.offset,q:this.searchQuery.trim()};this.$get("giphy",t).then(i=>{this.gifs=this.offset===0?i.gifs:this.gifs.concat(i.gifs),!this.searchQuery&&this.offset===0&&(this.$gloablStorage.gifs=this.gifs),this.offset+=this.limit}).catch(i=>{this.$handleError(i)}).finally(()=>{this.loading=!1})},handleGiphyClick(){this.offset=0,this.searchQuery="",this.loadGifs()},handleSearch:TFe(function(){this.offset=0,this.loadGifs()},300),handleScroll(t){t.target.scrollHeight-t.target.scrollTop===t.target.clientHeight&&!this.loading&&this.loadGifs()},selectGiphy(t){this.$emit("selected-giphy",t),this.$refs.popover.hide()}}},IFe={class:"fcom_giphy_composer"},LFe={class:"search-container"},OFe=["onLoad","src","alt","onClick"],DFe={key:0,class:"img_loading"},RFe={key:1,class:"no_result"},VFe=g("div",{class:"fcom_giphy_powered_by"},[g("span",{class:"powered_by"},"POWERED BY "),g("span",null,"GIPHY")],-1);function FFe(t,e,n,i,s,o){const r=ft,a=Ld,l=Id,c=W("GiphyIcon"),u=be,d=We,h=No,f=xt("loading");return v(),A("div",IFe,[_(h,{placement:"bottom-end",width:300,persistent:!1,trigger:"click",teleported:!1,"popper-class":"fcom_giphy_popover fcom_menu_below_nav",ref:"popover"},{reference:w(()=>[_(d,{"aria-label":"Pick GIF",text:"",onClick:o.handleGiphyClick},{default:w(()=>[_(u,{class:G(["fcom_apps_icon"])},{default:w(()=>[_(c)]),_:1})]),_:1},8,["onClick"])]),default:w(()=>[De((v(),A("div",LFe,[_(r,{modelValue:s.searchQuery,"onUpdate:modelValue":e[0]||(e[0]=p=>s.searchQuery=p),placeholder:t.$t("Search Gifs"),onInput:o.handleSearch},null,8,["modelValue","placeholder","onInput"]),g("div",{class:"gif_container",onScroll:e[1]||(e[1]=(...p)=>o.handleScroll&&o.handleScroll(...p))},[s.gifs.length>0?(v(),D(l,{key:0,gutter:5},{default:w(()=>[(v(!0),A(ee,null,Ce(s.gifs,p=>(v(),D(a,{span:12,key:p.id,class:"gif_item"},{default:w(()=>[g("img",{alt:"",onLoad:m=>p.loaded=!0,src:p.images.preview_gif.url,onClick:m=>o.selectGiphy(p)},null,40,OFe),p.loaded?O("",!0):(v(),A("p",DFe))]),_:2},1024))),128))]),_:1})):(v(),A("p",RFe,S(t.$t("No results")),1))],32),VFe])),[[f,s.loading]])]),_:1},512)])}const NFe=de(PFe,[["render",FFe]]),BFe={name:"VideoIcon"},zFe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},HFe=g("rect",{x:"1",y:"1",width:"18",height:"18",rx:"3.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),UFe=g("path",{d:"M8.90484 7.14604L12.663 9.3589C13.1383 9.6384 13.1383 10.3237 12.663 10.6032L8.90484 12.816C8.4208 13.1013 7.80896 12.7534 7.80896 12.1934V7.76865C7.80896 7.20869 8.4208 6.86076 8.90484 7.14604Z",fill:"currentColor"},null,-1),jFe=[HFe,UFe];function WFe(t,e,n,i,s,o){return v(),A("svg",zFe,jFe)}const YFe=de(BFe,[["render",WFe]]),qFe={name:"FluentPlayerPreview",emits:["load-failed"],props:{media:{type:Object,required:!0}},data(){return{html:"",loading:!1,playerInstanceKey:"",fallbackGuardCleanups:[],guardGeneration:0}},watch:{"media.url"(){this.loadFluentPlayerContent()}},async mounted(){await this.loadFluentPlayerContent()},beforeUnmount(){this.clearFallbackGuard()},methods:{getFallbackTiming(t,e){var i,s;const n=Number((s=(i=this.appVars.features.fluent_player)==null?void 0:i.fallback)==null?void 0:s[t]);return!Number.isFinite(n)||n<500?e:n},getPlayerInstanceKey(){if(!this.playerInstanceKey){const t=Number.parseInt(this._uid,10);this.playerInstanceKey=Number.isSafeInteger(t)&&t>0?`i${t}`:`i${Math.random().toString(36).slice(2,8)}`}return this.playerInstanceKey},getStableMediaId(){var i,s,o,r,a,l,c,u,d,h,f,p;const t=Number.parseInt((i=this.media)==null?void 0:i.media_id,10);if(Number.isSafeInteger(t)&&t>0)return t;const e=[(s=this.media)==null?void 0:s.media_key,(o=this.media)==null?void 0:o.feed_id,(r=this.media)==null?void 0:r.share_url,(l=(a=this.media)==null?void 0:a.settings)==null?void 0:l.src,(c=this.media)==null?void 0:c.url,(u=this.media)==null?void 0:u.html,(d=this.media)==null?void 0:d.title,(h=this.media)==null?void 0:h.player,(f=this.media)==null?void 0:f.type,(p=this.media)==null?void 0:p.provider].filter(Boolean).join("|");if(!e)return 1;let n=5381;for(let m=0;m<e.length;m++)n=(n<<5)+n+e.charCodeAt(m)>>>0;return n||1},async loadFluentPlayerContent(){this.clearFallbackGuard();const t=++this.guardGeneration;this.loading=!0;try{if(!this.appVars.features.has_fluent_player||this.appVars.features.enable_fluent_player!=="yes"){this.$emit("load-failed");return}const e=this.getStableMediaId(),n=await this.withTimeout(this.$get("fluent-player/video-content/"+e,{...this.media,media_id:e,player_instance_key:this.getPlayerInstanceKey()}),this.getFallbackTiming("content_timeout_ms",1e4));if(t!==this.guardGeneration)return;n.html?(this.html=n.html,this.$nextTick(()=>{if(t!==this.guardGeneration)return;const i=this.$el&&this.$el.querySelector(".fluent-player");if(!i){this.fallBack("player markup missing");return}this.startFallbackGuard(i,n.media)})):this.$emit("load-failed")}catch(e){if(t!==this.guardGeneration)return;console.warn("Failed to load fluent-player assets:",e),this.$emit("load-failed")}finally{t===this.guardGeneration&&(this.loading=!1)}},withTimeout(t,e){return Promise.race([t,new Promise((n,i)=>{const s=setTimeout(()=>i(new Error("fluent-player content request timed out")),e);this.fallbackGuardCleanups.push(()=>clearTimeout(s))})])},startFallbackGuard(t,e){const n=()=>{document.dispatchEvent(new CustomEvent("InitSingleFluentPlayer",{detail:{container:t,playerData:{media:e}}}))};this.waitForPlayerScript(this.getFallbackTiming("script_timeout_ms",12e3),i=>{if(!i){this.fallBack("player script never loaded");return}n(),this.verifyPlayerInit(t)})},waitForPlayerScript(t,e){const n=()=>typeof window.FluentPlayer=="function";if(n()){e(!0);return}const i=document.querySelector('script[src*="fluent-player.js"]');let s=!1;const o=()=>{s=!0};i&&i.addEventListener("error",o);const r=()=>!i||!window.performance||!performance.getEntriesByType?!1:performance.getEntriesByType("resource").some(h=>h.name===i.src&&h.responseEnd>0);let a=0,l=0;const c=this.getFallbackTiming("script_grace_ms",2e3),u=setInterval(()=>{if(a+=250,n()){d(),e(!0);return}i&&(s||r())&&(l+=250),(l>=c||a>=t)&&(d(),e(!1))},250),d=()=>{clearInterval(u),i&&i.removeEventListener("error",o)};this.fallbackGuardCleanups.push(d)},verifyPlayerInit(t){const e=()=>{const s=t.querySelector("media-player");return!!(s&&s.hasAttribute("data-media-player"))};if(e()){this.enhanceAudioSpeedLabel(t),this.watchCanPlay(t);return}let n=0;const i=setInterval(()=>{n+=250,e()?(clearInterval(i),this.enhanceAudioSpeedLabel(t),this.watchCanPlay(t)):n>=this.getFallbackTiming("init_timeout_ms",3e3)&&(clearInterval(i),this.fallBack("player did not initialize"))},250);this.fallbackGuardCleanups.push(()=>clearInterval(i))},enhanceAudioSpeedLabel(t){try{const e=t.querySelector("media-player");if(!(e&&(e.getAttribute("view-type")==="audio"||t.querySelector(".fp-audio-layout"))))return;const i=t.querySelector(".fp-speed-menu media-menu-button");if(!i)return;const s=i.querySelector('media-icon[type="odometer"]');s&&(s.style.display="none");let o=i.querySelector(".fcom_speed_label");o||(o=document.createElement("span"),o.className="fcom_speed_label",i.appendChild(o));const r=()=>{const a=Number(e.playbackRate)||1;o.textContent=(Number.isInteger(a)?a:a.toFixed(2).replace(/0+$/,"").replace(/\.$/,""))+"x"};r(),e.addEventListener("rate-change",r),this.fallbackGuardCleanups.push(()=>e.removeEventListener("rate-change",r))}catch{}},watchCanPlay(t){const e=t.querySelector("media-player");if(!e){this.fallBack("media-player element missing");return}if(e.hasAttribute("data-can-play"))return;let n=0,i=!1;const s=this.getFallbackTiming("stall_timeout_ms",12e3),o=1e3,r=()=>{n=0},a=["load-start","source-change","provider-change","loaded-metadata","loaded-data","progress","waiting","play"];a.forEach(b=>e.addEventListener(b,r));let l=null;const c=()=>{const b=e.querySelector("iframe");b&&b!==l&&(l=b,l.addEventListener("load",r),r())};c();let u=null;const d=()=>{u&&(clearInterval(u),u=null)},h=()=>{u||(u=setInterval(y,o))},f="IntersectionObserver"in window?new IntersectionObserver(b=>{const k=b[b.length-1];i=!!(k&&k.isIntersecting),i?(n=0,h()):d()}):null,p=()=>m();e.addEventListener("can-play",p);const m=()=>{d(),e.removeEventListener("can-play",p),a.forEach(b=>e.removeEventListener(b,r)),l&&l.removeEventListener("load",r),f&&f.disconnect()},y=()=>{if(!document.body.contains(e)||e.hasAttribute("data-can-play")){m();return}c(),!(!i||!e.hasAttribute("data-can-load"))&&(n+=o,n>=s&&(m(),this.fallBack("player stalled before becoming playable")))};f?f.observe(e):(i=!0,h()),this.fallbackGuardCleanups.push(m)},fallBack(t){this.clearFallbackGuard(),console.warn("FluentPlayer: switching to standard media render ("+t+")"),this.html="",this.$emit("load-failed")},clearFallbackGuard(){const t=this.fallbackGuardCleanups;this.fallbackGuardCleanups=[],t.forEach(e=>{try{e()}catch{}})}}},GFe={class:"fluent-player-preview"},XFe={key:0,class:"player-container"},KFe=["innerHTML"];function ZFe(t,e,n,i,s,o){const r=Wt;return v(),A("div",GFe,[s.html?(v(),A("div",XFe,[g("div",{innerHTML:s.html},null,8,KFe)])):O("",!0),s.loading?(v(),D(r,{key:1,animated:"",rows:5})):O("",!0)])}const yH=de(qFe,[["render",ZFe],["__scopeId","data-v-f5d37d95"]]),JFe={name:"TuneIcon"},QFe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",fill:"none","aria-hidden":"true",focusable:"false"},eNe=g("path",{d:"M6 4v6M6 14v6M12 4v3M12 11v9M18 4v9M18 17v3",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round"},null,-1),tNe=g("path",{d:"M4 12h4M10 9h4M16 15h4",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round"},null,-1),nNe=[eNe,tNe];function sNe(t,e,n,i,s,o){return v(),A("svg",QFe,nNe)}const iNe=de(JFe,[["render",sNe]]),oNe={name:"AudioList",components:{FluentPlayerPreview:yH,TuneIcon:iNe,Close:iH},emits:["remove","edit"],props:{feed:{type:Object,default:null},audios:{type:Array,default:()=>[]},editable:{type:Boolean,default:!1}},data(){return{failedItems:{}}},methods:{onLoadFailed(t){this.failedItems={...this.failedItems,[t]:!0}},audioUrl(t){var e;return((e=t.settings)==null?void 0:e.src)||t.url||""},audioType(t){const n=this.audioUrl(t).split("?")[0].split("#")[0].split(".").pop().toLowerCase();return{mp3:"audio/mpeg",wav:"audio/wav",m4a:"audio/mp4",aac:"audio/aac",ogg:"audio/ogg",oga:"audio/ogg",flac:"audio/flac",opus:"audio/opus",weba:"audio/webm"}[n]||"audio/mpeg"},audioKey(t,e){var s,o;const n=((s=t.settings)==null?void 0:s.posterSrc)||t.image||"",i=((o=t.settings)==null?void 0:o.title)||t.title||"";return(t.media_id||e)+"|"+n+"|"+i},playerMediaFor(t){var n,i;const e={...t,feed_id:((n=this.feed)==null?void 0:n.id)||t.feed_id||"",share_url:((i=this.feed)==null?void 0:i.permalink)||t.share_url||""};return this.editable&&(e.controls={...t.controls||{},settings:!1}),e}}},rNe={class:"fcom_audio_list"},aNe={key:1,class:"fcom_audio_native_wrap"},lNe={class:"fcom_audio_native",controls:"",preload:"metadata"},cNe=["src","type"],uNe=["aria-label","onClick"],dNe=["aria-label","onClick"];function hNe(t,e,n,i,s,o){const r=W("fluent-player-preview"),a=W("tune-icon"),l=W("Close"),c=be;return v(),A("div",rNe,[(v(!0),A(ee,null,Ce(n.audios,(u,d)=>(v(),A("div",{key:o.audioKey(u,d),class:"fcom_audio_player_wrap"},[s.failedItems[u.media_id||d]?(v(),A("div",aNe,[g("audio",lNe,[g("source",{src:o.audioUrl(u),type:o.audioType(u)},null,8,cNe)])])):(v(),D(r,{key:0,media:o.playerMediaFor(u),onLoadFailed:h=>o.onLoadFailed(u.media_id||d)},null,8,["media","onLoadFailed"])),n.editable?(v(),A(ee,{key:2},[g("button",{type:"button",class:"fcom_audio_ctl fcom_audio_edit_btn","aria-label":t.$t("Edit audio"),onClick:h=>t.$emit("edit",d)},[_(a)],8,uNe),g("button",{type:"button",class:"fcom_audio_ctl fcom_audio_remove_btn","aria-label":t.$t("Remove audio"),onClick:h=>t.$emit("remove",d)},[_(c,null,{default:w(()=>[_(l)]),_:1})],8,dNe)],64)):O("",!0)]))),128))])}const bH=de(oNe,[["render",hNe]]),fNe={name:"MediaPreview",components:{Postcard:PTe,FluentPlayerPreview:yH,AudioList:bH},props:["feed","media_item","is_single"],data(){return{is_error:!1,isPlaying:!1,fluentPlayerFailed:!1}},watch:{"media.url"(){this.fluentPlayerFailed=!1}},computed:{media(){var t;return this.feed?(t=this.feed.meta)==null?void 0:t.media_preview:this.media_item},audioMedias(){var n,i,s,o,r;const t=(i=(n=this.feed)==null?void 0:n.meta)==null?void 0:i.audio_medias;if(Array.isArray(t)&&t.length)return t;const e=(o=(s=this.feed)==null?void 0:s.meta)==null?void 0:o.media_preview;return e&&(((r=e.settings)==null?void 0:r.viewType)==="audio"||e.content_type==="audio")?[e]:[]},playerMedia(){var t,e,n,i;return{...this.media,feed_id:((t=this.feed)==null?void 0:t.id)||((e=this.media)==null?void 0:e.feed_id)||"",share_url:((n=this.feed)==null?void 0:n.permalink)||((i=this.media)==null?void 0:i.share_url)||""}},mediaSrcUrl(){var t,e,n;return((e=(t=this.media)==null?void 0:t.settings)==null?void 0:e.src)||((n=this.media)==null?void 0:n.url)||""},mediaWrapperType(){return this.media.type==="oembed"&&!this.isVideoMedia?"meta_data":this.media.type},isVideoMedia(){return this.isYouTubePlaylistUrl(this.mediaSrcUrl)&&!this.media.html?!1:["oembed","iframe_html","video","fluent_player"].includes(this.media.type)},hasFluentPlayer(){var t;return this.appVars.features.has_fluent_player&&((t=this.appVars.features.fluent_player)==null?void 0:t.enable)},playEmbeddedVideos(){var t;return(t=this.appVars.features.fluent_player)==null?void 0:t.play_embedded_videos}},methods:{toAbsoluteUrl(t){return t?/^[a-z][\w+.-]*:/i.test(t)?t:`https://${t}`:""},getDomainName(t){const e=this.toAbsoluteUrl(t);if(!e)return"";try{return new URL(e).hostname.replace(/^www\./i,"")}catch{return""}},isYouTubePlaylistUrl(t){return t?/^(https?:\/\/)?([\w-]+\.)?youtube\.com\/playlist\?/i.test(t)&&/[?&]list=/i.test(t):!1},isYouTubePlaylistEmbed(){var e;const t=(((e=this.media)==null?void 0:e.html)||"").replace(/&amp;/gi,"&");return/youtube(-nocookie)?\.com\/embed\/[^"'\s]*[?&]list=/i.test(t)},isSupportedByFluentPlayer(){var n,i;const t=((i=(n=this.media)==null?void 0:n.settings)==null?void 0:i.src)||this.media.url;return!t||this.isYouTubePlaylistUrl(t)||this.isYouTubePlaylistEmbed()||!this.playEmbeddedVideos&&this.media.provider!=="upload"?!1:[{name:"youtube",regex:/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\/.+$/},{name:"vimeo",regex:/^(https?:\/\/)?(www\.)?vimeo\.com\/\d+(\/[a-f0-9]+)?([?#].*)?$/},{name:"file",regex:/\.(mp4|m3u8|mpd|webm|mov|qt|mp3|wav|m4a|aac|ogg|oga|flac|opus|weba)(\?.*)?$/i}].some(s=>s.regex.test(t))},getAspectRatio(t,e){if(t&&e){let n=t/e;return n<1?16/9:n}return 16/9},handleImageError(){this.is_error=!0},getVideoType(t){const e={mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",ogv:"video/ogg",mov:"video/quicktime",qt:"video/quicktime"},n=t.split(".").pop().toLowerCase();return e[n]||"video/mp4"},isAudioUrl(t){return t?/\.(mp3|wav|m4a|aac|ogg|oga|flac|opus|weba)(\?.*)?$/i.test(t):!1},getAudioType(t){const e={mp3:"audio/mpeg",wav:"audio/wav",m4a:"audio/mp4",aac:"audio/aac",ogg:"audio/ogg",oga:"audio/ogg",flac:"audio/flac",opus:"audio/opus",weba:"audio/webm"},n=t.split("?")[0].split("#")[0].split(".").pop().toLowerCase();return e[n]||"audio/mpeg"},playVideo(){this.$refs.nativeVideo&&this.$refs.nativeVideo.play()},onVideoPause(){this.$refs.nativeVideo&&this.$refs.nativeVideo.currentTime>0&&(this.isPlaying=!0)}}},wH=t=>(TP("data-v-7a204b64"),t=t(),PP(),t),pNe={key:0,class:"feed_media feed_media_audio_list"},mNe={key:0},gNe={key:1},vNe=["innerHTML"],_Ne={key:2,class:"native_audio_wrapper"},yNe=["preload"],bNe=["src","type"],wNe=["controls","preload","poster"],kNe=["src","type"],CNe=wH(()=>g("div",{class:"native_play_button"},[g("svg",{viewBox:"0 0 24 24",fill:"currentColor"},[g("path",{d:"M8 5v14l11-7z"})])],-1)),xNe=[CNe],SNe=["href"],$Ne={key:0,class:"feed_media_image"},ANe=wH(()=>g("span",null,null,-1)),ENe={key:1,class:"feed_media_content"},MNe={class:"media_domain"},TNe={class:"feed_media_title"},PNe={key:0,class:"feed_media_description"},INe={class:"feed_meta_desc"};function LNe(t,e,n,i,s,o){const r=W("audio-list"),a=W("fluent-player-preview"),l=Wt,c=Fo;return o.audioMedias.length?(v(),A("div",pNe,[_(r,{feed:n.feed,audios:o.audioMedias},null,8,["feed","audios"])])):(v(),A("div",{key:1,class:G(["feed_media","feed_media_"+o.mediaWrapperType])},[o.isVideoMedia?(v(),A(ee,{key:0},[o.hasFluentPlayer&&o.isSupportedByFluentPlayer()&&!s.fluentPlayerFailed?(v(),A("div",mNe,[_(a,{media:o.playerMedia,onLoadFailed:e[0]||(e[0]=u=>s.fluentPlayerFailed=!0)},null,8,["media"])])):o.media.html?(v(),A("div",gNe,[g("div",{class:"feed_media_ext_video",innerHTML:o.media.html},null,8,vNe)])):o.media.url&&o.isAudioUrl(o.media.url)?(v(),A("div",_Ne,[g("audio",{class:"native_audio_player",controls:"",preload:n.is_single?"metadata":"none"},[g("source",{src:o.media.url,type:o.getAudioType(o.media.url)},null,8,bNe)],8,yNe)])):o.media.url?(v(),A("div",{key:3,class:G(["native_video_wrapper",{video_playing:s.isPlaying}])},[g("video",{ref:"nativeVideo",class:"native_video_player",controls:s.isPlaying,preload:n.is_single?"metadata":"none",poster:o.media.thumbnail,onPlay:e[1]||(e[1]=u=>s.isPlaying=!0),onPause:e[2]||(e[2]=(...u)=>o.onVideoPause&&o.onVideoPause(...u)),onEnded:e[3]||(e[3]=u=>s.isPlaying=!1)},[g("source",{src:o.media.url,type:o.getVideoType(o.media.url)},null,8,kNe)],40,wNe),s.isPlaying?O("",!0):(v(),A("div",{key:0,class:"native_video_overlay",onClick:e[4]||(e[4]=(...u)=>o.playVideo&&o.playVideo(...u))},xNe))],2)):O("",!0)],64)):o.media.type=="image"||o.media.is_uploaded?(v(),A("div",{key:1,class:G(["feed_media_provider_"+o.media.provider,"feed_media_image feed_custom_uploaded"])},[o.media.image&&!s.is_error?(v(),D(c,{key:0,alt:"",style:Xe({width:"100%",aspectRatio:o.getAspectRatio(o.media.width,o.media.height)}),src:o.media.image,lazy:!0,previewSrcList:[o.media.image],loading:"lazy",onError:o.handleImageError,"zoom-rate":1.2,"max-scale":7,"hide-on-click-modal":!0,"preview-teleported":!0,"min-scale":.2,"initial-index":1,class:G("fcom_media_provider_"+o.media.provider),fit:"scale-down"},{placeholder:w(()=>[_(l,{animated:!0})]),_:1},8,["style","src","previewSrcList","onError","class"])):O("",!0)],2)):(v(),A("a",{key:2,href:o.toAbsoluteUrl(o.media.url),target:"_blank",rel:"noopener",class:"feed_media_link"},[o.media.image&&!s.is_error?(v(),A("div",$Ne,[_(c,{onError:e[5]||(e[5]=u=>o.handleImageError()),style:{width:"100%"},src:o.media.image},{error:w(()=>[ANe]),_:1},8,["src"])])):O("",!0),o.media.title||o.media.url?(v(),A("div",ENe,[g("div",MNe,S(o.getDomainName(o.media.url)),1),g("div",TNe,S(t.getExcerpt(o.media.title||o.media.url,88)),1),o.media.description?(v(),A("div",PNe,[g("div",INe,S(t.getExcerpt(o.media.description,160)),1)])):O("",!0)])):O("",!0)],8,SNe))],2))}const gp=de(fNe,[["render",LNe],["__scopeId","data-v-7a204b64"]]),BM={video:{extensions:[".mp4",".webm",".mov",".qt"],pattern:/\.(mp4|webm|mov|qt)$/i},audio:{extensions:[".mp3",".wav",".m4a",".aac",".ogg",".oga",".flac"],pattern:/\.(mp3|wav|m4a|aac|ogg|oga|flac)$/i}},zM=[{name:"youtube",regex:/^(https?:\/\/)?(www\.)?(youtube\.com|youtu\.be)\/.+$/},{name:"vimeo",regex:/^(https?:\/\/)?(www\.)?vimeo\.com\/\d+(\/[a-f0-9]+)?([?#].*)?$/},{name:"file",regex:/\.(mp4|m3u8|mpd|webm|mov|qt|mp3|wav|m4a|aac|ogg|oga|flac|opus|weba)(\?.*)?$/i}],ONe={name:"FluentPlayerUploader",components:{UploadFilled:Q5},emits:["video-added","completed","uploading"],props:{className:{type:String,default:"video-uploader"},type:{type:String,default:"url"},media_kind:{type:String,default:"video"}},data(){return{videoUrl:"",processing:!1}},computed:{uploadKind(){return this.media_kind==="audio"?"audio":"video"},acceptTypes(){return BM[this.uploadKind].extensions.join(",")},uploadButtonLabel(){return this.uploadKind==="audio"?this.$t("Upload Audio"):this.$t("Upload Video")},kindErrorMessage(){return this.uploadKind==="audio"?this.$t("The file must be a valid audio type (MP3, WAV, M4A, AAC, OGG, FLAC)"):this.$t("The file must be a valid video type (MP4, WebM, MOV)")},uploadData(){return{context:"fluent_player",media_kind:this.uploadKind}},action_url(){return this.appVars.rest.url+"/fluent-player/video-upload"},headers(){return{"X-WP-Nonce":this.appVars.rest.nonce}}},methods:{beforeUpload(t){return BM[this.uploadKind].pattern.test(t.name||"")?!0:(this.$handleError(this.kindErrorMessage),!1)},async handleUrlSubmit(){if(!this.videoUrl)return;const t=zM.some(i=>i.name==="file"&&i.regex.test(this.videoUrl)),e=zM.some(i=>i.name!=="file"&&i.regex.test(this.videoUrl));let n={type:"oembed",url:this.videoUrl,html:"",content_type:"video"};t?(n.player="fluent_player",n.provider="url",n.media_id=new Date().getTime()):e&&(n.player="fluent_player",n.media_id=new Date().getTime()),this.$emit("video-added",n)},handleVideoUploadSuccess(t){var e,n;try{if(!t||!t.media||!t.media.url)throw new Error("Invalid response: missing media.url");const{media:i}=t,s=((e=i.settings)==null?void 0:e.viewType)==="audio"||this.uploadKind==="audio",o={type:"upload",url:i.url,player:"fluent_player",provider:"upload",content_type:s?"audio":"video",html:"",title:((n=i.settings)==null?void 0:n.title)||"",media_id:i.media_id,settings:i.settings||{}};this.$emit("video-added",o)}catch(i){console.error("[FluentPlayerUploader] handleVideoUploadSuccess error:",i,t)}finally{this.$emit("completed",t),this.processing=!1}},handleError(t){try{let e=(t==null?void 0:t.message)||t;if(typeof e=="string")try{const n=JSON.parse(e);e=(n==null?void 0:n.message)||e}catch{}this.$handleError(e)}catch(e){console.error("[FluentPlayerUploader] handleError failed:",e,t)}finally{this.$emit("completed",t),this.processing=!1}},inProgress(t){this.$emit("uploading"),this.processing=!0}}},DNe=["element-loading-text"],RNe={key:0,class:"upload-options"},VNe={class:"uploader-content"},FNe={class:"el-upload__text"},NNe={key:1,class:"url-input-section"};function BNe(t,e,n,i,s,o){const r=W("upload-filled"),a=be,l=We,c=A1,u=ft,d=xt("loading");return De((v(),A("div",{class:"fluent-player-uploader","element-loading-text":t.$t("Uploading media..."),"element-loading-background":"rgba(255, 255, 255, 0.85)"},[n.type==="upload"?(v(),A("div",RNe,[_(c,{drag:"",class:G([n.className,"video-drag-uploader"]),multiple:o.uploadKind==="audio",action:o.action_url,headers:o.headers,accept:o.acceptTypes,data:o.uploadData,"before-upload":o.beforeUpload,"on-success":o.handleVideoUploadSuccess,"on-progress":o.inProgress,"on-error":o.handleError,"show-file-list":!1,disabled:s.processing},{default:w(()=>[g("div",VNe,[_(a,{class:"el-icon--upload"},{default:w(()=>[_(r)]),_:1}),g("div",FNe,[B(S(t.$t("Drop file here or"))+" ",1),g("em",null,S(t.$t("upload by clicking")),1)]),_(l,{type:"primary",class:"upload-button",loading:s.processing,disabled:s.processing},{default:w(()=>[le(t.$slots,"trigger",{},()=>[le(t.$slots,"default",{},()=>[B(S(s.processing?t.$t("Uploading..."):o.uploadButtonLabel),1)])])]),_:3},8,["loading","disabled"])])]),_:3},8,["class","multiple","action","headers","accept","data","before-upload","on-success","on-progress","on-error","disabled"])])):(v(),A("div",NNe,[_(u,{modelValue:s.videoUrl,"onUpdate:modelValue":e[0]||(e[0]=h=>s.videoUrl=h),type:"url",placeholder:t.$t("Enter video URL"),size:"large"},{append:w(()=>[_(l,{onClick:o.handleUrlSubmit,loading:s.processing},{default:w(()=>[B(S(t.$t("Embed")),1)]),_:1},8,["onClick","loading"])]),_:1},8,["modelValue","placeholder"])]))],8,DNe)),[[d,s.processing]])}const zNe=de(ONe,[["render",BNe]]),HNe={name:"MediaEmbeder",emits:["embeded"],props:{media:{type:Object,default:()=>({type:"oembed",url:"",inner_html:"",content_type:"video",html:"",provider:"",title:"",author_name:"",image:""})},box_title:{type:String,default:""},box_description:{type:String,default:""},has_iframe:{type:Boolean,default:!0},space:{type:String,default:""},is_feed:{type:Boolean,default:!1}},components:{MediaPreview:gp,FluentPlayerUploader:zNe},computed:{showPreview(){return this.media.html&&!this.showInput},editorMode:{get(){return this.media.type},set(t){this.media.type=t}},hasFluentPlayer(){var t;return this.hasFluentPlayerInstalled&&((t=this.appVars.features.fluent_player)==null?void 0:t.enable)},hasFluentPlayerInstalled(){return this.appVars.features.has_fluent_player},hasUploadEnabled(){var t;return this.is_feed&&this.hasFluentPlayer&&((t=this.appVars.features.fluent_player)==null?void 0:t.has_video_upload)},uploadRole(){var t;return((t=this.appVars.features.fluent_player)==null?void 0:t.video_upload_role)||"admin"},getSpace(){return this.space||""},playEmbeddedVideos(){var t;return(t=this.appVars.features.fluent_player)==null?void 0:t.play_embedded_videos},editorTitle(){return this.box_title||this.$t("Featured media")},uploadHint(){return this.$t("The file must be a valid video type (MP4, WebM, MOV)")},hasUpload(){return this.hasUploadEnabled&&(this.uploadRole==="everyone"||this.uploadRole==="admin_moderator"&&(this.isModerator(this.getSpace)||this.isAdmin())||this.uploadRole==="admin"&&this.isAdmin())}},data(){return{appReady:!1,showInput:!1,fetching:!1,uploading:!1,uploadKind:"video"}},methods:{fetchData(){this.media.url&&(this.fetching=!0,this.$get("feeds/oembed",{url:this.media.url}).then(t=>{this.media.html=t.oembed.html,this.media.provider=t.oembed.provider,this.media.title=t.oembed.title,this.media.author_name=t.oembed.author_name,this.media.type=t.oembed.type,this.media.image=t.oembed.image,this.media.content_type="video",this.$emit("embeded",this.media),this.showInput=!1}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1}))},handleAddCustomHtml(){if(!/<iframe[\s>]/i.test(this.media.html||"")){this.$handleError(this.$t("Only iframe embed code is supported. Script-based embeds will not work."));return}this.media.content_type="video",this.$emit("embeded",this.media),this.showInput=!1},handleFluentPlayerVideo(t){Object.assign(this.media,t);const e=this.media.type==="upload"||this.media.provider==="url";if(this.media.player==="fluent_player"&&e){this.media.type="oembed",this.$emit("embeded",this.media);return}this.fetchData()}},mounted(){typeof this.media!="object"&&(this.media={type:"oembed",url:"",inner_html:"",content_type:"video"}),this.appReady=!0,this.media.html||this.fetchData()}},UNe={key:0},jNe={key:0,class:"fcom_media_editor_actions"},WNe={key:1,class:"fcom_media_editor fcom_media_embeder"},YNe={key:0},qNe={key:1},GNe={key:2,class:"fcom_course_media"};function XNe(t,e,n,i,s,o){var f;const r=We,a=sp,l=xs,c=ft,u=W("fluent-player-uploader"),d=W("media-preview"),h=xt("loading");return s.appReady?De((v(),A("div",UNe,[n.has_iframe||o.hasUpload?(v(),A("div",jNe,[o.showPreview?(v(),D(r,{key:0,onClick:e[0]||(e[0]=p=>s.showInput=!0),size:"small",text:""},{default:w(()=>[B(S(t.$t("Edit media")),1)]),_:1})):(v(),D(l,{key:1,onChange:e[1]||(e[1]=p=>{n.media.html="",n.media.url="",s.showInput=!0}),size:"small",modelValue:o.editorMode,"onUpdate:modelValue":e[2]||(e[2]=p=>o.editorMode=p),disabled:s.uploading,"aria-label":t.$t("Media source")},{default:w(()=>[_(a,{label:t.$t("Oembed"),value:"oembed"},null,8,["label"]),n.has_iframe?(v(),D(a,{key:0,label:t.$t("HTML Code"),value:"iframe_html"},null,8,["label"])):O("",!0),o.hasUpload?(v(),D(a,{key:1,label:t.$t("Upload Video"),value:"upload","data-testid":"upload-kind-video"},null,8,["label"])):O("",!0)]),_:1},8,["modelValue","disabled","aria-label"]))])):O("",!0),o.showPreview?(v(),A("div",GNe,[_(d,{media_item:n.media},null,8,["media_item"])])):(v(),A("div",WNe,[n.media.type=="iframe_html"&&n.has_iframe?(v(),A(ee,{key:0},[g("h3",null,S(t.$t("Add Video from custom HTML Code")),1),_(c,{rows:5,modelValue:n.media.html,"onUpdate:modelValue":e[3]||(e[3]=p=>n.media.html=p),type:"textarea",placeholder:t.$t("Paste an iframe code")},null,8,["modelValue","placeholder"]),_(r,{class:"fcom_secondary_button fcom_mt_20",onClick:e[4]||(e[4]=p=>o.handleAddCustomHtml())},{default:w(()=>[B(S(t.$t("Embed")),1)]),_:1})],64)):(v(),A(ee,{key:1},[g("h3",null,S(o.editorTitle),1),o.hasFluentPlayerInstalled&&n.media.type==="upload"?(v(),A("p",YNe,S(o.uploadHint),1)):(v(),A("p",qNe,S(n.box_description||t.$t("Embed from Vimeo, YouTube, Wistia and more")),1)),o.hasFluentPlayer&&(n.media.type==="upload"||o.playEmbeddedVideos)?(v(),D(u,{key:2,type:((f=n.media)==null?void 0:f.type)==="upload"?"upload":"url",media_kind:s.uploadKind,onVideoAdded:o.handleFluentPlayerVideo,onUploading:e[5]||(e[5]=p=>s.uploading=!0),onCompleted:e[6]||(e[6]=p=>s.uploading=!1)},null,8,["type","media_kind","onVideoAdded"])):(v(),D(c,{key:3,onKeydown:ut(o.fetchData,["enter"]),size:"large",modelValue:n.media.url,"onUpdate:modelValue":e[7]||(e[7]=p=>n.media.url=p),type:"url",placeholder:t.$t("Paste a URL to embed")},{append:w(()=>[_(r,{onClick:o.fetchData,class:"fcom_primary_button"},{default:w(()=>[B(S(t.$t("Embed")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeydown","modelValue","placeholder"]))],64))]))])),[[h,s.fetching]]):O("",!0)}const q1=de(HNe,[["render",XNe]]),KNe={name:"VideoEmbeder",emits:["embeded"],props:["is_admin","space"],components:{MediaEmbeder:q1,VideoIcon:YFe},data(){return{videoUrl:"",showVideoPop:!1,media:{type:"oembed",url:"",inner_html:"",content_type:"video"}}},watch:{showVideoPop(t){t||this.resetMedia()}},methods:{show(){this.showVideoPop=!0},resetMedia(){this.media={type:"oembed",url:"",inner_html:"",content_type:"video"}},embeded(t){var n;this.$emit("embeded",t),t&&(t.content_type==="audio"||((n=t.settings)==null?void 0:n.viewType)==="audio")||(this.showVideoPop=!1,this.resetMedia())}}},ZNe={class:"fcom_video_embeder"};function JNe(t,e,n,i,s,o){const r=W("VideoIcon"),a=be,l=We,c=W("media-embeder"),u=Ss;return v(),A("div",ZNe,[_(l,{"aria-label":"Add Video",text:"",onClick:o.show},{default:w(()=>[_(a,{class:G(["fcom_apps_icon"])},{default:w(()=>[_(r)]),_:1})]),_:1},8,["onClick"]),s.showVideoPop?(v(),D(u,{key:0,title:t.$t("Attach Media"),modelValue:s.showVideoPop,"onUpdate:modelValue":e[0]||(e[0]=d=>s.showVideoPop=d),width:t.dialogWidth,style:{"max-width":"600px"},"append-to-body":!0},{default:w(()=>[_(c,{box_title:t.$t("Add Featured Video for this post"),has_iframe:n.is_admin,is_feed:!0,onEmbeded:o.embeded,space:n.space,media:s.media},null,8,["box_title","has_iframe","onEmbeded","space","media"])]),_:1},8,["title","modelValue","width"])):O("",!0)])}const QNe=de(KNe,[["render",JNe]]),eBe={name:"AudioEditModal",components:{ImageUploader:vl,EditPen:rH,Delete:J5},emits:["update:visible","saved"],props:{media:{type:Object,required:!0},visible:{type:Boolean,default:!1}},data(){return{localTitle:this.readTitle(),localPoster:this.readPoster(),saving:!1}},watch:{visible(t){t&&(this.localTitle=this.readTitle(),this.localPoster=this.readPoster())}},methods:{readTitle(){var t,e,n;return((e=(t=this.media)==null?void 0:t.settings)==null?void 0:e.title)||((n=this.media)==null?void 0:n.title)||""},readPoster(){var t,e,n;return((e=(t=this.media)==null?void 0:t.settings)==null?void 0:e.posterSrc)||((n=this.media)==null?void 0:n.image)||""},save(){var t;if(!this.localTitle||!this.localTitle.trim()){this.$handleError(this.$t("Audio file name cannot be empty"));return}if(this.localTitle=this.localTitle.trim(),!((t=this.media)!=null&&t.media_id)){this.$emit("saved",this.buildLocalUpdate()),this.$emit("update:visible",!1);return}this.saving=!0,this.$post("fluent-player/audio-media/"+this.media.media_id,{title:this.localTitle,posterSrc:this.localPoster}).then(e=>{this.$emit("saved",{...this.media,...e.media}),this.$emit("update:visible",!1)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},buildLocalUpdate(){var e;const t={...((e=this.media)==null?void 0:e.settings)||{},title:this.localTitle,posterSrc:this.localPoster,poster_is_custom:!!this.localPoster};return{...this.media,title:this.localTitle,image:this.localPoster,settings:t}}}},tBe={class:"fcom_audio_edit"},nBe={id:"fcom_audio_name_label",class:"fcom_audio_edit__label"},sBe={class:"fcom_audio_edit__label"},iBe={class:"fcom_audio_edit__thumb_row"},oBe={class:"fcom_image_uploader_wrapper"},rBe={class:"fcom_sr_only"};function aBe(t,e,n,i,s,o){const r=ft,a=Fo,l=W("EditPen"),c=be,u=We,d=W("Delete"),h=W("image-uploader"),f=Ss;return v(),D(f,{"model-value":n.visible,title:t.$t("Edit Audio"),width:"440px","append-to-body":"","onUpdate:modelValue":e[3]||(e[3]=p=>t.$emit("update:visible",p))},{footer:w(()=>[_(u,{class:"fcom_secondary_button",onClick:e[2]||(e[2]=p=>t.$emit("update:visible",!1))},{default:w(()=>[B(S(t.$t("Cancel")),1)]),_:1}),_(u,{class:"fcom_primary_button",loading:s.saving,disabled:!s.localTitle||!s.localTitle.trim(),onClick:o.save},{default:w(()=>[B(S(t.$t("Save")),1)]),_:1},8,["loading","disabled","onClick"])]),default:w(()=>[g("div",tBe,[g("label",nBe,S(t.$t("Audio file name")),1),_(r,{modelValue:s.localTitle,"onUpdate:modelValue":e[0]||(e[0]=p=>s.localTitle=p),placeholder:t.$t("Audio file name"),"aria-label":t.$t("Audio file name"),"aria-labelledby":"fcom_audio_name_label"},null,8,["modelValue","placeholder","aria-label"]),g("label",sBe,S(t.$t("Thumbnail")),1),g("div",iBe,[s.localPoster?(v(),D(a,{key:0,src:s.localPoster,alt:t.$t("Thumbnail"),style:{"max-width":"100px",height:"auto"}},null,8,["src","alt"])):O("",!0),g("div",oBe,[_(h,{isTextBtn:!1,removeIcon:!0,can_remove:!!s.localPoster,confirm_remove:!0,additionalData:{resize:!1,max_width:500,skip_convert:"yes"},onUploaded:e[1]||(e[1]=p=>{s.localPoster=p})},cs({remove:w(()=>[_(c,null,{default:w(()=>[_(d)]),_:1}),g("span",rBe,S(t.$t("Remove Thumbnail")),1)]),_:2},[s.localPoster?{name:"trigger",fn:w(({loading:p})=>[_(u,{class:"fcom_plain_button",loading:p,disabled:p,"aria-label":t.$t("Change Thumbnail"),title:t.$t("Change Thumbnail")},{default:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1})]),_:2},1032,["loading","disabled","aria-label","title"])]),key:"0"}:void 0]),1032,["can_remove"])])])])]),_:1},8,["model-value","title"])}const lBe=de(eBe,[["render",aBe]]),cBe={name:"MusicIcon"},uBe={width:"22",height:"22",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",focusable:"false"},dBe=g("path",{d:"M7.5 15V4.583l8.333-1.25V13.75",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),hBe=g("path",{d:"M5.417 17.5c1.15 0 2.083-.84 2.083-1.875S6.567 13.75 5.417 13.75 3.333 14.59 3.333 15.625 4.266 17.5 5.417 17.5Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),fBe=g("path",{d:"M13.75 15.625c1.15 0 2.083-.84 2.083-1.875s-.933-1.875-2.083-1.875-2.083.84-2.083 1.875.933 1.875 2.083 1.875Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),pBe=[dBe,hBe,fBe];function mBe(t,e,n,i,s,o){return v(),A("svg",uBe,pBe)}const gBe=de(cBe,[["render",mBe]]),vBe={name:"AudioUploadButton",components:{MusicIcon:gBe},emits:["audio-added","uploading","completed"],props:{space:{type:String,default:""},remaining:{type:Number,default:null}},data(){return{uploading:!1}},computed:{maxAudios(){var t;return((t=this.appVars.features.fluent_player)==null?void 0:t.max_audios_per_post)||10},capacity(){return this.remaining===null?this.maxAudios:Math.max(0,this.remaining)},canUpload(){const t=this.appVars.features.fluent_player;if(!this.appVars.features.has_fluent_player||!t||!t.enable||!t.has_audio_upload)return!1;const e=t.video_upload_role||"admin";return e==="everyone"?!0:e==="admin_moderator"?this.isModerator(this.space)||this.isAdmin():this.isAdmin()}},methods:{pickFiles(){this.$refs.fileInput&&this.$refs.fileInput.click()},async onFilesSelected(t){var n,i;let e=Array.from(t.target.files||[]);if(t.target.value="",!!e.length){if(this.capacity<=0){this.$handleError(this.$t("You can add a maximum of %s audios per post.",this.maxAudios));return}e.length>this.capacity&&((i=(n=this.$notify)==null?void 0:n.warning)==null||i.call(n,this.$t("You can add a maximum of %s audios per post.",this.maxAudios)),e=e.slice(0,this.capacity)),this.uploading=!0,this.$emit("uploading");for(const s of e)try{await this.uploadOne(s)}catch(o){this.$handleError(o&&o.message?o.message:o)}this.uploading=!1,this.$emit("completed")}},uploadOne(t){const e=new FormData;return e.append("file",t),e.append("context","fluent_player"),e.append("media_kind","audio"),fetch(this.appVars.rest.url+"/fluent-player/video-upload",{method:"POST",headers:{"X-WP-Nonce":this.appVars.rest.nonce},body:e}).then(n=>n.json().then(i=>({ok:n.ok,body:i}))).then(({ok:n,body:i})=>{if(!n||!i||!i.media||!i.media.url)throw new Error(i&&i.message||this.$t("Failed to upload audio"));const s=i.media;this.$emit("audio-added",{type:"upload",url:s.url,player:"fluent_player",provider:"upload",content_type:"audio",html:"",title:s.settings&&s.settings.title||t.name,media_id:s.media_id,settings:s.settings||{}})})}}};function _Be(t,e,n,i,s,o){const r=W("MusicIcon"),a=be,l=We;return o.canUpload?(v(),D(l,{key:0,"aria-label":t.$t("Upload Audio"),title:t.$t("Upload Audio"),text:"",loading:s.uploading,onClick:o.pickFiles},{default:w(()=>[_(a,{class:"fcom_status_img_icon"},{default:w(()=>[_(r)]),_:1}),g("input",{ref:"fileInput",type:"file",accept:".mp3,.wav,.m4a,.aac,.ogg,.oga,.flac",multiple:"",hidden:"",onChange:e[0]||(e[0]=(...c)=>o.onFilesSelected&&o.onFilesSelected(...c))},null,544)]),_:1},8,["aria-label","title","loading","onClick"])):O("",!0)}const yBe=de(vBe,[["render",_Be]]),bBe={name:"DocumentsUploader",components:{UploadFilled:Q5,Document:h2},emits:["filesChanged","fileAdded"],props:{is_multiple:{type:Boolean,default:!1},additional_data:{type:Object,default:()=>({})},showLists:{type:Boolean,default:!0},prevFiles:{type:Array,default:()=>[]}},computed:{action_url(){return this.appVars.rest.url+"/documents/upload"},headers(){return{"X-WP-Nonce":this.appVars.rest.nonce}},uploadingFiles(){return this.fileList.filter(t=>t.status==="uploading")}},data(){return{fileList:[]}},methods:{handleSuccess(t){var e;console.log(t),(e=t==null?void 0:t.file)!=null&&e.media_key&&this.$emit("fileAdded",t==null?void 0:t.file)},handleChange(){let t=[];this.fileList.forEach(e=>{var n,i;(i=(n=e==null?void 0:e.response)==null?void 0:n.file)!=null&&i.media_key&&t.push({id:e.response.file.id,media_key:e.response.file.media_key,title:e.response.file.title,type:e.response.file.type})}),this.$emit("filesChanged",t)},handleError(t){this.$handleError(JSON.parse(t.message))}}},wBe={class:"fcom_documents_uploader"},kBe={class:"el-upload__text"},CBe={key:0},xBe={class:"fcom_document_lists"},SBe={class:"fcom_each_document"},$Be={class:"fcom_document_info"},ABe={class:"fcom_document_icon"},EBe={class:"fcom_document_title"},MBe={class:"fcom_document_actions"};function TBe(t,e,n,i,s,o){const r=W("UploadFilled"),a=be,l=A1,c=W("Document"),u=We;return v(),A("div",wBe,[_(l,{action:o.action_url,headers:o.headers,"file-list":s.fileList,"onUpdate:fileList":e[0]||(e[0]=d=>s.fileList=d),accept:"*/*",drag:"",class:"fcom_document_upload",multiple:n.is_multiple,data:n.additional_data,"show-file-list":n.showLists,"on-change":o.handleChange,"on-success":o.handleSuccess,"on-error":o.handleError,"on-remove":o.handleChange},{default:w(()=>[_(a,{class:"el-icon--upload"},{default:w(()=>[_(r)]),_:1}),g("div",kBe,S(t.$t("Drop file here or click to upload")),1)]),_:1},8,["action","headers","file-list","multiple","data","show-file-list","on-change","on-success","on-error","on-remove"]),!n.showLists&&o.uploadingFiles.length?(v(),A("div",CBe,[g("div",xBe,[(v(!0),A(ee,null,Ce(o.uploadingFiles,d=>(v(),A("div",SBe,[g("div",$Be,[g("div",ABe,[_(a,null,{default:w(()=>[_(c)]),_:1})]),g("span",EBe,S(d.name),1)]),g("div",MBe,[_(u,{text:"",size:"small",loading:!0},{default:w(()=>[B(S(t.$t("Uploading...")),1)]),_:1})])]))),256))])])):O("",!0)])}const kH=de(bBe,[["render",TBe]]),PBe={name:"PdfIcon"},IBe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"},LBe=g("path",{opacity:"0.4",d:"M19 11C19 10.1825 19 9.4306 18.8478 9.06306C18.6955 8.69552 18.4065 8.40649 17.8284 7.82843L13.0919 3.09188C12.593 2.593 12.3436 2.34355 12.0345 2.19575C11.9702 2.165 11.9044 2.13772 11.8372 2.11401C11.5141 2 11.1614 2 10.4558 2C7.21082 2 5.58831 2 4.48933 2.88607C4.26731 3.06508 4.06508 3.26731 3.88607 3.48933C3 4.58831 3 6.21082 3 9.45584V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H19M12 2.5V3C12 5.82843 12 7.24264 12.8787 8.12132C13.7574 9 15.1716 9 18 9H18.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),OBe=g("path",{d:"M21 14H19C18.4477 14 18 14.4477 18 15V16.5M18 16.5V19M18 16.5H20.5M7 19V17M7 17V14H8.5C9.32843 14 10 14.6716 10 15.5C10 16.3284 9.32843 17 8.5 17H7ZM12.5 14H13.7857C14.7325 14 15.5 14.7462 15.5 15.6667V17.3333C15.5 18.2538 14.7325 19 13.7857 19H12.5V14Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),DBe=[LBe,OBe];function RBe(t,e,n,i,s,o){return v(),A("svg",IBe,DBe)}const VBe=de(PBe,[["render",RBe]]),FBe={name:"ZipIcon"},NBe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"},BBe=g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M9.24643 13.7697C8.9545 13.7507 8.55839 13.75 8.00407 13.75H7.00391C6.58969 13.75 6.25391 13.4142 6.25391 13C6.25391 12.5858 6.58969 12.25 7.00391 12.25H8.00407C8.01907 12.25 8.03402 12.25 8.04892 12.25C8.66199 12.25 9.18423 12.25 9.57881 12.2929C9.93962 12.3322 10.469 12.4271 10.7888 12.8672C10.9627 13.1066 11.0272 13.3876 10.9857 13.67C10.9495 13.9166 10.8383 14.1258 10.7382 14.2819C10.5513 14.5734 10.2447 14.912 9.91903 15.2718C9.90537 15.2868 9.89169 15.3019 9.87798 15.3171L8.63592 16.6895C8.43153 16.9153 8.27429 17.0901 8.15532 17.2303C8.44726 17.2493 8.84336 17.25 9.39768 17.25H10.3978C10.8121 17.25 11.1478 17.5858 11.1478 18C11.1478 18.4142 10.8121 18.75 10.3978 18.75L9.35284 18.75C8.73977 18.75 8.21752 18.7501 7.82294 18.7071C7.46213 18.6678 6.93277 18.5729 6.61299 18.1328C6.43908 17.8934 6.37458 17.6124 6.41604 17.33C6.45224 17.0835 6.5634 16.8742 6.66351 16.7181C6.85041 16.4266 7.15703 16.088 7.48273 15.7283C7.49638 15.7132 7.51006 15.6981 7.52377 15.6829L8.76583 14.3105C8.97022 14.0847 9.12746 13.9099 9.24643 13.7697Z",fill:"currentColor"},null,-1),zBe=g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M12.1914 13C12.1914 12.5858 12.5272 12.25 12.9414 12.25H15.4869C15.9011 12.25 16.2369 12.5858 16.2369 13C16.2369 13.4142 15.9011 13.75 15.4869 13.75H14.9641V17.25H15.4869C15.9011 17.25 16.2369 17.5858 16.2369 18C16.2369 18.4142 15.9011 18.75 15.4869 18.75H12.9414C12.5272 18.75 12.1914 18.4142 12.1914 18C12.1914 17.5858 12.5272 17.25 12.9414 17.25H13.4641V13.75H12.9414C12.5272 13.75 12.1914 13.4142 12.1914 13Z",fill:"currentColor"},null,-1),HBe=g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M19.0189 12.25C19.0305 12.25 19.0419 12.25 19.0534 12.25H19.7321C20.8365 12.25 21.7549 13.1328 21.7549 14.25C21.7549 15.3673 20.8365 16.25 19.7321 16.25H18.7852V18C18.7852 18.4142 18.4494 18.75 18.0352 18.75C17.621 18.75 17.2852 18.4142 17.2852 18V14C17.2852 13.9885 17.2852 13.9769 17.2852 13.9653C17.2851 13.7605 17.285 13.5378 17.3107 13.3497C17.3411 13.1278 17.4193 12.8466 17.6588 12.6114C17.8964 12.378 18.1772 12.3037 18.3966 12.2748C18.5853 12.2499 18.8094 12.2499 19.0189 12.25ZM18.7852 14.75H19.7321C20.0336 14.75 20.2549 14.5135 20.2549 14.25C20.2549 13.9866 20.0336 13.75 19.7321 13.75H19.0534C18.9463 13.75 18.8604 13.7501 18.7863 13.7514C18.7852 13.8207 18.7852 13.9009 18.7852 14V14.75Z",fill:"currentColor"},null,-1),UBe=g("path",{opacity:"0.4",d:"M7.13841 20.7033C8.00786 20.7942 9.13899 20.7955 10.7476 20.7955H14.9079C15.4456 20.7955 15.8816 21.233 15.8816 21.7727C15.8816 22.3125 15.4456 22.75 14.9079 22.75H10.6927C9.15159 22.75 7.91879 22.75 6.93654 22.6473C5.92712 22.5417 5.0659 22.3186 4.32113 21.7919C3.93077 21.5159 3.58222 21.1871 3.28704 20.8146C2.71721 20.0956 2.47396 19.2577 2.35985 18.2843C2.24996 17.3469 2.24998 16.1743 2.25 14.7262V12.1428V12.1427C2.25 10.7244 2.24999 9.61179 2.30919 8.71107C2.36944 7.79422 2.49398 7.02952 2.77509 6.31755C3.61848 4.1815 5.39221 2.51875 7.61221 1.73658C8.99465 1.2495 10.6813 1.24971 13.5209 1.25007L13.7572 1.25009L13.9605 1.25004L13.9606 1.25004C15.5156 1.2495 16.548 1.24914 17.4068 1.55172C18.7834 2.03673 19.8918 3.071 20.4206 4.41031C20.6039 4.87447 20.6795 5.36014 20.7153 5.90477C20.75 6.43335 20.75 7.08083 20.75 7.87999V7.88006V10.0455C20.75 10.5852 20.3141 11.0228 19.7763 11.0228C19.2386 11.0228 18.8026 10.5852 18.8026 10.0455V7.91329C18.8026 7.07303 18.8021 6.49008 18.7721 6.03341C18.7427 5.58546 18.6879 5.32704 18.6102 5.1304C18.3001 4.34503 17.6344 3.70339 16.7618 3.39593C16.2584 3.21858 15.5913 3.20463 13.7572 3.20463C13.4591 3.20463 13.1023 3.2058 12.7641 3.20732C12.426 3.20885 11.8726 3.21134 11.4104 3.48025C11.1057 3.65756 10.8849 3.85945 10.7582 4.08004C10.5409 4.45845 10.4166 4.89711 10.4166 5.3648C10.4166 5.51193 10.4262 5.70446 10.4344 5.88206L10.4344 5.88212C10.4417 6.03696 10.4496 6.20566 10.4531 6.3737C10.461 6.75379 10.449 7.19733 10.3343 7.62548C10.1108 8.45945 9.4594 9.11086 8.62543 9.33432C8.19728 9.44904 7.75374 9.46105 7.37365 9.45315C7.20551 9.44966 7.03693 9.44174 6.88201 9.43446C6.70441 9.42622 6.48041 9.41667 6.33328 9.41667C5.88661 9.41667 5.46642 9.53003 5.09991 9.72955C4.87246 9.85337 4.65104 10.0965 4.47811 10.3875C4.19749 10.8596 4.19732 11.4982 4.19734 11.7652L4.19737 14.6653C4.19737 16.1888 4.19894 17.2461 4.29387 18.0559C4.38611 18.8427 4.55555 19.2754 4.81111 19.5979C4.9889 19.8223 5.20128 20.0234 5.44274 20.1941C5.80057 20.4472 6.28449 20.6139 7.13841 20.7033Z",fill:"currentColor"},null,-1),jBe=[BBe,zBe,HBe,UBe];function WBe(t,e,n,i,s,o){return v(),A("svg",NBe,jBe)}const YBe=de(FBe,[["render",WBe]]),qBe={name:"AudioIcon"},GBe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"},XBe=g("path",{d:"M5.5 21.5H18.5C20.1569 21.5 21.5 20.1569 21.5 18.5V5.5C21.5 3.84315 20.1569 2.5 18.5 2.5H5.5C3.84315 2.5 2.5 3.84315 2.5 5.5V18.5C2.5 20.1569 3.84315 21.5 5.5 21.5Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"},null,-1),KBe=g("path",{d:"M10 15.5C10 16.3284 9.32843 17 8.5 17C7.67157 17 7 16.3284 7 15.5C7 14.6716 7.67157 14 8.5 14C9.32843 14 10 14.6716 10 15.5ZM10 15.5V8.5L16 7V13.5M16 13.5C16 14.3284 15.3284 15 14.5 15C13.6716 15 13 14.3284 13 13.5C13 12.6716 13.6716 12 14.5 12C15.3284 12 16 12.6716 16 13.5Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),ZBe=[XBe,KBe];function JBe(t,e,n,i,s,o){return v(),A("svg",GBe,ZBe)}const QBe=de(qBe,[["render",JBe]]),eze={name:"DocIcon"},tze={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"},nze=g("path",{d:"M21 15C21 14.4477 20.5523 14 20 14H19C18.4477 14 18 14.4477 18 15V18C18 18.5523 18.4477 19 19 19H20C20.5523 19 21 18.5523 21 18M7 14H8C9.10457 14 10 14.8954 10 16V17C10 18.1046 9.10457 19 8 19H7V14ZM13.5 14H14.5C15.0523 14 15.5 14.4477 15.5 15V18C15.5 18.5523 15.0523 19 14.5 19H13.5C12.9477 19 12.5 18.5523 12.5 18V15C12.5 14.4477 12.9477 14 13.5 14Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),sze=g("path",{d:"M19 22H5C3.89543 22 3 21.1046 3 20L3 4C3 2.89543 3.89543 2 5 2H12L19 9V11M18.5 9H13.998C12.8935 9 11.998 8.10457 11.998 7V2.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),ize=[nze,sze];function oze(t,e,n,i,s,o){return v(),A("svg",tze,ize)}const rze=de(eze,[["render",oze]]),aze={name:"VideoFileIcon"},lze={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"},cze=g("path",{d:"M19 13V9L12 2H5C3.89543 2 3 2.89543 3 4V20C3 21.1046 3.89543 22 5 22H9",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),uze=g("path",{d:"M12 2V7C12 8.10457 12.8954 9 14 9H19",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"},null,-1),dze=g("path",{d:"M18 19.5L21 21V17L18 18.5M18 19.5V18.5M18 19.5V21C18 21.5523 17.5523 22 17 22H13C12.4477 22 12 21.5523 12 21V17C12 16.4477 12.4477 16 13 16H17C17.5523 16 18 16.4477 18 17V18.5",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"},null,-1),hze=[cze,uze,dze];function fze(t,e,n,i,s,o){return v(),A("svg",lze,hze)}const pze=de(aze,[["render",fze]]),mze={name:"DocumentLists",components:{Document:h2,Download:jMe,PdfIcon:VBe,ImageIcon:_H,ZipIcon:YBe,AudioIcon:QBe,DocIcon:rze,VideoFileIcon:pze},props:["document_lists","additional_data","is_editable","allow_rename"],emits:["fileRemoved","documentsUpdated"],data(){return{editingIndex:null,editingTitle:"",isSaving:!1}},computed:{canEditTitle(){return this.is_editable||this.allow_rename}},methods:{removeDocument(t,e){if(!this.is_editable){this.$emit("fileRemoved",t);return}this.$confirm(this.$t("Are you sure you want to delete this document?"),this.$t("Warning"),{confirmButtonText:this.$t("OK"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.deleteDocument(t,e)})},deleteDocument(t,e){this.isSaving=!0,this.$post("documents/delete",{id:e.id}).then(n=>{this.$notify.success(n.message),this.document_lists.splice(t,1),this.$emit("documentsUpdated",this.document_lists)}).catch(n=>{this.$handleError(n)}).finally(()=>{this.isSaving=!1})},getIcon(t){return t=="application/pdf"?"pdf-icon":t.includes("image")?"image-icon":t=="application/zip"?"zip-icon":t.includes("audio")?"audio-icon":t.includes("video")?"video-file-icon":t.includes("openxmlformats")?"doc-icon":"document"},startEdit(t,e){this.editingIndex=t,this.editingTitle=this.getBaseName(e.title)},cancelEdit(){this.editingIndex=null,this.editingTitle=""},getFileExtension(t){if(!t)return"";const e=t.lastIndexOf(".");return e<=0||e===t.length-1?"":t.slice(e)},getBaseName(t){const e=this.getFileExtension(t);return e?t.slice(0,-e.length):t||""},saveDoc(t){const e=this.editingTitle.trim()+this.getFileExtension(t.title);this.isSaving=!0,this.$post("documents/update",{id:t.id,title:e,...this.additional_data}).then(n=>{t.title=e,this.$notify.success(n.message),this.isSaving=!1,this.editingIndex=null,this.$emit("documentsUpdated",this.document_lists)}).catch(n=>{this.$handleError(n)}).finally(()=>{this.isSaving=!1})}}},gze={class:"fcom_document_lists"},vze={class:"fcom_each_document"},_ze={class:"fcom_document_info"},yze={class:"fcom_document_icon"},bze={class:"fcom_document_ext"},wze={class:"fcom_rename_actions"},kze=["href"],Cze={class:"fcom_document_actions"},xze=["href","aria-label"];function Sze(t,e,n,i,s,o){const r=be,a=ft,l=We,c=W("EditPen"),u=W("Download"),d=W("DeleteFilled"),h=xt("loading");return v(),A("div",gze,[(v(!0),A(ee,null,Ce(n.document_lists,(f,p)=>(v(),A("div",vze,[g("div",_ze,[g("div",yze,[_(r,null,{default:w(()=>[(v(),D(Ct(o.getIcon(f.type))))]),_:2},1024)]),o.canEditTitle&&s.editingIndex==p?(v(),A(ee,{key:0},[_(a,{readonly:s.isSaving,size:"small","aria-label":t.$t("Document name"),style:{flex:"1",width:"100%"},modelValue:s.editingTitle,"onUpdate:modelValue":e[0]||(e[0]=m=>s.editingTitle=m)},cs({_:2},[o.getFileExtension(f.title)?{name:"suffix",fn:w(()=>[g("span",bze,S(o.getFileExtension(f.title)),1)]),key:"0"}:void 0]),1032,["readonly","aria-label","modelValue"]),g("div",wze,[_(l,{disabled:s.isSaving||!s.editingTitle.trim(),loading:s.isSaving,onClick:m=>o.saveDoc(f),type:"primary",size:"small"},{default:w(()=>[B(S(t.$t("Update")),1)]),_:2},1032,["disabled","loading","onClick"]),_(l,{disabled:s.isSaving,onClick:o.cancelEdit,size:"small"},{default:w(()=>[B(S(t.$t("Cancel")),1)]),_:1},8,["disabled","onClick"])])],64)):(v(),A("a",{key:1,href:f.url,target:"_blank",rel:"noopener",class:"fcom_document_title"},S(f.title),9,kze))]),De((v(),A("div",Cze,[o.canEditTitle&&s.editingIndex!=p?(v(),D(l,{key:0,"aria-label":t.$t("Edit"),onClick:m=>o.startEdit(p,f),plain:"",text:"",size:"small"},{default:w(()=>[_(r,null,{default:w(()=>[_(c)]),_:1})]),_:2},1032,["aria-label","onClick"])):O("",!0),!n.is_editable&&f.url?(v(),A("a",{key:1,href:f.url+"&force_download=1",target:"_blank","aria-label":t.$t("Download"),class:"el-button el-button--text"},[_(r,null,{default:w(()=>[_(u)]),_:1})],8,xze)):O("",!0),n.is_editable?(v(),D(l,{key:2,"aria-label":t.$t("Delete"),onClick:m=>o.removeDocument(p,f),plain:"",text:"",size:"small"},{default:w(()=>[_(r,null,{default:w(()=>[_(d)]),_:1})]),_:2},1032,["aria-label","onClick"])):O("",!0)])),[[h,s.isSaving]])]))),256))])}const G1=de(mze,[["render",Sze]]),$ze={name:"DocumentUploaderPop",components:{DocumentLists:G1,DocumentsUploader:kH,Document:h2},props:["feed","space_id","is_inline"],methods:{reset(){delete this.feed.document_ids,this.feed.content_type=""},fileAdded(t){this.feed.document_ids||(this.feed.document_ids=[]),this.feed.document_ids.push(t),this.feed.content_type="document"},removeDocument(t){this.feed.document_ids.splice(t,1),(!this.feed.document_ids||this.feed.document_ids.length===0)&&(this.feed.content_type="")}}},Aze={class:"fcom_inline_docs_form"},Eze={class:"fcom_doc_upload_modal"};function Mze(t,e,n,i,s,o){var c;const r=We,a=W("documents-uploader"),l=W("document-lists");return v(),A("div",Aze,[g("div",Eze,[_(r,{onClick:e[0]||(e[0]=u=>o.reset()),class:"fcom_file_cancel_btn",text:"",size:"small"},{default:w(()=>[B(S(t.$t("Cancel")),1)]),_:1}),_(a,{style:{"margin-bottom":"20px"},showLists:!1,additional_data:{space_id:n.space_id},is_multiple:!0,onFileAdded:o.fileAdded},null,8,["additional_data","onFileAdded"]),_(l,{class:"fcom_boxed_documents",additional_data:{space_id:n.space_id,feed_id:n.feed.id},is_editable:!0,document_lists:(c=n.feed)==null?void 0:c.document_ids,onFileRemoved:o.removeDocument},null,8,["additional_data","document_lists","onFileRemoved"])])])}const Tze=de($ze,[["render",Mze]]),Pze={name:"PaperClipIcon"},Ize={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},Lze=g("path",{d:"M18.1188 9.2622L11.431 16.6897C9.50497 18.8288 6.13081 18.9109 3.86828 16.8737C1.60575 14.8365 1.33471 11.4723 3.26079 9.33317L9.14601 2.79697C10.4836 1.31147 12.8106 1.25484 14.3818 2.66956C15.953 4.08428 16.1399 6.40445 14.8023 7.88995L9.45214 13.832C8.70311 14.6638 7.42326 14.695 6.54338 13.9027C5.66351 13.1105 5.5607 11.8344 6.30973 11.0025L10.8574 5.95182",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Oze=[Lze];function Dze(t,e,n,i,s,o){return v(),A("svg",Ize,Oze)}const Rze=de(Pze,[["render",Dze]]),Vze=window.fluentComAdmin.auth,Fze={name:"FeedTextComposer",components:{AudioEditModal:lBe,AudioList:bH,AudioUploadButton:yBe,PaperClipIcon:Rze,DocumentLists:G1,DocumentUploaderPop:Tze,Document:h2,MediaPreview:gp,Giphy:NFe,ImageUploader:vl,SurveyEditForm:XVe,MarkdownEditor:Zc,EmojiPicker:JV,VideoEmbeder:QNe,ImageIcon:_H,PollIcon:NVe},emits:["editorCreated"],props:{placeholder:{type:String,default(){return"What's happening, "+Vze.first_name}},config:{type:Object,default(){return{multipleMedia:!1,surveyApp:!1,videoApp:!1,disableUpload:!1,documentsApp:!1,space_id:null,spaceSlug:null,isAdmin:!1}}},disabled:{type:Boolean,default(){return!1}},autofocus:{type:Boolean,default(){return!0}},content:{type:Object,default(){return{message:"",media_images:[]}}},mentionQuery:{type:Object,default(){return{}}},autofocus_changed:{type:[Boolean,Number],default(){return!1}},defaultMentions:{type:Array,default(){return[]}},context:{type:String,default(){return""}},is_editing:{type:Boolean,default(){return!1}},is_modal:{type:Boolean,default(){return!1}}},computed:{hasActiveApp(){return this.content.content_type=="document"},hasInlineImageUpload(){return this.appVars.features.has_inline_image_upload==="yes"},maxAudios(){var t;return((t=this.appVars.features.fluent_player)==null?void 0:t.max_audios_per_post)||10},audioRemaining(){var t,e;return Math.max(0,this.maxAudios-(((e=(t=this.content)==null?void 0:t.audio_medias)==null?void 0:e.length)||0))}},data(){return{mentionResults:[],mentionSearch:"",uploading:!1,isEmojiPickerVisible:!1,showAudioEdit:!1,composerEditIndex:null,maxMediaPerPost:this.appVars.features.max_media_per_post}},methods:{cencelSurvey(){this.content.survey=null},insertEmoji(t){this.$refs.markdownEditor&&this.$refs.markdownEditor.updateContent(t)},clearContent(){var t;this.content.message="",(t=this.$refs.markdownEditor)==null||t.clearContent()},checkHasImageForCommentsEdit(t){return t.media&&t.media.media_url},removeImageFromComments(){this.content.media=null},checkForImage(t){for(let e=0;e<t.clipboardData.items.length;++e){let n=t.clipboardData.items[e];if(n.kind=="file"&&n.type.startsWith("image/")){const i=n.getAsFile(),s=t.clipboardData.getData("text")||"clipboard-image.png";this.uploadImage(new File([i],s,{type:i.type}))}}},uploadImage(t,e=!0){if(this.config.disableUpload)return this.$notify.error(this.$t("You are not allowed to upload media here.")),!1;if(!this.canAddImage())return!1;e&&(this.uploading=!0);const n=new FormData;return n.append("file",t),n.append("max_width",1400),n.append("context",this.context),n.append("resize",!0),this.$uploadFile("feeds/media-upload",n).then(i=>(e&&this.handleMediaUpload(i.media.url),i.media.url)).catch(i=>{this.$handleError(i)}).finally(()=>{this.uploading=!1})},handleMediaUpload(t,e="uploader"){var n,i;if(this.content.media_images||(this.content.media_images=[]),(i=(n=this.content)==null?void 0:n.meta)!=null&&i.media_preview&&(this.content.meta.media_preview=null),this.config.multipleMedia||(this.content.media_images=[]),!this.canAddImage())return!1;this.content.media=null,this.content.meta=null,this.content.audio_medias=[],this.content.media_images.push({url:t,provider:e,type:"image",height:0,width:0})},initSurveyForm(){this.content.survey||(this.content.survey={type:"single_choice",options:[{slug:"",label:this.$t("First choice")},{slug:"",label:""}]})},selectedGiphy(t){var n,i;this.content.meta||(this.content.meta=[]),(n=this.content)!=null&&n.media_images&&(this.content.media_images=[]),(i=this.content)!=null&&i.media&&(this.content.media=null),this.content.audio_medias=[];const e={image:t.images.downsized_medium.url,height:t.images.downsized_medium.height,width:t.images.downsized_medium.width,type:"image",provider:"giphy"};this.content.meta={media_preview:e}},handleVideoAttachment(t){var n,i,s;if(t&&(t.content_type==="audio"||((n=t.settings)==null?void 0:n.viewType)==="audio")){if(this.content.media_images=[],this.content.media=null,this.content.meta&&!Array.isArray(this.content.meta)&&this.content.meta.media_preview&&(this.content.meta.media_preview=null),Array.isArray(this.content.audio_medias)||(this.content.audio_medias=[]),this.content.audio_medias.length>=this.maxAudios){(s=(i=this.$notify)==null?void 0:i.warning)==null||s.call(i,this.$t("You can add a maximum of %s audios per post.",this.maxAudios));return}this.content.audio_medias.push({...t,player:"fluent_player"}),this.syncAudioMediasToMeta();return}this.content.media_images=[],this.content.meta=[],this.content.audio_medias=[],this.content.media=t},syncAudioMediasToMeta(){const t=Array.isArray(this.content.audio_medias)?this.content.audio_medias:[];(!this.content.meta||Array.isArray(this.content.meta))&&(this.content.meta={...this.content.meta||{}}),t.length?this.content.meta.audio_medias=t:delete this.content.meta.audio_medias},removeComposerAudio(t){Array.isArray(this.content.audio_medias)&&(this.content.audio_medias.splice(t,1),this.syncAudioMediasToMeta())},openComposerAudioEdit(t){this.composerEditIndex=t,this.showAudioEdit=!0},onComposerAudioSaved(t){if(this.composerEditIndex===null)return;const e=this.content.audio_medias[this.composerEditIndex]||{};this.content.audio_medias.splice(this.composerEditIndex,1,{...e,...t}),this.syncAudioMediasToMeta()},getInlineImageCount(){var e,n;const t=(n=(e=this.$refs.markdownEditor)==null?void 0:e.$refs)==null?void 0:n.crepe_editor_vue;return t?t.querySelectorAll('img[src^="http"]').length:0},canAddImage(){var n;return(((n=this.content.media_images)==null?void 0:n.length)||0)+this.getInlineImageCount()>=this.maxMediaPerPost?(this.$notify.error(this.$t("You can upload a maximum of %s images per post.",this.maxMediaPerPost)),!1):!0}},mounted(){var e,n,i;const t=(n=(e=this.content)==null?void 0:e.meta)==null?void 0:n.audio_medias;Array.isArray(t)&&t.length&&!((i=this.content.audio_medias)!=null&&i.length)&&(this.content.audio_medias=[...t]),this.autofocus&&this.$nextTick(()=>{this.$refs.create_status&&this.$refs.create_status.focus()})}},Nze={class:"fcom_text_composer"},Bze={class:"fcom_editor status_text_input"},zze={key:1,class:"fcom_audio_compose_list"},Hze={key:2,style:{position:"relative","text-align":"center"}},Uze={key:3,class:"fcom_media_items"},jze={key:0,class:"fcom_media_images"},Wze=["src","alt"],Yze={key:1,class:"fcrom_media_images"},qze={class:"fcrom_media_image"},Gze=["src","alt"],Xze={key:4,class:"fcrom_media_images"},Kze=["src","alt"],Zze={key:5,class:"fcrom_media_images"},Jze={class:"fcrom_media_image"},Qze=["src","alt"],eHe={class:"fcom_composer_footer"},tHe={class:"fcom_composer_apps"},nHe={key:0},sHe={class:"fcom_composer_actions"};function iHe(t,e,n,i,s,o){var T,I,L,R,V,H,F,z,N,q,K;const r=W("MarkdownEditor"),a=W("DocumentUploaderPop"),l=W("SurveyEditForm"),c=W("audio-list"),u=W("audio-edit-modal"),d=We,h=W("media-preview"),f=W("CloseBold"),p=be,m=W("ImageIcon"),y=W("image-uploader"),b=W("video-embeder"),k=W("audio-upload-button"),C=W("PaperClipIcon"),$=W("PollIcon"),x=W("EmojiPicker"),M=W("Giphy"),P=xt("loading");return v(),A(ee,null,[g("div",Nze,[g("div",Bze,[le(t.$slots,"before_input"),_(r,{ref:"markdownEditor",modelValue:n.content.message,"onUpdate:modelValue":e[0]||(e[0]=X=>n.content.message=X),context:n.context,is_modal:n.is_modal,autofocus:n.autofocus,placeholder:n.placeholder,mentionQuery:n.mentionQuery,defaultMentions:n.defaultMentions,autofocus_changed:n.autofocus_changed,onInlineUpload:o.hasInlineImageUpload?X=>o.uploadImage(X,!1):null,canAddImage:o.canAddImage,onHandleMediaUpload:o.uploadImage,onEditorCreated:e[1]||(e[1]=()=>{t.$emit("editorCreated")})},null,8,["modelValue","context","is_modal","autofocus","placeholder","mentionQuery","defaultMentions","autofocus_changed","onInlineUpload","canAddImage","onHandleMediaUpload"]),le(t.$slots,"after_input")]),n.content.content_type=="document"?(v(),A(ee,{key:0},[n.config.documentsApp&&n.config.space_id?(v(),D(a,{key:0,is_inline:!0,feed:n.content,space_id:n.config.space_id},null,8,["feed","space_id"])):O("",!0)],64)):(v(),A(ee,{key:1},[n.content.survey?(v(),D(l,{key:0,onCancel:o.cencelSurvey,form:n.content.survey,is_editing:n.is_editing},null,8,["onCancel","form","is_editing"])):O("",!0),(I=(T=n.content)==null?void 0:T.audio_medias)!=null&&I.length?(v(),A("div",zze,[_(c,{audios:n.content.audio_medias,editable:!0,onRemove:o.removeComposerAudio,onEdit:o.openComposerAudioEdit},null,8,["audios","onRemove","onEdit"]),s.composerEditIndex!==null?(v(),D(u,{key:0,media:n.content.audio_medias[s.composerEditIndex],visible:s.showAudioEdit,"onUpdate:visible":e[2]||(e[2]=X=>s.showAudioEdit=X),onSaved:o.onComposerAudioSaved},null,8,["media","visible","onSaved"])):O("",!0)])):(R=(L=n.content)==null?void 0:L.media)!=null&&R.type?(v(),A("div",Hze,[_(d,{onClick:e[3]||(e[3]=X=>{n.content.media=null}),text:"",type:"danger"},{default:w(()=>[B(S(t.$t("Remove Media")),1)]),_:1}),_(h,{media_item:n.content.media},null,8,["media_item"])])):(V=n.content)!=null&&V.meta?(v(),A("div",Uze,[(F=(H=n.content.meta)==null?void 0:H.media_items)!=null&&F.length?(v(!0),A(ee,{key:0},Ce(n.content.meta.media_items,(X,U)=>(v(),A("div",{key:U},[X.type=="image"?(v(),A("div",jze,[g("img",{class:"fcom_media_image",src:X.url,alt:t.$t("Media image")},null,8,Wze),_(d,{"aria-label":t.$t("Remove image"),class:"fcom_media_images_cross_button",link:"",onClick:Q=>n.content.meta.media_items.splice(U,1)},{default:w(()=>[_(p,null,{default:w(()=>[_(f)]),_:1})]),_:2},1032,["aria-label","onClick"])])):O("",!0)]))),128)):((N=(z=n.content.meta)==null?void 0:z.media_preview)==null?void 0:N.type)=="image"||(K=(q=n.content.meta)==null?void 0:q.media_preview)!=null&&K.image?(v(),A("div",Yze,[g("div",qze,[g("img",{src:n.content.meta.media_preview.image,alt:t.$t("Media Preview image")},null,8,Gze),_(d,{"aria-label":t.$t("Remove image"),link:"",onClick:e[4]||(e[4]=X=>n.content.meta.media_preview=null)},{default:w(()=>[_(p,null,{default:w(()=>[_(f)]),_:1})]),_:1},8,["aria-label"])])])):O("",!0)])):n.content.media_images&&n.content.media_images.length?(v(),A("div",Xze,[(v(!0),A(ee,null,Ce(n.content.media_images,(X,U)=>(v(),A("div",{class:"fcrom_media_image",key:U},[g("img",{src:X.url,alt:t.$t("Media image")},null,8,Kze),_(d,{"aria-label":t.$t("Remove image"),link:"",onClick:Q=>n.content.media_images.splice(U,1)},{default:w(()=>[_(p,null,{default:w(()=>[_(f)]),_:1})]),_:2},1032,["aria-label","onClick"])]))),128))])):o.checkHasImageForCommentsEdit(n.content)?(v(),A("div",Zze,[g("div",Jze,[g("img",{src:n.content.media.media_url,alt:t.$t("Media image")},null,8,Qze),_(d,{"aria-label":t.$t("Remove image"),link:"",onClick:e[5]||(e[5]=X=>o.removeImageFromComments())},{default:w(()=>[_(p,null,{default:w(()=>[_(f)]),_:1})]),_:1},8,["aria-label"])])])):O("",!0)],64))]),le(t.$slots,"before_composer_footer"),De((v(),A("div",eHe,[g("div",tHe,[o.hasActiveApp?O("",!0):(v(),A(ee,{key:0},[s.maxMediaPerPost?(v(),D(y,{key:0,additionalData:{resize:!0,context:n.context,max_width:1400},isMultiple:n.config.multipleMedia,onUploading:e[6]||(e[6]=()=>{s.uploading=!0}),onCompleted:e[7]||(e[7]=()=>{s.uploading=!1}),onUploaded:o.handleMediaUpload},{default:w(()=>[_(d,{"aria-label":"Upload Media",loading:s.uploading,text:""},{default:w(()=>[_(p,{class:"fcom_status_img_icon"},{default:w(()=>[_(m)]),_:1}),s.uploading?(v(),A("span",nHe,S(t.$t("Uploading...")),1)):O("",!0)]),_:1},8,["loading"])]),_:1},8,["additionalData","isMultiple","onUploaded"])):O("",!0),n.config.videoApp&&t.hasFeature("video_embeder")?(v(),D(b,{key:1,space:n.config.spaceSlug,is_admin:n.config.is_admin,onEmbeded:o.handleVideoAttachment},null,8,["space","is_admin","onEmbeded"])):O("",!0),n.config.videoApp&&t.hasFeature("video_embeder")?(v(),D(k,{key:2,space:n.config.spaceSlug,remaining:o.audioRemaining,onAudioAdded:o.handleVideoAttachment,onUploading:e[8]||(e[8]=()=>{s.uploading=!0}),onCompleted:e[9]||(e[9]=()=>{s.uploading=!1})},null,8,["space","remaining","onAudioAdded"])):O("",!0),n.config.documentsApp&&n.config.space_id?(v(),D(d,{key:3,"aria-label":t.$t("Add Documents"),title:t.$t("Upload Documents"),text:"",onClick:e[10]||(e[10]=X=>n.content.content_type="document")},{default:w(()=>[_(p,{class:G(["fcom_apps_icon"])},{default:w(()=>[_(C)]),_:1})]),_:1},8,["aria-label","title"])):O("",!0),n.config.surveyApp&&t.hasFeature("has_survey_poll")?(v(),D(d,{key:4,"aria-label":"Create Poll",onClick:o.initSurveyForm,text:""},{default:w(()=>[_(p,{class:"fcom_apps_icon"},{default:w(()=>[_($)]),_:1})]),_:1},8,["onClick"])):O("",!0),t.hasFeature("emoji_app")?(v(),D(x,{key:5,onEmojiSelected:o.insertEmoji},null,8,["onEmojiSelected"])):O("",!0),t.hasFeature("giphy_app")?(v(),D(M,{key:6,onSelectedGiphy:o.selectedGiphy},null,8,["onSelectedGiphy"])):O("",!0)],64))]),g("div",sHe,[le(t.$slots,"default")])])),[[P,s.uploading]]),le(t.$slots,"after_composer_footer")],64)}const X1=de(Fze,[["render",iHe]]),oHe={name:"FeedMdContent",props:["content","class_name"],data(){return{hoverTimeout:null,lightboxImages:[],lightboxIndex:0}},watch:{content(){this.$nextTick(()=>{this.cleanupListeners(),this.setupListeners()})}},methods:{setupListeners(){const t=this.$refs.content;if(!t)return;const e=/\/u\/([^\/]+)\/?$/;t.querySelectorAll("a").forEach(n=>{const i=n.getAttribute("href"),s=(i==null?void 0:i.startsWith(this.appVars.portal_url))&&i.match(e);if(!s)return;const o=s[1];n._mentionEnter=()=>{clearTimeout(this.hoverTimeout),this.hoverTimeout=setTimeout(()=>{this.$eventBus.emit("show_mention_popover",{username:o,triggerElement:n})},500)},n._mentionLeave=()=>{clearTimeout(this.hoverTimeout),this.$eventBus.emit("hide_mention_popover")},n.addEventListener("mouseenter",n._mentionEnter),n.addEventListener("mouseleave",n._mentionLeave)}),this._clickHandler=n=>{var r;const i=n.target.closest('img[src^="http"]');if(i){n.preventDefault();const a=Array.from(t.querySelectorAll('img[src^="http"]')).map(l=>l.src);this.lightboxImages=a,this.lightboxIndex=Math.max(0,a.indexOf(i.src));return}const s=n.target.closest(".fcom_copy_code_btn");if(!s)return;n.stopPropagation();const o=(r=s.parentElement)==null?void 0:r.querySelector("pre");o&&this.$toClipboard((o.querySelector("code")||o).innerText,"Code copied")},t.addEventListener("click",this._clickHandler),t.querySelectorAll("pre").forEach(n=>{var s;if((s=n.parentElement)!=null&&s.classList.contains("fcom_code_wrap"))return;const i=document.createElement("div");i.className="fcom_code_wrap",i.innerHTML='<button class="fcom_copy_code_btn" title="'+this.$t("Copy code")+'"></button>',n.replaceWith(i),i.prepend(n)})},cleanupListeners(){const t=this.$refs.content;t&&(t.querySelectorAll("a").forEach(e=>{e._mentionEnter&&(e.removeEventListener("mouseenter",e._mentionEnter),e.removeEventListener("mouseleave",e._mentionLeave))}),this.$eventBus.emit("hide_mention_popover"),clearTimeout(this.hoverTimeout),this._clickHandler&&(t.removeEventListener("click",this._clickHandler),this._clickHandler=null),t.querySelectorAll(".fcom_copy_code_btn").forEach(e=>e.remove()))}},mounted(){this.$nextTick(()=>this.setupListeners())},beforeUnmount(){this.cleanupListeners()}},rHe=["innerHTML"];function aHe(t,e,n,i,s,o){const r=fV;return v(),A(ee,null,[g("div",{ref:"content",class:G(["feed_md_content",n.class_name]),innerHTML:n.content},null,10,rHe),s.lightboxImages.length?(v(),D(r,{key:0,"url-list":s.lightboxImages,"initial-index":s.lightboxIndex,"hide-on-click-modal":!0,onClose:e[0]||(e[0]=a=>s.lightboxImages=[]),"show-progress":s.lightboxImages.length>1},null,8,["url-list","initial-index","show-progress"])):O("",!0)],64)}const K1=de(oHe,[["render",aHe]]),lHe={name:"CommentReacts",components:{UserRouteLink:Jr},data(){return{centerDialogVisible:!1,reactions:null,loading:!1}},props:{comment:{required:!0,default:null}},methods:{getReactions(){this.reactions&&this.reactions.length===this.comment.reactions_count||(this.loading=!0,this.$get("comments/"+this.comment.id+"/reactions").then(t=>{this.reactions=t.reactions,t.current_user_follows&&this.setFollowIds(t.current_user_follows)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1}))}}},cHe={style:{"margin-left":"5px"}},uHe={key:0},dHe={key:1},hHe={class:"fcom_user_lists"},fHe={key:2};function pHe(t,e,n,i,s,o){const r=Wt,a=W("UserAvatar"),l=W("UserRouteLink"),c=Ai,u=No;return v(),D(u,{persistent:!1,placement:"bottom",title:t.$t("Likes"),width:210,trigger:"click",teleported:!1,"popper-class":"fcom_menu_below_nav",onShow:o.getReactions},{reference:w(()=>[g("span",cHe,S(n.comment.reactions_count),1)]),default:w(()=>[s.loading?(v(),A("div",uHe,[_(r,{animated:!0,rows:1})])):s.reactions?(v(),A("div",dHe,[_(c,{"max-height":"300px"},{default:w(()=>[g("ul",hHe,[(v(!0),A(ee,null,Ce(s.reactions,d=>(v(),A("li",null,[d.xprofile?(v(),A(ee,{key:0},[_(a,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"]),_(l,{show_badge:!0,xprofile:d.xprofile,show_follow:!0},null,8,["xprofile"])],64)):O("",!0)]))),256))])]),_:1})])):(v(),A("div",fHe,[g("p",null,S(t.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const CH=de(lHe,[["render",pHe]]),mHe={name:"ImageCarousel",props:["feed","is_single"],computed:{srcList(){return this.feed.meta.media_items.map(t=>t.url)},visibleMedia(){return this.feed.meta.media_items.map((t,e)=>({url:t.url,type:t.type,index:e})).slice(0,4)},overflowCount(){return this.srcList.length>4?this.srcList.length-4:0},carouselClass(){const t=this.srcList.length;return t===1?"fcom_image_carousel_num_1":t===3?"fcom_image_carousel_num_3":t===2||t===4||t>4?"fcom_image_carousel_num_2_or_4":""}},methods:{getVideoType(t){switch(t.split(".").pop().toLowerCase()){case"mp4":return"video/mp4";case"webm":return"video/webm";case"ogg":case"ogv":return"video/ogg";default:return"video/mp4"}},isOverflowSlot(t){return t===3&&this.feed.meta.media_items.length>4}}},gHe={class:"fcom_image_carousel"},vHe={key:0},_He=["preload","poster"],yHe=["src","type"],bHe={key:1,class:"fcom_image_wrap"},wHe={key:0,class:"fcom_image_overlay"};function kHe(t,e,n,i,s,o){const r=Fo;return v(),A("div",gHe,[g("div",{class:G([o.carouselClass+" "+n.feed.type,"fcom_image_carousel__container"])},[(v(!0),A(ee,null,Ce(o.visibleMedia,(a,l)=>(v(),A("div",{class:G(["fcom_carousel__image","fcom_media_type_"+a.type])},[a.type==="video"?(v(),A("div",vHe,[g("video",{style:{width:"100%","aspect-ratio":"16/9"},controls:"",preload:n.is_single?"":"none",poster:a.thumbnail},[g("source",{src:a.url,type:o.getVideoType(a.url)},null,8,yHe)],8,_He)])):(v(),A("div",bHe,[_(r,{lazy:"",alt:"",src:a.url,"zoom-rate":1.2,"max-scale":7,"min-scale":.5,"hide-on-click-modal":!0,"preview-teleported":!0,"initial-index":a.index,"preview-src-list":o.srcList,"show-progress":"",fit:"cover"},null,8,["src","initial-index","preview-src-list"]),o.isOverflowSlot(l)?(v(),A("div",wHe,"+"+S(o.overflowCount),1)):O("",!0)]))],2))),256))],2)])}const nS=de(mHe,[["render",kHe]]),CHe={name:"ErrorIcon"},xHe={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"rgb(245 166 7)","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"h-3 w-3 ltr:mr-2 rtl:ml-2"},SHe=g("circle",{cx:"12",cy:"12",r:"10"},null,-1),$He=g("line",{x1:"12",x2:"12",y1:"16",y2:"12"},null,-1),AHe=g("line",{x1:"12",x2:"12.01",y1:"8",y2:"8"},null,-1),EHe=[SHe,$He,AHe];function MHe(t,e,n,i,s,o){return v(),A("svg",xHe,EHe)}const THe=de(CHe,[["render",MHe]]),PHe={name:"ReportReview",components:{ErrorIcon:THe},props:{feed:{type:Object,required:!0},type:{type:String,default:"post"}},emits:["updated"],methods:{openReportDetails(){this.$eventBus.emit("showReportReviewModal",{content:this.feed,type:this.type})},handleReportUpdate(t){var e,n;((e=t.content)==null?void 0:e.id)==((n=this.feed)==null?void 0:n.id)&&this.$emit("updated",t.content)}},mounted(){this.$eventBus.on("updateModerationReport",this.handleReportUpdate)},beforeUnmount(){this.$eventBus.off("updateModerationReport",this.handleReportUpdate)}},IHe={class:"fcom_feed_report_wrap"},LHe={class:"fcom_feed_report_content"},OHe={key:0},DHe={key:1},RHe={key:2},VHe={class:"fcom_feed_report_action"};function FHe(t,e,n,i,s,o){const r=W("ErrorIcon"),a=We;return v(),A("div",IHe,[g("div",LHe,[_(r),n.feed.meta.auto_flagged=="yes"?(v(),A("span",OHe,S(t.$t("This %s has been flagged automatically by the site rule.",n.type)),1)):n.feed.meta.reports_count>1?(v(),A("span",DHe,S(t.$t("This %1$s has been flagged with %2$s reports",n.type,n.feed.meta.reports_count)),1)):(v(),A("span",RHe,S(t.$t("This %1$s has been flagged with %2$s report",n.type,n.feed.meta.reports_count)),1))]),g("div",VHe,[_(a,{onClick:e[0]||(e[0]=l=>o.openReportDetails())},{default:w(()=>[B(S(t.$t("Review")),1)]),_:1})])])}const xH=de(PHe,[["render",FHe]]),NHe={name:"StickyIcon"},BHe={viewBox:"0 0 24 24","aria-hidden":"true",class:"r-4qtqp9 r-yyyyoo r-dnmrzs r-bnwqim r-lrvibr r-m6rgpd r-14j79pv r-10ptun7 r-1janqcz"},zHe=g("g",null,[g("path",{d:"M7 4.5C7 3.12 8.12 2 9.5 2h5C15.88 2 17 3.12 17 4.5v5.26L20.12 16H13v5l-1 2-1-2v-5H3.88L7 9.76V4.5z"})],-1),HHe=[zHe];function UHe(t,e,n,i,s,o){return v(),A("svg",BHe,HHe)}const SH=de(NHe,[["render",UHe]]),jHe=80,WHe=20,YHe=5e3,g2={methods:{scrollCommentIntoView(t,e=null){var a;const n=this.$el instanceof Element?this.$el:(a=this.$el)==null?void 0:a.parentElement,i=(n==null?void 0:n.closest(".feed"))||document,s=l=>l&&i.querySelector("#comment_"+l),o=s(t)||s(e);if(!o)return;const r=o.querySelector(".comment_text")||o;r.classList.add("fcom_highlight_glow"),setTimeout(()=>r.classList.remove("fcom_highlight_glow"),YHe),setTimeout(()=>{const l=o.getBoundingClientRect();l.top>=jHe&&l.bottom<=window.innerHeight-WHe||o.scrollIntoView({behavior:"smooth",block:"center"})},50)}}},qHe={name:"SingleComment",mixins:[g2],components:{ImageCarousel:nS,FeedTextComposer:X1,MediaPreview:gp,ReportReview:xH,StickyIcon:SH,FeedMdContent:K1,ActionPopover:Pa},props:{comment:{type:Object,required:!0},show_header:{type:Boolean,default:!0},show_report:{type:Boolean,default:!1},space_id:{type:String,default:null}},emits:["deleted","updated","reload","copyLink"],watch:{isEdit(t){t||(this.expanded=!1,this.canExpand=!1,this.$nextTick(()=>{this.checkOverflow(),this.canExpand&&(this.expanded=!0)}))}},mounted(){this.$nextTick(()=>this.checkOverflow())},data(){return{working:!1,isEdit:!1,editingComment:null,focusTrigger:0,expanded:!1,canExpand:!1}},computed:{contentClass(){return"comment_text_body"+(this.expanded?"":" clamped")},isReportEnabled(){return this.has_pro&&this.appVars.moderationConfig.is_enabled},showReport(){var t;return this.hasSpaceModeratorAccess()&&this.isReportEnabled&&this.show_report&&(this.comment.status=="pending"||((t=this.comment.meta)==null?void 0:t.reports_count))},showReportOption(){return!(this.comment.user_id==this.auth.user_id)&&this.auth.user_id&&this.isReportEnabled},showStickyOption(){return!this.comment.parent_id&&this.hasSpaceModeratorAccess()},getReportComment(){return{...this.comment,space_id:this.space_id}},commentActions(){const t=[{label:this.$t("Copy Link"),action:()=>this.copyCommentLink(this.comment)}];return this.showStickyOption&&t.push({label:this.comment.is_sticky?this.$t("Unpin from Top"):this.$t("Pin to Top"),action:()=>this.toggleSticky()}),this.showReportOption&&t.push({label:this.$t("Report Comment"),action:()=>this.reportComment(this.comment)}),this.canEditComment(this.comment)&&t.push({label:this.$t("Edit"),action:()=>this.editComment()}),this.canDeleteComment(this.comment)&&t.push({label:this.$t("Delete"),type:"danger",action:()=>this.deleteComment()}),t}},methods:{maybeSave(t){(t.metaKey||t.ctrlKey)&&t.keyCode===13&&this.updateComment()},deleteComment(){this.$confirm(this.$t("Are you sure you want to delete this comment and associated data?"),this.$t("Warning"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working=!0,this.$del("feeds/"+this.comment.post_id+"/comments/"+this.comment.id).then(t=>{this.$emit("deleted"),this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1})})},editComment(){this.working=!0,this.$get(`comments/${this.comment.id}`,{context:"edit"}).then(t=>{this.editingComment=t.comment,this.isEdit=!0}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1,this.$refs.comment_actions.hide()})},updateComment(){var e,n,i,s;const t=((e=this.editingComment.media_images)==null?void 0:e.length)>0||((i=(n=this.editingComment.meta)==null?void 0:n.media_preview)==null?void 0:i.image);if(!((s=this.editingComment.message)!=null&&s.replace(/&#x20;|\u00A0/gi,"").trim())&&!t){this.$notify.error(this.$t("Comment cannot be empty")),this.focusTrigger++;return}this.working=!0,this.isEdit=!0,this.$post(`feeds/${this.comment.post_id}/comments/${this.comment.id}`,{comment:this.editingComment.message,media_images:this.editingComment.media_images,meta:this.editingComment.meta}).then(o=>{this.$notify.success((o==null?void 0:o.message)||this.$t("Comment updated successfully")),Object.assign(this.comment,o.comment),this.comment.media_images=[],this.isEdit=!1,this.$nextTick(()=>{this.scrollCommentIntoView(this.comment.id)})}).catch(o=>{this.$handleError(o),this.focusTrigger++}).finally(()=>{this.isEdit=!1,this.working=!1})},toggleSticky(){this.hasSpaceModeratorAccess()&&(this.working=!0,this.comment.is_sticky=!this.comment.is_sticky,this.$patch("feeds/"+this.comment.post_id+"/comments/"+this.comment.id,{is_sticky:this.comment.is_sticky?1:0}).then(t=>{this.$notify.success(t.message),this.$emit("reload")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1}))},renderedComment(t){const n=/(?:https?:\/\/)?(?:www\.)?youtube\.com\/watch\?v=([a-zA-Z0-9_-]+)/.exec(t);if(n&&n[1]){let o=n[1];if(o){let r=`<div class="feed_media_ext_video"><iframe src="https://www.youtube.com/embed/${o}" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>`;t+=r}}let i=window.location.origin,s=new RegExp(i,"g");return t=t.replace(/<a(.*?)href="(.*?)"(.*?)>/g,(o,r,a,l)=>a.match(s)?`<a${r}href="${a}"${l}>`:`<a${r}href="${a}" target="_blank"${l}>`),t},copyCommentLink(t){this.$emit("copyLink",t),this.$refs.comment_actions.hide()},reportComment(t){this.$refs.comment_actions.hide(),this.$eventBus.emit("showReportContentModal",{reportConfig:t,type:"comment"})},checkOverflow(){var e,n;if(this.expanded)return;const t=(n=(e=this.$refs.commentBody)==null?void 0:e.$refs)==null?void 0:n.content;t&&(this.canExpand=t.scrollHeight>t.clientHeight+1)},toggleExpand(){this.expanded=!this.expanded},reportUpdated(t){var e;t.status=="unpublished"?this.$emit("deleted"):(this.comment.status=t.status,this.comment.meta&&(this.comment.meta.reports_count=((e=t.meta)==null?void 0:e.reports_count)||0),this.$emit("updated"))}}},GHe={key:1,class:"person_avatar"},XHe={class:"comment_wrap"},KHe={key:0,class:"comment_text"},ZHe={key:0,class:"comment_text_head"},JHe={class:"comment_text_head_name"},QHe=["title"],eUe={key:0,class:"comment_text_head_status"},tUe={class:"comment_actions"},nUe={key:2,class:"comment_text_media"},sUe={key:3,class:"comment_text_media"};function iUe(t,e,n,i,s,o){const r=W("ReportReview"),a=W("UserAvatar"),l=W("UserRouteLink"),c=Ci,u=W("StickyIcon"),d=be,h=We,f=W("MoreFilled"),p=W("ActionPopover"),m=W("FeedMdContent"),y=W("MediaPreview"),b=W("ImageCarousel"),k=W("feed-text-composer"),C=xt("loading");return v(),A(ee,null,[o.showReport?(v(),D(r,{key:0,feed:o.getReportComment,type:"comment",onUpdated:o.reportUpdated},null,8,["feed","onUpdated"])):O("",!0),n.show_header&&n.comment.xprofile?(v(),A("div",GHe,[_(a,{with_level:!1,xprofile:n.comment.xprofile,is_rounded:!0},null,8,["xprofile"])])):O("",!0),De((v(),A("div",XHe,[s.isEdit?(v(),A("div",{key:1,onKeydown:e[4]||(e[4]=ut((...$)=>o.maybeSave&&o.maybeSave(...$),["enter"])),class:"comment_text"},[_(k,{context:"comment",config:{multipleMedia:!0},placeholder:t.$t("Write a comment"),content:s.editingComment,autofocus:!0,autofocus_changed:s.focusTrigger},{default:w(()=>[g("div",null,[_(h,{onClick:e[2]||(e[2]=$=>s.isEdit=!1),class:"fcom_secondary_button"},{default:w(()=>[B(S(t.$t("Cancel")),1)]),_:1}),_(h,{class:"fcom_primary_button",onClick:e[3]||(e[3]=$=>o.updateComment(s.editingComment))},{default:w(()=>[B(S(t.$t("Update")),1)]),_:1})])]),_:1},8,["placeholder","content","autofocus_changed"])],32)):(v(),A("div",KHe,[n.show_header?(v(),A("div",ZHe,[g("div",JHe,[_(l,{show_badge:!0,xprofile:n.comment.xprofile,show_follow:!0},null,8,["xprofile"]),g("div",{title:n.comment.created_at,class:"comment_text_head_time"},S(t.humanDateDiff(n.comment.created_at)),9,QHe),n.comment.status=="pending"?(v(),A("div",eUe,[_(c,{type:"warning"},{default:w(()=>[B(S(t.$t("In Review")),1)]),_:1})])):O("",!0)]),g("div",tUe,[n.comment.is_sticky?(v(),D(h,{key:0,onClick:e[0]||(e[0]=$=>o.toggleSticky()),"aria-label":t.$t("Toggle Sticky"),class:"no_pad_btn",text:"",size:"small"},{default:w(()=>[_(d,{title:t.$t("Unpin from Top"),class:"fcom_sticky"},{default:w(()=>[_(u)]),_:1},8,["title"])]),_:1},8,["aria-label"])):O("",!0),_(p,{ref:"comment_actions",items:o.commentActions,placement:"bottom",width:200},{trigger:w(()=>[_(h,{"aria-label":t.$t("View comment actions"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[_(d,null,{default:w(()=>[_(f)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["items"])])])):O("",!0),_(m,{ref:"commentBody",class_name:o.contentClass,content:o.renderedComment(n.comment.message_rendered)},null,8,["class_name","content"]),s.canExpand?(v(),A("button",{key:1,type:"button",class:"fcom_see_more_btn",onClick:e[1]||(e[1]=(...$)=>o.toggleExpand&&o.toggleExpand(...$))},S(s.expanded?t.$t("See less"):t.$t("See more")),1)):O("",!0),n.comment.meta.media_preview?(v(),A("div",nUe,[_(y,{media_item:n.comment.meta.media_preview},null,8,["media_item"])])):n.comment.meta.media_items?(v(),A("div",sUe,[n.comment.meta.media_items?(v(),D(b,{key:0,feed:n.comment},null,8,["feed"])):O("",!0)])):O("",!0)])),le(t.$slots,"after_comment_text")])),[[C,s.working]])],64)}const v2=de(qHe,[["render",iUe]]),oUe={name:"IndividualCommentReply",mixins:[g2],components:{FeedTextComposer:X1,FeedMdContent:K1,HeartIcon:p2,SingleComment:v2,CommentReactions:CH},props:["comment","comments"],data(){return{commenting:!0,replyingComment:{},newComment:{message:"",media_images:[]},saving:!1}},watch:{comment:{handler(){this.updateReplyingComment()},immediate:!0}},methods:{toggleCommentBox(){this.commenting=!this.commenting},handleCommentDelete(t){this.replyingComment.comments&&this.replyingComment.comments.splice(t,1)},toggleLike(t){this.$emit("toggleLike",t)},postComment(){if(!this.newComment.message){this.$notify({title:this.$t("Error"),message:this.$t("Please write a reply first"),type:"error"});return}this.saving=!0,this.$post("feeds/"+this.comment.post_id+"/comments",{comment:this.newComment.message,parent_id:this.comment.id,media_images:this.newComment.media_images}).then(t=>{this.replyingComment.comments||(this.replyingComment.comments=[]),this.replyingComment.comments.push(t.comment),this.$eventBus.emit("recent_activities_refresh"),this.newComment={message:"",media_images:[]},this.$nextTick(()=>{this.scrollCommentIntoView(t.comment.id,this.comment.id)})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},updateReplyingComment(){this.comment.parent_id&&this.comments?(this.replyingComment=this.comments.find(t=>t.id===parseInt(this.comment.parent_id))||this.comment,this.replyingComment.comments=this.comments.filter(t=>parseInt(t.parent_id)===this.replyingComment.id)):this.replyingComment=this.comment}},mounted(){this.updateReplyingComment()}},rUe={class:"fcom_course_comment each_comment"},aUe={key:0,class:"person_avatar"},lUe=["src","alt"],cUe={class:"comment_wrap"},uUe={class:"comment_text"},dUe={class:"comment_text_head"},hUe={class:"comment_text_head_name"},fUe=["title"],pUe={class:"reply_box"},mUe={class:"fcom_comments_react"},gUe={class:"child_comments"},vUe=["id"],_Ue={class:"reply_box"},yUe=["onClick"],bUe={class:"fcom_comments_react fcom_reaction_list"},wUe={key:0,class:"child_reply_wrap"},kUe={class:"feed_commenting"},CUe={class:"person_avatar"},xUe=["src"],SUe={class:"feed_comment_input comment_text"};function $Ue(t,e,n,i,s,o){const r=W("UserRouteLink"),a=W("FeedMdContent"),l=W("HeartIcon"),c=be,u=W("CommentReactions"),d=W("single-comment"),h=We,f=W("FeedTextComposer"),p=xt("loading");return v(),A("div",rUe,[s.replyingComment.xprofile?(v(),A("div",aUe,[g("img",{src:s.replyingComment.xprofile.avatar,alt:t.$t("avatar")},null,8,lUe)])):O("",!0),g("div",cUe,[g("div",uUe,[g("div",dUe,[g("div",hUe,[_(r,{xprofile:s.replyingComment.xprofile,show_follow:!0},null,8,["xprofile"]),g("div",{title:s.replyingComment.created_at,class:"comment_text_head_time"},S(t.humanDateDiff(s.replyingComment.created_at)),9,fUe)])]),_(a,{content:s.replyingComment.message_rendered,class_name:"comment_text_body"},null,8,["content"])]),g("div",pUe,[g("span",{onClick:e[0]||(e[0]=(...m)=>o.toggleCommentBox&&o.toggleCommentBox(...m)),class:"reply_btn"},S(t.$t("Post Comment")),1),g("span",{class:G([{fcom_is_liked:s.replyingComment.liked},"reply_btn"])},[g("div",mUe,[_(c,{role:"button",tabindex:"0","aria-label":t.$t("React"),"aria-pressed":!!s.replyingComment.liked,class:G({user_reacted:s.replyingComment.liked}),onClick:e[1]||(e[1]=m=>o.toggleLike(s.replyingComment)),onKeydown:[e[2]||(e[2]=ut(Ae(m=>o.toggleLike(s.replyingComment),["prevent"]),["enter"])),e[3]||(e[3]=ut(Ae(m=>o.toggleLike(s.replyingComment),["prevent"]),["space"]))]},{default:w(()=>[_(l,{filled:s.replyingComment.liked},null,8,["filled"])]),_:1},8,["aria-label","aria-pressed","class"]),parseInt(s.replyingComment.reactions_count)?(v(),D(u,{key:0,comment:n.comment},null,8,["comment"])):O("",!0)])],2)]),g("div",gUe,[(v(!0),A(ee,null,Ce(s.replyingComment.comments,(m,y)=>(v(),A("div",{id:"comment_"+m.id,class:"each_comment"},[_(d,{onDeleted:b=>o.handleCommentDelete(y),comment:m,show_report:!0},{after_comment_text:w(()=>[g("div",_Ue,[g("span",{onClick:b=>o.toggleCommentBox(m),class:"reply_btn"},S(t.$t("Reply")),9,yUe),g("span",{class:G([{fcom_is_liked:m.liked},"reply_btn"])},[g("div",bUe,[_(c,{role:"button",tabindex:"0","aria-label":t.$t("React"),"aria-pressed":!!m.liked,class:G({user_reacted:m.liked}),onClick:b=>o.toggleLike(m),onKeydown:[ut(Ae(b=>o.toggleLike(m),["prevent"]),["enter"]),ut(Ae(b=>o.toggleLike(m),["prevent"]),["space"])]},{default:w(()=>[_(l,{filled:m.liked},null,8,["filled"])]),_:2},1032,["aria-label","aria-pressed","class","onClick","onKeydown"]),parseInt(m.reactions_count)?(v(),D(u,{key:0,comment:m},null,8,["comment"])):O("",!0)])],2)])]),_:2},1032,["onDeleted","comment"])],8,vUe))),256))]),s.commenting?(v(),A("div",wUe,[g("div",kUe,[g("div",CUe,[g("img",{alt:"",src:t.auth.avatar},null,8,xUe)]),g("div",SUe,[_(f,{context:"comment",mentionQuery:{space_id:s.replyingComment.space_id},autofocus_changed:s.commenting,autofocus:s.commenting,disabled:s.saving,placeholder:t.$t("Write a reply"),content:s.newComment},{default:w(()=>[De((v(),D(h,{disabled:s.saving,class:"fcom_primary_button",onClick:e[4]||(e[4]=m=>o.postComment())},{default:w(()=>[B(S(t.$t("Post Comment")),1)]),_:1},8,["disabled"])),[[p,s.saving]])]),_:1},8,["mentionQuery","autofocus_changed","autofocus","disabled","placeholder","content"])])])])):O("",!0)])])}const AUe=de(oUe,[["render",$Ue]]),EUe={name:"CourseComments",props:["course"],components:{IndividualCommentReply:AUe,Pagination:Jc,ChatIcon:vH,HeartIcon:p2,FeedMdContent:K1,ActionPopover:Pa},data(){return{comments:[],loading:!0,pagination:{page:1,per_page:10,total:0},working:!1,replyingComemnt:null,isReplying:!1}},methods:{fetchComments(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/comments",{page:this.pagination.page,per_page:this.pagination.per_page}).then(t=>{this.comments=t.comments.data,this.pagination.total=t.comments.total,window.scrollTo(0,0)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},toggleLike(t){const e=!t.liked;this.$post("feeds/"+t.post_id+"/comments/"+t.id+"/reactions",{state:e?1:0}).then(n=>{t.liked=n.liked,t.reactions_count=n.reactions_count}).catch(n=>{this.$handleError(n)})},deleteComment(t,e){this.$confirm(this.$t("Are you sure you want to delete this comment and associated data?"),this.$t("Warning"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working=!0,this.$del("feeds/"+t.post_id+"/comments/"+t.id).then(n=>{this.comments.splice(e,1),this.$notify.success(n.message)}).catch(n=>{this.$handleError(n)}).finally(()=>{this.working=!1})})},initCommentReply(t){this.replyingComemnt=t,this.$nextTick(()=>{this.isReplying=!0})}},mounted(){this.fetchComments()}},MUe={key:0,class:"white_loaded"},TUe={key:0,class:"fcom_course_comments_header"},PUe={class:"course_comments feed_comments overview_comments"},IUe={key:0,class:"person_avatar"},LUe={class:"comment_wrap"},OUe={class:"comment_text"},DUe={class:"comment_text_head"},RUe={class:"comment_text_head_name"},VUe=["title"],FUe={class:"comment_actions"},NUe={class:"comment_text_details"},BUe=["href"],zUe={class:"comment_text_actions"},HUe={key:0},UUe={key:1};function jUe(t,e,n,i,s,o){const r=Wt,a=W("UserAvatar"),l=W("UserRouteLink"),c=W("MoreFilled"),u=be,d=We,h=W("ActionPopover"),f=W("FeedMdContent"),p=W("ChatIcon"),m=W("HeartIcon"),y=W("pagination"),b=W("IndividualCommentReply"),k=Ea,C=xt("loading");return s.loading?(v(),A("div",MUe,[_(r,{row:5})])):(v(),A(ee,{key:1},[s.pagination.total?(v(),A("div",TUe,[g("h5",null,S(t.$t("Comments (%s)",s.pagination.total)),1)])):O("",!0),g("div",PUe,[(v(!0),A(ee,null,Ce(s.comments,($,x)=>(v(),A("div",{key:$.id,class:"fcom_course_comment each_comment"},[$.xprofile?(v(),A("div",IUe,[_(a,{with_level:!1,xprofile:$.xprofile},null,8,["xprofile"])])):O("",!0),g("div",LUe,[g("div",OUe,[g("div",DUe,[g("div",RUe,[_(l,{xprofile:$.xprofile},null,8,["xprofile"]),g("div",{title:$.created_at,class:"comment_text_head_time"},S(t.humanDateDiff($.created_at)),9,VUe)]),De((v(),A("div",FUe,[t.canDeleteComment($)?(v(),D(h,{key:0,placement:"bottom",width:200,items:[{label:t.$t("Delete"),type:"danger",action:()=>o.deleteComment($,x)}]},{trigger:w(()=>[_(d,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu",text:""},{default:w(()=>[_(u,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["aria-label"])]),_:2},1032,["items"])):O("",!0)])),[[C,s.working]])]),g("div",NUe,[g("a",{href:t.$getRouteLink("course/:course_slug/lessons/:lesson_slug/view?comment_id=:comment_id&show_comments=true",{course_slug:n.course.slug,lesson_slug:$.post.slug,comment_id:$.id})},[B(S(t.$t("Commented in"))+" ",1),g("b",null,S(t.getExcerpt($.post.title,60)),1)],8,BUe)]),_(f,{content:$.message_rendered,class_name:"comment_text_body"},null,8,["content"]),g("div",zUe,[_(d,{onClick:M=>o.initCommentReply($),text:""},{default:w(()=>[_(u,null,{default:w(()=>[_(p)]),_:1}),g("span",null,S(t.$t("Reply")),1)]),_:2},1032,["onClick"]),_(d,{"aria-label":t.$t("React"),text:""},{default:w(()=>[_(u,{class:G({user_reacted:$.liked}),onClick:M=>o.toggleLike($)},{default:w(()=>[_(m,{filled:$.liked},null,8,["filled"])]),_:2},1032,["class","onClick"]),g("span",null,S($.reactions_count||""),1)]),_:2},1032,["aria-label"])])])])]))),128)),s.pagination.total?O("",!0):(v(),A("div",HUe,[g("h5",null,S(t.$t("No comments from any lessons yet! Comments from all lessons will be shown here.")),1)]))]),_(y,{pagination:s.pagination,onFetch:o.fetchComments},null,8,["pagination","onFetch"]),_(k,{"append-to-body":!0,modelValue:s.isReplying,"onUpdate:modelValue":e[0]||(e[0]=$=>s.isReplying=$),size:t.dialogWidth},{header:w(()=>{var $;return[g("p",null,[B(S(t.$t("Replying to"))+" ",1),g("b",null,S(($=s.replyingComemnt)==null?void 0:$.post.title),1)])]}),default:w(()=>[s.replyingComemnt?(v(),D(b,{key:0,comment:s.replyingComemnt,comments:s.comments,onToggleLike:o.toggleLike},null,8,["comment","comments","onToggleLike"])):(v(),A("h3",UUe,S(t.$t("Replying to Let's check this out! Let's do it Replying to Let's check this out! Let's do it")),1))]),_:1},8,["modelValue","size"])],64))}const WUe=de(EUe,[["render",jUe]]),YUe={name:"CourseOverview",props:["course","course_id"],components:{CourseComments:WUe}},qUe={class:"fcom_cards fcom_cards_2"},GUe={class:"fcom_card"},XUe={class:"fcom_card_body"},KUe={class:"fcom_card"},ZUe={class:"fcom_card_body"};function JUe(t,e,n,i,s,o){const r=W("course-comments");return v(),A(ee,null,[g("div",qUe,[g("div",GUe,[g("div",XUe,[g("p",null,S(t.$t("Students")),1),g("h3",null,S(n.course.students_count),1)])]),g("div",KUe,[g("div",ZUe,[g("p",null,S(t.$t("Average Completion Rate")),1),g("h3",null,S(n.course.overAllProgress)+"%",1)])])]),_(r,{course:n.course},null,8,["course"])],64)}const QUe=de(YUe,[["render",JUe]]),eje={name:"ContentLayout",props:["title","content_class","wrapper_class"]},tje={key:0,class:"fhr_content_layout_header"},nje={role:"region","aria-label":"Actions",class:"fhr_page_actions"};function sje(t,e,n,i,s,o){return v(),A("div",{class:G([n.wrapper_class,"fhr_content_layout"])},[le(t.$slots,"header",{},()=>[n.title?(v(),A("div",tje,[le(t.$slots,"title",{},()=>[g("h1",{role:"region","aria-label":"Page Title",style:{cursor:"pointer"},onClick:e[0]||(e[0]=r=>t.$eventBus.emit("toTop")),class:"fhr_page_title"},S(n.title),1)]),g("div",nje,[le(t.$slots,"actions")])])):O("",!0)]),le(t.$slots,"sub_header"),g("div",{class:G([n.content_class,"fhr_content_layout_body"])},[le(t.$slots,"default")],2)],2)}const fi=de(eje,[["render",sje]]),ije={name:"AppLayout",props:["wrapper_class"]},oje={class:"feeds_main"};function rje(t,e,n,i,s,o){const r=W("router-view");return v(),A("div",{class:G([n.wrapper_class,"feeds"])},[g("div",oje,[le(t.$slots,"before_route_view"),le(t.$slots,"default",{},()=>[_(r)]),le(t.$slots,"after_route_view")])],2)}const pi=de(ije,[["render",rje]]),aje={name:"BgImageUpload",emits:["update:modelValue"],props:{modelValue:{type:String,required:!1},button_text:{type:String,default(){return""}},can_remove:{type:Boolean,default:!1},is_multiple:{type:Boolean,default:!1},additional_data:{type:Object,default:()=>({})}},data(){return{imageUrl:this.modelValue}},computed:{action_url(){return this.appVars.rest.url+"/feeds/media-upload"},headers(){return{"X-WP-Nonce":this.appVars.rest.nonce}}},methods:{handleSuccess(t){this.imageUrl=t.media.url,this.$emit("update:modelValue",this.imageUrl)},handleError(t){this.$handleError(JSON.parse(t.message))},removeImage(){this.imageUrl="",this.$emit("update:modelValue","")}}};function lje(t,e,n,i,s,o){const r=Fo,a=We,l=A1,c=W("CloseBold"),u=be;return v(),A(ee,null,[_(l,{action:o.action_url,headers:o.headers,accept:"image/*",class:"fcom_bg_upload",multiple:n.is_multiple,data:n.additional_data,"show-file-list":!1,"on-success":o.handleSuccess,"on-error":o.handleError},{default:w(()=>[le(t.$slots,"trigger",{},()=>[le(t.$slots,"default",{},()=>[s.imageUrl?(v(),D(r,{key:0,alt:t.$t("Image Preview"),src:s.imageUrl},null,8,["alt","src"])):(v(),D(a,{key:1,class:"fcom_btn_upload",text:""},{default:w(()=>[B(S(n.button_text||t.$t("Upload Image")),1)]),_:1}))])])]),_:3},8,["action","headers","multiple","data","on-success","on-error"]),s.imageUrl&&n.can_remove?(v(),D(a,{key:0,"aria-label":t.$t("Remove image"),class:"fcom_bg_remove",text:"",size:"small",onClick:o.removeImage},{default:w(()=>[_(u,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["aria-label","onClick"])):O("",!0)],64)}const Z1=de(aje,[["render",lje]]),cje={name:"ImagePlaceholder"},uje={width:"240",height:"240",viewBox:"0 0 240 240",fill:"none",xmlns:"http://www.w3.org/2000/svg"},dje=g("rect",{width:"240",height:"240",fill:"#F5F6F7"},null,-1),hje=g("path",{d:"M133.125 121.65L129.33 116.7C129 116.26 128.56 116.04 128.01 116.04C127.46 116.04 127.02 116.26 126.69 116.7L121.163 123.96C120.723 124.51 120.654 125.088 120.956 125.693C121.259 126.298 121.768 126.6 122.483 126.6H148.718C149.433 126.6 149.941 126.298 150.244 125.693C150.546 125.088 150.478 124.51 150.038 123.96L142.035 113.483C141.705 113.043 141.265 112.823 140.715 112.823C140.165 112.823 139.725 113.043 139.395 113.483L133.125 121.65ZM115.8 139.8C113.985 139.8 112.431 139.154 111.139 137.861C109.846 136.569 109.2 135.015 109.2 133.2V93.6C109.2 91.785 109.846 90.2313 111.139 88.9388C112.431 87.6462 113.985 87 115.8 87H155.4C157.215 87 158.769 87.6462 160.061 88.9388C161.354 90.2313 162 91.785 162 93.6V133.2C162 135.015 161.354 136.569 160.061 137.861C158.769 139.154 157.215 139.8 155.4 139.8H115.8ZM115.8 133.2H155.4V93.6H115.8V133.2ZM102.6 153C100.785 153 99.2313 152.354 97.9388 151.061C96.6462 149.769 96 148.215 96 146.4V103.5C96 102.565 96.3163 101.781 96.9488 101.149C97.5813 100.516 98.365 100.2 99.3 100.2C100.235 100.2 101.019 100.516 101.651 101.149C102.284 101.781 102.6 102.565 102.6 103.5V146.4H145.5C146.435 146.4 147.219 146.716 147.851 147.349C148.484 147.981 148.8 148.765 148.8 149.7C148.8 150.635 148.484 151.419 147.851 152.051C147.219 152.684 146.435 153 145.5 153H102.6Z",fill:"#98A2B3"},null,-1),fje=[dje,hje];function pje(t,e,n,i,s,o){return v(),A("svg",uje,fje)}const sS=de(cje,[["render",pje]]),mje={name:"LockscreenPaywallMeta",components:{ImagePlaceholder:sS},props:{field:{type:Object,required:!0},space_id:{type:[String,Number],required:!0}},data(){return{loading:!1,editTab:"paywall",availablePaywalls:[]}},methods:{initAddPaywall(){this.field.paywalls=this.field.paywalls||[],this.field.paywalls.push("")},removePaywall(t){const e=this.field.paywalls||[];e.splice(e.indexOf(t),1),this.field.paywalls=e},isPaywallAdded(t){var e;return(e=this.field.paywalls)==null?void 0:e.includes(t.toString())},getAvailablePaywalls(){this.loading=!0,this.$get("cart/spaces/"+this.space_id+"/paywalls",{space_id:this.space_id}).then(t=>{this.availablePaywalls=t.paywalls}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.getAvailablePaywalls()}},gje={key:0,class:"fcom_paywalls"},vje={class:"fcom_paywall"},_je={class:"fcom_select_photo",style:{float:"left"}},yje=["src"],bje={key:0,class:"fcom_description"},wje={class:"fcom_paywall_actions"},kje={class:"fcom_color_input_wrap"},Cje={class:"fcom_color_input_wrap"},xje={class:"fcom_color_input_wrap"},Sje={class:"fcom_color_input_wrap"};function $je(t,e,n,i,s,o){const r=W("image-placeholder"),a=on,l=Mb,c=Jt,u=W("Delete"),d=be,h=We,f=Wt,p=Rb,m=ft,y=en,b=Gt,k=sn,C=Hc,$=Db;return v(),D($,{modelValue:s.editTab,"onUpdate:modelValue":e[12]||(e[12]=x=>s.editTab=x)},{default:w(()=>[_(p,{label:t.$t("Paywalls"),name:"paywall"},{default:w(()=>[s.loading?(v(),D(f,{key:1,rows:2,animated:""})):(v(),A("div",gje,[(v(!0),A(ee,null,Ce(n.field.paywalls,(x,M)=>(v(),A("div",vje,[_(c,{"fit-input-width":"",modelValue:n.field.paywalls[M],"onUpdate:modelValue":P=>n.field.paywalls[M]=P,placeholder:t.$t("Select Paywall")},{default:w(()=>[(v(!0),A(ee,null,Ce(s.availablePaywalls,P=>(v(),D(l,{key:P.ID,label:P.post_title},{default:w(()=>[(v(!0),A(ee,null,Ce(P.variants,T=>(v(),D(a,{key:T.id,value:T.id.toString(),label:T.variation_title,disabled:o.isPaywallAdded(T.id),class:"fcom_with_photo_option"},{default:w(()=>[g("span",_je,[T.photo?(v(),A("img",{key:0,src:T.photo},null,8,yje)):(v(),D(r,{key:1})),g("span",null,S(T.variation_title),1)])]),_:2},1032,["value","label","disabled"]))),128))]),_:2},1032,["label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"]),_(d,{onClick:P=>o.removePaywall(x)},{default:w(()=>[_(u)]),_:2},1032,["onClick"])]))),256)),!n.field.paywalls||Object.keys(n.field.paywalls).length<1?(v(),A("div",bje,[g("p",null,S(t.$t("Please add paywall pricing options")),1)])):O("",!0),g("div",wje,[_(h,{style:{width:"100%"},class:"fcom_plain_button",onClick:o.initAddPaywall},{default:w(()=>[g("span",null,S("+ "+t.$t("Add Paywall")),1)]),_:1},8,["onClick"])])]))]),_:1},8,["label"]),_(p,{label:t.$t("Content"),name:"content"},{default:w(()=>[_(k,{onSubmit:e[2]||(e[2]=Ae(x=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(y,{label:t.$t("Button Label")},{default:w(()=>[_(m,{modelValue:n.field.button_text,"onUpdate:modelValue":e[0]||(e[0]=x=>n.field.button_text=x),placeholder:t.$t("Button Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(y,null,{default:w(()=>[_(b,{modelValue:n.field.show_description,"onUpdate:modelValue":e[1]||(e[1]=x=>n.field.show_description=x),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Show Paywall Description")),1)]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["label"]),_(p,{label:t.$t("Design"),name:"design"},{default:w(()=>[_(k,{onSubmit:e[11]||(e[11]=Ae(x=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(y,{label:t.$t("Background Color")},{default:w(()=>[g("div",kje,[_(C,{predefine:t.appVars.suggestedColors,modelValue:n.field.background_color,"onUpdate:modelValue":e[3]||(e[3]=x=>n.field.background_color=x)},null,8,["predefine","modelValue"]),_(m,{modelValue:n.field.background_color,"onUpdate:modelValue":e[4]||(e[4]=x=>n.field.background_color=x)},null,8,["modelValue"])])]),_:1},8,["label"]),_(y,{label:t.$t("Text Color")},{default:w(()=>[g("div",Cje,[_(C,{predefine:t.appVars.suggestedColors,modelValue:n.field.text_color,"onUpdate:modelValue":e[5]||(e[5]=x=>n.field.text_color=x)},null,8,["predefine","modelValue"]),_(m,{modelValue:n.field.text_color,"onUpdate:modelValue":e[6]||(e[6]=x=>n.field.text_color=x)},null,8,["modelValue"])])]),_:1},8,["label"]),_(y,{label:t.$t("Button Label")},{default:w(()=>[g("div",xje,[_(C,{predefine:t.appVars.suggestedColors,modelValue:n.field.button_text_color,"onUpdate:modelValue":e[7]||(e[7]=x=>n.field.button_text_color=x)},null,8,["predefine","modelValue"]),_(m,{modelValue:n.field.button_text_color,"onUpdate:modelValue":e[8]||(e[8]=x=>n.field.button_text_color=x)},null,8,["modelValue"])])]),_:1},8,["label"]),_(y,{label:t.$t("Button Background")},{default:w(()=>[g("div",Sje,[_(C,{predefine:t.appVars.suggestedColors,modelValue:n.field.button_color,"onUpdate:modelValue":e[9]||(e[9]=x=>n.field.button_color=x),"show-alpha":""},null,8,["predefine","modelValue"]),_(m,{modelValue:n.field.button_color,"onUpdate:modelValue":e[10]||(e[10]=x=>n.field.button_color=x)},null,8,["modelValue"])])]),_:1},8,["label"])]),_:1})]),_:1},8,["label"])]),_:1},8,["modelValue"])}const Aje=de(mje,[["render",$je]]),Eje={name:"LockscreenMeta",components:{BgImageUpload:Z1,LockscreenPaywallMeta:Aje},props:["lockscreen","space_id"],emits:["editField","updatePaywalls"],data(){return{loading:!1,editing:!1,editTab:"content",editingField:null,availablePaywalls:[]}},computed:{lockscreenFields(){return this.lockscreen},getFieldIcon(){return t=>{const e={image:"Picture",block:"Tickets",lesson:"Memo",paywall:"Money",welcome_banner:"VideoPlay"};return t.name=="action"?"Iphone":e[t.type]}}},methods:{toggleHidden(t){t.hidden=!t.hidden,t.type=="paywall"&&!t.hidden&&this.updateField(t)},updateField(t){this.editing=!0,this.editingField=t;const e=t.type=="block"?t:null;this.$emit("editField",e)},backToFields(){this.editing=!1,this.editingField=null,this.$emit("editField",null)},moveUp(t){if(t==0)return;const e=this.lockscreen[t],n=this.lockscreen[t-1];this.lockscreen.splice(t-1,2,e,n)},moveDown(t){if(t==this.lockscreen.length-1)return;const e=this.lockscreen[t],n=this.lockscreen[t+1];this.lockscreen.splice(t,2,n,e)}}},Mje={key:0,class:"fcom_lockscreen_meta"},Tje={class:"fcom_meta_section lockscreen_meta"},Pje={class:"fcom_description"},Ije={class:"fcom_meta_section lockscreen_meta"},Lje={class:"fcom_meta_label"},Oje={class:"fcom_meta_content"},Dje={class:"fcom_meta_block"},Rje={class:"fcom_block_label"},Vje={class:"fcom_meta_sorting"},Fje={class:"fcom_block_action"},Nje={key:1,class:"fcom_lockscreen_meta"},Bje={class:"fcom_edit_title"},zje={class:"fcom_edit_content"},Hje={class:"fcom_color_input_wrap"},Uje={class:"fcom_color_input_wrap"},jje={class:"fcom_color_input_wrap"},Wje={class:"fcom_color_input_wrap"},Yje={class:"fcom_color_input_wrap"},qje={key:1,class:"fcom_description"},Gje={key:2,class:"fcom_description"},Xje={key:3,class:"fcom_description"};function Kje(t,e,n,i,s,o){const r=be,a=W("Top"),l=W("Bottom"),c=W("EditPen"),u=W("Hide"),d=W("View"),h=W("Back"),f=ft,p=en,m=Gt,y=sn,b=Rb,k=W("BgImageUpload"),C=Hc,$=Db,x=W("lockscreen-paywall-meta");return s.editing?(v(),A("div",Nje,[g("div",Bje,[_(r,{onClick:o.backToFields},{default:w(()=>[_(h)]),_:1},8,["onClick"]),g("p",null,S(t.$labelize(s.editingField.label)),1)]),g("div",zje,[s.editingField.type=="image"?(v(),D($,{key:0,modelValue:s.editTab,"onUpdate:modelValue":e[18]||(e[18]=M=>s.editTab=M)},{default:w(()=>[_(b,{label:t.$t("Content"),name:"content"},{default:w(()=>[_(y,{onSubmit:e[5]||(e[5]=Ae(M=>t.doNothing(),["prevent"])),model:s.editingField,"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(p,{label:t.$t("Heading")},{default:w(()=>[_(f,{modelValue:s.editingField.heading,"onUpdate:modelValue":e[0]||(e[0]=M=>s.editingField.heading=M),placeholder:t.$t("Heading")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,{label:t.$t("Description")},{default:w(()=>[_(f,{modelValue:s.editingField.description,"onUpdate:modelValue":e[1]||(e[1]=M=>s.editingField.description=M),type:"textarea",placeholder:t.$t("Description")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,{label:t.$t("Button Label")},{default:w(()=>[_(f,{modelValue:s.editingField.button_text,"onUpdate:modelValue":e[2]||(e[2]=M=>s.editingField.button_text=M),placeholder:t.$t("Button Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,{label:t.$t("Button Link")},{default:w(()=>[_(f,{modelValue:s.editingField.button_link,"onUpdate:modelValue":e[3]||(e[3]=M=>s.editingField.button_link=M)},null,8,["modelValue"])]),_:1},8,["label"]),s.editingField.type=="image"?(v(),D(p,{key:0},{default:w(()=>[_(m,{modelValue:s.editingField.new_tab,"onUpdate:modelValue":e[4]||(e[4]=M=>s.editingField.new_tab=M),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Open in New Tab")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0)]),_:1},8,["model"])]),_:1},8,["label"]),_(b,{label:t.$t("Design"),name:"design"},{default:w(()=>[_(y,{onSubmit:e[17]||(e[17]=Ae(M=>t.doNothing(),["prevent"])),model:s.editingField,"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(p,{label:t.$t("Background Image"),class:"fcom_bg_image"},{default:w(()=>[_(k,{modelValue:s.editingField.background_image,"onUpdate:modelValue":e[6]||(e[6]=M=>s.editingField.background_image=M),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"]),_(p,{label:t.$t("Overlay Color")},{default:w(()=>[g("div",Hje,[_(C,{predefine:t.appVars.suggestedColors,modelValue:s.editingField.overlay_color,"onUpdate:modelValue":e[7]||(e[7]=M=>s.editingField.overlay_color=M)},null,8,["predefine","modelValue"]),_(f,{modelValue:s.editingField.overlay_color,"onUpdate:modelValue":e[8]||(e[8]=M=>s.editingField.overlay_color=M)},null,8,["modelValue"])])]),_:1},8,["label"]),_(p,{label:t.$t("Heading Color")},{default:w(()=>[g("div",Uje,[_(C,{predefine:t.appVars.suggestedColors,modelValue:s.editingField.heading_color,"onUpdate:modelValue":e[9]||(e[9]=M=>s.editingField.heading_color=M)},null,8,["predefine","modelValue"]),_(f,{modelValue:s.editingField.heading_color,"onUpdate:modelValue":e[10]||(e[10]=M=>s.editingField.heading_color=M)},null,8,["modelValue"])])]),_:1},8,["label"]),_(p,{label:t.$t("Text Color")},{default:w(()=>[g("div",jje,[_(C,{predefine:t.appVars.suggestedColors,modelValue:s.editingField.text_color,"onUpdate:modelValue":e[11]||(e[11]=M=>s.editingField.text_color=M)},null,8,["predefine","modelValue"]),_(f,{modelValue:s.editingField.text_color,"onUpdate:modelValue":e[12]||(e[12]=M=>s.editingField.text_color=M)},null,8,["modelValue"])])]),_:1},8,["label"]),_(p,{label:t.$t("Button Label")},{default:w(()=>[g("div",Wje,[_(C,{predefine:t.appVars.suggestedColors,modelValue:s.editingField.button_text_color,"onUpdate:modelValue":e[13]||(e[13]=M=>s.editingField.button_text_color=M)},null,8,["predefine","modelValue"]),_(f,{modelValue:s.editingField.button_text_color,"onUpdate:modelValue":e[14]||(e[14]=M=>s.editingField.button_text_color=M)},null,8,["modelValue"])])]),_:1},8,["label"]),_(p,{label:t.$t("Button Background")},{default:w(()=>[g("div",Yje,[_(C,{predefine:t.appVars.suggestedColors,modelValue:s.editingField.button_color,"onUpdate:modelValue":e[15]||(e[15]=M=>s.editingField.button_color=M),"show-alpha":""},null,8,["predefine","modelValue"]),_(f,{modelValue:s.editingField.button_color,"onUpdate:modelValue":e[16]||(e[16]=M=>s.editingField.button_color=M)},null,8,["modelValue"])])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["label"])]),_:1},8,["modelValue"])):s.editingField.type=="block"?(v(),A("div",qje,S(t.$t("Edit the field from block editor ")),1)):s.editingField.type=="lesson"?(v(),A("div",Gje,S(t.$t("Edit lessons from lesson editor ")),1)):s.editingField.type=="welcome_banner"?(v(),A("div",Xje,S(t.$t("__COURSE_BANNER_SOURCE_DESC")),1)):s.editingField.type=="paywall"?(v(),D(x,{key:4,field:s.editingField,space_id:n.space_id},null,8,["field","space_id"])):O("",!0)])])):(v(),A("div",Mje,[g("div",Tje,[g("div",Pje,[g("p",null,S(t.$t("This page is only visible to non-members viewing a private space.")),1)])]),g("div",Ije,[g("div",Lje,S(t.$t("Page Blocks")),1),g("div",Oje,[g("ul",Dje,[(v(!0),A(ee,null,Ce(o.lockscreenFields,(M,P)=>(v(),A("li",{class:G(["fcom_block_list",{block_hidden:M.hidden}])},[g("div",Rje,[_(r,{class:"fcom_el_icon"},{default:w(()=>[(v(),D(Ct(o.getFieldIcon(M))))]),_:2},1024),g("p",null,S(t.$labelize(M.label)),1)]),g("div",Vje,[_(r,{onClick:T=>o.moveUp(P)},{default:w(()=>[_(a)]),_:2},1032,["onClick"]),_(r,{onClick:T=>o.moveDown(P)},{default:w(()=>[_(l)]),_:2},1032,["onClick"])]),g("div",Fje,[_(r,{onClick:T=>o.updateField(M)},{default:w(()=>[_(c)]),_:2},1032,["onClick"]),M.hidden?(v(),D(r,{key:0,onClick:T=>o.toggleHidden(M)},{default:w(()=>[_(u)]),_:2},1032,["onClick"])):(v(),D(r,{key:1,onClick:T=>o.toggleHidden(M)},{default:w(()=>[_(d)]),_:2},1032,["onClick"]))])],2))),256))])])])]))}const Zje=de(Eje,[["render",Kje]]),Jje={name:"BlockEditor",emits:["update:modelValue"],props:{modelValue:{type:String,required:!1}},data(){return{loading:!0,has_error:!1,all_loaded:!1,html:this.modelValue}},methods:{attach(){const t=this.$refs.block_editor;this.loading=!1,this.all_loaded=!0,window.wp.attachEditor(t,{iso:{toolbar:{undo:!0,navigation:!0,documentInspector:null},blocks:{allowBlocks:["core/button","core/buttons","core/code","core/column","core/columns","core/embed","core/group","core/heading","core/image","core/list","core/list-item","core/missing","core/paragraph","core/preformatted","core/pullquote","core/quote","core/separator","core/spacer","core/table","core/verse","core/html"]},__experimentalOnChange:function(e){console.log(e)},sidebar:{inserter:!1,inspector:!0}},editor:{__experimentalOnChange:function(e){console.log(e)},__experimentalOnInput(e){console.log(e)},__experimentalOnSelection(e){console.log(e)},onSaveContent:function(e){console.log(e)}}}),t.addEventListener("change",e=>{this.html=e.target.value,this.$emit("update:modelValue",e.target.value)})},loadScript(t){return new Promise((e,n)=>{const i=document.createElement("script");i.src=t,i.onload=e,i.onerror=n,document.head.append(i)})},async loadScripts(){const t=this.appVars.block_editor_assets.scripts;for(const e in t)try{await this.loadScript(t[e]),console.log(`${e} JS loaded`)}catch(n){this.has_error=!0,console.error(`Failed to load js ${e}:`,n)}this.attach()},loadCSSFile(t){return new Promise((e,n)=>{const i=document.createElement("link");i.rel="stylesheet",i.href=t,i.onload=e,i.onerror=n,document.head.append(i)})},async loadCSSFiles(){const e=this.appVars.block_editor_assets.styles.map(this.loadCSSFile);try{await Promise.all(e),console.log("All CSS files loaded")}catch(n){console.error("Failed to load some CSS files:",n)}}},mounted(){window.fl_block_editor_loaded?this.attach():(this.loadCSSFiles(),this.loadScripts(),window.fl_block_editor_loaded=!0)},beforeUnmount(){window.wp.detachEditor(this.$refs.block_editor)}},Qje={class:"fcom_block_editor"};function eWe(t,e,n,i,s,o){const r=Wt;return v(),A("div",Qje,[De(g("div",null,[g("textarea",{ref:"block_editor",id:"fcom_block_editor",name:"block_editor"},`
                `+S(s.html)+`
            `,513)],512),[[Ut,s.all_loaded]]),s.all_loaded?O("",!0):(v(),D(r,{key:0,class:"white_loaded",rows:7,animated:!0}))])}const $H=de(Jje,[["render",eWe]]),tWe={name:"FullEditorFrame",emits:["update:modelValue","titleUpdated","featuredMediaUpdated","metaUpdated","manageDocuments","useAlternateEditor"],props:{editorPath:{type:String,default:"/editor"},modelValue:{type:String,default:""},editorParams:{type:Object,default:()=>({})},frameHeight:{type:String,default:"500px"},documentTitle:{type:String,default:""},featured_image_id:{type:[String,Number],default:""},metaSettings:{type:Object,default:()=>null}},data(){return{editorData:{content:""},editorFrame:null,editorOrigin:null,lastUpdate:"No updates yet",dataSent:!1,isFailing:!1}},computed:{notLoading(){return!this.dataSent&&this.isFailing}},mounted(){setTimeout(()=>{this.isFailing=!0},1e4),this.editorData.content=this.modelValue,this.editorData.title=this.documentTitle,this.editorData.featured_image_id=this.featured_image_id,this.metaSettings&&(this.editorData.metaSettings=this.metaSettings),this.createEditorIframe(),window.addEventListener("message",this.handleEditorMessage)},beforeUnmount(){window.removeEventListener("message",this.handleEditorMessage),this.editorFrame&&(this.editorFrame.onload=null,this.$refs.iframeContainer.removeChild(this.editorFrame),this.editorFrame=null)},methods:{createEditorIframe(){const t=new URL(this.editorPath,window.location.origin);this.editorOrigin=t.origin,this.editorFrame=document.createElement("iframe");let e=this.appVars.wp_lesson_editor_frame;if(this.editorParams){const n=new URLSearchParams(this.editorParams);e+="&"+n.toString()}this.editorFrame.src=e,this.editorFrame.style.width="100%",this.editorFrame.style.height=this.frameHeight,this.$refs.iframeContainer.appendChild(this.editorFrame)},editorFailed(){this.$emit("useAlternateEditor")},sendDataToEditor(){if(this.editorFrame&&this.editorFrame.contentWindow){const t=JSON.parse(JSON.stringify(this.editorData));this.editorFrame.contentWindow.postMessage({type:"UPDATE_EDITOR",data:t},"*"),this.dataSent=!0}else alert("Editor frame is not loaded or contentWindow is not accessible.")},syncMetaToEditor(t){this.editorFrame&&this.editorFrame.contentWindow&&this.editorFrame.contentWindow.postMessage({type:"SYNC_META",data:JSON.parse(JSON.stringify(t))},"*")},handleEditorMessage(t){const{action:e,content:n}=t.data;e==="EDITOR_UPDATED"?this.dataSent&&(this.editorData.content=n,this.$emit("update:modelValue",n)):e==="TITLE_UPDATED"?(this.editorData.title=n,this.$emit("titleUpdated",n)):e==="FEATURED_MEDIA_UPDATED"?this.$emit("featuredMediaUpdated",n):e==="META_UPDATED"?this.$emit("metaUpdated",n):e==="MANAGE_DOCUMENTS"?this.$emit("manageDocuments"):e==="EDITOR_READY"&&(console.log("EDITOR_READY"),this.sendDataToEditor())}}},nWe={key:0,style:{display:"flex","justify-content":"center","align-items":"center","column-gap":"10px"}},sWe=["element-loading-text"],iWe={ref:"iframeContainer",class:"iframe-container"};function oWe(t,e,n,i,s,o){const r=We,a=Wt,l=xt("loading");return v(),A(ee,null,[o.notLoading?(v(),A("div",nWe,[g("p",null,S(t.$t("Problem with loading the editor?")),1),_(r,{onClick:e[0]||(e[0]=c=>o.editorFailed())},{default:w(()=>[B(S(t.$t("Use Alternative Editor")),1)]),_:1})])):O("",!0),De((v(),A("div",{"element-loading-text":t.$t("Loading editor. Please wait..."),class:"editor-container"},[s.dataSent?O("",!0):(v(),D(a,{key:0,style:{margin:"50px"},animated:!0,rows:2})),g("div",iWe,null,512)],8,sWe)),[[l,!s.dataSent]])],64)}const AH=de(tWe,[["render",oWe],["__scopeId","data-v-9e1ae12e"]]),rWe={name:"CircleIcon",props:{fill:{type:String,default:"currentColor"}}},aWe=["fill"],lWe=g("path",{d:"M10 2.5C14.1421 2.5 17.5 5.85786 17.5 10C17.5 14.1421 14.1421 17.5 10 17.5C5.85786 17.5 2.5 14.1421 2.5 10C2.5 5.85786 5.85786 2.5 10 2.5Z",fill:"none",stroke:"currentColor"},null,-1),cWe=[lWe];function uWe(t,e,n,i,s,o){return v(),A("svg",{fill:n.fill,width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},cWe,8,aWe)}const dWe=de(rWe,[["render",uWe]]),hWe={name:"LessonIcon"},fWe={width:"60",height:"48",viewBox:"0 0 60 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},pWe=g("rect",{width:"60",height:"48",rx:"4",fill:"#F2F5F8"},null,-1),mWe=g("path",{d:"M30 16.5L21 21.75L30 27L37.5 22.625V28.125H39V21.75L30 16.5ZM23.9993 25.1179V28.5001C25.3676 30.3217 27.5461 31.5001 29.9998 31.5001C32.4535 31.5001 34.6321 30.3217 36.0004 28.5001L36.0001 25.1185L30.0002 28.6184L23.9993 25.1179Z",fill:"#525866"},null,-1),gWe=[pWe,mWe];function vWe(t,e,n,i,s,o){return v(),A("svg",fWe,gWe)}const _We=de(hWe,[["render",vWe]]),yWe={name:"PlayIcon"},bWe={width:"20",height:"19",viewBox:"0 0 20 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"},wWe=$a('<g filter="url(#filter0_d_6543_69201)"><path d="M10 16.5C5.85775 16.5 2.5 13.1422 2.5 9C2.5 4.85775 5.85775 1.5 10 1.5C14.1422 1.5 17.5 4.85775 17.5 9C17.5 13.1422 14.1422 16.5 10 16.5ZM8.9665 6.31125C8.92136 6.28113 8.8689 6.26383 8.8147 6.26117C8.76051 6.25851 8.7066 6.27059 8.65873 6.29615C8.61086 6.3217 8.57082 6.35975 8.54287 6.40626C8.51492 6.45277 8.5001 6.50599 8.5 6.56025V11.4398C8.5001 11.494 8.51492 11.5472 8.54287 11.5937C8.57082 11.6402 8.61086 11.6783 8.65873 11.7039C8.7066 11.7294 8.76051 11.7415 8.8147 11.7388C8.8689 11.7362 8.92136 11.7189 8.9665 11.6888L12.6258 9.24975C12.6669 9.22236 12.7006 9.18524 12.724 9.14166C12.7473 9.09809 12.7595 9.04943 12.7595 9C12.7595 8.95057 12.7473 8.90191 12.724 8.85834C12.7006 8.81476 12.6669 8.77764 12.6258 8.75025L8.96575 6.31125H8.9665Z" fill="white"></path></g><defs><filter id="filter0_d_6543_69201" x="0.5" y="0.5" width="19" height="19" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0.0392157 0 0 0 0 0.0509804 0 0 0 0 0.0784314 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_6543_69201"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_6543_69201" result="shape"></feBlend></filter></defs>',2),kWe=[wWe];function CWe(t,e,n,i,s,o){return v(),A("svg",bWe,kWe)}const xWe=de(yWe,[["render",CWe]]),SWe={name:"PlayPlaceholderIcon"},$We={width:"60",height:"48",viewBox:"0 0 60 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},AWe=$a('<rect width="60" height="48" rx="4" fill="#F2F5F8"></rect><g clip-path="url(#clip0_6463_70077)"><g filter="url(#filter0_d_6463_70077)"><path d="M30 31.5C25.8578 31.5 22.5 28.1423 22.5 24C22.5 19.8578 25.8578 16.5 30 16.5C34.1423 16.5 37.5 19.8578 37.5 24C37.5 28.1423 34.1423 31.5 30 31.5ZM28.9665 21.3112C28.9214 21.2811 28.8689 21.2638 28.8147 21.2612C28.7605 21.2585 28.7066 21.2706 28.6587 21.2961C28.6109 21.3217 28.5708 21.3598 28.5429 21.4063C28.5149 21.4528 28.5001 21.506 28.5 21.5602V26.4398C28.5001 26.494 28.5149 26.5472 28.5429 26.5937C28.5708 26.6402 28.6109 26.6783 28.6587 26.7039C28.7066 26.7294 28.7605 26.7415 28.8147 26.7388C28.8689 26.7362 28.9214 26.7189 28.9665 26.6888L32.6258 24.2498C32.6669 24.2224 32.7006 24.1852 32.724 24.1417C32.7473 24.0981 32.7595 24.0494 32.7595 24C32.7595 23.9506 32.7473 23.9019 32.724 23.8583C32.7006 23.8148 32.6669 23.7776 32.6258 23.7502L28.9658 21.3112H28.9665Z" fill="#525866"></path></g></g><defs><filter id="filter0_d_6463_70077" x="20.5" y="15.5" width="19" height="19" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0.0392157 0 0 0 0 0.0509804 0 0 0 0 0.0784314 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_6463_70077"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_6463_70077" result="shape"></feBlend></filter><clipPath id="clip0_6463_70077"><rect width="20" height="20" fill="white" transform="translate(20 14)"></rect></clipPath></defs>',3),EWe=[AWe];function MWe(t,e,n,i,s,o){return v(),A("svg",$We,EWe)}const TWe=de(SWe,[["render",MWe]]),PWe={name:"_LockscreenLessonEditor",components:{CircleIcon:dWe,LessonIcon:_We,PlayIcon:xWe,PlayPlaceholderIcon:TWe},props:{sections:{type:Array,required:!0},is_editor:{type:Boolean,default:!1},settings:{type:Object,required:!1}},computed:{lessonsCount(){return this.sections.reduce((t,e)=>t+e.lessons.length,0)},sectionsCount(){return this.sections.reduce((t,e)=>t+(e.lessons.length?1:0),0)},lessonDuration(){return t=>{const e=t.lessons.reduce((n,i)=>n+(i.meta.video_length||0),0);return this.formatSeconds(e)||null}}},methods:{isEnabledMedia(t){var e;return((e=t.meta)==null?void 0:e.enable_media)=="yes"},hasMediaVideo(t){var n;const e=(n=t.meta)==null?void 0:n.media;return this.isEnabledMedia(t)&&(e==null?void 0:e.content_type)=="video"&&(e==null?void 0:e.html)},showPlayIcon(t){return this.hasMediaVideo(t)&&(this.hasMediaImage(t)||t.featured_image)},hasMediaImage(t){var e,n;return this.isEnabledMedia(t)&&((n=(e=t.meta)==null?void 0:e.media)==null?void 0:n.image)},isModernLayout(){var t;return this.has_pro&&((t=this.settings)==null?void 0:t.course_layout)==="modern"},isFreePreview(t){var e;return this.has_pro&&((e=t==null?void 0:t.meta)==null?void 0:e.free_preview_lesson)=="yes"},maybeGotoLesson(t,e){if(!this.is_editor){if(this.isFreePreview(t)){this.gotoLesson(t);return}e.is_locked&&e.unlock_date&&this.$notify.info({message:this.$t("This lesson will be unlocked on %s",e.unlock_date),type:"info"})}},gotoLesson(t){this.$router.push({name:"view_lesson",params:{lesson_slug:t.slug}}),setTimeout(()=>{window.location.reload()},100)},formatSeconds(t){if(t<1)return null;let e=Math.floor(t/3600),n=Math.floor(t%3600/60),i=t%60,s="";return e>0&&(s+=this.$t("%dh ",e)),n>0&&(s+=this.$t("%dm ",n)),i>0&&(s+=this.$t("%ds",i)),s.trim()||null}}},IWe={class:"fcom_course_sections"},LWe={class:"fcom_course_intro"},OWe={class:"fcom_course_labels"},DWe={class:"fcom_course_info"},RWe=g("span",null," • ",-1),VWe={class:"fcom_card_sections"},FWe={class:"fcom_section_items"},NWe=["onClick"],BWe={class:"fcom_section_primary_item_title"},zWe={class:"title_line_container"},HWe={class:"title_line"},UWe={class:"fcom_meta_text"},jWe={key:0,class:"fcom_meta_text"},WWe={class:"fcom_section_primary_item_actions"},YWe=["onClick"],qWe={class:"fcom_heading_item clickable"},GWe={class:"lesson_feature_media"},XWe=["src","alt"],KWe=["src","alt"],ZWe={class:"lesson_title"},JWe=["innerHTML"],QWe={class:"lesson_duration"},eYe={key:0},tYe={key:1},nYe=["innerHTML"];function sYe(t,e,n,i,s,o){const r=W("ArrowRight"),a=W("ArrowDown"),l=be,c=W("CircleIcon"),u=W("Lock"),d=W("PlayPlaceholderIcon"),h=W("LessonIcon"),f=W("PlayIcon");return v(),A("div",IWe,[g("div",LWe,[g("div",OWe,[g("h3",null,S(t.$t("Course Content")),1),g("p",DWe,[B(S(t.$_n("%s Topic","%s Topics",o.sectionsCount))+" ",1),RWe,B(" "+S(t.$_n("%s Lesson","%s Lessons",o.lessonsCount)),1)])])]),g("div",VWe,[g("div",FWe,[(v(!0),A(ee,null,Ce(n.sections,p=>(v(),A("div",{key:p.id,class:"fcom_section_primary"},[p.lessons.length?(v(),A("div",{key:0,onClick:m=>p.is_closed=!p.is_closed,class:G(["clickable fcom_section_primary_item",{is_closed:p.is_closed}])},[g("div",BWe,[g("div",zWe,[g("div",HWe,[g("h4",null,S(p.title),1)]),g("span",UWe,S(t.$t("%d lessons",p.lessons.length)),1),o.lessonDuration(p)?(v(),A("span",jWe," • "+S(o.lessonDuration(p)),1)):O("",!0)])]),g("div",WWe,[_(l,{class:"clickable"},{default:w(()=>[p.is_closed?(v(),D(r,{key:0,class:"fcom_arrow_icon"})):(v(),D(a,{key:1}))]),_:2},1024)])],10,NWe)):O("",!0),p.is_closed?O("",!0):(v(!0),A(ee,{key:1},Ce(p.lessons,m=>(v(),A("div",{key:m.id,class:G(["fcom_section_item",{is_locked:!o.isFreePreview(m)}])},[g("div",{onClick:y=>o.maybeGotoLesson(m,p),class:"fcom_section_item_title"},[g("p",qWe,[_(l,null,{default:w(()=>[o.isFreePreview(m)?(v(),D(c,{key:0})):(v(),D(u,{key:1}))]),_:2},1024),o.isModernLayout?(v(),A(ee,{key:0},[g("span",GWe,[m.featured_image?(v(),A("img",{key:0,src:m.featured_image,alt:m.title},null,8,XWe)):o.hasMediaImage(m)?(v(),A("img",{key:1,src:m.meta.media.image,alt:m.title},null,8,KWe)):o.hasMediaVideo(m)?(v(),D(d,{key:2})):(v(),D(h,{key:3})),o.showPlayIcon(m)?(v(),D(f,{key:4,class:"play_icon"})):O("",!0)]),g("span",ZWe,[g("span",{innerHTML:m.title},null,8,JWe),g("span",QWe,[m.meta.video_length?(v(),A("span",eYe,S(o.formatSeconds(m.meta.video_length)),1)):(v(),A("span",tYe,S("---")))])])],64)):(v(),A("span",{key:1,innerHTML:m.title},null,8,nYe))])],8,YWe)],2))),128))]))),128))])])])}const iYe=de(PWe,[["render",sYe]]),oYe={name:"LockscreenPaywallView",components:{ImagePlaceholder:sS},props:{space_id:{type:[String,Number],required:!0},field:{type:Object,required:!0},editable:{type:Boolean,default:!1}},data(){return{loading:!1,availablePaywalls:[]}},computed:{buttonStyles(){return{backgroundColor:this.field.button_color,borderColor:this.field.button_color,color:this.field.button_text_color}},cardStyles(){return{backgroundColor:this.field.background_color||"transparent",color:this.field.text_color||"var(--fcom-primary-text, #2B2E33)"}},filteredPaywalls(){return!Array.isArray(this.field.paywalls)||!Array.isArray(this.availablePaywalls)?[]:this.field.paywalls.map(t=>{for(const e of this.availablePaywalls)if(Array.isArray(e.variants)){const n=e.variants.find(i=>String(i.id)===String(t));if(n)return{...n,description:e.post_excerpt}}return null}).filter(Boolean)}},methods:{isSubscriptionPaywall(t){var e;return((e=t.other_info)==null?void 0:e.payment_type)=="subscription"},getRepeatInterval(t){var i;const e=(i=t.other_info)==null?void 0:i.repeat_interval;return e&&{daily:this.$t("day"),weekly:this.$t("week"),monthly:this.$t("month"),quarterly:this.$t("quarter"),half_yearly:this.$t("half year"),yearly:this.$t("year")}[e]||""},fetchAvailablePaywalls(){if(!this.space_id){this.availablePaywalls=[];return}const t={space_id:this.space_id};this.editable||(t.paywall_ids=this.field.paywalls),this.loading=!0,this.$get("cart/spaces/"+this.space_id+"/paywalls",t).then(e=>{this.availablePaywalls=e.paywalls||[]}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})}},mounted(){this.hasFeature("has_fluentcart")&&this.fetchAvailablePaywalls()}},rYe={class:"fcom_paywall_cards"},aYe={class:"paywall_header"},lYe={class:"paywall_body"},cYe=["innerHTML"],uYe={key:0,class:"subscription"},dYe={class:"paywall_footer"},hYe={key:0,class:"fcom_mb_10"},fYe=["href"];function pYe(t,e,n,i,s,o){const r=Wt,a=L4,l=W("ImagePlaceholder");return v(),A("div",rYe,[s.loading?(v(),D(r,{key:0,rows:3,animated:!0})):(v(!0),A(ee,{key:1},Ce(o.filteredPaywalls,c=>(v(),A("div",{key:c.id,class:"fcom_paywall",style:Xe(o.cardStyles)},[g("div",aYe,[c.photo?(v(),D(a,{key:0,src:c.photo},null,8,["src"])):(v(),D(a,{key:1},{default:w(()=>[_(l)]),_:1})),g("span",null,S(c.variation_title),1)]),g("div",lYe,[g("span",{innerHTML:c.total_price},null,8,cYe),o.isSubscriptionPaywall(c)?(v(),A("span",uYe," / "+S(o.getRepeatInterval(c)),1)):O("",!0)]),g("div",dYe,[n.field.show_description=="yes"&&(c!=null&&c.description)?(v(),A("span",hYe,S(c.description),1)):O("",!0),n.editable?De((v(),A("input",{key:1,class:"el-button fcom_primary_button link_button",style:Xe(o.buttonStyles),type:"text","onUpdate:modelValue":e[0]||(e[0]=u=>n.field.button_text=u)},null,4)),[[rd,n.field.button_text]]):(v(),A("a",{key:2,class:"el-button fcom_primary_button link_button",style:Xe(o.buttonStyles),href:c.checkout_url},S(n.field.button_text),13,fYe))])],4))),128))])}const mYe=de(oYe,[["render",pYe]]),gYe={name:"LockScreenEditor",props:["title","lockscreen","sections","saving","loading","space_id","settings"],emits:["save","close"],components:{LockscreenLessonEditor:iYe,MediaEmbeder:q1,BlockEditor:$H,LockscreenMeta:Zje,LockscreenPaywallView:mYe,FullEditorFrame:AH},data(){return{editingField:null,useClassic:!1}},computed:{lockscreenFields(){return this.lockscreen.filter(t=>!t.hidden)},imageStyles(){return t=>({backgroundImage:`url(${t.background_image})`,backgroundColor:t.overlay_color})},headingStyles(){return t=>({color:t.heading_color})},descriptionStyles(){return t=>({color:t.text_color})},buttonStyles(){return t=>({backgroundColor:t.button_color,color:t.button_text_color})}},methods:{updateHeading(t,e){e.heading=t.target.innerText},updateDescription(t,e){e.description=t.target.innerText},updateButtonLabel(t,e){e.button_text=t.target.innerText},visibleBlock(t){this.editingField=t},updateEditField(t){this.editingField=t,(t==null?void 0:t.type)==="block"&&setTimeout(()=>{const e=document.getElementById("fcomBlockContent");e&&e.scrollIntoView({behavior:"smooth"})},300)},saveChanges(){this.editingField=null,this.$emit("save")},switchToClassic(){this.useClassic=!0}}},vYe={class:"fcom_editor_topbar"},_Ye={class:"fcom_editor_content"},yYe={class:"fcom_item"},bYe={class:"fcom_content"},wYe=["onBlur"],kYe=["onBlur"],CYe=["onBlur"],xYe={key:1,class:"fcom_content_wrap"},SYe={id:"fcomBlockContent"},$Ye={key:2,class:"fcom_content_wrap"},AYe={key:1,class:"fcom_description"},EYe={key:3,class:"fcom_content_wrap"},MYe={key:4,class:"fcom_paywall_wrap"};function TYe(t,e,n,i,s,o){const r=W("lockscreen-meta"),a=x1,l=W("Lock"),c=be,u=W("block-editor"),d=W("FullEditorFrame"),h=W("welcome-banner"),f=W("lockscreen-lesson-editor"),p=Wt,m=W("lockscreen-paywall-view"),y=Ai,b=Aa;return v(),A(ee,null,[_(a,{class:"fcom_full_editor_side lockscreen_editor",width:"250px"},{default:w(()=>[le(t.$slots,"before_meta"),_(r,{lockscreen:n.lockscreen,space_id:n.space_id,onEditField:o.updateEditField},null,8,["lockscreen","space_id","onEditField"])]),_:3}),_(b,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(y,null,{default:w(()=>[g("div",vYe,[_(c,null,{default:w(()=>[_(l)]),_:1}),g("h3",null,S(n.title),1)]),g("div",_Ye,[(v(!0),A(ee,null,Ce(o.lockscreenFields,k=>{var C;return v(),A("div",yYe,[k.type=="image"?(v(),A("div",{key:0,class:"fcom_image_wrap",style:Xe(o.imageStyles(k))},[g("div",bYe,[g("h2",{style:Xe(o.headingStyles(k)),contenteditable:"true",onBlur:$=>o.updateHeading($,k)},S(k.heading),45,wYe),k.description?(v(),A("p",{key:0,style:Xe(o.descriptionStyles(k)),contenteditable:"true",onBlur:$=>o.updateDescription($,k)},S(k.description),45,kYe)):O("",!0),k.button_text?(v(),A("button",{key:1,class:"fcom_btn",style:Xe(o.buttonStyles(k)),contenteditable:"true",onBlur:$=>o.updateButtonLabel($,k)},S(k.button_text),45,CYe)):O("",!0)])],4)):O("",!0),k.type=="block"?(v(),A("div",xYe,[g("div",SYe,[s.useClassic?(v(),D(u,{key:0,modelValue:k.content,"onUpdate:modelValue":$=>k.content=$},null,8,["modelValue","onUpdate:modelValue"])):(v(),D(d,{key:1,ref_for:!0,ref:"fullEditorFrame",onUseAlternateEditor:o.switchToClassic,editorParams:{context:"lockscreen",space_id:n.space_id},frameHeight:"calc(100vh - 160px)",documentTitle:"",modelValue:k.content,"onUpdate:modelValue":$=>k.content=$},null,8,["onUseAlternateEditor","editorParams","frameHeight","modelValue","onUpdate:modelValue"]))])])):O("",!0),k.type=="welcome_banner"?(v(),A("div",$Ye,[k.banner?(v(),D(h,{key:0,config:k.banner,"wrapper-class":"fcom_course_welcome_box","content-class":"fcom_course_welcome_content"},null,8,["config"])):(v(),A("div",AYe,S(t.$t("__COURSE_BANNER_EMPTY_DESC")),1))])):O("",!0),k.type=="lesson"?(v(),A("div",EYe,[n.loading?(v(),D(p,{key:1,rows:5,animated:!0})):(v(),D(f,{key:0,sections:n.sections,is_editor:!0,settings:n.settings},null,8,["sections","settings"]))])):O("",!0),k.type=="paywall"&&((C=k.paywalls)==null?void 0:C.length)>0?(v(),A("div",MYe,[_(m,{space_id:n.space_id,field:k,editable:!0},null,8,["space_id","field"])])):O("",!0)])}),256))])]),_:1})]),_:1})],64)}const EH=de(gYe,[["render",TYe]]),PYe={name:"CourseLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:EH},data(){return{saving:!1,loading:!1,sections:[],lockscreen:null}},watch:{savingCount(){this.saveChanges(!0)}},methods:{getSections(){this.loading=!0,this.$get("admin/courses/"+this.spaceProfile.id+"/sections",{conditions:["only_published"],with_lock_screen:!0}).then(t=>{this.sections=t.sections,this.lockscreen=t.lockscreen}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveChanges(t=!1){this.lockscreen&&(this.saving=!0,this.$put("admin/courses/"+this.spaceProfile.id+"/lockscreens",{lockscreen:this.lockscreen}).then(e=>{this.$notify.success(e.message),t&&this.$emit("close")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1}))}},mounted(){this.getSections()}},IYe={key:0,class:"fcom_lockscreen_meta"},LYe={class:"fcom_description"};function OYe(t,e,n,i,s,o){const r=W("lock-screen-editor");return s.lockscreen?(v(),D(r,{key:0,title:n.spaceProfile.title,space_id:n.spaceProfile.id,settings:n.spaceProfile.settings,lockscreen:s.lockscreen,sections:s.sections,saving:s.saving,loading:s.loading,onSave:o.saveChanges,onClose:e[0]||(e[0]=a=>t.$emit("close"))},{before_meta:w(()=>[n.spaceProfile.settings.custom_lock_screen!="yes"?(v(),A("div",IYe,[g("div",LYe,[g("p",null,S(t.$t("__LOCK_SCRREN_DESC")),1)])])):O("",!0)]),_:1},8,["title","space_id","settings","lockscreen","sections","saving","loading","onSave"])):O("",!0)}const DYe=de(PYe,[["render",OYe]]),RYe={name:"FluentDnD",props:{items:{type:Array,required:!0},itemClass:{type:String},itemStyle:{type:String},rowKey:{type:String,default:"id"},group:{type:String,default:""},gap:{type:String,default:""},draggable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},itemLabel:{type:Function,default:null}},emits:["drop","crossDrop","drag-start"],data(){return{draggingIndex:null,startIndex:null,snapshotBeforeDrag:null}},computed:{keyboardEnabled(){return this.keyboard&&this.draggable}},methods:{itemAriaLabel(t,e){return this.itemLabel?this.itemLabel(t,e):this.$t("Sortable item %1$s of %2$s. Use the up and down arrow keys to reorder.",e+1,this.items.length)},onItemKeydown(t,e){if(!this.keyboardEnabled||t.target!==t.currentTarget)return;let n=0;if(t.key==="ArrowUp")n=-1;else if(t.key==="ArrowDown")n=1;else return;const i=e+n;i<0||i>=this.items.length||(t.preventDefault(),this.reorderItems(e,i),this.$emit("drop",{index:i,newItems:this.items}),this.$nextTick(()=>{var o;(o=this.$el.querySelectorAll(":scope > .drag-group > .drag-item")[i])==null||o.focus()}))},dragStart(t,e){t._fluentDndHandled||(t._fluentDndHandled=!0,this.draggingIndex=e,this.startIndex=e,this.snapshotBeforeDrag=[...this.items],this.$emit("drag-start",{index:e,items:this.items}),t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",this.items[e][this.rowKey]),this.group&&t.dataTransfer.setData("source-group",this.group))},dragEnd(){this.snapshotBeforeDrag&&(this.items.splice(0,this.items.length,...this.snapshotBeforeDrag),this.snapshotBeforeDrag=null),this.draggingIndex=null},dragOver(t,e){if(t.preventDefault(),!this.group&&t.dataTransfer.types.includes("source-group")||this.draggingIndex===null)return;const n=this.items[this.draggingIndex],i=this.items[e];if(n===i)return;const s=t.currentTarget.getBoundingClientRect(),o=s.top+s.height/2,r=t.clientY;(this.draggingIndex<e&&r>o||this.draggingIndex>e&&r<o)&&(this.reorderItems(this.draggingIndex,e),this.draggingIndex=e)},dropEnd(t,e){const n=t.dataTransfer.getData("source-group");if(!(!this.group&&n)){if(this.group&&n&&n!==this.group){t.stopPropagation();const i=t.dataTransfer.getData("text/plain");this.$emit("crossDrop",{itemKey:i,sourceGroup:n,targetGroup:this.group,targetIndex:e});return}this.startIndex===null||this.startIndex===e||(t.stopPropagation(),this.snapshotBeforeDrag=null,this.draggingIndex=null,this.startIndex=null,this.$emit("drop",{index:e,newItems:this.items}))}},onContainerDragOver(t){t.preventDefault()},onContainerDrop(t){if(!this.group)return;const e=t.dataTransfer.getData("source-group");if(!e||e===this.group)return;const n=t.dataTransfer.getData("text/plain");this.$emit("crossDrop",{itemKey:n,sourceGroup:e,targetGroup:this.group,targetIndex:this.items.length})},reorderItems(t,e){const n=this.items.splice(t,1)[0];this.items.splice(e,0,n)}}},VYe=["onDragstart","onDragover","onDrop","onKeydown","draggable","tabindex","aria-label"];function FYe(t,e,n,i,s,o){return v(),A("div",{class:"drag-container",onDragover:e[1]||(e[1]=Ae((...r)=>o.onContainerDragOver&&o.onContainerDragOver(...r),["prevent"])),onDrop:e[2]||(e[2]=Ae((...r)=>o.onContainerDrop&&o.onContainerDrop(...r),["prevent"]))},[_(ib,{name:"flip-list",tag:"div",class:"drag-group",style:Xe(n.gap?{display:"flex",flexDirection:"column",gap:n.gap}:{})},{default:w(()=>[(v(!0),A(ee,null,Ce(n.items,(r,a)=>(v(),A("div",{key:r[n.rowKey],onDragstart:l=>o.dragStart(l,a),onDragend:e[0]||(e[0]=(...l)=>o.dragEnd&&o.dragEnd(...l)),onDragover:Ae(l=>o.dragOver(l,a),["prevent"]),onDrop:Ae(l=>o.dropEnd(l,a),["prevent"]),onKeydown:l=>o.onItemKeydown(l,a),draggable:n.draggable,tabindex:o.keyboardEnabled?0:null,"aria-label":o.keyboardEnabled?o.itemAriaLabel(r,a):null,class:G(["drag-item",n.itemClass,{dragging:s.draggingIndex===a}]),style:Xe(n.itemStyle)},[le(t.$slots,"item",{data:r,index:a},void 0,!0)],46,VYe))),128))]),_:3},8,["style"])],32)}const Ud=de(RYe,[["render",FYe],["__scopeId","data-v-e2a330da"]]),NYe={name:"MenuGroupSettings",components:{SpaceCourseSelector:Z5,FluentDnD:Ud,LogoEmojiSelector:I1,Drawer:Dd,ActionPopover:Pa},data(){return{editingItem:null,originalItem:null,openEditLinkDrawer:!1,isDragging:!1,isSpaceDragging:!1,draggingIndex:null,draggedSpaceIndex:null,mode:null,urlErrors:[],validationAttempt:0}},computed:{isDirty(){return!this.editingItem||!this.originalItem?!1:JSON.stringify(this.editingItem)!==JSON.stringify(this.originalItem)}},emits:["save"],props:{menuItems:{type:Array,required:!0},saving:{type:Boolean,default:!1},title:{type:String,required:!0},has_svg:{type:Boolean,default:!0},use_icon_selector:{type:Boolean,default:!1},has_enable_disable:{type:Boolean,default:!0},custom_svg:{type:Boolean,default:!1}},methods:{linkRowActions(t,e){const n=[{label:this.$t("Edit"),action:()=>this.initEditLink(t,"edit")}];return t.is_system!="yes"&&n.push({label:this.$t("Delete"),type:"danger",action:()=>this.removeLink(e)}),n},validateLinkForm(){return this.urlErrors=[],this.validationAttempt++,(!this.editingItem.title||!this.editingItem.title.trim())&&this.urlErrors.push(this.$t("Link title cannot be empty.")),this.editingItem.is_system!=="yes"&&(!this.editingItem.permalink||!this.editingItem.permalink.trim())&&this.urlErrors.push(this.$t("URL or path cannot be empty.")),this.urlErrors.length===0},initEditLink(t,e="create"){t.privacy||(t.privacy="public",t.membership_ids=t.membership_ids||[]),this.mode=e,this.urlErrors=[],this.originalItem=t,this.editingItem=JSON.parse(JSON.stringify(t||{})),this.$nextTick(()=>{this.openEditLinkDrawer=!0})},removeLink(t){this.$confirm(this.$t("Are you sure you want to remove this link?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.menuItems.splice(t,1),this.saveMenuItems({customSuccessMessage:this.$t("Link deleted successfully.")})})},createOrUpdateLink(){if(!this.saving&&this.validateLinkForm()){if(!this.editingItem.slug)this.editingItem.slug="fcom_custom_"+this.editingItem.title.toLowerCase().replace(/[^a-z0-9]/g,"_"),this.menuItems.push(this.editingItem);else{const t=this.menuItems.findIndex(e=>e.slug===this.editingItem.slug);t!==-1?Object.assign(this.menuItems[t],this.editingItem):this.menuItems.push(this.editingItem)}this.openEditLinkDrawer=!1,this.editingItem=null,this.saveMenuItems()}},saveMenuItems({customSuccessMessage:t=null}={}){this.$emit("save",{customSuccessMessage:t})},drop({index:t}){this.draggingIndex=null,this.saveMenuItems()},beforeCloseDrawer(t){if(this.saving){this.$notify.info(this.$t("Please wait to complete."));return}this.editingItem=null,this.originalItem=null,this.mode=null,t()}}},BYe={key:0,class:"fcom_section_primary fcom_menu_group_settings"},zYe={class:"fcom_section_primary_item"},HYe={class:"fcom_section_primary_item_title"},UYe={class:"fcom_heading_item"},jYe={class:"fcom_section_item_actions"},WYe={class:"fcom_section_items menu-items-container"},YYe={key:0,style:{padding:"1rem"}},qYe={class:"fcom_section_item_title"},GYe={class:"fcom_heading_item"},XYe=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1),KYe={key:0,class:"community_avatar"},ZYe=["src"],JYe={key:1,class:"fcom_emoji"},QYe={key:2,class:"fcom_shape"},eqe=["innerHTML"],tqe={class:"fcom_section_item_actions"},nqe={key:0},sqe={key:1},iqe={key:0},oqe={class:"fcom_help_text"},rqe={class:"fcom_help_text"};function aqe(t,e,n,i,s,o){const r=We,a=be,l=Ci,c=W("action-popover"),u=W("FluentDnD"),d=W("logo-emoji-selector"),h=ft,f=en,p=Gt,m=Mi,y=xs,b=W("SpaceCourseSelector"),k=Ur,C=sn,$=W("drawer");return v(),A(ee,null,[n.menuItems?(v(),A("div",BYe,[g("div",zYe,[g("div",HYe,[g("div",UYe,[le(t.$slots,"title",{},()=>[g("h4",null,S(n.title),1)])])]),g("div",jYe,[_(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=x=>o.initEditLink({enabled:"yes",privacy:"public",membership_ids:[],new_tab:"yes"}))},{default:w(()=>[B(S(t.$t("Add New Link")),1)]),_:1})])]),g("div",WYe,[n.menuItems.length?O("",!0):(v(),A("div",YYe,[g("p",null,S(t.$t("No link has been added for this section")),1)])),_(u,{items:n.menuItems,"row-key":"slug",onDrop:o.drop,"item-class":"fcom_section_item"+(n.saving?"":" fcom_cursor_move"),"item-style":t.isMobile?"padding: 12px":"padding: 15px 15px 15px 35px"},{item:w(({data:x,index:M})=>[g("div",qYe,[g("p",GYe,[n.use_icon_selector?(v(),A(ee,{key:0},[XYe,x.icon_image?(v(),A("div",KYe,[_(a,null,{default:w(()=>[g("img",{alt:"",style:{"max-width":"16px","max-height":"16px"},src:x.icon_image},null,8,ZYe)]),_:2},1024)])):x.emoji?(v(),A("span",JYe,S(x.emoji),1)):x.shape_svg?(v(),A("span",QYe,[_(a,{innerHTML:x.shape_svg},null,8,["innerHTML"])])):O("",!0)],64)):x.icon_svg?(v(),D(a,{key:1},{default:w(()=>[g("span",{innerHTML:x.icon_svg},null,8,eqe)]),_:2},1024)):O("",!0),g("span",null,S(x.title),1),x.is_unavailable=="yes"?(v(),D(l,{key:2,type:"danger"},{default:w(()=>[B(S(t.$t("unavailable")),1)]),_:1})):x.enabled=="yes"?(v(),D(l,{key:3,type:"success"},{default:w(()=>[B(S(t.$t("enabled")),1)]),_:1})):(v(),D(l,{key:4,type:"info"},{default:w(()=>[B(S(t.$t("disabled")),1)]),_:1}))])]),g("div",tqe,[_(c,{items:o.linkRowActions(x,M),placement:"bottom-end"},null,8,["items"])])]),_:1},8,["items","onDrop","item-class","item-style"])])])):O("",!0),_($,{modelValue:s.openEditLinkDrawer,"onUpdate:modelValue":e[11]||(e[11]=x=>s.openEditLinkDrawer=x),size:t.drawerWidth,"before-close":o.beforeCloseDrawer,id:"fluent_comminity_body","close-on-click-modal":!0,"has-close-confirmation":o.isDirty&&!n.saving,"close-confirmation-message":t.$t("Closing will discard your changes. Are you sure?")},{header:w(()=>[s.mode==="edit"?(v(),A("h4",nqe,S(t.$t("Edit Link")),1)):(v(),A("h4",sqe,S(t.$t("Add Custom Link")),1))]),default:w(()=>[s.editingItem?(v(),A("div",iqe,[_(C,{onSubmit:e[10]||(e[10]=Ae(x=>t.doNothing(),["prevent"])),"label-position":"top",disabled:n.saving},{default:w(()=>[_(f,{label:t.$t("Name of the Link")},{default:w(()=>[_(h,{disabled:n.saving,placeholder:t.$t("Public Name of the item"),modelValue:s.editingItem.title,"onUpdate:modelValue":e[2]||(e[2]=x=>s.editingItem.title=x)},cs({_:2},[n.use_icon_selector?{name:"prepend",fn:w(()=>[_(d,{custom_svg:n.custom_svg,fallback_mark:"<span style='font-size: 20px;'>☺</span>",onUpdate:e[1]||(e[1]=x=>{n.saving||(s.editingItem.emoji=x.emoji,s.editingItem.icon_image=x.logo,s.editingItem.shape_svg=x.shape_svg)}),config:{logo:s.editingItem.icon_image,emoji:s.editingItem.emoji||"",shape_svg:s.editingItem.shape_svg||""}},null,8,["custom_svg","config"])]),key:"0"}:void 0]),1032,["disabled","placeholder","modelValue"])]),_:1},8,["label"]),_(f,{label:t.$t("URL")},{default:w(()=>[_(h,{disabled:n.saving||s.editingItem.is_system=="yes",type:"text",placeholder:t.$t("URL or path (e.g. https://example.com or /members)"),modelValue:s.editingItem.permalink,"onUpdate:modelValue":e[3]||(e[3]=x=>s.editingItem.permalink=x)},null,8,["disabled","placeholder","modelValue"]),g("div",oqe,[g("p",null,S(t.$t("For internal links, start with / (e.g. /members).")),1)])]),_:1},8,["label"]),n.has_svg?(v(),D(f,{key:0,label:t.$t("SVG Code for Icon (Simplified SVG Code) / Emoji")},{default:w(()=>[_(h,{disabled:n.saving,placeholder:t.$t("SVG Code. No url please / You can use emoji"),type:"textarea",rows:3,modelValue:s.editingItem.icon_svg,"onUpdate:modelValue":e[4]||(e[4]=x=>s.editingItem.icon_svg=x)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["label"])):O("",!0),n.has_enable_disable?(v(),D(f,{key:1,style:{"margin-bottom":"5px"}},{default:w(()=>[_(p,{disabled:n.saving,"true-value":"yes","false-value":"no",modelValue:s.editingItem.enabled,"onUpdate:modelValue":e[5]||(e[5]=x=>s.editingItem.enabled=x),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Enable this link")),1)]),_:1},8,["disabled","modelValue"])]),_:1})):O("",!0),s.editingItem.is_system!="yes"?(v(),D(f,{key:2},{default:w(()=>[_(p,{disabled:n.saving,"true-value":"yes","false-value":"no",modelValue:s.editingItem.new_tab,"onUpdate:modelValue":e[6]||(e[6]=x=>s.editingItem.new_tab=x),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Open this link in a new tab.")),1)]),_:1},8,["disabled","modelValue"])]),_:1})):O("",!0),_(f,{label:t.$t("Visibility")},{default:w(()=>[_(y,{disabled:n.saving,modelValue:s.editingItem.privacy,"onUpdate:modelValue":e[7]||(e[7]=x=>s.editingItem.privacy=x)},{default:w(()=>[_(m,{label:t.$t("Everyone"),value:"public"},null,8,["label"]),_(m,{label:t.$t("Logged-in only"),value:"logged_in"},null,8,["label"]),_(m,{label:t.$t("Public only"),value:"logged_out_only"},null,8,["label"]),_(m,{label:t.$t("By Space/Course Memberships"),value:"members_only"},null,8,["label"])]),_:1},8,["disabled","modelValue"]),g("div",rqe,S(t.$t("Select who can see this link.")),1)]),_:1},8,["label"]),s.editingItem.privacy=="members_only"?(v(),D(f,{key:3,label:t.$t("Select Space/Course Memberships")},{default:w(()=>[_(b,{disabled:n.saving,modelValue:s.editingItem.membership_ids,"onUpdate:modelValue":e[8]||(e[8]=x=>s.editingItem.membership_ids=x),placeholder_text:t.$t("Select Memberships"),is_multiple:!0},null,8,["disabled","modelValue","placeholder_text"])]),_:1},8,["label"])):O("",!0),s.urlErrors.length?(v(),D(k,{key:s.validationAttempt,type:"warning",closable:!0,"show-icon":"",style:{margin:"8px 0"}},{title:w(()=>[g("div",null,[g("ul",null,[(v(!0),A(ee,null,Ce(s.urlErrors,(x,M)=>(v(),A("li",{style:{"margin-bottom":"0"},key:M},S(x),1))),128))])])]),_:1})):O("",!0),_(f,null,{default:w(()=>[_(r,{disabled:n.saving,class:"fcom_primary_button",onClick:e[9]||(e[9]=x=>o.createOrUpdateLink())},{default:w(()=>[B(S(n.saving?t.$t("Saving..."):t.$t("Save")),1)]),_:1},8,["disabled"])]),_:1})]),_:1},8,["disabled"])])):O("",!0)]),_:1},8,["modelValue","size","before-close","has-close-confirmation","close-confirmation-message"])],64)}const MH=de(NYe,[["render",aqe]]),lqe={name:"ManageSpaceLinks",components:{MenuGroupSettings:MH},props:["spaceProfile","savingCount"],emits:["close"],data(){return{saving:!1}},watch:{savingCount(){this.saveMenuItems(!0)}},methods:{saveMenuItems(t=!1){this.saving=!0;let e="spaces/"+this.spaceProfile.slug+"/links";this.spaceProfile.type=="course"&&(e="admin/courses/"+this.spaceProfile.id+"/links"),this.$post(e,{links:this.spaceProfile.settings.links,space_id:this.spaceProfile.id}).then(n=>{this.$notify.success(n.message),this.spaceProfile.settings.links=n.links,t&&this.$emit("close")}).catch(n=>{this.$handleError(n)}).finally(()=>{this.saving=!1})}}},cqe={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},uqe={class:"fcom_card_sections"};function dqe(t,e,n,i,s,o){const r=W("menu-group-settings"),a=Ai,l=Aa;return v(),D(l,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(a,null,{default:w(()=>[g("div",cqe,[g("div",uqe,[_(r,{custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:e[0]||(e[0]=c=>o.saveMenuItems()),title:t.$t("Manage Links"),menuItems:n.spaceProfile.settings.links},null,8,["title","menuItems"])])])]),_:1})]),_:1})}const TH=de(lqe,[["render",dqe]]),hqe={name:"AddPaywallModal",props:{modelValue:{type:Boolean,default:!1},spaceProfile:{type:Object,required:!0}},emits:["update:modelValue","added"],data(){return{products:[],productID:null,saving:!1,creatingProduct:!1,fetchingProducts:!1,newPaywall:{title:"",price:0}}},computed:{addPaywallModal:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}}},methods:{isProductAdded(t){var e,n;return(n=(e=this.spaceProfile.settings)==null?void 0:e.cart_product_ids)==null?void 0:n.includes(t)},initCreateProduct(){this.productID=null,this.newPaywall={title:"",price:0}},createProduct(){var t,e;this.creatingProduct=!0,this.$post("cart/products/create",{title:(t=this.newPaywall)==null?void 0:t.title,price:(e=this.newPaywall)==null?void 0:e.price}).then(n=>{var i;this.products.push(n.product),this.productID=(i=n.product)==null?void 0:i.id,this.productID&&this.addPaywall()}).catch(n=>{this.$handleError(n)}).finally(()=>{this.creatingProduct=!1})},searchProducts(t=""){t&&t.length<3||this.fetchProducts(t)},fetchProducts(t=""){this.fetchingProducts=!0,this.$get("cart/products/search",{search:t,space_id:this.spaceProfile.id}).then(e=>{this.products=e.products}).catch(e=>{this.$handleError(e)}).finally(()=>{this.fetchingProducts=!1})},addPaywall(){this.saving=!0,this.$post("cart/spaces/"+this.spaceProfile.id+"/paywalls",{cart_product_id:this.productID,space_id:this.spaceProfile.id}).then(t=>{var e;this.$notify.success(t.message),this.$emit("added",(e=t.paywall)==null?void 0:e.ID),this.addPaywallModal=!1}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.fetchProducts()}},fqe={class:"fcom_topic_selector"},pqe={class:"fcom_select_photo",style:{float:"left"}},mqe=["src","alt"],gqe=["innerHTML"];function vqe(t,e,n,i,s,o){const r=on,a=Jt,l=W("Plus"),c=be,u=We,d=ft,h=en,f=sn,p=No,m=Ea,y=xt("loading");return v(),D(m,{"modal-class":"fcom_common_dialog",class:"fcom_high_drawer",size:t.drawerWidth,modelValue:o.addPaywallModal,"onUpdate:modelValue":e[6]||(e[6]=b=>o.addPaywallModal=b),"close-on-click-modal":!1,visible:o.addPaywallModal,direction:"rtl"},{header:w(()=>[g("h4",null,S(t.$t("Add Paywall")),1)]),default:w(()=>[_(f,{onSubmit:e[5]||(e[5]=Ae(b=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(h,null,{default:w(()=>[g("div",fqe,[De((v(),D(a,{style:{width:"100%"},"fit-input-width":"",modelValue:s.productID,"onUpdate:modelValue":e[0]||(e[0]=b=>s.productID=b),filterable:"",clearable:"",remote:"",loading:s.fetchingProducts,"remote-method":o.searchProducts,placeholder:t.$t("Search Product")},{default:w(()=>[(v(!0),A(ee,null,Ce(s.products,b=>(v(),D(r,{key:b.id,label:b.title,value:b.id,disabled:o.isProductAdded(b.id),class:"fcom_with_photo_option"},{default:w(()=>[g("span",pqe,[g("img",{src:b.image,alt:b.title},null,8,mqe),g("span",null,S(b.title),1)]),g("span",{style:{float:"right",color:"#8492a6","font-size":"13px"},innerHTML:b.price},null,8,gqe)]),_:2},1032,["label","value","disabled"]))),128))]),_:1},8,["modelValue","loading","remote-method","placeholder"])),[[y,s.fetchingProducts]]),_(p,{ref:"creating_product_ref",onShow:o.initCreateProduct,placement:"bottom",width:400,trigger:"click"},{reference:w(()=>[_(u,{class:"fcom_secondary_button"},{default:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1}),g("span",null,S(t.$t("New")),1)]),_:1})]),default:w(()=>[_(f,{modelValue:s.newPaywall,"onUpdate:modelValue":e[4]||(e[4]=b=>s.newPaywall=b),"label-position":"top"},{default:w(()=>[_(h,{label:t.$t("Title")},{default:w(()=>[_(d,{modelValue:s.newPaywall.title,"onUpdate:modelValue":e[1]||(e[1]=b=>s.newPaywall.title=b),placeholder:t.$t("Title of the product")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(h,{label:t.$t("Price")},{default:w(()=>[_(d,{modelValue:s.newPaywall.price,"onUpdate:modelValue":e[2]||(e[2]=b=>s.newPaywall.price=b),type:"number",placeholder:t.$t("Price of the product"),min:0},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(h,null,{default:w(()=>[_(u,{class:"fcom_primary_button",onClick:e[3]||(e[3]=b=>o.createProduct()),loading:s.creatingProduct,disabled:s.creatingProduct},{default:w(()=>[B(S(t.$t("Create")),1)]),_:1},8,["loading","disabled"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["onShow"])])]),_:1}),_(h,null,{default:w(()=>[_(u,{class:"fcom_primary_button",loading:s.saving,onClick:o.addPaywall},{default:w(()=>[B(S(t.$t("Add")),1)]),_:1},8,["loading","onClick"])]),_:1})]),_:1})]),_:1},8,["size","modelValue","visible"])}const _qe=de(hqe,[["render",vqe]]),yqe={name:"ManagePaywalls",components:{ImagePlaceholder:sS,AddPaywallModal:_qe},props:["spaceProfile","savingCount"],emits:["close"],data(){return{paywalls:[],loading:!1,removing:!1,addPaywallModal:!1,removePaywallModal:!1,revokeAccess:!1,removePaywall:null,installing:!1,hasFluentCart:this.hasFeature("has_fluentcart")}},computed:{spaceType(){return this.spaceProfile.type=="course"?this.$t("courses"):this.$t("spaces")}},methods:{copyCheckoutUrl(t){this.$toClipboard(t,this.$t("Checkout URL copied to clipboard"))},initRemovePaywall(t){this.$nextTick(()=>{this.removePaywallModal=!0,this.removePaywall=t})},initAddPaywall(){this.$nextTick(()=>{this.addPaywallModal=!0})},resetPaywall(){var e;const t=((e=this.spaceProfile.settings)==null?void 0:e.cart_product_ids)||[];t.splice(t.indexOf(this.removePaywall.ID),1),this.spaceProfile.settings.cart_product_ids=t,this.removePaywall=null,this.revokeAccess=!1,this.getPaywalls()},paywallAdded(t){var n;const e=((n=this.spaceProfile.settings)==null?void 0:n.cart_product_ids)||[];e.includes(t)||e.push(t),this.spaceProfile.settings.cart_product_ids=e,this.getPaywalls()},getPaywalls(){this.loading=!0,this.$get("cart/spaces/"+this.spaceProfile.id+"/paywalls",{space_id:this.spaceProfile.id}).then(t=>{this.paywalls=t.paywalls}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},deletePaywall(){this.removing=!0,this.$del("cart/spaces/"+this.spaceProfile.id+"/paywalls",{cart_product_id:this.removePaywall.ID,revoke_access:this.revokeAccess}).then(t=>{this.$notify.success(t.message),this.removePaywallModal=!1,this.resetPaywall()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.removing=!1})},installPlugin(){this.installing=!0,this.$post("settings/install_plugin",{plugin:"fluent-cart"}).then(t=>{t.is_installed?this.$notify.success(t.message):this.$handleError(this.$t("Sorry, FluentCart could not be installed")),this.hasFluentCart=!0,this.getPaywalls()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.installing=!1})}},mounted(){var e;(((e=this.spaceProfile.settings)==null?void 0:e.cart_product_ids)||[])&&this.hasFluentCart&&this.getPaywalls()}},bqe={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},wqe={class:"fcom_card_sections"},kqe={class:"fcom_card_section_heading"},Cqe={class:"fcom_section_primary_item_title"},xqe={class:"fcom_heading_item"},Sqe={key:0,class:"fcom_section_item_actions"},$qe={class:"fcom_section_primary"},Aqe={class:"fcom_section_primary_item"},Eqe={class:"fcom_section_primary_item_title"},Mqe={class:"fcom_heading_item"},Tqe={class:"fcom_shape"},Pqe={class:"fcom_section_item_actions"},Iqe=["href"],Lqe=["href"],Oqe={class:"fcom_section_items"},Dqe={class:"fcom_section_item_title"},Rqe={class:"fcom_heading_item"},Vqe={class:"fcom_shape"},Fqe={class:"fcom_section_item_actions"},Nqe=["innerHTML"],Bqe={key:2,style:{padding:"1rem"}},zqe={key:1,class:"fcom_section_item"},Hqe={class:"fcom_section_primary"},Uqe={class:"fcom_section_primary_item"},jqe=["disabled"],Wqe={class:"dialog_header"},Yqe={class:"dialog_left"},qqe={class:"dialog_body"},Gqe={style:{"text-align":"center"}},Xqe={class:"fcom_heading_item",style:{"justify-content":"center"}},Kqe={class:"fcom_shape"},Zqe={style:{margin:"1rem 0px 0.8rem"}},Jqe={class:"dialog_footer"};function Qqe(t,e,n,i,s,o){const r=We,a=Wt,l=L4,c=W("MoreFilled"),u=be,d=Wr,h=Yr,f=jr,p=W("ImagePlaceholder"),m=Ai,y=Aa,b=W("AddPaywallModal"),k=Gt,C=Ss,$=xt("loading");return v(),A(ee,null,[_(y,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(m,null,{default:w(()=>[g("div",bqe,[g("div",wqe,[g("div",kqe,[g("div",Cqe,[g("div",xqe,[le(t.$slots,"title",{},()=>[g("h4",null,S(t.$t("Manage Paywalls")),1)])])]),s.hasFluentCart?(v(),A("div",Sqe,[_(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=x=>o.initAddPaywall())},{default:w(()=>[B(S(t.$t("Add Paywall")),1)]),_:1})])):O("",!0)]),s.hasFluentCart?(v(),A(ee,{key:0},[s.loading||s.removing?(v(),D(a,{key:0,class:"white_loaded",rows:5,animated:!0})):s.paywalls.length?(v(!0),A(ee,{key:1},Ce(s.paywalls,x=>(v(),A("div",{class:"fcom_section_item",key:x.ID},[g("div",$qe,[g("div",Aqe,[g("div",Eqe,[g("h4",Mqe,[g("span",Tqe,[_(l,{src:x==null?void 0:x.thumbnail},null,8,["src"])]),g("span",null,S((x==null?void 0:x.post_title)||""),1)])]),g("div",Pqe,[_(f,{trigger:"click","popper-class":"fcom_pop_action"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,null,{default:w(()=>[g("a",{href:x==null?void 0:x.view_url,target:"_blank",rel:"noopener"},S(t.$t("View Product")),9,Iqe)]),_:2},1024),_(d,null,{default:w(()=>[g("a",{href:x==null?void 0:x.admin_url,target:"_blank",rel:"noopener"},S(t.$t("Edit Product")),9,Lqe)]),_:2},1024),_(d,{type:"danger",onClick:M=>o.initRemovePaywall(x)},{default:w(()=>[B(S(t.$t("Delete Paywall")),1)]),_:2},1032,["onClick"])]),_:2},1024)]),default:w(()=>[_(r,{"aria-label":t.$t("View actions"),size:"small",class:"fcom_dot_menu",text:""},{default:w(()=>[_(u,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["aria-label"])]),_:2},1024)])]),g("div",Oqe,[(v(!0),A(ee,null,Ce(x.variants,M=>(v(),A("div",{class:"fcom_section_item",key:M.id},[g("div",Dqe,[g("div",Rqe,[g("span",Vqe,[M.photo?(v(),D(l,{key:0,src:M.photo},null,8,["src"])):(v(),D(l,{key:1},{default:w(()=>[_(p)]),_:1}))]),g("span",null,S(M.variation_title),1)])]),g("div",Fqe,[g("span",{class:"fcom_price",innerHTML:M.total_price},null,8,Nqe),_(f,{trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{onClick:P=>o.copyCheckoutUrl(M.checkout_url)},{default:w(()=>[B(S(t.$t("Copy Checkout URL")),1)]),_:2},1032,["onClick"])]),_:2},1024)]),default:w(()=>[_(r,{"aria-label":t.$t("View actions"),size:"small",class:"fcom_dot_menu",text:"",style:{padding:"0 6px"}},{default:w(()=>[_(u,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["aria-label"])]),_:2},1024)])]))),128))])])]))),128)):(v(),A("div",Bqe,[g("p",null,S(t.$t("No paywall has been added yet")),1)]))],64)):(v(),A("div",zqe,[g("div",Hqe,[g("div",Uqe,[g("span",null,[B(S(t.$t("To monetize your ")+o.spaceType+", ")+" ",1),De((v(),A("a",{disabled:s.installing,onClick:e[1]||(e[1]=(...x)=>o.installPlugin&&o.installPlugin(...x)),class:"fcom_link"},[B(S(t.$t("click here")),1)],8,jqe)),[[$,s.installing]]),B(" "+S(t.$t("to install and activate FluentCart.")),1)])])])]))])])]),_:3})]),_:3}),s.addPaywallModal?(v(),D(b,{key:0,modelValue:s.addPaywallModal,"onUpdate:modelValue":e[2]||(e[2]=x=>s.addPaywallModal=x),spaceProfile:n.spaceProfile,onAdded:o.paywallAdded},null,8,["modelValue","spaceProfile","onAdded"])):O("",!0),_(C,{"modal-class":"fcom_common_dialog","close-on-click-modal":!1,"append-to-body":!0,width:t.drawerWidth,modelValue:s.removePaywallModal,"onUpdate:modelValue":e[5]||(e[5]=x=>s.removePaywallModal=x),direction:"rtl",onClose:e[6]||(e[6]=x=>s.removePaywallModal=!1)},{header:w(()=>[g("div",Wqe,[g("div",Yqe,[g("h4",null,S(t.$t("Delete Paywall")),1)])])]),footer:w(()=>[g("div",Jqe,[_(r,{class:"fcom_primary_button",disabled:s.removing,onClick:o.deletePaywall},{default:w(()=>[B(S(t.$t("Delete")),1)]),_:1},8,["disabled","onClick"]),_(r,{class:"fcom_secondary_button",onClick:e[4]||(e[4]=x=>s.removePaywallModal=!1)},{default:w(()=>[B(S(t.$t("Cancel")),1)]),_:1})])]),default:w(()=>{var x,M;return[g("div",qqe,[g("div",Gqe,[g("h4",Xqe,[g("span",Kqe,[_(l,{src:(x=s.removePaywall)==null?void 0:x.thumbnail},null,8,["src"])]),g("span",null,S((M=s.removePaywall)==null?void 0:M.post_title),1)]),g("p",Zqe,S(t.$t("Are you sure you want to delete this paywall? This action cannot be undone.")),1),_(k,{class:"fcom_checkbox",modelValue:s.revokeAccess,"onUpdate:modelValue":e[3]||(e[3]=P=>s.revokeAccess=P),"true-value":"yes","false-value":"no"},{default:w(()=>[B(S(t.$t("Also remove the this space from the product integration?")),1)]),_:1},8,["modelValue"])])])]}),_:1},8,["width","modelValue"])],64)}const PH=de(yqe,[["render",Qqe]]),eGe={name:"CourseWelcomeBannerConfig",props:["course","savingCount","hasPro"],emits:["saved"],components:{MediaEmbeder:q1,BgImageUpload:Z1,CrepeEditor:Zc},data(){return{saving:!1,loading:!1,loadFailed:!1,currentTab:"enrolled",appReady:!1,bannerData:{enrolled:{enabled:"no",mediaType:"image",title:"",description:"",allowClose:"no",bannerImage:"",ctaButtons:[],bannerVideo:{}},not_enrolled:{enabled:"no",mediaType:"image",title:"",description:"",bannerImage:"",ctaButtons:[],bannerVideo:{}}}}},watch:{savingCount(){!this.hasPro||this.loadFailed||this.saveSettings()}},computed:{isEnabled(){return this.bannerData[this.currentTab].enabled=="yes"}},methods:{switchOption(t){this.appReady=!1,this.currentTab=t,this.$nextTick(()=>{this.appReady=!0})},addButton(){this.bannerData[this.currentTab].ctaButtons.push({label:"",link:"",type:"primary",newTab:"yes"})},removeButton(t){this.bannerData[this.currentTab].ctaButtons.splice(t,1)},getSettings(){this.loading=!0,this.loadFailed=!1,this.$get("admin/courses/"+this.course.id+"/welcome-banner").then(t=>{this.bannerData=t.settings,this.appReady=!0}).catch(t=>{this.loadFailed=!0,this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){this.saving=!0,this.$post("admin/courses/"+this.course.id+"/welcome-banner",{settings:this.bannerData}).then(t=>{this.$notify.success(t.message),this.$emit("saved"),this.Storage.remove("fcom_course_welcome_banner_closed_"+this.course.id+"_enrolled"),this.Storage.remove("fcom_course_welcome_banner_closed_"+this.course.id+"_not_enrolled")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.hasPro&&this.getSettings()}},tGe={class:"fcom_customizer_container"},nGe={class:"fcom_wc_banner_header"},sGe={class:"fcom_wc_banner_options"},iGe={class:"fcom_filter_menu"},oGe={class:"fcom_filter_menu_ul"},rGe={key:0,class:"fcom_wc_banner_load_error"},aGe={key:1,class:"fcom_wc_banner_content"},lGe={class:"fcom_wc_banner_content_header"},cGe={class:"fcom_wc_banner_media_type"},uGe={key:0,class:"fcom_banner_image_holder"},dGe={key:1,class:"fcom_banner_image_preview"},hGe={key:0,class:"fcom_wc_banner_cta_buttons"},fGe={class:"fcom_course_wc_help_text"},pGe={class:"fcom_wc_banner_content_footer"},mGe={key:1,class:"fcom_upgrade_banner"},gGe={class:"fcom_upgrade_description"},vGe=["href"];function _Ge(t,e,n,i,s,o){const r=We,a=Uc,l=Mi,c=xs,u=W("BgImageUpload"),d=Fo,h=W("CloseBold"),f=be,p=W("media-embeder"),m=ft,y=en,b=W("crepe-editor"),k=on,C=Jt,$=K4,x=Gt,M=sn,P=Wt;return v(),A("div",tGe,[g("div",nGe,[g("h4",null,S(t.$t("Welcome Banner")),1)]),g("div",sGe,[g("div",iGe,[g("ul",oGe,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Ae(T=>o.switchOption("enrolled"),["prevent"])),class:G({"router-link-exact-active":s.currentTab=="enrolled"}),href:"#"},S(t.$t("Enrolled")),3)]),g("li",null,[g("a",{onClick:e[1]||(e[1]=Ae(T=>o.switchOption("not_enrolled"),["prevent"])),class:G({"router-link-exact-active":s.currentTab=="not_enrolled"}),href:"#"},S(t.$t("Not Enrolled")),3)])])])]),s.loadFailed?(v(),A("div",rGe,[g("p",null,S(t.$t("Unable to load welcome banner settings. Please try again.")),1),_(r,{class:"fcom_primary_button",onClick:o.getSettings},{default:w(()=>[B(S(t.$t("Retry")),1)]),_:1},8,["onClick"])])):s.loading?(v(),D(P,{key:2,rows:5})):(v(),A("div",aGe,[g("div",lGe,[g("h4",null,S(s.currentTab==="enrolled"?t.$t("Enable for enrolled members"):t.$t("Enable for not enrolled visitors")),1),_(a,{modelValue:s.bannerData[s.currentTab].enabled,"onUpdate:modelValue":e[2]||(e[2]=T=>s.bannerData[s.currentTab].enabled=T),"active-value":"yes","inactive-value":"no",class:"fcom_switch"},null,8,["modelValue"])]),g("div",{class:G(["fcom_wc_banner_content_body",{fcom_wc_disabled:!o.isEnabled}])},[g("div",cGe,[g("p",null,S(t.$t("Media type")),1),_(c,{modelValue:s.bannerData[s.currentTab].mediaType,"onUpdate:modelValue":e[3]||(e[3]=T=>s.bannerData[s.currentTab].mediaType=T),class:"fcom_radio_group"},{default:w(()=>[_(l,{label:t.$t("Image"),value:"image"},null,8,["label"]),_(l,{label:t.$t("Video"),value:"video"},null,8,["label"])]),_:1},8,["modelValue"])]),s.bannerData[s.currentTab].mediaType==="image"?(v(),A(ee,{key:0},[s.bannerData[s.currentTab].bannerImage?(v(),A("div",dGe,[_(d,{alt:t.$t("Image Preview"),src:s.bannerData[s.currentTab].bannerImage},null,8,["alt","src"]),_(r,{class:"fcom_secondary_button",text:"",onClick:e[5]||(e[5]=T=>s.bannerData[s.currentTab].bannerImage="")},{default:w(()=>[_(f,null,{default:w(()=>[_(h)]),_:1})]),_:1})])):(v(),A("div",uGe,[g("h4",null,S(t.$t("Featured Image")),1),g("p",null,S(t.$t("Set a featured image at the top of the welcome banner. Recommended image dimension: 1680x600")),1),_(u,{modelValue:s.bannerData[s.currentTab].bannerImage,"onUpdate:modelValue":e[4]||(e[4]=T=>s.bannerData[s.currentTab].bannerImage=T)},null,8,["modelValue"])]))],64)):O("",!0),s.bannerData[s.currentTab].mediaType==="video"?(v(),D(p,{key:1,media:s.bannerData[s.currentTab].bannerVideo},null,8,["media"])):O("",!0),_(M,{onSubmit:Ae(t.doNothing,["prevent"]),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(y,{label:t.$t("Title")},{default:w(()=>[_(m,{modelValue:s.bannerData[s.currentTab].title,"onUpdate:modelValue":e[6]||(e[6]=T=>s.bannerData[s.currentTab].title=T)},null,8,["modelValue"])]),_:1},8,["label"]),_(y,{label:t.$t("Description")},{default:w(()=>[s.appReady?(v(),D(b,{key:0,modelValue:s.bannerData[s.currentTab].description,"onUpdate:modelValue":e[7]||(e[7]=T=>s.bannerData[s.currentTab].description=T)},null,8,["modelValue"])):O("",!0)]),_:1},8,["label"]),_(y,{label:t.$t("Call to Action")},{default:w(()=>{var T;return[((T=s.bannerData[s.currentTab].ctaButtons)==null?void 0:T.length)>0?(v(),A("div",hGe,[(v(!0),A(ee,null,Ce(s.bannerData[s.currentTab].ctaButtons,(I,L)=>(v(),A("div",{key:L,class:"fcom_wc_banner_cta_button"},[_(y,{label:L?"":t.$t("Button Label")},{default:w(()=>[_(m,{modelValue:I.label,"onUpdate:modelValue":R=>I.label=R},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),_(y,{label:L?"":t.$t("Button Link")},{default:w(()=>[_(m,{modelValue:I.link,"onUpdate:modelValue":R=>I.link=R},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),_(y,{label:L?"":t.$t("Button Type"),class:"fcom_wc_banner_select"},{default:w(()=>[_(C,{modelValue:I.type,"onUpdate:modelValue":R=>I.type=R,class:"fcom_select",placeholder:t.$t("Select type")},{default:w(()=>[_(k,{label:t.$t("Primary"),value:"primary"},null,8,["label"]),_(k,{label:t.$t("Secondary"),value:"secondary"},null,8,["label"]),_(k,{label:t.$t("Text"),value:"text"},null,8,["label"]),_(k,{label:t.$t("Link"),value:"link"},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"])]),_:2},1032,["label"]),_(y,{label:L?"":t.$t("Open in new tab"),class:"fcom_wc_banner_select"},{default:w(()=>[_(C,{modelValue:I.newTab,"onUpdate:modelValue":R=>I.newTab=R,class:"fcom_select"},{default:w(()=>[_(k,{label:t.$t("Yes"),value:"yes"},null,8,["label"]),_(k,{label:t.$t("No"),value:"no"},null,8,["label"])]),_:2},1032,["modelValue","onUpdate:modelValue"])]),_:2},1032,["label"]),_(r,{text:"",class:"wc_button_remove",onClick:R=>o.removeButton(L)},{default:w(()=>[_(f,null,{default:w(()=>[_(h)]),_:1})]),_:2},1032,["onClick"])]))),128)),_($,{underline:!1,onClick:o.addButton},{default:w(()=>[B(S("+ "+t.$t("Add button")),1)]),_:1},8,["onClick"])])):(v(),D($,{key:1,underline:!1,onClick:o.addButton},{default:w(()=>[B(S("+ "+t.$t("Add button")),1)]),_:1},8,["onClick"]))]}),_:1},8,["label"]),s.currentTab=="enrolled"?(v(),D(y,{key:0,class:"fcom_course_wc_allowclose"},{default:w(()=>[_(x,{modelValue:s.bannerData[s.currentTab].allowClose,"onUpdate:modelValue":e[8]||(e[8]=T=>s.bannerData[s.currentTab].allowClose=T),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Allow members to close the welcome banner")),1)]),_:1},8,["modelValue"]),g("div",fGe,S(t.$t("If allowed, members will be able to hide the banner")),1)]),_:1})):O("",!0)]),_:1},8,["onSubmit"])],2),g("div",pGe,[n.hasPro?(v(),D(r,{key:0,class:"fcom_primary_button",disabled:s.saving,loading:s.saving,onClick:o.saveSettings},{default:w(()=>[B(S(t.$t("Update Info")),1)]),_:1},8,["disabled","loading","onClick"])):(v(),A("div",mGe,[g("p",gGe,S(t.$t("Please upgrade to Pro to use this feature")),1),g("a",{class:"el-button",href:t.$upgradeUrl("feature_lock_course_welcome_banner"),target:"_blank"},S(t.$t("Upgrade to Pro")),9,vGe)]))])]))])}const yGe=de(eGe,[["render",_Ge]]),bGe={name:"CourseCustomizer",props:["course"],emits:["close","completed"],components:{ManageSpaceLinks:TH,CourseLockscreen:DYe,CreateCourseForm:K5,ManagePaywalls:PH,CourseWelcomeBannerConfig:yGe},data(){return{saving:!1,currentTab:"general",savingCount:0,hasPro:window.fluentComAdmin.pro}},methods:{saveChanges(){if(!this.hasPro&&(this.currentTab=="lock_screen"||this.currentTab=="welcome_banner")){this.$notify({title:this.$t("Pro Required"),message:this.$t("This feature is only available in the pro version."),type:"error"});return}this.savingCount=this.savingCount+1}},mounted(){this.$router.push({query:{...this.$route.query,customize_course:1}})},unmounted(){const t={...this.$route.query};delete t.customize_course,this.$router.push({query:t})}},wGe={key:0,class:"fcom_full_editor"},kGe={class:"fcom_full_editor_header"},CGe=["aria-label"],xGe={class:"fcom_editor_menu object_menu"},SGe={class:"fcom_space_menu_ul"},$Ge={class:"full_editor_actions"},AGe={style:{"max-width":"800px",margin:"0 auto"}},EGe={class:"fcom_course_welcome_banner_wrap"};function MGe(t,e,n,i,s,o){const r=W("ArrowLeft"),a=be,l=We,c=S1,u=W("create-course-form"),d=Ai,h=Aa,f=W("course-lockscreen"),p=W("manage-space-links"),m=W("manage-paywalls"),y=W("course-welcome-banner-config"),b=C1,k=xt("loading");return n.course.id?(v(),A("div",wGe,[_(b,null,{default:w(()=>[_(c,{class:"fcom_full_editor_header_wrap"},{default:w(()=>{var C;return[g("div",kGe,[g("button",{type:"button",onClick:e[0]||(e[0]=$=>t.$emit("completed")),class:"fcom_back_header","aria-label":t.$t("Back to %s",n.course.title)},[_(a,null,{default:w(()=>[_(r)]),_:1}),B(" "+S(n.course.title),1)],8,CGe),g("div",xGe,[g("ul",SGe,[g("li",{onClick:e[1]||(e[1]=$=>s.currentTab="general")},[g("a",{class:G({"router-link-exact-active":s.currentTab==="general"}),href:"#"},S(t.$t("General Settings")),3)]),g("li",{onClick:e[2]||(e[2]=$=>s.currentTab="paywalls")},[g("a",{class:G({"router-link-exact-active":s.currentTab==="paywalls"}),href:"#"},S(t.$t("Paywalls")),3)]),n.course.privacy=="private"&&((C=n.course.settings)==null?void 0:C.custom_lock_screen)=="yes"?(v(),A("li",{key:0,onClick:e[3]||(e[3]=$=>s.currentTab="lock_screen")},[g("a",{class:G({"router-link-exact-active":s.currentTab==="lock_screen"}),href:"#"},S(t.$t("Lock Screen")),3)])):O("",!0),g("li",{onClick:e[4]||(e[4]=$=>s.currentTab="welcome_banner")},[g("a",{class:G({"router-link-exact-active":s.currentTab==="welcome_banner"}),href:"#"},S(t.$t("Welcome Banner")),3)]),g("li",{onClick:e[5]||(e[5]=$=>s.currentTab="manage_links")},[g("a",{class:G({"router-link-exact-active":s.currentTab==="manage_links"}),href:"#"},S(t.$t("Course Links")),3)])])]),g("div",$Ge,[De((v(),D(l,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveChanges,bg:""},{default:w(()=>[B(S(!s.hasPro&&(s.currentTab=="lock_screen"||s.currentTab=="welcome_banner")?t.$t("Save Changes (Pro Required)"):t.$t("Save Changes")),1)]),_:1},8,["disabled","onClick"])),[[k,s.saving]]),_(l,{"aria-label":t.$t("Close"),onClick:e[6]||(e[6]=$=>t.$emit("completed")),text:""},{default:w(()=>[B(" X ")]),_:1},8,["aria-label"])])])]}),_:1}),_(b,{class:"fcom_full_editor_container editor_customizer_container"},{default:w(()=>[s.currentTab=="general"?(v(),D(h,{key:0,class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(d,null,{default:w(()=>[g("div",AGe,[_(u,{savingCount:s.savingCount,course:n.course},null,8,["savingCount","course"])])]),_:1})]),_:1})):s.currentTab=="lock_screen"?(v(),D(f,{key:1,savingCount:s.savingCount,spaceProfile:n.course,onClose:e[7]||(e[7]=C=>t.$emit("close"))},null,8,["savingCount","spaceProfile"])):s.currentTab=="manage_links"?(v(),D(p,{key:2,savingCount:s.savingCount,onClose:e[8]||(e[8]=C=>t.$emit("close")),spaceProfile:n.course},null,8,["savingCount","spaceProfile"])):s.currentTab=="paywalls"?(v(),D(m,{key:3,savingCount:s.savingCount,onClose:e[9]||(e[9]=C=>t.$emit("close")),spaceProfile:n.course},null,8,["savingCount","spaceProfile"])):s.currentTab=="welcome_banner"?(v(),D(h,{key:4,class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(d,null,{default:w(()=>[g("div",EGe,[_(y,{course:n.course,savingCount:s.savingCount,hasPro:s.hasPro},null,8,["course","savingCount","hasPro"])])]),_:1})]),_:1})):O("",!0)]),_:1})]),_:1})])):O("",!0)}const IH=de(bGe,[["render",MGe]]),TGe={name:"EditCourseRoute",components:{CourseCustomizer:IH,AppLayout:pi,Layout:fi},props:["course_id"],data(){return{course:{},loading:!0,menuItems:[{name:"course_overview",route:"course_overview",title:this.$t("Overview")},{name:"lessons",route:"edit_lessons",title:this.$t("Lessons")},{name:"students",route:"course_students",title:this.$t("Students")}],customizeCourse:!1}},computed:{computedMenuItems(){var e;const t=[...this.menuItems];return(e=this.course)!=null&&e.quiz_count&&t.push({name:"quiz-results",route:"quiz_results",title:this.$t("Quiz Results")}),t}},methods:{fetchCourse(){this.loading=!0,this.$get("admin/courses/"+this.course_id).then(t=>{this.course=t.course}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},initDeleteCourse(){this.$refs.course_actions.hide(),this.$confirm(this.$t("Are you sure you want to delete this course?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete the course"),cancelButtonText:this.$t("No"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.$promt(this.$t("Please Type %s to confirm. Please note, all the lessons, topics, students progress will be deleted.",'"DELETE"'),this.$t("Delete Course"),{confirmButtonText:this.$t("Confirm Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button"}).then(t=>{t.value==="DELETE"?this.deleteCourse():this.$notify.error(this.$t("The verification string does not match"))})})},initDuplicateCourse(){this.$refs.course_actions.hide(),this.$confirm(this.$t("Are you sure you want to duplicate this course?"),this.$t("Confirm"),{confirmButtonText:this.$t("Yes, Duplicate the course"),cancelButtonText:this.$t("No"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"info"}).then(()=>{this.duplicateCourse()})},duplicateCourse(){this.loading=!0,this.$post("admin/courses/"+this.course.id+"/duplicate").then(t=>{this.$notify.success(t.message),t.course&&this.$router.push({name:"course_overview",params:{course_id:t.course.id}}).then(()=>{window.location.reload()}),this.loading=!1}).catch(t=>{this.$handleError(t),this.loading=!1})},deleteCourse(){this.loading=!0,this.$del("admin/courses/"+this.course.id).then(t=>{this.$notify.success(t.message),this.$router.push({name:"manage_courses"})}).catch(t=>{this.$handleError(t),this.loading=!1})},toViewCourse(){let t=this.$getRouteLink("course/:course_slug/lessons",{course_slug:this.course.slug});window.location.href=t}},mounted(){this.fetchCourse(),this.$route.query.customize_course&&(this.customizeCourse=!0)}},PGe={class:"object_menu"},IGe={class:"fcom_space_menu_ul"},LGe={key:0},OGe={class:"actions_items"},DGe={key:0,class:"white_loaded"},RGe={key:2},VGe={key:0};function FGe(t,e,n,i,s,o){const r=ace,a=rce,l=W("router-link"),c=W("MoreFilled"),u=be,d=We,h=No,f=Wt,p=W("router-view"),m=W("layout"),y=W("app-layout"),b=W("course-customizer");return v(),A(ee,null,[_(y,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:w(()=>[_(m,{wrapper_class:"no_bg_layout",title:t.$t("Courses")},{title:w(()=>[_(a,null,{default:w(()=>[_(r,{to:{name:"manage_courses"}},{default:w(()=>[B(S(t.$t("Courses")),1)]),_:1}),s.course.id?(v(),D(r,{key:0},{default:w(()=>[B(S(s.course.title)+" ",1),t.hasCourseCreatorAccess()?(v(),A("span",{key:0,class:"fcom_edit_course fcom_secondary_button clickable",onClick:e[0]||(e[0]=k=>{s.customizeCourse=!0})},S(t.$t("Edit Info")),1)):O("",!0)]),_:1})):O("",!0)]),_:1})]),actions:w(()=>[g("div",PGe,[g("ul",IGe,[(v(!0),A(ee,null,Ce(o.computedMenuItems,k=>(v(),A("li",{key:k.name,class:G("course_inner_menu_"+k.name)},[_(l,{to:{name:k.route,params:{course_id:s.course.id}}},{default:w(()=>[B(S(k.title),1)]),_:2},1032,["to"])],2))),128)),t.hasCourseCreatorAccess()?(v(),A("li",LGe,[_(h,{placement:"bottom",ref:"course_actions",persistent:!1,width:200,trigger:"click"},{reference:w(()=>[_(d,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[_(u,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["aria-label"])]),default:w(()=>[g("ul",OGe,[g("li",{onClick:e[1]||(e[1]=k=>o.toViewCourse())},S(t.$t("View Course")),1),g("li",{onClick:e[2]||(e[2]=()=>{t.$refs.course_actions.hide(),s.customizeCourse=!0})},S(t.$t("Edit Course")),1),g("li",{onClick:e[3]||(e[3]=(...k)=>o.initDuplicateCourse&&o.initDuplicateCourse(...k))},S(t.$t("Duplicate Course")),1),g("li",{onClick:e[4]||(e[4]=(...k)=>o.initDeleteCourse&&o.initDeleteCourse(...k))},S(t.$t("Delete Course")),1)])]),_:1},512)])):O("",!0)])])]),default:w(()=>[s.loading?(v(),A("div",DGe,[_(f,{loading:s.loading,animation:"pulse",row:"10"},null,8,["loading"])])):s.course.id?(v(),D(p,{key:1,course:s.course},null,8,["course"])):(v(),A("div",RGe,[g("h3",null,S(t.$t("Sorry, the course cannot be loaded")),1)]))]),_:1},8,["title"])]),_:1}),s.customizeCourse&&s.course.id?(v(),A("div",VGe,[(v(),D(Sa,{to:"body"},[_(b,{course:s.course,onClose:e[5]||(e[5]=k=>{s.customizeCourse=null,o.fetchCourse()}),onCompleted:e[6]||(e[6]=k=>{s.customizeCourse=null,o.fetchCourse()})},null,8,["course"])]))])):O("",!0)],64)}const NGe=de(TGe,[["render",FGe]]),BGe={name:"LengthInput",props:["modelValue"],data(){return{muinutes:0,seconds:0}},methods:{updateLength(){this.$emit("update:modelValue",parseInt(this.muinutes)*60+parseInt(this.seconds))}},mounted(){this.modelValue&&(this.muinutes=Math.floor(this.modelValue/60)||"",this.seconds=this.modelValue%60||"")}},zGe={class:"fcom_length_input"};function HGe(t,e,n,i,s,o){const r=ft;return v(),A("div",zGe,[_(r,{type:"number",modelValue:s.muinutes,"onUpdate:modelValue":e[0]||(e[0]=a=>s.muinutes=a),onChange:o.updateLength,min:0,max:1444,size:"small"},{append:w(()=>[B(S(t.$t("min")),1)]),_:1},8,["modelValue","onChange"]),_(r,{type:"number",modelValue:s.seconds,"onUpdate:modelValue":e[1]||(e[1]=a=>s.seconds=a),onChange:o.updateLength,min:0,max:59,size:"small"},{append:w(()=>[B(S(t.$t("sec")),1)]),_:1},8,["modelValue","onChange"])])}const UGe=de(BGe,[["render",HGe]]),jGe={name:"LessonDocuments",components:{DocumentLists:G1,DocumentsUploader:kH},props:["lesson"],methods:{fileAdded(t){this.lesson.meta.document_ids=this.lesson.meta.document_lists||[],this.lesson.meta.document_lists.push(t)}}},WGe={class:"fcom_meta_section fcom_lesson_documents_form"},YGe={class:"fcom_meta_label"},qGe={style:{"font-size":"90%",padding:"0px",margin:"0 0 15px","line-height":"120%"}},GGe={key:0,class:"fcom_lesson_documents_list"},XGe={key:1,class:"fcom_lesson_documents_list"};function KGe(t,e,n,i,s,o){const r=W("documents-uploader"),a=W("document-lists");return v(),A("div",WGe,[g("div",YGe,S(t.$t("Documents & Files")),1),g("p",qGe,S(t.$t("These files will be available to your students to view and download")),1),t.has_pro?(v(),A("div",GGe,[_(r,{style:{"margin-bottom":"20px",padding:"0"},showLists:!1,additional_data:{space_id:n.lesson.space_id,lesson_id:n.lesson.id},is_multiple:!0,onFileAdded:o.fileAdded},null,8,["additional_data","onFileAdded"]),_(a,{class:"fcom_boxed_documents",additional_data:{space_id:n.lesson.space_id,lesson_id:n.lesson.id},is_editable:!0,document_lists:n.lesson.meta.document_lists},null,8,["additional_data","document_lists"])])):(v(),A("div",XGe,[g("p",null,S(t.$t("You need to upgrade to Pro to upload documents")),1)]))])}const LH=de(jGe,[["render",KGe]]),ZGe={name:"CourseMeta",components:{LessonDocuments:LH,MediaEmbeder:q1,LengthInput:UGe,BgImageUpload:Z1},props:{lesson:{type:Object,required:!0},course:{type:Object,required:!0},quiz_meta:{type:Boolean,default:!1}},computed:{showCommentsDisabled(){return this.course.settings.disable_comments=="yes"},enablePassingScore(){var t;return((t=this.lesson.meta)==null?void 0:t.enable_passing_score)=="yes"},isFluentPlayerMedia(){var t,e;return((e=(t=this.lesson.meta)==null?void 0:t.media)==null?void 0:e.type)=="fluent_player"}}},JGe={class:"fcom_course_meta"},QGe={class:"fcom_meta_section"},eXe={class:"fcom_meta_label"},tXe={class:"fcom_meta_content"},nXe={key:2,class:"checkbox_with_tooltip"},sXe={key:0},iXe={key:1,class:"checkbox_with_tooltip"},oXe=g("br",null,null,-1),rXe={key:0,class:"fcom_meta_section"},aXe={key:0,class:"fcom_meta_content"},lXe={class:"fcom_meta_label"},cXe={class:"fcom_meta_content"},uXe={key:1,class:"fcom_meta_section"},dXe={class:"fcom_meta_label"},hXe={class:"fcom_edit_lesson_documents"};function fXe(t,e,n,i,s,o){var y;const r=Gt,a=W("InfoFilled"),l=be,c=Cs,u=ft,d=W("media-embeder"),h=W("length-input"),f=W("BgImageUpload"),p=en,m=W("LessonDocuments");return v(),A("div",JGe,[g("div",QGe,[g("div",eXe,S(t.$t("Features Settings")),1),g("div",tXe,[_(r,{modelValue:n.lesson.meta.enable_media,"onUpdate:modelValue":e[0]||(e[0]=b=>n.lesson.meta.enable_media=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Enable Video Embed")),1)]),_:1},8,["modelValue"]),o.showCommentsDisabled?(v(),D(r,{key:0,disabled:!0,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Comments are disabled for this course")),1)]),_:1})):(v(),D(r,{key:1,modelValue:n.lesson.meta.enable_comments,"onUpdate:modelValue":e[1]||(e[1]=b=>n.lesson.meta.enable_comments=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Enable Comments")),1)]),_:1},8,["modelValue"])),n.quiz_meta?O("",!0):(v(),A("div",nXe,[_(r,{modelValue:n.lesson.meta.free_preview_lesson,"onUpdate:modelValue":e[2]||(e[2]=b=>n.lesson.meta.free_preview_lesson=b),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Free Preview Lesson"))+" ",1),t.has_pro?O("",!0):(v(),A("span",sXe,"("+S(t.$t("Available on Pro"))+")",1))]),_:1},8,["modelValue","disabled"]),_(c,{class:"box-item",effect:"dark",placement:"right-end"},{content:w(()=>[B(S(t.$t("If enabled, public users can view this lesson without enrolling in the course.")),1)]),default:w(()=>[_(l,null,{default:w(()=>[_(a)]),_:1})]),_:1})])),n.quiz_meta?(v(),A(ee,{key:3},[_(r,{modelValue:n.lesson.meta.enable_passing_score,"onUpdate:modelValue":e[3]||(e[3]=b=>n.lesson.meta.enable_passing_score=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Set a passing grade")),1)]),_:1},8,["modelValue"]),o.enablePassingScore?(v(),D(u,{key:0,modelValue:n.lesson.meta.passing_score,"onUpdate:modelValue":e[4]||(e[4]=b=>n.lesson.meta.passing_score=b),min:10,max:100,step:1,type:"number",class:"fcom_input_number",placeholder:"80"},{append:w(()=>[B("%")]),_:1},8,["modelValue"])):O("",!0),o.enablePassingScore?(v(),A("div",iXe,[_(r,{modelValue:n.lesson.meta.enforce_passing_score,"onUpdate:modelValue":e[5]||(e[5]=b=>n.lesson.meta.enforce_passing_score=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Enforce pass to continue")),1)]),_:1},8,["modelValue"]),_(c,{class:"box-item",effect:"dark",placement:"right-end"},{content:w(()=>[B(S(t.$t("If enabled, members will have to achieve a minimum score before")),1),oXe,B(" "+S(t.$t("proceeding to the next lesson. They can re-take this quiz multiple times.")),1)]),default:w(()=>[_(l,null,{default:w(()=>[_(a)]),_:1})]),_:1})])):O("",!0),_(r,{modelValue:n.lesson.meta.hide_result,"onUpdate:modelValue":e[6]||(e[6]=b=>n.lesson.meta.hide_result=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Hide answers on result page")),1)]),_:1},8,["modelValue"])],64)):O("",!0)])]),((y=n.lesson.meta)==null?void 0:y.enable_media)=="yes"?(v(),A("div",rXe,[o.isFluentPlayerMedia?(v(),A("div",aXe,[g("p",null,S(t.$t("The feature video is managed by the FluentPlayer block in the lesson editor.")),1)])):(v(),D(d,{key:1,style:{margin:"0"},media:n.lesson.meta.media},null,8,["media"])),g("div",lXe,S(t.$t("Lesson Duration")),1),g("div",cXe,[_(h,{modelValue:n.lesson.meta.video_length,"onUpdate:modelValue":e[7]||(e[7]=b=>n.lesson.meta.video_length=b)},null,8,["modelValue"])])])):O("",!0),n.quiz_meta?(v(),A("div",uXe,[g("div",dXe,S(t.$t("Featured Image")),1),_(p,{class:"fcom_bg_image"},{default:w(()=>[_(f,{modelValue:n.lesson.meta.featured_image_id,"onUpdate:modelValue":e[8]||(e[8]=b=>n.lesson.meta.featured_image_id=b),can_remove:!0},null,8,["modelValue"])]),_:1})])):O("",!0),g("div",hXe,[_(m,{lesson:n.lesson},null,8,["lesson"])])])}const OH=de(ZGe,[["render",fXe]]),pXe={name:"LessonEditor",props:["lesson","section","course","editingIndex"],emits:["saved","close","changeLesson"],components:{LessonDocuments:LH,BlockEditor:$H,MediaEmbeder:q1,LessonMeta:OH,FullEditorFrame:AH},data(){return{saving:!1,showSideBar:!1,useClassic:!1,showDocumentsModal:!1}},computed:{previewUrl(){return this.$getRouteLink("course/:course_slug/lessons/:lesson_slug/view?preview=yes",{course_slug:this.course.slug,lesson_slug:this.lesson.slug})}},methods:{saveData(){this.saving=!0;const t={lesson:{id:this.lesson.id,parent_id:this.lesson.parent_id,space_id:this.lesson.space_id,title:this.lesson.title,message:this.lesson.message,meta:this.lesson.meta,status:this.lesson.status}};this.$put("admin/courses/"+this.lesson.space_id+"/lessons/"+this.lesson.id,t).then(e=>{this.$notify.success(e.message),this.$emit("saved",e.lesson),this.dispatchLessonSaveEvent(e.lesson,t)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},dispatchLessonSaveEvent(t,e){const n={lesson:t,lessonData:e};if(this.$refs.fullEditorFrame&&this.$refs.fullEditorFrame.editorFrame)try{if(this.$refs.fullEditorFrame.editorFrame.contentWindow){const i=new CustomEvent("fluentcommunity:lesson:after_save",{detail:n});this.$refs.fullEditorFrame.editorFrame.contentWindow.dispatchEvent(i);return}}catch(i){console.warn("Could not dispatch event to iframe:",i)}window.dispatchEvent(new CustomEvent("fluentcommunity:lesson:after_save",{detail:n}))},onDocumentsModalClosed(){this.$refs.fullEditorFrame&&this.$refs.fullEditorFrame.syncMetaToEditor(this.lesson.meta)},switchToClassic(){this.useClassic=!0,window.fcomFullEditorFailed=!0}},mounted(){window.fcomFullEditorFailed&&(this.useClassic=!0),document.body.classList.add("fcom-no-scroll")},beforeUnmount(){document.body.classList.remove("fcom-no-scroll")}},mXe={class:"fcom_full_editor"},gXe={class:"fcom_full_editor_header"},vXe=["aria-label"],_Xe={class:"fcom_desktop_only"},yXe={key:0},bXe={class:"full_editor_actions"},wXe={class:"fcom_lesson_camp"},kXe={class:"fcom_lesson_nav"},CXe=["title","href"],xXe={style:{padding:"20px"}},SXe={class:"fcom_lesson_content"},$Xe={key:0},AXe={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},EXe={class:"fcom_lesson_title"},MXe={class:"fcom_documents_dialog_footer"};function TXe(t,e,n,i,s,o){const r=W("ArrowLeft"),a=be,l=We,c=W("ArrowRight"),u=W("arrow-down"),d=Wr,h=Yr,f=jr,p=W("View"),m=S1,y=W("lesson-meta"),b=Ai,k=x1,C=ft,$=W("block-editor"),x=W("FullEditorFrame"),M=Aa,P=C1,T=W("LessonDocuments"),I=Ss,L=xt("loading");return v(),A("div",mXe,[_(P,null,{default:w(()=>[_(m,{class:"fcom_full_editor_header_wrap"},{default:w(()=>[g("div",gXe,[g("button",{type:"button",onClick:e[0]||(e[0]=R=>t.$emit("close")),class:"fcom_back_header","aria-label":t.$t("Back to Lessons")},[_(a,{class:"fcom_arrow_icon"},{default:w(()=>[_(r)]),_:1}),g("span",_Xe,S(t.$t("Back to Lessons")),1),n.course&&n.course.title?(v(),A("span",yXe,"("+S(n.course.title)+")",1)):O("",!0)],8,vXe),g("div",bXe,[g("div",wXe,[g("div",null,S(t.$t("Lesson %1$s of %2$s - %3$s",n.editingIndex+1,n.section.lessons.length,n.section.title)),1),g("div",kXe,[_(l,{onClick:e[1]||(e[1]=R=>t.$emit("changeLesson",n.editingIndex-1)),disabled:n.editingIndex===0,size:"small"},{default:w(()=>[_(a,{class:"fcom_arrow_icon"},{default:w(()=>[_(r)]),_:1})]),_:1},8,["disabled"]),_(l,{onClick:e[2]||(e[2]=R=>t.$emit("changeLesson",n.editingIndex+1)),disabled:n.editingIndex+1===n.section.lessons.length,size:"small"},{default:w(()=>[_(a,{class:"fcom_arrow_icon"},{default:w(()=>[_(c)]),_:1})]),_:1},8,["disabled"])])]),t.isMobile&&!s.showSideBar?(v(),D(l,{key:0,text:"",onClick:e[3]||(e[3]=R=>s.showSideBar=!s.showSideBar)},{default:w(()=>[g("span",null,S(t.$t("Features")),1)]),_:1})):O("",!0),_(f,{onCommand:e[4]||(e[4]=R=>{n.lesson.status=R}),trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"draft"},{default:w(()=>[B(S(t.$t("Draft")),1)]),_:1}),_(d,{command:"published"},{default:w(()=>[B(S(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[_(l,{type:n.lesson.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:w(()=>[B(S(t.$labelize(n.lesson.status))+" ",1),_(a,{class:"el-icon--right"},{default:w(()=>[_(u)]),_:1})]),_:1},8,["type"])]),_:1}),De((v(),D(l,{style:{"margin-left":"15px"},disabled:s.saving,onClick:o.saveData,class:"fcom_primary_button"},{default:w(()=>[B(S(t.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[L,s.saving]]),g("a",{title:t.$t("Preview Lesson"),class:"el-button el-button--text",target:"_blank",rel:"noopener",href:o.previewUrl},[_(a,null,{default:w(()=>[_(p)]),_:1})],8,CXe)])])]),_:1}),_(P,{class:"fcom_full_editor_container fcom_lesson_editor_full"},{default:w(()=>[s.useClassic?De((v(),D(k,{key:0,style:{padding:"0"},class:"fcom_full_editor_side",width:"300px"},{default:w(()=>[_(b,{height:"calc(100vh - 60px)"},{default:w(()=>[g("div",xXe,[_(y,{course:n.course,lesson:n.lesson},null,8,["course","lesson"]),t.isMobile?(v(),D(l,{key:0,size:"small",onClick:e[5]||(e[5]=R=>s.showSideBar=!1)},{default:w(()=>[_(a,{class:"fcom_arrow_icon"},{default:w(()=>[_(r)]),_:1}),g("span",null,S(t.$t("Close")),1)]),_:1})):O("",!0)])]),_:1})]),_:1},512)),[[Ut,s.showSideBar||!t.isMobile]]):O("",!0),_(M,{style:{overflow:"hidden",padding:"0"},class:"fcom_full_editor_main"},{default:w(()=>[O("",!0),g("div",SXe,[s.useClassic?(v(),A("div",$Xe,[_(b,{height:"calc(100vh - 60px)",class:"fcom_lesson_editor_scroll"},{default:w(()=>[g("div",AXe,[g("div",EXe,[g("label",null,S(t.$t("Lesson Title")),1),_(C,{type:"text",class:"fcom_input_h1",modelValue:n.lesson.title,"onUpdate:modelValue":e[7]||(e[7]=R=>n.lesson.title=R),size:"large",placeholder:t.$t("Lesson Title")},null,8,["modelValue","placeholder"])]),g("label",null,S(t.$t("Lesson Content")),1),_($,{modelValue:n.lesson.message,"onUpdate:modelValue":e[8]||(e[8]=R=>n.lesson.message=R)},null,8,["modelValue"])])]),_:1},8,["height"])])):(v(),D(x,{key:1,ref:"fullEditorFrame",onUseAlternateEditor:o.switchToClassic,editorParams:{context:"course_lesson",lesson_id:n.lesson.id},frameHeight:"calc(100vh - 60px)",documentTitle:n.lesson.title,metaSettings:n.lesson.meta,onTitleUpdated:e[9]||(e[9]=R=>{n.lesson.title=R}),onMetaUpdated:e[10]||(e[10]=R=>{n.lesson.meta=R}),featured_image_id:n.lesson.meta.featured_image_id||"",onFeaturedMediaUpdated:e[11]||(e[11]=R=>{n.lesson.meta.featured_image_id=R}),onManageDocuments:e[12]||(e[12]=R=>s.showDocumentsModal=!0),modelValue:n.lesson.message,"onUpdate:modelValue":e[13]||(e[13]=R=>n.lesson.message=R)},null,8,["onUseAlternateEditor","editorParams","frameHeight","documentTitle","metaSettings","featured_image_id","modelValue"]))])]),_:1})]),_:1})]),_:1}),_(I,{modelValue:s.showDocumentsModal,"onUpdate:modelValue":e[15]||(e[15]=R=>s.showDocumentsModal=R),title:t.$t("Documents & Files"),width:"600px","close-on-click-modal":!1,onClosed:o.onDocumentsModalClosed,class:"fcom_documents_dialog"},{footer:w(()=>[g("div",MXe,[_(l,{type:"primary",onClick:e[14]||(e[14]=R=>s.showDocumentsModal=!1)},{default:w(()=>[B(S(t.$t("Done")),1)]),_:1})])]),default:w(()=>[_(T,{lesson:n.lesson},null,8,["lesson"])]),_:1},8,["modelValue","title","onClosed"])])}const DH=de(pXe,[["render",TXe]]),PXe={name:"LessonLine",emits:["showEditor","updated","deleteLesson","moveLesson","duplicateLesson"],props:["course","sections","lesson"],components:{LessonEditor:DH,SlugInput:Rd},data(){return{editing_title:!1,editingSlugPopup:!1,showMoveLessonPopup:!1,selectedSectionId:null}},computed:{filteredSections(){return this.sections.filter(t=>t.id!=this.lesson.parent_id)},isQuizType(){var t;return((t=this.lesson)==null?void 0:t.content_type)==="quiz"},menuLabels(){return this.isQuizType?{preview:this.$t("Preview Quiz"),move:this.$t("Move Quiz"),duplicate:this.$t("Duplicate Quiz"),delete:this.$t("Delete Quiz")}:{preview:this.$t("Preview Lesson"),move:this.$t("Move Lesson"),duplicate:this.$t("Duplicate Lesson"),delete:this.$t("Delete Lesson")}}},methods:{updateLessonStatus(t){if(this.lesson.status===t)return!1;this.lesson.status=t,this.$emit("updated",this.lesson,["status"])},updateLessonTitle(){this.editing_title=!1,this.$emit("updated",this.lesson,["title"])},updateLessonSlug(){this.editingSlugPopup=!1,this.$emit("updated",this.lesson,["slug"])},showEditor(){this.editing_title=!0,this.$nextTick(()=>{this.$refs.lesson_title_edit.focus()})},moveLesson(){this.showMoveLessonPopup=!1,this.$emit("moveLesson",this.lesson.id,this.selectedSectionId)},handleLessonAction(t){if(t==="edit_title")this.showEditor();else if(t==="delete")this.$emit("deleteLesson",this.lesson);else if(t==="edit_lesson")this.$emit("showEditor",this.lesson);else if(t==="preview_lesson"){let e=this.$getRouteLink("course/:course_slug/lessons/:lesson_slug/view?preview=yes",{course_slug:this.course.slug,lesson_slug:this.lesson.slug});window.open(e,"_blank")}else t==="move_lesson"?(this.showMoveLessonPopup=!0,this.selectedSectionId=null,this.showOnlyThisPopup("fcom_action_lesson_popup")):t==="duplicate_lesson"?this.$emit("duplicateLesson",this.lesson):t==="edit_slug"&&(this.editingSlugPopup=!0,this.showOnlyThisPopup("fcom_edit_slug_popup"))},showOnlyThisPopup(t){this.$nextTick(()=>{document.querySelector(`.${t}.lesson_${this.lesson.id}`).style.display="block",document.querySelectorAll(`.${t}:not(.lesson_${this.lesson.id})`).forEach(e=>e.style.display="none")})}}},IXe={key:0,class:"fcom_heading_item"},LXe=["innerHTML"],OXe={class:"fcom_section_item_actions"},DXe={class:"fcom_action_lesson"},RXe={class:"fcom_move_popup_close"},VXe={class:"fcom_move_popup_close"};function FXe(t,e,n,i,s,o){const r=Ci,a=We,l=ft,c=W("arrow-down"),u=be,d=Wr,h=Yr,f=jr,p=W("MoreFilled"),m=on,y=Jt,b=en,k=sn,C=W("Close"),$=W("slug-input");return v(),A(ee,null,[g("div",{class:G([{fcom_title_editing:s.editing_title},"fcom_section_item_title fcom_title_editable"])},[le(t.$slots,"before_section_heading"),s.editing_title?(v(),D(l,{key:1,onKeydown:e[1]||(e[1]=ut(x=>s.editing_title=!1,["esc"])),ref:"lesson_title_edit",onKeyup:ut(o.updateLessonTitle,["enter"]),modelValue:n.lesson.title,"onUpdate:modelValue":e[2]||(e[2]=x=>n.lesson.title=x)},{append:w(()=>[_(a,{onClick:o.updateLessonTitle},{default:w(()=>[B(S(t.$t("Save")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeyup","modelValue"])):(v(),A("p",IXe,[g("span",{onClick:e[0]||(e[0]=x=>t.$emit("showEditor",n.lesson)),innerHTML:n.lesson.title},null,8,LXe),o.isQuizType?(v(),D(r,{key:0},{default:w(()=>[B(S(t.$t("quiz")),1)]),_:1})):O("",!0)]))],2),g("div",OXe,[_(a,{onClick:e[3]||(e[3]=x=>t.$emit("showEditor",n.lesson)),class:"fcom_show_hover",text:""},{default:w(()=>[B(S(o.isQuizType?t.$t("Edit Quiz"):t.$t("Edit Lesson")),1)]),_:1}),_(f,{onCommand:e[4]||(e[4]=x=>{o.updateLessonStatus(x)}),trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"draft"},{default:w(()=>[B(S(t.$t("Draft")),1)]),_:1}),_(d,{command:"published"},{default:w(()=>[B(S(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[_(a,{class:G(["el-dropdown-link",`fcom_button_${n.lesson.status==="published"?"success":"info"}`]),bg:"",text:""},{default:w(()=>[B(S(t.$labelize(n.lesson.status))+" ",1),_(u,{class:"el-icon--right"},{default:w(()=>[_(c)]),_:1})]),_:1},8,["class"])]),_:1}),g("div",DXe,[_(f,{onCommand:o.handleLessonAction,trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"edit_lesson"},{default:w(()=>[B(S(t.$t("Edit Content")),1)]),_:1}),_(d,{command:"edit_title"},{default:w(()=>[B(S(t.$t("Edit Title")),1)]),_:1}),_(d,{command:"edit_slug"},{default:w(()=>[B(S(t.$t("Edit Slug")),1)]),_:1}),_(d,{command:"preview_lesson"},{default:w(()=>[B(S(o.menuLabels.preview),1)]),_:1}),_(d,{command:"move_lesson"},{default:w(()=>[B(S(o.menuLabels.move),1)]),_:1}),_(d,{command:"duplicate_lesson"},{default:w(()=>[B(S(o.menuLabels.duplicate),1)]),_:1}),_(d,{command:"delete"},{default:w(()=>[B(S(o.menuLabels.delete),1)]),_:1})]),_:1})]),default:w(()=>[_(a,{"aria-label":t.$t("View actions"),size:"small",class:"fcom_dot_menu",text:""},{default:w(()=>[_(u,null,{default:w(()=>[_(p)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"]),De(g("div",{class:G(["fcom_action_lesson_popup","lesson_"+n.lesson.id])},[_(k,{onSubmit:e[6]||(e[6]=Ae(x=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(b,{label:t.$t("Move to a different Section")},{default:w(()=>[_(y,{placeholder:t.$t("Select Section"),modelValue:s.selectedSectionId,"onUpdate:modelValue":e[5]||(e[5]=x=>s.selectedSectionId=x)},{default:w(()=>[(v(!0),A(ee,null,Ce(o.filteredSections,x=>(v(),D(m,{key:x.id,label:x.title,value:x.id},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),_(a,{onClick:o.moveLesson,disabled:!s.selectedSectionId,class:"fcom_primary_button"},{default:w(()=>[B(S(o.menuLabels.move),1)]),_:1},8,["onClick","disabled"])]),_:1}),g("div",RXe,[_(u,{onClick:e[7]||(e[7]=x=>s.showMoveLessonPopup=!1)},{default:w(()=>[_(C)]),_:1})])],2),[[Ut,s.showMoveLessonPopup]]),De(g("div",{class:G(["fcom_edit_slug_popup","lesson_"+n.lesson.id])},[_(k,{onSubmit:e[9]||(e[9]=Ae(x=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(b,{label:t.$t("Slug (optional)")},{default:w(()=>[_($,{modelValue:n.lesson.slug,"onUpdate:modelValue":e[8]||(e[8]=x=>n.lesson.slug=x),is_inital_inactive:!0,placeholder:t.$t("Slug of the lesson")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(a,{onClick:o.updateLessonSlug,class:"fcom_primary_button"},{default:w(()=>[B(S(t.$t("Save")),1)]),_:1},8,["onClick"])]),_:1}),g("div",VXe,[_(u,{onClick:e[10]||(e[10]=x=>s.editingSlugPopup=!1)},{default:w(()=>[_(C)]),_:1})])],2),[[Ut,s.editingSlugPopup]])])])],64)}const NXe=de(PXe,[["render",FXe]]),BXe={name:"AddQuestionModal",components:{CrepeEditor:Zc,BgImageUpload:Z1,FluentDnD:Ud},emits:["close","addQuestion","updateQuestion"],props:{lesson:{type:Object,required:!0},question:{type:Object,required:!1}},data(){return{showModal:!0,appReady:!1,questionData:null,optKeyCounter:0,originalQuestionData:null,DeleteIcon:Si(J5),questionTypes:this.appVars.question_types,newQuestion:{slug:"",type:"single_choice",label:"",image_url:"",enabled:!0,image_enabled:!1,help_text:"",grading_mode:"open",correct_answers:[],options:[{label:"Option 1",is_correct:!0},{label:"Option 2",is_correct:!1}]}}},watch:{showModal(t){t||this.$emit("close")},"questionData.type"(t,e){t=="single_choice"&&e=="multiple_choice"&&this.questionData.options.forEach((n,i)=>{n.is_correct=i===0}),t!=="written_answer"&&e==="written_answer"&&(!this.questionData.options||this.questionData.options.length===0)&&(this.questionData.options=[{label:"Option 1",is_correct:!0},{label:"Option 2",is_correct:!1}]),t==="written_answer"&&(this.questionData.grading_mode||(this.questionData.grading_mode="open"),Array.isArray(this.questionData.correct_answers)||(this.questionData.correct_answers=[]))}},computed:{isDirty(){return!this.questionData||!this.originalQuestionData?!1:JSON.stringify(this.cleanQuestion())!==this.originalQuestionData},isRemovable(){return this.questionData.options.length>1},isSingleChoice(){return this.questionData.type=="single_choice"},isWrittenAnswer(){return this.questionData.type==="written_answer"},isExactMatch(){return this.questionData.grading_mode==="exact_match"},isNewQuestion(){return!this.question}},methods:{confirmDiscard(){return this.$confirm(this.$t("You have unsaved changes. Closing will discard them. Continue?"),this.$t("Discard changes?"),{confirmButtonText:this.$t("Discard"),cancelButtonText:this.$t("Keep editing"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"})},requestClose(){if(!this.isDirty){this.showModal=!1;return}this.confirmDiscard().then(()=>{this.showModal=!1}).catch(()=>{})},handleBeforeClose(t){if(!this.isDirty){t();return}this.confirmDiscard().then(()=>t()).catch(()=>{})},cleanQuestion(){return{...this.questionData,options:this.questionData.options.map(({_key:t,...e})=>e)}},addQuestion(){this.checkValidation()&&(this.showModal=!1,this.$emit("addQuestion",this.prepareQuestionData()))},updateQuestion(){this.checkValidation()&&(this.showModal=!1,this.$emit("updateQuestion",this.prepareQuestionData()))},prepareQuestionData(){const t=this.cleanQuestion();return t.type==="written_answer"&&(t.options=[],t.correct_answers=t.grading_mode==="exact_match"?this.getCleanCorrectAnswers():[]),t},getCleanCorrectAnswers(){return[...new Set((this.questionData.correct_answers||[]).map(t=>(t||"").trim()).filter(Boolean))]},addNewOption(){const t=this.questionData.options.length;this.questionData.options.push({label:`Option ${t+1}`,is_correct:!1,_key:++this.optKeyCounter})},removeOption(t){this.questionData.options.splice(t,1)},checkOption(t){this.isSingleChoice&&this.questionData.options.forEach(e=>{e.is_correct=e===t})},checkValidation(){if(!this.has_pro)return!1;const{label:t,options:e,type:n,grading_mode:i}=this.questionData,s=[{valid:!!t&&t.trim()!=="",message:this.$t("Please enter a question")}];n!=="written_answer"&&s.push({valid:Array.isArray(e)&&e.length>=2,message:this.$t("Please add at least 2 options")},{valid:e&&e.every(r=>r.label&&r.label.trim()!==""),message:this.$t("Please enter a label for each option")},{valid:e&&e.some(r=>r.is_correct===!0),message:this.$t("Please select the correct option")}),n==="written_answer"&&i==="exact_match"&&s.push({valid:this.getCleanCorrectAnswers().length>0,message:this.$t("Please add at least one correct answer")});const o=s.find(r=>!r.valid);return o?(this.$handleError(o.message),!1):!0}},created(){const t=this.isNewQuestion?this.newQuestion:this.question;this.questionData=JSON.parse(JSON.stringify(t)),this.questionData.options.forEach(e=>{e._key=++this.optKeyCounter}),this.originalQuestionData=JSON.stringify(this.cleanQuestion())},mounted(){Array.isArray(this.questionData.correct_answers)||(this.questionData.correct_answers=[]),this.questionData.grading_mode||(this.questionData.grading_mode="open"),this.$nextTick(()=>{this.appReady=!0})}},zXe={class:"dialog_header"},HXe={class:"dialog_left"},UXe={class:"dialog_body"},jXe={key:0,class:"fcom_banner_image_holder"},WXe={key:1,class:"fcom_banner_image_preview"},YXe=["aria-label"],qXe=["aria-checked","onClick","onKeydown"],GXe={class:"fcom_choice_btn"},XXe={class:"fcom_help_text"},KXe={class:"sub_label"},ZXe={class:"fcom_question_option"},JXe=g("div",{class:"fcom_drag_handle fcom_option_drag","aria-hidden":"true"},"⋮⋮",-1),QXe={class:"dialog_footer"},eKe={key:0};function tKe(t,e,n,i,s,o){const r=Uc,a=W("BgImageUpload"),l=Fo,c=W("CloseBold"),u=be,d=We,h=en,f=W("crepe-editor"),p=Mi,m=xs,y=Tme,b=Gt,k=ft,C=K4,$=W("FluentDnD"),x=sn,M=Ss;return v(),D(M,{modelValue:s.showModal,"onUpdate:modelValue":e[9]||(e[9]=P=>s.showModal=P),width:t.drawerWidth,"modal-class":"fcom_common_dialog question_dialog","align-center":!0,"close-on-click-modal":!0,"close-on-press-escape":!0,"before-close":o.handleBeforeClose},{header:w(()=>[g("div",zXe,[g("div",HXe,[g("h4",null,S(o.isNewQuestion?t.$t("Add Question"):t.$t("Edit Question")),1)])])]),footer:w(()=>[g("div",QXe,[_(d,{class:"fcom_secondary_button",onClick:o.requestClose},{default:w(()=>[B(S(t.$t("Cancel")),1)]),_:1},8,["onClick"]),o.isNewQuestion?(v(),D(d,{key:0,class:"fcom_primary_button",onClick:o.addQuestion},{default:w(()=>[B(S(t.$t("Add Question")),1)]),_:1},8,["onClick"])):(v(),D(d,{key:1,class:"fcom_primary_button",onClick:o.updateQuestion},{default:w(()=>[B(S(t.$t("Update Question"))+" ",1),t.has_pro?O("",!0):(v(),A("span",eKe," ("+S(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"]))])]),default:w(()=>[g("div",UXe,[_(x,{onSubmit:e[8]||(e[8]=Ae(P=>t.doNothing(),["prevent"])),"label-position":"top",model:s.questionData},{default:w(()=>[_(h,{label:t.$t("Image")},{default:w(()=>[_(r,{class:"fcom_question_switch",modelValue:s.questionData.image_enabled,"onUpdate:modelValue":e[0]||(e[0]=P=>s.questionData.image_enabled=P)},null,8,["modelValue"]),s.questionData.image_enabled&&!s.questionData.image_url?(v(),A("div",jXe,[g("h4",null,S(t.$t("Banner Image")),1),g("p",null,S(t.$t("Upload a banner image at the top of the question. Recommended image dimension: 1080x420")),1),_(a,{modelValue:s.questionData.image_url,"onUpdate:modelValue":e[1]||(e[1]=P=>s.questionData.image_url=P)},null,8,["modelValue"])])):s.questionData.image_enabled&&s.questionData.image_url?(v(),A("div",WXe,[_(l,{alt:t.$t("Image Preview"),src:s.questionData.image_url},null,8,["alt","src"]),_(d,{class:"fcom_secondary_button",text:"",onClick:e[2]||(e[2]=P=>s.questionData.image_url="")},{default:w(()=>[_(u,null,{default:w(()=>[_(c)]),_:1})]),_:1})])):O("",!0)]),_:1},8,["label"]),_(h,{label:t.$t("Question")},{default:w(()=>[s.appReady?(v(),D(f,{key:0,modelValue:s.questionData.label,"onUpdate:modelValue":e[3]||(e[3]=P=>s.questionData.label=P),placeholder:t.$t("Write your question here")},null,8,["modelValue","placeholder"])):O("",!0)]),_:1},8,["label"]),_(h,{label:t.$t("Type")},{default:w(()=>[g("div",{class:"fcom_choices question_choices",role:"radiogroup","aria-label":t.$t("Type")},[(v(!0),A(ee,null,Ce(s.questionTypes,P=>(v(),A("div",{key:P.value,role:"radio",tabindex:"0","aria-checked":s.questionData.type==P.value,onClick:T=>s.questionData.type=P.value,onKeydown:[ut(Ae(T=>s.questionData.type=P.value,["prevent"]),["enter"]),ut(Ae(T=>s.questionData.type=P.value,["prevent"]),["space"])],class:G({fcom_choice:!0,fcom_choice_active:s.questionData.type==P.value})},[g("div",GXe,[g("p",null,S(t.$t(P.label)),1)])],42,qXe))),128))],8,YXe)]),_:1},8,["label"]),o.isWrittenAnswer?(v(),D(h,{key:0,label:t.$t("Grading Mode")},{default:w(()=>[_(m,{modelValue:s.questionData.grading_mode,"onUpdate:modelValue":e[4]||(e[4]=P=>s.questionData.grading_mode=P)},{default:w(()=>[_(p,{value:"open"},{default:w(()=>[B(S(t.$t("Open (any answer accepted)")),1)]),_:1}),_(p,{value:"exact_match"},{default:w(()=>[B(S(t.$t("Exact Match (auto-graded)")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),o.isWrittenAnswer&&o.isExactMatch?(v(),D(h,{key:1,label:t.$t("Correct Answer(s)")},{default:w(()=>[_(y,{modelValue:s.questionData.correct_answers,"onUpdate:modelValue":e[5]||(e[5]=P=>s.questionData.correct_answers=P),trigger:"Enter",placeholder:t.$t("Type an answer and press Enter"),style:{width:"100%"}},null,8,["modelValue","placeholder"]),g("div",XXe,[g("p",null,S(t.$t("Add multiple variations to handle different ways students might write the answer (case-insensitive, trimmed).")),1)])]),_:1},8,["label"])):O("",!0),o.isWrittenAnswer?O("",!0):(v(),D(h,{key:2,label:t.$t("Responses"),class:"fcom_question_options"},{default:w(()=>[g("span",KXe,S(t.$t("Select correct answer")),1),_($,{items:s.questionData.options,"row-key":"_key",class:"fcom_modal_options"},{item:w(({data:P,index:T})=>[g("div",ZXe,[JXe,_(b,{modelValue:P.is_correct,"onUpdate:modelValue":I=>P.is_correct=I,onChange:I=>o.checkOption(P),class:G({single_choice:o.isSingleChoice})},null,8,["modelValue","onUpdate:modelValue","onChange","class"]),_(k,{modelValue:P.label,"onUpdate:modelValue":I=>P.label=I,type:"text"},null,8,["modelValue","onUpdate:modelValue"]),o.isRemovable?(v(),D(C,{key:0,type:"danger",title:t.$t("Remove"),"aria-label":t.$t("Remove option"),icon:s.DeleteIcon,underline:!1,onClick:I=>o.removeOption(T)},null,8,["title","aria-label","icon","onClick"])):O("",!0)])]),_:1},8,["items"]),_(C,{type:"primary",underline:!1,onClick:o.addNewOption},{default:w(()=>[B(S("+ "+t.$t("Add new option")),1)]),_:1},8,["onClick"])]),_:1},8,["label"])),_(h,{label:t.$t("Help Text")},{default:w(()=>[_(k,{modelValue:s.questionData.help_text,"onUpdate:modelValue":e[6]||(e[6]=P=>s.questionData.help_text=P),type:"textarea",autosize:{minRows:2,maxRows:5}},null,8,["modelValue"])]),_:1},8,["label"]),_(h,{label:t.$t("Status")},{default:w(()=>[_(b,{modelValue:s.questionData.enabled,"onUpdate:modelValue":e[7]||(e[7]=P=>s.questionData.enabled=P)},{default:w(()=>[B(S(t.$t("Enable this question")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model"])])]),_:1},8,["modelValue","width","before-close"])}const nKe=de(BXe,[["render",tKe]]),sKe={name:"QuizEditor",props:["lesson","section","course","editingIndex"],emits:["close","changeLesson","saved"],components:{LessonMeta:OH,CrepeEditor:Zc,AddQuestionModal:nKe,FluentDnD:Ud,ActionPopover:Pa},data(){return{saving:!1,showSideBar:!1,appReady:!1,showQuestionModal:!1,question:null,keyCounter:0}},computed:{showMoving(){var t,e;return((e=(t=this.lesson.meta)==null?void 0:t.quiz_questions)==null?void 0:e.length)>1},previewUrl(){return this.$getRouteLink("course/:course_slug/lessons/:lesson_slug/view?preview=yes",{course_slug:this.course.slug,lesson_slug:this.lesson.slug})},showQuestionImage(){return t=>(t==null?void 0:t.image_enabled)&&(t==null?void 0:t.image_url)}},methods:{getStatusText(t){return t.enabled?this.$t("Disable"):this.$t("Enable")},toggleQuestion(t){t.enabled=!t.enabled,this.saveData()},duplicateQuestion(t){const e=JSON.parse(JSON.stringify(t));e.slug="";const[n,...i]=t.label.split(`
`),s=n.replace(/\s*\(Copy(?:\s+\d+)?\)\s*$/,""),o=l=>[s+(l>1?` (Copy ${l})`:" (Copy)"),...i].join(`
`);let r=1;for(;this.lesson.meta.quiz_questions.some(l=>l.label===o(r));)r++;e.label=o(r),e.label_rendered="";const a=this.lesson.meta.quiz_questions.indexOf(t)+1;this.lesson.meta.quiz_questions.splice(a,0,e),this.ensureKeys(),this.saveData()},moveUp(t){if(t==0)return;const e=this.lesson.meta.quiz_questions[t];this.lesson.meta.quiz_questions[t]=this.lesson.meta.quiz_questions[t-1],this.lesson.meta.quiz_questions[t-1]=e,this.saveData()},moveDown(t){var n,i;if(t==((i=(n=this.lesson.meta)==null?void 0:n.quiz_questions)==null?void 0:i.length)-1)return;const e=this.lesson.meta.quiz_questions[t];this.lesson.meta.quiz_questions[t]=this.lesson.meta.quiz_questions[t+1],this.lesson.meta.quiz_questions[t+1]=e,this.saveData()},openEditQuestionModal(t){this.question=t,this.showQuestionModal=!0},openAddQuestionModal(){this.has_pro&&(this.question=null,this.showQuestionModal=!0)},ensureKeys(){var t;(((t=this.lesson.meta)==null?void 0:t.quiz_questions)||[]).forEach(e=>{(e.options||[]).forEach(n=>{n._key||(n._key=++this.keyCounter)})})},buildMetaForSave(){const t={...this.lesson.meta};return Array.isArray(t.quiz_questions)&&(t.quiz_questions=t.quiz_questions.map(e=>({...e,options:(e.options||[]).map(({_key:n,...i})=>i)}))),t},normalizeSingleChoice(){var t;(((t=this.lesson.meta)==null?void 0:t.quiz_questions)||[]).forEach(e=>{if(e.type!=="single_choice")return;let n=!1;(e.options||[]).forEach(i=>{i.is_correct&&!n?n=!0:i.is_correct=!1}),!n&&e.options&&e.options.length&&(e.options[0].is_correct=!0)})},syncQuestionsFromServer(t){var i,s,o;const e=((i=t==null?void 0:t.meta)==null?void 0:i.quiz_questions)||[],n=((o=(s=this.lesson)==null?void 0:s.meta)==null?void 0:o.quiz_questions)||[];e.forEach((r,a)=>{const l=n[a];l&&(l.slug=r.slug,l.label_rendered=r.label_rendered)})},addQuestion(t){Array.isArray(this.lesson.meta.quiz_questions)||(this.lesson.meta.quiz_questions=[]),this.lesson.meta.quiz_questions.push({...t}),this.ensureKeys(),this.saveData()},updateQuestion(t){var e,n,i;this.lesson.meta.quiz_questions=(i=(n=(e=this.lesson)==null?void 0:e.meta)==null?void 0:n.quiz_questions)==null?void 0:i.map(s=>s.slug==t.slug?t:s),this.ensureKeys(),this.saveData()},checkAndSaveQuestion(t,e){if(!t.enabled){e.is_correct=!e.is_correct;return}if(t.type=="single_choice"&&t.options.forEach(n=>{n.is_correct=n===e}),t.type=="multiple_choice"&&!t.options.filter(i=>i.is_correct).length&&!e.is_correct){e.is_correct=!0;return}this.updateQuestion(t)},openDeleteQuestionPrompt(t){this.$confirm(this.$t("Are you sure you want to delete this question?"),this.$t("Delete Question"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{var e,n,i;this.lesson.meta.quiz_questions=(i=(n=(e=this.lesson)==null?void 0:e.meta)==null?void 0:n.quiz_questions)==null?void 0:i.filter(s=>s.slug!==t),this.saveData()})},closeModal(){this.showQuestionModal=!1},saveData(){this.saving=!0;const t={id:this.lesson.id,parent_id:this.lesson.parent_id,space_id:this.lesson.space_id,title:this.lesson.title,message:this.lesson.message,meta:this.buildMetaForSave(),status:this.lesson.status};this.$put("admin/courses/"+this.lesson.space_id+"/lessons/"+this.lesson.id,{lesson:t}).then(e=>{this.$notify.success(e.message),this.syncQuestionsFromServer(e.lesson),this.$emit("saved",e.lesson)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},beforeUnmount(){document.body.classList.remove("fcom-no-scroll")},created(){this.ensureKeys(),this.normalizeSingleChoice()},mounted(){document.body.classList.add("fcom-no-scroll"),this.$nextTick(()=>{this.appReady=!0})}},iKe={class:"fcom_full_editor"},oKe={class:"fcom_full_editor_header"},rKe=["aria-label"],aKe={class:"fcom_desktop_only"},lKe={key:0},cKe={class:"full_editor_actions"},uKe={class:"fcom_lesson_camp"},dKe={class:"fcom_lesson_nav"},hKe=["title","href"],fKe={class:"fcom_lesson_content"},pKe={class:"fcom_quiz_editor"},mKe={key:1,class:"fcom_questions_wrap"},gKe=["id"],vKe={key:0,class:"fcom_question_image"},_Ke={class:"fcom_question_header"},yKe=["aria-label","onClick","onKeydown"],bKe=["innerHTML"],wKe={key:1},kKe={class:"fcom_question_actions"},CKe={class:"fcom_question_body"},xKe={class:"fcom_question_option"},SKe=g("div",{class:"fcom_drag_handle fcom_option_drag","aria-hidden":"true"},"⋮⋮",-1),$Ke={key:0,class:"question_help_text"},AKe={key:1,class:"fcom_meta_sorting"},EKe={key:2,class:"fcom_banner_image_holder add_quiz_banner"},MKe={key:0},TKe={key:0},PKe={style:{padding:"20px"}};function IKe(t,e,n,i,s,o){const r=W("ArrowLeft"),a=be,l=We,c=W("ArrowRight"),u=W("arrow-down"),d=Wr,h=Yr,f=jr,p=W("View"),m=S1,y=ft,b=W("crepe-editor"),k=Fo,C=W("action-popover"),$=Gt,x=W("FluentDnD"),M=W("Top"),P=W("Bottom"),T=Ai,I=Aa,L=W("lesson-meta"),R=x1,V=W("AddQuestionModal"),H=C1,F=xt("loading");return v(),A("div",iKe,[_(H,null,{default:w(()=>[_(m,{class:"fcom_full_editor_header_wrap"},{default:w(()=>{var z;return[g("div",oKe,[g("button",{type:"button",onClick:e[0]||(e[0]=N=>t.$emit("close")),class:"fcom_back_header","aria-label":t.$t("Back to Lessons")},[_(a,{class:"fcom_arrow_icon"},{default:w(()=>[_(r)]),_:1}),g("span",aKe,S(t.$t("Back to Lessons")),1),(z=n.course)!=null&&z.title?(v(),A("span",lKe,"("+S(n.course.title)+")",1)):O("",!0)],8,rKe),g("div",cKe,[g("div",uKe,[g("div",null,S(t.$t("Lesson %1$s of %2$s - %3$s",n.editingIndex+1,n.section.lessons.length,n.section.title)),1),g("div",dKe,[_(l,{onClick:e[1]||(e[1]=N=>t.$emit("changeLesson",n.editingIndex-1)),disabled:n.editingIndex===0,size:"small"},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1})]),_:1},8,["disabled"]),_(l,{onClick:e[2]||(e[2]=N=>t.$emit("changeLesson",n.editingIndex+1)),disabled:n.editingIndex+1===n.section.lessons.length,size:"small"},{default:w(()=>[_(a,{class:"fcom_arrow_icon"},{default:w(()=>[_(c)]),_:1})]),_:1},8,["disabled"])])]),t.isMobile&&!s.showSideBar?(v(),D(l,{key:0,text:"",onClick:e[3]||(e[3]=N=>s.showSideBar=!s.showSideBar)},{default:w(()=>[g("span",null,S(t.$t("Features")),1)]),_:1})):O("",!0),_(f,{onCommand:e[4]||(e[4]=N=>{n.lesson.status=N}),trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"draft"},{default:w(()=>[B(S(t.$t("Draft")),1)]),_:1}),_(d,{command:"published"},{default:w(()=>[B(S(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[_(l,{type:n.lesson.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:w(()=>[B(S(t.$labelize(n.lesson.status))+" ",1),_(a,{class:"el-icon--right"},{default:w(()=>[_(u)]),_:1})]),_:1},8,["type"])]),_:1}),De((v(),D(l,{style:{"margin-left":"15px"},disabled:s.saving,onClick:o.saveData,class:"fcom_primary_button"},{default:w(()=>[B(S(t.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[F,s.saving]]),g("a",{title:t.$t("Preview Lesson"),class:"el-button el-button--text",target:"_blank",rel:"noopener",href:o.previewUrl},[_(a,null,{default:w(()=>[_(p)]),_:1})],8,hKe)])])]}),_:1}),_(H,{class:"fcom_full_editor_container fcom_lesson_editor_full"},{default:w(()=>[_(I,{style:{overflow:"hidden",padding:"0"},class:"fcom_full_editor_main"},{default:w(()=>[g("div",fKe,[_(T,{height:"calc(100vh - 60px)",class:"fcom_lesson_editor_scroll"},{default:w(()=>{var z,N,q,K;return[g("div",pKe,[_(y,{modelValue:n.lesson.title,"onUpdate:modelValue":e[5]||(e[5]=X=>n.lesson.title=X),placeholder:t.$t("Title")},null,8,["modelValue","placeholder"]),s.appReady?(v(),D(b,{key:0,modelValue:n.lesson.message,"onUpdate:modelValue":e[6]||(e[6]=X=>n.lesson.message=X),autofocus:!0,placeholder:t.$t("Describe this quiz")+"...",disable_media:!0},null,8,["modelValue","placeholder"])):O("",!0),(N=(z=n.lesson.meta)==null?void 0:z.quiz_questions)!=null&&N.length?(v(),A("div",mKe,[(v(!0),A(ee,null,Ce(n.lesson.meta.quiz_questions,(X,U)=>(v(),A("div",{key:X.slug,id:"fcom_question_"+X.slug,class:G(["fcom_question",[X.type,{disabled:!X.enabled}]])},[o.showQuestionImage(X)?(v(),A("div",vKe,[_(k,{src:X.image_url},null,8,["src"])])):O("",!0),g("div",_Ke,[g("div",{class:"fcom_question_label",role:"button",tabindex:"0","aria-label":t.$t("Edit question"),onClick:Q=>o.openEditQuestionModal(X),onKeydown:[ut(Q=>o.openEditQuestionModal(X),["enter"]),ut(Ae(Q=>o.openEditQuestionModal(X),["prevent"]),["space"])]},[X.label_rendered?(v(),A("span",{key:0,innerHTML:X.label_rendered},null,8,bKe)):(v(),A("span",wKe,S(X.label||t.$t("Untitled question")),1))],40,yKe),g("div",kKe,[_(C,{items:[{label:o.getStatusText(X),action:()=>{o.toggleQuestion(X)}},{label:t.$t("Edit"),action:()=>{o.openEditQuestionModal(X)}},{label:t.$t("Duplicate"),action:()=>{o.duplicateQuestion(X)}},{label:t.$t("Delete"),type:"danger",action:()=>{o.openDeleteQuestionPrompt(X.slug)}}],placement:"bottom-end"},null,8,["items"])])]),g("div",CKe,[_(x,{class:"fcom_question_options",items:X.options,"row-key":"_key","item-class":"fcom_question_option_dnd",onDrop:o.saveData},{item:w(({data:Q})=>[g("div",xKe,[SKe,_($,{modelValue:Q.is_correct,"onUpdate:modelValue":ne=>Q.is_correct=ne,onChange:ne=>o.checkAndSaveQuestion(X,Q),class:G({single_choice:X.type=="single_choice"})},{default:w(()=>[B(S(Q.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","class"])])]),_:2},1032,["items","onDrop"]),X.help_text?(v(),A("div",$Ke,S(X.help_text),1)):O("",!0)]),o.showMoving?(v(),A("div",AKe,[_(a,{role:"button",tabindex:U===0?-1:0,"aria-disabled":U===0,"aria-label":t.$t("Move question up"),onClick:Q=>o.moveUp(U),onKeydown:[ut(Q=>o.moveUp(U),["enter"]),ut(Ae(Q=>o.moveUp(U),["prevent"]),["space"])]},{default:w(()=>[_(M)]),_:2},1032,["tabindex","aria-disabled","aria-label","onClick","onKeydown"]),_(a,{role:"button",tabindex:U===n.lesson.meta.quiz_questions.length-1?-1:0,"aria-disabled":U===n.lesson.meta.quiz_questions.length-1,"aria-label":t.$t("Move question down"),onClick:Q=>o.moveDown(U),onKeydown:[ut(Q=>o.moveDown(U),["enter"]),ut(Ae(Q=>o.moveDown(U),["prevent"]),["space"])]},{default:w(()=>[_(P)]),_:2},1032,["tabindex","aria-disabled","aria-label","onClick","onKeydown"])])):O("",!0)],10,gKe))),128))])):O("",!0),(K=(q=n.lesson.meta)==null?void 0:q.quiz_questions)!=null&&K.length?(v(),D(l,{key:3,onClick:o.openAddQuestionModal,class:"fcom_primary_button add_btn"},{default:w(()=>[B(S("+ "+t.$t("Add Question"))+" ",1),t.has_pro?O("",!0):(v(),A("span",TKe," ("+S(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"])):(v(),A("div",EKe,[g("h4",null,S(t.$t("Add Question")),1),g("p",null,S(t.$t("No questions have been added yet. Click below to create your first quiz question and engage your learners!")),1),_(l,{onClick:o.openAddQuestionModal,class:"fcom_secondary_button add_btn"},{default:w(()=>[B(S("+ "+t.$t("Add Question"))+" ",1),t.has_pro?O("",!0):(v(),A("span",MKe," ("+S(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"])]))])]}),_:1},8,["height"])])]),_:1}),De(_(R,{style:{padding:"0"},class:"fcom_full_editor_side",width:"300px"},{default:w(()=>[_(T,{height:"calc(100vh - 60px)"},{default:w(()=>[g("div",PKe,[_(L,{course:n.course,lesson:n.lesson,quiz_meta:!0},null,8,["course","lesson"]),t.isMobile?(v(),D(l,{key:0,size:"small",onClick:e[7]||(e[7]=z=>s.showSideBar=!1)},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,S(t.$t("Close")),1)]),_:1})):O("",!0)])]),_:1})]),_:1},512),[[Ut,s.showSideBar||!t.isMobile]]),s.showQuestionModal?(v(),D(V,{key:0,lesson:n.lesson,question:s.question,onClose:o.closeModal,onAddQuestion:o.addQuestion,onUpdateQuestion:o.updateQuestion},null,8,["lesson","question","onClose","onAddQuestion","onUpdateQuestion"])):O("",!0)]),_:1})]),_:1})])}const LKe=de(sKe,[["render",IKe]]),OKe={name:"SectionScheduler",components:{CaretBottom:AMe},props:["section","course"],data(){return{saving:!1,show:!1,time:"09:00",date:"",unlock_after:0}},methods:{saveSchedule(){let t=this.date+" "+this.convertTo24Hour(this.time)+":00";if(!dayjs(t).isValid()){this.$notify.error(this.$t("Please select a valid date and time"));return}this.section.scheduled_at=t,this.patchCourse({scheduled_at:t},()=>{this.show=!1})},saveUnlockDays(){this.patchCourse({reactions_count:this.unlock_after},()=>{this.section.reactions_count=this.unlock_after,this.show=!1})},patchCourse(t={},e=null){this.saving=!0,this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id,t).then(n=>{this.$notify.success(this.$t("Schedule has been updated")),e&&e(n)}).catch(n=>{this.$handleError(n)}).finally(()=>{this.saving=!1})},initUnlockDay(){if(this.show){this.show=!1;return}this.unlock_after=parseInt(this.section.reactions_count),this.show=!0},initPicker(){if(this.show){this.show=!1;return}let t=this.section.scheduled_at;if(!t){this.show=!0;return}this.date=dayjs(t).format("YYYY-MM-DD"),this.time=dayjs(t).format(this.siteTimeFormat),this.show=!0}}},DKe={style:{"padding-left":"10px"},class:"fcom_section_scheduler"},RKe={class:"fcom_scheduler_form"},VKe={class:"fcom_input_group"},FKe={class:"el_inline_date_picker"},NKe={class:"fcom_input_group"},BKe={class:"fcom_input_group"},zKe={class:"fcom_scheduler_form scheduler_structured"},HKe={class:"fcom_input_group"},UKe={class:"fcom_label"},jKe={class:"fcom_input_group"};function WKe(t,e,n,i,s,o){const r=W("CaretBottom"),a=be,l=Od,c=s8,u=We,d=No,h=Ib,f=xt("loading");return v(),A("div",DKe,[n.course.settings.course_type=="scheduled"?(v(),D(d,{key:0,persistent:!1,placement:"bottom",width:400,visible:s.show},{reference:w(()=>[g("button",{onClick:e[0]||(e[0]=(...p)=>o.initPicker&&o.initPicker(...p)),class:"fcom_input_select_btn"},[g("span",null,S(n.section.scheduled_at?t.smartDate(n.section.scheduled_at,!0,!0):t.$t("Select Drip date")),1),_(a,null,{default:w(()=>[_(r)]),_:1})])]),default:w(()=>[g("div",RKe,[g("div",VKe,[g("div",FKe,[_(l,{"value-format":"YYYY-MM-DD",format:t.siteDateFormat,teleported:!1,"popper-class":"el_inline_date_picker_box",modelValue:s.date,"onUpdate:modelValue":e[1]||(e[1]=p=>s.date=p)},null,8,["format","modelValue"])])]),g("div",NKe,[_(c,{modelValue:s.time,"onUpdate:modelValue":e[2]||(e[2]=p=>s.time=p),start:"00:00",end:"23:59",steps:15,format:t.siteTimeFormat},null,8,["modelValue","format"])]),g("div",BKe,[De((v(),D(u,{disabled:s.saving,type:"success",onClick:o.saveSchedule},{default:w(()=>[B(S(t.$t("Update Date")),1)]),_:1},8,["disabled","onClick"])),[[f,s.saving]])])])]),_:1},8,["visible"])):O("",!0),n.course.settings.course_type=="structured"?(v(),D(d,{key:1,persistent:!1,placement:"bottom",width:275,visible:s.show},{reference:w(()=>[g("button",{onClick:e[3]||(e[3]=(...p)=>o.initUnlockDay&&o.initUnlockDay(...p)),class:"fcom_input_select_btn"},[g("span",null,S(n.section.reactions_count?t.$t("after %s days of enrollment",n.section.reactions_count):t.$t("Immediately")),1),_(a,null,{default:w(()=>[_(r)]),_:1})])]),default:w(()=>[g("div",zKe,[g("div",HKe,[g("div",UKe,S(t.$t("Unlock section after")),1),_(h,{modelValue:s.unlock_after,"onUpdate:modelValue":e[4]||(e[4]=p=>s.unlock_after=p),min:0,max:1e3,"controls-position":"right",precision:0},null,8,["modelValue"]),B(" "+S(t.$t("Days")),1)]),g("div",jKe,[De((v(),D(u,{disabled:s.saving,type:"success",onClick:o.saveUnlockDays},{default:w(()=>[B(S(t.$t("Update")),1)]),_:1},8,["disabled","onClick"])),[[f,s.saving]])])])]),_:1},8,["visible"])):O("",!0)])}const YKe=de(OKe,[["render",WKe]]),qKe={name:"_SectionSechedulerEmail",components:{CrepeEditor:Zc},props:{section:{type:Object,required:!0},course:{type:Object,required:!0}},data(){return{editorOpen:!1,savingEmailMeta:!1,smartCodes:this.appVars.course_smart_codes}},methods:{openEditor(){if(!this.has_pro){this.$notify({title:this.$t("Pro Required"),message:this.$t("This feature is only available in the pro version."),type:"error"});return}this.editorOpen=!0},getDefaultSubject(){var t;return(t=this.appVars.default_course_email)==null?void 0:t.subject},getDefaultMessage(){var t;return(t=this.appVars.default_course_email)==null?void 0:t.message},insertIntoSubject(t){const e=(this.section.meta.email_subject||"")+t;this.section.meta.email_subject=e.trim()},insertIntoMessage(t){const e=this.$refs.emailEditor;if(e&&typeof e.updateContent=="function")e.updateContent(t);else{const n=this.section.meta.email_body;this.section.meta.email_body=(n?n+`
`:"")+t}},saveSectionMeta(){if(!this.has_pro){this.$notify({title:this.$t("Pro Required"),message:this.$t("This feature is only available in the pro version."),type:"error"});return}this.savingEmailMeta=!0,this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id,{meta:this.section.meta}).then(t=>{this.editorOpen=!1,this.section.meta=t.topic.meta,this.$notify.success(this.$t("Email settings updated"))}).catch(t=>{this.$handleError(t)}).finally(()=>{this.savingEmailMeta=!1})}},mounted(){var t,e,n;this.section.meta=this.section.meta||{},Object.assign(this.section.meta,{email_enabled:((t=this.section.meta)==null?void 0:t.email_enabled)??"no",email_subject:((e=this.section.meta)==null?void 0:e.email_subject)??this.getDefaultSubject(),email_body:((n=this.section.meta)==null?void 0:n.email_body)??this.getDefaultMessage()})}},GKe={class:"fcom_section_email_config"},XKe={class:"dialog_header"},KKe={class:"dialog_left"},ZKe={class:"dialog_body"},JKe={class:"fcom_input_group"},QKe={class:"fcom_label label_row"},eZe={class:"fcom_input_group"},tZe={class:"fcom_label label_row"},nZe={class:"fcom_extra_editor"},sZe={class:"dialog_footer"};function iZe(t,e,n,i,s,o){const r=Uc,a=We,l=Wr,c=Yr,u=jr,d=ft,h=W("crepe-editor"),f=Ss;return v(),A("div",GKe,[_(r,{"active-value":"yes","inactive-value":"no",disabled:!t.has_pro,modelValue:n.section.meta.email_enabled,"onUpdate:modelValue":e[0]||(e[0]=p=>n.section.meta.email_enabled=p),onClick:o.saveSectionMeta},null,8,["disabled","modelValue","onClick"]),_(a,{size:"small",text:"",class:"fcom_secondary_button",onClick:o.openEditor},{default:w(()=>[B(S(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(f,{"modal-class":"fcom_common_dialog","append-to-body":!0,"close-on-click-modal":!1,modelValue:s.editorOpen,"onUpdate:modelValue":e[4]||(e[4]=p=>s.editorOpen=p),width:t.drawerWidth},{header:w(()=>[g("div",XKe,[g("div",KKe,[g("h4",null,S(t.$t("Edit Email Notification")),1)])])]),footer:w(()=>[g("div",sZe,[_(a,{class:"fcom_secondary_button",onClick:e[3]||(e[3]=p=>s.editorOpen=!1)},{default:w(()=>[B(S(t.$t("Cancel")),1)]),_:1}),_(a,{class:"fcom_primary_button",loading:s.savingEmailMeta,onClick:o.saveSectionMeta},{default:w(()=>[B(S(t.$t("Save")),1)]),_:1},8,["loading","onClick"])])]),default:w(()=>[g("div",ZKe,[g("div",JKe,[g("div",QKe,[g("span",null,S(t.$t("Subject")),1),_(u,{trigger:"click",onCommand:o.insertIntoSubject},{dropdown:w(()=>[_(c,null,{default:w(()=>[(v(!0),A(ee,null,Ce(s.smartCodes,(p,m)=>(v(),D(l,{key:m,command:m},{default:w(()=>[B(S(p),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:w(()=>[_(a,{class:"fcom_secondary_button"},{default:w(()=>[B(S(t.$t("Add shortcode")),1)]),_:1})]),_:1},8,["onCommand"])]),_(d,{modelValue:n.section.meta.email_subject,"onUpdate:modelValue":e[1]||(e[1]=p=>n.section.meta.email_subject=p),placeholder:t.$t("Enter email subject")},null,8,["modelValue","placeholder"])]),g("div",eZe,[g("div",tZe,[g("span",null,S(t.$t("Message")),1),_(u,{trigger:"click",onCommand:o.insertIntoMessage},{dropdown:w(()=>[_(c,null,{default:w(()=>[(v(!0),A(ee,null,Ce(s.smartCodes,(p,m)=>(v(),D(l,{key:m,command:m},{default:w(()=>[B(S(p),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:w(()=>[_(a,{class:"fcom_secondary_button"},{default:w(()=>[B(S(t.$t("Add shortcode")),1)]),_:1})]),_:1},8,["onCommand"])]),g("div",nZe,[_(h,{ref:"emailEditor",modelValue:n.section.meta.email_body,"onUpdate:modelValue":e[2]||(e[2]=p=>n.section.meta.email_body=p),placeholder:t.$t("Write the email message")},null,8,["modelValue","placeholder"])])])])]),_:1},8,["modelValue","width"])])}const oZe=de(qKe,[["render",iZe]]),rZe={name:"SectionPart",props:["course","sections","section"],emits:["reload"],components:{LessonEditor:DH,LessonLine:NXe,SectionScheduler:YKe,FluentDnD:Ud,QuizEditor:LKe,SectionSechedulerEmail:oZe},data(){return{editing_title:!1,addingSectionItem:!1,newSectionItem:{title:"",type:""},working:!1,editingLesson:null,editingIndex:0,showAddSectionPopup:!1,showCopySectionPopup:!1,selectedCourseId:null,courses:[],loading:!1}},computed:{courseType(){var t;return(t=this.course.settings)==null?void 0:t.course_type},isLesson(){var t;return((t=this.editingLesson)==null?void 0:t.content_type)=="text"},isQuiz(){var t;return((t=this.editingLesson)==null?void 0:t.content_type)=="quiz"},selectedType(){return this.newSectionItem.type},hasSchedule(){return["scheduled","structured"].includes(this.courseType)},showEmailConfig(){return this.courseType=="scheduled"?this.section.scheduled_at||!1:this.section.reactions_count||!1}},methods:{handleSaveLesson(t){const e=this.section.lessons[this.editingIndex];!e||!t||(e.title=t.title,e.status=t.status)},updateLessonStatus(t,e){t.status=e},showTitleEditor(){this.editing_title=!0,this.$nextTick(()=>{this.$refs.fcom_section_title_editor.focus()})},patchSection(t){let e={};t.forEach(n=>{e[n]=this.section[n]}),this.editing_title=!1,this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id,e).then(n=>{console.log(n)}).catch(n=>{this.$handleError(n)})},handleLessonUpdated(t,e){let n={};e.forEach(i=>{n[i]=t[i]}),this.editing_title=!1,this.$patch("admin/courses/"+this.course.id+"/lessons/"+t.id,n).then(i=>{this.$notify.success(i.message)}).catch(i=>{this.$handleError(i)})},addSectionItem(t,e=!1){t&&t.preventDefault(),this.addingSectionItem=!0,this.$post("admin/courses/"+this.course.id+"/lessons",{...this.newSectionItem,section_id:parseInt(this.section.id)}).then(n=>{this.section.lessons.push(n.lesson),this.showAddSectionPopup=!1,this.newSectionItem.title="",this.newSectionItem.type="",e&&this.$nextTick(()=>{let i=this.section.lessons.length-1;this.editingLesson=this.section.lessons[i],this.editingIndex=i})}).catch(n=>{this.$handleError(n)}).finally(()=>{this.addingSectionItem=!1})},handleSectionAction(t){if(t=="edit_title"){this.showTitleEditor();return}t=="delete"&&this.$confirm(this.$t("Are you sure you want to delete this section? All the associated lessons and enrollment data will be deleted too."),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning",title:this.$t("Are you sure?"),showInput:!0,dangerouslyUseHTMLString:!0,inputPlaceholder:this.$t("Type %s to confirm","DELETE"),inputValidator(e){return e.toLowerCase()==="delete"?!0:this.$t("You must type %s to confirm","DELETE")},inputErrorMessage:this.$t("You must type %s to confirm","DELETE")}).then(e=>{if(e.value!="DELETE"){this.$notify.error({title:"Error",message:this.$t("You must type %s to confirm","DELETE")});return}this.working=!0,this.$del("admin/courses/"+this.course.id+"/sections/"+this.section.id).then(n=>{this.$emit("reload")}).catch(n=>{this.$handleError(n)}).finally(()=>{this.working=!1})}).catch(()=>{}),t==="copy_section"&&(this.fetchCourses(),this.showCopySectionPopup=!0,this.selectedCourseId=null,this.$nextTick(()=>{var e,n;document.querySelector(`.fcom_copy_section_popup.section_${(e=this.section)==null?void 0:e.id}`).style.display="block",document.querySelectorAll(`.fcom_copy_section_popup:not(.section_${(n=this.section)==null?void 0:n.id})`).forEach(i=>i.style.display="none")}))},fetchCourses(t=""){this.loading=!0,this.$get("admin/courses",{search:t}).then(e=>{var n;(n=e==null?void 0:e.courses)!=null&&n.data&&(this.courses=e.courses.data.filter(i=>i.id!==this.course.id))}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},copySection(){this.showCopySectionPopup=!1,this.$put(`admin/courses/${this.selectedCourseId}/copy-section`,{section_id:this.section.id,from_course_id:this.course.id}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)})},handleMoveLesson(t,e){this.$put("admin/courses/"+this.course.id+"/move-lesson",{lesson_id:t,section_id:e}).then(n=>{this.$notify.success(n.message),this.$emit("reload")}).catch(n=>{this.$handleError(n)})},handleDuplicateLesson(t){this.working=!0,this.$post("admin/courses/"+this.course.id+"/lessons/"+t.id+"/duplicate").then(e=>{this.$notify.success(e.message),this.$emit("reload")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})},handleDeleteLesson(t){this.$confirm(this.$t("Are you sure you want to delete this lesson? All the associated data will be deleted too."),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning",title:this.$t("Are you sure?")}).then(()=>{this.working=!0,this.$del("admin/courses/"+this.course.id+"/lessons/"+t.id).then(e=>{this.$emit("reload")}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})}).catch(()=>{})},handleChangeLesson(t){this.editingLesson=null,this.editingIndex=0,this.$nextTick(()=>{this.editingLesson=this.section.lessons[t],this.editingIndex=t,this.$router.push({query:{lesson_id:this.editingLesson.id}})})},initLessonEditor(t,e){this.editingLesson=t,this.editingIndex=e,this.$nextTick(()=>{this.$router.push({query:{lesson_id:t.id}})})},dropLesson({index:t}){const e=this.section.lessons.splice(t,1)[0];this.section.lessons.splice(t,0,e),this.resetLessonIndexes()},resetLessonIndexes(){const t={};_c(this.section.lessons,(e,n)=>{t[e.id]=n+1}),this.$patch("admin/courses/"+this.course.id+"/sections/"+this.section.id+"/indexes",{indexes:t}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)})},handleCloseLessonEditor(){this.editingLesson=null,this.editingIndex=0,this.$router.push({query:{}})},handleAddSectionItem(t){this.newSectionItem.type=t,this.$nextTick(()=>{this.showAddSectionPopup=!0,document.querySelector(`.fcom_add_section_popup.section_${this.section.id}`).style.display="block",document.querySelectorAll(`.fcom_add_section_popup:not(.section_${this.section.id})`).forEach(e=>e.style.display="none"),this.$refs.fcom_lesson_or_quiz_title.focus()})}},watch:{"$route.query.lesson_id"(t){const e=this.section.lessons.findIndex(n=>n.id==parseInt(t));this.editingLesson=e>-1?this.section.lessons[e]:null,this.editingIndex=e>-1?e:0}},mounted(){let t=parseInt(this.$route.query.lesson_id);if(t){let e=this.section.lessons.findIndex(n=>n.id==t);e>-1&&this.initLessonEditor(this.section.lessons[e],e)}}},aZe={class:"fcom_section_primary"},lZe={class:"fcom_section_primary_item"},cZe={key:0,class:"fcom_heading_item"},uZe=g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024","data-v-d2e47025":""},[g("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})],-1),dZe={class:"fcom_space_counts"},hZe={class:"fcom_section_config fcom_label_schedule"},fZe={class:"fcom_section_config fcom_label_email"},pZe={class:"fcom_section_primary_item_actions fcom_label_actions add_section_item"},mZe={key:0},gZe={class:"fcom_move_popup_close"},vZe={class:"fcom_move_popup_close"},_Ze={key:0,class:"fcom_section_items"},yZe=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1),bZe={key:0};function wZe(t,e,n,i,s,o){const r=be,a=We,l=ft,c=W("section-scheduler"),u=W("SectionSechedulerEmail"),d=Wr,h=Yr,f=jr,p=en,m=sn,y=W("Close"),b=on,k=Jt,C=W("MoreFilled"),$=W("lesson-line"),x=W("FluentDnD"),M=W("LessonEditor"),P=W("QuizEditor"),T=xt("loading");return v(),A(ee,null,[De((v(),A("div",aZe,[g("div",lZe,[g("div",{class:G(["fcom_section_primary_item_title fcom_title_editable fcom_label_lesson",{fcom_title_editing:s.editing_title}])},[le(t.$slots,"before_section_heading"),s.editing_title?(v(),D(l,{key:1,ref:"fcom_section_title_editor",modelValue:n.section.title,"onUpdate:modelValue":e[3]||(e[3]=I=>n.section.title=I),onKeyup:e[4]||(e[4]=ut(I=>o.patchSection(["title"]),["enter"]))},{append:w(()=>[_(a,{onClick:e[2]||(e[2]=I=>o.patchSection(["title"]))},{default:w(()=>[B(S(t.$t("save")),1)]),_:1})]),_:1},8,["modelValue"])):(v(),A("h4",cZe,[g("span",{onClick:e[0]||(e[0]=I=>s.editing_title=!0)},S(n.section.title),1),n.section.lessons&&n.section.lessons.length?(v(),D(a,{key:0,style:{"background-color":"var(--el-fill-color-light)"},class:"fcom_collapse_btn",size:"small",text:"",onClick:e[1]||(e[1]=I=>n.section.isCollapsed=!n.section.isCollapsed)},{default:w(()=>[_(r,{style:Xe(n.section.isCollapsed?"transform: rotate(-90deg);":"")},{default:w(()=>[uZe]),_:1},8,["style"]),g("span",dZe,S(t.$_n("%s lesson","%s lessons",n.section.lessons.length)),1)]),_:1})):O("",!0)]))],2),o.hasSchedule?(v(),A(ee,{key:0},[g("div",hZe,[_(c,{section:n.section,course:n.course},null,8,["section","course"])]),g("div",fZe,[o.showEmailConfig?(v(),D(u,{key:0,section:n.section,course:n.course},null,8,["section","course"])):O("",!0)])],64)):O("",!0),g("div",pZe,[_(f,{onCommand:o.handleAddSectionItem,trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"lesson"},{default:w(()=>[B(S(t.$t("Lesson")),1)]),_:1}),_(d,{disabled:!t.has_pro,command:"quiz"},{default:w(()=>[B(S(t.$t("Quiz"))+" ",1),t.has_pro?O("",!0):(v(),A("span",mZe," ("+S(t.$t("Pro Required"))+")",1))]),_:1},8,["disabled"])]),_:1})]),default:w(()=>[_(a,{"aria-label":t.$t("Add New"),class:"fcom_secondary_button"},{default:w(()=>[B(S(t.$t("Add New")),1)]),_:1},8,["aria-label"])]),_:1},8,["onCommand"]),De(g("div",{class:G(["fcom_add_section_popup","section_"+n.section.id])},[_(m,{onSubmit:[e[7]||(e[7]=Ae(I=>t.doNothing(),["prevent"])),o.addSectionItem],"label-position":"top"},{default:w(()=>[_(p,{label:o.selectedType==="quiz"?t.$t("Quiz Title"):t.$t("Lesson Title")},{default:w(()=>[_(l,{ref:"fcom_lesson_or_quiz_title",modelValue:s.newSectionItem.title,"onUpdate:modelValue":e[5]||(e[5]=I=>s.newSectionItem.title=I),placeholder:o.selectedType==="quiz"?t.$t("Enter Quiz title"):t.$t("Enter Lesson title")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,null,{default:w(()=>[De((v(),D(a,{disabled:s.addingSectionItem,class:"fcom_secondary_button",onClick:o.addSectionItem},{default:w(()=>[B(S(t.$t("Add")),1)]),_:1},8,["disabled","onClick"])),[[T,s.addingSectionItem]]),De((v(),D(a,{disabled:s.addingSectionItem,class:"fcom_primary_button",onClick:e[6]||(e[6]=()=>{o.addSectionItem(!1,!0)})},{default:w(()=>[B(S(t.$t("Add & Edit")),1)]),_:1},8,["disabled"])),[[T,s.addingSectionItem]])]),_:1})]),_:1},8,["onSubmit"]),g("div",gZe,[_(r,{onClick:e[8]||(e[8]=I=>s.showAddSectionPopup=!1)},{default:w(()=>[_(y)]),_:1})])],2),[[Ut,s.showAddSectionPopup]]),De(g("div",{class:G(["fcom_copy_section_popup","section_"+n.section.id])},[_(m,{onSubmit:e[10]||(e[10]=Ae(I=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(p,{label:t.$t("Copy Section to a different Course")},{default:w(()=>[_(k,{filterable:"",clearable:"",remote:"","remote-show-suffix":"","remote-method":o.fetchCourses,modelValue:s.selectedCourseId,"onUpdate:modelValue":e[9]||(e[9]=I=>s.selectedCourseId=I),loading:s.loading,placeholder:t.$t("Select Course")},{default:w(()=>[(v(!0),A(ee,null,Ce(s.courses,I=>(v(),D(b,{key:I.id,label:I.title,value:I.id},null,8,["label","value"]))),128))]),_:1},8,["remote-method","modelValue","loading","placeholder"])]),_:1},8,["label"]),_(a,{onClick:o.copySection,disabled:!s.selectedCourseId,class:"fcom_primary_button"},{default:w(()=>[B(S(t.$t("Copy Section")),1)]),_:1},8,["onClick","disabled"])]),_:1}),g("div",vZe,[_(r,{onClick:e[11]||(e[11]=I=>s.showCopySectionPopup=!1)},{default:w(()=>[_(y)]),_:1})])],2),[[Ut,s.showCopySectionPopup]]),_(f,{onCommand:o.handleSectionAction,trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"edit_title"},{default:w(()=>[B(S(t.$t("Edit Title")),1)]),_:1}),_(d,{command:"copy_section"},{default:w(()=>[B(S(t.$t("Copy To")),1)]),_:1}),_(d,{command:"delete"},{default:w(()=>[B(S(t.$t("Delete section")),1)]),_:1})]),_:1})]),default:w(()=>[_(a,{"aria-label":t.$t("View actions"),size:"small",class:"fcom_dot_menu",text:""},{default:w(()=>[_(r,null,{default:w(()=>[_(C)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"])])]),n.section.lessons.length&&!n.section.isCollapsed?(v(),A("div",_Ze,[_(x,{items:n.section.lessons,onDrop:o.dropLesson,"item-class":"fcom_section_item"},{item:w(({data:I,index:L})=>[(v(),D($,{course:n.course,sections:n.sections,key:I.id,lesson:I,onDeleteLesson:o.handleDeleteLesson,onUpdated:o.handleLessonUpdated,onMoveLesson:o.handleMoveLesson,onDuplicateLesson:o.handleDuplicateLesson,onShowEditor:R=>o.initLessonEditor(I,L)},{before_section_heading:w(()=>[yZe]),_:2},1032,["course","sections","lesson","onDeleteLesson","onUpdated","onMoveLesson","onDuplicateLesson","onShowEditor"]))]),_:1},8,["items","onDrop"])])):O("",!0)])),[[T,s.working]]),s.editingLesson?(v(),A("div",bZe,[(v(),D(Sa,{to:"body"},[o.isLesson?(v(),D(M,{key:0,course:n.course,section:n.section,lesson:s.editingLesson,editingIndex:s.editingIndex,onChangeLesson:o.handleChangeLesson,onClose:o.handleCloseLessonEditor},null,8,["course","section","lesson","editingIndex","onChangeLesson","onClose"])):O("",!0),o.isQuiz?(v(),D(P,{key:1,course:n.course,section:n.section,lesson:s.editingLesson,editingIndex:s.editingIndex,onSaved:o.handleSaveLesson,onClose:o.handleCloseLessonEditor,onChangeLesson:o.handleChangeLesson},null,8,["course","section","lesson","editingIndex","onSaved","onClose","onChangeLesson"])):O("",!0)]))])):O("",!0)],64)}const kZe=de(rZe,[["render",wZe]]),CZe={name:"EditLessons",props:["course"],components:{SectionPart:kZe,FluentDnD:Ud},data(){return{sections:[],loading:!1,newSection:{title:""},addingSection:!1,isCollapsed:!1}},computed:{lessonsCount(){let t=0;return _c(this.sections,e=>{t+=e.lessons.length}),t}},methods:{showAddSectionPopup(){this.$nextTick(()=>{this.$refs.fcom_section_title_add&&this.$refs.fcom_section_title_add.focus()})},fetchSections(){this.loading=!0,this.$get("admin/courses/"+this.course.id+"/sections").then(t=>{this.sections=t.sections}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},dropSection({indx:t}){const e=this.sections.splice(t,1)[0];this.sections.splice(t,0,e),this.resetSectionIndexes()},addSection(){this.addingSection=!0,this.$post("admin/courses/"+this.course.id+"/sections",this.newSection).then(t=>{this.sections.push(t.section),this.$refs.add_section.hide(),this.newSection.title="",this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.addingSection=!1})},resetSectionIndexes(){const t={};_c(this.sections,(e,n)=>{t[e.id]=n+1}),this.$patch("admin/courses/"+this.course.id+"/sections/indexes",{indexes:t}).then(e=>{this.$notify.success(e.message)}).catch(e=>{this.$handleError(e)})},toggleSectionCollapse(){this.isCollapsed=!this.isCollapsed,_c(this.sections,t=>{t.isCollapsed=this.isCollapsed})}},mounted(){this.fetchSections(),this.showAddSectionPopup()}},xZe={class:"fcom_course_lessons"},SZe={class:"fcom_settings_header"},$Ze={class:"fcom_settings_header_meta"},AZe={class:"fcom_settings_header_meta_item"},EZe={class:"fcom_card_section_heading"},MZe={key:0},TZe=g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24",color:"currentColor",fill:"none"},[g("path",{d:"M17.999 12.4999L11.999 18.4999L5.99898 12.4999",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M17.9993 5.49951L11.9994 11.4995L5.99932 5.49956",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})],-1),PZe={class:"fcom_section_labels"},IZe={class:"fcom_lebel fcom_label_lesson"},LZe={class:"fcom_lebel fcom_label_schedule"},OZe={class:"fcom_lebel fcom_label_email"},DZe=g("div",{class:"fcom_lebel fcom_label_actions"},null,-1),RZe=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1);function VZe(t,e,n,i,s,o){const r=Wt,a=be,l=We,c=ft,u=en,d=sn,h=No,f=W("section-part"),p=W("FluentDnD"),m=xt("loading");return v(),A("div",xZe,[g("div",SZe,[g("div",null,[g("h2",null,S(t.$t("Lessons")),1),g("div",$Ze,[g("div",AZe,[g("b",null,S(t.$t("Type:")),1),B(" "+S(t.$labelize(n.course.settings.course_type))+" • ",1),g("b",null,S(t.$t("Status:")),1),B(" "+S(t.$labelize(n.course.status))+" • ",1),g("b",null,S(t.$t("Visibility:")),1),B(" "+S(t.$labelize(n.course.privacy)),1)])])])]),g("div",{class:G(["fcom_card_sections","fcom_course_type_"+n.course.settings.course_type])},[g("div",EZe,[s.loading?(v(),D(r,{key:1,rows:1})):(v(),A("h3",MZe,S(t.$_n("%d Section","%d Sections",s.sections.length))+" • "+S(t.$_n("%d Lesson","%d Lessons",o.lessonsCount)),1)),g("div",null,[o.lessonsCount&&s.sections.length>1?(v(),D(l,{key:0,title:t.$t("Expand/Close all sections"),onClick:o.toggleSectionCollapse,class:"fcom_secondary_button"},{default:w(()=>[_(a,{style:Xe(s.isCollapsed?"transform: rotate(-90deg);":"")},{default:w(()=>[TZe]),_:1},8,["style"])]),_:1},8,["title","onClick"])):O("",!0),_(h,{persistent:!1,ref:"add_section",placement:"bottom",width:400,trigger:"click",onShow:o.showAddSectionPopup},{reference:w(()=>[_(l,{class:"fcom_primary_button",bg:""},{default:w(()=>[B(S(t.$t("+ Add Section")),1)]),_:1})]),default:w(()=>[_(d,{onSubmit:e[1]||(e[1]=Ae(y=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(u,{label:t.$t("Section Title")},{default:w(()=>[_(c,{ref:"fcom_section_title_add",onKeydown:ut(Ae(o.addSection,["prevent"]),["enter"]),modelValue:s.newSection.title,"onUpdate:modelValue":e[0]||(e[0]=y=>s.newSection.title=y),placeholder:t.$t("Enter Section title")},null,8,["onKeydown","modelValue","placeholder"])]),_:1},8,["label"]),_(u,null,{default:w(()=>[De((v(),D(l,{disabled:s.addingSection,class:"fcom_primary_button",onClick:o.addSection},{default:w(()=>[B(S(t.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[m,s.addingSection]])]),_:1})]),_:1})]),_:1},8,["onShow"])])]),s.loading?(v(),D(r,{key:0,animated:!0,rows:10,style:{padding:"1rem"}})):O("",!0),g("div",PZe,[g("div",IZe,S(t.$t("Lesson name")),1),g("div",LZe,S(t.$t("Schedule")),1),g("div",OZe,S(t.$t("E-mail")),1),DZe]),_(p,{items:s.sections,onDrop:o.dropSection,"item-class":"fcom_section_item"},{item:w(({data:y})=>[_(f,{onReload:o.fetchSections,course:n.course,sections:s.sections,section:y},{before_section_heading:w(()=>[RZe]),_:2},1032,["onReload","course","sections","section"])]),_:1},8,["items","onDrop"])],2)])}const FZe=de(CZe,[["render",VZe]]),NZe={name:"GroupIcon"},BZe={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},zZe=g("path",{d:"M13.8494 12C14.3489 12 14.7462 11.6856 15.103 11.2461C15.8333 10.3463 14.6342 9.62723 14.1769 9.27507C13.712 8.91708 13.1929 8.71428 12.6667 8.66667M12 7.33333C12.9205 7.33333 13.6667 6.58714 13.6667 5.66667C13.6667 4.74619 12.9205 4 12 4",stroke:"currentColor","stroke-linecap":"round"},null,-1),HZe=g("path",{d:"M2.15096 12C1.65143 12 1.2541 11.6856 0.897356 11.2461C0.167051 10.3463 1.36611 9.62723 1.82342 9.27507C2.28831 8.91708 2.80738 8.71428 3.33366 8.66667M3.66699 7.33333C2.74652 7.33333 2.00033 6.58714 2.00033 5.66667C2.00033 4.74619 2.74652 4 3.66699 4",stroke:"currentColor","stroke-linecap":"round"},null,-1),UZe=g("path",{d:"M5.38953 10.0738C4.70834 10.495 2.92232 11.3551 4.01013 12.4313C4.54151 12.957 5.13334 13.333 5.87741 13.333H10.1232C10.8673 13.333 11.4591 12.957 11.9905 12.4313C13.0783 11.3551 11.2923 10.495 10.6111 10.0738C9.01375 9.08608 6.9869 9.08608 5.38953 10.0738Z",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),jZe=g("path",{d:"M10.3337 4.99984C10.3337 6.2885 9.28899 7.33317 8.00033 7.33317C6.71166 7.33317 5.66699 6.2885 5.66699 4.99984C5.66699 3.71117 6.71166 2.6665 8.00033 2.6665C9.28899 2.6665 10.3337 3.71117 10.3337 4.99984Z",stroke:"currentColor"},null,-1),WZe=[zZe,HZe,UZe,jZe];function YZe(t,e,n,i,s,o){return v(),A("svg",BZe,WZe)}const qZe=de(NZe,[["render",YZe]]),GZe={name:"ManageCourses",components:{CreateCourseForm:K5,AppLayout:pi,Layout:fi,GroupIcon:qZe,Pagination:Jc,Search:f2},data(){return{courses:[],loading:!1,pagination:{page:1,per_page:24,total:0},search:"",status:"",sort_by:"latest",courseCategories:null,topic_slug:null,newCourseModal:!1}},methods:{fetchCourses(){this.loading||(this.loading=!0,this.$get("admin/courses",{page:this.pagination.page,per_page:this.pagination.per_page,search:this.search,status:this.status,sort_by:this.sort_by,topic_slug:this.topic_slug,with_categories:!this.courseCategories}).then(t=>{this.courses=t.courses.data,this.pagination.total=t.courses.total,t.course_categories&&t.course_categories.length&&(this.courseCategories=t.course_categories)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1}))},handleSearch(){this.search&&this.search.length<3||this.toSearch()},toSearch(){this.pagination.page=1,this.fetchCourses()},setStatus(t){this.status=t,this.toSearch()},setTopic(t){this.topic_slug=t,this.toSearch()},getExcerpt(t,e=200){if(!t)return"";let n=t.replace(/(<([^>]+)>)/ig,"");return n.length>e&&(n=n.substring(0,e)+"..."),n},navigateToEditLessons(t){this.$router.push({name:"course_overview",params:{course_id:t}})}},mounted(){this.fetchCourses()}},XZe={class:"object_menu"},KZe={class:"fcom_space_menu_ul"},ZZe={key:0,class:"fcom_space_topics"},JZe={class:"fcom_topics_filters"},QZe={class:"search_member"},eJe={class:"feed_filters"},tJe=g("div",{class:"fcom_feed_divider"},null,-1),nJe={class:"fcom_feed_filter_label"},sJe={class:"fcom_courses"},iJe={class:"fcom_box_card_list"},oJe=["onClick"],rJe=["src","onError"],aJe={key:1,class:"fcom_no_image"},lJe={class:"fcom_box_card_info"},cJe={class:"fcom_box_card_name"},uJe={class:"fcom_box_card_by"},dJe={class:"fcom_box_card_details"},hJe={class:"inline_details"},fJe=g("span",{class:"fcom_inline_separator"},null,-1),pJe={class:"inline_details"},mJe={key:0,class:"fcom_box_card_description"},gJe={class:"fcom_box_card_action"},vJe=["onClick"],_Je={key:0,class:"fcom_no_items_wrap"};function yJe(t,e,n,i,s,o){const r=We,a=Ai,l=W("Search"),c=be,u=ft,d=on,h=Jt,f=Ci,p=W("router-link"),m=W("GroupIcon"),y=W("pagination"),b=W("layout"),k=W("app-layout"),C=W("create-course-form"),$=Ea,x=xt("loading");return v(),A(ee,null,[_(k,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:w(()=>[_(b,{wrapper_class:"no_bg_layout",title:t.$t("Manage Courses")+(s.pagination.total?" ("+s.pagination.total+")":"")},{actions:w(()=>[g("div",XZe,[g("ul",KZe,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Ae(M=>o.setStatus(""),["prevent"])),class:G(s.status===""?"router-link-active router-link-exact-active":""),href:"#"},S(t.$t("All")),3)]),g("li",null,[g("a",{onClick:e[1]||(e[1]=Ae(M=>o.setStatus("published"),["prevent"])),class:G(s.status==="published"?"router-link-active router-link-exact-active":""),href:"#"},S(t.$t("Published")),3)]),g("li",null,[g("a",{onClick:e[2]||(e[2]=Ae(M=>o.setStatus("draft"),["prevent"])),class:G(s.status==="draft"?"router-link-active router-link-exact-active":""),href:"#"},S(t.$t("Draft")),3)]),g("li",null,[_(r,{class:"fcom_primary_button",onClick:e[3]||(e[3]=M=>s.newCourseModal=!0)},{default:w(()=>[B(S(t.$t("Add Course")),1)]),_:1})])])])]),default:w(()=>[s.courseCategories&&s.courseCategories.length?(v(),A("div",ZZe,[_(a,null,{default:w(()=>[g("div",JZe,[_(r,{onClick:e[4]||(e[4]=M=>o.setTopic("")),class:G({fcom_active_topic:!s.topic_slug})},{default:w(()=>[B(S(t.$t("All")),1)]),_:1},8,["class"]),(v(!0),A(ee,null,Ce(s.courseCategories,M=>(v(),D(r,{key:M.slug,onClick:P=>o.setTopic(M.slug),class:G({fcom_active_topic:M.slug==s.topic_slug})},{default:w(()=>[B(S(M.title),1)]),_:2},1032,["onClick","class"]))),128))])]),_:1})])):O("",!0),g("div",QZe,[_(u,{clearable:"",onClear:o.toSearch,onKeydown:ut(o.toSearch,["enter"]),onInput:o.handleSearch,modelValue:s.search,"onUpdate:modelValue":e[5]||(e[5]=M=>s.search=M),placeholder:t.$t("Search Courses...")},{prefix:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1})]),_:1},8,["onClear","onKeydown","onInput","modelValue","placeholder"])]),g("div",eJe,[tJe,g("span",nJe,S(t.$t("Sort by:")),1),_(h,{modelValue:s.sort_by,"onUpdate:modelValue":e[6]||(e[6]=M=>s.sort_by=M),class:"fcom_minimal_select space_sort_select","popper-class":"plain_select",onChange:o.toSearch},{default:w(()=>[_(d,{value:"latest",label:t.$t("Latest")},null,8,["label"]),_(d,{value:"alphabetical",label:t.$t("Alphabetical")},null,8,["label"])]),_:1},8,["modelValue","onChange"])]),De((v(),A("div",sJe,[g("div",iJe,[(v(!0),A(ee,null,Ce(s.courses,M=>{var P;return v(),A("div",{key:M.id,class:"fcom_each_box_card"},[g("div",{class:"fcom_box_card_avatar",onClick:T=>o.navigateToEditLessons(M.id)},[M.cover_photo&&!M.coverError?(v(),A("img",{key:0,src:M.cover_photo,alt:"",onError:T=>M.coverError=!0},null,40,rJe)):(v(),A("div",aJe))],8,oJe),g("div",lJe,[g("div",cJe,[_(p,{class:"course_route",to:{name:"course_overview",params:{course_id:M.id}}},{default:w(()=>[B(S(o.getExcerpt(M.title,20))+" ",1),M.status=="draft"?(v(),D(f,{key:0,type:"info"},{default:w(()=>[B(S(M.status),1)]),_:2},1024)):O("",!0)]),_:2},1032,["to"]),g("span",uJe,S(t.$t("by %s",(P=M==null?void 0:M.owner)==null?void 0:P.display_name)),1)]),g("div",dJe,[g("div",hJe,[g("span",null,S(t.$_n("%d Section","%d Sections",M.sectionsCount)),1),fJe,g("span",null,S(t.$_n("%d Lesson","%d Lessons",M.lessonsCount)),1)]),g("div",pJe,[_(c,null,{default:w(()=>[_(m)]),_:1}),B(" "+S(t.$_n("%d student","%d students",M.students_count||0)),1)])]),M.description?(v(),A("div",mJe,S(o.getExcerpt(M.description,40)),1)):O("",!0),g("div",gJe,[g("button",{class:"fcom_card_button",onClick:T=>o.navigateToEditLessons(M.id)},S(t.$t("Manage")),9,vJe)])])])}),128))]),_(y,{hide_on_single:!0,onFetch:o.fetchCourses,pagination:s.pagination},null,8,["onFetch","pagination"]),!s.loading&&!s.courses.length?(v(),A("div",_Je,[s.topic_slug?(v(),A(ee,{key:0},[g("h3",null,S(t.$t("No courses found in this topic")),1),g("p",null,S(t.$t("No courses found based on your search criteria")),1)],64)):s.search?(v(),A(ee,{key:1},[g("h3",null,S(t.$t("No courses found based on your search criteria")),1),g("p",null,S(t.$t("No courses match your search criteria. Try adjusting your search terms or browse our course catalog.")),1)],64)):s.status?(v(),A(ee,{key:2},[g("h3",null,S(t.$t("No courses found")),1),g("p",null,S(t.$t("No courses match your current filters. Try adjusting your filters.")),1)],64)):(v(),A(ee,{key:3},[g("h3",null,S(t.$t("Create your first course")),1),g("p",null,S(t.$t("Deliver engaging & high-performance learning experiences in your community.")),1),_(r,{onClick:e[7]||(e[7]=M=>s.newCourseModal=!0),class:"fcom_primary_button fcom_mt_10"},{default:w(()=>[B(S(t.$t("Create a Course")),1)]),_:1})],64))])):O("",!0)])),[[x,s.loading]])]),_:1},8,["title"])]),_:1}),_($,{"close-on-click-modal":!1,"append-to-body":!0,size:t.drawerWidth,modelValue:s.newCourseModal,"onUpdate:modelValue":e[9]||(e[9]=M=>s.newCourseModal=M),direction:"rtl"},{header:w(()=>[g("h4",null,S(t.$t("Create a new course")),1)]),default:w(()=>[s.newCourseModal?(v(),D(C,{key:0,onCompleted:e[8]||(e[8]=M=>{s.newCourseModal=!1,o.fetchCourses()})})):O("",!0)]),_:1},8,["size","modelValue"])],64)}const bJe=de(GZe,[["render",yJe]]),wJe={name:"BuddyPress",props:{is_buddyboss:{type:Boolean,default:!1}},data(){return{stage:"config",loading:!1,groupItems:[],stats:{},featureConfig:{},current_status:{},configMap:{},reset_migration:"no",spaceGroups:window.fluentComAdmin.space_groups,migrating:!1,max_ids:{},has_previous_migration:!1,delete_current_data:"no",delete_confirmation:""}},watch:{reset_migration(t){t!=="yes"&&(this.delete_current_data="no",this.delete_confirmation="")},delete_current_data(t){t!=="yes"&&(this.delete_confirmation="")}},methods:{getMigrationConfig(){this.loading=!0,this.$get("migrations/buddypress/config").then(t=>{this.groupItems=t.groupItems,this.featureConfig=t.featureConfig,this.stats=t.stats,this.current_status=t.current_status,this.has_previous_migration=t.has_previous}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},startMigration(){this.migrating=!0,this.$post("migrations/buddypress/start",{config:this.configMap,reset_migration:this.reset_migration,delete_current_data:this.isDeletionRequested?"yes":"no",delete_current_data_confirmation:this.delete_confirmation}).then(t=>{this.migrating=!0,this.current_status=t.current_status,this.max_ids=t.max_ids,this.stage="migrating",this.startPolling()}).catch(t=>{this.$handleError(t),this.migrating=!1})},startPolling(){this.$get("migrations/buddypress/status").then(t=>{this.current_status=t,this.current_status.current_stage!="completed"&&this.startPolling()}).catch(t=>{this.$handleError(t)})},percentage(t,e){return parseInt(t/e*100)}},computed:{isDeletionRequested(){return this.has_previous_migration&&this.reset_migration==="yes"&&this.delete_current_data==="yes"},providerName(){return this.is_buddyboss?"BuddyBoss":"BuddyPress"},completedSteps(){let t=this.current_status.current_stage;return t=="group_members"?{group_members:!0,posts:!1,users:!1}:t=="posts"?{group_members:!0,posts:!0,users:!1}:t=="users"?{group_members:!0,posts:!0,users:!1}:t=="completed"?{group_members:!0,posts:!0,users:!0}:{group_members:!1,posts:!1,users:!1}}},mounted(){this.getMigrationConfig()}},kJe={class:"setting_header"},CJe={class:"setting_body"},xJe={key:1,class:"fcom_bp_migration_space_table"},SJe=g("hr",null,null,-1),$Je={style:{margin:"20px 0 20px"}},AJe={class:"fcom_listed fcom_mb_20"},EJe={key:0},MJe={key:1},TJe={key:3,class:"fcom_mt_10"},PJe=g("hr",{class:"fcom_mb_20"},null,-1),IJe={key:2,style:{"text-align":"center"}},LJe={style:{"text-align":"left",margin:"0px 20px 30px","font-size":"20px"},class:"fcom_listed"},OJe={key:0},DJe={key:1},RJe=g("hr",{style:{"margin-bottom":"20px"}},null,-1),VJe={key:0},FJe=g("hr",null,null,-1),NJe={key:1},BJe=g("hr",null,null,-1),zJe={key:2},HJe=g("hr",null,null,-1),UJe={key:3},jJe=["href"],WJe={key:3};function YJe(t,e,n,i,s,o){const r=Wt,a=Ci,l=Xr,c=W("InfoFilled"),u=be,d=Cs,h=on,f=Jt,p=Gr,m=Gt,y=Ur,b=ft,k=We,C=Lb,$=xt("loading");return v(),A(ee,null,[g("div",kJe,[g("h2",null,S(t.$t("%s Migration",o.providerName)),1)]),g("div",CJe,[s.loading?(v(),D(r,{key:0,animated:!0,rows:5})):s.stage=="config"?(v(),A("div",xJe,[g("h5",null,S(t.$t("Please configure your %s groups for FluentCommunity Menu",o.providerName)),1),g("p",null,S(t.$t("The %s groups will be created with the same name and users, posts, comments, reactions will be migrated to FluentCommunity.",o.providerName)),1),SJe,s.featureConfig.has_groups?(v(),D(p,{key:0,data:s.groupItems,ref:"spaceTable","empty-text":t.$t("No Groups Found")},{default:w(()=>[_(l,{label:n.is_buddyboss?t.$t("BudyBoss Group"):t.$t("BudyPress Group")},{default:w(x=>[g("div",null,[B(S(x.row.name)+" ",1),x.row.is_migrated?(v(),D(a,{key:0,type:"success"},{default:w(()=>[B(S(t.$t("Migrated")),1)]),_:1})):O("",!0)])]),_:1},8,["label"]),_(l,{label:t.$t("FluentCommunity Menu Group"),"class-name":"space_groups"},{header:w(()=>[g("span",null,S(t.$t("FluentCommunity Menu Group")),1),_(d,{class:"box-item",effect:"dark",content:t.$t("Space will be created under the selected Menu group."),placement:"right"},{default:w(()=>[_(u,{class:"el-icon--right"},{default:w(()=>[_(c)]),_:1})]),_:1},8,["content"])]),default:w(x=>[_(f,{clearable:"",placeholder:t.$t("No Menu Group"),modelValue:s.configMap[x.row.id],"onUpdate:modelValue":M=>s.configMap[x.row.id]=M,filterable:""},{default:w(()=>[_(h,{value:0,label:t.$t("No Menu Group")},null,8,["label"]),(v(!0),A(ee,null,Ce(s.spaceGroups,M=>(v(),D(h,{key:M.id,label:M.title,value:M.id},null,8,["label","value"]))),128))]),_:2},1032,["placeholder","modelValue","onUpdate:modelValue"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])):O("",!0),g("h5",$Je,S(t.$t("The following data will be migrated to FluentCommunity")),1),g("ul",AJe,[s.featureConfig.has_groups?(v(),A("li",EJe,S(t.$t("Total Groups:"))+" "+S(s.groupItems.length),1)):O("",!0),g("li",null,S(t.$t("Total Activity (Posts):"))+" "+S(t.$formatNumber(s.stats.total_posts))+" "+S(t.$t("(+ associate favorites/reactions)")),1),g("li",null,S(t.$t("Total Comments:"))+" "+S(t.$formatNumber(s.stats.total_comments)),1),g("li",null,S(t.$t("Total Users:"))+" "+S(t.$formatNumber(s.stats.total_community_users)),1),s.stats.total_reactions?(v(),A("li",MJe,S(t.$t("Total Reactions:"))+" "+S(t.$formatNumber(s.stats.total_reactions)),1)):O("",!0)]),s.has_previous_migration?(v(),D(m,{key:1,modelValue:s.reset_migration,"onUpdate:modelValue":e[0]||(e[0]=x=>s.reset_migration=x),"true-value":"yes","false-value":"no"},{default:w(()=>[B(S(t.$t("Restart Migration (If unchecked, then it will continue from the last migration stage)")),1)]),_:1},8,["modelValue"])):O("",!0),s.has_previous_migration&&s.reset_migration=="yes"?(v(),D(m,{key:2,modelValue:s.delete_current_data,"onUpdate:modelValue":e[1]||(e[1]=x=>s.delete_current_data=x),"true-value":"yes","false-value":"no"},{default:w(()=>[B(S(t.$t("Delete Current Data (If checked, all current data of fluent community will be deleted and migration will start from scratch)")),1)]),_:1},8,["modelValue"])):O("",!0),o.isDeletionRequested?(v(),A("div",TJe,[_(y,{type:"error",closable:!1,"show-icon":""},{default:w(()=>[B(S(t.$t("This permanently deletes ALL current FluentCommunity data (posts, comments, reactions, media, activity, member profiles and community spaces) and cannot be undone.")),1)]),_:1}),_(b,{modelValue:s.delete_confirmation,"onUpdate:modelValue":e[2]||(e[2]=x=>s.delete_confirmation=x),"aria-label":t.$t("Type %s to confirm","DELETE"),placeholder:t.$t("Type %s to confirm","DELETE"),class:"fcom_mt_10"},null,8,["modelValue","aria-label","placeholder"])])):O("",!0),PJe,_(k,{loading:s.migrating,disabled:o.isDeletionRequested&&s.delete_confirmation!=="DELETE",onClick:e[3]||(e[3]=x=>o.startMigration()),class:"fcom_primary_button"},{default:w(()=>[B(S(t.$t("Start Migrating Data")),1)]),_:1},8,["loading","disabled"])])):s.stage=="migrating"?(v(),A("div",IJe,[g("ul",LJe,[s.featureConfig.has_groups?(v(),A("li",OJe,[B(S(t.$t("Groups"))+" ",1),_(a,{type:"success"},{default:w(()=>[B(S(t.$t("Migrated")),1)]),_:1})])):O("",!0),s.featureConfig.has_groups?De((v(),A("li",DJe,[B(S(t.$t("Group Members"))+" ",1),o.completedSteps.group_members?(v(),D(a,{key:0,type:"success"},{default:w(()=>[B(S(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[$,s.current_status.current_stage=="group_members"]]):O("",!0),De((v(),A("li",null,[B(S(t.$t("Posts & Activities"))+" ",1),o.completedSteps.posts?(v(),D(a,{key:0,type:"success"},{default:w(()=>[B(S(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[$,s.current_status.current_stage=="posts"]]),De((v(),A("li",null,[B(S(t.$t("Users"))+" ",1),o.completedSteps.users?(v(),D(a,{key:0,type:"success"},{default:w(()=>[B(S(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[$,s.current_status.current_stage=="users"]])]),RJe,s.current_status.current_stage=="group_members"?(v(),A("div",VJe,[g("h3",null,S(t.$t("Migrating Group Members from %s to FluentCommunity Spaces",o.providerName)),1),g("p",null,S(t.$t("Please do not close this window or go to other pages")),1),FJe,g("h4",null,S(t.$t("Current Stage:"))+" "+S(s.current_status.last_migrated_member_id)+"/"+S(s.max_ids.group_member_max),1),_(C,{"stroke-width":26,percentage:o.percentage(s.current_status.last_migrated_member_id,s.max_ids.group_member_max),indeterminate:!0},null,8,["percentage"])])):s.current_status.current_stage=="posts"?(v(),A("div",NJe,[g("h3",null,S(t.$t("Migrating Posts from %s to FluentCommunity",o.providerName)),1),g("p",null,S(t.$t("Please do not close this window or go to other pages")),1),BJe,g("h4",null,S(t.$t("Current Stage:"))+" "+S(s.current_status.last_activity_id)+"/"+S(s.max_ids.max_activity_id),1),_(C,{"stroke-width":26,percentage:o.percentage(s.current_status.last_activity_id,s.max_ids.max_activity_id),indeterminate:!0},null,8,["percentage"])])):s.current_status.current_stage=="users"?(v(),A("div",zJe,[g("h3",null,S(t.$t("Syncing User Data from %s to FluentCommunity",o.providerName)),1),g("p",null,S(t.$t("Please do not close this window or go to other pages")),1),HJe,g("h4",null,S(t.$t("Current Stage:"))+" "+S(s.current_status.last_migrated_user_id)+"/"+S(s.max_ids.max_user_id),1),_(C,{"stroke-width":26,percentage:o.percentage(s.current_status.last_migrated_user_id,s.max_ids.max_user_id),indeterminate:!0},null,8,["percentage"])])):s.current_status.current_stage=="completed"?(v(),A("div",UJe,[g("h3",null,S(t.$t("Congratulation! Migration has been completed!")),1),g("p",null,S(t.$t("Enjoy the blazing-fast community portal. Please go to the portal and review your data.")),1),g("a",{class:"el-button fcom_primary_button fcom_mt_20",href:t.appVars.portal_url},S(t.$t("Go to Community Portal")),9,jJe)])):O("",!0)])):(v(),A("div",WJe,S(t.$t("Migration Completed")),1))])],64)}const qJe=de(wJe,[["render",YJe]]),GJe={name:"ManageMigrations",components:{BuddyPress:qJe,Layout:fi,AppLayout:pi},data(){return{selectedMigration:"",loading:!1,migrations:[]}},methods:{getMigrations(){this.loading=!0,this.$get("migrations/").then(t=>{this.migrations=t.migrations,this.loading=!1}).catch(t=>{this.loading=!1,console.log(t)})}},mounted(){this.getMigrations()}},XJe={class:"settings_router"},KJe={class:"fhr_content_layout_body"},ZJe={key:0,class:"fcom_migration_selectors white_loaded"},JJe={key:1},QJe={style:{margin:"0"}},eQe={style:{margin:"10px 0 20px"}},tQe={class:"fcom_box_card_list"},nQe=["onClick"],sQe={style:{padding:"10px"},class:"fcom_box_card_avatar"},iQe=["src"],oQe={class:"fcom_box_card_info"},rQe={style:{"text-align":"center",display:"block"},class:"fcom_box_card_name"},aQe={href:"https://fluentcommunity.co/docs/fluentcommunity-buddyboss-migration",target:"_blank",rel:"noopener"},lQe={key:1,class:"fcom_migration_content"};function cQe(t,e,n,i,s,o){const r=Wt,a=Ur,l=W("BuddyPress"),c=W("layout"),u=W("app-layout");return v(),D(u,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:w(()=>[_(c,{class:"no_bg_layout",title:t.$t("Manage Migrations")},{default:w(()=>[g("div",XJe,[g("div",KJe,[s.selectedMigration?(v(),A("div",lQe,[s.selectedMigration=="buddypress"||s.selectedMigration=="buddyboss"?(v(),D(l,{key:0,is_buddyboss:s.selectedMigration=="buddyboss"},null,8,["is_buddyboss"])):O("",!0)])):(v(),A("div",ZJe,[s.loading?(v(),D(r,{key:0,animated:!0})):(v(),A("div",JJe,[g("h3",QJe,S(t.$t("Migrate Data from other plugins.")),1),g("p",eQe,S(t.$t("Please select a plugin from where you want to migrate data to FluentCommunity.")),1),g("div",tQe,[(v(!0),A(ee,null,Ce(s.migrations,d=>(v(),A("div",{style:{border:"1px solid var(--fcom-primary-border, #e5e7eb)","text-align":"center"},key:d.key,onClick:h=>s.selectedMigration=d.key,class:"fcom_each_box_card"},[g("div",sQe,[d.logo?(v(),A("img",{key:0,style:{width:"200px","max-width":"100%","object-fit":"scale-down"},src:d.logo,alt:""},null,8,iQe)):O("",!0)]),g("div",oQe,[g("div",rQe,[g("h4",null,S(d.title),1)])])],8,nQe))),128))])])),_(a,{type:"warning",closable:!1,style:{"margin-top":"15px"}},{default:w(()=>[g("p",null,[B(S(t.$t("For large databases, please read our documentation and use wp-cli."))+" ",1),g("a",aQe,S(t.$t("Read Documentation")),1)])]),_:1})]))])])]),_:1},8,["title"])]),_:1})}const uQe=de(GJe,[["render",cQe]]),dQe={name:"GeneticPromo",props:{placement:{type:String,default:"generic_promo"}}},hQe={class:"fcom_generic_promo"},fQe={style:{"text-align":"center"},class:"fcom_upgrade_banner"},pQe={style:{"font-size":"18px","margin-bottom":"10px"}},mQe=["href"];function gQe(t,e,n,i,s,o){return v(),A("div",hQe,[g("div",fQe,[g("h3",pQe,S(t.$t("This feature is available on the pro version of FluentCommunity")),1),g("a",{class:"el-button fcom_primary_button",href:t.$upgradeUrl(n.placement),target:"_blank"},S(t.$t("Upgrade Now")),9,mQe)])])}const vQe=de(dQe,[["render",gQe]]),_Qe={name:"AccessAutomator",components:{GeneticPromo:vQe,AppLayout:pi,Layout:fi},data(){return{loading:!1,saving:!1,settings:{},crm_tags:[],spaceGroups:null,has_fluentcrm:!1}},methods:{fetchSettings(){this.loading=!0,this.$get("settings/crm-tagging-config").then(t=>{this.has_fluentcrm=t.has_fluentcrm,this.settings=t.settings,this.spaceGroups=t.spaceGroups,this.crm_tags=t.crm_tags}).catch(t=>{console.error(t)}).finally(()=>{this.loading=!1})},saveSettings(){if(!this.has_pro){this.$notify.error(this.$t("This feature is available on the pro version of FluentCommunity"));return}this.saving=!0,this.$post("settings/crm-tagging-config",{settings:this.settings}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},installPlugin(t){this.saving=!0,this.$post("settings/install_plugin",{plugin:t}).then(e=>{e.is_installed?this.$notify.success(e.message):this.$notify.error(this.$t("Sorry, the selected plugins could not be installed")),this.fetchSettings()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.has_pro&&this.fetchSettings()}},yQe={class:"settings_router"},bQe={class:"fhr_content_layout_body_"},wQe={class:"fcom_settings_header"},kQe={class:"setting_body_"},CQe={key:0,class:"white_loaded"},xQe={key:1,class:"white_loaded"},SQe={key:2,class:"white_loaded"},$Qe={class:"fcom_generic_promo"},AQe={style:{"text-align":"center"},class:"fcom_upgrade_banner"},EQe={style:{"font-size":"18px","margin-bottom":"10px"}},MQe={key:3},TQe={class:"white_loaded fcom_mb_20"},PQe={class:"fcom_input_wrap"},IQe={key:0},LQe={class:"fcom_input_wrap"},OQe={class:"fcom_input_wrap"},DQe={key:0,class:"fcom_input_wrap"},RQe={key:0,class:"fcom_mapped_list"},VQe={class:"fcom_mapped_list__head"},FQe={class:"fcom_mapped_list__group_title"},NQe={class:"fcom_mapped_list__space"},BQe=["innerHTML"],zQe=["innerHTML"],HQe={key:2,class:"fcom_mapped_list__icon fcom_no_avatar"},UQe={class:"fcom_mapped_list__name"},jQe={class:"fcom_mapped_list__actions"},WQe={key:1,class:"white_loaded"},YQe={key:4};function qQe(t,e,n,i,s,o){const r=We,a=Ur,l=Wt,c=W("genetic-promo"),u=Gt,d=sn,h=be,f=on,p=Jt,m=W("layout"),y=W("app-layout");return v(),D(y,{wrapper_class:"fcom_single_layout fcom_access_automator fcom_max_layout"},{default:w(()=>[_(m,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Access Management with FluentCRM")},{actions:w(()=>[s.spaceGroups?(v(),D(r,{key:0,class:"fcom_primary_button",loading:s.saving,onClick:o.saveSettings},{default:w(()=>[g("span",null,S(t.$t("Save Settings")),1)]),_:1},8,["loading","onClick"])):O("",!0)]),default:w(()=>[g("div",yQe,[g("div",bQe,[g("div",wQe,[g("h2",null,S(t.$t("Automate your Course or Space accesses with FluentCRM Tags")),1),g("p",null,S(t.$t("Control user accesses to different spaces/courses of your portal based on the contact tags.")),1),g("p",null,S(t.$t("Select the corresponding FluentCRM Tag for each space/course. So when someone gets the tag, they will get access to the space/course. Similarly when someone join a space or course they will be tagged in FluentCRM.")),1),_(a,{class:"fcom_pro_tag",type:"warning",closable:!1,size:"small"},{default:w(()=>[B(S(t.$t("Please note: Existing contact with the tags will not get access automatically. To Give access to existing contacts with tags, please go to FluentCRM and use bulk actions.")),1)]),_:1})]),g("div",kQe,[s.loading?(v(),A("div",CQe,[_(l,{rows:5,animated:!0})])):t.has_pro?s.has_fluentcrm?s.settings&&s.spaceGroups?(v(),A("div",MQe,[g("div",TQe,[_(d,{onSubmit:e[5]||(e[5]=Ae(b=>t.doNothing(),["prevent"])),modelValue:s.settings,"onUpdate:modelValue":e[6]||(e[6]=b=>s.settings=b),"label-position":"top"},{default:w(()=>[g("div",PQe,[_(u,{modelValue:s.settings.is_enabled,"onUpdate:modelValue":e[1]||(e[1]=b=>s.settings.is_enabled=b),"true-value":"yes","false-value":"no"},{default:w(()=>[B(S(t.$t("Enable Access Management with FluentCRM")),1)]),_:1},8,["modelValue"]),s.settings.is_enabled!="yes"?(v(),A("p",IQe,S(t.$t("Enable to configure your access management with FluentCRM")),1)):O("",!0)]),s.settings.is_enabled=="yes"?(v(),A(ee,{key:0},[g("div",LQe,[_(u,{modelValue:s.settings.create_crm_contact,"onUpdate:modelValue":e[2]||(e[2]=b=>s.settings.create_crm_contact=b),"true-value":"yes","false-value":"no"},{default:w(()=>[B(S(t.$t("Create contact in FluentCRM (if not exist) when join in the configured spaces / courses.")),1)]),_:1},8,["modelValue"]),g("p",null,S(t.$t("If enabled then, FluentCommunity will create a contact to assign the associate tags from your configuration. Otherwise it will skip tagging.")),1)]),g("div",OQe,[_(u,{modelValue:s.settings.create_user,"onUpdate:modelValue":e[3]||(e[3]=b=>s.settings.create_user=b),"true-value":"yes","false-value":"no"},{default:w(()=>[B(S(t.$t("Create User in WP when you apply a configured tag on a contact to add to the course / space.")),1)]),_:1},8,["modelValue"]),g("p",null,S(t.$t("If enabled then, a WP user will be created if not exist and add to the configured course or space.")),1)]),s.settings.create_user=="yes"?(v(),A("div",DQe,[_(u,{modelValue:s.settings.send_welcome_email,"onUpdate:modelValue":e[4]||(e[4]=b=>s.settings.send_welcome_email=b),"true-value":"yes","false-value":"no"},{default:w(()=>[B(S(t.$t("Send default WP welcome email when creating the user by tagging.")),1)]),_:1},8,["modelValue"]),g("p",null,S(t.$t("If enabled then, The default WordPress welcome and password set email will be sent.")),1)])):O("",!0)],64)):O("",!0)]),_:1},8,["modelValue"])]),s.settings.is_enabled=="yes"?(v(),A("div",RQe,[g("div",VQe,[g("span",null,S(t.$t("Space")),1),g("span",null,S(t.$t("Mapped FluentCRM Tag")),1)]),(v(!0),A(ee,null,Ce(s.spaceGroups,b=>(v(),A("div",{class:"fcom_mapped_list__group",key:b.id},[g("div",FQe,S(b.title),1),(v(!0),A(ee,null,Ce(b.spaces,k=>(v(),A("div",{class:"fcom_mapped_list__row",key:k.id},[g("div",NQe,[k.icon?(v(),D(h,{key:0,class:"fcom_mapped_list__icon"},{default:w(()=>[g("span",{innerHTML:k.icon},null,8,BQe)]),_:2},1024)):k.shape_svg?(v(),A("span",{key:1,class:"fcom_mapped_list__icon",innerHTML:k.shape_svg},null,8,zQe)):(v(),A("span",HQe)),g("span",UQe,S(k.title),1)]),g("div",jQe,[_(p,{filterable:"",clearable:"",placeholder:t.$t("No Mapping"),modelValue:s.settings.tagging_maps[k.id],"onUpdate:modelValue":C=>s.settings.tagging_maps[k.id]=C},{default:w(()=>[(v(!0),A(ee,null,Ce(s.crm_tags,C=>(v(),D(f,{label:C.title,value:C.id},null,8,["label","value"]))),256))]),_:2},1032,["placeholder","modelValue","onUpdate:modelValue"]),s.settings.tagging_maps[k.id]?(v(),D(u,{key:0,modelValue:s.settings.linked_maps[k.id],"onUpdate:modelValue":C=>s.settings.linked_maps[k.id]=C,"true-value":s.settings.tagging_maps[k.id],"false-value":""},{default:w(()=>[B(S(t.$t("Sync this tag with the %s access",k.type=="community"?t.$labelize("space"):t.$labelize("course"))),1)]),_:2},1032,["modelValue","onUpdate:modelValue","true-value"])):O("",!0)])]))),128))]))),128))])):O("",!0),t.has_pro?(v(),D(r,{key:2,class:"fcom_primary_button",loading:s.saving,onClick:o.saveSettings},{default:w(()=>[g("span",null,S(t.$t("Save Settings")),1)]),_:1},8,["loading","onClick"])):(v(),A("div",WQe,[_(c,{placement:"feature_lock_access_automator"})]))])):(v(),A("div",YQe,[g("p",null,S(t.$t("Settings could not be loaded")),1)])):(v(),A("div",SQe,[g("div",$Qe,[g("div",AQe,[g("h3",EQe,S(t.$t("FluentCRM is not installed!")),1),g("p",null,S(t.$t("Please install FluentCRM to enable this feature.")),1),_(r,{loading:s.saving,class:"el-button fcom_primary_button",onClick:e[0]||(e[0]=b=>o.installPlugin("fluent-crm"))},{default:w(()=>[B(S(t.$t("Install FluentCRM")),1)]),_:1},8,["loading"])])])])):(v(),A("div",xQe,[_(c,{placement:"feature_lock_access_automator"})]))])])])]),_:1},8,["title"])]),_:1})}const GQe=de(_Qe,[["render",qQe]]),XQe={name:"TopicsConfig",emits:["saved"],data(){return{config:this.appVars.topicsConfig,loading:!1}},methods:{update(){this.loading=!0,this.$post("admin/topics/config",{config:this.config}).then(t=>{this.$notify.success(t.message),this.appVars.topicsConfig=t.config,this.$emit("saved")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}}};function KQe(t,e,n,i,s,o){const r=Ib,a=en,l=Gt,c=We,u=sn,d=xt("loading");return v(),D(u,{onSubmit:e[4]||(e[4]=Ae(h=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:s.config,"onUpdate:modelValue":e[5]||(e[5]=h=>s.config=h)},{default:w(()=>[_(a,{label:t.$t("Maximum Number of Topics a user can select when creating a post")},{default:w(()=>[_(r,{modelValue:s.config.max_topics_per_post,"onUpdate:modelValue":e[0]||(e[0]=h=>s.config.max_topics_per_post=h),min:1,max:20,step:1},null,8,["modelValue"])]),_:1},8,["label"]),_(a,{label:t.$t("Maximum Number of Topics a space may have")},{default:w(()=>[_(r,{modelValue:s.config.max_topics_per_space,"onUpdate:modelValue":e[1]||(e[1]=h=>s.config.max_topics_per_space=h),min:1,max:40,step:1},null,8,["modelValue"])]),_:1},8,["label"]),_(a,{label:t.$t("Show/Hide Topics On post Card")},{default:w(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:s.config.show_on_post_card,"onUpdate:modelValue":e[2]||(e[2]=h=>s.config.show_on_post_card=h),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Show Topics on Post Card")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(a,null,{default:w(()=>[De((v(),D(c,{class:"fcom_primary_button",onClick:e[3]||(e[3]=h=>o.update())},{default:w(()=>[B(S(t.$t("Update")),1)]),_:1})),[[d,s.loading]])]),_:1})]),_:1},8,["modelValue"])}const ZQe=de(XQe,[["render",KQe]]),JQe={name:"TopicCreateForm",components:{SpaceIcon:hp,SlugInput:Rd},emits:["saved"],props:{space_id:{type:Number,required:!1},all_spaces:{type:Array,required:!1,default:()=>[]},topic:{type:Object,required:!1,default:{title:"",description:"",slug:"",space_ids:[],admin_only:"no"}}},data(){return{saving:!1,editing_topic:this.topic,formattedSpaceGroups:[]}},methods:{createOrupdateTopic(){this.saving=!0,this.space_id&&(this.editing_topic.space_ids=[this.space_id],this.editing_topic.inline="yes"),this.$post("admin/topics",this.editing_topic).then(t=>{this.$notify.success(t.message),this.$emit("saved",t.topic)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},formatSpaceGroups(){if(this.space_id||this.all_spaces.length==0)return;let t=this.all_spaces,e=this.appVars.space_groups,n=[],i=[];this.each(e,r=>{let a=t.filter(l=>{let c=l.parent_id==r.id;return c&&i.push(l.slug),c});a.length&&n.push({label:r.title,spaces:a})});let s=e.map(r=>r.id),o=t.filter(r=>{let a=!s.includes(r.id),l=!r.parent_id||!s.includes(r.parent_id);return a&&l&&!i.includes(r.slug)});o.length&&n.push({label:this.$t("Other Spaces - No Assigned Group"),spaces:o}),this.formattedSpaceGroups=n}},mounted(){this.formatSpaceGroups()}},QQe={class:"fcom_help_text"},eet={key:0,class:"fcom_space_title"},tet={key:0},net={key:1},set={class:"fcom_help_text"};function iet(t,e,n,i,s,o){const r=ft,a=en,l=W("slug-input"),c=W("SpaceIcon"),u=on,d=Mb,h=Jt,f=Gt,p=We,m=sn,y=xt("loading");return v(),D(m,{onSubmit:e[5]||(e[5]=Ae(b=>t.doNothing(),["prevent"])),modelValue:s.editing_topic,"onUpdate:modelValue":e[6]||(e[6]=b=>s.editing_topic=b),"label-position":"top"},{default:w(()=>[_(a,{label:t.$t("Topic Title")},{default:w(()=>[_(r,{placeholder:t.$t("Title of your topic"),modelValue:s.editing_topic.title,"onUpdate:modelValue":e[0]||(e[0]=b=>s.editing_topic.title=b),type:"text"},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),_(a,{label:t.$t("Topic Slug")},{default:w(()=>[_(l,{disabled:!!s.editing_topic.id,modelValue:s.editing_topic.slug,"onUpdate:modelValue":e[1]||(e[1]=b=>s.editing_topic.slug=b),placeholder:t.$t("Slug of your topic")},null,8,["disabled","modelValue","placeholder"])]),_:1},8,["label"]),_(a,{label:t.$t("Topic sub-title")},{default:w(()=>[_(r,{placeholder:t.$t("Sub-title of your topic"),modelValue:s.editing_topic.description,"onUpdate:modelValue":e[2]||(e[2]=b=>s.editing_topic.description=b),type:"text"},null,8,["placeholder","modelValue"]),g("div",QQe,[g("p",null,S(t.$t("This will be displayed under the title in the topic when selecting in post creation form")),1)])]),_:1},8,["label"]),n.space_id?O("",!0):(v(),D(a,{key:0,label:t.$t("Space visibility")},{default:w(()=>[_(h,{modelValue:s.editing_topic.space_ids,"onUpdate:modelValue":e[3]||(e[3]=b=>s.editing_topic.space_ids=b),multiple:"",placeholder:t.$t("Select Spaces"),style:{width:"100%"}},{default:w(()=>[(v(!0),A(ee,null,Ce(s.formattedSpaceGroups,b=>(v(),D(d,{key:b.label,label:b.label},{default:w(()=>[(v(!0),A(ee,null,Ce(b.spaces,k=>(v(),D(u,{key:k.slug,label:k.title,value:k.id.toString()},{default:w(()=>[k.id?(v(),A("span",eet,[_(c,{space_profile:k},null,8,["space_profile"]),g("span",null,[B(S(t.getExcerpt(k.title,50))+" ",1),k.type=="course"?(v(),A("span",tet," ("+S(t.$t("course"))+")",1)):O("",!0)])])):(v(),A("span",net,S(t.getExcerpt(k.title,50)),1))]),_:2},1032,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"]),g("div",set,[g("p",null,S(t.$t("Select spaces where this topic will be visible.")),1)])]),_:1},8,["label"])),_(a,null,{default:w(()=>[_(f,{modelValue:s.editing_topic.admin_only,"onUpdate:modelValue":e[4]||(e[4]=b=>s.editing_topic.admin_only=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Only admins and moderators can select this topic")),1)]),_:1},8,["modelValue"])]),_:1}),_(a,null,{default:w(()=>[De((v(),D(p,{class:"fcom_primary_button",onClick:o.createOrupdateTopic,disabled:s.saving},{default:w(()=>[B(S(t.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[y,s.saving]])]),_:1})]),_:1},8,["modelValue"])}const oet=de(JQe,[["render",iet]]),ret={name:"AllTopics",components:{TopicCreateForm:oet,SlugInput:Rd,SpaceIcon:hp,Layout:fi,AppLayout:pi,TopicsConfig:ZQe},data(){return{topics:[],saving:!1,loading:!1,search:"",showModal:!1,editing_topic:{title:"",description:"",slug:"",space_ids:[],admin_only:"no"},all_spaces:[],showConfig:!1}},methods:{showForm(t){this.editing_topic=t||{title:"",slug:"",space_ids:[],admin_only:"no"},this.showModal=!0},fetch(){this.loading=!0,this.$get("admin/topics",{search:this.search}).then(t=>{this.topics=t.topics,this.all_spaces=t.all_spaces}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},removeTopic(t){this.$confirm(this.$t("Are you sure you want to remove this topic?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.saving=!0,this.$del("admin/topics/"+t.id).then(e=>{this.$notify.success(e.message),this.fetch()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})})},formatTopics(t){let e=this.all_spaces,n=[];return t.forEach(i=>{let s=e.find(o=>o.id==i);s&&n.push(s.title)}),n.join(", ")}},mounted(){this.has_pro&&this.fetch(),this.changeTitle(this.$t("Topics Settings"))}},aet=["href"],cet={key:0,class:"fhr_content_layout_body"},uet={class:"fcom_mb_10"},det={class:"fcom_manager_actions fcom_mb_10"},het={class:"bulk_search"},fet=g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[g("path",{d:"M14.5833 14.584L18.3333 18.334",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M16.6667 9.16699C16.6667 5.02486 13.3088 1.66699 9.16666 1.66699C5.02453 1.66699 1.66666 5.02486 1.66666 9.16699C1.66666 13.3091 5.02453 16.667 9.16666 16.667C13.3088 16.667 16.6667 13.3091 16.6667 9.16699Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})],-1),pet={style:{margin:"0",padding:"0"}},met={class:"fcom_meta_text"},get={class:"fcom_table_action_col"},vet={key:1,class:"settings_router"},_et={class:"fhr_content_layout_body"},yet={class:"setting_body",style:{"text-align":"center"}},bet={class:"promo_description"},wet=["href"],ket={class:"dialog_header"},Cet={class:"dialog_left"},xet=g("div",{class:"header_icon"},[g("svg",{viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"},[g("path",{d:"M2.73552 11.6867C1.78253 12.7511 1.76203 14.3569 2.63665 15.4865C4.37226 17.7281 6.2719 19.6277 8.51351 21.3633C9.64313 22.238 11.2489 22.2175 12.3133 21.2645C15.203 18.6771 17.8494 15.9731 20.4033 13.0016C20.6558 12.7078 20.8137 12.3477 20.8492 11.9619C21.0059 10.2561 21.3279 5.34144 19.9932 4.00675C18.6586 2.67207 13.7439 2.99408 12.0381 3.15083C11.6523 3.18627 11.2922 3.34421 10.9984 3.59671C8.02692 6.15064 5.32291 8.797 2.73552 11.6867Z",stroke:"currentColor","stroke-width":"1.5"}),g("path",{opacity:"0.4",d:"M7.5 14.5L9.5 16.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M18 6L22 2",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"})])],-1),$et={key:0,class:"dialog_body"};function Aet(t,e,n,i,s,o){const r=W("Plus"),a=be,l=We,c=W("Operation"),u=ft,d=Xr,h=W("DeleteFilled"),f=Gr,p=W("layout"),m=W("app-layout"),y=W("TopicCreateForm"),b=Ss,k=W("TopicsConfig"),C=xt("loading");return v(),A(ee,null,[_(m,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(p,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Topics")},{actions:w(()=>[t.has_pro?(v(),A(ee,{key:0},[_(l,{class:"fcom_primary_button",onClick:e[0]||(e[0]=$=>o.showForm(null))},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,S(t.$t("New Topic")),1)]),_:1}),_(l,{onClick:e[1]||(e[1]=$=>s.showConfig=!0),class:"fcom_secondary_button"},{default:w(()=>[_(a,null,{default:w(()=>[_(c)]),_:1}),g("span",null,S(t.$t("Settings")),1)]),_:1})],64)):(v(),A("a",{key:1,target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_topics"),class:"el-button el-button--danger"},S(t.$t("Upgrade to Pro")),9,aet))]),default:w(()=>[t.has_pro?(v(),A("div",cet,[g("div",null,[g("p",uet,S(t.$t("Categorize your content and allow members to filter posts with the topic navigation bar in spaces.")),1),g("div",det,[g("div",het,[_(u,{modelValue:s.search,"onUpdate:modelValue":e[2]||(e[2]=$=>s.search=$),onKeydown:ut(o.fetch,["enter"]),placeholder:t.$t("Search"),class:"el-input-round"},{prefix:w(()=>[fet]),_:1},8,["modelValue","onKeydown","placeholder"])])]),De((v(),D(f,{data:s.topics,style:{"border-radius":"8px"},"empty-text":t.$t("No Topics Found")},{default:w(()=>[_(d,{label:t.$t("Title"),"min-width":"160"},{default:w($=>[g("p",pet,S($.row.title),1),g("span",met,S($.row.description),1)]),_:1},8,["label"]),_(d,{label:t.$t("Spaces"),"min-width":"140"},{default:w($=>[g("span",null,S(o.formatTopics($.row.space_ids)),1)]),_:1},8,["label"]),_(d,{label:t.$t("Admin Only?"),width:"120"},{default:w($=>[g("span",null,S($.row.admin_only=="yes"?t.$t("Yes"):t.$t("No")),1)]),_:1},8,["label"]),_(d,{label:t.$t("Actions"),width:"160"},{default:w($=>[g("div",get,[_(l,{onClick:x=>o.showForm($.row),size:"small"},{default:w(()=>[B(S(t.$t("Edit")),1)]),_:2},1032,["onClick"]),_(l,{"aria-label":t.$t("Delete"),onClick:x=>o.removeTopic($.row),type:"danger",plain:"",size:"small"},{default:w(()=>[_(a,null,{default:w(()=>[_(h)]),_:1})]),_:2},1032,["aria-label","onClick"])])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[C,s.loading]])])])):(v(),A("div",vet,[g("div",_et,[g("div",yet,[g("p",bet,S(t.$t("__TOPIC_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_topics"),class:"el-button el-button--danger"},S(t.$t("Upgrade to Pro")),9,wet)])])]))]),_:1},8,["title"])]),_:1}),_(b,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:s.showModal,"onUpdate:modelValue":e[4]||(e[4]=$=>s.showModal=$),direction:"rtl"},{header:w(({close:$})=>[g("div",ket,[g("div",Cet,[xet,g("div",null,[g("h4",null,S(s.editing_topic.id?t.$t("Update Topic"):t.$t("Add Topic")),1)])])])]),default:w(()=>[s.showModal?(v(),A("div",$et,[s.showModal?(v(),D(y,{key:0,all_spaces:s.all_spaces,topic:s.editing_topic,onSaved:e[3]||(e[3]=$=>{s.showModal=!1,o.fetch()})},null,8,["all_spaces","topic"])):O("",!0)])):O("",!0)]),_:1},8,["width","modelValue"]),_(b,{"close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,title:t.$t("Topics Settings"),modelValue:s.showConfig,"onUpdate:modelValue":e[6]||(e[6]=$=>s.showConfig=$),direction:"rtl"},{default:w(()=>[s.showConfig?(v(),D(k,{key:0,onSaved:e[5]||(e[5]=$=>{s.showConfig=!1})})):O("",!0)]),_:1},8,["width","title","modelValue"])],64)}const Eet=de(ret,[["render",Aet]]),Met={name:"CustomizationSettings",components:{Layout:fi,AppLayout:pi},data(){return{loadingCustomizations:!1,loadingSnippets:!1,savingCustomizations:!1,savingSnippets:!1,settings:null,snippetsSettings:null,settingsDirty:!1,snippetsDirty:!1,postOrderOptions:this.appVars.post_order_by_options}},watch:{settings:{handler(){this.settingsDirty=!0},deep:!0},snippetsSettings:{handler(){this.snippetsDirty=!0},deep:!0}},methods:{getCustomizations(){this.loadingCustomizations=!0,this.$get("settings/customization-settings").then(t=>{this.settings=t.settings,this.$nextTick(()=>{this.settingsDirty=!1})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loadingCustomizations=!1})},saveAll(){this.settingsDirty&&this.snippetsDirty?this.saveSnippets(!0).then(()=>{this.saveCustomizations()}):this.settingsDirty?this.saveCustomizations():this.snippetsDirty?this.saveSnippets():this.saveCustomizations()},saveCustomizations(){this.savingCustomizations=!0,this.$post("settings/customization-settings",{settings:this.settings}).then(t=>{this.settingsDirty=!1,this.$notify.success(t.message),window.location.reload()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.savingCustomizations=!1})},getSnippetsSettings(){this.loadingSnippets=!0,this.$get("settings/snippets-settings").then(t=>{this.snippetsSettings=t.snippets,this.$nextTick(()=>{this.snippetsDirty=!1})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loadingSnippets=!1})},saveSnippets(t=!1){return this.savingSnippets=!0,this.$post("settings/snippets-settings",{snippets:this.snippetsSettings}).then(e=>{this.snippetsDirty=!1,this.$notify.success(e.message)}).catch(e=>{if(this.$handleError(e),t)throw e}).finally(()=>{this.savingSnippets=!1})}},mounted(){this.getCustomizations(),this.has_pro&&this.getSnippetsSettings(),this.changeTitle(this.$t("Customization Settings"))}},Tet={class:"settings_router"},Pet={key:0,class:"white_loaded"},Iet={key:1,class:"fhr_content_layout_body"},Let={class:"setting_header"},Oet={class:"setting_body"},Det={class:"fcom_input_wrap"},Ret={class:"fcom_input_wrap"},Vet={class:"fcom_input_wrap"},Fet={class:"fcom_input_wrap"},Net={class:"fcom_input_wrap"},Bet={key:0},zet={class:"fcom_input_wrap"},Het={key:0,class:"fcom_input_wrap"},Uet=["innerHTML"],jet={key:1,style:{cursor:"pointer","font-weight":"bold"}},Wet={class:"fcom_input_wrap"},Yet={style:{"font-weight":"bold"}},qet={class:"fcom_help_text"},Get={target:"_blank",rel:"noopener",href:"https://wpmanageninja.com/affiliate/"},Xet={class:"fcom_input_wrap"},Ket={class:"fcom_input_wrap"},Zet={class:"fcom_input_wrap"},Jet={key:0},Qet={class:"fcom_help_text"},ett={class:"fcom_input_wrap"},ttt={key:0},ntt={class:"fcom_help_text"},stt={class:"fcom_input_wrap"},itt={class:"fcom_help_text"},ott={key:2,class:"fcom_input_wrap"},rtt={class:"fcom_help_text"},att={class:"fcom_input_wrap"},ltt={class:"fcom_help_text"},ctt={key:0},utt={key:1},dtt={class:"fcom_input_wrap"},htt={class:"fcom_input_wrap"},ftt={style:{margin:"20px 0 0 0"},class:"fcom_input_wrap"},ptt={key:2},mtt=g("div",{style:{"margin-top":"30px"}},null,-1),gtt={key:0,class:"white_loaded"},vtt={key:1,class:"fhr_content_layout_body"},_tt={class:"setting_header"},ytt={class:"setting_body"},btt={class:"setting_sub_header"},wtt={class:"setting_sub_body"},ktt={class:"setting_sub_header"},Ctt={class:"setting_sub_body"},xtt={style:{margin:"20px 0 0 0"},class:"fcom_input_wrap"},Stt={key:2},$tt={key:4,class:"fhr_content_layout_body",style:{"text-align":"center"}},Att={class:"setting_header"},Ett={class:"setting_body"},Mtt={class:"promo_description"},Ttt=["href"];function Ptt(t,e,n,i,s,o){const r=We,a=Wt,l=Gt,c=ft,u=No,d=Mi,h=xs,f=en,p=on,m=Jt,y=sn,b=iV,k=W("layout"),C=W("app-layout"),$=xt("loading");return v(),D(C,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(k,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Customize Your Portal")},{actions:w(()=>[_(r,{class:"fcom_primary_button",disabled:s.savingCustomizations||s.savingSnippets||s.loadingCustomizations||s.loadingSnippets,onClick:o.saveAll},{default:w(()=>[g("span",null,S(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),default:w(()=>[g("div",Tet,[s.loadingCustomizations?(v(),A("div",Pet,[_(a,{rows:5,animated:!0})])):s.settings?(v(),A("div",Iet,[g("div",Let,[g("h2",null,S(t.$t("Customize the UI features of the portal")),1)]),g("div",Oet,[_(y,{onSubmit:e[20]||(e[20]=Ae(x=>t.doNothing(),["prevent"])),modelValue:s.settings,"onUpdate:modelValue":e[21]||(e[21]=x=>s.settings=x),"label-position":"top"},{default:w(()=>[g("div",Det,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.dark_mode,"onUpdate:modelValue":e[0]||(e[0]=x=>s.settings.dark_mode=x),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Enable Dark Mode")),1)]),_:1},8,["modelValue"]),g("p",null,S(t.$t("Enables switching between dark and light interface themes, accommodating different lighting conditions and user preferences.")),1)]),g("div",Ret,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.fixed_page_header,"onUpdate:modelValue":e[1]||(e[1]=x=>s.settings.fixed_page_header=x),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Enable Sticky Page headers across portal")),1)]),_:1},8,["modelValue"]),g("p",null,S(t.$t("When enabled, the page header will remain visible at the top of the screen as users scroll down the page.")),1)]),g("div",Vet,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.feed_link_on_sidebar,"onUpdate:modelValue":e[2]||(e[2]=x=>s.settings.feed_link_on_sidebar=x),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Show Default Feed link on left sidebar")),1)]),_:1},8,["modelValue"]),g("p",null,S(t.$t("Adds the default Feed link in the sidebar, providing an extra access point to the all feeds page")),1)]),g("div",Fet,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.collapse_sidebar_groups,"onUpdate:modelValue":e[3]||(e[3]=x=>s.settings.collapse_sidebar_groups=x),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Collapse sidebar groups by default")),1)]),_:1},8,["modelValue"]),g("p",null,S(t.$t("When enabled, all space groups in the left sidebar will be collapsed by default. Users can still expand them manually.")),1)]),g("div",Net,[_(l,{disabled:!t.has_pro,"true-value":"yes","false-value":"no",modelValue:s.settings.enable_sidebar_toggle,"onUpdate:modelValue":e[4]||(e[4]=x=>s.settings.enable_sidebar_toggle=x),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Enable sidebar collapse on desktop"))+" ",1),t.has_pro?O("",!0):(v(),A("span",Bet,"("+S(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled","modelValue"]),g("p",null,S(t.$t("__SIDEBAR_TOGGLE_DESC")),1)]),g("div",zet,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.hide_header_on_scroll,"onUpdate:modelValue":e[5]||(e[5]=x=>s.settings.hide_header_on_scroll=x),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Hide Header & Footer on Scroll (Mobile)")),1)]),_:1},8,["modelValue"]),g("p",null,S(t.$t("On mobile devices, the header and footer will automatically hide when scrolling down and reappear when scrolling up.")),1)]),t.has_pro?(v(),A("div",Het,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.show_powered_by,"onUpdate:modelValue":e[6]||(e[6]=x=>s.settings.show_powered_by=x),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Show powered by text")),1)]),_:1},8,["modelValue"]),g("p",null,[B(S(t.$t("Displays a 'Powered by FluentCommunity' link, showing support for the platform and increasing its visibility."))+" ",1),_(u,{persistent:!1,placement:"bottom",width:400,trigger:"click"},{reference:w(()=>[s.settings.affiliate_id?(v(),A("span",jet,S(t.$t("Affiliate ID: %s",s.settings.affiliate_id)),1)):(v(),A("span",{key:0,style:{cursor:"pointer"},innerHTML:t.$t("%1$sClick here%2$s to add affiliate ID","<b>","</b>")},null,8,Uet))]),default:w(()=>[g("div",Wet,[g("label",Yet,S(t.$t("Your affiliate ID")),1),_(c,{style:{margin:"20px 0"},placeholder:t.$t("Affiliate ID"),type:"number",modelValue:s.settings.affiliate_id,"onUpdate:modelValue":e[7]||(e[7]=x=>s.settings.affiliate_id=x)},null,8,["placeholder","modelValue"]),De((v(),D(r,{onClick:o.saveCustomizations,disabled:s.savingCustomizations,class:"fcom_primary_button"},{default:w(()=>[B(S(t.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[$,s.savingCustomizations]])]),g("div",qet,[g("p",null,[B(S(t.$t("Don't have an affiliate account?"))+" ",1),g("a",Get,S(t.$t("Click here"))+".",1)])])]),_:1})])])):O("",!0),g("div",Xet,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.icon_on_header_menu,"onUpdate:modelValue":e[8]||(e[8]=x=>s.settings.icon_on_header_menu=x),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Show icon on header menu items")),1)]),_:1},8,["modelValue"]),g("p",null,S(t.$t("Adds icons next to text in header menu items, enhancing visual appeal and improving navigation clarity.")),1)]),g("div",Ket,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.show_post_modal,"onUpdate:modelValue":e[9]||(e[9]=x=>s.settings.show_post_modal=x),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Use Modal UI for quick post view")),1)]),_:1},8,["modelValue"]),g("p",null,S(t.$t("If you enable this then, posts will be shown as modal when interacting")),1)]),O("",!0),g("div",Zet,[_(f,{label:t.$t("Rich Media Post Layout")},{default:w(()=>[_(h,{modelValue:s.settings.rich_post_layout,"onUpdate:modelValue":e[11]||(e[11]=x=>s.settings.rich_post_layout=x),class:"fcom_radio_group"},{default:w(()=>[_(d,{value:"classic"},{default:w(()=>[B(S(t.$t("Classic")),1)]),_:1}),_(d,{disabled:!t.has_pro,value:"modern"},{default:w(()=>[B(S(t.$t("Modern"))+" ",1),t.has_pro?O("",!0):(v(),A("span",Jet,"("+S(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",Qet,[g("p",null,S(t.$t("Classic: Image/Video after the content. Modern: Image/Video at first")),1)])]),_:1},8,["label"])]),g("div",ett,[_(f,{label:t.$t("Members List Layout")},{default:w(()=>[_(h,{modelValue:s.settings.member_list_layout,"onUpdate:modelValue":e[12]||(e[12]=x=>s.settings.member_list_layout=x),class:"fcom_radio_group"},{default:w(()=>[_(d,{value:"classic"},{default:w(()=>[B(S(t.$t("List View")),1)]),_:1}),_(d,{disabled:!t.has_pro,value:"grid"},{default:w(()=>[B(S(t.$t("Grid View"))+" ",1),t.has_pro?O("",!0):(v(),A("span",ttt,"("+S(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",ntt,[g("p",null,S(t.$t("List View: Member profiles will be shown as lists. Modern: Members profile will be shown as cards (Grid)")),1)])]),_:1},8,["label"])]),g("div",stt,[_(f,{label:t.$t("Post Title Requirements")},{default:w(()=>[_(h,{modelValue:s.settings.post_title_pref,"onUpdate:modelValue":e[13]||(e[13]=x=>s.settings.post_title_pref=x),class:"fcom_radio_group"},{default:w(()=>[_(d,{value:"optional"},{default:w(()=>[B(S(t.$t("Optional")),1)]),_:1}),_(d,{value:"required"},{default:w(()=>[B(S(t.$t("Required")),1)]),_:1}),_(d,{value:"disabled"},{default:w(()=>[B(S(t.$t("Disabled")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",itt,[g("p",null,S(t.$t("When creating a new post, check if the post title is required or not")),1)])]),_:1},8,["label"])]),s.settings.dark_mode==="yes"?(v(),A("div",ott,[_(f,{label:t.$t("Default Theme Mode")},{default:w(()=>[_(h,{modelValue:s.settings.default_theme_mode,"onUpdate:modelValue":e[14]||(e[14]=x=>s.settings.default_theme_mode=x),class:"fcom_radio_group"},{default:w(()=>[_(d,{value:"light"},{default:w(()=>[B(S(t.$t("Light")),1)]),_:1}),_(d,{value:"dark"},{default:w(()=>[B(S(t.$t("Dark")),1)]),_:1}),_(d,{value:"system"},{default:w(()=>[B(S(t.$t("System")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",rtt,[g("p",null,S(t.$t("New members see the selected theme by default and can change it anytime.")),1)])]),_:1},8,["label"])])):O("",!0),g("div",att,[_(f,{label:t.$t("Default Feed Layout")},{default:w(()=>[_(h,{modelValue:s.settings.default_feed_layout,"onUpdate:modelValue":e[15]||(e[15]=x=>s.settings.default_feed_layout=x),class:"fcom_radio_group"},{default:w(()=>[_(d,{value:"timeline"},{default:w(()=>[B(S(t.$t("Timeline View")),1)]),_:1}),_(d,{value:"list"},{default:w(()=>[B(S(t.$t("List View")),1)]),_:1}),_(d,{value:"card"},{default:w(()=>[B(S(t.$t("Card View")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(l,{modelValue:s.settings.disable_feed_layout,"onUpdate:modelValue":e[16]||(e[16]=x=>s.settings.disable_feed_layout=x),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Disable Layout Style Change Option")),1)]),_:1},8,["modelValue"]),g("div",ltt,[s.settings.disable_feed_layout==="yes"?(v(),A("p",ctt,S(t.$t("The selected layout will be applied for all members. They cannot switch to a different view.")),1)):(v(),A("p",utt,S(t.$t("User can change the layout style to their own preference.")),1))])]),g("div",dtt,[_(f,{label:t.$t("Max Media Per Post")},{default:w(()=>[_(c,{modelValue:s.settings.max_media_per_post,"onUpdate:modelValue":e[17]||(e[17]=x=>s.settings.max_media_per_post=x),placeholder:t.$t("Max Media Per Post"),type:"number",min:1,max:100},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),g("div",htt,[_(f,{label:t.$t("Default Feed Sort By")},{default:w(()=>[_(m,{modelValue:s.settings.default_feed_sort_by,"onUpdate:modelValue":e[18]||(e[18]=x=>s.settings.default_feed_sort_by=x),clearable:"",class:"fcom_select",placeholder:t.$t("Latest Posts Sort")},{default:w(()=>[(v(!0),A(ee,null,Ce(s.postOrderOptions,(x,M)=>(v(),D(p,{key:M,value:M,label:x},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),_(l,{modelValue:s.settings.disable_feed_sort_by,"onUpdate:modelValue":e[19]||(e[19]=x=>s.settings.disable_feed_sort_by=x),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Disable Feed Sort By Options")),1)]),_:1},8,["modelValue"])]),g("div",ftt,[De((v(),D(r,{onClick:o.saveCustomizations,disabled:s.savingCustomizations,class:"fcom_primary_button"},{default:w(()=>[B(S(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[$,s.savingCustomizations]])])]),_:1},8,["modelValue"])])])):(v(),A("div",ptt,[g("p",null,S(t.$t("Customizations could not be loaded")),1)])),mtt,t.has_pro?(v(),A(ee,{key:3},[s.loadingSnippets?(v(),A("div",gtt,[_(a,{rows:5,animated:!0})])):s.snippetsSettings?(v(),A("div",vtt,[g("div",_tt,[g("h2",null,S(t.$t("Custom Snippets")),1)]),g("div",ytt,[g("div",btt,[g("h3",null,S(t.$t("Custom CSS")),1),g("p",null,S(t.$t("You can write your custom CSS here for the portal. Please do not include %s tag","<style> </style>")),1)]),g("div",wtt,[_(c,{placeholder:t.$t("Your CSS Code"),type:"textarea",modelValue:s.snippetsSettings.custom_css,"onUpdate:modelValue":e[22]||(e[22]=x=>s.snippetsSettings.custom_css=x),rows:5},null,8,["placeholder","modelValue"])]),_(b),g("div",ktt,[g("h3",null,S(t.$t("Custom JavaScript")),1),g("p",null,S(t.$t("You can write your custom JavaScript (with script tag), analytics code, and more here for the portal")),1)]),g("div",Ctt,[_(c,{placeholder:t.$t("Your Javascript or Analytics Code"),type:"textarea",modelValue:s.snippetsSettings.custom_js,"onUpdate:modelValue":e[23]||(e[23]=x=>s.snippetsSettings.custom_js=x),rows:5},null,8,["placeholder","modelValue"])]),g("div",xtt,[De((v(),D(r,{onClick:o.saveSnippets,disabled:s.savingSnippets,class:"fcom_primary_button"},{default:w(()=>[B(S(t.$t("Save Custom CSS & JS")),1)]),_:1},8,["onClick","disabled"])),[[$,s.savingSnippets]])])])])):(v(),A("div",Stt,[g("p",null,S(t.$t("Custom Snippets could not be loaded")),1)]))],64)):(v(),A("div",$tt,[g("div",Att,[g("h2",null,S(t.$t("Custom Snippets")),1)]),g("div",Ett,[g("p",Mtt,S(t.$t("__CUSTOM_SNIPPETS_PROMO__")),1),g("a",{class:"el-button fcom_primary_button",href:t.$upgradeUrl("feature_lock_customization"),target:"_blank"},S(t.$t("Upgrade to Pro")),9,Ttt)])]))])]),_:1},8,["title"])]),_:1})}const Itt=de(Met,[["render",Ptt]]),Ltt={name:"EmailNotification",components:{ImageUploader:vl,CrepeEditor:Zc,Layout:fi,AppLayout:pi},data(){return{loading:!1,saving:!1,email_settings:null,verifiedEmailSenders:this.appVars.verified_email_senders}},methods:{getSettings(){this.loading=!0,this.$get("admin/email-settings").then(t=>{this.email_settings=t.email_settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},save(){this.saving=!0,this.$post("admin/email-settings",{email_settings:this.email_settings}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings(),this.changeTitle(this.$t("Email Notification Settings"))}},Ott={class:"settings_router fcom_mb_20"},Dtt={key:0,class:"white_loaded"},Rtt={key:1,class:"fhr_content_layout_body"},Vtt={class:"setting_body"},Ftt={style:{"font-size":"18px",margin:"0",padding:"0"}},Ntt={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},Btt=g("hr",null,null,-1),ztt={class:"fcom_help_text"},Htt={class:"fcom_help_text"},Utt={class:"fcom_help_text"},jtt={class:"fcom_help_text"},Wtt={class:"fcom_extra_editor"},Ytt={class:"fcom_help_text"},qtt=["innerHTML"],Gtt=["src","alt"],Xtt={class:"fcom_image_uploader_wrapper"},Ktt=g("hr",null,null,-1),Ztt={class:"setting_body"},Jtt={style:{"font-size":"18px",margin:"0",padding:"0"}},Qtt={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},ent=g("hr",null,null,-1),tnt={key:0,class:"fcom_help_text"},nnt={key:0,class:"fcom_help_text"},snt={key:0,class:"fcom_help_text"},int={class:"fcom_help_text"},ont={key:0,class:"fcom_help_text"},rnt={class:"fcom_meta_text"},ant=g("hr",null,null,-1),lnt={class:"setting_body"},cnt={key:2};function unt(t,e,n,i,s,o){const r=We,a=Wt,l=ft,c=en,u=Ld,d=on,h=Jt,f=Id,p=W("crepe-editor"),m=W("EditPen"),y=be,b=W("Delete"),k=W("ImageUploader"),C=Gt,$=s8,x=sn,M=W("layout"),P=W("app-layout"),T=xt("loading");return v(),D(P,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(M,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Email Settings")},{actions:w(()=>[De((v(),D(r,{class:"fcom_primary_button",onClick:o.save},{default:w(()=>[g("span",null,S(t.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[T,s.saving]])]),default:w(()=>[g("div",Ott,[s.loading?(v(),A("div",Dtt,[_(a,{rows:5,animated:!0})])):s.email_settings?(v(),A("div",Rtt,[_(x,{onSubmit:e[14]||(e[14]=Ae(I=>t.doNothing(),["prevent"])),modelValue:s.email_settings,"onUpdate:modelValue":e[15]||(e[15]=I=>s.email_settings=I),"label-position":"top"},{default:w(()=>[g("div",Vtt,[g("h3",Ftt,S(t.$t("Mailing Settings")),1),g("p",Ntt,S(t.$t("Set your from name, email, and email footer. These configurations will be used to send emails from FluentCommunity.")),1),Btt,_(f,{gutter:30},{default:w(()=>[_(u,{sm:24,md:12},{default:w(()=>[_(c,{label:t.$t("From Name")},{default:w(()=>[_(l,{placeholder:t.$t("Email from name"),modelValue:s.email_settings.send_from_name,"onUpdate:modelValue":e[0]||(e[0]=I=>s.email_settings.send_from_name=I)},null,8,["placeholder","modelValue"]),g("div",ztt,[g("p",null,S(t.$t("Name that will be used to send emails")),1)])]),_:1},8,["label"])]),_:1}),_(u,{sm:24,md:12},{default:w(()=>[_(c,{label:t.$t("From Email")},{default:w(()=>{var I;return[((I=s.verifiedEmailSenders)==null?void 0:I.length)>0?(v(),D(h,{key:0,class:"fcom_select",placeholder:t.$t("Select Email Address"),modelValue:s.email_settings.send_from_email,"onUpdate:modelValue":e[1]||(e[1]=L=>s.email_settings.send_from_email=L)},{default:w(()=>[(v(!0),A(ee,null,Ce(s.verifiedEmailSenders,L=>(v(),D(d,{key:L,label:L,value:L},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"])):(v(),D(l,{key:1,placeholder:t.$t("Valid Email address"),modelValue:s.email_settings.send_from_email,"onUpdate:modelValue":e[2]||(e[2]=L=>s.email_settings.send_from_email=L)},null,8,["placeholder","modelValue"])),g("div",Htt,[g("p",null,S(t.$t("Provide Valid Email Address email as per your domain/SMTP settings. This email will be used to send emails like notifications")),1)])]}),_:1},8,["label"])]),_:1})]),_:1}),_(f,{gutter:30},{default:w(()=>[_(u,{sm:24,md:12},{default:w(()=>[_(c,{label:t.$t("Reply to name (Optional)")},{default:w(()=>[_(l,{placeholder:t.$t("Optional Reply to email"),modelValue:s.email_settings.reply_to_name,"onUpdate:modelValue":e[3]||(e[3]=I=>s.email_settings.reply_to_name=I)},null,8,["placeholder","modelValue"]),g("div",Utt,[g("p",null,S(t.$t("Name that will be used for replyTo attribute")),1)])]),_:1},8,["label"])]),_:1}),_(u,{sm:24,md:12},{default:w(()=>[_(c,{label:t.$t("Reply to email (optional)")},{default:w(()=>[_(l,{placeholder:t.$t("Optional email"),modelValue:s.email_settings.reply_to_email,"onUpdate:modelValue":e[4]||(e[4]=I=>s.email_settings.reply_to_email=I)},null,8,["placeholder","modelValue"]),g("div",jtt,[g("p",null,S(t.$t("If someone replies to your notification email, this is where you would like to receive it.")),1)])]),_:1},8,["label"])]),_:1})]),_:1}),_(c,{label:t.$t("Email Footer")},{default:w(()=>[g("div",Wtt,[_(p,{modelValue:s.email_settings.email_footer,"onUpdate:modelValue":e[5]||(e[5]=I=>s.email_settings.email_footer=I)},null,8,["modelValue"])]),g("div",Ytt,[g("p",null,S(t.$t("This email footer will be used for all emails sent from FluentCommunity. It's highly recommended to use your business name and address in the footer for compliance.")),1),g("p",{innerHTML:t.$t("Use %1$s tag to insert dynamic notification settings URL. Other Smartcode: %2$s for Site Name with permalink","{{manage_email_notification_url|Manage Your Email Notifications Preference}}","{{site_name_with_url}}")},null,8,qtt)])]),_:1},8,["label"]),_(f,{gutter:30},{default:w(()=>[_(u,{sm:24,md:12},{default:w(()=>[_(c,{label:t.$t("Logo for Email Header")},{default:w(()=>[s.email_settings.logo||s.email_settings.global_logo?(v(),A("img",{key:0,src:s.email_settings.logo||s.email_settings.global_logo,alt:t.$t("Email header logo"),style:{"max-width":"100px",height:"auto"}},null,8,Gtt)):O("",!0),g("div",Xtt,[_(k,{additionalData:{resize:!1,max_width:500,skip_convert:"yes"},button_text:s.email_settings.logo?t.$t("Change"):t.$t("Upload Logo"),can_remove:!!s.email_settings.logo,isTextBtn:!1,onUploaded:e[6]||(e[6]=I=>{s.email_settings.logo=I})},cs({remove:w(()=>[_(y,null,{default:w(()=>[_(b)]),_:1})]),_:2},[s.email_settings.logo||s.email_settings.global_logo?{name:"trigger",fn:w(()=>[_(r,{"aria-label":t.$t("Change logo"),class:"fcom_plain_button"},{default:w(()=>[_(y,null,{default:w(()=>[_(m)]),_:1})]),_:1},8,["aria-label"])]),key:"0"}:void 0]),1032,["button_text","can_remove"])])]),_:1},8,["label"])]),_:1}),_(u,{sm:24,md:12},{default:w(()=>[t.has_pro?(v(),D(c,{key:0},{default:w(()=>[_(C,{modelValue:s.email_settings.disable_powered_by,"onUpdate:modelValue":e[7]||(e[7]=I=>s.email_settings.disable_powered_by=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Disable powered by FluentCommunity in the email footer")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0)]),_:1})]),_:1})]),Ktt,g("div",Ztt,[g("h3",Jtt,S(t.$t("Email Notification Settings")),1),g("p",Qtt,S(t.$t("This is the default settings that will be applied to all the community members. Individual members can override the settings for their own preference")),1),ent,_(c,{label:t.$t("Email on new comment")},{default:w(()=>[_(C,{modelValue:s.email_settings.com_my_post_mail,"onUpdate:modelValue":e[8]||(e[8]=I=>s.email_settings.com_my_post_mail=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Send an email to the author when a new comment is added to a post.")),1)]),_:1},8,["modelValue"]),s.email_settings.com_my_post_mail!="yes"?(v(),A("div",tnt,[g("p",null,S(t.$t("You should enable this. Currently disabled.")),1)])):O("",!0)]),_:1},8,["label"]),_(c,{label:t.$t("Email on comment reply")},{default:w(()=>[_(C,{modelValue:s.email_settings.reply_my_com_mail,"onUpdate:modelValue":e[9]||(e[9]=I=>s.email_settings.reply_my_com_mail=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Email authors when someone replies to their comments.")),1)]),_:1},8,["modelValue"]),s.email_settings.reply_my_com_mail!="yes"?(v(),A("div",nnt,[g("p",null,S(t.$t("You should enable this. Currently disabled.")),1)])):O("",!0)]),_:1},8,["label"]),_(c,{label:t.$t("Email Announcement on Post")},{default:w(()=>[_(C,{modelValue:s.email_settings.mention_mail,"onUpdate:modelValue":e[10]||(e[10]=I=>s.email_settings.mention_mail=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Give option to admin/moderators to send email when posting on a space")),1)]),_:1},8,["modelValue"]),s.email_settings.mention_mail!="yes"?(v(),A("div",snt,[g("p",null,S(t.$t("You should enable this. Currently disabled.")),1)])):O("",!0)]),_:1},8,["label"]),_(c,null,{default:w(()=>[_(C,{"true-value":"yes","false-value":"no",modelValue:s.email_settings.digest_email_status,"onUpdate:modelValue":e[11]||(e[11]=I=>s.email_settings.digest_email_status=I),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Enable Weekly Digest Email for community members")),1)]),_:1},8,["modelValue"]),g("div",int,[g("p",null,S(t.$t("Members can enable/disable their own digest status")),1)])]),_:1}),_(f,{gutter:30},{default:w(()=>[_(u,{sm:24,md:12},{default:w(()=>[_(c,{label:t.$t("In which day, the digest email will be sent")},{default:w(()=>[_(h,{modelValue:s.email_settings.digest_mail_day,"onUpdate:modelValue":e[12]||(e[12]=I=>s.email_settings.digest_mail_day=I),placeholder:t.$t("Select Digest Email Day")},{default:w(()=>[_(d,{value:"mon",label:t.$t("Every Monday")},null,8,["label"]),_(d,{value:"tue",label:t.$t("Every Tuesday")},null,8,["label"]),_(d,{value:"wed",label:t.$t("Every Wednesday")},null,8,["label"]),_(d,{value:"thu",label:t.$t("Every Thursday")},null,8,["label"]),_(d,{value:"fri",label:t.$t("Every Friday")},null,8,["label"]),_(d,{value:"sat",label:t.$t("Every Saturday")},null,8,["label"]),_(d,{value:"sun",label:t.$t("Every Sunday")},null,8,["label"])]),_:1},8,["modelValue","placeholder"]),s.email_settings.digest_email_status=="yes"?(v(),A("div",ont,[g("p",null,S(t.$t("Email will be sent if there are any unread notifications for the user from the last email sent.")),1)])):O("",!0)]),_:1},8,["label"])]),_:1}),_(u,{sm:24,md:12},{default:w(()=>[_(c,{label:t.$t("Time to send the digest email")},{default:w(()=>[_($,{step:"00:10",start:"00:10",end:"23:59",modelValue:s.email_settings.daily_digest_time,"onUpdate:modelValue":e[13]||(e[13]=I=>s.email_settings.daily_digest_time=I)},null,8,["modelValue"]),g("p",rnt,S(t.$t("Approximate time when the digest emails will start sending for the members")),1)]),_:1},8,["label"])]),_:1})]),_:1})]),ant,g("div",lnt,[De((v(),D(r,{onClick:o.save,disabled:s.saving,class:"fcom_primary_button"},{default:w(()=>[B(S(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[T,s.saving]])])]),_:1},8,["modelValue"])])):(v(),A("div",cnt,[g("p",null,S(t.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const dnt=de(Ltt,[["render",unt]]),hnt={name:"UpgradeToProModal",props:{showModal:{type:Boolean,default:!0},upgrade_module:{type:String,required:!0}},data(){return{openModal:this.showModal,upgradeModule:bbe[this.upgrade_module]||{}}},computed:{upgradeUrl(){const t=(this.upgrade_module||"").replace(/_module$/,"");return this.$upgradeUrl(t?"feature_lock_"+t:"upgrade_page")}},watch:{openModal:function(){this.$emit("closeModal")}}},fnt={class:"fcom_upgrade_header"},pnt={class:"dialog_body"},mnt={class:"fcom_upgrade_banner"},gnt=["href"],vnt={class:"fcom_upgrade_content"},_nt={key:0,class:"fcom_feature_image"},ynt=["src","alt"],bnt={class:"fcom_upgrade_body"},wnt={class:"fcom_upgrade_description"},knt=["href"];function Cnt(t,e,n,i,s,o){const r=Ea;return v(),D(r,{"modal-class":"fcom_upgrade_dialog","close-on-click-modal":!1,"append-to-body":!0,size:"50%",modelValue:s.openModal,"onUpdate:modelValue":e[0]||(e[0]=a=>s.openModal=a),direction:"rtl"},{header:w(()=>[g("div",fnt,[g("h4",null,S(s.upgradeModule.headerTitle),1),g("p",null,S(s.upgradeModule.headerDescription),1)])]),default:w(()=>[g("div",pnt,[g("div",mnt,[g("p",null," 🎉 "+S(t.$t("Discover exciting new features now!")),1),g("a",{href:o.upgradeUrl,target:"_blank"},S(t.$t("Upgrade Now")),9,gnt)]),g("div",vnt,[s.upgradeModule.featureImage?(v(),A("div",_nt,[g("img",{src:t.appVars.assets_url+"images/upgrades/"+s.upgradeModule.featureImage,alt:s.upgradeModule.headerTitle},null,8,ynt)])):O("",!0),g("div",bnt,[g("h4",null,S(s.upgradeModule.bodyTitle),1),g("p",wnt,S(s.upgradeModule.bodyDescription),1),g("a",{class:"el-button fcom_primary_button",href:o.upgradeUrl,target:"_blank"},S(t.$t("Upgrade to Pro")),9,knt)])])])]),_:1},8,["modelValue"])}const jd=de(hnt,[["render",Cnt]]),xnt={name:"StorageSettings",props:["features"],components:{UpgradeToProModal:jd},data(){return{openUpgradeModal:!1,storageConfig:!1,showSettings:!1,fetching:!1,saving:!1,s3Locations:{},bunnyLocations:{}}},methods:{fetchSettings(){this.fetching=!0,this.$get("admin/storage-settings").then(t=>{this.storageConfig=t.config,this.s3Locations=t.s3_locations,this.bunnyLocations=t.bunny_locations}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1})},openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.showSettings=!0},saveSettings(){this.saving=!0,this.$post("admin/storage-settings",{config:this.storageConfig}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},maybeResetConfig(){let t=this.storageConfig.driver;this.storageConfig={driver:t}}},mounted(){this.has_pro&&this.fetchSettings()}},Snt={class:"fcom_storage_settings"},$nt={class:"dialog_header"},Ant={class:"dialog_left"},Ent={key:0,class:"white_loaded"},Mnt={key:1,class:"dialog_body"},Tnt={key:0},Pnt=g("p",null,[B(" Please "),g("a",{target:"_blank",rel:"noopener",href:"https://fluentcommunity.co/docs/configuring-cloudflare-r2/"},"Read the documentation first "),B(" to configure Cloudflare R2. ")],-1),Int=g("hr",null,null,-1),Lnt={class:"fcom_cloudflare_settings"},Ont=g("p",null,[B(" Please "),g("a",{target:"_blank",rel:"noopener",href:"https://fluentcommunity.co/docs/configuring-amazon-s3/"},"Read the documentation first "),B(" to configure Amazon S3. ")],-1),Dnt=g("hr",null,null,-1),Rnt={class:"fcom_s3_settings"},Vnt=g("p",null,[B(" Please "),g("a",{target:"_blank",rel:"noopener",href:"https://fluentcommunity.co/docs/configuring-bunnycdn"},"Read the documentation first "),B(" to configure BunnyCDN. ")],-1),Fnt=g("hr",null,null,-1),Nnt={class:"fcom_cloudflare_settings"},Bnt={key:3,class:"fcom_mb_10"},znt={class:"dialog_footer"},Hnt={key:2};function Unt(t,e,n,i,s,o){const r=We,a=Wt,l=sp,c=xs,u=en,d=ft,h=on,f=Jt,p=sn,m=Ss,y=W("UpgradeToProModal"),b=xt("loading");return v(),A(ee,null,[g("div",Snt,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=k=>o.openSettings())},{default:w(()=>{var k;return[B(S(t.$t("Configure"))+" ("+S((k=s.storageConfig)==null?void 0:k.driver)+") ",1)]}),_:1})]),_(m,{"align-center":"","modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:s.showSettings,"onUpdate:modelValue":e[18]||(e[18]=k=>s.showSettings=k),direction:"rtl"},{header:w(({close:k})=>[g("div",$nt,[g("div",Ant,[g("div",null,[g("h4",null,S(t.$t("Configure Media Storage")),1)])])])]),default:w(()=>[s.fetching?(v(),A("div",Ent,[_(a,{rows:5,animated:!0})])):s.storageConfig?(v(),A("div",Mnt,[s.storageConfig.is_defined?(v(),A("p",Tnt,S(t.$t("__CLOUD_STORAGE_CONFIGURED")),1)):(v(),A(ee,{key:1},[_(p,{onSubmit:e[17]||(e[17]=Ae(k=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(u,{label:t.$t("Storage Location")},{default:w(()=>[_(c,{class:"fcom_radio_group",onChange:e[1]||(e[1]=k=>o.maybeResetConfig()),modelValue:s.storageConfig.driver,"onUpdate:modelValue":e[2]||(e[2]=k=>s.storageConfig.driver=k)},{default:w(()=>[_(l,{type:"primary",value:"local"},{default:w(()=>[B(S(t.$t("Server Storage")),1)]),_:1}),_(l,{value:"cloudflare_r2"},{default:w(()=>[B(S(t.$t("Cloudflare R2 (Recommended)")),1)]),_:1}),_(l,{value:"amazon_s3"},{default:w(()=>[B(S(t.$t("Amazon S3")),1)]),_:1}),_(l,{value:"bunny_cdn"},{default:w(()=>[B(S(t.$t("BunnyCDN")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),s.storageConfig.driver==="cloudflare_r2"?(v(),A(ee,{key:0},[Pnt,Int,g("div",Lnt,[_(u,{label:t.$t("Cloudflare Access Key")},{default:w(()=>[_(d,{type:"password",modelValue:s.storageConfig.access_key,"onUpdate:modelValue":e[3]||(e[3]=k=>s.storageConfig.access_key=k)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Cloudflare Secret Key")},{default:w(()=>[_(d,{type:"password",modelValue:s.storageConfig.secret_key,"onUpdate:modelValue":e[4]||(e[4]=k=>s.storageConfig.secret_key=k)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Cloudflare Bucket Public URL")},{default:w(()=>[_(d,{modelValue:s.storageConfig.public_url,"onUpdate:modelValue":e[5]||(e[5]=k=>s.storageConfig.public_url=k)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Cloudflare Endpoint URL")},{default:w(()=>[_(d,{modelValue:s.storageConfig.endpoint_url,"onUpdate:modelValue":e[6]||(e[6]=k=>s.storageConfig.endpoint_url=k),placeholder:t.$t("eg: https://your-account-id.r2.cloudflarestorage.com/your-bucket-name")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(u,{label:t.$t("Bucket Sub-Folder (Optional)")},{default:w(()=>[_(d,{modelValue:s.storageConfig.sub_folder,"onUpdate:modelValue":e[7]||(e[7]=k=>s.storageConfig.sub_folder=k),placeholder:t.$t("If you want to store files in a folder within the bucket.")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])])],64)):s.storageConfig.driver==="amazon_s3"?(v(),A(ee,{key:1},[Ont,Dnt,g("div",Rnt,[_(u,{label:t.$t("Amazon S3 Access Key")},{default:w(()=>[_(d,{type:"password",modelValue:s.storageConfig.access_key,"onUpdate:modelValue":e[8]||(e[8]=k=>s.storageConfig.access_key=k)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Amazon S3 Secret Key")},{default:w(()=>[_(d,{type:"password",modelValue:s.storageConfig.secret_key,"onUpdate:modelValue":e[9]||(e[9]=k=>s.storageConfig.secret_key=k)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Amazon S3 Bucket Name")},{default:w(()=>[_(d,{modelValue:s.storageConfig.bucket,"onUpdate:modelValue":e[10]||(e[10]=k=>s.storageConfig.bucket=k)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Amazon S3 Location")},{default:w(()=>[_(f,{modelValue:s.storageConfig.s3_endpoint,"onUpdate:modelValue":e[11]||(e[11]=k=>s.storageConfig.s3_endpoint=k),placeholder:t.$t("Select S3 Location")},{default:w(()=>[(v(!0),A(ee,null,Ce(s.s3Locations,(k,C)=>(v(),D(h,{label:k,value:C},null,8,["label","value"]))),256))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),_(u,{label:t.$t("Bucket Sub-Folder (Optional)")},{default:w(()=>[_(d,{placeholder:t.$t("If you want to store files in a folder within the bucket."),modelValue:s.storageConfig.sub_folder,"onUpdate:modelValue":e[12]||(e[12]=k=>s.storageConfig.sub_folder=k)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])])],64)):O("",!0),s.storageConfig.driver==="bunny_cdn"?(v(),A(ee,{key:2},[Vnt,Fnt,g("div",Nnt,[_(u,{label:t.$t("BunnyCDN API Key")},{default:w(()=>[_(d,{type:"password",modelValue:s.storageConfig.access_key,"onUpdate:modelValue":e[13]||(e[13]=k=>s.storageConfig.access_key=k)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("BunnyCDN Storage Zone Name")},{default:w(()=>[_(d,{modelValue:s.storageConfig.bucket,"onUpdate:modelValue":e[14]||(e[14]=k=>s.storageConfig.bucket=k)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Primary Storage Region")},{default:w(()=>[_(f,{modelValue:s.storageConfig.s3_endpoint,"onUpdate:modelValue":e[15]||(e[15]=k=>s.storageConfig.s3_endpoint=k),placeholder:t.$t("Select Storage Region")},{default:w(()=>[(v(!0),A(ee,null,Ce(s.bunnyLocations,(k,C)=>(v(),D(h,{label:k,value:C},null,8,["label","value"]))),256))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),_(u,{label:t.$t("BunnyCDN Public URL")},{default:w(()=>[_(d,{placeholder:t.$t("Provide your CDN URL (without trailing /)"),modelValue:s.storageConfig.public_url,"onUpdate:modelValue":e[16]||(e[16]=k=>s.storageConfig.public_url=k)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])])],64)):(v(),A("p",Bnt,S(t.$t("Your files will be stored in the default Uploads folder")),1))]),_:1}),g("div",znt,[De((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[B(S(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[b,s.saving]])])],64))])):(v(),A("div",Hnt,[g("p",null,S(t.$t("Config could not be loaded")),1)]))]),_:1},8,["width","modelValue"]),s.openUpgradeModal?(v(),D(y,{key:0,showModal:s.openUpgradeModal,onCloseModal:e[19]||(e[19]=k=>s.openUpgradeModal=!1),upgrade_module:"media_module"},null,8,["showModal"])):O("",!0)],64)}const jnt=de(xnt,[["render",Unt]]),Wnt={name:"LeaderBoardConfig",props:["features"],emits:["saveSettings"],data(){return{levels:null,excludedUserIds:[],showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1,users:[],usersLoaded:!1}},components:{UpgradeToProModal:jd},methods:{openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("admin/leaderboards/levels").then(t=>{this.levels=t.levels,this.excludedUserIds=t.excludedUserIds,this.users=t.excludedUsers}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1,this.usersLoaded=!0})},fetchUsers(t=""){this.loading=!0,this.$get("admin/users",{context:"users",search:t}).then(e=>{this.users=e.users.data}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},saveSettings(){let t=this.features.leader_board_module=="yes";this.$emit("saveSettings",!t),t&&this.saveLevelSettings()},saveLevelSettings(){this.saving=!0,this.$post("admin/leaderboards/levels",{levels:this.levels,excludedUserIds:this.excludedUserIds}).then(t=>{this.$notify.success(t.message),this.$emit("saveSettings",!0)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}}},Ynt={class:"fcom_storage_settings"},qnt={key:0,class:"white_loaded"},Gnt={key:1,class:"dialog_body"},Xnt={class:"fcom_mb_20"},Knt={class:"fcom_level_table"},Znt={class:"fcom_level_table_row fcom_header_row"},Jnt=g("div",{class:"fcom_lavel_num"}," # ",-1),Qnt={class:"fcom_lavel_desc"},est={class:"fcom_lavel_actions"},tst={class:"fcom_lavel_num"},nst={class:"fcom_lavel_desc"},sst={class:"fcom_lavel_actions"},ist={class:"fcom_user_selector fcom_mb_20"},ost={class:"fcom_mb_20"},rst={style:{float:"left"}},ast={style:{float:"right",color:"#8492a6","font-size":"13px"}},lst={class:"dialog_footer"},cst={key:2};function ust(t,e,n,i,s,o){const r=We,a=Wt,l=Gt,c=en,u=ft,d=on,h=Jt,f=sn,p=Ea,m=W("UpgradeToProModal"),y=xt("loading");return v(),A(ee,null,[g("div",Ynt,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=b=>o.openSettings())},{default:w(()=>[B(S(t.$t("Settings")),1)]),_:1})]),_(p,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:t.dialogWidth,modelValue:s.showSettings,"onUpdate:modelValue":e[4]||(e[4]=b=>s.showSettings=b),direction:"rtl"},{header:w(({close:b})=>[g("h4",null,S(t.$t("Leaderboard / Gamification Settings")),1)]),default:w(()=>[s.fetching?(v(),A("div",qnt,[_(a,{rows:5,animated:!0})])):s.levels?(v(),A("div",Gnt,[_(f,{onSubmit:e[3]||(e[3]=Ae(b=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,null,{default:w(()=>[_(l,{modelValue:n.features.leader_board_module,"onUpdate:modelValue":e[1]||(e[1]=b=>n.features.leader_board_module=b),"true-value":"yes","false-value":"no",label:t.$t("Enable Leaderboards Module"),class:"fcom_checkbox"},null,8,["modelValue","label"])]),_:1}),n.features.leader_board_module==="yes"?(v(),A(ee,{key:0},[g("h5",Xnt,S(t.$t("Leaderboard Levels")),1),g("div",Knt,[g("div",Znt,[Jnt,g("div",Qnt,S(t.$t("Title & Description")),1),g("div",est,S(t.$t("Minimum Points")),1)]),(v(!0),A(ee,null,Ce(s.levels,(b,k,C)=>(v(),A("div",{class:"fcom_level_table_row",key:k},[g("div",tst,S(C+1),1),g("div",nst,[_(u,{class:"fcom_bold_input",type:"text",modelValue:b.title,"onUpdate:modelValue":$=>b.title=$,placeholder:t.$t("Level Title")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),_(u,{type:"text",modelValue:b.tagline,"onUpdate:modelValue":$=>b.tagline=$,placeholder:t.$t("Level Tagline")},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),g("div",sst,[_(c,{label:""},{default:w(()=>[_(u,{min:0,max:999999999,disabled:k==="level_1",type:"number",modelValue:b.min_points,"onUpdate:modelValue":$=>b.min_points=$,placeholder:t.$t("Minimum Points")},null,8,["disabled","modelValue","onUpdate:modelValue","placeholder"])]),_:2},1024)])]))),128))]),g("div",ist,[g("h5",ost,S(t.$t("Exclude Users")),1),_(c,{label:t.$t("Exclude selected users from the leaderboard")},{default:w(()=>[s.usersLoaded?(v(),D(h,{key:0,multiple:!0,class:"rich_select",filterable:"",remote:"","remote-method":o.fetchUsers,placeholder:t.$t("Select Users"),modelValue:s.excludedUserIds,"onUpdate:modelValue":e[2]||(e[2]=b=>s.excludedUserIds=b)},{default:w(()=>[(v(!0),A(ee,null,Ce(s.users,b=>(v(),D(d,{key:b.ID,label:b.display_name+" ("+b.user_email+")",value:b.ID},{default:w(()=>[g("span",rst,S(b.display_name),1),g("span",ast,S(b.user_email),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["remote-method","placeholder","modelValue"])):O("",!0)]),_:1},8,["label"])])],64)):O("",!0)]),_:1}),g("div",lst,[De((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[B(S(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[y,s.saving]])])])):(v(),A("div",cst,[g("p",null,S(t.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"]),s.openUpgradeModal?(v(),D(m,{key:0,showModal:s.openUpgradeModal,onCloseModal:e[5]||(e[5]=b=>s.openUpgradeModal=!1),upgrade_module:"leader_board_module"},null,8,["showModal"])):O("",!0)],64)}const dst=de(Wnt,[["render",ust]]),hst={name:"UserBadgesConfig",components:{LogoEmojiSelector:I1,UpgradeToProModal:jd,Drawer:Dd},props:["features"],emits:["saveSettings"],data(){return{badges:null,showSettings:!1,fetching:!1,saving:!1,editingBadge:null,showEditBagdeModal:!1,openUpgradeModal:!1,isDirty:!1}},watch:{badges:{handler(){this.isDirty=!0},deep:!0},"features.user_badge"(){this.isDirty=!0}},methods:{openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.isDirty=!1,this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("admin/user-badges").then(t=>{this.badges=t.badges,this.$nextTick(()=>{this.isDirty=!1})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1})},saveSettings(){let t=this.features.user_badge=="yes";this.$emit("saveSettings",!t),t?this.saveBadgeSettings():this.isDirty=!1},saveBadgeSettings(){this.saving=!0,this.$post("admin/user-badges",{badges:this.badges}).then(t=>{this.$notify.success(t.message),this.$emit("saveSettings",!1);let e=t.badges;this.badges=Object.values(e),this.features.user_badge=="yes"?this.appVars.user_badges=e:this.appVars.user_badges=null,this.$nextTick(()=>{this.isDirty=!1})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},initAddNew(){this.editingBadge={title:"",config:{emoji:"",shape_svg:"",logo:""},show_label:"yes",color:"",background_color:""},this.showEditBagdeModal=!0},initEdit(t){this.editingBadge=t,this.showEditBagdeModal=!0},closeEdit(){this.badges.find(t=>{var e;return t.slug===((e=this.editingBadge)==null?void 0:e.slug)})||this.badges.push(this.editingBadge),this.showEditBagdeModal=!1,this.editingBadge=null,this.saveBadgeSettings()},deleteBadge(t){this.badges=this.badges.filter(e=>e.slug!==t.slug),this.saveBadgeSettings()}}},fst={class:"fcom_storage_settings"},pst={key:0,class:"white_loaded"},mst={key:1},gst={class:"header_user_badge"},vst={style:{"margin-bottom":"30px"},class:"fcom_user_badges fcom_manager_table"},_st={class:"fcom_badge_preview"},yst={class:"fcom_table_action_col",style:{display:"flex",gap:"10px"}},bst=["onClick"],wst=["onClick"],kst={key:2};function Cst(t,e,n,i,s,o){const r=We,a=Wt,l=Gt,c=en,u=Xr,d=W("UserBadge"),h=W("Edit"),f=be,p=W("Delete"),m=Gr,y=sn,b=W("Drawer"),k=W("logo-emoji-selector"),C=ft,$=Hc,x=Ld,M=Id,P=Ss,T=W("UpgradeToProModal"),I=xt("loading");return v(),A(ee,null,[g("div",fst,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=L=>o.openSettings())},{default:w(()=>[B(S(t.$t("Settings")),1)]),_:1})]),_(b,{modelValue:s.showSettings,"onUpdate:modelValue":e[4]||(e[4]=L=>s.showSettings=L),size:t.drawerWidth,title:t.$t("User Badge Settings"),"append-to-body":!0,"close-on-click-modal":!0,"has-close-confirmation":s.isDirty,"close-confirmation-message":t.$t("You have unsaved changes. Are you sure you want to close this?"),"modal-class":"fcom_common_dialog",id:"fluent_comminity_body"},{default:w(()=>[s.fetching?(v(),A("div",pst,[_(a,{rows:5,animated:!0})])):s.badges?(v(),A("div",mst,[_(y,{onSubmit:e[3]||(e[3]=Ae(L=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,null,{default:w(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:n.features.user_badge,"onUpdate:modelValue":e[1]||(e[1]=L=>n.features.user_badge=L),label:t.$t("Enable User Badge Module"),size:"large",class:"fcom_checkbox"},null,8,["modelValue","label"])]),_:1}),n.features.user_badge==="yes"?(v(),A(ee,{key:0},[g("div",gst,[g("h3",null,S(t.$t("User Badges")),1),_(r,{class:"fcom_secondary_button",onClick:e[2]||(e[2]=L=>o.initAddNew()),size:"small"},{default:w(()=>[B(S(t.$t("Add New")),1)]),_:1})]),g("div",vst,[_(m,{stripe:"","empty-text":t.$t("No badges have been configured."),data:s.badges},{default:w(()=>[_(u,{prop:"title",label:t.$t("Title"),width:"200px"},null,8,["label"]),_(u,{label:t.$t("Preview")},{default:w(L=>[g("div",_st,[_(d,{is_preview:!0,badge:L.row},null,8,["badge"])])]),_:1},8,["label"]),_(u,{width:"150px",label:t.$t("Actions")},{default:w(L=>[g("div",yst,[g("div",{onClick:R=>o.initEdit(L.row),class:"action_item clickable"},[_(f,null,{default:w(()=>[_(h)]),_:1})],8,bst),g("div",{class:"action_item clickable",onClick:R=>o.deleteBadge(L.row)},[_(f,null,{default:w(()=>[_(p)]),_:1})],8,wst)])]),_:1},8,["label"])]),_:1},8,["empty-text","data"])])],64)):O("",!0),_(c,null,{default:w(()=>[De((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[B(S(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[I,s.saving]])]),_:1})]),_:1})])):(v(),A("div",kst,[g("p",null,S(t.$t("Config could not be loaded")),1)]))]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"]),_(P,{"append-to-body":!0,modelValue:s.showEditBagdeModal,"onUpdate:modelValue":e[14]||(e[14]=L=>s.showEditBagdeModal=L),title:t.$t("Edit Badge"),width:"30%"},{default:w(()=>[s.editingBadge?(v(),D(y,{key:0,onSubmit:e[13]||(e[13]=Ae(L=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,{label:t.$t("Title")},{default:w(()=>[_(C,{modelValue:s.editingBadge.title,"onUpdate:modelValue":e[6]||(e[6]=L=>s.editingBadge.title=L),placeholder:t.$t("Badge Title")},{prepend:w(()=>{var L,R;return[_(k,{fallback_mark:"",custom_svg:!0,onUpdate:e[5]||(e[5]=V=>{s.editingBadge.config.emoji=V.emoji,s.editingBadge.config.logo=V.logo,s.editingBadge.config.shape_svg=V.shape_svg}),config:{logo:s.editingBadge.config.logo,emoji:((L=s.editingBadge.config)==null?void 0:L.emoji)||"",shape_svg:(R=s.editingBadge.config)==null?void 0:R.shape_svg}},null,8,["config"])]}),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),_(c,null,{default:w(()=>[_(l,{modelValue:s.editingBadge.show_label,"onUpdate:modelValue":e[7]||(e[7]=L=>s.editingBadge.show_label=L),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Show Label on Badge")),1)]),_:1},8,["modelValue"])]),_:1}),s.editingBadge.show_label=="yes"?(v(),A(ee,{key:0},[_(M,{gutter:20},{default:w(()=>[_(x,{span:12},{default:w(()=>[_(c,{label:t.$t("Color")},{default:w(()=>[_($,{predefine:t.appVars.suggestedColors,onActiveChange:e[8]||(e[8]=L=>{s.editingBadge.color=L}),modelValue:s.editingBadge.color,"onUpdate:modelValue":e[9]||(e[9]=L=>s.editingBadge.color=L)},null,8,["predefine","modelValue"])]),_:1},8,["label"])]),_:1}),_(x,{span:12},{default:w(()=>[_(c,{label:t.$t("Background Color")},{default:w(()=>[_($,{predefine:t.appVars.suggestedColors,onActiveChange:e[10]||(e[10]=L=>{s.editingBadge.background_color=L}),modelValue:s.editingBadge.background_color,"onUpdate:modelValue":e[11]||(e[11]=L=>s.editingBadge.background_color=L)},null,8,["predefine","modelValue"])]),_:1},8,["label"])]),_:1})]),_:1}),g("p",null,S(t.$t("For best UI, keep the colors empty")),1)],64)):O("",!0),_(c,null,{default:w(()=>[_(r,{class:"fcom_primary_button",onClick:e[12]||(e[12]=L=>o.closeEdit())},{default:w(()=>[B(S(t.$t("Save")),1)]),_:1})]),_:1})]),_:1})):O("",!0)]),_:1},8,["modelValue","title"]),s.openUpgradeModal?(v(),D(T,{key:0,showModal:s.openUpgradeModal,onCloseModal:e[15]||(e[15]=L=>s.openUpgradeModal=!1),upgrade_module:"user_badge_module"},null,8,["showModal"])):O("",!0)],64)}const xst=de(hst,[["render",Cst],["__scopeId","data-v-57666044"]]),Sst={name:"SocialMediaLinkConfig",components:{Drawer:Dd},data(){return{providers:null,loading:!1,saving:!1,showSettings:!1,isDirty:!1}},watch:{showSettings(t){t||(this.isDirty=!1)}},methods:{openSettings(){this.loading=!0,this.showSettings=!0,this.isDirty=!1,this.providers=null,this.$get("admin/profile-link-providers").then(t=>{this.providers=t.providers}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){if(!this.has_pro){this.$notify.error(this.$t("Please upgrade to Pro to use this feature"));return}this.saving=!0;const t=[];this.each(this.providers,(e,n)=>{e.enabled==="yes"&&t.push(n)}),this.$post("admin/profile-link-providers",{configs:t}).then(e=>{this.$notify.success(e.message),this.isDirty=!1}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}}},$st={class:"fcom_storage_settings"},Ast={key:0,class:"white_loaded"},Est={key:1,class:"dialog_body"},Mst={class:"fcom_level_table"},Tst={class:"fcom_level_table_row fcom_header_row"},Pst={class:"fcom_lavel_desc"},Ist={class:"fcom_lavel_actions"},Lst={style:{display:"flex","align-items":"center","column-gap":"10px"},class:"fcom_lavel_desc"},Ost=["innerHTML"],Dst={class:"fcom_lavel_actions"},Rst={class:"dialog_footer"},Vst={key:1,class:"fcom_upgrade_banner"},Fst={class:"fcom_upgrade_description"},Nst=["href"],Bst={key:2};function zst(t,e,n,i,s,o){const r=We,a=Wt,l=be,c=Ci,u=Uc,d=W("Drawer"),h=xt("loading");return v(),A(ee,null,[g("div",$st,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=f=>o.openSettings())},{default:w(()=>[B(S(t.$t("Settings")),1)]),_:1})]),_(d,{modelValue:s.showSettings,"onUpdate:modelValue":e[2]||(e[2]=f=>s.showSettings=f),size:t.drawerWidth,title:t.$t("Social Media Links Settings"),"append-to-body":!0,"close-on-click-modal":!0,"has-close-confirmation":s.isDirty,"close-confirmation-message":t.$t("You have unsaved changes. Are you sure you want to close this?"),"modal-class":"fcom_common_dialog fcom_upgrade_dialog",id:"fluent_comminity_body"},{default:w(()=>[s.loading?(v(),A("div",Ast,[_(a,{rows:5,animated:!0})])):s.providers?(v(),A("div",Est,[g("div",Mst,[g("div",Tst,[g("div",Pst,S(t.$t("Provider")),1),g("div",Ist,S(t.$t("Status")),1)]),(v(!0),A(ee,null,Ce(s.providers,(f,p)=>(v(),A("div",{style:{padding:"5px 10px"},class:"fcom_level_table_row",key:p},[g("div",Lst,[_(l,null,{default:w(()=>[g("span",{innerHTML:f.icon_svg},null,8,Ost)]),_:2},1024),g("span",null,S(f.title),1),f.enabled==="yes"?(v(),D(c,{key:0,type:"success",size:"small",effect:"light"},{default:w(()=>[B(S(t.$t("Enabled")),1)]),_:1})):(v(),D(c,{key:1,type:"info",size:"small"},{default:w(()=>[B(S(t.$t("disabled")),1)]),_:1}))]),g("div",Dst,[_(u,{modelValue:f.enabled,"onUpdate:modelValue":m=>f.enabled=m,"active-value":"yes","inactive-value":"no",onChange:e[1]||(e[1]=m=>s.isDirty=!0)},null,8,["modelValue","onUpdate:modelValue"])])]))),128))]),g("div",Rst,[t.has_pro?De((v(),D(r,{key:0,class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[B(S(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[h,s.saving]]):(v(),A("div",Vst,[g("p",Fst,S(t.$t("Please upgrade to Pro to use this feature")),1),g("a",{class:"el-button",href:t.$upgradeUrl("feature_lock_social_links"),target:"_blank"},S(t.$t("Upgrade to Pro")),9,Nst)]))])])):(v(),A("div",Bst,[g("p",null,S(t.$t("Config could not be loaded")),1)]))]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"])],64)}const Hst=de(Sst,[["render",zst]]),Ust={name:"MessagingSettings",data(){return{loading:!1,settings:null,saving:!1,socketConfig:this.initSocketConfig()}},computed:{isRealTimeEnabled(){var t;return((t=this.settings)==null?void 0:t.realtime_enabled)==="yes"},isWpConfigDefined(){var t;return((t=this.socketConfig)==null?void 0:t.is_defined)??!1},isFluentMessagingProvider(){var t;return((t=this.settings)==null?void 0:t.socket_provider)==="fluent-socket"},showClusterField(){var t;return["pusher","custom"].includes((t=this.settings)==null?void 0:t.socket_provider)},isCustomProvider(){var t;return((t=this.settings)==null?void 0:t.socket_provider)==="custom"}},methods:{initSocketConfig(){return{key:"",secret:"",appId:"",cluster:"",options:{host:"",port:443,scheme:"https"}}},maybeResetConfig(){this.socketConfig.is_defined||(this.socketConfig=this.initSocketConfig())},getSettings(){this.loading=!0,this.$get("admin/messaging-setting").then(t=>{this.settings=t.settings,this.socketConfig=t.socket_config??this.initSocketConfig()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){if(this.isRealTimeEnabled&&!this.isWpConfigDefined){if(["key","secret","appId"].filter(i=>!this.socketConfig[i]).length>0){this.$handleError(this.$t("Please fill in all required socket configuration fields (App Key, App Secret, App ID)"));return}if(this.isCustomProvider&&!this.socketConfig.options.host){this.$handleError(this.$t("Host is required for custom socket provider"));return}}this.saving=!0;const t={settings:this.settings};this.isRealTimeEnabled&&!this.isWpConfigDefined&&(t.socket_config=this.socketConfig),this.$post("admin/messaging-setting",t).then(e=>{this.$notify.success(e.message),this.settings=e.settings}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings()}},jst={key:1},Wst={class:"fcom_help_text"},Yst={key:0},qst={key:1},Gst={class:"fcom_help_text"},Xst={class:"fcom_help_text"},Kst={class:"fcom_section_divider"},Zst={class:"fcom_help_text"},Jst={key:0},Qst={key:1},eit={class:"fcom_help_text"},tit={key:0},nit=g("a",{href:"https://fluentsocket.com/",target:"_blank",rel:"noopener"},"fluentsocket.com",-1),sit={key:1},iit={key:2},oit={class:"fcom_help_text"},rit={key:2},ait={class:"dialog_footer"},lit={key:1,class:"fcom_upgrade_banner"},cit={class:"fcom_upgrade_description"},uit=["href"];function dit(t,e,n,i,s,o){const r=Wt,a=Gt,l=en,c=Mi,u=xs,d=Ib,h=Ur,f=ft,p=on,m=Jt,y=sn,b=We,k=xt("loading");return v(),A(ee,null,[s.loading?(v(),D(r,{key:0,animated:!0,rows:5})):s.settings?(v(),A("div",jst,[_(y,{modelValue:s.settings,"onUpdate:modelValue":e[14]||(e[14]=C=>s.settings=C),"label-position":"top"},{default:w(()=>[_(l,null,{default:w(()=>[_(a,{"true-value":"yes","false-value":"no",modelValue:s.settings.messaging_email_status,"onUpdate:modelValue":e[0]||(e[0]=C=>s.settings.messaging_email_status=C),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Send email notification on one-to-one messages (unread) to individual members")),1)]),_:1},8,["modelValue"]),g("div",Wst,[s.settings.messaging_email_status=="no"?(v(),A("p",Yst,S(t.$t("Email notification on messaging is disabled")),1)):(v(),A("p",qst,S(t.$t("Emails will be sent based on your Email Frequency settings")),1))])]),_:1}),s.settings.messaging_email_status=="yes"?(v(),D(l,{key:0,label:t.$t("Default Email sending frequency for one-to-one messages")},{default:w(()=>[_(u,{modelValue:s.settings.messaging_email_frequency,"onUpdate:modelValue":e[1]||(e[1]=C=>s.settings.messaging_email_frequency=C)},{default:w(()=>[_(c,{value:"hourly",label:t.$t("Hourly")},null,8,["label"]),_(c,{value:"daily",label:t.$t("Daily")},null,8,["label"]),_(c,{value:"weekly",label:t.$t("Weekly")},null,8,["label"]),_(c,{value:"disabled",label:t.$t("Per User Choice")},null,8,["label"])]),_:1},8,["modelValue"]),g("div",Gst,[g("p",null,S(t.$t("This is your default email sending frequency. Individual users can customize the frequency or disable the notification.")),1)])]),_:1},8,["label"])):O("",!0),_(l,{label:t.$t("Who can initiate an one-to-one message with the other members?")},{default:w(()=>[_(u,{modelValue:s.settings.who_can_initiate_message,"onUpdate:modelValue":e[2]||(e[2]=C=>s.settings.who_can_initiate_message=C)},{default:w(()=>[_(c,{value:"everyone",label:t.$t("Any Community Members")},null,8,["label"]),_(c,{value:"mods",label:t.$t("Only Moderator and Admins")},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),s.settings.who_can_initiate_message==="everyone"?(v(),D(l,{key:1,label:t.$t("Points needed to intiate a new message thread with another member or send message to community chats.")},{default:w(()=>[_(d,{modelValue:s.settings.points_to_initiate_message,"onUpdate:modelValue":e[3]||(e[3]=C=>s.settings.points_to_initiate_message=C),min:0},null,8,["modelValue"]),g("div",Xst,[g("p",null,S(t.$t("Set the number of points a user must have to initiate a new one-to-one message thread. Set to 0 to disable this feature.")),1)])]),_:1},8,["label"])):O("",!0),g("div",Kst,[g("h4",null,S(t.$t("Real-time Chat")),1)]),_(l,null,{default:w(()=>[_(a,{"true-value":"yes","false-value":"no",modelValue:s.settings.realtime_enabled,"onUpdate:modelValue":e[4]||(e[4]=C=>s.settings.realtime_enabled=C),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Enable Real-time Chat")),1)]),_:1},8,["modelValue"]),g("div",Zst,[s.settings.realtime_enabled==="no"?(v(),A("p",Jst,S(t.$t("Real-time chat is disabled. Messages will be delivered on page refresh.")),1)):(v(),A("p",Qst,S(t.$t("Real-time chat is enabled. Messages will be delivered instantly via WebSocket.")),1))])]),_:1}),o.isRealTimeEnabled?(v(),D(l,{key:2,label:t.$t("Socket Provider")},{default:w(()=>[_(u,{modelValue:s.settings.socket_provider,"onUpdate:modelValue":e[5]||(e[5]=C=>s.settings.socket_provider=C),onChange:e[6]||(e[6]=C=>o.maybeResetConfig())},{default:w(()=>[_(c,{value:"fluent-socket"},{default:w(()=>[B(S(t.$t("Fluent Socket")),1)]),_:1}),_(c,{value:"pusher"},{default:w(()=>[B(S(t.$t("Pusher")),1)]),_:1}),_(c,{value:"custom"},{default:w(()=>[B(S(t.$t("Custom")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",eit,[s.settings.socket_provider==="fluent-socket"?(v(),A("p",tit,[B(S(t.$t("Use the built-in Fluent Socket server. You can create your free credentials at"))+" ",1),nit])):s.settings.socket_provider==="pusher"?(v(),A("p",sit,S(t.$t("Use Pusher.com for WebSocket connections")),1)):(v(),A("p",iit,S(t.$t("Use a custom Pusher-compatible WebSocket server (e.g., Soketi)")),1))])]),_:1},8,["label"])):O("",!0),o.isRealTimeEnabled&&o.isWpConfigDefined?(v(),D(h,{key:3,type:"info",closable:!1,class:"fcom_mb_20"},{default:w(()=>[B(S(t.$t("Socket configuration is defined in wp-config.php and cannot be changed here.")),1)]),_:1})):o.isRealTimeEnabled?(v(),A(ee,{key:4},[_(l,{label:t.$t("App ID")},{default:w(()=>[_(f,{modelValue:s.socketConfig.appId,"onUpdate:modelValue":e[7]||(e[7]=C=>s.socketConfig.appId=C),placeholder:t.$t("Your app ID")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(l,{label:t.$t("App Key")},{default:w(()=>[_(f,{modelValue:s.socketConfig.key,"onUpdate:modelValue":e[8]||(e[8]=C=>s.socketConfig.key=C),placeholder:t.$t("Your app key")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(l,{label:t.$t("App Secret")},{default:w(()=>[_(f,{type:"password",modelValue:s.socketConfig.secret,"onUpdate:modelValue":e[9]||(e[9]=C=>s.socketConfig.secret=C),placeholder:t.$t("Your app secret"),"show-password":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o.showClusterField?(v(),D(l,{key:0,label:t.$t("Cluster")},{default:w(()=>[_(f,{modelValue:s.socketConfig.cluster,"onUpdate:modelValue":e[10]||(e[10]=C=>s.socketConfig.cluster=C),placeholder:s.settings.socket_provider==="pusher"?"mt1":t.$t("Optional")},null,8,["modelValue","placeholder"]),g("div",oit,[g("p",null,S(t.$t("Pusher cluster region (e.g., mt1, us2, eu, ap1). Optional for custom providers.")),1)])]),_:1},8,["label"])):O("",!0),o.isCustomProvider?(v(),A(ee,{key:1},[_(l,{label:t.$t("Host")},{default:w(()=>[_(f,{modelValue:s.socketConfig.options.host,"onUpdate:modelValue":e[11]||(e[11]=C=>s.socketConfig.options.host=C),placeholder:t.$t("e.g., ws.example.com")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(l,{label:t.$t("Port")},{default:w(()=>[_(f,{modelValue:s.socketConfig.options.port,"onUpdate:modelValue":e[12]||(e[12]=C=>s.socketConfig.options.port=C),placeholder:"443"},null,8,["modelValue"])]),_:1},8,["label"]),_(l,{label:t.$t("Scheme")},{default:w(()=>[_(m,{modelValue:s.socketConfig.options.scheme,"onUpdate:modelValue":e[13]||(e[13]=C=>s.socketConfig.options.scheme=C),style:{width:"100%"}},{default:w(()=>[_(p,{value:"https",label:"HTTPS (Secure)"}),_(p,{value:"http",label:"HTTP"})]),_:1},8,["modelValue"])]),_:1},8,["label"])],64)):O("",!0)],64)):O("",!0)]),_:1},8,["modelValue"])])):(v(),A("div",rit,[g("h3",null,S(t.$t("Sorry, settings could not be loaded. Please make sure you have latest version of FluentCommunity Pro and Fluent Messaging Addons")),1)])),g("div",ait,[t.has_pro?De((v(),D(b,{key:0,class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[B(S(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[k,s.saving]]):(v(),A("div",lit,[g("p",cit,S(t.$t("Please upgrade to Pro to use this feature")),1),g("a",{class:"el-button",href:t.$upgradeUrl("feature_lock_messaging"),target:"_blank"},S(t.$t("Upgrade to Pro")),9,uit)]))])],64)}const hit=de(Ust,[["render",dit]]),fit={name:"FollowingConfigView",props:["features"],data(){return{follower_settings:null,showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1}},components:{UpgradeToProModal:jd},methods:{openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("settings/followers/config").then(t=>{this.follower_settings=t.settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1})},saveSettings(){const t=this.follower_settings.is_enabled!==this.features.followers_module;this.follower_settings.is_enabled=this.features.followers_module,this.saving=!0,this.$post("settings/followers/config",{settings:this.follower_settings}).then(e=>{this.$notify.success(e.message),t&&window.location.reload()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}}},pit={class:"fcom_storage_settings"},mit={key:0,class:"white_loaded"},git={key:1,class:"dialog_body"},vit={class:"fcom_mb_20"},_it={class:"dialog_footer"},yit={key:2};function bit(t,e,n,i,s,o){const r=We,a=Wt,l=Gt,c=en,u=Mi,d=xs,h=sn,f=Ea,p=W("UpgradeToProModal"),m=xt("loading");return v(),A(ee,null,[g("div",pit,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=y=>o.openSettings())},{default:w(()=>[B(S(t.$t("Settings")),1)]),_:1})]),_(f,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:t.dialogWidth,modelValue:s.showSettings,"onUpdate:modelValue":e[5]||(e[5]=y=>s.showSettings=y),direction:"rtl"},{header:w(({close:y})=>[g("h4",null,S(t.$t("Follower Module Settings")),1)]),default:w(()=>[s.fetching?(v(),A("div",mit,[_(a,{rows:5,animated:!0})])):s.follower_settings?(v(),A("div",git,[_(h,{onSubmit:e[4]||(e[4]=Ae(y=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,null,{default:w(()=>[_(l,{modelValue:n.features.followers_module,"onUpdate:modelValue":e[1]||(e[1]=y=>n.features.followers_module=y),"true-value":"yes","false-value":"no",label:t.$t("Enable Follower Module"),class:"fcom_checkbox"},null,8,["modelValue","label"])]),_:1}),n.features.followers_module==="yes"?(v(),A(ee,{key:0},[g("h5",vit,S(t.$t("Following Config")),1),_(c,{label:t.$t("Who can see the followers list on the user's profile?")},{default:w(()=>[_(d,{modelValue:s.follower_settings.who_can_see_followers,"onUpdate:modelValue":e[2]||(e[2]=y=>s.follower_settings.who_can_see_followers=y)},{default:w(()=>[_(u,{value:"public",label:t.$t("Everyone")},null,8,["label"]),_(u,{value:"members",label:t.$t("Members Only")},null,8,["label"]),_(u,{value:"only_me",label:t.$t("Only Profile Owner and Admin")},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(c,{label:t.$t("Who can see the followings list on the user's profile?")},{default:w(()=>[_(d,{modelValue:s.follower_settings.who_can_see_followings,"onUpdate:modelValue":e[3]||(e[3]=y=>s.follower_settings.who_can_see_followings=y)},{default:w(()=>[_(u,{value:"public",label:t.$t("Everyone")},null,8,["label"]),_(u,{value:"members",label:t.$t("Members Only")},null,8,["label"]),_(u,{value:"only_me",label:t.$t("Only Profile Owner and Admin")},null,8,["label"])]),_:1},8,["modelValue"])]),_:1},8,["label"])],64)):O("",!0)]),_:1}),g("div",_it,[De((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[B(S(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[m,s.saving]])])])):(v(),A("div",yit,[g("p",null,S(t.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"]),s.openUpgradeModal?(v(),D(p,{key:0,showModal:s.openUpgradeModal,onCloseModal:e[6]||(e[6]=y=>s.openUpgradeModal=!1),upgrade_module:"follower_module"},null,8,["showModal"])):O("",!0)],64)}const wit=de(fit,[["render",bit]]),kit={name:"FluentPlayerCustomization",components:{InfoFilled:fp},props:{modelValue:{type:Object,required:!0}},emits:["update:modelValue"],data(){return{activeNames:["0"]}},computed:{localSettings:{get(){return this.modelValue},set(t){this.$emit("update:modelValue",t)}},controls(){return this.localSettings.controls||{}},behaviors(){return this.localSettings.behaviors||{}}},methods:{isControlVisible(t){return this.localSettings.skin==="simple"?["play","volume","fullscreen","pip","captions_toggle"].includes(t):!0}}},Cit={key:0,class:"fluent-player-top-title-overlay"},xit={class:"fluent-player-title-stack"},Sit={class:"fluent-player-media-title"},$it={key:1,class:"fp-media-controls-center"},Ait={class:"fp-controls-group center"},Eit=g("svg",{class:"vds-play-icon",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",fill:"currentColor"})],-1),Mit=[Eit],Tit={key:2,class:"fp-media-controls-bottom"},Pit={key:0,class:"fp-controls-group"},Iit={key:0,class:"fp-media-button vds-button"},Lit=g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16.6667 10.3452C16.6667 10.8924 16.0439 11.2066 15.6038 10.8814L11.0766 7.5364C10.7159 7.26993 10.7159 6.73054 11.0766 6.46405L15.6038 3.11873C16.0439 2.79356 16.6667 3.10773 16.6667 3.6549V5.22682C16.6667 5.29746 16.7223 5.35579 16.7927 5.36066C22.6821 5.76757 27.3333 10.674 27.3333 16.6667C27.3333 22.9259 22.2592 28 16 28C9.96483 28 5.03145 23.2827 4.68601 17.3341C4.66466 16.9665 4.96518 16.6673 5.33339 16.6673H7.3334C7.70157 16.6673 7.99714 16.9668 8.02743 17.3337C8.36638 21.4399 11.8064 24.6667 16 24.6667C20.4183 24.6667 24 21.085 24 16.6667C24 12.5225 20.8483 9.11428 16.8113 8.70739C16.7337 8.69957 16.6667 8.76096 16.6667 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0226 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4279 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0993 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0832 15.4782 19.2015 15.6828 19.2868 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1),Oit=[Lit],Dit={key:1,class:"fp-media-button vds-button"},Rit=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",fill:"currentColor"})],-1),Vit=[Rit],Fit={key:2,class:"fp-media-button vds-button"},Nit=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M15.3333 10.3452C15.3333 10.8924 15.9561 11.2066 16.3962 10.8814L20.9234 7.5364C21.2841 7.26993 21.2841 6.73054 20.9235 6.46405L16.3962 3.11873C15.9561 2.79356 15.3333 3.10773 15.3333 3.6549V5.22682C15.3333 5.29746 15.2778 5.35579 15.2073 5.36066C9.31791 5.76757 4.66667 10.674 4.66667 16.6667C4.66667 22.9259 9.74078 28 16 28C22.0352 28 26.9686 23.2827 27.314 17.3341C27.3354 16.9665 27.0348 16.6673 26.6666 16.6673H24.6666C24.2984 16.6673 24.0029 16.9668 23.9726 17.3337C23.6336 21.4399 20.1937 24.6667 16 24.6667C11.5817 24.6667 8 21.085 8 16.6667C8 12.5225 11.1517 9.11428 15.1887 8.70739C15.2663 8.69957 15.3333 8.76096 15.3333 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0225 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4278 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0992 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0831 15.4782 19.2015 15.6828 19.2867 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1),Bit=[Nit],zit={key:3,class:"fp-media-button vds-button"},Hit=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M17.5091 24.6595C17.5091 25.2066 16.8864 25.5208 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9992 9.36923 19.9992H4.66667C4.29848 19.9992 4 19.7007 4 19.3325V12.6658C4 12.2976 4.29848 11.9992 4.66667 11.9992H9.37115C9.39967 11.9992 9.42745 11.99 9.45039 11.9731L16.4463 6.80363C16.8863 6.47845 17.5091 6.79262 17.5091 7.3398L17.5091 24.6595Z",fill:"currentColor"}),g("path",{d:"M27.5091 9.33336C27.8773 9.33336 28.1758 9.63184 28.1758 10V22C28.1758 22.3682 27.8773 22.6667 27.5091 22.6667H26.1758C25.8076 22.6667 25.5091 22.3682 25.5091 22V10C25.5091 9.63184 25.8076 9.33336 26.1758 9.33336L27.5091 9.33336Z",fill:"currentColor"}),g("path",{d:"M22.1758 12C22.544 12 22.8424 12.2985 22.8424 12.6667V19.3334C22.8424 19.7016 22.544 20 22.1758 20H20.8424C20.4743 20 20.1758 19.7016 20.1758 19.3334V12.6667C20.1758 12.2985 20.4743 12 20.8424 12H22.1758Z",fill:"currentColor"})],-1),Uit=[Hit],jit={key:4,class:"fp-media-slider vds-time-slider slider-volume"},Wit=g("div",{class:"vds-slider-track"},null,-1),Yit=g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),qit=g("div",{class:"vds-slider-thumb"},null,-1),Git=[Wit,Yit,qit],Xit={key:5,class:"fp-media-time-group"},Kit=g("span",null,"0:00",-1),Zit=g("span",null,"/",-1),Jit=g("span",null,"5:34",-1),Qit=[Kit,Zit,Jit],eot={key:6,class:"fp-media-controls-spacer-slider"},tot=g("div",{class:"fp-media-slider vds-time-slider"},[g("div",{class:"vds-slider-track"}),g("div",{class:"vds-slider-track-fill vds-slider-track"}),g("div",{class:"vds-slider-thumb"})],-1),not=[tot],sot={key:7,class:"fp-media-button vds-button"},iot=g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.6661 6.66699C4.29791 6.66699 3.99943 6.96547 3.99943 7.33366V24.667C3.99943 25.0352 4.29791 25.3337 4.6661 25.3337H27.3328C27.701 25.3337 27.9994 25.0352 27.9994 24.667V7.33366C27.9994 6.96547 27.701 6.66699 27.3328 6.66699H4.6661ZM8.66667 21.3333C8.29848 21.3333 8 21.0349 8 20.6667V11.3333C8 10.9651 8.29848 10.6667 8.66667 10.6667H14C14.3682 10.6667 14.6667 10.9651 14.6667 11.3333V12.6667C14.6667 13.0349 14.3682 13.3333 14 13.3333H10.8C10.7264 13.3333 10.6667 13.393 10.6667 13.4667V18.5333C10.6667 18.607 10.7264 18.6667 10.8 18.6667H14C14.3682 18.6667 14.6667 18.9651 14.6667 19.3333V20.6667C14.6667 21.0349 14.3682 21.3333 14 21.3333H8.66667ZM18 21.3333C17.6318 21.3333 17.3333 21.0349 17.3333 20.6667V11.3333C17.3333 10.9651 17.6318 10.6667 18 10.6667H23.3333C23.7015 10.6667 24 10.9651 24 11.3333V12.6667C24 13.0349 23.7015 13.3333 23.3333 13.3333H20.1333C20.0597 13.3333 20 13.393 20 13.4667V18.5333C20 18.607 20.0597 18.6667 20.1333 18.6667H23.3333C23.7015 18.6667 24 18.9651 24 19.3333V20.6667C24 21.0349 23.7015 21.3333 23.3333 21.3333H18Z",fill:"currentColor"})],-1),oot=[iot],rot={key:8,class:"fp-media-button vds-button"},aot=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.14 25.1089C25.0171 25.2532 24.8356 25.3333 24.646 25.3333H22.8124C22.1084 25.3333 21.7734 24.1872 22.2745 23.6927C23.9161 22.0729 24.9336 19.822 24.9336 17.3333C24.9336 12.3997 20.9336 8.39973 16 8.39973C11.0664 8.39973 7.06641 12.3997 7.06641 17.3333C7.06641 19.822 8.08389 22.0729 9.72555 23.6927C10.2266 24.1872 9.89155 25.3333 9.18762 25.3333H7.35398C7.16436 25.3333 6.98294 25.2532 6.86001 25.1089C5.07703 23.015 4 20.2991 4 17.3333C4 10.7057 9.3724 5.33333 16 5.33333C22.6276 5.33333 28 10.7057 28 17.3333C28 20.2991 26.923 23.015 25.14 25.1089Z",fill:"currentColor"}),g("path",{d:"M21.1992 14.3399C21.4595 14.0796 21.4595 13.6575 21.1992 13.3971L20.2564 12.4543C19.996 12.194 19.5739 12.194 19.3136 12.4543L16.4492 15.3187C16.4185 15.3493 16.3749 15.3629 16.332 15.3568C16.2236 15.3414 16.1127 15.3334 16 15.3334C14.7113 15.3334 13.6667 16.378 13.6667 17.6667C13.6667 18.9554 14.7113 20 16 20C17.2887 20 18.3333 18.9554 18.3333 17.6667C18.3333 17.5464 18.3242 17.4283 18.3067 17.313C18.3001 17.2696 18.3136 17.2255 18.3446 17.1945L21.1992 14.3399Z",fill:"currentColor"})],-1),lot=[aot],cot={key:9,class:"fp-media-button vds-button"},uot=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5722 5.33333C13.2429 5.33333 12.9629 5.57382 12.9132 5.89938L12.4063 9.21916C12.4 9.26058 12.3746 9.29655 12.3378 9.31672C12.2387 9.37118 12.1409 9.42779 12.0444 9.48648C12.0086 9.5083 11.9646 9.51242 11.9255 9.49718L8.79572 8.27692C8.48896 8.15732 8.14083 8.27958 7.9762 8.56472L5.5491 12.7686C5.38444 13.0538 5.45271 13.4165 5.70981 13.6223L8.33308 15.7225C8.3658 15.7487 8.38422 15.7887 8.38331 15.8306C8.38209 15.8867 8.38148 15.9429 8.38148 15.9993C8.38148 16.0558 8.3821 16.1121 8.38332 16.1684C8.38423 16.2102 8.36582 16.2503 8.33313 16.2765L5.7103 18.3778C5.45334 18.5836 5.38515 18.9462 5.54978 19.2314L7.97688 23.4352C8.14155 23.7205 8.48981 23.8427 8.79661 23.723L11.926 22.5016C11.9651 22.4864 12.009 22.4905 12.0449 22.5123C12.1412 22.5709 12.2388 22.6274 12.3378 22.6818C12.3745 22.7019 12.4 22.7379 12.4063 22.7793L12.9132 26.0993C12.9629 26.4249 13.2429 26.6654 13.5722 26.6654H18.4264C18.7556 26.6654 19.0356 26.425 19.0854 26.0995L19.5933 22.7801C19.5997 22.7386 19.6252 22.7027 19.6619 22.6825C19.7614 22.6279 19.8596 22.5711 19.9564 22.5121C19.9923 22.4903 20.0362 22.4862 20.0754 22.5015L23.2035 23.7223C23.5103 23.842 23.8585 23.7198 24.0232 23.4346L26.4503 19.2307C26.6149 18.9456 26.5467 18.583 26.2898 18.3771L23.6679 16.2766C23.6352 16.2504 23.6168 16.2104 23.6177 16.1685C23.619 16.1122 23.6196 16.0558 23.6196 15.9993C23.6196 15.9429 23.619 15.8866 23.6177 15.8305C23.6168 15.7886 23.6353 15.7486 23.668 15.7224L26.2903 13.623C26.5474 13.4172 26.6156 13.0544 26.451 12.7692L24.0239 8.56537C23.8592 8.28023 23.5111 8.15797 23.2043 8.27757L20.0758 9.49734C20.0367 9.51258 19.9927 9.50846 19.9569 9.48664C19.8599 9.42762 19.7616 9.37071 19.6618 9.31596C19.6251 9.2958 19.5997 9.25984 19.5933 9.21843L19.0854 5.89915C19.0356 5.57369 18.7556 5.33333 18.4264 5.33333H13.5722ZM16.0001 20.2854C18.3672 20.2854 20.2862 18.3664 20.2862 15.9993C20.2862 13.6322 18.3672 11.7132 16.0001 11.7132C13.6329 11.7132 11.714 13.6322 11.714 15.9993C11.714 18.3664 13.6329 20.2854 16.0001 20.2854Z",fill:"currentColor"})],-1),dot=[uot],hot={key:10,class:"fp-media-button vds-button"},fot=g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16 15.3333C15.6318 15.3333 15.3333 15.6318 15.3333 16V20C15.3333 20.3682 15.6318 20.6667 16 20.6667H21.3333C21.7015 20.6667 22 20.3682 22 20V16C22 15.6318 21.7015 15.3333 21.3333 15.3333H16Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.33333 7.33334C5.33333 6.96515 5.63181 6.66667 5.99999 6.66667H26C26.3682 6.66667 26.6667 6.96515 26.6667 7.33334V24.6667C26.6667 25.0349 26.3682 25.3333 26 25.3333H5.99999C5.63181 25.3333 5.33333 25.0349 5.33333 24.6667V7.33334ZM7.99999 10C7.99999 9.63182 8.29847 9.33334 8.66666 9.33334H23.3333C23.7015 9.33334 24 9.63182 24 10V22C24 22.3682 23.7015 22.6667 23.3333 22.6667H8.66666C8.29847 22.6667 7.99999 22.3682 7.99999 22V10Z",fill:"currentColor"})],-1),pot=[fot],mot={key:11,class:"fp-media-button vds-button"},got=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.3299 7.26517C25.2958 6.929 25.0119 6.66666 24.6667 6.66666H19.3334C18.9652 6.66666 18.6667 6.96514 18.6667 7.33333V9.33333C18.6667 9.70152 18.9652 10 19.3334 10L21.8667 10C21.9403 10 22 10.0597 22 10.1333V12.6667C22 13.0349 22.2985 13.3333 22.6667 13.3333H24.6667C25.0349 13.3333 25.3334 13.0349 25.3334 12.6667V7.33333C25.3334 7.31032 25.3322 7.28758 25.3299 7.26517Z",fill:"currentColor"}),g("path",{d:"M22 21.8667C22 21.9403 21.9403 22 21.8667 22L19.3334 22C18.9652 22 18.6667 22.2985 18.6667 22.6667V24.6667C18.6667 25.0349 18.9652 25.3333 19.3334 25.3333L24.6667 25.3333C25.0349 25.3333 25.3334 25.0349 25.3334 24.6667V19.3333C25.3334 18.9651 25.0349 18.6667 24.6667 18.6667H22.6667C22.2985 18.6667 22 18.9651 22 19.3333V21.8667Z",fill:"currentColor"}),g("path",{d:"M12.6667 22H10.1334C10.0597 22 10 21.9403 10 21.8667V19.3333C10 18.9651 9.70154 18.6667 9.33335 18.6667H7.33335C6.96516 18.6667 6.66669 18.9651 6.66669 19.3333V24.6667C6.66669 25.0349 6.96516 25.3333 7.33335 25.3333H12.6667C13.0349 25.3333 13.3334 25.0349 13.3334 24.6667V22.6667C13.3334 22.2985 13.0349 22 12.6667 22Z",fill:"currentColor"}),g("path",{d:"M10 12.6667V10.1333C10 10.0597 10.0597 10 10.1334 10L12.6667 10C13.0349 10 13.3334 9.70152 13.3334 9.33333V7.33333C13.3334 6.96514 13.0349 6.66666 12.6667 6.66666H7.33335C6.96516 6.66666 6.66669 6.96514 6.66669 7.33333V12.6667C6.66669 13.0349 6.96516 13.3333 7.33335 13.3333H9.33335C9.70154 13.3333 10 13.0349 10 12.6667Z",fill:"currentColor"})],-1),vot=[got],_ot={key:0,class:"fp-media-slider vds-time-slider"},yot=g("div",{class:"vds-slider-track"},null,-1),bot=g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),wot=g("div",{class:"vds-slider-thumb"},null,-1),kot=[yot,bot,wot],Cot={key:1,class:"fp-controls-group"},xot={key:0,class:"fp-media-button vds-button"},Sot=g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16.6667 10.3452C16.6667 10.8924 16.0439 11.2066 15.6038 10.8814L11.0766 7.5364C10.7159 7.26993 10.7159 6.73054 11.0766 6.46405L15.6038 3.11873C16.0439 2.79356 16.6667 3.10773 16.6667 3.6549V5.22682C16.6667 5.29746 16.7223 5.35579 16.7927 5.36066C22.6821 5.76757 27.3333 10.674 27.3333 16.6667C27.3333 22.9259 22.2592 28 16 28C9.96483 28 5.03145 23.2827 4.68601 17.3341C4.66466 16.9665 4.96518 16.6673 5.33339 16.6673H7.3334C7.70157 16.6673 7.99714 16.9668 8.02743 17.3337C8.36638 21.4399 11.8064 24.6667 16 24.6667C20.4183 24.6667 24 21.085 24 16.6667C24 12.5225 20.8483 9.11428 16.8113 8.70739C16.7337 8.69957 16.6667 8.76096 16.6667 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0226 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4279 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0993 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0832 15.4782 19.2015 15.6828 19.2868 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1),$ot=[Sot],Aot={key:1,class:"fp-media-button vds-button"},Eot=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",fill:"currentColor"})],-1),Mot=[Eot],Tot={key:2,class:"fp-media-button vds-button"},Pot=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M15.3333 10.3452C15.3333 10.8924 15.9561 11.2066 16.3962 10.8814L20.9234 7.5364C21.2841 7.26993 21.2841 6.73054 20.9235 6.46405L16.3962 3.11873C15.9561 2.79356 15.3333 3.10773 15.3333 3.6549V5.22682C15.3333 5.29746 15.2778 5.35579 15.2073 5.36066C9.31791 5.76757 4.66667 10.674 4.66667 16.6667C4.66667 22.9259 9.74078 28 16 28C22.0352 28 26.9686 23.2827 27.314 17.3341C27.3354 16.9665 27.0348 16.6673 26.6666 16.6673H24.6666C24.2984 16.6673 24.0029 16.9668 23.9726 17.3337C23.6336 21.4399 20.1937 24.6667 16 24.6667C11.5817 24.6667 8 21.085 8 16.6667C8 12.5225 11.1517 9.11428 15.1887 8.70739C15.2663 8.69957 15.3333 8.76096 15.3333 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0225 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4278 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0992 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0831 15.4782 19.2015 15.6828 19.2867 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1),Iot=[Pot],Lot={key:3,class:"fp-media-button vds-button"},Oot=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M17.5091 24.6595C17.5091 25.2066 16.8864 25.5208 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9992 9.36923 19.9992H4.66667C4.29848 19.9992 4 19.7007 4 19.3325V12.6658C4 12.2976 4.29848 11.9992 4.66667 11.9992H9.37115C9.39967 11.9992 9.42745 11.99 9.45039 11.9731L16.4463 6.80363C16.8863 6.47845 17.5091 6.79262 17.5091 7.3398L17.5091 24.6595Z",fill:"currentColor"}),g("path",{d:"M27.5091 9.33336C27.8773 9.33336 28.1758 9.63184 28.1758 10V22C28.1758 22.3682 27.8773 22.6667 27.5091 22.6667H26.1758C25.8076 22.6667 25.5091 22.3682 25.5091 22V10C25.5091 9.63184 25.8076 9.33336 26.1758 9.33336L27.5091 9.33336Z",fill:"currentColor"}),g("path",{d:"M22.1758 12C22.544 12 22.8424 12.2985 22.8424 12.6667V19.3334C22.8424 19.7016 22.544 20 22.1758 20H20.8424C20.4743 20 20.1758 19.7016 20.1758 19.3334V12.6667C20.1758 12.2985 20.4743 12 20.8424 12H22.1758Z",fill:"currentColor"})],-1),Dot=[Oot],Rot={key:4,class:"fp-media-slider vds-time-slider slider-volume"},Vot=g("div",{class:"vds-slider-track"},null,-1),Fot=g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),Not=g("div",{class:"vds-slider-thumb"},null,-1),Bot=[Vot,Fot,Not],zot={key:5,class:"fp-media-time-group"},Hot=g("span",null,"0:00",-1),Uot=g("span",null,"/",-1),jot=g("span",null,"5:34",-1),Wot=[Hot,Uot,jot],Yot=g("div",{class:"fp-media-controls-spacer"},null,-1),qot={key:6,class:"fp-media-button vds-button"},Got=g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.6661 6.66699C4.29791 6.66699 3.99943 6.96547 3.99943 7.33366V24.667C3.99943 25.0352 4.29791 25.3337 4.6661 25.3337H27.3328C27.701 25.3337 27.9994 25.0352 27.9994 24.667V7.33366C27.9994 6.96547 27.701 6.66699 27.3328 6.66699H4.6661ZM8.66667 21.3333C8.29848 21.3333 8 21.0349 8 20.6667V11.3333C8 10.9651 8.29848 10.6667 8.66667 10.6667H14C14.3682 10.6667 14.6667 10.9651 14.6667 11.3333V12.6667C14.6667 13.0349 14.3682 13.3333 14 13.3333H10.8C10.7264 13.3333 10.6667 13.393 10.6667 13.4667V18.5333C10.6667 18.607 10.7264 18.6667 10.8 18.6667H14C14.3682 18.6667 14.6667 18.9651 14.6667 19.3333V20.6667C14.6667 21.0349 14.3682 21.3333 14 21.3333H8.66667ZM18 21.3333C17.6318 21.3333 17.3333 21.0349 17.3333 20.6667V11.3333C17.3333 10.9651 17.6318 10.6667 18 10.6667H23.3333C23.7015 10.6667 24 10.9651 24 11.3333V12.6667C24 13.0349 23.7015 13.3333 23.3333 13.3333H20.1333C20.0597 13.3333 20 13.393 20 13.4667V18.5333C20 18.607 20.0597 18.6667 20.1333 18.6667H23.3333C23.7015 18.6667 24 18.9651 24 19.3333V20.6667C24 21.0349 23.7015 21.3333 23.3333 21.3333H18Z",fill:"currentColor"})],-1),Xot=[Got],Kot={key:7,class:"fp-media-button vds-button"},Zot=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.14 25.1089C25.0171 25.2532 24.8356 25.3333 24.646 25.3333H22.8124C22.1084 25.3333 21.7734 24.1872 22.2745 23.6927C23.9161 22.0729 24.9336 19.822 24.9336 17.3333C24.9336 12.3997 20.9336 8.39973 16 8.39973C11.0664 8.39973 7.06641 12.3997 7.06641 17.3333C7.06641 19.822 8.08389 22.0729 9.72555 23.6927C10.2266 24.1872 9.89155 25.3333 9.18762 25.3333H7.35398C7.16436 25.3333 6.98294 25.2532 6.86001 25.1089C5.07703 23.015 4 20.2991 4 17.3333C4 10.7057 9.3724 5.33333 16 5.33333C22.6276 5.33333 28 10.7057 28 17.3333C28 20.2991 26.923 23.015 25.14 25.1089Z",fill:"currentColor"}),g("path",{d:"M21.1992 14.3399C21.4595 14.0796 21.4595 13.6575 21.1992 13.3971L20.2564 12.4543C19.996 12.194 19.5739 12.194 19.3136 12.4543L16.4492 15.3187C16.4185 15.3493 16.3749 15.3629 16.332 15.3568C16.2236 15.3414 16.1127 15.3334 16 15.3334C14.7113 15.3334 13.6667 16.378 13.6667 17.6667C13.6667 18.9554 14.7113 20 16 20C17.2887 20 18.3333 18.9554 18.3333 17.6667C18.3333 17.5464 18.3242 17.4283 18.3067 17.313C18.3001 17.2696 18.3136 17.2255 18.3446 17.1945L21.1992 14.3399Z",fill:"currentColor"})],-1),Jot=[Zot],Qot={key:8,class:"fp-media-button vds-button"},ert=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5722 5.33333C13.2429 5.33333 12.9629 5.57382 12.9132 5.89938L12.4063 9.21916C12.4 9.26058 12.3746 9.29655 12.3378 9.31672C12.2387 9.37118 12.1409 9.42779 12.0444 9.48648C12.0086 9.5083 11.9646 9.51242 11.9255 9.49718L8.79572 8.27692C8.48896 8.15732 8.14083 8.27958 7.9762 8.56472L5.5491 12.7686C5.38444 13.0538 5.45271 13.4165 5.70981 13.6223L8.33308 15.7225C8.3658 15.7487 8.38422 15.7887 8.38331 15.8306C8.38209 15.8867 8.38148 15.9429 8.38148 15.9993C8.38148 16.0558 8.3821 16.1121 8.38332 16.1684C8.38423 16.2102 8.36582 16.2503 8.33313 16.2765L5.7103 18.3778C5.45334 18.5836 5.38515 18.9462 5.54978 19.2314L7.97688 23.4352C8.14155 23.7205 8.48981 23.8427 8.79661 23.723L11.926 22.5016C11.9651 22.4864 12.009 22.4905 12.0449 22.5123C12.1412 22.5709 12.2388 22.6274 12.3378 22.6818C12.3745 22.7019 12.4 22.7379 12.4063 22.7793L12.9132 26.0993C12.9629 26.4249 13.2429 26.6654 13.5722 26.6654H18.4264C18.7556 26.6654 19.0356 26.425 19.0854 26.0995L19.5933 22.7801C19.5997 22.7386 19.6252 22.7027 19.6619 22.6825C19.7614 22.6279 19.8596 22.5711 19.9564 22.5121C19.9923 22.4903 20.0362 22.4862 20.0754 22.5015L23.2035 23.7223C23.5103 23.842 23.8585 23.7198 24.0232 23.4346L26.4503 19.2307C26.6149 18.9456 26.5467 18.583 26.2898 18.3771L23.6679 16.2766C23.6352 16.2504 23.6168 16.2104 23.6177 16.1685C23.619 16.1122 23.6196 16.0558 23.6196 15.9993C23.6196 15.9429 23.619 15.8866 23.6177 15.8305C23.6168 15.7886 23.6353 15.7486 23.668 15.7224L26.2903 13.623C26.5474 13.4172 26.6156 13.0544 26.451 12.7692L24.0239 8.56537C23.8592 8.28023 23.5111 8.15797 23.2043 8.27757L20.0758 9.49734C20.0367 9.51258 19.9927 9.50846 19.9569 9.48664C19.8599 9.42762 19.7616 9.37071 19.6618 9.31596C19.6251 9.2958 19.5997 9.25984 19.5933 9.21843L19.0854 5.89915C19.0356 5.57369 18.7556 5.33333 18.4264 5.33333H13.5722ZM16.0001 20.2854C18.3672 20.2854 20.2862 18.3664 20.2862 15.9993C20.2862 13.6322 18.3672 11.7132 16.0001 11.7132C13.6329 11.7132 11.714 13.6322 11.714 15.9993C11.714 18.3664 13.6329 20.2854 16.0001 20.2854Z",fill:"currentColor"})],-1),trt=[ert],nrt={key:9,class:"fp-media-button vds-button"},srt=g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16 15.3333C15.6318 15.3333 15.3333 15.6318 15.3333 16V20C15.3333 20.3682 15.6318 20.6667 16 20.6667H21.3333C21.7015 20.6667 22 20.3682 22 20V16C22 15.6318 21.7015 15.3333 21.3333 15.3333H16Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.33333 7.33334C5.33333 6.96515 5.63181 6.66667 5.99999 6.66667H26C26.3682 6.66667 26.6667 6.96515 26.6667 7.33334V24.6667C26.6667 25.0349 26.3682 25.3333 26 25.3333H5.99999C5.63181 25.3333 5.33333 25.0349 5.33333 24.6667V7.33334ZM7.99999 10C7.99999 9.63182 8.29847 9.33334 8.66666 9.33334H23.3333C23.7015 9.33334 24 9.63182 24 10V22C24 22.3682 23.7015 22.6667 23.3333 22.6667H8.66666C8.29847 22.6667 7.99999 22.3682 7.99999 22V10Z",fill:"currentColor"})],-1),irt=[srt],ort={key:10,class:"fp-media-button vds-button"},rrt=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.3299 7.26517C25.2958 6.929 25.0119 6.66666 24.6667 6.66666H19.3334C18.9652 6.66666 18.6667 6.96514 18.6667 7.33333V9.33333C18.6667 9.70152 18.9652 10 19.3334 10L21.8667 10C21.9403 10 22 10.0597 22 10.1333V12.6667C22 13.0349 22.2985 13.3333 22.6667 13.3333H24.6667C25.0349 13.3333 25.3334 13.0349 25.3334 12.6667V7.33333C25.3334 7.31032 25.3322 7.28758 25.3299 7.26517Z",fill:"currentColor"}),g("path",{d:"M22 21.8667C22 21.9403 21.9403 22 21.8667 22L19.3334 22C18.9652 22 18.6667 22.2985 18.6667 22.6667V24.6667C18.6667 25.0349 18.9652 25.3333 19.3334 25.3333L24.6667 25.3333C25.0349 25.3333 25.3334 25.0349 25.3334 24.6667V19.3333C25.3334 18.9651 25.0349 18.6667 24.6667 18.6667H22.6667C22.2985 18.6667 22 18.9651 22 19.3333V21.8667Z",fill:"currentColor"}),g("path",{d:"M12.6667 22H10.1334C10.0597 22 10 21.9403 10 21.8667V19.3333C10 18.9651 9.70154 18.6667 9.33335 18.6667H7.33335C6.96516 18.6667 6.66669 18.9651 6.66669 19.3333V24.6667C6.66669 25.0349 6.96516 25.3333 7.33335 25.3333H12.6667C13.0349 25.3333 13.3334 25.0349 13.3334 24.6667V22.6667C13.3334 22.2985 13.0349 22 12.6667 22Z",fill:"currentColor"}),g("path",{d:"M10 12.6667V10.1333C10 10.0597 10.0597 10 10.1334 10L12.6667 10C13.0349 10 13.3334 9.70152 13.3334 9.33333V7.33333C13.3334 6.96514 13.0349 6.66666 12.6667 6.66666H7.33335C6.96516 6.66666 6.66669 6.96514 6.66669 7.33333V12.6667C6.66669 13.0349 6.96516 13.3333 7.33335 13.3333H9.33335C9.70154 13.3333 10 13.0349 10 12.6667Z",fill:"currentColor"})],-1),art=[rrt],lrt={key:2,class:"fp-controls-group"},crt={key:0,class:"fp-media-button vds-button"},urt=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",fill:"currentColor"})],-1),drt=[urt],hrt={key:1,class:"fp-media-button vds-button"},frt=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M17.5091 24.6595C17.5091 25.2066 16.8864 25.5208 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9992 9.36923 19.9992H4.66667C4.29848 19.9992 4 19.7007 4 19.3325V12.6658C4 12.2976 4.29848 11.9992 4.66667 11.9992H9.37115C9.39967 11.9992 9.42745 11.99 9.45039 11.9731L16.4463 6.80363C16.8863 6.47845 17.5091 6.79262 17.5091 7.3398L17.5091 24.6595Z",fill:"currentColor"}),g("path",{d:"M27.5091 9.33336C27.8773 9.33336 28.1758 9.63184 28.1758 10V22C28.1758 22.3682 27.8773 22.6667 27.5091 22.6667H26.1758C25.8076 22.6667 25.5091 22.3682 25.5091 22V10C25.5091 9.63184 25.8076 9.33336 26.1758 9.33336L27.5091 9.33336Z",fill:"currentColor"}),g("path",{d:"M22.1758 12C22.544 12 22.8424 12.2985 22.8424 12.6667V19.3334C22.8424 19.7016 22.544 20 22.1758 20H20.8424C20.4743 20 20.1758 19.7016 20.1758 19.3334V12.6667C20.1758 12.2985 20.4743 12 20.8424 12H22.1758Z",fill:"currentColor"})],-1),prt=[frt],mrt={key:2,class:"fp-media-slider vds-time-slider slider-volume"},grt=g("div",{class:"vds-slider-track"},null,-1),vrt=g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),_rt=g("div",{class:"vds-slider-thumb"},null,-1),yrt=[grt,vrt,_rt],brt=g("div",{class:"fp-media-slider vds-time-slider"},[g("div",{class:"vds-slider-track"}),g("div",{class:"vds-slider-track-fill vds-slider-track"}),g("div",{class:"vds-slider-thumb"})],-1),wrt={key:3,class:"fp-media-button vds-button"},krt=g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.6661 6.66699C4.29791 6.66699 3.99943 6.96547 3.99943 7.33366V24.667C3.99943 25.0352 4.29791 25.3337 4.6661 25.3337H27.3328C27.701 25.3337 27.9994 25.0352 27.9994 24.667V7.33366C27.9994 6.96547 27.701 6.66699 27.3328 6.66699H4.6661ZM8.66667 21.3333C8.29848 21.3333 8 21.0349 8 20.6667V11.3333C8 10.9651 8.29848 10.6667 8.66667 10.6667H14C14.3682 10.6667 14.6667 10.9651 14.6667 11.3333V12.6667C14.6667 13.0349 14.3682 13.3333 14 13.3333H10.8C10.7264 13.3333 10.6667 13.393 10.6667 13.4667V18.5333C10.6667 18.607 10.7264 18.6667 10.8 18.6667H14C14.3682 18.6667 14.6667 18.9651 14.6667 19.3333V20.6667C14.6667 21.0349 14.3682 21.3333 14 21.3333H8.66667ZM18 21.3333C17.6318 21.3333 17.3333 21.0349 17.3333 20.6667V11.3333C17.3333 10.9651 17.6318 10.6667 18 10.6667H23.3333C23.7015 10.6667 24 10.9651 24 11.3333V12.6667C24 13.0349 23.7015 13.3333 23.3333 13.3333H20.1333C20.0597 13.3333 20 13.393 20 13.4667V18.5333C20 18.607 20.0597 18.6667 20.1333 18.6667H23.3333C23.7015 18.6667 24 18.9651 24 19.3333V20.6667C24 21.0349 23.7015 21.3333 23.3333 21.3333H18Z",fill:"currentColor"})],-1),Crt=[krt],xrt={key:4,class:"fp-media-button vds-button"},Srt=g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16 15.3333C15.6318 15.3333 15.3333 15.6318 15.3333 16V20C15.3333 20.3682 15.6318 20.6667 16 20.6667H21.3333C21.7015 20.6667 22 20.3682 22 20V16C22 15.6318 21.7015 15.3333 21.3333 15.3333H16Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.33333 7.33334C5.33333 6.96515 5.63181 6.66667 5.99999 6.66667H26C26.3682 6.66667 26.6667 6.96515 26.6667 7.33334V24.6667C26.6667 25.0349 26.3682 25.3333 26 25.3333H5.99999C5.63181 25.3333 5.33333 25.0349 5.33333 24.6667V7.33334ZM7.99999 10C7.99999 9.63182 8.29847 9.33334 8.66666 9.33334H23.3333C23.7015 9.33334 24 9.63182 24 10V22C24 22.3682 23.7015 22.6667 23.3333 22.6667H8.66666C8.29847 22.6667 7.99999 22.3682 7.99999 22V10Z",fill:"currentColor"})],-1),$rt=[Srt],Art={key:5,class:"fp-media-button vds-button"},Ert=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.3299 7.26517C25.2958 6.929 25.0119 6.66666 24.6667 6.66666H19.3334C18.9652 6.66666 18.6667 6.96514 18.6667 7.33333V9.33333C18.6667 9.70152 18.9652 10 19.3334 10L21.8667 10C21.9403 10 22 10.0597 22 10.1333V12.6667C22 13.0349 22.2985 13.3333 22.6667 13.3333H24.6667C25.0349 13.3333 25.3334 13.0349 25.3334 12.6667V7.33333C25.3334 7.31032 25.3322 7.28758 25.3299 7.26517Z",fill:"currentColor"}),g("path",{d:"M22 21.8667C22 21.9403 21.9403 22 21.8667 22L19.3334 22C18.9652 22 18.6667 22.2985 18.6667 22.6667V24.6667C18.6667 25.0349 18.9652 25.3333 19.3334 25.3333L24.6667 25.3333C25.0349 25.3333 25.3334 25.0349 25.3334 24.6667V19.3333C25.3334 18.9651 25.0349 18.6667 24.6667 18.6667H22.6667C22.2985 18.6667 22 18.9651 22 19.3333V21.8667Z",fill:"currentColor"}),g("path",{d:"M12.6667 22H10.1334C10.0597 22 10 21.9403 10 21.8667V19.3333C10 18.9651 9.70154 18.6667 9.33335 18.6667H7.33335C6.96516 18.6667 6.66669 18.9651 6.66669 19.3333V24.6667C6.66669 25.0349 6.96516 25.3333 7.33335 25.3333H12.6667C13.0349 25.3333 13.3334 25.0349 13.3334 24.6667V22.6667C13.3334 22.2985 13.0349 22 12.6667 22Z",fill:"currentColor"}),g("path",{d:"M10 12.6667V10.1333C10 10.0597 10.0597 10 10.1334 10L12.6667 10C13.0349 10 13.3334 9.70152 13.3334 9.33333V7.33333C13.3334 6.96514 13.0349 6.66666 12.6667 6.66666H7.33335C6.96516 6.66666 6.66669 6.96514 6.66669 7.33333V12.6667C6.66669 13.0349 6.96516 13.3333 7.33335 13.3333H9.33335C9.70154 13.3333 10 13.0349 10 12.6667Z",fill:"currentColor"})],-1),Mrt=[Ert],Trt={key:3,class:"fp-controls-group fp-floating-bar"},Prt={key:0,class:"fp-media-button vds-button"},Irt=g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16.6667 10.3452C16.6667 10.8924 16.0439 11.2066 15.6038 10.8814L11.0766 7.5364C10.7159 7.26993 10.7159 6.73054 11.0766 6.46405L15.6038 3.11873C16.0439 2.79356 16.6667 3.10773 16.6667 3.6549V5.22682C16.6667 5.29746 16.7223 5.35579 16.7927 5.36066C22.6821 5.76757 27.3333 10.674 27.3333 16.6667C27.3333 22.9259 22.2592 28 16 28C9.96483 28 5.03145 23.2827 4.68601 17.3341C4.66466 16.9665 4.96518 16.6673 5.33339 16.6673H7.3334C7.70157 16.6673 7.99714 16.9668 8.02743 17.3337C8.36638 21.4399 11.8064 24.6667 16 24.6667C20.4183 24.6667 24 21.085 24 16.6667C24 12.5225 20.8483 9.11428 16.8113 8.70739C16.7337 8.69957 16.6667 8.76096 16.6667 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0226 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4279 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0993 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0832 15.4782 19.2015 15.6828 19.2868 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1),Lrt=[Irt],Ort={key:1,class:"fp-media-button vds-button"},Drt=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M10.6667 6.6548C10.6667 6.10764 11.2894 5.79346 11.7295 6.11862L24.377 15.4634C24.7377 15.7298 24.7377 16.2692 24.3771 16.5357L11.7295 25.8813C11.2895 26.2065 10.6667 25.8923 10.6667 25.3451L10.6667 6.6548Z",fill:"currentColor"})],-1),Rrt=[Drt],Vrt={key:2,class:"fp-media-button vds-button"},Frt=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M15.3333 10.3452C15.3333 10.8924 15.9561 11.2066 16.3962 10.8814L20.9234 7.5364C21.2841 7.26993 21.2841 6.73054 20.9235 6.46405L16.3962 3.11873C15.9561 2.79356 15.3333 3.10773 15.3333 3.6549V5.22682C15.3333 5.29746 15.2778 5.35579 15.2073 5.36066C9.31791 5.76757 4.66667 10.674 4.66667 16.6667C4.66667 22.9259 9.74078 28 16 28C22.0352 28 26.9686 23.2827 27.314 17.3341C27.3354 16.9665 27.0348 16.6673 26.6666 16.6673H24.6666C24.2984 16.6673 24.0029 16.9668 23.9726 17.3337C23.6336 21.4399 20.1937 24.6667 16 24.6667C11.5817 24.6667 8 21.085 8 16.6667C8 12.5225 11.1517 9.11428 15.1887 8.70739C15.2663 8.69957 15.3333 8.76096 15.3333 8.83893V10.3452Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M17.0879 19.679C17.4553 19.9195 17.8928 20.0398 18.4004 20.0398C18.9099 20.0398 19.3474 19.9205 19.7129 19.6818C20.0803 19.4413 20.3635 19.0938 20.5623 18.6392C20.7612 18.1847 20.8606 17.6373 20.8606 16.9972C20.8625 16.3608 20.764 15.8192 20.5652 15.3722C20.3663 14.9252 20.0822 14.5853 19.7129 14.3523C19.3455 14.1175 18.908 14 18.4004 14C17.8928 14 17.4553 14.1175 17.0879 14.3523C16.7224 14.5853 16.4402 14.9252 16.2413 15.3722C16.0443 15.8173 15.9449 16.3589 15.943 16.9972C15.9411 17.6354 16.0396 18.1818 16.2385 18.6364C16.4373 19.089 16.7205 19.4366 17.0879 19.679ZM19.1362 18.4262C18.9487 18.7349 18.7034 18.8892 18.4004 18.8892C18.1996 18.8892 18.0225 18.8211 17.8691 18.6847C17.7157 18.5464 17.5964 18.3372 17.5112 18.0568C17.4278 17.7765 17.3871 17.4233 17.389 16.9972C17.3909 16.3684 17.4847 15.9025 17.6703 15.5995C17.8559 15.2945 18.0992 15.1421 18.4004 15.1421C18.603 15.1421 18.7801 15.2093 18.9316 15.3438C19.0831 15.4782 19.2015 15.6828 19.2867 15.9574C19.372 16.2301 19.4146 16.5767 19.4146 16.9972C19.4165 17.6392 19.3237 18.1156 19.1362 18.4262Z",fill:"currentColor"}),g("path",{d:"M13.7746 19.8978C13.8482 19.8978 13.9079 19.8381 13.9079 19.7644V14.2129C13.9079 14.1393 13.8482 14.0796 13.7746 14.0796H12.642C12.6171 14.0796 12.5927 14.0865 12.5716 14.0997L11.2322 14.9325C11.1931 14.9568 11.1693 14.9996 11.1693 15.0457V15.9497C11.1693 16.0539 11.2833 16.1178 11.3722 16.0635L12.464 15.396C12.4682 15.3934 12.473 15.3921 12.4779 15.3921C12.4926 15.3921 12.5045 15.404 12.5045 15.4187V19.7644C12.5045 19.8381 12.5642 19.8978 12.6378 19.8978H13.7746Z",fill:"currentColor"})],-1),Nrt=[Frt],Brt={key:3,class:"fp-media-time-group"},zrt=g("span",null,"0:00",-1),Hrt=g("span",null,"/",-1),Urt=g("span",null,"5:34",-1),jrt=[zrt,Hrt,Urt],Wrt={key:4,class:"fp-media-controls-spacer-slider"},Yrt=g("div",{class:"fp-media-slider vds-time-slider"},[g("div",{class:"vds-slider-track"}),g("div",{class:"vds-slider-track-fill vds-slider-track"}),g("div",{class:"vds-slider-thumb"})],-1),qrt=[Yrt],Grt={key:5,class:"fp-media-button vds-button"},Xrt=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M17.5091 24.6595C17.5091 25.2066 16.8864 25.5208 16.4463 25.1956L9.44847 20.0252C9.42553 20.0083 9.39776 19.9992 9.36923 19.9992H4.66667C4.29848 19.9992 4 19.7007 4 19.3325V12.6658C4 12.2976 4.29848 11.9992 4.66667 11.9992H9.37115C9.39967 11.9992 9.42745 11.99 9.45039 11.9731L16.4463 6.80363C16.8863 6.47845 17.5091 6.79262 17.5091 7.3398L17.5091 24.6595Z",fill:"currentColor"}),g("path",{d:"M27.5091 9.33336C27.8773 9.33336 28.1758 9.63184 28.1758 10V22C28.1758 22.3682 27.8773 22.6667 27.5091 22.6667H26.1758C25.8076 22.6667 25.5091 22.3682 25.5091 22V10C25.5091 9.63184 25.8076 9.33336 26.1758 9.33336L27.5091 9.33336Z",fill:"currentColor"}),g("path",{d:"M22.1758 12C22.544 12 22.8424 12.2985 22.8424 12.6667V19.3334C22.8424 19.7016 22.544 20 22.1758 20H20.8424C20.4743 20 20.1758 19.7016 20.1758 19.3334V12.6667C20.1758 12.2985 20.4743 12 20.8424 12H22.1758Z",fill:"currentColor"})],-1),Krt=[Xrt],Zrt={key:6,class:"fp-media-slider vds-time-slider slider-volume"},Jrt=g("div",{class:"vds-slider-track"},null,-1),Qrt=g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),eat=g("div",{class:"vds-slider-thumb"},null,-1),tat=[Jrt,Qrt,eat],nat={key:7,class:"fp-media-button vds-button"},sat=g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M4.6661 6.66699C4.29791 6.66699 3.99943 6.96547 3.99943 7.33366V24.667C3.99943 25.0352 4.29791 25.3337 4.6661 25.3337H27.3328C27.701 25.3337 27.9994 25.0352 27.9994 24.667V7.33366C27.9994 6.96547 27.701 6.66699 27.3328 6.66699H4.6661ZM8.66667 21.3333C8.29848 21.3333 8 21.0349 8 20.6667V11.3333C8 10.9651 8.29848 10.6667 8.66667 10.6667H14C14.3682 10.6667 14.6667 10.9651 14.6667 11.3333V12.6667C14.6667 13.0349 14.3682 13.3333 14 13.3333H10.8C10.7264 13.3333 10.6667 13.393 10.6667 13.4667V18.5333C10.6667 18.607 10.7264 18.6667 10.8 18.6667H14C14.3682 18.6667 14.6667 18.9651 14.6667 19.3333V20.6667C14.6667 21.0349 14.3682 21.3333 14 21.3333H8.66667ZM18 21.3333C17.6318 21.3333 17.3333 21.0349 17.3333 20.6667V11.3333C17.3333 10.9651 17.6318 10.6667 18 10.6667H23.3333C23.7015 10.6667 24 10.9651 24 11.3333V12.6667C24 13.0349 23.7015 13.3333 23.3333 13.3333H20.1333C20.0597 13.3333 20 13.393 20 13.4667V18.5333C20 18.607 20.0597 18.6667 20.1333 18.6667H23.3333C23.7015 18.6667 24 18.9651 24 19.3333V20.6667C24 21.0349 23.7015 21.3333 23.3333 21.3333H18Z",fill:"currentColor"})],-1),iat=[sat],oat={key:8,class:"fp-media-button vds-button"},rat=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.14 25.1089C25.0171 25.2532 24.8356 25.3333 24.646 25.3333H22.8124C22.1084 25.3333 21.7734 24.1872 22.2745 23.6927C23.9161 22.0729 24.9336 19.822 24.9336 17.3333C24.9336 12.3997 20.9336 8.39973 16 8.39973C11.0664 8.39973 7.06641 12.3997 7.06641 17.3333C7.06641 19.822 8.08389 22.0729 9.72555 23.6927C10.2266 24.1872 9.89155 25.3333 9.18762 25.3333H7.35398C7.16436 25.3333 6.98294 25.2532 6.86001 25.1089C5.07703 23.015 4 20.2991 4 17.3333C4 10.7057 9.3724 5.33333 16 5.33333C22.6276 5.33333 28 10.7057 28 17.3333C28 20.2991 26.923 23.015 25.14 25.1089Z",fill:"currentColor"}),g("path",{d:"M21.1992 14.3399C21.4595 14.0796 21.4595 13.6575 21.1992 13.3971L20.2564 12.4543C19.996 12.194 19.5739 12.194 19.3136 12.4543L16.4492 15.3187C16.4185 15.3493 16.3749 15.3629 16.332 15.3568C16.2236 15.3414 16.1127 15.3334 16 15.3334C14.7113 15.3334 13.6667 16.378 13.6667 17.6667C13.6667 18.9554 14.7113 20 16 20C17.2887 20 18.3333 18.9554 18.3333 17.6667C18.3333 17.5464 18.3242 17.4283 18.3067 17.313C18.3001 17.2696 18.3136 17.2255 18.3446 17.1945L21.1992 14.3399Z",fill:"currentColor"})],-1),aat=[rat],lat={key:9,class:"fp-media-button vds-button"},cat=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M13.5722 5.33333C13.2429 5.33333 12.9629 5.57382 12.9132 5.89938L12.4063 9.21916C12.4 9.26058 12.3746 9.29655 12.3378 9.31672C12.2387 9.37118 12.1409 9.42779 12.0444 9.48648C12.0086 9.5083 11.9646 9.51242 11.9255 9.49718L8.79572 8.27692C8.48896 8.15732 8.14083 8.27958 7.9762 8.56472L5.5491 12.7686C5.38444 13.0538 5.45271 13.4165 5.70981 13.6223L8.33308 15.7225C8.3658 15.7487 8.38422 15.7887 8.38331 15.8306C8.38209 15.8867 8.38148 15.9429 8.38148 15.9993C8.38148 16.0558 8.3821 16.1121 8.38332 16.1684C8.38423 16.2102 8.36582 16.2503 8.33313 16.2765L5.7103 18.3778C5.45334 18.5836 5.38515 18.9462 5.54978 19.2314L7.97688 23.4352C8.14155 23.7205 8.48981 23.8427 8.79661 23.723L11.926 22.5016C11.9651 22.4864 12.009 22.4905 12.0449 22.5123C12.1412 22.5709 12.2388 22.6274 12.3378 22.6818C12.3745 22.7019 12.4 22.7379 12.4063 22.7793L12.9132 26.0993C12.9629 26.4249 13.2429 26.6654 13.5722 26.6654H18.4264C18.7556 26.6654 19.0356 26.425 19.0854 26.0995L19.5933 22.7801C19.5997 22.7386 19.6252 22.7027 19.6619 22.6825C19.7614 22.6279 19.8596 22.5711 19.9564 22.5121C19.9923 22.4903 20.0362 22.4862 20.0754 22.5015L23.2035 23.7223C23.5103 23.842 23.8585 23.7198 24.0232 23.4346L26.4503 19.2307C26.6149 18.9456 26.5467 18.583 26.2898 18.3771L23.6679 16.2766C23.6352 16.2504 23.6168 16.2104 23.6177 16.1685C23.619 16.1122 23.6196 16.0558 23.6196 15.9993C23.6196 15.9429 23.619 15.8866 23.6177 15.8305C23.6168 15.7886 23.6353 15.7486 23.668 15.7224L26.2903 13.623C26.5474 13.4172 26.6156 13.0544 26.451 12.7692L24.0239 8.56537C23.8592 8.28023 23.5111 8.15797 23.2043 8.27757L20.0758 9.49734C20.0367 9.51258 19.9927 9.50846 19.9569 9.48664C19.8599 9.42762 19.7616 9.37071 19.6618 9.31596C19.6251 9.2958 19.5997 9.25984 19.5933 9.21843L19.0854 5.89915C19.0356 5.57369 18.7556 5.33333 18.4264 5.33333H13.5722ZM16.0001 20.2854C18.3672 20.2854 20.2862 18.3664 20.2862 15.9993C20.2862 13.6322 18.3672 11.7132 16.0001 11.7132C13.6329 11.7132 11.714 13.6322 11.714 15.9993C11.714 18.3664 13.6329 20.2854 16.0001 20.2854Z",fill:"currentColor"})],-1),uat=[cat],dat={key:10,class:"fp-media-button vds-button"},hat=g("svg",{width:"100%",height:"100%",viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M16 15.3333C15.6318 15.3333 15.3333 15.6318 15.3333 16V20C15.3333 20.3682 15.6318 20.6667 16 20.6667H21.3333C21.7015 20.6667 22 20.3682 22 20V16C22 15.6318 21.7015 15.3333 21.3333 15.3333H16Z",fill:"currentColor"}),g("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.33333 7.33334C5.33333 6.96515 5.63181 6.66667 5.99999 6.66667H26C26.3682 6.66667 26.6667 6.96515 26.6667 7.33334V24.6667C26.6667 25.0349 26.3682 25.3333 26 25.3333H5.99999C5.63181 25.3333 5.33333 25.0349 5.33333 24.6667V7.33334ZM7.99999 10C7.99999 9.63182 8.29847 9.33334 8.66666 9.33334H23.3333C23.7015 9.33334 24 9.63182 24 10V22C24 22.3682 23.7015 22.6667 23.3333 22.6667H8.66666C8.29847 22.6667 7.99999 22.3682 7.99999 22V10Z",fill:"currentColor"})],-1),fat=[hat],pat={key:11,class:"fp-media-button vds-button"},mat=g("svg",{viewBox:"0 0 32 32",fill:"none","aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg"},[g("path",{d:"M25.3299 7.26517C25.2958 6.929 25.0119 6.66666 24.6667 6.66666H19.3334C18.9652 6.66666 18.6667 6.96514 18.6667 7.33333V9.33333C18.6667 9.70152 18.9652 10 19.3334 10L21.8667 10C21.9403 10 22 10.0597 22 10.1333V12.6667C22 13.0349 22.2985 13.3333 22.6667 13.3333H24.6667C25.0349 13.3333 25.3334 13.0349 25.3334 12.6667V7.33333C25.3334 7.31032 25.3322 7.28758 25.3299 7.26517Z",fill:"currentColor"}),g("path",{d:"M22 21.8667C22 21.9403 21.9403 22 21.8667 22L19.3334 22C18.9652 22 18.6667 22.2985 18.6667 22.6667V24.6667C18.6667 25.0349 18.9652 25.3333 19.3334 25.3333L24.6667 25.3333C25.0349 25.3333 25.3334 25.0349 25.3334 24.6667V19.3333C25.3334 18.9651 25.0349 18.6667 24.6667 18.6667H22.6667C22.2985 18.6667 22 18.9651 22 19.3333V21.8667Z",fill:"currentColor"}),g("path",{d:"M12.6667 22H10.1334C10.0597 22 10 21.9403 10 21.8667V19.3333C10 18.9651 9.70154 18.6667 9.33335 18.6667H7.33335C6.96516 18.6667 6.66669 18.9651 6.66669 19.3333V24.6667C6.66669 25.0349 6.96516 25.3333 7.33335 25.3333H12.6667C13.0349 25.3333 13.3334 25.0349 13.3334 24.6667V22.6667C13.3334 22.2985 13.0349 22 12.6667 22Z",fill:"currentColor"}),g("path",{d:"M10 12.6667V10.1333C10 10.0597 10.0597 10 10.1334 10L12.6667 10C13.0349 10 13.3334 9.70152 13.3334 9.33333V7.33333C13.3334 6.96514 13.0349 6.66666 12.6667 6.66666H7.33335C6.96516 6.66666 6.66669 6.96514 6.66669 7.33333V12.6667C6.66669 13.0349 6.96516 13.3333 7.33335 13.3333H9.33335C9.70154 13.3333 10 13.0349 10 12.6667Z",fill:"currentColor"})],-1),gat=[mat],vat={class:"player_settings_wrap"},_at={class:"setting_row"},yat={class:"setting_row_flex"},bat={class:"setting_row_flex"},wat={class:"setting_row_flex"},kat={class:"setting_row_flex"},Cat={key:0,class:"setting_row"},xat={key:1,class:"setting_row"},Sat={key:2,class:"setting_row"},$at={key:3,class:"setting_row"},Aat={key:4,class:"setting_row"},Eat={key:5,class:"setting_row"},Mat={key:6,class:"setting_row"},Tat={key:7,class:"setting_row"},Pat={key:8,class:"setting_row"},Iat={key:9,class:"setting_row"},Lat={key:10,class:"setting_row"},Oat={key:1,class:"setting_row"},Dat={class:"setting_row"},Rat={key:2,class:"setting_row"},Vat={key:3,class:"setting_row"},Fat={key:4,class:"setting_row"},Nat={class:"setting_row setting_row--column"},Bat={class:"setting_row__label-with-icon"},zat={class:"fcom_help_text"},Hat={class:"fcom_form_label"},Uat={class:"fcom_help_text"};function jat(t,e,n,i,s,o){const r=Ld,a=on,l=Jt,c=Hc,u=Uc,d=W("InfoFilled"),h=be,f=Cs,p=Id,m=en,y=Mi,b=xs;return v(),A("div",{class:G(["fluent_player_config_wrap",{is_disabled:o.localSettings.enable_fluent_player!=="yes"}])},[_(p,{gutter:30},{default:w(()=>[_(r,{span:17},{default:w(()=>[g("div",{class:"player_preview_wrap",style:Xe({"--media-brand":o.localSettings.brandColor,"--fp-control-bar-bg":o.localSettings.controlBarColor||void 0,"--media-play-color":o.localSettings.playButtonColor||void 0,"--media-play-bg":o.localSettings.playButtonBgColor||void 0})},[g("div",{class:G(["player-preview","fp-skin-"+o.localSettings.skin])},[o.localSettings.skin!=="minimal"&&!o.behaviors.hide_top_controls?(v(),A("div",Cit,[g("div",xit,[g("span",Sit,S(t.$t("The Title of the Video")),1)])])):O("",!0),o.behaviors.hide_center_controls?O("",!0):(v(),A("div",$it,[g("div",Ait,[g("button",{onClick:e[0]||(e[0]=Ae(k=>t.doNothing(),["prevent"])),class:"fp-media-button vds-button"},Mit)])])),o.localSettings.skin!=="minimal"&&!o.behaviors.hide_bottom_controls?(v(),A("div",Tit,[o.localSettings.skin==="modern"?(v(),A("div",Pit,[o.controls.backward?(v(),A("button",Iit,Oit)):O("",!0),o.controls.play?(v(),A("button",Dit,Vit)):O("",!0),o.controls.forward?(v(),A("button",Fit,Bit)):O("",!0),o.controls.volume?(v(),A("button",zit,Uit)):O("",!0),o.controls.volume?(v(),A("div",jit,Git)):O("",!0),o.controls.current_time?(v(),A("div",Xit,Qit)):O("",!0),o.controls.progress_bar?(v(),A("div",eot,not)):O("",!0),o.controls.captions_toggle?(v(),A("button",sot,oot)):O("",!0),o.controls.playback_speed?(v(),A("button",rot,lot)):O("",!0),o.controls.settings?(v(),A("button",cot,dot)):O("",!0),o.controls.pip?(v(),A("button",hot,pot)):O("",!0),o.controls.fullscreen?(v(),A("button",mot,vot)):O("",!0)])):O("",!0),o.localSettings.skin==="classic"?(v(),A(ee,{key:1},[o.controls.progress_bar?(v(),A("div",_ot,kot)):O("",!0),o.localSettings.skin==="classic"?(v(),A("div",Cot,[o.controls.backward?(v(),A("button",xot,$ot)):O("",!0),o.controls.play?(v(),A("button",Aot,Mot)):O("",!0),o.controls.forward?(v(),A("button",Tot,Iot)):O("",!0),o.controls.volume?(v(),A("button",Lot,Dot)):O("",!0),o.controls.volume?(v(),A("div",Rot,Bot)):O("",!0),o.controls.current_time?(v(),A("div",zot,Wot)):O("",!0),Yot,o.controls.captions_toggle?(v(),A("button",qot,Xot)):O("",!0),o.controls.playback_speed?(v(),A("button",Kot,Jot)):O("",!0),o.controls.settings?(v(),A("button",Qot,trt)):O("",!0),o.controls.pip?(v(),A("button",nrt,irt)):O("",!0),o.controls.fullscreen?(v(),A("button",ort,art)):O("",!0)])):O("",!0)],64)):O("",!0),o.localSettings.skin==="simple"?(v(),A("div",lrt,[o.controls.play?(v(),A("button",crt,drt)):O("",!0),o.controls.volume?(v(),A("button",hrt,prt)):O("",!0),o.controls.volume?(v(),A("div",mrt,yrt)):O("",!0),brt,o.controls.captions_toggle?(v(),A("button",wrt,Crt)):O("",!0),o.controls.pip?(v(),A("button",xrt,$rt)):O("",!0),o.controls.fullscreen?(v(),A("button",Art,Mrt)):O("",!0)])):O("",!0),o.localSettings.skin==="floating"?(v(),A("div",Trt,[o.controls.backward?(v(),A("button",Prt,Lrt)):O("",!0),o.controls.play?(v(),A("button",Ort,Rrt)):O("",!0),o.controls.forward?(v(),A("button",Vrt,Nrt)):O("",!0),o.controls.current_time?(v(),A("div",Brt,jrt)):O("",!0),o.controls.progress_bar?(v(),A("div",Wrt,qrt)):O("",!0),o.controls.volume?(v(),A("button",Grt,Krt)):O("",!0),o.controls.volume?(v(),A("div",Zrt,tat)):O("",!0),o.controls.captions_toggle?(v(),A("button",nat,iat)):O("",!0),o.controls.playback_speed?(v(),A("button",oat,aat)):O("",!0),o.controls.settings?(v(),A("button",lat,uat)):O("",!0),o.controls.pip?(v(),A("button",dat,fat)):O("",!0),o.controls.fullscreen?(v(),A("button",pat,gat)):O("",!0)])):O("",!0)])):O("",!0)],2)],4)]),_:1}),_(r,{span:7,class:"player_settings_col"},{default:w(()=>[g("div",vat,[g("div",_at,[g("span",null,S(t.$t("Skin")),1),_(l,{modelValue:o.localSettings.skin,"onUpdate:modelValue":e[1]||(e[1]=k=>o.localSettings.skin=k)},{default:w(()=>[_(a,{label:t.$t("Modern"),value:"modern"},null,8,["label"]),_(a,{label:t.$t("Classic"),value:"classic"},null,8,["label"]),_(a,{label:t.$t("Simple"),value:"simple"},null,8,["label"]),_(a,{label:t.$t("Floating"),value:"floating"},null,8,["label"]),_(a,{label:t.$t("Minimal"),value:"minimal"},null,8,["label"])]),_:1},8,["modelValue"])]),g("div",yat,[g("label",null,S(t.$t("Brand Color")),1),_(c,{modelValue:o.localSettings.brandColor,"onUpdate:modelValue":e[2]||(e[2]=k=>o.localSettings.brandColor=k)},null,8,["modelValue"])]),g("div",bat,[g("label",null,S(t.$t("Control Bar Color")),1),_(c,{modelValue:o.localSettings.controlBarColor,"onUpdate:modelValue":e[3]||(e[3]=k=>o.localSettings.controlBarColor=k)},null,8,["modelValue"])]),g("div",wat,[g("label",null,S(t.$t("Play Button Color")),1),_(c,{modelValue:o.localSettings.playButtonColor,"onUpdate:modelValue":e[4]||(e[4]=k=>o.localSettings.playButtonColor=k)},null,8,["modelValue"])]),g("div",kat,[g("label",null,S(t.$t("Play Button Background Color")),1),_(c,{modelValue:o.localSettings.playButtonBgColor,"onUpdate:modelValue":e[5]||(e[5]=k=>o.localSettings.playButtonBgColor=k),"show-alpha":""},null,8,["modelValue"])]),o.localSettings.skin!=="minimal"?(v(),A(ee,{key:0},[g("h4",null,S(t.$t("Controls")),1),o.isControlVisible("progress_bar")?(v(),A("div",Cat,[g("span",null,S(t.$t("Progress Bar")),1),_(u,{modelValue:o.localSettings.controls.progress_bar,"onUpdate:modelValue":e[6]||(e[6]=k=>o.localSettings.controls.progress_bar=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("play")?(v(),A("div",xat,[g("span",null,S(t.$t("Play/Pause")),1),_(u,{modelValue:o.localSettings.controls.play,"onUpdate:modelValue":e[7]||(e[7]=k=>o.localSettings.controls.play=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("forward")?(v(),A("div",Sat,[g("span",null,S(t.$t("Forward")),1),_(u,{modelValue:o.localSettings.controls.forward,"onUpdate:modelValue":e[8]||(e[8]=k=>o.localSettings.controls.forward=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("backward")?(v(),A("div",$at,[g("span",null,S(t.$t("Backward")),1),_(u,{modelValue:o.localSettings.controls.backward,"onUpdate:modelValue":e[9]||(e[9]=k=>o.localSettings.controls.backward=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("volume")?(v(),A("div",Aat,[g("span",null,S(t.$t("Volume")),1),_(u,{modelValue:o.localSettings.controls.volume,"onUpdate:modelValue":e[10]||(e[10]=k=>o.localSettings.controls.volume=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("current_time")?(v(),A("div",Eat,[g("span",null,S(t.$t("Current Time")),1),_(u,{modelValue:o.localSettings.controls.current_time,"onUpdate:modelValue":e[11]||(e[11]=k=>o.localSettings.controls.current_time=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("playback_speed")?(v(),A("div",Mat,[g("span",null,S(t.$t("Playback Speed")),1),_(u,{modelValue:o.localSettings.controls.playback_speed,"onUpdate:modelValue":e[12]||(e[12]=k=>o.localSettings.controls.playback_speed=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("settings")?(v(),A("div",Tat,[g("span",null,S(t.$t("Settings Menu")),1),_(u,{modelValue:o.localSettings.controls.settings,"onUpdate:modelValue":e[13]||(e[13]=k=>o.localSettings.controls.settings=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("fullscreen")?(v(),A("div",Pat,[g("span",null,S(t.$t("Fullscreen")),1),_(u,{modelValue:o.localSettings.controls.fullscreen,"onUpdate:modelValue":e[14]||(e[14]=k=>o.localSettings.controls.fullscreen=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("pip")?(v(),A("div",Iat,[g("span",null,S(t.$t("Picture in Picture")),1),_(u,{modelValue:o.localSettings.controls.pip,"onUpdate:modelValue":e[15]||(e[15]=k=>o.localSettings.controls.pip=k)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("captions_toggle")?(v(),A("div",Lat,[g("span",null,S(t.$t("Captions Toggle")),1),_(u,{modelValue:o.localSettings.controls.captions_toggle,"onUpdate:modelValue":e[16]||(e[16]=k=>o.localSettings.controls.captions_toggle=k)},null,8,["modelValue"])])):O("",!0)],64)):O("",!0),g("h4",null,S(t.$t("Behaviors")),1),o.localSettings.skin!=="minimal"?(v(),A("div",Oat,[g("span",null,S(t.$t("Muted Autoplay")),1),_(u,{modelValue:o.localSettings.behaviors.muted_autoplay,"onUpdate:modelValue":e[17]||(e[17]=k=>o.localSettings.behaviors.muted_autoplay=k)},null,8,["modelValue"])])):O("",!0),g("div",Dat,[g("span",null,S(t.$t("Save Play Position")),1),_(u,{modelValue:o.localSettings.behaviors.save_play_position,"onUpdate:modelValue":e[18]||(e[18]=k=>o.localSettings.behaviors.save_play_position=k)},null,8,["modelValue"])]),o.localSettings.skin!=="minimal"?(v(),A("div",Rat,[g("span",null,S(t.$t("Hide Top Controls")),1),_(u,{modelValue:o.localSettings.behaviors.hide_top_controls,"onUpdate:modelValue":e[19]||(e[19]=k=>o.localSettings.behaviors.hide_top_controls=k)},null,8,["modelValue"])])):O("",!0),o.localSettings.skin!=="minimal"?(v(),A("div",Vat,[g("span",null,S(t.$t("Hide Center Controls")),1),_(u,{modelValue:o.localSettings.behaviors.hide_center_controls,"onUpdate:modelValue":e[20]||(e[20]=k=>o.localSettings.behaviors.hide_center_controls=k)},null,8,["modelValue"])])):O("",!0),o.localSettings.skin!=="minimal"?(v(),A("div",Fat,[g("span",null,S(t.$t("Hide Bottom Controls")),1),_(u,{modelValue:o.localSettings.behaviors.hide_bottom_controls,"onUpdate:modelValue":e[21]||(e[21]=k=>o.localSettings.behaviors.hide_bottom_controls=k)},null,8,["modelValue"])])):O("",!0),g("div",Nat,[g("span",Bat,[B(S(t.$t("Load Strategy"))+" ",1),_(f,{effect:"dark",placement:"top","popper-class":"fp-load-strategy-tooltip","raw-content":!0,content:"<strong>"+t.$t("Visible")+":</strong> "+t.$t("Loads when scrolled into view")+"<br><strong>"+t.$t("Play")+":</strong> "+t.$t("Loads only on click")+"<br><strong>"+t.$t("Idle")+":</strong> "+t.$t("Loads during browser idle time")+"<br><strong>"+t.$t("Eager")+":</strong> "+t.$t("Loads immediately on page load")},{default:w(()=>[_(h,{class:"setting_row__info-icon"},{default:w(()=>[_(d)]),_:1})]),_:1},8,["content"])]),_(l,{modelValue:o.localSettings.behaviors.load_strategy,"onUpdate:modelValue":e[22]||(e[22]=k=>o.localSettings.behaviors.load_strategy=k),class:"setting_row__select"},{default:w(()=>[_(a,{value:"visible",label:t.$t("Visible")},null,8,["label"]),_(a,{value:"play",label:t.$t("Play")},null,8,["label"]),_(a,{value:"idle",label:t.$t("Idle")},null,8,["label"]),_(a,{value:"eager",label:t.$t("Eager")},null,8,["label"])]),_:1},8,["modelValue"])])])]),_:1})]),_:1}),_(p,{gutter:30},{default:w(()=>[_(r,{span:24,md:12},{default:w(()=>[_(m,{label:t.$t("Enable Video Upload"),class:"fcom_input_wrap",style:{"margin-bottom":"0"}},{default:w(()=>[_(u,{modelValue:o.localSettings.video_upload,"onUpdate:modelValue":e[23]||(e[23]=k=>o.localSettings.video_upload=k),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),_:1},8,["label"]),g("div",zat,[g("p",null,S(t.$t("Allow space members to upload videos on post based on their permission.")),1)])]),_:1})]),_:1}),o.localSettings.video_upload==="yes"?(v(),D(p,{key:0,gutter:30,style:{"margin-top":"16px"}},{default:w(()=>[_(r,{span:24,style:{"margin-bottom":"4px"}},{default:w(()=>[g("label",Hat,S(t.$t("Who Can Upload Videos")),1)]),_:1}),_(r,{span:24},{default:w(()=>[_(b,{modelValue:o.localSettings.video_upload_role,"onUpdate:modelValue":e[24]||(e[24]=k=>o.localSettings.video_upload_role=k)},{default:w(()=>[_(y,{value:"admin",class:"fcom_radio"},{default:w(()=>[B(S(t.$t("Admins")),1)]),_:1}),_(y,{value:"admin_moderator",class:"fcom_radio"},{default:w(()=>[B(S(t.$t("Admins and Moderators")),1)]),_:1}),_(y,{value:"everyone",class:"fcom_radio"},{default:w(()=>[B(S(t.$t("Everyone")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})):O("",!0),_(p,{gutter:30},{default:w(()=>[_(r,{span:24},{default:w(()=>[_(m,{label:t.$t("Play Embedded Videos With FluentPlayer"),class:"fcom_input_wrap",style:{"margin-bottom":"0","margin-top":"20px"}},{default:w(()=>[_(u,{modelValue:o.localSettings.play_embedded_videos,"onUpdate:modelValue":e[25]||(e[25]=k=>o.localSettings.play_embedded_videos=k),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),_:1},8,["label"]),g("div",Uat,[g("p",null,S(t.$t("FluentPlayer only supports videos from YouTube, Vimeo, HLS, DASH, and direct video uploads. The native player will be used for other video types.")),1)])]),_:1})]),_:1})],2)}const Wat=de(kit,[["render",jat]]),Yat={name:"FluentPlayerSettings",components:{FluentPlayerCustomization:Wat},data(){return{loading:!1,settings:null,saving:!1}},computed:{isNotEnabled(){var t;return((t=this.settings)==null?void 0:t.enable_fluent_player)!=="yes"}},methods:{getSettings(){this.loading=!0,this.$get("settings/fluent-player-settings").then(t=>{this.settings=t.settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){this.saving=!0,this.$post("settings/fluent-player-settings",{settings:this.settings}).then(t=>{this.$notify.success(t.message),this.settings=t.settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings()}},qat={key:1},Gat={class:"fcom_help_text"},Xat={class:"fcom_help_text"},Kat={class:"dialog_footer fcom_mt_20"};function Zat(t,e,n,i,s,o){const r=Wt,a=Uc,l=en,c=W("FluentPlayerCustomization"),u=sn,d=We,h=xt("loading");return s.loading?(v(),D(r,{key:0,animated:!0,rows:5})):s.settings?(v(),A("div",qat,[_(u,null,{default:w(()=>[_(l,{label:t.$t("Enable FluentPlayer"),class:"fcom_input_wrap",style:{"margin-bottom":"0"}},{default:w(()=>[_(a,{modelValue:s.settings.enable_fluent_player,"onUpdate:modelValue":e[0]||(e[0]=f=>s.settings.enable_fluent_player=f),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),_:1},8,["label"]),g("div",Gat,[g("p",null,S(t.$t("FluentPlayer allows you to customize the look of the video player. Also, it gives you the ability to upload videos by your community members.")),1)]),_(l,{label:t.$t("Enable FluentPlayer Audio"),class:"fcom_input_wrap",style:{"margin-bottom":"0"}},{default:w(()=>[_(a,{modelValue:s.settings.enable_audio,"onUpdate:modelValue":e[1]||(e[1]=f=>s.settings.enable_audio=f),"active-value":"yes","inactive-value":"no",disabled:o.isNotEnabled},null,8,["modelValue","disabled"])]),_:1},8,["label"]),g("div",Xat,[g("p",null,S(t.$t("Enable the Audio tab in the feed composer so members can upload audio files based on their upload permission.")),1)]),_(c,{modelValue:s.settings,"onUpdate:modelValue":e[2]||(e[2]=f=>s.settings=f)},null,8,["modelValue"])]),_:1}),g("div",Kat,[De((v(),D(d,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[B(S(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[h,s.saving]])])])):O("",!0)}const Jat=de(Yat,[["render",Zat]]),Qat={name:"CustomProfileFieldsConfig",components:{UpgradeToProModal:jd,FluentDnD:Ud,Drawer:Dd},props:["features"],data(){return{CloseBoldIcon:Si(sH),config:null,showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1,showGroupEditor:!1,editingGroup:null,editingGroupIndex:null,showFieldEditor:!1,editingField:null,editingFieldSlug:null,collapsedGroups:[],openedFieldSlug:null,moveTargetGroup:null,multiselectOptionsList:[],isDirty:!1,fieldTypes:this.appVars.customProfileFieldTypes||[],privacyOptions:[{value:"public",label:this.$t("Public (Everyone)"),short:this.$t("Public"),tag:"success"},{value:"logged_in",label:this.$t("Logged-In Users"),short:this.$t("Logged In"),tag:"primary"},{value:"internal",label:this.$t("Admins Only"),short:this.$t("Admins"),tag:"warning"},{value:"private",label:this.$t("Owner & Admins"),short:this.$t("Private"),tag:"danger"}]}},watch:{config:{handler(){this.isDirty=!0},deep:!0},"features.custom_profile_fields"(){this.isDirty=!0},showSettings(t){t||(this.isDirty=!1)}},computed:{isOptionType(){return this.editingField&&["select","radio","multiselect"].includes(this.editingField.type)}},methods:{hasGroupFields(t){return this.getGroupFields(t).length>0},openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("admin/custom-profile-fields").then(t=>{this.config=t.config,this.$nextTick(()=>this.isDirty=!1)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1})},saveSettings(){const t=this.config.is_enabled!==this.features.custom_profile_fields;this.config.is_enabled=this.features.custom_profile_fields,this.saving=!0,this.$post("admin/custom-profile-fields",{groups:this.config.groups,fields:this.config.fields,is_enabled:this.config.is_enabled}).then(e=>{this.$notify.success(e.message),t&&(this.config.is_enabled==="yes"&&localStorage.setItem("fcom_cpf_reopen","1"),window.location.reload()),e.config&&(this.config=e.config),this.$nextTick(()=>this.isDirty=!1)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},privacyMeta(t){return this.privacyOptions.find(e=>e.value===t)||{short:t,tag:"info"}},getGroupFields(t){return this.config.fields.filter(e=>e.group===t)},getDefaultGroupSlug(){var e;const t=this.config.groups.find(n=>n.is_system);return t?t.slug:((e=this.config.groups[0])==null?void 0:e.slug)||"_additional_info"},openGroupEditor(t=null){this.editingGroupIndex=t,this.editingGroup=t!==null?{...this.config.groups[t]}:{label:"",slug:"",edit_description:""},this.showGroupEditor=!0},confirmGroup(){if(!this.editingGroup.label){this.$notify.error(this.$t("Group label is required"));return}this.editingGroupIndex!==null?this.config.groups[this.editingGroupIndex]=this.editingGroup:this.config.groups.push(this.editingGroup),this.showGroupEditor=!1,this.editingGroup=null,this.editingGroupIndex=null,this.saveSettings()},deleteGroup(t){const e=this.config.groups[t];if(e.is_system)return;const n=this.getGroupFields(e.slug).length;let i=this.$t("Are you sure you want to delete this group?");n&&(i+=" "+this.$t("Fields in this group will be moved to the default group.")),this.$confirm(i,this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{const s=this.getDefaultGroupSlug();this.config.fields.forEach(o=>{o.group===e.slug&&(o.group=s)}),this.config.groups.splice(t,1),this.saveSettings()}).catch(()=>{})},toggleGroup(t){this.collapsedGroups.includes(t)?this.collapsedGroups=this.collapsedGroups.filter(e=>e!==t):this.collapsedGroups.push(t)},openFieldEditor(t=null,e=null){if(t){const n=this.config.fields.find(i=>i.slug===t);if(!n)return;this.editingField={...n,options:n.type==="multiselect"?{...n.options||{}}:[...n.options||[]]},this.editingFieldSlug=t,this.multiselectOptionsList=n.type==="multiselect"&&n.options?Object.entries(n.options).map(([i,s])=>({key:i,label:s})):[]}else this.editingField={label:"",slug:"",type:"text",placeholder:"",options:[],is_required:!1,is_enabled:!0,privacy:"public",group:e||this.getDefaultGroupSlug()},this.editingFieldSlug=null,this.multiselectOptionsList=[];this.showFieldEditor=!0},confirmField(){var t;if(!this.editingField.label){this.$notify.error(this.$t("Label is required"));return}if(this.isOptionType){if(this.editingField.type==="multiselect"){if(!this.multiselectOptionsList.length){this.$notify.error(this.$t("At least one option is required for this field type"));return}const e={};this.multiselectOptionsList.forEach(n=>{n.key&&n.label&&(e[n.key]=n.label)}),this.editingField.options=e}else if(!((t=this.editingField.options)!=null&&t.length)){this.$notify.error(this.$t("At least one option is required for this field type"));return}}if(this.editingFieldSlug!==null){const e=this.config.fields.findIndex(n=>n.slug===this.editingFieldSlug);e!==-1&&(this.config.fields[e]=this.editingField)}else this.config.fields.push(this.editingField);this.showFieldEditor=!1,this.editingField=null,this.editingFieldSlug=null,this.saveSettings()},handleGroupAction(t,e){t==="delete"&&this.deleteGroup(e)},handleFieldAction(t,e){t==="move"?(this.moveTargetGroup=null,this.openedFieldSlug=e.slug):t==="delete"?this.deleteField(e.slug):t==="duplicate"&&this.duplicateField(e)},duplicateField(t){const e=JSON.parse(JSON.stringify(t));e.label=t.label+" "+this.$t("(Copy)"),e.slug="";const n=this.config.fields.findIndex(i=>i.slug===t.slug);n!==-1&&(this.config.fields.splice(n+1,0,e),this.saveSettings())},moveField(t,e){const n=this.config.fields.find(i=>i.slug===t);n&&(n.group=e,this.openedFieldSlug=null,this.moveTargetGroup=null,this.saveSettings())},deleteField(t){this.$confirm(this.$t("Are you sure you want to delete this field? Any saved data for this field will no longer be accessible."),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{const e=this.config.fields.findIndex(n=>n.slug===t);e!==-1&&this.config.fields.splice(e,1),this.saveSettings()}).catch(()=>{})},onFieldDrop(t,e){const n=this.config.fields.filter(s=>s.group!==e),i=[];this.config.groups.forEach(s=>{s.slug===e?i.push(...t.newItems):i.push(...n.filter(o=>o.group===s.slug))}),this.config.fields=i},onFieldCrossDrop({itemKey:t,sourceGroup:e,targetGroup:n}){const i=this.config.fields.find(s=>s.slug===t&&s.group===e);i&&(i.group=n,this.saveSettings())},onEmptyGroupDrop(t,e){const n=t.dataTransfer.getData("source-group"),i=t.dataTransfer.getData("text/plain");if(!n||!i||n===e)return;const s=this.config.fields.find(o=>o.slug===i&&o.group===n);s&&(s.group=e,this.saveSettings())},onTypeChange(){this.editingField.type==="multiselect"?(this.editingField.options={},this.multiselectOptionsList=[]):["select","radio"].includes(this.editingField.type)&&(Array.isArray(this.editingField.options)||(this.editingField.options=[]))}},mounted(){localStorage.getItem("fcom_cpf_reopen")&&(localStorage.removeItem("fcom_cpf_reopen"),this.openSettings())}},elt={class:"fcom_storage_settings"},tlt={key:0,class:"white_loaded"},nlt={key:1,class:"fcom_cpf_settings"},slt={class:"fcom_cpf_header"},ilt={key:0,style:{padding:"1rem"}},olt={key:1,class:"fcom_card_sections fcom_cpf_groups"},rlt={class:"fcom_section_primary_item"},alt={class:"fcom_section_primary_item_title"},llt=g("div",{class:"fcom_drag_handle"},"⋮⋮",-1),clt={class:"fcom_heading_item"},ult=g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"})],-1),dlt={class:"fcom_space_counts"},hlt={class:"fcom_section_item_actions"},flt={key:0,class:"fcom_section_items"},plt=g("div",{class:"fcom_drag_handle"},"⋮⋮",-1),mlt={class:"fcom_heading_item"},glt={key:0,style:{color:"var(--el-color-danger)"}},vlt={class:"fcom_section_item_actions"},_lt={style:{position:"relative"}},ylt={class:"fcom_action_field_popup"},blt={class:"fcom_move_popup_close"},wlt=["onDrop"],klt={key:2},Clt={class:"dialog_header"},xlt={class:"dialog_body"},Slt={class:"dialog_footer"},$lt={class:"dialog_header"},Alt={class:"dialog_body"},Elt={style:{display:"flex",gap:"8px","margin-bottom":"4px","font-size":"12px",color:"var(--fcom-text-off, #919399)",width:"100%"}},Mlt={style:{flex:"1"}},Tlt={style:{flex:"1"}},Plt=g("span",{style:{width:"32px"}},null,-1),Ilt={class:"dialog_footer"};function Llt(t,e,n,i,s,o){const r=We,a=Wt,l=Gt,c=en,u=be,d=Ci,h=W("Plus"),f=W("MoreFilled"),p=Wr,m=Yr,y=jr,b=Uc,k=on,C=Jt,$=sn,x=W("CloseBold"),M=W("FluentDnD"),P=W("drawer"),T=ft,I=Ss,L=K4,R=Mi,V=xs,H=W("UpgradeToProModal"),F=xt("loading");return v(),A(ee,null,[g("div",elt,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=z=>o.openSettings())},{default:w(()=>[B(S(t.$t("Settings")),1)]),_:1})]),_(P,{modelValue:s.showSettings,"onUpdate:modelValue":e[9]||(e[9]=z=>s.showSettings=z),size:t.dialogWidth,title:t.$t("Custom Profile Fields Settings"),"append-to-body":!0,"close-on-click-modal":!0,"has-close-confirmation":s.isDirty,"close-confirmation-message":t.$t("You have unsaved changes. Are you sure you want to close this?"),"modal-class":"fcom_common_dialog",id:"fluent_comminity_body"},{default:w(()=>[s.fetching?(v(),A("div",tlt,[_(a,{rows:5,animated:!0})])):s.config!==null?(v(),A("div",nlt,[_($,{onSubmit:e[8]||(e[8]=Ae(z=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,null,{default:w(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:n.features.custom_profile_fields,"onUpdate:modelValue":e[1]||(e[1]=z=>n.features.custom_profile_fields=z),label:t.$t("Enable Custom Profile Fields"),size:"large",class:"fcom_checkbox",onChange:e[2]||(e[2]=z=>{z==="yes"&&s.config.is_enabled!=="yes"&&!s.saving&&o.saveSettings()})},null,8,["modelValue","label"])]),_:1}),n.features.custom_profile_fields==="yes"?(v(),A(ee,{key:0},[g("div",slt,[g("h3",null,S(t.$t("Field Groups")),1),_(r,{class:"fcom_primary_button",onClick:e[3]||(e[3]=z=>o.openGroupEditor())},{default:w(()=>[B(S(t.$t("Add Group")),1)]),_:1})]),s.config.groups.length?(v(),A("div",olt,[_(M,{items:s.config.groups,"row-key":"slug"},{item:w(({data:z,index:N})=>[g("div",{class:G({fcom_collapsed_group:s.collapsedGroups.includes(z.slug)})},[g("div",rlt,[g("div",alt,[llt,g("div",clt,[g("h4",null,S(z.label),1),g("div",null,[o.getGroupFields(z.slug).length?(v(),D(r,{key:0,style:{"background-color":"var(--el-fill-color-light)"},class:"fcom_collapse_btn",onClick:q=>o.toggleGroup(z.slug),size:"small",text:""},{default:w(()=>[_(u,null,{default:w(()=>[ult]),_:1}),g("span",dlt,S(t.$t("%s fields",o.getGroupFields(z.slug).length)),1)]),_:2},1032,["onClick"])):O("",!0),z.is_system?(v(),D(d,{key:1,size:"small",type:"info",style:{"margin-left":"6px"}},{default:w(()=>[B(S(t.$t("System")),1)]),_:1})):O("",!0),_(r,{"aria-label":t.$t("Add field"),style:{"background-color":"var(--el-fill-color-light)","margin-left":"5px"},size:"small",text:"",onClick:q=>o.openFieldEditor(null,z.slug)},{default:w(()=>[_(u,null,{default:w(()=>[_(h)]),_:1})]),_:2},1032,["aria-label","onClick"])])])]),g("div",hlt,[_(r,{class:"fcom_secondary_button",onClick:q=>o.openGroupEditor(N)},{default:w(()=>[B(S(t.$t("Edit Info")),1)]),_:2},1032,["onClick"]),z.is_system?O("",!0):(v(),D(y,{key:0,trigger:"click",onCommand:q=>o.handleGroupAction(q,N)},{dropdown:w(()=>[_(m,null,{default:w(()=>[_(p,{command:"delete"},{default:w(()=>[B(S(t.$t("Delete")),1)]),_:1})]),_:1})]),default:w(()=>[_(r,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu edit_action",size:"small",text:""},{default:w(()=>[_(u,null,{default:w(()=>[_(f)]),_:1})]),_:1},8,["aria-label"])]),_:2},1032,["onCommand"]))])]),s.collapsedGroups.includes(z.slug)?O("",!0):(v(),A("div",flt,[o.hasGroupFields(z.slug)?(v(),D(M,{key:0,items:o.getGroupFields(z.slug),"row-key":"slug",group:z.slug,"item-class":"fcom_section_item",onDrop:q=>o.onFieldDrop(q,z.slug),onCrossDrop:o.onFieldCrossDrop},{item:w(({data:q})=>[g("div",{class:"fcom_section_item_title",style:Xe(q.is_enabled?"":"opacity: 0.5")},[plt,g("p",mlt,[B(S(q.label)+" ",1),q.is_required?(v(),A("span",glt,"*")):O("",!0),_(d,{size:"small",type:"info"},{default:w(()=>[B(S(q.type),1)]),_:2},1024),_(d,{size:"small",type:o.privacyMeta(q.privacy).tag},{default:w(()=>[B(S(o.privacyMeta(q.privacy).short),1)]),_:2},1032,["type"])])],4),g("div",vlt,[_(b,{modelValue:q.is_enabled,"onUpdate:modelValue":K=>q.is_enabled=K,size:"small",onChange:o.saveSettings},null,8,["modelValue","onUpdate:modelValue","onChange"]),_(r,{class:"fcom_secondary_button",size:"small",onClick:K=>o.openFieldEditor(q.slug)},{default:w(()=>[B(S(t.$t("Edit")),1)]),_:2},1032,["onClick"]),g("div",_lt,[_(y,{trigger:"click",onCommand:K=>o.handleFieldAction(K,q)},{dropdown:w(()=>[_(m,{class:"fcom_cpf_field_dropdown"},{default:w(()=>[_(p,{command:"duplicate"},{default:w(()=>[B(S(t.$t("Duplicate")),1)]),_:1}),_(p,{command:"move"},{default:w(()=>[B(S(t.$t("Move")),1)]),_:1}),_(p,{command:"delete"},{default:w(()=>[B(S(t.$t("Delete")),1)]),_:1})]),_:1})]),default:w(()=>[_(r,{"aria-label":t.$t("View actions"),class:"fcom_dot_menu edit_action",size:"small",text:""},{default:w(()=>[_(u,null,{default:w(()=>[_(f)]),_:1})]),_:1},8,["aria-label"])]),_:2},1032,["onCommand"]),De(g("div",ylt,[_($,{onSubmit:e[5]||(e[5]=Ae(K=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,{label:t.$t("Move to a different Group")},{default:w(()=>[_(C,{placeholder:t.$t("Select Group"),modelValue:s.moveTargetGroup,"onUpdate:modelValue":e[4]||(e[4]=K=>s.moveTargetGroup=K)},{default:w(()=>[(v(!0),A(ee,null,Ce(s.config.groups.filter(K=>K.slug!==q.group),K=>(v(),D(k,{key:K.slug,label:K.label,value:K.slug},null,8,["label","value"]))),128))]),_:2},1032,["placeholder","modelValue"])]),_:2},1032,["label"]),_(r,{disabled:!s.moveTargetGroup,onClick:K=>o.moveField(q.slug,s.moveTargetGroup),class:"fcom_primary_button"},{default:w(()=>[B(S(t.$t("Move Field")),1)]),_:2},1032,["disabled","onClick"])]),_:2},1024),g("div",blt,[_(u,{onClick:e[6]||(e[6]=K=>s.openedFieldSlug=null)},{default:w(()=>[_(x)]),_:1})])],512),[[Ut,s.openedFieldSlug===q.slug]])])])]),_:2},1032,["items","group","onDrop","onCrossDrop"])):(v(),A("div",{key:1,style:{padding:"10px 15px 10px 35px",color:"var(--fcom-text-off, #919399)","font-size":"13px"},onDragover:e[7]||(e[7]=Ae(()=>{},["prevent"])),onDrop:Ae(q=>o.onEmptyGroupDrop(q,z.slug),["prevent"])},S(t.$t("No fields in this group. Click + to add one.")),41,wlt))]))],2)]),_:1},8,["items"])])):(v(),A("div",ilt,[g("p",null,S(t.$t("No groups configured yet.")),1)]))],64)):O("",!0),_(c,null,{default:w(()=>[De((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[B(S(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[F,s.saving]])]),_:1})]),_:1})])):(v(),A("div",klt,[g("p",null,S(t.$t("Config could not be loaded")),1)]))]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"]),_(I,{"modal-class":"fcom_common_dialog fcom_cpf_dialog","append-to-body":!0,"close-on-click-modal":!1,modelValue:s.showGroupEditor,"onUpdate:modelValue":e[14]||(e[14]=z=>s.showGroupEditor=z),width:"40%"},{header:w(()=>[g("div",Clt,[g("h4",null,S(s.editingGroupIndex!==null?t.$t("Edit Group"):t.$t("Add Group")),1)])]),footer:w(()=>[g("div",Slt,[_(r,{class:"fcom_secondary_button",onClick:e[13]||(e[13]=z=>s.showGroupEditor=!1)},{default:w(()=>[B(S(t.$t("Cancel")),1)]),_:1}),_(r,{class:"fcom_primary_button",onClick:o.confirmGroup},{default:w(()=>[B(S(s.editingGroupIndex!==null?t.$t("Update Group"):t.$t("Add Group")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",xlt,[s.editingGroup?(v(),D($,{key:0,onSubmit:e[12]||(e[12]=Ae(z=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,{label:t.$t("Group Label")},{default:w(()=>[_(T,{modelValue:s.editingGroup.label,"onUpdate:modelValue":e[10]||(e[10]=z=>s.editingGroup.label=z),placeholder:t.$t("Group name"),disabled:s.editingGroup.is_system},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["label"]),_(c,{label:t.$t("Description (shown on edit form)")},{default:w(()=>[_(T,{modelValue:s.editingGroup.edit_description,"onUpdate:modelValue":e[11]||(e[11]=z=>s.editingGroup.edit_description=z),type:"textarea",rows:3,placeholder:t.$t("Optional description shown to users when editing their profile")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})):O("",!0)])]),_:1},8,["modelValue"]),_(I,{"modal-class":"fcom_common_dialog fcom_cpf_dialog","append-to-body":!0,"close-on-click-modal":!1,modelValue:s.showFieldEditor,"onUpdate:modelValue":e[25]||(e[25]=z=>s.showFieldEditor=z),width:"40%"},{header:w(()=>[g("div",$lt,[g("h4",null,S(s.editingFieldSlug!==null?t.$t("Edit Field"):t.$t("Add Field")),1)])]),footer:w(()=>[g("div",Ilt,[_(r,{class:"fcom_secondary_button",onClick:e[24]||(e[24]=z=>s.showFieldEditor=!1)},{default:w(()=>[B(S(t.$t("Cancel")),1)]),_:1}),_(r,{class:"fcom_primary_button",onClick:o.confirmField},{default:w(()=>[B(S(s.editingFieldSlug!==null?t.$t("Update Field"):t.$t("Add Field")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",Alt,[s.editingField?(v(),D($,{key:0,onSubmit:e[23]||(e[23]=Ae(z=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,{label:t.$t("Field Type")},{default:w(()=>[_(C,{modelValue:s.editingField.type,"onUpdate:modelValue":e[15]||(e[15]=z=>s.editingField.type=z),disabled:s.editingFieldSlug!==null,onChange:o.onTypeChange},{default:w(()=>[(v(!0),A(ee,null,Ce(s.fieldTypes,(z,N)=>(v(),D(k,{key:N,label:z,value:N},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","onChange"])]),_:1},8,["label"]),_(c,{label:t.$t("Label")},{default:w(()=>[_(T,{modelValue:s.editingField.label,"onUpdate:modelValue":e[16]||(e[16]=z=>s.editingField.label=z),placeholder:t.$t("Field Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(c,{label:t.$t("Placeholder")},{default:w(()=>[_(T,{modelValue:s.editingField.placeholder,"onUpdate:modelValue":e[17]||(e[17]=z=>s.editingField.placeholder=z),placeholder:t.$t("Placeholder text")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(c,{label:t.$t("Privacy")},{default:w(()=>[_(C,{modelValue:s.editingField.privacy,"onUpdate:modelValue":e[18]||(e[18]=z=>s.editingField.privacy=z)},{default:w(()=>[(v(!0),A(ee,null,Ce(s.privacyOptions,z=>(v(),D(k,{key:z.value,label:z.label,value:z.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(c,{label:t.$t("Group")},{default:w(()=>[_(C,{modelValue:s.editingField.group,"onUpdate:modelValue":e[19]||(e[19]=z=>s.editingField.group=z)},{default:w(()=>[(v(!0),A(ee,null,Ce(s.config.groups,z=>(v(),D(k,{key:z.slug,label:z.label,value:z.slug},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),o.isOptionType&&s.editingField.type!=="multiselect"?(v(),D(c,{key:0,label:t.$t("Options"),class:"fcom_question_options"},{default:w(()=>[(v(!0),A(ee,null,Ce(s.editingField.options,(z,N)=>(v(),A("div",{key:N,class:"fcom_question_option"},[_(T,{modelValue:s.editingField.options[N],"onUpdate:modelValue":q=>s.editingField.options[N]=q,type:"text"},null,8,["modelValue","onUpdate:modelValue"]),s.editingField.options.length>1?(v(),D(L,{key:0,type:"danger",title:t.$t("Remove"),icon:s.CloseBoldIcon,underline:!1,onClick:q=>s.editingField.options.splice(N,1)},null,8,["title","icon","onClick"])):O("",!0)]))),128)),_(L,{type:"primary",underline:!1,onClick:e[20]||(e[20]=z=>s.editingField.options.push(`Option ${s.editingField.options.length+1}`))},{default:w(()=>[B(S("+ "+t.$t("Add new option")),1)]),_:1})]),_:1},8,["label"])):O("",!0),s.editingField.type==="multiselect"?(v(),D(c,{key:1,label:t.$t("Options (Key-Value)"),class:"fcom_question_options"},{default:w(()=>[g("div",Elt,[g("span",Mlt,S(t.$t("Key")),1),g("span",Tlt,S(t.$t("Label")),1),Plt]),(v(!0),A(ee,null,Ce(s.multiselectOptionsList,(z,N)=>(v(),A("div",{key:N,class:"fcom_question_option"},[_(T,{modelValue:z.key,"onUpdate:modelValue":q=>z.key=q,type:"text",placeholder:t.$t("Key")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),_(T,{modelValue:z.label,"onUpdate:modelValue":q=>z.label=q,type:"text",placeholder:t.$t("Label")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),s.multiselectOptionsList.length>1?(v(),D(L,{key:0,type:"danger",title:t.$t("Remove"),icon:s.CloseBoldIcon,underline:!1,onClick:q=>s.multiselectOptionsList.splice(N,1)},null,8,["title","icon","onClick"])):O("",!0)]))),128)),_(L,{type:"primary",underline:!1,onClick:e[21]||(e[21]=z=>s.multiselectOptionsList.push({key:`option_${s.multiselectOptionsList.length+1}`,label:`Option ${s.multiselectOptionsList.length+1}`}))},{default:w(()=>[B(S("+ "+t.$t("Add new option")),1)]),_:1})]),_:1},8,["label"])):O("",!0),_(c,{label:t.$t("Required")},{default:w(()=>[_(V,{modelValue:s.editingField.is_required,"onUpdate:modelValue":e[22]||(e[22]=z=>s.editingField.is_required=z)},{default:w(()=>[_(R,{value:!0},{default:w(()=>[B(S(t.$t("Yes")),1)]),_:1}),_(R,{value:!1},{default:w(()=>[B(S(t.$t("No")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1})):O("",!0)])]),_:1},8,["modelValue"]),s.openUpgradeModal?(v(),D(H,{key:0,showModal:s.openUpgradeModal,onCloseModal:e[26]||(e[26]=z=>s.openUpgradeModal=!1),upgrade_module:"custom_profile_fields"},null,8,["showModal"])):O("",!0)],64)}const Olt=de(Qat,[["render",Llt]]),Dlt={name:"PwaConfig",props:["features"],emits:["saveSettings"],data(){return{settings:null,defaultIcon:null,showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1}},components:{UpgradeToProModal:jd,ImageUploader:vl},methods:{openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.settings=null,this.fetching=!0,this.$get("admin/pwa-settings").then(t=>{this.settings=t.settings,this.defaultIcon=t.default_icon||null}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1})},saveSettings(){if(this.features.pwa_module!=="yes"){this.$emit("saveSettings",!0);return}this.savePwaSettings()},savePwaSettings(){if(!this.settings.app_name){this.$handleError(this.$t("App Name is required"));return}if(this.settings.icon_source==="custom"&&!this.settings.custom_icon){this.$handleError(this.$t("Please upload an app icon or use the default icon."));return}this.saving=!0,this.$post("admin/pwa-settings",{settings:this.settings}).then(t=>{t.settings&&(this.settings=t.settings),this.$notify.success(t.message),this.$emit("saveSettings",!0)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}}},Rlt={class:"fcom_pwa_settings"},Vlt=["id"],Flt={key:0,class:"white_loaded"},Nlt={key:1,class:"dialog_body"},Blt={class:"fcom_help_text"},zlt={class:"fcom_help_text"},Hlt={class:"fcom_help_text"},Ult={class:"fcom_help_text"},jlt={class:"fcom_image_uploader_wrapper"},Wlt={class:"fcom_help_text"},Ylt={class:"fcom_help_text"},qlt={class:"fcom_help_text"},Glt={class:"dialog_footer"},Xlt={key:2};function Klt(t,e,n,i,s,o){const r=We,a=Wt,l=Gt,c=en,u=ft,d=Hc,h=Mi,f=xs,p=Ur,m=Fo,y=W("EditPen"),b=be,k=W("Delete"),C=W("ImageUploader"),$=sn,x=Ea,M=W("UpgradeToProModal"),P=xt("loading");return v(),A(ee,null,[g("div",Rlt,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=T=>o.openSettings())},{default:w(()=>[B(S(t.$t("Settings")),1)]),_:1})]),_(x,{"modal-class":"fcom_common_dialog","close-on-click-modal":!1,"append-to-body":!0,size:t.dialogWidth,modelValue:s.showSettings,"onUpdate:modelValue":e[11]||(e[11]=T=>s.showSettings=T),direction:"rtl"},{header:w(({titleId:T,titleClass:I})=>[g("h4",{id:T,class:G(I)},S(t.$t("Progressive Web App (PWA) Settings")),11,Vlt)]),default:w(()=>[s.fetching?(v(),A("div",Flt,[_(a,{rows:5,animated:!0})])):s.settings?(v(),A("div",Nlt,[_($,{onSubmit:e[10]||(e[10]=Ae(T=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,null,{default:w(()=>[_(l,{modelValue:n.features.pwa_module,"onUpdate:modelValue":e[1]||(e[1]=T=>n.features.pwa_module=T),"true-value":"yes","false-value":"no",label:t.$t("Enable Progressive Web App (PWA)"),class:"fcom_checkbox"},null,8,["modelValue","label"])]),_:1}),n.features.pwa_module==="yes"?(v(),A(ee,{key:0},[_(c,{label:t.$t("App Name")},{default:w(()=>[_(u,{modelValue:s.settings.app_name,"onUpdate:modelValue":e[2]||(e[2]=T=>s.settings.app_name=T),maxlength:60,placeholder:t.$t("Your community name")},null,8,["modelValue","placeholder"]),g("div",Blt,[g("p",null,S(t.$t("Shown on the install dialog and splash screen.")),1)])]),_:1},8,["label"]),_(c,{label:t.$t("Short Name")},{default:w(()=>[_(u,{modelValue:s.settings.short_name,"onUpdate:modelValue":e[3]||(e[3]=T=>s.settings.short_name=T),maxlength:12,"show-word-limit":"",placeholder:t.$t("Home screen label")},null,8,["modelValue","placeholder"]),g("div",zlt,[g("p",null,S(t.$t("Label under the home screen icon. Leave empty to use the App Name.")),1)])]),_:1},8,["label"]),_(c,{label:t.$t("Splash Screen Color")},{default:w(()=>[_(d,{modelValue:s.settings.background_color,"onUpdate:modelValue":e[4]||(e[4]=T=>s.settings.background_color=T)},null,8,["modelValue"]),g("div",Hlt,[g("p",null,S(t.$t("Background shown behind the app icon while the app is loading. Leave empty to match your portal background.")),1)])]),_:1},8,["label"]),_(c,{label:t.$t("App Icon")},{default:w(()=>[_(f,{modelValue:s.settings.icon_source,"onUpdate:modelValue":e[5]||(e[5]=T=>s.settings.icon_source=T)},{default:w(()=>[_(h,{value:"default"},{default:w(()=>[B(S(t.$t("Default (Site Icon)")),1)]),_:1}),_(h,{value:"custom"},{default:w(()=>[B(S(t.$t("Custom")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),s.settings.icon_source==="default"&&s.defaultIcon?(v(),D(c,{key:0},{default:w(()=>[s.defaultIcon.url?s.defaultIcon.is_square===!1?(v(),D(p,{key:1,type:"warning",closable:!1,"show-icon":""},{default:w(()=>[B(S(t.$t("Icon is %s, not square — the install option will not appear.",s.defaultIcon.sizes)),1)]),_:1})):(v(),A(ee,{key:2},[_(m,{alt:t.$t("App Icon"),src:s.defaultIcon.url,style:{"max-width":"64px",height:"auto"}},null,8,["alt","src"]),g("div",Ult,[g("p",null,S(t.$t("This is the icon members will install.")),1)])],64)):(v(),D(p,{key:0,type:"warning",closable:!1,"show-icon":""},{default:w(()=>[B(S(t.$t("No app icon found — the install option will not appear. Set a Site Icon or choose Custom.")),1)]),_:1}))]),_:1})):O("",!0),s.settings.icon_source==="custom"?(v(),D(c,{key:1},{default:w(()=>[s.settings.custom_icon?(v(),D(m,{key:0,alt:t.$t("App Icon"),src:s.settings.custom_icon,style:{"max-width":"100px",height:"auto"}},null,8,["alt","src"])):O("",!0),g("div",jlt,[_(C,{isTextBtn:!1,removeIcon:!0,can_remove:!!s.settings.custom_icon,confirm_remove:!0,remove_label:t.$t("Remove App Icon"),additionalData:{resize:!1,disable_convert:"yes",skip_convert:"yes",max_width:512},onUploaded:e[6]||(e[6]=T=>{s.settings.custom_icon=T})},cs({remove:w(()=>[_(b,null,{default:w(()=>[_(k)]),_:1})]),_:2},[s.settings.custom_icon?{name:"trigger",fn:w(()=>[_(r,{class:"fcom_plain_button","aria-label":t.$t("Change App Icon")},{default:w(()=>[_(b,null,{default:w(()=>[_(y)]),_:1})]),_:1},8,["aria-label"])]),key:"0"}:void 0]),1032,["can_remove","remove_label"])]),g("div",Wlt,[g("p",null,S(t.$t("Upload a square image. Anything larger than 512x512 is scaled down, because browsers reject oversized icons and the install option then never appears.")),1)])]),_:1})):O("",!0),_(c,null,{default:w(()=>[_(l,{modelValue:s.settings.install_entry,"onUpdate:modelValue":e[7]||(e[7]=T=>s.settings.install_entry=T),"true-value":"yes","false-value":"no",label:t.$t("Show Install App in portal menu (mobile only)"),class:"fcom_checkbox"},null,8,["modelValue","label"]),g("div",Ylt,[g("p",null,S(t.$t("Adds an Install App button to the portal menu on mobile. It installs in one tap where supported, and shows step-by-step instructions on other browsers like Firefox and iOS.")),1)])]),_:1}),s.settings.install_entry==="yes"?(v(),D(c,{key:2},{default:w(()=>[_(l,{modelValue:s.settings.install_dismissible,"onUpdate:modelValue":e[8]||(e[8]=T=>s.settings.install_dismissible=T),"true-value":"yes","false-value":"no",label:t.$t("Allow members to hide the install button"),class:"fcom_checkbox"},null,8,["modelValue","label"]),g("div",qlt,[g("p",null,S(t.$t("If allowed, members can dismiss the button and it stays hidden for 7 days.")),1)])]),_:1})):O("",!0),s.settings.install_entry==="yes"?(v(),D(c,{key:3,label:t.$t("Install Button Position")},{default:w(()=>[_(f,{modelValue:s.settings.install_position,"onUpdate:modelValue":e[9]||(e[9]=T=>s.settings.install_position=T)},{default:w(()=>[_(h,{value:"top"},{default:w(()=>[B(S(t.$t("Sidebar Top")),1)]),_:1}),_(h,{value:"bottom"},{default:w(()=>[B(S(t.$t("Sidebar Bottom")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0)],64)):O("",!0)]),_:1}),g("div",Glt,[De((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[B(S(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[P,s.saving]])])])):(v(),A("div",Xlt,[g("p",null,S(t.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"]),s.openUpgradeModal?(v(),D(M,{key:0,showModal:s.openUpgradeModal,onCloseModal:e[12]||(e[12]=T=>s.openUpgradeModal=!1),upgrade_module:"pwa_module"},null,8,["showModal"])):O("",!0)],64)}const Zlt=de(Dlt,[["render",Klt]]),Jlt={name:"Features",components:{UserBadgesConfig:xst,LeaderBoardConfig:dst,StorageSettings:jnt,Layout:fi,AppLayout:pi,UpgradeToProModal:jd,SocialMediaLinkConfig:Hst,MessagingSettings:hit,FollowingConfigView:wit,FluentPlayerSettings:Jat,CustomProfileFieldsConfig:Olt,PwaConfig:Zlt},data(){return{features:null,addOns:{},loading:!1,installingSlug:"",openGiphyUpgradeModal:!1,openEmojiUpgradeModal:!1,showMessagingSettings:!1,showFluentPlayerSettings:!1}},methods:{saveFeatures(t=!0){if(this.features.giphy_module==="yes"&&fH(this.features.giphy_api_key)){this.$handleError(this.$t("Giphy API Key is required"));return}this.$post("settings/features",{features:this.features}).then(e=>{t&&(this.$notify.success(e.message||this.$t("Settings saved successfully")),location.reload())}).catch(e=>{this.$handleError(e)})},getFeatures(){this.loading=!0,this.$get("settings/features").then(t=>{this.features=t.features,this.addOns=t.addOns}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},installPlugin(t){this.installingSlug||(this.installingSlug=t,this.$post("settings/install_plugin",{plugin:t}).then(e=>{e.is_installed?this.$notify.success(e.message):this.$notify.error(this.$t("Sorry, the selected plugins could not be installed")),this.getFeatures()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.installingSlug=""}))}},mounted(){this.getFeatures(),this.changeTitle(this.$t("Features Settings"))}},Qlt={class:"settings_router"},ect={key:0,class:"white_loaded"},tct=g("hr",null,null,-1),nct={key:1,style:{"margin-bottom":"30px"}},sct={class:"fhr_content_layout_body"},ict={class:"setting_header"},oct={class:"fcom_advanced_features"},rct={key:0,class:"setting_body"},act={class:"setting_item"},lct={class:"setting_field_placeholder"},cct={class:"title"},uct={class:"info"},dct={class:"settings_field_data"},hct={class:"align-right"},fct={class:"setting_item"},pct={class:"setting_field_placeholder"},mct={class:"title"},gct={class:"info"},vct={class:"settings_field_data"},_ct={class:"align-right"},yct={class:"setting_item"},bct={class:"setting_field_placeholder"},wct={class:"title"},kct={class:"info"},Cct={class:"settings_field_data"},xct={class:"align-right"},Sct={class:"setting_item"},$ct={class:"setting_field_placeholder"},Act={class:"title"},Ect={class:"info"},Mct={class:"settings_field_data"},Tct={class:"align-right"},Pct={class:"fcom_module_popover_content"},Ict={class:"setting_item"},Lct={class:"setting_field_placeholder"},Oct={class:"title"},Dct={class:"info"},Rct={class:"settings_field_data"},Vct={class:"align-right"},Fct={key:0,class:"fcom_giphy_api",style:{"margin-bottom":"5px"}},Nct={class:"fcom_module_popover_content"},Bct={class:"setting_item"},zct={class:"setting_field_placeholder"},Hct={class:"title"},Uct={class:"info"},jct={class:"settings_field_data"},Wct={class:"align-right"},Yct={class:"fcom_module_popover_content"},qct={class:"setting_item"},Gct={class:"setting_field_placeholder"},Xct={class:"title"},Kct={class:"info"},Zct={class:"settings_field_data"},Jct={class:"align-right"},Qct={class:"setting_item"},eut={class:"setting_field_placeholder"},tut={class:"title"},nut={class:"info"},sut={class:"settings_field_data"},iut={class:"align-right"},out={class:"setting_item"},rut={class:"setting_field_placeholder"},aut={class:"title"},lut={class:"info"},cut={class:"settings_field_data"},uut={class:"align-right"},dut={class:"setting_item"},hut={class:"setting_field_placeholder"},fut={class:"title"},put={class:"info"},mut={class:"settings_field_data"},gut={class:"align-right"},vut={class:"fhr_content_layout_body"},_ut={class:"setting_header"},yut={class:"fcom_advanced_features"},but={key:0,class:"white_loaded"},wut={key:1,class:"setting_body"},kut={class:"setting_field_placeholder"},Cut={class:"title recommend_plugin",style:{display:"flex","align-items":"flex-start"}},xut={class:"avatar",style:{"margin-right":"15px"}},Sut=["src"],$ut=["href"],Aut={class:"info"},Eut={class:"settings_field_data"},Mut={class:"align-right"},Tut=["href"],Put={key:0,class:"dialog_body"},Iut={key:0,class:"dialog_body fluent_player_settings_body"};function Lut(t,e,n,i,s,o){const r=Wt,a=Ci,l=W("FollowingConfigView"),c=W("LeaderBoardConfig"),u=W("UserBadgesConfig"),d=Gt,h=We,f=No,p=ft,m=W("UpgradeToProModal"),y=W("storage-settings"),b=W("SocialMediaLinkConfig"),k=W("CustomProfileFieldsConfig"),C=W("PwaConfig"),$=W("messaging-settings"),x=Ea,M=W("fluent-player-settings"),P=W("layout"),T=W("app-layout");return v(),D(T,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(P,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Advanced Features & Addons")},{default:w(()=>[g("div",Qlt,[s.loading?(v(),A("div",ect,[_(r,{rows:5,animated:!0}),tct,_(r,{rows:7,animated:!0})])):(v(),A("div",nct,[g("div",sct,[g("div",ict,[g("h2",null,S(t.$t("Advanced Features")),1)]),g("div",oct,[s.features?(v(),A("div",rct,[g("div",act,[g("div",lct,[g("div",cct,[B(S(t.$t("Follower Module"))+" ",1),t.has_pro?(v(),A(ee,{key:0},[s.features.followers_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[B(S(t.$t("Disabled")),1)]),_:1})):s.features.followers_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[B(S(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",uct,S(t.$t("Let your community users to follow each other and filter posts by their followings.")),1)]),g("div",dct,[g("div",hct,[_(l,{features:s.features},null,8,["features"])])])]),g("div",fct,[g("div",pct,[g("div",mct,[B(S(t.$t("Leaderboards Module"))+" ",1),t.has_pro?(v(),A(ee,{key:0},[s.features.leader_board_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[B(S(t.$t("Disabled")),1)]),_:1})):s.features.leader_board_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[B(S(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",gct,S(t.$t("__LEADERBOARD_DESC")),1)]),g("div",vct,[g("div",_ct,[_(c,{onSaveSettings:o.saveFeatures,features:s.features},null,8,["onSaveSettings","features"])])])]),g("div",yct,[g("div",bct,[g("div",wct,[B(S(t.$t("User Badges"))+" ",1),t.has_pro?(v(),A(ee,{key:0},[s.features.user_badge==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[B(S(t.$t("Disabled")),1)]),_:1})):s.features.user_badge==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[B(S(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",kct,S(t.$t("__USER_BADGE_DESC")),1)]),g("div",Cct,[g("div",xct,[_(u,{onSaveSettings:o.saveFeatures,features:s.features},null,8,["onSaveSettings","features"])])])]),g("div",Sct,[g("div",$ct,[g("div",Act,[B(S(t.$t("Course Module"))+" ",1),s.features.course_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[B(S(t.$t("Disabled")),1)]),_:1})):s.features.course_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[B(S(t.$t("Enabled")),1)]),_:1})):O("",!0)]),g("div",Ect,S(t.$t("__COURSE_STRUCTURED_LESSONS")),1)]),g("div",Mct,[g("div",Tct,[_(f,{persistent:!1,placement:"bottom",title:t.$t("Course Module Settings"),width:400,trigger:"click"},{reference:w(()=>[_(h,{size:"default",class:"fcom_secondary_button"},{default:w(()=>[B(S(t.$t("Settings")),1)]),_:1})]),default:w(()=>[g("div",Pct,[_(d,{modelValue:s.features.course_module,"onUpdate:modelValue":e[0]||(e[0]=I=>s.features.course_module=I),"true-value":"yes","false-value":"no",label:t.$t("Enable Course Module"),size:"large",class:"fcom_checkbox"},null,8,["modelValue","label"]),_(h,{class:"fcom_primary_button",size:"default",onClick:o.saveFeatures},{default:w(()=>[B(S(t.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])])])]),g("div",Ict,[g("div",Lct,[g("div",Oct,[B(S(t.$t("Giphy Module"))+" ",1),t.has_pro?(v(),A(ee,{key:0},[s.features.giphy_module==="no"?(v(),D(a,{key:0,type:"info",size:"small",effect:"dark"},{default:w(()=>[B(S(t.$t("Disabled")),1)]),_:1})):s.features.giphy_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[B(S(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",Dct,S(t.$t("Unlock potential by using Giphy when creating a new article, post, or comment")),1)]),g("div",Rct,[g("div",Vct,[s.openGiphyUpgradeModal?O("",!0):(v(),D(f,{key:0,persistent:!1,placement:"bottom",title:t.$t("Giphy Module Settings"),width:400,trigger:"click"},{reference:w(()=>[_(h,{size:"default",class:"fcom_secondary_button",onClick:e[3]||(e[3]=I=>!t.has_pro&&(s.openGiphyUpgradeModal=!0))},{default:w(()=>[B(S(t.$t("Settings")),1)]),_:1})]),default:w(()=>[s.features.giphy_module==="yes"?(v(),A("div",Fct,[_(p,{modelValue:s.features.giphy_api_key,"onUpdate:modelValue":e[1]||(e[1]=I=>s.features.giphy_api_key=I),placeholder:t.$t("Giphy API Key")},null,8,["modelValue","placeholder"])])):O("",!0),g("div",Nct,[_(d,{"true-value":"yes","false-value":"no",modelValue:s.features.giphy_module,"onUpdate:modelValue":e[2]||(e[2]=I=>s.features.giphy_module=I),label:t.$t("Enable Giphy Module"),size:"large",class:"fcom_checkbox"},null,8,["modelValue","label"]),_(h,{class:"fcom_primary_button",size:"default",onClick:o.saveFeatures},{default:w(()=>[B(S(t.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])),s.openGiphyUpgradeModal?(v(),D(m,{key:1,showModal:s.openGiphyUpgradeModal,onCloseModal:e[4]||(e[4]=I=>s.openGiphyUpgradeModal=!1),upgrade_module:"giphy_module"},null,8,["showModal"])):O("",!0)])])]),g("div",Bct,[g("div",zct,[g("div",Hct,[B(S(t.$t("Emoji Module"))+" ",1),t.has_pro?(v(),A(ee,{key:0},[s.features.emoji_module==="no"?(v(),D(a,{key:0,type:"info",size:"small",effect:"dark"},{default:w(()=>[B(S(t.$t("Disabled")),1)]),_:1})):s.features.emoji_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[B(S(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",Uct,S(t.$t("__EMOJIS_DESC")),1)]),g("div",jct,[g("div",Wct,[s.openEmojiUpgradeModal?O("",!0):(v(),D(f,{key:0,persistent:!1,placement:"bottom",title:t.$t("Emoji Settings"),width:400,trigger:"click"},{reference:w(()=>[_(h,{size:"default",class:"fcom_secondary_button",onClick:e[6]||(e[6]=I=>!t.has_pro&&(s.openEmojiUpgradeModal=!0))},{default:w(()=>[B(S(t.$t("Settings")),1)]),_:1})]),default:w(()=>[g("div",Yct,[_(d,{"true-value":"yes","false-value":"no",modelValue:s.features.emoji_module,"onUpdate:modelValue":e[5]||(e[5]=I=>s.features.emoji_module=I),label:t.$t("Enable Emoji"),size:"large",class:"fcom_checkbox"},null,8,["modelValue","label"]),_(h,{class:"fcom_primary_button",size:"default",onClick:o.saveFeatures},{default:w(()=>[B(S(t.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])),s.openEmojiUpgradeModal?(v(),D(m,{key:1,showModal:s.openEmojiUpgradeModal,onCloseModal:e[7]||(e[7]=I=>s.openEmojiUpgradeModal=!1),upgrade_module:"emoji_module"},null,8,["showModal"])):O("",!0)])])]),g("div",qct,[g("div",Gct,[g("div",Xct,[B(S(t.$t("Media Module"))+" ",1),s.features.cloud_storage==="yes"?(v(),D(a,{key:0,type:"success",size:"small",effect:"light"},{default:w(()=>[B(S(t.$t("Enabled")),1)]),_:1})):s.features.cloud_storage==="no"?(v(),D(a,{key:1,type:"info",size:"small"},{default:w(()=>[B(S(t.$t("Local")),1)]),_:1})):O("",!0)]),g("div",Kct,S(t.$t("__CLOUD_STORAGE_DESC")),1)]),g("div",Zct,[g("div",Jct,[_(y,{features:s.features},null,8,["features"])])])]),g("div",Qct,[g("div",eut,[g("div",tut,S(t.$t("Profile Social Media Links")),1),g("div",nut,S(t.$t("Enable/Disable Social Media Links for profiles")),1)]),g("div",sut,[g("div",iut,[_(b)])])]),g("div",out,[g("div",rut,[g("div",aut,[B(S(t.$t("Custom Profile Fields"))+" ",1),t.has_pro?(v(),A(ee,{key:0},[s.features.custom_profile_fields==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[B(S(t.$t("Disabled")),1)]),_:1})):(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[B(S(t.$t("Enabled")),1)]),_:1}))],64)):O("",!0)]),g("div",lut,S(t.$t("Add custom fields to member profiles like Gender, DOB, Designation, Blood Group and more.")),1)]),g("div",cut,[g("div",uut,[_(k,{features:s.features},null,8,["features"])])])]),g("div",dut,[g("div",hut,[g("div",fut,[B(S(t.$t("Progressive Web App (PWA)"))+" ",1),t.has_pro?(v(),A(ee,{key:0},[s.features.pwa_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[B(S(t.$t("Disabled")),1)]),_:1})):s.features.pwa_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[B(S(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",put,S(t.$t("Let members install your community as an app on their phone with your own name, icon and colors.")),1)]),g("div",mut,[g("div",gut,[_(C,{onSaveSettings:o.saveFeatures,features:s.features},null,8,["onSaveSettings","features"])])])])])):O("",!0)])])])),g("div",vut,[g("div",_ut,[g("h2",null,S(t.$t("Recommended Plugins and Addons")),1)]),g("div",yut,[s.loading?(v(),A("div",but,[_(r,{rows:6,animated:!0})])):s.features?(v(),A("div",wut,[(v(!0),A(ee,null,Ce(s.addOns,(I,L)=>(v(),A("div",{key:L,class:"setting_item"},[g("div",kut,[g("div",Cut,[g("div",xut,[g("img",{alt:"",src:I.logo,style:{width:"60px"}},null,8,Sut)]),g("div",null,[g("a",{target:"_blank",href:I.learn_more_url},S(I.title),9,$ut),I.is_installed?(v(),D(a,{key:0,type:"success",size:"small",effect:"light",style:{"margin-left":"8px"}},{default:w(()=>[B(S(t.$t("Installed")),1)]),_:1})):O("",!0),g("div",Aut,S(I.description),1)])])]),g("div",Eut,[g("div",Mut,[I.is_installed?O("",!0):(v(),D(h,{key:0,class:"fcom_secondary_button",onClick:R=>o.installPlugin(L),loading:s.installingSlug===L,disabled:!!s.installingSlug&&s.installingSlug!==L},{default:w(()=>[B(S(I.action_text),1)]),_:2},1032,["onClick","loading","disabled"])),L==="fluent-messaging"?(v(),D(h,{key:1,onClick:e[8]||(e[8]=R=>s.showMessagingSettings=!0),class:"fcom_secondary_button"},{default:w(()=>[B(S(t.$t("Messaging Settings")),1)]),_:1})):L==="fluent-player"&&I.is_installed?(v(),D(h,{key:2,onClick:e[9]||(e[9]=R=>s.showFluentPlayerSettings=!0),class:"fcom_secondary_button"},{default:w(()=>[B(S(t.$t("Player Settings")),1)]),_:1})):I.settings_url?(v(),A("a",{key:3,href:I.settings_url,class:"el-button el-button--default fcom_secondary_button"},S(t.$t("View Settings")),9,Tut)):O("",!0)])])]))),128))])):O("",!0)])])]),_(x,{"modal-class":"fcom_common_dialog fcom_upgrade_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:t.dialogWidth,modelValue:s.showMessagingSettings,"onUpdate:modelValue":e[10]||(e[10]=I=>s.showMessagingSettings=I),direction:"rtl"},{header:w(({close:I})=>[g("h4",null,S(t.$t("Messaging Settings")),1)]),default:w(()=>[s.showMessagingSettings?(v(),A("div",Put,[_($)])):O("",!0)]),_:1},8,["size","modelValue"]),_(x,{"modal-class":"fcom_common_dialog fcom_upgrade_dialog",id:"fluent_player_settings_drawer","close-on-click-modal":!1,"append-to-body":!0,size:"900px",modelValue:s.showFluentPlayerSettings,"onUpdate:modelValue":e[11]||(e[11]=I=>s.showFluentPlayerSettings=I),direction:"rtl"},{header:w(()=>[g("h4",null,S(t.$t("FluentPlayer Settings")),1)]),default:w(()=>[s.showFluentPlayerSettings?(v(),A("div",Iut,[_(M)])):O("",!0)]),_:1},8,["modelValue"])]),_:1},8,["title"])]),_:1})}const Out=de(Jlt,[["render",Lut]]),Dut={name:"FComColorPicker",components:{InfoFilled:fp},props:["modelValue","label","help_msg"],emits:["update:modelValue","change"],data(){return{color:this.modelValue}},watch:{color(t){this.$emit("update:modelValue",t),this.$emit("change",t)}},methods:{showColorPicker(){this.$refs.colorPicker.show()}}},Rut={class:"fcom_color_item"};function Vut(t,e,n,i,s,o){const r=Hc,a=W("InfoFilled"),l=be,c=Cs;return v(),A("div",Rut,[_(r,{predefine:t.appVars.suggestedColors,ref:"colorPicker",onActiveChange:e[0]||(e[0]=u=>{s.color=u}),modelValue:s.color,"onUpdate:modelValue":e[1]||(e[1]=u=>s.color=u)},null,8,["predefine","modelValue"]),g("label",{style:{cursor:"pointer"},class:"fcom_color_label",onClick:e[2]||(e[2]=(...u)=>o.showColorPicker&&o.showColorPicker(...u))},S(n.label),1),n.help_msg?(v(),D(c,{key:0,content:n.help_msg,placement:"right"},{default:w(()=>[_(l,{class:"fcom_tip"},{default:w(()=>[_(a)]),_:1})]),_:1},8,["content"])):O("",!0)])}const Fut=de(Dut,[["render",Vut]]),Nut={name:"AuthMeta",components:{BgImageUpload:Z1,CrepeEditor:Zc,FComColorPicker:Fut},props:["currentTab","settings","savingCount"],data(){return{editing:!1,editTab:"content",isDirty:!1,editingField:null,formField:"terms"}},watch:{currentTab(){this.editTab="content",this.editing=!1,this.editingField=null,this.isDirty=!1},savingCount(){this.editing=!1,this.editingField=null,this.isDirty=!1},editingField(){this.editTab="content"},"editingField.description"(t,e){t&&e&&t!==e&&!this.isDirty&&(this.isDirty=!0)}},computed:{getLabel(){return t=>({banner:this.$t("Banner"),form:this.$t("Form")})[t]||this.$t("Banner")},getFieldIcon(){return t=>({banner:"Picture",form:"Memo",fields:"Tickets"})[t.type]||"Picture"},sortedFields(){return Object.values(this.settings).sort((t,e)=>t.position==="left"?-1:e.position==="left"?1:0)},isBannerField(){return this.editingField.type=="banner"},isFormField(){return this.editingField.type=="form"}},methods:{toggleHidden(t){t.hidden=!t.hidden},updateField(t){this.editing=!0,this.editingField=t},backToFields(){this.editing=!1,this.editingField=null,this.isDirty=!1,this.editTab="content"},togglePosition(){var e,n;const t=(e=this.settings.banner)==null?void 0:e.position;this.settings.banner.position=(n=this.settings.form)==null?void 0:n.position,this.settings.form.position=t}}},But={key:0,class:"fcom_lockscreen_meta"},zut={class:"fcom_meta_section lockscreen_meta"},Hut={key:0,class:"fcom_description"},Uut={key:1,class:"fcom_description"},jut={class:"fcom_meta_section lockscreen_meta"},Wut={key:0,class:"fcom_meta_label"},Yut={key:1,class:"fcom_meta_label"},qut={class:"fcom_meta_content"},Gut={class:"fcom_meta_block"},Xut={class:"fcom_block_label"},Kut={class:"fcom_meta_sorting"},Zut={class:"fcom_block_action"},Jut={key:1,class:"fcom_lockscreen_meta"},Qut={class:"fcom_edit_title"},edt={class:"fcom_edit_content"},tdt={key:0,class:"fcom_help_text"},ndt={key:0,class:"fcom_help_text"};function sdt(t,e,n,i,s,o){const r=be,a=W("Top"),l=W("Bottom"),c=W("EditPen"),u=W("Hide"),d=W("View"),h=W("Back"),f=W("BgImageUpload"),p=en,m=ft,y=W("crepe-editor"),b=sn,k=Rb,C=W("FComColorPicker"),$=Mi,x=xs,M=Uc,P=Pde,T=Tde,I=Db;return s.editing?(v(),A("div",Jut,[g("div",Qut,[_(r,{onClick:o.backToFields},{default:w(()=>[_(h)]),_:1},8,["onClick"]),g("p",null,S(s.editingField.label),1)]),g("div",edt,[o.isBannerField||o.isFormField?(v(),D(I,{key:0,modelValue:s.editTab,"onUpdate:modelValue":e[18]||(e[18]=L=>s.editTab=L)},{default:w(()=>[_(k,{label:t.$t("Content"),name:"content"},{default:w(()=>[_(b,{onSubmit:e[4]||(e[4]=Ae(L=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[o.isBannerField?(v(),D(p,{key:0,label:t.$t("Logo"),class:"fcom_bg_image"},{default:w(()=>[_(f,{modelValue:s.editingField.logo,"onUpdate:modelValue":e[0]||(e[0]=L=>s.editingField.logo=L),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"])):O("",!0),_(p,{label:t.$t("Title")},{default:w(()=>[_(m,{modelValue:s.editingField.title,"onUpdate:modelValue":e[1]||(e[1]=L=>s.editingField.title=L),placeholder:t.$t("Title")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,{label:t.$t("Description")},{default:w(()=>[_(y,{modelValue:s.editingField.description,"onUpdate:modelValue":e[2]||(e[2]=L=>s.editingField.description=L)},null,8,["modelValue"]),s.isDirty?(v(),A("span",tdt,S(t.$t("Please save the changes to update the view")),1)):O("",!0)]),_:1},8,["label"]),o.isFormField?(v(),D(p,{key:1,label:t.$t("Button Label")},{default:w(()=>[_(m,{modelValue:s.editingField.button_label,"onUpdate:modelValue":e[3]||(e[3]=L=>s.editingField.button_label=L),placeholder:t.$t("Button Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):O("",!0)]),_:1})]),_:1},8,["label"]),o.isBannerField?(v(),D(k,{key:0,label:t.$t("Design"),name:"design"},{default:w(()=>[_(b,{onSubmit:e[11]||(e[11]=Ae(L=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(p,{label:t.$t("Background Image"),class:"fcom_bg_image"},{default:w(()=>[_(f,{modelValue:s.editingField.background_image,"onUpdate:modelValue":e[5]||(e[5]=L=>s.editingField.background_image=L),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"]),_(C,{help_msg:t.$t("The main background color of the form"),label:t.$t("Background Color"),modelValue:s.editingField.background_color,"onUpdate:modelValue":e[6]||(e[6]=L=>s.editingField.background_color=L)},null,8,["help_msg","label","modelValue"]),_(C,{help_msg:t.$t("The title color of the form"),label:t.$t("Title Color"),modelValue:s.editingField.title_color,"onUpdate:modelValue":e[7]||(e[7]=L=>s.editingField.title_color=L)},null,8,["help_msg","label","modelValue"]),_(C,{help_msg:t.$t("The text color of the form"),label:t.$t("Text Color"),modelValue:s.editingField.text_color,"onUpdate:modelValue":e[8]||(e[8]=L=>s.editingField.text_color=L)},null,8,["help_msg","label","modelValue"]),o.isFormField?(v(),D(C,{key:0,help_msg:t.$t("The button text color of the form"),label:t.$t("Button Text Color"),modelValue:s.editingField.button_label_color,"onUpdate:modelValue":e[9]||(e[9]=L=>s.editingField.button_label_color=L)},null,8,["help_msg","label","modelValue"])):O("",!0),o.isFormField?(v(),D(C,{key:1,help_msg:t.$t("The button background color of the form"),label:t.$t("Button Background"),modelValue:s.editingField.button_color,"onUpdate:modelValue":e[10]||(e[10]=L=>s.editingField.button_color=L)},null,8,["help_msg","label","modelValue"])):O("",!0)]),_:1})]),_:1},8,["label"])):O("",!0),o.isFormField&&s.editingField.fields.terms?(v(),D(k,{key:1,label:t.$t("Fields"),name:"fields"},{default:w(()=>[_(T,{modelValue:s.formField,"onUpdate:modelValue":e[17]||(e[17]=L=>s.formField=L),accordion:""},{default:w(()=>[_(P,{title:t.$t("Terms"),name:"terms"},{default:w(()=>[_(b,{onSubmit:e[15]||(e[15]=Ae(L=>t.doNothing(),["prevent"])),onInput:e[16]||(e[16]=L=>s.isDirty=!0),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(p,{label:t.$t("Label")},{default:w(()=>[_(y,{modelValue:s.editingField.fields.terms.label,"onUpdate:modelValue":e[12]||(e[12]=L=>s.editingField.fields.terms.label=L)},null,8,["modelValue"]),s.isDirty?(v(),A("span",ndt,S(t.$t("Please save the changes to update the view")),1)):O("",!0)]),_:1},8,["label"]),_(p,{label:t.$t("Required")},{default:w(()=>[_(x,{modelValue:s.editingField.fields.terms.required,"onUpdate:modelValue":e[13]||(e[13]=L=>s.editingField.fields.terms.required=L)},{default:w(()=>[_($,{value:!0},{default:w(()=>[B(S(t.$t("Yes")),1)]),_:1}),_($,{value:!1},{default:w(()=>[B(S(t.$t("No")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(p,{label:t.$t("Disabled")},{default:w(()=>[_(M,{modelValue:s.editingField.fields.terms.disabled,"onUpdate:modelValue":e[14]||(e[14]=L=>s.editingField.fields.terms.disabled=L)},null,8,["modelValue"])]),_:1},8,["label"])]),_:1})]),_:1},8,["title"])]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0)]),_:1},8,["modelValue"])):O("",!0)])])):(v(),A("div",But,[g("div",zut,[n.currentTab=="login"?(v(),A("div",Hut,[g("p",null,S(t.$t("Configure the appearance and behavior of your login form.")),1)])):O("",!0),n.currentTab=="signup"?(v(),A("div",Uut,[g("p",null,S(t.$t("Configure the appearance and behavior of your signup form.")),1)])):O("",!0)]),g("div",jut,[n.currentTab=="login"?(v(),A("div",Wut,S(t.$t("Customize Login")),1)):O("",!0),n.currentTab=="signup"?(v(),A("div",Yut,S(t.$t("Customize Sign Up")),1)):O("",!0),g("div",qut,[g("ul",Gut,[(v(!0),A(ee,null,Ce(o.sortedFields,L=>(v(),A("li",{class:G(["fcom_block_list",{block_hidden:L.hidden}])},[g("div",Xut,[_(r,{class:"fcom_el_icon"},{default:w(()=>[(v(),D(Ct(o.getFieldIcon(L))))]),_:2},1024),g("p",null,S(o.getLabel(L.type)),1)]),g("div",Kut,[_(r,{onClick:o.togglePosition},{default:w(()=>[_(a)]),_:1},8,["onClick"]),_(r,{onClick:o.togglePosition},{default:w(()=>[_(l)]),_:1},8,["onClick"])]),g("div",Zut,[_(r,{onClick:R=>o.updateField(L)},{default:w(()=>[_(c)]),_:2},1032,["onClick"]),L.type=="banner"?(v(),A(ee,{key:0},[L.hidden?(v(),D(r,{key:0,onClick:R=>o.toggleHidden(L)},{default:w(()=>[_(u)]),_:2},1032,["onClick"])):(v(),D(r,{key:1,onClick:R=>o.toggleHidden(L)},{default:w(()=>[_(d)]),_:2},1032,["onClick"]))],64)):O("",!0)])],2))),256))])])])]))}const idt=de(Nut,[["render",sdt]]),odt={name:"AuthEditor",emits:["updateAuthSettings"],props:["currentTab","savingCount","authSettings"],components:{AuthMeta:idt},data(){return{settings:this.authSettings[this.currentTab]}},watch:{currentTab(){this.settings=this.authSettings[this.currentTab]},savingCount(){this.saveSettings()},authSettings(){this.settings=this.authSettings[this.currentTab]}},computed:{contentStyles(){var t;return{flexDirection:((t=this.settings.banner)==null?void 0:t.position)=="left"?"row":"row-reverse"}},backgroundStyles(){return t=>({backgroundSize:"cover",backgroundImage:`url(${t==null?void 0:t.background_image})`,backgroundColor:t==null?void 0:t.background_color})},titleStyles(){return t=>({color:t==null?void 0:t.title_color})},descriptionStyles(){return t=>({color:t==null?void 0:t.text_color})},buttonStyles(){return t=>({backgroundColor:t==null?void 0:t.button_color,color:t==null?void 0:t.button_label_color})}},methods:{updateTitle(t,e){e.title=t.target.innerText},updateButtonLabel(t,e){e.button_label=t.target.innerText},saveSettings(){this.saving=!0,this.$post("admin/auth-settings",{settings:this.authSettings}).then(t=>{this.$notify.success(t.message),this.$emit("updateAuthSettings",t.settings)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}}},rdt={class:"fcom_auth_content"},adt={key:0,class:"fcom_auth_image"},ldt=["src","alt"],cdt={class:"fcom_auth_title"},udt=["innerHTML"],ddt={class:"fcom_auth_content form_content"},hdt={class:"fcom_auth_form_header"},fdt={class:"fcom_auth_title"},pdt=["innerHTML"],mdt=["innerHTML"];function gdt(t,e,n,i,s,o){const r=W("auth-meta"),a=x1,l=ft,c=en,u=Gt,d=sn,h=We,f=Aa;return v(),A(ee,null,[_(a,{class:"fcom_full_editor_side lockscreen_editor auth_editor",width:"300px"},{default:w(()=>[le(t.$slots,"before_meta"),_(r,{currentTab:n.currentTab,settings:s.settings,savingCount:n.savingCount},null,8,["currentTab","settings","savingCount"])]),_:3}),_(f,{class:"fcom_full_editor_main lockscreen_editor auth_editor"},{default:w(()=>{var p,m,y,b,k,C,$,x,M;return[g("div",{class:"fcom_editor_content",style:Xe(o.contentStyles)},[(p=s.settings.banner)!=null&&p.hidden?O("",!0):(v(),A("div",{key:0,class:"fcom_auth_wrap",style:Xe(o.backgroundStyles(s.settings.banner))},[g("div",rdt,[(m=s.settings.banner)!=null&&m.logo?(v(),A("div",adt,[g("img",{src:(y=s.settings.banner)==null?void 0:y.logo,alt:(b=s.settings.banner)==null?void 0:b.title},null,8,ldt)])):O("",!0),g("div",cdt,[g("h2",{style:Xe(o.titleStyles(s.settings.banner)),contenteditable:"true",onBlur:e[0]||(e[0]=P=>o.updateTitle(P,s.settings.banner))},S((k=s.settings.banner)==null?void 0:k.title),37)]),(C=s.settings.banner)!=null&&C.description?(v(),A("div",{key:1,class:"fcom_auth_description",style:Xe(o.descriptionStyles(s.settings.banner))},[g("p",{innerHTML:s.settings.banner.description_rendered},null,8,udt)],4)):O("",!0)])],4)),g("div",{class:"fcom_auth_wrap",style:Xe(o.backgroundStyles(s.settings.form))},[g("div",ddt,[g("div",hdt,[g("div",fdt,[g("h2",{style:Xe(o.titleStyles(s.settings.form)),contenteditable:"true",onBlur:e[1]||(e[1]=P=>o.updateTitle(P,s.settings.form))},S(($=s.settings.form)==null?void 0:$.title),37)]),(x=s.settings.form)!=null&&x.description?(v(),A("div",{key:0,class:"fcom_auth_description",style:Xe(o.descriptionStyles(s.settings.form))},[g("p",{innerHTML:s.settings.form.description_rendered},null,8,pdt)],4)):O("",!0)]),(M=s.settings.form)!=null&&M.fields?(v(),D(d,{key:0,"label-position":"top",class:"fcom_auth_form"},{default:w(()=>[(v(!0),A(ee,null,Ce(s.settings.form.fields,P=>(v(),A("div",{key:P.name},[["text","email","number","textarea","password"].includes(P.type)?(v(),D(c,{key:0,label:P.label},{default:w(()=>[_(l,{type:P.type,placeholder:P.placeholder},null,8,["type","placeholder"])]),_:2},1032,["label"])):O("",!0),P.type=="inline_checkbox"&&!P.disabled?(v(),D(c,{key:1},{default:w(()=>[_(u,{class:"fcom_checkbox"},{default:w(()=>[g("span",{innerHTML:P.inline_label},null,8,mdt)]),_:2},1024)]),_:2},1024)):O("",!0)]))),128))]),_:1})):O("",!0),_(h,{style:Xe(o.buttonStyles(s.settings.form)),contenteditable:"true",onBlur:e[2]||(e[2]=P=>o.updateButtonLabel(P,s.settings.form))},{default:w(()=>{var P;return[B(S((P=s.settings.form)==null?void 0:P.button_label),1)]}),_:1},8,["style"])])],4)],4)]}),_:1})],64)}const vdt=de(odt,[["render",gdt]]),_dt={name:"AuthSettings",emits:["completed"],components:{AuthEditor:vdt},data(){return{saving:!1,loading:!1,currentTab:"login",savingCount:0,authSettings:{login:[],signup:[]},hasPro:window.fluentComAdmin.pro}},methods:{getSettings(){this.loading=!0,this.$get("admin/auth-settings").then(t=>{this.authSettings=t.settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){if(!this.hasPro){this.$notify({title:this.$t("Pro Required"),message:this.$t("This feature is only available in the pro version."),type:"error"});return}this.savingCount++},updateAuthSettings(t){this.authSettings=t}},mounted(){this.getSettings()}},ydt={class:"fcom_full_editor"},bdt={class:"fcom_full_editor_header"},wdt=["aria-label"],kdt={class:"fcom_editor_menu object_menu"},Cdt={class:"fcom_space_menu_ul"},xdt={class:"full_editor_actions"},Sdt={key:0},$dt={key:1};function Adt(t,e,n,i,s,o){const r=W("ArrowLeft"),a=be,l=We,c=S1,u=W("auth-editor"),d=Wt,h=x1,f=Aa,p=C1,m=xt("loading");return v(),A("div",ydt,[_(p,null,{default:w(()=>[_(c,{class:"fcom_full_editor_header_wrap"},{default:w(()=>[g("div",bdt,[g("button",{type:"button",onClick:e[0]||(e[0]=y=>t.$emit("completed")),class:"fcom_back_header","aria-label":t.$t("Back to %s",t.$t("General Settings"))},[_(a,null,{default:w(()=>[_(r)]),_:1}),B(" "+S(t.$t("General Settings")),1)],8,wdt),g("div",kdt,[g("ul",Cdt,[g("li",{onClick:e[1]||(e[1]=y=>s.currentTab="login")},[g("a",{class:G({"router-link-exact-active":s.currentTab=="login"}),href:"#"},S(t.$t("Login")),3)]),g("li",{onClick:e[2]||(e[2]=y=>s.currentTab="signup")},[g("a",{class:G({"router-link-exact-active":s.currentTab=="signup"}),href:"#"},S(t.$t("Sign Up")),3)])])]),g("div",xdt,[De((v(),D(l,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[s.hasPro?(v(),A("span",Sdt,S(t.$t("Save Changes")),1)):(v(),A("span",$dt,S(t.$t("Save Changes (Pro Required)")),1))]),_:1},8,["disabled","onClick"])),[[m,s.saving]])])])]),_:1}),_(p,{class:"fcom_full_editor_container"},{default:w(()=>[s.loading?(v(),A(ee,{key:1},[_(h,{class:"fcom_full_editor_side lockscreen_editor"},{default:w(()=>[_(d,{animated:!0,rows:5})]),_:1}),_(f,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(d,{animated:!0,rows:10})]),_:1})],64)):(v(),D(u,{key:0,currentTab:s.currentTab,savingCount:s.savingCount,"auth-settings":s.authSettings,onUpdateAuthSettings:o.updateAuthSettings},null,8,["currentTab","savingCount","auth-settings","onUpdateAuthSettings"]))]),_:1})]),_:1})])}const Edt=de(_dt,[["render",Adt]]),Mdt={name:"GeneralSettings",components:{ImageUploader:vl,Layout:fi,AppLayout:pi,CopyDocument:oH,AuthSettings:Edt},data(){return{settings:null,user_roles:{},loading:!1,saving:!1,users_can_register:!0,user_registration_enable_url:"",showCustomLoginForm:!1}},computed:{loginUrl(){return this.appVars.urls.portal_base+"?fcom_action=auth"},signupUrl(){return this.appVars.urls.portal_base+"?fcom_action=auth&form=register"},isRoleBase(){var t,e;return((e=(t=this.settings)==null?void 0:t.access)==null?void 0:e.acess_level)==="role_based"},isPublic(){var t,e;return((e=(t=this.settings)==null?void 0:t.access)==null?void 0:e.acess_level)==="public"},isDefaultLogin(){var t;return((t=this.settings)==null?void 0:t.auth_form_type)==="default"},isCustomLogin(){var t;return((t=this.settings)==null?void 0:t.auth_form_type)==="custom"}},methods:{openLoginCustomizeForm(){this.showCustomLoginForm=!0},copyToClipboard(t){this.$toClipboard(t,this.$t("Link copied to clipboard"))},getSettings(){this.loading=!0,this.$get("admin/general").then(t=>{this.settings=t.settings,this.user_roles=t.user_roles,this.users_can_register=t.users_can_register,this.user_registration_enable_url=t.user_registration_enable_url}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveSettings(){this.saving=!0,this.$post("admin/general",{settings:this.settings}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings(),this.changeTitle(this.$t("General Settings"))}},Tdt={class:"settings_router"},Pdt={class:"fhr_content_layout_body"},Idt={class:"setting_body"},Ldt={class:"settings_title"},Odt={class:"settings_subtitle"},Ddt={class:"settings_title"},Rdt={class:"settings_subtitle"},Vdt=["src"],Fdt={class:"settings_title"},Ndt={class:"settings_subtitle"},Bdt=["src"],zdt={class:"settings_title"},Hdt={class:"settings_subtitle"},Udt={class:"settings_title"},jdt={class:"settings_subtitle"},Wdt=["src"],Ydt={class:"settings_title"},qdt={class:"settings_subtitle"},Gdt={class:"fcom_help_text"},Xdt={class:"settings_title"},Kdt={class:"settings_subtitle"},Zdt={class:"settings_title"},Jdt={class:"settings_subtitle"},Qdt={class:"help_text"},eht={class:"settings_title"},tht={class:"settings_subtitle"},nht={class:"settings_title"},sht={class:"settings_subtitle"},iht={class:"fcom_help_text"},oht={class:"settings_title"},rht={class:"settings_subtitle"},aht={class:"fcom_help_text"},lht=["href"],cht=g("div",{style:{width:"100%"}},[g("hr")],-1),uht={class:"settings_title"},dht={class:"settings_subtitle"},hht={key:0};function fht(t,e,n,i,s,o){const r=We,a=Ld,l=ft,c=en,u=Id,d=W("image-uploader"),h=sp,f=xs,p=W("CopyDocument"),m=be,y=Gt,b=Mi,k=on,C=Jt,$=sn,x=Wt,M=W("auth-settings"),P=W("layout"),T=W("app-layout");return v(),D(T,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(P,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("General Settings")},{actions:w(()=>[_(r,{class:"fcom_primary_button",disabled:s.saving||s.loading,onClick:o.saveSettings},{default:w(()=>[g("span",null,S(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),default:w(()=>[g("div",Tdt,[g("div",Pdt,[g("div",Idt,[s.settings?(v(),D($,{key:0,onSubmit:e[19]||(e[19]=Ae(I=>t.doNothing(),["prevent"])),"label-position":"top","label-width":"120px"},{default:w(()=>[_(u,{gutter:20,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",Ldt,S(t.$t("Community Title")),1),g("span",Odt,S(t.$t("This title will be used for the meta title and email notification references. It should match your site title.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(l,{placeholder:t.$t("Community title"),type:"text",modelValue:s.settings.site_title,"onUpdate:modelValue":e[0]||(e[0]=I=>s.settings.site_title=I)},null,8,["placeholder","modelValue"])]),_:1})]),_:1})]),_:1}),_(u,{gutter:20,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",Ddt,S(t.$t("Site Logo (For Light Background)")),1),g("span",Rdt,S(t.$t("Recommended dimensions: 480 x 120, 4:1 aspect ratio.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[s.settings.logo?(v(),A("img",{key:0,alt:"",class:"settings_img",src:s.settings.logo},null,8,Vdt)):O("",!0),_(d,{additionalData:{resize:!1,max_width:500,skip_convert:"yes"},button_text:s.settings.logo?t.$t("Change"):t.$t("Upload Logo"),can_remove:!!s.settings.logo,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:e[1]||(e[1]=I=>{s.settings.logo=I})},null,8,["button_text","can_remove"])]),_:1})]),_:1})]),_:1}),_(u,{gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",Fdt,S(t.$t("Site Logo (For Dark Mode)")),1),g("span",Ndt,S(t.$t("Recommended dimensions: 480 x 120, 4:1 aspect ratio.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[s.settings.white_logo?(v(),A("img",{key:0,alt:"",class:"settings_img",src:s.settings.white_logo},null,8,Bdt)):O("",!0),_(d,{additionalData:{resize:!1,max_width:500,skip_convert:"yes"},button_text:s.settings.white_logo?t.$t("Change"):t.$t("Set Logo"),can_remove:!!s.settings.white_logo,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:e[2]||(e[2]=I=>{s.settings.white_logo=I})},null,8,["button_text","can_remove"])]),_:1})]),_:1})]),_:1}),_(u,{gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",zdt,S(t.$t("Logo Permalink")),1),g("span",Hdt,S(t.$t("Define the permalink of the logo you want to use.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(f,{style:{"flex-direction":"row"},modelValue:s.settings.logo_permalink_type,"onUpdate:modelValue":e[3]||(e[3]=I=>s.settings.logo_permalink_type=I),class:"fcom_radio_group"},{default:w(()=>[_(h,{value:"default"},{default:w(()=>[B(S(t.$t("Default")),1)]),_:1}),_(h,{value:"custom"},{default:w(()=>[B(S(t.$t("Custom")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1}),s.settings.logo_permalink_type=="default"?(v(),D(c,{key:0,class:"fcom_mt_20",label:t.$t("Default Permalink")},{default:w(()=>[_(l,{value:t.appVars.urls.portal_base,disabled:"",type:"url",placeholder:t.$t("Default Permalink")},{append:w(()=>[_(r,{onClick:e[4]||(e[4]=I=>o.copyToClipboard(t.appVars.urls.portal_base)),text:""},{default:w(()=>[_(m,null,{default:w(()=>[_(p)]),_:1}),g("span",null,S(t.$t("Copy")),1)]),_:1})]),_:1},8,["value","placeholder"])]),_:1},8,["label"])):O("",!0),s.settings.logo_permalink_type=="custom"?(v(),D(c,{key:1,class:"fcom_mt_20",label:t.$t("Custom Permalink")},{default:w(()=>[_(l,{modelValue:s.settings.logo_permalink,"onUpdate:modelValue":e[5]||(e[5]=I=>s.settings.logo_permalink=I),type:"url"},null,8,["modelValue"])]),_:1},8,["label"])):O("",!0)]),_:1})]),_:1}),_(u,{gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",Udt,S(t.$t("Default Open Graph Image")),1),g("span",jdt,S(t.$t("This image will be used on social sharing preview. Recommended size: 1200 x 630 px")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[s.settings.featured_image?(v(),A("img",{key:0,alt:"",style:{"max-height":"100px"},class:"settings_img",src:s.settings.featured_image},null,8,Wdt)):O("",!0),_(d,{additionalData:{resize:!1,disable_convert:"yes",max_width:1600,skip_convert:"yes"},button_text:s.settings.featured_image?t.$t("Change"):t.$t("Set Open Graph Image"),can_remove:!!s.settings.featured_image,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:e[6]||(e[6]=I=>{s.settings.featured_image=I})},null,8,["button_text","can_remove"])]),_:1})]),_:1})]),_:1}),_(u,{gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",Ydt,S(t.$t("Global Post Status")),1),g("span",qdt,S(t.$t("Enable/disable Post Status")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(y,{modelValue:s.settings.disable_global_posts,"onUpdate:modelValue":e[7]||(e[7]=I=>s.settings.disable_global_posts=I),class:"fcom_checkbox","true-value":"no","false-value":"yes"},{default:w(()=>[B(S(t.$t("Enable Global Posts Status Form")),1)]),_:1},8,["modelValue"]),g("div",Gdt,[g("p",null,S(t.$t("If you enable this, then users can post globally without selecting a space, which will be available for everyone.")),1)])]),_:1})]),_:1})]),_:1}),_(u,{gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",Xdt,S(t.$t("Portal Access Settings")),1),g("span",Kdt,S(t.$t("Who can access the portal.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(f,{modelValue:s.settings.access.acess_level,"onUpdate:modelValue":e[8]||(e[8]=I=>s.settings.access.acess_level=I),class:"fcom_radio_group"},{default:w(()=>[_(b,{value:"public"},{default:w(()=>[B(S(t.$t("Everyone")),1)]),_:1}),_(b,{value:"logged_in"},{default:w(()=>[B(S(t.$t("Only Logged In Users")),1)]),_:1}),_(b,{value:"role_based"},{default:w(()=>[B(S(t.$t("Only Selected User Roles")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),o.isRoleBase?(v(),A(ee,{key:0},[_(u,{gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",Zdt,S(t.$t("User Roles")),1),g("span",Jdt,S(t.$t("Select user roles who can access the portal.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(C,{placeholder:t.$t("Select Access Roles"),"allow-create":"",modelValue:s.settings.access.access_roles,"onUpdate:modelValue":e[9]||(e[9]=I=>s.settings.access.access_roles=I),multiple:""},{default:w(()=>[(v(!0),A(ee,null,Ce(s.user_roles,(I,L)=>(v(),D(k,{key:L,label:I,value:L},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"]),g("span",Qdt,S(t.$t("__ALL_ADMIN_ACCESS_DESC")),1)]),_:1})]),_:1})]),_:1}),_(u,{gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",eht,S(t.$t("Not Matched User Roles")),1),g("span",tht,S(t.$t("Message to show for users without matching roles.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(l,{type:"textarea",rows:3,modelValue:s.settings.restricted_role_content,"onUpdate:modelValue":e[10]||(e[10]=I=>s.settings.restricted_role_content=I)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})],64)):O("",!0),o.isPublic?O("",!0):(v(),D(u,{key:1,gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",nht,S(t.$t("Redirect URL")),1),g("span",sht,S(t.$t("Redirect URL for Public Users")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(l,{modelValue:s.settings.auth_url,"onUpdate:modelValue":e[11]||(e[11]=I=>s.settings.auth_url=I)},null,8,["modelValue"]),g("div",iht,[g("p",null,S(t.$t("Do not use your community portal URL here. Maybe you can use your login/signup URL")),1)])]),_:1})]),_:1})]),_:1})),_(u,{gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",oht,S(t.$t("Login / Registration URLs")),1),g("span",rht,S(t.$t("Find the default Login/Registration Urls")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,{label:t.$t("Login/Signup Form Type")},{default:w(()=>[_(f,{style:{"flex-direction":"row"},modelValue:s.settings.auth_form_type,"onUpdate:modelValue":e[12]||(e[12]=I=>s.settings.auth_form_type=I),class:"fcom_radio_group"},{default:w(()=>[_(h,{value:"default"},{default:w(()=>[B(S(t.$t("Use Default")),1)]),_:1}),_(h,{value:"custom"},{default:w(()=>[B(S(t.$t("Use Custom Login Page")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),o.isCustomLogin?(v(),D(c,{key:0,label:t.$t("Please provide your custom Authentication Url"),class:"fcom_mt_20"},{default:w(()=>[_(l,{modelValue:s.settings.cutsom_auth_url,"onUpdate:modelValue":e[13]||(e[13]=I=>s.settings.cutsom_auth_url=I),type:"url",placeholder:t.$t("Custom Auth URL")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])):O("",!0),_(c,{class:"fcom_mt_20",label:t.$t("Default Login URL")},{default:w(()=>[_(l,{disabled:"",value:o.loginUrl,placeholder:t.$t("Login URL for public Users")},{append:w(()=>[_(r,{onClick:e[14]||(e[14]=I=>o.copyToClipboard(o.loginUrl)),text:""},{default:w(()=>[_(m,null,{default:w(()=>[_(p)]),_:1}),g("span",null,S(t.$t("Copy")),1)]),_:1})]),_:1},8,["value","placeholder"])]),_:1},8,["label"]),_(c,{class:"fcom_mt_20",label:t.$t("Default Signup URL")},{default:w(()=>[_(l,{disabled:"",value:o.signupUrl,placeholder:t.$t("Registration URL for public Users")},{append:w(()=>[_(r,{onClick:e[15]||(e[15]=I=>o.copyToClipboard(o.signupUrl)),text:""},{default:w(()=>[_(m,null,{default:w(()=>[_(p)]),_:1}),g("span",null,S(t.$t("Copy")),1)]),_:1})]),_:1},8,["value","placeholder"]),s.users_can_register?O("",!0):(v(),A(ee,{key:0},[g("div",aht,[g("p",null,[B(S(t.$t("Global User registration is disabled for your site. Please enable from General Settings or override in FluentCommunity Settings."))+" ",1),g("a",{target:"_blank",rel:"noopener",href:s.user_registration_enable_url},S(t.$t("Go to General Settings.")),9,lht)])]),cht,_(y,{modelValue:s.settings.explicit_registration,"onUpdate:modelValue":e[16]||(e[16]=I=>s.settings.explicit_registration=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Enable User Registration via FluentCommunity Signup Form")),1)]),_:1},8,["modelValue"])],64))]),_:1},8,["label"]),s.settings.auth_form_type=="default"?(v(),A(ee,{key:1},[_(c,{class:"fcom_mt_20"},{default:w(()=>[_(y,{modelValue:s.settings.use_custom_signup_page,"onUpdate:modelValue":e[17]||(e[17]=I=>s.settings.use_custom_signup_page=I),"true-value":"yes","false-value":"no"},{default:w(()=>[B(S(t.$t("Use custom signup URL instead of default signup page")),1)]),_:1},8,["modelValue"])]),_:1}),s.settings.use_custom_signup_page=="yes"?(v(),D(c,{key:0,class:"fcom_mt_20",label:t.$t("Custom Signup URL (Required)")},{default:w(()=>[_(l,{placeholder:t.$t("Custom Signup URL (Required)"),modelValue:s.settings.custom_signup_url,"onUpdate:modelValue":e[18]||(e[18]=I=>s.settings.custom_signup_url=I)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])):O("",!0)],64)):O("",!0)]),_:1})]),_:1}),o.isDefaultLogin?(v(),D(u,{key:2,gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",uht,S(t.$t("Customize Login/Signup Form")),1),g("span",dht,S(t.$t("Customize your login and registration form settings")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(r,{class:"fcom_secondary_button",onClick:o.openLoginCustomizeForm},{default:w(()=>[B(S(t.$t("Customize")),1)]),_:1},8,["onClick"])]),_:1})]),_:1})):O("",!0),_(u,{gutter:30},{default:w(()=>[_(r,{class:"fcom_primary_button",disabled:s.saving||s.loading,onClick:o.saveSettings},{default:w(()=>[g("span",null,S(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})):s.loading?(v(),D(x,{key:1,animated:!0,rows:10})):O("",!0)])])]),s.showCustomLoginForm?(v(),A("div",hht,[(v(),D(Sa,{to:"body"},[_(M,{onCompleted:e[20]||(e[20]=I=>s.showCustomLoginForm=!1)})]))])):O("",!0)]),_:1},8,["title"])]),_:1})}const pht=de(Mdt,[["render",fht]]),mht={name:"ContentDivider",props:{lineColor:{type:String,default:"var(--fcom-secondary-border, #e5e7eb)"},position:{type:String,default:"center",validator:t=>["center","left","right"].includes(t)}}},ght={class:"fcom_content_divider__content"};function vht(t,e,n,i,s,o){return v(),A("div",{class:G(["fcom_content_divider","fcom_content_divider--"+n.position])},[n.position!=="left"?(v(),A("span",{key:0,class:"fcom_content_divider__line",style:Xe({background:n.lineColor})},null,4)):O("",!0),g("div",ght,[le(t.$slots,"default")]),n.position!=="right"?(v(),A("span",{key:1,class:"fcom_content_divider__line",style:Xe({background:n.lineColor})},null,4)):O("",!0)],2)}const _ht=de(mht,[["render",vht]]),yht={name:"MenuSettings",components:{MenuGroupSettings:MH,Layout:fi,AppLayout:pi,ContentDivider:_ht,ActionPopover:Pa},data(){return{menuSettings:null,loading:!1,saving:!1,editingGroupSlug:null,editingGroupTitle:""}},methods:{fetchMenuItems(){this.loading||(this.loading=!0,this.$get("settings/menu-settings").then(t=>{this.menuSettings=t.menuSettings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1}))},isSaveBlocked(){return this.saving?(this.$notify.info(this.$t("Please wait for the current operation to complete.")),!0):!1},saveMenuItems({customSuccessMessage:t=null}={}){return this.isSaveBlocked()?Promise.reject():(this.saving=!0,this.$post("settings/menu-settings",{menuSettings:this.menuSettings}).then(e=>{this.$notify.success(t||e.message),this.$eventBus.emit("reloadMenu")}).catch(e=>{this.$handleError(e),this.fetchMenuItems()}).finally(()=>{this.saving=!1}))},addFooterGroup(){if(this.isSaveBlocked())return;const t="custom_footer_group_"+Date.now(),e={title:this.$t("Untitled Group"),slug:t,items:[]};this.menuSettings.afterCommunityLinkGroups.push(e),this.saveMenuItems({customSuccessMessage:this.$t("New group added successfully.")}).then(()=>{this.editingGroupSlug=t,this.editingGroupTitle=this.$t("Untitled Group")})},resetGroupEditState(){this.editingGroupSlug=null,this.editingGroupTitle=""},initiateEditGroupTitle(t){const e=this.menuSettings.afterCommunityLinkGroups[t];e&&(this.editingGroupSlug=e.slug,this.editingGroupTitle=e.title||"")},saveGroupTitle(t){if(this.isSaveBlocked())return;const e=this.menuSettings.afterCommunityLinkGroups[t];if(!e)return;const n=(this.editingGroupTitle||"").trim();if(!n)return this.deleteGroup(t);e.title=n,this.saveMenuItems({customSuccessMessage:this.$t("Group title updated successfully.")}).then(()=>{this.resetGroupEditState()})},deleteGroup(t){this.isSaveBlocked()||this.$confirm(this.$t("Are you sure you want to remove this group and all its links?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.menuSettings.afterCommunityLinkGroups.splice(t,1),this.saveMenuItems({customSuccessMessage:this.$t("Group deleted successfully.")})}).catch(()=>{})}},mounted(){this.fetchMenuItems()}},bht={class:"settings_router"},wht={key:0},kht={class:"fcom_card_sections"},Cht={class:"fcom_card_sections"},xht={class:"fcom_card_sections"},Sht={key:0,style:{display:"flex","align-items":"center",gap:"8px"}},$ht={key:1,style:{display:"flex","align-items":"center",gap:"8px"}},Aht={style:{margin:"0"}},Eht={style:{"margin-top":"20px","text-align":"center"}},Mht={key:1,class:"fcom_card_sections",style:{padding:"30px","text-align":"center"}},Tht={style:{margin:"0 0 15px",color:"var(--fcom-secondary-text, #6b7280)"}},Pht={key:1,class:"white_loaded"};function Iht(t,e,n,i,s,o){const r=We,a=W("menu-group-settings"),l=W("content-divider"),c=ft,u=W("action-popover"),d=Wt,h=W("layout"),f=W("app-layout");return v(),D(f,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(h,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Menu Settings")},{actions:w(()=>[_(r,{class:"fcom_primary_button",disabled:s.saving||s.loading,onClick:e[0]||(e[0]=p=>o.saveMenuItems({customSuccessMessage:t.$t("Menu settings saved successfully.")}))},{default:w(()=>[g("span",null,S(t.$t("Save Settings")),1)]),_:1},8,["disabled"])]),default:w(()=>[g("div",bht,[s.menuSettings?(v(),A("div",wht,[g("div",kht,[s.menuSettings.mainMenuItems?(v(),D(a,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:o.saveMenuItems,title:t.$t("Primary Menu Items"),menuItems:s.menuSettings.mainMenuItems,saving:s.saving},null,8,["onSave","title","menuItems","saving"])):O("",!0)]),g("div",Cht,[s.menuSettings.profileDropdownItems?(v(),D(a,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:o.saveMenuItems,title:t.$t("Profile Dropdown Items"),menuItems:s.menuSettings.profileDropdownItems,saving:s.saving},null,8,["onSave","title","menuItems","saving"])):O("",!0)]),g("div",xht,[s.menuSettings.beforeCommunityMenuItems?(v(),D(a,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:o.saveMenuItems,title:t.$t("Top Links (At Sidebar)"),menuItems:s.menuSettings.beforeCommunityMenuItems,saving:s.saving},null,8,["onSave","title","menuItems","saving"])):O("",!0)]),s.menuSettings.afterCommunityLinkGroups?(v(),A(ee,{key:0},[_(l,null,{default:w(()=>[B(S(t.$t("Sidebar Bottom Link Groups")),1)]),_:1}),s.menuSettings.afterCommunityLinkGroups.length?(v(),A(ee,{key:0},[(v(!0),A(ee,null,Ce(s.menuSettings.afterCommunityLinkGroups,(p,m)=>(v(),A("div",{class:"fcom_card_sections",key:p.slug},[_(a,{custom_svg:!0,has_svg:!1,use_icon_selector:!0,onSave:o.saveMenuItems,title:p.title||t.$t("Untitled Group"),menuItems:p.items,saving:s.saving},{title:w(()=>[s.editingGroupSlug===p.slug?(v(),A("div",Sht,[_(c,{modelValue:s.editingGroupTitle,"onUpdate:modelValue":e[1]||(e[1]=y=>s.editingGroupTitle=y),disabled:s.saving,placeholder:t.$t("Group Title"),size:"default",onKeyup:ut(y=>o.saveGroupTitle(m),["enter"])},null,8,["modelValue","disabled","placeholder","onKeyup"]),_(r,{class:"fcom_primary_button",disabled:s.saving,onClick:y=>o.saveGroupTitle(m),style:{"padding-top":"18px","padding-bottom":"18px"}},{default:w(()=>[B(S(t.$t("Save")),1)]),_:2},1032,["disabled","onClick"]),_(r,{class:"fcom_secondary_button",disabled:s.saving,style:{"margin-left":"0px","padding-top":"18px","padding-bottom":"18px"},onClick:o.resetGroupEditState},{default:w(()=>[B(S(t.$t("Cancel")),1)]),_:1},8,["disabled","onClick"])])):(v(),A("div",$ht,[g("h4",Aht,S(p.title||t.$t("Untitled Group")),1),s.saving?O("",!0):(v(),D(u,{key:0,items:[{label:t.$t("Edit Title"),action:()=>{o.initiateEditGroupTitle(m)}},{label:t.$t("Delete Group"),type:"danger",action:()=>{o.deleteGroup(m)}}]},null,8,["items"]))]))]),_:2},1032,["onSave","title","menuItems","saving"])]))),128)),g("div",Eht,[_(r,{disabled:s.saving,onClick:e[2]||(e[2]=p=>o.addFooterGroup()),class:"fcom_secondary_button"},{default:w(()=>[B(S(t.$t("Add Another Group")),1)]),_:1},8,["disabled"])])],64)):(v(),A("div",Mht,[g("p",Tht,S(t.$t("No bottom link group has been created yet. Create one to add links to the sidebar bottom.")),1),_(r,{disabled:s.saving,onClick:e[3]||(e[3]=p=>o.addFooterGroup()),class:"fcom_primary_button"},{default:w(()=>[B(S(t.$t("Add Group")),1)]),_:1},8,["disabled"])]))],64)):O("",!0)])):(v(),A("div",Pht,[_(d,{animated:!0,rows:10})]))])]),_:1},8,["title"])]),_:1})}const Lht=de(yht,[["render",Iht]]),Oht={name:"ManagerForm",props:["modelValue"],emits:["completed"],data(){return{users:[],loading:!1,form:this.modelValue||{user_id:"",roles:[]},adding:!1}},methods:{fetchUsers(t=""){this.loading=!0,this.$get("admin/users",{context:"add_manager",search:t}).then(e=>{this.users=e.users.data}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},addManager(){if(!this.form.user_id||!this.form.roles.length){this.$notify.error(this.$t("Please select a user and role"));return}this.adding=!0,this.$post("admin/managers",{user_id:this.form.user_id,roles:this.form.roles}).then(t=>{this.$notify.success(t.message),this.$emit("completed")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.adding=!1})}},mounted(){this.form.roles||(this.form.roles=[]),this.modelValue.editing_user||this.fetchUsers()}},Dht={style:{float:"left"}},Rht={style:{float:"right",color:"#8492a6","font-size":"13px"}},Vht={key:1},Fht={class:"dialog_footer"},Nht={key:0},Bht={key:1};function zht(t,e,n,i,s,o){const r=on,a=Jt,l=en,c=Ur,u=Gt,d=N4,h=We,f=sn,p=xt("loading");return v(),D(f,{onSubmit:e[3]||(e[3]=Ae(m=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:s.form,"onUpdate:modelValue":e[4]||(e[4]=m=>s.form=m),size:"large"},{default:w(()=>[s.form.editing_user?(v(),A("p",Vht,S(t.$t("Editing manager role for %s",s.form.editing_user.display_name)),1)):(v(),D(l,{key:0,label:t.$t("User")},{default:w(()=>[_(a,{class:"rich_select",filterable:"",remote:"",loading:s.loading,"remote-method":o.fetchUsers,placeholder:t.$t("Select User"),modelValue:s.form.user_id,"onUpdate:modelValue":e[0]||(e[0]=m=>s.form.user_id=m)},{default:w(()=>[(v(!0),A(ee,null,Ce(s.users,m=>(v(),D(r,{key:m.ID,label:m.display_name+" ("+m.user_email+")",value:m.ID},{default:w(()=>[g("span",Dht,S(m.display_name),1),g("span",Rht,S(m.user_email),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["loading","remote-method","placeholder","modelValue"])]),_:1},8,["label"])),_(c,{type:"info",closable:!1,class:"fcom_mb_10"},{default:w(()=>[B(S(t.$t("For course editor access, please make sure the selected user have contributor or higher user role.")),1)]),_:1}),_(l,{label:t.$t("Space Management Roles")},{default:w(()=>[_(d,{modelValue:s.form.roles,"onUpdate:modelValue":e[1]||(e[1]=m=>s.form.roles=m)},{default:w(()=>[_(u,{value:"admin",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Community Admin (All Access)")),1)]),_:1}),_(u,{disabled:s.form.roles.includes("admin"),value:"moderator",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Space Moderator")),1)]),_:1},8,["disabled"]),_(u,{disabled:s.form.roles.includes("admin"),value:"course_admin",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Course Admin")),1)]),_:1},8,["disabled"]),_(u,{disabled:s.form.roles.includes("admin")||s.form.roles.includes("course_admin"),value:"course_creator",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Course Creator")),1)]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),g("div",Fht,[le(t.$slots,"after_form",{},()=>[De((v(),D(h,{class:"fcom_primary_button",disabled:s.adding,onClick:e[2]||(e[2]=m=>o.addManager())},{default:w(()=>[s.form.editing_user?(v(),A("span",Nht,S(t.$t("Update Role")),1)):(v(),A("span",Bht,S(t.$t("Add Manager")),1))]),_:1},8,["disabled"])),[[p,s.adding]])])])]),_:3},8,["modelValue"])}const Hht=de(Oht,[["render",zht]]),Uht={name:"Avatar",props:{xprofile:{default:()=>({})},with_level:{type:Boolean,default(){return!0}},is_rounded:{type:Boolean,default(){return!0}},with_completion:{type:Boolean,default(){return!1}},is_online:{type:Boolean,default(){return!1}}},computed:{level(){if(!this.with_level||!this.has_leaderboard)return"";const t=vh(this.xprofile.total_points);return t?t.level:0},withCompletion(){var n;if(!this.with_completion||!((n=this.xprofile)!=null&&n.total_points))return!1;const t=vh(this.xprofile.total_points),e=vh(t.max_points+1);return t.level!==e.level},getOutlineStyle(){if(!this.withCompletion)return{};const t=vh(this.xprofile.total_points),e=vh(t.max_points+1),n=this.xprofile.total_points-t.min_points,i=e.min_points-t.min_points,o=n/i*100/100*360;return{backgroundImage:`conic-gradient(rgb(56, 117, 223) ${o}deg, #D9D9D9 ${o}deg)`}}},methods:{setAltImg(t){t.target.src=this.appVars.assets_url+"images/placeholder.png"}}},jht=["src"],Wht={key:1,class:"fcom_no_image"},Yht={key:0,role:"region","aria-label":"User Level",class:"fcom_user_level_mark"};function qht(t,e,n,i,s,o){return v(),A("div",{class:G([{fcom_avatar_is_rounded:n.is_rounded,is_member_online:n.is_online},"fcom_user_avatar"])},[g("span",{style:Xe(o.getOutlineStyle),class:G({fcom_compilation_avatar:o.withCompletion})},[n.xprofile?(v(),A("img",{key:0,onError:e[0]||(e[0]=(...r)=>o.setAltImg&&o.setAltImg(...r)),src:n.xprofile.avatar,alt:""},null,40,jht)):(v(),A("span",Wht))],6),o.level||n.is_online?(v(),A("div",Yht,[g("span",null,S(o.level),1)])):O("",!0)],2)}const _2=de(Uht,[["render",qht]]),Ght={name:"ModeratorSettings",components:{UserAvatar:_2,UserRouteLink:Jr,ManagerForm:Hht,Layout:fi,AppLayout:pi},data(){return{managers:[],loading:!1,paginate:{page:1,per_page:20,total:0},search:"",bulkAction:"",showModal:!1,editing_manager:{user_id:"",roles:[]}}},methods:{applyBulkAction(){this.bulkAction=""},showForm(t){this.editing_manager=t?{user_id:t.ID,roles:t.community_role.value,editing_user:t}:{user_id:"",roles:[]},this.showModal=!0},fetch(){this.loading=!0,this.$get("admin/managers",{page:this.paginate.page,per_page:this.paginate.per_page,search:this.search}).then(t=>{this.managers=t.managers.data,this.paginate.total=t.total}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},removeManager(t){this.$confirm(this.$t("Are you sure you want to remove this manager?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working=!0,this.$del("admin/managers/"+t.ID).then(e=>{this.$notify.success(e.message),this.fetch()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})})},formatRoles(t){let e=[];return this.each(t,n=>{e.push(this.$labelize(n))}),e.join(", ")}},mounted(){this.has_pro&&this.fetch(),this.changeTitle(this.$t("Moderator Settings"))}},Xht=["href"],Kht={class:"settings_router manager_section"},Zht={class:"fhr_content_layout_body"},Jht={key:0,class:"setting_body"},Qht={class:"fcom_manager_actions"},eft={class:"bulk_search"},tft=g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[g("path",{d:"M14.5833 14.584L18.3333 18.334",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M16.6667 9.16699C16.6667 5.02486 13.3088 1.66699 9.16666 1.66699C5.02453 1.66699 1.66666 5.02486 1.66666 9.16699C1.66666 13.3091 5.02453 16.667 9.16666 16.667C13.3088 16.667 16.6667 13.3091 16.6667 9.16699Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})],-1),nft={class:"fcom_manager_table"},sft={class:"user_col"},ift={class:"user_info"},oft={style:{display:"flex"}},rft={class:"user_id"},aft={class:"user_email"},lft={class:"fcom_table_action_col"},cft={key:1,class:"setting_body",style:{"text-align":"center"}},uft={class:"promo_description"},dft=["href"],hft={class:"dialog_header"},fft={class:"dialog_left"},pft=g("div",{class:"header_icon"},[g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[g("path",{d:"M11.5 11.689V13.2565C10.8212 13.0165 10.0947 12.9429 9.38155 13.0418C8.6684 13.1408 7.9894 13.4094 7.40157 13.8252C6.81375 14.2409 6.33426 14.7916 6.00337 15.4311C5.67249 16.0705 5.49986 16.78 5.5 17.5L4 17.4993C3.99977 16.5834 4.20919 15.6797 4.61222 14.8573C5.01526 14.0349 5.6012 13.3157 6.32516 12.7548C7.04912 12.1939 7.89188 11.8061 8.78887 11.6212C9.68585 11.4364 10.6132 11.4593 11.5 11.6883V11.689ZM10 10.75C7.51375 10.75 5.5 8.73625 5.5 6.25C5.5 3.76375 7.51375 1.75 10 1.75C12.4862 1.75 14.5 3.76375 14.5 6.25C14.5 8.73625 12.4862 10.75 10 10.75ZM10 9.25C11.6575 9.25 13 7.9075 13 6.25C13 4.5925 11.6575 3.25 10 3.25C8.3425 3.25 7 4.5925 7 6.25C7 7.9075 8.3425 9.25 10 9.25ZM14.5 13.75V11.5H16V13.75H18.25V15.25H16V17.5H14.5V15.25H12.25V13.75H14.5Z",fill:"currentColor"})])],-1),mft={class:"dialog_body"};function gft(t,e,n,i,s,o){const r=W("Plus"),a=be,l=We,c=ft,u=L4,d=W("user-route-link"),h=Xr,f=Gr,p=W("layout"),m=W("app-layout"),y=W("manager-form"),b=Ss,k=xt("loading");return v(),A(ee,null,[_(m,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(p,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Community Managers")},{actions:w(()=>[t.has_pro?(v(),D(l,{key:0,class:"fcom_primary_button",onClick:e[0]||(e[0]=C=>o.showForm(null))},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,S(t.$t("Add Manager")),1)]),_:1})):(v(),A("a",{key:1,target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_moderators"),class:"el-button el-button--danger"},S(t.$t("Upgrade to Pro")),9,Xht))]),default:w(()=>[g("div",Kht,[g("div",Zht,[t.has_pro?(v(),A("div",Jht,[g("div",Qht,[g("div",eft,[_(c,{modelValue:s.search,"onUpdate:modelValue":e[1]||(e[1]=C=>s.search=C),onKeydown:ut(o.fetch,["enter"]),placeholder:t.$t("Search"),class:"el-input-round"},{prefix:w(()=>[tft]),_:1},8,["modelValue","onKeydown","placeholder"])])]),g("div",nft,[De((v(),D(f,{data:s.managers,"empty-text":t.$t("No Managers Found")},{default:w(()=>[_(h,{label:t.$t("Members"),sortable:"","min-width":"160"},{default:w(C=>[g("div",sft,[_(u,{src:C.row.xprofile.avatar},null,8,["src"]),g("div",ift,[g("div",oft,[_(d,{xprofile:C.row.xprofile},null,8,["xprofile"]),g("span",rft,"#"+S(C.row.ID),1)]),g("span",aft,S(C.row.user_email),1)])])]),_:1},8,["label"]),_(h,{label:t.$t("Role"),sortable:""},{default:w(C=>[g("span",null,S(o.formatRoles(C.row.community_role.value)),1)]),_:1},8,["label"]),_(h,null,{default:w(C=>[g("div",lft,[_(l,{onClick:$=>o.showForm(C.row),size:"small"},{default:w(()=>[B(S(t.$t("Edit")),1)]),_:2},1032,["onClick"]),_(l,{onClick:$=>o.removeManager(C.row),type:"danger",plain:"",size:"small"},{default:w(()=>[B(S(t.$t("Remove")),1)]),_:2},1032,["onClick"])])]),_:1})]),_:1},8,["data","empty-text"])),[[k,s.loading]])])])):(v(),A("div",cft,[g("p",uft,S(t.$t("__MODERATOR_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_moderators"),class:"el-button el-button--danger"},S(t.$t("Upgrade to Pro")),9,dft)]))])])]),_:1},8,["title"])]),_:1}),_(b,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:s.showModal,"onUpdate:modelValue":e[4]||(e[4]=C=>s.showModal=C),direction:"rtl"},{header:w(({close:C})=>[g("div",hft,[g("div",fft,[pft,g("div",null,[g("h4",null,S(t.$t(s.editing_manager.editing_user?"Update Role":"Add Manager")),1),g("p",null,S(t.$t("you can edit your role here")),1)])])])]),default:w(()=>[g("div",mft,[s.showModal?(v(),D(y,{key:0,onCompleted:e[2]||(e[2]=()=>{o.fetch(),s.showModal=!1}),modelValue:s.editing_manager,"onUpdate:modelValue":e[3]||(e[3]=C=>s.editing_manager=C)},null,8,["modelValue"])):O("",!0)])]),_:1},8,["width","modelValue"])],64)}const vft=de(Ght,[["render",gft]]),_ft={name:"NestedReplyBox",mixins:[g2],components:{SingleComment:v2,FeedTextComposer:X1,CommentReactions:CH,HeartIcon:p2},props:["comment","feed","checkPermission","show_reacts_only","defaultMentions","is_modal"],emits:["commented","copyLink"],data(){return{open:!1,composerOpen:!1,replyingToId:null,autofocusInput:!1,focusTick:0,composerKey:0,commentReply:{message:"",media_images:[]},submitting:!1}},computed:{canComment(){return this.hasCommentPermission(this.feed)||!this.checkPermission}},methods:{maybeSave(t){(t.metaKey||t.ctrlKey)&&t.keyCode===13&&this.addComment()},addComment(){var e,n,i;const t=((e=this.commentReply.media_images)==null?void 0:e.length)>0||((i=(n=this.commentReply.meta)==null?void 0:n.media_preview)==null?void 0:i.image);!this.commentReply.message&&!t||!this.comment.id||(this.submitting=!0,this.$post("feeds/"+this.feed.id+"/comments",{comment:this.commentReply.message,parent_id:this.comment.id,media_images:this.commentReply.media_images,meta:this.commentReply.meta}).then(s=>{var o;this.comment.comments||(this.comment.comments=[]),this.commentReply={message:"",media_images:[]},(o=this.$refs.composer)==null||o.clearContent(),this.comment.comments.push(s.comment),Array.isArray(this.feed.comments)&&this.feed.comments.push(s.comment),this.$emit("commented",s.comment),this.$eventBus.emit("recent_activities_refresh"),this.feed.comments_count=parseInt(this.feed.comments_count)+1,this.$nextTick(()=>{this.scrollCommentIntoView(s.comment.id,this.comment.id)})}).catch(s=>{this.$handleError(s)}).finally(()=>{this.submitting=!1}))},toggleCommentBox(t,e=!0){var r;if(!this.hasCommentPermission(this.feed)){this.$notify({message:this.$t("Please join the Space to post a comment."),type:"warning"});return}const n=t==null?void 0:t.id,i=(r=t==null?void 0:t.xprofile)==null?void 0:r.username,s=e&&i&&t.user_id!=this.auth.user_id?i:"";if(!e){this.open=this.composerOpen=!this.open,this.replyingToId=null,this.autofocusInput=!1;return}if(this.composerOpen&&this.replyingToId===n){this.composerOpen=!1;return}const o=this.composerOpen;this.replyingToId=n,this.open=this.composerOpen=this.autofocusInput=!0,this.isComposerEmpty()?(this.commentReply.message=s?`@${s} `:"",o&&this.composerKey++):this.focusTick++},isComposerEmpty(){return!(this.commentReply.message||"").replace(/&#x20;|\u00A0/gi,"").trim()},handleCommentDelete(t){const e=this.comment.comments[t];this.comment.comments.splice(t,1),e!=null&&e.id&&Array.isArray(this.feed.comments)&&(this.feed.comments=this.feed.comments.filter(n=>n.id!==e.id)),this.feed.comments_count--},toggleLike(t){let e=!t.liked;this.$post("feeds/"+this.feed.id+"/comments/"+t.id+"/reactions",{state:e?1:0}).then(n=>{t.liked=n.liked,t.reactions_count=n.reactions_count}).catch(n=>{this.$handleError(n)})},emitCopyLink(t){this.$emit("copyLink",t)}}},yft={key:0,class:"reply_box"},bft=["aria-expanded"],wft={class:"fcom_comments_react fcom_reaction_list"},kft={class:"child_comments"},Cft=["id"],xft={key:0,class:"reply_box"},Sft=["onClick","aria-expanded"],$ft={class:"fcom_comments_react fcom_reaction_list"},Aft={key:0,class:"child_reply_wrap"},Eft={class:"feed_commenting"},Mft={class:"person_avatar"},Tft=["alt","src"];function Pft(t,e,n,i,s,o){var h;const r=W("HeartIcon"),a=be,l=W("CommentReactions"),c=W("single-comment"),u=We,d=W("feed-text-composer");return v(),A(ee,null,[o.canComment?(v(),A("div",yft,[((h=n.feed.meta)==null?void 0:h.comments_disabled)!=="yes"?(v(),A("button",{key:0,type:"button",onClick:e[0]||(e[0]=f=>o.toggleCommentBox(n.comment)),class:"reply_btn","aria-expanded":s.composerOpen&&s.replyingToId===n.comment.id},S(t.$t("Reply")),9,bft)):O("",!0),g("span",{class:G([{fcom_is_liked:n.comment.liked},"reply_btn"])},[g("div",wft,[_(a,{role:"button",tabindex:"0","aria-label":t.$t("React"),"aria-pressed":!!n.comment.liked,class:G({user_reacted:n.comment.liked}),onClick:e[1]||(e[1]=f=>o.toggleLike(n.comment)),onKeydown:[e[2]||(e[2]=ut(Ae(f=>o.toggleLike(n.comment),["prevent"]),["enter"])),e[3]||(e[3]=ut(Ae(f=>o.toggleLike(n.comment),["prevent"]),["space"]))]},{default:w(()=>[_(r,{filled:n.comment.liked},null,8,["filled"])]),_:1},8,["aria-label","aria-pressed","class"]),parseInt(n.comment.reactions_count)?(v(),D(l,{key:0,comment:n.comment},null,8,["comment"])):O("",!0)])],2),le(t.$slots,"after_reply_box_text",{toggleOpen:()=>o.toggleCommentBox(n.comment,!1),open:s.open})])):O("",!0),!n.show_reacts_only||s.open?(v(),A(ee,{key:1},[g("div",kft,[(v(!0),A(ee,null,Ce(n.comment.comments,(f,p)=>(v(),A("div",{id:"comment_"+f.id,class:"each_comment"},[_(c,{onCopyLink:o.emitCopyLink,onDeleted:m=>o.handleCommentDelete(p),comment:f,show_report:!0},{after_comment_text:w(()=>{var m;return[o.canComment?(v(),A("div",xft,[((m=n.feed.meta)==null?void 0:m.comments_disabled)!=="yes"?(v(),A("button",{key:0,type:"button",onClick:y=>o.toggleCommentBox(f),class:"reply_btn","aria-expanded":s.composerOpen&&s.replyingToId===f.id},S(t.$t("Reply")),9,Sft)):O("",!0),g("span",{class:G([{fcom_is_liked:f.liked},"reply_btn"])},[g("div",$ft,[_(a,{role:"button",tabindex:"0","aria-label":t.$t("React"),"aria-pressed":!!f.liked,class:G({user_reacted:f.liked}),onClick:y=>o.toggleLike(f),onKeydown:[ut(Ae(y=>o.toggleLike(f),["prevent"]),["enter"]),ut(Ae(y=>o.toggleLike(f),["prevent"]),["space"])]},{default:w(()=>[_(r,{filled:f.liked},null,8,["filled"])]),_:2},1032,["aria-label","aria-pressed","class","onClick","onKeydown"]),parseInt(f.reactions_count)?(v(),D(l,{key:0,comment:f},null,8,["comment"])):O("",!0)])],2)])):O("",!0)]}),_:2},1032,["onCopyLink","onDeleted","comment"])],8,Cft))),256))]),s.composerOpen?(v(),A("div",Aft,[g("div",Eft,[g("div",Mft,[g("img",{alt:t.$t("Your Photo"),src:t.auth.avatar},null,8,Tft)]),g("div",{onKeydown:e[5]||(e[5]=ut((...f)=>o.maybeSave&&o.maybeSave(...f),["enter"])),class:"feed_comment_input comment_text"},[(v(),D(d,{ref:"composer",key:s.composerKey,config:{multipleMedia:!0},context:"comment",is_modal:n.is_modal,defaultMentions:n.defaultMentions?n.defaultMentions:[],disabled:s.submitting,autofocus:s.autofocusInput,autofocus_changed:s.focusTick,mentionQuery:{space_id:n.feed.space_id},content:s.commentReply,placeholder:t.$t("Leave a reply")},{default:w(()=>[_(u,{loading:s.submitting,disabled:s.submitting,onClick:e[4]||(e[4]=f=>o.addComment()),class:"fcom_primary_button"},{default:w(()=>[B(S(t.$t("Reply")),1)]),_:1},8,["loading","disabled"])]),_:1},8,["is_modal","defaultMentions","disabled","autofocus","autofocus_changed","mentionQuery","content","placeholder"]))],32)])])):O("",!0)],64)):O("",!0)],64)}const Ift=de(_ft,[["render",Pft]]),Lft={name:"FeedComments",components:{SingleComment:v2,NestedReplyBox:Ift},props:["feed","show_all","checkPermission","defaultMentions","sortBy","is_single","is_modal"],emits:["forceShowAll"],created(){this._lastSortBy=null,this._sortedTopLevelIds=null},data(){return{loading:!1}},computed:{_displayData(){const t=this.feed.comments;if(!t||!t.length)return{list:[],lastComment:null};const e={},n=[],i={};let s=null;for(let l=0;l<t.length;l++){const c=t[l];!s&&c.is_sticky&&(s=c),c.parent_id?(e[c.parent_id]||(e[c.parent_id]=[]),e[c.parent_id].push(c)):(n.push(c.id),i[c.id]=c)}for(const l of n)i[l].comments=e[l]||void 0;if(s&&i[s.id]){s=i[s.id];const l=n.indexOf(s.id);l!==-1&&n.splice(l,1),delete i[s.id]}const o=s||(n.length?i[n[n.length-1]]:null);if(!n.length&&!s)return{list:[],lastComment:null};const r=this.sortBy;if(this._lastSortBy!==r){let l=[...n];r==="oldest"||!r?l.sort((c,u)=>c-u):r==="latest"?l.sort((c,u)=>u-c):r==="popular"?l.sort((c,u)=>{var d,h;return(((d=i[u])==null?void 0:d.reactions_count)||0)-(((h=i[c])==null?void 0:h.reactions_count)||0)}):r==="most_replied"&&l.sort((c,u)=>{var d,h;return(((d=e[u])==null?void 0:d.length)||0)-(((h=e[c])==null?void 0:h.length)||0)}),this._sortedTopLevelIds=l,this._lastSortBy=r}let a;if(this._sortedTopLevelIds){const l=new Set(n),c=new Set(this._sortedTopLevelIds);a=this._sortedTopLevelIds.filter(u=>l.has(u)&&i[u]).map(u=>i[u]);for(let u=n.length-1;u>=0;u--)c.has(n[u])||a.unshift(i[n[u]])}else a=n.map(l=>i[l]);return s&&a.unshift(s),{list:a,lastComment:o}},displayComments(){return this._displayData.list},lastComment(){return this._displayData.lastComment}},methods:{fetchComments(){this.loading=!0,this.$get("feeds/"+this.feed.id+"/comments").then(t=>{this.feed.comments=t.comments}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},collectCommentIds(t){var i;const e=new Set([t.id]),n=t.comments?[...t.comments]:[];for(;n.length;){const s=n.pop();e.add(s.id),(i=s.comments)!=null&&i.length&&n.push(...s.comments)}return e},handleCommentDelete(t){const e=this.collectCommentIds(t);this.feed.comments=this.feed.comments.filter(n=>!e.has(n.id)),this.feed.comments_count-=e.size},handleStickyCommentDelete(){this.feed.sticky_comment=null,this.feed.comments_count--},copyCommentLink(t){let e={name:"single_feed",params:{feed_slug:this.feed.slug},query:{comment_id:t.id}};this.feed.course_id&&(e={name:"view_lesson",params:{lesson_slug:this.feed.slug},query:{comment_id:t.id}});let n=this.$router.resolve(e),i=this.appVars.urls.portal_base;i=i.replace(/\/$/,"");let s=i+n.fullPath;navigator.clipboard.writeText(s).then(()=>{this.$notify.success(this.$t("Link copied to clipboard"))}).catch(o=>{this.$notify.error(this.$t("Failed to copy the link"))})},maybeShowAllComments(){if(this.is_single||!this.hasFeature("show_post_modal")){this.$emit("forceShowAll");return}this.$eventBus.emit("showFeedModal",{feed:this.feed,view:"comments"})}},mounted(){!this.feed.comments&&this.feed.comments_count&&this.fetchComments()}},Oft={key:0,class:"feed_comments"},Dft=["id"],Rft={key:1,class:"feed_comments"},Vft=["id"],Fft=["onClick","aria-expanded"];function Nft(t,e,n,i,s,o){const r=Wt,a=W("nested-reply-box"),l=W("single-comment");return n.show_all?(v(),A("div",Oft,[s.loading?(v(),D(r,{key:0,row:5,class:"feed_comments_skeleton"})):(v(),A(ee,{key:1},[le(t.$slots,"before_comments_start"),(v(!0),A(ee,null,Ce(o.displayComments,(c,u)=>(v(),A("div",{class:"each_comment",key:c.id,id:"comment_"+c.id},[_(l,{comment:c,space_id:n.feed.space_id,show_report:!0,onCopyLink:o.copyCommentLink,onReload:o.fetchComments,onDeleted:d=>o.handleCommentDelete(c)},cs({_:2},[c.parent_id?void 0:{name:"after_comment_text",fn:w(()=>[_(a,{feed:n.feed,comment:c,checkPermission:n.checkPermission,defaultMentions:n.defaultMentions?n.defaultMentions:[],is_modal:n.is_modal,onCopyLink:o.copyCommentLink},null,8,["feed","comment","checkPermission","defaultMentions","is_modal","onCopyLink"])]),key:"0"}]),1032,["comment","space_id","onCopyLink","onReload","onDeleted"])],8,Dft))),128))],64))])):o.lastComment?(v(),A("div",Rft,[g("div",{class:"each_comment",id:"comment_"+o.lastComment.id},[_(l,{comment:o.lastComment,space_id:n.feed.space_id,show_report:!0,onCopyLink:o.copyCommentLink,onDeleted:e[0]||(e[0]=c=>o.handleCommentDelete(o.lastComment))},cs({_:2},[o.lastComment.parent_id?void 0:{name:"after_comment_text",fn:w(()=>[_(a,{defaultMentions:n.defaultMentions?n.defaultMentions:[],onCopyLink:o.copyCommentLink,show_reacts_only:!0,checkPermission:n.checkPermission,feed:n.feed,comment:o.lastComment,is_modal:n.is_modal},{after_reply_box_text:w(({toggleOpen:c,open:u})=>[o.lastComment.comments&&o.lastComment.comments.length?(v(),A("button",{key:0,type:"button",onClick:d=>c(),class:"reply_btn last_comment_reply_txt","aria-expanded":u},S(t.$_n("%d reply","%d replies",o.lastComment.comments.length)),9,Fft)):O("",!0)]),_:1},8,["defaultMentions","onCopyLink","checkPermission","feed","comment","is_modal"])]),key:"0"}]),1032,["comment","space_id","onCopyLink"])],8,Vft),n.feed.comments_count>1?(v(),A("div",{key:0,onClick:e[1]||(e[1]=c=>o.maybeShowAllComments()),class:"each_comment show_all_comments"},S(t.$t("View more comments")),1)):O("",!0)])):O("",!0)}const Bft=de(Lft,[["render",Nft]]),zft={name:"ReactedUsers",components:{UserRouteLink:Jr},data(){return{centerDialogVisible:!1,reactions:null,loading:!1}},props:{feed:{type:Object,required:!0,default:()=>({})}},computed:{reactedProfiles(){let t=[],e=this.auth.user_id;return this.feed.has_user_react&&t.push({user_id:e,avatar:this.auth.avatar}),this.each(this.feed.reactions,n=>{n.user_id!=e&&n.xprofile&&t.push({user_id:n.user_id,avatar:n.xprofile.avatar})}),t.slice(0,3)}},methods:{getReactions(){this.reactions&&this.reactions.length===this.feed.reactions_count||(this.loading=!0,this.$get("feeds/"+this.feed.id+"/reactions").then(t=>{this.reactions=t.reactions,t.current_user_follows&&this.setFollowIds(t.current_user_follows),this.$nextTick(()=>{var e,n,i,s;(s=(i=(n=(e=this.$refs.reactedPopover)==null?void 0:e.popperRef)==null?void 0:n.popperInstanceRef)==null?void 0:i.update)==null||s.call(i)})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1}))}}},Hft=["title"],Uft={key:0,class:"reactions_avatars"},jft=["alt","src"],Wft={key:0},Yft={key:1},qft={class:"fcom_user_lists"},Gft={key:2};function Xft(t,e,n,i,s,o){const r=Wt,a=W("UserAvatar"),l=W("UserRouteLink"),c=Ai,u=No;return v(),D(u,{ref:"reactedPopover",persistent:!1,"popper-class":"fcom_feed_reacted_user_list",placement:"bottom",title:t.$t("Likes"),width:210,trigger:"click",onShow:o.getReactions},{reference:w(()=>[g("div",{title:t.$t("Click to view"),class:"fcom_reactions"},[o.reactedProfiles&&o.reactedProfiles.length?(v(),A("div",Uft,[(v(!0),A(ee,null,Ce(o.reactedProfiles,d=>(v(),A("span",{key:d.id,class:"fcom_reaction_avatar fcom_avatar_is_rounded fcom_user_avatar"},[d!=null&&d.avatar?(v(),A("img",{key:0,alt:t.$t("Reacted Users"),src:d.avatar},null,8,jft)):O("",!0)]))),128))])):O("",!0),g("span",null,S(t.$_n("%s like","%s likes",n.feed.reactions_count)),1)],8,Hft)]),default:w(()=>[s.loading?(v(),A("div",Wft,[_(r,{animated:!0,rows:3})])):s.reactions?(v(),A("div",Yft,[_(c,{"max-height":"300px"},{default:w(()=>[g("ul",qft,[(v(!0),A(ee,null,Ce(s.reactions,d=>(v(),A("li",null,[d.xprofile?(v(),A(ee,{key:0},[_(a,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"]),_(l,{show_badge:!0,xprofile:d.xprofile,show_follow:!0},null,8,["xprofile"])],64)):O("",!0)]))),256))])]),_:1})])):(v(),A("div",Gft,[g("p",null,S(t.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const Kft=de(zft,[["render",Xft]]);function Zft(){this.__data__=[],this.size=0}var Jft=Zft;function Qft(t,e){return t===e||t!==t&&e!==e}var RH=Qft,ept=RH;function tpt(t,e){for(var n=t.length;n--;)if(ept(t[n][0],e))return n;return-1}var y2=tpt,npt=y2,spt=Array.prototype,ipt=spt.splice;function opt(t){var e=this.__data__,n=npt(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():ipt.call(e,n,1),--this.size,!0}var rpt=opt,apt=y2;function lpt(t){var e=this.__data__,n=apt(e,t);return n<0?void 0:e[n][1]}var cpt=lpt,upt=y2;function dpt(t){return upt(this.__data__,t)>-1}var hpt=dpt,fpt=y2;function ppt(t,e){var n=this.__data__,i=fpt(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}var mpt=ppt,gpt=Jft,vpt=rpt,_pt=cpt,ypt=hpt,bpt=mpt;function vp(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}vp.prototype.clear=gpt;vp.prototype.delete=vpt;vp.prototype.get=_pt;vp.prototype.has=ypt;vp.prototype.set=bpt;var b2=vp,wpt=b2;function kpt(){this.__data__=new wpt,this.size=0}var Cpt=kpt;function xpt(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var Spt=xpt;function $pt(t){return this.__data__.get(t)}var Apt=$pt;function Ept(t){return this.__data__.has(t)}var Mpt=Ept,Tpt=pp,Ppt=Tpt(Object,"create"),w2=Ppt,HM=w2;function Ipt(){this.__data__=HM?HM(null):{},this.size=0}var Lpt=Ipt;function Opt(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Dpt=Opt,Rpt=w2,Vpt="__lodash_hash_undefined__",Fpt=Object.prototype,Npt=Fpt.hasOwnProperty;function Bpt(t){var e=this.__data__;if(Rpt){var n=e[t];return n===Vpt?void 0:n}return Npt.call(e,t)?e[t]:void 0}var zpt=Bpt,Hpt=w2,Upt=Object.prototype,jpt=Upt.hasOwnProperty;function Wpt(t){var e=this.__data__;return Hpt?e[t]!==void 0:jpt.call(e,t)}var Ypt=Wpt,qpt=w2,Gpt="__lodash_hash_undefined__";function Xpt(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=qpt&&e===void 0?Gpt:e,this}var Kpt=Xpt,Zpt=Lpt,Jpt=Dpt,Qpt=zpt,emt=Ypt,tmt=Kpt;function _p(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}_p.prototype.clear=Zpt;_p.prototype.delete=Jpt;_p.prototype.get=Qpt;_p.prototype.has=emt;_p.prototype.set=tmt;var nmt=_p,UM=nmt,smt=b2,imt=tS;function omt(){this.size=0,this.__data__={hash:new UM,map:new(imt||smt),string:new UM}}var rmt=omt;function amt(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var lmt=amt,cmt=lmt;function umt(t,e){var n=t.__data__;return cmt(e)?n[typeof e=="string"?"string":"hash"]:n.map}var k2=umt,dmt=k2;function hmt(t){var e=dmt(this,t).delete(t);return this.size-=e?1:0,e}var fmt=hmt,pmt=k2;function mmt(t){return pmt(this,t).get(t)}var gmt=mmt,vmt=k2;function _mt(t){return vmt(this,t).has(t)}var ymt=_mt,bmt=k2;function wmt(t,e){var n=bmt(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}var kmt=wmt,Cmt=rmt,xmt=fmt,Smt=gmt,$mt=ymt,Amt=kmt;function yp(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}yp.prototype.clear=Cmt;yp.prototype.delete=xmt;yp.prototype.get=Smt;yp.prototype.has=$mt;yp.prototype.set=Amt;var iS=yp,Emt=b2,Mmt=tS,Tmt=iS,Pmt=200;function Imt(t,e){var n=this.__data__;if(n instanceof Emt){var i=n.__data__;if(!Mmt||i.length<Pmt-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Tmt(i)}return n.set(t,e),this.size=n.size,this}var Lmt=Imt,Omt=b2,Dmt=Cpt,Rmt=Spt,Vmt=Apt,Fmt=Mpt,Nmt=Lmt;function bp(t){var e=this.__data__=new Omt(t);this.size=e.size}bp.prototype.clear=Dmt;bp.prototype.delete=Rmt;bp.prototype.get=Vmt;bp.prototype.has=Fmt;bp.prototype.set=Nmt;var VH=bp,Bmt="__lodash_hash_undefined__";function zmt(t){return this.__data__.set(t,Bmt),this}var Hmt=zmt;function Umt(t){return this.__data__.has(t)}var jmt=Umt,Wmt=iS,Ymt=Hmt,qmt=jmt;function Py(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Wmt;++e<n;)this.add(t[e])}Py.prototype.add=Py.prototype.push=Ymt;Py.prototype.has=qmt;var FH=Py;function Gmt(t,e){for(var n=-1,i=t==null?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}var Xmt=Gmt;function Kmt(t,e){return t.has(e)}var NH=Kmt,Zmt=FH,Jmt=Xmt,Qmt=NH,egt=1,tgt=2;function ngt(t,e,n,i,s,o){var r=n&egt,a=t.length,l=e.length;if(a!=l&&!(r&&l>a))return!1;var c=o.get(t),u=o.get(e);if(c&&u)return c==e&&u==t;var d=-1,h=!0,f=n&tgt?new Zmt:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var p=t[d],m=e[d];if(i)var y=r?i(m,p,d,e,t,o):i(p,m,d,t,e,o);if(y!==void 0){if(y)continue;h=!1;break}if(f){if(!Jmt(e,function(b,k){if(!Qmt(f,k)&&(p===b||s(p,b,n,i,o)))return f.push(k)})){h=!1;break}}else if(!(p===m||s(p,m,n,i,o))){h=!1;break}}return o.delete(t),o.delete(e),h}var BH=ngt,sgt=Ma,igt=sgt.Uint8Array,ogt=igt;function rgt(t){var e=-1,n=Array(t.size);return t.forEach(function(i,s){n[++e]=[s,i]}),n}var agt=rgt;function lgt(t){var e=-1,n=Array(t.size);return t.forEach(function(i){n[++e]=i}),n}var oS=lgt,jM=Fb,WM=ogt,cgt=RH,ugt=BH,dgt=agt,hgt=oS,fgt=1,pgt=2,mgt="[object Boolean]",ggt="[object Date]",vgt="[object Error]",_gt="[object Map]",ygt="[object Number]",bgt="[object RegExp]",wgt="[object Set]",kgt="[object String]",Cgt="[object Symbol]",xgt="[object ArrayBuffer]",Sgt="[object DataView]",YM=jM?jM.prototype:void 0,d3=YM?YM.valueOf:void 0;function $gt(t,e,n,i,s,o,r){switch(n){case Sgt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case xgt:return!(t.byteLength!=e.byteLength||!o(new WM(t),new WM(e)));case mgt:case ggt:case ygt:return cgt(+t,+e);case vgt:return t.name==e.name&&t.message==e.message;case bgt:case kgt:return t==e+"";case _gt:var a=dgt;case wgt:var l=i&fgt;if(a||(a=hgt),t.size!=e.size&&!l)return!1;var c=r.get(t);if(c)return c==e;i|=pgt,r.set(t,e);var u=ugt(a(t),a(e),i,s,o,r);return r.delete(t),u;case Cgt:if(d3)return d3.call(t)==d3.call(e)}return!1}var Agt=$gt;function Egt(t,e){for(var n=-1,i=e.length,s=t.length;++n<i;)t[s+n]=e[n];return t}var Mgt=Egt,Tgt=Mgt,Pgt=Ta;function Igt(t,e,n){var i=e(t);return Pgt(t)?i:Tgt(i,n(t))}var Lgt=Igt;function Ogt(t,e){for(var n=-1,i=t==null?0:t.length,s=0,o=[];++n<i;){var r=t[n];e(r,n,t)&&(o[s++]=r)}return o}var Dgt=Ogt;function Rgt(){return[]}var Vgt=Rgt,Fgt=Dgt,Ngt=Vgt,Bgt=Object.prototype,zgt=Bgt.propertyIsEnumerable,qM=Object.getOwnPropertySymbols,Hgt=qM?function(t){return t==null?[]:(t=Object(t),Fgt(qM(t),function(e){return zgt.call(t,e)}))}:Ngt,Ugt=Hgt,jgt=Lgt,Wgt=Ugt,Ygt=c8;function qgt(t){return jgt(t,Ygt,Wgt)}var Ggt=qgt,GM=Ggt,Xgt=1,Kgt=Object.prototype,Zgt=Kgt.hasOwnProperty;function Jgt(t,e,n,i,s,o){var r=n&Xgt,a=GM(t),l=a.length,c=GM(e),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in e:Zgt.call(e,h)))return!1}var f=o.get(t),p=o.get(e);if(f&&p)return f==e&&p==t;var m=!0;o.set(t,e),o.set(e,t);for(var y=r;++d<l;){h=a[d];var b=t[h],k=e[h];if(i)var C=r?i(k,b,h,e,t,o):i(b,k,h,t,e,o);if(!(C===void 0?b===k||s(b,k,n,i,o):C)){m=!1;break}y||(y=h=="constructor")}if(m&&!y){var $=t.constructor,x=e.constructor;$!=x&&"constructor"in t&&"constructor"in e&&!(typeof $=="function"&&$ instanceof $&&typeof x=="function"&&x instanceof x)&&(m=!1)}return o.delete(t),o.delete(e),m}var Qgt=Jgt,h3=VH,e1t=BH,t1t=Agt,n1t=Qgt,XM=hH,KM=Ta,ZM=o8,s1t=a8,i1t=1,JM="[object Arguments]",QM="[object Array]",Jv="[object Object]",o1t=Object.prototype,eT=o1t.hasOwnProperty;function r1t(t,e,n,i,s,o){var r=KM(t),a=KM(e),l=r?QM:XM(t),c=a?QM:XM(e);l=l==JM?Jv:l,c=c==JM?Jv:c;var u=l==Jv,d=c==Jv,h=l==c;if(h&&ZM(t)){if(!ZM(e))return!1;r=!0,u=!1}if(h&&!u)return o||(o=new h3),r||s1t(t)?e1t(t,e,n,i,s,o):t1t(t,e,l,n,i,s,o);if(!(n&i1t)){var f=u&&eT.call(t,"__wrapped__"),p=d&&eT.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,y=p?e.value():e;return o||(o=new h3),s(m,y,n,i,o)}}return h?(o||(o=new h3),n1t(t,e,n,i,s,o)):!1}var a1t=r1t,l1t=a1t,tT=T1;function zH(t,e,n,i,s){return t===e?!0:t==null||e==null||!tT(t)&&!tT(e)?t!==t&&e!==e:l1t(t,e,n,i,zH,s)}var HH=zH,c1t=VH,u1t=HH,d1t=1,h1t=2;function f1t(t,e,n,i){var s=n.length,o=s,r=!i;if(t==null)return!o;for(t=Object(t);s--;){var a=n[s];if(r&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++s<o;){a=n[s];var l=a[0],c=t[l],u=a[1];if(r&&a[2]){if(c===void 0&&!(l in t))return!1}else{var d=new c1t;if(i)var h=i(c,u,l,t,e,d);if(!(h===void 0?u1t(u,c,d1t|h1t,i,d):h))return!1}}return!0}var p1t=f1t,m1t=P1;function g1t(t){return t===t&&!m1t(t)}var UH=g1t,v1t=UH,_1t=c8;function y1t(t){for(var e=_1t(t),n=e.length;n--;){var i=e[n],s=t[i];e[n]=[i,s,v1t(s)]}return e}var b1t=y1t;function w1t(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var jH=w1t,k1t=p1t,C1t=b1t,x1t=jH;function S1t(t){var e=C1t(t);return e.length==1&&e[0][2]?x1t(e[0][0],e[0][1]):function(n){return n===t||k1t(n,t,e)}}var $1t=S1t,A1t=Ta,E1t=m2,M1t=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,T1t=/^\w*$/;function P1t(t,e){if(A1t(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||E1t(t)?!0:T1t.test(t)||!M1t.test(t)||e!=null&&t in Object(e)}var rS=P1t,WH=iS,I1t="Expected a function";function aS(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(I1t);var n=function(){var i=arguments,s=e?e.apply(this,i):i[0],o=n.cache;if(o.has(s))return o.get(s);var r=t.apply(this,i);return n.cache=o.set(s,r)||o,r};return n.cache=new(aS.Cache||WH),n}aS.Cache=WH;var L1t=aS,O1t=L1t,D1t=500;function R1t(t){var e=O1t(t,function(i){return n.size===D1t&&n.clear(),i}),n=e.cache;return e}var V1t=R1t,F1t=V1t,N1t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,B1t=/\\(\\)?/g,z1t=F1t(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(N1t,function(n,i,s,o){e.push(s?o.replace(B1t,"$1"):i||n)}),e}),H1t=z1t;function U1t(t,e){for(var n=-1,i=t==null?0:t.length,s=Array(i);++n<i;)s[n]=e(t[n],n,t);return s}var j1t=U1t,nT=Fb,W1t=j1t,Y1t=Ta,q1t=m2,G1t=1/0,sT=nT?nT.prototype:void 0,iT=sT?sT.toString:void 0;function YH(t){if(typeof t=="string")return t;if(Y1t(t))return W1t(t,YH)+"";if(q1t(t))return iT?iT.call(t):"";var e=t+"";return e=="0"&&1/t==-G1t?"-0":e}var X1t=YH,K1t=X1t;function Z1t(t){return t==null?"":K1t(t)}var J1t=Z1t,Q1t=Ta,evt=rS,tvt=H1t,nvt=J1t;function svt(t,e){return Q1t(t)?t:evt(t,e)?[t]:tvt(nvt(t))}var qH=svt,ivt=m2,ovt=1/0;function rvt(t){if(typeof t=="string"||ivt(t))return t;var e=t+"";return e=="0"&&1/t==-ovt?"-0":e}var C2=rvt,avt=qH,lvt=C2;function cvt(t,e){e=avt(e,t);for(var n=0,i=e.length;t!=null&&n<i;)t=t[lvt(e[n++])];return n&&n==i?t:void 0}var GH=cvt,uvt=GH;function dvt(t,e,n){var i=t==null?void 0:uvt(t,e);return i===void 0?n:i}var hvt=dvt;function fvt(t,e){return t!=null&&e in Object(t)}var pvt=fvt,mvt=qH,gvt=i8,vvt=Ta,_vt=NV,yvt=r8,bvt=C2;function wvt(t,e,n){e=mvt(e,t);for(var i=-1,s=e.length,o=!1;++i<s;){var r=bvt(e[i]);if(!(o=t!=null&&n(t,r)))break;t=t[r]}return o||++i!=s?o:(s=t==null?0:t.length,!!s&&yvt(s)&&_vt(r,s)&&(vvt(t)||gvt(t)))}var kvt=wvt,Cvt=pvt,xvt=kvt;function Svt(t,e){return t!=null&&xvt(t,e,Cvt)}var $vt=Svt,Avt=HH,Evt=hvt,Mvt=$vt,Tvt=rS,Pvt=UH,Ivt=jH,Lvt=C2,Ovt=1,Dvt=2;function Rvt(t,e){return Tvt(t)&&Pvt(e)?Ivt(Lvt(t),e):function(n){var i=Evt(n,t);return i===void 0&&i===e?Mvt(n,t):Avt(e,i,Ovt|Dvt)}}var Vvt=Rvt;function Fvt(t){return function(e){return e==null?void 0:e[t]}}var Nvt=Fvt,Bvt=GH;function zvt(t){return function(e){return Bvt(e,t)}}var Hvt=zvt,Uvt=Nvt,jvt=Hvt,Wvt=rS,Yvt=C2;function qvt(t){return Wvt(t)?Uvt(Yvt(t)):jvt(t)}var Gvt=qvt,Xvt=$1t,Kvt=Vvt,Zvt=UV,Jvt=Ta,Qvt=Gvt;function e0t(t){return typeof t=="function"?t:t==null?Zvt:typeof t=="object"?Jvt(t)?Kvt(t[0],t[1]):Xvt(t):Qvt(t)}var t0t=e0t;function n0t(t,e,n,i){for(var s=t.length,o=n+(i?1:-1);i?o--:++o<s;)if(e(t[o],o,t))return o;return-1}var s0t=n0t;function i0t(t){return t!==t}var o0t=i0t;function r0t(t,e,n){for(var i=n-1,s=t.length;++i<s;)if(t[i]===e)return i;return-1}var a0t=r0t,l0t=s0t,c0t=o0t,u0t=a0t;function d0t(t,e,n){return e===e?u0t(t,e,n):l0t(t,c0t,n)}var h0t=d0t,f0t=h0t;function p0t(t,e){var n=t==null?0:t.length;return!!n&&f0t(t,e,0)>-1}var m0t=p0t;function g0t(t,e,n){for(var i=-1,s=t==null?0:t.length;++i<s;)if(n(e,t[i]))return!0;return!1}var v0t=g0t;function _0t(){}var y0t=_0t,f3=uH,b0t=y0t,w0t=oS,k0t=1/0,C0t=f3&&1/w0t(new f3([,-0]))[1]==k0t?function(t){return new f3(t)}:b0t,x0t=C0t,S0t=FH,$0t=m0t,A0t=v0t,E0t=NH,M0t=x0t,T0t=oS,P0t=200;function I0t(t,e,n){var i=-1,s=$0t,o=t.length,r=!0,a=[],l=a;if(n)r=!1,s=A0t;else if(o>=P0t){var c=e?null:M0t(t);if(c)return T0t(c);r=!1,s=E0t,l=new S0t}else l=e?[]:a;e:for(;++i<o;){var u=t[i],d=e?e(u):u;if(u=n||u!==0?u:0,r&&d===d){for(var h=l.length;h--;)if(l[h]===d)continue e;e&&l.push(d),a.push(u)}else s(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}var L0t=I0t,O0t=t0t,D0t=L0t;function R0t(t,e){return t&&t.length?D0t(t,O0t(e)):[]}var V0t=R0t;const F0t=Ei(V0t),N0t={name:"FeedFooter",mixins:[g2],components:{ReactedUsers:Kft,FeedComments:Bft,FeedTextComposer:X1,ChatIcon:vH,HeartIcon:p2},props:["feed","is_single","space_slug","is_modal"],emits:["commented","joinSpace"],data(){return{commenting:!1,comment:{message:"",media_images:[]},saving:!1,show_all_comments:this.is_single,reactions:[],isAutoFocus:!1,showCommentBox:!0,defaultMentions:[],sortBy:"oldest"}},methods:{maybeSave(t){(t.metaKey||t.ctrlKey)&&t.keyCode===13&&this.postComment()},postComment(){this.saving=!0,this.$post("feeds/"+this.feed.id+"/comments",{comment:this.comment.message,media_images:this.comment.media_images,meta:this.comment.meta}).then(t=>{var e;this.feed.comments||(this.feed.comments=[]),this.feed.comments.push(t.comment),this.feed.comments_count=parseInt(this.feed.comments_count)+1,this.comment={message:"",media_images:[]},this.commenting=!1,(e=this.$refs.composer)==null||e.clearContent(),this.$notify.success(t.message),this.$nextTick(()=>{this.$emit("commented",t.comment),this.scrollCommentIntoView(t.comment.id)})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})},showCommentForm(){if(!this.is_single&&this.hasFeature("show_post_modal")){this.feed.auto_focus_comment=!0,this.$eventBus.emit("showFeedModal",{feed:this.feed,view:"comments",auto_focus_comment:!0});return}this.show_all_comments=!0,this.commenting?(this.commenting=!1,setTimeout(()=>{this.commenting=!0,this.isAutoFocus=!0},100)):(this.commenting=!0,this.isAutoFocus=!0),this.prepareDefaultMentions()},showAll(){this.show_all_comments=!this.show_all_comments,this.commenting=!this.commenting,this.isAutoFocus=!1,this.prepareDefaultMentions()},maybeShowFeedModal(){if(this.is_single){this.showAll();return}if(!this.hasFeature("show_post_modal")){this.showAll();return}this.feed.auto_focus_comment=!1,this.$eventBus.emit("showFeedModal",{feed:this.feed,view:"comments",auto_focus_comment:!1})},toggleReact(){const t={react_type:"like"};this.feed.has_user_react&&(t.remove=!0);let e=!this.feed.has_user_react;this.$post("feeds/"+this.feed.id+"/react",t).then(n=>{this.feed.has_user_react=e,this.feed.reactions_count=n.new_count}).catch(n=>{this.$handleError(n)})},prepareDefaultMentions(){if(!this.auth.user_id||this.defaultMentions.length)return;let t=this.auth.user_id,e=[];this.feed.user_id!=t&&e.push(this.feed.xprofile);let n=this.feed.comments.slice(-30);this.each(n,i=>{i.user_id!=t&&e.push(i.xprofile)}),this.defaultMentions=F0t(e,"user_id")},changeCommentsSortBy(){this.$storeLocalData("comments_sort_by",this.sortBy)}},mounted(){let t=this.feed.default_comment_sort_by||"oldest";this.sortBy=this.$getLocalData("comments_sort_by",t),this.is_single&&this.prepareDefaultMentions(),this.feed.auto_focus_comment&&setTimeout(()=>{this.commenting=!0,this.isAutoFocus=!0},100)}},B0t={ref:"feed_footer",class:"feed_footer"},z0t={class:"fcom_feed_footer_actions"},H0t=["aria-label","aria-pressed"],U0t={class:"fcom_sr_only"},j0t={class:"fcom_sr_only"},W0t={class:"fcom_feed_footer_meta"},Y0t={key:0},q0t={key:0,class:"fcom_reactions_count feed_reaction_meta"},G0t={class:"feed_comment_count"},X0t={key:2,class:"feed_reaction_meta"},K0t={key:0,ref:"fcom_comment_sorting",class:"fcom_comment_sorting"},Z0t=["id"],J0t={key:0,style:{padding:"0",margin:"0","text-align":"center"}},Q0t={key:1,class:"feed_commenting"},e_t={class:"person_avatar"},t_t=["src"],n_t={key:2,class:""},s_t={style:{padding:"0",margin:"0","text-align":"center"}},i_t={key:0,style:{margin:"10px 0"}},o_t=["href"];function r_t(t,e,n,i,s,o){var m,y,b,k;const r=W("HeartIcon"),a=be,l=W("ChatIcon"),c=W("ReactedUsers"),u=on,d=Jt,h=W("feed-comments"),f=We,p=W("feed-text-composer");return v(),A(ee,null,[g("div",B0t,[g("div",z0t,[g("ul",null,[g("li",{class:G(["fcom_reaction fcom_reaction_list",{react_active:n.feed.has_user_react}]),role:"button",tabindex:"0","aria-label":t.$t("React"),"aria-pressed":!!n.feed.has_user_react,onClick:e[0]||(e[0]=C=>o.toggleReact()),onKeydown:[e[1]||(e[1]=ut(Ae(C=>o.toggleReact(),["prevent"]),["enter"])),e[2]||(e[2]=ut(Ae(C=>o.toggleReact(),["prevent"]),["space"]))]},[_(a,{class:G({user_reacted:n.feed.has_user_react})},{default:w(()=>[_(r,{filled:n.feed.has_user_react},null,8,["filled"])]),_:1},8,["class"]),g("span",null,[g("span",U0t,S(t.$t("React")),1)])],42,H0t),((m=n.feed.meta)==null?void 0:m.comments_disabled)!=="yes"?(v(),A("li",{key:0,class:"fcom_comment_btn_wrap",role:"button",tabindex:"0",onClick:e[3]||(e[3]=C=>o.showCommentForm()),onKeydown:[e[4]||(e[4]=ut(Ae(C=>o.showCommentForm(),["prevent"]),["enter"])),e[5]||(e[5]=ut(Ae(C=>o.showCommentForm(),["prevent"]),["space"]))]},[_(a,null,{default:w(()=>[_(l)]),_:1}),g("span",null,[g("span",j0t,S(t.$t("Comment")),1)])],32)):O("",!0)])]),g("div",W0t,[n.feed.reactions_count||n.feed.comments_count||((y=n.feed.meta)==null?void 0:y.comments_disabled)==="yes"?(v(),A("ul",Y0t,[n.feed.reactions_count?(v(),A("li",q0t,[_(c,{feed:n.feed},null,8,["feed"])])):O("",!0),n.feed.comments_count>0?(v(),A("li",{key:1,onClick:e[6]||(e[6]=(...C)=>o.maybeShowFeedModal&&o.maybeShowFeedModal(...C)),class:"feed_reaction_meta"},[g("div",G0t,S(t.$_n("%d comment","%d comments",n.feed.comments_count)),1)])):((b=n.feed.meta)==null?void 0:b.comments_disabled)==="yes"?(v(),A("li",X0t,S(t.$t("comments disabled")),1)):O("",!0)])):O("",!0)])],512),_(h,{sortBy:s.sortBy,defaultMentions:s.defaultMentions,onForceShowAll:o.showAll,show_all:s.show_all_comments,feed:n.feed,is_single:n.is_single,is_modal:n.is_modal},{before_comments_start:w(()=>[n.feed.comments_count>=2?(v(),A("div",K0t,[_(d,{"aria-label":t.$t("Sort comments by"),onChange:e[7]||(e[7]=C=>o.changeCommentsSortBy()),modelValue:s.sortBy,"onUpdate:modelValue":e[8]||(e[8]=C=>s.sortBy=C),class:"fcom_off_color fcom_minimal_select","popper-class":"plain_select",placeholder:t.$t("Sort by")},{default:w(()=>[_(u,{value:"oldest",label:t.$t("Earliest")},null,8,["label"]),_(u,{value:"latest",label:t.$t("Latest")},null,8,["label"]),_(u,{value:"popular",label:t.$t("Popular")},null,8,["label"]),_(u,{value:"most_replied",label:t.$t("Most Replied")},null,8,["label"])]),_:1},8,["aria-label","modelValue","placeholder"])],512)):O("",!0)]),_:1},8,["sortBy","defaultMentions","onForceShowAll","show_all","feed","is_single","is_modal"]),s.commenting||n.is_single?(v(),A("div",{key:0,id:"feed_comment_form_"+n.feed.id,class:"feed_comment feed_commentbox_main"},[((k=n.feed.meta)==null?void 0:k.comments_disabled)==="yes"?(v(),A(ee,{key:0},[n.feed.comments_count?(v(),A("p",J0t,S(t.$t("Comments are disabled for this post.")),1)):O("",!0)],64)):t.hasCommentPermission(n.feed)?(v(),A("div",Q0t,[g("div",e_t,[g("img",{alt:"",src:t.auth.photo},null,8,t_t)]),s.showCommentBox?(v(),A("div",{key:0,onKeydown:e[10]||(e[10]=ut((...C)=>o.maybeSave&&o.maybeSave(...C),["enter"])),class:"feed_comment_input"},[_(p,{ref:"composer",context:"comment",is_modal:n.is_modal,config:{multipleMedia:!0},mentionQuery:{space_id:n.feed.space_id},autofocus_changed:s.commenting,defaultMentions:s.defaultMentions,autofocus:s.isAutoFocus,disabled:s.saving,placeholder:t.$t("Write a comment"),content:s.comment},{default:w(()=>[_(f,{loading:s.saving,disabled:s.saving,class:"fcom_primary_button",onClick:e[9]||(e[9]=C=>o.postComment())},{default:w(()=>[B(S(t.$t("Post Comment")),1)]),_:1},8,["loading","disabled"])]),_:1},8,["is_modal","mentionQuery","autofocus_changed","defaultMentions","autofocus","disabled","placeholder","content"])],32)):O("",!0)])):(v(),A("div",n_t,[g("p",s_t,[B(S(t.$t("Please join the Space to post a comment."))+" ",1),t.appVars.auth.user_id?(v(),A("div",i_t,[_(f,{class:"fcom_primary_button",onClick:e[11]||(e[11]=()=>{t.$emit("joinSpace")})},{default:w(()=>[B(S(t.$t("Join Space")),1)]),_:1})])):(v(),A("a",{key:1,href:t.getCurrentAuthUrl()},S(t.appVars.allow_signup?t.$t("Login / Signup"):t.$t("Login")),9,o_t))])]))],8,Z0t)):O("",!0)],64)}const a_t=de(N0t,[["render",r_t]]),l_t={name:"SingleLineTextarea",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:""},maxlength:{type:Number,default:500},isActive:{type:Boolean,default:!1}},emits:["update:modelValue","enter"],methods:{onInput(t){const e=t.target.value.replace(/\n/g,"");this.$emit("update:modelValue",e),this.$nextTick(this.adjustTextareaHeight)},adjustTextareaHeight(){const t=this.$refs.textarea;t.style.height="auto",t.style.height=t.scrollHeight+"px"}},mounted(){this.adjustTextareaHeight()},watch:{modelValue(){this.$nextTick(this.adjustTextareaHeight)},isActive(t){t&&setTimeout(()=>{this.$refs.textarea.focus()},100)}}},c_t=["value","maxlength","placeholder"];function u_t(t,e,n,i,s,o){return v(),A("textarea",{value:n.modelValue,onInput:e[0]||(e[0]=(...r)=>o.onInput&&o.onInput(...r)),onKeydown:e[1]||(e[1]=ut(Ae(r=>t.$emit("enter"),["prevent"]),["enter"])),ref:"textarea",maxlength:n.maxlength,class:"fcom_status_title_input",rows:"1",placeholder:n.placeholder},null,40,c_t)}const d_t=de(l_t,[["render",u_t]]),h_t={name:"EyeIcon"},f_t={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},p_t=g("path",{d:"M17.9536 9.2035C18.207 9.55877 18.3337 9.7364 18.3337 9.99935C18.3337 10.2623 18.207 10.4399 17.9536 10.7952C16.8152 12.3915 13.908 15.8327 10.0003 15.8327C6.09264 15.8327 3.18541 12.3915 2.04703 10.7952C1.79367 10.4399 1.66699 10.2623 1.66699 9.99935C1.66699 9.7364 1.79367 9.55877 2.04703 9.2035C3.18541 7.60722 6.09264 4.16602 10.0003 4.16602C13.908 4.16602 16.8152 7.60722 17.9536 9.2035Z",stroke:"currentColor","stroke-width":"1.5"},null,-1),m_t=g("path",{d:"M12.5 10C12.5 8.61929 11.3807 7.5 10 7.5C8.61929 7.5 7.5 8.61929 7.5 10C7.5 11.3807 8.61929 12.5 10 12.5C11.3807 12.5 12.5 11.3807 12.5 10Z",stroke:"currentColor","stroke-width":"1.5"},null,-1),g_t=[p_t,m_t];function v_t(t,e,n,i,s,o){return v(),A("svg",f_t,g_t)}const __t=de(h_t,[["render",v_t]]),y_t={name:"CalendarIcon"},b_t={width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},w_t=$a('<path d="M11 1.3335V2.66683M3 1.3335V2.66683" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M6.99766 8.66699H7.00364M6.99766 11.3337H7.00364M9.66134 8.66699H9.66732M4.33398 8.66699H4.33997M4.33398 11.3337H4.33997" stroke="currentColor" stroke-width="1.2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M1.33398 5.3335H12.6673" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M0.666992 8.16216C0.666992 5.25729 0.666992 3.80486 1.50174 2.90243C2.33648 2 3.67999 2 6.36699 2H7.63366C10.3207 2 11.6642 2 12.4989 2.90243C13.3337 3.80486 13.3337 5.25729 13.3337 8.16216V8.5045C13.3337 11.4094 13.3337 12.8618 12.4989 13.7642C11.6642 14.6667 10.3207 14.6667 7.63366 14.6667H6.36699C3.67999 14.6667 2.33648 14.6667 1.50174 13.7642C0.666992 12.8618 0.666992 11.4094 0.666992 8.5045V8.16216Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path><path d="M1 5.3335H13" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"></path>',5),k_t=[w_t];function C_t(t,e,n,i,s,o){return v(),A("svg",b_t,k_t)}const x_t=de(y_t,[["render",C_t]]),S_t={name:"CreateStatusForm",emits:["updatePost","added"],props:{space:{type:String,default:""},btn_text:{type:String,default:"Post"},editing_feed:{type:Object,default:()=>({title:"",type:"text",message:"",media_image:"",topic_ids:[],send_announcement_email:"no",status:"published"})},defaultState:{type:String,default:"idle"},disableSpace:{type:Boolean,default:!1},default_placeholder:{type:String,default:""},initial_placeholder:{type:String,default:""},disableUpload:{type:Boolean,default:!1},saving:{type:Boolean,default:!1},author:{type:Object,default:()=>({})}},components:{SpaceIcon:hp,FeedTextComposer:X1,SingleLineTextarea:d_t,EyeIcon:__t,CalendarIcon:x_t},data(){return{feed:this.editing_feed,isAutoFocus:!1,state:this.defaultState,posting:!1,doingOembed:!1,oembed:null,postableSpaces:[],autofocus_changed:!1,globalDisabled:this.appVars.features.disable_global_posts,hasPostTitle:this.hasFeature("has_post_title"),scheduleModalVisible:!1,scheduleForm:{date:null,time:null},editorReady:!1}},watch:{"scheduleForm.date":{handler(t){this.scheduleForm.time=null}}},computed:{...A0e(VIe,["spacesBySlug"]),allSpaces(){return this.space&&this.spacesBySlug[this.space]?{...this.appVars.auth.spaces,[this.space]:this.spacesBySlug[this.space]}:this.appVars.auth.spaces},isEditing(){var t;return(t=this.editing_feed)==null?void 0:t.id},isScheduleDisabled(){return!this.scheduleForm.date||!this.scheduleForm.time},showScheduleInfo(){return this.feed.scheduled_at&&!this.isEditing},showScheduleIcon(){return(this.isAdmin()||this.isCurrentSpaceAdmin)&&!this.isEditing&&this.has_pro},isDateDisabled(){return t=>t<new Date().setHours(0,0,0,0)},getPlaceholder(){const t=this.appVars.topicsConfig.max_topics_per_post;return this.isTopicRequired?this.$_n("Select a topic","Choose up to %s topics",t):this.$_n("Select a topic","Choose up to %s topics (optional)",t)},getButtonLabel(){return this.feed.scheduled_at&&!this.isEditing?this.$t("Schedule"):this.btn_text},getScheduleLabel(){return this.$t("Scheduled for %1$s at %2$s",this.formattedDate(this.feed.scheduled_at),this.formattedTime(this.feed.scheduled_at))},getStartTime(){if(!this.scheduleForm.date||!this.isToday(this.scheduleForm.date))return"00:00";const e=this.dayjs().add(30,"minute");if(!this.isToday(e.toDate()))return"23:50";const n=e.format("HH");let i=parseInt(e.format("mm"),10);return i=Math.ceil(i/10)*10,i===60?this.dayjs(e).add(1,"hour").format("HH")+":00":n+":"+(i<10?"0":"")+i},getPostTitle(){return this.isEditing?this.author.name||"":this.$t("Create Post")},canPost(){var t,e;return this.space?(e=(t=this.allSpaces[this.space])==null?void 0:t.permissions)==null?void 0:e.can_create_post:this.appVars.auth.user_id},isTopicRequired(){var t,e;return this.currentSpaceSlug?((e=(t=this.allSpaces[this.currentSpaceSlug])==null?void 0:t.settings)==null?void 0:e.topic_required)=="yes":!1},isStateActive(){return this.state=="active"},isCurrentSpaceAdmin(){var t,e;return this.currentSpaceSlug?(e=(t=this.allSpaces[this.currentSpaceSlug])==null?void 0:t.permissions)==null?void 0:e.community_moderator:!1},isCommunityAdmin(){return this.isAdmin()},currentPlaceHolder(){return this.isStateActive?this.default_placeholder?this.default_placeholder:this.$t("Write something here..."):this.initial_placeholder?this.initial_placeholder:this.$t("What's happening, %s",this.auth.first_name)},currentTopics(){var n;let t=this.currentSpaceSlug;if(!t)return[];let e=((n=this.allSpaces[t])==null?void 0:n.topics)||[];return e=Object.values(e),this.isModerator(t)?e:e.filter(i=>i.admin_only!="yes")},canUploadDoc(){var t,e;return this.currentSpaceSlug?(e=(t=this.allSpaces[this.currentSpaceSlug])==null?void 0:t.permissions)==null?void 0:e.can_upload_documents:!1},currentSpaceSlug(){if(this.space)return this.space;let t=this.feed.space;return t&&typeof t=="object"?t==null?void 0:t.slug:t},currentSpaceId(){var t;return this.currentSpaceSlug?(t=this.allSpaces[this.currentSpaceSlug])==null?void 0:t.id:null},feedContext(){const t=this.space||this.currentSpaceSlug;return t&&t!=="__self__post__"?`space-${t}`:"global"}},methods:{...E0e(RM,["createFeed"]),changeAutoFocus(){this.feed.title=this.feed.title.replace(/\n/g,""),this.updateAutofocus()},updateAutofocus(){this.autofocus_changed=!1,setTimeout(()=>{this.autofocus_changed=!0},100)},openScheduleModal(){this.scheduleModalVisible=!0},makeActive(){this.editorReady=!0,this.$nextTick(()=>{this.prepareData(),this.state="active",this.hasPostTitle||this.updateAutofocus()})},cancelPost(){this.state="idle",this.postableSpaces=[]},cancelSchedule(){this.scheduleModalVisible=!1,this.scheduleForm.date=null,this.scheduleForm.time=null,this.feed.scheduled_at=null},previewPost(){const t={...this.feed,space:this.space||this.feed.space,is_editing:this.isEditing,author:this.author};this.$eventBus.emit("showPreviewPostModal",t)},initFeed(){return{type:"text",message:"",media_image:"",topic_ids:[],scheduled_at:null,send_announcement_email:"no",status:"published"}},schedulePost(){if(this.scheduleModalVisible=!1,!this.scheduleForm.date||!this.scheduleForm.time){this.feed.scheduled_at=null;return}const t=this.convertTo24Hour(this.scheduleForm.time);this.feed.scheduled_at=`${this.scheduleForm.date} ${t}:00`},post(){if(!this.isStateActive)return;if(this.feed.id){this.$emit("updatePost",this.feed);return}const t=this.feed;if(this.space&&(t.space=this.space),!t.space){this.$refs.fcom_posting_space.classList.add("fcon_shake"),setTimeout(()=>{this.$refs.fcom_posting_space.classList.remove("fcon_shake")},500),this.$notify({title:this.$t("Error"),message:this.$t("Please select a space to post in."),type:"error"});return}if(t.space!="__self__post__"&&t.send_announcement_email=="yes"){let e=this.$t("Are you sure you want to send email to everyone? An automated email will be sent to all the members of the space after 5 minutes of this post");t.scheduled_at&&(e=this.$t("Are you sure you want to send email to everyone? An automated email will be sent to all the members of the space. The email will be sent at the scheduled time.")),this.$confirm(e,this.$t("Sending email to all members?"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("No"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.postStatus(t)}).catch(()=>{this.feed.send_announcement_email="no",this.state="active",this.$notify({title:this.$t("Cancelled"),message:this.$t("You have cancelled the action."),type:"info"})})}else this.postStatus(t)},feedSpaceChanged(){this.$refs.fcom_posting_space_select.blur(),this.feed.topic_ids=""},goToCreatedFeed(t){if(!(t!=null&&t.slug))return;if(this.hasFeature("show_post_modal")){this.$eventBus.emit("showFeedModal",{feed:t});return}const e=t.space?{name:"space_feed",params:{feed_slug:t.slug,space:t.space.slug}}:{name:"single_feed",params:{feed_slug:t.slug}};this.$router.push(e)},async postStatus(t){var e,n;this.posting=!0;try{const s=await RM().createFeed(this.feedContext,t);if(s.scheduled_at||(this.$notify.success(s.message),this.$emit("added",s.feed),((e=s.feed)==null?void 0:e.status)==="unlisted"?this.goToCreatedFeed(s.feed):this.$nextTick(()=>{const o=document.getElementById("feed_id_"+s.feed.id);o&&(o.classList.add("fcom_highlight_glow"),setTimeout(()=>{o.classList.remove("fcom_highlight_glow")},4500))})),this.feed=this.initFeed(),this.state="idle",s.scheduled_at){const o=this.formattedDateTime(s.scheduled_at);this.$notify.success(this.$t("Your post has been scheduled for %s. Please find the scheduled post from your profile",o))}this.editorReady=!1}catch(i){this.$handleError(i),(n=i==null?void 0:i.shakes)!=null&&n.topic_ids&&(this.$refs.fcom_topics_input.classList.add("fcon_shake"),setTimeout(()=>{this.$refs.fcom_topics_input.classList.remove("fcon_shake")},500))}finally{this.posting=!1}},prepareData(){var r;if(this.space)return[];let t=Object.values(this.allSpaces),e=this.appVars.space_groups,n=[],i=[];this.each(e,a=>{let l=t.filter(c=>{let u=c.parent_id==a.id&&c.permissions&&c.permissions.can_create_post;return u&&i.push(c.slug),u});l.length&&n.push({label:a.title,spaces:l})});let s=t.filter(a=>!a.parent_id&&a.permissions&&a.permissions.can_create_post);s&&s.length&&n.push({label:this.$t("Others"),spaces:s}),this.globalDisabled||n.unshift({label:"",spaces:[{title:this.$t("On my profile"),slug:"__self__post__"}]}),this.postableSpaces=n;const o=this.appVars.default_post_space;!this.feed.space&&o&&["all_feeds","user_profile_feeds"].includes((r=this.$route)==null?void 0:r.name)&&this.postableSpaces.some(a=>a.spaces.some(l=>l.slug===o))&&(this.feed.space=o)}},mounted(){(this.editing_feed.id||this.defaultState=="active")&&(this.editorReady=!0)}},$_t={class:"person_avatar"},A_t=["alt","src"],E_t={class:"create_header_content"},M_t={key:0,class:"fcom_create_status_box_header"},T_t={class:"user_infos"},P_t={class:"feed_user_name"},I_t={class:"feed_meta_info"},L_t={key:1,class:"feed_timestamp"},O_t={class:"create_header_action"},D_t={key:0,ref:"fcom_topics_input",class:"fcom_topics_input"},R_t={style:{margin:"0",display:"block",width:"100%",padding:"5px 0","font-weight":"500"}},V_t={key:0,class:"fcom_meta_text"},F_t={class:"fcom_post_actions"},N_t={key:0,class:"fcom_post_space_name"},B_t={class:"target_label"},z_t={ref:"fcom_posting_space",style:{"margin-right":"10px"}},H_t={key:0,class:"fcom_space_title"},U_t={key:1},j_t={class:"fcom_empty_spaces_dropdown"},W_t={key:0,class:"fcom_composer_admin_actions"},Y_t={key:0},q_t={class:"dialog_header"},G_t={class:"dialog_left schedule_header_left"},X_t={class:"dialog_body"},K_t={class:"fcom_input_help"},Z_t={class:"dialog_footer"};function J_t(t,e,n,i,s,o){const r=W("EditPen"),a=be,l=W("CalendarIcon"),c=We,u=W("EyeIcon"),d=W("Close"),h=W("SingleLineTextarea"),f=on,p=Jt,m=W("SpaceIcon"),y=Mb,b=Gt,k=W("feed-text-composer"),C=Od,$=en,x=s8,M=sn,P=Ss;return o.canPost?(v(),A("div",{key:0,class:G([{state_active:o.isStateActive},"create_status_holder"])},[g("div",{class:G(["create_header",{state_active:o.isStateActive}])},[g("div",$_t,[g("img",{alt:n.author.name||t.$t("Your Photo"),src:n.author.avatar||t.auth.avatar},null,8,A_t)]),g("div",E_t,[o.isStateActive?O("",!0):(v(),A("div",{key:0,onClick:e[0]||(e[0]=(...T)=>o.makeActive&&o.makeActive(...T)),class:"form_placeholder"},S(o.currentPlaceHolder),1)),g("div",{class:G([{fcom_editor_with_title:s.hasPostTitle,"is-active":o.isStateActive},"fcom_create_status_box"])},[o.isStateActive?(v(),A("div",M_t,[g("div",T_t,[g("div",P_t,S(o.getPostTitle),1),g("div",I_t,[!n.editing_feed.id&&o.showScheduleInfo?(v(),A("div",{key:0,onClick:e[1]||(e[1]=(...T)=>o.openScheduleModal&&o.openScheduleModal(...T)),class:"feed_scheduled_info"},[g("span",null,S(o.getScheduleLabel),1),_(a,null,{default:w(()=>[_(r)]),_:1})])):(v(),A("span",L_t,S(n.editing_feed.id?t.humanDateDiff(n.editing_feed.created_at):t.dayjs().format(t.siteDateTimeFormat)),1))])]),g("div",O_t,[o.showScheduleIcon?(v(),D(c,{key:0,"aria-label":t.$t("Schedule post"),onClick:o.openScheduleModal,text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(l)]),_:1})]),_:1},8,["aria-label","onClick"])):O("",!0),_(c,{"aria-label":t.$t("Preview"),onClick:o.previewPost,text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(u)]),_:1})]),_:1},8,["aria-label","onClick"]),o.isEditing?O("",!0):(v(),D(c,{key:1,"aria-label":t.$t("Close"),class:"close_btn",onClick:o.cancelPost,text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(d)]),_:1})]),_:1},8,["aria-label","onClick"]))])])):O("",!0),s.editorReady?(v(),D(k,{key:1,context:"feed",placeholder:o.currentPlaceHolder,config:{surveyApp:!0,space_id:o.currentSpaceId,is_admin:o.isCurrentSpaceAdmin||o.isCommunityAdmin,spaceSlug:o.currentSpaceSlug,disableUpload:n.disableUpload,multipleMedia:!0,documentsApp:o.canUploadDoc,videoApp:!0},autofocus:s.isAutoFocus||!s.hasPostTitle,onEditorCreated:e[9]||(e[9]=()=>{s.isAutoFocus=!0}),mentionQuery:o.currentSpaceSlug&&o.currentSpaceSlug!=="__self__post__"?{space:o.currentSpaceSlug}:{},disabled:s.posting,autofocus_changed:s.autofocus_changed,is_editing:!!o.isEditing,content:s.feed},{before_input:w(()=>[s.hasPostTitle?(v(),D(h,{key:0,maxlength:120,autofocus:!0,isActive:o.isStateActive,modelValue:s.feed.title,"onUpdate:modelValue":e[2]||(e[2]=T=>s.feed.title=T),onEnter:e[3]||(e[3]=T=>o.changeAutoFocus()),placeholder:s.hasPostTitle=="required"?t.$t("Short title of this post"):t.$t("Title (optional)")},null,8,["isActive","modelValue","placeholder"])):O("",!0)]),before_composer_footer:w(()=>[le(t.$slots,"before_footer")]),after_input:w(()=>[t.has_pro&&o.currentTopics.length?(v(),A("div",D_t,[_(p,{"popper-class":"fcom_topics_select","multiple-limit":t.appVars.topicsConfig.max_topics_per_post,modelValue:s.feed.topic_ids,"onUpdate:modelValue":e[4]||(e[4]=T=>s.feed.topic_ids=T),multiple:t.appVars.topicsConfig.max_topics_per_post>1,placeholder:o.getPlaceholder},{default:w(()=>[(v(!0),A(ee,null,Ce(o.currentTopics,T=>(v(),D(f,{key:T.slug,label:T.title,value:T.id},{default:w(()=>[g("span",R_t,S(T.title),1),T.description?(v(),A("span",V_t,S(T.description),1)):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["multiple-limit","modelValue","multiple","placeholder"])],512)):O("",!0)]),after_composer_footer:w(()=>[t.hasFeature("mention_mail")&&o.isCurrentSpaceAdmin&&s.feed.send_announcement_email?(v(),A("div",W_t,[_(b,{disabled:!t.has_pro,"true-value":"yes","false-value":"no",modelValue:s.feed.send_announcement_email,"onUpdate:modelValue":e[8]||(e[8]=T=>s.feed.send_announcement_email=T),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Send announcement email to space members"))+" ",1),t.has_pro?O("",!0):(v(),A("span",Y_t,"("+S(t.$t("Require Pro"))+")",1))]),_:1},8,["disabled","modelValue"])])):O("",!0)]),default:w(()=>[g("div",F_t,[n.space&&o.isStateActive?(v(),A("div",N_t,[g("span",null,"#"+S(n.space),1)])):O("",!0),!n.space&&!n.disableSpace?(v(),A(ee,{key:1},[g("span",B_t,S(t.$t("Posting in:")),1),g("span",z_t,[_(p,{modelValue:s.feed.space,"onUpdate:modelValue":e[5]||(e[5]=T=>s.feed.space=T),style:{width:"170px"},ref:"fcom_posting_space_select",class:"fcom_minimal_select","popper-class":"fcom_posting_space_select",placeholder:t.$t("Select Space"),onChange:e[6]||(e[6]=T=>o.feedSpaceChanged())},{empty:w(()=>[g("p",j_t,S(Object.keys(o.allSpaces).length?t.$t("No spaces to post in"):t.$t("Join a space to post")),1)]),default:w(()=>[(v(!0),A(ee,null,Ce(s.postableSpaces,T=>(v(),D(y,{key:T.label,label:T.label},{default:w(()=>[(v(!0),A(ee,null,Ce(T.spaces,I=>(v(),D(f,{key:I.slug,label:I.title,value:I.slug},{default:w(()=>[I.id?(v(),A("span",H_t,[_(m,{space_profile:I},null,8,["space_profile"]),g("span",null,S(t.getExcerpt(I.title,30)),1)])):(v(),A("span",U_t,S(t.getExcerpt(I.title,30)),1))]),_:2},1032,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"])],512)],64)):O("",!0),le(t.$slots,"before_submit_btn"),_(c,{onClick:e[7]||(e[7]=T=>o.post()),disabled:s.posting||o.isEditing&&n.saving,loading:o.isEditing?n.saving:s.posting,class:G(["fcom_primary_button",{fcom_update_button:o.isEditing}])},{default:w(()=>[B(S(o.getButtonLabel),1)]),_:1},8,["disabled","loading","class"])])]),_:3},8,["placeholder","config","autofocus","mentionQuery","disabled","autofocus_changed","is_editing","content"])):O("",!0),le(t.$slots,"after_composer")],2)])],2),_(P,{modelValue:s.scheduleModalVisible,"onUpdate:modelValue":e[12]||(e[12]=T=>s.scheduleModalVisible=T),width:t.modalWidth,"modal-class":"fcom_common_dialog","append-to-body":!0,"close-on-click-modal":!1},{header:w(()=>[g("div",q_t,[g("div",G_t,[g("h4",null,S(t.$t("Schedule Post")),1),g("p",null,S(t.$t("Choose a date and time in the future when you want your post to be published")),1)])])]),footer:w(()=>[g("div",Z_t,[_(c,{class:"fcom_secondary_button",onClick:o.cancelSchedule},{default:w(()=>[B(S(t.$t("Remove Schedule")),1)]),_:1},8,["onClick"]),_(c,{class:"fcom_primary_button",disabled:o.isScheduleDisabled,onClick:o.schedulePost},{default:w(()=>[B(S(t.$t("Select Schedule")),1)]),_:1},8,["disabled","onClick"])])]),default:w(()=>[g("div",X_t,[_(M,{"label-position":"top",class:"fcom_schedule_form"},{default:w(()=>[_($,{label:t.$t("Date")},{default:w(()=>[_(C,{modelValue:s.scheduleForm.date,"onUpdate:modelValue":e[10]||(e[10]=T=>s.scheduleForm.date=T),type:"date","value-format":"YYYY-MM-DD",format:t.siteDateFormat,placeholder:t.$t("Select Date"),"disabled-date":o.isDateDisabled},null,8,["modelValue","format","placeholder","disabled-date"])]),_:1},8,["label"]),_($,{label:t.$t("Time")},{default:w(()=>[_(x,{modelValue:s.scheduleForm.time,"onUpdate:modelValue":e[11]||(e[11]=T=>s.scheduleForm.time=T),disabled:!s.scheduleForm.date,style:{width:"210px"},step:"00:10",format:t.siteTimeFormat,start:o.getStartTime,end:"23:59",placeholder:t.$t("Select Time")},null,8,["modelValue","disabled","format","start","placeholder"])]),_:1},8,["label"])]),_:1}),_($,null,{default:w(()=>[g("p",K_t,S(t.$t("The date and time is based on your site's Timezone")),1)]),_:1})])]),_:1},8,["modelValue","width"])],2)):O("",!0)}const Q_t=de(S_t,[["render",J_t]]),eyt={name:"EditFeed",components:{SpaceIcon:hp,CreateStatusForm:Q_t},data(){return{loading:!1,saving:!1,localDialogVisible:this.dialogVisible,feed:{},autofocus_changed:!1,hasPostTitle:this.hasFeature("has_post_title"),changeSpace:!1,newSpaceId:null,makeUnlisted:!1}},props:{dialogVisible:{type:Boolean,required:!0},feedSlug:{type:String,required:!0},hide_create_form:{type:Boolean,default:!1},author:{type:Object,default:()=>({})}},computed:{canMovePost(){return this.has_pro&&this.hasSpaceModeratorAccess(this.feed.space)},profileOptionLabel(){return this.auth&&this.feed.user_id&&this.auth.user_id==this.feed.user_id?this.$t("On my profile"):this.$t("On author's profile")}},methods:{getFeed(){this.loading=!0,this.$get("feeds/"+this.feedSlug+"/by-slug",{context:"edit"}).then(t=>{this.feed=t.feed,this.makeUnlisted=t.feed.status==="unlisted"}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},handleUpdatePost(t){var n;let e={id:t.id,title:t.title,message:t.message,space:(n=t==null?void 0:t.space)==null?void 0:n.slug,meta:t.meta,content_type:t.content_type,document_ids:t.document_ids,media:t.media,media_images:t.media_images,survey:t.survey,topic_ids:t.topic_ids,send_announcement_email:t.send_announcement_email};this.changeSpace&&this.newSpaceId&&(this.newSpaceId==="profile"?e.move_to_profile=1:e.new_space_id=this.newSpaceId),["published","unlisted"].includes(this.feed.status)&&(e.status=this.makeUnlisted?"unlisted":"published"),this.saving=!0,this.$post(`feeds/${t.id}`,e).then(i=>{this.$notify.success(i.message),this.$emit("updated",i.feed),this.handleClose()}).catch(i=>{this.$handleError(i)}).finally(()=>{this.saving=!1})},handleClose(){this.localDialogVisible=!1,this.$emit("close")}},mounted(){this.getFeed()}},tyt={class:"fcom_feed_edit"},nyt={class:"fcom_feed_edit_dialog_header"},syt={key:0,class:"fcom_feed_edit_dialog_body"},iyt={key:0},oyt={key:0,style:{"margin-top":"5px"}},ryt={class:"fcom_space_title"};function ayt(t,e,n,i,s,o){const r=W("Close"),a=be,l=Gt,c=on,u=W("SpaceIcon"),d=Jt,h=Cs,f=W("create-status-form"),p=Wt,m=Ss,y=xt("loading");return v(),A("div",tyt,[_(m,{class:"fcom_feed_edit_dialog",modelValue:s.localDialogVisible,"onUpdate:modelValue":e[3]||(e[3]=b=>s.localDialogVisible=b),width:t.dialogWidth,"append-to-body":!0,overflow:"","before-close":()=>{},"show-close":!1},{default:w(()=>{var b,k;return[De((v(),A("div",null,[g("div",nyt,[g("span",null,S(t.$t("Edit Feed")),1),_(a,{onClick:o.handleClose},{default:w(()=>[_(r)]),_:1},8,["onClick"])]),s.feed.id?(v(),A("div",syt,[!(n.hide_create_form&&t.auth.user_id)||t.canEditFeed(s.feed)?(v(),D(f,{key:0,"default-state":"active",btn_text:t.$t("Update"),editing_feed:s.feed,author:n.author,onUpdatePost:o.handleUpdatePost,saving:s.saving,disableSpace:!0,space:(k=(b=s.feed)==null?void 0:b.space)==null?void 0:k.slug},{after_composer:w(()=>[o.canMovePost?(v(),A("div",iyt,[_(l,{modelValue:s.changeSpace,"onUpdate:modelValue":e[0]||(e[0]=C=>s.changeSpace=C),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Move to a different space")),1)]),_:1},8,["modelValue"]),s.changeSpace?(v(),A("div",oyt,[_(d,{modelValue:s.newSpaceId,"onUpdate:modelValue":e[1]||(e[1]=C=>s.newSpaceId=C),placeholder:t.$t("Select destination"),style:{width:"100%"}},{default:w(()=>[_(c,{value:"profile",label:o.profileOptionLabel,disabled:!s.feed.space_id},{default:w(()=>[g("span",null,S(o.profileOptionLabel),1)]),_:1},8,["label","disabled"]),(v(!0),A(ee,null,Ce(t.appVars.auth.spaces,C=>(v(),D(c,{disabled:s.feed.space_id==C.id,key:C.id,label:C.title,value:C.id},{default:w(()=>[g("span",ryt,[_(u,{space_profile:C},null,8,["space_profile"]),g("span",null,S(t.getExcerpt(C.title,30)),1)])]),_:2},1032,["disabled","label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])):O("",!0)])):O("",!0)]),before_submit_btn:w(()=>[t.has_pro&&t.isCommunityModerator()&&["published","unlisted"].includes(s.feed.status)?(v(),D(h,{key:0,content:t.$t("Hidden from all feeds and listings. Only reachable by its direct link."),placement:"top"},{default:w(()=>[_(l,{modelValue:s.makeUnlisted,"onUpdate:modelValue":e[2]||(e[2]=C=>s.makeUnlisted=C),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Make unlisted")),1)]),_:1},8,["modelValue"])]),_:1},8,["content"])):O("",!0)]),_:1},8,["btn_text","editing_feed","author","onUpdatePost","saving","space"])):O("",!0)])):(v(),D(p,{key:1,rows:5,animated:!0}))])),[[y,s.loading]])]}),_:1},8,["modelValue","width"])])}const XH=de(eyt,[["render",ayt]]),lyt={name:"SurveyVoters",props:["feed","option","options","totalCount"],components:{UserRouteLink:Jr,UserAvatar:_2},data(){return{voters:[],loading:!1,showVotersDialog:!0,cache:{},requestId:0}},watch:{option(){this.loadVoters()}},computed:{getVotePercentage(){return this.option.vote_counts?Math.floor(this.option.vote_counts/this.totalCount*100)+"%":"0%"}},methods:{switchOption(t){this.$emit("updateOption",t)},closeDialog(){this.showVotersDialog=!1,this.$emit("close")},loadVoters(){var i;const t=(i=this.option)==null?void 0:i.slug;if(!t)return;const e=++this.requestId,n=this.cache[t];n&&(this.voters=n),this.loading=!n,this.$get(`feeds/${this.feed.id}/apps/survey-voters/${t}`).then(({voters:s})=>{this.cache[t]=s,e===this.requestId&&(this.voters=s)}).catch(s=>{n||this.$handleError(s)}).finally(()=>{e===this.requestId&&(this.loading=!1)})}},mounted(){this.loadVoters()}},cyt={class:"dialog_header"},uyt={class:"fcom_filter_menu"},dyt={class:"fcom_filter_menu_ul"},hyt=["onClick"],fyt={key:1},pyt={class:"feed_meta_info survey_voters_meta"},myt={class:"meta_line"},gyt={class:"meta_line"},vyt={class:"voters_list"},_yt={class:"voter_avatar"},yyt={class:"voter_info"},byt=["title"],wyt={key:2,class:"not_found"};function kyt(t,e,n,i,s,o){const r=Wt,a=W("UserAvatar"),l=W("UserRouteLink"),c=Ai,u=Ss;return v(),D(u,{modelValue:s.showVotersDialog,"onUpdate:modelValue":e[0]||(e[0]=d=>s.showVotersDialog=d),"modal-class":"fcom_common_dialog menu_dialog","close-on-click-modal":!0,"append-to-body":!0,width:t.dialogWidth,style:{"max-width":"800px"},direction:"rtl",onClose:o.closeDialog},{header:w(({close:d})=>[g("div",cyt,[g("div",uyt,[g("ul",dyt,[(v(!0),A(ee,null,Ce(n.options,h=>(v(),A("li",{key:h.slug},[g("a",{onClick:Ae(f=>o.switchOption(h.slug),["prevent"]),class:G({"router-link-exact-active":n.option.slug==h.slug}),href:"#"},S(h.label),11,hyt)]))),128))])])])]),default:w(()=>[s.loading?(v(),D(r,{key:0,animated:"",rows:4})):s.voters.length?(v(),A("div",fyt,[g("div",pyt,[g("span",myt,S(o.getVotePercentage),1),g("span",gyt,S(t.$_n("%s Vote","%s Votes",n.option.vote_counts)),1)]),_(c,{"max-height":"800px"},{default:w(()=>[g("div",vyt,[(v(!0),A(ee,null,Ce(s.voters,d=>(v(),A("div",{key:d.id,class:"voter_item"},[d.xprofile?(v(),A(ee,{key:0},[g("div",_yt,[_(a,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"])]),g("div",yyt,[_(l,{show_badge:!0,xprofile:d.xprofile},null,8,["xprofile"]),d.xprofile.created_at?(v(),A("div",{key:0,title:d.xprofile.created_at,class:"voter_time"},S(t.$t("Joined %s",t.humanDateDiff(d.xprofile.created_at))),9,byt)):O("",!0)])],64)):O("",!0)]))),128))])]),_:1})])):(v(),A("div",wyt,[g("p",null,S(t.$t("No voters yet")),1)]))]),_:1},8,["modelValue","width","onClose"])}const Cyt=de(lyt,[["render",kyt]]),xyt={name:"SurveyRenderer",props:{feed:{type:Object,required:!0},is_preview:{type:Boolean,default:!1},hasTopMedia:{type:Boolean,default:!1},isChildFeed:{type:Boolean,default:!1}},components:{SurveyVoters:Cyt},data(){var t,e;return{inputType:(e=(t=this.feed.meta)==null?void 0:t.survey_config)==null?void 0:e.type,formattedOptions:[],working:!1,totalCount:0,showVotersDialog:!1,selectedOption:null,endingDate:null}},watch:{"feed.meta.survey_config":{handler(t,e){JSON.stringify(t)!==JSON.stringify(e)&&(this.inputType=e.type,this.setupData())},deep:!0}},computed:{isEnded(){return this.endingDate&&this.isPastDate(this.endingDate)},endedDateLabel(){return this.$t("ended %s",this.humanDateDiff(this.endingDate))},endingDateLabel(){return this.$t("ending %s",this.humanDateDiff(this.endingDate))},shouldHideBorder(){var t,e;return!this.hasTopMedia&&(((t=this.feed.meta)==null?void 0:t.media_items)||((e=this.feed.meta)==null?void 0:e.media_preview))||this.isChildFeed}},methods:{getVoteStyle(t){const e=t?t/this.totalCount*100:0,n={width:e+"%"};return e>0&&e<100&&(n["border-top-right-radius"]=0,n["border-bottom-right-radius"]=0),n},showVoters(t){this.selectedOption=t,this.showVotersDialog=!0},updateOption(t){this.selectedOption=this.formattedOptions.find(e=>e.slug===t)},toggleVote(t){if(this.isEnded){this.$notify.error(this.$t("This poll has ended."));return}if(this.showVotersDialog)return;let e=this.formattedOptions[t].voted;this.inputType=="single_choice"&&this.each(this.formattedOptions,n=>{n.voted=!1}),this.formattedOptions[t].voted=!e,this.syncVotes()},syncVotes(){if(this.is_preview)return;let t=[];this.each(this.formattedOptions,e=>{e.voted&&t.push(e.slug)}),this.working=!0,this.$post(`feeds/${this.feed.id}/apps/survey-vote`,{vote_indexes:t}).then(e=>{this.feed.meta.survey_config=e.survey_config,this.setupData()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})},setupData(){let t=[],e=0;this.feed.meta.survey_config&&(this.each(this.feed.meta.survey_config.options,n=>{t.push(n),n.vote_counts&&(e+=parseInt(n.vote_counts))}),this.formattedOptions=t,this.totalCount=e,this.endingDate=this.feed.meta.survey_config.end_date)}},mounted(){this.setupData()}},Syt={class:"fcom_app_options"},$yt=["onClick"],Ayt={class:"fcom_app_text"},Eyt={class:"fcom_app_input_wrap"},Myt={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 6"},Tyt=g("circle",{cx:"3",cy:"3",r:"2.5",fill:"currentColor"},null,-1),Pyt=[Tyt],Iyt={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8 8"},Lyt=g("path",{fill:"currentColor",d:"M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z"},null,-1),Oyt=[Lyt],Dyt=["onClick"],Ryt={key:0},Vyt={class:"feed_meta_info"},Fyt={key:0,class:"meta_line"},Nyt=["title"],Byt=["title"];function zyt(t,e,n,i,s,o){const r=W("ArrowRight"),a=be,l=W("SurveyVoters");return v(),A(ee,null,[g("div",{class:G(["fcom_app_render",{"no-border":o.shouldHideBorder}])},[g("div",Syt,[(v(!0),A(ee,null,Ce(s.formattedOptions,(c,u)=>(v(),A("div",{key:c.slug,onClick:d=>o.toggleVote(u),class:G([c.voted?"fcom_is_voted":"","fcom_app_option"])},[g("div",Ayt,[g("span",Eyt,[g("span",{class:G("fcom_input_"+s.inputType)},[s.inputType=="single_choice"?(v(),A("svg",Myt,Pyt)):(v(),A("svg",Iyt,Oyt))],2)]),g("span",null,S(c.label),1)]),g("div",{class:"fcom_app_counts",onClick:d=>o.showVoters(c)},[B(S(c.vote_counts?Math.floor(c.vote_counts/s.totalCount*100)+"%":"")+" ",1),c.vote_counts?(v(),A("span",Ryt,"("+S(c.vote_counts)+")",1)):O("",!0),c.vote_counts?(v(),D(a,{key:1,class:"fcom_arrow_icon"},{default:w(()=>[_(r)]),_:1})):O("",!0)],8,Dyt),s.totalCount?(v(),A("span",{key:0,style:Xe(o.getVoteStyle(c.vote_counts)),class:"fc_app_shadow"},null,4)):O("",!0)],10,$yt))),128))]),g("div",Vyt,[s.totalCount?(v(),A("span",Fyt,S(t.$_n("%d vote","%d votes",s.totalCount)),1)):O("",!0),s.endingDate?(v(),A(ee,{key:1},[o.isEnded?(v(),A("span",{key:0,title:t.$t("Ended at: %s",s.endingDate),class:"meta_line"},S(o.endedDateLabel),9,Nyt)):(v(),A("span",{key:1,title:t.$t("Will end at: %s",s.endingDate),class:"meta_line"},S(o.endingDateLabel),9,Byt))],64)):O("",!0)])],2),s.showVotersDialog?(v(),D(l,{key:0,feed:n.feed,option:s.selectedOption,options:s.formattedOptions,totalCount:s.totalCount,onUpdateOption:o.updateOption,onClose:e[0]||(e[0]=c=>s.showVotersDialog=!1)},null,8,["feed","option","options","totalCount","onUpdateOption"])):O("",!0)],64)}const KH=de(xyt,[["render",zyt]]),Hyt={name:"BookmarkIcon",props:["is_active"]},Uyt={key:0,style:{color:"#1d9bf0"},class:"bookmark_icon_active",width:"16",height:"20",viewBox:"0 0 16 20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},jyt=g("path",{d:"M1.33331 14.9839V8.08944C1.33331 5.06164 1.33331 3.54774 2.30962 2.60712C3.28593 1.6665 4.85728 1.6665 7.99998 1.6665C11.1427 1.6665 12.714 1.6665 13.6903 2.60712C14.6666 3.54774 14.6666 5.06164 14.6666 8.08944V14.9839C14.6666 16.9054 14.6666 17.8662 14.0226 18.2101C12.7754 18.876 10.436 16.6542 9.32498 15.9852C8.68064 15.5972 8.35847 15.4032 7.99998 15.4032C7.64148 15.4032 7.31932 15.5972 6.67498 15.9852C5.56398 16.6542 3.22454 18.876 1.97735 18.2101C1.33331 17.8662 1.33331 16.9054 1.33331 14.9839Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Wyt=[jyt],Yyt={key:1,width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},qyt=g("path",{d:"M1.33331 14.9839V8.08944C1.33331 5.06164 1.33331 3.54774 2.30962 2.60712C3.28593 1.6665 4.85728 1.6665 7.99998 1.6665C11.1427 1.6665 12.714 1.6665 13.6903 2.60712C14.6666 3.54774 14.6666 5.06164 14.6666 8.08944V14.9839C14.6666 16.9054 14.6666 17.8662 14.0226 18.2101C12.7754 18.876 10.436 16.6542 9.32498 15.9852C8.68064 15.5972 8.35847 15.4032 7.99998 15.4032C7.64148 15.4032 7.31932 15.5972 6.67498 15.9852C5.56398 16.6542 3.22454 18.876 1.97735 18.2101C1.33331 17.8662 1.33331 16.9054 1.33331 14.9839Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),Gyt=[qyt];function Xyt(t,e,n,i,s,o){return n.is_active?(v(),A("svg",Uyt,Wyt)):(v(),A("svg",Yyt,Gyt))}const Kyt=de(Hyt,[["render",Xyt]]),Zyt={name:"RenderChildPost",components:{ImageCarousel:nS,SurveyRenderer:KH,DocumentLists:G1,UserRouteLink:Jr,MediaPreview:gp,FeedMdContent:K1},props:["feed_id"],data(){return{feed:null,loading:!1,notFound:null,in_space:this.$route.params.space,hasOverflowContent:!1}},computed:{hasTopMedia(){var e,n,i,s,o,r;if(this.appVars.features.post_layout!="modern"||!this.feed)return!1;let t=["oembed","iframe_html"].includes((n=(e=this.feed.meta)==null?void 0:e.media_preview)==null?void 0:n.type);return t||(t=(s=(i=this.feed.meta)==null?void 0:i.media_preview)==null?void 0:s.is_uploaded),t||(t=((r=(o=this.feed.meta)==null?void 0:o.media_items)==null?void 0:r.length)==1),t},feedClasses(){if(!this.feed)return[];let t=["feed_single"];return t.push("feed_type_"+this.feed.type),this.hasTopMedia&&t.push("feed_modern_layout"),t}},methods:{getFeed(){this.loading=!0,this.$get("feeds/"+this.feed_id+"/by-id").then(t=>{this.feed=t.feed,this.appVars.last_feed_id<t.feed.id&&(this.appVars.last_feed_id=t.feed.id),this.$nextTick(()=>{this.setOverFlow()})}).catch(t=>{typeof t=="object"&&t.xhr_status==404?this.notFound=!0:this.$handleError(t)}).finally(()=>{this.loading=!1})},handleFeedClick(t){t.preventDefault()&&t.stopPropagation();let e={name:"single_feed",params:{feed_slug:this.feed.slug}};this.feed.space&&(e={name:"space_feed",params:{feed_slug:this.feed.slug,space:this.feed.space.slug}}),this.$router.push(e)},setOverFlow(){let t=this.$refs.feed_body;if(!t)return;t.scrollHeight>400&&(this.hasOverflowContent=!0)}},mounted(){this.getFeed()}},Jyt=["id"],Qyt={key:0,class:"fcom_top_media"},ebt={class:"fcom_feed_header_wrap"},tbt={class:"feed_header"},nbt={key:0,class:"feed_user"},sbt={class:"feed_user_name"},ibt={class:"feed_meta_info"},obt={key:0,class:"meta_line"},rbt=["title","href"],abt={key:1,class:"feed_timestamp"},lbt={key:0,class:"feed_title"},cbt={class:"feed_title_heading"},ubt={key:1,class:"expand-button"};function dbt(t,e,n,i,s,o){var p,m,y,b,k,C,$,x,M,P,T;const r=W("media-preview"),a=W("UserAvatar"),l=W("UserRouteLink"),c=W("FeedMdContent"),u=We,d=W("DocumentLists"),h=W("SurveyRenderer"),f=W("ImageCarousel");return s.feed?(v(),A("div",{key:0,onClick:e[0]||(e[0]=(...I)=>o.handleFeedClick&&o.handleFeedClick(...I)),class:"fcom_child_feed"},[g("div",{id:"feed_id_"+s.feed.id,class:G([o.feedClasses,"feed"])},[o.hasTopMedia?(v(),A("div",Qyt,[s.feed.meta&&s.feed.meta.media_preview?(v(),D(r,{key:0,feed:s.feed},null,8,["feed"])):O("",!0)])):O("",!0),g("div",ebt,[g("div",tbt,[s.feed.xprofile?(v(),A("div",nbt,[_(a,{with_level:!1,xprofile:s.feed.xprofile},null,8,["xprofile"]),g("div",null,[g("div",sbt,[_(l,{show_badge:!0,xprofile:s.feed.xprofile,show_follow:!0},null,8,["xprofile"])]),g("div",ibt,[s.feed.content_type=="survey"&&((b=(y=(m=(p=s.feed)==null?void 0:p.meta)==null?void 0:m.survey_config)==null?void 0:y.options)!=null&&b.length)?(v(),A("span",obt,S(t.$t("created a poll")),1)):O("",!0),g("a",{title:s.feed.created_at,href:s.feed.permalink,class:"feed_timestamp"},S(t.humanDateDiff(s.feed.created_at)),9,rbt),!s.in_space&&s.feed.space?(v(),A("span",abt,S(t.$t("Posted in %s",t.getExcerpt(s.feed.space.title,30))),1)):O("",!0)])])])):O("",!0)])]),g("div",{ref:"feed_body",class:G([{feed_is_overflow_content:s.hasOverflowContent},"feed_body"])},[s.feed.title?(v(),A("div",lbt,[g("h2",cbt,S(s.feed.title),1)])):O("",!0),_(c,{class_name:"feed_texts",content:s.feed.message_rendered},null,8,["content"]),s.hasOverflowContent?(v(),A("div",ubt,[_(u,{class:"btn_expand"},{default:w(()=>[B(S(t.$t("Show More")),1)]),_:1})])):O("",!0)],2),s.feed.content_type=="document"?(v(),D(d,{key:1,document_lists:((C=(k=s.feed)==null?void 0:k.meta)==null?void 0:C.document_lists)||[]},null,8,["document_lists"])):(v(),A(ee,{key:2},[s.feed.content_type=="survey"&&((P=(M=(x=($=s.feed)==null?void 0:$.meta)==null?void 0:x.survey_config)==null?void 0:M.options)!=null&&P.length)?(v(),D(h,{key:0,feed:s.feed,isChildFeed:!0},null,8,["feed"])):O("",!0),s.feed.meta?(v(),A(ee,{key:1},[s.feed.meta.media_items?(v(),D(f,{key:0,feed:s.feed},null,8,["feed"])):!o.hasTopMedia&&(s.feed.meta.media_preview||(T=s.feed.meta.audio_medias)!=null&&T.length)?(v(),D(r,{key:1,feed:s.feed},null,8,["feed"])):O("",!0)],64)):O("",!0)],64))],10,Jyt)])):O("",!0)}const hbt=de(Zyt,[["render",dbt]]),fbt={name:"CustomAppMeta",components:{RenderChildPost:hbt},props:{feed:{type:Object,required:!0}}},pbt={ref:"fcom_custom_app"},mbt={key:0},gbt=["innerHTML"];function vbt(t,e,n,i,s,o){const r=W("RenderChildPost");return v(),A("div",pbt,[n.feed.meta.custom_app_preview.app_name=="child_post"&&n.feed.meta.custom_app_preview.feed_id?(v(),A("div",mbt,[_(r,{feed_id:n.feed.meta.custom_app_preview.feed_id},null,8,["feed_id"])])):n.feed.meta.custom_app_preview.custom_html?(v(),A("div",{key:1,innerHTML:n.feed.meta.custom_app_preview.custom_html},null,8,gbt)):O("",!0)],512)}const _bt=de(fbt,[["render",vbt]]),ybt={name:"FeedAction",components:{EditFeed:XH},props:{feed:{type:Object,required:!0},hide_create_form:{type:Boolean,default:!1}},emits:["updated","deleted"],data(){return{isEdit:!1,working:!1}},computed:{isReportEnabled(){return this.has_pro&&this.appVars.moderationConfig.is_enabled},showReportOption(){var e,n;return!(((e=this.feed)==null?void 0:e.user_id)==((n=this.auth)==null?void 0:n.user_id))&&this.auth.user_id&&this.isReportEnabled}},methods:{editItem(){this.$refs.popover.hide(),this.isEdit=!0},handleUpdate(t){this.$emit("updated",t);const e=document.getElementById("feed_id_"+t.id);e&&(e.classList.add("fcom_highlight_glow"),setTimeout(()=>{e.classList.remove("fcom_highlight_glow")},4500))},reportPost(){this.$refs.popover.hide(),this.$eventBus.emit("showReportContentModal",{reportConfig:this.feed,type:"post"})},copyFeedLink(){navigator.clipboard.writeText(this.feed.permalink).then(()=>{this.$notify.success(this.$t("Link copied to clipboard")),this.$refs.popover.hide()}).catch(t=>{this.$notify.error(this.$t("Failed to copy"))})},toggleSticky(){!this.feed.space_id||this.working||(this.working=!0,this.feed.is_sticky=!this.feed.is_sticky,this.$patch("feeds/"+this.feed.id,{is_sticky:this.feed.is_sticky?1:0}).then(t=>{this.feed.is_sticky=t.feed.is_sticky,this.$emit("reload")}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1}))},toggleSidebarPin(){!this.feed.space_id||this.working||(this.$refs.popover.hide(),this.working=!0,this.feed.priority=!this.feed.priority,this.$patch("feeds/"+this.feed.id,{priority:this.feed.priority?1:0}).then(t=>{this.$notify.success(t.feed.priority?this.$t("Pinned to sidebar"):this.$t("Unpinned from sidebar")),this.feed.priority=t.feed.priority,this.$eventBus.emit("updateSpaceSidebar",this.feed.space_id)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1}))},toggleUnlist(){if(this.working)return;const t=this.feed.status!=="unlisted";this.$refs.popover.hide(),this.working=!0,this.$patch("feeds/"+this.feed.id,{status:t?"unlisted":"published"}).then(e=>{this.feed.status=e.feed.status,this.$notify.success(e.feed.status==="unlisted"?this.$t("Post has been unlisted."):this.$t("Post has been listed.")),this.$emit("updated",e.feed)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})},toggleCommentStatus(){var e;if(this.working)return;let t=((e=this.feed.meta)==null?void 0:e.comments_disabled)=="yes";this.$refs.popover.hide(),this.working=!0,this.$patch("feeds/"+this.feed.id,{comments_disabled:t?0:1}).then(n=>{var s;let i=((s=n.feed.meta)==null?void 0:s.comments_disabled)=="yes";this.$notify.success(i?this.$t("Comments have been disabled."):this.$t("Comments have been enabled.")),this.feed.meta.comments_disabled=n.feed.meta.comments_disabled}).catch(n=>{this.$handleError(n)}).finally(()=>{this.working=!1})},removePreview(){this.$refs.popover.hide(),this.$confirm(this.$t("Are you sure you want to remove the preview image? This action cannot be undone."),this.$t("Remove Preview"),{confirmButtonText:this.$t("Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working=!0,this.$del("feeds/"+this.feed.id+"/media-preview").then(t=>{this.feed.meta.media_preview=null}).catch(t=>{this.$handleError(t)}).finally(()=>{this.working=!1})}).catch(()=>{})},deleteItem(){this.working||(this.$refs.popover.hide(),this.$confirm(this.$t("Are you sure you want to delete this feed?"),this.$t("Warning"),{confirmButtonText:this.$t("Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working||(this.working=!0,this.$emit("deleted"),this.working=!1)}).catch(()=>{}))}}},bbt={class:"actions_items"},wbt={key:0},kbt={key:1},Cbt={key:0},xbt={key:1},Sbt={key:0},$bt={key:1},Abt={key:0},Ebt={key:1};function Mbt(t,e,n,i,s,o){var d,h;const r=W("MoreFilled"),a=be,l=We,c=No,u=W("EditFeed");return v(),A(ee,null,[_(c,{persistent:!1,ref:"popover",placement:"bottom",width:200,trigger:"click",teleported:!1,"popper-class":"fcom_menu_below_nav"},{reference:w(()=>[_(l,{"aria-label":t.$t("View Post actions"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1})]),_:1},8,["aria-label"])]),default:w(()=>{var f,p;return[g("ul",bbt,[le(t.$slots,"before_feed_actions_pop"),g("li",{onClick:e[0]||(e[0]=m=>o.copyFeedLink())},S(t.$t("Copy Link")),1),o.showReportOption?(v(),A("li",{key:0,onClick:e[1]||(e[1]=m=>o.reportPost())},S(t.$t("Report Post")),1)):O("",!0),t.canEditFeed(n.feed)?(v(),A(ee,{key:1},[g("li",{onClick:e[2]||(e[2]=m=>o.editItem())},S(t.$t("Edit")),1),t.has_pro&&t.isCommunityModerator()&&["published","unlisted"].includes(n.feed.status)?(v(),A("li",{key:0,onClick:e[3]||(e[3]=m=>o.toggleUnlist())},[n.feed.status=="unlisted"?(v(),A("span",wbt,S(t.$t("List Post")),1)):(v(),A("span",kbt,S(t.$t("Unlist Post")),1))])):O("",!0),n.feed.space&&t.hasSpaceAdminAccess(n.feed.space)?(v(),A(ee,{key:1},[g("li",{onClick:e[4]||(e[4]=m=>o.toggleSticky())},[n.feed.is_sticky?(v(),A("span",Cbt,S(t.$t("Unpin from Top")),1)):(v(),A("span",xbt,S(t.$t("Pin to top")),1))]),g("li",{onClick:e[5]||(e[5]=m=>o.toggleSidebarPin())},[n.feed.priority?(v(),A("span",$bt,S(t.$t("Unpin from sidebar")),1)):(v(),A("span",Sbt,S(t.$t("Pin to sidebar")),1))])],64)):O("",!0),(f=n.feed.meta)!=null&&f.media_preview?(v(),A("li",{key:2,onClick:e[6]||(e[6]=m=>o.removePreview())},S(t.$t("Remove Preview")),1)):O("",!0),t.hasSpaceAdminAccess(n.feed.space)?(v(),A("li",{key:3,onClick:e[7]||(e[7]=m=>o.toggleCommentStatus())},[((p=n.feed.meta)==null?void 0:p.comments_disabled)=="yes"?(v(),A("span",Abt,S(t.$t("Enable comments")),1)):(v(),A("span",Ebt,S(t.$t("Disable comments")),1))])):O("",!0)],64)):O("",!0),t.canDeleteFeed(n.feed)?(v(),A("li",{key:2,onClick:e[8]||(e[8]=m=>o.deleteItem())},S(t.$t("Delete")),1)):O("",!0),le(t.$slots,"after_feed_actions_pop")])]}),_:3},512),s.isEdit?(v(),D(u,{key:0,feedSlug:n.feed.slug,dialogVisible:s.isEdit,hide_create_form:n.hide_create_form,author:{name:(d=n.feed.xprofile)==null?void 0:d.display_name,avatar:(h=n.feed.xprofile)==null?void 0:h.avatar},onUpdated:o.handleUpdate,onClose:e[9]||(e[9]=f=>s.isEdit=!1)},null,8,["feedSlug","dialogVisible","hide_create_form","author","onUpdated"])):O("",!0)],64)}const Tbt=de(ybt,[["render",Mbt]]),Pbt={name:"Feed",components:{DocumentLists:G1,CustomAppMeta:_bt,BookmarkIcon:Kyt,StickyIcon:SH,UserRouteLink:Jr,EditFeed:XH,FeedFooter:a_t,MediaPreview:gp,ImageCarousel:nS,SurveyRenderer:KH,ReportReview:xH,FeedAction:Tbt,FeedMdContent:K1},emits:["updated","deleted","removed","reload","commented"],props:{feed:{type:Object,required:!0},is_single:{type:Boolean,default:!1},is_route:{type:Boolean,default:!1},show_footer:{type:Boolean,default:!0},show_header:{type:Boolean,default:!0},show_report:{type:Boolean,default:!1},hide_create_form:{type:Boolean,default:!1},is_preview:{type:Boolean,default:!1},show_actions:{type:Boolean,default:!0},is_modal:{type:Boolean,default:!1},isSingleSpacePage:{type:Boolean,default:!1}},data(){return{in_space:this.$route.params.space,working:!1,hasOverflowContent:!1,isExpanded:!1,joiningSpace:!1}},computed:{isReportEnabled(){return this.has_pro&&this.appVars.moderationConfig.is_enabled},showReport(){var t;return this.hasSpaceModeratorAccess(this.feed.space)&&this.isReportEnabled&&this.show_report&&(this.feed.status=="pending"||((t=this.feed.meta)==null?void 0:t.reports_count))},space_slug(){let t=!1;return this.feed.space?t=this.feed.space.slug:this.$route.params.space&&(t=this.$route.params.space),t},feedClasses(){let t=[];return t.push("feed_type_"+this.feed.type),this.feed.type=="article"&&t.push(this.feed.featured_image?"feed_has_image":"feed_no_image"),this.is_preview&&t.push("feed_preview"),this.is_single?t.push("feed_single"):t.push("feed_list_item"),this.hasTopMedia&&t.push("feed_modern_layout"),t},feedRoute(){let t={name:"single_feed",params:{feed_slug:this.feed.slug}};return this.space_slug&&(t={name:"space_feed",params:{feed_slug:this.feed.slug,space:this.space_slug}}),t},hasTopMedia(){var e,n,i,s,o,r;if(this.appVars.features.post_layout!="modern")return!1;let t=["oembed","iframe_html"].includes((n=(e=this.feed.meta)==null?void 0:e.media_preview)==null?void 0:n.type);return t||(t=(s=(i=this.feed.meta)==null?void 0:i.media_preview)==null?void 0:s.is_uploaded),t||(t=((r=(o=this.feed.meta)==null?void 0:o.media_items)==null?void 0:r.length)==1),t},parsedMessage(){return this.parseMessage(this.feed.message_rendered)}},methods:{getTopicRoute(t){return this.space_slug?{name:"space_feeds",params:{space:this.space_slug},query:{topic:t}}:{name:"all_feeds",query:{topic:t}}},getScheduledTime(t){return this.$t("%1$s at %2$s",this.formattedDate(t),this.formattedTime(t))},gotoTopicUrl(t){let e=this.getTopicRoute(t);this.$router.push(e)},gotoFeed(t){t&&(t.metaKey||t.ctrlKey)||(t&&(t.preventDefault(),t.stopPropagation()),window.__showing_feed=this.feed,this.$router.push(this.feedRoute))},getSpaceRoute(t){return{name:"space_feeds",params:{space:t}}},getFeedContent(){return this.feed.title},expandInline(){this.hasOverflowContent=!1,this.isExpanded=!0},showFullContent(t){if(!this.hasFeature("show_post_modal")){this.expandInline();return}t&&t.stopPropagation(),this.$eventBus.emit("showFeedModal",{feed:this.feed})},parseMessage(t){if(!t)return"";const e=this.$route.params.space?`${this.appVars.urls.portal_base}space/${this.$route.params.space}/home`:this.appVars.urls.global_search;let n=t.replace(/<a\s(?:(?!target="_blank")[^>])*>|<[^>]+>|#([\p{L}\p{M}\p{N}_-]+)/gu,(s,o,r,a)=>s.startsWith("<a")&&!s.includes('target="_blank"')?s.includes(window.location.origin)?s:s.replace("<a",'<a target="_blank" rel="noopener noreferrer nofollow"'):o&&!this.isInsideHtmlTag(a,r)?`<a onclick="window.FluentCommunityUtil.handleSearchClick(event)" href="${e}?search=%23${o}">#${o}</a>`:s);return n.indexOf('<span class="fcom_dynamic_prop" data-type="timestamp"')===-1?n:(s=>s.replace(/<span class="fcom_dynamic_prop" data-type="timestamp" data-timestamp="(\d+)">([^<]+)<\/span>/g,(o,r,a)=>{try{const l=this.dayjs(r*1e3);if(!l.isValid())return o;const u=l.local().format(this.siteDateTimeFormat)+" ("+this.currentTimeZoneName+")";return`<span class="fcom_timestamp" title="${a}">${u}</span>`}catch{return o}}))(n)},isInsideHtmlTag(t,e){let n=!1;for(let i=0;i<e;i++)t[i]==="<"&&(n=!0),t[i]===">"&&(n=!1);return n},handleUpdate(t){this.$emit("updated",t),Object.assign(this.feed,t)},handleDelete(){this.$emit("deleted")},handleRemoveBookmark(){this.$emit("deleted")},toggleBookmark(){const t={react_type:"bookmark"};this.feed.bookmarked&&(t.remove=!0),this.feed.bookmarked=!this.feed.bookmarked,this.$post("feeds/"+this.feed.id+"/react",t).then(e=>{this.$notify.success(this.feed.bookmarked?this.$t("Bookmarked"):this.$t("Removed from bookmark")),!this.feed.bookmarked&&this.$route.name==="bookmarks"&&this.$emit("removeFromBookmark")}).catch(e=>{this.$handleError(e),this.feed.bookmarked=!this.feed.bookmarked})},toggleSticky(){this.feed.space_id&&(this.feed.is_sticky=!this.feed.is_sticky,this.$patch("feeds/"+this.feed.id,{is_sticky:this.feed.is_sticky?1:0}).then(t=>{this.feed.is_sticky=t.feed.is_sticky,this.$emit("reload")}).catch(t=>{this.$handleError(t)}))},joinSpace(){this.joiningSpace=!0,this.$post("spaces/"+this.feed.space.slug+"/join").then(t=>{this.appVars.user_membership_slugs.push(this.feed.space.slug),this.$notify.success(t.message),document.location.href=this.feed.permalink}).catch(t=>{this.$handleError(t)}).finally(()=>{this.joiningSpace=!1})},onModReport(t){var e,n;((e=t.content)==null?void 0:e.id)==((n=this.feed)==null?void 0:n.id)&&(t.action==="unpublished"&&t.type!=="comment"?this.$emit("removed"):(this.feed.meta={...this.feed.meta,...t.content.meta},t.content.status&&(this.feed.status=t.content.status)))}},created(){this.$eventBus.on("updateModerationReport",this.onModReport)},beforeUnmount(){this.$eventBus.off("updateModerationReport",this.onModReport)},mounted(){if(document.dispatchEvent(new CustomEvent("fcomFeedMounted",{detail:{isSingle:this.is_single,feed:this.feed,feedBody:this.$refs.feed_body}})),this.is_single||this.feed.is_sticky||this.feed.priority){this.isExpanded=!0;return}let t=this.$refs.feed_body;if(!t)return;t.scrollHeight>400&&(this.hasOverflowContent=!0)}},Ibt=["id"],Lbt={key:1,class:"fcom_top_media"},Obt={key:2,class:"fcom_feed_header_wrap"},Dbt={class:"feed_actions fcom_concat_buttons"},Rbt={key:0,class:"fcom_feed_topics"},Vbt={class:"feed_header"},Fbt={key:0,class:"feed_user"},Nbt={class:"feed_user_info"},Bbt={class:"feed_user_name"},zbt={key:0,class:"feed_status"},Hbt={key:1,class:"feed_status"},Ubt={key:2,class:"feed_status"},jbt={class:"feed_meta_info"},Wbt={key:0,class:"meta_line"},Ybt=["title","href"],qbt=["title","href"],Gbt={key:3},Xbt={key:0,class:"feed_title"},Kbt={key:0,class:"feed_title_heading"},Zbt=["href"],Jbt={key:1,class:"feed_title_heading"};function Qbt(t,e,n,i,s,o){var T,I,L,R,V,H,F,z,N,q,K,X,U,Q,ne;const r=W("report-review"),a=W("media-preview"),l=We,c=W("StickyIcon"),u=be,d=W("BookmarkIcon"),h=W("FeedAction"),f=W("router-link"),p=W("UserAvatar"),m=W("UserRouteLink"),y=Ci,b=W("FeedMdContent"),k=W("SurveyRenderer"),C=W("ImageCarousel"),$=W("DocumentLists"),x=W("CustomAppMeta"),M=W("feed-footer"),P=xt("loading");return De((v(),A("div",{id:"feed_id_"+((T=n.feed)==null?void 0:T.id),class:G([o.feedClasses,"feed"])},[o.showReport?(v(),D(r,{key:0,feed:n.feed},null,8,["feed"])):O("",!0),o.hasTopMedia?(v(),A("div",Lbt,[n.feed.meta&&n.feed.meta.media_preview?(v(),D(a,{key:0,feed:n.feed,is_preview:n.is_preview},null,8,["feed","is_preview"])):O("",!0)])):O("",!0),n.show_header?(v(),A("div",Obt,[g("div",Dbt,[t.auth.user_id&&!t.hasSpaceAccess((I=n.feed.space)==null?void 0:I.slug)&&!n.is_single&&!n.isSingleSpacePage?(v(),D(l,{key:0,loading:s.joiningSpace,class:"fcom_secondary_button join_button",onClick:e[0]||(e[0]=Z=>o.joinSpace())},{default:w(()=>[B(S(t.$t("Join")),1)]),_:1},8,["loading"])):O("",!0),n.show_actions?(v(),A(ee,{key:1},[n.feed.is_sticky&&s.in_space?(v(),D(l,{key:0,onClick:e[1]||(e[1]=Z=>o.toggleSticky()),"aria-label":t.$t("Toggle Sticky"),class:"no_pad_btn",text:"",size:"small"},{default:w(()=>[_(u,{class:"fcom_sticky"},{default:w(()=>[_(c)]),_:1})]),_:1},8,["aria-label"])):O("",!0),t.auth.user_id?(v(),D(l,{key:1,"aria-label":t.$t("Toggle Bookmark"),size:"small",text:"",onClick:e[2]||(e[2]=Z=>o.toggleBookmark()),class:G([{bookmark_active:n.feed.bookmarked},"feed_bookmark no_pad_btn"]),title:n.feed.bookmarked?t.$t("Remove From Bookmark"):t.$t("Bookmark this post")},{default:w(()=>[_(u,{style:{"font-size":"14px"}},{default:w(()=>[_(d,{is_active:n.feed.bookmarked},null,8,["is_active"])]),_:1})]),_:1},8,["aria-label","class","title"])):O("",!0),_(h,{feed:n.feed,hide_create_form:n.hide_create_form,onUpdated:o.handleUpdate,onDeleted:o.handleDelete},{before_feed_actions_pop:w(()=>[n.is_route?(v(),A("li",{key:0,onClick:e[3]||(e[3]=Z=>t.$emit("reload"))},S(t.$t("Refresh")),1)):O("",!0)]),_:1},8,["feed","hide_create_form","onUpdated","onDeleted"])],64)):O("",!0),le(t.$slots,"after_feed_actions")]),((L=t.appVars.topicsConfig)==null?void 0:L.show_on_post_card)=="yes"&&n.feed.terms&&n.feed.terms.length?(v(),A("div",Rbt,[(v(!0),A(ee,null,Ce(n.feed.terms,Z=>(v(),D(f,{onClick:Ae(ae=>o.gotoTopicUrl(Z.slug),["prevent"]),key:Z.slug,to:o.getTopicRoute(Z.slug),class:"feed_timestamp"},{default:w(()=>[B("#"+S(Z.title),1)]),_:2},1032,["onClick","to"]))),128))])):O("",!0),g("div",Vbt,[n.feed.xprofile?(v(),A("div",Fbt,[_(p,{with_level:!1,xprofile:n.feed.xprofile},null,8,["xprofile"]),g("div",Nbt,[g("div",Bbt,[_(m,{show_badge:!0,xprofile:n.feed.xprofile,show_follow:!0},null,8,["xprofile"]),n.feed.status=="pending"?(v(),A("span",zbt,[_(y,{type:"warning"},{default:w(()=>[B(S(t.$t("In Review")),1)]),_:1})])):O("",!0),n.feed.status=="scheduled"?(v(),A("span",Hbt,[_(y,{type:"warning"},{default:w(()=>[B(S(t.$t("Scheduled")),1)]),_:1})])):O("",!0),n.feed.status=="unlisted"&&!n.is_single?(v(),A("span",Ubt,[_(y,{class:"fcom_unlisted_tag"},{default:w(()=>[B(S(t.$t("Unlisted")),1)]),_:1})])):O("",!0)]),g("div",jbt,[n.feed.content_type=="survey"&&((F=(H=(V=(R=n.feed)==null?void 0:R.meta)==null?void 0:V.survey_config)==null?void 0:H.options)!=null&&F.length)?(v(),A("span",Wbt,S(t.$t("created a poll")),1)):O("",!0),n.feed.status=="scheduled"?(v(),A("a",{key:1,title:n.feed.scheduled_at,onClick:e[4]||(e[4]=(...Z)=>o.gotoFeed&&o.gotoFeed(...Z)),href:n.feed.permalink,class:"feed_timestamp"},S(o.getScheduledTime(n.feed.scheduled_at)),9,Ybt)):(v(),A("a",{key:2,title:n.feed.created_at,onClick:e[5]||(e[5]=(...Z)=>o.gotoFeed&&o.gotoFeed(...Z)),href:n.feed.permalink,class:"feed_timestamp"},S(t.humanDateDiff(n.feed.created_at)),9,qbt)),!s.in_space&&n.feed.space?(v(),A("span",Gbt,[_(f,{to:o.getSpaceRoute(n.feed.space.slug),class:"feed_timestamp"},{default:w(()=>[B(S(t.$t("Posted in %s",t.getExcerpt(n.feed.space.title,30))),1)]),_:1},8,["to"])])):O("",!0)])])])):O("",!0),le(t.$slots,"after_feed_header")])])):O("",!0),g("div",{ref:"feed_body",class:G([{feed_is_overflow_content:s.hasOverflowContent},"feed_body"])},[n.feed.title?(v(),A("div",Xbt,[n.is_single?(v(),A("h2",Jbt,S(n.feed.title),1)):(v(),A("h2",Kbt,[g("a",{onClick:e[6]||(e[6]=Ae((...Z)=>o.showFullContent&&o.showFullContent(...Z),["prevent"])),href:n.feed.permalink},S(n.feed.title),9,Zbt)]))])):O("",!0),_(b,{class_name:"feed_texts",content:o.parsedMessage},null,8,["content"]),s.hasOverflowContent&&!s.isExpanded?(v(),A("div",{key:1,onClick:e[7]||(e[7]=Z=>o.expandInline()),class:"expand-button"},[_(l,{class:"btn_expand"},{default:w(()=>[B(S(t.$t("Show More")),1)]),_:1})])):O("",!0)],2),n.feed.content_type=="survey"&&((K=(q=(N=(z=n.feed)==null?void 0:z.meta)==null?void 0:N.survey_config)==null?void 0:q.options)!=null&&K.length)?(v(),A(ee,{key:3},[_(k,{feed:n.feed,is_preview:n.is_preview,hasTopMedia:o.hasTopMedia},null,8,["feed","is_preview","hasTopMedia"]),n.feed.meta.media_items?(v(),D(C,{key:0,is_single:n.is_single,feed:n.feed},null,8,["is_single","feed"])):!o.hasTopMedia&&(n.feed.meta.media_preview||(X=n.feed.meta.audio_medias)!=null&&X.length)?(v(),D(a,{key:1,feed:n.feed},null,8,["feed"])):O("",!0)],64)):n.feed.content_type=="document"?(v(),D($,{key:4,document_lists:((Q=(U=n.feed)==null?void 0:U.meta)==null?void 0:Q.document_lists)||[]},null,8,["document_lists"])):n.feed.meta?(v(),A(ee,{key:5},[n.feed.meta.media_items?(v(),D(C,{key:0,is_single:n.is_single,feed:n.feed},null,8,["is_single","feed"])):!o.hasTopMedia&&(n.feed.meta.media_preview||(ne=n.feed.meta.audio_medias)!=null&&ne.length)?(v(),D(a,{key:1,feed:n.feed},null,8,["feed"])):O("",!0),n.feed.meta.custom_app_preview?(v(),D(x,{key:2,feed:n.feed},null,8,["feed"])):O("",!0)],64)):O("",!0),n.show_footer?(v(),D(M,{key:6,feed:n.feed,is_modal:n.is_modal,is_single:n.is_single,space_slug:o.space_slug,onJoinSpace:e[8]||(e[8]=()=>{o.joinSpace()}),onCommented:e[9]||(e[9]=Z=>{t.$emit("commented",Z)})},null,8,["feed","is_modal","is_single","space_slug"])):O("",!0),le(t.$slots,"after_feed_footer")],10,Ibt)),[[P,s.working]])}const e2t=de(Pbt,[["render",Qbt]]),t2t={name:"ReportDetails",components:{Feed:e2t,SingleComent:v2,Pagination:Jc},props:["is_open","report","status"],data(){return{loading:!1,isOpen:this.is_open,currentTab:"details",postReports:[],pagination:{page:1,per_page:5,total:0}}},watch:{is_open(t){this.isOpen=t},isOpen(t){t||this.$emit("close")}},computed:{isCommentReport(){return t=>t.content_type=="comment"},getReason(){return t=>this.appVars.report_reasons[t]},getPermalink(){return t=>{var n,i;const e=(n=t.post)==null?void 0:n.permalink;return t.content_type=="comment"?`${e}?comment_id=${(i=t.comment)==null?void 0:i.id}`:e}},getAuthorProfile(){return t=>t.content_type=="comment"?t.comment.xprofile:t.post.xprofile},getIgnoreBtnText(){return t=>t.status=="unpublished"?this.$t("Publish")+" "+this.$t(this.ucFirst(t.content_type)):this.$t("Dismiss Reports")},getUnpublishBtnText(){return t=>t.status=="unpublished"?this.$t("Publish")+" "+this.$t(this.ucFirst(t.content_type)):this.$t("Unpublish")+" "+this.$t(this.ucFirst(t.content_type))}},methods:{switchOption(t){this.currentTab=t},getPostReports(){this.loading=!0;let t={page:this.pagination.page,per_page:this.pagination.per_page,content_type:this.report.content_type};this.report.content_type=="comment"?t.parent_id=this.report.parent_id:t.post_id=this.report.post_id,this.$get("moderation/reports",t).then(e=>{this.postReports=e.reports.data,this.pagination.total=e.reports.total}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},ignoreReport(t){this.isOpen=!1,this.$emit("close"),this.$emit("ignore",t)},unpublishReport(t){this.isOpen=!1,this.$emit("close"),this.$emit("unpublish",t)},deleteReport(t){this.isOpen=!1,this.$emit("close"),this.$emit("delete",t)}},mounted(){this.currentTab="details",this.getPostReports()}},n2t={class:"dialog_header report_details_header"},s2t={class:"report_details_header_left"},i2t={class:"report_details_header_right"},o2t=["href"],r2t=["href"],a2t=["href"],l2t=["href"],c2t={class:"meta_line"},u2t=["href","title"],d2t={key:0,class:"dialog_body"},h2t={class:"fcom_filter_menu"},f2t={class:"fcom_filter_menu_ul"},p2t={key:0,class:"report_details"},m2t={key:1,class:"report_details"},g2t={class:"report_details_header"},v2t={class:"report_details_header_left"},_2t={class:"report_details_header_right"},y2t={key:0},b2t={key:1},w2t={key:1},k2t={class:"report_reason"},C2t=["title"],x2t={key:0,class:"report_details_body"},S2t=["textContent"],$2t={key:2,role:"region","aria-label":"Pagination",class:"pagination_wrap"},A2t={class:"dialog_footer report_footer"};function E2t(t,e,n,i,s,o){const r=W("UserAvatar"),a=W("UserRouteLink"),l=W("SingleComent"),c=W("Feed"),u=Wt,d=W("Pagination"),h=We,f=Ss;return v(),D(f,{modelValue:s.isOpen,"onUpdate:modelValue":e[6]||(e[6]=p=>s.isOpen=p),"modal-class":"fcom_common_dialog",id:"fluent_comminity_body",title:t.$t("Review Report"),width:t.dialogWidth,"append-to-body":!0,"close-on-click-modal":!1,direction:"rtl"},{header:w(()=>{var p,m,y,b,k,C,$,x,M,P,T,I,L;return[g("div",n2t,[g("div",s2t,[_(r,{with_level:!1,xprofile:o.getAuthorProfile(n.report)},null,8,["xprofile"])]),g("div",i2t,[g("div",null,[_(a,{show_verified:!1,xprofile:o.getAuthorProfile(n.report)},null,8,["xprofile"]),o.isCommentReport(n.report)?(v(),A("a",{key:0,href:o.getPermalink(n.report)},S(t.$t("commented ")),9,o2t)):(v(),A("a",{key:1,href:o.getPermalink(n.report)},S(t.$t("posted ")),9,r2t)),g("span",null,S(t.$t("in ")),1),o.isCommentReport(n.report)?(v(),A("a",{key:2,href:(m=(p=n.report)==null?void 0:p.post)==null?void 0:m.permalink},S(((b=(y=n.report)==null?void 0:y.post)==null?void 0:b.title)||(($=(C=(k=n.report)==null?void 0:k.post)==null?void 0:C.space)==null?void 0:$.title)),9,a2t)):(v(),A("a",{key:3,href:t.$getRouteLink("s/:slug",{slug:(P=(M=(x=n.report)==null?void 0:x.post)==null?void 0:M.space)==null?void 0:P.slug})},S((L=(I=(T=n.report)==null?void 0:T.post)==null?void 0:I.space)==null?void 0:L.title),9,l2t))]),g("div",c2t,[g("a",{href:o.getPermalink(n.report),title:n.report.created_at},S(t.$t("Reported at ")+t.humanDateDiff(n.report.created_at)),9,u2t)])])])]}),footer:w(()=>[g("div",A2t,[n.status!="ignored"?(v(),D(h,{key:0,class:"fcom_secondary_button",onClick:e[3]||(e[3]=p=>o.ignoreReport(n.report))},{default:w(()=>[B(S(o.getIgnoreBtnText(n.report)),1)]),_:1})):O("",!0),n.status!="unpublished"?(v(),D(h,{key:1,class:"fcom_primary_button",onClick:e[4]||(e[4]=p=>o.unpublishReport(n.report))},{default:w(()=>[B(S(o.getUnpublishBtnText(n.report)),1)]),_:1})):O("",!0),["pending","flagged"].includes(n.status)?O("",!0):(v(),D(h,{key:2,class:"el-button el-button--danger",onClick:e[5]||(e[5]=p=>o.deleteReport(n.report))},{default:w(()=>[B(S(t.$t("Delete Report")),1)]),_:1}))])]),default:w(()=>[n.report?(v(),A("div",d2t,[g("div",h2t,[g("ul",f2t,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Ae(p=>o.switchOption("details"),["prevent"])),class:G({"router-link-exact-active":s.currentTab=="details"}),href:"#"},S(t.$t("Details")),3)]),g("li",null,[g("a",{onClick:e[1]||(e[1]=Ae(p=>o.switchOption("reports"),["prevent"])),class:G({"router-link-exact-active":s.currentTab=="reports"}),href:"#"},S(t.$t("Reports")+" "+n.report.reports_count),3)])])]),s.currentTab=="details"?(v(),A("div",p2t,[o.isCommentReport(n.report)&&n.report.comment?(v(),D(l,{key:0,comment:n.report.comment,show_header:!1},null,8,["comment"])):n.report.post?(v(),D(c,{key:1,feed:n.report.post,show_header:!1,show_footer:!1},null,8,["feed"])):O("",!0)])):O("",!0),s.currentTab=="reports"?(v(),A("div",m2t,[s.loading?(v(),D(u,{key:1,rows:5,animated:!0})):(v(!0),A(ee,{key:0},Ce(s.postReports,p=>(v(),A("div",{key:p.id,class:"report_details_item"},[g("div",g2t,[g("div",v2t,[p.reporter?(v(),D(r,{key:0,with_level:!1,xprofile:p.reporter},null,8,["xprofile"])):O("",!0)]),g("div",_2t,[!p.reporter&&!o.getReason(p.reason)?(v(),A("div",y2t,S(t.$t("Flagged automatically by the site rule")),1)):(v(),A("div",b2t,[p.reporter?(v(),D(a,{key:0,show_verified:!1,xprofile:p.reporter},null,8,["xprofile"])):(v(),A("span",w2t,S(t.$t("By System ")),1)),o.getReason(p.reason)?(v(),A(ee,{key:2},[g("span",null,S(t.$t("reported for ")),1),g("span",k2t,S(o.getReason(p.reason)),1)],64)):O("",!0)])),g("div",{title:p.created_at,class:"meta_line"},S(t.humanDateDiff(p.created_at)),9,C2t)])]),p.explanation?(v(),A("div",x2t,[g("div",{textContent:S(p.explanation)},null,8,S2t)])):O("",!0)]))),128)),s.pagination.total?(v(),A("div",$2t,[_(d,{hide_on_single:!0,onFetch:e[2]||(e[2]=p=>o.getPostReports()),pagination:s.pagination},null,8,["pagination"])])):O("",!0)])):O("",!0)])):O("",!0)]),_:1},8,["modelValue","title","width"])}const M2t=de(t2t,[["render",E2t]]),T2t={name:"ModerationConfig",components:{Drawer:Dd},props:{is_open:{type:Boolean,required:!0},moderation_config:{type:Object,required:!0},saving:{type:Boolean,default:!1}},data(){const t=JSON.parse(JSON.stringify(this.moderation_config||{}));return Array.isArray(t.flag_all_new_posts_spaces)||(t.flag_all_new_posts_spaces=[]),{showConfig:this.is_open,config:t,isDirty:!1,dirtyReady:!1}},watch:{is_open(t){this.showConfig=t},showConfig(t){t||(this.isDirty=!1,this.$emit("closeConfig"))},config:{deep:!0,handler(){this.dirtyReady&&(this.isDirty=!0)}}},methods:{saveConfig(){this.$emit("saveConfig",this.config)},handleCancel(){if(!this.isDirty){this.showConfig=!1;return}this.$confirm(this.$t("You have unsaved changes. Are you sure you want to close this?"),this.$t("Confirm"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.showConfig=!1}).catch(()=>{})}},mounted(){this.$nextTick(()=>{this.dirtyReady=!0})}},P2t={class:"fcom_moderation_settings"},I2t={class:"fcom_moderation_section"},L2t={class:"fcom_input_wrap"},O2t={class:"fcom_moderation_section"},D2t={class:"fcom_moderation_section_head"},R2t={class:"help_text"},V2t={class:"fcom_moderation_section"},F2t={class:"fcom_moderation_section_head"},N2t={class:"fcom_inline_field"},B2t={class:"fcom_inline_row"},z2t={class:"fcom_inline_field"},H2t={class:"fcom_inline_row"},U2t={class:"fcom_inline_field"},j2t={class:"fcom_inline_row"},W2t={class:"fcom_moderation_section"},Y2t={class:"fcom_moderation_section_head"},q2t={class:"fcom_input_wrap"},G2t={class:"fcom_input_wrap"},X2t={class:"fcom_input_wrap"},K2t={class:"help_text"},Z2t={class:"fcom_moderation_footer"};function J2t(t,e,n,i,s,o){const r=W("InfoFilled"),a=be,l=Cs,c=Gt,u=ft,d=en,h=Ib,f=Ur,p=on,m=Jt,y=sn,b=We,k=W("Drawer");return v(),D(k,{modelValue:s.showConfig,"onUpdate:modelValue":e[14]||(e[14]=C=>s.showConfig=C),size:t.dialogWidth,title:t.$t("Moderation Settings"),"append-to-body":!0,"close-on-click-modal":!0,"has-close-confirmation":s.isDirty,"close-confirmation-message":t.$t("You have unsaved changes. Are you sure you want to close this?"),"modal-class":"fcom_common_dialog fcom_moderation_settings",id:"fluent_comminity_body"},{footer:w(()=>[g("div",Z2t,[_(b,{class:"fcom_secondary_button",onClick:o.handleCancel},{default:w(()=>[B(S(t.$t("Cancel")),1)]),_:1},8,["onClick"]),_(b,{class:"fcom_primary_button",loading:n.saving,disabled:n.saving,onClick:o.saveConfig},{default:w(()=>[B(S(t.$t("Update")),1)]),_:1},8,["loading","disabled","onClick"])])]),default:w(()=>[g("div",P2t,[_(y,{onSubmit:e[13]||(e[13]=Ae(C=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[g("div",I2t,[g("div",L2t,[_(c,{modelValue:s.config.is_enabled,"onUpdate:modelValue":e[1]||(e[1]=C=>s.config.is_enabled=C),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Enable Content Moderation"))+" ",1),_(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("When enabled, reported and pending content will appear here for review.")},{default:w(()=>[_(a,{class:"fcom_label_tooltip",onClick:e[0]||(e[0]=Ae(()=>{},["stop"])),role:"button",tabindex:"0","aria-label":t.$t("When enabled, reported and pending content will appear here for review.")},{default:w(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["modelValue"])])]),s.config.is_enabled=="yes"?(v(),A(ee,{key:0},[g("div",O2t,[g("div",D2t,[g("h4",null,S(t.$t("Content Filtering")),1),g("p",null,S(t.$t("Add the blocked words that you want to use for content filtering.")),1)]),_(d,{label:t.$t("Profanity Filter")},{default:w(()=>[_(u,{modelValue:s.config.profanity_filter,"onUpdate:modelValue":e[2]||(e[2]=C=>s.config.profanity_filter=C),placeholder:t.$t("bad, words, here")},null,8,["modelValue","placeholder"]),g("span",R2t,S(t.$t("Use comma-separated words. If these words found then the content will go in review state.")),1)]),_:1},8,["label"])]),g("div",V2t,[g("div",F2t,[g("h4",null,S(t.$t("Automatic Moderation")),1),g("p",null,S(t.$t("Automatically act on content and members once a threshold is reached.")),1)]),g("div",N2t,[g("div",B2t,[g("span",null,S(t.$t("1. Flag a post or comment after it's reported")),1),_(h,{modelValue:s.config.flag_after_threshold,"onUpdate:modelValue":e[3]||(e[3]=C=>s.config.flag_after_threshold=C),min:0,max:100,step:1,size:"small","aria-label":t.$t("Flag a post or comment after it's reported X times")},null,8,["modelValue","aria-label"]),g("span",null,S(t.$t("times")),1),_(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__FLAG_AFTER_THRESHOLD_DESC")},{default:w(()=>[_(a,{class:"fcom_label_tooltip",role:"button",tabindex:"0","aria-label":t.$t("__FLAG_AFTER_THRESHOLD_DESC")},{default:w(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])])]),g("div",z2t,[g("div",H2t,[g("span",null,S(t.$t("2. Moderate a member after")),1),_(h,{modelValue:s.config.auto_flag_user_reject_threshold,"onUpdate:modelValue":e[4]||(e[4]=C=>s.config.auto_flag_user_reject_threshold=C),min:0,max:100,step:1,size:"small","aria-label":t.$t("Moderate a member after X of their posts or comments are rejected")},null,8,["modelValue","aria-label"]),g("span",null,S(t.$t("of their posts or comments are rejected")),1),_(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__AUTO_FLAG_USER_REJECT_THRESHOLD_DESC")},{default:w(()=>[_(a,{class:"fcom_label_tooltip",role:"button",tabindex:"0","aria-label":t.$t("__AUTO_FLAG_USER_REJECT_THRESHOLD_DESC")},{default:w(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])])]),g("div",U2t,[g("div",j2t,[g("span",null,S(t.$t("3. Moderate a member after")),1),_(h,{modelValue:s.config.auto_flag_user_report_threshold,"onUpdate:modelValue":e[5]||(e[5]=C=>s.config.auto_flag_user_report_threshold=C),min:0,max:100,step:1,size:"small","aria-label":t.$t("Moderate a member after X of their posts or comments are reported")},null,8,["modelValue","aria-label"]),g("span",null,S(t.$t("of their posts or comments are reported")),1),_(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__AUTO_FLAG_USER_REPORT_THRESHOLD_DESC")},{default:w(()=>[_(a,{class:"fcom_label_tooltip",role:"button",tabindex:"0","aria-label":t.$t("__AUTO_FLAG_USER_REPORT_THRESHOLD_DESC")},{default:w(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])])]),_(f,{class:"fcom_moderation_note",type:"primary",title:t.$t("Note: Keep 0 to disable a rule."),closable:!1},null,8,["title"])]),g("div",W2t,[g("div",Y2t,[g("h4",null,S(t.$t("New Content Approval")),1),g("p",null,S(t.$t("Require approval before new posts or comments become visible.")),1)]),g("div",q2t,[_(c,{modelValue:s.config.flag_all_new_posts,"onUpdate:modelValue":e[7]||(e[7]=C=>s.config.flag_all_new_posts=C),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Mark all new posts as Pending"))+" ",1),_(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__FLAG_ALL_NEW_POSTS_DESC")},{default:w(()=>[_(a,{class:"fcom_label_tooltip",onClick:e[6]||(e[6]=Ae(()=>{},["stop"])),role:"button",tabindex:"0","aria-label":t.$t("__FLAG_ALL_NEW_POSTS_DESC")},{default:w(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["modelValue"])]),g("div",G2t,[_(c,{modelValue:s.config.first_post_approval,"onUpdate:modelValue":e[9]||(e[9]=C=>s.config.first_post_approval=C),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Require approval for first post"))+" ",1),_(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__FIRST_POST_APPROVAL_DESC")},{default:w(()=>[_(a,{class:"fcom_label_tooltip",onClick:e[8]||(e[8]=Ae(()=>{},["stop"])),role:"button",tabindex:"0","aria-label":t.$t("__FIRST_POST_APPROVAL_DESC")},{default:w(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["modelValue"])]),g("div",X2t,[_(c,{modelValue:s.config.first_comment_approval,"onUpdate:modelValue":e[11]||(e[11]=C=>s.config.first_comment_approval=C),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Require approval for first comment"))+" ",1),_(l,{effect:"dark",placement:"top","popper-class":"fcom_moderation_tooltip",content:t.$t("__FIRST_COMMENT_APPROVAL_DESC")},{default:w(()=>[_(a,{class:"fcom_label_tooltip",onClick:e[10]||(e[10]=Ae(()=>{},["stop"])),role:"button",tabindex:"0","aria-label":t.$t("__FIRST_COMMENT_APPROVAL_DESC")},{default:w(()=>[_(r)]),_:1},8,["aria-label"])]),_:1},8,["content"])]),_:1},8,["modelValue"])]),_(d,{label:t.$t("Mark all new posts as Pending in the given spaces")},{default:w(()=>[_(m,{modelValue:s.config.flag_all_new_posts_spaces,"onUpdate:modelValue":e[12]||(e[12]=C=>s.config.flag_all_new_posts_spaces=C),placeholder:t.$t("Select Spaces"),filterable:"",clearable:"",multiple:""},{default:w(()=>[(v(!0),A(ee,null,Ce(t.appVars.auth.spaces,C=>(v(),D(p,{key:C.id,label:C.title,value:C.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),g("span",K2t,S(t.$t("__FLAG_ALL_NEW_POSTS_SPACES_DESC")),1)]),_:1},8,["label"])])],64)):O("",!0)]),_:1})])]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"])}const Q2t=de(T2t,[["render",J2t]]),ewt={name:"Moderation",components:{Layout:fi,AppLayout:pi,Pagination:Jc,ReportDetails:M2t,ModerationConfigDrawer:Q2t},data(){return{status:"pending",loading:!1,saving:!1,reports:[],reportDetails:null,showConfig:!1,isOpenReportDetails:!1,moderationConfig:this.appVars.moderationConfig,pagination:{page:1,per_page:10,total:0}}},computed:{getReason(){return t=>this.appVars.report_reasons[t]},getTitle(){return t=>{var e,n;return t.content_type=="post"?(e=t.post)==null?void 0:e.title:(n=t.comment)==null?void 0:n.title}},getAuthorProfile(){return t=>t.content_type=="post"?t.post.xprofile:t.comment.xprofile},getIgnoreBtnText(){return t=>this.isContentLive(t)?this.$t("Dismiss Reports"):this.$t("Approve")+" "+this.$t(this.ucFirst(t.content_type))},getUnpublishBtnText(){return t=>this.isContentLive(t)?this.$t("Unpublish")+" "+this.$t(this.ucFirst(t.content_type)):this.$t("Publish")+" "+this.$t(this.ucFirst(t.content_type))}},methods:{getReports(){this.loading=!0,this.$get("moderation/reports",{status:this.status,page:this.pagination.page,per_page:this.pagination.per_page}).then(t=>{this.reports=t.reports.data,this.pagination.total=t.reports.total}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},saveConfig(t){this.saving=!0,this.$post("moderation/config",{config:t}).then(e=>{this.$notify.success(e.message),this.appVars.moderationConfig=e.config,this.moderationConfig=e.config,this.showConfig=!1}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})},isContentLive(t){const e=t.content_type=="comment"?t.comment:t.post;return(e==null?void 0:e.status)=="published"},confirmAndIgnoreReport(t){const e=this.isContentLive(t),n=e?this.$t("Dismiss Reports"):this.$t("Approve Content"),i=e?this.$t("This will dismiss all reports and keep the content published. Continue?"):this.$t("This will approve the content and make it visible to the community. Continue?"),s=e?this.$t("Yes, Dismiss"):this.$t("Yes, Approve");this.$confirm(i,n,{confirmButtonText:s,cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.ignoreReport(t)})},confirmAndUnpublishReport(t){const e=this.isContentLive(t),n=e?this.$t("Unpublish Content"):this.$t("Publish Content"),i=e?this.$t("This will unpublish the content from public view. Continue?"):this.$t("This will publish the content and make it visible to the community. Continue?"),s=e?this.$t("Yes, Unpublish"):this.$t("Yes, Publish");this.$confirm(i,n,{confirmButtonText:s,cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.unpublishReport(t)})},ignoreReport(t){this.$put("moderation/reports/"+t.id,{status:"ignored"}).then(e=>{this.$notify.success(e.message),this.getReports()}).catch(e=>{this.$handleError(e)})},unpublishReport(t){this.$put("moderation/reports/"+t.id,{status:"unpublished"}).then(e=>{this.$notify.success(e.message),this.getReports()}).catch(e=>{this.$handleError(e)})},openReportDetails(t){this.reportDetails=t,this.isOpenReportDetails=!0},closeReportDetails(){this.isOpenReportDetails=!1,this.reportDetails=null},deleteReport(t){this.$confirm(this.$t("Are you sure you want to delete this report?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button"}).then(()=>{this.$del("moderation/reports/"+t.id).then(e=>{this.$notify.success(e.message),this.getReports()}).catch(e=>{this.$handleError(e)})})}},mounted(){this.has_pro&&this.moderationConfig.is_enabled=="yes"&&this.getReports(),this.changeTitle(this.$t("Moderation"))}},twt=["href"],nwt={style:{padding:"20px"},class:"fhr_content_layout_body moderation_layout"},swt={key:0,class:"card_header"},iwt={role:"region","aria-label":"Member Navigation",class:"member_status"},owt={key:1,class:G("fcom_dir_layout fcom_dir_layout_classic")},rwt={key:0,class:"loading"},awt={key:1,class:"fcom_moderation_table"},lwt={class:"moderation_table"},cwt={class:"moderation_table_header"},uwt={style:{"min-width":"100px"}},dwt={class:"moderation_table_body"},hwt=["onClick"],fwt={key:0,class:"user_avatar moderation_avatar"},pwt={class:"feed_user_name"},mwt={key:1},gwt={key:2,class:"no_reports"},vwt={key:3,role:"region","aria-label":"Pagination",class:"pagination_wrap"},_wt={key:2,style:{"max-width":"800px",margin:"0 auto"},class:"setting_body white_loaded"},ywt={style:{"text-align":"center"}},bwt={style:{"font-size":"18px","margin-bottom":"10px"}},wwt={class:"promo_description"},kwt={key:1,class:"setting_body",style:{"text-align":"center"}},Cwt={class:"promo_description"},xwt=["href"];function Swt(t,e,n,i,s,o){const r=W("Operation"),a=be,l=We,c=sp,u=xs,d=Wt,h=W("UserAvatar"),f=W("UserRouteLink"),p=W("MoreFilled"),m=Wr,y=Yr,b=jr,k=W("Pagination"),C=W("layout"),$=W("app-layout"),x=W("report-details"),M=W("moderation-config-drawer");return v(),A(ee,null,[_($,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_full_layout"},{default:w(()=>[_(C,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Moderation")},{actions:w(()=>[t.has_pro?(v(),D(l,{key:0,onClick:e[0]||(e[0]=P=>s.showConfig=!0),class:"fcom_secondary_button"},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,S(t.$t("Settings")),1)]),_:1})):(v(),A("a",{key:1,target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_moderation"),class:"el-button el-button--danger"},S(t.$t("Upgrade to Pro")),9,twt))]),default:w(()=>[g("div",nwt,[t.has_pro?(v(),A(ee,{key:0},[s.moderationConfig.is_enabled=="yes"?(v(),A("div",swt,[g("div",iwt,[_(u,{onChange:e[1]||(e[1]=P=>o.getReports()),modelValue:s.status,"onUpdate:modelValue":e[2]||(e[2]=P=>s.status=P),class:"status_group"},{default:w(()=>[_(c,{value:"pending"},{default:w(()=>[B(S(t.$t("Pending")),1)]),_:1}),_(c,{value:"flagged"},{default:w(()=>[B(S(t.$t("Flagged")),1)]),_:1}),_(c,{value:"ignored"},{default:w(()=>[B(S(t.$t("Dismissed")),1)]),_:1}),_(c,{value:"unpublished"},{default:w(()=>[B(S(t.$t("Unpublished")),1)]),_:1})]),_:1},8,["modelValue"])])])):O("",!0),s.moderationConfig.is_enabled=="yes"?(v(),A("div",owt,[s.loading?(v(),A("div",rwt,[_(d,{class:"white_loaded",rows:3,animated:!0})])):s.reports.length?(v(),A("div",awt,[g("table",lwt,[g("thead",cwt,[g("tr",null,[g("th",null,S(t.$t("Title")),1),g("th",null,S(t.$t("Type")),1),g("th",null,S(t.$t("Reporter")),1),g("th",uwt,S(t.$t("Date")),1),g("th",null,S(t.$t("Reports")),1)])]),g("tbody",dwt,[(v(!0),A(ee,null,Ce(s.reports,P=>{var T,I;return v(),A("tr",{key:P.id},[g("td",{onClick:L=>o.openReportDetails(P),class:"report_reason"},S(o.getTitle(P)),9,hwt),g("td",null,S(P.content_type),1),g("td",null,[P.reporter?(v(),A("div",fwt,[_(h,{xprofile:P.reporter},null,8,["xprofile"]),g("div",pwt,[_(f,{xprofile:P.reporter},null,8,["xprofile"])])])):(T=P.meta)!=null&&T.flagged_by?(v(),A("div",mwt,S((I=P.meta)==null?void 0:I.flagged_by),1)):O("",!0)]),g("td",null,S(t.humanDateDiff(P.created_at)),1),g("td",null,S(P.reports_count),1),g("td",null,[_(b,{trigger:"click"},{dropdown:w(()=>[_(y,null,{default:w(()=>[_(m,null,{default:w(()=>[_(l,{"aria-label":t.$t("Review report"),class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:L=>o.openReportDetails(P)},{default:w(()=>[B(S(t.$t("Review Report")),1)]),_:2},1032,["aria-label","onClick"])]),_:2},1024),P.status!="ignored"?(v(),D(m,{key:0},{default:w(()=>[_(l,{class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:L=>o.confirmAndIgnoreReport(P)},{default:w(()=>[B(S(o.getIgnoreBtnText(P)),1)]),_:2},1032,["onClick"])]),_:2},1024)):O("",!0),P.status!="unpublished"?(v(),D(m,{key:1},{default:w(()=>[_(l,{class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:L=>o.confirmAndUnpublishReport(P)},{default:w(()=>[B(S(o.getUnpublishBtnText(P)),1)]),_:2},1032,["onClick"])]),_:2},1024)):O("",!0),P.status!="pending"?(v(),D(m,{key:2},{default:w(()=>[_(l,{class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:L=>o.deleteReport(P)},{default:w(()=>[B(S(t.$t("Delete Report")),1)]),_:2},1032,["onClick"])]),_:2},1024)):O("",!0)]),_:2},1024)]),default:w(()=>[_(l,{class:"fcom_dot_menu edit_action",size:"small",text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(p)]),_:1})]),_:1})]),_:2},1024)])])}),128))])])])):(v(),A("div",gwt,S(t.$t("No reports to review")),1)),s.pagination.total?(v(),A("div",vwt,[_(k,{hide_on_single:!0,onFetch:e[3]||(e[3]=P=>o.getReports()),pagination:s.pagination},null,8,["pagination"])])):O("",!0)])):(v(),A("div",_wt,[g("div",ywt,[g("h3",bwt,S(t.$t("Content Moderation is disabled")),1),g("p",wwt,S(t.$t("__MODERATION_DISABLED_DESC")),1),_(l,{loading:s.saving,class:"el-button fcom_primary_button",onClick:e[4]||(e[4]=P=>o.saveConfig({is_enabled:"yes"}))},{default:w(()=>[B(S(t.$t("Enable Content Moderation")),1)]),_:1},8,["loading"])])]))],64)):(v(),A("div",kwt,[g("p",Cwt,S(t.$t("__REPORT_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_moderation"),class:"el-button el-button--danger"},S(t.$t("Upgrade to Pro")),9,xwt)]))])]),_:1},8,["title"])]),_:1}),s.reportDetails?(v(),D(x,{key:0,report:s.reportDetails,is_open:s.isOpenReportDetails,status:s.status,onIgnore:o.ignoreReport,onUnpublish:o.unpublishReport,onDelete:o.deleteReport,onClose:e[5]||(e[5]=P=>o.closeReportDetails())},null,8,["report","is_open","status","onIgnore","onUnpublish","onDelete"])):O("",!0),s.showConfig?(v(),D(M,{key:1,is_open:s.showConfig,moderation_config:s.moderationConfig,saving:s.saving,onCloseConfig:e[6]||(e[6]=P=>s.showConfig=!1),onSaveConfig:o.saveConfig},null,8,["is_open","moderation_config","saving","onSaveConfig"])):O("",!0)],64)}const $wt=de(ewt,[["render",Swt]]),Awt={name:"Tools",components:{Layout:fi,AppLayout:pi},computed:{sitemapUrl(){return this.appVars.urls.portal_base+"site-maps/index.xml"},isPublicPortal(){return this.appVars.access_level==="public"}}},Ewt=["href"],Mwt={class:"settings_router"},Twt={class:"fhr_content_layout_body"},Pwt={class:"setting_header"},Iwt={key:0,class:"setting_body tools_body"},Lwt={key:0,class:"sitemap_configured"},Owt={class:"sitemap_header"},Dwt=g("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"}),g("path",{fill:"currentColor",d:"M745.344 361.344a32 32 0 0 1 45.312 45.312l-288 288a32 32 0 0 1-45.312 0l-160-160a32 32 0 1 1 45.312-45.312L480 626.752l265.344-265.408z"})],-1),Rwt={class:"sitemap_body"},Vwt=["href"],Fwt={key:1,class:"setting_body",style:{"text-align":"center"}},Nwt={class:"promo_description"},Bwt=["href"];function zwt(t,e,n,i,s,o){const r=be,a=Ur,l=W("layout"),c=W("app-layout");return v(),D(c,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(l,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Tools")},{actions:w(()=>[t.has_pro?O("",!0):(v(),A("a",{key:0,target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_tools"),class:"el-button el-button--danger"},S(t.$t("Upgrade to Pro")),9,Ewt))]),default:w(()=>[g("div",Mwt,[g("div",Twt,[g("div",Pwt,[g("h2",null,S(t.$t("Sitemap Configuration")),1)]),t.has_pro?(v(),A("div",Iwt,[o.isPublicPortal?(v(),A("div",Lwt,[g("div",Owt,[_(r,null,{default:w(()=>[Dwt]),_:1}),g("h4",null,S(t.$t("Sitemap is configured and will be generated automatically.")),1)]),g("div",Rwt,[_(a,{type:"warning",closable:!1,style:{"margin-top":"15px"},title:t.$t("The sitemap includes only public content. If you are using the default WordPress sitemap, it will be automatically included. For other sitemap plugins, please add this URL in the plugin settings.")},null,8,["title"]),g("p",null,[g("strong",null,S(t.$t("Sitemap URL : ")),1),g("a",{href:o.sitemapUrl,target:"_blank",rel:"noopener"},S(o.sitemapUrl),9,Vwt)])])])):(v(),D(a,{key:1,type:"warning",closable:!1,title:t.$t("Your portal feeds are not public so no sitemap entry will be generated.")},null,8,["title"]))])):(v(),A("div",Fwt,[g("p",Nwt,S(t.$t("__SITEMAP_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_tools"),class:"el-button el-button--danger"},S(t.$t("Upgrade to Pro")),9,Bwt)]))])])]),_:1},8,["title"])]),_:1})}const Hwt=de(Awt,[["render",zwt]]),Uwt={name:"PrivacySettings",components:{Layout:fi,AppLayout:pi},data(){return{loading:!1,saving:!1,settings:null}},methods:{getSettings(){this.loading=!0,this.$get("settings/privacy-settings").then(t=>{this.settings=t.settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},save(){this.saving=!0,this.$post("settings/privacy-settings",{settings:this.settings}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},mounted(){this.getSettings(),this.changeTitle(this.$t("Privacy Settings"))}},jwt={class:"settings_router"},Wwt={key:0,class:"white_loaded"},Ywt={key:1,class:"fhr_content_layout_body"},qwt={class:"setting_body"},Gwt={class:"fcom_help_text fcom_mt_10"},Xwt={class:"fcom_help_text fcom_mt_10"},Kwt={class:"fcom_help_text fcom_mt_10"},Zwt={class:"fcom_help_text fcom_mt_10"},Jwt={class:"fcom_input_wrap"},Qwt={key:0},e3t={class:"fcom_input_wrap"},t3t={key:0},n3t={class:"fcom_input_wrap"},s3t={class:"fcom_input_wrap"},i3t={key:0},o3t={class:"fcom_input_wrap"},r3t={class:"fcom_input_wrap"},a3t={key:0,class:"fcom_input_wrap"},l3t={class:"fcom_input_wrap"},c3t={class:"fcom_input_wrap"},u3t={style:{"margin-top":"50px"},class:"fcom_input_wrap"},d3t={key:2};function h3t(t,e,n,i,s,o){const r=We,a=Wt,l=iV,c=Mi,u=xs,d=en,h=Gt,f=sn,p=W("layout"),m=W("app-layout"),y=xt("loading");return v(),D(m,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(p,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Privacy Settings")},{actions:w(()=>[De((v(),D(r,{class:"fcom_primary_button",onClick:o.save},{default:w(()=>[g("span",null,S(t.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[y,s.saving]])]),default:w(()=>[g("div",jwt,[s.loading?(v(),A("div",Wwt,[_(a,{rows:5,animated:!0})])):s.settings?(v(),A("div",Ywt,[g("div",qwt,[g("p",null,S(t.$t("Customize the privacy and compliance settings as per your needs.")),1),_(l),_(f,{onSubmit:e[13]||(e[13]=Ae(b=>t.doNothing(),["prevent"])),modelValue:s.settings,"onUpdate:modelValue":e[14]||(e[14]=b=>s.settings=b),"label-position":"top"},{default:w(()=>[_(d,{label:t.$t("Who can view all members page?")},{default:w(()=>[_(u,{modelValue:s.settings.members_page_status,"onUpdate:modelValue":e[0]||(e[0]=b=>s.settings.members_page_status=b),class:"fcom_radio_group"},{default:w(()=>[_(c,{border:"",value:"everybody"},{default:w(()=>[B(S(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:w(()=>[B(S(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:w(()=>[B(S(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",Gwt,[g("p",null,S(t.$t("Choose whether the all-members page should be public, private, or admin/moderator only.")),1)])]),_:1},8,["label"]),_(d,{label:t.$t("Who can view user profile page?")},{default:w(()=>[_(u,{modelValue:s.settings.profile_page_visibility,"onUpdate:modelValue":e[1]||(e[1]=b=>s.settings.profile_page_visibility=b),class:"fcom_radio_group"},{default:w(()=>[_(c,{border:"",value:"everybody"},{default:w(()=>[B(S(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:w(()=>[B(S(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:w(()=>[B(S(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",Xwt,[g("p",null,S(t.$t("Choose whether individual user profile page should be public, private, or admin/moderator only. Users can always view their own profile.")),1)])]),_:1},8,["label"]),_(d,{label:t.$t("Who can view leaderboard top members?")},{default:w(()=>[_(u,{modelValue:s.settings.leaderboard_members_visibility,"onUpdate:modelValue":e[2]||(e[2]=b=>s.settings.leaderboard_members_visibility=b),class:"fcom_radio_group"},{default:w(()=>[_(c,{border:"",value:"everybody"},{default:w(()=>[B(S(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:w(()=>[B(S(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:w(()=>[B(S(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",Kwt,[g("p",null,S(t.$t("Choose whether the leaderboard top members should be public, private, or admin/moderator only.")),1)])]),_:1},8,["label"]),_(d,{label:t.$t("Who can view spaces and courses on the user profile page.")},{default:w(()=>[_(u,{modelValue:s.settings.user_space_visibility,"onUpdate:modelValue":e[3]||(e[3]=b=>s.settings.user_space_visibility=b),class:"fcom_radio_group"},{default:w(()=>[_(c,{border:"",value:"everybody"},{default:w(()=>[B(S(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:w(()=>[B(S(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:w(()=>[B(S(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",Zwt,[g("p",null,S(t.$t("Choose the privacy settings for the Spaces and Courses tabs of a member profile.")),1)])]),_:1},8,["label"]),g("div",Jwt,[_(h,{modelValue:s.settings.can_customize_username,"onUpdate:modelValue":e[4]||(e[4]=b=>s.settings.can_customize_username=b),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Allow users to change their community username"))+" ",1),t.has_pro?O("",!0):(v(),A("span",Qwt,"("+S(t.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["modelValue","disabled"]),g("p",null,S(t.$t("When enabled, members can change their username on their own. Otherwise, an admin or moderator can change the username.")),1)]),g("div",e3t,[_(h,{modelValue:s.settings.can_change_email,"onUpdate:modelValue":e[5]||(e[5]=b=>s.settings.can_change_email=b),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Allow users to change their account email address"))+" ",1),t.has_pro?O("",!0):(v(),A("span",t3t,"("+S(t.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["modelValue","disabled"]),g("p",null,S(t.$t("When enabled, members can change their email address of the account (WordPress User account).")),1)]),g("div",n3t,[_(h,{modelValue:s.settings.can_change_password,"onUpdate:modelValue":e[6]||(e[6]=b=>s.settings.can_change_password=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Allow users to change their password from profile")),1)]),_:1},8,["modelValue"]),g("p",null,S(t.$t("When enabled, members can change their password from their profile settings. Disable this if you enforce a strong password policy elsewhere.")),1)]),g("div",s3t,[_(h,{modelValue:s.settings.email_auto_login,"onUpdate:modelValue":e[7]||(e[7]=b=>s.settings.email_auto_login=b),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Automatically login the user to the portal (secure with signed URL) from email notification links"))+" ",1),t.has_pro?O("",!0):(v(),A("span",i3t,"("+S(t.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["modelValue","disabled"]),g("p",null,S(t.$t("When enabled, users will be automatically logged in to the portal when they click on the email notification links. This feature is secure and uses signed URLs. User with post edit access will not be logged in automatically.")),1)]),g("div",o3t,[_(h,{modelValue:s.settings.enable_gravatar,"onUpdate:modelValue":e[8]||(e[8]=b=>s.settings.enable_gravatar=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Use Gravatar Photo Service for default user photo")),1)]),_:1},8,["modelValue"]),g("p",null,S(t.$t("When enabled, the Gravatar Photo Service automatically fetches user avatars based on their email address. Gravatar is a built-in feature of WP and powered by WordPress.com")),1)]),g("div",r3t,[_(h,{modelValue:s.settings.enable_user_sync,"onUpdate:modelValue":e[9]||(e[9]=b=>s.settings.enable_user_sync=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Sync Community Profile with WordPress User Data")),1)]),_:1},8,["modelValue"]),g("p",null,S(t.$t("When enabled, updates to a community user's profile will automatically sync with their WordPress user data. Disable this to prevent automatic syncing. Enabling this is recommended.")),1)]),t.appVars.has_fluentcrm?(v(),A("div",a3t,[_(h,{modelValue:s.settings.skip_crm_undeliverable_emails,"onUpdate:modelValue":e[10]||(e[10]=b=>s.settings.skip_crm_undeliverable_emails=b),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Do not send emails to contacts marked as Bounced, Complained, or Spammed in FluentCRM")),1)]),_:1},8,["modelValue"]),g("p",null,S(t.$t("When enabled, FluentCommunity will skip email notifications for members whose FluentCRM contact status is bounced, complained, or spammed.")),1)])):O("",!0),g("div",l3t,[_(h,{"true-value":"yes","false-value":"no",modelValue:s.settings.show_last_activity,"onUpdate:modelValue":e[11]||(e[11]=b=>s.settings.show_last_activity=b),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Show last activity of a user on the profile card")),1)]),_:1},8,["modelValue"]),g("p",null,S(t.$t("If unchecked, then the last activity will be shown to only admins/moderators")),1)]),g("div",c3t,[_(h,{"true-value":"yes","false-value":"no",modelValue:s.settings.can_deactive_account,"onUpdate:modelValue":e[12]||(e[12]=b=>s.settings.can_deactive_account=b),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Allow users to deactivate their account directly from their profile settings")),1)]),_:1},8,["modelValue"]),g("p",null,S(t.$t("When enabled, this option allows users to deactivate their account directly from their profile settings.")),1)]),g("div",u3t,[De((v(),D(r,{onClick:o.save,disabled:s.saving,class:"fcom_primary_button"},{default:w(()=>[B(S(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[y,s.saving]])])]),_:1},8,["modelValue"])])])):(v(),A("div",d3t,[g("p",null,S(t.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const f3t=de(Uwt,[["render",h3t]]),p3t={name:"SettingsRoute",components:{},data(){return{loading:!1}}};function m3t(t,e,n,i,s,o){const r=W("router-view");return v(),D(r)}const g3t=de(p3t,[["render",m3t]]),v3t={name:"CreateGroupForm",emits:["completed","dirty"],components:{ImageUploader:vl,SlugInput:Rd,ErrorAlerts:L1},props:{group:{required:!1,default:{title:"",slug:"",description:"",settings:{always_show_spaces:"yes"}}}},data(){return{saving:!1,form:{},initialized:!1,errors:[]}},watch:{form:{deep:!0,handler(){this.initialized&&this.$emit("dirty")}}},methods:{validate(){return this.errors=[],(!this.form.title||!this.form.title.trim())&&this.errors.push(this.$t("Group title cannot be empty.")),this.form.id||(!this.form.slug||!this.form.slug.trim())&&this.errors.push(this.$t("Slug cannot be empty.")),this.errors.length===0},submit(){if(!this.validate())return;this.saving=!0;let t="spaces/space_groups",e={title:this.form.title,description:this.form.description,settings:this.form.settings,slug:this.form.slug},n=this.$post;this.form.id&&(t+="/"+this.form.id,n=this.$put),n(t,e).then(i=>{this.$eventBus.emit("reloadMenu"),this.form={},this.$notify.success(i.message),this.$emit("completed",i.group)}).catch(i=>{this.$handleError(i)}).finally(()=>{this.saving=!1})}},mounted(){this.group&&this.group.id?this.form=this.group:this.form={title:"",slug:"",description:"",settings:{always_show_spaces:"yes"}},this.$nextTick(()=>{this.initialized=!0})}},_3t={key:0},y3t={key:1};function b3t(t,e,n,i,s,o){const r=ft,a=en,l=W("slug-input"),c=Gt,u=W("error-alerts"),d=We,h=sn;return v(),D(h,{onSubmit:e[5]||(e[5]=Ae(f=>t.doNothing(),["prevent"])),modelValue:s.form,"onUpdate:modelValue":e[6]||(e[6]=f=>s.form=f),"label-position":"top"},{default:w(()=>[_(a,{label:t.$t("Group Title")},{default:w(()=>[_(r,{type:"text",placeholder:t.$t("Your Group Title"),modelValue:s.form.title,"onUpdate:modelValue":e[0]||(e[0]=f=>s.form.title=f)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),_(a,{label:t.$t("Slug")},{default:w(()=>[_(l,{modelValue:s.form.slug,"onUpdate:modelValue":e[1]||(e[1]=f=>s.form.slug=f),disabled:!!s.form.id,placeholder:t.$t("Group Slug (no spaces or special characters)"),is_inital_inactive:!!s.form.id,prefix:"#"},null,8,["modelValue","disabled","placeholder","is_inital_inactive"])]),_:1},8,["label"]),_(a,{label:t.$t("Description")},{default:w(()=>[_(r,{type:"textarea",rows:3,placeholder:t.$t("Group Description"),modelValue:s.form.description,"onUpdate:modelValue":e[2]||(e[2]=f=>s.form.description=f)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),s.form.settings?(v(),D(a,{key:0,label:t.$t("Appearance")},{default:w(()=>[_(c,{"true-value":"yes","false-value":"no",modelValue:s.form.settings.always_show_spaces,"onUpdate:modelValue":e[3]||(e[3]=f=>s.form.settings.always_show_spaces=f),class:"fcom_checkbox"},{default:w(()=>[B(S(t.$t("Show Spaces even if the user is not a member of any space")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),_(u,{errors:s.errors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),_(a,null,{default:w(()=>[_(d,{class:"fcom_primary_button",disabled:s.saving,onClick:e[4]||(e[4]=f=>o.submit()),loading:s.saving},{default:w(()=>[s.form.id?(v(),A("span",_3t,S(t.$t("Update Info")),1)):(v(),A("span",y3t,S(t.$t("Create")),1))]),_:1},8,["disabled","loading"])]),_:1})]),_:1},8,["modelValue"])}const w3t=de(v3t,[["render",b3t]]),k3t={name:"MoveGroupPopup",components:{ActionPopover:Pa},props:{groups:{type:Array,default:()=>[]},currentSpace:{type:[Array,Object],default:null}},emits:["moved"],data(){return{selectedGroupId:null,working:!1}},computed:{filteredGroups(){return this.groups.filter(t=>{var e;return t.id!=((e=this.currentSpace)==null?void 0:e.parent_id)})}},methods:{moveSpace(t){this.working=!0,this.$patch("spaces/space_groups/move-space",{space_id:this.currentSpace.id,group_id:this.selectedGroupId}).then(e=>{this.$notify.success(e.message),this.$emit("moved"),t()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})}}},C3t={style:{display:"inline-block",cursor:"pointer",width:"100%","text-align":"left"}};function x3t(t,e,n,i,s,o){const r=on,a=Jt,l=en,c=We,u=sn,d=W("action-popover"),h=xt("loading");return v(),D(d,{placement:"bottom",width:350},{trigger:w(()=>[g("span",C3t,S(t.$t("Move")),1)]),default:w(({hide:f})=>[_(u,{onSubmit:e[1]||(e[1]=Ae(p=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(l,{label:t.$t("Move to a different Group")},{default:w(()=>[_(a,{placeholder:t.$t("Select Group"),modelValue:s.selectedGroupId,"onUpdate:modelValue":e[0]||(e[0]=p=>s.selectedGroupId=p)},{default:w(()=>[(v(!0),A(ee,null,Ce(o.filteredGroups,p=>(v(),D(r,{key:p.id,label:p.title,value:p.id},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),De((v(),D(c,{disabled:!s.selectedGroupId||s.working,onClick:p=>o.moveSpace(f),class:"fcom_primary_button"},{default:w(()=>[B(S(t.$t("Move Space")),1)]),_:2},1032,["disabled","onClick"])),[[h,s.working]])]),_:2},1024)]),_:1})}const S3t=de(k3t,[["render",x3t]]),$3t={name:"SpaceLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:EH},data(){return{saving:!1,loading:!1,lockscreen:null}},watch:{savingCount(){this.saveChanges()}},methods:{saveChanges(){this.lockscreen&&(this.saving=!0,this.$put("spaces/"+this.spaceProfile.slug+"/lockscreens",{lockscreen:this.lockscreen}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1}))},getLockscreen(){this.loading=!0,this.$get("spaces/"+this.spaceProfile.slug+"/lockscreens").then(t=>{this.lockscreen=t.lockscreen}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.getLockscreen()}},A3t={key:0,class:"fcom_lockscreen_meta"},E3t={class:"fcom_description"},M3t={class:"white_loaded"};function T3t(t,e,n,i,s,o){const r=W("lock-screen-editor"),a=Wt,l=Aa;return s.lockscreen?(v(),D(r,{key:0,title:n.spaceProfile.title,space_id:n.spaceProfile.id,settings:n.spaceProfile.settings,lockscreen:s.lockscreen,saving:s.saving,loading:s.loading,onSave:o.saveChanges,onClose:e[0]||(e[0]=c=>t.$emit("close"))},{before_meta:w(()=>[n.spaceProfile.settings.custom_lock_screen!="yes"?(v(),A("div",A3t,[g("div",E3t,[g("p",null,S(t.$t("__LOCK_SCRREN_DESC")),1)])])):O("",!0)]),_:1},8,["title","space_id","settings","lockscreen","saving","loading","onSave"])):s.loading?(v(),D(l,{key:1,class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[g("div",M3t,[_(a,{animated:!0,rows:10})])]),_:1})):O("",!0)}const P3t=de($3t,[["render",T3t]]),I3t={name:"SpaceCustomizer",props:["space_profile"],emits:["close","completed"],components:{SpaceLockscreen:P3t,CreateSpaceForm:f8,ManageSpaceLinks:TH,ManagePaywalls:PH},data(){return{saving:!1,currentTab:"general",savingCount:0,hasPro:window.fluentComAdmin.pro}},methods:{saveChanges(){if(!this.hasPro&&this.currentTab=="lock_screen"){this.$notify({title:this.$t("Pro Required"),message:this.$t("This feature is only available in the pro version."),type:"error"});return}this.savingCount=this.savingCount+1}},mounted(){this.$router.push({query:{...this.$route.query,customize_space:1}})},unmounted(){const t={...this.$route.query};delete t.customize_space,this.$router.push({query:t})}},L3t={key:0,class:"fcom_full_editor"},O3t={class:"fcom_full_editor_header fcom_space_settings_nav"},D3t=["aria-label"],R3t={class:"fcom_editor_menu object_menu"},V3t={class:"fcom_space_menu_ul"},F3t={class:"full_editor_actions"},N3t={style:{"max-width":"800px",margin:"0 auto"},class:"fcom_full_editor_content"};function B3t(t,e,n,i,s,o){const r=W("ArrowLeft"),a=be,l=We,c=S1,u=W("create-space-form"),d=Ai,h=Aa,f=W("space-lockscreen"),p=W("manage-space-links"),m=W("manage-paywalls"),y=C1;return n.space_profile?(v(),A("div",L3t,[_(y,null,{default:w(()=>[_(c,{class:"fcom_full_editor_header_wrap"},{default:w(()=>{var b;return[g("div",O3t,[g("button",{type:"button",onClick:e[0]||(e[0]=k=>t.$emit("completed")),class:"fcom_back_header","aria-label":t.$t("Back to %s",n.space_profile.title)},[_(a,null,{default:w(()=>[_(r)]),_:1}),B(" "+S(n.space_profile.title),1)],8,D3t),g("div",R3t,[g("ul",V3t,[g("li",{onClick:e[1]||(e[1]=k=>s.currentTab="general")},[g("a",{class:G({"router-link-exact-active":s.currentTab==="general"}),href:"#"},S(t.$t("General Settings")),3)]),g("li",{onClick:e[2]||(e[2]=k=>s.currentTab="paywalls")},[g("a",{class:G({"router-link-exact-active":s.currentTab==="paywalls"}),href:"#"},S(t.$t("Paywalls")),3)]),n.space_profile.privacy=="private"&&((b=n.space_profile.settings)==null?void 0:b.custom_lock_screen)=="yes"?(v(),A("li",{key:0,onClick:e[3]||(e[3]=k=>s.currentTab="lock_screen")},[g("a",{class:G({"router-link-exact-active":s.currentTab==="lock_screen"}),href:"#"},S(t.$t("Lock Screen")),3)])):O("",!0),g("li",{onClick:e[4]||(e[4]=k=>s.currentTab="manage_links")},[g("a",{class:G({"router-link-exact-active":s.currentTab==="manage_links"}),href:"#"},S(t.$t("Space Links")),3)])])]),g("div",F3t,[_(l,{class:"fcom_primary_button",disabled:s.saving,loading:s.saving,onClick:o.saveChanges},{default:w(()=>[B(S(!s.hasPro&&s.currentTab=="lock_screen"?t.$t("Save Changes (Pro Required)"):t.$t("Save Changes")),1)]),_:1},8,["disabled","loading","onClick"]),_(l,{onClick:e[5]||(e[5]=k=>t.$emit("completed")),text:""},{default:w(()=>[B(" X ")]),_:1})])])]}),_:1}),_(y,{class:"fcom_full_editor_container editor_customizer_container"},{default:w(()=>[s.currentTab=="general"?(v(),D(h,{key:0,class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(d,null,{default:w(()=>[g("div",N3t,[_(u,{savingCount:s.savingCount,community:n.space_profile},null,8,["savingCount","community"])])]),_:1})]),_:1})):s.currentTab=="lock_screen"?(v(),D(f,{key:1,savingCount:s.savingCount,onClose:e[6]||(e[6]=b=>t.$emit("close")),spaceProfile:n.space_profile},null,8,["savingCount","spaceProfile"])):s.currentTab=="manage_links"?(v(),D(p,{key:2,savingCount:s.savingCount,onClose:e[7]||(e[7]=b=>t.$emit("close")),spaceProfile:n.space_profile},null,8,["savingCount","spaceProfile"])):s.currentTab=="paywalls"?(v(),D(m,{key:3,savingCount:s.savingCount,onClose:e[8]||(e[8]=b=>t.$emit("close")),spaceProfile:n.space_profile},null,8,["savingCount","spaceProfile"])):O("",!0)]),_:1})]),_:1})])):O("",!0)}const z3t=de(I3t,[["render",B3t]]),H3t={name:"SpaceLinkEditModal",components:{SidebarLinkForm:tH},emits:["completed"],props:["link"],data(){return{showModal:!0}}};function U3t(t,e,n,i,s,o){const r=W("SidebarLinkForm"),a=Ss;return v(),D(a,{"modal-class":"fcom_common_dialog","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:s.showModal,"onUpdate:modelValue":e[1]||(e[1]=l=>s.showModal=l),direction:"rtl",onClose:e[2]||(e[2]=l=>t.$emit("completed")),title:t.$t("Edit Link")},{default:w(()=>[_(r,{onCompleted:e[0]||(e[0]=l=>t.$emit("completed")),link:n.link},null,8,["link"])]),_:1},8,["width","modelValue","title"])}const j3t=de(H3t,[["render",U3t]]),W3t={name:"SpaceGroups",components:{FluentDnD:Ud,ActionPopover:Pa,ArrowDownBold:rMe,Drawer:Dd,CreateSpaceForm:f8,CreateGroupForm:w3t,Layout:fi,AppLayout:pi,MoveGroupPopup:S3t,SpaceCustomizer:z3t,CourseCustomizer:IH,SpaceLinkEditModal:j3t},data(){return{groups:[],loading:!0,joining:!1,editSpace:null,showGroupDrawer:!1,isGroupFormDirty:!1,editingGroup:null,draggingIndexGroup:null,draggingIndexSpace:null,collapsedGroups:[],orphanedSpaces:[]}},watch:{showGroupDrawer(t){t||(this.isGroupFormDirty=!1)}},computed:{communityCounts(){let t=this.groups.reduce((e,n)=>{var i;return e+(((i=n.spaces)==null?void 0:i.length)||0)},0);return this.orphanedSpaces&&this.orphanedSpaces.length&&(t+=this.orphanedSpaces.length),t},isCourse(){var t;return((t=this.editSpace)==null?void 0:t.type)=="course"}},methods:{toggleGroup(t){this.collapsedGroups.includes(t.id)?this.collapsedGroups=this.collapsedGroups.filter(e=>e!==t.id):this.collapsedGroups.push(t.id)},openEditSpace(t){t.type==="course"&&t.topics&&(t.category_ids=t.topics.map(e=>e.id)),this.editSpace=t},initDeleteSpace(t){let e=this.$t("space");t.type=="course"?e=this.$t("course"):t.type=="sidebar_link"&&(e=this.$t("link")),this.$confirm(this.$t("Are you sure you want to delete this %s?",e),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete the %s",e),cancelButtonText:this.$t("No"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{if(t.type=="sidebar_link"){this.deleteSpace(t);return}let n=this.$t("Please Type %s to confirm. Please note, all the posts, comments, activities of this Space will be delete.",'"DELETE"');t.type=="course"&&(n=this.$t("Please Type %s to confirm. Please note, all the lessons, topics, students progress will be deleted.",'"DELETE"')),this.$promt(this.$t(n),this.$t("Delete %s",e),{confirmButtonText:this.$t("Confirm Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button"}).then(i=>{i.value==="DELETE"?this.deleteSpace(t):this.$notify.error(this.$t("The verification string does not match"))})})},deleteSpace(t){let e="spaces/"+t.id+"/by-id";t.type=="course"?e="admin/courses/"+t.id:t.type=="sidebar_link"&&(e="admin/links/"+t.id),this.$del(e).then(n=>{this.$notify.success(n.message),this.getGroups()}).catch(n=>{this.$handleError(n)})},getGroups(){this.loading=!0,this.editingGroup=null,this.$get("spaces/space_groups").then(t=>{this.groups=t.groups,this.orphanedSpaces=t.orphaned_spaces;const e=[];this.groups.forEach(n=>{e.push({id:n.id,title:n.title})}),this.appVars.space_groups=e}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},initEditGroup(t){this.editingGroup=t,this.showGroupDrawer=!0},initCreateGroup(){this.editingGroup=null,this.showGroupDrawer=!0},resetGroupsIndexes(t){const e={};_c(this.groups,(n,i)=>{e[n.id]=i+1}),this.$patch("spaces/space_groups/re-index",{indexes:e}).then(n=>{this.$notify.success(n.message)}).catch(n=>{this.$handleError(n),this.groups=t}).finally(()=>{this.$eventBus.emit("reloadMenu")})},resetSpaceIndexes(t,e,n){this.$patch("spaces/space_groups/re-index-spaces",{indexes:t}).then(i=>{this.$notify.success(i.message)}).catch(i=>{this.$handleError(i);const s=this.groups.find(o=>Number(o.id)===Number(n));s&&(s.spaces=e)}).finally(()=>{this.$eventBus.emit("reloadMenu")})},removeGroup(t){if(t&&t.spaces.length){this.$messageBox({title:this.$t("Cannot be deleted"),message:this.$t("You cannot delete a group with spaces. Please move the spaces to a different group first."),type:"warning",confirmButtonText:this.$t("Got it!")});return}this.$confirm(this.$t("Are you sure you want to remove this group?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete this group"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.$del("spaces/space_groups/"+t.id).then(()=>{this.getGroups(),this.$eventBus.emit("reloadMenu")}).catch(e=>{this.$handleError(e)})})},getTypeTitle(t){return t=="community"?this.$labelize("space").toLowerCase():this.$labelize(t).toLowerCase()},dropGroup({index:t}){const e=[...this.groups],n=this.groups.splice(t,1)[0];this.groups.splice(t,0,n),this.resetGroupsIndexes(e),this.draggingIndexGroup=null},dropSpace({newItems:t,index:e}){const n=t[0].parent_id;let i=this.groups.find(a=>Number(a.id)===Number(n)).spaces||[];const s=[...i],o=i.splice(e,1)[0];i.splice(e,0,o);let r=[];_c(i,(a,l)=>{r.push(a.id)}),this.resetSpaceIndexes(r,s,n),this.draggingIndexSpace=null},openCreateSpaceModal(t){window.fluentFrameworkApp.$eventBus.emit("createSpaceModal",{parent_id:t.id.toString(),disable_redirect:!0})}},mounted(){this.getGroups(),this.$eventBus.on("spaceCreated",this.getGroups)},beforeDestroy(){this.$eventBus.off("spaceCreated",this.getGroups)}},Y3t={class:"settings_router"},q3t={class:"fcom_communities"},G3t={class:"fcom_card_sections",style:{"margin-bottom":"16px"}},X3t={class:"fcom_card_section_heading"},K3t={key:1},Z3t={class:"fcom_card_sections",style:{"margin-bottom":"0"}},J3t={class:"fcom_section_primary_item_title"},Q3t=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1),ekt={class:"fcom_heading_item"},tkt={class:"fcom_space_counts"},nkt={class:"fcom_section_item_actions"},skt={key:0,class:"fcom_section_items"},ikt={class:"fcom_section_item_title"},okt=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1),rkt={class:"fcom_heading_item"},akt={class:"fcom_section_item_actions"},lkt=["href"],ckt={class:"actions_items"},ukt=["onClick"],dkt=["onClick"],hkt={key:0,class:"fcom_card_sections",style:{"margin-top":"16px"}},fkt={class:"fcom_section_primary_item fcom_no_top_border"},pkt={class:"fcom_heading_item"},mkt={class:"fcom_section_items"},gkt={class:"fcom_section_item"},vkt={class:"fcom_section_item_title"},_kt={class:"fcom_heading_item"},ykt={class:"fcom_section_item_actions"},bkt=["href"],wkt={class:"actions_items"},kkt=["onClick"],Ckt=["onClick"],xkt={key:0};function Skt(t,e,n,i,s,o){const r=We,a=Wt,l=W("ArrowDownBold"),c=be,u=W("Plus"),d=W("action-popover"),h=Ci,f=W("MoveGroupPopup"),p=W("FluentDnD"),m=W("layout"),y=W("app-layout"),b=W("create-group-form"),k=W("drawer"),C=W("course-customizer"),$=W("space-customizer"),x=W("SpaceLinkEditModal"),M=xt("loading");return v(),A(ee,null,[_(y,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(m,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("All Space Groups")},{actions:w(()=>[_(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=P=>o.initCreateGroup())},{default:w(()=>[B(S(t.$t("Create New Group")),1)]),_:1})]),default:w(()=>[g("div",Y3t,[De((v(),A("div",q3t,[g("div",G3t,[g("div",X3t,[g("h3",null,S(t.$_n("%d Group","%d Groups",s.groups.length))+" • "+S(t.$_n("%d Space","%d Spaces",o.communityCounts)),1)])]),s.loading?(v(),D(a,{key:0,class:"white_loaded",animated:!0,rows:5})):(v(),A("div",K3t,[_(p,{items:s.groups,onDrop:o.dropGroup,"item-class":"fcom_cursor_move",gap:"16px"},{item:w(({data:P})=>[g("div",Z3t,[g("div",{class:G([{fcom_collapsed_group:s.collapsedGroups.indexOf(P.id)!==-1},"fcom_section_primary_item fcom_no_top_border"])},[g("div",J3t,[Q3t,g("div",ekt,[g("h4",null,S(t.$t("Group:"))+" "+S(P.title),1),g("div",null,[P.spaces&&P.spaces.length?(v(),D(r,{key:0,style:{"background-color":"var(--el-fill-color-light)"},class:"fcom_collapse_btn",onClick:T=>o.toggleGroup(P),size:"small",text:""},{default:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1}),g("span",tkt,S(t.$t("%s items",P.spaces.length)),1)]),_:2},1032,["onClick"])):O("",!0),_(r,{onClick:T=>o.openCreateSpaceModal(P),style:{"margin-left":"5px","background-color":"var(--el-fill-color-light)"},size:"small",text:""},{default:w(()=>[_(c,null,{default:w(()=>[_(u)]),_:1})]),_:2},1032,["onClick"])])])]),g("div",nkt,[_(d,{items:[{label:t.$t("Add new space"),action:()=>{o.openCreateSpaceModal(P)}},{label:t.$t("Edit Group Info"),action:()=>{o.initEditGroup(P)}},{label:t.$t("Delete Group"),type:"danger",action:()=>{o.removeGroup(P)}}]},null,8,["items"])])],2),P.spaces&&P.spaces.length&&s.collapsedGroups.indexOf(P.id)===-1?(v(),A("div",skt,[_(p,{items:P.spaces,"item-class":"fcom_section_item cursor-move","item-style":"padding: 15px 15px 15px 35px",onDrop:o.dropSpace},{item:w(({data:T,index:I})=>[g("div",ikt,[okt,g("p",rkt,[B(S(T.title)+" ",1),T.status!="published"?(v(),D(h,{key:0,type:"info"},{default:w(()=>[B(S(t.$labelize(T.status)),1)]),_:2},1024)):O("",!0),_(h,null,{default:w(()=>[B(S(o.getTypeTitle(T.type)),1)]),_:2},1024),T.type=="sidebar_link"?(v(),D(h,{key:1,type:"info",class:"fcom_hover_show"},{default:w(()=>[B(S(T.settings.permalink),1)]),_:2},1024)):(v(),D(h,{key:2,type:"info",class:"fcom_hover_show"},{default:w(()=>[B("ID: "+S(T.id),1)]),_:2},1024))])]),g("div",akt,[g("a",{target:"_blank",class:"el-button el-button--small el-button--secondary",href:T.permalink},S(t.$t("View")),9,lkt),_(d,null,{default:w(({hide:L})=>[g("ul",ckt,[g("li",null,[_(f,{groups:s.groups,currentSpace:T,onMoved:R=>{L(),o.getGroups()}},null,8,["groups","currentSpace","onMoved"])]),g("li",{onClick:R=>{L(),o.openEditSpace(T)}},S(t.$t("Edit")),9,ukt),g("li",{class:"fcom_action_popover_item fcom_action_popover_item_danger",onClick:R=>{L(),o.initDeleteSpace(T)}},S(t.$t("Delete")),9,dkt)])]),_:2},1024)])]),_:2},1032,["items","onDrop"])])):O("",!0)])]),_:1},8,["items","onDrop"]),s.orphanedSpaces&&s.orphanedSpaces.length?(v(),A("div",hkt,[g("div",fkt,[g("div",pkt,[g("h4",null,S(t.$t("Other Spaces - No Assigned Group")),1)])]),g("div",mkt,[(v(!0),A(ee,null,Ce(s.orphanedSpaces,P=>(v(),A("div",gkt,[g("div",vkt,[g("p",_kt,[B(S(P.title)+" ",1),P.status!="published"?(v(),D(h,{key:0,type:"info"},{default:w(()=>[B(S(t.$labelize(P.status)),1)]),_:2},1024)):O("",!0),_(h,null,{default:w(()=>[B(S(o.getTypeTitle(P.type)),1)]),_:2},1024),_(h,{type:"info",class:"fcom_hover_show"},{default:w(()=>[B(" ID: "+S(P.id),1)]),_:2},1024)])]),g("div",ykt,[g("a",{class:"el-button el-button--small el-button--secondary",target:"_blank",href:P.permalink},S(t.$t("View")),9,bkt),_(d,null,{default:w(({hide:T})=>[g("ul",wkt,[g("li",null,[_(f,{groups:s.groups,currentSpace:P,onMoved:I=>{T(),o.getGroups()}},null,8,["groups","currentSpace","onMoved"])]),g("li",{onClick:I=>{T(),o.openEditSpace(P)}},S(t.$t("Edit")),9,kkt),g("li",{class:"fcom_action_popover_item fcom_action_popover_item_danger",onClick:I=>{T(),o.initDeleteSpace(P)}},S(t.$t("Delete")),9,Ckt)])]),_:2},1024)])]))),256))])])):O("",!0)]))])),[[M,s.loading]])])]),_:1},8,["title"])]),_:1}),_(k,{id:"fluent_comminity_body",modelValue:s.showGroupDrawer,"onUpdate:modelValue":e[3]||(e[3]=P=>s.showGroupDrawer=P),size:t.drawerWidth,title:s.editingGroup?t.$t("Edit Group"):t.$t("Create a new Group"),"close-on-click-modal":!0,"has-close-confirmation":s.isGroupFormDirty,"close-confirmation-message":t.$t("Closing will discard your changes. Are you sure?")},{default:w(()=>[s.showGroupDrawer?(v(),D(b,{key:0,group:s.editingGroup,onDirty:e[1]||(e[1]=P=>s.isGroupFormDirty=!0),onCompleted:e[2]||(e[2]=P=>{s.showGroupDrawer=!1,o.getGroups()})},null,8,["group"])):O("",!0)]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"]),s.editSpace?(v(),A("div",xkt,[(v(),D(Sa,{to:"body"},[s.editSpace.type=="course"?(v(),D(C,{key:0,course:s.editSpace,onClose:e[4]||(e[4]=P=>s.editSpace=null),onCompleted:e[5]||(e[5]=P=>{s.editSpace=null,o.getGroups()})},null,8,["course"])):s.editSpace.type=="community"?(v(),D($,{key:1,space_profile:s.editSpace,onClose:e[6]||(e[6]=P=>s.editSpace=null),onCompleted:e[7]||(e[7]=P=>{s.editSpace=null,o.getGroups()})},null,8,["space_profile"])):s.editSpace.type=="sidebar_link"?(v(),D(x,{key:2,link:s.editSpace,onClose:e[8]||(e[8]=P=>s.editSpace=null),onCompleted:e[9]||(e[9]=P=>{s.editSpace=null,o.getGroups()})},null,8,["link"])):O("",!0)]))])):O("",!0)],64)}const $kt=de(W3t,[["render",Skt]]),Akt={name:"WebhookForm",components:{SpaceIcon:hp},props:["modelValue","courses","spaces"],emits:["completed"],data(){return{loading:!1,form:this.modelValue||{title:"",courses_ids:[],remove_course_ids:[],space_ids:[],remove_space_ids:[],send_wp_welcome_email:"yes"},adding:!1,mapFields:[{field:"Email (required)",key:"email"},{field:"First Name (optional)",key:"first_name"},{field:"Last Name (optional)",key:"last_name"},{field:"Username (optional)",key:"user_login"},{field:"Password (optional)",key:"user_password"}]}},methods:{addWebhook(){if(!this.form.title){this.$notify.error(this.$t("Please select a user and role"));return}this.adding=!0,this.$post("admin/webhooks",this.form).then(t=>{this.$notify.success(t.message),this.form.id?this.$emit("completed"):(this.form.id=t.webhook.id,this.form.webhook_url=t.webhook.webhook_url)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.adding=!1})}}},Ekt={key:0,class:"fcom_highlight_block"},Mkt={style:{color:"#E6A23C"}},Tkt={target:"_blank",rel:"noopener",href:"https://github.com/WPManageNinja/fluent-community-docs/blob/master/incoming-webhook-config.md"},Pkt={key:0,class:"fcom_space_title"},Ikt={key:0,class:"fcom_space_title"},Lkt={key:0,class:"fcom_space_title"},Okt={key:0,class:"fcom_space_title"},Dkt={class:"dialog_footer fcom_mt_20"},Rkt={key:0},Vkt={key:1};function Fkt(t,e,n,i,s,o){const r=W("CopyDocument"),a=be,l=We,c=ft,u=Ur,d=Xr,h=Gr,f=en,p=W("SpaceIcon"),m=on,y=Jt,b=Ld,k=Id,C=Gt,$=sn,x=xt("loading");return v(),D($,{onSubmit:e[8]||(e[8]=Ae(M=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:s.form,"onUpdate:modelValue":e[9]||(e[9]=M=>s.form=M),size:"large"},{default:w(()=>[s.form.webhook_url?(v(),A("div",Ekt,[g("p",null,S(t.$t("You can use this Webhook URL to send POST request to trigger the actions")),1),_(c,{class:"fcom_mb_20",size:"small",value:s.form.webhook_url,readonly:""},{append:w(()=>[_(l,{"aria-label":t.$t("Copy webhook URL"),onClick:e[0]||(e[0]=M=>t.$toClipboard(s.form.webhook_url,this.$t("Link copied to clipboard")))},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["value"]),_(u,{type:"info",closable:!1,class:"fcom_mb_20"},{default:w(()=>[B(S(t.$t("Copy the keys in the right column and paste it into the app you want to use for sending the POST request."))+" ",1),g("span",Mkt,S(t.$t("The email address is required!")),1),B(),g("a",Tkt,S(t.$t("Read the documentation")),1)]),_:1}),_(h,{style:{margin:"20px 0"},"empty-text":t.$t("No Data Found"),border:"",stripe:"",height:"250",data:s.mapFields},{default:w(()=>[_(d,{label:t.$t("Input Data Label"),prop:"field",width:"300"},null,8,["label"]),_(d,{label:t.$t("Key"),prop:"key"},null,8,["label"])]),_:1},8,["empty-text","data"])])):O("",!0),_(f,{label:t.$t("Title")},{default:w(()=>[_(c,{modelValue:s.form.title,"onUpdate:modelValue":e[1]||(e[1]=M=>s.form.title=M),placeholder:t.$t("Your Webhook Title")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(k,{gutter:20},{default:w(()=>[_(b,{sm:24,md:12},{default:w(()=>[_(f,{label:t.$t("Add to Spaces")},{default:w(()=>[_(y,{modelValue:s.form.space_ids,"onUpdate:modelValue":e[2]||(e[2]=M=>s.form.space_ids=M),multiple:"",placeholder:t.$t("Select Spaces"),style:{width:"100%"}},{default:w(()=>[(v(!0),A(ee,null,Ce(n.spaces,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:w(()=>[M.id?(v(),A("span",Pkt,[_(p,{space_profile:M},null,8,["space_profile"]),g("span",null,S(t.getExcerpt(M.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),_(b,{sm:24,md:12},{default:w(()=>[_(f,{label:t.$t("Remove from Spaces")},{default:w(()=>[_(y,{modelValue:s.form.remove_space_ids,"onUpdate:modelValue":e[3]||(e[3]=M=>s.form.remove_space_ids=M),multiple:"",placeholder:t.$t("Select Spaces that you want to remove from the user"),style:{width:"100%"}},{default:w(()=>[(v(!0),A(ee,null,Ce(n.spaces,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:w(()=>[M.id?(v(),A("span",Ikt,[_(p,{space_profile:M},null,8,["space_profile"]),g("span",null,S(t.getExcerpt(M.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),n.courses?(v(),D(k,{key:1,gutter:20},{default:w(()=>[_(b,{sm:24,md:12},{default:w(()=>[_(f,{label:t.$t("Add to Courses")},{default:w(()=>[_(y,{modelValue:s.form.course_ids,"onUpdate:modelValue":e[4]||(e[4]=M=>s.form.course_ids=M),multiple:"",placeholder:t.$t("Select Courses"),style:{width:"100%"}},{default:w(()=>[(v(!0),A(ee,null,Ce(n.courses,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:w(()=>[M.id?(v(),A("span",Lkt,[_(p,{space_profile:M},null,8,["space_profile"]),g("span",null,S(t.getExcerpt(M.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),_(b,{sm:24,md:12},{default:w(()=>[_(f,{label:t.$t("Remove from Courses")},{default:w(()=>[_(y,{modelValue:s.form.remove_course_ids,"onUpdate:modelValue":e[5]||(e[5]=M=>s.form.remove_course_ids=M),multiple:"",placeholder:t.$t("Select Courses that you want to remove from the user"),style:{width:"100%"}},{default:w(()=>[(v(!0),A(ee,null,Ce(n.courses,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:w(()=>[M.id?(v(),A("span",Okt,[_(p,{space_profile:M},null,8,["space_profile"]),g("span",null,S(t.getExcerpt(M.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})):O("",!0),_(C,{modelValue:s.form.send_wp_welcome_email,"onUpdate:modelValue":e[6]||(e[6]=M=>s.form.send_wp_welcome_email=M),"true-value":"yes","false-value":"no"},{default:w(()=>[B(S(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),g("div",Dkt,[le(t.$slots,"after_form",{},()=>[De((v(),D(l,{class:"fcom_primary_button",disabled:s.adding,onClick:e[7]||(e[7]=M=>o.addWebhook())},{default:w(()=>[s.form.id?(v(),A("span",Rkt,S(t.$t("Update Webhook")),1)):(v(),A("span",Vkt,S(t.$t("Add Webhook")),1))]),_:1},8,["disabled"])),[[x,s.adding]])])])]),_:3},8,["modelValue"])}const Nkt=de(Akt,[["render",Fkt]]),Bkt={name:"IncomingWebhooks",components:{Pagination:Jc,UserAvatar:_2,UserRouteLink:Jr,WebhookForm:Nkt,Layout:fi,AppLayout:pi},data(){return{webhooks:[],loading:!1,spaces:[],courses:null,paginate:{page:1,per_page:10,total:0},search:"",bulkAction:"",showModal:!1,editing_webhook:{title:"",courses_ids:[],remove_course_ids:[],space_ids:[],remove_space_ids:[],send_wp_welcome_email:"yes"}}},methods:{applyBulkAction(){this.bulkAction=""},showForm(t){this.editing_webhook=t?{id:t.id,title:t.value.title,course_ids:t.value.course_ids,remove_course_ids:t.value.remove_course_ids,space_ids:t.value.space_ids,remove_space_ids:t.value.remove_space_ids,send_wp_welcome_email:t.value.send_wp_welcome_email,webhook_url:t.webhook_url}:{title:"",course_ids:[],remove_course_ids:[],space_ids:[],remove_space_ids:[],send_wp_welcome_email:"yes"},this.showModal=!0},copyToClipboard(t){this.$toClipboard(t,this.$t("Link copied to clipboard"))},fetch(){this.loading=!0,this.$get("admin/webhooks",{page:this.paginate.page,per_page:this.paginate.per_page,search:this.search}).then(t=>{t.spaces&&(this.spaces=t.spaces,this.courses=t.courses),this.webhooks=t.webhooks.data,this.paginate.total=t.webhooks.total}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},removeWebhook(t){this.$confirm(this.$t("Are you sure you want to remove this webhook?"),this.$t("Warning"),{confirmButtonText:this.$t("Yes, Remove"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.working=!0,this.$del("admin/webhooks/"+t.id).then(e=>{this.$notify.success(e.message),this.fetch()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.working=!1})})}},mounted(){this.has_pro&&this.fetch(),this.changeTitle(this.$t("Incoming Webhooks"))}},zkt=["href"],Hkt={class:"settings_router manager_section"},Ukt={class:"fhr_content_layout_body"},jkt={key:0,class:"setting_body"},Wkt={class:"fcom_manager_actions"},Ykt={class:"bulk_search"},qkt=g("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"},[g("path",{d:"M14.5833 14.584L18.3333 18.334",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}),g("path",{d:"M16.6667 9.16699C16.6667 5.02486 13.3088 1.66699 9.16666 1.66699C5.02453 1.66699 1.66666 5.02486 1.66666 9.16699C1.66666 13.3091 5.02453 16.667 9.16666 16.667C13.3088 16.667 16.6667 13.3091 16.6667 9.16699Z",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"})],-1),Gkt={class:"fcom_manager_table"},Xkt={class:"fcom_webhook_url"},Kkt={class:"fcom_table_action_col"},Zkt={role:"region","aria-label":"Pagination",class:"pagination_wrap"},Jkt={key:1,class:"setting_body",style:{"text-align":"center"}},Qkt=g("p",null,null,-1),e6t=["href"],t6t={class:"dialog_header"},n6t={class:"dialog_body"};function s6t(t,e,n,i,s,o){const r=W("Plus"),a=be,l=We,c=ft,u=Ci,d=Xr,h=W("CopyDocument"),f=Gr,p=W("Pagination"),m=W("layout"),y=W("app-layout"),b=W("webhook-form"),k=Ss,C=xt("loading");return v(),A(ee,null,[_(y,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(m,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Incoming Webhooks")},{actions:w(()=>[t.has_pro?(v(),D(l,{key:0,class:"fcom_primary_button",onClick:e[0]||(e[0]=$=>o.showForm(null))},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,S(t.$t("Add New Webhook")),1)]),_:1})):(v(),A("a",{key:1,target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_incoming_webhooks"),class:"el-button el-button--danger"},S(t.$t("Upgrade to Pro")),9,zkt))]),default:w(()=>[g("div",Hkt,[g("div",Ukt,[t.has_pro?(v(),A("div",jkt,[g("div",Wkt,[g("div",Ykt,[_(c,{modelValue:s.search,"onUpdate:modelValue":e[1]||(e[1]=$=>s.search=$),onKeydown:ut(o.fetch,["enter"]),placeholder:t.$t("Search"),class:"el-input-round"},{prefix:w(()=>[qkt]),_:1},8,["modelValue","onKeydown","placeholder"])])]),g("div",Gkt,[De((v(),D(f,{data:s.webhooks,"empty-text":t.$t("No Webhooks Found")},{default:w(()=>[_(d,{label:t.$t("Title"),sortable:"","min-width":"160"},{default:w($=>[B(S($.row.value.title)+" ",1),$.row.value.running_count?(v(),D(u,{key:0,title:t.$t("Ran count"),size:"small"},{default:w(()=>[B(S($.row.value.running_count),1)]),_:2},1032,["title"])):O("",!0)]),_:1},8,["label"]),_(d,{label:t.$t("Webhook URL"),sortable:""},{default:w($=>[g("div",Xkt,[_(c,{size:"small",value:$.row.webhook_url,readonly:""},{append:w(()=>[_(l,{"aria-label":t.$t("Copy webhook URL"),onClick:x=>o.copyToClipboard($.row.webhook_url),size:"small"},{default:w(()=>[_(a,null,{default:w(()=>[_(h)]),_:1})]),_:2},1032,["aria-label","onClick"])]),_:2},1032,["value"])])]),_:1},8,["label"]),_(d,{label:t.$t("Actions"),width:150},{default:w($=>[g("div",Kkt,[_(l,{onClick:x=>o.showForm($.row),size:"small"},{default:w(()=>[B(S(t.$t("Edit")),1)]),_:2},1032,["onClick"]),_(l,{onClick:x=>o.removeWebhook($.row),type:"danger",plain:"",size:"small"},{default:w(()=>[B(S(t.$t("Remove")),1)]),_:2},1032,["onClick"])])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[C,s.loading]])]),g("div",Zkt,[_(p,{hide_on_single:!1,onFetch:e[2]||(e[2]=$=>o.fetch()),pagination:s.paginate},null,8,["pagination"])])])):(v(),A("div",Jkt,[Qkt,g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_incoming_webhooks"),class:"el-button el-button--danger"},S(t.$t("Upgrade to Pro")),9,e6t)]))])])]),_:1},8,["title"])]),_:1}),_(k,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:s.showModal,"onUpdate:modelValue":e[5]||(e[5]=$=>s.showModal=$),direction:"rtl"},{header:w(({close:$})=>[g("div",t6t,[g("h4",null,S(t.$t(s.editing_webhook.id?"Update Webhook":"Add Webhook")),1)])]),default:w(()=>[g("div",n6t,[s.showModal?(v(),D(b,{key:0,onCompleted:e[3]||(e[3]=()=>{o.fetch(),s.showModal=!1}),modelValue:s.editing_webhook,"onUpdate:modelValue":e[4]||(e[4]=$=>s.editing_webhook=$),courses:s.courses,spaces:s.spaces},null,8,["modelValue","courses","spaces"])):O("",!0)])]),_:1},8,["width","modelValue"])],64)}const i6t=de(Bkt,[["render",s6t]]),o6t={name:"Overview",components:{AppLayout:pi,Layout:fi},data(){return{analyticsNavigations:[{title:this.$t("Overview"),route:"analytics_overview"},{title:this.$t("Members"),route:"analytics_members"},{title:this.$t("Spaces"),route:"analytics_spaces"}]}},mounted(){this.changeTitle(this.$t("Reports"))}},r6t={class:"object_menu"},a6t={class:"fcom_space_menu_ul"};function l6t(t,e,n,i,s,o){const r=W("router-link"),a=W("RouterView"),l=W("layout"),c=W("app-layout");return v(),D(c,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:w(()=>[_(l,{wrapper_class:"no_bg_layout",title:t.$t("Reports")+" (Beta)"},{actions:w(()=>[g("div",r6t,[g("ul",a6t,[(v(!0),A(ee,null,Ce(s.analyticsNavigations,(u,d)=>(v(),A("li",{key:`analytics-navigation-${d}`},[_(r,{to:{name:u.route}},{default:w(()=>[B(S(t.$t(u.title)),1)]),_:2},1032,["to"])]))),128))])])]),default:w(()=>[_(a)]),_:1},8,["title"])]),_:1})}const c6t=de(o6t,[["render",l6t]]),u6t={name:"CheckProStatus"},d6t={class:"upgrade-pro-wrapper"},h6t={class:"upgrade-text"},f6t={class:"upgrade-button"},p6t=["href"];function m6t(t,e,n,i,s,o){return v(),A("div",d6t,[g("div",h6t,[g("h2",null,S(t.$t("This Feature is [Pro] Only")),1),g("p",null,S(t.$t("Upgrade to Pro and unlock this feature and many others!")),1)]),g("div",f6t,[g("a",{href:t.$upgradeUrl("feature_lock_analytics"),class:"button",target:"_blank"},S(t.$t("Upgrade Now")),9,p6t)])])}const lS=de(u6t,[["render",m6t],["__scopeId","data-v-492a58f0"]]),g6t={name:"AnalyticsHeader",props:["predefinedDate","predefinedDates","dateRanges"],emits:["update:date-ranges","update:predefined-date"],data(){return{localPredefinedDate:this.predefinedDate,localDateRanges:this.dateRanges}},methods:{setDateRange(t){if(!t||t===""){this.$nextTick(()=>{this.$refs.datePickerRef.focus()});return}const e=new Date;e.setDate(e.getDate()-parseInt(t));const n=e.toISOString().split("T")[0],i=new Date().toISOString().split("T")[0];this.localDateRanges=[n,i],this.$emit("update:date-ranges",this.localDateRanges),this.$emit("update:predefined-date",this.localPredefinedDate)},disabledDate(t){return t.getTime()>Date.now()}},watch:{localDateRanges(t){this.$emit("update:date-ranges",t)}}},v6t={class:"fcom-report-header"},_6t={class:"fcom-report-header-action"};function y6t(t,e,n,i,s,o){const r=on,a=Jt,l=Od;return v(),A("div",v6t,[g("h4",null,S(t.$t("Overview")),1),g("div",_6t,[_(a,{modelValue:s.localPredefinedDate,"onUpdate:modelValue":e[0]||(e[0]=c=>s.localPredefinedDate=c),onChange:o.setDateRange,class:"date-selector"},{default:w(()=>[(v(!0),A(ee,null,Ce(n.predefinedDates,(c,u)=>(v(),D(r,{key:`date-shortcut-${u}`,label:c.label,value:c.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"]),_(l,{modelValue:s.localDateRanges,"onUpdate:modelValue":e[1]||(e[1]=c=>s.localDateRanges=c),ref:"datePickerRef",type:"daterange","range-separator":"-",clearable:!1,"disabled-date":o.disabledDate,"start-placeholder":t.$t("Start date"),"end-placeholder":t.$t("End date"),format:t.siteDateFormat,"value-format":"YYYY-MM-DD",onChange:o.setDateRange},null,8,["modelValue","disabled-date","start-placeholder","end-placeholder","format","onChange"])])])}const b6t=de(g6t,[["render",y6t]]),w6t={name:"Loading",props:{section:{type:Number,default:()=>1}}};function k6t(t,e,n,i,s,o){const r=Wt;return v(!0),A(ee,null,Ce(n.section,a=>(v(),A("div",{class:"fcom-loading",key:`loading-spinner-item-${a}`},[_(r,{rows:5,loading:"",animated:""})]))),128)}const La=de(w6t,[["render",k6t]]),C6t={name:"AnalyticsWidgets",components:{Loading:La},props:["dateRanges"],data(){return{loading:!1,widgets:[]}},watch:{dateRanges:"fetchData"},methods:{fetchData(){this.loading=!0,this.$get("analytics/overview/widget",{start_date:this.dateRanges[0],end_date:this.dateRanges[1]}).then(t=>{let e=Object.values(t.data).map(n=>{const i=typeof(n==null?void 0:n.comparison)=="string"&&n.comparison.startsWith("-");return{...n,down:i}});this.widgets=e}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.fetchData()}},x6t={key:1,class:"fcom-report-stat-widgets"},S6t={class:"stat-title"};function $6t(t,e,n,i,s,o){const r=W("Loading");return s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",x6t,[(v(!0),A(ee,null,Ce(s.widgets,(a,l)=>(v(),A("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",S6t,S(a.title),1),g("h3",null,[B(S(a.total_records)+" ",1),g("span",{class:G(["stat-percent",{"stat-down":a.down}])},S(a.comparison),3)])]))),128))]))}const A6t=de(C6t,[["render",$6t]]);/*!
 * ApexCharts v4.4.0
 * (c) 2018-2025 ApexCharts
 * Released under the MIT License.
 */function uC(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function ZH(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function lt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function oT(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,eU(i.key),i)}}function ct(t,e,n){return e&&oT(t.prototype,e),n&&oT(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function pm(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=cS(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var i=0,s=function(){};return{s,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(l){throw l},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o,r=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var l=n.next();return r=l.done,l},e:function(l){a=!0,o=l},f:function(){try{r||n.return==null||n.return()}finally{if(a)throw o}}}}function J1(t){var e=JH();return function(){var n,i=Ly(t);if(e){var s=Ly(this).constructor;n=Reflect.construct(i,arguments,s)}else n=i.apply(this,arguments);return function(o,r){if(r&&(typeof r=="object"||typeof r=="function"))return r;if(r!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ZH(o)}(this,n)}}function Iy(t,e,n){return(e=eU(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Ly(t){return Ly=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ly(t)}function Q1(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dC(t,e)}function JH(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(JH=function(){return!!t})()}function rT(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,i)}return n}function Je(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?rT(Object(n),!0).forEach(function(i){Iy(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rT(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function dC(t,e){return dC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},dC(t,e)}function QH(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,i){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var o,r,a,l,c=[],u=!0,d=!1;try{if(a=(s=s.call(n)).next,i===0){if(Object(s)!==s)return;u=!1}else for(;!(u=(o=a.call(s)).done)&&(c.push(o.value),c.length!==i);u=!0);}catch(h){d=!0,r=h}finally{try{if(!u&&s.return!=null&&(l=s.return(),Object(l)!==l))return}finally{if(d)throw r}}return c}}(t,e)||cS(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Ns(t){return function(e){if(Array.isArray(e))return uC(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||cS(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function eU(t){var e=function(n,i){if(typeof n!="object"||!n)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,i||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}(t,"string");return typeof e=="symbol"?e:e+""}function Uf(t){return Uf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Uf(t)}function cS(t,e){if(t){if(typeof t=="string")return uC(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uC(t,e):void 0}}var pe=function(){function t(){lt(this,t)}return ct(t,[{key:"shadeRGBColor",value:function(e,n){var i=n.split(","),s=e<0?0:255,o=e<0?-1*e:e,r=parseInt(i[0].slice(4),10),a=parseInt(i[1],10),l=parseInt(i[2],10);return"rgb("+(Math.round((s-r)*o)+r)+","+(Math.round((s-a)*o)+a)+","+(Math.round((s-l)*o)+l)+")"}},{key:"shadeHexColor",value:function(e,n){var i=parseInt(n.slice(1),16),s=e<0?0:255,o=e<0?-1*e:e,r=i>>16,a=i>>8&255,l=255&i;return"#"+(16777216+65536*(Math.round((s-r)*o)+r)+256*(Math.round((s-a)*o)+a)+(Math.round((s-l)*o)+l)).toString(16).slice(1)}},{key:"shadeColor",value:function(e,n){return t.isColorHex(n)?this.shadeHexColor(e,n):this.shadeRGBColor(e,n)}}],[{key:"bind",value:function(e,n){return function(){return e.apply(n,arguments)}}},{key:"isObject",value:function(e){return e&&Uf(e)==="object"&&!Array.isArray(e)&&e!=null}},{key:"is",value:function(e,n){return Object.prototype.toString.call(n)==="[object "+e+"]"}},{key:"listToArray",value:function(e){var n,i=[];for(n=0;n<e.length;n++)i[n]=e[n];return i}},{key:"extend",value:function(e,n){var i=this;typeof Object.assign!="function"&&(Object.assign=function(o){if(o==null)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(o),a=1;a<arguments.length;a++){var l=arguments[a];if(l!=null)for(var c in l)l.hasOwnProperty(c)&&(r[c]=l[c])}return r});var s=Object.assign({},e);return this.isObject(e)&&this.isObject(n)&&Object.keys(n).forEach(function(o){i.isObject(n[o])&&o in e?s[o]=i.extend(e[o],n[o]):Object.assign(s,Iy({},o,n[o]))}),s}},{key:"extendArray",value:function(e,n){var i=[];return e.map(function(s){i.push(t.extend(n,s))}),e=i}},{key:"monthMod",value:function(e){return e%12}},{key:"clone",value:function(e){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(e===null||Uf(e)!=="object")return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){n=[],i.set(e,n);for(var s=0;s<e.length;s++)n[s]=this.clone(e[s],i)}else if(e instanceof Date)n=new Date(e.getTime());else for(var o in n={},i.set(e,n),e)e.hasOwnProperty(o)&&(n[o]=this.clone(e[o],i));return n}},{key:"log10",value:function(e){return Math.log(e)/Math.LN10}},{key:"roundToBase10",value:function(e){return Math.pow(10,Math.floor(Math.log10(e)))}},{key:"roundToBase",value:function(e,n){return Math.pow(n,Math.floor(Math.log(e)/Math.log(n)))}},{key:"parseNumber",value:function(e){return e===null?e:parseFloat(e)}},{key:"stripNumber",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;return Number.isInteger(e)?e:parseFloat(e.toPrecision(n))}},{key:"randomId",value:function(){return(Math.random()+1).toString(36).substring(4)}},{key:"noExponents",value:function(e){return e.toString().includes("e")?Math.round(e):e}},{key:"elementExists",value:function(e){return!(!e||!e.isConnected)}},{key:"getDimensions",value:function(e){var n=getComputedStyle(e,null),i=e.clientHeight,s=e.clientWidth;return i-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),[s-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),i]}},{key:"getBoundingClientRect",value:function(e){var n=e.getBoundingClientRect();return{top:n.top,right:n.right,bottom:n.bottom,left:n.left,width:e.clientWidth,height:e.clientHeight,x:n.left,y:n.top}}},{key:"getLargestStringFromArr",value:function(e){return e.reduce(function(n,i){return Array.isArray(i)&&(i=i.reduce(function(s,o){return s.length>o.length?s:o})),n.length>i.length?n:i},0)}},{key:"hexToRgba",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"#999999",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.6;e.substring(0,1)!=="#"&&(e="#999999");var i=e.replace("#","");i=i.match(new RegExp("(.{"+i.length/3+"})","g"));for(var s=0;s<i.length;s++)i[s]=parseInt(i[s].length===1?i[s]+i[s]:i[s],16);return n!==void 0&&i.push(n),"rgba("+i.join(",")+")"}},{key:"getOpacityFromRGBA",value:function(e){return parseFloat(e.replace(/^.*,(.+)\)/,"$1"))}},{key:"rgb2hex",value:function(e){return(e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&e.length===4?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):""}},{key:"isColorHex",value:function(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)|(^#[0-9A-F]{8}$)/i.test(e)}},{key:"getPolygonPos",value:function(e,n){for(var i=[],s=2*Math.PI/n,o=0;o<n;o++){var r={};r.x=e*Math.sin(o*s),r.y=-e*Math.cos(o*s),i.push(r)}return i}},{key:"polarToCartesian",value:function(e,n,i,s){var o=(s-90)*Math.PI/180;return{x:e+i*Math.cos(o),y:n+i*Math.sin(o)}}},{key:"escapeString",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x",i=e.toString().slice();return i=i.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,n)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,n,i){if(i>=e.length)for(var s=i-e.length+1;s--;)e.push(void 0);return e.splice(i,0,e.splice(n,1)[0]),e}},{key:"extractNumber",value:function(e){return parseFloat(e.replace(/[^\d.]*/g,""))}},{key:"findAncestor",value:function(e,n){for(;(e=e.parentElement)&&!e.classList.contains(n););return e}},{key:"setELstyles",value:function(e,n){for(var i in n)n.hasOwnProperty(i)&&(e.style.key=n[i])}},{key:"preciseAddition",value:function(e,n){var i=(String(e).split(".")[1]||"").length,s=(String(n).split(".")[1]||"").length,o=Math.pow(10,Math.max(i,s));return(Math.round(e*o)+Math.round(n*o))/o}},{key:"isNumber",value:function(e){return!isNaN(e)&&parseFloat(Number(e))===e&&!isNaN(parseInt(e,10))}},{key:"isFloat",value:function(e){return Number(e)===e&&e%1!=0}},{key:"isMsEdge",value:function(){var e=window.navigator.userAgent,n=e.indexOf("Edge/");return n>0&&parseInt(e.substring(n+5,e.indexOf(".",n)),10)}},{key:"getGCD",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,s=Math.pow(10,i-Math.floor(Math.log10(Math.max(e,n))));for(e=Math.round(Math.abs(e)*s),n=Math.round(Math.abs(n)*s);n;){var o=n;n=e%n,e=o}return e/s}},{key:"getPrimeFactors",value:function(e){for(var n=[],i=2;e>=2;)e%i==0?(n.push(i),e/=i):i++;return n}},{key:"mod",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,s=Math.pow(10,i-Math.floor(Math.log10(Math.max(e,n))));return(e=Math.round(Math.abs(e)*s))%(n=Math.round(Math.abs(n)*s))/s}}]),t}(),wp=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"animateLine",value:function(e,n,i,s){e.attr(n).animate(s).attr(i)}},{key:"animateMarker",value:function(e,n,i,s){e.attr({opacity:0}).animate(n).attr({opacity:1}).after(function(){s()})}},{key:"animateRect",value:function(e,n,i,s,o){e.attr(n).animate(s).attr(i).after(function(){return o()})}},{key:"animatePathsGradually",value:function(e){var n=e.el,i=e.realIndex,s=e.j,o=e.fill,r=e.pathFrom,a=e.pathTo,l=e.speed,c=e.delay,u=this.w,d=0;u.config.chart.animations.animateGradually.enabled&&(d=u.config.chart.animations.animateGradually.delay),u.config.chart.animations.dynamicAnimation.enabled&&u.globals.dataChanged&&u.config.chart.type!=="bar"&&(d=0),this.morphSVG(n,i,s,u.config.chart.type!=="line"||u.globals.comboCharts?o:"stroke",r,a,l,c*d)}},{key:"showDelayedElements",value:function(){this.w.globals.delayedElements.forEach(function(e){var n=e.el;n.classList.remove("apexcharts-element-hidden"),n.classList.add("apexcharts-hidden-element-shown")})}},{key:"animationCompleted",value:function(e){var n=this.w;n.globals.animationEnded||(n.globals.animationEnded=!0,this.showDelayedElements(),typeof n.config.chart.events.animationEnd=="function"&&n.config.chart.events.animationEnd(this.ctx,{el:e,w:n}))}},{key:"morphSVG",value:function(e,n,i,s,o,r,a,l){var c=this,u=this.w;o||(o=e.attr("pathFrom")),r||(r=e.attr("pathTo"));var d=function(h){return u.config.chart.type==="radar"&&(a=1),"M 0 ".concat(u.globals.gridHeight)};(!o||o.indexOf("undefined")>-1||o.indexOf("NaN")>-1)&&(o=d()),(!r.trim()||r.indexOf("undefined")>-1||r.indexOf("NaN")>-1)&&(r=d()),u.globals.shouldAnimate||(a=1),e.plot(o).animate(1,l).plot(o).animate(a,l).plot(r).after(function(){pe.isNumber(i)?i===u.globals.series[u.globals.maxValsInArrayIndex].length-2&&u.globals.shouldAnimate&&c.animationCompleted(e):s!=="none"&&u.globals.shouldAnimate&&(!u.globals.comboCharts&&n===u.globals.series.length-1||u.globals.comboCharts)&&c.animationCompleted(e),c.showDelayedElements()})}}]),t}();const hC={},tU=[];function Kt(t,e){if(Array.isArray(t))for(const n of t)Kt(n,e);else if(typeof t!="object")nU(Object.getOwnPropertyNames(e)),hC[t]=Object.assign(hC[t]||{},e);else for(const n in t)Kt(n,t[n])}function Xi(t){return hC[t]||{}}function nU(t){tU.push(...t)}function uS(t,e){let n;const i=t.length,s=[];for(n=0;n<i;n++)s.push(e(t[n]));return s}function p3(t){return t%360*Math.PI/180}function kp(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Cp(t,e,n,i){return e!=null&&n!=null||(i=i||t.bbox(),e==null?e=i.width/i.height*n:n==null&&(n=i.height/i.width*e)),{width:e,height:n}}function fC(t,e){const n=t.origin;let i=t.ox!=null?t.ox:t.originX!=null?t.originX:"center",s=t.oy!=null?t.oy:t.originY!=null?t.originY:"center";n!=null&&([i,s]=Array.isArray(n)?n:typeof n=="object"?[n.x,n.y]:[n,n]);const o=typeof i=="string",r=typeof s=="string";if(o||r){const{height:a,width:l,x:c,y:u}=e.bbox();o&&(i=i.includes("left")?c:i.includes("right")?c+l:c+l/2),r&&(s=s.includes("top")?u:s.includes("bottom")?u+a:u+a/2)}return[i,s]}const E6t=new Set(["desc","metadata","title"]),pC=t=>E6t.has(t.nodeName),sU=(t,e,n={})=>{const i={...e};for(const s in i)i[s].valueOf()===n[s]&&delete i[s];Object.keys(i).length?t.node.setAttribute("data-svgjs",JSON.stringify(i)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},dS="http://www.w3.org/2000/svg",m3="http://www.w3.org/2000/xmlns/",xp="http://www.w3.org/1999/xlink",pn={window:typeof window>"u"?null:window,document:typeof document>"u"?null:document};function ev(){return pn.window}let hS=class{};const ed={},fS="___SYMBOL___ROOT___";function Qg(t,e=dS){return pn.document.createElementNS(e,t)}function Ri(t,e=!1){if(t instanceof hS)return t;if(typeof t=="object")return g3(t);if(t==null)return new ed[fS];if(typeof t=="string"&&t.charAt(0)!=="<")return g3(pn.document.querySelector(t));const n=e?pn.document.createElement("div"):Qg("svg");return n.innerHTML=t,t=g3(n.firstChild),n.removeChild(n.firstChild),t}function Nn(t,e){return e&&(e instanceof pn.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:Qg(t)}function Ko(t){if(!t)return null;if(t.instance instanceof hS)return t.instance;if(t.nodeName==="#document-fragment")return new ed.Fragment(t);let e=kp(t.nodeName||"Dom");return e==="LinearGradient"||e==="RadialGradient"?e="Gradient":ed[e]||(e="Dom"),new ed[e](t)}let g3=Ko;function vn(t,e=t.name,n=!1){return ed[e]=t,n&&(ed[fS]=t),nU(Object.getOwnPropertyNames(t.prototype)),t}let M6t=1e3;function iU(t){return"Svgjs"+kp(t)+M6t++}function oU(t){for(let e=t.children.length-1;e>=0;e--)oU(t.children[e]);return t.id&&(t.id=iU(t.nodeName)),t}function At(t,e){let n,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;i>=0;i--)for(n in e)t[i].prototype[n]=e[n]}function Fn(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}Kt("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=Ri(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=Ri(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=Ri(t)).before(this),this},insertAfter:function(t){return(t=Ri(t)).after(this),this}});const rU=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,T6t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,P6t=/rgb\((\d+),(\d+),(\d+)\)/,I6t=/(#[a-z_][a-z0-9\-_]*)/i,L6t=/\)\s*,?\s*/,O6t=/\s/g,aT=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,lT=/^rgb\(/,cT=/^(\s+)?$/,uT=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,D6t=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,bl=/[\s,]+/,pS=/[MLHVCSQTAZ]/i;function R6t(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return n.length===1?"0"+n:n}function ih(t,e){for(let n=e.length;n--;)if(t[e[n]]==null)return!1;return!0}function v3(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}Kt("Dom",{classes:function(){const t=this.attr("class");return t==null?[]:t.trim().split(bl)},hasClass:function(t){return this.classes().indexOf(t)!==-1},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter(function(e){return e!==t}).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),Kt("Dom",{css:function(t,e){const n={};if(arguments.length===0)return this.node.style.cssText.split(/\s*;\s*/).filter(function(i){return!!i.length}).forEach(function(i){const s=i.split(/\s*:\s*/);n[s[0]]=s[1]}),n;if(arguments.length<2){if(Array.isArray(t)){for(const i of t){const s=i;n[i]=this.node.style.getPropertyValue(s)}return n}if(typeof t=="string")return this.node.style.getPropertyValue(t);if(typeof t=="object")for(const i in t)this.node.style.setProperty(i,t[i]==null||cT.test(t[i])?"":t[i])}return arguments.length===2&&this.node.style.setProperty(t,e==null||cT.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return this.css("display")!=="none"}}),Kt("Dom",{data:function(t,e,n){if(t==null)return this.data(uS(function(i,s){let o;const r=i.length,a=[];for(o=0;o<r;o++)s(i[o])&&a.push(i[o]);return a}(this.node.attributes,i=>i.nodeName.indexOf("data-")===0),i=>i.nodeName.slice(5)));if(t instanceof Array){const i={};for(const s of t)i[s]=this.data(s);return i}if(typeof t=="object")for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch{return this.attr("data-"+t)}else this.attr("data-"+t,e===null?null:n===!0||typeof e=="string"||typeof e=="number"?e:JSON.stringify(e));return this}}),Kt("Dom",{remember:function(t,e){if(typeof arguments[0]=="object")for(const n in t)this.remember(n,t[n]);else{if(arguments.length===1)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(arguments.length===0)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class Ln{constructor(...e){this.init(...e)}static isColor(e){return e&&(e instanceof Ln||this.isRgb(e)||this.test(e))}static isRgb(e){return e&&typeof e.r=="number"&&typeof e.g=="number"&&typeof e.b=="number"}static random(e="vibrant",n){const{random:i,round:s,sin:o,PI:r}=Math;if(e==="vibrant"){const a=24*i()+57,l=38*i()+45,c=360*i();return new Ln(a,l,c,"lch")}if(e==="sine"){const a=s(80*o(2*r*(n=n??i())/.5+.01)+150),l=s(50*o(2*r*n/.5+4.6)+200),c=s(100*o(2*r*n/.5+2.3)+150);return new Ln(a,l,c)}if(e==="pastel"){const a=8*i()+86,l=17*i()+9,c=360*i();return new Ln(a,l,c,"lch")}if(e==="dark"){const a=10+10*i(),l=50*i()+86,c=360*i();return new Ln(a,l,c,"lch")}if(e==="rgb"){const a=255*i(),l=255*i(),c=255*i();return new Ln(a,l,c)}if(e==="lab"){const a=100*i(),l=256*i()-128,c=256*i()-128;return new Ln(a,l,c,"lab")}if(e==="grey"){const a=255*i();return new Ln(a,a,a)}throw new Error("Unsupported random color mode")}static test(e){return typeof e=="string"&&(aT.test(e)||lT.test(e))}cmyk(){const{_a:e,_b:n,_c:i}=this.rgb(),[s,o,r]=[e,n,i].map(l=>l/255),a=Math.min(1-s,1-o,1-r);return a===1?new Ln(0,0,0,1,"cmyk"):new Ln((1-s-a)/(1-a),(1-o-a)/(1-a),(1-r-a)/(1-a),a,"cmyk")}hsl(){const{_a:e,_b:n,_c:i}=this.rgb(),[s,o,r]=[e,n,i].map(h=>h/255),a=Math.max(s,o,r),l=Math.min(s,o,r),c=(a+l)/2,u=a===l,d=a-l;return new Ln(360*(u?0:a===s?((o-r)/d+(o<r?6:0))/6:a===o?((r-s)/d+2)/6:a===r?((s-o)/d+4)/6:0),100*(u?0:c>.5?d/(2-a-l):d/(a+l)),100*c,"hsl")}init(e=0,n=0,i=0,s=0,o="rgb"){if(e=e||0,this.space)for(const d in this.space)delete this[this.space[d]];if(typeof e=="number")o=typeof s=="string"?s:o,s=typeof s=="string"?0:s,Object.assign(this,{_a:e,_b:n,_c:i,_d:s,space:o});else if(e instanceof Array)this.space=n||(typeof e[3]=="string"?e[3]:e[4])||"rgb",Object.assign(this,{_a:e[0],_b:e[1],_c:e[2],_d:e[3]||0});else if(e instanceof Object){const d=function(h,f){const p=ih(h,"rgb")?{_a:h.r,_b:h.g,_c:h.b,_d:0,space:"rgb"}:ih(h,"xyz")?{_a:h.x,_b:h.y,_c:h.z,_d:0,space:"xyz"}:ih(h,"hsl")?{_a:h.h,_b:h.s,_c:h.l,_d:0,space:"hsl"}:ih(h,"lab")?{_a:h.l,_b:h.a,_c:h.b,_d:0,space:"lab"}:ih(h,"lch")?{_a:h.l,_b:h.c,_c:h.h,_d:0,space:"lch"}:ih(h,"cmyk")?{_a:h.c,_b:h.m,_c:h.y,_d:h.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return p.space=f||p.space,p}(e,n);Object.assign(this,d)}else if(typeof e=="string")if(lT.test(e)){const d=e.replace(O6t,""),[h,f,p]=P6t.exec(d).slice(1,4).map(m=>parseInt(m));Object.assign(this,{_a:h,_b:f,_c:p,_d:0,space:"rgb"})}else{if(!aT.test(e))throw Error("Unsupported string format, can't construct Color");{const d=m=>parseInt(m,16),[,h,f,p]=T6t.exec(function(m){return m.length===4?["#",m.substring(1,2),m.substring(1,2),m.substring(2,3),m.substring(2,3),m.substring(3,4),m.substring(3,4)].join(""):m}(e)).map(d);Object.assign(this,{_a:h,_b:f,_c:p,_d:0,space:"rgb"})}}const{_a:r,_b:a,_c:l,_d:c}=this,u=this.space==="rgb"?{r,g:a,b:l}:this.space==="xyz"?{x:r,y:a,z:l}:this.space==="hsl"?{h:r,s:a,l}:this.space==="lab"?{l:r,a,b:l}:this.space==="lch"?{l:r,c:a,h:l}:this.space==="cmyk"?{c:r,m:a,y:l,k:c}:{};Object.assign(this,u)}lab(){const{x:e,y:n,z:i}=this.xyz();return new Ln(116*n-16,500*(e-n),200*(n-i),"lab")}lch(){const{l:e,a:n,b:i}=this.lab(),s=Math.sqrt(n**2+i**2);let o=180*Math.atan2(i,n)/Math.PI;return o<0&&(o*=-1,o=360-o),new Ln(e,s,o,"lch")}rgb(){if(this.space==="rgb")return this;if((e=this.space)==="lab"||e==="xyz"||e==="lch"){let{x:n,y:i,z:s}=this;if(this.space==="lab"||this.space==="lch"){let{l:f,a:p,b:m}=this;if(this.space==="lch"){const{c:M,h:P}=this,T=Math.PI/180;p=M*Math.cos(T*P),m=M*Math.sin(T*P)}const y=(f+16)/116,b=p/500+y,k=y-m/200,C=16/116,$=.008856,x=7.787;n=.95047*(b**3>$?b**3:(b-C)/x),i=1*(y**3>$?y**3:(y-C)/x),s=1.08883*(k**3>$?k**3:(k-C)/x)}const o=3.2406*n+-1.5372*i+-.4986*s,r=-.9689*n+1.8758*i+.0415*s,a=.0557*n+-.204*i+1.057*s,l=Math.pow,c=.0031308,u=o>c?1.055*l(o,1/2.4)-.055:12.92*o,d=r>c?1.055*l(r,1/2.4)-.055:12.92*r,h=a>c?1.055*l(a,1/2.4)-.055:12.92*a;return new Ln(255*u,255*d,255*h)}if(this.space==="hsl"){let{h:n,s:i,l:s}=this;if(n/=360,i/=100,s/=100,i===0)return s*=255,new Ln(s,s,s);const o=s<.5?s*(1+i):s+i-s*i,r=2*s-o,a=255*v3(r,o,n+1/3),l=255*v3(r,o,n),c=255*v3(r,o,n-1/3);return new Ln(a,l,c)}if(this.space==="cmyk"){const{c:n,m:i,y:s,k:o}=this,r=255*(1-Math.min(1,n*(1-o)+o)),a=255*(1-Math.min(1,i*(1-o)+o)),l=255*(1-Math.min(1,s*(1-o)+o));return new Ln(r,a,l)}return this;var e}toArray(){const{_a:e,_b:n,_c:i,_d:s,space:o}=this;return[e,n,i,s,o]}toHex(){const[e,n,i]=this._clamped().map(R6t);return`#${e}${n}${i}`}toRgb(){const[e,n,i]=this._clamped();return`rgb(${e},${n},${i})`}toString(){return this.toHex()}xyz(){const{_a:e,_b:n,_c:i}=this.rgb(),[s,o,r]=[e,n,i].map(y=>y/255),a=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,l=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,c=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,u=(.4124*a+.3576*l+.1805*c)/.95047,d=(.2126*a+.7152*l+.0722*c)/1,h=(.0193*a+.1192*l+.9505*c)/1.08883,f=u>.008856?Math.pow(u,1/3):7.787*u+16/116,p=d>.008856?Math.pow(d,1/3):7.787*d+16/116,m=h>.008856?Math.pow(h,1/3):7.787*h+16/116;return new Ln(f,p,m,"xyz")}_clamped(){const{_a:e,_b:n,_c:i}=this.rgb(),{max:s,min:o,round:r}=Math;return[e,n,i].map(a=>s(0,o(r(a),255)))}}let Dn=class aU{constructor(...e){this.init(...e)}clone(){return new aU(this)}init(e,n){const o=Array.isArray(e)?{x:e[0],y:e[1]}:typeof e=="object"?{x:e.x,y:e.y}:{x:e,y:n};return this.x=o.x==null?0:o.x,this.y=o.y==null?0:o.y,this}toArray(){return[this.x,this.y]}transform(e){return this.clone().transformO(e)}transformO(e){ln.isMatrixLike(e)||(e=new ln(e));const{x:n,y:i}=this;return this.x=e.a*n+e.c*i+e.e,this.y=e.b*n+e.d*i+e.f,this}};function oh(t,e,n){return Math.abs(e-t)<(n||1e-6)}let ln=class Ls{constructor(...e){this.init(...e)}static formatTransforms(e){const n=e.flip==="both"||e.flip===!0,i=e.flip&&(n||e.flip==="x")?-1:1,s=e.flip&&(n||e.flip==="y")?-1:1,o=e.skew&&e.skew.length?e.skew[0]:isFinite(e.skew)?e.skew:isFinite(e.skewX)?e.skewX:0,r=e.skew&&e.skew.length?e.skew[1]:isFinite(e.skew)?e.skew:isFinite(e.skewY)?e.skewY:0,a=e.scale&&e.scale.length?e.scale[0]*i:isFinite(e.scale)?e.scale*i:isFinite(e.scaleX)?e.scaleX*i:i,l=e.scale&&e.scale.length?e.scale[1]*s:isFinite(e.scale)?e.scale*s:isFinite(e.scaleY)?e.scaleY*s:s,c=e.shear||0,u=e.rotate||e.theta||0,d=new Dn(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),h=d.x,f=d.y,p=new Dn(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),m=p.x,y=p.y,b=new Dn(e.translate||e.tx||e.translateX,e.ty||e.translateY),k=b.x,C=b.y,$=new Dn(e.relative||e.rx||e.relativeX,e.ry||e.relativeY);return{scaleX:a,scaleY:l,skewX:o,skewY:r,shear:c,theta:u,rx:$.x,ry:$.y,tx:k,ty:C,ox:h,oy:f,px:m,py:y}}static fromArray(e){return{a:e[0],b:e[1],c:e[2],d:e[3],e:e[4],f:e[5]}}static isMatrixLike(e){return e.a!=null||e.b!=null||e.c!=null||e.d!=null||e.e!=null||e.f!=null}static matrixMultiply(e,n,i){const s=e.a*n.a+e.c*n.b,o=e.b*n.a+e.d*n.b,r=e.a*n.c+e.c*n.d,a=e.b*n.c+e.d*n.d,l=e.e+e.a*n.e+e.c*n.f,c=e.f+e.b*n.e+e.d*n.f;return i.a=s,i.b=o,i.c=r,i.d=a,i.e=l,i.f=c,i}around(e,n,i){return this.clone().aroundO(e,n,i)}aroundO(e,n,i){const s=e||0,o=n||0;return this.translateO(-s,-o).lmultiplyO(i).translateO(s,o)}clone(){return new Ls(this)}decompose(e=0,n=0){const i=this.a,s=this.b,o=this.c,r=this.d,a=this.e,l=this.f,c=i*r-s*o,u=c>0?1:-1,d=u*Math.sqrt(i*i+s*s),h=Math.atan2(u*s,u*i),f=180/Math.PI*h,p=Math.cos(h),m=Math.sin(h),y=(i*o+s*r)/c,b=o*d/(y*i-s)||r*d/(y*s+i);return{scaleX:d,scaleY:b,shear:y,rotate:f,translateX:a-e+e*p*d+n*(y*p*d-m*b),translateY:l-n+e*m*d+n*(y*m*d+p*b),originX:e,originY:n,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(e){if(e===this)return!0;const n=new Ls(e);return oh(this.a,n.a)&&oh(this.b,n.b)&&oh(this.c,n.c)&&oh(this.d,n.d)&&oh(this.e,n.e)&&oh(this.f,n.f)}flip(e,n){return this.clone().flipO(e,n)}flipO(e,n){return e==="x"?this.scaleO(-1,1,n,0):e==="y"?this.scaleO(1,-1,0,n):this.scaleO(-1,-1,e,n||e)}init(e){const n=Ls.fromArray([1,0,0,1,0,0]);return e=e instanceof ui?e.matrixify():typeof e=="string"?Ls.fromArray(e.split(bl).map(parseFloat)):Array.isArray(e)?Ls.fromArray(e):typeof e=="object"&&Ls.isMatrixLike(e)?e:typeof e=="object"?new Ls().transform(e):arguments.length===6?Ls.fromArray([].slice.call(arguments)):n,this.a=e.a!=null?e.a:n.a,this.b=e.b!=null?e.b:n.b,this.c=e.c!=null?e.c:n.c,this.d=e.d!=null?e.d:n.d,this.e=e.e!=null?e.e:n.e,this.f=e.f!=null?e.f:n.f,this}inverse(){return this.clone().inverseO()}inverseO(){const e=this.a,n=this.b,i=this.c,s=this.d,o=this.e,r=this.f,a=e*s-n*i;if(!a)throw new Error("Cannot invert "+this);const l=s/a,c=-n/a,u=-i/a,d=e/a,h=-(l*o+u*r),f=-(c*o+d*r);return this.a=l,this.b=c,this.c=u,this.d=d,this.e=h,this.f=f,this}lmultiply(e){return this.clone().lmultiplyO(e)}lmultiplyO(e){const n=e instanceof Ls?e:new Ls(e);return Ls.matrixMultiply(n,this,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(e){const n=e instanceof Ls?e:new Ls(e);return Ls.matrixMultiply(this,n,this)}rotate(e,n,i){return this.clone().rotateO(e,n,i)}rotateO(e,n=0,i=0){e=p3(e);const s=Math.cos(e),o=Math.sin(e),{a:r,b:a,c:l,d:c,e:u,f:d}=this;return this.a=r*s-a*o,this.b=a*s+r*o,this.c=l*s-c*o,this.d=c*s+l*o,this.e=u*s-d*o+i*o-n*s+n,this.f=d*s+u*o-n*o-i*s+i,this}scale(){return this.clone().scaleO(...arguments)}scaleO(e,n=e,i=0,s=0){arguments.length===3&&(s=i,i=n,n=e);const{a:o,b:r,c:a,d:l,e:c,f:u}=this;return this.a=o*e,this.b=r*n,this.c=a*e,this.d=l*n,this.e=c*e-i*e+i,this.f=u*n-s*n+s,this}shear(e,n,i){return this.clone().shearO(e,n,i)}shearO(e,n=0,i=0){const{a:s,b:o,c:r,d:a,e:l,f:c}=this;return this.a=s+o*e,this.c=r+a*e,this.e=l+c*e-i*e,this}skew(){return this.clone().skewO(...arguments)}skewO(e,n=e,i=0,s=0){arguments.length===3&&(s=i,i=n,n=e),e=p3(e),n=p3(n);const o=Math.tan(e),r=Math.tan(n),{a,b:l,c,d:u,e:d,f:h}=this;return this.a=a+l*o,this.b=l+a*r,this.c=c+u*o,this.d=u+c*r,this.e=d+h*o-s*o,this.f=h+d*r-i*r,this}skewX(e,n,i){return this.skew(e,0,n,i)}skewY(e,n,i){return this.skew(0,e,n,i)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(e){if(Ls.isMatrixLike(e))return new Ls(e).multiplyO(this);const n=Ls.formatTransforms(e),{x:i,y:s}=new Dn(n.ox,n.oy).transform(this),o=new Ls().translateO(n.rx,n.ry).lmultiplyO(this).translateO(-i,-s).scaleO(n.scaleX,n.scaleY).skewO(n.skewX,n.skewY).shearO(n.shear).rotateO(n.theta).translateO(i,s);if(isFinite(n.px)||isFinite(n.py)){const r=new Dn(i,s).transform(o),a=isFinite(n.px)?n.px-r.x:0,l=isFinite(n.py)?n.py-r.y:0;o.translateO(a,l)}return o.translateO(n.tx,n.ty),o}translate(e,n){return this.clone().translateO(e,n)}translateO(e,n){return this.e+=e||0,this.f+=n||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}};function ic(){if(!ic.nodes){const t=Ri().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;ic.nodes={svg:t,path:e}}if(!ic.nodes.svg.node.parentNode){const t=pn.document.body||pn.document.documentElement;ic.nodes.svg.addTo(t)}return ic.nodes}function lU(t){return!(t.width||t.height||t.x||t.y)}vn(ln,"Matrix");let Ws=class i_{constructor(...e){this.init(...e)}addOffset(){return this.x+=pn.window.pageXOffset,this.y+=pn.window.pageYOffset,new i_(this)}init(e){return e=typeof e=="string"?e.split(bl).map(parseFloat):Array.isArray(e)?e:typeof e=="object"?[e.left!=null?e.left:e.x,e.top!=null?e.top:e.y,e.width,e.height]:arguments.length===4?[].slice.call(arguments):[0,0,0,0],this.x=e[0]||0,this.y=e[1]||0,this.width=this.w=e[2]||0,this.height=this.h=e[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return lU(this)}merge(e){const n=Math.min(this.x,e.x),i=Math.min(this.y,e.y),s=Math.max(this.x+this.width,e.x+e.width)-n,o=Math.max(this.y+this.height,e.y+e.height)-i;return new i_(n,i,s,o)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(e){e instanceof ln||(e=new ln(e));let n=1/0,i=-1/0,s=1/0,o=-1/0;return[new Dn(this.x,this.y),new Dn(this.x2,this.y),new Dn(this.x,this.y2),new Dn(this.x2,this.y2)].forEach(function(r){r=r.transform(e),n=Math.min(n,r.x),i=Math.max(i,r.x),s=Math.min(s,r.y),o=Math.max(o,r.y)}),new i_(n,s,i-n,o-s)}};function dT(t,e,n){let i;try{if(i=e(t.node),lU(i)&&(s=t.node)!==pn.document&&!(pn.document.documentElement.contains||function(o){for(;o.parentNode;)o=o.parentNode;return o===pn.document}).call(pn.document.documentElement,s))throw new Error("Element not in the dom")}catch{i=n(t)}var s;return i}Kt({viewbox:{viewbox(t,e,n,i){return t==null?new Ws(this.attr("viewBox")):this.attr("viewBox",new Ws(t,e,n,i))},zoom(t,e){let{width:n,height:i}=this.attr(["width","height"]);if((n||i)&&typeof n!="string"&&typeof i!="string"||(n=this.node.clientWidth,i=this.node.clientHeight),!n||!i)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const s=this.viewbox(),o=n/s.width,r=i/s.height,a=Math.min(o,r);if(t==null)return a;let l=a/t;l===1/0&&(l=Number.MAX_SAFE_INTEGER/100),e=e||new Dn(n/2/o+s.x,i/2/r+s.y);const c=new Ws(s).transform(new ln({scale:l,origin:e}));return this.viewbox(c)}}}),vn(Ws,"Box");let _d=class extends Array{constructor(e=[],...n){if(super(e,...n),typeof e=="number")return this;this.length=0,this.push(...e)}};At([_d],{each(t,...e){return typeof t=="function"?this.map((n,i,s)=>t.call(n,n,i,s)):this.map(n=>n[t](...e))},toArray(){return Array.prototype.concat.apply([],this)}});const V6t=["toArray","constructor","each"];function Wd(t,e){return new _d(uS((e||pn.document).querySelectorAll(t),function(n){return Ko(n)}))}_d.extend=function(t){t=t.reduce((e,n)=>(V6t.includes(n)||n[0]==="_"||(n in Array.prototype&&(e["$"+n]=Array.prototype[n]),e[n]=function(...i){return this.each(n,...i)}),e),{}),At([_d],t)};let F6t=0;const cU={};function uU(t){let e=t.getEventHolder();return e===pn.window&&(e=cU),e.events||(e.events={}),e.events}function mS(t){return t.getEventTarget()}function Ka(t,e,n,i,s){const o=n.bind(i||t),r=Ri(t),a=uU(r),l=mS(r);e=Array.isArray(e)?e:e.split(bl),n._svgjsListenerId||(n._svgjsListenerId=++F6t),e.forEach(function(c){const u=c.split(".")[0],d=c.split(".")[1]||"*";a[u]=a[u]||{},a[u][d]=a[u][d]||{},a[u][d][n._svgjsListenerId]=o,l.addEventListener(u,o,s||!1)})}function sr(t,e,n,i){const s=Ri(t),o=uU(s),r=mS(s);(typeof n!="function"||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(bl)).forEach(function(a){const l=a&&a.split(".")[0],c=a&&a.split(".")[1];let u,d;if(n)o[l]&&o[l][c||"*"]&&(r.removeEventListener(l,o[l][c||"*"][n],i||!1),delete o[l][c||"*"][n]);else if(l&&c){if(o[l]&&o[l][c]){for(d in o[l][c])sr(r,[l,c].join("."),d);delete o[l][c]}}else if(c)for(a in o)for(u in o[a])c===u&&sr(r,[a,c].join("."));else if(l){if(o[l]){for(u in o[l])sr(r,[l,u].join("."));delete o[l]}}else{for(a in o)sr(r,a);(function(h){let f=h.getEventHolder();f===pn.window&&(f=cU),f.events&&(f.events={})})(s)}})}class tv extends hS{addEventListener(){}dispatch(e,n,i){return function(s,o,r,a){const l=mS(s);return o instanceof pn.window.Event||(o=new pn.window.CustomEvent(o,{detail:r,cancelable:!0,...a})),l.dispatchEvent(o),o}(this,e,n,i)}dispatchEvent(e){const n=this.getEventHolder().events;if(!n)return!0;const i=n[e.type];for(const s in i)for(const o in i[s])i[s][o](e);return!e.defaultPrevented}fire(e,n,i){return this.dispatch(e,n,i),this}getEventHolder(){return this}getEventTarget(){return this}off(e,n,i){return sr(this,e,n,i),this}on(e,n,i,s){return Ka(this,e,n,i,s),this}removeEventListener(){}}function hT(){}vn(tv,"EventTarget");const _3=400,N6t=">",B6t=0,z6t={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class yd extends Array{constructor(...e){super(...e),this.init(...e)}clone(){return new this.constructor(this)}init(e){return typeof e=="number"||(this.length=0,this.push(...this.parse(e))),this}parse(e=[]){return e instanceof Array?e:e.trim().split(bl).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const e=[];return e.push(...this),e}}class zt{constructor(...e){this.init(...e)}convert(e){return new zt(this.value,e)}divide(e){return e=new zt(e),new zt(this/e,this.unit||e.unit)}init(e,n){return n=Array.isArray(e)?e[1]:n,e=Array.isArray(e)?e[0]:e,this.value=0,this.unit=n||"",typeof e=="number"?this.value=isNaN(e)?0:isFinite(e)?e:e<0?-34e37:34e37:typeof e=="string"?(n=e.match(rU))&&(this.value=parseFloat(n[1]),n[5]==="%"?this.value/=100:n[5]==="s"&&(this.value*=1e3),this.unit=n[5]):e instanceof zt&&(this.value=e.valueOf(),this.unit=e.unit),this}minus(e){return e=new zt(e),new zt(this-e,this.unit||e.unit)}plus(e){return e=new zt(e),new zt(this+e,this.unit||e.unit)}times(e){return e=new zt(e),new zt(this*e,this.unit||e.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return(this.unit==="%"?~~(1e8*this.value)/1e6:this.unit==="s"?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const H6t=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),dU=[];class Ic extends tv{constructor(e,n){super(),this.node=e,this.type=e.nodeName,n&&e!==n&&this.attr(n)}add(e,n){return(e=Ri(e)).removeNamespace&&this.node instanceof pn.window.SVGElement&&e.removeNamespace(),n==null?this.node.appendChild(e.node):e.node!==this.node.childNodes[n]&&this.node.insertBefore(e.node,this.node.childNodes[n]),this}addTo(e,n){return Ri(e).put(this,n)}children(){return new _d(uS(this.node.children,function(e){return Ko(e)}))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(e=!0,n=!0){this.writeDataToDom();let i=this.node.cloneNode(e);return n&&(i=oU(i)),new this.constructor(i)}each(e,n){const i=this.children();let s,o;for(s=0,o=i.length;s<o;s++)e.apply(i[s],[s,i]),n&&i[s].each(e,n);return this}element(e,n){return this.put(new Ic(Qg(e),n))}first(){return Ko(this.node.firstChild)}get(e){return Ko(this.node.childNodes[e])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(e){return this.index(e)>=0}html(e,n){return this.xml(e,n,"http://www.w3.org/1999/xhtml")}id(e){return e!==void 0||this.node.id||(this.node.id=iU(this.type)),this.attr("id",e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return Ko(this.node.lastChild)}matches(e){const n=this.node,i=n.matches||n.matchesSelector||n.msMatchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector||n.oMatchesSelector||null;return i&&i.call(n,e)}parent(e){let n=this;if(!n.node.parentNode)return null;if(n=Ko(n.node.parentNode),!e)return n;do if(typeof e=="string"?n.matches(e):n instanceof e)return n;while(n=Ko(n.node.parentNode));return n}put(e,n){return e=Ri(e),this.add(e,n),e}putIn(e,n){return Ri(e).add(this,n)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(e){return this.node.removeChild(e.node),this}replace(e){return e=Ri(e),this.node.parentNode&&this.node.parentNode.replaceChild(e.node,this.node),e}round(e=2,n=null){const i=10**e,s=this.attr(n);for(const o in s)typeof s[o]=="number"&&(s[o]=Math.round(s[o]*i)/i);return this.attr(s),this}svg(e,n){return this.xml(e,n,dS)}toString(){return this.id()}words(e){return this.node.textContent=e,this}wrap(e){const n=this.parent();if(!n)return this.addTo(e);const i=n.index(this);return n.put(e,i).put(this)}writeDataToDom(){return this.each(function(){this.writeDataToDom()}),this}xml(e,n,i){if(typeof e=="boolean"&&(i=n,n=e,e=null),e==null||typeof e=="function"){n=n==null||n,this.writeDataToDom();let a=this;if(e!=null){if(a=Ko(a.node.cloneNode(!0)),n){const l=e(a);if(a=l||a,l===!1)return""}a.each(function(){const l=e(this),c=l||this;l===!1?this.remove():l&&this!==c&&this.replace(c)},!0)}return n?a.node.outerHTML:a.node.innerHTML}n=n!=null&&n;const s=Qg("wrapper",i),o=pn.document.createDocumentFragment();s.innerHTML=e;for(let a=s.children.length;a--;)o.appendChild(s.firstElementChild);const r=this.parent();return n?this.replace(o)&&r:this.add(o)}}At(Ic,{attr:function(t,e,n){if(t==null){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=uT.test(i.nodeValue)?parseFloat(i.nodeValue):i.nodeValue;return t}if(t instanceof Array)return t.reduce((i,s)=>(i[s]=this.attr(s),i),{});if(typeof t=="object"&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(e===null)this.node.removeAttribute(t);else{if(e==null)return(e=this.node.getAttribute(t))==null?z6t[t]:uT.test(e)?parseFloat(e):e;typeof(e=dU.reduce((i,s)=>s(t,i,this),e))=="number"?e=new zt(e):H6t.has(t)&&Ln.isColor(e)?e=new Ln(e):e.constructor===Array&&(e=new yd(e)),t==="leading"?this.leading&&this.leading(e):typeof n=="string"?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||t!=="font-size"&&t!=="x"||this.rebuild()}return this},find:function(t){return Wd(t,this.node)},findOne:function(t){return Ko(this.node.querySelector(t))}}),vn(Ic,"Dom");let ui=class extends Ic{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return t==null?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return t==null?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new zt(t).plus(this.x()))}dy(t=0){return this.y(new zt(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e=typeof t=="string";e||(t=Ri(t));const n=new _d;let i=this;for(;(i=i.parent())&&i.node!==pn.document&&i.nodeName!=="#document-fragment"&&(n.push(i),e||i.node!==t.node)&&(!e||!i.matches(t));)if(i.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(I6t);return e?Ri(e[1]):null}root(){const t=this.parent(function(e){return ed[e]}(fS));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=Cp(this,t,e);return this.width(new zt(n.width)).height(new zt(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return sU(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}};At(ui,{bbox:function(){const t=dT(this,e=>e.getBBox(),e=>{try{const n=e.clone().addTo(ic().svg).show(),i=n.node.getBBox();return n.remove(),i}catch(n){throw new Error(`Getting bbox of element "${e.node.nodeName}" is not possible: ${n.toString()}`)}});return new Ws(t)},rbox:function(t){const e=dT(this,i=>i.getBoundingClientRect(),i=>{throw new Error(`Getting rbox of element "${i.node.nodeName}" is not possible`)}),n=new Ws(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new Dn(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new ln(this.node.getCTM())},screenCTM:function(){try{if(typeof this.isRoot=="function"&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new ln(e)}return new ln(this.node.getScreenCTM())}catch{return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new ln}}}),vn(ui,"Element");const Bp={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return e==="color"?t:t+"-"+e}};["fill","stroke"].forEach(function(t){const e={};let n;e[t]=function(i){if(i===void 0)return this.attr(t);if(typeof i=="string"||i instanceof Ln||Ln.isRgb(i)||i instanceof ui)this.attr(t,i);else for(n=Bp[t].length-1;n>=0;n--)i[Bp[t][n]]!=null&&this.attr(Bp.prefix(t,Bp[t][n]),i[Bp[t][n]]);return this},Kt(["Element","Runner"],e)}),Kt(["Element","Runner"],{matrix:function(t,e,n,i,s,o){return t==null?new ln(this):this.attr("transform",new ln(t,e,n,i,s,o))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,i){return arguments.length===1||arguments.length===3?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:i},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,i){return arguments.length===1||arguments.length===3?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:i},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return"xybothtrue".indexOf(t)===-1&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),Kt("radius",{radius:function(t,e=t){return(this._element||this).type==="radialGradient"?this.attr("r",new zt(t)):this.rx(t).ry(e)}}),Kt("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Dn(this.node.getPointAtLength(t))}}),Kt(["Element","Runner"],{font:function(t,e){if(typeof t=="object"){for(e in t)this.font(e,t[e]);return this}return t==="leading"?this.leading(e):t==="anchor"?this.attr("text-anchor",e):t==="size"||t==="family"||t==="weight"||t==="stretch"||t==="variant"||t==="style"?this.attr("font-"+t,e):this.attr(t,e)}});Kt("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce(function(t,e){return t[e]=function(n){return n===null?this.off(e):this.on(e,n),this},t},{})),Kt("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(L6t).slice(0,-1).map(function(e){const n=e.trim().split("(");return[n[0],n[1].split(bl).map(function(i){return parseFloat(i)})]}).reverse().reduce(function(e,n){return n[0]==="matrix"?e.lmultiply(ln.fromArray(n[1])):e[n[0]].apply(e,n[1])},new ln)},toParent:function(t,e){if(this===t)return this;if(pC(this.node))return this.addTo(t,e);const n=this.screenCTM(),i=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(i.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(t==null||typeof t=="string"){const i=new ln(this).decompose();return t==null?i:i[t]}ln.isMatrixLike(t)||(t={...t,origin:fC(t,this)});const n=new ln(e===!0?this:e||!1).transform(t);return this.attr("transform",n)}});class Yi extends ui{flatten(){return this.each(function(){if(this instanceof Yi)return this.flatten().ungroup()}),this}ungroup(e=this.parent(),n=e.index(this)){return n=n===-1?e.children().length:n,this.each(function(i,s){return s[s.length-i-1].toParent(e,n)}),this.remove()}}vn(Yi,"Container");class x2 extends Yi{constructor(e,n=e){super(Nn("defs",e),n)}flatten(){return this}ungroup(){return this}}vn(x2,"Defs");class Ho extends ui{}function gS(t){return this.attr("rx",t)}function vS(t){return this.attr("ry",t)}function hU(t){return t==null?this.cx()-this.rx():this.cx(t+this.rx())}function fU(t){return t==null?this.cy()-this.ry():this.cy(t+this.ry())}function pU(t){return this.attr("cx",t)}function mU(t){return this.attr("cy",t)}function gU(t){return t==null?2*this.rx():this.rx(new zt(t).divide(2))}function vU(t){return t==null?2*this.ry():this.ry(new zt(t).divide(2))}vn(Ho,"Shape");var U6t=Object.freeze({__proto__:null,cx:pU,cy:mU,height:vU,rx:gS,ry:vS,width:gU,x:hU,y:fU});class o_ extends Ho{constructor(e,n=e){super(Nn("ellipse",e),n)}size(e,n){const i=Cp(this,e,n);return this.rx(new zt(i.width).divide(2)).ry(new zt(i.height).divide(2))}}At(o_,U6t),Kt("Container",{ellipse:Fn(function(t=0,e=t){return this.put(new o_).size(t,e).move(0,0)})}),vn(o_,"Ellipse");class _U extends Ic{constructor(e=pn.document.createDocumentFragment()){super(e)}xml(e,n,i){if(typeof e=="boolean"&&(i=n,n=e,e=null),e==null||typeof e=="function"){const s=new Ic(Qg("wrapper",i));return s.add(this.node.cloneNode(!0)),s.xml(!1,i)}return super.xml(e,!1,i)}}function yU(t,e){return(this._element||this).type==="radialGradient"?this.attr({fx:new zt(t),fy:new zt(e)}):this.attr({x1:new zt(t),y1:new zt(e)})}function bU(t,e){return(this._element||this).type==="radialGradient"?this.attr({cx:new zt(t),cy:new zt(e)}):this.attr({x2:new zt(t),y2:new zt(e)})}vn(_U,"Fragment");var j6t=Object.freeze({__proto__:null,from:yU,to:bU});class ng extends Yi{constructor(e,n){super(Nn(e+"Gradient",typeof e=="string"?null:e),n)}attr(e,n,i){return e==="transform"&&(e="gradientTransform"),super.attr(e,n,i)}bbox(){return new Ws}targets(){return Wd("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}url(){return"url(#"+this.id()+")"}}At(ng,j6t),Kt({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:Fn(function(t,e){return this.put(new ng(t)).update(e)})}}),vn(ng,"Gradient");class e1 extends Yi{constructor(e,n=e){super(Nn("pattern",e),n)}attr(e,n,i){return e==="transform"&&(e="patternTransform"),super.attr(e,n,i)}bbox(){return new Ws}targets(){return Wd("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(e){return this.clear(),typeof e=="function"&&e.call(this,this),this}url(){return"url(#"+this.id()+")"}}Kt({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:Fn(function(t,e,n){return this.put(new e1).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})})}}),vn(e1,"Pattern");let r_=class extends Ho{constructor(t,e=t){super(Nn("image",t),e)}load(t,e){if(!t)return this;const n=new pn.window.Image;return Ka(n,"load",function(i){const s=this.parent(e1);this.width()===0&&this.height()===0&&this.size(n.width,n.height),s instanceof e1&&s.width()===0&&s.height()===0&&s.size(this.width(),this.height()),typeof e=="function"&&e.call(this,i)},this),Ka(n,"load error",function(){sr(n)}),this.attr("href",n.src=t,xp)}};var fT;fT=function(t,e,n){return t!=="fill"&&t!=="stroke"||D6t.test(e)&&(e=n.root().defs().image(e)),e instanceof r_&&(e=n.root().defs().pattern(0,0,i=>{i.add(e)})),e},dU.push(fT),Kt({Container:{image:Fn(function(t,e){return this.put(new r_).size(0,0).load(t,e)})}}),vn(r_,"Image");class Lc extends yd{bbox(){let e=-1/0,n=-1/0,i=1/0,s=1/0;return this.forEach(function(o){e=Math.max(o[0],e),n=Math.max(o[1],n),i=Math.min(o[0],i),s=Math.min(o[1],s)}),new Ws(i,s,e-i,n-s)}move(e,n){const i=this.bbox();if(e-=i.x,n-=i.y,!isNaN(e)&&!isNaN(n))for(let s=this.length-1;s>=0;s--)this[s]=[this[s][0]+e,this[s][1]+n];return this}parse(e=[0,0]){const n=[];(e=e instanceof Array?Array.prototype.concat.apply([],e):e.trim().split(bl).map(parseFloat)).length%2!=0&&e.pop();for(let i=0,s=e.length;i<s;i+=2)n.push([e[i],e[i+1]]);return n}size(e,n){let i;const s=this.bbox();for(i=this.length-1;i>=0;i--)s.width&&(this[i][0]=(this[i][0]-s.x)*e/s.width+s.x),s.height&&(this[i][1]=(this[i][1]-s.y)*n/s.height+s.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const e=[];for(let n=0,i=this.length;n<i;n++)e.push(this[n].join(","));return e.join(" ")}transform(e){return this.clone().transformO(e)}transformO(e){ln.isMatrixLike(e)||(e=new ln(e));for(let n=this.length;n--;){const[i,s]=this[n];this[n][0]=e.a*i+e.c*s+e.e,this[n][1]=e.b*i+e.d*s+e.f}return this}}const W6t=Lc;var _S=Object.freeze({__proto__:null,MorphArray:W6t,height:function(t){const e=this.bbox();return t==null?e.height:this.size(e.width,t)},width:function(t){const e=this.bbox();return t==null?e.width:this.size(t,e.height)},x:function(t){return t==null?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return t==null?this.bbox().y:this.move(this.bbox().x,t)}});let Ou=class extends Ho{constructor(t,e=t){super(Nn("line",t),e)}array(){return new Lc([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,i){return t==null?this.array():(t=e!==void 0?{x1:t,y1:e,x2:n,y2:i}:new Lc(t).toLine(),this.attr(t))}size(t,e){const n=Cp(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}};At(Ou,_S),Kt({Container:{line:Fn(function(...t){return Ou.prototype.plot.apply(this.put(new Ou),t[0]!=null?t:[0,0,0,0])})}}),vn(Ou,"Line");let a_=class extends Yi{constructor(t,e=t){super(Nn("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),typeof t=="function"&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}};function Dh(t,e){return function(n){return n==null?this[t]:(this[t]=n,e&&e.call(this),this)}}Kt({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:Fn(function(t,e,n){return this.put(new a_).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)})},marker:{marker(t,e,n,i){let s=["marker"];return t!=="all"&&s.push(t),s=s.join("-"),t=arguments[1]instanceof a_?arguments[1]:this.defs().marker(e,n,i),this.attr(s,t)}}}),vn(a_,"Marker");const Y6t={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,i){return function(s){return s<0?t>0?e/t*s:n>0?i/n*s:0:s>1?n<1?(1-i)/(1-n)*s+(i-n)/(1-n):t<1?(1-e)/(1-t)*s+(e-t)/(1-t):1:3*s*(1-s)**2*e+3*s**2*(1-s)*i+s**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return e==="none"?--n:e==="both"&&++n,(i,s=!1)=>{let o=Math.floor(i*t);const r=i*o%1==0;return e!=="start"&&e!=="both"||++o,s&&r&&--o,i>=0&&o<0&&(o=0),i<=1&&o>n&&(o=n),o/n}}};class yS{done(){return!1}}class mC extends yS{constructor(e=N6t){super(),this.ease=Y6t[e]||e}step(e,n,i){return typeof e!="number"?i<1?e:n:e+(n-e)*this.ease(i)}}class Oy extends yS{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,n,i,s){return this.stepper(e,n,i,s)}}function pT(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,i=Math.log(e/100+1e-10),s=-i/Math.sqrt(n*n+i*i),o=3.9/(s*t);this.d=2*s*o,this.k=o*o}At(class extends Oy{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,i){if(typeof t=="string")return t;if(i.done=n===1/0,n===1/0)return e;if(n===0)return t;n>100&&(n=16),n/=1e3;const s=i.velocity||0,o=-this.d*s-this.k*(t-e),r=t+s*n+o*n*n/2;return i.velocity=s+o*n,i.done=Math.abs(e-r)+Math.abs(s)<.002,i.done?e:r}},{duration:Dh("_duration",pT),overshoot:Dh("_overshoot",pT)});At(class extends Oy{constructor(t=.1,e=.01,n=0,i=1e3){super(),this.p(t).i(e).d(n).windup(i)}step(t,e,n,i){if(typeof t=="string")return t;if(i.done=n===1/0,n===1/0)return e;if(n===0)return t;const s=e-t;let o=(i.integral||0)+s*n;const r=(s-(i.error||0))/n,a=this._windup;return a!==!1&&(o=Math.max(-a,Math.min(o,a))),i.error=s,i.integral=o,i.done=Math.abs(s)<.001,i.done?e:t+(this.P*s+this.I*o+this.D*r)}},{windup:Dh("_windup"),p:Dh("P"),i:Dh("I"),d:Dh("D")});const q6t={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},gC={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},y3="mlhvqtcsaz".split("");for(let t=0,e=y3.length;t<e;++t)gC[y3[t]]=function(n){return function(i,s,o){if(n==="H")i[0]=i[0]+s.x;else if(n==="V")i[0]=i[0]+s.y;else if(n==="A")i[5]=i[5]+s.x,i[6]=i[6]+s.y;else for(let r=0,a=i.length;r<a;++r)i[r]=i[r]+(r%2?s.y:s.x);return gC[n](i,s,o)}}(y3[t].toUpperCase());function vC(t){return t.segment.length&&t.segment.length-1===q6t[t.segment[0].toUpperCase()]}function G6t(t,e){t.inNumber&&vu(t,!1);const n=pS.test(e);if(n)t.segment=[e];else{const i=t.lastCommand,s=i.toLowerCase(),o=i===s;t.segment=[s==="m"?o?"l":"L":i]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function vu(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,vC(t)&&_C(t)}function _C(t){t.inSegment=!1,t.absolute&&(t.segment=function(e){const n=e.segment[0];return gC[n](e.segment.slice(1),e.p,e.p0)}(t)),t.segments.push(t.segment)}function X6t(t){if(!t.segment.length)return!1;const e=t.segment[0].toUpperCase()==="A",n=t.segment.length;return e&&(n===4||n===5)}function K6t(t){return t.lastToken.toUpperCase()==="E"}const Z6t=new Set([" ",",","	",`
`,"\r","\f"]);class $r extends yd{bbox(){return ic().path.setAttribute("d",this.toString()),new Ws(ic.nodes.path.getBBox())}move(e,n){const i=this.bbox();if(e-=i.x,n-=i.y,!isNaN(e)&&!isNaN(n))for(let s,o=this.length-1;o>=0;o--)s=this[o][0],s==="M"||s==="L"||s==="T"?(this[o][1]+=e,this[o][2]+=n):s==="H"?this[o][1]+=e:s==="V"?this[o][1]+=n:s==="C"||s==="S"||s==="Q"?(this[o][1]+=e,this[o][2]+=n,this[o][3]+=e,this[o][4]+=n,s==="C"&&(this[o][5]+=e,this[o][6]+=n)):s==="A"&&(this[o][6]+=e,this[o][7]+=n);return this}parse(e="M0 0"){return Array.isArray(e)&&(e=Array.prototype.concat.apply([],e).toString()),function(n,i=!0){let s=0,o="";const r={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:i,p0:new Dn,p:new Dn};for(;r.lastToken=o,o=n.charAt(s++);)if(r.inSegment||!G6t(r,o))if(o!==".")if(isNaN(parseInt(o)))if(Z6t.has(o))r.inNumber&&vu(r,!1);else if(o!=="-"&&o!=="+")if(o.toUpperCase()!=="E"){if(pS.test(o)){if(r.inNumber)vu(r,!1);else{if(!vC(r))throw new Error("parser Error");_C(r)}--s}}else r.number+=o,r.hasExponent=!0;else{if(r.inNumber&&!K6t(r)){vu(r,!1),--s;continue}r.number+=o,r.inNumber=!0}else{if(r.number==="0"||X6t(r)){r.inNumber=!0,r.number=o,vu(r,!0);continue}r.inNumber=!0,r.number+=o}else{if(r.pointSeen||r.hasExponent){vu(r,!1),--s;continue}r.inNumber=!0,r.pointSeen=!0,r.number+=o}return r.inNumber&&vu(r,!1),r.inSegment&&vC(r)&&_C(r),r.segments}(e)}size(e,n){const i=this.bbox();let s,o;for(i.width=i.width===0?1:i.width,i.height=i.height===0?1:i.height,s=this.length-1;s>=0;s--)o=this[s][0],o==="M"||o==="L"||o==="T"?(this[s][1]=(this[s][1]-i.x)*e/i.width+i.x,this[s][2]=(this[s][2]-i.y)*n/i.height+i.y):o==="H"?this[s][1]=(this[s][1]-i.x)*e/i.width+i.x:o==="V"?this[s][1]=(this[s][1]-i.y)*n/i.height+i.y:o==="C"||o==="S"||o==="Q"?(this[s][1]=(this[s][1]-i.x)*e/i.width+i.x,this[s][2]=(this[s][2]-i.y)*n/i.height+i.y,this[s][3]=(this[s][3]-i.x)*e/i.width+i.x,this[s][4]=(this[s][4]-i.y)*n/i.height+i.y,o==="C"&&(this[s][5]=(this[s][5]-i.x)*e/i.width+i.x,this[s][6]=(this[s][6]-i.y)*n/i.height+i.y)):o==="A"&&(this[s][1]=this[s][1]*e/i.width,this[s][2]=this[s][2]*n/i.height,this[s][6]=(this[s][6]-i.x)*e/i.width+i.x,this[s][7]=(this[s][7]-i.y)*n/i.height+i.y);return this}toString(){return function(e){let n="";for(let i=0,s=e.length;i<s;i++)n+=e[i][0],e[i][1]!=null&&(n+=e[i][1],e[i][2]!=null&&(n+=" ",n+=e[i][2],e[i][3]!=null&&(n+=" ",n+=e[i][3],n+=" ",n+=e[i][4],e[i][5]!=null&&(n+=" ",n+=e[i][5],n+=" ",n+=e[i][6],e[i][7]!=null&&(n+=" ",n+=e[i][7])))));return n+" "}(this)}}const wU=t=>{const e=typeof t;return e==="number"?zt:e==="string"?Ln.isColor(t)?Ln:bl.test(t)?pS.test(t)?$r:yd:rU.test(t)?zt:yC:bC.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?yd:e==="object"?t1:yC};class _u{constructor(e){this._stepper=e||new mC("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(e){return this._morphObj.morph(this._from,this._to,e,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce(function(e,n){return e&&n},!0)}from(e){return e==null?this._from:(this._from=this._set(e),this)}stepper(e){return e==null?this._stepper:(this._stepper=e,this)}to(e){return e==null?this._to:(this._to=this._set(e),this)}type(e){return e==null?this._type:(this._type=e,this)}_set(e){this._type||this.type(wU(e));let n=new this._type(e);return this._type===Ln&&(n=this._to?n[this._to[4]]():this._from?n[this._from[4]]():n),this._type===t1&&(n=this._to?n.align(this._to):this._from?n.align(this._from):n),n=n.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(n.length)).map(Object).map(function(i){return i.done=!0,i}),n}}class yC{constructor(...e){this.init(...e)}init(e){return e=Array.isArray(e)?e[0]:e,this.value=e,this}toArray(){return[this.value]}valueOf(){return this.value}}class nv{constructor(...e){this.init(...e)}init(e){return Array.isArray(e)&&(e={scaleX:e[0],scaleY:e[1],shear:e[2],rotate:e[3],translateX:e[4],translateY:e[5],originX:e[6],originY:e[7]}),Object.assign(this,nv.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}nv.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const J6t=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class t1{constructor(...e){this.init(...e)}align(e){const n=this.values;for(let i=0,s=n.length;i<s;++i){if(n[i+1]===e[i+1]){if(n[i+1]===Ln&&e[i+7]!==n[i+7]){const a=e[i+7],l=new Ln(this.values.splice(i+3,5))[a]().toArray();this.values.splice(i+3,0,...l)}i+=n[i+2]+2;continue}if(!e[i+1])return this;const o=new e[i+1]().toArray(),r=n[i+2]+3;n.splice(i,r,e[i],e[i+1],e[i+2],...o),i+=n[i+2]+2}return this}init(e){if(this.values=[],Array.isArray(e))return void(this.values=e.slice());e=e||{};const n=[];for(const i in e){const s=wU(e[i]),o=new s(e[i]).toArray();n.push([i,s,o.length,...o])}return n.sort(J6t),this.values=n.reduce((i,s)=>i.concat(s),[]),this}toArray(){return this.values}valueOf(){const e={},n=this.values;for(;n.length;){const i=n.shift(),s=n.shift(),o=n.shift(),r=n.splice(0,o);e[i]=new s(r)}return e}}const bC=[yC,nv,t1];class af extends Ho{constructor(e,n=e){super(Nn("path",e),n)}array(){return this._array||(this._array=new $r(this.attr("d")))}clear(){return delete this._array,this}height(e){return e==null?this.bbox().height:this.size(this.bbox().width,e)}move(e,n){return this.attr("d",this.array().move(e,n))}plot(e){return e==null?this.array():this.clear().attr("d",typeof e=="string"?e:this._array=new $r(e))}size(e,n){const i=Cp(this,e,n);return this.attr("d",this.array().size(i.width,i.height))}width(e){return e==null?this.bbox().width:this.size(e,this.bbox().height)}x(e){return e==null?this.bbox().x:this.move(e,this.bbox().y)}y(e){return e==null?this.bbox().y:this.move(this.bbox().x,e)}}af.prototype.MorphArray=$r,Kt({Container:{path:Fn(function(t){return this.put(new af).plot(t||new $r)})}}),vn(af,"Path");var kU=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new Lc(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},plot:function(t){return t==null?this.array():this.clear().attr("points",typeof t=="string"?t:this._array=new Lc(t))},size:function(t,e){const n=Cp(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}});class Du extends Ho{constructor(e,n=e){super(Nn("polygon",e),n)}}Kt({Container:{polygon:Fn(function(t){return this.put(new Du).plot(t||new Lc)})}}),At(Du,_S),At(Du,kU),vn(Du,"Polygon");class Ru extends Ho{constructor(e,n=e){super(Nn("polyline",e),n)}}Kt({Container:{polyline:Fn(function(t){return this.put(new Ru).plot(t||new Lc)})}}),At(Ru,_S),At(Ru,kU),vn(Ru,"Polyline");class l_ extends Ho{constructor(e,n=e){super(Nn("rect",e),n)}}At(l_,{rx:gS,ry:vS}),Kt({Container:{rect:Fn(function(t,e){return this.put(new l_).size(t,e)})}}),vn(l_,"Rect");class b3{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(e){const n=e.next!==void 0?e:{value:e,next:null,prev:null};return this._last?(n.prev=this._last,this._last.next=n,this._last=n):(this._last=n,this._first=n),n}remove(e){e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e===this._last&&(this._last=e.prev),e===this._first&&(this._first=e.next),e.prev=null,e.next=null}shift(){const e=this._first;return e?(this._first=e.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,e.value):null}}const Tn={nextDraw:null,frames:new b3,timeouts:new b3,immediates:new b3,timer:()=>pn.window.performance||pn.window.Date,transforms:[],frame(t){const e=Tn.frames.push({run:t});return Tn.nextDraw===null&&(Tn.nextDraw=pn.window.requestAnimationFrame(Tn._draw)),e},timeout(t,e){e=e||0;const n=Tn.timer().now()+e,i=Tn.timeouts.push({run:t,time:n});return Tn.nextDraw===null&&(Tn.nextDraw=pn.window.requestAnimationFrame(Tn._draw)),i},immediate(t){const e=Tn.immediates.push(t);return Tn.nextDraw===null&&(Tn.nextDraw=pn.window.requestAnimationFrame(Tn._draw)),e},cancelFrame(t){t!=null&&Tn.frames.remove(t)},clearTimeout(t){t!=null&&Tn.timeouts.remove(t)},cancelImmediate(t){t!=null&&Tn.immediates.remove(t)},_draw(t){let e=null;const n=Tn.timeouts.last();for(;(e=Tn.timeouts.shift())&&(t>=e.time?e.run():Tn.timeouts.push(e),e!==n););let i=null;const s=Tn.frames.last();for(;i!==s&&(i=Tn.frames.shift());)i.run(t);let o=null;for(;o=Tn.immediates.shift();)o();Tn.nextDraw=Tn.timeouts.first()||Tn.frames.first()?pn.window.requestAnimationFrame(Tn._draw):null}},Q6t=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},eCt=function(){const t=pn.window;return(t.performance||t.Date).now()};class CU extends tv{constructor(e=eCt){super(),this._timeSource=e,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const e=this.getLastRunnerInfo(),n=e?e.runner.duration():0;return(e?e.start:this._time)+n}getEndTimeOfTimeline(){const e=this._runners.map(n=>n.start+n.runner.duration());return Math.max(0,...e)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(e){return this._runners[this._runnerIds.indexOf(e)]||null}pause(){return this._paused=!0,this._continue()}persist(e){return e==null?this._persist:(this._persist=e,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(e){const n=this.speed();if(e==null)return this.speed(-n);const i=Math.abs(n);return this.speed(e?-i:i)}schedule(e,n,i){if(e==null)return this._runners.map(Q6t);let s=0;const o=this.getEndTime();if(n=n||0,i==null||i==="last"||i==="after")s=o;else if(i==="absolute"||i==="start")s=n,n=0;else if(i==="now")s=this._time;else if(i==="relative"){const l=this.getRunnerInfoById(e.id);l&&(s=l.start+n,n=0)}else{if(i!=="with-last")throw new Error('Invalid value for the "when" parameter');{const l=this.getLastRunnerInfo();s=l?l.start:this._time}}e.unschedule(),e.timeline(this);const r=e.persist(),a={persist:r===null?this._persist:r,start:s+n,runner:e};return this._lastRunnerId=e.id,this._runners.push(a),this._runners.sort((l,c)=>l.start-c.start),this._runnerIds=this._runners.map(l=>l.runner.id),this.updateTime()._continue(),this}seek(e){return this.time(this._time+e)}source(e){return e==null?this._timeSource:(this._timeSource=e,this)}speed(e){return e==null?this._speed:(this._speed=e,this)}stop(){return this.time(0),this.pause()}time(e){return e==null?this._time:(this._time=e,this._continue(!0))}unschedule(e){const n=this._runnerIds.indexOf(e.id);return n<0||(this._runners.splice(n,1),this._runnerIds.splice(n,1),e.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(e=!1){return Tn.cancelFrame(this._nextFrame),this._nextFrame=null,e?this._stepImmediate():(this._paused||(this._nextFrame=Tn.frame(this._step)),this)}_stepFn(e=!1){const n=this._timeSource();let i=n-this._lastSourceTime;e&&(i=0);const s=this._speed*i+(this._time-this._lastStepTime);this._lastSourceTime=n,e||(this._time+=s,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let r=this._runners.length;r--;){const a=this._runners[r],l=a.runner;this._time-a.start<=0&&l.reset()}let o=!1;for(let r=0,a=this._runners.length;r<a;r++){const l=this._runners[r],c=l.runner;let u=s;const d=this._time-l.start;if(d<=0){o=!0;continue}d<u&&(u=d),c.active()&&(c.step(u).done?l.persist!==!0&&c.duration()-c.time()+this._time+l.persist<this._time&&(c.unschedule(),--r,--a):o=!0)}return o&&!(this._speed<0&&this._time===0)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}Kt({Element:{timeline:function(t){return t==null?(this._timeline=this._timeline||new CU,this._timeline):(this._timeline=t,this)}}});class Do extends tv{constructor(e){super(),this.id=Do.id++,e=typeof(e=e??_3)=="function"?new Oy(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof e=="number"&&e,this._isDeclarative=e instanceof Oy,this._stepper=this._isDeclarative?e:new mC,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new ln,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(e,n,i){let s=1,o=!1,r=0;return n=n??B6t,i=i||"last",typeof(e=e??_3)!="object"||e instanceof yS||(n=e.delay??n,i=e.when??i,o=e.swing||o,s=e.times??s,r=e.wait??r,e=e.duration??_3),{duration:e,delay:n,swing:o,times:s,wait:r,when:i}}active(e){return e==null?this.enabled:(this.enabled=e,this)}addTransform(e){return this.transforms.lmultiplyO(e),this}after(e){return this.on("finished",e)}animate(e,n,i){const s=Do.sanitise(e,n,i),o=new Do(s.duration);return this._timeline&&o.timeline(this._timeline),this._element&&o.element(this._element),o.loop(s).schedule(s.delay,s.when)}clearTransform(){return this.transforms=new ln,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter(e=>!e.isTransform))}delay(e){return this.animate(0,e)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(e){return this.queue(null,e)}ease(e){return this._stepper=new mC(e),this}element(e){return e==null?this._element:(this._element=e,e._prepareRunner(),this)}finish(){return this.step(1/0)}loop(e,n,i){return typeof e=="object"&&(n=e.swing,i=e.wait,e=e.times),this._times=e||1/0,this._swing=n||!1,this._wait=i||0,this._times===!0&&(this._times=1/0),this}loops(e){const n=this._duration+this._wait;if(e==null){const o=Math.floor(this._time/n),r=(this._time-o*n)/this._duration;return Math.min(o+r,this._times)}const i=e%1,s=n*Math.floor(e)+this._duration*i;return this.time(s)}persist(e){return e==null?this._persist:(this._persist=e,this)}position(e){const n=this._time,i=this._duration,s=this._wait,o=this._times,r=this._swing,a=this._reverse;let l;if(e==null){const d=function(f){const p=r*Math.floor(f%(2*(s+i))/(s+i)),m=p&&!a||!p&&a,y=Math.pow(-1,m)*(f%(s+i))/i+m;return Math.max(Math.min(y,1),0)},h=o*(s+i)-s;return l=n<=0?Math.round(d(1e-5)):n<h?d(n):Math.round(d(h-1e-5)),l}const c=Math.floor(this.loops()),u=r&&c%2==0;return l=c+(u&&!a||a&&u?e:1-e),this.loops(l)}progress(e){return e==null?Math.min(1,this._time/this.duration()):this.time(e*this.duration())}queue(e,n,i,s){return this._queue.push({initialiser:e||hT,runner:n||hT,retarget:i,isTransform:s,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(e){return this._reverse=e??!this._reverse,this}schedule(e,n,i){if(e instanceof CU||(i=n,n=e,e=this.timeline()),!e)throw Error("Runner cannot be scheduled without timeline");return e.schedule(this,n,i),this}step(e){if(!this.enabled)return this;e=e??16,this._time+=e;const n=this.position(),i=this._lastPosition!==n&&this._time>=0;this._lastPosition=n;const s=this.duration(),o=this._lastTime<=0&&this._time>0,r=this._lastTime<s&&this._time>=s;this._lastTime=this._time,o&&this.fire("start",this);const a=this._isDeclarative;this.done=!a&&!r&&this._time>=s,this._reseted=!1;let l=!1;return(i||a)&&(this._initialise(i),this.transforms=new ln,l=this._run(a?e:n),this.fire("step",this)),this.done=this.done||l&&a,r&&this.fire("finished",this),this}time(e){if(e==null)return this._time;const n=e-this._time;return this.step(n),this}timeline(e){return e===void 0?this._timeline:(this._timeline=e,this)}unschedule(){const e=this.timeline();return e&&e.unschedule(this),this}_initialise(e){if(e||this._isDeclarative)for(let n=0,i=this._queue.length;n<i;++n){const s=this._queue[n],o=this._isDeclarative||!s.initialised&&e;e=!s.finished,o&&e&&(s.initialiser.call(this),s.initialised=!0)}}_rememberMorpher(e,n){if(this._history[e]={morpher:n,caller:this._queue[this._queue.length-1]},this._isDeclarative){const i=this.timeline();i&&i.play()}}_run(e){let n=!0;for(let i=0,s=this._queue.length;i<s;++i){const o=this._queue[i],r=o.runner.call(this,e);o.finished=o.finished||r===!0,n=n&&o.finished}return n}_tryRetarget(e,n,i){if(this._history[e]){if(!this._history[e].caller.initialised){const o=this._queue.indexOf(this._history[e].caller);return this._queue.splice(o,1),!1}this._history[e].caller.retarget?this._history[e].caller.retarget.call(this,n,i):this._history[e].morpher.to(n),this._history[e].caller.finished=!1;const s=this.timeline();return s&&s.play(),!0}return!1}}Do.id=0;class Dy{constructor(e=new ln,n=-1,i=!0){this.transforms=e,this.id=n,this.done=i}clearTransformsFromQueue(){}}At([Do,Dy],{mergeWith(t){return new Dy(t.transforms.lmultiply(this.transforms),t.id)}});const xU=(t,e)=>t.lmultiplyO(e),SU=t=>t.transforms;function tCt(){const t=this._transformationRunners.runners.map(SU).reduce(xU,new ln);this.transform(t),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}class nCt{constructor(){this.runners=[],this.ids=[]}add(e){if(this.runners.includes(e))return;const n=e.id+1;return this.runners.push(e),this.ids.push(n),this}clearBefore(e){const n=this.ids.indexOf(e+1)||1;return this.ids.splice(0,n,0),this.runners.splice(0,n,new Dy).forEach(i=>i.clearTransformsFromQueue()),this}edit(e,n){const i=this.ids.indexOf(e+1);return this.ids.splice(i,1,e+1),this.runners.splice(i,1,n),this}getByID(e){return this.runners[this.ids.indexOf(e+1)]}length(){return this.ids.length}merge(){let e=null;for(let n=0;n<this.runners.length;++n){const i=this.runners[n];if(e&&i.done&&e.done&&(!i._timeline||!i._timeline._runnerIds.includes(i.id))&&(!e._timeline||!e._timeline._runnerIds.includes(e.id))){this.remove(i.id);const s=i.mergeWith(e);this.edit(e.id,s),e=s,--n}else e=i}return this}remove(e){const n=this.ids.indexOf(e+1);return this.ids.splice(n,1),this.runners.splice(n,1),this}}Kt({Element:{animate(t,e,n){const i=Do.sanitise(t,e,n),s=this.timeline();return new Do(i.duration).loop(i).element(this).timeline(s.play()).schedule(i.delay,i.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter(e=>e.id<=t.id).map(SU).reduce(xU,new ln)},_addRunner(t){this._transformationRunners.add(t),Tn.cancelImmediate(this._frameId),this._frameId=Tn.immediate(tCt.bind(this))},_prepareRunner(){this._frameId==null&&(this._transformationRunners=new nCt().add(new Dy(new ln(this))))}}});At(Do,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if(typeof e=="string")return this.styleAttr(t,{[e]:n});let i=e;if(this._tryRetarget(t,i))return this;let s=new _u(this._stepper).to(i),o=Object.keys(i);return this.queue(function(){s=s.from(this.element()[t](o))},function(r){return this.element()[t](s.at(r).valueOf()),s.done()},function(r){const a=Object.keys(r),l=(c=o,a.filter(d=>!c.includes(d)));var c;if(l.length){const d=this.element()[t](l),h=new t1(s.from()).valueOf();Object.assign(h,d),s.from(h)}const u=new t1(s.to()).valueOf();Object.assign(u,r),s.to(u),o=a,i=r}),this._rememberMorpher(t,s),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new _u(this._stepper).to(new zt(t));return this.queue(function(){n=n.from(this.element().zoom())},function(i){return this.element().zoom(n.at(i),e),n.done()},function(i,s){e=s,n.to(i)}),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const i=ln.isMatrixLike(t);n=t.affine!=null?t.affine:n??!i;const s=new _u(this._stepper).type(n?nv:ln);let o,r,a,l,c;return this.queue(function(){r=r||this.element(),o=o||fC(t,r),c=new ln(e?void 0:r),r._addRunner(this),e||r._clearTransformRunnersBefore(this)},function(u){e||this.clearTransform();const{x:d,y:h}=new Dn(o).transform(r._currentTransform(this));let f=new ln({...t,origin:[d,h]}),p=this._isDeclarative&&a?a:c;if(n){f=f.decompose(d,h),p=p.decompose(d,h);const y=f.rotate,b=p.rotate,k=[y-360,y,y+360],C=k.map(M=>Math.abs(M-b)),$=Math.min(...C),x=C.indexOf($);f.rotate=k[x]}e&&(i||(f.rotate=t.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),s.from(p),s.to(f);const m=s.at(u);return l=m.rotate,a=new ln(m),this.addTransform(a),r._addRunner(this),s.done()},function(u){(u.origin||"center").toString()!==(t.origin||"center").toString()&&(o=fC(u,r)),t={...u,origin:o}},!0),this._isDeclarative&&this._rememberMorpher("transform",s),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new zt(e),this._tryRetarget(t,e))return this;const n=new _u(this._stepper).to(e);let i=null;return this.queue(function(){i=this.element()[t](),n.from(i),n.to(i+e)},function(s){return this.element()[t](n.at(s)),n.done()},function(s){n.to(i+new zt(s))}),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new _u(this._stepper).to(e);return this.queue(function(){n.from(this.element()[t]())},function(i){return this.element()[t](n.at(i)),n.done()}),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new zt(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,i){if(arguments.length===4)return this.plot([t,e,n,i]);if(this._tryRetarget("plot",t))return this;const s=new _u(this._stepper).type(this._element.MorphArray).to(t);return this.queue(function(){s.from(this._element.array())},function(o){return this._element.plot(s.at(o)),s.done()}),this._rememberMorpher("plot",s),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,i){return this._queueObject("viewbox",new Ws(t,e,n,i))},update(t){return typeof t!="object"?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(t.opacity!=null&&this.attr("stop-opacity",t.opacity),t.color!=null&&this.attr("stop-color",t.color),t.offset!=null&&this.attr("offset",t.offset),this)}}),At(Do,{rx:gS,ry:vS,from:yU,to:bU}),vn(Do,"Runner");class wC extends Yi{constructor(e,n=e){super(Nn("svg",e),n),this.namespace()}defs(){return this.isRoot()?Ko(this.node.querySelector("defs"))||this.put(new x2):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof pn.window.SVGElement)&&this.node.parentNode.nodeName!=="#document-fragment"}namespace(){return this.isRoot()?this.attr({xmlns:dS,version:"1.1"}).attr("xmlns:xlink",xp,m3):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,m3).attr("xmlns:svgjs",null,m3)}root(){return this.isRoot()?this:super.root()}}Kt({Container:{nested:Fn(function(){return this.put(new wC)})}}),vn(wC,"Svg",!0);let kC=class extends Yi{constructor(t,e=t){super(Nn("symbol",t),e)}};Kt({Container:{symbol:Fn(function(){return this.put(new kC)})}}),vn(kC,"Symbol");var $U=Object.freeze({__proto__:null,amove:function(t,e){return this.ax(t).ay(e)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)},cx:function(t,e=this.bbox()){return t==null?e.cx:this.attr("x",this.attr("x")+t-e.cx)},cy:function(t,e=this.bbox()){return t==null?e.cy:this.attr("y",this.attr("y")+t-e.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,e,n=this.bbox()){return this.x(t,n).y(e,n)},plain:function(t){return this._build===!1&&this.clear(),this.node.appendChild(pn.document.createTextNode(t)),this},x:function(t,e=this.bbox()){return t==null?e.x:this.attr("x",this.attr("x")+t-e.x)},y:function(t,e=this.bbox()){return t==null?e.y:this.attr("y",this.attr("y")+t-e.y)}});class Ar extends Ho{constructor(e,n=e){super(Nn("text",e),n),this.dom.leading=this.dom.leading??new zt(1.3),this._rebuild=!0,this._build=!1}leading(e){return e==null?this.dom.leading:(this.dom.leading=new zt(e),this.rebuild())}rebuild(e){if(typeof e=="boolean"&&(this._rebuild=e),this._rebuild){const n=this;let i=0;const s=this.dom.leading;this.each(function(o){if(pC(this.node))return;const r=pn.window.getComputedStyle(this.node).getPropertyValue("font-size"),a=s*new zt(r);this.dom.newLined&&(this.attr("x",n.attr("x")),this.text()===`
`?i+=a:(this.attr("dy",o?a+i:0),i=0))}),this.fire("rebuild")}return this}setData(e){return this.dom=e,this.dom.leading=new zt(e.leading||1.3),this}writeDataToDom(){return sU(this,this.dom,{leading:1.3}),this}text(e){if(e===void 0){const n=this.node.childNodes;let i=0;e="";for(let s=0,o=n.length;s<o;++s)n[s].nodeName==="textPath"||pC(n[s])?s===0&&(i=s+1):(s!==i&&n[s].nodeType!==3&&Ko(n[s]).dom.newLined===!0&&(e+=`
`),e+=n[s].textContent);return e}if(this.clear().build(!0),typeof e=="function")e.call(this,this);else for(let n=0,i=(e=(e+"").split(`
`)).length;n<i;n++)this.newLine(e[n]);return this.build(!1).rebuild()}}At(Ar,$U),Kt({Container:{text:Fn(function(t=""){return this.put(new Ar).text(t)}),plain:Fn(function(t=""){return this.put(new Ar).plain(t)})}}),vn(Ar,"Text");class c_ extends Ho{constructor(e,n=e){super(Nn("tspan",e),n),this._build=!1}dx(e){return this.attr("dx",e)}dy(e){return this.attr("dy",e)}newLine(){this.dom.newLined=!0;const e=this.parent();if(!(e instanceof Ar))return this;const n=e.index(this),i=pn.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=e.dom.leading*new zt(i);return this.dy(n?s:0).attr("x",e.x())}text(e){return e==null?this.node.textContent+(this.dom.newLined?`
`:""):(typeof e=="function"?(this.clear().build(!0),e.call(this,this),this.build(!1)):this.plain(e),this)}}At(c_,$U),Kt({Tspan:{tspan:Fn(function(t=""){const e=new c_;return this._build||this.clear(),this.put(e).text(t)})},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),vn(c_,"Tspan");class w3 extends Ho{constructor(e,n=e){super(Nn("circle",e),n)}radius(e){return this.attr("r",e)}rx(e){return this.attr("r",e)}ry(e){return this.rx(e)}size(e){return this.radius(new zt(e).divide(2))}}At(w3,{x:hU,y:fU,cx:pU,cy:mU,width:gU,height:vU}),Kt({Container:{circle:Fn(function(t=0){return this.put(new w3).size(t).move(0,0)})}}),vn(w3,"Circle");class k3 extends Yi{constructor(e,n=e){super(Nn("clipPath",e),n)}remove(){return this.targets().forEach(function(e){e.unclip()}),super.remove()}targets(){return Wd("svg [clip-path*="+this.id()+"]")}}Kt({Container:{clip:Fn(function(){return this.defs().put(new k3)})},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof k3?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),vn(k3,"ClipPath");class mT extends ui{constructor(e,n=e){super(Nn("foreignObject",e),n)}}Kt({Container:{foreignObject:Fn(function(t,e){return this.put(new mT).size(t,e)})}}),vn(mT,"ForeignObject");var AU=Object.freeze({__proto__:null,dmove:function(t,e){return this.children().forEach(n=>{let i;try{i=n.node instanceof ev().SVGSVGElement?new Ws(n.attr(["x","y","width","height"])):n.bbox()}catch{return}const s=new ln(n),o=s.translate(t,e).transform(s.inverse()),r=new Dn(i.x,i.y).transform(o);n.move(r.x,r.y)}),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,e=this.bbox()){return t==null?e.height:this.size(e.width,t,e)},move:function(t=0,e=0,n=this.bbox()){const i=t-n.x,s=e-n.y;return this.dmove(i,s)},size:function(t,e,n=this.bbox()){const i=Cp(this,t,e,n),s=i.width/n.width,o=i.height/n.height;return this.children().forEach(r=>{const a=new Dn(n).transform(new ln(r).inverse());r.scale(s,o,a.x,a.y)}),this},width:function(t,e=this.bbox()){return t==null?e.width:this.size(t,e.height,e)},x:function(t,e=this.bbox()){return t==null?e.x:this.move(t,e.y,e)},y:function(t,e=this.bbox()){return t==null?e.y:this.move(e.x,t,e)}});class Cc extends Yi{constructor(e,n=e){super(Nn("g",e),n)}}At(Cc,AU),Kt({Container:{group:Fn(function(){return this.put(new Cc)})}}),vn(Cc,"G");class Qv extends Yi{constructor(e,n=e){super(Nn("a",e),n)}target(e){return this.attr("target",e)}to(e){return this.attr("href",e,xp)}}At(Qv,AU),Kt({Container:{link:Fn(function(t){return this.put(new Qv).to(t)})},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Qv,this.wrap(e)),typeof t=="function"?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&t.node.nodeName.toLowerCase()==="a"?t:null}}}),vn(Qv,"A");class C3 extends Yi{constructor(e,n=e){super(Nn("mask",e),n)}remove(){return this.targets().forEach(function(e){e.unmask()}),super.remove()}targets(){return Wd("svg [mask*="+this.id()+"]")}}Kt({Container:{mask:Fn(function(){return this.defs().put(new C3)})},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof C3?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),vn(C3,"Mask");class gT extends ui{constructor(e,n=e){super(Nn("stop",e),n)}update(e){return(typeof e=="number"||e instanceof zt)&&(e={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),e.opacity!=null&&this.attr("stop-opacity",e.opacity),e.color!=null&&this.attr("stop-color",e.color),e.offset!=null&&this.attr("offset",new zt(e.offset)),this}}Kt({Gradient:{stop:function(t,e,n){return this.put(new gT).update(t,e,n)}}}),vn(gT,"Stop");class x3 extends ui{constructor(e,n=e){super(Nn("style",e),n)}addText(e=""){return this.node.textContent+=e,this}font(e,n,i={}){return this.rule("@font-face",{fontFamily:e,src:n,...i})}rule(e,n){return this.addText(function(i,s){if(!i)return"";if(!s)return i;let o=i+"{";for(const r in s)o+=r.replace(/([A-Z])/g,function(a,l){return"-"+l.toLowerCase()})+":"+s[r]+";";return o+="}",o}(e,n))}}Kt("Dom",{style(t,e){return this.put(new x3).rule(t,e)},fontface(t,e,n){return this.put(new x3).font(t,e,n)}}),vn(x3,"Style");class S3 extends Ar{constructor(e,n=e){super(Nn("textPath",e),n)}array(){const e=this.track();return e?e.array():null}plot(e){const n=this.track();let i=null;return n&&(i=n.plot(e)),e==null?i:this}track(){return this.reference("href")}}Kt({Container:{textPath:Fn(function(t,e){return t instanceof Ar||(t=this.text(t)),t.path(e)})},Text:{path:Fn(function(t,e=!0){const n=new S3;let i;if(t instanceof af||(t=this.defs().path(t)),n.attr("href","#"+t,xp),e)for(;i=this.node.firstChild;)n.node.appendChild(i);return this.put(n)}),textPath(){return this.findOne("textPath")}},Path:{text:Fn(function(t){return t instanceof Ar||(t=new Ar().addTo(this.parent()).text(t)),t.path(this)}),targets(){return Wd("svg textPath").filter(t=>(t.attr("href")||"").includes(this.id()))}}}),S3.prototype.MorphArray=$r,vn(S3,"TextPath");class vT extends Ho{constructor(e,n=e){super(Nn("use",e),n)}use(e,n){return this.attr("href",(n||"")+"#"+e,xp)}}Kt({Container:{use:Fn(function(t,e){return this.put(new vT).use(t,e)})}}),vn(vT,"Use");const sCt=Ri;At([wC,kC,r_,e1,a_],Xi("viewbox")),At([Ou,Ru,Du,af],Xi("marker")),At(Ar,Xi("Text")),At(af,Xi("Path")),At(x2,Xi("Defs")),At([Ar,c_],Xi("Tspan")),At([l_,o_,ng,Do],Xi("radius")),At(tv,Xi("EventTarget")),At(Ic,Xi("Dom")),At(ui,Xi("Element")),At(Ho,Xi("Shape")),At([Yi,_U],Xi("Container")),At(ng,Xi("Gradient")),At(Do,Xi("Runner")),_d.extend([...new Set(tU)]),function(t=[]){bC.push(...[].concat(t))}([zt,Ln,Ws,ln,yd,Lc,$r,Dn]),At(bC,{to(t){return new _u().type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,i,s){return this.fromArray(t.map(function(o,r){return i.step(o,e[r],n,s[r],s)}))}});class qn extends ui{constructor(e){super(Nn("filter",e),e),this.$source="SourceGraphic",this.$sourceAlpha="SourceAlpha",this.$background="BackgroundImage",this.$backgroundAlpha="BackgroundAlpha",this.$fill="FillPaint",this.$stroke="StrokePaint",this.$autoSetIn=!0}put(e,n){return!(e=super.put(e,n)).attr("in")&&this.$autoSetIn&&e.attr("in",this.$source),e.attr("result")||e.attr("result",e.id()),e}remove(){return this.targets().each("unfilter"),super.remove()}targets(){return Wd('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class bS extends ui{constructor(e,n){super(e,n),this.result(this.id())}in(e){if(e==null){const n=this.attr("in");return this.parent()&&this.parent().find(`[result="${n}"]`)[0]||n}return this.attr("in",e)}result(e){return this.attr("result",e)}toString(){return this.result()}}const Wo=t=>function(...e){for(let n=t.length;n--;)e[n]!=null&&this.attr(t[n],e[n])},iCt={blend:Wo(["in","in2","mode"]),colorMatrix:Wo(["type","values"]),composite:Wo(["in","in2","operator"]),convolveMatrix:function(t){t=new yd(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Wo(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Wo(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Wo(["in","dx","dy","stdDeviation"]),flood:Wo(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,xp)},morphology:Wo(["operator","radius"]),offset:Wo(["dx","dy"]),specularLighting:Wo(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Wo([]),turbulence:Wo(["baseFrequency","numOctaves","seed","stitchTiles","type"])};["blend","colorMatrix","componentTransfer","composite","convolveMatrix","diffuseLighting","displacementMap","dropShadow","flood","gaussianBlur","image","merge","morphology","offset","specularLighting","tile","turbulence"].forEach(t=>{const e=kp(t),n=iCt[t];qn[e+"Effect"]=class extends bS{constructor(i){super(Nn("fe"+e,i),i)}update(i){return n.apply(this,i),this}},qn.prototype[t]=Fn(function(i,...s){const o=new qn[e+"Effect"];return i==null?this.put(o):(typeof i=="function"?i.call(o,o):s.unshift(i),this.put(o).update(s))})}),At(qn,{merge(t){const e=this.put(new qn.MergeEffect);return typeof t=="function"?(t.call(e,e),e):((t instanceof Array?t:[...arguments]).forEach(n=>{n instanceof qn.MergeNode?e.put(n):e.mergeNode(n)}),e)},componentTransfer(t={}){const e=this.put(new qn.ComponentTransferEffect);if(typeof t=="function")return t.call(e,e),e;t.r||t.g||t.b||t.a||(t={r:t,g:t,b:t,a:t});for(const n in t)e.add(new qn["Func"+n.toUpperCase()](t[n]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach(t=>{const e=kp(t);qn[e]=class extends bS{constructor(n){super(Nn("fe"+e,n),n)}}});["funcR","funcG","funcB","funcA"].forEach(function(t){const e=qn[kp(t)],n=Fn(function(){return this.put(new e)});qn.ComponentTransferEffect.prototype[t]=n});["distantLight","pointLight","spotLight"].forEach(t=>{const e=qn[kp(t)],n=Fn(function(){return this.put(new e)});qn.DiffuseLightingEffect.prototype[t]=n,qn.SpecularLightingEffect.prototype[t]=n}),At(qn.MergeEffect,{mergeNode(t){return this.put(new qn.MergeNode).attr("in",t)}}),At(x2,{filter:function(t){const e=this.put(new qn);return typeof t=="function"&&t.call(e,e),e}}),At(Yi,{filter:function(t){return this.defs().filter(t)}}),At(ui,{filterWith:function(t){const e=t instanceof qn?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const oCt={blend:function(t,e){return this.parent()&&this.parent().blend(this,t,e)},colorMatrix:function(t,e){return this.parent()&&this.parent().colorMatrix(t,e).in(this)},componentTransfer:function(t){return this.parent()&&this.parent().componentTransfer(t).in(this)},composite:function(t,e){return this.parent()&&this.parent().composite(this,t,e)},convolveMatrix:function(t){return this.parent()&&this.parent().convolveMatrix(t).in(this)},diffuseLighting:function(t,e,n,i){return this.parent()&&this.parent().diffuseLighting(t,n,i).in(this)},displacementMap:function(t,e,n,i){return this.parent()&&this.parent().displacementMap(this,t,e,n,i)},dropShadow:function(t,e,n){return this.parent()&&this.parent().dropShadow(this,t,e,n).in(this)},flood:function(t,e){return this.parent()&&this.parent().flood(t,e)},gaussianBlur:function(t,e){return this.parent()&&this.parent().gaussianBlur(t,e).in(this)},image:function(t){return this.parent()&&this.parent().image(t)},merge:function(t){return t=t instanceof Array?t:[...t],this.parent()&&this.parent().merge(this,...t)},morphology:function(t,e){return this.parent()&&this.parent().morphology(t,e).in(this)},offset:function(t,e){return this.parent()&&this.parent().offset(t,e).in(this)},specularLighting:function(t,e,n,i,s){return this.parent()&&this.parent().specularLighting(t,n,i,s).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,n,i,s){return this.parent()&&this.parent().turbulence(t,e,n,i,s).in(this)}};At(bS,oCt),At(qn.MergeEffect,{in:function(t){return t instanceof qn.MergeNode?this.add(t,0):this.add(new qn.MergeNode().in(t),0),this}}),At([qn.CompositeEffect,qn.BlendEffect,qn.DisplacementMapEffect],{in2:function(t){if(t==null){const e=this.attr("in2");return this.parent()&&this.parent().find(`[result="${e}"]`)[0]||e}return this.attr("in2",t)}}),qn.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var ri=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"getDefaultFilter",value:function(e,n){var i=this.w;e.unfilter(!0),new qn().size("120%","180%","-5%","-40%"),i.config.chart.dropShadow.enabled&&this.dropShadow(e,i.config.chart.dropShadow,n)}},{key:"applyFilter",value:function(e,n,i){var s,o=this,r=this.w;if(e.unfilter(!0),i!=="none"){var a,l,c=r.config.chart.dropShadow,u=i==="lighten"?2:.3;e.filterWith(function(d){d.colorMatrix({type:"matrix",values:`
          `.concat(u,` 0 0 0 0
          0 `).concat(u,` 0 0 0
          0 0 `).concat(u,` 0 0
          0 0 0 1 0
        `),in:"SourceGraphic",result:"brightness"}),c.enabled&&o.addShadow(d,n,c,"brightness")}),!c.noUserSpaceOnUse&&((a=e.filterer())===null||a===void 0||(l=a.node)===null||l===void 0||l.setAttribute("filterUnits","userSpaceOnUse")),this._scaleFilterSize((s=e.filterer())===null||s===void 0?void 0:s.node)}else this.getDefaultFilter(e,n)}},{key:"addShadow",value:function(e,n,i,s){var o,r=this.w,a=i.blur,l=i.top,c=i.left,u=i.color,d=i.opacity;if(u=Array.isArray(u)?u[n]:u,((o=r.config.chart.dropShadow.enabledOnSeries)===null||o===void 0?void 0:o.length)>0&&r.config.chart.dropShadow.enabledOnSeries.indexOf(n)===-1)return e;e.offset({in:s,dx:c,dy:l,result:"offset"}),e.gaussianBlur({in:"offset",stdDeviation:a,result:"blur"}),e.flood({"flood-color":u,"flood-opacity":d,result:"flood"}),e.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),e.merge(["shadow",s])}},{key:"dropShadow",value:function(e,n){var i,s,o,r,a,l=this,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,u=this.w;return e.unfilter(!0),pe.isMsEdge()&&u.config.chart.type==="radialBar"||((i=u.config.chart.dropShadow.enabledOnSeries)===null||i===void 0?void 0:i.length)>0&&((o=u.config.chart.dropShadow.enabledOnSeries)===null||o===void 0?void 0:o.indexOf(c))===-1?e:(e.filterWith(function(d){l.addShadow(d,c,n,"SourceGraphic")}),n.noUserSpaceOnUse||(r=e.filterer())===null||r===void 0||(a=r.node)===null||a===void 0||a.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((s=e.filterer())===null||s===void 0?void 0:s.node),e)}},{key:"setSelectionFilter",value:function(e,n,i){var s=this.w;if(s.globals.selectedDataPoints[n]!==void 0&&s.globals.selectedDataPoints[n].indexOf(i)>-1){e.node.setAttribute("selected",!0);var o=s.config.states.active.filter;o!=="none"&&this.applyFilter(e,n,o.type)}}},{key:"_scaleFilterSize",value:function(e){e&&function(n){for(var i in n)n.hasOwnProperty(i)&&e.setAttribute(i,n[i])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),t}(),Be=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"roundPathCorners",value:function(e,n){function i(T,I,L){var R=I.x-T.x,V=I.y-T.y,H=Math.sqrt(R*R+V*V);return s(T,I,Math.min(1,L/H))}function s(T,I,L){return{x:T.x+(I.x-T.x)*L,y:T.y+(I.y-T.y)*L}}function o(T,I){T.length>2&&(T[T.length-2]=I.x,T[T.length-1]=I.y)}function r(T){return{x:parseFloat(T[T.length-2]),y:parseFloat(T[T.length-1])}}e.indexOf("NaN")>-1&&(e="");var a=e.split(/[,\s]/).reduce(function(T,I){var L=I.match("([a-zA-Z])(.+)");return L?(T.push(L[1]),T.push(L[2])):T.push(I),T},[]).reduce(function(T,I){return parseFloat(I)==I&&T.length?T[T.length-1].push(I):T.push([I]),T},[]),l=[];if(a.length>1){var c=r(a[0]),u=null;a[a.length-1][0]=="Z"&&a[0].length>2&&(u=["L",c.x,c.y],a[a.length-1]=u),l.push(a[0]);for(var d=1;d<a.length;d++){var h=l[l.length-1],f=a[d],p=f==u?a[1]:a[d+1];if(p&&h&&h.length>2&&f[0]=="L"&&p.length>2&&p[0]=="L"){var m,y,b=r(h),k=r(f),C=r(p);m=i(k,b,n),y=i(k,C,n),o(f,m),f.origPoint=k,l.push(f);var $=s(m,k,.5),x=s(k,y,.5),M=["C",$.x,$.y,x.x,x.y,y.x,y.y];M.origPoint=k,l.push(M)}else l.push(f)}if(u){var P=r(l[l.length-1]);l.push(["Z"]),o(l[0],P)}}else l=a;return l.reduce(function(T,I){return T+I.join(" ")+" "},"")}},{key:"drawLine",value:function(e,n,i,s){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"#a8a8a8",r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:"butt";return this.w.globals.dom.Paper.line().attr({x1:e,y1:n,x2:i,y2:s,stroke:o,"stroke-dasharray":r,"stroke-width":a,"stroke-linecap":l})}},{key:"drawRect",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"#fefefe",a=arguments.length>6&&arguments[6]!==void 0?arguments[6]:1,l=arguments.length>7&&arguments[7]!==void 0?arguments[7]:null,c=arguments.length>8&&arguments[8]!==void 0?arguments[8]:null,u=arguments.length>9&&arguments[9]!==void 0?arguments[9]:0,d=this.w.globals.dom.Paper.rect();return d.attr({x:e,y:n,width:i>0?i:0,height:s>0?s:0,rx:o,ry:o,opacity:a,"stroke-width":l!==null?l:0,stroke:c!==null?c:"none","stroke-dasharray":u}),d.node.setAttribute("fill",r),d}},{key:"drawPolygon",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"#e1e1e1",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(e).attr({fill:s,stroke:n,"stroke-width":i})}},{key:"drawCircle",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;e<0&&(e=0);var i=this.w.globals.dom.Paper.circle(2*e);return n!==null&&i.attr(n),i}},{key:"drawPath",value:function(e){var n=e.d,i=n===void 0?"":n,s=e.stroke,o=s===void 0?"#a8a8a8":s,r=e.strokeWidth,a=r===void 0?1:r,l=e.fill,c=e.fillOpacity,u=c===void 0?1:c,d=e.strokeOpacity,h=d===void 0?1:d,f=e.classes,p=e.strokeLinecap,m=p===void 0?null:p,y=e.strokeDashArray,b=y===void 0?0:y,k=this.w;return m===null&&(m=k.config.stroke.lineCap),(i.indexOf("undefined")>-1||i.indexOf("NaN")>-1)&&(i="M 0 ".concat(k.globals.gridHeight)),k.globals.dom.Paper.path(i).attr({fill:l,"fill-opacity":u,stroke:o,"stroke-opacity":h,"stroke-linecap":m,"stroke-width":a,"stroke-dasharray":b,class:f})}},{key:"group",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=this.w.globals.dom.Paper.group();return e!==null&&n.attr(e),n}},{key:"move",value:function(e,n){var i=["M",e,n].join(" ");return i}},{key:"line",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,s=null;return i===null?s=[" L",e,n].join(" "):i==="H"?s=[" H",e].join(" "):i==="V"&&(s=[" V",n].join(" ")),s}},{key:"curve",value:function(e,n,i,s,o,r){var a=["C",e,n,i,s,o,r].join(" ");return a}},{key:"quadraticCurve",value:function(e,n,i,s){return["Q",e,n,i,s].join(" ")}},{key:"arc",value:function(e,n,i,s,o,r,a){var l="A";arguments.length>7&&arguments[7]!==void 0&&arguments[7]&&(l="a");var c=[l,e,n,i,s,o,r,a].join(" ");return c}},{key:"renderPaths",value:function(e){var n,i=e.j,s=e.realIndex,o=e.pathFrom,r=e.pathTo,a=e.stroke,l=e.strokeWidth,c=e.strokeLinecap,u=e.fill,d=e.animationDelay,h=e.initialSpeed,f=e.dataChangeSpeed,p=e.className,m=e.chartType,y=e.shouldClipToGrid,b=y===void 0||y,k=e.bindEventsOnPaths,C=k===void 0||k,$=e.drawShadow,x=$===void 0||$,M=this.w,P=new ri(this.ctx),T=new wp(this.ctx),I=this.w.config.chart.animations.enabled,L=I&&this.w.config.chart.animations.dynamicAnimation.enabled,R=!!(I&&!M.globals.resized||L&&M.globals.dataChanged&&M.globals.shouldAnimate);R?n=o:(n=r,M.globals.animationEnded=!0);var V=M.config.stroke.dashArray,H=0;H=Array.isArray(V)?V[s]:M.config.stroke.dashArray;var F=this.drawPath({d:n,stroke:a,strokeWidth:l,fill:u,fillOpacity:1,classes:p,strokeLinecap:c,strokeDashArray:H});F.attr("index",s),b&&(m==="bar"&&!M.globals.isHorizontal||M.globals.comboCharts?F.attr({"clip-path":"url(#gridRectBarMask".concat(M.globals.cuid,")")}):F.attr({"clip-path":"url(#gridRectMask".concat(M.globals.cuid,")")})),M.config.chart.dropShadow.enabled&&x&&P.dropShadow(F,M.config.chart.dropShadow,s),C&&(F.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,F)),F.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,F)),F.node.addEventListener("mousedown",this.pathMouseDown.bind(this,F))),F.attr({pathTo:r,pathFrom:o});var z={el:F,j:i,realIndex:s,pathFrom:o,pathTo:r,fill:u,strokeWidth:l,delay:d};return!I||M.globals.resized||M.globals.dataChanged?!M.globals.resized&&M.globals.dataChanged||T.showDelayedElements():T.animatePathsGradually(Je(Je({},z),{},{speed:h})),M.globals.dataChanged&&L&&R&&T.animatePathsGradually(Je(Je({},z),{},{speed:f})),F}},{key:"drawPattern",value:function(e,n,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"#a8a8a8",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;return this.w.globals.dom.Paper.pattern(n,i,function(r){e==="horizontalLines"?r.line(0,0,i,0).stroke({color:s,width:o+1}):e==="verticalLines"?r.line(0,0,0,n).stroke({color:s,width:o+1}):e==="slantedLines"?r.line(0,0,n,i).stroke({color:s,width:o}):e==="squares"?r.rect(n,i).fill("none").stroke({color:s,width:o}):e==="circles"&&r.circle(n).fill("none").stroke({color:s,width:o})})}},{key:"drawGradient",value:function(e,n,i,s,o){var r,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,c=arguments.length>7&&arguments[7]!==void 0?arguments[7]:[],u=arguments.length>8&&arguments[8]!==void 0?arguments[8]:0,d=this.w;n.length<9&&n.indexOf("#")===0&&(n=pe.hexToRgba(n,s)),i.length<9&&i.indexOf("#")===0&&(i=pe.hexToRgba(i,o));var h=0,f=1,p=1,m=null;l!==null&&(h=l[0]!==void 0?l[0]/100:0,f=l[1]!==void 0?l[1]/100:1,p=l[2]!==void 0?l[2]/100:1,m=l[3]!==void 0?l[3]/100:null);var y=!(d.config.chart.type!=="donut"&&d.config.chart.type!=="pie"&&d.config.chart.type!=="polarArea"&&d.config.chart.type!=="bubble");if(r=c&&c.length!==0?d.globals.dom.Paper.gradient(y?"radial":"linear",function(C){(Array.isArray(c[u])?c[u]:c).forEach(function($){C.stop($.offset/100,$.color,$.opacity)})}):d.globals.dom.Paper.gradient(y?"radial":"linear",function(C){C.stop(h,n,s),C.stop(f,i,o),C.stop(p,i,o),m!==null&&C.stop(m,n,s)}),y){var b=d.globals.gridWidth/2,k=d.globals.gridHeight/2;d.config.chart.type!=="bubble"?r.attr({gradientUnits:"userSpaceOnUse",cx:b,cy:k,r:a}):r.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}else e==="vertical"?r.from(0,0).to(0,1):e==="diagonal"?r.from(0,0).to(1,1):e==="horizontal"?r.from(0,1).to(1,1):e==="diagonal2"&&r.from(1,0).to(0,1);return r}},{key:"getTextBasedOnMaxWidth",value:function(e){var n=e.text,i=e.maxWidth,s=e.fontSize,o=e.fontFamily,r=this.getTextRects(n,s,o),a=r.width/n.length,l=Math.floor(i/a);return i<r.width?n.slice(0,l-3)+"...":n}},{key:"drawText",value:function(e){var n=this,i=e.x,s=e.y,o=e.text,r=e.textAnchor,a=e.fontSize,l=e.fontFamily,c=e.fontWeight,u=e.foreColor,d=e.opacity,h=e.maxWidth,f=e.cssClass,p=f===void 0?"":f,m=e.isPlainText,y=m===void 0||m,b=e.dominantBaseline,k=b===void 0?"auto":b,C=this.w;o===void 0&&(o="");var $=o;r||(r="start"),u&&u.length||(u=C.config.chart.foreColor),l=l||C.config.chart.fontFamily,c=c||"regular";var x,M={maxWidth:h,fontSize:a=a||"11px",fontFamily:l};return Array.isArray(o)?x=C.globals.dom.Paper.text(function(P){for(var T=0;T<o.length;T++)$=o[T],h&&($=n.getTextBasedOnMaxWidth(Je({text:o[T]},M))),T===0?P.tspan($):P.tspan($).newLine()}):(h&&($=this.getTextBasedOnMaxWidth(Je({text:o},M))),x=y?C.globals.dom.Paper.plain(o):C.globals.dom.Paper.text(function(P){return P.tspan($)})),x.attr({x:i,y:s,"text-anchor":r,"dominant-baseline":k,"font-size":a,"font-family":l,"font-weight":c,fill:u,class:"apexcharts-text "+p}),x.node.style.fontFamily=l,x.node.style.opacity=d,x}},{key:"getMarkerPath",value:function(e,n,i,s){var o="";switch(i){case"cross":o="M ".concat(e-(s/=1.4)," ").concat(n-s," L ").concat(e+s," ").concat(n+s,"  M ").concat(e-s," ").concat(n+s," L ").concat(e+s," ").concat(n-s);break;case"plus":o="M ".concat(e-(s/=1.12)," ").concat(n," L ").concat(e+s," ").concat(n,"  M ").concat(e," ").concat(n-s," L ").concat(e," ").concat(n+s);break;case"star":case"sparkle":var r=5;s*=1.15,i==="sparkle"&&(s/=1.1,r=4);for(var a=Math.PI/r,l=0;l<=2*r;l++){var c=l*a,u=l%2==0?s:s/2;o+=(l===0?"M":"L")+(e+u*Math.sin(c))+","+(n-u*Math.cos(c))}o+="Z";break;case"triangle":o="M ".concat(e," ").concat(n-s,` 
             L `).concat(e+s," ").concat(n+s,` 
             L `).concat(e-s," ").concat(n+s,` 
             Z`);break;case"square":case"rect":o="M ".concat(e-(s/=1.125)," ").concat(n-s,` 
           L `).concat(e+s," ").concat(n-s,` 
           L `).concat(e+s," ").concat(n+s,` 
           L `).concat(e-s," ").concat(n+s,` 
           Z`);break;case"diamond":s*=1.05,o="M ".concat(e," ").concat(n-s,` 
             L `).concat(e+s," ").concat(n,` 
             L `).concat(e," ").concat(n+s,` 
             L `).concat(e-s," ").concat(n,` 
            Z`);break;case"line":o="M ".concat(e-(s/=1.1)," ").concat(n,` 
           L `).concat(e+s," ").concat(n);break;default:s*=2,o="M ".concat(e,", ").concat(n,` 
           m -`).concat(s/2,`, 0 
           a `).concat(s/2,",").concat(s/2," 0 1,0 ").concat(s,`,0 
           a `).concat(s/2,",").concat(s/2," 0 1,0 -").concat(s,",0")}return o}},{key:"drawMarkerShape",value:function(e,n,i,s,o){var r=this.drawPath({d:this.getMarkerPath(e,n,i,s,o),stroke:o.pointStrokeColor,strokeDashArray:o.pointStrokeDashArray,strokeWidth:o.pointStrokeWidth,fill:o.pointFillColor,fillOpacity:o.pointFillOpacity,strokeOpacity:o.pointStrokeOpacity});return r.attr({cx:e,cy:n,shape:o.shape,class:o.class?o.class:""}),r}},{key:"drawMarker",value:function(e,n,i){e=e||0;var s=i.pSize||0;return pe.isNumber(n)||(s=0,n=0),this.drawMarkerShape(e,n,i==null?void 0:i.shape,s,Je(Je({},i),i.shape==="line"||i.shape==="plus"||i.shape==="cross"?{pointStrokeColor:i.pointFillColor,pointStrokeOpacity:i.pointFillOpacity}:{}))}},{key:"pathMouseEnter",value:function(e,n){var i=this.w,s=new ri(this.ctx),o=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10);if(typeof i.config.chart.events.dataPointMouseEnter=="function"&&i.config.chart.events.dataPointMouseEnter(n,this.ctx,{seriesIndex:o,dataPointIndex:r,w:i}),this.ctx.events.fireEvent("dataPointMouseEnter",[n,this.ctx,{seriesIndex:o,dataPointIndex:r,w:i}]),(i.config.states.active.filter.type==="none"||e.node.getAttribute("selected")!=="true")&&i.config.states.hover.filter.type!=="none"&&!i.globals.isTouchDevice){var a=i.config.states.hover.filter;s.applyFilter(e,o,a.type)}}},{key:"pathMouseLeave",value:function(e,n){var i=this.w,s=new ri(this.ctx),o=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10);typeof i.config.chart.events.dataPointMouseLeave=="function"&&i.config.chart.events.dataPointMouseLeave(n,this.ctx,{seriesIndex:o,dataPointIndex:r,w:i}),this.ctx.events.fireEvent("dataPointMouseLeave",[n,this.ctx,{seriesIndex:o,dataPointIndex:r,w:i}]),i.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true"||i.config.states.hover.filter.type!=="none"&&s.getDefaultFilter(e,o)}},{key:"pathMouseDown",value:function(e,n){var i=this.w,s=new ri(this.ctx),o=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10),a="false";if(e.node.getAttribute("selected")==="true"){if(e.node.setAttribute("selected","false"),i.globals.selectedDataPoints[o].indexOf(r)>-1){var l=i.globals.selectedDataPoints[o].indexOf(r);i.globals.selectedDataPoints[o].splice(l,1)}}else{if(!i.config.states.active.allowMultipleDataPointsSelection&&i.globals.selectedDataPoints.length>0){i.globals.selectedDataPoints=[];var c=i.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),u=i.globals.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),d=function(p){Array.prototype.forEach.call(p,function(m){m.node.setAttribute("selected","false"),s.getDefaultFilter(m,o)})};d(c),d(u)}e.node.setAttribute("selected","true"),a="true",i.globals.selectedDataPoints[o]===void 0&&(i.globals.selectedDataPoints[o]=[]),i.globals.selectedDataPoints[o].push(r)}if(a==="true"){var h=i.config.states.active.filter;if(h!=="none")s.applyFilter(e,o,h.type);else if(i.config.states.hover.filter!=="none"&&!i.globals.isTouchDevice){var f=i.config.states.hover.filter;s.applyFilter(e,o,f.type)}}else i.config.states.active.filter.type!=="none"&&(i.config.states.hover.filter.type==="none"||i.globals.isTouchDevice?s.getDefaultFilter(e,o):(f=i.config.states.hover.filter,s.applyFilter(e,o,f.type)));typeof i.config.chart.events.dataPointSelection=="function"&&i.config.chart.events.dataPointSelection(n,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:o,dataPointIndex:r,w:i}),n&&this.ctx.events.fireEvent("dataPointSelection",[n,this.ctx,{selectedDataPoints:i.globals.selectedDataPoints,seriesIndex:o,dataPointIndex:r,w:i}])}},{key:"rotateAroundCenter",value:function(e){var n={};return e&&typeof e.getBBox=="function"&&(n=e.getBBox()),{x:n.x+n.width/2,y:n.y+n.height/2}}},{key:"getTextRects",value:function(e,n,i,s){var o=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],r=this.w,a=this.drawText({x:-200,y:-200,text:e,textAnchor:"start",fontSize:n,fontFamily:i,foreColor:"#fff",opacity:0});s&&a.attr("transform",s),r.globals.dom.Paper.add(a);var l=a.bbox();return o||(l=a.node.getBoundingClientRect()),a.remove(),{width:l.width,height:l.height}}},{key:"placeTextWithEllipsis",value:function(e,n,i){if(typeof e.getComputedTextLength=="function"&&(e.textContent=n,n.length>0&&e.getComputedTextLength()>=i/1.1)){for(var s=n.length-3;s>0;s-=3)if(e.getSubStringLength(0,s)<=i/1.1)return void(e.textContent=n.substring(0,s)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,n){for(var i in n)n.hasOwnProperty(i)&&e.setAttribute(i,n[i])}}]),t}(),_s=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"getStackedSeriesTotals",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=this.w,i=[];if(n.globals.series.length===0)return i;for(var s=0;s<n.globals.series[n.globals.maxValsInArrayIndex].length;s++){for(var o=0,r=0;r<n.globals.series.length;r++)n.globals.series[r][s]!==void 0&&e.indexOf(r)===-1&&(o+=n.globals.series[r][s]);i.push(o)}return i}},{key:"getSeriesTotalByIndex",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return e===null?this.w.config.series.reduce(function(n,i){return n+i},0):this.w.globals.series[e].reduce(function(n,i){return n+i},0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var e=this,n=this.w,i=[];return n.globals.seriesGroups.forEach(function(s){var o=[];n.config.series.forEach(function(a,l){s.indexOf(n.globals.seriesNames[l])>-1&&o.push(l)});var r=n.globals.series.map(function(a,l){return o.indexOf(l)===-1?l:-1}).filter(function(a){return a!==-1});i.push(e.getStackedSeriesTotals(r))}),i}},{key:"setSeriesYAxisMappings",value:function(){var e=this.w.globals,n=this.w.config,i=[],s=[],o=[],r=e.series.length>n.yaxis.length||n.yaxis.some(function(d){return Array.isArray(d.seriesName)});n.series.forEach(function(d,h){o.push(h),s.push(null)}),n.yaxis.forEach(function(d,h){i[h]=[]});var a=[];n.yaxis.forEach(function(d,h){var f=!1;if(d.seriesName){var p=[];Array.isArray(d.seriesName)?p=d.seriesName:p.push(d.seriesName),p.forEach(function(m){n.series.forEach(function(y,b){if(y.name===m){var k=b;h===b||r?!r||o.indexOf(b)>-1?i[h].push([h,b]):console.warn("Series '"+y.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(i[b].push([b,h]),k=h),f=!0,(k=o.indexOf(k))!==-1&&o.splice(k,1)}})})}f||a.push(h)}),i=i.map(function(d,h){var f=[];return d.forEach(function(p){s[p[1]]=p[0],f.push(p[1])}),f});for(var l=n.yaxis.length-1,c=0;c<a.length&&(l=a[c],i[l]=[],o);c++){var u=o[0];o.shift(),i[l].push(u),s[u]=l}o.forEach(function(d){i[l].push(d),s[d]=l}),e.seriesYAxisMap=i.map(function(d){return d}),e.seriesYAxisReverseMap=s.map(function(d){return d}),e.seriesYAxisMap.forEach(function(d,h){d.forEach(function(f){n.series[f]&&n.series[f].group===void 0&&(n.series[f].group="apexcharts-axis-".concat(h.toString()))})})}},{key:"isSeriesNull",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return(e===null?this.w.config.series.filter(function(n){return n!==null}):this.w.config.series[e].data.filter(function(n){return n!==null})).length===0}},{key:"seriesHaveSameValues",value:function(e){return this.w.globals.series[e].every(function(n,i,s){return n===s[0]})}},{key:"getCategoryLabels",value:function(e){var n=this.w,i=e.slice();return n.config.xaxis.convertedCatToNumeric&&(i=e.map(function(s,o){return n.config.xaxis.labels.formatter(s-n.globals.minX+1)})),i}},{key:"getLargestSeries",value:function(){var e=this.w;e.globals.maxValsInArrayIndex=e.globals.series.map(function(n){return n.length}).indexOf(Math.max.apply(Math,e.globals.series.map(function(n){return n.length})))}},{key:"getLargestMarkerSize",value:function(){var e=this.w,n=0;return e.globals.markers.size.forEach(function(i){n=Math.max(n,i)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(function(i){n=Math.max(n,i.size)}),n>0&&(e.config.markers.hover.size>0?n=e.config.markers.hover.size:n+=e.config.markers.hover.sizeOffset),e.globals.markers.largestSize=n,n}},{key:"getSeriesTotals",value:function(){var e=this.w;e.globals.seriesTotals=e.globals.series.map(function(n,i){var s=0;if(Array.isArray(n))for(var o=0;o<n.length;o++)s+=n[o];else s+=n;return s})}},{key:"getSeriesTotalsXRange",value:function(e,n){var i=this.w;return i.globals.series.map(function(s,o){for(var r=0,a=0;a<s.length;a++)i.globals.seriesX[o][a]>e&&i.globals.seriesX[o][a]<n&&(r+=s[a]);return r})}},{key:"getPercentSeries",value:function(){var e=this.w;e.globals.seriesPercent=e.globals.series.map(function(n,i){var s=[];if(Array.isArray(n))for(var o=0;o<n.length;o++){var r=e.globals.stackedSeriesTotals[o],a=0;r&&(a=100*n[o]/r),s.push(a)}else{var l=100*n/e.globals.seriesTotals.reduce(function(c,u){return c+u},0);s.push(l)}return s})}},{key:"getCalculatedRatios",value:function(){var e,n,i,s=this,o=this.w,r=o.globals,a=[],l=0,c=[],u=.1,d=0;if(r.yRange=[],r.isMultipleYAxis)for(var h=0;h<r.minYArr.length;h++)r.yRange.push(Math.abs(r.minYArr[h]-r.maxYArr[h])),c.push(0);else r.yRange.push(Math.abs(r.minY-r.maxY));r.xRange=Math.abs(r.maxX-r.minX),r.zRange=Math.abs(r.maxZ-r.minZ);for(var f=0;f<r.yRange.length;f++)a.push(r.yRange[f]/r.gridHeight);if(n=r.xRange/r.gridWidth,e=r.yRange/r.gridWidth,i=r.xRange/r.gridHeight,(l=r.zRange/r.gridHeight*16)||(l=1),r.minY!==Number.MIN_VALUE&&Math.abs(r.minY)!==0&&(r.hasNegs=!0),o.globals.seriesYAxisReverseMap.length>0){var p=function(y,b){var k=o.config.yaxis[o.globals.seriesYAxisReverseMap[b]],C=y<0?-1:1;return y=Math.abs(y),k.logarithmic&&(y=s.getBaseLog(k.logBase,y)),-C*y/a[b]};if(r.isMultipleYAxis){c=[];for(var m=0;m<a.length;m++)c.push(p(r.minYArr[m],m))}else(c=[]).push(p(r.minY,0)),r.minY!==Number.MIN_VALUE&&Math.abs(r.minY)!==0&&(u=-r.minY/e,d=r.minX/n)}else(c=[]).push(0),u=0,d=0;return{yRatio:a,invertedYRatio:e,zRatio:l,xRatio:n,invertedXRatio:i,baseLineInvertedY:u,baseLineY:c,baseLineX:d}}},{key:"getLogSeries",value:function(e){var n=this,i=this.w;return i.globals.seriesLog=e.map(function(s,o){var r=i.globals.seriesYAxisReverseMap[o];return i.config.yaxis[r]&&i.config.yaxis[r].logarithmic?s.map(function(a){return a===null?null:n.getLogVal(i.config.yaxis[r].logBase,a,o)}):s}),i.globals.invalidLogScale?e:i.globals.seriesLog}},{key:"getLogValAtSeriesIndex",value:function(e,n){if(e===null)return null;var i=this.w,s=i.globals.seriesYAxisReverseMap[n];return i.config.yaxis[s]&&i.config.yaxis[s].logarithmic?this.getLogVal(i.config.yaxis[s].logBase,e,n):e}},{key:"getBaseLog",value:function(e,n){return Math.log(n)/Math.log(e)}},{key:"getLogVal",value:function(e,n,i){if(n<=0)return 0;var s=this.w,o=s.globals.minYArr[i]===0?-1:this.getBaseLog(e,s.globals.minYArr[i]),r=(s.globals.maxYArr[i]===0?0:this.getBaseLog(e,s.globals.maxYArr[i]))-o;return n<1?n/r:(this.getBaseLog(e,n)-o)/r}},{key:"getLogYRatios",value:function(e){var n=this,i=this.w,s=this.w.globals;return s.yLogRatio=e.slice(),s.logYRange=s.yRange.map(function(o,r){var a=i.globals.seriesYAxisReverseMap[r];if(i.config.yaxis[a]&&n.w.config.yaxis[a].logarithmic){var l,c=-Number.MAX_VALUE,u=Number.MIN_VALUE;return s.seriesLog.forEach(function(d,h){d.forEach(function(f){i.config.yaxis[h]&&i.config.yaxis[h].logarithmic&&(c=Math.max(f,c),u=Math.min(f,u))})}),l=Math.pow(s.yRange[r],Math.abs(u-c)/s.yRange[r]),s.yLogRatio[r]=l/s.gridHeight,l}}),s.invalidLogScale?e.slice():s.yLogRatio}},{key:"drawSeriesByGroup",value:function(e,n,i,s){var o=this.w,r=[];return e.series.length>0&&n.forEach(function(a){var l=[],c=[];e.i.forEach(function(u,d){o.config.series[u].group===a&&(l.push(e.series[d]),c.push(u))}),l.length>0&&r.push(s.draw(l,i,c))}),r}}],[{key:"checkComboSeries",value:function(e,n){var i=!1,s=0,o=0;return n===void 0&&(n="line"),e.length&&e[0].type!==void 0&&e.forEach(function(r){r.type!=="bar"&&r.type!=="column"&&r.type!=="candlestick"&&r.type!=="boxPlot"||s++,r.type!==void 0&&r.type!==n&&o++}),o>0&&(i=!0),{comboBarCount:s,comboCharts:i}}},{key:"extendArrayProps",value:function(e,n,i){var s,o,r,a,l,c;return(s=n)!==null&&s!==void 0&&s.yaxis&&(n=e.extendYAxis(n,i)),(o=n)!==null&&o!==void 0&&o.annotations&&(n.annotations.yaxis&&(n=e.extendYAxisAnnotations(n)),(r=n)!==null&&r!==void 0&&(a=r.annotations)!==null&&a!==void 0&&a.xaxis&&(n=e.extendXAxisAnnotations(n)),(l=n)!==null&&l!==void 0&&(c=l.annotations)!==null&&c!==void 0&&c.points&&(n=e.extendPointAnnotations(n))),n}}]),t}(),S2=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e}return ct(t,[{key:"setOrientations",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,i=this.w;if(e.label.orientation==="vertical"){var s=n!==null?n:0,o=i.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(s,"']"));if(o!==null){var r=o.getBoundingClientRect();o.setAttribute("x",parseFloat(o.getAttribute("x"))-r.height+4);var a=e.label.position==="top"?r.width:-r.width;o.setAttribute("y",parseFloat(o.getAttribute("y"))+a);var l=this.annoCtx.graphics.rotateAroundCenter(o),c=l.x,u=l.y;o.setAttribute("transform","rotate(-90 ".concat(c," ").concat(u,")"))}}}},{key:"addBackgroundToAnno",value:function(e,n){var i=this.w;if(!e||!n.label.text||!String(n.label.text).trim())return null;var s=i.globals.dom.baseEl.querySelector(".apexcharts-grid").getBoundingClientRect(),o=e.getBoundingClientRect(),r=n.label.style.padding,a=r.left,l=r.right,c=r.top,u=r.bottom;if(n.label.orientation==="vertical"){var d=[a,l,c,u];c=d[0],u=d[1],a=d[2],l=d[3]}var h=o.left-s.left-a,f=o.top-s.top-c,p=this.annoCtx.graphics.drawRect(h-i.globals.barPadForNumericAxis,f,o.width+a+l,o.height+c+u,n.label.borderRadius,n.label.style.background,1,n.label.borderWidth,n.label.borderColor,0);return n.id&&p.node.classList.add(n.id),p}},{key:"annotationsBackground",value:function(){var e=this,n=this.w,i=function(s,o,r){var a=n.globals.dom.baseEl.querySelector(".apexcharts-".concat(r,"-annotations .apexcharts-").concat(r,"-annotation-label[rel='").concat(o,"']"));if(a){var l=a.parentNode,c=e.addBackgroundToAnno(a,s);c&&(l.insertBefore(c.node,a),s.label.mouseEnter&&c.node.addEventListener("mouseenter",s.label.mouseEnter.bind(e,s)),s.label.mouseLeave&&c.node.addEventListener("mouseleave",s.label.mouseLeave.bind(e,s)),s.label.click&&c.node.addEventListener("click",s.label.click.bind(e,s)))}};n.config.annotations.xaxis.forEach(function(s,o){return i(s,o,"xaxis")}),n.config.annotations.yaxis.forEach(function(s,o){return i(s,o,"yaxis")}),n.config.annotations.points.forEach(function(s,o){return i(s,o,"point")})}},{key:"getY1Y2",value:function(e,n){var i,s=this.w,o=e==="y1"?n.y:n.y2,r=!1;if(this.annoCtx.invertAxis){var a=s.config.xaxis.convertedCatToNumeric?s.globals.categoryLabels:s.globals.labels,l=a.indexOf(o),c=s.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(l+1,")"));i=c?parseFloat(c.getAttribute("y")):(s.globals.gridHeight/a.length-1)*(l+1)-s.globals.barHeight,n.seriesIndex!==void 0&&s.globals.barHeight&&(i-=s.globals.barHeight/2*(s.globals.series.length-1)-s.globals.barHeight*n.seriesIndex)}else{var u,d=s.globals.seriesYAxisMap[n.yAxisIndex][0],h=s.config.yaxis[n.yAxisIndex].logarithmic?new _s(this.annoCtx.ctx).getLogVal(s.config.yaxis[n.yAxisIndex].logBase,o,d)/s.globals.yLogRatio[d]:(o-s.globals.minYArr[d])/(s.globals.yRange[d]/s.globals.gridHeight);i=s.globals.gridHeight-Math.min(Math.max(h,0),s.globals.gridHeight),r=h>s.globals.gridHeight||h<0,!n.marker||n.y!==void 0&&n.y!==null||(i=0),(u=s.config.yaxis[n.yAxisIndex])!==null&&u!==void 0&&u.reversed&&(i=h)}return typeof o=="string"&&o.includes("px")&&(i=parseFloat(o)),{yP:i,clipped:r}}},{key:"getX1X2",value:function(e,n){var i=this.w,s=e==="x1"?n.x:n.x2,o=this.annoCtx.invertAxis?i.globals.minY:i.globals.minX,r=this.annoCtx.invertAxis?i.globals.maxY:i.globals.maxX,a=this.annoCtx.invertAxis?i.globals.yRange[0]:i.globals.xRange,l=!1,c=this.annoCtx.inversedReversedAxis?(r-s)/(a/i.globals.gridWidth):(s-o)/(a/i.globals.gridWidth);return i.config.xaxis.type!=="category"&&!i.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||i.globals.dataFormatXNumeric||i.config.chart.sparkline.enabled||(c=this.getStringX(s)),typeof s=="string"&&s.includes("px")&&(c=parseFloat(s)),s==null&&n.marker&&(c=i.globals.gridWidth),n.seriesIndex!==void 0&&i.globals.barWidth&&!this.annoCtx.invertAxis&&(c-=i.globals.barWidth/2*(i.globals.series.length-1)-i.globals.barWidth*n.seriesIndex),c>i.globals.gridWidth?(c=i.globals.gridWidth,l=!0):c<0&&(c=0,l=!0),{x:c,clipped:l}}},{key:"getStringX",value:function(e){var n=this.w,i=e;n.config.xaxis.convertedCatToNumeric&&n.globals.categoryLabels.length&&(e=n.globals.categoryLabels.indexOf(e)+1);var s=n.globals.labels.map(function(r){return Array.isArray(r)?r.join(" "):r}).indexOf(e),o=n.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g text:nth-child(".concat(s+1,")"));return o&&(i=parseFloat(o.getAttribute("x"))),i}}]),t}(),rCt=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new S2(this.annoCtx)}return ct(t,[{key:"addXaxisAnnotation",value:function(e,n,i){var s,o=this.w,r=this.helpers.getX1X2("x1",e),a=r.x,l=r.clipped,c=!0,u=e.label.text,d=e.strokeDashArray;if(pe.isNumber(a)){if(e.x2===null||e.x2===void 0){if(!l){var h=this.annoCtx.graphics.drawLine(a+e.offsetX,0+e.offsetY,a+e.offsetX,o.globals.gridHeight+e.offsetY,e.borderColor,d,e.borderWidth);n.appendChild(h.node),e.id&&h.node.classList.add(e.id)}}else{var f=this.helpers.getX1X2("x2",e);if(s=f.x,c=f.clipped,s<a){var p=a;a=s,s=p}var m=this.annoCtx.graphics.drawRect(a+e.offsetX,0+e.offsetY,s-a,o.globals.gridHeight+e.offsetY,0,e.fillColor,e.opacity,1,e.borderColor,d);m.node.classList.add("apexcharts-annotation-rect"),m.attr("clip-path","url(#gridRectMask".concat(o.globals.cuid,")")),n.appendChild(m.node),e.id&&m.node.classList.add(e.id)}if(!l||!c){var y=this.annoCtx.graphics.getTextRects(u,parseFloat(e.label.style.fontSize)),b=e.label.position==="top"?4:e.label.position==="center"?o.globals.gridHeight/2+(e.label.orientation==="vertical"?y.width/2:0):o.globals.gridHeight,k=this.annoCtx.graphics.drawText({x:a+e.label.offsetX,y:b+e.label.offsetY-(e.label.orientation==="vertical"?e.label.position==="top"?y.width/2-12:-y.width/2:0),text:u,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-xaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});k.attr({rel:i}),n.appendChild(k.node),this.annoCtx.helpers.setOrientations(e,i)}}}},{key:"drawXAxisAnnotations",value:function(){var e=this,n=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return n.config.annotations.xaxis.map(function(s,o){e.addXaxisAnnotation(s,i.node,o)}),i}}]),t}(),si=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return ct(t,[{key:"isValidDate",value:function(e){return typeof e!="number"&&!isNaN(this.parseDate(e))}},{key:"getTimeStamp",value:function(e){return Date.parse(e)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toISOString().substr(0,25)).getTime():new Date(e).getTime():e}},{key:"getDate",value:function(e){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(e).toUTCString()):new Date(e)}},{key:"parseDate",value:function(e){var n=Date.parse(e);if(!isNaN(n))return this.getTimeStamp(e);var i=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return i=this.getTimeStamp(i)}},{key:"parseDateWithTimezone",value:function(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(e,n){var i=this.w.globals.locale,s=this.w.config.xaxis.labels.datetimeUTC,o=["\0"].concat(Ns(i.months)),r=[""].concat(Ns(i.shortMonths)),a=[""].concat(Ns(i.days)),l=[""].concat(Ns(i.shortDays));function c(T,I){var L=T+"";for(I=I||2;L.length<I;)L="0"+L;return L}var u=s?e.getUTCFullYear():e.getFullYear();n=(n=(n=n.replace(/(^|[^\\])yyyy+/g,"$1"+u)).replace(/(^|[^\\])yy/g,"$1"+u.toString().substr(2,2))).replace(/(^|[^\\])y/g,"$1"+u);var d=(s?e.getUTCMonth():e.getMonth())+1;n=(n=(n=(n=n.replace(/(^|[^\\])MMMM+/g,"$1"+o[0])).replace(/(^|[^\\])MMM/g,"$1"+r[0])).replace(/(^|[^\\])MM/g,"$1"+c(d))).replace(/(^|[^\\])M/g,"$1"+d);var h=s?e.getUTCDate():e.getDate();n=(n=(n=(n=n.replace(/(^|[^\\])dddd+/g,"$1"+a[0])).replace(/(^|[^\\])ddd/g,"$1"+l[0])).replace(/(^|[^\\])dd/g,"$1"+c(h))).replace(/(^|[^\\])d/g,"$1"+h);var f=s?e.getUTCHours():e.getHours(),p=f>12?f-12:f===0?12:f;n=(n=(n=(n=n.replace(/(^|[^\\])HH+/g,"$1"+c(f))).replace(/(^|[^\\])H/g,"$1"+f)).replace(/(^|[^\\])hh+/g,"$1"+c(p))).replace(/(^|[^\\])h/g,"$1"+p);var m=s?e.getUTCMinutes():e.getMinutes();n=(n=n.replace(/(^|[^\\])mm+/g,"$1"+c(m))).replace(/(^|[^\\])m/g,"$1"+m);var y=s?e.getUTCSeconds():e.getSeconds();n=(n=n.replace(/(^|[^\\])ss+/g,"$1"+c(y))).replace(/(^|[^\\])s/g,"$1"+y);var b=s?e.getUTCMilliseconds():e.getMilliseconds();n=n.replace(/(^|[^\\])fff+/g,"$1"+c(b,3)),b=Math.round(b/10),n=n.replace(/(^|[^\\])ff/g,"$1"+c(b)),b=Math.round(b/10);var k=f<12?"AM":"PM";n=(n=(n=n.replace(/(^|[^\\])f/g,"$1"+b)).replace(/(^|[^\\])TT+/g,"$1"+k)).replace(/(^|[^\\])T/g,"$1"+k.charAt(0));var C=k.toLowerCase();n=(n=n.replace(/(^|[^\\])tt+/g,"$1"+C)).replace(/(^|[^\\])t/g,"$1"+C.charAt(0));var $=-e.getTimezoneOffset(),x=s||!$?"Z":$>0?"+":"-";if(!s){var M=($=Math.abs($))%60;x+=c(Math.floor($/60))+":"+c(M)}n=n.replace(/(^|[^\\])K/g,"$1"+x);var P=(s?e.getUTCDay():e.getDay())+1;return n=(n=(n=(n=(n=n.replace(new RegExp(a[0],"g"),a[P])).replace(new RegExp(l[0],"g"),l[P])).replace(new RegExp(o[0],"g"),o[d])).replace(new RegExp(r[0],"g"),r[d])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(e,n,i){var s=this.w;s.config.xaxis.min!==void 0&&(e=s.config.xaxis.min),s.config.xaxis.max!==void 0&&(n=s.config.xaxis.max);var o=this.getDate(e),r=this.getDate(n),a=this.formatDate(o,"yyyy MM dd HH mm ss fff").split(" "),l=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(a[6],10),maxMillisecond:parseInt(l[6],10),minSecond:parseInt(a[5],10),maxSecond:parseInt(l[5],10),minMinute:parseInt(a[4],10),maxMinute:parseInt(l[4],10),minHour:parseInt(a[3],10),maxHour:parseInt(l[3],10),minDate:parseInt(a[2],10),maxDate:parseInt(l[2],10),minMonth:parseInt(a[1],10)-1,maxMonth:parseInt(l[1],10)-1,minYear:parseInt(a[0],10),maxYear:parseInt(l[0],10)}}},{key:"isLeapYear",value:function(e){return e%4==0&&e%100!=0||e%400==0}},{key:"calculcateLastDaysOfMonth",value:function(e,n,i){return this.determineDaysOfMonths(e,n)-i}},{key:"determineDaysOfYear",value:function(e){var n=365;return this.isLeapYear(e)&&(n=366),n}},{key:"determineRemainingDaysOfYear",value:function(e,n,i){var s=this.daysCntOfYear[n]+i;return n>1&&this.isLeapYear()&&s++,s}},{key:"determineDaysOfMonths",value:function(e,n){var i=30;switch(e=pe.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(i=this.isLeapYear(n)?29:28);break;case this.months31.indexOf(e)>-1:default:i=31}return i}}]),t}(),sv=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return ct(t,[{key:"xLabelFormat",value:function(e,n,i,s){var o=this.w;if(o.config.xaxis.type==="datetime"&&o.config.xaxis.labels.formatter===void 0&&o.config.tooltip.x.formatter===void 0){var r=new si(this.ctx);return r.formatDate(r.getDate(n),o.config.tooltip.x.format)}return e(n,i,s)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map(function(n){return n}):e}},{key:"defaultYFormatter",value:function(e,n,i){var s=this.w;if(pe.isNumber(e))if(s.globals.yValueDecimal!==0)e=e.toFixed(n.decimalsInFloat!==void 0?n.decimalsInFloat:s.globals.yValueDecimal);else{var o=e.toFixed(0);e=e==o?o:e.toFixed(1)}return e}},{key:"setLabelFormatters",value:function(){var e=this,n=this.w;return n.globals.xaxisTooltipFormatter=function(i){return e.defaultGeneralFormatter(i)},n.globals.ttKeyFormatter=function(i){return e.defaultGeneralFormatter(i)},n.globals.ttZFormatter=function(i){return i},n.globals.legendFormatter=function(i){return e.defaultGeneralFormatter(i)},n.config.xaxis.labels.formatter!==void 0?n.globals.xLabelFormatter=n.config.xaxis.labels.formatter:n.globals.xLabelFormatter=function(i){if(pe.isNumber(i)){if(!n.config.xaxis.convertedCatToNumeric&&n.config.xaxis.type==="numeric"){if(pe.isNumber(n.config.xaxis.decimalsInFloat))return i.toFixed(n.config.xaxis.decimalsInFloat);var s=n.globals.maxX-n.globals.minX;return s>0&&s<100?i.toFixed(1):i.toFixed(0)}return n.globals.isBarHorizontal&&n.globals.maxY-n.globals.minYArr<4?i.toFixed(1):i.toFixed(0)}return i},typeof n.config.tooltip.x.formatter=="function"?n.globals.ttKeyFormatter=n.config.tooltip.x.formatter:n.globals.ttKeyFormatter=n.globals.xLabelFormatter,typeof n.config.xaxis.tooltip.formatter=="function"&&(n.globals.xaxisTooltipFormatter=n.config.xaxis.tooltip.formatter),(Array.isArray(n.config.tooltip.y)||n.config.tooltip.y.formatter!==void 0)&&(n.globals.ttVal=n.config.tooltip.y),n.config.tooltip.z.formatter!==void 0&&(n.globals.ttZFormatter=n.config.tooltip.z.formatter),n.config.legend.formatter!==void 0&&(n.globals.legendFormatter=n.config.legend.formatter),n.config.yaxis.forEach(function(i,s){i.labels.formatter!==void 0?n.globals.yLabelFormatters[s]=i.labels.formatter:n.globals.yLabelFormatters[s]=function(o){return n.globals.xyCharts?Array.isArray(o)?o.map(function(r){return e.defaultYFormatter(r,i,s)}):e.defaultYFormatter(o,i,s):o}}),n.globals}},{key:"heatmapLabelFormatters",value:function(){var e=this.w;if(e.config.chart.type==="heatmap"){e.globals.yAxisScale[0].result=e.globals.seriesNames.slice();var n=e.globals.seriesNames.reduce(function(i,s){return i.length>s.length?i:s},0);e.globals.yAxisScale[0].niceMax=n,e.globals.yAxisScale[0].niceMin=n}}}]),t}(),Oc=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"getLabel",value:function(e,n,i,s){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[],r=arguments.length>5&&arguments[5]!==void 0?arguments[5]:"12px",a=!(arguments.length>6&&arguments[6]!==void 0)||arguments[6],l=this.w,c=e[s]===void 0?"":e[s],u=c,d=l.globals.xLabelFormatter,h=l.config.xaxis.labels.formatter,f=!1,p=new sv(this.ctx),m=c;a&&(u=p.xLabelFormat(d,c,m,{i:s,dateFormatter:new si(this.ctx).formatDate,w:l}),h!==void 0&&(u=h(c,e[s],{i:s,dateFormatter:new si(this.ctx).formatDate,w:l})));var y,b;n.length>0?(y=n[s].unit,b=null,n.forEach(function(x){x.unit==="month"?b="year":x.unit==="day"?b="month":x.unit==="hour"?b="day":x.unit==="minute"&&(b="hour")}),f=b===y,i=n[s].position,u=n[s].value):l.config.xaxis.type==="datetime"&&h===void 0&&(u=""),u===void 0&&(u=""),u=Array.isArray(u)?u:u.toString();var k=new Be(this.ctx),C={};C=l.globals.rotateXLabels&&a?k.getTextRects(u,parseInt(r,10),null,"rotate(".concat(l.config.xaxis.labels.rotate," 0 0)"),!1):k.getTextRects(u,parseInt(r,10));var $=!l.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(u)&&(String(u)==="NaN"||o.indexOf(u)>=0&&$)&&(u=""),{x:i,text:u,textRect:C,isBold:f}}},{key:"checkLabelBasedOnTickamount",value:function(e,n,i){var s=this.w,o=s.config.xaxis.tickAmount;return o==="dataPoints"&&(o=Math.round(s.globals.gridWidth/120)),o>i||e%Math.round(i/(o+1))==0||(n.text=""),n}},{key:"checkForOverflowingLabels",value:function(e,n,i,s,o){var r=this.w;if(e===0&&r.globals.skipFirstTimelinelabel&&(n.text=""),e===i-1&&r.globals.skipLastTimelinelabel&&(n.text=""),r.config.xaxis.labels.hideOverlappingLabels&&s.length>0){var a=o[o.length-1];n.x<a.textRect.width/(r.globals.rotateXLabels?Math.abs(r.config.xaxis.labels.rotate)/12:1.01)+a.x&&(n.text="")}return n}},{key:"checkForReversedLabels",value:function(e,n){var i=this.w;return i.config.yaxis[e]&&i.config.yaxis[e].reversed&&n.reverse(),n}},{key:"yAxisAllSeriesCollapsed",value:function(e){var n=this.w.globals;return!n.seriesYAxisMap[e].some(function(i){return n.collapsedSeriesIndices.indexOf(i)===-1})}},{key:"translateYAxisIndex",value:function(e){var n=this.w,i=n.globals,s=n.config.yaxis;return i.series.length>s.length||s.some(function(o){return Array.isArray(o.seriesName)})?e:i.seriesYAxisReverseMap[e]}},{key:"isYAxisHidden",value:function(e){var n=this.w,i=n.config.yaxis[e];if(!i.show||this.yAxisAllSeriesCollapsed(e))return!0;if(!i.showForNullSeries){var s=n.globals.seriesYAxisMap[e],o=new _s(this.ctx);return s.every(function(r){return o.isSeriesNull(r)})}return!1}},{key:"getYAxisForeColor",value:function(e,n){var i=this.w;return Array.isArray(e)&&i.globals.yAxisScale[n]&&this.ctx.theme.pushExtraColors(e,i.globals.yAxisScale[n].result.length,!1),e}},{key:"drawYAxisTicks",value:function(e,n,i,s,o,r,a){var l=this.w,c=new Be(this.ctx),u=l.globals.translateY+l.config.yaxis[o].labels.offsetY;if(l.globals.isBarHorizontal?u=0:l.config.chart.type==="heatmap"&&(u+=r/2),s.show&&n>0){l.config.yaxis[o].opposite===!0&&(e+=s.width);for(var d=n;d>=0;d--){var h=c.drawLine(e+i.offsetX-s.width+s.offsetX,u+s.offsetY,e+i.offsetX+s.offsetX,u+s.offsetY,s.color);a.add(h),u+=r}}}}]),t}(),aCt=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new S2(this.annoCtx),this.axesUtils=new Oc(this.annoCtx)}return ct(t,[{key:"addYaxisAnnotation",value:function(e,n,i){var s,o=this.w,r=e.strokeDashArray,a=this.helpers.getY1Y2("y1",e),l=a.yP,c=a.clipped,u=!0,d=!1,h=e.label.text;if(e.y2===null||e.y2===void 0){if(!c){d=!0;var f=this.annoCtx.graphics.drawLine(0+e.offsetX,l+e.offsetY,this._getYAxisAnnotationWidth(e),l+e.offsetY,e.borderColor,r,e.borderWidth);n.appendChild(f.node),e.id&&f.node.classList.add(e.id)}}else{if(s=(a=this.helpers.getY1Y2("y2",e)).yP,u=a.clipped,s>l){var p=l;l=s,s=p}if(!c||!u){d=!0;var m=this.annoCtx.graphics.drawRect(0+e.offsetX,s+e.offsetY,this._getYAxisAnnotationWidth(e),l-s,0,e.fillColor,e.opacity,1,e.borderColor,r);m.node.classList.add("apexcharts-annotation-rect"),m.attr("clip-path","url(#gridRectMask".concat(o.globals.cuid,")")),n.appendChild(m.node),e.id&&m.node.classList.add(e.id)}}if(d){var y=e.label.position==="right"?o.globals.gridWidth:e.label.position==="center"?o.globals.gridWidth/2:0,b=this.annoCtx.graphics.drawText({x:y+e.label.offsetX,y:(s??l)+e.label.offsetY-3,text:h,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});b.attr({rel:i}),n.appendChild(b.node)}}},{key:"_getYAxisAnnotationWidth",value:function(e){var n=this.w;return n.globals.gridWidth,(e.width.indexOf("%")>-1?n.globals.gridWidth*parseInt(e.width,10)/100:parseInt(e.width,10))+e.offsetX}},{key:"drawYAxisAnnotations",value:function(){var e=this,n=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return n.config.annotations.yaxis.forEach(function(s,o){s.yAxisIndex=e.axesUtils.translateYAxisIndex(s.yAxisIndex),e.axesUtils.isYAxisHidden(s.yAxisIndex)&&e.axesUtils.yAxisAllSeriesCollapsed(s.yAxisIndex)||e.addYaxisAnnotation(s,i.node,o)}),i}}]),t}(),lCt=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new S2(this.annoCtx)}return ct(t,[{key:"addPointAnnotation",value:function(e,n,i){if(!(this.w.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)){var s=this.helpers.getX1X2("x1",e),o=s.x,r=s.clipped,a=(s=this.helpers.getY1Y2("y1",e)).yP,l=s.clipped;if(pe.isNumber(o)&&!l&&!r){var c={pSize:e.marker.size,pointStrokeWidth:e.marker.strokeWidth,pointFillColor:e.marker.fillColor,pointStrokeColor:e.marker.strokeColor,shape:e.marker.shape,pRadius:e.marker.radius,class:"apexcharts-point-annotation-marker ".concat(e.marker.cssClass," ").concat(e.id?e.id:"")},u=this.annoCtx.graphics.drawMarker(o+e.marker.offsetX,a+e.marker.offsetY,c);n.appendChild(u.node);var d=e.label.text?e.label.text:"",h=this.annoCtx.graphics.drawText({x:o+e.label.offsetX,y:a+e.label.offsetY-e.marker.size-parseFloat(e.label.style.fontSize)/1.6,text:d,textAnchor:e.label.textAnchor,fontSize:e.label.style.fontSize,fontFamily:e.label.style.fontFamily,fontWeight:e.label.style.fontWeight,foreColor:e.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(e.label.style.cssClass," ").concat(e.id?e.id:"")});if(h.attr({rel:i}),n.appendChild(h.node),e.customSVG.SVG){var f=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+e.customSVG.cssClass});f.attr({transform:"translate(".concat(o+e.customSVG.offsetX,", ").concat(a+e.customSVG.offsetY,")")}),f.node.innerHTML=e.customSVG.SVG,n.appendChild(f.node)}if(e.image.path){var p=e.image.width?e.image.width:20,m=e.image.height?e.image.height:20;u=this.annoCtx.addImage({x:o+e.image.offsetX-p/2,y:a+e.image.offsetY-m/2,width:p,height:m,path:e.image.path,appendTo:".apexcharts-point-annotations"})}e.mouseEnter&&u.node.addEventListener("mouseenter",e.mouseEnter.bind(this,e)),e.mouseLeave&&u.node.addEventListener("mouseleave",e.mouseLeave.bind(this,e)),e.click&&u.node.addEventListener("click",e.click.bind(this,e))}}}},{key:"drawPointAnnotations",value:function(){var e=this,n=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return n.config.annotations.points.map(function(s,o){e.addPointAnnotation(s,i.node,o)}),i}}]),t}(),EU={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},xu=function(){function t(){lt(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,showDuplicates:!1,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return ct(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"",locales:[EU],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.7},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",categoryFormatter:void 0,valueFormatter:void 0},png:{filename:void 0},svg:{filename:void 0},scale:void 0,width:void 0},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,allowMouseWheelZoom:!0,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{line:{isSlopeChart:!1,colors:{threshold:0,colorAboveThreshold:void 0,colorBelowThreshold:void 0}},area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,borderRadius:4,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0},seriesTitle:{show:!0,offsetY:1,offsetX:1,borderColor:"#000",borderWidth:1,borderRadius:2,style:{background:"rgba(0, 0, 0, 0.6)",color:"#fff",fontSize:"12px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:6,right:6,top:2,bottom:2}}}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(e){return e}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(e){return e+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(n,i){return n+i},0)/e.globals.series.length+"%"}}},barLabels:{enabled:!1,offsetX:0,offsetY:0,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(e){return e},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(e){return e}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(e){return e}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(e){return e.globals.seriesTotals.reduce(function(n,i){return n+i},0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(e){return e!==null?e:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.8}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],clusterGroupedSeries:!0,clusterGroupedSeriesOrientation:"vertical",labels:{colors:void 0,useSeriesColors:!1},markers:{size:7,fillColors:void 0,strokeWidth:1,shape:void 0,offsetX:0,offsetY:0,customHTML:void 0,onClick:void 0},itemMargin:{horizontal:5,vertical:4},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",offsetX:0,offsetY:0,showNullDataPoints:!0,onClick:void 0,onDblClick:void 0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{hover:{filter:{type:"lighten"}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken"}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!1,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(e){return e?e+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.8}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),cCt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.graphics=new Be(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new S2(this),this.xAxisAnnotations=new rCt(this),this.yAxisAnnotations=new aCt(this),this.pointsAnnotations=new lCt(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return ct(t,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts&&e.globals.dataPoints){for(var n=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),s=this.pointsAnnotations.drawPointAnnotations(),o=e.config.chart.animations.enabled,r=[n,i,s],a=[i.node,n.node,s.node],l=0;l<3;l++)e.globals.dom.elGraphical.add(r[l]),!o||e.globals.resized||e.globals.dataChanged||e.config.chart.type!=="scatter"&&e.config.chart.type!=="bubble"&&e.globals.dataPoints>1&&a[l].classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:a[l],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var e=this;this.w.config.annotations.images.map(function(n,i){e.addImage(n,i)})}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map(function(n,i){e.addText(n,i)})}},{key:"addXaxisAnnotation",value:function(e,n,i){this.xAxisAnnotations.addXaxisAnnotation(e,n,i)}},{key:"addYaxisAnnotation",value:function(e,n,i){this.yAxisAnnotations.addYaxisAnnotation(e,n,i)}},{key:"addPointAnnotation",value:function(e,n,i){this.pointsAnnotations.addPointAnnotation(e,n,i)}},{key:"addText",value:function(e,n){var i=e.x,s=e.y,o=e.text,r=e.textAnchor,a=e.foreColor,l=e.fontSize,c=e.fontFamily,u=e.fontWeight,d=e.cssClass,h=e.backgroundColor,f=e.borderWidth,p=e.strokeDashArray,m=e.borderRadius,y=e.borderColor,b=e.appendTo,k=b===void 0?".apexcharts-svg":b,C=e.paddingLeft,$=C===void 0?4:C,x=e.paddingRight,M=x===void 0?4:x,P=e.paddingBottom,T=P===void 0?2:P,I=e.paddingTop,L=I===void 0?2:I,R=this.w,V=this.graphics.drawText({x:i,y:s,text:o,textAnchor:r||"start",fontSize:l||"12px",fontWeight:u||"regular",fontFamily:c||R.config.chart.fontFamily,foreColor:a||R.config.chart.foreColor,cssClass:d}),H=R.globals.dom.baseEl.querySelector(k);H&&H.appendChild(V.node);var F=V.bbox();if(o){var z=this.graphics.drawRect(F.x-$,F.y-L,F.width+$+M,F.height+T+L,m,h||"transparent",1,f,y,p);H.insertBefore(z.node,V.node)}}},{key:"addImage",value:function(e,n){var i=this.w,s=e.path,o=e.x,r=o===void 0?0:o,a=e.y,l=a===void 0?0:a,c=e.width,u=c===void 0?20:c,d=e.height,h=d===void 0?20:d,f=e.appendTo,p=f===void 0?".apexcharts-svg":f,m=i.globals.dom.Paper.image(s);m.size(u,h).move(r,l);var y=i.globals.dom.baseEl.querySelector(p);return y&&y.appendChild(m.node),m}},{key:"addXaxisAnnotationExternal",value:function(e,n,i){return this.addAnnotationExternal({params:e,pushToMemory:n,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(e,n,i){return this.addAnnotationExternal({params:e,pushToMemory:n,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(e,n,i){return this.invertAxis===void 0&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:n,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(e){var n=e.params,i=e.pushToMemory,s=e.context,o=e.type,r=e.contextMethod,a=s,l=a.w,c=l.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations")),u=c.childNodes.length+1,d=new xu,h=Object.assign({},o==="xaxis"?d.xAxisAnnotation:o==="yaxis"?d.yAxisAnnotation:d.pointAnnotation),f=pe.extend(h,n);switch(o){case"xaxis":this.addXaxisAnnotation(f,c,u);break;case"yaxis":this.addYaxisAnnotation(f,c,u);break;case"point":this.addPointAnnotation(f,c,u)}var p=l.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations .apexcharts-").concat(o,"-annotation-label[rel='").concat(u,"']")),m=this.helpers.addBackgroundToAnno(p,f);return m&&c.insertBefore(m.node,p),i&&l.globals.memory.methodsToExec.push({context:a,id:f.id?f.id:pe.randomId(),method:r,label:"addAnnotation",params:n}),s}},{key:"clearAnnotations",value:function(e){for(var n=e.w,i=n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),s=n.globals.memory.methodsToExec.length-1;s>=0;s--)n.globals.memory.methodsToExec[s].label!=="addText"&&n.globals.memory.methodsToExec[s].label!=="addAnnotation"||n.globals.memory.methodsToExec.splice(s,1);i=pe.listToArray(i),Array.prototype.forEach.call(i,function(o){for(;o.firstChild;)o.removeChild(o.firstChild)})}},{key:"removeAnnotation",value:function(e,n){var i=e.w,s=i.globals.dom.baseEl.querySelectorAll(".".concat(n));s&&(i.globals.memory.methodsToExec.map(function(o,r){o.id===n&&i.globals.memory.methodsToExec.splice(r,1)}),Array.prototype.forEach.call(s,function(o){o.parentElement.removeChild(o)}))}}]),t}(),$3=function(t){var e,n=t.isTimeline,i=t.ctx,s=t.seriesIndex,o=t.dataPointIndex,r=t.y1,a=t.y2,l=t.w,c=l.globals.seriesRangeStart[s][o],u=l.globals.seriesRangeEnd[s][o],d=l.globals.labels[o],h=l.config.series[s].name?l.config.series[s].name:"",f=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,m={w:l,seriesIndex:s,dataPointIndex:o,start:c,end:u};typeof p=="function"&&(h=p(h,m)),(e=l.config.series[s].data[o])!==null&&e!==void 0&&e.x&&(d=l.config.series[s].data[o].x),n||l.config.xaxis.type==="datetime"&&(d=new sv(i).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new si(i).formatDate,w:l})),typeof f=="function"&&(d=f(d,m)),Number.isFinite(r)&&Number.isFinite(a)&&(c=r,u=a);var y="",b="",k=l.globals.colors[s];if(l.config.tooltip.x.formatter===void 0)if(l.config.xaxis.type==="datetime"){var C=new si(i);y=C.formatDate(C.getDate(c),l.config.tooltip.x.format),b=C.formatDate(C.getDate(u),l.config.tooltip.x.format)}else y=c,b=u;else y=l.config.tooltip.x.formatter(c),b=l.config.tooltip.x.formatter(u);return{start:c,end:u,startVal:y,endVal:b,ylabel:d,color:k,seriesName:h}},A3=function(t){var e=t.color,n=t.seriesName,i=t.ylabel,s=t.start,o=t.end,r=t.seriesIndex,a=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(r);s=l.yLbFormatter(s),o=l.yLbFormatter(o);var c=l.yLbFormatter(t.w.globals.series[r][a]),u=`<span class="value start-value">
  `.concat(s,`
  </span> <span class="separator">-</span> <span class="value end-value">
  `).concat(o,`
  </span>`);return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(n||"")+'</span></div><div> <span class="category">'+i+": </span> "+(t.w.globals.comboCharts?t.w.config.series[r].type==="rangeArea"||t.w.config.series[r].type==="rangeBar"?u:"<span>".concat(c,"</span>"):u)+" </div></div>"},n1=function(){function t(e){lt(this,t),this.opts=e}return ct(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(e){return this.hideYAxis(),pe.extend(e,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"slope",value:function(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter:function(e,n){var i=n.w.config.series[n.seriesIndex].name;return e!==null?i+": "+e:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}},{key:"bar",value:function(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"square"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),Je(Je({},this.bar()),{},{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var e=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(n){var i=n.seriesIndex,s=n.dataPointIndex,o=n.w;return e._getBoxTooltip(o,i,s,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var e=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(n){var i=n.seriesIndex,s=n.dataPointIndex,o=n.w;return e._getBoxTooltip(o,i,s,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(e,n){n.ctx;var i=n.seriesIndex,s=n.dataPointIndex,o=n.w,r=function(){var a=o.globals.seriesRangeStart[i][s];return o.globals.seriesRangeEnd[i][s]-a};return o.globals.comboCharts?o.config.series[i].type==="rangeBar"||o.config.series[i].type==="rangeArea"?r():e:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(e){return e.w.config.plotOptions&&e.w.config.plotOptions.bar&&e.w.config.plotOptions.bar.horizontal?function(n){var i=$3(Je(Je({},n),{},{isTimeline:!0})),s=i.color,o=i.seriesName,r=i.ylabel,a=i.startVal,l=i.endVal;return A3(Je(Je({},n),{},{color:s,seriesName:o,ylabel:r,start:a,end:l}))}(e):function(n){var i=$3(n),s=i.color,o=i.seriesName,r=i.ylabel,a=i.start,l=i.end;return A3(Je(Je({},n),{},{color:s,seriesName:o,ylabel:r,start:a,end:l}))}(e)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(e){var n,i;return(n=e.plotOptions.bar)!==null&&n!==void 0&&n.barHeight||(e.plotOptions.bar.barHeight=2),(i=e.plotOptions.bar)!==null&&i!==void 0&&i.columnWidth||(e.plotOptions.bar.columnWidth=2),e}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(e){return function(n){var i=$3(n),s=i.color,o=i.seriesName,r=i.ylabel,a=i.start,l=i.end;return A3(Je(Je({},n),{},{color:s,seriesName:o,ylabel:r,start:a,end:l}))}(e)}}}}},{key:"brush",value:function(e){return pe.extend(e,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(e){e.dataLabels=e.dataLabels||{},e.dataLabels.formatter=e.dataLabels.formatter||void 0;var n=e.dataLabels.formatter;return e.yaxis.forEach(function(i,s){e.yaxis[s].min=0,e.yaxis[s].max=100}),e.chart.type==="bar"&&(e.dataLabels.formatter=n||function(i){return typeof i=="number"&&i?i.toFixed(0)+"%":i}),e}},{key:"stackedBars",value:function(){var e=this.bar();return Je(Je({},e),{},{plotOptions:Je(Je({},e.plotOptions),{},{bar:Je(Je({},e.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(e){return e.xaxis.convertedCatToNumeric=!0,e}},{key:"convertCatToNumericXaxis",value:function(e,n,i){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(r){return pe.isNumber(r)?Math.floor(r):r};var s=e.xaxis.labels.formatter,o=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return i&&i.length&&(o=i.map(function(r){return Array.isArray(r)?r:String(r)})),o&&o.length&&(e.xaxis.labels.formatter=function(r){return pe.isNumber(r)?s(o[Math.floor(r)-1]):s(r)}),e.xaxis.categories=[],e.labels=[],e.xaxis.tickAmount=e.xaxis.tickAmount||"dataPoints",e}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"polarArea",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(e){return e.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:function(e){return e},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}},{key:"_getBoxTooltip",value:function(e,n,i,s,o){var r=e.globals.seriesCandleO[n][i],a=e.globals.seriesCandleH[n][i],l=e.globals.seriesCandleM[n][i],c=e.globals.seriesCandleL[n][i],u=e.globals.seriesCandleC[n][i];return e.config.series[n].type&&e.config.series[n].type!==o?`<div class="apexcharts-custom-tooltip">
          `.concat(e.config.series[n].name?e.config.series[n].name:"series-"+(n+1),": <strong>").concat(e.globals.series[n][i],`</strong>
        </div>`):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(e.config.chart.type,'">')+"<div>".concat(s[0],': <span class="value">')+r+"</span></div>"+"<div>".concat(s[1],': <span class="value">')+a+"</span></div>"+(l?"<div>".concat(s[2],': <span class="value">')+l+"</span></div>":"")+"<div>".concat(s[3],': <span class="value">')+c+"</span></div>"+"<div>".concat(s[4],': <span class="value">')+u+"</span></div></div>"}}]),t}(),s1=function(){function t(e){lt(this,t),this.opts=e}return ct(t,[{key:"init",value:function(e){var n=e.responsiveOverride,i=this.opts,s=new xu,o=new n1(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=s.init(),a={};if(i&&Uf(i)==="object"){var l,c,u,d,h,f,p,m,y,b,k={};k=["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)!==-1?o[i.chart.type]():o.line(),(l=i.plotOptions)!==null&&l!==void 0&&(c=l.bar)!==null&&c!==void 0&&c.isFunnel&&(k=o.funnel()),i.chart.stacked&&i.chart.type==="bar"&&(k=o.stackedBars()),(u=i.chart.brush)!==null&&u!==void 0&&u.enabled&&(k=o.brush(k)),(d=i.plotOptions)!==null&&d!==void 0&&(h=d.line)!==null&&h!==void 0&&h.isSlopeChart&&(k=o.slope()),i.chart.stacked&&i.chart.stackType==="100%"&&(i=o.stacked100(i)),(f=i.plotOptions)!==null&&f!==void 0&&(p=f.bar)!==null&&p!==void 0&&p.isDumbbell&&(i=o.dumbbell(i)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},n||(i.xaxis.convertedCatToNumeric=!1),((m=(i=this.checkForCatToNumericXAxis(this.chartType,k,i)).chart.sparkline)!==null&&m!==void 0&&m.enabled||(y=window.Apex.chart)!==null&&y!==void 0&&(b=y.sparkline)!==null&&b!==void 0&&b.enabled)&&(k=o.sparkline(k)),a=pe.extend(r,k)}var C=pe.extend(a,window.Apex);return r=pe.extend(C,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(e,n,i){var s,o,r=new n1(i),a=(e==="bar"||e==="boxPlot")&&((s=i.plotOptions)===null||s===void 0||(o=s.bar)===null||o===void 0?void 0:o.horizontal),l=e==="pie"||e==="polarArea"||e==="donut"||e==="radar"||e==="radialBar"||e==="heatmap",c=i.xaxis.type!=="datetime"&&i.xaxis.type!=="numeric",u=i.xaxis.tickPlacement?i.xaxis.tickPlacement:n.xaxis&&n.xaxis.tickPlacement;return a||l||!c||u==="between"||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(e,n){var i=new xu;(e.yaxis===void 0||!e.yaxis||Array.isArray(e.yaxis)&&e.yaxis.length===0)&&(e.yaxis={}),e.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(e.yaxis=pe.extend(e.yaxis,window.Apex.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[pe.extend(i.yAxis,e.yaxis)]:e.yaxis=pe.extendArray(e.yaxis,i.yAxis);var s=!1;e.yaxis.forEach(function(r){r.logarithmic&&(s=!0)});var o=e.series;return n&&!o&&(o=n.config.series),s&&o.length!==e.yaxis.length&&o.length&&(e.yaxis=o.map(function(r,a){if(r.name||(o[a].name="series-".concat(a+1)),e.yaxis[a])return e.yaxis[a].seriesName=o[a].name,e.yaxis[a];var l=pe.extend(i.yAxis,e.yaxis[0]);return l.show=!1,l})),s&&o.length>1&&o.length!==e.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),e}},{key:"extendAnnotations",value:function(e){return e.annotations===void 0&&(e.annotations={},e.annotations.yaxis=[],e.annotations.xaxis=[],e.annotations.points=[]),e=this.extendYAxisAnnotations(e),e=this.extendXAxisAnnotations(e),e=this.extendPointAnnotations(e)}},{key:"extendYAxisAnnotations",value:function(e){var n=new xu;return e.annotations.yaxis=pe.extendArray(e.annotations.yaxis!==void 0?e.annotations.yaxis:[],n.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var n=new xu;return e.annotations.xaxis=pe.extendArray(e.annotations.xaxis!==void 0?e.annotations.xaxis:[],n.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var n=new xu;return e.annotations.points=pe.extendArray(e.annotations.points!==void 0?e.annotations.points:[],n.pointAnnotation),e}},{key:"checkForDarkTheme",value:function(e){e.theme&&e.theme.mode==="dark"&&(e.tooltip||(e.tooltip={}),e.tooltip.theme!=="light"&&(e.tooltip.theme="dark"),e.chart.foreColor||(e.chart.foreColor="#f6f7f8"),e.theme.palette||(e.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(e){var n=e;if(n.tooltip.shared&&n.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if(n.chart.type==="bar"&&n.plotOptions.bar.horizontal){if(n.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");n.yaxis[0].reversed&&(n.yaxis[0].opposite=!0),n.xaxis.tooltip.enabled=!1,n.yaxis[0].tooltip.enabled=!1,n.chart.zoom.enabled=!1}return n.chart.type!=="bar"&&n.chart.type!=="rangeBar"||n.tooltip.shared&&n.xaxis.crosshairs.width==="barWidth"&&n.series.length>1&&(n.xaxis.crosshairs.width="tickWidth"),n.chart.type!=="candlestick"&&n.chart.type!=="boxPlot"||n.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(n.chart.type," chart is not supported.")),n.yaxis[0].reversed=!1),n}}]),t}(),MU=function(){function t(){lt(this,t)}return ct(t,[{key:"initGlobalVars",value:function(e){e.series=[],e.seriesCandleO=[],e.seriesCandleH=[],e.seriesCandleM=[],e.seriesCandleL=[],e.seriesCandleC=[],e.seriesRangeStart=[],e.seriesRangeEnd=[],e.seriesRange=[],e.seriesPercent=[],e.seriesGoals=[],e.seriesX=[],e.seriesZ=[],e.seriesNames=[],e.seriesTotals=[],e.seriesLog=[],e.seriesColors=[],e.stackedSeriesTotals=[],e.seriesXvalues=[],e.seriesYvalues=[],e.labels=[],e.hasXaxisGroups=!1,e.groups=[],e.barGroups=[],e.lineGroups=[],e.areaGroups=[],e.hasSeriesGroups=!1,e.seriesGroups=[],e.categoryLabels=[],e.timescaleLabels=[],e.noLabelsProvided=!1,e.resizeTimer=null,e.selectionResizeTimer=null,e.lastWheelExecution=0,e.delayedElements=[],e.pointsArray=[],e.dataLabelsRects=[],e.isXNumeric=!1,e.skipLastTimelinelabel=!1,e.skipFirstTimelinelabel=!1,e.isDataXYZ=!1,e.isMultiLineX=!1,e.isMultipleYAxis=!1,e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE,e.minYArr=[],e.maxYArr=[],e.maxX=-Number.MAX_VALUE,e.minX=Number.MAX_VALUE,e.initialMaxX=-Number.MAX_VALUE,e.initialMinX=Number.MAX_VALUE,e.maxDate=0,e.minDate=Number.MAX_VALUE,e.minZ=Number.MAX_VALUE,e.maxZ=-Number.MAX_VALUE,e.minXDiff=Number.MAX_VALUE,e.yAxisScale=[],e.xAxisScale=null,e.xAxisTicksPositions=[],e.yLabelsCoords=[],e.yTitleCoords=[],e.barPadForNumericAxis=0,e.padHorizontal=0,e.xRange=0,e.yRange=[],e.zRange=0,e.dataPoints=0,e.xTickAmount=0,e.multiAxisTickAmount=0}},{key:"globalVars",value:function(e){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:e.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],invalidLogScale:!1,ignoreYAxisIndexes:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:e.chart.toolbar.autoSelected==="zoom"&&e.chart.toolbar.tools.zoom&&e.chart.zoom.enabled,panEnabled:e.chart.toolbar.autoSelected==="pan"&&e.chart.toolbar.tools.pan,selectionEnabled:e.chart.toolbar.autoSelected==="selection"&&e.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,isSlopeChart:e.plotOptions.line.isSlopeChart,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null,niceScaleAllowedMagMsd:[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],niceScaleDefaultTicks:[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],seriesYAxisMap:[],seriesYAxisReverseMap:[]}}},{key:"init",value:function(e){var n=this.globalVars(e);return this.initGlobalVars(n),n.initialConfig=pe.extend({},e),n.initialSeries=pe.clone(e.series),n.lastXAxis=pe.clone(n.initialConfig.xaxis),n.lastYAxis=pe.clone(n.initialConfig.yaxis),n}}]),t}(),uCt=function(){function t(e){lt(this,t),this.opts=e}return ct(t,[{key:"init",value:function(){var e=new s1(this.opts).init({responsiveOverride:!1});return{config:e,globals:new MU().init(e)}}}]),t}(),Dr=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return ct(t,[{key:"clippedImgArea",value:function(e){var n=this.w,i=n.config,s=parseInt(n.globals.gridWidth,10),o=parseInt(n.globals.gridHeight,10),r=s>o?s:o,a=e.image,l=0,c=0;e.width===void 0&&e.height===void 0?i.fill.image.width!==void 0&&i.fill.image.height!==void 0?(l=i.fill.image.width+1,c=i.fill.image.height):(l=r+1,c=r):(l=e.width,c=e.height);var u=document.createElementNS(n.globals.SVGNS,"pattern");Be.setAttrs(u,{id:e.patternID,patternUnits:e.patternUnits?e.patternUnits:"userSpaceOnUse",width:l+"px",height:c+"px"});var d=document.createElementNS(n.globals.SVGNS,"image");u.appendChild(d),d.setAttributeNS(window.SVG.xlink,"href",a),Be.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:l+"px",height:c+"px"}),d.style.opacity=e.opacity,n.globals.dom.elDefs.node.appendChild(u)}},{key:"getSeriesIndex",value:function(e){var n=this.w,i=n.config.chart.type;return(i==="bar"||i==="rangeBar")&&n.config.plotOptions.bar.distributed||i==="heatmap"||i==="treemap"?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%n.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(e,n){var i,s=this.w,o=null,r=null,a=pm(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;l>=n.threshold?(o===null||l>o)&&(o=l):(r===null||l<r)&&(r=l)}}catch(d){a.e(d)}finally{a.f()}o===null&&(o=n.threshold),r===null&&(r=n.threshold);var c=o-n.threshold+(n.threshold-r);c===0&&(c=1);var u=100-(n.threshold-r)/c*100;return[{offset:u=Math.max(0,Math.min(u,100)),color:n.colorAboveThreshold,opacity:s.config.fill.opacity},{offset:0,color:n.colorBelowThreshold,opacity:s.config.fill.opacity}]}},{key:"fillPath",value:function(e){var n,i,s,o=this.w;this.opts=e;var r,a,l,c=this.w.config;this.seriesIndex=this.getSeriesIndex(e);var u=c.plotOptions.line.colors.colorAboveThreshold&&c.plotOptions.line.colors.colorBelowThreshold,d=this.getFillColors()[this.seriesIndex];o.globals.seriesColors[this.seriesIndex]!==void 0&&(d=o.globals.seriesColors[this.seriesIndex]),typeof d=="function"&&(d=d({seriesIndex:this.seriesIndex,dataPointIndex:e.dataPointIndex,value:e.value,w:o}));var h,f,p,m=e.fillType?e.fillType:this.getFillType(this.seriesIndex),y=Array.isArray(c.fill.opacity)?c.fill.opacity[this.seriesIndex]:c.fill.opacity,b=m==="gradient"||u;e.color&&(d=e.color),(n=o.config.series[this.seriesIndex])!==null&&n!==void 0&&(i=n.data)!==null&&i!==void 0&&(s=i[e.dataPointIndex])!==null&&s!==void 0&&s.fillColor&&(d=(h=o.config.series[this.seriesIndex])===null||h===void 0||(f=h.data)===null||f===void 0||(p=f[e.dataPointIndex])===null||p===void 0?void 0:p.fillColor),d||(d="#fff",console.warn("undefined color - ApexCharts"));var k=d;if(d.indexOf("rgb")===-1?d.indexOf("#")===-1?k=d:d.length<9&&(k=pe.hexToRgba(d,y)):d.indexOf("rgba")>-1?y=pe.getOpacityFromRGBA(d):k=pe.hexToRgba(pe.rgb2hex(d),y),e.opacity&&(y=e.opacity),m==="pattern"&&(a=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:a,fillColor:d,fillOpacity:y,defaultColor:k})),b){var C=Ns(c.fill.gradient.colorStops)||[],$=c.fill.gradient.type;u&&(C[this.seriesIndex]=this.computeColorStops(o.globals.series[this.seriesIndex],c.plotOptions.line.colors),$="vertical"),l=this.handleGradientFill({type:$,fillConfig:e.fillConfig,fillColor:d,fillOpacity:y,colorStops:C,i:this.seriesIndex})}if(m==="image"){var x=c.fill.image.src,M=e.patternID?e.patternID:"",P="pattern".concat(o.globals.cuid).concat(e.seriesNumber+1).concat(M);this.patternIDs.indexOf(P)===-1&&(this.clippedImgArea({opacity:y,image:Array.isArray(x)?e.seriesNumber<x.length?x[e.seriesNumber]:x[0]:x,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:P}),this.patternIDs.push(P)),r="url(#".concat(P,")")}else r=b?l:m==="pattern"?a:k;return e.solid&&(r=k),r}},{key:"getFillType",value:function(e){var n=this.w;return Array.isArray(n.config.fill.type)?n.config.fill.type[e]:n.config.fill.type}},{key:"getFillColors",value:function(){var e=this.w,n=e.config,i=this.opts,s=[];return e.globals.comboCharts?e.config.series[this.seriesIndex].type==="line"?Array.isArray(e.globals.stroke.colors)?s=e.globals.stroke.colors:s.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?s=e.globals.fill.colors:s.push(e.globals.fill.colors):n.chart.type==="line"?Array.isArray(e.globals.stroke.colors)?s=e.globals.stroke.colors:s.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?s=e.globals.fill.colors:s.push(e.globals.fill.colors),i.fillColors!==void 0&&(s=[],Array.isArray(i.fillColors)?s=i.fillColors.slice():s.push(i.fillColors)),s}},{key:"handlePatternFill",value:function(e){var n=e.fillConfig,i=e.patternFill,s=e.fillColor,o=e.fillOpacity,r=e.defaultColor,a=this.w.config.fill;n&&(a=n);var l=this.opts,c=new Be(this.ctx),u=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,d=s;return Array.isArray(a.pattern.style)?i=a.pattern.style[l.seriesNumber]!==void 0?c.drawPattern(a.pattern.style[l.seriesNumber],a.pattern.width,a.pattern.height,d,u,o):r:i=c.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,d,u,o),i}},{key:"handleGradientFill",value:function(e){var n=e.type,i=e.fillColor,s=e.fillOpacity,o=e.fillConfig,r=e.colorStops,a=e.i,l=this.w.config.fill;o&&(l=Je(Je({},l),o));var c=this.opts,u=new Be(this.ctx),d=new pe;n=n||l.gradient.type;var h,f=i,p=l.gradient.opacityFrom===void 0?s:Array.isArray(l.gradient.opacityFrom)?l.gradient.opacityFrom[a]:l.gradient.opacityFrom;f.indexOf("rgba")>-1&&(p=pe.getOpacityFromRGBA(f));var m=l.gradient.opacityTo===void 0?s:Array.isArray(l.gradient.opacityTo)?l.gradient.opacityTo[a]:l.gradient.opacityTo;if(l.gradient.gradientToColors===void 0||l.gradient.gradientToColors.length===0)h=l.gradient.shade==="dark"?d.shadeColor(-1*parseFloat(l.gradient.shadeIntensity),i.indexOf("rgb")>-1?pe.rgb2hex(i):i):d.shadeColor(parseFloat(l.gradient.shadeIntensity),i.indexOf("rgb")>-1?pe.rgb2hex(i):i);else if(l.gradient.gradientToColors[c.seriesNumber]){var y=l.gradient.gradientToColors[c.seriesNumber];h=y,y.indexOf("rgba")>-1&&(m=pe.getOpacityFromRGBA(y))}else h=i;if(l.gradient.gradientFrom&&(f=l.gradient.gradientFrom),l.gradient.gradientTo&&(h=l.gradient.gradientTo),l.gradient.inverseColors){var b=f;f=h,h=b}return f.indexOf("rgb")>-1&&(f=pe.rgb2hex(f)),h.indexOf("rgb")>-1&&(h=pe.rgb2hex(h)),u.drawGradient(n,f,h,p,m,c.size,l.gradient.stops,r,a)}}]),t}(),Sp=function(){function t(e,n){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"setGlobalMarkerSize",value:function(){var e=this.w;if(e.globals.markers.size=Array.isArray(e.config.markers.size)?e.config.markers.size:[e.config.markers.size],e.globals.markers.size.length>0){if(e.globals.markers.size.length<e.globals.series.length+1)for(var n=0;n<=e.globals.series.length;n++)e.globals.markers.size[n]===void 0&&e.globals.markers.size.push(e.globals.markers.size[0])}else e.globals.markers.size=e.config.series.map(function(i){return e.config.markers.size})}},{key:"plotChartMarkers",value:function(e){var n=e.pointsPos,i=e.seriesIndex,s=e.j,o=e.pSize,r=e.alwaysDrawMarker,a=r!==void 0&&r,l=e.isVirtualPoint,c=l!==void 0&&l,u=this.w,d=i,h=n,f=null,p=new Be(this.ctx),m=u.config.markers.discrete&&u.config.markers.discrete.length;if(Array.isArray(h.x))for(var y=0;y<h.x.length;y++){var b=void 0,k=s,C=!pe.isNumber(h.y[y]);u.globals.markers.largestSize===0&&u.globals.hasNullValues&&u.globals.series[d][s+1]!==null&&!c&&(C=!0),s===1&&y===0&&(k=0),s===1&&y===1&&(k=1);var $="apexcharts-marker";if(u.config.chart.type!=="line"&&u.config.chart.type!=="area"||u.globals.comboCharts||u.config.tooltip.intersect||($+=" no-pointer-events"),(Array.isArray(u.config.markers.size)?u.globals.markers.size[i]>0:u.config.markers.size>0)||a||m){C||($+=" w".concat(pe.randomId()));var x=this.getMarkerConfig({cssClass:$,seriesIndex:i,dataPointIndex:k});u.config.series[d].data[k]&&(u.config.series[d].data[k].fillColor&&(x.pointFillColor=u.config.series[d].data[k].fillColor),u.config.series[d].data[k].strokeColor&&(x.pointStrokeColor=u.config.series[d].data[k].strokeColor)),o!==void 0&&(x.pSize=o),(h.x[y]<-u.globals.markers.largestSize||h.x[y]>u.globals.gridWidth+u.globals.markers.largestSize||h.y[y]<-u.globals.markers.largestSize||h.y[y]>u.globals.gridHeight+u.globals.markers.largestSize)&&(x.pSize=0),!C&&((u.globals.markers.size[i]>0||a||m)&&!f&&(f=p.group({class:a||m?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(u.globals.cuid,")")),(b=p.drawMarker(h.x[y],h.y[y],x)).attr("rel",k),b.attr("j",k),b.attr("index",i),b.node.setAttribute("default-marker-size",x.pSize),new ri(this.ctx).setSelectionFilter(b,i,k),this.addEvents(b),f&&f.add(b))}else u.globals.pointsArray[i]===void 0&&(u.globals.pointsArray[i]=[]),u.globals.pointsArray[i].push([h.x[y],h.y[y]])}return f}},{key:"getMarkerConfig",value:function(e){var n=e.cssClass,i=e.seriesIndex,s=e.dataPointIndex,o=s===void 0?null:s,r=e.radius,a=r===void 0?null:r,l=e.size,c=l===void 0?null:l,u=e.strokeWidth,d=u===void 0?null:u,h=this.w,f=this.getMarkerStyle(i),p=c===null?h.globals.markers.size[i]:c,m=h.config.markers;return o!==null&&m.discrete.length&&m.discrete.map(function(y){y.seriesIndex===i&&y.dataPointIndex===o&&(f.pointStrokeColor=y.strokeColor,f.pointFillColor=y.fillColor,p=y.size,f.pointShape=y.shape)}),{pSize:a===null?p:a,pRadius:a!==null?a:m.radius,pointStrokeWidth:d!==null?d:Array.isArray(m.strokeWidth)?m.strokeWidth[i]:m.strokeWidth,pointStrokeColor:f.pointStrokeColor,pointFillColor:f.pointFillColor,shape:f.pointShape||(Array.isArray(m.shape)?m.shape[i]:m.shape),class:n,pointStrokeOpacity:Array.isArray(m.strokeOpacity)?m.strokeOpacity[i]:m.strokeOpacity,pointStrokeDashArray:Array.isArray(m.strokeDashArray)?m.strokeDashArray[i]:m.strokeDashArray,pointFillOpacity:Array.isArray(m.fillOpacity)?m.fillOpacity[i]:m.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(e){var n=this.w,i=new Be(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,e)),e.node.addEventListener("click",n.config.markers.onClick),e.node.addEventListener("dblclick",n.config.markers.onDblClick),e.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var n=this.w,i=n.globals.markers.colors,s=n.config.markers.strokeColor||n.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(s)?s[e]:s,pointFillColor:Array.isArray(i)?i[e]:i}}}]),t}(),TU=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return ct(t,[{key:"draw",value:function(e,n,i){var s=this.w,o=new Be(this.ctx),r=i.realIndex,a=i.pointsPos,l=i.zRatio,c=i.elParent,u=o.group({class:"apexcharts-series-markers apexcharts-series-".concat(s.config.chart.type)});if(u.attr("clip-path","url(#gridRectMarkerMask".concat(s.globals.cuid,")")),Array.isArray(a.x))for(var d=0;d<a.x.length;d++){var h=n+1,f=!0;n===0&&d===0&&(h=0),n===0&&d===1&&(h=1);var p=s.globals.markers.size[r];if(l!==1/0){var m=s.config.plotOptions.bubble;p=s.globals.seriesZ[r][h],m.zScaling&&(p/=l),m.minBubbleRadius&&p<m.minBubbleRadius&&(p=m.minBubbleRadius),m.maxBubbleRadius&&p>m.maxBubbleRadius&&(p=m.maxBubbleRadius)}var y=a.x[d],b=a.y[d];if(p=p||0,b!==null&&s.globals.series[r][h]!==void 0||(f=!1),f){var k=this.drawPoint(y,b,p,r,h,n);u.add(k)}c.add(u)}}},{key:"drawPoint",value:function(e,n,i,s,o,r){var a=this.w,l=s,c=new wp(this.ctx),u=new ri(this.ctx),d=new Dr(this.ctx),h=new Sp(this.ctx),f=new Be(this.ctx),p=h.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:o,radius:a.config.chart.type==="bubble"||a.globals.comboCharts&&a.config.series[s]&&a.config.series[s].type==="bubble"?i:null}),m=d.fillPath({seriesNumber:s,dataPointIndex:o,color:p.pointFillColor,patternUnits:"objectBoundingBox",value:a.globals.series[s][r]}),y=f.drawMarker(e,n,p);if(a.config.series[l].data[o]&&a.config.series[l].data[o].fillColor&&(m=a.config.series[l].data[o].fillColor),y.attr({fill:m}),a.config.chart.dropShadow.enabled){var b=a.config.chart.dropShadow;u.dropShadow(y,b,s)}if(!this.initialAnim||a.globals.dataChanged||a.globals.resized)a.globals.animationEnded=!0;else{var k=a.config.chart.animations.speed;c.animateMarker(y,k,a.globals.easing,function(){window.setTimeout(function(){c.animationCompleted(y)},100)})}return y.attr({rel:o,j:o,index:s,"default-marker-size":p.pSize}),u.setSelectionFilter(y,s,o),h.addEvents(y),y.node.classList.add("apexcharts-marker"),y}},{key:"centerTextInBubble",value:function(e){var n=this.w;return{y:e+=parseInt(n.config.dataLabels.style.fontSize,10)/4}}}]),t}(),jf=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"dataLabelsCorrection",value:function(e,n,i,s,o,r,a){var l=this.w,c=!1,u=new Be(this.ctx).getTextRects(i,a),d=u.width,h=u.height;n<0&&(n=0),n>l.globals.gridHeight+h&&(n=l.globals.gridHeight+h/2),l.globals.dataLabelsRects[s]===void 0&&(l.globals.dataLabelsRects[s]=[]),l.globals.dataLabelsRects[s].push({x:e,y:n,width:d,height:h});var f=l.globals.dataLabelsRects[s].length-2,p=l.globals.lastDrawnDataLabelsIndexes[s]!==void 0?l.globals.lastDrawnDataLabelsIndexes[s][l.globals.lastDrawnDataLabelsIndexes[s].length-1]:0;if(l.globals.dataLabelsRects[s][f]!==void 0){var m=l.globals.dataLabelsRects[s][p];(e>m.x+m.width||n>m.y+m.height||n+h<m.y||e+d<m.x)&&(c=!0)}return(o===0||r)&&(c=!0),{x:e,y:n,textRects:u,drawnextLabel:c}}},{key:"drawDataLabel",value:function(e){var n=this,i=e.type,s=e.pos,o=e.i,r=e.j,a=e.isRangeStart,l=e.strokeWidth,c=l===void 0?2:l,u=this.w,d=new Be(this.ctx),h=u.config.dataLabels,f=0,p=0,m=r,y=null;if(u.globals.collapsedSeriesIndices.indexOf(o)!==-1||!h.enabled||!Array.isArray(s.x))return y;y=d.group({class:"apexcharts-data-labels"});for(var b=0;b<s.x.length;b++)if(f=s.x[b]+h.offsetX,p=s.y[b]+h.offsetY+c,!isNaN(f)){r===1&&b===0&&(m=0),r===1&&b===1&&(m=1);var k=u.globals.series[o][m];i==="rangeArea"&&(k=a?u.globals.seriesRangeStart[o][m]:u.globals.seriesRangeEnd[o][m]);var C="",$=function(M){return u.config.dataLabels.formatter(M,{ctx:n.ctx,seriesIndex:o,dataPointIndex:m,w:u})};u.config.chart.type==="bubble"?(C=$(k=u.globals.seriesZ[o][m]),p=s.y[b],p=new TU(this.ctx).centerTextInBubble(p,o,m).y):k!==void 0&&(C=$(k));var x=u.config.dataLabels.textAnchor;u.globals.isSlopeChart&&(x=m===0?"end":m===u.config.series[o].data.length-1?"start":"middle"),this.plotDataLabelsText({x:f,y:p,text:C,i:o,j:m,parent:y,offsetCorrection:!0,dataLabelsConfig:u.config.dataLabels,textAnchor:x})}return y}},{key:"plotDataLabelsText",value:function(e){var n=this.w,i=new Be(this.ctx),s=e.x,o=e.y,r=e.i,a=e.j,l=e.text,c=e.textAnchor,u=e.fontSize,d=e.parent,h=e.dataLabelsConfig,f=e.color,p=e.alwaysDrawDataLabel,m=e.offsetCorrection,y=e.className,b=null;if(Array.isArray(n.config.dataLabels.enabledOnSeries)&&n.config.dataLabels.enabledOnSeries.indexOf(r)<0)return b;var k={x:s,y:o,drawnextLabel:!0,textRects:null};m&&(k=this.dataLabelsCorrection(s,o,l,r,a,p,parseInt(h.style.fontSize,10))),n.globals.zoomed||(s=k.x,o=k.y),k.textRects&&(s<-20-k.textRects.width||s>n.globals.gridWidth+k.textRects.width+30)&&(l="");var C=n.globals.dataLabels.style.colors[r];((n.config.chart.type==="bar"||n.config.chart.type==="rangeBar")&&n.config.plotOptions.bar.distributed||n.config.dataLabels.distributed)&&(C=n.globals.dataLabels.style.colors[a]),typeof C=="function"&&(C=C({series:n.globals.series,seriesIndex:r,dataPointIndex:a,w:n})),f&&(C=f);var $=h.offsetX,x=h.offsetY;if(n.config.chart.type!=="bar"&&n.config.chart.type!=="rangeBar"||($=0,x=0),n.globals.isSlopeChart&&(a!==0&&($=-2*h.offsetX+5),a!==0&&a!==n.config.series[r].data.length-1&&($=0)),k.drawnextLabel){if((b=i.drawText({width:100,height:parseInt(h.style.fontSize,10),x:s+$,y:o+x,foreColor:C,textAnchor:c||h.textAnchor,text:l,fontSize:u||h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight||"normal"})).attr({class:y||"apexcharts-datalabel",cx:s,cy:o}),h.dropShadow.enabled){var M=h.dropShadow;new ri(this.ctx).dropShadow(b,M)}d.add(b),n.globals.lastDrawnDataLabelsIndexes[r]===void 0&&(n.globals.lastDrawnDataLabelsIndexes[r]=[]),n.globals.lastDrawnDataLabelsIndexes[r].push(a)}return b}},{key:"addBackgroundToDataLabel",value:function(e,n){var i=this.w,s=i.config.dataLabels.background,o=s.padding,r=s.padding/2,a=n.width,l=n.height,c=new Be(this.ctx).drawRect(n.x-o,n.y-r/2,a+2*o,l+r,s.borderRadius,i.config.chart.background!=="transparent"&&i.config.chart.background?i.config.chart.background:"#fff",s.opacity,s.borderWidth,s.borderColor);return s.dropShadow.enabled&&new ri(this.ctx).dropShadow(c,s.dropShadow),c}},{key:"dataLabelsBackground",value:function(){var e=this.w;if(e.config.chart.type!=="bubble")for(var n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i<n.length;i++){var s=n[i],o=s.getBBox(),r=null;if(o.width&&o.height&&(r=this.addBackgroundToDataLabel(s,o)),r){s.parentNode.insertBefore(r.node,s);var a=s.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?r.animate().attr({fill:a}):r.attr({fill:a}),s.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var e=this.w,n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),i=e.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),s=0;s<n.length;s++)i&&i.insertBefore(n[s],i.nextSibling)}}]),t}(),lr=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.legendInactiveClass="legend-mouseover-inactive"}return ct(t,[{key:"getAllSeriesEls",value:function(){return this.w.globals.dom.baseEl.getElementsByClassName("apexcharts-series")}},{key:"getSeriesByName",value:function(e){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner .apexcharts-series[seriesName='".concat(pe.escapeString(e),"']"))}},{key:"isSeriesHidden",value:function(e){var n=this.getSeriesByName(e),i=parseInt(n.getAttribute("data:realIndex"),10);return{isHidden:n.classList.contains("apexcharts-series-collapsed"),realIndex:i}}},{key:"addCollapsedClassToSeries",value:function(e,n){var i=this.w;function s(o){for(var r=0;r<o.length;r++)o[r].index===n&&e.node.classList.add("apexcharts-series-collapsed")}s(i.globals.collapsedSeries),s(i.globals.ancillaryCollapsedSeries)}},{key:"toggleSeries",value:function(e){var n=this.isSeriesHidden(e);return this.ctx.legend.legendHelpers.toggleDataSeries(n.realIndex,n.isHidden),n.isHidden}},{key:"showSeries",value:function(e){var n=this.isSeriesHidden(e);n.isHidden&&this.ctx.legend.legendHelpers.toggleDataSeries(n.realIndex,!0)}},{key:"hideSeries",value:function(e){var n=this.isSeriesHidden(e);n.isHidden||this.ctx.legend.legendHelpers.toggleDataSeries(n.realIndex,!1)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],s=this.w,o=pe.clone(s.globals.initialSeries);s.globals.previousPaths=[],i?(s.globals.collapsedSeries=[],s.globals.ancillaryCollapsedSeries=[],s.globals.collapsedSeriesIndices=[],s.globals.ancillaryCollapsedSeriesIndices=[]):o=this.emptyCollapsedSeries(o),s.config.series=o,e&&(n&&(s.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(o,s.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var n=this.w,i=0;i<e.length;i++)n.globals.collapsedSeriesIndices.indexOf(i)>-1&&(e[i].data=[]);return e}},{key:"highlightSeries",value:function(e){var n=this.w,i=this.getSeriesByName(e),s=parseInt(i==null?void 0:i.getAttribute("data:realIndex"),10),o=n.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),r=null,a=null,l=null;if(n.globals.axisCharts||n.config.chart.type==="radialBar")if(n.globals.axisCharts){r=n.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(s,"']")),a=n.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(s,"']"));var c=n.globals.seriesYAxisReverseMap[s];l=n.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(c,"']"))}else r=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(s+1,"']"));else r=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(s+1,"'] path"));for(var u=0;u<o.length;u++)o[u].classList.add(this.legendInactiveClass);if(r)n.globals.axisCharts||r.parentNode.classList.remove(this.legendInactiveClass),r.classList.remove(this.legendInactiveClass),a!==null&&a.classList.remove(this.legendInactiveClass),l!==null&&l.classList.remove(this.legendInactiveClass);else for(var d=0;d<o.length;d++)o[d].classList.remove(this.legendInactiveClass)}},{key:"toggleSeriesOnHover",value:function(e,n){var i=this.w;n||(n=e.target);var s=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if(e.type==="mousemove"){var o=parseInt(n.getAttribute("rel"),10)-1;this.highlightSeries(i.globals.seriesNames[o])}else if(e.type==="mouseout")for(var r=0;r<s.length;r++)s[r].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(e,n){var i=this,s=this.w,o=s.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),r=function(c){for(var u=0;u<o.length;u++)o[u].classList[c](i.legendInactiveClass)};if(e.type==="mousemove"){var a=parseInt(n.getAttribute("rel"),10)-1;r("add");var l=s.config.plotOptions.heatmap.colorScale.ranges;(function(c,u){for(var d=0;d<o.length;d++){var h=Number(o[d].getAttribute("val"));h>=c.from&&(h<c.to||c.to===u&&h===u)&&o[d].classList.remove(i.legendInactiveClass)}})(l[a],l.reduce(function(c,u){return Math.max(c,u.to)},0))}else e.type==="mouseout"&&r("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"asc",n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=this.w,s=0;if(i.config.series.length>1){for(var o=i.config.series.map(function(a,l){return a.data&&a.data.length>0&&i.globals.collapsedSeriesIndices.indexOf(l)===-1&&(!i.globals.comboCharts||n.length===0||n.length&&n.indexOf(i.config.series[l].type)>-1)?l:-1}),r=e==="asc"?0:o.length-1;e==="asc"?r<o.length:r>=0;e==="asc"?r++:r--)if(o[r]!==-1){s=o[r];break}}return s}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map(function(e,n){return e.type==="bar"||e.type==="column"?n:-1}).filter(function(e){return e!==-1}):this.w.config.series.map(function(e,n){return n})}},{key:"getPreviousPaths",value:function(){var e=this.w;function n(r,a,l){for(var c=r[a].childNodes,u={type:l,paths:[],realIndex:r[a].getAttribute("data:realIndex")},d=0;d<c.length;d++)if(c[d].hasAttribute("pathTo")){var h=c[d].getAttribute("pathTo");u.paths.push({d:h})}e.globals.previousPaths.push(u)}e.globals.previousPaths=[],["line","area","bar","rangebar","rangeArea","candlestick","radar"].forEach(function(r){for(var a,l=(a=r,e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(a,"-series .apexcharts-series"))),c=0;c<l.length;c++)n(l,c,r)});var i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series"));if(i.length>0)for(var s=function(r){for(var a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(r,"'] rect")),l=[],c=function(d){var h=function(p){return a[d].getAttribute(p)},f={x:parseFloat(h("x")),y:parseFloat(h("y")),width:parseFloat(h("width")),height:parseFloat(h("height"))};l.push({rect:f,color:a[d].getAttribute("color")})},u=0;u<a.length;u++)c(u);e.globals.previousPaths.push(l)},o=0;o<i.length;o++)s(o);e.globals.axisCharts||(e.globals.previousPaths=e.globals.series)}},{key:"clearPreviousPaths",value:function(){var e=this.w;e.globals.previousPaths=[],e.globals.allSeriesCollapsed=!1}},{key:"handleNoData",value:function(){var e=this.w,n=e.config.noData,i=new Be(this.ctx),s=e.globals.svgWidth/2,o=e.globals.svgHeight/2,r="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,n.align==="left"?(s=10,r="start"):n.align==="right"&&(s=e.globals.svgWidth-10,r="end"),n.verticalAlign==="top"?o=50:n.verticalAlign==="bottom"&&(o=e.globals.svgHeight-50),s+=n.offsetX,o=o+parseInt(n.style.fontSize,10)+2+n.offsetY,n.text!==void 0&&n.text!==""){var a=i.drawText({x:s,y:o,text:n.text,textAnchor:r,fontSize:n.style.fontSize,fontFamily:n.style.fontFamily,foreColor:n.style.color,opacity:1,class:"apexcharts-text-nodata"});e.globals.dom.Paper.add(a)}}},{key:"setNullSeriesToZeroValues",value:function(e){for(var n=this.w,i=0;i<e.length;i++)if(e[i].length===0)for(var s=0;s<e[n.globals.maxValsInArrayIndex].length;s++)e[i].push(0);return e}},{key:"hasAllSeriesEqualX",value:function(){for(var e=!0,n=this.w,i=this.filteredSeriesX(),s=0;s<i.length-1;s++)if(i[s][0]!==i[s+1][0]){e=!1;break}return n.globals.allSeriesHasEqualX=e,e}},{key:"filteredSeriesX",value:function(){var e=this.w.globals.seriesX.map(function(n){return n.length>0?n:[]});return e}}]),t}(),wS=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new _s(this.ctx)}return ct(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),n=new lr(this.ctx);if(this.activeSeriesIndex=n.getActiveConfigSeriesIndex(),e[this.activeSeriesIndex].data!==void 0&&e[this.activeSeriesIndex].data.length>0&&e[this.activeSeriesIndex].data[0]!==null&&e[this.activeSeriesIndex].data[0].x!==void 0&&e[this.activeSeriesIndex].data[0]!==null)return!0}},{key:"isFormat2DArray",value:function(){var e=this.w.config.series.slice(),n=new lr(this.ctx);if(this.activeSeriesIndex=n.getActiveConfigSeriesIndex(),e[this.activeSeriesIndex].data!==void 0&&e[this.activeSeriesIndex].data.length>0&&e[this.activeSeriesIndex].data[0]!==void 0&&e[this.activeSeriesIndex].data[0]!==null&&e[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(e,n){for(var i=this.w.config,s=this.w.globals,o=i.chart.type==="boxPlot"||i.series[n].type==="boxPlot",r=0;r<e[n].data.length;r++)if(e[n].data[r][1]!==void 0&&(Array.isArray(e[n].data[r][1])&&e[n].data[r][1].length===4&&!o?this.twoDSeries.push(pe.parseNumber(e[n].data[r][1][3])):e[n].data[r].length>=5?this.twoDSeries.push(pe.parseNumber(e[n].data[r][4])):this.twoDSeries.push(pe.parseNumber(e[n].data[r][1])),s.dataFormatXNumeric=!0),i.xaxis.type==="datetime"){var a=new Date(e[n].data[r][0]);a=new Date(a).getTime(),this.twoDSeriesX.push(a)}else this.twoDSeriesX.push(e[n].data[r][0]);for(var l=0;l<e[n].data.length;l++)e[n].data[l][2]!==void 0&&(this.threeDSeries.push(e[n].data[l][2]),s.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(e,n){var i=this.w.config,s=this.w.globals,o=new si(this.ctx),r=n;s.collapsedSeriesIndices.indexOf(n)>-1&&(r=this.activeSeriesIndex);for(var a=0;a<e[n].data.length;a++)e[n].data[a].y!==void 0&&(Array.isArray(e[n].data[a].y)?this.twoDSeries.push(pe.parseNumber(e[n].data[a].y[e[n].data[a].y.length-1])):this.twoDSeries.push(pe.parseNumber(e[n].data[a].y))),e[n].data[a].goals!==void 0&&Array.isArray(e[n].data[a].goals)?(this.seriesGoals[n]===void 0&&(this.seriesGoals[n]=[]),this.seriesGoals[n].push(e[n].data[a].goals)):(this.seriesGoals[n]===void 0&&(this.seriesGoals[n]=[]),this.seriesGoals[n].push(null));for(var l=0;l<e[r].data.length;l++){var c=typeof e[r].data[l].x=="string",u=Array.isArray(e[r].data[l].x),d=!u&&!!o.isValidDate(e[r].data[l].x);if(c||d)if(c||i.xaxis.convertedCatToNumeric){var h=s.isBarHorizontal&&s.isRangeData;i.xaxis.type!=="datetime"||h?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[r].data[l].x),isNaN(e[r].data[l].x)||this.w.config.xaxis.type==="category"||typeof e[r].data[l].x=="string"||(s.isXNumeric=!0)):this.twoDSeriesX.push(o.parseDate(e[r].data[l].x))}else i.xaxis.type==="datetime"?this.twoDSeriesX.push(o.parseDate(e[r].data[l].x.toString())):(s.dataFormatXNumeric=!0,s.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e[r].data[l].x)));else u?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[r].data[l].x)):(s.isXNumeric=!0,s.dataFormatXNumeric=!0,this.twoDSeriesX.push(e[r].data[l].x))}if(e[n].data[0]&&e[n].data[0].z!==void 0){for(var f=0;f<e[n].data.length;f++)this.threeDSeries.push(e[n].data[f].z);s.isDataXYZ=!0}}},{key:"handleRangeData",value:function(e,n){var i=this.w.globals,s={};return this.isFormat2DArray()?s=this.handleRangeDataFormat("array",e,n):this.isFormatXY()&&(s=this.handleRangeDataFormat("xy",e,n)),i.seriesRangeStart.push(s.start===void 0?[]:s.start),i.seriesRangeEnd.push(s.end===void 0?[]:s.end),i.seriesRange.push(s.rangeUniques),i.seriesRange.forEach(function(o,r){o&&o.forEach(function(a,l){a.y.forEach(function(c,u){for(var d=0;d<a.y.length;d++)if(u!==d){var h=c.y1,f=c.y2,p=a.y[d].y1;h<=a.y[d].y2&&p<=f&&(a.overlaps.indexOf(c.rangeName)<0&&a.overlaps.push(c.rangeName),a.overlaps.indexOf(a.y[d].rangeName)<0&&a.overlaps.push(a.y[d].rangeName))}})})}),s}},{key:"handleCandleStickBoxData",value:function(e,n){var i=this.w.globals,s={};return this.isFormat2DArray()?s=this.handleCandleStickBoxDataFormat("array",e,n):this.isFormatXY()&&(s=this.handleCandleStickBoxDataFormat("xy",e,n)),i.seriesCandleO[n]=s.o,i.seriesCandleH[n]=s.h,i.seriesCandleM[n]=s.m,i.seriesCandleL[n]=s.l,i.seriesCandleC[n]=s.c,s}},{key:"handleRangeDataFormat",value:function(e,n,i){var s=[],o=[],r=n[i].data.filter(function(u,d,h){return d===h.findIndex(function(f){return f.x===u.x})}).map(function(u,d){return{x:u.x,overlaps:[],y:[]}});if(e==="array")for(var a=0;a<n[i].data.length;a++)Array.isArray(n[i].data[a])?(s.push(n[i].data[a][1][0]),o.push(n[i].data[a][1][1])):(s.push(n[i].data[a]),o.push(n[i].data[a]));else if(e==="xy")for(var l=function(u){var d=Array.isArray(n[i].data[u].y),h=pe.randomId(),f=n[i].data[u].x,p={y1:d?n[i].data[u].y[0]:n[i].data[u].y,y2:d?n[i].data[u].y[1]:n[i].data[u].y,rangeName:h};n[i].data[u].rangeName=h;var m=r.findIndex(function(y){return y.x===f});r[m].y.push(p),s.push(p.y1),o.push(p.y2)},c=0;c<n[i].data.length;c++)l(c);return{start:s,end:o,rangeUniques:r}}},{key:"handleCandleStickBoxDataFormat",value:function(e,n,i){var s=this.w,o=s.config.chart.type==="boxPlot"||s.config.series[i].type==="boxPlot",r=[],a=[],l=[],c=[],u=[];if(e==="array")if(o&&n[i].data[0].length===6||!o&&n[i].data[0].length===5)for(var d=0;d<n[i].data.length;d++)r.push(n[i].data[d][1]),a.push(n[i].data[d][2]),o?(l.push(n[i].data[d][3]),c.push(n[i].data[d][4]),u.push(n[i].data[d][5])):(c.push(n[i].data[d][3]),u.push(n[i].data[d][4]));else for(var h=0;h<n[i].data.length;h++)Array.isArray(n[i].data[h][1])&&(r.push(n[i].data[h][1][0]),a.push(n[i].data[h][1][1]),o?(l.push(n[i].data[h][1][2]),c.push(n[i].data[h][1][3]),u.push(n[i].data[h][1][4])):(c.push(n[i].data[h][1][2]),u.push(n[i].data[h][1][3])));else if(e==="xy")for(var f=0;f<n[i].data.length;f++)Array.isArray(n[i].data[f].y)&&(r.push(n[i].data[f].y[0]),a.push(n[i].data[f].y[1]),o?(l.push(n[i].data[f].y[2]),c.push(n[i].data[f].y[3]),u.push(n[i].data[f].y[4])):(c.push(n[i].data[f].y[2]),u.push(n[i].data[f].y[3])));return{o:r,h:a,m:l,l:c,c:u}}},{key:"parseDataAxisCharts",value:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.ctx,s=this.w.config,o=this.w.globals,r=new si(i),a=s.labels.length>0?s.labels.slice():s.xaxis.categories.slice();o.isRangeBar=s.chart.type==="rangeBar"&&o.isBarHorizontal,o.hasXaxisGroups=s.xaxis.type==="category"&&s.xaxis.group.groups.length>0,o.hasXaxisGroups&&(o.groups=s.xaxis.group.groups),e.forEach(function(f,p){f.name!==void 0?o.seriesNames.push(f.name):o.seriesNames.push("series-"+parseInt(p+1,10))}),this.coreUtils.setSeriesYAxisMappings();var l=[],c=Ns(new Set(s.series.map(function(f){return f.group})));s.series.forEach(function(f,p){var m=c.indexOf(f.group);l[m]||(l[m]=[]),l[m].push(o.seriesNames[p])}),o.seriesGroups=l;for(var u=function(){for(var f=0;f<a.length;f++)if(typeof a[f]=="string"){if(!r.isValidDate(a[f]))throw new Error("You have provided invalid Date format. Please provide a valid JavaScript Date");n.twoDSeriesX.push(r.parseDate(a[f]))}else n.twoDSeriesX.push(a[f])},d=0;d<e.length;d++){if(this.twoDSeries=[],this.twoDSeriesX=[],this.threeDSeries=[],e[d].data===void 0)return void console.error("It is a possibility that you may have not included 'data' property in series.");if(s.chart.type!=="rangeBar"&&s.chart.type!=="rangeArea"&&e[d].type!=="rangeBar"&&e[d].type!=="rangeArea"||(o.isRangeData=!0,s.chart.type!=="rangeBar"&&s.chart.type!=="rangeArea"||this.handleRangeData(e,d)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,d):this.isFormatXY()&&this.handleFormatXY(e,d),s.chart.type!=="candlestick"&&e[d].type!=="candlestick"&&s.chart.type!=="boxPlot"&&e[d].type!=="boxPlot"||this.handleCandleStickBoxData(e,d),o.series.push(this.twoDSeries),o.labels.push(this.twoDSeriesX),o.seriesX.push(this.twoDSeriesX),o.seriesGoals=this.seriesGoals,d!==this.activeSeriesIndex||this.fallbackToCategory||(o.isXNumeric=!0);else{s.xaxis.type==="datetime"?(o.isXNumeric=!0,u(),o.seriesX.push(this.twoDSeriesX)):s.xaxis.type==="numeric"&&(o.isXNumeric=!0,a.length>0&&(this.twoDSeriesX=a,o.seriesX.push(this.twoDSeriesX))),o.labels.push(this.twoDSeriesX);var h=e[d].data.map(function(f){return pe.parseNumber(f)});o.series.push(h)}o.seriesZ.push(this.threeDSeries),e[d].color!==void 0?o.seriesColors.push(e[d].color):o.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(e){var n=this.w.globals,i=this.w.config;n.series=e.slice(),n.seriesNames=i.labels.slice();for(var s=0;s<n.series.length;s++)n.seriesNames[s]===void 0&&n.seriesNames.push("series-"+(s+1));return this.w}},{key:"handleExternalLabelsData",value:function(e){var n=this.w.config,i=this.w.globals;n.xaxis.categories.length>0?i.labels=n.xaxis.categories:n.labels.length>0?i.labels=n.labels.slice():this.fallbackToCategory?(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map(function(s){s.forEach(function(o){i.labels.indexOf(o.x)<0&&o.x&&i.labels.push(o.x)})}),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),n.xaxis.convertedCatToNumeric&&(new n1(n).convertCatToNumericXaxis(n,this.ctx,i.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var n=this.w.globals,i=this.w.config,s=[];if(n.axisCharts){if(n.series.length>0)if(this.isFormatXY())for(var o=i.series.map(function(d,h){return d.data.filter(function(f,p,m){return m.findIndex(function(y){return y.x===f.x})===p})}),r=o.reduce(function(d,h,f,p){return p[d].length>h.length?d:f},0),a=0;a<o[r].length;a++)s.push(a+1);else for(var l=0;l<n.series[n.maxValsInArrayIndex].length;l++)s.push(l+1);n.seriesX=[];for(var c=0;c<e.length;c++)n.seriesX.push(s);this.w.globals.isBarHorizontal||(n.isXNumeric=!0)}if(s.length===0){s=n.axisCharts?[]:n.series.map(function(d,h){return h+1});for(var u=0;u<e.length;u++)n.seriesX.push(s)}n.labels=s,i.xaxis.convertedCatToNumeric&&(n.categoryLabels=s.map(function(d){return i.xaxis.labels.formatter(d)})),n.noLabelsProvided=!0}},{key:"parseData",value:function(e){var n=this.w,i=n.config,s=n.globals;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),s.axisCharts?(this.parseDataAxisCharts(e),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(e),i.chart.stacked){var o=new lr(this.ctx);s.series=o.setNullSeriesToZeroValues(s.series)}this.coreUtils.getSeriesTotals(),s.axisCharts&&(s.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals(),s.stackedSeriesTotalsByGroups=this.coreUtils.getStackedSeriesTotalsByGroups()),this.coreUtils.getPercentSeries(),s.dataFormatXNumeric||s.isXNumeric&&(i.xaxis.type!=="numeric"||i.labels.length!==0||i.xaxis.categories.length!==0)||this.handleExternalLabelsData(e);for(var r=this.coreUtils.getCategoryLabels(s.labels),a=0;a<r.length;a++)if(Array.isArray(r[a])){s.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var e=this.w,n=[];e.globals.seriesYAxisMap.forEach(function(i,s){var o=0;i.forEach(function(r){e.globals.collapsedSeriesIndices.indexOf(r)!==-1&&o++}),o>0&&o==i.length&&n.push(s)}),e.globals.ignoreYAxisIndexes=n.map(function(i){return i})}}]),t}(),Ry=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"scaleSvgNode",value:function(e,n){var i=parseFloat(e.getAttributeNS(null,"width")),s=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",i*n),e.setAttributeNS(null,"height",s*n),e.setAttributeNS(null,"viewBox","0 0 "+i+" "+s)}},{key:"getSvgString",value:function(e){var n=this;return new Promise(function(i){var s=n.w,o=e||s.config.chart.toolbar.export.scale||s.config.chart.toolbar.export.width/s.globals.svgWidth;o||(o=1);var r=n.w.globals.dom.Paper.svg(),a=n.w.globals.dom.Paper.node.cloneNode(!0);o!==1&&n.scaleSvgNode(a,o),n.convertImagesToBase64(a).then(function(){r=new XMLSerializer().serializeToString(a),i(r.replace(/&nbsp;/g,"&#160;"))})})}},{key:"convertImagesToBase64",value:function(e){var n=this,i=e.getElementsByTagName("image"),s=Array.from(i).map(function(o){var r=o.getAttributeNS("http://www.w3.org/1999/xlink","href");return r&&!r.startsWith("data:")?n.getBase64FromUrl(r).then(function(a){o.setAttributeNS("http://www.w3.org/1999/xlink","href",a)}).catch(function(a){console.error("Error converting image to base64:",a)}):Promise.resolve()});return Promise.all(s)}},{key:"getBase64FromUrl",value:function(e){return new Promise(function(n,i){var s=new Image;s.crossOrigin="Anonymous",s.onload=function(){var o=document.createElement("canvas");o.width=s.width,o.height=s.height,o.getContext("2d").drawImage(s,0,0),n(o.toDataURL())},s.onerror=i,s.src=e})}},{key:"cleanup",value:function(){var e=this.w,n=e.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=e.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(s,function(o){o.setAttribute("width",0)}),n&&n[0]&&(n[0].setAttribute("x",-500),n[0].setAttribute("x1",-500),n[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var e=this;return new Promise(function(n){e.cleanup(),e.getSvgString().then(function(i){var s=new Blob([i],{type:"image/svg+xml;charset=utf-8"});n(URL.createObjectURL(s))})})}},{key:"dataURI",value:function(e){var n=this;return new Promise(function(i){var s=n.w,o=e?e.scale||e.width/s.globals.svgWidth:1;n.cleanup();var r=document.createElement("canvas");r.width=s.globals.svgWidth*o,r.height=parseInt(s.globals.dom.elWrap.style.height,10)*o;var a=s.config.chart.background!=="transparent"&&s.config.chart.background?s.config.chart.background:"#fff",l=r.getContext("2d");l.fillStyle=a,l.fillRect(0,0,r.width*o,r.height*o),n.getSvgString(o).then(function(c){var u="data:image/svg+xml,"+encodeURIComponent(c),d=new Image;d.crossOrigin="anonymous",d.onload=function(){if(l.drawImage(d,0,0),r.msToBlob){var h=r.msToBlob();i({blob:h})}else{var f=r.toDataURL("image/png");i({imgURI:f})}},d.src=u})})}},{key:"exportToSVG",value:function(){var e=this;this.svgUrl().then(function(n){e.triggerDownload(n,e.w.config.chart.toolbar.export.svg.filename,".svg")})}},{key:"exportToPng",value:function(){var e=this,n=this.w.config.chart.toolbar.export.scale,i=this.w.config.chart.toolbar.export.width,s=n?{scale:n}:i?{width:i}:void 0;this.dataURI(s).then(function(o){var r=o.imgURI,a=o.blob;a?navigator.msSaveOrOpenBlob(a,e.w.globals.chartID+".png"):e.triggerDownload(r,e.w.config.chart.toolbar.export.png.filename,".png")})}},{key:"exportToCSV",value:function(e){var n=this,i=e.series,s=e.fileName,o=e.columnDelimiter,r=o===void 0?",":o,a=e.lineDelimiter,l=a===void 0?`
`:a,c=this.w;i||(i=c.config.series);var u=[],d=[],h="",f=c.globals.series.map(function(x,M){return c.globals.collapsedSeriesIndices.indexOf(M)===-1?x:[]}),p=function(x){return typeof c.config.chart.toolbar.export.csv.categoryFormatter=="function"?c.config.chart.toolbar.export.csv.categoryFormatter(x):c.config.xaxis.type==="datetime"&&String(x).length>=10?new Date(x).toDateString():pe.isNumber(x)?x:x.split(r).join("")},m=function(x){return typeof c.config.chart.toolbar.export.csv.valueFormatter=="function"?c.config.chart.toolbar.export.csv.valueFormatter(x):x},y=Math.max.apply(Math,Ns(i.map(function(x){return x.data?x.data.length:0}))),b=new wS(this.ctx),k=new Oc(this.ctx),C=function(x){var M="";if(c.globals.axisCharts){if(c.config.xaxis.type==="category"||c.config.xaxis.convertedCatToNumeric)if(c.globals.isBarHorizontal){var P=c.globals.yLabelFormatters[0],T=new lr(n.ctx).getActiveConfigSeriesIndex();M=P(c.globals.labels[x],{seriesIndex:T,dataPointIndex:x,w:c})}else M=k.getLabel(c.globals.labels,c.globals.timescaleLabels,0,x).text;c.config.xaxis.type==="datetime"&&(c.config.xaxis.categories.length?M=c.config.xaxis.categories[x]:c.config.labels.length&&(M=c.config.labels[x]))}else M=c.config.labels[x];return M===null?"nullvalue":(Array.isArray(M)&&(M=M.join(" ")),pe.isNumber(M)?M:M.split(r).join(""))},$=function(x,M){if(u.length&&M===0&&d.push(u.join(r)),x.data){x.data=x.data.length&&x.data||Ns(Array(y)).map(function(){return""});for(var P=0;P<x.data.length;P++){u=[];var T=C(P);if(T!=="nullvalue"){if(T||(b.isFormatXY()?T=i[M].data[P].x:b.isFormat2DArray()&&(T=i[M].data[P]?i[M].data[P][0]:"")),M===0){u.push(p(T));for(var I=0;I<c.globals.series.length;I++){var L,R=b.isFormatXY()?(L=i[I].data[P])===null||L===void 0?void 0:L.y:f[I][P];u.push(m(R))}}(c.config.chart.type==="candlestick"||x.type&&x.type==="candlestick")&&(u.pop(),u.push(c.globals.seriesCandleO[M][P]),u.push(c.globals.seriesCandleH[M][P]),u.push(c.globals.seriesCandleL[M][P]),u.push(c.globals.seriesCandleC[M][P])),(c.config.chart.type==="boxPlot"||x.type&&x.type==="boxPlot")&&(u.pop(),u.push(c.globals.seriesCandleO[M][P]),u.push(c.globals.seriesCandleH[M][P]),u.push(c.globals.seriesCandleM[M][P]),u.push(c.globals.seriesCandleL[M][P]),u.push(c.globals.seriesCandleC[M][P])),c.config.chart.type==="rangeBar"&&(u.pop(),u.push(c.globals.seriesRangeStart[M][P]),u.push(c.globals.seriesRangeEnd[M][P])),u.length&&d.push(u.join(r))}}}};u.push(c.config.chart.toolbar.export.csv.headerCategory),c.config.chart.type==="boxPlot"?(u.push("minimum"),u.push("q1"),u.push("median"),u.push("q3"),u.push("maximum")):c.config.chart.type==="candlestick"?(u.push("open"),u.push("high"),u.push("low"),u.push("close")):c.config.chart.type==="rangeBar"?(u.push("minimum"),u.push("maximum")):i.map(function(x,M){var P=(x.name?x.name:"series-".concat(M))+"";c.globals.axisCharts&&u.push(P.split(r).join("")?P.split(r).join(""):"series-".concat(M))}),c.globals.axisCharts||(u.push(c.config.chart.toolbar.export.csv.headerValue),d.push(u.join(r))),c.globals.allSeriesHasEqualX||!c.globals.axisCharts||c.config.xaxis.categories.length||c.config.labels.length?i.map(function(x,M){c.globals.axisCharts?$(x,M):((u=[]).push(p(c.globals.labels[M])),u.push(m(f[M])),d.push(u.join(r)))}):function(){var x=new Set,M={};i.forEach(function(P,T){P==null||P.data.forEach(function(I){var L,R;if(b.isFormatXY())L=I.x,R=I.y;else{if(!b.isFormat2DArray())return;L=I[0],R=I[1]}M[L]||(M[L]=Array(i.length).fill("")),M[L][T]=m(R),x.add(L)})}),u.length&&d.push(u.join(r)),Array.from(x).sort().forEach(function(P){d.push([p(P),M[P].join(r)])})}(),h+=d.join(l),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\uFEFF"+h),s||c.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(e,n,i){var s=document.createElement("a");s.href=e,s.download=(n||this.w.globals.chartID)+i,document.body.appendChild(s),s.click(),document.body.removeChild(s)}}]),t}(),i1=function(){function t(e,n){lt(this,t),this.ctx=e,this.elgrid=n,this.w=e.w;var i=this.w;this.axesUtils=new Oc(e),this.xaxisLabels=i.globals.labels.slice(),i.globals.timescaleLabels.length>0&&!i.globals.isBarHorizontal&&(this.xaxisLabels=i.globals.timescaleLabels.slice()),i.config.xaxis.overwriteCategories&&(this.xaxisLabels=i.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],i.config.xaxis.position==="top"?this.offY=0:this.offY=i.globals.gridHeight,this.offY=this.offY+i.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=i.config.chart.type==="bar"&&i.config.plotOptions.bar.horizontal,this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.xaxisBorderWidth=i.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=i.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=i.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=i.config.xaxis.axisBorder.height,this.yaxis=i.config.yaxis[0]}return ct(t,[{key:"drawXaxis",value:function(){var e=this.w,n=new Be(this.ctx),i=n.group({class:"apexcharts-xaxis",transform:"translate(".concat(e.config.xaxis.offsetX,", ").concat(e.config.xaxis.offsetY,")")}),s=n.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});i.add(s);for(var o=[],r=0;r<this.xaxisLabels.length;r++)o.push(this.xaxisLabels[r]);if(this.drawXAxisLabelAndGroup(!0,n,s,o,e.globals.isXNumeric,function(p,m){return m}),e.globals.hasXaxisGroups){var a=e.globals.groups;o=[];for(var l=0;l<a.length;l++)o.push(a[l].title);var c={};e.config.xaxis.group.style&&(c.xaxisFontSize=e.config.xaxis.group.style.fontSize,c.xaxisFontFamily=e.config.xaxis.group.style.fontFamily,c.xaxisForeColors=e.config.xaxis.group.style.colors,c.fontWeight=e.config.xaxis.group.style.fontWeight,c.cssClass=e.config.xaxis.group.style.cssClass),this.drawXAxisLabelAndGroup(!1,n,s,o,!1,function(p,m){return a[p].cols*m},c)}if(e.config.xaxis.title.text!==void 0){var u=n.group({class:"apexcharts-xaxis-title"}),d=n.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(e.config.xaxis.position==="bottom"?e.globals.xAxisLabelsHeight:-e.globals.xAxisLabelsHeight-10)+e.config.xaxis.title.offsetY,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});u.add(d),i.add(u)}if(e.config.xaxis.axisBorder.show){var h=e.globals.barPadForNumericAxis,f=n.drawLine(e.globals.padHorizontal+e.config.xaxis.axisBorder.offsetX-h,this.offY,this.xaxisBorderWidth+h,this.offY,e.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(f):i.add(f)}return i}},{key:"drawXAxisLabelAndGroup",value:function(e,n,i,s,o,r){var a,l=this,c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:{},u=[],d=[],h=this.w,f=c.xaxisFontSize||this.xaxisFontSize,p=c.xaxisFontFamily||this.xaxisFontFamily,m=c.xaxisForeColors||this.xaxisForeColors,y=c.fontWeight||h.config.xaxis.labels.style.fontWeight,b=c.cssClass||h.config.xaxis.labels.style.cssClass,k=h.globals.padHorizontal,C=s.length,$=h.config.xaxis.type==="category"?h.globals.dataPoints:C;if($===0&&C>$&&($=C),o){var x=Math.max(Number(h.config.xaxis.tickAmount)||1,$>1?$-1:$);a=h.globals.gridWidth/Math.min(x,C-1),k=k+r(0,a)/2+h.config.xaxis.labels.offsetX}else a=h.globals.gridWidth/$,k=k+r(0,a)+h.config.xaxis.labels.offsetX;for(var M=function(T){var I=k-r(T,a)/2+h.config.xaxis.labels.offsetX;T===0&&C===1&&a/2===k&&$===1&&(I=h.globals.gridWidth/2);var L=l.axesUtils.getLabel(s,h.globals.timescaleLabels,I,T,u,f,e),R=28;if(h.globals.rotateXLabels&&e&&(R=22),h.config.xaxis.title.text&&h.config.xaxis.position==="top"&&(R+=parseFloat(h.config.xaxis.title.style.fontSize)+2),e||(R=R+parseFloat(f)+(h.globals.xAxisLabelsHeight-h.globals.xAxisGroupLabelsHeight)+(h.globals.rotateXLabels?10:0)),L=h.config.xaxis.tickAmount!==void 0&&h.config.xaxis.tickAmount!=="dataPoints"&&h.config.xaxis.type!=="datetime"?l.axesUtils.checkLabelBasedOnTickamount(T,L,C):l.axesUtils.checkForOverflowingLabels(T,L,C,u,d),h.config.xaxis.labels.show){var V=n.drawText({x:L.x,y:l.offY+h.config.xaxis.labels.offsetY+R-(h.config.xaxis.position==="top"?h.globals.xAxisHeight+h.config.xaxis.axisTicks.height-2:0),text:L.text,textAnchor:"middle",fontWeight:L.isBold?600:y,fontSize:f,fontFamily:p,foreColor:Array.isArray(m)?e&&h.config.xaxis.convertedCatToNumeric?m[h.globals.minX+T-1]:m[T]:m,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+b});if(i.add(V),V.on("click",function(F){if(typeof h.config.chart.events.xAxisLabelClick=="function"){var z=Object.assign({},h,{labelIndex:T});h.config.chart.events.xAxisLabelClick(F,l.ctx,z)}}),e){var H=document.createElementNS(h.globals.SVGNS,"title");H.textContent=Array.isArray(L.text)?L.text.join(" "):L.text,V.node.appendChild(H),L.text!==""&&(u.push(L.text),d.push(L))}}T<C-1&&(k+=r(T+1,a))},P=0;P<=C-1;P++)M(P)}},{key:"drawXaxisInversed",value:function(e){var n,i,s=this,o=this.w,r=new Be(this.ctx),a=o.config.yaxis[0].opposite?o.globals.translateYAxisX[e]:0,l=r.group({class:"apexcharts-yaxis apexcharts-xaxis-inversed",rel:e}),c=r.group({class:"apexcharts-yaxis-texts-g apexcharts-xaxis-inversed-texts-g",transform:"translate("+a+", 0)"});l.add(c);var u=[];if(o.config.yaxis[e].show)for(var d=0;d<this.xaxisLabels.length;d++)u.push(this.xaxisLabels[d]);n=o.globals.gridHeight/u.length,i=-n/2.2;var h=o.globals.yLabelFormatters[0],f=o.config.yaxis[0].labels;if(f.show)for(var p=function(x){var M=u[x]===void 0?"":u[x];M=h(M,{seriesIndex:e,dataPointIndex:x,w:o});var P=s.axesUtils.getYAxisForeColor(f.style.colors,e),T=0;Array.isArray(M)&&(T=M.length/2*parseInt(f.style.fontSize,10));var I=f.offsetX-15,L="end";s.yaxis.opposite&&(L="start"),o.config.yaxis[0].labels.align==="left"?(I=f.offsetX,L="start"):o.config.yaxis[0].labels.align==="center"?(I=f.offsetX,L="middle"):o.config.yaxis[0].labels.align==="right"&&(L="end");var R=r.drawText({x:I,y:i+n+f.offsetY-T,text:M,textAnchor:L,foreColor:Array.isArray(P)?P[x]:P,fontSize:f.style.fontSize,fontFamily:f.style.fontFamily,fontWeight:f.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+f.style.cssClass,maxWidth:f.maxWidth});c.add(R),R.on("click",function(F){if(typeof o.config.chart.events.xAxisLabelClick=="function"){var z=Object.assign({},o,{labelIndex:x});o.config.chart.events.xAxisLabelClick(F,s.ctx,z)}});var V=document.createElementNS(o.globals.SVGNS,"title");if(V.textContent=Array.isArray(M)?M.join(" "):M,R.node.appendChild(V),o.config.yaxis[e].labels.rotate!==0){var H=r.rotateAroundCenter(R.node);R.node.setAttribute("transform","rotate(".concat(o.config.yaxis[e].labels.rotate," 0 ").concat(H.y,")"))}i+=n},m=0;m<=u.length-1;m++)p(m);if(o.config.yaxis[0].title.text!==void 0){var y=r.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+a+", 0)"}),b=r.drawText({x:o.config.yaxis[0].title.offsetX,y:o.globals.gridHeight/2+o.config.yaxis[0].title.offsetY,text:o.config.yaxis[0].title.text,textAnchor:"middle",foreColor:o.config.yaxis[0].title.style.color,fontSize:o.config.yaxis[0].title.style.fontSize,fontWeight:o.config.yaxis[0].title.style.fontWeight,fontFamily:o.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+o.config.yaxis[0].title.style.cssClass});y.add(b),l.add(y)}var k=0;this.isCategoryBarHorizontal&&o.config.yaxis[0].opposite&&(k=o.globals.gridWidth);var C=o.config.xaxis.axisBorder;if(C.show){var $=r.drawLine(o.globals.padHorizontal+C.offsetX+k,1+C.offsetY,o.globals.padHorizontal+C.offsetX+k,o.globals.gridHeight+C.offsetY,C.color,0);this.elgrid&&this.elgrid.elGridBorders&&o.config.grid.show?this.elgrid.elGridBorders.add($):l.add($)}return o.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(k,u.length,o.config.yaxis[0].axisBorder,o.config.yaxis[0].axisTicks,0,n,l),l}},{key:"drawXaxisTicks",value:function(e,n,i){var s=this.w,o=e;if(!(e<0||e-2>s.globals.gridWidth)){var r=this.offY+s.config.xaxis.axisTicks.offsetY;if(n=n+r+s.config.xaxis.axisTicks.height,s.config.xaxis.position==="top"&&(n=r-s.config.xaxis.axisTicks.height),s.config.xaxis.axisTicks.show){var a=new Be(this.ctx).drawLine(e+s.config.xaxis.axisTicks.offsetX,r+s.config.xaxis.offsetY,o+s.config.xaxis.axisTicks.offsetX,n+s.config.xaxis.offsetY,s.config.xaxis.axisTicks.color);i.add(a),a.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,n=[],i=this.xaxisLabels.length,s=e.globals.padHorizontal;if(e.globals.timescaleLabels.length>0)for(var o=0;o<i;o++)s=this.xaxisLabels[o].position,n.push(s);else for(var r=i,a=0;a<r;a++){var l=r;e.globals.isXNumeric&&e.config.chart.type!=="bar"&&(l-=1),s+=e.globals.gridWidth/l,n.push(s)}return n}},{key:"xAxisLabelCorrections",value:function(){var e=this.w,n=new Be(this.ctx),i=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)"),o=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-inversed text"),r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-xaxis-inversed-texts-g text tspan");if(e.globals.rotateXLabels||e.config.xaxis.labels.rotateAlways)for(var a=0;a<s.length;a++){var l=n.rotateAroundCenter(s[a]);l.y=l.y-1,l.x=l.x+1,s[a].setAttribute("transform","rotate(".concat(e.config.xaxis.labels.rotate," ").concat(l.x," ").concat(l.y,")")),s[a].setAttribute("text-anchor","end"),i.setAttribute("transform","translate(0, ".concat(-10,")"));var c=s[a].childNodes;e.config.xaxis.labels.trim&&Array.prototype.forEach.call(c,function(f){n.placeTextWithEllipsis(f,f.textContent,e.globals.xAxisLabelsHeight-(e.config.legend.position==="bottom"?20:10))})}else(function(){for(var f=e.globals.gridWidth/(e.globals.labels.length+1),p=0;p<s.length;p++){var m=s[p].childNodes;e.config.xaxis.labels.trim&&e.config.xaxis.type!=="datetime"&&Array.prototype.forEach.call(m,function(y){n.placeTextWithEllipsis(y,y.textContent,f)})}})();if(o.length>0){var u=o[o.length-1].getBBox(),d=o[0].getBBox();u.x<-20&&o[o.length-1].parentNode.removeChild(o[o.length-1]),d.x+d.width>e.globals.gridWidth&&!e.globals.isBarHorizontal&&o[0].parentNode.removeChild(o[0]);for(var h=0;h<r.length;h++)n.placeTextWithEllipsis(r[h],r[h].textContent,e.config.yaxis[0].labels.maxWidth-(e.config.yaxis[0].title.text?2*parseFloat(e.config.yaxis[0].title.style.fontSize):0)-15)}}}]),t}(),PU=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.xaxisLabels=n.globals.labels.slice(),this.axesUtils=new Oc(e),this.isRangeBar=n.globals.seriesRange.length&&n.globals.isBarHorizontal,n.globals.timescaleLabels.length>0&&(this.xaxisLabels=n.globals.timescaleLabels.slice())}return ct(t,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=this.w,i=new Be(this.ctx);e||(e=i.group({class:"apexcharts-grid"}));var s=i.drawLine(n.globals.padHorizontal,1,n.globals.padHorizontal,n.globals.gridHeight,"transparent"),o=i.drawLine(n.globals.padHorizontal,n.globals.gridHeight,n.globals.gridWidth,n.globals.gridHeight,"transparent");return e.add(o),e.add(s),e}},{key:"drawGrid",value:function(){if(this.w.globals.axisCharts){var e=this.renderGrid();return this.drawGridArea(e.el),e}return null}},{key:"createGridMask",value:function(){var e=this.w,n=e.globals,i=new Be(this.ctx),s=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,Ns(e.config.stroke.width)):e.config.stroke.width,o=function(u){var d=document.createElementNS(n.SVGNS,"clipPath");return d.setAttribute("id",u),d};n.dom.elGridRectMask=o("gridRectMask".concat(n.cuid)),n.dom.elGridRectBarMask=o("gridRectBarMask".concat(n.cuid)),n.dom.elGridRectMarkerMask=o("gridRectMarkerMask".concat(n.cuid)),n.dom.elForecastMask=o("forecastMask".concat(n.cuid)),n.dom.elNonForecastMask=o("nonForecastMask".concat(n.cuid));var r=0,a=0;(["bar","rangeBar","candlestick","boxPlot"].includes(e.config.chart.type)||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&(r=Math.max(e.config.grid.padding.left,n.barPadForNumericAxis),a=Math.max(e.config.grid.padding.right,n.barPadForNumericAxis)),n.dom.elGridRect=i.drawRect(-s/2-2,-s/2-2,n.gridWidth+s+4,n.gridHeight+s+4,0,"#fff"),n.dom.elGridRectBar=i.drawRect(-s/2-r-2,-s/2-2,n.gridWidth+s+a+r+4,n.gridHeight+s+4,0,"#fff");var l=e.globals.markers.largestSize;n.dom.elGridRectMarker=i.drawRect(-l,-l,n.gridWidth+2*l,n.gridHeight+2*l,0,"#fff"),n.dom.elGridRectMask.appendChild(n.dom.elGridRect.node),n.dom.elGridRectBarMask.appendChild(n.dom.elGridRectBar.node),n.dom.elGridRectMarkerMask.appendChild(n.dom.elGridRectMarker.node);var c=n.dom.baseEl.querySelector("defs");c.appendChild(n.dom.elGridRectMask),c.appendChild(n.dom.elGridRectBarMask),c.appendChild(n.dom.elGridRectMarkerMask),c.appendChild(n.dom.elForecastMask),c.appendChild(n.dom.elNonForecastMask)}},{key:"_drawGridLines",value:function(e){var n=e.i,i=e.x1,s=e.y1,o=e.x2,r=e.y2,a=e.xCount,l=e.parent,c=this.w;if(!(n===0&&c.globals.skipFirstTimelinelabel||n===a-1&&c.globals.skipLastTimelinelabel&&!c.config.xaxis.labels.formatter||c.config.chart.type==="radar")){c.config.grid.xaxis.lines.show&&this._drawGridLine({i:n,x1:i,y1:s,x2:o,y2:r,xCount:a,parent:l});var u=0;if(c.globals.hasXaxisGroups&&c.config.xaxis.tickPlacement==="between"){var d=c.globals.groups;if(d){for(var h=0,f=0;h<n&&f<d.length;f++)h+=d[f].cols;h===n&&(u=.6*c.globals.xAxisLabelsHeight)}}new i1(this.ctx).drawXaxisTicks(i,u,c.globals.dom.elGraphical)}}},{key:"_drawGridLine",value:function(e){var n=e.i,i=e.x1,s=e.y1,o=e.x2,r=e.y2,a=e.xCount,l=e.parent,c=this.w,u=l.node.classList.contains("apexcharts-gridlines-horizontal"),d=c.globals.barPadForNumericAxis,h=s===0&&r===0||i===0&&o===0||s===c.globals.gridHeight&&r===c.globals.gridHeight||c.globals.isBarHorizontal&&(n===0||n===a-1),f=new Be(this).drawLine(i-(u?d:0),s,o+(u?d:0),r,c.config.grid.borderColor,c.config.grid.strokeDashArray);f.node.classList.add("apexcharts-gridline"),h&&c.config.grid.show?this.elGridBorders.add(f):l.add(f)}},{key:"_drawGridBandRect",value:function(e){var n=e.c,i=e.x1,s=e.y1,o=e.x2,r=e.y2,a=e.type,l=this.w,c=new Be(this.ctx),u=l.globals.barPadForNumericAxis,d=l.config.grid[a].colors[n],h=c.drawRect(i-(a==="row"?u:0),s,o+(a==="row"?2*u:0),r,0,d,l.config.grid[a].opacity);this.elg.add(h),h.attr("clip-path","url(#gridRectMask".concat(l.globals.cuid,")")),h.node.classList.add("apexcharts-grid-".concat(a))}},{key:"_drawXYLines",value:function(e){var n=this,i=e.xCount,s=e.tickAmount,o=this.w;if(o.config.grid.xaxis.lines.show||o.config.xaxis.axisTicks.show){var r,a=o.globals.padHorizontal,l=o.globals.gridHeight;o.globals.timescaleLabels.length?function(p){for(var m=p.xC,y=p.x1,b=p.y1,k=p.x2,C=p.y2,$=0;$<m;$++)y=n.xaxisLabels[$].position,k=n.xaxisLabels[$].position,n._drawGridLines({i:$,x1:y,y1:b,x2:k,y2:C,xCount:i,parent:n.elgridLinesV})}({xC:i,x1:a,y1:0,x2:r,y2:l}):(o.globals.isXNumeric&&(i=o.globals.xAxisScale.result.length),function(p){for(var m=p.xC,y=p.x1,b=p.y1,k=p.x2,C=p.y2,$=0;$<m+(o.globals.isXNumeric?0:1);$++)$===0&&m===1&&o.globals.dataPoints===1&&(k=y=o.globals.gridWidth/2),n._drawGridLines({i:$,x1:y,y1:b,x2:k,y2:C,xCount:i,parent:n.elgridLinesV}),k=y+=o.globals.gridWidth/(o.globals.isXNumeric?m-1:m)}({xC:i,x1:a,y1:0,x2:r,y2:l}))}if(o.config.grid.yaxis.lines.show){var c=0,u=0,d=o.globals.gridWidth,h=s+1;this.isRangeBar&&(h=o.globals.labels.length);for(var f=0;f<h+(this.isRangeBar?1:0);f++)this._drawGridLine({i:f,xCount:h+(this.isRangeBar?1:0),x1:0,y1:c,x2:d,y2:u,parent:this.elgridLinesH}),u=c+=o.globals.gridHeight/(this.isRangeBar?h:s)}}},{key:"_drawInvertedXYLines",value:function(e){var n=e.xCount,i=this.w;if(i.config.grid.xaxis.lines.show||i.config.xaxis.axisTicks.show)for(var s,o=i.globals.padHorizontal,r=i.globals.gridHeight,a=0;a<n+1;a++)i.config.grid.xaxis.lines.show&&this._drawGridLine({i:a,xCount:n+1,x1:o,y1:0,x2:s,y2:r,parent:this.elgridLinesV}),new i1(this.ctx).drawXaxisTicks(o,0,i.globals.dom.elGraphical),s=o+=i.globals.gridWidth/n;if(i.config.grid.yaxis.lines.show)for(var l=0,c=0,u=i.globals.gridWidth,d=0;d<i.globals.dataPoints+1;d++)this._drawGridLine({i:d,xCount:i.globals.dataPoints+1,x1:0,y1:l,x2:u,y2:c,parent:this.elgridLinesH}),c=l+=i.globals.gridHeight/i.globals.dataPoints}},{key:"renderGrid",value:function(){var e=this.w,n=e.globals,i=new Be(this.ctx);this.elg=i.group({class:"apexcharts-grid"}),this.elgridLinesH=i.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=i.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=i.group({class:"apexcharts-grid-borders"}),this.elg.add(this.elgridLinesH),this.elg.add(this.elgridLinesV),e.config.grid.show||(this.elgridLinesV.hide(),this.elgridLinesH.hide(),this.elGridBorders.hide());for(var s=0;s<n.seriesYAxisMap.length&&n.ignoreYAxisIndexes.includes(s);)s++;s===n.seriesYAxisMap.length&&(s=0);var o,r=n.yAxisScale[s].result.length-1;if(!n.isBarHorizontal||this.isRangeBar){var a,l,c;o=this.xaxisLabels.length,this.isRangeBar&&(r=n.labels.length,e.config.xaxis.tickAmount&&e.config.xaxis.labels.formatter&&(o=e.config.xaxis.tickAmount),((a=n.yAxisScale)===null||a===void 0||(l=a[s])===null||l===void 0||(c=l.result)===null||c===void 0?void 0:c.length)>0&&e.config.xaxis.type!=="datetime"&&(o=n.yAxisScale[s].result.length-1)),this._drawXYLines({xCount:o,tickAmount:r})}else o=r,r=n.xTickAmount,this._drawInvertedXYLines({xCount:o,tickAmount:r});return this.drawGridBands(o,r),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:n.gridWidth/o}}},{key:"drawGridBands",value:function(e,n){var i,s,o=this,r=this.w;if(((i=r.config.grid.row.colors)===null||i===void 0?void 0:i.length)>0&&function(p,m,y,b,k,C){for(var $=0,x=0;$<m;$++,x++)x>=r.config.grid[p].colors.length&&(x=0),o._drawGridBandRect({c:x,x1:y,y1:b,x2:k,y2:C,type:p}),b+=r.globals.gridHeight/n}("row",n,0,0,r.globals.gridWidth,r.globals.gridHeight/n),((s=r.config.grid.column.colors)===null||s===void 0?void 0:s.length)>0){var a=r.globals.isBarHorizontal||r.config.xaxis.tickPlacement!=="on"||r.config.xaxis.type!=="category"&&!r.config.xaxis.convertedCatToNumeric?e:e-1;r.globals.isXNumeric&&(a=r.globals.xAxisScale.result.length-1);for(var l=r.globals.padHorizontal,c=r.globals.padHorizontal+r.globals.gridWidth/a,u=r.globals.gridHeight,d=0,h=0;d<e;d++,h++){var f;h>=r.config.grid.column.colors.length&&(h=0),r.config.xaxis.type==="datetime"&&(l=this.xaxisLabels[d].position,c=(((f=this.xaxisLabels[d+1])===null||f===void 0?void 0:f.position)||r.globals.gridWidth)-this.xaxisLabels[d].position),this._drawGridBandRect({c:h,x1:l,y1:0,x2:c,y2:u,type:"column"}),l+=r.globals.gridWidth/a}}}}]),t}(),IU=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new _s(this.ctx)}return ct(t,[{key:"niceScale",value:function(e,n){var i,s,o,r,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,l=1e-11,c=this.w,u=c.globals;u.isBarHorizontal?(i=c.config.xaxis,s=Math.max((u.svgWidth-100)/25,2)):(i=c.config.yaxis[a],s=Math.max((u.svgHeight-100)/15,2)),pe.isNumber(s)||(s=10),o=i.min!==void 0&&i.min!==null,r=i.max!==void 0&&i.min!==null;var d=i.stepSize!==void 0&&i.stepSize!==null,h=i.tickAmount!==void 0&&i.tickAmount!==null,f=h?i.tickAmount:u.niceScaleDefaultTicks[Math.min(Math.round(s/2),u.niceScaleDefaultTicks.length-1)];if(u.isMultipleYAxis&&!h&&u.multiAxisTickAmount>0&&(f=u.multiAxisTickAmount,h=!0),f=f==="dataPoints"?u.dataPoints-1:Math.abs(Math.round(f)),(e===Number.MIN_VALUE&&n===0||!pe.isNumber(e)&&!pe.isNumber(n)||e===Number.MIN_VALUE&&n===-Number.MAX_VALUE)&&(e=pe.isNumber(i.min)?i.min:0,n=pe.isNumber(i.max)?i.max:e+f,u.allSeriesCollapsed=!1),e>n){console.warn("axis.min cannot be greater than axis.max: swapping min and max");var p=n;n=e,e=p}else e===n&&(e=e===0?0:e-1,n=n===0?2:n+1);var m=[];f<1&&(f=1);var y=f,b=Math.abs(n-e);!o&&e>0&&e/b<.15&&(e=0,o=!0),!r&&n<0&&-n/b<.15&&(n=0,r=!0);var k=(b=Math.abs(n-e))/y,C=k,$=Math.floor(Math.log10(C)),x=Math.pow(10,$),M=Math.ceil(C/x);if(k=C=(M=u.niceScaleAllowedMagMsd[u.yValueDecimal===0?0:1][M])*x,u.isBarHorizontal&&i.stepSize&&i.type!=="datetime"?(k=i.stepSize,d=!0):d&&(k=i.stepSize),d&&i.forceNiceScale){var P=Math.floor(Math.log10(k));k*=Math.pow(10,$-P)}if(o&&r){var T=b/y;if(h)if(d)if(pe.mod(b,k)!=0){var I=pe.getGCD(k,T);k=T/I<10?I:T}else pe.mod(k,T)==0?k=T:(T=k,h=!1);else k=T;else if(d)pe.mod(b,k)==0?T=k:k=T;else if(pe.mod(b,k)==0)T=k;else{T=b/(y=Math.ceil(b/k));var L=pe.getGCD(b,k);b/L<s&&(T=L),k=T}y=Math.round(b/k)}else{if(o||r){if(r)if(h)e=n-k*y;else{var R=e;e=k*Math.floor(e/k),Math.abs(n-e)/pe.getGCD(b,k)>s&&(e=n-k*f,e+=k*Math.floor((R-e)/k))}else if(o)if(h)n=e+k*y;else{var V=n;n=k*Math.ceil(n/k),Math.abs(n-e)/pe.getGCD(b,k)>s&&(n=e+k*f,n+=k*Math.ceil((V-n)/k))}}else if(u.isMultipleYAxis&&h){var H=k*Math.floor(e/k),F=H+k*y;F<n&&(k*=2),F=n,n=(e=H)+k*y,b=Math.abs(n-e),e>0&&e<Math.abs(F-n)&&(e=0,n=k*y),n<0&&-n<Math.abs(H-e)&&(n=0,e=-k*y)}else e=k*Math.floor(e/k),n=k*Math.ceil(n/k);b=Math.abs(n-e),k=pe.getGCD(b,k),y=Math.round(b/k)}if(h||o||r||(y=Math.ceil((b-l)/(k+l)))>16&&pe.getPrimeFactors(y).length<2&&y++,!h&&i.forceNiceScale&&u.yValueDecimal===0&&y>b&&(y=b,k=Math.round(b/y)),y>s&&(!h&&!d||i.forceNiceScale)){var z=pe.getPrimeFactors(y),N=z.length-1,q=y;e:for(var K=0;K<N;K++)for(var X=0;X<=N-K;X++){for(var U=Math.min(X+K,N),Q=q,ne=1,Z=X;Z<=U;Z++)ne*=z[Z];if((Q/=ne)<s){q=Q;break e}}k=q===y?b:b/q,y=Math.round(b/k)}u.isMultipleYAxis&&u.multiAxisTickAmount==0&&u.ignoreYAxisIndexes.indexOf(a)<0&&(u.multiAxisTickAmount=y);var ae=e-k,me=k*l;do ae+=k,m.push(pe.stripNumber(ae,7));while(n-ae>me);return{result:m,niceMin:m[0],niceMax:m[m.length-1]}}},{key:"linearScale",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:void 0,r=Math.abs(n-e),a=[];if(e===n)return{result:a=[e],niceMin:a[0],niceMax:a[a.length-1]};(i=this._adjustTicksForSmallRange(i,s,r))==="dataPoints"&&(i=this.w.globals.dataPoints-1),o||(o=r/i),o=Math.round(10*(o+Number.EPSILON))/10,i===Number.MAX_VALUE&&(i=5,o=1);for(var l=e;i>=0;)a.push(l),l=pe.preciseAddition(l,o),i-=1;return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScaleNice",value:function(e,n,i){n<=0&&(n=Math.max(e,i)),e<=0&&(e=Math.min(n,i));for(var s=[],o=Math.ceil(Math.log(n)/Math.log(i)+1),r=Math.floor(Math.log(e)/Math.log(i));r<o;r++)s.push(Math.pow(i,r));return{result:s,niceMin:s[0],niceMax:s[s.length-1]}}},{key:"logarithmicScale",value:function(e,n,i){n<=0&&(n=Math.max(e,i)),e<=0&&(e=Math.min(n,i));for(var s=[],o=Math.log(n)/Math.log(i),r=Math.log(e)/Math.log(i),a=o-r,l=Math.round(a),c=a/l,u=0,d=r;u<l;u++,d+=c)s.push(Math.pow(i,d));return s.push(Math.pow(i,o)),{result:s,niceMin:e,niceMax:n}}},{key:"_adjustTicksForSmallRange",value:function(e,n,i){var s=e;if(n!==void 0&&this.w.config.yaxis[n].labels.formatter&&this.w.config.yaxis[n].tickAmount===void 0){var o=Number(this.w.config.yaxis[n].labels.formatter(1));pe.isNumber(o)&&this.w.globals.yValueDecimal===0&&(s=Math.ceil(i))}return s<e?s:e}},{key:"setYScaleForIndex",value:function(e,n,i){var s=this.w.globals,o=this.w.config,r=s.isBarHorizontal?o.xaxis:o.yaxis[e];s.yAxisScale[e]===void 0&&(s.yAxisScale[e]=[]);var a=Math.abs(i-n);r.logarithmic&&a<=5&&(s.invalidLogScale=!0),r.logarithmic&&a>5?(s.allSeriesCollapsed=!1,s.yAxisScale[e]=r.forceNiceScale?this.logarithmicScaleNice(n,i,r.logBase):this.logarithmicScale(n,i,r.logBase)):i!==-Number.MAX_VALUE&&pe.isNumber(i)&&n!==Number.MAX_VALUE&&pe.isNumber(n)?(s.allSeriesCollapsed=!1,s.yAxisScale[e]=this.niceScale(n,i,e)):s.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e)}},{key:"setXScale",value:function(e,n){var i=this.w,s=i.globals,o=Math.abs(n-e);if(n!==-Number.MAX_VALUE&&pe.isNumber(n)){var r=s.xTickAmount;o<10&&o>1&&(r=o),s.xAxisScale=this.linearScale(e,n,r,0,i.config.xaxis.stepSize)}else s.xAxisScale=this.linearScale(0,10,10);return s.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var e=this,n=this.w.config,i=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var s=i.seriesYAxisMap,o=i.minYArr,r=i.maxYArr;i.allSeriesCollapsed=!0,i.barGroups=[],s.forEach(function(a,l){var c=[];a.forEach(function(u){var d,h=(d=n.series[u])===null||d===void 0?void 0:d.group;c.indexOf(h)<0&&c.push(h)}),a.length>0?function(){var u,d,h=Number.MAX_VALUE,f=-Number.MAX_VALUE,p=h,m=f;if(n.chart.stacked)(function(){var k=new Array(i.dataPoints).fill(0),C=[],$=[],x=[];c.forEach(function(){C.push(k.map(function(){return Number.MIN_VALUE})),$.push(k.map(function(){return Number.MIN_VALUE})),x.push(k.map(function(){return Number.MIN_VALUE}))});for(var M=function(T){!u&&n.series[a[T]].type&&(u=n.series[a[T]].type);var I=a[T];d=n.series[I].group?n.series[I].group:"axis-".concat(l),!(i.collapsedSeriesIndices.indexOf(I)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(I)<0)||(i.allSeriesCollapsed=!1,c.forEach(function(L,R){if(n.series[I].group===L)for(var V=0;V<i.series[I].length;V++){var H=i.series[I][V];H>=0?$[R][V]+=H:x[R][V]+=H,C[R][V]+=H,p=Math.min(p,H),m=Math.max(m,H)}})),u!=="bar"&&u!=="column"||i.barGroups.push(d)},P=0;P<a.length;P++)M(P);u||(u=n.chart.type),u==="bar"||u==="column"?c.forEach(function(T,I){h=Math.min(h,Math.min.apply(null,x[I])),f=Math.max(f,Math.max.apply(null,$[I]))}):(c.forEach(function(T,I){p=Math.min(p,Math.min.apply(null,C[I])),m=Math.max(m,Math.max.apply(null,C[I]))}),h=p,f=m),h===Number.MIN_VALUE&&f===Number.MIN_VALUE&&(f=-Number.MAX_VALUE)})();else for(var y=0;y<a.length;y++){var b=a[y];h=Math.min(h,o[b]),f=Math.max(f,r[b]),!(i.collapsedSeriesIndices.indexOf(b)<0&&i.ancillaryCollapsedSeriesIndices.indexOf(b)<0)||(i.allSeriesCollapsed=!1)}n.yaxis[l].min!==void 0&&(h=typeof n.yaxis[l].min=="function"?n.yaxis[l].min(h):n.yaxis[l].min),n.yaxis[l].max!==void 0&&(f=typeof n.yaxis[l].max=="function"?n.yaxis[l].max(f):n.yaxis[l].max),i.barGroups=i.barGroups.filter(function(k,C,$){return $.indexOf(k)===C}),e.setYScaleForIndex(l,h,f),a.forEach(function(k){o[k]=i.yAxisScale[l].niceMin,r[k]=i.yAxisScale[l].niceMax})}():e.setYScaleForIndex(l,0,-Number.MAX_VALUE)})}}]),t}(),CC=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.scales=new IU(e)}return ct(t,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-Number.MAX_VALUE,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,o=this.w.config,r=this.w.globals,a=-Number.MAX_VALUE,l=Number.MIN_VALUE;s===null&&(s=e+1);var c=r.series,u=c,d=c;o.chart.type==="candlestick"?(u=r.seriesCandleL,d=r.seriesCandleH):o.chart.type==="boxPlot"?(u=r.seriesCandleO,d=r.seriesCandleC):r.isRangeData&&(u=r.seriesRangeStart,d=r.seriesRangeEnd);var h=!1;if(r.seriesX.length>=s){var f,p=(f=r.brushSource)===null||f===void 0?void 0:f.w.config.chart.brush;(o.chart.zoom.enabled&&o.chart.zoom.autoScaleYaxis||p!=null&&p.enabled&&p!=null&&p.autoScaleYaxis)&&(h=!0)}for(var m=e;m<s;m++){r.dataPoints=Math.max(r.dataPoints,c[m].length);var y=o.series[m].type;r.categoryLabels.length&&(r.dataPoints=r.categoryLabels.filter(function(x){return x!==void 0}).length),r.labels.length&&o.xaxis.type!=="datetime"&&r.series.reduce(function(x,M){return x+M.length},0)!==0&&(r.dataPoints=Math.max(r.dataPoints,r.labels.length));var b=0,k=c[m].length-1;if(h){if(o.xaxis.min)for(;b<k&&r.seriesX[m][b]<o.xaxis.min;b++);if(o.xaxis.max)for(;k>b&&r.seriesX[m][k]>o.xaxis.max;k--);}for(var C=b;C<=k&&C<r.series[m].length;C++){var $=c[m][C];if($!==null&&pe.isNumber($)){switch(d[m][C]!==void 0&&(a=Math.max(a,d[m][C]),n=Math.min(n,d[m][C])),u[m][C]!==void 0&&(n=Math.min(n,u[m][C]),i=Math.max(i,u[m][C])),y){case"candlestick":r.seriesCandleC[m][C]!==void 0&&(a=Math.max(a,r.seriesCandleH[m][C]),n=Math.min(n,r.seriesCandleL[m][C]));break;case"boxPlot":r.seriesCandleC[m][C]!==void 0&&(a=Math.max(a,r.seriesCandleC[m][C]),n=Math.min(n,r.seriesCandleO[m][C]))}y&&y!=="candlestick"&&y!=="boxPlot"&&y!=="rangeArea"&&y!=="rangeBar"&&(a=Math.max(a,r.series[m][C]),n=Math.min(n,r.series[m][C])),r.seriesGoals[m]&&r.seriesGoals[m][C]&&Array.isArray(r.seriesGoals[m][C])&&r.seriesGoals[m][C].forEach(function(x){a=Math.max(a,x.value),n=Math.min(n,x.value)}),i=a,$=pe.noExponents($),pe.isFloat($)&&(r.yValueDecimal=Math.max(r.yValueDecimal,$.toString().split(".")[1].length)),l>u[m][C]&&u[m][C]<0&&(l=u[m][C])}else r.hasNullValues=!0}y!=="bar"&&y!=="column"||(l<0&&a<0&&(a=0,i=Math.max(i,0)),l===Number.MIN_VALUE&&(l=0,n=Math.min(n,0)))}return o.chart.type==="rangeBar"&&r.seriesRangeStart.length&&r.isBarHorizontal&&(l=n),o.chart.type==="bar"&&(l<0&&a<0&&(a=0),l===Number.MIN_VALUE&&(l=0)),{minY:l,maxY:a,lowestY:n,highestY:i}}},{key:"setYRange",value:function(){var e=this.w.globals,n=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var i,s=Number.MAX_VALUE;if(e.isMultipleYAxis){s=Number.MAX_VALUE;for(var o=0;o<e.series.length;o++)i=this.getMinYMaxY(o),e.minYArr[o]=i.lowestY,e.maxYArr[o]=i.highestY,s=Math.min(s,i.lowestY)}return i=this.getMinYMaxY(0,s,null,e.series.length),n.chart.type==="bar"?(e.minY=i.minY,e.maxY=i.maxY):(e.minY=i.lowestY,e.maxY=i.highestY),s=i.lowestY,n.chart.stacked&&this._setStackedMinMax(),n.chart.type==="line"||n.chart.type==="area"||n.chart.type==="scatter"||n.chart.type==="candlestick"||n.chart.type==="boxPlot"||n.chart.type==="rangeBar"&&!e.isBarHorizontal?e.minY===Number.MIN_VALUE&&s!==-Number.MAX_VALUE&&s!==e.maxY&&(e.minY=s):e.minY=e.minY!==Number.MIN_VALUE?Math.min(i.minY,e.minY):i.minY,n.yaxis.forEach(function(r,a){r.max!==void 0&&(typeof r.max=="number"?e.maxYArr[a]=r.max:typeof r.max=="function"&&(e.maxYArr[a]=r.max(e.isMultipleYAxis?e.maxYArr[a]:e.maxY)),e.maxY=e.maxYArr[a]),r.min!==void 0&&(typeof r.min=="number"?e.minYArr[a]=r.min:typeof r.min=="function"&&(e.minYArr[a]=r.min(e.isMultipleYAxis?e.minYArr[a]===Number.MIN_VALUE?0:e.minYArr[a]:e.minY)),e.minY=e.minYArr[a])}),e.isBarHorizontal&&["min","max"].forEach(function(r){n.xaxis[r]!==void 0&&typeof n.xaxis[r]=="number"&&(r==="min"?e.minY=n.xaxis[r]:e.maxY=n.xaxis[r])}),e.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),e.minY=s):(this.scales.setYScaleForIndex(0,e.minY,e.maxY),e.minY=e.yAxisScale[0].niceMin,e.maxY=e.yAxisScale[0].niceMax,e.minYArr[0]=e.minY,e.maxYArr[0]=e.maxY),e.barGroups=[],e.lineGroups=[],e.areaGroups=[],n.series.forEach(function(r){switch(r.type||n.chart.type){case"bar":case"column":e.barGroups.push(r.group);break;case"line":e.lineGroups.push(r.group);break;case"area":e.areaGroups.push(r.group)}}),e.barGroups=e.barGroups.filter(function(r,a,l){return l.indexOf(r)===a}),e.lineGroups=e.lineGroups.filter(function(r,a,l){return l.indexOf(r)===a}),e.areaGroups=e.areaGroups.filter(function(r,a,l){return l.indexOf(r)===a}),{minY:e.minY,maxY:e.maxY,minYArr:e.minYArr,maxYArr:e.maxYArr,yAxisScale:e.yAxisScale}}},{key:"setXRange",value:function(){var e=this.w.globals,n=this.w.config,i=n.xaxis.type==="numeric"||n.xaxis.type==="datetime"||n.xaxis.type==="category"&&!e.noLabelsProvided||e.noLabelsProvided||e.isXNumeric;if(e.isXNumeric&&function(){for(var l=0;l<e.series.length;l++)if(e.labels[l])for(var c=0;c<e.labels[l].length;c++)e.labels[l][c]!==null&&pe.isNumber(e.labels[l][c])&&(e.maxX=Math.max(e.maxX,e.labels[l][c]),e.initialMaxX=Math.max(e.maxX,e.labels[l][c]),e.minX=Math.min(e.minX,e.labels[l][c]),e.initialMinX=Math.min(e.minX,e.labels[l][c]))}(),e.noLabelsProvided&&n.xaxis.categories.length===0&&(e.maxX=e.labels[e.labels.length-1],e.initialMaxX=e.labels[e.labels.length-1],e.minX=1,e.initialMinX=1),e.isXNumeric||e.noLabelsProvided||e.dataFormatXNumeric){var s=10;if(n.xaxis.tickAmount===void 0)s=Math.round(e.svgWidth/150),n.xaxis.type==="numeric"&&e.dataPoints<30&&(s=e.dataPoints-1),s>e.dataPoints&&e.dataPoints!==0&&(s=e.dataPoints-1);else if(n.xaxis.tickAmount==="dataPoints"){if(e.series.length>1&&(s=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric){var o=e.maxX-e.minX;o<30&&(s=o-1)}}else s=n.xaxis.tickAmount;if(e.xTickAmount=s,n.xaxis.max!==void 0&&typeof n.xaxis.max=="number"&&(e.maxX=n.xaxis.max),n.xaxis.min!==void 0&&typeof n.xaxis.min=="number"&&(e.minX=n.xaxis.min),n.xaxis.range!==void 0&&(e.minX=e.maxX-n.xaxis.range),e.minX!==Number.MAX_VALUE&&e.maxX!==-Number.MAX_VALUE)if(n.xaxis.convertedCatToNumeric&&!e.dataFormatXNumeric){for(var r=[],a=e.minX-1;a<e.maxX;a++)r.push(a+1);e.xAxisScale={result:r,niceMin:r[0],niceMax:r[r.length-1]}}else e.xAxisScale=this.scales.setXScale(e.minX,e.maxX);else e.xAxisScale=this.scales.linearScale(0,s,s,0,n.xaxis.stepSize),e.noLabelsProvided&&e.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,s-1,0,n.xaxis.stepSize),e.seriesX=e.labels.slice());i&&(e.labels=e.xAxisScale.result.slice())}return e.isBarHorizontal&&e.labels.length&&(e.xTickAmount=e.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:e.minX,maxX:e.maxX}}},{key:"setZRange",value:function(){var e=this.w.globals;if(e.isDataXYZ){for(var n=0;n<e.series.length;n++)if(e.seriesZ[n]!==void 0)for(var i=0;i<e.seriesZ[n].length;i++)e.seriesZ[n][i]!==null&&pe.isNumber(e.seriesZ[n][i])&&(e.maxZ=Math.max(e.maxZ,e.seriesZ[n][i]),e.minZ=Math.min(e.minZ,e.seriesZ[n][i]))}}},{key:"_handleSingleDataPoint",value:function(){var e=this.w.globals,n=this.w.config;if(e.minX===e.maxX){var i=new si(this.ctx);if(n.xaxis.type==="datetime"){var s=i.getDate(e.minX);n.xaxis.labels.datetimeUTC?s.setUTCDate(s.getUTCDate()-2):s.setDate(s.getDate()-2),e.minX=new Date(s).getTime();var o=i.getDate(e.maxX);n.xaxis.labels.datetimeUTC?o.setUTCDate(o.getUTCDate()+2):o.setDate(o.getDate()+2),e.maxX=new Date(o).getTime()}else(n.xaxis.type==="numeric"||n.xaxis.type==="category"&&!e.noLabelsProvided)&&(e.minX=e.minX-2,e.initialMinX=e.minX,e.maxX=e.maxX+2,e.initialMaxX=e.maxX)}}},{key:"_getMinXDiff",value:function(){var e=this.w.globals;e.isXNumeric&&e.seriesX.forEach(function(n,i){if(n.length){n.length===1&&n.push(e.seriesX[e.maxValsInArrayIndex][e.seriesX[e.maxValsInArrayIndex].length-1]);var s=n.slice();s.sort(function(o,r){return o-r}),s.forEach(function(o,r){if(r>0){var a=o-s[r-1];a>0&&(e.minXDiff=Math.min(a,e.minXDiff))}}),e.dataPoints!==1&&e.minXDiff!==Number.MAX_VALUE||(e.minXDiff=.5)}})}},{key:"_setStackedMinMax",value:function(){var e=this,n=this.w.globals;if(n.series.length){var i=n.seriesGroups;i.length||(i=[this.w.globals.seriesNames.map(function(r){return r})]);var s={},o={};i.forEach(function(r){s[r]=[],o[r]=[],e.w.config.series.map(function(a,l){return r.indexOf(n.seriesNames[l])>-1?l:null}).filter(function(a){return a!==null}).forEach(function(a){for(var l=0;l<n.series[n.maxValsInArrayIndex].length;l++){var c,u,d,h;s[r][l]===void 0&&(s[r][l]=0,o[r][l]=0),(e.w.config.chart.stacked&&!n.comboCharts||e.w.config.chart.stacked&&n.comboCharts&&(!e.w.config.chart.stackOnlyBar||((c=e.w.config.series)===null||c===void 0||(u=c[a])===null||u===void 0?void 0:u.type)==="bar"||((d=e.w.config.series)===null||d===void 0||(h=d[a])===null||h===void 0?void 0:h.type)==="column"))&&n.series[a][l]!==null&&pe.isNumber(n.series[a][l])&&(n.series[a][l]>0?s[r][l]+=parseFloat(n.series[a][l])+1e-4:o[r][l]+=parseFloat(n.series[a][l]))}})}),Object.entries(s).forEach(function(r){var a=QH(r,1)[0];s[a].forEach(function(l,c){n.maxY=Math.max(n.maxY,s[a][c]),n.minY=Math.min(n.minY,o[a][c])})})}}}]),t}(),kS=function(){function t(e,n){lt(this,t),this.ctx=e,this.elgrid=n,this.w=e.w;var i=this.w;this.xaxisFontSize=i.config.xaxis.labels.style.fontSize,this.axisFontFamily=i.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=i.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=i.config.chart.type==="bar"&&i.config.plotOptions.bar.horizontal,this.xAxisoffX=i.config.xaxis.position==="bottom"?i.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Oc(e)}return ct(t,[{key:"drawYaxis",value:function(e){var n=this.w,i=new Be(this.ctx),s=n.config.yaxis[e].labels.style,o=s.fontSize,r=s.fontFamily,a=s.fontWeight,l=i.group({class:"apexcharts-yaxis",rel:e,transform:"translate(".concat(n.globals.translateYAxisX[e],", 0)")});if(this.axesUtils.isYAxisHidden(e))return l;var c=i.group({class:"apexcharts-yaxis-texts-g"});l.add(c);var u=n.globals.yAxisScale[e].result.length-1,d=n.globals.gridHeight/u,h=n.globals.yLabelFormatters[e],f=this.axesUtils.checkForReversedLabels(e,n.globals.yAxisScale[e].result.slice());if(n.config.yaxis[e].labels.show){var p=n.globals.translateY+n.config.yaxis[e].labels.offsetY;n.globals.isBarHorizontal?p=0:n.config.chart.type==="heatmap"&&(p-=d/2),p+=parseInt(o,10)/3;for(var m=u;m>=0;m--){var y=h(f[m],m,n),b=n.config.yaxis[e].labels.padding;n.config.yaxis[e].opposite&&n.config.yaxis.length!==0&&(b*=-1);var k=this.getTextAnchor(n.config.yaxis[e].labels.align,n.config.yaxis[e].opposite),C=this.axesUtils.getYAxisForeColor(s.colors,e),$=Array.isArray(C)?C[m]:C,x=pe.listToArray(n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-label tspan"))).map(function(P){return P.textContent}),M=i.drawText({x:b,y:p,text:x.includes(y)&&!n.config.yaxis[e].labels.showDuplicates?"":y,textAnchor:k,fontSize:o,fontFamily:r,fontWeight:a,maxWidth:n.config.yaxis[e].labels.maxWidth,foreColor:$,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(s.cssClass)});c.add(M),this.addTooltip(M,y),n.config.yaxis[e].labels.rotate!==0&&this.rotateLabel(i,M,firstLabel,n.config.yaxis[e].labels.rotate),p+=d}}return this.addYAxisTitle(i,l,e),this.addAxisBorder(i,l,e,u,d),l}},{key:"getTextAnchor",value:function(e,n){return e==="left"?"start":e==="center"?"middle":e==="right"?"end":n?"start":"end"}},{key:"addTooltip",value:function(e,n){var i=document.createElementNS(this.w.globals.SVGNS,"title");i.textContent=Array.isArray(n)?n.join(" "):n,e.node.appendChild(i)}},{key:"rotateLabel",value:function(e,n,i,s){var o=e.rotateAroundCenter(i.node),r=e.rotateAroundCenter(n.node);n.node.setAttribute("transform","rotate(".concat(s," ").concat(o.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(e,n,i){var s=this.w;if(s.config.yaxis[i].title.text!==void 0){var o=e.group({class:"apexcharts-yaxis-title"}),r=s.config.yaxis[i].opposite?s.globals.translateYAxisX[i]:0,a=e.drawText({x:r,y:s.globals.gridHeight/2+s.globals.translateY+s.config.yaxis[i].title.offsetY,text:s.config.yaxis[i].title.text,textAnchor:"end",foreColor:s.config.yaxis[i].title.style.color,fontSize:s.config.yaxis[i].title.style.fontSize,fontWeight:s.config.yaxis[i].title.style.fontWeight,fontFamily:s.config.yaxis[i].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(s.config.yaxis[i].title.style.cssClass)});o.add(a),n.add(o)}}},{key:"addAxisBorder",value:function(e,n,i,s,o){var r=this.w,a=r.config.yaxis[i].axisBorder,l=31+a.offsetX;if(r.config.yaxis[i].opposite&&(l=-31-a.offsetX),a.show){var c=e.drawLine(l,r.globals.translateY+a.offsetY-2,l,r.globals.gridHeight+r.globals.translateY+a.offsetY+2,a.color,0,a.width);n.add(c)}r.config.yaxis[i].axisTicks.show&&this.axesUtils.drawYAxisTicks(l,s,a,r.config.yaxis[i].axisTicks,i,o,n)}},{key:"drawYaxisInversed",value:function(e){var n=this.w,i=new Be(this.ctx),s=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),o=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(n.globals.translateXAxisX,", ").concat(n.globals.translateXAxisY,")")});s.add(o);var r=n.globals.yAxisScale[e].result.length-1,a=n.globals.gridWidth/r+.1,l=a+n.config.xaxis.labels.offsetX,c=n.globals.xLabelFormatter,u=this.axesUtils.checkForReversedLabels(e,n.globals.yAxisScale[e].result.slice()),d=n.globals.timescaleLabels;if(d.length>0&&(this.xaxisLabels=d.slice(),r=(u=d.slice()).length),n.config.xaxis.labels.show)for(var h=d.length?0:r;d.length?h<d.length:h>=0;d.length?h++:h--){var f=c(u[h],h,n),p=n.globals.gridWidth+n.globals.padHorizontal-(l-a+n.config.xaxis.labels.offsetX);if(d.length){var m=this.axesUtils.getLabel(u,d,p,h,this.drawnLabels,this.xaxisFontSize);p=m.x,f=m.text,this.drawnLabels.push(m.text),h===0&&n.globals.skipFirstTimelinelabel&&(f=""),h===u.length-1&&n.globals.skipLastTimelinelabel&&(f="")}var y=i.drawText({x:p,y:this.xAxisoffX+n.config.xaxis.labels.offsetY+30-(n.config.xaxis.position==="top"?n.globals.xAxisHeight+n.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[e]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:n.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label ".concat(n.config.xaxis.labels.style.cssClass)});o.add(y),y.tspan(f),this.addTooltip(y,f),l+=a}return this.inversedYAxisTitleText(s),this.inversedYAxisBorder(s),s}},{key:"inversedYAxisBorder",value:function(e){var n=this.w,i=new Be(this.ctx),s=n.config.xaxis.axisBorder;if(s.show){var o=0;n.config.chart.type==="bar"&&n.globals.isXNumeric&&(o-=15);var r=i.drawLine(n.globals.padHorizontal+o+s.offsetX,this.xAxisoffX,n.globals.gridWidth,this.xAxisoffX,s.color,0,s.height);this.elgrid&&this.elgrid.elGridBorders&&n.config.grid.show?this.elgrid.elGridBorders.add(r):e.add(r)}}},{key:"inversedYAxisTitleText",value:function(e){var n=this.w,i=new Be(this.ctx);if(n.config.xaxis.title.text!==void 0){var s=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),o=i.drawText({x:n.globals.gridWidth/2+n.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(n.config.xaxis.title.style.fontSize)+n.config.xaxis.title.offsetY+20,text:n.config.xaxis.title.text,textAnchor:"middle",fontSize:n.config.xaxis.title.style.fontSize,fontFamily:n.config.xaxis.title.style.fontFamily,fontWeight:n.config.xaxis.title.style.fontWeight,foreColor:n.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text ".concat(n.config.xaxis.title.style.cssClass)});s.add(o),e.add(s)}}},{key:"yAxisTitleRotate",value:function(e,n){var i=this.w,s=new Be(this.ctx),o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g")),r=o?o.getBoundingClientRect():{width:0,height:0},a=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-title text")),l=a?a.getBoundingClientRect():{width:0,height:0};if(a){var c=this.xPaddingForYAxisTitle(e,r,l,n);a.setAttribute("x",c.xPos-(n?10:0));var u=s.rotateAroundCenter(a);a.setAttribute("transform","rotate(".concat(n?-1*i.config.yaxis[e].title.rotate:i.config.yaxis[e].title.rotate," ").concat(u.x," ").concat(u.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,n,i,s){var o=this.w,r=0,a=10;return o.config.yaxis[e].title.text===void 0||e<0?{xPos:r,padd:0}:(s?r=n.width+o.config.yaxis[e].title.offsetX+i.width/2+a/2:(r=-1*n.width+o.config.yaxis[e].title.offsetX+a/2+i.width/2,o.globals.isBarHorizontal&&(a=25,r=-1*n.width-o.config.yaxis[e].title.offsetX-a)),{xPos:r,padd:a})}},{key:"setYAxisXPosition",value:function(e,n){var i=this.w,s=0,o=0,r=18,a=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.forEach(function(l,c){var u=i.globals.ignoreYAxisIndexes.includes(c)||!l.show||l.floating||e[c].width===0,d=e[c].width+n[c].width;l.opposite?i.globals.isBarHorizontal?(o=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[c]=o-l.labels.offsetX):(o=i.globals.gridWidth+i.globals.translateX+a,u||(a+=d+20),i.globals.translateYAxisX[c]=o-l.labels.offsetX+20):(s=i.globals.translateX-r,u||(r+=d+20),i.globals.translateYAxisX[c]=s+l.labels.offsetX)})}},{key:"setYAxisTextAlignments",value:function(){var e=this.w;pe.listToArray(e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach(function(n,i){var s=e.config.yaxis[i];if(s&&!s.floating&&s.labels.align!==void 0){var o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=pe.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"))),a=o.getBoundingClientRect();r.forEach(function(l){l.setAttribute("text-anchor",s.labels.align)}),s.labels.align!=="left"||s.opposite?s.labels.align==="center"?o.setAttribute("transform","translate(".concat(a.width/2*(s.opposite?1:-1),", 0)")):s.labels.align==="right"&&s.opposite&&o.setAttribute("transform","translate(".concat(a.width,", 0)")):o.setAttribute("transform","translate(-".concat(a.width,", 0)"))}})}}]),t}(),dCt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.documentEvent=pe.bind(this.documentEvent,this)}return ct(t,[{key:"addEventListener",value:function(e,n){var i=this.w;i.globals.events.hasOwnProperty(e)?i.globals.events[e].push(n):i.globals.events[e]=[n]}},{key:"removeEventListener",value:function(e,n){var i=this.w;if(i.globals.events.hasOwnProperty(e)){var s=i.globals.events[e].indexOf(n);s!==-1&&i.globals.events[e].splice(s,1)}}},{key:"fireEvent",value:function(e,n){var i=this.w;if(i.globals.events.hasOwnProperty(e)){n&&n.length||(n=[]);for(var s=i.globals.events[e],o=s.length,r=0;r<o;r++)s[r].apply(null,n)}}},{key:"setupEventHandlers",value:function(){var e=this,n=this.w,i=this.ctx,s=n.globals.dom.baseEl.querySelector(n.globals.chartClass);this.ctx.eventList.forEach(function(o){s.addEventListener(o,function(r){var a=Object.assign({},n,{seriesIndex:n.globals.axisCharts?n.globals.capturedSeriesIndex:0,dataPointIndex:n.globals.capturedDataPointIndex});r.type==="mousemove"||r.type==="touchmove"?typeof n.config.chart.events.mouseMove=="function"&&n.config.chart.events.mouseMove(r,i,a):r.type==="mouseleave"||r.type==="touchleave"?typeof n.config.chart.events.mouseLeave=="function"&&n.config.chart.events.mouseLeave(r,i,a):(r.type==="mouseup"&&r.which===1||r.type==="touchend")&&(typeof n.config.chart.events.click=="function"&&n.config.chart.events.click(r,i,a),i.ctx.events.fireEvent("click",[r,i,a]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(function(o){n.globals.dom.baseEl.addEventListener(o,e.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}},{key:"documentEvent",value:function(e){var n=this.w,i=e.target.className;if(e.type==="click"){var s=n.globals.dom.baseEl.querySelector(".apexcharts-menu");s&&s.classList.contains("apexcharts-menu-open")&&i!=="apexcharts-menu-icon"&&s.classList.remove("apexcharts-menu-open")}n.globals.clientX=e.type==="touchmove"?e.touches[0].clientX:e.clientX,n.globals.clientY=e.type==="touchmove"?e.touches[0].clientY:e.clientY}}]),t}(),hCt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"setCurrentLocaleValues",value:function(e){var n=this.w.config.chart.locales;window.Apex.chart&&window.Apex.chart.locales&&window.Apex.chart.locales.length>0&&(n=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=n.filter(function(o){return o.name===e})[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var s=pe.extend(EU,i);this.w.globals.locale=s.options}}]),t}(),fCt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"drawAxis",value:function(e,n){var i,s,o=this,r=this.w.globals,a=this.w.config,l=new i1(this.ctx,n),c=new kS(this.ctx,n);r.axisCharts&&e!=="radar"&&(r.isBarHorizontal?(s=c.drawYaxisInversed(0),i=l.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(s)):(i=l.drawXaxis(),r.dom.elGraphical.add(i),a.yaxis.map(function(u,d){if(r.ignoreYAxisIndexes.indexOf(d)===-1&&(s=c.drawYaxis(d),r.dom.Paper.add(s),o.w.config.grid.position==="back")){var h=r.dom.Paper.children()[1];h.remove(),r.dom.Paper.add(h)}})))}}]),t}(),xC=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"drawXCrosshairs",value:function(){var e=this.w,n=new Be(this.ctx),i=new ri(this.ctx),s=e.config.xaxis.crosshairs.fill.gradient,o=e.config.xaxis.crosshairs.dropShadow,r=e.config.xaxis.crosshairs.fill.type,a=s.colorFrom,l=s.colorTo,c=s.opacityFrom,u=s.opacityTo,d=s.stops,h=o.enabled,f=o.left,p=o.top,m=o.blur,y=o.color,b=o.opacity,k=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){r==="gradient"&&(k=n.drawGradient("vertical",a,l,c,u,null,d,null));var C=n.drawRect();e.config.xaxis.crosshairs.width===1&&(C=n.drawLine());var $=e.globals.gridHeight;(!pe.isNumber($)||$<0)&&($=0);var x=e.config.xaxis.crosshairs.width;(!pe.isNumber(x)||x<0)&&(x=0),C.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:$,width:x,height:$,fill:k,filter:"none","fill-opacity":e.config.xaxis.crosshairs.opacity,stroke:e.config.xaxis.crosshairs.stroke.color,"stroke-width":e.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":e.config.xaxis.crosshairs.stroke.dashArray}),h&&(C=i.dropShadow(C,{left:f,top:p,blur:m,color:y,opacity:b})),e.globals.dom.elGraphical.add(C)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,n=new Be(this.ctx),i=e.config.yaxis[0].crosshairs,s=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var o=n.drawLine(-s,0,e.globals.gridWidth+s,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);o.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(o)}var r=n.drawLine(-s,0,e.globals.gridWidth+s,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(r)}}]),t}(),pCt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"checkResponsiveConfig",value:function(e){var n=this,i=this.w,s=i.config;if(s.responsive.length!==0){var o=s.responsive.slice();o.sort(function(c,u){return c.breakpoint>u.breakpoint?1:u.breakpoint>c.breakpoint?-1:0}).reverse();var r=new s1({}),a=function(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},u=o[0].breakpoint,d=window.innerWidth>0?window.innerWidth:screen.width;if(d>u){var h=pe.clone(i.globals.initialConfig);h.series=pe.clone(i.config.series);var f=_s.extendArrayProps(r,h,i);c=pe.extend(f,c),c=pe.extend(i.config,c),n.overrideResponsiveOptions(c)}else for(var p=0;p<o.length;p++)d<o[p].breakpoint&&(c=_s.extendArrayProps(r,o[p].options,i),c=pe.extend(i.config,c),n.overrideResponsiveOptions(c))};if(e){var l=_s.extendArrayProps(r,e,i);l=pe.extend(i.config,l),a(l=pe.extend(l,e))}else a({})}}},{key:"overrideResponsiveOptions",value:function(e){var n=new s1(e).init({responsiveOverride:!0});this.w.config=n}}]),t}(),mCt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}return ct(t,[{key:"checkHeatmapDistributed",value:function(){var e=this.w.config,n=e.chart,i=e.plotOptions;return n.type==="treemap"&&i.treemap&&i.treemap.distributed||n.type==="heatmap"&&i.heatmap&&i.heatmap.distributed}},{key:"checkBarDistributed",value:function(){var e=this.w.config,n=e.chart,i=e.plotOptions;return i.bar&&i.bar.distributed&&(n.type==="bar"||n.type==="rangeBar")}},{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var e=this.w,n=new pe;e.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(e.config.theme.mode));var i=Ns(e.config.colors||e.config.fill.colors||[]);e.globals.colors=this.getColors(i),this.applySeriesColors(e.globals.seriesColors,e.globals.colors),e.config.theme.monochrome.enabled&&(e.globals.colors=this.getMonochromeColors(e.config.theme.monochrome,e.globals.series,n));var s=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],s),this.applyDataLabelsColors(s),this.applyRadarPolygonsColors(),this.applyMarkersColors(s)}},{key:"getColors",value:function(e){var n=this,i=this.w;return e&&e.length!==0?Array.isArray(e)&&e.length>0&&typeof e[0]=="function"?(this.isColorFn=!0,i.config.series.map(function(s,o){var r=e[o]||e[0];return typeof r=="function"?r({value:i.globals.axisCharts?i.globals.series[o][0]||0:i.globals.series[o],seriesIndex:o,dataPointIndex:o,w:n.w}):r})):e:this.predefined()}},{key:"applySeriesColors",value:function(e,n){e.forEach(function(i,s){i&&(n[s]=i)})}},{key:"getMonochromeColors",value:function(e,n,i){var s=e.color,o=e.shadeIntensity,r=e.shadeTo,a=this.isBarDistributed||this.isHeatmapDistributed?n[0].length*n.length:n.length,l=1/(a/o),c=0;return Array.from({length:a},function(){var u=r==="dark"?i.shadeColor(-1*c,s):i.shadeColor(c,s);return c+=l,u})}},{key:"applyColorTypes",value:function(e,n){var i=this,s=this.w;e.forEach(function(o){s.globals[o].colors=s.config[o].colors===void 0?i.isColorFn?s.config.colors:n:s.config[o].colors.slice(),i.pushExtraColors(s.globals[o].colors)})}},{key:"applyDataLabelsColors",value:function(e){var n=this.w;n.globals.dataLabels.style.colors=n.config.dataLabels.style.colors===void 0?e:n.config.dataLabels.style.colors.slice(),this.pushExtraColors(n.globals.dataLabels.style.colors,50)}},{key:"applyRadarPolygonsColors",value:function(){var e=this.w;e.globals.radarPolygons.fill.colors=e.config.plotOptions.radar.polygons.fill.colors===void 0?[e.config.theme.mode==="dark"?"#424242":"none"]:e.config.plotOptions.radar.polygons.fill.colors.slice(),this.pushExtraColors(e.globals.radarPolygons.fill.colors,20)}},{key:"applyMarkersColors",value:function(e){var n=this.w;n.globals.markers.colors=n.config.markers.colors===void 0?e:n.config.markers.colors.slice(),this.pushExtraColors(n.globals.markers.colors)}},{key:"pushExtraColors",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,s=this.w,o=n||s.globals.series.length;if(i===null&&(i=this.isBarDistributed||this.isHeatmapDistributed||s.config.chart.type==="heatmap"&&s.config.plotOptions.heatmap&&s.config.plotOptions.heatmap.colorScale.inverse),i&&s.globals.series.length&&(o=s.globals.series[s.globals.maxValsInArrayIndex].length*s.globals.series.length),e.length<o)for(var r=o-e.length,a=0;a<r;a++)e.push(e[a])}},{key:"updateThemeOptions",value:function(e){e.chart=e.chart||{},e.tooltip=e.tooltip||{};var n=e.theme.mode,i=n==="dark"?"palette4":n==="light"?"palette1":e.theme.palette||"palette1",s=n==="dark"?"#f6f7f8":n==="light"?"#373d3f":e.chart.foreColor||"#373d3f";return e.tooltip.theme=n||"light",e.chart.foreColor=s,e.theme.palette=i,e}},{key:"predefined",value:function(){var e={palette1:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"],palette2:["#3f51b5","#03a9f4","#4caf50","#f9ce1d","#FF9800"],palette3:["#33b2df","#546E7A","#d4526e","#13d8aa","#A5978B"],palette4:["#4ecdc4","#c7f464","#81D4FA","#fd6a6a","#546E7A"],palette5:["#2b908f","#f9a3a4","#90ee7e","#fa4443","#69d2e7"],palette6:["#449DD1","#F86624","#EA3546","#662E9B","#C5D86D"],palette7:["#D7263D","#1B998B","#2E294E","#F46036","#E2C044"],palette8:["#662E9B","#F86624","#F9C80E","#EA3546","#43BCCD"],palette9:["#5C4742","#A5978B","#8D5B4C","#5A2A27","#C4BBAF"],palette10:["#A300D6","#7D02EB","#5653FE","#2983FF","#00B1F2"],default:["#008FFB","#00E396","#FEB019","#FF4560","#775DD0"]};return e[this.w.config.theme.palette]||e.default}}]),t}(),gCt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(e){var n=this.w,i=e==="title"?n.config.title:n.config.subtitle,s=n.globals.svgWidth/2,o=i.offsetY,r="middle";if(i.align==="left"?(s=10,r="start"):i.align==="right"&&(s=n.globals.svgWidth-10,r="end"),s+=i.offsetX,o=o+parseInt(i.style.fontSize,10)+i.margin/2,i.text!==void 0){var a=new Be(this.ctx).drawText({x:s,y:o,text:i.text,textAnchor:r,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,foreColor:i.style.color,opacity:1});a.node.setAttribute("class","apexcharts-".concat(e,"-text")),n.globals.dom.Paper.add(a)}}}]),t}(),vCt=function(){function t(e){lt(this,t),this.w=e.w,this.dCtx=e}return ct(t,[{key:"getTitleSubtitleCoords",value:function(e){var n=this.w,i=0,s=0,o=e==="title"?n.config.title.floating:n.config.subtitle.floating,r=n.globals.dom.baseEl.querySelector(".apexcharts-".concat(e,"-text"));if(r!==null&&!o){var a=r.getBoundingClientRect();i=a.width,s=n.globals.axisCharts?a.height+5:a.height}return{width:i,height:s}}},{key:"getLegendsRect",value:function(){var e=this.w,n=e.globals.dom.elLegendWrap;e.config.legend.height||e.config.legend.position!=="top"&&e.config.legend.position!=="bottom"||(n.style.maxHeight=e.globals.svgHeight/2+"px");var i=Object.assign({},pe.getBoundingClientRect(n));return n!==null&&!e.config.legend.floating&&e.config.legend.show?this.dCtx.lgRect={x:i.x,y:i.y,height:i.height,width:i.height===0?0:i.width}:this.dCtx.lgRect={x:0,y:0,height:0,width:0},e.config.legend.position!=="left"&&e.config.legend.position!=="right"||1.5*this.dCtx.lgRect.width>e.globals.svgWidth&&(this.dCtx.lgRect.width=e.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getDatalabelsRect",value:function(){var e=this,n=this.w,i=[];n.config.series.forEach(function(l,c){l.data.forEach(function(u,d){var h;h=n.globals.series[c][d],s=n.config.dataLabels.formatter(h,{ctx:e.dCtx.ctx,seriesIndex:c,dataPointIndex:d,w:n}),i.push(s)})});var s=pe.getLargestStringFromArr(i),o=new Be(this.dCtx.ctx),r=n.config.dataLabels.style,a=o.getTextRects(s,parseInt(r.fontSize),r.fontFamily);return{width:1.05*a.width,height:a.height}}},{key:"getLargestStringFromMultiArr",value:function(e,n){var i=e;if(this.w.globals.isMultiLineX){var s=n.map(function(r,a){return Array.isArray(r)?r.length:1}),o=Math.max.apply(Math,Ns(s));i=n[s.indexOf(o)]}return i}}]),t}(),_Ct=function(){function t(e){lt(this,t),this.w=e.w,this.dCtx=e}return ct(t,[{key:"getxAxisLabelsCoords",value:function(){var e,n=this.w,i=n.globals.labels.slice();if(n.config.xaxis.convertedCatToNumeric&&i.length===0&&(i=n.globals.categoryLabels),n.globals.timescaleLabels.length>0){var s=this.getxAxisTimeScaleLabelsCoords();e={width:s.width,height:s.height},n.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends=n.config.legend.position!=="left"&&n.config.legend.position!=="right"||n.config.legend.floating?0:this.dCtx.lgRect.width;var o=n.globals.xLabelFormatter,r=pe.getLargestStringFromArr(i),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);n.globals.isBarHorizontal&&(a=r=n.globals.yAxisScale[0].result.reduce(function(p,m){return p.length>m.length?p:m},0));var l=new sv(this.dCtx.ctx),c=r;r=l.xLabelFormat(o,r,c,{i:void 0,dateFormatter:new si(this.dCtx.ctx).formatDate,w:n}),a=l.xLabelFormat(o,a,c,{i:void 0,dateFormatter:new si(this.dCtx.ctx).formatDate,w:n}),(n.config.xaxis.convertedCatToNumeric&&r===void 0||String(r).trim()==="")&&(a=r="1");var u=new Be(this.dCtx.ctx),d=u.getTextRects(r,n.config.xaxis.labels.style.fontSize),h=d;if(r!==a&&(h=u.getTextRects(a,n.config.xaxis.labels.style.fontSize)),(e={width:d.width>=h.width?d.width:h.width,height:d.height>=h.height?d.height:h.height}).width*i.length>n.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&n.config.xaxis.labels.rotate!==0||n.config.xaxis.labels.rotateAlways){if(!n.globals.isBarHorizontal){n.globals.rotateXLabels=!0;var f=function(p){return u.getTextRects(p,n.config.xaxis.labels.style.fontSize,n.config.xaxis.labels.style.fontFamily,"rotate(".concat(n.config.xaxis.labels.rotate," 0 0)"),!1)};d=f(r),r!==a&&(h=f(a)),e.height=(d.height>h.height?d.height:h.height)/1.5,e.width=d.width>h.width?d.width:h.width}}else n.globals.rotateXLabels=!1}return n.config.xaxis.labels.show||(e={width:0,height:0}),{width:e.width,height:e.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var e,n=this.w;if(!n.globals.hasXaxisGroups)return{width:0,height:0};var i,s=((e=n.config.xaxis.group.style)===null||e===void 0?void 0:e.fontSize)||n.config.xaxis.labels.style.fontSize,o=n.globals.groups.map(function(d){return d.title}),r=pe.getLargestStringFromArr(o),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,o),l=new Be(this.dCtx.ctx),c=l.getTextRects(r,s),u=c;return r!==a&&(u=l.getTextRects(a,s)),i={width:c.width>=u.width?c.width:u.width,height:c.height>=u.height?c.height:u.height},n.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,n=0,i=0;if(e.config.xaxis.title.text!==void 0){var s=new Be(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);n=s.width,i=s.height}return{width:n,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,n=this.w;this.dCtx.timescaleLabels=n.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map(function(o){return o.value}),s=i.reduce(function(o,r){return o===void 0?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):o.length>r.length?o:r},0);return 1.05*(e=new Be(this.dCtx.ctx).getTextRects(s,n.config.xaxis.labels.style.fontSize)).width*i.length>n.globals.gridWidth&&n.config.xaxis.labels.rotate!==0&&(n.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var n=this,i=this.w,s=i.globals,o=i.config,r=o.xaxis.type,a=e.width;s.skipLastTimelinelabel=!1,s.skipFirstTimelinelabel=!1;var l=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,c=function(u,d){o.yaxis.length>1&&function(h){return s.collapsedSeriesIndices.indexOf(h)!==-1}(d)||function(h){if(n.dCtx.timescaleLabels&&n.dCtx.timescaleLabels.length){var f=n.dCtx.timescaleLabels[0],p=n.dCtx.timescaleLabels[n.dCtx.timescaleLabels.length-1].position+a/1.75-n.dCtx.yAxisWidthRight,m=f.position-a/1.75+n.dCtx.yAxisWidthLeft,y=i.config.legend.position==="right"&&n.dCtx.lgRect.width>0?n.dCtx.lgRect.width:0;p>s.svgWidth-s.translateX-y&&(s.skipLastTimelinelabel=!0),m<-(h.show&&!h.floating||o.chart.type!=="bar"&&o.chart.type!=="candlestick"&&o.chart.type!=="rangeBar"&&o.chart.type!=="boxPlot"?10:a/1.75)&&(s.skipFirstTimelinelabel=!0)}else r==="datetime"?n.dCtx.gridPad.right<a&&!s.rotateXLabels&&(s.skipLastTimelinelabel=!0):r!=="datetime"&&n.dCtx.gridPad.right<a/2-n.dCtx.yAxisWidthRight&&!s.rotateXLabels&&!i.config.xaxis.labels.trim&&(n.dCtx.xPadRight=a/2+1)}(u)};o.yaxis.forEach(function(u,d){l?(n.dCtx.gridPad.left<a&&(n.dCtx.xPadLeft=a/2+1),n.dCtx.xPadRight=a/2+1):c(u,d)})}}]),t}(),yCt=function(){function t(e){lt(this,t),this.w=e.w,this.dCtx=e}return ct(t,[{key:"getyAxisLabelsCoords",value:function(){var e=this,n=this.w,i=[],s=10,o=new Oc(this.dCtx.ctx);return n.config.yaxis.map(function(r,a){var l={seriesIndex:a,dataPointIndex:-1,w:n},c=n.globals.yAxisScale[a],u=0;if(!o.isYAxisHidden(a)&&r.labels.show&&r.labels.minWidth!==void 0&&(u=r.labels.minWidth),!o.isYAxisHidden(a)&&r.labels.show&&c.result.length){var d=n.globals.yLabelFormatters[a],h=c.niceMin===Number.MIN_VALUE?0:c.niceMin,f=c.result.reduce(function($,x){var M,P;return((M=String(d($,l)))===null||M===void 0?void 0:M.length)>((P=String(d(x,l)))===null||P===void 0?void 0:P.length)?$:x},h),p=f=d(f,l);if(f!==void 0&&f.length!==0||(f=c.niceMax),n.globals.isBarHorizontal){s=0;var m=n.globals.labels.slice();f=pe.getLargestStringFromArr(m),f=d(f,{seriesIndex:a,dataPointIndex:-1,w:n}),p=e.dCtx.dimHelpers.getLargestStringFromMultiArr(f,m)}var y=new Be(e.dCtx.ctx),b="rotate(".concat(r.labels.rotate," 0 0)"),k=y.getTextRects(f,r.labels.style.fontSize,r.labels.style.fontFamily,b,!1),C=k;f!==p&&(C=y.getTextRects(p,r.labels.style.fontSize,r.labels.style.fontFamily,b,!1)),i.push({width:(u>C.width||u>k.width?u:C.width>k.width?C.width:k.width)+s,height:C.height>k.height?C.height:k.height})}else i.push({width:0,height:0})}),i}},{key:"getyAxisTitleCoords",value:function(){var e=this,n=this.w,i=[];return n.config.yaxis.map(function(s,o){if(s.show&&s.title.text!==void 0){var r=new Be(e.dCtx.ctx),a="rotate(".concat(s.title.rotate," 0 0)"),l=r.getTextRects(s.title.text,s.title.style.fontSize,s.title.style.fontFamily,a,!1);i.push({width:l.width,height:l.height})}else i.push({width:0,height:0})}),i}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,n=0,i=0,s=0,o=e.globals.yAxisScale.length>1?10:0,r=new Oc(this.dCtx.ctx),a=function(l,c){var u=e.config.yaxis[c].floating,d=0;l.width>0&&!u?(d=l.width+o,function(h){return e.globals.ignoreYAxisIndexes.indexOf(h)>-1}(c)&&(d=d-l.width-o)):d=u||r.isYAxisHidden(c)?0:5,e.config.yaxis[c].opposite?s+=d:i+=d,n+=d};return e.globals.yLabelsCoords.map(function(l,c){a(l,c)}),e.globals.yTitleCoords.map(function(l,c){a(l,c)}),e.globals.isBarHorizontal&&!e.config.yaxis[0].floating&&(n=e.globals.yLabelsCoords[0].width+e.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=s,n}}]),t}(),bCt=function(){function t(e){lt(this,t),this.w=e.w,this.dCtx=e}return ct(t,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var n=this.w,i=n.config,s=n.globals;if(s.noData||s.collapsedSeries.length+s.ancillaryCollapsedSeries.length===i.series.length)return 0;var o=function(f){return["bar","rangeBar","candlestick","boxPlot"].includes(f)},r=i.chart.type,a=0,l=o(r)?i.series.length:1;s.comboBarCount>0&&(l=s.comboBarCount),s.collapsedSeries.forEach(function(f){o(f.type)&&(l-=1)}),i.chart.stacked&&(l=1);var c=o(r)||s.comboBarCount>0,u=Math.abs(s.initialMaxX-s.initialMinX);if(c&&s.isXNumeric&&!s.isBarHorizontal&&l>0&&u!==0){u<=3&&(u=s.dataPoints);var d=u/e,h=s.minXDiff&&s.minXDiff/d>0?s.minXDiff/d:0;h>e/2&&(h/=2),(a=h*parseInt(i.plotOptions.bar.columnWidth,10)/100)<1&&(a=1),s.barPadForNumericAxis=a}return a}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,n=this.w,i=n.globals,s=this.dCtx.isSparkline||!i.axisCharts?0:10;["title","subtitle"].forEach(function(a){n.config[a].text!==void 0?s+=n.config[a].margin:s+=e.dCtx.isSparkline||!i.axisCharts?0:5}),!n.config.legend.show||n.config.legend.position!=="bottom"||n.config.legend.floating||i.axisCharts||(s+=10);var o=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight-=o.height+r.height+s,i.translateY+=o.height+r.height+s}},{key:"setGridXPosForDualYAxis",value:function(e,n){var i=this.w,s=new Oc(this.dCtx.ctx);i.config.yaxis.forEach(function(o,r){i.globals.ignoreYAxisIndexes.indexOf(r)!==-1||o.floating||s.isYAxisHidden(r)||(o.opposite&&(i.globals.translateX-=n[r].width+e[r].width+parseInt(o.labels.style.fontSize,10)/1.2+12),i.globals.translateX<2&&(i.globals.translateX=2))})}}]),t}(),Vy=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new vCt(this),this.dimYAxis=new yCt(this),this.dimXAxis=new _Ct(this),this.dimGrid=new bCt(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return ct(t,[{key:"plotCoords",value:function(){var e=this,n=this.w,i=n.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var s=Array.isArray(n.config.stroke.width)?Math.max.apply(Math,Ns(n.config.stroke.width)):n.config.stroke.width;this.isSparkline&&((n.config.markers.discrete.length>0||n.config.markers.size>0)&&Object.entries(this.gridPad).forEach(function(r){var a=QH(r,2),l=a[0],c=a[1];e.gridPad[l]=Math.max(c,e.w.globals.markers.largestSize/1.5)}),this.gridPad.top=Math.max(s/2,this.gridPad.top),this.gridPad.bottom=Math.max(s/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var o=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*o,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(o>0?o:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,n=this.w,i=n.globals,s=this.dimYAxis.getyAxisLabelsCoords(),o=this.dimYAxis.getyAxisTitleCoords();i.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),n.globals.yLabelsCoords=[],n.globals.yTitleCoords=[],n.config.yaxis.map(function(f,p){n.globals.yLabelsCoords.push({width:s[p].width,index:p}),n.globals.yTitleCoords.push({width:o[p].width,index:p})}),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),a=this.dimXAxis.getxAxisGroupLabelsCoords(),l=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,l,a),i.translateXAxisY=n.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=n.globals.rotateXLabels&&n.globals.isXNumeric&&n.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,n.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(n.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+n.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+n.config.xaxis.labels.offsetX;var c=this.yAxisWidth,u=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-l.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var d=10;(n.config.chart.type==="radar"||this.isSparkline)&&(c=0,u=0),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||n.config.chart.type==="treemap")&&(c=0,u=0,d=0),this.isSparkline||n.config.chart.type==="treemap"||this.dimXAxis.additionalPaddingXLabels(r);var h=function(){i.translateX=c+e.datalabelsCoords.width,i.gridHeight=i.svgHeight-e.lgRect.height-u-(e.isSparkline||n.config.chart.type==="treemap"?0:n.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-c-2*e.datalabelsCoords.width};switch(n.config.xaxis.position==="top"&&(d=i.xAxisHeight-n.config.xaxis.axisTicks.height-5),n.config.legend.position){case"bottom":i.translateY=d,h();break;case"top":i.translateY=this.lgRect.height+d,h();break;case"left":i.translateY=d,i.translateX=this.lgRect.width+c+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-u-12,i.gridWidth=i.svgWidth-this.lgRect.width-c-2*this.datalabelsCoords.width;break;case"right":i.translateY=d,i.translateX=c+this.datalabelsCoords.width,i.gridHeight=i.svgHeight-u-12,i.gridWidth=i.svgWidth-this.lgRect.width-c-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(o,s),new kS(this.ctx).setYAxisXPosition(s,o)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,n=e.globals,i=e.config,s=0;e.config.legend.show&&!e.config.legend.floating&&(s=20);var o=i.chart.type==="pie"||i.chart.type==="polarArea"||i.chart.type==="donut"?"pie":"radialBar",r=i.plotOptions[o].offsetY,a=i.plotOptions[o].offsetX;if(!i.legend.show||i.legend.floating){n.gridHeight=n.svgHeight;var l=n.dom.elWrap.getBoundingClientRect().width;return n.gridWidth=Math.min(l,n.gridHeight),n.translateY=r,void(n.translateX=a+(n.svgWidth-n.gridWidth)/2)}switch(i.legend.position){case"bottom":n.gridHeight=n.svgHeight-this.lgRect.height,n.gridWidth=n.svgWidth,n.translateY=r-10,n.translateX=a+(n.svgWidth-n.gridWidth)/2;break;case"top":n.gridHeight=n.svgHeight-this.lgRect.height,n.gridWidth=n.svgWidth,n.translateY=this.lgRect.height+r+10,n.translateX=a+(n.svgWidth-n.gridWidth)/2;break;case"left":n.gridWidth=n.svgWidth-this.lgRect.width-s,n.gridHeight=i.chart.height!=="auto"?n.svgHeight:n.gridWidth,n.translateY=r,n.translateX=a+this.lgRect.width+s;break;case"right":n.gridWidth=n.svgWidth-this.lgRect.width-s-5,n.gridHeight=i.chart.height!=="auto"?n.svgHeight:n.gridWidth,n.translateY=r,n.translateX=a+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(e,n,i){var s=this.w,o=s.globals.hasXaxisGroups?2:1,r=i.height+e.height+n.height,a=s.globals.isMultiLineX?1.2:s.globals.LINE_HEIGHT_RATIO,l=s.globals.rotateXLabels?22:10,c=s.globals.rotateXLabels&&s.config.legend.position==="bottom"?10:0;this.xAxisHeight=r*a+o*l+c,this.xAxisWidth=e.width,this.xAxisHeight-n.height>s.config.xaxis.labels.maxHeight&&(this.xAxisHeight=s.config.xaxis.labels.maxHeight),s.config.xaxis.labels.minHeight&&this.xAxisHeight<s.config.xaxis.labels.minHeight&&(this.xAxisHeight=s.config.xaxis.labels.minHeight),s.config.xaxis.floating&&(this.xAxisHeight=0);var u=0,d=0;s.config.yaxis.forEach(function(h){u+=h.labels.minWidth,d+=h.labels.maxWidth}),this.yAxisWidth<u&&(this.yAxisWidth=u),this.yAxisWidth>d&&(this.yAxisWidth=d)}}]),t}(),wCt=function(){function t(e){lt(this,t),this.w=e.w,this.lgCtx=e}return ct(t,[{key:"getLegendStyles",value:function(){var e,n,i,s=document.createElement("style");s.setAttribute("type","text/css");var o=((e=this.lgCtx.ctx)===null||e===void 0||(n=e.opts)===null||n===void 0||(i=n.chart)===null||i===void 0?void 0:i.nonce)||this.w.config.chart.nonce;o&&s.setAttribute("nonce",o);var r=document.createTextNode(`
      .apexcharts-flip-y {
        transform: scaleY(-1) translateY(-100%);
        transform-origin: top;
        transform-box: fill-box;
      }
      .apexcharts-flip-x {
        transform: scaleX(-1);
        transform-origin: center;
        transform-box: fill-box;
      }
      .apexcharts-legend {
        display: flex;
        overflow: auto;
        padding: 0 10px;
      }
      .apexcharts-legend.apexcharts-legend-group-horizontal {
        flex-direction: column;
      }
      .apexcharts-legend-group {
        display: flex;
      }
      .apexcharts-legend-group-vertical {
        flex-direction: column-reverse;
      }
      .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {
        flex-wrap: wrap
      }
      .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
        flex-direction: column;
        bottom: 0;
      }
      .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {
        justify-content: flex-start;
        align-items: flex-start;
      }
      .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {
        justify-content: center;
        align-items: center;
      }
      .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {
        justify-content: flex-end;
        align-items: flex-end;
      }
      .apexcharts-legend-series {
        cursor: pointer;
        line-height: normal;
        display: flex;
        align-items: center;
      }
      .apexcharts-legend-text {
        position: relative;
        font-size: 14px;
      }
      .apexcharts-legend-text *, .apexcharts-legend-marker * {
        pointer-events: none;
      }
      .apexcharts-legend-marker {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        margin-right: 1px;
      }

      .apexcharts-legend-series.apexcharts-no-click {
        cursor: auto;
      }
      .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {
        display: none !important;
      }
      .apexcharts-inactive-legend {
        opacity: 0.45;
      }

    `);return s.appendChild(r),s}},{key:"getLegendDimensions",value:function(){var e=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),n=e.width;return{clwh:e.height,clww:n}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(e,n){var i=this,s=this.w;if(s.globals.axisCharts||s.config.chart.type==="radialBar"){s.globals.resized=!0;var o=null,r=null;s.globals.risingSeries=[],s.globals.axisCharts?(o=s.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),r=parseInt(o.getAttribute("data:realIndex"),10)):(o=s.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),r=parseInt(o.getAttribute("rel"),10)-1),n?[{cs:s.globals.collapsedSeries,csi:s.globals.collapsedSeriesIndices},{cs:s.globals.ancillaryCollapsedSeries,csi:s.globals.ancillaryCollapsedSeriesIndices}].forEach(function(u){i.riseCollapsedSeries(u.cs,u.csi,r)}):this.hideSeries({seriesEl:o,realIndex:r})}else{var a=s.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(e+1,"'] path")),l=s.config.chart.type;if(l==="pie"||l==="polarArea"||l==="donut"){var c=s.config.plotOptions.pie.donut.labels;new Be(this.lgCtx.ctx).pathMouseDown(a,null),this.lgCtx.ctx.pie.printDataLabelsInner(a.node,c)}a.fire("click")}}},{key:"getSeriesAfterCollapsing",value:function(e){var n=e.realIndex,i=this.w,s=i.globals,o=pe.clone(i.config.series);if(s.axisCharts){var r=i.config.yaxis[s.seriesYAxisReverseMap[n]],a={index:n,data:o[n].data.slice(),type:o[n].type||i.config.chart.type};if(r&&r.show&&r.showAlways)s.ancillaryCollapsedSeriesIndices.indexOf(n)<0&&(s.ancillaryCollapsedSeries.push(a),s.ancillaryCollapsedSeriesIndices.push(n));else if(s.collapsedSeriesIndices.indexOf(n)<0){s.collapsedSeries.push(a),s.collapsedSeriesIndices.push(n);var l=s.risingSeries.indexOf(n);s.risingSeries.splice(l,1)}}else s.collapsedSeries.push({index:n,data:o[n]}),s.collapsedSeriesIndices.push(n);return s.allSeriesCollapsed=s.collapsedSeries.length+s.ancillaryCollapsedSeries.length===i.config.series.length,this._getSeriesBasedOnCollapsedState(o)}},{key:"hideSeries",value:function(e){for(var n=e.seriesEl,i=e.realIndex,s=this.w,o=this.getSeriesAfterCollapsing({realIndex:i}),r=n.childNodes,a=0;a<r.length;a++)r[a].classList.contains("apexcharts-series-markers-wrap")&&(r[a].classList.contains("apexcharts-hide")?r[a].classList.remove("apexcharts-hide"):r[a].classList.add("apexcharts-hide"));this.lgCtx.ctx.updateHelpers._updateSeries(o,s.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(e,n,i){var s=this.w,o=pe.clone(s.config.series);if(e.length>0){for(var r=0;r<e.length;r++)e[r].index===i&&(s.globals.axisCharts?o[i].data=e[r].data.slice():o[i]=e[r].data,typeof o[i]!="number"&&(o[i].hidden=!1),e.splice(r,1),n.splice(r,1),s.globals.risingSeries.push(i));o=this._getSeriesBasedOnCollapsedState(o),this.lgCtx.ctx.updateHelpers._updateSeries(o,s.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(e){var n=this.w,i=0;return n.globals.axisCharts?e.forEach(function(s,o){n.globals.collapsedSeriesIndices.indexOf(o)<0&&n.globals.ancillaryCollapsedSeriesIndices.indexOf(o)<0||(e[o].data=[],i++)}):e.forEach(function(s,o){!n.globals.collapsedSeriesIndices.indexOf(o)<0&&(e[o]=0,i++)}),n.globals.allSeriesCollapsed=i===e.length,e}}]),t}(),LU=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed=this.w.config.chart.type==="bar"&&this.w.config.plotOptions.bar.distributed&&this.w.config.series.length===1,this.legendHelpers=new wCt(this)}return ct(t,[{key:"init",value:function(){var e=this.w,n=e.globals,i=e.config,s=i.legend.showForSingleSeries&&n.series.length===1||this.isBarsDistributed||n.series.length>1;if(this.legendHelpers.appendToForeignObject(),(s||!n.axisCharts)&&i.legend.show){for(;n.dom.elLegendWrap.firstChild;)n.dom.elLegendWrap.removeChild(n.dom.elLegendWrap.firstChild);this.drawLegends(),i.legend.position==="bottom"||i.legend.position==="top"?this.legendAlignHorizontal():i.legend.position!=="right"&&i.legend.position!=="left"||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(e){var n=e.i,i=e.fillcolor,s=this.w,o=document.createElement("span");o.classList.add("apexcharts-legend-marker");var r=s.config.legend.markers.shape||s.config.markers.shape,a=r;Array.isArray(r)&&(a=r[n]);var l=Array.isArray(s.config.legend.markers.size)?parseFloat(s.config.legend.markers.size[n]):parseFloat(s.config.legend.markers.size),c=Array.isArray(s.config.legend.markers.offsetX)?parseFloat(s.config.legend.markers.offsetX[n]):parseFloat(s.config.legend.markers.offsetX),u=Array.isArray(s.config.legend.markers.offsetY)?parseFloat(s.config.legend.markers.offsetY[n]):parseFloat(s.config.legend.markers.offsetY),d=Array.isArray(s.config.legend.markers.strokeWidth)?parseFloat(s.config.legend.markers.strokeWidth[n]):parseFloat(s.config.legend.markers.strokeWidth),h=o.style;if(h.height=2*(l+d)+"px",h.width=2*(l+d)+"px",h.left=c+"px",h.top=u+"px",s.config.legend.markers.customHTML)h.background="transparent",h.color=i[n],Array.isArray(s.config.legend.markers.customHTML)?s.config.legend.markers.customHTML[n]&&(o.innerHTML=s.config.legend.markers.customHTML[n]()):o.innerHTML=s.config.legend.markers.customHTML();else{var f=new Sp(this.ctx).getMarkerConfig({cssClass:"apexcharts-legend-marker apexcharts-marker apexcharts-marker-".concat(a),seriesIndex:n,strokeWidth:d,size:l}),p=window.SVG().addTo(o).size("100%","100%"),m=new Be(this.ctx).drawMarker(0,0,Je(Je({},f),{},{pointFillColor:Array.isArray(i)?i[n]:f.pointFillColor,shape:a}));s.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach(function(y){y.node.classList.contains("apexcharts-marker-triangle")?y.node.style.transform="translate(50%, 45%)":y.node.style.transform="translate(50%, 50%)"}),p.add(m)}return o}},{key:"drawLegends",value:function(){var e=this,n=this,i=this.w,s=i.config.legend.fontFamily,o=i.globals.seriesNames,r=i.config.legend.markers.fillColors?i.config.legend.markers.fillColors.slice():i.globals.colors.slice();if(i.config.chart.type==="heatmap"){var a=i.config.plotOptions.heatmap.colorScale.ranges;o=a.map(function(f){return f.name?f.name:f.from+" - "+f.to}),r=a.map(function(f){return f.color})}else this.isBarsDistributed&&(o=i.globals.labels.slice());i.config.legend.customLegendItems.length&&(o=i.config.legend.customLegendItems);var l=i.globals.legendFormatter,c=i.config.legend.inverseOrder,u=[];i.globals.seriesGroups.length>1&&i.config.legend.clusterGroupedSeries&&i.globals.seriesGroups.forEach(function(f,p){u[p]=document.createElement("div"),u[p].classList.add("apexcharts-legend-group","apexcharts-legend-group-".concat(p)),i.config.legend.clusterGroupedSeriesOrientation==="horizontal"?i.globals.dom.elLegendWrap.classList.add("apexcharts-legend-group-horizontal"):u[p].classList.add("apexcharts-legend-group-vertical")});for(var d=function(f){var p,m=l(o[f],{seriesIndex:f,w:i}),y=!1,b=!1;if(i.globals.collapsedSeries.length>0)for(var k=0;k<i.globals.collapsedSeries.length;k++)i.globals.collapsedSeries[k].index===f&&(y=!0);if(i.globals.ancillaryCollapsedSeriesIndices.length>0)for(var C=0;C<i.globals.ancillaryCollapsedSeriesIndices.length;C++)i.globals.ancillaryCollapsedSeriesIndices[C]===f&&(b=!0);var $=e.createLegendMarker({i:f,fillcolor:r});Be.setAttrs($,{rel:f+1,"data:collapsed":y||b}),(y||b)&&$.classList.add("apexcharts-inactive-legend");var x=document.createElement("div"),M=document.createElement("span");M.classList.add("apexcharts-legend-text"),M.innerHTML=Array.isArray(m)?m.join(" "):m;var P=i.config.legend.labels.useSeriesColors?i.globals.colors[f]:Array.isArray(i.config.legend.labels.colors)?(p=i.config.legend.labels.colors)===null||p===void 0?void 0:p[f]:i.config.legend.labels.colors;P||(P=i.config.chart.foreColor),M.style.color=P,M.style.fontSize=parseFloat(i.config.legend.fontSize)+"px",M.style.fontWeight=i.config.legend.fontWeight,M.style.fontFamily=s||i.config.chart.fontFamily,Be.setAttrs(M,{rel:f+1,i:f,"data:default-text":encodeURIComponent(m),"data:collapsed":y||b}),x.appendChild($),x.appendChild(M);var T=new _s(e.ctx);i.config.legend.showForZeroSeries||T.getSeriesTotalByIndex(f)===0&&T.seriesHaveSameValues(f)&&!T.isSeriesNull(f)&&i.globals.collapsedSeriesIndices.indexOf(f)===-1&&i.globals.ancillaryCollapsedSeriesIndices.indexOf(f)===-1&&x.classList.add("apexcharts-hidden-zero-series"),i.config.legend.showForNullSeries||T.isSeriesNull(f)&&i.globals.collapsedSeriesIndices.indexOf(f)===-1&&i.globals.ancillaryCollapsedSeriesIndices.indexOf(f)===-1&&x.classList.add("apexcharts-hidden-null-series"),u.length?i.globals.seriesGroups.forEach(function(I,L){var R;I.includes((R=i.config.series[f])===null||R===void 0?void 0:R.name)&&(i.globals.dom.elLegendWrap.appendChild(u[L]),u[L].appendChild(x))}):i.globals.dom.elLegendWrap.appendChild(x),i.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(i.config.legend.horizontalAlign)),i.globals.dom.elLegendWrap.classList.add("apx-legend-position-"+i.config.legend.position),x.classList.add("apexcharts-legend-series"),x.style.margin="".concat(i.config.legend.itemMargin.vertical,"px ").concat(i.config.legend.itemMargin.horizontal,"px"),i.globals.dom.elLegendWrap.style.width=i.config.legend.width?i.config.legend.width+"px":"",i.globals.dom.elLegendWrap.style.height=i.config.legend.height?i.config.legend.height+"px":"",Be.setAttrs(x,{rel:f+1,seriesName:pe.escapeString(o[f]),"data:collapsed":y||b}),(y||b)&&x.classList.add("apexcharts-inactive-legend"),i.config.legend.onItemClick.toggleDataSeries||x.classList.add("apexcharts-no-click")},h=c?o.length-1:0;c?h>=0:h<=o.length-1;c?h--:h++)d(h);i.globals.dom.elWrap.addEventListener("click",n.onLegendClick,!0),i.config.legend.onItemHover.highlightDataSeries&&i.config.legend.customLegendItems.length===0&&(i.globals.dom.elWrap.addEventListener("mousemove",n.onLegendHovered,!0),i.globals.dom.elWrap.addEventListener("mouseout",n.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(e,n){var i=this.w,s=i.globals.dom.elLegendWrap,o=s.clientHeight,r=0,a=0;if(i.config.legend.position==="bottom")a=i.globals.svgHeight-Math.min(o,i.globals.svgHeight/2)-5;else if(i.config.legend.position==="top"){var l=new Vy(this.ctx),c=l.dimHelpers.getTitleSubtitleCoords("title").height,u=l.dimHelpers.getTitleSubtitleCoords("subtitle").height;a=(c>0?c-10:0)+(u>0?u-10:0)}s.style.position="absolute",r=r+e+i.config.legend.offsetX,a=a+n+i.config.legend.offsetY,s.style.left=r+"px",s.style.top=a+"px",i.config.legend.position==="right"&&(s.style.left="auto",s.style.right=25+i.config.legend.offsetX+"px"),["width","height"].forEach(function(d){s.style[d]&&(s.style[d]=parseInt(i.config.legend[d],10)+"px")})}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.elLegendWrap.style.right=0;var n=new Vy(this.ctx),i=n.dimHelpers.getTitleSubtitleCoords("title"),s=n.dimHelpers.getTitleSubtitleCoords("subtitle"),o=0;e.config.legend.position==="top"&&(o=i.height+s.height+e.config.title.margin+e.config.subtitle.margin-10),this.setLegendWrapXY(20,o)}},{key:"legendAlignVertical",value:function(){var e=this.w,n=this.legendHelpers.getLegendDimensions(),i=0;e.config.legend.position==="left"&&(i=20),e.config.legend.position==="right"&&(i=e.globals.svgWidth-n.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(e){var n=this.w,i=e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker");if(n.config.chart.type==="heatmap"||this.isBarsDistributed){if(i){var s=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,s,this.w]),new lr(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&i&&new lr(this.ctx).toggleSeriesOnHover(e,e.target)}},{key:"onLegendClick",value:function(e){var n=this.w;if(!n.config.legend.customLegendItems.length&&(e.target.classList.contains("apexcharts-legend-series")||e.target.classList.contains("apexcharts-legend-text")||e.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(e.target.getAttribute("rel"),10)-1,s=e.target.getAttribute("data:collapsed")==="true",o=this.w.config.chart.events.legendClick;typeof o=="function"&&o(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;typeof r=="function"&&e.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),n.config.chart.type!=="treemap"&&n.config.chart.type!=="heatmap"&&!this.isBarsDistributed&&n.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,s)}}}]),t}(),OU=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=n.globals.minX,this.maxX=n.globals.maxX}return ct(t,[{key:"createToolbar",value:function(){var e=this,n=this.w,i=function(){return document.createElement("div")},s=i();if(s.setAttribute("class","apexcharts-toolbar"),s.style.top=n.config.chart.toolbar.offsetY+"px",s.style.right=3-n.config.chart.toolbar.offsetX+"px",n.globals.dom.elWrap.appendChild(s),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=n.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var o=0;o<this.t.customIcons.length;o++)this.elCustomIcons.push(i());var r=[],a=function(d,h,f){var p=d.toLowerCase();e.t[p]&&n.config.chart.zoom.enabled&&r.push({el:h,icon:typeof e.t[p]=="string"?e.t[p]:f,title:e.localeValues[d],class:"apexcharts-".concat(p,"-icon")})};a("zoomIn",this.elZoomIn,`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <path d="M0 0h24v24H0z" fill="none"/>
    <path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
</svg>
`),a("zoomOut",this.elZoomOut,`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <path d="M0 0h24v24H0z" fill="none"/>
    <path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/>
</svg>
`);var l=function(d){e.t[d]&&n.config.chart[d].enabled&&r.push({el:d==="zoom"?e.elZoom:e.elSelection,icon:typeof e.t[d]=="string"?e.t[d]:d==="zoom"?`<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
    <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
    <path d="M0 0h24v24H0V0z" fill="none"/>
    <path d="M12 10h-2v2H9v-2H7V9h2V7h1v2h2v1z"/>
</svg>`:`<svg fill="#6E8192" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
    <path d="M0 0h24v24H0z" fill="none"/>
    <path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2z"/>
</svg>`,title:e.localeValues[d==="zoom"?"selectionZoom":"selection"],class:n.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(d,"-icon")})};l("zoom"),l("selection"),this.t.pan&&n.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:typeof this.t.pan=="string"?this.t.pan:`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="#000000" height="24" viewBox="0 0 24 24" width="24">
    <defs>
        <path d="M0 0h24v24H0z" id="a"/>
    </defs>
    <clipPath id="b">
        <use overflow="visible" xlink:href="#a"/>
    </clipPath>
    <path clip-path="url(#b)" d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"/>
</svg>`,title:this.localeValues.pan,class:n.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),a("reset",this.elZoomReset,`<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
    <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/>
    <path d="M0 0h24v24H0z" fill="none"/>
</svg>`),this.t.download&&r.push({el:this.elMenuIcon,icon:typeof this.t.download=="string"?this.t.download:'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="none" d="M0 0h24v24H0V0z"/><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"/></svg>',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var c=0;c<this.elCustomIcons.length;c++)r.push({el:this.elCustomIcons[c],icon:this.t.customIcons[c].icon,title:this.t.customIcons[c].title,index:this.t.customIcons[c].index,class:"apexcharts-toolbar-custom-icon "+this.t.customIcons[c].class});r.forEach(function(d,h){d.index&&pe.moveIndexInArray(r,h,d.index)});for(var u=0;u<r.length;u++)Be.setAttrs(r[u].el,{class:r[u].class,title:r[u].title}),r[u].el.innerHTML=r[u].icon,s.appendChild(r[u].el);this._createHamburgerMenu(s),n.globals.zoomEnabled?this.elZoom.classList.add(this.selectedClass):n.globals.panEnabled?this.elPan.classList.add(this.selectedClass):n.globals.selectionEnabled&&this.elSelection.classList.add(this.selectedClass),this.addToolbarEventListeners()}},{key:"_createHamburgerMenu",value:function(e){this.elMenuItems=[],e.appendChild(this.elMenu),Be.setAttrs(this.elMenu,{class:"apexcharts-menu"});for(var n=[{name:"exportSVG",title:this.localeValues.exportToSVG},{name:"exportPNG",title:this.localeValues.exportToPNG},{name:"exportCSV",title:this.localeValues.exportToCSV}],i=0;i<n.length;i++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[i].innerHTML=n[i].title,Be.setAttrs(this.elMenuItems[i],{class:"apexcharts-menu-item ".concat(n[i].name),title:n[i].title}),this.elMenu.appendChild(this.elMenuItems[i])}},{key:"addToolbarEventListeners",value:function(){var e=this;this.elZoomReset.addEventListener("click",this.handleZoomReset.bind(this)),this.elSelection.addEventListener("click",this.toggleZoomSelection.bind(this,"selection")),this.elZoom.addEventListener("click",this.toggleZoomSelection.bind(this,"zoom")),this.elZoomIn.addEventListener("click",this.handleZoomIn.bind(this)),this.elZoomOut.addEventListener("click",this.handleZoomOut.bind(this)),this.elPan.addEventListener("click",this.togglePanning.bind(this)),this.elMenuIcon.addEventListener("click",this.toggleMenu.bind(this)),this.elMenuItems.forEach(function(i){i.classList.contains("exportSVG")?i.addEventListener("click",e.handleDownload.bind(e,"svg")):i.classList.contains("exportPNG")?i.addEventListener("click",e.handleDownload.bind(e,"png")):i.classList.contains("exportCSV")&&i.addEventListener("click",e.handleDownload.bind(e,"csv"))});for(var n=0;n<this.t.customIcons.length;n++)this.elCustomIcons[n].addEventListener("click",this.t.customIcons[n].click.bind(this,this.ctx,this.ctx.w))}},{key:"toggleZoomSelection",value:function(e){this.ctx.getSyncedCharts().forEach(function(n){n.ctx.toolbar.toggleOtherControls();var i=e==="selection"?n.ctx.toolbar.elSelection:n.ctx.toolbar.elZoom,s=e==="selection"?"selectionEnabled":"zoomEnabled";n.w.globals[s]=!n.w.globals[s],i.classList.contains(n.ctx.toolbar.selectedClass)?i.classList.remove(n.ctx.toolbar.selectedClass):i.classList.add(n.ctx.toolbar.selectedClass)})}},{key:"getToolbarIconsReference",value:function(){var e=this.w;this.elZoom||(this.elZoom=e.globals.dom.baseEl.querySelector(".apexcharts-zoom-icon")),this.elPan||(this.elPan=e.globals.dom.baseEl.querySelector(".apexcharts-pan-icon")),this.elSelection||(this.elSelection=e.globals.dom.baseEl.querySelector(".apexcharts-selection-icon"))}},{key:"enableZoomPanFromToolbar",value:function(e){this.toggleOtherControls(),e==="pan"?this.w.globals.panEnabled=!0:this.w.globals.zoomEnabled=!0;var n=e==="pan"?this.elPan:this.elZoom,i=e==="pan"?this.elZoom:this.elPan;n&&n.classList.add(this.selectedClass),i&&i.classList.remove(this.selectedClass)}},{key:"togglePanning",value:function(){this.ctx.getSyncedCharts().forEach(function(e){e.ctx.toolbar.toggleOtherControls(),e.w.globals.panEnabled=!e.w.globals.panEnabled,e.ctx.toolbar.elPan.classList.contains(e.ctx.toolbar.selectedClass)?e.ctx.toolbar.elPan.classList.remove(e.ctx.toolbar.selectedClass):e.ctx.toolbar.elPan.classList.add(e.ctx.toolbar.selectedClass)})}},{key:"toggleOtherControls",value:function(){var e=this,n=this.w;n.globals.panEnabled=!1,n.globals.zoomEnabled=!1,n.globals.selectionEnabled=!1,this.getToolbarIconsReference(),[this.elPan,this.elSelection,this.elZoom].forEach(function(i){i&&i.classList.remove(e.selectedClass)})}},{key:"handleZoomIn",value:function(){var e=this.w;e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY);var n=(this.minX+this.maxX)/2,i=(this.minX+n)/2,s=(this.maxX+n)/2,o=this._getNewMinXMaxX(i,s);e.globals.disableZoomIn||this.zoomUpdateOptions(o.minX,o.maxX)}},{key:"handleZoomOut",value:function(){var e=this.w;if(e.globals.isRangeBar&&(this.minX=e.globals.minY,this.maxX=e.globals.maxY),!(e.config.xaxis.type==="datetime"&&new Date(this.minX).getUTCFullYear()<1e3)){var n=(this.minX+this.maxX)/2,i=this.minX-(n-this.minX),s=this.maxX-(n-this.maxX),o=this._getNewMinXMaxX(i,s);e.globals.disableZoomOut||this.zoomUpdateOptions(o.minX,o.maxX)}}},{key:"_getNewMinXMaxX",value:function(e,n){var i=this.w.config.xaxis.convertedCatToNumeric;return{minX:i?Math.floor(e):e,maxX:i?Math.floor(n):n}}},{key:"zoomUpdateOptions",value:function(e,n){var i=this.w;if(e!==void 0||n!==void 0){if(!(i.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,n=i.globals.dataPoints),n-e<2))){var s={min:e,max:n},o=this.getBeforeZoomRange(s);o&&(s=o.xaxis);var r={xaxis:s},a=pe.clone(i.globals.initialConfig.yaxis);i.config.chart.group||(r.yaxis=a),this.w.globals.zoomed=!0,this.ctx.updateHelpers._updateOptions(r,!1,this.w.config.chart.animations.dynamicAnimation.enabled),this.zoomCallback(s,a)}}else this.handleZoomReset()}},{key:"zoomCallback",value:function(e,n){typeof this.ev.zoomed=="function"&&this.ev.zoomed(this.ctx,{xaxis:e,yaxis:n})}},{key:"getBeforeZoomRange",value:function(e,n){var i=null;return typeof this.ev.beforeZoom=="function"&&(i=this.ev.beforeZoom(this,{xaxis:e,yaxis:n})),i}},{key:"toggleMenu",value:function(){var e=this;window.setTimeout(function(){e.elMenu.classList.contains("apexcharts-menu-open")?e.elMenu.classList.remove("apexcharts-menu-open"):e.elMenu.classList.add("apexcharts-menu-open")},0)}},{key:"handleDownload",value:function(e){var n=this.w,i=new Ry(this.ctx);switch(e){case"svg":i.exportToSVG(this.ctx);break;case"png":i.exportToPng(this.ctx);break;case"csv":i.exportToCSV({series:n.config.series,columnDelimiter:n.config.chart.toolbar.export.csv.columnDelimiter})}}},{key:"handleZoomReset",value:function(e){this.ctx.getSyncedCharts().forEach(function(n){var i=n.w;if(i.globals.lastXAxis.min=i.globals.initialConfig.xaxis.min,i.globals.lastXAxis.max=i.globals.initialConfig.xaxis.max,n.updateHelpers.revertDefaultAxisMinMax(),typeof i.config.chart.events.beforeResetZoom=="function"){var s=i.config.chart.events.beforeResetZoom(n,i);s&&n.updateHelpers.revertDefaultAxisMinMax(s)}typeof i.config.chart.events.zoomed=="function"&&n.ctx.toolbar.zoomCallback({min:i.config.xaxis.min,max:i.config.xaxis.max}),i.globals.zoomed=!1;var o=n.ctx.series.emptyCollapsedSeries(pe.clone(i.globals.initialSeries));n.updateHelpers._updateSeries(o,i.config.chart.animations.dynamicAnimation.enabled)})}},{key:"destroy",value:function(){this.elZoom=null,this.elZoomIn=null,this.elZoomOut=null,this.elPan=null,this.elSelection=null,this.elZoomReset=null,this.elMenuIcon=null}}]),t}(),kCt=function(t){Q1(n,OU);var e=J1(n);function n(i){var s;return lt(this,n),(s=e.call(this,i)).ctx=i,s.w=i.w,s.dragged=!1,s.graphics=new Be(s.ctx),s.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend","wheel"],s.clientX=0,s.clientY=0,s.startX=0,s.endX=0,s.dragX=0,s.startY=0,s.endY=0,s.dragY=0,s.moveDirection="none",s.debounceTimer=null,s.debounceDelay=100,s.wheelDelay=400,s}return ct(n,[{key:"init",value:function(i){var s=this,o=i.xyRatios,r=this.w,a=this;this.xyRatios=o,this.zoomRect=this.graphics.drawRect(0,0,0,0),this.selectionRect=this.graphics.drawRect(0,0,0,0),this.gridRect=r.globals.dom.baseEl.querySelector(".apexcharts-grid"),this.constraints=new Ws(0,0,r.globals.gridWidth,r.globals.gridHeight),this.zoomRect.node.classList.add("apexcharts-zoom-rect"),this.selectionRect.node.classList.add("apexcharts-selection-rect"),r.globals.dom.Paper.add(this.zoomRect),r.globals.dom.Paper.add(this.selectionRect),r.config.chart.selection.type==="x"?this.slDraggableRect=this.selectionRect.draggable({minX:0,minY:0,maxX:r.globals.gridWidth,maxY:r.globals.gridHeight}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):r.config.chart.selection.type==="y"?this.slDraggableRect=this.selectionRect.draggable({minX:0,maxX:r.globals.gridWidth}).on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")):this.slDraggableRect=this.selectionRect.draggable().on("dragmove.namespace",this.selectionDragging.bind(this,"dragging")),this.preselectedSelection(),this.hoverArea=r.globals.dom.baseEl.querySelector("".concat(r.globals.chartClass," .apexcharts-svg")),this.hoverArea.classList.add("apexcharts-zoomable"),this.eventList.forEach(function(l){s.hoverArea.addEventListener(l,a.svgMouseEvents.bind(a,o),{capture:!1,passive:!0})}),r.config.chart.zoom.enabled&&r.config.chart.zoom.allowMouseWheelZoom&&this.hoverArea.addEventListener("wheel",a.mouseWheelEvent.bind(a),{capture:!1,passive:!1})}},{key:"destroy",value:function(){this.slDraggableRect&&(this.slDraggableRect.draggable(!1),this.slDraggableRect.off(),this.selectionRect.off()),this.selectionRect=null,this.zoomRect=null,this.gridRect=null}},{key:"svgMouseEvents",value:function(i,s){var o=this.w,r=this.ctx.toolbar,a=o.globals.zoomEnabled?o.config.chart.zoom.type:o.config.chart.selection.type,l=o.config.chart.toolbar.autoSelected;if(s.shiftKey?(this.shiftWasPressed=!0,r.enableZoomPanFromToolbar(l==="pan"?"zoom":"pan")):this.shiftWasPressed&&(r.enableZoomPanFromToolbar(l),this.shiftWasPressed=!1),s.target){var c,u=s.target.classList;if(s.target.parentNode&&s.target.parentNode!==null&&(c=s.target.parentNode.classList),!(u.contains("apexcharts-legend-marker")||u.contains("apexcharts-legend-text")||c&&c.contains("apexcharts-toolbar"))){if(this.clientX=s.type==="touchmove"||s.type==="touchstart"?s.touches[0].clientX:s.type==="touchend"?s.changedTouches[0].clientX:s.clientX,this.clientY=s.type==="touchmove"||s.type==="touchstart"?s.touches[0].clientY:s.type==="touchend"?s.changedTouches[0].clientY:s.clientY,s.type==="mousedown"&&s.which===1||s.type==="touchstart"){var d=this.gridRect.getBoundingClientRect();this.startX=this.clientX-d.left-o.globals.barPadForNumericAxis,this.startY=this.clientY-d.top,this.dragged=!1,this.w.globals.mousedown=!0}(s.type==="mousemove"&&s.which===1||s.type==="touchmove")&&(this.dragged=!0,o.globals.panEnabled?(o.globals.selection=null,this.w.globals.mousedown&&this.panDragging({context:this,zoomtype:a,xyRatios:i})):(this.w.globals.mousedown&&o.globals.zoomEnabled||this.w.globals.mousedown&&o.globals.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:a}))),s.type!=="mouseup"&&s.type!=="touchend"&&s.type!=="mouseleave"||this.handleMouseUp({zoomtype:a}),this.makeSelectionRectDraggable()}}}},{key:"handleMouseUp",value:function(i){var s,o=i.zoomtype,r=i.isResized,a=this.w,l=(s=this.gridRect)===null||s===void 0?void 0:s.getBoundingClientRect();l&&(this.w.globals.mousedown||r)&&(this.endX=this.clientX-l.left-a.globals.barPadForNumericAxis,this.endY=this.clientY-l.top,this.dragX=Math.abs(this.endX-this.startX),this.dragY=Math.abs(this.endY-this.startY),(a.globals.zoomEnabled||a.globals.selectionEnabled)&&this.selectionDrawn({context:this,zoomtype:o}),a.globals.panEnabled&&a.config.xaxis.convertedCatToNumeric&&this.delayedPanScrolled()),a.globals.zoomEnabled&&this.hideSelectionRect(this.selectionRect),this.dragged=!1,this.w.globals.mousedown=!1}},{key:"mouseWheelEvent",value:function(i){var s=this,o=this.w;i.preventDefault();var r=Date.now();r-o.globals.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(i),o.globals.lastWheelExecution=r),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){r-o.globals.lastWheelExecution>s.wheelDelay&&(s.executeMouseWheelZoom(i),o.globals.lastWheelExecution=r)},this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(i){var s,o=this.w;this.minX=o.globals.isRangeBar?o.globals.minY:o.globals.minX,this.maxX=o.globals.isRangeBar?o.globals.maxY:o.globals.maxX;var r=(s=this.gridRect)===null||s===void 0?void 0:s.getBoundingClientRect();if(r){var a,l,c,u=(i.clientX-r.left)/r.width,d=this.minX,h=this.maxX,f=h-d;if(i.deltaY<0){var p=d+u*f;l=p-(a=.5*f)/2,c=p+a/2}else l=d-(a=1.5*f)/2,c=h+a/2;if(!o.globals.isRangeBar){l=Math.max(l,o.globals.initialMinX),c=Math.min(c,o.globals.initialMaxX);var m=.01*(o.globals.initialMaxX-o.globals.initialMinX);if(c-l<m){var y=(l+c)/2;l=y-m/2,c=y+m/2}}var b=this._getNewMinXMaxX(l,c);isNaN(b.minX)||isNaN(b.maxX)||this.zoomUpdateOptions(b.minX,b.maxX)}}},{key:"makeSelectionRectDraggable",value:function(){var i=this,s=this.w;if(this.selectionRect){var o=this.selectionRect.node.getBoundingClientRect();o.width>0&&o.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(r,a,l,c,u){return u==="l"||u==="r"?r.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):r.circle(0)},updateHandle:function(r,a){return r.center(a[0],a[1])}}).resize().on("resize",function(){var r=s.globals.zoomEnabled?s.config.chart.zoom.type:s.config.chart.selection.type;i.handleMouseUp({zoomtype:r,isResized:!0})}))}}},{key:"preselectedSelection",value:function(){var i=this.w,s=this.xyRatios;if(!i.globals.zoomEnabled){if(i.globals.selection!==void 0&&i.globals.selection!==null)this.drawSelectionRect(Je(Je({},i.globals.selection),{},{translateX:i.globals.translateX,translateY:i.globals.translateY}));else if(i.config.chart.selection.xaxis.min!==void 0&&i.config.chart.selection.xaxis.max!==void 0){var o=(i.config.chart.selection.xaxis.min-i.globals.minX)/s.xRatio,r=i.globals.gridWidth-(i.globals.maxX-i.config.chart.selection.xaxis.max)/s.xRatio-o;i.globals.isRangeBar&&(o=(i.config.chart.selection.xaxis.min-i.globals.yAxisScale[0].niceMin)/s.invertedYRatio,r=(i.config.chart.selection.xaxis.max-i.config.chart.selection.xaxis.min)/s.invertedYRatio);var a={x:o,y:0,width:r,height:i.globals.gridHeight,translateX:i.globals.translateX,translateY:i.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(a),this.makeSelectionRectDraggable(),typeof i.config.chart.events.selection=="function"&&i.config.chart.events.selection(this.ctx,{xaxis:{min:i.config.chart.selection.xaxis.min,max:i.config.chart.selection.xaxis.max},yaxis:{}})}}}},{key:"drawSelectionRect",value:function(i){var s=i.x,o=i.y,r=i.width,a=i.height,l=i.translateX,c=l===void 0?0:l,u=i.translateY,d=u===void 0?0:u,h=this.w,f=this.zoomRect,p=this.selectionRect;if(this.dragged||h.globals.selection!==null){var m={transform:"translate("+c+", "+d+")"};h.globals.zoomEnabled&&this.dragged&&(r<0&&(r=1),f.attr({x:s,y:o,width:r,height:a,fill:h.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":h.config.chart.zoom.zoomedArea.fill.opacity,stroke:h.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":h.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":h.config.chart.zoom.zoomedArea.stroke.opacity}),Be.setAttrs(f.node,m)),h.globals.selectionEnabled&&(p.attr({x:s,y:o,width:r>0?r:0,height:a>0?a:0,fill:h.config.chart.selection.fill.color,"fill-opacity":h.config.chart.selection.fill.opacity,stroke:h.config.chart.selection.stroke.color,"stroke-width":h.config.chart.selection.stroke.width,"stroke-dasharray":h.config.chart.selection.stroke.dashArray,"stroke-opacity":h.config.chart.selection.stroke.opacity}),Be.setAttrs(p.node,m))}}},{key:"hideSelectionRect",value:function(i){i&&i.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(i){var s=i.context,o=i.zoomtype,r=this.w,a=s,l=this.gridRect.getBoundingClientRect(),c=a.startX-1,u=a.startY,d=!1,h=!1,f=a.clientX-l.left-r.globals.barPadForNumericAxis,p=a.clientY-l.top,m=f-c,y=p-u,b={translateX:r.globals.translateX,translateY:r.globals.translateY};return Math.abs(m+c)>r.globals.gridWidth?m=r.globals.gridWidth-c:f<0&&(m=c),c>f&&(d=!0,m=Math.abs(m)),u>p&&(h=!0,y=Math.abs(y)),b=Je(Je({},b=o==="x"?{x:d?c-m:c,y:0,width:m,height:r.globals.gridHeight}:o==="y"?{x:0,y:h?u-y:u,width:r.globals.gridWidth,height:y}:{x:d?c-m:c,y:h?u-y:u,width:m,height:y}),{},{translateX:r.globals.translateX,translateY:r.globals.translateY}),a.drawSelectionRect(b),a.selectionDragging("resizing"),b}},{key:"selectionDragging",value:function(i,s){var o=this,r=this.w;if(s){s.preventDefault();var a=s.detail,l=a.handler,c=a.box,u=c.x,d=c.y;u<this.constraints.x&&(u=this.constraints.x),d<this.constraints.y&&(d=this.constraints.y),c.x2>this.constraints.x2&&(u=this.constraints.x2-c.w),c.y2>this.constraints.y2&&(d=this.constraints.y2-c.h),l.move(u,d);var h=this.xyRatios,f=this.selectionRect,p=0;i==="resizing"&&(p=30);var m=function(b){return parseFloat(f.node.getAttribute(b))},y={x:m("x"),y:m("y"),width:m("width"),height:m("height")};r.globals.selection=y,typeof r.config.chart.events.selection=="function"&&r.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var b,k,C,$,x=o.gridRect.getBoundingClientRect(),M=f.node.getBoundingClientRect();r.globals.isRangeBar?(b=r.globals.yAxisScale[0].niceMin+(M.left-x.left)*h.invertedYRatio,k=r.globals.yAxisScale[0].niceMin+(M.right-x.left)*h.invertedYRatio,C=0,$=1):(b=r.globals.xAxisScale.niceMin+(M.left-x.left)*h.xRatio,k=r.globals.xAxisScale.niceMin+(M.right-x.left)*h.xRatio,C=r.globals.yAxisScale[0].niceMin+(x.bottom-M.bottom)*h.yRatio[0],$=r.globals.yAxisScale[0].niceMax-(M.top-x.top)*h.yRatio[0]);var P={xaxis:{min:b,max:k},yaxis:{min:C,max:$}};r.config.chart.events.selection(o.ctx,P),r.config.chart.brush.enabled&&r.config.chart.events.brushScrolled!==void 0&&r.config.chart.events.brushScrolled(o.ctx,P)},p))}}},{key:"selectionDrawn",value:function(i){var s,o,r=i.context,a=i.zoomtype,l=this.w,c=r,u=this.xyRatios,d=this.ctx.toolbar,h=l.globals.zoomEnabled?c.zoomRect.node.getBoundingClientRect():c.selectionRect.node.getBoundingClientRect(),f=c.gridRect.getBoundingClientRect(),p=h.left-f.left-l.globals.barPadForNumericAxis,m=h.right-f.left-l.globals.barPadForNumericAxis,y=h.top-f.top,b=h.bottom-f.top;l.globals.isRangeBar?(s=l.globals.yAxisScale[0].niceMin+p*u.invertedYRatio,o=l.globals.yAxisScale[0].niceMin+m*u.invertedYRatio):(s=l.globals.xAxisScale.niceMin+p*u.xRatio,o=l.globals.xAxisScale.niceMin+m*u.xRatio);var k=[],C=[];if(l.config.yaxis.forEach(function(L,R){var V=l.globals.seriesYAxisMap[R][0],H=l.globals.yAxisScale[R].niceMax-u.yRatio[V]*y,F=l.globals.yAxisScale[R].niceMax-u.yRatio[V]*b;k.push(H),C.push(F)}),c.dragged&&(c.dragX>10||c.dragY>10)&&s!==o){if(l.globals.zoomEnabled){var $=pe.clone(l.globals.initialConfig.yaxis),x=pe.clone(l.globals.initialConfig.xaxis);if(l.globals.zoomed=!0,l.config.xaxis.convertedCatToNumeric&&(s=Math.floor(s),o=Math.floor(o),s<1&&(s=1,o=l.globals.dataPoints),o-s<2&&(o=s+1)),a!=="xy"&&a!=="x"||(x={min:s,max:o}),a!=="xy"&&a!=="y"||$.forEach(function(L,R){$[R].min=C[R],$[R].max=k[R]}),d){var M=d.getBeforeZoomRange(x,$);M&&(x=M.xaxis?M.xaxis:x,$=M.yaxis?M.yaxis:$)}var P={xaxis:x};l.config.chart.group||(P.yaxis=$),c.ctx.updateHelpers._updateOptions(P,!1,c.w.config.chart.animations.dynamicAnimation.enabled),typeof l.config.chart.events.zoomed=="function"&&d.zoomCallback(x,$)}else if(l.globals.selectionEnabled){var T,I=null;T={min:s,max:o},a!=="xy"&&a!=="y"||(I=pe.clone(l.config.yaxis)).forEach(function(L,R){I[R].min=C[R],I[R].max=k[R]}),l.globals.selection=c.selection,typeof l.config.chart.events.selection=="function"&&l.config.chart.events.selection(c.ctx,{xaxis:T,yaxis:I})}}}},{key:"panDragging",value:function(i){var s=i.context,o=this.w,r=s;if(o.globals.lastClientPosition.x!==void 0){var a=o.globals.lastClientPosition.x-r.clientX,l=o.globals.lastClientPosition.y-r.clientY;Math.abs(a)>Math.abs(l)&&a>0?this.moveDirection="left":Math.abs(a)>Math.abs(l)&&a<0?this.moveDirection="right":Math.abs(l)>Math.abs(a)&&l>0?this.moveDirection="up":Math.abs(l)>Math.abs(a)&&l<0&&(this.moveDirection="down")}o.globals.lastClientPosition={x:r.clientX,y:r.clientY};var c=o.globals.isRangeBar?o.globals.minY:o.globals.minX,u=o.globals.isRangeBar?o.globals.maxY:o.globals.maxX;o.config.xaxis.convertedCatToNumeric||r.panScrolled(c,u)}},{key:"delayedPanScrolled",value:function(){var i=this.w,s=i.globals.minX,o=i.globals.maxX,r=(i.globals.maxX-i.globals.minX)/2;this.moveDirection==="left"?(s=i.globals.minX+r,o=i.globals.maxX+r):this.moveDirection==="right"&&(s=i.globals.minX-r,o=i.globals.maxX-r),s=Math.floor(s),o=Math.floor(o),this.updateScrolledChart({xaxis:{min:s,max:o}},s,o)}},{key:"panScrolled",value:function(i,s){var o=this.w,r=this.xyRatios,a=pe.clone(o.globals.initialConfig.yaxis),l=r.xRatio,c=o.globals.minX,u=o.globals.maxX;o.globals.isRangeBar&&(l=r.invertedYRatio,c=o.globals.minY,u=o.globals.maxY),this.moveDirection==="left"?(i=c+o.globals.gridWidth/15*l,s=u+o.globals.gridWidth/15*l):this.moveDirection==="right"&&(i=c-o.globals.gridWidth/15*l,s=u-o.globals.gridWidth/15*l),o.globals.isRangeBar||(i<o.globals.initialMinX||s>o.globals.initialMaxX)&&(i=c,s=u);var d={xaxis:{min:i,max:s}};o.config.chart.group||(d.yaxis=a),this.updateScrolledChart(d,i,s)}},{key:"updateScrolledChart",value:function(i,s,o){var r=this.w;this.ctx.updateHelpers._updateOptions(i,!1,!1),typeof r.config.chart.events.scrolled=="function"&&r.config.chart.events.scrolled(this.ctx,{xaxis:{min:s,max:o}})}}]),n}(),DU=function(){function t(e){lt(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return ct(t,[{key:"getNearestValues",value:function(e){var n=e.hoverArea,i=e.elGrid,s=e.clientX,o=e.clientY,r=this.w,a=i.getBoundingClientRect(),l=a.width,c=a.height,u=l/(r.globals.dataPoints-1),d=c/r.globals.dataPoints,h=this.hasBars();!r.globals.comboCharts&&!h||r.config.xaxis.convertedCatToNumeric||(u=l/r.globals.dataPoints);var f=s-a.left-r.globals.barPadForNumericAxis,p=o-a.top;f<0||p<0||f>l||p>c?(n.classList.remove("hovering-zoom"),n.classList.remove("hovering-pan")):r.globals.zoomEnabled?(n.classList.remove("hovering-pan"),n.classList.add("hovering-zoom")):r.globals.panEnabled&&(n.classList.remove("hovering-zoom"),n.classList.add("hovering-pan"));var m=Math.round(f/u),y=Math.floor(p/d);h&&!r.config.xaxis.convertedCatToNumeric&&(m=Math.ceil(f/u),m-=1);var b=null,k=null,C=r.globals.seriesXvalues.map(function(T){return T.filter(function(I){return pe.isNumber(I)})}),$=r.globals.seriesYvalues.map(function(T){return T.filter(function(I){return pe.isNumber(I)})});if(r.globals.isXNumeric){var x=this.ttCtx.getElGrid().getBoundingClientRect(),M=f*(x.width/l),P=p*(x.height/c);b=(k=this.closestInMultiArray(M,P,C,$)).index,m=k.j,b!==null&&r.globals.hasNullValues&&(C=r.globals.seriesXvalues[b],m=(k=this.closestInArray(M,C)).j)}return r.globals.capturedSeriesIndex=b===null?-1:b,(!m||m<1)&&(m=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=y:r.globals.capturedDataPointIndex=m,{capturedSeries:b,j:r.globals.isBarHorizontal?y:m,hoverX:f,hoverY:p}}},{key:"getFirstActiveXArray",value:function(e){for(var n=this.w,i=0,s=e.map(function(r,a){return r.length>0?a:-1}),o=0;o<s.length;o++)if(s[o]!==-1&&n.globals.collapsedSeriesIndices.indexOf(o)===-1&&n.globals.ancillaryCollapsedSeriesIndices.indexOf(o)===-1){i=s[o];break}return i}},{key:"closestInMultiArray",value:function(e,n,i,s){for(var o,r=this.w,a=1/0,l=null,c=null,u=0;u<i.length;u++)if(o=u,r.globals.collapsedSeriesIndices.indexOf(o)===-1&&r.globals.ancillaryCollapsedSeriesIndices.indexOf(o)===-1)for(var d=i[u],h=s[u],f=Math.min(d.length,h.length),p=0;p<f;p++){var m=e-d[p],y=Math.sqrt(m*m);if(!r.globals.allSeriesHasEqualX){var b=n-h[p];y=Math.sqrt(m*m+b*b)}y<a&&(a=y,l=u,c=p)}return{index:l,j:c}}},{key:"closestInArray",value:function(e,n){for(var i=n[0],s=null,o=Math.abs(e-i),r=0;r<n.length;r++){var a=Math.abs(e-n[r]);a<o&&(o=a,s=r)}return{j:s}}},{key:"isXoverlap",value:function(e){var n=[],i=this.w.globals.seriesX.filter(function(o){return o[0]!==void 0});if(i.length>0)for(var s=0;s<i.length-1;s++)i[s][e]!==void 0&&i[s+1][e]!==void 0&&i[s][e]!==i[s+1][e]&&n.push("unEqual");return n.length===0}},{key:"isInitialSeriesSameLen",value:function(){for(var e=!0,n=this.w.globals.initialSeries,i=0;i<n.length-1;i++)if(n[i].data.length!==n[i+1].data.length){e=!1;break}return e}},{key:"getBarsHeight",value:function(e){return Ns(e).reduce(function(n,i){return n+i.getBBox().height},0)}},{key:"getElMarkers",value:function(e){return typeof e=="number"?this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-series-markers-wrap > *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0&&arguments[0],i=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");i=Ns(i),n&&(i=i.filter(function(o){var r=Number(o.getAttribute("data:realIndex"));return e.w.globals.collapsedSeriesIndices.indexOf(r)===-1})),i.sort(function(o,r){var a=Number(o.getAttribute("data:realIndex")),l=Number(r.getAttribute("data:realIndex"));return l<a?1:l>a?-1:0});var s=[];return i.forEach(function(o){s.push(o.querySelector(".apexcharts-marker"))}),s}},{key:"hasMarkers",value:function(e){return this.getElMarkers(e).length>0}},{key:"getPathFromPoint",value:function(e,n){var i=Number(e.getAttribute("cx")),s=Number(e.getAttribute("cy")),o=e.getAttribute("shape");return new Be(this.ctx).getMarkerPath(i,s,o,n)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series,  .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(e){var n=this.w,i=n.config.markers.hover.size;return i===void 0&&(i=n.globals.markers.size[e]+n.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var n=this.w,i=this.ttCtx;i.allTooltipSeriesGroups.length===0&&(i.allTooltipSeriesGroups=n.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var s=i.allTooltipSeriesGroups,o=0;o<s.length;o++)e==="enable"?(s[o].classList.add("apexcharts-active"),s[o].style.display=n.config.tooltip.items.display):(s[o].classList.remove("apexcharts-active"),s[o].style.display="none")}}]),t}(),CCt=function(){function t(e){lt(this,t),this.w=e.w,this.ctx=e.ctx,this.ttCtx=e,this.tooltipUtil=new DU(e)}return ct(t,[{key:"drawSeriesTexts",value:function(e){var n=e.shared,i=n===void 0||n,s=e.ttItems,o=e.i,r=o===void 0?0:o,a=e.j,l=a===void 0?null:a,c=e.y1,u=e.y2,d=e.e,h=this.w;h.config.tooltip.custom!==void 0?this.handleCustomTooltip({i:r,j:l,y1:c,y2:u,w:h}):this.toggleActiveInactiveSeries(i,r);var f=this.getValuesToPrint({i:r,j:l});this.printLabels({i:r,j:l,values:f,ttItems:s,shared:i,e:d});var p=this.ttCtx.getElTooltip();this.ttCtx.tooltipRect.ttWidth=p.getBoundingClientRect().width,this.ttCtx.tooltipRect.ttHeight=p.getBoundingClientRect().height}},{key:"printLabels",value:function(e){var n,i=this,s=e.i,o=e.j,r=e.values,a=e.ttItems,l=e.shared,c=e.e,u=this.w,d=[],h=function(x){return u.globals.seriesGoals[x]&&u.globals.seriesGoals[x][o]&&Array.isArray(u.globals.seriesGoals[x][o])},f=r.xVal,p=r.zVal,m=r.xAxisTTVal,y="",b=u.globals.colors[s];o!==null&&u.config.plotOptions.bar.distributed&&(b=u.globals.colors[o]);for(var k=function(x,M){var P=i.getFormatters(s);y=i.getSeriesName({fn:P.yLbTitleFormatter,index:s,seriesIndex:s,j:o}),u.config.chart.type==="treemap"&&(y=P.yLbTitleFormatter(String(u.config.series[s].data[o].x),{series:u.globals.series,seriesIndex:s,dataPointIndex:o,w:u}));var T=u.config.tooltip.inverseOrder?M:x;if(u.globals.axisCharts){var I=function(V){var H,F,z,N;return u.globals.isRangeData?P.yLbFormatter((H=u.globals.seriesRangeStart)===null||H===void 0||(F=H[V])===null||F===void 0?void 0:F[o],{series:u.globals.seriesRangeStart,seriesIndex:V,dataPointIndex:o,w:u})+" - "+P.yLbFormatter((z=u.globals.seriesRangeEnd)===null||z===void 0||(N=z[V])===null||N===void 0?void 0:N[o],{series:u.globals.seriesRangeEnd,seriesIndex:V,dataPointIndex:o,w:u}):P.yLbFormatter(u.globals.series[V][o],{series:u.globals.series,seriesIndex:V,dataPointIndex:o,w:u})};if(l)P=i.getFormatters(T),y=i.getSeriesName({fn:P.yLbTitleFormatter,index:T,seriesIndex:s,j:o}),b=u.globals.colors[T],n=I(T),h(T)&&(d=u.globals.seriesGoals[T][o].map(function(V){return{attrs:V,val:P.yLbFormatter(V.value,{seriesIndex:T,dataPointIndex:o,w:u})}}));else{var L,R=c==null||(L=c.target)===null||L===void 0?void 0:L.getAttribute("fill");R&&(R.indexOf("url")!==-1?R.indexOf("Pattern")!==-1&&(b=u.globals.dom.baseEl.querySelector(R.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke")):b=R),n=I(s),h(s)&&Array.isArray(u.globals.seriesGoals[s][o])&&(d=u.globals.seriesGoals[s][o].map(function(V){return{attrs:V,val:P.yLbFormatter(V.value,{seriesIndex:s,dataPointIndex:o,w:u})}}))}}o===null&&(n=P.yLbFormatter(u.globals.series[s],Je(Je({},u),{},{seriesIndex:s,dataPointIndex:s}))),i.DOMHandling({i:s,t:T,j:o,ttItems:a,values:{val:n,goalVals:d,xVal:f,xAxisTTVal:m,zVal:p},seriesName:y,shared:l,pColor:b})},C=0,$=u.globals.series.length-1;C<u.globals.series.length;C++,$--)k(C,$)}},{key:"getFormatters",value:function(e){var n,i=this.w,s=i.globals.yLabelFormatters[e];return i.globals.ttVal!==void 0?Array.isArray(i.globals.ttVal)?(s=i.globals.ttVal[e]&&i.globals.ttVal[e].formatter,n=i.globals.ttVal[e]&&i.globals.ttVal[e].title&&i.globals.ttVal[e].title.formatter):(s=i.globals.ttVal.formatter,typeof i.globals.ttVal.title.formatter=="function"&&(n=i.globals.ttVal.title.formatter)):n=i.config.tooltip.y.title.formatter,typeof s!="function"&&(s=i.globals.yLabelFormatters[0]?i.globals.yLabelFormatters[0]:function(o){return o}),typeof n!="function"&&(n=function(o){return o?o+": ":""}),{yLbFormatter:s,yLbTitleFormatter:n}}},{key:"getSeriesName",value:function(e){var n=e.fn,i=e.index,s=e.seriesIndex,o=e.j,r=this.w;return n(String(r.globals.seriesNames[i]),{series:r.globals.series,seriesIndex:s,dataPointIndex:o,w:r})}},{key:"DOMHandling",value:function(e){e.i;var n=e.t,i=e.j,s=e.ttItems,o=e.values,r=e.seriesName,a=e.shared,l=e.pColor,c=this.w,u=this.ttCtx,d=o.val,h=o.goalVals,f=o.xVal,p=o.xAxisTTVal,m=o.zVal,y=null;y=s[n].children,c.config.tooltip.fillSeriesColor&&(s[n].style.color=l,y[0].style.display="none"),u.showTooltipTitle&&(u.tooltipTitle===null&&(u.tooltipTitle=c.globals.dom.baseEl.querySelector(".apexcharts-tooltip-title")),u.tooltipTitle.innerHTML=f),u.isXAxisTooltipEnabled&&(u.xaxisTooltipText.innerHTML=p!==""?p:f);var b=s[n].querySelector(".apexcharts-tooltip-text-y-label");b&&(b.innerHTML=r||"");var k=s[n].querySelector(".apexcharts-tooltip-text-y-value");k&&(k.innerHTML=d!==void 0?d:""),y[0]&&y[0].classList.contains("apexcharts-tooltip-marker")&&(c.config.tooltip.marker.fillColors&&Array.isArray(c.config.tooltip.marker.fillColors)&&(l=c.config.tooltip.marker.fillColors[n]),y[0].style.color=l),c.config.tooltip.marker.show||(y[0].style.display="none");var C=s[n].querySelector(".apexcharts-tooltip-text-goals-label"),$=s[n].querySelector(".apexcharts-tooltip-text-goals-value");if(h.length&&c.globals.seriesGoals[n]){var x=function(){var T="<div>",I="<div>";h.forEach(function(L,R){T+=' <div style="display: flex"><span class="apexcharts-tooltip-marker" style="background-color: '.concat(L.attrs.strokeColor,'; height: 3px; border-radius: 0; top: 5px;"></span> ').concat(L.attrs.name,"</div>"),I+="<div>".concat(L.val,"</div>")}),C.innerHTML=T+"</div>",$.innerHTML=I+"</div>"};a?c.globals.seriesGoals[n][i]&&Array.isArray(c.globals.seriesGoals[n][i])?x():(C.innerHTML="",$.innerHTML=""):x()}else C.innerHTML="",$.innerHTML="";if(m!==null&&(s[n].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=c.config.tooltip.z.title,s[n].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=m!==void 0?m:""),a&&y[0]){if(c.config.tooltip.hideEmptySeries){var M=s[n].querySelector(".apexcharts-tooltip-marker"),P=s[n].querySelector(".apexcharts-tooltip-text");parseFloat(d)==0?(M.style.display="none",P.style.display="none"):(M.style.display="block",P.style.display="block")}d==null||c.globals.ancillaryCollapsedSeriesIndices.indexOf(n)>-1||c.globals.collapsedSeriesIndices.indexOf(n)>-1||Array.isArray(u.tConfig.enabledOnSeries)&&u.tConfig.enabledOnSeries.indexOf(n)===-1?y[0].parentNode.style.display="none":y[0].parentNode.style.display=c.config.tooltip.items.display}else Array.isArray(u.tConfig.enabledOnSeries)&&u.tConfig.enabledOnSeries.indexOf(n)===-1&&(y[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(e,n){var i=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var s=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(n));s&&(s.classList.add("apexcharts-active"),s.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var n=e.i,i=e.j,s=this.w,o=this.ctx.series.filteredSeriesX(),r="",a="",l=null,c=null,u={series:s.globals.series,seriesIndex:n,dataPointIndex:i,w:s},d=s.globals.ttZFormatter;i===null?c=s.globals.series[n]:s.globals.isXNumeric&&s.config.chart.type!=="treemap"?(r=o[n][i],o[n].length===0&&(r=o[this.tooltipUtil.getFirstActiveXArray(o)][i])):r=new wS(this.ctx).isFormatXY()?s.config.series[n].data[i]!==void 0?s.config.series[n].data[i].x:"":s.globals.labels[i]!==void 0?s.globals.labels[i]:"";var h=r;return s.globals.isXNumeric&&s.config.xaxis.type==="datetime"?r=new sv(this.ctx).xLabelFormat(s.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new si(this.ctx).formatDate,w:this.w}):r=s.globals.isBarHorizontal?s.globals.yLabelFormatters[0](h,u):s.globals.xLabelFormatter(h,u),s.config.tooltip.x.formatter!==void 0&&(r=s.globals.ttKeyFormatter(h,u)),s.globals.seriesZ.length>0&&s.globals.seriesZ[n].length>0&&(l=d(s.globals.seriesZ[n][i],s)),a=typeof s.config.xaxis.tooltip.formatter=="function"?s.globals.xaxisTooltipFormatter(h,u):r,{val:Array.isArray(c)?c.join(" "):c,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(a)?a.join(" "):a,zVal:l}}},{key:"handleCustomTooltip",value:function(e){var n=e.i,i=e.j,s=e.y1,o=e.y2,r=e.w,a=this.ttCtx.getElTooltip(),l=r.config.tooltip.custom;Array.isArray(l)&&l[n]&&(l=l[n]);var c=l({ctx:this.ctx,series:r.globals.series,seriesIndex:n,dataPointIndex:i,y1:s,y2:o,w:r});typeof c=="string"?a.innerHTML=c:(c instanceof Element||typeof c.nodeName=="string")&&(a.innerHTML="",a.appendChild(c.cloneNode(!0)))}}]),t}(),RU=function(){function t(e){lt(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return ct(t,[{key:"moveXCrosshairs",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,i=this.ttCtx,s=this.w,o=i.getElXCrosshairs(),r=e-i.xcrosshairsWidth/2,a=s.globals.labels.slice().length;if(n!==null&&(r=s.globals.gridWidth/a*n),o===null||s.globals.isBarHorizontal||(o.setAttribute("x",r),o.setAttribute("x1",r),o.setAttribute("x2",r),o.setAttribute("y2",s.globals.gridHeight),o.classList.add("apexcharts-active")),r<0&&(r=0),r>s.globals.gridWidth&&(r=s.globals.gridWidth),i.isXAxisTooltipEnabled){var l=r;s.config.xaxis.crosshairs.width!=="tickWidth"&&s.config.xaxis.crosshairs.width!=="barWidth"||(l=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(l)}}},{key:"moveYCrosshairs",value:function(e){var n=this.ttCtx;n.ycrosshairs!==null&&Be.setAttrs(n.ycrosshairs,{y1:e,y2:e}),n.ycrosshairsHidden!==null&&Be.setAttrs(n.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var n=this.w,i=this.ttCtx;if(i.xaxisTooltip!==null&&i.xcrosshairsWidth!==0){i.xaxisTooltip.classList.add("apexcharts-active");var s=i.xaxisOffY+n.config.xaxis.tooltip.offsetY+n.globals.translateY+1+n.config.xaxis.offsetY;if(e-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e)){e+=n.globals.translateX;var o;o=new Be(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=o.width+"px",i.xaxisTooltip.style.left=e+"px",i.xaxisTooltip.style.top=s+"px"}}}},{key:"moveYAxisTooltip",value:function(e){var n=this.w,i=this.ttCtx;i.yaxisTTEls===null&&(i.yaxisTTEls=n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var s=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),o=n.globals.translateY+s,r=i.yaxisTTEls[e].getBoundingClientRect().height,a=n.globals.translateYAxisX[e]-2;n.config.yaxis[e].opposite&&(a-=26),o-=r/2,n.globals.ignoreYAxisIndexes.indexOf(e)===-1?(i.yaxisTTEls[e].classList.add("apexcharts-active"),i.yaxisTTEls[e].style.top=o+"px",i.yaxisTTEls[e].style.left=a+n.config.yaxis[e].tooltip.offsetX+"px"):i.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,s=this.w,o=this.ttCtx,r=o.getElTooltip(),a=o.tooltipRect,l=i!==null?parseFloat(i):1,c=parseFloat(e)+l+5,u=parseFloat(n)+l/2;if(c>s.globals.gridWidth/2&&(c=c-a.ttWidth-l-10),c>s.globals.gridWidth-a.ttWidth-10&&(c=s.globals.gridWidth-a.ttWidth),c<-20&&(c=-20),s.config.tooltip.followCursor){var d=o.getElGrid().getBoundingClientRect();(c=o.e.clientX-d.left)>s.globals.gridWidth/2&&(c-=o.tooltipRect.ttWidth),(u=o.e.clientY+s.globals.translateY-d.top)>s.globals.gridHeight/2&&(u-=o.tooltipRect.ttHeight)}else s.globals.isBarHorizontal||a.ttHeight/2+u>s.globals.gridHeight&&(u=s.globals.gridHeight-a.ttHeight+s.globals.translateY);isNaN(c)||(c+=s.globals.translateX,r.style.left=c+"px",r.style.top=u+"px")}},{key:"moveMarkers",value:function(e,n){var i=this.w,s=this.ttCtx;if(i.globals.markers.size[e]>0)for(var o=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),r=0;r<o.length;r++)parseInt(o[r].getAttribute("rel"),10)===n&&(s.marker.resetPointsSize(),s.marker.enlargeCurrentPoint(n,o[r]));else s.marker.resetPointsSize(),this.moveDynamicPointOnHover(n,e)}},{key:"moveDynamicPointOnHover",value:function(e,n){var i,s,o,r,a=this.w,l=this.ttCtx,c=new Be(this.ctx),u=a.globals.pointsArray,d=l.tooltipUtil.getHoverMarkerSize(n),h=a.config.series[n].type;if(!h||h!=="column"&&h!=="candlestick"&&h!=="boxPlot"){o=(i=u[n][e])===null||i===void 0?void 0:i[0],r=((s=u[n][e])===null||s===void 0?void 0:s[1])||0;var f=a.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(n,"'] .apexcharts-series-markers path"));if(f&&r<a.globals.gridHeight&&r>0){var p=f.getAttribute("shape"),m=c.getMarkerPath(o,r,p,1.5*d);f.setAttribute("d",m)}this.moveXCrosshairs(o),l.fixedTooltip||this.moveTooltip(o,r,d)}}},{key:"moveDynamicPointsOnHover",value:function(e){var n,i=this.ttCtx,s=i.w,o=0,r=0,a=s.globals.pointsArray,l=new lr(this.ctx),c=new Be(this.ctx);n=l.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var u=i.tooltipUtil.getHoverMarkerSize(n);if(a[n]&&(o=a[n][e][0],r=a[n][e][1]),!isNaN(o)){var d=i.tooltipUtil.getAllMarkers();if(d.length)for(var h=0;h<s.globals.series.length;h++){var f=a[h];if(s.globals.comboCharts&&f===void 0&&d.splice(h,0,null),f&&f.length){var p=a[h][e][1],m=void 0;d[h].setAttribute("cx",o);var y=d[h].getAttribute("shape");if(s.config.chart.type==="rangeArea"&&!s.globals.comboCharts){var b=e+s.globals.series[h].length;m=a[h][b][1],p-=Math.abs(p-m)/2}if(p!==null&&!isNaN(p)&&p<s.globals.gridHeight+u&&p+u>0){var k=c.getMarkerPath(o,p,y,u);d[h].setAttribute("d",k)}else d[h].setAttribute("d","")}}this.moveXCrosshairs(o),i.fixedTooltip||this.moveTooltip(o,r||s.globals.gridHeight,u)}}},{key:"moveStickyTooltipOverBars",value:function(e,n){var i=this.w,s=this.ttCtx,o=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length;i.config.chart.stacked&&(o=i.globals.barGroups.length);var r=o>=2&&o%2==0?Math.floor(o/2):Math.floor(o/2)+1;i.globals.isBarHorizontal&&(r=new lr(this.ctx).getActiveConfigSeriesIndex("desc")+1);var a=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"']"));a||typeof n!="number"||(a=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(n,"'] path[j='").concat(e,`'],
        .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(e,`'],
        .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(e,`'],
        .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(e,"']")));var l=a?parseFloat(a.getAttribute("cx")):0,c=a?parseFloat(a.getAttribute("cy")):0,u=a?parseFloat(a.getAttribute("barWidth")):0,d=s.getElGrid().getBoundingClientRect(),h=a&&(a.classList.contains("apexcharts-candlestick-area")||a.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(a&&!h&&(l-=o%2!=0?u/2:0),a&&h&&(l-=u/2)):i.globals.isBarHorizontal||(l=s.xAxisTicksPositions[e-1]+s.dataPointsDividedWidth/2,isNaN(l)&&(l=s.xAxisTicksPositions[e]-s.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?c-=s.tooltipRect.ttHeight:i.config.tooltip.followCursor?c=s.e.clientY-d.top-s.tooltipRect.ttHeight/2:c+s.tooltipRect.ttHeight+15>i.globals.gridHeight&&(c=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(l),s.fixedTooltip||this.moveTooltip(l,c||i.globals.gridHeight)}}]),t}(),xCt=function(){function t(e){lt(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new RU(e)}return ct(t,[{key:"drawDynamicPoints",value:function(){var e=this.w,n=new Be(this.ctx),i=new Sp(this.ctx),s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");s=Ns(s),e.config.chart.stacked&&s.sort(function(d,h){return parseFloat(d.getAttribute("data:realIndex"))-parseFloat(h.getAttribute("data:realIndex"))});for(var o=0;o<s.length;o++){var r=s[o].querySelector(".apexcharts-series-markers-wrap");if(r!==null){var a=void 0,l="apexcharts-marker w".concat((Math.random()+1).toString(36).substring(4));e.config.chart.type!=="line"&&e.config.chart.type!=="area"||e.globals.comboCharts||e.config.tooltip.intersect||(l+=" no-pointer-events");var c=i.getMarkerConfig({cssClass:l,seriesIndex:Number(r.getAttribute("data:realIndex"))});(a=n.drawMarker(0,0,c)).node.setAttribute("default-marker-size",0);var u=document.createElementNS(e.globals.SVGNS,"g");u.classList.add("apexcharts-series-markers"),u.appendChild(a.node),r.appendChild(u)}}}},{key:"enlargeCurrentPoint",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,o=this.w;o.config.chart.type!=="bubble"&&this.newPointSize(e,n);var r=n.getAttribute("cx"),a=n.getAttribute("cy");if(i!==null&&s!==null&&(r=i,a=s),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if(o.config.chart.type==="radar"){var l=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-l.left}this.tooltipPosition.moveTooltip(r,a,o.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var n=this.w,i=this,s=this.ttCtx,o=e,r=n.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),a=n.config.markers.hover.size,l=0;l<r.length;l++){var c=r[l].getAttribute("rel"),u=r[l].getAttribute("index");if(a===void 0&&(a=n.globals.markers.size[u]+n.config.markers.hover.sizeOffset),o===parseInt(c,10)){i.newPointSize(o,r[l]);var d=r[l].getAttribute("cx"),h=r[l].getAttribute("cy");i.tooltipPosition.moveXCrosshairs(d),s.fixedTooltip||i.tooltipPosition.moveTooltip(d,h,a)}else i.oldPointSize(r[l])}}},{key:"newPointSize",value:function(e,n){var i=this.w,s=i.config.markers.hover.size,o=e===0?n.parentNode.firstChild:n.parentNode.lastChild;if(o.getAttribute("default-marker-size")!=="0"){var r=parseInt(o.getAttribute("index"),10);s===void 0&&(s=i.globals.markers.size[r]+i.config.markers.hover.sizeOffset),s<0&&(s=0);var a=this.ttCtx.tooltipUtil.getPathFromPoint(n,s);n.setAttribute("d",a)}}},{key:"oldPointSize",value:function(e){var n=parseFloat(e.getAttribute("default-marker-size")),i=this.ttCtx.tooltipUtil.getPathFromPoint(e,n);e.setAttribute("d",i)}},{key:"resetPointsSize",value:function(){for(var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=0;n<e.length;n++){var i=parseFloat(e[n].getAttribute("default-marker-size"));if(pe.isNumber(i)&&i>0){var s=this.ttCtx.tooltipUtil.getPathFromPoint(e[n],i);e[n].setAttribute("d",s)}else e[n].setAttribute("d","M0,0")}}}]),t}(),SCt=function(){function t(e){lt(this,t),this.w=e.w;var n=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!n.globals.isBarHorizontal&&n.config.chart.type==="rangeBar"&&n.config.plotOptions.bar.rangeBarGroupRows}return ct(t,[{key:"getAttr",value:function(e,n){return parseFloat(e.target.getAttribute(n))}},{key:"handleHeatTreeTooltip",value:function(e){var n=e.e,i=e.opt,s=e.x,o=e.y,r=e.type,a=this.ttCtx,l=this.w;if(n.target.classList.contains("apexcharts-".concat(r,"-rect"))){var c=this.getAttr(n,"i"),u=this.getAttr(n,"j"),d=this.getAttr(n,"cx"),h=this.getAttr(n,"cy"),f=this.getAttr(n,"width"),p=this.getAttr(n,"height");if(a.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:c,j:u,shared:!1,e:n}),l.globals.capturedSeriesIndex=c,l.globals.capturedDataPointIndex=u,s=d+a.tooltipRect.ttWidth/2+f,o=h+a.tooltipRect.ttHeight/2-p/2,a.tooltipPosition.moveXCrosshairs(d+f/2),s>l.globals.gridWidth/2&&(s=d-a.tooltipRect.ttWidth/2+f),a.w.config.tooltip.followCursor){var m=l.globals.dom.elWrap.getBoundingClientRect();s=l.globals.clientX-m.left-(s>l.globals.gridWidth/2?a.tooltipRect.ttWidth:0),o=l.globals.clientY-m.top-(o>l.globals.gridHeight/2?a.tooltipRect.ttHeight:0)}}return{x:s,y:o}}},{key:"handleMarkerTooltip",value:function(e){var n,i,s=e.e,o=e.opt,r=e.x,a=e.y,l=this.w,c=this.ttCtx;if(s.target.classList.contains("apexcharts-marker")){var u=parseInt(o.paths.getAttribute("cx"),10),d=parseInt(o.paths.getAttribute("cy"),10),h=parseFloat(o.paths.getAttribute("val"));if(i=parseInt(o.paths.getAttribute("rel"),10),n=parseInt(o.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,c.intersect){var f=pe.findAncestor(o.paths,"apexcharts-series");f&&(n=parseInt(f.getAttribute("data:realIndex"),10))}if(c.tooltipLabels.drawSeriesTexts({ttItems:o.ttItems,i:n,j:i,shared:!c.showOnIntersect&&l.config.tooltip.shared,e:s}),s.type==="mouseup"&&c.markerClick(s,n,i),l.globals.capturedSeriesIndex=n,l.globals.capturedDataPointIndex=i,r=u,a=d+l.globals.translateY-1.4*c.tooltipRect.ttHeight,c.w.config.tooltip.followCursor){var p=c.getElGrid().getBoundingClientRect();a=c.e.clientY+l.globals.translateY-p.top}h<0&&(a=d),c.marker.enlargeCurrentPoint(i,o.paths,r,a)}return{x:r,y:a}}},{key:"handleBarTooltip",value:function(e){var n,i,s=e.e,o=e.opt,r=this.w,a=this.ttCtx,l=a.getElTooltip(),c=0,u=0,d=0,h=this.getBarTooltipXY({e:s,opt:o});if(h.j!==null||h.barHeight!==0||h.barWidth!==0){n=h.i;var f=h.j;if(r.globals.capturedSeriesIndex=n,r.globals.capturedDataPointIndex=f,r.globals.isBarHorizontal&&a.tooltipUtil.hasBars()||!r.config.tooltip.shared?(u=h.x,d=h.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[n]:r.config.stroke.width,c=u):r.globals.comboCharts||r.config.tooltip.shared||(c/=2),isNaN(d)&&(d=r.globals.svgHeight-a.tooltipRect.ttHeight),parseInt(o.paths.parentNode.getAttribute("data:realIndex"),10),u+a.tooltipRect.ttWidth>r.globals.gridWidth?u-=a.tooltipRect.ttWidth:u<0&&(u=0),a.w.config.tooltip.followCursor){var p=a.getElGrid().getBoundingClientRect();d=a.e.clientY-p.top}a.tooltip===null&&(a.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?a.tooltipPosition.moveXCrosshairs(c+i/2):a.tooltipPosition.moveXCrosshairs(c)),!a.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&a.tooltipUtil.hasBars())&&(d=d+r.globals.translateY-a.tooltipRect.ttHeight/2,l.style.left=u+r.globals.translateX+"px",l.style.top=d+"px")}}},{key:"getBarTooltipXY",value:function(e){var n=this,i=e.e,s=e.opt,o=this.w,r=null,a=this.ttCtx,l=0,c=0,u=0,d=0,h=0,f=i.target.classList;if(f.contains("apexcharts-bar-area")||f.contains("apexcharts-candlestick-area")||f.contains("apexcharts-boxPlot-area")||f.contains("apexcharts-rangebar-area")){var p=i.target,m=p.getBoundingClientRect(),y=s.elGrid.getBoundingClientRect(),b=m.height;h=m.height;var k=m.width,C=parseInt(p.getAttribute("cx"),10),$=parseInt(p.getAttribute("cy"),10);d=parseFloat(p.getAttribute("barWidth"));var x=i.type==="touchmove"?i.touches[0].clientX:i.clientX;r=parseInt(p.getAttribute("j"),10),l=parseInt(p.parentNode.getAttribute("rel"),10)-1;var M=p.getAttribute("data-range-y1"),P=p.getAttribute("data-range-y2");o.globals.comboCharts&&(l=parseInt(p.parentNode.getAttribute("data:realIndex"),10));var T=function(L){return o.globals.isXNumeric?C-k/2:n.isVerticalGroupedRangeBar?C+k/2:C-a.dataPointsDividedWidth+k/2},I=function(){return $-a.dataPointsDividedHeight+b/2-a.tooltipRect.ttHeight/2};a.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:l,j:r,y1:M?parseInt(M,10):null,y2:P?parseInt(P,10):null,shared:!a.showOnIntersect&&o.config.tooltip.shared,e:i}),o.config.tooltip.followCursor?o.globals.isBarHorizontal?(c=x-y.left+15,u=I()):(c=T(),u=i.clientY-y.top-a.tooltipRect.ttHeight/2-15):o.globals.isBarHorizontal?((c=C)<a.xyRatios.baseLineInvertedY&&(c=C-a.tooltipRect.ttWidth),u=I()):(c=T(),u=$)}return{x:c,y:u,barHeight:h,barWidth:d,i:l,j:r}}}]),t}(),$Ct=function(){function t(e){lt(this,t),this.w=e.w,this.ttCtx=e}return ct(t,[{key:"drawXaxisTooltip",value:function(){var e=this.w,n=this.ttCtx,i=e.config.xaxis.position==="bottom";n.xaxisOffY=i?e.globals.gridHeight+1:-e.globals.xAxisHeight-e.config.xaxis.axisTicks.height+3;var s=i?"apexcharts-xaxistooltip apexcharts-xaxistooltip-bottom":"apexcharts-xaxistooltip apexcharts-xaxistooltip-top",o=e.globals.dom.elWrap;n.isXAxisTooltipEnabled&&e.globals.dom.baseEl.querySelector(".apexcharts-xaxistooltip")===null&&(n.xaxisTooltip=document.createElement("div"),n.xaxisTooltip.setAttribute("class",s+" apexcharts-theme-"+e.config.tooltip.theme),o.appendChild(n.xaxisTooltip),n.xaxisTooltipText=document.createElement("div"),n.xaxisTooltipText.classList.add("apexcharts-xaxistooltip-text"),n.xaxisTooltipText.style.fontFamily=e.config.xaxis.tooltip.style.fontFamily||e.config.chart.fontFamily,n.xaxisTooltipText.style.fontSize=e.config.xaxis.tooltip.style.fontSize,n.xaxisTooltip.appendChild(n.xaxisTooltipText))}},{key:"drawYaxisTooltip",value:function(){for(var e=this.w,n=this.ttCtx,i=0;i<e.config.yaxis.length;i++){var s=e.config.yaxis[i].opposite||e.config.yaxis[i].crosshairs.opposite;n.yaxisOffX=s?e.globals.gridWidth+1:1;var o="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i,s?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left"),r=e.globals.dom.elWrap;e.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(i))===null&&(n.yaxisTooltip=document.createElement("div"),n.yaxisTooltip.setAttribute("class",o+" apexcharts-theme-"+e.config.tooltip.theme),r.appendChild(n.yaxisTooltip),i===0&&(n.yaxisTooltipText=[]),n.yaxisTooltipText[i]=document.createElement("div"),n.yaxisTooltipText[i].classList.add("apexcharts-yaxistooltip-text"),n.yaxisTooltip.appendChild(n.yaxisTooltipText[i]))}}},{key:"setXCrosshairWidth",value:function(){var e=this.w,n=this.ttCtx,i=n.getElXCrosshairs();if(n.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){var s=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(s!==null&&e.config.xaxis.crosshairs.width==="barWidth"){var o=parseFloat(s.getAttribute("barWidth"));n.xcrosshairsWidth=o}else if(e.config.xaxis.crosshairs.width==="tickWidth"){var r=e.globals.labels.length;n.xcrosshairsWidth=e.globals.gridWidth/r}}else if(e.config.xaxis.crosshairs.width==="tickWidth"){var a=e.globals.labels.length;n.xcrosshairsWidth=e.globals.gridWidth/a}else if(e.config.xaxis.crosshairs.width==="barWidth"){var l=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(l!==null){var c=parseFloat(l.getAttribute("barWidth"));n.xcrosshairsWidth=c}else n.xcrosshairsWidth=1}e.globals.isBarHorizontal&&(n.xcrosshairsWidth=0),i!==null&&n.xcrosshairsWidth>0&&i.setAttribute("width",n.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,n=this.ttCtx;n.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),n.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,n,i){var s=this.ttCtx,o=this.w,r=o.globals,a=r.seriesYAxisMap[e];if(s.yaxisTooltips[e]&&a.length>0){var l=r.yLabelFormatters[e],c=s.getElGrid().getBoundingClientRect(),u=a[0],d=0;i.yRatio.length>1&&(d=u);var h=(n-c.top)*i.yRatio[d],f=r.maxYArr[u]-r.minYArr[u],p=r.minYArr[u]+(f-h);o.config.yaxis[e].reversed&&(p=r.maxYArr[u]-(f-h)),s.tooltipPosition.moveYCrosshairs(n-c.top),s.yaxisTooltipText[e].innerHTML=l(p),s.tooltipPosition.moveYAxisTooltip(e)}}}]),t}(),_T=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.tConfig=n.config.tooltip,this.tooltipUtil=new DU(this),this.tooltipLabels=new CCt(this),this.tooltipPosition=new RU(this),this.marker=new xCt(this),this.intersect=new SCt(this),this.axesTooltip=new $Ct(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!n.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return ct(t,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl?e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(e){var n=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=n.config.xaxis.tooltip.enabled&&n.globals.axisCharts,this.yaxisTooltips=n.config.yaxis.map(function(r,a){return!!(r.show&&r.tooltip.enabled&&n.globals.axisCharts)}),this.allTooltipSeriesGroups=[],n.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),n.config.tooltip.cssClass&&i.classList.add(n.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),n.globals.dom.elWrap.appendChild(i),n.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var s=new i1(this.ctx);this.xAxisTicksPositions=s.getXAxisTicksPositions()}if(!n.globals.comboCharts&&!this.tConfig.intersect&&n.config.chart.type!=="rangeBar"||this.tConfig.shared||(this.showOnIntersect=!0),n.config.markers.size!==0&&n.globals.markers.largestSize!==0||this.marker.drawDynamicPoints(this),n.globals.collapsedSeries.length!==n.globals.series.length){this.dataPointsDividedHeight=n.globals.gridHeight/n.globals.dataPoints,this.dataPointsDividedWidth=n.globals.gridWidth/n.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||n.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var o=n.globals.series.length;(n.globals.xyCharts||n.globals.comboCharts)&&this.tConfig.shared&&(o=this.showOnIntersect?1:n.globals.series.length),this.legendLabels=n.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(o),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var n=this,i=this.w,s=[],o=this.getElTooltip(),r=function(l){var c=document.createElement("div");c.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(l)),c.style.order=i.config.tooltip.inverseOrder?e-l:l+1;var u=document.createElement("span");u.classList.add("apexcharts-tooltip-marker"),u.style.color=i.globals.colors[l];var d=i.config.markers.shape,h=d;Array.isArray(d)&&(h=d[l]),u.setAttribute("shape",h),c.appendChild(u);var f=document.createElement("div");f.classList.add("apexcharts-tooltip-text"),f.style.fontFamily=n.tConfig.style.fontFamily||i.config.chart.fontFamily,f.style.fontSize=n.tConfig.style.fontSize,["y","goals","z"].forEach(function(p){var m=document.createElement("div");m.classList.add("apexcharts-tooltip-".concat(p,"-group"));var y=document.createElement("span");y.classList.add("apexcharts-tooltip-text-".concat(p,"-label")),m.appendChild(y);var b=document.createElement("span");b.classList.add("apexcharts-tooltip-text-".concat(p,"-value")),m.appendChild(b),f.appendChild(m)}),c.appendChild(f),o.appendChild(c),s.push(c)},a=0;a<e;a++)r(a);return s}},{key:"addSVGEvents",value:function(){var e=this.w,n=e.config.chart.type,i=this.getElTooltip(),s=!(n!=="bar"&&n!=="candlestick"&&n!=="boxPlot"&&n!=="rangeBar"),o=n==="area"||n==="line"||n==="scatter"||n==="bubble"||n==="radar",r=e.globals.dom.Paper.node,a=this.getElGrid();a&&(this.seriesBound=a.getBoundingClientRect());var l,c=[],u=[],d={hoverArea:r,elGrid:a,tooltipEl:i,tooltipY:c,tooltipX:u,ttItems:this.ttItems};if(e.globals.axisCharts&&(o?l=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series[data\\:longestSeries='true'] .apexcharts-marker"):s?l=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-bar-area, .apexcharts-series .apexcharts-candlestick-area, .apexcharts-series .apexcharts-boxPlot-area, .apexcharts-series .apexcharts-rangebar-area"):n!=="heatmap"&&n!=="treemap"||(l=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series .apexcharts-heatmap, .apexcharts-series .apexcharts-treemap")),l&&l.length))for(var h=0;h<l.length;h++)c.push(l[h].getAttribute("cy")),u.push(l[h].getAttribute("cx"));if(e.globals.xyCharts&&!this.showOnIntersect||e.globals.comboCharts&&!this.showOnIntersect||s&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([r],d);else if(s&&!e.globals.comboCharts||o&&this.showOnIntersect)this.addDatapointEventsListeners(d);else if(!e.globals.axisCharts||n==="heatmap"||n==="treemap"){var f=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");this.addPathsEventListeners(f,d)}if(this.showOnIntersect){var p=e.globals.dom.baseEl.querySelectorAll(".apexcharts-line-series .apexcharts-marker, .apexcharts-area-series .apexcharts-marker");p.length>0&&this.addPathsEventListeners(p,d),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(d)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,n=this.getElTooltip(),i=n.getBoundingClientRect(),s=i.width+10,o=i.height+10,r=this.tConfig.fixed.offsetX,a=this.tConfig.fixed.offsetY,l=this.tConfig.fixed.position.toLowerCase();return l.indexOf("right")>-1&&(r=r+e.globals.svgWidth-s+10),l.indexOf("bottom")>-1&&(a=a+e.globals.svgHeight-o-10),n.style.left=r+"px",n.style.top=a+"px",{x:r,y:a,ttWidth:s,ttHeight:o}}},{key:"addDatapointEventsListeners",value:function(e){var n=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(n,e)}},{key:"addPathsEventListeners",value:function(e,n){for(var i=this,s=function(r){var a={paths:e[r],tooltipEl:n.tooltipEl,tooltipY:n.tooltipY,tooltipX:n.tooltipX,elGrid:n.elGrid,hoverArea:n.hoverArea,ttItems:n.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(l){return e[r].addEventListener(l,i.onSeriesHover.bind(i,a),{capture:!1,passive:!0})})},o=0;o<e.length;o++)s(o)}},{key:"onSeriesHover",value:function(e,n){var i=this,s=Date.now()-this.lastHoverTime;s>=20?this.seriesHover(e,n):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){i.seriesHover(e,n)},20-s))}},{key:"seriesHover",value:function(e,n){var i=this;this.lastHoverTime=Date.now();var s=[],o=this.w;o.config.chart.group&&(s=this.ctx.getGroupedCharts()),o.globals.axisCharts&&(o.globals.minX===-1/0&&o.globals.maxX===1/0||o.globals.dataPoints===0)||(s.length?s.forEach(function(r){var a=i.getElTooltip(r),l={paths:e.paths,tooltipEl:a,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:r.w.globals.tooltip.ttItems};r.w.globals.minX===i.w.globals.minX&&r.w.globals.maxX===i.w.globals.maxX&&r.w.globals.tooltip.seriesHoverByContext({chartCtx:r,ttCtx:r.w.globals.tooltip,opt:l,e:n})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:n}))}},{key:"seriesHoverByContext",value:function(e){var n=e.chartCtx,i=e.ttCtx,s=e.opt,o=e.e,r=n.w,a=this.getElTooltip(n);a&&(i.tooltipRect={x:0,y:0,ttWidth:a.getBoundingClientRect().width,ttHeight:a.getBoundingClientRect().height},i.e=o,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new lr(n).toggleSeriesOnHover(o,o.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:o,opt:s,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:o,opt:s,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var n,i,s=e.e,o=e.opt,r=this.w,a=o.elGrid.getBoundingClientRect(),l=s.type==="touchmove"?s.touches[0].clientX:s.clientX,c=s.type==="touchmove"?s.touches[0].clientY:s.clientY;if(this.clientY=c,this.clientX=l,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,c<a.top||c>a.top+a.height)this.handleMouseOut(o);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var u=parseInt(o.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(u)<0)return void this.handleMouseOut(o)}var d=this.getElTooltip(),h=this.getElXCrosshairs(),f=[];r.config.chart.group&&(f=this.ctx.getSyncedCharts());var p=r.globals.xyCharts||r.config.chart.type==="bar"&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if(s.type==="mousemove"||s.type==="touchmove"||s.type==="mouseup"){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;h!==null&&h.classList.add("apexcharts-active");var m=this.yaxisTooltips.filter(function(k){return k===!0});if(this.ycrosshairs!==null&&m.length&&this.ycrosshairs.classList.add("apexcharts-active"),p&&!this.showOnIntersect||f.length>1)this.handleStickyTooltip(s,l,c,o);else if(r.config.chart.type==="heatmap"||r.config.chart.type==="treemap"){var y=this.intersect.handleHeatTreeTooltip({e:s,opt:o,x:n,y:i,type:r.config.chart.type});n=y.x,i=y.y,d.style.left=n+"px",d.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:s,opt:o}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:s,opt:o,x:n,y:i});if(this.yaxisTooltips.length)for(var b=0;b<r.config.yaxis.length;b++)this.axesTooltip.drawYaxisTooltipText(b,c,this.xyRatios);r.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),o.tooltipEl.classList.add("apexcharts-active")}else s.type!=="mouseout"&&s.type!=="touchend"||this.handleMouseOut(o)}}},{key:"nonAxisChartsTooltips",value:function(e){var n=e.e,i=e.opt,s=e.tooltipRect,o=this.w,r=i.paths.getAttribute("rel"),a=this.getElTooltip(),l=o.globals.dom.elWrap.getBoundingClientRect();if(n.type==="mousemove"||n.type==="touchmove"){o.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),a.classList.add("apexcharts-active"),this.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:parseInt(r,10)-1,shared:!1});var c=o.globals.clientX-l.left-s.ttWidth/2,u=o.globals.clientY-l.top-s.ttHeight-10;if(a.style.left=c+"px",a.style.top=u+"px",o.config.legend.tooltipHoverFormatter){var d=r-1,h=(0,o.config.legend.tooltipHoverFormatter)(this.legendLabels[d].getAttribute("data:default-text"),{seriesIndex:d,dataPointIndex:d,w:o});this.legendLabels[d].innerHTML=h}}else n.type!=="mouseout"&&n.type!=="touchend"||(a.classList.remove("apexcharts-active"),o.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),o.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(f){var p=f.getAttribute("data:default-text");f.innerHTML=decodeURIComponent(p)}))}},{key:"handleStickyTooltip",value:function(e,n,i,s){var o=this.w,r=this.tooltipUtil.getNearestValues({context:this,hoverArea:s.hoverArea,elGrid:s.elGrid,clientX:n,clientY:i}),a=r.j,l=r.capturedSeries;o.globals.collapsedSeriesIndices.includes(l)&&(l=null);var c=s.elGrid.getBoundingClientRect();if(r.hoverX<0||r.hoverX>c.width)this.handleMouseOut(s);else if(l!==null)this.handleStickyCapturedSeries(e,l,s,a);else if(this.tooltipUtil.isXoverlap(a)||o.globals.isBarHorizontal){var u=o.globals.series.findIndex(function(d,h){return!o.globals.collapsedSeriesIndices.includes(h)});this.create(e,this,u,a,s.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,n,i,s){var o=this.w;if(!this.tConfig.shared&&o.globals.series[n][s]===null)return void this.handleMouseOut(i);if(o.globals.series[n][s]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(s)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,n,s,i.ttItems):this.create(e,this,n,s,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(s)){var r=o.globals.series.findIndex(function(a,l){return!o.globals.collapsedSeriesIndices.includes(l)});this.create(e,this,r,s,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,n=new Be(this.ctx),i=e.globals.dom.Paper.find(".apexcharts-bar-area"),s=0;s<i.length;s++)n.pathMouseLeave(i[s])}},{key:"handleMouseOut",value:function(e){var n=this.w,i=this.getElXCrosshairs();if(n.globals.dom.baseEl.classList.remove("apexcharts-tooltip-active"),e.tooltipEl.classList.remove("apexcharts-active"),this.deactivateHoverFilter(),n.config.chart.type!=="bubble"&&this.marker.resetPointsSize(),i!==null&&i.classList.remove("apexcharts-active"),this.ycrosshairs!==null&&this.ycrosshairs.classList.remove("apexcharts-active"),this.isXAxisTooltipEnabled&&this.xaxisTooltip.classList.remove("apexcharts-active"),this.yaxisTooltips.length){this.yaxisTTEls===null&&(this.yaxisTTEls=n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));for(var s=0;s<this.yaxisTTEls.length;s++)this.yaxisTTEls[s].classList.remove("apexcharts-active")}n.config.legend.tooltipHoverFormatter&&this.legendLabels.forEach(function(o){var r=o.getAttribute("data:default-text");o.innerHTML=decodeURIComponent(r)})}},{key:"markerClick",value:function(e,n,i){var s=this.w;typeof s.config.chart.events.markerClick=="function"&&s.config.chart.events.markerClick(e,this.ctx,{seriesIndex:n,dataPointIndex:i,w:s}),this.ctx.events.fireEvent("markerClick",[e,this.ctx,{seriesIndex:n,dataPointIndex:i,w:s}])}},{key:"create",value:function(e,n,i,s,o){var r,a,l,c,u,d,h,f,p,m,y,b,k,C,$,x,M=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,P=this.w,T=n;e.type==="mouseup"&&this.markerClick(e,i,s),M===null&&(M=this.tConfig.shared);var I=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars(),R=function(){P.globals.markers.largestSize>0?T.marker.enlargePoints(s):T.tooltipPosition.moveDynamicPointsOnHover(s)};if(P.config.legend.tooltipHoverFormatter){var V=P.config.legend.tooltipHoverFormatter,H=Array.from(this.legendLabels);H.forEach(function(Z){var ae=Z.getAttribute("data:default-text");Z.innerHTML=decodeURIComponent(ae)});for(var F=0;F<H.length;F++){var z=H[F],N=parseInt(z.getAttribute("i"),10),q=decodeURIComponent(z.getAttribute("data:default-text")),K=V(q,{seriesIndex:M?N:i,dataPointIndex:s,w:P});if(M)z.innerHTML=P.globals.collapsedSeriesIndices.indexOf(N)<0?K:q;else if(z.innerHTML=N===i?K:q,i===N)break}}var X=Je(Je({ttItems:o,i,j:s},((r=P.globals.seriesRange)===null||r===void 0||(a=r[i])===null||a===void 0||(l=a[s])===null||l===void 0||(c=l.y[0])===null||c===void 0?void 0:c.y1)!==void 0&&{y1:(u=P.globals.seriesRange)===null||u===void 0||(d=u[i])===null||d===void 0||(h=d[s])===null||h===void 0||(f=h.y[0])===null||f===void 0?void 0:f.y1}),((p=P.globals.seriesRange)===null||p===void 0||(m=p[i])===null||m===void 0||(y=m[s])===null||y===void 0||(b=y.y[0])===null||b===void 0?void 0:b.y2)!==void 0&&{y2:(k=P.globals.seriesRange)===null||k===void 0||(C=k[i])===null||C===void 0||($=C[s])===null||$===void 0||(x=$.y[0])===null||x===void 0?void 0:x.y2});if(M){if(T.tooltipLabels.drawSeriesTexts(Je(Je({},X),{},{shared:!this.showOnIntersect&&this.tConfig.shared})),I)R();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var U=new Be(this.ctx),Q=P.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(s,"']"));this.deactivateHoverFilter(),T.tooltipPosition.moveStickyTooltipOverBars(s,i),T.tooltipUtil.getAllMarkers(!0).length&&R();for(var ne=0;ne<Q.length;ne++)U.pathMouseEnter(Q[ne])}}else T.tooltipLabels.drawSeriesTexts(Je({shared:!1},X)),this.tooltipUtil.hasBars()&&T.tooltipPosition.moveStickyTooltipOverBars(s,i),I&&T.tooltipPosition.moveMarkers(i,s)}}]),t}(),ACt=function(){function t(e){lt(this,t),this.w=e.w,this.barCtx=e,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}return ct(t,[{key:"handleBarDataLabels",value:function(e){var n,i,s=e.x,o=e.y,r=e.y1,a=e.y2,l=e.i,c=e.j,u=e.realIndex,d=e.columnGroupIndex,h=e.series,f=e.barHeight,p=e.barWidth,m=e.barXPosition,y=e.barYPosition,b=e.visibleSeries,k=e.renderedPath,C=this.w,$=new Be(this.barCtx.ctx),x=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[u]:this.barCtx.strokeWidth;C.globals.isXNumeric&&!C.globals.isBarHorizontal?(n=s+parseFloat(p*(b+1)),i=o+parseFloat(f*(b+1))-x):(n=s+parseFloat(p*b),i=o+parseFloat(f*b));var M,P=null,T=s,I=o,L={},R=C.config.dataLabels,V=this.barCtx.barOptions.dataLabels,H=this.barCtx.barOptions.dataLabels.total;y!==void 0&&this.barCtx.isRangeBar&&(i=y,I=y),m!==void 0&&this.barCtx.isVerticalGroupedRangeBar&&(n=m,T=m);var F=R.offsetX,z=R.offsetY,N={width:0,height:0};if(C.config.dataLabels.enabled){var q=C.globals.series[l][c];N=$.getTextRects(C.config.dataLabels.formatter?C.config.dataLabels.formatter(q,Je(Je({},C),{},{seriesIndex:l,dataPointIndex:c,w:C})):C.globals.yLabelFormatters[0](q),parseFloat(R.style.fontSize))}var K={x:s,y:o,i:l,j:c,realIndex:u,columnGroupIndex:d,renderedPath:k,bcx:n,bcy:i,barHeight:f,barWidth:p,textRects:N,strokeWidth:x,dataLabelsX:T,dataLabelsY:I,dataLabelsConfig:R,barDataLabelsConfig:V,barTotalDataLabelsConfig:H,offX:F,offY:z};return L=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(K):this.calculateColumnsDataLabelsPosition(K),k.attr({cy:L.bcy,cx:L.bcx,j:c,val:C.globals.series[l][c],barHeight:f,barWidth:p}),M=this.drawCalculatedDataLabels({x:L.dataLabelsX,y:L.dataLabelsY,val:this.barCtx.isRangeBar?[r,a]:C.config.chart.stackType==="100%"?h[u][c]:C.globals.series[u][c],i:u,j:c,barWidth:p,barHeight:f,textRects:N,dataLabelsConfig:R}),C.config.chart.stacked&&H.enabled&&(P=this.drawTotalDataLabels({x:L.totalDataLabelsX,y:L.totalDataLabelsY,barWidth:p,barHeight:f,realIndex:u,textAnchor:L.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:u,j:c}),dataLabelsConfig:R,barTotalDataLabelsConfig:H})),{dataLabels:M,totalDataLabels:P}}},{key:"getStackedTotalDataLabel",value:function(e){var n=e.realIndex,i=e.j,s=this.w,o=this.barCtx.stackedSeriesTotals[i];return this.totalFormatter&&(o=this.totalFormatter(o,Je(Je({},s),{},{seriesIndex:n,dataPointIndex:i,w:s}))),o}},{key:"calculateColumnsDataLabelsPosition",value:function(e){var n=this,i=this.w,s=e.i,o=e.j,r=e.realIndex;e.columnGroupIndex;var a,l,c=e.y,u=e.bcx,d=e.barWidth,h=e.barHeight,f=e.textRects,p=e.dataLabelsX,m=e.dataLabelsY,y=e.dataLabelsConfig,b=e.barDataLabelsConfig,k=e.barTotalDataLabelsConfig,C=e.strokeWidth,$=e.offX,x=e.offY,M=u;h=Math.abs(h);var P=i.config.plotOptions.bar.dataLabels.orientation==="vertical",T=this.barCtx.barHelpers.getZeroValueEncounters({i:s,j:o}).zeroEncounters;u-=C/2;var I=i.globals.gridWidth/i.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?p+=d/2:(p=i.globals.isXNumeric?u-d/2+$:u-I+d/2+$,T>0&&i.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(p-=d*T)),P&&(p=p+f.height/2-C/2-2);var L=i.globals.series[s][o]<0,R=c;switch(this.barCtx.isReversed&&(R=c+(L?h:-h)),b.position){case"center":m=P?L?R-h/2+x:R+h/2-x:L?R-h/2+f.height/2+x:R+h/2+f.height/2-x;break;case"bottom":m=P?L?R-h+x:R+h-x:L?R-h+f.height+C+x:R+h-f.height/2+C-x;break;case"top":m=P?L?R+x:R-x:L?R-f.height/2-x:R+f.height+x}var V=R;if(i.globals.seriesGroups.forEach(function(z){var N;(N=n.barCtx[z.join(",")])===null||N===void 0||N.prevY.forEach(function(q){V=L?Math.max(q[o],V):Math.min(q[o],V)})}),this.barCtx.lastActiveBarSerieIndex===r&&k.enabled){var H=new Be(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:o}),y.fontSize);a=L?V-H.height/2-x-k.offsetY+18:V+H.height+x+k.offsetY-18;var F=I;l=M+(i.globals.isXNumeric?-d*i.globals.barGroups.length/2:i.globals.barGroups.length*d/2-(i.globals.barGroups.length-1)*d-F)+k.offsetX}return i.config.chart.stacked||(m<0?m=0+C:m+f.height/3>i.globals.gridHeight&&(m=i.globals.gridHeight-C)),{bcx:u,bcy:c,dataLabelsX:p,dataLabelsY:m,totalDataLabelsX:l,totalDataLabelsY:a,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var n=this,i=this.w,s=e.x,o=e.i,r=e.j,a=e.realIndex,l=e.bcy,c=e.barHeight,u=e.barWidth,d=e.textRects,h=e.dataLabelsX,f=e.strokeWidth,p=e.dataLabelsConfig,m=e.barDataLabelsConfig,y=e.barTotalDataLabelsConfig,b=e.offX,k=e.offY,C=i.globals.gridHeight/i.globals.dataPoints;u=Math.abs(u);var $,x,M=l-(this.barCtx.isRangeBar?0:C)+c/2+d.height/2+k-3,P="start",T=i.globals.series[o][r]<0,I=s;switch(this.barCtx.isReversed&&(I=s+(T?-u:u),P=T?"start":"end"),m.position){case"center":h=T?I+u/2-b:Math.max(d.width/2,I-u/2)+b;break;case"bottom":h=T?I+u-f-b:I-u+f+b;break;case"top":h=T?I-f-b:I-f+b}var L=I;if(i.globals.seriesGroups.forEach(function(V){var H;(H=n.barCtx[V.join(",")])===null||H===void 0||H.prevX.forEach(function(F){L=T?Math.min(F[r],L):Math.max(F[r],L)})}),this.barCtx.lastActiveBarSerieIndex===a&&y.enabled){var R=new Be(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:a,j:r}),p.fontSize);T?($=L-f-b-y.offsetX,P="end"):$=L+b+y.offsetX+(this.barCtx.isReversed?-(u+f):f),x=M-d.height/2+R.height/2+y.offsetY+f,i.globals.barGroups.length>1&&(x-=i.globals.barGroups.length/2*(c/2))}return i.config.chart.stacked||(p.textAnchor==="start"?h-d.width<0?h=T?d.width+f:f:h+d.width>i.globals.gridWidth&&(h=T?i.globals.gridWidth-f:i.globals.gridWidth-d.width-f):p.textAnchor==="middle"?h-d.width/2<0?h=d.width/2+f:h+d.width/2>i.globals.gridWidth&&(h=i.globals.gridWidth-d.width/2-f):p.textAnchor==="end"&&(h<1?h=d.width+f:h+1>i.globals.gridWidth&&(h=i.globals.gridWidth-d.width-f))),{bcx:s,bcy:l,dataLabelsX:h,dataLabelsY:M,totalDataLabelsX:$,totalDataLabelsY:x,totalDataLabelsAnchor:P}}},{key:"drawCalculatedDataLabels",value:function(e){var n=e.x,i=e.y,s=e.val,o=e.i,r=e.j,a=e.textRects,l=e.barHeight,c=e.barWidth,u=e.dataLabelsConfig,d=this.w,h="rotate(0)";d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(h="rotate(-90, ".concat(n,", ").concat(i,")"));var f=new jf(this.barCtx.ctx),p=new Be(this.barCtx.ctx),m=u.formatter,y=null,b=d.globals.collapsedSeriesIndices.indexOf(o)>-1;if(u.enabled&&!b){y=p.group({class:"apexcharts-data-labels",transform:h});var k="";s!==void 0&&(k=m(s,Je(Je({},d),{},{seriesIndex:o,dataPointIndex:r,w:d}))),!s&&d.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(k="");var C=d.globals.series[o][r]<0,$=d.config.plotOptions.bar.dataLabels.position;d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&($==="top"&&(u.textAnchor=C?"end":"start"),$==="center"&&(u.textAnchor="middle"),$==="bottom"&&(u.textAnchor=C?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&c<p.getTextRects(k,parseFloat(u.style.fontSize)).width&&(k=""),d.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?a.width/1.6>Math.abs(c)&&(k=""):a.height/1.6>Math.abs(l)&&(k=""));var x=Je({},u);this.barCtx.isHorizontal&&s<0&&(u.textAnchor==="start"?x.textAnchor="end":u.textAnchor==="end"&&(x.textAnchor="start")),f.plotDataLabelsText({x:n,y:i,text:k,i:o,j:r,parent:y,dataLabelsConfig:x,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return y}},{key:"drawTotalDataLabels",value:function(e){var n=e.x,i=e.y,s=e.val,o=e.realIndex,r=e.textAnchor,a=e.barTotalDataLabelsConfig;this.w;var l,c=new Be(this.barCtx.ctx);return a.enabled&&n!==void 0&&i!==void 0&&this.barCtx.lastActiveBarSerieIndex===o&&(l=c.drawText({x:n,y:i,foreColor:a.style.color,text:s,textAnchor:r,fontFamily:a.style.fontFamily,fontSize:a.style.fontSize,fontWeight:a.style.fontWeight})),l}}]),t}(),ECt=function(){function t(e){lt(this,t),this.w=e.w,this.barCtx=e}return ct(t,[{key:"initVariables",value:function(e){var n=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i<e.length;i++)if(e[i].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[i].length),n.globals.isXNumeric)for(var s=0;s<e[i].length;s++)n.globals.seriesX[i][s]>n.globals.minX&&n.globals.seriesX[i][s]<n.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=n.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(n.globals.series),this.barCtx.seriesLen===0&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],n.globals.comboCharts||this.checkZeroSeries({series:e})}},{key:"initialPositions",value:function(e){var n,i,s,o,r,a,l,c,u=this.w,d=u.globals.dataPoints;this.barCtx.isRangeBar&&(d=u.globals.labels.length);var h=this.barCtx.seriesLen;if(u.config.plotOptions.bar.rangeBarGroupRows&&(h=1),this.barCtx.isHorizontal)r=(s=u.globals.gridHeight/d)/h,u.globals.isXNumeric&&(r=(s=u.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),r=r*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf("%")===-1&&(r=parseInt(this.barCtx.barOptions.barHeight,10)),c=this.barCtx.baseLineInvertedY+u.globals.padHorizontal+(this.barCtx.isReversed?u.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(c=u.globals.gridWidth/2),i=(s-r*this.barCtx.seriesLen)/2;else{if(o=u.globals.gridWidth/this.barCtx.visibleItems,u.config.xaxis.convertedCatToNumeric&&(o=u.globals.gridWidth/u.globals.dataPoints),a=o/h*parseInt(this.barCtx.barOptions.columnWidth,10)/100,u.globals.isXNumeric){var f=this.barCtx.xRatio;u.globals.minXDiff&&u.globals.minXDiff!==.5&&u.globals.minXDiff/f>0&&(o=u.globals.minXDiff/f),(a=o/h*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(a=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(a=parseInt(this.barCtx.barOptions.columnWidth,10)),l=u.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?u.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),u.globals.isXNumeric?n=this.barCtx.getBarXForNumericXAxis({x:n,j:0,realIndex:e,barWidth:a}).x:n=u.globals.padHorizontal+pe.noExponents(o-a*this.barCtx.seriesLen)/2}return u.globals.barHeight=r,u.globals.barWidth=a,{x:n,y:i,yDivision:s,xDivision:o,barHeight:r,barWidth:a,zeroH:l,zeroW:c}}},{key:"initializeStackedPrevVars",value:function(e){e.w.globals.seriesGroups.forEach(function(n){e[n]||(e[n]={}),e[n].prevY=[],e[n].prevX=[],e[n].prevYF=[],e[n].prevXF=[],e[n].prevYVal=[],e[n].prevXVal=[]})}},{key:"initializeStackedXYVars",value:function(e){e.w.globals.seriesGroups.forEach(function(n){e[n]||(e[n]={}),e[n].xArrj=[],e[n].xArrjF=[],e[n].xArrjVal=[],e[n].yArrj=[],e[n].yArrjF=[],e[n].yArrjVal=[]})}},{key:"getPathFillColor",value:function(e,n,i,s){var o,r,a,l,c=this.w,u=this.barCtx.ctx.fill,d=null,h=this.barCtx.barOptions.distributed?i:n,f=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(p){e[n][i]>=p.from&&e[n][i]<=p.to&&(d=p.color,f=!0)}),{color:u.fillPath({seriesNumber:this.barCtx.barOptions.distributed?h:s,dataPointIndex:i,color:d,value:e[n][i],fillConfig:(o=c.config.series[n].data[i])===null||o===void 0?void 0:o.fill,fillType:(r=c.config.series[n].data[i])!==null&&r!==void 0&&(a=r.fill)!==null&&a!==void 0&&a.type?(l=c.config.series[n].data[i])===null||l===void 0?void 0:l.fill.type:Array.isArray(c.config.fill.type)?c.config.fill.type[s]:c.config.fill.type}),useRangeColor:f}}},{key:"getStrokeWidth",value:function(e,n,i){var s=0,o=this.w;return this.barCtx.series[e][n]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,o.config.stroke.show&&(this.barCtx.isNullValue||(s=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),s}},{key:"createBorderRadiusArr",value:function(e){var n,i=this.w,s=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,o=e.length,r=0|((n=e[0])===null||n===void 0?void 0:n.length),a=Array.from({length:o},function(){return Array(r).fill(s?"top":"none")});if(s)return a;for(var l=0;l<r;l++){for(var c=[],u=[],d=0,h=0;h<o;h++){var f=e[h][l];f>0?(c.push(h),d++):f<0&&(u.push(h),d++)}if(c.length>0&&u.length===0)if(c.length===1)a[c[0]][l]="both";else{var p,m=c[0],y=c[c.length-1],b=pm(c);try{for(b.s();!(p=b.n()).done;){var k=p.value;a[k][l]=k===m?"bottom":k===y?"top":"none"}}catch(N){b.e(N)}finally{b.f()}}else if(u.length>0&&c.length===0)if(u.length===1)a[u[0]][l]="both";else{var C,$=Math.max.apply(Math,u),x=Math.min.apply(Math,u),M=pm(u);try{for(M.s();!(C=M.n()).done;){var P=C.value;a[P][l]=P===$?"bottom":P===x?"top":"none"}}catch(N){M.e(N)}finally{M.f()}}else if(c.length>0&&u.length>0){var T,I=c[c.length-1],L=pm(c);try{for(L.s();!(T=L.n()).done;){var R=T.value;a[R][l]=R===I?"top":"none"}}catch(N){L.e(N)}finally{L.f()}var V,H=Math.max.apply(Math,u),F=pm(u);try{for(F.s();!(V=F.n()).done;){var z=V.value;a[z][l]=z===H?"bottom":"none"}}catch(N){F.e(N)}finally{F.f()}}else d===1&&(a[c[0]||u[0]][l]="both")}return a}},{key:"barBackground",value:function(e){var n=e.j,i=e.i,s=e.x1,o=e.x2,r=e.y1,a=e.y2,l=e.elSeries,c=this.w,u=new Be(this.barCtx.ctx),d=new lr(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&d===i){n>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(n%=this.barCtx.barOptions.colors.backgroundBarColors.length);var h=this.barCtx.barOptions.colors.backgroundBarColors[n],f=u.drawRect(s!==void 0?s:0,r!==void 0?r:0,o!==void 0?o:c.globals.gridWidth,a!==void 0?a:c.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,h,this.barCtx.barOptions.colors.backgroundBarOpacity);l.add(f),f.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var n,i=e.barWidth,s=e.barXPosition,o=e.y1,r=e.y2,a=e.strokeWidth,l=e.isReversed,c=e.series,u=e.seriesGroup,d=e.realIndex,h=e.i,f=e.j,p=e.w,m=new Be(this.barCtx.ctx);(a=Array.isArray(a)?a[d]:a)||(a=0);var y=i,b=s;(n=p.config.series[d].data[f])!==null&&n!==void 0&&n.columnWidthOffset&&(b=s-p.config.series[d].data[f].columnWidthOffset/2,y=i+p.config.series[d].data[f].columnWidthOffset);var k=a/2,C=b+k,$=b+y-k,x=(c[h][f]>=0?1:-1)*(l?-1:1);o+=.001-k*x,r+=.001+k*x;var M=m.move(C,o),P=m.move(C,o),T=m.line($,o);if(p.globals.previousPaths.length>0&&(P=this.barCtx.getPreviousPath(d,f,!1)),M=M+m.line(C,r)+m.line($,r)+T+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),P=P+m.line(C,o)+T+T+T+T+T+m.line(C,o)+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),this.arrBorderRadius[d][f]!=="none"&&(M=m.roundPathCorners(M,p.config.plotOptions.bar.borderRadius)),p.config.chart.stacked){var I=this.barCtx;(I=this.barCtx[u]).yArrj.push(r-k*x),I.yArrjF.push(Math.abs(o-r+a*x)),I.yArrjVal.push(this.barCtx.series[h][f])}return{pathTo:M,pathFrom:P}}},{key:"getBarpaths",value:function(e){var n,i=e.barYPosition,s=e.barHeight,o=e.x1,r=e.x2,a=e.strokeWidth,l=e.isReversed,c=e.series,u=e.seriesGroup,d=e.realIndex,h=e.i,f=e.j,p=e.w,m=new Be(this.barCtx.ctx);(a=Array.isArray(a)?a[d]:a)||(a=0);var y=i,b=s;(n=p.config.series[d].data[f])!==null&&n!==void 0&&n.barHeightOffset&&(y=i-p.config.series[d].data[f].barHeightOffset/2,b=s+p.config.series[d].data[f].barHeightOffset);var k=a/2,C=y+k,$=y+b-k,x=(c[h][f]>=0?1:-1)*(l?-1:1);o+=.001+k*x,r+=.001-k*x;var M=m.move(o,C),P=m.move(o,C);p.globals.previousPaths.length>0&&(P=this.barCtx.getPreviousPath(d,f,!1));var T=m.line(o,$);if(M=M+m.line(r,C)+m.line(r,$)+T+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),P=P+m.line(o,C)+T+T+T+T+T+m.line(o,C)+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),this.arrBorderRadius[d][f]!=="none"&&(M=m.roundPathCorners(M,p.config.plotOptions.bar.borderRadius)),p.config.chart.stacked){var I=this.barCtx;(I=this.barCtx[u]).xArrj.push(r+k*x),I.xArrjF.push(Math.abs(o-r-a*x)),I.xArrjVal.push(this.barCtx.series[h][f])}return{pathTo:M,pathFrom:P}}},{key:"checkZeroSeries",value:function(e){for(var n=e.series,i=this.w,s=0;s<n.length;s++){for(var o=0,r=0;r<n[i.globals.maxValsInArrayIndex].length;r++)o+=n[s][r];o===0&&this.barCtx.zeroSerieses.push(s)}}},{key:"getXForValue",value:function(e,n){var i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2]?n:null;return e!=null&&(i=n+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(e,n,i){var s=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3]?n:null;return e!=null&&(s=n-e/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[i]:0)),s}},{key:"getGoalValues",value:function(e,n,i,s,o,r){var a=this,l=this.w,c=[],u=function(f,p){var m;c.push((Iy(m={},e,e==="x"?a.getXForValue(f,n,!1):a.getYForValue(f,i,r,!1)),Iy(m,"attrs",p),m))};if(l.globals.seriesGoals[s]&&l.globals.seriesGoals[s][o]&&Array.isArray(l.globals.seriesGoals[s][o])&&l.globals.seriesGoals[s][o].forEach(function(f){u(f.value,f)}),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,h={strokeHeight:e==="x"?0:l.globals.markers.size[s],strokeWidth:e==="x"?l.globals.markers.size[s]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[s])?d[s][0]:d[s]};u(l.globals.seriesRangeStart[s][o],h),u(l.globals.seriesRangeEnd[s][o],Je(Je({},h),{},{strokeColor:Array.isArray(d[s])?d[s][1]:d[s]}))}return c}},{key:"drawGoalLine",value:function(e){var n=e.barXPosition,i=e.barYPosition,s=e.goalX,o=e.goalY,r=e.barWidth,a=e.barHeight,l=new Be(this.barCtx.ctx),c=l.group({className:"apexcharts-bar-goals-groups"});c.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:c.node}),c.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var u=null;return this.barCtx.isHorizontal?Array.isArray(s)&&s.forEach(function(d){if(d.x>=-1&&d.x<=l.w.globals.gridWidth+1){var h=d.attrs.strokeHeight!==void 0?d.attrs.strokeHeight:a/2,f=i+h+a/2;u=l.drawLine(d.x,f-2*h,d.x,f,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeWidth?d.attrs.strokeWidth:2,d.attrs.strokeLineCap),c.add(u)}}):Array.isArray(o)&&o.forEach(function(d){if(d.y>=-1&&d.y<=l.w.globals.gridHeight+1){var h=d.attrs.strokeWidth!==void 0?d.attrs.strokeWidth:r/2,f=n+h+r/2;u=l.drawLine(f-2*h,d.y,f,d.y,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeHeight?d.attrs.strokeHeight:2,d.attrs.strokeLineCap),c.add(u)}}),c}},{key:"drawBarShadow",value:function(e){var n=e.prevPaths,i=e.currPaths,s=e.color,o=this.w,r=n.x,a=n.x1,l=n.barYPosition,c=i.x,u=i.x1,d=i.barYPosition,h=l+i.barHeight,f=new Be(this.barCtx.ctx),p=new pe,m=f.move(a,h)+f.line(r,h)+f.line(c,d)+f.line(u,d)+f.line(a,h)+(o.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[realIndex][j]==="both"?" Z":" z");return f.drawPath({d:m,fill:p.shadeColor(.5,pe.rgb2hex(s)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(e){var n,i=e.i,s=e.j,o=this.w,r=0,a=0;return(o.config.plotOptions.bar.horizontal?o.globals.series.map(function(l,c){return c}):((n=o.globals.columnSeries)===null||n===void 0?void 0:n.i.map(function(l){return l}))||[]).forEach(function(l){var c=o.globals.seriesPercent[l][s];c&&r++,l<i&&c===0&&a++}),{nonZeroColumns:r,zeroEncounters:a}}},{key:"getGroupIndex",value:function(e){var n=this.w,i=n.globals.seriesGroups.findIndex(function(r){return r.indexOf(n.globals.seriesNames[e])>-1}),s=this.barCtx.columnGroupIndices,o=s.indexOf(i);return o<0&&(s.push(i),o=s.length-1),{groupIndex:i,columnGroupIndex:o}}}]),t}(),Wf=function(){function t(e,n){lt(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.barOptions=i.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=i.config.stroke.width,this.isNullValue=!1,this.isRangeBar=i.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!i.globals.isBarHorizontal&&i.globals.seriesRange.length&&i.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=n,this.xyRatios!==null&&(this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.invertedXRatio=n.invertedXRatio,this.invertedYRatio=n.invertedYRatio,this.baseLineY=n.baseLineY,this.baseLineInvertedY=n.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var s=new lr(this.ctx);this.lastActiveBarSerieIndex=s.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var o=s.getBarSeriesIndices(),r=new _s(this.ctx);this.stackedSeriesTotals=r.getStackedSeriesTotals(this.w.config.series.map(function(a,l){return o.indexOf(l)===-1?l:-1}).filter(function(a){return a!==-1})),this.barHelpers=new ECt(this)}return ct(t,[{key:"draw",value:function(e,n){var i=this.w,s=new Be(this.ctx),o=new _s(this.ctx,i);e=o.getLogSeries(e),this.series=e,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var r=s.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var a=0,l=0;a<e.length;a++,l++){var c,u,d,h,f=void 0,p=void 0,m=[],y=[],b=i.globals.comboCharts?n[a]:a,k=this.barHelpers.getGroupIndex(b).columnGroupIndex,C=s.group({class:"apexcharts-series",rel:a+1,seriesName:pe.escapeString(i.globals.seriesNames[b]),"data:realIndex":b});this.ctx.series.addCollapsedClassToSeries(C,b),e[a].length>0&&(this.visibleI=this.visibleI+1);var $=0,x=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);var M=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var P=this.barHelpers.initialPositions(b);p=P.y,$=P.barHeight,u=P.yDivision,h=P.zeroW,f=P.x,x=P.barWidth,c=P.xDivision,d=P.zeroH,this.isHorizontal||y.push(f+x/2);var T=s.group({class:"apexcharts-datalabels","data:realIndex":b});i.globals.delayedElements.push({el:T.node}),T.node.classList.add("apexcharts-element-hidden");var I=s.group({class:"apexcharts-bar-goals-markers"}),L=s.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:L.node}),L.node.classList.add("apexcharts-element-hidden");for(var R=0;R<e[a].length;R++){var V=this.barHelpers.getStrokeWidth(a,R,b),H=null,F={indexes:{i:a,j:R,realIndex:b,translationsIndex:M,bc:l},x:f,y:p,strokeWidth:V,elSeries:C};this.isHorizontal?(H=this.drawBarPaths(Je(Je({},F),{},{barHeight:$,zeroW:h,yDivision:u})),x=this.series[a][R]/this.invertedYRatio):(H=this.drawColumnPaths(Je(Je({},F),{},{xDivision:c,barWidth:x,zeroH:d})),$=this.series[a][R]/this.yRatio[M]);var z=this.barHelpers.getPathFillColor(e,a,R,b);if(this.isFunnel&&this.barOptions.isFunnel3d&&this.pathArr.length&&R>0){var N,q=this.barHelpers.drawBarShadow({color:typeof z.color=="string"&&((N=z.color)===null||N===void 0?void 0:N.indexOf("url"))===-1?z.color:pe.hexToRgba(i.globals.colors[a]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:H});L.add(q),i.config.chart.dropShadow.enabled&&new ri(this.ctx).dropShadow(q,i.config.chart.dropShadow,b)}this.pathArr.push(H);var K=this.barHelpers.drawGoalLine({barXPosition:H.barXPosition,barYPosition:H.barYPosition,goalX:H.goalX,goalY:H.goalY,barHeight:$,barWidth:x});K&&I.add(K),p=H.y,f=H.x,R>0&&y.push(f+x/2),m.push(p),this.renderSeries(Je(Je({realIndex:b,pathFill:z.color},z.useRangeColor?{lineFill:z.color}:{}),{},{j:R,i:a,columnGroupIndex:k,pathFrom:H.pathFrom,pathTo:H.pathTo,strokeWidth:V,elSeries:C,x:f,y:p,series:e,barHeight:Math.abs(H.barHeight?H.barHeight:$),barWidth:Math.abs(H.barWidth?H.barWidth:x),elDataLabelsWrap:T,elGoalsMarkers:I,elBarShadows:L,visibleSeries:this.visibleI,type:"bar"}))}i.globals.seriesXvalues[b]=y,i.globals.seriesYvalues[b]=m,r.add(C)}return r}},{key:"renderSeries",value:function(e){var n=e.realIndex,i=e.pathFill,s=e.lineFill,o=e.j,r=e.i,a=e.columnGroupIndex,l=e.pathFrom,c=e.pathTo,u=e.strokeWidth,d=e.elSeries,h=e.x,f=e.y,p=e.y1,m=e.y2,y=e.series,b=e.barHeight,k=e.barWidth,C=e.barXPosition,$=e.barYPosition,x=e.elDataLabelsWrap,M=e.elGoalsMarkers,P=e.elBarShadows,T=e.visibleSeries,I=e.type,L=e.classes,R=this.w,V=new Be(this.ctx);if(!s){var H=typeof R.globals.stroke.colors[n]=="function"?function(K){var X,U=R.config.stroke.colors;return Array.isArray(U)&&U.length>0&&((X=U[K])||(X=""),typeof X=="function")?X({value:R.globals.series[K][o],dataPointIndex:o,w:R}):X}(n):R.globals.stroke.colors[n];s=this.barOptions.distributed?R.globals.stroke.colors[o]:H}R.config.series[r].data[o]&&R.config.series[r].data[o].strokeColor&&(s=R.config.series[r].data[o].strokeColor),this.isNullValue&&(i="none");var F=o/R.config.chart.animations.animateGradually.delay*(R.config.chart.animations.speed/R.globals.dataPoints)/2.4,z=V.renderPaths({i:r,j:o,realIndex:n,pathFrom:l,pathTo:c,stroke:s,strokeWidth:u,strokeLineCap:R.config.stroke.lineCap,fill:i,animationDelay:F,initialSpeed:R.config.chart.animations.speed,dataChangeSpeed:R.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(I,"-area ").concat(L),chartType:I});z.attr("clip-path","url(#gridRectBarMask".concat(R.globals.cuid,")"));var N=R.config.forecastDataPoints;N.count>0&&o>=R.globals.dataPoints-N.count&&(z.node.setAttribute("stroke-dasharray",N.dashArray),z.node.setAttribute("stroke-width",N.strokeWidth),z.node.setAttribute("fill-opacity",N.fillOpacity)),p!==void 0&&m!==void 0&&(z.attr("data-range-y1",p),z.attr("data-range-y2",m)),new ri(this.ctx).setSelectionFilter(z,n,o),d.add(z);var q=new ACt(this).handleBarDataLabels({x:h,y:f,y1:p,y2:m,i:r,j:o,series:y,realIndex:n,columnGroupIndex:a,barHeight:b,barWidth:k,barXPosition:C,barYPosition:$,renderedPath:z,visibleSeries:T});return q.dataLabels!==null&&x.add(q.dataLabels),q.totalDataLabels&&x.add(q.totalDataLabels),d.add(x),M&&d.add(M),P&&d.add(P),d}},{key:"drawBarPaths",value:function(e){var n,i=e.indexes,s=e.barHeight,o=e.strokeWidth,r=e.zeroW,a=e.x,l=e.y,c=e.yDivision,u=e.elSeries,d=this.w,h=i.i,f=i.j;if(d.globals.isXNumeric)n=(l=(d.globals.seriesX[h][f]-d.globals.minX)/this.invertedXRatio-s)+s*this.visibleI;else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var p=0,m=0;d.globals.seriesPercent.forEach(function(b,k){b[f]&&p++,k<h&&b[f]===0&&m++}),p>0&&(s=this.seriesLen*s/p),n=l+s*this.visibleI,n-=s*m}else n=l+s*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[h][f],r)-r)/2),a=this.barHelpers.getXForValue(this.series[h][f],r);var y=this.barHelpers.getBarpaths({barYPosition:n,barHeight:s,x1:r,x2:a,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:h,j:f,w:d});return d.globals.isXNumeric||(l+=c),this.barHelpers.barBackground({j:f,i:h,y1:n-s*this.visibleI,y2:s*this.seriesLen,elSeries:u}),{pathTo:y.pathTo,pathFrom:y.pathFrom,x1:r,x:a,y:l,goalX:this.barHelpers.getGoalValues("x",r,null,h,f),barYPosition:n,barHeight:s}}},{key:"drawColumnPaths",value:function(e){var n,i=e.indexes,s=e.x,o=e.y,r=e.xDivision,a=e.barWidth,l=e.zeroH,c=e.strokeWidth,u=e.elSeries,d=this.w,h=i.realIndex,f=i.translationsIndex,p=i.i,m=i.j,y=i.bc;if(d.globals.isXNumeric){var b=this.getBarXForNumericXAxis({x:s,j:m,realIndex:h,barWidth:a});s=b.x,n=b.barXPosition}else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var k=this.barHelpers.getZeroValueEncounters({i:p,j:m}),C=k.nonZeroColumns,$=k.zeroEncounters;C>0&&(a=this.seriesLen*a/C),n=s+a*this.visibleI,n-=a*$}else n=s+a*this.visibleI;o=this.barHelpers.getYForValue(this.series[p][m],l,f);var x=this.barHelpers.getColumnPaths({barXPosition:n,barWidth:a,y1:l,y2:o,strokeWidth:c,isReversed:this.isReversed,series:this.series,realIndex:h,i:p,j:m,w:d});return d.globals.isXNumeric||(s+=r),this.barHelpers.barBackground({bc:y,j:m,i:p,x1:n-c/2-a*this.visibleI,x2:a*this.seriesLen+c/2,elSeries:u}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x:s,y:o,goalY:this.barHelpers.getGoalValues("y",null,l,p,m,f),barXPosition:n,barWidth:a}}},{key:"getBarXForNumericXAxis",value:function(e){var n=e.x,i=e.barWidth,s=e.realIndex,o=e.j,r=this.w,a=s;return r.globals.seriesX[s].length||(a=r.globals.maxValsInArrayIndex),pe.isNumber(r.globals.seriesX[a][o])&&(n=(r.globals.seriesX[a][o]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:n+i*this.visibleI,x:n}}},{key:"getPreviousPath",value:function(e,n){for(var i,s=this.w,o=0;o<s.globals.previousPaths.length;o++){var r=s.globals.previousPaths[o];r.paths&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(e,10)&&s.globals.previousPaths[o].paths[n]!==void 0&&(i=s.globals.previousPaths[o].paths[n].d)}return i}}]),t}(),yT=function(t){Q1(n,Wf);var e=J1(n);function n(){return lt(this,n),e.apply(this,arguments)}return ct(n,[{key:"draw",value:function(i,s){var o=this,r=this.w;this.graphics=new Be(this.ctx),this.bar=new Wf(this.ctx,this.xyRatios);var a=new _s(this.ctx,r);i=a.getLogSeries(i),this.yRatio=a.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i),r.config.chart.stackType==="100%"&&(i=r.globals.comboCharts?s.map(function(p){return r.globals.seriesPercent[p]}):r.globals.seriesPercent.slice()),this.series=i,this.barHelpers.initializeStackedPrevVars(this);for(var l=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),c=0,u=0,d=function(p,m){var y=void 0,b=void 0,k=void 0,C=void 0,$=r.globals.comboCharts?s[p]:p,x=o.barHelpers.getGroupIndex($),M=x.groupIndex,P=x.columnGroupIndex;o.groupCtx=o[r.globals.seriesGroups[M]];var T=[],I=[],L=0;o.yRatio.length>1&&(o.yaxisIndex=r.globals.seriesYAxisReverseMap[$][0],L=$),o.isReversed=r.config.yaxis[o.yaxisIndex]&&r.config.yaxis[o.yaxisIndex].reversed;var R=o.graphics.group({class:"apexcharts-series",seriesName:pe.escapeString(r.globals.seriesNames[$]),rel:p+1,"data:realIndex":$});o.ctx.series.addCollapsedClassToSeries(R,$);var V=o.graphics.group({class:"apexcharts-datalabels","data:realIndex":$}),H=o.graphics.group({class:"apexcharts-bar-goals-markers"}),F=0,z=0,N=o.initialPositions(c,u,y,b,k,C,L);u=N.y,F=N.barHeight,b=N.yDivision,C=N.zeroW,c=N.x,z=N.barWidth,y=N.xDivision,k=N.zeroH,r.globals.barHeight=F,r.globals.barWidth=z,o.barHelpers.initializeStackedXYVars(o),o.groupCtx.prevY.length===1&&o.groupCtx.prevY[0].every(function(me){return isNaN(me)})&&(o.groupCtx.prevY[0]=o.groupCtx.prevY[0].map(function(){return k}),o.groupCtx.prevYF[0]=o.groupCtx.prevYF[0].map(function(){return 0}));for(var q=0;q<r.globals.dataPoints;q++){var K=o.barHelpers.getStrokeWidth(p,q,$),X={indexes:{i:p,j:q,realIndex:$,translationsIndex:L,bc:m},strokeWidth:K,x:c,y:u,elSeries:R,columnGroupIndex:P,seriesGroup:r.globals.seriesGroups[M]},U=null;o.isHorizontal?(U=o.drawStackedBarPaths(Je(Je({},X),{},{zeroW:C,barHeight:F,yDivision:b})),z=o.series[p][q]/o.invertedYRatio):(U=o.drawStackedColumnPaths(Je(Je({},X),{},{xDivision:y,barWidth:z,zeroH:k})),F=o.series[p][q]/o.yRatio[L]);var Q=o.barHelpers.drawGoalLine({barXPosition:U.barXPosition,barYPosition:U.barYPosition,goalX:U.goalX,goalY:U.goalY,barHeight:F,barWidth:z});Q&&H.add(Q),u=U.y,c=U.x,T.push(c),I.push(u);var ne=o.barHelpers.getPathFillColor(i,p,q,$),Z="",ae=r.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";(o.barHelpers.arrBorderRadius[$][q]==="bottom"&&r.globals.series[$][q]>0||o.barHelpers.arrBorderRadius[$][q]==="top"&&r.globals.series[$][q]<0)&&(Z=ae),R=o.renderSeries(Je(Je({realIndex:$,pathFill:ne.color},ne.useRangeColor?{lineFill:ne.color}:{}),{},{j:q,i:p,columnGroupIndex:P,pathFrom:U.pathFrom,pathTo:U.pathTo,strokeWidth:K,elSeries:R,x:c,y:u,series:i,barHeight:F,barWidth:z,elDataLabelsWrap:V,elGoalsMarkers:H,type:"bar",visibleSeries:P,classes:Z}))}r.globals.seriesXvalues[$]=T,r.globals.seriesYvalues[$]=I,o.groupCtx.prevY.push(o.groupCtx.yArrj),o.groupCtx.prevYF.push(o.groupCtx.yArrjF),o.groupCtx.prevYVal.push(o.groupCtx.yArrjVal),o.groupCtx.prevX.push(o.groupCtx.xArrj),o.groupCtx.prevXF.push(o.groupCtx.xArrjF),o.groupCtx.prevXVal.push(o.groupCtx.xArrjVal),l.add(R)},h=0,f=0;h<i.length;h++,f++)d(h,f);return l}},{key:"initialPositions",value:function(i,s,o,r,a,l,c){var u,d,h=this.w;if(this.isHorizontal){r=h.globals.gridHeight/h.globals.dataPoints;var f=h.config.plotOptions.bar.barHeight;u=String(f).indexOf("%")===-1?parseInt(f,10):r*parseInt(f,10)/100,l=h.globals.padHorizontal+(this.isReversed?h.globals.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),s=(r-u)/2}else{d=o=h.globals.gridWidth/h.globals.dataPoints;var p=h.config.plotOptions.bar.columnWidth;h.globals.isXNumeric&&h.globals.dataPoints>1?d=(o=h.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:String(p).indexOf("%")===-1?d=parseInt(p,10):d*=parseInt(p,10)/100,a=this.isReversed?this.baseLineY[c]:h.globals.gridHeight-this.baseLineY[c],i=h.globals.padHorizontal+(o-d)/2}var m=h.globals.barGroups.length||1;return{x:i,y:s,yDivision:r,xDivision:o,barHeight:u/m,barWidth:d/m,zeroH:a,zeroW:l}}},{key:"drawStackedBarPaths",value:function(i){for(var s,o=i.indexes,r=i.barHeight,a=i.strokeWidth,l=i.zeroW,c=i.x,u=i.y,d=i.columnGroupIndex,h=i.seriesGroup,f=i.yDivision,p=i.elSeries,m=this.w,y=u+d*r,b=o.i,k=o.j,C=o.realIndex,$=o.translationsIndex,x=0,M=0;M<this.groupCtx.prevXF.length;M++)x+=this.groupCtx.prevXF[M][k];var P;if((P=h.indexOf(m.config.series[C].name))>0){var T=l;this.groupCtx.prevXVal[P-1][k]<0?T=this.series[b][k]>=0?this.groupCtx.prevX[P-1][k]+x-2*(this.isReversed?x:0):this.groupCtx.prevX[P-1][k]:this.groupCtx.prevXVal[P-1][k]>=0&&(T=this.series[b][k]>=0?this.groupCtx.prevX[P-1][k]:this.groupCtx.prevX[P-1][k]-x+2*(this.isReversed?x:0)),s=T}else s=l;c=this.series[b][k]===null?s:s+this.series[b][k]/this.invertedYRatio-2*(this.isReversed?this.series[b][k]/this.invertedYRatio:0);var I=this.barHelpers.getBarpaths({barYPosition:y,barHeight:r,x1:s,x2:c,strokeWidth:a,isReversed:this.isReversed,series:this.series,realIndex:o.realIndex,seriesGroup:h,i:b,j:k,w:m});return this.barHelpers.barBackground({j:k,i:b,y1:y,y2:r,elSeries:p}),u+=f,{pathTo:I.pathTo,pathFrom:I.pathFrom,goalX:this.barHelpers.getGoalValues("x",l,null,b,k,$),barXPosition:s,barYPosition:y,x:c,y:u}}},{key:"drawStackedColumnPaths",value:function(i){var s=i.indexes,o=i.x,r=i.y,a=i.xDivision,l=i.barWidth,c=i.zeroH,u=i.columnGroupIndex,d=i.seriesGroup,h=i.elSeries,f=this.w,p=s.i,m=s.j,y=s.bc,b=s.realIndex,k=s.translationsIndex;if(f.globals.isXNumeric){var C=f.globals.seriesX[b][m];C||(C=0),o=(C-f.globals.minX)/this.xRatio-l/2*f.globals.barGroups.length}for(var $,x=o+u*l,M=0,P=0;P<this.groupCtx.prevYF.length;P++)M+=isNaN(this.groupCtx.prevYF[P][m])?0:this.groupCtx.prevYF[P][m];var T=p;if(d&&(T=d.indexOf(f.globals.seriesNames[b])),T>0&&!f.globals.isXNumeric||T>0&&f.globals.isXNumeric&&f.globals.seriesX[b-1][m]===f.globals.seriesX[b][m]){var I,L,R,V=Math.min(this.yRatio.length+1,b+1);if(this.groupCtx.prevY[T-1]!==void 0&&this.groupCtx.prevY[T-1].length)for(var H=1;H<V;H++){var F;if(!isNaN((F=this.groupCtx.prevY[T-H])===null||F===void 0?void 0:F[m])){R=this.groupCtx.prevY[T-H][m];break}}for(var z=1;z<V;z++){var N,q;if(((N=this.groupCtx.prevYVal[T-z])===null||N===void 0?void 0:N[m])<0){L=this.series[p][m]>=0?R-M+2*(this.isReversed?M:0):R;break}if(((q=this.groupCtx.prevYVal[T-z])===null||q===void 0?void 0:q[m])>=0){L=this.series[p][m]>=0?R:R+M-2*(this.isReversed?M:0);break}}L===void 0&&(L=f.globals.gridHeight),$=(I=this.groupCtx.prevYF[0])!==null&&I!==void 0&&I.every(function(X){return X===0})&&this.groupCtx.prevYF.slice(1,T).every(function(X){return X.every(function(U){return isNaN(U)})})?c:L}else $=c;r=this.series[p][m]?$-this.series[p][m]/this.yRatio[k]+2*(this.isReversed?this.series[p][m]/this.yRatio[k]:0):$;var K=this.barHelpers.getColumnPaths({barXPosition:x,barWidth:l,y1:$,y2:r,yRatio:this.yRatio[k],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:d,realIndex:s.realIndex,i:p,j:m,w:f});return this.barHelpers.barBackground({bc:y,j:m,i:p,x1:x,x2:l,elSeries:h}),{pathTo:K.pathTo,pathFrom:K.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,c,p,m),barXPosition:x,x:f.globals.isXNumeric?o:o+a,y:r}}}]),n}(),E3=function(t){Q1(n,Wf);var e=J1(n);function n(){return lt(this,n),e.apply(this,arguments)}return ct(n,[{key:"draw",value:function(i,s,o){var r=this,a=this.w,l=new Be(this.ctx),c=a.globals.comboCharts?s:a.config.chart.type,u=new Dr(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=a.config.plotOptions.bar.horizontal;var d=new _s(this.ctx,a);i=d.getLogSeries(i),this.series=i,this.yRatio=d.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i);for(var h=l.group({class:"apexcharts-".concat(c,"-series apexcharts-plot-series")}),f=function(m){r.isBoxPlot=a.config.chart.type==="boxPlot"||a.config.series[m].type==="boxPlot";var y,b,k,C,$=void 0,x=void 0,M=[],P=[],T=a.globals.comboCharts?o[m]:m,I=r.barHelpers.getGroupIndex(T).columnGroupIndex,L=l.group({class:"apexcharts-series",seriesName:pe.escapeString(a.globals.seriesNames[T]),rel:m+1,"data:realIndex":T});r.ctx.series.addCollapsedClassToSeries(L,T),i[m].length>0&&(r.visibleI=r.visibleI+1);var R,V,H=0;r.yRatio.length>1&&(r.yaxisIndex=a.globals.seriesYAxisReverseMap[T][0],H=T);var F=r.barHelpers.initialPositions(T);x=F.y,R=F.barHeight,b=F.yDivision,C=F.zeroW,$=F.x,V=F.barWidth,y=F.xDivision,k=F.zeroH,P.push($+V/2);for(var z=l.group({class:"apexcharts-datalabels","data:realIndex":T}),N=l.group({class:"apexcharts-bar-goals-markers"}),q=function(X){var U=r.barHelpers.getStrokeWidth(m,X,T),Q=null,ne={indexes:{i:m,j:X,realIndex:T,translationsIndex:H},x:$,y:x,strokeWidth:U,elSeries:L};Q=r.isHorizontal?r.drawHorizontalBoxPaths(Je(Je({},ne),{},{yDivision:b,barHeight:R,zeroW:C})):r.drawVerticalBoxPaths(Je(Je({},ne),{},{xDivision:y,barWidth:V,zeroH:k})),x=Q.y,$=Q.x;var Z=r.barHelpers.drawGoalLine({barXPosition:Q.barXPosition,barYPosition:Q.barYPosition,goalX:Q.goalX,goalY:Q.goalY,barHeight:R,barWidth:V});Z&&N.add(Z),X>0&&P.push($+V/2),M.push(x),Q.pathTo.forEach(function(ae,me){var we=!r.isBoxPlot&&r.candlestickOptions.wick.useFillColor?Q.color[me]:a.globals.stroke.colors[m],oe=u.fillPath({seriesNumber:T,dataPointIndex:X,color:Q.color[me],value:i[m][X]});r.renderSeries({realIndex:T,pathFill:oe,lineFill:we,j:X,i:m,pathFrom:Q.pathFrom,pathTo:ae,strokeWidth:U,elSeries:L,x:$,y:x,series:i,columnGroupIndex:I,barHeight:R,barWidth:V,elDataLabelsWrap:z,elGoalsMarkers:N,visibleSeries:r.visibleI,type:a.config.chart.type})})},K=0;K<a.globals.dataPoints;K++)q(K);a.globals.seriesXvalues[T]=P,a.globals.seriesYvalues[T]=M,h.add(L)},p=0;p<i.length;p++)f(p);return h}},{key:"drawVerticalBoxPaths",value:function(i){var s=i.indexes,o=i.x;i.y;var r=i.xDivision,a=i.barWidth,l=i.zeroH,c=i.strokeWidth,u=this.w,d=new Be(this.ctx),h=s.i,f=s.j,p=u.config.plotOptions.candlestick.colors,m=this.boxOptions.colors,y=s.realIndex,b=function(z){return Array.isArray(z)?z[y]:z},k=b(p.upward),C=b(p.downward),$=this.yRatio[s.translationsIndex],x=this.getOHLCValue(y,f),M=l,P=l,T=x.o<x.c?[k]:[C];this.isBoxPlot&&(T=[b(m.lower),b(m.upper)]);var I=Math.min(x.o,x.c),L=Math.max(x.o,x.c),R=x.m;u.globals.isXNumeric&&(o=(u.globals.seriesX[y][f]-u.globals.minX)/this.xRatio-a/2);var V=o+a*this.visibleI;this.series[h][f]===void 0||this.series[h][f]===null?(I=l,L=l):(I=l-I/$,L=l-L/$,M=l-x.h/$,P=l-x.l/$,R=l-x.m/$);var H=d.move(V,l),F=d.move(V+a/2,I);return u.globals.previousPaths.length>0&&(F=this.getPreviousPath(y,f,!0)),H=this.isBoxPlot?[d.move(V,I)+d.line(V+a/2,I)+d.line(V+a/2,M)+d.line(V+a/4,M)+d.line(V+a-a/4,M)+d.line(V+a/2,M)+d.line(V+a/2,I)+d.line(V+a,I)+d.line(V+a,R)+d.line(V,R)+d.line(V,I+c/2),d.move(V,R)+d.line(V+a,R)+d.line(V+a,L)+d.line(V+a/2,L)+d.line(V+a/2,P)+d.line(V+a-a/4,P)+d.line(V+a/4,P)+d.line(V+a/2,P)+d.line(V+a/2,L)+d.line(V,L)+d.line(V,R)+"z"]:[d.move(V,L)+d.line(V+a/2,L)+d.line(V+a/2,M)+d.line(V+a/2,L)+d.line(V+a,L)+d.line(V+a,I)+d.line(V+a/2,I)+d.line(V+a/2,P)+d.line(V+a/2,I)+d.line(V,I)+d.line(V,L-c/2)],F+=d.move(V,I),u.globals.isXNumeric||(o+=r),{pathTo:H,pathFrom:F,x:o,y:L,goalY:this.barHelpers.getGoalValues("y",null,l,h,f,s.translationsIndex),barXPosition:V,color:T}}},{key:"drawHorizontalBoxPaths",value:function(i){var s=i.indexes;i.x;var o=i.y,r=i.yDivision,a=i.barHeight,l=i.zeroW,c=i.strokeWidth,u=this.w,d=new Be(this.ctx),h=s.i,f=s.j,p=this.boxOptions.colors.lower;this.isBoxPlot&&(p=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var m=this.invertedYRatio,y=s.realIndex,b=this.getOHLCValue(y,f),k=l,C=l,$=Math.min(b.o,b.c),x=Math.max(b.o,b.c),M=b.m;u.globals.isXNumeric&&(o=(u.globals.seriesX[y][f]-u.globals.minX)/this.invertedXRatio-a/2);var P=o+a*this.visibleI;this.series[h][f]===void 0||this.series[h][f]===null?($=l,x=l):($=l+$/m,x=l+x/m,k=l+b.h/m,C=l+b.l/m,M=l+b.m/m);var T=d.move(l,P),I=d.move($,P+a/2);return u.globals.previousPaths.length>0&&(I=this.getPreviousPath(y,f,!0)),T=[d.move($,P)+d.line($,P+a/2)+d.line(k,P+a/2)+d.line(k,P+a/2-a/4)+d.line(k,P+a/2+a/4)+d.line(k,P+a/2)+d.line($,P+a/2)+d.line($,P+a)+d.line(M,P+a)+d.line(M,P)+d.line($+c/2,P),d.move(M,P)+d.line(M,P+a)+d.line(x,P+a)+d.line(x,P+a/2)+d.line(C,P+a/2)+d.line(C,P+a-a/4)+d.line(C,P+a/4)+d.line(C,P+a/2)+d.line(x,P+a/2)+d.line(x,P)+d.line(M,P)+"z"],I+=d.move($,P),u.globals.isXNumeric||(o+=r),{pathTo:T,pathFrom:I,x,y:o,goalX:this.barHelpers.getGoalValues("x",l,null,h,f),barYPosition:P,color:p}}},{key:"getOHLCValue",value:function(i,s){var o=this.w,r=new _s(this.ctx,o),a=r.getLogValAtSeriesIndex(o.globals.seriesCandleH[i][s],i),l=r.getLogValAtSeriesIndex(o.globals.seriesCandleO[i][s],i),c=r.getLogValAtSeriesIndex(o.globals.seriesCandleM[i][s],i),u=r.getLogValAtSeriesIndex(o.globals.seriesCandleC[i][s],i),d=r.getLogValAtSeriesIndex(o.globals.seriesCandleL[i][s],i);return{o:this.isBoxPlot?a:l,h:this.isBoxPlot?l:a,m:c,l:this.isBoxPlot?u:d,c:this.isBoxPlot?d:u}}}]),n}(),VU=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"checkColorRange",value:function(){var e=this.w,n=!1,i=e.config.plotOptions[e.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map(function(s,o){s.from<=0&&(n=!0)}),n}},{key:"getShadeColor",value:function(e,n,i,s){var o=this.w,r=1,a=o.config.plotOptions[e].shadeIntensity,l=this.determineColor(e,n,i);o.globals.hasNegs||s?r=o.config.plotOptions[e].reverseNegativeShade?l.percent<0?l.percent/100*(1.25*a):(1-l.percent/100)*(1.25*a):l.percent<=0?1-(1+l.percent/100)*a:(1-l.percent/100)*a:(r=1-l.percent/100,e==="treemap"&&(r=(1-l.percent/100)*(1.25*a)));var c=l.color,u=new pe;if(o.config.plotOptions[e].enableShades)if(this.w.config.theme.mode==="dark"){var d=u.shadeColor(-1*r,l.color);c=pe.hexToRgba(pe.isColorHex(d)?d:pe.rgb2hex(d),o.config.fill.opacity)}else{var h=u.shadeColor(r,l.color);c=pe.hexToRgba(pe.isColorHex(h)?h:pe.rgb2hex(h),o.config.fill.opacity)}return{color:c,colorProps:l}}},{key:"determineColor",value:function(e,n,i){var s=this.w,o=s.globals.series[n][i],r=s.config.plotOptions[e],a=r.colorScale.inverse?i:n;r.distributed&&s.config.chart.type==="treemap"&&(a=i);var l=s.globals.colors[a],c=null,u=Math.min.apply(Math,Ns(s.globals.series[n])),d=Math.max.apply(Math,Ns(s.globals.series[n]));r.distributed||e!=="heatmap"||(u=s.globals.minY,d=s.globals.maxY),r.colorScale.min!==void 0&&(u=r.colorScale.min<s.globals.minY?r.colorScale.min:s.globals.minY,d=r.colorScale.max>s.globals.maxY?r.colorScale.max:s.globals.maxY);var h=Math.abs(d)+Math.abs(u),f=100*o/(h===0?h-1e-6:h);return r.colorScale.ranges.length>0&&r.colorScale.ranges.map(function(p,m){if(o>=p.from&&o<=p.to){l=p.color,c=p.foreColor?p.foreColor:null,u=p.from,d=p.to;var y=Math.abs(d)+Math.abs(u);f=100*o/(y===0?y-1e-6:y)}}),{color:l,foreColor:c,percent:f}}},{key:"calculateDataLabels",value:function(e){var n=e.text,i=e.x,s=e.y,o=e.i,r=e.j,a=e.colorProps,l=e.fontSize,c=this.w.config.dataLabels,u=new Be(this.ctx),d=new jf(this.ctx),h=null;if(c.enabled){h=u.group({class:"apexcharts-data-labels"});var f=c.offsetX,p=c.offsetY,m=i+f,y=s+parseFloat(c.style.fontSize)/3+p;d.plotDataLabelsText({x:m,y,text:n,i:o,j:r,color:a.foreColor,parent:h,fontSize:l,dataLabelsConfig:c})}return h}},{key:"addListeners",value:function(e){var n=new Be(this.ctx);e.node.addEventListener("mouseenter",n.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",n.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",n.pathMouseDown.bind(this,e))}}]),t}(),MCt=function(){function t(e,n){lt(this,t),this.ctx=e,this.w=e.w,this.xRatio=n.xRatio,this.yRatio=n.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new VU(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return ct(t,[{key:"draw",value:function(e){var n=this.w,i=new Be(this.ctx),s=i.group({class:"apexcharts-heatmap"});s.attr("clip-path","url(#gridRectMask".concat(n.globals.cuid,")"));var o=n.globals.gridWidth/n.globals.dataPoints,r=n.globals.gridHeight/n.globals.series.length,a=0,l=!1;this.negRange=this.helpers.checkColorRange();var c=e.slice();n.config.yaxis[0].reversed&&(l=!0,c.reverse());for(var u=l?0:c.length-1;l?u<c.length:u>=0;l?u++:u--){var d=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:pe.escapeString(n.globals.seriesNames[u]),rel:u+1,"data:realIndex":u});if(this.ctx.series.addCollapsedClassToSeries(d,u),n.config.chart.dropShadow.enabled){var h=n.config.chart.dropShadow;new ri(this.ctx).dropShadow(d,h,u)}for(var f=0,p=n.config.plotOptions.heatmap.shadeIntensity,m=0,y=0;y<n.globals.dataPoints;y++)if(n.globals.seriesX.length&&!n.globals.allSeriesHasEqualX&&n.globals.minX+n.globals.minXDiff*y<n.globals.seriesX[u][m])f+=o;else{if(m>=c[u].length)break;var b=this.helpers.getShadeColor(n.config.chart.type,u,m,this.negRange),k=b.color,C=b.colorProps;n.config.fill.type==="image"&&(k=new Dr(this.ctx).fillPath({seriesNumber:u,dataPointIndex:m,opacity:n.globals.hasNegs?C.percent<0?1-(1+C.percent/100):p+C.percent/100:C.percent/100,patternID:pe.randomId(),width:n.config.fill.image.width?n.config.fill.image.width:o,height:n.config.fill.image.height?n.config.fill.image.height:r}));var $=this.rectRadius,x=i.drawRect(f,a,o,r,$);if(x.attr({cx:f,cy:a}),x.node.classList.add("apexcharts-heatmap-rect"),d.add(x),x.attr({fill:k,i:u,index:u,j:m,val:e[u][m],"stroke-width":this.strokeWidth,stroke:n.config.plotOptions.heatmap.useFillColorAsStroke?k:n.globals.stroke.colors[0],color:k}),this.helpers.addListeners(x),n.config.chart.animations.enabled&&!n.globals.dataChanged){var M=1;n.globals.resized||(M=n.config.chart.animations.speed),this.animateHeatMap(x,f,a,o,r,M)}if(n.globals.dataChanged){var P=1;if(this.dynamicAnim.enabled&&n.globals.shouldAnimate){P=this.dynamicAnim.speed;var T=n.globals.previousPaths[u]&&n.globals.previousPaths[u][m]&&n.globals.previousPaths[u][m].color;T||(T="rgba(255, 255, 255, 0)"),this.animateHeatColor(x,pe.isColorHex(T)?T:pe.rgb2hex(T),pe.isColorHex(k)?k:pe.rgb2hex(k),P)}}var I=(0,n.config.dataLabels.formatter)(n.globals.series[u][m],{value:n.globals.series[u][m],seriesIndex:u,dataPointIndex:m,w:n}),L=this.helpers.calculateDataLabels({text:I,x:f+o/2,y:a+r/2,i:u,j:m,colorProps:C,series:c});L!==null&&d.add(L),f+=o,m++}a+=r,s.add(d)}var R=n.globals.yAxisScale[0].result.slice();return n.config.yaxis[0].reversed?R.unshift(""):R.push(""),n.globals.yAxisScale[0].result=R,s}},{key:"animateHeatMap",value:function(e,n,i,s,o,r){var a=new wp(this.ctx);a.animateRect(e,{x:n+s/2,y:i+o/2,width:0,height:0},{x:n,y:i,width:s,height:o},r,function(){a.animationCompleted(e)})}},{key:"animateHeatColor",value:function(e,n,i,s){e.attr({fill:n}).animate(s).attr({fill:i})}}]),t}(),FU=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"drawYAxisTexts",value:function(e,n,i,s){var o=this.w,r=o.config.yaxis[0],a=o.globals.yLabelFormatters[0];return new Be(this.ctx).drawText({x:e+r.labels.offsetX,y:n+r.labels.offsetY,text:a(s,i),textAnchor:"middle",fontSize:r.labels.style.fontSize,fontFamily:r.labels.style.fontFamily,foreColor:Array.isArray(r.labels.style.colors)?r.labels.style.colors[i]:r.labels.style.colors})}}]),t}(),NU=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=n.globals.stroke.colors!==void 0?n.globals.stroke.colors:n.globals.colors,this.defaultSize=Math.min(n.globals.gridWidth,n.globals.gridHeight),this.centerY=this.defaultSize/2,this.centerX=n.globals.gridWidth/2,n.config.chart.type==="radialBar"?this.fullAngle=360:this.fullAngle=Math.abs(n.config.plotOptions.pie.endAngle-n.config.plotOptions.pie.startAngle),this.initialAngle=n.config.plotOptions.pie.startAngle%this.fullAngle,n.globals.radialSize=this.defaultSize/2.05-n.config.stroke.width-(n.config.chart.sparkline.enabled?0:n.config.chart.dropShadow.blur),this.donutSize=n.globals.radialSize*parseInt(n.config.plotOptions.pie.donut.size,10)/100;var i=n.config.plotOptions.pie.customScale,s=n.globals.gridWidth/2,o=n.globals.gridHeight/2;this.translateX=s-s*i,this.translateY=o-o*i,this.dataLabelsGroup=new Be(this.ctx).group({class:"apexcharts-datalabels-group",transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(i,")")}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return ct(t,[{key:"draw",value:function(e){var n=this,i=this.w,s=new Be(this.ctx),o=s.group({class:"apexcharts-pie"});if(i.globals.noData)return o;for(var r=0,a=0;a<e.length;a++)r+=pe.negToZero(e[a]);var l=[],c=s.group();r===0&&(r=1e-5),e.forEach(function(C){n.maxY=Math.max(n.maxY,C)}),i.config.yaxis[0].max&&(this.maxY=i.config.yaxis[0].max),i.config.grid.position==="back"&&this.chartType==="polarArea"&&this.drawPolarElements(o);for(var u=0;u<e.length;u++){var d=this.fullAngle*pe.negToZero(e[u])/r;l.push(d),this.chartType==="polarArea"?(l[u]=this.fullAngle/e.length,this.sliceSizes.push(i.globals.radialSize*e[u]/this.maxY)):this.sliceSizes.push(i.globals.radialSize)}if(i.globals.dataChanged){for(var h,f=0,p=0;p<i.globals.previousPaths.length;p++)f+=pe.negToZero(i.globals.previousPaths[p]);for(var m=0;m<i.globals.previousPaths.length;m++)h=this.fullAngle*pe.negToZero(i.globals.previousPaths[m])/f,this.prevSectorAngleArr.push(h)}if(this.donutSize<0&&(this.donutSize=0),this.chartType==="donut"){var y=s.drawCircle(this.donutSize);y.attr({cx:this.centerX,cy:this.centerY,fill:i.config.plotOptions.pie.donut.background?i.config.plotOptions.pie.donut.background:"transparent"}),c.add(y)}var b=this.drawArcs(l,e);if(this.sliceLabels.forEach(function(C){b.add(C)}),c.attr({transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(i.config.plotOptions.pie.customScale,")")}),c.add(b),o.add(c),this.donutDataLabels.show){var k=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});o.add(k)}return i.config.grid.position==="front"&&this.chartType==="polarArea"&&this.drawPolarElements(o),o}},{key:"drawArcs",value:function(e,n){var i=this.w,s=new ri(this.ctx),o=new Be(this.ctx),r=new Dr(this.ctx),a=o.group({class:"apexcharts-slices"}),l=this.initialAngle,c=this.initialAngle,u=this.initialAngle,d=this.initialAngle;this.strokeWidth=i.config.stroke.show?i.config.stroke.width:0;for(var h=0;h<e.length;h++){var f=o.group({class:"apexcharts-series apexcharts-pie-series",seriesName:pe.escapeString(i.globals.seriesNames[h]),rel:h+1,"data:realIndex":h});a.add(f),c=d,u=(l=u)+e[h],d=c+this.prevSectorAngleArr[h];var p=u<l?this.fullAngle+u-l:u-l,m=r.fillPath({seriesNumber:h,size:this.sliceSizes[h],value:n[h]}),y=this.getChangedPath(c,d),b=o.drawPath({d:y,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[h]:this.lineColorArr,strokeWidth:0,fill:m,fillOpacity:i.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(h)});if(b.attr({index:0,j:h}),s.setSelectionFilter(b,0,h),i.config.chart.dropShadow.enabled){var k=i.config.chart.dropShadow;s.dropShadow(b,k,h)}this.addListeners(b,this.donutDataLabels),Be.setAttrs(b.node,{"data:angle":p,"data:startAngle":l,"data:strokeWidth":this.strokeWidth,"data:value":n[h]});var C={x:0,y:0};this.chartType==="pie"||this.chartType==="polarArea"?C=pe.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize/1.25+i.config.plotOptions.pie.dataLabels.offset,(l+p/2)%this.fullAngle):this.chartType==="donut"&&(C=pe.polarToCartesian(this.centerX,this.centerY,(i.globals.radialSize+this.donutSize)/2+i.config.plotOptions.pie.dataLabels.offset,(l+p/2)%this.fullAngle)),f.add(b);var $=0;if(!this.initialAnim||i.globals.resized||i.globals.dataChanged?this.animBeginArr.push(0):(($=p/this.fullAngle*i.config.chart.animations.speed)===0&&($=1),this.animDur=$+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&i.globals.dataChanged?this.animatePaths(b,{size:this.sliceSizes[h],endAngle:u,startAngle:l,prevStartAngle:c,prevEndAngle:d,animateStartingPos:!0,i:h,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:i.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(b,{size:this.sliceSizes[h],endAngle:u,startAngle:l,i:h,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:$}),i.config.plotOptions.pie.expandOnClick&&this.chartType!=="polarArea"&&b.node.addEventListener("mouseup",this.pieClicked.bind(this,h)),i.globals.selectedDataPoints[0]!==void 0&&i.globals.selectedDataPoints[0].indexOf(h)>-1&&this.pieClicked(h),i.config.dataLabels.enabled){var x=C.x,M=C.y,P=100*p/this.fullAngle+"%";if(p!==0&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[h]){var T=i.config.dataLabels.formatter;T!==void 0&&(P=T(i.globals.seriesPercent[h][0],{seriesIndex:h,w:i}));var I=i.globals.dataLabels.style.colors[h],L=o.group({class:"apexcharts-datalabels"}),R=o.drawText({x,y:M,text:P,textAnchor:"middle",fontSize:i.config.dataLabels.style.fontSize,fontFamily:i.config.dataLabels.style.fontFamily,fontWeight:i.config.dataLabels.style.fontWeight,foreColor:I});if(L.add(R),i.config.dataLabels.dropShadow.enabled){var V=i.config.dataLabels.dropShadow;s.dropShadow(R,V)}R.node.classList.add("apexcharts-pie-label"),i.config.chart.animations.animate&&i.globals.resized===!1&&(R.node.classList.add("apexcharts-pie-label-delay"),R.node.style.animationDelay=i.config.chart.animations.speed/940+"s"),this.sliceLabels.push(L)}}}return a}},{key:"addListeners",value:function(e,n){var i=new Be(this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,e.node,n)),e.node.addEventListener("mousedown",i.pathMouseDown.bind(this,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,e.node,n)),e.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,e.node,n)))}},{key:"animatePaths",value:function(e,n){var i=this.w,s=n.endAngle<n.startAngle?this.fullAngle+n.endAngle-n.startAngle:n.endAngle-n.startAngle,o=s,r=n.startAngle,a=n.startAngle;n.prevStartAngle!==void 0&&n.prevEndAngle!==void 0&&(r=n.prevEndAngle,o=n.prevEndAngle<n.prevStartAngle?this.fullAngle+n.prevEndAngle-n.prevStartAngle:n.prevEndAngle-n.prevStartAngle),n.i===i.config.series.length-1&&(s+a>this.fullAngle?n.endAngle=n.endAngle-(s+a):s+a<this.fullAngle&&(n.endAngle=n.endAngle+(this.fullAngle-(s+a)))),s===this.fullAngle&&(s=this.fullAngle-.01),this.animateArc(e,r,a,s,o,n)}},{key:"animateArc",value:function(e,n,i,s,o,r){var a,l=this,c=this.w,u=new wp(this.ctx),d=r.size;(isNaN(n)||isNaN(o))&&(n=i,o=s,r.dur=0);var h=s,f=i,p=n<i?this.fullAngle+n-i:n-i;c.globals.dataChanged&&r.shouldSetPrevPaths&&r.prevEndAngle&&(a=l.getPiePath({me:l,startAngle:r.prevStartAngle,angle:r.prevEndAngle<r.prevStartAngle?this.fullAngle+r.prevEndAngle-r.prevStartAngle:r.prevEndAngle-r.prevStartAngle,size:d}),e.attr({d:a})),r.dur!==0?e.animate(r.dur,r.animBeginArr[r.i]).after(function(){l.chartType!=="pie"&&l.chartType!=="donut"&&l.chartType!=="polarArea"||this.animate(c.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":l.strokeWidth}),r.i===c.config.series.length-1&&u.animationCompleted(e)}).during(function(m){h=p+(s-p)*m,r.animateStartingPos&&(h=o+(s-o)*m,f=n-o+(i-(n-o))*m),a=l.getPiePath({me:l,startAngle:f,angle:h,size:d}),e.node.setAttribute("data:pathOrig",a),e.attr({d:a})}):(a=l.getPiePath({me:l,startAngle:f,angle:s,size:d}),r.isTrack||(c.globals.animationEnded=!0),e.node.setAttribute("data:pathOrig",a),e.attr({d:a,"stroke-width":l.strokeWidth}))}},{key:"pieClicked",value:function(e){var n,i=this.w,s=this,o=s.sliceSizes[e]+(i.config.plotOptions.pie.expandOnClick?4:0),r=i.globals.dom.Paper.findOne(".apexcharts-".concat(s.chartType.toLowerCase(),"-slice-").concat(e));if(r.attr("data:pieClicked")!=="true"){var a=i.globals.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(a,function(d){d.setAttribute("data:pieClicked","false");var h=d.getAttribute("data:pathOrig");h&&d.setAttribute("d",h)}),i.globals.capturedDataPointIndex=e,r.attr("data:pieClicked","true");var l=parseInt(r.attr("data:startAngle"),10),c=parseInt(r.attr("data:angle"),10);n=s.getPiePath({me:s,startAngle:l,angle:c,size:o}),c!==360&&r.plot(n)}else{r.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(r.node,this.donutDataLabels);var u=r.attr("data:pathOrig");r.attr({d:u})}}},{key:"getChangedPath",value:function(e,n){var i="";return this.dynamicAnim&&this.w.globals.dataChanged&&(i=this.getPiePath({me:this,startAngle:e,angle:n-e,size:this.size})),i}},{key:"getPiePath",value:function(e){var n,i=e.me,s=e.startAngle,o=e.angle,r=e.size,a=new Be(this.ctx),l=s,c=Math.PI*(l-90)/180,u=o+s;Math.ceil(u)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(u=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(u)>this.fullAngle&&(u-=this.fullAngle);var d=Math.PI*(u-90)/180,h=i.centerX+r*Math.cos(c),f=i.centerY+r*Math.sin(c),p=i.centerX+r*Math.cos(d),m=i.centerY+r*Math.sin(d),y=pe.polarToCartesian(i.centerX,i.centerY,i.donutSize,u),b=pe.polarToCartesian(i.centerX,i.centerY,i.donutSize,l),k=o>180?1:0,C=["M",h,f,"A",r,r,0,k,1,p,m];return n=i.chartType==="donut"?[].concat(C,["L",y.x,y.y,"A",i.donutSize,i.donutSize,0,k,0,b.x,b.y,"L",h,f,"z"]).join(" "):i.chartType==="pie"||i.chartType==="polarArea"?[].concat(C,["L",i.centerX,i.centerY,"L",h,f]).join(" "):[].concat(C).join(" "),a.roundPathCorners(n,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(e){var n=this.w,i=new IU(this.ctx),s=new Be(this.ctx),o=new FU(this.ctx),r=s.group(),a=s.group(),l=i.niceScale(0,Math.ceil(this.maxY),0),c=l.result.reverse(),u=l.result.length;this.maxY=l.niceMax;for(var d=n.globals.radialSize,h=d/(u-1),f=0;f<u-1;f++){var p=s.drawCircle(d);if(p.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":n.config.plotOptions.polarArea.rings.strokeWidth,stroke:n.config.plotOptions.polarArea.rings.strokeColor}),n.config.yaxis[0].show){var m=o.drawYAxisTexts(this.centerX,this.centerY-d+parseInt(n.config.yaxis[0].labels.style.fontSize,10)/2,f,c[f]);a.add(m)}r.add(p),d-=h}this.drawSpokes(e),e.add(r),e.add(a)}},{key:"renderInnerDataLabels",value:function(e,n,i){var s=this.w,o=new Be(this.ctx),r=n.total.show;e.node.innerHTML="",e.node.style.opacity=i.opacity;var a,l,c=i.centerX,u=this.donutDataLabels.total.label?i.centerY:i.centerY-i.centerY/6;a=n.name.color===void 0?s.globals.colors[0]:n.name.color;var d=n.name.fontSize,h=n.name.fontFamily,f=n.name.fontWeight;l=n.value.color===void 0?s.config.chart.foreColor:n.value.color;var p=n.value.formatter,m="",y="";if(r?(a=n.total.color,d=n.total.fontSize,h=n.total.fontFamily,f=n.total.fontWeight,y=this.donutDataLabels.total.label?n.total.label:"",m=n.total.formatter(s)):s.globals.series.length===1&&(m=p(s.globals.series[0],s),y=s.globals.seriesNames[0]),y&&(y=n.name.formatter(y,n.total.show,s)),n.name.show){var b=o.drawText({x:c,y:u+parseFloat(n.name.offsetY),text:y,textAnchor:"middle",foreColor:a,fontSize:d,fontWeight:f,fontFamily:h});b.node.classList.add("apexcharts-datalabel-label"),e.add(b)}if(n.value.show){var k=n.name.show?parseFloat(n.value.offsetY)+16:n.value.offsetY,C=o.drawText({x:c,y:u+k,text:m,textAnchor:"middle",foreColor:l,fontWeight:n.value.fontWeight,fontSize:n.value.fontSize,fontFamily:n.value.fontFamily});C.node.classList.add("apexcharts-datalabel-value"),e.add(C)}return e}},{key:"printInnerLabels",value:function(e,n,i,s){var o,r=this.w;s?o=e.name.color===void 0?r.globals.colors[parseInt(s.parentNode.getAttribute("rel"),10)-1]:e.name.color:r.globals.series.length>1&&e.total.show&&(o=e.total.color);var a=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),l=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,e.value.formatter)(i,r),s||typeof e.total.formatter!="function"||(i=e.total.formatter(r));var c=n===e.total.label;n=this.donutDataLabels.total.label?e.name.formatter(n,c,r):"",a!==null&&(a.textContent=n),l!==null&&(l.textContent=i),a!==null&&(a.style.fill=o)}},{key:"printDataLabelsInner",value:function(e,n){var i=this.w,s=e.getAttribute("data:value"),o=i.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(n,o,s,e);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");r!==null&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(e){var n=this,i=this.w,s=new Be(this.ctx),o=i.config.plotOptions.polarArea.spokes;if(o.strokeWidth!==0){for(var r=[],a=360/i.globals.series.length,l=0;l<i.globals.series.length;l++)r.push(pe.polarToCartesian(this.centerX,this.centerY,i.globals.radialSize,i.config.plotOptions.pie.startAngle+a*l));r.forEach(function(c,u){var d=s.drawLine(c.x,c.y,n.centerX,n.centerY,Array.isArray(o.connectorColors)?o.connectorColors[u]:o.connectorColors);e.add(d)})}}},{key:"revertDataLabelsInner",value:function(){var e=this.w;if(this.donutDataLabels.show){var n=e.globals.dom.Paper.findOne(".apexcharts-datalabels-group"),i=this.renderInnerDataLabels(n,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});e.globals.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(i)}}}]),t}(),TCt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var n=this.w;this.graphics=new Be(this.ctx),this.lineColorArr=n.globals.stroke.colors!==void 0?n.globals.stroke.colors:n.globals.colors,this.defaultSize=n.globals.svgHeight<n.globals.svgWidth?n.globals.gridHeight:n.globals.gridWidth,this.isLog=n.config.yaxis[0].logarithmic,this.logBase=n.config.yaxis[0].logBase,this.coreUtils=new _s(this.ctx),this.maxValue=this.isLog?this.coreUtils.getLogVal(this.logBase,n.globals.maxY,0):n.globals.maxY,this.minValue=this.isLog?this.coreUtils.getLogVal(this.logBase,this.w.globals.minY,0):n.globals.minY,this.polygons=n.config.plotOptions.radar.polygons,this.strokeWidth=n.config.stroke.show?n.config.stroke.width:0,this.size=this.defaultSize/2.1-this.strokeWidth-n.config.chart.dropShadow.blur,n.config.xaxis.labels.show&&(this.size=this.size-n.globals.xAxisLabelsWidth/1.75),n.config.plotOptions.radar.size!==void 0&&(this.size=n.config.plotOptions.radar.size),this.dataRadiusOfPercent=[],this.dataRadius=[],this.angleArr=[],this.yaxisLabelsTextsPos=[]}return ct(t,[{key:"draw",value:function(e){var n=this,i=this.w,s=new Dr(this.ctx),o=[],r=new jf(this.ctx);e.length&&(this.dataPointsLen=e[i.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var a=i.globals.gridWidth/2,l=i.globals.gridHeight/2,c=a+i.config.plotOptions.radar.offsetX,u=l+i.config.plotOptions.radar.offsetY,d=this.graphics.group({class:"apexcharts-radar-series apexcharts-plot-series",transform:"translate(".concat(c||0,", ").concat(u||0,")")}),h=[],f=null,p=null;if(this.yaxisLabels=this.graphics.group({class:"apexcharts-yaxis"}),e.forEach(function(y,b){var k=y.length===i.globals.dataPoints,C=n.graphics.group().attr({class:"apexcharts-series","data:longestSeries":k,seriesName:pe.escapeString(i.globals.seriesNames[b]),rel:b+1,"data:realIndex":b});n.dataRadiusOfPercent[b]=[],n.dataRadius[b]=[],n.angleArr[b]=[],y.forEach(function(H,F){var z=Math.abs(n.maxValue-n.minValue);H-=n.minValue,n.isLog&&(H=n.coreUtils.getLogVal(n.logBase,H,0)),n.dataRadiusOfPercent[b][F]=H/z,n.dataRadius[b][F]=n.dataRadiusOfPercent[b][F]*n.size,n.angleArr[b][F]=F*n.disAngle}),h=n.getDataPointsPos(n.dataRadius[b],n.angleArr[b]);var $=n.createPaths(h,{x:0,y:0});f=n.graphics.group({class:"apexcharts-series-markers-wrap apexcharts-element-hidden"}),p=n.graphics.group({class:"apexcharts-datalabels","data:realIndex":b}),i.globals.delayedElements.push({el:f.node,index:b});var x={i:b,realIndex:b,animationDelay:b,initialSpeed:i.config.chart.animations.speed,dataChangeSpeed:i.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:i.globals.stroke.colors[b],strokeLineCap:i.config.stroke.lineCap},M=null;i.globals.previousPaths.length>0&&(M=n.getPreviousPath(b));for(var P=0;P<$.linePathsTo.length;P++){var T=n.graphics.renderPaths(Je(Je({},x),{},{pathFrom:M===null?$.linePathsFrom[P]:M,pathTo:$.linePathsTo[P],strokeWidth:Array.isArray(n.strokeWidth)?n.strokeWidth[b]:n.strokeWidth,fill:"none",drawShadow:!1}));C.add(T);var I=s.fillPath({seriesNumber:b}),L=n.graphics.renderPaths(Je(Je({},x),{},{pathFrom:M===null?$.areaPathsFrom[P]:M,pathTo:$.areaPathsTo[P],strokeWidth:0,fill:I,drawShadow:!1}));if(i.config.chart.dropShadow.enabled){var R=new ri(n.ctx),V=i.config.chart.dropShadow;R.dropShadow(L,Object.assign({},V,{noUserSpaceOnUse:!0}),b)}C.add(L)}y.forEach(function(H,F){var z=new Sp(n.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:b,dataPointIndex:F}),N=n.graphics.drawMarker(h[F].x,h[F].y,z);N.attr("rel",F),N.attr("j",F),N.attr("index",b),N.node.setAttribute("default-marker-size",z.pSize);var q=n.graphics.group({class:"apexcharts-series-markers"});q&&q.add(N),f.add(q),C.add(f);var K=i.config.dataLabels;if(K.enabled){var X=K.formatter(i.globals.series[b][F],{seriesIndex:b,dataPointIndex:F,w:i});r.plotDataLabelsText({x:h[F].x,y:h[F].y,text:X,textAnchor:"middle",i:b,j:b,parent:p,offsetCorrection:!1,dataLabelsConfig:Je({},K)})}C.add(p)}),o.push(C)}),this.drawPolygons({parent:d}),i.config.xaxis.labels.show){var m=this.drawXAxisTexts();d.add(m)}return o.forEach(function(y){d.add(y)}),d.add(this.yaxisLabels),d}},{key:"drawPolygons",value:function(e){for(var n=this,i=this.w,s=e.parent,o=new FU(this.ctx),r=i.globals.yAxisScale[0].result.reverse(),a=r.length,l=[],c=this.size/(a-1),u=0;u<a;u++)l[u]=c*u;l.reverse();var d=[],h=[];l.forEach(function(f,p){var m=pe.getPolygonPos(f,n.dataPointsLen),y="";m.forEach(function(b,k){if(p===0){var C=n.graphics.drawLine(b.x,b.y,0,0,Array.isArray(n.polygons.connectorColors)?n.polygons.connectorColors[k]:n.polygons.connectorColors);h.push(C)}k===0&&n.yaxisLabelsTextsPos.push({x:b.x,y:b.y}),y+=b.x+","+b.y+" "}),d.push(y)}),d.forEach(function(f,p){var m=n.polygons.strokeColors,y=n.polygons.strokeWidth,b=n.graphics.drawPolygon(f,Array.isArray(m)?m[p]:m,Array.isArray(y)?y[p]:y,i.globals.radarPolygons.fill.colors[p]);s.add(b)}),h.forEach(function(f){s.add(f)}),i.config.yaxis[0].show&&this.yaxisLabelsTextsPos.forEach(function(f,p){var m=o.drawYAxisTexts(f.x,f.y,p,r[p]);n.yaxisLabels.add(m)})}},{key:"drawXAxisTexts",value:function(){var e=this,n=this.w,i=n.config.xaxis.labels,s=this.graphics.group({class:"apexcharts-xaxis"}),o=pe.getPolygonPos(this.size,this.dataPointsLen);return n.globals.labels.forEach(function(r,a){var l=n.config.xaxis.labels.formatter,c=new jf(e.ctx);if(o[a]){var u=e.getTextPos(o[a],e.size),d=l(r,{seriesIndex:-1,dataPointIndex:a,w:n});c.plotDataLabelsText({x:u.newX,y:u.newY,text:d,textAnchor:u.textAnchor,i:a,j:a,parent:s,className:"apexcharts-xaxis-label",color:Array.isArray(i.style.colors)&&i.style.colors[a]?i.style.colors[a]:"#a8a8a8",dataLabelsConfig:Je({textAnchor:u.textAnchor,dropShadow:{enabled:!1}},i),offsetCorrection:!1}).on("click",function(h){if(typeof n.config.chart.events.xAxisLabelClick=="function"){var f=Object.assign({},n,{labelIndex:a});n.config.chart.events.xAxisLabelClick(h,e.ctx,f)}})}}),s}},{key:"createPaths",value:function(e,n){var i=this,s=[],o=[],r=[],a=[];if(e.length){o=[this.graphics.move(n.x,n.y)],a=[this.graphics.move(n.x,n.y)];var l=this.graphics.move(e[0].x,e[0].y),c=this.graphics.move(e[0].x,e[0].y);e.forEach(function(u,d){l+=i.graphics.line(u.x,u.y),c+=i.graphics.line(u.x,u.y),d===e.length-1&&(l+="Z",c+="Z")}),s.push(l),r.push(c)}return{linePathsFrom:o,linePathsTo:s,areaPathsFrom:a,areaPathsTo:r}}},{key:"getTextPos",value:function(e,n){var i="middle",s=e.x,o=e.y;return Math.abs(e.x)>=10?e.x>0?(i="start",s+=10):e.x<0&&(i="end",s-=10):i="middle",Math.abs(e.y)>=n-10&&(e.y<0?o-=10:e.y>0&&(o+=10)),{textAnchor:i,newX:s,newY:o}}},{key:"getPreviousPath",value:function(e){for(var n=this.w,i=null,s=0;s<n.globals.previousPaths.length;s++){var o=n.globals.previousPaths[s];o.paths.length>0&&parseInt(o.realIndex,10)===parseInt(e,10)&&n.globals.previousPaths[s].paths[0]!==void 0&&(i=n.globals.previousPaths[s].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.dataPointsLen;e=e||[],n=n||[];for(var s=[],o=0;o<i;o++){var r={};r.x=e[o]*Math.sin(n[o]),r.y=-e[o]*Math.cos(n[o]),s.push(r)}return s}}]),t}(),PCt=function(t){Q1(n,NU);var e=J1(n);function n(i){var s;lt(this,n),(s=e.call(this,i)).ctx=i,s.w=i.w,s.animBeginArr=[0],s.animDur=0;var o=s.w;return s.startAngle=o.config.plotOptions.radialBar.startAngle,s.endAngle=o.config.plotOptions.radialBar.endAngle,s.totalAngle=Math.abs(o.config.plotOptions.radialBar.endAngle-o.config.plotOptions.radialBar.startAngle),s.trackStartAngle=o.config.plotOptions.radialBar.track.startAngle,s.trackEndAngle=o.config.plotOptions.radialBar.track.endAngle,s.barLabels=s.w.config.plotOptions.radialBar.barLabels,s.donutDataLabels=s.w.config.plotOptions.radialBar.dataLabels,s.radialDataLabels=s.donutDataLabels,s.trackStartAngle||(s.trackStartAngle=s.startAngle),s.trackEndAngle||(s.trackEndAngle=s.endAngle),s.endAngle===360&&(s.endAngle=359.99),s.margin=parseInt(o.config.plotOptions.radialBar.track.margin,10),s.onBarLabelClick=s.onBarLabelClick.bind(ZH(s)),s}return ct(n,[{key:"draw",value:function(i){var s=this.w,o=new Be(this.ctx),r=o.group({class:"apexcharts-radialbar"});if(s.globals.noData)return r;var a=o.group(),l=this.defaultSize/2,c=s.globals.gridWidth/2,u=this.defaultSize/2.05;s.config.chart.sparkline.enabled||(u=u-s.config.stroke.width-s.config.chart.dropShadow.blur);var d=s.globals.fill.colors;if(s.config.plotOptions.radialBar.track.show){var h=this.drawTracks({size:u,centerX:c,centerY:l,colorArr:d,series:i});a.add(h)}var f=this.drawArcs({size:u,centerX:c,centerY:l,colorArr:d,series:i}),p=360;s.config.plotOptions.radialBar.startAngle<0&&(p=this.totalAngle);var m=(360-p)/360;if(s.globals.radialSize=u-u*m,this.radialDataLabels.value.show){var y=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);s.globals.radialSize+=y*m}return a.add(f.g),s.config.plotOptions.radialBar.hollow.position==="front"&&(f.g.add(f.elHollow),f.dataLabels&&f.g.add(f.dataLabels)),r.add(a),r}},{key:"drawTracks",value:function(i){var s=this.w,o=new Be(this.ctx),r=o.group({class:"apexcharts-tracks"}),a=new ri(this.ctx),l=new Dr(this.ctx),c=this.getStrokeWidth(i);i.size=i.size-c/2;for(var u=0;u<i.series.length;u++){var d=o.group({class:"apexcharts-radialbar-track apexcharts-track"});r.add(d),d.attr({rel:u+1}),i.size=i.size-c-this.margin;var h=s.config.plotOptions.radialBar.track,f=l.fillPath({seriesNumber:0,size:i.size,fillColors:Array.isArray(h.background)?h.background[u]:h.background,solid:!0}),p=this.trackStartAngle,m=this.trackEndAngle;Math.abs(m)+Math.abs(p)>=360&&(m=360-Math.abs(this.startAngle)-.1);var y=o.drawPath({d:"",stroke:f,strokeWidth:c*parseInt(h.strokeWidth,10)/100,fill:"none",strokeOpacity:h.opacity,classes:"apexcharts-radialbar-area"});if(h.dropShadow.enabled){var b=h.dropShadow;a.dropShadow(y,b)}d.add(y),y.attr("id","apexcharts-radialbarTrack-"+u),this.animatePaths(y,{centerX:i.centerX,centerY:i.centerY,endAngle:m,startAngle:p,size:i.size,i:u,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return r}},{key:"drawArcs",value:function(i){var s=this.w,o=new Be(this.ctx),r=new Dr(this.ctx),a=new ri(this.ctx),l=o.group(),c=this.getStrokeWidth(i);i.size=i.size-c/2;var u=s.config.plotOptions.radialBar.hollow.background,d=i.size-c*i.series.length-this.margin*i.series.length-c*parseInt(s.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=d-s.config.plotOptions.radialBar.hollow.margin;s.config.plotOptions.radialBar.hollow.image!==void 0&&(u=this.drawHollowImage(i,l,d,u));var f=this.drawHollow({size:h,centerX:i.centerX,centerY:i.centerY,fill:u||"transparent"});if(s.config.plotOptions.radialBar.hollow.dropShadow.enabled){var p=s.config.plotOptions.radialBar.hollow.dropShadow;a.dropShadow(f,p)}var m=1;!this.radialDataLabels.total.show&&s.globals.series.length>1&&(m=0);var y=null;if(this.radialDataLabels.show){var b=s.globals.dom.Paper.findOne(".apexcharts-datalabels-group");y=this.renderInnerDataLabels(b,this.radialDataLabels,{hollowSize:d,centerX:i.centerX,centerY:i.centerY,opacity:m})}s.config.plotOptions.radialBar.hollow.position==="back"&&(l.add(f),y&&l.add(y));var k=!1;s.config.plotOptions.radialBar.inverseOrder&&(k=!0);for(var C=k?i.series.length-1:0;k?C>=0:C<i.series.length;k?C--:C++){var $=o.group({class:"apexcharts-series apexcharts-radial-series",seriesName:pe.escapeString(s.globals.seriesNames[C])});l.add($),$.attr({rel:C+1,"data:realIndex":C}),this.ctx.series.addCollapsedClassToSeries($,C),i.size=i.size-c-this.margin;var x=r.fillPath({seriesNumber:C,size:i.size,value:i.series[C]}),M=this.startAngle,P=void 0,T=pe.negToZero(i.series[C]>100?100:i.series[C])/100,I=Math.round(this.totalAngle*T)+this.startAngle,L=void 0;s.globals.dataChanged&&(P=this.startAngle,L=Math.round(this.totalAngle*pe.negToZero(s.globals.previousPaths[C])/100)+P),Math.abs(I)+Math.abs(M)>360&&(I-=.01),Math.abs(L)+Math.abs(P)>360&&(L-=.01);var R=I-M,V=Array.isArray(s.config.stroke.dashArray)?s.config.stroke.dashArray[C]:s.config.stroke.dashArray,H=o.drawPath({d:"",stroke:x,strokeWidth:c,fill:"none",fillOpacity:s.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+C,strokeDashArray:V});if(Be.setAttrs(H.node,{"data:angle":R,"data:value":i.series[C]}),s.config.chart.dropShadow.enabled){var F=s.config.chart.dropShadow;a.dropShadow(H,F,C)}if(a.setSelectionFilter(H,0,C),this.addListeners(H,this.radialDataLabels),$.add(H),H.attr({index:0,j:C}),this.barLabels.enabled){var z=pe.polarToCartesian(i.centerX,i.centerY,i.size,M),N=this.barLabels.formatter(s.globals.seriesNames[C],{seriesIndex:C,w:s}),q=["apexcharts-radialbar-label"];this.barLabels.onClick||q.push("apexcharts-no-click");var K=this.barLabels.useSeriesColors?s.globals.colors[C]:s.config.chart.foreColor;K||(K=s.config.chart.foreColor);var X=z.x+this.barLabels.offsetX,U=z.y+this.barLabels.offsetY,Q=o.drawText({x:X,y:U,text:N,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:K,cssClass:q.join(" ")});Q.on("click",this.onBarLabelClick),Q.attr({rel:C+1}),M!==0&&Q.attr({"transform-origin":"".concat(X," ").concat(U),transform:"rotate(".concat(M," 0 0)")}),$.add(Q)}var ne=0;!this.initialAnim||s.globals.resized||s.globals.dataChanged||(ne=s.config.chart.animations.speed),s.globals.dataChanged&&(ne=s.config.chart.animations.dynamicAnimation.speed),this.animDur=ne/(1.2*i.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(H,{centerX:i.centerX,centerY:i.centerY,endAngle:I,startAngle:M,prevEndAngle:L,prevStartAngle:P,size:i.size,i:C,totalItems:2,animBeginArr:this.animBeginArr,dur:ne,shouldSetPrevPaths:!0})}return{g:l,elHollow:f,dataLabels:y}}},{key:"drawHollow",value:function(i){var s=new Be(this.ctx).drawCircle(2*i.size);return s.attr({class:"apexcharts-radialbar-hollow",cx:i.centerX,cy:i.centerY,r:i.size,fill:i.fill}),s}},{key:"drawHollowImage",value:function(i,s,o,r){var a=this.w,l=new Dr(this.ctx),c=pe.randomId(),u=a.config.plotOptions.radialBar.hollow.image;if(a.config.plotOptions.radialBar.hollow.imageClipped)l.clippedImgArea({width:o,height:o,image:u,patternID:"pattern".concat(a.globals.cuid).concat(c)}),r="url(#pattern".concat(a.globals.cuid).concat(c,")");else{var d=a.config.plotOptions.radialBar.hollow.imageWidth,h=a.config.plotOptions.radialBar.hollow.imageHeight;if(d===void 0&&h===void 0){var f=a.globals.dom.Paper.image(u,function(m){this.move(i.centerX-m.width/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-m.height/2+a.config.plotOptions.radialBar.hollow.imageOffsetY)});s.add(f)}else{var p=a.globals.dom.Paper.image(u,function(m){this.move(i.centerX-d/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-h/2+a.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(d,h)});s.add(p)}}return r}},{key:"getStrokeWidth",value:function(i){var s=this.w;return i.size*(100-parseInt(s.config.plotOptions.radialBar.hollow.size,10))/100/(i.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(i){var s=parseInt(i.target.getAttribute("rel"),10)-1,o=this.barLabels.onClick,r=this.w;o&&o(r.globals.seriesNames[s],{w:r,seriesIndex:s})}}]),n}(),ICt=function(t){Q1(n,Wf);var e=J1(n);function n(){return lt(this,n),e.apply(this,arguments)}return ct(n,[{key:"draw",value:function(i,s){var o=this.w,r=new Be(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=i,this.seriesRangeStart=o.globals.seriesRangeStart,this.seriesRangeEnd=o.globals.seriesRangeEnd,this.barHelpers.initVariables(i);for(var a=r.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),l=0;l<i.length;l++){var c,u,d,h,f=void 0,p=void 0,m=o.globals.comboCharts?s[l]:l,y=this.barHelpers.getGroupIndex(m).columnGroupIndex,b=r.group({class:"apexcharts-series",seriesName:pe.escapeString(o.globals.seriesNames[m]),rel:l+1,"data:realIndex":m});this.ctx.series.addCollapsedClassToSeries(b,m),i[l].length>0&&(this.visibleI=this.visibleI+1);var k=0,C=0,$=0;this.yRatio.length>1&&(this.yaxisIndex=o.globals.seriesYAxisReverseMap[m][0],$=m);var x=this.barHelpers.initialPositions(m);p=x.y,h=x.zeroW,f=x.x,C=x.barWidth,k=x.barHeight,c=x.xDivision,u=x.yDivision,d=x.zeroH;for(var M=r.group({class:"apexcharts-datalabels","data:realIndex":m}),P=r.group({class:"apexcharts-rangebar-goals-markers"}),T=0;T<o.globals.dataPoints;T++){var I=this.barHelpers.getStrokeWidth(l,T,m),L=this.seriesRangeStart[l][T],R=this.seriesRangeEnd[l][T],V=null,H=null,F=null,z={x:f,y:p,strokeWidth:I,elSeries:b},N=this.seriesLen;if(o.config.plotOptions.bar.rangeBarGroupRows&&(N=1),o.config.series[l].data[T]===void 0)break;if(this.isHorizontal){F=p+k*this.visibleI;var q=(u-k*N)/2;if(o.config.series[l].data[T].x){var K=this.detectOverlappingBars({i:l,j:T,barYPosition:F,srty:q,barHeight:k,yDivision:u,initPositions:x});k=K.barHeight,F=K.barYPosition}C=(V=this.drawRangeBarPaths(Je({indexes:{i:l,j:T,realIndex:m},barHeight:k,barYPosition:F,zeroW:h,yDivision:u,y1:L,y2:R},z))).barWidth}else{o.globals.isXNumeric&&(f=(o.globals.seriesX[l][T]-o.globals.minX)/this.xRatio-C/2),H=f+C*this.visibleI;var X=(c-C*N)/2;if(o.config.series[l].data[T].x){var U=this.detectOverlappingBars({i:l,j:T,barXPosition:H,srtx:X,barWidth:C,xDivision:c,initPositions:x});C=U.barWidth,H=U.barXPosition}k=(V=this.drawRangeColumnPaths(Je({indexes:{i:l,j:T,realIndex:m,translationsIndex:$},barWidth:C,barXPosition:H,zeroH:d,xDivision:c},z))).barHeight}var Q=this.barHelpers.drawGoalLine({barXPosition:V.barXPosition,barYPosition:F,goalX:V.goalX,goalY:V.goalY,barHeight:k,barWidth:C});Q&&P.add(Q),p=V.y,f=V.x;var ne=this.barHelpers.getPathFillColor(i,l,T,m);this.renderSeries({realIndex:m,pathFill:ne.color,lineFill:ne.useRangeColor?ne.color:o.globals.stroke.colors[m],j:T,i:l,x:f,y:p,y1:L,y2:R,pathFrom:V.pathFrom,pathTo:V.pathTo,strokeWidth:I,elSeries:b,series:i,barHeight:k,barWidth:C,barXPosition:H,barYPosition:F,columnGroupIndex:y,elDataLabelsWrap:M,elGoalsMarkers:P,visibleSeries:this.visibleI,type:"rangebar"})}a.add(b)}return a}},{key:"detectOverlappingBars",value:function(i){var s=i.i,o=i.j,r=i.barYPosition,a=i.barXPosition,l=i.srty,c=i.srtx,u=i.barHeight,d=i.barWidth,h=i.yDivision,f=i.xDivision,p=i.initPositions,m=this.w,y=[],b=m.config.series[s].data[o].rangeName,k=m.config.series[s].data[o].x,C=Array.isArray(k)?k.join(" "):k,$=m.globals.labels.map(function(M){return Array.isArray(M)?M.join(" "):M}).indexOf(C),x=m.globals.seriesRange[s].findIndex(function(M){return M.x===C&&M.overlaps.length>0});return this.isHorizontal?(r=m.config.plotOptions.bar.rangeBarGroupRows?l+h*$:l+u*this.visibleI+h*$,x>-1&&!m.config.plotOptions.bar.rangeBarOverlap&&(y=m.globals.seriesRange[s][x].overlaps).indexOf(b)>-1&&(r=(u=p.barHeight/y.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+u*(this.visibleI+y.indexOf(b))+h*$)):($>-1&&!m.globals.timescaleLabels.length&&(a=m.config.plotOptions.bar.rangeBarGroupRows?c+f*$:c+d*this.visibleI+f*$),x>-1&&!m.config.plotOptions.bar.rangeBarOverlap&&(y=m.globals.seriesRange[s][x].overlaps).indexOf(b)>-1&&(a=(d=p.barWidth/y.length)*this.visibleI+f*(100-parseInt(this.barOptions.barWidth,10))/100/2+d*(this.visibleI+y.indexOf(b))+f*$)),{barYPosition:r,barXPosition:a,barHeight:u,barWidth:d}}},{key:"drawRangeColumnPaths",value:function(i){var s=i.indexes,o=i.x,r=i.xDivision,a=i.barWidth,l=i.barXPosition,c=i.zeroH,u=this.w,d=s.i,h=s.j,f=s.realIndex,p=s.translationsIndex,m=this.yRatio[p],y=this.getRangeValue(f,h),b=Math.min(y.start,y.end),k=Math.max(y.start,y.end);this.series[d][h]===void 0||this.series[d][h]===null?b=c:(b=c-b/m,k=c-k/m);var C=Math.abs(k-b),$=this.barHelpers.getColumnPaths({barXPosition:l,barWidth:a,y1:b,y2:k,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:f,i:f,j:h,w:u});if(u.globals.isXNumeric){var x=this.getBarXForNumericXAxis({x:o,j:h,realIndex:f,barWidth:a});o=x.x,l=x.barXPosition}else o+=r;return{pathTo:$.pathTo,pathFrom:$.pathFrom,barHeight:C,x:o,y:y.start<0&&y.end<0?b:k,goalY:this.barHelpers.getGoalValues("y",null,c,d,h,p),barXPosition:l}}},{key:"preventBarOverflow",value:function(i){var s=this.w;return i<0&&(i=0),i>s.globals.gridWidth&&(i=s.globals.gridWidth),i}},{key:"drawRangeBarPaths",value:function(i){var s=i.indexes,o=i.y,r=i.y1,a=i.y2,l=i.yDivision,c=i.barHeight,u=i.barYPosition,d=i.zeroW,h=this.w,f=s.realIndex,p=s.j,m=this.preventBarOverflow(d+r/this.invertedYRatio),y=this.preventBarOverflow(d+a/this.invertedYRatio),b=this.getRangeValue(f,p),k=Math.abs(y-m),C=this.barHelpers.getBarpaths({barYPosition:u,barHeight:c,x1:m,x2:y,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:f,realIndex:f,j:p,w:h});return h.globals.isXNumeric||(o+=l),{pathTo:C.pathTo,pathFrom:C.pathFrom,barWidth:k,x:b.start<0&&b.end<0?m:y,goalX:this.barHelpers.getGoalValues("x",d,null,f,p),y:o}}},{key:"getRangeValue",value:function(i,s){var o=this.w;return{start:o.globals.seriesRangeStart[i][s],end:o.globals.seriesRangeEnd[i][s]}}}]),n}(),LCt=function(){function t(e){lt(this,t),this.w=e.w,this.lineCtx=e}return ct(t,[{key:"sameValueSeriesFix",value:function(e,n){var i=this.w;if((i.config.fill.type==="gradient"||i.config.fill.type[e]==="gradient")&&new _s(this.lineCtx.ctx,i).seriesHaveSameValues(e)){var s=n[e].slice();s[s.length-1]=s[s.length-1]+1e-6,n[e]=s}return n}},{key:"calculatePoints",value:function(e){var n=e.series,i=e.realIndex,s=e.x,o=e.y,r=e.i,a=e.j,l=e.prevY,c=this.w,u=[],d=[],h=this.lineCtx.categoryAxisCorrection+c.config.markers.offsetX;return c.globals.isXNumeric&&(h=(c.globals.seriesX[i][0]-c.globals.minX)/this.lineCtx.xRatio+c.config.markers.offsetX),a===0&&(u.push(h),d.push(pe.isNumber(n[r][0])?l+c.config.markers.offsetY:null)),u.push(s+c.config.markers.offsetX),d.push(pe.isNumber(n[r][a+1])?o+c.config.markers.offsetY:null),{x:u,y:d}}},{key:"checkPreviousPaths",value:function(e){for(var n=e.pathFromLine,i=e.pathFromArea,s=e.realIndex,o=this.w,r=0;r<o.globals.previousPaths.length;r++){var a=o.globals.previousPaths[r];(a.type==="line"||a.type==="area")&&a.paths.length>0&&parseInt(a.realIndex,10)===parseInt(s,10)&&(a.type==="line"?(this.lineCtx.appendPathFrom=!1,n=o.globals.previousPaths[r].paths[0].d):a.type==="area"&&(this.lineCtx.appendPathFrom=!1,i=o.globals.previousPaths[r].paths[0].d,o.config.stroke.show&&o.globals.previousPaths[r].paths[1]&&(n=o.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:n,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(e){var n,i,s,o=e.i,r=e.realIndex,a=e.series,l=e.prevY,c=e.lineYPosition,u=e.translationsIndex,d=this.w,h=d.config.chart.stacked&&!d.globals.comboCharts||d.config.chart.stacked&&d.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((n=this.w.config.series[r])===null||n===void 0?void 0:n.type)==="bar"||((i=this.w.config.series[r])===null||i===void 0?void 0:i.type)==="column");if(((s=a[o])===null||s===void 0?void 0:s[0])!==void 0)l=(c=h&&o>0?this.lineCtx.prevSeriesY[o-1][0]:this.lineCtx.zeroY)-a[o][0]/this.lineCtx.yRatio[u]+2*(this.lineCtx.isReversed?a[o][0]/this.lineCtx.yRatio[u]:0);else if(h&&o>0&&a[o][0]===void 0){for(var f=o-1;f>=0;f--)if(a[f][0]!==null&&a[f][0]!==void 0){l=c=this.lineCtx.prevSeriesY[f][0];break}}return{prevY:l,lineYPosition:c}}}]),t}(),OCt=function(t){for(var e,n,i,s,o=function(u){for(var d=[],h=u[0],f=u[1],p=d[0]=M3(h,f),m=1,y=u.length-1;m<y;m++)h=f,f=u[m+1],d[m]=.5*(p+(p=M3(h,f)));return d[m]=p,d}(t),r=t.length-1,a=[],l=0;l<r;l++)i=M3(t[l],t[l+1]),Math.abs(i)<1e-6?o[l]=o[l+1]=0:(s=(e=o[l]/i)*e+(n=o[l+1]/i)*n)>9&&(s=3*i/Math.sqrt(s),o[l]=s*e,o[l+1]=s*n);for(var c=0;c<=r;c++)s=(t[Math.min(r,c+1)][0]-t[Math.max(0,c-1)][0])/(6*(1+o[c]*o[c])),a.push([s||0,o[c]*s||0]);return a},DCt=function(t){var e=OCt(t),n=t[1],i=t[0],s=[],o=e[1],r=e[0];s.push(i,[i[0]+r[0],i[1]+r[1],n[0]-o[0],n[1]-o[1],n[0],n[1]]);for(var a=2,l=e.length;a<l;a++){var c=t[a],u=e[a];s.push([c[0]-u[0],c[1]-u[1],c[0],c[1]])}return s},RCt=function(t,e,n){var i=t.slice(e,n);if(e){if(n-e>1&&i[1].length<6){var s=i[0].length;i[1]=[2*i[0][s-2]-i[0][s-4],2*i[0][s-1]-i[0][s-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i};function M3(t,e){return(e[1]-t[1])/(e[0]-t[0])}var T3=function(){function t(e,n,i){lt(this,t),this.ctx=e,this.w=e.w,this.xyRatios=n,this.pointsChart=!(this.w.config.chart.type!=="bubble"&&this.w.config.chart.type!=="scatter")||i,this.scatter=new TU(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new LCt(this),this.markers=new Sp(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return ct(t,[{key:"draw",value:function(e,n,i,s){var o,r=this.w,a=new Be(this.ctx),l=r.globals.comboCharts?n:r.config.chart.type,c=a.group({class:"apexcharts-".concat(l,"-series apexcharts-plot-series")}),u=new _s(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=u.getLogSeries(e),this.yRatio=u.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var d=[],h=0;h<e.length;h++){e=this.lineHelpers.sameValueSeriesFix(h,e);var f=r.globals.comboCharts?i[h]:h,p=this.yRatio.length>1?f:0;this._initSerieVariables(e,h,f);var m=[],y=[],b=[],k=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,f),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(k=(r.globals.seriesX[f][0]-r.globals.minX)/this.xRatio),b.push(k);var C,$=k,x=void 0,M=$,P=this.zeroY,T=this.zeroY;P=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:e,prevY:P,lineYPosition:0,translationsIndex:p}).prevY,r.config.stroke.curve==="monotoneCubic"&&e[h][0]===null?m.push(null):m.push(P),C=P,l==="rangeArea"&&(x=T=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:s,prevY:T,lineYPosition:0,translationsIndex:p}).prevY,y.push(m[0]!==null?T:null));var I=this._calculatePathsFrom({type:l,series:e,i:h,realIndex:f,translationsIndex:p,prevX:M,prevY:P,prevY2:T}),L=[m[0]],R=[y[0]],V={type:l,series:e,realIndex:f,translationsIndex:p,i:h,x:k,y:1,pX:$,pY:C,pathsFrom:I,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:b,yArrj:m,y2Arrj:y,seriesRangeEnd:s},H=this._iterateOverDataPoints(Je(Je({},V),{},{iterations:l==="rangeArea"?e[h].length-1:void 0,isRangeStart:!0}));if(l==="rangeArea"){for(var F=this._calculatePathsFrom({series:s,i:h,realIndex:f,prevX:M,prevY:T}),z=this._iterateOverDataPoints(Je(Je({},V),{},{series:s,xArrj:[k],yArrj:L,y2Arrj:R,pY:x,areaPaths:H.areaPaths,pathsFrom:F,iterations:s[h].length-1,isRangeStart:!1})),N=H.linePaths.length/2,q=0;q<N;q++)H.linePaths[q]=z.linePaths[q+N]+H.linePaths[q];H.linePaths.splice(N),H.pathFromLine=z.pathFromLine+H.pathFromLine}else H.pathFromArea+="z";this._handlePaths({type:l,realIndex:f,i:h,paths:H}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),d.push(this.elSeries)}if(((o=r.config.series[0])===null||o===void 0?void 0:o.zIndex)!==void 0&&d.sort(function(U,Q){return Number(U.node.getAttribute("zIndex"))-Number(Q.node.getAttribute("zIndex"))}),r.config.chart.stacked)for(var K=d.length-1;K>=0;K--)c.add(d[K]);else for(var X=0;X<d.length;X++)c.add(d[X]);return c}},{key:"_initSerieVariables",value:function(e,n,i){var s=this.w,o=new Be(this.ctx);this.xDivision=s.globals.gridWidth/(s.globals.dataPoints-(s.config.xaxis.tickPlacement==="on"?1:0)),this.strokeWidth=Array.isArray(s.config.stroke.width)?s.config.stroke.width[i]:s.config.stroke.width;var r=0;if(this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed,this.zeroY=s.globals.gridHeight-this.baseLineY[r]-(this.isReversed?s.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>s.globals.gridHeight||s.config.plotOptions.area.fillTo==="end")&&(this.areaBottomY=s.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=o.group({class:"apexcharts-series",zIndex:s.config.series[i].zIndex!==void 0?s.config.series[i].zIndex:i,seriesName:pe.escapeString(s.globals.seriesNames[i])}),this.elPointsMain=o.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),s.globals.hasNullValues){var a=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[s.globals.gridHeight+s.globals.markers.largestSize]},seriesIndex:n,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});a!==null&&this.elPointsMain.add(a)}this.elDataLabelsWrap=o.group({class:"apexcharts-datalabels","data:realIndex":i});var l=e[n].length===s.globals.dataPoints;this.elSeries.attr({"data:longestSeries":l,rel:n+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var n,i,s,o,r=e.type,a=e.series,l=e.i,c=e.realIndex,u=e.translationsIndex,d=e.prevX,h=e.prevY,f=e.prevY2,p=this.w,m=new Be(this.ctx);if(a[l][0]===null){for(var y=0;y<a[l].length;y++)if(a[l][y]!==null){d=this.xDivision*y,h=this.zeroY-a[l][y]/this.yRatio[u],n=m.move(d,h),i=m.move(d,this.areaBottomY);break}}else n=m.move(d,h),r==="rangeArea"&&(n=m.move(d,f)+m.line(d,h)),i=m.move(d,this.areaBottomY)+m.line(d,h);if(s=m.move(0,this.areaBottomY)+m.line(0,this.areaBottomY),o=m.move(0,this.areaBottomY)+m.line(0,this.areaBottomY),p.globals.previousPaths.length>0){var b=this.lineHelpers.checkPreviousPaths({pathFromLine:s,pathFromArea:o,realIndex:c});s=b.pathFromLine,o=b.pathFromArea}return{prevX:d,prevY:h,linePath:n,areaPath:i,pathFromLine:s,pathFromArea:o}}},{key:"_handlePaths",value:function(e){var n=e.type,i=e.realIndex,s=e.i,o=e.paths,r=this.w,a=new Be(this.ctx),l=new Dr(this.ctx);this.prevSeriesY.push(o.yArrj),r.globals.seriesXvalues[i]=o.xArrj,r.globals.seriesYvalues[i]=o.yArrj;var c=r.config.forecastDataPoints;if(c.count>0&&n!=="rangeArea"){var u=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-c.count-1],d=a.drawRect(u,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(d.node);var h=a.drawRect(0,0,u,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(h.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var f={i:s,realIndex:i,animationDelay:s,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(n)};if(n==="area")for(var p=l.fillPath({seriesNumber:i}),m=0;m<o.areaPaths.length;m++){var y=a.renderPaths(Je(Je({},f),{},{pathFrom:o.pathFromArea,pathTo:o.areaPaths[m],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:p}));this.elSeries.add(y)}if(r.config.stroke.show&&!this.pointsChart){var b=null;if(n==="line")b=l.fillPath({seriesNumber:i,i:s});else if(r.config.stroke.fill.type==="solid")b=r.globals.stroke.colors[i];else{var k=r.config.fill;r.config.fill=r.config.stroke.fill,b=l.fillPath({seriesNumber:i,i:s}),r.config.fill=k}for(var C=0;C<o.linePaths.length;C++){var $=b;n==="rangeArea"&&($=l.fillPath({seriesNumber:i}));var x=Je(Je({},f),{},{pathFrom:o.pathFromLine,pathTo:o.linePaths[C],stroke:b,strokeWidth:this.strokeWidth,strokeLineCap:r.config.stroke.lineCap,fill:n==="rangeArea"?$:"none"}),M=a.renderPaths(x);if(this.elSeries.add(M),M.attr("fill-rule","evenodd"),c.count>0&&n!=="rangeArea"){var P=a.renderPaths(x);P.node.setAttribute("stroke-dasharray",c.dashArray),c.strokeWidth&&P.node.setAttribute("stroke-width",c.strokeWidth),this.elSeries.add(P),P.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),M.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){var n,i,s=this,o=e.type,r=e.series,a=e.iterations,l=e.realIndex,c=e.translationsIndex,u=e.i,d=e.x,h=e.y,f=e.pX,p=e.pY,m=e.pathsFrom,y=e.linePaths,b=e.areaPaths,k=e.seriesIndex,C=e.lineYPosition,$=e.xArrj,x=e.yArrj,M=e.y2Arrj,P=e.isRangeStart,T=e.seriesRangeEnd,I=this.w,L=new Be(this.ctx),R=this.yRatio,V=m.prevY,H=m.linePath,F=m.areaPath,z=m.pathFromLine,N=m.pathFromArea,q=pe.isNumber(I.globals.minYArr[l])?I.globals.minYArr[l]:I.globals.minY;a||(a=I.globals.dataPoints>1?I.globals.dataPoints-1:I.globals.dataPoints);var K=function(ie,re){return re-ie/R[c]+2*(s.isReversed?ie/R[c]:0)},X=h,U=I.config.chart.stacked&&!I.globals.comboCharts||I.config.chart.stacked&&I.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((n=this.w.config.series[l])===null||n===void 0?void 0:n.type)==="bar"||((i=this.w.config.series[l])===null||i===void 0?void 0:i.type)==="column"),Q=I.config.stroke.curve;Array.isArray(Q)&&(Q=Array.isArray(k)?Q[k[u]]:Q[u]);for(var ne,Z=0,ae=0;ae<a&&r[u].length!==0;ae++){var me=r[u][ae+1]===void 0||r[u][ae+1]===null;if(I.globals.isXNumeric){var we=I.globals.seriesX[l][ae+1];I.globals.seriesX[l][ae+1]===void 0&&(we=I.globals.seriesX[l][a-1]),d=(we-I.globals.minX)/this.xRatio}else d+=this.xDivision;U?u>0&&I.globals.collapsedSeries.length<I.config.series.length-1?C=this.prevSeriesY[function(ie){for(var re=ie;re>0;re--){if(!(I.globals.collapsedSeriesIndices.indexOf((k==null?void 0:k[re])||re)>-1))return re;re--}return 0}(u-1)][ae+1]:C=this.zeroY:C=this.zeroY,me?h=K(q,C):(h=K(r[u][ae+1],C),o==="rangeArea"&&(X=K(T[u][ae+1],C))),$.push(r[u][ae+1]===null?null:d),!me||I.config.stroke.curve!=="smooth"&&I.config.stroke.curve!=="monotoneCubic"?(x.push(h),M.push(X)):(x.push(null),M.push(null));var oe=this.lineHelpers.calculatePoints({series:r,x:d,y:h,realIndex:l,i:u,j:ae,prevY:V}),fe=this._createPaths({type:o,series:r,i:u,realIndex:l,j:ae,x:d,y:h,y2:X,xArrj:$,yArrj:x,y2Arrj:M,pX:f,pY:p,pathState:Z,segmentStartX:ne,linePath:H,areaPath:F,linePaths:y,areaPaths:b,curve:Q,isRangeStart:P});b=fe.areaPaths,y=fe.linePaths,f=fe.pX,p=fe.pY,Z=fe.pathState,ne=fe.segmentStartX,F=fe.areaPath,H=fe.linePath,!this.appendPathFrom||I.globals.hasNullValues||Q==="monotoneCubic"&&o==="rangeArea"||(z+=L.line(d,this.areaBottomY),N+=L.line(d,this.areaBottomY)),this.handleNullDataPoints(r,oe,u,ae,l),this._handleMarkersAndLabels({type:o,pointsPos:oe,i:u,j:ae,realIndex:l,isRangeStart:P})}return{yArrj:x,xArrj:$,pathFromArea:N,areaPaths:b,pathFromLine:z,linePaths:y,linePath:H,areaPath:F}}},{key:"_handleMarkersAndLabels",value:function(e){var n=e.type,i=e.pointsPos,s=e.isRangeStart,o=e.i,r=e.j,a=e.realIndex,l=this.w,c=new jf(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:a,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{l.globals.series[o].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var u=this.markers.plotChartMarkers({pointsPos:i,seriesIndex:a,j:r+1});u!==null&&this.elPointsMain.add(u)}var d=c.drawDataLabel({type:n,isRangeStart:s,pos:i,i:a,j:r+1});d!==null&&this.elDataLabelsWrap.add(d)}},{key:"_createPaths",value:function(e){var n=e.type,i=e.series,s=e.i;e.realIndex;var o,r=e.j,a=e.x,l=e.y,c=e.xArrj,u=e.yArrj,d=e.y2,h=e.y2Arrj,f=e.pX,p=e.pY,m=e.pathState,y=e.segmentStartX,b=e.linePath,k=e.areaPath,C=e.linePaths,$=e.areaPaths,x=e.curve,M=e.isRangeStart,P=new Be(this.ctx),T=this.areaBottomY,I=n==="rangeArea",L=n==="rangeArea"&&M;switch(x){case"monotoneCubic":var R=M?u:h;switch(m){case 0:if(R[r+1]===null)break;m=1;case 1:if(!(I?c.length===i[s].length:r===i[s].length-2))break;case 2:var V=M?c:c.slice().reverse(),H=M?R:R.slice().reverse(),F=(o=H,V.map(function(we,oe){return[we,o[oe]]}).filter(function(we){return we[1]!==null})),z=F.length>1?DCt(F):F,N=[];I&&(L?$=F:N=$.reverse());var q=0,K=0;if(function(we,oe){for(var fe=function(je){var te=[],se=0;return je.forEach(function(ve){ve!==null?se++:se>0&&(te.push(se),se=0)}),se>0&&te.push(se),te}(we),ie=[],re=0,ke=0;re<fe.length;ke+=fe[re++])ie[re]=RCt(oe,ke,ke+fe[re]);return ie}(H,z).forEach(function(we){q++;var oe=function(re){for(var ke="",je=0;je<re.length;je++){var te=re[je],se=te.length;se>4?(ke+="C".concat(te[0],", ").concat(te[1]),ke+=", ".concat(te[2],", ").concat(te[3]),ke+=", ".concat(te[4],", ").concat(te[5])):se>2&&(ke+="S".concat(te[0],", ").concat(te[1]),ke+=", ".concat(te[2],", ").concat(te[3]))}return ke}(we),fe=K,ie=(K+=we.length)-1;L?b=P.move(F[fe][0],F[fe][1])+oe:I?b=P.move(N[fe][0],N[fe][1])+P.line(F[fe][0],F[fe][1])+oe+P.line(N[ie][0],N[ie][1]):(b=P.move(F[fe][0],F[fe][1])+oe,k=b+P.line(F[ie][0],T)+P.line(F[fe][0],T)+"z",$.push(k)),C.push(b)}),I&&q>1&&!L){var X=C.slice(q).reverse();C.splice(q),X.forEach(function(we){return C.push(we)})}m=0}break;case"smooth":var U=.35*(a-f);if(i[s][r]===null)m=0;else switch(m){case 0:if(y=f,b=L?P.move(f,h[r])+P.line(f,p):P.move(f,p),k=P.move(f,p),i[s][r+1]===null||i[s][r+1]===void 0){C.push(b),$.push(k);break}if(m=1,r<i[s].length-2){var Q=P.curve(f+U,p,a-U,l,a,l);b+=Q,k+=Q;break}case 1:if(i[s][r+1]===null)b+=L?P.line(f,d):P.move(f,p),k+=P.line(f,T)+P.line(y,T)+"z",C.push(b),$.push(k),m=-1;else{var ne=P.curve(f+U,p,a-U,l,a,l);b+=ne,k+=ne,r>=i[s].length-2&&(L&&(b+=P.curve(a,l,a,l,a,d)+P.move(a,d)),k+=P.curve(a,l,a,l,a,T)+P.line(y,T)+"z",C.push(b),$.push(k),m=-1)}}f=a,p=l;break;default:var Z=function(we,oe,fe){var ie=[];switch(we){case"stepline":ie=P.line(oe,null,"H")+P.line(null,fe,"V");break;case"linestep":ie=P.line(null,fe,"V")+P.line(oe,null,"H");break;case"straight":ie=P.line(oe,fe)}return ie};if(i[s][r]===null)m=0;else switch(m){case 0:if(y=f,b=L?P.move(f,h[r])+P.line(f,p):P.move(f,p),k=P.move(f,p),i[s][r+1]===null||i[s][r+1]===void 0){C.push(b),$.push(k);break}if(m=1,r<i[s].length-2){var ae=Z(x,a,l);b+=ae,k+=ae;break}case 1:if(i[s][r+1]===null)b+=L?P.line(f,d):P.move(f,p),k+=P.line(f,T)+P.line(y,T)+"z",C.push(b),$.push(k),m=-1;else{var me=Z(x,a,l);b+=me,k+=me,r>=i[s].length-2&&(L&&(b+=P.line(a,d)),k+=P.line(a,T)+P.line(y,T)+"z",C.push(b),$.push(k),m=-1)}}f=a,p=l}return{linePaths:C,areaPaths:$,pX:f,pY:p,pathState:m,segmentStartX:y,linePath:b,areaPath:k}}},{key:"handleNullDataPoints",value:function(e,n,i,s,o){var r=this.w;if(e[i][s]===null&&r.config.markers.showNullDataPoints||e[i].length===1){var a=this.strokeWidth-r.config.markers.strokeWidth/2;a>0||(a=0);var l=this.markers.plotChartMarkers({pointsPos:n,seriesIndex:o,j:s+1,pSize:a,alwaysDrawMarker:!0});l!==null&&this.elPointsMain.add(l)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(a,l,c,u){this.xoffset=a,this.yoffset=l,this.height=u,this.width=c,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(d){var h,f=[],p=this.xoffset,m=this.yoffset,y=o(d)/this.height,b=o(d)/this.width;if(this.width>=this.height)for(h=0;h<d.length;h++)f.push([p,m,p+y,m+d[h]/y]),m+=d[h]/y;else for(h=0;h<d.length;h++)f.push([p,m,p+d[h]/b,m+b]),p+=d[h]/b;return f},this.cutArea=function(d){var h;if(this.width>=this.height){var f=d/this.height,p=this.width-f;h=new t(this.xoffset+f,this.yoffset,p,this.height)}else{var m=d/this.width,y=this.height-m;h=new t(this.xoffset,this.yoffset+m,this.width,y)}return h}}function e(a,l,c,u,d){u=u===void 0?0:u,d=d===void 0?0:d;var h=n(function(f,p){var m,y=[],b=p/o(f);for(m=0;m<f.length;m++)y[m]=f[m]*b;return y}(a,l*c),[],new t(u,d,l,c),[]);return function(f){var p,m,y=[];for(p=0;p<f.length;p++)for(m=0;m<f[p].length;m++)y.push(f[p][m]);return y}(h)}function n(a,l,c,u){var d,h,f;if(a.length!==0)return d=c.shortestEdge(),function(p,m,y){var b;if(p.length===0)return!0;(b=p.slice()).push(m);var k=i(p,y),C=i(b,y);return k>=C}(l,h=a[0],d)?(l.push(h),n(a.slice(1),l,c,u)):(f=c.cutArea(o(l),u),u.push(c.getCoordinates(l)),n(a,[],f,u)),u;u.push(c.getCoordinates(l))}function i(a,l){var c=Math.min.apply(Math,a),u=Math.max.apply(Math,a),d=o(a);return Math.max(Math.pow(l,2)*u/Math.pow(d,2),Math.pow(d,2)/(Math.pow(l,2)*c))}function s(a){return a&&a.constructor===Array}function o(a){var l,c=0;for(l=0;l<a.length;l++)c+=a[l];return c}function r(a){var l,c=0;if(s(a[0]))for(l=0;l<a.length;l++)c+=r(a[l]);else c=o(a);return c}return function a(l,c,u,d,h){d=d===void 0?0:d,h=h===void 0?0:h;var f,p,m=[],y=[];if(s(l[0])){for(p=0;p<l.length;p++)m[p]=r(l[p]);for(f=e(m,c,u,d,h),p=0;p<l.length;p++)y.push(a(l[p],f[p][2]-f[p][0],f[p][3]-f[p][1],f[p][0],f[p][1]))}else y=e(l,c,u,d,h);return y}}();var VCt=function(){function t(e,n){lt(this,t),this.ctx=e,this.w=e.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new VU(e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return ct(t,[{key:"draw",value:function(e){var n=this,i=this.w,s=new Be(this.ctx),o=new Dr(this.ctx),r=s.group({class:"apexcharts-treemap"});if(i.globals.noData)return r;var a=[];return e.forEach(function(l){var c=l.map(function(u){return Math.abs(u)});a.push(c)}),this.negRange=this.helpers.checkColorRange(),i.config.series.forEach(function(l,c){l.data.forEach(function(u){Array.isArray(n.labels[c])||(n.labels[c]=[]),n.labels[c].push(u.x)})}),window.TreemapSquared.generate(a,i.globals.gridWidth,i.globals.gridHeight).forEach(function(l,c){var u=s.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:pe.escapeString(i.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(i.config.chart.dropShadow.enabled){var d=i.config.chart.dropShadow;new ri(n.ctx).dropShadow(r,d,c)}var h=s.group({class:"apexcharts-data-labels"}),f={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};l.forEach(function(z,N){var q=z[0],K=z[1],X=z[2],U=z[3];f.xMin=Math.min(f.xMin,q),f.yMin=Math.min(f.yMin,K),f.xMax=Math.max(f.xMax,X),f.yMax=Math.max(f.yMax,U);var Q=n.helpers.getShadeColor(i.config.chart.type,c,N,n.negRange),ne=Q.color,Z=o.fillPath({color:ne,seriesNumber:c,dataPointIndex:N}),ae=s.drawRect(q,K,X-q,U-K,i.config.plotOptions.treemap.borderRadius,"#fff",1,n.strokeWidth,i.config.plotOptions.treemap.useFillColorAsStroke?ne:i.globals.stroke.colors[c]);ae.attr({cx:q,cy:K,index:c,i:c,j:N,width:X-q,height:U-K,fill:Z}),ae.node.classList.add("apexcharts-treemap-rect"),n.helpers.addListeners(ae);var me={x:q+(X-q)/2,y:K+(U-K)/2,width:0,height:0},we={x:q,y:K,width:X-q,height:U-K};if(i.config.chart.animations.enabled&&!i.globals.dataChanged){var oe=1;i.globals.resized||(oe=i.config.chart.animations.speed),n.animateTreemap(ae,me,we,oe)}if(i.globals.dataChanged){var fe=1;n.dynamicAnim.enabled&&i.globals.shouldAnimate&&(fe=n.dynamicAnim.speed,i.globals.previousPaths[c]&&i.globals.previousPaths[c][N]&&i.globals.previousPaths[c][N].rect&&(me=i.globals.previousPaths[c][N].rect),n.animateTreemap(ae,me,we,fe))}var ie=n.getFontSize(z),re=i.config.dataLabels.formatter(n.labels[c][N],{value:i.globals.series[c][N],seriesIndex:c,dataPointIndex:N,w:i});i.config.plotOptions.treemap.dataLabels.format==="truncate"&&(ie=parseInt(i.config.dataLabels.style.fontSize,10),re=n.truncateLabels(re,ie,q,K,X,U));var ke=null;i.globals.series[c][N]&&(ke=n.helpers.calculateDataLabels({text:re,x:(q+X)/2,y:(K+U)/2+n.strokeWidth/2+ie/3,i:c,j:N,colorProps:Q,fontSize:ie,series:e})),i.config.dataLabels.enabled&&ke&&n.rotateToFitLabel(ke,ie,re,q,K,X,U),u.add(ae),ke!==null&&u.add(ke)});var p=i.config.plotOptions.treemap.seriesTitle;if(i.config.series.length>1&&p&&p.show){var m=i.config.series[c].name||"";if(m&&f.xMin<1/0&&f.yMin<1/0){var y=p.offsetX,b=p.offsetY,k=p.borderColor,C=p.borderWidth,$=p.borderRadius,x=p.style,M=x.color||i.config.chart.foreColor,P={left:x.padding.left,right:x.padding.right,top:x.padding.top,bottom:x.padding.bottom},T=s.getTextRects(m,x.fontSize,x.fontFamily),I=T.width+P.left+P.right,L=T.height+P.top+P.bottom,R=f.xMin+(y||0),V=f.yMin+(b||0),H=s.drawRect(R,V,I,L,$,x.background,1,C,k),F=s.drawText({x:R+P.left,y:V+P.top+.75*T.height,text:m,fontSize:x.fontSize,fontFamily:x.fontFamily,fontWeight:x.fontWeight,foreColor:M,cssClass:x.cssClass||""});u.add(H),u.add(F)}}u.add(h),r.add(u)}),r}},{key:"getFontSize",value:function(e){var n=this.w,i=function s(o){var r,a=0;if(Array.isArray(o[0]))for(r=0;r<o.length;r++)a+=s(o[r]);else for(r=0;r<o.length;r++)a+=o[r].length;return a}(this.labels)/function s(o){var r,a=0;if(Array.isArray(o[0]))for(r=0;r<o.length;r++)a+=s(o[r]);else for(r=0;r<o.length;r++)a+=1;return a}(this.labels);return function(s,o){var r=s*o,a=Math.pow(r,.5);return Math.min(a/i,parseInt(n.config.dataLabels.style.fontSize,10))}(e[2]-e[0],e[3]-e[1])}},{key:"rotateToFitLabel",value:function(e,n,i,s,o,r,a){var l=new Be(this.ctx),c=l.getTextRects(i,n);if(c.width+this.w.config.stroke.width+5>r-s&&c.width<=a-o){var u=l.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(u.x," ").concat(u.y,") translate(").concat(c.height/3,")"))}}},{key:"truncateLabels",value:function(e,n,i,s,o,r){var a=new Be(this.ctx),l=a.getTextRects(e,n).width+this.w.config.stroke.width+5>o-i&&r-s>o-i?r-s:o-i,c=a.getTextBasedOnMaxWidth({text:e,maxWidth:l,fontSize:n});return e.length!==c.length&&l/n<5?"":c}},{key:"animateTreemap",value:function(e,n,i,s){var o=new wp(this.ctx);o.animateRect(e,n,i,s,function(){o.animationCompleted(e)})}}]),t}(),BU=86400,FCt=10/BU,NCt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return ct(t,[{key:"calculateTimeScaleTicks",value:function(e,n){var i=this,s=this.w;if(s.globals.allSeriesCollapsed)return s.globals.labels=[],s.globals.timescaleLabels=[],[];var o=new si(this.ctx),r=(n-e)/864e5;this.determineInterval(r),s.globals.disableZoomIn=!1,s.globals.disableZoomOut=!1,r<FCt?s.globals.disableZoomIn=!0:r>5e4&&(s.globals.disableZoomOut=!0);var a=o.getTimeUnitsfromTimestamp(e,n,this.utc),l=s.globals.gridWidth/r,c=l/24,u=c/60,d=u/60,h=Math.floor(24*r),f=Math.floor(1440*r),p=Math.floor(r*BU),m=Math.floor(r),y=Math.floor(r/30),b=Math.floor(r/365),k={minMillisecond:a.minMillisecond,minSecond:a.minSecond,minMinute:a.minMinute,minHour:a.minHour,minDate:a.minDate,minMonth:a.minMonth,minYear:a.minYear},C={firstVal:k,currentMillisecond:k.minMillisecond,currentSecond:k.minSecond,currentMinute:k.minMinute,currentHour:k.minHour,currentMonthDate:k.minDate,currentDate:k.minDate,currentMonth:k.minMonth,currentYear:k.minYear,daysWidthOnXAxis:l,hoursWidthOnXAxis:c,minutesWidthOnXAxis:u,secondsWidthOnXAxis:d,numberOfSeconds:p,numberOfMinutes:f,numberOfHours:h,numberOfDays:m,numberOfMonths:y,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(C);break;case"months":case"half_year":this.generateMonthScale(C);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(C);break;case"hours":this.generateHourScale(C);break;case"minutes_fives":case"minutes":this.generateMinuteScale(C);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(C)}var $=this.timeScaleArray.map(function(x){var M={position:x.position,unit:x.unit,year:x.year,day:x.day?x.day:1,hour:x.hour?x.hour:0,month:x.month+1};return x.unit==="month"?Je(Je({},M),{},{day:1,value:x.value+1}):x.unit==="day"||x.unit==="hour"?Je(Je({},M),{},{value:x.value}):x.unit==="minute"?Je(Je({},M),{},{value:x.value,minute:x.value}):x.unit==="second"?Je(Je({},M),{},{value:x.value,minute:x.minute,second:x.second}):x});return $.filter(function(x){var M=1,P=Math.ceil(s.globals.gridWidth/120),T=x.value;s.config.xaxis.tickAmount!==void 0&&(P=s.config.xaxis.tickAmount),$.length>P&&(M=Math.floor($.length/P));var I=!1,L=!1;switch(i.tickInterval){case"years":x.unit==="year"&&(I=!0);break;case"half_year":M=7,x.unit==="year"&&(I=!0);break;case"months":M=1,x.unit==="year"&&(I=!0);break;case"months_fortnight":M=15,x.unit!=="year"&&x.unit!=="month"||(I=!0),T===30&&(L=!0);break;case"months_days":M=10,x.unit==="month"&&(I=!0),T===30&&(L=!0);break;case"week_days":M=8,x.unit==="month"&&(I=!0);break;case"days":M=1,x.unit==="month"&&(I=!0);break;case"hours":x.unit==="day"&&(I=!0);break;case"minutes_fives":case"seconds_fives":T%5!=0&&(L=!0);break;case"seconds_tens":T%10!=0&&(L=!0)}if(i.tickInterval==="hours"||i.tickInterval==="minutes_fives"||i.tickInterval==="seconds_tens"||i.tickInterval==="seconds_fives"){if(!L)return!0}else if((T%M==0||I)&&!L)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(e,n){var i=this.w,s=this.formatDates(e),o=this.removeOverlappingTS(s);i.globals.timescaleLabels=o.slice(),new Vy(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var n=24*e,i=60*n;switch(!0){case e/365>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case n>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(e){var n=e.firstVal,i=e.currentMonth,s=e.currentYear,o=e.daysWidthOnXAxis,r=e.numberOfYears,a=n.minYear,l=0,c=new si(this.ctx),u="year";if(n.minDate>1||n.minMonth>0){var d=c.determineRemainingDaysOfYear(n.minYear,n.minMonth,n.minDate);l=(c.determineDaysOfYear(n.minYear)-d+1)*o,a=n.minYear+1,this.timeScaleArray.push({position:l,value:a,unit:u,year:a,month:pe.monthMod(i+1)})}else n.minDate===1&&n.minMonth===0&&this.timeScaleArray.push({position:l,value:a,unit:u,year:s,month:pe.monthMod(i+1)});for(var h=a,f=l,p=0;p<r;p++)h++,f=c.determineDaysOfYear(h-1)*o+f,this.timeScaleArray.push({position:f,value:h,unit:u,year:h,month:1})}},{key:"generateMonthScale",value:function(e){var n=e.firstVal,i=e.currentMonthDate,s=e.currentMonth,o=e.currentYear,r=e.daysWidthOnXAxis,a=e.numberOfMonths,l=s,c=0,u=new si(this.ctx),d="month",h=0;if(n.minDate>1){c=(u.determineDaysOfMonths(s+1,n.minYear)-i+1)*r,l=pe.monthMod(s+1);var f=o+h,p=pe.monthMod(l),m=l;l===0&&(d="year",m=f,p=1,f+=h+=1),this.timeScaleArray.push({position:c,value:m,unit:d,year:f,month:p})}else this.timeScaleArray.push({position:c,value:l,unit:d,year:o,month:pe.monthMod(s)});for(var y=l+1,b=c,k=0,C=1;k<a;k++,C++){(y=pe.monthMod(y))===0?(d="year",h+=1):d="month";var $=this._getYear(o,y,h);b=u.determineDaysOfMonths(y,$)*r+b;var x=y===0?$:y;this.timeScaleArray.push({position:b,value:x,unit:d,year:$,month:y===0?1:y}),y++}}},{key:"generateDayScale",value:function(e){var n=e.firstVal,i=e.currentMonth,s=e.currentYear,o=e.hoursWidthOnXAxis,r=e.numberOfDays,a=new si(this.ctx),l="day",c=n.minDate+1,u=c,d=function(C,$,x){return C>a.determineDaysOfMonths($+1,x)&&(u=1,l="month",f=$+=1),$},h=(24-n.minHour)*o,f=c,p=d(u,i,s);n.minHour===0&&n.minDate===1?(h=0,f=pe.monthMod(n.minMonth),l="month",u=n.minDate):n.minDate!==1&&n.minHour===0&&n.minMinute===0&&(h=0,c=n.minDate,f=c,p=d(u=c,i,s),f!==1&&(l="day")),this.timeScaleArray.push({position:h,value:f,unit:l,year:this._getYear(s,p,0),month:pe.monthMod(p),day:u});for(var m=h,y=0;y<r;y++){l="day",p=d(u+=1,p,this._getYear(s,p,0));var b=this._getYear(s,p,0);m=24*o+m;var k=u===1?pe.monthMod(p):u;this.timeScaleArray.push({position:m,value:k,unit:l,year:b,month:pe.monthMod(p),day:k})}}},{key:"generateHourScale",value:function(e){var n=e.firstVal,i=e.currentDate,s=e.currentMonth,o=e.currentYear,r=e.minutesWidthOnXAxis,a=e.numberOfHours,l=new si(this.ctx),c="hour",u=function(M,P){return M>l.determineDaysOfMonths(P+1,o)&&(y=1,P+=1),{month:P,date:y}},d=function(M,P){return M>l.determineDaysOfMonths(P+1,o)?P+=1:P},h=60-(n.minMinute+n.minSecond/60),f=h*r,p=n.minHour+1,m=p;h===60&&(f=0,m=p=n.minHour);var y=i;m>=24&&(m=0,c="day",p=y+=1);var b=u(y,s).month;b=d(y,b),p>31&&(p=y=1),this.timeScaleArray.push({position:f,value:p,unit:c,day:y,hour:m,year:o,month:pe.monthMod(b)}),m++;for(var k=f,C=0;C<a;C++){c="hour",m>=24&&(m=0,c="day",b=u(y+=1,b).month,b=d(y,b));var $=this._getYear(o,b,0);k=60*r+k;var x=m===0?y:m;this.timeScaleArray.push({position:k,value:x,unit:c,hour:m,day:y,year:$,month:pe.monthMod(b)}),m++}}},{key:"generateMinuteScale",value:function(e){for(var n=e.currentMillisecond,i=e.currentSecond,s=e.currentMinute,o=e.currentHour,r=e.currentDate,a=e.currentMonth,l=e.currentYear,c=e.minutesWidthOnXAxis,u=e.secondsWidthOnXAxis,d=e.numberOfMinutes,h=s+1,f=r,p=a,m=l,y=o,b=(60-i-n/1e3)*u,k=0;k<d;k++)h>=60&&(h=0,(y+=1)===24&&(y=0)),this.timeScaleArray.push({position:b,value:h,unit:"minute",hour:y,minute:h,day:f,year:this._getYear(m,p,0),month:pe.monthMod(p)}),b+=c,h++}},{key:"generateSecondScale",value:function(e){for(var n=e.currentMillisecond,i=e.currentSecond,s=e.currentMinute,o=e.currentHour,r=e.currentDate,a=e.currentMonth,l=e.currentYear,c=e.secondsWidthOnXAxis,u=e.numberOfSeconds,d=i+1,h=s,f=r,p=a,m=l,y=o,b=(1e3-n)/1e3*c,k=0;k<u;k++)d>=60&&(d=0,++h>=60&&(h=0,++y===24&&(y=0))),this.timeScaleArray.push({position:b,value:d,unit:"second",hour:y,minute:h,second:d,day:f,year:this._getYear(m,p,0),month:pe.monthMod(p)}),b+=c,d++}},{key:"createRawDateString",value:function(e,n){var i=e.year;return e.month===0&&(e.month=1),i+="-"+("0"+e.month.toString()).slice(-2),e.unit==="day"?i+=e.unit==="day"?"-"+("0"+n).slice(-2):"-01":i+="-"+("0"+(e.day?e.day:"1")).slice(-2),e.unit==="hour"?i+=e.unit==="hour"?"T"+("0"+n).slice(-2):"T00":i+="T"+("0"+(e.hour?e.hour:"0")).slice(-2),e.unit==="minute"?i+=":"+("0"+n).slice(-2):i+=":"+(e.minute?("0"+e.minute).slice(-2):"00"),e.unit==="second"?i+=":"+("0"+n).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(e){var n=this,i=this.w;return e.map(function(s){var o=s.value.toString(),r=new si(n.ctx),a=n.createRawDateString(s,o),l=r.getDate(r.parseDate(a));if(n.utc||(l=r.getDate(r.parseDateWithTimezone(a))),i.config.xaxis.labels.format===void 0){var c="dd MMM",u=i.config.xaxis.labels.datetimeFormatter;s.unit==="year"&&(c=u.year),s.unit==="month"&&(c=u.month),s.unit==="day"&&(c=u.day),s.unit==="hour"&&(c=u.hour),s.unit==="minute"&&(c=u.minute),s.unit==="second"&&(c=u.second),o=r.formatDate(l,c)}else o=r.formatDate(l,i.config.xaxis.labels.format);return{dateString:a,position:s.position,value:o,unit:s.unit,year:s.year,month:s.month}})}},{key:"removeOverlappingTS",value:function(e){var n,i=this,s=new Be(this.ctx),o=!1;e.length>0&&e[0].value&&e.every(function(l){return l.value.length===e[0].value.length})&&(o=!0,n=s.getTextRects(e[0].value).width);var r=0,a=e.map(function(l,c){if(c>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var u=o?n:s.getTextRects(e[r].value).width,d=e[r].position;return l.position>d+u+10?(r=c,l):null}return l});return a=a.filter(function(l){return l!==null})}},{key:"_getYear",value:function(e,n,i){return e+Math.floor(n/12)+i}}]),t}(),BCt=function(){function t(e,n){lt(this,t),this.ctx=n,this.w=n.w,this.el=e}return ct(t,[{key:"setupElements",value:function(){var e=this.w,n=e.globals,i=e.config,s=i.chart.type;n.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(s),n.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(s),n.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(s)&&i.plotOptions.bar.horizontal,n.chartClass=".apexcharts".concat(n.chartID),n.dom.baseEl=this.el,n.dom.elWrap=document.createElement("div"),Be.setAttrs(n.dom.elWrap,{id:n.chartClass.substring(1),class:"apexcharts-canvas ".concat(n.chartClass.substring(1))}),this.el.appendChild(n.dom.elWrap),n.dom.Paper=window.SVG().addTo(n.dom.elWrap),n.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),n.dom.Paper.node.style.background=i.theme.mode!=="dark"||i.chart.background?i.theme.mode!=="light"||i.chart.background?i.chart.background:"#fff":"#424242",this.setSVGDimensions(),n.dom.elLegendForeign=document.createElementNS(n.SVGNS,"foreignObject"),Be.setAttrs(n.dom.elLegendForeign,{x:0,y:0,width:n.svgWidth,height:n.svgHeight}),n.dom.elLegendWrap=document.createElement("div"),n.dom.elLegendWrap.classList.add("apexcharts-legend"),n.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),n.dom.elLegendForeign.appendChild(n.dom.elLegendWrap),n.dom.Paper.node.appendChild(n.dom.elLegendForeign),n.dom.elGraphical=n.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),n.dom.elDefs=n.dom.Paper.defs(),n.dom.Paper.add(n.dom.elGraphical),n.dom.elGraphical.add(n.dom.elDefs)}},{key:"plotChartType",value:function(e,n){var i=this.w,s=this.ctx,o=i.config,r=i.globals,a={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},column:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},l=o.chart.type||"line",c=null,u=0;r.series.forEach(function(M,P){var T=e[P].type||l;a[T]?(T==="rangeArea"?(a[T].series.push(r.seriesRangeStart[P]),a[T].seriesRangeEnd.push(r.seriesRangeEnd[P])):a[T].series.push(M),a[T].i.push(P),T!=="column"&&T!=="bar"||(i.globals.columnSeries=a.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(T)?c=T:T==="bar"?(a.column.series.push(M),a.column.i.push(P)):console.warn("You have specified an unrecognized series type (".concat(T,").")),l!==T&&T!=="scatter"&&u++}),u>0&&(c&&console.warn("Chart or series type ".concat(c," cannot appear with other chart or series types.")),a.column.series.length>0&&o.plotOptions.bar.horizontal&&(u-=a.column.series.length,a.column={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=u>0);var d=new T3(s,n),h=new E3(s,n);s.pie=new NU(s);var f=new PCt(s);s.rangeBar=new ICt(s,n);var p=new TCt(s),m=[];if(r.comboCharts){var y,b,k=new _s(s);if(a.area.series.length>0&&(y=m).push.apply(y,Ns(k.drawSeriesByGroup(a.area,r.areaGroups,"area",d))),a.column.series.length>0)if(o.chart.stacked){var C=new yT(s,n);m.push(C.draw(a.column.series,a.column.i))}else s.bar=new Wf(s,n),m.push(s.bar.draw(a.column.series,a.column.i));if(a.rangeArea.series.length>0&&m.push(d.draw(a.rangeArea.series,"rangeArea",a.rangeArea.i,a.rangeArea.seriesRangeEnd)),a.line.series.length>0&&(b=m).push.apply(b,Ns(k.drawSeriesByGroup(a.line,r.lineGroups,"line",d))),a.candlestick.series.length>0&&m.push(h.draw(a.candlestick.series,"candlestick",a.candlestick.i)),a.boxPlot.series.length>0&&m.push(h.draw(a.boxPlot.series,"boxPlot",a.boxPlot.i)),a.rangeBar.series.length>0&&m.push(s.rangeBar.draw(a.rangeBar.series,a.rangeBar.i)),a.scatter.series.length>0){var $=new T3(s,n,!0);m.push($.draw(a.scatter.series,"scatter",a.scatter.i))}if(a.bubble.series.length>0){var x=new T3(s,n,!0);m.push(x.draw(a.bubble.series,"bubble",a.bubble.i))}}else switch(o.chart.type){case"line":m=d.draw(r.series,"line");break;case"area":m=d.draw(r.series,"area");break;case"bar":o.chart.stacked?m=new yT(s,n).draw(r.series):(s.bar=new Wf(s,n),m=s.bar.draw(r.series));break;case"candlestick":m=new E3(s,n).draw(r.series,"candlestick");break;case"boxPlot":m=new E3(s,n).draw(r.series,o.chart.type);break;case"rangeBar":m=s.rangeBar.draw(r.series);break;case"rangeArea":m=d.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":m=new MCt(s,n).draw(r.series);break;case"treemap":m=new VCt(s,n).draw(r.series);break;case"pie":case"donut":case"polarArea":m=s.pie.draw(r.series);break;case"radialBar":m=f.draw(r.series);break;case"radar":m=p.draw(r.series);break;default:m=d.draw(r.series)}return m}},{key:"setSVGDimensions",value:function(){var e=this.w,n=e.globals,i=e.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",n.svgWidth=i.chart.width,n.svgHeight=i.chart.height;var s=pe.getDimensions(this.el),o=i.chart.width.toString().split(/[0-9]+/g).pop();o==="%"?pe.isNumber(s[0])&&(s[0].width===0&&(s=pe.getDimensions(this.el.parentNode)),n.svgWidth=s[0]*parseInt(i.chart.width,10)/100):o!=="px"&&o!==""||(n.svgWidth=parseInt(i.chart.width,10));var r=String(i.chart.height).toString().split(/[0-9]+/g).pop();if(n.svgHeight!=="auto"&&n.svgHeight!=="")if(r==="%"){var a=pe.getDimensions(this.el.parentNode);n.svgHeight=a[1]*parseInt(i.chart.height,10)/100}else n.svgHeight=parseInt(i.chart.height,10);else n.svgHeight=n.axisCharts?n.svgWidth/1.61:n.svgWidth/1.2;if(n.svgWidth=Math.max(n.svgWidth,0),n.svgHeight=Math.max(n.svgHeight,0),Be.setAttrs(n.dom.Paper.node,{width:n.svgWidth,height:n.svgHeight}),r!=="%"){var l=i.chart.sparkline.enabled?0:n.axisCharts?i.chart.parentHeightOffset:0;n.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(n.svgHeight+l,"px")}n.dom.elWrap.style.width="".concat(n.svgWidth,"px"),n.dom.elWrap.style.height="".concat(n.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals,n=e.translateY,i=e.translateX;Be.setAttrs(e.dom.elGraphical.node,{transform:"translate(".concat(i,", ").concat(n,")")})}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,n=e.globals,i=0,s=e.config.chart.sparkline.enabled?1:15;s+=e.config.grid.padding.bottom,["top","bottom"].includes(e.config.legend.position)&&e.config.legend.show&&!e.config.legend.floating&&(i=new LU(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var o=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*e.globals.radialSize;if(o&&!e.config.chart.sparkline.enabled&&e.config.plotOptions.radialBar.startAngle!==0){var a=pe.getBoundingClientRect(o);r=a.bottom;var l=a.bottom-a.top;r=Math.max(2.05*e.globals.radialSize,l)}var c=Math.ceil(r+n.translateY+i+s);n.dom.elLegendForeign&&n.dom.elLegendForeign.setAttribute("height",c),e.config.chart.height&&String(e.config.chart.height).includes("%")||(n.dom.elWrap.style.height="".concat(c,"px"),Be.setAttrs(n.dom.Paper.node,{height:c}),n.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(c,"px"))}},{key:"coreCalculations",value:function(){new CC(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,n=function(){return e.w.config.series.map(function(){return[]})},i=new MU,s=this.w.globals;i.initGlobalVars(s),s.seriesXvalues=n(),s.seriesYvalues=n()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var e=this.w,n=null;if(e.globals.axisCharts){if(e.config.xaxis.crosshairs.position==="back"&&new xC(this.ctx).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position==="back"&&new xC(this.ctx).drawYCrosshairs(),e.config.xaxis.type==="datetime"&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new NCt(this.ctx);var i=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}n=new _s(this.ctx).getCalculatedRatios()}return n}},{key:"updateSourceChart",value:function(e){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var e=this,n=this.ctx,i=this.w;if(i.config.chart.brush.enabled&&typeof i.config.chart.events.selection!="function"){var s=Array.isArray(i.config.chart.brush.targets)?i.config.chart.brush.targets:[i.config.chart.brush.target];s.forEach(function(o){var r=n.constructor.getChartByID(o);r.w.globals.brushSource=e.ctx,typeof r.w.config.chart.events.zoomed!="function"&&(r.w.config.chart.events.zoomed=function(){return e.updateSourceChart(r)}),typeof r.w.config.chart.events.scrolled!="function"&&(r.w.config.chart.events.scrolled=function(){return e.updateSourceChart(r)})}),i.config.chart.events.selection=function(o,r){s.forEach(function(a){n.constructor.getChartByID(a).ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max}},!1,!1,!1,!1)})}}}}]),t}(),zCt=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"_updateOptions",value:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],o=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],r=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return new Promise(function(a){var l=[n.ctx];o&&(l=n.ctx.getSyncedCharts()),n.ctx.w.globals.isExecCalled&&(l=[n.ctx],n.ctx.w.globals.isExecCalled=!1),l.forEach(function(c,u){var d=c.w;if(d.globals.shouldAnimate=s,i||(d.globals.resized=!0,d.globals.dataChanged=!0,s&&c.series.getPreviousPaths()),e&&Uf(e)==="object"&&(c.config=new s1(e),e=_s.extendArrayProps(c.config,e,d),c.w.globals.chartID!==n.ctx.w.globals.chartID&&delete e.series,d.config=pe.extend(d.config,e),r&&(d.globals.lastXAxis=e.xaxis?pe.clone(e.xaxis):[],d.globals.lastYAxis=e.yaxis?pe.clone(e.yaxis):[],d.globals.initialConfig=pe.extend({},d.config),d.globals.initialSeries=pe.clone(d.config.series),e.series))){for(var h=0;h<d.globals.collapsedSeriesIndices.length;h++){var f=d.config.series[d.globals.collapsedSeriesIndices[h]];d.globals.collapsedSeries[h].data=d.globals.axisCharts?f.data.slice():f}for(var p=0;p<d.globals.ancillaryCollapsedSeriesIndices.length;p++){var m=d.config.series[d.globals.ancillaryCollapsedSeriesIndices[p]];d.globals.ancillaryCollapsedSeries[p].data=d.globals.axisCharts?m.data.slice():m}c.series.emptyCollapsedSeries(d.config.series)}return c.update(e).then(function(){u===l.length-1&&a(c)})})})}},{key:"_updateSeries",value:function(e,n){var i=this,s=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return new Promise(function(o){var r,a=i.w;return a.globals.shouldAnimate=n,a.globals.dataChanged=!0,n&&i.ctx.series.getPreviousPaths(),a.globals.axisCharts?((r=e.map(function(l,c){return i._extendSeries(l,c)})).length===0&&(r=[{data:[]}]),a.config.series=r):a.config.series=e.slice(),s&&(a.globals.initialConfig.series=pe.clone(a.config.series),a.globals.initialSeries=pe.clone(a.config.series)),i.ctx.update().then(function(){o(i.ctx)})})}},{key:"_extendSeries",value:function(e,n){var i=this.w,s=i.config.series[n];return Je(Je({},i.config.series[n]),{},{name:e.name?e.name:s==null?void 0:s.name,color:e.color?e.color:s==null?void 0:s.color,type:e.type?e.type:s==null?void 0:s.type,group:e.group?e.group:s==null?void 0:s.group,hidden:e.hidden!==void 0?e.hidden:s==null?void 0:s.hidden,data:e.data?e.data:s==null?void 0:s.data,zIndex:e.zIndex!==void 0?e.zIndex:n})}},{key:"toggleDataPointSelection",value:function(e,n){var i=this.w,s=null,o=".apexcharts-series[data\\:realIndex='".concat(e,"']");return i.globals.axisCharts?s=i.globals.dom.Paper.findOne("".concat(o," path[j='").concat(n,"'], ").concat(o," circle[j='").concat(n,"'], ").concat(o," rect[j='").concat(n,"']")):n===void 0&&(s=i.globals.dom.Paper.findOne("".concat(o," path[j='").concat(e,"']")),i.config.chart.type!=="pie"&&i.config.chart.type!=="polarArea"&&i.config.chart.type!=="donut"||this.ctx.pie.pieClicked(e)),s?(new Be(this.ctx).pathMouseDown(s,null),s.node?s.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var n=this.w;if(["min","max"].forEach(function(s){e.xaxis[s]!==void 0&&(n.config.xaxis[s]=e.xaxis[s],n.globals.lastXAxis[s]=e.xaxis[s])}),e.xaxis.categories&&e.xaxis.categories.length&&(n.config.xaxis.categories=e.xaxis.categories),n.config.xaxis.convertedCatToNumeric){var i=new n1(e);e=i.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){return e.chart&&e.chart.stacked&&e.chart.stackType==="100%"&&(Array.isArray(e.yaxis)?e.yaxis.forEach(function(n,i){e.yaxis[i].min=0,e.yaxis[i].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"revertDefaultAxisMinMax",value:function(e){var n=this,i=this.w,s=i.globals.lastXAxis,o=i.globals.lastYAxis;e&&e.xaxis&&(s=e.xaxis),e&&e.yaxis&&(o=e.yaxis),i.config.xaxis.min=s.min,i.config.xaxis.max=s.max;var r=function(a){o[a]!==void 0&&(i.config.yaxis[a].min=o[a].min,i.config.yaxis[a].max=o[a].max)};i.config.yaxis.map(function(a,l){i.globals.zoomed||o[l]!==void 0?r(l):n.ctx.opts.yaxis[l]!==void 0&&(a.min=n.ctx.opts.yaxis[l].min,a.max=n.ctx.opts.yaxis[l].max)})}}]),t}();(function(){function t(){for(var o=arguments.length>0&&arguments[0]!==d?arguments[0]:[],r=arguments.length>1?arguments[1]:d,a=arguments.length>2?arguments[2]:d,l=arguments.length>3?arguments[3]:d,c=arguments.length>4?arguments[4]:d,u=arguments.length>5?arguments[5]:d,d=arguments.length>6?arguments[6]:d,h=o.slice(r,a||d),f=l.slice(c,u||d),p=0,m={pos:[0,0],start:[0,0]},y={pos:[0,0],start:[0,0]};h[p]=e.call(m,h[p]),f[p]=e.call(y,f[p]),h[p][0]!=f[p][0]||h[p][0]=="M"||h[p][0]=="A"&&(h[p][4]!=f[p][4]||h[p][5]!=f[p][5])?(Array.prototype.splice.apply(h,[p,1].concat(i.call(m,h[p]))),Array.prototype.splice.apply(f,[p,1].concat(i.call(y,f[p])))):(h[p]=n.call(m,h[p]),f[p]=n.call(y,f[p])),!(++p==h.length&&p==f.length);)p==h.length&&h.push(["C",m.pos[0],m.pos[1],m.pos[0],m.pos[1],m.pos[0],m.pos[1]]),p==f.length&&f.push(["C",y.pos[0],y.pos[1],y.pos[0],y.pos[1],y.pos[0],y.pos[1]]);return{start:h,dest:f}}function e(o){switch(o[0]){case"z":case"Z":o[0]="L",o[1]=this.start[0],o[2]=this.start[1];break;case"H":o[0]="L",o[2]=this.pos[1];break;case"V":o[0]="L",o[2]=o[1],o[1]=this.pos[0];break;case"T":o[0]="Q",o[3]=o[1],o[4]=o[2],o[1]=this.reflection[1],o[2]=this.reflection[0];break;case"S":o[0]="C",o[6]=o[4],o[5]=o[3],o[4]=o[2],o[3]=o[1],o[2]=this.reflection[1],o[1]=this.reflection[0]}return o}function n(o){var r=o.length;return this.pos=[o[r-2],o[r-1]],"SCQT".indexOf(o[0])!=-1&&(this.reflection=[2*this.pos[0]-o[r-4],2*this.pos[1]-o[r-3]]),o}function i(o){var r=[o];switch(o[0]){case"M":return this.pos=this.start=[o[1],o[2]],r;case"L":o[5]=o[3]=o[1],o[6]=o[4]=o[2],o[1]=this.pos[0],o[2]=this.pos[1];break;case"Q":o[6]=o[4],o[5]=o[3],o[4]=1*o[4]/3+2*o[2]/3,o[3]=1*o[3]/3+2*o[1]/3,o[2]=1*this.pos[1]/3+2*o[2]/3,o[1]=1*this.pos[0]/3+2*o[1]/3;break;case"A":r=function(a,l){var c,u,d,h,f,p,m,y,b,k,C,$,x,M,P,T,I,L,R,V,H,F,z,N,q,K,X=Math.abs(l[1]),U=Math.abs(l[2]),Q=l[3]%360,ne=l[4],Z=l[5],ae=l[6],me=l[7],we=new Dn(a),oe=new Dn(ae,me),fe=[];if(X===0||U===0||we.x===oe.x&&we.y===oe.y)return[["C",we.x,we.y,oe.x,oe.y,oe.x,oe.y]];for(c=new Dn((we.x-oe.x)/2,(we.y-oe.y)/2).transform(new ln().rotate(Q)),u=c.x*c.x/(X*X)+c.y*c.y/(U*U),u>1&&(X*=u=Math.sqrt(u),U*=u),d=new ln().rotate(Q).scale(1/X,1/U).rotate(-Q),we=we.transform(d),oe=oe.transform(d),h=[oe.x-we.x,oe.y-we.y],p=h[0]*h[0]+h[1]*h[1],f=Math.sqrt(p),h[0]/=f,h[1]/=f,m=p<4?Math.sqrt(1-p/4):0,ne===Z&&(m*=-1),y=new Dn((oe.x+we.x)/2+m*-h[1],(oe.y+we.y)/2+m*h[0]),b=new Dn(we.x-y.x,we.y-y.y),k=new Dn(oe.x-y.x,oe.y-y.y),C=Math.acos(b.x/Math.sqrt(b.x*b.x+b.y*b.y)),b.y<0&&(C*=-1),$=Math.acos(k.x/Math.sqrt(k.x*k.x+k.y*k.y)),k.y<0&&($*=-1),Z&&C>$&&($+=2*Math.PI),!Z&&C<$&&($-=2*Math.PI),M=Math.ceil(2*Math.abs(C-$)/Math.PI),T=[],I=C,x=($-C)/M,P=4*Math.tan(x/4)/3,H=0;H<=M;H++)R=Math.cos(I),L=Math.sin(I),V=new Dn(y.x+R,y.y+L),T[H]=[new Dn(V.x+P*L,V.y-P*R),V,new Dn(V.x-P*L,V.y+P*R)],I+=x;for(T[0][0]=T[0][1].clone(),T[T.length-1][2]=T[T.length-1][1].clone(),d=new ln().rotate(Q).scale(X,U).rotate(-Q),H=0,F=T.length;H<F;H++)T[H][0]=T[H][0].transform(d),T[H][1]=T[H][1].transform(d),T[H][2]=T[H][2].transform(d);for(H=1,F=T.length;H<F;H++)z=(V=T[H-1][2]).x,N=V.y,q=(V=T[H][0]).x,K=V.y,ae=(V=T[H][1]).x,me=V.y,fe.push(["C",z,N,q,K,ae,me]);return fe}(this.pos,o),o=r[0]}return o[0]="C",this.pos=[o[5],o[6]],this.reflection=[2*o[5]-o[3],2*o[6]-o[4]],r}function s(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;if(r===!1)return!1;for(var a=r,l=o.length;a<l;++a)if(o[a][0]=="M")return a;return!1}At($r,{morph:function(o,r,a,l,c){for(var u=this.parse(o),d=this.parse(r),h=0,f=0,p=!1,m=!1;h!==!1||f!==!1;){var y;p=s(u,h!==!1&&h+1),m=s(d,f!==!1&&f+1),h===!1&&(h=(y=new $r(b.start).bbox()).height==0||y.width==0?u.push(u[0])-1:u.push(["M",y.x+y.width/2,y.y+y.height/2])-1),f===!1&&(f=(y=new $r(b.dest).bbox()).height==0||y.width==0?d.push(d[0])-1:d.push(["M",y.x+y.width/2,y.y+y.height/2])-1);var b=t(u,h,p,d,f,m);u=u.slice(0,h).concat(b.start,p===!1?[]:u.slice(p)),d=d.slice(0,f).concat(b.dest,m===!1?[]:d.slice(m)),h=p!==!1&&h+b.start.length,f=m!==!1&&f+b.dest.length}this._array=u,this.destination=new $r,this.destination._array=d;var k=this.fromArray(u.map(function(C,$){var x=d[$].map(function(M,P){return P===0?M:l.step(C[P],d[$][P],a,c[$],c)});return x}));return k}})})();const bT=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class HCt{constructor(e){e.remember("_draggable",this),this.el=e,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(e){e?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(e){const n=!e.type.indexOf("mouse");if(n&&e.which!==1&&e.buttons!==0||this.el.dispatch("beforedrag",{event:e,handler:this}).defaultPrevented)return;e.preventDefault(),e.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point(bT(e));const i=(n?"mouseup":"touchend")+".drag";Ka(window,(n?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),Ka(window,i,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:e,handler:this,box:this.box})}drag(e){const{box:n,lastClick:i}=this,s=this.el.point(bT(e)),o=s.x-i.x,r=s.y-i.y;if(!o&&!r)return n;const a=n.x+o,l=n.y+r;this.box=new Ws(a,l,n.w,n.h),this.lastClick=s,this.el.dispatch("dragmove",{event:e,handler:this,box:this.box}).defaultPrevented||this.move(a,l)}move(e,n){this.el.type==="svg"?Cc.prototype.move.call(this.el,e,n):this.el.move(e,n)}endDrag(e){this.drag(e),this.el.fire("dragend",{event:e,handler:this,box:this.box}),sr(window,"mousemove.drag"),sr(window,"touchmove.drag"),sr(window,"mouseup.drag"),sr(window,"touchend.drag"),this.init(!0)}}/*!
* @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse
* @version 4.0.1
* https://github.com/svgdotjs/svg.select.js
*
* @copyright Ulrich-Matthias Schäfer
* @license MIT
*
* BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time)
*/function SC(t,e,n,i=null){return function(s){s.preventDefault(),s.stopPropagation();var o=s.pageX||s.touches[0].pageX,r=s.pageY||s.touches[0].pageY;e.fire(t,{x:o,y:r,event:s,index:i,points:n})}}function $C([t,e],{a:n,b:i,c:s,d:o,e:r,f:a}){return[t*n+e*s+r,t*i+e*o+a]}At(ui,{draggable(t=!0){return(this.remember("_draggable")||new HCt(this)).init(t),this}});let zU=class{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new Cc,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=ev();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.createRot=t.createRot||this.createRotFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.updateRot=t.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach((t,e,n)=>{const i=this.order[e];this.createHandle.call(this,this.selection,t,e,n,i),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+i).on("mousedown.selection touchstart.selection",SC(i,this.el,this.handlePoints,e))})}createHandleFn(t){t.polyline()}updateHandleFn(t,e,n,i){const s=i.at(n-1),o=i[(n+1)%i.length],r=e,a=[r[0]-s[0],r[1]-s[1]],l=[r[0]-o[0],r[1]-o[1]],c=Math.sqrt(a[0]*a[0]+a[1]*a[1]),u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[a[0]/c,a[1]/c],h=[l[0]/u,l[1]/u],f=[r[0]-10*d[0],r[1]-10*d[1]],p=[r[0]-10*h[0],r[1]-10*h[1]];t.plot([f,r,p])}updateResizeHandles(){this.handlePoints.forEach((t,e,n)=>{const i=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,n,i)})}createRotFn(t){t.line(),t.circle(5)}getPoint(t){return this.handlePoints[this.order.indexOf(t)]}getPointHandle(t){return this.selection.get(this.order.indexOf(t)+1)}updateRotFn(t,e){const n=this.getPoint("t");t.get(0).plot(n[0],n[1],e[0],e[1]),t.get(1).center(e[0],e[1])}createRotationHandle(){const t=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",SC("rot",this.el,this.handlePoints));this.createRot.call(this,t)}updateRotationHandle(){const t=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(t,this.rotationPoint,this.handlePoints)}updatePoints(){const t=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(t).map(n=>$C(n,e)),this.rotationPoint=$C(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:n,y2:i,cx:s,cy:o}=this.el.bbox()){return[[t,n],[s,n],[e,n],[e,o],[e,i],[s,i],[t,i],[t,o]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}};const wT=t=>function(e=!0,n={}){typeof e=="object"&&(n=e,e=!0);let i=this.remember("_"+t.name);return i||(e.prototype instanceof zU?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,n),this};/*!
* @svgdotjs/svg.resize.js - An extension for svg.js which allows to resize elements which are selected
* @version 2.0.4
* https://github.com/svgdotjs/svg.resize.js
*
* @copyright [object Object]
* @license MIT
*
* BUILT: Fri Sep 13 2024 12:43:14 GMT+0200 (Central European Summer Time)
*//*!
* @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse
* @version 4.0.1
* https://github.com/svgdotjs/svg.select.js
*
* @copyright Ulrich-Matthias Schäfer
* @license MIT
*
* BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time)
*/function AC(t,e,n,i=null){return function(s){s.preventDefault(),s.stopPropagation();var o=s.pageX||s.touches[0].pageX,r=s.pageY||s.touches[0].pageY;e.fire(t,{x:o,y:r,event:s,index:i,points:n})}}function EC([t,e],{a:n,b:i,c:s,d:o,e:r,f:a}){return[t*n+e*s+r,t*i+e*o+a]}At(ui,{select:wT(zU)}),At([Du,Ru,Ou],{pointSelect:wT(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new Cc,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=ev();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach((t,e,n)=>{this.createHandle.call(this,this.selection,t,e,n),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",SC("point",this.el,this.points,e))})}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach((t,e,n)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,n)})}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map(e=>$C(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class HU{constructor(e){this.el=e,e.remember("_selectHandler",this),this.selection=new Cc,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const n=ev();this.observer=new n.MutationObserver(this.mutationHandler)}init(e){this.createHandle=e.createHandle||this.createHandleFn,this.createRot=e.createRot||this.createRotFn,this.updateHandle=e.updateHandle||this.updateHandleFn,this.updateRot=e.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(e,n){if(!e)return this.selection.clear().remove(),void this.observer.disconnect();this.init(n)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach((e,n,i)=>{const s=this.order[n];this.createHandle.call(this,this.selection,e,n,i,s),this.selection.get(n+1).addClass("svg_select_handle svg_select_handle_"+s).on("mousedown.selection touchstart.selection",AC(s,this.el,this.handlePoints,n))})}createHandleFn(e){e.polyline()}updateHandleFn(e,n,i,s){const o=s.at(i-1),r=s[(i+1)%s.length],a=n,l=[a[0]-o[0],a[1]-o[1]],c=[a[0]-r[0],a[1]-r[1]],u=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=Math.sqrt(c[0]*c[0]+c[1]*c[1]),h=[l[0]/u,l[1]/u],f=[c[0]/d,c[1]/d],p=[a[0]-10*h[0],a[1]-10*h[1]],m=[a[0]-10*f[0],a[1]-10*f[1]];e.plot([p,a,m])}updateResizeHandles(){this.handlePoints.forEach((e,n,i)=>{const s=this.order[n];this.updateHandle.call(this,this.selection.get(n+1),e,n,i,s)})}createRotFn(e){e.line(),e.circle(5)}getPoint(e){return this.handlePoints[this.order.indexOf(e)]}getPointHandle(e){return this.selection.get(this.order.indexOf(e)+1)}updateRotFn(e,n){const i=this.getPoint("t");e.get(0).plot(i[0],i[1],n[0],n[1]),e.get(1).center(n[0],n[1])}createRotationHandle(){const e=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",AC("rot",this.el,this.handlePoints));this.createRot.call(this,e)}updateRotationHandle(){const e=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(e,this.rotationPoint,this.handlePoints)}updatePoints(){const e=this.el.bbox(),n=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(e).map(i=>EC(i,n)),this.rotationPoint=EC(this.getRotationPoint(e),n)}getHandlePoints({x:e,x2:n,y:i,y2:s,cx:o,cy:r}=this.el.bbox()){return[[e,i],[o,i],[n,i],[n,r],[n,s],[o,s],[e,s],[e,r]]}getRotationPoint({y:e,cx:n}=this.el.bbox()){return[n,e-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const kT=t=>function(e=!0,n={}){typeof e=="object"&&(n=e,e=!0);let i=this.remember("_"+t.name);return i||(e.prototype instanceof HU?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,n),this};At(ui,{select:kT(HU)}),At([Du,Ru,Ou],{pointSelect:kT(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new Cc,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=ev();this.observer=new e.MutationObserver(this.mutationHandler)}init(t){this.createHandle=t.createHandle||this.createHandleFn,this.updateHandle=t.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(t,e){if(!t)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach((t,e,n)=>{this.createHandle.call(this,this.selection,t,e,n),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",AC("point",this.el,this.points,e))})}createHandleFn(t){t.circle(5)}updateHandleFn(t,e){t.center(e[0],e[1])}updatePointHandles(){this.points.forEach((t,e,n)=>{this.updateHandle.call(this,this.selection.get(e+1),t,e,n)})}updatePoints(){const t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map(e=>EC(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const e0=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),CT=t=>{let e=1/0,n=1/0,i=-1/0,s=-1/0;for(let o=0;o<t.length;o++){const r=t[o];e=Math.min(e,r[0]),n=Math.min(n,r[1]),i=Math.max(i,r[0]),s=Math.max(s,r[1])}return new Ws(e,n,i-e,s-n)};class xT{constructor(e){this.el=e,e.remember("_ResizeHandler",this),this.lastCoordinates=null,this.eventType="",this.lastEvent=null,this.handleResize=this.handleResize.bind(this),this.resize=this.resize.bind(this),this.endResize=this.endResize.bind(this),this.rotate=this.rotate.bind(this),this.movePoint=this.movePoint.bind(this)}active(e,n){this.preserveAspectRatio=n.preserveAspectRatio??!1,this.aroundCenter=n.aroundCenter??!1,this.grid=n.grid??0,this.degree=n.degree??0,this.el.off(".resize"),e&&(this.el.on(["lt.resize","rt.resize","rb.resize","lb.resize","t.resize","r.resize","b.resize","l.resize","rot.resize","point.resize"],this.handleResize),this.lastEvent&&(this.eventType==="rot"?this.rotate(this.lastEvent):this.eventType==="point"?this.movePoint(this.lastEvent):this.resize(this.lastEvent)))}handleResize(e){this.eventType=e.type;const{event:n,index:i,points:s}=e.detail,o=!n.type.indexOf("mouse");if(o&&(n.which||n.buttons)!==1||this.el.dispatch("beforeresize",{event:e,handler:this}).defaultPrevented)return;this.box=this.el.bbox(),this.startPoint=this.el.point(e0(n)),this.index=i,this.points=s.slice();const r=(o?"mousemove":"touchmove")+".resize",a=(o?"mouseup":"touchcancel.resize touchend")+".resize";e.type==="point"?Ka(window,r,this.movePoint):e.type==="rot"?Ka(window,r,this.rotate):Ka(window,r,this.resize),Ka(window,a,this.endResize)}resize(e){this.lastEvent=e;const n=this.snapToGrid(this.el.point(e0(e)));let i=n.x-this.startPoint.x,s=n.y-this.startPoint.y;this.preserveAspectRatio&&this.aroundCenter&&(i*=2,s*=2);const o=this.box.x+i,r=this.box.y+s,a=this.box.x2+i,l=this.box.y2+s;let c=new Ws(this.box);if(this.eventType.includes("l")&&(c.x=Math.min(o,this.box.x2),c.x2=Math.max(o,this.box.x2)),this.eventType.includes("r")&&(c.x=Math.min(a,this.box.x),c.x2=Math.max(a,this.box.x)),this.eventType.includes("t")&&(c.y=Math.min(r,this.box.y2),c.y2=Math.max(r,this.box.y2)),this.eventType.includes("b")&&(c.y=Math.min(l,this.box.y),c.y2=Math.max(l,this.box.y)),c.width=c.x2-c.x,c.height=c.y2-c.y,this.preserveAspectRatio){const u=c.width/this.box.width,d=c.height/this.box.height,h=["lt","t","rt","r","rb","b","lb","l"],f=(h.indexOf(this.eventType)+4)%h.length,p=this.aroundCenter?[this.box.cx,this.box.cy]:this.points[f];let m=this.eventType.includes("t")||this.eventType.includes("b")?d:u;m=this.eventType.length===2?Math.max(u,d):m,c=function(y,b,k){const C=[[y.x,y.y],[y.x+y.width,y.y],[y.x+y.width,y.y+y.height],[y.x,y.y+y.height]].map(([$,x])=>{const M=$-b[0],P=(x-b[1])*k;return[M*k+b[0],P+b[1]]});return CT(C)}(this.box,p,m)}this.el.dispatch("resize",{box:new Ws(c),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.size(c.width,c.height).move(c.x,c.y)}movePoint(e){this.lastEvent=e;const{x:n,y:i}=this.snapToGrid(this.el.point(e0(e))),s=this.el.array().slice();s[this.index]=[n,i],this.el.dispatch("resize",{box:CT(s),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.plot(s)}rotate(e){this.lastEvent=e;const n=this.startPoint,i=this.el.point(e0(e)),{cx:s,cy:o}=this.box,r=n.x-s,a=n.y-o,l=i.x-s,c=i.y-o,u=Math.sqrt(r*r+a*a)*Math.sqrt(l*l+c*c);if(u===0)return;let d=Math.acos((r*l+a*c)/u)/Math.PI*180;if(!d)return;i.x<n.x&&(d=-d);const h=new ln(this.el),{x:f,y:p}=new Dn(s,o).transformO(h),{rotate:m}=h.decompose(),y=this.snapToAngle(m+d)-m;this.el.dispatch("resize",{box:this.box,angle:y,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.transform(h.rotateO(y,f,p))}endResize(e){this.eventType!=="rot"&&this.eventType!=="point"&&this.resize(e),this.lastEvent=null,this.eventType="",sr(window,"mousemove.resize touchmove.resize"),sr(window,"mouseup.resize touchend.resize")}snapToGrid(e){return this.grid&&(e.x=Math.round(e.x/this.grid)*this.grid,e.y=Math.round(e.y/this.grid)*this.grid),e}snapToAngle(e){return this.degree&&(e=Math.round(e/this.degree)*this.degree),e}}At(ui,{resize:function(t=!0,e={}){typeof t=="object"&&(e=t,t=!0);let n=this.remember("_ResizeHandler");return n||(t.prototype instanceof xT?(n=new t(this),t=!0):n=new xT(this),this.remember("_resizeHandler",n)),n.active(t,e),this}}),window.SVG===void 0&&(window.SVG=sCt),window.Apex===void 0&&(window.Apex={});var ST=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"initModules",value:function(){this.ctx.publicMethods=["updateOptions","updateSeries","appendData","appendSeries","isSeriesHidden","highlightSeries","toggleSeries","showSeries","hideSeries","setLocale","resetSeries","zoomX","toggleDataPointSelection","dataURI","exportToCSV","addXaxisAnnotation","addYaxisAnnotation","addPointAnnotation","clearAnnotations","removeAnnotation","paper","destroy"],this.ctx.eventList=["click","mousedown","mousemove","mouseleave","touchstart","touchmove","touchleave","mouseup","touchend"],this.ctx.animations=new wp(this.ctx),this.ctx.axes=new fCt(this.ctx),this.ctx.core=new BCt(this.ctx.el,this.ctx),this.ctx.config=new s1({}),this.ctx.data=new wS(this.ctx),this.ctx.grid=new PU(this.ctx),this.ctx.graphics=new Be(this.ctx),this.ctx.coreUtils=new _s(this.ctx),this.ctx.crosshairs=new xC(this.ctx),this.ctx.events=new dCt(this.ctx),this.ctx.exports=new Ry(this.ctx),this.ctx.fill=new Dr(this.ctx),this.ctx.localization=new hCt(this.ctx),this.ctx.options=new xu,this.ctx.responsive=new pCt(this.ctx),this.ctx.series=new lr(this.ctx),this.ctx.theme=new mCt(this.ctx),this.ctx.formatters=new sv(this.ctx),this.ctx.titleSubtitle=new gCt(this.ctx),this.ctx.legend=new LU(this.ctx),this.ctx.toolbar=new OU(this.ctx),this.ctx.tooltip=new _T(this.ctx),this.ctx.dimensions=new Vy(this.ctx),this.ctx.updateHelpers=new zCt(this.ctx),this.ctx.zoomPanSelection=new kCt(this.ctx),this.ctx.w.globals.tooltip=new _T(this.ctx)}}]),t}(),$T=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w}return ct(t,[{key:"clear",value:function(e){var n=e.isUpdating;this.ctx.zoomPanSelection&&this.ctx.zoomPanSelection.destroy(),this.ctx.toolbar&&this.ctx.toolbar.destroy(),this.ctx.animations=null,this.ctx.axes=null,this.ctx.annotations=null,this.ctx.core=null,this.ctx.data=null,this.ctx.grid=null,this.ctx.series=null,this.ctx.responsive=null,this.ctx.theme=null,this.ctx.formatters=null,this.ctx.titleSubtitle=null,this.ctx.legend=null,this.ctx.dimensions=null,this.ctx.options=null,this.ctx.crosshairs=null,this.ctx.zoomPanSelection=null,this.ctx.updateHelpers=null,this.ctx.toolbar=null,this.ctx.localization=null,this.ctx.w.globals.tooltip=null,this.clearDomElements({isUpdating:n})}},{key:"killSVG",value:function(e){e.each(function(){this.removeClass("*"),this.off()},!0),e.clear()}},{key:"clearDomElements",value:function(e){var n=this,i=e.isUpdating,s=this.w.globals.dom.Paper.node;s.parentNode&&s.parentNode.parentNode&&!i&&(s.parentNode.parentNode.style.minHeight="unset");var o=this.w.globals.dom.baseEl;o&&this.ctx.eventList.forEach(function(a){o.removeEventListener(a,n.ctx.events.documentEvent)});var r=this.w.globals.dom;if(this.ctx.el!==null)for(;this.ctx.el.firstChild;)this.ctx.el.removeChild(this.ctx.el.firstChild);this.killSVG(r.Paper),r.Paper.remove(),r.elWrap=null,r.elGraphical=null,r.elLegendWrap=null,r.elLegendForeign=null,r.baseEl=null,r.elGridRect=null,r.elGridRectMask=null,r.elGridRectBarMask=null,r.elGridRectMarkerMask=null,r.elForecastMask=null,r.elNonForecastMask=null,r.elDefs=null}}]),t}(),P3=new WeakMap,AT=function(){function t(e,n){lt(this,t),this.opts=n,this.ctx=this,this.w=new uCt(n).init(),this.el=e,this.w.globals.cuid=pe.randomId(),this.w.globals.chartID=this.w.config.chart.id?pe.escapeString(this.w.config.chart.id):this.w.globals.cuid,new ST(this).initModules(),this.create=pe.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return ct(t,[{key:"render",value:function(){var e=this;return new Promise(function(n,i){if(pe.elementExists(e.el)){Apex._chartInstances===void 0&&(Apex._chartInstances=[]),e.w.config.chart.id&&Apex._chartInstances.push({id:e.w.globals.chartID,group:e.w.config.chart.group,chart:e}),e.setLocale(e.w.config.chart.defaultLocale);var s=e.w.config.chart.events.beforeMount;typeof s=="function"&&s(e,e.w),e.events.fireEvent("beforeMount",[e,e.w]),window.addEventListener("resize",e.windowResizeHandler),function(h,f){var p=!1;if(h.nodeType!==Node.DOCUMENT_FRAGMENT_NODE){var m=h.getBoundingClientRect();h.style.display!=="none"&&m.width!==0||(p=!0)}var y=new ResizeObserver(function(b){p&&f.call(h,b),p=!0});h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(h.children).forEach(function(b){return y.observe(b)}):y.observe(h),P3.set(f,y)}(e.el.parentNode,e.parentResizeHandler);var o=e.el.getRootNode&&e.el.getRootNode(),r=pe.is("ShadowRoot",o),a=e.el.ownerDocument,l=r?o.getElementById("apexcharts-css"):a.getElementById("apexcharts-css");if(!l){var c;(l=document.createElement("style")).id="apexcharts-css",l.textContent=`@keyframes opaque {
  0% {
    opacity: 0
  }

  to {
    opacity: 1
  }
}

@keyframes resizeanim {

  0%,
  to {
    opacity: 0
  }
}

.apexcharts-canvas {
  position: relative;
  direction: ltr !important;
  user-select: none
}

.apexcharts-canvas ::-webkit-scrollbar {
  -webkit-appearance: none;
  width: 6px
}

.apexcharts-canvas ::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background-color: rgba(0, 0, 0, .5);
  box-shadow: 0 0 1px rgba(255, 255, 255, .5);
  -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5)
}

.apexcharts-inner {
  position: relative
}

.apexcharts-text tspan {
  font-family: inherit
}

rect.legend-mouseover-inactive,
.legend-mouseover-inactive rect,
.legend-mouseover-inactive path,
.legend-mouseover-inactive circle,
.legend-mouseover-inactive line,
.legend-mouseover-inactive text.apexcharts-yaxis-title-text,
.legend-mouseover-inactive text.apexcharts-yaxis-label {
  transition: .15s ease all;
  opacity: .2
}

.apexcharts-legend-text {
  padding-left: 15px;
  margin-left: -15px;
}

.apexcharts-series-collapsed {
  opacity: 0
}

.apexcharts-tooltip {
  border-radius: 5px;
  box-shadow: 2px 2px 6px -4px #999;
  cursor: default;
  font-size: 14px;
  left: 62px;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
  z-index: 12;
  transition: .15s ease all
}

.apexcharts-tooltip.apexcharts-active {
  opacity: 1;
  transition: .15s ease all
}

.apexcharts-tooltip.apexcharts-theme-light {
  border: 1px solid #e3e3e3;
  background: rgba(255, 255, 255, .96)
}

.apexcharts-tooltip.apexcharts-theme-dark {
  color: #fff;
  background: rgba(30, 30, 30, .8)
}

.apexcharts-tooltip * {
  font-family: inherit
}

.apexcharts-tooltip-title {
  padding: 6px;
  font-size: 15px;
  margin-bottom: 4px
}

.apexcharts-tooltip.apexcharts-theme-light .apexcharts-tooltip-title {
  background: #eceff1;
  border-bottom: 1px solid #ddd
}

.apexcharts-tooltip.apexcharts-theme-dark .apexcharts-tooltip-title {
  background: rgba(0, 0, 0, .7);
  border-bottom: 1px solid #333
}

.apexcharts-tooltip-text-goals-value,
.apexcharts-tooltip-text-y-value,
.apexcharts-tooltip-text-z-value {
  display: inline-block;
  margin-left: 5px;
  font-weight: 600
}

.apexcharts-tooltip-text-goals-label:empty,
.apexcharts-tooltip-text-goals-value:empty,
.apexcharts-tooltip-text-y-label:empty,
.apexcharts-tooltip-text-y-value:empty,
.apexcharts-tooltip-text-z-value:empty,
.apexcharts-tooltip-title:empty {
  display: none
}

.apexcharts-tooltip-text-goals-label,
.apexcharts-tooltip-text-goals-value {
  padding: 6px 0 5px
}

.apexcharts-tooltip-goals-group,
.apexcharts-tooltip-text-goals-label,
.apexcharts-tooltip-text-goals-value {
  display: flex
}

.apexcharts-tooltip-text-goals-label:not(:empty),
.apexcharts-tooltip-text-goals-value:not(:empty) {
  margin-top: -6px
}

.apexcharts-tooltip-marker {
  display: inline-block;
  position: relative;
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 16px;
  margin-right: 4px;
  text-align: center;
  vertical-align: middle;
  color: inherit;
}

.apexcharts-tooltip-marker::before {
  content: "";
  display: inline-block;
  width: 100%;
  text-align: center;
  color: currentcolor;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  font-size: 26px;
  line-height: 14px;
  font-weight: 900;
}

.apexcharts-tooltip-marker[shape="circle"]::before {
  content: "\\25CF";
}

.apexcharts-tooltip-marker[shape="square"]::before,
.apexcharts-tooltip-marker[shape="rect"]::before {
  content: "\\25A0";
  transform: translate(-1px, -2px);
}

.apexcharts-tooltip-marker[shape="line"]::before {
  content: "\\2500";
}

.apexcharts-tooltip-marker[shape="diamond"]::before {
  content: "\\25C6";
  font-size: 28px;
}

.apexcharts-tooltip-marker[shape="triangle"]::before {
  content: "\\25B2";
  font-size: 22px;
}

.apexcharts-tooltip-marker[shape="cross"]::before {
  content: "\\2715";
  font-size: 18px;
}

.apexcharts-tooltip-marker[shape="plus"]::before {
  content: "\\2715";
  transform: rotate(45deg) translate(-1px, -1px);
  font-size: 18px;
}

.apexcharts-tooltip-marker[shape="star"]::before {
  content: "\\2605";
  font-size: 18px;
}

.apexcharts-tooltip-marker[shape="sparkle"]::before {
  content: "\\2726";
  font-size: 20px;
}

.apexcharts-tooltip-series-group {
  padding: 0 10px;
  display: none;
  text-align: left;
  justify-content: left;
  align-items: center
}

.apexcharts-tooltip-series-group.apexcharts-active .apexcharts-tooltip-marker {
  opacity: 1
}

.apexcharts-tooltip-series-group.apexcharts-active,
.apexcharts-tooltip-series-group:last-child {
  padding-bottom: 4px
}

.apexcharts-tooltip-y-group {
  padding: 6px 0 5px
}

.apexcharts-custom-tooltip,
.apexcharts-tooltip-box {
  padding: 4px 8px
}

.apexcharts-tooltip-boxPlot {
  display: flex;
  flex-direction: column-reverse
}

.apexcharts-tooltip-box>div {
  margin: 4px 0
}

.apexcharts-tooltip-box span.value {
  font-weight: 700
}

.apexcharts-tooltip-rangebar {
  padding: 5px 8px
}

.apexcharts-tooltip-rangebar .category {
  font-weight: 600;
  color: #777
}

.apexcharts-tooltip-rangebar .series-name {
  font-weight: 700;
  display: block;
  margin-bottom: 5px
}

.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
  opacity: 0;
  pointer-events: none;
  color: #373d3f;
  font-size: 13px;
  text-align: center;
  border-radius: 2px;
  position: absolute;
  z-index: 10;
  background: #eceff1;
  border: 1px solid #90a4ae
}

.apexcharts-xaxistooltip {
  padding: 9px 10px;
  transition: .15s ease all
}

.apexcharts-xaxistooltip.apexcharts-theme-dark {
  background: rgba(0, 0, 0, .7);
  border: 1px solid rgba(0, 0, 0, .5);
  color: #fff
}

.apexcharts-xaxistooltip:after,
.apexcharts-xaxistooltip:before {
  left: 50%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none
}

.apexcharts-xaxistooltip:after {
  border-color: transparent;
  border-width: 6px;
  margin-left: -6px
}

.apexcharts-xaxistooltip:before {
  border-color: transparent;
  border-width: 7px;
  margin-left: -7px
}

.apexcharts-xaxistooltip-bottom:after,
.apexcharts-xaxistooltip-bottom:before {
  bottom: 100%
}

.apexcharts-xaxistooltip-top:after,
.apexcharts-xaxistooltip-top:before {
  top: 100%
}

.apexcharts-xaxistooltip-bottom:after {
  border-bottom-color: #eceff1
}

.apexcharts-xaxistooltip-bottom:before {
  border-bottom-color: #90a4ae
}

.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:after,
.apexcharts-xaxistooltip-bottom.apexcharts-theme-dark:before {
  border-bottom-color: rgba(0, 0, 0, .5)
}

.apexcharts-xaxistooltip-top:after {
  border-top-color: #eceff1
}

.apexcharts-xaxistooltip-top:before {
  border-top-color: #90a4ae
}

.apexcharts-xaxistooltip-top.apexcharts-theme-dark:after,
.apexcharts-xaxistooltip-top.apexcharts-theme-dark:before {
  border-top-color: rgba(0, 0, 0, .5)
}

.apexcharts-xaxistooltip.apexcharts-active {
  opacity: 1;
  transition: .15s ease all
}

.apexcharts-yaxistooltip {
  padding: 4px 10px
}

.apexcharts-yaxistooltip.apexcharts-theme-dark {
  background: rgba(0, 0, 0, .7);
  border: 1px solid rgba(0, 0, 0, .5);
  color: #fff
}

.apexcharts-yaxistooltip:after,
.apexcharts-yaxistooltip:before {
  top: 50%;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none
}

.apexcharts-yaxistooltip:after {
  border-color: transparent;
  border-width: 6px;
  margin-top: -6px
}

.apexcharts-yaxistooltip:before {
  border-color: transparent;
  border-width: 7px;
  margin-top: -7px
}

.apexcharts-yaxistooltip-left:after,
.apexcharts-yaxistooltip-left:before {
  left: 100%
}

.apexcharts-yaxistooltip-right:after,
.apexcharts-yaxistooltip-right:before {
  right: 100%
}

.apexcharts-yaxistooltip-left:after {
  border-left-color: #eceff1
}

.apexcharts-yaxistooltip-left:before {
  border-left-color: #90a4ae
}

.apexcharts-yaxistooltip-left.apexcharts-theme-dark:after,
.apexcharts-yaxistooltip-left.apexcharts-theme-dark:before {
  border-left-color: rgba(0, 0, 0, .5)
}

.apexcharts-yaxistooltip-right:after {
  border-right-color: #eceff1
}

.apexcharts-yaxistooltip-right:before {
  border-right-color: #90a4ae
}

.apexcharts-yaxistooltip-right.apexcharts-theme-dark:after,
.apexcharts-yaxistooltip-right.apexcharts-theme-dark:before {
  border-right-color: rgba(0, 0, 0, .5)
}

.apexcharts-yaxistooltip.apexcharts-active {
  opacity: 1
}

.apexcharts-yaxistooltip-hidden {
  display: none
}

.apexcharts-xcrosshairs,
.apexcharts-ycrosshairs {
  pointer-events: none;
  opacity: 0;
  transition: .15s ease all
}

.apexcharts-xcrosshairs.apexcharts-active,
.apexcharts-ycrosshairs.apexcharts-active {
  opacity: 1;
  transition: .15s ease all
}

.apexcharts-ycrosshairs-hidden {
  opacity: 0
}

.apexcharts-selection-rect {
  cursor: move
}

.svg_select_shape {
  stroke-width: 1;
  stroke-dasharray: 10 10;
  stroke: black;
  stroke-opacity: 0.1;
  pointer-events: none;
  fill: none;
}

.svg_select_handle {
  stroke-width: 3;
  stroke: black;
  fill: none;
}

.svg_select_handle_r {
  cursor: e-resize;
}

.svg_select_handle_l {
  cursor: w-resize;
}

.apexcharts-svg.apexcharts-zoomable.hovering-zoom {
  cursor: crosshair
}

.apexcharts-svg.apexcharts-zoomable.hovering-pan {
  cursor: move
}

.apexcharts-menu-icon,
.apexcharts-pan-icon,
.apexcharts-reset-icon,
.apexcharts-selection-icon,
.apexcharts-toolbar-custom-icon,
.apexcharts-zoom-icon,
.apexcharts-zoomin-icon,
.apexcharts-zoomout-icon {
  cursor: pointer;
  width: 20px;
  height: 20px;
  line-height: 24px;
  color: #6e8192;
  text-align: center
}

.apexcharts-menu-icon svg,
.apexcharts-reset-icon svg,
.apexcharts-zoom-icon svg,
.apexcharts-zoomin-icon svg,
.apexcharts-zoomout-icon svg {
  fill: #6e8192
}

.apexcharts-selection-icon svg {
  fill: #444;
  transform: scale(.76)
}

.apexcharts-theme-dark .apexcharts-menu-icon svg,
.apexcharts-theme-dark .apexcharts-pan-icon svg,
.apexcharts-theme-dark .apexcharts-reset-icon svg,
.apexcharts-theme-dark .apexcharts-selection-icon svg,
.apexcharts-theme-dark .apexcharts-toolbar-custom-icon svg,
.apexcharts-theme-dark .apexcharts-zoom-icon svg,
.apexcharts-theme-dark .apexcharts-zoomin-icon svg,
.apexcharts-theme-dark .apexcharts-zoomout-icon svg {
  fill: #f3f4f5
}

.apexcharts-canvas .apexcharts-reset-zoom-icon.apexcharts-selected svg,
.apexcharts-canvas .apexcharts-selection-icon.apexcharts-selected svg,
.apexcharts-canvas .apexcharts-zoom-icon.apexcharts-selected svg {
  fill: #008ffb
}

.apexcharts-theme-light .apexcharts-menu-icon:hover svg,
.apexcharts-theme-light .apexcharts-reset-icon:hover svg,
.apexcharts-theme-light .apexcharts-selection-icon:not(.apexcharts-selected):hover svg,
.apexcharts-theme-light .apexcharts-zoom-icon:not(.apexcharts-selected):hover svg,
.apexcharts-theme-light .apexcharts-zoomin-icon:hover svg,
.apexcharts-theme-light .apexcharts-zoomout-icon:hover svg {
  fill: #333
}

.apexcharts-menu-icon,
.apexcharts-selection-icon {
  position: relative
}

.apexcharts-reset-icon {
  margin-left: 5px
}

.apexcharts-menu-icon,
.apexcharts-reset-icon,
.apexcharts-zoom-icon {
  transform: scale(.85)
}

.apexcharts-zoomin-icon,
.apexcharts-zoomout-icon {
  transform: scale(.7)
}

.apexcharts-zoomout-icon {
  margin-right: 3px
}

.apexcharts-pan-icon {
  transform: scale(.62);
  position: relative;
  left: 1px;
  top: 0
}

.apexcharts-pan-icon svg {
  fill: #fff;
  stroke: #6e8192;
  stroke-width: 2
}

.apexcharts-pan-icon.apexcharts-selected svg {
  stroke: #008ffb
}

.apexcharts-pan-icon:not(.apexcharts-selected):hover svg {
  stroke: #333
}

.apexcharts-toolbar {
  position: absolute;
  z-index: 11;
  max-width: 176px;
  text-align: right;
  border-radius: 3px;
  padding: 0 6px 2px;
  display: flex;
  justify-content: space-between;
  align-items: center
}

.apexcharts-menu {
  background: #fff;
  position: absolute;
  top: 100%;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 3px;
  right: 10px;
  opacity: 0;
  min-width: 110px;
  transition: .15s ease all;
  pointer-events: none
}

.apexcharts-menu.apexcharts-menu-open {
  opacity: 1;
  pointer-events: all;
  transition: .15s ease all
}

.apexcharts-menu-item {
  padding: 6px 7px;
  font-size: 12px;
  cursor: pointer
}

.apexcharts-theme-light .apexcharts-menu-item:hover {
  background: #eee
}

.apexcharts-theme-dark .apexcharts-menu {
  background: rgba(0, 0, 0, .7);
  color: #fff
}

@media screen and (min-width:768px) {
  .apexcharts-canvas:hover .apexcharts-toolbar {
    opacity: 1
  }
}

.apexcharts-canvas .apexcharts-element-hidden,
.apexcharts-datalabel.apexcharts-element-hidden,
.apexcharts-hide .apexcharts-series-points {
  opacity: 0;
}

.apexcharts-hidden-element-shown {
  opacity: 1;
  transition: 0.25s ease all;
}

.apexcharts-datalabel,
.apexcharts-datalabel-label,
.apexcharts-datalabel-value,
.apexcharts-datalabels,
.apexcharts-pie-label {
  cursor: default;
  pointer-events: none
}

.apexcharts-pie-label-delay {
  opacity: 0;
  animation-name: opaque;
  animation-duration: .3s;
  animation-fill-mode: forwards;
  animation-timing-function: ease
}

.apexcharts-radialbar-label {
  cursor: pointer;
}

.apexcharts-annotation-rect,
.apexcharts-area-series .apexcharts-area,
.apexcharts-gridline,
.apexcharts-line,
.apexcharts-point-annotation-label,
.apexcharts-radar-series path:not(.apexcharts-marker),
.apexcharts-radar-series polygon,
.apexcharts-toolbar svg,
.apexcharts-tooltip .apexcharts-marker,
.apexcharts-xaxis-annotation-label,
.apexcharts-yaxis-annotation-label,
.apexcharts-zoom-rect,
.no-pointer-events {
  pointer-events: none
}

.apexcharts-tooltip-active .apexcharts-marker {
  transition: .15s ease all
}

.apexcharts-radar-series .apexcharts-yaxis {
  pointer-events: none;
}

.resize-triggers {
  animation: 1ms resizeanim;
  visibility: hidden;
  opacity: 0;
  height: 100%;
  width: 100%;
  overflow: hidden
}

.contract-trigger:before,
.resize-triggers,
.resize-triggers>div {
  content: " ";
  display: block;
  position: absolute;
  top: 0;
  left: 0
}

.resize-triggers>div {
  height: 100%;
  width: 100%;
  background: #eee;
  overflow: auto
}

.contract-trigger:before {
  overflow: hidden;
  width: 200%;
  height: 200%
}

.apexcharts-bar-goals-markers {
  pointer-events: none
}

.apexcharts-bar-shadows {
  pointer-events: none
}

.apexcharts-rangebar-goals-markers {
  pointer-events: none
}`;var u=((c=e.opts.chart)===null||c===void 0?void 0:c.nonce)||e.w.config.chart.nonce;u&&l.setAttribute("nonce",u),r?o.prepend(l):a.head.appendChild(l)}var d=e.create(e.w.config.series,{});if(!d)return n(e);e.mount(d).then(function(){typeof e.w.config.chart.events.mounted=="function"&&e.w.config.chart.events.mounted(e,e.w),e.events.fireEvent("mounted",[e,e.w]),n(d)}).catch(function(h){i(h)})}else i(new Error("Element not found"))})}},{key:"create",value:function(e,n){var i=this,s=this.w;new ST(this).initModules();var o=this.w.globals;if(o.noData=!1,o.animationEnded=!1,!pe.elementExists(this.el))return o.animationEnded=!0,this.destroy(),null;if(this.responsive.checkResponsiveConfig(n),s.config.xaxis.convertedCatToNumeric&&new n1(s.config).convertCatToNumericXaxis(s.config,this.ctx),this.core.setupElements(),s.config.chart.type==="treemap"&&(s.config.grid.show=!1,s.config.yaxis[0].show=!1),o.svgWidth===0)return o.animationEnded=!0,null;var r=e;e.forEach(function(h,f){h.hidden&&(r=i.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:f}))});var a=_s.checkComboSeries(r,s.config.chart.type);o.comboCharts=a.comboCharts,o.comboBarCount=a.comboBarCount;var l=r.every(function(h){return h.data&&h.data.length===0});(r.length===0||l&&o.collapsedSeries.length<1)&&this.series.handleNoData(),this.events.setupEventHandlers(),this.data.parseData(r),this.theme.init(),new Sp(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),o.noData&&o.collapsedSeries.length!==o.series.length&&!s.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),o.axisCharts&&(this.core.coreCalculations(),s.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=s.globals.minX,this.ctx.toolbar.maxX=s.globals.maxX),this.formatters.heatmapLabelFormatters(),new _s(this).getLargestMarkerSize(),this.dimensions.plotCoords();var c=this.core.xySettings();this.grid.createGridMask();var u=this.core.plotChartType(r,c),d=new jf(this);return d.bringForward(),s.config.dataLabels.background.enabled&&d.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:u,xyRatios:c,dimensions:{plot:{left:s.globals.translateX,top:s.globals.translateY,width:s.globals.gridWidth,height:s.globals.gridHeight}}}}},{key:"mount",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=this,s=i.w;return new Promise(function(o,r){if(i.el===null)return r(new Error("Not enough data to display or target element not found"));(n===null||s.globals.allSeriesCollapsed)&&i.series.handleNoData(),i.grid=new PU(i);var a,l,c=i.grid.drawGrid();if(i.annotations=new cCt(i),i.annotations.drawImageAnnos(),i.annotations.drawTextAnnos(),s.config.grid.position==="back"&&(c&&s.globals.dom.elGraphical.add(c.el),c!=null&&(a=c.elGridBorders)!==null&&a!==void 0&&a.node&&s.globals.dom.elGraphical.add(c.elGridBorders)),Array.isArray(n.elGraph))for(var u=0;u<n.elGraph.length;u++)s.globals.dom.elGraphical.add(n.elGraph[u]);else s.globals.dom.elGraphical.add(n.elGraph);s.config.grid.position==="front"&&(c&&s.globals.dom.elGraphical.add(c.el),c!=null&&(l=c.elGridBorders)!==null&&l!==void 0&&l.node&&s.globals.dom.elGraphical.add(c.elGridBorders)),s.config.xaxis.crosshairs.position==="front"&&i.crosshairs.drawXCrosshairs(),s.config.yaxis[0].crosshairs.position==="front"&&i.crosshairs.drawYCrosshairs(),s.config.chart.type!=="treemap"&&i.axes.drawAxis(s.config.chart.type,c);var d=new i1(e.ctx,c),h=new kS(e.ctx,c);if(c!==null&&(d.xAxisLabelCorrections(c.xAxisTickWidth),h.setYAxisTextAlignments(),s.config.yaxis.map(function(p,m){s.globals.ignoreYAxisIndexes.indexOf(m)===-1&&h.yAxisTitleRotate(m,p.opposite)})),i.annotations.drawAxesAnnotations(),!s.globals.noData){if(s.config.tooltip.enabled&&!s.globals.noData&&i.w.globals.tooltip.drawTooltip(n.xyRatios),s.globals.axisCharts&&(s.globals.isXNumeric||s.config.xaxis.convertedCatToNumeric||s.globals.isRangeBar))(s.config.chart.zoom.enabled||s.config.chart.selection&&s.config.chart.selection.enabled||s.config.chart.pan&&s.config.chart.pan.enabled)&&i.zoomPanSelection.init({xyRatios:n.xyRatios});else{var f=s.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(function(p){f[p]=!1})}s.config.chart.toolbar.show&&!s.globals.allSeriesCollapsed&&i.toolbar.createToolbar()}s.globals.memory.methodsToExec.length>0&&s.globals.memory.methodsToExec.forEach(function(p){p.method(p.params,!1,p.context)}),s.globals.axisCharts||s.globals.noData||i.core.resizeNonAxisCharts(),o(i)})}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(n,i){var s=P3.get(i);s&&(s.disconnect(),P3.delete(i))}(this.el.parentNode,this.parentResizeHandler);var e=this.w.config.chart.id;e&&Apex._chartInstances.forEach(function(n,i){n.id===pe.escapeString(e)&&Apex._chartInstances.splice(i,1)}),new $T(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],o=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],r=!(arguments.length>4&&arguments[4]!==void 0)||arguments[4],a=this.w;return a.globals.selection=void 0,e.series&&(this.series.resetSeries(!1,!0,!1),e.series.length&&e.series[0].data&&(e.series=e.series.map(function(l,c){return n.updateHelpers._extendSeries(l,c)})),this.updateHelpers.revertDefaultAxisMinMax()),e.xaxis&&(e=this.updateHelpers.forceXAxisUpdate(e)),e.yaxis&&(e=this.updateHelpers.forceYAxisUpdate(e)),a.globals.collapsedSeriesIndices.length>0&&this.series.clearPreviousPaths(),e.theme&&(e=this.theme.updateThemeOptions(e)),this.updateHelpers._updateOptions(e,i,s,o,r)}},{key:"updateSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,n,i)}},{key:"appendSeries",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],s=this.w.config.series.slice();return s.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(s,n,i)}},{key:"appendData",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this;i.w.globals.dataChanged=!0,i.series.getPreviousPaths();for(var s=i.w.config.series.slice(),o=0;o<s.length;o++)if(e[o]!==null&&e[o]!==void 0)for(var r=0;r<e[o].data.length;r++)s[o].data.push(e[o].data[r]);return i.w.config.series=s,n&&(i.w.globals.initialSeries=pe.clone(i.w.config.series)),this.update()}},{key:"update",value:function(e){var n=this;return new Promise(function(i,s){new $T(n.ctx).clear({isUpdating:!0});var o=n.create(n.w.config.series,e);if(!o)return i(n);n.mount(o).then(function(){typeof n.w.config.chart.events.updated=="function"&&n.w.config.chart.events.updated(n,n.w),n.events.fireEvent("updated",[n,n.w]),n.w.globals.isDirty=!0,i(n)}).catch(function(r){s(r)})})}},{key:"getSyncedCharts",value:function(){var e=this.getGroupedCharts(),n=[this];return e.length&&(n=[],e.forEach(function(i){n.push(i)})),n}},{key:"getGroupedCharts",value:function(){var e=this;return Apex._chartInstances.filter(function(n){if(n.group)return!0}).map(function(n){return e.w.config.chart.group===n.group?n.chart:e})}},{key:"toggleSeries",value:function(e){return this.series.toggleSeries(e)}},{key:"highlightSeriesOnLegendHover",value:function(e,n){return this.series.toggleSeriesOnHover(e,n)}},{key:"showSeries",value:function(e){this.series.showSeries(e)}},{key:"hideSeries",value:function(e){this.series.hideSeries(e)}},{key:"highlightSeries",value:function(e){this.series.highlightSeries(e)}},{key:"isSeriesHidden",value:function(e){this.series.isSeriesHidden(e)}},{key:"resetSeries",value:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];this.series.resetSeries(e,n)}},{key:"addEventListener",value:function(e,n){this.events.addEventListener(e,n)}},{key:"removeEventListener",value:function(e,n){this.events.removeEventListener(e,n)}},{key:"addXaxisAnnotation",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,s=this;i&&(s=i),s.annotations.addXaxisAnnotationExternal(e,n,s)}},{key:"addYaxisAnnotation",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,s=this;i&&(s=i),s.annotations.addYaxisAnnotationExternal(e,n,s)}},{key:"addPointAnnotation",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,s=this;i&&(s=i),s.annotations.addPointAnnotationExternal(e,n,s)}},{key:"clearAnnotations",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:void 0,n=this;e&&(n=e),n.annotations.clearAnnotations(n)}},{key:"removeAnnotation",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0,i=this;n&&(i=n),i.annotations.removeAnnotation(i,e)}},{key:"getChartArea",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-inner")}},{key:"getSeriesTotalXRange",value:function(e,n){return this.coreUtils.getSeriesTotalsXRange(e,n)}},{key:"getHighestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new CC(this.ctx).getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new CC(this.ctx).getMinYMaxY(e).lowestY}},{key:"getSeriesTotal",value:function(){return this.w.globals.seriesTotals}},{key:"toggleDataPointSelection",value:function(e,n){return this.updateHelpers.toggleDataPointSelection(e,n)}},{key:"zoomX",value:function(e,n){this.ctx.toolbar.zoomUpdateOptions(e,n)}},{key:"setLocale",value:function(e){this.localization.setCurrentLocaleValues(e)}},{key:"dataURI",value:function(e){return new Ry(this.ctx).dataURI(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new Ry(this.ctx).exportToCSV(e)}},{key:"paper",value:function(){return this.w.globals.dom.Paper}},{key:"_parentResizeCallback",value:function(){this.w.globals.animationEnded&&this.w.config.chart.redrawOnParentResize&&this._windowResize()}},{key:"_windowResize",value:function(){var e=this;clearTimeout(this.w.globals.resizeTimer),this.w.globals.resizeTimer=window.setTimeout(function(){e.w.globals.resized=!0,e.w.globals.dataChanged=!1,e.ctx.update()},150)}},{key:"_windowResizeHandler",value:function(){var e=this.w.config.chart.redrawOnWindowResize;typeof e=="function"&&(e=e()),e&&this._windowResize()}}],[{key:"getChartByID",value:function(e){var n=pe.escapeString(e);if(Apex._chartInstances){var i=Apex._chartInstances.filter(function(s){return s.id===n})[0];return i&&i.chart}}},{key:"initOnLoad",value:function(){for(var e=document.querySelectorAll("[data-apexcharts]"),n=0;n<e.length;n++)new t(e[n],JSON.parse(e[n].getAttribute("data-options"))).render()}},{key:"exec",value:function(e,n){var i=this.getChartByID(e);if(i){i.w.globals.isExecCalled=!0;var s=null;if(i.publicMethods.indexOf(n)!==-1){for(var o=arguments.length,r=new Array(o>2?o-2:0),a=2;a<o;a++)r[a-2]=arguments[a];s=i[n].apply(i,r)}return s}}},{key:"merge",value:function(e,n){return pe.extend(e,n)}}]),t}();const ET=["animationEnd","beforeMount","mounted","updated","click","mouseMove","mouseLeave","legendClick","markerClick","selection","dataPointSelection","dataPointMouseEnter","dataPointMouseLeave","beforeZoom","beforeResetZoom","zoomed","scrolled","brushScrolled"],Fy=ce({name:"apexchart",props:{options:{type:Object},type:{type:String},series:{type:Array,required:!0},width:{default:"100%"},height:{default:"auto"}},emits:ET,setup(t,{emit:e}){const n=J(null),i=J(null),s=R=>R&&typeof R=="object"&&!Array.isArray(R)&&R!=null,o=(R,V)=>{typeof Object.assign!="function"&&function(){Object.assign=function(F){if(F==null)throw new TypeError("Cannot convert undefined or null to object");let z=Object(F);for(let N=1;N<arguments.length;N++){let q=arguments[N];if(q!=null)for(let K in q)q.hasOwnProperty(K)&&(z[K]=q[K])}return z}}();let H=Object.assign({},R);return s(R)&&s(V)&&Object.keys(V).forEach(F=>{s(V[F])?F in R?H[F]=o(R[F],V[F]):Object.assign(H,{[F]:V[F]}):Object.assign(H,{[F]:V[F]})}),H},r=async()=>{if(await ot(),i.value)return;const R={chart:{type:t.type||t.options.chart.type||"line",height:t.height,width:t.width,events:{}},series:t.series},V=t.options.chart?t.options.chart.events:null;ET.forEach(F=>{let z=(...N)=>e(F,...N);R.chart.events[F]=(...N)=>{z(...N),V&&V.hasOwnProperty(F)&&V[F](...N)}});const H=o(t.options,R);return i.value=new AT(n.value,H),i.value.render()},a=()=>(l(),r()),l=()=>{i.value.destroy(),i.value=null},c=(R,V)=>i.value.updateSeries(R,V),u=(R,V,H,F)=>i.value.updateOptions(R,V,H,F),d=R=>i.value.toggleSeries(R),h=R=>{i.value.showSeries(R)},f=R=>{i.value.hideSeries(R)},p=(R,V)=>i.value.appendSeries(R,V),m=()=>{i.value.resetSeries()},y=(R,V)=>{i.value.toggleDataPointSelection(R,V)},b=R=>i.value.appendData(R),k=(R,V)=>i.value.zoomX(R,V),C=R=>i.value.dataURI(R),$=R=>i.value.setLocale(R),x=(R,V)=>{i.value.addXaxisAnnotation(R,V)},M=(R,V)=>{i.value.addYaxisAnnotation(R,V)},P=(R,V)=>{i.value.addPointAnnotation(R,V)},T=(R,V)=>{i.value.removeAnnotation(R,V)},I=()=>{i.value.clearAnnotations()};Sd(()=>{window.ApexCharts=AT}),Ft(()=>{n.value=bt().proxy.$el,r()}),bn(()=>{i.value&&l()});const L=co(t);return Te(L.options,()=>{!i.value&&t.options?r():i.value.updateOptions(t.options)}),Te(L.series,()=>{!i.value&&t.series?r():i.value.updateSeries(t.series)},{deep:!0}),Te(L.type,()=>{a()}),Te(L.width,()=>{a()}),Te(L.height,()=>{a()}),{chart:i,init:r,refresh:a,destroy:l,updateOptions:u,updateSeries:c,toggleSeries:d,showSeries:h,hideSeries:f,resetSeries:m,zoomX:k,toggleDataPointSelection:y,appendData:b,appendSeries:p,addXaxisAnnotation:x,addYaxisAnnotation:M,addPointAnnotation:P,removeAnnotation:T,clearAnnotations:I,setLocale:$,dataURI:C}},render(){return vt("div",{class:"vue-apexcharts"})}}),UCt=t=>{t.component(Fy.name,Fy)};Fy.install=UCt;const jCt={data(){return{isDarkMode:!1}},methods:{updateDarkMode(){this.isDarkMode=document.documentElement.classList.contains("dark")}},mounted(){this.updateDarkMode(),this.observer=new MutationObserver(this.updateDarkMode),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})},beforeUnmount(){this.observer&&this.observer.disconnect()}},WCt={name:"ReportsChart",mixins:[jCt],props:{data:{type:Array,default:()=>[]},seriesName:{type:String},series:{type:Array},categories:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},components:{VueApexCharts:Fy},methods:{formatDate(t){const e=new Date(t),n=e.getDate().toString().padStart(2,"0"),i=(e.getMonth()+1).toString().padStart(2,"0"),s=e.getFullYear().toString().slice(-2);return`${n}-${i}-${s}`}},computed:{chartSeries(){return this.series.map(t=>({...t,data:t.data.map((e,n)=>({x:this.formatDate(this.categories[n]),y:e}))}))},chartOptions(){return{chart:{type:"area",width:"100%",toolbar:{show:!1},foreColor:"var(--fcom-primary-text)"},dataLabels:{enabled:!1},legend:{show:!0,position:"bottom",horizontalAlign:"center"},stroke:{width:[0,2,5],curve:"smooth"},xaxis:{type:"category",labels:{rotate:-45,rotateAlways:!0,hideOverlappingLabels:!0},tickPlacement:"on"},yaxis:{labels:{formatter:function(t){return Math.floor(t)===t?t:""}}},tooltip:{theme:this.isDarkMode?"dark":"light",x:{formatter:t=>t}},...this.options}}},beforeUnmount(){this.$refs.apexChart&&this.$refs.apexChart.chart&&this.$refs.apexChart.chart.destroy()}},YCt={class:"reports-chart"};function qCt(t,e,n,i,s,o){const r=W("VueApexCharts");return v(),A("div",YCt,[_(r,{ref:"apexChart",height:"350",options:o.chartOptions,series:o.chartSeries},null,8,["options","series"])])}const CS=de(WCt,[["render",qCt]]),GCt={name:"ActivitiesChart",components:{ReportsChart:CS,Loading:La},props:["dateRanges"],data(){return{loading:!1,renderChart:!1,activity:"posts",activitiesFilters:[{label:this.$t("Posts"),value:"posts"},{label:this.$t("Comments"),value:"comments"},{label:this.$t("Members"),value:"members"}],chart:{xaxis:{labels:{datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd mm yy",hour:"HH:mm"}}},renderKey:null,data:[],series:[{name:this.$t("Posts"),data:[],type:"column"}],categories:[]}}},watch:{dateRanges:"fetchActivity"},methods:{fetchActivity(){this.loading=!0,this.$get("analytics/overview/activity",{start_date:this.dateRanges[0],end_date:this.dateRanges[1],activity:this.activity}).then(t=>{this.populateGraphData(t.data)}).catch(this.$handleError).finally(()=>this.loading=!1)},populateGraphData(t){this.renderChart=!1,this.chart.series[0]={data:t.data.map(n=>n.data),name:t.title,type:"column"};let e=0;this.chart.series[1]={data:t.data.map(n=>(e+=n.data,e)),name:this.$t("Cumulative"),type:"area",width:"100%"},this.chart.categories=t.data.map(n=>n.date),this.$nextTick(()=>{this.chart.renderKey=new Date().toDateString(),this.renderChart=!0})}},mounted(){this.fetchActivity()}},XCt={class:"fcom-report-chart",style:{"min-height":"400px"}},KCt={key:1},ZCt={class:"fcom-report-chart-header"},JCt={class:"fcom-report-header-action"},QCt={key:0};function ext(t,e,n,i,s,o){const r=W("Loading"),a=on,l=Jt,c=W("ReportsChart");return v(),A("div",XCt,[s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",KCt,[g("div",ZCt,[g("h4",null,S(t.$t("Activities")),1),g("div",JCt,[_(l,{modelValue:s.activity,"onUpdate:modelValue":e[0]||(e[0]=u=>s.activity=u),onChange:o.fetchActivity},{default:w(()=>[(v(!0),A(ee,null,Ce(s.activitiesFilters,(u,d)=>(v(),D(a,{key:`activity-filter-${d}`,value:u.value,label:u.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue","onChange"])])]),s.renderChart?(v(),A("div",QCt,[(v(),D(c,{key:s.chart.renderKey,"series-name":t.$t("Activities"),data:s.chart.data,options:s.chart,series:s.chart.series,categories:s.chart.categories},null,8,["series-name","data","options","series","categories"]))])):O("",!0)]))])}const txt=de(GCt,[["render",ext]]),nxt={name:"PopularDayTime",components:{Loading:La,InfoFilled:fp},props:["dateRanges"],data(){return{loading:!1,weekly_activities:{}}},watch:{dateRanges:"fetchData"},methods:{fetchData(){this.loading=!0,this.$get("analytics/overview/popular-day-time",{start_date:this.dateRanges[0],end_date:this.dateRanges[1]}).then(t=>{this.weekly_activities={...t.data,columns:t.data.columns.map(e=>({...e,width:e.prop==="time_range"?180:void 0}))}}).catch(this.$handleError).finally(()=>this.loading=!1)}},mounted(){this.fetchData()}},sxt={class:"fcom-report-popular-time"},ixt={key:1},oxt={class:"fcom-report-chart-header"};function rxt(t,e,n,i,s,o){const r=W("Loading"),a=W("InfoFilled"),l=be,c=Cs,u=Xr,d=Gr;return v(),A("div",sxt,[s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",ixt,[g("div",oxt,[g("h4",null,[B(S(t.$t("Popular day & time"))+" ",1),_(c,{class:"box-item",effect:"dark",content:t.$t("Popular hour of the day and day of the week"),placement:"top-start"},{default:w(()=>[_(l,null,{default:w(()=>[_(a)]),_:1})]),_:1},8,["content"])])]),_(d,{data:s.weekly_activities.data,style:{width:"100%"}},{default:w(()=>[(v(!0),A(ee,null,Ce(s.weekly_activities.columns,(h,f)=>(v(),D(u,{key:`${h.prop}-${f}`,prop:h.prop,label:h.label,width:h.width},null,8,["prop","label","width"]))),128))]),_:1},8,["data"])]))])}const axt=de(nxt,[["render",rxt]]),lxt={name:"Overview",components:{CheckProStatus:lS,AnalyticsHeader:b6t,AnalyticsWidgets:A6t,ActivitiesChart:txt,PopularDayTime:axt},data(){return{predefinedDates:[{key:"7",label:this.$t("Last Week")},{key:"15",label:this.$t("Last 15 days")},{key:"30",label:this.$t("Last Month")},{key:"90",label:this.$t("Last Three Month")},{key:"",label:this.$t("Custom")}],predefinedDate:"30",instanceKey:null,dateRanges:[new Date(new Date().setDate(new Date().getDate()-30)).toISOString().split("T")[0],new Date().toISOString().split("T")[0]]}},computed:{isAnalyticsEnabled(){return this.hasFeature("has_analytics")}},methods:{updateDateRanges(t){this.dateRanges=t,this.instanceKey=new Date().toDateString()},updatePredefinedDate(t){this.predefinedDate=t}}},cxt={key:0},uxt={key:1},dxt={class:"fcom-report-body"};function hxt(t,e,n,i,s,o){const r=W("CheckProStatus"),a=W("AnalyticsHeader"),l=W("AnalyticsWidgets"),c=W("ActivitiesChart"),u=W("PopularDayTime");return o.isAnalyticsEnabled?(v(),A("div",uxt,[(v(),A("div",{class:"fcom-report-wrap",key:s.instanceKey},[_(a,{"predefined-date":s.predefinedDate,"predefined-dates":s.predefinedDates,"date-ranges":s.dateRanges,"onUpdate:dateRanges":o.updateDateRanges,"onUpdate:predefinedDate":o.updatePredefinedDate},null,8,["predefined-date","predefined-dates","date-ranges","onUpdate:dateRanges","onUpdate:predefinedDate"]),g("div",dxt,[_(l,{"date-ranges":s.dateRanges},null,8,["date-ranges"]),_(c,{"date-ranges":s.dateRanges},null,8,["date-ranges"]),_(u,{"date-ranges":s.dateRanges},null,8,["date-ranges"])])]))])):(v(),A("div",cxt,[_(r)]))}const fxt=de(lxt,[["render",hxt]]),pxt={name:"AnalyticsHeader",props:{predefinedDate:{type:String,default:"30"},predefinedDates:{type:Array,required:!0},dateRanges:{type:Array,required:!0}},emits:["update:predefinedDate","update:dateRanges"],data(){return{localPredefinedDate:this.predefinedDate,localDateRanges:this.dateRanges}},methods:{setDateRange(t){if(!t||t===""){this.$nextTick(()=>{this.$refs.datePickerRef.focus()});return}const e=new Date;e.setDate(e.getDate()-parseInt(t));const n=e.toISOString().split("T")[0],i=new Date().toISOString().split("T")[0];this.localDateRanges=[n,i],this.$emit("update:dateRanges",this.localDateRanges),this.$emit("update:predefinedDate",this.localPredefinedDate)},onDateRangeChange(){this.$emit("update:dateRanges",this.localDateRanges),this.$emit("update:predefinedDate","")},disabledDate(t){return t.getTime()>Date.now()}},watch:{predefinedDate(t){this.localPredefinedDate=t},dateRanges:{handler(t){this.localDateRanges=t},deep:!0}}},mxt={class:"fcom-report-header"},gxt={class:"fcom-report-header-action"};function vxt(t,e,n,i,s,o){const r=on,a=Jt,l=Od;return v(),A("div",mxt,[g("h4",null,S(t.$t("Members")),1),g("div",gxt,[_(a,{modelValue:s.localPredefinedDate,"onUpdate:modelValue":e[0]||(e[0]=c=>s.localPredefinedDate=c),onChange:o.setDateRange,class:"date-selector"},{default:w(()=>[(v(!0),A(ee,null,Ce(n.predefinedDates,(c,u)=>(v(),D(r,{key:`date-shortcut-${u}`,label:c.label,value:c.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"]),_(l,{modelValue:s.localDateRanges,"onUpdate:modelValue":e[1]||(e[1]=c=>s.localDateRanges=c),ref:"datePickerRef",type:"daterange","range-separator":"-",clearable:!1,"disabled-date":o.disabledDate,"start-placeholder":t.$t("Start date"),"end-placeholder":t.$t("End date"),format:t.siteDateFormat,"value-format":"YYYY-MM-DD",onChange:o.onDateRangeChange},null,8,["modelValue","disabled-date","start-placeholder","end-placeholder","format","onChange"])])])}const _xt=de(pxt,[["render",vxt]]),yxt={name:"AnalyticsWidgets",components:{Loading:La},props:["dateRanges"],data(){return{loading:!1,widgets:[]}},watch:{dateRanges:"fetchData"},mounted(){this.fetchData()},methods:{fetchData(){this.loading=!0,this.$get("analytics/members/widget",{start_date:this.dateRanges[0],end_date:this.dateRanges[1]}).then(t=>{this.widgets=Object.values(t.data).map(e=>({...e,down:e==null?void 0:e.comparison.startsWith("-")}))}).catch(this.$handleError).finally(()=>this.loading=!1)}}},bxt={key:1,class:"fcom-report-stat-widgets"},wxt={class:"stat-title"};function kxt(t,e,n,i,s,o){const r=W("Loading");return s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",bxt,[(v(!0),A(ee,null,Ce(s.widgets,(a,l)=>(v(),A("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",wxt,S(a.title),1),g("h3",null,[B(S(a.total_records)+" ",1),g("span",{class:G(["stat-percent",{"stat-down":a.down}])},S(a.comparison)+" % ",3)])]))),128))]))}const Cxt=de(yxt,[["render",kxt]]),xxt={name:"MembersActivitiesChart",components:{Loading:La,ReportsChart:CS},props:["dateRanges"],data(){return{loading:!1,renderChart:!1,chartKey:0,chartData:[],chartOptions:{xaxis:{labels:{datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm"}}}},chartSeries:[],chartCategories:[]}},watch:{dateRanges:"fetchData"},mounted(){this.fetchData()},methods:{fetchData(){this.loading=!0,this.renderChart=!1,this.$get("analytics/members/activity",{start_date:this.dateRanges[0],end_date:this.dateRanges[1]}).then(t=>this.populateGraphData(t.data)).catch(this.$handleError).finally(()=>this.loading=!1)},populateGraphData(t){this.chartData=t.data,this.chartCategories=t.data.map(e=>e.date),this.chartSeries=[{name:t.title,data:t.data.map(e=>e.data),type:"column",color:"#6895FF"},{name:this.$t("Cumulative"),data:this.calculateCumulative(t.data),type:"area",width:"100%"}],this.renderChart=!0,this.chartKey++},calculateCumulative(t){let e=0;return t.map(n=>(e+=n.data,e))}}},Sxt={class:"fcom-report-chart",style:{"min-height":"400px"}},$xt={key:1},Axt={class:"fcom-report-chart-header"},Ext={key:0};function Mxt(t,e,n,i,s,o){const r=W("Loading"),a=W("ReportsChart");return v(),A("div",Sxt,[s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",$xt,[g("div",Axt,[g("h4",null,S(t.$t("Members Activities")),1)]),s.renderChart?(v(),A("div",Ext,[(v(),D(a,{key:s.chartKey,"series-name":t.$t("Activities"),data:s.chartData,options:s.chartOptions,series:s.chartSeries,categories:s.chartCategories},null,8,["series-name","data","options","series","categories"]))])):O("",!0)]))])}const Txt=de(xxt,[["render",Mxt]]),Pxt={name:"TopMembersSection",components:{Loading:La,InfoFilled:fp},props:{title:String,tooltipContent:String,dateRanges:Array,endpoint:String,pointLabel:String},data(){return{loading:!1,members:[]}},watch:{dateRanges:"fetchData"},mounted(){this.fetchData()},methods:{fetchData(){this.loading=!0,this.$get(this.endpoint,{start_date:this.dateRanges[0],end_date:this.dateRanges[1]}).then(t=>{this.members=t.data}).catch(this.$handleError).finally(()=>this.loading=!1)}}},Ixt={class:"fcom-top-members-wrap"},Lxt={key:1},Oxt={class:"fcom-report-chart-header"},Dxt={class:"fcom-members-activity-lists"},Rxt={key:0},Vxt={class:"image-box"},Fxt=["src"],Nxt={class:"number"},Bxt={class:"content-box"},zxt=["title"],Hxt={class:"points"};function Uxt(t,e,n,i,s,o){const r=W("Loading"),a=W("InfoFilled"),l=be,c=Cs;return v(),A("div",Ixt,[s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",Lxt,[g("div",Oxt,[g("h4",null,[B(S(t.$t(n.title))+" ",1),_(c,{class:"box-item",effect:"dark",content:n.tooltipContent,placement:"top-start"},{default:w(()=>[_(l,null,{default:w(()=>[_(a)]),_:1})]),_:1},8,["content"])])]),g("div",Dxt,[s.members.length?(v(!0),A(ee,{key:1},Ce(s.members,(u,d)=>(v(),A("div",{class:"fcom-members-activity-box",key:`top-member-${d}`},[g("div",Vxt,[g("img",{src:u.avatar,alt:"Member"},null,8,Fxt),g("span",Nxt,S(s.members.length-d),1)]),g("div",Bxt,[g("h5",null,S(u.display_name),1),g("p",{title:u.created_at,class:"date meta_line"},S(t.$t("Joined %s",t.humanDateDiff(u.created_at))),9,zxt)]),g("div",Hxt,S(u[n.pointLabel]),1)]))),128)):(v(),A("div",Rxt,S(t.$t("No Activity")),1))])]))])}const jxt=de(Pxt,[["render",Uxt]]),Wxt={name:"MembersAnalytics",components:{CheckProStatus:lS,AnalyticsHeader:_xt,AnalyticsWidgets:Cxt,MembersActivitiesChart:Txt,TopMembersSection:jxt},data(){return{predefinedDates:[{key:"7",label:this.$t("Last Week")},{key:"15",label:this.$t("Last 15 days")},{key:"30",label:this.$t("Last Month")},{key:"90",label:this.$t("Last Three Month")},{key:"",label:this.$t("Custom")}],predefinedDate:"30",instanceKey:null,dateRanges:[new Date(new Date().setDate(new Date().getDate()-30)).toISOString().split("T")[0],new Date().toISOString().split("T")[0]]}},computed:{isAnalyticsEnabled(){return this.hasFeature("has_analytics")}},mounted(){this.changeTitle(this.$t("Members analytics"))},methods:{updateDateRanges(t){this.dateRanges=t,this.instanceKey=new Date().toDateString()},updatePredefinedDate(t){this.predefinedDate=t}}},Yxt={key:0},qxt={key:1},Gxt={class:"fcom-report-body"},Xxt={class:"fcom-members-activities-wrap"};function Kxt(t,e,n,i,s,o){const r=W("CheckProStatus"),a=W("AnalyticsHeader"),l=W("AnalyticsWidgets"),c=W("MembersActivitiesChart"),u=W("TopMembersSection");return o.isAnalyticsEnabled?(v(),A("div",qxt,[(v(),A("div",{class:"fcom-report-wrap",key:s.instanceKey},[_(a,{"predefined-date":s.predefinedDate,"predefined-dates":s.predefinedDates,"date-ranges":s.dateRanges,"onUpdate:dateRanges":o.updateDateRanges,"onUpdate:predefinedDate":o.updatePredefinedDate},null,8,["predefined-date","predefined-dates","date-ranges","onUpdate:dateRanges","onUpdate:predefinedDate"]),g("div",Gxt,[_(l,{"date-ranges":s.dateRanges},null,8,["date-ranges"]),_(c,{"date-ranges":s.dateRanges},null,8,["date-ranges"]),g("div",Xxt,[_(u,{title:t.$t("Top Members"),"tooltip-content":t.$t("Top members by Activity count"),"date-ranges":s.dateRanges,endpoint:"analytics/members/top-members","point-label":"total_points"},null,8,["title","tooltip-content","date-ranges"]),_(u,{title:t.$t("Post starters"),"tooltip-content":t.$t("Top Member who started the most posts"),"date-ranges":s.dateRanges,endpoint:"analytics/members/top-post-starters","point-label":"posts_count"},null,8,["title","tooltip-content","date-ranges"]),_(u,{title:t.$t("Top Commenters"),"tooltip-content":t.$t("Top Member who commented the most"),"date-ranges":s.dateRanges,endpoint:"analytics/members/top-commenters","point-label":"comments_count"},null,8,["title","tooltip-content","date-ranges"])])])]))])):(v(),A("div",Yxt,[_(r)]))}const Zxt=de(Wxt,[["render",Kxt]]),Jxt={name:"AnalyticsHeader",props:{predefinedDate:{type:String,default:"30"},predefinedDates:{type:Array,required:!0},dateRanges:{type:Array,required:!0},activeSpace:{type:Number,default:0}},emits:["update:predefinedDate","update:dateRanges","update:active-space"],data(){return{localActiveSpace:this.activeSpace,localPredefinedDate:this.predefinedDate,localDateRanges:this.dateRanges}},methods:{onSpaceChange(){this.$emit("update:active-space",this.localActiveSpace)},setDateRange(t){if(!t||t===""){this.$nextTick(()=>{this.$refs.datePickerRef.focus()});return}const e=new Date;e.setDate(e.getDate()-parseInt(t));const n=e.toISOString().split("T")[0],i=new Date().toISOString().split("T")[0];this.localDateRanges=[n,i],this.$emit("update:dateRanges",this.localDateRanges),this.$emit("update:predefinedDate",this.localPredefinedDate)},onDateRangeChange(){this.$emit("update:dateRanges",this.localDateRanges),this.$emit("update:predefinedDate","")},disabledDate(t){return t.getTime()>Date.now()}},watch:{predefinedDate(t){this.localPredefinedDate=t},dateRanges:{handler(t){this.localDateRanges=t},deep:!0}}},Qxt={class:"fcom-report-header"},e4t={class:"fcom-report-header-action"};function t4t(t,e,n,i,s,o){const r=on,a=Jt,l=Od;return v(),A("div",Qxt,[g("h4",null,S(t.$t("Spaces")),1),g("div",e4t,[_(a,{class:"space-selector",modelValue:s.localActiveSpace,"onUpdate:modelValue":e[0]||(e[0]=c=>s.localActiveSpace=c),filterable:"",placeholder:t.$t("Select Space"),onChange:o.onSpaceChange,clearable:""},{default:w(()=>[(v(!0),A(ee,null,Ce(t.appVars.auth.spaces,(c,u)=>(v(),D(r,{key:`space-${u}`,label:c.title,value:c.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","onChange"]),_(a,{modelValue:s.localPredefinedDate,"onUpdate:modelValue":e[1]||(e[1]=c=>s.localPredefinedDate=c),onChange:o.setDateRange,class:"date-selector"},{default:w(()=>[(v(!0),A(ee,null,Ce(n.predefinedDates,(c,u)=>(v(),D(r,{key:`date-shortcut-${u}`,label:c.label,value:c.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"]),_(l,{modelValue:s.localDateRanges,"onUpdate:modelValue":e[2]||(e[2]=c=>s.localDateRanges=c),ref:"datePickerRef",type:"daterange","range-separator":"-",clearable:!1,"disabled-date":o.disabledDate,"start-placeholder":t.$t("Start date"),"end-placeholder":t.$t("End date"),format:t.siteDateFormat,"value-format":"YYYY-MM-DD",onChange:o.onDateRangeChange},null,8,["modelValue","disabled-date","start-placeholder","end-placeholder","format","onChange"])])])}const n4t=de(Jxt,[["render",t4t]]),s4t={name:"AnalyticsWidgets",components:{Loading:La},props:["activeSpace","dateRanges"],data(){return{loading:!1,widgets:[]}},watch:{activeSpace:"fetchData",dateRanges:"fetchData"},methods:{fetchData(){this.loading=!0,this.$get("analytics/spaces/widget",{start_date:this.dateRanges[0],end_date:this.dateRanges[1],activity:"posts",space_id:this.activeSpace}).then(t=>{this.widgets=Object.values(t.data).map(e=>({...e,down:e==null?void 0:e.comparison.startsWith("-")}))}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.fetchData()}},i4t={class:"fcom-report-stat-widgets"},o4t={class:"stat-title"};function r4t(t,e,n,i,s,o){const r=W("Loading");return v(),A("div",i4t,[s.loading?(v(),D(r,{key:0,section:1})):O("",!0),s.loading?O("",!0):(v(!0),A(ee,{key:1},Ce(s.widgets,(a,l)=>(v(),A("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",o4t,S(a.title),1),g("h3",null,[B(S(a.total_records)+" ",1),g("span",{class:G(["stat-percent",{"stat-down":a.down}])},S(a.comparison)+" % ",3)])]))),128))])}const a4t=de(s4t,[["render",r4t]]),l4t={name:"AnalyticsChart",components:{ReportsChart:CS,Loading:La},props:["activeSpace","dateRanges"],data(){return{loading:!1,renderChart:!1,chart:{xaxis:{labels:{datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd mm yy",hour:"HH:mm"}}},renderKey:null,data:[],series:[{name:"Posts",data:[],type:"column"}],categories:[]}}},watch:{activeSpace:"fetchData",dateRanges:"fetchData"},methods:{fetchData(){this.loading=!0,this.renderChart=!1,this.$get("analytics/spaces/activity",{start_date:this.dateRanges[0],end_date:this.dateRanges[1],space_id:this.activeSpace}).then(t=>{this.populateGraphData(t.data)}).catch(this.$handleError).finally(()=>this.loading=!1)},populateGraphData(t){this.chart.series[0]={data:t.data.map(n=>n.data),name:t.title,type:"column",color:"#6895FF"};let e=0;this.chart.series[1]={data:t.data.map(n=>(e+=n.data,e)),name:this.$t("Cumulative"),type:"area",width:"100%"},this.chart.categories=t.data.map(n=>n.date),this.chart.renderKey=new Date().toDateString(),this.renderChart=!0}},mounted(){this.fetchData()}},c4t={class:"fcom-report-chart",style:{"min-height":"400px"}},u4t={key:1},d4t={class:"fcom-report-chart-header"},h4t={key:0};function f4t(t,e,n,i,s,o){const r=W("Loading"),a=W("ReportsChart");return v(),A("div",c4t,[s.loading?(v(),D(r,{key:0,section:1})):O("",!0),s.loading?O("",!0):(v(),A("div",u4t,[g("div",d4t,[g("h4",null,S(t.$t("Space Activities")),1)]),s.renderChart?(v(),A("div",h4t,[(v(),D(a,{key:s.chart.renderKey,"series-name":t.$t("Activities"),data:s.chart.data,options:s.chart,series:s.chart.series,categories:s.chart.categories},null,8,["series-name","data","options","series","categories"]))])):O("",!0)]))])}const p4t=de(l4t,[["render",f4t]]),m4t={name:"PopularSpaces",components:{InfoFilled:fp,Loading:La},props:["activeSpace","dateRanges","title"],data(){return{loading:!1,popularSpaces:{data:[],columns:[]}}},watch:{activeSpace:"fetchData",dateRanges:"fetchData"},methods:{fetchData(){this.loading=!0,this.$get("analytics/spaces/popular",{start_date:this.dateRanges[0],end_date:this.dateRanges[1],space_id:this.activeSpace}).then(t=>{this.popularSpaces.data=t.data.data,this.popularSpaces.columns=t.data.columns}).catch(t=>this.$handleError(t)).finally(()=>this.loading=!1)}},mounted(){this.fetchData()}},g4t={class:"fcom-report-popular-time"},v4t={key:1},_4t={class:"fcom-report-chart-header"};function y4t(t,e,n,i,s,o){const r=W("Loading"),a=W("InfoFilled"),l=be,c=Cs,u=Xr,d=Gr;return v(),A("div",g4t,[s.loading?(v(),D(r,{key:0,section:1})):O("",!0),s.loading?O("",!0):(v(),A("div",v4t,[g("div",_4t,[g("h4",null,[B(S(n.title)+" ",1),_(c,{class:"box-item",effect:"dark",content:t.$t("Top 10 spaces with most activities"),placement:"top-start"},{default:w(()=>[_(l,null,{default:w(()=>[_(a)]),_:1})]),_:1},8,["content"])])]),_(d,{data:s.popularSpaces.data,style:{width:"100%"}},{default:w(()=>[(v(!0),A(ee,null,Ce(s.popularSpaces.columns,(h,f)=>(v(),D(u,{key:`popular-spaces-${f}`,prop:h.prop,label:h.label,width:h.width},null,8,["prop","label","width"]))),128))]),_:1},8,["data"])]))])}const b4t=de(m4t,[["render",y4t]]),w4t={name:"SpaceAnalytics",components:{CheckProStatus:lS,Loading:La,AnalyticsHeader:n4t,AnalyticsWidgets:a4t,AnalyticsChart:p4t,PopularSpaces:b4t},data(){return{pageLoaded:!1,instanceKey:null,activeSpace:null,dateRanges:[new Date(new Date().setDate(new Date().getDate()-30)).toISOString().split("T")[0],new Date().toISOString().split("T")[0]],predefinedDate:"30",predefinedDates:[{key:"7",label:this.$t("Last Week")},{key:"15",label:this.$t("Last 15 days")},{key:"30",label:this.$t("Last Month")},{key:"90",label:this.$t("Last Three Month")},{key:"",label:this.$t("Custom")}]}},computed:{isAnalyticsEnabled(){return this.hasFeature("has_analytics")}},mounted(){this.pageLoaded=!0,this.changeTitle(this.$t("Space analytics"))}},k4t={key:0},C4t={key:1},x4t={class:"fcom-report-body"};function S4t(t,e,n,i,s,o){const r=W("CheckProStatus"),a=W("Loading"),l=W("AnalyticsHeader"),c=W("AnalyticsWidgets"),u=W("AnalyticsChart"),d=W("PopularSpaces");return o.isAnalyticsEnabled?(v(),A("div",C4t,[s.pageLoaded?(v(),A("div",{class:"fcom-report-wrap",key:s.instanceKey},[_(l,{"active-space":s.activeSpace,"date-ranges":s.dateRanges,"predefined-date":s.predefinedDate,"predefined-dates":s.predefinedDates,"onUpdate:activeSpace":e[0]||(e[0]=h=>s.activeSpace=h),"onUpdate:dateRanges":e[1]||(e[1]=h=>s.dateRanges=h),"onUpdate:predefinedDate":e[2]||(e[2]=h=>s.predefinedDate=h)},null,8,["active-space","date-ranges","predefined-date","predefined-dates"]),g("div",x4t,[_(c,{"active-space":s.activeSpace,"date-ranges":s.dateRanges},null,8,["active-space","date-ranges"]),_(u,{"active-space":s.activeSpace,"date-ranges":s.dateRanges},null,8,["active-space","date-ranges"]),_(d,{"active-space":s.activeSpace,"date-ranges":s.dateRanges,title:s.activeSpace?t.$t("Popular Posts"):t.$t("Popular Spaces")},null,8,["active-space","date-ranges","title"])])])):(v(),D(a,{key:0,section:3}))])):(v(),A("div",k4t,[_(r)]))}const $4t=de(w4t,[["render",S4t]]),A4t=[{path:"/settings",component:g3t,meta:{active_menu:"settings"},children:[{name:"settings",path:"",component:pht,meta:{active_menu:"settings"}},{name:"customization",path:"customization",component:Itt,meta:{active_menu:"settings"}},{name:"admin_moderators",path:"moderators",component:vft,meta:{active_menu:"settings"}},{name:"email_notifications",path:"email-notifications",component:dnt,meta:{active_menu:"settings"}},{name:"features",path:"features",component:Out,meta:{active_menu:"settings"}},{name:"menu_settings",path:"menu-settings",component:Lht,meta:{active_menu:"settings"}},{path:"space_groups",name:"space_groups",component:$kt,meta:{active_menu:"settings"}},{path:"topics-settings",name:"all_topics",component:Eet,meta:{active_menu:"settings"}},{path:"content-moderation",name:"content_moderation",component:$wt,meta:{active_menu:"settings"}},{path:"privacy-settings",name:"privacy_settings",component:f3t,meta:{active_menu:"settings"}},{path:"tools",name:"tools",component:Hwt,meta:{active_menu:"settings"}},{path:"crm-access-config",name:"crm_access_config",component:GQe,meta:{active_menu:"settings"}},{path:"incoming-webhooks",name:"incoming_webhooks",component:i6t,meta:{active_menu:"settings"}}]},{path:"/manage-courses",component:bJe,name:"manage_courses",meta:{active_menu:"manage_courses"}},{path:"/manage-courses/edit/:course_id",component:NGe,props:!0,meta:{active_menu:"manage_courses"},children:[{name:"edit_lessons",path:"lessons",component:FZe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_students",path:"students",component:iRe,props:!0,meta:{active_menu:"manage_courses"}},{name:"quiz_results",path:"quiz-results",component:cVe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_overview",path:"overview",component:QUe,props:!0,meta:{active_menu:"manage_courses"}}]},{path:"/analytics",component:c6t,name:"analytics",meta:{active_menu:"analytics"},children:[{name:"analytics_overview",path:"overview",component:fxt,meta:{active_menu:"analytics_overview"}},{name:"analytics_members",path:"members",component:Zxt,meta:{active_menu:"analytics_members"}},{name:"analytics_spaces",path:"spaces",component:$4t,meta:{active_menu:"analytics_spaces"}}]},{path:"/manage-migrations",component:uQe,name:"manage_migrations",meta:{active_menu:"manage_migrations"}}],E4t={name:"VerifiedSign"},M4t=g("span",{class:"fcom_verified"},[g("svg",{viewBox:"0 0 22 22","aria-label":"Verified account",role:"img","data-testid":"icon-verified"},[g("g",null,[g("path",{d:"M20.396 11c-.018-.646-.215-1.275-.57-1.816-.354-.54-.852-.972-1.438-1.246.223-.607.27-1.264.14-1.897-.131-.634-.437-1.218-.882-1.687-.47-.445-1.053-.75-1.687-.882-.633-.13-1.29-.083-1.897.14-.273-.587-.704-1.086-1.245-1.44S11.647 1.62 11 1.604c-.646.017-1.273.213-1.813.568s-.969.854-1.24 1.44c-.608-.223-1.267-.272-1.902-.14-.635.13-1.22.436-1.69.882-.445.47-.749 1.055-.878 1.688-.13.633-.08 1.29.144 1.896-.587.274-1.087.705-1.443 1.245-.356.54-.555 1.17-.574 1.817.02.647.218 1.276.574 1.817.356.54.856.972 1.443 1.245-.224.606-.274 1.263-.144 1.896.13.634.433 1.218.877 1.688.47.443 1.054.747 1.687.878.633.132 1.29.084 1.897-.136.274.586.705 1.084 1.246 1.439.54.354 1.17.551 1.816.569.647-.016 1.276-.213 1.817-.567s.972-.854 1.245-1.44c.604.239 1.266.296 1.903.164.636-.132 1.22-.447 1.68-.907.46-.46.776-1.044.908-1.681s.075-1.299-.165-1.903c.586-.274 1.084-.705 1.439-1.246.354-.54.551-1.17.569-1.816zM9.662 14.85l-3.429-3.428 1.293-1.302 2.072 2.072 4.4-4.794 1.347 1.246z"})])])],-1);function T4t(t,e,n,i,s,o){const r=Cs;return v(),D(r,{content:t.$t("Verified"),placement:"top"},{default:w(()=>[M4t]),_:1},8,["content"])}const P4t=de(E4t,[["render",T4t]]),I4t={name:"UserBadge",props:["badge","is_preview","profile"],computed:{renderingBadges(){var t;if(!this.appVars.user_badges&&!this.is_preview)return null;if(this.profile){let e=this.profile.badge_slugs;if(e||(e=(t=this.profile.meta)==null?void 0:t.badge_slug,typeof e=="string"&&(e=[e])),!e||e.length==0)return null;let n=[];for(let i=0;i<e.length;i++){let s=this.appVars.user_badges[e[i]];s&&n.push(s)}return n}return[this.badge]}}},L4t=["src"],O4t={key:1,class:"fcom_emoji"},D4t={key:2,class:"fcom_shape"},R4t={key:1};function V4t(t,e,n,i,s,o){const r=be,a=Cs;return o.renderingBadges?(v(!0),A(ee,{key:0},Ce(o.renderingBadges,l=>(v(),A("div",{class:G([{user_icon_only:l.show_label!="yes"},"user_badge"])},[_(a,{content:l.title,placement:"top"},{default:w(()=>[g("div",{style:Xe({backgroundColor:l.background_color,color:l.color,borderColor:l.color}),class:"user_badge_inner"},[l.config?(v(),A(ee,{key:0},[l.config.logo?(v(),A("img",{key:0,alt:"",src:l.config.logo},null,8,L4t)):l.config.emoji?(v(),A("span",O4t,S(l.config.emoji),1)):l.config.shape_svg?(v(),A("span",D4t,[_(r,{innerHTML:l.config.shape_svg},null,8,["innerHTML"])])):O("",!0)],64)):O("",!0),l.show_label=="yes"?(v(),A("span",R4t,S(l.title),1)):O("",!0)],4)]),_:2},1032,["content"])],2))),256)):O("",!0)}const F4t=de(I4t,[["render",V4t]]),N4t={name:"WelcomeBanner",components:{MediaPreview:gp},props:{config:{type:Object,default:null},closeKey:{type:String,default:""},wrapperClass:{type:String,default:""},contentClass:{type:String,default:""}},data(){return{dismissed:!1}},computed:{effectiveConfig(){return this.config!==null?this.config:this.appVars.welcome_banner},showMedia(){return this.effectiveConfig&&this.effectiveConfig.mediaType=="video"&&this.effectiveConfig.bannerVideo},showCtaButtons(){var t;return this.effectiveConfig&&((t=this.effectiveConfig.ctaButtons)==null?void 0:t.length)&&this.effectiveConfig.ctaButtons.some(e=>e.link&&e.label)},isRemovable(){return this.effectiveConfig&&this.effectiveConfig.allowClose=="yes"},effectiveCloseKey(){return this.closeKey?this.closeKey:this.appVars.user_id?"fcom_welcome_banner_closed_auth":"fcom_welcome_banner_closed_guest"},showBanner(){if(this.dismissed)return!1;if(!this.isRemovable)return!0;const t=this.Storage.get(this.effectiveCloseKey,!1);return t?new Date().getTime()>t:!0}},methods:{closeBanner(){const t=new Date().getTime()+6048e5;this.Storage.set(this.effectiveCloseKey,t),this.dismissed=!0}}},B4t={key:0,class:"fcom_welcome_title"},z4t=["innerHTML"],H4t={key:2,class:"fcom_welcome_cta_buttons"},U4t=["href","target"];function j4t(t,e,n,i,s,o){const r=W("media-preview"),a=Fo,l=W("MoreFilled"),c=be,u=We,d=Wr,h=Yr,f=jr;return o.effectiveConfig&&o.showBanner?(v(),A("div",{key:0,class:G(["fcom_welcome_box",n.wrapperClass])},[o.showMedia?(v(),D(r,{key:0,media_item:o.effectiveConfig.bannerVideo},null,8,["media_item"])):o.effectiveConfig.bannerImage?(v(),D(a,{key:1,class:"feed_media",alt:t.$t("Image Preview"),src:o.effectiveConfig.bannerImage},null,8,["alt","src"])):O("",!0),g("div",{class:G(n.contentClass)},[o.effectiveConfig.title?(v(),A("h2",B4t,S(o.effectiveConfig.title),1)):O("",!0),o.effectiveConfig.description_rendered?(v(),A("div",{key:1,class:"fcom_welcome_sub",innerHTML:o.effectiveConfig.description_rendered},null,8,z4t)):O("",!0),o.showCtaButtons?(v(),A("div",H4t,[(v(!0),A(ee,null,Ce(o.effectiveConfig.ctaButtons,p=>(v(),A(ee,null,[p.link&&p.label?(v(),A("a",{key:0,href:p.link,target:p.newTab=="yes"?"_blank":"",class:G({"el-button fcom_primary_button":p.type=="primary","el-button fcom_secondary_button":p.type=="secondary","el-button is-text":p.type=="text","el-link fcom_link_button":p.type=="link"})},S(p.label),11,U4t)):O("",!0)],64))),256))])):O("",!0)],2),o.isRemovable?(v(),D(f,{key:2,trigger:"click",class:"fcom_welcome_close"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{onClick:o.closeBanner},{default:w(()=>[B(S(t.$t("Hide Banner")),1)]),_:1},8,["onClick"])]),_:1})]),default:w(()=>[_(u,{"aria-label":t.$t("Hide Banner"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1})]),_:1},8,["aria-label"])]),_:1})):O("",!0)],2)):O("",!0)}const W4t=de(N4t,[["render",j4t]]);bu(()=>Promise.resolve().then(()=>USt),void 0);bu(()=>Promise.resolve().then(()=>WSt),void 0);const Y4t=[MMe,aH,BMe,oH,rH,ATe,BTe,lTe,fTe,vTe,jTe,CMe,SMe,XTe,tTe,wTe,nH,mTe,gMe,ZMe,dTe,FTe,pMe,HTe,hMe,lMe,PMe,yTe,Q5,XMe,oTe,LTe,_Me,iH,sH,STe,MTe,QMe,wMe,VMe,CTe,J5,DTe,fp,f2,qMe,qTe];function sg(t){const e=[];if(typeof t=="object"&&t.join===void 0)for(const n in t)e.push(sg(t[n]));else if(typeof t=="object"&&t.join!==void 0)for(const n in t)e.push(sg(t[n]));else typeof t=="function"||typeof t=="string"&&e.push(t);return e.join("<br />")}const Ds=mx(_Oe),xS=w0e();xS.use(D0e);xS.use(({store:t})=>{t.$api={get:(e,n)=>window.FluentCommunityUtil.Rest.get(e,n),post:(e,n)=>window.FluentCommunityUtil.Rest.post(e,n),put:(e,n)=>window.FluentCommunityUtil.Rest.put(e,n),patch:(e,n)=>window.FluentCommunityUtil.Rest.patch(e,n),delete:e=>window.FluentCommunityUtil.Rest.delete(e)}});Ds.use(xS);Ds.use(Nve);Ds.config.globalProperties.appVars=window.fluentComAdmin;Ds.config.globalProperties.auth=window.fluentComAdmin.auth;Ds.config.globalProperties.has_pro=!!window.fluentComAdmin.pro;let MC="40%",TC="60%",UU="500px";window.innerWidth<600?(TC="95%",MC="90%",UU="90%"):window.innerWidth<800&&(TC="80%",MC="80%");Y4t.forEach(t=>{Ds.component(t.name,t)});Ds.component("VerifiedSign",P4t);Ds.component("UserAvatar",_2);Ds.component("UserRouteLink",Jr);Ds.component("WelcomeBanner",W4t);Ds.component("UserBadge",F4t);function MT(){Ds.use(window.FluentCommunityUtil.eventBus);const t=window.FluentCommunityUtil.Rest;Ds.mixin({data(){return{Storage:window.FluentCommunityUtil.Storage,is_rtl:!1,drawerWidth:MC,dialogWidth:TC,modalWidth:UU,feedMonitorCache:{},mounted:!1,isMobile:window.innerWidth<=768,has_leaderboard:this.appVars.features.leaderboard}},computed:{siteDateFormat(){return this.appVars.date_formatter||"MMM D, YYYY"},siteTimeFormat(){return this.appVars.time_formatter||"HH:mm"},siteDateTimeFormat(){return this.appVars.date_time_formatter||"MMM D, YYYY HH:mm"}},methods:{$get:t.get,$post:t.post,$uploadFile:t.uploadFile,$put:t.put,$del:t.delete,$patch:t.patch,$ajax:t.ajax,changeTitle(s){document.title=s+" - "+this.appVars.site_title},$handleError(s){let o="";typeof s=="string"?o=s:s&&s.message?o=s.message:o=sg(s),o||(o="Something is wrong!"),typeof o!="string"&&(o=sg(o)),this.$notify({type:"error",title:this.$t("Error"),message:o,dangerouslyUseHTMLString:!0})},convertToText:sg,$t(s){s=window.fluentComAdmin.i18n[s]||s;const o=Array.prototype.slice.call(arguments,1);if(o.length===0)return s;const r=/%(\d*)\$?s|%d/g;let a=0;return s=s.replace(r,(l,c)=>{if(c){const u=parseInt(c,10)-1;return u<o.length?o[u]:l}else return a<o.length?o[a++]:l}),s},$_n(s,o,r){return r>1?this.$t(o,r):this.$t(s,r)},$labelize(s){return s?(s=s.charAt(0).toUpperCase()+s.slice(1),window.fluentComAdmin.i18n[s]?window.fluentComAdmin.i18n[s]:s.replace(/_/g," ").replace(/\b\w/g,o=>o.toUpperCase())):""},$toClipboard(s,o="Copied to clipboard"){navigator.clipboard.writeText(s).then(()=>{this.$notify.success(this.$t(o))}).catch(r=>{this.$notify.error(this.$t("Failed to copy"))})},dayjs,relativeTimeFromUtc(s){return dayjs.utc(s).local().fromNow()},$storeLocalData(s,o){this.Storage.set(s,o)},$getLocalData(s,o=""){return this.Storage.get(s,o)},ucFirst(s){return s?s.charAt(0).toUpperCase()+s.slice(1):""},convertTo24Hour(s){if(!s)return s;const o=s.match(/^(\d{1,2}):(\d{2})(?::\d{2})?\s*([AaPp][Mm])?$/);if(!o)return s;let r=parseInt(o[1],10);const a=o[2],l=o[3];if(l){const c=l.toUpperCase()==="PM";c&&r!==12&&(r+=12),!c&&r===12&&(r=0)}return String(r).padStart(2,"0")+":"+a},ucWords(s){return s?s.replace(/\b[a-z]/g,function(o){return o.toUpperCase()}):""},smartDate(s,o=!1,r=!1){if(!s)return"";const a=this.siteTimeFormat;let l="D MMM, YYYY";dayjs(s).isSame(new Date,"year")?(l="D MMM",o&&(Math.abs(dayjs(s).diff(new Date,"days"))<=5||r)&&(l="D MMM, "+a)):o&&r&&(l="D MMM, YYYY, "+a);const c=dayjs(s);return c.isValid()?c.format(l):null},hasPermission(s){return this.appVars.permissions[s]},isAdmin(){return!!this.appVars.permissions.community_admin},hasCourseAdminAccess(){return!!this.appVars.permissions.course_admin},hasCourseCreatorAccess(){return!!this.appVars.permissions.course_creator},hasSpaceAdminAccess(s=null){return this.hasPermissionOrInCurrentSpace("community_admin")||s&&this.isSpaceAdmin(s)},hasSpaceModeratorAccess(s=null){return this.hasPermissionOrInCurrentSpace("community_moderator")||s&&this.isSpaceModerator(s)},canDeleteFeed(s){return this.auth.user_id&&(s.user_id==this.auth.user_id||this.hasPermissionOrInCurrentSpace("delete_any_feed"))},canEditFeed(s){return this.auth.user_id&&(s.user_id==this.auth.user_id||this.hasPermissionOrInCurrentSpace("edit_any_feed"))},canDeleteComment(s){return this.auth&&(s.user_id==this.auth.user_id||this.hasPermissionOrInCurrentSpace("delete_any_comment"))},canEditComment(s){return this.auth.user_id&&(s.user_id==this.auth.user_id||this.hasPermissionOrInCurrentSpace("edit_any_comment"))},hasSpaceAccess(s){return s?this.appVars.user_membership_slugs.indexOf(s)!==-1:!0},$upgradeUrl(s,o){const r=this.appVars&&this.appVars.upgrade_url;if(!r)return r;try{const a=new URL(r);return s&&a.searchParams.set("utm_content",s),o&&a.searchParams.set("utm_campaign",o),a.toString()}catch{return r}},hasInPermission(s,o){return!o||typeof o!="object"?!1:o[s]},hasCurrentSpacePermission(s){return window.fcom_current_community?this.hasInPermission(s,window.fcom_current_community.permissions):!1},hasPermissionOrInCurrentSpace(s){return this.hasPermission(s)?!0:this.hasCurrentSpacePermission(s)},humanDateDiff(s){if(!s)return"";const o=dayjs.utc(s,"YYYY-MM-DD HH:mm:ss");if(!o.isValid())return"";const r=o.add(this.appVars.date_offset,"s");return dayjs(r.format("YYYY-MM-DD HH:mm:ss")).from(dayjs(dayjs.utc().format("YYYY-MM-DD HH:mm:ss")))},hasCommentPermission(s){var o;return this.auth.user_id?!s.space_id&&!s.course_id?this.auth.user_id&&(s.user_id==this.auth.user_id||s.privacy=="public"):this.hasSpaceAccess((o=s.space)==null?void 0:o.slug):!1},getExcerpt(s,o=250){if(!s)return"";let r=s.replace(/(<([^>]+)>)/ig,"");return r=r.replace(/(\*\*|__)(.*?)\1/g,"$2"),r=r.replace(/(#+)(.*)/g,"$2"),r=r.replace(/\[(.*?)\]\((.*?)\)/g,"$1"),typeof DOMParser<"u"&&(r=new DOMParser().parseFromString(r,"text/html").body.textContent||""),r.length>o&&(r=r.substring(0,o)+"..."),r},mdToHtml(s){return s?(s=s.replace("&#x20;","",s),s=s.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>"),s=s.replace(/\*(.*?)\*/g,"<em>$1</em>"),s=s.replace(/\~\~(.*?)\~\~/g,"<del>$1</del>"),s=s.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2">$1</a>'),s=s.replace(/<(https?:\/\/[^\s>]+)>/g,'<a href="$1">$1</a>'),s=s.replace(/^##\s+(.*?)$/gm,"<h2>$1</h2>"),s=s.replace(/^###\s+(.*?)$/gm,"<h3>$1</h3>"),s=s.replace(/^####\s+(.*?)$/gm,"<h4>$1</h4>"),s=s.replace(/^>\s+(.*?)$/gm,"<blockquote>$1</blockquote>"),s=s.replace(/`{3}([\s\S]*?)`{3}/g,"<pre><code>$1</code></pre>"),s=s.replace(/`([^`]+)`/g,"<code>$1</code>"),s=s.replace(/^([\*\-])\s+(.*)$/gm,"<li>$2</li>"),s=s.replace(/(<li>.*?<\/li>(?:\n<li>.*?<\/li>)*)/g,function(o){return"<ul>"+o.replace(/\n/g,"")+"</ul>"}),s=s.replace(/\n/g,"<br>"),s):""},$convertToBoolean(s){return s==="true"||s===!0||s===1||s==="1"||s==="yes"||s==="on"},each:_c,hasFeature(s){return this.appVars.features[s]},isCommunityModerator(){return window.fluentComAdmin.auth.community_roles.some(s=>s==="admin"||s==="moderator")},isSpaceModerator(s){var r,a;return["admin","moderator"].includes((a=(r=s==null?void 0:s.membership)==null?void 0:r.pivot)==null?void 0:a.role)},isSpaceAdmin(s){var o,r;return((r=(o=s==null?void 0:s.membership)==null?void 0:o.pivot)==null?void 0:r.role)=="admin"},getCurrentAuthUrl(){let s=window.location.href,o=this.appVars.auth_url;return o=o.replace(/(\?|&)redirect_to=[^&]+/,""),o.indexOf("?")===-1?o+="?":o+="&",o+"redirect_to="+encodeURIComponent(s)},$formatNumber(s){return s&&s.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},$getRouteLink(s,o={}){return _c(o,(r,a)=>{s=s.replace(":"+a,r)}),this.appVars.portal_url+s},isOnline(s){if(!s)return!1;const r=dayjs.utc(s,"YYYY-MM-DD HH:mm:ss").add(this.appVars.date_offset,"seconds").diff(dayjs.utc(),"minutes");return r<=5&&r>=0},$exportToCsv(s,o="fcom-export.csv"){if(!s||!Array.isArray(s)||s.length===0){this.$notify({type:"error",title:this.$t("Error"),message:this.$t("No data available to export.")});return}const r=Object.keys(s[0]),a=[r.join(",")];s.forEach(d=>{const h=r.map(f=>`"${String(d[f]??"").replace(/"/g,'""')}"`);a.push(h.join(","))});const l="\uFEFF"+a.join(`
`),c=new Blob([l],{type:"text/csv;charset=utf-8;"}),u=document.createElement("a");u.href=URL.createObjectURL(c),u.download=o,document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(u.href)},doNothing(){console.log("OK")}},mounted(){window.fcom_mounted||(window.fcom_mounted=!0,this.isMobile&&dayjs.updateLocale("en",{relativeTime:{future:"in %s",past:"%s",s:"now",m:"1m",mm:"%dm",h:"1 h",hh:"%d h",d:"%dd",dd:"%dd",M:"1 mo",MM:"%d mo",y:"%d y",yy:"%d y"}}),document.addEventListener("fcom_renew_rest_nonce",s=>{if(window.__fcomNonceRenewInFlight)return;window.__fcomNonceRenewInFlight=!0;const o=()=>{window.__fcomSessionExpiredShown||(window.__fcomSessionExpiredShown=!0,window.fluentFrameworkApp.$messageBox.alert(this.$t("Your session has expired due to inactivity. Please refresh the page to continue."),this.$t("Session Expired"),{confirmButtonText:this.$t("Refresh"),callback:r=>{location.reload()}}))};this.$ajax("GET","fluent_community_renew_nonce",{ajax_nonce:window.fluentComAdmin.ajax_nonce}).then(r=>{r&&r.rest_nonce?(window.fluentComAdmin.rest.nonce=r.rest_nonce,window.fluentComAdmin.ajax_nonce=r.ajax_nonce,window.__fcomNonceRenewInFlight=!1):o()}).catch(()=>{o()})}))}}),Ds.config.globalProperties.$notify=d0e,Ds.config.globalProperties.$confirm=vw.confirm,Ds.config.globalProperties.$promt=vw.prompt,Ds.config.globalProperties.$messageBox=vw,Ds.config.globalProperties.$gloablStorage={};const e=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_routes",A4t);let n=null;window.fluentComAdmin.routing_system=="hash"?n=a7({routes:e,history:AK()}):n=a7({routes:e,history:VL(window.fluentComAdmin.portal_slug)});const i=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_app",Ds);pH().initialize(),window.fluentFrameworkApp=i.use(n).mount("#fluent_com_portal"),window.fluentFrameworkAppRouter=n}window.FluentCommunityUtil?MT():document.addEventListener("fluentCommunityUtilReady",function(){MT()});var Vu,lf;class q4t{constructor(e){ea(this,Vu,void 0);ea(this,lf,new Set);qi(this,Vu,e)}get current(){return Yt(this,Vu)}set current(e){Yt(this,Vu)!=e&&(qi(this,Vu,e),Yt(this,lf).forEach(n=>n(e)))}on(e){return Yt(this,lf).add(e),()=>Yt(this,lf).delete(e)}}Vu=new WeakMap,lf=new WeakMap;const jU=t=>new q4t(t),PC=Symbol.for("atomico.hooks");globalThis[PC]=globalThis[PC]||{};let Yf=globalThis[PC];const G4t=Symbol.for("Atomico.suspense"),WU=Symbol.for("Atomico.effect"),X4t=Symbol.for("Atomico.layoutEffect"),YU=Symbol.for("Atomico.insertionEffect"),iv=(t,e,n)=>{const{i,hooks:s}=Yf.c,o=s[i]=s[i]||{};return o.value=t(o.value),o.effect=e,o.tag=n,Yf.c.i++,s[i].value},td=t=>iv((e=jU(t))=>e),SS=()=>iv((t=jU(Yf.c.host))=>t),qU=()=>Yf.c.update,K4t=(t,e,n=0)=>{let i={},s=!1;const o=()=>s,r=(c,u)=>{for(const d in i){const h=i[d];h.effect&&h.tag===c&&(h.value=h.effect(h.value,u))}};return{load:c=>{Yf.c={host:e,hooks:i,update:t,i:0,id:n};let u;try{s=!1,u=c()}catch(d){if(d!==G4t)throw d;s=!0}finally{Yf.c=null}return u},cleanEffects:c=>(r(YU,c),()=>(r(X4t,c),()=>{r(WU,c)})),isSuspense:o}},ov=Symbol.for;function GU(t,e){const n=t.length;if(n!==e.length)return!1;for(let i=0;i<n;i++){let s=t[i],o=e[i];if(s!==o)return!1}return!0}const qa=t=>typeof t=="function",ig=t=>typeof t=="object",{isArray:Z4t}=Array,IC=(t,e)=>(e?t instanceof HTMLStyleElement:!0)&&"hydrate"in((t==null?void 0:t.dataset)||{});function XU(t,e){let n;const i=s=>{let{length:o}=s;for(let r=0;r<o;r++){const a=s[r];if(a&&Array.isArray(a))i(a);else{const l=typeof a;if(a==null||l==="function"||l==="boolean")continue;l==="string"||l==="number"?(n==null&&(n=""),n+=a):(n!=null&&(e(n),n=null),e(a))}}};i(t),n!=null&&e(n)}const KU=(t,e,n)=>(t.addEventListener(e,n),()=>t.removeEventListener(e,n));let ZU=class{constructor(e,n,i){this.message=n,this.target=e,this.value=i}};class J4t extends ZU{}class Q4t extends ZU{}const Ny="Custom",e8t=null,t8t={true:1,"":1,1:1};function n8t(t,e,n,i,s){const{type:o,reflect:r,event:a,value:l,attr:c=i8t(e)}=(n==null?void 0:n.name)!=Ny&&ig(n)&&n!=e8t?n:{type:n},u=(o==null?void 0:o.name)===Ny&&o.map,d=l!=null?o==Function||!qa(l)?()=>l:l:null;Object.defineProperty(t,e,{configurable:!0,set(h){const f=this[e];d&&o!=Boolean&&h==null&&(h=d());const{error:p,value:m}=(u?a8t:l8t)(o,h);if(p&&m!=null)throw new J4t(this,`The value defined for prop '${e}' must be of type '${o.name}'`,m);f!=m&&(this._props[e]=m??void 0,this.update(),a&&s8t(this,a),this.updated.then(()=>{r&&(this._ignoreAttr=c,o8t(this,o,c,this[e]),this._ignoreAttr=null)}))},get(){return this._props[e]}}),d&&(s[e]=d()),i[c]={prop:e,type:o}}const s8t=(t,{type:e,base:n=CustomEvent,...i})=>t.dispatchEvent(new n(e,i)),i8t=t=>t.replace(/([A-Z])/g,"-$1").toLowerCase(),o8t=(t,e,n,i)=>i==null||e==Boolean&&!i?t.removeAttribute(n):t.setAttribute(n,(e==null?void 0:e.name)===Ny&&(e!=null&&e.serialize)?e==null?void 0:e.serialize(i):ig(i)?JSON.stringify(i):e==Boolean?"":i),r8t=(t,e)=>t==Boolean?!!t8t[e]:t==Number?Number(e):t==String?e:t==Array||t==Object?JSON.parse(e):t.name==Ny?e:new t(e),a8t=({map:t},e)=>{try{return{value:t(e),error:!1}}catch{return{value:e,error:!0}}},l8t=(t,e)=>t==null||e==null?{value:e,error:!1}:t!=String&&e===""?{value:void 0,error:!1}:t==Object||t==Array||t==Symbol?{value:e,error:{}.toString.call(e)!==`[object ${t.name}]`}:e instanceof t?{value:e,error:t==Number&&Number.isNaN(e.valueOf())}:t==String||t==Number||t==Boolean?{value:e,error:t==Number?typeof e!="number"?!0:Number.isNaN(e):t==String?typeof e!="string":typeof e!="boolean"}:{value:e,error:!0};let c8t=0;const u8t=t=>{var n;const e=((n=(t==null?void 0:t.dataset)||{})==null?void 0:n.hydrate)||"";return e||"c"+c8t++},Yd=(t,e=HTMLElement)=>{const n={},i={},s="prototype"in e&&e.prototype instanceof Element,o=s?e:"base"in e?e.base:HTMLElement,{props:r,styles:a}=s?t:e;class l extends o{constructor(){super(),this._setup(),this._render=()=>t({...this._props});for(const u in i)this[u]=i[u]}static get styles(){return[super.styles,a]}async _setup(){if(this._props)return;this._props={};let u,d;this.mounted=new Promise(y=>this.mount=()=>{y(),u!=this.parentNode&&(d!=u?this.unmounted.then(this.update):this.update()),u=this.parentNode}),this.unmounted=new Promise(y=>this.unmount=()=>{y(),(u!=this.parentNode||!this.isConnected)&&(h.cleanEffects(!0)()(),d=this.parentNode,u=null)}),this.symbolId=this.symbolId||Symbol(),this.symbolIdParent=Symbol();const h=K4t(()=>this.update(),this,u8t(this));let f,p=!0;const m=IC(this);this.update=()=>(f||(f=!0,this.updated=(this.updated||this.mounted).then(()=>{try{const y=h.load(this._render),b=h.cleanEffects();return y&&y.render(this,this.symbolId,m),f=!1,p&&!h.isSuspense()&&(p=!1,!m&&d8t(this)),b()}finally{f=!1}}).then(y=>{y&&y()})),this.updated),this.update()}connectedCallback(){this.mount(),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback(),this.unmount()}attributeChangedCallback(u,d,h){if(n[u]){if(u===this._ignoreAttr||d===h)return;const{prop:f,type:p}=n[u];try{this[f]=r8t(p,h)}catch{throw new Q4t(this,`The value defined as attr '${u}' cannot be parsed by type '${p.name}'`,h)}}else super.attributeChangedCallback(u,d,h)}static get props(){return{...super.props,...r}}static get observedAttributes(){const u=super.observedAttributes||[];for(const d in r)n8t(this.prototype,d,r[d],n,i);return Object.keys(n).concat(u)}}return l};function d8t(t){const{styles:e}=t.constructor,{shadowRoot:n}=t;if(n&&e.length){const i=[];XU(e,s=>{s&&(s instanceof Element?n.appendChild(s.cloneNode(!0)):i.push(s))}),i.length&&(n.adoptedStyleSheets=i)}}const JU=t=>(e,n)=>{iv(([i,s]=[])=>((s||!s)&&(s&&GU(s,n)?i=i||!0:(qa(i)&&i(),i=null)),[i,n]),([i,s],o)=>o?(qa(i)&&i(),[]):[i||e(),s],t)},bd=JU(WU),h8t=JU(YU);class f8t extends Array{constructor(e,n){let i=!0;const s=o=>{try{n(o,this,i)}finally{i=!1}};super(void 0,s,n),s(e)}}const Sr=t=>{const e=qU();return iv((n=new f8t(t,(i,s,o)=>{i=qa(i)?i(s[0]):i,i!==s[0]&&(s[0]=i,o||e())}))=>n)},By=(t,e)=>{const[n]=iv(([i,s,o=0]=[])=>((!s||s&&!GU(s,e))&&(i=t()),[i,e,o]));return n},rh=(t,e)=>By(()=>t,e),LC=ov("atomico/options");globalThis[LC]=globalThis[LC]||{sheet:!!document.adoptedStyleSheets};const QU=globalThis[LC];new Promise(t=>{QU.ssr||(document.readyState==="loading"?KU(document,"DOMContentLoaded",t):t())});const p8t={checked:1,value:1,selected:1},m8t={list:1,type:1,size:1,form:1,width:1,height:1,src:1,href:1,slot:1},g8t={shadowDom:1,staticNode:1,cloneNode:1,children:1,key:1},u_={},OC=[];class DC extends Text{}const v8t=ov("atomico/id"),og=ov("atomico/type"),I3=ov("atomico/ref"),ej=ov("atomico/vnode"),_8t=()=>{};function y8t(t,e,n){return nj(this,t,e,n)}const tj=(t,e,...n)=>{const i=e||u_;let{children:s}=i;if(s=s??(n.length?n:OC),t===_8t)return s;const o=t?t instanceof Node?1:t.prototype instanceof HTMLElement&&2:0;if(o===!1&&t instanceof Function)return t(s!=OC?{children:s,...i}:i);const r=QU.render||y8t;return{[og]:ej,type:t,props:i,children:s,key:i.key,shadow:i.shadowDom,static:i.staticNode,raw:o,is:i.is,clone:i.cloneNode,render:r}};function nj(t,e,n=v8t,i,s){let o;if(e&&e[n]&&e[n].vnode==t||t[og]!=ej)return e;(t||!e)&&(s=s||t.type=="svg",o=t.type!="host"&&(t.raw==1?(e&&t.clone?e[I3]:e)!=t.type:t.raw==2?!(e instanceof t.type):e?e[I3]||e.localName!=t.type:!e),o&&t.type!=null&&(t.raw==1&&t.clone?(i=!0,e=t.type.cloneNode(!0),e[I3]=t.type):e=t.raw==1?t.type:t.raw==2?new t.type:s?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,t.is?{is:t.is}:void 0)));const r=e[n]?e[n]:u_,{vnode:a=u_,cycle:l=0}=r;let{fragment:c,handlers:u}=r;const{children:d=OC,props:h=u_}=a;if(u=o?{}:u||{},t.static&&!o)return e;if(t.shadow&&!e.shadowRoot&&e.attachShadow({mode:"open",...t.shadow}),t.props!=h&&k8t(e,h,t.props,u,s),t.children!==d){const f=t.shadow?e.shadowRoot:e;c=w8t(t.children,c,f,n,!l&&i,s&&t.type=="foreignObject"?!1:s)}return e[n]={vnode:t,handlers:u,fragment:c,cycle:l+1},e}function b8t(t,e){const n=new DC(""),i=new DC("");let s;if(t[e?"prepend":"append"](n),e){let{lastElementChild:o}=t;for(;o;){const{previousElementSibling:r}=o;if(IC(o,!0)&&!IC(r,!0)){s=o;break}o=r}}return s?s.before(i):t.append(i),{markStart:n,markEnd:i}}function w8t(t,e,n,i,s,o){t=t==null?null:Z4t(t)?t:[t];const r=e||b8t(n,s),{markStart:a,markEnd:l,keyes:c}=r;let u;const d=c&&new Set;let h=a;if(t&&XU(t,f=>{if(typeof f=="object"&&!f[og])return;const p=f[og]&&f.key,m=c&&p!=null&&c.get(p);h!=l&&h===m?d.delete(h):h=h==l?l:h.nextSibling;const y=c?m:h;let b=y;if(f[og])b=nj(f,y,i,s,o);else{const k=f+"";!(b instanceof Text)||b instanceof DC?b=new Text(k):b.data!=k&&(b.data=k)}b!=h&&(c&&d.delete(b),!y||c?(n.insertBefore(b,h),c&&h!=l&&d.add(h)):y==l?n.insertBefore(b,l):(n.replaceChild(b,y),h=b)),p!=null&&(u=u||new Map,u.set(p,b))}),h=h==l?l:h.nextSibling,e&&h!=l)for(;h!=l;){const f=h;h=h.nextSibling,f.remove()}return d&&d.forEach(f=>f.remove()),r.keyes=u,r}function k8t(t,e,n,i,s){for(const o in e)!(o in n)&&TT(t,o,e[o],null,s,i);for(const o in n)TT(t,o,e[o],n[o],s,i)}function TT(t,e,n,i,s,o){if(e=e=="class"&&!s?"className":e,n=n??null,i=i??null,e in t&&p8t[e]&&(n=t[e]),!(i===n||g8t[e]||e[0]=="_"))if(t.localName==="slot"&&e==="assignNode"&&"assign"in t)t.assign(i);else if(e[0]=="o"&&e[1]=="n"&&(qa(i)||qa(n)))C8t(t,e.slice(2),i,o);else if(e=="ref")i&&(qa(i)?i(t):i.current=t);else if(e=="style"){const{style:r}=t;n=n||"",i=i||"";const a=ig(n),l=ig(i);if(a)for(const c in n)if(l)!(c in i)&&PT(r,c,null);else break;if(l)for(const c in i){const u=i[c];a&&n[c]===u||PT(r,c,u)}else r.cssText=i}else{const r=e[0]=="$"?e.slice(1):e;r===e&&(!s&&!m8t[e]&&e in t||qa(i)||qa(n))?t[e]=i??"":i==null?t.removeAttribute(r):t.setAttribute(r,ig(i)?JSON.stringify(i):i)}}function C8t(t,e,n,i){if(i.handleEvent||(i.handleEvent=s=>i[s.type].call(t,s)),n){if(!i[e]){const s=n.capture||n.once||n.passive?Object.assign({},n):null;t.addEventListener(e,i,s)}i[e]=n}else i[e]&&(t.removeEventListener(e,i),delete i[e])}function PT(t,e,n){let i="setProperty";n==null&&(i="removeProperty",n=null),~e.indexOf("-")?t[i](e,n):t[e]=n}const x8t=tj("host",{style:"display: contents"}),S8t="value",$8t=(t,e)=>{const n=SS(),i=td();h8t(()=>KU(n.current,"ConnectContext",s=>{s.composedPath().at(0)!==s.currentTarget&&t===s.detail.id&&(s.stopPropagation(),s.detail.connect(i))}),[t]),i.current=e},A8t=t=>{const e=Yd(({value:n})=>($8t(e,n),x8t),{props:{value:{type:Object,value:()=>t}}});return e[S8t]=t,e};A8t({dispatch(t,e){}});const E8t=0,ah=1,t0=2,n0=3,IT=4,mm=5,RC=6,sj=0,M8t=2,ij=3,oj=4,rj=mm,T8t=RC,aj=(t,e,n,i)=>{let s;e[0]=0;for(let o=1;o<e.length;o++){const r=e[o++],a=e[o]?(e[0]|=r?1:2,n[e[o++]]):e[++o];r===ij?i[0]=a:r===oj?i[1]=Object.assign(i[1]||{},a):r===rj?(i[1]=i[1]||{})[e[++o]]=a:r===T8t?i[1][e[++o]]+=a+"":r?(s=t.apply(a,aj(t,a,n,["",null])),i.push(s),a[0]?e[0]|=2:(e[o-2]=sj,e[o]=s)):i.push(a)}return i},P8t=function(t){let e=ah,n="",i="",s=[0],o,r;const a=l=>{e===ah&&(l||(n=n.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(sj,l,n):e===n0&&(l||n)?(s.push(ij,l,n),e=t0):e===t0&&n==="..."&&l?s.push(oj,l,0):e===t0&&n&&!l?s.push(rj,0,!0,n):e>=mm&&((n||!l&&e===mm)&&(s.push(e,0,n,r),e=RC),l&&(s.push(e,l,0,r),e=RC)),n=""};for(let l=0;l<t.length;l++){l&&(e===ah&&a(),a(l));for(let c=0;c<t[l].length;c++)o=t[l][c],e===ah?o==="<"?(a(),s=[s],e=n0):n+=o:e===IT?n==="--"&&o===">"?(e=ah,n=""):n=o+n[0]:i?o===i?i="":n+=o:o==='"'||o==="'"?i=o:o===">"?(a(),e=ah):e&&(o==="="?(e=mm,r=n,n=""):o==="/"&&(e<mm||t[l][c+1]===">")?(a(),e===n0&&(s=s[0]),e=s,(s=s[0]).push(M8t,0,e),e=E8t):o===" "||o==="	"||o===`
`||o==="\r"?(a(),e=t0):n+=o),e===n0&&n==="!--"&&(e=IT,s=s[0])}return a(),s},I8t=new Map;function Lt(t){let e=I8t;return e=aj(tj,e.get(t)||(e.set(t,e=P8t(t)),e),arguments,[]),e.length>1?e:e[0]}var $S=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},lh=(t,e,n)=>($S(t,e,"read from private field"),n?n.call(t):e.get(t)),ch=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},uh=(t,e,n,i)=>($S(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),L8t=(t,e,n)=>($S(t,e,"access private method"),n),d_,h_,gm,vm,f_,VC,lj;let AS=class{constructor(e){ch(this,VC),ch(this,d_,void 0),ch(this,h_,void 0),ch(this,gm,void 0),ch(this,vm,void 0),ch(this,f_,void 0),uh(this,gm,!1),this.onShow=()=>{},this.onHide=()=>{},uh(this,f_,(n,i)=>{var s;const{state:o,composing:r}=n,{selection:a,doc:l}=o,{ranges:c}=a,u=Math.min(...c.map(f=>f.$from.pos)),d=Math.max(...c.map(f=>f.$to.pos)),h=i&&i.doc.eq(l)&&i.selection.eq(a);if(lh(this,gm)||((s=n.dom.parentElement)==null||s.appendChild(this.element),uh(this,gm,!0)),!(r||h)){if(!lh(this,h_).call(this,n,i)){this.hide();return}Mk({getBoundingClientRect:()=>Xb(n,u,d)},this.element,{placement:"top",middleware:[Ek(),$k(lh(this,vm))]}).then(({x:f,y:p})=>{Object.assign(this.element.style,{left:`${f}px`,top:`${p}px`})}),this.show()}}),this.update=(n,i)=>{d2(lh(this,f_),lh(this,d_))(n,i)},this.destroy=()=>{},this.show=n=>{this.element.dataset.show="true",n&&Mk(n,this.element,{placement:"top",middleware:[Ek(),$k(lh(this,vm))]}).then(({x:i,y:s})=>{Object.assign(this.element.style,{left:`${i}px`,top:`${s}px`})}),this.onShow()},this.hide=()=>{this.element.dataset.show!=="false"&&(this.element.dataset.show="false",this.onHide())},this.element=e.content,uh(this,d_,e.debounce??200),uh(this,h_,e.shouldShow??L8t(this,VC,lj)),uh(this,vm,e.offset),this.element.dataset.show="false"}};d_=new WeakMap,h_=new WeakMap,gm=new WeakMap,vm=new WeakMap,f_=new WeakMap,VC=new WeakSet,lj=function(t){const{doc:e,selection:n}=t.state,{empty:i,from:s,to:o}=n,r=!e.textBetween(s,o).length&&t.state.selection instanceof Ot,a=this.element.contains(document.activeElement),l=!t.hasFocus()&&!a,c=!t.editable;return!(l||i||r||c)};function ES(t){const e=hs({},`${t}_TOOLTIP_SPEC`),n=Ps(s=>{const o=s.get(e.key);return new ts({key:new ds(`${t}_TOOLTIP`),...o})}),i=[e,n];return i.key=e.key,i.pluginKey=n.key,e.meta={package:"@milkdown/plugin-tooltip",displayName:`Ctx<tooltipSpec>|${t}`},n.meta={package:"@milkdown/plugin-tooltip",displayName:`Prose<tooltip>|${t}`},i}function cj(t){var e,n,i="";if(typeof t=="string"||typeof t=="number")i+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=cj(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function Qs(){for(var t,e,n=0,i="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=cj(t))&&(i&&(i+=" "),i+=e);return i}var O8t=Object.defineProperty,LT=Object.getOwnPropertySymbols,D8t=Object.prototype.hasOwnProperty,R8t=Object.prototype.propertyIsEnumerable,OT=(t,e,n)=>e in t?O8t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,V8t=(t,e)=>{for(var n in e||(e={}))D8t.call(e,n)&&OT(t,n,e[n]);if(LT)for(var n of LT(e))R8t.call(e,n)&&OT(t,n,e[n]);return t};function qd(t,e){return Object.assign(t,{meta:V8t({package:"@milkdown/components"},e)}),t}var F8t=Object.defineProperty,DT=Object.getOwnPropertySymbols,N8t=Object.prototype.hasOwnProperty,B8t=Object.prototype.propertyIsEnumerable,RT=(t,e,n)=>e in t?F8t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,MS=(t,e)=>{for(var n in e||(e={}))N8t.call(e,n)&&RT(t,n,e[n]);if(DT)for(var n of DT(e))B8t.call(e,n)&&RT(t,n,e[n]);return t};const z8t={mode:"preview"},ll=hs(MS({},z8t),"linkTooltipStateCtx");qd(ll,{displayName:"State<link-tooltip>",group:"LinkTooltip"});const H8t={addLink:()=>{},editLink:()=>{},removeLink:()=>{}},qf=hs(MS({},H8t),"linkTooltipAPICtx");qd(ll,{displayName:"API<link-tooltip>",group:"LinkTooltip"});const U8t={linkIcon:()=>"🔗",editButton:()=>"✎",removeButton:()=>"⌫",confirmButton:()=>Lt`Confirm ⏎`,onCopyLink:()=>{},inputPlaceholder:"Paste link..."},$2=hs(MS({},U8t),"linkTooltipConfigCtx");qd(ll,{displayName:"Config<link-tooltip>",group:"LinkTooltip"});const rv=ES("LINK_PREVIEW");qd(rv[0],{displayName:"PreviewTooltipSpec<link-tooltip>",group:"LinkTooltip"});qd(rv[1],{displayName:"PreviewTooltipPlugin<link-tooltip>",group:"LinkTooltip"});const A2=ES("LINK_EDIT");qd(A2[0],{displayName:"EditTooltipSpec<link-tooltip>",group:"LinkTooltip"});qd(A2[1],{displayName:"EditTooltipPlugin<link-tooltip>",group:"LinkTooltip"});function j8t(t,e,n,i,s){let o={start:-1,end:-1};return n.nodesBetween(i,s,(r,a)=>{if(o.start>-1)return!1;o.start===-1&&t.isInSet(r.marks)&&e===r&&(o={start:a,end:a+Math.max(r.textContent.length,1)})}),o}function W8t(t,e,n){const i=e.posAtCoords({left:n.clientX,top:n.clientY});if(!i)return;const{pos:s}=i,o=e.state.doc.nodeAt(s);if(!o)return;const r=o.marks.find(l=>l.type===Or.mark.type(t));if(!(!r||!rv.pluginKey()))return{show:!0,pos:s,node:o,mark:r}}function uj(t,e){const n=customElements.get(t);if(n==null){customElements.define(t,e);return}n!==e&&console.warn(`Custom element ${t} has been defined before.`)}const dj=({config:t,src:e,onEdit:n,onRemove:i})=>{const s=a=>{a.stopPropagation(),a.preventDefault(),n==null||n()},o=a=>{a.stopPropagation(),a.preventDefault(),i==null||i()};return Lt`
    <host>
      <div class="link-preview" onmousedown=${a=>{a.preventDefault(),navigator.clipboard&&e&&navigator.clipboard.writeText(e).then(()=>{t==null||t.onCopyLink(e)}).catch(l=>{throw l})}}>
        <span class="link-icon">
          ${t==null?void 0:t.linkIcon()}
        </span>
        <a href=${e} target="_blank" class="link-display">${e}</a>
        <span class="button link-edit-button" onmousedown=${s}>
          ${t==null?void 0:t.editButton()}
        </span>
        <span class="button link-remove-button" onmousedown=${o}>
          ${t==null?void 0:t.removeButton()}
        </span>
      </div>
    </host>
  `};dj.props={config:Object,src:String,onEdit:Function,onRemove:Function};const hj=Yd(dj);var fj=t=>{throw TypeError(t)},pj=(t,e,n)=>e.has(t)||fj("Cannot "+n),jn=(t,e,n)=>(pj(t,e,"read from private field"),n?n.call(t):e.get(t)),Tl=(t,e,n)=>e.has(t)?fj("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),s0=(t,e,n,i)=>(pj(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),Ul,br,_m,ym,p_,m_,g_,bm;class Y8t{constructor(e,n){this.ctx=e,Tl(this,Ul,new hj),Tl(this,br),Tl(this,_m,this.ctx.use(ll.key)),Tl(this,ym,!1),Tl(this,p_,({mode:i})=>{i==="edit"&&jn(this,bm).call(this)}),Tl(this,m_,()=>{s0(this,ym,!0)}),Tl(this,g_,()=>{s0(this,ym,!1)}),Tl(this,bm,()=>{jn(this,br).hide(),jn(this,br).element.removeEventListener("mouseenter",jn(this,m_)),jn(this,br).element.removeEventListener("mouseleave",jn(this,g_))}),this.show=(i,s,o,r)=>{jn(this,Ul).config=this.ctx.get($2.key),jn(this,Ul).src=i.attrs.href,jn(this,Ul).onEdit=()=>{this.ctx.get(qf.key).editLink(i,s,o)},jn(this,Ul).onRemove=()=>{this.ctx.get(qf.key).removeLink(s,o),jn(this,bm).call(this)},jn(this,br).show({getBoundingClientRect:()=>r}),jn(this,br).element.addEventListener("mouseenter",jn(this,m_)),jn(this,br).element.addEventListener("mouseleave",jn(this,g_))},this.hide=()=>{jn(this,ym)||jn(this,bm).call(this)},this.update=()=>{},this.destroy=()=>{jn(this,_m).off(jn(this,p_)),jn(this,br).destroy(),jn(this,Ul).remove()},s0(this,br,new AS({debounce:0,content:jn(this,Ul),shouldShow:()=>!1})),jn(this,br).update(n),s0(this,_m,e.use(ll.key)),jn(this,_m).on(jn(this,p_))}}Ul=new WeakMap;br=new WeakMap;_m=new WeakMap;ym=new WeakMap;p_=new WeakMap;m_=new WeakMap;g_=new WeakMap;bm=new WeakMap;uj("milkdown-link-preview",hj);function q8t(t){let e;const i=d2((o,r)=>{if(!e||!o.hasFocus()||t.get(ll.key).mode==="edit")return;const l=W8t(t,o,r);if(l){const c=o.state.doc.resolve(l.pos),u=j8t(l.mark,l.node,o.state.doc,c.before(),c.after()),d=u.start,h=u.end;e.show(l.mark,d,h,Xb(o,d,h));return}e.hide()},200),s=()=>{setTimeout(()=>{e==null||e.hide()},200)};t.set(rv.key,{props:{handleDOMEvents:{mousemove:i,mouseleave:s}},view:o=>(e=new Y8t(t,o),e)})}const mj=({src:t,onConfirm:e,onCancel:n,config:i})=>{const s=td(),[o,r]=Sr(t);bd(()=>{r(t??"")},[t]);const a=()=>{var c,u;e==null||e((u=(c=s.current)==null?void 0:c.value)!=null?u:"")},l=c=>{var u,d;c.stopPropagation(),c.key==="Enter"&&(e==null||e((d=(u=s.current)==null?void 0:u.value)!=null?d:""),c.preventDefault()),c.key==="Escape"&&(n==null||n(),c.preventDefault())};return Lt`
    <host>
      <div class="link-edit">
        <input
          class="input-area"
          placeholder=${i==null?void 0:i.inputPlaceholder}
          ref=${s}
          onkeydown=${l}
          oninput=${c=>r(c.target.value)}
          value=${o}
        />
        <span class=${Qs("button confirm",!o&&"hidden")} onclick=${a}>
          ${i==null?void 0:i.confirmButton()}
        </span>
      </div>
    </host>
  `};mj.props={config:Object,src:String,onConfirm:Function,onCancel:Function};const gj=Yd(mj);var G8t=Object.defineProperty,X8t=Object.defineProperties,K8t=Object.getOwnPropertyDescriptors,VT=Object.getOwnPropertySymbols,Z8t=Object.prototype.hasOwnProperty,J8t=Object.prototype.propertyIsEnumerable,vj=t=>{throw TypeError(t)},FT=(t,e,n)=>e in t?G8t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i0=(t,e)=>{for(var n in e||(e={}))Z8t.call(e,n)&&FT(t,n,e[n]);if(VT)for(var n of VT(e))J8t.call(e,n)&&FT(t,n,e[n]);return t},NT=(t,e)=>X8t(t,K8t(e)),_j=(t,e,n)=>e.has(t)||vj("Cannot "+n),is=(t,e,n)=>(_j(t,e,"read from private field"),n?n.call(t):e.get(t)),dh=(t,e,n)=>e.has(t)?vj("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),o0=(t,e,n,i)=>(_j(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),sa,jl,Wl,yu,FC,v_;const BT={from:-1,to:-1,mark:null};class Q8t{constructor(e,n){this.ctx=e,dh(this,sa,new gj),dh(this,jl),dh(this,Wl,i0({},BT)),dh(this,yu,()=>{is(this,jl).hide(),this.ctx.update(ll.key,i=>NT(i0({},i),{mode:"preview"})),o0(this,Wl,i0({},BT))}),dh(this,FC,i=>{const s=this.ctx.get(Vn),{from:o,to:r,mark:a}=is(this,Wl),l=Or.type(this.ctx);if(a&&a.attrs.href===i){is(this,yu).call(this);return}const c=s.state.tr;a&&c.removeMark(o,r,a),c.addMark(o,r,l.create({href:i})),s.dispatch(c),is(this,yu).call(this)}),dh(this,v_,(i,s,o)=>{const r=this.ctx.get($2.key);is(this,sa).config=r,is(this,sa).src=i,this.ctx.update(ll.key,l=>NT(i0({},l),{mode:"edit"}));const a=this.ctx.get(Vn);a.dispatch(a.state.tr.setSelection(Ot.create(a.state.doc,s,o))),is(this,jl).show({getBoundingClientRect:()=>Xb(a,s,o)}),requestAnimationFrame(()=>{var l;(l=is(this,sa).querySelector("input"))==null||l.focus()})}),this.update=i=>{const{state:s}=i,{selection:o}=s;if(!(o instanceof Ot))return;const{from:r,to:a}=o;r===is(this,Wl).from&&a===is(this,Wl).to||is(this,yu).call(this)},this.destroy=()=>{is(this,jl).destroy(),is(this,sa).remove()},this.addLink=(i,s)=>{o0(this,Wl,{from:i,to:s,mark:null}),is(this,v_).call(this,"",i,s)},this.editLink=(i,s,o)=>{o0(this,Wl,{from:s,to:o,mark:i}),is(this,v_).call(this,i.attrs.href,s,o)},this.removeLink=(i,s)=>{const o=this.ctx.get(Vn),r=o.state.tr;r.removeMark(i,s,Or.type(this.ctx)),o.dispatch(r),is(this,yu).call(this)},o0(this,jl,new AS({content:is(this,sa),debounce:0,shouldShow:()=>!1})),is(this,jl).onHide=()=>{is(this,sa).update().catch(i=>{throw i}),n.dom.focus({preventScroll:!0})},is(this,jl).update(n),is(this,sa).onConfirm=is(this,FC),is(this,sa).onCancel=is(this,yu)}}sa=new WeakMap;jl=new WeakMap;Wl=new WeakMap;yu=new WeakMap;FC=new WeakMap;v_=new WeakMap;var e5t=Object.defineProperty,t5t=Object.defineProperties,n5t=Object.getOwnPropertyDescriptors,zT=Object.getOwnPropertySymbols,s5t=Object.prototype.hasOwnProperty,i5t=Object.prototype.propertyIsEnumerable,HT=(t,e,n)=>e in t?e5t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,o5t=(t,e)=>{for(var n in e||(e={}))s5t.call(e,n)&&HT(t,n,e[n]);if(zT)for(var n of zT(e))i5t.call(e,n)&&HT(t,n,e[n]);return t},r5t=(t,e)=>t5t(t,n5t(e));uj("milkdown-link-edit",gj);function a5t(t){let e;t.update(qf.key,n=>r5t(o5t({},n),{addLink:(i,s)=>{e==null||e.addLink(i,s)},editLink:(i,s,o)=>{e==null||e.editLink(i,s,o)},removeLink:(i,s)=>{e==null||e.removeLink(i,s)}})),t.set(A2.key,{view:n=>(e=new Q8t(t,n),e)})}function l5t(t){q8t(t),a5t(t)}const c5t=[ll,qf,$2,rv,A2].flat();Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <path d="M4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25ZM8.25 16.625C8.0375 16.625 7.85942 16.5531 7.71575 16.4093C7.57192 16.2654 7.5 16.0872 7.5 15.8748C7.5 15.6621 7.57192 15.484 7.71575 15.3405C7.85942 15.1968 8.0375 15.125 8.25 15.125H15.75C15.9625 15.125 16.1406 15.1969 16.2843 15.3408C16.4281 15.4846 16.5 15.6628 16.5 15.8753C16.5 16.0879 16.4281 16.266 16.2843 16.4095C16.1406 16.5532 15.9625 16.625 15.75 16.625H8.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM8.25 8.875C8.0375 8.875 7.85942 8.80308 7.71575 8.65925C7.57192 8.51542 7.5 8.33725 7.5 8.12475C7.5 7.91208 7.57192 7.734 7.71575 7.5905C7.85942 7.44683 8.0375 7.375 8.25 7.375H15.75C15.9625 7.375 16.1406 7.44692 16.2843 7.59075C16.4281 7.73458 16.5 7.91275 16.5 8.12525C16.5 8.33792 16.4281 8.516 16.2843 8.6595C16.1406 8.80317 15.9625 8.875 15.75 8.875H8.25ZM4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25Z"/>
  </svg>
`;Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <path d="M4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25ZM4.25 16.625C4.0375 16.625 3.85942 16.5531 3.71575 16.4093C3.57192 16.2654 3.5 16.0872 3.5 15.8748C3.5 15.6621 3.57192 15.484 3.71575 15.3405C3.85942 15.1968 4.0375 15.125 4.25 15.125H13.75C13.9625 15.125 14.1406 15.1969 14.2843 15.3408C14.4281 15.4846 14.5 15.6628 14.5 15.8753C14.5 16.0879 14.4281 16.266 14.2843 16.4095C14.1406 16.5532 13.9625 16.625 13.75 16.625H4.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM4.25 8.875C4.0375 8.875 3.85942 8.80308 3.71575 8.65925C3.57192 8.51542 3.5 8.33725 3.5 8.12475C3.5 7.91208 3.57192 7.734 3.71575 7.5905C3.85942 7.44683 4.0375 7.375 4.25 7.375H13.75C13.9625 7.375 14.1406 7.44692 14.2843 7.59075C14.4281 7.73458 14.5 7.91275 14.5 8.12525C14.5 8.33792 14.4281 8.516 14.2843 8.6595C14.1406 8.80317 13.9625 8.875 13.75 8.875H4.25ZM4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25Z"/>
  </svg>
`;Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <path d="M4.25 5C4.0375 5 3.85942 4.92808 3.71575 4.78425C3.57192 4.64042 3.5 4.46225 3.5 4.24975C3.5 4.03708 3.57192 3.859 3.71575 3.7155C3.85942 3.57183 4.0375 3.5 4.25 3.5H19.75C19.9625 3.5 20.1406 3.57192 20.2843 3.71575C20.4281 3.85958 20.5 4.03775 20.5 4.25025C20.5 4.46292 20.4281 4.641 20.2843 4.7845C20.1406 4.92817 19.9625 5 19.75 5H4.25ZM10.25 8.875C10.0375 8.875 9.85942 8.80308 9.71575 8.65925C9.57192 8.51542 9.5 8.33725 9.5 8.12475C9.5 7.91208 9.57192 7.734 9.71575 7.5905C9.85942 7.44683 10.0375 7.375 10.25 7.375H19.75C19.9625 7.375 20.1406 7.44692 20.2843 7.59075C20.4281 7.73458 20.5 7.91275 20.5 8.12525C20.5 8.33792 20.4281 8.516 20.2843 8.6595C20.1406 8.80317 19.9625 8.875 19.75 8.875H10.25ZM4.25 12.75C4.0375 12.75 3.85942 12.6781 3.71575 12.5343C3.57192 12.3904 3.5 12.2122 3.5 11.9998C3.5 11.7871 3.57192 11.609 3.71575 11.4655C3.85942 11.3218 4.0375 11.25 4.25 11.25H19.75C19.9625 11.25 20.1406 11.3219 20.2843 11.4658C20.4281 11.6096 20.5 11.7878 20.5 12.0003C20.5 12.2129 20.4281 12.391 20.2843 12.5345C20.1406 12.6782 19.9625 12.75 19.75 12.75H4.25ZM10.25 16.625C10.0375 16.625 9.85942 16.5531 9.71575 16.4093C9.57192 16.2654 9.5 16.0872 9.5 15.8748C9.5 15.6621 9.57192 15.484 9.71575 15.3405C9.85942 15.1968 10.0375 15.125 10.25 15.125H19.75C19.9625 15.125 20.1406 15.1969 20.2843 15.3408C20.4281 15.4846 20.5 15.6628 20.5 15.8753C20.5 16.0879 20.4281 16.266 20.2843 16.4095C20.1406 16.5532 19.9625 16.625 19.75 16.625H10.25ZM4.25 20.5C4.0375 20.5 3.85942 20.4281 3.71575 20.2843C3.57192 20.1404 3.5 19.9622 3.5 19.7498C3.5 19.5371 3.57192 19.359 3.71575 19.2155C3.85942 19.0718 4.0375 19 4.25 19H19.75C19.9625 19 20.1406 19.0719 20.2843 19.2158C20.4281 19.3596 20.5 19.5378 20.5 19.7502C20.5 19.9629 20.4281 20.141 20.2843 20.2845C20.1406 20.4282 19.9625 20.5 19.75 20.5H4.25Z"/>
  </svg>
`;const u5t=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <path d="M8.85758 18.625C8.4358 18.625 8.07715 18.4772 7.78163 18.1817C7.48613 17.8862 7.33838 17.5275 7.33838 17.1058V6.8942C7.33838 6.47242 7.48613 6.11377 7.78163 5.81825C8.07715 5.52275 8.4358 5.375 8.85758 5.375H12.1999C13.2191 5.375 14.1406 5.69231 14.9643 6.32693C15.788 6.96154 16.1999 7.81603 16.1999 8.89038C16.1999 9.63779 16.0194 10.2471 15.6585 10.7183C15.2976 11.1894 14.9088 11.5314 14.4922 11.7442C15.005 11.9211 15.4947 12.2708 15.9614 12.7933C16.428 13.3157 16.6614 14.0192 16.6614 14.9038C16.6614 16.182 16.1902 17.1217 15.2479 17.723C14.3056 18.3243 13.3563 18.625 12.3999 18.625H8.85758ZM9.4883 16.6327H12.3191C13.1063 16.6327 13.6627 16.4141 13.9884 15.9769C14.314 15.5397 14.4768 15.1205 14.4768 14.7192C14.4768 14.3179 14.314 13.8987 13.9884 13.4615C13.6627 13.0243 13.0909 12.8057 12.273 12.8057H9.4883V16.6327ZM9.4883 10.875H12.0826C12.6903 10.875 13.172 10.7013 13.5278 10.3539C13.8836 10.0064 14.0615 9.59037 14.0615 9.10575C14.0615 8.59035 13.8733 8.16918 13.497 7.84225C13.1207 7.51533 12.6595 7.35188 12.1133 7.35188H9.4883V10.875Z"/>
  </svg>
`;Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_952_6527)">
      <circle cx="12" cy="12" r="3"/>
    </g>
    <defs>
      <clipPath id="clip0_952_6527">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`;const d5t=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_977_8070)">
      <path d="M4 10.5C3.17 10.5 2.5 11.17 2.5 12C2.5 12.83 3.17 13.5 4 13.5C4.83 13.5 5.5 12.83 5.5 12C5.5 11.17 4.83 10.5 4 10.5ZM4 4.5C3.17 4.5 2.5 5.17 2.5 6C2.5 6.83 3.17 7.5 4 7.5C4.83 7.5 5.5 6.83 5.5 6C5.5 5.17 4.83 4.5 4 4.5ZM4 16.5C3.17 16.5 2.5 17.18 2.5 18C2.5 18.82 3.18 19.5 4 19.5C4.82 19.5 5.5 18.82 5.5 18C5.5 17.18 4.83 16.5 4 16.5ZM8 19H20C20.55 19 21 18.55 21 18C21 17.45 20.55 17 20 17H8C7.45 17 7 17.45 7 18C7 18.55 7.45 19 8 19ZM8 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11H8C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13ZM7 6C7 6.55 7.45 7 8 7H20C20.55 7 21 6.55 21 6C21 5.45 20.55 5 20 5H8C7.45 5 7 5.45 7 6Z"/>
    </g>
    <defs>
      <clipPath id="clip0_977_8070">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`,h5t=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24">
    <path fill="currentColor" d="M9 22a1 1 0 0 1-1-1v-3H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6.1l-3.7 3.71c-.2.19-.45.29-.7.29zm1-6v3.08L13.08 16H20V4H4v12z"/>
  </svg>
`;Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_1803_1151)">
      <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM10.71 16.29C10.32 16.68 9.69 16.68 9.3 16.29L5.71 12.7C5.32 12.31 5.32 11.68 5.71 11.29C6.1 10.9 6.73 10.9 7.12 11.29L10 14.17L16.88 7.29C17.27 6.9 17.9 6.9 18.29 7.29C18.68 7.68 18.68 8.31 18.29 8.7L10.71 16.29Z"/>
    </g>
    <defs>
      <clipPath id="clip0_1803_1151">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`;Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_1803_535)">
      <path d="M18 19H6C5.45 19 5 18.55 5 18V6C5 5.45 5.45 5 6 5H18C18.55 5 19 5.45 19 6V18C19 18.55 18.55 19 18 19ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3Z"/>
    </g>
    <defs>
      <clipPath id="clip0_1803_535">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`;Lt`
  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
    <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" />
  </svg>
`;Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_1098_15553)">
      <path d="M18.3007 5.70973C17.9107 5.31973 17.2807 5.31973 16.8907 5.70973L12.0007 10.5897L7.1107 5.69973C6.7207 5.30973 6.0907 5.30973 5.7007 5.69973C5.3107 6.08973 5.3107 6.71973 5.7007 7.10973L10.5907 11.9997L5.7007 16.8897C5.3107 17.2797 5.3107 17.9097 5.7007 18.2997C6.0907 18.6897 6.7207 18.6897 7.1107 18.2997L12.0007 13.4097L16.8907 18.2997C17.2807 18.6897 17.9107 18.6897 18.3007 18.2997C18.6907 17.9097 18.6907 17.2797 18.3007 16.8897L13.4107 11.9997L18.3007 7.10973C18.6807 6.72973 18.6807 6.08973 18.3007 5.70973Z"/>
    </g>
    <defs>
      <clipPath id="clip0_1098_15553">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`;const yj=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_977_8081)">
      <path d="M9.4 16.6L4.8 12L9.4 7.4L8 6L2 12L8 18L9.4 16.6ZM14.6 16.6L19.2 12L14.6 7.4L16 6L22 12L16 18L14.6 16.6Z"/>
    </g>
    <defs>
      <clipPath id="clip0_977_8081">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`,bj=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
    <g clip-path="url(#clip0_1013_1606)">
      <path d="M9.00012 16.1998L5.50012 12.6998C5.11012 12.3098 4.49012 12.3098 4.10012 12.6998C3.71012 13.0898 3.71012 13.7098 4.10012 14.0998L8.29012 18.2898C8.68012 18.6798 9.31012 18.6798 9.70012 18.2898L20.3001 7.69982C20.6901 7.30982 20.6901 6.68982 20.3001 6.29982C19.9101 5.90982 19.2901 5.90982 18.9001 6.29982L9.00012 16.1998Z" fill="#817567"/>
    </g>
    <defs>
      <clipPath id="clip0_1013_1606">
        <rect width="24" height="24" />
      </clipPath>
    </defs>
  </svg>
`,f5t=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_977_7900)">
      <path fill-rule="evenodd" clip-rule="evenodd" d="M19 13H5C4.45 13 4 12.55 4 12C4 11.45 4.45 11 5 11H19C19.55 11 20 11.45 20 12C20 12.55 19.55 13 19 13Z"/>
    </g>
    <defs>
      <clipPath id="clip0_977_7900">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`;Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
    <path d="M3.5 9.83366C3.35833 9.83366 3.23961 9.78571 3.14383 9.68983C3.04794 9.59394 3 9.47516 3 9.33349C3 9.19171 3.04794 9.07299 3.14383 8.97733C3.23961 8.88155 3.35833 8.83366 3.5 8.83366H12.5C12.6417 8.83366 12.7604 8.8816 12.8562 8.97749C12.9521 9.07338 13 9.19216 13 9.33383C13 9.4756 12.9521 9.59433 12.8562 9.68999C12.7604 9.78577 12.6417 9.83366 12.5 9.83366H3.5ZM3.5 7.16699C3.35833 7.16699 3.23961 7.11905 3.14383 7.02316C3.04794 6.92727 3 6.80849 3 6.66683C3 6.52505 3.04794 6.40633 3.14383 6.31066C3.23961 6.21488 3.35833 6.16699 3.5 6.16699H12.5C12.6417 6.16699 12.7604 6.21494 12.8562 6.31083C12.9521 6.40671 13 6.52549 13 6.66716C13 6.80894 12.9521 6.92766 12.8562 7.02333C12.7604 7.1191 12.6417 7.16699 12.5 7.16699H3.5Z"/>
  </svg>
`;const p5t=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_1013_1585)">
      <path d="M14.06 9.02L14.98 9.94L5.92 19H5V18.08L14.06 9.02ZM17.66 3C17.41 3 17.15 3.1 16.96 3.29L15.13 5.12L18.88 8.87L20.71 7.04C21.1 6.65 21.1 6.02 20.71 5.63L18.37 3.29C18.17 3.09 17.92 3 17.66 3ZM14.06 6.19L3 17.25V21H6.75L17.81 9.94L14.06 6.19Z"/>
    </g>
    <defs>
      <clipPath id="clip0_1013_1585">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`;Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_992_5553)">
      <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM12 17H14V7H10V9H12V17Z"/>
    </g>
    <defs>
      <clipPath id="clip0_992_5553">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`;const m5t=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_992_5559)">
      <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM15 15H11V13H13C14.1 13 15 12.11 15 11V9C15 7.89 14.1 7 13 7H9V9H13V11H11C9.9 11 9 11.89 9 13V17H15V15Z"/>
    </g>
    <defs>
      <clipPath id="clip0_992_5559">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`,g5t=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_992_5565)">
      <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM15 15V13.5C15 12.67 14.33 12 13.5 12C14.33 12 15 11.33 15 10.5V9C15 7.89 14.1 7 13 7H9V9H13V11H11V13H13V15H9V17H13C14.1 17 15 16.11 15 15Z"/>
    </g>
    <defs>
      <clipPath id="clip0_992_5565">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`,v5t=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_977_7757)">
      <path d="M19.04 3H5.04004C3.94004 3 3.04004 3.9 3.04004 5V19C3.04004 20.1 3.94004 21 5.04004 21H19.04C20.14 21 21.04 20.1 21.04 19V5C21.04 3.9 20.14 3 19.04 3ZM19.04 19H5.04004V5H19.04V19ZM13.04 17H15.04V7H13.04V11H11.04V7H9.04004V13H13.04V17Z"/>
    </g>
    <defs>
      <clipPath id="clip0_977_7757">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`;Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_977_7760)">
      <path d="M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM15 15V13C15 11.89 14.1 11 13 11H11V9H15V7H9V13H13V15H9V17H13C14.1 17 15 16.11 15 15Z"/>
    </g>
    <defs>
      <clipPath id="clip0_977_7760">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`;Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_977_7763)">
      <path d="M11 17H13C14.1 17 15 16.11 15 15V13C15 11.89 14.1 11 13 11H11V9H15V7H11C9.9 7 9 7.89 9 9V15C9 16.11 9.9 17 11 17ZM11 13H13V15H11V13ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19Z"/>
    </g>
    <defs>
      <clipPath id="clip0_977_7763">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`;const NC=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_977_8075)">
      <path d="M19 5V19H5V5H19ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM14.14 11.86L11.14 15.73L9 13.14L6 17H18L14.14 11.86Z"/>
    </g>
    <defs>
      <clipPath id="clip0_977_8075">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`,_5t=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <path d="M6.29811 18.625C6.04505 18.625 5.83115 18.5375 5.65641 18.3626C5.48166 18.1877 5.39429 17.9736 5.39429 17.7203C5.39429 17.467 5.48166 17.2532 5.65641 17.0788C5.83115 16.9045 6.04505 16.8173 6.29811 16.8173H9.21159L12.452 7.18265H9.53851C9.28545 7.18265 9.07155 7.0952 8.89681 6.9203C8.72206 6.7454 8.63469 6.5313 8.63469 6.278C8.63469 6.02472 8.72206 5.81089 8.89681 5.63652C9.07155 5.46217 9.28545 5.375 9.53851 5.375H16.8847C17.1377 5.375 17.3516 5.46245 17.5264 5.63735C17.7011 5.81225 17.7885 6.02634 17.7885 6.27962C17.7885 6.53293 17.7011 6.74676 17.5264 6.92113C17.3516 7.09548 17.1377 7.18265 16.8847 7.18265H14.2789L11.0385 16.8173H13.6443C13.8973 16.8173 14.1112 16.9048 14.286 17.0797C14.4607 17.2546 14.5481 17.4687 14.5481 17.722C14.5481 17.9752 14.4607 18.1891 14.286 18.3634C14.1112 18.5378 13.8973 18.625 13.6443 18.625H6.29811Z"/>
  </svg>
`,wj=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <path d="M17.0385 19.5003V16.5388H14.0769V15.0388H17.0385V12.0773H18.5384V15.0388H21.5V16.5388H18.5384V19.5003H17.0385ZM10.8077 16.5388H7.03845C5.78282 16.5388 4.7125 16.0963 3.8275 15.2114C2.9425 14.3266 2.5 13.2564 2.5 12.0009C2.5 10.7454 2.9425 9.67504 3.8275 8.78979C4.7125 7.90454 5.78282 7.46191 7.03845 7.46191H10.8077V8.96186H7.03845C6.1987 8.96186 5.48235 9.25834 4.8894 9.85129C4.29645 10.4442 3.99998 11.1606 3.99998 12.0003C3.99998 12.8401 4.29645 13.5564 4.8894 14.1494C5.48235 14.7423 6.1987 15.0388 7.03845 15.0388H10.8077V16.5388ZM8.25 12.7503V11.2504H15.75V12.7503H8.25ZM21.5 12.0003H20C20 11.1606 19.7035 10.4442 19.1106 9.85129C18.5176 9.25834 17.8013 8.96186 16.9615 8.96186H13.1923V7.46191H16.9615C18.2171 7.46191 19.2875 7.90441 20.1725 8.78939C21.0575 9.67439 21.5 10.7447 21.5 12.0003Z"/>
  </svg>
`;Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_971_7680)">
      <path d="M11 18C11 19.1 10.1 20 9 20C7.9 20 7 19.1 7 18C7 16.9 7.9 16 9 16C10.1 16 11 16.9 11 18ZM9 10C7.9 10 7 10.9 7 12C7 13.1 7.9 14 9 14C10.1 14 11 13.1 11 12C11 10.9 10.1 10 9 10ZM9 4C7.9 4 7 4.9 7 6C7 7.1 7.9 8 9 8C10.1 8 11 7.1 11 6C11 4.9 10.1 4 9 4ZM15 8C16.1 8 17 7.1 17 6C17 4.9 16.1 4 15 4C13.9 4 13 4.9 13 6C13 7.1 13.9 8 15 8ZM15 10C13.9 10 13 10.9 13 12C13 13.1 13.9 14 15 14C16.1 14 17 13.1 17 12C17 10.9 16.1 10 15 10ZM15 16C13.9 16 13 16.9 13 18C13 19.1 13.9 20 15 20C16.1 20 17 19.1 17 18C17 16.9 16.1 16 15 16Z" />
    </g>
    <defs>
      <clipPath id="clip0_971_7680">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`;const y5t=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_977_8067)">
      <path d="M8 7H20C20.55 7 21 6.55 21 6C21 5.45 20.55 5 20 5H8C7.45 5 7 5.45 7 6C7 6.55 7.45 7 8 7ZM20 17H8C7.45 17 7 17.45 7 18C7 18.55 7.45 19 8 19H20C20.55 19 21 18.55 21 18C21 17.45 20.55 17 20 17ZM20 11H8C7.45 11 7 11.45 7 12C7 12.55 7.45 13 8 13H20C20.55 13 21 12.55 21 12C21 11.45 20.55 11 20 11ZM4.5 16H2.5C2.22 16 2 16.22 2 16.5C2 16.78 2.22 17 2.5 17H4V17.5H3.5C3.22 17.5 3 17.72 3 18C3 18.28 3.22 18.5 3.5 18.5H4V19H2.5C2.22 19 2 19.22 2 19.5C2 19.78 2.22 20 2.5 20H4.5C4.78 20 5 19.78 5 19.5V16.5C5 16.22 4.78 16 4.5 16ZM2.5 5H3V7.5C3 7.78 3.22 8 3.5 8C3.78 8 4 7.78 4 7.5V4.5C4 4.22 3.78 4 3.5 4H2.5C2.22 4 2 4.22 2 4.5C2 4.78 2.22 5 2.5 5ZM4.5 10H2.5C2.22 10 2 10.22 2 10.5C2 10.78 2.22 11 2.5 11H3.8L2.12 12.96C2.04 13.05 2 13.17 2 13.28V13.5C2 13.78 2.22 14 2.5 14H4.5C4.78 14 5 13.78 5 13.5C5 13.22 4.78 13 4.5 13H3.2L4.88 11.04C4.96 10.95 5 10.83 5 10.72V10.5C5 10.22 4.78 10 4.5 10Z"/>
    </g>
    <defs>
      <clipPath id="clip0_977_8067">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`;Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_971_7676)">
      <path d="M18 13H13V18C13 18.55 12.55 19 12 19C11.45 19 11 18.55 11 18V13H6C5.45 13 5 12.55 5 12C5 11.45 5.45 11 6 11H11V6C11 5.45 11.45 5 12 5C12.55 5 13 5.45 13 6V11H18C18.55 11 19 11.45 19 12C19 12.55 18.55 13 18 13Z"/>
    </g>
    <defs>
      <clipPath id="clip0_971_7676">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`;const b5t=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_977_7897)">
      <path d="M7.17 17C7.68 17 8.15 16.71 8.37 16.26L9.79 13.42C9.93 13.14 10 12.84 10 12.53V8C10 7.45 9.55 7 9 7H5C4.45 7 4 7.45 4 8V12C4 12.55 4.45 13 5 13H7L5.97 15.06C5.52 15.95 6.17 17 7.17 17ZM17.17 17C17.68 17 18.15 16.71 18.37 16.26L19.79 13.42C19.93 13.14 20 12.84 20 12.53V8C20 7.45 19.55 7 19 7H15C14.45 7 14 7.45 14 8V12C14 12.55 14.45 13 15 13H17L15.97 15.06C15.52 15.95 16.17 17 17.17 17Z"/>
    </g>
    <defs>
      <clipPath id="clip0_977_7897">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`,w5t=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <path d="M7.30775 20.4997C6.81058 20.4997 6.385 20.3227 6.031 19.9687C5.677 19.6147 5.5 19.1892 5.5 18.692V5.99973H5.25C5.0375 5.99973 4.85942 5.92782 4.71575 5.78398C4.57192 5.64015 4.5 5.46198 4.5 5.24948C4.5 5.03682 4.57192 4.85873 4.71575 4.71523C4.85942 4.57157 5.0375 4.49973 5.25 4.49973H9C9 4.2549 9.08625 4.04624 9.25875 3.87374C9.43108 3.7014 9.63967 3.61523 9.8845 3.61523H14.1155C14.3603 3.61523 14.5689 3.7014 14.7413 3.87374C14.9138 4.04624 15 4.2549 15 4.49973H18.75C18.9625 4.49973 19.1406 4.57165 19.2843 4.71548C19.4281 4.85932 19.5 5.03748 19.5 5.24998C19.5 5.46265 19.4281 5.64073 19.2843 5.78423C19.1406 5.9279 18.9625 5.99973 18.75 5.99973H18.5V18.692C18.5 19.1892 18.323 19.6147 17.969 19.9687C17.615 20.3227 17.1894 20.4997 16.6923 20.4997H7.30775ZM17 5.99973H7V18.692C7 18.7818 7.02883 18.8556 7.0865 18.9132C7.14417 18.9709 7.21792 18.9997 7.30775 18.9997H16.6923C16.7821 18.9997 16.8558 18.9709 16.9135 18.9132C16.9712 18.8556 17 18.7818 17 18.692V5.99973ZM10.1543 16.9997C10.3668 16.9997 10.5448 16.9279 10.6885 16.7842C10.832 16.6404 10.9037 16.4622 10.9037 16.2497V8.74973C10.9037 8.53723 10.8318 8.35907 10.688 8.21523C10.5443 8.07157 10.3662 7.99973 10.1535 7.99973C9.941 7.99973 9.76292 8.07157 9.61925 8.21523C9.47575 8.35907 9.404 8.53723 9.404 8.74973V16.2497C9.404 16.4622 9.47583 16.6404 9.6195 16.7842C9.76333 16.9279 9.94158 16.9997 10.1543 16.9997ZM13.8465 16.9997C14.059 16.9997 14.2371 16.9279 14.3807 16.7842C14.5243 16.6404 14.596 16.4622 14.596 16.2497V8.74973C14.596 8.53723 14.5242 8.35907 14.3805 8.21523C14.2367 8.07157 14.0584 7.99973 13.8458 7.99973C13.6333 7.99973 13.4552 8.07157 13.3115 8.21523C13.168 8.35907 13.0962 8.53723 13.0962 8.74973V16.2497C13.0962 16.4622 13.1682 16.6404 13.312 16.7842C13.4557 16.9279 13.6338 16.9997 13.8465 16.9997Z"/>
  </svg>
`;Lt`
  <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
    <path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" />
  </svg>
`;const k5t=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <path d="M3.25 13.7404C3.0375 13.7404 2.85938 13.6684 2.71563 13.5246C2.57188 13.3808 2.5 13.2026 2.5 12.99C2.5 12.7774 2.57188 12.5993 2.71563 12.4558C2.85938 12.3122 3.0375 12.2404 3.25 12.2404H20.75C20.9625 12.2404 21.1406 12.3123 21.2843 12.4561C21.4281 12.5999 21.5 12.7781 21.5 12.9907C21.5 13.2033 21.4281 13.3814 21.2843 13.525C21.1406 13.6686 20.9625 13.7404 20.75 13.7404H3.25ZM10.9423 10.2596V6.62495H6.5673C6.2735 6.62495 6.02377 6.52201 5.8181 6.31613C5.61245 6.11026 5.50963 5.86027 5.50963 5.56615C5.50963 5.27205 5.61245 5.02083 5.8181 4.8125C6.02377 4.60417 6.2735 4.5 6.5673 4.5H17.4423C17.7361 4.5 17.9858 4.60294 18.1915 4.80883C18.3971 5.01471 18.5 5.2647 18.5 5.5588C18.5 5.85292 18.3971 6.10413 18.1915 6.31245C17.9858 6.52078 17.7361 6.62495 17.4423 6.62495H13.0673V10.2596H10.9423ZM10.9423 15.7211H13.0673V18.4423C13.0673 18.7361 12.9643 18.9858 12.7584 19.1915C12.5526 19.3971 12.3026 19.5 12.0085 19.5C11.7144 19.5 11.4631 19.3962 11.2548 19.1887C11.0465 18.9811 10.9423 18.7291 10.9423 18.4327V15.7211Z"/>
  </svg>
`;Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_977_8078)">
      <path d="M20 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H20C21.1 21 22 20.1 22 19V5C22 3.9 21.1 3 20 3ZM20 5V8H5V5H20ZM15 19H10V10H15V19ZM5 10H8V19H5V10ZM17 19V10H20V19H17Z"/>
    </g>
    <defs>
      <clipPath id="clip0_977_8078">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`;const C5t=Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <g clip-path="url(#clip0_992_5547)">
      <path d="M5 5.5C5 6.33 5.67 7 6.5 7H10.5V17.5C10.5 18.33 11.17 19 12 19C12.83 19 13.5 18.33 13.5 17.5V7H17.5C18.33 7 19 6.33 19 5.5C19 4.67 18.33 4 17.5 4H6.5C5.67 4 5 4.67 5 5.5Z"/>
    </g>
    <defs>
      <clipPath id="clip0_992_5547">
        <rect width="24" height="24"/>
      </clipPath>
    </defs>
  </svg>
`;Lt`
  <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
    <path d="M5.66936 16.3389L9.39244 12.6158C9.54115 12.4671 9.71679 12.3937 9.91936 12.3957C10.1219 12.3976 10.2975 12.4761 10.4463 12.6312C10.5847 12.7823 10.654 12.9585 10.654 13.1599C10.654 13.3613 10.5847 13.5363 10.4463 13.6851L6.32704 17.8197C6.14627 18.0004 5.93538 18.0908 5.69436 18.0908C5.45333 18.0908 5.24243 18.0004 5.06166 17.8197L3.01744 15.7754C2.87899 15.637 2.81136 15.4629 2.81456 15.2533C2.81776 15.0437 2.88859 14.8697 3.02706 14.7312C3.16551 14.5928 3.34008 14.5235 3.55076 14.5235C3.76144 14.5235 3.93494 14.5928 4.07126 14.7312L5.66936 16.3389ZM5.66936 8.72359L9.39244 5.00049C9.54115 4.85177 9.71679 4.77838 9.91936 4.78031C10.1219 4.78223 10.2975 4.86075 10.4463 5.01586C10.5847 5.16691 10.654 5.34314 10.654 5.54454C10.654 5.74592 10.5847 5.92097 10.4463 6.06969L6.32704 10.2043C6.14627 10.3851 5.93538 10.4755 5.69436 10.4755C5.45333 10.4755 5.24243 10.3851 5.06166 10.2043L3.01744 8.16009C2.87899 8.02162 2.81136 7.84759 2.81456 7.63799C2.81776 7.42837 2.88859 7.25433 3.02706 7.11586C3.16551 6.97741 3.34008 6.90819 3.55076 6.90819C3.76144 6.90819 3.93494 6.97741 4.07126 7.11586L5.66936 8.72359ZM13.7597 16.5581C13.5472 16.5581 13.3691 16.4862 13.2253 16.3424C13.0816 16.1986 13.0097 16.0204 13.0097 15.8078C13.0097 15.5952 13.0816 15.4171 13.2253 15.2735C13.3691 15.13 13.5472 15.0582 13.7597 15.0582H20.7597C20.9722 15.0582 21.1503 15.1301 21.2941 15.2739C21.4378 15.4177 21.5097 15.5959 21.5097 15.8085C21.5097 16.0211 21.4378 16.1992 21.2941 16.3427C21.1503 16.4863 20.9722 16.5581 20.7597 16.5581H13.7597ZM13.7597 8.94276C13.5472 8.94276 13.3691 8.87085 13.2253 8.72704C13.0816 8.58324 13.0097 8.40504 13.0097 8.19244C13.0097 7.97985 13.0816 7.80177 13.2253 7.65819C13.3691 7.5146 13.5472 7.44281 13.7597 7.44281H20.7597C20.9722 7.44281 21.1503 7.51471 21.2941 7.65851C21.4378 7.80233 21.5097 7.98053 21.5097 8.19311C21.5097 8.40571 21.4378 8.5838 21.2941 8.72739C21.1503 8.87097 20.9722 8.94276 20.7597 8.94276H13.7597Z"/>
  </svg>
`;const x5t=(t,e)=>{t.config(l5t).config(n=>{n.update($2.key,i=>({...i,linkIcon:(e==null?void 0:e.linkIcon)??(()=>wj),editButton:(e==null?void 0:e.editButton)??(()=>p5t),removeButton:(e==null?void 0:e.removeButton)??(()=>w5t),confirmButton:(e==null?void 0:e.confirmButton)??(()=>bj),inputPlaceholder:(e==null?void 0:e.inputPlaceholder)??"Paste link...",onCopyLink:(e==null?void 0:e.onCopyLink)??(()=>{})}))}).use(c5t)},S5t=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:x5t},Symbol.toStringTag,{value:"Module"}));var kj="Expected a function",UT=0/0,$5t="[object Symbol]",A5t=/^\s+|\s+$/g,E5t=/^[-+]0x[0-9a-f]+$/i,M5t=/^0b[01]+$/i,T5t=/^0o[0-7]+$/i,P5t=parseInt,I5t=typeof ws=="object"&&ws&&ws.Object===Object&&ws,L5t=typeof self=="object"&&self&&self.Object===Object&&self,O5t=I5t||L5t||Function("return this")(),D5t=Object.prototype,R5t=D5t.toString,V5t=Math.max,F5t=Math.min,L3=function(){return O5t.Date.now()};function N5t(t,e,n){var i,s,o,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(kj);e=jT(e)||0,zy(n)&&(u=!!n.leading,d="maxWait"in n,o=d?V5t(jT(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(M){var P=i,T=s;return i=s=void 0,c=M,r=t.apply(T,P),r}function p(M){return c=M,a=setTimeout(b,e),u?f(M):r}function m(M){var P=M-l,T=M-c,I=e-P;return d?F5t(I,o-T):I}function y(M){var P=M-l,T=M-c;return l===void 0||P>=e||P<0||d&&T>=o}function b(){var M=L3();if(y(M))return k(M);a=setTimeout(b,m(M))}function k(M){return a=void 0,h&&i?f(M):(i=s=void 0,r)}function C(){a!==void 0&&clearTimeout(a),c=0,i=l=s=a=void 0}function $(){return a===void 0?r:k(L3())}function x(){var M=L3(),P=y(M);if(i=arguments,s=this,l=M,P){if(a===void 0)return p(l);if(d)return a=setTimeout(b,e),f(l)}return a===void 0&&(a=setTimeout(b,e)),r}return x.cancel=C,x.flush=$,x}function B5t(t,e,n){var i=!0,s=!0;if(typeof t!="function")throw new TypeError(kj);return zy(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),N5t(t,e,{leading:i,maxWait:e,trailing:s})}function zy(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function z5t(t){return!!t&&typeof t=="object"}function H5t(t){return typeof t=="symbol"||z5t(t)&&R5t.call(t)==$5t}function jT(t){if(typeof t=="number")return t;if(H5t(t))return UT;if(zy(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=zy(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(A5t,"");var n=M5t.test(t);return n||T5t.test(t)?P5t(t.slice(2),n?2:8):E5t.test(t)?UT:+t}var U5t=B5t;const j5t=Ei(U5t);var Cj=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},kn=(t,e,n)=>(Cj(t,e,"read from private field"),n?n.call(t):e.get(t)),vi=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},Wn=(t,e,n,i)=>(Cj(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);function E2(t,e){return Object.assign(t,{meta:{package:"@milkdown/plugin-block",...e}}),t}const W5t=t=>!A8(e=>e.type.name==="table")(t),av=hs({filterNodes:W5t},"blockConfig");E2(av,{displayName:"Ctx<blockConfig>"});function Y5t(t,e,n){var i;if(!t.dom.parentElement)return null;const s=(i=t.posAtCoords({left:e.x,top:e.y}))==null?void 0:i.inside;if(s==null||s<0)return null;let o=t.state.doc.resolve(s),r=t.state.doc.nodeAt(s),a=t.nodeDOM(s);const l=u=>{const d=o.depth>=1&&o.index(o.depth)===0;if(!(u||d))return;const h=o.before(o.depth);r=t.state.doc.nodeAt(h),a=t.nodeDOM(h),o=t.state.doc.resolve(h),n(o,r)||l(!0)},c=n(o,r);return l(!c),!a||!r?null:{node:r,$pos:o,el:a}}let WT=null;function q5t(){return WT||(WT=document.implementation.createHTMLDocument("title"))}const G5t={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};function X5t(t,e){const n=[];let{openStart:i,openEnd:s,content:o}=e;for(;i>1&&s>1&&o.childCount===1&&o.firstChild.childCount===1;){i-=1,s-=1;const f=o.firstChild;n.push(f.type.name,f.attrs!==f.type.defaultAttrs?f.attrs:null),o=f.content}const r=t.someProp("clipboardSerializer")||Wc.fromSchema(t.state.schema),a=q5t(),l=a.createElement("div");l.appendChild(r.serializeFragment(o,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType===1&&(u=G5t[c.nodeName.toLowerCase()]);){for(let f=u.length-1;f>=0;f--){const p=a.createElement(u[f]);for(;l.firstChild;)p.appendChild(l.firstChild);l.appendChild(p),d++}c=l.firstChild}c&&c.nodeType===1&&c.setAttribute("data-pm-slice",`${i} ${s}${d?` -${d}`:""} ${JSON.stringify(n)}`);const h=t.someProp("clipboardTextSerializer",f=>f(e,t))||e.content.textBetween(0,e.content.size,`

`);return{dom:l,text:h}}const YT=qv.ie&&qv.ie_version<15||qv.ios&&qv.webkit_version<604,qT=20;var rg,__,Th,ia,wm,oa,BC,xj,Ph,km,Ih,Lh,y_,Cm,xm,Sm,b_,Oh;class K5t{constructor(){vi(this,BC),vi(this,Ph),vi(this,rg,void 0),vi(this,__,void 0),vi(this,Th,void 0),vi(this,ia,void 0),vi(this,wm,void 0),vi(this,oa,void 0),vi(this,Ih,void 0),vi(this,Lh,void 0),vi(this,y_,void 0),vi(this,Cm,void 0),vi(this,xm,void 0),vi(this,Sm,void 0),vi(this,b_,void 0),vi(this,Oh,void 0),Wn(this,__,()=>{if(!kn(this,ia))return null;const e=kn(this,ia),n=kn(this,Ph,km);if(n&&Rt.isSelectable(e.node)){const i=Rt.create(n.state.doc,e.$pos.pos);return n.dispatch(n.state.tr.setSelection(i)),n.focus(),Wn(this,Th,i),i}return null}),Wn(this,Th,null),Wn(this,ia,null),Wn(this,wm,void 0),Wn(this,oa,!1),Wn(this,Lh,()=>{var e;(e=kn(this,Ih))==null||e.call(this,{type:"hide"}),Wn(this,ia,null)}),Wn(this,y_,e=>{var n;Wn(this,ia,e),(n=kn(this,Ih))==null||n.call(this,{type:"show",active:e})}),this.bind=(e,n)=>{Wn(this,rg,e),Wn(this,Ih,n)},this.addEvent=e=>{e.addEventListener("mousedown",kn(this,Cm)),e.addEventListener("mouseup",kn(this,xm)),e.addEventListener("dragstart",kn(this,Sm))},this.removeEvent=e=>{e.removeEventListener("mousedown",kn(this,Cm)),e.removeEventListener("mouseup",kn(this,xm)),e.removeEventListener("dragstart",kn(this,Sm))},this.unBind=()=>{Wn(this,Ih,void 0)},Wn(this,Cm,()=>{var e;Wn(this,wm,(e=kn(this,ia))==null?void 0:e.el.getBoundingClientRect()),kn(this,__).call(this)}),Wn(this,xm,()=>{if(!kn(this,oa)){requestAnimationFrame(()=>{var e;kn(this,wm)&&((e=kn(this,Ph,km))==null||e.focus())});return}Wn(this,oa,!1),Wn(this,Th,null)}),Wn(this,Sm,e=>{var n;Wn(this,oa,!0);const i=kn(this,Ph,km);if(!i)return;i.dom.dataset.dragging="true";const s=kn(this,Th);if(e.dataTransfer&&s){const o=s.content();e.dataTransfer.effectAllowed="copyMove";const{dom:r,text:a}=X5t(i,o);e.dataTransfer.clearData(),e.dataTransfer.setData(YT?"Text":"text/html",r.innerHTML),YT||e.dataTransfer.setData("text/plain",a);const l=(n=kn(this,ia))==null?void 0:n.el;l&&e.dataTransfer.setDragImage(l,0,0),i.dragging={slice:o,move:!0}}}),this.keydownCallback=e=>(kn(this,Lh).call(this),Wn(this,oa,!1),e.dom.dataset.dragging="false",!1),Wn(this,b_,j5t((e,n)=>{if(!e.editable)return;const i=e.dom.getBoundingClientRect(),s=i.left+i.width/2;if(!(e.root.elementFromPoint(s,n.clientY)instanceof Element)){kn(this,Lh).call(this);return}const o=kn(this,BC,xj);if(!o)return;const r=Y5t(e,{x:s,y:n.clientY},o);if(!r){kn(this,Lh).call(this);return}kn(this,y_).call(this,r)},200)),this.mousemoveCallback=(e,n)=>(e.composing||!e.editable||kn(this,b_).call(this,e,n),!1),this.dragoverCallback=(e,n)=>{var i;if(kn(this,oa)){const s=(i=kn(this,Ph,km))==null?void 0:i.dom.parentElement;if(!s)return!1;const o=s.scrollHeight>s.clientHeight,r=s.getBoundingClientRect();if(o){if(s.scrollTop>0&&Math.abs(n.y-r.y)<qT){const l=s.scrollTop>10?s.scrollTop-10:0;return s.scrollTop=l,!1}const a=Math.round(e.dom.getBoundingClientRect().height);if(Math.round(s.scrollTop+r.height)<a&&Math.abs(n.y-(r.height+r.y))<qT){const l=s.scrollTop+10;return s.scrollTop=l,!1}}}return!1},this.dragenterCallback=e=>{e.dragging&&(Wn(this,oa,!0),e.dom.dataset.dragging="true")},this.dragleaveCallback=(e,n)=>{const i=n.clientX,s=n.clientY;(i<0||s<0||i>window.innerWidth||s>window.innerHeight)&&(Wn(this,ia,null),kn(this,Oh).call(this,e))},this.dropCallback=e=>(kn(this,Oh).call(this,e),!1),this.dragendCallback=e=>{kn(this,Oh).call(this,e)},Wn(this,Oh,e=>{Wn(this,oa,!1),e.dom.dataset.dragging="false"})}}rg=new WeakMap,__=new WeakMap,Th=new WeakMap,ia=new WeakMap,wm=new WeakMap,oa=new WeakMap,BC=new WeakSet,xj=function(){var t;return(t=kn(this,rg))==null?void 0:t.get(av.key).filterNodes},Ph=new WeakSet,km=function(){var t;return(t=kn(this,rg))==null?void 0:t.get(Vn)},Ih=new WeakMap,Lh=new WeakMap,y_=new WeakMap,Cm=new WeakMap,xm=new WeakMap,Sm=new WeakMap,b_=new WeakMap,Oh=new WeakMap;const Sj=hs(new K5t,"blockService");E2(av,{displayName:"Ctx<blockService>"});const TS=hs({},"blockSpec");E2(av,{displayName:"Ctx<blockSpec>"});const PS=Ps(t=>{const e=new ds("MILKDOWN_BLOCK"),n=t.get(Sj.key),i=t.get(TS.key);return new ts({key:e,...i,props:{...i.props,handleDOMEvents:{drop:s=>n.dropCallback(s),pointermove:(s,o)=>n.mousemoveCallback(s,o),keydown:s=>n.keydownCallback(s),dragover:(s,o)=>n.dragoverCallback(s,o),dragleave:(s,o)=>n.dragleaveCallback(s,o),dragenter:s=>n.dragenterCallback(s),dragend:s=>n.dragendCallback(s)}}})});E2(PS,{displayName:"Prose<block>"});const IS=[TS,av,Sj,PS];IS.key=TS.key;IS.pluginKey=PS.key;var LS=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},oc=(t,e,n)=>(LS(t,e,"read from private field"),n?n.call(t):e.get(t)),ru=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},au=(t,e,n,i)=>(LS(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),Z5t=(t,e,n)=>(LS(t,e,"access private method"),n);function J5t(t){const e=hs({},`${t}_SLASH_SPEC`),n=Ps(s=>{const o=s.get(e.key);return new ts({key:new ds(`${t}_SLASH`),...o})}),i=[e,n];return i.key=e.key,i.pluginKey=n.key,e.meta={package:"@milkdown/plugin-slash",displayName:`Ctx<slashSpec>|${t}`},n.meta={package:"@milkdown/plugin-slash",displayName:`Prose<slash>|${t}`},i}var $m,w_,Rh,k_,C_,x_,zC,$j;class Q5t{constructor(e){ru(this,zC),ru(this,$m,void 0),ru(this,w_,void 0),ru(this,Rh,void 0),ru(this,k_,void 0),ru(this,C_,void 0),ru(this,x_,void 0),au(this,$m,!1),this.onShow=()=>{},this.onHide=()=>{},au(this,x_,(n,i)=>{var s;const{state:o,composing:r}=n,{selection:a,doc:l}=o,{ranges:c}=a,u=Math.min(...c.map(f=>f.$from.pos)),d=Math.max(...c.map(f=>f.$to.pos)),h=i&&i.doc.eq(l)&&i.selection.eq(a);if(oc(this,$m)||((s=n.dom.parentElement)==null||s.appendChild(this.element),au(this,$m,!0)),!(r||h)){if(!oc(this,k_).call(this,n,i)){this.hide();return}Mk({getBoundingClientRect:()=>Xb(n,u,d)},this.element,{placement:"bottom-start",middleware:[Ek(),$k(oc(this,C_))]}).then(({x:f,y:p})=>{Object.assign(this.element.style,{left:`${f}px`,top:`${p}px`})}),this.show()}}),this.update=(n,i)=>{d2(oc(this,x_),oc(this,w_))(n,i)},this.getContent=(n,i=s=>s.type.name==="paragraph")=>{const{selection:s}=n.state,{empty:o,$from:r}=s,a=n.state.selection instanceof Ot,l=this.element.contains(document.activeElement),c=!n.hasFocus()&&!l,u=!n.editable,d=!Y4e(i)(n.state.selection);if(!(c||u||!o||!a||d))return r.parent.textBetween(Math.max(0,r.parentOffset-500),r.parentOffset,void 0,"￼")},this.destroy=()=>{},this.show=()=>{this.element.dataset.show="true",this.onShow()},this.hide=()=>{this.element.dataset.show="false",this.onHide()},this.element=e.content,au(this,w_,e.debounce??200),au(this,k_,e.shouldShow??Z5t(this,zC,$j)),au(this,Rh,e.trigger??"/"),au(this,C_,e.offset)}}$m=new WeakMap,w_=new WeakMap,Rh=new WeakMap,k_=new WeakMap,C_=new WeakMap,x_=new WeakMap,zC=new WeakSet,$j=function(t){const e=this.getContent(t);if(!e)return!1;const n=e.at(-1);return n?Array.isArray(oc(this,Rh))?oc(this,Rh).includes(n):oc(this,Rh)===n:!1};function Aj(t){return t.$from.parent.type.name==="code_block"}function Ej(t){var n;const e=(n=t.$from.node(t.$from.depth-1))==null?void 0:n.type;return(e==null?void 0:e.name)==="list_item"}function Mj(t,e){customElements.get(t)==null&&customElements.define(t,e)}var eSt=Object.defineProperty,GT=Object.getOwnPropertySymbols,tSt=Object.prototype.hasOwnProperty,nSt=Object.prototype.propertyIsEnumerable,XT=(t,e,n)=>e in t?eSt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,sSt=(t,e)=>{for(var n in e||(e={}))tSt.call(e,n)&&XT(t,n,e[n]);if(GT)for(var n of GT(e))nSt.call(e,n)&&XT(t,n,e[n]);return t};function lv(t,e){return Object.assign(t,{meta:sSt({package:"@milkdown/components"},e)}),t}var iSt=Object.defineProperty,KT=Object.getOwnPropertySymbols,oSt=Object.prototype.hasOwnProperty,rSt=Object.prototype.propertyIsEnumerable,ZT=(t,e,n)=>e in t?iSt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,aSt=(t,e)=>{for(var n in e||(e={}))oSt.call(e,n)&&ZT(t,n,e[n]);if(KT)for(var n of KT(e))rSt.call(e,n)&&ZT(t,n,e[n]);return t};const HC="image-block",M2=zs("image-block",()=>({inline:!1,group:"block",selectable:!0,draggable:!0,isolating:!0,marks:"",atom:!0,priority:100,attrs:{src:{default:""},caption:{default:""},ratio:{default:1}},parseDOM:[{tag:`img[data-type="${HC}"]`,getAttrs:t=>{var e;if(!(t instanceof HTMLElement))throw Kr(t);return{src:t.getAttribute("src")||"",caption:t.getAttribute("caption")||"",ratio:Number((e=t.getAttribute("ratio"))!=null?e:1)}}}],toDOM:t=>["img",aSt({"data-type":HC},t.attrs)],parseMarkdown:{match:({type:t})=>t==="image-block",runner:(t,e,n)=>{const i=e.url,s=e.title;let o=Number(e.alt||1);(Number.isNaN(o)||o===0)&&(o=1),t.addNode(n,{src:i,caption:s,ratio:o})}},toMarkdown:{match:t=>t.type.name==="image-block",runner:(t,e)=>{t.openNode("paragraph"),t.addNode("image",void 0,void 0,{title:e.attrs.caption,url:e.attrs.src,alt:`${Number.parseFloat(e.attrs.ratio).toFixed(2)}`}),t.closeNode()}}}));lv(M2.node,{displayName:"NodeSchema<image-block>",group:"ImageBlock"});function lSt(t){return Vd(t,"paragraph",(e,n,i)=>{var s,o;if(((s=e.children)==null?void 0:s.length)!==1)return;const r=(o=e.children)==null?void 0:o[0];if(!r||r.type!=="image")return;const{url:a,alt:l,title:c}=r,u={type:"image-block",url:a,alt:l,title:c};i.children.splice(n,1,u)})}const OS=Fd("remark-image-block",()=>()=>lSt);lv(OS.plugin,{displayName:"Remark<remarkImageBlock>",group:"ImageBlock"});lv(OS.options,{displayName:"RemarkConfig<remarkImageBlock>",group:"ImageBlock"});const cSt={imageIcon:()=>"🌌",captionIcon:()=>"💬",uploadButton:()=>Lt`Upload file`,confirmButton:()=>Lt`Confirm ⏎`,uploadPlaceholderText:"or paste the image link ...",captionPlaceholderText:"Image caption",onUpload:t=>Promise.resolve(URL.createObjectURL(t))},T2=hs(cSt,"imageBlockConfigCtx");lv(T2,{displayName:"Config<image-block>",group:"ImageBlock"});function uSt(t,e){const n=customElements.get(t);if(n==null){customElements.define(t,e);return}n!==e&&console.warn(`Custom element ${t} has been defined before.`)}function dSt({image:t,resizeHandle:e,ratio:n,setRatio:i,src:s}){const o=SS(),r=By(()=>o.current.getRootNode(),[o]);bd(()=>{const a=t.current;a&&(delete a.dataset.origin,delete a.dataset.height,a.style.height="")},[s]),bd(()=>{const a=e.current,l=t.current;if(!a||!l)return;const c=f=>{f.preventDefault();const p=l.getBoundingClientRect().top,m=f.clientY-p,y=Number(m<100?100:m).toFixed(2);l.dataset.height=y,l.style.height=`${y}px`},u=()=>{r.removeEventListener("pointermove",c),r.removeEventListener("pointerup",u);const f=Number(l.dataset.origin),p=Number(l.dataset.height),m=Number.parseFloat(Number(p/f).toFixed(2));Number.isNaN(m)||i(m)},d=f=>{f.preventDefault(),r.addEventListener("pointermove",c),r.addEventListener("pointerup",u)},h=f=>{const p=o.current.getBoundingClientRect().width;if(!p)return;const m=f.target,y=m.height,b=m.width,k=b<p?y:p*(y/b),C=(k*n).toFixed(2);l.dataset.origin=k.toFixed(2),l.dataset.height=C,l.style.height=`${C}px`};return l.addEventListener("load",h),a.addEventListener("pointerdown",d),()=>{l.removeEventListener("load",h),a.removeEventListener("pointerdown",d)}},[])}var hSt=(t,e,n)=>new Promise((i,s)=>{var o=l=>{try{a(n.next(l))}catch(c){s(c)}},r=l=>{try{a(n.throw(l))}catch(c){s(c)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,r);a((n=n.apply(t,e)).next())});let hh=0;const Tj=({src:t="",caption:e="",ratio:n=1,selected:i=!1,readonly:s=!1,setAttr:o,config:r})=>{const a=td(),l=td(),c=td(),[u,d]=Sr(e.length>0),[h,f]=Sr(t.length!==0),[p]=Sr(crypto.randomUUID()),[m,y]=Sr(!1),[b,k]=Sr(t);dSt({image:a,resizeHandle:l,ratio:n,setRatio:V=>o==null?void 0:o("ratio",V),src:t}),bd(()=>{i||d(e.length>0)},[i]);const C=V=>{const F=V.target.value;hh&&window.clearTimeout(hh),hh=window.setTimeout(()=>{o==null||o("caption",F)},1e3)},$=V=>{const F=V.target.value;hh&&(window.clearTimeout(hh),hh=0),o==null||o("caption",F)},x=V=>{const F=V.target.value;f(F.length!==0),k(F)},M=V=>hSt(void 0,null,function*(){var H;const F=(H=V.target.files)==null?void 0:H[0];if(!F)return;const z=yield r==null?void 0:r.onUpload(F);z&&(o==null||o("src",z),f(!0))}),P=V=>{V.preventDefault(),V.stopPropagation(),!s&&d(H=>!H)},T=()=>{var V,H;o==null||o("src",(H=(V=c.current)==null?void 0:V.value)!=null?H:"")},I=V=>{V.key==="Enter"&&T()},L=V=>{V.preventDefault(),V.stopPropagation()},R=V=>{V.stopPropagation(),V.preventDefault()};return Lt`<host class=${Qs(i&&"selected")}>
    <div class=${Qs("image-edit",t.length>0&&"hidden")}>
      <div class="image-icon">
        ${r==null?void 0:r.imageIcon()}
      </div>
      <div class=${Qs("link-importer",m&&"focus")}>
        <input
          ref=${c}
          draggable="true"
          ondragstart=${L}
          disabled=${s}
          class="link-input-area"
          value=${b}
          oninput=${x}
          onkeydown=${I}
          onfocus=${()=>y(!0)}
          onblur=${()=>y(!1)}
        />
        <div class=${Qs("placeholder",h&&"hidden")}>
          <input disabled=${s} class="hidden" id=${p} type="file" accept="image/*" onchange=${M} />
          <label onpointerdown=${R} class="uploader" for=${p}>
            ${r==null?void 0:r.uploadButton()}
          </label>
          <span class="text" onclick=${()=>{var V;return(V=c.current)==null?void 0:V.focus()}}>
            ${r==null?void 0:r.uploadPlaceholderText}
          </span>
        </div>
      </div>
      <div
        class=${Qs("confirm",b.length===0&&"hidden")}
        onclick=${()=>T()}
      >
        ${r==null?void 0:r.confirmButton()}
      </div>
    </div>
    <div class=${Qs("image-wrapper",t.length===0&&"hidden")}>
      <div class="operation">
        <div class="operation-item" onpointerdown=${P}>${r==null?void 0:r.captionIcon()}</div>
      </div>
      <img ref=${a} data-type=${HC} src=${t} alt=${e} ratio=${n} />
      <div ref=${l} class="image-resize-handle"></div>
    </div>
    <input
      draggable="true"
      ondragstart=${L}
      class=${Qs("caption-input",!u&&"hidden")}
      placeholder=${r==null?void 0:r.captionPlaceholderText}
      oninput=${C}
      onblur=${$}
      value=${e}
    />
  </host>`};Tj.props={src:String,caption:String,ratio:Number,selected:Boolean,readonly:Boolean,setAttr:Function,config:Object};const fSt=Yd(Tj);uSt("milkdown-image-block",fSt);const Pj=SB(M2.node,t=>(e,n,i)=>{const s=document.createElement("milkdown-image-block"),o=t.get(T2.key),r=a=>{s.src=a.attrs.src,s.ratio=a.attrs.ratio,s.caption=a.attrs.caption,s.readonly=!n.editable};return r(e),s.selected=!1,s.setAttr=(a,l)=>{const c=i();c!=null&&n.dispatch(n.state.tr.setNodeAttribute(c,a,l))},s.config=o,{dom:s,update:a=>a.type!==e.type?!1:(r(a),!0),stopEvent:a=>a.target instanceof HTMLInputElement,selectNode:()=>{s.selected=!0},deselectNode:()=>{s.selected=!1},destroy:()=>{s.remove()}}});lv(Pj,{displayName:"NodeView<image-block>",group:"ImageBlock"});const pSt=[OS,M2,Pj,T2].flat();function DS(t){const{$from:e,$to:n}=t.selection,{pos:i}=e,{pos:s}=n;return t=t.deleteRange(i-e.node().content.size,s),t}function mSt(t,e,n=null){const{from:i,to:s}=t.selection;return t.setBlockType(i,s,e,n)}function gSt(t,e,n=null){const{$from:i,$to:s}=t.selection,o=i.blockRange(s),r=o&&C8(o,e,n);return r?t.wrap(o,r):null}function vSt(t,e,n=null){const i=e.createAndFill(n);return i?t.replaceSelectionWith(i):null}function r0(t,e=null){return(n,i)=>{if(i){const s=mSt(DS(n.tr),t,e);i(s.scrollIntoView())}return!0}}function O3(t,e=null){return(n,i)=>{const s=gSt(DS(n.tr),t,e);return s?(i&&i(s.scrollIntoView()),!0):!1}}function D3(t,e=null){return(n,i)=>{const s=vSt(DS(n.tr),t,e);return s?(i&&i(s.scrollIntoView()),!0):!1}}var rc,cf;class _St{constructor(){ea(this,rc,void 0);ea(this,cf,void 0);qi(this,rc,[]),this.clear=()=>(qi(this,rc,[]),this),qi(this,cf,e=>{const n={group:e,addItem:(i,s)=>{const o={key:i,...s};return e.items.push(o),n},clear:()=>(e.items=[],n)};return n}),this.addGroup=(e,n)=>{const s={key:e,label:n,items:[]};return Yt(this,rc).push(s),Yt(this,cf).call(this,s)},this.getGroup=e=>{const n=Yt(this,rc).find(i=>i.key===e);if(!n)throw new Error(`Group with key ${e} not found`);return Yt(this,cf).call(this,n)},this.build=()=>Yt(this,rc)}}rc=new WeakMap,cf=new WeakMap;function _o(t){return window.fluentComAdmin.i18n[t]||t}typeof crypto<"u"&&!crypto.randomUUID&&(crypto.randomUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){const e=Math.random()*16|0;return(t==="x"?e:e&3|8).toString(16)})});function ySt(t,e){var o,r,a,l,c,u,d,h,f,p,m;const n=new _St;n.addGroup("text",(e==null?void 0:e.slashMenuTextGroupLabel)??_o("Text")).addItem("text",{label:(e==null?void 0:e.slashMenuTextGroupLabel)??_o("Text"),icon:((o=e==null?void 0:e.slashMenuTextIcon)==null?void 0:o.call(e))??C5t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;r0(_l.type(y))(C,k)}}).addItem("h2",{label:(e==null?void 0:e.slashMenuH2Label)??_o("Heading 2"),icon:((r=e==null?void 0:e.slashMenuH2Icon)==null?void 0:r.call(e))??m5t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;r0(ga.type(y),{level:2})(C,k)}}).addItem("h3",{label:(e==null?void 0:e.slashMenuH3Label)??_o("Heading 3"),icon:((a=e==null?void 0:e.slashMenuH3Icon)==null?void 0:a.call(e))??g5t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;r0(ga.type(y),{level:3})(C,k)}}).addItem("h4",{label:(e==null?void 0:e.slashMenuH4Label)??_o("Heading 4"),icon:((l=e==null?void 0:e.slashMenuH4Icon)==null?void 0:l.call(e))??v5t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;r0(ga.type(y),{level:4})(C,k)}}).addItem("quote",{label:(e==null?void 0:e.slashMenuQuoteLabel)??_o("Quote"),icon:((c=e==null?void 0:e.slashMenuQuoteIcon)==null?void 0:c.call(e))??b5t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;O3(rp.type(y))(C,k)}}).addItem("code",{label:(e==null?void 0:e.slashMenuCodeBlockLabel)??_o("Code"),icon:((u=e==null?void 0:e.slashMenuCodeBlockIcon)==null?void 0:u.call(e))??yj,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;D3(ap.type(y))(C,k)}}).addItem("divider",{label:(e==null?void 0:e.slashMenuDividerLabel)??_o("Divider"),icon:((d=e==null?void 0:e.slashMenuDividerIcon)==null?void 0:d.call(e))??f5t,onRun:y=>{const b=y.get(Vn);D3(lp.type(y))(b.state,b.dispatch);const{state:k}=b,C=Ot.near(k.doc.resolve(k.selection.to));b.dispatch(k.tr.setSelection(C).scrollIntoView()),b.focus()}}),n.addGroup("list",(e==null?void 0:e.slashMenuListGroupLabel)??_o("List")).addItem("bullet-list",{label:(e==null?void 0:e.slashMenuBulletListLabel)??_o("Bullet List"),icon:((h=e==null?void 0:e.slashMenuBulletListIcon)==null?void 0:h.call(e))??d5t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;O3(zd.type(y))(C,k)}}).addItem("ordered-list",{label:(e==null?void 0:e.slashMenuOrderedListLabel)??_o("Ordered List"),icon:((f=e==null?void 0:e.slashMenuOrderedListIcon)==null?void 0:f.call(e))??y5t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;O3(Hd.type(y))(C,k)}}),(e==null?void 0:e.hasImageBlock)!==!1&&n.addGroup("media",(e==null?void 0:e.slashMenuMediaGroupLabel)??_o("Media")).addItem("image",{label:(e==null?void 0:e.slashMenuImageLabel)??_o("Image"),icon:((p=e==null?void 0:e.slashMenuImageIcon)==null?void 0:p.call(e))??NC,onRun:y=>{if(e!=null&&e.canAddImage&&!e.canAddImage())return;const b=y.get(Vn),{dispatch:k,state:C}=b;D3(M2.type(y))(C,k)}}),(m=e==null?void 0:e.buildMenu)==null||m.call(e,n);let i=n.build();t&&(i=i.map(y=>{const b=y.items.filter(k=>k.label.toLowerCase().includes(t.toLowerCase()));return{...y,items:b}}).filter(y=>y.items.length>0));const s=i.flatMap(y=>y.items);return s.forEach((y,b)=>{Object.assign(y,{index:b})}),i.reduce((y,b)=>{const k=y+b.items.length;return Object.assign(b,{range:[y,k]}),k},0),{groups:i,size:s.length}}const Ij=({show:t,hide:e,ctx:n,filter:i,config:s})=>{const{groups:o,size:r}=By(()=>ySt(i,s),[i]),a=SS(),[l,c]=Sr(0),u=By(()=>a.current.getRootNode(),[a]),d=td({x:-999,y:-999}),h=rh(k=>{const C=d.current;if(!C)return;const{x:$,y:x}=k;C.x=$,C.y=x},[]);bd(()=>{r===0&&t&&(e==null||e())},[r,t]);const f=rh((k,C)=>{c($=>{const x=typeof k=="function"?k($):k;return C==null||C(x),x})},[]),p=rh(k=>{const C=a.current.querySelector(`[data-index="${k}"]`),$=a.current.querySelector(".menu-groups");!C||!$||($.scrollTop=C.offsetTop-$.offsetTop)},[]),m=rh(k=>{const C=o.flatMap($=>$.items).at(k);C&&n&&C.onRun(n),e==null||e()},[o]),y=rh(k=>{if(k.key==="Escape"){k.preventDefault(),e==null||e();return}if(k.key==="ArrowDown")return k.preventDefault(),f(C=>C<r-1?C+1:C,p);if(k.key==="ArrowUp")return k.preventDefault(),f(C=>C<=0?C:C-1,p);if(k.key==="ArrowLeft")return k.preventDefault(),f(C=>{const $=o.find(M=>M.range[0]<=C&&M.range[1]>C);if(!$)return C;const x=o[o.indexOf($)-1];return x?x.range[1]-1:C},p);if(k.key==="ArrowRight")return k.preventDefault(),f(C=>{const $=o.find(M=>M.range[0]<=C&&M.range[1]>C);if(!$)return C;const x=o[o.indexOf($)+1];return x?x.range[0]:C},p);k.key==="Enter"&&(k.preventDefault(),m(l))},[e,o,l]),b=rh(k=>C=>{const $=d.current;if(!$)return;const{x,y:M}=C;x===$.x&&M===$.y||f(k)},[]);return bd(()=>(t?u.addEventListener("keydown",y,{capture:!0}):u.removeEventListener("keydown",y,{capture:!0}),()=>{u.removeEventListener("keydown",y,{capture:!0})}),[t,y]),Lt`
    <host onmousedown=${k=>k.preventDefault()}>
      <div class="menu-groups" onmousemove=${h}>
        ${o.map(k=>Lt`
            <div key=${k.key} class="menu-group">
              <ul>
                ${k.items.map(C=>Lt`<li
                    key=${C.key}
                    data-index=${C.index}
                    class=${l===C.index?"hover":""}
                    onmouseenter=${b(C.index)}
                    onmousedown=${()=>{var $;($=a.current.querySelector(`[data-index="${C.index}"]`))==null||$.classList.add("active")}}
                    onmouseup=${()=>{var $;($=a.current.querySelector(`[data-index="${C.index}"]`))==null||$.classList.remove("active"),m(C.index)}}
                  >
                    ${C.icon}
                    <span>${C.label}</span>
                  </li>`)}
              </ul>
            </div>
          `)}
      </div>
    </host>
  `};Ij.props={ctx:Object,config:Object,show:Boolean,filter:String,hide:Function};const Lj=Yd(Ij),Oj=J5t("CREPE_MENU"),Dj=hs({show:()=>{},hide:()=>{}},"menuAPICtx");Mj("milkdown-slash-menu",Lj);function bSt(t,e){t.set(Oj.key,{view:n=>new wSt(t,n,e)})}var wo,ca,ac;class wSt{constructor(e,n,i){ea(this,wo,void 0);ea(this,ca,void 0);ea(this,ac,void 0);qi(this,ac,null),this.update=o=>{Yt(this,ca).update(o)},this.show=o=>{qi(this,ac,o),Yt(this,wo).filter="",Yt(this,ca).show()},this.hide=()=>{qi(this,ac,null),Yt(this,ca).hide()},this.destroy=()=>{Yt(this,ca).destroy(),Yt(this,wo).remove()},qi(this,wo,new Lj),Yt(this,wo).hide=this.hide,Yt(this,wo).ctx=e,Yt(this,wo).config=i;const s=this;qi(this,ca,new Q5t({content:Yt(this,wo),debounce:20,shouldShow(o){if(Aj(o.state.selection)||Ej(o.state.selection))return!1;const r=this.getContent(o,l=>["paragraph","heading"].includes(l.type.name));if(r==null)return!1;const a=Yt(s,ac);return Yt(s,wo).filter=r.startsWith("/")?r.slice(1):r,typeof a=="number"?o.state.doc.resolve(a).node()!==o.state.doc.resolve(o.state.selection.from).node()?(qi(s,ac,null),!1):!0:!!r.startsWith("/")},offset:10})),Yt(this,ca).onShow=()=>{Yt(this,wo).show=!0},Yt(this,ca).onHide=()=>{Yt(this,wo).show=!1},this.update(n),e.set(Dj.key,{show:o=>this.show(o),hide:()=>this.hide()})}}wo=new WeakMap,ca=new WeakMap,ac=new WeakMap;const kSt=(t,e)=>{t.config(n=>bSt(n,e)).use(Dj).use(IS).use(Oj)},CSt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:kSt},Symbol.toStringTag,{value:"Module"}));function xSt(t){var e;return t.childCount<=1&&!((e=t.firstChild)!=null&&e.content.size)}function SSt(t,e){const{selection:n}=t;if(!n.empty)return null;const i=n.$anchor,s=i.parent;if(s.content.size>0||A8(a=>a.type.name==="table")(i))return null;const r=i.before();return Fs.node(r,r+s.nodeSize,{class:"crepe-placeholder","data-placeholder":e})}const Hy=hs({text:"Please enter...",mode:"block"},"placeholderConfigCtx"),Rj=Ps(t=>new ts({key:new ds("CREPE_PLACEHOLDER"),props:{decorations:e=>{const n=t.get(Hy.key);if(n.mode==="doc"&&!xSt(e.doc)||Aj(e.selection)||Ej(e.selection))return null;const i=n.text??"Please enter...",s=SSt(e,i);return s?Gn.create(e.doc,[s]):null}}})),$St=(t,e)=>{t.config(n=>{e&&n.update(Hy.key,i=>({...i,...e}))}).use(Rj).use(Hy)},ASt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:$St,placeholderConfig:Hy,placeholderPlugin:Rj},Symbol.toStringTag,{value:"Module"})),Vj=({ctx:t,hide:e,show:n,config:i})=>{var a,l,c,u,d;const s=qU();bd(()=>{s()},[n]);const o=h=>f=>{f.preventDefault(),t&&h(t),s()},r=h=>{if(!t)return!1;const f=t.get(Vn),{state:{doc:p,selection:m}}=f;return p.rangeHasMark(m.from,m.to,h)};return Lt`<host>
    <button
      class=${Qs("toolbar-item",t&&r(op.type(t))&&"active")}
      onmousedown=${o(h=>{h.get(hn).call(i2.key)})}
    >
      ${((a=i==null?void 0:i.boldIcon)==null?void 0:a.call(i))??u5t}
    </button>
    <button
      class=${Qs("toolbar-item",t&&r(Nd.type(t))&&"active")}
      onmousedown=${o(h=>{h.get(hn).call(s2.key)})}
    >
      ${((l=i==null?void 0:i.italicIcon)==null?void 0:l.call(i))??_5t}
    </button>
    <button
      class=${Qs("toolbar-item",t&&r(cp.type(t))&&"active")}
      onmousedown=${o(h=>{h.get(hn).call(l2.key)})}
    >
      ${((c=i==null?void 0:i.strikethroughIcon)==null?void 0:c.call(i))??k5t}
    </button>
    <div class="divider"></div>
    <button
      class=${Qs("toolbar-item",t&&r(Xa.type(t))&&"active")}
      onmousedown=${o(h=>{h.get(hn).call(o2.key)})}
    >
      ${((u=i==null?void 0:i.codeIcon)==null?void 0:u.call(i))??yj}
    </button>
    <button
      class=${Qs("toolbar-item",t&&r(Or.type(t))&&"active")}
      onmousedown=${o(h=>{const f=h.get(Vn),{selection:p}=f.state;if(r(Or.type(h))){h.get(qf.key).removeLink(p.from,p.to);return}h.get(qf.key).addLink(p.from,p.to),e==null||e()})}
    >
      ${((d=i==null?void 0:i.linkIcon)==null?void 0:d.call(i))??wj}
    </button>
  </host>`};Vj.props={ctx:Object,hide:Function,show:Boolean,config:Object};const Fj=Yd(Vj),JT=ES("CREPE_TOOLBAR");var Ua,Ji;class ESt{constructor(e,n,i){ea(this,Ua,void 0);ea(this,Ji,void 0);this.update=(o,r)=>{Yt(this,Ua).update(o,r)},this.destroy=()=>{Yt(this,Ua).destroy(),Yt(this,Ji).remove()},this.hide=()=>{Yt(this,Ua).hide()};const s=new Fj;qi(this,Ji,s),Yt(this,Ji).ctx=e,Yt(this,Ji).hide=this.hide,Yt(this,Ji).config=i,qi(this,Ua,new AS({content:Yt(this,Ji),debounce:20,offset:10,shouldShow(o){const{doc:r,selection:a}=o.state,{empty:l,from:c,to:u}=a,d=!r.textBetween(c,u).length&&a instanceof Ot,h=!(a instanceof Ot),f=o.dom.getRootNode().activeElement,p=s.contains(f),m=!o.hasFocus()&&!p,y=!o.editable;return!(m||h||l||d||y)}})),Yt(this,Ua).onShow=()=>{Yt(this,Ji).show=!0,setTimeout(()=>{let o=Yt(this,Ji).style.left;o=parseInt(o),o<0?Yt(this,Ji).style.left=0:o>350&&(Yt(this,Ji).style.left="350px")},0)},Yt(this,Ua).onHide=()=>{Yt(this,Ji).show=!1},this.update(n)}}Ua=new WeakMap,Ji=new WeakMap;Mj("milkdown-toolbar",Fj);const MSt=(t,e)=>{t.config(n=>{n.set(JT.key,{view:i=>new ESt(n,i,e)})}).use(JT)},TSt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:MSt},Symbol.toStringTag,{value:"Module"}));var PSt=Object.defineProperty,QT=Object.getOwnPropertySymbols,ISt=Object.prototype.hasOwnProperty,LSt=Object.prototype.propertyIsEnumerable,eP=(t,e,n)=>e in t?PSt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,OSt=(t,e)=>{for(var n in e||(e={}))ISt.call(e,n)&&eP(t,n,e[n]);if(QT)for(var n of QT(e))LSt.call(e,n)&&eP(t,n,e[n]);return t};function Nj(t,e){return Object.assign(t,{meta:OSt({package:"@milkdown/components"},e)}),t}const DSt={imageIcon:()=>"🌌",uploadButton:()=>Lt`Upload`,confirmButton:()=>Lt`⏎`,uploadPlaceholderText:"/Paste",onUpload:t=>Promise.resolve(URL.createObjectURL(t))},P2=hs(DSt,"inlineImageConfigCtx");Nj(P2,{displayName:"Config<image-inline>",group:"ImageInline"});function RSt(t,e){const n=customElements.get(t);if(n==null){customElements.define(t,e);return}n!==e&&console.warn(`Custom element ${t} has been defined before.`)}var VSt=(t,e,n)=>new Promise((i,s)=>{var o=l=>{try{a(n.next(l))}catch(c){s(c)}},r=l=>{try{a(n.throw(l))}catch(c){s(c)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(o,r);a((n=n.apply(t,e)).next())});const Bj=({src:t="",selected:e=!1,alt:n,title:i,setAttr:s,config:o})=>{const r=td(),[a]=Sr(crypto.randomUUID()),[l,c]=Sr(!1),[u,d]=Sr(t.length!==0),[h,f]=Sr(t),p=$=>{const M=$.target.value;d(M.length!==0),f(M)},m=$=>VSt(void 0,null,function*(){var x;const M=(x=$.target.files)==null?void 0:x[0];if(!M)return;const P=yield o==null?void 0:o.onUpload(M);P&&(s==null||s("src",P),d(!0))}),y=()=>{var $,x;s==null||s("src",(x=($=r.current)==null?void 0:$.value)!=null?x:"")},b=$=>{$.key==="Enter"&&y()},k=$=>{$.preventDefault(),$.stopPropagation()},C=$=>{$.stopPropagation(),$.preventDefault()};return Lt`<host class=${Qs(e&&"selected",!t&&"empty")}>
    ${t?Lt`<img class="image-inline" src=${t} alt=${n} title=${i} />`:Lt`<div class="empty-image-inline">
        <div class="image-icon">
          ${o==null?void 0:o.imageIcon()}
        </div>
        <div class=${Qs("link-importer",l&&"focus")}>
          <input
            draggable="true"
            ref=${r}
            ondragstart=${k}
            class="link-input-area"
            value=${h}
            oninput=${p}
            onkeydown=${b}
            onfocus=${()=>c(!0)}
            onblur=${()=>c(!1)}
          />
          <div class=${Qs("placeholder",u&&"hidden")}>
            <input class="hidden" id=${a} type="file" accept="image/*" onchange=${m} />
            <label onpointerdown=${C} class="uploader" for=${a}>
              ${o==null?void 0:o.uploadButton()}
            </label>
            <span class="text" onclick=${()=>{var $;return($=r.current)==null?void 0:$.focus()}}>
              ${o==null?void 0:o.uploadPlaceholderText}
            </span>
          </div>
        </div>
        <div
          class=${Qs("confirm",h.length===0&&"hidden")}
          onclick=${()=>y()}
        >
          ${o==null?void 0:o.confirmButton()}
        </div>
      </div>`}
  </host>`};Bj.props={src:String,alt:String,title:String,selected:Boolean,setAttr:Function,config:Object};const FSt=Yd(Bj);RSt("milkdown-image-inline",FSt);const zj=SB(Bd.node,t=>(e,n,i)=>{const s=document.createElement("milkdown-image-inline"),o=t.get(P2.key),r=a=>{s.src=a.attrs.src,s.alt=a.attrs.alt,s.title=a.attrs.title};return r(e),s.selected=!1,s.setAttr=(a,l)=>{const c=i();c!=null&&n.dispatch(n.state.tr.setNodeAttribute(c,a,l))},s.config=o,{dom:s,update:a=>a.type!==e.type?!1:(r(a),!0),stopEvent:a=>!!(s.selected&&a.target instanceof HTMLInputElement),selectNode:()=>{s.selected=!0},deselectNode:()=>{s.selected=!1},destroy:()=>{s.remove()}}});Nj(zj,{displayName:"NodeView<image-inline>",group:"ImageInline"});const NSt=[P2,zj],BSt=(t,e)=>{t.config(n=>{n.update(P2.key,i=>({uploadButton:(e==null?void 0:e.inlineUploadButton)??(()=>"Upload"),imageIcon:(e==null?void 0:e.inlineImageIcon)??(()=>NC),confirmButton:(e==null?void 0:e.inlineConfirmButton)??(()=>bj),uploadPlaceholderText:(e==null?void 0:e.inlineUploadPlaceholderText)??"or paste link",onUpload:(e==null?void 0:e.inlineOnUpload)??(e==null?void 0:e.onUpload)??i.onUpload})),n.update(T2.key,i=>({uploadButton:(e==null?void 0:e.blockUploadButton)??(()=>"Upload file"),imageIcon:(e==null?void 0:e.blockImageIcon)??(()=>NC),captionIcon:(e==null?void 0:e.blockCaptionIcon)??(()=>h5t),confirmButton:(e==null?void 0:e.blockConfirmButton)??(()=>"Confirm"),captionPlaceholderText:(e==null?void 0:e.blockCaptionPlaceholderText)??"Write Image Caption",uploadPlaceholderText:(e==null?void 0:e.blockUploadPlaceholderText)??"or paste link",onUpload:(e==null?void 0:e.blockOnUpload)??(e==null?void 0:e.onUpload)??i.onUpload}))}).use(pSt).use(NSt)},zSt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:BSt},Symbol.toStringTag,{value:"Module"})),HSt=`.fcom_pop_buttons .el-dropdown-menu__item{padding:0;display:block}.fcom_pop_buttons .el-dropdown-menu__item button{padding:15px 30px!important;width:100%;border-radius:0}.fcom_chat_menu .el-badge__content{align-items:center;background-color:var(--el-color-danger);border:1px solid var(--el-color-white);border-radius:10px;color:var(--el-color-white);display:inline-flex;font-size:12px;height:18px;padding:6px;justify-content:center;white-space:nowrap}.fcom_chat_menu .el-badge__content.is-fixed{top:0;z-index:1;transform:translateY(-50%) translate(100%)}.fcom_space_form_bottom{display:flex;justify-content:space-between;align-items:center;width:100%}
`,USt=Object.freeze(Object.defineProperty({__proto__:null,default:HSt},Symbol.toStringTag,{value:"Module"})),jSt=`.fcom-report-wrap .fcom-report-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.fcom-report-wrap .fcom-report-header h4{font-size:16px;font-weight:500;color:var(--fcom-primary-text, #0E121B);line-height:24px;margin:0}.fcom-report-wrap .fcom-report-header .fcom-report-header-action{display:flex;align-items:center}.fcom-report-wrap .fcom-report-header .fcom-report-header-action .date-selector{border-right:none}.fcom-report-wrap .fcom-report-header .fcom-report-header-action .el-select{width:150px}.fcom-report-wrap .fcom-report-header .fcom-report-header-action .el-select .el-select__wrapper{border-top-right-radius:0;border-bottom-right-radius:0;border:1px solid #E1E4EA;box-shadow:none}.fcom-report-wrap .fcom-report-header .fcom-report-header-action .el-date-editor{box-shadow:none;border:1px solid #E1E4EA;border-radius:0 8px 8px 0;max-width:250px}.fcom-report-wrap .fcom-report-body .fcom-report-stat-widgets{margin-bottom:24px}.fcom-report-wrap .fcom-report-chart-header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px}.fcom-report-wrap .fcom-report-chart-header .el-select{width:150px}.fcom-report-wrap .fcom-report-chart-header h4{margin:0;display:flex;align-items:center;gap:4px;color:var(--fcom-menu-text, #0E121B);font-size:16px;font-weight:500;line-height:24px;letter-spacing:-.011em}.fcom-report-wrap .fcom-report-chart-header h4 i{color:#99a0ae}.fcom-report-wrap .fcom-report-chart{background:var(--fcom-primary-bg, #ffffff);border-radius:12px;margin-bottom:24px}.fcom-report-wrap .fcom-report-chart .fcom-report-chart-header{border-bottom:1px solid var(--stroke-soft-200, #E1E4EA)}.fcom-report-popular-time{background:var(--fcom-primary-bg, #ffffff);border-radius:12px;overflow:hidden}.fcom-report-popular-time .el-table .el-table__inner-wrapper:before{display:none}.fcom-report-popular-time .el-table .el-table__header thead tr th{background:var(--fcom-primary-border, #F5F7FA);color:var(--fcom-secondary-text, #525866);font-size:14px;font-weight:400;line-height:20px;letter-spacing:-.006em;border:none;padding-top:8px;padding-bottom:8px}.fcom-report-popular-time .el-table .el-table__header thead tr th .cell{padding-left:20px;padding-right:12px}.fcom-report-popular-time .el-table .el-table__body tbody tr{background:var(--fcom-primary-bg, #ffffff)}.fcom-report-popular-time .el-table .el-table__body tbody tr:last-child td{border-bottom:none}.fcom-report-popular-time .el-table .el-table__body tbody tr td{font-size:14px;font-weight:400;line-height:20px;letter-spacing:-.006em;color:var(--fcom-primary-text, #525866);padding-top:14px;padding-bottom:14px;border-bottom-color:var(--stroke-soft-200, #E1E4EA)}.fcom-report-popular-time .el-table .el-table__body tbody tr td .cell{padding-left:20px;padding-right:12px}.fcom-report-stat-widgets{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:24px}.fcom-report-stat-widgets .fcom-report-stat-widget{padding:20px;border-radius:12px;background:var(--fcom-primary-bg, #ffffff)}.fcom-report-stat-widgets .fcom-report-stat-widget .stat-title{display:block;font-size:14px;line-height:20px;color:var(--fcom-primary-text, #525866);letter-spacing:-.006em;margin-bottom:4px}.fcom-report-stat-widgets .fcom-report-stat-widget h3{display:flex;align-items:center;gap:8px;font-size:32px;font-weight:500;line-height:40px;letter-spacing:-.005em;margin:0;color:var(--fcom-primary-text, #0E121B)}.fcom-report-stat-widgets .fcom-report-stat-widget h3 .stat-percent{display:block;font-size:12px;font-weight:500;line-height:16px;border-radius:30px;color:var(--state-success-dark, #0B4627);background:var(--state-success-light, #C2F5DA);padding:2px 8px}.fcom-report-stat-widgets .fcom-report-stat-widget h3 .stat-percent.stat-down{background:var(--state-error-light, #FFC0C5);color:var(--state-error-dark, #681219)}.fcom-members-activities-wrap .fcom-top-members-wrap .fcom-report-chart-header{border-bottom:1px solid var(--fcom-primary-border, #E1E4EA)}.fcom-members-activity-box{border-bottom:1px solid var(--fcom-primary-border, #E1E4EA);padding-top:16px;padding-bottom:16px;display:flex;align-items:center;gap:14px}.fcom-members-activity-box .image-box .number{position:absolute;right:0;bottom:0;background:var(--bg-surface-800, #222530);min-width:16px;height:16px;border-radius:10px;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 1.5px #fff;font-size:11px;font-weight:500;line-height:12px;letter-spacing:.02em;color:var(--fcom-primary-text, #525866);padding:0 4px}.fcom-members-activity-box .points{color:var(--text-strong-950, #0E121B);font-weight:300;display:block;line-height:16px;font-size:12px}.fcom-report-popular-spacers{padding-bottom:20px}.fcom-members-activities-wrap{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:24px;margin-bottom:24px;align-items:flex-start}.fcom-members-activities-wrap img{max-width:100%}.fcom-members-activities-wrap .fcom-top-members-wrap{background:var(--fcom-primary-bg, #ffffff);border-radius:12px}.fcom-members-activities-wrap .fcom-top-members-wrap .fcom-report-chart-header{border-bottom:1px solid var(--stroke-soft-200, #E1E4EA)}.fcom-members-activity-lists{padding:20px}.fcom-members-activity-lists .fcom-members-activity-box:last-child{border-bottom:none;padding-bottom:0}.fcom-members-activity-lists .fcom-members-activity-box:first-child{padding-top:0}.fcom-members-activity-box{border-bottom:1px solid var(--stroke-soft-200, #E1E4EA);padding-top:16px;padding-bottom:16px;display:flex;align-items:center;gap:14px}.fcom-members-activity-box .image-box{position:relative;width:40px;height:40px;border-radius:50%}.fcom-members-activity-box .image-box img{display:block;width:100%;height:100%;border-radius:50%;object-fit:cover}.fcom-members-activity-box .image-box .number{position:absolute;right:0;bottom:0;background:var(--bg-surface-800, #222530);min-width:16px;height:16px;border-radius:10px;display:flex;align-items:center;justify-content:center;box-shadow:0 0 0 1.5px #fff;font-size:11px;font-weight:500;line-height:12px;letter-spacing:.02em;color:#fff;padding:0 4px}.fcom-members-activity-box .image-box .indicator{position:absolute;right:0;bottom:5px;width:6px;height:6px;background:var(--state-success-base, #23A682);box-shadow:0 0 0 1.8px #fff;border-radius:50%}.fcom-members-activity-box .image-box .indicator.offline{background:var(--state-faded-base, #717784)}.fcom-members-activity-box .content-box{flex:1}.fcom-members-activity-box .content-box h5{margin:0 0 4px;color:var(--fcom-primary-text, #525866);font-size:14px;font-weight:500;line-height:20px;letter-spacing:-.006em}.fcom-members-activity-box .content-box p{margin:0;line-height:16px;font-size:12px}.fcom-members-activity-box .points{color:var(--fcom-primary-text, #525866);font-weight:300;display:block;line-height:16px;font-size:12px}.el-select.space-selector{margin-right:10px}.el-select.space-selector .el-select__wrapper.el-tooltip__trigger.el-tooltip__trigger{border-top-right-radius:8px;border-bottom-right-radius:8px}
`,WSt=Object.freeze(Object.defineProperty({__proto__:null,default:jSt},Symbol.toStringTag,{value:"Module"}))});export default YSt();

````
