| @@ -1,64 +1,63 @@ | ||
| 1 | -var bj=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var sS=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var Dt=(t,e,n)=>(sS(t,e,"read from private field"),n?n.call(t):e.get(t)),Gr=(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)},Oi=(t,e,n,s)=>(sS(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);var f2t=bj((fo,po)=>{const wj="modulepreload",Cj=function(t){return"/"+t},iS={},iu=function(e,n,s){if(!n||n.length===0)return e();const i=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=Cj(o),o in iS)return;iS[o]=!0;const r=o.endsWith(".css"),a=r?'[rel="stylesheet"]':"";if(!!s)for(let u=i.length-1;u>=0;u--){const d=i[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":wj,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})};/** | |
| 1 | +var IW=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var u9=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var Gt=(t,e,n)=>(u9(t,e,"read from private field"),n?n.call(t):e.get(t)),ua=(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)=>(u9(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);var $8t=IW((Lo,Oo)=>{const LW="modulepreload",OW=function(t){return"/"+t},d9={},Qs=function(e,n,i){if(!n||n.length===0)return e();const s=document.getElementsByTagName("link");return Promise.all(n.map(o=>{if(o=OW(o),o in d9)return;d9[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":LW,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})};/** | |
| 2 | 2 | * @vue/shared v3.5.27 |
| 3 | 3 | * (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 4 | 4 | * @license MIT |
| 5 | -**/function _o(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const sn={},xh=[],Vt=()=>{},bh=()=>!1,sd=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),bk=t=>t.startsWith("onUpdate:"),Zt=Object.assign,wk=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},kj=Object.prototype.hasOwnProperty,Rt=(t,e)=>kj.call(t,e),Le=Array.isArray,Sh=t=>Tf(t)==="[object Map]",id=t=>Tf(t)==="[object Set]",s_=t=>Tf(t)==="[object Date]",xj=t=>Tf(t)==="[object RegExp]",ot=t=>typeof t=="function",nt=t=>typeof t=="string",Xi=t=>typeof t=="symbol",Ct=t=>t!==null&&typeof t=="object",zm=t=>(Ct(t)||ot(t))&&ot(t.then)&&ot(t.catch),PT=Object.prototype.toString,Tf=t=>PT.call(t),D0=t=>Tf(t).slice(8,-1),jh=t=>Tf(t)==="[object Object]",yy=t=>nt(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,Ja=_o(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Sj=_o("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),by=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},$j=/-\w/g,Bn=by(t=>t.replace($j,e=>e.slice(1).toUpperCase())),Aj=/\B([A-Z])/g,wi=by(t=>t.replace(Aj,"-$1").toLowerCase()),Sc=by(t=>t.charAt(0).toUpperCase()+t.slice(1)),wu=by(t=>t?`on${Sc(t)}`:""),_i=(t,e)=>!Object.is(t,e),$h=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},IT=(t,e,n,s=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:s,value:n})},wy=t=>{const e=parseFloat(t);return isNaN(e)?t:e},i_=t=>{const e=nt(t)?Number(t):NaN;return isNaN(e)?t:e};let oS;const Cy=()=>oS||(oS=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Mj(t,e){return t+JSON.stringify(e,(n,s)=>typeof s=="function"?s.toString():s)}const Ej="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,Symbol",Tj=_o(Ej);function Ke(t){if(Le(t)){const e={};for(let n=0;n<t.length;n++){const s=t[n],i=nt(s)?LT(s):Ke(s);if(i)for(const o in i)e[o]=i[o]}return e}else if(nt(t)||Ct(t))return t}const Pj=/;(?![^(]*\))/g,Ij=/:([^]+)/,Lj=/\/\*[^]*?\*\//g;function LT(t){const e={};return t.replace(Lj,"").split(Pj).forEach(n=>{if(n){const s=n.split(Ij);s.length>1&&(e[s[0].trim()]=s[1].trim())}}),e}function W(t){let e="";if(nt(t))e=t;else if(Le(t))for(let n=0;n<t.length;n++){const s=W(t[n]);s&&(e+=s+" ")}else if(Ct(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function Ck(t){if(!t)return null;let{class:e,style:n}=t;return e&&!nt(e)&&(t.class=W(e)),n&&(t.style=Ke(n)),t}const Oj="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",Dj="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",Rj="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",Vj="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",Fj=_o(Oj),Nj=_o(Dj),Bj=_o(Rj),zj=_o(Vj),Hj="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Uj=_o(Hj);function OT(t){return!!t||t===""}function jj(t,e){if(t.length!==e.length)return!1;let n=!0;for(let s=0;n&&s<t.length;s++)n=uc(t[s],e[s]);return n}function uc(t,e){if(t===e)return!0;let n=s_(t),s=s_(e);if(n||s)return n&&s?t.getTime()===e.getTime():!1;if(n=Xi(t),s=Xi(e),n||s)return t===e;if(n=Le(t),s=Le(e),n||s)return n&&s?jj(t,e):!1;if(n=Ct(t),s=Ct(e),n||s){if(!n||!s)return!1;const i=Object.keys(t).length,o=Object.keys(e).length;if(i!==o)return!1;for(const r in t){const a=t.hasOwnProperty(r),l=e.hasOwnProperty(r);if(a&&!l||!a&&l||!uc(t[r],e[r]))return!1}}return String(t)===String(e)}function ky(t,e){return t.findIndex(n=>uc(n,e))}const DT=t=>!!(t&&t.__v_isRef===!0),M=t=>nt(t)?t:t==null?"":Le(t)||Ct(t)&&(t.toString===PT||!ot(t.toString))?DT(t)?M(t.value):JSON.stringify(t,RT,2):String(t),RT=(t,e)=>DT(e)?RT(t,e.value):Sh(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[s,i],o)=>(n[f2(s,o)+" =>"]=i,n),{})}:id(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>f2(n))}:Xi(e)?f2(e):Ct(e)&&!Le(e)&&!jh(e)?String(e):e,f2=(t,e="")=>{var n;return Xi(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};function Wj(t){return t==null?"initial":typeof t=="string"?t===""?" ":t:String(t)}/** | |
| 5 | +**/function zo(t){const e=Object.create(null);for(const n of t.split(","))e[n]=1;return n=>n in e}const pn={},Zh=[],Dt=()=>{},qh=()=>!1,Pd=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),g6=t=>t.startsWith("onUpdate:"),cn=Object.assign,v6=(t,e)=>{const n=t.indexOf(e);n>-1&&t.splice(n,1)},DW=Object.prototype.hasOwnProperty,zt=(t,e)=>DW.call(t,e),Me=Array.isArray,Jh=t=>rp(t)==="[object Map]",Id=t=>rp(t)==="[object Set]",H_=t=>rp(t)==="[object Date]",RW=t=>rp(t)==="[object RegExp]",et=t=>typeof t=="function",Ke=t=>typeof t=="string",mo=t=>typeof t=="symbol",yt=t=>t!==null&&typeof t=="object",dd=t=>(yt(t)||et(t))&&et(t.then)&&et(t.catch),TP=Object.prototype.toString,rp=t=>TP.call(t),VW=t=>rp(t).slice(8,-1),hd=t=>rp(t)==="[object Object]",lb=t=>Ke(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,ul=zo(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),FW=zo("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),cb=t=>{const e=Object.create(null);return n=>e[n]||(e[n]=t(n))},NW=/-\w/g,Un=cb(t=>t.replace(NW,e=>e.slice(1).toUpperCase())),BW=/\B([A-Z])/g,zi=cb(t=>t.replace(BW,"-$1").toLowerCase()),Gc=cb(t=>t.charAt(0).toUpperCase()+t.slice(1)),qu=cb(t=>t?`on${Gc(t)}`:""),Ni=(t,e)=>!Object.is(t,e),Qh=(t,...e)=>{for(let n=0;n<t.length;n++)t[n](...e)},PP=(t,e,n,i=!1)=>{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:i,value:n})},ub=t=>{const e=parseFloat(t);return isNaN(e)?t:e},U_=t=>{const e=Ke(t)?Number(t):NaN;return isNaN(e)?t:e};let h9;const db=()=>h9||(h9=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function zW(t,e){return t+JSON.stringify(e,(n,i)=>typeof i=="function"?i.toString():i)}const HW="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,Symbol",UW=zo(HW);function Xe(t){if(Me(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 jW=/;(?![^(]*\))/g,WW=/:([^]+)/,YW=/\/\*[^]*?\*\//g;function IP(t){const e={};return t.replace(YW,"").split(jW).forEach(n=>{if(n){const i=n.split(WW);i.length>1&&(e[i[0].trim()]=i[1].trim())}}),e}function q(t){let e="";if(Ke(t))e=t;else if(Me(t))for(let n=0;n<t.length;n++){const i=q(t[n]);i&&(e+=i+" ")}else if(yt(t))for(const n in t)t[n]&&(e+=n+" ");return e.trim()}function ef(t){if(!t)return null;let{class:e,style:n}=t;return e&&!Ke(e)&&(t.class=q(e)),n&&(t.style=Xe(n)),t}const qW="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",GW="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",XW="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",KW="area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr",ZW=zo(qW),JW=zo(GW),QW=zo(XW),eY=zo(KW),tY="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",nY=zo(tY);function LP(t){return!!t||t===""}function sY(t,e){if(t.length!==e.length)return!1;let n=!0;for(let i=0;n&&i<t.length;i++)n=Dc(t[i],e[i]);return n}function Dc(t,e){if(t===e)return!0;let n=H_(t),i=H_(e);if(n||i)return n&&i?t.getTime()===e.getTime():!1;if(n=mo(t),i=mo(e),n||i)return t===e;if(n=Me(t),i=Me(e),n||i)return n&&i?sY(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||!Dc(t[r],e[r]))return!1}}return String(t)===String(e)}function hb(t,e){return t.findIndex(n=>Dc(n,e))}const OP=t=>!!(t&&t.__v_isRef===!0),x=t=>Ke(t)?t:t==null?"":Me(t)||yt(t)&&(t.toString===TP||!et(t.toString))?OP(t)?x(t.value):JSON.stringify(t,DP,2):String(t),DP=(t,e)=>OP(e)?DP(t,e.value):Jh(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((n,[i,s],o)=>(n[iw(i,o)+" =>"]=s,n),{})}:Id(e)?{[`Set(${e.size})`]:[...e.values()].map(n=>iw(n))}:mo(e)?iw(e):yt(e)&&!Me(e)&&!hd(e)?String(e):e,iw=(t,e="")=>{var n;return mo(t)?`Symbol(${(n=t.description)!=null?n:e})`:t};function iY(t){return t==null?"initial":typeof t=="string"?t===""?" ":t:String(t)}/** | |
| 6 | 6 | * @vue/reactivity v3.5.27 |
| 7 | 7 | * (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 8 | 8 | * @license MIT |
| 9 | -**/let Qs;class kk{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Qs,!e&&Qs&&(this.index=(Qs.scopes||(Qs.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].pause();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].resume();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].resume()}}run(e){if(this._active){const n=Qs;try{return Qs=this,e()}finally{Qs=n}}}on(){++this._on===1&&(this.prevScope=Qs,Qs=this)}off(){this._on>0&&--this._on===0&&(Qs=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(this.effects.length=0,n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!e){const i=this.parent.scopes.pop();i&&i!==this&&(this.parent.scopes[this.index]=i,i.index=this.index)}this.parent=void 0}}}function xy(t){return new kk(t)}function Sy(){return Qs}function $y(t,e=!1){Qs&&Qs.cleanups.push(t)}let Rn;const p2=new WeakSet;class Hm{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Qs&&Qs.active&&Qs.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,p2.has(this)&&(p2.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||FT(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,rS(this),NT(this);const e=Rn,n=_r;Rn=this,_r=!0;try{return this.fn()}finally{BT(this),Rn=e,_r=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)$k(e);this.deps=this.depsTail=void 0,rS(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?p2.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){p3(this)&&this.run()}get dirty(){return p3(this)}}let VT=0,om,rm;function FT(t,e=!1){if(t.flags|=8,e){t.next=rm,rm=t;return}t.next=om,om=t}function xk(){VT++}function Sk(){if(--VT>0)return;if(rm){let e=rm;for(rm=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;om;){let e=om;for(om=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(s){t||(t=s)}e=n}}if(t)throw t}function NT(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function BT(t){let e,n=t.depsTail,s=n;for(;s;){const i=s.prevDep;s.version===-1?(s===n&&(n=i),$k(s),Yj(s)):e=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=i}t.deps=e,t.depsTail=n}function p3(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(zT(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function zT(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Um)||(t.globalVersion=Um,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!p3(t))))return;t.flags|=2;const e=t.dep,n=Rn,s=_r;Rn=t,_r=!0;try{NT(t);const i=t.fn(t._value);(e.version===0||_i(i,t._value))&&(t.flags|=128,t._value=i,e.version++)}catch(i){throw e.version++,i}finally{Rn=n,_r=s,BT(t),t.flags&=-3}}function $k(t,e=!1){const{dep:n,prevSub:s,nextSub:i}=t;if(s&&(s.nextSub=i,t.prevSub=void 0),i&&(i.prevSub=s,t.nextSub=void 0),n.subs===t&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)$k(o,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function Yj(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function Gj(t,e){t.effect instanceof Hm&&(t=t.effect.fn);const n=new Hm(t);e&&Zt(n,e);try{n.run()}catch(i){throw n.stop(),i}const s=n.run.bind(n);return s.effect=n,s}function qj(t){t.effect.stop()}let _r=!0;const HT=[];function nl(){HT.push(_r),_r=!1}function sl(){const t=HT.pop();_r=t===void 0?!0:t}function rS(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=Rn;Rn=void 0;try{e()}finally{Rn=n}}}let Um=0,Xj=class{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}};class Ay{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Rn||!_r||Rn===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Rn)n=this.activeLink=new Xj(Rn,this),Rn.deps?(n.prevDep=Rn.depsTail,Rn.depsTail.nextDep=n,Rn.depsTail=n):Rn.deps=Rn.depsTail=n,UT(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=Rn.depsTail,n.nextDep=void 0,Rn.depsTail.nextDep=n,Rn.depsTail=n,Rn.deps===n&&(Rn.deps=s)}return n}trigger(e){this.version++,Um++,this.notify(e)}notify(e){xk();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{Sk()}}}function UT(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let s=e.deps;s;s=s.nextDep)UT(s)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const o_=new WeakMap,Cu=Symbol(""),m3=Symbol(""),jm=Symbol("");function ni(t,e,n){if(_r&&Rn){let s=o_.get(t);s||o_.set(t,s=new Map);let i=s.get(n);i||(s.set(n,i=new Ay),i.map=s,i.key=n),i.track()}}function Ua(t,e,n,s,i,o){const r=o_.get(t);if(!r){Um++;return}const a=l=>{l&&l.trigger()};if(xk(),e==="clear")r.forEach(a);else{const l=Le(t),c=l&&yy(n);if(l&&n==="length"){const u=Number(s);r.forEach((d,h)=>{(h==="length"||h===jm||!Xi(h)&&h>=u)&&a(d)})}else switch((n!==void 0||r.has(void 0))&&a(r.get(n)),c&&a(r.get(jm)),e){case"add":l?c&&a(r.get("length")):(a(r.get(Cu)),Sh(t)&&a(r.get(m3)));break;case"delete":l||(a(r.get(Cu)),Sh(t)&&a(r.get(m3)));break;case"set":Sh(t)&&a(r.get(Cu));break}}Sk()}function Kj(t,e){const n=o_.get(t);return n&&n.get(e)}function Pd(t){const e=Yt(t);return e===t?e:(ni(e,"iterate",jm),Wi(t)?e:e.map(Er))}function My(t){return ni(t=Yt(t),"iterate",jm),t}function Rl(t,e){return ca(t)?Wh(yr(t)?Er(e):e):Er(e)}const Zj={__proto__:null,[Symbol.iterator](){return m2(this,Symbol.iterator,t=>Rl(this,t))},concat(...t){return Pd(this).concat(...t.map(e=>Le(e)?Pd(e):e))},entries(){return m2(this,"entries",t=>(t[1]=Rl(this,t[1]),t))},every(t,e){return Ta(this,"every",t,e,void 0,arguments)},filter(t,e){return Ta(this,"filter",t,e,n=>n.map(s=>Rl(this,s)),arguments)},find(t,e){return Ta(this,"find",t,e,n=>Rl(this,n),arguments)},findIndex(t,e){return Ta(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Ta(this,"findLast",t,e,n=>Rl(this,n),arguments)},findLastIndex(t,e){return Ta(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Ta(this,"forEach",t,e,void 0,arguments)},includes(...t){return g2(this,"includes",t)},indexOf(...t){return g2(this,"indexOf",t)},join(t){return Pd(this).join(t)},lastIndexOf(...t){return g2(this,"lastIndexOf",t)},map(t,e){return Ta(this,"map",t,e,void 0,arguments)},pop(){return lp(this,"pop")},push(...t){return lp(this,"push",t)},reduce(t,...e){return aS(this,"reduce",t,e)},reduceRight(t,...e){return aS(this,"reduceRight",t,e)},shift(){return lp(this,"shift")},some(t,e){return Ta(this,"some",t,e,void 0,arguments)},splice(...t){return lp(this,"splice",t)},toReversed(){return Pd(this).toReversed()},toSorted(t){return Pd(this).toSorted(t)},toSpliced(...t){return Pd(this).toSpliced(...t)},unshift(...t){return lp(this,"unshift",t)},values(){return m2(this,"values",t=>Rl(this,t))}};function m2(t,e,n){const s=My(t),i=s[e]();return s!==t&&!Wi(t)&&(i._next=i.next,i.next=()=>{const o=i._next();return o.done||(o.value=n(o.value)),o}),i}const Jj=Array.prototype;function Ta(t,e,n,s,i,o){const r=My(t),a=r!==t&&!Wi(t),l=r[e];if(l!==Jj[e]){const d=l.apply(t,o);return a?Er(d):d}let c=n;r!==t&&(a?c=function(d,h){return n.call(this,Rl(t,d),h,t)}:n.length>2&&(c=function(d,h){return n.call(this,d,h,t)}));const u=l.call(r,c,s);return a&&i?i(u):u}function aS(t,e,n,s){const i=My(t);let o=n;return i!==t&&(Wi(t)?n.length>3&&(o=function(r,a,l){return n.call(this,r,a,l,t)}):o=function(r,a,l){return n.call(this,r,Rl(t,a),l,t)}),i[e](o,...s)}function g2(t,e,n){const s=Yt(t);ni(s,"iterate",jm);const i=s[e](...n);return(i===-1||i===!1)&&Ng(n[0])?(n[0]=Yt(n[0]),s[e](...n)):i}function lp(t,e,n=[]){nl(),xk();const s=Yt(t)[e].apply(t,n);return Sk(),sl(),s}const Qj=_o("__proto__,__v_isRef,__isVue"),jT=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(Xi));function eW(t){Xi(t)||(t=String(t));const e=Yt(this);return ni(e,"has",t),e.hasOwnProperty(t)}class WT{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,s){if(n==="__v_skip")return e.__v_skip;const i=this._isReadonly,o=this._isShallow;if(n==="__v_isReactive")return!i;if(n==="__v_isReadonly")return i;if(n==="__v_isShallow")return o;if(n==="__v_raw")return s===(i?o?ZT:KT:o?XT:qT).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(s)?e:void 0;const r=Le(e);if(!i){let l;if(r&&(l=Zj[n]))return l;if(n==="hasOwnProperty")return eW}const a=Reflect.get(e,n,hn(e)?e:s);if((Xi(n)?jT.has(n):Qj(n))||(i||ni(e,"get",n),o))return a;if(hn(a)){const l=r&&yy(n)?a:a.value;return i&&Ct(l)?dc(l):l}return Ct(a)?i?dc(a):as(a):a}}class YT extends WT{constructor(e=!1){super(!1,e)}set(e,n,s,i){let o=e[n];const r=Le(e)&&yy(n);if(!this._isShallow){const c=ca(o);if(!Wi(s)&&!ca(s)&&(o=Yt(o),s=Yt(s)),!r&&hn(o)&&!hn(s))return c||(o.value=s),!0}const a=r?Number(n)<e.length:Rt(e,n),l=Reflect.set(e,n,s,hn(e)?e:i);return e===Yt(i)&&(a?_i(s,o)&&Ua(e,"set",n,s):Ua(e,"add",n,s)),l}deleteProperty(e,n){const s=Rt(e,n);e[n];const i=Reflect.deleteProperty(e,n);return i&&s&&Ua(e,"delete",n,void 0),i}has(e,n){const s=Reflect.has(e,n);return(!Xi(n)||!jT.has(n))&&ni(e,"has",n),s}ownKeys(e){return ni(e,"iterate",Le(e)?"length":Cu),Reflect.ownKeys(e)}}class GT extends WT{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}}const tW=new YT,nW=new GT,sW=new YT(!0),iW=new GT(!0),g3=t=>t,j1=t=>Reflect.getPrototypeOf(t);function oW(t,e,n){return function(...s){const i=this.__v_raw,o=Yt(i),r=Sh(o),a=t==="entries"||t===Symbol.iterator&&r,l=t==="keys"&&r,c=i[t](...s),u=n?g3:e?Wh:Er;return!e&&ni(o,"iterate",l?m3:Cu),Zt(Object.create(c),{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}}})}}function W1(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function rW(t,e){const n={get(i){const o=this.__v_raw,r=Yt(o),a=Yt(i);t||(_i(i,a)&&ni(r,"get",i),ni(r,"get",a));const{has:l}=j1(r),c=e?g3:t?Wh:Er;if(l.call(r,i))return c(o.get(i));if(l.call(r,a))return c(o.get(a));o!==r&&o.get(i)},get size(){const i=this.__v_raw;return!t&&ni(Yt(i),"iterate",Cu),i.size},has(i){const o=this.__v_raw,r=Yt(o),a=Yt(i);return t||(_i(i,a)&&ni(r,"has",i),ni(r,"has",a)),i===a?o.has(i):o.has(i)||o.has(a)},forEach(i,o){const r=this,a=r.__v_raw,l=Yt(a),c=e?g3:t?Wh:Er;return!t&&ni(l,"iterate",Cu),a.forEach((u,d)=>i.call(o,c(u),c(d),r))}};return Zt(n,t?{add:W1("add"),set:W1("set"),delete:W1("delete"),clear:W1("clear")}:{add(i){!e&&!Wi(i)&&!ca(i)&&(i=Yt(i));const o=Yt(this);return j1(o).has.call(o,i)||(o.add(i),Ua(o,"add",i,i)),this},set(i,o){!e&&!Wi(o)&&!ca(o)&&(o=Yt(o));const r=Yt(this),{has:a,get:l}=j1(r);let c=a.call(r,i);c||(i=Yt(i),c=a.call(r,i));const u=l.call(r,i);return r.set(i,o),c?_i(o,u)&&Ua(r,"set",i,o):Ua(r,"add",i,o),this},delete(i){const o=Yt(this),{has:r,get:a}=j1(o);let l=r.call(o,i);l||(i=Yt(i),l=r.call(o,i)),a&&a.call(o,i);const c=o.delete(i);return l&&Ua(o,"delete",i,void 0),c},clear(){const i=Yt(this),o=i.size!==0,r=i.clear();return o&&Ua(i,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(i=>{n[i]=oW(i,t,e)}),n}function Ey(t,e){const n=rW(t,e);return(s,i,o)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?s:Reflect.get(Rt(n,i)&&i in s?n:s,i,o)}const aW={get:Ey(!1,!1)},lW={get:Ey(!1,!0)},cW={get:Ey(!0,!1)},uW={get:Ey(!0,!0)},qT=new WeakMap,XT=new WeakMap,KT=new WeakMap,ZT=new WeakMap;function dW(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function hW(t){return t.__v_skip||!Object.isExtensible(t)?0:dW(D0(t))}function as(t){return ca(t)?t:Ty(t,!1,tW,aW,qT)}function Ak(t){return Ty(t,!1,sW,lW,XT)}function dc(t){return Ty(t,!0,nW,cW,KT)}function fW(t){return Ty(t,!0,iW,uW,ZT)}function Ty(t,e,n,s,i){if(!Ct(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=hW(t);if(o===0)return t;const r=i.get(t);if(r)return r;const a=new Proxy(t,o===2?s:n);return i.set(t,a),a}function yr(t){return ca(t)?yr(t.__v_raw):!!(t&&t.__v_isReactive)}function ca(t){return!!(t&&t.__v_isReadonly)}function Wi(t){return!!(t&&t.__v_isShallow)}function Ng(t){return t?!!t.__v_raw:!1}function Yt(t){const e=t&&t.__v_raw;return e?Yt(e):t}function Ki(t){return!Rt(t,"__v_skip")&&Object.isExtensible(t)&&IT(t,"__v_skip",!0),t}const Er=t=>Ct(t)?as(t):t,Wh=t=>Ct(t)?dc(t):t;function hn(t){return t?t.__v_isRef===!0:!1}function J(t){return JT(t,!1)}function ss(t){return JT(t,!0)}function JT(t,e){return hn(t)?t:new pW(t,e)}class pW{constructor(e,n){this.dep=new Ay,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:Yt(e),this._value=n?e:Er(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,s=this.__v_isShallow||Wi(e)||ca(e);e=s?e:Yt(e),_i(e,n)&&(this._rawValue=e,this._value=s?e:Er(e),this.dep.trigger())}}function mW(t){t.dep&&t.dep.trigger()}function A(t){return hn(t)?t.value:t}function gW(t){return ot(t)?t():A(t)}const vW={get:(t,e,n)=>e==="__v_raw"?t:A(Reflect.get(t,e,n)),set:(t,e,n,s)=>{const i=t[e];return hn(i)&&!hn(n)?(i.value=n,!0):Reflect.set(t,e,n,s)}};function Mk(t){return yr(t)?t:new Proxy(t,vW)}class _W{constructor(e){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new Ay,{get:s,set:i}=e(n.track.bind(n),n.trigger.bind(n));this._get=s,this._set=i}get value(){return this._value=this._get()}set value(e){this._set(e)}}function QT(t){return new _W(t)}function yo(t){const e=Le(t)?new Array(t.length):{};for(const n in t)e[n]=eP(t,n);return e}class yW{constructor(e,n,s){this._object=e,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0,this._raw=Yt(e);let i=!0,o=e;if(!Le(e)||!yy(String(n)))do i=!Ng(o)||Wi(o);while(i&&(o=o.__v_raw));this._shallow=i}get value(){let e=this._object[this._key];return this._shallow&&(e=A(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&hn(this._raw[this._key])){const n=this._object[this._key];if(hn(n)){n.value=e;return}}this._object[this._key]=e}get dep(){return Kj(this._raw,this._key)}}class bW{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function kn(t,e,n){return hn(t)?t:ot(t)?new bW(t):Ct(t)&&arguments.length>1?eP(t,e,n):J(t)}function eP(t,e,n){return new yW(t,e,n)}class wW{constructor(e,n,s){this.fn=e,this.setter=n,this._value=void 0,this.dep=new Ay(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Um-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&Rn!==this)return FT(this,!0),!0}get value(){const e=this.dep.track();return zT(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function CW(t,e,n=!1){let s,i;return ot(t)?s=t:(s=t.get,i=t.set),new wW(s,i,n)}const kW={GET:"get",HAS:"has",ITERATE:"iterate"},xW={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Y1={},r_=new WeakMap;let Vl;function SW(){return Vl}function tP(t,e=!1,n=Vl){if(n){let s=r_.get(n);s||r_.set(n,s=[]),s.push(t)}}function $W(t,e,n=sn){const{immediate:s,deep:i,once:o,scheduler:r,augmentJob:a,call:l}=n,c=x=>i?x:Wi(x)||i===!1||i===0?ja(x,1):ja(x);let u,d,h,f,p=!1,m=!1;if(hn(t)?(d=()=>t.value,p=Wi(t)):yr(t)?(d=()=>c(t),p=!0):Le(t)?(m=!0,p=t.some(x=>yr(x)||Wi(x)),d=()=>t.map(x=>{if(hn(x))return x.value;if(yr(x))return c(x);if(ot(x))return l?l(x,2):x()})):ot(t)?e?d=l?()=>l(t,2):t:d=()=>{if(h){nl();try{h()}finally{sl()}}const x=Vl;Vl=u;try{return l?l(t,3,[f]):t(f)}finally{Vl=x}}:d=Vt,e&&i){const x=d,S=i===!0?1/0:i;d=()=>ja(x(),S)}const b=Sy(),y=()=>{u.stop(),b&&b.active&&wk(b.effects,u)};if(o&&e){const x=e;e=(...S)=>{x(...S),y()}}let C=m?new Array(t.length).fill(Y1):Y1;const k=x=>{if(!(!(u.flags&1)||!u.dirty&&!x))if(e){const S=u.run();if(i||p||(m?S.some((E,T)=>_i(E,C[T])):_i(S,C))){h&&h();const E=Vl;Vl=u;try{const T=[S,C===Y1?void 0:m&&C[0]===Y1?[]:C,f];C=S,l?l(e,3,T):e(...T)}finally{Vl=E}}}else u.run()};return a&&a(k),u=new Hm(d),u.scheduler=r?()=>r(k,!1):k,f=x=>tP(x,!1,u),h=u.onStop=()=>{const x=r_.get(u);if(x){if(l)l(x,4);else for(const S of x)S();r_.delete(u)}},e?s?k(!0):C=u.run():r?r(k.bind(null,!0),!0):u.run(),y.pause=u.pause.bind(u),y.resume=u.resume.bind(u),y.stop=y,y}function ja(t,e=1/0,n){if(e<=0||!Ct(t)||t.__v_skip||(n=n||new Map,(n.get(t)||0)>=e))return t;if(n.set(t,e),e--,hn(t))ja(t.value,e,n);else if(Le(t))for(let s=0;s<t.length;s++)ja(t[s],e,n);else if(id(t)||Sh(t))t.forEach(s=>{ja(s,e,n)});else if(jh(t)){for(const s in t)ja(t[s],e,n);for(const s of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,s)&&ja(t[s],e,n)}return t}/** | |
| 9 | +**/let Ci;class _6{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Ci,!e&&Ci&&(this.index=(Ci.scopes||(Ci.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].pause();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let e,n;if(this.scopes)for(e=0,n=this.scopes.length;e<n;e++)this.scopes[e].resume();for(e=0,n=this.effects.length;e<n;e++)this.effects[e].resume()}}run(e){if(this._active){const n=Ci;try{return Ci=this,e()}finally{Ci=n}}}on(){++this._on===1&&(this.prevScope=Ci,Ci=this)}off(){this._on>0&&--this._on===0&&(Ci=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let n,i;for(n=0,i=this.effects.length;n<i;n++)this.effects[n].stop();for(this.effects.length=0,n=0,i=this.cleanups.length;n<i;n++)this.cleanups[n]();if(this.cleanups.length=0,this.scopes){for(n=0,i=this.scopes.length;n<i;n++)this.scopes[n].stop(!0);this.scopes.length=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}}}function fb(t){return new _6(t)}function pb(){return Ci}function mb(t,e=!1){Ci&&Ci.cleanups.push(t)}let Gn;const ow=new WeakSet;class kg{constructor(e){this.fn=e,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,Ci&&Ci.active&&Ci.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,ow.has(this)&&(ow.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||VP(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,f9(this),FP(this);const e=Gn,n=Vr;Gn=this,Vr=!0;try{return this.fn()}finally{NP(this),Gn=e,Vr=n,this.flags&=-3}}stop(){if(this.flags&1){for(let e=this.deps;e;e=e.nextDep)w6(e);this.deps=this.depsTail=void 0,f9(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?ow.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){uk(this)&&this.run()}get dirty(){return uk(this)}}let RP=0,Bm,zm;function VP(t,e=!1){if(t.flags|=8,e){t.next=zm,zm=t;return}t.next=Bm,Bm=t}function y6(){RP++}function b6(){if(--RP>0)return;if(zm){let e=zm;for(zm=void 0;e;){const n=e.next;e.next=void 0,e.flags&=-9,e=n}}let t;for(;Bm;){let e=Bm;for(Bm=void 0;e;){const n=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(i){t||(t=i)}e=n}}if(t)throw t}function FP(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function NP(t){let e,n=t.depsTail,i=n;for(;i;){const s=i.prevDep;i.version===-1?(i===n&&(n=s),w6(i),oY(i)):e=i,i.dep.activeLink=i.prevActiveLink,i.prevActiveLink=void 0,i=s}t.deps=e,t.depsTail=n}function uk(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(BP(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function BP(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Cg)||(t.globalVersion=Cg,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!uk(t))))return;t.flags|=2;const e=t.dep,n=Gn,i=Vr;Gn=t,Vr=!0;try{FP(t);const s=t.fn(t._value);(e.version===0||Ni(s,t._value))&&(t.flags|=128,t._value=s,e.version++)}catch(s){throw e.version++,s}finally{Gn=n,Vr=i,NP(t),t.flags&=-3}}function w6(t,e=!1){const{dep:n,prevSub:i,nextSub:s}=t;if(i&&(i.nextSub=s,t.prevSub=void 0),s&&(s.prevSub=i,t.nextSub=void 0),n.subs===t&&(n.subs=i,!i&&n.computed)){n.computed.flags&=-5;for(let o=n.computed.deps;o;o=o.nextDep)w6(o,!0)}!e&&!--n.sc&&n.map&&n.map.delete(n.key)}function oY(t){const{prevDep:e,nextDep:n}=t;e&&(e.nextDep=n,t.prevDep=void 0),n&&(n.prevDep=e,t.nextDep=void 0)}function rY(t,e){t.effect instanceof kg&&(t=t.effect.fn);const n=new kg(t);e&&cn(n,e);try{n.run()}catch(s){throw n.stop(),s}const i=n.run.bind(n);return i.effect=n,i}function aY(t){t.effect.stop()}let Vr=!0;const zP=[];function gl(){zP.push(Vr),Vr=!1}function vl(){const t=zP.pop();Vr=t===void 0?!0:t}function f9(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const n=Gn;Gn=void 0;try{e()}finally{Gn=n}}}let Cg=0;class lY{constructor(e,n){this.sub=e,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class gb{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Gn||!Vr||Gn===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==Gn)n=this.activeLink=new lY(Gn,this),Gn.deps?(n.prevDep=Gn.depsTail,Gn.depsTail.nextDep=n,Gn.depsTail=n):Gn.deps=Gn.depsTail=n,HP(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const i=n.nextDep;i.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=i),n.prevDep=Gn.depsTail,n.nextDep=void 0,Gn.depsTail.nextDep=n,Gn.depsTail=n,Gn.deps===n&&(Gn.deps=i)}return n}trigger(e){this.version++,Cg++,this.notify(e)}notify(e){y6();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{b6()}}}function HP(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let i=e.deps;i;i=i.nextDep)HP(i)}const n=t.dep.subs;n!==t&&(t.prevSub=n,n&&(n.nextSub=t)),t.dep.subs=t}}const j_=new WeakMap,Gu=Symbol(""),dk=Symbol(""),xg=Symbol("");function $i(t,e,n){if(Vr&&Gn){let i=j_.get(t);i||j_.set(t,i=new Map);let s=i.get(n);s||(i.set(n,s=new gb),s.map=i,s.key=n),s.track()}}function tl(t,e,n,i,s,o){const r=j_.get(t);if(!r){Cg++;return}const a=l=>{l&&l.trigger()};if(y6(),e==="clear")r.forEach(a);else{const l=Me(t),c=l&&lb(n);if(l&&n==="length"){const u=Number(i);r.forEach((d,h)=>{(h==="length"||h===xg||!mo(h)&&h>=u)&&a(d)})}else switch((n!==void 0||r.has(void 0))&&a(r.get(n)),c&&a(r.get(xg)),e){case"add":l?c&&a(r.get("length")):(a(r.get(Gu)),Jh(t)&&a(r.get(dk)));break;case"delete":l||(a(r.get(Gu)),Jh(t)&&a(r.get(dk)));break;case"set":Jh(t)&&a(r.get(Gu));break}}b6()}function cY(t,e){const n=j_.get(t);return n&&n.get(e)}function sh(t){const e=an(t);return e===t?e:($i(e,"iterate",xg),uo(t)?e:e.map(Gr))}function vb(t){return $i(t=an(t),"iterate",xg),t}function rc(t,e){return Aa(t)?Cf(Fr(t)?Gr(e):e):Gr(e)}const uY={__proto__:null,[Symbol.iterator](){return rw(this,Symbol.iterator,t=>rc(this,t))},concat(...t){return sh(this).concat(...t.map(e=>Me(e)?sh(e):e))},entries(){return rw(this,"entries",t=>(t[1]=rc(this,t[1]),t))},every(t,e){return Ua(this,"every",t,e,void 0,arguments)},filter(t,e){return Ua(this,"filter",t,e,n=>n.map(i=>rc(this,i)),arguments)},find(t,e){return Ua(this,"find",t,e,n=>rc(this,n),arguments)},findIndex(t,e){return Ua(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Ua(this,"findLast",t,e,n=>rc(this,n),arguments)},findLastIndex(t,e){return Ua(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Ua(this,"forEach",t,e,void 0,arguments)},includes(...t){return aw(this,"includes",t)},indexOf(...t){return aw(this,"indexOf",t)},join(t){return sh(this).join(t)},lastIndexOf(...t){return aw(this,"lastIndexOf",t)},map(t,e){return Ua(this,"map",t,e,void 0,arguments)},pop(){return zp(this,"pop")},push(...t){return zp(this,"push",t)},reduce(t,...e){return p9(this,"reduce",t,e)},reduceRight(t,...e){return p9(this,"reduceRight",t,e)},shift(){return zp(this,"shift")},some(t,e){return Ua(this,"some",t,e,void 0,arguments)},splice(...t){return zp(this,"splice",t)},toReversed(){return sh(this).toReversed()},toSorted(t){return sh(this).toSorted(t)},toSpliced(...t){return sh(this).toSpliced(...t)},unshift(...t){return zp(this,"unshift",t)},values(){return rw(this,"values",t=>rc(this,t))}};function rw(t,e,n){const i=vb(t),s=i[e]();return i!==t&&!uo(t)&&(s._next=s.next,s.next=()=>{const o=s._next();return o.done||(o.value=n(o.value)),o}),s}const dY=Array.prototype;function Ua(t,e,n,i,s,o){const r=vb(t),a=r!==t&&!uo(t),l=r[e];if(l!==dY[e]){const d=l.apply(t,o);return a?Gr(d):d}let c=n;r!==t&&(a?c=function(d,h){return n.call(this,rc(t,d),h,t)}:n.length>2&&(c=function(d,h){return n.call(this,d,h,t)}));const u=l.call(r,c,i);return a&&s?s(u):u}function p9(t,e,n,i){const s=vb(t);let o=n;return s!==t&&(uo(t)?n.length>3&&(o=function(r,a,l){return n.call(this,r,a,l,t)}):o=function(r,a,l){return n.call(this,r,rc(t,a),l,t)}),s[e](o,...i)}function aw(t,e,n){const i=an(t);$i(i,"iterate",xg);const s=i[e](...n);return(s===-1||s===!1)&&C1(n[0])?(n[0]=an(n[0]),i[e](...n)):s}function zp(t,e,n=[]){gl(),y6();const i=an(t)[e].apply(t,n);return b6(),vl(),i}const hY=zo("__proto__,__v_isRef,__isVue"),UP=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(mo));function fY(t){mo(t)||(t=String(t));const e=an(this);return $i(e,"has",t),e.hasOwnProperty(t)}class jP{constructor(e=!1,n=!1){this._isReadonly=e,this._isShallow=n}get(e,n,i){if(n==="__v_skip")return e.__v_skip;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?KP:XP:o?GP:qP).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(i)?e:void 0;const r=Me(e);if(!s){let l;if(r&&(l=uY[n]))return l;if(n==="hasOwnProperty")return fY}const a=Reflect.get(e,n,hn(e)?e:i);if((mo(n)?UP.has(n):hY(n))||(s||$i(e,"get",n),o))return a;if(hn(a)){const l=r&&lb(n)?a:a.value;return s&&yt(l)?Rc(l):l}return yt(a)?s?Rc(a):In(a):a}}class WP extends jP{constructor(e=!1){super(!1,e)}set(e,n,i,s){let o=e[n];const r=Me(e)&&lb(n);if(!this._isShallow){const c=Aa(o);if(!uo(i)&&!Aa(i)&&(o=an(o),i=an(i)),!r&&hn(o)&&!hn(i))return c||(o.value=i),!0}const a=r?Number(n)<e.length:zt(e,n),l=Reflect.set(e,n,i,hn(e)?e:s);return e===an(s)&&(a?Ni(i,o)&&tl(e,"set",n,i):tl(e,"add",n,i)),l}deleteProperty(e,n){const i=zt(e,n);e[n];const s=Reflect.deleteProperty(e,n);return s&&i&&tl(e,"delete",n,void 0),s}has(e,n){const i=Reflect.has(e,n);return(!mo(n)||!UP.has(n))&&$i(e,"has",n),i}ownKeys(e){return $i(e,"iterate",Me(e)?"length":Gu),Reflect.ownKeys(e)}}class YP extends jP{constructor(e=!1){super(!0,e)}set(e,n){return!0}deleteProperty(e,n){return!0}}const pY=new WP,mY=new YP,gY=new WP(!0),vY=new YP(!0),hk=t=>t,Tv=t=>Reflect.getPrototypeOf(t);function _Y(t,e,n){return function(...i){const s=this.__v_raw,o=an(s),r=Jh(o),a=t==="entries"||t===Symbol.iterator&&r,l=t==="keys"&&r,c=s[t](...i),u=n?hk:e?Cf:Gr;return!e&&$i(o,"iterate",l?dk:Gu),cn(Object.create(c),{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}}})}}function Pv(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function yY(t,e){const n={get(s){const o=this.__v_raw,r=an(o),a=an(s);t||(Ni(s,a)&&$i(r,"get",s),$i(r,"get",a));const{has:l}=Tv(r),c=e?hk:t?Cf:Gr;if(l.call(r,s))return c(o.get(s));if(l.call(r,a))return c(o.get(a));o!==r&&o.get(s)},get size(){const s=this.__v_raw;return!t&&$i(an(s),"iterate",Gu),s.size},has(s){const o=this.__v_raw,r=an(o),a=an(s);return t||(Ni(s,a)&&$i(r,"has",s),$i(r,"has",a)),s===a?o.has(s):o.has(s)||o.has(a)},forEach(s,o){const r=this,a=r.__v_raw,l=an(a),c=e?hk:t?Cf:Gr;return!t&&$i(l,"iterate",Gu),a.forEach((u,d)=>s.call(o,c(u),c(d),r))}};return cn(n,t?{add:Pv("add"),set:Pv("set"),delete:Pv("delete"),clear:Pv("clear")}:{add(s){!e&&!uo(s)&&!Aa(s)&&(s=an(s));const o=an(this);return Tv(o).has.call(o,s)||(o.add(s),tl(o,"add",s,s)),this},set(s,o){!e&&!uo(o)&&!Aa(o)&&(o=an(o));const r=an(this),{has:a,get:l}=Tv(r);let c=a.call(r,s);c||(s=an(s),c=a.call(r,s));const u=l.call(r,s);return r.set(s,o),c?Ni(o,u)&&tl(r,"set",s,o):tl(r,"add",s,o),this},delete(s){const o=an(this),{has:r,get:a}=Tv(o);let l=r.call(o,s);l||(s=an(s),l=r.call(o,s)),a&&a.call(o,s);const c=o.delete(s);return l&&tl(o,"delete",s,void 0),c},clear(){const s=an(this),o=s.size!==0,r=s.clear();return o&&tl(s,"clear",void 0,void 0),r}}),["keys","values","entries",Symbol.iterator].forEach(s=>{n[s]=_Y(s,t,e)}),n}function _b(t,e){const n=yY(t,e);return(i,s,o)=>s==="__v_isReactive"?!t:s==="__v_isReadonly"?t:s==="__v_raw"?i:Reflect.get(zt(n,s)&&s in i?n:i,s,o)}const bY={get:_b(!1,!1)},wY={get:_b(!1,!0)},kY={get:_b(!0,!1)},CY={get:_b(!0,!0)},qP=new WeakMap,GP=new WeakMap,XP=new WeakMap,KP=new WeakMap;function xY(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function SY(t){return t.__v_skip||!Object.isExtensible(t)?0:xY(VW(t))}function In(t){return Aa(t)?t:yb(t,!1,pY,bY,qP)}function k6(t){return yb(t,!1,gY,wY,GP)}function Rc(t){return yb(t,!0,mY,kY,XP)}function $Y(t){return yb(t,!0,vY,CY,KP)}function yb(t,e,n,i,s){if(!yt(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const o=SY(t);if(o===0)return t;const r=s.get(t);if(r)return r;const a=new Proxy(t,o===2?i:n);return s.set(t,a),a}function Fr(t){return Aa(t)?Fr(t.__v_raw):!!(t&&t.__v_isReactive)}function Aa(t){return!!(t&&t.__v_isReadonly)}function uo(t){return!!(t&&t.__v_isShallow)}function C1(t){return t?!!t.__v_raw:!1}function an(t){const e=t&&t.__v_raw;return e?an(e):t}function Pi(t){return!zt(t,"__v_skip")&&Object.isExtensible(t)&&PP(t,"__v_skip",!0),t}const Gr=t=>yt(t)?In(t):t,Cf=t=>yt(t)?Rc(t):t;function hn(t){return t?t.__v_isRef===!0:!1}function J(t){return ZP(t,!1)}function Fn(t){return ZP(t,!0)}function ZP(t,e){return hn(t)?t:new AY(t,e)}class AY{constructor(e,n){this.dep=new gb,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?e:an(e),this._value=n?e:Gr(e),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(e){const n=this._rawValue,i=this.__v_isShallow||uo(e)||Aa(e);e=i?e:an(e),Ni(e,n)&&(this._rawValue=e,this._value=i?e:Gr(e),this.dep.trigger())}}function Hm(t){t.dep&&t.dep.trigger()}function E(t){return hn(t)?t.value:t}function fk(t){return et(t)?t():E(t)}const EY={get:(t,e,n)=>e==="__v_raw"?t:E(Reflect.get(t,e,n)),set:(t,e,n,i)=>{const s=t[e];return hn(s)&&!hn(n)?(s.value=n,!0):Reflect.set(t,e,n,i)}};function C6(t){return Fr(t)?t:new Proxy(t,EY)}class MY{constructor(e){this.__v_isRef=!0,this._value=void 0;const n=this.dep=new gb,{get:i,set:s}=e(n.track.bind(n),n.trigger.bind(n));this._get=i,this._set=s}get value(){return this._value=this._get()}set value(e){this._set(e)}}function JP(t){return new MY(t)}function go(t){const e=Me(t)?new Array(t.length):{};for(const n in t)e[n]=QP(t,n);return e}class TY{constructor(e,n,i){this._object=e,this._key=n,this._defaultValue=i,this.__v_isRef=!0,this._value=void 0,this._raw=an(e);let s=!0,o=e;if(!Me(e)||!lb(String(n)))do s=!C1(o)||uo(o);while(s&&(o=o.__v_raw));this._shallow=s}get value(){let e=this._object[this._key];return this._shallow&&(e=E(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&hn(this._raw[this._key])){const n=this._object[this._key];if(hn(n)){n.value=e;return}}this._object[this._key]=e}get dep(){return cY(this._raw,this._key)}}class PY{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Sn(t,e,n){return hn(t)?t:et(t)?new PY(t):yt(t)&&arguments.length>1?QP(t,e,n):J(t)}function QP(t,e,n){return new TY(t,e,n)}class IY{constructor(e,n,i){this.fn=e,this.setter=n,this._value=void 0,this.dep=new gb(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Cg-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=i}notify(){if(this.flags|=16,!(this.flags&8)&&Gn!==this)return VP(this,!0),!0}get value(){const e=this.dep.track();return BP(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function LY(t,e,n=!1){let i,s;return et(t)?i=t:(i=t.get,s=t.set),new IY(i,s,n)}const OY={GET:"get",HAS:"has",ITERATE:"iterate"},DY={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},Iv={},W_=new WeakMap;let ac;function RY(){return ac}function eI(t,e=!1,n=ac){if(n){let i=W_.get(n);i||W_.set(n,i=[]),i.push(t)}}function VY(t,e,n=pn){const{immediate:i,deep:s,once:o,scheduler:r,augmentJob:a,call:l}=n,c=$=>s?$:uo($)||s===!1||s===0?nl($,1):nl($);let u,d,h,f,p=!1,m=!1;if(hn(t)?(d=()=>t.value,p=uo(t)):Fr(t)?(d=()=>c(t),p=!0):Me(t)?(m=!0,p=t.some($=>Fr($)||uo($)),d=()=>t.map($=>{if(hn($))return $.value;if(Fr($))return c($);if(et($))return l?l($,2):$()})):et(t)?e?d=l?()=>l(t,2):t:d=()=>{if(h){gl();try{h()}finally{vl()}}const $=ac;ac=u;try{return l?l(t,3,[f]):t(f)}finally{ac=$}}:d=Dt,e&&s){const $=d,S=s===!0?1/0:s;d=()=>nl($(),S)}const y=pb(),b=()=>{u.stop(),y&&y.active&&v6(y.effects,u)};if(o&&e){const $=e;e=(...S)=>{$(...S),b()}}let k=m?new Array(t.length).fill(Iv):Iv;const C=$=>{if(!(!(u.flags&1)||!u.dirty&&!$))if(e){const S=u.run();if(s||p||(m?S.some((M,P)=>Ni(M,k[P])):Ni(S,k))){h&&h();const M=ac;ac=u;try{const P=[S,k===Iv?void 0:m&&k[0]===Iv?[]:k,f];k=S,l?l(e,3,P):e(...P)}finally{ac=M}}}else u.run()};return a&&a(C),u=new kg(d),u.scheduler=r?()=>r(C,!1):C,f=$=>eI($,!1,u),h=u.onStop=()=>{const $=W_.get(u);if($){if(l)l($,4);else for(const S of $)S();W_.delete(u)}},e?i?C(!0):k=u.run():r?r(C.bind(null,!0),!0):u.run(),b.pause=u.pause.bind(u),b.resume=u.resume.bind(u),b.stop=b,b}function nl(t,e=1/0,n){if(e<=0||!yt(t)||t.__v_skip||(n=n||new Map,(n.get(t)||0)>=e))return t;if(n.set(t,e),e--,hn(t))nl(t.value,e,n);else if(Me(t))for(let i=0;i<t.length;i++)nl(t[i],e,n);else if(Id(t)||Jh(t))t.forEach(i=>{nl(i,e,n)});else if(hd(t)){for(const i in t)nl(t[i],e,n);for(const i of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,i)&&nl(t[i],e,n)}return t}/** | |
| 10 | 10 | * @vue/runtime-core v3.5.27 |
| 11 | 11 | * (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 12 | 12 | * @license MIT |
| 13 | -**/const nP=[];function AW(t){nP.push(t)}function MW(){nP.pop()}function EW(t,e){}const TW={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",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",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},PW={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",15:"component update",16:"app unmount cleanup function"};function Pf(t,e,n,s){try{return s?t(...s):t()}catch(i){od(i,e,n)}}function Zo(t,e,n,s){if(ot(t)){const i=Pf(t,e,n,s);return i&&zm(i)&&i.catch(o=>{od(o,e,n)}),i}if(Le(t)){const i=[];for(let o=0;o<t.length;o++)i.push(Zo(t[o],e,n,s));return i}}function od(t,e,n,s=!0){const i=e?e.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:r}=e&&e.appContext.config||sn;if(e){let a=e.parent;const l=e.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const u=a.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](t,l,c)===!1)return}a=a.parent}if(o){nl(),Pf(o,null,10,[t,l,c]),sl();return}}IW(t,n,i,s,r)}function IW(t,e,n,s=!0,i=!1){if(i)throw t;console.error(t)}const yi=[];let ea=-1;const Ah=[];let Fl=null,Kd=0;const sP=Promise.resolve();let a_=null;function dt(t){const e=a_||sP;return t?e.then(this?t.bind(this):t):e}function LW(t){let e=ea+1,n=yi.length;for(;e<n;){const s=e+n>>>1,i=yi[s],o=Ym(i);o<t||o===t&&i.flags&2?e=s+1:n=s}return e}function Ek(t){if(!(t.flags&1)){const e=Ym(t),n=yi[yi.length-1];!n||!(t.flags&2)&&e>=Ym(n)?yi.push(t):yi.splice(LW(e),0,t),t.flags|=1,iP()}}function iP(){a_||(a_=sP.then(oP))}function Wm(t){Le(t)?Ah.push(...t):Fl&&t.id===-1?Fl.splice(Kd+1,0,t):t.flags&1||(Ah.push(t),t.flags|=1),iP()}function lS(t,e,n=ea+1){for(;n<yi.length;n++){const s=yi[n];if(s&&s.flags&2){if(t&&s.id!==t.uid)continue;yi.splice(n,1),n--,s.flags&4&&(s.flags&=-2),s(),s.flags&4||(s.flags&=-2)}}}function l_(t){if(Ah.length){const e=[...new Set(Ah)].sort((n,s)=>Ym(n)-Ym(s));if(Ah.length=0,Fl){Fl.push(...e);return}for(Fl=e,Kd=0;Kd<Fl.length;Kd++){const n=Fl[Kd];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}Fl=null,Kd=0}}const Ym=t=>t.id==null?t.flags&2?-1:1/0:t.id;function oP(t){const e=Vt;try{for(ea=0;ea<yi.length;ea++){const n=yi[ea];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),Pf(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;ea<yi.length;ea++){const n=yi[ea];n&&(n.flags&=-2)}ea=-1,yi.length=0,l_(),a_=null,(yi.length||Ah.length)&&oP()}}let Zd,G1=[];function rP(t,e){var n,s;Zd=t,Zd?(Zd.enabled=!0,G1.forEach(({event:i,args:o})=>Zd.emit(i,...o)),G1=[]):typeof window<"u"&&window.HTMLElement&&!((s=(n=window.navigator)==null?void 0:n.userAgent)!=null&&s.includes("jsdom"))?((e.__VUE_DEVTOOLS_HOOK_REPLAY__=e.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{rP(o,e)}),setTimeout(()=>{Zd||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,G1=[])},3e3)):G1=[]}let Us=null,Py=null;function Gm(t){const e=Us;return Us=t,Py=t&&t.type.__scopeId||null,e}function OW(t){Py=t}function DW(){Py=null}const RW=t=>w;function w(t,e=Us,n){if(!e||t._n)return t;const s=(...i)=>{s._d&&Km(-1);const o=Gm(e);let r;try{r=t(...i)}finally{Gm(o),s._d&&Km(1)}return r};return s._n=!0,s._c=!0,s._d=!0,s}function Pe(t,e){if(Us===null)return t;const n=Hg(Us),s=t.dirs||(t.dirs=[]);for(let i=0;i<e.length;i++){let[o,r,a,l=sn]=e[i];o&&(ot(o)&&(o={mounted:o,updated:o}),o.deep&&ja(r),s.push({dir:o,instance:n,value:r,oldValue:void 0,arg:a,modifiers:l}))}return t}function sa(t,e,n,s){const i=t.dirs,o=e&&e.dirs;for(let r=0;r<i.length;r++){const a=i[r];o&&(a.oldValue=o[r].value);let l=a.dir[s];l&&(nl(),Zo(l,n,8,[t.el,a,t,e]),sl())}}function It(t,e){if(Hs){let n=Hs.provides;const s=Hs.parent&&Hs.parent.provides;s===n&&(n=Hs.provides=Object.create(s)),n[t]=e}}function qe(t,e,n=!1){const s=pt();if(s||ku){let i=ku?ku._context.provides:s?s.parent==null||s.ce?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides:void 0;if(i&&t in i)return i[t];if(arguments.length>1)return n&&ot(e)?e.call(s&&s.proxy):e}}function aP(){return!!(pt()||ku)}const lP=Symbol.for("v-scx"),cP=()=>qe(lP);function br(t,e){return Bg(t,null,e)}function VW(t,e){return Bg(t,null,{flush:"post"})}function uP(t,e){return Bg(t,null,{flush:"sync"})}function Te(t,e,n){return Bg(t,e,n)}function Bg(t,e,n=sn){const{immediate:s,deep:i,flush:o,once:r}=n,a=Zt({},n),l=e&&s||!e&&o!=="post";let c;if(Gh){if(o==="sync"){const f=cP();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=Vt,f.resume=Vt,f.pause=Vt,f}}const u=Hs;a.call=(f,p,m)=>Zo(f,u,p,m);let d=!1;o==="post"?a.scheduler=f=>{hs(f,u&&u.suspense)}:o!=="sync"&&(d=!0,a.scheduler=(f,p)=>{p?f():Ek(f)}),a.augmentJob=f=>{e&&(f.flags|=4),d&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const h=$W(t,e,a);return Gh&&(c?c.push(h):l&&h()),h}function FW(t,e,n){const s=this.proxy,i=nt(t)?t.includes(".")?dP(s,t):()=>s[t]:t.bind(s,s);let o;ot(e)?o=e:(o=e.handler,n=e);const r=Bu(this),a=Bg(i,o.bind(s),n);return r(),a}function dP(t,e){const n=e.split(".");return()=>{let s=t;for(let i=0;i<n.length&&s;i++)s=s[n[i]];return s}}const hP=Symbol("_vte"),fP=t=>t.__isTeleport,am=t=>t&&(t.disabled||t.disabled===""),cS=t=>t&&(t.defer||t.defer===""),uS=t=>typeof SVGElement<"u"&&t instanceof SVGElement,dS=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,v3=(t,e)=>{const n=t&&t.to;return nt(n)?e?e(n):null:n},pP={name:"Teleport",__isTeleport:!0,process(t,e,n,s,i,o,r,a,l,c){const{mc:u,pc:d,pbc:h,o:{insert:f,querySelector:p,createText:m,createComment:b}}=c,y=am(e.props);let{shapeFlag:C,children:k,dynamicChildren:x}=e;if(t==null){const S=e.el=m(""),E=e.anchor=m("");f(S,n,s),f(E,n,s);const T=(I,L)=>{C&16&&u(k,I,L,i,o,r,a,l)},P=()=>{const I=e.target=v3(e.props,p),L=mP(I,e,m,f);I&&(r!=="svg"&&uS(I)?r="svg":r!=="mathml"&&dS(I)&&(r="mathml"),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(I),y||(T(I,L),R0(e,!1)))};y&&(T(n,E),R0(e,!0)),cS(e.props)?(e.el.__isMounted=!1,hs(()=>{P(),delete e.el.__isMounted},o)):P()}else{if(cS(e.props)&&t.el.__isMounted===!1){hs(()=>{pP.process(t,e,n,s,i,o,r,a,l,c)},o);return}e.el=t.el,e.targetStart=t.targetStart;const S=e.anchor=t.anchor,E=e.target=t.target,T=e.targetAnchor=t.targetAnchor,P=am(t.props),I=P?n:E,L=P?S:T;if(r==="svg"||uS(E)?r="svg":(r==="mathml"||dS(E))&&(r="mathml"),x?(h(t.dynamicChildren,x,I,i,o,r,a),Hk(t,e,!0)):l||d(t,e,I,L,i,o,r,a,!1),y)P?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):q1(e,n,S,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const V=e.target=v3(e.props,p);V&&q1(e,V,null,c,0)}else P&&q1(e,E,T,c,1);R0(e,y)}},remove(t,e,n,{um:s,o:{remove:i}},o){const{shapeFlag:r,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:h}=t;if(d&&(i(c),i(u)),o&&i(l),r&16){const f=o||!am(h);for(let p=0;p<a.length;p++){const m=a[p];s(m,e,n,f,!!m.dynamicChildren)}}},move:q1,hydrate:NW};function q1(t,e,n,{o:{insert:s},m:i},o=2){o===0&&s(t.targetAnchor,e,n);const{el:r,anchor:a,shapeFlag:l,children:c,props:u}=t,d=o===2;if(d&&s(r,e,n),(!d||am(u))&&l&16)for(let h=0;h<c.length;h++)i(c[h],e,n,2);d&&s(a,e,n)}function NW(t,e,n,s,i,o,{o:{nextSibling:r,parentNode:a,querySelector:l,insert:c,createText:u}},d){function h(m,b,y,C){b.anchor=d(r(m),b,a(m),n,s,i,o),b.targetStart=y,b.targetAnchor=C}const f=e.target=v3(e.props,l),p=am(e.props);if(f){const m=f._lpa||f.firstChild;if(e.shapeFlag&16)if(p)h(t,e,m,m&&r(m));else{e.anchor=r(t);let b=m;for(;b;){if(b&&b.nodeType===8){if(b.data==="teleport start anchor")e.targetStart=b;else if(b.data==="teleport anchor"){e.targetAnchor=b,f._lpa=e.targetAnchor&&r(e.targetAnchor);break}}b=r(b)}e.targetAnchor||mP(f,e,u,c),d(m&&r(m),e,f,n,s,i,o)}R0(e,p)}else p&&e.shapeFlag&16&&h(t,e,t,r(t));return e.anchor&&r(e.anchor)}const va=pP;function R0(t,e){const n=t.ctx;if(n&&n.ut){let s,i;for(e?(s=t.el,i=t.anchor):(s=t.targetStart,i=t.targetAnchor);s&&s!==i;)s.nodeType===1&&s.setAttribute("data-v-owner",n.uid),s=s.nextSibling;n.ut()}}function mP(t,e,n,s){const i=e.targetStart=n(""),o=e.targetAnchor=n("");return i[hP]=o,t&&(s(i,t),s(o,t)),o}const Ba=Symbol("_leaveCb"),X1=Symbol("_enterCb");function Tk(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Pt(()=>{t.isMounted=!0}),Gn(()=>{t.isUnmounting=!0}),t}const Mo=[Function,Array],Pk={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Mo,onEnter:Mo,onAfterEnter:Mo,onEnterCancelled:Mo,onBeforeLeave:Mo,onLeave:Mo,onAfterLeave:Mo,onLeaveCancelled:Mo,onBeforeAppear:Mo,onAppear:Mo,onAfterAppear:Mo,onAppearCancelled:Mo},gP=t=>{const e=t.subTree;return e.component?gP(e.component):e},BW={name:"BaseTransition",props:Pk,setup(t,{slots:e}){const n=pt(),s=Tk();return()=>{const i=e.default&&Iy(e.default(),!0);if(!i||!i.length)return;const o=vP(i),r=Yt(t),{mode:a}=r;if(s.isLeaving)return v2(o);const l=hS(o);if(!l)return v2(o);let c=Yh(l,r,s,n,d=>c=d);l.type!==Qn&&il(l,c);let u=n.subTree&&hS(n.subTree);if(u&&u.type!==Qn&&!hr(u,l)&&gP(n).type!==Qn){let d=Yh(u,r,s,n);if(il(u,d),a==="out-in"&&l.type!==Qn)return s.isLeaving=!0,d.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},v2(o);a==="in-out"&&l.type!==Qn?d.delayLeave=(h,f,p)=>{const m=yP(s,u);m[String(u.key)]=u,h[Ba]=()=>{f(),h[Ba]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{p(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function vP(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==Qn){e=n;break}}return e}const _P=BW;function yP(t,e){const{leavingVNodes:n}=t;let s=n.get(e.type);return s||(s=Object.create(null),n.set(e.type,s)),s}function Yh(t,e,n,s,i){const{appear:o,mode:r,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:f,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:b,onAppear:y,onAfterAppear:C,onAppearCancelled:k}=e,x=String(t.key),S=yP(n,t),E=(I,L)=>{I&&Zo(I,s,9,L)},T=(I,L)=>{const V=L[1];E(I,L),Le(I)?I.every(D=>D.length<=1)&&V():I.length<=1&&V()},P={mode:r,persisted:a,beforeEnter(I){let L=l;if(!n.isMounted)if(o)L=b||l;else return;I[Ba]&&I[Ba](!0);const V=S[x];V&&hr(t,V)&&V.el[Ba]&&V.el[Ba](),E(L,[I])},enter(I){let L=c,V=u,D=d;if(!n.isMounted)if(o)L=y||c,V=C||u,D=k||d;else return;let z=!1;const Y=I[X1]=B=>{z||(z=!0,B?E(D,[I]):E(V,[I]),P.delayedLeave&&P.delayedLeave(),I[X1]=void 0)};L?T(L,[I,Y]):Y()},leave(I,L){const V=String(t.key);if(I[X1]&&I[X1](!0),n.isUnmounting)return L();E(h,[I]);let D=!1;const z=I[Ba]=Y=>{D||(D=!0,L(),Y?E(m,[I]):E(p,[I]),I[Ba]=void 0,S[V]===t&&delete S[V])};S[V]=t,f?T(f,[I,z]):z()},clone(I){const L=Yh(I,e,n,s,i);return i&&i(L),L}};return P}function v2(t){if(zg(t))return t=Tr(t),t.children=null,t}function hS(t){if(!zg(t))return fP(t.type)&&t.children?vP(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&ot(n.default))return n.default()}}function il(t,e){t.shapeFlag&6&&t.component?(t.transition=e,il(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 Iy(t,e=!1,n){let s=[],i=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===te?(r.patchFlag&128&&i++,s=s.concat(Iy(r.children,e,a))):(e||r.type!==Qn)&&s.push(a!=null?Tr(r,{key:a}):r)}if(i>1)for(let o=0;o<s.length;o++)s[o].patchFlag=-2;return s}function se(t,e){return ot(t)?(()=>Zt({name:t.name},e,{setup:t}))():t}function zW(){const t=pt();return t?(t.appContext.config.idPrefix||"v")+"-"+t.ids[0]+t.ids[1]++:""}function Ik(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function HW(t){const e=pt(),n=ss(null);if(e){const i=e.refs===sn?e.refs={}:e.refs;Object.defineProperty(i,t,{enumerable:!0,get:()=>n.value,set:o=>n.value=o})}return n}const c_=new WeakMap;function Mh(t,e,n,s,i=!1){if(Le(t)){t.forEach((p,m)=>Mh(p,e&&(Le(e)?e[m]:e),n,s,i));return}if(Qa(s)&&!i){s.shapeFlag&512&&s.type.__asyncResolved&&s.component.subTree.component&&Mh(t,e,n,s.component.subTree);return}const o=s.shapeFlag&4?Hg(s.component):s.el,r=i?null:o,{i:a,r:l}=t,c=e&&e.r,u=a.refs===sn?a.refs={}:a.refs,d=a.setupState,h=Yt(d),f=d===sn?bh:p=>Rt(h,p);if(c!=null&&c!==l){if(fS(e),nt(c))u[c]=null,f(c)&&(d[c]=null);else if(hn(c)){c.value=null;const p=e;p.k&&(u[p.k]=null)}}if(ot(l))Pf(l,a,12,[r,u]);else{const p=nt(l),m=hn(l);if(p||m){const b=()=>{if(t.f){const y=p?f(l)?d[l]:u[l]:l.value;if(i)Le(y)&&wk(y,o);else if(Le(y))y.includes(o)||y.push(o);else if(p)u[l]=[o],f(l)&&(d[l]=u[l]);else{const C=[o];l.value=C,t.k&&(u[t.k]=C)}}else p?(u[l]=r,f(l)&&(d[l]=r)):m&&(l.value=r,t.k&&(u[t.k]=r))};if(r){const y=()=>{b(),c_.delete(t)};y.id=-1,c_.set(t,y),hs(y,n)}else fS(t),b()}}}function fS(t){const e=c_.get(t);e&&(e.flags|=8,c_.delete(t))}let pS=!1;const Id=()=>{pS||(console.error("Hydration completed but contains mismatches."),pS=!0)},UW=t=>t.namespaceURI.includes("svg")&&t.tagName!=="foreignObject",jW=t=>t.namespaceURI.includes("MathML"),K1=t=>{if(t.nodeType===1){if(UW(t))return"svg";if(jW(t))return"mathml"}},wh=t=>t.nodeType===8;function WW(t){const{mt:e,p:n,o:{patchProp:s,createText:i,nextSibling:o,parentNode:r,remove:a,insert:l,createComment:c}}=t,u=(k,x)=>{if(!x.hasChildNodes()){n(null,k,x),l_(),x._vnode=k;return}d(x.firstChild,k,null,null,null),l_(),x._vnode=k},d=(k,x,S,E,T,P=!1)=>{P=P||!!x.dynamicChildren;const I=wh(k)&&k.data==="[",L=()=>m(k,x,S,E,T,I),{type:V,ref:D,shapeFlag:z,patchFlag:Y}=x;let B=k.nodeType;x.el=k,Y===-2&&(P=!1,x.dynamicChildren=null);let U=null;switch(V){case ra:B!==3?x.children===""?(l(x.el=i(""),r(k),k),U=k):U=L():(k.data!==x.children&&(Id(),k.data=x.children),U=o(k));break;case Qn:C(k)?(U=o(k),y(x.el=k.content.firstChild,k,S)):B!==8||I?U=L():U=o(k);break;case xu:if(I&&(k=o(k),B=k.nodeType),B===1||B===3){U=k;const X=!x.children.length;for(let K=0;K<x.staticCount;K++)X&&(x.children+=U.nodeType===1?U.outerHTML:U.data),K===x.staticCount-1&&(x.anchor=U),U=o(U);return I?o(U):U}else L();break;case te:I?U=p(k,x,S,E,T,P):U=L();break;default:if(z&1)(B!==1||x.type.toLowerCase()!==k.tagName.toLowerCase())&&!C(k)?U=L():U=h(k,x,S,E,T,P);else if(z&6){x.slotScopeIds=T;const X=r(k);if(I?U=b(k):wh(k)&&k.data==="teleport start"?U=b(k,k.data,"teleport end"):U=o(k),e(x,X,null,S,E,K1(X),P),Qa(x)&&!x.type.__asyncResolved){let K;I?(K=_(te),K.anchor=U?U.previousSibling:X.lastChild):K=k.nodeType===3?G(""):_("div"),K.el=k,x.component.subTree=K}}else z&64?B!==8?U=L():U=x.type.hydrate(k,x,S,E,T,P,t,f):z&128&&(U=x.type.hydrate(k,x,S,E,K1(r(k)),T,P,t,d))}return D!=null&&Mh(D,null,E,x),U},h=(k,x,S,E,T,P)=>{P=P||!!x.dynamicChildren;const{type:I,props:L,patchFlag:V,shapeFlag:D,dirs:z,transition:Y}=x,B=I==="input"||I==="option";if(B||V!==-1){z&&sa(x,null,S,"created");let U=!1;if(C(k)){U=UP(null,Y)&&S&&S.vnode.props&&S.vnode.props.appear;const K=k.content.firstChild;if(U){const N=K.getAttribute("class");N&&(K.$cls=N),Y.beforeEnter(K)}y(K,k,S),x.el=k=K}if(D&16&&!(L&&(L.innerHTML||L.textContent))){let K=f(k.firstChild,x,k,S,E,T,P);for(;K;){Z1(k,1)||Id();const N=K;K=K.nextSibling,a(N)}}else if(D&8){let K=x.children;K[0]===` | |
| 14 | -`&&(k.tagName==="PRE"||k.tagName==="TEXTAREA")&&(K=K.slice(1));const{textContent:N}=k;N!==K&&N!==K.replace(/\r\n|\r/g,` | |
| 15 | -`)&&(Z1(k,0)||Id(),k.textContent=x.children)}if(L){if(B||!P||V&48){const K=k.tagName.includes("-");for(const N in L)(B&&(N.endsWith("value")||N==="indeterminate")||sd(N)&&!Ja(N)||N[0]==="."||K&&!Ja(N))&&s(k,N,null,L[N],void 0,S)}else if(L.onClick)s(k,"onClick",null,L.onClick,void 0,S);else if(V&4&&yr(L.style))for(const K in L.style)L.style[K]}let X;(X=L&&L.onVnodeBeforeMount)&&Ni(X,S,x),z&&sa(x,null,S,"beforeMount"),((X=L&&L.onVnodeMounted)||z||U)&&GP(()=>{X&&Ni(X,S,x),U&&Y.enter(k),z&&sa(x,null,S,"mounted")},E)}return k.nextSibling},f=(k,x,S,E,T,P,I)=>{I=I||!!x.dynamicChildren;const L=x.children,V=L.length;for(let D=0;D<V;D++){const z=I?L[D]:L[D]=zi(L[D]),Y=z.type===ra;k?(Y&&!I&&D+1<V&&zi(L[D+1]).type===ra&&(l(i(k.data.slice(z.children.length)),S,o(k)),k.data=z.children),k=d(k,z,E,T,P,I)):Y&&!z.children?l(z.el=i(""),S):(Z1(S,1)||Id(),n(null,z,S,null,E,T,K1(S),P))}return k},p=(k,x,S,E,T,P)=>{const{slotScopeIds:I}=x;I&&(T=T?T.concat(I):I);const L=r(k),V=f(o(k),x,L,S,E,T,P);return V&&wh(V)&&V.data==="]"?o(x.anchor=V):(Id(),l(x.anchor=c("]"),L,V),V)},m=(k,x,S,E,T,P)=>{if(Z1(k.parentElement,1)||Id(),x.el=null,P){const V=b(k);for(;;){const D=o(k);if(D&&D!==V)a(D);else break}}const I=o(k),L=r(k);return a(k),n(null,x,L,I,S,E,K1(L),T),S&&(S.vnode.el=x.el,Dy(S,x.el)),I},b=(k,x="[",S="]")=>{let E=0;for(;k;)if(k=o(k),k&&wh(k)&&(k.data===x&&E++,k.data===S)){if(E===0)return o(k);E--}return k},y=(k,x,S)=>{const E=x.parentNode;E&&E.replaceChild(k,x);let T=S;for(;T;)T.vnode.el===x&&(T.vnode.el=T.subTree.el=k),T=T.parent},C=k=>k.nodeType===1&&k.tagName==="TEMPLATE";return[u,d]}const mS="data-allow-mismatch",YW={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Z1(t,e){if(e===0||e===1)for(;t&&!t.hasAttribute(mS);)t=t.parentElement;const n=t&&t.getAttribute(mS);if(n==null)return!1;if(n==="")return!0;{const s=n.split(",");return e===0&&s.includes("children")?!0:s.includes(YW[e])}}const GW=Cy().requestIdleCallback||(t=>setTimeout(t,1)),qW=Cy().cancelIdleCallback||(t=>clearTimeout(t)),XW=(t=1e4)=>e=>{const n=GW(e,{timeout:t});return()=>qW(n)};function KW(t){const{top:e,left:n,bottom:s,right:i}=t.getBoundingClientRect(),{innerHeight:o,innerWidth:r}=window;return(e>0&&e<o||s>0&&s<o)&&(n>0&&n<r||i>0&&i<r)}const ZW=t=>(e,n)=>{const s=new IntersectionObserver(i=>{for(const o of i)if(o.isIntersecting){s.disconnect(),e();break}},t);return n(i=>{if(i instanceof Element){if(KW(i))return e(),s.disconnect(),!1;s.observe(i)}}),()=>s.disconnect()},JW=t=>e=>{if(t){const n=matchMedia(t);if(n.matches)e();else return n.addEventListener("change",e,{once:!0}),()=>n.removeEventListener("change",e)}},QW=(t=[])=>(e,n)=>{nt(t)&&(t=[t]);let s=!1;const i=r=>{s||(s=!0,o(),e(),r.target.dispatchEvent(new r.constructor(r.type,r)))},o=()=>{n(r=>{for(const a of t)r.removeEventListener(a,i)})};return n(r=>{for(const a of t)r.addEventListener(a,i,{once:!0})}),o};function eY(t,e){if(wh(t)&&t.data==="["){let n=1,s=t.nextSibling;for(;s;){if(s.nodeType===1){if(e(s)===!1)break}else if(wh(s))if(s.data==="]"){if(--n===0)break}else s.data==="["&&n++;s=s.nextSibling}}else e(t)}const Qa=t=>!!t.type.__asyncLoader;function tY(t){ot(t)&&(t={loader:t});const{loader:e,loadingComponent:n,errorComponent:s,delay:i=200,hydrate:o,timeout:r,suspensible:a=!0,onError:l}=t;let c=null,u,d=0;const h=()=>(d++,c=null,f()),f=()=>{let p;return c||(p=c=e().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),l)return new Promise((b,y)=>{l(m,()=>b(h()),()=>y(m),d+1)});throw m}).then(m=>p!==c&&c?c:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),u=m,m)))};return se({name:"AsyncComponentWrapper",__asyncLoader:f,__asyncHydrate(p,m,b){let y=!1;(m.bu||(m.bu=[])).push(()=>y=!0);const C=()=>{y||b()},k=o?()=>{const x=o(C,S=>eY(p,S));x&&(m.bum||(m.bum=[])).push(x)}:C;u?k():f().then(()=>!m.isUnmounted&&k())},get __asyncResolved(){return u},setup(){const p=Hs;if(Ik(p),u)return()=>J1(u,p);const m=k=>{c=null,od(k,p,13,!s)};if(a&&p.suspense||Gh)return f().then(k=>()=>J1(k,p)).catch(k=>(m(k),()=>s?_(s,{error:k}):null));const b=J(!1),y=J(),C=J(!!i);return i&&setTimeout(()=>{C.value=!1},i),r!=null&&setTimeout(()=>{if(!b.value&&!y.value){const k=new Error(`Async component timed out after ${r}ms.`);m(k),y.value=k}},r),f().then(()=>{b.value=!0,p.parent&&zg(p.parent.vnode)&&p.parent.update()}).catch(k=>{m(k),y.value=k}),()=>{if(b.value&&u)return J1(u,p);if(y.value&&s)return _(s,{error:y.value});if(n&&!C.value)return J1(n,p)}}})}function J1(t,e){const{ref:n,props:s,children:i,ce:o}=e.vnode,r=_(t,s,i);return r.ref=n,r.ce=o,delete e.vnode.ce,r}const zg=t=>t.type.__isKeepAlive,nY={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const n=pt(),s=n.ctx;if(!s.renderer)return()=>{const C=e.default&&e.default();return C&&C.length===1?C[0]:C};const i=new Map,o=new Set;let r=null;const a=n.suspense,{renderer:{p:l,m:c,um:u,o:{createElement:d}}}=s,h=d("div");s.activate=(C,k,x,S,E)=>{const T=C.component;c(C,k,x,0,a),l(T.vnode,C,k,x,T,a,S,C.slotScopeIds,E),hs(()=>{T.isDeactivated=!1,T.a&&$h(T.a);const P=C.props&&C.props.onVnodeMounted;P&&Ni(P,T.parent,C)},a)},s.deactivate=C=>{const k=C.component;d_(k.m),d_(k.a),c(C,h,null,1,a),hs(()=>{k.da&&$h(k.da);const x=C.props&&C.props.onVnodeUnmounted;x&&Ni(x,k.parent,C),k.isDeactivated=!0},a)};function f(C){_2(C),u(C,n,a,!0)}function p(C){i.forEach((k,x)=>{const S=M3(Qa(k)?k.type.__asyncResolved||{}:k.type);S&&!C(S)&&m(x)})}function m(C){const k=i.get(C);k&&(!r||!hr(k,r))?f(k):r&&_2(r),i.delete(C),o.delete(C)}Te(()=>[t.include,t.exclude],([C,k])=>{C&&p(x=>bp(C,x)),k&&p(x=>!bp(k,x))},{flush:"post",deep:!0});let b=null;const y=()=>{b!=null&&(h_(n.subTree.type)?hs(()=>{i.set(b,Q1(n.subTree))},n.subTree.suspense):i.set(b,Q1(n.subTree)))};return Pt(y),ll(y),Gn(()=>{i.forEach(C=>{const{subTree:k,suspense:x}=n,S=Q1(k);if(C.type===S.type&&C.key===S.key){_2(S);const E=S.component.da;E&&hs(E,x);return}f(C)})}),()=>{if(b=null,!e.default)return r=null;const C=e.default(),k=C[0];if(C.length>1)return r=null,C;if(!Gs(k)||!(k.shapeFlag&4)&&!(k.shapeFlag&128))return r=null,k;let x=Q1(k);if(x.type===Qn)return r=null,x;const S=x.type,E=M3(Qa(x)?x.type.__asyncResolved||{}:S),{include:T,exclude:P,max:I}=t;if(T&&(!E||!bp(T,E))||P&&E&&bp(P,E))return x.shapeFlag&=-257,r=x,k;const L=x.key==null?S:x.key,V=i.get(L);return x.el&&(x=Tr(x),k.shapeFlag&128&&(k.ssContent=x)),b=L,V?(x.el=V.el,x.component=V.component,x.transition&&il(x,x.transition),x.shapeFlag|=512,o.delete(L),o.add(L)):(o.add(L),I&&o.size>parseInt(I,10)&&m(o.values().next().value)),x.shapeFlag|=256,r=x,h_(k.type)?k:x}}},sY=nY;function bp(t,e){return Le(t)?t.some(n=>bp(n,e)):nt(t)?t.split(",").includes(e):xj(t)?(t.lastIndex=0,t.test(e)):!1}function Lk(t,e){bP(t,"a",e)}function Ok(t,e){bP(t,"da",e)}function bP(t,e,n=Hs){const s=t.__wdc||(t.__wdc=()=>{let i=n;for(;i;){if(i.isDeactivated)return;i=i.parent}return t()});if(Ly(e,s,n),n){let i=n.parent;for(;i&&i.parent;)zg(i.parent.vnode)&&iY(s,e,n,i),i=i.parent}}function iY(t,e,n,s){const i=Ly(e,t,s,!0);_a(()=>{wk(s[e],i)},n)}function _2(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function Q1(t){return t.shapeFlag&128?t.ssContent:t}function Ly(t,e,n=Hs,s=!1){if(n){const i=n[t]||(n[t]=[]),o=e.__weh||(e.__weh=(...r)=>{nl();const a=Bu(n),l=Zo(e,n,t,r);return a(),sl(),l});return s?i.unshift(o):i.push(o),o}}const al=t=>(e,n=Hs)=>{(!Gh||t==="sp")&&Ly(t,(...s)=>e(...s),n)},rd=al("bm"),Pt=al("m"),Dk=al("bu"),ll=al("u"),Gn=al("bum"),_a=al("um"),wP=al("sp"),CP=al("rtg"),kP=al("rtc");function xP(t,e=Hs){Ly("ec",t,e)}const Rk="components",oY="directives";function H(t,e){return Vk(Rk,t,!0,e)||t}const SP=Symbol.for("v-ndc");function Tt(t){return nt(t)?Vk(Rk,t,!1)||t:t||SP}function _t(t){return Vk(oY,t)}function Vk(t,e,n=!0,s=!1){const i=Us||Hs;if(i){const o=i.type;if(t===Rk){const a=M3(o,!1);if(a&&(a===e||a===Bn(e)||a===Sc(Bn(e))))return o}const r=gS(i[t]||o[t],e)||gS(i.appContext[t],e);return!r&&s?o:r}}function gS(t,e){return t&&(t[e]||t[Bn(e)]||t[Sc(Bn(e))])}function be(t,e,n,s){let i;const o=n&&n[s],r=Le(t);if(r||nt(t)){const a=r&&yr(t);let l=!1,c=!1;a&&(l=!Wi(t),c=ca(t),t=My(t)),i=new Array(t.length);for(let u=0,d=t.length;u<d;u++)i[u]=e(l?c?Wh(Er(t[u])):Er(t[u]):t[u],u,void 0,o&&o[u])}else if(typeof t=="number"){i=new Array(t);for(let a=0;a<t;a++)i[a]=e(a+1,a,void 0,o&&o[a])}else if(Ct(t))if(t[Symbol.iterator])i=Array.from(t,(a,l)=>e(a,l,void 0,o&&o[l]));else{const a=Object.keys(t);i=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const u=a[l];i[l]=e(t[u],u,l,o&&o[l])}}else i=[];return n&&(n[s]=i),i}function Es(t,e){for(let n=0;n<e.length;n++){const s=e[n];if(Le(s))for(let i=0;i<s.length;i++)t[s[i].name]=s[i].fn;else s&&(t[s.name]=s.key?(...i)=>{const o=s.fn(...i);return o&&(o.key=s.key),o}:s.fn)}return t}function ae(t,e,n={},s,i){if(Us.ce||Us.parent&&Qa(Us.parent)&&Us.parent.ce){const c=Object.keys(n).length>0;return e!=="default"&&(n.name=e),v(),R(te,null,[_("slot",n,s&&s())],c?-2:64)}let o=t[e];o&&o._c&&(o._d=!1),v();const r=o&&Fk(o(n)),a=n.key||r&&r.key,l=R(te,{key:(a&&!Xi(a)?a:`_${e}`)+(!r&&s?"_fb":"")},r||(s?s():[]),r&&t._===1?64:-2);return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}function Fk(t){return t.some(e=>Gs(e)?!(e.type===Qn||e.type===te&&!Fk(e.children)):!0)?t:null}function $P(t,e){const n={};for(const s in t)n[e&&/[A-Z]/.test(s)?`on:${s}`:wu(s)]=t[s];return n}const _3=t=>t?JP(t)?Hg(t):_3(t.parent):null,lm=Zt(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=>_3(t.parent),$root:t=>_3(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>Nk(t),$forceUpdate:t=>t.f||(t.f=()=>{Ek(t.update)}),$nextTick:t=>t.n||(t.n=dt.bind(t.proxy)),$watch:t=>FW.bind(t)}),y2=(t,e)=>t!==sn&&!t.__isScriptSetup&&Rt(t,e),y3={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:n,setupState:s,data:i,props:o,accessCache:r,type:a,appContext:l}=t;if(e[0]!=="$"){const h=r[e];if(h!==void 0)switch(h){case 1:return s[e];case 2:return i[e];case 4:return n[e];case 3:return o[e]}else{if(y2(s,e))return r[e]=1,s[e];if(i!==sn&&Rt(i,e))return r[e]=2,i[e];if(Rt(o,e))return r[e]=3,o[e];if(n!==sn&&Rt(n,e))return r[e]=4,n[e];b3&&(r[e]=0)}}const c=lm[e];let u,d;if(c)return e==="$attrs"&&ni(t.attrs,"get",""),c(t);if((u=a.__cssModules)&&(u=u[e]))return u;if(n!==sn&&Rt(n,e))return r[e]=4,n[e];if(d=l.config.globalProperties,Rt(d,e))return d[e]},set({_:t},e,n){const{data:s,setupState:i,ctx:o}=t;return y2(i,e)?(i[e]=n,!0):s!==sn&&Rt(s,e)?(s[e]=n,!0):Rt(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(o[e]=n,!0)},has({_:{data:t,setupState:e,accessCache:n,ctx:s,appContext:i,props:o,type:r}},a){let l;return!!(n[a]||t!==sn&&a[0]!=="$"&&Rt(t,a)||y2(e,a)||Rt(o,a)||Rt(s,a)||Rt(lm,a)||Rt(i.config.globalProperties,a)||(l=r.__cssModules)&&l[a])},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:Rt(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}},rY=Zt({},y3,{get(t,e){if(e!==Symbol.unscopables)return y3.get(t,e,t)},has(t,e){return e[0]!=="_"&&!Tj(e)}});function aY(){return null}function lY(){return null}function cY(t){}function uY(t){}function dY(){return null}function hY(){}function fY(t,e){return null}function Zi(){return AP().slots}function If(){return AP().attrs}function AP(t){const e=pt();return e.setupContext||(e.setupContext=nI(e))}function qm(t){return Le(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function pY(t,e){const n=qm(t);for(const s in e){if(s.startsWith("__skip"))continue;let i=n[s];i?Le(i)||ot(i)?i=n[s]={type:i,default:e[s]}:i.default=e[s]:i===null&&(i=n[s]={default:e[s]}),i&&e[`__skip_${s}`]&&(i.skipFactory=!0)}return n}function mY(t,e){return!t||!e?t||e:Le(t)&&Le(e)?t.concat(e):Zt({},qm(t),qm(e))}function gY(t,e){const n={};for(const s in t)e.includes(s)||Object.defineProperty(n,s,{enumerable:!0,get:()=>t[s]});return n}function vY(t){const e=pt();let n=t();return S3(),zm(n)&&(n=n.catch(s=>{throw Bu(e),s})),[n,()=>Bu(e)]}let b3=!0;function _Y(t){const e=Nk(t),n=t.proxy,s=t.ctx;b3=!1,e.beforeCreate&&vS(e.beforeCreate,t,"bc");const{data:i,computed:o,methods:r,watch:a,provide:l,inject:c,created:u,beforeMount:d,mounted:h,beforeUpdate:f,updated:p,activated:m,deactivated:b,beforeDestroy:y,beforeUnmount:C,destroyed:k,unmounted:x,render:S,renderTracked:E,renderTriggered:T,errorCaptured:P,serverPrefetch:I,expose:L,inheritAttrs:V,components:D,directives:z,filters:Y}=e;if(c&&yY(c,s,null),r)for(const X in r){const K=r[X];ot(K)&&(s[X]=K.bind(n))}if(i){const X=i.call(n,n);Ct(X)&&(t.data=as(X))}if(b3=!0,o)for(const X in o){const K=o[X],N=ot(K)?K.bind(n,n):ot(K.get)?K.get.bind(n,n):Vt,F=!ot(K)&&ot(K.set)?K.set.bind(n):Vt,Q=q({get:N,set:F});Object.defineProperty(s,X,{enumerable:!0,configurable:!0,get:()=>Q.value,set:ie=>Q.value=ie})}if(a)for(const X in a)MP(a[X],s,n,X);if(l){const X=ot(l)?l.call(n):l;Reflect.ownKeys(X).forEach(K=>{It(K,X[K])})}u&&vS(u,t,"c");function U(X,K){Le(K)?K.forEach(N=>X(N.bind(n))):K&&X(K.bind(n))}if(U(rd,d),U(Pt,h),U(Dk,f),U(ll,p),U(Lk,m),U(Ok,b),U(xP,P),U(kP,E),U(CP,T),U(Gn,C),U(_a,x),U(wP,I),Le(L))if(L.length){const X=t.exposed||(t.exposed={});L.forEach(K=>{Object.defineProperty(X,K,{get:()=>n[K],set:N=>n[K]=N,enumerable:!0})})}else t.exposed||(t.exposed={});S&&t.render===Vt&&(t.render=S),V!=null&&(t.inheritAttrs=V),D&&(t.components=D),z&&(t.directives=z),I&&Ik(t)}function yY(t,e,n=Vt){Le(t)&&(t=w3(t));for(const s in t){const i=t[s];let o;Ct(i)?"default"in i?o=qe(i.from||s,i.default,!0):o=qe(i.from||s):o=qe(i),hn(o)?Object.defineProperty(e,s,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):e[s]=o}}function vS(t,e,n){Zo(Le(t)?t.map(s=>s.bind(e.proxy)):t.bind(e.proxy),e,n)}function MP(t,e,n,s){let i=s.includes(".")?dP(n,s):()=>n[s];if(nt(t)){const o=e[t];ot(o)&&Te(i,o)}else if(ot(t))Te(i,t.bind(n));else if(Ct(t))if(Le(t))t.forEach(o=>MP(o,e,n,s));else{const o=ot(t.handler)?t.handler.bind(n):e[t.handler];ot(o)&&Te(i,o,t)}}function Nk(t){const e=t.type,{mixins:n,extends:s}=e,{mixins:i,optionsCache:o,config:{optionMergeStrategies:r}}=t.appContext,a=o.get(e);let l;return a?l=a:!i.length&&!n&&!s?l=e:(l={},i.length&&i.forEach(c=>u_(l,c,r,!0)),u_(l,e,r)),Ct(e)&&o.set(e,l),l}function u_(t,e,n,s=!1){const{mixins:i,extends:o}=e;o&&u_(t,o,n,!0),i&&i.forEach(r=>u_(t,r,n,!0));for(const r in e)if(!(s&&r==="expose")){const a=bY[r]||n&&n[r];t[r]=a?a(t[r],e[r]):e[r]}return t}const bY={data:_S,props:yS,emits:yS,methods:wp,computed:wp,beforeCreate:pi,created:pi,beforeMount:pi,mounted:pi,beforeUpdate:pi,updated:pi,beforeDestroy:pi,beforeUnmount:pi,destroyed:pi,unmounted:pi,activated:pi,deactivated:pi,errorCaptured:pi,serverPrefetch:pi,components:wp,directives:wp,watch:CY,provide:_S,inject:wY};function _S(t,e){return e?t?function(){return Zt(ot(t)?t.call(this,this):t,ot(e)?e.call(this,this):e)}:e:t}function wY(t,e){return wp(w3(t),w3(e))}function w3(t){if(Le(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function pi(t,e){return t?[...new Set([].concat(t,e))]:e}function wp(t,e){return t?Zt(Object.create(null),t,e):e}function yS(t,e){return t?Le(t)&&Le(e)?[...new Set([...t,...e])]:Zt(Object.create(null),qm(t),qm(e??{})):e}function CY(t,e){if(!t)return e;if(!e)return t;const n=Zt(Object.create(null),t);for(const s in e)n[s]=pi(t[s],e[s]);return n}function EP(){return{app:null,config:{isNativeTag:bh,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 kY=0;function xY(t,e){return function(s,i=null){ot(s)||(s=Zt({},s)),i!=null&&!Ct(i)&&(i=null);const o=EP(),r=new WeakSet,a=[];let l=!1;const c=o.app={_uid:kY++,_component:s,_props:i,_container:null,_context:o,_instance:null,version:iI,get config(){return o.config},set config(u){},use(u,...d){return r.has(u)||(u&&ot(u.install)?(r.add(u),u.install(c,...d)):ot(u)&&(r.add(u),u(c,...d))),c},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),c},component(u,d){return d?(o.components[u]=d,c):o.components[u]},directive(u,d){return d?(o.directives[u]=d,c):o.directives[u]},mount(u,d,h){if(!l){const f=c._ceVNode||_(s,i);return f.appContext=o,h===!0?h="svg":h===!1&&(h=void 0),d&&e?e(f,u):t(f,u,h),l=!0,c._container=u,u.__vue_app__=c,Hg(f.component)}},onUnmount(u){a.push(u)},unmount(){l&&(Zo(a,c._instance,16),t(null,c._container),delete c._container.__vue_app__)},provide(u,d){return o.provides[u]=d,c},runWithContext(u){const d=ku;ku=c;try{return u()}finally{ku=d}}};return c}}let ku=null;function SY(t,e,n=sn){const s=pt(),i=Bn(e),o=wi(e),r=TP(t,i),a=QT((l,c)=>{let u,d=sn,h;return uP(()=>{const f=t[i];_i(u,f)&&(u=f,c())}),{get(){return l(),n.get?n.get(u):u},set(f){const p=n.set?n.set(f):f;if(!_i(p,u)&&!(d!==sn&&_i(f,d)))return;const m=s.vnode.props;m&&(e in m||i in m||o in m)&&(`onUpdate:${e}`in m||`onUpdate:${i}`in m||`onUpdate:${o}`in m)||(u=f,c()),s.emit(`update:${e}`,p),_i(f,p)&&_i(f,d)&&!_i(p,h)&&c(),d=f,h=p}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?r||sn:a,done:!1}:{done:!0}}}},a}const TP=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Bn(e)}Modifiers`]||t[`${wi(e)}Modifiers`];function $Y(t,e,...n){if(t.isUnmounted)return;const s=t.vnode.props||sn;let i=n;const o=e.startsWith("update:"),r=o&&TP(s,e.slice(7));r&&(r.trim&&(i=n.map(u=>nt(u)?u.trim():u)),r.number&&(i=n.map(wy)));let a,l=s[a=wu(e)]||s[a=wu(Bn(e))];!l&&o&&(l=s[a=wu(wi(e))]),l&&Zo(l,t,6,i);const c=s[a+"Once"];if(c){if(!t.emitted)t.emitted={};else if(t.emitted[a])return;t.emitted[a]=!0,Zo(c,t,6,i)}}const AY=new WeakMap;function PP(t,e,n=!1){const s=n?AY:e.emitsCache,i=s.get(t);if(i!==void 0)return i;const o=t.emits;let r={},a=!1;if(!ot(t)){const l=c=>{const u=PP(c,e,!0);u&&(a=!0,Zt(r,u))};!n&&e.mixins.length&&e.mixins.forEach(l),t.extends&&l(t.extends),t.mixins&&t.mixins.forEach(l)}return!o&&!a?(Ct(t)&&s.set(t,null),null):(Le(o)?o.forEach(l=>r[l]=null):Zt(r,o),Ct(t)&&s.set(t,r),r)}function Oy(t,e){return!t||!sd(e)?!1:(e=e.slice(2).replace(/Once$/,""),Rt(t,e[0].toLowerCase()+e.slice(1))||Rt(t,wi(e))||Rt(t,e))}function V0(t){const{type:e,vnode:n,proxy:s,withProxy:i,propsOptions:[o],slots:r,attrs:a,emit:l,render:c,renderCache:u,props:d,data:h,setupState:f,ctx:p,inheritAttrs:m}=t,b=Gm(t);let y,C;try{if(n.shapeFlag&4){const x=i||s,S=x;y=zi(c.call(S,x,u,d,f,h,p)),C=a}else{const x=e;y=zi(x.length>1?x(d,{attrs:a,slots:r,emit:l}):x(d,null)),C=e.props?a:EY(a)}}catch(x){cm.length=0,od(x,t,1),y=_(Qn)}let k=y;if(C&&m!==!1){const x=Object.keys(C),{shapeFlag:S}=k;x.length&&S&7&&(o&&x.some(bk)&&(C=TY(C,o)),k=Tr(k,C,!1,!0))}return n.dirs&&(k=Tr(k,null,!1,!0),k.dirs=k.dirs?k.dirs.concat(n.dirs):n.dirs),n.transition&&il(k,n.transition),y=k,Gm(b),y}function MY(t,e=!0){let n;for(let s=0;s<t.length;s++){const i=t[s];if(Gs(i)){if(i.type!==Qn||i.children==="v-if"){if(n)return;n=i}}else return}return n}const EY=t=>{let e;for(const n in t)(n==="class"||n==="style"||sd(n))&&((e||(e={}))[n]=t[n]);return e},TY=(t,e)=>{const n={};for(const s in t)(!bk(s)||!(s.slice(9)in e))&&(n[s]=t[s]);return n};function PY(t,e,n){const{props:s,children:i,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 s?bS(s,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]!==s[h]&&!Oy(c,h))return!0}}}else return(i||a)&&(!a||!a.$stable)?!0:s===r?!1:s?r?bS(s,r,c):!0:!!r;return!1}function bS(t,e,n){const s=Object.keys(e);if(s.length!==Object.keys(t).length)return!0;for(let i=0;i<s.length;i++){const o=s[i];if(e[o]!==t[o]&&!Oy(n,o))return!0}return!1}function Dy({vnode:t,parent:e},n){for(;e;){const s=e.subTree;if(s.suspense&&s.suspense.activeBranch===t&&(s.el=t.el),s===t)(t=e.vnode).el=n,e=e.parent;else break}}const IP={},LP=()=>Object.create(IP),OP=t=>Object.getPrototypeOf(t)===IP;function IY(t,e,n,s=!1){const i={},o=LP();t.propsDefaults=Object.create(null),DP(t,e,i,o);for(const r in t.propsOptions[0])r in i||(i[r]=void 0);n?t.props=s?i:Ak(i):t.type.props?t.props=i:t.props=o,t.attrs=o}function LY(t,e,n,s){const{props:i,attrs:o,vnode:{patchFlag:r}}=t,a=Yt(i),[l]=t.propsOptions;let c=!1;if((s||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(Oy(t.emitsOptions,h))continue;const f=e[h];if(l)if(Rt(o,h))f!==o[h]&&(o[h]=f,c=!0);else{const p=Bn(h);i[p]=C3(l,a,p,f,t,!1)}else f!==o[h]&&(o[h]=f,c=!0)}}}else{DP(t,e,i,o)&&(c=!0);let u;for(const d in a)(!e||!Rt(e,d)&&((u=wi(d))===d||!Rt(e,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(i[d]=C3(l,a,d,void 0,t,!0)):delete i[d]);if(o!==a)for(const d in o)(!e||!Rt(e,d))&&(delete o[d],c=!0)}c&&Ua(t.attrs,"set","")}function DP(t,e,n,s){const[i,o]=t.propsOptions;let r=!1,a;if(e)for(let l in e){if(Ja(l))continue;const c=e[l];let u;i&&Rt(i,u=Bn(l))?!o||!o.includes(u)?n[u]=c:(a||(a={}))[u]=c:Oy(t.emitsOptions,l)||(!(l in s)||c!==s[l])&&(s[l]=c,r=!0)}if(o){const l=Yt(n),c=a||sn;for(let u=0;u<o.length;u++){const d=o[u];n[d]=C3(i,l,d,c[d],t,!Rt(c,d))}}return r}function C3(t,e,n,s,i,o){const r=t[n];if(r!=null){const a=Rt(r,"default");if(a&&s===void 0){const l=r.default;if(r.type!==Function&&!r.skipFactory&&ot(l)){const{propsDefaults:c}=i;if(n in c)s=c[n];else{const u=Bu(i);s=c[n]=l.call(null,e),u()}}else s=l;i.ce&&i.ce._setProp(n,s)}r[0]&&(o&&!a?s=!1:r[1]&&(s===""||s===wi(n))&&(s=!0))}return s}const OY=new WeakMap;function RP(t,e,n=!1){const s=n?OY:e.propsCache,i=s.get(t);if(i)return i;const o=t.props,r={},a=[];let l=!1;if(!ot(t)){const u=d=>{l=!0;const[h,f]=RP(d,e,!0);Zt(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 Ct(t)&&s.set(t,xh),xh;if(Le(o))for(let u=0;u<o.length;u++){const d=Bn(o[u]);wS(d)&&(r[d]=sn)}else if(o)for(const u in o){const d=Bn(u);if(wS(d)){const h=o[u],f=r[d]=Le(h)||ot(h)?{type:h}:Zt({},h),p=f.type;let m=!1,b=!0;if(Le(p))for(let y=0;y<p.length;++y){const C=p[y],k=ot(C)&&C.name;if(k==="Boolean"){m=!0;break}else k==="String"&&(b=!1)}else m=ot(p)&&p.name==="Boolean";f[0]=m,f[1]=b,(m||Rt(f,"default"))&&a.push(d)}}const c=[r,a];return Ct(t)&&s.set(t,c),c}function wS(t){return t[0]!=="$"&&!Ja(t)}const Bk=t=>t==="_"||t==="_ctx"||t==="$stable",zk=t=>Le(t)?t.map(zi):[zi(t)],DY=(t,e,n)=>{if(e._n)return e;const s=w((...i)=>zk(e(...i)),n);return s._c=!1,s},VP=(t,e,n)=>{const s=t._ctx;for(const i in t){if(Bk(i))continue;const o=t[i];if(ot(o))e[i]=DY(i,o,s);else if(o!=null){const r=zk(o);e[i]=()=>r}}},FP=(t,e)=>{const n=zk(e);t.slots.default=()=>n},NP=(t,e,n)=>{for(const s in e)(n||!Bk(s))&&(t[s]=e[s])},RY=(t,e,n)=>{const s=t.slots=LP();if(t.vnode.shapeFlag&32){const i=e._;i?(NP(s,e,n),n&&IT(s,"_",i,!0)):VP(e,s)}else e&&FP(t,e)},VY=(t,e,n)=>{const{vnode:s,slots:i}=t;let o=!0,r=sn;if(s.shapeFlag&32){const a=e._;a?n&&a===1?o=!1:NP(i,e,n):(o=!e.$stable,VP(e,i)),r=e}else e&&(FP(t,e),r={default:1});if(o)for(const a in i)!Bk(a)&&r[a]==null&&delete i[a]},hs=GP;function BP(t){return HP(t)}function zP(t){return HP(t,WW)}function HP(t,e){const n=Cy();n.__VUE__=!0;const{insert:s,remove:i,patchProp:o,createElement:r,createText:a,createComment:l,setText:c,setElementText:u,parentNode:d,nextSibling:h,setScopeId:f=Vt,insertStaticContent:p}=t,m=(ee,ne,pe,Ae=null,Ce=null,Me=null,je=void 0,Fe=null,Ue=!!ne.dynamicChildren)=>{if(ee===ne)return;ee&&!hr(ee,ne)&&(Ae=oe(ee),ie(ee,Ce,Me,!0),ee=null),ne.patchFlag===-2&&(Ue=!1,ne.dynamicChildren=null);const{type:Oe,ref:ht,shapeFlag:Ie}=ne;switch(Oe){case ra:b(ee,ne,pe,Ae);break;case Qn:y(ee,ne,pe,Ae);break;case xu:ee==null&&C(ne,pe,Ae,je);break;case te:D(ee,ne,pe,Ae,Ce,Me,je,Fe,Ue);break;default:Ie&1?S(ee,ne,pe,Ae,Ce,Me,je,Fe,Ue):Ie&6?z(ee,ne,pe,Ae,Ce,Me,je,Fe,Ue):(Ie&64||Ie&128)&&Oe.process(ee,ne,pe,Ae,Ce,Me,je,Fe,Ue,ge)}ht!=null&&Ce?Mh(ht,ee&&ee.ref,Me,ne||ee,!ne):ht==null&&ee&&ee.ref!=null&&Mh(ee.ref,null,Me,ee,!0)},b=(ee,ne,pe,Ae)=>{if(ee==null)s(ne.el=a(ne.children),pe,Ae);else{const Ce=ne.el=ee.el;ne.children!==ee.children&&c(Ce,ne.children)}},y=(ee,ne,pe,Ae)=>{ee==null?s(ne.el=l(ne.children||""),pe,Ae):ne.el=ee.el},C=(ee,ne,pe,Ae)=>{[ee.el,ee.anchor]=p(ee.children,ne,pe,Ae,ee.el,ee.anchor)},k=({el:ee,anchor:ne},pe,Ae)=>{let Ce;for(;ee&&ee!==ne;)Ce=h(ee),s(ee,pe,Ae),ee=Ce;s(ne,pe,Ae)},x=({el:ee,anchor:ne})=>{let pe;for(;ee&&ee!==ne;)pe=h(ee),i(ee),ee=pe;i(ne)},S=(ee,ne,pe,Ae,Ce,Me,je,Fe,Ue)=>{if(ne.type==="svg"?je="svg":ne.type==="math"&&(je="mathml"),ee==null)E(ne,pe,Ae,Ce,Me,je,Fe,Ue);else{const Oe=ee.el&&ee.el._isVueCE?ee.el:null;try{Oe&&Oe._beginPatch(),I(ee,ne,Ce,Me,je,Fe,Ue)}finally{Oe&&Oe._endPatch()}}},E=(ee,ne,pe,Ae,Ce,Me,je,Fe)=>{let Ue,Oe;const{props:ht,shapeFlag:Ie,transition:_e,dirs:le}=ee;if(Ue=ee.el=r(ee.type,Me,ht&&ht.is,ht),Ie&8?u(Ue,ee.children):Ie&16&&P(ee.children,Ue,null,Ae,Ce,b2(ee,Me),je,Fe),le&&sa(ee,null,Ae,"created"),T(Ue,ee,ee.scopeId,je,Ae),ht){for(const Xe in ht)Xe!=="value"&&!Ja(Xe)&&o(Ue,Xe,null,ht[Xe],Me,Ae);"value"in ht&&o(Ue,"value",null,ht.value,Me),(Oe=ht.onVnodeBeforeMount)&&Ni(Oe,Ae,ee)}le&&sa(ee,null,Ae,"beforeMount");const ke=UP(Ce,_e);ke&&_e.beforeEnter(Ue),s(Ue,ne,pe),((Oe=ht&&ht.onVnodeMounted)||ke||le)&&hs(()=>{Oe&&Ni(Oe,Ae,ee),ke&&_e.enter(Ue),le&&sa(ee,null,Ae,"mounted")},Ce)},T=(ee,ne,pe,Ae,Ce)=>{if(pe&&f(ee,pe),Ae)for(let Me=0;Me<Ae.length;Me++)f(ee,Ae[Me]);if(Ce){let Me=Ce.subTree;if(ne===Me||h_(Me.type)&&(Me.ssContent===ne||Me.ssFallback===ne)){const je=Ce.vnode;T(ee,je,je.scopeId,je.slotScopeIds,Ce.parent)}}},P=(ee,ne,pe,Ae,Ce,Me,je,Fe,Ue=0)=>{for(let Oe=Ue;Oe<ee.length;Oe++){const ht=ee[Oe]=Fe?Nl(ee[Oe]):zi(ee[Oe]);m(null,ht,ne,pe,Ae,Ce,Me,je,Fe)}},I=(ee,ne,pe,Ae,Ce,Me,je)=>{const Fe=ne.el=ee.el;let{patchFlag:Ue,dynamicChildren:Oe,dirs:ht}=ne;Ue|=ee.patchFlag&16;const Ie=ee.props||sn,_e=ne.props||sn;let le;if(pe&&Nc(pe,!1),(le=_e.onVnodeBeforeUpdate)&&Ni(le,pe,ne,ee),ht&&sa(ne,ee,pe,"beforeUpdate"),pe&&Nc(pe,!0),(Ie.innerHTML&&_e.innerHTML==null||Ie.textContent&&_e.textContent==null)&&u(Fe,""),Oe?L(ee.dynamicChildren,Oe,Fe,pe,Ae,b2(ne,Ce),Me):je||K(ee,ne,Fe,null,pe,Ae,b2(ne,Ce),Me,!1),Ue>0){if(Ue&16)V(Fe,Ie,_e,pe,Ce);else if(Ue&2&&Ie.class!==_e.class&&o(Fe,"class",null,_e.class,Ce),Ue&4&&o(Fe,"style",Ie.style,_e.style,Ce),Ue&8){const ke=ne.dynamicProps;for(let Xe=0;Xe<ke.length;Xe++){const tt=ke[Xe],Ne=Ie[tt],Qe=_e[tt];(Qe!==Ne||tt==="value")&&o(Fe,tt,Ne,Qe,Ce,pe)}}Ue&1&&ee.children!==ne.children&&u(Fe,ne.children)}else!je&&Oe==null&&V(Fe,Ie,_e,pe,Ce);((le=_e.onVnodeUpdated)||ht)&&hs(()=>{le&&Ni(le,pe,ne,ee),ht&&sa(ne,ee,pe,"updated")},Ae)},L=(ee,ne,pe,Ae,Ce,Me,je)=>{for(let Fe=0;Fe<ne.length;Fe++){const Ue=ee[Fe],Oe=ne[Fe],ht=Ue.el&&(Ue.type===te||!hr(Ue,Oe)||Ue.shapeFlag&198)?d(Ue.el):pe;m(Ue,Oe,ht,null,Ae,Ce,Me,je,!0)}},V=(ee,ne,pe,Ae,Ce)=>{if(ne!==pe){if(ne!==sn)for(const Me in ne)!Ja(Me)&&!(Me in pe)&&o(ee,Me,ne[Me],null,Ce,Ae);for(const Me in pe){if(Ja(Me))continue;const je=pe[Me],Fe=ne[Me];je!==Fe&&Me!=="value"&&o(ee,Me,Fe,je,Ce,Ae)}"value"in pe&&o(ee,"value",ne.value,pe.value,Ce)}},D=(ee,ne,pe,Ae,Ce,Me,je,Fe,Ue)=>{const Oe=ne.el=ee?ee.el:a(""),ht=ne.anchor=ee?ee.anchor:a("");let{patchFlag:Ie,dynamicChildren:_e,slotScopeIds:le}=ne;le&&(Fe=Fe?Fe.concat(le):le),ee==null?(s(Oe,pe,Ae),s(ht,pe,Ae),P(ne.children||[],pe,ht,Ce,Me,je,Fe,Ue)):Ie>0&&Ie&64&&_e&&ee.dynamicChildren&&ee.dynamicChildren.length===_e.length?(L(ee.dynamicChildren,_e,pe,Ce,Me,je,Fe),(ne.key!=null||Ce&&ne===Ce.subTree)&&Hk(ee,ne,!0)):K(ee,ne,pe,ht,Ce,Me,je,Fe,Ue)},z=(ee,ne,pe,Ae,Ce,Me,je,Fe,Ue)=>{ne.slotScopeIds=Fe,ee==null?ne.shapeFlag&512?Ce.ctx.activate(ne,pe,Ae,je,Ue):Y(ne,pe,Ae,Ce,Me,je,Ue):B(ee,ne,Ue)},Y=(ee,ne,pe,Ae,Ce,Me,je)=>{const Fe=ee.component=ZP(ee,Ae,Ce);if(zg(ee)&&(Fe.ctx.renderer=ge),QP(Fe,!1,je),Fe.asyncDep){if(Ce&&Ce.registerDep(Fe,U,je),!ee.el){const Ue=Fe.subTree=_(Qn);y(null,Ue,ne,pe),ee.placeholder=Ue.el}}else U(Fe,ee,ne,pe,Ce,Me,je)},B=(ee,ne,pe)=>{const Ae=ne.component=ee.component;if(PY(ee,ne,pe))if(Ae.asyncDep&&!Ae.asyncResolved){X(Ae,ne,pe);return}else Ae.next=ne,Ae.update();else ne.el=ee.el,Ae.vnode=ne},U=(ee,ne,pe,Ae,Ce,Me,je)=>{const Fe=()=>{if(ee.isMounted){let{next:Ie,bu:_e,u:le,parent:ke,vnode:Xe}=ee;{const Ee=jP(ee);if(Ee){Ie&&(Ie.el=Xe.el,X(ee,Ie,je)),Ee.asyncDep.then(()=>{ee.isUnmounted||Fe()});return}}let tt=Ie,Ne;Nc(ee,!1),Ie?(Ie.el=Xe.el,X(ee,Ie,je)):Ie=Xe,_e&&$h(_e),(Ne=Ie.props&&Ie.props.onVnodeBeforeUpdate)&&Ni(Ne,ke,Ie,Xe),Nc(ee,!0);const Qe=V0(ee),he=ee.subTree;ee.subTree=Qe,m(he,Qe,d(he.el),oe(he),ee,Ce,Me),Ie.el=Qe.el,tt===null&&Dy(ee,Qe.el),le&&hs(le,Ce),(Ne=Ie.props&&Ie.props.onVnodeUpdated)&&hs(()=>Ni(Ne,ke,Ie,Xe),Ce)}else{let Ie;const{el:_e,props:le}=ne,{bm:ke,m:Xe,parent:tt,root:Ne,type:Qe}=ee,he=Qa(ne);if(Nc(ee,!1),ke&&$h(ke),!he&&(Ie=le&&le.onVnodeBeforeMount)&&Ni(Ie,tt,ne),Nc(ee,!0),_e&&st){const Ee=()=>{ee.subTree=V0(ee),st(_e,ee.subTree,ee,Ce,null)};he&&Qe.__asyncHydrate?Qe.__asyncHydrate(_e,ee,Ee):Ee()}else{Ne.ce&&Ne.ce._def.shadowRoot!==!1&&Ne.ce._injectChildStyle(Qe);const Ee=ee.subTree=V0(ee);m(null,Ee,pe,Ae,ee,Ce,Me),ne.el=Ee.el}if(Xe&&hs(Xe,Ce),!he&&(Ie=le&&le.onVnodeMounted)){const Ee=ne;hs(()=>Ni(Ie,tt,Ee),Ce)}(ne.shapeFlag&256||tt&&Qa(tt.vnode)&&tt.vnode.shapeFlag&256)&&ee.a&&hs(ee.a,Ce),ee.isMounted=!0,ne=pe=Ae=null}};ee.scope.on();const Ue=ee.effect=new Hm(Fe);ee.scope.off();const Oe=ee.update=Ue.run.bind(Ue),ht=ee.job=Ue.runIfDirty.bind(Ue);ht.i=ee,ht.id=ee.uid,Ue.scheduler=()=>Ek(ht),Nc(ee,!0),Oe()},X=(ee,ne,pe)=>{ne.component=ee;const Ae=ee.vnode.props;ee.vnode=ne,ee.next=null,LY(ee,ne.props,Ae,pe),VY(ee,ne.children,pe),nl(),lS(ee),sl()},K=(ee,ne,pe,Ae,Ce,Me,je,Fe,Ue=!1)=>{const Oe=ee&&ee.children,ht=ee?ee.shapeFlag:0,Ie=ne.children,{patchFlag:_e,shapeFlag:le}=ne;if(_e>0){if(_e&128){F(Oe,Ie,pe,Ae,Ce,Me,je,Fe,Ue);return}else if(_e&256){N(Oe,Ie,pe,Ae,Ce,Me,je,Fe,Ue);return}}le&8?(ht&16&&we(Oe,Ce,Me),Ie!==Oe&&u(pe,Ie)):ht&16?le&16?F(Oe,Ie,pe,Ae,Ce,Me,je,Fe,Ue):we(Oe,Ce,Me,!0):(ht&8&&u(pe,""),le&16&&P(Ie,pe,Ae,Ce,Me,je,Fe,Ue))},N=(ee,ne,pe,Ae,Ce,Me,je,Fe,Ue)=>{ee=ee||xh,ne=ne||xh;const Oe=ee.length,ht=ne.length,Ie=Math.min(Oe,ht);let _e;for(_e=0;_e<Ie;_e++){const le=ne[_e]=Ue?Nl(ne[_e]):zi(ne[_e]);m(ee[_e],le,pe,null,Ce,Me,je,Fe,Ue)}Oe>ht?we(ee,Ce,Me,!0,!1,Ie):P(ne,pe,Ae,Ce,Me,je,Fe,Ue,Ie)},F=(ee,ne,pe,Ae,Ce,Me,je,Fe,Ue)=>{let Oe=0;const ht=ne.length;let Ie=ee.length-1,_e=ht-1;for(;Oe<=Ie&&Oe<=_e;){const le=ee[Oe],ke=ne[Oe]=Ue?Nl(ne[Oe]):zi(ne[Oe]);if(hr(le,ke))m(le,ke,pe,null,Ce,Me,je,Fe,Ue);else break;Oe++}for(;Oe<=Ie&&Oe<=_e;){const le=ee[Ie],ke=ne[_e]=Ue?Nl(ne[_e]):zi(ne[_e]);if(hr(le,ke))m(le,ke,pe,null,Ce,Me,je,Fe,Ue);else break;Ie--,_e--}if(Oe>Ie){if(Oe<=_e){const le=_e+1,ke=le<ht?ne[le].el:Ae;for(;Oe<=_e;)m(null,ne[Oe]=Ue?Nl(ne[Oe]):zi(ne[Oe]),pe,ke,Ce,Me,je,Fe,Ue),Oe++}}else if(Oe>_e)for(;Oe<=Ie;)ie(ee[Oe],Ce,Me,!0),Oe++;else{const le=Oe,ke=Oe,Xe=new Map;for(Oe=ke;Oe<=_e;Oe++){const Re=ne[Oe]=Ue?Nl(ne[Oe]):zi(ne[Oe]);Re.key!=null&&Xe.set(Re.key,Oe)}let tt,Ne=0;const Qe=_e-ke+1;let he=!1,Ee=0;const ve=new Array(Qe);for(Oe=0;Oe<Qe;Oe++)ve[Oe]=0;for(Oe=le;Oe<=Ie;Oe++){const Re=ee[Oe];if(Ne>=Qe){ie(Re,Ce,Me,!0);continue}let Et;if(Re.key!=null)Et=Xe.get(Re.key);else for(tt=ke;tt<=_e;tt++)if(ve[tt-ke]===0&&hr(Re,ne[tt])){Et=tt;break}Et===void 0?ie(Re,Ce,Me,!0):(ve[Et-ke]=Oe+1,Et>=Ee?Ee=Et:he=!0,m(Re,ne[Et],pe,null,Ce,Me,je,Fe,Ue),Ne++)}const We=he?FY(ve):xh;for(tt=We.length-1,Oe=Qe-1;Oe>=0;Oe--){const Re=ke+Oe,Et=ne[Re],ln=ne[Re+1],fe=Re+1<ht?ln.el||WP(ln):Ae;ve[Oe]===0?m(null,Et,pe,fe,Ce,Me,je,Fe,Ue):he&&(tt<0||Oe!==We[tt]?Q(Et,pe,fe,2):tt--)}}},Q=(ee,ne,pe,Ae,Ce=null)=>{const{el:Me,type:je,transition:Fe,children:Ue,shapeFlag:Oe}=ee;if(Oe&6){Q(ee.component.subTree,ne,pe,Ae);return}if(Oe&128){ee.suspense.move(ne,pe,Ae);return}if(Oe&64){je.move(ee,ne,pe,ge);return}if(je===te){s(Me,ne,pe);for(let Ie=0;Ie<Ue.length;Ie++)Q(Ue[Ie],ne,pe,Ae);s(ee.anchor,ne,pe);return}if(je===xu){k(ee,ne,pe);return}if(Ae!==2&&Oe&1&&Fe)if(Ae===0)Fe.beforeEnter(Me),s(Me,ne,pe),hs(()=>Fe.enter(Me),Ce);else{const{leave:Ie,delayLeave:_e,afterLeave:le}=Fe,ke=()=>{ee.ctx.isUnmounted?i(Me):s(Me,ne,pe)},Xe=()=>{Me._isLeaving&&Me[Ba](!0),Ie(Me,()=>{ke(),le&&le()})};_e?_e(Me,ke,Xe):Xe()}else s(Me,ne,pe)},ie=(ee,ne,pe,Ae=!1,Ce=!1)=>{const{type:Me,props:je,ref:Fe,children:Ue,dynamicChildren:Oe,shapeFlag:ht,patchFlag:Ie,dirs:_e,cacheIndex:le}=ee;if(Ie===-2&&(Ce=!1),Fe!=null&&(nl(),Mh(Fe,null,pe,ee,!0),sl()),le!=null&&(ne.renderCache[le]=void 0),ht&256){ne.ctx.deactivate(ee);return}const ke=ht&1&&_e,Xe=!Qa(ee);let tt;if(Xe&&(tt=je&&je.onVnodeBeforeUnmount)&&Ni(tt,ne,ee),ht&6)Se(ee.component,pe,Ae);else{if(ht&128){ee.suspense.unmount(pe,Ae);return}ke&&sa(ee,null,ne,"beforeUnmount"),ht&64?ee.type.remove(ee,ne,pe,ge,Ae):Oe&&!Oe.hasOnce&&(Me!==te||Ie>0&&Ie&64)?we(Oe,ne,pe,!1,!0):(Me===te&&Ie&384||!Ce&&ht&16)&&we(Ue,ne,pe),Ae&&Z(ee)}(Xe&&(tt=je&&je.onVnodeUnmounted)||ke)&&hs(()=>{tt&&Ni(tt,ne,ee),ke&&sa(ee,null,ne,"unmounted")},pe)},Z=ee=>{const{type:ne,el:pe,anchor:Ae,transition:Ce}=ee;if(ne===te){me(pe,Ae);return}if(ne===xu){x(ee);return}const Me=()=>{i(pe),Ce&&!Ce.persisted&&Ce.afterLeave&&Ce.afterLeave()};if(ee.shapeFlag&1&&Ce&&!Ce.persisted){const{leave:je,delayLeave:Fe}=Ce,Ue=()=>je(pe,Me);Fe?Fe(ee.el,Me,Ue):Ue()}else Me()},me=(ee,ne)=>{let pe;for(;ee!==ne;)pe=h(ee),i(ee),ee=pe;i(ne)},Se=(ee,ne,pe)=>{const{bum:Ae,scope:Ce,job:Me,subTree:je,um:Fe,m:Ue,a:Oe}=ee;d_(Ue),d_(Oe),Ae&&$h(Ae),Ce.stop(),Me&&(Me.flags|=8,ie(je,ee,ne,pe)),Fe&&hs(Fe,ne),hs(()=>{ee.isUnmounted=!0},ne)},we=(ee,ne,pe,Ae=!1,Ce=!1,Me=0)=>{for(let je=Me;je<ee.length;je++)ie(ee[je],ne,pe,Ae,Ce)},oe=ee=>{if(ee.shapeFlag&6)return oe(ee.component.subTree);if(ee.shapeFlag&128)return ee.suspense.next();const ne=h(ee.anchor||ee.el),pe=ne&&ne[hP];return pe?h(pe):ne};let ce=!1;const re=(ee,ne,pe)=>{let Ae;ee==null?ne._vnode&&(ie(ne._vnode,null,null,!0),Ae=ne._vnode.component):m(ne._vnode||null,ee,ne,null,null,null,pe),ne._vnode=ee,ce||(ce=!0,lS(Ae),l_(),ce=!1)},ge={p:m,um:ie,m:Q,r:Z,mt:Y,mc:P,pc:K,pbc:L,n:oe,o:t};let ze,st;return e&&([ze,st]=e(ge)),{render:re,hydrate:ze,createApp:xY(re,ze)}}function b2({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 Nc({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function UP(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function Hk(t,e,n=!1){const s=t.children,i=e.children;if(Le(s)&&Le(i))for(let o=0;o<s.length;o++){const r=s[o];let a=i[o];a.shapeFlag&1&&!a.dynamicChildren&&((a.patchFlag<=0||a.patchFlag===32)&&(a=i[o]=Nl(i[o]),a.el=r.el),!n&&a.patchFlag!==-2&&Hk(r,a)),a.type===ra&&(a.patchFlag!==-1?a.el=r.el:a.__elIndex=o+(t.type===te?1:0)),a.type===Qn&&!a.el&&(a.el=r.el)}}function FY(t){const e=t.slice(),n=[0];let s,i,o,r,a;const l=t.length;for(s=0;s<l;s++){const c=t[s];if(c!==0){if(i=n[n.length-1],t[i]<c){e[s]=i,n.push(s);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[s]=n[o-1]),n[o]=s)}}for(o=n.length,r=n[o-1];o-- >0;)n[o]=r,r=e[r];return n}function jP(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:jP(e)}function d_(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}function WP(t){if(t.placeholder)return t.placeholder;const e=t.component;return e?WP(e.subTree):null}const h_=t=>t.__isSuspense;let k3=0;const NY={name:"Suspense",__isSuspense:!0,process(t,e,n,s,i,o,r,a,l,c){if(t==null)zY(e,n,s,i,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}HY(t,e,n,s,i,r,a,l,c)}},hydrate:UY,normalize:jY},BY=NY;function Xm(t,e){const n=t.props&&t.props[e];ot(n)&&n()}function zY(t,e,n,s,i,o,r,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),h=t.suspense=YP(t,i,s,e,d,n,o,r,a,l);c(null,h.pendingBranch=t.ssContent,d,null,s,h,o,r),h.deps>0?(Xm(t,"onPending"),Xm(t,"onFallback"),c(null,t.ssFallback,e,n,s,null,o,r),Eh(h,t.ssFallback)):h.resolve(!1,!0)}function HY(t,e,n,s,i,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:b,isHydrating:y}=d;if(m)d.pendingBranch=h,hr(m,h)?(l(m,h,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0?d.resolve():b&&(y||(l(p,f,n,s,i,null,o,r,a),Eh(d,f)))):(d.pendingId=k3++,y?(d.isHydrating=!1,d.activeBranch=m):c(m,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),b?(l(null,h,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0?d.resolve():(l(p,f,n,s,i,null,o,r,a),Eh(d,f))):p&&hr(p,h)?(l(p,h,n,s,i,d,o,r,a),d.resolve(!0)):(l(null,h,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0&&d.resolve()));else if(p&&hr(p,h))l(p,h,n,s,i,d,o,r,a),Eh(d,h);else if(Xm(e,"onPending"),d.pendingBranch=h,h.shapeFlag&512?d.pendingId=h.component.suspenseId:d.pendingId=k3++,l(null,h,d.hiddenContainer,null,i,d,o,r,a),d.deps<=0)d.resolve();else{const{timeout:C,pendingId:k}=d;C>0?setTimeout(()=>{d.pendingId===k&&d.fallback(f)},C):C===0&&d.fallback(f)}}function YP(t,e,n,s,i,o,r,a,l,c,u=!1){const{p:d,m:h,um:f,n:p,o:{parentNode:m,remove:b}}=c;let y;const C=WY(t);C&&e&&e.pendingBranch&&(y=e.pendingId,e.deps++);const k=t.props?i_(t.props.timeout):void 0,x=o,S={vnode:t,parent:e,parentComponent:n,namespace:r,container:s,hiddenContainer:i,deps:0,pendingId:k3++,timeout:typeof k=="number"?k:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(E=!1,T=!1){const{vnode:P,activeBranch:I,pendingBranch:L,pendingId:V,effects:D,parentComponent:z,container:Y,isInFallback:B}=S;let U=!1;S.isHydrating?S.isHydrating=!1:E||(U=I&&L.transition&&L.transition.mode==="out-in",U&&(I.transition.afterLeave=()=>{V===S.pendingId&&(h(L,Y,o===x?p(I):o,0),Wm(D),B&&P.ssFallback&&(P.ssFallback.el=null))}),I&&(m(I.el)===Y&&(o=p(I)),f(I,z,S,!0),!U&&B&&P.ssFallback&&hs(()=>P.ssFallback.el=null,S)),U||h(L,Y,o,0)),Eh(S,L),S.pendingBranch=null,S.isInFallback=!1;let X=S.parent,K=!1;for(;X;){if(X.pendingBranch){X.effects.push(...D),K=!0;break}X=X.parent}!K&&!U&&Wm(D),S.effects=[],C&&e&&e.pendingBranch&&y===e.pendingId&&(e.deps--,e.deps===0&&!T&&e.resolve()),Xm(P,"onResolve")},fallback(E){if(!S.pendingBranch)return;const{vnode:T,activeBranch:P,parentComponent:I,container:L,namespace:V}=S;Xm(T,"onFallback");const D=p(P),z=()=>{S.isInFallback&&(d(null,E,L,D,I,null,V,a,l),Eh(S,E))},Y=E.transition&&E.transition.mode==="out-in";Y&&(P.transition.afterLeave=z),S.isInFallback=!0,f(P,I,null,!0),Y||z()},move(E,T,P){S.activeBranch&&h(S.activeBranch,E,T,P),S.container=E},next(){return S.activeBranch&&p(S.activeBranch)},registerDep(E,T,P){const I=!!S.pendingBranch;I&&S.deps++;const L=E.vnode.el;E.asyncDep.catch(V=>{od(V,E,0)}).then(V=>{if(E.isUnmounted||S.isUnmounted||S.pendingId!==E.suspenseId)return;E.asyncResolved=!0;const{vnode:D}=E;$3(E,V,!1),L&&(D.el=L);const z=!L&&E.subTree.el;T(E,D,m(L||E.subTree.el),L?null:p(E.subTree),S,r,P),z&&(D.placeholder=null,b(z)),Dy(E,D.el),I&&--S.deps===0&&S.resolve()})},unmount(E,T){S.isUnmounted=!0,S.activeBranch&&f(S.activeBranch,n,E,T),S.pendingBranch&&f(S.pendingBranch,n,E,T)}};return S}function UY(t,e,n,s,i,o,r,a,l){const c=e.suspense=YP(e,s,n,t.parentNode,document.createElement("div"),null,i,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 jY(t){const{shapeFlag:e,children:n}=t,s=e&32;t.ssContent=CS(s?n.default:n),t.ssFallback=s?CS(n.fallback):_(Qn)}function CS(t){let e;if(ot(t)){const n=Nu&&t._c;n&&(t._d=!1,v()),t=t(),n&&(t._d=!0,e=oi,qP())}return Le(t)&&(t=MY(t)),t=zi(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function GP(t,e){e&&e.pendingBranch?Le(t)?e.effects.push(...t):e.effects.push(t):Wm(t)}function Eh(t,e){t.activeBranch=e;const{vnode:n,parentComponent:s}=t;let i=e.el;for(;!i&&e.component;)e=e.component.subTree,i=e.el;n.el=i,s&&s.subTree===n&&(s.vnode.el=i,Dy(s,i))}function WY(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const te=Symbol.for("v-fgt"),ra=Symbol.for("v-txt"),Qn=Symbol.for("v-cmt"),xu=Symbol.for("v-stc"),cm=[];let oi=null;function v(t=!1){cm.push(oi=t?null:[])}function qP(){cm.pop(),oi=cm[cm.length-1]||null}let Nu=1;function Km(t,e=!1){Nu+=t,t<0&&oi&&e&&(oi.hasOnce=!0)}function XP(t){return t.dynamicChildren=Nu>0?oi||xh:null,qP(),Nu>0&&oi&&oi.push(t),t}function $(t,e,n,s,i,o){return XP(g(t,e,n,s,i,o,!0))}function R(t,e,n,s,i){return XP(_(t,e,n,s,i,!0))}function Gs(t){return t?t.__v_isVNode===!0:!1}function hr(t,e){return t.type===e.type&&t.key===e.key}function YY(t){}const KP=({key:t})=>t??null,F0=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?nt(t)||hn(t)||ot(t)?{i:Us,r:t,k:e,f:!!n}:t:null);function g(t,e=null,n=null,s=0,i=null,o=t===te?0:1,r=!1,a=!1){const l={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&KP(e),ref:e&&F0(e),scopeId:Py,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:Us};return a?(jk(l,n),o&128&&t.normalize(l)):n&&(l.shapeFlag|=nt(n)?8:16),Nu>0&&!r&&oi&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&oi.push(l),l}const _=GY;function GY(t,e=null,n=null,s=0,i=null,o=!1){if((!t||t===SP)&&(t=Qn),Gs(t)){const a=Tr(t,e,!0);return n&&jk(a,n),Nu>0&&!o&&oi&&(a.shapeFlag&6?oi[oi.indexOf(t)]=a:oi.push(a)),a.patchFlag=-2,a}if(QY(t)&&(t=t.__vccOpts),e){e=Uk(e);let{class:a,style:l}=e;a&&!nt(a)&&(e.class=W(a)),Ct(l)&&(Ng(l)&&!Le(l)&&(l=Zt({},l)),e.style=Ke(l))}const r=nt(t)?1:h_(t)?128:fP(t)?64:Ct(t)?4:ot(t)?2:0;return g(t,e,n,s,i,r,o,!0)}function Uk(t){return t?Ng(t)||OP(t)?Zt({},t):t:null}function Tr(t,e,n=!1,s=!1){const{props:i,ref:o,patchFlag:r,children:a,transition:l}=t,c=e?Mn(i||{},e):i,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&KP(c),ref:e&&e.ref?n&&o?Le(o)?o.concat(F0(e)):[o,F0(e)]:F0(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==te?r===-1?16:r|16:r,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&Tr(t.ssContent),ssFallback:t.ssFallback&&Tr(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&s&&il(u,l.clone(u)),u}function G(t=" ",e=0){return _(ra,null,t,e)}function ya(t,e){const n=_(xu,null,t);return n.staticCount=e,n}function O(t="",e=!1){return e?(v(),R(Qn,null,t)):_(Qn,null,t)}function zi(t){return t==null||typeof t=="boolean"?_(Qn):Le(t)?_(te,null,t.slice()):Gs(t)?Nl(t):_(ra,null,String(t))}function Nl(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:Tr(t)}function jk(t,e){let n=0;const{shapeFlag:s}=t;if(e==null)e=null;else if(Le(e))n=16;else if(typeof e=="object")if(s&65){const i=e.default;i&&(i._c&&(i._d=!1),jk(t,i()),i._c&&(i._d=!0));return}else{n=32;const i=e._;!i&&!OP(e)?e._ctx=Us:i===3&&Us&&(Us.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else ot(e)?(e={default:e,_ctx:Us},n=32):(e=String(e),s&64?(n=16,e=[G(e)]):n=8);t.children=e,t.shapeFlag|=n}function Mn(...t){const e={};for(let n=0;n<t.length;n++){const s=t[n];for(const i in s)if(i==="class")e.class!==s.class&&(e.class=W([e.class,s.class]));else if(i==="style")e.style=Ke([e.style,s.style]);else if(sd(i)){const o=e[i],r=s[i];r&&o!==r&&!(Le(o)&&o.includes(r))&&(e[i]=o?[].concat(o,r):r)}else i!==""&&(e[i]=s[i])}return e}function Ni(t,e,n,s=null){Zo(t,e,7,[n,s])}const qY=EP();let XY=0;function ZP(t,e,n){const s=t.type,i=(e?e.appContext:t.appContext)||qY,o={uid:XY++,vnode:t,type:s,parent:e,appContext:i,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new kk(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(i.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:RP(s,i),emitsOptions:PP(s,i),emit:null,emitted:null,propsDefaults:sn,inheritAttrs:s.inheritAttrs,ctx:sn,data:sn,props:sn,attrs:sn,slots:sn,refs:sn,setupState:sn,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=e?e.root:o,o.emit=$Y.bind(null,o),t.ce&&t.ce(o),o}let Hs=null;const pt=()=>Hs||Us;let f_,x3;{const t=Cy(),e=(n,s)=>{let i;return(i=t[n])||(i=t[n]=[]),i.push(s),o=>{i.length>1?i.forEach(r=>r(o)):i[0](o)}};f_=e("__VUE_INSTANCE_SETTERS__",n=>Hs=n),x3=e("__VUE_SSR_SETTERS__",n=>Gh=n)}const Bu=t=>{const e=Hs;return f_(t),t.scope.on(),()=>{t.scope.off(),f_(e)}},S3=()=>{Hs&&Hs.scope.off(),f_(null)};function JP(t){return t.vnode.shapeFlag&4}let Gh=!1;function QP(t,e=!1,n=!1){e&&x3(e);const{props:s,children:i}=t.vnode,o=JP(t);IY(t,s,o,e),RY(t,i,n||e);const r=o?KY(t,e):void 0;return e&&x3(!1),r}function KY(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,y3);const{setup:s}=n;if(s){nl();const i=t.setupContext=s.length>1?nI(t):null,o=Bu(t),r=Pf(s,t,0,[t.props,i]),a=zm(r);if(sl(),o(),(a||t.sp)&&!Qa(t)&&Ik(t),a){if(r.then(S3,S3),e)return r.then(l=>{$3(t,l,e)}).catch(l=>{od(l,t,0)});t.asyncDep=r}else $3(t,r,e)}else tI(t,e)}function $3(t,e,n){ot(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:Ct(e)&&(t.setupState=Mk(e)),tI(t,n)}let p_,A3;function eI(t){p_=t,A3=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,rY))}}const ZY=()=>!p_;function tI(t,e,n){const s=t.type;if(!t.render){if(!e&&p_&&!s.render){const i=s.template||Nk(t).template;if(i){const{isCustomElement:o,compilerOptions:r}=t.appContext.config,{delimiters:a,compilerOptions:l}=s,c=Zt(Zt({isCustomElement:o,delimiters:a},r),l);s.render=p_(i,c)}}t.render=s.render||Vt,A3&&A3(t)}{const i=Bu(t);nl();try{_Y(t)}finally{sl(),i()}}}const JY={get(t,e){return ni(t,"get",""),t[e]}};function nI(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,JY),slots:t.slots,emit:t.emit,expose:e}}function Hg(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(Mk(Ki(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in lm)return lm[n](t)},has(e,n){return n in e||n in lm}})):t.proxy}function M3(t,e=!0){return ot(t)?t.displayName||t.name:t.name||e&&t.__name}function QY(t){return ot(t)&&"__vccOpts"in t}const q=(t,e)=>CW(t,e,Gh);function gt(t,e,n){try{Km(-1);const s=arguments.length;return s===2?Ct(e)&&!Le(e)?Gs(e)?_(t,null,[e]):_(t,e):_(t,null,e):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Gs(n)&&(n=[n]),_(t,e,n))}finally{Km(1)}}function eG(){}function tG(t,e,n,s){const i=n[s];if(i&&sI(i,t))return i;const o=e();return o.memo=t.slice(),o.cacheIndex=s,n[s]=o}function sI(t,e){const n=t.memo;if(n.length!=e.length)return!1;for(let s=0;s<n.length;s++)if(_i(n[s],e[s]))return!1;return Nu>0&&oi&&oi.push(t),!0}const iI="3.5.27",oI=Vt,nG=PW,sG=Zd,iG=rP,oG={createComponentInstance:ZP,setupComponent:QP,renderComponentRoot:V0,setCurrentRenderingInstance:Gm,isVNode:Gs,normalizeVNode:zi,getComponentPublicInstance:Hg,ensureValidVNode:Fk,pushWarningContext:AW,popWarningContext:MW},rG=oG,aG=null,lG=null,cG=null;/** | |
| 13 | +**/const tI=[];function FY(t){tI.push(t)}function NY(){tI.pop()}function BY(t,e){}const zY={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",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",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"},HY={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",15:"component update",16:"app unmount cleanup function"};function ap(t,e,n,i){try{return i?t(...i):t()}catch(s){Ld(s,e,n)}}function vr(t,e,n,i){if(et(t)){const s=ap(t,e,n,i);return s&&dd(s)&&s.catch(o=>{Ld(o,e,n)}),s}if(Me(t)){const s=[];for(let o=0;o<t.length;o++)s.push(vr(t[o],e,n,i));return s}}function Ld(t,e,n,i=!0){const s=e?e.vnode:null,{errorHandler:o,throwUnhandledErrorInProduction:r}=e&&e.appContext.config||pn;if(e){let a=e.parent;const l=e.proxy,c=`https://vuejs.org/error-reference/#runtime-${n}`;for(;a;){const u=a.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](t,l,c)===!1)return}a=a.parent}if(o){gl(),ap(o,null,10,[t,l,c]),vl();return}}UY(t,n,s,i,r)}function UY(t,e,n,i=!0,s=!1){if(s)throw t;console.error(t)}const Bi=[];let va=-1;const tf=[];let lc=null,xh=0;const nI=Promise.resolve();let Y_=null;function ot(t){const e=Y_||nI;return t?e.then(this?t.bind(this):t):e}function jY(t){let e=va+1,n=Bi.length;for(;e<n;){const i=e+n>>>1,s=Bi[i],o=$g(s);o<t||o===t&&s.flags&2?e=i+1:n=i}return e}function x6(t){if(!(t.flags&1)){const e=$g(t),n=Bi[Bi.length-1];!n||!(t.flags&2)&&e>=$g(n)?Bi.push(t):Bi.splice(jY(e),0,t),t.flags|=1,sI()}}function sI(){Y_||(Y_=nI.then(iI))}function Sg(t){Me(t)?tf.push(...t):lc&&t.id===-1?lc.splice(xh+1,0,t):t.flags&1||(tf.push(t),t.flags|=1),sI()}function m9(t,e,n=va+1){for(;n<Bi.length;n++){const i=Bi[n];if(i&&i.flags&2){if(t&&i.id!==t.uid)continue;Bi.splice(n,1),n--,i.flags&4&&(i.flags&=-2),i(),i.flags&4||(i.flags&=-2)}}}function q_(t){if(tf.length){const e=[...new Set(tf)].sort((n,i)=>$g(n)-$g(i));if(tf.length=0,lc){lc.push(...e);return}for(lc=e,xh=0;xh<lc.length;xh++){const n=lc[xh];n.flags&4&&(n.flags&=-2),n.flags&8||n(),n.flags&=-2}lc=null,xh=0}}const $g=t=>t.id==null?t.flags&2?-1:1/0:t.id;function iI(t){const e=Dt;try{for(va=0;va<Bi.length;va++){const n=Bi[va];n&&!(n.flags&8)&&(n.flags&4&&(n.flags&=-2),ap(n,n.i,n.i?15:14),n.flags&4||(n.flags&=-2))}}finally{for(;va<Bi.length;va++){const n=Bi[va];n&&(n.flags&=-2)}va=-1,Bi.length=0,q_(),Y_=null,(Bi.length||tf.length)&&iI()}}let Sh,Lv=[];function oI(t,e){var n,i;Sh=t,Sh?(Sh.enabled=!0,Lv.forEach(({event:s,args:o})=>Sh.emit(s,...o)),Lv=[]):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=>{oI(o,e)}),setTimeout(()=>{Sh||(e.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Lv=[])},3e3)):Lv=[]}let li=null,bb=null;function Ag(t){const e=li;return li=t,bb=t&&t.type.__scopeId||null,e}function WY(t){bb=t}function YY(){bb=null}const qY=t=>w;function w(t,e=li,n){if(!e||t._n)return t;const i=(...s)=>{i._d&&Tg(-1);const o=Ag(e);let r;try{r=t(...s)}finally{Ag(o),i._d&&Tg(1)}return r};return i._n=!0,i._c=!0,i._d=!0,i}function Re(t,e){if(li===null)return t;const n=$1(li),i=t.dirs||(t.dirs=[]);for(let s=0;s<e.length;s++){let[o,r,a,l=pn]=e[s];o&&(et(o)&&(o={mounted:o,updated:o}),o.deep&&nl(r),i.push({dir:o,instance:n,value:r,oldValue:void 0,arg:a,modifiers:l}))}return t}function ba(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&&(gl(),vr(l,n,8,[t.el,a,t,e]),vl())}}function Pt(t,e){if(oi){let n=oi.provides;const i=oi.parent&&oi.parent.provides;i===n&&(n=oi.provides=Object.create(i)),n[t]=e}}function qe(t,e,n=!1){const i=pt();if(i||Xu){let s=Xu?Xu._context.provides:i?i.parent==null||i.ce?i.vnode.appContext&&i.vnode.appContext.provides:i.parent.provides:void 0;if(s&&t in s)return s[t];if(arguments.length>1)return n&&et(e)?e.call(i&&i.proxy):e}}function rI(){return!!(pt()||Xu)}const aI=Symbol.for("v-scx"),lI=()=>qe(aI);function _l(t,e){return x1(t,null,e)}function GY(t,e){return x1(t,null,{flush:"post"})}function cI(t,e){return x1(t,null,{flush:"sync"})}function Te(t,e,n){return x1(t,e,n)}function x1(t,e,n=pn){const{immediate:i,deep:s,flush:o,once:r}=n,a=cn({},n),l=e&&i||!e&&o!=="post";let c;if(Sf){if(o==="sync"){const f=lI();c=f.__watcherHandles||(f.__watcherHandles=[])}else if(!l){const f=()=>{};return f.stop=Dt,f.resume=Dt,f.pause=Dt,f}}const u=oi;a.call=(f,p,m)=>vr(f,u,p,m);let d=!1;o==="post"?a.scheduler=f=>{Es(f,u&&u.suspense)}:o!=="sync"&&(d=!0,a.scheduler=(f,p)=>{p?f():x6(f)}),a.augmentJob=f=>{e&&(f.flags|=4),d&&(f.flags|=2,u&&(f.id=u.uid,f.i=u))};const h=VY(t,e,a);return Sf&&(c?c.push(h):l&&h()),h}function XY(t,e,n){const i=this.proxy,s=Ke(t)?t.includes(".")?uI(i,t):()=>i[t]:t.bind(i,i);let o;et(e)?o=e:(o=e.handler,n=e);const r=pd(this),a=x1(s,o.bind(i),n);return r(),a}function uI(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}}const dI=Symbol("_vte"),hI=t=>t.__isTeleport,Um=t=>t&&(t.disabled||t.disabled===""),g9=t=>t&&(t.defer||t.defer===""),v9=t=>typeof SVGElement<"u"&&t instanceof SVGElement,_9=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,pk=(t,e)=>{const n=t&&t.to;return Ke(n)?e?e(n):null:n},fI={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=Um(e.props);let{shapeFlag:k,children:C,dynamicChildren:$}=e;if(t==null){const S=e.el=m(""),M=e.anchor=m("");f(S,n,i),f(M,n,i);const P=(I,L)=>{k&16&&u(C,I,L,s,o,r,a,l)},T=()=>{const I=e.target=pk(e.props,p),L=pI(I,e,m,f);I&&(r!=="svg"&&v9(I)?r="svg":r!=="mathml"&&_9(I)&&(r="mathml"),s&&s.isCE&&(s.ce._teleportTargets||(s.ce._teleportTargets=new Set)).add(I),b||(P(I,L),x0(e,!1)))};b&&(P(n,M),x0(e,!0)),g9(e.props)?(e.el.__isMounted=!1,Es(()=>{T(),delete e.el.__isMounted},o)):T()}else{if(g9(e.props)&&t.el.__isMounted===!1){Es(()=>{fI.process(t,e,n,i,s,o,r,a,l,c)},o);return}e.el=t.el,e.targetStart=t.targetStart;const S=e.anchor=t.anchor,M=e.target=t.target,P=e.targetAnchor=t.targetAnchor,T=Um(t.props),I=T?n:M,L=T?S:P;if(r==="svg"||v9(M)?r="svg":(r==="mathml"||_9(M))&&(r="mathml"),$?(h(t.dynamicChildren,$,I,s,o,r,a),R6(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):Ov(e,n,S,c,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const R=e.target=pk(e.props,p);R&&Ov(e,R,null,c,0)}else T&&Ov(e,M,P,c,1);x0(e,b)}},remove(t,e,n,{um:i,o:{remove:s}},o){const{shapeFlag:r,children:a,anchor:l,targetStart:c,targetAnchor:u,target:d,props:h}=t;if(d&&(s(c),s(u)),o&&s(l),r&16){const f=o||!Um(h);for(let p=0;p<a.length;p++){const m=a[p];i(m,e,n,f,!!m.dynamicChildren)}}},move:Ov,hydrate:KY};function Ov(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||Um(u))&&l&16)for(let h=0;h<c.length;h++)s(c[h],e,n,2);d&&i(a,e,n)}function KY(t,e,n,i,s,o,{o:{nextSibling:r,parentNode:a,querySelector:l,insert:c,createText:u}},d){function h(m,y,b,k){y.anchor=d(r(m),y,a(m),n,i,s,o),y.targetStart=b,y.targetAnchor=k}const f=e.target=pk(e.props,l),p=Um(e.props);if(f){const m=f._lpa||f.firstChild;if(e.shapeFlag&16)if(p)h(t,e,m,m&&r(m));else{e.anchor=r(t);let y=m;for(;y;){if(y&&y.nodeType===8){if(y.data==="teleport start anchor")e.targetStart=y;else if(y.data==="teleport anchor"){e.targetAnchor=y,f._lpa=e.targetAnchor&&r(e.targetAnchor);break}}y=r(y)}e.targetAnchor||pI(f,e,u,c),d(m&&r(m),e,f,n,i,s,o)}x0(e,p)}else p&&e.shapeFlag&16&&h(t,e,t,r(t));return e.anchor&&r(e.anchor)}const ea=fI;function x0(t,e){const n=t.ctx;if(n&&n.ut){let i,s;for(e?(i=t.el,s=t.anchor):(i=t.targetStart,s=t.targetAnchor);i&&i!==s;)i.nodeType===1&&i.setAttribute("data-v-owner",n.uid),i=i.nextSibling;n.ut()}}function pI(t,e,n,i){const s=e.targetStart=n(""),o=e.targetAnchor=n("");return s[dI]=o,t&&(i(s,t),i(o,t)),o}const Ja=Symbol("_leaveCb"),Dv=Symbol("_enterCb");function S6(){const t={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Ft(()=>{t.isMounted=!0}),wn(()=>{t.isUnmounting=!0}),t}const Zo=[Function,Array],$6={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:Zo,onEnter:Zo,onAfterEnter:Zo,onEnterCancelled:Zo,onBeforeLeave:Zo,onLeave:Zo,onAfterLeave:Zo,onLeaveCancelled:Zo,onBeforeAppear:Zo,onAppear:Zo,onAfterAppear:Zo,onAppearCancelled:Zo},mI=t=>{const e=t.subTree;return e.component?mI(e.component):e},ZY={name:"BaseTransition",props:$6,setup(t,{slots:e}){const n=pt(),i=S6();return()=>{const s=e.default&&wb(e.default(),!0);if(!s||!s.length)return;const o=gI(s),r=an(t),{mode:a}=r;if(i.isLeaving)return lw(o);const l=y9(o);if(!l)return lw(o);let c=xf(l,r,i,n,d=>c=d);l.type!==Zn&&yl(l,c);let u=n.subTree&&y9(n.subTree);if(u&&u.type!==Zn&&!Ir(u,l)&&mI(n).type!==Zn){let d=xf(u,r,i,n);if(yl(u,d),a==="out-in"&&l.type!==Zn)return i.isLeaving=!0,d.afterLeave=()=>{i.isLeaving=!1,n.job.flags&8||n.update(),delete d.afterLeave,u=void 0},lw(o);a==="in-out"&&l.type!==Zn?d.delayLeave=(h,f,p)=>{const m=_I(i,u);m[String(u.key)]=u,h[Ja]=()=>{f(),h[Ja]=void 0,delete c.delayedLeave,u=void 0},c.delayedLeave=()=>{p(),delete c.delayedLeave,u=void 0}}:u=void 0}else u&&(u=void 0);return o}}};function gI(t){let e=t[0];if(t.length>1){for(const n of t)if(n.type!==Zn){e=n;break}}return e}const vI=ZY;function _I(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 xf(t,e,n,i,s){const{appear:o,mode:r,persisted:a=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:f,onAfterLeave:p,onLeaveCancelled:m,onBeforeAppear:y,onAppear:b,onAfterAppear:k,onAppearCancelled:C}=e,$=String(t.key),S=_I(n,t),M=(I,L)=>{I&&vr(I,i,9,L)},P=(I,L)=>{const R=L[1];M(I,L),Me(I)?I.every(V=>V.length<=1)&&R():I.length<=1&&R()},T={mode:r,persisted:a,beforeEnter(I){let L=l;if(!n.isMounted)if(o)L=y||l;else return;I[Ja]&&I[Ja](!0);const R=S[$];R&&Ir(t,R)&&R.el[Ja]&&R.el[Ja](),M(L,[I])},enter(I){let L=c,R=u,V=d;if(!n.isMounted)if(o)L=b||c,R=k||u,V=C||d;else return;let B=!1;const F=I[Dv]=z=>{B||(B=!0,z?M(V,[I]):M(R,[I]),T.delayedLeave&&T.delayedLeave(),I[Dv]=void 0)};L?P(L,[I,F]):F()},leave(I,L){const R=String(t.key);if(I[Dv]&&I[Dv](!0),n.isUnmounting)return L();M(h,[I]);let V=!1;const B=I[Ja]=F=>{V||(V=!0,L(),F?M(m,[I]):M(p,[I]),I[Ja]=void 0,S[R]===t&&delete S[R])};S[R]=t,f?P(f,[I,B]):B()},clone(I){const L=xf(I,e,n,i,s);return s&&s(L),L}};return T}function lw(t){if(S1(t))return t=_r(t),t.children=null,t}function y9(t){if(!S1(t))return hI(t.type)&&t.children?gI(t.children):t;if(t.component)return t.component.subTree;const{shapeFlag:e,children:n}=t;if(n){if(e&16)return n[0];if(e&32&&et(n.default))return n.default()}}function yl(t,e){t.shapeFlag&6&&t.component?(t.transition=e,yl(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 wb(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(wb(r.children,e,a))):(e||r.type!==Zn)&&i.push(a!=null?_r(r,{key:a}):r)}if(s>1)for(let o=0;o<i.length;o++)i[o].patchFlag=-2;return i}function fe(t,e){return et(t)?(()=>cn({name:t.name},e,{setup:t}))():t}function JY(){const t=pt();return t?(t.appContext.config.idPrefix||"v")+"-"+t.ids[0]+t.ids[1]++:""}function A6(t){t.ids=[t.ids[0]+t.ids[2]+++"-",0,0]}function QY(t){const e=pt(),n=Fn(null);if(e){const s=e.refs===pn?e.refs={}:e.refs;Object.defineProperty(s,t,{enumerable:!0,get:()=>n.value,set:o=>n.value=o})}return n}const G_=new WeakMap;function nf(t,e,n,i,s=!1){if(Me(t)){t.forEach((p,m)=>nf(p,e&&(Me(e)?e[m]:e),n,i,s));return}if(dl(i)&&!s){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&nf(t,e,n,i.component.subTree);return}const o=i.shapeFlag&4?$1(i.component):i.el,r=s?null:o,{i:a,r:l}=t,c=e&&e.r,u=a.refs===pn?a.refs={}:a.refs,d=a.setupState,h=an(d),f=d===pn?qh:p=>zt(h,p);if(c!=null&&c!==l){if(b9(e),Ke(c))u[c]=null,f(c)&&(d[c]=null);else if(hn(c)){c.value=null;const p=e;p.k&&(u[p.k]=null)}}if(et(l))ap(l,a,12,[r,u]);else{const p=Ke(l),m=hn(l);if(p||m){const y=()=>{if(t.f){const b=p?f(l)?d[l]:u[l]:l.value;if(s)Me(b)&&v6(b,o);else if(Me(b))b.includes(o)||b.push(o);else if(p)u[l]=[o],f(l)&&(d[l]=u[l]);else{const k=[o];l.value=k,t.k&&(u[t.k]=k)}}else p?(u[l]=r,f(l)&&(d[l]=r)):m&&(l.value=r,t.k&&(u[t.k]=r))};if(r){const b=()=>{y(),G_.delete(t)};b.id=-1,G_.set(t,b),Es(b,n)}else b9(t),y()}}}function b9(t){const e=G_.get(t);e&&(e.flags|=8,G_.delete(t))}let w9=!1;const ih=()=>{w9||(console.error("Hydration completed but contains mismatches."),w9=!0)},eq=t=>t.namespaceURI.includes("svg")&&t.tagName!=="foreignObject",tq=t=>t.namespaceURI.includes("MathML"),Rv=t=>{if(t.nodeType===1){if(eq(t))return"svg";if(tq(t))return"mathml"}},Gh=t=>t.nodeType===8;function nq(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,$),q_(),$._vnode=C;return}d($.firstChild,C,null,null,null),q_(),$._vnode=C},d=(C,$,S,M,P,T=!1)=>{T=T||!!$.dynamicChildren;const I=Gh(C)&&C.data==="[",L=()=>m(C,$,S,M,P,I),{type:R,ref:V,shapeFlag:B,patchFlag:F}=$;let z=C.nodeType;$.el=C,F===-2&&(T=!1,$.dynamicChildren=null);let U=null;switch(R){case xa:z!==3?$.children===""?(l($.el=s(""),r(C),C),U=C):U=L():(C.data!==$.children&&(ih(),C.data=$.children),U=o(C));break;case Zn:k(C)?(U=o(C),b($.el=C.content.firstChild,C,S)):z!==8||I?U=L():U=o(C);break;case Ku:if(I&&(C=o(C),z=C.nodeType),z===1||z===3){U=C;const G=!$.children.length;for(let K=0;K<$.staticCount;K++)G&&($.children+=U.nodeType===1?U.outerHTML:U.data),K===$.staticCount-1&&($.anchor=U),U=o(U);return I?o(U):U}else L();break;case ee:I?U=p(C,$,S,M,P,T):U=L();break;default:if(B&1)(z!==1||$.type.toLowerCase()!==C.tagName.toLowerCase())&&!k(C)?U=L():U=h(C,$,S,M,P,T);else if(B&6){$.slotScopeIds=P;const G=r(C);if(I?U=y(C):Gh(C)&&C.data==="teleport start"?U=y(C,C.data,"teleport end"):U=o(C),e($,G,null,S,M,Rv(G),T),dl($)&&!$.type.__asyncResolved){let K;I?(K=_(ee),K.anchor=U?U.previousSibling:G.lastChild):K=C.nodeType===3?N(""):_("div"),K.el=C,$.component.subTree=K}}else B&64?z!==8?U=L():U=$.type.hydrate(C,$,S,M,P,T,t,f):B&128&&(U=$.type.hydrate(C,$,S,M,Rv(r(C)),P,T,t,d))}return V!=null&&nf(V,null,M,$),U},h=(C,$,S,M,P,T)=>{T=T||!!$.dynamicChildren;const{type:I,props:L,patchFlag:R,shapeFlag:V,dirs:B,transition:F}=$,z=I==="input"||I==="option";if(z||R!==-1){B&&ba($,null,S,"created");let U=!1;if(k(C)){U=zI(null,F)&&S&&S.vnode.props&&S.vnode.props.appear;const K=C.content.firstChild;if(U){const X=K.getAttribute("class");X&&(K.$cls=X),F.beforeEnter(K)}b(K,C,S),$.el=C=K}if(V&16&&!(L&&(L.innerHTML||L.textContent))){let K=f(C.firstChild,$,C,S,M,P,T);for(;K;){Vv(C,1)||ih();const X=K;K=K.nextSibling,a(X)}}else if(V&8){let K=$.children;K[0]===` | |
| 14 | +`&&(C.tagName==="PRE"||C.tagName==="TEXTAREA")&&(K=K.slice(1));const{textContent:X}=C;X!==K&&X!==K.replace(/\r\n|\r/g,` | |
| 15 | +`)&&(Vv(C,0)||ih(),C.textContent=$.children)}if(L){if(z||!T||R&48){const K=C.tagName.includes("-");for(const X in L)(z&&(X.endsWith("value")||X==="indeterminate")||Pd(X)&&!ul(X)||X[0]==="."||K&&!ul(X))&&i(C,X,null,L[X],void 0,S)}else if(L.onClick)i(C,"onClick",null,L.onClick,void 0,S);else if(R&4&&Fr(L.style))for(const K in L.style)L.style[K]}let G;(G=L&&L.onVnodeBeforeMount)&&oo(G,S,$),B&&ba($,null,S,"beforeMount"),((G=L&&L.onVnodeMounted)||B||U)&&WI(()=>{G&&oo(G,S,$),U&&F.enter(C),B&&ba($,null,S,"mounted")},M)}return C.nextSibling},f=(C,$,S,M,P,T,I)=>{I=I||!!$.dynamicChildren;const L=$.children,R=L.length;for(let V=0;V<R;V++){const B=I?L[V]:L[V]=ro(L[V]),F=B.type===xa;C?(F&&!I&&V+1<R&&ro(L[V+1]).type===xa&&(l(s(C.data.slice(B.children.length)),S,o(C)),C.data=B.children),C=d(C,B,M,P,T,I)):F&&!B.children?l(B.el=s(""),S):(Vv(S,1)||ih(),n(null,B,S,null,M,P,Rv(S),T))}return C},p=(C,$,S,M,P,T)=>{const{slotScopeIds:I}=$;I&&(P=P?P.concat(I):I);const L=r(C),R=f(o(C),$,L,S,M,P,T);return R&&Gh(R)&&R.data==="]"?o($.anchor=R):(ih(),l($.anchor=c("]"),L,R),R)},m=(C,$,S,M,P,T)=>{if(Vv(C.parentElement,1)||ih(),$.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,S,M,Rv(L),P),S&&(S.vnode.el=$.el,$b(S,$.el)),I},y=(C,$="[",S="]")=>{let M=0;for(;C;)if(C=o(C),C&&Gh(C)&&(C.data===$&&M++,C.data===S)){if(M===0)return o(C);M--}return C},b=(C,$,S)=>{const M=$.parentNode;M&&M.replaceChild(C,$);let P=S;for(;P;)P.vnode.el===$&&(P.vnode.el=P.subTree.el=C),P=P.parent},k=C=>C.nodeType===1&&C.tagName==="TEMPLATE";return[u,d]}const k9="data-allow-mismatch",sq={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Vv(t,e){if(e===0||e===1)for(;t&&!t.hasAttribute(k9);)t=t.parentElement;const n=t&&t.getAttribute(k9);if(n==null)return!1;if(n==="")return!0;{const i=n.split(",");return e===0&&i.includes("children")?!0:i.includes(sq[e])}}const iq=db().requestIdleCallback||(t=>setTimeout(t,1)),oq=db().cancelIdleCallback||(t=>clearTimeout(t)),rq=(t=1e4)=>e=>{const n=iq(e,{timeout:t});return()=>oq(n)};function aq(t){const{top:e,left:n,bottom:i,right:s}=t.getBoundingClientRect(),{innerHeight:o,innerWidth:r}=window;return(e>0&&e<o||i>0&&i<o)&&(n>0&&n<r||s>0&&s<r)}const lq=t=>(e,n)=>{const i=new IntersectionObserver(s=>{for(const o of s)if(o.isIntersecting){i.disconnect(),e();break}},t);return n(s=>{if(s instanceof Element){if(aq(s))return e(),i.disconnect(),!1;i.observe(s)}}),()=>i.disconnect()},cq=t=>e=>{if(t){const n=matchMedia(t);if(n.matches)e();else return n.addEventListener("change",e,{once:!0}),()=>n.removeEventListener("change",e)}},uq=(t=[])=>(e,n)=>{Ke(t)&&(t=[t]);let i=!1;const s=r=>{i||(i=!0,o(),e(),r.target.dispatchEvent(new r.constructor(r.type,r)))},o=()=>{n(r=>{for(const a of t)r.removeEventListener(a,s)})};return n(r=>{for(const a of t)r.addEventListener(a,s,{once:!0})}),o};function dq(t,e){if(Gh(t)&&t.data==="["){let n=1,i=t.nextSibling;for(;i;){if(i.nodeType===1){if(e(i)===!1)break}else if(Gh(i))if(i.data==="]"){if(--n===0)break}else i.data==="["&&n++;i=i.nextSibling}}else e(t)}const dl=t=>!!t.type.__asyncLoader;function hq(t){et(t)&&(t={loader:t});const{loader:e,loadingComponent:n,errorComponent:i,delay:s=200,hydrate:o,timeout:r,suspensible:a=!0,onError:l}=t;let c=null,u,d=0;const h=()=>(d++,c=null,f()),f=()=>{let p;return c||(p=c=e().catch(m=>{if(m=m instanceof Error?m:new Error(String(m)),l)return new Promise((y,b)=>{l(m,()=>y(h()),()=>b(m),d+1)});throw m}).then(m=>p!==c&&c?c:(m&&(m.__esModule||m[Symbol.toStringTag]==="Module")&&(m=m.default),u=m,m)))};return fe({name:"AsyncComponentWrapper",__asyncLoader:f,__asyncHydrate(p,m,y){let b=!1;(m.bu||(m.bu=[])).push(()=>b=!0);const k=()=>{b||y()},C=o?()=>{const $=o(k,S=>dq(p,S));$&&(m.bum||(m.bum=[])).push($)}:k;u?C():f().then(()=>!m.isUnmounted&&C())},get __asyncResolved(){return u},setup(){const p=oi;if(A6(p),u)return()=>Fv(u,p);const m=C=>{c=null,Ld(C,p,13,!i)};if(a&&p.suspense||Sf)return f().then(C=>()=>Fv(C,p)).catch(C=>(m(C),()=>i?_(i,{error:C}):null));const y=J(!1),b=J(),k=J(!!s);return s&&setTimeout(()=>{k.value=!1},s),r!=null&&setTimeout(()=>{if(!y.value&&!b.value){const C=new Error(`Async component timed out after ${r}ms.`);m(C),b.value=C}},r),f().then(()=>{y.value=!0,p.parent&&S1(p.parent.vnode)&&p.parent.update()}).catch(C=>{m(C),b.value=C}),()=>{if(y.value&&u)return Fv(u,p);if(b.value&&i)return _(i,{error:b.value});if(n&&!k.value)return Fv(n,p)}}})}function Fv(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 S1=t=>t.type.__isKeepAlive,fq={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(t,{slots:e}){const n=pt(),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,$,S,M)=>{const P=k.component;c(k,C,$,0,a),l(P.vnode,k,C,$,P,a,S,k.slotScopeIds,M),Es(()=>{P.isDeactivated=!1,P.a&&Qh(P.a);const T=k.props&&k.props.onVnodeMounted;T&&oo(T,P.parent,k)},a)},i.deactivate=k=>{const C=k.component;K_(C.m),K_(C.a),c(k,h,null,1,a),Es(()=>{C.da&&Qh(C.da);const $=k.props&&k.props.onVnodeUnmounted;$&&oo($,C.parent,k),C.isDeactivated=!0},a)};function f(k){cw(k),u(k,n,a,!0)}function p(k){s.forEach((C,$)=>{const S=Sk(dl(C)?C.type.__asyncResolved||{}:C.type);S&&!k(S)&&m($)})}function m(k){const C=s.get(k);C&&(!r||!Ir(C,r))?f(C):r&&cw(r),s.delete(k),o.delete(k)}Te(()=>[t.include,t.exclude],([k,C])=>{k&&p($=>em(k,$)),C&&p($=>!em(C,$))},{flush:"post",deep:!0});let y=null;const b=()=>{y!=null&&(Z_(n.subTree.type)?Es(()=>{s.set(y,Nv(n.subTree))},n.subTree.suspense):s.set(y,Nv(n.subTree)))};return Ft(b),xl(b),wn(()=>{s.forEach(k=>{const{subTree:C,suspense:$}=n,S=Nv(C);if(k.type===S.type&&k.key===S.key){cw(S);const M=S.component.da;M&&Es(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(!is(C)||!(C.shapeFlag&4)&&!(C.shapeFlag&128))return r=null,C;let $=Nv(C);if($.type===Zn)return r=null,$;const S=$.type,M=Sk(dl($)?$.type.__asyncResolved||{}:S),{include:P,exclude:T,max:I}=t;if(P&&(!M||!em(P,M))||T&&M&&em(T,M))return $.shapeFlag&=-257,r=$,C;const L=$.key==null?S:$.key,R=s.get(L);return $.el&&($=_r($),C.shapeFlag&128&&(C.ssContent=$)),y=L,R?($.el=R.el,$.component=R.component,$.transition&&yl($,$.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=$,Z_(C.type)?C:$}}},pq=fq;function em(t,e){return Me(t)?t.some(n=>em(n,e)):Ke(t)?t.split(",").includes(e):RW(t)?(t.lastIndex=0,t.test(e)):!1}function E6(t,e){yI(t,"a",e)}function M6(t,e){yI(t,"da",e)}function yI(t,e,n=oi){const i=t.__wdc||(t.__wdc=()=>{let s=n;for(;s;){if(s.isDeactivated)return;s=s.parent}return t()});if(kb(e,i,n),n){let s=n.parent;for(;s&&s.parent;)S1(s.parent.vnode)&&mq(i,e,n,s),s=s.parent}}function mq(t,e,n,i){const s=kb(e,t,i,!0);Sl(()=>{v6(i[e],s)},n)}function cw(t){t.shapeFlag&=-257,t.shapeFlag&=-513}function Nv(t){return t.shapeFlag&128?t.ssContent:t}function kb(t,e,n=oi,i=!1){if(n){const s=n[t]||(n[t]=[]),o=e.__weh||(e.__weh=(...r)=>{gl();const a=pd(n),l=vr(e,n,t,r);return a(),vl(),l});return i?s.unshift(o):s.push(o),o}}const Cl=t=>(e,n=oi)=>{(!Sf||t==="sp")&&kb(t,(...i)=>e(...i),n)},Od=Cl("bm"),Ft=Cl("m"),Cb=Cl("bu"),xl=Cl("u"),wn=Cl("bum"),Sl=Cl("um"),bI=Cl("sp"),wI=Cl("rtg"),kI=Cl("rtc");function CI(t,e=oi){kb("ec",t,e)}const T6="components",gq="directives";function H(t,e){return P6(T6,t,!0,e)||t}const xI=Symbol.for("v-ndc");function Ct(t){return Ke(t)?P6(T6,t,!1)||t:t||xI}function xt(t){return P6(gq,t)}function P6(t,e,n=!0,i=!1){const s=li||oi;if(s){const o=s.type;if(t===T6){const a=Sk(o,!1);if(a&&(a===e||a===Un(e)||a===Gc(Un(e))))return o}const r=C9(s[t]||o[t],e)||C9(s.appContext[t],e);return!r&&i?o:r}}function C9(t,e){return t&&(t[e]||t[Un(e)]||t[Gc(Un(e))])}function we(t,e,n,i){let s;const o=n&&n[i],r=Me(t);if(r||Ke(t)){const a=r&&Fr(t);let l=!1,c=!1;a&&(l=!uo(t),c=Aa(t),t=vb(t)),s=new Array(t.length);for(let u=0,d=t.length;u<d;u++)s[u]=e(l?c?Cf(Gr(t[u])):Gr(t[u]):t[u],u,void 0,o&&o[u])}else if(typeof t=="number"){s=new Array(t);for(let a=0;a<t;a++)s[a]=e(a+1,a,void 0,o&&o[a])}else if(yt(t))if(t[Symbol.iterator])s=Array.from(t,(a,l)=>e(a,l,void 0,o&&o[l]));else{const a=Object.keys(t);s=new Array(a.length);for(let l=0,c=a.length;l<c;l++){const u=a[l];s[l]=e(t[u],u,l,o&&o[l])}}else s=[];return n&&(n[i]=s),s}function hs(t,e){for(let n=0;n<e.length;n++){const i=e[n];if(Me(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(li.ce||li.parent&&dl(li.parent)&&li.parent.ce){const c=Object.keys(n).length>0;return e!=="default"&&(n.name=e),v(),D(ee,null,[_("slot",n,i&&i())],c?-2:64)}let o=t[e];o&&o._c&&(o._d=!1),v();const r=o&&I6(o(n)),a=n.key||r&&r.key,l=D(ee,{key:(a&&!mo(a)?a:`_${e}`)+(!r&&i?"_fb":"")},r||(i?i():[]),r&&t._===1?64:-2);return!s&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}function I6(t){return t.some(e=>is(e)?!(e.type===Zn||e.type===ee&&!I6(e.children)):!0)?t:null}function xb(t,e){const n={};for(const i in t)n[e&&/[A-Z]/.test(i)?`on:${i}`:qu(i)]=t[i];return n}const mk=t=>t?KI(t)?$1(t):mk(t.parent):null,jm=cn(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=>mk(t.parent),$root:t=>mk(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>L6(t),$forceUpdate:t=>t.f||(t.f=()=>{x6(t.update)}),$nextTick:t=>t.n||(t.n=ot.bind(t.proxy)),$watch:t=>XY.bind(t)}),uw=(t,e)=>t!==pn&&!t.__isScriptSetup&&zt(t,e),gk={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;if(e[0]!=="$"){const h=r[e];if(h!==void 0)switch(h){case 1:return i[e];case 2:return s[e];case 4:return n[e];case 3:return o[e]}else{if(uw(i,e))return r[e]=1,i[e];if(s!==pn&&zt(s,e))return r[e]=2,s[e];if(zt(o,e))return r[e]=3,o[e];if(n!==pn&&zt(n,e))return r[e]=4,n[e];vk&&(r[e]=0)}}const c=jm[e];let u,d;if(c)return e==="$attrs"&&$i(t.attrs,"get",""),c(t);if((u=a.__cssModules)&&(u=u[e]))return u;if(n!==pn&&zt(n,e))return r[e]=4,n[e];if(d=l.config.globalProperties,zt(d,e))return d[e]},set({_:t},e,n){const{data:i,setupState:s,ctx:o}=t;return uw(s,e)?(s[e]=n,!0):i!==pn&&zt(i,e)?(i[e]=n,!0):zt(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,props:o,type:r}},a){let l;return!!(n[a]||t!==pn&&a[0]!=="$"&&zt(t,a)||uw(e,a)||zt(o,a)||zt(i,a)||zt(jm,a)||zt(s.config.globalProperties,a)||(l=r.__cssModules)&&l[a])},defineProperty(t,e,n){return n.get!=null?t._.accessCache[e]=0:zt(n,"value")&&this.set(t,e,n.value,null),Reflect.defineProperty(t,e,n)}},vq=cn({},gk,{get(t,e){if(e!==Symbol.unscopables)return gk.get(t,e,t)},has(t,e){return e[0]!=="_"&&!UW(e)}});function _q(){return null}function yq(){return null}function bq(t){}function wq(t){}function kq(){return null}function Cq(){}function xq(t,e){return null}function mi(){return SI().slots}function Dd(){return SI().attrs}function SI(t){const e=pt();return e.setupContext||(e.setupContext=eL(e))}function Eg(t){return Me(t)?t.reduce((e,n)=>(e[n]=null,e),{}):t}function Sq(t,e){const n=Eg(t);for(const i in e){if(i.startsWith("__skip"))continue;let s=n[i];s?Me(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 $q(t,e){return!t||!e?t||e:Me(t)&&Me(e)?t.concat(e):cn({},Eg(t),Eg(e))}function Aq(t,e){const n={};for(const i in t)e.includes(i)||Object.defineProperty(n,i,{enumerable:!0,get:()=>t[i]});return n}function Eq(t){const e=pt();let n=t();return kk(),dd(n)&&(n=n.catch(i=>{throw pd(e),i})),[n,()=>pd(e)]}let vk=!0;function Mq(t){const e=L6(t),n=t.proxy,i=t.ctx;vk=!1,e.beforeCreate&&x9(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:S,renderTracked:M,renderTriggered:P,errorCaptured:T,serverPrefetch:I,expose:L,inheritAttrs:R,components:V,directives:B,filters:F}=e;if(c&&Tq(c,i,null),r)for(const G in r){const K=r[G];et(K)&&(i[G]=K.bind(n))}if(s){const G=s.call(n,n);yt(G)&&(t.data=In(G))}if(vk=!0,o)for(const G in o){const K=o[G],X=et(K)?K.bind(n,n):et(K.get)?K.get.bind(n,n):Dt,W=!et(K)&&et(K.set)?K.set.bind(n):Dt,Q=Y({get:X,set:W});Object.defineProperty(i,G,{enumerable:!0,configurable:!0,get:()=>Q.value,set:ne=>Q.value=ne})}if(a)for(const G in a)$I(a[G],i,n,G);if(l){const G=et(l)?l.call(n):l;Reflect.ownKeys(G).forEach(K=>{Pt(K,G[K])})}u&&x9(u,t,"c");function U(G,K){Me(K)?K.forEach(X=>G(X.bind(n))):K&&G(K.bind(n))}if(U(Od,d),U(Ft,h),U(Cb,f),U(xl,p),U(E6,m),U(M6,y),U(CI,T),U(kI,M),U(wI,P),U(wn,k),U(Sl,$),U(bI,I),Me(L))if(L.length){const G=t.exposed||(t.exposed={});L.forEach(K=>{Object.defineProperty(G,K,{get:()=>n[K],set:X=>n[K]=X,enumerable:!0})})}else t.exposed||(t.exposed={});S&&t.render===Dt&&(t.render=S),R!=null&&(t.inheritAttrs=R),V&&(t.components=V),B&&(t.directives=B),I&&A6(t)}function Tq(t,e,n=Dt){Me(t)&&(t=_k(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),hn(o)?Object.defineProperty(e,i,{enumerable:!0,configurable:!0,get:()=>o.value,set:r=>o.value=r}):e[i]=o}}function x9(t,e,n){vr(Me(t)?t.map(i=>i.bind(e.proxy)):t.bind(e.proxy),e,n)}function $I(t,e,n,i){let s=i.includes(".")?uI(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(Me(t))t.forEach(o=>$I(o,e,n,i));else{const o=et(t.handler)?t.handler.bind(n):e[t.handler];et(o)&&Te(s,o,t)}}function L6(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=>X_(l,c,r,!0)),X_(l,e,r)),yt(e)&&o.set(e,l),l}function X_(t,e,n,i=!1){const{mixins:s,extends:o}=e;o&&X_(t,o,n,!0),s&&s.forEach(r=>X_(t,r,n,!0));for(const r in e)if(!(i&&r==="expose")){const a=Pq[r]||n&&n[r];t[r]=a?a(t[r],e[r]):e[r]}return t}const Pq={data:S9,props:$9,emits:$9,methods:tm,computed:tm,beforeCreate:Vi,created:Vi,beforeMount:Vi,mounted:Vi,beforeUpdate:Vi,updated:Vi,beforeDestroy:Vi,beforeUnmount:Vi,destroyed:Vi,unmounted:Vi,activated:Vi,deactivated:Vi,errorCaptured:Vi,serverPrefetch:Vi,components:tm,directives:tm,watch:Lq,provide:S9,inject:Iq};function S9(t,e){return e?t?function(){return cn(et(t)?t.call(this,this):t,et(e)?e.call(this,this):e)}:e:t}function Iq(t,e){return tm(_k(t),_k(e))}function _k(t){if(Me(t)){const e={};for(let n=0;n<t.length;n++)e[t[n]]=t[n];return e}return t}function Vi(t,e){return t?[...new Set([].concat(t,e))]:e}function tm(t,e){return t?cn(Object.create(null),t,e):e}function $9(t,e){return t?Me(t)&&Me(e)?[...new Set([...t,...e])]:cn(Object.create(null),Eg(t),Eg(e??{})):e}function Lq(t,e){if(!t)return e;if(!e)return t;const n=cn(Object.create(null),t);for(const i in e)n[i]=Vi(t[i],e[i]);return n}function AI(){return{app:null,config:{isNativeTag:qh,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 Oq=0;function Dq(t,e){return function(i,s=null){et(i)||(i=cn({},i)),s!=null&&!yt(s)&&(s=null);const o=AI(),r=new WeakSet,a=[];let l=!1;const c=o.app={_uid:Oq++,_component:i,_props:s,_container:null,_context:o,_instance:null,version:nL,get config(){return o.config},set config(u){},use(u,...d){return r.has(u)||(u&&et(u.install)?(r.add(u),u.install(c,...d)):et(u)&&(r.add(u),u(c,...d))),c},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),c},component(u,d){return d?(o.components[u]=d,c):o.components[u]},directive(u,d){return d?(o.directives[u]=d,c):o.directives[u]},mount(u,d,h){if(!l){const f=c._ceVNode||_(i,s);return f.appContext=o,h===!0?h="svg":h===!1&&(h=void 0),d&&e?e(f,u):t(f,u,h),l=!0,c._container=u,u.__vue_app__=c,$1(f.component)}},onUnmount(u){a.push(u)},unmount(){l&&(vr(a,c._instance,16),t(null,c._container),delete c._container.__vue_app__)},provide(u,d){return o.provides[u]=d,c},runWithContext(u){const d=Xu;Xu=c;try{return u()}finally{Xu=d}}};return c}}let Xu=null;function Rq(t,e,n=pn){const i=pt(),s=Un(e),o=zi(e),r=EI(t,s),a=JP((l,c)=>{let u,d=pn,h;return cI(()=>{const f=t[s];Ni(u,f)&&(u=f,c())}),{get(){return l(),n.get?n.get(u):u},set(f){const p=n.set?n.set(f):f;if(!Ni(p,u)&&!(d!==pn&&Ni(f,d)))return;const m=i.vnode.props;m&&(e in m||s in m||o in m)&&(`onUpdate:${e}`in m||`onUpdate:${s}`in m||`onUpdate:${o}`in m)||(u=f,c()),i.emit(`update:${e}`,p),Ni(f,p)&&Ni(f,d)&&!Ni(p,h)&&c(),d=f,h=p}}});return a[Symbol.iterator]=()=>{let l=0;return{next(){return l<2?{value:l++?r||pn:a,done:!1}:{done:!0}}}},a}const EI=(t,e)=>e==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Un(e)}Modifiers`]||t[`${zi(e)}Modifiers`];function Vq(t,e,...n){if(t.isUnmounted)return;const i=t.vnode.props||pn;let s=n;const o=e.startsWith("update:"),r=o&&EI(i,e.slice(7));r&&(r.trim&&(s=n.map(u=>Ke(u)?u.trim():u)),r.number&&(s=n.map(ub)));let a,l=i[a=qu(e)]||i[a=qu(Un(e))];!l&&o&&(l=i[a=qu(zi(e))]),l&&vr(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,vr(c,t,6,s)}}const Fq=new WeakMap;function MI(t,e,n=!1){const i=n?Fq: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=MI(c,e,!0);u&&(a=!0,cn(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):(Me(o)?o.forEach(l=>r[l]=null):cn(r,o),yt(t)&&i.set(t,r),r)}function Sb(t,e){return!t||!Pd(e)?!1:(e=e.slice(2).replace(/Once$/,""),zt(t,e[0].toLowerCase()+e.slice(1))||zt(t,zi(e))||zt(t,e))}function S0(t){const{type:e,vnode:n,proxy:i,withProxy:s,propsOptions:[o],slots:r,attrs:a,emit:l,render:c,renderCache:u,props:d,data:h,setupState:f,ctx:p,inheritAttrs:m}=t,y=Ag(t);let b,k;try{if(n.shapeFlag&4){const $=s||i,S=$;b=ro(c.call(S,$,u,d,f,h,p)),k=a}else{const $=e;b=ro($.length>1?$(d,{attrs:a,slots:r,emit:l}):$(d,null)),k=e.props?a:Bq(a)}}catch($){Wm.length=0,Ld($,t,1),b=_(Zn)}let C=b;if(k&&m!==!1){const $=Object.keys(k),{shapeFlag:S}=C;$.length&&S&7&&(o&&$.some(g6)&&(k=zq(k,o)),C=_r(C,k,!1,!0))}return n.dirs&&(C=_r(C,null,!1,!0),C.dirs=C.dirs?C.dirs.concat(n.dirs):n.dirs),n.transition&&yl(C,n.transition),b=C,Ag(y),b}function Nq(t,e=!0){let n;for(let i=0;i<t.length;i++){const s=t[i];if(is(s)){if(s.type!==Zn||s.children==="v-if"){if(n)return;n=s}}else return}return n}const Bq=t=>{let e;for(const n in t)(n==="class"||n==="style"||Pd(n))&&((e||(e={}))[n]=t[n]);return e},zq=(t,e)=>{const n={};for(const i in t)(!g6(i)||!(i.slice(9)in e))&&(n[i]=t[i]);return n};function Hq(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?A9(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]&&!Sb(c,h))return!0}}}else return(s||a)&&(!a||!a.$stable)?!0:i===r?!1:i?r?A9(i,r,c):!0:!!r;return!1}function A9(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]&&!Sb(n,o))return!0}return!1}function $b({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 TI={},PI=()=>Object.create(TI),II=t=>Object.getPrototypeOf(t)===TI;function Uq(t,e,n,i=!1){const s={},o=PI();t.propsDefaults=Object.create(null),LI(t,e,s,o);for(const r in t.propsOptions[0])r in s||(s[r]=void 0);n?t.props=i?s:k6(s):t.type.props?t.props=s:t.props=o,t.attrs=o}function jq(t,e,n,i){const{props:s,attrs:o,vnode:{patchFlag:r}}=t,a=an(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(Sb(t.emitsOptions,h))continue;const f=e[h];if(l)if(zt(o,h))f!==o[h]&&(o[h]=f,c=!0);else{const p=Un(h);s[p]=yk(l,a,p,f,t,!1)}else f!==o[h]&&(o[h]=f,c=!0)}}}else{LI(t,e,s,o)&&(c=!0);let u;for(const d in a)(!e||!zt(e,d)&&((u=zi(d))===d||!zt(e,u)))&&(l?n&&(n[d]!==void 0||n[u]!==void 0)&&(s[d]=yk(l,a,d,void 0,t,!0)):delete s[d]);if(o!==a)for(const d in o)(!e||!zt(e,d))&&(delete o[d],c=!0)}c&&tl(t.attrs,"set","")}function LI(t,e,n,i){const[s,o]=t.propsOptions;let r=!1,a;if(e)for(let l in e){if(ul(l))continue;const c=e[l];let u;s&&zt(s,u=Un(l))?!o||!o.includes(u)?n[u]=c:(a||(a={}))[u]=c:Sb(t.emitsOptions,l)||(!(l in i)||c!==i[l])&&(i[l]=c,r=!0)}if(o){const l=an(n),c=a||pn;for(let u=0;u<o.length;u++){const d=o[u];n[d]=yk(s,l,d,c[d],t,!zt(c,d))}}return r}function yk(t,e,n,i,s,o){const r=t[n];if(r!=null){const a=zt(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=pd(s);i=c[n]=l.call(null,e),u()}}else i=l;s.ce&&s.ce._setProp(n,i)}r[0]&&(o&&!a?i=!1:r[1]&&(i===""||i===zi(n))&&(i=!0))}return i}const Wq=new WeakMap;function OI(t,e,n=!1){const i=n?Wq: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]=OI(d,e,!0);cn(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,Zh),Zh;if(Me(o))for(let u=0;u<o.length;u++){const d=Un(o[u]);E9(d)&&(r[d]=pn)}else if(o)for(const u in o){const d=Un(u);if(E9(d)){const h=o[u],f=r[d]=Me(h)||et(h)?{type:h}:cn({},h),p=f.type;let m=!1,y=!0;if(Me(p))for(let b=0;b<p.length;++b){const k=p[b],C=et(k)&&k.name;if(C==="Boolean"){m=!0;break}else C==="String"&&(y=!1)}else m=et(p)&&p.name==="Boolean";f[0]=m,f[1]=y,(m||zt(f,"default"))&&a.push(d)}}const c=[r,a];return yt(t)&&i.set(t,c),c}function E9(t){return t[0]!=="$"&&!ul(t)}const O6=t=>t==="_"||t==="_ctx"||t==="$stable",D6=t=>Me(t)?t.map(ro):[ro(t)],Yq=(t,e,n)=>{if(e._n)return e;const i=w((...s)=>D6(e(...s)),n);return i._c=!1,i},DI=(t,e,n)=>{const i=t._ctx;for(const s in t){if(O6(s))continue;const o=t[s];if(et(o))e[s]=Yq(s,o,i);else if(o!=null){const r=D6(o);e[s]=()=>r}}},RI=(t,e)=>{const n=D6(e);t.slots.default=()=>n},VI=(t,e,n)=>{for(const i in e)(n||!O6(i))&&(t[i]=e[i])},qq=(t,e,n)=>{const i=t.slots=PI();if(t.vnode.shapeFlag&32){const s=e._;s?(VI(i,e,n),n&&PP(i,"_",s,!0)):DI(e,i)}else e&&RI(t,e)},Gq=(t,e,n)=>{const{vnode:i,slots:s}=t;let o=!0,r=pn;if(i.shapeFlag&32){const a=e._;a?n&&a===1?o=!1:VI(s,e,n):(o=!e.$stable,DI(e,s)),r=e}else e&&(RI(t,e),r={default:1});if(o)for(const a in s)!O6(a)&&r[a]==null&&delete s[a]},Es=WI;function FI(t){return BI(t)}function NI(t){return BI(t,nq)}function BI(t,e){const n=db();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=Dt,insertStaticContent:p}=t,m=(te,se,me,$e=null,Se=null,Le=null,We=void 0,Fe=null,ze=!!se.dynamicChildren)=>{if(te===se)return;te&&!Ir(te,se)&&($e=oe(te),ne(te,Se,Le,!0),te=null),se.patchFlag===-2&&(ze=!1,se.dynamicChildren=null);const{type:Ae,ref:Ze,shapeFlag:Ye}=se;switch(Ae){case xa:y(te,se,me,$e);break;case Zn:b(te,se,me,$e);break;case Ku:te==null&&k(se,me,$e,We);break;case ee:V(te,se,me,$e,Se,Le,We,Fe,ze);break;default:Ye&1?S(te,se,me,$e,Se,Le,We,Fe,ze):Ye&6?B(te,se,me,$e,Se,Le,We,Fe,ze):(Ye&64||Ye&128)&&Ae.process(te,se,me,$e,Se,Le,We,Fe,ze,re)}Ze!=null&&Se?nf(Ze,te&&te.ref,Le,se||te,!se):Ze==null&&te&&te.ref!=null&&nf(te.ref,null,Le,te,!0)},y=(te,se,me,$e)=>{if(te==null)i(se.el=a(se.children),me,$e);else{const Se=se.el=te.el;se.children!==te.children&&c(Se,se.children)}},b=(te,se,me,$e)=>{te==null?i(se.el=l(se.children||""),me,$e):se.el=te.el},k=(te,se,me,$e)=>{[te.el,te.anchor]=p(te.children,se,me,$e,te.el,te.anchor)},C=({el:te,anchor:se},me,$e)=>{let Se;for(;te&&te!==se;)Se=h(te),i(te,me,$e),te=Se;i(se,me,$e)},$=({el:te,anchor:se})=>{let me;for(;te&&te!==se;)me=h(te),s(te),te=me;s(se)},S=(te,se,me,$e,Se,Le,We,Fe,ze)=>{if(se.type==="svg"?We="svg":se.type==="math"&&(We="mathml"),te==null)M(se,me,$e,Se,Le,We,Fe,ze);else{const Ae=te.el&&te.el._isVueCE?te.el:null;try{Ae&&Ae._beginPatch(),I(te,se,Se,Le,We,Fe,ze)}finally{Ae&&Ae._endPatch()}}},M=(te,se,me,$e,Se,Le,We,Fe)=>{let ze,Ae;const{props:Ze,shapeFlag:Ye,transition:it,dirs:ye}=te;if(ze=te.el=r(te.type,Le,Ze&&Ze.is,Ze),Ye&8?u(ze,te.children):Ye&16&&T(te.children,ze,null,$e,Se,dw(te,Le),We,Fe),ye&&ba(te,null,$e,"created"),P(ze,te,te.scopeId,We,$e),Ze){for(const Pe in Ze)Pe!=="value"&&!ul(Pe)&&o(ze,Pe,null,Ze[Pe],Le,$e);"value"in Ze&&o(ze,"value",null,Ze.value,Le),(Ae=Ze.onVnodeBeforeMount)&&oo(Ae,$e,te)}ye&&ba(te,null,$e,"beforeMount");const ve=zI(Se,it);ve&&it.beforeEnter(ze),i(ze,se,me),((Ae=Ze&&Ze.onVnodeMounted)||ve||ye)&&Es(()=>{Ae&&oo(Ae,$e,te),ve&&it.enter(ze),ye&&ba(te,null,$e,"mounted")},Se)},P=(te,se,me,$e,Se)=>{if(me&&f(te,me),$e)for(let Le=0;Le<$e.length;Le++)f(te,$e[Le]);if(Se){let Le=Se.subTree;if(se===Le||Z_(Le.type)&&(Le.ssContent===se||Le.ssFallback===se)){const We=Se.vnode;P(te,We,We.scopeId,We.slotScopeIds,Se.parent)}}},T=(te,se,me,$e,Se,Le,We,Fe,ze=0)=>{for(let Ae=ze;Ae<te.length;Ae++){const Ze=te[Ae]=Fe?cc(te[Ae]):ro(te[Ae]);m(null,Ze,se,me,$e,Se,Le,We,Fe)}},I=(te,se,me,$e,Se,Le,We)=>{const Fe=se.el=te.el;let{patchFlag:ze,dynamicChildren:Ae,dirs:Ze}=se;ze|=te.patchFlag&16;const Ye=te.props||pn,it=se.props||pn;let ye;if(me&&fu(me,!1),(ye=it.onVnodeBeforeUpdate)&&oo(ye,me,se,te),Ze&&ba(se,te,me,"beforeUpdate"),me&&fu(me,!0),(Ye.innerHTML&&it.innerHTML==null||Ye.textContent&&it.textContent==null)&&u(Fe,""),Ae?L(te.dynamicChildren,Ae,Fe,me,$e,dw(se,Se),Le):We||K(te,se,Fe,null,me,$e,dw(se,Se),Le,!1),ze>0){if(ze&16)R(Fe,Ye,it,me,Se);else if(ze&2&&Ye.class!==it.class&&o(Fe,"class",null,it.class,Se),ze&4&&o(Fe,"style",Ye.style,it.style,Se),ze&8){const ve=se.dynamicProps;for(let Pe=0;Pe<ve.length;Pe++){const Ie=ve[Pe],_t=Ye[Ie],Lt=it[Ie];(Lt!==_t||Ie==="value")&&o(Fe,Ie,_t,Lt,Se,me)}}ze&1&&te.children!==se.children&&u(Fe,se.children)}else!We&&Ae==null&&R(Fe,Ye,it,me,Se);((ye=it.onVnodeUpdated)||Ze)&&Es(()=>{ye&&oo(ye,me,se,te),Ze&&ba(se,te,me,"updated")},$e)},L=(te,se,me,$e,Se,Le,We)=>{for(let Fe=0;Fe<se.length;Fe++){const ze=te[Fe],Ae=se[Fe],Ze=ze.el&&(ze.type===ee||!Ir(ze,Ae)||ze.shapeFlag&198)?d(ze.el):me;m(ze,Ae,Ze,null,$e,Se,Le,We,!0)}},R=(te,se,me,$e,Se)=>{if(se!==me){if(se!==pn)for(const Le in se)!ul(Le)&&!(Le in me)&&o(te,Le,se[Le],null,Se,$e);for(const Le in me){if(ul(Le))continue;const We=me[Le],Fe=se[Le];We!==Fe&&Le!=="value"&&o(te,Le,Fe,We,Se,$e)}"value"in me&&o(te,"value",se.value,me.value,Se)}},V=(te,se,me,$e,Se,Le,We,Fe,ze)=>{const Ae=se.el=te?te.el:a(""),Ze=se.anchor=te?te.anchor:a("");let{patchFlag:Ye,dynamicChildren:it,slotScopeIds:ye}=se;ye&&(Fe=Fe?Fe.concat(ye):ye),te==null?(i(Ae,me,$e),i(Ze,me,$e),T(se.children||[],me,Ze,Se,Le,We,Fe,ze)):Ye>0&&Ye&64&&it&&te.dynamicChildren&&te.dynamicChildren.length===it.length?(L(te.dynamicChildren,it,me,Se,Le,We,Fe),(se.key!=null||Se&&se===Se.subTree)&&R6(te,se,!0)):K(te,se,me,Ze,Se,Le,We,Fe,ze)},B=(te,se,me,$e,Se,Le,We,Fe,ze)=>{se.slotScopeIds=Fe,te==null?se.shapeFlag&512?Se.ctx.activate(se,me,$e,We,ze):F(se,me,$e,Se,Le,We,ze):z(te,se,ze)},F=(te,se,me,$e,Se,Le,We)=>{const Fe=te.component=XI(te,$e,Se);if(S1(te)&&(Fe.ctx.renderer=re),ZI(Fe,!1,We),Fe.asyncDep){if(Se&&Se.registerDep(Fe,U,We),!te.el){const ze=Fe.subTree=_(Zn);b(null,ze,se,me),te.placeholder=ze.el}}else U(Fe,te,se,me,Se,Le,We)},z=(te,se,me)=>{const $e=se.component=te.component;if(Hq(te,se,me))if($e.asyncDep&&!$e.asyncResolved){G($e,se,me);return}else $e.next=se,$e.update();else se.el=te.el,$e.vnode=se},U=(te,se,me,$e,Se,Le,We)=>{const Fe=()=>{if(te.isMounted){let{next:Ye,bu:it,u:ye,parent:ve,vnode:Pe}=te;{const dt=HI(te);if(dt){Ye&&(Ye.el=Pe.el,G(te,Ye,We)),dt.asyncDep.then(()=>{te.isUnmounted||Fe()});return}}let Ie=Ye,_t;fu(te,!1),Ye?(Ye.el=Pe.el,G(te,Ye,We)):Ye=Pe,it&&Qh(it),(_t=Ye.props&&Ye.props.onVnodeBeforeUpdate)&&oo(_t,ve,Ye,Pe),fu(te,!0);const Lt=S0(te),Je=te.subTree;te.subTree=Lt,m(Je,Lt,d(Je.el),oe(Je),te,Se,Le),Ye.el=Lt.el,Ie===null&&$b(te,Lt.el),ye&&Es(ye,Se),(_t=Ye.props&&Ye.props.onVnodeUpdated)&&Es(()=>oo(_t,ve,Ye,Pe),Se)}else{let Ye;const{el:it,props:ye}=se,{bm:ve,m:Pe,parent:Ie,root:_t,type:Lt}=te,Je=dl(se);if(fu(te,!1),ve&&Qh(ve),!Je&&(Ye=ye&&ye.onVnodeBeforeMount)&&oo(Ye,Ie,se),fu(te,!0),it&&je){const dt=()=>{te.subTree=S0(te),je(it,te.subTree,te,Se,null)};Je&&Lt.__asyncHydrate?Lt.__asyncHydrate(it,te,dt):dt()}else{_t.ce&&_t.ce._def.shadowRoot!==!1&&_t.ce._injectChildStyle(Lt);const dt=te.subTree=S0(te);m(null,dt,me,$e,te,Se,Le),se.el=dt.el}if(Pe&&Es(Pe,Se),!Je&&(Ye=ye&&ye.onVnodeMounted)){const dt=se;Es(()=>oo(Ye,Ie,dt),Se)}(se.shapeFlag&256||Ie&&dl(Ie.vnode)&&Ie.vnode.shapeFlag&256)&&te.a&&Es(te.a,Se),te.isMounted=!0,se=me=$e=null}};te.scope.on();const ze=te.effect=new kg(Fe);te.scope.off();const Ae=te.update=ze.run.bind(ze),Ze=te.job=ze.runIfDirty.bind(ze);Ze.i=te,Ze.id=te.uid,ze.scheduler=()=>x6(Ze),fu(te,!0),Ae()},G=(te,se,me)=>{se.component=te;const $e=te.vnode.props;te.vnode=se,te.next=null,jq(te,se.props,$e,me),Gq(te,se.children,me),gl(),m9(te),vl()},K=(te,se,me,$e,Se,Le,We,Fe,ze=!1)=>{const Ae=te&&te.children,Ze=te?te.shapeFlag:0,Ye=se.children,{patchFlag:it,shapeFlag:ye}=se;if(it>0){if(it&128){W(Ae,Ye,me,$e,Se,Le,We,Fe,ze);return}else if(it&256){X(Ae,Ye,me,$e,Se,Le,We,Fe,ze);return}}ye&8?(Ze&16&&Ce(Ae,Se,Le),Ye!==Ae&&u(me,Ye)):Ze&16?ye&16?W(Ae,Ye,me,$e,Se,Le,We,Fe,ze):Ce(Ae,Se,Le,!0):(Ze&8&&u(me,""),ye&16&&T(Ye,me,$e,Se,Le,We,Fe,ze))},X=(te,se,me,$e,Se,Le,We,Fe,ze)=>{te=te||Zh,se=se||Zh;const Ae=te.length,Ze=se.length,Ye=Math.min(Ae,Ze);let it;for(it=0;it<Ye;it++){const ye=se[it]=ze?cc(se[it]):ro(se[it]);m(te[it],ye,me,null,Se,Le,We,Fe,ze)}Ae>Ze?Ce(te,Se,Le,!0,!1,Ye):T(se,me,$e,Se,Le,We,Fe,ze,Ye)},W=(te,se,me,$e,Se,Le,We,Fe,ze)=>{let Ae=0;const Ze=se.length;let Ye=te.length-1,it=Ze-1;for(;Ae<=Ye&&Ae<=it;){const ye=te[Ae],ve=se[Ae]=ze?cc(se[Ae]):ro(se[Ae]);if(Ir(ye,ve))m(ye,ve,me,null,Se,Le,We,Fe,ze);else break;Ae++}for(;Ae<=Ye&&Ae<=it;){const ye=te[Ye],ve=se[it]=ze?cc(se[it]):ro(se[it]);if(Ir(ye,ve))m(ye,ve,me,null,Se,Le,We,Fe,ze);else break;Ye--,it--}if(Ae>Ye){if(Ae<=it){const ye=it+1,ve=ye<Ze?se[ye].el:$e;for(;Ae<=it;)m(null,se[Ae]=ze?cc(se[Ae]):ro(se[Ae]),me,ve,Se,Le,We,Fe,ze),Ae++}}else if(Ae>it)for(;Ae<=Ye;)ne(te[Ae],Se,Le,!0),Ae++;else{const ye=Ae,ve=Ae,Pe=new Map;for(Ae=ve;Ae<=it;Ae++){const Oe=se[Ae]=ze?cc(se[Ae]):ro(se[Ae]);Oe.key!=null&&Pe.set(Oe.key,Ae)}let Ie,_t=0;const Lt=it-ve+1;let Je=!1,dt=0;const mt=new Array(Lt);for(Ae=0;Ae<Lt;Ae++)mt[Ae]=0;for(Ae=ye;Ae<=Ye;Ae++){const Oe=te[Ae];if(_t>=Lt){ne(Oe,Se,Le,!0);continue}let ce;if(Oe.key!=null)ce=Pe.get(Oe.key);else for(Ie=ve;Ie<=it;Ie++)if(mt[Ie-ve]===0&&Ir(Oe,se[Ie])){ce=Ie;break}ce===void 0?ne(Oe,Se,Le,!0):(mt[ce-ve]=Ae+1,ce>=dt?dt=ce:Je=!0,m(Oe,se[ce],me,null,Se,Le,We,Fe,ze),_t++)}const _e=Je?Xq(mt):Zh;for(Ie=_e.length-1,Ae=Lt-1;Ae>=0;Ae--){const Oe=ve+Ae,ce=se[Oe],De=se[Oe+1],gt=Oe+1<Ze?De.el||UI(De):$e;mt[Ae]===0?m(null,ce,me,gt,Se,Le,We,Fe,ze):Je&&(Ie<0||Ae!==_e[Ie]?Q(ce,me,gt,2):Ie--)}}},Q=(te,se,me,$e,Se=null)=>{const{el:Le,type:We,transition:Fe,children:ze,shapeFlag:Ae}=te;if(Ae&6){Q(te.component.subTree,se,me,$e);return}if(Ae&128){te.suspense.move(se,me,$e);return}if(Ae&64){We.move(te,se,me,re);return}if(We===ee){i(Le,se,me);for(let Ye=0;Ye<ze.length;Ye++)Q(ze[Ye],se,me,$e);i(te.anchor,se,me);return}if(We===Ku){C(te,se,me);return}if($e!==2&&Ae&1&&Fe)if($e===0)Fe.beforeEnter(Le),i(Le,se,me),Es(()=>Fe.enter(Le),Se);else{const{leave:Ye,delayLeave:it,afterLeave:ye}=Fe,ve=()=>{te.ctx.isUnmounted?s(Le):i(Le,se,me)},Pe=()=>{Le._isLeaving&&Le[Ja](!0),Ye(Le,()=>{ve(),ye&&ye()})};it?it(Le,ve,Pe):Pe()}else i(Le,se,me)},ne=(te,se,me,$e=!1,Se=!1)=>{const{type:Le,props:We,ref:Fe,children:ze,dynamicChildren:Ae,shapeFlag:Ze,patchFlag:Ye,dirs:it,cacheIndex:ye}=te;if(Ye===-2&&(Se=!1),Fe!=null&&(gl(),nf(Fe,null,me,te,!0),vl()),ye!=null&&(se.renderCache[ye]=void 0),Ze&256){se.ctx.deactivate(te);return}const ve=Ze&1&&it,Pe=!dl(te);let Ie;if(Pe&&(Ie=We&&We.onVnodeBeforeUnmount)&&oo(Ie,se,te),Ze&6)ge(te.component,me,$e);else{if(Ze&128){te.suspense.unmount(me,$e);return}ve&&ba(te,null,se,"beforeUnmount"),Ze&64?te.type.remove(te,se,me,re,$e):Ae&&!Ae.hasOnce&&(Le!==ee||Ye>0&&Ye&64)?Ce(Ae,se,me,!1,!0):(Le===ee&&Ye&384||!Se&&Ze&16)&&Ce(ze,se,me),$e&&Z(te)}(Pe&&(Ie=We&&We.onVnodeUnmounted)||ve)&&Es(()=>{Ie&&oo(Ie,se,te),ve&&ba(te,null,se,"unmounted")},me)},Z=te=>{const{type:se,el:me,anchor:$e,transition:Se}=te;if(se===ee){ae(me,$e);return}if(se===Ku){$(te);return}const Le=()=>{s(me),Se&&!Se.persisted&&Se.afterLeave&&Se.afterLeave()};if(te.shapeFlag&1&&Se&&!Se.persisted){const{leave:We,delayLeave:Fe}=Se,ze=()=>We(me,Le);Fe?Fe(te.el,Le,ze):ze()}else Le()},ae=(te,se)=>{let me;for(;te!==se;)me=h(te),s(te),te=me;s(se)},ge=(te,se,me)=>{const{bum:$e,scope:Se,job:Le,subTree:We,um:Fe,m:ze,a:Ae}=te;K_(ze),K_(Ae),$e&&Qh($e),Se.stop(),Le&&(Le.flags|=8,ne(We,te,se,me)),Fe&&Es(Fe,se),Es(()=>{te.isUnmounted=!0},se)},Ce=(te,se,me,$e=!1,Se=!1,Le=0)=>{for(let We=Le;We<te.length;We++)ne(te[We],se,me,$e,Se)},oe=te=>{if(te.shapeFlag&6)return oe(te.component.subTree);if(te.shapeFlag&128)return te.suspense.next();const se=h(te.anchor||te.el),me=se&&se[dI];return me?h(me):se};let pe=!1;const ie=(te,se,me)=>{let $e;te==null?se._vnode&&(ne(se._vnode,null,null,!0),$e=se._vnode.component):m(se._vnode||null,te,se,null,null,null,me),se._vnode=te,pe||(pe=!0,m9($e),q_(),pe=!1)},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:Dq(ie,ke)}}function dw({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 fu({effect:t,job:e},n){n?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function zI(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function R6(t,e,n=!1){const i=t.children,s=e.children;if(Me(i)&&Me(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]=cc(s[o]),a.el=r.el),!n&&a.patchFlag!==-2&&R6(r,a)),a.type===xa&&(a.patchFlag!==-1?a.el=r.el:a.__elIndex=o+(t.type===ee?1:0)),a.type===Zn&&!a.el&&(a.el=r.el)}}function Xq(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 HI(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:HI(e)}function K_(t){if(t)for(let e=0;e<t.length;e++)t[e].flags|=8}function UI(t){if(t.placeholder)return t.placeholder;const e=t.component;return e?UI(e.subTree):null}const Z_=t=>t.__isSuspense;let bk=0;const Kq={name:"Suspense",__isSuspense:!0,process(t,e,n,i,s,o,r,a,l,c){if(t==null)Jq(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}Qq(t,e,n,i,s,r,a,l,c)}},hydrate:eG,normalize:tG},Zq=Kq;function Mg(t,e){const n=t.props&&t.props[e];et(n)&&n()}function Jq(t,e,n,i,s,o,r,a,l){const{p:c,o:{createElement:u}}=l,d=u("div"),h=t.suspense=jI(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?(Mg(t,"onPending"),Mg(t,"onFallback"),c(null,t.ssFallback,e,n,i,null,o,r),sf(h,t.ssFallback)):h.resolve(!1,!0)}function Qq(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,Ir(m,h)?(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),sf(d,f)))):(d.pendingId=bk++,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),sf(d,f))):p&&Ir(p,h)?(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&&Ir(p,h))l(p,h,n,i,s,d,o,r,a),sf(d,h);else if(Mg(e,"onPending"),d.pendingBranch=h,h.shapeFlag&512?d.pendingId=h.component.suspenseId:d.pendingId=bk++,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 jI(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=nG(t);k&&e&&e.pendingBranch&&(b=e.pendingId,e.deps++);const C=t.props?U_(t.props.timeout):void 0,$=o,S={vnode:t,parent:e,parentComponent:n,namespace:r,container:i,hiddenContainer:s,deps:0,pendingId:bk++,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:B,container:F,isInFallback:z}=S;let U=!1;S.isHydrating?S.isHydrating=!1:M||(U=I&&L.transition&&L.transition.mode==="out-in",U&&(I.transition.afterLeave=()=>{R===S.pendingId&&(h(L,F,o===$?p(I):o,0),Sg(V),z&&T.ssFallback&&(T.ssFallback.el=null))}),I&&(m(I.el)===F&&(o=p(I)),f(I,B,S,!0),!U&&z&&T.ssFallback&&Es(()=>T.ssFallback.el=null,S)),U||h(L,F,o,0)),sf(S,L),S.pendingBranch=null,S.isInFallback=!1;let G=S.parent,K=!1;for(;G;){if(G.pendingBranch){G.effects.push(...V),K=!0;break}G=G.parent}!K&&!U&&Sg(V),S.effects=[],k&&e&&e.pendingBranch&&b===e.pendingId&&(e.deps--,e.deps===0&&!P&&e.resolve()),Mg(T,"onResolve")},fallback(M){if(!S.pendingBranch)return;const{vnode:P,activeBranch:T,parentComponent:I,container:L,namespace:R}=S;Mg(P,"onFallback");const V=p(T),B=()=>{S.isInFallback&&(d(null,M,L,V,I,null,R,a,l),sf(S,M))},F=M.transition&&M.transition.mode==="out-in";F&&(T.transition.afterLeave=B),S.isInFallback=!0,f(T,I,null,!0),F||B()},move(M,P,T){S.activeBranch&&h(S.activeBranch,M,P,T),S.container=M},next(){return S.activeBranch&&p(S.activeBranch)},registerDep(M,P,T){const I=!!S.pendingBranch;I&&S.deps++;const L=M.vnode.el;M.asyncDep.catch(R=>{Ld(R,M,0)}).then(R=>{if(M.isUnmounted||S.isUnmounted||S.pendingId!==M.suspenseId)return;M.asyncResolved=!0;const{vnode:V}=M;Ck(M,R,!1),L&&(V.el=L);const B=!L&&M.subTree.el;P(M,V,m(L||M.subTree.el),L?null:p(M.subTree),S,r,T),B&&(V.placeholder=null,y(B)),$b(M,V.el),I&&--S.deps===0&&S.resolve()})},unmount(M,P){S.isUnmounted=!0,S.activeBranch&&f(S.activeBranch,n,M,P),S.pendingBranch&&f(S.pendingBranch,n,M,P)}};return S}function eG(t,e,n,i,s,o,r,a,l){const c=e.suspense=jI(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 tG(t){const{shapeFlag:e,children:n}=t,i=e&32;t.ssContent=M9(i?n.default:n),t.ssFallback=i?M9(n.fallback):_(Zn)}function M9(t){let e;if(et(t)){const n=fd&&t._c;n&&(t._d=!1,v()),t=t(),n&&(t._d=!0,e=Ai,YI())}return Me(t)&&(t=Nq(t)),t=ro(t),e&&!t.dynamicChildren&&(t.dynamicChildren=e.filter(n=>n!==t)),t}function WI(t,e){e&&e.pendingBranch?Me(t)?e.effects.push(...t):e.effects.push(t):Sg(t)}function sf(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,$b(i,s))}function nG(t){const e=t.props&&t.props.suspensible;return e!=null&&e!==!1}const ee=Symbol.for("v-fgt"),xa=Symbol.for("v-txt"),Zn=Symbol.for("v-cmt"),Ku=Symbol.for("v-stc"),Wm=[];let Ai=null;function v(t=!1){Wm.push(Ai=t?null:[])}function YI(){Wm.pop(),Ai=Wm[Wm.length-1]||null}let fd=1;function Tg(t,e=!1){fd+=t,t<0&&Ai&&e&&(Ai.hasOnce=!0)}function qI(t){return t.dynamicChildren=fd>0?Ai||Zh:null,YI(),fd>0&&Ai&&Ai.push(t),t}function A(t,e,n,i,s,o){return qI(g(t,e,n,i,s,o,!0))}function D(t,e,n,i,s){return qI(_(t,e,n,i,s,!0))}function is(t){return t?t.__v_isVNode===!0:!1}function Ir(t,e){return t.type===e.type&&t.key===e.key}function sG(t){}const GI=({key:t})=>t??null,$0=({ref:t,ref_key:e,ref_for:n})=>(typeof t=="number"&&(t=""+t),t!=null?Ke(t)||hn(t)||et(t)?{i:li,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&&GI(e),ref:e&&$0(e),scopeId:bb,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:i,dynamicProps:s,dynamicChildren:null,appContext:null,ctx:li};return a?(V6(l,n),o&128&&t.normalize(l)):n&&(l.shapeFlag|=Ke(n)?8:16),fd>0&&!r&&Ai&&(l.patchFlag>0||o&6)&&l.patchFlag!==32&&Ai.push(l),l}const _=iG;function iG(t,e=null,n=null,i=0,s=null,o=!1){if((!t||t===xI)&&(t=Zn),is(t)){const a=_r(t,e,!0);return n&&V6(a,n),fd>0&&!o&&Ai&&(a.shapeFlag&6?Ai[Ai.indexOf(t)]=a:Ai.push(a)),a.patchFlag=-2,a}if(uG(t)&&(t=t.__vccOpts),e){e=of(e);let{class:a,style:l}=e;a&&!Ke(a)&&(e.class=q(a)),yt(l)&&(C1(l)&&!Me(l)&&(l=cn({},l)),e.style=Xe(l))}const r=Ke(t)?1:Z_(t)?128:hI(t)?64:yt(t)?4:et(t)?2:0;return g(t,e,n,i,s,r,o,!0)}function of(t){return t?C1(t)||II(t)?cn({},t):t:null}function _r(t,e,n=!1,i=!1){const{props:s,ref:o,patchFlag:r,children:a,transition:l}=t,c=e?Wt(s||{},e):s,u={__v_isVNode:!0,__v_skip:!0,type:t.type,props:c,key:c&&GI(c),ref:e&&e.ref?n&&o?Me(o)?o.concat($0(e)):[o,$0(e)]:$0(e):o,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:a,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==ee?r===-1?16:r|16:r,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:l,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&_r(t.ssContent),ssFallback:t.ssFallback&&_r(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return l&&i&&yl(u,l.clone(u)),u}function N(t=" ",e=0){return _(xa,null,t,e)}function Ra(t,e){const n=_(Ku,null,t);return n.staticCount=e,n}function O(t="",e=!1){return e?(v(),D(Zn,null,t)):_(Zn,null,t)}function ro(t){return t==null||typeof t=="boolean"?_(Zn):Me(t)?_(ee,null,t.slice()):is(t)?cc(t):_(xa,null,String(t))}function cc(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:_r(t)}function V6(t,e){let n=0;const{shapeFlag:i}=t;if(e==null)e=null;else if(Me(e))n=16;else if(typeof e=="object")if(i&65){const s=e.default;s&&(s._c&&(s._d=!1),V6(t,s()),s._c&&(s._d=!0));return}else{n=32;const s=e._;!s&&!II(e)?e._ctx=li:s===3&&li&&(li.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else et(e)?(e={default:e,_ctx:li},n=32):(e=String(e),i&64?(n=16,e=[N(e)]):n=8);t.children=e,t.shapeFlag|=n}function Wt(...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=q([e.class,i.class]));else if(s==="style")e.style=Xe([e.style,i.style]);else if(Pd(s)){const o=e[s],r=i[s];r&&o!==r&&!(Me(o)&&o.includes(r))&&(e[s]=o?[].concat(o,r):r)}else s!==""&&(e[s]=i[s])}return e}function oo(t,e,n,i=null){vr(t,e,7,[n,i])}const oG=AI();let rG=0;function XI(t,e,n){const i=t.type,s=(e?e.appContext:t.appContext)||oG,o={uid:rG++,vnode:t,type:i,parent:e,appContext:s,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new _6(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:e?e.provides:Object.create(s.provides),ids:e?e.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:OI(i,s),emitsOptions:MI(i,s),emit:null,emitted:null,propsDefaults:pn,inheritAttrs:i.inheritAttrs,ctx:pn,data:pn,props:pn,attrs:pn,slots:pn,refs:pn,setupState:pn,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=e?e.root:o,o.emit=Vq.bind(null,o),t.ce&&t.ce(o),o}let oi=null;const pt=()=>oi||li;let J_,wk;{const t=db(),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)}};J_=e("__VUE_INSTANCE_SETTERS__",n=>oi=n),wk=e("__VUE_SSR_SETTERS__",n=>Sf=n)}const pd=t=>{const e=oi;return J_(t),t.scope.on(),()=>{t.scope.off(),J_(e)}},kk=()=>{oi&&oi.scope.off(),J_(null)};function KI(t){return t.vnode.shapeFlag&4}let Sf=!1;function ZI(t,e=!1,n=!1){e&&wk(e);const{props:i,children:s}=t.vnode,o=KI(t);Uq(t,i,o,e),qq(t,s,n||e);const r=o?aG(t,e):void 0;return e&&wk(!1),r}function aG(t,e){const n=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,gk);const{setup:i}=n;if(i){gl();const s=t.setupContext=i.length>1?eL(t):null,o=pd(t),r=ap(i,t,0,[t.props,s]),a=dd(r);if(vl(),o(),(a||t.sp)&&!dl(t)&&A6(t),a){if(r.then(kk,kk),e)return r.then(l=>{Ck(t,l,e)}).catch(l=>{Ld(l,t,0)});t.asyncDep=r}else Ck(t,r,e)}else QI(t,e)}function Ck(t,e,n){et(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:yt(e)&&(t.setupState=C6(e)),QI(t,n)}let Q_,xk;function JI(t){Q_=t,xk=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,vq))}}const lG=()=>!Q_;function QI(t,e,n){const i=t.type;if(!t.render){if(!e&&Q_&&!i.render){const s=i.template||L6(t).template;if(s){const{isCustomElement:o,compilerOptions:r}=t.appContext.config,{delimiters:a,compilerOptions:l}=i,c=cn(cn({isCustomElement:o,delimiters:a},r),l);i.render=Q_(s,c)}}t.render=i.render||Dt,xk&&xk(t)}{const s=pd(t);gl();try{Mq(t)}finally{vl(),s()}}}const cG={get(t,e){return $i(t,"get",""),t[e]}};function eL(t){const e=n=>{t.exposed=n||{}};return{attrs:new Proxy(t.attrs,cG),slots:t.slots,emit:t.emit,expose:e}}function $1(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(C6(Pi(t.exposed)),{get(e,n){if(n in e)return e[n];if(n in jm)return jm[n](t)},has(e,n){return n in e||n in jm}})):t.proxy}function Sk(t,e=!0){return et(t)?t.displayName||t.name:t.name||e&&t.__name}function uG(t){return et(t)&&"__vccOpts"in t}const Y=(t,e)=>LY(t,e,Sf);function bt(t,e,n){try{Tg(-1);const i=arguments.length;return i===2?yt(e)&&!Me(e)?is(e)?_(t,null,[e]):_(t,e):_(t,null,e):(i>3?n=Array.prototype.slice.call(arguments,2):i===3&&is(n)&&(n=[n]),_(t,e,n))}finally{Tg(1)}}function dG(){}function hG(t,e,n,i){const s=n[i];if(s&&tL(s,t))return s;const o=e();return o.memo=t.slice(),o.cacheIndex=i,n[i]=o}function tL(t,e){const n=t.memo;if(n.length!=e.length)return!1;for(let i=0;i<n.length;i++)if(Ni(n[i],e[i]))return!1;return fd>0&&Ai&&Ai.push(t),!0}const nL="3.5.27",sL=Dt,fG=HY,pG=Sh,mG=oI,gG={createComponentInstance:XI,setupComponent:ZI,renderComponentRoot:S0,setCurrentRenderingInstance:Ag,isVNode:is,normalizeVNode:ro,getComponentPublicInstance:$1,ensureValidVNode:I6,pushWarningContext:FY,popWarningContext:NY},vG=gG,_G=null,yG=null,bG=null;/** | |
| 16 | 16 | * @vue/runtime-dom v3.5.27 |
| 17 | 17 | * (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 18 | 18 | * @license MIT |
| 19 | -**/let E3;const kS=typeof window<"u"&&window.trustedTypes;if(kS)try{E3=kS.createPolicy("vue",{createHTML:t=>t})}catch{}const rI=E3?t=>E3.createHTML(t):t=>t,uG="http://www.w3.org/2000/svg",dG="http://www.w3.org/1998/Math/MathML",Fa=typeof document<"u"?document:null,xS=Fa&&Fa.createElement("template"),aI={insert:(t,e,n)=>{e.insertBefore(t,n||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,n,s)=>{const i=e==="svg"?Fa.createElementNS(uG,t):e==="mathml"?Fa.createElementNS(dG,t):n?Fa.createElement(t,{is:n}):Fa.createElement(t);return t==="select"&&s&&s.multiple!=null&&i.setAttribute("multiple",s.multiple),i},createText:t=>Fa.createTextNode(t),createComment:t=>Fa.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Fa.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,n,s,i,o){const r=n?n.previousSibling:e.lastChild;if(i&&(i===o||i.nextSibling))for(;e.insertBefore(i.cloneNode(!0),n),!(i===o||!(i=i.nextSibling)););else{xS.innerHTML=rI(s==="svg"?`<svg>${t}</svg>`:s==="mathml"?`<math>${t}</math>`:t);const a=xS.content;if(s==="svg"||s==="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]}},ml="transition",cp="animation",qh=Symbol("_vtc"),lI={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},cI=Zt({},Pk,lI),hG=t=>(t.displayName="Transition",t.props=cI,t),bo=hG((t,{slots:e})=>gt(_P,uI(t),e)),Bc=(t,e=[])=>{Le(t)?t.forEach(n=>n(...e)):t&&t(...e)},SS=t=>t?Le(t)?t.some(e=>e.length>1):t.length>1:!1;function uI(t){const e={};for(const D in t)D in lI||(e[D]=t[D]);if(t.css===!1)return e;const{name:n="v",type:s,duration:i,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=fG(i),m=p&&p[0],b=p&&p[1],{onBeforeEnter:y,onEnter:C,onEnterCancelled:k,onLeave:x,onLeaveCancelled:S,onBeforeAppear:E=y,onAppear:T=C,onAppearCancelled:P=k}=e,I=(D,z,Y,B)=>{D._enterCancelled=B,wl(D,z?u:a),wl(D,z?c:r),Y&&Y()},L=(D,z)=>{D._isLeaving=!1,wl(D,d),wl(D,f),wl(D,h),z&&z()},V=D=>(z,Y)=>{const B=D?T:C,U=()=>I(z,D,Y);Bc(B,[z,U]),$S(()=>{wl(z,D?l:o),qr(z,D?u:a),SS(B)||AS(z,s,m,U)})};return Zt(e,{onBeforeEnter(D){Bc(y,[D]),qr(D,o),qr(D,r)},onBeforeAppear(D){Bc(E,[D]),qr(D,l),qr(D,c)},onEnter:V(!1),onAppear:V(!0),onLeave(D,z){D._isLeaving=!0;const Y=()=>L(D,z);qr(D,d),D._enterCancelled?(qr(D,h),T3(D)):(T3(D),qr(D,h)),$S(()=>{D._isLeaving&&(wl(D,d),qr(D,f),SS(x)||AS(D,s,b,Y))}),Bc(x,[D,Y])},onEnterCancelled(D){I(D,!1,void 0,!0),Bc(k,[D])},onAppearCancelled(D){I(D,!0,void 0,!0),Bc(P,[D])},onLeaveCancelled(D){L(D),Bc(S,[D])}})}function fG(t){if(t==null)return null;if(Ct(t))return[w2(t.enter),w2(t.leave)];{const e=w2(t);return[e,e]}}function w2(t){return i_(t)}function qr(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[qh]||(t[qh]=new Set)).add(e)}function wl(t,e){e.split(/\s+/).forEach(s=>s&&t.classList.remove(s));const n=t[qh];n&&(n.delete(e),n.size||(t[qh]=void 0))}function $S(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let pG=0;function AS(t,e,n,s){const i=t._endId=++pG,o=()=>{i===t._endId&&s()};if(n!=null)return setTimeout(o,n);const{type:r,timeout:a,propCount:l}=dI(t,e);if(!r)return s();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 dI(t,e){const n=window.getComputedStyle(t),s=p=>(n[p]||"").split(", "),i=s(`${ml}Delay`),o=s(`${ml}Duration`),r=MS(i,o),a=s(`${cp}Delay`),l=s(`${cp}Duration`),c=MS(a,l);let u=null,d=0,h=0;e===ml?r>0&&(u=ml,d=r,h=o.length):e===cp?c>0&&(u=cp,d=c,h=l.length):(d=Math.max(r,c),u=d>0?r>c?ml:cp:null,h=u?u===ml?o.length:l.length:0);const f=u===ml&&/\b(?:transform|all)(?:,|$)/.test(s(`${ml}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:f}}function MS(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((n,s)=>ES(n)+ES(t[s])))}function ES(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function T3(t){return(t?t.ownerDocument:document).body.offsetHeight}function mG(t,e,n){const s=t[qh];s&&(e=(e?[e,...s]:[...s]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const m_=Symbol("_vod"),hI=Symbol("_vsh"),Xt={name:"show",beforeMount(t,{value:e},{transition:n}){t[m_]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):up(t,e)},mounted(t,{value:e},{transition:n}){n&&e&&n.enter(t)},updated(t,{value:e,oldValue:n},{transition:s}){!e!=!n&&(s?e?(s.beforeEnter(t),up(t,!0),s.enter(t)):s.leave(t,()=>{up(t,!1)}):up(t,e))},beforeUnmount(t,{value:e}){up(t,e)}};function up(t,e){t.style.display=e?t[m_]:"none",t[hI]=!e}function gG(){Xt.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const fI=Symbol("");function vG(t){const e=pt();if(!e)return;const n=e.ut=(i=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(o=>g_(o,i))},s=()=>{const i=t(e.proxy);e.ce?g_(e.ce,i):P3(e.subTree,i),n(i)};Dk(()=>{Wm(s)}),Pt(()=>{Te(s,Vt,{flush:"post"});const i=new MutationObserver(s);i.observe(e.subTree.el.parentNode,{childList:!0}),_a(()=>i.disconnect())})}function P3(t,e){if(t.shapeFlag&128){const n=t.suspense;t=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{P3(n.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)g_(t.el,e);else if(t.type===te)t.children.forEach(n=>P3(n,e));else if(t.type===xu){let{el:n,anchor:s}=t;for(;n&&(g_(n,e),n!==s);)n=n.nextSibling}}function g_(t,e){if(t.nodeType===1){const n=t.style;let s="";for(const i in e){const o=Wj(e[i]);n.setProperty(`--${i}`,o),s+=`--${i}: ${o};`}n[fI]=s}}const _G=/(?:^|;)\s*display\s*:/;function yG(t,e,n){const s=t.style,i=nt(n);let o=!1;if(n&&!i){if(e)if(nt(e))for(const r of e.split(";")){const a=r.slice(0,r.indexOf(":")).trim();n[a]==null&&N0(s,a,"")}else for(const r in e)n[r]==null&&N0(s,r,"");for(const r in n)r==="display"&&(o=!0),N0(s,r,n[r])}else if(i){if(e!==n){const r=s[fI];r&&(n+=";"+r),s.cssText=n,o=_G.test(n)}}else e&&t.removeAttribute("style");m_ in t&&(t[m_]=o?s.display:"",t[hI]&&(s.display="none"))}const TS=/\s*!important$/;function N0(t,e,n){if(Le(n))n.forEach(s=>N0(t,e,s));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const s=bG(t,e);TS.test(n)?t.setProperty(wi(s),n.replace(TS,""),"important"):t[s]=n}}const PS=["Webkit","Moz","ms"],C2={};function bG(t,e){const n=C2[e];if(n)return n;let s=Bn(e);if(s!=="filter"&&s in t)return C2[e]=s;s=Sc(s);for(let i=0;i<PS.length;i++){const o=PS[i]+s;if(o in t)return C2[e]=o}return e}const IS="http://www.w3.org/1999/xlink";function LS(t,e,n,s,i,o=Uj(e)){s&&e.startsWith("xlink:")?n==null?t.removeAttributeNS(IS,e.slice(6,e.length)):t.setAttributeNS(IS,e,n):n==null||o&&!OT(n)?t.removeAttribute(e):t.setAttribute(e,o?"":Xi(n)?String(n):n)}function OS(t,e,n,s,i){if(e==="innerHTML"||e==="textContent"){n!=null&&(t[e]=e==="innerHTML"?rI(n):n);return}const o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){const a=o==="OPTION"?t.getAttribute("value")||"":t.value,l=n==null?t.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in t))&&(t.value=l),n==null&&t.removeAttribute(e),t._value=n;return}let r=!1;if(n===""||n==null){const a=typeof t[e];a==="boolean"?n=OT(n):n==null&&a==="string"?(n="",r=!0):a==="number"&&(n=0,r=!0)}try{t[e]=n}catch{}r&&t.removeAttribute(i||e)}function Wa(t,e,n,s){t.addEventListener(e,n,s)}function wG(t,e,n,s){t.removeEventListener(e,n,s)}const DS=Symbol("_vei");function CG(t,e,n,s,i=null){const o=t[DS]||(t[DS]={}),r=o[e];if(s&&r)r.value=s;else{const[a,l]=kG(e);if(s){const c=o[e]=$G(s,i);Wa(t,a,c,l)}else r&&(wG(t,a,r,l),o[e]=void 0)}}const RS=/(?:Once|Passive|Capture)$/;function kG(t){let e;if(RS.test(t)){e={};let s;for(;s=t.match(RS);)t=t.slice(0,t.length-s[0].length),e[s[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):wi(t.slice(2)),e]}let k2=0;const xG=Promise.resolve(),SG=()=>k2||(xG.then(()=>k2=0),k2=Date.now());function $G(t,e){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;Zo(AG(s,n.value),e,5,[s])};return n.value=t,n.attached=SG(),n}function AG(t,e){if(Le(e)){const n=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{n.call(t),t._stopped=!0},e.map(s=>i=>!i._stopped&&s&&s(i))}else return e}const VS=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,pI=(t,e,n,s,i,o)=>{const r=i==="svg";e==="class"?mG(t,s,r):e==="style"?yG(t,n,s):sd(e)?bk(e)||CG(t,e,n,s,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):MG(t,e,s,r))?(OS(t,e,s),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&LS(t,e,s,r,o,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!nt(s))?OS(t,Bn(e),s,o,e):(e==="true-value"?t._trueValue=s:e==="false-value"&&(t._falseValue=s),LS(t,e,s,r))};function MG(t,e,n,s){if(s)return!!(e==="innerHTML"||e==="textContent"||e in t&&VS(e)&&ot(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&t.tagName==="IFRAME"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const i=t.tagName;if(i==="IMG"||i==="VIDEO"||i==="CANVAS"||i==="SOURCE")return!1}return VS(e)&&nt(n)?!1:e in t}const FS={};function mI(t,e,n){let s=se(t,e);jh(s)&&(s=Zt({},s,e));class i extends Ry{constructor(r){super(s,r,n)}}return i.def=s,i}const EG=(t,e)=>mI(t,e,$I),TG=typeof HTMLElement<"u"?HTMLElement:class{};class Ry extends TG{constructor(e,n={},s=Zm){super(),this._def=e,this._props=n,this._createApp=s,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&s!==Zm?this._root=this.shadowRoot:e.shadowRoot!==!1?(this.attachShadow(Zt({},e.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof Ry){this._parent=e;break}this._instance||(this._resolved?this._mount(this._def):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,dt(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(e){for(const n of e)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let s=0;s<this.attributes.length;s++)this._setAttr(this.attributes[s].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const e=(s,i=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:o,styles:r}=s;let a;if(o&&!Le(o))for(const l in o){const c=o[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=i_(this._props[l])),(a||(a=Object.create(null)))[Bn(l)]=!0)}this._numberProps=a,this._resolveProps(s),this.shadowRoot&&this._applyStyles(r),this._mount(s)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(s=>{s.configureApp=this._def.configureApp,e(this._def=s,!0)}):e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const s in n)Rt(this,s)||Object.defineProperty(this,s,{get:()=>A(n[s])})}_resolveProps(e){const{props:n}=e,s=Le(n)?n:Object.keys(n||{});for(const i of Object.keys(this))i[0]!=="_"&&s.includes(i)&&this._setProp(i,this[i]);for(const i of s.map(Bn))Object.defineProperty(this,i,{get(){return this._getProp(i)},set(o){this._setProp(i,o,!0,!this._patching)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const n=this.hasAttribute(e);let s=n?this.getAttribute(e):FS;const i=Bn(e);n&&this._numberProps&&this._numberProps[i]&&(s=i_(s)),this._setProp(i,s,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,n,s=!0,i=!1){if(n!==this._props[e]&&(this._dirty=!0,n===FS?delete this._props[e]:(this._props[e]=n,e==="key"&&this._app&&(this._app._ceVNode.key=n)),i&&this._instance&&this._update(),s)){const o=this._ob;o&&(this._processMutations(o.takeRecords()),o.disconnect()),n===!0?this.setAttribute(wi(e),""):typeof n=="string"||typeof n=="number"?this.setAttribute(wi(e),n+""):n||this.removeAttribute(wi(e)),o&&o.observe(this,{attributes:!0})}}_update(){const e=this._createVNode();this._app&&(e.appContext=this._app._context),fc(e,this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const n=_(this._def,Zt(e,this._props));return this._instance||(n.ce=s=>{this._instance=s,s.ce=this,s.isCE=!0;const i=(o,r)=>{this.dispatchEvent(new CustomEvent(o,jh(r[0])?Zt({detail:r},r[0]):{detail:r}))};s.emit=(o,...r)=>{i(o,r),wi(o)!==o&&i(wi(o),r)},this._setParent()}),n}_applyStyles(e,n){if(!e)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const s=this._nonce;for(let i=e.length-1;i>=0;i--){const o=document.createElement("style");s&&o.setAttribute("nonce",s),o.textContent=e[i],this.shadowRoot.prepend(o)}}_parseSlots(){const e=this._slots={};let n;for(;n=this.firstChild;){const s=n.nodeType===1&&n.getAttribute("slot")||"default";(e[s]||(e[s]=[])).push(n),this.removeChild(n)}}_renderSlots(){const e=this._getSlots(),n=this._instance.type.__scopeId;for(let s=0;s<e.length;s++){const i=e[s],o=i.getAttribute("name")||"default",r=this._slots[o],a=i.parentNode;if(r)for(const l of r){if(n&&l.nodeType===1){const c=n+"-s",u=document.createTreeWalker(l,1);l.setAttribute(c,"");let d;for(;d=u.nextNode();)d.setAttribute(c,"")}a.insertBefore(l,i)}else for(;i.firstChild;)a.insertBefore(i.firstChild,i);a.removeChild(i)}}_getSlots(){const e=[this];this._teleportTargets&&e.push(...this._teleportTargets);const n=new Set;for(const s of e){const i=s.querySelectorAll("slot");for(let o=0;o<i.length;o++)n.add(i[o])}return Array.from(n)}_injectChildStyle(e){this._applyStyles(e.styles,e)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_removeChildStyle(e){}}function gI(t){const e=pt(),n=e&&e.ce;return n||null}function PG(){const t=gI();return t&&t.shadowRoot}function IG(t="$style"){{const e=pt();if(!e)return sn;const n=e.type.__cssModules;if(!n)return sn;const s=n[t];return s||sn}}const vI=new WeakMap,_I=new WeakMap,v_=Symbol("_moveCb"),NS=Symbol("_enterCb"),LG=t=>(delete t.props.mode,t),OG=LG({name:"TransitionGroup",props:Zt({},cI,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=pt(),s=Tk();let i,o;return ll(()=>{if(!i.length)return;const r=t.moveClass||`${t.name||"v"}-move`;if(!FG(i[0].el,n.vnode.el,r)){i=[];return}i.forEach(DG),i.forEach(RG);const a=i.filter(VG);T3(n.vnode.el),a.forEach(l=>{const c=l.el,u=c.style;qr(c,r),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[v_]=h=>{h&&h.target!==c||(!h||h.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[v_]=null,wl(c,r))};c.addEventListener("transitionend",d)}),i=[]}),()=>{const r=Yt(t),a=uI(r);let l=r.tag||te;if(i=[],o)for(let c=0;c<o.length;c++){const u=o[c];u.el&&u.el instanceof Element&&(i.push(u),il(u,Yh(u,a,s,n)),vI.set(u,{left:u.el.offsetLeft,top:u.el.offsetTop}))}o=e.default?Iy(e.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&il(u,Yh(u,a,s,n))}return _(l,null,o)}}}),Vy=OG;function DG(t){const e=t.el;e[v_]&&e[v_](),e[NS]&&e[NS]()}function RG(t){_I.set(t,{left:t.el.offsetLeft,top:t.el.offsetTop})}function VG(t){const e=vI.get(t),n=_I.get(t),s=e.left-n.left,i=e.top-n.top;if(s||i){const o=t.el.style;return o.transform=o.webkitTransform=`translate(${s}px,${i}px)`,o.transitionDuration="0s",t}}function FG(t,e,n){const s=t.cloneNode(),i=t[qh];i&&i.forEach(a=>{a.split(/\s+/).forEach(l=>l&&s.classList.remove(l))}),n.split(/\s+/).forEach(a=>a&&s.classList.add(a)),s.style.display="none";const o=e.nodeType===1?e:e.parentNode;o.appendChild(s);const{hasTransform:r}=dI(s);return o.removeChild(s),r}const hc=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Le(e)?n=>$h(e,n):e};function NG(t){t.target.composing=!0}function BS(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Wo=Symbol("_assign");function zS(t,e,n){return e&&(t=t.trim()),n&&(t=wy(t)),t}const zu={created(t,{modifiers:{lazy:e,trim:n,number:s}},i){t[Wo]=hc(i);const o=s||i.props&&i.props.type==="number";Wa(t,e?"change":"input",r=>{r.target.composing||t[Wo](zS(t.value,n,o))}),(n||o)&&Wa(t,"change",()=>{t.value=zS(t.value,n,o)}),e||(Wa(t,"compositionstart",NG),Wa(t,"compositionend",BS),Wa(t,"change",BS))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:s,trim:i,number:o}},r){if(t[Wo]=hc(r),t.composing)return;const a=(o||t.type==="number")&&!/^0\d/.test(t.value)?wy(t.value):t.value,l=e??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(s&&e===n||i&&t.value.trim()===l)||(t.value=l))}},Hu={deep:!0,created(t,e,n){t[Wo]=hc(n),Wa(t,"change",()=>{const s=t._modelValue,i=Xh(t),o=t.checked,r=t[Wo];if(Le(s)){const a=ky(s,i),l=a!==-1;if(o&&!l)r(s.concat(i));else if(!o&&l){const c=[...s];c.splice(a,1),r(c)}}else if(id(s)){const a=new Set(s);o?a.add(i):a.delete(i),r(a)}else r(bI(t,o))})},mounted:HS,beforeUpdate(t,e,n){t[Wo]=hc(n),HS(t,e,n)}};function HS(t,{value:e,oldValue:n},s){t._modelValue=e;let i;if(Le(e))i=ky(e,s.props.value)>-1;else if(id(e))i=e.has(s.props.value);else{if(e===n)return;i=uc(e,bI(t,!0))}t.checked!==i&&(t.checked=i)}const Ug={created(t,{value:e},n){t.checked=uc(e,n.props.value),t[Wo]=hc(n),Wa(t,"change",()=>{t[Wo](Xh(t))})},beforeUpdate(t,{value:e,oldValue:n},s){t[Wo]=hc(s),e!==n&&(t.checked=uc(e,s.props.value))}},yI={deep:!0,created(t,{value:e,modifiers:{number:n}},s){const i=id(e);Wa(t,"change",()=>{const o=Array.prototype.filter.call(t.options,r=>r.selected).map(r=>n?wy(Xh(r)):Xh(r));t[Wo](t.multiple?i?new Set(o):o:o[0]),t._assigning=!0,dt(()=>{t._assigning=!1})}),t[Wo]=hc(s)},mounted(t,{value:e}){US(t,e)},beforeUpdate(t,e,n){t[Wo]=hc(n)},updated(t,{value:e}){t._assigning||US(t,e)}};function US(t,e){const n=t.multiple,s=Le(e);if(!(n&&!s&&!id(e))){for(let i=0,o=t.options.length;i<o;i++){const r=t.options[i],a=Xh(r);if(n)if(s){const l=typeof a;l==="string"||l==="number"?r.selected=e.some(c=>String(c)===String(a)):r.selected=ky(e,a)>-1}else r.selected=e.has(a);else if(uc(Xh(r),e)){t.selectedIndex!==i&&(t.selectedIndex=i);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function Xh(t){return"_value"in t?t._value:t.value}function bI(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const wI={created(t,e,n){e0(t,e,n,null,"created")},mounted(t,e,n){e0(t,e,n,null,"mounted")},beforeUpdate(t,e,n,s){e0(t,e,n,s,"beforeUpdate")},updated(t,e,n,s){e0(t,e,n,s,"updated")}};function CI(t,e){switch(t){case"SELECT":return yI;case"TEXTAREA":return zu;default:switch(e){case"checkbox":return Hu;case"radio":return Ug;default:return zu}}}function e0(t,e,n,s,i){const r=CI(t.tagName,n.props&&n.props.type)[i];r&&r(t,e,n,s)}function BG(){zu.getSSRProps=({value:t})=>({value:t}),Ug.getSSRProps=({value:t},e)=>{if(e.props&&uc(e.props.value,t))return{checked:!0}},Hu.getSSRProps=({value:t},e)=>{if(Le(t)){if(e.props&&ky(t,e.props.value)>-1)return{checked:!0}}else if(id(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},wI.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const n=CI(e.type.toUpperCase(),e.props&&e.props.type);if(n.getSSRProps)return n.getSSRProps(t,e)}}const zG=["ctrl","shift","alt","meta"],HG={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)=>zG.some(n=>t[`${n}Key`]&&!e.includes(n))},Be=(t,e)=>{const n=t._withMods||(t._withMods={}),s=e.join(".");return n[s]||(n[s]=(i,...o)=>{for(let r=0;r<e.length;r++){const a=HG[e[r]];if(a&&a(i,e))return}return t(i,...o)})},UG={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},$t=(t,e)=>{const n=t._withKeys||(t._withKeys={}),s=e.join(".");return n[s]||(n[s]=i=>{if(!("key"in i))return;const o=wi(i.key);if(e.some(r=>r===o||UG[r]===o))return t(i)})},kI=Zt({patchProp:pI},aI);let um,jS=!1;function xI(){return um||(um=BP(kI))}function SI(){return um=jS?um:zP(kI),jS=!0,um}const fc=(...t)=>{xI().render(...t)},jG=(...t)=>{SI().hydrate(...t)},Zm=(...t)=>{const e=xI().createApp(...t),{mount:n}=e;return e.mount=s=>{const i=MI(s);if(!i)return;const o=e._component;!ot(o)&&!o.render&&!o.template&&(o.template=i.innerHTML),i.nodeType===1&&(i.textContent="");const r=n(i,!1,AI(i));return i instanceof Element&&(i.removeAttribute("v-cloak"),i.setAttribute("data-v-app","")),r},e},$I=(...t)=>{const e=SI().createApp(...t),{mount:n}=e;return e.mount=s=>{const i=MI(s);if(i)return n(i,!0,AI(i))},e};function AI(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function MI(t){return nt(t)?document.querySelector(t):t}let WS=!1;const WG=()=>{WS||(WS=!0,BG(),gG())},YG=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:_P,BaseTransitionPropsValidators:Pk,Comment:Qn,DeprecationTypes:cG,EffectScope:kk,ErrorCodes:TW,ErrorTypeStrings:nG,Fragment:te,KeepAlive:sY,ReactiveEffect:Hm,Static:xu,Suspense:BY,Teleport:va,Text:ra,TrackOpTypes:kW,Transition:bo,TransitionGroup:Vy,TriggerOpTypes:xW,VueElement:Ry,assertNumber:EW,callWithAsyncErrorHandling:Zo,callWithErrorHandling:Pf,camelize:Bn,capitalize:Sc,cloneVNode:Tr,compatUtils:lG,computed:q,createApp:Zm,createBlock:R,createCommentVNode:O,createElementBlock:$,createElementVNode:g,createHydrationRenderer:zP,createPropsRestProxy:gY,createRenderer:BP,createSSRApp:$I,createSlots:Es,createStaticVNode:ya,createTextVNode:G,createVNode:_,customRef:QT,defineAsyncComponent:tY,defineComponent:se,defineCustomElement:mI,defineEmits:lY,defineExpose:cY,defineModel:hY,defineOptions:uY,defineProps:aY,defineSSRCustomElement:EG,defineSlots:dY,devtools:sG,effect:Gj,effectScope:xy,getCurrentInstance:pt,getCurrentScope:Sy,getCurrentWatcher:SW,getTransitionRawChildren:Iy,guardReactiveProps:Uk,h:gt,handleError:od,hasInjectionContext:aP,hydrate:jG,hydrateOnIdle:XW,hydrateOnInteraction:QW,hydrateOnMediaQuery:JW,hydrateOnVisible:ZW,initCustomFormatter:eG,initDirectivesForSSR:WG,inject:qe,isMemoSame:sI,isProxy:Ng,isReactive:yr,isReadonly:ca,isRef:hn,isRuntimeOnly:ZY,isShallow:Wi,isVNode:Gs,markRaw:Ki,mergeDefaults:pY,mergeModels:mY,mergeProps:Mn,nextTick:dt,nodeOps:aI,normalizeClass:W,normalizeProps:Ck,normalizeStyle:Ke,onActivated:Lk,onBeforeMount:rd,onBeforeUnmount:Gn,onBeforeUpdate:Dk,onDeactivated:Ok,onErrorCaptured:xP,onMounted:Pt,onRenderTracked:kP,onRenderTriggered:CP,onScopeDispose:$y,onServerPrefetch:wP,onUnmounted:_a,onUpdated:ll,onWatcherCleanup:tP,openBlock:v,patchProp:pI,popScopeId:DW,provide:It,proxyRefs:Mk,pushScopeId:OW,queuePostFlushCb:Wm,reactive:as,readonly:dc,ref:J,registerRuntimeCompiler:eI,render:fc,renderList:be,renderSlot:ae,resolveComponent:H,resolveDirective:_t,resolveDynamicComponent:Tt,resolveFilter:aG,resolveTransitionHooks:Yh,setBlockTracking:Km,setDevtoolsHook:iG,setTransitionHooks:il,shallowReactive:Ak,shallowReadonly:fW,shallowRef:ss,ssrContextKey:lP,ssrUtils:rG,stop:qj,toDisplayString:M,toHandlerKey:wu,toHandlers:$P,toRaw:Yt,toRef:kn,toRefs:yo,toValue:gW,transformVNodeArgs:YY,triggerRef:mW,unref:A,useAttrs:If,useCssModule:IG,useCssVars:vG,useHost:gI,useId:zW,useModel:SY,useSSRContext:cP,useShadowRoot:PG,useSlots:Zi,useTemplateRef:HW,useTransitionState:Tk,vModelCheckbox:Hu,vModelDynamic:wI,vModelRadio:Ug,vModelSelect:yI,vModelText:zu,vShow:Xt,version:iI,warn:oI,watch:Te,watchEffect:br,watchPostEffect:VW,watchSyncEffect:uP,withAsyncContext:vY,withCtx:w,withDefaults:fY,withDirectives:Pe,withKeys:$t,withMemo:tG,withModifiers:Be,withScopeId:RW},Symbol.toStringTag,{value:"Module"}));/** | |
| 19 | +**/let $k;const T9=typeof window<"u"&&window.trustedTypes;if(T9)try{$k=T9.createPolicy("vue",{createHTML:t=>t})}catch{}const iL=$k?t=>$k.createHTML(t):t=>t,wG="http://www.w3.org/2000/svg",kG="http://www.w3.org/1998/Math/MathML",Ka=typeof document<"u"?document:null,P9=Ka&&Ka.createElement("template"),oL={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"?Ka.createElementNS(wG,t):e==="mathml"?Ka.createElementNS(kG,t):n?Ka.createElement(t,{is:n}):Ka.createElement(t);return t==="select"&&i&&i.multiple!=null&&s.setAttribute("multiple",i.multiple),s},createText:t=>Ka.createTextNode(t),createComment:t=>Ka.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Ka.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{P9.innerHTML=iL(i==="svg"?`<svg>${t}</svg>`:i==="mathml"?`<math>${t}</math>`:t);const a=P9.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]}},Nl="transition",Hp="animation",$f=Symbol("_vtc"),rL={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},aL=cn({},$6,rL),CG=t=>(t.displayName="Transition",t.props=aL,t),Ho=CG((t,{slots:e})=>bt(vI,lL(t),e)),pu=(t,e=[])=>{Me(t)?t.forEach(n=>n(...e)):t&&t(...e)},I9=t=>t?Me(t)?t.some(e=>e.length>1):t.length>1:!1;function lL(t){const e={};for(const V in t)V in rL||(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=xG(s),m=p&&p[0],y=p&&p[1],{onBeforeEnter:b,onEnter:k,onEnterCancelled:C,onLeave:$,onLeaveCancelled:S,onBeforeAppear:M=b,onAppear:P=k,onAppearCancelled:T=C}=e,I=(V,B,F,z)=>{V._enterCancelled=z,Wl(V,B?u:a),Wl(V,B?c:r),F&&F()},L=(V,B)=>{V._isLeaving=!1,Wl(V,d),Wl(V,f),Wl(V,h),B&&B()},R=V=>(B,F)=>{const z=V?P:k,U=()=>I(B,V,F);pu(z,[B,U]),L9(()=>{Wl(B,V?l:o),da(B,V?u:a),I9(z)||O9(B,i,m,U)})};return cn(e,{onBeforeEnter(V){pu(b,[V]),da(V,o),da(V,r)},onBeforeAppear(V){pu(M,[V]),da(V,l),da(V,c)},onEnter:R(!1),onAppear:R(!0),onLeave(V,B){V._isLeaving=!0;const F=()=>L(V,B);da(V,d),V._enterCancelled?(da(V,h),Ak(V)):(Ak(V),da(V,h)),L9(()=>{V._isLeaving&&(Wl(V,d),da(V,f),I9($)||O9(V,i,y,F))}),pu($,[V,F])},onEnterCancelled(V){I(V,!1,void 0,!0),pu(C,[V])},onAppearCancelled(V){I(V,!0,void 0,!0),pu(T,[V])},onLeaveCancelled(V){L(V),pu(S,[V])}})}function xG(t){if(t==null)return null;if(yt(t))return[hw(t.enter),hw(t.leave)];{const e=hw(t);return[e,e]}}function hw(t){return U_(t)}function da(t,e){e.split(/\s+/).forEach(n=>n&&t.classList.add(n)),(t[$f]||(t[$f]=new Set)).add(e)}function Wl(t,e){e.split(/\s+/).forEach(i=>i&&t.classList.remove(i));const n=t[$f];n&&(n.delete(e),n.size||(t[$f]=void 0))}function L9(t){requestAnimationFrame(()=>{requestAnimationFrame(t)})}let SG=0;function O9(t,e,n,i){const s=t._endId=++SG,o=()=>{s===t._endId&&i()};if(n!=null)return setTimeout(o,n);const{type:r,timeout:a,propCount:l}=cL(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 cL(t,e){const n=window.getComputedStyle(t),i=p=>(n[p]||"").split(", "),s=i(`${Nl}Delay`),o=i(`${Nl}Duration`),r=D9(s,o),a=i(`${Hp}Delay`),l=i(`${Hp}Duration`),c=D9(a,l);let u=null,d=0,h=0;e===Nl?r>0&&(u=Nl,d=r,h=o.length):e===Hp?c>0&&(u=Hp,d=c,h=l.length):(d=Math.max(r,c),u=d>0?r>c?Nl:Hp:null,h=u?u===Nl?o.length:l.length:0);const f=u===Nl&&/\b(?:transform|all)(?:,|$)/.test(i(`${Nl}Property`).toString());return{type:u,timeout:d,propCount:h,hasTransform:f}}function D9(t,e){for(;t.length<e.length;)t=t.concat(t);return Math.max(...e.map((n,i)=>R9(n)+R9(t[i])))}function R9(t){return t==="auto"?0:Number(t.slice(0,-1).replace(",","."))*1e3}function Ak(t){return(t?t.ownerDocument:document).body.offsetHeight}function $G(t,e,n){const i=t[$f];i&&(e=(e?[e,...i]:[...i]).join(" ")),e==null?t.removeAttribute("class"):n?t.setAttribute("class",e):t.className=e}const ey=Symbol("_vod"),uL=Symbol("_vsh"),jt={name:"show",beforeMount(t,{value:e},{transition:n}){t[ey]=t.style.display==="none"?"":t.style.display,n&&e?n.beforeEnter(t):Up(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),Up(t,!0),i.enter(t)):i.leave(t,()=>{Up(t,!1)}):Up(t,e))},beforeUnmount(t,{value:e}){Up(t,e)}};function Up(t,e){t.style.display=e?t[ey]:"none",t[uL]=!e}function AG(){jt.getSSRProps=({value:t})=>{if(!t)return{style:{display:"none"}}}}const dL=Symbol("");function EG(t){const e=pt();if(!e)return;const n=e.ut=(s=t(e.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${e.uid}"]`)).forEach(o=>ty(o,s))},i=()=>{const s=t(e.proxy);e.ce?ty(e.ce,s):Ek(e.subTree,s),n(s)};Cb(()=>{Sg(i)}),Ft(()=>{Te(i,Dt,{flush:"post"});const s=new MutationObserver(i);s.observe(e.subTree.el.parentNode,{childList:!0}),Sl(()=>s.disconnect())})}function Ek(t,e){if(t.shapeFlag&128){const n=t.suspense;t=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{Ek(n.activeBranch,e)})}for(;t.component;)t=t.component.subTree;if(t.shapeFlag&1&&t.el)ty(t.el,e);else if(t.type===ee)t.children.forEach(n=>Ek(n,e));else if(t.type===Ku){let{el:n,anchor:i}=t;for(;n&&(ty(n,e),n!==i);)n=n.nextSibling}}function ty(t,e){if(t.nodeType===1){const n=t.style;let i="";for(const s in e){const o=iY(e[s]);n.setProperty(`--${s}`,o),i+=`--${s}: ${o};`}n[dL]=i}}const MG=/(?:^|;)\s*display\s*:/;function TG(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&&A0(i,a,"")}else for(const r in e)n[r]==null&&A0(i,r,"");for(const r in n)r==="display"&&(o=!0),A0(i,r,n[r])}else if(s){if(e!==n){const r=i[dL];r&&(n+=";"+r),i.cssText=n,o=MG.test(n)}}else e&&t.removeAttribute("style");ey in t&&(t[ey]=o?i.display:"",t[uL]&&(i.display="none"))}const V9=/\s*!important$/;function A0(t,e,n){if(Me(n))n.forEach(i=>A0(t,e,i));else if(n==null&&(n=""),e.startsWith("--"))t.setProperty(e,n);else{const i=PG(t,e);V9.test(n)?t.setProperty(zi(i),n.replace(V9,""),"important"):t[i]=n}}const F9=["Webkit","Moz","ms"],fw={};function PG(t,e){const n=fw[e];if(n)return n;let i=Un(e);if(i!=="filter"&&i in t)return fw[e]=i;i=Gc(i);for(let s=0;s<F9.length;s++){const o=F9[s]+i;if(o in t)return fw[e]=o}return e}const N9="http://www.w3.org/1999/xlink";function B9(t,e,n,i,s,o=nY(e)){i&&e.startsWith("xlink:")?n==null?t.removeAttributeNS(N9,e.slice(6,e.length)):t.setAttributeNS(N9,e,n):n==null||o&&!LP(n)?t.removeAttribute(e):t.setAttribute(e,o?"":mo(n)?String(n):n)}function z9(t,e,n,i,s){if(e==="innerHTML"||e==="textContent"){n!=null&&(t[e]=e==="innerHTML"?iL(n):n);return}const o=t.tagName;if(e==="value"&&o!=="PROGRESS"&&!o.includes("-")){const a=o==="OPTION"?t.getAttribute("value")||"":t.value,l=n==null?t.type==="checkbox"?"on":"":String(n);(a!==l||!("_value"in t))&&(t.value=l),n==null&&t.removeAttribute(e),t._value=n;return}let r=!1;if(n===""||n==null){const a=typeof t[e];a==="boolean"?n=LP(n):n==null&&a==="string"?(n="",r=!0):a==="number"&&(n=0,r=!0)}try{t[e]=n}catch{}r&&t.removeAttribute(s||e)}function sl(t,e,n,i){t.addEventListener(e,n,i)}function IG(t,e,n,i){t.removeEventListener(e,n,i)}const H9=Symbol("_vei");function LG(t,e,n,i,s=null){const o=t[H9]||(t[H9]={}),r=o[e];if(i&&r)r.value=i;else{const[a,l]=OG(e);if(i){const c=o[e]=VG(i,s);sl(t,a,c,l)}else r&&(IG(t,a,r,l),o[e]=void 0)}}const U9=/(?:Once|Passive|Capture)$/;function OG(t){let e;if(U9.test(t)){e={};let i;for(;i=t.match(U9);)t=t.slice(0,t.length-i[0].length),e[i[0].toLowerCase()]=!0}return[t[2]===":"?t.slice(3):zi(t.slice(2)),e]}let pw=0;const DG=Promise.resolve(),RG=()=>pw||(DG.then(()=>pw=0),pw=Date.now());function VG(t,e){const n=i=>{if(!i._vts)i._vts=Date.now();else if(i._vts<=n.attached)return;vr(FG(i,n.value),e,5,[i])};return n.value=t,n.attached=RG(),n}function FG(t,e){if(Me(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 j9=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,hL=(t,e,n,i,s,o)=>{const r=s==="svg";e==="class"?$G(t,i,r):e==="style"?TG(t,n,i):Pd(e)?g6(e)||LG(t,e,n,i,o):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):NG(t,e,i,r))?(z9(t,e,i),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&B9(t,e,i,r,o,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!Ke(i))?z9(t,Un(e),i,o,e):(e==="true-value"?t._trueValue=i:e==="false-value"&&(t._falseValue=i),B9(t,e,i,r))};function NG(t,e,n,i){if(i)return!!(e==="innerHTML"||e==="textContent"||e in t&&j9(e)&&et(n));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="sandbox"&&t.tagName==="IFRAME"||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 j9(e)&&Ke(n)?!1:e in t}const W9={};function fL(t,e,n){let i=fe(t,e);hd(i)&&(i=cn({},i,e));class s extends Ab{constructor(r){super(i,r,n)}}return s.def=i,s}const BG=(t,e)=>fL(t,e,xL),zG=typeof HTMLElement<"u"?HTMLElement:class{};class Ab extends zG{constructor(e,n={},i=Pg){super(),this._def=e,this._props=n,this._createApp=i,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&i!==Pg?this._root=this.shadowRoot:e.shadowRoot!==!1?(this.attachShadow(cn({},e.shadowRootOptions,{mode:"open"})),this._root=this.shadowRoot):this._root=this}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof Ab){this._parent=e;break}this._instance||(this._resolved?this._mount(this._def):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then(()=>{this._pendingResolve=void 0,this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,ot(()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&(this._teleportTargets.clear(),this._teleportTargets=void 0))})}_processMutations(e){for(const n of e)this._setAttr(n.attributeName)}_resolveDef(){if(this._pendingResolve)return;for(let i=0;i<this.attributes.length;i++)this._setAttr(this.attributes[i].name);this._ob=new MutationObserver(this._processMutations.bind(this)),this._ob.observe(this,{attributes:!0});const e=(i,s=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:o,styles:r}=i;let a;if(o&&!Me(o))for(const l in o){const c=o[l];(c===Number||c&&c.type===Number)&&(l in this._props&&(this._props[l]=U_(this._props[l])),(a||(a=Object.create(null)))[Un(l)]=!0)}this._numberProps=a,this._resolveProps(i),this.shadowRoot&&this._applyStyles(r),this._mount(i)},n=this._def.__asyncLoader;n?this._pendingResolve=n().then(i=>{i.configureApp=this._def.configureApp,e(this._def=i,!0)}):e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const n=this._instance&&this._instance.exposed;if(n)for(const i in n)zt(this,i)||Object.defineProperty(this,i,{get:()=>E(n[i])})}_resolveProps(e){const{props:n}=e,i=Me(n)?n:Object.keys(n||{});for(const s of Object.keys(this))s[0]!=="_"&&i.includes(s)&&this._setProp(s,this[s]);for(const s of i.map(Un))Object.defineProperty(this,s,{get(){return this._getProp(s)},set(o){this._setProp(s,o,!0,!this._patching)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const n=this.hasAttribute(e);let i=n?this.getAttribute(e):W9;const s=Un(e);n&&this._numberProps&&this._numberProps[s]&&(i=U_(i)),this._setProp(s,i,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,n,i=!0,s=!1){if(n!==this._props[e]&&(this._dirty=!0,n===W9?delete this._props[e]:(this._props[e]=n,e==="key"&&this._app&&(this._app._ceVNode.key=n)),s&&this._instance&&this._update(),i)){const o=this._ob;o&&(this._processMutations(o.takeRecords()),o.disconnect()),n===!0?this.setAttribute(zi(e),""):typeof n=="string"||typeof n=="number"?this.setAttribute(zi(e),n+""):n||this.removeAttribute(zi(e)),o&&o.observe(this,{attributes:!0})}}_update(){const e=this._createVNode();this._app&&(e.appContext=this._app._context),Fc(e,this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const n=_(this._def,cn(e,this._props));return this._instance||(n.ce=i=>{this._instance=i,i.ce=this,i.isCE=!0;const s=(o,r)=>{this.dispatchEvent(new CustomEvent(o,hd(r[0])?cn({detail:r},r[0]):{detail:r}))};i.emit=(o,...r)=>{s(o,r),zi(o)!==o&&s(zi(o),r)},this._setParent()}),n}_applyStyles(e,n){if(!e)return;if(n){if(n===this._def||this._styleChildren.has(n))return;this._styleChildren.add(n)}const i=this._nonce;for(let s=e.length-1;s>=0;s--){const o=document.createElement("style");i&&o.setAttribute("nonce",i),o.textContent=e[s],this.shadowRoot.prepend(o)}}_parseSlots(){const e=this._slots={};let n;for(;n=this.firstChild;){const i=n.nodeType===1&&n.getAttribute("slot")||"default";(e[i]||(e[i]=[])).push(n),this.removeChild(n)}}_renderSlots(){const e=this._getSlots(),n=this._instance.type.__scopeId;for(let i=0;i<e.length;i++){const s=e[i],o=s.getAttribute("name")||"default",r=this._slots[o],a=s.parentNode;if(r)for(const l of r){if(n&&l.nodeType===1){const c=n+"-s",u=document.createTreeWalker(l,1);l.setAttribute(c,"");let d;for(;d=u.nextNode();)d.setAttribute(c,"")}a.insertBefore(l,s)}else for(;s.firstChild;)a.insertBefore(s.firstChild,s);a.removeChild(s)}}_getSlots(){const e=[this];this._teleportTargets&&e.push(...this._teleportTargets);const n=new Set;for(const i of e){const s=i.querySelectorAll("slot");for(let o=0;o<s.length;o++)n.add(s[o])}return Array.from(n)}_injectChildStyle(e){this._applyStyles(e.styles,e)}_beginPatch(){this._patching=!0,this._dirty=!1}_endPatch(){this._patching=!1,this._dirty&&this._instance&&this._update()}_removeChildStyle(e){}}function pL(t){const e=pt(),n=e&&e.ce;return n||null}function HG(){const t=pL();return t&&t.shadowRoot}function UG(t="$style"){{const e=pt();if(!e)return pn;const n=e.type.__cssModules;if(!n)return pn;const i=n[t];return i||pn}}const mL=new WeakMap,gL=new WeakMap,ny=Symbol("_moveCb"),Y9=Symbol("_enterCb"),jG=t=>(delete t.props.mode,t),WG=jG({name:"TransitionGroup",props:cn({},aL,{tag:String,moveClass:String}),setup(t,{slots:e}){const n=pt(),i=S6();let s,o;return xl(()=>{if(!s.length)return;const r=t.moveClass||`${t.name||"v"}-move`;if(!XG(s[0].el,n.vnode.el,r)){s=[];return}s.forEach(YG),s.forEach(qG);const a=s.filter(GG);Ak(n.vnode.el),a.forEach(l=>{const c=l.el,u=c.style;da(c,r),u.transform=u.webkitTransform=u.transitionDuration="";const d=c[ny]=h=>{h&&h.target!==c||(!h||h.propertyName.endsWith("transform"))&&(c.removeEventListener("transitionend",d),c[ny]=null,Wl(c,r))};c.addEventListener("transitionend",d)}),s=[]}),()=>{const r=an(t),a=lL(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),yl(u,xf(u,a,i,n)),mL.set(u,{left:u.el.offsetLeft,top:u.el.offsetTop}))}o=e.default?wb(e.default()):[];for(let c=0;c<o.length;c++){const u=o[c];u.key!=null&&yl(u,xf(u,a,i,n))}return _(l,null,o)}}}),Eb=WG;function YG(t){const e=t.el;e[ny]&&e[ny](),e[Y9]&&e[Y9]()}function qG(t){gL.set(t,{left:t.el.offsetLeft,top:t.el.offsetTop})}function GG(t){const e=mL.get(t),n=gL.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 XG(t,e,n){const i=t.cloneNode(),s=t[$f];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}=cL(i);return o.removeChild(i),r}const Vc=t=>{const e=t.props["onUpdate:modelValue"]||!1;return Me(e)?n=>Qh(e,n):e};function KG(t){t.target.composing=!0}function q9(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const hr=Symbol("_assign");function G9(t,e,n){return e&&(t=t.trim()),n&&(t=ub(t)),t}const md={created(t,{modifiers:{lazy:e,trim:n,number:i}},s){t[hr]=Vc(s);const o=i||s.props&&s.props.type==="number";sl(t,e?"change":"input",r=>{r.target.composing||t[hr](G9(t.value,n,o))}),(n||o)&&sl(t,"change",()=>{t.value=G9(t.value,n,o)}),e||(sl(t,"compositionstart",KG),sl(t,"compositionend",q9),sl(t,"change",q9))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:n,modifiers:{lazy:i,trim:s,number:o}},r){if(t[hr]=Vc(r),t.composing)return;const a=(o||t.type==="number")&&!/^0\d/.test(t.value)?ub(t.value):t.value,l=e??"";a!==l&&(document.activeElement===t&&t.type!=="range"&&(i&&e===n||s&&t.value.trim()===l)||(t.value=l))}},A1={deep:!0,created(t,e,n){t[hr]=Vc(n),sl(t,"change",()=>{const i=t._modelValue,s=Af(t),o=t.checked,r=t[hr];if(Me(i)){const a=hb(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(Id(i)){const a=new Set(i);o?a.add(s):a.delete(s),r(a)}else r(_L(t,o))})},mounted:X9,beforeUpdate(t,e,n){t[hr]=Vc(n),X9(t,e,n)}};function X9(t,{value:e,oldValue:n},i){t._modelValue=e;let s;if(Me(e))s=hb(e,i.props.value)>-1;else if(Id(e))s=e.has(i.props.value);else{if(e===n)return;s=Dc(e,_L(t,!0))}t.checked!==s&&(t.checked=s)}const E1={created(t,{value:e},n){t.checked=Dc(e,n.props.value),t[hr]=Vc(n),sl(t,"change",()=>{t[hr](Af(t))})},beforeUpdate(t,{value:e,oldValue:n},i){t[hr]=Vc(i),e!==n&&(t.checked=Dc(e,i.props.value))}},vL={deep:!0,created(t,{value:e,modifiers:{number:n}},i){const s=Id(e);sl(t,"change",()=>{const o=Array.prototype.filter.call(t.options,r=>r.selected).map(r=>n?ub(Af(r)):Af(r));t[hr](t.multiple?s?new Set(o):o:o[0]),t._assigning=!0,ot(()=>{t._assigning=!1})}),t[hr]=Vc(i)},mounted(t,{value:e}){K9(t,e)},beforeUpdate(t,e,n){t[hr]=Vc(n)},updated(t,{value:e}){t._assigning||K9(t,e)}};function K9(t,e){const n=t.multiple,i=Me(e);if(!(n&&!i&&!Id(e))){for(let s=0,o=t.options.length;s<o;s++){const r=t.options[s],a=Af(r);if(n)if(i){const l=typeof a;l==="string"||l==="number"?r.selected=e.some(c=>String(c)===String(a)):r.selected=hb(e,a)>-1}else r.selected=e.has(a);else if(Dc(Af(r),e)){t.selectedIndex!==s&&(t.selectedIndex=s);return}}!n&&t.selectedIndex!==-1&&(t.selectedIndex=-1)}}function Af(t){return"_value"in t?t._value:t.value}function _L(t,e){const n=e?"_trueValue":"_falseValue";return n in t?t[n]:e}const yL={created(t,e,n){Bv(t,e,n,null,"created")},mounted(t,e,n){Bv(t,e,n,null,"mounted")},beforeUpdate(t,e,n,i){Bv(t,e,n,i,"beforeUpdate")},updated(t,e,n,i){Bv(t,e,n,i,"updated")}};function bL(t,e){switch(t){case"SELECT":return vL;case"TEXTAREA":return md;default:switch(e){case"checkbox":return A1;case"radio":return E1;default:return md}}}function Bv(t,e,n,i,s){const r=bL(t.tagName,n.props&&n.props.type)[s];r&&r(t,e,n,i)}function ZG(){md.getSSRProps=({value:t})=>({value:t}),E1.getSSRProps=({value:t},e)=>{if(e.props&&Dc(e.props.value,t))return{checked:!0}},A1.getSSRProps=({value:t},e)=>{if(Me(t)){if(e.props&&hb(t,e.props.value)>-1)return{checked:!0}}else if(Id(t)){if(e.props&&t.has(e.props.value))return{checked:!0}}else if(t)return{checked:!0}},yL.getSSRProps=(t,e)=>{if(typeof e.type!="string")return;const n=bL(e.type.toUpperCase(),e.props&&e.props.type);if(n.getSSRProps)return n.getSSRProps(t,e)}}const JG=["ctrl","shift","alt","meta"],QG={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)=>JG.some(n=>t[`${n}Key`]&&!e.includes(n))},Ee=(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=QG[e[r]];if(a&&a(s,e))return}return t(s,...o)})},eX={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=zi(s.key);if(e.some(r=>r===o||eX[r]===o))return t(s)})},wL=cn({patchProp:hL},oL);let Ym,Z9=!1;function kL(){return Ym||(Ym=FI(wL))}function CL(){return Ym=Z9?Ym:NI(wL),Z9=!0,Ym}const Fc=(...t)=>{kL().render(...t)},tX=(...t)=>{CL().hydrate(...t)},Pg=(...t)=>{const e=kL().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=$L(i);if(!s)return;const o=e._component;!et(o)&&!o.render&&!o.template&&(o.template=s.innerHTML),s.nodeType===1&&(s.textContent="");const r=n(s,!1,SL(s));return s instanceof Element&&(s.removeAttribute("v-cloak"),s.setAttribute("data-v-app","")),r},e},xL=(...t)=>{const e=CL().createApp(...t),{mount:n}=e;return e.mount=i=>{const s=$L(i);if(s)return n(s,!0,SL(s))},e};function SL(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function $L(t){return Ke(t)?document.querySelector(t):t}let J9=!1;const nX=()=>{J9||(J9=!0,ZG(),AG())},sX=Object.freeze(Object.defineProperty({__proto__:null,BaseTransition:vI,BaseTransitionPropsValidators:$6,Comment:Zn,DeprecationTypes:bG,EffectScope:_6,ErrorCodes:zY,ErrorTypeStrings:fG,Fragment:ee,KeepAlive:pq,ReactiveEffect:kg,Static:Ku,Suspense:Zq,Teleport:ea,Text:xa,TrackOpTypes:OY,Transition:Ho,TransitionGroup:Eb,TriggerOpTypes:DY,VueElement:Ab,assertNumber:BY,callWithAsyncErrorHandling:vr,callWithErrorHandling:ap,camelize:Un,capitalize:Gc,cloneVNode:_r,compatUtils:yG,computed:Y,createApp:Pg,createBlock:D,createCommentVNode:O,createElementBlock:A,createElementVNode:g,createHydrationRenderer:NI,createPropsRestProxy:Aq,createRenderer:FI,createSSRApp:xL,createSlots:hs,createStaticVNode:Ra,createTextVNode:N,createVNode:_,customRef:JP,defineAsyncComponent:hq,defineComponent:fe,defineCustomElement:fL,defineEmits:yq,defineExpose:bq,defineModel:Cq,defineOptions:wq,defineProps:_q,defineSSRCustomElement:BG,defineSlots:kq,devtools:pG,effect:rY,effectScope:fb,getCurrentInstance:pt,getCurrentScope:pb,getCurrentWatcher:RY,getTransitionRawChildren:wb,guardReactiveProps:of,h:bt,handleError:Ld,hasInjectionContext:rI,hydrate:tX,hydrateOnIdle:rq,hydrateOnInteraction:uq,hydrateOnMediaQuery:cq,hydrateOnVisible:lq,initCustomFormatter:dG,initDirectivesForSSR:nX,inject:qe,isMemoSame:tL,isProxy:C1,isReactive:Fr,isReadonly:Aa,isRef:hn,isRuntimeOnly:lG,isShallow:uo,isVNode:is,markRaw:Pi,mergeDefaults:Sq,mergeModels:$q,mergeProps:Wt,nextTick:ot,nodeOps:oL,normalizeClass:q,normalizeProps:ef,normalizeStyle:Xe,onActivated:E6,onBeforeMount:Od,onBeforeUnmount:wn,onBeforeUpdate:Cb,onDeactivated:M6,onErrorCaptured:CI,onMounted:Ft,onRenderTracked:kI,onRenderTriggered:wI,onScopeDispose:mb,onServerPrefetch:bI,onUnmounted:Sl,onUpdated:xl,onWatcherCleanup:eI,openBlock:v,patchProp:hL,popScopeId:YY,provide:Pt,proxyRefs:C6,pushScopeId:WY,queuePostFlushCb:Sg,reactive:In,readonly:Rc,ref:J,registerRuntimeCompiler:JI,render:Fc,renderList:we,renderSlot:le,resolveComponent:H,resolveDirective:xt,resolveDynamicComponent:Ct,resolveFilter:_G,resolveTransitionHooks:xf,setBlockTracking:Tg,setDevtoolsHook:mG,setTransitionHooks:yl,shallowReactive:k6,shallowReadonly:$Y,shallowRef:Fn,ssrContextKey:aI,ssrUtils:vG,stop:aY,toDisplayString:x,toHandlerKey:qu,toHandlers:xb,toRaw:an,toRef:Sn,toRefs:go,toValue:fk,transformVNodeArgs:sG,triggerRef:Hm,unref:E,useAttrs:Dd,useCssModule:UG,useCssVars:EG,useHost:pL,useId:JY,useModel:Rq,useSSRContext:lI,useShadowRoot:HG,useSlots:mi,useTemplateRef:QY,useTransitionState:S6,vModelCheckbox:A1,vModelDynamic:yL,vModelRadio:E1,vModelSelect:vL,vModelText:md,vShow:jt,version:nL,warn:sL,watch:Te,watchEffect:_l,watchPostEffect:GY,watchSyncEffect:cI,withAsyncContext:Eq,withCtx:w,withDefaults:xq,withDirectives:Re,withKeys:ut,withMemo:hG,withModifiers:Ee,withScopeId:qY},Symbol.toStringTag,{value:"Module"}));/** | |
| 20 | 20 | * @vue/compiler-core v3.5.27 |
| 21 | 21 | * (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 22 | 22 | * @license MIT |
| 23 | -**/const Jm=Symbol(""),dm=Symbol(""),Wk=Symbol(""),__=Symbol(""),EI=Symbol(""),Uu=Symbol(""),TI=Symbol(""),PI=Symbol(""),Yk=Symbol(""),Gk=Symbol(""),jg=Symbol(""),qk=Symbol(""),II=Symbol(""),Xk=Symbol(""),Kk=Symbol(""),Zk=Symbol(""),Jk=Symbol(""),Qk=Symbol(""),ex=Symbol(""),LI=Symbol(""),OI=Symbol(""),Fy=Symbol(""),y_=Symbol(""),tx=Symbol(""),nx=Symbol(""),Qm=Symbol(""),Wg=Symbol(""),sx=Symbol(""),I3=Symbol(""),GG=Symbol(""),L3=Symbol(""),b_=Symbol(""),qG=Symbol(""),XG=Symbol(""),ix=Symbol(""),KG=Symbol(""),ZG=Symbol(""),ox=Symbol(""),DI=Symbol(""),Kh={[Jm]:"Fragment",[dm]:"Teleport",[Wk]:"Suspense",[__]:"KeepAlive",[EI]:"BaseTransition",[Uu]:"openBlock",[TI]:"createBlock",[PI]:"createElementBlock",[Yk]:"createVNode",[Gk]:"createElementVNode",[jg]:"createCommentVNode",[qk]:"createTextVNode",[II]:"createStaticVNode",[Xk]:"resolveComponent",[Kk]:"resolveDynamicComponent",[Zk]:"resolveDirective",[Jk]:"resolveFilter",[Qk]:"withDirectives",[ex]:"renderList",[LI]:"renderSlot",[OI]:"createSlots",[Fy]:"toDisplayString",[y_]:"mergeProps",[tx]:"normalizeClass",[nx]:"normalizeStyle",[Qm]:"normalizeProps",[Wg]:"guardReactiveProps",[sx]:"toHandlers",[I3]:"camelize",[GG]:"capitalize",[L3]:"toHandlerKey",[b_]:"setBlockTracking",[qG]:"pushScopeId",[XG]:"popScopeId",[ix]:"withCtx",[KG]:"unref",[ZG]:"isRef",[ox]:"withMemo",[DI]:"isMemoSame"};function JG(t){Object.getOwnPropertySymbols(t).forEach(e=>{Kh[e]=t[e]})}const wo={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function QG(t,e=""){return{type:0,source:e,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:wo}}function eg(t,e,n,s,i,o,r,a=!1,l=!1,c=!1,u=wo){return t&&(a?(t.helper(Uu),t.helper(Qh(t.inSSR,c))):t.helper(Jh(t.inSSR,c)),r&&t.helper(Qk)),{type:13,tag:e,props:n,children:s,patchFlag:i,dynamicProps:o,directives:r,isBlock:a,disableTracking:l,isComponent:c,loc:u}}function Su(t,e=wo){return{type:17,loc:e,elements:t}}function Ho(t,e=wo){return{type:15,loc:e,properties:t}}function ps(t,e){return{type:16,loc:wo,key:nt(t)?Ft(t,!0):t,value:e}}function Ft(t,e=!1,n=wo,s=0){return{type:4,loc:n,content:t,isStatic:e,constType:e?3:s}}function wr(t,e=wo){return{type:8,loc:e,children:t}}function bs(t,e=[],n=wo){return{type:14,loc:n,callee:t,arguments:e}}function Zh(t,e=void 0,n=!1,s=!1,i=wo){return{type:18,params:t,returns:e,newline:n,isSlot:s,loc:i}}function O3(t,e,n,s=!0){return{type:19,test:t,consequent:e,alternate:n,newline:s,loc:wo}}function eq(t,e,n=!1,s=!1){return{type:20,index:t,value:e,needPauseTracking:n,inVOnce:s,needArraySpread:!1,loc:wo}}function tq(t){return{type:21,body:t,loc:wo}}function Jh(t,e){return t||e?Yk:Gk}function Qh(t,e){return t||e?TI:PI}function rx(t,{helper:e,removeHelper:n,inSSR:s}){t.isBlock||(t.isBlock=!0,n(Jh(s,t.isComponent)),e(Uu),e(Qh(s,t.isComponent)))}const YS=new Uint8Array([123,123]),GS=new Uint8Array([125,125]);function qS(t){return t>=97&&t<=122||t>=65&&t<=90}function ao(t){return t===32||t===10||t===9||t===12||t===13}function gl(t){return t===47||t===62||ao(t)}function w_(t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}const Zs={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 nq{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=YS,this.delimiterClose=GS,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=YS,this.delimiterClose=GS}getPos(e){let n=1,s=e+1;const i=this.newlines.length;let o=-1;if(i>100){let r=-1,a=i;for(;r+1<a;){const l=r+a>>>1;this.newlines[l]<e?r=l:a=l}o=r}else for(let r=i-1;r>=0;r--)if(e>this.newlines[r]){o=r;break}return o>=0&&(n=o+2,s=e-this.newlines[o]),{column:s,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?gl(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||ao(e)){const n=this.index-this.currentSequence.length;if(this.sectionStart<n){const s=this.index;this.index=n,this.cbs.ontext(this.sectionStart,n),this.index=s}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===Zs.TitleEnd||this.currentSequence===Zs.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&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===Zs.Cdata[this.sequenceIndex]?++this.sequenceIndex===Zs.Cdata.length&&(this.state=28,this.currentSequence=Zs.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===Zs.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):qS(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){gl(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(gl(e)){const n=this.buffer.slice(this.sectionStart,this.index);n!=="template"&&this.enterRCDATA(w_("</"+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){ao(e)||(e===62?(this.state=1,this.sectionStart=this.index+1):(this.state=qS(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(e===62||ao(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):ao(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):ao(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(e===61||gl(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){e===61||gl(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||gl(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||gl(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){e===61||gl(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)):ao(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):ao(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){ao(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=Zs.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===Zs.ScriptEnd[3]?this.startSpecial(Zs.ScriptEnd,4):e===Zs.StyleEnd[3]?this.startSpecial(Zs.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===Zs.TitleEnd[3]?this.startSpecial(Zs.TitleEnd,4):e===Zs.TextareaEnd[3]?this.startSpecial(Zs.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.state!==33&&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===Zs.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 XS(t,{compatConfig:e}){const n=e&&e[t];return t==="MODE"?n||3:n}function $u(t,e){const n=XS("MODE",e),s=XS(t,e);return n===3?s===!0:s!==!1}function tg(t,e,n,...s){return $u(t,e)}function ax(t){throw t}function RI(t){}function jn(t,e,n,s){const i=`https://vuejs.org/error-reference/#compiler-${t}`,o=new SyntaxError(String(i));return o.code=t,o.loc=e,o}const Ui=t=>t.type===4&&t.isStatic;function VI(t){switch(t){case"Teleport":case"teleport":return dm;case"Suspense":case"suspense":return Wk;case"KeepAlive":case"keep-alive":return __;case"BaseTransition":case"base-transition":return EI}}const sq=/^$|^\d|[^\$\w\xA0-\uFFFF]/,lx=t=>!sq.test(t),FI=/[A-Za-z_$\xA0-\uFFFF]/,iq=/[\.\?\w$\xA0-\uFFFF]/,oq=/\s+[.[]\s*|\s*[.[]\s+/g,NI=t=>t.type===4?t.content:t.loc.source,rq=t=>{const e=NI(t).trim().replace(oq,a=>a.trim());let n=0,s=[],i=0,o=0,r=null;for(let a=0;a<e.length;a++){const l=e.charAt(a);switch(n){case 0:if(l==="[")s.push(n),n=1,i++;else if(l==="(")s.push(n),n=2,o++;else if(!(a===0?FI:iq).test(l))return!1;break;case 1:l==="'"||l==='"'||l==="`"?(s.push(n),n=3,r=l):l==="["?i++:l==="]"&&(--i||(n=s.pop()));break;case 2:if(l==="'"||l==='"'||l==="`")s.push(n),n=3,r=l;else if(l==="(")o++;else if(l===")"){if(a===e.length-1)return!1;--o||(n=s.pop())}break;case 3:l===r&&(n=s.pop(),r=null);break}}return!i&&!o},BI=rq,aq=/^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,lq=t=>aq.test(NI(t)),cq=lq;function Ro(t,e,n=!1){for(let s=0;s<t.props.length;s++){const i=t.props[s];if(i.type===7&&(n||i.exp)&&(nt(e)?i.name===e:e.test(i.name)))return i}}function Ny(t,e,n=!1,s=!1){for(let i=0;i<t.props.length;i++){const o=t.props[i];if(o.type===6){if(n)continue;if(o.name===e&&(o.value||s))return o}else if(o.name==="bind"&&(o.exp||s)&&lu(o.arg,e))return o}}function lu(t,e){return!!(t&&Ui(t)&&t.content===e)}function uq(t){return t.props.some(e=>e.type===7&&e.name==="bind"&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function x2(t){return t.type===5||t.type===2}function KS(t){return t.type===7&&t.name==="pre"}function dq(t){return t.type===7&&t.name==="slot"}function C_(t){return t.type===1&&t.tagType===3}function k_(t){return t.type===1&&t.tagType===2}const hq=new Set([Qm,Wg]);function zI(t,e=[]){if(t&&!nt(t)&&t.type===14){const n=t.callee;if(!nt(n)&&hq.has(n))return zI(t.arguments[0],e.concat(t))}return[t,e]}function x_(t,e,n){let s,i=t.type===13?t.props:t.arguments[2],o=[],r;if(i&&!nt(i)&&i.type===14){const a=zI(i);i=a[0],o=a[1],r=o[o.length-1]}if(i==null||nt(i))s=Ho([e]);else if(i.type===14){const a=i.arguments[0];!nt(a)&&a.type===15?ZS(e,a)||a.properties.unshift(e):i.callee===sx?s=bs(n.helper(y_),[Ho([e]),i]):i.arguments.unshift(Ho([e])),!s&&(s=i)}else i.type===15?(ZS(e,i)||i.properties.unshift(e),s=i):(s=bs(n.helper(y_),[Ho([e]),i]),r&&r.callee===Wg&&(r=o[o.length-2]));t.type===13?r?r.arguments[0]=s:t.props=s:r?r.arguments[0]=s:t.arguments[2]=s}function ZS(t,e){let n=!1;if(t.key.type===4){const s=t.key.content;n=e.properties.some(i=>i.key.type===4&&i.key.content===s)}return n}function ng(t,e){return`_${e}_${t.replace(/[^\w]/g,(n,s)=>n==="-"?"_":t.charCodeAt(s).toString())}`}function fq(t){return t.type===14&&t.callee===ox?t.arguments[1].returns:t}const pq=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function HI(t){for(let e=0;e<t.length;e++)if(!ao(t.charCodeAt(e)))return!1;return!0}function cx(t){return t.type===2&&HI(t.content)||t.type===12&&cx(t.content)}function UI(t){return t.type===3||cx(t)}const jI={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:bh,isPreTag:bh,isIgnoreNewlineTag:bh,isCustomElement:bh,onError:ax,onWarn:RI,comments:!1,prefixIdentifiers:!1};let yn=jI,sg=null,el="",ti=null,nn=null,Vi="",Da=-1,Gc=-1,ux=0,Bl=!1,D3=null;const Xn=[],ns=new nq(Xn,{onerr:Pa,ontext(t,e){t0(Ds(t,e),t,e)},ontextentity(t,e,n){t0(t,e,n)},oninterpolation(t,e){if(Bl)return t0(Ds(t,e),t,e);let n=t+ns.delimiterOpen.length,s=e-ns.delimiterClose.length;for(;ao(el.charCodeAt(n));)n++;for(;ao(el.charCodeAt(s-1));)s--;let i=Ds(n,s);i.includes("&")&&(i=yn.decodeEntities(i,!1)),R3({type:5,content:z0(i,!1,ls(n,s)),loc:ls(t,e)})},onopentagname(t,e){const n=Ds(t,e);ti={type:1,tag:n,ns:yn.getNamespace(n,Xn[0],yn.ns),tagType:0,props:[],children:[],loc:ls(t-1,e),codegenNode:void 0}},onopentagend(t){QS(t)},onclosetag(t,e){const n=Ds(t,e);if(!yn.isVoidTag(n)){let s=!1;for(let i=0;i<Xn.length;i++)if(Xn[i].tag.toLowerCase()===n.toLowerCase()){s=!0,i>0&&Pa(24,Xn[0].loc.start.offset);for(let r=0;r<=i;r++){const a=Xn.shift();B0(a,e,r<i)}break}s||Pa(23,WI(t,60))}},onselfclosingtag(t){const e=ti.tag;ti.isSelfClosing=!0,QS(t),Xn[0]&&Xn[0].tag===e&&B0(Xn.shift(),t)},onattribname(t,e){nn={type:6,name:Ds(t,e),nameLoc:ls(t,e),value:void 0,loc:ls(t)}},ondirname(t,e){const n=Ds(t,e),s=n==="."||n===":"?"bind":n==="@"?"on":n==="#"?"slot":n.slice(2);if(!Bl&&s===""&&Pa(26,t),Bl||s==="")nn={type:6,name:n,nameLoc:ls(t,e),value:void 0,loc:ls(t)};else if(nn={type:7,name:s,rawName:n,exp:void 0,arg:void 0,modifiers:n==="."?[Ft("prop")]:[],loc:ls(t)},s==="pre"){Bl=ns.inVPre=!0,D3=ti;const i=ti.props;for(let o=0;o<i.length;o++)i[o].type===7&&(i[o]=xq(i[o]))}},ondirarg(t,e){if(t===e)return;const n=Ds(t,e);if(Bl&&!KS(nn))nn.name+=n,cu(nn.nameLoc,e);else{const s=n[0]!=="[";nn.arg=z0(s?n:n.slice(1,-1),s,ls(t,e),s?3:0)}},ondirmodifier(t,e){const n=Ds(t,e);if(Bl&&!KS(nn))nn.name+="."+n,cu(nn.nameLoc,e);else if(nn.name==="slot"){const s=nn.arg;s&&(s.content+="."+n,cu(s.loc,e))}else{const s=Ft(n,!0,ls(t,e));nn.modifiers.push(s)}},onattribdata(t,e){Vi+=Ds(t,e),Da<0&&(Da=t),Gc=e},onattribentity(t,e,n){Vi+=t,Da<0&&(Da=e),Gc=n},onattribnameend(t){const e=nn.loc.start.offset,n=Ds(e,t);nn.type===7&&(nn.rawName=n),ti.props.some(s=>(s.type===7?s.rawName:s.name)===n)&&Pa(2,e)},onattribend(t,e){if(ti&&nn){if(cu(nn.loc,e),t!==0)if(Vi.includes("&")&&(Vi=yn.decodeEntities(Vi,!0)),nn.type===6)nn.name==="class"&&(Vi=GI(Vi).trim()),t===1&&!Vi&&Pa(13,e),nn.value={type:2,content:Vi,loc:t===1?ls(Da,Gc):ls(Da-1,Gc+1)},ns.inSFCRoot&&ti.tag==="template"&&nn.name==="lang"&&Vi&&Vi!=="html"&&ns.enterRCDATA(w_("</template"),0);else{let n=0;nn.exp=z0(Vi,!1,ls(Da,Gc),0,n),nn.name==="for"&&(nn.forParseResult=gq(nn.exp));let s=-1;nn.name==="bind"&&(s=nn.modifiers.findIndex(i=>i.content==="sync"))>-1&&tg("COMPILER_V_BIND_SYNC",yn,nn.loc,nn.arg.loc.source)&&(nn.name="model",nn.modifiers.splice(s,1))}(nn.type!==7||nn.name!=="pre")&&ti.props.push(nn)}Vi="",Da=Gc=-1},oncomment(t,e){yn.comments&&R3({type:3,content:Ds(t,e),loc:ls(t-4,e+3)})},onend(){const t=el.length;for(let e=0;e<Xn.length;e++)B0(Xn[e],t-1),Pa(24,Xn[e].loc.start.offset)},oncdata(t,e){Xn[0].ns!==0?t0(Ds(t,e),t,e):Pa(1,t-9)},onprocessinginstruction(t){(Xn[0]?Xn[0].ns:yn.ns)===0&&Pa(21,t-1)}}),JS=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,mq=/^\(|\)$/g;function gq(t){const e=t.loc,n=t.content,s=n.match(pq);if(!s)return;const[,i,o]=s,r=(d,h,f=!1)=>{const p=e.start.offset+h,m=p+d.length;return z0(d,!1,ls(p,m),0,f?1:0)},a={source:r(o.trim(),n.indexOf(o,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let l=i.trim().replace(mq,"").trim();const c=i.indexOf(l),u=l.match(JS);if(u){l=l.replace(JS,"").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 Ds(t,e){return el.slice(t,e)}function QS(t){ns.inSFCRoot&&(ti.innerLoc=ls(t+1,t+1)),R3(ti);const{tag:e,ns:n}=ti;n===0&&yn.isPreTag(e)&&ux++,yn.isVoidTag(e)?B0(ti,t):(Xn.unshift(ti),(n===1||n===2)&&(ns.inXML=!0)),ti=null}function t0(t,e,n){{const o=Xn[0]&&Xn[0].tag;o!=="script"&&o!=="style"&&t.includes("&")&&(t=yn.decodeEntities(t,!1))}const s=Xn[0]||sg,i=s.children[s.children.length-1];i&&i.type===2?(i.content+=t,cu(i.loc,n)):s.children.push({type:2,content:t,loc:ls(e,n)})}function B0(t,e,n=!1){n?cu(t.loc,WI(e,60)):cu(t.loc,vq(e,62)+1),ns.inSFCRoot&&(t.children.length?t.innerLoc.end=Zt({},t.children[t.children.length-1].loc.end):t.innerLoc.end=Zt({},t.innerLoc.start),t.innerLoc.source=Ds(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:s,ns:i,children:o}=t;if(Bl||(s==="slot"?t.tagType=2:e9(t)?t.tagType=3:yq(t)&&(t.tagType=1)),ns.inRCDATA||(t.children=YI(o)),i===0&&yn.isIgnoreNewlineTag(s)){const r=o[0];r&&r.type===2&&(r.content=r.content.replace(/^\r?\n/,""))}i===0&&yn.isPreTag(s)&&ux--,D3===t&&(Bl=ns.inVPre=!1,D3=null),ns.inXML&&(Xn[0]?Xn[0].ns:yn.ns)===0&&(ns.inXML=!1);{const r=t.props;if(!ns.inSFCRoot&&$u("COMPILER_NATIVE_TEMPLATE",yn)&&t.tag==="template"&&!e9(t)){const l=Xn[0]||sg,c=l.children.indexOf(t);l.children.splice(c,1,...t.children)}const a=r.find(l=>l.type===6&&l.name==="inline-template");a&&tg("COMPILER_INLINE_TEMPLATE",yn,a.loc)&&t.children.length&&(a.value={type:2,content:Ds(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:a.loc})}}function vq(t,e){let n=t;for(;el.charCodeAt(n)!==e&&n<el.length-1;)n++;return n}function WI(t,e){let n=t;for(;el.charCodeAt(n)!==e&&n>=0;)n--;return n}const _q=new Set(["if","else","else-if","for","slot"]);function e9({tag:t,props:e}){if(t==="template"){for(let n=0;n<e.length;n++)if(e[n].type===7&&_q.has(e[n].name))return!0}return!1}function yq({tag:t,props:e}){if(yn.isCustomElement(t))return!1;if(t==="component"||bq(t.charCodeAt(0))||VI(t)||yn.isBuiltInComponent&&yn.isBuiltInComponent(t)||yn.isNativeTag&&!yn.isNativeTag(t))return!0;for(let n=0;n<e.length;n++){const s=e[n];if(s.type===6){if(s.name==="is"&&s.value){if(s.value.content.startsWith("vue:"))return!0;if(tg("COMPILER_IS_ON_ELEMENT",yn,s.loc))return!0}}else if(s.name==="bind"&&lu(s.arg,"is")&&tg("COMPILER_IS_ON_ELEMENT",yn,s.loc))return!0}return!1}function bq(t){return t>64&&t<91}const wq=/\r\n/g;function YI(t){const e=yn.whitespace!=="preserve";let n=!1;for(let s=0;s<t.length;s++){const i=t[s];if(i.type===2)if(ux)i.content=i.content.replace(wq,` | |
| 24 | -`);else if(HI(i.content)){const o=t[s-1]&&t[s-1].type,r=t[s+1]&&t[s+1].type;!o||!r||e&&(o===3&&(r===3||r===1)||o===1&&(r===3||r===1&&Cq(i.content)))?(n=!0,t[s]=null):i.content=" "}else e&&(i.content=GI(i.content))}return n?t.filter(Boolean):t}function Cq(t){for(let e=0;e<t.length;e++){const n=t.charCodeAt(e);if(n===10||n===13)return!0}return!1}function GI(t){let e="",n=!1;for(let s=0;s<t.length;s++)ao(t.charCodeAt(s))?n||(e+=" ",n=!0):(e+=t[s],n=!1);return e}function R3(t){(Xn[0]||sg).children.push(t)}function ls(t,e){return{start:ns.getPos(t),end:e==null?e:ns.getPos(e),source:e==null?e:Ds(t,e)}}function kq(t){return ls(t.start.offset,t.end.offset)}function cu(t,e){t.end=ns.getPos(e),t.source=Ds(t.start.offset,e)}function xq(t){const e={type:6,name:t.rawName,nameLoc:ls(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 z0(t,e=!1,n,s=0,i=0){return Ft(t,e,n,s)}function Pa(t,e,n){yn.onError(jn(t,ls(e,e)))}function Sq(){ns.reset(),ti=null,nn=null,Vi="",Da=-1,Gc=-1,Xn.length=0}function $q(t,e){if(Sq(),el=t,yn=Zt({},jI),e){let i;for(i in e)e[i]!=null&&(yn[i]=e[i])}ns.mode=yn.parseMode==="html"?1:yn.parseMode==="sfc"?2:0,ns.inXML=yn.ns===1||yn.ns===2;const n=e&&e.delimiters;n&&(ns.delimiterOpen=w_(n[0]),ns.delimiterClose=w_(n[1]));const s=sg=QG([],t);return ns.parse(el),s.loc=ls(0,t.length),s.children=YI(s.children),sg=null,s}function Aq(t,e){H0(t,void 0,e,!!qI(t))}function qI(t){const e=t.children.filter(n=>n.type!==3);return e.length===1&&e[0].type===1&&!k_(e[0])?e[0]:null}function H0(t,e,n,s=!1,i=!1){const{children:o}=t,r=[];for(let u=0;u<o.length;u++){const d=o[u];if(d.type===1&&d.tagType===0){const h=s?0:uo(d,n);if(h>0){if(h>=2){d.codegenNode.patchFlag=-1,r.push(d);continue}}else{const f=d.codegenNode;if(f.type===13){const p=f.patchFlag;if((p===void 0||p===512||p===1)&&KI(d,n)>=2){const m=ZI(d);m&&(f.props=n.hoist(m))}f.dynamicProps&&(f.dynamicProps=n.hoist(f.dynamicProps))}}}else if(d.type===12&&(s?0:uo(d,n))>=2){d.codegenNode.type===14&&d.codegenNode.arguments.length>0&&d.codegenNode.arguments.push("-1"),r.push(d);continue}if(d.type===1){const h=d.tagType===1;h&&n.scopes.vSlot++,H0(d,t,n,!1,i),h&&n.scopes.vSlot--}else if(d.type===11)H0(d,t,n,d.children.length===1,!0);else if(d.type===9)for(let h=0;h<d.branches.length;h++)H0(d.branches[h],t,n,d.branches[h].children.length===1,i)}let a=!1;if(r.length===o.length&&t.type===1){if(t.tagType===0&&t.codegenNode&&t.codegenNode.type===13&&Le(t.codegenNode.children))t.codegenNode.children=l(Su(t.codegenNode.children)),a=!0;else if(t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!Le(t.codegenNode.children)&&t.codegenNode.children.type===15){const u=c(t.codegenNode,"default");u&&(u.returns=l(Su(u.returns)),a=!0)}else if(t.tagType===3&&e&&e.type===1&&e.tagType===1&&e.codegenNode&&e.codegenNode.type===13&&e.codegenNode.children&&!Le(e.codegenNode.children)&&e.codegenNode.children.type===15){const u=Ro(t,"slot",!0),d=u&&u.arg&&c(e.codegenNode,u.arg);d&&(d.returns=l(Su(d.returns)),a=!0)}}if(!a)for(const u of r)u.codegenNode=n.cache(u.codegenNode);function l(u){const d=n.cache(u);return d.needArraySpread=!0,d}function c(u,d){if(u.children&&!Le(u.children)&&u.children.type===15){const h=u.children.properties.find(f=>f.key===d||f.key.content===d);return h&&h.value}}r.length&&n.transformHoist&&n.transformHoist(o,n,t)}function uo(t,e){const{constantCache:n}=e;switch(t.type){case 1:if(t.tagType!==0)return 0;const s=n.get(t);if(s!==void 0)return s;const i=t.codegenNode;if(i.type!==13||i.isBlock&&t.tag!=="svg"&&t.tag!=="foreignObject"&&t.tag!=="math")return 0;if(i.patchFlag===void 0){let r=3;const a=KI(t,e);if(a===0)return n.set(t,0),0;a<r&&(r=a);for(let l=0;l<t.children.length;l++){const c=uo(t.children[l],e);if(c===0)return n.set(t,0),0;c<r&&(r=c)}if(r>1)for(let l=0;l<t.props.length;l++){const c=t.props[l];if(c.type===7&&c.name==="bind"&&c.exp){const u=uo(c.exp,e);if(u===0)return n.set(t,0),0;u<r&&(r=u)}}if(i.isBlock){for(let l=0;l<t.props.length;l++)if(t.props[l].type===7)return n.set(t,0),0;e.removeHelper(Uu),e.removeHelper(Qh(e.inSSR,i.isComponent)),i.isBlock=!1,e.helper(Jh(e.inSSR,i.isComponent))}return n.set(t,r),r}else return n.set(t,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return uo(t.content,e);case 4:return t.constType;case 8:let o=3;for(let r=0;r<t.children.length;r++){const a=t.children[r];if(nt(a)||Xi(a))continue;const l=uo(a,e);if(l===0)return 0;l<o&&(o=l)}return o;case 20:return 2;default:return 0}}const Mq=new Set([tx,nx,Qm,Wg]);function XI(t,e){if(t.type===14&&!nt(t.callee)&&Mq.has(t.callee)){const n=t.arguments[0];if(n.type===4)return uo(n,e);if(n.type===14)return XI(n,e)}return 0}function KI(t,e){let n=3;const s=ZI(t);if(s&&s.type===15){const{properties:i}=s;for(let o=0;o<i.length;o++){const{key:r,value:a}=i[o],l=uo(r,e);if(l===0)return l;l<n&&(n=l);let c;if(a.type===4?c=uo(a,e):a.type===14?c=XI(a,e):c=0,c===0)return c;c<n&&(n=c)}}return n}function ZI(t){const e=t.codegenNode;if(e.type===13)return e.props}function Eq(t,{filename:e="",prefixIdentifiers:n=!1,hoistStatic:s=!1,hmr:i=!1,cacheHandlers:o=!1,nodeTransforms:r=[],directiveTransforms:a={},transformHoist:l=null,isBuiltInComponent:c=Vt,isCustomElement:u=Vt,expressionPlugins:d=[],scopeId:h=null,slotted:f=!0,ssr:p=!1,inSSR:m=!1,ssrCssVars:b="",bindingMetadata:y=sn,inline:C=!1,isTS:k=!1,onError:x=ax,onWarn:S=RI,compatConfig:E}){const T=e.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),P={filename:e,selfName:T&&Sc(Bn(T[1])),prefixIdentifiers:n,hoistStatic:s,hmr:i,cacheHandlers:o,nodeTransforms:r,directiveTransforms:a,transformHoist:l,isBuiltInComponent:c,isCustomElement:u,expressionPlugins:d,scopeId:h,slotted:f,ssr:p,inSSR:m,ssrCssVars:b,bindingMetadata:y,inline:C,isTS:k,onError:x,onWarn:S,compatConfig:E,root:t,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent:null,currentNode:t,childIndex:0,inVOnce:!1,helper(I){const L=P.helpers.get(I)||0;return P.helpers.set(I,L+1),I},removeHelper(I){const L=P.helpers.get(I);if(L){const V=L-1;V?P.helpers.set(I,V):P.helpers.delete(I)}},helperString(I){return`_${Kh[P.helper(I)]}`},replaceNode(I){P.parent.children[P.childIndex]=P.currentNode=I},removeNode(I){const L=P.parent.children,V=I?L.indexOf(I):P.currentNode?P.childIndex:-1;!I||I===P.currentNode?(P.currentNode=null,P.onNodeRemoved()):P.childIndex>V&&(P.childIndex--,P.onNodeRemoved()),P.parent.children.splice(V,1)},onNodeRemoved:Vt,addIdentifiers(I){},removeIdentifiers(I){},hoist(I){nt(I)&&(I=Ft(I)),P.hoists.push(I);const L=Ft(`_hoisted_${P.hoists.length}`,!1,I.loc,2);return L.hoisted=I,L},cache(I,L=!1,V=!1){const D=eq(P.cached.length,I,L,V);return P.cached.push(D),D}};return P.filters=new Set,P}function Tq(t,e){const n=Eq(t,e);By(t,n),e.hoistStatic&&Aq(t,n),e.ssr||Pq(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 Pq(t,e){const{helper:n}=e,{children:s}=t;if(s.length===1){const i=qI(t);if(i&&i.codegenNode){const o=i.codegenNode;o.type===13&&rx(o,e),t.codegenNode=o}else t.codegenNode=s[0]}else if(s.length>1){let i=64;t.codegenNode=eg(e,n(Jm),void 0,t.children,i,void 0,void 0,!0,void 0,!1)}}function Iq(t,e){let n=0;const s=()=>{n--};for(;n<t.children.length;n++){const i=t.children[n];nt(i)||(e.grandParent=e.parent,e.parent=t,e.childIndex=n,e.onNodeRemoved=s,By(i,e))}}function By(t,e){e.currentNode=t;const{nodeTransforms:n}=e,s=[];for(let o=0;o<n.length;o++){const r=n[o](t,e);if(r&&(Le(r)?s.push(...r):s.push(r)),e.currentNode)t=e.currentNode;else return}switch(t.type){case 3:e.ssr||e.helper(jg);break;case 5:e.ssr||e.helper(Fy);break;case 9:for(let o=0;o<t.branches.length;o++)By(t.branches[o],e);break;case 10:case 11:case 1:case 0:Iq(t,e);break}e.currentNode=t;let i=s.length;for(;i--;)s[i]()}function JI(t,e){const n=nt(t)?s=>s===t:s=>t.test(s);return(s,i)=>{if(s.type===1){const{props:o}=s;if(s.tagType===3&&o.some(dq))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(s,l,i);c&&r.push(c)}}return r}}}const zy="/*@__PURE__*/",QI=t=>`${Kh[t]}: _${Kh[t]}`;function Lq(t,{mode:e="function",prefixIdentifiers:n=e==="module",sourceMap:s=!1,filename:i="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:s,filename:i,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`_${Kh[m]}`},push(m,b=-2,y){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(` | |
| 25 | -`+" ".repeat(m),0)}return f}function Oq(t,e={}){const n=Lq(t,e);e.onContextCreated&&e.onContextCreated(n);const{mode:s,push:i,prefixIdentifiers:o,indent:r,deindent:a,newline:l,scopeId:c,ssr:u}=n,d=Array.from(t.helpers),h=d.length>0,f=!o&&s!=="module";Dq(t,n);const m=u?"ssrRender":"render",y=(u?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ");if(i(`function ${m}(${y}) {`),r(),f&&(i("with (_ctx) {"),r(),h&&(i(`const { ${d.map(QI).join(", ")} } = _Vue | |
| 26 | -`,-1),l())),t.components.length&&(S2(t.components,"component",n),(t.directives.length||t.temps>0)&&l()),t.directives.length&&(S2(t.directives,"directive",n),t.temps>0&&l()),t.filters&&t.filters.length&&(l(),S2(t.filters,"filter",n),l()),t.temps>0){i("let ");for(let C=0;C<t.temps;C++)i(`${C>0?", ":""}_temp${C}`)}return(t.components.length||t.directives.length||t.temps)&&(i(` | |
| 27 | -`,0),l()),u||i("return "),t.codegenNode?ai(t.codegenNode,n):i("null"),f&&(a(),i("}")),a(),i("}"),{ast:t,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function Dq(t,e){const{ssr:n,prefixIdentifiers:s,push:i,newline:o,runtimeModuleName:r,runtimeGlobalName:a,ssrRuntimeModuleName:l}=e,c=a,u=Array.from(t.helpers);if(u.length>0&&(i(`const _Vue = ${c} | |
| 28 | -`,-1),t.hoists.length)){const d=[Yk,Gk,jg,qk,II].filter(h=>u.includes(h)).map(QI).join(", ");i(`const { ${d} } = _Vue | |
| 29 | -`,-1)}Rq(t.hoists,e),o(),i("return ")}function S2(t,e,{helper:n,push:s,newline:i,isTS:o}){const r=n(e==="filter"?Jk:e==="component"?Xk:Zk);for(let a=0;a<t.length;a++){let l=t[a];const c=l.endsWith("__self");c&&(l=l.slice(0,-6)),s(`const ${ng(l,e)} = ${r}(${JSON.stringify(l)}${c?", true":""})${o?"!":""}`),a<t.length-1&&i()}}function Rq(t,e){if(!t.length)return;e.pure=!0;const{push:n,newline:s}=e;s();for(let i=0;i<t.length;i++){const o=t[i];o&&(n(`const _hoisted_${i+1} = `),ai(o,e),s())}e.pure=!1}function dx(t,e){const n=t.length>3||!1;e.push("["),n&&e.indent(),Yg(t,e,n),n&&e.deindent(),e.push("]")}function Yg(t,e,n=!1,s=!0){const{push:i,newline:o}=e;for(let r=0;r<t.length;r++){const a=t[r];nt(a)?i(a,-3):Le(a)?dx(a,e):ai(a,e),r<t.length-1&&(n?(s&&i(","),o()):s&&i(", "))}}function ai(t,e){if(nt(t)){e.push(t,-3);return}if(Xi(t)){e.push(e.helper(t));return}switch(t.type){case 1:case 9:case 11:ai(t.codegenNode,e);break;case 2:Vq(t,e);break;case 4:eL(t,e);break;case 5:Fq(t,e);break;case 12:ai(t.codegenNode,e);break;case 8:tL(t,e);break;case 3:Bq(t,e);break;case 13:zq(t,e);break;case 14:Uq(t,e);break;case 15:jq(t,e);break;case 17:Wq(t,e);break;case 18:Yq(t,e);break;case 19:Gq(t,e);break;case 20:qq(t,e);break;case 21:Yg(t.body,e,!0,!1);break}}function Vq(t,e){e.push(JSON.stringify(t.content),-3,t)}function eL(t,e){const{content:n,isStatic:s}=t;e.push(s?JSON.stringify(n):n,-3,t)}function Fq(t,e){const{push:n,helper:s,pure:i}=e;i&&n(zy),n(`${s(Fy)}(`),ai(t.content,e),n(")")}function tL(t,e){for(let n=0;n<t.children.length;n++){const s=t.children[n];nt(s)?e.push(s,-3):ai(s,e)}}function Nq(t,e){const{push:n}=e;if(t.type===8)n("["),tL(t,e),n("]");else if(t.isStatic){const s=lx(t.content)?t.content:JSON.stringify(t.content);n(s,-2,t)}else n(`[${t.content}]`,-3,t)}function Bq(t,e){const{push:n,helper:s,pure:i}=e;i&&n(zy),n(`${s(jg)}(${JSON.stringify(t.content)})`,-3,t)}function zq(t,e){const{push:n,helper:s,pure:i}=e,{tag:o,props:r,children:a,patchFlag:l,dynamicProps:c,directives:u,isBlock:d,disableTracking:h,isComponent:f}=t;let p;l&&(p=String(l)),u&&n(s(Qk)+"("),d&&n(`(${s(Uu)}(${h?"true":""}), `),i&&n(zy);const m=d?Qh(e.inSSR,f):Jh(e.inSSR,f);n(s(m)+"(",-2,t),Yg(Hq([o,r,a,p,c]),e),n(")"),d&&n(")"),u&&(n(", "),ai(u,e),n(")"))}function Hq(t){let e=t.length;for(;e--&&t[e]==null;);return t.slice(0,e+1).map(n=>n||"null")}function Uq(t,e){const{push:n,helper:s,pure:i}=e,o=nt(t.callee)?t.callee:s(t.callee);i&&n(zy),n(o+"(",-2,t),Yg(t.arguments,e),n(")")}function jq(t,e){const{push:n,indent:s,deindent:i,newline:o}=e,{properties:r}=t;if(!r.length){n("{}",-2,t);return}const a=r.length>1||!1;n(a?"{":"{ "),a&&s();for(let l=0;l<r.length;l++){const{key:c,value:u}=r[l];Nq(c,e),n(": "),ai(u,e),l<r.length-1&&(n(","),o())}a&&i(),n(a?"}":" }")}function Wq(t,e){dx(t.elements,e)}function Yq(t,e){const{push:n,indent:s,deindent:i}=e,{params:o,returns:r,body:a,newline:l,isSlot:c}=t;c&&n(`_${Kh[ix]}(`),n("(",-2,t),Le(o)?Yg(o,e):o&&ai(o,e),n(") => "),(l||a)&&(n("{"),s()),r?(l&&n("return "),Le(r)?dx(r,e):ai(r,e)):a&&ai(a,e),(l||a)&&(i(),n("}")),c&&(t.isNonScopedSlot&&n(", undefined, true"),n(")"))}function Gq(t,e){const{test:n,consequent:s,alternate:i,newline:o}=t,{push:r,indent:a,deindent:l,newline:c}=e;if(n.type===4){const d=!lx(n.content);d&&r("("),eL(n,e),d&&r(")")}else r("("),ai(n,e),r(")");o&&a(),e.indentLevel++,o||r(" "),r("? "),ai(s,e),e.indentLevel--,o&&c(),o||r(" "),r(": ");const u=i.type===19;u||e.indentLevel++,ai(i,e),u||e.indentLevel--,o&&l(!0)}function qq(t,e){const{push:n,helper:s,indent:i,deindent:o,newline:r}=e,{needPauseTracking:a,needArraySpread:l}=t;l&&n("[...("),n(`_cache[${t.index}] || (`),a&&(i(),n(`${s(b_)}(-1`),t.inVOnce&&n(", true"),n("),"),r(),n("(")),n(`_cache[${t.index}] = `),ai(t.value,e),a&&(n(`).cacheIndex = ${t.index},`),r(),n(`${s(b_)}(1),`),r(),n(`_cache[${t.index}]`),o()),n(")"),l&&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 Xq=JI(/^(?:if|else|else-if)$/,(t,e,n)=>Kq(t,e,n,(s,i,o)=>{const r=n.parent.children;let a=r.indexOf(s),l=0;for(;a-->=0;){const c=r[a];c&&c.type===9&&(l+=c.branches.length)}return()=>{if(o)s.codegenNode=n9(i,l,n);else{const c=Zq(s.codegenNode);c.alternate=n9(i,l+s.branches.length-1,n)}}}));function Kq(t,e,n,s){if(e.name!=="else"&&(!e.exp||!e.exp.content.trim())){const i=e.exp?e.exp.loc:t.loc;n.onError(jn(28,e.loc)),e.exp=Ft("true",!1,i)}if(e.name==="if"){const i=t9(t,e),o={type:9,loc:kq(t.loc),branches:[i]};if(n.replaceNode(o),s)return s(o,i,!0)}else{const i=n.parent.children;let o=i.indexOf(t);for(;o-->=-1;){const r=i[o];if(r&&UI(r)){n.removeNode(r);continue}if(r&&r.type===9){(e.name==="else-if"||e.name==="else")&&r.branches[r.branches.length-1].condition===void 0&&n.onError(jn(30,t.loc)),n.removeNode();const a=t9(t,e);r.branches.push(a);const l=s&&s(r,a,!1);By(a,n),l&&l(),n.currentNode=null}else n.onError(jn(30,t.loc));break}}}function t9(t,e){const n=t.tagType===3;return{type:10,loc:t.loc,condition:e.name==="else"?void 0:e.exp,children:n&&!Ro(t,"for")?t.children:[t],userKey:Ny(t,"key"),isTemplateIf:n}}function n9(t,e,n){return t.condition?O3(t.condition,s9(t,e,n),bs(n.helper(jg),['""',"true"])):s9(t,e,n)}function s9(t,e,n){const{helper:s}=n,i=ps("key",Ft(`${e}`,!1,wo,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 x_(l,i,n),l}else{let l=64;return eg(n,s(Jm),Ho([i]),o,l,void 0,void 0,!0,!1,!1,t.loc)}else{const l=r.codegenNode,c=fq(l);return c.type===13&&rx(c,n),x_(c,i,n),l}}function Zq(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 Jq=JI("for",(t,e,n)=>{const{helper:s,removeHelper:i}=n;return Qq(t,e,n,o=>{const r=bs(s(ex),[o.source]),a=C_(t),l=Ro(t,"memo"),c=Ny(t,"key",!1,!0);c&&c.type;let u=c&&(c.type===6?c.value?Ft(c.value.content,!0):void 0:c.exp);const d=c&&u?ps("key",u):null,h=o.source.type===4&&o.source.constType>0,f=h?64:c?128:256;return o.codegenNode=eg(n,s(Jm),void 0,r,f,void 0,void 0,!0,!h,!1,t.loc),()=>{let p;const{children:m}=o,b=m.length!==1||m[0].type!==1,y=k_(t)?t:a&&t.children.length===1&&k_(t.children[0])?t.children[0]:null;if(y?(p=y.codegenNode,a&&d&&x_(p,d,n)):b?p=eg(n,s(Jm),d?Ho([d]):void 0,t.children,64,void 0,void 0,!0,void 0,!1):(p=m[0].codegenNode,a&&d&&x_(p,d,n),p.isBlock!==!h&&(p.isBlock?(i(Uu),i(Qh(n.inSSR,p.isComponent))):i(Jh(n.inSSR,p.isComponent))),p.isBlock=!h,p.isBlock?(s(Uu),s(Qh(n.inSSR,p.isComponent))):s(Jh(n.inSSR,p.isComponent))),l){const C=Zh(V3(o.parseResult,[Ft("_cached")]));C.body=tq([wr(["const _memo = (",l.exp,")"]),wr(["if (_cached",...u?[" && _cached.key === ",u]:[],` && ${n.helperString(DI)}(_cached, _memo)) return _cached`]),wr(["const _item = ",p]),Ft("_item.memo = _memo"),Ft("return _item")]),r.arguments.push(C,Ft("_cache"),Ft(String(n.cached.length))),n.cached.push(null)}else r.arguments.push(Zh(V3(o.parseResult),p,!0))}})});function Qq(t,e,n,s){if(!e.exp){n.onError(jn(31,e.loc));return}const i=e.forParseResult;if(!i){n.onError(jn(32,e.loc));return}nL(i);const{addIdentifiers:o,removeIdentifiers:r,scopes:a}=n,{source:l,value:c,key:u,index:d}=i,h={type:11,loc:e.loc,source:l,valueAlias:c,keyAlias:u,objectIndexAlias:d,parseResult:i,children:C_(t)?t.children:[t]};n.replaceNode(h),a.vFor++;const f=s&&s(h);return()=>{a.vFor--,f&&f()}}function nL(t,e){t.finalized||(t.finalized=!0)}function V3({value:t,key:e,index:n},s=[]){return eX([t,e,n,...s])}function eX(t){let e=t.length;for(;e--&&!t[e];);return t.slice(0,e+1).map((n,s)=>n||Ft("_".repeat(s+1),!1))}const i9=Ft("undefined",!1),tX=(t,e)=>{if(t.type===1&&(t.tagType===1||t.tagType===3)){const n=Ro(t,"slot");if(n)return n.exp,e.scopes.vSlot++,()=>{e.scopes.vSlot--}}},nX=(t,e,n,s)=>Zh(t,n,!1,!0,n.length?n[0].loc:s);function sX(t,e,n=nX){e.helper(ix);const{children:s,loc:i}=t,o=[],r=[];let a=e.scopes.vSlot>0||e.scopes.vFor>0;const l=Ro(t,"slot",!0);if(l){const{arg:b,exp:y}=l;b&&!Ui(b)&&(a=!0),o.push(ps(b||Ft("default",!0),n(y,void 0,s,i)))}let c=!1,u=!1;const d=[],h=new Set;let f=0;for(let b=0;b<s.length;b++){const y=s[b];let C;if(!C_(y)||!(C=Ro(y,"slot",!0))){y.type!==3&&d.push(y);continue}if(l){e.onError(jn(37,C.loc));break}c=!0;const{children:k,loc:x}=y,{arg:S=Ft("default",!0),exp:E,loc:T}=C;let P;Ui(S)?P=S?S.content:"default":a=!0;const I=Ro(y,"for"),L=n(E,I,k,x);let V,D;if(V=Ro(y,"if"))a=!0,r.push(O3(V.exp,n0(S,L,f++),i9));else if(D=Ro(y,/^else(?:-if)?$/,!0)){let z=b,Y;for(;z--&&(Y=s[z],!!UI(Y)););if(Y&&C_(Y)&&Ro(Y,/^(?:else-)?if$/)){let B=r[r.length-1];for(;B.alternate.type===19;)B=B.alternate;B.alternate=D.exp?O3(D.exp,n0(S,L,f++),i9):n0(S,L,f++)}else e.onError(jn(30,D.loc))}else if(I){a=!0;const z=I.forParseResult;z?(nL(z),r.push(bs(e.helper(ex),[z.source,Zh(V3(z),n0(S,L),!0)]))):e.onError(jn(32,I.loc))}else{if(P){if(h.has(P)){e.onError(jn(38,T));continue}h.add(P),P==="default"&&(u=!0)}o.push(ps(S,L))}}if(!l){const b=(y,C)=>{const k=n(y,void 0,C,i);return e.compatConfig&&(k.isNonScopedSlot=!0),ps("default",k)};c?d.length&&!d.every(cx)&&(u?e.onError(jn(39,d[0].loc)):o.push(b(void 0,d))):o.push(b(void 0,s))}const p=a?2:U0(t.children)?3:1;let m=Ho(o.concat(ps("_",Ft(p+"",!1))),i);return r.length&&(m=bs(e.helper(OI),[m,Su(r)])),{slots:m,hasDynamicSlots:a}}function n0(t,e,n){const s=[ps("name",t),ps("fn",e)];return n!=null&&s.push(ps("key",Ft(String(n),!0))),Ho(s)}function U0(t){for(let e=0;e<t.length;e++){const n=t[e];switch(n.type){case 1:if(n.tagType===2||U0(n.children))return!0;break;case 9:if(U0(n.branches))return!0;break;case 10:case 11:if(U0(n.children))return!0;break}}return!1}const sL=new WeakMap,iX=(t,e)=>function(){if(t=e.currentNode,!(t.type===1&&(t.tagType===0||t.tagType===1)))return;const{tag:s,props:i}=t,o=t.tagType===1;let r=o?oX(t,e):`"${s}"`;const a=Ct(r)&&r.callee===Kk;let l,c,u=0,d,h,f,p=a||r===dm||r===Wk||!o&&(s==="svg"||s==="foreignObject"||s==="math");if(i.length>0){const m=iL(t,e,void 0,o,a);l=m.props,u=m.patchFlag,h=m.dynamicPropNames;const b=m.directives;f=b&&b.length?Su(b.map(y=>aX(y,e))):void 0,m.shouldUseBlock&&(p=!0)}if(t.children.length>0)if(r===__&&(p=!0,u|=1024),o&&r!==dm&&r!==__){const{slots:b,hasDynamicSlots:y}=sX(t,e);c=b,y&&(u|=1024)}else if(t.children.length===1&&r!==dm){const b=t.children[0],y=b.type,C=y===5||y===8;C&&uo(b,e)===0&&(u|=1),C||y===2?c=b:c=t.children}else c=t.children;h&&h.length&&(d=lX(h)),t.codegenNode=eg(e,r,l,c,u===0?void 0:u,d,f,!!p,!1,o,t.loc)};function oX(t,e,n=!1){let{tag:s}=t;const i=F3(s),o=Ny(t,"is",!1,!0);if(o)if(i||$u("COMPILER_IS_ON_ELEMENT",e)){let a;if(o.type===6?a=o.value&&Ft(o.value.content,!0):(a=o.exp,a||(a=Ft("is",!1,o.arg.loc))),a)return bs(e.helper(Kk),[a])}else o.type===6&&o.value.content.startsWith("vue:")&&(s=o.value.content.slice(4));const r=VI(s)||e.isBuiltInComponent(s);return r?(n||e.helper(r),r):(e.helper(Xk),e.components.add(s),ng(s,"component"))}function iL(t,e,n=t.props,s,i,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,b=!1,y=!1,C=!1,k=!1,x=!1;const S=[],E=L=>{c.length&&(u.push(Ho(o9(c),a)),c=[]),L&&u.push(L)},T=()=>{e.scopes.vFor>0&&c.push(ps(Ft("ref_for",!0),Ft("true")))},P=({key:L,value:V})=>{if(Ui(L)){const D=L.content,z=sd(D);if(z&&(!s||i)&&D.toLowerCase()!=="onclick"&&D!=="onUpdate:modelValue"&&!Ja(D)&&(C=!0),z&&Ja(D)&&(x=!0),z&&V.type===14&&(V=V.arguments[0]),V.type===20||(V.type===4||V.type===8)&&uo(V,e)>0)return;D==="ref"?m=!0:D==="class"?b=!0:D==="style"?y=!0:D!=="key"&&!S.includes(D)&&S.push(D),s&&(D==="class"||D==="style")&&!S.includes(D)&&S.push(D)}else k=!0};for(let L=0;L<n.length;L++){const V=n[L];if(V.type===6){const{loc:D,name:z,nameLoc:Y,value:B}=V;let U=!0;if(z==="ref"&&(m=!0,T()),z==="is"&&(F3(r)||B&&B.content.startsWith("vue:")||$u("COMPILER_IS_ON_ELEMENT",e)))continue;c.push(ps(Ft(z,!0,Y),Ft(B?B.content:"",U,B?B.loc:D)))}else{const{name:D,arg:z,exp:Y,loc:B,modifiers:U}=V,X=D==="bind",K=D==="on";if(D==="slot"){s||e.onError(jn(40,B));continue}if(D==="once"||D==="memo"||D==="is"||X&&lu(z,"is")&&(F3(r)||$u("COMPILER_IS_ON_ELEMENT",e))||K&&o)continue;if((X&&lu(z,"key")||K&&h&&lu(z,"vue:before-update"))&&(f=!0),X&&lu(z,"ref")&&T(),!z&&(X||K)){if(k=!0,Y)if(X){if(E(),$u("COMPILER_V_BIND_OBJECT_ORDER",e)){u.unshift(Y);continue}T(),E(),u.push(Y)}else E({type:14,loc:B,callee:e.helper(sx),arguments:s?[Y]:[Y,"true"]});else e.onError(jn(X?34:35,B));continue}X&&U.some(F=>F.content==="prop")&&(p|=32);const N=e.directiveTransforms[D];if(N){const{props:F,needRuntime:Q}=N(V,t,e);!o&&F.forEach(P),K&&z&&!Ui(z)?E(Ho(F,a)):c.push(...F),Q&&(d.push(V),Xi(Q)&&sL.set(V,Q))}else Sj(D)||(d.push(V),h&&(f=!0))}}let I;if(u.length?(E(),u.length>1?I=bs(e.helper(y_),u,a):I=u[0]):c.length&&(I=Ho(o9(c),a)),k?p|=16:(b&&!s&&(p|=2),y&&!s&&(p|=4),S.length&&(p|=8),C&&(p|=32)),!f&&(p===0||p===32)&&(m||x||d.length>0)&&(p|=512),!e.inSSR&&I)switch(I.type){case 15:let L=-1,V=-1,D=!1;for(let B=0;B<I.properties.length;B++){const U=I.properties[B].key;Ui(U)?U.content==="class"?L=B:U.content==="style"&&(V=B):U.isHandlerKey||(D=!0)}const z=I.properties[L],Y=I.properties[V];D?I=bs(e.helper(Qm),[I]):(z&&!Ui(z.value)&&(z.value=bs(e.helper(tx),[z.value])),Y&&(y||Y.value.type===4&&Y.value.content.trim()[0]==="["||Y.value.type===17)&&(Y.value=bs(e.helper(nx),[Y.value])));break;case 14:break;default:I=bs(e.helper(Qm),[bs(e.helper(Wg),[I])]);break}return{props:I,directives:d,patchFlag:p,dynamicPropNames:S,shouldUseBlock:f}}function o9(t){const e=new Map,n=[];for(let s=0;s<t.length;s++){const i=t[s];if(i.key.type===8||!i.key.isStatic){n.push(i);continue}const o=i.key.content,r=e.get(o);r?(o==="style"||o==="class"||sd(o))&&rX(r,i):(e.set(o,i),n.push(i))}return n}function rX(t,e){t.value.type===17?t.value.elements.push(e.value):t.value=Su([t.value,e.value],t.loc)}function aX(t,e){const n=[],s=sL.get(t);s?n.push(e.helperString(s)):(e.helper(Zk),e.directives.add(t.name),n.push(ng(t.name,"directive")));const{loc:i}=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=Ft("true",!1,i);n.push(Ho(t.modifiers.map(r=>ps(r,o)),i))}return Su(n,t.loc)}function lX(t){let e="[";for(let n=0,s=t.length;n<s;n++)e+=JSON.stringify(t[n]),n<s-1&&(e+=", ");return e+"]"}function F3(t){return t==="component"||t==="Component"}const cX=(t,e)=>{if(k_(t)){const{children:n,loc:s}=t,{slotName:i,slotProps:o}=uX(t,e),r=[e.prefixIdentifiers?"_ctx.$slots":"$slots",i,"{}","undefined","true"];let a=2;o&&(r[2]=o,a=3),n.length&&(r[3]=Zh([],n,!1,!1,s),a=4),e.scopeId&&!e.slotted&&(a=5),r.splice(a),t.codegenNode=bs(e.helper(LI),r,s)}};function uX(t,e){let n='"default"',s;const i=[];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=Bn(r.name),i.push(r)));else if(r.name==="bind"&&lu(r.arg,"name")){if(r.exp)n=r.exp;else if(r.arg&&r.arg.type===4){const a=Bn(r.arg.content);n=r.exp=Ft(a,!1,r.arg.loc)}}else r.name==="bind"&&r.arg&&Ui(r.arg)&&(r.arg.content=Bn(r.arg.content)),i.push(r)}if(i.length>0){const{props:o,directives:r}=iL(t,e,i,!1,!1);s=o,r.length&&e.onError(jn(36,r[0].loc))}return{slotName:n,slotProps:s}}const oL=(t,e,n,s)=>{const{loc:i,modifiers:o,arg:r}=t;!t.exp&&!o.length&&n.onError(jn(35,i));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)?wu(Bn(d)):`on:${d}`;a=Ft(h,!0,r.loc)}else a=wr([`${n.helperString(L3)}(`,r,")"]);else a=r,a.children.unshift(`${n.helperString(L3)}(`),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=BI(l),h=!(d||cq(l)),f=l.content.includes(";");(h||c&&d)&&(l=wr([`${h?"$event":"(...args)"} => ${f?"{":"("}`,l,f?"}":")"]))}let u={props:[ps(a,l||Ft("() => {}",!1,i))]};return s&&(u=s(u)),c&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach(d=>d.key.isHandlerKey=!0),u},dX=(t,e,n)=>{const{modifiers:s,loc:i}=t,o=t.arg;let{exp:r}=t;return r&&r.type===4&&!r.content.trim()&&(r=void 0),o.type!==4?(o.children.unshift("("),o.children.push(') || ""')):o.isStatic||(o.content=o.content?`${o.content} || ""`:'""'),s.some(a=>a.content==="camel")&&(o.type===4?o.isStatic?o.content=Bn(o.content):o.content=`${n.helperString(I3)}(${o.content})`:(o.children.unshift(`${n.helperString(I3)}(`),o.children.push(")"))),n.inSSR||(s.some(a=>a.content==="prop")&&r9(o,"."),s.some(a=>a.content==="attr")&&r9(o,"^")),{props:[ps(o,r)]}},r9=(t,e)=>{t.type===4?t.isStatic?t.content=e+t.content:t.content=`\`${e}\${${t.content}}\``:(t.children.unshift(`'${e}' + (`),t.children.push(")"))},hX=(t,e)=>{if(t.type===0||t.type===1||t.type===11||t.type===10)return()=>{const n=t.children;let s,i=!1;for(let o=0;o<n.length;o++){const r=n[o];if(x2(r)){i=!0;for(let a=o+1;a<n.length;a++){const l=n[a];if(x2(l))s||(s=n[o]=wr([r],r.loc)),s.children.push(" + ",l),n.splice(a,1),a--;else{s=void 0;break}}}}if(!(!i||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(x2(r)||r.type===8){const a=[];(r.type!==2||r.content!==" ")&&a.push(r),!e.ssr&&uo(r,e)===0&&a.push("1"),n[o]={type:12,content:r,loc:r.loc,codegenNode:bs(e.helper(qk),a)}}}}},a9=new WeakSet,fX=(t,e)=>{if(t.type===1&&Ro(t,"once",!0))return a9.has(t)||e.inVOnce||e.inSSR?void 0:(a9.add(t),e.inVOnce=!0,e.helper(b_),()=>{e.inVOnce=!1;const n=e.currentNode;n.codegenNode&&(n.codegenNode=e.cache(n.codegenNode,!0,!0))})},rL=(t,e,n)=>{const{exp:s,arg:i}=t;if(!s)return n.onError(jn(41,t.loc)),dp();const o=s.loc.source.trim(),r=s.type===4?s.content:o,a=n.bindingMetadata[o];if(a==="props"||a==="props-aliased")return n.onError(jn(44,s.loc)),dp();if(a==="literal-const"||a==="setup-const")return n.onError(jn(45,s.loc)),dp();if(!r.trim()||!BI(s))return n.onError(jn(42,s.loc)),dp();const l=i||Ft("modelValue",!0),c=i?Ui(i)?`onUpdate:${Bn(i.content)}`:wr(['"onUpdate:" + ',i]):"onUpdate:modelValue";let u;const d=n.isTS?"($event: any)":"$event";u=wr([`${d} => ((`,s,") = $event)"]);const h=[ps(l,t.exp),ps(c,u)];if(t.modifiers.length&&e.tagType===1){const f=t.modifiers.map(m=>m.content).map(m=>(lx(m)?m:JSON.stringify(m))+": true").join(", "),p=i?Ui(i)?`${i.content}Modifiers`:wr([i,' + "Modifiers"']):"modelModifiers";h.push(ps(p,Ft(`{ ${f} }`,!1,t.loc,2)))}return dp(h)};function dp(t=[]){return{props:t}}const pX=/[\w).+\-_$\]]/,mX=(t,e)=>{$u("COMPILER_FILTERS",e)&&(t.type===5?S_(t.content,e):t.type===1&&t.props.forEach(n=>{n.type===7&&n.name!=="for"&&n.exp&&S_(n.exp,e)}))};function S_(t,e){if(t.type===4)l9(t,e);else for(let n=0;n<t.children.length;n++){const s=t.children[n];typeof s=="object"&&(s.type===4?l9(s,e):s.type===8?S_(t,e):s.type===5&&S_(s.content,e))}}function l9(t,e){const n=t.content;let s=!1,i=!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),s)d===39&&h!==92&&(s=!1);else if(i)d===34&&h!==92&&(i=!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()):b();else{switch(d){case 34:i=!0;break;case 39:s=!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 y=f-1,C;for(;y>=0&&(C=n.charAt(y),C===" ");y--);(!C||!pX.test(C))&&(r=!0)}}p===void 0?p=n.slice(0,f).trim():u!==0&&b();function b(){m.push(n.slice(u,f).trim()),u=f+1}if(m.length){for(f=0;f<m.length;f++)p=gX(p,m[f],e);t.content=p,t.ast=void 0}}function gX(t,e,n){n.helper(Jk);const s=e.indexOf("(");if(s<0)return n.filters.add(e),`${ng(e,"filter")}(${t})`;{const i=e.slice(0,s),o=e.slice(s+1);return n.filters.add(i),`${ng(i,"filter")}(${t}${o!==")"?","+o:o}`}}const c9=new WeakSet,vX=(t,e)=>{if(t.type===1){const n=Ro(t,"memo");return!n||c9.has(t)||e.inSSR?void 0:(c9.add(t),()=>{const s=t.codegenNode||e.currentNode.codegenNode;s&&s.type===13&&(t.tagType!==1&&rx(s,e),t.codegenNode=bs(e.helper(ox),[n.exp,Zh(void 0,s),"_cache",String(e.cached.length)]),e.cached.push(null))})}},_X=(t,e)=>{if(t.type===1){for(const n of t.props)if(n.type===7&&n.name==="bind"&&(!n.exp||n.exp.type===4&&!n.exp.content.trim())&&n.arg){const s=n.arg;if(s.type!==4||!s.isStatic)e.onError(jn(53,s.loc)),n.exp=Ft("",!0,s.loc);else{const i=Bn(s.content);(FI.test(i[0])||i[0]==="-")&&(n.exp=Ft(i,!1,s.loc))}}}};function yX(t){return[[_X,fX,Xq,vX,Jq,mX,cX,iX,tX,hX],{on:oL,bind:dX,model:rL}]}function bX(t,e={}){const n=e.onError||ax,s=e.mode==="module";e.prefixIdentifiers===!0?n(jn(48)):s&&n(jn(49));const i=!1;e.cacheHandlers&&n(jn(50)),e.scopeId&&!s&&n(jn(51));const o=Zt({},e,{prefixIdentifiers:i}),r=nt(t)?$q(t,o):t,[a,l]=yX();return Tq(r,Zt({},o,{nodeTransforms:[...a,...e.nodeTransforms||[]],directiveTransforms:Zt({},l,e.directiveTransforms||{})})),Oq(r,o)}const wX=()=>({props:[]});/** | |
| 23 | +**/const Ig=Symbol(""),qm=Symbol(""),F6=Symbol(""),sy=Symbol(""),AL=Symbol(""),gd=Symbol(""),EL=Symbol(""),ML=Symbol(""),N6=Symbol(""),B6=Symbol(""),M1=Symbol(""),z6=Symbol(""),TL=Symbol(""),H6=Symbol(""),U6=Symbol(""),j6=Symbol(""),W6=Symbol(""),Y6=Symbol(""),q6=Symbol(""),PL=Symbol(""),IL=Symbol(""),Mb=Symbol(""),iy=Symbol(""),G6=Symbol(""),X6=Symbol(""),Lg=Symbol(""),T1=Symbol(""),K6=Symbol(""),Mk=Symbol(""),iX=Symbol(""),Tk=Symbol(""),oy=Symbol(""),oX=Symbol(""),rX=Symbol(""),Z6=Symbol(""),aX=Symbol(""),lX=Symbol(""),J6=Symbol(""),LL=Symbol(""),Ef={[Ig]:"Fragment",[qm]:"Teleport",[F6]:"Suspense",[sy]:"KeepAlive",[AL]:"BaseTransition",[gd]:"openBlock",[EL]:"createBlock",[ML]:"createElementBlock",[N6]:"createVNode",[B6]:"createElementVNode",[M1]:"createCommentVNode",[z6]:"createTextVNode",[TL]:"createStaticVNode",[H6]:"resolveComponent",[U6]:"resolveDynamicComponent",[j6]:"resolveDirective",[W6]:"resolveFilter",[Y6]:"withDirectives",[q6]:"renderList",[PL]:"renderSlot",[IL]:"createSlots",[Mb]:"toDisplayString",[iy]:"mergeProps",[G6]:"normalizeClass",[X6]:"normalizeStyle",[Lg]:"normalizeProps",[T1]:"guardReactiveProps",[K6]:"toHandlers",[Mk]:"camelize",[iX]:"capitalize",[Tk]:"toHandlerKey",[oy]:"setBlockTracking",[oX]:"pushScopeId",[rX]:"popScopeId",[Z6]:"withCtx",[aX]:"unref",[lX]:"isRef",[J6]:"withMemo",[LL]:"isMemoSame"};function cX(t){Object.getOwnPropertySymbols(t).forEach(e=>{Ef[e]=t[e]})}const Uo={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function uX(t,e=""){return{type:0,source:e,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:Uo}}function Og(t,e,n,i,s,o,r,a=!1,l=!1,c=!1,u=Uo){return t&&(a?(t.helper(gd),t.helper(Pf(t.inSSR,c))):t.helper(Tf(t.inSSR,c)),r&&t.helper(Y6)),{type:13,tag:e,props:n,children:i,patchFlag:s,dynamicProps:o,directives:r,isBlock:a,disableTracking:l,isComponent:c,loc:u}}function Zu(t,e=Uo){return{type:17,loc:e,elements:t}}function cr(t,e=Uo){return{type:15,loc:e,properties:t}}function Ps(t,e){return{type:16,loc:Uo,key:Ke(t)?Xt(t,!0):t,value:e}}function Xt(t,e=!1,n=Uo,i=0){return{type:4,loc:n,content:t,isStatic:e,constType:e?3:i}}function Nr(t,e=Uo){return{type:8,loc:e,children:t}}function Vs(t,e=[],n=Uo){return{type:14,loc:n,callee:t,arguments:e}}function Mf(t,e=void 0,n=!1,i=!1,s=Uo){return{type:18,params:t,returns:e,newline:n,isSlot:i,loc:s}}function Pk(t,e,n,i=!0){return{type:19,test:t,consequent:e,alternate:n,newline:i,loc:Uo}}function dX(t,e,n=!1,i=!1){return{type:20,index:t,value:e,needPauseTracking:n,inVOnce:i,needArraySpread:!1,loc:Uo}}function hX(t){return{type:21,body:t,loc:Uo}}function Tf(t,e){return t||e?N6:B6}function Pf(t,e){return t||e?EL:ML}function Q6(t,{helper:e,removeHelper:n,inSSR:i}){t.isBlock||(t.isBlock=!0,n(Tf(i,t.isComponent)),e(gd),e(Pf(i,t.isComponent)))}const Q9=new Uint8Array([123,123]),e7=new Uint8Array([125,125]);function t7(t){return t>=97&&t<=122||t>=65&&t<=90}function Eo(t){return t===32||t===10||t===9||t===12||t===13}function Bl(t){return t===47||t===62||Eo(t)}function ry(t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}const bi={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 fX{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=Q9,this.delimiterClose=e7,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=Q9,this.delimiterClose=e7}getPos(e){let n=1,i=e+1;const s=this.newlines.length;let o=-1;if(s>100){let r=-1,a=s;for(;r+1<a;){const l=r+a>>>1;this.newlines[l]<e?r=l:a=l}o=r}else for(let r=s-1;r>=0;r--)if(e>this.newlines[r]){o=r;break}return o>=0&&(n=o+2,i=e-this.newlines[o]),{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?Bl(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||Eo(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===bi.TitleEnd||this.currentSequence===bi.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&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===bi.Cdata[this.sequenceIndex]?++this.sequenceIndex===bi.Cdata.length&&(this.state=28,this.currentSequence=bi.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===bi.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):t7(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){Bl(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(Bl(e)){const n=this.buffer.slice(this.sectionStart,this.index);n!=="template"&&this.enterRCDATA(ry("</"+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){Eo(e)||(e===62?(this.state=1,this.sectionStart=this.index+1):(this.state=t7(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(e===62||Eo(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):Eo(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):Eo(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(e===61||Bl(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){e===61||Bl(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||Bl(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||Bl(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){e===61||Bl(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)):Eo(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):Eo(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){Eo(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=bi.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===bi.ScriptEnd[3]?this.startSpecial(bi.ScriptEnd,4):e===bi.StyleEnd[3]?this.startSpecial(bi.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===bi.TitleEnd[3]?this.startSpecial(bi.TitleEnd,4):e===bi.TextareaEnd[3]?this.startSpecial(bi.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.state!==33&&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===bi.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 n7(t,{compatConfig:e}){const n=e&&e[t];return t==="MODE"?n||3:n}function Ju(t,e){const n=n7("MODE",e),i=n7(t,e);return n===3?i===!0:i!==!1}function Dg(t,e,n,...i){return Ju(t,e)}function e4(t){throw t}function OL(t){}function ss(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 lo=t=>t.type===4&&t.isStatic;function DL(t){switch(t){case"Teleport":case"teleport":return qm;case"Suspense":case"suspense":return F6;case"KeepAlive":case"keep-alive":return sy;case"BaseTransition":case"base-transition":return AL}}const pX=/^$|^\d|[^\$\w\xA0-\uFFFF]/,t4=t=>!pX.test(t),RL=/[A-Za-z_$\xA0-\uFFFF]/,mX=/[\.\?\w$\xA0-\uFFFF]/,gX=/\s+[.[]\s*|\s*[.[]\s+/g,VL=t=>t.type===4?t.content:t.loc.source,vX=t=>{const e=VL(t).trim().replace(gX,a=>a.trim());let n=0,i=[],s=0,o=0,r=null;for(let a=0;a<e.length;a++){const l=e.charAt(a);switch(n){case 0:if(l==="[")i.push(n),n=1,s++;else if(l==="(")i.push(n),n=2,o++;else if(!(a===0?RL:mX).test(l))return!1;break;case 1:l==="'"||l==='"'||l==="`"?(i.push(n),n=3,r=l):l==="["?s++:l==="]"&&(--s||(n=i.pop()));break;case 2:if(l==="'"||l==='"'||l==="`")i.push(n),n=3,r=l;else if(l==="(")o++;else if(l===")"){if(a===e.length-1)return!1;--o||(n=i.pop())}break;case 3:l===r&&(n=i.pop(),r=null);break}}return!s&&!o},FL=vX,_X=/^\s*(?:async\s*)?(?:\([^)]*?\)|[\w$_]+)\s*(?::[^=]+)?=>|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,yX=t=>_X.test(VL(t)),bX=yX;function ir(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 Tb(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)&&Du(o.arg,e))return o}}function Du(t,e){return!!(t&&lo(t)&&t.content===e)}function wX(t){return t.props.some(e=>e.type===7&&e.name==="bind"&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function mw(t){return t.type===5||t.type===2}function s7(t){return t.type===7&&t.name==="pre"}function kX(t){return t.type===7&&t.name==="slot"}function ay(t){return t.type===1&&t.tagType===3}function ly(t){return t.type===1&&t.tagType===2}const CX=new Set([Lg,T1]);function NL(t,e=[]){if(t&&!Ke(t)&&t.type===14){const n=t.callee;if(!Ke(n)&&CX.has(n))return NL(t.arguments[0],e.concat(t))}return[t,e]}function cy(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=NL(s);s=a[0],o=a[1],r=o[o.length-1]}if(s==null||Ke(s))i=cr([e]);else if(s.type===14){const a=s.arguments[0];!Ke(a)&&a.type===15?i7(e,a)||a.properties.unshift(e):s.callee===K6?i=Vs(n.helper(iy),[cr([e]),s]):s.arguments.unshift(cr([e])),!i&&(i=s)}else s.type===15?(i7(e,s)||s.properties.unshift(e),i=s):(i=Vs(n.helper(iy),[cr([e]),s]),r&&r.callee===T1&&(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 i7(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 Rg(t,e){return`_${e}_${t.replace(/[^\w]/g,(n,i)=>n==="-"?"_":t.charCodeAt(i).toString())}`}function xX(t){return t.type===14&&t.callee===J6?t.arguments[1].returns:t}const SX=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function BL(t){for(let e=0;e<t.length;e++)if(!Eo(t.charCodeAt(e)))return!1;return!0}function n4(t){return t.type===2&&BL(t.content)||t.type===12&&n4(t.content)}function zL(t){return t.type===3||n4(t)}const HL={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:qh,isPreTag:qh,isIgnoreNewlineTag:qh,isCustomElement:qh,onError:e4,onWarn:OL,comments:!1,prefixIdentifiers:!1};let An=HL,Vg=null,hl="",Si=null,fn=null,no="",qa=-1,bu=-1,s4=0,uc=!1,Ik=null;const us=[],_s=new fX(us,{onerr:ja,ontext(t,e){zv(Zs(t,e),t,e)},ontextentity(t,e,n){zv(t,e,n)},oninterpolation(t,e){if(uc)return zv(Zs(t,e),t,e);let n=t+_s.delimiterOpen.length,i=e-_s.delimiterClose.length;for(;Eo(hl.charCodeAt(n));)n++;for(;Eo(hl.charCodeAt(i-1));)i--;let s=Zs(n,i);s.includes("&")&&(s=An.decodeEntities(s,!1)),Lk({type:5,content:M0(s,!1,Cs(n,i)),loc:Cs(t,e)})},onopentagname(t,e){const n=Zs(t,e);Si={type:1,tag:n,ns:An.getNamespace(n,us[0],An.ns),tagType:0,props:[],children:[],loc:Cs(t-1,e),codegenNode:void 0}},onopentagend(t){r7(t)},onclosetag(t,e){const n=Zs(t,e);if(!An.isVoidTag(n)){let i=!1;for(let s=0;s<us.length;s++)if(us[s].tag.toLowerCase()===n.toLowerCase()){i=!0,s>0&&ja(24,us[0].loc.start.offset);for(let r=0;r<=s;r++){const a=us.shift();E0(a,e,r<s)}break}i||ja(23,UL(t,60))}},onselfclosingtag(t){const e=Si.tag;Si.isSelfClosing=!0,r7(t),us[0]&&us[0].tag===e&&E0(us.shift(),t)},onattribname(t,e){fn={type:6,name:Zs(t,e),nameLoc:Cs(t,e),value:void 0,loc:Cs(t)}},ondirname(t,e){const n=Zs(t,e),i=n==="."||n===":"?"bind":n==="@"?"on":n==="#"?"slot":n.slice(2);if(!uc&&i===""&&ja(26,t),uc||i==="")fn={type:6,name:n,nameLoc:Cs(t,e),value:void 0,loc:Cs(t)};else if(fn={type:7,name:i,rawName:n,exp:void 0,arg:void 0,modifiers:n==="."?[Xt("prop")]:[],loc:Cs(t)},i==="pre"){uc=_s.inVPre=!0,Ik=Si;const s=Si.props;for(let o=0;o<s.length;o++)s[o].type===7&&(s[o]=DX(s[o]))}},ondirarg(t,e){if(t===e)return;const n=Zs(t,e);if(uc&&!s7(fn))fn.name+=n,Ru(fn.nameLoc,e);else{const i=n[0]!=="[";fn.arg=M0(i?n:n.slice(1,-1),i,Cs(t,e),i?3:0)}},ondirmodifier(t,e){const n=Zs(t,e);if(uc&&!s7(fn))fn.name+="."+n,Ru(fn.nameLoc,e);else if(fn.name==="slot"){const i=fn.arg;i&&(i.content+="."+n,Ru(i.loc,e))}else{const i=Xt(n,!0,Cs(t,e));fn.modifiers.push(i)}},onattribdata(t,e){no+=Zs(t,e),qa<0&&(qa=t),bu=e},onattribentity(t,e,n){no+=t,qa<0&&(qa=e),bu=n},onattribnameend(t){const e=fn.loc.start.offset,n=Zs(e,t);fn.type===7&&(fn.rawName=n),Si.props.some(i=>(i.type===7?i.rawName:i.name)===n)&&ja(2,e)},onattribend(t,e){if(Si&&fn){if(Ru(fn.loc,e),t!==0)if(no.includes("&")&&(no=An.decodeEntities(no,!0)),fn.type===6)fn.name==="class"&&(no=WL(no).trim()),t===1&&!no&&ja(13,e),fn.value={type:2,content:no,loc:t===1?Cs(qa,bu):Cs(qa-1,bu+1)},_s.inSFCRoot&&Si.tag==="template"&&fn.name==="lang"&&no&&no!=="html"&&_s.enterRCDATA(ry("</template"),0);else{let n=0;fn.exp=M0(no,!1,Cs(qa,bu),0,n),fn.name==="for"&&(fn.forParseResult=AX(fn.exp));let i=-1;fn.name==="bind"&&(i=fn.modifiers.findIndex(s=>s.content==="sync"))>-1&&Dg("COMPILER_V_BIND_SYNC",An,fn.loc,fn.arg.loc.source)&&(fn.name="model",fn.modifiers.splice(i,1))}(fn.type!==7||fn.name!=="pre")&&Si.props.push(fn)}no="",qa=bu=-1},oncomment(t,e){An.comments&&Lk({type:3,content:Zs(t,e),loc:Cs(t-4,e+3)})},onend(){const t=hl.length;for(let e=0;e<us.length;e++)E0(us[e],t-1),ja(24,us[e].loc.start.offset)},oncdata(t,e){us[0].ns!==0?zv(Zs(t,e),t,e):ja(1,t-9)},onprocessinginstruction(t){(us[0]?us[0].ns:An.ns)===0&&ja(21,t-1)}}),o7=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,$X=/^\(|\)$/g;function AX(t){const e=t.loc,n=t.content,i=n.match(SX);if(!i)return;const[,s,o]=i,r=(d,h,f=!1)=>{const p=e.start.offset+h,m=p+d.length;return M0(d,!1,Cs(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($X,"").trim();const c=s.indexOf(l),u=l.match(o7);if(u){l=l.replace(o7,"").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 Zs(t,e){return hl.slice(t,e)}function r7(t){_s.inSFCRoot&&(Si.innerLoc=Cs(t+1,t+1)),Lk(Si);const{tag:e,ns:n}=Si;n===0&&An.isPreTag(e)&&s4++,An.isVoidTag(e)?E0(Si,t):(us.unshift(Si),(n===1||n===2)&&(_s.inXML=!0)),Si=null}function zv(t,e,n){{const o=us[0]&&us[0].tag;o!=="script"&&o!=="style"&&t.includes("&")&&(t=An.decodeEntities(t,!1))}const i=us[0]||Vg,s=i.children[i.children.length-1];s&&s.type===2?(s.content+=t,Ru(s.loc,n)):i.children.push({type:2,content:t,loc:Cs(e,n)})}function E0(t,e,n=!1){n?Ru(t.loc,UL(e,60)):Ru(t.loc,EX(e,62)+1),_s.inSFCRoot&&(t.children.length?t.innerLoc.end=cn({},t.children[t.children.length-1].loc.end):t.innerLoc.end=cn({},t.innerLoc.start),t.innerLoc.source=Zs(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:i,ns:s,children:o}=t;if(uc||(i==="slot"?t.tagType=2:a7(t)?t.tagType=3:TX(t)&&(t.tagType=1)),_s.inRCDATA||(t.children=jL(o)),s===0&&An.isIgnoreNewlineTag(i)){const r=o[0];r&&r.type===2&&(r.content=r.content.replace(/^\r?\n/,""))}s===0&&An.isPreTag(i)&&s4--,Ik===t&&(uc=_s.inVPre=!1,Ik=null),_s.inXML&&(us[0]?us[0].ns:An.ns)===0&&(_s.inXML=!1);{const r=t.props;if(!_s.inSFCRoot&&Ju("COMPILER_NATIVE_TEMPLATE",An)&&t.tag==="template"&&!a7(t)){const l=us[0]||Vg,c=l.children.indexOf(t);l.children.splice(c,1,...t.children)}const a=r.find(l=>l.type===6&&l.name==="inline-template");a&&Dg("COMPILER_INLINE_TEMPLATE",An,a.loc)&&t.children.length&&(a.value={type:2,content:Zs(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:a.loc})}}function EX(t,e){let n=t;for(;hl.charCodeAt(n)!==e&&n<hl.length-1;)n++;return n}function UL(t,e){let n=t;for(;hl.charCodeAt(n)!==e&&n>=0;)n--;return n}const MX=new Set(["if","else","else-if","for","slot"]);function a7({tag:t,props:e}){if(t==="template"){for(let n=0;n<e.length;n++)if(e[n].type===7&&MX.has(e[n].name))return!0}return!1}function TX({tag:t,props:e}){if(An.isCustomElement(t))return!1;if(t==="component"||PX(t.charCodeAt(0))||DL(t)||An.isBuiltInComponent&&An.isBuiltInComponent(t)||An.isNativeTag&&!An.isNativeTag(t))return!0;for(let n=0;n<e.length;n++){const i=e[n];if(i.type===6){if(i.name==="is"&&i.value){if(i.value.content.startsWith("vue:"))return!0;if(Dg("COMPILER_IS_ON_ELEMENT",An,i.loc))return!0}}else if(i.name==="bind"&&Du(i.arg,"is")&&Dg("COMPILER_IS_ON_ELEMENT",An,i.loc))return!0}return!1}function PX(t){return t>64&&t<91}const IX=/\r\n/g;function jL(t){const e=An.whitespace!=="preserve";let n=!1;for(let i=0;i<t.length;i++){const s=t[i];if(s.type===2)if(s4)s.content=s.content.replace(IX,` | |
| 24 | +`);else if(BL(s.content)){const o=t[i-1]&&t[i-1].type,r=t[i+1]&&t[i+1].type;!o||!r||e&&(o===3&&(r===3||r===1)||o===1&&(r===3||r===1&&LX(s.content)))?(n=!0,t[i]=null):s.content=" "}else e&&(s.content=WL(s.content))}return n?t.filter(Boolean):t}function LX(t){for(let e=0;e<t.length;e++){const n=t.charCodeAt(e);if(n===10||n===13)return!0}return!1}function WL(t){let e="",n=!1;for(let i=0;i<t.length;i++)Eo(t.charCodeAt(i))?n||(e+=" ",n=!0):(e+=t[i],n=!1);return e}function Lk(t){(us[0]||Vg).children.push(t)}function Cs(t,e){return{start:_s.getPos(t),end:e==null?e:_s.getPos(e),source:e==null?e:Zs(t,e)}}function OX(t){return Cs(t.start.offset,t.end.offset)}function Ru(t,e){t.end=_s.getPos(e),t.source=Zs(t.start.offset,e)}function DX(t){const e={type:6,name:t.rawName,nameLoc:Cs(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 M0(t,e=!1,n,i=0,s=0){return Xt(t,e,n,i)}function ja(t,e,n){An.onError(ss(t,Cs(e,e)))}function RX(){_s.reset(),Si=null,fn=null,no="",qa=-1,bu=-1,us.length=0}function VX(t,e){if(RX(),hl=t,An=cn({},HL),e){let s;for(s in e)e[s]!=null&&(An[s]=e[s])}_s.mode=An.parseMode==="html"?1:An.parseMode==="sfc"?2:0,_s.inXML=An.ns===1||An.ns===2;const n=e&&e.delimiters;n&&(_s.delimiterOpen=ry(n[0]),_s.delimiterClose=ry(n[1]));const i=Vg=uX([],t);return _s.parse(hl),i.loc=Cs(0,t.length),i.children=jL(i.children),Vg=null,i}function FX(t,e){T0(t,void 0,e,!!YL(t))}function YL(t){const e=t.children.filter(n=>n.type!==3);return e.length===1&&e[0].type===1&&!ly(e[0])?e[0]:null}function T0(t,e,n,i=!1,s=!1){const{children:o}=t,r=[];for(let u=0;u<o.length;u++){const d=o[u];if(d.type===1&&d.tagType===0){const h=i?0:To(d,n);if(h>0){if(h>=2){d.codegenNode.patchFlag=-1,r.push(d);continue}}else{const f=d.codegenNode;if(f.type===13){const p=f.patchFlag;if((p===void 0||p===512||p===1)&&GL(d,n)>=2){const m=XL(d);m&&(f.props=n.hoist(m))}f.dynamicProps&&(f.dynamicProps=n.hoist(f.dynamicProps))}}}else if(d.type===12&&(i?0:To(d,n))>=2){d.codegenNode.type===14&&d.codegenNode.arguments.length>0&&d.codegenNode.arguments.push("-1"),r.push(d);continue}if(d.type===1){const h=d.tagType===1;h&&n.scopes.vSlot++,T0(d,t,n,!1,s),h&&n.scopes.vSlot--}else if(d.type===11)T0(d,t,n,d.children.length===1,!0);else if(d.type===9)for(let h=0;h<d.branches.length;h++)T0(d.branches[h],t,n,d.branches[h].children.length===1,s)}let a=!1;if(r.length===o.length&&t.type===1){if(t.tagType===0&&t.codegenNode&&t.codegenNode.type===13&&Me(t.codegenNode.children))t.codegenNode.children=l(Zu(t.codegenNode.children)),a=!0;else if(t.tagType===1&&t.codegenNode&&t.codegenNode.type===13&&t.codegenNode.children&&!Me(t.codegenNode.children)&&t.codegenNode.children.type===15){const u=c(t.codegenNode,"default");u&&(u.returns=l(Zu(u.returns)),a=!0)}else if(t.tagType===3&&e&&e.type===1&&e.tagType===1&&e.codegenNode&&e.codegenNode.type===13&&e.codegenNode.children&&!Me(e.codegenNode.children)&&e.codegenNode.children.type===15){const u=ir(t,"slot",!0),d=u&&u.arg&&c(e.codegenNode,u.arg);d&&(d.returns=l(Zu(d.returns)),a=!0)}}if(!a)for(const u of r)u.codegenNode=n.cache(u.codegenNode);function l(u){const d=n.cache(u);return d.needArraySpread=!0,d}function c(u,d){if(u.children&&!Me(u.children)&&u.children.type===15){const h=u.children.properties.find(f=>f.key===d||f.key.content===d);return h&&h.value}}r.length&&n.transformHoist&&n.transformHoist(o,n,t)}function To(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"&&t.tag!=="math")return 0;if(s.patchFlag===void 0){let r=3;const a=GL(t,e);if(a===0)return n.set(t,0),0;a<r&&(r=a);for(let l=0;l<t.children.length;l++){const c=To(t.children[l],e);if(c===0)return n.set(t,0),0;c<r&&(r=c)}if(r>1)for(let l=0;l<t.props.length;l++){const c=t.props[l];if(c.type===7&&c.name==="bind"&&c.exp){const u=To(c.exp,e);if(u===0)return n.set(t,0),0;u<r&&(r=u)}}if(s.isBlock){for(let l=0;l<t.props.length;l++)if(t.props[l].type===7)return n.set(t,0),0;e.removeHelper(gd),e.removeHelper(Pf(e.inSSR,s.isComponent)),s.isBlock=!1,e.helper(Tf(e.inSSR,s.isComponent))}return n.set(t,r),r}else return n.set(t,0),0;case 2:case 3:return 3;case 9:case 11:case 10:return 0;case 5:case 12:return To(t.content,e);case 4:return t.constType;case 8:let o=3;for(let r=0;r<t.children.length;r++){const a=t.children[r];if(Ke(a)||mo(a))continue;const l=To(a,e);if(l===0)return 0;l<o&&(o=l)}return o;case 20:return 2;default:return 0}}const NX=new Set([G6,X6,Lg,T1]);function qL(t,e){if(t.type===14&&!Ke(t.callee)&&NX.has(t.callee)){const n=t.arguments[0];if(n.type===4)return To(n,e);if(n.type===14)return qL(n,e)}return 0}function GL(t,e){let n=3;const i=XL(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=To(r,e);if(l===0)return l;l<n&&(n=l);let c;if(a.type===4?c=To(a,e):a.type===14?c=qL(a,e):c=0,c===0)return c;c<n&&(n=c)}}return n}function XL(t){const e=t.codegenNode;if(e.type===13)return e.props}function BX(t,{filename:e="",prefixIdentifiers:n=!1,hoistStatic:i=!1,hmr:s=!1,cacheHandlers:o=!1,nodeTransforms:r=[],directiveTransforms:a={},transformHoist:l=null,isBuiltInComponent:c=Dt,isCustomElement:u=Dt,expressionPlugins:d=[],scopeId:h=null,slotted:f=!0,ssr:p=!1,inSSR:m=!1,ssrCssVars:y="",bindingMetadata:b=pn,inline:k=!1,isTS:C=!1,onError:$=e4,onWarn:S=OL,compatConfig:M}){const P=e.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),T={filename:e,selfName:P&&Gc(Un(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:S,compatConfig:M,root:t,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],cached:[],constantCache:new WeakMap,temps:0,identifiers:Object.create(null),scopes:{vFor:0,vSlot:0,vPre:0,vOnce:0},parent:null,grandParent: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`_${Ef[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:Dt,addIdentifiers(I){},removeIdentifiers(I){},hoist(I){Ke(I)&&(I=Xt(I)),T.hoists.push(I);const L=Xt(`_hoisted_${T.hoists.length}`,!1,I.loc,2);return L.hoisted=I,L},cache(I,L=!1,R=!1){const V=dX(T.cached.length,I,L,R);return T.cached.push(V),V}};return T.filters=new Set,T}function zX(t,e){const n=BX(t,e);Pb(t,n),e.hoistStatic&&FX(t,n),e.ssr||HX(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 HX(t,e){const{helper:n}=e,{children:i}=t;if(i.length===1){const s=YL(t);if(s&&s.codegenNode){const o=s.codegenNode;o.type===13&&Q6(o,e),t.codegenNode=o}else t.codegenNode=i[0]}else if(i.length>1){let s=64;t.codegenNode=Og(e,n(Ig),void 0,t.children,s,void 0,void 0,!0,void 0,!1)}}function UX(t,e){let n=0;const i=()=>{n--};for(;n<t.children.length;n++){const s=t.children[n];Ke(s)||(e.grandParent=e.parent,e.parent=t,e.childIndex=n,e.onNodeRemoved=i,Pb(s,e))}}function Pb(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&&(Me(r)?i.push(...r):i.push(r)),e.currentNode)t=e.currentNode;else return}switch(t.type){case 3:e.ssr||e.helper(M1);break;case 5:e.ssr||e.helper(Mb);break;case 9:for(let o=0;o<t.branches.length;o++)Pb(t.branches[o],e);break;case 10:case 11:case 1:case 0:UX(t,e);break}e.currentNode=t;let s=i.length;for(;s--;)i[s]()}function KL(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(kX))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 Ib="/*@__PURE__*/",ZL=t=>`${Ef[t]}: _${Ef[t]}`;function jX(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`_${Ef[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(` | |
| 25 | +`+" ".repeat(m),0)}return f}function WX(t,e={}){const n=jX(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";YX(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(ZL).join(", ")} } = _Vue | |
| 26 | +`,-1),l())),t.components.length&&(gw(t.components,"component",n),(t.directives.length||t.temps>0)&&l()),t.directives.length&&(gw(t.directives,"directive",n),t.temps>0&&l()),t.filters&&t.filters.length&&(l(),gw(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(` | |
| 27 | +`,0),l()),u||s("return "),t.codegenNode?Mi(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 YX(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} | |
| 28 | +`,-1),t.hoists.length)){const d=[N6,B6,M1,z6,TL].filter(h=>u.includes(h)).map(ZL).join(", ");s(`const { ${d} } = _Vue | |
| 29 | +`,-1)}qX(t.hoists,e),o(),s("return ")}function gw(t,e,{helper:n,push:i,newline:s,isTS:o}){const r=n(e==="filter"?W6:e==="component"?H6:j6);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 ${Rg(l,e)} = ${r}(${JSON.stringify(l)}${c?", true":""})${o?"!":""}`),a<t.length-1&&s()}}function qX(t,e){if(!t.length)return;e.pure=!0;const{push:n,newline:i}=e;i();for(let s=0;s<t.length;s++){const o=t[s];o&&(n(`const _hoisted_${s+1} = `),Mi(o,e),i())}e.pure=!1}function i4(t,e){const n=t.length>3||!1;e.push("["),n&&e.indent(),P1(t,e,n),n&&e.deindent(),e.push("]")}function P1(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):Me(a)?i4(a,e):Mi(a,e),r<t.length-1&&(n?(i&&s(","),o()):i&&s(", "))}}function Mi(t,e){if(Ke(t)){e.push(t,-3);return}if(mo(t)){e.push(e.helper(t));return}switch(t.type){case 1:case 9:case 11:Mi(t.codegenNode,e);break;case 2:GX(t,e);break;case 4:JL(t,e);break;case 5:XX(t,e);break;case 12:Mi(t.codegenNode,e);break;case 8:QL(t,e);break;case 3:ZX(t,e);break;case 13:JX(t,e);break;case 14:eK(t,e);break;case 15:tK(t,e);break;case 17:nK(t,e);break;case 18:sK(t,e);break;case 19:iK(t,e);break;case 20:oK(t,e);break;case 21:P1(t.body,e,!0,!1);break}}function GX(t,e){e.push(JSON.stringify(t.content),-3,t)}function JL(t,e){const{content:n,isStatic:i}=t;e.push(i?JSON.stringify(n):n,-3,t)}function XX(t,e){const{push:n,helper:i,pure:s}=e;s&&n(Ib),n(`${i(Mb)}(`),Mi(t.content,e),n(")")}function QL(t,e){for(let n=0;n<t.children.length;n++){const i=t.children[n];Ke(i)?e.push(i,-3):Mi(i,e)}}function KX(t,e){const{push:n}=e;if(t.type===8)n("["),QL(t,e),n("]");else if(t.isStatic){const i=t4(t.content)?t.content:JSON.stringify(t.content);n(i,-2,t)}else n(`[${t.content}]`,-3,t)}function ZX(t,e){const{push:n,helper:i,pure:s}=e;s&&n(Ib),n(`${i(M1)}(${JSON.stringify(t.content)})`,-3,t)}function JX(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;let p;l&&(p=String(l)),u&&n(i(Y6)+"("),d&&n(`(${i(gd)}(${h?"true":""}), `),s&&n(Ib);const m=d?Pf(e.inSSR,f):Tf(e.inSSR,f);n(i(m)+"(",-2,t),P1(QX([o,r,a,p,c]),e),n(")"),d&&n(")"),u&&(n(", "),Mi(u,e),n(")"))}function QX(t){let e=t.length;for(;e--&&t[e]==null;);return t.slice(0,e+1).map(n=>n||"null")}function eK(t,e){const{push:n,helper:i,pure:s}=e,o=Ke(t.callee)?t.callee:i(t.callee);s&&n(Ib),n(o+"(",-2,t),P1(t.arguments,e),n(")")}function tK(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];KX(c,e),n(": "),Mi(u,e),l<r.length-1&&(n(","),o())}a&&s(),n(a?"}":" }")}function nK(t,e){i4(t.elements,e)}function sK(t,e){const{push:n,indent:i,deindent:s}=e,{params:o,returns:r,body:a,newline:l,isSlot:c}=t;c&&n(`_${Ef[Z6]}(`),n("(",-2,t),Me(o)?P1(o,e):o&&Mi(o,e),n(") => "),(l||a)&&(n("{"),i()),r?(l&&n("return "),Me(r)?i4(r,e):Mi(r,e)):a&&Mi(a,e),(l||a)&&(s(),n("}")),c&&(t.isNonScopedSlot&&n(", undefined, true"),n(")"))}function iK(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=!t4(n.content);d&&r("("),JL(n,e),d&&r(")")}else r("("),Mi(n,e),r(")");o&&a(),e.indentLevel++,o||r(" "),r("? "),Mi(i,e),e.indentLevel--,o&&c(),o||r(" "),r(": ");const u=s.type===19;u||e.indentLevel++,Mi(s,e),u||e.indentLevel--,o&&l(!0)}function oK(t,e){const{push:n,helper:i,indent:s,deindent:o,newline:r}=e,{needPauseTracking:a,needArraySpread:l}=t;l&&n("[...("),n(`_cache[${t.index}] || (`),a&&(s(),n(`${i(oy)}(-1`),t.inVOnce&&n(", true"),n("),"),r(),n("(")),n(`_cache[${t.index}] = `),Mi(t.value,e),a&&(n(`).cacheIndex = ${t.index},`),r(),n(`${i(oy)}(1),`),r(),n(`_cache[${t.index}]`),o()),n(")"),l&&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 rK=KL(/^(?:if|else|else-if)$/,(t,e,n)=>aK(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=c7(s,l,n);else{const c=lK(i.codegenNode);c.alternate=c7(s,l+i.branches.length-1,n)}}}));function aK(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(ss(28,e.loc)),e.exp=Xt("true",!1,s)}if(e.name==="if"){const s=l7(t,e),o={type:9,loc:OX(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&&zL(r)){n.removeNode(r);continue}if(r&&r.type===9){(e.name==="else-if"||e.name==="else")&&r.branches[r.branches.length-1].condition===void 0&&n.onError(ss(30,t.loc)),n.removeNode();const a=l7(t,e);r.branches.push(a);const l=i&&i(r,a,!1);Pb(a,n),l&&l(),n.currentNode=null}else n.onError(ss(30,t.loc));break}}}function l7(t,e){const n=t.tagType===3;return{type:10,loc:t.loc,condition:e.name==="else"?void 0:e.exp,children:n&&!ir(t,"for")?t.children:[t],userKey:Tb(t,"key"),isTemplateIf:n}}function c7(t,e,n){return t.condition?Pk(t.condition,u7(t,e,n),Vs(n.helper(M1),['""',"true"])):u7(t,e,n)}function u7(t,e,n){const{helper:i}=n,s=Ps("key",Xt(`${e}`,!1,Uo,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 cy(l,s,n),l}else{let l=64;return Og(n,i(Ig),cr([s]),o,l,void 0,void 0,!0,!1,!1,t.loc)}else{const l=r.codegenNode,c=xX(l);return c.type===13&&Q6(c,n),cy(c,s,n),l}}function lK(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 cK=KL("for",(t,e,n)=>{const{helper:i,removeHelper:s}=n;return uK(t,e,n,o=>{const r=Vs(i(q6),[o.source]),a=ay(t),l=ir(t,"memo"),c=Tb(t,"key",!1,!0);c&&c.type;let u=c&&(c.type===6?c.value?Xt(c.value.content,!0):void 0:c.exp);const d=c&&u?Ps("key",u):null,h=o.source.type===4&&o.source.constType>0,f=h?64:c?128:256;return o.codegenNode=Og(n,i(Ig),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=ly(t)?t:a&&t.children.length===1&&ly(t.children[0])?t.children[0]:null;if(b?(p=b.codegenNode,a&&d&&cy(p,d,n)):y?p=Og(n,i(Ig),d?cr([d]):void 0,t.children,64,void 0,void 0,!0,void 0,!1):(p=m[0].codegenNode,a&&d&&cy(p,d,n),p.isBlock!==!h&&(p.isBlock?(s(gd),s(Pf(n.inSSR,p.isComponent))):s(Tf(n.inSSR,p.isComponent))),p.isBlock=!h,p.isBlock?(i(gd),i(Pf(n.inSSR,p.isComponent))):i(Tf(n.inSSR,p.isComponent))),l){const k=Mf(Ok(o.parseResult,[Xt("_cached")]));k.body=hX([Nr(["const _memo = (",l.exp,")"]),Nr(["if (_cached",...u?[" && _cached.key === ",u]:[],` && ${n.helperString(LL)}(_cached, _memo)) return _cached`]),Nr(["const _item = ",p]),Xt("_item.memo = _memo"),Xt("return _item")]),r.arguments.push(k,Xt("_cache"),Xt(String(n.cached.length))),n.cached.push(null)}else r.arguments.push(Mf(Ok(o.parseResult),p,!0))}})});function uK(t,e,n,i){if(!e.exp){n.onError(ss(31,e.loc));return}const s=e.forParseResult;if(!s){n.onError(ss(32,e.loc));return}eO(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:ay(t)?t.children:[t]};n.replaceNode(h),a.vFor++;const f=i&&i(h);return()=>{a.vFor--,f&&f()}}function eO(t,e){t.finalized||(t.finalized=!0)}function Ok({value:t,key:e,index:n},i=[]){return dK([t,e,n,...i])}function dK(t){let e=t.length;for(;e--&&!t[e];);return t.slice(0,e+1).map((n,i)=>n||Xt("_".repeat(i+1),!1))}const d7=Xt("undefined",!1),hK=(t,e)=>{if(t.type===1&&(t.tagType===1||t.tagType===3)){const n=ir(t,"slot");if(n)return n.exp,e.scopes.vSlot++,()=>{e.scopes.vSlot--}}},fK=(t,e,n,i)=>Mf(t,n,!1,!0,n.length?n[0].loc:i);function pK(t,e,n=fK){e.helper(Z6);const{children:i,loc:s}=t,o=[],r=[];let a=e.scopes.vSlot>0||e.scopes.vFor>0;const l=ir(t,"slot",!0);if(l){const{arg:y,exp:b}=l;y&&!lo(y)&&(a=!0),o.push(Ps(y||Xt("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(!ay(b)||!(k=ir(b,"slot",!0))){b.type!==3&&d.push(b);continue}if(l){e.onError(ss(37,k.loc));break}c=!0;const{children:C,loc:$}=b,{arg:S=Xt("default",!0),exp:M,loc:P}=k;let T;lo(S)?T=S?S.content:"default":a=!0;const I=ir(b,"for"),L=n(M,I,C,$);let R,V;if(R=ir(b,"if"))a=!0,r.push(Pk(R.exp,Hv(S,L,f++),d7));else if(V=ir(b,/^else(?:-if)?$/,!0)){let B=y,F;for(;B--&&(F=i[B],!!zL(F)););if(F&&ay(F)&&ir(F,/^(?:else-)?if$/)){let z=r[r.length-1];for(;z.alternate.type===19;)z=z.alternate;z.alternate=V.exp?Pk(V.exp,Hv(S,L,f++),d7):Hv(S,L,f++)}else e.onError(ss(30,V.loc))}else if(I){a=!0;const B=I.forParseResult;B?(eO(B),r.push(Vs(e.helper(q6),[B.source,Mf(Ok(B),Hv(S,L),!0)]))):e.onError(ss(32,I.loc))}else{if(T){if(h.has(T)){e.onError(ss(38,P));continue}h.add(T),T==="default"&&(u=!0)}o.push(Ps(S,L))}}if(!l){const y=(b,k)=>{const C=n(b,void 0,k,s);return e.compatConfig&&(C.isNonScopedSlot=!0),Ps("default",C)};c?d.length&&!d.every(n4)&&(u?e.onError(ss(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=cr(o.concat(Ps("_",Xt(p+"",!1))),s);return r.length&&(m=Vs(e.helper(IL),[m,Zu(r)])),{slots:m,hasDynamicSlots:a}}function Hv(t,e,n){const i=[Ps("name",t),Ps("fn",e)];return n!=null&&i.push(Ps("key",Xt(String(n),!0))),cr(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}const tO=new WeakMap,mK=(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?gK(t,e):`"${i}"`;const a=yt(r)&&r.callee===U6;let l,c,u=0,d,h,f,p=a||r===qm||r===F6||!o&&(i==="svg"||i==="foreignObject"||i==="math");if(s.length>0){const m=nO(t,e,void 0,o,a);l=m.props,u=m.patchFlag,h=m.dynamicPropNames;const y=m.directives;f=y&&y.length?Zu(y.map(b=>_K(b,e))):void 0,m.shouldUseBlock&&(p=!0)}if(t.children.length>0)if(r===sy&&(p=!0,u|=1024),o&&r!==qm&&r!==sy){const{slots:y,hasDynamicSlots:b}=pK(t,e);c=y,b&&(u|=1024)}else if(t.children.length===1&&r!==qm){const y=t.children[0],b=y.type,k=b===5||b===8;k&&To(y,e)===0&&(u|=1),k||b===2?c=y:c=t.children}else c=t.children;h&&h.length&&(d=yK(h)),t.codegenNode=Og(e,r,l,c,u===0?void 0:u,d,f,!!p,!1,o,t.loc)};function gK(t,e,n=!1){let{tag:i}=t;const s=Dk(i),o=Tb(t,"is",!1,!0);if(o)if(s||Ju("COMPILER_IS_ON_ELEMENT",e)){let a;if(o.type===6?a=o.value&&Xt(o.value.content,!0):(a=o.exp,a||(a=Xt("is",!1,o.arg.loc))),a)return Vs(e.helper(U6),[a])}else o.type===6&&o.value.content.startsWith("vue:")&&(i=o.value.content.slice(4));const r=DL(i)||e.isBuiltInComponent(i);return r?(n||e.helper(r),r):(e.helper(H6),e.components.add(i),Rg(i,"component"))}function nO(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 S=[],M=L=>{c.length&&(u.push(cr(h7(c),a)),c=[]),L&&u.push(L)},P=()=>{e.scopes.vFor>0&&c.push(Ps(Xt("ref_for",!0),Xt("true")))},T=({key:L,value:R})=>{if(lo(L)){const V=L.content,B=Pd(V);if(B&&(!i||s)&&V.toLowerCase()!=="onclick"&&V!=="onUpdate:modelValue"&&!ul(V)&&(k=!0),B&&ul(V)&&($=!0),B&&R.type===14&&(R=R.arguments[0]),R.type===20||(R.type===4||R.type===8)&&To(R,e)>0)return;V==="ref"?m=!0:V==="class"?y=!0:V==="style"?b=!0:V!=="key"&&!S.includes(V)&&S.push(V),i&&(V==="class"||V==="style")&&!S.includes(V)&&S.push(V)}else C=!0};for(let L=0;L<n.length;L++){const R=n[L];if(R.type===6){const{loc:V,name:B,nameLoc:F,value:z}=R;let U=!0;if(B==="ref"&&(m=!0,P()),B==="is"&&(Dk(r)||z&&z.content.startsWith("vue:")||Ju("COMPILER_IS_ON_ELEMENT",e)))continue;c.push(Ps(Xt(B,!0,F),Xt(z?z.content:"",U,z?z.loc:V)))}else{const{name:V,arg:B,exp:F,loc:z,modifiers:U}=R,G=V==="bind",K=V==="on";if(V==="slot"){i||e.onError(ss(40,z));continue}if(V==="once"||V==="memo"||V==="is"||G&&Du(B,"is")&&(Dk(r)||Ju("COMPILER_IS_ON_ELEMENT",e))||K&&o)continue;if((G&&Du(B,"key")||K&&h&&Du(B,"vue:before-update"))&&(f=!0),G&&Du(B,"ref")&&P(),!B&&(G||K)){if(C=!0,F)if(G){if(M(),Ju("COMPILER_V_BIND_OBJECT_ORDER",e)){u.unshift(F);continue}P(),M(),u.push(F)}else M({type:14,loc:z,callee:e.helper(K6),arguments:i?[F]:[F,"true"]});else e.onError(ss(G?34:35,z));continue}G&&U.some(W=>W.content==="prop")&&(p|=32);const X=e.directiveTransforms[V];if(X){const{props:W,needRuntime:Q}=X(R,t,e);!o&&W.forEach(T),K&&B&&!lo(B)?M(cr(W,a)):c.push(...W),Q&&(d.push(R),mo(Q)&&tO.set(R,Q))}else FW(V)||(d.push(R),h&&(f=!0))}}let I;if(u.length?(M(),u.length>1?I=Vs(e.helper(iy),u,a):I=u[0]):c.length&&(I=cr(h7(c),a)),C?p|=16:(y&&!i&&(p|=2),b&&!i&&(p|=4),S.length&&(p|=8),k&&(p|=32)),!f&&(p===0||p===32)&&(m||$||d.length>0)&&(p|=512),!e.inSSR&&I)switch(I.type){case 15:let L=-1,R=-1,V=!1;for(let z=0;z<I.properties.length;z++){const U=I.properties[z].key;lo(U)?U.content==="class"?L=z:U.content==="style"&&(R=z):U.isHandlerKey||(V=!0)}const B=I.properties[L],F=I.properties[R];V?I=Vs(e.helper(Lg),[I]):(B&&!lo(B.value)&&(B.value=Vs(e.helper(G6),[B.value])),F&&(b||F.value.type===4&&F.value.content.trim()[0]==="["||F.value.type===17)&&(F.value=Vs(e.helper(X6),[F.value])));break;case 14:break;default:I=Vs(e.helper(Lg),[Vs(e.helper(T1),[I])]);break}return{props:I,directives:d,patchFlag:p,dynamicPropNames:S,shouldUseBlock:f}}function h7(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"||Pd(o))&&vK(r,s):(e.set(o,s),n.push(s))}return n}function vK(t,e){t.value.type===17?t.value.elements.push(e.value):t.value=Zu([t.value,e.value],t.loc)}function _K(t,e){const n=[],i=tO.get(t);i?n.push(e.helperString(i)):(e.helper(j6),e.directives.add(t.name),n.push(Rg(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=Xt("true",!1,s);n.push(cr(t.modifiers.map(r=>Ps(r,o)),s))}return Zu(n,t.loc)}function yK(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 Dk(t){return t==="component"||t==="Component"}const bK=(t,e)=>{if(ly(t)){const{children:n,loc:i}=t,{slotName:s,slotProps:o}=wK(t,e),r=[e.prefixIdentifiers?"_ctx.$slots":"$slots",s,"{}","undefined","true"];let a=2;o&&(r[2]=o,a=3),n.length&&(r[3]=Mf([],n,!1,!1,i),a=4),e.scopeId&&!e.slotted&&(a=5),r.splice(a),t.codegenNode=Vs(e.helper(PL),r,i)}};function wK(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=Un(r.name),s.push(r)));else if(r.name==="bind"&&Du(r.arg,"name")){if(r.exp)n=r.exp;else if(r.arg&&r.arg.type===4){const a=Un(r.arg.content);n=r.exp=Xt(a,!1,r.arg.loc)}}else r.name==="bind"&&r.arg&&lo(r.arg)&&(r.arg.content=Un(r.arg.content)),s.push(r)}if(s.length>0){const{props:o,directives:r}=nO(t,e,s,!1,!1);i=o,r.length&&e.onError(ss(36,r[0].loc))}return{slotName:n,slotProps:i}}const sO=(t,e,n,i)=>{const{loc:s,modifiers:o,arg:r}=t;!t.exp&&!o.length&&n.onError(ss(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)?qu(Un(d)):`on:${d}`;a=Xt(h,!0,r.loc)}else a=Nr([`${n.helperString(Tk)}(`,r,")"]);else a=r,a.children.unshift(`${n.helperString(Tk)}(`),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=FL(l),h=!(d||bX(l)),f=l.content.includes(";");(h||c&&d)&&(l=Nr([`${h?"$event":"(...args)"} => ${f?"{":"("}`,l,f?"}":")"]))}let u={props:[Ps(a,l||Xt("() => {}",!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},kK=(t,e,n)=>{const{modifiers:i,loc:s}=t,o=t.arg;let{exp:r}=t;return r&&r.type===4&&!r.content.trim()&&(r=void 0),o.type!==4?(o.children.unshift("("),o.children.push(') || ""')):o.isStatic||(o.content=o.content?`${o.content} || ""`:'""'),i.some(a=>a.content==="camel")&&(o.type===4?o.isStatic?o.content=Un(o.content):o.content=`${n.helperString(Mk)}(${o.content})`:(o.children.unshift(`${n.helperString(Mk)}(`),o.children.push(")"))),n.inSSR||(i.some(a=>a.content==="prop")&&f7(o,"."),i.some(a=>a.content==="attr")&&f7(o,"^")),{props:[Ps(o,r)]}},f7=(t,e)=>{t.type===4?t.isStatic?t.content=e+t.content:t.content=`\`${e}\${${t.content}}\``:(t.children.unshift(`'${e}' + (`),t.children.push(")"))},CK=(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(mw(r)){s=!0;for(let a=o+1;a<n.length;a++){const l=n[a];if(mw(l))i||(i=n[o]=Nr([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(mw(r)||r.type===8){const a=[];(r.type!==2||r.content!==" ")&&a.push(r),!e.ssr&&To(r,e)===0&&a.push("1"),n[o]={type:12,content:r,loc:r.loc,codegenNode:Vs(e.helper(z6),a)}}}}},p7=new WeakSet,xK=(t,e)=>{if(t.type===1&&ir(t,"once",!0))return p7.has(t)||e.inVOnce||e.inSSR?void 0:(p7.add(t),e.inVOnce=!0,e.helper(oy),()=>{e.inVOnce=!1;const n=e.currentNode;n.codegenNode&&(n.codegenNode=e.cache(n.codegenNode,!0,!0))})},iO=(t,e,n)=>{const{exp:i,arg:s}=t;if(!i)return n.onError(ss(41,t.loc)),jp();const o=i.loc.source.trim(),r=i.type===4?i.content:o,a=n.bindingMetadata[o];if(a==="props"||a==="props-aliased")return n.onError(ss(44,i.loc)),jp();if(a==="literal-const"||a==="setup-const")return n.onError(ss(45,i.loc)),jp();if(!r.trim()||!FL(i))return n.onError(ss(42,i.loc)),jp();const l=s||Xt("modelValue",!0),c=s?lo(s)?`onUpdate:${Un(s.content)}`:Nr(['"onUpdate:" + ',s]):"onUpdate:modelValue";let u;const d=n.isTS?"($event: any)":"$event";u=Nr([`${d} => ((`,i,") = $event)"]);const h=[Ps(l,t.exp),Ps(c,u)];if(t.modifiers.length&&e.tagType===1){const f=t.modifiers.map(m=>m.content).map(m=>(t4(m)?m:JSON.stringify(m))+": true").join(", "),p=s?lo(s)?`${s.content}Modifiers`:Nr([s,' + "Modifiers"']):"modelModifiers";h.push(Ps(p,Xt(`{ ${f} }`,!1,t.loc,2)))}return jp(h)};function jp(t=[]){return{props:t}}const SK=/[\w).+\-_$\]]/,$K=(t,e)=>{Ju("COMPILER_FILTERS",e)&&(t.type===5?uy(t.content,e):t.type===1&&t.props.forEach(n=>{n.type===7&&n.name!=="for"&&n.exp&&uy(n.exp,e)}))};function uy(t,e){if(t.type===4)m7(t,e);else for(let n=0;n<t.children.length;n++){const i=t.children[n];typeof i=="object"&&(i.type===4?m7(i,e):i.type===8?uy(t,e):i.type===5&&uy(i.content,e))}}function m7(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||!SK.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=AK(p,m[f],e);t.content=p,t.ast=void 0}}function AK(t,e,n){n.helper(W6);const i=e.indexOf("(");if(i<0)return n.filters.add(e),`${Rg(e,"filter")}(${t})`;{const s=e.slice(0,i),o=e.slice(i+1);return n.filters.add(s),`${Rg(s,"filter")}(${t}${o!==")"?","+o:o}`}}const g7=new WeakSet,EK=(t,e)=>{if(t.type===1){const n=ir(t,"memo");return!n||g7.has(t)||e.inSSR?void 0:(g7.add(t),()=>{const i=t.codegenNode||e.currentNode.codegenNode;i&&i.type===13&&(t.tagType!==1&&Q6(i,e),t.codegenNode=Vs(e.helper(J6),[n.exp,Mf(void 0,i),"_cache",String(e.cached.length)]),e.cached.push(null))})}},MK=(t,e)=>{if(t.type===1){for(const n of t.props)if(n.type===7&&n.name==="bind"&&(!n.exp||n.exp.type===4&&!n.exp.content.trim())&&n.arg){const i=n.arg;if(i.type!==4||!i.isStatic)e.onError(ss(53,i.loc)),n.exp=Xt("",!0,i.loc);else{const s=Un(i.content);(RL.test(s[0])||s[0]==="-")&&(n.exp=Xt(s,!1,i.loc))}}}};function TK(t){return[[MK,xK,rK,EK,cK,$K,bK,mK,hK,CK],{on:sO,bind:kK,model:iO}]}function PK(t,e={}){const n=e.onError||e4,i=e.mode==="module";e.prefixIdentifiers===!0?n(ss(48)):i&&n(ss(49));const s=!1;e.cacheHandlers&&n(ss(50)),e.scopeId&&!i&&n(ss(51));const o=cn({},e,{prefixIdentifiers:s}),r=Ke(t)?VX(t,o):t,[a,l]=TK();return zX(r,cn({},o,{nodeTransforms:[...a,...e.nodeTransforms||[]],directiveTransforms:cn({},l,e.directiveTransforms||{})})),WX(r,o)}const IK=()=>({props:[]});/** | |
| 30 | 30 | * @vue/compiler-dom v3.5.27 |
| 31 | 31 | * (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 32 | 32 | * @license MIT |
| 33 | -**/const aL=Symbol(""),lL=Symbol(""),cL=Symbol(""),uL=Symbol(""),N3=Symbol(""),dL=Symbol(""),hL=Symbol(""),fL=Symbol(""),pL=Symbol(""),mL=Symbol("");JG({[aL]:"vModelRadio",[lL]:"vModelCheckbox",[cL]:"vModelText",[uL]:"vModelSelect",[N3]:"vModelDynamic",[dL]:"withModifiers",[hL]:"withKeys",[fL]:"vShow",[pL]:"Transition",[mL]:"TransitionGroup"});let Ld;function CX(t,e=!1){return Ld||(Ld=document.createElement("div")),e?(Ld.innerHTML=`<div foo="${t.replace(/"/g,""")}">`,Ld.children[0].getAttribute("foo")):(Ld.innerHTML=t,Ld.textContent)}const kX={parseMode:"html",isVoidTag:zj,isNativeTag:t=>Fj(t)||Nj(t)||Bj(t),isPreTag:t=>t==="pre",isIgnoreNewlineTag:t=>t==="pre"||t==="textarea",decodeEntities:CX,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return pL;if(t==="TransitionGroup"||t==="transition-group")return mL},getNamespace(t,e,n){let s=e?e.ns:n;if(e&&s===2)if(e.tag==="annotation-xml"){if(t==="svg")return 1;e.props.some(i=>i.type===6&&i.name==="encoding"&&i.value!=null&&(i.value.content==="text/html"||i.value.content==="application/xhtml+xml"))&&(s=0)}else/^m(?:[ions]|text)$/.test(e.tag)&&t!=="mglyph"&&t!=="malignmark"&&(s=0);else e&&s===1&&(e.tag==="foreignObject"||e.tag==="desc"||e.tag==="title")&&(s=0);if(s===0){if(t==="svg")return 1;if(t==="math")return 2}return s}},xX=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:Ft("style",!0,e.loc),exp:SX(e.value.content,e.loc),modifiers:[],loc:e.loc})})},SX=(t,e)=>{const n=LT(t);return Ft(JSON.stringify(n),!1,e,3)};function nc(t,e){return jn(t,e)}const $X=(t,e,n)=>{const{exp:s,loc:i}=t;return s||n.onError(nc(54,i)),e.children.length&&(n.onError(nc(55,i)),e.children.length=0),{props:[ps(Ft("innerHTML",!0,i),s||Ft("",!0))]}},AX=(t,e,n)=>{const{exp:s,loc:i}=t;return s||n.onError(nc(56,i)),e.children.length&&(n.onError(nc(57,i)),e.children.length=0),{props:[ps(Ft("textContent",!0),s?uo(s,n)>0?s:bs(n.helperString(Fy),[s],i):Ft("",!0))]}},MX=(t,e,n)=>{const s=rL(t,e,n);if(!s.props.length||e.tagType===1)return s;t.arg&&n.onError(nc(59,t.arg.loc));const{tag:i}=e,o=n.isCustomElement(i);if(i==="input"||i==="textarea"||i==="select"||o){let r=cL,a=!1;if(i==="input"||o){const l=Ny(e,"type");if(l){if(l.type===7)r=N3;else if(l.value)switch(l.value.content){case"radio":r=aL;break;case"checkbox":r=lL;break;case"file":a=!0,n.onError(nc(60,t.loc));break}}else uq(e)&&(r=N3)}else i==="select"&&(r=uL);a||(s.needRuntime=n.helper(r))}else n.onError(nc(58,t.loc));return s.props=s.props.filter(r=>!(r.key.type===4&&r.key.content==="modelValue")),s},EX=_o("passive,once,capture"),TX=_o("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),PX=_o("left,right"),gL=_o("onkeyup,onkeydown,onkeypress"),IX=(t,e,n,s)=>{const i=[],o=[],r=[];for(let a=0;a<e.length;a++){const l=e[a].content;l==="native"&&tg("COMPILER_V_ON_NATIVE",n)||EX(l)?r.push(l):PX(l)?Ui(t)?gL(t.content.toLowerCase())?i.push(l):o.push(l):(i.push(l),o.push(l)):TX(l)?o.push(l):i.push(l)}return{keyModifiers:i,nonKeyModifiers:o,eventOptionModifiers:r}},u9=(t,e)=>Ui(t)&&t.content.toLowerCase()==="onclick"?Ft(e,!0):t.type!==4?wr(["(",t,`) === "onClick" ? "${e}" : (`,t,")"]):t,LX=(t,e,n)=>oL(t,e,n,s=>{const{modifiers:i}=t;if(!i.length)return s;let{key:o,value:r}=s.props[0];const{keyModifiers:a,nonKeyModifiers:l,eventOptionModifiers:c}=IX(o,i,n,t.loc);if(l.includes("right")&&(o=u9(o,"onContextmenu")),l.includes("middle")&&(o=u9(o,"onMouseup")),l.length&&(r=bs(n.helper(dL),[r,JSON.stringify(l)])),a.length&&(!Ui(o)||gL(o.content.toLowerCase()))&&(r=bs(n.helper(hL),[r,JSON.stringify(a)])),c.length){const u=c.map(Sc).join("");o=Ui(o)?Ft(`${o.content}${u}`,!0):wr(["(",o,`) + "${u}"`])}return{props:[ps(o,r)]}}),OX=(t,e,n)=>{const{exp:s,loc:i}=t;return s||n.onError(nc(62,i)),{props:[],needRuntime:n.helper(fL)}},DX=(t,e)=>{t.type===1&&t.tagType===0&&(t.tag==="script"||t.tag==="style")&&e.removeNode()},RX=[xX],VX={cloak:wX,html:$X,text:AX,model:MX,on:LX,show:OX};function FX(t,e={}){return bX(t,Zt({},kX,e,{nodeTransforms:[DX,...RX,...e.nodeTransforms||[]],directiveTransforms:Zt({},VX,e.directiveTransforms||{}),transformHoist:null}))}/** | |
| 33 | +**/const oO=Symbol(""),rO=Symbol(""),aO=Symbol(""),lO=Symbol(""),Rk=Symbol(""),cO=Symbol(""),uO=Symbol(""),dO=Symbol(""),hO=Symbol(""),fO=Symbol("");cX({[oO]:"vModelRadio",[rO]:"vModelCheckbox",[aO]:"vModelText",[lO]:"vModelSelect",[Rk]:"vModelDynamic",[cO]:"withModifiers",[uO]:"withKeys",[dO]:"vShow",[hO]:"Transition",[fO]:"TransitionGroup"});let oh;function LK(t,e=!1){return oh||(oh=document.createElement("div")),e?(oh.innerHTML=`<div foo="${t.replace(/"/g,""")}">`,oh.children[0].getAttribute("foo")):(oh.innerHTML=t,oh.textContent)}const OK={parseMode:"html",isVoidTag:eY,isNativeTag:t=>ZW(t)||JW(t)||QW(t),isPreTag:t=>t==="pre",isIgnoreNewlineTag:t=>t==="pre"||t==="textarea",decodeEntities:LK,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return hO;if(t==="TransitionGroup"||t==="transition-group")return fO},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}},DK=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:Xt("style",!0,e.loc),exp:RK(e.value.content,e.loc),modifiers:[],loc:e.loc})})},RK=(t,e)=>{const n=IP(t);return Xt(JSON.stringify(n),!1,e,3)};function $c(t,e){return ss(t,e)}const VK=(t,e,n)=>{const{exp:i,loc:s}=t;return i||n.onError($c(54,s)),e.children.length&&(n.onError($c(55,s)),e.children.length=0),{props:[Ps(Xt("innerHTML",!0,s),i||Xt("",!0))]}},FK=(t,e,n)=>{const{exp:i,loc:s}=t;return i||n.onError($c(56,s)),e.children.length&&(n.onError($c(57,s)),e.children.length=0),{props:[Ps(Xt("textContent",!0),i?To(i,n)>0?i:Vs(n.helperString(Mb),[i],s):Xt("",!0))]}},NK=(t,e,n)=>{const i=iO(t,e,n);if(!i.props.length||e.tagType===1)return i;t.arg&&n.onError($c(59,t.arg.loc));const{tag:s}=e,o=n.isCustomElement(s);if(s==="input"||s==="textarea"||s==="select"||o){let r=aO,a=!1;if(s==="input"||o){const l=Tb(e,"type");if(l){if(l.type===7)r=Rk;else if(l.value)switch(l.value.content){case"radio":r=oO;break;case"checkbox":r=rO;break;case"file":a=!0,n.onError($c(60,t.loc));break}}else wX(e)&&(r=Rk)}else s==="select"&&(r=lO);a||(i.needRuntime=n.helper(r))}else n.onError($c(58,t.loc));return i.props=i.props.filter(r=>!(r.key.type===4&&r.key.content==="modelValue")),i},BK=zo("passive,once,capture"),zK=zo("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),HK=zo("left,right"),pO=zo("onkeyup,onkeydown,onkeypress"),UK=(t,e,n,i)=>{const s=[],o=[],r=[];for(let a=0;a<e.length;a++){const l=e[a].content;l==="native"&&Dg("COMPILER_V_ON_NATIVE",n)||BK(l)?r.push(l):HK(l)?lo(t)?pO(t.content.toLowerCase())?s.push(l):o.push(l):(s.push(l),o.push(l)):zK(l)?o.push(l):s.push(l)}return{keyModifiers:s,nonKeyModifiers:o,eventOptionModifiers:r}},v7=(t,e)=>lo(t)&&t.content.toLowerCase()==="onclick"?Xt(e,!0):t.type!==4?Nr(["(",t,`) === "onClick" ? "${e}" : (`,t,")"]):t,jK=(t,e,n)=>sO(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}=UK(o,s,n,t.loc);if(l.includes("right")&&(o=v7(o,"onContextmenu")),l.includes("middle")&&(o=v7(o,"onMouseup")),l.length&&(r=Vs(n.helper(cO),[r,JSON.stringify(l)])),a.length&&(!lo(o)||pO(o.content.toLowerCase()))&&(r=Vs(n.helper(uO),[r,JSON.stringify(a)])),c.length){const u=c.map(Gc).join("");o=lo(o)?Xt(`${o.content}${u}`,!0):Nr(["(",o,`) + "${u}"`])}return{props:[Ps(o,r)]}}),WK=(t,e,n)=>{const{exp:i,loc:s}=t;return i||n.onError($c(62,s)),{props:[],needRuntime:n.helper(dO)}},YK=(t,e)=>{t.type===1&&t.tagType===0&&(t.tag==="script"||t.tag==="style")&&e.removeNode()},qK=[DK],GK={cloak:IK,html:VK,text:FK,model:NK,on:jK,show:WK};function XK(t,e={}){return PK(t,cn({},OK,e,{nodeTransforms:[YK,...qK,...e.nodeTransforms||[]],directiveTransforms:cn({},GK,e.directiveTransforms||{}),transformHoist:null}))}/** | |
| 34 | 34 | * vue v3.5.27 |
| 35 | 35 | * (c) 2018-present Yuxi (Evan) You and Vue contributors |
| 36 | 36 | * @license MIT |
| 37 | -**/const d9=Object.create(null);function NX(t,e){if(!nt(t))if(t.nodeType)t=t.innerHTML;else return Vt;const n=Mj(t,e),s=d9[n];if(s)return s;if(t[0]==="#"){const a=document.querySelector(t);t=a?a.innerHTML:""}const i=Zt({hoistStatic:!0,onError:void 0,onWarn:Vt},e);!i.isCustomElement&&typeof customElements<"u"&&(i.isCustomElement=a=>!!customElements.get(a));const{code:o}=FX(t,i),r=new Function("Vue",o)(YG);return r._rc=!0,d9[n]=r}eI(NX);/*! | |
| 37 | +**/const _7=Object.create(null);function KK(t,e){if(!Ke(t))if(t.nodeType)t=t.innerHTML;else return Dt;const n=zW(t,e),i=_7[n];if(i)return i;if(t[0]==="#"){const a=document.querySelector(t);t=a?a.innerHTML:""}const s=cn({hoistStatic:!0,onError:void 0,onWarn:Dt},e);!s.isCustomElement&&typeof customElements<"u"&&(s.isCustomElement=a=>!!customElements.get(a));const{code:o}=XK(t,s),r=new Function("Vue",o)(sX);return r._rc=!0,_7[n]=r}JI(KK);/*! | |
| 38 | 38 | * vue-router v4.4.4 |
| 39 | 39 | * (c) 2024 Eduardo San Martin Morote |
| 40 | 40 | * @license MIT |
| 41 | - */const Jd=typeof document<"u";function vL(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function BX(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&vL(t.default)}const $n=Object.assign;function $2(t,e){const n={};for(const s in e){const i=e[s];n[s]=Pr(i)?i.map(t):t(i)}return n}const hm=()=>{},Pr=Array.isArray,_L=/#/g,zX=/&/g,HX=/\//g,UX=/=/g,jX=/\?/g,yL=/\+/g,WX=/%5B/g,YX=/%5D/g,bL=/%5E/g,GX=/%60/g,wL=/%7B/g,qX=/%7C/g,CL=/%7D/g,XX=/%20/g;function hx(t){return encodeURI(""+t).replace(qX,"|").replace(WX,"[").replace(YX,"]")}function KX(t){return hx(t).replace(wL,"{").replace(CL,"}").replace(bL,"^")}function B3(t){return hx(t).replace(yL,"%2B").replace(XX,"+").replace(_L,"%23").replace(zX,"%26").replace(GX,"`").replace(wL,"{").replace(CL,"}").replace(bL,"^")}function ZX(t){return B3(t).replace(UX,"%3D")}function JX(t){return hx(t).replace(_L,"%23").replace(jX,"%3F")}function QX(t){return t==null?"":JX(t).replace(HX,"%2F")}function ig(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const eK=/\/$/,tK=t=>t.replace(eK,"");function A2(t,e,n="/"){let s,i={},o="",r="";const a=e.indexOf("#");let l=e.indexOf("?");return a<l&&a>=0&&(l=-1),l>-1&&(s=e.slice(0,l),o=e.slice(l+1,a>-1?a:e.length),i=t(o)),a>-1&&(s=s||e.slice(0,a),r=e.slice(a,e.length)),s=oK(s??e,n),{fullPath:s+(o&&"?")+o+r,path:s,query:i,hash:ig(r)}}function nK(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function h9(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function sK(t,e,n){const s=e.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&ef(e.matched[s],n.matched[i])&&kL(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function ef(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function kL(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!iK(t[n],e[n]))return!1;return!0}function iK(t,e){return Pr(t)?f9(t,e):Pr(e)?f9(e,t):t===e}function f9(t,e){return Pr(e)?t.length===e.length&&t.every((n,s)=>n===e[s]):t.length===1&&t[0]===e}function oK(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),s=t.split("/"),i=s[s.length-1];(i===".."||i===".")&&s.push("");let o=n.length-1,r,a;for(r=0;r<s.length;r++)if(a=s[r],a!==".")if(a==="..")o>1&&o--;else break;return n.slice(0,o).join("/")+"/"+s.slice(r).join("/")}const vl={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var og;(function(t){t.pop="pop",t.push="push"})(og||(og={}));var fm;(function(t){t.back="back",t.forward="forward",t.unknown=""})(fm||(fm={}));function rK(t){if(!t)if(Jd){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),tK(t)}const aK=/^[^#]+#/;function lK(t,e){return t.replace(aK,"#")+e}function cK(t,e){const n=document.documentElement.getBoundingClientRect(),s=t.getBoundingClientRect();return{behavior:e.behavior,left:s.left-n.left-(e.left||0),top:s.top-n.top-(e.top||0)}}const Hy=()=>({left:window.scrollX,top:window.scrollY});function uK(t){let e;if("el"in t){const n=t.el,s=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;e=cK(i,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 p9(t,e){return(history.state?history.state.position-e:-1)+t}const z3=new Map;function dK(t,e){z3.set(t,e)}function hK(t){const e=z3.get(t);return z3.delete(t),e}let fK=()=>location.protocol+"//"+location.host;function xL(t,e){const{pathname:n,search:s,hash:i}=e,o=t.indexOf("#");if(o>-1){let a=i.includes(t.slice(o))?t.slice(o).length:1,l=i.slice(a);return l[0]!=="/"&&(l="/"+l),h9(l,"")}return h9(n,t)+s+i}function pK(t,e,n,s){let i=[],o=[],r=null;const a=({state:h})=>{const f=xL(t,location),p=n.value,m=e.value;let b=0;if(h){if(n.value=f,e.value=h,r&&r===p){r=null;return}b=m?h.position-m.position:0}else s(f);i.forEach(y=>{y(n.value,p,{delta:b,type:og.pop,direction:b?b>0?fm.forward:fm.back:fm.unknown})})};function l(){r=n.value}function c(h){i.push(h);const f=()=>{const p=i.indexOf(h);p>-1&&i.splice(p,1)};return o.push(f),f}function u(){const{history:h}=window;h.state&&h.replaceState($n({},h.state,{scroll:Hy()}),"")}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 m9(t,e,n,s=!1,i=!1){return{back:t,current:e,forward:n,replaced:s,position:window.history.length,scroll:i?Hy():null}}function mK(t){const{history:e,location:n}=window,s={value:xL(t,n)},i={value:e.state};i.value||o(s.value,{back:null,current:s.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:fK()+t+l;try{e[u?"replaceState":"pushState"](c,"",h),i.value=c}catch(f){console.error(f),n[u?"replace":"assign"](h)}}function r(l,c){const u=$n({},e.state,m9(i.value.back,l,i.value.forward,!0),c,{position:i.value.position});o(l,u,!0),s.value=l}function a(l,c){const u=$n({},i.value,e.state,{forward:l,scroll:Hy()});o(u.current,u,!0);const d=$n({},m9(s.value,l,null),{position:u.position+1},c);o(l,d,!1),s.value=l}return{location:s,state:i,push:a,replace:r}}function SL(t){t=rK(t);const e=mK(t),n=pK(t,e.state,e.location,e.replace);function s(o,r=!0){r||n.pauseListeners(),history.go(o)}const i=$n({location:"",base:t,go:s,createHref:lK.bind(null,t)},e,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>e.state.value}),i}function gK(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),SL(t)}function vK(t){return typeof t=="string"||t&&typeof t=="object"}function $L(t){return typeof t=="string"||typeof t=="symbol"}const AL=Symbol("");var g9;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(g9||(g9={}));function tf(t,e){return $n(new Error,{type:t,[AL]:!0},e)}function Ia(t,e){return t instanceof Error&&AL in t&&(e==null||!!(t.type&e))}const v9="[^/]+?",_K={sensitive:!1,strict:!1,start:!0,end:!0},yK=/[.+*?^${}()[\]/\\]/g;function bK(t,e){const n=$n({},_K,e),s=[];let i=n.start?"^":"";const o=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(i+="/");for(let d=0;d<c.length;d++){const h=c[d];let f=40+(n.sensitive?.25:0);if(h.type===0)d||(i+="/"),i+=h.value.replace(yK,"\\$&"),f+=40;else if(h.type===1){const{value:p,repeatable:m,optional:b,regexp:y}=h;o.push({name:p,repeatable:m,optional:b});const C=y||v9;if(C!==v9){f+=10;try{new RegExp(`(${C})`)}catch(x){throw new Error(`Invalid custom RegExp for param "${p}" (${C}): `+x.message)}}let k=m?`((?:${C})(?:/(?:${C}))*)`:`(${C})`;d||(k=b&&c.length<2?`(?:/${k})`:"/"+k),b&&(k+="?"),i+=k,f+=20,b&&(f+=-8),m&&(f+=-20),C===".*"&&(f+=-50)}u.push(f)}s.push(u)}if(n.strict&&n.end){const c=s.length-1;s[c][s[c].length-1]+=.7000000000000001}n.strict||(i+="/?"),n.end?i+="$":n.strict&&(i+="(?:/|$)");const r=new RegExp(i,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:b}=f,y=p in c?c[p]:"";if(Pr(y)&&!m)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const C=Pr(y)?y.join("/"):y;if(!C)if(b)h.length<2&&(u.endsWith("/")?u=u.slice(0,-1):d=!0);else throw new Error(`Missing required param "${p}"`);u+=C}}return u||"/"}return{re:r,score:s,keys:o,parse:a,stringify:l}}function wK(t,e){let n=0;for(;n<t.length&&n<e.length;){const s=e[n]-t[n];if(s)return s;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 ML(t,e){let n=0;const s=t.score,i=e.score;for(;n<s.length&&n<i.length;){const o=wK(s[n],i[n]);if(o)return o;n++}if(Math.abs(i.length-s.length)===1){if(_9(s))return 1;if(_9(i))return-1}return i.length-s.length}function _9(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const CK={type:0,value:""},kK=/[a-zA-Z0-9_]/;function xK(t){if(!t)return[[]];if(t==="/")return[[CK]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(f){throw new Error(`ERR (${n})/"${c}": ${f}`)}let n=0,s=n;const i=[];let o;function r(){o&&i.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){s=n,n=4;continue}switch(n){case 0:l==="/"?(c&&d(),r()):l===":"?(d(),n=1):h();break;case 4:h(),n=s;break;case 1:l==="("?n=2:kK.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(),i}function SK(t,e,n){const s=bK(xK(t.path),n),i=$n(s,{record:t,parent:e,children:[],alias:[]});return e&&!i.record.aliasOf==!e.record.aliasOf&&e.children.push(i),i}function $K(t,e){const n=[],s=new Map;e=w9({strict:!1,end:!0,sensitive:!1},e);function i(d){return s.get(d)}function o(d,h,f){const p=!f,m=AK(d);m.aliasOf=f&&f.record;const b=w9(e,d),y=[m];if("alias"in d){const x=typeof d.alias=="string"?[d.alias]:d.alias;for(const S of x)y.push($n({},m,{components:f?f.record.components:m.components,path:S,aliasOf:f?f.record:m}))}let C,k;for(const x of y){const{path:S}=x;if(h&&S[0]!=="/"){const E=h.record.path,T=E[E.length-1]==="/"?"":"/";x.path=h.record.path+(S&&T+S)}if(C=SK(x,h,b),f?f.alias.push(C):(k=k||C,k!==C&&k.alias.push(C),p&&d.name&&!b9(C)&&r(d.name)),EL(C)&&l(C),m.children){const E=m.children;for(let T=0;T<E.length;T++)o(E[T],C,f&&f.children[T])}f=f||C}return k?()=>{r(k)}:hm}function r(d){if($L(d)){const h=s.get(d);h&&(s.delete(d),n.splice(n.indexOf(h),1),h.children.forEach(r),h.alias.forEach(r))}else{const h=n.indexOf(d);h>-1&&(n.splice(h,1),d.record.name&&s.delete(d.record.name),d.children.forEach(r),d.alias.forEach(r))}}function a(){return n}function l(d){const h=TK(d,n);n.splice(h,0,d),d.record.name&&!b9(d)&&s.set(d.record.name,d)}function c(d,h){let f,p={},m,b;if("name"in d&&d.name){if(f=s.get(d.name),!f)throw tf(1,{location:d});b=f.record.name,p=$n(y9(h.params,f.keys.filter(k=>!k.optional).concat(f.parent?f.parent.keys.filter(k=>k.optional):[]).map(k=>k.name)),d.params&&y9(d.params,f.keys.map(k=>k.name))),m=f.stringify(p)}else if(d.path!=null)m=d.path,f=n.find(k=>k.re.test(m)),f&&(p=f.parse(m),b=f.record.name);else{if(f=h.name?s.get(h.name):n.find(k=>k.re.test(h.path)),!f)throw tf(1,{location:d,currentLocation:h});b=f.record.name,p=$n({},h.params,d.params),m=f.stringify(p)}const y=[];let C=f;for(;C;)y.unshift(C.record),C=C.parent;return{name:b,path:m,params:p,matched:y,meta:EK(y)}}t.forEach(d=>o(d));function u(){n.length=0,s.clear()}return{addRoute:o,resolve:c,removeRoute:r,clearRoutes:u,getRoutes:a,getRecordMatcher:i}}function y9(t,e){const n={};for(const s of e)s in t&&(n[s]=t[s]);return n}function AK(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:MK(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},mods:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function MK(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const s in t.components)e[s]=typeof n=="object"?n[s]:n;return e}function b9(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function EK(t){return t.reduce((e,n)=>$n(e,n.meta),{})}function w9(t,e){const n={};for(const s in t)n[s]=s in e?e[s]:t[s];return n}function TK(t,e){let n=0,s=e.length;for(;n!==s;){const o=n+s>>1;ML(t,e[o])<0?s=o:n=o+1}const i=PK(t);return i&&(s=e.lastIndexOf(i,s-1)),s}function PK(t){let e=t;for(;e=e.parent;)if(EL(e)&&ML(t,e)===0)return e}function EL({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function IK(t){const e={};if(t===""||t==="?")return e;const s=(t[0]==="?"?t.slice(1):t).split("&");for(let i=0;i<s.length;++i){const o=s[i].replace(yL," "),r=o.indexOf("="),a=ig(r<0?o:o.slice(0,r)),l=r<0?null:ig(o.slice(r+1));if(a in e){let c=e[a];Pr(c)||(c=e[a]=[c]),c.push(l)}else e[a]=l}return e}function C9(t){let e="";for(let n in t){const s=t[n];if(n=ZX(n),s==null){s!==void 0&&(e+=(e.length?"&":"")+n);continue}(Pr(s)?s.map(o=>o&&B3(o)):[s&&B3(s)]).forEach(o=>{o!==void 0&&(e+=(e.length?"&":"")+n,o!=null&&(e+="="+o))})}return e}function LK(t){const e={};for(const n in t){const s=t[n];s!==void 0&&(e[n]=Pr(s)?s.map(i=>i==null?null:""+i):s==null?s:""+s)}return e}const OK=Symbol(""),k9=Symbol(""),fx=Symbol(""),TL=Symbol(""),H3=Symbol("");function hp(){let t=[];function e(s){return t.push(s),()=>{const i=t.indexOf(s);i>-1&&t.splice(i,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function zl(t,e,n,s,i,o=r=>r()){const r=s&&(s.enterCallbacks[i]=s.enterCallbacks[i]||[]);return()=>new Promise((a,l)=>{const c=h=>{h===!1?l(tf(4,{from:n,to:e})):h instanceof Error?l(h):vK(h)?l(tf(2,{from:e,to:h})):(r&&s.enterCallbacks[i]===r&&typeof h=="function"&&r.push(h),a())},u=o(()=>t.call(s&&s.instances[i],e,n,c));let d=Promise.resolve(u);t.length<3&&(d=d.then(c)),d.catch(h=>l(h))})}function M2(t,e,n,s,i=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(vL(l)){const u=(l.__vccOpts||l)[e];u&&o.push(zl(u,n,s,r,a,i))}else{let c=l();o.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${r.path}"`);const d=BX(u)?u.default:u;r.mods[a]=u,r.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&zl(f,n,s,r,a,i)()}))}}return o}function x9(t){const e=qe(fx),n=qe(TL),s=q(()=>{const l=A(t.to);return e.resolve(l)}),i=q(()=>{const{matched:l}=s.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const h=d.findIndex(ef.bind(null,u));if(h>-1)return h;const f=S9(l[c-2]);return c>1&&S9(u)===f&&d[d.length-1].path!==f?d.findIndex(ef.bind(null,l[c-2])):h}),o=q(()=>i.value>-1&&FK(n.params,s.value.params)),r=q(()=>i.value>-1&&i.value===n.matched.length-1&&kL(n.params,s.value.params));function a(l={}){return VK(l)?e[A(t.replace)?"replace":"push"](A(t.to)).catch(hm):Promise.resolve()}return{route:s,href:q(()=>s.value.href),isActive:o,isExactActive:r,navigate:a}}const DK=se({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:x9,setup(t,{slots:e}){const n=as(x9(t)),{options:s}=qe(fx),i=q(()=>({[$9(t.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[$9(t.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=e.default&&e.default(n);return t.custom?o:gt("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},o)}}}),RK=DK;function VK(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 FK(t,e){for(const n in e){const s=e[n],i=t[n];if(typeof s=="string"){if(s!==i)return!1}else if(!Pr(i)||i.length!==s.length||s.some((o,r)=>o!==i[r]))return!1}return!0}function S9(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const $9=(t,e,n)=>t??e??n,NK=se({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const s=qe(H3),i=q(()=>t.route||s.value),o=qe(k9,0),r=q(()=>{let c=A(o);const{matched:u}=i.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=q(()=>i.value.matched[r.value]);It(k9,q(()=>r.value+1)),It(OK,a),It(H3,i);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||!ef(u,f)||!h)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=i.value,u=t.name,d=a.value,h=d&&d.components[u];if(!h)return A9(n.default,{Component:h,route:c});const f=d.props[u],p=f?f===!0?c.params:typeof f=="function"?f(c):f:null,b=gt(h,$n({},p,e,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return A9(n.default,{Component:b,route:c})||b}}});function A9(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const BK=NK;function M9(t){const e=$K(t.routes,t),n=t.parseQuery||IK,s=t.stringifyQuery||C9,i=t.history,o=hp(),r=hp(),a=hp(),l=ss(vl);let c=vl;Jd&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=$2.bind(null,oe=>""+oe),d=$2.bind(null,QX),h=$2.bind(null,ig);function f(oe,ce){let re,ge;return $L(oe)?(re=e.getRecordMatcher(oe),ge=ce):ge=oe,e.addRoute(ge,re)}function p(oe){const ce=e.getRecordMatcher(oe);ce&&e.removeRoute(ce)}function m(){return e.getRoutes().map(oe=>oe.record)}function b(oe){return!!e.getRecordMatcher(oe)}function y(oe,ce){if(ce=$n({},ce||l.value),typeof oe=="string"){const ne=A2(n,oe,ce.path),pe=e.resolve({path:ne.path},ce),Ae=i.createHref(ne.fullPath);return $n(ne,pe,{params:h(pe.params),hash:ig(ne.hash),redirectedFrom:void 0,href:Ae})}let re;if(oe.path!=null)re=$n({},oe,{path:A2(n,oe.path,ce.path).path});else{const ne=$n({},oe.params);for(const pe in ne)ne[pe]==null&&delete ne[pe];re=$n({},oe,{params:d(ne)}),ce.params=d(ce.params)}const ge=e.resolve(re,ce),ze=oe.hash||"";ge.params=u(h(ge.params));const st=nK(s,$n({},oe,{hash:KX(ze),path:ge.path})),ee=i.createHref(st);return $n({fullPath:st,hash:ze,query:s===C9?LK(oe.query):oe.query||{}},ge,{redirectedFrom:void 0,href:ee})}function C(oe){return typeof oe=="string"?A2(n,oe,l.value.path):$n({},oe)}function k(oe,ce){if(c!==oe)return tf(8,{from:ce,to:oe})}function x(oe){return T(oe)}function S(oe){return x($n(C(oe),{replace:!0}))}function E(oe){const ce=oe.matched[oe.matched.length-1];if(ce&&ce.redirect){const{redirect:re}=ce;let ge=typeof re=="function"?re(oe):re;return typeof ge=="string"&&(ge=ge.includes("?")||ge.includes("#")?ge=C(ge):{path:ge},ge.params={}),$n({query:oe.query,hash:oe.hash,params:ge.path!=null?{}:oe.params},ge)}}function T(oe,ce){const re=c=y(oe),ge=l.value,ze=oe.state,st=oe.force,ee=oe.replace===!0,ne=E(re);if(ne)return T($n(C(ne),{state:typeof ne=="object"?$n({},ze,ne.state):ze,force:st,replace:ee}),ce||re);const pe=re;pe.redirectedFrom=ce;let Ae;return!st&&sK(s,ge,re)&&(Ae=tf(16,{to:pe,from:ge}),Q(ge,ge,!0,!1)),(Ae?Promise.resolve(Ae):L(pe,ge)).catch(Ce=>Ia(Ce)?Ia(Ce,2)?Ce:F(Ce):K(Ce,pe,ge)).then(Ce=>{if(Ce){if(Ia(Ce,2))return T($n({replace:ee},C(Ce.to),{state:typeof Ce.to=="object"?$n({},ze,Ce.to.state):ze,force:st}),ce||pe)}else Ce=D(pe,ge,!0,ee,ze);return V(pe,ge,Ce),Ce})}function P(oe,ce){const re=k(oe,ce);return re?Promise.reject(re):Promise.resolve()}function I(oe){const ce=me.values().next().value;return ce&&typeof ce.runWithContext=="function"?ce.runWithContext(oe):oe()}function L(oe,ce){let re;const[ge,ze,st]=zK(oe,ce);re=M2(ge.reverse(),"beforeRouteLeave",oe,ce);for(const ne of ge)ne.leaveGuards.forEach(pe=>{re.push(zl(pe,oe,ce))});const ee=P.bind(null,oe,ce);return re.push(ee),we(re).then(()=>{re=[];for(const ne of o.list())re.push(zl(ne,oe,ce));return re.push(ee),we(re)}).then(()=>{re=M2(ze,"beforeRouteUpdate",oe,ce);for(const ne of ze)ne.updateGuards.forEach(pe=>{re.push(zl(pe,oe,ce))});return re.push(ee),we(re)}).then(()=>{re=[];for(const ne of st)if(ne.beforeEnter)if(Pr(ne.beforeEnter))for(const pe of ne.beforeEnter)re.push(zl(pe,oe,ce));else re.push(zl(ne.beforeEnter,oe,ce));return re.push(ee),we(re)}).then(()=>(oe.matched.forEach(ne=>ne.enterCallbacks={}),re=M2(st,"beforeRouteEnter",oe,ce,I),re.push(ee),we(re))).then(()=>{re=[];for(const ne of r.list())re.push(zl(ne,oe,ce));return re.push(ee),we(re)}).catch(ne=>Ia(ne,8)?ne:Promise.reject(ne))}function V(oe,ce,re){a.list().forEach(ge=>I(()=>ge(oe,ce,re)))}function D(oe,ce,re,ge,ze){const st=k(oe,ce);if(st)return st;const ee=ce===vl,ne=Jd?history.state:{};re&&(ge||ee?i.replace(oe.fullPath,$n({scroll:ee&&ne&&ne.scroll},ze)):i.push(oe.fullPath,ze)),l.value=oe,Q(oe,ce,re,ee),F()}let z;function Y(){z||(z=i.listen((oe,ce,re)=>{if(!Se.listening)return;const ge=y(oe),ze=E(ge);if(ze){T($n(ze,{replace:!0}),ge).catch(hm);return}c=ge;const st=l.value;Jd&&dK(p9(st.fullPath,re.delta),Hy()),L(ge,st).catch(ee=>Ia(ee,12)?ee:Ia(ee,2)?(T(ee.to,ge).then(ne=>{Ia(ne,20)&&!re.delta&&re.type===og.pop&&i.go(-1,!1)}).catch(hm),Promise.reject()):(re.delta&&i.go(-re.delta,!1),K(ee,ge,st))).then(ee=>{ee=ee||D(ge,st,!1),ee&&(re.delta&&!Ia(ee,8)?i.go(-re.delta,!1):re.type===og.pop&&Ia(ee,20)&&i.go(-1,!1)),V(ge,st,ee)}).catch(hm)}))}let B=hp(),U=hp(),X;function K(oe,ce,re){F(oe);const ge=U.list();return ge.length?ge.forEach(ze=>ze(oe,ce,re)):console.error(oe),Promise.reject(oe)}function N(){return X&&l.value!==vl?Promise.resolve():new Promise((oe,ce)=>{B.add([oe,ce])})}function F(oe){return X||(X=!oe,Y(),B.list().forEach(([ce,re])=>oe?re(oe):ce()),B.reset()),oe}function Q(oe,ce,re,ge){const{scrollBehavior:ze}=t;if(!Jd||!ze)return Promise.resolve();const st=!re&&hK(p9(oe.fullPath,0))||(ge||!re)&&history.state&&history.state.scroll||null;return dt().then(()=>ze(oe,ce,st)).then(ee=>ee&&uK(ee)).catch(ee=>K(ee,oe,ce))}const ie=oe=>i.go(oe);let Z;const me=new Set,Se={currentRoute:l,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:b,getRoutes:m,resolve:y,options:t,push:x,replace:S,go:ie,back:()=>ie(-1),forward:()=>ie(1),beforeEach:o.add,beforeResolve:r.add,afterEach:a.add,onError:U.add,isReady:N,install(oe){const ce=this;oe.component("RouterLink",RK),oe.component("RouterView",BK),oe.config.globalProperties.$router=ce,Object.defineProperty(oe.config.globalProperties,"$route",{enumerable:!0,get:()=>A(l)}),Jd&&!Z&&l.value===vl&&(Z=!0,x(i.location).catch(ze=>{}));const re={};for(const ze in vl)Object.defineProperty(re,ze,{get:()=>l.value[ze],enumerable:!0});oe.provide(fx,ce),oe.provide(TL,Ak(re)),oe.provide(H3,l);const ge=oe.unmount;me.add(oe),oe.unmount=function(){me.delete(oe),me.size<1&&(c=vl,z&&z(),z=null,l.value=vl,Z=!1,X=!1),ge()}}};function we(oe){return oe.reduce((ce,re)=>ce.then(()=>I(re)),Promise.resolve())}return Se}function zK(t,e){const n=[],s=[],i=[],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=>ef(c,a))?s.push(a):n.push(a));const l=t.matched[r];l&&(e.matched.find(c=>ef(c,l))||i.push(l))}return[n,s,i]}const HK='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',UK=t=>getComputedStyle(t).position==="fixed"?!1:t.offsetParent!==null,E9=t=>Array.from(t.querySelectorAll(HK)).filter(e=>jK(e)&&UK(e)),jK=t=>{if(t.tabIndex>0||t.tabIndex===0&&t.getAttribute("tabIndex")!==null)return!0;if(t.disabled)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}},fs=(t,e,{checkForDefaultPrevented:n=!0}={})=>i=>{const o=t==null?void 0:t(i);if(n===!1||!o)return e==null?void 0:e(i)},T9=t=>e=>e.pointerType==="mouse"?t(e):void 0;var WK=!1,YK=Object.defineProperty,GK=Object.defineProperties,qK=Object.getOwnPropertyDescriptors,P9=Object.getOwnPropertySymbols,XK=Object.prototype.hasOwnProperty,KK=Object.prototype.propertyIsEnumerable,I9=(t,e,n)=>e in t?YK(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ZK=(t,e)=>{for(var n in e||(e={}))XK.call(e,n)&&I9(t,n,e[n]);if(P9)for(var n of P9(e))KK.call(e,n)&&I9(t,n,e[n]);return t},JK=(t,e)=>GK(t,qK(e));function L9(t,e){var n;const s=ss();return br(()=>{s.value=t()},JK(ZK({},e),{flush:(n=e==null?void 0:e.flush)!=null?n:"sync"})),dc(s)}var O9;const Ut=typeof window<"u",QK=t=>typeof t<"u",eZ=t=>typeof t=="function",tZ=t=>typeof t=="string",nf=()=>{},U3=Ut&&((O9=window==null?void 0:window.navigator)==null?void 0:O9.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function sf(t){return typeof t=="function"?t():A(t)}function PL(t,e){function n(...s){return new Promise((i,o)=>{Promise.resolve(t(()=>e.apply(this,s),{fn:e,thisArg:this,args:s})).then(i).catch(o)})}return n}function nZ(t,e={}){let n,s,i=nf;const o=a=>{clearTimeout(a),i(),i=nf};return a=>{const l=sf(t),c=sf(e.maxWait);return n&&o(n),l<=0||c!==void 0&&c<=0?(s&&(o(s),s=null),Promise.resolve(a())):new Promise((u,d)=>{i=e.rejectOnCancel?d:u,c&&!s&&(s=setTimeout(()=>{n&&o(n),s=null,u(a())},c)),n=setTimeout(()=>{s&&o(s),s=null,u(a())},l)})}}function sZ(t,e=!0,n=!0,s=!1){let i=0,o,r=!0,a=nf,l;const c=()=>{o&&(clearTimeout(o),o=void 0,a(),a=nf)};return d=>{const h=sf(t),f=Date.now()-i,p=()=>l=d();return c(),h<=0?(i=Date.now(),p()):(f>h&&(n||!r)?(i=Date.now(),p()):e&&(l=new Promise((m,b)=>{a=s?b:m,o=setTimeout(()=>{i=Date.now(),r=!0,m(p()),c()},Math.max(0,h-f))})),!n&&!o&&(o=setTimeout(()=>r=!0,h)),r=!1,l)}}function iZ(t){return t}function Gg(t){return Sy()?($y(t),!0):!1}function oZ(t,e=200,n={}){return PL(nZ(e,n),t)}function rZ(t,e=200,n={}){const s=J(t.value),i=oZ(()=>{s.value=t.value},e,n);return Te(t,()=>i()),s}function aZ(t,e=200,n=!1,s=!0,i=!1){return PL(sZ(e,n,s,i),t)}function lZ(t,e=!0){pt()?Pt(t):e?t():dt(t)}function j3(t,e,n={}){const{immediate:s=!0}=n,i=J(!1);let o=null;function r(){o&&(clearTimeout(o),o=null)}function a(){i.value=!1,r()}function l(...c){r(),i.value=!0,o=setTimeout(()=>{i.value=!1,o=null,t(...c)},sf(e))}return s&&(i.value=!0,Ut&&l()),Gg(a),{isPending:dc(i),start:l,stop:a}}function qa(t){var e;const n=sf(t);return(e=n==null?void 0:n.$el)!=null?e:n}const qg=Ut?window:void 0,cZ=Ut?window.document:void 0;function is(...t){let e,n,s,i;if(tZ(t[0])||Array.isArray(t[0])?([n,s,i]=t,e=qg):[e,n,s,i]=t,!e)return nf;Array.isArray(n)||(n=[n]),Array.isArray(s)||(s=[s]);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(()=>[qa(e),sf(i)],([u,d])=>{r(),u&&o.push(...n.flatMap(h=>s.map(f=>a(u,h,f,d))))},{immediate:!0,flush:"post"}),c=()=>{l(),r()};return Gg(c),c}let D9=!1;function IL(t,e,n={}){const{window:s=qg,ignore:i=[],capture:o=!0,detectIframe:r=!1}=n;if(!s)return;U3&&!D9&&(D9=!0,Array.from(s.document.body.children).forEach(h=>h.addEventListener("click",nf)));let a=!0;const l=h=>i.some(f=>{if(typeof f=="string")return Array.from(s.document.querySelectorAll(f)).some(p=>p===h.target||h.composedPath().includes(p));{const p=qa(f);return p&&(h.target===p||h.composedPath().includes(p))}}),u=[is(s,"click",h=>{const f=qa(t);if(!(!f||f===h.target||h.composedPath().includes(f))){if(h.detail===0&&(a=!l(h)),!a){a=!0;return}e(h)}},{passive:!0,capture:o}),is(s,"pointerdown",h=>{const f=qa(t);f&&(a=!h.composedPath().includes(f)&&!l(h))},{passive:!0}),r&&is(s,"blur",h=>{var f;const p=qa(t);((f=s.document.activeElement)==null?void 0:f.tagName)==="IFRAME"&&!(p!=null&&p.contains(s.document.activeElement))&&e(h)})].filter(Boolean);return()=>u.forEach(h=>h())}function LL(t,e=!1){const n=J(),s=()=>n.value=!!t();return s(),lZ(s,e),n}function uZ(t){return JSON.parse(JSON.stringify(t))}const R9=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},V9="__vueuse_ssr_handlers__";R9[V9]=R9[V9]||{};function dZ({document:t=cZ}={}){if(!t)return J("visible");const e=J(t.visibilityState);return is(t,"visibilitychange",()=>{e.value=t.visibilityState}),e}var F9=Object.getOwnPropertySymbols,hZ=Object.prototype.hasOwnProperty,fZ=Object.prototype.propertyIsEnumerable,pZ=(t,e)=>{var n={};for(var s in t)hZ.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&F9)for(var s of F9(t))e.indexOf(s)<0&&fZ.call(t,s)&&(n[s]=t[s]);return n};function bi(t,e,n={}){const s=n,{window:i=qg}=s,o=pZ(s,["window"]);let r;const a=LL(()=>i&&"ResizeObserver"in i),l=()=>{r&&(r.disconnect(),r=void 0)},c=Te(()=>qa(t),d=>{l(),a.value&&i&&d&&(r=new ResizeObserver(e),r.observe(d,o))},{immediate:!0,flush:"post"}),u=()=>{l(),c()};return Gg(u),{isSupported:a,stop:u}}var N9=Object.getOwnPropertySymbols,mZ=Object.prototype.hasOwnProperty,gZ=Object.prototype.propertyIsEnumerable,vZ=(t,e)=>{var n={};for(var s in t)mZ.call(t,s)&&e.indexOf(s)<0&&(n[s]=t[s]);if(t!=null&&N9)for(var s of N9(t))e.indexOf(s)<0&&gZ.call(t,s)&&(n[s]=t[s]);return n};function _Z(t,e,n={}){const s=n,{window:i=qg}=s,o=vZ(s,["window"]);let r;const a=LL(()=>i&&"MutationObserver"in i),l=()=>{r&&(r.disconnect(),r=void 0)},c=Te(()=>qa(t),d=>{l(),a.value&&i&&d&&(r=new MutationObserver(e),r.observe(d,o))},{immediate:!0}),u=()=>{l(),c()};return Gg(u),{isSupported:a,stop:u}}var B9;(function(t){t.UP="UP",t.RIGHT="RIGHT",t.DOWN="DOWN",t.LEFT="LEFT",t.NONE="NONE"})(B9||(B9={}));var yZ=Object.defineProperty,z9=Object.getOwnPropertySymbols,bZ=Object.prototype.hasOwnProperty,wZ=Object.prototype.propertyIsEnumerable,H9=(t,e,n)=>e in t?yZ(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,CZ=(t,e)=>{for(var n in e||(e={}))bZ.call(e,n)&&H9(t,n,e[n]);if(z9)for(var n of z9(e))wZ.call(e,n)&&H9(t,n,e[n]);return t};const kZ={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};CZ({linear:iZ},kZ);function xZ(t,e,n,s={}){var i,o,r;const{clone:a=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:d}=s,h=pt(),f=n||(h==null?void 0:h.emit)||((i=h==null?void 0:h.$emit)==null?void 0:i.bind(h))||((r=(o=h==null?void 0:h.proxy)==null?void 0:o.$emit)==null?void 0:r.bind(h==null?void 0:h.proxy));let p=c;e||(e="modelValue"),p=c||p||`update:${e.toString()}`;const m=y=>a?eZ(a)?a(y):uZ(y):y,b=()=>QK(t[e])?m(t[e]):d;if(l){const y=b(),C=J(y);return Te(()=>t[e],k=>C.value=m(k)),Te(C,k=>{(k!==t[e]||u)&&f(p,k)},{deep:u}),C}else return q({get(){return b()},set(y){f(p,y)}})}function SZ({window:t=qg}={}){if(!t)return J(!1);const e=J(t.document.hasFocus());return is(t,"blur",()=>{e.value=!1}),is(t,"focus",()=>{e.value=!0}),e}const $Z=()=>Ut&&/firefox/i.test(window.navigator.userAgent),AZ=(t,e)=>{if(!Ut||!t||!e)return!1;const n=t.getBoundingClientRect();let s;return e instanceof Element?s=e.getBoundingClientRect():s={top:0,right:window.innerWidth,bottom:window.innerHeight,left:0},n.top<s.bottom&&n.bottom>s.top&&n.right>s.left&&n.left<s.right},px=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}};var MZ=typeof global=="object"&&global&&global.Object===Object&&global;const OL=MZ;var EZ=typeof self=="object"&&self&&self.Object===Object&&self,TZ=OL||EZ||Function("return this")();const Fr=TZ;var PZ=Fr.Symbol;const Jo=PZ;var DL=Object.prototype,IZ=DL.hasOwnProperty,LZ=DL.toString,fp=Jo?Jo.toStringTag:void 0;function OZ(t){var e=IZ.call(t,fp),n=t[fp];try{t[fp]=void 0;var s=!0}catch{}var i=LZ.call(t);return s&&(e?t[fp]=n:delete t[fp]),i}var DZ=Object.prototype,RZ=DZ.toString;function VZ(t){return RZ.call(t)}var FZ="[object Null]",NZ="[object Undefined]",U9=Jo?Jo.toStringTag:void 0;function ad(t){return t==null?t===void 0?NZ:FZ:U9&&U9 in Object(t)?OZ(t):VZ(t)}function ua(t){return t!=null&&typeof t=="object"}var BZ="[object Symbol]";function Uy(t){return typeof t=="symbol"||ua(t)&&ad(t)==BZ}function RL(t,e){for(var n=-1,s=t==null?0:t.length,i=Array(s);++n<s;)i[n]=e(t[n],n,t);return i}var zZ=Array.isArray;const Si=zZ;var HZ=1/0,j9=Jo?Jo.prototype:void 0,W9=j9?j9.toString:void 0;function VL(t){if(typeof t=="string")return t;if(Si(t))return RL(t,VL)+"";if(Uy(t))return W9?W9.call(t):"";var e=t+"";return e=="0"&&1/t==-HZ?"-0":e}var UZ=/\s/;function jZ(t){for(var e=t.length;e--&&UZ.test(t.charAt(e)););return e}var WZ=/^\s+/;function YZ(t){return t&&t.slice(0,jZ(t)+1).replace(WZ,"")}function $i(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Y9=0/0,GZ=/^[-+]0x[0-9a-f]+$/i,qZ=/^0b[01]+$/i,XZ=/^0o[0-7]+$/i,KZ=parseInt;function W3(t){if(typeof t=="number")return t;if(Uy(t))return Y9;if($i(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=$i(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=YZ(t);var n=qZ.test(t);return n||XZ.test(t)?KZ(t.slice(2),n?2:8):GZ.test(t)?Y9:+t}var G9=1/0,ZZ=17976931348623157e292;function JZ(t){if(!t)return t===0?t:0;if(t=W3(t),t===G9||t===-G9){var e=t<0?-1:1;return e*ZZ}return t===t?t:0}function QZ(t){var e=JZ(t),n=e%1;return e===e?n?e-n:e:0}function mx(t){return t}var eJ="[object AsyncFunction]",tJ="[object Function]",nJ="[object GeneratorFunction]",sJ="[object Proxy]";function gx(t){if(!$i(t))return!1;var e=ad(t);return e==tJ||e==nJ||e==eJ||e==sJ}var iJ=Fr["__core-js_shared__"];const E2=iJ;var q9=function(){var t=/[^.]+$/.exec(E2&&E2.keys&&E2.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function oJ(t){return!!q9&&q9 in t}var rJ=Function.prototype,aJ=rJ.toString;function ld(t){if(t!=null){try{return aJ.call(t)}catch{}try{return t+""}catch{}}return""}var lJ=/[\\^$.*+?()[\]{}|]/g,cJ=/^\[object .+?Constructor\]$/,uJ=Function.prototype,dJ=Object.prototype,hJ=uJ.toString,fJ=dJ.hasOwnProperty,pJ=RegExp("^"+hJ.call(fJ).replace(lJ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function mJ(t){if(!$i(t)||oJ(t))return!1;var e=gx(t)?pJ:cJ;return e.test(ld(t))}function gJ(t,e){return t==null?void 0:t[e]}function cd(t,e){var n=gJ(t,e);return mJ(n)?n:void 0}var vJ=cd(Fr,"WeakMap");const Y3=vJ;var X9=Object.create,_J=function(){function t(){}return function(e){if(!$i(e))return{};if(X9)return X9(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();const yJ=_J;function bJ(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 FL(t,e){var n=-1,s=t.length;for(e||(e=Array(s));++n<s;)e[n]=t[n];return e}var wJ=800,CJ=16,kJ=Date.now;function xJ(t){var e=0,n=0;return function(){var s=kJ(),i=CJ-(s-n);if(n=s,i>0){if(++e>=wJ)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function SJ(t){return function(){return t}}var $J=function(){try{var t=cd(Object,"defineProperty");return t({},"",{}),t}catch{}}();const $_=$J;var AJ=$_?function(t,e){return $_(t,"toString",{configurable:!0,enumerable:!1,value:SJ(e),writable:!0})}:mx;const MJ=AJ;var EJ=xJ(MJ);const NL=EJ;function TJ(t,e){for(var n=-1,s=t==null?0:t.length;++n<s&&e(t[n],n,t)!==!1;);return t}function PJ(t,e,n,s){for(var i=t.length,o=n+(s?1:-1);s?o--:++o<i;)if(e(t[o],o,t))return o;return-1}var IJ=9007199254740991,LJ=/^(?:0|[1-9]\d*)$/;function jy(t,e){var n=typeof t;return e=e??IJ,!!e&&(n=="number"||n!="symbol"&&LJ.test(t))&&t>-1&&t%1==0&&t<e}function vx(t,e,n){e=="__proto__"&&$_?$_(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Xg(t,e){return t===e||t!==t&&e!==e}var OJ=Object.prototype,DJ=OJ.hasOwnProperty;function _x(t,e,n){var s=t[e];(!(DJ.call(t,e)&&Xg(s,n))||n===void 0&&!(e in t))&&vx(t,e,n)}function Kg(t,e,n,s){var i=!n;n||(n={});for(var o=-1,r=e.length;++o<r;){var a=e[o],l=s?s(n[a],t[a],a,n,t):void 0;l===void 0&&(l=t[a]),i?vx(n,a,l):_x(n,a,l)}return n}var K9=Math.max;function BL(t,e,n){return e=K9(e===void 0?t.length-1:e,0),function(){for(var s=arguments,i=-1,o=K9(s.length-e,0),r=Array(o);++i<o;)r[i]=s[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=s[i];return a[e]=n(r),bJ(t,this,a)}}function RJ(t,e){return NL(BL(t,e,mx),t+"")}var VJ=9007199254740991;function yx(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=VJ}function Lf(t){return t!=null&&yx(t.length)&&!gx(t)}function FJ(t,e,n){if(!$i(n))return!1;var s=typeof e;return(s=="number"?Lf(n)&&jy(e,n.length):s=="string"&&e in n)?Xg(n[e],t):!1}function NJ(t){return RJ(function(e,n){var s=-1,i=n.length,o=i>1?n[i-1]:void 0,r=i>2?n[2]:void 0;for(o=t.length>3&&typeof o=="function"?(i--,o):void 0,r&&FJ(n[0],n[1],r)&&(o=i<3?void 0:o,i=1),e=Object(e);++s<i;){var a=n[s];a&&t(e,a,s,o)}return e})}var BJ=Object.prototype;function bx(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||BJ;return t===n}function zJ(t,e){for(var n=-1,s=Array(t);++n<t;)s[n]=e(n);return s}var HJ="[object Arguments]";function Z9(t){return ua(t)&&ad(t)==HJ}var zL=Object.prototype,UJ=zL.hasOwnProperty,jJ=zL.propertyIsEnumerable,WJ=Z9(function(){return arguments}())?Z9:function(t){return ua(t)&&UJ.call(t,"callee")&&!jJ.call(t,"callee")};const rg=WJ;function YJ(){return!1}var HL=typeof fo=="object"&&fo&&!fo.nodeType&&fo,J9=HL&&typeof po=="object"&&po&&!po.nodeType&&po,GJ=J9&&J9.exports===HL,Q9=GJ?Fr.Buffer:void 0,qJ=Q9?Q9.isBuffer:void 0,XJ=qJ||YJ;const ag=XJ;var KJ="[object Arguments]",ZJ="[object Array]",JJ="[object Boolean]",QJ="[object Date]",eQ="[object Error]",tQ="[object Function]",nQ="[object Map]",sQ="[object Number]",iQ="[object Object]",oQ="[object RegExp]",rQ="[object Set]",aQ="[object String]",lQ="[object WeakMap]",cQ="[object ArrayBuffer]",uQ="[object DataView]",dQ="[object Float32Array]",hQ="[object Float64Array]",fQ="[object Int8Array]",pQ="[object Int16Array]",mQ="[object Int32Array]",gQ="[object Uint8Array]",vQ="[object Uint8ClampedArray]",_Q="[object Uint16Array]",yQ="[object Uint32Array]",zn={};zn[dQ]=zn[hQ]=zn[fQ]=zn[pQ]=zn[mQ]=zn[gQ]=zn[vQ]=zn[_Q]=zn[yQ]=!0;zn[KJ]=zn[ZJ]=zn[cQ]=zn[JJ]=zn[uQ]=zn[QJ]=zn[eQ]=zn[tQ]=zn[nQ]=zn[sQ]=zn[iQ]=zn[oQ]=zn[rQ]=zn[aQ]=zn[lQ]=!1;function bQ(t){return ua(t)&&yx(t.length)&&!!zn[ad(t)]}function wx(t){return function(e){return t(e)}}var UL=typeof fo=="object"&&fo&&!fo.nodeType&&fo,pm=UL&&typeof po=="object"&&po&&!po.nodeType&&po,wQ=pm&&pm.exports===UL,T2=wQ&&OL.process,CQ=function(){try{var t=pm&&pm.require&&pm.require("util").types;return t||T2&&T2.binding&&T2.binding("util")}catch{}}();const of=CQ;var e7=of&&of.isTypedArray,kQ=e7?wx(e7):bQ;const Cx=kQ;var xQ=Object.prototype,SQ=xQ.hasOwnProperty;function jL(t,e){var n=Si(t),s=!n&&rg(t),i=!n&&!s&&ag(t),o=!n&&!s&&!i&&Cx(t),r=n||s||i||o,a=r?zJ(t.length,String):[],l=a.length;for(var c in t)(e||SQ.call(t,c))&&!(r&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||jy(c,l)))&&a.push(c);return a}function WL(t,e){return function(n){return t(e(n))}}var $Q=WL(Object.keys,Object);const AQ=$Q;var MQ=Object.prototype,EQ=MQ.hasOwnProperty;function TQ(t){if(!bx(t))return AQ(t);var e=[];for(var n in Object(t))EQ.call(t,n)&&n!="constructor"&&e.push(n);return e}function Zg(t){return Lf(t)?jL(t):TQ(t)}function PQ(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var IQ=Object.prototype,LQ=IQ.hasOwnProperty;function OQ(t){if(!$i(t))return PQ(t);var e=bx(t),n=[];for(var s in t)s=="constructor"&&(e||!LQ.call(t,s))||n.push(s);return n}function Jg(t){return Lf(t)?jL(t,!0):OQ(t)}var DQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,RQ=/^\w*$/;function kx(t,e){if(Si(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Uy(t)?!0:RQ.test(t)||!DQ.test(t)||e!=null&&t in Object(e)}var VQ=cd(Object,"create");const lg=VQ;function FQ(){this.__data__=lg?lg(null):{},this.size=0}function NQ(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var BQ="__lodash_hash_undefined__",zQ=Object.prototype,HQ=zQ.hasOwnProperty;function UQ(t){var e=this.__data__;if(lg){var n=e[t];return n===BQ?void 0:n}return HQ.call(e,t)?e[t]:void 0}var jQ=Object.prototype,WQ=jQ.hasOwnProperty;function YQ(t){var e=this.__data__;return lg?e[t]!==void 0:WQ.call(e,t)}var GQ="__lodash_hash_undefined__";function qQ(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=lg&&e===void 0?GQ:e,this}function ju(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}ju.prototype.clear=FQ;ju.prototype.delete=NQ;ju.prototype.get=UQ;ju.prototype.has=YQ;ju.prototype.set=qQ;function XQ(){this.__data__=[],this.size=0}function Wy(t,e){for(var n=t.length;n--;)if(Xg(t[n][0],e))return n;return-1}var KQ=Array.prototype,ZQ=KQ.splice;function JQ(t){var e=this.__data__,n=Wy(e,t);if(n<0)return!1;var s=e.length-1;return n==s?e.pop():ZQ.call(e,n,1),--this.size,!0}function QQ(t){var e=this.__data__,n=Wy(e,t);return n<0?void 0:e[n][1]}function eee(t){return Wy(this.__data__,t)>-1}function tee(t,e){var n=this.__data__,s=Wy(n,t);return s<0?(++this.size,n.push([t,e])):n[s][1]=e,this}function cl(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}cl.prototype.clear=XQ;cl.prototype.delete=JQ;cl.prototype.get=QQ;cl.prototype.has=eee;cl.prototype.set=tee;var nee=cd(Fr,"Map");const cg=nee;function see(){this.size=0,this.__data__={hash:new ju,map:new(cg||cl),string:new ju}}function iee(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Yy(t,e){var n=t.__data__;return iee(e)?n[typeof e=="string"?"string":"hash"]:n.map}function oee(t){var e=Yy(this,t).delete(t);return this.size-=e?1:0,e}function ree(t){return Yy(this,t).get(t)}function aee(t){return Yy(this,t).has(t)}function lee(t,e){var n=Yy(this,t),s=n.size;return n.set(t,e),this.size+=n.size==s?0:1,this}function ul(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}ul.prototype.clear=see;ul.prototype.delete=oee;ul.prototype.get=ree;ul.prototype.has=aee;ul.prototype.set=lee;var cee="Expected a function";function xx(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(cee);var n=function(){var s=arguments,i=e?e.apply(this,s):s[0],o=n.cache;if(o.has(i))return o.get(i);var r=t.apply(this,s);return n.cache=o.set(i,r)||o,r};return n.cache=new(xx.Cache||ul),n}xx.Cache=ul;var uee=500;function dee(t){var e=xx(t,function(s){return n.size===uee&&n.clear(),s}),n=e.cache;return e}var hee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fee=/\\(\\)?/g,pee=dee(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(hee,function(n,s,i,o){e.push(i?o.replace(fee,"$1"):s||n)}),e});const mee=pee;function gee(t){return t==null?"":VL(t)}function Gy(t,e){return Si(t)?t:kx(t,e)?[t]:mee(gee(t))}var vee=1/0;function Qg(t){if(typeof t=="string"||Uy(t))return t;var e=t+"";return e=="0"&&1/t==-vee?"-0":e}function Sx(t,e){e=Gy(e,t);for(var n=0,s=e.length;t!=null&&n<s;)t=t[Qg(e[n++])];return n&&n==s?t:void 0}function No(t,e,n){var s=t==null?void 0:Sx(t,e);return s===void 0?n:s}function $x(t,e){for(var n=-1,s=e.length,i=t.length;++n<s;)t[i+n]=e[n];return t}var t7=Jo?Jo.isConcatSpreadable:void 0;function _ee(t){return Si(t)||rg(t)||!!(t7&&t&&t[t7])}function Ax(t,e,n,s,i){var o=-1,r=t.length;for(n||(n=_ee),i||(i=[]);++o<r;){var a=t[o];e>0&&n(a)?e>1?Ax(a,e-1,n,s,i):$x(i,a):s||(i[i.length]=a)}return i}function YL(t){var e=t==null?0:t.length;return e?Ax(t,1):[]}function yee(t){return NL(BL(t,void 0,YL),t+"")}var bee=WL(Object.getPrototypeOf,Object);const Mx=bee;var wee="[object Object]",Cee=Function.prototype,kee=Object.prototype,GL=Cee.toString,xee=kee.hasOwnProperty,See=GL.call(Object);function $ee(t){if(!ua(t)||ad(t)!=wee)return!1;var e=Mx(t);if(e===null)return!0;var n=xee.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&GL.call(n)==See}function Hi(){if(!arguments.length)return[];var t=arguments[0];return Si(t)?t:[t]}function Aee(){this.__data__=new cl,this.size=0}function Mee(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function Eee(t){return this.__data__.get(t)}function Tee(t){return this.__data__.has(t)}var Pee=200;function Iee(t,e){var n=this.__data__;if(n instanceof cl){var s=n.__data__;if(!cg||s.length<Pee-1)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new ul(s)}return n.set(t,e),this.size=n.size,this}function Cr(t){var e=this.__data__=new cl(t);this.size=e.size}Cr.prototype.clear=Aee;Cr.prototype.delete=Mee;Cr.prototype.get=Eee;Cr.prototype.has=Tee;Cr.prototype.set=Iee;function Lee(t,e){return t&&Kg(e,Zg(e),t)}function Oee(t,e){return t&&Kg(e,Jg(e),t)}var qL=typeof fo=="object"&&fo&&!fo.nodeType&&fo,n7=qL&&typeof po=="object"&&po&&!po.nodeType&&po,Dee=n7&&n7.exports===qL,s7=Dee?Fr.Buffer:void 0,i7=s7?s7.allocUnsafe:void 0;function XL(t,e){if(e)return t.slice();var n=t.length,s=i7?i7(n):new t.constructor(n);return t.copy(s),s}function Ree(t,e){for(var n=-1,s=t==null?0:t.length,i=0,o=[];++n<s;){var r=t[n];e(r,n,t)&&(o[i++]=r)}return o}function KL(){return[]}var Vee=Object.prototype,Fee=Vee.propertyIsEnumerable,o7=Object.getOwnPropertySymbols,Nee=o7?function(t){return t==null?[]:(t=Object(t),Ree(o7(t),function(e){return Fee.call(t,e)}))}:KL;const Ex=Nee;function Bee(t,e){return Kg(t,Ex(t),e)}var zee=Object.getOwnPropertySymbols,Hee=zee?function(t){for(var e=[];t;)$x(e,Ex(t)),t=Mx(t);return e}:KL;const ZL=Hee;function Uee(t,e){return Kg(t,ZL(t),e)}function JL(t,e,n){var s=e(t);return Si(t)?s:$x(s,n(t))}function G3(t){return JL(t,Zg,Ex)}function jee(t){return JL(t,Jg,ZL)}var Wee=cd(Fr,"DataView");const q3=Wee;var Yee=cd(Fr,"Promise");const X3=Yee;var Gee=cd(Fr,"Set");const K3=Gee;var r7="[object Map]",qee="[object Object]",a7="[object Promise]",l7="[object Set]",c7="[object WeakMap]",u7="[object DataView]",Xee=ld(q3),Kee=ld(cg),Zee=ld(X3),Jee=ld(K3),Qee=ld(Y3),qc=ad;(q3&&qc(new q3(new ArrayBuffer(1)))!=u7||cg&&qc(new cg)!=r7||X3&&qc(X3.resolve())!=a7||K3&&qc(new K3)!=l7||Y3&&qc(new Y3)!=c7)&&(qc=function(t){var e=ad(t),n=e==qee?t.constructor:void 0,s=n?ld(n):"";if(s)switch(s){case Xee:return u7;case Kee:return r7;case Zee:return a7;case Jee:return l7;case Qee:return c7}return e});const ug=qc;var ete=Object.prototype,tte=ete.hasOwnProperty;function nte(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&tte.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var ste=Fr.Uint8Array;const A_=ste;function Tx(t){var e=new t.constructor(t.byteLength);return new A_(e).set(new A_(t)),e}function ite(t,e){var n=e?Tx(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var ote=/\w*$/;function rte(t){var e=new t.constructor(t.source,ote.exec(t));return e.lastIndex=t.lastIndex,e}var d7=Jo?Jo.prototype:void 0,h7=d7?d7.valueOf:void 0;function ate(t){return h7?Object(h7.call(t)):{}}function QL(t,e){var n=e?Tx(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var lte="[object Boolean]",cte="[object Date]",ute="[object Map]",dte="[object Number]",hte="[object RegExp]",fte="[object Set]",pte="[object String]",mte="[object Symbol]",gte="[object ArrayBuffer]",vte="[object DataView]",_te="[object Float32Array]",yte="[object Float64Array]",bte="[object Int8Array]",wte="[object Int16Array]",Cte="[object Int32Array]",kte="[object Uint8Array]",xte="[object Uint8ClampedArray]",Ste="[object Uint16Array]",$te="[object Uint32Array]";function Ate(t,e,n){var s=t.constructor;switch(e){case gte:return Tx(t);case lte:case cte:return new s(+t);case vte:return ite(t,n);case _te:case yte:case bte:case wte:case Cte:case kte:case xte:case Ste:case $te:return QL(t,n);case ute:return new s;case dte:case pte:return new s(t);case hte:return rte(t);case fte:return new s;case mte:return ate(t)}}function eO(t){return typeof t.constructor=="function"&&!bx(t)?yJ(Mx(t)):{}}var Mte="[object Map]";function Ete(t){return ua(t)&&ug(t)==Mte}var f7=of&&of.isMap,Tte=f7?wx(f7):Ete;const Pte=Tte;var Ite="[object Set]";function Lte(t){return ua(t)&&ug(t)==Ite}var p7=of&&of.isSet,Ote=p7?wx(p7):Lte;const Dte=Ote;var Rte=1,Vte=2,Fte=4,tO="[object Arguments]",Nte="[object Array]",Bte="[object Boolean]",zte="[object Date]",Hte="[object Error]",nO="[object Function]",Ute="[object GeneratorFunction]",jte="[object Map]",Wte="[object Number]",sO="[object Object]",Yte="[object RegExp]",Gte="[object Set]",qte="[object String]",Xte="[object Symbol]",Kte="[object WeakMap]",Zte="[object ArrayBuffer]",Jte="[object DataView]",Qte="[object Float32Array]",ene="[object Float64Array]",tne="[object Int8Array]",nne="[object Int16Array]",sne="[object Int32Array]",ine="[object Uint8Array]",one="[object Uint8ClampedArray]",rne="[object Uint16Array]",ane="[object Uint32Array]",Dn={};Dn[tO]=Dn[Nte]=Dn[Zte]=Dn[Jte]=Dn[Bte]=Dn[zte]=Dn[Qte]=Dn[ene]=Dn[tne]=Dn[nne]=Dn[sne]=Dn[jte]=Dn[Wte]=Dn[sO]=Dn[Yte]=Dn[Gte]=Dn[qte]=Dn[Xte]=Dn[ine]=Dn[one]=Dn[rne]=Dn[ane]=!0;Dn[Hte]=Dn[nO]=Dn[Kte]=!1;function mm(t,e,n,s,i,o){var r,a=e&Rte,l=e&Vte,c=e&Fte;if(n&&(r=i?n(t,s,i,o):n(t)),r!==void 0)return r;if(!$i(t))return t;var u=Si(t);if(u){if(r=nte(t),!a)return FL(t,r)}else{var d=ug(t),h=d==nO||d==Ute;if(ag(t))return XL(t,a);if(d==sO||d==tO||h&&!i){if(r=l||h?{}:eO(t),!a)return l?Uee(t,Oee(r,t)):Bee(t,Lee(r,t))}else{if(!Dn[d])return i?t:{};r=Ate(t,d,a)}}o||(o=new Cr);var f=o.get(t);if(f)return f;o.set(t,r),Dte(t)?t.forEach(function(b){r.add(mm(b,e,n,b,t,o))}):Pte(t)&&t.forEach(function(b,y){r.set(y,mm(b,e,n,y,t,o))});var p=c?l?jee:G3:l?Jg:Zg,m=u?void 0:p(t);return TJ(m||t,function(b,y){m&&(y=b,b=t[y]),_x(r,y,mm(b,e,n,y,t,o))}),r}var lne=4;function m7(t){return mm(t,lne)}var cne=1,une=4;function g7(t){return mm(t,cne|une)}var dne="__lodash_hash_undefined__";function hne(t){return this.__data__.set(t,dne),this}function fne(t){return this.__data__.has(t)}function M_(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new ul;++e<n;)this.add(t[e])}M_.prototype.add=M_.prototype.push=hne;M_.prototype.has=fne;function pne(t,e){for(var n=-1,s=t==null?0:t.length;++n<s;)if(e(t[n],n,t))return!0;return!1}function mne(t,e){return t.has(e)}var gne=1,vne=2;function iO(t,e,n,s,i,o){var r=n&gne,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&vne?new M_:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var p=t[d],m=e[d];if(s)var b=r?s(m,p,d,e,t,o):s(p,m,d,t,e,o);if(b!==void 0){if(b)continue;h=!1;break}if(f){if(!pne(e,function(y,C){if(!mne(f,C)&&(p===y||i(p,y,n,s,o)))return f.push(C)})){h=!1;break}}else if(!(p===m||i(p,m,n,s,o))){h=!1;break}}return o.delete(t),o.delete(e),h}function _ne(t){var e=-1,n=Array(t.size);return t.forEach(function(s,i){n[++e]=[i,s]}),n}function yne(t){var e=-1,n=Array(t.size);return t.forEach(function(s){n[++e]=s}),n}var bne=1,wne=2,Cne="[object Boolean]",kne="[object Date]",xne="[object Error]",Sne="[object Map]",$ne="[object Number]",Ane="[object RegExp]",Mne="[object Set]",Ene="[object String]",Tne="[object Symbol]",Pne="[object ArrayBuffer]",Ine="[object DataView]",v7=Jo?Jo.prototype:void 0,P2=v7?v7.valueOf:void 0;function Lne(t,e,n,s,i,o,r){switch(n){case Ine:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Pne:return!(t.byteLength!=e.byteLength||!o(new A_(t),new A_(e)));case Cne:case kne:case $ne:return Xg(+t,+e);case xne:return t.name==e.name&&t.message==e.message;case Ane:case Ene:return t==e+"";case Sne:var a=_ne;case Mne:var l=s=⃥if(a||(a=yne),t.size!=e.size&&!l)return!1;var c=r.get(t);if(c)return c==e;s|=wne,r.set(t,e);var u=iO(a(t),a(e),s,i,o,r);return r.delete(t),u;case Tne:if(P2)return P2.call(t)==P2.call(e)}return!1}var One=1,Dne=Object.prototype,Rne=Dne.hasOwnProperty;function Vne(t,e,n,s,i,o){var r=n&One,a=G3(t),l=a.length,c=G3(e),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in e:Rne.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 b=r;++d<l;){h=a[d];var y=t[h],C=e[h];if(s)var k=r?s(C,y,h,e,t,o):s(y,C,h,t,e,o);if(!(k===void 0?y===C||i(y,C,n,s,o):k)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var x=t.constructor,S=e.constructor;x!=S&&"constructor"in t&&"constructor"in e&&!(typeof x=="function"&&x instanceof x&&typeof S=="function"&&S instanceof S)&&(m=!1)}return o.delete(t),o.delete(e),m}var Fne=1,_7="[object Arguments]",y7="[object Array]",s0="[object Object]",Nne=Object.prototype,b7=Nne.hasOwnProperty;function Bne(t,e,n,s,i,o){var r=Si(t),a=Si(e),l=r?y7:ug(t),c=a?y7:ug(e);l=l==_7?s0:l,c=c==_7?s0:c;var u=l==s0,d=c==s0,h=l==c;if(h&&ag(t)){if(!ag(e))return!1;r=!0,u=!1}if(h&&!u)return o||(o=new Cr),r||Cx(t)?iO(t,e,n,s,i,o):Lne(t,e,l,n,s,i,o);if(!(n&Fne)){var f=u&&b7.call(t,"__wrapped__"),p=d&&b7.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,b=p?e.value():e;return o||(o=new Cr),i(m,b,n,s,o)}}return h?(o||(o=new Cr),Vne(t,e,n,s,i,o)):!1}function qy(t,e,n,s,i){return t===e?!0:t==null||e==null||!ua(t)&&!ua(e)?t!==t&&e!==e:Bne(t,e,n,s,qy,i)}var zne=1,Hne=2;function Une(t,e,n,s){var i=n.length,o=i,r=!s;if(t==null)return!o;for(t=Object(t);i--;){var a=n[i];if(r&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){a=n[i];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 Cr;if(s)var h=s(c,u,l,t,e,d);if(!(h===void 0?qy(u,c,zne|Hne,s,d):h))return!1}}return!0}function oO(t){return t===t&&!$i(t)}function jne(t){for(var e=Zg(t),n=e.length;n--;){var s=e[n],i=t[s];e[n]=[s,i,oO(i)]}return e}function rO(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function Wne(t){var e=jne(t);return e.length==1&&e[0][2]?rO(e[0][0],e[0][1]):function(n){return n===t||Une(n,t,e)}}function Yne(t,e){return t!=null&&e in Object(t)}function Gne(t,e,n){e=Gy(e,t);for(var s=-1,i=e.length,o=!1;++s<i;){var r=Qg(e[s]);if(!(o=t!=null&&n(t,r)))break;t=t[r]}return o||++s!=i?o:(i=t==null?0:t.length,!!i&&yx(i)&&jy(r,i)&&(Si(t)||rg(t)))}function aO(t,e){return t!=null&&Gne(t,e,Yne)}var qne=1,Xne=2;function Kne(t,e){return kx(t)&&oO(e)?rO(Qg(t),e):function(n){var s=No(n,t);return s===void 0&&s===e?aO(n,t):qy(e,s,qne|Xne)}}function Zne(t){return function(e){return e==null?void 0:e[t]}}function Jne(t){return function(e){return Sx(e,t)}}function Qne(t){return kx(t)?Zne(Qg(t)):Jne(t)}function lO(t){return typeof t=="function"?t:t==null?mx:typeof t=="object"?Si(t)?Kne(t[0],t[1]):Wne(t):Qne(t)}function ese(t){return function(e,n,s){for(var i=-1,o=Object(e),r=s(e),a=r.length;a--;){var l=r[t?a:++i];if(n(o[l],l,o)===!1)break}return e}}var tse=ese();const cO=tse;function nse(t,e){return t&&cO(t,e,Zg)}function sse(t,e){return function(n,s){if(n==null)return n;if(!Lf(n))return t(n,s);for(var i=n.length,o=e?i:-1,r=Object(n);(e?o--:++o<i)&&s(r[o],o,r)!==!1;);return n}}var ise=sse(nse);const ose=ise;var rse=function(){return Fr.Date.now()};const I2=rse;var ase="Expected a function",lse=Math.max,cse=Math.min;function pc(t,e,n){var s,i,o,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(ase);e=W3(e)||0,$i(n)&&(u=!!n.leading,d="maxWait"in n,o=d?lse(W3(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(E){var T=s,P=i;return s=i=void 0,c=E,r=t.apply(P,T),r}function p(E){return c=E,a=setTimeout(y,e),u?f(E):r}function m(E){var T=E-l,P=E-c,I=e-T;return d?cse(I,o-P):I}function b(E){var T=E-l,P=E-c;return l===void 0||T>=e||T<0||d&&P>=o}function y(){var E=I2();if(b(E))return C(E);a=setTimeout(y,m(E))}function C(E){return a=void 0,h&&s?f(E):(s=i=void 0,r)}function k(){a!==void 0&&clearTimeout(a),c=0,s=l=i=a=void 0}function x(){return a===void 0?r:C(I2())}function S(){var E=I2(),T=b(E);if(s=arguments,i=this,l=E,T){if(a===void 0)return p(l);if(d)return clearTimeout(a),a=setTimeout(y,e),f(l)}return a===void 0&&(a=setTimeout(y,e)),r}return S.cancel=k,S.flush=x,S}function Z3(t,e,n){(n!==void 0&&!Xg(t[e],n)||n===void 0&&!(e in t))&&vx(t,e,n)}function use(t){return ua(t)&&Lf(t)}function J3(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function dse(t){return Kg(t,Jg(t))}function hse(t,e,n,s,i,o,r){var a=J3(t,n),l=J3(e,n),c=r.get(l);if(c){Z3(t,n,c);return}var u=o?o(a,l,n+"",t,e,r):void 0,d=u===void 0;if(d){var h=Si(l),f=!h&&ag(l),p=!h&&!f&&Cx(l);u=l,h||f||p?Si(a)?u=a:use(a)?u=FL(a):f?(d=!1,u=XL(l,!0)):p?(d=!1,u=QL(l,!0)):u=[]:$ee(l)||rg(l)?(u=a,rg(a)?u=dse(a):(!$i(a)||gx(a))&&(u=eO(l))):d=!1}d&&(r.set(l,u),i(u,l,s,o,r),r.delete(l)),Z3(t,n,u)}function uO(t,e,n,s,i){t!==e&&cO(e,function(o,r){if(i||(i=new Cr),$i(o))hse(t,e,r,n,uO,s,i);else{var a=s?s(J3(t,r),o,r+"",t,e,i):void 0;a===void 0&&(a=o),Z3(t,r,a)}},Jg)}var fse=Math.max,pse=Math.min;function mse(t,e,n){var s=t==null?0:t.length;if(!s)return-1;var i=s-1;return n!==void 0&&(i=QZ(n),i=n<0?fse(s+i,0):pse(i,s-1)),PJ(t,lO(e),i,!0)}function gse(t,e){var n=-1,s=Lf(t)?Array(t.length):[];return ose(t,function(i,o,r){s[++n]=e(i,o,r)}),s}function vse(t,e){var n=Si(t)?RL:gse;return n(t,lO(e))}function _se(t,e){return Ax(vse(t,e),1)}function dg(t){for(var e=-1,n=t==null?0:t.length,s={};++e<n;){var i=t[e];s[i[0]]=i[1]}return s}function mc(t,e){return qy(t,e)}function xi(t){return t==null}function dO(t){return t===void 0}var yse=NJ(function(t,e,n){uO(t,e,n)});const bse=yse;function hO(t,e,n,s){if(!$i(t))return t;e=Gy(e,t);for(var i=-1,o=e.length,r=o-1,a=t;a!=null&&++i<o;){var l=Qg(e[i]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(i!=r){var u=a[l];c=s?s(u,l,a):void 0,c===void 0&&(c=$i(u)?u:jy(e[i+1])?[]:{})}_x(a,l,c),a=a[l]}return t}function wse(t,e,n){for(var s=-1,i=e.length,o={};++s<i;){var r=e[s],a=Sx(t,r);n(a,r)&&hO(o,Gy(r,t),a)}return o}function Cse(t,e){return wse(t,e,function(n,s){return aO(t,s)})}var kse=yee(function(t,e){return t==null?{}:Cse(t,e)});const fO=kse;function xse(t,e,n){return t==null?t:hO(t,e,n)}var Sse="Expected a function";function L2(t,e,n){var s=!0,i=!0;if(typeof t!="function")throw new TypeError(Sse);return $i(n)&&(s="leading"in n?!!n.leading:s,i="trailing"in n?!!n.trailing:i),pc(t,e,{leading:s,maxWait:e,trailing:i})}const js=t=>t===void 0,li=t=>typeof t=="boolean",xt=t=>typeof t=="number",pO=t=>!t&&t!==0||Le(t)&&t.length===0||Ct(t)&&!Object.keys(t).length,Yo=t=>typeof Element>"u"?!1:t instanceof Element,hg=t=>xi(t),$se=t=>nt(t)?!Number.isNaN(Number(t)):!1,Ase=t=>Ut?window.requestAnimationFrame(t):setTimeout(t,16),Mse=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),Wl=t=>Sc(t),E_=t=>Object.keys(t),Ese=t=>Object.entries(t),j0=(t,e,n)=>({get value(){return No(t,e,n)},set value(s){xse(t,e,s)}});class Tse extends Error{constructor(e){super(e),this.name="ElementPlusError"}}function sr(t,e){throw new Tse(`[${t}] ${e}`)}const mO=(t="")=>t.split(" ").filter(e=>!!e.trim()),mr=(t,e)=>{if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList.contains(e)},Wu=(t,e)=>{!t||!e.trim()||t.classList.add(...mO(e))},da=(t,e)=>{!t||!e.trim()||t.classList.remove(...mO(e))},Yl=(t,e)=>{var n;if(!Ut||!t||!e)return"";let s=Bn(e);s==="float"&&(s="cssFloat");try{const i=t.style[s];if(i)return i;const o=(n=document.defaultView)==null?void 0:n.getComputedStyle(t,"");return o?o[s]:""}catch{return t.style[s]}};function Ai(t,e="px"){if(!t)return"";if(xt(t)||$se(t))return`${t}${e}`;if(nt(t))return t}const Pse=(t,e)=>{if(!Ut)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(e)],s=Yl(t,n);return["scroll","auto","overlay"].some(i=>s.includes(i))},Ise=(t,e)=>{if(!Ut)return;let n=t;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(Pse(n,e))return n;n=n.parentNode}return n};let i0;const Lse=t=>{var e;if(!Ut)return 0;if(i0!==void 0)return i0;const n=document.createElement("div");n.className=`${t}-scrollbar__wrap`,n.style.visibility="hidden",n.style.width="100px",n.style.position="absolute",n.style.top="-9999px",document.body.appendChild(n);const s=n.offsetWidth;n.style.overflow="scroll";const i=document.createElement("div");i.style.width="100%",n.appendChild(i);const o=i.offsetWidth;return(e=n.parentNode)==null||e.removeChild(n),i0=s-o,i0};function Ose(t,e){if(!Ut)return;if(!e){t.scrollTop=0;return}const n=[];let s=e.offsetParent;for(;s!==null&&t!==s&&t.contains(s);)n.push(s),s=s.offsetParent;const i=e.offsetTop+n.reduce((l,c)=>l+c.offsetTop,0),o=i+e.offsetHeight,r=t.scrollTop,a=r+t.clientHeight;i<r?t.scrollTop=i:o>a&&(t.scrollTop=o-t.clientHeight)}/*! Element Plus Icons Vue v2.3.1 */var Dse=se({name:"ArrowDownBold",__name:"arrow-down-bold",setup(t){return(e,n)=>(v(),$("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"})]))}}),Rse=Dse,Vse=se({name:"ArrowDown",__name:"arrow-down",setup(t){return(e,n)=>(v(),$("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"})]))}}),ud=Vse,Fse=se({name:"ArrowLeftBold",__name:"arrow-left-bold",setup(t){return(e,n)=>(v(),$("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"})]))}}),Nse=Fse,Bse=se({name:"ArrowLeft",__name:"arrow-left",setup(t){return(e,n)=>(v(),$("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"})]))}}),Yu=Bse,zse=se({name:"ArrowRight",__name:"arrow-right",setup(t){return(e,n)=>(v(),$("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"})]))}}),kr=zse,Hse=se({name:"ArrowUp",__name:"arrow-up",setup(t){return(e,n)=>(v(),$("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"})]))}}),Xy=Hse,Use=se({name:"Avatar",__name:"avatar",setup(t){return(e,n)=>(v(),$("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"})]))}}),jse=Use,Wse=se({name:"Back",__name:"back",setup(t){return(e,n)=>(v(),$("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"})]))}}),gO=Wse,Yse=se({name:"Bell",__name:"bell",setup(t){return(e,n)=>(v(),$("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"})]))}}),Gse=Yse,qse=se({name:"Bottom",__name:"bottom",setup(t){return(e,n)=>(v(),$("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"})]))}}),Xse=qse,Kse=se({name:"Calendar",__name:"calendar",setup(t){return(e,n)=>(v(),$("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"})]))}}),Zse=Kse,Jse=se({name:"CameraFilled",__name:"camera-filled",setup(t){return(e,n)=>(v(),$("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"})]))}}),Qse=Jse,eie=se({name:"CaretBottom",__name:"caret-bottom",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"m192 384 320 384 320-384z"})]))}}),tie=eie,nie=se({name:"ChatDotRound",__name:"chat-dot-round",setup(t){return(e,n)=>(v(),$("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"})]))}}),sie=nie,iie=se({name:"ChatDotSquare",__name:"chat-dot-square",setup(t){return(e,n)=>(v(),$("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"})]))}}),oie=iie,rie=se({name:"Check",__name:"check",setup(t){return(e,n)=>(v(),$("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"})]))}}),Px=rie,aie=se({name:"CircleCheck",__name:"circle-check",setup(t){return(e,n)=>(v(),$("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.752l265.344-265.408z"})]))}}),Ix=aie,lie=se({name:"CircleCloseFilled",__name:"circle-close-filled",setup(t){return(e,n)=>(v(),$("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"})]))}}),vO=lie,cie=se({name:"CircleClose",__name:"circle-close",setup(t){return(e,n)=>(v(),$("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"})]))}}),Of=cie,uie=se({name:"Clock",__name:"clock",setup(t){return(e,n)=>(v(),$("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"})]))}}),_O=uie,die=se({name:"CloseBold",__name:"close-bold",setup(t){return(e,n)=>(v(),$("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"})]))}}),Lx=die,hie=se({name:"Close",__name:"close",setup(t){return(e,n)=>(v(),$("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"})]))}}),Ir=hie,fie=se({name:"Comment",__name:"comment",setup(t){return(e,n)=>(v(),$("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"})]))}}),pie=fie,mie=se({name:"CopyDocument",__name:"copy-document",setup(t){return(e,n)=>(v(),$("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"})]))}}),yO=mie,gie=se({name:"DArrowLeft",__name:"d-arrow-left",setup(t){return(e,n)=>(v(),$("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.592 30.592 0 0 1 0 42.688L259.264 511.936l311.872 319.936a30.592 30.592 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.672l331.648-340.224zm256 0a29.12 29.12 0 0 1 41.728 0 30.592 30.592 0 0 1 0 42.688L515.264 511.936l311.872 319.936a30.592 30.592 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.672l331.648-340.224z"})]))}}),gc=gie,vie=se({name:"DArrowRight",__name:"d-arrow-right",setup(t){return(e,n)=>(v(),$("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.592 30.592 0 0 1 0-42.752L764.736 512 452.864 192a30.592 30.592 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.592 30.592 0 0 1 0-42.752L508.736 512 196.864 192a30.592 30.592 0 0 1 0-42.688z"})]))}}),vc=vie,_ie=se({name:"DeleteFilled",__name:"delete-filled",setup(t){return(e,n)=>(v(),$("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"})]))}}),yie=_ie,bie=se({name:"Delete",__name:"delete",setup(t){return(e,n)=>(v(),$("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"})]))}}),bO=bie,wie=se({name:"Document",__name:"document",setup(t){return(e,n)=>(v(),$("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"})]))}}),e1=wie,Cie=se({name:"Download",__name:"download",setup(t){return(e,n)=>(v(),$("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"})]))}}),kie=Cie,xie=se({name:"EditPen",__name:"edit-pen",setup(t){return(e,n)=>(v(),$("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"})]))}}),Sie=xie,$ie=se({name:"Edit",__name:"edit",setup(t){return(e,n)=>(v(),$("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"})]))}}),wO=$ie,Aie=se({name:"Expand",__name:"expand",setup(t){return(e,n)=>(v(),$("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"})]))}}),Mie=Aie,Eie=se({name:"FullScreen",__name:"full-screen",setup(t){return(e,n)=>(v(),$("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"})]))}}),CO=Eie,Tie=se({name:"Guide",__name:"guide",setup(t){return(e,n)=>(v(),$("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"})]))}}),Pie=Tie,Iie=se({name:"Hide",__name:"hide",setup(t){return(e,n)=>(v(),$("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"})]))}}),kO=Iie,Lie=se({name:"Histogram",__name:"histogram",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M416 896V128h192v768zm-288 0V448h192v448zm576 0V320h192v576z"})]))}}),Oie=Lie,Die=se({name:"HomeFilled",__name:"home-filled",setup(t){return(e,n)=>(v(),$("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"})]))}}),Rie=Die,Vie=se({name:"InfoFilled",__name:"info-filled",setup(t){return(e,n)=>(v(),$("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"})]))}}),$c=Vie,Fie=se({name:"Iphone",__name:"iphone",setup(t){return(e,n)=>(v(),$("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"})]))}}),Nie=Fie,Bie=se({name:"Link",__name:"link",setup(t){return(e,n)=>(v(),$("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"})]))}}),xO=Bie,zie=se({name:"Loading",__name:"loading",setup(t){return(e,n)=>(v(),$("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.248zm452.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.248zM828.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 0z"})]))}}),rf=zie,Hie=se({name:"Lock",__name:"lock",setup(t){return(e,n)=>(v(),$("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"})]))}}),Uie=Hie,jie=se({name:"Memo",__name:"memo",setup(t){return(e,n)=>(v(),$("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"})]))}}),Wie=jie,Yie=se({name:"Message",__name:"message",setup(t){return(e,n)=>(v(),$("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"})]))}}),Gie=Yie,qie=se({name:"Minus",__name:"minus",setup(t){return(e,n)=>(v(),$("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"})]))}}),Xie=qie,Kie=se({name:"Money",__name:"money",setup(t){return(e,n)=>(v(),$("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"})]))}}),Zie=Kie,Jie=se({name:"MoreFilled",__name:"more-filled",setup(t){return(e,n)=>(v(),$("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"})]))}}),Q3=Jie,Qie=se({name:"More",__name:"more",setup(t){return(e,n)=>(v(),$("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"})]))}}),eoe=Qie,toe=se({name:"Notebook",__name:"notebook",setup(t){return(e,n)=>(v(),$("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"})]))}}),noe=toe,soe=se({name:"Operation",__name:"operation",setup(t){return(e,n)=>(v(),$("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"})]))}}),ioe=soe,ooe=se({name:"PictureFilled",__name:"picture-filled",setup(t){return(e,n)=>(v(),$("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"})]))}}),roe=ooe,aoe=se({name:"Picture",__name:"picture",setup(t){return(e,n)=>(v(),$("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"})]))}}),loe=aoe,coe=se({name:"Plus",__name:"plus",setup(t){return(e,n)=>(v(),$("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"})]))}}),Ox=coe,uoe=se({name:"Postcard",__name:"postcard",setup(t){return(e,n)=>(v(),$("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"})]))}}),doe=uoe,hoe=se({name:"Reading",__name:"reading",setup(t){return(e,n)=>(v(),$("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"})]))}}),foe=hoe,poe=se({name:"RefreshLeft",__name:"refresh-left",setup(t){return(e,n)=>(v(),$("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"})]))}}),SO=poe,moe=se({name:"RefreshRight",__name:"refresh-right",setup(t){return(e,n)=>(v(),$("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.88z"})]))}}),goe=moe,voe=se({name:"ScaleToOriginal",__name:"scale-to-original",setup(t){return(e,n)=>(v(),$("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.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 0 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118zm-361.412 0a30.118 30.118 0 0 0-30.118 30.118v301.177a30.118 30.118 0 1 0 60.236 0V331.294a30.118 30.118 0 0 0-30.118-30.118M512 361.412a30.118 30.118 0 0 0-30.118 30.117v30.118a30.118 30.118 0 0 0 60.236 0V391.53A30.118 30.118 0 0 0 512 361.412M512 512a30.118 30.118 0 0 0-30.118 30.118v30.117a30.118 30.118 0 0 0 60.236 0v-30.117A30.118 30.118 0 0 0 512 512"})]))}}),_oe=voe,yoe=se({name:"Search",__name:"search",setup(t){return(e,n)=>(v(),$("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"})]))}}),Dx=yoe,boe=se({name:"SuccessFilled",__name:"success-filled",setup(t){return(e,n)=>(v(),$("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"})]))}}),Rx=boe,woe=se({name:"SwitchButton",__name:"switch-button",setup(t){return(e,n)=>(v(),$("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[g("path",{fill:"currentColor",d:"M352 159.872V230.4a352 352 0 1 0 320 0v-70.528A416.128 416.128 0 0 1 512 960a416 416 0 0 1-160-800.128z"}),g("path",{fill:"currentColor",d:"M512 64q32 0 32 32v320q0 32-32 32t-32-32V96q0-32 32-32"})]))}}),Coe=woe,koe=se({name:"Tickets",__name:"tickets",setup(t){return(e,n)=>(v(),$("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"})]))}}),xoe=koe,Soe=se({name:"Timer",__name:"timer",setup(t){return(e,n)=>(v(),$("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"})]))}}),$oe=Soe,Aoe=se({name:"Top",__name:"top",setup(t){return(e,n)=>(v(),$("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"})]))}}),Moe=Aoe,Eoe=se({name:"UploadFilled",__name:"upload-filled",setup(t){return(e,n)=>(v(),$("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"})]))}}),Vx=Eoe,Toe=se({name:"View",__name:"view",setup(t){return(e,n)=>(v(),$("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"})]))}}),$O=Toe,Poe=se({name:"WarningFilled",__name:"warning-filled",setup(t){return(e,n)=>(v(),$("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.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 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"})]))}}),Fx=Poe,Ioe=se({name:"ZoomIn",__name:"zoom-in",setup(t){return(e,n)=>(v(),$("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"})]))}}),AO=Ioe,Loe=se({name:"ZoomOut",__name:"zoom-out",setup(t){return(e,n)=>(v(),$("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"})]))}}),Ooe=Loe;const MO="__epPropKey",xe=t=>t,Doe=t=>Ct(t)&&!!t[MO],Ky=(t,e)=>{if(!Ct(t)||Doe(t))return t;const{values:n,required:s,default:i,type:o,validator:r}=t,l={type:o,required:!!s,validator:n||r?c=>{let u=!1,d=[];if(n&&(d=Array.from(n),Rt(t,"default")&&d.push(i),u||(u=d.includes(c))),r&&(u||(u=r(c))),!u&&d.length>0){const h=[...new Set(d)].map(f=>JSON.stringify(f)).join(", ");oI(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${h}], got value ${JSON.stringify(c)}.`)}return u}:void 0,[MO]:!0};return Rt(t,"default")&&(l.default=i),l},Ze=t=>dg(Object.entries(t).map(([e,n])=>[e,Ky(n,e)])),ms=xe([String,Object,Function]),EO={Close:Ir},TO={Close:Ir,SuccessFilled:Rx,InfoFilled:$c,WarningFilled:Fx,CircleCloseFilled:vO},af={success:Rx,warning:Fx,error:vO,info:$c},PO={validating:rf,success:Ix,error:Of},jt=(t,e)=>{if(t.install=n=>{for(const s of[t,...Object.values(e??{})])n.component(s.name,s)},e)for(const[n,s]of Object.entries(e))t[n]=s;return t},Roe=(t,e)=>(t.install=n=>{t._context=n._context,n.config.globalProperties[e]=t},t),Voe=(t,e)=>(t.install=n=>{n.directive(e,t)},t),xs=t=>(t.install=Vt,t),Nx=(...t)=>e=>{t.forEach(n=>{ot(n)?n(e):n.value=e})},ft={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"},Foe=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],mn="update:modelValue",Lr="change",Au="input",Ac=["","default","small","large"],IO=t=>["",...Ac].includes(t);var W0=(t=>(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))(W0||{});const Y0=t=>{const e=Le(t)?t:[t],n=[];return e.forEach(s=>{var i;Le(s)?n.push(...Y0(s)):Gs(s)&&Le(s.children)?n.push(...Y0(s.children)):(n.push(s),Gs(s)&&((i=s.component)!=null&&i.subTree)&&n.push(...Y0(s.component.subTree)))}),n},lo=t=>!t&&t!==0?[]:Array.isArray(t)?t:[t],Noe=t=>/([\uAC00-\uD7AF\u3130-\u318F])+/gi.test(t),si=t=>t,Boe=["class","style"],zoe=/^on[A-Z]/,LO=(t={})=>{const{excludeListeners:e=!1,excludeKeys:n}=t,s=q(()=>((n==null?void 0:n.value)||[]).concat(Boe)),i=pt();return q(i?()=>{var o;return dg(Object.entries((o=i.proxy)==null?void 0:o.$attrs).filter(([r])=>!s.value.includes(r)&&!(e&&zoe.test(r))))}:()=>({}))},sc=({from:t,replacement:e,scope:n,version:s,ref:i,type:o="API"},r)=>{Te(()=>A(r),a=>{},{immediate:!0})},OO=(t,e,n,s)=>{let i={offsetX:0,offsetY:0};const o=c=>{const u=c.clientX,d=c.clientY,{offsetX:h,offsetY:f}=i,p=t.value.getBoundingClientRect(),m=p.left,b=p.top,y=p.width,C=p.height,k=document.documentElement.clientWidth,x=document.documentElement.clientHeight,S=-m+h,E=-b+f,T=k-m-y+h,P=x-b-C+f,I=V=>{let D=h+V.clientX-u,z=f+V.clientY-d;s!=null&&s.value||(D=Math.min(Math.max(D,S),T),z=Math.min(Math.max(z,E),P)),i={offsetX:D,offsetY:z},t.value&&(t.value.style.transform=`translate(${Ai(D)}, ${Ai(z)})`)},L=()=>{document.removeEventListener("mousemove",I),document.removeEventListener("mouseup",L)};document.addEventListener("mousemove",I),document.addEventListener("mouseup",L)},r=()=>{e.value&&t.value&&e.value.addEventListener("mousedown",o)},a=()=>{e.value&&t.value&&e.value.removeEventListener("mousedown",o)},l=()=>{i={offsetX:0,offsetY:0},t.value&&(t.value.style.transform="none")};return Pt(()=>{br(()=>{n.value?r():a()})}),Gn(()=>{a()}),{resetPosition:l}};var Hoe={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"},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",week:"week",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"},tour:{next:"Next",previous:"Previous",finish:"Finish"},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 Uoe=t=>(e,n)=>joe(e,n,A(t)),joe=(t,e,n)=>No(n,t,t).replace(/\{(\w+)\}/g,(s,i)=>{var o;return`${(o=e==null?void 0:e[i])!=null?o:`{${i}}`}`}),Woe=t=>({lang:q(()=>A(t).name),locale:hn(t)?t:J(t),t:Uoe(t)}),DO=Symbol("localeContextKey"),fn=t=>{const e=t||qe(DO,J());return Woe(q(()=>e.value||Hoe))},gm="el",Yoe="is-",zc=(t,e,n,s,i)=>{let o=`${t}-${e}`;return n&&(o+=`-${n}`),s&&(o+=`__${s}`),i&&(o+=`--${i}`),o},RO=Symbol("namespaceContextKey"),Bx=t=>{const e=t||(pt()?qe(RO,J(gm)):J(gm));return q(()=>A(e)||gm)},He=(t,e)=>{const n=Bx(e);return{namespace:n,b:(m="")=>zc(n.value,t,m,"",""),e:m=>m?zc(n.value,t,"",m,""):"",m:m=>m?zc(n.value,t,"","",m):"",be:(m,b)=>m&&b?zc(n.value,t,m,b,""):"",em:(m,b)=>m&&b?zc(n.value,t,"",m,b):"",bm:(m,b)=>m&&b?zc(n.value,t,m,"",b):"",bem:(m,b,y)=>m&&b&&y?zc(n.value,t,m,b,y):"",is:(m,...b)=>{const y=b.length>=1?b[0]:!0;return m&&y?`${Yoe}${m}`:""},cssVar:m=>{const b={};for(const y in m)m[y]&&(b[`--${n.value}-${y}`]=m[y]);return b},cssVarName:m=>`--${n.value}-${m}`,cssVarBlock:m=>{const b={};for(const y in m)m[y]&&(b[`--${n.value}-${t}-${y}`]=m[y]);return b},cssVarBlockName:m=>`--${n.value}-${t}-${m}`}},VO=(t,e={})=>{hn(t)||sr("[useLockscreen]","You need to pass a ref param to this function");const n=e.ns||He("popup"),s=q(()=>n.bm("parent","hidden"));if(!Ut||mr(document.body,s.value))return;let i=0,o=!1,r="0";const a=()=>{setTimeout(()=>{da(document==null?void 0:document.body,s.value),o&&document&&(document.body.style.width=r)},200)};Te(t,l=>{if(!l){a();return}o=!mr(document.body,s.value),o&&(r=document.body.style.width),i=Lse(n.namespace.value);const c=document.documentElement.clientHeight<document.body.scrollHeight,u=Yl(document.body,"overflowY");i>0&&(c||u==="scroll")&&o&&(document.body.style.width=`calc(100% - ${i}px)`),Wu(document.body,s.value)}),$y(()=>a())},Goe=Ky({type:xe(Boolean),default:null}),qoe=Ky({type:xe(Function)}),FO=t=>{const e=`update:${t}`,n=`onUpdate:${t}`,s=[e],i={[t]:Goe,[n]:qoe};return{useModelToggle:({indicator:r,toggleReason:a,shouldHideWhenRouteChanges:l,shouldProceed:c,onShow:u,onHide:d})=>{const h=pt(),{emit:f}=h,p=h.props,m=q(()=>ot(p[n])),b=q(()=>p[t]===null),y=T=>{r.value!==!0&&(r.value=!0,a&&(a.value=T),ot(u)&&u(T))},C=T=>{r.value!==!1&&(r.value=!1,a&&(a.value=T),ot(d)&&d(T))},k=T=>{if(p.disabled===!0||ot(c)&&!c())return;const P=m.value&&Ut;P&&f(e,!0),(b.value||!P)&&y(T)},x=T=>{if(p.disabled===!0||!Ut)return;const P=m.value&&Ut;P&&f(e,!1),(b.value||!P)&&C(T)},S=T=>{li(T)&&(p.disabled&&T?m.value&&f(e,!1):r.value!==T&&(T?y():C()))},E=()=>{r.value?x():k()};return Te(()=>p[t],S),l&&h.appContext.config.globalProperties.$route!==void 0&&Te(()=>({...h.proxy.$route}),()=>{l.value&&r.value&&x()}),Pt(()=>{S(p[t])}),{hide:x,show:k,toggle:E,hasUpdateHandler:m}},useModelToggleProps:i,useModelToggleEmits:s}};FO("modelValue");const NO=t=>{const e=pt();return q(()=>{var n,s;return(s=(n=e==null?void 0:e.proxy)==null?void 0:n.$props)==null?void 0:s[t]})};var Yi="top",Qo="bottom",er="right",Gi="left",zx="auto",t1=[Yi,Qo,er,Gi],lf="start",fg="end",Xoe="clippingParents",BO="viewport",pp="popper",Koe="reference",w7=t1.reduce(function(t,e){return t.concat([e+"-"+lf,e+"-"+fg])},[]),Zy=[].concat(t1,[zx]).reduce(function(t,e){return t.concat([e,e+"-"+lf,e+"-"+fg])},[]),Zoe="beforeRead",Joe="read",Qoe="afterRead",ere="beforeMain",tre="main",nre="afterMain",sre="beforeWrite",ire="write",ore="afterWrite",rre=[Zoe,Joe,Qoe,ere,tre,nre,sre,ire,ore];function ha(t){return t?(t.nodeName||"").toLowerCase():null}function Nr(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function cf(t){var e=Nr(t).Element;return t instanceof e||t instanceof Element}function Go(t){var e=Nr(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Hx(t){if(typeof ShadowRoot>"u")return!1;var e=Nr(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function are(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var s=e.styles[n]||{},i=e.attributes[n]||{},o=e.elements[n];!Go(o)||!ha(o)||(Object.assign(o.style,s),Object.keys(i).forEach(function(r){var a=i[r];a===!1?o.removeAttribute(r):o.setAttribute(r,a===!0?"":a)}))})}function lre(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(s){var i=e.elements[s],o=e.attributes[s]||{},r=Object.keys(e.styles.hasOwnProperty(s)?e.styles[s]:n[s]),a=r.reduce(function(l,c){return l[c]="",l},{});!Go(i)||!ha(i)||(Object.assign(i.style,a),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}var zO={name:"applyStyles",enabled:!0,phase:"write",fn:are,effect:lre,requires:["computeStyles"]};function aa(t){return t.split("-")[0]}var Mu=Math.max,T_=Math.min,uf=Math.round;function df(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),s=1,i=1;if(Go(t)&&e){var o=t.offsetHeight,r=t.offsetWidth;r>0&&(s=uf(n.width)/r||1),o>0&&(i=uf(n.height)/o||1)}return{width:n.width/s,height:n.height/i,top:n.top/i,right:n.right/s,bottom:n.bottom/i,left:n.left/s,x:n.left/s,y:n.top/i}}function Ux(t){var e=df(t),n=t.offsetWidth,s=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-s)<=1&&(s=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:s}}function HO(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Hx(n)){var s=e;do{if(s&&t.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function ol(t){return Nr(t).getComputedStyle(t)}function cre(t){return["table","td","th"].indexOf(ha(t))>=0}function Mc(t){return((cf(t)?t.ownerDocument:t.document)||window.document).documentElement}function Jy(t){return ha(t)==="html"?t:t.assignedSlot||t.parentNode||(Hx(t)?t.host:null)||Mc(t)}function C7(t){return!Go(t)||ol(t).position==="fixed"?null:t.offsetParent}function ure(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Go(t)){var s=ol(t);if(s.position==="fixed")return null}var i=Jy(t);for(Hx(i)&&(i=i.host);Go(i)&&["html","body"].indexOf(ha(i))<0;){var o=ol(i);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 i;i=i.parentNode}return null}function n1(t){for(var e=Nr(t),n=C7(t);n&&cre(n)&&ol(n).position==="static";)n=C7(n);return n&&(ha(n)==="html"||ha(n)==="body"&&ol(n).position==="static")?e:n||ure(t)||e}function jx(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function vm(t,e,n){return Mu(t,T_(e,n))}function dre(t,e,n){var s=vm(t,e,n);return s>n?n:s}function UO(){return{top:0,right:0,bottom:0,left:0}}function jO(t){return Object.assign({},UO(),t)}function WO(t,e){return e.reduce(function(n,s){return n[s]=t,n},{})}var hre=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,jO(typeof t!="number"?t:WO(t,t1))};function fre(t){var e,n=t.state,s=t.name,i=t.options,o=n.elements.arrow,r=n.modifiersData.popperOffsets,a=aa(n.placement),l=jx(a),c=[Gi,er].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!r)){var d=hre(i.padding,n),h=Ux(o),f=l==="y"?Yi:Gi,p=l==="y"?Qo:er,m=n.rects.reference[u]+n.rects.reference[l]-r[l]-n.rects.popper[u],b=r[l]-n.rects.reference[l],y=n1(o),C=y?l==="y"?y.clientHeight||0:y.clientWidth||0:0,k=m/2-b/2,x=d[f],S=C-h[u]-d[p],E=C/2-h[u]/2+k,T=vm(x,E,S),P=l;n.modifiersData[s]=(e={},e[P]=T,e.centerOffset=T-E,e)}}function pre(t){var e=t.state,n=t.options,s=n.element,i=s===void 0?"[data-popper-arrow]":s;i!=null&&(typeof i=="string"&&(i=e.elements.popper.querySelector(i),!i)||!HO(e.elements.popper,i)||(e.elements.arrow=i))}var mre={name:"arrow",enabled:!0,phase:"main",fn:fre,effect:pre,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function hf(t){return t.split("-")[1]}var gre={top:"auto",right:"auto",bottom:"auto",left:"auto"};function vre(t){var e=t.x,n=t.y,s=window,i=s.devicePixelRatio||1;return{x:uf(e*i)/i||0,y:uf(n*i)/i||0}}function k7(t){var e,n=t.popper,s=t.popperRect,i=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,b=typeof u=="function"?u({x:f,y:m}):{x:f,y:m};f=b.x,m=b.y;var y=r.hasOwnProperty("x"),C=r.hasOwnProperty("y"),k=Gi,x=Yi,S=window;if(c){var E=n1(n),T="clientHeight",P="clientWidth";if(E===Nr(n)&&(E=Mc(n),ol(E).position!=="static"&&a==="absolute"&&(T="scrollHeight",P="scrollWidth")),E=E,i===Yi||(i===Gi||i===er)&&o===fg){x=Qo;var I=d&&E===S&&S.visualViewport?S.visualViewport.height:E[T];m-=I-s.height,m*=l?1:-1}if(i===Gi||(i===Yi||i===Qo)&&o===fg){k=er;var L=d&&E===S&&S.visualViewport?S.visualViewport.width:E[P];f-=L-s.width,f*=l?1:-1}}var V=Object.assign({position:a},c&&gre),D=u===!0?vre({x:f,y:m}):{x:f,y:m};if(f=D.x,m=D.y,l){var z;return Object.assign({},V,(z={},z[x]=C?"0":"",z[k]=y?"0":"",z.transform=(S.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",z))}return Object.assign({},V,(e={},e[x]=C?m+"px":"",e[k]=y?f+"px":"",e.transform="",e))}function _re(t){var e=t.state,n=t.options,s=n.gpuAcceleration,i=s===void 0?!0:s,o=n.adaptive,r=o===void 0?!0:o,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:aa(e.placement),variation:hf(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:e.options.strategy==="fixed"};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,k7(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,k7(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 YO={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:_re,data:{}},o0={passive:!0};function yre(t){var e=t.state,n=t.instance,s=t.options,i=s.scroll,o=i===void 0?!0:i,r=s.resize,a=r===void 0?!0:r,l=Nr(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,o0)}),a&&l.addEventListener("resize",n.update,o0),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,o0)}),a&&l.removeEventListener("resize",n.update,o0)}}var GO={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:yre,data:{}},bre={left:"right",right:"left",bottom:"top",top:"bottom"};function G0(t){return t.replace(/left|right|bottom|top/g,function(e){return bre[e]})}var wre={start:"end",end:"start"};function x7(t){return t.replace(/start|end/g,function(e){return wre[e]})}function Wx(t){var e=Nr(t),n=e.pageXOffset,s=e.pageYOffset;return{scrollLeft:n,scrollTop:s}}function Yx(t){return df(Mc(t)).left+Wx(t).scrollLeft}function Cre(t){var e=Nr(t),n=Mc(t),s=e.visualViewport,i=n.clientWidth,o=n.clientHeight,r=0,a=0;return s&&(i=s.width,o=s.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(r=s.offsetLeft,a=s.offsetTop)),{width:i,height:o,x:r+Yx(t),y:a}}function kre(t){var e,n=Mc(t),s=Wx(t),i=(e=t.ownerDocument)==null?void 0:e.body,o=Mu(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),r=Mu(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-s.scrollLeft+Yx(t),l=-s.scrollTop;return ol(i||n).direction==="rtl"&&(a+=Mu(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function Gx(t){var e=ol(t),n=e.overflow,s=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+s)}function qO(t){return["html","body","#document"].indexOf(ha(t))>=0?t.ownerDocument.body:Go(t)&&Gx(t)?t:qO(Jy(t))}function _m(t,e){var n;e===void 0&&(e=[]);var s=qO(t),i=s===((n=t.ownerDocument)==null?void 0:n.body),o=Nr(s),r=i?[o].concat(o.visualViewport||[],Gx(s)?s:[]):s,a=e.concat(r);return i?a:a.concat(_m(Jy(r)))}function e6(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function xre(t){var e=df(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 S7(t,e){return e===BO?e6(Cre(t)):cf(e)?xre(e):e6(kre(Mc(t)))}function Sre(t){var e=_m(Jy(t)),n=["absolute","fixed"].indexOf(ol(t).position)>=0,s=n&&Go(t)?n1(t):t;return cf(s)?e.filter(function(i){return cf(i)&&HO(i,s)&&ha(i)!=="body"}):[]}function $re(t,e,n){var s=e==="clippingParents"?Sre(t):[].concat(e),i=[].concat(s,[n]),o=i[0],r=i.reduce(function(a,l){var c=S7(t,l);return a.top=Mu(c.top,a.top),a.right=T_(c.right,a.right),a.bottom=T_(c.bottom,a.bottom),a.left=Mu(c.left,a.left),a},S7(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 XO(t){var e=t.reference,n=t.element,s=t.placement,i=s?aa(s):null,o=s?hf(s):null,r=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(i){case Yi:l={x:r,y:e.y-n.height};break;case Qo:l={x:r,y:e.y+e.height};break;case er:l={x:e.x+e.width,y:a};break;case Gi:l={x:e.x-n.width,y:a};break;default:l={x:e.x,y:e.y}}var c=i?jx(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case lf:l[c]=l[c]-(e[u]/2-n[u]/2);break;case fg:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function pg(t,e){e===void 0&&(e={});var n=e,s=n.placement,i=s===void 0?t.placement:s,o=n.boundary,r=o===void 0?Xoe:o,a=n.rootBoundary,l=a===void 0?BO:a,c=n.elementContext,u=c===void 0?pp:c,d=n.altBoundary,h=d===void 0?!1:d,f=n.padding,p=f===void 0?0:f,m=jO(typeof p!="number"?p:WO(p,t1)),b=u===pp?Koe:pp,y=t.rects.popper,C=t.elements[h?b:u],k=$re(cf(C)?C:C.contextElement||Mc(t.elements.popper),r,l),x=df(t.elements.reference),S=XO({reference:x,element:y,strategy:"absolute",placement:i}),E=e6(Object.assign({},y,S)),T=u===pp?E:x,P={top:k.top-T.top+m.top,bottom:T.bottom-k.bottom+m.bottom,left:k.left-T.left+m.left,right:T.right-k.right+m.right},I=t.modifiersData.offset;if(u===pp&&I){var L=I[i];Object.keys(P).forEach(function(V){var D=[er,Qo].indexOf(V)>=0?1:-1,z=[Yi,Qo].indexOf(V)>=0?"y":"x";P[V]+=L[z]*D})}return P}function Are(t,e){e===void 0&&(e={});var n=e,s=n.placement,i=n.boundary,o=n.rootBoundary,r=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Zy:l,u=hf(s),d=u?a?w7:w7.filter(function(p){return hf(p)===u}):t1,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:i,rootBoundary:o,padding:r})[aa(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}function Mre(t){if(aa(t)===zx)return[];var e=G0(t);return[x7(t),e,x7(e)]}function Ere(t){var e=t.state,n=t.options,s=t.name;if(!e.modifiersData[s]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,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,b=e.options.placement,y=aa(b),C=y===b,k=l||(C||!p?[G0(b)]:Mre(b)),x=[b].concat(k).reduce(function(me,Se){return me.concat(aa(Se)===zx?Are(e,{placement:Se,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):Se)},[]),S=e.rects.reference,E=e.rects.popper,T=new Map,P=!0,I=x[0],L=0;L<x.length;L++){var V=x[L],D=aa(V),z=hf(V)===lf,Y=[Yi,Qo].indexOf(D)>=0,B=Y?"width":"height",U=pg(e,{placement:V,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),X=Y?z?er:Gi:z?Qo:Yi;S[B]>E[B]&&(X=G0(X));var K=G0(X),N=[];if(o&&N.push(U[D]<=0),a&&N.push(U[X]<=0,U[K]<=0),N.every(function(me){return me})){I=V,P=!1;break}T.set(V,N)}if(P)for(var F=p?3:1,Q=function(me){var Se=x.find(function(we){var oe=T.get(we);if(oe)return oe.slice(0,me).every(function(ce){return ce})});if(Se)return I=Se,"break"},ie=F;ie>0;ie--){var Z=Q(ie);if(Z==="break")break}e.placement!==I&&(e.modifiersData[s]._skip=!0,e.placement=I,e.reset=!0)}}var Tre={name:"flip",enabled:!0,phase:"main",fn:Ere,requiresIfExists:["offset"],data:{_skip:!1}};function $7(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 A7(t){return[Yi,er,Qo,Gi].some(function(e){return t[e]>=0})}function Pre(t){var e=t.state,n=t.name,s=e.rects.reference,i=e.rects.popper,o=e.modifiersData.preventOverflow,r=pg(e,{elementContext:"reference"}),a=pg(e,{altBoundary:!0}),l=$7(r,s),c=$7(a,i,o),u=A7(l),d=A7(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 Ire={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Pre};function Lre(t,e,n){var s=aa(t),i=[Gi,Yi].indexOf(s)>=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)*i,[Gi,er].indexOf(s)>=0?{x:a,y:r}:{x:r,y:a}}function Ore(t){var e=t.state,n=t.options,s=t.name,i=n.offset,o=i===void 0?[0,0]:i,r=Zy.reduce(function(u,d){return u[d]=Lre(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[s]=r}var Dre={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Ore};function Rre(t){var e=t.state,n=t.name;e.modifiersData[n]=XO({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var KO={name:"popperOffsets",enabled:!0,phase:"read",fn:Rre,data:{}};function Vre(t){return t==="x"?"y":"x"}function Fre(t){var e=t.state,n=t.options,s=t.name,i=n.mainAxis,o=i===void 0?!0:i,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,b=pg(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),y=aa(e.placement),C=hf(e.placement),k=!C,x=jx(y),S=Vre(x),E=e.modifiersData.popperOffsets,T=e.rects.reference,P=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),V=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,D={x:0,y:0};if(E){if(o){var z,Y=x==="y"?Yi:Gi,B=x==="y"?Qo:er,U=x==="y"?"height":"width",X=E[x],K=X+b[Y],N=X-b[B],F=f?-P[U]/2:0,Q=C===lf?T[U]:P[U],ie=C===lf?-P[U]:-T[U],Z=e.elements.arrow,me=f&&Z?Ux(Z):{width:0,height:0},Se=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:UO(),we=Se[Y],oe=Se[B],ce=vm(0,T[U],me[U]),re=k?T[U]/2-F-ce-we-L.mainAxis:Q-ce-we-L.mainAxis,ge=k?-T[U]/2+F+ce+oe+L.mainAxis:ie+ce+oe+L.mainAxis,ze=e.elements.arrow&&n1(e.elements.arrow),st=ze?x==="y"?ze.clientTop||0:ze.clientLeft||0:0,ee=(z=V==null?void 0:V[x])!=null?z:0,ne=X+re-ee-st,pe=X+ge-ee,Ae=vm(f?T_(K,ne):K,X,f?Mu(N,pe):N);E[x]=Ae,D[x]=Ae-X}if(a){var Ce,Me=x==="x"?Yi:Gi,je=x==="x"?Qo:er,Fe=E[S],Ue=S==="y"?"height":"width",Oe=Fe+b[Me],ht=Fe-b[je],Ie=[Yi,Gi].indexOf(y)!==-1,_e=(Ce=V==null?void 0:V[S])!=null?Ce:0,le=Ie?Oe:Fe-T[Ue]-P[Ue]-_e+L.altAxis,ke=Ie?Fe+T[Ue]+P[Ue]-_e-L.altAxis:ht,Xe=f&&Ie?dre(le,Fe,ke):vm(f?le:Oe,Fe,f?ke:ht);E[S]=Xe,D[S]=Xe-Fe}e.modifiersData[s]=D}}var Nre={name:"preventOverflow",enabled:!0,phase:"main",fn:Fre,requiresIfExists:["offset"]};function Bre(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function zre(t){return t===Nr(t)||!Go(t)?Wx(t):Bre(t)}function Hre(t){var e=t.getBoundingClientRect(),n=uf(e.width)/t.offsetWidth||1,s=uf(e.height)/t.offsetHeight||1;return n!==1||s!==1}function Ure(t,e,n){n===void 0&&(n=!1);var s=Go(e),i=Go(e)&&Hre(e),o=Mc(e),r=df(t,i),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(s||!s&&!n)&&((ha(e)!=="body"||Gx(o))&&(a=zre(e)),Go(e)?(l=df(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=Yx(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function jre(t){var e=new Map,n=new Set,s=[];t.forEach(function(o){e.set(o.name,o)});function i(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&&i(l)}}),s.push(o)}return t.forEach(function(o){n.has(o.name)||i(o)}),s}function Wre(t){var e=jre(t);return rre.reduce(function(n,s){return n.concat(e.filter(function(i){return i.phase===s}))},[])}function Yre(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Gre(t){var e=t.reduce(function(n,s){var i=n[s.name];return n[s.name]=i?Object.assign({},i,s,{options:Object.assign({},i.options,s.options),data:Object.assign({},i.data,s.data)}):s,n},{});return Object.keys(e).map(function(n){return e[n]})}var M7={placement:"bottom",modifiers:[],strategy:"absolute"};function E7(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some(function(s){return!(s&&typeof s.getBoundingClientRect=="function")})}function qx(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,s=n===void 0?[]:n,i=e.defaultOptions,o=i===void 0?M7:i;return function(r,a,l){l===void 0&&(l=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},M7,o),modifiersData:{},elements:{reference:r,popper:a},attributes:{},styles:{}},u=[],d=!1,h={state:c,setOptions:function(m){var b=typeof m=="function"?m(c.options):m;p(),c.options=Object.assign({},o,c.options,b),c.scrollParents={reference:cf(r)?_m(r):r.contextElement?_m(r.contextElement):[],popper:_m(a)};var y=Wre(Gre([].concat(s,c.options.modifiers)));return c.orderedModifiers=y.filter(function(C){return C.enabled}),f(),h.update()},forceUpdate:function(){if(!d){var m=c.elements,b=m.reference,y=m.popper;if(E7(b,y)){c.rects={reference:Ure(b,n1(y),c.options.strategy==="fixed"),popper:Ux(y)},c.reset=!1,c.placement=c.options.placement,c.orderedModifiers.forEach(function(P){return c.modifiersData[P.name]=Object.assign({},P.data)});for(var C=0;C<c.orderedModifiers.length;C++){if(c.reset===!0){c.reset=!1,C=-1;continue}var k=c.orderedModifiers[C],x=k.fn,S=k.options,E=S===void 0?{}:S,T=k.name;typeof x=="function"&&(c=x({state:c,options:E,name:T,instance:h})||c)}}}},update:Yre(function(){return new Promise(function(m){h.forceUpdate(),m(c)})}),destroy:function(){p(),d=!0}};if(!E7(r,a))return h;h.setOptions(l).then(function(m){!d&&l.onFirstUpdate&&l.onFirstUpdate(m)});function f(){c.orderedModifiers.forEach(function(m){var b=m.name,y=m.options,C=y===void 0?{}:y,k=m.effect;if(typeof k=="function"){var x=k({state:c,name:b,instance:h,options:C}),S=function(){};u.push(x||S)}})}function p(){u.forEach(function(m){return m()}),u=[]}return h}}qx();var qre=[GO,KO,YO,zO];qx({defaultModifiers:qre});var Xre=[GO,KO,YO,zO,Dre,Tre,Nre,mre,Ire],Kre=qx({defaultModifiers:Xre});const Zre=(t,e,n={})=>{const s={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const c=Jre(l);Object.assign(r.value,c)},requires:["computeStyles"]},i=q(()=>{const{onFirstUpdate:l,placement:c,strategy:u,modifiers:d}=A(n);return{onFirstUpdate:l,placement:c||"bottom",strategy:u||"absolute",modifiers:[...d||[],s,{name:"applyStyles",enabled:!1}]}}),o=ss(),r=J({styles:{popper:{position:A(i).strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),a=()=>{o.value&&(o.value.destroy(),o.value=void 0)};return Te(i,l=>{const c=A(o);c&&c.setOptions(l)},{deep:!0}),Te([t,e],([l,c])=>{a(),!(!l||!c)&&(o.value=Kre(l,c,A(i)))}),Gn(()=>{a()}),{state:q(()=>{var l;return{...((l=A(o))==null?void 0:l.state)||{}}}),styles:q(()=>A(r).styles),attributes:q(()=>A(r).attributes),update:()=>{var l;return(l=A(o))==null?void 0:l.update()},forceUpdate:()=>{var l;return(l=A(o))==null?void 0:l.forceUpdate()},instanceRef:q(()=>A(o))}};function Jre(t){const e=Object.keys(t.elements),n=dg(e.map(i=>[i,t.styles[i]||{}])),s=dg(e.map(i=>[i,t.attributes[i]]));return{styles:n,attributes:s}}const Xx=t=>{if(!t)return{onClick:Vt,onMousedown:Vt,onMouseup:Vt};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}}},Qre=(t,e=0)=>{if(e===0)return t;const n=J(!1);let s=null;const i=()=>{s&&clearTimeout(s),s=setTimeout(()=>{n.value=t.value},e)};return Pt(i),Te(()=>t.value,o=>{o?i():n.value=o}),n};function T7(){let t;const e=(s,i)=>{n(),t=window.setTimeout(s,i)},n=()=>window.clearTimeout(t);return Gg(()=>n()),{registerTimeout:e,cancelTimeout:n}}const P7={prefix:Math.floor(Math.random()*1e4),current:0},eae=Symbol("elIdInjection"),Kx=()=>pt()?qe(eae,P7):P7,tr=t=>{const e=Kx(),n=Bx();return q(()=>A(t)||`${n.value}-id-${e.prefix}-${e.current++}`)};let Qd=[];const I7=t=>{const e=t;e.key===ft.esc&&Qd.forEach(n=>n(e))},tae=t=>{Pt(()=>{Qd.length===0&&document.addEventListener("keydown",I7),Ut&&Qd.push(t)}),Gn(()=>{Qd=Qd.filter(e=>e!==t),Qd.length===0&&Ut&&document.removeEventListener("keydown",I7)})};let L7;const ZO=()=>{const t=Bx(),e=Kx(),n=q(()=>`${t.value}-popper-container-${e.prefix}`),s=q(()=>`#${n.value}`);return{id:n,selector:s}},nae=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},sae=()=>{const{id:t,selector:e}=ZO();return rd(()=>{Ut&&(!L7||!document.body.querySelector(e.value))&&(L7=nae(t.value))}),{id:t,selector:e}},iae=Ze({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),oae=({showAfter:t,hideAfter:e,autoClose:n,open:s,close:i})=>{const{registerTimeout:o}=T7(),{registerTimeout:r,cancelTimeout:a}=T7();return{onOpen:u=>{o(()=>{s(u);const d=A(n);xt(d)&&d>0&&r(()=>{i(u)},d)},A(t))},onClose:u=>{a(),o(()=>{i(u)},A(e))}}},JO=Symbol("elForwardRef"),rae=t=>{It(JO,{setForwardRef:n=>{t.value=n}})},aae=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),O7={current:0},D7=J(0),QO=2e3,R7=Symbol("elZIndexContextKey"),eD=Symbol("zIndexContextKey"),Qy=t=>{const e=pt()?qe(R7,O7):O7,n=t||(pt()?qe(eD,void 0):void 0),s=q(()=>{const r=A(n);return xt(r)?r:QO}),i=q(()=>s.value+D7.value),o=()=>(e.current++,D7.value=e.current,i.value);return!Ut&&qe(R7),{initialZIndex:s,currentZIndex:i,nextZIndex:o}},V7=Math.min,ym=Math.max,P_=Math.round,_c=t=>({x:t,y:t}),lae={left:"right",right:"left",bottom:"top",top:"bottom"},cae={start:"end",end:"start"};function Zx(t,e){return typeof t=="function"?t(e):t}function ff(t){return t.split("-")[0]}function eb(t){return t.split("-")[1]}function uae(t){return t==="x"?"y":"x"}function tD(t){return t==="y"?"height":"width"}function mg(t){return["top","bottom"].includes(ff(t))?"y":"x"}function nD(t){return uae(mg(t))}function dae(t,e,n){n===void 0&&(n=!1);const s=eb(t),i=nD(t),o=tD(i);let r=i==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(r=I_(r)),[r,I_(r)]}function hae(t){const e=I_(t);return[t6(t),e,t6(e)]}function t6(t){return t.replace(/start|end/g,e=>cae[e])}function fae(t,e,n){const s=["left","right"],i=["right","left"],o=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:s:e?s:i;case"left":case"right":return e?o:r;default:return[]}}function pae(t,e,n,s){const i=eb(t);let o=fae(ff(t),n==="start",s);return i&&(o=o.map(r=>r+"-"+i),e&&(o=o.concat(o.map(t6)))),o}function I_(t){return t.replace(/left|right|bottom|top/g,e=>lae[e])}function mae(t){return{top:0,right:0,bottom:0,left:0,...t}}function gae(t){return typeof t!="number"?mae(t):{top:t,right:t,bottom:t,left:t}}function L_(t){const{x:e,y:n,width:s,height:i}=t;return{width:s,height:i,top:n,left:e,right:e+s,bottom:n+i,x:e,y:n}}function F7(t,e,n){let{reference:s,floating:i}=t;const o=mg(e),r=nD(e),a=tD(r),l=ff(e),c=o==="y",u=s.x+s.width/2-i.width/2,d=s.y+s.height/2-i.height/2,h=s[a]/2-i[a]/2;let f;switch(l){case"top":f={x:u,y:s.y-i.height};break;case"bottom":f={x:u,y:s.y+s.height};break;case"right":f={x:s.x+s.width,y:d};break;case"left":f={x:s.x-i.width,y:d};break;default:f={x:s.x,y:s.y}}switch(eb(e)){case"start":f[r]-=h*(n&&c?-1:1);break;case"end":f[r]+=h*(n&&c?-1:1);break}return f}const vae=async(t,e,n)=>{const{placement:s="bottom",strategy:i="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:i}),{x:u,y:d}=F7(c,s,l),h=s,f={},p=0;for(let m=0;m<a.length;m++){const{name:b,fn:y}=a[m],{x:C,y:k,data:x,reset:S}=await y({x:u,y:d,initialPlacement:s,placement:h,strategy:i,middlewareData:f,rects:c,platform:r,elements:{reference:t,floating:e}});u=C??u,d=k??d,f={...f,[b]:{...f[b],...x}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(c=S.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):S.rects),{x:u,y:d}=F7(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:i,middlewareData:f}};async function _ae(t,e){var n;e===void 0&&(e={});const{x:s,y:i,platform:o,rects:r,elements:a,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=Zx(e,t),p=gae(f),b=a[h?d==="floating"?"reference":"floating":d],y=L_(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(b)))==null||n?b:b.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),C=d==="floating"?{x:s,y:i,width:r.floating.width,height:r.floating.height}:r.reference,k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),x=await(o.isElement==null?void 0:o.isElement(k))?await(o.getScale==null?void 0:o.getScale(k))||{x:1,y:1}:{x:1,y:1},S=L_(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:C,offsetParent:k,strategy:l}):C);return{top:(y.top-S.top+p.top)/x.y,bottom:(S.bottom-y.bottom+p.bottom)/x.y,left:(y.left-S.left+p.left)/x.x,right:(S.right-y.right+p.right)/x.x}}const yae=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,s;const{placement:i,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,...b}=Zx(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const y=ff(i),C=mg(a),k=ff(a)===a,x=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=h||(k||!m?[I_(a)]:hae(a)),E=p!=="none";!h&&E&&S.push(...pae(a,m,p,x));const T=[a,...S],P=await _ae(e,b),I=[];let L=((s=o.flip)==null?void 0:s.overflows)||[];if(u&&I.push(P[y]),d){const Y=dae(i,r,x);I.push(P[Y[0]],P[Y[1]])}if(L=[...L,{placement:i,overflows:I}],!I.every(Y=>Y<=0)){var V,D;const Y=(((V=o.flip)==null?void 0:V.index)||0)+1,B=T[Y];if(B)return{data:{index:Y,overflows:L},reset:{placement:B}};let U=(D=L.filter(X=>X.overflows[0]<=0).sort((X,K)=>X.overflows[1]-K.overflows[1])[0])==null?void 0:D.placement;if(!U)switch(f){case"bestFit":{var z;const X=(z=L.filter(K=>{if(E){const N=mg(K.placement);return N===C||N==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(N=>N>0).reduce((N,F)=>N+F,0)]).sort((K,N)=>K[1]-N[1])[0])==null?void 0:z[0];X&&(U=X);break}case"initialPlacement":U=a;break}if(i!==U)return{reset:{placement:U}}}return{}}}};async function bae(t,e){const{placement:n,platform:s,elements:i}=t,o=await(s.isRTL==null?void 0:s.isRTL(i.floating)),r=ff(n),a=eb(n),l=mg(n)==="y",c=["left","top"].includes(r)?-1:1,u=o&&l?-1:1,d=Zx(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 wae=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,s;const{x:i,y:o,placement:r,middlewareData:a}=e,l=await bae(e,t);return r===((n=a.offset)==null?void 0:n.placement)&&(s=a.arrow)!=null&&s.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:r}}}}};function Df(t){return sD(t)?(t.nodeName||"").toLowerCase():"#document"}function mo(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ec(t){var e;return(e=(sD(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function sD(t){return t instanceof Node||t instanceof mo(t).Node}function Or(t){return t instanceof Element||t instanceof mo(t).Element}function fa(t){return t instanceof HTMLElement||t instanceof mo(t).HTMLElement}function N7(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof mo(t).ShadowRoot}function s1(t){const{overflow:e,overflowX:n,overflowY:s,display:i}=Dr(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+n)&&!["inline","contents"].includes(i)}function Cae(t){return["table","td","th"].includes(Df(t))}function tb(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Jx(t){const e=Qx(),n=Or(t)?Dr(t):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(s=>(n.willChange||"").includes(s))||["paint","layout","strict","content"].some(s=>(n.contain||"").includes(s))}function kae(t){let e=yc(t);for(;fa(e)&&!pf(e);){if(Jx(e))return e;if(tb(e))return null;e=yc(e)}return null}function Qx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function pf(t){return["html","body","#document"].includes(Df(t))}function Dr(t){return mo(t).getComputedStyle(t)}function nb(t){return Or(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function yc(t){if(Df(t)==="html")return t;const e=t.assignedSlot||t.parentNode||N7(t)&&t.host||Ec(t);return N7(e)?e.host:e}function iD(t){const e=yc(t);return pf(e)?t.ownerDocument?t.ownerDocument.body:t.body:fa(e)&&s1(e)?e:iD(e)}function n6(t,e,n){var s;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=iD(t),o=i===((s=t.ownerDocument)==null?void 0:s.body),r=mo(i);if(o){const a=s6(r);return e.concat(r,r.visualViewport||[],s1(i)?i:[],a&&n?n6(a):[])}return e.concat(i,n6(i,[],n))}function s6(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function oD(t){const e=Dr(t);let n=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const i=fa(t),o=i?t.offsetWidth:n,r=i?t.offsetHeight:s,a=P_(n)!==o||P_(s)!==r;return a&&(n=o,s=r),{width:n,height:s,$:a}}function rD(t){return Or(t)?t:t.contextElement}function Th(t){const e=rD(t);if(!fa(e))return _c(1);const n=e.getBoundingClientRect(),{width:s,height:i,$:o}=oD(e);let r=(o?P_(n.width):n.width)/s,a=(o?P_(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const xae=_c(0);function aD(t){const e=mo(t);return!Qx()||!e.visualViewport?xae:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Sae(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==mo(t)?!1:e}function gg(t,e,n,s){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=rD(t);let r=_c(1);e&&(s?Or(s)&&(r=Th(s)):r=Th(t));const a=Sae(o,n,s)?aD(o):_c(0);let l=(i.left+a.x)/r.x,c=(i.top+a.y)/r.y,u=i.width/r.x,d=i.height/r.y;if(o){const h=mo(o),f=s&&Or(s)?mo(s):s;let p=h,m=s6(p);for(;m&&s&&f!==p;){const b=Th(m),y=m.getBoundingClientRect(),C=Dr(m),k=y.left+(m.clientLeft+parseFloat(C.paddingLeft))*b.x,x=y.top+(m.clientTop+parseFloat(C.paddingTop))*b.y;l*=b.x,c*=b.y,u*=b.x,d*=b.y,l+=k,c+=x,p=mo(m),m=s6(p)}}return L_({width:u,height:d,x:l,y:c})}function $ae(t){let{elements:e,rect:n,offsetParent:s,strategy:i}=t;const o=i==="fixed",r=Ec(s),a=e?tb(e.floating):!1;if(s===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=_c(1);const u=_c(0),d=fa(s);if((d||!d&&!o)&&((Df(s)!=="body"||s1(r))&&(l=nb(s)),fa(s))){const h=gg(s);c=Th(s),u.x=h.x+s.clientLeft,u.y=h.y+s.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 Aae(t){return Array.from(t.getClientRects())}function lD(t){return gg(Ec(t)).left+nb(t).scrollLeft}function Mae(t){const e=Ec(t),n=nb(t),s=t.ownerDocument.body,i=ym(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),o=ym(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let r=-n.scrollLeft+lD(t);const a=-n.scrollTop;return Dr(s).direction==="rtl"&&(r+=ym(e.clientWidth,s.clientWidth)-i),{width:i,height:o,x:r,y:a}}function Eae(t,e){const n=mo(t),s=Ec(t),i=n.visualViewport;let o=s.clientWidth,r=s.clientHeight,a=0,l=0;if(i){o=i.width,r=i.height;const c=Qx();(!c||c&&e==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:o,height:r,x:a,y:l}}function Tae(t,e){const n=gg(t,!0,e==="fixed"),s=n.top+t.clientTop,i=n.left+t.clientLeft,o=fa(t)?Th(t):_c(1),r=t.clientWidth*o.x,a=t.clientHeight*o.y,l=i*o.x,c=s*o.y;return{width:r,height:a,x:l,y:c}}function B7(t,e,n){let s;if(e==="viewport")s=Eae(t,n);else if(e==="document")s=Mae(Ec(t));else if(Or(e))s=Tae(e,n);else{const i=aD(t);s={...e,x:e.x-i.x,y:e.y-i.y}}return L_(s)}function cD(t,e){const n=yc(t);return n===e||!Or(n)||pf(n)?!1:Dr(n).position==="fixed"||cD(n,e)}function Pae(t,e){const n=e.get(t);if(n)return n;let s=n6(t,[],!1).filter(a=>Or(a)&&Df(a)!=="body"),i=null;const o=Dr(t).position==="fixed";let r=o?yc(t):t;for(;Or(r)&&!pf(r);){const a=Dr(r),l=Jx(r);!l&&a.position==="fixed"&&(i=null),(o?!l&&!i:!l&&a.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||s1(r)&&!l&&cD(t,r))?s=s.filter(u=>u!==r):i=a,r=yc(r)}return e.set(t,s),s}function Iae(t){let{element:e,boundary:n,rootBoundary:s,strategy:i}=t;const r=[...n==="clippingAncestors"?tb(e)?[]:Pae(e,this._c):[].concat(n),s],a=r[0],l=r.reduce((c,u)=>{const d=B7(e,u,i);return c.top=ym(d.top,c.top),c.right=V7(d.right,c.right),c.bottom=V7(d.bottom,c.bottom),c.left=ym(d.left,c.left),c},B7(e,a,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Lae(t){const{width:e,height:n}=oD(t);return{width:e,height:n}}function Oae(t,e,n){const s=fa(e),i=Ec(e),o=n==="fixed",r=gg(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=_c(0);if(s||!s&&!o)if((Df(e)!=="body"||s1(i))&&(a=nb(e)),s){const d=gg(e,!0,o,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else i&&(l.x=lD(i));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 O2(t){return Dr(t).position==="static"}function z7(t,e){return!fa(t)||Dr(t).position==="fixed"?null:e?e(t):t.offsetParent}function uD(t,e){const n=mo(t);if(tb(t))return n;if(!fa(t)){let i=yc(t);for(;i&&!pf(i);){if(Or(i)&&!O2(i))return i;i=yc(i)}return n}let s=z7(t,e);for(;s&&Cae(s)&&O2(s);)s=z7(s,e);return s&&pf(s)&&O2(s)&&!Jx(s)?n:s||kae(t)||n}const Dae=async function(t){const e=this.getOffsetParent||uD,n=this.getDimensions,s=await n(t.floating);return{reference:Oae(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Rae(t){return Dr(t).direction==="rtl"}const Vae={convertOffsetParentRelativeRectToViewportRelativeRect:$ae,getDocumentElement:Ec,getClippingRect:Iae,getOffsetParent:uD,getElementRects:Dae,getClientRects:Aae,getDimensions:Lae,getScale:Th,isElement:Or,isRTL:Rae},i6=wae,o6=yae,r6=(t,e,n)=>{const s=new Map,i={platform:Vae,...n},o={...i.platform,_c:s};return vae(t,e,{...i,platform:o})};function Fae(t){let e;function n(){if(t.value==null)return;const{selectionStart:i,selectionEnd:o,value:r}=t.value;if(i==null||o==null)return;const a=r.slice(0,Math.max(0,i)),l=r.slice(Math.max(0,o));e={selectionStart:i,selectionEnd:o,value:r,beforeTxt:a,afterTxt:l}}function s(){if(t.value==null||e==null)return;const{value:i}=t.value,{beforeTxt:o,afterTxt:r,selectionStart:a}=e;if(o==null||r==null||a==null)return;let l=i.length;if(i.endsWith(r))l=i.length-r.length;else if(i.startsWith(o))l=o.length;else{const c=o[a-1],u=i.indexOf(c,a-1);u!==-1&&(l=u+1)}t.value.setSelectionRange(l,l)}return[n,s]}const Nae=(t,e,n)=>Y0(t.subTree).filter(o=>{var r;return Gs(o)&&((r=o.type)==null?void 0:r.name)===e&&!!o.component}).map(o=>o.component.uid).map(o=>n[o]).filter(o=>!!o),Bae=(t,e)=>{const n={},s=ss([]);return{children:s,addChild:r=>{n[r.uid]=r,s.value=Nae(t,e,n)},removeChild:r=>{delete n[r],s.value=s.value.filter(a=>a.uid!==r)}}},Ji=Ky({type:String,values:Ac,required:!1}),dD=Symbol("size"),hD=()=>{const t=qe(dD,{});return q(()=>A(t.size)||"")};function e4(t,{beforeFocus:e,afterFocus:n,beforeBlur:s,afterBlur:i}={}){const o=pt(),{emit:r}=o,a=ss(),l=J(!1),c=h=>{ot(e)&&e(h)||l.value||(l.value=!0,r("focus",h),n==null||n())},u=h=>{var f;ot(s)&&s(h)||h.relatedTarget&&((f=a.value)!=null&&f.contains(h.relatedTarget))||(l.value=!1,r("blur",h),i==null||i())},d=()=>{var h,f;(h=a.value)!=null&&h.contains(document.activeElement)&&a.value!==document.activeElement||(f=t.value)==null||f.focus()};return Te(a,h=>{h&&h.setAttribute("tabindex","-1")}),is(a,"focus",c,!0),is(a,"blur",u,!0),is(a,"click",d,!0),{isFocused:l,wrapperRef:a,handleFocus:c,handleBlur:u}}function fD({afterComposition:t,emit:e}){const n=J(!1),s=a=>{e==null||e("compositionstart",a),n.value=!0},i=a=>{var l;e==null||e("compositionupdate",a);const c=(l=a.target)==null?void 0:l.value,u=c[c.length-1]||"";n.value=!Noe(u)},o=a=>{e==null||e("compositionend",a),n.value&&(n.value=!1,dt(()=>t(a)))};return{isComposing:n,handleComposition:a=>{a.type==="compositionend"?o(a):i(a)},handleCompositionStart:s,handleCompositionUpdate:i,handleCompositionEnd:o}}const pD=Symbol("emptyValuesContextKey"),zae=["",void 0,null],Hae=void 0,sb=Ze({emptyValues:Array,valueOnClear:{type:[String,Number,Boolean,Function],default:void 0,validator:t=>ot(t)?!t():!t}}),mD=(t,e)=>{const n=pt()?qe(pD,J({})):J({}),s=q(()=>t.emptyValues||n.value.emptyValues||zae),i=q(()=>ot(t.valueOnClear)?t.valueOnClear():t.valueOnClear!==void 0?t.valueOnClear:ot(n.value.valueOnClear)?n.value.valueOnClear():n.value.valueOnClear!==void 0?n.value.valueOnClear:e!==void 0?e:Hae),o=r=>s.value.includes(r);return s.value.includes(i.value),{emptyValues:s,valueOnClear:i,isEmptyValue:o}},Uae=Ze({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),ir=t=>fO(Uae,t),gD=Symbol(),O_=J();function ib(t,e=void 0){const n=pt()?qe(gD,O_):O_;return t?q(()=>{var s,i;return(i=(s=n.value)==null?void 0:s[t])!=null?i:e}):n}function t4(t,e){const n=ib(),s=He(t,q(()=>{var a;return((a=n.value)==null?void 0:a.namespace)||gm})),i=fn(q(()=>{var a;return(a=n.value)==null?void 0:a.locale})),o=Qy(q(()=>{var a;return((a=n.value)==null?void 0:a.zIndex)||QO})),r=q(()=>{var a;return A(e)||((a=n.value)==null?void 0:a.size)||""});return vD(q(()=>A(n)||{})),{ns:s,locale:i,zIndex:o,size:r}}const vD=(t,e,n=!1)=>{var s;const i=!!pt(),o=i?ib():void 0,r=(s=e==null?void 0:e.provide)!=null?s:i?It:void 0;if(!r)return;const a=q(()=>{const l=A(t);return o!=null&&o.value?jae(o.value,l):l});return r(gD,a),r(DO,q(()=>a.value.locale)),r(RO,q(()=>a.value.namespace)),r(eD,q(()=>a.value.zIndex)),r(dD,{size:q(()=>a.value.size||"")}),r(pD,q(()=>({emptyValues:a.value.emptyValues,valueOnClear:a.value.valueOnClear}))),(n||!O_.value)&&(O_.value=a.value),a},jae=(t,e)=>{const n=[...new Set([...E_(t),...E_(e)])],s={};for(const i of n)s[i]=e[i]!==void 0?e[i]:t[i];return s},Wae=Ze({a11y:{type:Boolean,default:!0},locale:{type:xe(Object)},size:Ji,button:{type:xe(Object)},experimentalFeatures:{type:xe(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:xe(Object)},zIndex:Number,namespace:{type:String,default:"el"},...sb}),Yae={},Gae=se({name:"ElConfigProvider",props:Wae,setup(t,{slots:e}){Te(()=>t.message,s=>{Object.assign(Yae,s??{})},{immediate:!0,deep:!0});const n=vD(t);return()=>ae(e,"default",{config:n==null?void 0:n.value})}}),qae=jt(Gae);var Ye=(t,e)=>{const n=t.__vccOpts||t;for(const[s,i]of e)n[s]=i;return n};const Xae=Ze({size:{type:xe([Number,String])},color:{type:String}}),Kae=se({name:"ElIcon",inheritAttrs:!1}),Zae=se({...Kae,props:Xae,setup(t){const e=t,n=He("icon"),s=q(()=>{const{size:i,color:o}=e;return!i&&!o?{}:{fontSize:js(i)?void 0:Ai(i),"--color":o}});return(i,o)=>(v(),$("i",Mn({class:A(n).b(),style:A(s)},i.$attrs),[ae(i.$slots,"default")],16))}});var Jae=Ye(Zae,[["__file","icon.vue"]]);const ye=jt(Jae),Qae=["light","dark"],ele=Ze({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:E_(af),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:Qae,default:"light"}}),tle={close:t=>t instanceof MouseEvent},nle=se({name:"ElAlert"}),sle=se({...nle,props:ele,emits:tle,setup(t,{emit:e}){const n=t,{Close:s}=TO,i=Zi(),o=He("alert"),r=J(!0),a=q(()=>af[n.type]),l=q(()=>[o.e("icon"),{[o.is("big")]:!!n.description||!!i.default}]),c=q(()=>({"with-description":n.description||i.default})),u=d=>{r.value=!1,e("close",d)};return(d,h)=>(v(),R(bo,{name:A(o).b("fade"),persisted:""},{default:w(()=>[Pe(g("div",{class:W([A(o).b(),A(o).m(d.type),A(o).is("center",d.center),A(o).is(d.effect)]),role:"alert"},[d.showIcon&&A(a)?(v(),R(A(ye),{key:0,class:W(A(l))},{default:w(()=>[(v(),R(Tt(A(a))))]),_:1},8,["class"])):O("v-if",!0),g("div",{class:W(A(o).e("content"))},[d.title||d.$slots.title?(v(),$("span",{key:0,class:W([A(o).e("title"),A(c)])},[ae(d.$slots,"title",{},()=>[G(M(d.title),1)])],2)):O("v-if",!0),d.$slots.default||d.description?(v(),$("p",{key:1,class:W(A(o).e("description"))},[ae(d.$slots,"default",{},()=>[G(M(d.description),1)])],2)):O("v-if",!0),d.closable?(v(),$(te,{key:2},[d.closeText?(v(),$("div",{key:0,class:W([A(o).e("close-btn"),A(o).is("customed")]),onClick:u},M(d.closeText),3)):(v(),R(A(ye),{key:1,class:W(A(o).e("close-btn")),onClick:u},{default:w(()=>[_(A(s))]),_:1},8,["class"]))],64)):O("v-if",!0)],2)],2),[[Xt,r.value]])]),_:3},8,["name"]))}});var ile=Ye(sle,[["__file","alert.vue"]]);const Tc=jt(ile),Rf=Symbol("formContextKey"),Gu=Symbol("formItemContextKey"),Mi=(t,e={})=>{const n=J(void 0),s=e.prop?n:NO("size"),i=e.global?n:hD(),o=e.form?{size:void 0}:qe(Rf,void 0),r=e.formItem?{size:void 0}:qe(Gu,void 0);return q(()=>s.value||A(t)||(r==null?void 0:r.size)||(o==null?void 0:o.size)||i.value||"")},Co=t=>{const e=NO("disabled"),n=qe(Rf,void 0);return q(()=>e.value||A(t)||(n==null?void 0:n.disabled)||!1)},Br=()=>{const t=qe(Rf,void 0),e=qe(Gu,void 0);return{form:t,formItem:e}},dd=(t,{formItemContext:e,disableIdGeneration:n,disableIdManagement:s})=>{n||(n=J(!1)),s||(s=J(!1));const i=J();let o;const r=q(()=>{var a;return!!(!(t.label||t.ariaLabel)&&e&&e.inputIds&&((a=e.inputIds)==null?void 0:a.length)<=1)});return Pt(()=>{o=Te([kn(t,"id"),n],([a,l])=>{const c=a??(l?void 0:tr().value);c!==i.value&&(e!=null&&e.removeInputId&&(i.value&&e.removeInputId(i.value),!(s!=null&&s.value)&&!l&&c&&e.addInputId(c)),i.value=c)},{immediate:!0})}),_a(()=>{o&&o(),e!=null&&e.removeInputId&&i.value&&e.removeInputId(i.value)}),{isLabeledByFormItem:r,inputId:i}},ole=Ze({size:{type:String,values:Ac},disabled:Boolean}),rle=Ze({...ole,model:Object,rules:{type:xe(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:[Object,Boolean]}}),ale={validate:(t,e,n)=>(Le(t)||nt(t))&&li(e)&&nt(n)};function lle(){const t=J([]),e=q(()=>{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,r}function s(o,r){if(o&&r){const a=n(r);t.value.splice(a,1,o)}else o&&t.value.push(o)}function i(o){const r=n(o);r>-1&&t.value.splice(r,1)}return{autoLabelWidth:e,registerLabelWidth:s,deregisterLabelWidth:i}}const r0=(t,e)=>{const n=Hi(e);return n.length>0?t.filter(s=>s.prop&&n.includes(s.prop)):t},cle="ElForm",ule=se({name:cle}),dle=se({...ule,props:rle,emits:ale,setup(t,{expose:e,emit:n}){const s=t,i=[],o=Mi(),r=He("form"),a=q(()=>{const{labelPosition:k,inline:x}=s;return[r.b(),r.m(o.value||"default"),{[r.m(`label-${k}`)]:k,[r.m("inline")]:x}]}),l=k=>i.find(x=>x.prop===k),c=k=>{i.push(k)},u=k=>{k.prop&&i.splice(i.indexOf(k),1)},d=(k=[])=>{s.model&&r0(i,k).forEach(x=>x.resetField())},h=(k=[])=>{r0(i,k).forEach(x=>x.clearValidate())},f=q(()=>!!s.model),p=k=>{if(i.length===0)return[];const x=r0(i,k);return x.length?x:[]},m=async k=>y(void 0,k),b=async(k=[])=>{if(!f.value)return!1;const x=p(k);if(x.length===0)return!0;let S={};for(const E of x)try{await E.validate("")}catch(T){S={...S,...T}}return Object.keys(S).length===0?!0:Promise.reject(S)},y=async(k=[],x)=>{const S=!ot(x);try{const E=await b(k);return E===!0&&await(x==null?void 0:x(E)),E}catch(E){if(E instanceof Error)throw E;const T=E;return s.scrollToError&&C(Object.keys(T)[0]),await(x==null?void 0:x(!1,T)),S&&Promise.reject(T)}},C=k=>{var x;const S=r0(i,k)[0];S&&((x=S.$el)==null||x.scrollIntoView(s.scrollIntoViewOptions))};return Te(()=>s.rules,()=>{s.validateOnRuleChange&&m().catch(k=>void 0)},{deep:!0}),It(Rf,as({...yo(s),emit:n,resetFields:d,clearValidate:h,validateField:y,getField:l,addField:c,removeField:u,...lle()})),e({validate:m,validateField:y,resetFields:d,clearValidate:h,scrollToField:C,fields:i}),(k,x)=>(v(),$("form",{class:W(A(a))},[ae(k.$slots,"default")],2))}});var hle=Ye(dle,[["__file","form.vue"]]);function uu(){return uu=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},uu.apply(this,arguments)}function fle(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,vg(t,e)}function a6(t){return a6=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},a6(t)}function vg(t,e){return vg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(s,i){return s.__proto__=i,s},vg(t,e)}function ple(){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 q0(t,e,n){return ple()?q0=Reflect.construct.bind():q0=function(i,o,r){var a=[null];a.push.apply(a,o);var l=Function.bind.apply(i,a),c=new l;return r&&vg(c,r.prototype),c},q0.apply(null,arguments)}function mle(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function l6(t){var e=typeof Map=="function"?new Map:void 0;return l6=function(s){if(s===null||!mle(s))return s;if(typeof s!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e<"u"){if(e.has(s))return e.get(s);e.set(s,i)}function i(){return q0(s,arguments,a6(this).constructor)}return i.prototype=Object.create(s.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),vg(i,s)},l6(t)}var gle=/%[sdj%]/g,vle=function(){};typeof process<"u"&&process.env;function c6(t){if(!t||!t.length)return null;var e={};return t.forEach(function(n){var s=n.field;e[s]=e[s]||[],e[s].push(n)}),e}function ho(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),s=1;s<e;s++)n[s-1]=arguments[s];var i=0,o=n.length;if(typeof t=="function")return t.apply(null,n);if(typeof t=="string"){var r=t.replace(gle,function(a){if(a==="%%")return"%";if(i>=o)return a;switch(a){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}break;default:return a}});return r}return t}function _le(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function ks(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||_le(e)&&typeof t=="string"&&!t)}function yle(t,e,n){var s=[],i=0,o=t.length;function r(a){s.push.apply(s,a||[]),i++,i===o&&n(s)}t.forEach(function(a){e(a,r)})}function H7(t,e,n){var s=0,i=t.length;function o(r){if(r&&r.length){n(r);return}var a=s;s=s+1,a<i?e(t[a],o):n([])}o([])}function ble(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,t[n]||[])}),e}var U7=function(t){fle(e,t);function e(n,s){var i;return i=t.call(this,"Async Validation Error")||this,i.errors=n,i.fields=s,i}return e}(l6(Error));function wle(t,e,n,s,i){if(e.first){var o=new Promise(function(h,f){var p=function(y){return s(y),y.length?f(new U7(y,c6(y))):h(i)},m=ble(t);H7(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(b){if(u.push.apply(u,b),c++,c===l)return s(u),u.length?f(new U7(u,c6(u))):h(i)};a.length||(s(u),h(i)),a.forEach(function(m){var b=t[m];r.indexOf(m)!==-1?H7(b,n,p):yle(b,n,p)})});return d.catch(function(h){return h}),d}function Cle(t){return!!(t&&t.message!==void 0)}function kle(t,e){for(var n=t,s=0;s<e.length;s++){if(n==null)return n;n=n[e[s]]}return n}function j7(t,e){return function(n){var s;return t.fullFields?s=kle(e,t.fullFields):s=e[n.field||t.fullField],Cle(n)?(n.field=n.field||t.fullField,n.fieldValue=s,n):{message:typeof n=="function"?n():n,fieldValue:s,field:n.field||t.fullField}}}function W7(t,e){if(e){for(var n in e)if(e.hasOwnProperty(n)){var s=e[n];typeof s=="object"&&typeof t[n]=="object"?t[n]=uu({},t[n],s):t[n]=s}}return t}var _D=function(e,n,s,i,o,r){e.required&&(!s.hasOwnProperty(e.field)||ks(n,r||e.type))&&i.push(ho(o.messages.required,e.fullField))},xle=function(e,n,s,i,o){(/^\s+$/.test(n)||n==="")&&i.push(ho(o.messages.whitespace,e.fullField))},a0,Sle=function(){if(a0)return a0;var t="[a-fA-F\\d:]",e=function(x){return x&&x.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}",s="[a-fA-F\\d]{1,4}",i=(` | |
| 41 | + */const $h=typeof document<"u";function mO(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function ZK(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&mO(t.default)}const On=Object.assign;function vw(t,e){const n={};for(const i in e){const s=e[i];n[i]=Xr(s)?s.map(t):t(s)}return n}const Gm=()=>{},Xr=Array.isArray,gO=/#/g,JK=/&/g,QK=/\//g,eZ=/=/g,tZ=/\?/g,vO=/\+/g,nZ=/%5B/g,sZ=/%5D/g,_O=/%5E/g,iZ=/%60/g,yO=/%7B/g,oZ=/%7C/g,bO=/%7D/g,rZ=/%20/g;function o4(t){return encodeURI(""+t).replace(oZ,"|").replace(nZ,"[").replace(sZ,"]")}function aZ(t){return o4(t).replace(yO,"{").replace(bO,"}").replace(_O,"^")}function Vk(t){return o4(t).replace(vO,"%2B").replace(rZ,"+").replace(gO,"%23").replace(JK,"%26").replace(iZ,"`").replace(yO,"{").replace(bO,"}").replace(_O,"^")}function lZ(t){return Vk(t).replace(eZ,"%3D")}function cZ(t){return o4(t).replace(gO,"%23").replace(tZ,"%3F")}function uZ(t){return t==null?"":cZ(t).replace(QK,"%2F")}function Fg(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const dZ=/\/$/,hZ=t=>t.replace(dZ,"");function _w(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=gZ(i??e,n),{fullPath:i+(o&&"?")+o+r,path:i,query:s,hash:Fg(r)}}function fZ(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function y7(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function pZ(t,e,n){const i=e.matched.length-1,s=n.matched.length-1;return i>-1&&i===s&&If(e.matched[i],n.matched[s])&&wO(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function If(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function wO(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!mZ(t[n],e[n]))return!1;return!0}function mZ(t,e){return Xr(t)?b7(t,e):Xr(e)?b7(e,t):t===e}function b7(t,e){return Xr(e)?t.length===e.length&&t.every((n,i)=>n===e[i]):t.length===1&&t[0]===e}function gZ(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("/")}const zl={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ng;(function(t){t.pop="pop",t.push="push"})(Ng||(Ng={}));var Xm;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Xm||(Xm={}));function vZ(t){if(!t)if($h){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),hZ(t)}const _Z=/^[^#]+#/;function yZ(t,e){return t.replace(_Z,"#")+e}function bZ(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 Lb=()=>({left:window.scrollX,top:window.scrollY});function wZ(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=bZ(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 w7(t,e){return(history.state?history.state.position-e:-1)+t}const Fk=new Map;function kZ(t,e){Fk.set(t,e)}function CZ(t){const e=Fk.get(t);return Fk.delete(t),e}let xZ=()=>location.protocol+"//"+location.host;function kO(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),y7(l,"")}return y7(n,t)+i+s}function SZ(t,e,n,i){let s=[],o=[],r=null;const a=({state:h})=>{const f=kO(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:Ng.pop,direction:y?y>0?Xm.forward:Xm.back:Xm.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:Lb()}),"")}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 k7(t,e,n,i=!1,s=!1){return{back:t,current:e,forward:n,replaced:i,position:window.history.length,scroll:s?Lb():null}}function $Z(t){const{history:e,location:n}=window,i={value:kO(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:xZ()+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,k7(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:Lb()});o(u.current,u,!0);const d=On({},k7(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 CO(t){t=vZ(t);const e=$Z(t),n=SZ(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:yZ.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 AZ(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),CO(t)}function EZ(t){return typeof t=="string"||t&&typeof t=="object"}function xO(t){return typeof t=="string"||typeof t=="symbol"}const SO=Symbol("");var C7;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(C7||(C7={}));function Lf(t,e){return On(new Error,{type:t,[SO]:!0},e)}function Wa(t,e){return t instanceof Error&&SO in t&&(e==null||!!(t.type&e))}const x7="[^/]+?",MZ={sensitive:!1,strict:!1,start:!0,end:!0},TZ=/[.+*?^${}()[\]/\\]/g;function PZ(t,e){const n=On({},MZ,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(TZ,"\\$&"),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||x7;if(k!==x7){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(Xr(b)&&!m)throw new Error(`Provided param "${p}" is an array but it is not repeatable (* or + modifiers)`);const k=Xr(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 IZ(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 $O(t,e){let n=0;const i=t.score,s=e.score;for(;n<i.length&&n<s.length;){const o=IZ(i[n],s[n]);if(o)return o;n++}if(Math.abs(s.length-i.length)===1){if(S7(i))return 1;if(S7(s))return-1}return s.length-i.length}function S7(t){const e=t[t.length-1];return t.length>0&&e[e.length-1]<0}const LZ={type:0,value:""},OZ=/[a-zA-Z0-9_]/;function DZ(t){if(!t)return[[]];if(t==="/")return[[LZ]];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:OZ.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 RZ(t,e,n){const i=PZ(DZ(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 VZ(t,e){const n=[],i=new Map;e=E7({strict:!1,end:!0,sensitive:!1},e);function s(d){return i.get(d)}function o(d,h,f){const p=!f,m=FZ(d);m.aliasOf=f&&f.record;const y=E7(e,d),b=[m];if("alias"in d){const $=typeof d.alias=="string"?[d.alias]:d.alias;for(const S of $)b.push(On({},m,{components:f?f.record.components:m.components,path:S,aliasOf:f?f.record:m}))}let k,C;for(const $ of b){const{path:S}=$;if(h&&S[0]!=="/"){const M=h.record.path,P=M[M.length-1]==="/"?"":"/";$.path=h.record.path+(S&&P+S)}if(k=RZ($,h,y),f?f.alias.push(k):(C=C||k,C!==k&&C.alias.push(k),p&&d.name&&!A7(k)&&r(d.name)),AO(k)&&l(k),m.children){const M=m.children;for(let P=0;P<M.length;P++)o(M[P],k,f&&f.children[P])}f=f||k}return C?()=>{r(C)}:Gm}function r(d){if(xO(d)){const h=i.get(d);h&&(i.delete(d),n.splice(n.indexOf(h),1),h.children.forEach(r),h.alias.forEach(r))}else{const h=n.indexOf(d);h>-1&&(n.splice(h,1),d.record.name&&i.delete(d.record.name),d.children.forEach(r),d.alias.forEach(r))}}function a(){return n}function l(d){const h=zZ(d,n);n.splice(h,0,d),d.record.name&&!A7(d)&&i.set(d.record.name,d)}function c(d,h){let f,p={},m,y;if("name"in d&&d.name){if(f=i.get(d.name),!f)throw Lf(1,{location:d});y=f.record.name,p=On($7(h.params,f.keys.filter(C=>!C.optional).concat(f.parent?f.parent.keys.filter(C=>C.optional):[]).map(C=>C.name)),d.params&&$7(d.params,f.keys.map(C=>C.name))),m=f.stringify(p)}else if(d.path!=null)m=d.path,f=n.find(C=>C.re.test(m)),f&&(p=f.parse(m),y=f.record.name);else{if(f=h.name?i.get(h.name):n.find(C=>C.re.test(h.path)),!f)throw Lf(1,{location:d,currentLocation:h});y=f.record.name,p=On({},h.params,d.params),m=f.stringify(p)}const b=[];let k=f;for(;k;)b.unshift(k.record),k=k.parent;return{name:y,path:m,params:p,matched:b,meta:BZ(b)}}t.forEach(d=>o(d));function u(){n.length=0,i.clear()}return{addRoute:o,resolve:c,removeRoute:r,clearRoutes:u,getRoutes:a,getRecordMatcher:s}}function $7(t,e){const n={};for(const i of e)i in t&&(n[i]=t[i]);return n}function FZ(t){return{path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:void 0,beforeEnter:t.beforeEnter,props:NZ(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},mods:{},components:"components"in t?t.components||null:t.component&&{default:t.component}}}function NZ(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 A7(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function BZ(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 zZ(t,e){let n=0,i=e.length;for(;n!==i;){const o=n+i>>1;$O(t,e[o])<0?i=o:n=o+1}const s=HZ(t);return s&&(i=e.lastIndexOf(s,i-1)),i}function HZ(t){let e=t;for(;e=e.parent;)if(AO(e)&&$O(t,e)===0)return e}function AO({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function UZ(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(vO," "),r=o.indexOf("="),a=Fg(r<0?o:o.slice(0,r)),l=r<0?null:Fg(o.slice(r+1));if(a in e){let c=e[a];Xr(c)||(c=e[a]=[c]),c.push(l)}else e[a]=l}return e}function M7(t){let e="";for(let n in t){const i=t[n];if(n=lZ(n),i==null){i!==void 0&&(e+=(e.length?"&":"")+n);continue}(Xr(i)?i.map(o=>o&&Vk(o)):[i&&Vk(i)]).forEach(o=>{o!==void 0&&(e+=(e.length?"&":"")+n,o!=null&&(e+="="+o))})}return e}function jZ(t){const e={};for(const n in t){const i=t[n];i!==void 0&&(e[n]=Xr(i)?i.map(s=>s==null?null:""+s):i==null?i:""+i)}return e}const WZ=Symbol(""),T7=Symbol(""),r4=Symbol(""),EO=Symbol(""),Nk=Symbol("");function Wp(){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 dc(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(Lf(4,{from:n,to:e})):h instanceof Error?l(h):EZ(h)?l(Lf(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 yw(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(mO(l)){const u=(l.__vccOpts||l)[e];u&&o.push(dc(u,n,i,r,a,s))}else{let c=l();o.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${r.path}"`);const d=ZK(u)?u.default:u;r.mods[a]=u,r.components[a]=d;const f=(d.__vccOpts||d)[e];return f&&dc(f,n,i,r,a,s)()}))}}return o}function P7(t){const e=qe(r4),n=qe(EO),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(If.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(If.bind(null,l[c-2])):h}),o=Y(()=>s.value>-1&&XZ(n.params,i.value.params)),r=Y(()=>s.value>-1&&s.value===n.matched.length-1&&wO(n.params,i.value.params));function a(l={}){return GZ(l)?e[E(t.replace)?"replace":"push"](E(t.to)).catch(Gm):Promise.resolve()}return{route:i,href:Y(()=>i.value.href),isActive:o,isExactActive:r,navigate:a}}const YZ=fe({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:P7,setup(t,{slots:e}){const n=In(P7(t)),{options:i}=qe(r4),s=Y(()=>({[L7(t.activeClass,i.linkActiveClass,"router-link-active")]:n.isActive,[L7(t.exactActiveClass,i.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=e.default&&e.default(n);return t.custom?o:bt("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),qZ=YZ;function GZ(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 XZ(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(!Xr(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 L7=(t,e,n)=>t??e??n,KZ=fe({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const i=qe(Nk),s=Y(()=>t.route||i.value),o=qe(T7,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]);Pt(T7,Y(()=>r.value+1)),Pt(WZ,a),Pt(Nk,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||!If(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 O7(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=bt(h,On({},p,e,{onVnodeUnmounted:b=>{b.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return O7(n.default,{Component:y,route:c})||y}}});function O7(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const ZZ=KZ;function D7(t){const e=VZ(t.routes,t),n=t.parseQuery||UZ,i=t.stringifyQuery||M7,s=t.history,o=Wp(),r=Wp(),a=Wp(),l=Fn(zl);let c=zl;$h&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=vw.bind(null,oe=>""+oe),d=vw.bind(null,uZ),h=vw.bind(null,Fg);function f(oe,pe){let ie,re;return xO(oe)?(ie=e.getRecordMatcher(oe),re=pe):re=oe,e.addRoute(re,ie)}function p(oe){const pe=e.getRecordMatcher(oe);pe&&e.removeRoute(pe)}function m(){return e.getRoutes().map(oe=>oe.record)}function y(oe){return!!e.getRecordMatcher(oe)}function b(oe,pe){if(pe=On({},pe||l.value),typeof oe=="string"){const se=_w(n,oe,pe.path),me=e.resolve({path:se.path},pe),$e=s.createHref(se.fullPath);return On(se,me,{params:h(me.params),hash:Fg(se.hash),redirectedFrom:void 0,href:$e})}let ie;if(oe.path!=null)ie=On({},oe,{path:_w(n,oe.path,pe.path).path});else{const se=On({},oe.params);for(const me in se)se[me]==null&&delete se[me];ie=On({},oe,{params:d(se)}),pe.params=d(pe.params)}const re=e.resolve(ie,pe),ke=oe.hash||"";re.params=u(h(re.params));const je=fZ(i,On({},oe,{hash:aZ(ke),path:re.path})),te=s.createHref(je);return On({fullPath:je,hash:ke,query:i===M7?jZ(oe.query):oe.query||{}},re,{redirectedFrom:void 0,href:te})}function k(oe){return typeof oe=="string"?_w(n,oe,l.value.path):On({},oe)}function C(oe,pe){if(c!==oe)return Lf(8,{from:pe,to:oe})}function $(oe){return P(oe)}function S(oe){return $(On(k(oe),{replace:!0}))}function M(oe){const pe=oe.matched[oe.matched.length-1];if(pe&&pe.redirect){const{redirect:ie}=pe;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,pe){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}),pe||ie);const me=ie;me.redirectedFrom=pe;let $e;return!je&&pZ(i,re,ie)&&($e=Lf(16,{to:me,from:re}),Q(re,re,!0,!1)),($e?Promise.resolve($e):L(me,re)).catch(Se=>Wa(Se)?Wa(Se,2)?Se:W(Se):K(Se,me,re)).then(Se=>{if(Se){if(Wa(Se,2))return P(On({replace:te},k(Se.to),{state:typeof Se.to=="object"?On({},ke,Se.to.state):ke,force:je}),pe||me)}else Se=V(me,re,!0,te,ke);return R(me,re,Se),Se})}function T(oe,pe){const ie=C(oe,pe);return ie?Promise.reject(ie):Promise.resolve()}function I(oe){const pe=ae.values().next().value;return pe&&typeof pe.runWithContext=="function"?pe.runWithContext(oe):oe()}function L(oe,pe){let ie;const[re,ke,je]=JZ(oe,pe);ie=yw(re.reverse(),"beforeRouteLeave",oe,pe);for(const se of re)se.leaveGuards.forEach(me=>{ie.push(dc(me,oe,pe))});const te=T.bind(null,oe,pe);return ie.push(te),Ce(ie).then(()=>{ie=[];for(const se of o.list())ie.push(dc(se,oe,pe));return ie.push(te),Ce(ie)}).then(()=>{ie=yw(ke,"beforeRouteUpdate",oe,pe);for(const se of ke)se.updateGuards.forEach(me=>{ie.push(dc(me,oe,pe))});return ie.push(te),Ce(ie)}).then(()=>{ie=[];for(const se of je)if(se.beforeEnter)if(Xr(se.beforeEnter))for(const me of se.beforeEnter)ie.push(dc(me,oe,pe));else ie.push(dc(se.beforeEnter,oe,pe));return ie.push(te),Ce(ie)}).then(()=>(oe.matched.forEach(se=>se.enterCallbacks={}),ie=yw(je,"beforeRouteEnter",oe,pe,I),ie.push(te),Ce(ie))).then(()=>{ie=[];for(const se of r.list())ie.push(dc(se,oe,pe));return ie.push(te),Ce(ie)}).catch(se=>Wa(se,8)?se:Promise.reject(se))}function R(oe,pe,ie){a.list().forEach(re=>I(()=>re(oe,pe,ie)))}function V(oe,pe,ie,re,ke){const je=C(oe,pe);if(je)return je;const te=pe===zl,se=$h?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,pe,ie,te),W()}let B;function F(){B||(B=s.listen((oe,pe,ie)=>{if(!ge.listening)return;const re=b(oe),ke=M(re);if(ke){P(On(ke,{replace:!0}),re).catch(Gm);return}c=re;const je=l.value;$h&&kZ(w7(je.fullPath,ie.delta),Lb()),L(re,je).catch(te=>Wa(te,12)?te:Wa(te,2)?(P(te.to,re).then(se=>{Wa(se,20)&&!ie.delta&&ie.type===Ng.pop&&s.go(-1,!1)}).catch(Gm),Promise.reject()):(ie.delta&&s.go(-ie.delta,!1),K(te,re,je))).then(te=>{te=te||V(re,je,!1),te&&(ie.delta&&!Wa(te,8)?s.go(-ie.delta,!1):ie.type===Ng.pop&&Wa(te,20)&&s.go(-1,!1)),R(re,je,te)}).catch(Gm)}))}let z=Wp(),U=Wp(),G;function K(oe,pe,ie){W(oe);const re=U.list();return re.length?re.forEach(ke=>ke(oe,pe,ie)):console.error(oe),Promise.reject(oe)}function X(){return G&&l.value!==zl?Promise.resolve():new Promise((oe,pe)=>{z.add([oe,pe])})}function W(oe){return G||(G=!oe,F(),z.list().forEach(([pe,ie])=>oe?ie(oe):pe()),z.reset()),oe}function Q(oe,pe,ie,re){const{scrollBehavior:ke}=t;if(!$h||!ke)return Promise.resolve();const je=!ie&&CZ(w7(oe.fullPath,0))||(re||!ie)&&history.state&&history.state.scroll||null;return ot().then(()=>ke(oe,pe,je)).then(te=>te&&wZ(te)).catch(te=>K(te,oe,pe))}const ne=oe=>s.go(oe);let Z;const ae=new Set,ge={currentRoute:l,listening:!0,addRoute:f,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:y,getRoutes:m,resolve:b,options:t,push:$,replace:S,go:ne,back:()=>ne(-1),forward:()=>ne(1),beforeEach:o.add,beforeResolve:r.add,afterEach:a.add,onError:U.add,isReady:X,install(oe){const pe=this;oe.component("RouterLink",qZ),oe.component("RouterView",ZZ),oe.config.globalProperties.$router=pe,Object.defineProperty(oe.config.globalProperties,"$route",{enumerable:!0,get:()=>E(l)}),$h&&!Z&&l.value===zl&&(Z=!0,$(s.location).catch(ke=>{}));const ie={};for(const ke in zl)Object.defineProperty(ie,ke,{get:()=>l.value[ke],enumerable:!0});oe.provide(r4,pe),oe.provide(EO,k6(ie)),oe.provide(Nk,l);const re=oe.unmount;ae.add(oe),oe.unmount=function(){ae.delete(oe),ae.size<1&&(c=zl,B&&B(),B=null,l.value=zl,Z=!1,G=!1),re()}}};function Ce(oe){return oe.reduce((pe,ie)=>pe.then(()=>I(ie)),Promise.resolve())}return ge}function JZ(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=>If(c,a))?i.push(a):n.push(a));const l=t.matched[r];l&&(e.matched.find(c=>If(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"},QZ=["year","years","month","months","date","dates","week","datetime","datetimerange","daterange","monthrange","yearrange"],Mt="update:modelValue",dn="change",Do="input",$l=["","default","small","large"],a4=11,eJ=2;var tJ=typeof global=="object"&&global&&global.Object===Object&&global;const MO=tJ;var nJ=typeof self=="object"&&self&&self.Object===Object&&self,sJ=MO||nJ||Function("return this")();const ta=sJ;var iJ=ta.Symbol;const yr=iJ;var TO=Object.prototype,oJ=TO.hasOwnProperty,rJ=TO.toString,Yp=yr?yr.toStringTag:void 0;function aJ(t){var e=oJ.call(t,Yp),n=t[Yp];try{t[Yp]=void 0;var i=!0}catch{}var s=rJ.call(t);return i&&(e?t[Yp]=n:delete t[Yp]),s}var lJ=Object.prototype,cJ=lJ.toString;function uJ(t){return cJ.call(t)}var dJ="[object Null]",hJ="[object Undefined]",R7=yr?yr.toStringTag:void 0;function Rd(t){return t==null?t===void 0?hJ:dJ:R7&&R7 in Object(t)?aJ(t):uJ(t)}function Ea(t){return t!=null&&typeof t=="object"}var fJ="[object Symbol]";function Ob(t){return typeof t=="symbol"||Ea(t)&&Rd(t)==fJ}function l4(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 pJ=Array.isArray;const Yi=pJ;var mJ=1/0,V7=yr?yr.prototype:void 0,F7=V7?V7.toString:void 0;function PO(t){if(typeof t=="string")return t;if(Yi(t))return l4(t,PO)+"";if(Ob(t))return F7?F7.call(t):"";var e=t+"";return e=="0"&&1/t==-mJ?"-0":e}var gJ=/\s/;function vJ(t){for(var e=t.length;e--&&gJ.test(t.charAt(e)););return e}var _J=/^\s+/;function yJ(t){return t&&t.slice(0,vJ(t)+1).replace(_J,"")}function qi(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var N7=0/0,bJ=/^[-+]0x[0-9a-f]+$/i,wJ=/^0b[01]+$/i,kJ=/^0o[0-7]+$/i,CJ=parseInt;function rf(t){if(typeof t=="number")return t;if(Ob(t))return N7;if(qi(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=qi(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=yJ(t);var n=wJ.test(t);return n||kJ.test(t)?CJ(t.slice(2),n?2:8):bJ.test(t)?N7:+t}var B7=1/0,xJ=17976931348623157e292;function SJ(t){if(!t)return t===0?t:0;if(t=rf(t),t===B7||t===-B7){var e=t<0?-1:1;return e*xJ}return t===t?t:0}function $J(t){var e=SJ(t),n=e%1;return e===e?n?e-n:e:0}function c4(t){return t}var AJ="[object AsyncFunction]",EJ="[object Function]",MJ="[object GeneratorFunction]",TJ="[object Proxy]";function u4(t){if(!qi(t))return!1;var e=Rd(t);return e==EJ||e==MJ||e==AJ||e==TJ}var PJ=ta["__core-js_shared__"];const bw=PJ;var z7=function(){var t=/[^.]+$/.exec(bw&&bw.keys&&bw.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function IJ(t){return!!z7&&z7 in t}var LJ=Function.prototype,OJ=LJ.toString;function Vd(t){if(t!=null){try{return OJ.call(t)}catch{}try{return t+""}catch{}}return""}var DJ=/[\\^$.*+?()[\]{}|]/g,RJ=/^\[object .+?Constructor\]$/,VJ=Function.prototype,FJ=Object.prototype,NJ=VJ.toString,BJ=FJ.hasOwnProperty,zJ=RegExp("^"+NJ.call(BJ).replace(DJ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function HJ(t){if(!qi(t)||IJ(t))return!1;var e=u4(t)?zJ:RJ;return e.test(Vd(t))}function UJ(t,e){return t==null?void 0:t[e]}function Fd(t,e){var n=UJ(t,e);return HJ(n)?n:void 0}var jJ=Fd(ta,"WeakMap");const Bk=jJ;var H7=Object.create,WJ=function(){function t(){}return function(e){if(!qi(e))return{};if(H7)return H7(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();const YJ=WJ;function qJ(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 IO(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}var GJ=800,XJ=16,KJ=Date.now;function ZJ(t){var e=0,n=0;return function(){var i=KJ(),s=XJ-(i-n);if(n=i,s>0){if(++e>=GJ)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function JJ(t){return function(){return t}}var QJ=function(){try{var t=Fd(Object,"defineProperty");return t({},"",{}),t}catch{}}();const dy=QJ;var eQ=dy?function(t,e){return dy(t,"toString",{configurable:!0,enumerable:!1,value:JJ(e),writable:!0})}:c4;const tQ=eQ;var nQ=ZJ(tQ);const LO=nQ;function sQ(t,e){for(var n=-1,i=t==null?0:t.length;++n<i&&e(t[n],n,t)!==!1;);return t}function iQ(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 oQ=9007199254740991,rQ=/^(?:0|[1-9]\d*)$/;function Db(t,e){var n=typeof t;return e=e??oQ,!!e&&(n=="number"||n!="symbol"&&rQ.test(t))&&t>-1&&t%1==0&&t<e}function d4(t,e,n){e=="__proto__"&&dy?dy(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function I1(t,e){return t===e||t!==t&&e!==e}var aQ=Object.prototype,lQ=aQ.hasOwnProperty;function h4(t,e,n){var i=t[e];(!(lQ.call(t,e)&&I1(i,n))||n===void 0&&!(e in t))&&d4(t,e,n)}function lp(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?d4(n,a,l):h4(n,a,l)}return n}var U7=Math.max;function OO(t,e,n){return e=U7(e===void 0?t.length-1:e,0),function(){for(var i=arguments,s=-1,o=U7(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),qJ(t,this,a)}}function cQ(t,e){return LO(OO(t,e,c4),t+"")}var uQ=9007199254740991;function f4(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=uQ}function cp(t){return t!=null&&f4(t.length)&&!u4(t)}function dQ(t,e,n){if(!qi(n))return!1;var i=typeof e;return(i=="number"?cp(n)&&Db(e,n.length):i=="string"&&e in n)?I1(n[e],t):!1}function hQ(t){return cQ(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&&dQ(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 fQ=Object.prototype;function p4(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||fQ;return t===n}function pQ(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}var mQ="[object Arguments]";function j7(t){return Ea(t)&&Rd(t)==mQ}var DO=Object.prototype,gQ=DO.hasOwnProperty,vQ=DO.propertyIsEnumerable,_Q=j7(function(){return arguments}())?j7:function(t){return Ea(t)&&gQ.call(t,"callee")&&!vQ.call(t,"callee")};const Bg=_Q;function yQ(){return!1}var RO=typeof Lo=="object"&&Lo&&!Lo.nodeType&&Lo,W7=RO&&typeof Oo=="object"&&Oo&&!Oo.nodeType&&Oo,bQ=W7&&W7.exports===RO,Y7=bQ?ta.Buffer:void 0,wQ=Y7?Y7.isBuffer:void 0,kQ=wQ||yQ;const zg=kQ;var CQ="[object Arguments]",xQ="[object Array]",SQ="[object Boolean]",$Q="[object Date]",AQ="[object Error]",EQ="[object Function]",MQ="[object Map]",TQ="[object Number]",PQ="[object Object]",IQ="[object RegExp]",LQ="[object Set]",OQ="[object String]",DQ="[object WeakMap]",RQ="[object ArrayBuffer]",VQ="[object DataView]",FQ="[object Float32Array]",NQ="[object Float64Array]",BQ="[object Int8Array]",zQ="[object Int16Array]",HQ="[object Int32Array]",UQ="[object Uint8Array]",jQ="[object Uint8ClampedArray]",WQ="[object Uint16Array]",YQ="[object Uint32Array]",es={};es[FQ]=es[NQ]=es[BQ]=es[zQ]=es[HQ]=es[UQ]=es[jQ]=es[WQ]=es[YQ]=!0;es[CQ]=es[xQ]=es[RQ]=es[SQ]=es[VQ]=es[$Q]=es[AQ]=es[EQ]=es[MQ]=es[TQ]=es[PQ]=es[IQ]=es[LQ]=es[OQ]=es[DQ]=!1;function qQ(t){return Ea(t)&&f4(t.length)&&!!es[Rd(t)]}function m4(t){return function(e){return t(e)}}var VO=typeof Lo=="object"&&Lo&&!Lo.nodeType&&Lo,Km=VO&&typeof Oo=="object"&&Oo&&!Oo.nodeType&&Oo,GQ=Km&&Km.exports===VO,ww=GQ&&MO.process,XQ=function(){try{var t=Km&&Km.require&&Km.require("util").types;return t||ww&&ww.binding&&ww.binding("util")}catch{}}();const Of=XQ;var q7=Of&&Of.isTypedArray,KQ=q7?m4(q7):qQ;const g4=KQ;var ZQ=Object.prototype,JQ=ZQ.hasOwnProperty;function FO(t,e){var n=Yi(t),i=!n&&Bg(t),s=!n&&!i&&zg(t),o=!n&&!i&&!s&&g4(t),r=n||i||s||o,a=r?pQ(t.length,String):[],l=a.length;for(var c in t)(e||JQ.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 NO(t,e){return function(n){return t(e(n))}}var QQ=NO(Object.keys,Object);const eee=QQ;var tee=Object.prototype,nee=tee.hasOwnProperty;function see(t){if(!p4(t))return eee(t);var e=[];for(var n in Object(t))nee.call(t,n)&&n!="constructor"&&e.push(n);return e}function L1(t){return cp(t)?FO(t):see(t)}function iee(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var oee=Object.prototype,ree=oee.hasOwnProperty;function aee(t){if(!qi(t))return iee(t);var e=p4(t),n=[];for(var i in t)i=="constructor"&&(e||!ree.call(t,i))||n.push(i);return n}function O1(t){return cp(t)?FO(t,!0):aee(t)}var lee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cee=/^\w*$/;function v4(t,e){if(Yi(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Ob(t)?!0:cee.test(t)||!lee.test(t)||e!=null&&t in Object(e)}var uee=Fd(Object,"create");const Hg=uee;function dee(){this.__data__=Hg?Hg(null):{},this.size=0}function hee(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var fee="__lodash_hash_undefined__",pee=Object.prototype,mee=pee.hasOwnProperty;function gee(t){var e=this.__data__;if(Hg){var n=e[t];return n===fee?void 0:n}return mee.call(e,t)?e[t]:void 0}var vee=Object.prototype,_ee=vee.hasOwnProperty;function yee(t){var e=this.__data__;return Hg?e[t]!==void 0:_ee.call(e,t)}var bee="__lodash_hash_undefined__";function wee(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Hg&&e===void 0?bee:e,this}function vd(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])}}vd.prototype.clear=dee;vd.prototype.delete=hee;vd.prototype.get=gee;vd.prototype.has=yee;vd.prototype.set=wee;function kee(){this.__data__=[],this.size=0}function Rb(t,e){for(var n=t.length;n--;)if(I1(t[n][0],e))return n;return-1}var Cee=Array.prototype,xee=Cee.splice;function See(t){var e=this.__data__,n=Rb(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():xee.call(e,n,1),--this.size,!0}function $ee(t){var e=this.__data__,n=Rb(e,t);return n<0?void 0:e[n][1]}function Aee(t){return Rb(this.__data__,t)>-1}function Eee(t,e){var n=this.__data__,i=Rb(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}function Al(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])}}Al.prototype.clear=kee;Al.prototype.delete=See;Al.prototype.get=$ee;Al.prototype.has=Aee;Al.prototype.set=Eee;var Mee=Fd(ta,"Map");const Ug=Mee;function Tee(){this.size=0,this.__data__={hash:new vd,map:new(Ug||Al),string:new vd}}function Pee(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Vb(t,e){var n=t.__data__;return Pee(e)?n[typeof e=="string"?"string":"hash"]:n.map}function Iee(t){var e=Vb(this,t).delete(t);return this.size-=e?1:0,e}function Lee(t){return Vb(this,t).get(t)}function Oee(t){return Vb(this,t).has(t)}function Dee(t,e){var n=Vb(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}function El(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])}}El.prototype.clear=Tee;El.prototype.delete=Iee;El.prototype.get=Lee;El.prototype.has=Oee;El.prototype.set=Dee;var Ree="Expected a function";function _4(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Ree);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(_4.Cache||El),n}_4.Cache=El;var Vee=500;function Fee(t){var e=_4(t,function(i){return n.size===Vee&&n.clear(),i}),n=e.cache;return e}var Nee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Bee=/\\(\\)?/g,zee=Fee(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Nee,function(n,i,s,o){e.push(s?o.replace(Bee,"$1"):i||n)}),e});const Hee=zee;function Uee(t){return t==null?"":PO(t)}function up(t,e){return Yi(t)?t:v4(t,e)?[t]:Hee(Uee(t))}var jee=1/0;function dp(t){if(typeof t=="string"||Ob(t))return t;var e=t+"";return e=="0"&&1/t==-jee?"-0":e}function Fb(t,e){e=up(e,t);for(var n=0,i=e.length;t!=null&&n<i;)t=t[dp(e[n++])];return n&&n==i?t:void 0}function ji(t,e,n){var i=t==null?void 0:Fb(t,e);return i===void 0?n:i}function y4(t,e){for(var n=-1,i=e.length,s=t.length;++n<i;)t[s+n]=e[n];return t}var G7=yr?yr.isConcatSpreadable:void 0;function Wee(t){return Yi(t)||Bg(t)||!!(G7&&t&&t[G7])}function b4(t,e,n,i,s){var o=-1,r=t.length;for(n||(n=Wee),s||(s=[]);++o<r;){var a=t[o];e>0&&n(a)?e>1?b4(a,e-1,n,i,s):y4(s,a):i||(s[s.length]=a)}return s}function hy(t){var e=t==null?0:t.length;return e?b4(t,1):[]}function BO(t){return LO(OO(t,void 0,hy),t+"")}var Yee=NO(Object.getPrototypeOf,Object);const w4=Yee;var qee="[object Object]",Gee=Function.prototype,Xee=Object.prototype,zO=Gee.toString,Kee=Xee.hasOwnProperty,Zee=zO.call(Object);function k4(t){if(!Ea(t)||Rd(t)!=qee)return!1;var e=w4(t);if(e===null)return!0;var n=Kee.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n instanceof n&&zO.call(n)==Zee}function Jee(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 Yi(t)?t:[t]}function Qee(t,e,n){return t===t&&(n!==void 0&&(t=t<=n?t:n),e!==void 0&&(t=t>=e?t:e)),t}function HO(t,e,n){return n===void 0&&(n=e,e=void 0),n!==void 0&&(n=rf(n),n=n===n?n:0),e!==void 0&&(e=rf(e),e=e===e?e:0),Qee(rf(t),e,n)}function ete(){this.__data__=new Al,this.size=0}function tte(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function nte(t){return this.__data__.get(t)}function ste(t){return this.__data__.has(t)}var ite=200;function ote(t,e){var n=this.__data__;if(n instanceof Al){var i=n.__data__;if(!Ug||i.length<ite-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new El(i)}return n.set(t,e),this.size=n.size,this}function Br(t){var e=this.__data__=new Al(t);this.size=e.size}Br.prototype.clear=ete;Br.prototype.delete=tte;Br.prototype.get=nte;Br.prototype.has=ste;Br.prototype.set=ote;function rte(t,e){return t&&lp(e,L1(e),t)}function ate(t,e){return t&&lp(e,O1(e),t)}var UO=typeof Lo=="object"&&Lo&&!Lo.nodeType&&Lo,X7=UO&&typeof Oo=="object"&&Oo&&!Oo.nodeType&&Oo,lte=X7&&X7.exports===UO,K7=lte?ta.Buffer:void 0,Z7=K7?K7.allocUnsafe:void 0;function jO(t,e){if(e)return t.slice();var n=t.length,i=Z7?Z7(n):new t.constructor(n);return t.copy(i),i}function cte(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 WO(){return[]}var ute=Object.prototype,dte=ute.propertyIsEnumerable,J7=Object.getOwnPropertySymbols,hte=J7?function(t){return t==null?[]:(t=Object(t),cte(J7(t),function(e){return dte.call(t,e)}))}:WO;const C4=hte;function fte(t,e){return lp(t,C4(t),e)}var pte=Object.getOwnPropertySymbols,mte=pte?function(t){for(var e=[];t;)y4(e,C4(t)),t=w4(t);return e}:WO;const YO=mte;function gte(t,e){return lp(t,YO(t),e)}function qO(t,e,n){var i=e(t);return Yi(t)?i:y4(i,n(t))}function zk(t){return qO(t,L1,C4)}function GO(t){return qO(t,O1,YO)}var vte=Fd(ta,"DataView");const Hk=vte;var _te=Fd(ta,"Promise");const Uk=_te;var yte=Fd(ta,"Set");const jk=yte;var Q7="[object Map]",bte="[object Object]",e$="[object Promise]",t$="[object Set]",n$="[object WeakMap]",s$="[object DataView]",wte=Vd(Hk),kte=Vd(Ug),Cte=Vd(Uk),xte=Vd(jk),Ste=Vd(Bk),wu=Rd;(Hk&&wu(new Hk(new ArrayBuffer(1)))!=s$||Ug&&wu(new Ug)!=Q7||Uk&&wu(Uk.resolve())!=e$||jk&&wu(new jk)!=t$||Bk&&wu(new Bk)!=n$)&&(wu=function(t){var e=Rd(t),n=e==bte?t.constructor:void 0,i=n?Vd(n):"";if(i)switch(i){case wte:return s$;case kte:return Q7;case Cte:return e$;case xte:return t$;case Ste:return n$}return e});const jg=wu;var $te=Object.prototype,Ate=$te.hasOwnProperty;function Ete(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&Ate.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var Mte=ta.Uint8Array;const fy=Mte;function x4(t){var e=new t.constructor(t.byteLength);return new fy(e).set(new fy(t)),e}function Tte(t,e){var n=e?x4(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var Pte=/\w*$/;function Ite(t){var e=new t.constructor(t.source,Pte.exec(t));return e.lastIndex=t.lastIndex,e}var i$=yr?yr.prototype:void 0,o$=i$?i$.valueOf:void 0;function Lte(t){return o$?Object(o$.call(t)):{}}function XO(t,e){var n=e?x4(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var Ote="[object Boolean]",Dte="[object Date]",Rte="[object Map]",Vte="[object Number]",Fte="[object RegExp]",Nte="[object Set]",Bte="[object String]",zte="[object Symbol]",Hte="[object ArrayBuffer]",Ute="[object DataView]",jte="[object Float32Array]",Wte="[object Float64Array]",Yte="[object Int8Array]",qte="[object Int16Array]",Gte="[object Int32Array]",Xte="[object Uint8Array]",Kte="[object Uint8ClampedArray]",Zte="[object Uint16Array]",Jte="[object Uint32Array]";function Qte(t,e,n){var i=t.constructor;switch(e){case Hte:return x4(t);case Ote:case Dte:return new i(+t);case Ute:return Tte(t,n);case jte:case Wte:case Yte:case qte:case Gte:case Xte:case Kte:case Zte:case Jte:return XO(t,n);case Rte:return new i;case Vte:case Bte:return new i(t);case Fte:return Ite(t);case Nte:return new i;case zte:return Lte(t)}}function KO(t){return typeof t.constructor=="function"&&!p4(t)?YJ(w4(t)):{}}var ene="[object Map]";function tne(t){return Ea(t)&&jg(t)==ene}var r$=Of&&Of.isMap,nne=r$?m4(r$):tne;const sne=nne;var ine="[object Set]";function one(t){return Ea(t)&&jg(t)==ine}var a$=Of&&Of.isSet,rne=a$?m4(a$):one;const ane=rne;var lne=1,cne=2,une=4,ZO="[object Arguments]",dne="[object Array]",hne="[object Boolean]",fne="[object Date]",pne="[object Error]",JO="[object Function]",mne="[object GeneratorFunction]",gne="[object Map]",vne="[object Number]",QO="[object Object]",_ne="[object RegExp]",yne="[object Set]",bne="[object String]",wne="[object Symbol]",kne="[object WeakMap]",Cne="[object ArrayBuffer]",xne="[object DataView]",Sne="[object Float32Array]",$ne="[object Float64Array]",Ane="[object Int8Array]",Ene="[object Int16Array]",Mne="[object Int32Array]",Tne="[object Uint8Array]",Pne="[object Uint8ClampedArray]",Ine="[object Uint16Array]",Lne="[object Uint32Array]",qn={};qn[ZO]=qn[dne]=qn[Cne]=qn[xne]=qn[hne]=qn[fne]=qn[Sne]=qn[$ne]=qn[Ane]=qn[Ene]=qn[Mne]=qn[gne]=qn[vne]=qn[QO]=qn[_ne]=qn[yne]=qn[bne]=qn[wne]=qn[Tne]=qn[Pne]=qn[Ine]=qn[Lne]=!0;qn[pne]=qn[JO]=qn[kne]=!1;function Zm(t,e,n,i,s,o){var r,a=e&lne,l=e&cne,c=e&une;if(n&&(r=s?n(t,i,s,o):n(t)),r!==void 0)return r;if(!qi(t))return t;var u=Yi(t);if(u){if(r=Ete(t),!a)return IO(t,r)}else{var d=jg(t),h=d==JO||d==mne;if(zg(t))return jO(t,a);if(d==QO||d==ZO||h&&!s){if(r=l||h?{}:KO(t),!a)return l?gte(t,ate(r,t)):fte(t,rte(r,t))}else{if(!qn[d])return s?t:{};r=Qte(t,d,a)}}o||(o=new Br);var f=o.get(t);if(f)return f;o.set(t,r),ane(t)?t.forEach(function(y){r.add(Zm(y,e,n,y,t,o))}):sne(t)&&t.forEach(function(y,b){r.set(b,Zm(y,e,n,b,t,o))});var p=c?l?GO:zk:l?O1:L1,m=u?void 0:p(t);return sQ(m||t,function(y,b){m&&(b=y,y=t[b]),h4(r,b,Zm(y,e,n,b,t,o))}),r}var One=1,Dne=4;function Qu(t){return Zm(t,One|Dne)}var Rne="__lodash_hash_undefined__";function Vne(t){return this.__data__.set(t,Rne),this}function Fne(t){return this.__data__.has(t)}function py(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new El;++e<n;)this.add(t[e])}py.prototype.add=py.prototype.push=Vne;py.prototype.has=Fne;function Nne(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 Bne(t,e){return t.has(e)}var zne=1,Hne=2;function eD(t,e,n,i,s,o){var r=n&zne,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&Hne?new py: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(!Nne(e,function(b,k){if(!Bne(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 Une(t){var e=-1,n=Array(t.size);return t.forEach(function(i,s){n[++e]=[s,i]}),n}function jne(t){var e=-1,n=Array(t.size);return t.forEach(function(i){n[++e]=i}),n}var Wne=1,Yne=2,qne="[object Boolean]",Gne="[object Date]",Xne="[object Error]",Kne="[object Map]",Zne="[object Number]",Jne="[object RegExp]",Qne="[object Set]",ese="[object String]",tse="[object Symbol]",nse="[object ArrayBuffer]",sse="[object DataView]",l$=yr?yr.prototype:void 0,kw=l$?l$.valueOf:void 0;function ise(t,e,n,i,s,o,r){switch(n){case sse:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case nse:return!(t.byteLength!=e.byteLength||!o(new fy(t),new fy(e)));case qne:case Gne:case Zne:return I1(+t,+e);case Xne:return t.name==e.name&&t.message==e.message;case Jne:case ese:return t==e+"";case Kne:var a=Une;case Qne:var l=i&Wne;if(a||(a=jne),t.size!=e.size&&!l)return!1;var c=r.get(t);if(c)return c==e;i|=Yne,r.set(t,e);var u=eD(a(t),a(e),i,s,o,r);return r.delete(t),u;case tse:if(kw)return kw.call(t)==kw.call(e)}return!1}var ose=1,rse=Object.prototype,ase=rse.hasOwnProperty;function lse(t,e,n,i,s,o){var r=n&ose,a=zk(t),l=a.length,c=zk(e),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in e:ase.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,S=e.constructor;$!=S&&"constructor"in t&&"constructor"in e&&!(typeof $=="function"&&$ instanceof $&&typeof S=="function"&&S instanceof S)&&(m=!1)}return o.delete(t),o.delete(e),m}var cse=1,c$="[object Arguments]",u$="[object Array]",Uv="[object Object]",use=Object.prototype,d$=use.hasOwnProperty;function dse(t,e,n,i,s,o){var r=Yi(t),a=Yi(e),l=r?u$:jg(t),c=a?u$:jg(e);l=l==c$?Uv:l,c=c==c$?Uv:c;var u=l==Uv,d=c==Uv,h=l==c;if(h&&zg(t)){if(!zg(e))return!1;r=!0,u=!1}if(h&&!u)return o||(o=new Br),r||g4(t)?eD(t,e,n,i,s,o):ise(t,e,l,n,i,s,o);if(!(n&cse)){var f=u&&d$.call(t,"__wrapped__"),p=d&&d$.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,y=p?e.value():e;return o||(o=new Br),s(m,y,n,i,o)}}return h?(o||(o=new Br),lse(t,e,n,i,s,o)):!1}function Nb(t,e,n,i,s){return t===e?!0:t==null||e==null||!Ea(t)&&!Ea(e)?t!==t&&e!==e:dse(t,e,n,i,Nb,s)}var hse=1,fse=2;function pse(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 Br;if(i)var h=i(c,u,l,t,e,d);if(!(h===void 0?Nb(u,c,hse|fse,i,d):h))return!1}}return!0}function tD(t){return t===t&&!qi(t)}function mse(t){for(var e=L1(t),n=e.length;n--;){var i=e[n],s=t[i];e[n]=[i,s,tD(s)]}return e}function nD(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function gse(t){var e=mse(t);return e.length==1&&e[0][2]?nD(e[0][0],e[0][1]):function(n){return n===t||pse(n,t,e)}}function vse(t,e){return t!=null&&e in Object(t)}function _se(t,e,n){e=up(e,t);for(var i=-1,s=e.length,o=!1;++i<s;){var r=dp(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&&f4(s)&&Db(r,s)&&(Yi(t)||Bg(t)))}function sD(t,e){return t!=null&&_se(t,e,vse)}var yse=1,bse=2;function wse(t,e){return v4(t)&&tD(e)?nD(dp(t),e):function(n){var i=ji(n,t);return i===void 0&&i===e?sD(n,t):Nb(e,i,yse|bse)}}function kse(t){return function(e){return e==null?void 0:e[t]}}function Cse(t){return function(e){return Fb(e,t)}}function xse(t){return v4(t)?kse(dp(t)):Cse(t)}function iD(t){return typeof t=="function"?t:t==null?c4:typeof t=="object"?Yi(t)?wse(t[0],t[1]):gse(t):xse(t)}function Sse(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 $se=Sse();const oD=$se;function Ase(t,e){return t&&oD(t,e,L1)}function Ese(t,e){return function(n,i){if(n==null)return n;if(!cp(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 Mse=Ese(Ase);const Tse=Mse;var Pse=function(){return ta.Date.now()};const Cw=Pse;var Ise="Expected a function",Lse=Math.max,Ose=Math.min;function _d(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(Ise);e=rf(e)||0,qi(n)&&(u=!!n.leading,d="maxWait"in n,o=d?Lse(rf(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?Ose(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=Cw();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(Cw())}function S(){var M=Cw(),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 S.cancel=C,S.flush=$,S}function Wk(t,e,n){(n!==void 0&&!I1(t[e],n)||n===void 0&&!(e in t))&&d4(t,e,n)}function Dse(t){return Ea(t)&&cp(t)}function Yk(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Rse(t){return lp(t,O1(t))}function Vse(t,e,n,i,s,o,r){var a=Yk(t,n),l=Yk(e,n),c=r.get(l);if(c){Wk(t,n,c);return}var u=o?o(a,l,n+"",t,e,r):void 0,d=u===void 0;if(d){var h=Yi(l),f=!h&&zg(l),p=!h&&!f&&g4(l);u=l,h||f||p?Yi(a)?u=a:Dse(a)?u=IO(a):f?(d=!1,u=jO(l,!0)):p?(d=!1,u=XO(l,!0)):u=[]:k4(l)||Bg(l)?(u=a,Bg(a)?u=Rse(a):(!qi(a)||u4(a))&&(u=KO(l))):d=!1}d&&(r.set(l,u),s(u,l,i,o,r),r.delete(l)),Wk(t,n,u)}function rD(t,e,n,i,s){t!==e&&oD(e,function(o,r){if(s||(s=new Br),qi(o))Vse(t,e,r,n,rD,i,s);else{var a=i?i(Yk(t,r),o,r+"",t,e,s):void 0;a===void 0&&(a=o),Wk(t,r,a)}},O1)}function Fse(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}var Nse=Math.max,Bse=Math.min;function zse(t,e,n){var i=t==null?0:t.length;if(!i)return-1;var s=i-1;return n!==void 0&&(s=$J(n),s=n<0?Nse(i+s,0):Bse(s,i-1)),iQ(t,iD(e),s,!0)}function Hse(t,e){var n=-1,i=cp(t)?Array(t.length):[];return Tse(t,function(s,o,r){i[++n]=e(s,o,r)}),i}function Use(t,e){var n=Yi(t)?l4:Hse;return n(t,iD(e))}function aD(t,e){return b4(Use(t,e),1)}function Df(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 jse(t,e){return e.length<2?t:Fb(t,Jee(e,0,-1))}function Wi(t,e){return Nb(t,e)}function ui(t){return t==null}function Bb(t){return t===null}function Wse(t){return t===void 0}var Yse=hQ(function(t,e,n){rD(t,e,n)});const lD=Yse;var qse=Object.prototype,Gse=qse.hasOwnProperty;function Xse(t,e){e=up(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__"&&!Gse.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=jse(t,e);return r==null||delete r[dp(Fse(e))]}function Kse(t){return k4(t)?void 0:t}var Zse=1,Jse=2,Qse=4,eie=BO(function(t,e){var n={};if(t==null)return n;var i=!1;e=l4(e,function(o){return o=up(o,t),i||(i=o.length>1),o}),lp(t,GO(t),n),i&&(n=Zm(n,Zse|Jse|Qse,Kse));for(var s=e.length;s--;)Xse(n,e[s]);return n});const zb=eie;function cD(t,e,n,i){if(!qi(t))return t;e=up(e,t);for(var s=-1,o=e.length,r=o-1,a=t;a!=null&&++s<o;){var l=dp(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=qi(u)?u:Db(e[s+1])?[]:{})}h4(a,l,c),a=a[l]}return t}function tie(t,e,n){for(var i=-1,s=e.length,o={};++i<s;){var r=e[i],a=Fb(t,r);n(a,r)&&cD(o,up(r,t),a)}return o}function nie(t,e){return tie(t,e,function(n,i){return sD(t,i)})}var sie=BO(function(t,e){return t==null?{}:nie(t,e)});const S4=sie;function iie(t,e,n){return t==null?t:cD(t,e,n)}var oie="Expected a function";function jv(t,e,n){var i=!0,s=!0;if(typeof t!="function")throw new TypeError(oie);return qi(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),_d(t,e,{leading:i,maxWait:e,trailing:s})}const nn=t=>t===void 0,Jn=t=>typeof t=="boolean",wt=t=>typeof t=="number",$4=t=>!t&&t!==0||Me(t)&&t.length===0||yt(t)&&!Object.keys(t).length,Po=t=>typeof Element>"u"?!1:t instanceof Element,ka=t=>ui(t),rie=t=>Ke(t)?!Number.isNaN(Number(t)):!1,aie=t=>t===window,my=t=>Object.keys(t),uD=t=>Object.entries(t),Ac=(t,e,n)=>({get value(){return ji(t,e,n)},set value(i){iie(t,e,i)}}),dD="__epPropKey",de=t=>t,lie=t=>yt(t)&&!!t[dD],Hb=(t,e)=>{if(!yt(t)||lie(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),zt(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(", ");sL(`Invalid prop: validation failed${e?` for prop "${e}"`:""}. Expected one of [${d}], got value ${JSON.stringify(l)}.`)}return c}:void 0,[dD]:!0};return zt(t,"default")&&(a.default=s),a},Ge=t=>Df(Object.entries(t).map(([e,n])=>[e,Hb(n,e)])),A4=Ge({to:{type:de([String,Object]),required:!0},disabled:Boolean});var hD=class extends Error{constructor(t){super(t),this.name="ElementPlusError"}};function vo(t,e){throw new hD(`[${t}] ${e}`)}function Tt(t,e){{const n=Ke(t)?new hD(`[${t}] ${e}`):t;console.warn(n)}}const cie=["class","style"],uie=/^on[A-Z]/,Ub=(t={})=>{const{excludeListeners:e=!1,excludeKeys:n}=t,i=Y(()=>((n==null?void 0:n.value)||[]).concat(cie)),s=pt();return s?Y(()=>{var o;return Df(Object.entries((o=s.proxy)==null?void 0:o.$attrs).filter(([r])=>!i.value.includes(r)&&!(e&&uie.test(r))))}):(Tt("use-attrs","getCurrentInstance() returned null. useAttrs() must be called at the top of a setup function"),Y(()=>({})))};function fD(t,e){var n;const i=Fn();return _l(()=>{i.value=t()},{...e,flush:(n=e==null?void 0:e.flush)!=null?n:"sync"}),Rc(i)}function Nd(t){return pb()?(mb(t),!0):!1}function Ro(t){return typeof t=="function"?t():E(t)}function die(t){if(!hn(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 hn(t.value[i])&&!hn(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 hie(t){return die(Y(t))}const Kt=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const fie=t=>typeof t<"u",pD=t=>t!=null,pie=Object.prototype.toString,mie=t=>pie.call(t)==="[object Object]",mD=(t,e,n)=>Math.min(n,Math.max(e,t)),zr=()=>{},qk=gie();function gie(){var t,e;return Kt&&((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 gD(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 vie(t,e={}){let n,i,s=zr;const o=a=>{clearTimeout(a),s(),s=zr};return a=>{const l=Ro(t),c=Ro(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 _ie(...t){let e=0,n,i=!0,s=zr,o,r,a,l,c;!hn(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=zr)};return h=>{const f=Ro(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 yie(t){return t||pt()}function vD(t,e=200,n={}){return gD(vie(e,n),t)}function bie(t,e=200,n={}){const i=J(t.value),s=vD(()=>{i.value=t.value},e,n);return Te(t,()=>s()),i}function wie(t,e=200,n=!1,i=!0,s=!1){return gD(_ie(e,n,i,s),t)}function _D(t,e=!0,n){yie()?Ft(t,n):e?t():ot(t)}function Gk(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)},Ro(e))}return i&&(s.value=!0,Kt&&l()),Nd(a),{isPending:Rc(s),start:l,stop:a}}const Ml=Kt?window:void 0,kie=Kt?window.document:void 0;function js(t){var e;const n=Ro(t);return(e=n==null?void 0:n.$el)!=null?e:n}function Hn(...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 zr;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),Ro(s)],([u,d])=>{if(r(),!u)return;const h=mie(d)?{...d}:d;o.push(...n.flatMap(f=>i.map(p=>a(u,f,p,h))))},{immediate:!0,flush:"post"}),c=()=>{l(),r()};return Nd(c),c}let h$=!1;function yD(t,e,n={}){const{window:i=Ml,ignore:s=[],capture:o=!0,detectIframe:r=!1}=n;if(!i)return zr;qk&&!h$&&(h$=!0,Array.from(i.document.body.children).forEach(m=>m.addEventListener("click",zr)),i.document.documentElement.addEventListener("click",zr));let a=!0;const l=m=>Ro(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=Ro(m);return y&&y.$.subTree.shapeFlag===16}function u(m,y){const b=Ro(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=[Hn(i,"click",m=>{h||(h=!0,setTimeout(()=>{h=!1},0),d(m))},{passive:!0,capture:o}),Hn(i,"pointerdown",m=>{const y=js(t);a=!l(m)&&!!(y&&!m.composedPath().includes(y))},{passive:!0}),r&&Hn(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 Cie(){const t=J(!1),e=pt();return e&&Ft(()=>{t.value=!0},e),t}function jb(t){const e=Cie();return Y(()=>(e.value,!!t()))}function xie(t,e,n={}){const{window:i=Ml,...s}=n;let o;const r=jb(()=>i&&"MutationObserver"in i),a=()=>{o&&(o.disconnect(),o=void 0)},l=Y(()=>{const h=Ro(t),f=(Array.isArray(h)?h:[h]).map(js).filter(pD);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 Nd(d),{isSupported:r,stop:d,takeRecords:u}}function Sie(t,e={}){const{window:n=Ml}=e,i=jb(()=>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=_l(()=>{i.value&&(a(),s=n.matchMedia(Ro(t)),"addEventListener"in s?s.addEventListener("change",r):s.addListener(r),o.value=s.matches)});return Nd(()=>{l(),a(),s=void 0}),o}function $ie(t){return JSON.parse(JSON.stringify(t))}function Aie(t={}){const{document:e=kie}=t;if(!e)return J("visible");const n=J(e.visibilityState);return Hn(e,"visibilitychange",()=>{n.value=e.visibilityState}),n}function Ts(t,e,n={}){const{window:i=Ml,...s}=n;let o;const r=jb(()=>i&&"ResizeObserver"in i),a=()=>{o&&(o.disconnect(),o=void 0)},l=Y(()=>{const d=Ro(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 Nd(u),{isSupported:r,stop:u}}function f$(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}=Ts(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);_D(()=>{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 Eie(t,e,n={}){const{root:i,rootMargin:s="0px",threshold:o=0,window:r=Ml,immediate:a=!0}=n,l=jb(()=>r&&"IntersectionObserver"in r),c=Y(()=>{const p=Ro(t);return(Array.isArray(p)?p:[p]).map(js).filter(pD)});let u=zr;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=zr}},{immediate:a,flush:"post"}):zr,f=()=>{u(),h(),d.value=!1};return Nd(f),{isSupported:l,isActive:d,pause(){u(),d.value=!1},resume(){d.value=!0},stop:f}}function Mie(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=pt(),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):$ie(C):C,b=()=>fie(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 S=!1;return Te(()=>t[e],M=>{S||(S=!0,$.value=y(M),ot(()=>S=!1))}),Te($,M=>{!S&&(M!==t[e]||u)&&k(M)},{deep:u}),$}else return Y({get(){return b()},set(C){k(C)}})}function Tie(t={}){const{window:e=Ml}=t;if(!e)return J(!1);const n=J(e.document.hasFocus());return Hn(e,"blur",()=>{n.value=!1}),Hn(e,"focus",()=>{n.value=!0}),n}function Pie(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(),_D(c),Hn("resize",c,{passive:!0}),s){const u=Sie("(orientation: portrait)");Te(u,()=>c())}return{width:a,height:l}}function bD(){const t=Fn(),e=J(0),n=Y(()=>({minWidth:`${Math.max(e.value,a4)}px`}));return Ts(t,()=>{var s;e.value=((s=t.value)==null?void 0:s.getBoundingClientRect().width)??0}),{calculatorRef:t,calculatorWidth:e,inputStyle:n}}const fl=({from:t,replacement:e,scope:n,version:i,ref:s,type:o="API"},r)=>{Te(()=>E(r),a=>{a&&Tt(n,`[${o}] ${t} is about to be deprecated in version ${i}, please use ${e} instead. | |
| 42 | +For more detail, please visit: ${s} | |
| 43 | +`)},{immediate:!0})},Iie='a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])',wD=t=>typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot,p$=t=>typeof Element>"u"?!1:t instanceof Element,Lie=t=>getComputedStyle(t).position==="fixed"?!1:t.offsetParent!==null,m$=t=>Array.from(t.querySelectorAll(Iie)).filter(e=>Wg(e)&&Lie(e)),Wg=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}},E4=(t,e)=>{if(!t||!t.focus)return;let n=!1;p$(t)&&!Wg(t)&&!t.getAttribute("tabindex")&&(t.setAttribute("tabindex","-1"),n=!0),t.focus(e),p$(t)&&n&&t.removeAttribute("tabindex")},M4=()=>Kt&&/firefox/i.test(window.navigator.userAgent),kD=()=>Kt&&/android/i.test(window.navigator.userAgent),Oie=(t="")=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d"),xw=t=>Gc(t),Die="utils/dom/style",CD=(t="")=>t.split(" ").filter(e=>!!e.trim()),pl=(t,e)=>{if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList.contains(e)},yd=(t,e)=>{!t||!e.trim()||t.classList.add(...CD(e))},Ma=(t,e)=>{!t||!e.trim()||t.classList.remove(...CD(e))},il=(t,e)=>{var i;if(!Kt||!t||!e||wD(t))return"";let n=Un(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]}},xD=(t,e,n)=>{if(!(!t||!e))if(yt(e))uD(e).forEach(([i,s])=>xD(t,i,s));else{const i=Un(e);t.style[i]=n}};function fi(t,e="px"){if(!t&&t!==0)return"";if(wt(t)||rie(t))return`${t}${e}`;if(Ke(t))return t;Tt(Die,"binding value must be a string or number")}const SD=(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,S=document.documentElement.clientWidth,M=document.documentElement.clientHeight,P=-b+p,T=-k+m,I=S-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(${fi(h)}, ${fi(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(()=>{_l(()=>{n.value?l():c()})}),wn(()=>{c()}),{isDragging:o,resetPosition:u,updatePosition:d}};var Rie={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 Vie=t=>(e,n)=>Fie(e,n,E(t)),Fie=(t,e,n)=>ji(n,t,t).replace(/\{(\w+)\}/g,(i,s)=>`${(e==null?void 0:e[s])??`{${s}}`}`),Nie=t=>({lang:Y(()=>E(t).name),locale:hn(t)?t:J(t),t:Vie(t)}),$D=Symbol("localeContextKey"),Qt=t=>{const e=t||qe($D,J());return Nie(Y(()=>e.value||Rie))},Jm="el",Bie="is-",mu=(t,e,n,i,s)=>{let o=`${t}-${e}`;return n&&(o+=`-${n}`),i&&(o+=`__${i}`),s&&(o+=`--${s}`),o},AD=Symbol("namespaceContextKey"),T4=t=>{const e=t||(pt()?qe(AD,J(Jm)):J(Jm));return Y(()=>E(e)||Jm)},Be=(t,e)=>{const n=T4(e);return{namespace:n,b:(m="")=>mu(n.value,t,m,"",""),e:m=>m?mu(n.value,t,"",m,""):"",m:m=>m?mu(n.value,t,"","",m):"",be:(m,y)=>m&&y?mu(n.value,t,m,y,""):"",em:(m,y)=>m&&y?mu(n.value,t,"",m,y):"",bm:(m,y)=>m&&y?mu(n.value,t,m,"",y):"",bem:(m,y,b)=>m&&y&&b?mu(n.value,t,m,y,b):"",is:(m,...y)=>{const b=y.length>=1?y[0]:!0;return m&&b?`${Bie}${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}`}},Yg=t=>Kt?window.requestAnimationFrame(t):setTimeout(t,16),zie=t=>Kt?window.cancelAnimationFrame(t):clearTimeout(t),Hie=(t,e)=>{if(!Kt)return!1;const n={undefined:"overflow",true:"overflow-y",false:"overflow-x"}[String(e)],i=il(t,n);return["scroll","auto","overlay"].some(s=>i.includes(s))},Uie=(t,e)=>{if(!Kt)return;let n=t;for(;n;){if([window,document,document.documentElement].includes(n))return window;if(Hie(n,e))return n;wD(n)?n=n.host:n=n.parentNode}return n};let Wv;const jie=t=>{var o;if(!Kt)return 0;if(Wv!==void 0)return Wv;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),Wv=n-s,Wv};function Wie(t,e){if(!Kt)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 P4=(t,e={})=>{hn(t)||vo("[useLockscreen]","You need to pass a ref param to this function");const n=e.ns||Be("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,Ma(document.body,i.value))},200))};Te(t,c=>{if(!c){l();return}a=!1,o=!pl(document.body,i.value),o&&(r=document.body.style.width,yd(document.body,i.value)),s=jie(n.namespace.value);const u=document.documentElement.clientHeight<document.body.scrollHeight,d=il(document.body,"overflowY");s>0&&(u||d==="scroll")&&o&&(document.body.style.width=`calc(100% - ${s}px)`)}),mb(()=>l())},Ms=(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)},g$=t=>e=>e.pointerType==="mouse"?t(e):void 0,ls=t=>{if(t.code&&t.code!=="Unidentified")return t.code;const e=ED(t);if(e){if(Object.values(Ue).includes(e))return e;switch(e){case" ":return Ue.space;default:return""}}return""},ED=t=>{let e=t.key&&t.key!=="Unidentified"?t.key:"";if(!e&&t.type==="keyup"&&kD()){const n=t.target;e=n.value.charAt(n.selectionStart-1)}return e},Yie=Hb({type:de(Boolean),default:null}),qie=Hb({type:de(Function)}),MD=t=>{const e=`update:${t}`,n=`onUpdate:${t}`,i=[e],s={[t]:Yie,[n]:qie};return{useModelToggle:({indicator:r,toggleReason:a,shouldHideWhenRouteChanges:l,shouldProceed:c,onShow:u,onHide:d})=>{const h=pt(),{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&&Kt;T&&f(e,!0),(y.value||!T)&&b(P)},$=P=>{if(p.disabled===!0||!Kt)return;const T=m.value&&Kt;T&&f(e,!1),(y.value||!T)&&k(P)},S=P=>{Jn(P)&&(p.disabled&&P?m.value&&f(e,!1):r.value!==P&&(P?b():k()))},M=()=>{r.value?$():C()};return Te(()=>p[t],S),l&&h.appContext.config.globalProperties.$route!==void 0&&Te(()=>({...h.proxy.$route}),()=>{l.value&&r.value&&$()}),Ft(()=>{S(p[t])}),{hide:$,show:C,toggle:M,hasUpdateHandler:m}},useModelToggleProps:s,useModelToggleEmits:i}};MD("modelValue");const TD=t=>{const e=pt();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 ho="top",br="bottom",wr="right",fo="left",I4="auto",D1=[ho,br,wr,fo],Rf="start",qg="end",Gie="clippingParents",PD="viewport",qp="popper",Xie="reference",v$=D1.reduce(function(t,e){return t.concat([e+"-"+Rf,e+"-"+qg])},[]),hp=[].concat(D1,[I4]).reduce(function(t,e){return t.concat([e,e+"-"+Rf,e+"-"+qg])},[]),Kie="beforeRead",Zie="read",Jie="afterRead",Qie="beforeMain",eoe="main",toe="afterMain",noe="beforeWrite",soe="write",ioe="afterWrite",ooe=[Kie,Zie,Jie,Qie,eoe,toe,noe,soe,ioe];function Ta(t){return t?(t.nodeName||"").toLowerCase():null}function na(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Vf(t){var e=na(t).Element;return t instanceof e||t instanceof Element}function fr(t){var e=na(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function L4(t){if(typeof ShadowRoot>"u")return!1;var e=na(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function roe(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];!fr(o)||!Ta(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 aoe(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},{});!fr(s)||!Ta(s)||(Object.assign(s.style,a),Object.keys(o).forEach(function(l){s.removeAttribute(l)}))})}}var ID={name:"applyStyles",enabled:!0,phase:"write",fn:roe,effect:aoe,requires:["computeStyles"]};function Sa(t){return t.split("-")[0]}var ed=Math.max,gy=Math.min,Ff=Math.round;function Nf(t,e){e===void 0&&(e=!1);var n=t.getBoundingClientRect(),i=1,s=1;if(fr(t)&&e){var o=t.offsetHeight,r=t.offsetWidth;r>0&&(i=Ff(n.width)/r||1),o>0&&(s=Ff(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 O4(t){var e=Nf(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 LD(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&L4(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function bl(t){return na(t).getComputedStyle(t)}function loe(t){return["table","td","th"].indexOf(Ta(t))>=0}function Xc(t){return((Vf(t)?t.ownerDocument:t.document)||window.document).documentElement}function Wb(t){return Ta(t)==="html"?t:t.assignedSlot||t.parentNode||(L4(t)?t.host:null)||Xc(t)}function _$(t){return!fr(t)||bl(t).position==="fixed"?null:t.offsetParent}function coe(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&fr(t)){var i=bl(t);if(i.position==="fixed")return null}var s=Wb(t);for(L4(s)&&(s=s.host);fr(s)&&["html","body"].indexOf(Ta(s))<0;){var o=bl(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 R1(t){for(var e=na(t),n=_$(t);n&&loe(n)&&bl(n).position==="static";)n=_$(n);return n&&(Ta(n)==="html"||Ta(n)==="body"&&bl(n).position==="static")?e:n||coe(t)||e}function D4(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function Qm(t,e,n){return ed(t,gy(e,n))}function uoe(t,e,n){var i=Qm(t,e,n);return i>n?n:i}function OD(){return{top:0,right:0,bottom:0,left:0}}function DD(t){return Object.assign({},OD(),t)}function RD(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var doe=function(t,e){return t=typeof t=="function"?t(Object.assign({},e.rects,{placement:e.placement})):t,DD(typeof t!="number"?t:RD(t,D1))};function hoe(t){var e,n=t.state,i=t.name,s=t.options,o=n.elements.arrow,r=n.modifiersData.popperOffsets,a=Sa(n.placement),l=D4(a),c=[fo,wr].indexOf(a)>=0,u=c?"height":"width";if(!(!o||!r)){var d=doe(s.padding,n),h=O4(o),f=l==="y"?ho:fo,p=l==="y"?br:wr,m=n.rects.reference[u]+n.rects.reference[l]-r[l]-n.rects.popper[u],y=r[l]-n.rects.reference[l],b=R1(o),k=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,C=m/2-y/2,$=d[f],S=k-h[u]-d[p],M=k/2-h[u]/2+C,P=Qm($,M,S),T=l;n.modifiersData[i]=(e={},e[T]=P,e.centerOffset=P-M,e)}}function foe(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)||!LD(e.elements.popper,s)||(e.elements.arrow=s))}var poe={name:"arrow",enabled:!0,phase:"main",fn:hoe,effect:foe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Bf(t){return t.split("-")[1]}var moe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function goe(t){var e=t.x,n=t.y,i=window,s=i.devicePixelRatio||1;return{x:Ff(e*s)/s||0,y:Ff(n*s)/s||0}}function y$(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=fo,$=ho,S=window;if(c){var M=R1(n),P="clientHeight",T="clientWidth";if(M===na(n)&&(M=Xc(n),bl(M).position!=="static"&&a==="absolute"&&(P="scrollHeight",T="scrollWidth")),M=M,s===ho||(s===fo||s===wr)&&o===qg){$=br;var I=d&&M===S&&S.visualViewport?S.visualViewport.height:M[P];m-=I-i.height,m*=l?1:-1}if(s===fo||(s===ho||s===br)&&o===qg){C=wr;var L=d&&M===S&&S.visualViewport?S.visualViewport.width:M[T];f-=L-i.width,f*=l?1:-1}}var R=Object.assign({position:a},c&&moe),V=u===!0?goe({x:f,y:m}):{x:f,y:m};if(f=V.x,m=V.y,l){var B;return Object.assign({},R,(B={},B[$]=k?"0":"",B[C]=b?"0":"",B.transform=(S.devicePixelRatio||1)<=1?"translate("+f+"px, "+m+"px)":"translate3d("+f+"px, "+m+"px, 0)",B))}return Object.assign({},R,(e={},e[$]=k?m+"px":"",e[C]=b?f+"px":"",e.transform="",e))}function voe(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:Sa(e.placement),variation:Bf(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,y$(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,y$(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 VD={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:voe,data:{}},Yv={passive:!0};function _oe(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=na(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,Yv)}),a&&l.addEventListener("resize",n.update,Yv),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Yv)}),a&&l.removeEventListener("resize",n.update,Yv)}}var FD={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:_oe,data:{}},yoe={left:"right",right:"left",bottom:"top",top:"bottom"};function I0(t){return t.replace(/left|right|bottom|top/g,function(e){return yoe[e]})}var boe={start:"end",end:"start"};function b$(t){return t.replace(/start|end/g,function(e){return boe[e]})}function R4(t){var e=na(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function V4(t){return Nf(Xc(t)).left+R4(t).scrollLeft}function woe(t){var e=na(t),n=Xc(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+V4(t),y:a}}function koe(t){var e,n=Xc(t),i=R4(t),s=(e=t.ownerDocument)==null?void 0:e.body,o=ed(n.scrollWidth,n.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=ed(n.scrollHeight,n.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-i.scrollLeft+V4(t),l=-i.scrollTop;return bl(s||n).direction==="rtl"&&(a+=ed(n.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}function F4(t){var e=bl(t),n=e.overflow,i=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+s+i)}function ND(t){return["html","body","#document"].indexOf(Ta(t))>=0?t.ownerDocument.body:fr(t)&&F4(t)?t:ND(Wb(t))}function eg(t,e){var n;e===void 0&&(e=[]);var i=ND(t),s=i===((n=t.ownerDocument)==null?void 0:n.body),o=na(i),r=s?[o].concat(o.visualViewport||[],F4(i)?i:[]):i,a=e.concat(r);return s?a:a.concat(eg(Wb(r)))}function Xk(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Coe(t){var e=Nf(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 w$(t,e){return e===PD?Xk(woe(t)):Vf(e)?Coe(e):Xk(koe(Xc(t)))}function xoe(t){var e=eg(Wb(t)),n=["absolute","fixed"].indexOf(bl(t).position)>=0,i=n&&fr(t)?R1(t):t;return Vf(i)?e.filter(function(s){return Vf(s)&&LD(s,i)&&Ta(s)!=="body"}):[]}function Soe(t,e,n){var i=e==="clippingParents"?xoe(t):[].concat(e),s=[].concat(i,[n]),o=s[0],r=s.reduce(function(a,l){var c=w$(t,l);return a.top=ed(c.top,a.top),a.right=gy(c.right,a.right),a.bottom=gy(c.bottom,a.bottom),a.left=ed(c.left,a.left),a},w$(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 BD(t){var e=t.reference,n=t.element,i=t.placement,s=i?Sa(i):null,o=i?Bf(i):null,r=e.x+e.width/2-n.width/2,a=e.y+e.height/2-n.height/2,l;switch(s){case ho:l={x:r,y:e.y-n.height};break;case br:l={x:r,y:e.y+e.height};break;case wr:l={x:e.x+e.width,y:a};break;case fo: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 Rf:l[c]=l[c]-(e[u]/2-n[u]/2);break;case qg:l[c]=l[c]+(e[u]/2-n[u]/2);break}}return l}function Gg(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?Gie:o,a=n.rootBoundary,l=a===void 0?PD:a,c=n.elementContext,u=c===void 0?qp:c,d=n.altBoundary,h=d===void 0?!1:d,f=n.padding,p=f===void 0?0:f,m=DD(typeof p!="number"?p:RD(p,D1)),y=u===qp?Xie:qp,b=t.rects.popper,k=t.elements[h?y:u],C=Soe(Vf(k)?k:k.contextElement||Xc(t.elements.popper),r,l),$=Nf(t.elements.reference),S=BD({reference:$,element:b,strategy:"absolute",placement:s}),M=Xk(Object.assign({},b,S)),P=u===qp?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===qp&&I){var L=I[s];Object.keys(T).forEach(function(R){var V=[wr,br].indexOf(R)>=0?1:-1,B=[ho,br].indexOf(R)>=0?"y":"x";T[R]+=L[B]*V})}return T}function $oe(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?hp:l,u=Bf(i),d=u?a?v$:v$.filter(function(p){return Bf(p)===u}):D1,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]=Gg(t,{placement:m,boundary:s,rootBoundary:o,padding:r})[Sa(m)],p},{});return Object.keys(f).sort(function(p,m){return f[p]-f[m]})}function Aoe(t){if(Sa(t)===I4)return[];var e=I0(t);return[b$(t),e,b$(e)]}function Eoe(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=Sa(y),k=b===y,C=l||(k||!p?[I0(y)]:Aoe(y)),$=[y].concat(C).reduce(function(ae,ge){return ae.concat(Sa(ge)===I4?$oe(e,{placement:ge,boundary:u,rootBoundary:d,padding:c,flipVariations:p,allowedAutoPlacements:m}):ge)},[]),S=e.rects.reference,M=e.rects.popper,P=new Map,T=!0,I=$[0],L=0;L<$.length;L++){var R=$[L],V=Sa(R),B=Bf(R)===Rf,F=[ho,br].indexOf(V)>=0,z=F?"width":"height",U=Gg(e,{placement:R,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),G=F?B?wr:fo:B?br:ho;S[z]>M[z]&&(G=I0(G));var K=I0(G),X=[];if(o&&X.push(U[V]<=0),a&&X.push(U[G]<=0,U[K]<=0),X.every(function(ae){return ae})){I=R,T=!1;break}P.set(R,X)}if(T)for(var W=p?3:1,Q=function(ae){var ge=$.find(function(Ce){var oe=P.get(Ce);if(oe)return oe.slice(0,ae).every(function(pe){return pe})});if(ge)return I=ge,"break"},ne=W;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 Moe={name:"flip",enabled:!0,phase:"main",fn:Eoe,requiresIfExists:["offset"],data:{_skip:!1}};function k$(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 C$(t){return[ho,wr,br,fo].some(function(e){return t[e]>=0})}function Toe(t){var e=t.state,n=t.name,i=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=Gg(e,{elementContext:"reference"}),a=Gg(e,{altBoundary:!0}),l=k$(r,i),c=k$(a,s,o),u=C$(l),d=C$(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 Poe={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Toe};function Ioe(t,e,n){var i=Sa(t),s=[fo,ho].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,[fo,wr].indexOf(i)>=0?{x:a,y:r}:{x:r,y:a}}function Loe(t){var e=t.state,n=t.options,i=t.name,s=n.offset,o=s===void 0?[0,0]:s,r=hp.reduce(function(u,d){return u[d]=Ioe(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 Ooe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Loe};function Doe(t){var e=t.state,n=t.name;e.modifiersData[n]=BD({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var zD={name:"popperOffsets",enabled:!0,phase:"read",fn:Doe,data:{}};function Roe(t){return t==="x"?"y":"x"}function Voe(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=Gg(e,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=Sa(e.placement),k=Bf(e.placement),C=!k,$=D4(b),S=Roe($),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 B,F=$==="y"?ho:fo,z=$==="y"?br:wr,U=$==="y"?"height":"width",G=M[$],K=G+y[F],X=G-y[z],W=f?-T[U]/2:0,Q=k===Rf?P[U]:T[U],ne=k===Rf?-T[U]:-P[U],Z=e.elements.arrow,ae=f&&Z?O4(Z):{width:0,height:0},ge=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:OD(),Ce=ge[F],oe=ge[z],pe=Qm(0,P[U],ae[U]),ie=C?P[U]/2-W-pe-Ce-L.mainAxis:Q-pe-Ce-L.mainAxis,re=C?-P[U]/2+W+pe+oe+L.mainAxis:ne+pe+oe+L.mainAxis,ke=e.elements.arrow&&R1(e.elements.arrow),je=ke?$==="y"?ke.clientTop||0:ke.clientLeft||0:0,te=(B=R==null?void 0:R[$])!=null?B:0,se=G+ie-te-je,me=G+re-te,$e=Qm(f?gy(K,se):K,G,f?ed(X,me):X);M[$]=$e,V[$]=$e-G}if(a){var Se,Le=$==="x"?ho:fo,We=$==="x"?br:wr,Fe=M[S],ze=S==="y"?"height":"width",Ae=Fe+y[Le],Ze=Fe-y[We],Ye=[ho,fo].indexOf(b)!==-1,it=(Se=R==null?void 0:R[S])!=null?Se:0,ye=Ye?Ae:Fe-P[ze]-T[ze]-it+L.altAxis,ve=Ye?Fe+P[ze]+T[ze]-it-L.altAxis:Ze,Pe=f&&Ye?uoe(ye,Fe,ve):Qm(f?ye:Ae,Fe,f?ve:Ze);M[S]=Pe,V[S]=Pe-Fe}e.modifiersData[i]=V}}var Foe={name:"preventOverflow",enabled:!0,phase:"main",fn:Voe,requiresIfExists:["offset"]};function Noe(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Boe(t){return t===na(t)||!fr(t)?R4(t):Noe(t)}function zoe(t){var e=t.getBoundingClientRect(),n=Ff(e.width)/t.offsetWidth||1,i=Ff(e.height)/t.offsetHeight||1;return n!==1||i!==1}function Hoe(t,e,n){n===void 0&&(n=!1);var i=fr(e),s=fr(e)&&zoe(e),o=Xc(e),r=Nf(t,s),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(i||!i&&!n)&&((Ta(e)!=="body"||F4(o))&&(a=Boe(e)),fr(e)?(l=Nf(e,!0),l.x+=e.clientLeft,l.y+=e.clientTop):o&&(l.x=V4(o))),{x:r.left+a.scrollLeft-l.x,y:r.top+a.scrollTop-l.y,width:r.width,height:r.height}}function Uoe(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 joe(t){var e=Uoe(t);return ooe.reduce(function(n,i){return n.concat(e.filter(function(s){return s.phase===i}))},[])}function Woe(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Yoe(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 x$={placement:"bottom",modifiers:[],strategy:"absolute"};function S$(){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 N4(t){t===void 0&&(t={});var e=t,n=e.defaultModifiers,i=n===void 0?[]:n,s=e.defaultOptions,o=s===void 0?x$:s;return function(r,a,l){l===void 0&&(l=o);var c={placement:"bottom",orderedModifiers:[],options:Object.assign({},x$,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:Vf(r)?eg(r):r.contextElement?eg(r.contextElement):[],popper:eg(a)};var b=joe(Yoe([].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(S$(y,b)){c.rects={reference:Hoe(y,R1(b),c.options.strategy==="fixed"),popper:O4(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,S=C.options,M=S===void 0?{}:S,P=C.name;typeof $=="function"&&(c=$({state:c,options:M,name:P,instance:h})||c)}}}},update:Woe(function(){return new Promise(function(m){h.forceUpdate(),m(c)})}),destroy:function(){p(),d=!0}};if(!S$(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}),S=function(){};u.push($||S)}})}function p(){u.forEach(function(m){return m()}),u=[]}return h}}N4();var qoe=[FD,zD,VD,ID];N4({defaultModifiers:qoe});var Goe=[FD,zD,VD,ID,Ooe,Moe,Foe,poe,Poe],Xoe=N4({defaultModifiers:Goe});const Koe=(t,e,n={})=>{const i={name:"updateState",enabled:!0,phase:"write",fn:({state:l})=>{const c=Zoe(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=Fn(),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=Xoe(l,c,E(s)))}),wn(()=>{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 Zoe(t){const e=Object.keys(t.elements);return{styles:Df(e.map(n=>[n,t.styles[n]||{}])),attributes:Df(e.map(n=>[n,t.attributes[n]]))}}const B4=t=>{if(!t)return{onClick:Dt,onMousedown:Dt,onMouseup:Dt};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}}},Joe=(t,e=0)=>{if(e===0)return t;const n=J(yt(e)&&!!e.initVal);let i=null;const s=r=>{if(nn(r)){n.value=t.value;return}i&&clearTimeout(i),i=setTimeout(()=>{n.value=t.value},r)},o=r=>{r==="leading"?wt(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 $$(){let t;const e=(i,s)=>{n(),t=window.setTimeout(i,s)},n=()=>window.clearTimeout(t);return Nd(()=>n()),{registerTimeout:e,cancelTimeout:n}}const Kk={prefix:Math.floor(Math.random()*1e4),current:0},Qoe=Symbol("elIdInjection"),z4=()=>pt()?qe(Qoe,Kk):Kk,kr=t=>{const e=z4();!Kt&&e===Kk&&Tt("IdInjection",`Looks like you are using server rendering, you must provide a id provider to ensure the hydration process to be succeed | |
| 44 | +usage: app.provide(ID_INJECTION_KEY, { | |
| 45 | + prefix: number, | |
| 46 | + current: number, | |
| 47 | +})`);const n=T4();return fD(()=>E(t)||`${n.value}-id-${e.prefix}-${e.current++}`)};let Ah=[];const A$=t=>{ls(t)===Ue.esc&&Ah.forEach(e=>e(t))},ere=t=>{Ft(()=>{Ah.length===0&&document.addEventListener("keydown",A$),Kt&&Ah.push(t)}),wn(()=>{Ah=Ah.filter(e=>e!==t),Ah.length===0&&Kt&&document.removeEventListener("keydown",A$)})},HD=()=>{const t=T4(),e=z4(),n=Y(()=>`${t.value}-popper-container-${e.prefix}`);return{id:n,selector:Y(()=>`#${n.value}`)}},tre=t=>{const e=document.createElement("div");return e.id=t,document.body.appendChild(e),e},nre=()=>{const{id:t,selector:e}=HD();return Od(()=>{Kt&&(document.body.querySelector(e.value)||tre(t.value))}),{id:t,selector:e}},sre=Ge({showAfter:{type:Number,default:0},hideAfter:{type:Number,default:200},autoClose:{type:Number,default:0}}),ire=({showAfter:t,hideAfter:e,autoClose:n,open:i,close:s})=>{const{registerTimeout:o}=$$(),{registerTimeout:r,cancelTimeout:a}=$$();return{onOpen:(u,d=E(t))=>{o(()=>{i(u);const h=E(n);wt(h)&&h>0&&r(()=>{s(u)},h)},d)},onClose:(u,d=E(e))=>{a(),o(()=>{s(u)},d)}}},UD=Symbol("elForwardRef"),ore=t=>{Pt(UD,{setForwardRef:n=>{t.value=n}})},rre=t=>({mounted(e){t(e)},updated(e){t(e)},unmounted(){t(null)}}),E$={current:0},M$=J(0),jD=2e3,T$=Symbol("elZIndexContextKey"),WD=Symbol("zIndexContextKey"),Yb=t=>{const e=pt()?qe(T$,E$):E$,n=t||(pt()?qe(WD,void 0):void 0),i=Y(()=>{const r=E(n);return wt(r)?r:jD}),s=Y(()=>i.value+M$.value),o=()=>(e.current++,M$.value=e.current,s.value);return!Kt&&!qe(T$)&&Tt("ZIndexInjection",`Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed | |
| 48 | +usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`),{initialZIndex:i,currentZIndex:s,nextZIndex:o}},P$=Math.min,tg=Math.max,vy=Math.round,Nc=t=>({x:t,y:t}),are={left:"right",right:"left",bottom:"top",top:"bottom"},lre={start:"end",end:"start"};function H4(t,e){return typeof t=="function"?t(e):t}function zf(t){return t.split("-")[0]}function qb(t){return t.split("-")[1]}function cre(t){return t==="x"?"y":"x"}function YD(t){return t==="y"?"height":"width"}function Xg(t){return["top","bottom"].includes(zf(t))?"y":"x"}function qD(t){return cre(Xg(t))}function ure(t,e,n){n===void 0&&(n=!1);const i=qb(t),s=qD(t),o=YD(s);let r=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(r=_y(r)),[r,_y(r)]}function dre(t){const e=_y(t);return[Zk(t),e,Zk(e)]}function Zk(t){return t.replace(/start|end/g,e=>lre[e])}function hre(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 fre(t,e,n,i){const s=qb(t);let o=hre(zf(t),n==="start",i);return s&&(o=o.map(r=>r+"-"+s),e&&(o=o.concat(o.map(Zk)))),o}function _y(t){return t.replace(/left|right|bottom|top/g,e=>are[e])}function pre(t){return{top:0,right:0,bottom:0,left:0,...t}}function mre(t){return typeof t!="number"?pre(t):{top:t,right:t,bottom:t,left:t}}function yy(t){const{x:e,y:n,width:i,height:s}=t;return{width:i,height:s,top:n,left:e,right:e+i,bottom:n+s,x:e,y:n}}function I$(t,e,n){let{reference:i,floating:s}=t;const o=Xg(e),r=qD(e),a=YD(r),l=zf(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(qb(e)){case"start":f[r]-=h*(n&&c?-1:1);break;case"end":f[r]+=h*(n&&c?-1:1);break}return f}const gre=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:S}=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],...$}},S&&p<=50&&(p++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(c=S.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:s}):S.rects),{x:u,y:d}=I$(c,h,l)),m=-1)}return{x:u,y:d,placement:h,strategy:s,middlewareData:f}};async function vre(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}=H4(e,t),p=mre(f),y=a[h?d==="floating"?"reference":"floating":d],b=yy(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"?{x:i,y:s,width:r.floating.width,height:r.floating.height}: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},S=yy(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:k,offsetParent:C,strategy:l}):k);return{top:(b.top-S.top+p.top)/$.y,bottom:(S.bottom-b.bottom+p.bottom)/$.y,left:(b.left-S.left+p.left)/$.x,right:(S.right-b.right+p.right)/$.x}}const _re=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}=H4(t,e);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const b=zf(s),k=Xg(a),C=zf(a)===a,$=await(l.isRTL==null?void 0:l.isRTL(c.floating)),S=h||(C||!m?[_y(a)]:dre(a)),M=p!=="none";!h&&M&&S.push(...fre(a,m,p,$));const P=[a,...S],T=await vre(e,y),I=[];let L=((i=o.flip)==null?void 0:i.overflows)||[];if(u&&I.push(T[b]),d){const F=ure(s,r,$);I.push(T[F[0]],T[F[1]])}if(L=[...L,{placement:s,overflows:I}],!I.every(F=>F<=0)){var R,V;const F=(((R=o.flip)==null?void 0:R.index)||0)+1,z=P[F];if(z)return{data:{index:F,overflows:L},reset:{placement:z}};let U=(V=L.filter(G=>G.overflows[0]<=0).sort((G,K)=>G.overflows[1]-K.overflows[1])[0])==null?void 0:V.placement;if(!U)switch(f){case"bestFit":{var B;const G=(B=L.filter(K=>{if(M){const X=Xg(K.placement);return X===k||X==="y"}return!0}).map(K=>[K.placement,K.overflows.filter(X=>X>0).reduce((X,W)=>X+W,0)]).sort((K,X)=>K[1]-X[1])[0])==null?void 0:B[0];G&&(U=G);break}case"initialPlacement":U=a;break}if(s!==U)return{reset:{placement:U}}}return{}}}};async function yre(t,e){const{placement:n,platform:i,elements:s}=t,o=await(i.isRTL==null?void 0:i.isRTL(s.floating)),r=zf(n),a=qb(n),l=Xg(n)==="y",c=["left","top"].includes(r)?-1:1,u=o&&l?-1:1,d=H4(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 bre=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 yre(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 fp(t){return GD(t)?(t.nodeName||"").toLowerCase():"#document"}function Vo(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Kc(t){var e;return(e=(GD(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function GD(t){return t instanceof Node||t instanceof Vo(t).Node}function Kr(t){return t instanceof Element||t instanceof Vo(t).Element}function Pa(t){return t instanceof HTMLElement||t instanceof Vo(t).HTMLElement}function L$(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Vo(t).ShadowRoot}function V1(t){const{overflow:e,overflowX:n,overflowY:i,display:s}=Zr(t);return/auto|scroll|overlay|hidden|clip/.test(e+i+n)&&!["inline","contents"].includes(s)}function wre(t){return["table","td","th"].includes(fp(t))}function Gb(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function U4(t){const e=j4(),n=Kr(t)?Zr(t):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 kre(t){let e=Bc(t);for(;Pa(e)&&!Hf(e);){if(U4(e))return e;if(Gb(e))return null;e=Bc(e)}return null}function j4(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Hf(t){return["html","body","#document"].includes(fp(t))}function Zr(t){return Vo(t).getComputedStyle(t)}function Xb(t){return Kr(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Bc(t){if(fp(t)==="html")return t;const e=t.assignedSlot||t.parentNode||L$(t)&&t.host||Kc(t);return L$(e)?e.host:e}function XD(t){const e=Bc(t);return Hf(e)?t.ownerDocument?t.ownerDocument.body:t.body:Pa(e)&&V1(e)?e:XD(e)}function Jk(t,e,n){var i;e===void 0&&(e=[]),n===void 0&&(n=!0);const s=XD(t),o=s===((i=t.ownerDocument)==null?void 0:i.body),r=Vo(s);if(o){const a=Qk(r);return e.concat(r,r.visualViewport||[],V1(s)?s:[],a&&n?Jk(a):[])}return e.concat(s,Jk(s,[],n))}function Qk(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function KD(t){const e=Zr(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const s=Pa(t),o=s?t.offsetWidth:n,r=s?t.offsetHeight:i,a=vy(n)!==o||vy(i)!==r;return a&&(n=o,i=r),{width:n,height:i,$:a}}function ZD(t){return Kr(t)?t:t.contextElement}function af(t){const e=ZD(t);if(!Pa(e))return Nc(1);const n=e.getBoundingClientRect(),{width:i,height:s,$:o}=KD(e);let r=(o?vy(n.width):n.width)/i,a=(o?vy(n.height):n.height)/s;return(!r||!Number.isFinite(r))&&(r=1),(!a||!Number.isFinite(a))&&(a=1),{x:r,y:a}}const Cre=Nc(0);function JD(t){const e=Vo(t);return!j4()||!e.visualViewport?Cre:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function xre(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Vo(t)?!1:e}function Kg(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const s=t.getBoundingClientRect(),o=ZD(t);let r=Nc(1);e&&(i?Kr(i)&&(r=af(i)):r=af(t));const a=xre(o,n,i)?JD(o):Nc(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=Vo(o),f=i&&Kr(i)?Vo(i):i;let p=h,m=Qk(p);for(;m&&i&&f!==p;){const y=af(m),b=m.getBoundingClientRect(),k=Zr(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=Vo(m),m=Qk(p)}}return yy({width:u,height:d,x:l,y:c})}function Sre(t){let{elements:e,rect:n,offsetParent:i,strategy:s}=t;const o=s==="fixed",r=Kc(i),a=e?Gb(e.floating):!1;if(i===r||a&&o)return n;let l={scrollLeft:0,scrollTop:0},c=Nc(1);const u=Nc(0),d=Pa(i);if((d||!d&&!o)&&((fp(i)!=="body"||V1(r))&&(l=Xb(i)),Pa(i))){const h=Kg(i);c=af(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 $re(t){return Array.from(t.getClientRects())}function QD(t){return Kg(Kc(t)).left+Xb(t).scrollLeft}function Are(t){const e=Kc(t),n=Xb(t),i=t.ownerDocument.body,s=tg(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),o=tg(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let r=-n.scrollLeft+QD(t);const a=-n.scrollTop;return Zr(i).direction==="rtl"&&(r+=tg(e.clientWidth,i.clientWidth)-s),{width:s,height:o,x:r,y:a}}function Ere(t,e){const n=Vo(t),i=Kc(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=j4();(!c||c&&e==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:o,height:r,x:a,y:l}}function Mre(t,e){const n=Kg(t,!0,e==="fixed"),i=n.top+t.clientTop,s=n.left+t.clientLeft,o=Pa(t)?af(t):Nc(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 O$(t,e,n){let i;if(e==="viewport")i=Ere(t,n);else if(e==="document")i=Are(Kc(t));else if(Kr(e))i=Mre(e,n);else{const s=JD(t);i={...e,x:e.x-s.x,y:e.y-s.y}}return yy(i)}function eR(t,e){const n=Bc(t);return n===e||!Kr(n)||Hf(n)?!1:Zr(n).position==="fixed"||eR(n,e)}function Tre(t,e){const n=e.get(t);if(n)return n;let i=Jk(t,[],!1).filter(a=>Kr(a)&&fp(a)!=="body"),s=null;const o=Zr(t).position==="fixed";let r=o?Bc(t):t;for(;Kr(r)&&!Hf(r);){const a=Zr(r),l=U4(r);!l&&a.position==="fixed"&&(s=null),(o?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||V1(r)&&!l&&eR(t,r))?i=i.filter(u=>u!==r):s=a,r=Bc(r)}return e.set(t,i),i}function Pre(t){let{element:e,boundary:n,rootBoundary:i,strategy:s}=t;const r=[...n==="clippingAncestors"?Gb(e)?[]:Tre(e,this._c):[].concat(n),i],a=r[0],l=r.reduce((c,u)=>{const d=O$(e,u,s);return c.top=tg(d.top,c.top),c.right=P$(d.right,c.right),c.bottom=P$(d.bottom,c.bottom),c.left=tg(d.left,c.left),c},O$(e,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ire(t){const{width:e,height:n}=KD(t);return{width:e,height:n}}function Lre(t,e,n){const i=Pa(e),s=Kc(e),o=n==="fixed",r=Kg(t,!0,o,e);let a={scrollLeft:0,scrollTop:0};const l=Nc(0);if(i||!i&&!o)if((fp(e)!=="body"||V1(s))&&(a=Xb(e)),i){const d=Kg(e,!0,o,e);l.x=d.x+e.clientLeft,l.y=d.y+e.clientTop}else s&&(l.x=QD(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 Sw(t){return Zr(t).position==="static"}function D$(t,e){return!Pa(t)||Zr(t).position==="fixed"?null:e?e(t):t.offsetParent}function tR(t,e){const n=Vo(t);if(Gb(t))return n;if(!Pa(t)){let s=Bc(t);for(;s&&!Hf(s);){if(Kr(s)&&!Sw(s))return s;s=Bc(s)}return n}let i=D$(t,e);for(;i&&wre(i)&&Sw(i);)i=D$(i,e);return i&&Hf(i)&&Sw(i)&&!U4(i)?n:i||kre(t)||n}const Ore=async function(t){const e=this.getOffsetParent||tR,n=this.getDimensions,i=await n(t.floating);return{reference:Lre(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Dre(t){return Zr(t).direction==="rtl"}const Rre={convertOffsetParentRelativeRectToViewportRelativeRect:Sre,getDocumentElement:Kc,getClippingRect:Pre,getOffsetParent:tR,getElementRects:Ore,getClientRects:$re,getDimensions:Ire,getScale:af,isElement:Kr,isRTL:Dre},eC=bre,tC=_re,nC=(t,e,n)=>{const i=new Map,s={platform:Rre,...n},o={...s.platform,_c:i};return gre(t,e,{...s,platform:o})};function Vre(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 $w=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 Fre(t){return is(t)&&t.type===Zn}const kc=t=>{const e=Me(t)?t:[t],n=[];return e.forEach(i=>{var s;Me(i)?n.push(...kc(i)):is(i)&&((s=i.component)!=null&&s.subTree)?n.push(i,...kc(i.component.subTree)):is(i)&&Me(i.children)?n.push(...kc(i.children)):is(i)&&i.shapeFlag===2?n.push(...kc(i.type())):n.push(i)}),n},Nre=(t,e,n)=>kc(t.subTree).filter(i=>{var s;return is(i)&&((s=i.type)==null?void 0:s.name)===e&&!!i.component}).map(i=>i.component.uid).map(i=>n[i]).filter(i=>!!i),Bre=(t,e)=>{const n=Fn({}),i=Fn([]),s=new WeakMap,o=c=>{n.value[c.uid]=c,Hm(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)&&Hm(n),h(f,p))}s.get(d).push(u)})},r=c=>{delete n.value[c.uid],Hm(n);const u=c.getVnode().el,d=u.parentNode,h=s.get(d),f=h.indexOf(u);h.splice(f,1)},a=()=>{i.value=Nre(t,e,n.value)},l=c=>c.render();return{children:i,addChild:o,removeChild:r,ChildrenSorter:fe({setup(c,{slots:u}){return()=>(a(),u.default?bt(l,{render:u.default}):null)}})}},Zi=Hb({type:String,values:$l,required:!1}),nR=Symbol("size"),sR=()=>{const t=qe(nR,{});return Y(()=>E(t.size)||"")};function pp(t,{disabled:e,beforeFocus:n,afterFocus:i,beforeBlur:s,afterBlur:o}={}){const{emit:r}=pt(),a=Fn(),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)||Wg(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"))}),Hn(a,"focus",c,!0),Hn(a,"blur",u,!0),Hn(a,"click",d,!0),{isFocused:l,wrapperRef:a,handleFocus:c,handleBlur:u}}function W4({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 iR=Symbol("emptyValuesContextKey"),zre="use-empty-values",Hre=["",void 0,null],Ure=void 0,F1=Ge({emptyValues:Array,valueOnClear:{type:de([String,Number,Boolean,Function]),default:void 0,validator:t=>(t=et(t)?t():t,Me(t)?t.every(e=>!e):!t)}}),Y4=(t,e)=>{const n=pt()?qe(iR,J({})):J({}),i=Y(()=>t.emptyValues||n.value.emptyValues||Hre),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:Ure),o=r=>{let a=!0;return Me(r)?a=i.value.some(l=>Wi(r,l)):a=i.value.includes(r),a};return o(s.value)||Tt(zre,"value-on-clear should be a value of empty-values"),{emptyValues:i,valueOnClear:s,isEmptyValue:o}},jre=Ge({ariaLabel:String,ariaOrientation:{type:String,values:["horizontal","vertical","undefined"]},ariaControls:String}),xr=t=>S4(jre,t),oR=t=>{const e=t.props,n=Me(e)?Df(e.map(i=>[i,{}])):e;t.setPropsDefaults=i=>{if(n){for(const[s,o]of Object.entries(i)){const r=n[s];if(zt(n,s)){if(k4(r)){n[s]={...r,default:o};continue}n[s]={type:r,default:o}}}t.props=n}}},qt=(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 oR(t),t},Wre=(t,e)=>(t.install=n=>{t._context=n._context,n.config.globalProperties[e]=t},t),Yre=(t,e)=>(t.install=n=>{n.directive(e,t)},t),Os=t=>(t.install=Dt,oR(t),t);var qre=fe({__name:"teleport",props:A4,setup(t){return(e,n)=>e.disabled?le(e.$slots,"default",{key:0}):(v(),D(ea,{key:1,to:e.to},[le(e.$slots,"default")],8,["to"]))}}),Gre=qre;const Kb=qt(Gre);/*! Element Plus Icons Vue v2.3.2 */var Xre=fe({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.496"})]))}}),Kre=Xre,Zre=fe({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"})]))}}),Bd=Zre,Jre=fe({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 0"})]))}}),Qre=Jre,eae=fe({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"})]))}}),bd=eae,tae=fe({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"})]))}}),Hr=tae,nae=fe({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"})]))}}),Zb=nae,sae=fe({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.87 415.87 0 0 1 299.264-399.104L512 704zM720 304a208 208 0 1 1-416 0 208 208 0 0 1 416 0"})]))}}),iae=sae,oae=fe({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"})]))}}),rR=oae,rae=fe({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"})]))}}),aae=rae,lae=fe({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"})]))}}),cae=lae,uae=fe({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"})]))}}),dae=uae,hae=fe({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"})]))}}),fae=hae,pae=fe({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"})]))}}),mae=pae,gae=fe({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.06 461.06 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"})]))}}),vae=gae,_ae=fe({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.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"})]))}}),yae=_ae,bae=fe({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"})]))}}),q4=bae,wae=fe({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"})]))}}),G4=wae,kae=fe({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"})]))}}),aR=kae,Cae=fe({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"})]))}}),Zc=Cae,xae=fe({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"})]))}}),lR=xae,Sae=fe({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.496"})]))}}),cR=Sae,$ae=fe({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"})]))}}),Bo=$ae,Aae=fe({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"})]))}}),Eae=Aae,Mae=fe({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"})]))}}),uR=Mae,Tae=fe({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"})]))}}),zc=Tae,Pae=fe({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"})]))}}),Hc=Pae,Iae=fe({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"})]))}}),Lae=Iae,Oae=fe({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"})]))}}),Jb=Oae,Dae=fe({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"})]))}}),N1=Dae,Rae=fe({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"})]))}}),Vae=Rae,Fae=fe({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-112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336zm384 254.272v-64h448v64z"})]))}}),dR=Fae,Nae=fe({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"})]))}}),Bae=Nae,zae=fe({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"})]))}}),Hae=zae,Uae=fe({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"})]))}}),hR=Uae,jae=fe({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 80H768V256zm-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.2zm-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"})]))}}),Wae=jae,Yae=fe({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"})]))}}),fR=Yae,qae=fe({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"})]))}}),Gae=qae,Xae=fe({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"})]))}}),Kae=Xae,Zae=fe({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"})]))}}),wl=Zae,Jae=fe({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"})]))}}),Qae=Jae,ele=fe({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"})]))}}),pR=ele,tle=fe({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"})]))}}),Uf=tle,nle=fe({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"})]))}}),sle=nle,ile=fe({name:"Memo",__name:"memo",setup(t){return(e,n)=>(v(),A("svg",{xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",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"})]))}}),ole=ile,rle=fe({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 224z"})]))}}),ale=rle,lle=fe({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"})]))}}),cle=lle,ule=fe({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.06 29.06 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.06 29.06 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.06 29.06 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.06 29.06 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.06 29.06 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.06 29.06 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.06 29.06 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"})]))}}),dle=ule,hle=fe({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"})]))}}),sC=hle,fle=fe({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"})]))}}),ple=fle,mle=fe({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"})]))}}),gle=mle,vle=fe({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"})]))}}),_le=vle,yle=fe({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"})]))}}),ble=yle,wle=fe({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 64-64-64 64-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"})]))}}),kle=wle,Cle=fe({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"})]))}}),X4=Cle,xle=fe({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"})]))}}),Sle=xle,$le=fe({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.36"}),g("path",{fill:"currentColor",d:"M480 192h64v704h-64z"})]))}}),Ale=$le,Ele=fe({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"})]))}}),mR=Ele,Mle=fe({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"})]))}}),Tle=Mle,Ple=fe({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"})]))}}),Ile=Ple,Lle=fe({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"})]))}}),Qb=Lle,Ole=fe({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"})]))}}),K4=Ole,Dle=fe({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"})]))}}),Rle=Dle,Vle=fe({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"})]))}}),Fle=Vle,Nle=fe({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"})]))}}),Ble=Nle,zle=fe({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.81 239.81 0 0 1 512 192a239.87 239.87 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"})]))}}),Z4=zle,Hle=fe({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"})]))}}),Ule=Hle,jle=fe({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"})]))}}),gR=jle,Wle=fe({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"})]))}}),J4=Wle,Yle=fe({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"})]))}}),vR=Yle,qle=fe({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"})]))}}),Gle=qle;const ds=de([String,Object,Function]),Xle={Close:Bo},_R={Close:Bo,SuccessFilled:K4,InfoFilled:wl,WarningFilled:J4,CircleCloseFilled:aR},jf={primary:wl,success:K4,warning:J4,error:aR,info:wl},Q4={validating:Uf,success:G4,error:Zc},Kle=["light","dark"],Zle=Ge({title:{type:String,default:""},description:{type:String,default:""},type:{type:String,values:my(jf),default:"info"},closable:{type:Boolean,default:!0},closeText:{type:String,default:""},showIcon:Boolean,center:Boolean,effect:{type:String,values:Kle,default:"light"}}),Jle={close:t=>t instanceof MouseEvent},Qle=Ge({size:{type:de([Number,String])},color:{type:String}});var ece=fe({name:"ElIcon",inheritAttrs:!1,__name:"icon",props:Qle,setup(t){const e=t,n=Be("icon"),i=Y(()=>{const{size:s,color:o}=e,r=fi(s);return!r&&!o?{}:{fontSize:r,"--color":o}});return(s,o)=>(v(),A("i",Wt({class:E(n).b(),style:i.value},s.$attrs),[le(s.$slots,"default")],16))}}),tce=ece;const be=qt(tce);var nce=fe({name:"ElAlert",__name:"alert",props:Zle,emits:Jle,setup(t,{emit:e}){const{Close:n}=_R,i=t,s=e,o=mi(),r=Be("alert"),a=J(!0),l=Y(()=>jf[i.type]),c=Y(()=>{var h;if(i.description)return!0;const d=(h=o.default)==null?void 0:h.call(o);return d?kc(d).some(f=>!Fre(f)):!1}),u=d=>{a.value=!1,s("close",d)};return(d,h)=>(v(),D(Ho,{name:E(r).b("fade"),persisted:""},{default:w(()=>[Re(g("div",{class:q([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:q([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:q(E(r).e("content"))},[t.title||d.$slots.title?(v(),A("span",{key:0,class:q([E(r).e("title"),{"with-description":c.value}])},[le(d.$slots,"title",{},()=>[N(x(t.title),1)])],2)):O("v-if",!0),c.value?(v(),A("p",{key:1,class:q(E(r).e("description"))},[le(d.$slots,"default",{},()=>[N(x(t.description),1)])],2)):O("v-if",!0),t.closable?(v(),A(ee,{key:2},[t.closeText?(v(),A("div",{key:0,class:q([E(r).e("close-btn"),E(r).is("customed")]),onClick:u},x(t.closeText),3)):(v(),D(E(be),{key:1,class:q(E(r).e("close-btn")),onClick:u},{default:w(()=>[_(E(n))]),_:1},8,["class"]))],64)):O("v-if",!0)],2)],2),[[jt,a.value]])]),_:3},8,["name"]))}}),sce=nce;const sa=qt(sce),yR=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],bR=Ge({role:{type:String,values:yR,default:"tooltip"}}),e8=Symbol("popper"),wR=Symbol("popperContent");var ice=fe({name:"ElPopperArrow",inheritAttrs:!1,__name:"arrow",setup(t,{expose:e}){const n=Be("popper"),{arrowRef:i,arrowStyle:s}=qe(wR,void 0);return wn(()=>{i.value=void 0}),e({arrowRef:i}),(o,r)=>(v(),A("span",{ref_key:"arrowRef",ref:i,class:q(E(n).e("arrow")),style:Xe(E(s)),"data-popper-arrow":""},null,6))}}),oce=ice;const kR=Ge({virtualRef:{type:de(Object)},virtualTriggering:Boolean,onMouseenter:{type:de(Function)},onMouseleave:{type:de(Function)},onClick:{type:de(Function)},onKeydown:{type:de(Function)},onFocus:{type:de(Function)},onBlur:{type:de(Function)},onContextmenu:{type:de(Function)},id:String,open:Boolean}),Aw="ElOnlyChild",CR=fe({name:Aw,setup(t,{slots:e,attrs:n}){var s;const i=rre(((s=qe(UD))==null?void 0:s.setForwardRef)??Dt);return()=>{var l;const o=(l=e.default)==null?void 0:l.call(e,n);if(!o)return null;const[r,a]=xR(o);return r?(a>1&&Tt(Aw,"requires exact only one valid child."),Re(_r(r,n),[[i]])):(Tt(Aw,"no valid child node found"),null)}}});function xR(t){if(!t)return[null,0];const e=t,n=e.filter(i=>i.type!==Zn).length;for(const i of e){if(yt(i))switch(i.type){case Zn:continue;case xa:case"svg":return[R$(i),n];case ee:return xR(i.children);default:return[i,n]}return[R$(i),n]}return[null,0]}function R$(t){const e=Be("only-child");return _("span",{class:e.e("content")},[t])}var rce=fe({name:"ElPopperTrigger",inheritAttrs:!1,__name:"trigger",props:kR,setup(t,{expose:e}){const n=t,{role:i,triggerRef:s}=qe(e8,void 0);ore(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,Po(h)&&u.forEach(f=>{const p=n[f];p&&h.removeEventListener(f.slice(2).toLowerCase(),p,["onFocus","onBlur"].includes(f))}),Po(d)&&(u.forEach(f=>{const p=n[f];p&&d.addEventListener(f.slice(2).toLowerCase(),p,["onFocus","onBlur"].includes(f))}),Wg(d)&&(c=Te([o,r,a,l],f=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((p,m)=>{ui(f[m])?d.removeAttribute(p):d.setAttribute(p,f[m])})},{immediate:!0}))),Po(h)&&Wg(h)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(f=>h.removeAttribute(f))},{immediate:!0})}),wn(()=>{if(c==null||c(),c=void 0,s.value&&Po(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(CR),Wt({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"]))}}),ace=rce;const SR=Ge({arrowOffset:{type:Number,default:5}}),lce=["fixed","absolute"],cce=Ge({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:de(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:hp,default:"bottom"},popperOptions:{type:de(Object),default:()=>({})},strategy:{type:String,values:lce,default:"absolute"}}),$R=Ge({...cce,...SR,id:String,style:{type:de([String,Array,Object])},className:{type:de([String,Array,Object])},effect:{type:de(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:Boolean,trapping:Boolean,popperClass:{type:de([String,Array,Object])},popperStyle:{type:de([String,Array,Object])},referenceEl:{type:de(Object)},triggerTargetEl:{type:de(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...xr(["ariaLabel"]),loop:Boolean}),uce={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},dce=Ge({size:{type:String,values:$l},disabled:Boolean}),hce=Ge({...dce,model:Object,rules:{type:de(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:de([Object,Boolean]),default:!0}}),fce={validate:(t,e,n)=>(Me(t)||Ke(t))&&Jn(e)&&Ke(n)},zd=Symbol("formContextKey"),wd=Symbol("formItemContextKey"),Ii=(t,e={})=>{const n=J(void 0),i=e.prop?n:TD("size"),s=e.global?n:sR(),o=e.form?{size:void 0}:qe(zd,void 0),r=e.formItem?{size:void 0}:qe(wd,void 0);return Y(()=>i.value||E(t)||(r==null?void 0:r.size)||(o==null?void 0:o.size)||s.value||"")},bs=t=>{const e=TD("disabled"),n=qe(zd,void 0);return Y(()=>e.value??E(t)??(n==null?void 0:n.disabled)??!1)},_o=()=>({form:qe(zd,void 0),formItem:qe(wd,void 0)}),Tl=(t,{formItemContext:e,disableIdGeneration:n,disableIdManagement:i})=>{n||(n=J(!1)),i||(i=J(!1));const s=pt(),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:kr().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})}),Sl(()=>{a&&a(),e!=null&&e.removeInputId&&r.value&&e.removeInputId(r.value)}),{isLabeledByFormItem:l,inputId:r}},pce=["","error","validating","success"],mce=Ge({label:String,labelWidth:{type:[String,Number]},labelPosition:{type:String,values:["left","right","top",""],default:""},prop:{type:de([String,Array])},required:{type:Boolean,default:void 0},rules:{type:de([Object,Array])},error:String,validateStatus:{type:String,values:pce},for:String,inlineMessage:{type:Boolean,default:void 0},showMessage:{type:Boolean,default:!0},size:{type:String,values:$l}}),Gp=t=>Me(t)?t[0]:t,ao=t=>!t&&t!==0?[]:Me(t)?t:[t],gce="ElForm";function vce(){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"&&Tt(gce,`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 qv=(t,e)=>{const n=Us(e).map(i=>Me(i)?i.join("."):i);return n.length>0?t.filter(i=>i.propString&&n.includes(i.propString)):t},rh="ElForm";var _ce=fe({name:rh,__name:"form",props:hce,emits:fce,setup(t,{expose:e,emit:n}){const i=t,s=n,o=J(),r=In([]),a=new Map,l=Ii(),c=Be("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=>qv(r,[P])[0],h=P=>{r.push(P),P.propString&&(a.has(P.propString)?P.setInitialValue(a.get(P.propString)):a.set(P.propString,Qu(P.fieldValue)))},f=P=>{P.prop&&r.splice(r.indexOf(P),1)},p=P=>{if(!i.model){Tt(rh,"model is required for setInitialValues to work.");return}if(!P){Tt(rh,"initModel is required for setInitialValues to work.");return}for(const T of a.keys())a.set(T,Qu(Ac(P,T).value));r.forEach(T=>{T.prop&&T.setInitialValue(Ac(P,T.prop).value)})},m=(P=[])=>{if(!i.model){Tt(rh,"model is required for resetFields to work.");return}qv(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=>Me(L)?L.join("."):L):[...a.keys()];for(const L of I)!T.has(L)&&a.has(L)&&(Ac(i.model,L).value=Qu(a.get(L)))},y=(P=[])=>{qv(r,P).forEach(T=>T.clearValidate())},b=Y(()=>{const P=!!i.model;return P||Tt(rh,"model is required for validate to work."),P}),k=P=>{if(r.length===0)return[];const T=qv(r,P);return T.length?T:(Tt(rh,"please pass correct props!"),[])},C=async P=>S(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)},S=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 B=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,B)),L&&Promise.reject(B)}},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=>Tt(P))},{deep:!0,flush:"post"}),Pt(zd,In({...go(i),emit:s,resetFields:m,clearValidate:y,validateField:S,getField:d,addField:h,removeField:f,setInitialValues:p,...vce()})),e({validate:C,validateField:S,resetFields:m,clearValidate:y,scrollToField:M,getField:d,fields:r,setInitialValues:p}),(P,T)=>(v(),A("form",{ref_key:"formRef",ref:o,class:q(u.value)},[le(P.$slots,"default")],2))}}),yce=_ce;const V$="ElLabelWrap";var bce=fe({name:V$,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(t,{slots:e}){const n=qe(zd,void 0),i=qe(wd);i||vo(V$,"usage: <el-form-item><label-wrap /></el-form-item>");const s=Be("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()}),wn(()=>{l("remove")}),xl(()=>c()),Te(r,(u,d)=>{t.updateAll&&(n==null||n.registerLabelWidth(u,d))}),Ts(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 Vu(){return Vu=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},Vu.apply(this,arguments)}function wce(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Zg(t,e)}function iC(t){return iC=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},iC(t)}function Zg(t,e){return Zg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,s){return i.__proto__=s,i},Zg(t,e)}function kce(){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 L0(t,e,n){return kce()?L0=Reflect.construct.bind():L0=function(s,o,r){var a=[null];a.push.apply(a,o);var l=Function.bind.apply(s,a),c=new l;return r&&Zg(c,r.prototype),c},L0.apply(null,arguments)}function Cce(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function oC(t){var e=typeof Map=="function"?new Map:void 0;return oC=function(i){if(i===null||!Cce(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 L0(i,arguments,iC(this).constructor)}return s.prototype=Object.create(i.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),Zg(s,i)},oC(t)}var xce=/%[sdj%]/g,Sce=function(){};typeof process<"u"&&process.env;function rC(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 Io(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(xce,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 $ce(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||$ce(e)&&typeof t=="string"&&!t)}function Ace(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 F$(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 Ece(t){var e=[];return Object.keys(t).forEach(function(n){e.push.apply(e,t[n]||[])}),e}var N$=function(t){wce(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}(oC(Error));function Mce(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 N$(b,rC(b))):h(s)},m=Ece(t);F$(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 N$(u,rC(u))):h(s)};a.length||(i(u),h(s)),a.forEach(function(m){var y=t[m];r.indexOf(m)!==-1?F$(y,n,p):Ace(y,n,p)})});return d.catch(function(h){return h}),d}function Tce(t){return!!(t&&t.message!==void 0)}function Pce(t,e){for(var n=t,i=0;i<e.length;i++){if(n==null)return n;n=n[e[i]]}return n}function B$(t,e){return function(n){var i;return t.fullFields?i=Pce(e,t.fullFields):i=e[n.field||t.fullField],Tce(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 z$(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]=Vu({},t[n],i):t[n]=i}}return t}var AR=function(e,n,i,s,o,r){e.required&&(!i.hasOwnProperty(e.field)||Bs(n,r||e.type))&&s.push(Io(o.messages.required,e.fullField))},Ice=function(e,n,i,s,o){(/^\s+$/.test(n)||n==="")&&s.push(Io(o.messages.whitespace,e.fullField))},Gv,Lce=function(){if(Gv)return Gv;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=(` | |
| 42 | 49 | (?: |
| 43 | -(?:`+s+":){7}(?:"+s+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 | |
| 44 | -(?:`+s+":){6}(?:"+n+"|:"+s+`|:)| // 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 | |
| 45 | -(?:`+s+":){5}(?::"+n+"|(?::"+s+`){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 | |
| 46 | -(?:`+s+":){4}(?:(?::"+s+"){0,1}:"+n+"|(?::"+s+`){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 | |
| 47 | -(?:`+s+":){3}(?:(?::"+s+"){0,2}:"+n+"|(?::"+s+`){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 | |
| 48 | -(?:`+s+":){2}(?:(?::"+s+"){0,3}:"+n+"|(?::"+s+`){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 | |
| 49 | -(?:`+s+":){1}(?:(?::"+s+"){0,4}:"+n+"|(?::"+s+`){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 | |
| 50 | -(?::(?:(?::`+s+"){0,5}:"+n+"|(?::"+s+`){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 | |
| 50 | +(?:`+i+":){7}(?:"+i+`|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 | |
| 51 | +(?:`+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 | |
| 52 | +(?:`+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 | |
| 53 | +(?:`+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 | |
| 54 | +(?:`+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 | |
| 55 | +(?:`+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 | |
| 56 | +(?:`+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 | |
| 57 | +(?::(?:(?::`+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 | |
| 51 | 58 | )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1 |
| 52 | -`).replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),o=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),r=new RegExp("^"+n+"$"),a=new RegExp("^"+i+"$"),l=function(x){return x&&x.exact?o:new RegExp("(?:"+e(x)+n+e(x)+")|(?:"+e(x)+i+e(x)+")","g")};l.v4=function(k){return k&&k.exact?r:new RegExp(""+e(k)+n+e(k),"g")},l.v6=function(k){return k&&k.exact?a:new RegExp(""+e(k)+i+e(k),"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,}))",b="(?::\\d{2,5})?",y='(?:[/?#][^\\s"]*)?',C="(?:"+c+"|www\\.)"+u+"(?:localhost|"+d+"|"+h+"|"+f+p+m+")"+b+y;return a0=new RegExp("(?:^"+C+"$)","i"),a0},Y7={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},Cp={integer:function(e){return Cp.number(e)&&parseInt(e,10)===e},float:function(e){return Cp.number(e)&&!Cp.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"&&!Cp.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(Y7.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(Sle())},hex:function(e){return typeof e=="string"&&!!e.match(Y7.hex)}},$le=function(e,n,s,i,o){if(e.required&&n===void 0){_D(e,n,s,i,o);return}var r=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=e.type;r.indexOf(a)>-1?Cp[a](n)||i.push(ho(o.messages.types[a],e.fullField,e.type)):a&&typeof n!==e.type&&i.push(ho(o.messages.types[a],e.fullField,e.type))},Ale=function(e,n,s,i,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&&i.push(ho(o.messages[d].len,e.fullField,e.len)):a&&!l&&u<e.min?i.push(ho(o.messages[d].min,e.fullField,e.min)):l&&!a&&u>e.max?i.push(ho(o.messages[d].max,e.fullField,e.max)):a&&l&&(u<e.min||u>e.max)&&i.push(ho(o.messages[d].range,e.fullField,e.min,e.max))},Od="enum",Mle=function(e,n,s,i,o){e[Od]=Array.isArray(e[Od])?e[Od]:[],e[Od].indexOf(n)===-1&&i.push(ho(o.messages[Od],e.fullField,e[Od].join(", ")))},Ele=function(e,n,s,i,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||i.push(ho(o.messages.pattern.mismatch,e.fullField,n,e.pattern));else if(typeof e.pattern=="string"){var r=new RegExp(e.pattern);r.test(n)||i.push(ho(o.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},on={required:_D,whitespace:xle,type:$le,range:Ale,enum:Mle,pattern:Ele},Tle=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(ks(n,"string")&&!e.required)return s();on.required(e,n,i,r,o,"string"),ks(n,"string")||(on.type(e,n,i,r,o),on.range(e,n,i,r,o),on.pattern(e,n,i,r,o),e.whitespace===!0&&on.whitespace(e,n,i,r,o))}s(r)},Ple=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(ks(n)&&!e.required)return s();on.required(e,n,i,r,o),n!==void 0&&on.type(e,n,i,r,o)}s(r)},Ile=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(n===""&&(n=void 0),ks(n)&&!e.required)return s();on.required(e,n,i,r,o),n!==void 0&&(on.type(e,n,i,r,o),on.range(e,n,i,r,o))}s(r)},Lle=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(ks(n)&&!e.required)return s();on.required(e,n,i,r,o),n!==void 0&&on.type(e,n,i,r,o)}s(r)},Ole=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(ks(n)&&!e.required)return s();on.required(e,n,i,r,o),ks(n)||on.type(e,n,i,r,o)}s(r)},Dle=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(ks(n)&&!e.required)return s();on.required(e,n,i,r,o),n!==void 0&&(on.type(e,n,i,r,o),on.range(e,n,i,r,o))}s(r)},Rle=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(ks(n)&&!e.required)return s();on.required(e,n,i,r,o),n!==void 0&&(on.type(e,n,i,r,o),on.range(e,n,i,r,o))}s(r)},Vle=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(n==null&&!e.required)return s();on.required(e,n,i,r,o,"array"),n!=null&&(on.type(e,n,i,r,o),on.range(e,n,i,r,o))}s(r)},Fle=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(ks(n)&&!e.required)return s();on.required(e,n,i,r,o),n!==void 0&&on.type(e,n,i,r,o)}s(r)},Nle="enum",Ble=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(ks(n)&&!e.required)return s();on.required(e,n,i,r,o),n!==void 0&&on[Nle](e,n,i,r,o)}s(r)},zle=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(ks(n,"string")&&!e.required)return s();on.required(e,n,i,r,o),ks(n,"string")||on.pattern(e,n,i,r,o)}s(r)},Hle=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(ks(n,"date")&&!e.required)return s();if(on.required(e,n,i,r,o),!ks(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),on.type(e,l,i,r,o),l&&on.range(e,l.getTime(),i,r,o)}}s(r)},Ule=function(e,n,s,i,o){var r=[],a=Array.isArray(n)?"array":typeof n;on.required(e,n,i,r,o,a),s(r)},D2=function(e,n,s,i,o){var r=e.type,a=[],l=e.required||!e.required&&i.hasOwnProperty(e.field);if(l){if(ks(n,r)&&!e.required)return s();on.required(e,n,i,a,o,r),ks(n,r)||on.type(e,n,i,a,o)}s(a)},jle=function(e,n,s,i,o){var r=[],a=e.required||!e.required&&i.hasOwnProperty(e.field);if(a){if(ks(n)&&!e.required)return s();on.required(e,n,i,r,o)}s(r)},bm={string:Tle,method:Ple,number:Ile,boolean:Lle,regexp:Ole,integer:Dle,float:Rle,array:Vle,object:Fle,enum:Ble,pattern:zle,date:Hle,url:D2,hex:D2,email:D2,required:Ule,any:jle};function u6(){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 d6=u6(),i1=function(){function t(n){this.rules=null,this._messages=d6,this.define(n)}var e=t.prototype;return e.define=function(s){var i=this;if(!s)throw new Error("Cannot configure a schema with no rules");if(typeof s!="object"||Array.isArray(s))throw new Error("Rules must be an object");this.rules={},Object.keys(s).forEach(function(o){var r=s[o];i.rules[o]=Array.isArray(r)?r:[r]})},e.messages=function(s){return s&&(this._messages=W7(u6(),s)),this._messages},e.validate=function(s,i,o){var r=this;i===void 0&&(i={}),o===void 0&&(o=function(){});var a=s,l=i,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 b=[],y={};function C(x){if(Array.isArray(x)){var S;b=(S=b).concat.apply(S,x)}else b.push(x)}for(var k=0;k<m.length;k++)C(m[k]);b.length?(y=c6(b),c(b,y)):c(null,a)}if(l.messages){var d=this.messages();d===d6&&(d=u6()),W7(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 b=r.rules[m],y=a[m];b.forEach(function(C){var k=C;typeof k.transform=="function"&&(a===s&&(a=uu({},a)),y=a[m]=k.transform(y)),typeof k=="function"?k={validator:k}:k=uu({},k),k.validator=r.getValidationMethod(k),k.validator&&(k.field=m,k.fullField=k.fullField||m,k.type=r.getType(k),h[m]=h[m]||[],h[m].push({rule:k,value:y,source:a,field:m}))})});var p={};return wle(h,l,function(m,b){var y=m.rule,C=(y.type==="object"||y.type==="array")&&(typeof y.fields=="object"||typeof y.defaultField=="object");C=C&&(y.required||!y.required&&m.value),y.field=m.field;function k(E,T){return uu({},T,{fullField:y.fullField+"."+E,fullFields:y.fullFields?[].concat(y.fullFields,[E]):[E]})}function x(E){E===void 0&&(E=[]);var T=Array.isArray(E)?E:[E];!l.suppressWarning&&T.length&&t.warning("async-validator:",T),T.length&&y.message!==void 0&&(T=[].concat(y.message));var P=T.map(j7(y,a));if(l.first&&P.length)return p[y.field]=1,b(P);if(!C)b(P);else{if(y.required&&!m.value)return y.message!==void 0?P=[].concat(y.message).map(j7(y,a)):l.error&&(P=[l.error(y,ho(l.messages.required,y.field))]),b(P);var I={};y.defaultField&&Object.keys(m.value).map(function(D){I[D]=y.defaultField}),I=uu({},I,m.rule.fields);var L={};Object.keys(I).forEach(function(D){var z=I[D],Y=Array.isArray(z)?z:[z];L[D]=Y.map(k.bind(null,D))});var V=new t(L);V.messages(l.messages),m.rule.options&&(m.rule.options.messages=l.messages,m.rule.options.error=l.error),V.validate(m.value,m.rule.options||l,function(D){var z=[];P&&P.length&&z.push.apply(z,P),D&&D.length&&z.push.apply(z,D),b(z.length?z:null)})}}var S;if(y.asyncValidator)S=y.asyncValidator(y,m.value,x,m.source,l);else if(y.validator){try{S=y.validator(y,m.value,x,m.source,l)}catch(E){console.error==null||console.error(E),l.suppressValidatorError||setTimeout(function(){throw E},0),x(E.message)}S===!0?x():S===!1?x(typeof y.message=="function"?y.message(y.fullField||y.field):y.message||(y.fullField||y.field)+" fails"):S instanceof Array?x(S):S instanceof Error&&x(S.message)}S&&S.then&&S.then(function(){return x()},function(E){return x(E)})},function(m){u(m)},a)},e.getType=function(s){if(s.type===void 0&&s.pattern instanceof RegExp&&(s.type="pattern"),typeof s.validator!="function"&&s.type&&!bm.hasOwnProperty(s.type))throw new Error(ho("Unknown rule type %s",s.type));return s.type||"string"},e.getValidationMethod=function(s){if(typeof s.validator=="function")return s.validator;var i=Object.keys(s),o=i.indexOf("message");return o!==-1&&i.splice(o,1),i.length===1&&i[0]==="required"?bm.required:bm[this.getType(s)]||void 0},t}();i1.register=function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");bm[e]=n};i1.warning=vle;i1.messages=d6;i1.validators=bm;const Wle=["","error","validating","success"],Yle=Ze({label:String,labelWidth:{type:[String,Number],default:""},labelPosition:{type:String,values:["left","right","top",""],default:""},prop:{type:xe([String,Array])},required:{type:Boolean,default:void 0},rules:{type:xe([Object,Array])},error:String,validateStatus:{type:String,values:Wle},for:String,inlineMessage:{type:[String,Boolean],default:""},showMessage:{type:Boolean,default:!0},size:{type:String,values:Ac}}),G7="ElLabelWrap";var Gle=se({name:G7,props:{isAutoWidth:Boolean,updateAll:Boolean},setup(t,{slots:e}){const n=qe(Rf,void 0),s=qe(Gu);s||sr(G7,"usage: <el-form-item><label-wrap /></el-form-item>");const i=He("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")=>{dt(()=>{e.default&&t.isAutoWidth&&(u==="update"?r.value=a():u==="remove"&&(n==null||n.deregisterLabelWidth(r.value)))})},c=()=>l("update");return Pt(()=>{c()}),Gn(()=>{l("remove")}),ll(()=>c()),Te(r,(u,d)=>{t.updateAll&&(n==null||n.registerLabelWidth(u,d))}),bi(q(()=>{var u,d;return(d=(u=o.value)==null?void 0:u.firstElementChild)!=null?d:null}),c),()=>{var u,d;if(!e)return null;const{isAutoWidth:h}=t;if(h){const f=n==null?void 0:n.autoLabelWidth,p=s==null?void 0:s.hasLabel,m={};if(p&&f&&f!=="auto"){const b=Math.max(0,Number.parseInt(f,10)-r.value),C=(s.labelPosition||n.labelPosition)==="left"?"marginRight":"marginLeft";b&&(m[C]=`${b}px`)}return _("div",{ref:o,class:[i.be("item","label-wrap")],style:m},[(u=e.default)==null?void 0:u.call(e)])}else return _(te,{ref:o},[(d=e.default)==null?void 0:d.call(e)])}}});const qle=se({name:"ElFormItem"}),Xle=se({...qle,props:Yle,setup(t,{expose:e}){const n=t,s=Zi(),i=qe(Rf,void 0),o=qe(Gu,void 0),r=Mi(void 0,{formItem:!1}),a=He("form-item"),l=tr().value,c=J([]),u=J(""),d=rZ(u,100),h=J(""),f=J();let p,m=!1;const b=q(()=>n.labelPosition||(i==null?void 0:i.labelPosition)),y=q(()=>{if(b.value==="top")return{};const ce=Ai(n.labelWidth||(i==null?void 0:i.labelWidth)||"");return ce?{width:ce}:{}}),C=q(()=>{if(b.value==="top"||i!=null&&i.inline)return{};if(!n.label&&!n.labelWidth&&L)return{};const ce=Ai(n.labelWidth||(i==null?void 0:i.labelWidth)||"");return!n.label&&!s.label?{marginLeft:ce}:{}}),k=q(()=>[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",B.value||n.required),a.is("no-asterisk",i==null?void 0:i.hideRequiredAsterisk),(i==null?void 0:i.requireAsteriskPosition)==="right"?"asterisk-right":"asterisk-left",{[a.m("feedback")]:i==null?void 0:i.statusIcon,[a.m(`label-${b.value}`)]:b.value}]),x=q(()=>li(n.inlineMessage)?n.inlineMessage:(i==null?void 0:i.inlineMessage)||!1),S=q(()=>[a.e("error"),{[a.em("error","inline")]:x.value}]),E=q(()=>n.prop?nt(n.prop)?n.prop:n.prop.join("."):""),T=q(()=>!!(n.label||s.label)),P=q(()=>n.for||(c.value.length===1?c.value[0]:void 0)),I=q(()=>!P.value&&T.value),L=!!o,V=q(()=>{const ce=i==null?void 0:i.model;if(!(!ce||!n.prop))return j0(ce,n.prop).value}),D=q(()=>{const{required:ce}=n,re=[];n.rules&&re.push(...Hi(n.rules));const ge=i==null?void 0:i.rules;if(ge&&n.prop){const ze=j0(ge,n.prop).value;ze&&re.push(...Hi(ze))}if(ce!==void 0){const ze=re.map((st,ee)=>[st,ee]).filter(([st])=>Object.keys(st).includes("required"));if(ze.length>0)for(const[st,ee]of ze)st.required!==ce&&(re[ee]={...st,required:ce});else re.push({required:ce})}return re}),z=q(()=>D.value.length>0),Y=ce=>D.value.filter(ge=>!ge.trigger||!ce?!0:Array.isArray(ge.trigger)?ge.trigger.includes(ce):ge.trigger===ce).map(({trigger:ge,...ze})=>ze),B=q(()=>D.value.some(ce=>ce.required)),U=q(()=>{var ce;return d.value==="error"&&n.showMessage&&((ce=i==null?void 0:i.showMessage)!=null?ce:!0)}),X=q(()=>`${n.label||""}${(i==null?void 0:i.labelSuffix)||""}`),K=ce=>{u.value=ce},N=ce=>{var re,ge;const{errors:ze,fields:st}=ce;(!ze||!st)&&console.error(ce),K("error"),h.value=ze?(ge=(re=ze==null?void 0:ze[0])==null?void 0:re.message)!=null?ge:`${n.prop} is required`:"",i==null||i.emit("validate",n.prop,!1,h.value)},F=()=>{K("success"),i==null||i.emit("validate",n.prop,!0,"")},Q=async ce=>{const re=E.value;return new i1({[re]:ce}).validate({[re]:V.value},{firstFields:!0}).then(()=>(F(),!0)).catch(ze=>(N(ze),Promise.reject(ze)))},ie=async(ce,re)=>{if(m||!n.prop)return!1;const ge=ot(re);if(!z.value)return re==null||re(!1),!1;const ze=Y(ce);return ze.length===0?(re==null||re(!0),!0):(K("validating"),Q(ze).then(()=>(re==null||re(!0),!0)).catch(st=>{const{fields:ee}=st;return re==null||re(!1,ee),ge?!1:Promise.reject(ee)}))},Z=()=>{K(""),h.value="",m=!1},me=async()=>{const ce=i==null?void 0:i.model;if(!ce||!n.prop)return;const re=j0(ce,n.prop);m=!0,re.value=m7(p),await dt(),Z(),m=!1},Se=ce=>{c.value.includes(ce)||c.value.push(ce)},we=ce=>{c.value=c.value.filter(re=>re!==ce)};Te(()=>n.error,ce=>{h.value=ce||"",K(ce?"error":"")},{immediate:!0}),Te(()=>n.validateStatus,ce=>K(ce||""));const oe=as({...yo(n),$el:f,size:r,validateState:u,labelId:l,inputIds:c,isGroup:I,hasLabel:T,fieldValue:V,addInputId:Se,removeInputId:we,resetField:me,clearValidate:Z,validate:ie});return It(Gu,oe),Pt(()=>{n.prop&&(i==null||i.addField(oe),p=m7(V.value))}),Gn(()=>{i==null||i.removeField(oe)}),e({size:r,validateMessage:h,validateState:u,validate:ie,clearValidate:Z,resetField:me}),(ce,re)=>{var ge;return v(),$("div",{ref_key:"formItemRef",ref:f,class:W(A(k)),role:A(I)?"group":void 0,"aria-labelledby":A(I)?A(l):void 0},[_(A(Gle),{"is-auto-width":A(y).width==="auto","update-all":((ge=A(i))==null?void 0:ge.labelWidth)==="auto"},{default:w(()=>[A(T)?(v(),R(Tt(A(P)?"label":"div"),{key:0,id:A(l),for:A(P),class:W(A(a).e("label")),style:Ke(A(y))},{default:w(()=>[ae(ce.$slots,"label",{label:A(X)},()=>[G(M(A(X)),1)])]),_:3},8,["id","for","class","style"])):O("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),g("div",{class:W(A(a).e("content")),style:Ke(A(C))},[ae(ce.$slots,"default"),_(Vy,{name:`${A(a).namespace.value}-zoom-in-top`},{default:w(()=>[A(U)?ae(ce.$slots,"error",{key:0,error:h.value},()=>[g("div",{class:W(A(S))},M(h.value),3)]):O("v-if",!0)]),_:3},8,["name"])],6)],10,["role","aria-labelledby"])}}});var yD=Ye(Xle,[["__file","form-item.vue"]]);const rn=jt(hle,{FormItem:yD}),en=xs(yD);let ar;const Kle=` | |
| 53 | - height:0 !important; | |
| 54 | - visibility:hidden !important; | |
| 55 | - ${$Z()?"":"overflow:hidden !important;"} | |
| 56 | - position:absolute !important; | |
| 57 | - z-index:-1000 !important; | |
| 58 | - top:0 !important; | |
| 59 | - right:0 !important; | |
| 60 | -`,Zle=["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"];function Jle(t){const e=window.getComputedStyle(t),n=e.getPropertyValue("box-sizing"),s=Number.parseFloat(e.getPropertyValue("padding-bottom"))+Number.parseFloat(e.getPropertyValue("padding-top")),i=Number.parseFloat(e.getPropertyValue("border-bottom-width"))+Number.parseFloat(e.getPropertyValue("border-top-width"));return{contextStyle:Zle.map(r=>`${r}:${e.getPropertyValue(r)}`).join(";"),paddingSize:s,borderSize:i,boxSizing:n}}function q7(t,e=1,n){var s;ar||(ar=document.createElement("textarea"),document.body.appendChild(ar));const{paddingSize:i,borderSize:o,boxSizing:r,contextStyle:a}=Jle(t);ar.setAttribute("style",`${a};${Kle}`),ar.value=t.value||t.placeholder||"";let l=ar.scrollHeight;const c={};r==="border-box"?l=l+o:r==="content-box"&&(l=l-i),ar.value="";const u=ar.scrollHeight-i;if(xt(e)){let d=u*e;r==="border-box"&&(d=d+i+o),l=Math.max(d,l),c.minHeight=`${d}px`}if(xt(n)){let d=u*n;r==="border-box"&&(d=d+i+o),l=Math.min(d,l)}return c.height=`${l}px`,(s=ar.parentNode)==null||s.removeChild(ar),ar=void 0,c}const Qle=Ze({id:{type:String,default:void 0},size:Ji,disabled:Boolean,modelValue:{type:xe([String,Number,Object]),default:""},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:String,default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:xe([Boolean,Object]),default:!1},autocomplete:{type:String,default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,showPassword:Boolean,showWordLimit:Boolean,suffixIcon:{type:ms},prefixIcon:{type:ms},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:xe([Object,Array,String]),default:()=>si({})},autofocus:Boolean,rows:{type:Number,default:2},...ir(["ariaLabel"])}),ece={[mn]:t=>nt(t),input:t=>nt(t),change:t=>nt(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0,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},tce=se({name:"ElInput",inheritAttrs:!1}),nce=se({...tce,props:Qle,emits:ece,setup(t,{expose:e,emit:n}){const s=t,i=If(),o=Zi(),r=q(()=>{const _e={};return s.containerRole==="combobox"&&(_e["aria-haspopup"]=i["aria-haspopup"],_e["aria-owns"]=i["aria-owns"],_e["aria-expanded"]=i["aria-expanded"]),_e}),a=q(()=>[s.type==="textarea"?b.b():m.b(),m.m(f.value),m.is("disabled",p.value),m.is("exceed",Z.value),{[m.b("group")]:o.prepend||o.append,[m.m("prefix")]:o.prefix||s.prefixIcon,[m.m("suffix")]:o.suffix||s.suffixIcon||s.clearable||s.showPassword,[m.bm("suffix","password-clear")]:N.value&&F.value,[m.b("hidden")]:s.type==="hidden"},i.class]),l=q(()=>[m.e("wrapper"),m.is("focus",I.value)]),c=LO({excludeKeys:q(()=>Object.keys(r.value))}),{form:u,formItem:d}=Br(),{inputId:h}=dd(s,{formItemContext:d}),f=Mi(),p=Co(),m=He("input"),b=He("textarea"),y=ss(),C=ss(),k=J(!1),x=J(!1),S=J(),E=ss(s.inputStyle),T=q(()=>y.value||C.value),{wrapperRef:P,isFocused:I,handleFocus:L,handleBlur:V}=e4(T,{beforeFocus(){return p.value},afterBlur(){var _e;s.validateEvent&&((_e=d==null?void 0:d.validate)==null||_e.call(d,"blur").catch(le=>void 0))}}),D=q(()=>{var _e;return(_e=u==null?void 0:u.statusIcon)!=null?_e:!1}),z=q(()=>(d==null?void 0:d.validateState)||""),Y=q(()=>z.value&&PO[z.value]),B=q(()=>x.value?$O:kO),U=q(()=>[i.style]),X=q(()=>[s.inputStyle,E.value,{resize:s.resize}]),K=q(()=>xi(s.modelValue)?"":String(s.modelValue)),N=q(()=>s.clearable&&!p.value&&!s.readonly&&!!K.value&&(I.value||k.value)),F=q(()=>s.showPassword&&!p.value&&!s.readonly&&!!K.value&&(!!K.value||I.value)),Q=q(()=>s.showWordLimit&&!!s.maxlength&&(s.type==="text"||s.type==="textarea")&&!p.value&&!s.readonly&&!s.showPassword),ie=q(()=>K.value.length),Z=q(()=>!!Q.value&&ie.value>Number(s.maxlength)),me=q(()=>!!o.suffix||!!s.suffixIcon||N.value||s.showPassword||Q.value||!!z.value&&D.value),[Se,we]=Fae(y);bi(C,_e=>{if(re(),!Q.value||s.resize!=="both")return;const le=_e[0],{width:ke}=le.contentRect;S.value={right:`calc(100% - ${ke+15+6}px)`}});const oe=()=>{const{type:_e,autosize:le}=s;if(!(!Ut||_e!=="textarea"||!C.value))if(le){const ke=Ct(le)?le.minRows:void 0,Xe=Ct(le)?le.maxRows:void 0,tt=q7(C.value,ke,Xe);E.value={overflowY:"hidden",...tt},dt(()=>{C.value.offsetHeight,E.value=tt})}else E.value={minHeight:q7(C.value).minHeight}},re=(_e=>{let le=!1;return()=>{var ke;if(le||!s.autosize)return;((ke=C.value)==null?void 0:ke.offsetParent)===null||(_e(),le=!0)}})(oe),ge=()=>{const _e=T.value,le=s.formatter?s.formatter(K.value):K.value;!_e||_e.value===le||(_e.value=le)},ze=async _e=>{Se();let{value:le}=_e.target;if(s.formatter&&(le=s.parser?s.parser(le):le),!ee.value){if(le===K.value){ge();return}n(mn,le),n("input",le),await dt(),ge(),we()}},st=_e=>{n("change",_e.target.value)},{isComposing:ee,handleCompositionStart:ne,handleCompositionUpdate:pe,handleCompositionEnd:Ae}=fD({emit:n,afterComposition:ze}),Ce=()=>{x.value=!x.value,Me()},Me=async()=>{var _e;await dt(),(_e=T.value)==null||_e.focus()},je=()=>{var _e;return(_e=T.value)==null?void 0:_e.blur()},Fe=_e=>{k.value=!1,n("mouseleave",_e)},Ue=_e=>{k.value=!0,n("mouseenter",_e)},Oe=_e=>{n("keydown",_e)},ht=()=>{var _e;(_e=T.value)==null||_e.select()},Ie=()=>{n(mn,""),n("change",""),n("clear"),n("input","")};return Te(()=>s.modelValue,()=>{var _e;dt(()=>oe()),s.validateEvent&&((_e=d==null?void 0:d.validate)==null||_e.call(d,"change").catch(le=>void 0))}),Te(K,()=>ge()),Te(()=>s.type,async()=>{await dt(),ge(),oe()}),Pt(()=>{!s.formatter&&s.parser,ge(),dt(oe)}),e({input:y,textarea:C,ref:T,textareaStyle:X,autosize:kn(s,"autosize"),isComposing:ee,focus:Me,blur:je,select:ht,clear:Ie,resizeTextarea:oe}),(_e,le)=>(v(),$("div",Mn(A(r),{class:[A(a),{[A(m).bm("group","append")]:_e.$slots.append,[A(m).bm("group","prepend")]:_e.$slots.prepend}],style:A(U),role:_e.containerRole,onMouseenter:Ue,onMouseleave:Fe}),[O(" input "),_e.type!=="textarea"?(v(),$(te,{key:0},[O(" prepend slot "),_e.$slots.prepend?(v(),$("div",{key:0,class:W(A(m).be("group","prepend"))},[ae(_e.$slots,"prepend")],2)):O("v-if",!0),g("div",{ref_key:"wrapperRef",ref:P,class:W(A(l))},[O(" prefix slot "),_e.$slots.prefix||_e.prefixIcon?(v(),$("span",{key:0,class:W(A(m).e("prefix"))},[g("span",{class:W(A(m).e("prefix-inner"))},[ae(_e.$slots,"prefix"),_e.prefixIcon?(v(),R(A(ye),{key:0,class:W(A(m).e("icon"))},{default:w(()=>[(v(),R(Tt(_e.prefixIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],2)):O("v-if",!0),g("input",Mn({id:A(h),ref_key:"input",ref:y,class:A(m).e("inner")},A(c),{minlength:_e.minlength,maxlength:_e.maxlength,type:_e.showPassword?x.value?"text":"password":_e.type,disabled:A(p),readonly:_e.readonly,autocomplete:_e.autocomplete,tabindex:_e.tabindex,"aria-label":_e.ariaLabel,placeholder:_e.placeholder,style:_e.inputStyle,form:_e.form,autofocus:_e.autofocus,onCompositionstart:A(ne),onCompositionupdate:A(pe),onCompositionend:A(Ae),onInput:ze,onChange:st,onKeydown:Oe}),null,16,["id","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","onCompositionstart","onCompositionupdate","onCompositionend"]),O(" suffix slot "),A(me)?(v(),$("span",{key:1,class:W(A(m).e("suffix"))},[g("span",{class:W(A(m).e("suffix-inner"))},[!A(N)||!A(F)||!A(Q)?(v(),$(te,{key:0},[ae(_e.$slots,"suffix"),_e.suffixIcon?(v(),R(A(ye),{key:0,class:W(A(m).e("icon"))},{default:w(()=>[(v(),R(Tt(_e.suffixIcon)))]),_:1},8,["class"])):O("v-if",!0)],64)):O("v-if",!0),A(N)?(v(),R(A(ye),{key:1,class:W([A(m).e("icon"),A(m).e("clear")]),onMousedown:Be(A(Vt),["prevent"]),onClick:Ie},{default:w(()=>[_(A(Of))]),_:1},8,["class","onMousedown"])):O("v-if",!0),A(F)?(v(),R(A(ye),{key:2,class:W([A(m).e("icon"),A(m).e("password")]),onClick:Ce},{default:w(()=>[(v(),R(Tt(A(B))))]),_:1},8,["class"])):O("v-if",!0),A(Q)?(v(),$("span",{key:3,class:W(A(m).e("count"))},[g("span",{class:W(A(m).e("count-inner"))},M(A(ie))+" / "+M(_e.maxlength),3)],2)):O("v-if",!0),A(z)&&A(Y)&&A(D)?(v(),R(A(ye),{key:4,class:W([A(m).e("icon"),A(m).e("validateIcon"),A(m).is("loading",A(z)==="validating")])},{default:w(()=>[(v(),R(Tt(A(Y))))]),_:1},8,["class"])):O("v-if",!0)],2)],2)):O("v-if",!0)],2),O(" append slot "),_e.$slots.append?(v(),$("div",{key:1,class:W(A(m).be("group","append"))},[ae(_e.$slots,"append")],2)):O("v-if",!0)],64)):(v(),$(te,{key:1},[O(" textarea "),g("textarea",Mn({id:A(h),ref_key:"textarea",ref:C,class:[A(b).e("inner"),A(m).is("focus",A(I))]},A(c),{minlength:_e.minlength,maxlength:_e.maxlength,tabindex:_e.tabindex,disabled:A(p),readonly:_e.readonly,autocomplete:_e.autocomplete,style:A(X),"aria-label":_e.ariaLabel,placeholder:_e.placeholder,form:_e.form,autofocus:_e.autofocus,rows:_e.rows,onCompositionstart:A(ne),onCompositionupdate:A(pe),onCompositionend:A(Ae),onInput:ze,onFocus:A(L),onBlur:A(V),onChange:st,onKeydown:Oe}),null,16,["id","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","onCompositionstart","onCompositionupdate","onCompositionend","onFocus","onBlur"]),A(Q)?(v(),$("span",{key:0,style:Ke(S.value),class:W(A(m).e("count"))},M(A(ie))+" / "+M(_e.maxlength),7)):O("v-if",!0)],64))],16,["role"]))}});var sce=Ye(nce,[["__file","input.vue"]]);const vt=jt(sce),Dd=4,ice={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"}},oce=({move:t,size:e,bar:n})=>({[n.size]:e,transform:`translate${n.axis}(${t}%)`}),n4=Symbol("scrollbarContextKey"),rce=Ze({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),ace="Thumb",lce=se({__name:"thumb",props:rce,setup(t){const e=t,n=qe(n4),s=He("scrollbar");n||sr(ace,"can not inject scrollbar context");const i=J(),o=J(),r=J({}),a=J(!1);let l=!1,c=!1,u=Ut?document.onselectstart:null;const d=q(()=>ice[e.vertical?"vertical":"horizontal"]),h=q(()=>oce({size:e.size,move:e.move,bar:d.value})),f=q(()=>i.value[d.value.offset]**2/n.wrapElement[d.value.scrollSize]/e.ratio/o.value[d.value.offset]),p=E=>{var T;if(E.stopPropagation(),E.ctrlKey||[1,2].includes(E.button))return;(T=window.getSelection())==null||T.removeAllRanges(),b(E);const P=E.currentTarget;P&&(r.value[d.value.axis]=P[d.value.offset]-(E[d.value.client]-P.getBoundingClientRect()[d.value.direction]))},m=E=>{if(!o.value||!i.value||!n.wrapElement)return;const T=Math.abs(E.target.getBoundingClientRect()[d.value.direction]-E[d.value.client]),P=o.value[d.value.offset]/2,I=(T-P)*100*f.value/i.value[d.value.offset];n.wrapElement[d.value.scroll]=I*n.wrapElement[d.value.scrollSize]/100},b=E=>{E.stopImmediatePropagation(),l=!0,document.addEventListener("mousemove",y),document.addEventListener("mouseup",C),u=document.onselectstart,document.onselectstart=()=>!1},y=E=>{if(!i.value||!o.value||l===!1)return;const T=r.value[d.value.axis];if(!T)return;const P=(i.value.getBoundingClientRect()[d.value.direction]-E[d.value.client])*-1,I=o.value[d.value.offset]-T,L=(P-I)*100*f.value/i.value[d.value.offset];n.wrapElement[d.value.scroll]=L*n.wrapElement[d.value.scrollSize]/100},C=()=>{l=!1,r.value[d.value.axis]=0,document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",C),S(),c&&(a.value=!1)},k=()=>{c=!1,a.value=!!e.size},x=()=>{c=!0,a.value=l};Gn(()=>{S(),document.removeEventListener("mouseup",C)});const S=()=>{document.onselectstart!==u&&(document.onselectstart=u)};return is(kn(n,"scrollbarElement"),"mousemove",k),is(kn(n,"scrollbarElement"),"mouseleave",x),(E,T)=>(v(),R(bo,{name:A(s).b("fade"),persisted:""},{default:w(()=>[Pe(g("div",{ref_key:"instance",ref:i,class:W([A(s).e("bar"),A(s).is(A(d).key)]),onMousedown:m},[g("div",{ref_key:"thumb",ref:o,class:W(A(s).e("thumb")),style:Ke(A(h)),onMousedown:p},null,38)],34),[[Xt,E.always||a.value]])]),_:1},8,["name"]))}});var X7=Ye(lce,[["__file","thumb.vue"]]);const cce=Ze({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),uce=se({__name:"bar",props:cce,setup(t,{expose:e}){const n=t,s=qe(n4),i=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-Dd,p=h.offsetWidth-Dd;o.value=h.scrollTop*100/f*l.value,i.value=h.scrollLeft*100/p*c.value}},update:()=>{const h=s==null?void 0:s.wrapElement;if(!h)return;const f=h.offsetHeight-Dd,p=h.offsetWidth-Dd,m=f**2/h.scrollHeight,b=p**2/h.scrollWidth,y=Math.max(m,n.minSize),C=Math.max(b,n.minSize);l.value=m/(f-m)/(y/(f-y)),c.value=b/(p-b)/(C/(p-C)),a.value=y+Dd<f?`${y}px`:"",r.value=C+Dd<p?`${C}px`:""}}),(h,f)=>(v(),$(te,null,[_(X7,{move:i.value,ratio:c.value,size:r.value,always:h.always},null,8,["move","ratio","size","always"]),_(X7,{move:o.value,ratio:l.value,size:a.value,vertical:"",always:h.always},null,8,["move","ratio","size","always"])],64))}});var dce=Ye(uce,[["__file","bar.vue"]]);const hce=Ze({height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:{type:Boolean,default:!1},wrapStyle:{type:xe([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},id:String,role:String,...ir(["ariaLabel","ariaOrientation"])}),fce={scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(xt)},pce="ElScrollbar",mce=se({name:pce}),gce=se({...mce,props:hce,emits:fce,setup(t,{expose:e,emit:n}){const s=t,i=He("scrollbar");let o,r,a=0,l=0;const c=J(),u=J(),d=J(),h=J(),f=q(()=>{const S={};return s.height&&(S.height=Ai(s.height)),s.maxHeight&&(S.maxHeight=Ai(s.maxHeight)),[s.wrapStyle,S]}),p=q(()=>[s.wrapClass,i.e("wrap"),{[i.em("wrap","hidden-default")]:!s.native}]),m=q(()=>[i.e("view"),s.viewClass]),b=()=>{var S;u.value&&((S=h.value)==null||S.handleScroll(u.value),a=u.value.scrollTop,l=u.value.scrollLeft,n("scroll",{scrollTop:u.value.scrollTop,scrollLeft:u.value.scrollLeft}))};function y(S,E){Ct(S)?u.value.scrollTo(S):xt(S)&&xt(E)&&u.value.scrollTo(S,E)}const C=S=>{xt(S)&&(u.value.scrollTop=S)},k=S=>{xt(S)&&(u.value.scrollLeft=S)},x=()=>{var S;(S=h.value)==null||S.update()};return Te(()=>s.noresize,S=>{S?(o==null||o(),r==null||r()):({stop:o}=bi(d,x),r=is("resize",x))},{immediate:!0}),Te(()=>[s.maxHeight,s.height],()=>{s.native||dt(()=>{var S;x(),u.value&&((S=h.value)==null||S.handleScroll(u.value))})}),It(n4,as({scrollbarElement:c,wrapElement:u})),Lk(()=>{u.value.scrollTop=a,u.value.scrollLeft=l}),Pt(()=>{s.native||dt(()=>{x()})}),ll(()=>x()),e({wrapRef:u,update:x,scrollTo:y,setScrollTop:C,setScrollLeft:k,handleScroll:b}),(S,E)=>(v(),$("div",{ref_key:"scrollbarRef",ref:c,class:W(A(i).b())},[g("div",{ref_key:"wrapRef",ref:u,class:W(A(p)),style:Ke(A(f)),onScroll:b},[(v(),R(Tt(S.tag),{id:S.id,ref_key:"resizeRef",ref:d,class:W(A(m)),style:Ke(S.viewStyle),role:S.role,"aria-label":S.ariaLabel,"aria-orientation":S.ariaOrientation},{default:w(()=>[ae(S.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],38),S.native?O("v-if",!0):(v(),R(dce,{key:0,ref_key:"barRef",ref:h,always:S.always,"min-size":S.minSize},null,8,["always","min-size"]))],2))}});var vce=Ye(gce,[["__file","scrollbar.vue"]]);const ui=jt(vce),s4=Symbol("popper"),bD=Symbol("popperContent"),_ce=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],wD=Ze({role:{type:String,values:_ce,default:"tooltip"}}),yce=se({name:"ElPopper",inheritAttrs:!1}),bce=se({...yce,props:wD,setup(t,{expose:e}){const n=t,s=J(),i=J(),o=J(),r=J(),a=q(()=>n.role),l={triggerRef:s,popperInstanceRef:i,contentRef:o,referenceRef:r,role:a};return e(l),It(s4,l),(c,u)=>ae(c.$slots,"default")}});var wce=Ye(bce,[["__file","popper.vue"]]);const CD=Ze({arrowOffset:{type:Number,default:5}}),Cce=se({name:"ElPopperArrow",inheritAttrs:!1}),kce=se({...Cce,props:CD,setup(t,{expose:e}){const n=t,s=He("popper"),{arrowOffset:i,arrowRef:o,arrowStyle:r}=qe(bD,void 0);return Te(()=>n.arrowOffset,a=>{i.value=a}),Gn(()=>{o.value=void 0}),e({arrowRef:o}),(a,l)=>(v(),$("span",{ref_key:"arrowRef",ref:o,class:W(A(s).e("arrow")),style:Ke(A(r)),"data-popper-arrow":""},null,6))}});var xce=Ye(kce,[["__file","arrow.vue"]]);const Sce="ElOnlyChild",kD=se({name:Sce,setup(t,{slots:e,attrs:n}){var s;const i=qe(JO),o=aae((s=i==null?void 0:i.setForwardRef)!=null?s:Vt);return()=>{var r;const a=(r=e.default)==null?void 0:r.call(e,n);if(!a||a.length>1)return null;const l=xD(a);return l?Pe(Tr(l,n),[[o]]):null}}});function xD(t){if(!t)return null;const e=t;for(const n of e){if(Ct(n))switch(n.type){case Qn:continue;case ra:case"svg":return K7(n);case te:return xD(n.children);default:return n}return K7(n)}return null}function K7(t){const e=He("only-child");return _("span",{class:e.e("content")},[t])}const SD=Ze({virtualRef:{type:xe(Object)},virtualTriggering:Boolean,onMouseenter:{type:xe(Function)},onMouseleave:{type:xe(Function)},onClick:{type:xe(Function)},onKeydown:{type:xe(Function)},onFocus:{type:xe(Function)},onBlur:{type:xe(Function)},onContextmenu:{type:xe(Function)},id:String,open:Boolean}),$ce=se({name:"ElPopperTrigger",inheritAttrs:!1}),Ace=se({...$ce,props:SD,setup(t,{expose:e}){const n=t,{role:s,triggerRef:i}=qe(s4,void 0);rae(i);const o=q(()=>a.value?n.id:void 0),r=q(()=>{if(s&&s.value==="tooltip")return n.open&&n.id?n.id:void 0}),a=q(()=>{if(s&&s.value!=="tooltip")return s.value}),l=q(()=>a.value?`${n.open}`:void 0);let c;const u=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return Pt(()=>{Te(()=>n.virtualRef,d=>{d&&(i.value=qa(d))},{immediate:!0}),Te(i,(d,h)=>{c==null||c(),c=void 0,Yo(d)&&(u.forEach(f=>{var p;const m=n[f];m&&(d.addEventListener(f.slice(2).toLowerCase(),m),(p=h==null?void 0:h.removeEventListener)==null||p.call(h,f.slice(2).toLowerCase(),m))}),c=Te([o,r,a,l],f=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((p,m)=>{xi(f[m])?d.removeAttribute(p):d.setAttribute(p,f[m])})},{immediate:!0})),Yo(h)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(f=>h.removeAttribute(f))},{immediate:!0})}),Gn(()=>{if(c==null||c(),c=void 0,i.value&&Yo(i.value)){const d=i.value;u.forEach(h=>{const f=n[h];f&&d.removeEventListener(h.slice(2).toLowerCase(),f)}),i.value=void 0}}),e({triggerRef:i}),(d,h)=>d.virtualTriggering?O("v-if",!0):(v(),R(A(kD),Mn({key:0},d.$attrs,{"aria-controls":A(o),"aria-describedby":A(r),"aria-expanded":A(l),"aria-haspopup":A(a)}),{default:w(()=>[ae(d.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var Mce=Ye(Ace,[["__file","trigger.vue"]]);const R2="focus-trap.focus-after-trapped",V2="focus-trap.focus-after-released",Ece="focus-trap.focusout-prevented",Z7={cancelable:!0,bubbles:!1},Tce={cancelable:!0,bubbles:!1},J7="focusAfterTrapped",Q7="focusAfterReleased",i4=Symbol("elFocusTrap"),o4=J(),ob=J(0),r4=J(0);let l0=0;const $D=t=>{const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0||s===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e},e$=(t,e)=>{for(const n of t)if(!Pce(n,e))return n},Pce=(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},Ice=t=>{const e=$D(t),n=e$(e,t),s=e$(e.reverse(),t);return[n,s]},Lce=t=>t instanceof HTMLInputElement&&"select"in t,Cl=(t,e)=>{if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),r4.value=window.performance.now(),t!==n&&Lce(t)&&e&&t.select()}};function t$(t,e){const n=[...t],s=t.indexOf(e);return s!==-1&&n.splice(s,1),n}const Oce=()=>{let t=[];return{push:s=>{const i=t[0];i&&s!==i&&i.pause(),t=t$(t,s),t.unshift(s)},remove:s=>{var i,o;t=t$(t,s),(o=(i=t[0])==null?void 0:i.resume)==null||o.call(i)}}},Dce=(t,e=!1)=>{const n=document.activeElement;for(const s of t)if(Cl(s,e),document.activeElement!==n)return},n$=Oce(),Rce=()=>ob.value>r4.value,c0=()=>{o4.value="pointer",ob.value=window.performance.now()},s$=()=>{o4.value="keyboard",ob.value=window.performance.now()},Vce=()=>(Pt(()=>{l0===0&&(document.addEventListener("mousedown",c0),document.addEventListener("touchstart",c0),document.addEventListener("keydown",s$)),l0++}),Gn(()=>{l0--,l0<=0&&(document.removeEventListener("mousedown",c0),document.removeEventListener("touchstart",c0),document.removeEventListener("keydown",s$))}),{focusReason:o4,lastUserFocusTimestamp:ob,lastAutomatedFocusTimestamp:r4}),u0=t=>new CustomEvent(Ece,{...Tce,detail:t}),Fce=se({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[J7,Q7,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const n=J();let s,i;const{focusReason:o}=Vce();tae(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{key:m,altKey:b,ctrlKey:y,metaKey:C,currentTarget:k,shiftKey:x}=p,{loop:S}=t,E=m===ft.tab&&!b&&!y&&!C,T=document.activeElement;if(E&&T){const P=k,[I,L]=Ice(P);if(I&&L){if(!x&&T===L){const D=u0({focusReason:o.value});e("focusout-prevented",D),D.defaultPrevented||(p.preventDefault(),S&&Cl(I,!0))}else if(x&&[I,P].includes(T)){const D=u0({focusReason:o.value});e("focusout-prevented",D),D.defaultPrevented||(p.preventDefault(),S&&Cl(L,!0))}}else if(T===P){const D=u0({focusReason:o.value});e("focusout-prevented",D),D.defaultPrevented||p.preventDefault()}}};It(i4,{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(J7,p)},c=p=>e(Q7,p),u=p=>{const m=A(n);if(!m)return;const b=p.target,y=p.relatedTarget,C=b&&m.contains(b);t.trapped||y&&m.contains(y)||(s=y),C&&e("focusin",p),!r.paused&&t.trapped&&(C?i=b:Cl(i,!0))},d=p=>{const m=A(n);if(!(r.paused||!m))if(t.trapped){const b=p.relatedTarget;!xi(b)&&!m.contains(b)&&setTimeout(()=>{if(!r.paused&&t.trapped){const y=u0({focusReason:o.value});e("focusout-prevented",y),y.defaultPrevented||Cl(i,!0)}},0)}else{const b=p.target;b&&m.contains(b)||e("focusout",p)}};async function h(){await dt();const p=A(n);if(p){n$.push(r);const m=p.contains(document.activeElement)?s:document.activeElement;if(s=m,!p.contains(m)){const y=new Event(R2,Z7);p.addEventListener(R2,l),p.dispatchEvent(y),y.defaultPrevented||dt(()=>{let C=t.focusStartEl;nt(C)||(Cl(C),document.activeElement!==C&&(C="first")),C==="first"&&Dce($D(p),!0),(document.activeElement===m||C==="container")&&Cl(p)})}}}function f(){const p=A(n);if(p){p.removeEventListener(R2,l);const m=new CustomEvent(V2,{...Z7,detail:{focusReason:o.value}});p.addEventListener(V2,c),p.dispatchEvent(m),!m.defaultPrevented&&(o.value=="keyboard"||!Rce()||p.contains(document.activeElement))&&Cl(s??document.body),p.removeEventListener(V2,c),n$.remove(r)}}return Pt(()=>{t.trapped&&h(),Te(()=>t.trapped,p=>{p?h():f()})}),Gn(()=>{t.trapped&&f(),n.value&&(n.value.removeEventListener("keydown",a),n.value.removeEventListener("focusin",u),n.value.removeEventListener("focusout",d),n.value=void 0)}),{onKeydown:a}}});function Nce(t,e,n,s,i,o){return ae(t.$slots,"default",{handleKeydown:t.onKeydown})}var rb=Ye(Fce,[["render",Nce],["__file","focus-trap.vue"]]);const Bce=["fixed","absolute"],zce=Ze({boundariesPadding:{type:Number,default:0},fallbackPlacements:{type:xe(Array),default:void 0},gpuAcceleration:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:String,values:Zy,default:"bottom"},popperOptions:{type:xe(Object),default:()=>({})},strategy:{type:String,values:Bce,default:"absolute"}}),AD=Ze({...zce,id:String,style:{type:xe([String,Array,Object])},className:{type:xe([String,Array,Object])},effect:{type:xe(String),default:"dark"},visible:Boolean,enterable:{type:Boolean,default:!0},pure:Boolean,focusOnShow:{type:Boolean,default:!1},trapping:{type:Boolean,default:!1},popperClass:{type:xe([String,Array,Object])},popperStyle:{type:xe([String,Array,Object])},referenceEl:{type:xe(Object)},triggerTargetEl:{type:xe(Object)},stopPopperMouseEvent:{type:Boolean,default:!0},virtualTriggering:Boolean,zIndex:Number,...ir(["ariaLabel"])}),Hce={mouseenter:t=>t instanceof MouseEvent,mouseleave:t=>t instanceof MouseEvent,focus:()=>!0,blur:()=>!0,close:()=>!0},Uce=(t,e=[])=>{const{placement:n,strategy:s,popperOptions:i}=t,o={placement:n,strategy:s,...i,modifiers:[...Wce(t),...e]};return Yce(o,i==null?void 0:i.modifiers),o},jce=t=>{if(Ut)return qa(t)};function Wce(t){const{offset:e,gpuAcceleration:n,fallbackPlacements:s}=t;return[{name:"offset",options:{offset:[0,e??12]}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5,fallbackPlacements:s}},{name:"computeStyles",options:{gpuAcceleration:n}}]}function Yce(t,e){e&&(t.modifiers=[...t.modifiers,...e??[]])}const Gce=0,qce=t=>{const{popperInstanceRef:e,contentRef:n,triggerRef:s,role:i}=qe(s4,void 0),o=J(),r=J(),a=q(()=>({name:"eventListeners",enabled:!!t.visible})),l=q(()=>{var y;const C=A(o),k=(y=A(r))!=null?y:Gce;return{name:"arrow",enabled:!dO(C),options:{element:C,padding:k}}}),c=q(()=>({onFirstUpdate:()=>{p()},...Uce(t,[A(l),A(a)])})),u=q(()=>jce(t.referenceEl)||A(s)),{attributes:d,state:h,styles:f,update:p,forceUpdate:m,instanceRef:b}=Zre(u,n,c);return Te(b,y=>e.value=y),Pt(()=>{Te(()=>{var y;return(y=A(u))==null?void 0:y.getBoundingClientRect()},()=>{p()})}),{attributes:d,arrowRef:o,contentRef:n,instanceRef:b,state:h,styles:f,role:i,forceUpdate:m,update:p}},Xce=(t,{attributes:e,styles:n,role:s})=>{const{nextZIndex:i}=Qy(),o=He("popper"),r=q(()=>A(e).popper),a=J(xt(t.zIndex)?t.zIndex:i()),l=q(()=>[o.b(),o.is("pure",t.pure),o.is(t.effect),t.popperClass]),c=q(()=>[{zIndex:A(a)},A(n).popper,t.popperStyle||{}]),u=q(()=>s.value==="dialog"?"false":void 0),d=q(()=>A(n).arrow||{});return{ariaModal:u,arrowStyle:d,contentAttrs:r,contentClass:l,contentStyle:c,contentZIndex:a,updateZIndex:()=>{a.value=xt(t.zIndex)?t.zIndex:i()}}},Kce=(t,e)=>{const n=J(!1),s=J();return{focusStartRef:s,trapped:n,onFocusAfterReleased:c=>{var u;((u=c.detail)==null?void 0:u.focusReason)!=="pointer"&&(s.value="first",e("blur"))},onFocusAfterTrapped:()=>{e("focus")},onFocusInTrap:c=>{t.visible&&!n.value&&(c.target&&(s.value=c.target),n.value=!0)},onFocusoutPrevented:c=>{t.trapping||(c.detail.focusReason==="pointer"&&c.preventDefault(),n.value=!1)},onReleaseRequested:()=>{n.value=!1,e("close")}}},Zce=se({name:"ElPopperContent"}),Jce=se({...Zce,props:AD,emits:Hce,setup(t,{expose:e,emit:n}){const s=t,{focusStartRef:i,trapped:o,onFocusAfterReleased:r,onFocusAfterTrapped:a,onFocusInTrap:l,onFocusoutPrevented:c,onReleaseRequested:u}=Kce(s,n),{attributes:d,arrowRef:h,contentRef:f,styles:p,instanceRef:m,role:b,update:y}=qce(s),{ariaModal:C,arrowStyle:k,contentAttrs:x,contentClass:S,contentStyle:E,updateZIndex:T}=Xce(s,{styles:p,attributes:d,role:b}),P=qe(Gu,void 0);It(bD,{arrowStyle:k,arrowRef:h,arrowOffset:J()}),P&&It(Gu,{...P,addInputId:Vt,removeInputId:Vt});let L;const V=(z=!0)=>{y(),z&&T()},D=()=>{V(!1),s.visible&&s.focusOnShow?o.value=!0:s.visible===!1&&(o.value=!1)};return Pt(()=>{Te(()=>s.triggerTargetEl,(z,Y)=>{L==null||L(),L=void 0;const B=A(z||f.value),U=A(Y||f.value);Yo(B)&&(L=Te([b,()=>s.ariaLabel,C,()=>s.id],X=>{["role","aria-label","aria-modal","id"].forEach((K,N)=>{xi(X[N])?B.removeAttribute(K):B.setAttribute(K,X[N])})},{immediate:!0})),U!==B&&Yo(U)&&["role","aria-label","aria-modal","id"].forEach(X=>{U.removeAttribute(X)})},{immediate:!0}),Te(()=>s.visible,D,{immediate:!0})}),Gn(()=>{L==null||L(),L=void 0}),e({popperContentRef:f,popperInstanceRef:m,updatePopper:V,contentStyle:E}),(z,Y)=>(v(),$("div",Mn({ref_key:"contentRef",ref:f},A(x),{style:A(E),class:A(S),tabindex:"-1",onMouseenter:B=>z.$emit("mouseenter",B),onMouseleave:B=>z.$emit("mouseleave",B)}),[_(A(rb),{trapped:A(o),"trap-on-focus-in":!0,"focus-trap-el":A(f),"focus-start-el":A(i),onFocusAfterTrapped:A(a),onFocusAfterReleased:A(r),onFocusin:A(l),onFocusoutPrevented:A(c),onReleaseRequested:A(u)},{default:w(()=>[ae(z.$slots,"default")]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16,["onMouseenter","onMouseleave"]))}});var Qce=Ye(Jce,[["__file","content.vue"]]);const eue=jt(wce),ab=Symbol("elTooltip"),Bi=Ze({...iae,...AD,appendTo:{type:xe([String,Object])},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:xe(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...ir(["ariaLabel"])}),_g=Ze({...SD,disabled:Boolean,trigger:{type:xe([String,Array]),default:"hover"},triggerKeys:{type:xe(Array),default:()=>[ft.enter,ft.space]}}),{useModelToggleProps:tue,useModelToggleEmits:nue,useModelToggle:sue}=FO("visible"),iue=Ze({...wD,...tue,...Bi,..._g,...CD,showArrow:{type:Boolean,default:!0}}),oue=[...nue,"before-show","before-hide","show","hide","open","close"],rue=(t,e)=>Le(t)?t.includes(e):t===e,Rd=(t,e,n)=>s=>{rue(A(t),e)&&n(s)},aue=se({name:"ElTooltipTrigger"}),lue=se({...aue,props:_g,setup(t,{expose:e}){const n=t,s=He("tooltip"),{controlled:i,id:o,open:r,onOpen:a,onClose:l,onToggle:c}=qe(ab,void 0),u=J(null),d=()=>{if(A(i)||n.disabled)return!0},h=kn(n,"trigger"),f=fs(d,Rd(h,"hover",a)),p=fs(d,Rd(h,"hover",l)),m=fs(d,Rd(h,"click",x=>{x.button===0&&c(x)})),b=fs(d,Rd(h,"focus",a)),y=fs(d,Rd(h,"focus",l)),C=fs(d,Rd(h,"contextmenu",x=>{x.preventDefault(),c(x)})),k=fs(d,x=>{const{code:S}=x;n.triggerKeys.includes(S)&&(x.preventDefault(),c(x))});return e({triggerRef:u}),(x,S)=>(v(),R(A(Mce),{id:A(o),"virtual-ref":x.virtualRef,open:A(r),"virtual-triggering":x.virtualTriggering,class:W(A(s).e("trigger")),onBlur:A(y),onClick:A(m),onContextmenu:A(C),onFocus:A(b),onMouseenter:A(f),onMouseleave:A(p),onKeydown:A(k)},{default:w(()=>[ae(x.$slots,"default")]),_:3},8,["id","virtual-ref","open","virtual-triggering","class","onBlur","onClick","onContextmenu","onFocus","onMouseenter","onMouseleave","onKeydown"]))}});var cue=Ye(lue,[["__file","trigger.vue"]]);const uue=Ze({to:{type:xe([String,Object]),required:!0},disabled:Boolean}),due=se({__name:"teleport",props:uue,setup(t){return(e,n)=>e.disabled?ae(e.$slots,"default",{key:0}):(v(),R(va,{key:1,to:e.to},[ae(e.$slots,"default")],8,["to"]))}});var hue=Ye(due,[["__file","teleport.vue"]]);const lb=jt(hue),fue=se({name:"ElTooltipContent",inheritAttrs:!1}),pue=se({...fue,props:Bi,setup(t,{expose:e}){const n=t,{selector:s}=ZO(),i=He("tooltip"),o=J(null);let r;const{controlled:a,id:l,open:c,trigger:u,onClose:d,onOpen:h,onShow:f,onHide:p,onBeforeShow:m,onBeforeHide:b}=qe(ab,void 0),y=q(()=>n.transition||`${i.namespace.value}-fade-in-linear`),C=q(()=>n.persistent);Gn(()=>{r==null||r()});const k=q(()=>A(C)?!0:A(c)),x=q(()=>n.disabled?!1:A(c)),S=q(()=>n.appendTo||s.value),E=q(()=>{var U;return(U=n.style)!=null?U:{}}),T=q(()=>!A(c)),P=()=>{p()},I=()=>{if(A(a))return!0},L=fs(I,()=>{n.enterable&&A(u)==="hover"&&h()}),V=fs(I,()=>{A(u)==="hover"&&d()}),D=()=>{var U,X;(X=(U=o.value)==null?void 0:U.updatePopper)==null||X.call(U),m==null||m()},z=()=>{b==null||b()},Y=()=>{f(),r=IL(q(()=>{var U;return(U=o.value)==null?void 0:U.popperContentRef}),()=>{if(A(a))return;A(u)!=="hover"&&d()})},B=()=>{n.virtualTriggering||d()};return Te(()=>A(c),U=>{U||r==null||r()},{flush:"post"}),Te(()=>n.content,()=>{var U,X;(X=(U=o.value)==null?void 0:U.updatePopper)==null||X.call(U)}),e({contentRef:o}),(U,X)=>(v(),R(A(lb),{disabled:!U.teleported,to:A(S)},{default:w(()=>[_(bo,{name:A(y),onAfterLeave:P,onBeforeEnter:D,onAfterEnter:Y,onBeforeLeave:z},{default:w(()=>[A(k)?Pe((v(),R(A(Qce),Mn({key:0,id:A(l),ref_key:"contentRef",ref:o},U.$attrs,{"aria-label":U.ariaLabel,"aria-hidden":A(T),"boundaries-padding":U.boundariesPadding,"fallback-placements":U.fallbackPlacements,"gpu-acceleration":U.gpuAcceleration,offset:U.offset,placement:U.placement,"popper-options":U.popperOptions,strategy:U.strategy,effect:U.effect,enterable:U.enterable,pure:U.pure,"popper-class":U.popperClass,"popper-style":[U.popperStyle,A(E)],"reference-el":U.referenceEl,"trigger-target-el":U.triggerTargetEl,visible:A(x),"z-index":U.zIndex,onMouseenter:A(L),onMouseleave:A(V),onBlur:B,onClose:A(d)}),{default:w(()=>[ae(U.$slots,"default")]),_:3},16,["id","aria-label","aria-hidden","boundaries-padding","fallback-placements","gpu-acceleration","offset","placement","popper-options","strategy","effect","enterable","pure","popper-class","popper-style","reference-el","trigger-target-el","visible","z-index","onMouseenter","onMouseleave","onClose"])),[[Xt,A(x)]]):O("v-if",!0)]),_:3},8,["name"])]),_:3},8,["disabled","to"]))}});var mue=Ye(pue,[["__file","content.vue"]]);const gue=se({name:"ElTooltip"}),vue=se({...gue,props:iue,emits:oue,setup(t,{expose:e,emit:n}){const s=t;sae();const i=tr(),o=J(),r=J(),a=()=>{var y;const C=A(o);C&&((y=C.popperInstanceRef)==null||y.update())},l=J(!1),c=J(),{show:u,hide:d,hasUpdateHandler:h}=sue({indicator:l,toggleReason:c}),{onOpen:f,onClose:p}=oae({showAfter:kn(s,"showAfter"),hideAfter:kn(s,"hideAfter"),autoClose:kn(s,"autoClose"),open:u,close:d}),m=q(()=>li(s.visible)&&!h.value);It(ab,{controlled:m,id:i,open:dc(l),trigger:kn(s,"trigger"),onOpen:y=>{f(y)},onClose:y=>{p(y)},onToggle:y=>{A(l)?p(y):f(y)},onShow:()=>{n("show",c.value)},onHide:()=>{n("hide",c.value)},onBeforeShow:()=>{n("before-show",c.value)},onBeforeHide:()=>{n("before-hide",c.value)},updatePopper:a}),Te(()=>s.disabled,y=>{y&&l.value&&(l.value=!1)});const b=y=>{var C,k;const x=(k=(C=r.value)==null?void 0:C.contentRef)==null?void 0:k.popperContentRef,S=(y==null?void 0:y.relatedTarget)||document.activeElement;return x&&x.contains(S)};return Ok(()=>l.value&&d()),e({popperRef:o,contentRef:r,isFocusInsideContent:b,updatePopper:a,onOpen:f,onClose:p,hide:d}),(y,C)=>(v(),R(A(eue),{ref_key:"popperRef",ref:o,role:y.role},{default:w(()=>[_(cue,{disabled:y.disabled,trigger:y.trigger,"trigger-keys":y.triggerKeys,"virtual-ref":y.virtualRef,"virtual-triggering":y.virtualTriggering},{default:w(()=>[y.$slots.default?ae(y.$slots,"default",{key:0}):O("v-if",!0)]),_:3},8,["disabled","trigger","trigger-keys","virtual-ref","virtual-triggering"]),_(mue,{ref_key:"contentRef",ref:r,"aria-label":y.ariaLabel,"boundaries-padding":y.boundariesPadding,content:y.content,disabled:y.disabled,effect:y.effect,enterable:y.enterable,"fallback-placements":y.fallbackPlacements,"hide-after":y.hideAfter,"gpu-acceleration":y.gpuAcceleration,offset:y.offset,persistent:y.persistent,"popper-class":y.popperClass,"popper-style":y.popperStyle,placement:y.placement,"popper-options":y.popperOptions,pure:y.pure,"raw-content":y.rawContent,"reference-el":y.referenceEl,"trigger-target-el":y.triggerTargetEl,"show-after":y.showAfter,strategy:y.strategy,teleported:y.teleported,transition:y.transition,"virtual-triggering":y.virtualTriggering,"z-index":y.zIndex,"append-to":y.appendTo},{default:w(()=>[ae(y.$slots,"content",{},()=>[y.rawContent?(v(),$("span",{key:0,innerHTML:y.content},null,8,["innerHTML"])):(v(),$("span",{key:1},M(y.content),1))]),y.showArrow?(v(),R(A(xce),{key:0,"arrow-offset":y.arrowOffset},null,8,["arrow-offset"])):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","pure","raw-content","reference-el","trigger-target-el","show-after","strategy","teleported","transition","virtual-triggering","z-index","append-to"])]),_:3},8,["role"]))}});var _ue=Ye(vue,[["__file","tooltip.vue"]]);const di=jt(_ue),yue=Ze({size:{type:[Number,String],values:Ac,default:"",validator:t=>xt(t)},shape:{type:String,values:["circle","square"],default:"circle"},icon:{type:ms},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:xe(String),default:"cover"}}),bue={error:t=>t instanceof Event},wue=se({name:"ElAvatar"}),Cue=se({...wue,props:yue,emits:bue,setup(t,{emit:e}){const n=t,s=He("avatar"),i=J(!1),o=q(()=>{const{size:c,icon:u,shape:d}=n,h=[s.b()];return nt(c)&&h.push(s.m(c)),u&&h.push(s.m("icon")),d&&h.push(s.m(d)),h}),r=q(()=>{const{size:c}=n;return xt(c)?s.cssVarBlock({size:Ai(c)||""}):void 0}),a=q(()=>({objectFit:n.fit}));Te(()=>n.src,()=>i.value=!1);function l(c){i.value=!0,e("error",c)}return(c,u)=>(v(),$("span",{class:W(A(o)),style:Ke(A(r))},[(c.src||c.srcSet)&&!i.value?(v(),$("img",{key:0,src:c.src,alt:c.alt,srcset:c.srcSet,style:Ke(A(a)),onError:l},null,44,["src","alt","srcset"])):c.icon?(v(),R(A(ye),{key:1},{default:w(()=>[(v(),R(Tt(c.icon)))]),_:1})):ae(c.$slots,"default",{key:2})],6))}});var kue=Ye(Cue,[["__file","avatar.vue"]]);const a4=jt(kue),MD=Symbol("breadcrumbKey"),xue=Ze({separator:{type:String,default:"/"},separatorIcon:{type:ms}}),Sue=se({name:"ElBreadcrumb"}),$ue=se({...Sue,props:xue,setup(t){const e=t,{t:n}=fn(),s=He("breadcrumb"),i=J();return It(MD,e),Pt(()=>{const o=i.value.querySelectorAll(`.${s.e("item")}`);o.length&&o[o.length-1].setAttribute("aria-current","page")}),(o,r)=>(v(),$("div",{ref_key:"breadcrumb",ref:i,class:W(A(s).b()),"aria-label":A(n)("el.breadcrumb.label"),role:"navigation"},[ae(o.$slots,"default")],10,["aria-label"]))}});var Aue=Ye($ue,[["__file","breadcrumb.vue"]]);const Mue=Ze({to:{type:xe([String,Object]),default:""},replace:Boolean}),Eue=se({name:"ElBreadcrumbItem"}),Tue=se({...Eue,props:Mue,setup(t){const e=t,n=pt(),s=qe(MD,void 0),i=He("breadcrumb"),o=n.appContext.config.globalProperties.$router,r=J(),a=()=>{!e.to||!o||(e.replace?o.replace(e.to):o.push(e.to))};return(l,c)=>{var u,d;return v(),$("span",{class:W(A(i).e("item"))},[g("span",{ref_key:"link",ref:r,class:W([A(i).e("inner"),A(i).is("link",!!l.to)]),role:"link",onClick:a},[ae(l.$slots,"default")],2),(u=A(s))!=null&&u.separatorIcon?(v(),R(A(ye),{key:0,class:W(A(i).e("separator"))},{default:w(()=>[(v(),R(Tt(A(s).separatorIcon)))]),_:1},8,["class"])):(v(),$("span",{key:1,class:W(A(i).e("separator")),role:"presentation"},M((d=A(s))==null?void 0:d.separator),3))],2)}}});var ED=Ye(Tue,[["__file","breadcrumb-item.vue"]]);const Pue=jt(Aue,{BreadcrumbItem:ED}),Iue=xs(ED),TD=Symbol("buttonGroupContextKey"),Lue=(t,e)=>{sc({from:"type.text",replacement:"link",version:"3.0.0",scope:"props",ref:"https://element-plus.org/en-US/component/button.html#button-attributes"},q(()=>t.type==="text"));const n=qe(TD,void 0),s=ib("button"),{form:i}=Br(),o=Mi(q(()=>n==null?void 0:n.size)),r=Co(),a=J(),l=Zi(),c=q(()=>t.type||(n==null?void 0:n.type)||""),u=q(()=>{var p,m,b;return(b=(m=t.autoInsertSpace)!=null?m:(p=s.value)==null?void 0:p.autoInsertSpace)!=null?b:!1}),d=q(()=>t.tag==="button"?{ariaDisabled:r.value||t.loading,disabled:r.value||t.loading,autofocus:t.autofocus,type:t.nativeType}:{}),h=q(()=>{var p;const m=(p=l.default)==null?void 0:p.call(l);if(u.value&&(m==null?void 0:m.length)===1){const b=m[0];if((b==null?void 0:b.type)===ra){const y=b.children;return/^\p{Unified_Ideograph}{2}$/u.test(y.trim())}}return!1});return{_disabled:r,_size:o,_type:c,_ref:a,_props:d,shouldAddSpace:h,handleClick:p=>{if(r.value||t.loading){p.stopPropagation();return}t.nativeType==="reset"&&(i==null||i.resetFields()),e("click",p)}}},Oue=["default","primary","success","warning","info","danger","text",""],Due=["button","submit","reset"],h6=Ze({size:Ji,disabled:Boolean,type:{type:String,values:Oue,default:""},icon:{type:ms},nativeType:{type:String,values:Due,default:"button"},loading:Boolean,loadingIcon:{type:ms,default:()=>rf},plain:Boolean,text:Boolean,link:Boolean,bg:Boolean,autofocus:Boolean,round:Boolean,circle:Boolean,color:String,dark:Boolean,autoInsertSpace:{type:Boolean,default:void 0},tag:{type:xe([String,Object]),default:"button"}}),Rue={click:t=>t instanceof MouseEvent};function Ys(t,e){Vue(t)&&(t="100%");var n=Fue(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 d0(t){return Math.min(1,Math.max(0,t))}function Vue(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function Fue(t){return typeof t=="string"&&t.indexOf("%")!==-1}function PD(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function h0(t){return t<=1?"".concat(Number(t)*100,"%"):t}function du(t){return t.length===1?"0"+t:String(t)}function Nue(t,e,n){return{r:Ys(t,255)*255,g:Ys(e,255)*255,b:Ys(n,255)*255}}function i$(t,e,n){t=Ys(t,255),e=Ys(e,255),n=Ys(n,255);var s=Math.max(t,e,n),i=Math.min(t,e,n),o=0,r=0,a=(s+i)/2;if(s===i)r=0,o=0;else{var l=s-i;switch(r=a>.5?l/(2-s-i):l/(s+i),s){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 F2(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 Bue(t,e,n){var s,i,o;if(t=Ys(t,360),e=Ys(e,100),n=Ys(n,100),e===0)i=n,o=n,s=n;else{var r=n<.5?n*(1+e):n+e-n*e,a=2*n-r;s=F2(a,r,t+1/3),i=F2(a,r,t),o=F2(a,r,t-1/3)}return{r:s*255,g:i*255,b:o*255}}function o$(t,e,n){t=Ys(t,255),e=Ys(e,255),n=Ys(n,255);var s=Math.max(t,e,n),i=Math.min(t,e,n),o=0,r=s,a=s-i,l=s===0?0:a/s;if(s===i)o=0;else{switch(s){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 zue(t,e,n){t=Ys(t,360)*6,e=Ys(e,100),n=Ys(n,100);var s=Math.floor(t),i=t-s,o=n*(1-e),r=n*(1-i*e),a=n*(1-(1-i)*e),l=s%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 r$(t,e,n,s){var i=[du(Math.round(t).toString(16)),du(Math.round(e).toString(16)),du(Math.round(n).toString(16))];return s&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function Hue(t,e,n,s,i){var o=[du(Math.round(t).toString(16)),du(Math.round(e).toString(16)),du(Math.round(n).toString(16)),du(Uue(s))];return i&&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 Uue(t){return Math.round(parseFloat(t)*255).toString(16)}function a$(t){return io(t)/255}function io(t){return parseInt(t,16)}function jue(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}var f6={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 Wue(t){var e={r:0,g:0,b:0},n=1,s=null,i=null,o=null,r=!1,a=!1;return typeof t=="string"&&(t=que(t)),typeof t=="object"&&(La(t.r)&&La(t.g)&&La(t.b)?(e=Nue(t.r,t.g,t.b),r=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):La(t.h)&&La(t.s)&&La(t.v)?(s=h0(t.s),i=h0(t.v),e=zue(t.h,s,i),r=!0,a="hsv"):La(t.h)&&La(t.s)&&La(t.l)&&(s=h0(t.s),o=h0(t.l),e=Bue(t.h,s,o),r=!0,a="hsl"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=PD(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}}var Yue="[-\\+]?\\d+%?",Gue="[-\\+]?\\d*\\.\\d+%?",Ql="(?:".concat(Gue,")|(?:").concat(Yue,")"),N2="[\\s|\\(]+(".concat(Ql,")[,|\\s]+(").concat(Ql,")[,|\\s]+(").concat(Ql,")\\s*\\)?"),B2="[\\s|\\(]+(".concat(Ql,")[,|\\s]+(").concat(Ql,")[,|\\s]+(").concat(Ql,")[,|\\s]+(").concat(Ql,")\\s*\\)?"),lr={CSS_UNIT:new RegExp(Ql),rgb:new RegExp("rgb"+N2),rgba:new RegExp("rgba"+B2),hsl:new RegExp("hsl"+N2),hsla:new RegExp("hsla"+B2),hsv:new RegExp("hsv"+N2),hsva:new RegExp("hsva"+B2),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 que(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;var e=!1;if(f6[t])t=f6[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=lr.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=lr.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=lr.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=lr.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=lr.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=lr.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=lr.hex8.exec(t),n?{r:io(n[1]),g:io(n[2]),b:io(n[3]),a:a$(n[4]),format:e?"name":"hex8"}:(n=lr.hex6.exec(t),n?{r:io(n[1]),g:io(n[2]),b:io(n[3]),format:e?"name":"hex"}:(n=lr.hex4.exec(t),n?{r:io(n[1]+n[1]),g:io(n[2]+n[2]),b:io(n[3]+n[3]),a:a$(n[4]+n[4]),format:e?"name":"hex8"}:(n=lr.hex3.exec(t),n?{r:io(n[1]+n[1]),g:io(n[2]+n[2]),b:io(n[3]+n[3]),format:e?"name":"hex"}:!1)))))))))}function La(t){return!!lr.CSS_UNIT.exec(String(t))}var Xue=function(){function t(e,n){e===void 0&&(e=""),n===void 0&&(n={});var s;if(e instanceof t)return e;typeof e=="number"&&(e=jue(e)),this.originalInput=e;var i=Wue(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=(s=n.format)!==null&&s!==void 0?s: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}return t.prototype.isDark=function(){return this.getBrightness()<128},t.prototype.isLight=function(){return!this.isDark()},t.prototype.getBrightness=function(){var e=this.toRgb();return(e.r*299+e.g*587+e.b*114)/1e3},t.prototype.getLuminance=function(){var e=this.toRgb(),n,s,i,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?s=r/12.92:s=Math.pow((r+.055)/1.055,2.4),a<=.03928?i=a/12.92:i=Math.pow((a+.055)/1.055,2.4),.2126*n+.7152*s+.0722*i},t.prototype.getAlpha=function(){return this.a},t.prototype.setAlpha=function(e){return this.a=PD(e),this.roundA=Math.round(100*this.a)/100,this},t.prototype.isMonochrome=function(){var e=this.toHsl().s;return e===0},t.prototype.toHsv=function(){var e=o$(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}},t.prototype.toHsvString=function(){var e=o$(this.r,this.g,this.b),n=Math.round(e.h*360),s=Math.round(e.s*100),i=Math.round(e.v*100);return this.a===1?"hsv(".concat(n,", ").concat(s,"%, ").concat(i,"%)"):"hsva(".concat(n,", ").concat(s,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHsl=function(){var e=i$(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}},t.prototype.toHslString=function(){var e=i$(this.r,this.g,this.b),n=Math.round(e.h*360),s=Math.round(e.s*100),i=Math.round(e.l*100);return this.a===1?"hsl(".concat(n,", ").concat(s,"%, ").concat(i,"%)"):"hsla(".concat(n,", ").concat(s,"%, ").concat(i,"%, ").concat(this.roundA,")")},t.prototype.toHex=function(e){return e===void 0&&(e=!1),r$(this.r,this.g,this.b,e)},t.prototype.toHexString=function(e){return e===void 0&&(e=!1),"#"+this.toHex(e)},t.prototype.toHex8=function(e){return e===void 0&&(e=!1),Hue(this.r,this.g,this.b,this.a,e)},t.prototype.toHex8String=function(e){return e===void 0&&(e=!1),"#"+this.toHex8(e)},t.prototype.toHexShortString=function(e){return e===void 0&&(e=!1),this.a===1?this.toHexString(e):this.toHex8String(e)},t.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},t.prototype.toRgbString=function(){var e=Math.round(this.r),n=Math.round(this.g),s=Math.round(this.b);return this.a===1?"rgb(".concat(e,", ").concat(n,", ").concat(s,")"):"rgba(".concat(e,", ").concat(n,", ").concat(s,", ").concat(this.roundA,")")},t.prototype.toPercentageRgb=function(){var e=function(n){return"".concat(Math.round(Ys(n,255)*100),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},t.prototype.toPercentageRgbString=function(){var e=function(n){return Math.round(Ys(n,255)*100)};return this.a===1?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},t.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var e="#"+r$(this.r,this.g,this.b,!1),n=0,s=Object.entries(f6);n<s.length;n++){var i=s[n],o=i[0],r=i[1];if(e===r)return o}return!1},t.prototype.toString=function(e){var n=!!e;e=e??this.format;var s=!1,i=this.a<1&&this.a>=0,o=!n&&i&&(e.startsWith("hex")||e==="name");return o?e==="name"&&this.a===0?this.toName():this.toRgbString():(e==="rgb"&&(s=this.toRgbString()),e==="prgb"&&(s=this.toPercentageRgbString()),(e==="hex"||e==="hex6")&&(s=this.toHexString()),e==="hex3"&&(s=this.toHexString(!0)),e==="hex4"&&(s=this.toHex8String(!0)),e==="hex8"&&(s=this.toHex8String()),e==="name"&&(s=this.toName()),e==="hsl"&&(s=this.toHslString()),e==="hsv"&&(s=this.toHsvString()),s||this.toHexString())},t.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},t.prototype.clone=function(){return new t(this.toString())},t.prototype.lighten=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l+=e/100,n.l=d0(n.l),new t(n)},t.prototype.brighten=function(e){e===void 0&&(e=10);var 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 t(n)},t.prototype.darken=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.l-=e/100,n.l=d0(n.l),new t(n)},t.prototype.tint=function(e){return e===void 0&&(e=10),this.mix("white",e)},t.prototype.shade=function(e){return e===void 0&&(e=10),this.mix("black",e)},t.prototype.desaturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s-=e/100,n.s=d0(n.s),new t(n)},t.prototype.saturate=function(e){e===void 0&&(e=10);var n=this.toHsl();return n.s+=e/100,n.s=d0(n.s),new t(n)},t.prototype.greyscale=function(){return this.desaturate(100)},t.prototype.spin=function(e){var n=this.toHsl(),s=(n.h+e)%360;return n.h=s<0?360+s:s,new t(n)},t.prototype.mix=function(e,n){n===void 0&&(n=50);var s=this.toRgb(),i=new t(e).toRgb(),o=n/100,r={r:(i.r-s.r)*o+s.r,g:(i.g-s.g)*o+s.g,b:(i.b-s.b)*o+s.b,a:(i.a-s.a)*o+s.a};return new t(r)},t.prototype.analogous=function(e,n){e===void 0&&(e=6),n===void 0&&(n=30);var s=this.toHsl(),i=360/n,o=[this];for(s.h=(s.h-(i*e>>1)+720)%360;--e;)s.h=(s.h+i)%360,o.push(new t(s));return o},t.prototype.complement=function(){var e=this.toHsl();return e.h=(e.h+180)%360,new t(e)},t.prototype.monochromatic=function(e){e===void 0&&(e=6);for(var n=this.toHsv(),s=n.h,i=n.s,o=n.v,r=[],a=1/e;e--;)r.push(new t({h:s,s:i,v:o})),o=(o+a)%1;return r},t.prototype.splitcomplement=function(){var e=this.toHsl(),n=e.h;return[this,new t({h:(n+72)%360,s:e.s,l:e.l}),new t({h:(n+216)%360,s:e.s,l:e.l})]},t.prototype.onBackground=function(e){var n=this.toRgb(),s=new t(e).toRgb(),i=n.a+s.a*(1-n.a);return new t({r:(n.r*n.a+s.r*s.a*(1-n.a))/i,g:(n.g*n.a+s.g*s.a*(1-n.a))/i,b:(n.b*n.a+s.b*s.a*(1-n.a))/i,a:i})},t.prototype.triad=function(){return this.polyad(3)},t.prototype.tetrad=function(){return this.polyad(4)},t.prototype.polyad=function(e){for(var n=this.toHsl(),s=n.h,i=[this],o=360/e,r=1;r<e;r++)i.push(new t({h:(s+r*o)%360,s:n.s,l:n.l}));return i},t.prototype.equals=function(e){return this.toRgbString()===new t(e).toRgbString()},t}();function _l(t,e=20){return t.mix("#141414",e).toString()}function Kue(t){const e=Co(),n=He("button");return q(()=>{let s={},i=t.color;if(i){const o=i.match(/var\((.*?)\)/);o&&(i=window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1]));const r=new Xue(i),a=t.dark?r.tint(20).toString():_l(r,20);if(t.plain)s=n.cssVarBlock({"bg-color":t.dark?_l(r,90):r.tint(90).toString(),"text-color":i,"border-color":t.dark?_l(r,50):r.tint(50).toString(),"hover-text-color":`var(${n.cssVarName("color-white")})`,"hover-bg-color":i,"hover-border-color":i,"active-bg-color":a,"active-text-color":`var(${n.cssVarName("color-white")})`,"active-border-color":a}),e.value&&(s[n.cssVarBlockName("disabled-bg-color")]=t.dark?_l(r,90):r.tint(90).toString(),s[n.cssVarBlockName("disabled-text-color")]=t.dark?_l(r,50):r.tint(50).toString(),s[n.cssVarBlockName("disabled-border-color")]=t.dark?_l(r,80):r.tint(80).toString());else{const l=t.dark?_l(r,30):r.tint(30).toString(),c=r.isDark()?`var(${n.cssVarName("color-white")})`:`var(${n.cssVarName("color-black")})`;if(s=n.cssVarBlock({"bg-color":i,"text-color":c,"border-color":i,"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?_l(r,50):r.tint(50).toString();s[n.cssVarBlockName("disabled-bg-color")]=u,s[n.cssVarBlockName("disabled-text-color")]=t.dark?"rgba(255, 255, 255, 0.5)":`var(${n.cssVarName("color-white")})`,s[n.cssVarBlockName("disabled-border-color")]=u}}}return s})}const Zue=se({name:"ElButton"}),Jue=se({...Zue,props:h6,emits:Rue,setup(t,{expose:e,emit:n}){const s=t,i=Kue(s),o=He("button"),{_ref:r,_size:a,_type:l,_disabled:c,_props:u,shouldAddSpace:d,handleClick:h}=Lue(s,n),f=q(()=>[o.b(),o.m(l.value),o.m(a.value),o.is("disabled",c.value),o.is("loading",s.loading),o.is("plain",s.plain),o.is("round",s.round),o.is("circle",s.circle),o.is("text",s.text),o.is("link",s.link),o.is("has-bg",s.bg)]);return e({ref:r,size:a,type:l,disabled:c,shouldAddSpace:d}),(p,m)=>(v(),R(Tt(p.tag),Mn({ref_key:"_ref",ref:r},A(u),{class:A(f),style:A(i),onClick:A(h)}),{default:w(()=>[p.loading?(v(),$(te,{key:0},[p.$slots.loading?ae(p.$slots,"loading",{key:0}):(v(),R(A(ye),{key:1,class:W(A(o).is("loading"))},{default:w(()=>[(v(),R(Tt(p.loadingIcon)))]),_:1},8,["class"]))],64)):p.icon||p.$slots.icon?(v(),R(A(ye),{key:1},{default:w(()=>[p.icon?(v(),R(Tt(p.icon),{key:0})):ae(p.$slots,"icon",{key:1})]),_:3})):O("v-if",!0),p.$slots.default?(v(),$("span",{key:2,class:W({[A(o).em("text","expand")]:A(d)})},[ae(p.$slots,"default")],2)):O("v-if",!0)]),_:3},16,["class","style","onClick"]))}});var Que=Ye(Jue,[["__file","button.vue"]]);const ede={size:h6.size,type:h6.type},tde=se({name:"ElButtonGroup"}),nde=se({...tde,props:ede,setup(t){const e=t;It(TD,as({size:kn(e,"size"),type:kn(e,"type")}));const n=He("button");return(s,i)=>(v(),$("div",{class:W(A(n).b("group"))},[ae(s.$slots,"default")],2))}});var ID=Ye(nde,[["__file","button-group.vue"]]);const Ge=jt(Que,{ButtonGroup:ID});xs(ID);var us=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ts(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var LD={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(us,function(){var n=1e3,s=6e4,i=36e5,o="millisecond",r="second",a="minute",l="hour",c="day",u="week",d="month",h="quarter",f="year",p="date",m="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,C={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(Y){var B=["th","st","nd","rd"],U=Y%100;return"["+Y+(B[(U-20)%10]||B[U]||B[0])+"]"}},k=function(Y,B,U){var X=String(Y);return!X||X.length>=B?Y:""+Array(B+1-X.length).join(U)+Y},x={s:k,z:function(Y){var B=-Y.utcOffset(),U=Math.abs(B),X=Math.floor(U/60),K=U%60;return(B<=0?"+":"-")+k(X,2,"0")+":"+k(K,2,"0")},m:function Y(B,U){if(B.date()<U.date())return-Y(U,B);var X=12*(U.year()-B.year())+(U.month()-B.month()),K=B.clone().add(X,d),N=U-K<0,F=B.clone().add(X+(N?-1:1),d);return+(-(X+(U-K)/(N?K-F:F-K))||0)},a:function(Y){return Y<0?Math.ceil(Y)||0:Math.floor(Y)},p:function(Y){return{M:d,y:f,w:u,d:c,D:p,h:l,m:a,s:r,ms:o,Q:h}[Y]||String(Y||"").toLowerCase().replace(/s$/,"")},u:function(Y){return Y===void 0}},S="en",E={};E[S]=C;var T="$isDayjsObject",P=function(Y){return Y instanceof D||!(!Y||!Y[T])},I=function Y(B,U,X){var K;if(!B)return S;if(typeof B=="string"){var N=B.toLowerCase();E[N]&&(K=N),U&&(E[N]=U,K=N);var F=B.split("-");if(!K&&F.length>1)return Y(F[0])}else{var Q=B.name;E[Q]=B,K=Q}return!X&&K&&(S=K),K||!X&&S},L=function(Y,B){if(P(Y))return Y.clone();var U=typeof B=="object"?B:{};return U.date=Y,U.args=arguments,new D(U)},V=x;V.l=I,V.i=P,V.w=function(Y,B){return L(Y,{locale:B.$L,utc:B.$u,x:B.$x,$offset:B.$offset})};var D=function(){function Y(U){this.$L=I(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[T]=!0}var B=Y.prototype;return B.parse=function(U){this.$d=function(X){var K=X.date,N=X.utc;if(K===null)return new Date(NaN);if(V.u(K))return new Date;if(K instanceof Date)return new Date(K);if(typeof K=="string"&&!/Z$/i.test(K)){var F=K.match(b);if(F){var Q=F[2]-1||0,ie=(F[7]||"0").substring(0,3);return N?new Date(Date.UTC(F[1],Q,F[3]||1,F[4]||0,F[5]||0,F[6]||0,ie)):new Date(F[1],Q,F[3]||1,F[4]||0,F[5]||0,F[6]||0,ie)}}return new Date(K)}(U),this.init()},B.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},B.$utils=function(){return V},B.isValid=function(){return this.$d.toString()!==m},B.isSame=function(U,X){var K=L(U);return this.startOf(X)<=K&&K<=this.endOf(X)},B.isAfter=function(U,X){return L(U)<this.startOf(X)},B.isBefore=function(U,X){return this.endOf(X)<L(U)},B.$g=function(U,X,K){return V.u(U)?this[X]:this.set(K,U)},B.unix=function(){return Math.floor(this.valueOf()/1e3)},B.valueOf=function(){return this.$d.getTime()},B.startOf=function(U,X){var K=this,N=!!V.u(X)||X,F=V.p(U),Q=function(re,ge){var ze=V.w(K.$u?Date.UTC(K.$y,ge,re):new Date(K.$y,ge,re),K);return N?ze:ze.endOf(c)},ie=function(re,ge){return V.w(K.toDate()[re].apply(K.toDate("s"),(N?[0,0,0,0]:[23,59,59,999]).slice(ge)),K)},Z=this.$W,me=this.$M,Se=this.$D,we="set"+(this.$u?"UTC":"");switch(F){case f:return N?Q(1,0):Q(31,11);case d:return N?Q(1,me):Q(0,me+1);case u:var oe=this.$locale().weekStart||0,ce=(Z<oe?Z+7:Z)-oe;return Q(N?Se-ce:Se+(6-ce),me);case c:case p:return ie(we+"Hours",0);case l:return ie(we+"Minutes",1);case a:return ie(we+"Seconds",2);case r:return ie(we+"Milliseconds",3);default:return this.clone()}},B.endOf=function(U){return this.startOf(U,!1)},B.$set=function(U,X){var K,N=V.p(U),F="set"+(this.$u?"UTC":""),Q=(K={},K[c]=F+"Date",K[p]=F+"Date",K[d]=F+"Month",K[f]=F+"FullYear",K[l]=F+"Hours",K[a]=F+"Minutes",K[r]=F+"Seconds",K[o]=F+"Milliseconds",K)[N],ie=N===c?this.$D+(X-this.$W):X;if(N===d||N===f){var Z=this.clone().set(p,1);Z.$d[Q](ie),Z.init(),this.$d=Z.set(p,Math.min(this.$D,Z.daysInMonth())).$d}else Q&&this.$d[Q](ie);return this.init(),this},B.set=function(U,X){return this.clone().$set(U,X)},B.get=function(U){return this[V.p(U)]()},B.add=function(U,X){var K,N=this;U=Number(U);var F=V.p(X),Q=function(me){var Se=L(N);return V.w(Se.date(Se.date()+Math.round(me*U)),N)};if(F===d)return this.set(d,this.$M+U);if(F===f)return this.set(f,this.$y+U);if(F===c)return Q(1);if(F===u)return Q(7);var ie=(K={},K[a]=s,K[l]=i,K[r]=n,K)[F]||1,Z=this.$d.getTime()+U*ie;return V.w(Z,this)},B.subtract=function(U,X){return this.add(-1*U,X)},B.format=function(U){var X=this,K=this.$locale();if(!this.isValid())return K.invalidDate||m;var N=U||"YYYY-MM-DDTHH:mm:ssZ",F=V.z(this),Q=this.$H,ie=this.$m,Z=this.$M,me=K.weekdays,Se=K.months,we=K.meridiem,oe=function(ge,ze,st,ee){return ge&&(ge[ze]||ge(X,N))||st[ze].slice(0,ee)},ce=function(ge){return V.s(Q%12||12,ge,"0")},re=we||function(ge,ze,st){var ee=ge<12?"AM":"PM";return st?ee.toLowerCase():ee};return N.replace(y,function(ge,ze){return ze||function(st){switch(st){case"YY":return String(X.$y).slice(-2);case"YYYY":return V.s(X.$y,4,"0");case"M":return Z+1;case"MM":return V.s(Z+1,2,"0");case"MMM":return oe(K.monthsShort,Z,Se,3);case"MMMM":return oe(Se,Z);case"D":return X.$D;case"DD":return V.s(X.$D,2,"0");case"d":return String(X.$W);case"dd":return oe(K.weekdaysMin,X.$W,me,2);case"ddd":return oe(K.weekdaysShort,X.$W,me,3);case"dddd":return me[X.$W];case"H":return String(Q);case"HH":return V.s(Q,2,"0");case"h":return ce(1);case"hh":return ce(2);case"a":return re(Q,ie,!0);case"A":return re(Q,ie,!1);case"m":return String(ie);case"mm":return V.s(ie,2,"0");case"s":return String(X.$s);case"ss":return V.s(X.$s,2,"0");case"SSS":return V.s(X.$ms,3,"0");case"Z":return F}return null}(ge)||F.replace(":","")})},B.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},B.diff=function(U,X,K){var N,F=this,Q=V.p(X),ie=L(U),Z=(ie.utcOffset()-this.utcOffset())*s,me=this-ie,Se=function(){return V.m(F,ie)};switch(Q){case f:N=Se()/12;break;case d:N=Se();break;case h:N=Se()/3;break;case u:N=(me-Z)/6048e5;break;case c:N=(me-Z)/864e5;break;case l:N=me/i;break;case a:N=me/s;break;case r:N=me/n;break;default:N=me}return K?N:V.a(N)},B.daysInMonth=function(){return this.endOf(d).$D},B.$locale=function(){return E[this.$L]},B.locale=function(U,X){if(!U)return this.$L;var K=this.clone(),N=I(U,X,!0);return N&&(K.$L=N),K},B.clone=function(){return V.w(this.$d,this)},B.toDate=function(){return new Date(this.valueOf())},B.toJSON=function(){return this.isValid()?this.toISOString():null},B.toISOString=function(){return this.$d.toISOString()},B.toString=function(){return this.$d.toUTCString()},Y}(),z=D.prototype;return L.prototype=z,[["$ms",o],["$s",r],["$m",a],["$H",l],["$W",c],["$M",d],["$y",f],["$D",p]].forEach(function(Y){z[Y[1]]=function(B){return this.$g(B,Y[0],Y[1])}}),L.extend=function(Y,B){return Y.$i||(Y(B,D,L),Y.$i=!0),L},L.locale=I,L.isDayjs=P,L.unix=function(Y){return L(1e3*Y)},L.en=E[S],L.Ls=E,L.p={},L})})(LD);var sde=LD.exports;const ut=Ts(sde);var OD={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(us,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"},s=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,o=/\d\d/,r=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,l={},c=function(b){return(b=+b)+(b>68?1900:2e3)},u=function(b){return function(y){this[b]=+y}},d=[/[+-]\d\d:?(\d\d)?|Z/,function(b){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var C=y.match(/([+-]|\d\d)/g),k=60*C[1]+(+C[2]||0);return k===0?0:C[0]==="+"?-k:k}(b)}],h=function(b){var y=l[b];return y&&(y.indexOf?y:y.s.concat(y.f))},f=function(b,y){var C,k=l.meridiem;if(k){for(var x=1;x<=24;x+=1)if(b.indexOf(k(x,0,y))>-1){C=x>12;break}}else C=b===(y?"pm":"PM");return C},p={A:[a,function(b){this.afternoon=f(b,!1)}],a:[a,function(b){this.afternoon=f(b,!0)}],Q:[i,function(b){this.month=3*(b-1)+1}],S:[i,function(b){this.milliseconds=100*+b}],SS:[o,function(b){this.milliseconds=10*+b}],SSS:[/\d{3}/,function(b){this.milliseconds=+b}],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(b){var y=l.ordinal,C=b.match(/\d+/);if(this.day=C[0],y)for(var k=1;k<=31;k+=1)y(k).replace(/\[|\]/g,"")===b&&(this.day=k)}],w:[r,u("week")],ww:[o,u("week")],M:[r,u("month")],MM:[o,u("month")],MMM:[a,function(b){var y=h("months"),C=(h("monthsShort")||y.map(function(k){return k.slice(0,3)})).indexOf(b)+1;if(C<1)throw new Error;this.month=C%12||C}],MMMM:[a,function(b){var y=h("months").indexOf(b)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(b){this.year=c(b)}],YYYY:[/\d{4}/,u("year")],Z:d,ZZ:d};function m(b){var y,C;y=b,C=l&&l.formats;for(var k=(b=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(L,V,D){var z=D&&D.toUpperCase();return V||C[D]||n[D]||C[z].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Y,B,U){return B||U.slice(1)})})).match(s),x=k.length,S=0;S<x;S+=1){var E=k[S],T=p[E],P=T&&T[0],I=T&&T[1];k[S]=I?{regex:P,parser:I}:E.replace(/^\[|\]$/g,"")}return function(L){for(var V={},D=0,z=0;D<x;D+=1){var Y=k[D];if(typeof Y=="string")z+=Y.length;else{var B=Y.regex,U=Y.parser,X=L.slice(z),K=B.exec(X)[0];U.call(V,K),L=L.replace(K,"")}}return function(N){var F=N.afternoon;if(F!==void 0){var Q=N.hours;F?Q<12&&(N.hours+=12):Q===12&&(N.hours=0),delete N.afternoon}}(V),V}}return function(b,y,C){C.p.customParseFormat=!0,b&&b.parseTwoDigitYear&&(c=b.parseTwoDigitYear);var k=y.prototype,x=k.parse;k.parse=function(S){var E=S.date,T=S.utc,P=S.args;this.$u=T;var I=P[1];if(typeof I=="string"){var L=P[2]===!0,V=P[3]===!0,D=L||V,z=P[2];V&&(z=P[2]),l=this.$locale(),!L&&z&&(l=C.Ls[z]),this.$d=function(X,K,N,F){try{if(["x","X"].indexOf(K)>-1)return new Date((K==="X"?1e3:1)*X);var Q=m(K)(X),ie=Q.year,Z=Q.month,me=Q.day,Se=Q.hours,we=Q.minutes,oe=Q.seconds,ce=Q.milliseconds,re=Q.zone,ge=Q.week,ze=new Date,st=me||(ie||Z?1:ze.getDate()),ee=ie||ze.getFullYear(),ne=0;ie&&!Z||(ne=Z>0?Z-1:ze.getMonth());var pe,Ae=Se||0,Ce=we||0,Me=oe||0,je=ce||0;return re?new Date(Date.UTC(ee,ne,st,Ae,Ce,Me,je+60*re.offset*1e3)):N?new Date(Date.UTC(ee,ne,st,Ae,Ce,Me,je)):(pe=new Date(ee,ne,st,Ae,Ce,Me,je),ge&&(pe=F(pe).week(ge).toDate()),pe)}catch{return new Date("")}}(E,I,T,C),this.init(),z&&z!==!0&&(this.$L=this.locale(z).$L),D&&E!=this.format(I)&&(this.$d=new Date("")),l={}}else if(I instanceof Array)for(var Y=I.length,B=1;B<=Y;B+=1){P[1]=I[B-1];var U=C.apply(this,P);if(U.isValid()){this.$d=U.$d,this.$L=U.$L,this.init();break}B===Y&&(this.$d=new Date(""))}else x.call(this,S)}}})})(OD);var ide=OD.exports;const DD=Ts(ide),l$=["hours","minutes","seconds"],c$="HH:mm:ss",eh="YYYY-MM-DD",ode={date:eh,dates:eh,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${eh} ${c$}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:eh,datetimerange:`${eh} ${c$}`},z2=(t,e)=>[t>0?t-1:void 0,t,t<e?t+1:void 0],RD=t=>Array.from(Array.from({length:t}).keys()),VD=t=>t.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),FD=t=>t.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),u$=function(t,e){const n=s_(t),s=s_(e);return n&&s?t.getTime()===e.getTime():!n&&!s?t===e:!1},d$=function(t,e){const n=Le(t),s=Le(e);return n&&s?t.length!==e.length?!1:t.every((i,o)=>u$(i,e[o])):!n&&!s?u$(t,e):!1},h$=function(t,e,n){const s=pO(e)||e==="x"?ut(t).locale(n):ut(t,e).locale(n);return s.isValid()?s:void 0},f$=function(t,e,n){return pO(e)?t:e==="x"?+t:ut(t).locale(n).format(e)},H2=(t,e)=>{var n;const s=[],i=e==null?void 0:e();for(let o=0;o<t;o++)s.push((n=i==null?void 0:i.includes(o))!=null?n:!1);return s},ND=Ze({disabledHours:{type:xe(Function)},disabledMinutes:{type:xe(Function)},disabledSeconds:{type:xe(Function)}}),rde=Ze({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),BD=Ze({id:{type:xe([Array,String])},name:{type:xe([Array,String]),default:""},popperClass:{type:String,default:""},format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:xe([String,Object]),default:Of},editable:{type:Boolean,default:!0},prefixIcon:{type:xe([String,Object]),default:""},size:Ji,readonly:Boolean,disabled:Boolean,placeholder:{type:String,default:""},popperOptions:{type:xe(Object),default:()=>({})},modelValue:{type:xe([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:xe([Date,Array])},defaultTime:{type:xe([Date,Array])},isRange:Boolean,...ND,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:xe([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,...sb,...ir(["ariaLabel"])}),ade=se({name:"Picker"}),lde=se({...ade,props:BD,emits:["update:modelValue","change","focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(t,{expose:e,emit:n}){const s=t,i=If(),{lang:o}=fn(),r=He("date"),a=He("input"),l=He("range"),{form:c,formItem:u}=Br(),d=qe("ElPopperOptions",{}),{valueOnClear:h}=mD(s,null),f=J(),p=J(),m=J(!1),b=J(!1),y=J(null);let C=!1,k=!1;const x=q(()=>[r.b("editor"),r.bm("editor",s.type),a.e("wrapper"),r.is("disabled",Z.value),r.is("active",m.value),l.b("editor"),Fe?l.bm("editor",Fe.value):"",i.class]),S=q(()=>[a.e("icon"),l.e("close-icon"),st.value?"":l.e("close-icon--hidden")]);Te(m,fe=>{fe?dt(()=>{fe&&(y.value=s.modelValue)}):(Ie.value=null,dt(()=>{E(s.modelValue)}))});const E=(fe,ct)=>{(ct||!d$(fe,y.value))&&(n("change",fe),s.validateEvent&&(u==null||u.validate("change").catch(Nt=>void 0)))},T=fe=>{if(!d$(s.modelValue,fe)){let ct;Le(fe)?ct=fe.map(Nt=>f$(Nt,s.valueFormat,o.value)):fe&&(ct=f$(fe,s.valueFormat,o.value)),n("update:modelValue",fe&&ct,o.value)}},P=fe=>{n("keydown",fe)},I=q(()=>{if(p.value){const fe=je.value?p.value:p.value.$el;return Array.from(fe.querySelectorAll("input"))}return[]}),L=(fe,ct,Nt)=>{const Zn=I.value;Zn.length&&(!Nt||Nt==="min"?(Zn[0].setSelectionRange(fe,ct),Zn[0].focus()):Nt==="max"&&(Zn[1].setSelectionRange(fe,ct),Zn[1].focus()))},V=()=>{N(!0,!0),dt(()=>{k=!1})},D=(fe="",ct=!1)=>{ct||(k=!0),m.value=ct;let Nt;Le(fe)?Nt=fe.map(Zn=>Zn.toDate()):Nt=fe&&fe.toDate(),Ie.value=null,T(Nt)},z=()=>{b.value=!0},Y=()=>{n("visible-change",!0)},B=fe=>{(fe==null?void 0:fe.key)===ft.esc&&N(!0,!0)},U=()=>{b.value=!1,m.value=!1,k=!1,n("visible-change",!1)},X=()=>{m.value=!0},K=()=>{m.value=!1},N=(fe=!0,ct=!1)=>{k=ct;const[Nt,Zn]=A(I);let Is=Nt;!fe&&je.value&&(Is=Zn),Is&&Is.focus()},F=fe=>{s.readonly||Z.value||m.value||k||(m.value=!0,n("focus",fe))};let Q;const ie=fe=>{const ct=async()=>{setTimeout(()=>{var Nt;Q===ct&&(!((Nt=f.value)!=null&&Nt.isFocusInsideContent()&&!C)&&I.value.filter(Zn=>Zn.contains(document.activeElement)).length===0&&(_e(),m.value=!1,n("blur",fe),s.validateEvent&&(u==null||u.validate("blur").catch(Zn=>void 0))),C=!1)},0)};Q=ct,ct()},Z=q(()=>s.disabled||(c==null?void 0:c.disabled)),me=q(()=>{let fe;if(ne.value?We.value.getDefaultValue&&(fe=We.value.getDefaultValue()):Le(s.modelValue)?fe=s.modelValue.map(ct=>h$(ct,s.valueFormat,o.value)):fe=h$(s.modelValue,s.valueFormat,o.value),We.value.getRangeAvailableTime){const ct=We.value.getRangeAvailableTime(fe);mc(ct,fe)||(fe=ct,ne.value||T(Le(fe)?fe.map(Nt=>Nt.toDate()):fe.toDate()))}return Le(fe)&&fe.some(ct=>!ct)&&(fe=[]),fe}),Se=q(()=>{if(!We.value.panelReady)return"";const fe=ke(me.value);return Le(Ie.value)?[Ie.value[0]||fe&&fe[0]||"",Ie.value[1]||fe&&fe[1]||""]:Ie.value!==null?Ie.value:!oe.value&&ne.value||!m.value&&ne.value?"":fe?ce.value||re.value||ge.value?fe.join(", "):fe:""}),we=q(()=>s.type.includes("time")),oe=q(()=>s.type.startsWith("time")),ce=q(()=>s.type==="dates"),re=q(()=>s.type==="months"),ge=q(()=>s.type==="years"),ze=q(()=>s.prefixIcon||(we.value?_O:Zse)),st=J(!1),ee=fe=>{s.readonly||Z.value||(st.value&&(fe.stopPropagation(),V(),We.value.handleClear?We.value.handleClear():T(h.value),E(h.value,!0),st.value=!1,m.value=!1),n("clear"))},ne=q(()=>{const{modelValue:fe}=s;return!fe||Le(fe)&&!fe.filter(Boolean).length}),pe=async fe=>{var ct;s.readonly||Z.value||(((ct=fe.target)==null?void 0:ct.tagName)!=="INPUT"||I.value.includes(document.activeElement))&&(m.value=!0)},Ae=()=>{s.readonly||Z.value||!ne.value&&s.clearable&&(st.value=!0)},Ce=()=>{st.value=!1},Me=fe=>{var ct;s.readonly||Z.value||(((ct=fe.touches[0].target)==null?void 0:ct.tagName)!=="INPUT"||I.value.includes(document.activeElement))&&(m.value=!0)},je=q(()=>s.type.includes("range")),Fe=Mi(),Ue=q(()=>{var fe,ct;return(ct=(fe=A(f))==null?void 0:fe.popperRef)==null?void 0:ct.contentRef}),Oe=q(()=>{var fe;return A(je)?A(p):(fe=A(p))==null?void 0:fe.$el}),ht=IL(Oe,fe=>{const ct=A(Ue),Nt=A(Oe);ct&&(fe.target===ct||fe.composedPath().includes(ct))||fe.target===Nt||fe.composedPath().includes(Nt)||(m.value=!1)});Gn(()=>{ht==null||ht()});const Ie=J(null),_e=()=>{if(Ie.value){const fe=le(Se.value);fe&&Xe(fe)&&(T(Le(fe)?fe.map(ct=>ct.toDate()):fe.toDate()),Ie.value=null)}Ie.value===""&&(T(h.value),E(h.value),Ie.value=null)},le=fe=>fe?We.value.parseUserInput(fe):null,ke=fe=>fe?We.value.formatToString(fe):null,Xe=fe=>We.value.isValidValue(fe),tt=async fe=>{if(s.readonly||Z.value)return;const{code:ct}=fe;if(P(fe),ct===ft.esc){m.value===!0&&(m.value=!1,fe.preventDefault(),fe.stopPropagation());return}if(ct===ft.down&&(We.value.handleFocusPicker&&(fe.preventDefault(),fe.stopPropagation()),m.value===!1&&(m.value=!0,await dt()),We.value.handleFocusPicker)){We.value.handleFocusPicker();return}if(ct===ft.tab){C=!0;return}if(ct===ft.enter||ct===ft.numpadEnter){(Ie.value===null||Ie.value===""||Xe(le(Se.value)))&&(_e(),m.value=!1),fe.stopPropagation();return}if(Ie.value){fe.stopPropagation();return}We.value.handleKeydownInput&&We.value.handleKeydownInput(fe)},Ne=fe=>{Ie.value=fe,m.value||(m.value=!0)},Qe=fe=>{const ct=fe.target;Ie.value?Ie.value=[ct.value,Ie.value[1]]:Ie.value=[ct.value,null]},he=fe=>{const ct=fe.target;Ie.value?Ie.value=[Ie.value[0],ct.value]:Ie.value=[null,ct.value]},Ee=()=>{var fe;const ct=Ie.value,Nt=le(ct&&ct[0]),Zn=A(me);if(Nt&&Nt.isValid()){Ie.value=[ke(Nt),((fe=Se.value)==null?void 0:fe[1])||null];const Is=[Nt,Zn&&(Zn[1]||null)];Xe(Is)&&(T(Is),Ie.value=null)}},ve=()=>{var fe;const ct=A(Ie),Nt=le(ct&&ct[1]),Zn=A(me);if(Nt&&Nt.isValid()){Ie.value=[((fe=A(Se))==null?void 0:fe[0])||null,ke(Nt)];const Is=[Zn&&Zn[0],Nt];Xe(Is)&&(T(Is),Ie.value=null)}},We=J({}),Re=fe=>{We.value[fe[0]]=fe[1],We.value.panelReady=!0},Et=fe=>{n("calendar-change",fe)},ln=(fe,ct,Nt)=>{n("panel-change",fe,ct,Nt)};return It("EP_PICKER_BASE",{props:s}),e({focus:N,handleFocusInput:F,handleBlurInput:ie,handleOpen:X,handleClose:K,onPick:D}),(fe,ct)=>(v(),R(A(di),Mn({ref_key:"refPopper",ref:f,visible:m.value,effect:"light",pure:"",trigger:"click"},fe.$attrs,{role:"dialog",teleported:"",transition:`${A(r).namespace.value}-zoom-in-top`,"popper-class":[`${A(r).namespace.value}-picker__popper`,fe.popperClass],"popper-options":A(d),"fallback-placements":["bottom","top","right","left"],"gpu-acceleration":!1,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:z,onShow:Y,onHide:U}),{default:w(()=>[A(je)?(v(),$("div",{key:1,ref_key:"inputRef",ref:p,class:W(A(x)),style:Ke(fe.$attrs.style),onClick:F,onMouseenter:Ae,onMouseleave:Ce,onTouchstartPassive:Me,onKeydown:tt},[A(ze)?(v(),R(A(ye),{key:0,class:W([A(a).e("icon"),A(l).e("icon")]),onMousedown:Be(pe,["prevent"]),onTouchstartPassive:Me},{default:w(()=>[(v(),R(Tt(A(ze))))]),_:1},8,["class","onMousedown"])):O("v-if",!0),g("input",{id:fe.id&&fe.id[0],autocomplete:"off",name:fe.name&&fe.name[0],placeholder:fe.startPlaceholder,value:A(Se)&&A(Se)[0],disabled:A(Z),readonly:!fe.editable||fe.readonly,class:W(A(l).b("input")),onMousedown:pe,onInput:Qe,onChange:Ee,onFocus:F,onBlur:ie},null,42,["id","name","placeholder","value","disabled","readonly"]),ae(fe.$slots,"range-separator",{},()=>[g("span",{class:W(A(l).b("separator"))},M(fe.rangeSeparator),3)]),g("input",{id:fe.id&&fe.id[1],autocomplete:"off",name:fe.name&&fe.name[1],placeholder:fe.endPlaceholder,value:A(Se)&&A(Se)[1],disabled:A(Z),readonly:!fe.editable||fe.readonly,class:W(A(l).b("input")),onMousedown:pe,onFocus:F,onBlur:ie,onInput:he,onChange:ve},null,42,["id","name","placeholder","value","disabled","readonly"]),fe.clearIcon?(v(),R(A(ye),{key:1,class:W(A(S)),onClick:ee},{default:w(()=>[(v(),R(Tt(fe.clearIcon)))]),_:1},8,["class"])):O("v-if",!0)],38)):(v(),R(A(vt),{key:0,id:fe.id,ref_key:"inputRef",ref:p,"container-role":"combobox","model-value":A(Se),name:fe.name,size:A(Fe),disabled:A(Z),placeholder:fe.placeholder,class:W([A(r).b("editor"),A(r).bm("editor",fe.type),fe.$attrs.class]),style:Ke(fe.$attrs.style),readonly:!fe.editable||fe.readonly||A(ce)||A(re)||A(ge)||fe.type==="week","aria-label":fe.ariaLabel,tabindex:fe.tabindex,"validate-event":!1,onInput:Ne,onFocus:F,onBlur:ie,onKeydown:tt,onChange:_e,onMousedown:pe,onMouseenter:Ae,onMouseleave:Ce,onTouchstartPassive:Me,onClick:Be(()=>{},["stop"])},{prefix:w(()=>[A(ze)?(v(),R(A(ye),{key:0,class:W(A(a).e("icon")),onMousedown:Be(pe,["prevent"]),onTouchstartPassive:Me},{default:w(()=>[(v(),R(Tt(A(ze))))]),_:1},8,["class","onMousedown"])):O("v-if",!0)]),suffix:w(()=>[st.value&&fe.clearIcon?(v(),R(A(ye),{key:0,class:W(`${A(a).e("icon")} clear-icon`),onClick:Be(ee,["stop"])},{default:w(()=>[(v(),R(Tt(fe.clearIcon)))]),_:1},8,["class","onClick"])):O("v-if",!0)]),_:1},8,["id","model-value","name","size","disabled","placeholder","class","style","readonly","aria-label","tabindex","onKeydown","onClick"]))]),content:w(()=>[ae(fe.$slots,"default",{visible:m.value,actualVisible:b.value,parsedValue:A(me),format:fe.format,dateFormat:fe.dateFormat,timeFormat:fe.timeFormat,unlinkPanels:fe.unlinkPanels,type:fe.type,defaultValue:fe.defaultValue,onPick:D,onSelectRange:L,onSetPickerOption:Re,onCalendarChange:Et,onPanelChange:ln,onKeydown:B,onMousedown:Be(()=>{},["stop"])})]),_:3},16,["visible","transition","popper-class","popper-options"]))}});var cde=Ye(lde,[["__file","picker.vue"]]);const ude=Ze({...rde,datetimeRole:String,parsedValue:{type:xe(Object)}}),dde=({getAvailableHours:t,getAvailableMinutes:e,getAvailableSeconds:n})=>{const s=(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},i={};return{timePickerOptions:i,getAvailableTime:s,onSetOption:([r,a])=>{i[r]=a}}},U2=t=>{const e=(s,i)=>s||i,n=s=>s!==!0;return t.map(e).filter(n)},zD=(t,e,n)=>({getHoursList:(r,a)=>H2(24,t&&(()=>t==null?void 0:t(r,a))),getMinutesList:(r,a,l)=>H2(60,e&&(()=>e==null?void 0:e(r,a,l))),getSecondsList:(r,a,l,c)=>H2(60,n&&(()=>n==null?void 0:n(r,a,l,c)))}),hde=(t,e,n)=>{const{getHoursList:s,getMinutesList:i,getSecondsList:o}=zD(t,e,n);return{getAvailableHours:(c,u)=>U2(s(c,u)),getAvailableMinutes:(c,u,d)=>U2(i(c,u,d)),getAvailableSeconds:(c,u,d,h)=>U2(o(c,u,d,h))}},fde=t=>{const e=J(t.parsedValue);return Te(()=>t.visible,n=>{n||(e.value=t.parsedValue)}),e},kl=new Map;if(Ut){let t;document.addEventListener("mousedown",e=>t=e),document.addEventListener("mouseup",e=>{if(t){for(const n of kl.values())for(const{documentHandler:s}of n)s(e,t);t=void 0}})}function p$(t,e){let n=[];return Array.isArray(e.arg)?n=e.arg:Yo(e.arg)&&n.push(e.arg),function(s,i){const o=e.instance.popperRef,r=s.target,a=i==null?void 0:i.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(s,i)}}const mf={beforeMount(t,e){kl.has(t)||kl.set(t,[]),kl.get(t).push({documentHandler:p$(t,e),bindingFn:e.value})},updated(t,e){kl.has(t)||kl.set(t,[]);const n=kl.get(t),s=n.findIndex(o=>o.bindingFn===e.oldValue),i={documentHandler:p$(t,e),bindingFn:e.value};s>=0?n.splice(s,1,i):n.push(i)},unmounted(t){kl.delete(t)}},pde=100,mde=600,D_={beforeMount(t,e){const n=e.value,{interval:s=pde,delay:i=mde}=ot(n)?{}:n;let o,r;const a=()=>ot(n)?n():n.handler(),l=()=>{r&&(clearTimeout(r),r=void 0),o&&(clearInterval(o),o=void 0)};t.addEventListener("mousedown",c=>{c.button===0&&(l(),a(),document.addEventListener("mouseup",()=>l(),{once:!0}),r=setTimeout(()=>{o=setInterval(()=>{a()},s)},i))})}},p6="_trap-focus-children",hu=[],m$=t=>{if(hu.length===0)return;const e=hu[hu.length-1][p6];if(e.length>0&&t.code===ft.tab){if(e.length===1){t.preventDefault(),document.activeElement!==e[0]&&e[0].focus();return}const n=t.shiftKey,s=t.target===e[0],i=t.target===e[e.length-1];s&&n&&(t.preventDefault(),e[e.length-1].focus()),i&&!n&&(t.preventDefault(),e[0].focus())}},gde={beforeMount(t){t[p6]=E9(t),hu.push(t),hu.length<=1&&document.addEventListener("keydown",m$)},updated(t){dt(()=>{t[p6]=E9(t)})},unmounted(){hu.shift(),hu.length===0&&document.removeEventListener("keydown",m$)}};var g$=!1,ou,m6,g6,X0,K0,HD,Z0,v6,_6,y6,UD,b6,w6,jD,WD;function Di(){if(!g$){g$=!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(b6=/\b(iPhone|iP[ao]d)/.exec(t),w6=/\b(iP[ao]d)/.exec(t),y6=/Android/i.exec(t),jD=/FBAN\/\w+;/i.exec(t),WD=/Mobile/i.exec(t),UD=!!/Win64/.exec(t),e){ou=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,ou&&document&&document.documentMode&&(ou=document.documentMode);var s=/(?:Trident\/(\d+.\d+))/.exec(t);HD=s?parseFloat(s[1])+4:ou,m6=e[2]?parseFloat(e[2]):NaN,g6=e[3]?parseFloat(e[3]):NaN,X0=e[4]?parseFloat(e[4]):NaN,X0?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),K0=e&&e[1]?parseFloat(e[1]):NaN):K0=NaN}else ou=m6=g6=K0=X0=NaN;if(n){if(n[1]){var i=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);Z0=i?parseFloat(i[1].replace("_",".")):!0}else Z0=!1;v6=!!n[2],_6=!!n[3]}else Z0=v6=_6=!1}}var C6={ie:function(){return Di()||ou},ieCompatibilityMode:function(){return Di()||HD>ou},ie64:function(){return C6.ie()&&UD},firefox:function(){return Di()||m6},opera:function(){return Di()||g6},webkit:function(){return Di()||X0},safari:function(){return C6.webkit()},chrome:function(){return Di()||K0},windows:function(){return Di()||v6},osx:function(){return Di()||Z0},linux:function(){return Di()||_6},iphone:function(){return Di()||b6},mobile:function(){return Di()||b6||w6||y6||WD},nativeApp:function(){return Di()||jD},android:function(){return Di()||y6},ipad:function(){return Di()||w6}},vde=C6,f0=!!(typeof window<"u"&&window.document&&window.document.createElement),_de={canUseDOM:f0,canUseWorkers:typeof Worker<"u",canUseEventListeners:f0&&!!(window.addEventListener||window.attachEvent),canUseViewport:f0&&!!window.screen,isInWorker:!f0},YD=_de,GD;YD.canUseDOM&&(GD=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function yde(t,e){if(!YD.canUseDOM||e&&!("addEventListener"in document))return!1;var n="on"+t,s=n in document;if(!s){var i=document.createElement("div");i.setAttribute(n,"return;"),s=typeof i[n]=="function"}return!s&&GD&&t==="wheel"&&(s=document.implementation.hasFeature("Events.wheel","3.0")),s}var bde=yde,v$=10,_$=40,y$=800;function qD(t){var e=0,n=0,s=0,i=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),s=e*v$,i=n*v$,"deltaY"in t&&(i=t.deltaY),"deltaX"in t&&(s=t.deltaX),(s||i)&&t.deltaMode&&(t.deltaMode==1?(s*=_$,i*=_$):(s*=y$,i*=y$)),s&&!e&&(e=s<1?-1:1),i&&!n&&(n=i<1?-1:1),{spinX:e,spinY:n,pixelX:s,pixelY:i}}qD.getEventType=function(){return vde.firefox()?"DOMMouseScroll":bde("wheel")?"wheel":"mousewheel"};var wde=qD;/** | |
| 59 | +`).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 Gv=new RegExp("(?:^"+k+"$)","i"),Gv},H$={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},nm={integer:function(e){return nm.number(e)&&parseInt(e,10)===e},float:function(e){return nm.number(e)&&!nm.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"&&!nm.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&e.length<=320&&!!e.match(H$.email)},url:function(e){return typeof e=="string"&&e.length<=2048&&!!e.match(Lce())},hex:function(e){return typeof e=="string"&&!!e.match(H$.hex)}},Oce=function(e,n,i,s,o){if(e.required&&n===void 0){AR(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?nm[a](n)||s.push(Io(o.messages.types[a],e.fullField,e.type)):a&&typeof n!==e.type&&s.push(Io(o.messages.types[a],e.fullField,e.type))},Dce=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(Io(o.messages[d].len,e.fullField,e.len)):a&&!l&&u<e.min?s.push(Io(o.messages[d].min,e.fullField,e.min)):l&&!a&&u>e.max?s.push(Io(o.messages[d].max,e.fullField,e.max)):a&&l&&(u<e.min||u>e.max)&&s.push(Io(o.messages[d].range,e.fullField,e.min,e.max))},ah="enum",Rce=function(e,n,i,s,o){e[ah]=Array.isArray(e[ah])?e[ah]:[],e[ah].indexOf(n)===-1&&s.push(Io(o.messages[ah],e.fullField,e[ah].join(", ")))},Vce=function(e,n,i,s,o){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(n)||s.push(Io(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(Io(o.messages.pattern.mismatch,e.fullField,n,e.pattern))}}},mn={required:AR,whitespace:Ice,type:Oce,range:Dce,enum:Rce,pattern:Vce},Fce=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();mn.required(e,n,s,r,o,"string"),Bs(n,"string")||(mn.type(e,n,s,r,o),mn.range(e,n,s,r,o),mn.pattern(e,n,s,r,o),e.whitespace===!0&&mn.whitespace(e,n,s,r,o))}i(r)},Nce=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();mn.required(e,n,s,r,o),n!==void 0&&mn.type(e,n,s,r,o)}i(r)},Bce=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();mn.required(e,n,s,r,o),n!==void 0&&(mn.type(e,n,s,r,o),mn.range(e,n,s,r,o))}i(r)},zce=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();mn.required(e,n,s,r,o),n!==void 0&&mn.type(e,n,s,r,o)}i(r)},Hce=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();mn.required(e,n,s,r,o),Bs(n)||mn.type(e,n,s,r,o)}i(r)},Uce=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();mn.required(e,n,s,r,o),n!==void 0&&(mn.type(e,n,s,r,o),mn.range(e,n,s,r,o))}i(r)},jce=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();mn.required(e,n,s,r,o),n!==void 0&&(mn.type(e,n,s,r,o),mn.range(e,n,s,r,o))}i(r)},Wce=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();mn.required(e,n,s,r,o,"array"),n!=null&&(mn.type(e,n,s,r,o),mn.range(e,n,s,r,o))}i(r)},Yce=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();mn.required(e,n,s,r,o),n!==void 0&&mn.type(e,n,s,r,o)}i(r)},qce="enum",Gce=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();mn.required(e,n,s,r,o),n!==void 0&&mn[qce](e,n,s,r,o)}i(r)},Xce=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();mn.required(e,n,s,r,o),Bs(n,"string")||mn.pattern(e,n,s,r,o)}i(r)},Kce=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(mn.required(e,n,s,r,o),!Bs(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),mn.type(e,l,s,r,o),l&&mn.range(e,l.getTime(),s,r,o)}}i(r)},Zce=function(e,n,i,s,o){var r=[],a=Array.isArray(n)?"array":typeof n;mn.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();mn.required(e,n,s,a,o,r),Bs(n,r)||mn.type(e,n,s,a,o)}i(a)},Jce=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();mn.required(e,n,s,r,o)}i(r)},ng={string:Fce,method:Nce,number:Bce,boolean:zce,regexp:Hce,integer:Uce,float:jce,array:Wce,object:Yce,enum:Gce,pattern:Xce,date:Kce,url:Ew,hex:Ew,email:Ew,required:Zce,any:Jce};function aC(){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 lC=aC(),B1=function(){function t(n){this.rules=null,this._messages=lC,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=z$(aC(),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 S;y=(S=y).concat.apply(S,$)}else y.push($)}for(var C=0;C<m.length;C++)k(m[C]);y.length?(b=rC(y),c(y,b)):c(null,a)}if(l.messages){var d=this.messages();d===lC&&(d=aC()),z$(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=Vu({},a)),b=a[m]=C.transform(b)),typeof C=="function"?C={validator:C}:C=Vu({},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 Mce(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 Vu({},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(B$(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(B$(b,a)):l.error&&(T=[l.error(b,Io(l.messages.required,b.field))]),y(T);var I={};b.defaultField&&Object.keys(m.value).map(function(V){I[V]=b.defaultField}),I=Vu({},I,m.rule.fields);var L={};Object.keys(I).forEach(function(V){var B=I[V],F=Array.isArray(B)?B:[B];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 B=[];T&&T.length&&B.push.apply(B,T),V&&V.length&&B.push.apply(B,V),y(B.length?B:null)})}}var S;if(b.asyncValidator)S=b.asyncValidator(b,m.value,$,m.source,l);else if(b.validator){try{S=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)}S===!0?$():S===!1?$(typeof b.message=="function"?b.message(b.fullField||b.field):b.message||(b.fullField||b.field)+" fails"):S instanceof Array?$(S):S instanceof Error&&$(S.message)}S&&S.then&&S.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&&!ng.hasOwnProperty(i.type))throw new Error(Io("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"?ng.required:ng[this.getType(i)]||void 0},t}();B1.register=function(e,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");ng[e]=n};B1.warning=Sce;B1.messages=lC;B1.validators=ng;const Qce=["role","aria-labelledby"];var eue=fe({name:"ElFormItem",__name:"form-item",props:mce,setup(t,{expose:e}){const n=t,i=mi(),s=qe(zd,void 0),o=qe(wd,void 0),r=Ii(void 0,{formItem:!1}),a=Be("form-item"),l=kr().value,c=J([]),u=J(""),d=bie(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:fi(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=fi(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(()=>Jn(n.inlineMessage)?n.inlineMessage:(s==null?void 0:s.inlineMessage)||!1),S=Y(()=>[a.e("error"),{[a.em("error","inline")]:$.value}]),M=Y(()=>n.prop?Me(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 Ac(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=Ac(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}),B=Y(()=>V.value.length>0),F=ie=>V.value.filter(re=>!re.trigger||!ie?!0:Me(re.trigger)?re.trigger.includes(ie):re.trigger===ie).map(({trigger:re,...ke})=>ke),z=Y(()=>V.value.some(ie=>ie.required)),U=Y(()=>d.value==="error"&&n.showMessage&&((s==null?void 0:s.showMessage)??!0)),G=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)},W=()=>{K("success"),s==null||s.emit("validate",n.prop,!0,"")},Q=async ie=>{const re=M.value;return new B1({[re]:ie}).validate({[re]:R.value},{firstFields:!0}).then(()=>(W(),!0)).catch(ke=>(X(ke),Promise.reject(ke)))},ne=async(ie,re)=>{if(m||!n.prop)return!1;const ke=et(re);if(!B.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=Ac(ie,n.prop);m=!0,re.value=Qu(p),await ot(),Z(),m=!1},ge=ie=>{c.value.includes(ie)||c.value.push(ie)},Ce=ie=>{c.value=c.value.filter(re=>re!==ie)},oe=ie=>{p=Qu(ie)};Te(()=>n.error,ie=>{h.value=ie||"",K(ie?"error":"")},{immediate:!0}),Te(()=>n.validateStatus,ie=>K(ie||""));const pe=In({...go(n),$el:f,size:r,validateMessage:h,validateState:u,labelId:l,inputIds:c,isGroup:I,hasLabel:P,fieldValue:R,addInputId:ge,removeInputId:Ce,resetField:ae,clearValidate:Z,validate:ne,propString:M,setInitialValue:oe});return Pt(wd,pe),Ft(()=>{n.prop&&(oe(R.value),s==null||s.addField(pe))}),wn(()=>{s==null||s.removeField(pe)}),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:q(C.value),role:I.value?"group":void 0,"aria-labelledby":I.value?E(l):void 0},[_(E(bce),{"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:q(E(a).e("label")),style:Xe(b.value)},{default:w(()=>[le(ie.$slots,"label",{label:G.value},()=>[N(x(G.value),1)])]),_:3},8,["id","for","class","style"])):O("v-if",!0)]),_:3},8,["is-auto-width","update-all"]),g("div",{class:q(E(a).e("content")),style:Xe(k.value)},[le(ie.$slots,"default"),_(Eb,{name:`${E(a).namespace.value}-zoom-in-top`},{default:w(()=>[U.value?le(ie.$slots,"error",{key:0,error:h.value},()=>[g("div",{class:q(S.value)},x(h.value),3)]):O("v-if",!0)]),_:3},8,["name"])],6)],10,Qce)}}}),ER=eue;const tn=qt(yce,{FormItem:ER}),en=Os(ER),Mw="focus-trap.focus-after-trapped",Tw="focus-trap.focus-after-released",tue="focus-trap.focusout-prevented",U$={cancelable:!0,bubbles:!1},nue={cancelable:!0,bubbles:!1},j$="focusAfterTrapped",W$="focusAfterReleased",MR=Symbol("elFocusTrap"),t8=J(),e2=J(0),n8=J(0);let Xv=0;const TR=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(!sue(n,e))return n},sue=(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},iue=t=>{const e=TR(t);return[Y$(e,t),Y$(e.reverse(),t)]},oue=t=>t instanceof HTMLInputElement&&"select"in t,Yl=(t,e)=>{if(t){const n=document.activeElement;E4(t,{preventScroll:!0}),n8.value=window.performance.now(),t!==n&&oue(t)&&e&&t.select()}};function q$(t,e){const n=[...t],i=t.indexOf(e);return i!==-1&&n.splice(i,1),n}const rue=()=>{let t=[];return{push:i=>{const s=t[0];s&&i!==s&&s.pause(),t=q$(t,i),t.unshift(i)},remove:i=>{var s,o;t=q$(t,i),(o=(s=t[0])==null?void 0:s.resume)==null||o.call(s)}}},aue=(t,e=!1)=>{const n=document.activeElement;for(const i of t)if(Yl(i,e),document.activeElement!==n)return},G$=rue(),lue=()=>e2.value>n8.value,Kv=()=>{t8.value="pointer",e2.value=window.performance.now()},X$=()=>{t8.value="keyboard",e2.value=window.performance.now()},cue=()=>(Ft(()=>{Xv===0&&(document.addEventListener("mousedown",Kv),document.addEventListener("touchstart",Kv),document.addEventListener("keydown",X$)),Xv++}),wn(()=>{Xv--,Xv<=0&&(document.removeEventListener("mousedown",Kv),document.removeEventListener("touchstart",Kv),document.removeEventListener("keydown",X$))}),{focusReason:t8,lastUserFocusTimestamp:e2,lastAutomatedFocusTimestamp:n8}),Zv=t=>new CustomEvent(tue,{...nue,detail:t});var uue=fe({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[j$,W$,"focusin","focusout","focusout-prevented","release-requested"],setup(t,{emit:e}){const n=J();let i,s;const{focusReason:o}=cue();ere(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,S=ls(p)===Ue.tab&&!m&&!y&&!b,M=document.activeElement;if(S&&M){const P=k,[T,I]=iue(P);if(T&&I){if(!C&&M===I){const L=Zv({focusReason:o.value});e("focusout-prevented",L),L.defaultPrevented||(p.preventDefault(),$&&Yl(T,!0))}else if(C&&[T,P].includes(M)){const L=Zv({focusReason:o.value});e("focusout-prevented",L),L.defaultPrevented||(p.preventDefault(),$&&Yl(I,!0))}}else if(M===P){const L=Zv({focusReason:o.value});e("focusout-prevented",L),L.defaultPrevented||p.preventDefault()}}};Pt(MR,{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(j$,p)},c=p=>e(W$,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:Yl(s,!0))},d=p=>{const m=E(n);if(!(r.paused||!m))if(t.trapped){const y=p.relatedTarget;!ui(y)&&!m.contains(y)&&setTimeout(()=>{if(!r.paused&&t.trapped){const b=Zv({focusReason:o.value});e("focusout-prevented",b),b.defaultPrevented||Yl(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){G$.push(r);const m=p.contains(document.activeElement)?i:document.activeElement;if(i=m,!p.contains(m)){const y=new Event(Mw,U$);p.addEventListener(Mw,l),p.dispatchEvent(y),y.defaultPrevented||ot(()=>{let b=t.focusStartEl;Ke(b)||(Yl(b),document.activeElement!==b&&(b="first")),b==="first"&&aue(TR(p),!0),(document.activeElement===m||b==="container")&&Yl(p)})}}}function f(){const p=E(n);if(p){p.removeEventListener(Mw,l);const m=new CustomEvent(Tw,{...U$,detail:{focusReason:o.value}});p.addEventListener(Tw,c),p.dispatchEvent(m),!m.defaultPrevented&&(o.value=="keyboard"||!lue()||p.contains(document.activeElement))&&Yl(i??document.body),p.removeEventListener(Tw,c),G$.remove(r),i=null,s=null}}return Ft(()=>{t.trapped&&h(),Te(()=>t.trapped,p=>{p?h():f()})}),wn(()=>{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}}}),gi=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n};function due(t,e,n,i,s,o){return le(t.$slots,"default",{handleKeydown:t.onKeydown})}var hue=gi(uue,[["render",due]]),z1=hue;const fue=(t,e=[])=>{const{placement:n,strategy:i,popperOptions:s}=t,o={placement:n,strategy:i,...s,modifiers:[...mue(t),...e]};return gue(o,s==null?void 0:s.modifiers),o},pue=t=>{if(Kt)return js(t)};function mue(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 gue(t,e){e&&(t.modifiers=[...t.modifiers,...e??[]])}const vue=0,_ue=t=>{const{popperInstanceRef:e,contentRef:n,triggerRef:i,role:s}=qe(e8,void 0),o=J(),r=Y(()=>t.arrowOffset),a=Y(()=>({name:"eventListeners",enabled:!!t.visible})),l=Y(()=>{const k=E(o),C=E(r)??vue;return{name:"arrow",enabled:!Wse(k),options:{element:k,padding:C}}}),c=Y(()=>({onFirstUpdate:()=>{p()},...fue(t,[E(l),E(a)])})),u=Y(()=>pue(t.referenceEl)||E(i)),{attributes:d,state:h,styles:f,update:p,forceUpdate:m,instanceRef:y}=Koe(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=Ts(n,p).stop)}),wn(()=>{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}},yue=(t,{attributes:e,styles:n,role:i})=>{const{nextZIndex:s}=Yb(),o=Be("popper"),r=Y(()=>E(e).popper),a=J(wt(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=wt(t.zIndex)?t.zIndex:s()}}},bue=(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 wn(()=>{i.value=void 0}),{focusStartRef:i,trapped:n,onFocusAfterReleased:o,onFocusAfterTrapped:s,onFocusInTrap:r,onFocusoutPrevented:a,onReleaseRequested:l}};var wue=fe({name:"ElPopperContent",__name:"content",props:$R,emits:uce,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}=bue(s,i),{attributes:h,arrowRef:f,contentRef:p,styles:m,instanceRef:y,role:b,update:k}=_ue(s),{ariaModal:C,arrowStyle:$,contentAttrs:S,contentClass:M,contentStyle:P,updateZIndex:T}=yue(s,{styles:m,attributes:h,role:b}),I=qe(wd,void 0);Pt(wR,{arrowStyle:$,arrowRef:f}),I&&Pt(wd,{...I,addInputId:Dt,removeInputId:Dt});let L;const R=(B=!0)=>{k(),B&&T()},V=()=>{R(!1),s.visible&&s.focusOnShow?r.value=!0:s.visible===!1&&(r.value=!1)};return Ft(()=>{Te(()=>s.triggerTargetEl,(B,F)=>{L==null||L(),L=void 0;const z=E(B||p.value),U=E(F||p.value);Po(z)&&(L=Te([b,()=>s.ariaLabel,C,()=>s.id],G=>{["role","aria-label","aria-modal","id"].forEach((K,X)=>{ui(G[X])?z.removeAttribute(K):z.setAttribute(K,G[X])})},{immediate:!0})),U!==z&&Po(U)&&["role","aria-label","aria-modal","id"].forEach(G=>{U.removeAttribute(G)})},{immediate:!0}),Te(()=>s.visible,V,{immediate:!0})}),wn(()=>{L==null||L(),L=void 0,p.value=void 0}),e({popperContentRef:p,popperInstanceRef:y,updatePopper:R,contentStyle:P}),(B,F)=>(v(),A("div",Wt({ref_key:"contentRef",ref:p},E(S),{style:E(P),class:E(M),tabindex:"-1",onMouseenter:F[0]||(F[0]=z=>B.$emit("mouseenter",z)),onMouseleave:F[1]||(F[1]=z=>B.$emit("mouseleave",z))}),[_(E(z1),{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(B.$slots,"default")]),_:3},8,["loop","trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusin","onFocusoutPrevented","onReleaseRequested"])],16))}}),kue=wue,Cue=fe({name:"ElPopper",inheritAttrs:!1,__name:"popper",props:bR,setup(t,{expose:e}){const n=t,i={triggerRef:J(),popperInstanceRef:J(),contentRef:J(),referenceRef:J(),role:Y(()=>n.role)};return e(i),Pt(e8,i),(s,o)=>le(s.$slots,"default")}}),xue=Cue;const Sue=qt(xue),zn=Ge({...sre,...$R,appendTo:{type:A4.to.type},content:{type:String,default:""},rawContent:Boolean,persistent:Boolean,visible:{type:de(Boolean),default:null},transition:String,teleported:{type:Boolean,default:!0},disabled:Boolean,...xr(["ariaLabel"])}),Ec=Ge({...kR,disabled:Boolean,trigger:{type:de([String,Array]),default:"hover"},triggerKeys:{type:de(Array),default:()=>[Ue.enter,Ue.numpadEnter,Ue.space]},focusOnTarget:Boolean}),{useModelToggleProps:$ue,useModelToggleEmits:Aue,useModelToggle:Eue}=MD("visible"),Mue=Ge({...bR,...$ue,...zn,...Ec,...SR,showArrow:{type:Boolean,default:!0}}),Tue=[...Aue,"before-show","before-hide","show","hide","open","close"],s8=Symbol("elTooltip"),cC=(t,e)=>Me(t)?t.includes(e):t===e,lh=(t,e,n)=>i=>{cC(E(t),e)&&n(i)};var Pue=fe({name:"ElTooltipTrigger",__name:"trigger",props:Ec,setup(t,{expose:e}){const n=t,i=Be("tooltip"),{controlled:s,id:o,open:r,onOpen:a,onClose:l,onToggle:c}=qe(s8,void 0),u=J(null),d=()=>{if(E(s)||n.disabled)return!0},h=Sn(n,"trigger"),f=Ms(d,lh(h,"hover",$=>{a($),n.focusOnTarget&&$.target&&ot(()=>{E4($.target,{preventScroll:!0})})})),p=Ms(d,lh(h,"hover",l)),m=Ms(d,lh(h,"click",$=>{$.button===0&&c($)})),y=Ms(d,lh(h,"focus",a)),b=Ms(d,lh(h,"focus",l)),k=Ms(d,lh(h,"contextmenu",$=>{$.preventDefault(),c($)})),C=Ms(d,$=>{const S=ls($);n.triggerKeys.includes(S)&&($.preventDefault(),c($))});return e({triggerRef:u}),($,S)=>(v(),D(E(ace),{id:E(o),"virtual-ref":t.virtualRef,open:E(r),"virtual-triggering":t.virtualTriggering,class:q(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"]))}}),Iue=Pue,Lue=fe({name:"ElTooltipContent",inheritAttrs:!1,__name:"content",props:zn,setup(t,{expose:e}){const n=t,{selector:i}=HD(),s=Be("tooltip"),o=J(),r=fD(()=>{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(s8,void 0),k=Y(()=>n.transition||`${s.namespace.value}-fade-in-linear`),C=Y(()=>n.persistent);wn(()=>{a==null||a()});const $=Y(()=>E(C)?!0:E(u)),S=Y(()=>n.disabled?!1:E(u)),M=Y(()=>n.appendTo||i.value),P=Y(()=>n.style??{}),T=J(!0),I=()=>{m(),G()&&E4(document.body,{preventScroll:!0}),T.value=!0},L=()=>{if(E(l))return!0},R=Ms(L,()=>{n.enterable&&cC(E(d),"hover")&&f()}),V=Ms(L,()=>{cC(E(d),"hover")&&h()}),B=()=>{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()},U=()=>{n.virtualTriggering||h()},G=K=>{var Q;const X=(Q=o.value)==null?void 0:Q.popperContentRef,W=(K==null?void 0:K.relatedTarget)||document.activeElement;return X==null?void 0:X.contains(W)};return Te(()=>E(u),K=>{K?(T.value=!1,a=yD(r,()=>{E(l)||ao(E(d)).every(X=>X!=="hover"&&X!=="focus")&&h()},{detectIframe:!0})):a==null||a()},{flush:"post"}),e({contentRef:o,isFocusInsideContent:G}),(K,X)=>(v(),D(E(Kb),{disabled:!t.teleported,to:M.value},{default:w(()=>[$.value||!T.value?(v(),D(Ho,{key:0,name:k.value,appear:!C.value,onAfterLeave:I,onBeforeEnter:B,onAfterEnter:z,onBeforeLeave:F,persisted:""},{default:w(()=>[Re(_(E(kue),Wt({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:S.value,"z-index":t.zIndex,loop:t.loop,onMouseenter:E(R),onMouseleave:E(V),onBlur:U,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"]),[[jt,S.value]])]),_:3},8,["name","appear"])):O("v-if",!0)]),_:3},8,["disabled","to"]))}}),Oue=Lue;const Due=["innerHTML"],Rue={key:1};var Vue=fe({name:"ElTooltip",__name:"tooltip",props:Mue,emits:Tue,setup(t,{expose:e,emit:n}){const i=t,s=n;nre();const o=Be("tooltip"),r=kr(),a=J(),l=J(),c=()=>{var S;const $=E(a);$&&((S=$.popperInstanceRef)==null||S.update())},u=J(!1),d=J(),{show:h,hide:f,hasUpdateHandler:p}=Eue({indicator:u,toggleReason:d}),{onOpen:m,onClose:y}=ire({showAfter:Sn(i,"showAfter"),hideAfter:Sn(i,"hideAfter"),autoClose:Sn(i,"autoClose"),open:h,close:f}),b=Y(()=>Jn(i.visible)&&!p.value),k=Y(()=>[o.b(),i.popperClass]);Pt(s8,{controlled:b,id:r,open:Rc(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),!$&&Jn(i.visible)&&(u.value=i.visible)});const C=$=>{var S;return(S=l.value)==null?void 0:S.isFocusInsideContent($)};return M6(()=>u.value&&f()),wn(()=>{d.value=void 0}),e({popperRef:a,contentRef:l,isFocusInsideContent:C,updatePopper:c,onOpen:m,onClose:y,hide:f}),($,S)=>(v(),D(E(Sue),{ref_key:"popperRef",ref:a,role:t.role},{default:w(()=>[_(Iue,{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"]),_(Oue,{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,Due)):(v(),A("span",Rue,x(t.content),1))]),t.showArrow?(v(),D(E(oce),{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"]))}}),Fue=Vue;const Ss=qt(Fue),ri=t=>t,Nue=Ge({id:{type:String,default:void 0},size:Zi,disabled:{type:Boolean,default:void 0},modelValue:{type:de([String,Number,Object]),default:""},modelModifiers:{type:de(Object),default:()=>({})},maxlength:{type:[String,Number]},minlength:{type:[String,Number]},type:{type:de(String),default:"text"},resize:{type:String,values:["none","both","horizontal","vertical"]},autosize:{type:de([Boolean,Object]),default:!1},autocomplete:{type:de(String),default:"off"},formatter:{type:Function},parser:{type:Function},placeholder:{type:String},form:{type:String},readonly:Boolean,clearable:Boolean,clearIcon:{type:ds,default:Zc},showPassword:Boolean,showWordLimit:Boolean,wordLimitPosition:{type:String,values:["inside","outside"],default:"inside"},suffixIcon:{type:ds},prefixIcon:{type:ds},containerRole:{type:String,default:void 0},tabindex:{type:[String,Number],default:0},validateEvent:{type:Boolean,default:!0},inputStyle:{type:de([Object,Array,String]),default:()=>ri({})},autofocus:Boolean,rows:{type:Number,default:2},...xr(["ariaLabel"]),inputmode:{type:de(String),default:void 0},name:String}),Bue={[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};Pi(Zc);let wi;const zue={height:"0",visibility:"hidden",overflow:M4()?"":"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Hue=["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"],K$=t=>{const e=Number.parseFloat(t);return Number.isNaN(e)?t:e};function Uue(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:Hue.map(o=>[o,e.getPropertyValue(o)]),paddingSize:i,borderSize:s,boxSizing:n}}function Z$(t,e=1,n){var u;if(!wi){wi=document.createElement("textarea");let d=document.body;!M4()&&t.parentNode&&(d=t.parentNode),d.appendChild(wi)}const{paddingSize:i,borderSize:s,boxSizing:o,contextStyle:r}=Uue(t);r.forEach(([d,h])=>wi==null?void 0:wi.style.setProperty(d,h)),Object.entries(zue).forEach(([d,h])=>wi==null?void 0:wi.style.setProperty(d,h,"important")),wi.value=t.value||t.placeholder||"";let a=wi.scrollHeight;const l={};o==="border-box"?a=a+s:o==="content-box"&&(a=a-i),wi.value="";const c=wi.scrollHeight-i;if(wt(e)){let d=c*e;o==="border-box"&&(d=d+i+s),a=Math.max(d,a),l.minHeight=`${d}px`}if(wt(n)){let d=c*n;o==="border-box"&&(d=d+i+s),a=Math.min(d,a)}return l.height=`${a}px`,(u=wi.parentNode)==null||u.removeChild(wi),wi=void 0,l}const jue=["id","name","minlength","maxlength","type","disabled","readonly","autocomplete","tabindex","aria-label","placeholder","form","autofocus","role","inputmode"],Wue=["id","name","minlength","maxlength","tabindex","disabled","readonly","autocomplete","aria-label","placeholder","form","autofocus","rows","role","inputmode"],J$="ElInput";var Yue=fe({name:J$,inheritAttrs:!1,__name:"input",props:Nue,emits:Bue,setup(t,{expose:e,emit:n}){const i=t,s=n,o=Dd(),r=Ub(),a=mi(),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&&W.value,[m.b("hidden")]:i.type==="hidden"},o.class]),c=Y(()=>[m.e("wrapper"),m.is("focus",I.value)]),{form:u,formItem:d}=_o(),{inputId:h}=Tl(i,{formItemContext:d}),f=Ii(),p=bs(),m=Be("input"),y=Be("textarea"),b=Fn(),k=Fn(),C=J(!1),$=J(!1),S=J(),M=Fn(i.inputStyle),P=Y(()=>b.value||k.value),{wrapperRef:T,isFocused:I,handleFocus:L,handleBlur:R}=pp(P,{disabled:p,afterBlur(){var ve;i.validateEvent&&((ve=d==null?void 0:d.validate)==null||ve.call(d,"blur").catch(Pe=>Tt(Pe)))}}),V=Y(()=>(u==null?void 0:u.statusIcon)??!1),B=Y(()=>(d==null?void 0:d.validateState)||""),F=Y(()=>B.value&&Q4[B.value]),z=Y(()=>$.value?gR:fR),U=Y(()=>[o.style]),G=Y(()=>[i.inputStyle,M.value,{resize:i.resize}]),K=Y(()=>ui(i.modelValue)?"":String(i.modelValue)),X=Y(()=>i.clearable&&!p.value&&!i.readonly&&!!K.value&&(I.value||C.value)),W=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||!!B.value&&V.value),ge=Y(()=>!!Object.keys(i.modelModifiers).length),[Ce,oe]=Vre(b);Ts(k,ve=>{if(re(),!Q.value||i.resize!=="both"&&i.resize!=="horizontal")return;const{width:Pe}=ve[0].contentRect;S.value={right:`calc(100% - ${Pe+22-10}px)`}});const pe=()=>{const{type:ve,autosize:Pe}=i;if(!(!Kt||ve!=="textarea"||!k.value))if(Pe){const Ie=yt(Pe)?Pe.minRows:void 0,_t=yt(Pe)?Pe.maxRows:void 0,Lt=Z$(k.value,Ie,_t);M.value={overflowY:"hidden",...Lt},ot(()=>{k.value.offsetHeight,M.value=Lt})}else M.value={minHeight:Z$(k.value).minHeight}},re=(ve=>{let Pe=!1;return()=>{var Ie;Pe||!i.autosize||((Ie=k.value)==null?void 0:Ie.offsetParent)!==null&&(setTimeout(ve),Pe=!0)}})(pe),ke=()=>{const ve=P.value,Pe=i.formatter?i.formatter(K.value):K.value;!ve||ve.value===Pe||i.type==="file"||(ve.value=Pe)},je=ve=>{const{trim:Pe,number:Ie}=i.modelModifiers;return Pe&&(ve=ve.trim()),Ie&&(ve=`${K$(ve)}`),i.formatter&&i.parser&&(ve=i.parser(ve)),ve},te=async ve=>{if(me.value)return;const{lazy:Pe}=i.modelModifiers;let{value:Ie}=ve.target;if(Pe){s(Do,Ie);return}if(Ie=je(Ie),String(Ie)===K.value){i.formatter&&ke();return}Ce(),s(Mt,Ie),s(Do,Ie),await ot(),(i.formatter&&i.parser||!ge.value)&&ke(),oe()},se=async ve=>{let{value:Pe}=ve.target;Pe=je(Pe),i.modelModifiers.lazy&&s(Mt,Pe),s(dn,Pe,ve),await ot(),ke()},{isComposing:me,handleCompositionStart:$e,handleCompositionUpdate:Se,handleCompositionEnd:Le}=W4({emit:s,afterComposition:te}),We=()=>{$.value=!$.value},Fe=()=>{var ve;return(ve=P.value)==null?void 0:ve.focus()},ze=()=>{var ve;return(ve=P.value)==null?void 0:ve.blur()},Ae=ve=>{C.value=!1,s("mouseleave",ve)},Ze=ve=>{C.value=!0,s("mouseenter",ve)},Ye=ve=>{s("keydown",ve)},it=()=>{var ve;(ve=P.value)==null||ve.select()},ye=ve=>{s(Mt,""),s(dn,""),s("clear",ve),s(Do,"")};return Te(()=>i.modelValue,()=>{var ve;ot(()=>pe()),i.validateEvent&&((ve=d==null?void 0:d.validate)==null||ve.call(d,"change").catch(Pe=>Tt(Pe)))}),Te(K,ve=>{if(!P.value)return;const{trim:Pe,number:Ie}=i.modelModifiers,_t=P.value.value,Lt=(Ie||i.type==="number")&&!/^0\d/.test(_t)?`${K$(_t)}`:_t;Lt!==ve&&(document.activeElement===P.value&&P.value.type!=="range"&&Pe&&Lt.trim()===ve||ke())}),Te(()=>i.type,async()=>{await ot(),ke(),pe()}),Ft(()=>{!i.formatter&&i.parser&&Tt(J$,"If you set the parser, you also need to set the formatter."),ke(),ot(pe)}),e({input:b,textarea:k,ref:P,textareaStyle:G,autosize:Sn(i,"autosize"),isComposing:me,focus:Fe,blur:ze,select:it,clear:ye,resizeTextarea:pe}),(ve,Pe)=>(v(),A("div",{class:q([l.value,{[E(m).bm("group","append")]:ve.$slots.append,[E(m).bm("group","prepend")]:ve.$slots.prepend}]),style:Xe(U.value),onMouseenter:Ze,onMouseleave:Ae},[O(" input "),t.type!=="textarea"?(v(),A(ee,{key:0},[O(" prepend slot "),ve.$slots.prepend?(v(),A("div",{key:0,class:q(E(m).be("group","prepend"))},[le(ve.$slots,"prepend")],2)):O("v-if",!0),g("div",{ref_key:"wrapperRef",ref:T,class:q(c.value)},[O(" prefix slot "),ve.$slots.prefix||t.prefixIcon?(v(),A("span",{key:0,class:q(E(m).e("prefix"))},[g("span",{class:q(E(m).e("prefix-inner"))},[le(ve.$slots,"prefix"),t.prefixIcon?(v(),D(E(be),{key:0,class:q(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",Wt({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(Le)&&E(Le)(...Ie)),onInput:te,onChange:se,onKeydown:Ye}),null,16,jue),O(" suffix slot "),ae.value?(v(),A("span",{key:1,class:q(E(m).e("suffix"))},[g("span",{class:q(E(m).e("suffix-inner"))},[!X.value||!W.value||!Q.value?(v(),A(ee,{key:0},[le(ve.$slots,"suffix"),t.suffixIcon?(v(),D(E(be),{key:0,class:q(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:q([E(m).e("icon"),E(m).e("clear")]),onMousedown:Ee(E(Dt),["prevent"]),onClick:ye},{default:w(()=>[(v(),D(Ct(t.clearIcon)))]),_:1},8,["class","onMousedown"])):O("v-if",!0),W.value?(v(),D(E(be),{key:2,class:q([E(m).e("icon"),E(m).e("password")]),onClick:We,onMousedown:Ee(E(Dt),["prevent"]),onMouseup:Ee(E(Dt),["prevent"])},{default:w(()=>[le(ve.$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:q([E(m).e("count"),E(m).is("outside",t.wordLimitPosition==="outside")])},[g("span",{class:q(E(m).e("count-inner"))},x(ne.value)+" / "+x(t.maxlength),3)],2)):O("v-if",!0),B.value&&F.value&&V.value?(v(),D(E(be),{key:4,class:q([E(m).e("icon"),E(m).e("validateIcon"),E(m).is("loading",B.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 "),ve.$slots.append?(v(),A("div",{key:1,class:q(E(m).be("group","append"))},[le(ve.$slots,"append")],2)):O("v-if",!0)],64)):(v(),A(ee,{key:1},[O(" textarea "),g("textarea",Wt({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:G.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(Le)&&E(Le)(...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:Ye}),null,16,Wue),X.value?(v(),D(E(be),{key:0,class:q([E(y).e("icon"),E(y).e("clear")]),onMousedown:Ee(E(Dt),["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(S.value),class:q([E(m).e("count"),E(m).is("outside",t.wordLimitPosition==="outside")])},x(ne.value)+" / "+x(t.maxlength),7)):O("v-if",!0)],64))],38))}}),que=Yue;const ft=qt(que),Gue=Ge({distance:{type:Number,default:0},height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:Boolean,wrapStyle:{type:de([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,...xr(["ariaLabel","ariaOrientation"])}),PR={"end-reached":t=>["left","right","top","bottom"].includes(t),scroll:({scrollTop:t,scrollLeft:e})=>[t,e].every(wt)},ch=4,Xue={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"}},Kue=({move:t,size:e,bar:n})=>({[n.size]:e,transform:`translate${n.axis}(${t}%)`}),Zue=Ge({vertical:Boolean,size:String,move:Number,ratio:{type:Number,required:!0},always:Boolean}),i8=Symbol("scrollbarContextKey"),Jue=Ge({always:{type:Boolean,default:!0},minSize:{type:Number,required:!0}}),Que="Thumb";var ede=fe({__name:"thumb",props:Zue,setup(t){const e=t,n=qe(i8),i=Be("scrollbar");n||vo(Que,"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=Kt?document.onselectstart:null;const f=Y(()=>Xue[e.vertical?"vertical":"horizontal"]),p=Y(()=>Kue({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)},S=()=>{c=!1,a.value=!!e.size},M=()=>{c=!0,a.value=l};wn(()=>{P(),document.removeEventListener("mouseup",$)});const P=()=>{document.onselectstart!==h&&(document.onselectstart=h)};return Hn(Sn(n,"scrollbarElement"),"mousemove",S),Hn(Sn(n,"scrollbarElement"),"mouseleave",M),(T,I)=>(v(),D(Ho,{name:E(i).b("fade"),persisted:""},{default:w(()=>[Re(g("div",{ref_key:"instance",ref:s,class:q([E(i).e("bar"),E(i).is(f.value.key)]),onMousedown:b,onClick:I[0]||(I[0]=Ee(()=>{},["stop"]))},[g("div",{ref_key:"thumb",ref:o,class:q(E(i).e("thumb")),style:Xe(p.value),onMousedown:y},null,38)],34),[[jt,t.always||a.value]])]),_:1},8,["name"]))}}),Q$=ede,tde=fe({__name:"bar",props:Jue,setup(t,{expose:e}){const n=t,i=qe(i8),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-ch,p=h.offsetWidth-ch;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-ch,p=h.offsetWidth-ch,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+ch<f?`${b}px`:"",r.value=k+ch<p?`${k}px`:""}}),(h,f)=>(v(),A(ee,null,[_(Q$,{move:s.value,ratio:c.value,size:r.value,always:t.always},null,8,["move","ratio","size","always"]),_(Q$,{move:o.value,ratio:l.value,size:a.value,vertical:"",always:t.always},null,8,["move","ratio","size","always"])],64))}}),nde=tde;const sde=["tabindex"],Pw="ElScrollbar";var ide=fe({name:Pw,__name:"scrollbar",props:Gue,emits:PR,setup(t,{expose:e,emit:n}){const i=t,s=n,o=Be("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={},B=fi(i.height),F=fi(i.maxHeight);return B&&(V.height=B),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,S={top:"bottom",bottom:"top",left:"right",right:"left"},M=V=>{const B=S[d];if(!B)return;const F=V[d],z=V[B];F&&!h[d]&&(h[d]=!0),!z&&h[B]&&(h[B]=!1)},P=()=>{var V;if(p.value){(V=y.value)==null||V.handleScroll(p.value);const B=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&&B!==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}),B!==c&&(d=c>B?"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,B){yt(V)?p.value.scrollTo(V):wt(V)&&wt(B)&&p.value.scrollTo(V,B)}const I=V=>{if(!wt(V)){Tt(Pw,"value must be a number");return}p.value.scrollTop=V},L=V=>{if(!wt(V)){Tt(Pw,"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}=Ts(m,R),{stop:a}=Ts(p,R),l=Hn("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))})}),Pt(i8,In({scrollbarElement:f,wrapElement:p})),E6(()=>{p.value&&(p.value.scrollTop=c,p.value.scrollLeft=u)}),Ft(()=>{i.native||ot(()=>{R()})}),xl(()=>R()),e({wrapRef:p,update:R,scrollTo:T,setScrollTop:I,setScrollLeft:L,handleScroll:P}),(V,B)=>(v(),A("div",{ref_key:"scrollbarRef",ref:f,class:q(E(o).b())},[g("div",{ref_key:"wrapRef",ref:p,class:q(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:q(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,sde),t.native?O("v-if",!0):(v(),D(nde,{key:0,ref_key:"barRef",ref:y,always:t.always,"min-size":t.minSize},null,8,["always","min-size"]))],2))}}),ode=ide;const qs=qt(ode),rde=Ge({size:{type:[Number,String],values:$l,validator:t=>wt(t)},shape:{type:String,values:["circle","square"]},icon:{type:ds},src:{type:String,default:""},alt:String,srcSet:String,fit:{type:de(String),default:"cover"}}),ade={error:t=>t instanceof Event},IR=Symbol("avatarGroupContextKey"),lde={size:{type:de([Number,String]),values:$l,validator:t=>wt(t)},shape:{type:de(String),values:["circle","square"]},collapseAvatars:Boolean,collapseAvatarsTooltip:Boolean,maxCollapseAvatars:{type:Number,default:1},effect:{type:de(String),default:"light"},placement:{type:de(String),values:hp,default:"top"},popperClass:zn.popperClass,popperStyle:zn.popperStyle,collapseClass:String,collapseStyle:{type:de([String,Array,Object])}},cde=["src","alt","srcset"];var ude=fe({name:"ElAvatar",__name:"avatar",props:rde,emits:ade,setup(t,{emit:e}){const n=t,i=e,s=qe(IR,void 0),o=Be("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(()=>wt(a.value)?o.cssVarBlock({size:fi(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:q(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,cde)):t.icon?(v(),D(E(be),{key:1},{default:w(()=>[(v(),D(Ct(t.icon)))]),_:1})):le(f.$slots,"default",{key:2})],6))}}),LR=ude,OR=fe({name:"ElAvatarGroup",props:lde,setup(t,{slots:e}){const n=Be("avatar-group");return Pt(IR,In({size:Sn(t,"size"),shape:Sn(t,"shape")})),()=>{var o;const i=kc(((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(_(Ss,{popperClass:t.popperClass,popperStyle:t.popperStyle,placement:t.placement,effect:t.effect,disabled:!t.collapseAvatarsTooltip},{default:()=>_(LR,{size:t.size,shape:t.shape,class:t.collapseClass,style:t.collapseStyle},{default:()=>[N("+ "),r.length]}),content:()=>_("div",{class:n.e("collapse-avatars")},[r.map((a,l)=>is(a)?_r(a,{key:a.key??l}):a)])}))}return _("div",{class:n.b()},[s])}}});const o8=qt(LR,{AvatarGroup:OR});Os(OR);const dde=Ge({separator:{type:String,default:"/"},separatorIcon:{type:ds}}),DR=Symbol("breadcrumbKey"),hde=Ge({to:{type:de([String,Object]),default:""},replace:Boolean}),fde=["aria-label"];var pde=fe({name:"ElBreadcrumb",__name:"breadcrumb",props:dde,setup(t){const{t:e}=Qt(),n=t,i=Be("breadcrumb"),s=J();return Pt(DR,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:q(E(i).b()),"aria-label":E(e)("el.breadcrumb.label"),role:"navigation"},[le(o.$slots,"default")],10,fde))}}),mde=pde,gde=fe({name:"ElBreadcrumbItem",__name:"breadcrumb-item",props:hde,setup(t){const e=t,n=pt(),i=qe(DR,void 0),s=Be("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:q(E(s).e("item"))},[g("span",{class:q([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:q(E(s).e("separator"))},{default:w(()=>[(v(),D(Ct(E(i).separatorIcon)))]),_:1},8,["class"])):(v(),A("span",{key:1,class:q(E(s).e("separator")),role:"presentation"},x((u=E(i))==null?void 0:u.separator),3))],2)}}}),RR=gde;const vde=qt(mde,{BreadcrumbItem:RR}),_de=Os(RR),yde=["default","primary","success","warning","info","danger","text",""],bde=["button","submit","reset"],uC=Ge({size:Zi,disabled:{type:Boolean,default:void 0},type:{type:String,values:yde,default:""},icon:{type:ds},nativeType:{type:String,values:bde,default:"button"},loading:Boolean,loadingIcon:{type:ds,default:()=>Uf},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:de([String,Object]),default:"button"}}),wde={click:t=>t instanceof MouseEvent},VR=Symbol(),by=J();function Jc(t,e=void 0){const n=pt()?qe(VR,by):by;return t?Y(()=>{var i;return((i=n.value)==null?void 0:i[t])??e}):n}function r8(t,e){const n=Jc(),i=Be(t,Y(()=>{var a;return((a=n.value)==null?void 0:a.namespace)||Jm})),s=Qt(Y(()=>{var a;return(a=n.value)==null?void 0:a.locale})),o=Yb(Y(()=>{var a;return((a=n.value)==null?void 0:a.zIndex)||jD})),r=Y(()=>{var a;return E(e)||((a=n.value)==null?void 0:a.size)||""});return FR(Y(()=>E(n)||{})),{ns:i,locale:s,zIndex:o,size:r}}const FR=(t,e,n=!1)=>{const i=!!pt(),s=i?Jc():void 0,o=(e==null?void 0:e.provide)??(i?Pt:void 0);if(!o){Tt("provideGlobalConfig","provideGlobalConfig() can only be used inside setup().");return}const r=Y(()=>{const a=E(t);return s!=null&&s.value?kde(s.value,a):a});return o(VR,r),o($D,Y(()=>r.value.locale)),o(AD,Y(()=>r.value.namespace)),o(WD,Y(()=>r.value.zIndex)),o(nR,{size:Y(()=>r.value.size||"")}),o(iR,Y(()=>({emptyValues:r.value.emptyValues,valueOnClear:r.value.valueOnClear}))),(n||!by.value)&&(by.value=r.value),r},kde=(t,e)=>{const n=[...new Set([...my(t),...my(e)])],i={};for(const s of n)i[s]=e[s]!==void 0?e[s]:t[s];return i},Cde=Ge({a11y:{type:Boolean,default:!0},locale:{type:de(Object)},size:Zi,button:{type:de(Object)},card:{type:de(Object)},dialog:{type:de(Object)},link:{type:de(Object)},experimentalFeatures:{type:de(Object)},keyboardNavigation:{type:Boolean,default:!0},message:{type:de(Object)},zIndex:Number,namespace:{type:String,default:"el"},table:{type:de(Object)},...F1}),xde={placement:"top"},Sde=fe({name:"ElConfigProvider",props:Cde,setup(t,{slots:e}){const n=FR(t);return Te(()=>t.message,i=>{var s;Object.assign(xde,((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})}}),$de=qt(Sde),NR=Symbol("buttonGroupContextKey"),Ade=(t,e)=>{fl({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(NR,void 0),i=Jc("button"),{form:s}=_o(),o=Ii(Y(()=>n==null?void 0:n.size)),r=bs(),a=J(),l=mi(),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)===xa){const S=$.children;return/^\p{Unified_Ideograph}{2}$/u.test(S.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 di(t,e){Ede(t)&&(t="100%");const n=Mde(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 Jv(t){return Math.min(1,Math.max(0,t))}function Ede(t){return typeof t=="string"&&t.indexOf(".")!==-1&&parseFloat(t)===1}function Mde(t){return typeof t=="string"&&t.indexOf("%")!==-1}function BR(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function Qv(t){return Number(t)<=1?`${Number(t)*100}%`:t}function Fu(t){return t.length===1?"0"+t:String(t)}function Tde(t,e,n){return{r:di(t,255)*255,g:di(e,255)*255,b:di(n,255)*255}}function eA(t,e,n){t=di(t,255),e=di(e,255),n=di(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 Pde(t,e,n){let i,s,o;if(t=di(t,360),e=di(e,100),n=di(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 tA(t,e,n){t=di(t,255),e=di(e,255),n=di(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 Ide(t,e,n){t=di(t,360)*6,e=di(e,100),n=di(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 nA(t,e,n,i){const s=[Fu(Math.round(t).toString(16)),Fu(Math.round(e).toString(16)),Fu(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 Lde(t,e,n,i,s){const o=[Fu(Math.round(t).toString(16)),Fu(Math.round(e).toString(16)),Fu(Math.round(n).toString(16)),Fu(Dde(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 Ode(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 sA(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 Dde(t){return Math.round(parseFloat(t)*255).toString(16)}function iA(t){return So(t)/255}function So(t){return parseInt(t,16)}function Rde(t){return{r:t>>16,g:(t&65280)>>8,b:t&255}}const dC={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 Vde(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=Bde(t)),typeof t=="object"&&(Co(t.r)&&Co(t.g)&&Co(t.b)?(e=Tde(t.r,t.g,t.b),r=!0,a=String(t.r).substr(-1)==="%"?"prgb":"rgb"):Co(t.h)&&Co(t.s)&&Co(t.v)?(i=Qv(t.s),s=Qv(t.v),e=Ide(t.h,i,s),r=!0,a="hsv"):Co(t.h)&&Co(t.s)&&Co(t.l)?(i=Qv(t.s),o=Qv(t.l),e=Pde(t.h,i,o),r=!0,a="hsl"):Co(t.c)&&Co(t.m)&&Co(t.y)&&Co(t.k)&&(e=Ode(t.c,t.m,t.y,t.k),r=!0,a="cmyk"),Object.prototype.hasOwnProperty.call(t,"a")&&(n=t.a)),n=BR(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 Fde="[-\\+]?\\d+%?",Nde="[-\\+]?\\d*\\.\\d+%?",Cc="(?:"+Nde+")|(?:"+Fde+")",Lw="[\\s|\\(]+("+Cc+")[,|\\s]+("+Cc+")[,|\\s]+("+Cc+")\\s*\\)?",e0="[\\s|\\(]+("+Cc+")[,|\\s]+("+Cc+")[,|\\s]+("+Cc+")[,|\\s]+("+Cc+")\\s*\\)?",Qo={CSS_UNIT:new RegExp(Cc),rgb:new RegExp("rgb"+Lw),rgba:new RegExp("rgba"+e0),hsl:new RegExp("hsl"+Lw),hsla:new RegExp("hsla"+e0),hsv:new RegExp("hsv"+Lw),hsva:new RegExp("hsva"+e0),cmyk:new RegExp("cmyk"+e0),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 Bde(t){if(t=t.trim().toLowerCase(),t.length===0)return!1;let e=!1;if(dC[t])t=dC[t],e=!0;else if(t==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};let n=Qo.rgb.exec(t);return n?{r:n[1],g:n[2],b:n[3]}:(n=Qo.rgba.exec(t),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Qo.hsl.exec(t),n?{h:n[1],s:n[2],l:n[3]}:(n=Qo.hsla.exec(t),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Qo.hsv.exec(t),n?{h:n[1],s:n[2],v:n[3]}:(n=Qo.hsva.exec(t),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Qo.cmyk.exec(t),n?{c:n[1],m:n[2],y:n[3],k:n[4]}:(n=Qo.hex8.exec(t),n?{r:So(n[1]),g:So(n[2]),b:So(n[3]),a:iA(n[4]),format:e?"name":"hex8"}:(n=Qo.hex6.exec(t),n?{r:So(n[1]),g:So(n[2]),b:So(n[3]),format:e?"name":"hex"}:(n=Qo.hex4.exec(t),n?{r:So(n[1]+n[1]),g:So(n[2]+n[2]),b:So(n[3]+n[3]),a:iA(n[4]+n[4]),format:e?"name":"hex8"}:(n=Qo.hex3.exec(t),n?{r:So(n[1]+n[1]),g:So(n[2]+n[2]),b:So(n[3]+n[3]),format:e?"name":"hex"}:!1))))))))))}function Co(t){return typeof t=="number"?!Number.isNaN(t):Qo.CSS_UNIT.test(t)}class Qn{constructor(e="",n={}){if(e instanceof Qn)return e;typeof e=="number"&&(e=Rde(e)),this.originalInput=e;const i=Vde(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=BR(e),this.roundA=Math.round(100*this.a)/100,this}isMonochrome(){const{s:e}=this.toHsl();return e===0}toHsv(){const e=tA(this.r,this.g,this.b);return{h:e.h*360,s:e.s,v:e.v,a:this.a}}toHsvString(){const e=tA(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=eA(this.r,this.g,this.b);return{h:e.h*360,s:e.s,l:e.l,a:this.a}}toHslString(){const e=eA(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 nA(this.r,this.g,this.b,e)}toHexString(e=!1){return"#"+this.toHex(e)}toHex8(e=!1){return Lde(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(di(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(di(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{...sA(this.r,this.g,this.b)}}toCmykString(){const{c:e,m:n,y:i,k:s}=sA(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="#"+nA(this.r,this.g,this.b,!1);for(const[n,i]of Object.entries(dC))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 Qn(this.toString())}lighten(e=10){const n=this.toHsl();return n.l+=e/100,n.l=Jv(n.l),new Qn(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 Qn(n)}darken(e=10){const n=this.toHsl();return n.l-=e/100,n.l=Jv(n.l),new Qn(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=Jv(n.s),new Qn(n)}saturate(e=10){const n=this.toHsl();return n.s+=e/100,n.s=Jv(n.s),new Qn(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 Qn(n)}mix(e,n=50){const i=this.toRgb(),s=new Qn(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 Qn(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 Qn(i));return o}complement(){const e=this.toHsl();return e.h=(e.h+180)%360,new Qn(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 Qn({h:i,s,v:o})),o=(o+a)%1;return r}splitcomplement(){const e=this.toHsl(),{h:n}=e;return[this,new Qn({h:(n+72)%360,s:e.s,l:e.l}),new Qn({h:(n+216)%360,s:e.s,l:e.l})]}onBackground(e){const n=this.toRgb(),i=new Qn(e).toRgb(),s=n.a+i.a*(1-n.a);return new Qn({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 Qn({h:(i+r*o)%360,s:n.s,l:n.l}));return s}equals(e){const n=new Qn(e);return this.format==="cmyk"||n.format==="cmyk"?this.toCmykString()===n.toCmykString():this.toRgbString()===n.toRgbString()}}function Hl(t,e=20){return t.mix("#141414",e).toString()}function zde(t){const e=bs(),n=Be("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 Qn(s),a=t.dark?r.tint(20).toString():Hl(r,20);if(t.plain)i=n.cssVarBlock({"bg-color":t.dark?Hl(r,90):r.tint(90).toString(),"text-color":s,"border-color":t.dark?Hl(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?Hl(r,90):r.tint(90).toString(),i[n.cssVarBlockName("disabled-text-color")]=t.dark?Hl(r,50):r.tint(50).toString(),i[n.cssVarBlockName("disabled-border-color")]=t.dark?Hl(r,80):r.tint(80).toString());else{const l=t.dark?Hl(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?Hl(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 Hde=fe({name:"ElButton",__name:"button",props:uC,emits:wde,setup(t,{expose:e,emit:n}){const i=t,s=n,o=zde(i),r=Be("button"),{_ref:a,_size:l,_type:c,_disabled:u,_props:d,_plain:h,_round:f,_text:p,_dashed:m,shouldAddSpace:y,handleClick:b}=Ade(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),Wt({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:q(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:q({[E(r).em("text","expand")]:E(y)})},[le(C.$slots,"default")],2)):O("v-if",!0)]),_:3},16,["class","style","onClick"]))}}),Ude=Hde;const jde={size:uC.size,type:uC.type,direction:{type:de(String),values:["horizontal","vertical"],default:"horizontal"}};var Wde=fe({name:"ElButtonGroup",__name:"button-group",props:jde,setup(t){const e=t;Pt(NR,In({size:Sn(e,"size"),type:Sn(e,"type")}));const n=Be("button");return(i,s)=>(v(),A("div",{class:q([E(n).b("group"),E(n).bm("group",e.direction)])},[le(i.$slots,"default")],2))}}),zR=Wde;const He=qt(Ude,{ButtonGroup:zR});Os(zR);const oA=["hours","minutes","seconds"],Ia="EP_PICKER_BASE",HR="ElPopperOptions",UR=Symbol("commonPickerContextKey"),Jg="HH:mm:ss",mc="YYYY-MM-DD",Yde={date:mc,dates:mc,week:"gggg[w]ww",year:"YYYY",years:"YYYY",month:"YYYY-MM",months:"YYYY-MM",datetime:`${mc} ${Jg}`,monthrange:"YYYY-MM",yearrange:"YYYY",daterange:mc,datetimerange:`${mc} ${Jg}`};var xs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vi(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var jR={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,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"],U=F%100;return"["+F+(z[(U-20)%10]||z[U]||z[0])+"]"}},C=function(F,z,U){var G=String(F);return!G||G.length>=z?F:""+Array(z+1-G.length).join(U)+F},$={s:C,z:function(F){var z=-F.utcOffset(),U=Math.abs(z),G=Math.floor(U/60),K=U%60;return(z<=0?"+":"-")+C(G,2,"0")+":"+C(K,2,"0")},m:function F(z,U){if(z.date()<U.date())return-F(U,z);var G=12*(U.year()-z.year())+(U.month()-z.month()),K=z.clone().add(G,d),X=U-K<0,W=z.clone().add(G+(X?-1:1),d);return+(-(G+(U-K)/(X?K-W:W-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}},S="en",M={};M[S]=k;var P="$isDayjsObject",T=function(F){return F instanceof V||!(!F||!F[P])},I=function F(z,U,G){var K;if(!z)return S;if(typeof z=="string"){var X=z.toLowerCase();M[X]&&(K=X),U&&(M[X]=U,K=X);var W=z.split("-");if(!K&&W.length>1)return F(W[0])}else{var Q=z.name;M[Q]=z,K=Q}return!G&&K&&(S=K),K||!G&&S},L=function(F,z){if(T(F))return F.clone();var U=typeof z=="object"?z:{};return U.date=F,U.args=arguments,new V(U)},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(U){this.$L=I(U.locale,null,!0),this.parse(U),this.$x=this.$x||U.x||{},this[P]=!0}var z=F.prototype;return z.parse=function(U){this.$d=function(G){var K=G.date,X=G.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 W=K.match(y);if(W){var Q=W[2]-1||0,ne=(W[7]||"0").substring(0,3);return X?new Date(Date.UTC(W[1],Q,W[3]||1,W[4]||0,W[5]||0,W[6]||0,ne)):new Date(W[1],Q,W[3]||1,W[4]||0,W[5]||0,W[6]||0,ne)}}return new Date(K)}(U),this.init()},z.init=function(){var U=this.$d;this.$y=U.getFullYear(),this.$M=U.getMonth(),this.$D=U.getDate(),this.$W=U.getDay(),this.$H=U.getHours(),this.$m=U.getMinutes(),this.$s=U.getSeconds(),this.$ms=U.getMilliseconds()},z.$utils=function(){return R},z.isValid=function(){return this.$d.toString()!==m},z.isSame=function(U,G){var K=L(U);return this.startOf(G)<=K&&K<=this.endOf(G)},z.isAfter=function(U,G){return L(U)<this.startOf(G)},z.isBefore=function(U,G){return this.endOf(G)<L(U)},z.$g=function(U,G,K){return R.u(U)?this[G]:this.set(K,U)},z.unix=function(){return Math.floor(this.valueOf()/1e3)},z.valueOf=function(){return this.$d.getTime()},z.startOf=function(U,G){var K=this,X=!!R.u(G)||G,W=R.p(U),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,ge=this.$D,Ce="set"+(this.$u?"UTC":"");switch(W){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,pe=(Z<oe?Z+7:Z)-oe;return Q(X?ge-pe:ge+(6-pe),ae);case c:case p:return ne(Ce+"Hours",0);case l:return ne(Ce+"Minutes",1);case a:return ne(Ce+"Seconds",2);case r:return ne(Ce+"Milliseconds",3);default:return this.clone()}},z.endOf=function(U){return this.startOf(U,!1)},z.$set=function(U,G){var K,X=R.p(U),W="set"+(this.$u?"UTC":""),Q=(K={},K[c]=W+"Date",K[p]=W+"Date",K[d]=W+"Month",K[f]=W+"FullYear",K[l]=W+"Hours",K[a]=W+"Minutes",K[r]=W+"Seconds",K[o]=W+"Milliseconds",K)[X],ne=X===c?this.$D+(G-this.$W):G;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(U,G){return this.clone().$set(U,G)},z.get=function(U){return this[R.p(U)]()},z.add=function(U,G){var K,X=this;U=Number(U);var W=R.p(G),Q=function(ae){var ge=L(X);return R.w(ge.date(ge.date()+Math.round(ae*U)),X)};if(W===d)return this.set(d,this.$M+U);if(W===f)return this.set(f,this.$y+U);if(W===c)return Q(1);if(W===u)return Q(7);var ne=(K={},K[a]=i,K[l]=s,K[r]=n,K)[W]||1,Z=this.$d.getTime()+U*ne;return R.w(Z,this)},z.subtract=function(U,G){return this.add(-1*U,G)},z.format=function(U){var G=this,K=this.$locale();if(!this.isValid())return K.invalidDate||m;var X=U||"YYYY-MM-DDTHH:mm:ssZ",W=R.z(this),Q=this.$H,ne=this.$m,Z=this.$M,ae=K.weekdays,ge=K.months,Ce=K.meridiem,oe=function(re,ke,je,te){return re&&(re[ke]||re(G,X))||je[ke].slice(0,te)},pe=function(re){return R.s(Q%12||12,re,"0")},ie=Ce||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(G.$y).slice(-2);case"YYYY":return R.s(G.$y,4,"0");case"M":return Z+1;case"MM":return R.s(Z+1,2,"0");case"MMM":return oe(K.monthsShort,Z,ge,3);case"MMMM":return oe(ge,Z);case"D":return G.$D;case"DD":return R.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return oe(K.weekdaysMin,G.$W,ae,2);case"ddd":return oe(K.weekdaysShort,G.$W,ae,3);case"dddd":return ae[G.$W];case"H":return String(Q);case"HH":return R.s(Q,2,"0");case"h":return pe(1);case"hh":return pe(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(G.$s);case"ss":return R.s(G.$s,2,"0");case"SSS":return R.s(G.$ms,3,"0");case"Z":return W}return null}(re)||W.replace(":","")})},z.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},z.diff=function(U,G,K){var X,W=this,Q=R.p(G),ne=L(U),Z=(ne.utcOffset()-this.utcOffset())*i,ae=this-ne,ge=function(){return R.m(W,ne)};switch(Q){case f:X=ge()/12;break;case d:X=ge();break;case h:X=ge()/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(U,G){if(!U)return this.$L;var K=this.clone(),X=I(U,G,!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}(),B=V.prototype;return L.prototype=B,[["$ms",o],["$s",r],["$m",a],["$H",l],["$W",c],["$M",d],["$y",f],["$D",p]].forEach(function(F){B[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[S],L.Ls=M,L.p={},L})})(jR);var qde=jR.exports;const ht=vi(qde),Ow=(t,e)=>[t>0?t-1:void 0,t,t<e?t+1:void 0],WR=t=>Array.from(Array.from({length:t}).keys()),YR=t=>t.replace(/\W?m{1,2}|\W?ZZ/g,"").replace(/\W?h{1,2}|\W?s{1,3}|\W?a/gi,"").trim(),qR=t=>t.replace(/\W?D{1,2}|\W?Do|\W?d{1,4}|\W?M{1,4}|\W?Y{2,4}/g,"").trim(),rA=function(t,e){const n=H_(t),i=H_(e);return n&&i?t.getTime()===e.getTime():!n&&!i?t===e:!1},GR=function(t,e){const n=Me(t),i=Me(e);return n&&i?t.length!==e.length?!1:t.every((s,o)=>rA(s,e[o])):!n&&!i?rA(t,e):!1},aA=function(t,e,n){const i=$4(e)||e==="x"?ht(t).locale(n):ht(t,e).locale(n);return i.isValid()?i:void 0},lA=function(t,e,n){return $4(e)?t:e==="x"?+t:ht(t).locale(n).format(e)},Dw=(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},O0=t=>Me(t)?t.map(e=>e.toDate()):t.toDate(),a8=Ge({disabledHours:{type:de(Function)},disabledMinutes:{type:de(Function)},disabledSeconds:{type:de(Function)}}),Gde=Ge({visible:Boolean,actualVisible:{type:Boolean,default:void 0},format:{type:String,default:""}}),XR=Ge({automaticDropdown:{type:Boolean,default:!0},id:{type:de([Array,String])},name:{type:de([Array,String])},popperClass:zn.popperClass,popperStyle:zn.popperStyle,format:String,valueFormat:String,dateFormat:String,timeFormat:String,type:{type:String,default:""},clearable:{type:Boolean,default:!0},clearIcon:{type:de([String,Object]),default:Zc},editable:{type:Boolean,default:!0},saveOnBlur:{type:Boolean,default:!0},prefixIcon:{type:de([String,Object]),default:""},size:Zi,readonly:Boolean,disabled:{type:Boolean,default:void 0},placeholder:{type:String,default:""},popperOptions:{type:de(Object),default:()=>({})},modelValue:{type:de([Date,Array,String,Number]),default:""},rangeSeparator:{type:String,default:"-"},startPlaceholder:String,endPlaceholder:String,defaultValue:{type:de([Date,Array])},defaultTime:{type:de([Date,Array])},isRange:Boolean,...a8,disabledDate:{type:Function},cellClassName:{type:Function},shortcuts:{type:Array,default:()=>[]},arrowControl:Boolean,tabindex:{type:de([String,Number]),default:0},validateEvent:{type:Boolean,default:!0},unlinkPanels:Boolean,placement:{type:de(String),values:hp,default:"bottom"},fallbackPlacements:{type:de(Array),default:["bottom","top","right","left"]},...F1,...xr(["ariaLabel"]),showNow:{type:Boolean,default:!0},showConfirm:{type:Boolean,default:!0},showFooter:{type:Boolean,default:!0},showWeekNumber:Boolean}),Xde=Ge({id:{type:de(Array)},name:{type:de(Array)},modelValue:{type:de([Array,String])},startPlaceholder:String,endPlaceholder:String,disabled:Boolean}),KR=(t,e)=>{const{lang:n}=Qt(),i=J(!1),s=J(!1),o=J(null),r=Y(()=>{const{modelValue:p}=t;return!p||Me(p)&&!p.filter(Boolean).length}),a=p=>{if(!GR(t.modelValue,p)){let m;Me(p)?m=p.map(y=>lA(y,t.valueFormat,n.value)):p&&(m=lA(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()):Me(t.modelValue)?p=t.modelValue.map(m=>aA(m,t.valueFormat,n.value)):p=aA(t.modelValue??"",t.valueFormat,n.value),c.value.getRangeAvailableTime){const m=c.value.getRangeAvailableTime(p);Wi(m,p)||(p=m,r.value||a(O0(p)))}return Me(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;Me(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}}},Kde=["id","name","placeholder","value","disabled"],Zde=["id","name","placeholder","value","disabled"];var Jde=fe({name:"PickerRangeTrigger",inheritAttrs:!1,__name:"picker-range-trigger",props:Xde,emits:["mouseenter","mouseleave","click","touchstart","focus","blur","startInput","endInput","startChange","endChange"],setup(t,{expose:e,emit:n}){const i=t,s=n,{formItem:o}=_o(),{inputId:r}=Tl(In({id:Y(()=>{var T;return(T=i.id)==null?void 0:T[0]})}),{formItemContext:o}),a=Ub(),l=Be("date"),c=Be("range"),u=J(),d=J(),{wrapperRef:h,isFocused:f}=pp(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)},S=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:q([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",Wt(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,Kde),le(T.$slots,"range-separator"),g("input",Wt(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:S}),null,16,Zde),le(T.$slots,"suffix")],38))}}),Qde=Jde,ehe=fe({name:"Picker",__name:"picker",props:XR,emits:[Mt,dn,"focus","blur","clear","calendar-change","panel-change","visible-change","keydown"],setup(t,{expose:e,emit:n}){const i=t,s=n,o=Dd(),r=Be("date"),a=Be("input"),l=Be("range"),{formItem:c}=_o(),u=qe(HR,{}),d=Y4(i,null),h=J(),f=J(),p=J(null);let m=!1;const y=bs(),b=KR(i,s),{parsedValue:k,pickerActualVisible:C,userInput:$,pickerVisible:S,pickerOptions:M,valueIsEmpty:P,emitInput:T,onPick:I,onSetPickerOption:L,onCalendarChange:R,onPanelChange:V}=b,{isFocused:B,handleFocus:F,handleBlur:z}=pp(f,{disabled:y,beforeFocus(){return i.readonly},afterFocus(){i.automaticDropdown&&(S.value=!0)},beforeBlur(ce){var De;return!m&&((De=h.value)==null?void 0:De.isFocusInsideContent(ce))},afterBlur(){var ce,De;re.value&&!i.saveOnBlur?P.value||(De=(ce=M.value).handleCancel)==null||De.call(ce):it(),S.value=!1,m=!1,i.validateEvent&&(c==null||c.validate("blur").catch(gt=>Tt(gt)))}}),U=J(!1),G=Y(()=>[r.b("editor"),r.bm("editor",i.type),a.e("wrapper"),r.is("disabled",y.value),r.is("active",S.value),l.b("editor"),Ae?l.bm("editor",Ae.value):"",o.class]),K=Y(()=>[a.e("icon"),l.e("close-icon"),me.value?"":l.em("close-icon","hidden")]);Te(S,ce=>{ce?ot(()=>{ce&&(p.value=i.modelValue)}):($.value=null,ot(()=>{X(i.modelValue)}))});const X=(ce,De)=>{(De||!GR(ce,p.value))&&(s(dn,ce),De&&(p.value=ce),i.validateEvent&&(c==null||c.validate("change").catch(gt=>Tt(gt))))},W=ce=>{s("keydown",ce)},Q=Y(()=>f.value?Array.from(f.value.$el.querySelectorAll("input")):[]),ne=(ce,De,gt)=>{const bn=Q.value;bn.length&&(!gt||gt==="min"?(bn[0].setSelectionRange(ce,De),bn[0].focus()):gt==="max"&&(bn[1].setSelectionRange(ce,De),bn[1].focus()))},Z=()=>{C.value=!0},ae=()=>{s("visible-change",!0)},ge=()=>{C.value=!1,S.value=!1,s("visible-change",!1)},Ce=()=>{S.value=!0},oe=()=>{S.value=!1},pe=Y(()=>{const ce=ve(k.value);return Me($.value)?[$.value[0]||ce&&ce[0]||"",$.value[1]||ce&&ce[1]||""]:$.value!==null?$.value:re.value&&P.value&&!i.saveOnBlur||!re.value&&P.value||!S.value&&P.value?"":ce?ke.value||je.value||te.value?ce.join(", "):ce:""}),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?lR:dae)),me=Y(()=>i.clearable&&!y.value&&!i.readonly&&!P.value&&(U.value||B.value)),$e=ce=>{i.readonly||y.value||(me.value&&(ce==null||ce.stopPropagation(),M.value.handleClear?M.value.handleClear():T(d.valueOnClear.value),X(d.valueOnClear.value,!0),ge()),s("clear"))},Se=async ce=>{var De;i.readonly||y.value||(((De=ce.target)==null?void 0:De.tagName)!=="INPUT"||B.value||!i.automaticDropdown)&&(S.value=!0)},Le=()=>{i.readonly||y.value||!P.value&&i.clearable&&(U.value=!0)},We=()=>{U.value=!1},Fe=ce=>{var De;i.readonly||y.value||(((De=ce.touches[0].target)==null?void 0:De.tagName)!=="INPUT"||B.value||!i.automaticDropdown)&&(S.value=!0)},ze=Y(()=>i.type.includes("range")),Ae=Ii(),Ze=Y(()=>{var ce,De;return(De=(ce=E(h))==null?void 0:ce.popperRef)==null?void 0:De.contentRef}),Ye=yD(f,ce=>{const De=E(Ze),gt=js(f);De&&(ce.target===De||ce.composedPath().includes(De))||ce.target===gt||gt&&ce.composedPath().includes(gt)||(S.value=!1)});wn(()=>{Ye==null||Ye()});const it=()=>{if(!(re.value&&!i.saveOnBlur)){if($.value){const ce=ye(pe.value);ce&&(Pe(ce)&&T(O0(ce)),$.value=null)}$.value===""&&(T(d.valueOnClear.value),X(d.valueOnClear.value,!0),$.value=null)}},ye=ce=>ce?M.value.parseUserInput(ce):null,ve=ce=>ce?Me(ce)?ce.map(De=>De.format(i.format)):ce.format(i.format):null,Pe=ce=>M.value.isValidValue(ce),Ie=async ce=>{if(i.readonly||y.value)return;const De=ls(ce);if(W(ce),De===Ue.esc){S.value===!0&&(S.value=!1,ce.preventDefault(),ce.stopPropagation());return}if(De===Ue.down&&(M.value.handleFocusPicker&&(ce.preventDefault(),ce.stopPropagation()),S.value===!1&&(S.value=!0,await ot()),M.value.handleFocusPicker)){M.value.handleFocusPicker();return}if(De===Ue.tab){m=!0;return}if(De===Ue.enter||De===Ue.numpadEnter){S.value?($.value===null||$.value===""||Pe(ye(pe.value)))&&(it(),S.value=!1):S.value=!0,ce.preventDefault(),ce.stopPropagation();return}if($.value){ce.stopPropagation();return}M.value.handleKeydownInput&&M.value.handleKeydownInput(ce)},_t=ce=>{$.value=ce,S.value||(S.value=!0)},Lt=ce=>{const De=ce.target;$.value?$.value=[De.value,$.value[1]]:$.value=[De.value,null]},Je=ce=>{const De=ce.target;$.value?$.value=[$.value[0],De.value]:$.value=[null,De.value]},dt=()=>{var bn;const ce=$.value,De=ye(ce&&ce[0]),gt=E(k);if(De&&De.isValid()){$.value=[ve(De),((bn=pe.value)==null?void 0:bn[1])||null];const gs=[De,gt&&(gt[1]||null)];Pe(gs)&&(T(O0(gs)),$.value=null)}},mt=()=>{var bn;const ce=E($),De=ye(ce&&ce[1]),gt=E(k);if(De&&De.isValid()){$.value=[((bn=E(pe))==null?void 0:bn[0])||null,ve(De)];const gs=[gt&>[0],De];Pe(gs)&&(T(O0(gs)),$.value=null)}},_e=()=>{var ce;(ce=f.value)==null||ce.focus()},Oe=()=>{var ce;(ce=f.value)==null||ce.blur()};return Pt(Ia,{props:i,emptyValues:d}),Pt(UR,b),e({focus:_e,blur:Oe,handleOpen:Ce,handleClose:oe,onPick:I}),(ce,De)=>(v(),D(E(Ss),Wt({ref_key:"refPopper",ref:h,visible:E(S),effect:"light",pure:"",trigger:"click"},ce.$attrs,{role:"dialog",teleported:"",transition:`${E(r).namespace.value}-zoom-in-top`,"popper-class":[`${E(r).namespace.value}-picker__popper`,ce.popperClass],"popper-style":ce.popperStyle,"popper-options":E(u),"fallback-placements":ce.fallbackPlacements,"gpu-acceleration":!1,placement:ce.placement,"stop-popper-mouse-event":!1,"hide-after":0,persistent:"",onBeforeShow:Z,onShow:ae,onHide:ge}),{default:w(()=>[ze.value?(v(),D(Qde,{key:1,id:ce.id,ref_key:"inputRef",ref:f,"model-value":pe.value,name:ce.name,disabled:E(y),readonly:!ce.editable||ce.readonly,"start-placeholder":ce.startPlaceholder,"end-placeholder":ce.endPlaceholder,class:q(G.value),style:Xe(ce.$attrs.style),"aria-label":ce.ariaLabel,tabindex:ce.tabindex,autocomplete:"off",role:"combobox",onClick:Se,onFocus:E(F),onBlur:E(z),onStartInput:Lt,onStartChange:dt,onEndInput:Je,onEndChange:mt,onMousedown:Se,onMouseenter:Le,onMouseleave:We,onTouchstartPassive:Fe,onKeydown:Ie},{prefix:w(()=>[se.value?(v(),D(E(be),{key:0,class:q([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(ce.$slots,"range-separator",{},()=>[g("span",{class:q(E(l).b("separator"))},x(ce.rangeSeparator),3)])]),suffix:w(()=>[ce.clearIcon?(v(),D(E(be),{key:0,class:q(K.value),onMousedown:Ee(E(Dt),["prevent"]),onClick:$e},{default:w(()=>[(v(),D(Ct(ce.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:ce.id,ref_key:"inputRef",ref:f,"container-role":"combobox","model-value":pe.value,name:ce.name,size:E(Ae),disabled:E(y),placeholder:ce.placeholder,class:q([E(r).b("editor"),E(r).bm("editor",ce.type),E(r).is("focus",E(S)),ce.$attrs.class]),style:Xe(ce.$attrs.style),readonly:!ce.editable||ce.readonly||ke.value||je.value||te.value||ce.type==="week","aria-label":ce.ariaLabel,tabindex:ce.tabindex,"validate-event":!1,onInput:_t,onFocus:E(F),onBlur:E(z),onKeydown:Ie,onChange:it,onMousedown:Se,onMouseenter:Le,onMouseleave:We,onTouchstartPassive:Fe,onClick:De[0]||(De[0]=Ee(()=>{},["stop"]))},{prefix:w(()=>[se.value?(v(),D(E(be),{key:0,class:q(E(a).e("icon")),onMousedown:Ee(Se,["prevent"]),onTouchstartPassive:Fe},{default:w(()=>[(v(),D(Ct(se.value)))]),_:1},8,["class"])):O("v-if",!0)]),suffix:w(()=>[me.value&&ce.clearIcon?(v(),D(E(be),{key:0,class:q(`${E(a).e("icon")} clear-icon`),onMousedown:Ee(E(Dt),["prevent"]),onClick:$e},{default:w(()=>[(v(),D(Ct(ce.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(ce.$slots,"default",{visible:E(S),actualVisible:E(C),parsedValue:E(k),format:ce.format,dateFormat:ce.dateFormat,timeFormat:ce.timeFormat,unlinkPanels:ce.unlinkPanels,type:ce.type,defaultValue:ce.defaultValue,showNow:ce.showNow,showConfirm:ce.showConfirm,showFooter:ce.showFooter,showWeekNumber:ce.showWeekNumber,onPick:De[1]||(De[1]=(...gt)=>E(I)&&E(I)(...gt)),onSelectRange:ne,onSetPickerOption:De[2]||(De[2]=(...gt)=>E(L)&&E(L)(...gt)),onCalendarChange:De[3]||(De[3]=(...gt)=>E(R)&&E(R)(...gt)),onClear:$e,onPanelChange:De[4]||(De[4]=(...gt)=>E(V)&&E(V)(...gt)),onMousedown:De[5]||(De[5]=Ee(()=>{},["stop"]))})]),_:3},16,["visible","transition","popper-class","popper-style","popper-options","fallback-placements","placement"]))}}),the=ehe;const ql=new Map;if(Kt){let t;document.addEventListener("mousedown",e=>t=e),document.addEventListener("mouseup",e=>{if(t){for(const n of ql.values())for(const{documentHandler:i}of n)i(e,t);t=void 0}})}function cA(t,e){let n=[];return Me(e.arg)?n=e.arg:Po(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 Qg={beforeMount(t,e){ql.has(t)||ql.set(t,[]),ql.get(t).push({documentHandler:cA(t,e),bindingFn:e.value})},updated(t,e){ql.has(t)||ql.set(t,[]);const n=ql.get(t),i=n.findIndex(o=>o.bindingFn===e.oldValue),s={documentHandler:cA(t,e),bindingFn:e.value};i>=0?n.splice(i,1,s):n.push(s)},unmounted(t){ql.delete(t)}},nhe=100,she=600,t0="_RepeatClick",wy={beforeMount(t,e){const n=e.value,{interval:i=nhe,delay:s=she}=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[t0]={start:c,clear:l},t.addEventListener("mousedown",c)},unmounted(t){if(!t[t0])return;const{start:e,clear:n}=t[t0];e&&t.removeEventListener("mousedown",e),n&&(n(),document.removeEventListener("mouseup",n)),t[t0]=null}},hC="_trap-focus-children",Nu=[],uA=t=>{if(Nu.length===0)return;const e=ls(t),n=Nu[Nu.length-1][hC];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())}},ihe={beforeMount(t){t[hC]=m$(t),Nu.push(t),Nu.length<=1&&document.addEventListener("keydown",uA)},updated(t){ot(()=>{t[hC]=m$(t)})},unmounted(){Nu.shift(),Nu.length===0&&document.removeEventListener("keydown",uA)}};var dA=!1,Iu,fC,pC,D0,R0,ZR,V0,mC,gC,vC,JR,_C,yC,QR,eV;function eo(){if(!dA){dA=!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(_C=/\b(iPhone|iP[ao]d)/.exec(t),yC=/\b(iP[ao]d)/.exec(t),vC=/Android/i.exec(t),QR=/FBAN\/\w+;/i.exec(t),eV=/Mobile/i.exec(t),JR=!!/Win64/.exec(t),e){Iu=e[1]?parseFloat(e[1]):e[5]?parseFloat(e[5]):NaN,Iu&&document&&document.documentMode&&(Iu=document.documentMode);var i=/(?:Trident\/(\d+.\d+))/.exec(t);ZR=i?parseFloat(i[1])+4:Iu,fC=e[2]?parseFloat(e[2]):NaN,pC=e[3]?parseFloat(e[3]):NaN,D0=e[4]?parseFloat(e[4]):NaN,D0?(e=/(?:Chrome\/(\d+\.\d+))/.exec(t),R0=e&&e[1]?parseFloat(e[1]):NaN):R0=NaN}else Iu=fC=pC=R0=D0=NaN;if(n){if(n[1]){var s=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(t);V0=s?parseFloat(s[1].replace("_",".")):!0}else V0=!1;mC=!!n[2],gC=!!n[3]}else V0=mC=gC=!1}}var bC={ie:function(){return eo()||Iu},ieCompatibilityMode:function(){return eo()||ZR>Iu},ie64:function(){return bC.ie()&&JR},firefox:function(){return eo()||fC},opera:function(){return eo()||pC},webkit:function(){return eo()||D0},safari:function(){return bC.webkit()},chrome:function(){return eo()||R0},windows:function(){return eo()||mC},osx:function(){return eo()||V0},linux:function(){return eo()||gC},iphone:function(){return eo()||_C},mobile:function(){return eo()||_C||yC||vC||eV},nativeApp:function(){return eo()||QR},android:function(){return eo()||vC},ipad:function(){return eo()||yC}},ohe=bC,n0=!!(typeof window<"u"&&window.document&&window.document.createElement),rhe={canUseDOM:n0,canUseWorkers:typeof Worker<"u",canUseEventListeners:n0&&!!(window.addEventListener||window.attachEvent),canUseViewport:n0&&!!window.screen,isInWorker:!n0},tV=rhe,nV;tV.canUseDOM&&(nV=document.implementation&&document.implementation.hasFeature&&document.implementation.hasFeature("","")!==!0);function ahe(t,e){if(!tV.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&&nV&&t==="wheel"&&(i=document.implementation.hasFeature("Events.wheel","3.0")),i}var lhe=ahe,hA=10,fA=40,pA=800;function sV(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*hA,s=n*hA,"deltaY"in t&&(s=t.deltaY),"deltaX"in t&&(i=t.deltaX),(i||s)&&t.deltaMode&&(t.deltaMode==1?(i*=fA,s*=fA):(i*=pA,s*=pA)),i&&!e&&(e=i<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:e,spinY:n,pixelX:i,pixelY:s}}sV.getEventType=function(){return ohe.firefox()?"DOMMouseScroll":lhe("wheel")?"wheel":"mousewheel"};var che=sV;/** | |
| 61 | 60 | * Checks if an event is supported in the current execution environment. |
| 62 | 61 | * |
| 63 | 62 | * NOTE: This will not work correctly for non-generic events such as `change`, |
| 64 | 63 | * `reset`, `load`, `error`, and `select`. |
| @@ -69,43 +68,43 @@ | ||
| 69 | 68 | * @param {?boolean} capture Check if the capture phase is supported. |
| 70 | 69 | * @return {boolean} True if the event is supported. |
| 71 | 70 | * @internal |
| 72 | 71 | * @license Modernizr 3.0.0pre (Custom Build) | MIT |
| 73 | -*/const Cde=function(t,e){if(t&&t.addEventListener){const n=function(s){const i=wde(s);e&&Reflect.apply(e,this,[s,i])};t.addEventListener("wheel",n,{passive:!0})}},kde={beforeMount(t,e){Cde(t,e.value)}},xde=Ze({role:{type:String,required:!0},spinnerDate:{type:xe(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:xe(String),default:""},...ND}),Sde=se({__name:"basic-time-spinner",props:xde,emits:["change","select-range","set-option"],setup(t,{emit:e}){const n=t,s=He("time"),{getHoursList:i,getMinutesList:o,getSecondsList:r}=zD(n.disabledHours,n.disabledMinutes,n.disabledSeconds);let a=!1;const l=J(),h={hours:J(),minutes:J(),seconds:J()},f=q(()=>n.showSeconds?l$:l$.slice(0,2)),p=q(()=>{const{spinnerDate:N}=n,F=N.hour(),Q=N.minute(),ie=N.second();return{hours:F,minutes:Q,seconds:ie}}),m=q(()=>{const{hours:N,minutes:F}=A(p);return{hours:i(n.role),minutes:o(N,n.role),seconds:r(N,F,n.role)}}),b=q(()=>{const{hours:N,minutes:F,seconds:Q}=A(p);return{hours:z2(N,23),minutes:z2(F,59),seconds:z2(Q,59)}}),y=pc(N=>{a=!1,x(N)},200),C=N=>{if(!!!n.amPmMode)return"";const Q=n.amPmMode==="A";let ie=N<12?" am":" pm";return Q&&(ie=ie.toUpperCase()),ie},k=N=>{let F;switch(N){case"hours":F=[0,2];break;case"minutes":F=[3,5];break;case"seconds":F=[6,8];break}const[Q,ie]=F;e("select-range",Q,ie),l.value=N},x=N=>{T(N,A(p)[N])},S=()=>{x("hours"),x("minutes"),x("seconds")},E=N=>N.querySelector(`.${s.namespace.value}-scrollbar__wrap`),T=(N,F)=>{if(n.arrowControl)return;const Q=A(h[N]);Q&&Q.$el&&(E(Q.$el).scrollTop=Math.max(0,F*P(N)))},P=N=>{const F=A(h[N]),Q=F==null?void 0:F.$el.querySelector("li");return Q&&Number.parseFloat(Yl(Q,"height"))||0},I=()=>{V(1)},L=()=>{V(-1)},V=N=>{l.value||k("hours");const F=l.value,Q=A(p)[F],ie=l.value==="hours"?24:60,Z=D(F,Q,N,ie);z(F,Z),T(F,Z),dt(()=>k(F))},D=(N,F,Q,ie)=>{let Z=(F+Q+ie)%ie;const me=A(m)[N];for(;me[Z]&&Z!==F;)Z=(Z+Q+ie)%ie;return Z},z=(N,F)=>{if(A(m)[N][F])return;const{hours:Z,minutes:me,seconds:Se}=A(p);let we;switch(N){case"hours":we=n.spinnerDate.hour(F).minute(me).second(Se);break;case"minutes":we=n.spinnerDate.hour(Z).minute(F).second(Se);break;case"seconds":we=n.spinnerDate.hour(Z).minute(me).second(F);break}e("change",we)},Y=(N,{value:F,disabled:Q})=>{Q||(z(N,F),k(N),T(N,F))},B=N=>{a=!0,y(N);const F=Math.min(Math.round((E(A(h[N]).$el).scrollTop-(U(N)*.5-10)/P(N)+3)/P(N)),N==="hours"?23:59);z(N,F)},U=N=>A(h[N]).$el.offsetHeight,X=()=>{const N=F=>{const Q=A(h[F]);Q&&Q.$el&&(E(Q.$el).onscroll=()=>{B(F)})};N("hours"),N("minutes"),N("seconds")};Pt(()=>{dt(()=>{!n.arrowControl&&X(),S(),n.role==="start"&&k("hours")})});const K=(N,F)=>{h[F].value=N};return e("set-option",[`${n.role}_scrollDown`,V]),e("set-option",[`${n.role}_emitSelectRange`,k]),Te(()=>n.spinnerDate,()=>{a||S()}),(N,F)=>(v(),$("div",{class:W([A(s).b("spinner"),{"has-seconds":N.showSeconds}])},[N.arrowControl?O("v-if",!0):(v(!0),$(te,{key:0},be(A(f),Q=>(v(),R(A(ui),{key:Q,ref_for:!0,ref:ie=>K(ie,Q),class:W(A(s).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":A(s).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:ie=>k(Q),onMousemove:ie=>x(Q)},{default:w(()=>[(v(!0),$(te,null,be(A(m)[Q],(ie,Z)=>(v(),$("li",{key:Z,class:W([A(s).be("spinner","item"),A(s).is("active",Z===A(p)[Q]),A(s).is("disabled",ie)]),onClick:me=>Y(Q,{value:Z,disabled:ie})},[Q==="hours"?(v(),$(te,{key:0},[G(M(("0"+(N.amPmMode?Z%12||12:Z)).slice(-2))+M(C(Z)),1)],64)):(v(),$(te,{key:1},[G(M(("0"+Z).slice(-2)),1)],64))],10,["onClick"]))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),N.arrowControl?(v(!0),$(te,{key:1},be(A(f),Q=>(v(),$("div",{key:Q,class:W([A(s).be("spinner","wrapper"),A(s).is("arrow")]),onMouseenter:ie=>k(Q)},[Pe((v(),R(A(ye),{class:W(["arrow-up",A(s).be("spinner","arrow")])},{default:w(()=>[_(A(Xy))]),_:1},8,["class"])),[[A(D_),L]]),Pe((v(),R(A(ye),{class:W(["arrow-down",A(s).be("spinner","arrow")])},{default:w(()=>[_(A(ud))]),_:1},8,["class"])),[[A(D_),I]]),g("ul",{class:W(A(s).be("spinner","list"))},[(v(!0),$(te,null,be(A(b)[Q],(ie,Z)=>(v(),$("li",{key:Z,class:W([A(s).be("spinner","item"),A(s).is("active",ie===A(p)[Q]),A(s).is("disabled",A(m)[Q][ie])])},[typeof ie=="number"?(v(),$(te,{key:0},[Q==="hours"?(v(),$(te,{key:0},[G(M(("0"+(N.amPmMode?ie%12||12:ie)).slice(-2))+M(C(ie)),1)],64)):(v(),$(te,{key:1},[G(M(("0"+ie).slice(-2)),1)],64))],64)):O("v-if",!0)],2))),128))],2)],42,["onMouseenter"]))),128)):O("v-if",!0)],2))}});var $de=Ye(Sde,[["__file","basic-time-spinner.vue"]]);const Ade=se({__name:"panel-time-pick",props:ude,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,s=qe("EP_PICKER_BASE"),{arrowControl:i,disabledHours:o,disabledMinutes:r,disabledSeconds:a,defaultValue:l}=s.props,{getAvailableHours:c,getAvailableMinutes:u,getAvailableSeconds:d}=hde(o,r,a),h=He("time"),{t:f,lang:p}=fn(),m=J([0,2]),b=fde(n),y=q(()=>js(n.actualVisible)?`${h.namespace.value}-zoom-in-top`:""),C=q(()=>n.format.includes("ss")),k=q(()=>n.format.includes("A")?"A":n.format.includes("a")?"a":""),x=K=>{const N=ut(K).locale(p.value),F=Y(N);return N.isSame(F)},S=()=>{e("pick",b.value,!1)},E=(K=!1,N=!1)=>{N||e("pick",n.parsedValue,K)},T=K=>{if(!n.visible)return;const N=Y(K).millisecond(0);e("pick",N,!0)},P=(K,N)=>{e("select-range",K,N),m.value=[K,N]},I=K=>{const N=[0,3].concat(C.value?[6]:[]),F=["hours","minutes"].concat(C.value?["seconds"]:[]),ie=(N.indexOf(m.value[0])+K+N.length)%N.length;V.start_emitSelectRange(F[ie])},L=K=>{const N=K.code,{left:F,right:Q,up:ie,down:Z}=ft;if([F,Q].includes(N)){I(N===F?-1:1),K.preventDefault();return}if([ie,Z].includes(N)){const me=N===ie?-1:1;V.start_scrollDown(me),K.preventDefault();return}},{timePickerOptions:V,onSetOption:D,getAvailableTime:z}=dde({getAvailableHours:c,getAvailableMinutes:u,getAvailableSeconds:d}),Y=K=>z(K,n.datetimeRole||"",!0),B=K=>K?ut(K,n.format).locale(p.value):null,U=K=>K?K.format(n.format):null,X=()=>ut(l).locale(p.value);return e("set-picker-option",["isValidValue",x]),e("set-picker-option",["formatToString",U]),e("set-picker-option",["parseUserInput",B]),e("set-picker-option",["handleKeydownInput",L]),e("set-picker-option",["getRangeAvailableTime",Y]),e("set-picker-option",["getDefaultValue",X]),(K,N)=>(v(),R(bo,{name:A(y)},{default:w(()=>[K.actualVisible||K.visible?(v(),$("div",{key:0,class:W(A(h).b("panel"))},[g("div",{class:W([A(h).be("panel","content"),{"has-seconds":A(C)}])},[_($de,{ref:"spinner",role:K.datetimeRole||"start","arrow-control":A(i),"show-seconds":A(C),"am-pm-mode":A(k),"spinner-date":K.parsedValue,"disabled-hours":A(o),"disabled-minutes":A(r),"disabled-seconds":A(a),onChange:T,onSetOption:A(D),onSelectRange:P},null,8,["role","arrow-control","show-seconds","am-pm-mode","spinner-date","disabled-hours","disabled-minutes","disabled-seconds","onSetOption"])],2),g("div",{class:W(A(h).be("panel","footer"))},[g("button",{type:"button",class:W([A(h).be("panel","btn"),"cancel"]),onClick:S},M(A(f)("el.datepicker.cancel")),3),g("button",{type:"button",class:W([A(h).be("panel","btn"),"confirm"]),onClick:F=>E()},M(A(f)("el.datepicker.confirm")),11,["onClick"])],2)],2)):O("v-if",!0)]),_:1},8,["name"]))}});var k6=Ye(Ade,[["__file","panel-time-pick.vue"]]),XD={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(us,function(){return function(n,s,i){var o=s.prototype,r=function(d){return d&&(d.indexOf?d:d.s)},a=function(d,h,f,p,m){var b=d.name?d:d.$locale(),y=r(b[h]),C=r(b[f]),k=y||C.map(function(S){return S.slice(0,p)});if(!m)return k;var x=b.weekStart;return k.map(function(S,E){return k[(E+(x||0))%7]})},l=function(){return i.Ls[i.locale()]},c=function(d,h){return d.formats[h]||function(f){return f.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(p,m,b){return m||b.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)()},i.localeData=function(){var d=l();return{firstDayOfWeek:function(){return d.weekStart||0},weekdays:function(){return i.weekdays()},weekdaysShort:function(){return i.weekdaysShort()},weekdaysMin:function(){return i.weekdaysMin()},months:function(){return i.months()},monthsShort:function(){return i.monthsShort()},longDateFormat:function(h){return c(d,h)},meridiem:d.meridiem,ordinal:d.ordinal}},i.months=function(){return a(l(),"months")},i.monthsShort=function(){return a(l(),"monthsShort","months",3)},i.weekdays=function(d){return a(l(),"weekdays",null,null,d)},i.weekdaysShort=function(d){return a(l(),"weekdaysShort","weekdays",3,d)},i.weekdaysMin=function(d){return a(l(),"weekdaysMin","weekdays",2,d)}}})})(XD);var Mde=XD.exports;const Ede=Ts(Mde),KD={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:Boolean,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:Ji,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},...ir(["ariaControls"])},ZD={[mn]:t=>nt(t)||xt(t)||li(t),change:t=>nt(t)||xt(t)||li(t)},Vf=Symbol("checkboxGroupContextKey"),Tde=({model:t,isChecked:e})=>{const n=qe(Vf,void 0),s=q(()=>{var o,r;const a=(o=n==null?void 0:n.max)==null?void 0:o.value,l=(r=n==null?void 0:n.min)==null?void 0:r.value;return!js(a)&&t.value.length>=a&&!e.value||!js(l)&&t.value.length<=l&&e.value});return{isDisabled:Co(q(()=>(n==null?void 0:n.disabled.value)||s.value)),isLimitDisabled:s}},Pde=(t,{model:e,isLimitExceeded:n,hasOwnLabel:s,isDisabled:i,isLabeledByFormItem:o})=>{const r=qe(Vf,void 0),{formItem:a}=Br(),{emit:l}=pt();function c(p){var m,b,y,C;return[!0,t.trueValue,t.trueLabel].includes(p)?(b=(m=t.trueValue)!=null?m:t.trueLabel)!=null?b:!0:(C=(y=t.falseValue)!=null?y:t.falseLabel)!=null?C:!1}function u(p,m){l("change",c(p),m)}function d(p){if(n.value)return;const m=p.target;l("change",c(m.checked),p)}async function h(p){n.value||!s.value&&!i.value&&o.value&&(p.composedPath().some(y=>y.tagName==="LABEL")||(e.value=c([!1,t.falseValue,t.falseLabel].includes(e.value)),await dt(),u(e.value,p)))}const f=q(()=>(r==null?void 0:r.validateEvent)||t.validateEvent);return Te(()=>t.modelValue,()=>{f.value&&(a==null||a.validate("change").catch(p=>void 0))}),{handleChange:d,onClickRoot:h}},Ide=t=>{const e=J(!1),{emit:n}=pt(),s=qe(Vf,void 0),i=q(()=>js(s)===!1),o=J(!1),r=q({get(){var a,l;return i.value?(a=s==null?void 0:s.modelValue)==null?void 0:a.value:(l=t.modelValue)!=null?l:e.value},set(a){var l,c;i.value&&Le(a)?(o.value=((l=s==null?void 0:s.max)==null?void 0:l.value)!==void 0&&a.length>(s==null?void 0:s.max.value)&&a.length>r.value.length,o.value===!1&&((c=s==null?void 0:s.changeEvent)==null||c.call(s,a))):(n(mn,a),e.value=a)}});return{model:r,isGroup:i,isLimitExceeded:o}},Lde=(t,e,{model:n})=>{const s=qe(Vf,void 0),i=J(!1),o=q(()=>hg(t.value)?t.label:t.value),r=q(()=>{const u=n.value;return li(u)?u:Le(u)?Ct(o.value)?u.map(Yt).some(d=>mc(d,o.value)):u.map(Yt).includes(o.value):u!=null?u===t.trueValue||u===t.trueLabel:!!u}),a=Mi(q(()=>{var u;return(u=s==null?void 0:s.size)==null?void 0:u.value}),{prop:!0}),l=Mi(q(()=>{var u;return(u=s==null?void 0:s.size)==null?void 0:u.value})),c=q(()=>!!e.default||!hg(o.value));return{checkboxButtonSize:a,isChecked:r,isFocused:i,checkboxSize:l,hasOwnLabel:c,actualValue:o}},JD=(t,e)=>{const{formItem:n}=Br(),{model:s,isGroup:i,isLimitExceeded:o}=Ide(t),{isFocused:r,isChecked:a,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:u,actualValue:d}=Lde(t,e,{model:s}),{isDisabled:h}=Tde({model:s,isChecked:a}),{inputId:f,isLabeledByFormItem:p}=dd(t,{formItemContext:n,disableIdGeneration:u,disableIdManagement:i}),{handleChange:m,onClickRoot:b}=Pde(t,{model:s,isLimitExceeded:o,hasOwnLabel:u,isDisabled:h,isLabeledByFormItem:p});return(()=>{function C(){var k,x;Le(s.value)&&!s.value.includes(d.value)?s.value.push(d.value):s.value=(x=(k=t.trueValue)!=null?k:t.trueLabel)!=null?x:!0}t.checked&&C()})(),sc({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},q(()=>i.value&&hg(t.value))),sc({from:"true-label",replacement:"true-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},q(()=>!!t.trueLabel)),sc({from:"false-label",replacement:"false-value",version:"3.0.0",scope:"el-checkbox",ref:"https://element-plus.org/en-US/component/checkbox.html"},q(()=>!!t.falseLabel)),{inputId:f,isLabeledByFormItem:p,isChecked:a,isDisabled:h,isFocused:r,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:u,model:s,actualValue:d,handleChange:m,onClickRoot:b}},Ode=se({name:"ElCheckbox"}),Dde=se({...Ode,props:KD,emits:ZD,setup(t){const e=t,n=Zi(),{inputId:s,isLabeledByFormItem:i,isChecked:o,isDisabled:r,isFocused:a,checkboxSize:l,hasOwnLabel:c,model:u,actualValue:d,handleChange:h,onClickRoot:f}=JD(e,n),p=He("checkbox"),m=q(()=>[p.b(),p.m(l.value),p.is("disabled",r.value),p.is("bordered",e.border),p.is("checked",o.value)]),b=q(()=>[p.e("input"),p.is("disabled",r.value),p.is("checked",o.value),p.is("indeterminate",e.indeterminate),p.is("focus",a.value)]);return(y,C)=>(v(),R(Tt(!A(c)&&A(i)?"span":"label"),{class:W(A(m)),"aria-controls":y.indeterminate?y.ariaControls:null,onClick:A(f)},{default:w(()=>{var k,x;return[g("span",{class:W(A(b))},[y.trueValue||y.falseValue||y.trueLabel||y.falseLabel?Pe((v(),$("input",{key:0,id:A(s),"onUpdate:modelValue":S=>hn(u)?u.value=S:null,class:W(A(p).e("original")),type:"checkbox",indeterminate:y.indeterminate,name:y.name,tabindex:y.tabindex,disabled:A(r),"true-value":(k=y.trueValue)!=null?k:y.trueLabel,"false-value":(x=y.falseValue)!=null?x:y.falseLabel,onChange:A(h),onFocus:S=>a.value=!0,onBlur:S=>a.value=!1,onClick:Be(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[Hu,A(u)]]):Pe((v(),$("input",{key:1,id:A(s),"onUpdate:modelValue":S=>hn(u)?u.value=S:null,class:W(A(p).e("original")),type:"checkbox",indeterminate:y.indeterminate,disabled:A(r),value:A(d),name:y.name,tabindex:y.tabindex,onChange:A(h),onFocus:S=>a.value=!0,onBlur:S=>a.value=!1,onClick:Be(()=>{},["stop"])},null,42,["id","onUpdate:modelValue","indeterminate","disabled","value","name","tabindex","onChange","onFocus","onBlur","onClick"])),[[Hu,A(u)]]),g("span",{class:W(A(p).e("inner"))},null,2)],2),A(c)?(v(),$("span",{key:0,class:W(A(p).e("label"))},[ae(y.$slots,"default"),y.$slots.default?O("v-if",!0):(v(),$(te,{key:0},[G(M(y.label),1)],64))],2)):O("v-if",!0)]}),_:3},8,["class","aria-controls","onClick"]))}});var Rde=Ye(Dde,[["__file","checkbox.vue"]]);const Vde=se({name:"ElCheckboxButton"}),Fde=se({...Vde,props:KD,emits:ZD,setup(t){const e=t,n=Zi(),{isFocused:s,isChecked:i,isDisabled:o,checkboxButtonSize:r,model:a,actualValue:l,handleChange:c}=JD(e,n),u=qe(Vf,void 0),d=He("checkbox"),h=q(()=>{var p,m,b,y;const C=(m=(p=u==null?void 0:u.fill)==null?void 0:p.value)!=null?m:"";return{backgroundColor:C,borderColor:C,color:(y=(b=u==null?void 0:u.textColor)==null?void 0:b.value)!=null?y:"",boxShadow:C?`-1px 0 0 0 ${C}`:void 0}}),f=q(()=>[d.b("button"),d.bm("button",r.value),d.is("disabled",o.value),d.is("checked",i.value),d.is("focus",s.value)]);return(p,m)=>{var b,y;return v(),$("label",{class:W(A(f))},[p.trueValue||p.falseValue||p.trueLabel||p.falseLabel?Pe((v(),$("input",{key:0,"onUpdate:modelValue":C=>hn(a)?a.value=C:null,class:W(A(d).be("button","original")),type:"checkbox",name:p.name,tabindex:p.tabindex,disabled:A(o),"true-value":(b=p.trueValue)!=null?b:p.trueLabel,"false-value":(y=p.falseValue)!=null?y:p.falseLabel,onChange:A(c),onFocus:C=>s.value=!0,onBlur:C=>s.value=!1,onClick:Be(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","true-value","false-value","onChange","onFocus","onBlur","onClick"])),[[Hu,A(a)]]):Pe((v(),$("input",{key:1,"onUpdate:modelValue":C=>hn(a)?a.value=C:null,class:W(A(d).be("button","original")),type:"checkbox",name:p.name,tabindex:p.tabindex,disabled:A(o),value:A(l),onChange:A(c),onFocus:C=>s.value=!0,onBlur:C=>s.value=!1,onClick:Be(()=>{},["stop"])},null,42,["onUpdate:modelValue","name","tabindex","disabled","value","onChange","onFocus","onBlur","onClick"])),[[Hu,A(a)]]),p.$slots.default||p.label?(v(),$("span",{key:2,class:W(A(d).be("button","inner")),style:Ke(A(i)?A(h):void 0)},[ae(p.$slots,"default",{},()=>[G(M(p.label),1)])],6)):O("v-if",!0)],2)}}});var QD=Ye(Fde,[["__file","checkbox-button.vue"]]);const Nde=Ze({modelValue:{type:xe(Array),default:()=>[]},disabled:Boolean,min:Number,max:Number,size:Ji,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},...ir(["ariaLabel"])}),Bde={[mn]:t=>Le(t),change:t=>Le(t)},zde=se({name:"ElCheckboxGroup"}),Hde=se({...zde,props:Nde,emits:Bde,setup(t,{emit:e}){const n=t,s=He("checkbox"),{formItem:i}=Br(),{inputId:o,isLabeledByFormItem:r}=dd(n,{formItemContext:i}),a=async c=>{e(mn,c),await dt(),e("change",c)},l=q({get(){return n.modelValue},set(c){a(c)}});return It(Vf,{...fO(yo(n),["size","min","max","disabled","validateEvent","fill","textColor"]),modelValue:l,changeEvent:a}),Te(()=>n.modelValue,()=>{n.validateEvent&&(i==null||i.validate("change").catch(c=>void 0))}),(c,u)=>{var d;return v(),R(Tt(c.tag),{id:A(o),class:W(A(s).b("group")),role:"group","aria-label":A(r)?void 0:c.ariaLabel||"checkbox-group","aria-labelledby":A(r)?(d=A(i))==null?void 0:d.labelId:void 0},{default:w(()=>[ae(c.$slots,"default")]),_:3},8,["id","class","aria-label","aria-labelledby"])}}});var eR=Ye(Hde,[["__file","checkbox-group.vue"]]);const Ht=jt(Rde,{CheckboxButton:QD,CheckboxGroup:eR});xs(QD);const tR=xs(eR),nR=Ze({modelValue:{type:[String,Number,Boolean],default:void 0},size:Ji,disabled:Boolean,label:{type:[String,Number,Boolean],default:void 0},value:{type:[String,Number,Boolean],default:void 0},name:{type:String,default:void 0}}),Ude=Ze({...nR,border:Boolean}),sR={[mn]:t=>nt(t)||xt(t)||li(t),[Lr]:t=>nt(t)||xt(t)||li(t)},iR=Symbol("radioGroupKey"),oR=(t,e)=>{const n=J(),s=qe(iR,void 0),i=q(()=>!!s),o=q(()=>hg(t.value)?t.label:t.value),r=q({get(){return i.value?s.modelValue:t.modelValue},set(d){i.value?s.changeEvent(d):e&&e(mn,d),n.value.checked=t.modelValue===o.value}}),a=Mi(q(()=>s==null?void 0:s.size)),l=Co(q(()=>s==null?void 0:s.disabled)),c=J(!1),u=q(()=>l.value||i.value&&r.value!==o.value?-1:0);return sc({from:"label act as value",replacement:"value",version:"3.0.0",scope:"el-radio",ref:"https://element-plus.org/en-US/component/radio.html"},q(()=>i.value&&hg(t.value))),{radioRef:n,isGroup:i,radioGroup:s,focus:c,size:a,disabled:l,tabIndex:u,modelValue:r,actualValue:o}},jde=se({name:"ElRadio"}),Wde=se({...jde,props:Ude,emits:sR,setup(t,{emit:e}){const n=t,s=He("radio"),{radioRef:i,radioGroup:o,focus:r,size:a,disabled:l,modelValue:c,actualValue:u}=oR(n,e);function d(){dt(()=>e("change",c.value))}return(h,f)=>{var p;return v(),$("label",{class:W([A(s).b(),A(s).is("disabled",A(l)),A(s).is("focus",A(r)),A(s).is("bordered",h.border),A(s).is("checked",A(c)===A(u)),A(s).m(A(a))])},[g("span",{class:W([A(s).e("input"),A(s).is("disabled",A(l)),A(s).is("checked",A(c)===A(u))])},[Pe(g("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":m=>hn(c)?c.value=m:null,class:W(A(s).e("original")),value:A(u),name:h.name||((p=A(o))==null?void 0:p.name),disabled:A(l),checked:A(c)===A(u),type:"radio",onFocus:m=>r.value=!0,onBlur:m=>r.value=!1,onChange:d,onClick:Be(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","checked","onFocus","onBlur","onClick"]),[[Ug,A(c)]]),g("span",{class:W(A(s).e("inner"))},null,2)],2),g("span",{class:W(A(s).e("label")),onKeydown:Be(()=>{},["stop"])},[ae(h.$slots,"default",{},()=>[G(M(h.label),1)])],42,["onKeydown"])],2)}}});var Yde=Ye(Wde,[["__file","radio.vue"]]);const Gde=Ze({...nR}),qde=se({name:"ElRadioButton"}),Xde=se({...qde,props:Gde,setup(t){const e=t,n=He("radio"),{radioRef:s,focus:i,size:o,disabled:r,modelValue:a,radioGroup:l,actualValue:c}=oR(e),u=q(()=>({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(),$("label",{class:W([A(n).b("button"),A(n).is("active",A(a)===A(c)),A(n).is("disabled",A(r)),A(n).is("focus",A(i)),A(n).bm("button",A(o))])},[Pe(g("input",{ref_key:"radioRef",ref:s,"onUpdate:modelValue":p=>hn(a)?a.value=p:null,class:W(A(n).be("button","original-radio")),value:A(c),type:"radio",name:d.name||((f=A(l))==null?void 0:f.name),disabled:A(r),onFocus:p=>i.value=!0,onBlur:p=>i.value=!1,onClick:Be(()=>{},["stop"])},null,42,["onUpdate:modelValue","value","name","disabled","onFocus","onBlur","onClick"]),[[Ug,A(a)]]),g("span",{class:W(A(n).be("button","inner")),style:Ke(A(a)===A(c)?A(u):{}),onKeydown:Be(()=>{},["stop"])},[ae(d.$slots,"default",{},()=>[G(M(d.label),1)])],46,["onKeydown"])],2)}}});var rR=Ye(Xde,[["__file","radio-button.vue"]]);const Kde=Ze({id:{type:String,default:void 0},size:Ji,disabled:Boolean,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},...ir(["ariaLabel"])}),Zde=sR,Jde=se({name:"ElRadioGroup"}),Qde=se({...Jde,props:Kde,emits:Zde,setup(t,{emit:e}){const n=t,s=He("radio"),i=tr(),o=J(),{formItem:r}=Br(),{inputId:a,isLabeledByFormItem:l}=dd(n,{formItemContext:r}),c=d=>{e(mn,d),dt(()=>e("change",d))};Pt(()=>{const d=o.value.querySelectorAll("[type=radio]"),h=d[0];!Array.from(d).some(f=>f.checked)&&h&&(h.tabIndex=0)});const u=q(()=>n.name||i.value);return It(iR,as({...yo(n),changeEvent:c,name:u})),Te(()=>n.modelValue,()=>{n.validateEvent&&(r==null||r.validate("change").catch(d=>void 0))}),(d,h)=>(v(),$("div",{id:A(a),ref_key:"radioGroupRef",ref:o,class:W(A(s).b("group")),role:"radiogroup","aria-label":A(l)?void 0:d.ariaLabel||"radio-group","aria-labelledby":A(l)?A(r).labelId:void 0},[ae(d.$slots,"default")],10,["id","aria-label","aria-labelledby"]))}});var aR=Ye(Qde,[["__file","radio-group.vue"]]);const ko=jt(Yde,{RadioButton:rR,RadioGroup:aR}),Ps=xs(aR),Ff=xs(rR),x6=Ze({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:Ac},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),ehe={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},the=se({name:"ElTag"}),nhe=se({...the,props:x6,emits:ehe,setup(t,{emit:e}){const n=t,s=Mi(),i=He("tag"),o=q(()=>{const{type:c,hit:u,effect:d,closable:h,round:f}=n;return[i.b(),i.is("closable",h),i.m(c||"primary"),i.m(s.value),i.m(d),i.is("hit",u),i.is("round",f)]}),r=c=>{e("close",c)},a=c=>{e("click",c)},l=c=>{c.component.subTree.component.bum=null};return(c,u)=>c.disableTransitions?(v(),$("span",{key:0,class:W(A(o)),style:Ke({backgroundColor:c.color}),onClick:a},[g("span",{class:W(A(i).e("content"))},[ae(c.$slots,"default")],2),c.closable?(v(),R(A(ye),{key:0,class:W(A(i).e("close")),onClick:Be(r,["stop"])},{default:w(()=>[_(A(Ir))]),_:1},8,["class","onClick"])):O("v-if",!0)],6)):(v(),R(bo,{key:1,name:`${A(i).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:l},{default:w(()=>[g("span",{class:W(A(o)),style:Ke({backgroundColor:c.color}),onClick:a},[g("span",{class:W(A(i).e("content"))},[ae(c.$slots,"default")],2),c.closable?(v(),R(A(ye),{key:0,class:W(A(i).e("close")),onClick:Be(r,["stop"])},{default:w(()=>[_(A(Ir))]),_:1},8,["class","onClick"])):O("v-if",!0)],6)]),_:3},8,["name"]))}});var she=Ye(nhe,[["__file","tag.vue"]]);const xo=jt(she),lR=Symbol("rowContextKey"),ihe=["start","center","end","space-around","space-between","space-evenly"],ohe=["top","middle","bottom"],rhe=Ze({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:ihe,default:"start"},align:{type:String,values:ohe}}),ahe=se({name:"ElRow"}),lhe=se({...ahe,props:rhe,setup(t){const e=t,n=He("row"),s=q(()=>e.gutter);It(lR,{gutter:s});const i=q(()=>{const r={};return e.gutter&&(r.marginRight=r.marginLeft=`-${e.gutter/2}px`),r}),o=q(()=>[n.b(),n.is(`justify-${e.justify}`,e.justify!=="start"),n.is(`align-${e.align}`,!!e.align)]);return(r,a)=>(v(),R(Tt(r.tag),{class:W(A(o)),style:Ke(A(i))},{default:w(()=>[ae(r.$slots,"default")]),_:3},8,["class","style"]))}});var che=Ye(lhe,[["__file","row.vue"]]);const hd=jt(che),uhe=Ze({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:xe([Number,Object]),default:()=>si({})},sm:{type:xe([Number,Object]),default:()=>si({})},md:{type:xe([Number,Object]),default:()=>si({})},lg:{type:xe([Number,Object]),default:()=>si({})},xl:{type:xe([Number,Object]),default:()=>si({})}}),dhe=se({name:"ElCol"}),hhe=se({...dhe,props:uhe,setup(t){const e=t,{gutter:n}=qe(lR,{gutter:q(()=>0)}),s=He("col"),i=q(()=>{const r={};return n.value&&(r.paddingLeft=r.paddingRight=`${n.value/2}px`),r}),o=q(()=>{const r=[];return["span","offset","pull","push"].forEach(c=>{const u=e[c];xt(u)&&(c==="span"?r.push(s.b(`${e[c]}`)):u>0&&r.push(s.b(`${c}-${e[c]}`)))}),["xs","sm","md","lg","xl"].forEach(c=>{xt(e[c])?r.push(s.b(`${c}-${e[c]}`)):Ct(e[c])&&Object.entries(e[c]).forEach(([u,d])=>{r.push(u!=="span"?s.b(`${c}-${u}-${d}`):s.b(`${c}-${d}`))})}),n.value&&r.push(s.is("guttered")),[s.b(),r]});return(r,a)=>(v(),R(Tt(r.tag),{class:W(A(o)),style:Ke(A(i))},{default:w(()=>[ae(r.$slots,"default")]),_:3},8,["class","style"]))}});var fhe=Ye(hhe,[["__file","col.vue"]]);const fd=jt(fhe),b$=t=>xt(t)||nt(t)||Le(t),phe=Ze({accordion:Boolean,modelValue:{type:xe([Array,String,Number]),default:()=>si([])}}),mhe={[mn]:b$,[Lr]:b$},cR=Symbol("collapseContextKey"),ghe=(t,e)=>{const n=J(Hi(t.modelValue)),s=o=>{n.value=o;const r=t.accordion?n.value[0]:n.value;e(mn,r),e(Lr,r)},i=o=>{if(t.accordion)s([n.value[0]===o?"":o]);else{const r=[...n.value],a=r.indexOf(o);a>-1?r.splice(a,1):r.push(o),s(r)}};return Te(()=>t.modelValue,()=>n.value=Hi(t.modelValue),{deep:!0}),It(cR,{activeNames:n,handleItemClick:i}),{activeNames:n,setActiveNames:s}},vhe=()=>{const t=He("collapse");return{rootKls:q(()=>t.b())}},_he=se({name:"ElCollapse"}),yhe=se({..._he,props:phe,emits:mhe,setup(t,{expose:e,emit:n}){const s=t,{activeNames:i,setActiveNames:o}=ghe(s,n),{rootKls:r}=vhe();return e({activeNames:i,setActiveNames:o}),(a,l)=>(v(),$("div",{class:W(A(r))},[ae(a.$slots,"default")],2))}});var bhe=Ye(yhe,[["__file","collapse.vue"]]);const whe=se({name:"ElCollapseTransition"}),Che=se({...whe,setup(t){const e=He("collapse-transition"),n=i=>{i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom},s={beforeEnter(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.style.height&&(i.dataset.elExistsHeight=i.style.height),i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0},enter(i){requestAnimationFrame(()=>{i.dataset.oldOverflow=i.style.overflow,i.dataset.elExistsHeight?i.style.maxHeight=i.dataset.elExistsHeight:i.scrollHeight!==0?i.style.maxHeight=`${i.scrollHeight}px`:i.style.maxHeight=0,i.style.paddingTop=i.dataset.oldPaddingTop,i.style.paddingBottom=i.dataset.oldPaddingBottom,i.style.overflow="hidden"})},afterEnter(i){i.style.maxHeight="",i.style.overflow=i.dataset.oldOverflow},enterCancelled(i){n(i)},beforeLeave(i){i.dataset||(i.dataset={}),i.dataset.oldPaddingTop=i.style.paddingTop,i.dataset.oldPaddingBottom=i.style.paddingBottom,i.dataset.oldOverflow=i.style.overflow,i.style.maxHeight=`${i.scrollHeight}px`,i.style.overflow="hidden"},leave(i){i.scrollHeight!==0&&(i.style.maxHeight=0,i.style.paddingTop=0,i.style.paddingBottom=0)},afterLeave(i){n(i)},leaveCancelled(i){n(i)}};return(i,o)=>(v(),R(bo,Mn({name:A(e).b()},$P(s)),{default:w(()=>[ae(i.$slots,"default")]),_:3},16,["name"]))}});var khe=Ye(Che,[["__file","collapse-transition.vue"]]);const xhe=jt(khe),She=Ze({title:{type:String,default:""},name:{type:xe([String,Number]),default:void 0},disabled:Boolean}),$he=t=>{const e=qe(cR),{namespace:n}=He("collapse"),s=J(!1),i=J(!1),o=Kx(),r=q(()=>o.current++),a=q(()=>{var h;return(h=t.name)!=null?h:`${n.value}-id-${o.prefix}-${A(r)}`}),l=q(()=>e==null?void 0:e.activeNames.value.includes(A(a)));return{focusing:s,id:r,isActive:l,handleFocus:()=>{setTimeout(()=>{i.value?i.value=!1:s.value=!0},50)},handleHeaderClick:()=>{t.disabled||(e==null||e.handleItemClick(A(a)),s.value=!1,i.value=!0)},handleEnterClick:()=>{e==null||e.handleItemClick(A(a))}}},Ahe=(t,{focusing:e,isActive:n,id:s})=>{const i=He("collapse"),o=q(()=>[i.b("item"),i.is("active",A(n)),i.is("disabled",t.disabled)]),r=q(()=>[i.be("item","header"),i.is("active",A(n)),{focusing:A(e)&&!t.disabled}]),a=q(()=>[i.be("item","arrow"),i.is("active",A(n))]),l=q(()=>i.be("item","wrap")),c=q(()=>i.be("item","content")),u=q(()=>i.b(`content-${A(s)}`)),d=q(()=>i.b(`head-${A(s)}`));return{arrowKls:a,headKls:r,rootKls:o,itemWrapperKls:l,itemContentKls:c,scopedContentId:u,scopedHeadId:d}},Mhe=se({name:"ElCollapseItem"}),Ehe=se({...Mhe,props:She,setup(t,{expose:e}){const n=t,{focusing:s,id:i,isActive:o,handleFocus:r,handleHeaderClick:a,handleEnterClick:l}=$he(n),{arrowKls:c,headKls:u,rootKls:d,itemWrapperKls:h,itemContentKls:f,scopedContentId:p,scopedHeadId:m}=Ahe(n,{focusing:s,isActive:o,id:i});return e({isActive:o}),(b,y)=>(v(),$("div",{class:W(A(d))},[g("button",{id:A(m),class:W(A(u)),"aria-expanded":A(o),"aria-controls":A(p),"aria-describedby":A(p),tabindex:b.disabled?-1:0,type:"button",onClick:A(a),onKeydown:$t(Be(A(l),["stop","prevent"]),["space","enter"]),onFocus:A(r),onBlur:C=>s.value=!1},[ae(b.$slots,"title",{},()=>[G(M(b.title),1)]),_(A(ye),{class:W(A(c))},{default:w(()=>[_(A(kr))]),_:1},8,["class"])],42,["id","aria-expanded","aria-controls","aria-describedby","tabindex","onClick","onKeydown","onFocus","onBlur"]),_(A(xhe),null,{default:w(()=>[Pe(g("div",{id:A(p),role:"region",class:W(A(h)),"aria-hidden":!A(o),"aria-labelledby":A(m)},[g("div",{class:W(A(f))},[ae(b.$slots,"default")],2)],10,["id","aria-hidden","aria-labelledby"]),[[Xt,A(o)]])]),_:3})],2))}});var uR=Ye(Ehe,[["__file","collapse-item.vue"]]);const The=jt(bhe,{CollapseItem:uR}),Phe=xs(uR),Ihe=Ze({color:{type:xe(Object),required:!0},vertical:{type:Boolean,default:!1}});let j2=!1;function yg(t,e){if(!Ut)return;const n=function(o){var r;(r=e.drag)==null||r.call(e,o)},s=function(o){var r;document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",s),document.removeEventListener("touchmove",n),document.removeEventListener("touchend",s),document.onselectstart=null,document.ondragstart=null,j2=!1,(r=e.end)==null||r.call(e,o)},i=function(o){var r;j2||(o.preventDefault(),document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",s),document.addEventListener("touchmove",n),document.addEventListener("touchend",s),j2=!0,(r=e.start)==null||r.call(e,o))};t.addEventListener("mousedown",i),t.addEventListener("touchstart",i,{passive:!1})}const Lhe=t=>{const e=pt(),{t:n}=fn(),s=ss(),i=ss(),o=q(()=>t.color.get("alpha")),r=q(()=>n("el.colorpicker.alphaLabel"));function a(d){var h;d.target!==s.value&&l(d),(h=s.value)==null||h.focus()}function l(d){if(!i.value||!s.value)return;const f=e.vnode.el.getBoundingClientRect(),{clientX:p,clientY:m}=px(d);if(t.vertical){let b=m-f.top;b=Math.max(s.value.offsetHeight/2,b),b=Math.min(b,f.height-s.value.offsetHeight/2),t.color.set("alpha",Math.round((b-s.value.offsetHeight/2)/(f.height-s.value.offsetHeight)*100))}else{let b=p-f.left;b=Math.max(s.value.offsetWidth/2,b),b=Math.min(b,f.width-s.value.offsetWidth/2),t.color.set("alpha",Math.round((b-s.value.offsetWidth/2)/(f.width-s.value.offsetWidth)*100))}}function c(d){const{code:h,shiftKey:f}=d,p=f?10:1;switch(h){case ft.left:case ft.down:d.preventDefault(),d.stopPropagation(),u(-p);break;case ft.right:case ft.up:d.preventDefault(),d.stopPropagation(),u(p);break}}function u(d){let h=o.value+d;h=h<0?0:h>100?100:h,t.color.set("alpha",h)}return{thumb:s,bar:i,alpha:o,alphaLabel:r,handleDrag:l,handleClick:a,handleKeydown:c}},Ohe=(t,{bar:e,thumb:n,handleDrag:s})=>{const i=pt(),o=He("color-alpha-slider"),r=J(0),a=J(0),l=J();function c(){if(!n.value||t.vertical)return 0;const C=i.vnode.el,k=t.color.get("alpha");return C?Math.round(k*(C.offsetWidth-n.value.offsetWidth/2)/100):0}function u(){if(!n.value)return 0;const C=i.vnode.el;if(!t.vertical)return 0;const k=t.color.get("alpha");return C?Math.round(k*(C.offsetHeight-n.value.offsetHeight/2)/100):0}function d(){if(t.color&&t.color.value){const{r:C,g:k,b:x}=t.color.toRgb();return`linear-gradient(to right, rgba(${C}, ${k}, ${x}, 0) 0%, rgba(${C}, ${k}, ${x}, 1) 100%)`}return""}function h(){r.value=c(),a.value=u(),l.value=d()}Pt(()=>{if(!e.value||!n.value)return;const C={drag:k=>{s(k)},end:k=>{s(k)}};yg(e.value,C),yg(n.value,C),h()}),Te(()=>t.color.get("alpha"),()=>h()),Te(()=>t.color.value,()=>h());const f=q(()=>[o.b(),o.is("vertical",t.vertical)]),p=q(()=>o.e("bar")),m=q(()=>o.e("thumb")),b=q(()=>({background:l.value})),y=q(()=>({left:Ai(r.value),top:Ai(a.value)}));return{rootKls:f,barKls:p,barStyle:b,thumbKls:m,thumbStyle:y,update:h}},Dhe="ElColorAlphaSlider",Rhe=se({name:Dhe}),Vhe=se({...Rhe,props:Ihe,setup(t,{expose:e}){const n=t,{alpha:s,alphaLabel:i,bar:o,thumb:r,handleDrag:a,handleClick:l,handleKeydown:c}=Lhe(n),{rootKls:u,barKls:d,barStyle:h,thumbKls:f,thumbStyle:p,update:m}=Ohe(n,{bar:o,thumb:r,handleDrag:a});return e({update:m,bar:o,thumb:r}),(b,y)=>(v(),$("div",{class:W(A(u))},[g("div",{ref_key:"bar",ref:o,class:W(A(d)),style:Ke(A(h)),onClick:A(l)},null,14,["onClick"]),g("div",{ref_key:"thumb",ref:r,class:W(A(f)),style:Ke(A(p)),"aria-label":A(i),"aria-valuenow":A(s),"aria-orientation":b.vertical?"vertical":"horizontal","aria-valuemin":"0","aria-valuemax":"100",role:"slider",tabindex:"0",onKeydown:A(c)},null,46,["aria-label","aria-valuenow","aria-orientation","onKeydown"])],2))}});var Fhe=Ye(Vhe,[["__file","alpha-slider.vue"]]);const Nhe=se({name:"ElColorHueSlider",props:{color:{type:Object,required:!0},vertical:Boolean},setup(t){const e=He("color-hue-slider"),n=pt(),s=J(),i=J(),o=J(0),r=J(0),a=q(()=>t.color.get("hue"));Te(()=>a.value,()=>{h()});function l(f){f.target!==s.value&&c(f)}function c(f){if(!i.value||!s.value)return;const m=n.vnode.el.getBoundingClientRect(),{clientX:b,clientY:y}=px(f);let C;if(t.vertical){let k=y-m.top;k=Math.min(k,m.height-s.value.offsetHeight/2),k=Math.max(s.value.offsetHeight/2,k),C=Math.round((k-s.value.offsetHeight/2)/(m.height-s.value.offsetHeight)*360)}else{let k=b-m.left;k=Math.min(k,m.width-s.value.offsetWidth/2),k=Math.max(s.value.offsetWidth/2,k),C=Math.round((k-s.value.offsetWidth/2)/(m.width-s.value.offsetWidth)*360)}t.color.set("hue",C)}function u(){if(!s.value)return 0;const f=n.vnode.el;if(t.vertical)return 0;const p=t.color.get("hue");return f?Math.round(p*(f.offsetWidth-s.value.offsetWidth/2)/360):0}function d(){if(!s.value)return 0;const f=n.vnode.el;if(!t.vertical)return 0;const p=t.color.get("hue");return f?Math.round(p*(f.offsetHeight-s.value.offsetHeight/2)/360):0}function h(){o.value=u(),r.value=d()}return Pt(()=>{if(!i.value||!s.value)return;const f={drag:p=>{c(p)},end:p=>{c(p)}};yg(i.value,f),yg(s.value,f),h()}),{bar:i,thumb:s,thumbLeft:o,thumbTop:r,hueValue:a,handleClick:l,update:h,ns:e}}});function Bhe(t,e,n,s,i,o){return v(),$("div",{class:W([t.ns.b(),t.ns.is("vertical",t.vertical)])},[g("div",{ref:"bar",class:W(t.ns.e("bar")),onClick:t.handleClick},null,10,["onClick"]),g("div",{ref:"thumb",class:W(t.ns.e("thumb")),style:Ke({left:t.thumbLeft+"px",top:t.thumbTop+"px"})},null,6)],2)}var zhe=Ye(Nhe,[["render",Bhe],["__file","hue-slider.vue"]]);const Hhe=Ze({modelValue:String,id:String,showAlpha:Boolean,colorFormat:String,disabled:Boolean,size:Ji,popperClass:{type:String,default:""},tabindex:{type:[String,Number],default:0},teleported:Bi.teleported,predefine:{type:xe(Array)},validateEvent:{type:Boolean,default:!0},...ir(["ariaLabel"])}),Uhe={[mn]:t=>nt(t)||xi(t),[Lr]:t=>nt(t)||xi(t),activeChange:t=>nt(t)||xi(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent},dR=Symbol("colorPickerContextKey"),w$=function(t,e,n){return[t,e*n/((t=(2-e)*n)<1?t:2-t)||0,t/2]},jhe=function(t){return typeof t=="string"&&t.includes(".")&&Number.parseFloat(t)===1},Whe=function(t){return typeof t=="string"&&t.includes("%")},Ph=function(t,e){jhe(t)&&(t="100%");const n=Whe(t);return t=Math.min(e,Math.max(0,Number.parseFloat(`${t}`))),n&&(t=Number.parseInt(`${t*e}`,10)/100),Math.abs(t-e)<1e-6?1:t%e/Number.parseFloat(e)},C$={10:"A",11:"B",12:"C",13:"D",14:"E",15:"F"},J0=t=>{t=Math.min(Math.round(t),255);const e=Math.floor(t/16),n=t%16;return`${C$[e]||e}${C$[n]||n}`},k$=function({r:t,g:e,b:n}){return Number.isNaN(+t)||Number.isNaN(+e)||Number.isNaN(+n)?"":`#${J0(t)}${J0(e)}${J0(n)}`},W2={A:10,B:11,C:12,D:13,E:14,F:15},Hc=function(t){return t.length===2?(W2[t[0].toUpperCase()]||+t[0])*16+(W2[t[1].toUpperCase()]||+t[1]):W2[t[1].toUpperCase()]||+t[1]},Yhe=function(t,e,n){e=e/100,n=n/100;let s=e;const i=Math.max(n,.01);n*=2,e*=n<=1?n:2-n,s*=i<=1?i:2-i;const o=(n+e)/2,r=n===0?2*s/(i+s):2*e/(n+e);return{h:t,s:r*100,v:o*100}},x$=(t,e,n)=>{t=Ph(t,255),e=Ph(e,255),n=Ph(n,255);const s=Math.max(t,e,n),i=Math.min(t,e,n);let o;const r=s,a=s-i,l=s===0?0:a/s;if(s===i)o=0;else{switch(s){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*360,s:l*100,v:r*100}},mp=function(t,e,n){t=Ph(t,360)*6,e=Ph(e,100),n=Ph(n,100);const s=Math.floor(t),i=t-s,o=n*(1-e),r=n*(1-i*e),a=n*(1-(1-i)*e),l=s%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:Math.round(c*255),g:Math.round(u*255),b:Math.round(d*255)}};class wm{constructor(e={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this.enableAlpha=!1,this.format="hex",this.value="";for(const n in e)Rt(e,n)&&(this[n]=e[n]);e.value?this.fromString(e.value):this.doOnChange()}set(e,n){if(arguments.length===1&&typeof e=="object"){for(const s in e)Rt(e,s)&&this.set(s,e[s]);return}this[`_${e}`]=n,this.doOnChange()}get(e){return e==="alpha"?Math.floor(this[`_${e}`]):this[`_${e}`]}toRgb(){return mp(this._hue,this._saturation,this._value)}fromString(e){if(!e){this._hue=0,this._saturation=100,this._value=100,this.doOnChange();return}const n=(s,i,o)=>{this._hue=Math.max(0,Math.min(360,s)),this._saturation=Math.max(0,Math.min(100,i)),this._value=Math.max(0,Math.min(100,o)),this.doOnChange()};if(e.includes("hsl")){const s=e.replace(/hsla|hsl|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));if(s.length===4?this._alpha=Number.parseFloat(s[3])*100:s.length===3&&(this._alpha=100),s.length>=3){const{h:i,s:o,v:r}=Yhe(s[0],s[1],s[2]);n(i,o,r)}}else if(e.includes("hsv")){const s=e.replace(/hsva|hsv|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));s.length===4?this._alpha=Number.parseFloat(s[3])*100:s.length===3&&(this._alpha=100),s.length>=3&&n(s[0],s[1],s[2])}else if(e.includes("rgb")){const s=e.replace(/rgba|rgb|\(|\)/gm,"").split(/\s|,/g).filter(i=>i!=="").map((i,o)=>o>2?Number.parseFloat(i):Number.parseInt(i,10));if(s.length===4?this._alpha=Number.parseFloat(s[3])*100:s.length===3&&(this._alpha=100),s.length>=3){const{h:i,s:o,v:r}=x$(s[0],s[1],s[2]);n(i,o,r)}}else if(e.includes("#")){const s=e.replace("#","").trim();if(!/^[0-9a-fA-F]{3}$|^[0-9a-fA-F]{6}$|^[0-9a-fA-F]{8}$/.test(s))return;let i,o,r;s.length===3?(i=Hc(s[0]+s[0]),o=Hc(s[1]+s[1]),r=Hc(s[2]+s[2])):(s.length===6||s.length===8)&&(i=Hc(s.slice(0,2)),o=Hc(s.slice(2,4)),r=Hc(s.slice(4,6))),s.length===8?this._alpha=Hc(s.slice(6))/255*100:(s.length===3||s.length===6)&&(this._alpha=100);const{h:a,s:l,v:c}=x$(i,o,r);n(a,l,c)}}compare(e){return Math.abs(e._hue-this._hue)<2&&Math.abs(e._saturation-this._saturation)<1&&Math.abs(e._value-this._value)<1&&Math.abs(e._alpha-this._alpha)<1}doOnChange(){const{_hue:e,_saturation:n,_value:s,_alpha:i,format:o}=this;if(this.enableAlpha)switch(o){case"hsl":{const r=w$(e,n/100,s/100);this.value=`hsla(${e}, ${Math.round(r[1]*100)}%, ${Math.round(r[2]*100)}%, ${this.get("alpha")/100})`;break}case"hsv":{this.value=`hsva(${e}, ${Math.round(n)}%, ${Math.round(s)}%, ${this.get("alpha")/100})`;break}case"hex":{this.value=`${k$(mp(e,n,s))}${J0(i*255/100)}`;break}default:{const{r,g:a,b:l}=mp(e,n,s);this.value=`rgba(${r}, ${a}, ${l}, ${this.get("alpha")/100})`}}else switch(o){case"hsl":{const r=w$(e,n/100,s/100);this.value=`hsl(${e}, ${Math.round(r[1]*100)}%, ${Math.round(r[2]*100)}%)`;break}case"hsv":{this.value=`hsv(${e}, ${Math.round(n)}%, ${Math.round(s)}%)`;break}case"rgb":{const{r,g:a,b:l}=mp(e,n,s);this.value=`rgb(${r}, ${a}, ${l})`;break}default:this.value=k$(mp(e,n,s))}}}const Ghe=se({props:{colors:{type:Array,required:!0},color:{type:Object,required:!0},enableAlpha:{type:Boolean,required:!0}},setup(t){const e=He("color-predefine"),{currentColor:n}=qe(dR),s=J(o(t.colors,t.color));Te(()=>n.value,r=>{const a=new wm;a.fromString(r),s.value.forEach(l=>{l.selected=a.compare(l)})}),br(()=>{s.value=o(t.colors,t.color)});function i(r){t.color.fromString(t.colors[r])}function o(r,a){return r.map(l=>{const c=new wm;return c.enableAlpha=t.enableAlpha,c.format="rgba",c.fromString(l),c.selected=c.value===a.value,c})}return{rgbaColors:s,handleSelect:i,ns:e}}});function qhe(t,e,n,s,i,o){return v(),$("div",{class:W(t.ns.b())},[g("div",{class:W(t.ns.e("colors"))},[(v(!0),$(te,null,be(t.rgbaColors,(r,a)=>(v(),$("div",{key:t.colors[a],class:W([t.ns.e("color-selector"),t.ns.is("alpha",r._alpha<100),{selected:r.selected}]),onClick:l=>t.handleSelect(a)},[g("div",{style:Ke({backgroundColor:r.value})},null,4)],10,["onClick"]))),128))],2)],2)}var Xhe=Ye(Ghe,[["render",qhe],["__file","predefine.vue"]]);const Khe=se({name:"ElSlPanel",props:{color:{type:Object,required:!0}},setup(t){const e=He("color-svpanel"),n=pt(),s=J(0),i=J(0),o=J("hsl(0, 100%, 50%)"),r=q(()=>{const c=t.color.get("hue"),u=t.color.get("value");return{hue:c,value:u}});function a(){const c=t.color.get("saturation"),u=t.color.get("value"),d=n.vnode.el,{clientWidth:h,clientHeight:f}=d;i.value=c*h/100,s.value=(100-u)*f/100,o.value=`hsl(${t.color.get("hue")}, 100%, 50%)`}function l(c){const d=n.vnode.el.getBoundingClientRect(),{clientX:h,clientY:f}=px(c);let p=h-d.left,m=f-d.top;p=Math.max(0,p),p=Math.min(p,d.width),m=Math.max(0,m),m=Math.min(m,d.height),i.value=p,s.value=m,t.color.set({saturation:p/d.width*100,value:100-m/d.height*100})}return Te(()=>r.value,()=>{a()}),Pt(()=>{yg(n.vnode.el,{drag:c=>{l(c)},end:c=>{l(c)}}),a()}),{cursorTop:s,cursorLeft:i,background:o,colorValue:r,handleDrag:l,update:a,ns:e}}});function Zhe(t,e,n,s,i,o){return v(),$("div",{class:W(t.ns.b()),style:Ke({backgroundColor:t.background})},[g("div",{class:W(t.ns.e("white"))},null,2),g("div",{class:W(t.ns.e("black"))},null,2),g("div",{class:W(t.ns.e("cursor")),style:Ke({top:t.cursorTop+"px",left:t.cursorLeft+"px"})},[g("div")],6)],6)}var Jhe=Ye(Khe,[["render",Zhe],["__file","sv-panel.vue"]]);const Qhe=se({name:"ElColorPicker"}),efe=se({...Qhe,props:Hhe,emits:Uhe,setup(t,{expose:e,emit:n}){const s=t,{t:i}=fn(),o=He("color"),{formItem:r}=Br(),a=Mi(),l=Co(),{inputId:c,isLabeledByFormItem:u}=dd(s,{formItemContext:r}),d=J(),h=J(),f=J(),p=J(),m=J(),b=J(),{isFocused:y,handleFocus:C,handleBlur:k}=e4(m,{beforeFocus(){return l.value},beforeBlur(re){var ge;return(ge=p.value)==null?void 0:ge.isFocusInsideContent(re)},afterBlur(){B(!1),N()}});let x=!0;const S=as(new wm({enableAlpha:s.showAlpha,format:s.colorFormat||"",value:s.modelValue})),E=J(!1),T=J(!1),P=J(""),I=q(()=>!s.modelValue&&!T.value?"transparent":Y(S,s.showAlpha)),L=q(()=>!s.modelValue&&!T.value?"":S.value),V=q(()=>u.value?void 0:s.ariaLabel||i("el.colorpicker.defaultLabel")),D=q(()=>u.value?r==null?void 0:r.labelId:void 0),z=q(()=>[o.b("picker"),o.is("disabled",l.value),o.bm("picker",a.value),o.is("focused",y.value)]);function Y(re,ge){if(!(re instanceof wm))throw new TypeError("color should be instance of _color Class");const{r:ze,g:st,b:ee}=re.toRgb();return ge?`rgba(${ze}, ${st}, ${ee}, ${re.get("alpha")/100})`:`rgb(${ze}, ${st}, ${ee})`}function B(re){E.value=re}const U=pc(B,100,{leading:!0});function X(){l.value||B(!0)}function K(){U(!1),N()}function N(){dt(()=>{s.modelValue?S.fromString(s.modelValue):(S.value="",dt(()=>{T.value=!1}))})}function F(){l.value||U(!E.value)}function Q(){S.fromString(P.value)}function ie(){const re=S.value;n(mn,re),n("change",re),s.validateEvent&&(r==null||r.validate("change").catch(ge=>void 0)),U(!1),dt(()=>{const ge=new wm({enableAlpha:s.showAlpha,format:s.colorFormat||"",value:s.modelValue});S.compare(ge)||N()})}function Z(){U(!1),n(mn,null),n("change",null),s.modelValue!==null&&s.validateEvent&&(r==null||r.validate("change").catch(re=>void 0)),N()}function me(){E.value&&(K(),y.value&&oe())}function Se(re){re.preventDefault(),re.stopPropagation(),B(!1),N()}function we(re){switch(re.code){case ft.enter:case ft.space:re.preventDefault(),re.stopPropagation(),X(),b.value.focus();break;case ft.esc:Se(re);break}}function oe(){m.value.focus()}function ce(){m.value.blur()}return Pt(()=>{s.modelValue&&(P.value=L.value)}),Te(()=>s.modelValue,re=>{re?re&&re!==S.value&&(x=!1,S.fromString(re)):T.value=!1}),Te(()=>L.value,re=>{P.value=re,x&&n("activeChange",re),x=!0}),Te(()=>S.value,()=>{!s.modelValue&&!T.value&&(T.value=!0)}),Te(()=>E.value,()=>{dt(()=>{var re,ge,ze;(re=d.value)==null||re.update(),(ge=h.value)==null||ge.update(),(ze=f.value)==null||ze.update()})}),It(dR,{currentColor:L}),e({color:S,show:X,hide:K,focus:oe,blur:ce}),(re,ge)=>(v(),R(A(di),{ref_key:"popper",ref:p,visible:E.value,"show-arrow":!1,"fallback-placements":["bottom","top","right","left"],offset:0,"gpu-acceleration":!1,"popper-class":[A(o).be("picker","panel"),A(o).b("dropdown"),re.popperClass],"stop-popper-mouse-event":!1,effect:"light",trigger:"click",teleported:re.teleported,transition:`${A(o).namespace.value}-zoom-in-top`,persistent:"",onHide:ze=>B(!1)},{content:w(()=>[Pe((v(),$("div",{onKeydown:$t(Se,["esc"])},[g("div",{class:W(A(o).be("dropdown","main-wrapper"))},[_(zhe,{ref_key:"hue",ref:d,class:"hue-slider",color:A(S),vertical:""},null,8,["color"]),_(Jhe,{ref_key:"sv",ref:h,color:A(S)},null,8,["color"])],2),re.showAlpha?(v(),R(Fhe,{key:0,ref_key:"alpha",ref:f,color:A(S)},null,8,["color"])):O("v-if",!0),re.predefine?(v(),R(Xhe,{key:1,ref:"predefine","enable-alpha":re.showAlpha,color:A(S),colors:re.predefine},null,8,["enable-alpha","color","colors"])):O("v-if",!0),g("div",{class:W(A(o).be("dropdown","btns"))},[g("span",{class:W(A(o).be("dropdown","value"))},[_(A(vt),{ref_key:"inputRef",ref:b,modelValue:P.value,"onUpdate:modelValue":ze=>P.value=ze,"validate-event":!1,size:"small",onKeyup:$t(Q,["enter"]),onBlur:Q},null,8,["modelValue","onUpdate:modelValue","onKeyup"])],2),_(A(Ge),{class:W(A(o).be("dropdown","link-btn")),text:"",size:"small",onClick:Z},{default:w(()=>[G(M(A(i)("el.colorpicker.clear")),1)]),_:1},8,["class"]),_(A(Ge),{plain:"",size:"small",class:W(A(o).be("dropdown","btn")),onClick:ie},{default:w(()=>[G(M(A(i)("el.colorpicker.confirm")),1)]),_:1},8,["class"])],2)],40,["onKeydown"])),[[A(mf),me]])]),default:w(()=>[g("div",Mn({id:A(c),ref_key:"triggerRef",ref:m},re.$attrs,{class:A(z),role:"button","aria-label":A(V),"aria-labelledby":A(D),"aria-description":A(i)("el.colorpicker.description",{color:re.modelValue||""}),"aria-disabled":A(l),tabindex:A(l)?-1:re.tabindex,onKeydown:we,onFocus:A(C),onBlur:A(k)}),[A(l)?(v(),$("div",{key:0,class:W(A(o).be("picker","mask"))},null,2)):O("v-if",!0),g("div",{class:W(A(o).be("picker","trigger")),onClick:F},[g("span",{class:W([A(o).be("picker","color"),A(o).is("alpha",re.showAlpha)])},[g("span",{class:W(A(o).be("picker","color-inner")),style:Ke({backgroundColor:A(I)})},[Pe(_(A(ye),{class:W([A(o).be("picker","icon"),A(o).is("icon-arrow-down")])},{default:w(()=>[_(A(ud))]),_:1},8,["class"]),[[Xt,re.modelValue||T.value]]),Pe(_(A(ye),{class:W([A(o).be("picker","empty"),A(o).is("icon-close")])},{default:w(()=>[_(A(Ir))]),_:1},8,["class"]),[[Xt,!re.modelValue&&!T.value]])],6)],2)],2)],16,["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex","onFocus","onBlur"])]),_:1},8,["visible","popper-class","teleported","transition","onHide"]))}});var tfe=Ye(efe,[["__file","color-picker.vue"]]);const pd=jt(tfe),nfe=se({name:"ElContainer"}),sfe=se({...nfe,props:{direction:{type:String}},setup(t){const e=t,n=Zi(),s=He("container"),i=q(()=>e.direction==="vertical"?!0:e.direction==="horizontal"?!1:n&&n.default?n.default().some(r=>{const a=r.type.name;return a==="ElHeader"||a==="ElFooter"}):!1);return(o,r)=>(v(),$("section",{class:W([A(s).b(),A(s).is("vertical",A(i))])},[ae(o.$slots,"default")],2))}});var ife=Ye(sfe,[["__file","container.vue"]]);const ofe=se({name:"ElAside"}),rfe=se({...ofe,props:{width:{type:String,default:null}},setup(t){const e=t,n=He("aside"),s=q(()=>e.width?n.cssVarBlock({width:e.width}):{});return(i,o)=>(v(),$("aside",{class:W(A(n).b()),style:Ke(A(s))},[ae(i.$slots,"default")],6))}});var hR=Ye(rfe,[["__file","aside.vue"]]);const afe=se({name:"ElFooter"}),lfe=se({...afe,props:{height:{type:String,default:null}},setup(t){const e=t,n=He("footer"),s=q(()=>e.height?n.cssVarBlock({height:e.height}):{});return(i,o)=>(v(),$("footer",{class:W(A(n).b()),style:Ke(A(s))},[ae(i.$slots,"default")],6))}});var fR=Ye(lfe,[["__file","footer.vue"]]);const cfe=se({name:"ElHeader"}),ufe=se({...cfe,props:{height:{type:String,default:null}},setup(t){const e=t,n=He("header"),s=q(()=>e.height?n.cssVarBlock({height:e.height}):{});return(i,o)=>(v(),$("header",{class:W(A(n).b()),style:Ke(A(s))},[ae(i.$slots,"default")],6))}});var pR=Ye(ufe,[["__file","header.vue"]]);const dfe=se({name:"ElMain"}),hfe=se({...dfe,setup(t){const e=He("main");return(n,s)=>(v(),$("main",{class:W(A(e).b())},[ae(n.$slots,"default")],2))}});var mR=Ye(hfe,[["__file","main.vue"]]);const o1=jt(ife,{Aside:hR,Footer:fR,Header:pR,Main:mR}),r1=xs(hR);xs(fR);const a1=xs(pR),ba=xs(mR);var gR={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(us,function(){return function(n,s){var i=s.prototype,o=i.format;i.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)}}})})(gR);var ffe=gR.exports;const pfe=Ts(ffe);var vR={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(us,function(){var n="week",s="year";return function(i,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(s).add(1,s).date(c),d=r(this).endOf(n);if(u.isBefore(d))return 1}var h=r(this).startOf(s).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)}}})})(vR);var mfe=vR.exports;const gfe=Ts(mfe);var _R={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(us,function(){return function(n,s){s.prototype.weekYear=function(){var i=this.month(),o=this.week(),r=this.year();return o===1&&i===11?r+1:i===0&&o>=52?r-1:r}}})})(_R);var vfe=_R.exports;const _fe=Ts(vfe);var yR={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(us,function(){return function(n,s,i){s.prototype.dayOfYear=function(o){var r=Math.round((i(this).startOf("day")-i(this).startOf("year"))/864e5)+1;return o==null?r:this.add(o-r,"day")}}})})(yR);var yfe=yR.exports;const bfe=Ts(yfe);var bR={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(us,function(){return function(n,s){s.prototype.isSameOrAfter=function(i,o){return this.isSame(i,o)||this.isAfter(i,o)}}})})(bR);var wfe=bR.exports;const Cfe=Ts(wfe);var wR={exports:{}};(function(t,e){(function(n,s){t.exports=s()})(us,function(){return function(n,s){s.prototype.isSameOrBefore=function(i,o){return this.isSame(i,o)||this.isBefore(i,o)}}})})(wR);var kfe=wR.exports;const xfe=Ts(kfe),cb=Symbol(),Sfe=Ze({...BD,type:{type:xe(String),default:"date"}}),$fe=["date","dates","year","years","month","months","week","range"],l4=Ze({disabledDate:{type:xe(Function)},date:{type:xe(Object),required:!0},minDate:{type:xe(Object)},maxDate:{type:xe(Object)},parsedValue:{type:xe([Object,Array])},rangeState:{type:xe(Object),default:()=>({endDate:null,selecting:!1})}}),CR=Ze({type:{type:xe(String),required:!0,values:Foe},dateFormat:String,timeFormat:String}),c4=Ze({unlinkPanels:Boolean,parsedValue:{type:xe(Array)}}),u4=t=>({type:String,values:$fe,default:t}),Afe=Ze({...CR,parsedValue:{type:xe([Object,Array])},visible:{type:Boolean},format:{type:String,default:""}}),gf=t=>{if(!Le(t))return!1;const[e,n]=t;return ut.isDayjs(e)&&ut.isDayjs(n)&&e.isSameOrBefore(n)},d4=(t,{lang:e,unit:n,unlinkPanels:s})=>{let i;if(Le(t)){let[o,r]=t.map(a=>ut(a).locale(e));return s||(r=o.add(1,n)),[o,r]}else t?i=ut(t):i=ut();return i=i.locale(e),[i,i.add(1,n)]},Mfe=(t,e,{columnIndexOffset:n,startDate:s,nextEndDate:i,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=u*t.column+h,m=a(p);f.dayjs=m,f.date=m.toDate(),f.timestamp=m.valueOf(),f.type="normal",f.inRange=!!(s&&m.isSameOrAfter(s,r)&&i&&m.isSameOrBefore(i,r))||!!(s&&m.isSameOrBefore(s,r)&&i&&m.isSameOrAfter(i,r)),s!=null&&s.isSameOrAfter(i)?(f.start=!!i&&m.isSame(i,r),f.end=s&&m.isSame(s,r)):(f.start=!!s&&m.isSame(s,r),f.end=!!i&&m.isSame(i,r)),m.isSame(o,r)&&(f.type="today"),l==null||l(f,{rowIndex:u,columnIndex:h}),d[h+n]=f}c==null||c(d)}},R_=(t,e,n)=>{const s=ut().locale(n).startOf("month").month(e).year(t),i=s.daysInMonth();return RD(i).map(o=>s.add(o,"day").toDate())},bg=(t,e,n,s)=>{const i=ut().year(t).month(e).startOf("month"),o=R_(t,e,n).find(r=>!(s!=null&&s(r)));return o?ut(o).locale(n):i.locale(n)},S6=(t,e,n)=>{const s=t.year();if(!(n!=null&&n(t.toDate())))return t.locale(e);const i=t.month();if(!R_(s,i,e).every(n))return bg(s,i,e,n);for(let o=0;o<12;o++)if(!R_(s,o,e).every(n))return bg(s,o,e,n);return t},Efe=Ze({...l4,cellClassName:{type:xe(Function)},showWeekNumber:Boolean,selectionMode:u4("date")}),Tfe=["changerange","pick","select"],$6=(t="")=>["normal","today"].includes(t),Pfe=(t,e)=>{const{lang:n}=fn(),s=J(),i=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(N=>N.toLowerCase()),d=q(()=>c>3?7-c:-c),h=q(()=>{const N=t.date.startOf("month");return N.subtract(N.day()||7,"day")}),f=q(()=>u.concat(u).slice(c,c+7)),p=q(()=>YL(A(x)).some(N=>N.isCurrent)),m=q(()=>{const N=t.date.startOf("month"),F=N.day()||7,Q=N.daysInMonth(),ie=N.subtract(1,"month").daysInMonth();return{startOfMonthDay:F,dateCountOfMonth:Q,dateCountOfLastMonth:ie}}),b=q(()=>t.selectionMode==="dates"?lo(t.parsedValue):[]),y=(N,{count:F,rowIndex:Q,columnIndex:ie})=>{const{startOfMonthDay:Z,dateCountOfMonth:me,dateCountOfLastMonth:Se}=A(m),we=A(d);if(Q>=0&&Q<=1){const oe=Z+we<0?7+Z+we:Z+we;if(ie+Q*7>=oe)return N.text=F,!0;N.text=Se-(oe-ie%7)+1+Q*7,N.type="prev-month"}else return F<=me?N.text=F:(N.text=F-me,N.type="next-month"),!0;return!1},C=(N,{columnIndex:F,rowIndex:Q},ie)=>{const{disabledDate:Z,cellClassName:me}=t,Se=A(b),we=y(N,{count:ie,rowIndex:Q,columnIndex:F}),oe=N.dayjs.toDate();return N.selected=Se.find(ce=>ce.isSame(N.dayjs,"day")),N.isSelected=!!N.selected,N.isCurrent=E(N),N.disabled=Z==null?void 0:Z(oe),N.customClass=me==null?void 0:me(oe),we},k=N=>{if(t.selectionMode==="week"){const[F,Q]=t.showWeekNumber?[1,7]:[0,6],ie=K(N[F+1]);N[F].inRange=ie,N[F].start=ie,N[Q].inRange=ie,N[Q].end=ie}},x=q(()=>{const{minDate:N,maxDate:F,rangeState:Q,showWeekNumber:ie}=t,Z=A(d),me=A(a),Se="day";let we=1;if(ie)for(let oe=0;oe<6;oe++)me[oe][0]||(me[oe][0]={type:"week",text:A(h).add(oe*7+1,Se).week()});return Mfe({row:6,column:7},me,{startDate:N,columnIndexOffset:ie?1:0,nextEndDate:Q.endDate||F||Q.selecting&&N||null,now:ut().locale(A(n)).startOf(Se),unit:Se,relativeDateGetter:oe=>A(h).add(oe-Z,Se),setCellMetadata:(...oe)=>{C(...oe,we)&&(we+=1)},setRowMetadata:k}),me});Te(()=>t.date,async()=>{var N;(N=A(s))!=null&&N.contains(document.activeElement)&&(await dt(),await S())});const S=async()=>{var N;return(N=A(i))==null?void 0:N.focus()},E=N=>t.selectionMode==="date"&&$6(N.type)&&T(N,t.parsedValue),T=(N,F)=>F?ut(F).locale(A(n)).isSame(t.date.date(Number(N.text)),"day"):!1,P=(N,F)=>{const Q=N*7+(F-(t.showWeekNumber?1:0))-A(d);return A(h).add(Q,"day")},I=N=>{var F;if(!t.rangeState.selecting)return;let Q=N.target;if(Q.tagName==="SPAN"&&(Q=(F=Q.parentNode)==null?void 0:F.parentNode),Q.tagName==="DIV"&&(Q=Q.parentNode),Q.tagName!=="TD")return;const ie=Q.parentNode.rowIndex-1,Z=Q.cellIndex;A(x)[ie][Z].disabled||(ie!==A(o)||Z!==A(r))&&(o.value=ie,r.value=Z,e("changerange",{selecting:!0,endDate:P(ie,Z)}))},L=N=>!A(p)&&(N==null?void 0:N.text)===1&&N.type==="normal"||N.isCurrent,V=N=>{l||A(p)||t.selectionMode!=="date"||X(N,!0)},D=N=>{N.target.closest("td")&&(l=!0)},z=N=>{N.target.closest("td")&&(l=!1)},Y=N=>{!t.rangeState.selecting||!t.minDate?(e("pick",{minDate:N,maxDate:null}),e("select",!0)):(N>=t.minDate?e("pick",{minDate:t.minDate,maxDate:N}):e("pick",{minDate:N,maxDate:t.minDate}),e("select",!1))},B=N=>{const F=N.week(),Q=`${N.year()}w${F}`;e("pick",{year:N.year(),week:F,value:Q,date:N.startOf("week")})},U=(N,F)=>{const Q=F?lo(t.parsedValue).filter(ie=>(ie==null?void 0:ie.valueOf())!==N.valueOf()):lo(t.parsedValue).concat([N]);e("pick",Q)},X=(N,F=!1)=>{const Q=N.target.closest("td");if(!Q)return;const ie=Q.parentNode.rowIndex-1,Z=Q.cellIndex,me=A(x)[ie][Z];if(me.disabled||me.type==="week")return;const Se=P(ie,Z);switch(t.selectionMode){case"range":{Y(Se);break}case"date":{e("pick",Se,F);break}case"week":{B(Se);break}case"dates":{U(Se,!!me.selected);break}}},K=N=>{if(t.selectionMode!=="week")return!1;let F=t.date.startOf("day");if(N.type==="prev-month"&&(F=F.subtract(1,"month")),N.type==="next-month"&&(F=F.add(1,"month")),F=F.date(Number.parseInt(N.text,10)),t.parsedValue&&!Array.isArray(t.parsedValue)){const Q=(t.parsedValue.day()-c+7)%7-1;return t.parsedValue.subtract(Q,"day").isSame(F,"day")}return!1};return{WEEKS:f,rows:x,tbodyRef:s,currentCellRef:i,focus:S,isCurrent:E,isWeekActive:K,isSelectedCell:L,handlePickDate:X,handleMouseUp:z,handleMouseDown:D,handleMouseMove:I,handleFocus:V}},Ife=(t,{isCurrent:e,isWeekActive:n})=>{const s=He("date-table"),{t:i}=fn(),o=q(()=>[s.b(),{"is-week-mode":t.selectionMode==="week"}]),r=q(()=>i("el.datepicker.dateTablePrompt")),a=q(()=>i("el.datepicker.week"));return{tableKls:o,tableLabel:r,weekLabel:a,getCellClasses:u=>{const d=[];return $6(u.type)&&!u.disabled?(d.push("available"),u.type==="today"&&d.push("today")):d.push(u.type),e(u)&&d.push("current"),u.inRange&&($6(u.type)||t.selectionMode==="week")&&(d.push("in-range"),u.start&&d.push("start-date"),u.end&&d.push("end-date")),u.disabled&&d.push("disabled"),u.selected&&d.push("selected"),u.customClass&&d.push(u.customClass),d.join(" ")},getRowKls:u=>[s.e("row"),{current:n(u)}],t:i}},Lfe=Ze({cell:{type:xe(Object)}});var h4=se({name:"ElDatePickerCell",props:Lfe,setup(t){const e=He("date-table-cell"),{slots:n}=qe(cb);return()=>{const{cell:s}=t;return ae(n,"default",{...s},()=>{var i;return[_("div",{class:e.b()},[_("span",{class:e.e("text")},[(i=s==null?void 0:s.renderText)!=null?i:s==null?void 0:s.text])])]})}}});const Ofe=se({__name:"basic-date-table",props:Efe,emits:Tfe,setup(t,{expose:e,emit:n}){const s=t,{WEEKS:i,rows:o,tbodyRef:r,currentCellRef:a,focus:l,isCurrent:c,isWeekActive:u,isSelectedCell:d,handlePickDate:h,handleMouseUp:f,handleMouseDown:p,handleMouseMove:m,handleFocus:b}=Pfe(s,n),{tableLabel:y,tableKls:C,weekLabel:k,getCellClasses:x,getRowKls:S,t:E}=Ife(s,{isCurrent:c,isWeekActive:u});return e({focus:l}),(T,P)=>(v(),$("table",{"aria-label":A(y),class:W(A(C)),cellspacing:"0",cellpadding:"0",role:"grid",onClick:A(h),onMousemove:A(m),onMousedown:Be(A(p),["prevent"]),onMouseup:A(f)},[g("tbody",{ref_key:"tbodyRef",ref:r},[g("tr",null,[T.showWeekNumber?(v(),$("th",{key:0,scope:"col"},M(A(k)),1)):O("v-if",!0),(v(!0),$(te,null,be(A(i),(I,L)=>(v(),$("th",{key:L,"aria-label":A(E)("el.datepicker.weeksFull."+I),scope:"col"},M(A(E)("el.datepicker.weeks."+I)),9,["aria-label"]))),128))]),(v(!0),$(te,null,be(A(o),(I,L)=>(v(),$("tr",{key:L,class:W(A(S)(I[1]))},[(v(!0),$(te,null,be(I,(V,D)=>(v(),$("td",{key:`${L}.${D}`,ref_for:!0,ref:z=>A(d)(V)&&(a.value=z),class:W(A(x)(V)),"aria-current":V.isCurrent?"date":void 0,"aria-selected":V.isCurrent,tabindex:A(d)(V)?0:-1,onFocus:A(b)},[_(A(h4),{cell:V},null,8,["cell"])],42,["aria-current","aria-selected","tabindex","onFocus"]))),128))],2))),128))],512)],42,["aria-label","onClick","onMousemove","onMousedown","onMouseup"]))}});var A6=Ye(Ofe,[["__file","basic-date-table.vue"]]);const Dfe=Ze({...l4,selectionMode:u4("month")}),Rfe=se({__name:"basic-month-table",props:Dfe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const s=t,i=He("month-table"),{t:o,lang:r}=fn(),a=J(),l=J(),c=J(s.date.locale("en").localeData().monthsShort().map(k=>k.toLowerCase())),u=J([[],[],[]]),d=J(),h=J(),f=q(()=>{var k,x;const S=u.value,E=ut().locale(r.value).startOf("month");for(let T=0;T<3;T++){const P=S[T];for(let I=0;I<4;I++){const L=P[I]||(P[I]={row:T,column:I,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1});L.type="normal";const V=T*4+I,D=s.date.startOf("year").month(V),z=s.rangeState.endDate||s.maxDate||s.rangeState.selecting&&s.minDate||null;L.inRange=!!(s.minDate&&D.isSameOrAfter(s.minDate,"month")&&z&&D.isSameOrBefore(z,"month"))||!!(s.minDate&&D.isSameOrBefore(s.minDate,"month")&&z&&D.isSameOrAfter(z,"month")),(k=s.minDate)!=null&&k.isSameOrAfter(z)?(L.start=!!(z&&D.isSame(z,"month")),L.end=s.minDate&&D.isSame(s.minDate,"month")):(L.start=!!(s.minDate&&D.isSame(s.minDate,"month")),L.end=!!(z&&D.isSame(z,"month"))),E.isSame(D)&&(L.type="today"),L.text=V,L.disabled=((x=s.disabledDate)==null?void 0:x.call(s,D.toDate()))||!1}}return S}),p=()=>{var k;(k=l.value)==null||k.focus()},m=k=>{const x={},S=s.date.year(),E=new Date,T=k.text;return x.disabled=s.disabledDate?R_(S,T,r.value).every(s.disabledDate):!1,x.current=lo(s.parsedValue).findIndex(P=>ut.isDayjs(P)&&P.year()===S&&P.month()===T)>=0,x.today=E.getFullYear()===S&&E.getMonth()===T,k.inRange&&(x["in-range"]=!0,k.start&&(x["start-date"]=!0),k.end&&(x["end-date"]=!0)),x},b=k=>{const x=s.date.year(),S=k.text;return lo(s.date).findIndex(E=>E.year()===x&&E.month()===S)>=0},y=k=>{var x;if(!s.rangeState.selecting)return;let S=k.target;if(S.tagName==="SPAN"&&(S=(x=S.parentNode)==null?void 0:x.parentNode),S.tagName==="DIV"&&(S=S.parentNode),S.tagName!=="TD")return;const E=S.parentNode.rowIndex,T=S.cellIndex;f.value[E][T].disabled||(E!==d.value||T!==h.value)&&(d.value=E,h.value=T,n("changerange",{selecting:!0,endDate:s.date.startOf("year").month(E*4+T)}))},C=k=>{var x;const S=(x=k.target)==null?void 0:x.closest("td");if((S==null?void 0:S.tagName)!=="TD"||mr(S,"disabled"))return;const E=S.cellIndex,P=S.parentNode.rowIndex*4+E,I=s.date.startOf("year").month(P);if(s.selectionMode==="months"){if(k.type==="keydown"){n("pick",lo(s.parsedValue),!1);return}const L=bg(s.date.year(),P,r.value,s.disabledDate),V=mr(S,"current")?lo(s.parsedValue).filter(D=>(D==null?void 0:D.month())!==L.month()):lo(s.parsedValue).concat([ut(L)]);n("pick",V)}else s.selectionMode==="range"?s.rangeState.selecting?(s.minDate&&I>=s.minDate?n("pick",{minDate:s.minDate,maxDate:I}):n("pick",{minDate:I,maxDate:s.minDate}),n("select",!1)):(n("pick",{minDate:I,maxDate:null}),n("select",!0)):n("pick",P)};return Te(()=>s.date,async()=>{var k,x;(k=a.value)!=null&&k.contains(document.activeElement)&&(await dt(),(x=l.value)==null||x.focus())}),e({focus:p}),(k,x)=>(v(),$("table",{role:"grid","aria-label":A(o)("el.datepicker.monthTablePrompt"),class:W(A(i).b()),onClick:C,onMousemove:y},[g("tbody",{ref_key:"tbodyRef",ref:a},[(v(!0),$(te,null,be(A(f),(S,E)=>(v(),$("tr",{key:E},[(v(!0),$(te,null,be(S,(T,P)=>(v(),$("td",{key:P,ref_for:!0,ref:I=>b(T)&&(l.value=I),class:W(m(T)),"aria-selected":`${b(T)}`,"aria-label":A(o)(`el.datepicker.month${+T.text+1}`),tabindex:b(T)?0:-1,onKeydown:[$t(Be(C,["prevent","stop"]),["space"]),$t(Be(C,["prevent","stop"]),["enter"])]},[_(A(h4),{cell:{...T,renderText:A(o)("el.datepicker.months."+c.value[T.text])}},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var M6=Ye(Rfe,[["__file","basic-month-table.vue"]]);const Vfe=Ze({...l4,selectionMode:u4("year")}),Ffe=se({__name:"basic-year-table",props:Vfe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const s=t,i=(x,S)=>{const E=ut(String(x)).locale(S).startOf("year"),P=E.endOf("year").dayOfYear();return RD(P).map(I=>E.add(I,"day").toDate())},o=He("year-table"),{t:r,lang:a}=fn(),l=J(),c=J(),u=q(()=>Math.floor(s.date.year()/10)*10),d=J([[],[],[]]),h=J(),f=J(),p=q(()=>{var x;const S=d.value,E=ut().locale(a.value).startOf("year");for(let T=0;T<3;T++){const P=S[T];for(let I=0;I<4&&!(T*4+I>=10);I++){let L=P[I];L||(L={row:T,column:I,type:"normal",inRange:!1,start:!1,end:!1,text:-1,disabled:!1}),L.type="normal";const V=T*4+I+u.value,D=ut().year(V),z=s.rangeState.endDate||s.maxDate||s.rangeState.selecting&&s.minDate||null;L.inRange=!!(s.minDate&&D.isSameOrAfter(s.minDate,"year")&&z&&D.isSameOrBefore(z,"year"))||!!(s.minDate&&D.isSameOrBefore(s.minDate,"year")&&z&&D.isSameOrAfter(z,"year")),(x=s.minDate)!=null&&x.isSameOrAfter(z)?(L.start=!!(z&&D.isSame(z,"year")),L.end=!!(s.minDate&&D.isSame(s.minDate,"year"))):(L.start=!!(s.minDate&&D.isSame(s.minDate,"year")),L.end=!!(z&&D.isSame(z,"year"))),E.isSame(D)&&(L.type="today"),L.text=V;const B=D.toDate();L.disabled=s.disabledDate&&s.disabledDate(B)||!1,P[I]=L}}return S}),m=()=>{var x;(x=c.value)==null||x.focus()},b=x=>{const S={},E=ut().locale(a.value),T=x.text;return S.disabled=s.disabledDate?i(T,a.value).every(s.disabledDate):!1,S.today=E.year()===T,S.current=lo(s.parsedValue).findIndex(P=>P.year()===T)>=0,x.inRange&&(S["in-range"]=!0,x.start&&(S["start-date"]=!0),x.end&&(S["end-date"]=!0)),S},y=x=>{const S=x.text;return lo(s.date).findIndex(E=>E.year()===S)>=0},C=x=>{var S;const E=(S=x.target)==null?void 0:S.closest("td");if(!E||!E.textContent||mr(E,"disabled"))return;const T=E.cellIndex,I=E.parentNode.rowIndex*4+T+u.value,L=ut().year(I);if(s.selectionMode==="range")s.rangeState.selecting?(s.minDate&&L>=s.minDate?n("pick",{minDate:s.minDate,maxDate:L}):n("pick",{minDate:L,maxDate:s.minDate}),n("select",!1)):(n("pick",{minDate:L,maxDate:null}),n("select",!0));else if(s.selectionMode==="years"){if(x.type==="keydown"){n("pick",lo(s.parsedValue),!1);return}const V=S6(L.startOf("year"),a.value,s.disabledDate),D=mr(E,"current")?lo(s.parsedValue).filter(z=>(z==null?void 0:z.year())!==I):lo(s.parsedValue).concat([V]);n("pick",D)}else n("pick",I)},k=x=>{var S;if(!s.rangeState.selecting)return;const E=(S=x.target)==null?void 0:S.closest("td");if(!E)return;const T=E.parentNode.rowIndex,P=E.cellIndex;p.value[T][P].disabled||(T!==h.value||P!==f.value)&&(h.value=T,f.value=P,n("changerange",{selecting:!0,endDate:ut().year(u.value).add(T*4+P,"year")}))};return Te(()=>s.date,async()=>{var x,S;(x=l.value)!=null&&x.contains(document.activeElement)&&(await dt(),(S=c.value)==null||S.focus())}),e({focus:m}),(x,S)=>(v(),$("table",{role:"grid","aria-label":A(r)("el.datepicker.yearTablePrompt"),class:W(A(o).b()),onClick:C,onMousemove:k},[g("tbody",{ref_key:"tbodyRef",ref:l},[(v(!0),$(te,null,be(A(p),(E,T)=>(v(),$("tr",{key:T},[(v(!0),$(te,null,be(E,(P,I)=>(v(),$("td",{key:`${T}_${I}`,ref_for:!0,ref:L=>y(P)&&(c.value=L),class:W(["available",b(P)]),"aria-selected":y(P),"aria-label":String(P.text),tabindex:y(P)?0:-1,onKeydown:[$t(Be(C,["prevent","stop"]),["space"]),$t(Be(C,["prevent","stop"]),["enter"])]},[_(A(h4),{cell:P},null,8,["cell"])],42,["aria-selected","aria-label","tabindex","onKeydown"]))),128))]))),128))],512)],42,["aria-label"]))}});var E6=Ye(Ffe,[["__file","basic-year-table.vue"]]);const Nfe=se({__name:"panel-date-pick",props:Afe,emits:["pick","set-picker-option","panel-change"],setup(t,{emit:e}){const n=t,s=(he,Ee,ve)=>!0,i=He("picker-panel"),o=He("date-picker"),r=If(),a=Zi(),{t:l,lang:c}=fn(),u=qe("EP_PICKER_BASE"),d=qe(ab),{shortcuts:h,disabledDate:f,cellClassName:p,defaultTime:m}=u.props,b=kn(u.props,"defaultValue"),y=J(),C=J(ut().locale(c.value)),k=J(!1);let x=!1;const S=q(()=>ut(m).locale(c.value)),E=q(()=>C.value.month()),T=q(()=>C.value.year()),P=J([]),I=J(null),L=J(null),V=he=>P.value.length>0?s(he,P.value,n.format||"HH:mm:ss"):!0,D=he=>m&&!pe.value&&!k.value&&!x?S.value.year(he.year()).month(he.month()).date(he.date()):oe.value?he.millisecond(0):he.startOf("day"),z=(he,...Ee)=>{if(!he)e("pick",he,...Ee);else if(Le(he)){const ve=he.map(D);e("pick",ve,...Ee)}else e("pick",D(he),...Ee);I.value=null,L.value=null,k.value=!1,x=!1},Y=async(he,Ee)=>{if(F.value==="date"){he=he;let ve=n.parsedValue?n.parsedValue.year(he.year()).month(he.month()).date(he.date()):he;V(ve)||(ve=P.value[0][0].year(he.year()).month(he.month()).date(he.date())),C.value=ve,z(ve,oe.value||Ee),n.type==="datetime"&&(await dt(),Xe())}else F.value==="week"?z(he.date):F.value==="dates"&&z(he,!0)},B=he=>{const Ee=he?"add":"subtract";C.value=C.value[Ee](1,"month"),Qe("month")},U=he=>{const Ee=C.value,ve=he?"add":"subtract";C.value=X.value==="year"?Ee[ve](10,"year"):Ee[ve](1,"year"),Qe("year")},X=J("date"),K=q(()=>{const he=l("el.datepicker.year");if(X.value==="year"){const Ee=Math.floor(T.value/10)*10;return he?`${Ee} ${he} - ${Ee+9} ${he}`:`${Ee} - ${Ee+9}`}return`${T.value} ${he}`}),N=he=>{const Ee=ot(he.value)?he.value():he.value;if(Ee){x=!0,z(ut(Ee).locale(c.value));return}he.onClick&&he.onClick({attrs:r,slots:a,emit:e})},F=q(()=>{const{type:he}=n;return["week","month","months","year","years","dates"].includes(he)?he:"date"}),Q=q(()=>F.value==="dates"||F.value==="months"||F.value==="years"),ie=q(()=>F.value==="date"?X.value:F.value),Z=q(()=>!!h.length),me=async(he,Ee)=>{F.value==="month"?(C.value=bg(C.value.year(),he,c.value,f),z(C.value,!1)):F.value==="months"?z(he,Ee??!0):(C.value=bg(C.value.year(),he,c.value,f),X.value="date",["month","year","date","week"].includes(F.value)&&(z(C.value,!0),await dt(),Xe())),Qe("month")},Se=async(he,Ee)=>{if(F.value==="year"){const ve=C.value.startOf("year").year(he);C.value=S6(ve,c.value,f),z(C.value,!1)}else if(F.value==="years")z(he,Ee??!0);else{const ve=C.value.year(he);C.value=S6(ve,c.value,f),X.value="month",["month","year","date","week"].includes(F.value)&&(z(C.value,!0),await dt(),Xe())}Qe("year")},we=async he=>{X.value=he,await dt(),Xe()},oe=q(()=>n.type==="datetime"||n.type==="datetimerange"),ce=q(()=>{const he=oe.value||F.value==="dates",Ee=F.value==="years",ve=F.value==="months",We=X.value==="date",Re=X.value==="year",Et=X.value==="month";return he&&We||Ee&&Re||ve&&Et}),re=q(()=>f?n.parsedValue?Le(n.parsedValue)?f(n.parsedValue[0].toDate()):f(n.parsedValue.toDate()):!0:!1),ge=()=>{if(Q.value)z(n.parsedValue);else{let he=n.parsedValue;if(!he){const Ee=ut(m).locale(c.value),ve=ke();he=Ee.year(ve.year()).month(ve.month()).date(ve.date())}C.value=he,z(he)}},ze=q(()=>f?f(ut().locale(c.value).toDate()):!1),st=()=>{const Ee=ut().locale(c.value).toDate();k.value=!0,(!f||!f(Ee))&&V(Ee)&&(C.value=ut().locale(c.value),z(C.value))},ee=q(()=>n.timeFormat||FD(n.format)),ne=q(()=>n.dateFormat||VD(n.format)),pe=q(()=>{if(L.value)return L.value;if(!(!n.parsedValue&&!b.value))return(n.parsedValue||C.value).format(ee.value)}),Ae=q(()=>{if(I.value)return I.value;if(!(!n.parsedValue&&!b.value))return(n.parsedValue||C.value).format(ne.value)}),Ce=J(!1),Me=()=>{Ce.value=!0},je=()=>{Ce.value=!1},Fe=he=>({hour:he.hour(),minute:he.minute(),second:he.second(),year:he.year(),month:he.month(),date:he.date()}),Ue=(he,Ee,ve)=>{const{hour:We,minute:Re,second:Et}=Fe(he),ln=n.parsedValue?n.parsedValue.hour(We).minute(Re).second(Et):he;C.value=ln,z(C.value,!0),ve||(Ce.value=Ee)},Oe=he=>{const Ee=ut(he,ee.value).locale(c.value);if(Ee.isValid()&&V(Ee)){const{year:ve,month:We,date:Re}=Fe(C.value);C.value=Ee.year(ve).month(We).date(Re),L.value=null,Ce.value=!1,z(C.value,!0)}},ht=he=>{const Ee=ut(he,ne.value).locale(c.value);if(Ee.isValid()){if(f&&f(Ee.toDate()))return;const{hour:ve,minute:We,second:Re}=Fe(C.value);C.value=Ee.hour(ve).minute(We).second(Re),I.value=null,z(C.value,!0)}},Ie=he=>ut.isDayjs(he)&&he.isValid()&&(f?!f(he.toDate()):!0),_e=he=>Le(he)?he.map(Ee=>Ee.format(n.format)):he.format(n.format),le=he=>ut(he,n.format).locale(c.value),ke=()=>{const he=ut(b.value).locale(c.value);if(!b.value){const Ee=S.value;return ut().hour(Ee.hour()).minute(Ee.minute()).second(Ee.second()).locale(c.value)}return he},Xe=async()=>{var he;["week","month","year","date"].includes(F.value)&&((he=y.value)==null||he.focus(),F.value==="week"&&Ne(ft.down))},tt=he=>{const{code:Ee}=he;[ft.up,ft.down,ft.left,ft.right,ft.home,ft.end,ft.pageUp,ft.pageDown].includes(Ee)&&(Ne(Ee),he.stopPropagation(),he.preventDefault()),[ft.enter,ft.space,ft.numpadEnter].includes(Ee)&&I.value===null&&L.value===null&&(he.preventDefault(),z(C.value,!1))},Ne=he=>{var Ee;const{up:ve,down:We,left:Re,right:Et,home:ln,end:fe,pageUp:ct,pageDown:Nt}=ft,Zn={year:{[ve]:-4,[We]:4,[Re]:-1,[Et]:1,offset:(xn,Ao)=>xn.setFullYear(xn.getFullYear()+Ao)},month:{[ve]:-4,[We]:4,[Re]:-1,[Et]:1,offset:(xn,Ao)=>xn.setMonth(xn.getMonth()+Ao)},week:{[ve]:-1,[We]:1,[Re]:-1,[Et]:1,offset:(xn,Ao)=>xn.setDate(xn.getDate()+Ao*7)},date:{[ve]:-7,[We]:7,[Re]:-1,[Et]:1,[ln]:xn=>-xn.getDay(),[fe]:xn=>-xn.getDay()+6,[ct]:xn=>-new Date(xn.getFullYear(),xn.getMonth(),0).getDate(),[Nt]:xn=>new Date(xn.getFullYear(),xn.getMonth()+1,0).getDate(),offset:(xn,Ao)=>xn.setDate(xn.getDate()+Ao)}},Is=C.value.toDate();for(;Math.abs(C.value.diff(Is,"year",!0))<1;){const xn=Zn[ie.value];if(!xn)return;if(xn.offset(Is,ot(xn[he])?xn[he](Is):(Ee=xn[he])!=null?Ee:0),f&&f(Is))break;const Ao=ut(Is).locale(c.value);C.value=Ao,e("pick",Ao,!0);break}},Qe=he=>{e("panel-change",C.value.toDate(),he,X.value)};return Te(()=>F.value,he=>{if(["month","year"].includes(he)){X.value=he;return}else if(he==="years"){X.value="year";return}else if(he==="months"){X.value="month";return}X.value="date"},{immediate:!0}),Te(()=>X.value,()=>{d==null||d.updatePopper()}),Te(()=>b.value,he=>{he&&(C.value=ke())},{immediate:!0}),Te(()=>n.parsedValue,he=>{if(he){if(Q.value||Array.isArray(he))return;C.value=he}else C.value=ke()},{immediate:!0}),e("set-picker-option",["isValidValue",Ie]),e("set-picker-option",["formatToString",_e]),e("set-picker-option",["parseUserInput",le]),e("set-picker-option",["handleFocusPicker",Xe]),(he,Ee)=>(v(),$("div",{class:W([A(i).b(),A(o).b(),{"has-sidebar":he.$slots.sidebar||A(Z),"has-time":A(oe)}])},[g("div",{class:W(A(i).e("body-wrapper"))},[ae(he.$slots,"sidebar",{class:W(A(i).e("sidebar"))}),A(Z)?(v(),$("div",{key:0,class:W(A(i).e("sidebar"))},[(v(!0),$(te,null,be(A(h),(ve,We)=>(v(),$("button",{key:We,type:"button",class:W(A(i).e("shortcut")),onClick:Re=>N(ve)},M(ve.text),11,["onClick"]))),128))],2)):O("v-if",!0),g("div",{class:W(A(i).e("body"))},[A(oe)?(v(),$("div",{key:0,class:W(A(o).e("time-header"))},[g("span",{class:W(A(o).e("editor-wrap"))},[_(A(vt),{placeholder:A(l)("el.datepicker.selectDate"),"model-value":A(Ae),size:"small","validate-event":!1,onInput:ve=>I.value=ve,onChange:ht},null,8,["placeholder","model-value","onInput"])],2),Pe((v(),$("span",{class:W(A(o).e("editor-wrap"))},[_(A(vt),{placeholder:A(l)("el.datepicker.selectTime"),"model-value":A(pe),size:"small","validate-event":!1,onFocus:Me,onInput:ve=>L.value=ve,onChange:Oe},null,8,["placeholder","model-value","onInput"]),_(A(k6),{visible:Ce.value,format:A(ee),"parsed-value":C.value,onPick:Ue},null,8,["visible","format","parsed-value"])],2)),[[A(mf),je]])],2)):O("v-if",!0),Pe(g("div",{class:W([A(o).e("header"),(X.value==="year"||X.value==="month")&&A(o).e("header--bordered")])},[g("span",{class:W(A(o).e("prev-btn"))},[g("button",{type:"button","aria-label":A(l)("el.datepicker.prevYear"),class:W(["d-arrow-left",A(i).e("icon-btn")]),onClick:ve=>U(!1)},[ae(he.$slots,"prev-year",{},()=>[_(A(ye),null,{default:w(()=>[_(A(gc))]),_:1})])],10,["aria-label","onClick"]),Pe(g("button",{type:"button","aria-label":A(l)("el.datepicker.prevMonth"),class:W([A(i).e("icon-btn"),"arrow-left"]),onClick:ve=>B(!1)},[ae(he.$slots,"prev-month",{},()=>[_(A(ye),null,{default:w(()=>[_(A(Yu))]),_:1})])],10,["aria-label","onClick"]),[[Xt,X.value==="date"]])],2),g("span",{role:"button",class:W(A(o).e("header-label")),"aria-live":"polite",tabindex:"0",onKeydown:$t(ve=>we("year"),["enter"]),onClick:ve=>we("year")},M(A(K)),43,["onKeydown","onClick"]),Pe(g("span",{role:"button","aria-live":"polite",tabindex:"0",class:W([A(o).e("header-label"),{active:X.value==="month"}]),onKeydown:$t(ve=>we("month"),["enter"]),onClick:ve=>we("month")},M(A(l)(`el.datepicker.month${A(E)+1}`)),43,["onKeydown","onClick"]),[[Xt,X.value==="date"]]),g("span",{class:W(A(o).e("next-btn"))},[Pe(g("button",{type:"button","aria-label":A(l)("el.datepicker.nextMonth"),class:W([A(i).e("icon-btn"),"arrow-right"]),onClick:ve=>B(!0)},[ae(he.$slots,"next-month",{},()=>[_(A(ye),null,{default:w(()=>[_(A(kr))]),_:1})])],10,["aria-label","onClick"]),[[Xt,X.value==="date"]]),g("button",{type:"button","aria-label":A(l)("el.datepicker.nextYear"),class:W([A(i).e("icon-btn"),"d-arrow-right"]),onClick:ve=>U(!0)},[ae(he.$slots,"next-year",{},()=>[_(A(ye),null,{default:w(()=>[_(A(vc))]),_:1})])],10,["aria-label","onClick"])],2)],2),[[Xt,X.value!=="time"]]),g("div",{class:W(A(i).e("content")),onKeydown:tt},[X.value==="date"?(v(),R(A6,{key:0,ref_key:"currentViewRef",ref:y,"selection-mode":A(F),date:C.value,"parsed-value":he.parsedValue,"disabled-date":A(f),"cell-class-name":A(p),onPick:Y},null,8,["selection-mode","date","parsed-value","disabled-date","cell-class-name"])):O("v-if",!0),X.value==="year"?(v(),R(E6,{key:1,ref_key:"currentViewRef",ref:y,"selection-mode":A(F),date:C.value,"disabled-date":A(f),"parsed-value":he.parsedValue,onPick:Se},null,8,["selection-mode","date","disabled-date","parsed-value"])):O("v-if",!0),X.value==="month"?(v(),R(M6,{key:2,ref_key:"currentViewRef",ref:y,"selection-mode":A(F),date:C.value,"parsed-value":he.parsedValue,"disabled-date":A(f),onPick:me},null,8,["selection-mode","date","parsed-value","disabled-date"])):O("v-if",!0)],34)],2)],2),Pe(g("div",{class:W(A(i).e("footer"))},[Pe(_(A(Ge),{text:"",size:"small",class:W(A(i).e("link-btn")),disabled:A(ze),onClick:st},{default:w(()=>[G(M(A(l)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[Xt,!A(Q)]]),_(A(Ge),{plain:"",size:"small",class:W(A(i).e("link-btn")),disabled:A(re),onClick:ge},{default:w(()=>[G(M(A(l)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])],2),[[Xt,A(ce)]])],2))}});var Bfe=Ye(Nfe,[["__file","panel-date-pick.vue"]]);const zfe=Ze({...CR,...c4,visible:Boolean}),kR=t=>{const{emit:e}=pt(),n=If(),s=Zi();return o=>{const r=ot(o.value)?o.value():o.value;if(r){e("pick",[ut(r[0]).locale(t.value),ut(r[1]).locale(t.value)]);return}o.onClick&&o.onClick({attrs:n,slots:s,emit:e})}},xR=(t,{defaultValue:e,leftDate:n,rightDate:s,unit:i,onParsedValueChanged:o})=>{const{emit:r}=pt(),{pickerNs:a}=qe(cb),l=He("date-range-picker"),{t:c,lang:u}=fn(),d=kR(u),h=J(),f=J(),p=J({endDate:null,selecting:!1}),m=x=>{p.value=x},b=(x=!1)=>{const S=A(h),E=A(f);gf([S,E])&&r("pick",[S,E],x)},y=x=>{p.value.selecting=x,x||(p.value.endDate=null)},C=x=>{if(Le(x)&&x.length===2){const[S,E]=x;h.value=S,n.value=S,f.value=E,o(A(h),A(f))}else k()},k=()=>{const[x,S]=d4(A(e),{lang:A(u),unit:i,unlinkPanels:t.unlinkPanels});h.value=void 0,f.value=void 0,n.value=x,s.value=S};return Te(e,x=>{x&&k()},{immediate:!0}),Te(()=>t.parsedValue,C,{immediate:!0}),{minDate:h,maxDate:f,rangeState:p,lang:u,ppNs:a,drpNs:l,handleChangeRange:m,handleRangeConfirm:b,handleShortcutClick:d,onSelect:y,onReset:C,t:c}},p0="month",Hfe=se({__name:"panel-date-range",props:zfe,emits:["pick","set-picker-option","calendar-change","panel-change"],setup(t,{emit:e}){const n=t,s=qe("EP_PICKER_BASE"),{disabledDate:i,cellClassName:o,defaultTime:r,clearable:a}=s.props,l=kn(s.props,"format"),c=kn(s.props,"shortcuts"),u=kn(s.props,"defaultValue"),{lang:d}=fn(),h=J(ut().locale(d.value)),f=J(ut().locale(d.value).add(1,p0)),{minDate:p,maxDate:m,rangeState:b,ppNs:y,drpNs:C,handleChangeRange:k,handleRangeConfirm:x,handleShortcutClick:S,onSelect:E,onReset:T,t:P}=xR(n,{defaultValue:u,leftDate:h,rightDate:f,unit:p0,onParsedValueChanged:Ee});Te(()=>n.visible,ve=>{!ve&&b.value.selecting&&(T(n.parsedValue),E(!1))});const I=J({min:null,max:null}),L=J({min:null,max:null}),V=q(()=>`${h.value.year()} ${P("el.datepicker.year")} ${P(`el.datepicker.month${h.value.month()+1}`)}`),D=q(()=>`${f.value.year()} ${P("el.datepicker.year")} ${P(`el.datepicker.month${f.value.month()+1}`)}`),z=q(()=>h.value.year()),Y=q(()=>h.value.month()),B=q(()=>f.value.year()),U=q(()=>f.value.month()),X=q(()=>!!c.value.length),K=q(()=>I.value.min!==null?I.value.min:p.value?p.value.format(Z.value):""),N=q(()=>I.value.max!==null?I.value.max:m.value||p.value?(m.value||p.value).format(Z.value):""),F=q(()=>L.value.min!==null?L.value.min:p.value?p.value.format(ie.value):""),Q=q(()=>L.value.max!==null?L.value.max:m.value||p.value?(m.value||p.value).format(ie.value):""),ie=q(()=>n.timeFormat||FD(l.value)),Z=q(()=>n.dateFormat||VD(l.value)),me=ve=>gf(ve)&&(i?!i(ve[0].toDate())&&!i(ve[1].toDate()):!0),Se=()=>{h.value=h.value.subtract(1,"year"),n.unlinkPanels||(f.value=h.value.add(1,"month")),ee("year")},we=()=>{h.value=h.value.subtract(1,"month"),n.unlinkPanels||(f.value=h.value.add(1,"month")),ee("month")},oe=()=>{n.unlinkPanels?f.value=f.value.add(1,"year"):(h.value=h.value.add(1,"year"),f.value=h.value.add(1,"month")),ee("year")},ce=()=>{n.unlinkPanels?f.value=f.value.add(1,"month"):(h.value=h.value.add(1,"month"),f.value=h.value.add(1,"month")),ee("month")},re=()=>{h.value=h.value.add(1,"year"),ee("year")},ge=()=>{h.value=h.value.add(1,"month"),ee("month")},ze=()=>{f.value=f.value.subtract(1,"year"),ee("year")},st=()=>{f.value=f.value.subtract(1,"month"),ee("month")},ee=ve=>{e("panel-change",[h.value.toDate(),f.value.toDate()],ve)},ne=q(()=>{const ve=(Y.value+1)%12,We=Y.value+1>=12?1:0;return n.unlinkPanels&&new Date(z.value+We,ve)<new Date(B.value,U.value)}),pe=q(()=>n.unlinkPanels&&B.value*12+U.value-(z.value*12+Y.value+1)>=12),Ae=q(()=>!(p.value&&m.value&&!b.value.selecting&&gf([p.value,m.value]))),Ce=q(()=>n.type==="datetime"||n.type==="datetimerange"),Me=(ve,We)=>{if(ve)return r?ut(r[We]||r).locale(d.value).year(ve.year()).month(ve.month()).date(ve.date()):ve},je=(ve,We=!0)=>{const Re=ve.minDate,Et=ve.maxDate,ln=Me(Re,0),fe=Me(Et,1);m.value===fe&&p.value===ln||(e("calendar-change",[Re.toDate(),Et&&Et.toDate()]),m.value=fe,p.value=ln,!(!We||Ce.value)&&x())},Fe=J(!1),Ue=J(!1),Oe=()=>{Fe.value=!1},ht=()=>{Ue.value=!1},Ie=(ve,We)=>{I.value[We]=ve;const Re=ut(ve,Z.value).locale(d.value);if(Re.isValid()){if(i&&i(Re.toDate()))return;We==="min"?(h.value=Re,p.value=(p.value||h.value).year(Re.year()).month(Re.month()).date(Re.date()),!n.unlinkPanels&&(!m.value||m.value.isBefore(p.value))&&(f.value=Re.add(1,"month"),m.value=p.value.add(1,"month"))):(f.value=Re,m.value=(m.value||f.value).year(Re.year()).month(Re.month()).date(Re.date()),!n.unlinkPanels&&(!p.value||p.value.isAfter(m.value))&&(h.value=Re.subtract(1,"month"),p.value=m.value.subtract(1,"month")))}},_e=(ve,We)=>{I.value[We]=null},le=(ve,We)=>{L.value[We]=ve;const Re=ut(ve,ie.value).locale(d.value);Re.isValid()&&(We==="min"?(Fe.value=!0,p.value=(p.value||h.value).hour(Re.hour()).minute(Re.minute()).second(Re.second())):(Ue.value=!0,m.value=(m.value||f.value).hour(Re.hour()).minute(Re.minute()).second(Re.second()),f.value=m.value))},ke=(ve,We)=>{L.value[We]=null,We==="min"?(h.value=p.value,Fe.value=!1,(!m.value||m.value.isBefore(p.value))&&(m.value=p.value)):(f.value=m.value,Ue.value=!1,m.value&&m.value.isBefore(p.value)&&(p.value=m.value))},Xe=(ve,We,Re)=>{L.value.min||(ve&&(h.value=ve,p.value=(p.value||h.value).hour(ve.hour()).minute(ve.minute()).second(ve.second())),Re||(Fe.value=We),(!m.value||m.value.isBefore(p.value))&&(m.value=p.value,f.value=ve))},tt=(ve,We,Re)=>{L.value.max||(ve&&(f.value=ve,m.value=(m.value||f.value).hour(ve.hour()).minute(ve.minute()).second(ve.second())),Re||(Ue.value=We),m.value&&m.value.isBefore(p.value)&&(p.value=m.value))},Ne=()=>{h.value=d4(A(u),{lang:A(d),unit:"month",unlinkPanels:n.unlinkPanels})[0],f.value=h.value.add(1,"month"),m.value=void 0,p.value=void 0,e("pick",null)},Qe=ve=>Le(ve)?ve.map(We=>We.format(l.value)):ve.format(l.value),he=ve=>Le(ve)?ve.map(We=>ut(We,l.value).locale(d.value)):ut(ve,l.value).locale(d.value);function Ee(ve,We){if(n.unlinkPanels&&We){const Re=(ve==null?void 0:ve.year())||0,Et=(ve==null?void 0:ve.month())||0,ln=We.year(),fe=We.month();f.value=Re===ln&&Et===fe?We.add(1,p0):We}else f.value=h.value.add(1,p0),We&&(f.value=f.value.hour(We.hour()).minute(We.minute()).second(We.second()))}return e("set-picker-option",["isValidValue",me]),e("set-picker-option",["parseUserInput",he]),e("set-picker-option",["formatToString",Qe]),e("set-picker-option",["handleClear",Ne]),(ve,We)=>(v(),$("div",{class:W([A(y).b(),A(C).b(),{"has-sidebar":ve.$slots.sidebar||A(X),"has-time":A(Ce)}])},[g("div",{class:W(A(y).e("body-wrapper"))},[ae(ve.$slots,"sidebar",{class:W(A(y).e("sidebar"))}),A(X)?(v(),$("div",{key:0,class:W(A(y).e("sidebar"))},[(v(!0),$(te,null,be(A(c),(Re,Et)=>(v(),$("button",{key:Et,type:"button",class:W(A(y).e("shortcut")),onClick:ln=>A(S)(Re)},M(Re.text),11,["onClick"]))),128))],2)):O("v-if",!0),g("div",{class:W(A(y).e("body"))},[A(Ce)?(v(),$("div",{key:0,class:W(A(C).e("time-header"))},[g("span",{class:W(A(C).e("editors-wrap"))},[g("span",{class:W(A(C).e("time-picker-wrap"))},[_(A(vt),{size:"small",disabled:A(b).selecting,placeholder:A(P)("el.datepicker.startDate"),class:W(A(C).e("editor")),"model-value":A(K),"validate-event":!1,onInput:Re=>Ie(Re,"min"),onChange:Re=>_e(Re,"min")},null,8,["disabled","placeholder","class","model-value","onInput","onChange"])],2),Pe((v(),$("span",{class:W(A(C).e("time-picker-wrap"))},[_(A(vt),{size:"small",class:W(A(C).e("editor")),disabled:A(b).selecting,placeholder:A(P)("el.datepicker.startTime"),"model-value":A(F),"validate-event":!1,onFocus:Re=>Fe.value=!0,onInput:Re=>le(Re,"min"),onChange:Re=>ke(Re,"min")},null,8,["class","disabled","placeholder","model-value","onFocus","onInput","onChange"]),_(A(k6),{visible:Fe.value,format:A(ie),"datetime-role":"start","parsed-value":h.value,onPick:Xe},null,8,["visible","format","parsed-value"])],2)),[[A(mf),Oe]])],2),g("span",null,[_(A(ye),null,{default:w(()=>[_(A(kr))]),_:1})]),g("span",{class:W([A(C).e("editors-wrap"),"is-right"])},[g("span",{class:W(A(C).e("time-picker-wrap"))},[_(A(vt),{size:"small",class:W(A(C).e("editor")),disabled:A(b).selecting,placeholder:A(P)("el.datepicker.endDate"),"model-value":A(N),readonly:!A(p),"validate-event":!1,onInput:Re=>Ie(Re,"max"),onChange:Re=>_e(Re,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onInput","onChange"])],2),Pe((v(),$("span",{class:W(A(C).e("time-picker-wrap"))},[_(A(vt),{size:"small",class:W(A(C).e("editor")),disabled:A(b).selecting,placeholder:A(P)("el.datepicker.endTime"),"model-value":A(Q),readonly:!A(p),"validate-event":!1,onFocus:Re=>A(p)&&(Ue.value=!0),onInput:Re=>le(Re,"max"),onChange:Re=>ke(Re,"max")},null,8,["class","disabled","placeholder","model-value","readonly","onFocus","onInput","onChange"]),_(A(k6),{"datetime-role":"end",visible:Ue.value,format:A(ie),"parsed-value":f.value,onPick:tt},null,8,["visible","format","parsed-value"])],2)),[[A(mf),ht]])],2)],2)):O("v-if",!0),g("div",{class:W([[A(y).e("content"),A(C).e("content")],"is-left"])},[g("div",{class:W(A(C).e("header"))},[g("button",{type:"button",class:W([A(y).e("icon-btn"),"d-arrow-left"]),"aria-label":A(P)("el.datepicker.prevYear"),onClick:Se},[ae(ve.$slots,"prev-year",{},()=>[_(A(ye),null,{default:w(()=>[_(A(gc))]),_:1})])],10,["aria-label"]),g("button",{type:"button",class:W([A(y).e("icon-btn"),"arrow-left"]),"aria-label":A(P)("el.datepicker.prevMonth"),onClick:we},[ae(ve.$slots,"prev-month",{},()=>[_(A(ye),null,{default:w(()=>[_(A(Yu))]),_:1})])],10,["aria-label"]),ve.unlinkPanels?(v(),$("button",{key:0,type:"button",disabled:!A(pe),class:W([[A(y).e("icon-btn"),{"is-disabled":!A(pe)}],"d-arrow-right"]),"aria-label":A(P)("el.datepicker.nextYear"),onClick:re},[ae(ve.$slots,"next-year",{},()=>[_(A(ye),null,{default:w(()=>[_(A(vc))]),_:1})])],10,["disabled","aria-label"])):O("v-if",!0),ve.unlinkPanels?(v(),$("button",{key:1,type:"button",disabled:!A(ne),class:W([[A(y).e("icon-btn"),{"is-disabled":!A(ne)}],"arrow-right"]),"aria-label":A(P)("el.datepicker.nextMonth"),onClick:ge},[ae(ve.$slots,"next-month",{},()=>[_(A(ye),null,{default:w(()=>[_(A(kr))]),_:1})])],10,["disabled","aria-label"])):O("v-if",!0),g("div",null,M(A(V)),1)],2),_(A6,{"selection-mode":"range",date:h.value,"min-date":A(p),"max-date":A(m),"range-state":A(b),"disabled-date":A(i),"cell-class-name":A(o),onChangerange:A(k),onPick:je,onSelect:A(E)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2),g("div",{class:W([[A(y).e("content"),A(C).e("content")],"is-right"])},[g("div",{class:W(A(C).e("header"))},[ve.unlinkPanels?(v(),$("button",{key:0,type:"button",disabled:!A(pe),class:W([[A(y).e("icon-btn"),{"is-disabled":!A(pe)}],"d-arrow-left"]),"aria-label":A(P)("el.datepicker.prevYear"),onClick:ze},[ae(ve.$slots,"prev-year",{},()=>[_(A(ye),null,{default:w(()=>[_(A(gc))]),_:1})])],10,["disabled","aria-label"])):O("v-if",!0),ve.unlinkPanels?(v(),$("button",{key:1,type:"button",disabled:!A(ne),class:W([[A(y).e("icon-btn"),{"is-disabled":!A(ne)}],"arrow-left"]),"aria-label":A(P)("el.datepicker.prevMonth"),onClick:st},[ae(ve.$slots,"prev-month",{},()=>[_(A(ye),null,{default:w(()=>[_(A(Yu))]),_:1})])],10,["disabled","aria-label"])):O("v-if",!0),g("button",{type:"button","aria-label":A(P)("el.datepicker.nextYear"),class:W([A(y).e("icon-btn"),"d-arrow-right"]),onClick:oe},[ae(ve.$slots,"next-year",{},()=>[_(A(ye),null,{default:w(()=>[_(A(vc))]),_:1})])],10,["aria-label"]),g("button",{type:"button",class:W([A(y).e("icon-btn"),"arrow-right"]),"aria-label":A(P)("el.datepicker.nextMonth"),onClick:ce},[ae(ve.$slots,"next-month",{},()=>[_(A(ye),null,{default:w(()=>[_(A(kr))]),_:1})])],10,["aria-label"]),g("div",null,M(A(D)),1)],2),_(A6,{"selection-mode":"range",date:f.value,"min-date":A(p),"max-date":A(m),"range-state":A(b),"disabled-date":A(i),"cell-class-name":A(o),onChangerange:A(k),onPick:je,onSelect:A(E)},null,8,["date","min-date","max-date","range-state","disabled-date","cell-class-name","onChangerange","onSelect"])],2)],2)],2),A(Ce)?(v(),$("div",{key:0,class:W(A(y).e("footer"))},[A(a)?(v(),R(A(Ge),{key:0,text:"",size:"small",class:W(A(y).e("link-btn")),onClick:Ne},{default:w(()=>[G(M(A(P)("el.datepicker.clear")),1)]),_:1},8,["class"])):O("v-if",!0),_(A(Ge),{plain:"",size:"small",class:W(A(y).e("link-btn")),disabled:A(Ae),onClick:Re=>A(x)(!1)},{default:w(()=>[G(M(A(P)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled","onClick"])],2)):O("v-if",!0)],2))}});var Ufe=Ye(Hfe,[["__file","panel-date-range.vue"]]);const jfe=Ze({...c4}),Wfe=["pick","set-picker-option","calendar-change"],Yfe=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const{t:s}=fn(),i=()=>{e.value=e.value.subtract(1,"year"),t.value||(n.value=n.value.subtract(1,"year"))},o=()=>{t.value||(e.value=e.value.add(1,"year")),n.value=n.value.add(1,"year")},r=()=>{e.value=e.value.add(1,"year")},a=()=>{n.value=n.value.subtract(1,"year")},l=q(()=>`${e.value.year()} ${s("el.datepicker.year")}`),c=q(()=>`${n.value.year()} ${s("el.datepicker.year")}`),u=q(()=>e.value.year()),d=q(()=>n.value.year()===e.value.year()?e.value.year()+1:n.value.year());return{leftPrevYear:i,rightNextYear:o,leftNextYear:r,rightPrevYear:a,leftLabel:l,rightLabel:c,leftYear:u,rightYear:d}},m0="year",Gfe=se({name:"DatePickerMonthRange"}),qfe=se({...Gfe,props:jfe,emits:Wfe,setup(t,{emit:e}){const n=t,{lang:s}=fn(),i=qe("EP_PICKER_BASE"),{shortcuts:o,disabledDate:r}=i.props,a=kn(i.props,"format"),l=kn(i.props,"defaultValue"),c=J(ut().locale(s.value)),u=J(ut().locale(s.value).add(1,m0)),{minDate:d,maxDate:h,rangeState:f,ppNs:p,drpNs:m,handleChangeRange:b,handleRangeConfirm:y,handleShortcutClick:C,onSelect:k}=xR(n,{defaultValue:l,leftDate:c,rightDate:u,unit:m0,onParsedValueChanged:K}),x=q(()=>!!o.length),{leftPrevYear:S,rightNextYear:E,leftNextYear:T,rightPrevYear:P,leftLabel:I,rightLabel:L,leftYear:V,rightYear:D}=Yfe({unlinkPanels:kn(n,"unlinkPanels"),leftDate:c,rightDate:u}),z=q(()=>n.unlinkPanels&&D.value>V.value+1),Y=(N,F=!0)=>{const Q=N.minDate,ie=N.maxDate;h.value===ie&&d.value===Q||(e("calendar-change",[Q.toDate(),ie&&ie.toDate()]),h.value=ie,d.value=Q,F&&y())},B=()=>{c.value=d4(A(l),{lang:A(s),unit:"year",unlinkPanels:n.unlinkPanels})[0],u.value=c.value.add(1,"year"),e("pick",null)},U=N=>Le(N)?N.map(F=>F.format(a.value)):N.format(a.value),X=N=>Le(N)?N.map(F=>ut(F,a.value).locale(s.value)):ut(N,a.value).locale(s.value);function K(N,F){if(n.unlinkPanels&&F){const Q=(N==null?void 0:N.year())||0,ie=F.year();u.value=Q===ie?F.add(1,m0):F}else u.value=c.value.add(1,m0)}return e("set-picker-option",["isValidValue",gf]),e("set-picker-option",["formatToString",U]),e("set-picker-option",["parseUserInput",X]),e("set-picker-option",["handleClear",B]),(N,F)=>(v(),$("div",{class:W([A(p).b(),A(m).b(),{"has-sidebar":!!N.$slots.sidebar||A(x)}])},[g("div",{class:W(A(p).e("body-wrapper"))},[ae(N.$slots,"sidebar",{class:W(A(p).e("sidebar"))}),A(x)?(v(),$("div",{key:0,class:W(A(p).e("sidebar"))},[(v(!0),$(te,null,be(A(o),(Q,ie)=>(v(),$("button",{key:ie,type:"button",class:W(A(p).e("shortcut")),onClick:Z=>A(C)(Q)},M(Q.text),11,["onClick"]))),128))],2)):O("v-if",!0),g("div",{class:W(A(p).e("body"))},[g("div",{class:W([[A(p).e("content"),A(m).e("content")],"is-left"])},[g("div",{class:W(A(m).e("header"))},[g("button",{type:"button",class:W([A(p).e("icon-btn"),"d-arrow-left"]),onClick:A(S)},[ae(N.$slots,"prev-year",{},()=>[_(A(ye),null,{default:w(()=>[_(A(gc))]),_:1})])],10,["onClick"]),N.unlinkPanels?(v(),$("button",{key:0,type:"button",disabled:!A(z),class:W([[A(p).e("icon-btn"),{[A(p).is("disabled")]:!A(z)}],"d-arrow-right"]),onClick:A(T)},[ae(N.$slots,"next-year",{},()=>[_(A(ye),null,{default:w(()=>[_(A(vc))]),_:1})])],10,["disabled","onClick"])):O("v-if",!0),g("div",null,M(A(I)),1)],2),_(M6,{"selection-mode":"range",date:c.value,"min-date":A(d),"max-date":A(h),"range-state":A(f),"disabled-date":A(r),onChangerange:A(b),onPick:Y,onSelect:A(k)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2),g("div",{class:W([[A(p).e("content"),A(m).e("content")],"is-right"])},[g("div",{class:W(A(m).e("header"))},[N.unlinkPanels?(v(),$("button",{key:0,type:"button",disabled:!A(z),class:W([[A(p).e("icon-btn"),{"is-disabled":!A(z)}],"d-arrow-left"]),onClick:A(P)},[ae(N.$slots,"prev-year",{},()=>[_(A(ye),null,{default:w(()=>[_(A(gc))]),_:1})])],10,["disabled","onClick"])):O("v-if",!0),g("button",{type:"button",class:W([A(p).e("icon-btn"),"d-arrow-right"]),onClick:A(E)},[ae(N.$slots,"next-year",{},()=>[_(A(ye),null,{default:w(()=>[_(A(vc))]),_:1})])],10,["onClick"]),g("div",null,M(A(L)),1)],2),_(M6,{"selection-mode":"range",date:u.value,"min-date":A(d),"max-date":A(h),"range-state":A(f),"disabled-date":A(r),onChangerange:A(b),onPick:Y,onSelect:A(k)},null,8,["date","min-date","max-date","range-state","disabled-date","onChangerange","onSelect"])],2)],2)],2)],2))}});var Xfe=Ye(qfe,[["__file","panel-month-range.vue"]]);const Kfe=Ze({...c4}),Zfe=["pick","set-picker-option","calendar-change"],Jfe=({unlinkPanels:t,leftDate:e,rightDate:n})=>{const s=()=>{e.value=e.value.subtract(10,"year"),t.value||(n.value=n.value.subtract(10,"year"))},i=()=>{t.value||(e.value=e.value.add(10,"year")),n.value=n.value.add(10,"year")},o=()=>{e.value=e.value.add(10,"year")},r=()=>{n.value=n.value.subtract(10,"year")},a=q(()=>{const d=Math.floor(e.value.year()/10)*10;return`${d}-${d+9}`}),l=q(()=>{const d=Math.floor(n.value.year()/10)*10;return`${d}-${d+9}`}),c=q(()=>Math.floor(e.value.year()/10)*10+9),u=q(()=>Math.floor(n.value.year()/10)*10);return{leftPrevYear:s,rightNextYear:i,leftNextYear:o,rightPrevYear:r,leftLabel:a,rightLabel:l,leftYear:c,rightYear:u}},S$="year",Qfe=se({name:"DatePickerYearRange"}),epe=se({...Qfe,props:Kfe,emits:Zfe,setup(t,{emit:e}){const n=t,{lang:s}=fn(),i=J(ut().locale(s.value)),o=J(i.value.add(10,"year")),{pickerNs:r}=qe(cb),a=He("date-range-picker"),l=q(()=>!!Y.length),c=q(()=>[r.b(),a.b(),{"has-sidebar":!!Zi().sidebar||l.value}]),u=q(()=>({content:[r.e("content"),a.e("content"),"is-left"],arrowLeftBtn:[r.e("icon-btn"),"d-arrow-left"],arrowRightBtn:[r.e("icon-btn"),{[r.is("disabled")]:!S.value},"d-arrow-right"]})),d=q(()=>({content:[r.e("content"),a.e("content"),"is-right"],arrowLeftBtn:[r.e("icon-btn"),{"is-disabled":!S.value},"d-arrow-left"],arrowRightBtn:[r.e("icon-btn"),"d-arrow-right"]})),h=kR(s),{leftPrevYear:f,rightNextYear:p,leftNextYear:m,rightPrevYear:b,leftLabel:y,rightLabel:C,leftYear:k,rightYear:x}=Jfe({unlinkPanels:kn(n,"unlinkPanels"),leftDate:i,rightDate:o}),S=q(()=>n.unlinkPanels&&x.value>k.value+1),E=J(),T=J(),P=J({endDate:null,selecting:!1}),I=Z=>{P.value=Z},L=(Z,me=!0)=>{const Se=Z.minDate,we=Z.maxDate;T.value===we&&E.value===Se||(e("calendar-change",[Se.toDate(),we&&we.toDate()]),T.value=we,E.value=Se,me&&V())},V=(Z=!1)=>{gf([E.value,T.value])&&e("pick",[E.value,T.value],Z)},D=Z=>{P.value.selecting=Z,Z||(P.value.endDate=null)},z=qe("EP_PICKER_BASE"),{shortcuts:Y,disabledDate:B}=z.props,U=kn(z.props,"format"),X=kn(z.props,"defaultValue"),K=()=>{let Z;if(Le(X.value)){const me=ut(X.value[0]);let Se=ut(X.value[1]);return n.unlinkPanels||(Se=me.add(10,S$)),[me,Se]}else X.value?Z=ut(X.value):Z=ut();return Z=Z.locale(s.value),[Z,Z.add(10,S$)]};Te(()=>X.value,Z=>{if(Z){const me=K();i.value=me[0],o.value=me[1]}},{immediate:!0}),Te(()=>n.parsedValue,Z=>{if(Z&&Z.length===2)if(E.value=Z[0],T.value=Z[1],i.value=E.value,n.unlinkPanels&&T.value){const me=E.value.year(),Se=T.value.year();o.value=me===Se?T.value.add(10,"year"):T.value}else o.value=i.value.add(10,"year");else{const me=K();E.value=void 0,T.value=void 0,i.value=me[0],o.value=me[1]}},{immediate:!0});const N=Z=>Le(Z)?Z.map(me=>ut(me,U.value).locale(s.value)):ut(Z,U.value).locale(s.value),F=Z=>Le(Z)?Z.map(me=>me.format(U.value)):Z.format(U.value),Q=Z=>gf(Z)&&(B?!B(Z[0].toDate())&&!B(Z[1].toDate()):!0),ie=()=>{const Z=K();i.value=Z[0],o.value=Z[1],T.value=void 0,E.value=void 0,e("pick",null)};return e("set-picker-option",["isValidValue",Q]),e("set-picker-option",["parseUserInput",N]),e("set-picker-option",["formatToString",F]),e("set-picker-option",["handleClear",ie]),(Z,me)=>(v(),$("div",{class:W(A(c))},[g("div",{class:W(A(r).e("body-wrapper"))},[ae(Z.$slots,"sidebar",{class:W(A(r).e("sidebar"))}),A(l)?(v(),$("div",{key:0,class:W(A(r).e("sidebar"))},[(v(!0),$(te,null,be(A(Y),(Se,we)=>(v(),$("button",{key:we,type:"button",class:W(A(r).e("shortcut")),onClick:oe=>A(h)(Se)},M(Se.text),11,["onClick"]))),128))],2)):O("v-if",!0),g("div",{class:W(A(r).e("body"))},[g("div",{class:W(A(u).content)},[g("div",{class:W(A(a).e("header"))},[g("button",{type:"button",class:W(A(u).arrowLeftBtn),onClick:A(f)},[ae(Z.$slots,"prev-year",{},()=>[_(A(ye),null,{default:w(()=>[_(A(gc))]),_:1})])],10,["onClick"]),Z.unlinkPanels?(v(),$("button",{key:0,type:"button",disabled:!A(S),class:W(A(u).arrowRightBtn),onClick:A(m)},[ae(Z.$slots,"next-year",{},()=>[_(A(ye),null,{default:w(()=>[_(A(vc))]),_:1})])],10,["disabled","onClick"])):O("v-if",!0),g("div",null,M(A(y)),1)],2),_(E6,{"selection-mode":"range",date:i.value,"min-date":E.value,"max-date":T.value,"range-state":P.value,"disabled-date":A(B),onChangerange:I,onPick:L,onSelect:D},null,8,["date","min-date","max-date","range-state","disabled-date"])],2),g("div",{class:W(A(d).content)},[g("div",{class:W(A(a).e("header"))},[Z.unlinkPanels?(v(),$("button",{key:0,type:"button",disabled:!A(S),class:W(A(d).arrowLeftBtn),onClick:A(b)},[ae(Z.$slots,"prev-year",{},()=>[_(A(ye),null,{default:w(()=>[_(A(gc))]),_:1})])],10,["disabled","onClick"])):O("v-if",!0),g("button",{type:"button",class:W(A(d).arrowRightBtn),onClick:A(p)},[ae(Z.$slots,"next-year",{},()=>[_(A(ye),null,{default:w(()=>[_(A(vc))]),_:1})])],10,["onClick"]),g("div",null,M(A(C)),1)],2),_(E6,{"selection-mode":"range",date:o.value,"min-date":E.value,"max-date":T.value,"range-state":P.value,"disabled-date":A(B),onChangerange:I,onPick:L,onSelect:D},null,8,["date","min-date","max-date","range-state","disabled-date"])],2)],2)],2)],2))}});var tpe=Ye(epe,[["__file","panel-year-range.vue"]]);const npe=function(t){switch(t){case"daterange":case"datetimerange":return Ufe;case"monthrange":return Xfe;case"yearrange":return tpe;default:return Bfe}};ut.extend(Ede);ut.extend(pfe);ut.extend(DD);ut.extend(gfe);ut.extend(_fe);ut.extend(bfe);ut.extend(Cfe);ut.extend(xfe);var spe=se({name:"ElDatePicker",install:null,props:Sfe,emits:["update:modelValue"],setup(t,{expose:e,emit:n,slots:s}){const i=He("picker-panel");It("ElPopperOptions",as(kn(t,"popperOptions"))),It(cb,{slots:s,pickerNs:i});const o=J();e({focus:(l=!0)=>{var c;(c=o.value)==null||c.focus(l)},handleOpen:()=>{var l;(l=o.value)==null||l.handleOpen()},handleClose:()=>{var l;(l=o.value)==null||l.handleClose()}});const a=l=>{n("update:modelValue",l)};return()=>{var l;const c=(l=t.format)!=null?l:ode[t.type]||eh,u=npe(t.type);return _(cde,Mn(t,{format:c,type:t.type,ref:o,"onUpdate:modelValue":a}),{default:d=>_(u,d,{"prev-month":s["prev-month"],"next-month":s["next-month"],"prev-year":s["prev-year"],"next-year":s["next-year"]}),"range-separator":s["range-separator"]})}}});const md=jt(spe),ipe=Ze({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:xe([String,Array,Object])},zIndex:{type:xe([String,Number])}}),ope={click:t=>t instanceof MouseEvent},rpe="overlay";var ape=se({name:"ElOverlay",props:ipe,emits:ope,setup(t,{slots:e,emit:n}){const s=He(rpe),i=l=>{n("click",l)},{onClick:o,onMousedown:r,onMouseup:a}=Xx(t.customMaskEvent?void 0:i);return()=>t.mask?_("div",{class:[s.b(),t.overlayClass],style:{zIndex:t.zIndex},onClick:o,onMousedown:r,onMouseup:a},[ae(e,"default")],W0.STYLE|W0.CLASS|W0.PROPS,["onClick","onMouseup","onMousedown"]):gt("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[ae(e,"default")])}});const f4=ape,SR=Symbol("dialogInjectionKey"),$R=Ze({center:Boolean,alignCenter:Boolean,closeIcon:{type:ms},draggable:Boolean,overflow:Boolean,fullscreen:Boolean,showClose:{type:Boolean,default:!0},title:{type:String,default:""},ariaLevel:{type:String,default:"2"}}),lpe={close:()=>!0},cpe=se({name:"ElDialogContent"}),upe=se({...cpe,props:$R,emits:lpe,setup(t,{expose:e}){const n=t,{t:s}=fn(),{Close:i}=EO,{dialogRef:o,headerRef:r,bodyId:a,ns:l,style:c}=qe(SR),{focusTrapRef:u}=qe(i4),d=q(()=>[l.b(),l.is("fullscreen",n.fullscreen),l.is("draggable",n.draggable),l.is("align-center",n.alignCenter),{[l.m("center")]:n.center}]),h=Nx(u,o),f=q(()=>n.draggable),p=q(()=>n.overflow),{resetPosition:m}=OO(o,r,f,p);return e({resetPosition:m}),(b,y)=>(v(),$("div",{ref:A(h),class:W(A(d)),style:Ke(A(c)),tabindex:"-1"},[g("header",{ref_key:"headerRef",ref:r,class:W([A(l).e("header"),{"show-close":b.showClose}])},[ae(b.$slots,"header",{},()=>[g("span",{role:"heading","aria-level":b.ariaLevel,class:W(A(l).e("title"))},M(b.title),11,["aria-level"])]),b.showClose?(v(),$("button",{key:0,"aria-label":A(s)("el.dialog.close"),class:W(A(l).e("headerbtn")),type:"button",onClick:C=>b.$emit("close")},[_(A(ye),{class:W(A(l).e("close"))},{default:w(()=>[(v(),R(Tt(b.closeIcon||A(i))))]),_:1},8,["class"])],10,["aria-label","onClick"])):O("v-if",!0)],2),g("div",{id:A(a),class:W(A(l).e("body"))},[ae(b.$slots,"default")],10,["id"]),b.$slots.footer?(v(),$("footer",{key:0,class:W(A(l).e("footer"))},[ae(b.$slots,"footer")],2)):O("v-if",!0)],6))}});var dpe=Ye(upe,[["__file","dialog-content.vue"]]);const AR=Ze({...$R,appendToBody:Boolean,appendTo:{type:xe([String,Object]),default:"body"},beforeClose:{type:xe(Function)},destroyOnClose:Boolean,closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},openDelay:{type:Number,default:0},closeDelay:{type:Number,default:0},top:{type:String},modelValue:Boolean,modalClass:String,width:{type:[String,Number]},zIndex:{type:Number},trapFocus:Boolean,headerAriaLevel:{type:String,default:"2"}}),MR={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[mn]:t=>li(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},ER=(t,e)=>{var n;const i=pt().emit,{nextZIndex:o}=Qy();let r="";const a=tr(),l=tr(),c=J(!1),u=J(!1),d=J(!1),h=J((n=t.zIndex)!=null?n:o());let f,p;const m=ib("namespace",gm),b=q(()=>{const B={},U=`--${m.value}-dialog`;return t.fullscreen||(t.top&&(B[`${U}-margin-top`]=t.top),t.width&&(B[`${U}-width`]=Ai(t.width))),B}),y=q(()=>t.alignCenter?{display:"flex"}:{});function C(){i("opened")}function k(){i("closed"),i(mn,!1),t.destroyOnClose&&(d.value=!1)}function x(){i("close")}function S(){p==null||p(),f==null||f(),t.openDelay&&t.openDelay>0?{stop:f}=j3(()=>I(),t.openDelay):I()}function E(){f==null||f(),p==null||p(),t.closeDelay&&t.closeDelay>0?{stop:p}=j3(()=>L(),t.closeDelay):L()}function T(){function B(U){U||(u.value=!0,c.value=!1)}t.beforeClose?t.beforeClose(B):E()}function P(){t.closeOnClickModal&&T()}function I(){Ut&&(c.value=!0)}function L(){c.value=!1}function V(){i("openAutoFocus")}function D(){i("closeAutoFocus")}function z(B){var U;((U=B.detail)==null?void 0:U.focusReason)==="pointer"&&B.preventDefault()}t.lockScroll&&VO(c);function Y(){t.closeOnPressEscape&&T()}return Te(()=>t.modelValue,B=>{B?(u.value=!1,S(),d.value=!0,h.value=dO(t.zIndex)?o():h.value++,dt(()=>{i("open"),e.value&&(e.value.scrollTop=0)})):c.value&&E()}),Te(()=>t.fullscreen,B=>{e.value&&(B?(r=e.value.style.transform,e.value.style.transform=""):e.value.style.transform=r)}),Pt(()=>{t.modelValue&&(c.value=!0,d.value=!0,S())}),{afterEnter:C,afterLeave:k,beforeLeave:x,handleClose:T,onModalClick:P,close:E,doClose:L,onOpenAutoFocus:V,onCloseAutoFocus:D,onCloseRequested:Y,onFocusoutPrevented:z,titleId:a,bodyId:l,closed:u,style:b,overlayDialogStyle:y,rendered:d,visible:c,zIndex:h}},hpe=se({name:"ElDialog",inheritAttrs:!1}),fpe=se({...hpe,props:AR,emits:MR,setup(t,{expose:e}){const n=t,s=Zi();sc({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"},q(()=>!!s.title));const i=He("dialog"),o=J(),r=J(),a=J(),{visible:l,titleId:c,bodyId:u,style:d,overlayDialogStyle:h,rendered:f,zIndex:p,afterEnter:m,afterLeave:b,beforeLeave:y,handleClose:C,onModalClick:k,onOpenAutoFocus:x,onCloseAutoFocus:S,onCloseRequested:E,onFocusoutPrevented:T}=ER(n,o);It(SR,{dialogRef:o,headerRef:r,bodyId:u,ns:i,rendered:f,style:d});const P=Xx(k),I=q(()=>n.draggable&&!n.fullscreen);return e({visible:l,dialogContentRef:a,resetPosition:()=>{var V;(V=a.value)==null||V.resetPosition()}}),(V,D)=>(v(),R(A(lb),{to:V.appendTo,disabled:V.appendTo!=="body"?!1:!V.appendToBody},{default:w(()=>[_(bo,{name:"dialog-fade",onAfterEnter:A(m),onAfterLeave:A(b),onBeforeLeave:A(y),persisted:""},{default:w(()=>[Pe(_(A(f4),{"custom-mask-event":"",mask:V.modal,"overlay-class":V.modalClass,"z-index":A(p)},{default:w(()=>[g("div",{role:"dialog","aria-modal":"true","aria-label":V.title||void 0,"aria-labelledby":V.title?void 0:A(c),"aria-describedby":A(u),class:W(`${A(i).namespace.value}-overlay-dialog`),style:Ke(A(h)),onClick:A(P).onClick,onMousedown:A(P).onMousedown,onMouseup:A(P).onMouseup},[_(A(rb),{loop:"",trapped:A(l),"focus-start-el":"container",onFocusAfterTrapped:A(x),onFocusAfterReleased:A(S),onFocusoutPrevented:A(T),onReleaseRequested:A(E)},{default:w(()=>[A(f)?(v(),R(dpe,Mn({key:0,ref_key:"dialogContentRef",ref:a},V.$attrs,{center:V.center,"align-center":V.alignCenter,"close-icon":V.closeIcon,draggable:A(I),overflow:V.overflow,fullscreen:V.fullscreen,"show-close":V.showClose,title:V.title,"aria-level":V.headerAriaLevel,onClose:A(C)}),Es({header:w(()=>[V.$slots.title?ae(V.$slots,"title",{key:1}):ae(V.$slots,"header",{key:0,close:A(C),titleId:A(c),titleClass:A(i).e("title")})]),default:w(()=>[ae(V.$slots,"default")]),_:2},[V.$slots.footer?{name:"footer",fn:w(()=>[ae(V.$slots,"footer")])}:void 0]),1040,["center","align-center","close-icon","draggable","overflow","fullscreen","show-close","title","aria-level","onClose"])):O("v-if",!0)]),_:3},8,["trapped","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])],46,["aria-label","aria-labelledby","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["mask","overlay-class","z-index"]),[[Xt,A(l)]])]),_:3},8,["onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var ppe=Ye(fpe,[["__file","dialog.vue"]]);const Ss=jt(ppe),mpe=Ze({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:xe(String),default:"solid"}}),gpe=se({name:"ElDivider"}),vpe=se({...gpe,props:mpe,setup(t){const e=t,n=He("divider"),s=q(()=>n.cssVar({"border-style":e.borderStyle}));return(i,o)=>(v(),$("div",{class:W([A(n).b(),A(n).m(i.direction)]),style:Ke(A(s)),role:"separator"},[i.$slots.default&&i.direction!=="vertical"?(v(),$("div",{key:0,class:W([A(n).e("text"),A(n).is(i.contentPosition)])},[ae(i.$slots,"default")],2)):O("v-if",!0)],6))}});var _pe=Ye(vpe,[["__file","divider.vue"]]);const TR=jt(_pe),ype=Ze({...AR,direction:{type:String,default:"rtl",values:["ltr","rtl","ttb","btt"]},size:{type:[String,Number],default:"30%"},withHeader:{type:Boolean,default:!0},modalFade:{type:Boolean,default:!0},headerAriaLevel:{type:String,default:"2"}}),bpe=MR,wpe=se({name:"ElDrawer",inheritAttrs:!1}),Cpe=se({...wpe,props:ype,emits:bpe,setup(t,{expose:e}){const n=t,s=Zi();sc({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"},q(()=>!!s.title));const i=J(),o=J(),r=He("drawer"),{t:a}=fn(),{afterEnter:l,afterLeave:c,beforeLeave:u,visible:d,rendered:h,titleId:f,bodyId:p,zIndex:m,onModalClick:b,onOpenAutoFocus:y,onCloseAutoFocus:C,onFocusoutPrevented:k,onCloseRequested:x,handleClose:S}=ER(n,i),E=q(()=>n.direction==="rtl"||n.direction==="ltr"),T=q(()=>Ai(n.size));return e({handleClose:S,afterEnter:l,afterLeave:c}),(P,I)=>(v(),R(A(lb),{to:P.appendTo,disabled:P.appendTo!=="body"?!1:!P.appendToBody},{default:w(()=>[_(bo,{name:A(r).b("fade"),onAfterEnter:A(l),onAfterLeave:A(c),onBeforeLeave:A(u),persisted:""},{default:w(()=>[Pe(_(A(f4),{mask:P.modal,"overlay-class":P.modalClass,"z-index":A(m),onClick:A(b)},{default:w(()=>[_(A(rb),{loop:"",trapped:A(d),"focus-trap-el":i.value,"focus-start-el":o.value,onFocusAfterTrapped:A(y),onFocusAfterReleased:A(C),onFocusoutPrevented:A(k),onReleaseRequested:A(x)},{default:w(()=>[g("div",Mn({ref_key:"drawerRef",ref:i,"aria-modal":"true","aria-label":P.title||void 0,"aria-labelledby":P.title?void 0:A(f),"aria-describedby":A(p)},P.$attrs,{class:[A(r).b(),P.direction,A(d)&&"open"],style:A(E)?"width: "+A(T):"height: "+A(T),role:"dialog",onClick:Be(()=>{},["stop"])}),[g("span",{ref_key:"focusStartRef",ref:o,class:W(A(r).e("sr-focus")),tabindex:"-1"},null,2),P.withHeader?(v(),$("header",{key:0,class:W(A(r).e("header"))},[P.$slots.title?ae(P.$slots,"title",{key:1},()=>[O(" DEPRECATED SLOT ")]):ae(P.$slots,"header",{key:0,close:A(S),titleId:A(f),titleClass:A(r).e("title")},()=>[P.$slots.title?O("v-if",!0):(v(),$("span",{key:0,id:A(f),role:"heading","aria-level":P.headerAriaLevel,class:W(A(r).e("title"))},M(P.title),11,["id","aria-level"]))]),P.showClose?(v(),$("button",{key:2,"aria-label":A(a)("el.drawer.close"),class:W(A(r).e("close-btn")),type:"button",onClick:A(S)},[_(A(ye),{class:W(A(r).e("close"))},{default:w(()=>[_(A(Ir))]),_:1},8,["class"])],10,["aria-label","onClick"])):O("v-if",!0)],2)):O("v-if",!0),A(h)?(v(),$("div",{key:1,id:A(p),class:W(A(r).e("body"))},[ae(P.$slots,"default")],10,["id"])):O("v-if",!0),P.$slots.footer?(v(),$("div",{key:2,class:W(A(r).e("footer"))},[ae(P.$slots,"footer")],2)):O("v-if",!0)],16,["aria-label","aria-labelledby","aria-describedby","onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[Xt,A(d)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}});var kpe=Ye(Cpe,[["__file","drawer.vue"]]);const or=jt(kpe),xpe=se({inheritAttrs:!1});function Spe(t,e,n,s,i,o){return ae(t.$slots,"default")}var $pe=Ye(xpe,[["render",Spe],["__file","collection.vue"]]);const Ape=se({name:"ElCollectionItem",inheritAttrs:!1});function Mpe(t,e,n,s,i,o){return ae(t.$slots,"default")}var Epe=Ye(Ape,[["render",Mpe],["__file","collection-item.vue"]]);const PR="data-el-collection-item",IR=t=>{const e=`El${t}Collection`,n=`${e}Item`,s=Symbol(e),i=Symbol(n),o={...$pe,name:e,setup(){const a=J(null),l=new Map;It(s,{itemMap:l,getItems:()=>{const u=A(a);if(!u)return[];const d=Array.from(u.querySelectorAll(`[${PR}]`));return[...l.values()].sort((f,p)=>d.indexOf(f.ref)-d.indexOf(p.ref))},collectionRef:a})}},r={...Epe,name:n,setup(a,{attrs:l}){const c=J(null),u=qe(s,void 0);It(i,{collectionItemRef:c}),Pt(()=>{const d=A(c);d&&u.itemMap.set(d,{ref:d,...l})}),Gn(()=>{const d=A(c);u.itemMap.delete(d)})}};return{COLLECTION_INJECTION_KEY:s,COLLECTION_ITEM_INJECTION_KEY:i,ElCollection:o,ElCollectionItem:r}},Tpe=Ze({style:{type:xe([String,Array,Object])},currentTabId:{type:xe(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:xe(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:Ppe,ElCollectionItem:Ipe,COLLECTION_INJECTION_KEY:p4,COLLECTION_ITEM_INJECTION_KEY:Lpe}=IR("RovingFocusGroup"),m4=Symbol("elRovingFocusGroup"),LR=Symbol("elRovingFocusGroupItem"),Ope={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},Dpe=(t,e)=>{if(e!=="rtl")return t;switch(t){case ft.right:return ft.left;case ft.left:return ft.right;default:return t}},Rpe=(t,e,n)=>{const s=Dpe(t.key,n);if(!(e==="vertical"&&[ft.left,ft.right].includes(s))&&!(e==="horizontal"&&[ft.up,ft.down].includes(s)))return Ope[s]},Vpe=(t,e)=>t.map((n,s)=>t[(s+e)%t.length]),g4=t=>{const{activeElement:e}=document;for(const n of t)if(n===e||(n.focus(),e!==document.activeElement))return},$$="currentTabIdChange",A$="rovingFocusGroup.entryFocus",Fpe={bubbles:!1,cancelable:!0},Npe=se({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:Tpe,emits:[$$,"entryFocus"],setup(t,{emit:e}){var n;const s=J((n=t.currentTabId||t.defaultCurrentTabId)!=null?n:null),i=J(!1),o=J(!1),r=J(null),{getItems:a}=qe(p4,void 0),l=q(()=>[{outline:"none"},t.style]),c=m=>{e($$,m)},u=()=>{i.value=!0},d=fs(m=>{var b;(b=t.onMousedown)==null||b.call(t,m)},()=>{o.value=!0}),h=fs(m=>{var b;(b=t.onFocus)==null||b.call(t,m)},m=>{const b=!A(o),{target:y,currentTarget:C}=m;if(y===C&&b&&!A(i)){const k=new Event(A$,Fpe);if(C==null||C.dispatchEvent(k),!k.defaultPrevented){const x=a().filter(I=>I.focusable),S=x.find(I=>I.active),E=x.find(I=>I.id===A(s)),P=[S,E,...x].filter(Boolean).map(I=>I.ref);g4(P)}}o.value=!1}),f=fs(m=>{var b;(b=t.onBlur)==null||b.call(t,m)},()=>{i.value=!1}),p=(...m)=>{e("entryFocus",...m)};It(m4,{currentTabbedId:dc(s),loop:kn(t,"loop"),tabIndex:q(()=>A(i)?-1:0),rovingFocusGroupRef:r,rovingFocusGroupRootStyle:l,orientation:kn(t,"orientation"),dir:kn(t,"dir"),onItemFocus:c,onItemShiftTab:u,onBlur:f,onFocus:h,onMousedown:d}),Te(()=>t.currentTabId,m=>{s.value=m??null}),is(r,A$,p)}});function Bpe(t,e,n,s,i,o){return ae(t.$slots,"default")}var zpe=Ye(Npe,[["render",Bpe],["__file","roving-focus-group-impl.vue"]]);const Hpe=se({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:Ppe,ElRovingFocusGroupImpl:zpe}});function Upe(t,e,n,s,i,o){const r=H("el-roving-focus-group-impl"),a=H("el-focus-group-collection");return v(),R(a,null,{default:w(()=>[_(r,Ck(Uk(t.$attrs)),{default:w(()=>[ae(t.$slots,"default")]),_:3},16)]),_:3})}var jpe=Ye(Hpe,[["render",Upe],["__file","roving-focus-group.vue"]]);const Wpe=se({components:{ElRovingFocusCollectionItem:Ipe},props:{focusable:{type:Boolean,default:!0},active:{type:Boolean,default:!1}},emits:["mousedown","focus","keydown"],setup(t,{emit:e}){const{currentTabbedId:n,loop:s,onItemFocus:i,onItemShiftTab:o}=qe(m4,void 0),{getItems:r}=qe(p4,void 0),a=tr(),l=J(null),c=fs(f=>{e("mousedown",f)},f=>{t.focusable?i(A(a)):f.preventDefault()}),u=fs(f=>{e("focus",f)},()=>{i(A(a))}),d=fs(f=>{e("keydown",f)},f=>{const{key:p,shiftKey:m,target:b,currentTarget:y}=f;if(p===ft.tab&&m){o();return}if(b!==y)return;const C=Rpe(f);if(C){f.preventDefault();let x=r().filter(S=>S.focusable).map(S=>S.ref);switch(C){case"last":{x.reverse();break}case"prev":case"next":{C==="prev"&&x.reverse();const S=x.indexOf(y);x=s.value?Vpe(x,S+1):x.slice(S+1);break}}dt(()=>{g4(x)})}}),h=q(()=>n.value===A(a));return It(LR,{rovingFocusGroupItemRef:l,tabIndex:q(()=>A(h)?0:-1),handleMousedown:c,handleFocus:u,handleKeydown:d}),{id:a,handleKeydown:d,handleFocus:u,handleMousedown:c}}});function Ype(t,e,n,s,i,o){const r=H("el-roving-focus-collection-item");return v(),R(r,{id:t.id,focusable:t.focusable,active:t.active},{default:w(()=>[ae(t.$slots,"default")]),_:3},8,["id","focusable","active"])}var Gpe=Ye(Wpe,[["render",Ype],["__file","roving-focus-item.vue"]]);const Q0=Ze({trigger:_g.trigger,effect:{...Bi.effect,default:"light"},type:{type:xe(String)},placement:{type:xe(String),default:"bottom"},popperOptions:{type:xe(Object),default:()=>({})},id:String,size:{type:String,default:""},splitButton:Boolean,hideOnClick:{type:Boolean,default:!0},loop:{type:Boolean,default:!0},showTimeout:{type:Number,default:150},hideTimeout:{type:Number,default:150},tabindex:{type:xe([Number,String]),default:0},maxHeight:{type:xe([Number,String]),default:""},popperClass:{type:String,default:""},disabled:Boolean,role:{type:String,default:"menu"},buttonProps:{type:xe(Object)},teleported:Bi.teleported}),OR=Ze({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:ms}}),qpe=Ze({onKeydown:{type:xe(Function)}}),Xpe=[ft.down,ft.pageDown,ft.home],DR=[ft.up,ft.pageUp,ft.end],Kpe=[...Xpe,...DR],{ElCollection:Zpe,ElCollectionItem:Jpe,COLLECTION_INJECTION_KEY:Qpe,COLLECTION_ITEM_INJECTION_KEY:eme}=IR("Dropdown"),ub=Symbol("elDropdown"),{ButtonGroup:tme}=Ge,nme=se({name:"ElDropdown",components:{ElButton:Ge,ElButtonGroup:tme,ElScrollbar:ui,ElDropdownCollection:Zpe,ElTooltip:di,ElRovingFocusGroup:jpe,ElOnlyChild:kD,ElIcon:ye,ArrowDown:ud},props:Q0,emits:["visible-change","click","command"],setup(t,{emit:e}){const n=pt(),s=He("dropdown"),{t:i}=fn(),o=J(),r=J(),a=J(null),l=J(null),c=J(null),u=J(null),d=J(!1),h=[ft.enter,ft.space,ft.down],f=q(()=>({maxHeight:Ai(t.maxHeight)})),p=q(()=>[s.m(S.value)]),m=q(()=>Hi(t.trigger)),b=tr().value,y=q(()=>t.id||b);Te([o,m],([X,K],[N])=>{var F,Q,ie;(F=N==null?void 0:N.$el)!=null&&F.removeEventListener&&N.$el.removeEventListener("pointerenter",T),(Q=X==null?void 0:X.$el)!=null&&Q.removeEventListener&&X.$el.removeEventListener("pointerenter",T),(ie=X==null?void 0:X.$el)!=null&&ie.addEventListener&&K.includes("hover")&&X.$el.addEventListener("pointerenter",T)},{immediate:!0}),Gn(()=>{var X,K;(K=(X=o.value)==null?void 0:X.$el)!=null&&K.removeEventListener&&o.value.$el.removeEventListener("pointerenter",T)});function C(){k()}function k(){var X;(X=a.value)==null||X.onClose()}function x(){var X;(X=a.value)==null||X.onOpen()}const S=Mi();function E(...X){e("command",...X)}function T(){var X,K;(K=(X=o.value)==null?void 0:X.$el)==null||K.focus()}function P(){}function I(){const X=A(l);m.value.includes("hover")&&(X==null||X.focus()),u.value=null}function L(X){u.value=X}function V(X){d.value||(X.preventDefault(),X.stopImmediatePropagation())}function D(){e("visible-change",!0)}function z(X){(X==null?void 0:X.type)==="keydown"&&l.value.focus()}function Y(){e("visible-change",!1)}return It(ub,{contentRef:l,role:q(()=>t.role),triggerId:y,isUsingKeyboard:d,onItemEnter:P,onItemLeave:I}),It("elDropdown",{instance:n,dropdownSize:S,handleClick:C,commandHandler:E,trigger:kn(t,"trigger"),hideOnClick:kn(t,"hideOnClick")}),{t:i,ns:s,scrollbar:c,wrapStyle:f,dropdownTriggerKls:p,dropdownSize:S,triggerId:y,triggerKeys:h,currentTabId:u,handleCurrentTabIdChange:L,handlerMainButtonClick:X=>{e("click",X)},handleEntryFocus:V,handleClose:k,handleOpen:x,handleBeforeShowTooltip:D,handleShowTooltip:z,handleBeforeHideTooltip:Y,onFocusAfterTrapped:X=>{var K,N;X.preventDefault(),(N=(K=l.value)==null?void 0:K.focus)==null||N.call(K,{preventScroll:!0})},popperRef:a,contentRef:l,triggeringElementRef:o,referenceElementRef:r}}});function sme(t,e,n,s,i,o){var r;const a=H("el-dropdown-collection"),l=H("el-roving-focus-group"),c=H("el-scrollbar"),u=H("el-only-child"),d=H("el-tooltip"),h=H("el-button"),f=H("arrow-down"),p=H("el-icon"),m=H("el-button-group");return v(),$("div",{class:W([t.ns.b(),t.ns.is("disabled",t.disabled)])},[_(d,{ref:"popperRef",role:t.role,effect:t.effect,"fallback-placements":["bottom","top"],"popper-options":t.popperOptions,"gpu-acceleration":!1,"hide-after":t.trigger==="hover"?t.hideTimeout:0,"manual-mode":!0,placement:t.placement,"popper-class":[t.ns.e("popper"),t.popperClass],"reference-element":(r=t.referenceElementRef)==null?void 0:r.$el,trigger:t.trigger,"trigger-keys":t.triggerKeys,"trigger-target-el":t.contentRef,"show-after":t.trigger==="hover"?t.showTimeout:0,"stop-popper-mouse-event":!1,"virtual-ref":t.triggeringElementRef,"virtual-triggering":t.splitButton,disabled:t.disabled,transition:`${t.ns.namespace.value}-zoom-in-top`,teleported:t.teleported,pure:"",persistent:"",onBeforeShow:t.handleBeforeShowTooltip,onShow:t.handleShowTooltip,onBeforeHide:t.handleBeforeHideTooltip},Es({content:w(()=>[_(c,{ref:"scrollbar","wrap-style":t.wrapStyle,tag:"div","view-class":t.ns.e("list")},{default:w(()=>[_(l,{loop:t.loop,"current-tab-id":t.currentTabId,orientation:"horizontal",onCurrentTabIdChange:t.handleCurrentTabIdChange,onEntryFocus:t.handleEntryFocus},{default:w(()=>[_(a,null,{default:w(()=>[ae(t.$slots,"dropdown")]),_:3})]),_:3},8,["loop","current-tab-id","onCurrentTabIdChange","onEntryFocus"])]),_:3},8,["wrap-style","view-class"])]),_:2},[t.splitButton?void 0:{name:"default",fn:w(()=>[_(u,{id:t.triggerId,ref:"triggeringElementRef",role:"button",tabindex:t.tabindex},{default:w(()=>[ae(t.$slots,"default")]),_:3},8,["id","tabindex"])])}]),1032,["role","effect","popper-options","hide-after","placement","popper-class","reference-element","trigger","trigger-keys","trigger-target-el","show-after","virtual-ref","virtual-triggering","disabled","transition","teleported","onBeforeShow","onShow","onBeforeHide"]),t.splitButton?(v(),R(m,{key:0},{default:w(()=>[_(h,Mn({ref:"referenceElementRef"},t.buttonProps,{size:t.dropdownSize,type:t.type,disabled:t.disabled,tabindex:t.tabindex,onClick:t.handlerMainButtonClick}),{default:w(()=>[ae(t.$slots,"default")]),_:3},16,["size","type","disabled","tabindex","onClick"]),_(h,Mn({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(()=>[_(p,{class:W(t.ns.e("icon"))},{default:w(()=>[_(f)]),_:1},8,["class"])]),_:1},16,["id","size","type","class","disabled","tabindex","aria-label"])]),_:3})):O("v-if",!0)],2)}var ime=Ye(nme,[["render",sme],["__file","dropdown.vue"]]);const ome=se({name:"DropdownItemImpl",components:{ElIcon:ye},props:OR,emits:["pointermove","pointerleave","click","clickimpl"],setup(t,{emit:e}){const n=He("dropdown"),{role:s}=qe(ub,void 0),{collectionItemRef:i}=qe(eme,void 0),{collectionItemRef:o}=qe(Lpe,void 0),{rovingFocusGroupItemRef:r,tabIndex:a,handleFocus:l,handleKeydown:c,handleMousedown:u}=qe(LR,void 0),d=Nx(i,o,r),h=q(()=>s.value==="menu"?"menuitem":s.value==="navigation"?"link":"button"),f=fs(p=>{const{code:m}=p;if(m===ft.enter||m===ft.space)return p.preventDefault(),p.stopImmediatePropagation(),e("clickimpl",p),!0},c);return{ns:n,itemRef:d,dataset:{[PR]:""},role:h,tabIndex:a,handleFocus:l,handleKeydown:f,handleMousedown:u}}});function rme(t,e,n,s,i,o){const r=H("el-icon");return v(),$(te,null,[t.divided?(v(),$("li",Mn({key:0,role:"separator",class:t.ns.bem("menu","item","divided")},t.$attrs),null,16)):O("v-if",!0),g("li",Mn({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:a=>t.$emit("clickimpl",a),onFocus:t.handleFocus,onKeydown:Be(t.handleKeydown,["self"]),onMousedown:t.handleMousedown,onPointermove:a=>t.$emit("pointermove",a),onPointerleave:a=>t.$emit("pointerleave",a)}),[t.icon?(v(),R(r,{key:0},{default:w(()=>[(v(),R(Tt(t.icon)))]),_:1})):O("v-if",!0),ae(t.$slots,"default")],16,["aria-disabled","tabindex","role","onClick","onFocus","onKeydown","onMousedown","onPointermove","onPointerleave"])],64)}var ame=Ye(ome,[["render",rme],["__file","dropdown-item-impl.vue"]]);const RR=()=>{const t=qe("elDropdown",{}),e=q(()=>t==null?void 0:t.dropdownSize);return{elDropdown:t,_elDropdownSize:e}},lme=se({name:"ElDropdownItem",components:{ElDropdownCollectionItem:Jpe,ElRovingFocusItem:Gpe,ElDropdownItemImpl:ame},inheritAttrs:!1,props:OR,emits:["pointermove","pointerleave","click"],setup(t,{emit:e,attrs:n}){const{elDropdown:s}=RR(),i=pt(),o=J(null),r=q(()=>{var f,p;return(p=(f=A(o))==null?void 0:f.textContent)!=null?p:""}),{onItemEnter:a,onItemLeave:l}=qe(ub,void 0),c=fs(f=>(e("pointermove",f),f.defaultPrevented),T9(f=>{if(t.disabled){l(f);return}const p=f.currentTarget;p===document.activeElement||p.contains(document.activeElement)||(a(f),f.defaultPrevented||p==null||p.focus())})),u=fs(f=>(e("pointerleave",f),f.defaultPrevented),T9(l)),d=fs(f=>{if(!t.disabled)return e("click",f),f.type!=="keydown"&&f.defaultPrevented},f=>{var p,m,b;if(t.disabled){f.stopImmediatePropagation();return}(p=s==null?void 0:s.hideOnClick)!=null&&p.value&&((m=s.handleClick)==null||m.call(s)),(b=s.commandHandler)==null||b.call(s,t.command,i,f)}),h=q(()=>({...t,...n}));return{handleClick:d,handlePointerMove:c,handlePointerLeave:u,textContent:r,propsAndAttrs:h}}});function cme(t,e,n,s,i,o){var r;const a=H("el-dropdown-item-impl"),l=H("el-roving-focus-item"),c=H("el-dropdown-collection-item");return v(),R(c,{disabled:t.disabled,"text-value":(r=t.textValue)!=null?r:t.textContent},{default:w(()=>[_(l,{focusable:!t.disabled},{default:w(()=>[_(a,Mn(t.propsAndAttrs,{onPointerleave:t.handlePointerLeave,onPointermove:t.handlePointerMove,onClickimpl:t.handleClick}),{default:w(()=>[ae(t.$slots,"default")]),_:3},16,["onPointerleave","onPointermove","onClickimpl"])]),_:3},8,["focusable"])]),_:3},8,["disabled","text-value"])}var VR=Ye(lme,[["render",cme],["__file","dropdown-item.vue"]]);const ume=se({name:"ElDropdownMenu",props:qpe,setup(t){const e=He("dropdown"),{_elDropdownSize:n}=RR(),s=n.value,{focusTrapRef:i,onKeydown:o}=qe(i4,void 0),{contentRef:r,role:a,triggerId:l}=qe(ub,void 0),{collectionRef:c,getItems:u}=qe(Qpe,void 0),{rovingFocusGroupRef:d,rovingFocusGroupRootStyle:h,tabIndex:f,onBlur:p,onFocus:m,onMousedown:b}=qe(m4,void 0),{collectionRef:y}=qe(p4,void 0),C=q(()=>[e.b("menu"),e.bm("menu",s==null?void 0:s.value)]),k=Nx(r,c,i,d,y),x=fs(E=>{var T;(T=t.onKeydown)==null||T.call(t,E)},E=>{const{currentTarget:T,code:P,target:I}=E;if(T.contains(I),ft.tab===P&&E.stopImmediatePropagation(),E.preventDefault(),I!==A(r)||!Kpe.includes(P))return;const V=u().filter(D=>!D.disabled).map(D=>D.ref);DR.includes(P)&&V.reverse(),g4(V)});return{size:s,rovingFocusGroupRootStyle:h,tabIndex:f,dropdownKls:C,role:a,triggerId:l,dropdownListWrapperRef:k,handleKeydown:E=>{x(E),o(E)},onBlur:p,onFocus:m,onMousedown:b}}});function dme(t,e,n,s,i,o){return v(),$("ul",{ref:t.dropdownListWrapperRef,class:W(t.dropdownKls),style:Ke(t.rovingFocusGroupRootStyle),tabindex:-1,role:t.role,"aria-labelledby":t.triggerId,onBlur:t.onBlur,onFocus:t.onFocus,onKeydown:Be(t.handleKeydown,["self"]),onMousedown:Be(t.onMousedown,["self"])},[ae(t.$slots,"default")],46,["role","aria-labelledby","onBlur","onFocus","onKeydown","onMousedown"])}var FR=Ye(ume,[["render",dme],["__file","dropdown-menu.vue"]]);const wa=jt(ime,{DropdownItem:VR,DropdownMenu:FR}),Ca=xs(VR),ka=xs(FR),hme=Ze({urlList:{type:xe(Array),default:()=>si([])},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},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:xe(String)}}),fme={close:()=>!0,switch:t=>xt(t),rotate:t=>xt(t)},pme=se({name:"ElImageViewer"}),mme=se({...pme,props:hme,emits:fme,setup(t,{expose:e,emit:n}){var s;const i=t,o={CONTAIN:{name:"contain",icon:Ki(CO)},ORIGINAL:{name:"original",icon:Ki(_oe)}},{t:r}=fn(),a=He("image-viewer"),{nextZIndex:l}=Qy(),c=J(),u=J([]),d=xy(),h=J(!0),f=J(i.initialIndex),p=ss(o.CONTAIN),m=J({scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),b=J((s=i.zIndex)!=null?s:l()),y=q(()=>{const{urlList:F}=i;return F.length<=1}),C=q(()=>f.value===0),k=q(()=>f.value===i.urlList.length-1),x=q(()=>i.urlList[f.value]),S=q(()=>[a.e("btn"),a.e("prev"),a.is("disabled",!i.infinite&&C.value)]),E=q(()=>[a.e("btn"),a.e("next"),a.is("disabled",!i.infinite&&k.value)]),T=q(()=>{const{scale:F,deg:Q,offsetX:ie,offsetY:Z,enableTransition:me}=m.value;let Se=ie/F,we=Z/F;const oe=Q*Math.PI/180,ce=Math.cos(oe),re=Math.sin(oe);Se=Se*ce+we*re,we=we*ce-ie/F*re;const ge={transform:`scale(${F}) rotate(${Q}deg) translate(${Se}px, ${we}px)`,transition:me?"transform .3s":""};return p.value.name===o.CONTAIN.name&&(ge.maxWidth=ge.maxHeight="100%"),ge});function P(){L(),n("close")}function I(){const F=L2(ie=>{switch(ie.code){case ft.esc:i.closeOnPressEscape&&P();break;case ft.space:B();break;case ft.left:X();break;case ft.up:N("zoomIn");break;case ft.right:K();break;case ft.down:N("zoomOut");break}}),Q=L2(ie=>{const Z=ie.deltaY||ie.deltaX;N(Z<0?"zoomIn":"zoomOut",{zoomRate:i.zoomRate,enableTransition:!1})});d.run(()=>{is(document,"keydown",F),is(document,"wheel",Q)})}function L(){d.stop()}function V(){h.value=!1}function D(F){h.value=!1,F.target.alt=r("el.image.error")}function z(F){if(h.value||F.button!==0||!c.value)return;m.value.enableTransition=!1;const{offsetX:Q,offsetY:ie}=m.value,Z=F.pageX,me=F.pageY,Se=L2(oe=>{m.value={...m.value,offsetX:Q+oe.pageX-Z,offsetY:ie+oe.pageY-me}}),we=is(document,"mousemove",Se);is(document,"mouseup",()=>{we()}),F.preventDefault()}function Y(){m.value={scale:1,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function B(){if(h.value)return;const F=E_(o),Q=Object.values(o),ie=p.value.name,me=(Q.findIndex(Se=>Se.name===ie)+1)%F.length;p.value=o[F[me]],Y()}function U(F){const Q=i.urlList.length;f.value=(F+Q)%Q}function X(){C.value&&!i.infinite||U(f.value-1)}function K(){k.value&&!i.infinite||U(f.value+1)}function N(F,Q={}){if(h.value)return;const{minScale:ie,maxScale:Z}=i,{zoomRate:me,rotateDeg:Se,enableTransition:we}={zoomRate:i.zoomRate,rotateDeg:90,enableTransition:!0,...Q};switch(F){case"zoomOut":m.value.scale>ie&&(m.value.scale=Number.parseFloat((m.value.scale/me).toFixed(3)));break;case"zoomIn":m.value.scale<Z&&(m.value.scale=Number.parseFloat((m.value.scale*me).toFixed(3)));break;case"clockwise":m.value.deg+=Se,n("rotate",m.value.deg);break;case"anticlockwise":m.value.deg-=Se,n("rotate",m.value.deg);break}m.value.enableTransition=we}return Te(x,()=>{dt(()=>{const F=u.value[0];F!=null&&F.complete||(h.value=!0)})}),Te(f,F=>{Y(),n("switch",F)}),Pt(()=>{var F,Q;I(),(Q=(F=c.value)==null?void 0:F.focus)==null||Q.call(F)}),e({setActiveItem:U}),(F,Q)=>(v(),R(A(lb),{to:"body",disabled:!F.teleported},{default:w(()=>[_(bo,{name:"viewer-fade",appear:""},{default:w(()=>[g("div",{ref_key:"wrapper",ref:c,tabindex:-1,class:W(A(a).e("wrapper")),style:Ke({zIndex:b.value})},[g("div",{class:W(A(a).e("mask")),onClick:Be(ie=>F.hideOnClickModal&&P(),["self"])},null,10,["onClick"]),O(" CLOSE "),g("span",{class:W([A(a).e("btn"),A(a).e("close")]),onClick:P},[_(A(ye),null,{default:w(()=>[_(A(Ir))]),_:1})],2),O(" ARROW "),A(y)?O("v-if",!0):(v(),$(te,{key:0},[g("span",{class:W(A(S)),onClick:X},[_(A(ye),null,{default:w(()=>[_(A(Yu))]),_:1})],2),g("span",{class:W(A(E)),onClick:K},[_(A(ye),null,{default:w(()=>[_(A(kr))]),_:1})],2)],64)),O(" ACTIONS "),g("div",{class:W([A(a).e("btn"),A(a).e("actions")])},[g("div",{class:W(A(a).e("actions__inner"))},[_(A(ye),{onClick:ie=>N("zoomOut")},{default:w(()=>[_(A(Ooe))]),_:1},8,["onClick"]),_(A(ye),{onClick:ie=>N("zoomIn")},{default:w(()=>[_(A(AO))]),_:1},8,["onClick"]),g("i",{class:W(A(a).e("actions__divider"))},null,2),_(A(ye),{onClick:B},{default:w(()=>[(v(),R(Tt(A(p).icon)))]),_:1}),g("i",{class:W(A(a).e("actions__divider"))},null,2),_(A(ye),{onClick:ie=>N("anticlockwise")},{default:w(()=>[_(A(SO))]),_:1},8,["onClick"]),_(A(ye),{onClick:ie=>N("clockwise")},{default:w(()=>[_(A(goe))]),_:1},8,["onClick"])],2)],2),O(" CANVAS "),g("div",{class:W(A(a).e("canvas"))},[(v(!0),$(te,null,be(F.urlList,(ie,Z)=>Pe((v(),$("img",{ref_for:!0,ref:me=>u.value[Z]=me,key:ie,src:ie,style:Ke(A(T)),class:W(A(a).e("img")),crossorigin:F.crossorigin,onLoad:V,onError:D,onMousedown:z},null,46,["src","crossorigin"])),[[Xt,Z===f.value]])),128))],2),ae(F.$slots,"default")],6)]),_:3})]),_:3},8,["disabled"]))}});var gme=Ye(mme,[["__file","image-viewer.vue"]]);const NR=jt(gme),vme=Ze({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:xe([String,Object])},previewSrcList:{type:xe(Array),default:()=>si([])},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},minScale:{type:Number,default:.2},maxScale:{type:Number,default:7},crossorigin:{type:xe(String)}}),_me={load:t=>t instanceof Event,error:t=>t instanceof Event,switch:t=>xt(t),close:()=>!0,show:()=>!0},yme=se({name:"ElImage",inheritAttrs:!1}),bme=se({...yme,props:vme,emits:_me,setup(t,{emit:e}){const n=t;let s="";const{t:i}=fn(),o=He("image"),r=If(),a=q(()=>dg(Object.entries(r).filter(([K])=>/^(data-|on[A-Z])/i.test(K)||["id","style"].includes(K)))),l=LO({excludeListeners:!0,excludeKeys:q(()=>Object.keys(a.value))}),c=J(),u=J(!1),d=J(!0),h=J(!1),f=J(),p=J(),m=Ut&&"loading"in HTMLImageElement.prototype;let b,y;const C=q(()=>[o.e("inner"),x.value&&o.e("preview"),d.value&&o.is("loading")]),k=q(()=>{const{fit:K}=n;return Ut&&K?{objectFit:K}:{}}),x=q(()=>{const{previewSrcList:K}=n;return Array.isArray(K)&&K.length>0}),S=q(()=>{const{previewSrcList:K,initialIndex:N}=n;let F=N;return N>K.length-1&&(F=0),F}),E=q(()=>n.loading==="eager"?!1:!m&&n.loading==="lazy"||n.lazy),T=()=>{Ut&&(d.value=!0,u.value=!1,c.value=n.src)};function P(K){d.value=!1,u.value=!1,e("load",K)}function I(K){d.value=!1,u.value=!0,e("error",K)}function L(){AZ(f.value,p.value)&&(T(),z())}const V=aZ(L,200,!0);async function D(){var K;if(!Ut)return;await dt();const{scrollContainer:N}=n;Yo(N)?p.value=N:nt(N)&&N!==""?p.value=(K=document.querySelector(N))!=null?K:void 0:f.value&&(p.value=Ise(f.value)),p.value&&(b=is(p,"scroll",V),setTimeout(()=>L(),100))}function z(){!Ut||!p.value||!V||(b==null||b(),p.value=void 0)}function Y(K){if(K.ctrlKey){if(K.deltaY<0)return K.preventDefault(),!1;if(K.deltaY>0)return K.preventDefault(),!1}}function B(){x.value&&(y=is("wheel",Y,{passive:!1}),s=document.body.style.overflow,document.body.style.overflow="hidden",h.value=!0,e("show"))}function U(){y==null||y(),document.body.style.overflow=s,h.value=!1,e("close")}function X(K){e("switch",K)}return Te(()=>n.src,()=>{E.value?(d.value=!0,u.value=!1,z(),D()):T()}),Pt(()=>{E.value?D():T()}),(K,N)=>(v(),$("div",Mn({ref_key:"container",ref:f},A(a),{class:[A(o).b(),K.$attrs.class]}),[u.value?ae(K.$slots,"error",{key:0},()=>[g("div",{class:W(A(o).e("error"))},M(A(i)("el.image.error")),3)]):(v(),$(te,{key:1},[c.value!==void 0?(v(),$("img",Mn({key:0},A(l),{src:c.value,loading:K.loading,style:A(k),class:A(C),crossorigin:K.crossorigin,onClick:B,onLoad:P,onError:I}),null,16,["src","loading","crossorigin"])):O("v-if",!0),d.value?(v(),$("div",{key:1,class:W(A(o).e("wrapper"))},[ae(K.$slots,"placeholder",{},()=>[g("div",{class:W(A(o).e("placeholder"))},null,2)])],2)):O("v-if",!0)],64)),A(x)?(v(),$(te,{key:2},[h.value?(v(),R(A(NR),{key:0,"z-index":K.zIndex,"initial-index":A(S),infinite:K.infinite,"zoom-rate":K.zoomRate,"min-scale":K.minScale,"max-scale":K.maxScale,"url-list":K.previewSrcList,crossorigin:K.crossorigin,"hide-on-click-modal":K.hideOnClickModal,teleported:K.previewTeleported,"close-on-press-escape":K.closeOnPressEscape,onClose:U,onSwitch:X},{default:w(()=>[K.$slots.viewer?(v(),$("div",{key:0},[ae(K.$slots,"viewer")])):O("v-if",!0)]),_:3},8,["z-index","initial-index","infinite","zoom-rate","min-scale","max-scale","url-list","crossorigin","hide-on-click-modal","teleported","close-on-press-escape"])):O("v-if",!0)],64)):O("v-if",!0)],16))}});var wme=Ye(bme,[["__file","image.vue"]]);const xa=jt(wme),Cme=Ze({id:{type:String,default:void 0},step:{type:Number,default:1},stepStrictly:Boolean,max:{type:Number,default:Number.POSITIVE_INFINITY},min:{type:Number,default:Number.NEGATIVE_INFINITY},modelValue:Number,readonly:Boolean,disabled:Boolean,size:Ji,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:[String,Number,null],validator:t=>t===null||xt(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},...ir(["ariaLabel"])}),kme={[Lr]:(t,e)=>e!==t,blur:t=>t instanceof FocusEvent,focus:t=>t instanceof FocusEvent,[Au]:t=>xt(t)||xi(t),[mn]:t=>xt(t)||xi(t)},xme=se({name:"ElInputNumber"}),Sme=se({...xme,props:Cme,emits:kme,setup(t,{expose:e,emit:n}){const s=t,{t:i}=fn(),o=He("input-number"),r=J(),a=as({currentValue:s.modelValue,userInput:null}),{formItem:l}=Br(),c=q(()=>xt(s.modelValue)&&s.modelValue<=s.min),u=q(()=>xt(s.modelValue)&&s.modelValue>=s.max),d=q(()=>{const B=y(s.step);return js(s.precision)?Math.max(y(s.modelValue),B):(B>s.precision,s.precision)}),h=q(()=>s.controls&&s.controlsPosition==="right"),f=Mi(),p=Co(),m=q(()=>{if(a.userInput!==null)return a.userInput;let B=a.currentValue;if(xi(B))return"";if(xt(B)){if(Number.isNaN(B))return"";js(s.precision)||(B=B.toFixed(s.precision))}return B}),b=(B,U)=>{if(js(U)&&(U=d.value),U===0)return Math.round(B);let X=String(B);const K=X.indexOf(".");if(K===-1||!X.replace(".","").split("")[K+U])return B;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(U))},y=B=>{if(xi(B))return 0;const U=B.toString(),X=U.indexOf(".");let K=0;return X!==-1&&(K=U.length-X-1),K},C=(B,U=1)=>xt(B)?b(B+s.step*U):a.currentValue,k=()=>{if(s.readonly||p.value||u.value)return;const B=Number(m.value)||0,U=C(B);E(U),n(Au,a.currentValue),z()},x=()=>{if(s.readonly||p.value||c.value)return;const B=Number(m.value)||0,U=C(B,-1);E(U),n(Au,a.currentValue),z()},S=(B,U)=>{const{max:X,min:K,step:N,precision:F,stepStrictly:Q,valueOnClear:ie}=s;X<K&&sr("InputNumber","min should not be greater than max.");let Z=Number(B);if(xi(B)||Number.isNaN(Z))return null;if(B===""){if(ie===null)return null;Z=nt(ie)?{min:K,max:X}[ie]:ie}return Q&&(Z=b(Math.round(Z/N)*N,F)),js(F)||(Z=b(Z,F)),(Z>X||Z<K)&&(Z=Z>X?X:K,U&&n(mn,Z)),Z},E=(B,U=!0)=>{var X;const K=a.currentValue,N=S(B);if(!U){n(mn,N);return}K===N&&B||(a.userInput=null,n(mn,N),K!==N&&n(Lr,N,K),s.validateEvent&&((X=l==null?void 0:l.validate)==null||X.call(l,"change").catch(F=>void 0)),a.currentValue=N)},T=B=>{a.userInput=B;const U=B===""?null:Number(B);n(Au,U),E(U,!1)},P=B=>{const U=B!==""?Number(B):"";(xt(U)&&!Number.isNaN(U)||B==="")&&E(U),z(),a.userInput=null},I=()=>{var B,U;(U=(B=r.value)==null?void 0:B.focus)==null||U.call(B)},L=()=>{var B,U;(U=(B=r.value)==null?void 0:B.blur)==null||U.call(B)},V=B=>{n("focus",B)},D=B=>{var U;a.userInput=null,n("blur",B),s.validateEvent&&((U=l==null?void 0:l.validate)==null||U.call(l,"blur").catch(X=>void 0))},z=()=>{a.currentValue!==s.modelValue&&(a.currentValue=s.modelValue)},Y=B=>{document.activeElement===B.target&&B.preventDefault()};return Te(()=>s.modelValue,(B,U)=>{const X=S(B,!0);a.userInput===null&&X!==U&&(a.currentValue=X)},{immediate:!0}),Pt(()=>{var B;const{min:U,max:X,modelValue:K}=s,N=(B=r.value)==null?void 0:B.input;if(N.setAttribute("role","spinbutton"),Number.isFinite(X)?N.setAttribute("aria-valuemax",String(X)):N.removeAttribute("aria-valuemax"),Number.isFinite(U)?N.setAttribute("aria-valuemin",String(U)):N.removeAttribute("aria-valuemin"),N.setAttribute("aria-valuenow",a.currentValue||a.currentValue===0?String(a.currentValue):""),N.setAttribute("aria-disabled",String(p.value)),!xt(K)&&K!=null){let F=Number(K);Number.isNaN(F)&&(F=null),n(mn,F)}N.addEventListener("wheel",Y,{passive:!1})}),ll(()=>{var B,U;const X=(B=r.value)==null?void 0:B.input;X==null||X.setAttribute("aria-valuenow",`${(U=a.currentValue)!=null?U:""}`)}),e({focus:I,blur:L}),(B,U)=>(v(),$("div",{class:W([A(o).b(),A(o).m(A(f)),A(o).is("disabled",A(p)),A(o).is("without-controls",!B.controls),A(o).is("controls-right",A(h))]),onDragstart:Be(()=>{},["prevent"])},[B.controls?Pe((v(),$("span",{key:0,role:"button","aria-label":A(i)("el.inputNumber.decrease"),class:W([A(o).e("decrease"),A(o).is("disabled",A(c))]),onKeydown:$t(x,["enter"])},[ae(B.$slots,"decrease-icon",{},()=>[_(A(ye),null,{default:w(()=>[A(h)?(v(),R(A(ud),{key:0})):(v(),R(A(Xie),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[A(D_),x]]):O("v-if",!0),B.controls?Pe((v(),$("span",{key:1,role:"button","aria-label":A(i)("el.inputNumber.increase"),class:W([A(o).e("increase"),A(o).is("disabled",A(u))]),onKeydown:$t(k,["enter"])},[ae(B.$slots,"increase-icon",{},()=>[_(A(ye),null,{default:w(()=>[A(h)?(v(),R(A(Xy),{key:0})):(v(),R(A(Ox),{key:1}))]),_:1})])],42,["aria-label","onKeydown"])),[[A(D_),k]]):O("v-if",!0),_(A(vt),{id:B.id,ref_key:"input",ref:r,type:"number",step:B.step,"model-value":A(m),placeholder:B.placeholder,readonly:B.readonly,disabled:A(p),size:A(f),max:B.max,min:B.min,name:B.name,"aria-label":B.ariaLabel,"validate-event":!1,onKeydown:[$t(Be(k,["prevent"]),["up"]),$t(Be(x,["prevent"]),["down"])],onBlur:D,onFocus:V,onInput:T,onChange:P},null,8,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","onKeydown"])],42,["onDragstart"]))}});var $me=Ye(Sme,[["__file","input-number.vue"]]);const db=jt($me),Ame=Ze({type:{type:String,values:["primary","success","warning","info","danger","default"],default:"default"},underline:{type:Boolean,default:!0},disabled:Boolean,href:{type:String,default:""},target:{type:String,default:"_self"},icon:{type:ms}}),Mme={click:t=>t instanceof MouseEvent},Eme=se({name:"ElLink"}),Tme=se({...Eme,props:Ame,emits:Mme,setup(t,{emit:e}){const n=t,s=He("link"),i=q(()=>[s.b(),s.m(n.type),s.is("disabled",n.disabled),s.is("underline",n.underline&&!n.disabled)]);function o(r){n.disabled||e("click",r)}return(r,a)=>(v(),$("a",{class:W(A(i)),href:r.disabled||!r.href?void 0:r.href,target:r.disabled||!r.href?void 0:r.target,onClick:o},[r.icon?(v(),R(A(ye),{key:0},{default:w(()=>[(v(),R(Tt(r.icon)))]),_:1})):O("v-if",!0),r.$slots.default?(v(),$("span",{key:1,class:W(A(s).e("inner"))},[ae(r.$slots,"default")],2)):O("v-if",!0),r.$slots.icon?ae(r.$slots,"icon",{key:2}):O("v-if",!0)],10,["href","target"]))}});var Pme=Ye(Tme,[["__file","link.vue"]]);const BR=jt(Pme),zR=Symbol("elPaginationKey"),Ime=Ze({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:ms}}),Lme={click:t=>t instanceof MouseEvent},Ome=se({name:"ElPaginationPrev"}),Dme=se({...Ome,props:Ime,emits:Lme,setup(t){const e=t,{t:n}=fn(),s=q(()=>e.disabled||e.currentPage<=1);return(i,o)=>(v(),$("button",{type:"button",class:"btn-prev",disabled:A(s),"aria-label":i.prevText||A(n)("el.pagination.prev"),"aria-disabled":A(s),onClick:r=>i.$emit("click",r)},[i.prevText?(v(),$("span",{key:0},M(i.prevText),1)):(v(),R(A(ye),{key:1},{default:w(()=>[(v(),R(Tt(i.prevIcon)))]),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var Rme=Ye(Dme,[["__file","prev.vue"]]);const Vme=Ze({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:ms}}),Fme=se({name:"ElPaginationNext"}),Nme=se({...Fme,props:Vme,emits:["click"],setup(t){const e=t,{t:n}=fn(),s=q(()=>e.disabled||e.currentPage===e.pageCount||e.pageCount===0);return(i,o)=>(v(),$("button",{type:"button",class:"btn-next",disabled:A(s),"aria-label":i.nextText||A(n)("el.pagination.next"),"aria-disabled":A(s),onClick:r=>i.$emit("click",r)},[i.nextText?(v(),$("span",{key:0},M(i.nextText),1)):(v(),R(A(ye),{key:1},{default:w(()=>[(v(),R(Tt(i.nextIcon)))]),_:1}))],8,["disabled","aria-label","aria-disabled","onClick"]))}});var Bme=Ye(Nme,[["__file","next.vue"]]);const HR=Symbol("ElSelectGroup"),hb=Symbol("ElSelect");function zme(t,e){const n=qe(hb),s=qe(HR,{disabled:!1}),i=q(()=>u(Hi(n.props.modelValue),t.value)),o=q(()=>{var f;if(n.props.multiple){const p=Hi((f=n.props.modelValue)!=null?f:[]);return!i.value&&p.length>=n.props.multipleLimit&&n.props.multipleLimit>0}else return!1}),r=q(()=>t.label||(Ct(t.value)?"":t.value)),a=q(()=>t.value||t.label||""),l=q(()=>t.disabled||e.groupDisabled||o.value),c=pt(),u=(f=[],p)=>{if(Ct(t.value)){const m=n.props.valueKey;return f&&f.some(b=>Yt(No(b,m))===No(p,m))}else return f&&f.includes(p)},d=()=>{!t.disabled&&!s.disabled&&(n.states.hoveringIndex=n.optionsArray.indexOf(c.proxy))},h=f=>{const p=new RegExp(Mse(f),"i");e.visible=p.test(r.value)||t.created};return Te(()=>r.value,()=>{!t.created&&!n.props.remote&&n.setSelected()}),Te(()=>t.value,(f,p)=>{const{remote:m,valueKey:b}=n.props;if(f!==p&&(n.onOptionDestroy(p,c.proxy),n.onOptionCreate(c.proxy)),!t.created&&!m){if(b&&Ct(f)&&Ct(p)&&f[b]===p[b])return;n.setSelected()}}),Te(()=>s.disabled,()=>{e.groupDisabled=s.disabled},{immediate:!0}),{select:n,currentLabel:r,currentValue:a,itemSelected:i,isDisabled:l,hoverItem:d,updateOption:h}}const Hme=se({name:"ElOption",componentName:"ElOption",props:{value:{required:!0,type:[String,Number,Boolean,Object]},label:[String,Number],created:Boolean,disabled:Boolean},setup(t){const e=He("select"),n=tr(),s=q(()=>[e.be("dropdown","item"),e.is("disabled",A(a)),e.is("selected",A(r)),e.is("hovering",A(h))]),i=as({index:-1,groupDisabled:!1,visible:!0,hover:!1}),{currentLabel:o,itemSelected:r,isDisabled:a,select:l,hoverItem:c,updateOption:u}=zme(t,i),{visible:d,hover:h}=yo(i),f=pt().proxy;l.onOptionCreate(f),Gn(()=>{const m=f.value,{selected:b}=l.states,C=(l.props.multiple?b:[b]).some(k=>k.value===f.value);dt(()=>{l.states.cachedOptions.get(m)===f&&!C&&l.states.cachedOptions.delete(m)}),l.onOptionDestroy(m,f)});function p(){a.value||l.handleOptionSelect(f)}return{ns:e,id:n,containerKls:s,currentLabel:o,itemSelected:r,isDisabled:a,select:l,hoverItem:c,updateOption:u,visible:d,hover:h,selectOptionClick:p,states:i}}});function Ume(t,e,n,s,i,o){return Pe((v(),$("li",{id:t.id,class:W(t.containerKls),role:"option","aria-disabled":t.isDisabled||void 0,"aria-selected":t.itemSelected,onMouseenter:t.hoverItem,onClick:Be(t.selectOptionClick,["stop"])},[ae(t.$slots,"default",{},()=>[g("span",null,M(t.currentLabel),1)])],42,["id","aria-disabled","aria-selected","onMouseenter","onClick"])),[[Xt,t.visible]])}var v4=Ye(Hme,[["render",Ume],["__file","option.vue"]]);const jme=se({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=qe(hb),e=He("select"),n=q(()=>t.props.popperClass),s=q(()=>t.props.multiple),i=q(()=>t.props.fitInputWidth),o=J("");function r(){var a;o.value=`${(a=t.selectRef)==null?void 0:a.offsetWidth}px`}return Pt(()=>{r(),bi(t.selectRef,r)}),{ns:e,minWidth:o,popperClass:n,isMultiple:s,isFitInputWidth:i}}});function Wme(t,e,n,s,i,o){return v(),$("div",{class:W([t.ns.b("dropdown"),t.ns.is("multiple",t.isMultiple),t.popperClass]),style:Ke({[t.isFitInputWidth?"width":"minWidth"]:t.minWidth})},[t.$slots.header?(v(),$("div",{key:0,class:W(t.ns.be("dropdown","header"))},[ae(t.$slots,"header")],2)):O("v-if",!0),ae(t.$slots,"default"),t.$slots.footer?(v(),$("div",{key:1,class:W(t.ns.be("dropdown","footer"))},[ae(t.$slots,"footer")],2)):O("v-if",!0)],6)}var Yme=Ye(jme,[["render",Wme],["__file","select-dropdown.vue"]]);const Gme=11,qme=(t,e)=>{const{t:n}=fn(),s=tr(),i=He("select"),o=He("input"),r=as({inputValue:"",options:new Map,cachedOptions:new Map,disabledOptions:new Map,optionValues:[],selected:[],selectionWidth:0,calculatorWidth:0,collapseItemWidth:0,selectedLabel:"",hoveringIndex:-1,previousQuery:null,inputHovering:!1,menuVisibleOnFocus:!1,isBeforeHide:!1}),a=J(null),l=J(null),c=J(null),u=J(null),d=J(null),h=J(null),f=J(null),p=J(null),m=J(null),b=J(null),y=J(null),C=J(null),{isComposing:k,handleCompositionStart:x,handleCompositionUpdate:S,handleCompositionEnd:E}=fD({afterComposition:$e=>ke($e)}),{wrapperRef:T,isFocused:P}=e4(d,{beforeFocus(){return U.value},afterFocus(){t.automaticDropdown&&!I.value&&(I.value=!0,r.menuVisibleOnFocus=!0)},beforeBlur($e){var rt,tn;return((rt=c.value)==null?void 0:rt.isFocusInsideContent($e))||((tn=u.value)==null?void 0:tn.isFocusInsideContent($e))},afterBlur(){I.value=!1,r.menuVisibleOnFocus=!1}}),I=J(!1),L=J(),{form:V,formItem:D}=Br(),{inputId:z}=dd(t,{formItemContext:D}),{valueOnClear:Y,isEmptyValue:B}=mD(t),U=q(()=>t.disabled||(V==null?void 0:V.disabled)),X=q(()=>Le(t.modelValue)?t.modelValue.length>0:!B(t.modelValue)),K=q(()=>t.clearable&&!U.value&&r.inputHovering&&X.value),N=q(()=>t.remote&&t.filterable&&!t.remoteShowSuffix?"":t.suffixIcon),F=q(()=>i.is("reverse",N.value&&I.value)),Q=q(()=>(D==null?void 0:D.validateState)||""),ie=q(()=>PO[Q.value]),Z=q(()=>t.remote?300:0),me=q(()=>t.loading?t.loadingText||n("el.select.loading"):t.remote&&!r.inputValue&&r.options.size===0?!1:t.filterable&&r.inputValue&&r.options.size>0&&Se.value===0?t.noMatchText||n("el.select.noMatch"):r.options.size===0?t.noDataText||n("el.select.noData"):null),Se=q(()=>we.value.filter($e=>$e.visible).length),we=q(()=>{const $e=Array.from(r.options.values()),rt=[];return r.optionValues.forEach(tn=>{const In=$e.findIndex(pl=>pl.value===tn);In>-1&&rt.push($e[In])}),rt.length>=$e.length?rt:$e}),oe=q(()=>Array.from(r.cachedOptions.values())),ce=q(()=>{const $e=we.value.filter(rt=>!rt.created).some(rt=>rt.currentLabel===r.inputValue);return t.filterable&&t.allowCreate&&r.inputValue!==""&&!$e}),re=()=>{t.filterable&&ot(t.filterMethod)||t.filterable&&t.remote&&ot(t.remoteMethod)||we.value.forEach($e=>{var rt;(rt=$e.updateOption)==null||rt.call($e,r.inputValue)})},ge=Mi(),ze=q(()=>["small"].includes(ge.value)?"small":"default"),st=q({get(){return I.value&&me.value!==!1},set($e){I.value=$e}}),ee=q(()=>{if(t.multiple&&!js(t.modelValue))return Hi(t.modelValue).length===0&&!r.inputValue;const $e=Le(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||js($e)?!r.inputValue:!0}),ne=q(()=>{var $e;const rt=($e=t.placeholder)!=null?$e:n("el.select.placeholder");return t.multiple||!X.value?rt:r.selectedLabel}),pe=q(()=>U3?null:"mouseenter");Te(()=>t.modelValue,($e,rt)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(r.inputValue="",Ae("")),Me(),!mc($e,rt)&&t.validateEvent&&(D==null||D.validate("change").catch(tn=>void 0))},{flush:"post",deep:!0}),Te(()=>I.value,$e=>{$e?Ae(r.inputValue):(r.inputValue="",r.previousQuery=null,r.isBeforeHide=!0),e("visible-change",$e)}),Te(()=>r.options.entries(),()=>{var $e;if(!Ut)return;const rt=(($e=a.value)==null?void 0:$e.querySelectorAll("input"))||[];(!t.filterable&&!t.defaultFirstOption&&!js(t.modelValue)||!Array.from(rt).includes(document.activeElement))&&Me(),t.defaultFirstOption&&(t.filterable||t.remote)&&Se.value&&Ce()},{flush:"post"}),Te(()=>r.hoveringIndex,$e=>{xt($e)&&$e>-1?L.value=we.value[$e]||{}:L.value={},we.value.forEach(rt=>{rt.hover=L.value===rt})}),br(()=>{r.isBeforeHide||re()});const Ae=$e=>{r.previousQuery===$e||k.value||(r.previousQuery=$e,t.filterable&&ot(t.filterMethod)?t.filterMethod($e):t.filterable&&t.remote&&ot(t.remoteMethod)&&t.remoteMethod($e),t.defaultFirstOption&&(t.filterable||t.remote)&&Se.value?dt(Ce):dt(Fe))},Ce=()=>{const $e=we.value.filter(In=>In.visible&&!In.disabled&&!In.states.groupDisabled),rt=$e.find(In=>In.created),tn=$e[0];r.hoveringIndex=We(we.value,rt||tn)},Me=()=>{if(t.multiple)r.selectedLabel="";else{const rt=Le(t.modelValue)?t.modelValue[0]:t.modelValue,tn=je(rt);r.selectedLabel=tn.currentLabel,r.selected=[tn];return}const $e=[];js(t.modelValue)||Hi(t.modelValue).forEach(rt=>{$e.push(je(rt))}),r.selected=$e},je=$e=>{let rt;const tn=D0($e).toLowerCase()==="object",In=D0($e).toLowerCase()==="null",pl=D0($e).toLowerCase()==="undefined";for(let Fc=r.cachedOptions.size-1;Fc>=0;Fc--){const Yr=oe.value[Fc];if(tn?No(Yr.value,t.valueKey)===No($e,t.valueKey):Yr.value===$e){rt={value:$e,currentLabel:Yr.currentLabel,get isDisabled(){return Yr.isDisabled}};break}}if(rt)return rt;const Td=tn?$e.label:!In&&!pl?$e:"";return{value:$e,currentLabel:Td}},Fe=()=>{r.hoveringIndex=we.value.findIndex($e=>r.selected.some(rt=>h2(rt)===h2($e)))},Ue=()=>{r.selectionWidth=l.value.getBoundingClientRect().width},Oe=()=>{r.calculatorWidth=h.value.getBoundingClientRect().width},ht=()=>{r.collapseItemWidth=y.value.getBoundingClientRect().width},Ie=()=>{var $e,rt;(rt=($e=c.value)==null?void 0:$e.updatePopper)==null||rt.call($e)},_e=()=>{var $e,rt;(rt=($e=u.value)==null?void 0:$e.updatePopper)==null||rt.call($e)},le=()=>{r.inputValue.length>0&&!I.value&&(I.value=!0),Ae(r.inputValue)},ke=$e=>{if(r.inputValue=$e.target.value,t.remote)Xe();else return le()},Xe=pc(()=>{le()},Z.value),tt=$e=>{mc(t.modelValue,$e)||e(Lr,$e)},Ne=$e=>mse($e,rt=>!r.disabledOptions.has(rt)),Qe=$e=>{if(t.multiple&&$e.code!==ft.delete&&$e.target.value.length<=0){const rt=Hi(t.modelValue).slice(),tn=Ne(rt);if(tn<0)return;const In=rt[tn];rt.splice(tn,1),e(mn,rt),tt(rt),e("remove-tag",In)}},he=($e,rt)=>{const tn=r.selected.indexOf(rt);if(tn>-1&&!U.value){const In=Hi(t.modelValue).slice();In.splice(tn,1),e(mn,In),tt(In),e("remove-tag",rt.value)}$e.stopPropagation(),Nt()},Ee=$e=>{$e.stopPropagation();const rt=t.multiple?[]:Y.value;if(t.multiple)for(const tn of r.selected)tn.isDisabled&&rt.push(tn.value);e(mn,rt),tt(rt),r.hoveringIndex=-1,I.value=!1,e("clear"),Nt()},ve=$e=>{var rt;if(t.multiple){const tn=Hi((rt=t.modelValue)!=null?rt:[]).slice(),In=We(tn,$e.value);In>-1?tn.splice(In,1):(t.multipleLimit<=0||tn.length<t.multipleLimit)&&tn.push($e.value),e(mn,tn),tt(tn),$e.created&&Ae(""),t.filterable&&!t.reserveKeyword&&(r.inputValue="")}else e(mn,$e.value),tt($e.value),I.value=!1;Nt(),!I.value&&dt(()=>{Re($e)})},We=($e=[],rt)=>{if(!Ct(rt))return $e.indexOf(rt);const tn=t.valueKey;let In=-1;return $e.some((pl,Td)=>Yt(No(pl,tn))===No(rt,tn)?(In=Td,!0):!1),In},Re=$e=>{var rt,tn,In,pl,Td;const U1=Le($e)?$e[0]:$e;let Fc=null;if(U1!=null&&U1.value){const Yr=we.value.filter(nS=>nS.value===U1.value);Yr.length>0&&(Fc=Yr[0].$el)}if(c.value&&Fc){const Yr=(pl=(In=(tn=(rt=c.value)==null?void 0:rt.popperRef)==null?void 0:tn.contentRef)==null?void 0:In.querySelector)==null?void 0:pl.call(In,`.${i.be("dropdown","wrap")}`);Yr&&Ose(Yr,Fc)}(Td=C.value)==null||Td.handleScroll()},Et=$e=>{r.options.set($e.value,$e),r.cachedOptions.set($e.value,$e),$e.disabled&&r.disabledOptions.set($e.value,$e)},ln=($e,rt)=>{r.options.get($e)===rt&&r.options.delete($e)},fe=q(()=>{var $e,rt;return(rt=($e=c.value)==null?void 0:$e.popperRef)==null?void 0:rt.contentRef}),ct=()=>{r.isBeforeHide=!1,dt(()=>Re(r.selected))},Nt=()=>{var $e;($e=d.value)==null||$e.focus()},Zn=()=>{var $e;($e=d.value)==null||$e.blur()},Is=$e=>{Ee($e)},xn=()=>{I.value=!1,P.value&&Zn()},Ao=()=>{r.inputValue.length>0?r.inputValue="":I.value=!1},eS=()=>{U.value||(U3&&(r.inputHovering=!0),r.menuVisibleOnFocus?r.menuVisibleOnFocus=!1:I.value=!I.value)},hj=()=>{I.value?we.value[r.hoveringIndex]&&ve(we.value[r.hoveringIndex]):eS()},h2=$e=>Ct($e.value)?No($e.value,t.valueKey):$e.value,fj=q(()=>we.value.filter($e=>$e.visible).every($e=>$e.disabled)),pj=q(()=>t.multiple?t.collapseTags?r.selected.slice(0,t.maxCollapseTags):r.selected:[]),mj=q(()=>t.multiple?t.collapseTags?r.selected.slice(t.maxCollapseTags):[]:[]),tS=$e=>{if(!I.value){I.value=!0;return}if(!(r.options.size===0||r.filteredOptionsCount===0||k.value)&&!fj.value){$e==="next"?(r.hoveringIndex++,r.hoveringIndex===r.options.size&&(r.hoveringIndex=0)):$e==="prev"&&(r.hoveringIndex--,r.hoveringIndex<0&&(r.hoveringIndex=r.options.size-1));const rt=we.value[r.hoveringIndex];(rt.disabled===!0||rt.states.groupDisabled===!0||!rt.visible)&&tS($e),dt(()=>Re(L.value))}},gj=()=>{if(!l.value)return 0;const $e=window.getComputedStyle(l.value);return Number.parseFloat($e.gap||"6px")},vj=q(()=>{const $e=gj();return{maxWidth:`${y.value&&t.maxCollapseTags===1?r.selectionWidth-r.collapseItemWidth-$e:r.selectionWidth}px`}}),_j=q(()=>({maxWidth:`${r.selectionWidth}px`})),yj=q(()=>({width:`${Math.max(r.calculatorWidth,Gme)}px`}));return bi(l,Ue),bi(h,Oe),bi(m,Ie),bi(T,Ie),bi(b,_e),bi(y,ht),Pt(()=>{Me()}),{inputId:z,contentId:s,nsSelect:i,nsInput:o,states:r,isFocused:P,expanded:I,optionsArray:we,hoverOption:L,selectSize:ge,filteredOptionsCount:Se,resetCalculatorWidth:Oe,updateTooltip:Ie,updateTagTooltip:_e,debouncedOnInputChange:Xe,onInput:ke,deletePrevTag:Qe,deleteTag:he,deleteSelected:Ee,handleOptionSelect:ve,scrollToOption:Re,hasModelValue:X,shouldShowPlaceholder:ee,currentPlaceholder:ne,mouseEnterEventName:pe,showClose:K,iconComponent:N,iconReverse:F,validateState:Q,validateIcon:ie,showNewOption:ce,updateOptions:re,collapseTagSize:ze,setSelected:Me,selectDisabled:U,emptyText:me,handleCompositionStart:x,handleCompositionUpdate:S,handleCompositionEnd:E,onOptionCreate:Et,onOptionDestroy:ln,handleMenuEnter:ct,focus:Nt,blur:Zn,handleClearClick:Is,handleClickOutside:xn,handleEsc:Ao,toggleMenu:eS,selectOption:hj,getValueKey:h2,navigateOptions:tS,dropdownMenuVisible:st,showTagList:pj,collapseTagList:mj,tagStyle:vj,collapseTagStyle:_j,inputStyle:yj,popperRef:fe,inputRef:d,tooltipRef:c,tagTooltipRef:u,calculatorRef:h,prefixRef:f,suffixRef:p,selectRef:a,wrapperRef:T,selectionRef:l,scrollbarRef:C,menuRef:m,tagMenuRef:b,collapseItemRef:y}};var Xme=se({name:"ElOptions",setup(t,{slots:e}){const n=qe(hb);let s=[];return()=>{var i,o;const r=(i=e.default)==null?void 0:i.call(e),a=[];function l(c){Le(c)&&c.forEach(u=>{var d,h,f,p;const m=(d=(u==null?void 0:u.type)||{})==null?void 0:d.name;m==="ElOptionGroup"?l(!nt(u.children)&&!Le(u.children)&&ot((h=u.children)==null?void 0:h.default)?(f=u.children)==null?void 0:f.default():u.children):m==="ElOption"?a.push((p=u.props)==null?void 0:p.value):Le(u.children)&&l(u.children)})}return r.length&&l((o=r[0])==null?void 0:o.children),mc(a,s)||(s=a,n&&(n.states.optionValues=a)),r}}});const Kme=Ze({name:String,id:String,modelValue:{type:[Array,String,Number,Boolean,Object],default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Ji,effect:{type:xe(String),default:"light"},disabled:Boolean,clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperOptions:{type:xe(Object),default:()=>({})},remote:Boolean,loadingText:String,noMatchText:String,noDataText:String,remoteMethod:Function,filterMethod: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,maxCollapseTags:{type:Number,default:1},teleported:Bi.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:ms,default:Of},fitInputWidth:Boolean,suffixIcon:{type:ms,default:ud},tagType:{...x6.type,default:"info"},tagEffect:{...x6.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,placement:{type:xe(String),values:Zy,default:"bottom-start"},fallbackPlacements:{type:xe(Array),default:["bottom-start","top-start","right","left"]},...sb,...ir(["ariaLabel"])}),M$="ElSelect",Zme=se({name:M$,componentName:M$,components:{ElSelectMenu:Yme,ElOption:v4,ElOptions:Xme,ElTag:xo,ElScrollbar:ui,ElTooltip:di,ElIcon:ye},directives:{ClickOutside:mf},props:Kme,emits:[mn,Lr,"remove-tag","clear","visible-change","focus","blur"],setup(t,{emit:e}){const n=q(()=>{const{modelValue:o,multiple:r}=t,a=r?[]:void 0;return Le(o)?r?o:a:r?a:o}),s=as({...yo(t),modelValue:n}),i=qme(s,e);return It(hb,as({props:s,states:i.states,optionsArray:i.optionsArray,handleOptionSelect:i.handleOptionSelect,onOptionCreate:i.onOptionCreate,onOptionDestroy:i.onOptionDestroy,selectRef:i.selectRef,setSelected:i.setSelected})),{...i,modelValue:n}}});function Jme(t,e,n,s,i,o){const r=H("el-tag"),a=H("el-tooltip"),l=H("el-icon"),c=H("el-option"),u=H("el-options"),d=H("el-scrollbar"),h=H("el-select-menu"),f=_t("click-outside");return Pe((v(),$("div",{ref:"selectRef",class:W([t.nsSelect.b(),t.nsSelect.m(t.selectSize)]),[wu(t.mouseEnterEventName)]:p=>t.states.inputHovering=!0,onMouseleave:p=>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-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,onBeforeShow:t.handleMenuEnter,onHide:p=>t.states.isBeforeHide=!1},{default:w(()=>{var p;return[g("div",{ref:"wrapperRef",class:W([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:Be(t.toggleMenu,["prevent"])},[t.$slots.prefix?(v(),$("div",{key:0,ref:"prefixRef",class:W(t.nsSelect.e("prefix"))},[ae(t.$slots,"prefix")],2)):O("v-if",!0),g("div",{ref:"selectionRef",class:W([t.nsSelect.e("selection"),t.nsSelect.is("near",t.multiple&&!t.$slots.prefix&&!!t.states.selected.length)])},[t.multiple?ae(t.$slots,"tag",{key:0},()=>[(v(!0),$(te,null,be(t.showTagList,m=>(v(),$("div",{key:t.getValueKey(m),class:W(t.nsSelect.e("selected-item"))},[_(r,{closable:!t.selectDisabled&&!m.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:Ke(t.tagStyle),onClose:b=>t.deleteTag(b,m)},{default:w(()=>[g("span",{class:W(t.nsSelect.e("tags-text"))},[ae(t.$slots,"label",{label:m.currentLabel,value:m.value},()=>[G(M(m.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","style","onClose"])],2))),128)),t.collapseTags&&t.states.selected.length>t.maxCollapseTags?(v(),R(a,{key:0,ref:"tagTooltipRef",disabled:t.dropdownMenuVisible||!t.collapseTagsTooltip,"fallback-placements":["bottom","top","right","left"],effect:t.effect,placement:"bottom",teleported:t.teleported},{default:w(()=>[g("div",{ref:"collapseItemRef",class:W(t.nsSelect.e("selected-item"))},[_(r,{closable:!1,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:Ke(t.collapseTagStyle)},{default:w(()=>[g("span",{class:W(t.nsSelect.e("tags-text"))}," + "+M(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:w(()=>[g("div",{ref:"tagMenuRef",class:W(t.nsSelect.e("selection"))},[(v(!0),$(te,null,be(t.collapseTagList,m=>(v(),$("div",{key:t.getValueKey(m),class:W(t.nsSelect.e("selected-item"))},[_(r,{class:"in-tooltip",closable:!t.selectDisabled&&!m.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:b=>t.deleteTag(b,m)},{default:w(()=>[g("span",{class:W(t.nsSelect.e("tags-text"))},[ae(t.$slots,"label",{label:m.currentLabel,value:m.value},()=>[G(M(m.currentLabel),1)])],2)]),_:2},1032,["closable","size","type","effect","onClose"])],2))),128))],2)]),_:3},8,["disabled","effect","teleported"])):O("v-if",!0)]):O("v-if",!0),t.selectDisabled?O("v-if",!0):(v(),$("div",{key:1,class:W([t.nsSelect.e("selected-item"),t.nsSelect.e("input-wrapper"),t.nsSelect.is("hidden",!t.filterable)])},[Pe(g("input",{id:t.inputId,ref:"inputRef","onUpdate:modelValue":m=>t.states.inputValue=m,type:"text",name:t.name,class:W([t.nsSelect.e("input"),t.nsSelect.is(t.selectSize)]),disabled:t.selectDisabled,autocomplete:t.autocomplete,style:Ke(t.inputStyle),role:"combobox",readonly:!t.filterable,spellcheck:"false","aria-activedescendant":((p=t.hoverOption)==null?void 0:p.id)||"","aria-controls":t.contentId,"aria-expanded":t.dropdownMenuVisible,"aria-label":t.ariaLabel,"aria-autocomplete":"none","aria-haspopup":"listbox",onKeydown:[$t(Be(m=>t.navigateOptions("next"),["stop","prevent"]),["down"]),$t(Be(m=>t.navigateOptions("prev"),["stop","prevent"]),["up"]),$t(Be(t.handleEsc,["stop","prevent"]),["esc"]),$t(Be(t.selectOption,["stop","prevent"]),["enter"]),$t(Be(t.deletePrevTag,["stop"]),["delete"])],onCompositionstart:t.handleCompositionStart,onCompositionupdate:t.handleCompositionUpdate,onCompositionend:t.handleCompositionEnd,onInput:t.onInput,onClick:Be(t.toggleMenu,["stop"])},null,46,["id","onUpdate:modelValue","name","disabled","autocomplete","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label","onKeydown","onCompositionstart","onCompositionupdate","onCompositionend","onInput","onClick"]),[[zu,t.states.inputValue]]),t.filterable?(v(),$("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:W(t.nsSelect.e("input-calculator")),textContent:M(t.states.inputValue)},null,10,["textContent"])):O("v-if",!0)],2)),t.shouldShowPlaceholder?(v(),$("div",{key:2,class:W([t.nsSelect.e("selected-item"),t.nsSelect.e("placeholder"),t.nsSelect.is("transparent",!t.hasModelValue||t.expanded&&!t.states.inputValue)])},[t.hasModelValue?ae(t.$slots,"label",{key:0,label:t.currentPlaceholder,value:t.modelValue},()=>[g("span",null,M(t.currentPlaceholder),1)]):(v(),$("span",{key:1},M(t.currentPlaceholder),1))],2)):O("v-if",!0)],2),g("div",{ref:"suffixRef",class:W(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClose?(v(),R(l,{key:0,class:W([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.iconReverse])},{default:w(()=>[(v(),R(Tt(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),t.showClose&&t.clearIcon?(v(),R(l,{key:1,class:W([t.nsSelect.e("caret"),t.nsSelect.e("icon"),t.nsSelect.e("clear")]),onClick:t.handleClearClick},{default:w(()=>[(v(),R(Tt(t.clearIcon)))]),_:1},8,["class","onClick"])):O("v-if",!0),t.validateState&&t.validateIcon?(v(),R(l,{key:2,class:W([t.nsInput.e("icon"),t.nsInput.e("validateIcon")])},{default:w(()=>[(v(),R(Tt(t.validateIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],10,["onClick"])]}),content:w(()=>[_(h,{ref:"menuRef"},{default:w(()=>[t.$slots.header?(v(),$("div",{key:0,class:W(t.nsSelect.be("dropdown","header")),onClick:Be(()=>{},["stop"])},[ae(t.$slots,"header")],10,["onClick"])):O("v-if",!0),Pe(_(d,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:W([t.nsSelect.is("empty",t.filteredOptionsCount===0)]),role:"listbox","aria-label":t.ariaLabel,"aria-orientation":"vertical"},{default:w(()=>[t.showNewOption?(v(),R(c,{key:0,value:t.states.inputValue,created:!0},null,8,["value"])):O("v-if",!0),_(u,null,{default:w(()=>[ae(t.$slots,"default")]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label"]),[[Xt,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(v(),$("div",{key:1,class:W(t.nsSelect.be("dropdown","loading"))},[ae(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(v(),$("div",{key:2,class:W(t.nsSelect.be("dropdown","empty"))},[ae(t.$slots,"empty",{},()=>[g("span",null,M(t.emptyText),1)])],2)):O("v-if",!0),t.$slots.footer?(v(),$("div",{key:3,class:W(t.nsSelect.be("dropdown","footer")),onClick:Be(()=>{},["stop"])},[ae(t.$slots,"footer")],10,["onClick"])):O("v-if",!0)]),_:3},512)]),_:3},8,["visible","placement","teleported","popper-class","popper-options","fallback-placements","effect","transition","persistent","onBeforeShow","onHide"])],16,["onMouseleave"])),[[f,t.handleClickOutside,t.popperRef]])}var Qme=Ye(Zme,[["render",Jme],["__file","select.vue"]]);const ege=se({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=He("select"),n=J(null),s=pt(),i=J([]);It(HR,as({...yo(t)}));const o=q(()=>i.value.some(c=>c.visible===!0)),r=c=>{var u,d;return((u=c.type)==null?void 0:u.name)==="ElOption"&&!!((d=c.component)!=null&&d.proxy)},a=c=>{const u=Hi(c),d=[];return u.forEach(h=>{var f,p;r(h)?d.push(h.component.proxy):(f=h.children)!=null&&f.length?d.push(...a(h.children)):(p=h.component)!=null&&p.subTree&&d.push(...a(h.component.subTree))}),d},l=()=>{i.value=a(s.subTree)};return Pt(()=>{l()}),_Z(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:o,ns:e}}});function tge(t,e,n,s,i,o){return Pe((v(),$("ul",{ref:"groupRef",class:W(t.ns.be("group","wrap"))},[g("li",{class:W(t.ns.be("group","title"))},M(t.label),3),g("li",null,[g("ul",{class:W(t.ns.b("group"))},[ae(t.$slots,"default")],2)])],2)),[[Xt,t.visible]])}var UR=Ye(ege,[["render",tge],["__file","option-group.vue"]]);const Jt=jt(Qme,{Option:v4,OptionGroup:UR}),an=xs(v4),fb=xs(UR),_4=()=>qe(zR,{}),nge=Ze({pageSize:{type:Number,required:!0},pageSizes:{type:xe(Array),default:()=>si([10,20,30,40,50,100])},popperClass:{type:String},disabled:Boolean,teleported:Boolean,size:{type:String,values:Ac}}),sge=se({name:"ElPaginationSizes"}),ige=se({...sge,props:nge,emits:["page-size-change"],setup(t,{emit:e}){const n=t,{t:s}=fn(),i=He("pagination"),o=_4(),r=J(n.pageSize);Te(()=>n.pageSizes,(c,u)=>{if(!mc(c,u)&&Array.isArray(c)){const d=c.includes(n.pageSize)?n.pageSize:n.pageSizes[0];e("page-size-change",d)}}),Te(()=>n.pageSize,c=>{r.value=c});const a=q(()=>n.pageSizes);function l(c){var u;c!==r.value&&(r.value=c,(u=o.handleSizeChange)==null||u.call(o,Number(c)))}return(c,u)=>(v(),$("span",{class:W(A(i).e("sizes"))},[_(A(Jt),{"model-value":r.value,disabled:c.disabled,"popper-class":c.popperClass,size:c.size,teleported:c.teleported,"validate-event":!1,onChange:l},{default:w(()=>[(v(!0),$(te,null,be(A(a),d=>(v(),R(A(an),{key:d,value:d,label:d+A(s)("el.pagination.pagesize")},null,8,["value","label"]))),128))]),_:1},8,["model-value","disabled","popper-class","size","teleported"])],2))}});var oge=Ye(ige,[["__file","sizes.vue"]]);const rge=Ze({size:{type:String,values:Ac}}),age=se({name:"ElPaginationJumper"}),lge=se({...age,props:rge,setup(t){const{t:e}=fn(),n=He("pagination"),{pageCount:s,disabled:i,currentPage:o,changeEvent:r}=_4(),a=J(),l=q(()=>{var d;return(d=a.value)!=null?d: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(),$("span",{class:W(A(n).e("jump")),disabled:A(i)},[g("span",{class:W([A(n).e("goto")])},M(A(e)("el.pagination.goto")),3),_(A(vt),{size:d.size,class:W([A(n).e("editor"),A(n).is("in-pagination")]),min:1,max:A(s),disabled:A(i),"model-value":A(l),"validate-event":!1,"aria-label":A(e)("el.pagination.page"),type:"number","onUpdate:modelValue":c,onChange:u},null,8,["size","class","max","disabled","model-value","aria-label"]),g("span",{class:W([A(n).e("classifier")])},M(A(e)("el.pagination.pageClassifier")),3)],10,["disabled"]))}});var cge=Ye(lge,[["__file","jumper.vue"]]);const uge=Ze({total:{type:Number,default:1e3}}),dge=se({name:"ElPaginationTotal"}),hge=se({...dge,props:uge,setup(t){const{t:e}=fn(),n=He("pagination"),{disabled:s}=_4();return(i,o)=>(v(),$("span",{class:W(A(n).e("total")),disabled:A(s)},M(A(e)("el.pagination.total",{total:i.total})),11,["disabled"]))}});var fge=Ye(hge,[["__file","total.vue"]]);const pge=Ze({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),mge=se({name:"ElPaginationPager"}),gge=se({...mge,props:pge,emits:["change"],setup(t,{emit:e}){const n=t,s=He("pager"),i=He("icon"),{t:o}=fn(),r=J(!1),a=J(!1),l=J(!1),c=J(!1),u=J(!1),d=J(!1),h=q(()=>{const x=n.pagerCount,S=(x-1)/2,E=Number(n.currentPage),T=Number(n.pageCount);let P=!1,I=!1;T>x&&(E>x-S&&(P=!0),E<T-S&&(I=!0));const L=[];if(P&&!I){const V=T-(x-2);for(let D=V;D<T;D++)L.push(D)}else if(!P&&I)for(let V=2;V<x;V++)L.push(V);else if(P&&I){const V=Math.floor(x/2)-1;for(let D=E-V;D<=E+V;D++)L.push(D)}else for(let V=2;V<T;V++)L.push(V);return L}),f=q(()=>["more","btn-quickprev",i.b(),s.is("disabled",n.disabled)]),p=q(()=>["more","btn-quicknext",i.b(),s.is("disabled",n.disabled)]),m=q(()=>n.disabled?-1:0);br(()=>{const x=(n.pagerCount-1)/2;r.value=!1,a.value=!1,n.pageCount>n.pagerCount&&(n.currentPage>n.pagerCount-x&&(r.value=!0),n.currentPage<n.pageCount-x&&(a.value=!0))});function b(x=!1){n.disabled||(x?l.value=!0:c.value=!0)}function y(x=!1){x?u.value=!0:d.value=!0}function C(x){const S=x.target;if(S.tagName.toLowerCase()==="li"&&Array.from(S.classList).includes("number")){const E=Number(S.textContent);E!==n.currentPage&&e("change",E)}else S.tagName.toLowerCase()==="li"&&Array.from(S.classList).includes("more")&&k(x)}function k(x){const S=x.target;if(S.tagName.toLowerCase()==="ul"||n.disabled)return;let E=Number(S.textContent);const T=n.pageCount,P=n.currentPage,I=n.pagerCount-2;S.className.includes("more")&&(S.className.includes("quickprev")?E=P-I:S.className.includes("quicknext")&&(E=P+I)),Number.isNaN(+E)||(E<1&&(E=1),E>T&&(E=T)),E!==P&&e("change",E)}return(x,S)=>(v(),$("ul",{class:W(A(s).b()),onClick:k,onKeyup:$t(C,["enter"])},[x.pageCount>0?(v(),$("li",{key:0,class:W([[A(s).is("active",x.currentPage===1),A(s).is("disabled",x.disabled)],"number"]),"aria-current":x.currentPage===1,"aria-label":A(o)("el.pagination.currentPage",{pager:1}),tabindex:A(m)}," 1 ",10,["aria-current","aria-label","tabindex"])):O("v-if",!0),r.value?(v(),$("li",{key:1,class:W(A(f)),tabindex:A(m),"aria-label":A(o)("el.pagination.prevPages",{pager:x.pagerCount-2}),onMouseenter:E=>b(!0),onMouseleave:E=>l.value=!1,onFocus:E=>y(!0),onBlur:E=>u.value=!1},[(l.value||u.value)&&!x.disabled?(v(),R(A(gc),{key:0})):(v(),R(A(Q3),{key:1}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):O("v-if",!0),(v(!0),$(te,null,be(A(h),E=>(v(),$("li",{key:E,class:W([[A(s).is("active",x.currentPage===E),A(s).is("disabled",x.disabled)],"number"]),"aria-current":x.currentPage===E,"aria-label":A(o)("el.pagination.currentPage",{pager:E}),tabindex:A(m)},M(E),11,["aria-current","aria-label","tabindex"]))),128)),a.value?(v(),$("li",{key:2,class:W(A(p)),tabindex:A(m),"aria-label":A(o)("el.pagination.nextPages",{pager:x.pagerCount-2}),onMouseenter:E=>b(),onMouseleave:E=>c.value=!1,onFocus:E=>y(),onBlur:E=>d.value=!1},[(c.value||d.value)&&!x.disabled?(v(),R(A(vc),{key:0})):(v(),R(A(Q3),{key:1}))],42,["tabindex","aria-label","onMouseenter","onMouseleave","onFocus","onBlur"])):O("v-if",!0),x.pageCount>1?(v(),$("li",{key:3,class:W([[A(s).is("active",x.currentPage===x.pageCount),A(s).is("disabled",x.disabled)],"number"]),"aria-current":x.currentPage===x.pageCount,"aria-label":A(o)("el.pagination.currentPage",{pager:x.pageCount}),tabindex:A(m)},M(x.pageCount),11,["aria-current","aria-label","tabindex"])):O("v-if",!0)],42,["onKeyup"]))}});var vge=Ye(gge,[["__file","pager.vue"]]);const fi=t=>typeof t!="number",_ge=Ze({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:t=>xt(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:xe(Array),default:()=>si([10,20,30,40,50,100])},popperClass:{type:String,default:""},prevText:{type:String,default:""},prevIcon:{type:ms,default:()=>Yu},nextText:{type:String,default:""},nextIcon:{type:ms,default:()=>kr},teleported:{type:Boolean,default:!0},small:Boolean,size:Ji,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean}),yge={"update:current-page":t=>xt(t),"update:page-size":t=>xt(t),"size-change":t=>xt(t),change:(t,e)=>xt(t)&&xt(e),"current-change":t=>xt(t),"prev-click":t=>xt(t),"next-click":t=>xt(t)},E$="ElPagination";var bge=se({name:E$,props:_ge,emits:yge,setup(t,{emit:e,slots:n}){const{t:s}=fn(),i=He("pagination"),o=pt().vnode.props||{},r=hD(),a=q(()=>{var S;return t.small?"small":(S=t.size)!=null?S:r.value});sc({from:"small",replacement:"size",version:"3.0.0",scope:"el-pagination",ref:"https://element-plus.org/zh-CN/component/pagination.html"},q(()=>!!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=q(()=>{if(fi(t.total)&&fi(t.pageCount)||!fi(t.currentPage)&&!l)return!1;if(t.layout.includes("sizes")){if(fi(t.pageCount)){if(!fi(t.total)&&!fi(t.pageSize)&&!c)return!1}else if(!c)return!1}return!0}),d=J(fi(t.defaultPageSize)?10:t.defaultPageSize),h=J(fi(t.defaultCurrentPage)?1:t.defaultCurrentPage),f=q({get(){return fi(t.pageSize)?d.value:t.pageSize},set(S){fi(t.pageSize)&&(d.value=S),c&&(e("update:page-size",S),e("size-change",S))}}),p=q(()=>{let S=0;return fi(t.pageCount)?fi(t.total)||(S=Math.max(1,Math.ceil(t.total/f.value))):S=t.pageCount,S}),m=q({get(){return fi(t.currentPage)?h.value:t.currentPage},set(S){let E=S;S<1?E=1:S>p.value&&(E=p.value),fi(t.currentPage)&&(h.value=E),l&&(e("update:current-page",E),e("current-change",E))}});Te(p,S=>{m.value>S&&(m.value=S)}),Te([m,f],S=>{e("change",...S)},{flush:"post"});function b(S){m.value=S}function y(S){f.value=S;const E=p.value;m.value>E&&(m.value=E)}function C(){t.disabled||(m.value-=1,e("prev-click",m.value))}function k(){t.disabled||(m.value+=1,e("next-click",m.value))}function x(S,E){S&&(S.props||(S.props={}),S.props.class=[S.props.class,E].join(" "))}return It(zR,{pageCount:p,disabled:q(()=>t.disabled),currentPage:m,changeEvent:b,handleSizeChange:y}),()=>{var S,E;if(!u.value)return s("el.pagination.deprecationWarning"),null;if(!t.layout||t.hideOnSinglePage&&p.value<=1)return null;const T=[],P=[],I=gt("div",{class:i.e("rightwrapper")},P),L={prev:gt(Rme,{disabled:t.disabled,currentPage:m.value,prevText:t.prevText,prevIcon:t.prevIcon,onClick:C}),jumper:gt(cge,{size:a.value}),pager:gt(vge,{currentPage:m.value,pageCount:p.value,pagerCount:t.pagerCount,onChange:b,disabled:t.disabled}),next:gt(Bme,{disabled:t.disabled,currentPage:m.value,pageCount:p.value,nextText:t.nextText,nextIcon:t.nextIcon,onClick:k}),sizes:gt(oge,{pageSize:f.value,pageSizes:t.pageSizes,popperClass:t.popperClass,disabled:t.disabled,teleported:t.teleported,size:a.value}),slot:(E=(S=n==null?void 0:n.default)==null?void 0:S.call(n))!=null?E:null,total:gt(fge,{total:fi(t.total)?0:t.total})},V=t.layout.split(",").map(z=>z.trim());let D=!1;return V.forEach(z=>{if(z==="->"){D=!0;return}D?P.push(L[z]):T.push(L[z])}),x(T[0],i.is("first")),x(T[T.length-1],i.is("last")),D&&P.length>0&&(x(P[0],i.is("first")),x(P[P.length-1],i.is("last")),T.push(I)),gt("div",{class:[i.b(),i.is("background",t.background),i.m(a.value)]},T)}}});const wge=jt(bge),Cge=Ze({trigger:_g.trigger,placement:Q0.placement,disabled:_g.disabled,visible:Bi.visible,transition:Bi.transition,popperOptions:Q0.popperOptions,tabindex:Q0.tabindex,content:Bi.content,popperStyle:Bi.popperStyle,popperClass:Bi.popperClass,enterable:{...Bi.enterable,default:!0},effect:{...Bi.effect,default:"light"},teleported:Bi.teleported,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}}),kge={"update:visible":t=>li(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},xge="onUpdate:visible",Sge=se({name:"ElPopover"}),$ge=se({...Sge,props:Cge,emits:kge,setup(t,{expose:e,emit:n}){const s=t,i=q(()=>s[xge]),o=He("popover"),r=J(),a=q(()=>{var b;return(b=A(r))==null?void 0:b.popperRef}),l=q(()=>[{width:Ai(s.width)},s.popperStyle]),c=q(()=>[o.b(),s.popperClass,{[o.m("plain")]:!!s.content}]),u=q(()=>s.transition===`${o.namespace.value}-fade-in-linear`),d=()=>{var b;(b=r.value)==null||b.hide()},h=()=>{n("before-enter")},f=()=>{n("before-leave")},p=()=>{n("after-enter")},m=()=>{n("update:visible",!1),n("after-leave")};return e({popperRef:a,hide:d}),(b,y)=>(v(),R(A(di),Mn({ref_key:"tooltipRef",ref:r},b.$attrs,{trigger:b.trigger,placement:b.placement,disabled:b.disabled,visible:b.visible,transition:b.transition,"popper-options":b.popperOptions,tabindex:b.tabindex,content:b.content,offset:b.offset,"show-after":b.showAfter,"hide-after":b.hideAfter,"auto-close":b.autoClose,"show-arrow":b.showArrow,"aria-label":b.title,effect:b.effect,enterable:b.enterable,"popper-class":A(c),"popper-style":A(l),teleported:b.teleported,persistent:b.persistent,"gpu-acceleration":A(u),"onUpdate:visible":A(i),onBeforeShow:h,onBeforeHide:f,onShow:p,onHide:m}),{content:w(()=>[b.title?(v(),$("div",{key:0,class:W(A(o).e("title")),role:"title"},M(b.title),3)):O("v-if",!0),ae(b.$slots,"default",{},()=>[G(M(b.content),1)])]),default:w(()=>[b.$slots.reference?ae(b.$slots,"reference",{key:0}):O("v-if",!0)]),_:3},16,["trigger","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","persistent","gpu-acceleration","onUpdate:visible"]))}});var Age=Ye($ge,[["__file","popover.vue"]]);const T$=(t,e)=>{const n=e.arg||e.value,s=n==null?void 0:n.popperRef;s&&(s.triggerRef=t)};var Mge={mounted(t,e){T$(t,e)},updated(t,e){T$(t,e)}};const Ege="popover",Tge=Voe(Mge,Ege),Ii=jt(Age,{directive:Tge}),Pge=Ze({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:xe(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:xe([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:xe(Function),default:t=>`${t}%`}}),Ige=se({name:"ElProgress"}),Lge=se({...Ige,props:Pge,setup(t){const e=t,n={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},s=He("progress"),i=q(()=>{const k={width:`${e.percentage}%`,animationDuration:`${e.duration}s`},x=C(e.percentage);return x.includes("gradient")?k.background=x:k.backgroundColor=x,k}),o=q(()=>(e.strokeWidth/e.width*100).toFixed(1)),r=q(()=>["circle","dashboard"].includes(e.type)?Number.parseInt(`${50-Number.parseFloat(o.value)/2}`,10):0),a=q(()=>{const k=r.value,x=e.type==="dashboard";return` | |
| 72 | +*/const F0="_Mousewheel",mA=function(t,e){if(t&&t.addEventListener){iV(t);const n=function(i){const s=che(i);e&&Reflect.apply(e,this,[i,s])};t[F0]={wheelHandler:n},t.addEventListener("wheel",n,{passive:!0})}},iV=t=>{var e;(e=t[F0])!=null&&e.wheelHandler&&(t.removeEventListener("wheel",t[F0].wheelHandler),t[F0]=null)},uhe={beforeMount(t,e){mA(t,e.value)},unmounted(t){iV(t)},updated(t,e){e.value!==e.oldValue&&mA(t,e.value)}},dhe=Ge({...Gde,datetimeRole:String,parsedValue:{type:de(Object)}}),hhe=({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}}},Rw=t=>{const e=(i,s)=>i||s,n=i=>i!==!0;return t.map(e).filter(n)},oV=(t,e,n)=>({getHoursList:(r,a)=>Dw(24,t&&(()=>t==null?void 0:t(r,a))),getMinutesList:(r,a,l)=>Dw(60,e&&(()=>e==null?void 0:e(r,a,l))),getSecondsList:(r,a,l,c)=>Dw(60,n&&(()=>n==null?void 0:n(r,a,l,c)))}),fhe=(t,e,n)=>{const{getHoursList:i,getMinutesList:s,getSecondsList:o}=oV(t,e,n);return{getAvailableHours:(c,u)=>Rw(i(c,u)),getAvailableMinutes:(c,u,d)=>Rw(s(c,u,d)),getAvailableSeconds:(c,u,d,h)=>Rw(o(c,u,d,h))}},phe=(t,e)=>{const n=J(t.parsedValue);return Te(()=>t.visible,i=>{const s=fk(e.modelValue),o=fk(e.valueOnClear);if(i&&s===o){n.value=o;return}i||(n.value=t.parsedValue)}),n},mhe=Ge({role:{type:String,required:!0},spinnerDate:{type:de(Object),required:!0},showSeconds:{type:Boolean,default:!0},arrowControl:Boolean,amPmMode:{type:de(String),default:""},...a8}),ghe=["onClick"],vhe=["onMouseenter"];var _he=fe({__name:"basic-time-spinner",props:mhe,emits:[dn,"select-range","set-option"],setup(t,{emit:e}){const n=t,{isRange:i,format:s,saveOnBlur:o}=qe(Ia).props,r=e,a=Be("time"),{getHoursList:l,getMinutesList:c,getSecondsList:u}=oV(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?oA:oA.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,ge=i?void 0:ae;return{hours:l(Z,ge),minutes:c(Q,Z,ge),seconds:u(Q,ne,Z,ge)}}),k=Y(()=>{const{hours:Q,minutes:ne,seconds:Z}=E(y);return{hours:Ow(Q,23),minutes:Ow(ne,59),seconds:Ow(Z,59)}}),C=_d(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},S=Q=>{let ne=[0,0];const Z=s||Jg,ae=Z.indexOf("HH"),ge=Z.indexOf("mm"),Ce=Z.indexOf("ss");switch(Q){case"hours":ae!==-1&&(ne=[ae,ae+2]);break;case"minutes":ge!==-1&&(ne=[ge,ge+2]);break;case"seconds":Ce!==-1&&(ne=[Ce,Ce+2]);break}const[oe,pe]=ne;r("select-range",oe,pe),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,Yg(()=>{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(il(ne,"height"))||0},R=()=>{B(1)},V=()=>{B(-1)},B=Q=>{f.value||S("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(()=>S(ne))},F=(Q,ne,Z,ae)=>{let ge=(ne+Z+ae)%ae;const Ce=E(b)[Q];for(;Ce[ge]&&ge!==ne;)ge=(ge+Z+ae)%ae;return ge},z=(Q,ne)=>{if(E(b)[Q][ne])return;const{hours:Z,minutes:ae,seconds:ge}=E(y);let Ce;switch(Q){case"hours":Ce=n.spinnerDate.hour(ne).minute(ae).second(ge);break;case"minutes":Ce=n.spinnerDate.hour(Z).minute(ne).second(ge);break;case"seconds":Ce=n.spinnerDate.hour(Z).minute(ae).second(ne);break}r(dn,Ce)},U=(Q,{value:ne,disabled:Z})=>{Z||(z(Q,ne),S(Q),I(Q,ne))},G=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=()=>{G(ne)})};Q("hours"),Q("minutes"),Q("seconds")};Ft(()=>{ot(()=>{!n.arrowControl&&X(),P(),n.role==="start"&&S("hours")})});const W=(Q,ne)=>{p[ne].value=Q??void 0};return r("set-option",[`${n.role}_scrollDown`,B]),r("set-option",[`${n.role}_emitSelectRange`,S]),Te(()=>n.spinnerDate,()=>{d||P()}),(Q,ne)=>(v(),A("div",{class:q([E(a).b("spinner"),{"has-seconds":Q.showSeconds}])},[Q.arrowControl?O("v-if",!0):(v(!0),A(ee,{key:0},we(m.value,Z=>(v(),D(E(qs),{key:Z,ref_for:!0,ref:ae=>W(ae,Z),class:q(E(a).be("spinner","wrapper")),"wrap-style":"max-height: inherit;","view-class":E(a).be("spinner","list"),noresize:"",tag:"ul",onMouseenter:ae=>S(Z),onMousemove:ae=>M(Z)},{default:w(()=>[(v(!0),A(ee,null,we(b.value[Z],(ae,ge)=>(v(),A("li",{key:ge,class:q([E(a).be("spinner","item"),E(a).is("active",ge===y.value[Z]),E(a).is("disabled",ae)]),onClick:Ce=>U(Z,{value:ge,disabled:ae})},[Z==="hours"?(v(),A(ee,{key:0},[N(x(("0"+(Q.amPmMode?ge%12||12:ge)).slice(-2))+x($(ge)),1)],64)):(v(),A(ee,{key:1},[N(x(("0"+ge).slice(-2)),1)],64))],10,ghe))),128))]),_:2},1032,["class","view-class","onMouseenter","onMousemove"]))),128)),Q.arrowControl?(v(!0),A(ee,{key:1},we(m.value,Z=>(v(),A("div",{key:Z,class:q([E(a).be("spinner","wrapper"),E(a).is("arrow")]),onMouseenter:ae=>S(Z)},[Re((v(),D(E(be),{class:q(["arrow-up",E(a).be("spinner","arrow")])},{default:w(()=>[_(E(Zb))]),_:1},8,["class"])),[[E(wy),V]]),Re((v(),D(E(be),{class:q(["arrow-down",E(a).be("spinner","arrow")])},{default:w(()=>[_(E(Bd))]),_:1},8,["class"])),[[E(wy),R]]),g("ul",{class:q(E(a).be("spinner","list"))},[(v(!0),A(ee,null,we(k.value[Z],(ae,ge)=>(v(),A("li",{key:ge,class:q([E(a).be("spinner","item"),E(a).is("active",ae===y.value[Z]),E(a).is("disabled",b.value[Z][ae])])},[E(wt)(ae)?(v(),A(ee,{key:0},[Z==="hours"?(v(),A(ee,{key:0},[N(x(("0"+(Q.amPmMode?ae%12||12:ae)).slice(-2))+x($(ae)),1)],64)):(v(),A(ee,{key:1},[N(x(("0"+ae).slice(-2)),1)],64))],64)):O("v-if",!0)],2))),128))],2)],42,vhe))),128)):O("v-if",!0)],2))}}),yhe=_he,bhe=fe({__name:"panel-time-pick",props:dhe,emits:["pick","select-range","set-picker-option"],setup(t,{emit:e}){const n=t,i=e,s=qe(Ia),{arrowControl:o,disabledHours:r,disabledMinutes:a,disabledSeconds:l,defaultValue:c}=s.props,{getAvailableHours:u,getAvailableMinutes:d,getAvailableSeconds:h}=fhe(r,a,l),f=Be("time"),{t:p,lang:m}=Qt(),y=J([0,2]),b=phe(n,{modelValue:Y(()=>s.props.modelValue),valueOnClear:Y(()=>s!=null&&s.emptyValues?s.emptyValues.valueOnClear.value:null)}),k=Y(()=>nn(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":""),S=K=>{const X=ht(K).locale(m.value),W=z(X);return X.isSame(W)},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,W=X.indexOf("HH"),Q=X.indexOf("mm"),ne=X.indexOf("ss"),Z=[],ae=[];W!==-1&&(Z.push(W),ae.push("hours")),Q!==-1&&(Z.push(Q),ae.push("minutes")),ne!==-1&&C.value&&(Z.push(ne),ae.push("seconds"));const ge=(Z.indexOf(y.value[0])+K+Z.length)%Z.length;V.start_emitSelectRange(ae[ge])},R=K=>{const X=ls(K),{left:W,right:Q,up:ne,down:Z}=Ue;if([W,Q].includes(X)){L(X===W?-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:B,getAvailableTime:F}=hhe({getAvailableHours:u,getAvailableMinutes:d,getAvailableSeconds:h}),z=K=>F(K,n.datetimeRole||"",!0),U=K=>K?ht(K,n.format).locale(m.value):null,G=()=>ht(c).locale(m.value);return i("set-picker-option",["isValidValue",S]),i("set-picker-option",["parseUserInput",U]),i("set-picker-option",["handleKeydownInput",R]),i("set-picker-option",["getRangeAvailableTime",z]),i("set-picker-option",["getDefaultValue",G]),i("set-picker-option",["handleCancel",M]),(K,X)=>(v(),D(Ho,{name:k.value},{default:w(()=>[K.actualVisible||K.visible?(v(),A("div",{key:0,class:q(E(f).b("panel"))},[g("div",{class:q([E(f).be("panel","content"),{"has-seconds":C.value}])},[_(yhe,{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(B),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:q(E(f).be("panel","footer"))},[g("button",{type:"button",class:q([E(f).be("panel","btn"),"cancel"]),onClick:M},x(E(p)("el.datepicker.cancel")),3),g("button",{type:"button",class:q([E(f).be("panel","btn"),"confirm"]),onClick:X[0]||(X[0]=W=>P())},x(E(p)("el.datepicker.confirm")),3)],2)],2)):O("v-if",!0)]),_:1},8,["name"]))}}),wC=bhe,rV={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,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 B=V&&V.toUpperCase();return R||k[V]||n[V]||k[B].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(F,z,U){return z||U.slice(1)})})).match(i),$=C.length,S=0;S<$;S+=1){var M=C[S],P=p[M],T=P&&P[0],I=P&&P[1];C[S]=I?{regex:T,parser:I}:M.replace(/^\[|\]$/g,"")}return function(L){for(var R={},V=0,B=0;V<$;V+=1){var F=C[V];if(typeof F=="string")B+=F.length;else{var z=F.regex,U=F.parser,G=L.slice(B),K=z.exec(G)[0];U.call(R,K),L=L.replace(K,"")}}return function(X){var W=X.afternoon;if(W!==void 0){var Q=X.hours;W?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(S){var M=S.date,P=S.utc,T=S.args;this.$u=P;var I=T[1];if(typeof I=="string"){var L=T[2]===!0,R=T[3]===!0,V=L||R,B=T[2];R&&(B=T[2]),l=this.$locale(),!L&&B&&(l=k.Ls[B]),this.$d=function(G,K,X,W){try{if(["x","X"].indexOf(K)>-1)return new Date((K==="X"?1e3:1)*G);var Q=m(K)(G),ne=Q.year,Z=Q.month,ae=Q.day,ge=Q.hours,Ce=Q.minutes,oe=Q.seconds,pe=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 me,$e=ge||0,Se=Ce||0,Le=oe||0,We=pe||0;return ie?new Date(Date.UTC(te,se,je,$e,Se,Le,We+60*ie.offset*1e3)):X?new Date(Date.UTC(te,se,je,$e,Se,Le,We)):(me=new Date(te,se,je,$e,Se,Le,We),re&&(me=W(me).week(re).toDate()),me)}catch{return new Date("")}}(M,I,P,k),this.init(),B&&B!==!0&&(this.$L=this.locale(B).$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 U=k.apply(this,T);if(U.isValid()){this.$d=U.$d,this.$L=U.$L,this.init();break}z===F&&(this.$d=new Date(""))}else $.call(this,S)}}})})(rV);var whe=rV.exports;const aV=vi(whe),e1=Ge({type:{type:String,values:["primary","success","info","warning","danger"],default:"primary"},closable:Boolean,disableTransitions:Boolean,hit:Boolean,color:String,size:{type:String,values:$l},effect:{type:String,values:["dark","light","plain"],default:"light"},round:Boolean}),khe={close:t=>t instanceof MouseEvent,click:t=>t instanceof MouseEvent},Che=["aria-label"],xhe=["aria-label"];var She=fe({name:"ElTag",__name:"tag",props:e1,emits:khe,setup(t,{emit:e}){const n=t,i=e,s=Ii(),{t:o}=Qt(),r=Be("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:q(a.value),style:Xe({backgroundColor:t.color}),onClick:c},[g("span",{class:q(E(r).e("content"))},[le(d.$slots,"default")],2),t.closable?(v(),A("button",{key:0,"aria-label":E(o)("el.tag.close"),class:q(E(r).e("close")),type:"button",onClick:Ee(l,["stop"])},[_(E(be),null,{default:w(()=>[_(E(Bo))]),_:1})],10,Che)):O("v-if",!0)],6)):(v(),D(Ho,{key:1,name:`${E(r).namespace.value}-zoom-in-center`,appear:"",onVnodeMounted:u},{default:w(()=>[g("span",{class:q(a.value),style:Xe({backgroundColor:t.color}),onClick:c},[g("span",{class:q(E(r).e("content"))},[le(d.$slots,"default")],2),t.closable?(v(),A("button",{key:0,"aria-label":E(o)("el.tag.close"),class:q(E(r).e("close")),type:"button",onClick:Ee(l,["stop"])},[_(E(be),null,{default:w(()=>[_(E(Bo))]),_:1})],10,xhe)):O("v-if",!0)],6)]),_:3},8,["name"]))}}),$he=She;const hi=qt($he),lV=Symbol("ElSelectGroup"),t2=Symbol("ElSelect"),kC={label:"label",value:"value",disabled:"disabled",options:"options"};function Ahe(t){const e=J({...kC,...t.props});let n={...t.props};return Te(()=>t.props,a=>{Wi(a,n)||(e.value={...kC,...a},n={...a})},{deep:!0}),{aliasProps:e,getLabel:a=>ji(a,e.value.label),getValue:a=>ji(a,e.value.value),getDisabled:a=>ji(a,e.value.disabled),getOptions:a=>ji(a,e.value.options)}}const Ehe=Ge({name:String,id:String,modelValue:{type:de([Array,String,Number,Boolean,Object]),default:void 0},autocomplete:{type:String,default:"off"},automaticDropdown:Boolean,size:Zi,effect:{type:de(String),default:"light"},disabled:{type:Boolean,default:void 0},clearable:Boolean,filterable:Boolean,allowCreate:Boolean,loading:Boolean,popperClass:{type:String,default:""},popperStyle:{type:de([String,Object])},popperOptions:{type:de(Object),default:()=>({})},remote:Boolean,debounce:{type:Number,default:300},loadingText:String,noMatchText:String,noDataText:String,remoteMethod:{type:de(Function)},filterMethod:{type:de(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:de(Object),default:()=>({})},maxCollapseTags:{type:Number,default:1},teleported:zn.teleported,persistent:{type:Boolean,default:!0},clearIcon:{type:ds,default:Zc},fitInputWidth:Boolean,suffixIcon:{type:ds,default:Bd},tagType:{...e1.type,default:"info"},tagEffect:{...e1.effect,default:"light"},validateEvent:{type:Boolean,default:!0},remoteShowSuffix:Boolean,showArrow:{type:Boolean,default:!0},offset:{type:Number,default:12},placement:{type:de(String),values:hp,default:"bottom-start"},fallbackPlacements:{type:de(Array),default:["bottom-start","top-start","right","left"]},tabindex:{type:[String,Number],default:0},appendTo:zn.appendTo,options:{type:de(Array)},props:{type:de(Object),default:()=>kC},...F1,...xr(["ariaLabel"])});Mt+"",dn+"",PR.scroll;const CC="ElOption",Mhe=Ge({value:{type:[String,Number,Boolean,Object],required:!0},label:{type:[String,Number]},created:Boolean,disabled:Boolean});function The(t,e){const n=qe(t2);n||vo(CC,"usage: <el-select><el-option /></el-select/>");const i=qe(lV,{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=pt(),u=(f=[],p)=>{if(yt(t.value)){const m=n.props.valueKey;return f&&f.some(y=>an(ji(y,m))===ji(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(Oie(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:!Wi(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 Phe=fe({name:CC,componentName:CC,props:Mhe,setup(t){const e=Be("select"),n=kr(),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}=The(t,s),{visible:d,hover:h}=go(s),f=pt().proxy;l.onOptionCreate(f),wn(()=>{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 Ihe=["id","aria-disabled","aria-selected"];function Lhe(t,e,n,i,s,o){return Re((v(),A("li",{id:t.id,class:q(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]=Ee((...r)=>t.selectOptionClick&&t.selectOptionClick(...r),["stop"]))},[le(t.$slots,"default",{},()=>[g("span",null,x(t.currentLabel),1)])],42,Ihe)),[[jt,t.visible]])}var l8=gi(Phe,[["render",Lhe]]),Ohe=fe({name:"ElOptionGroup",componentName:"ElOptionGroup",props:{label:String,disabled:Boolean},setup(t){const e=Be("select"),n=J(),i=pt(),s=J([]);Pt(lV,In({...go(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;is(h)&&(r(h)?d.push(h.component.proxy):Me(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()}),xie(n,l,{attributes:!0,subtree:!0,childList:!0}),{groupRef:n,visible:o,ns:e}}});function Dhe(t,e,n,i,s,o){return Re((v(),A("ul",{ref:"groupRef",class:q(t.ns.be("group","wrap"))},[g("li",{class:q(t.ns.be("group","title"))},x(t.label),3),g("li",null,[g("ul",{class:q(t.ns.b("group"))},[le(t.$slots,"default")],2)])],2)),[[jt,t.visible]])}var c8=gi(Ohe,[["render",Dhe]]),Rhe=fe({name:"ElSelectDropdown",componentName:"ElSelectDropdown",setup(){const t=qe(t2),e=Be("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-eJ}px`:o.value=""}return Ft(()=>{r(),Ts(t.selectRef,r)}),{ns:e,minWidth:o,popperClass:n,isMultiple:i,isFitInputWidth:s}}});function Vhe(t,e,n,i,s,o){return v(),A("div",{class:q([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:q(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:q(t.ns.be("dropdown","footer"))},[le(t.$slots,"footer")],2)):O("v-if",!0)],6)}var Fhe=gi(Rhe,[["render",Vhe]]);const Nhe=(t,e)=>{const{t:n}=Qt(),i=mi(),s=kr(),o=Be("select"),r=Be("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(),S=J(!1),{form:M,formItem:P}=_o(),{inputId:T}=Tl(t,{formItemContext:P}),{valueOnClear:I,isEmptyValue:L}=Y4(t),{isComposing:R,handleCompositionStart:V,handleCompositionUpdate:B,handleCompositionEnd:F}=W4({afterComposition:xe=>_t(xe)}),z=bs(),{wrapperRef:U,isFocused:G,handleBlur:K}=pp(h,{disabled:z,afterFocus(){t.automaticDropdown&&!C.value&&(C.value=!0,a.menuVisibleOnFocus=!0)},beforeBlur(xe){var Qe,$t;return((Qe=u.value)==null?void 0:Qe.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(Qe=>Tt(Qe)))}}),X=Y(()=>Me(t.modelValue)?t.modelValue.length>0:!L(t.modelValue)),W=Y(()=>(M==null?void 0:M.statusIcon)??!1),Q=Y(()=>t.clearable&&!z.value&&X.value&&(G.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)||""),ge=Y(()=>ae.value&&Q4[ae.value]),Ce=Y(()=>t.remote?t.debounce:0),oe=Y(()=>t.remote&&!a.inputValue&&a.options.size===0),pe=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()),Qe=[];return a.optionValues.forEach($t=>{const Mn=xe.findIndex(ks=>ks.value===$t);Mn>-1&&Qe.push(xe[Mn])}),Qe.length>=xe.length?Qe:xe}),ke=Y(()=>Array.from(a.cachedOptions.values())),je=Y(()=>{const xe=re.value.filter(Qe=>!Qe.created).some(Qe=>Qe.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 Qe;(Qe=xe.updateOption)==null||Qe.call(xe,a.inputValue)})},se=Ii(),me=Y(()=>["small"].includes(se.value)?"small":"default"),$e=Y({get(){return C.value&&(t.loading||!oe.value||t.remote&&!!i.empty)&&(!S.value||!$4(a.previousQuery)||a.options.size>0)},set(xe){C.value=xe}}),Se=Y(()=>{if(t.multiple&&!nn(t.modelValue))return Us(t.modelValue).length===0&&!a.inputValue;const xe=Me(t.modelValue)?t.modelValue[0]:t.modelValue;return t.filterable||nn(xe)?!a.inputValue:!0}),Le=Y(()=>{const xe=t.placeholder??n("el.select.placeholder");return t.multiple||!X.value?xe:a.selectedLabel}),We=Y(()=>qk?null:"mouseenter");Te(()=>t.modelValue,(xe,Qe)=>{t.multiple&&t.filterable&&!t.reserveKeyword&&(a.inputValue="",Fe("")),Ae(),!Wi(xe,Qe)&&t.validateEvent&&(P==null||P.validate("change").catch($t=>Tt($t)))},{flush:"post",deep:!0}),Te(()=>C.value,xe=>{xe?Fe(a.inputValue):(a.inputValue="",a.previousQuery=null,a.isBeforeHide=!0,a.menuVisibleOnFocus=!1)}),Te(()=>a.options.entries(),()=>{Kt&&(Ae(),t.defaultFirstOption&&(t.filterable||t.remote)&&ie.value&&ze())},{flush:"post"}),Te([()=>a.hoveringIndex,re],([xe])=>{wt(xe)&&xe>-1?$.value=re.value[xe]||{}:$.value={},re.value.forEach(Qe=>{Qe.hover=$.value===Qe})}),_l(()=>{a.isBeforeHide||te()});const Fe=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(ze):ot(Ye))},ze=()=>{const xe=re.value.filter(Mn=>Mn.visible&&!Mn.disabled&&!Mn.states.groupDisabled),Qe=xe.find(Mn=>Mn.created),$t=xe[0];a.hoveringIndex=De(re.value.map(Mn=>Mn.value),Qe||$t)},Ae=()=>{if(t.multiple)a.selectedLabel="";else{const Qe=Ze(Me(t.modelValue)?t.modelValue[0]:t.modelValue);a.selectedLabel=Qe.currentLabel,a.selected=[Qe];return}const xe=[];nn(t.modelValue)||Us(t.modelValue).forEach(Qe=>{xe.push(Ze(Qe))}),a.selected=xe},Ze=xe=>{let Qe;const $t=hd(xe);for(let Mn=a.cachedOptions.size-1;Mn>=0;Mn--){const ks=ke.value[Mn];if($t?ji(ks.value,t.valueKey)===ji(xe,t.valueKey):ks.value===xe){Qe={index:re.value.filter(Gs=>!Gs.created).indexOf(ks),value:xe,currentLabel:ks.currentLabel,get isDisabled(){return ks.isDisabled}};break}}return Qe||{index:-1,value:xe,currentLabel:$t?xe.label:xe??""}},Ye=()=>{const xe=a.selected.length;if(xe>0){const Qe=a.selected[xe-1];a.hoveringIndex=re.value.findIndex($t=>Ko(Qe)===Ko($t))}else a.hoveringIndex=-1},it=()=>{a.selectionWidth=Number.parseFloat(window.getComputedStyle(c.value).width)},ye=()=>{a.collapseItemWidth=b.value.getBoundingClientRect().width},ve=()=>{var xe,Qe;(Qe=(xe=u.value)==null?void 0:xe.updatePopper)==null||Qe.call(xe)},Pe=()=>{var xe,Qe;(Qe=(xe=d.value)==null?void 0:xe.updatePopper)==null||Qe.call(xe)},Ie=()=>{a.inputValue.length>0&&!C.value&&(C.value=!0),Fe(a.inputValue)},_t=xe=>{if(a.inputValue=xe.target.value,t.remote)S.value=!0,Lt();else return Ie()},Lt=vD(()=>{Ie(),S.value=!1},Ce),Je=xe=>{Wi(t.modelValue,xe)||e(dn,xe)},dt=xe=>zse(xe,Qe=>{const $t=a.cachedOptions.get(Qe);return!($t!=null&&$t.disabled)&&!($t!=null&&$t.states.groupDisabled)}),mt=xe=>{const Qe=ls(xe);if(t.multiple&&Qe!==Ue.delete&&xe.target.value.length<=0){const $t=Us(t.modelValue).slice(),Mn=dt($t);if(Mn<0)return;const ks=$t[Mn];$t.splice(Mn,1),e(Mt,$t),Je($t),e("remove-tag",ks)}},_e=(xe,Qe)=>{const $t=a.selected.indexOf(Qe);if($t>-1&&!z.value){const Mn=Us(t.modelValue).slice();Mn.splice($t,1),e(Mt,Mn),Je(Mn),e("remove-tag",Qe.value)}xe.stopPropagation(),Vl()},Oe=xe=>{xe.stopPropagation();const Qe=t.multiple?[]:I.value;if(t.multiple)for(const $t of a.selected)$t.isDisabled&&Qe.push($t.value);e(Mt,Qe),Je(Qe),a.hoveringIndex=-1,C.value=!1,e("clear"),Vl()},ce=xe=>{if(t.multiple){const Qe=Us(t.modelValue??[]).slice(),$t=De(Qe,xe);$t>-1?Qe.splice($t,1):(t.multipleLimit<=0||Qe.length<t.multipleLimit)&&Qe.push(xe.value),e(Mt,Qe),Je(Qe),xe.created&&Fe(""),t.filterable&&(xe.created||!t.reserveKeyword)&&(a.inputValue="")}else!Wi(t.modelValue,xe.value)&&e(Mt,xe.value),Je(xe.value),C.value=!1;Vl(),!C.value&&ot(()=>{gt(xe)})},De=(xe,Qe)=>nn(Qe)?-1:yt(Qe.value)?xe.findIndex($t=>Wi(ji($t,t.valueKey),Ko(Qe))):xe.indexOf(Qe.value),gt=xe=>{var Mn,ks,Gs,Np,c9;const Qe=Me(xe)?xe[xe.length-1]:xe;let $t=null;if(!ui(Qe==null?void 0:Qe.value)){const Bp=re.value.filter(PW=>PW.value===Qe.value);Bp.length>0&&($t=Bp[0].$el)}if(u.value&&$t){const Bp=(Np=(Gs=(ks=(Mn=u.value)==null?void 0:Mn.popperRef)==null?void 0:ks.contentRef)==null?void 0:Gs.querySelector)==null?void 0:Np.call(Gs,`.${o.be("dropdown","wrap")}`);Bp&&Wie(Bp,$t)}(c9=k.value)==null||c9.handleScroll()},bn=xe=>{a.options.set(xe.value,xe),a.cachedOptions.set(xe.value,xe)},gs=(xe,Qe)=>{a.options.get(xe)===Qe&&a.options.delete(xe)},du=Y(()=>{var xe,Qe;return(Qe=(xe=u.value)==null?void 0:xe.popperRef)==null?void 0:Qe.contentRef}),Vp=()=>{a.isBeforeHide=!1,ot(()=>{var xe;(xe=k.value)==null||xe.update(),gt(a.selected)})},Vl=()=>{var xe;(xe=h.value)==null||xe.focus()},ca=()=>{var xe;if(C.value){C.value=!1,ot(()=>{var Qe;return(Qe=h.value)==null?void 0:Qe.blur()});return}(xe=h.value)==null||xe.blur()},$n=xe=>{Oe(xe)},Di=xe=>{if(C.value=!1,G.value){const Qe=new FocusEvent("blur",xe);ot(()=>K(Qe))}},nt=()=>{a.inputValue.length>0?a.inputValue="":C.value=!1},at=xe=>{var Qe;z.value||t.filterable&&C.value&&xe&&!((Qe=p.value)!=null&&Qe.contains(xe.target))||(qk&&(a.inputHovering=!0),a.menuVisibleOnFocus?a.menuVisibleOnFocus=!1:C.value=!C.value)},vt=()=>{if(!C.value)at();else{const xe=re.value[a.hoveringIndex];xe&&!xe.isDisabled&&ce(xe)}},Ko=xe=>yt(xe.value)?ji(xe.value,t.valueKey):xe.value,Fl=Y(()=>re.value.filter(xe=>xe.visible).every(xe=>xe.isDisabled)),hu=Y(()=>t.multiple?t.collapseTags?a.selected.slice(0,t.maxCollapseTags):a.selected:[]),SW=Y(()=>t.multiple?t.collapseTags?a.selected.slice(t.maxCollapseTags):[]:[]),Ev=xe=>{if(!C.value){C.value=!0;return}if(!(a.options.size===0||ie.value===0||R.value)&&!Fl.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 Qe=re.value[a.hoveringIndex];(Qe.isDisabled||!Qe.visible)&&Ev(xe),ot(()=>gt($.value))}},l9=(xe,Qe,$t,Mn)=>{for(let ks=Qe;ks>=0&&ks<Mn;ks+=$t){const Gs=xe[ks];if(!(Gs!=null&&Gs.isDisabled)&&(Gs!=null&&Gs.visible))return ks}return null},Mv=(xe,Qe)=>{const $t=a.options.size;if($t===0)return;const Mn=HO(xe,0,$t-1),ks=re.value,Gs=Qe==="up"?-1:1,Np=l9(ks,Mn,Gs,$t)??l9(ks,Mn-Gs,-Gs,$t);Np!=null&&(a.hoveringIndex=Np,ot(()=>gt($.value)))},$W=xe=>{const Qe=ls(xe);let $t=!0;switch(Qe){case Ue.up:Ev("prev");break;case Ue.down:Ev("next");break;case Ue.enter:case Ue.numpadEnter:R.value||vt();break;case Ue.esc:nt();break;case Ue.backspace:$t=!1,mt(xe);return;case Ue.home:if(!C.value)return;Mv(0,"down");break;case Ue.end:if(!C.value)return;Mv(a.options.size-1,"up");break;case Ue.pageUp:if(!C.value)return;Mv(a.hoveringIndex-10,"up");break;case Ue.pageDown:if(!C.value)return;Mv(a.hoveringIndex+10,"down");break;default:$t=!1;break}$t&&(xe.preventDefault(),xe.stopPropagation())},AW=()=>{if(!c.value)return 0;const xe=window.getComputedStyle(c.value);return Number.parseFloat(xe.gap||"6px")},EW=Y(()=>{const xe=AW(),Qe=t.filterable?xe+a4:0;return{maxWidth:`${b.value&&t.maxCollapseTags===1?a.selectionWidth-a.collapseItemWidth-xe-Qe:a.selectionWidth-Qe}px`}}),MW=Y(()=>({maxWidth:`${a.selectionWidth}px`})),TW=xe=>{e("popup-scroll",xe)};Ts(c,it),Ts(U,ve),Ts(y,Pe),Ts(b,ye);let Fp;return Te(()=>$e.value,xe=>{xe?Fp=Ts(m,ve).stop:(Fp==null||Fp(),Fp=void 0),e("visible-change",xe)}),Ft(()=>{Ae()}),{inputId:T,contentId:s,nsSelect:o,nsInput:r,states:a,isFocused:G,expanded:C,optionsArray:re,hoverOption:$,selectSize:se,filteredOptionsCount:ie,updateTooltip:ve,updateTagTooltip:Pe,debouncedOnInputChange:Lt,onInput:_t,deletePrevTag:mt,deleteTag:_e,deleteSelected:Oe,handleOptionSelect:ce,scrollToOption:gt,hasModelValue:X,shouldShowPlaceholder:Se,currentPlaceholder:Le,mouseEnterEventName:We,needStatusIcon:W,showClearBtn:Q,iconComponent:ne,iconReverse:Z,validateState:ae,validateIcon:ge,showNewOption:je,updateOptions:te,collapseTagSize:me,setSelected:Ae,selectDisabled:z,emptyText:pe,handleCompositionStart:V,handleCompositionUpdate:B,handleCompositionEnd:F,handleKeydown:$W,onOptionCreate:bn,onOptionDestroy:gs,handleMenuEnter:Vp,focus:Vl,blur:ca,handleClearClick:$n,handleClickOutside:Di,handleEsc:nt,toggleMenu:at,selectOption:vt,getValueKey:Ko,navigateOptions:Ev,dropdownMenuVisible:$e,showTagList:hu,collapseTagList:SW,popupScroll:TW,getOption:Ze,tagStyle:EW,collapseTagStyle:MW,popperRef:du,inputRef:h,tooltipRef:u,tagTooltipRef:d,prefixRef:f,suffixRef:p,selectRef:l,wrapperRef:U,selectionRef:c,scrollbarRef:k,menuRef:m,tagMenuRef:y,collapseItemRef:b}};var Bhe=fe({name:"ElOptions",setup(t,{slots:e}){const n=qe(t2);let i=[];return()=>{var a,l;const s=(a=e.default)==null?void 0:a.call(e),o=[];function r(c){Me(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)&&!Me(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):Me(u.children)&&r(u.children)})}return s.length&&r((l=s[0])==null?void 0:l.children),Wi(o,i)||(i=o,n&&(n.states.optionValues=o)),s}}});const gA="ElSelect",t1=new WeakMap,zhe=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=t1.get(t))==null?void 0:o.originalWarnHandler;if(i){i(...e);return}console.warn(...e)},Hhe=t=>{let e=t1.get(t);return e||(e={originalWarnHandler:t.config.warnHandler,handler:zhe(t),count:0},t1.set(t,e)),e};var Uhe=fe({name:gA,componentName:gA,components:{ElSelectMenu:Fhe,ElOption:l8,ElOptions:Bhe,ElOptionGroup:c8,ElTag:hi,ElScrollbar:qs,ElTooltip:Ss,ElIcon:be},directives:{ClickOutside:Qg},props:Ehe,emits:[Mt,dn,"remove-tag","clear","visible-change","focus","blur","popup-scroll"],setup(t,{emit:e,slots:n}){const i=pt(),s=Hhe(i.appContext);s.count+=1,i.appContext.config.warnHandler=s.handler;const o=Y(()=>{const{modelValue:k,multiple:C}=t,$=C?[]:void 0;return Me(k)?C?k:$:C?$:k}),r=In({...go(t),modelValue:o}),a=Nhe(r,e),{calculatorRef:l,inputStyle:c}=bD(),{getLabel:u,getValue:d,getOptions:h,getDisabled:f}=Ahe(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=>{kc(k||[]).forEach(C=>{var $;if(yt(C)&&(C.type.name==="ElOption"||C.type.name==="ElTree")){const S=C.type.name;if(S==="ElTree")m((($=C.props)==null?void 0:$.data)||[]).forEach(M=>{M.currentLabel=M.label??(yt(M.value)?"":M.value),a.onOptionCreate(M)});else if(S==="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}),Pt(t2,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 wn(()=>{const k=t1.get(i.appContext);k&&(k.count-=1,k.count<=0&&(i.appContext.config.warnHandler=k.originalWarnHandler,t1.delete(i.appContext)))}),{...a,modelValue:o,selectedLabel:b,calculatorRef:l,inputStyle:c,getLabel:u,getValue:d,getOptions:h,getDisabled:f,getOptionProps:p}}});const jhe=["id","value","name","disabled","autocomplete","tabindex","readonly","aria-activedescendant","aria-controls","aria-expanded","aria-label"],Whe=["textContent"],Yhe={key:1};function qhe(t,e,n,i,s,o){const r=H("el-tag"),a=H("el-tooltip"),l=H("el-icon"),c=H("el-option"),u=H("el-option-group"),d=H("el-options"),h=H("el-scrollbar"),f=H("el-select-menu"),p=xt("click-outside");return Re((v(),A("div",Wt({ref:"selectRef",class:[t.nsSelect.b(),t.nsSelect.m(t.selectSize)]},{[qu(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:q([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]=Ee((...y)=>t.toggleMenu&&t.toggleMenu(...y),["prevent"]))},[t.$slots.prefix?(v(),A("div",{key:0,ref:"prefixRef",class:q(t.nsSelect.e("prefix"))},[le(t.$slots,"prefix")],2)):O("v-if",!0),g("div",{ref:"selectionRef",class:q([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,$,S,M,P,T,I,L,R,V;return[(v(!0),A(ee,null,we(t.showTagList,B=>(v(),A("div",{key:t.getValueKey(B),class:q(t.nsSelect.e("selected-item"))},[_(r,{closable:!t.selectDisabled&&!B.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",style:Xe(t.tagStyle),onClose:F=>t.deleteTag(F,B)},{default:w(()=>[g("span",{class:q(t.nsSelect.e("tags-text"))},[le(t.$slots,"label",{index:B.index,label:B.currentLabel,value:B.value},()=>[N(x(B.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:((S=t.tagTooltip)==null?void 0:S.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:q(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:q(t.nsSelect.e("tags-text"))}," + "+x(t.states.selected.length-t.maxCollapseTags),3)]),_:1},8,["size","type","effect","style"])],2)]),content:w(()=>[g("div",{ref:"tagMenuRef",class:q(t.nsSelect.e("selection"))},[(v(!0),A(ee,null,we(t.collapseTagList,B=>(v(),A("div",{key:t.getValueKey(B),class:q(t.nsSelect.e("selected-item"))},[_(r,{class:"in-tooltip",closable:!t.selectDisabled&&!B.isDisabled,size:t.collapseTagSize,type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:F=>t.deleteTag(F,B)},{default:w(()=>[g("span",{class:q(t.nsSelect.e("tags-text"))},[le(t.$slots,"label",{index:B.index,label:B.currentLabel,value:B.value},()=>[N(x(B.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:q([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:q([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]=Ee(()=>{},["stop"])),onClick:e[6]||(e[6]=Ee((...y)=>t.toggleMenu&&t.toggleMenu(...y),["stop"]))},null,46,jhe),t.filterable?(v(),A("span",{key:0,ref:"calculatorRef","aria-hidden":"true",class:q(t.nsSelect.e("input-calculator")),textContent:x(t.states.inputValue)},null,10,Whe)):O("v-if",!0)],2),t.shouldShowPlaceholder?(v(),A("div",{key:1,class:q([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,x(t.currentPlaceholder),1)]):(v(),A("span",Yhe,x(t.currentPlaceholder),1))],2)):O("v-if",!0)],2),g("div",{ref:"suffixRef",class:q(t.nsSelect.e("suffix"))},[t.iconComponent&&!t.showClearBtn?(v(),D(l,{key:0,class:q([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:q([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:q([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:q(t.nsSelect.be("dropdown","header")),onClick:e[8]||(e[8]=Ee(()=>{},["stop"]))},[le(t.$slots,"header")],2)):O("v-if",!0),Re(_(h,{id:t.contentId,ref:"scrollbarRef",tag:"ul","wrap-class":t.nsSelect.be("dropdown","wrap"),"view-class":t.nsSelect.be("dropdown","list"),class:q([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,we(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,we(t.getOptions(m),k=>(v(),D(c,Wt({key:t.getValue(k)},{ref_for:!0},t.getOptionProps(k)),null,16))),128))]),_:2},1032,["label","disabled"])):(v(),D(c,Wt({key:1,ref_for:!0},t.getOptionProps(m)),null,16))],64)}),128))])]),_:3})]),_:3},8,["id","wrap-class","view-class","class","aria-label","onScroll"]),[[jt,t.states.options.size>0&&!t.loading]]),t.$slots.loading&&t.loading?(v(),A("div",{key:1,class:q(t.nsSelect.be("dropdown","loading"))},[le(t.$slots,"loading")],2)):t.loading||t.filteredOptionsCount===0?(v(),A("div",{key:2,class:q(t.nsSelect.be("dropdown","empty"))},[le(t.$slots,"empty",{},()=>[g("span",null,x(t.emptyText),1)])],2)):O("v-if",!0),t.$slots.footer?(v(),A("div",{key:3,class:q(t.nsSelect.be("dropdown","footer")),onClick:e[9]||(e[9]=Ee(()=>{},["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 Ghe=gi(Uhe,[["render",qhe]]);const Jt=qt(Ghe,{Option:l8,OptionGroup:c8}),sn=Os(l8),n2=Os(c8);var cV={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,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(S){return S.slice(0,p)});if(!m)return C;var $=y.weekStart;return C.map(function(S,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)}}})})(cV);var Xhe=cV.exports;const Khe=vi(Xhe),uV={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:Zi,tabindex:[String,Number],validateEvent:{type:Boolean,default:!0},ariaLabel:String,...xr(["ariaControls"])},dV={[Mt]:t=>Ke(t)||wt(t)||Jn(t),change:t=>Ke(t)||wt(t)||Jn(t)},mp=Symbol("checkboxGroupContextKey"),Zhe=Ge({modelValue:{type:de(Array),default:()=>[]},disabled:{type:Boolean,default:void 0},min:Number,max:Number,size:Zi,fill:String,textColor:String,tag:{type:String,default:"div"},validateEvent:{type:Boolean,default:!0},options:{type:de(Array)},props:{type:de(Object),default:()=>hV},type:{type:String,values:["checkbox","button"],default:"checkbox"},...xr(["ariaLabel"])}),Jhe={[Mt]:t=>Me(t),change:t=>Me(t)},hV={label:"label",value:"value",disabled:"disabled"},Qhe=({model:t,isChecked:e})=>{const n=qe(mp,void 0),i=qe(zd,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!nn(o)&&t.value.length>=o&&!e.value||!nn(r)&&t.value.length<=r&&e.value});return{isDisabled:bs(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}},efe=(t,{model:e,isLimitExceeded:n,hasOwnLabel:i,isDisabled:s,isLabeledByFormItem:o})=>{const r=qe(mp,void 0),{formItem:a}=_o(),{emit:l}=pt();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(dn,c(p),m)}function d(p){if(n.value)return;const m=p.target;l(dn,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=>Tt(p)))}),{handleChange:d,onClickRoot:h}},tfe=t=>{const e=J(!1),{emit:n}=pt(),i=qe(mp,void 0),s=Y(()=>nn(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&&Me(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}},nfe=(t,e,{model:n})=>{const i=qe(mp,void 0),s=J(!1),o=Y(()=>ka(t.value)?t.label:t.value),r=Y(()=>{const a=n.value;return Jn(a)?a:Me(a)?yt(o.value)?a.map(an).some(l=>Wi(l,o.value)):a.map(an).includes(o.value):a!=null?a===t.trueValue||a===t.trueLabel:!!a});return{checkboxButtonSize:Ii(Y(()=>{var a;return(a=i==null?void 0:i.size)==null?void 0:a.value}),{prop:!0}),isChecked:r,isFocused:s,checkboxSize:Ii(Y(()=>{var a;return(a=i==null?void 0:i.size)==null?void 0:a.value})),hasOwnLabel:Y(()=>!!e.default||!ka(o.value)),actualValue:o}},fV=(t,e)=>{const{formItem:n}=_o(),{model:i,isGroup:s,isLimitExceeded:o}=tfe(t),{isFocused:r,isChecked:a,checkboxButtonSize:l,checkboxSize:c,hasOwnLabel:u,actualValue:d}=nfe(t,e,{model:i}),{isDisabled:h}=Qhe({model:i,isChecked:a}),{inputId:f,isLabeledByFormItem:p}=Tl(t,{formItemContext:n,disableIdGeneration:u,disableIdManagement:s}),{handleChange:m,onClickRoot:y}=efe(t,{model:i,isLimitExceeded:o,hasOwnLabel:u,isDisabled:h,isLabeledByFormItem:p});return(()=>{function k(){Me(i.value)&&!i.value.includes(d.value)?i.value.push(d.value):i.value=t.trueValue??t.trueLabel??!0}t.checked&&k()})(),fl({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&&ka(t.value))),fl({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)),fl({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}},sfe=["id","indeterminate","name","tabindex","disabled"];var ife=fe({name:"ElCheckbox",__name:"checkbox",props:uV,emits:dV,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}=fV(e,mi()),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=Be("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:q(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:q(y.value)},[Re(g("input",Wt({id:E(n),"onUpdate:modelValue":k[0]||(k[0]=C=>hn(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]=Ee(()=>{},["stop"]))}),null,16,sfe),[[A1,E(c)]]),g("span",{class:q(E(p).e("inner"))},null,2)],2),E(l)?(v(),A("span",{key:0,class:q(E(p).e("label"))},[le(b.$slots,"default"),b.$slots.default?O("v-if",!0):(v(),A(ee,{key:0},[N(x(t.label),1)],64))],2)):O("v-if",!0)]),_:3},8,["for","class","aria-controls","aria-checked","aria-label","onClick"]))}}),pV=ife;const ofe=["name","tabindex","disabled"];var rfe=fe({name:"ElCheckboxButton",__name:"checkbox-button",props:uV,emits:dV,setup(t){const e=t,{isFocused:n,isChecked:i,isDisabled:s,checkboxButtonSize:o,model:r,actualValue:a,handleChange:l}=fV(e,mi()),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(mp,void 0),d=Be("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:q(f.value)},[Re(g("input",Wt({"onUpdate:modelValue":m[0]||(m[0]=y=>hn(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]=Ee(()=>{},["stop"]))}),null,16,ofe),[[A1,E(r)]]),p.$slots.default||t.label?(v(),A("span",{key:0,class:q(E(d).be("button","inner")),style:Xe(E(i)?h.value:void 0)},[le(p.$slots,"default",{},()=>[N(x(t.label),1)])],6)):O("v-if",!0)],2))}}),u8=rfe,afe=fe({name:"ElCheckboxGroup",__name:"checkbox-group",props:Zhe,emits:Jhe,setup(t,{emit:e}){const n=t,i=e,s=Be("checkbox"),o=bs(),{formItem:r}=_o(),{inputId:a,isLabeledByFormItem:l}=Tl(n,{formItemContext:r}),c=async p=>{i(Mt,p),await ot(),i(dn,p)},u=Y({get(){return n.modelValue},set(p){c(p)}}),d=Y(()=>({...hV,...n.props})),h=p=>{const{label:m,value:y,disabled:b}=d.value,k={label:p[m],value:p[y],disabled:p[b]};return{...zb(p,[m,y,b]),...k}},f=Y(()=>n.type==="button"?u8:pV);return Pt(mp,{...S4(go(n),["size","min","max","validateEvent","fill","textColor"]),disabled:o,modelValue:u,changeEvent:c}),Te(()=>n.modelValue,(p,m)=>{n.validateEvent&&!Wi(p,m)&&(r==null||r.validate("change").catch(y=>Tt(y)))}),(p,m)=>{var y;return v(),D(Ct(t.tag),{id:E(a),class:q(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,we(t.options,(b,k)=>(v(),D(Ct(f.value),Wt({key:k},{ref_for:!0},h(b)),null,16))),128))])]),_:3},8,["id","class","aria-label","aria-labelledby"])}}}),mV=afe;const Yt=qt(pV,{CheckboxButton:u8,CheckboxGroup:mV});Os(u8);const s2=Os(mV),gV=Ge({modelValue:{type:[String,Number,Boolean],default:void 0},size:Zi,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}}),lfe=Ge({...gV,border:Boolean}),vV={[Mt]:t=>Ke(t)||wt(t)||Jn(t),[dn]:t=>Ke(t)||wt(t)||Jn(t)},_V=Symbol("radioGroupKey"),cfe=Ge({...gV}),yV={label:"label",value:"value",disabled:"disabled"},ufe=Ge({id:{type:String,default:void 0},size:Zi,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:de(Array)},props:{type:de(Object),default:()=>yV},type:{type:String,values:["radio","button"],default:"radio"},...xr(["ariaLabel"])}),dfe=vV,bV=(t,e)=>{const n=J(),i=qe(_V,void 0),s=Y(()=>!!i),o=Y(()=>ka(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=Ii(Y(()=>i==null?void 0:i.size)),l=bs(Y(()=>i==null?void 0:i.disabled)),c=J(!1),u=Y(()=>l.value||s.value&&r.value!==o.value?-1:0);return fl({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&&ka(t.value))),{radioRef:n,isGroup:s,radioGroup:i,focus:c,size:a,disabled:l,tabIndex:u,modelValue:r,actualValue:o}},hfe=["value","name","disabled","checked"];var ffe=fe({name:"ElRadio",__name:"radio",props:lfe,emits:vV,setup(t,{emit:e}){const n=t,i=e,s=Be("radio"),{radioRef:o,radioGroup:r,focus:a,size:l,disabled:c,modelValue:u,actualValue:d}=bV(n,i);function h(){ot(()=>i(dn,u.value))}return(f,p)=>{var m;return v(),A("label",{class:q([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:q([E(s).e("input"),E(s).is("disabled",E(c)),E(s).is("checked",E(u)===E(d))])},[Re(g("input",{ref_key:"radioRef",ref:o,"onUpdate:modelValue":p[0]||(p[0]=y=>hn(u)?u.value=y:null),class:q(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]=Ee(()=>{},["stop"]))},null,42,hfe),[[E1,E(u)]]),g("span",{class:q(E(s).e("inner"))},null,2)],2),g("span",{class:q(E(s).e("label")),onKeydown:p[4]||(p[4]=Ee(()=>{},["stop"]))},[le(f.$slots,"default",{},()=>[N(x(t.label),1)])],34)],2)}}}),wV=ffe;const pfe=["value","name","disabled"];var mfe=fe({name:"ElRadioButton",__name:"radio-button",props:cfe,setup(t){const e=t,n=Be("radio"),{radioRef:i,focus:s,size:o,disabled:r,modelValue:a,radioGroup:l,actualValue:c}=bV(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:q([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))])},[Re(g("input",{ref_key:"radioRef",ref:i,"onUpdate:modelValue":h[0]||(h[0]=p=>hn(a)?a.value=p:null),class:q(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]=Ee(()=>{},["stop"]))},null,42,pfe),[[E1,E(a)]]),g("span",{class:q(E(n).be("button","inner")),style:Xe(E(a)===E(c)?u.value:{}),onKeydown:h[4]||(h[4]=Ee(()=>{},["stop"]))},[le(d.$slots,"default",{},()=>[N(x(t.label),1)])],38)],2)}}}),d8=mfe;const gfe=["id","aria-label","aria-labelledby"];var vfe=fe({name:"ElRadioGroup",__name:"radio-group",props:ufe,emits:dfe,setup(t,{emit:e}){const n=t,i=e,s=Be("radio"),o=kr(),r=J(),{formItem:a}=_o(),{inputId:l,isLabeledByFormItem:c}=Tl(n,{formItemContext:a}),u=m=>{i(Mt,m),ot(()=>i(dn,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(()=>({...yV,...n.props})),f=m=>{const{label:y,value:b,disabled:k}=h.value,C={label:m[y],value:m[b],disabled:m[k]};return{...zb(m,[y,b,k]),...C}},p=Y(()=>n.type==="button"?d8:wV);return Pt(_V,In({...go(n),changeEvent:u,name:d})),Te(()=>n.modelValue,(m,y)=>{n.validateEvent&&!Wi(m,y)&&(a==null||a.validate("change").catch(b=>Tt(b)))}),(m,y)=>(v(),A("div",{id:E(l),ref_key:"radioGroupRef",ref:r,class:q(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,we(t.options,(b,k)=>(v(),D(Ct(p.value),Wt({key:k},{ref_for:!0},f(b)),null,16))),128))])],10,gfe))}}),kV=vfe;const Li=qt(wV,{RadioButton:d8,RadioGroup:kV}),ws=Os(kV),Hd=Os(d8),_fe=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:de([Number,Object]),default:()=>ri({})},sm:{type:de([Number,Object]),default:()=>ri({})},md:{type:de([Number,Object]),default:()=>ri({})},lg:{type:de([Number,Object]),default:()=>ri({})},xl:{type:de([Number,Object]),default:()=>ri({})}}),yfe=["start","center","end","space-around","space-between","space-evenly"],bfe=["top","middle","bottom"],wfe=Ge({tag:{type:String,default:"div"},gutter:{type:Number,default:0},justify:{type:String,values:yfe,default:"start"},align:{type:String,values:bfe}}),CV=Symbol("rowContextKey");var kfe=fe({name:"ElRow",__name:"row",props:wfe,setup(t){const e=t,n=Be("row");Pt(CV,{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:q(s.value),style:Xe(i.value)},{default:w(()=>[le(o.$slots,"default")]),_:3},8,["class","style"]))}}),Cfe=kfe;const Ud=qt(Cfe);var xfe=fe({name:"ElCol",__name:"col",props:_fe,setup(t){const e=t,{gutter:n}=qe(CV,{gutter:Y(()=>0)}),i=Be("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];wt(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=>{wt(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:q(o.value),style:Xe(s.value)},{default:w(()=>[le(r.$slots,"default")]),_:3},8,["class","style"]))}}),Sfe=xfe;const jd=qt(Sfe),vA=t=>wt(t)||Ke(t)||Me(t),$fe=Ge({accordion:Boolean,modelValue:{type:de([Array,String,Number]),default:()=>ri([])},expandIconPosition:{type:de([String]),default:"right"},beforeCollapse:{type:de(Function)}}),Afe={[Mt]:vA,[dn]:vA},xV=Symbol("collapseContextKey"),Efe=Ge({title:{type:String,default:""},name:{type:de([String,Number]),default:void 0},icon:{type:ds,default:Hr},disabled:Boolean});var Mfe=fe({name:"ElCollapseTransition",__name:"collapse-transition",setup(t){const e=Be("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(Ho,Wt({name:E(e).b()},xb(i)),{default:w(()=>[le(s.$slots,"default")]),_:3},16,["name"]))}}),Tfe=Mfe;const Pfe=qt(Tfe),_A="ElCollapse",Ife=(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(dn,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);[dd(l),Jn(l)].includes(!0)||vo(_A,"beforeCollapse must return type `Promise<boolean>` or `boolean`"),dd(l)?l.then(c=>{c!==!1&&s(r)}).catch(c=>{Tt(_A,`some error occurred: ${c}`)}):l&&s(r)};return Te(()=>t.modelValue,()=>n.value=Us(t.modelValue),{deep:!0}),Pt(xV,{activeNames:n,handleItemClick:o}),{activeNames:n,setActiveNames:i}},Lfe=t=>{const e=Be("collapse");return{rootKls:Y(()=>[e.b(),e.b(`icon-position-${t.expandIconPosition}`)])}};var Ofe=fe({name:"ElCollapse",__name:"collapse",props:$fe,emits:Afe,setup(t,{expose:e,emit:n}){const i=t,{activeNames:s,setActiveNames:o}=Ife(i,n),{rootKls:r}=Lfe(i);return e({activeNames:s,setActiveNames:o}),(a,l)=>(v(),A("div",{class:q(E(r))},[le(a.$slots,"default")],2))}}),Dfe=Ofe;const Rfe=t=>{const e=qe(xV),{namespace:n}=Be("collapse"),i=J(!1),s=J(!1),o=z4(),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)))}}},Vfe=(t,{focusing:e,isActive:n,id:i})=>{const s=Be("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)}`))}},Ffe=["id","aria-expanded","aria-controls","aria-describedby","tabindex","aria-disabled"],Nfe=["id","aria-hidden","aria-labelledby"];var Bfe=fe({name:"ElCollapseItem",__name:"collapse-item",props:Efe,setup(t,{expose:e}){const n=t,{focusing:i,id:s,isActive:o,handleFocus:r,handleHeaderClick:a,handleEnterClick:l}=Rfe(n),{arrowKls:c,headKls:u,rootKls:d,itemTitleKls:h,itemWrapperKls:f,itemContentKls:p,scopedContentId:m,scopedHeadId:y}=Vfe(n,{focusing:i,isActive:o,id:s});return e({isActive:o}),(b,k)=>(v(),A("div",{class:q(E(d))},[g("div",{id:E(y),class:q(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(Ee((...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:q(E(h))},[le(b.$slots,"title",{isActive:E(o)},()=>[N(x(t.title),1)])],2),le(b.$slots,"icon",{isActive:E(o)},()=>[_(E(be),{class:q(E(c))},{default:w(()=>[(v(),D(Ct(t.icon)))]),_:1},8,["class"])])],42,Ffe),_(E(Pfe),null,{default:w(()=>[Re(g("div",{id:E(m),role:"region",class:q(E(f)),"aria-hidden":!E(o),"aria-labelledby":E(y)},[g("div",{class:q(E(p))},[le(b.$slots,"default")],2)],10,Nfe),[[jt,E(o)]])]),_:3})],2))}}),SV=Bfe;const zfe=qt(Dfe,{CollapseItem:SV}),Hfe=Os(SV),$V=Ge({modelValue:{type:de(String),default:void 0},border:{type:Boolean,default:!0},showAlpha:Boolean,colorFormat:{type:de(String)},disabled:Boolean,predefine:{type:de(Array)},validateEvent:{type:Boolean,default:!0},hueSliderClass:{type:de([String,Array,Object])},hueSliderStyle:{type:de([String,Array,Object])}}),Ufe={[Mt]:t=>Ke(t)||ui(t)},AV=Symbol("colorCommonPickerKey"),EV=Symbol("colorPickerPanelContextKey"),MV=Ge({color:{type:de(Object),required:!0},vertical:Boolean,disabled:Boolean}),jfe=MV,TV=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 Vw=!1;function xC(t,e){if(!Kt)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,Vw=!1,(r=e.end)==null||r.call(e,o)},s=function(o){var r;Vw||(document.onselectstart=()=>!1,document.ondragstart=()=>!1,document.addEventListener("mousemove",n),document.addEventListener("mouseup",i),document.addEventListener("touchmove",n),document.addEventListener("touchend",i),Vw=!0,(r=e.start)==null||r.call(e,o))};t.addEventListener("mousedown",s),t.addEventListener("touchstart",s,{passive:!1})}const PV=(t,{key:e,minValue:n,maxValue:i})=>{const s=pt(),o=Fn(),r=Fn(),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}=TV(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=ls(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}},IV=(t,{namespace:e,maxValue:n,bar:i,thumb:s,currentValue:o,handleDrag:r,getBackground:a})=>{const l=pt(),c=Be(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($)}};xC(i.value,C),xC(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:fi(u.value),top:fi(d.value)})),thumbLeft:u,thumbTop:d,update:m}},Wfe=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],yA=0,Fw=100;var Yfe=fe({name:"ElColorAlphaSlider",__name:"alpha-slider",props:MV,setup(t,{expose:e}){const n=t,{currentValue:i,bar:s,thumb:o,handleDrag:r,handleClick:a,handleKeydown:l}=PV(n,{key:"alpha",minValue:yA,maxValue:Fw}),{rootKls:c,barKls:u,barStyle:d,thumbKls:h,thumbStyle:f,update:p}=IV(n,{namespace:"color-alpha-slider",maxValue:Fw,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:S}=n.color.toRgb();return`linear-gradient(to right, rgba(${C}, ${$}, ${S}, 0) 0%, rgba(${C}, ${$}, ${S}, 1) 100%)`}return""}return e({update:p,bar:s,thumb:o}),(C,$)=>(v(),A("div",{class:q(E(c))},[g("div",{ref_key:"bar",ref:s,class:q(E(u)),style:Xe(E(d)),onClick:$[0]||($[0]=(...S)=>E(a)&&E(a)(...S))},null,6),g("div",{ref_key:"thumb",ref:o,class:q(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":yA,"aria-valuemax":Fw,role:"slider",tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,onKeydown:$[1]||($[1]=(...S)=>E(l)&&E(l)(...S))},null,46,Wfe)],2))}}),qfe=Yfe;const Gfe=["aria-label","aria-valuenow","aria-valuetext","aria-orientation","tabindex","aria-disabled"],bA=0,Nw=360;var Xfe=fe({name:"ElColorHueSlider",__name:"hue-slider",props:jfe,setup(t,{expose:e}){const n=t,{currentValue:i,bar:s,thumb:o,handleDrag:r,handleClick:a,handleKeydown:l}=PV(n,{key:"hue",minValue:bA,maxValue:Nw}),{rootKls:c,barKls:u,thumbKls:d,thumbStyle:h,thumbTop:f,update:p}=IV(n,{namespace:"color-hue-slider",maxValue:Nw,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:q(E(c))},[g("div",{ref_key:"bar",ref:s,class:q(E(u)),onClick:C[0]||(C[0]=(...$)=>E(a)&&E(a)(...$))},null,2),g("div",{ref_key:"thumb",ref:o,class:q(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":bA,"aria-valuemax":Nw,role:"slider",tabindex:t.disabled?void 0:0,"aria-disabled":t.disabled,onKeydown:C[1]||(C[1]=(...$)=>E(l)&&E(l)(...$))},null,46,Gfe)],2))}}),Kfe=Xfe;const Zfe=Ge({colors:{type:de(Array),required:!0},color:{type:de(Object),required:!0},enableAlpha:{type:Boolean,required:!0},disabled:Boolean});var ky=class{constructor(t={}){this._hue=0,this._saturation=100,this._value=100,this._alpha=100,this._tiny=new Qn,this._isValid=!1,this.enableAlpha=!1,this.format="",this.value="";for(const e in t)zt(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)zt(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 Qn(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 Qn({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 Qn({h:t,s:e/100,v:n/100,a:i/100}),this.value=this._isValid?this._tiny.toString(r):""}};const Jfe=t=>{const{currentColor:e}=qe(EV),n=J(s(t.colors,t.color));Te(()=>e.value,o=>{const r=new ky({value:o,enableAlpha:t.enableAlpha});n.value.forEach(a=>{a.selected=r.compare(a)})}),_l(()=>{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 ky({value:a,enableAlpha:t.enableAlpha});return l.selected=l.compare(r),l})}return{rgbaColors:n,handleSelect:i}},Qfe=t=>{const e=Be("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}},epe=["disabled","aria-label","onClick"];var tpe=fe({name:"ElColorPredefine",__name:"predefine",props:Zfe,setup(t){const e=t,{rgbaColors:n,handleSelect:i}=Jfe(e),{rootKls:s,colorsKls:o,colorSelectorKls:r}=Qfe(e),{t:a}=Qt(),l=c=>a("el.colorpicker.predefineDescription",{value:c});return(c,u)=>(v(),A("div",{class:q(E(s))},[g("div",{class:q(E(o))},[(v(!0),A(ee,null,we(E(n),(d,h)=>(v(),A("button",{key:t.colors[h],type:"button",disabled:t.disabled,"aria-label":l(d.value),class:q(E(r)(d)),onClick:f=>E(i)(h)},[g("div",{style:Xe({backgroundColor:d.value})},null,4)],10,epe))),128))],2)],2))}}),npe=tpe;const spe=Ge({color:{type:de(Object),required:!0},disabled:Boolean}),ipe=t=>{const e=pt(),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}=TV(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=ls(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}},ope=(t,{cursorTop:e,cursorLeft:n,background:i,handleDrag:s})=>{const o=pt(),r=Be("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(()=>{xC(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:fi(e.value),left:fi(n.value)})),update:a}},rpe=["tabindex","aria-disabled","aria-label","aria-valuenow","aria-valuetext"];var ape=fe({name:"ElSvPanel",__name:"sv-panel",props:spe,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}=ipe(n),{rootKls:h,cursorKls:f,rootStyle:p,cursorStyle:m,update:y}=ope(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}),($,S)=>(v(),A("div",{class:q(E(h)),style:Xe(E(p)),onClick:S[1]||(S[1]=(...M)=>E(c)&&E(c)(...M))},[g("div",{ref_key:"cursorRef",ref:i,class:q(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:S[0]||(S[0]=(...M)=>E(d)&&E(d)(...M))},null,46,rpe)],6))}}),lpe=ape;const LV=(t,e)=>{const n=In(new ky({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 cpe=fe({name:"ElColorPickerPanel",__name:"color-picker-panel",props:$V,emits:Ufe,setup(t,{expose:e,emit:n}){const i=t,s=n,o=Be("color-picker-panel"),{formItem:r}=_o(),a=bs(),l=J(),c=J(),u=J(),d=J(),h=J(""),{color:f}=qe(AV,()=>LV(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=>Tt(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=>Tt(k)))}),Pt(EV,{currentColor:Y(()=>f.value)}),e({color:f,inputRef:d,update:y}),(b,k)=>(v(),A("div",{class:q([E(o).b(),E(o).is("disabled",E(a)),E(o).is("border",t.border)]),onFocusout:m},[g("div",{class:q(E(o).e("wrapper"))},[_(Kfe,{ref_key:"hueRef",ref:l,color:E(f),vertical:"",disabled:E(a),class:q(["hue-slider",t.hueSliderClass]),style:Xe(t.hueSliderStyle)},null,8,["color","disabled","class","style"]),_(lpe,{ref_key:"svRef",ref:c,color:E(f),disabled:E(a)},null,8,["color","disabled"])],2),t.showAlpha?(v(),D(qfe,{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(npe,{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:q(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))}}),upe=cpe;const dpe=qt(upe),hpe=Ge({persistent:{type:Boolean,default:!0},modelValue:{type:de(String),default:void 0},id:String,showAlpha:Boolean,colorFormat:{type:de(String)},disabled:{type:Boolean,default:void 0},clearable:{type:Boolean,default:!0},size:Zi,popperClass:zn.popperClass,popperStyle:zn.popperStyle,tabindex:{type:[String,Number],default:0},teleported:zn.teleported,appendTo:zn.appendTo,predefine:{type:de(Array)},validateEvent:{type:Boolean,default:!0},...F1,...xr(["ariaLabel"])}),fpe={[Mt]:t=>Ke(t)||ui(t),[dn]:t=>Ke(t)||ui(t),activeChange:t=>Ke(t)||ui(t),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0},ppe=["id","aria-label","aria-labelledby","aria-description","aria-disabled","tabindex"];var mpe=fe({name:"ElColorPicker",__name:"color-picker",props:hpe,emits:fpe,setup(t,{expose:e,emit:n}){const i=t,s=n,{t:o}=Qt(),r=Be("color"),{formItem:a}=_o(),l=Ii(),c=bs(),{valueOnClear:u,isEmptyValue:d}=Y4(i,null),h=LV(i,s),{inputId:f,isLabeledByFormItem:p}=Tl(i,{formItemContext:a}),m=J(),y=J(),b=J(),k=J(!1),C=J(!1);let $=!0;const{isFocused:S,handleFocus:M,handleBlur:P}=pp(y,{disabled:c,beforeBlur(re){var ke;return(ke=m.value)==null?void 0:ke.isFocusInsideContent(re)},afterBlur(){var re;U(!1),W(),i.validateEvent&&((re=a==null?void 0:a.validate)==null||re.call(a,"blur").catch(ke=>Tt(ke)))}}),T=hie(()=>{var re;return((re=b.value)==null?void 0:re.color)??h.color}),I=Y(()=>S4(i,Object.keys($V))),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")),B=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",S.value)]);function z(re,ke){const{r:je,g:te,b:se,a:me}=re.toRgb();return ke?`rgba(${je}, ${te}, ${se}, ${me})`:`rgb(${je}, ${te}, ${se})`}function U(re){k.value=re}const G=_d(U,100,{leading:!0});function K(){c.value||U(!0)}function X(){G(!1),W()}function W(){ot(()=>{i.modelValue?T.fromString(i.modelValue):(T.value="",ot(()=>{C.value=!1}))})}function Q(){c.value||(k.value&&W(),G(!k.value))}function ne(){const re=d(T.value)?u.value:T.value;s(Mt,re),s(dn,re),i.validateEvent&&(a==null||a.validate("change").catch(ke=>Tt(ke))),G(!1),ot(()=>{const ke=new ky({enableAlpha:i.showAlpha,format:i.colorFormat||"",value:i.modelValue});T.compare(ke)||W()})}function Z(){G(!1),s(Mt,u.value),s(dn,u.value),i.modelValue!==u.value&&i.validateEvent&&(a==null||a.validate("change").catch(re=>Tt(re))),W(),s("clear")}function ae(){var re,ke;(ke=(re=b==null?void 0:b.value)==null?void 0:re.inputRef)==null||ke.focus()}function ge(){k.value&&(X(),S.value&&pe())}function Ce(re){re.preventDefault(),re.stopPropagation(),U(!1),W()}function oe(re){switch(ls(re)){case Ue.enter:case Ue.numpadEnter:case Ue.space:re.preventDefault(),re.stopPropagation(),K();break;case Ue.esc:Ce(re);break}}function pe(){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)}),Pt(AV,h),e({color:T,show:K,hide:X,focus:pe,blur:ie}),(re,ke)=>(v(),D(E(Ss),{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=>U(!1))},{content:w(()=>[Re((v(),D(E(dpe),Wt({ref_key:"pickerPanelRef",ref:b},I.value,{border:!1,"validate-event":!1,onKeydown:ut(Ce,["esc"])}),{footer:w(()=>[g("div",null,[t.clearable?(v(),D(E(He),{key:0,class:q(E(r).be("footer","link-btn")),text:"",size:"small",onClick:Z},{default:w(()=>[N(x(E(o)("el.colorpicker.clear")),1)]),_:1},8,["class"])):O("v-if",!0),_(E(He),{plain:"",size:"small",class:q(E(r).be("footer","btn")),onClick:ne},{default:w(()=>[N(x(E(o)("el.colorpicker.confirm")),1)]),_:1},8,["class"])])]),_:1},16)),[[E(Qg),ge,y.value]])]),default:w(()=>[g("div",Wt({id:E(f),ref_key:"triggerRef",ref:y},re.$attrs,{class:F.value,role:"button","aria-label":V.value,"aria-labelledby":B.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:q(E(r).be("picker","trigger")),onClick:Q},[g("span",{class:q([E(r).be("picker","color"),E(r).is("alpha",t.showAlpha)])},[g("span",{class:q(E(r).be("picker","color-inner")),style:Xe({backgroundColor:L.value})},[Re(_(E(be),{class:q([E(r).be("picker","icon"),E(r).is("icon-arrow-down")])},{default:w(()=>[_(E(Bd))]),_:1},8,["class"]),[[jt,t.modelValue||C.value]]),Re(_(E(be),{class:q([E(r).be("picker","empty"),E(r).is("icon-close")])},{default:w(()=>[_(E(Bo))]),_:1},8,["class"]),[[jt,!t.modelValue&&!C.value]])],6)],2)],2)],16,ppe)]),_:1},8,["visible","popper-class","popper-style","teleported","transition","persistent","append-to"]))}}),gpe=mpe;const Qc=qt(gpe);var vpe=fe({name:"ElContainer",__name:"container",props:{direction:{type:String,required:!1}},setup(t){const e=t,n=mi(),i=Be("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:q([E(i).b(),E(i).is("vertical",s.value)])},[le(o.$slots,"default")],2))}}),_pe=vpe,ype=fe({name:"ElAside",__name:"aside",props:{width:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=Be("aside"),i=Y(()=>e.width?n.cssVarBlock({width:e.width}):{});return(s,o)=>(v(),A("aside",{class:q(E(n).b()),style:Xe(i.value)},[le(s.$slots,"default")],6))}}),OV=ype,bpe=fe({name:"ElFooter",__name:"footer",props:{height:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=Be("footer"),i=Y(()=>e.height?n.cssVarBlock({height:e.height}):{});return(s,o)=>(v(),A("footer",{class:q(E(n).b()),style:Xe(i.value)},[le(s.$slots,"default")],6))}}),DV=bpe,wpe=fe({name:"ElHeader",__name:"header",props:{height:{type:[String,null],required:!1,default:null}},setup(t){const e=t,n=Be("header"),i=Y(()=>e.height?n.cssVarBlock({height:e.height}):{});return(s,o)=>(v(),A("header",{class:q(E(n).b()),style:Xe(i.value)},[le(s.$slots,"default")],6))}}),RV=wpe,kpe=fe({name:"ElMain",__name:"main",setup(t){const e=Be("main");return(n,i)=>(v(),A("main",{class:q(E(e).b())},[le(n.$slots,"default")],2))}}),VV=kpe;const H1=qt(_pe,{Aside:OV,Footer:DV,Header:RV,Main:VV}),U1=Os(OV);Os(DV);const j1=Os(RV),jo=Os(VV),Cpe=Ge({valueFormat:String,dateFormat:String,timeFormat:String,disabled:{type:Boolean,default:void 0},modelValue:{type:de([Date,Array,String,Number]),default:""},defaultValue:{type:de([Date,Array])},defaultTime:{type:de([Date,Array])},isRange:Boolean,...a8,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:de(String),default:"date"},clearable:{type:Boolean,default:!0},border:{type:Boolean,default:!0},editable:{type:Boolean,default:!0}}),h8=Symbol("rootPickerContextKey"),W1="ElIsDefaultFormat",xpe=["date","dates","year","years","month","months","week","range"],f8=Ge({cellClassName:{type:de(Function)},disabledDate:{type:de(Function)},date:{type:de(Object),required:!0},minDate:{type:de(Object)},maxDate:{type:de(Object)},parsedValue:{type:de([Object,Array])},rangeState:{type:de(Object),default:()=>({endDate:null,selecting:!1})},disabled:Boolean}),FV=Ge({type:{type:de(String),required:!0,values:QZ},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}}),p8=Ge({unlinkPanels:Boolean,visible:{type:Boolean,default:!0},showConfirm:Boolean,showFooter:{type:Boolean,default:!0},border:Boolean,disabled:Boolean,parsedValue:{type:de(Array)}}),m8=t=>({type:String,values:xpe,default:t}),Spe=Ge({...FV,parsedValue:{type:de([Object,Array])},visible:{type:Boolean,default:!0},format:{type:String,default:""}}),n1=t=>{if(!Me(t))return!1;const[e,n]=t;return ht.isDayjs(e)&&ht.isDayjs(n)&&ht(e).isValid()&&ht(n).isValid()&&e.isSameOrBefore(n)},i2=(t,{lang:e,step:n=1,unit:i,unlinkPanels:s})=>{let o;if(Me(t)){let[r,a]=t.map(l=>ht(l).locale(e));return s||(a=r.add(n,i)),[r,a]}else t?o=ht(t):o=ht();return o=o.locale(e),[o,o.add(n,i)]},$pe=(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)}},Cy=(t,e,n,i)=>{const s=ht().locale(i).startOf("month").month(n).year(e).hour(t.hour()).minute(t.minute()).second(t.second());return WR(s.daysInMonth()).map(o=>s.add(o,"day").toDate())},Wf=(t,e,n,i,s)=>{const o=ht().year(e).month(n).startOf("month").hour(t.hour()).minute(t.minute()).second(t.second()),r=Cy(t,e,n,i).find(a=>!(s!=null&&s(a)));return r?ht(r).locale(i):o.locale(i)},xy=(t,e,n)=>{const i=t.year();if(!(n!=null&&n(t.toDate())))return t.locale(e);const s=t.month();if(!Cy(t,i,s,e).every(n))return Wf(t,i,s,e,n);for(let o=0;o<12;o++)if(!Cy(t,i,o,e).every(n))return Wf(t,i,o,e,n);return t},Yf=(t,e,n,i)=>{if(Me(t))return t.map(s=>Yf(s,e,n,i));if(Ke(t)){const s=i!=null&&i.value?ht(t):ht(t,e);if(!s.isValid())return s}return ht(t,e).locale(n)},Ape=Ge({...f8,showWeekNumber:Boolean,selectionMode:m8("date")}),Epe=["changerange","pick","select"],Sy=(t="")=>["normal","today"].includes(t),Mpe=(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(()=>hy(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"?ao(t.parsedValue):[]),b=(X,{count:W,rowIndex:Q,columnIndex:ne})=>{const{startOfMonthDay:Z,dateCountOfMonth:ae,dateCountOfLastMonth:ge}=E(m),Ce=E(d);if(Q>=0&&Q<=1){const oe=Z+Ce<0?7+Z+Ce:Z+Ce;if(ne+Q*7>=oe)return X.text=W,!0;X.text=ge-(oe-ne%7)+1+Q*7,X.type="prev-month"}else return W<=ae?X.text=W:(X.text=W-ae,X.type="next-month"),!0;return!1},k=(X,{columnIndex:W,rowIndex:Q},ne)=>{const{disabledDate:Z,cellClassName:ae}=t,ge=E(y),Ce=b(X,{count:ne,rowIndex:Q,columnIndex:W}),oe=X.dayjs.toDate();return X.selected=ge.find(pe=>pe.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),Ce},C=X=>{if(t.selectionMode==="week"){const[W,Q]=t.showWeekNumber?[1,7]:[0,6],ne=K(X[W+1]);X[W].inRange=ne,X[W].start=ne,X[Q].inRange=ne,X[Q].end=ne}},$=Y(()=>{const{minDate:X,maxDate:W,rangeState:Q,showWeekNumber:ne}=t,Z=E(d),ae=E(a),ge="day";let Ce=1;if($pe({row:6,column:7},ae,{startDate:X,columnIndexOffset:ne?1:0,nextEndDate:Q.endDate||W||Q.selecting&&X||null,now:ht().locale(E(n)).startOf(ge),unit:ge,relativeDateGetter:oe=>E(h).add(oe-Z,ge),setCellMetadata:(...oe)=>{k(...oe,Ce)&&(Ce+=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 S())});const S=async()=>{var X;return(X=E(s))==null?void 0:X.focus()},M=X=>t.selectionMode==="date"&&Sy(X.type)&&P(X,t.parsedValue),P=(X,W)=>W?ht(W).locale(E(n)).isSame(t.date.date(Number(X.text)),"day"):!1,T=(X,W)=>{const Q=E(m).startOfMonthDay,ne=E(d),Z=Q+ne<0?7+Q+ne:Q+ne,ae=X*7+(W-(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 W=X.target;if(W.tagName==="SPAN"&&(W=(Z=W.parentNode)==null?void 0:Z.parentNode),W.tagName==="DIV"&&(W=W.parentNode),W.tagName!=="TD")return;const Q=W.parentNode.rowIndex-1,ne=W.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&&Sy(X.type)||X.isCurrent,R=X=>{l||E(p)||t.selectionMode!=="date"||G(X,!0)},V=X=>{X.target.closest("td")&&(l=!0)},B=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 W=X.week(),Q=`${X.year()}w${W}`;e("pick",{year:X.year(),week:W,value:Q,date:X.startOf("week")})},U=(X,W)=>{e("pick",W?ao(t.parsedValue).filter(Q=>(Q==null?void 0:Q.valueOf())!==X.valueOf()):ao(t.parsedValue).concat([X]))},G=(X,W=!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 ge=T(ne,Z);switch(t.selectionMode){case"range":F(ge);break;case"date":e("pick",ge,W);break;case"week":z(ge);break;case"dates":U(ge,!!ae.selected);break}},K=X=>{if(t.selectionMode!=="week")return!1;let W=t.date.startOf("day");if(X.type==="prev-month"&&(W=W.subtract(1,"month")),X.type==="next-month"&&(W=W.add(1,"month")),W=W.date(Number.parseInt(X.text,10)),t.parsedValue&&!Me(t.parsedValue)){const Q=(t.parsedValue.day()-c+7)%7-1;return t.parsedValue.subtract(Q,"day").isSame(W,"day")}return!1};return{WEEKS:f,rows:$,tbodyRef:i,currentCellRef:s,focus:S,isCurrent:M,isWeekActive:K,isSelectedCell:L,handlePickDate:G,handleMouseUp:B,handleMouseDown:V,handleMouseMove:I,handleFocus:R}},Tpe=(t,{isCurrent:e,isWeekActive:n})=>{const i=Be("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 Sy(c.type)&&!c.disabled?(u.push("available"),c.type==="today"&&u.push("today")):u.push(c.type),e(c)&&u.push("current"),c.inRange&&(Sy(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}},Ppe=Ge({cell:{type:de(Object)}});var g8=fe({name:"ElDatePickerCell",props:Ppe,setup(t){const e=Be("date-table-cell"),{slots:n}=qe(h8);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 Ipe=["aria-label"],Lpe=["aria-label"],Ope=["aria-current","aria-selected","tabindex","aria-disabled"];var Dpe=fe({__name:"basic-date-table",props:Ape,emits:Epe,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}=Mpe(i,n),{tableLabel:b,tableKls:k,getCellClasses:C,getRowKls:$,weekHeaderClass:S,t:M}=Tpe(i,{isCurrent:c,isWeekActive:u});let P=!1;return wn(()=>{P=!0}),e({focus:l}),(T,I)=>(v(),A("table",{"aria-label":E(b),class:q(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:q(E(S))},null,2)):O("v-if",!0),(v(!0),A(ee,null,we(E(s),(L,R)=>(v(),A("th",{key:R,"aria-label":E(M)("el.datepicker.weeksFull."+L),scope:"col"},x(E(M)("el.datepicker.weeks."+L)),9,Lpe))),128))]),(v(!0),A(ee,null,we(E(o),(L,R)=>(v(),A("tr",{key:R,class:q(E($)(T.showWeekNumber?L[2]:L[1]))},[(v(!0),A(ee,null,we(L,(V,B)=>(v(),A("td",{key:`${R}.${B}`,ref_for:!0,ref:F=>!E(P)&&E(d)(V)&&(a.value=F),class:q(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(g8),{cell:V},null,8,["cell"])],42,Ope))),128))],2))),128))],512)],42,Ipe))}}),SC=Dpe;const Rpe=Ge({...f8,selectionMode:m8("month")}),Vpe=["aria-label"],Fpe=["aria-selected","aria-label","tabindex","onKeydown"];var Npe=fe({__name:"basic-month-table",props:Rpe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const i=t,s=n,o=Be("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,S=ht().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 B=I*4+R,F=i.date.startOf("year").month(B),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"))),S.isSame(F)&&(V.type="today");const U=F.toDate();V.text=B,V.disabled=((P=i.disabledDate)==null?void 0:P.call(i,U))||!1,V.date=U,V.customClass=(T=i.cellClassName)==null?void 0:T.call(i,U),V.dayjs=F,V.timestamp=F.valueOf(),V.isSelected=b(V)}}return $}),m=()=>{var $;($=c.value)==null||$.focus()},y=$=>{const S={},M=i.date.year(),P=new Date,T=$.text;return S.disabled=i.disabled||(i.disabledDate?Cy(i.date,M,T,a.value).every(i.disabledDate):!1),S.current=ao(i.parsedValue).some(I=>ht.isDayjs(I)&&I.year()===M&&I.month()===T),S.today=P.getFullYear()===M&&P.getMonth()===T,$.customClass&&(S[$.customClass]=!0),$.inRange&&(S["in-range"]=!0,$.start&&(S["start-date"]=!0),$.end&&(S["end-date"]=!0)),S},b=$=>{const S=i.date.year(),M=$.text;return ao(i.date).some(P=>P.year()===S&&P.month()===M)},k=$=>{var T;if(!i.rangeState.selecting)return;let S=$.target;if(S.tagName==="SPAN"&&(S=(T=S.parentNode)==null?void 0:T.parentNode),S.tagName==="DIV"&&(S=S.parentNode),S.tagName!=="TD")return;const M=S.parentNode.rowIndex,P=S.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 S=(I=$.target)==null?void 0:I.closest("td");if((S==null?void 0:S.tagName)!=="TD"||pl(S,"disabled"))return;const M=S.cellIndex,P=S.parentNode.rowIndex*4+M,T=i.date.startOf("year").month(P);if(i.selectionMode==="months"){if($.type==="keydown"){s("pick",ao(i.parsedValue),!1);return}const L=Wf(i.date,i.date.year(),P,a.value,i.disabledDate);s("pick",pl(S,"current")?ao(i.parsedValue).filter(R=>(R==null?void 0:R.year())!==L.year()||(R==null?void 0:R.month())!==L.month()):ao(i.parsedValue).concat([ht(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 $,S;($=l.value)!=null&&$.contains(document.activeElement)&&(await ot(),(S=c.value)==null||S.focus())}),e({focus:m}),($,S)=>(v(),A("table",{role:"grid","aria-label":E(r)("el.datepicker.monthTablePrompt"),class:q(E(o).b()),onClick:C,onMousemove:k},[g("tbody",{ref_key:"tbodyRef",ref:l},[(v(!0),A(ee,null,we(p.value,(M,P)=>(v(),A("tr",{key:P},[(v(!0),A(ee,null,we(M,(T,I)=>(v(),A("td",{key:I,ref_for:!0,ref:L=>T.isSelected&&(c.value=L),class:q(y(T)),"aria-selected":!!T.isSelected,"aria-label":E(r)(`el.datepicker.month${+T.text+1}`),tabindex:T.isSelected?0:-1,onKeydown:[ut(Ee(C,["prevent","stop"]),["space"]),ut(Ee(C,["prevent","stop"]),["enter"])]},[_(E(g8),{cell:{...T,renderText:E(r)("el.datepicker.months."+u.value[T.text])}},null,8,["cell"])],42,Fpe))),128))]))),128))],512)],42,Vpe))}}),s1=Npe;const Bpe=Ge({...f8,selectionMode:m8("year")}),zpe=["aria-label"],Hpe=["aria-selected","aria-label","tabindex","onKeydown"];var Upe=fe({__name:"basic-year-table",props:Bpe,emits:["changerange","pick","select"],setup(t,{expose:e,emit:n}){const i=(S,M)=>{const P=ht(String(S)).locale(M).startOf("year");return WR(P.endOf("year").dayOfYear()).map(T=>P.add(T,"day").toDate())},s=t,o=n,r=Be("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 S=h.value,M=ht().locale(l.value).startOf("year");for(let L=0;L<3;L++){const R=S[L];for(let V=0;V<4&&!(L*4+V>=10);V++){let B=R[V];B||(B={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}),B.type="normal";const F=L*4+V+d.value,z=ht().year(F),U=s.rangeState.endDate||s.maxDate||s.rangeState.selecting&&s.minDate||null;B.inRange=!!(s.minDate&&z.isSameOrAfter(s.minDate,"year")&&U&&z.isSameOrBefore(U,"year"))||!!(s.minDate&&z.isSameOrBefore(s.minDate,"year")&&U&&z.isSameOrAfter(U,"year")),(P=s.minDate)!=null&&P.isSameOrAfter(U)?(B.start=!!(U&&z.isSame(U,"year")),B.end=!!(s.minDate&&z.isSame(s.minDate,"year"))):(B.start=!!(s.minDate&&z.isSame(s.minDate,"year")),B.end=!!(U&&z.isSame(U,"year"))),M.isSame(z)&&(B.type="today"),B.text=F;const G=z.toDate();B.disabled=((T=s.disabledDate)==null?void 0:T.call(s,G))||!1,B.date=G,B.customClass=(I=s.cellClassName)==null?void 0:I.call(s,G),B.dayjs=z,B.timestamp=z.valueOf(),B.isSelected=k(B),R[V]=B}}return S}),y=()=>{var S;(S=u.value)==null||S.focus()},b=S=>{const M={},P=ht().locale(l.value),T=S.text;return M.disabled=s.disabled||(s.disabledDate?i(T,l.value).every(s.disabledDate):!1),M.today=P.year()===T,M.current=ao(s.parsedValue).some(I=>I.year()===T),S.customClass&&(M[S.customClass]=!0),S.inRange&&(M["in-range"]=!0,S.start&&(M["start-date"]=!0),S.end&&(M["end-date"]=!0)),M},k=S=>{const M=S.text;return ao(s.date).some(P=>P.year()===M)},C=S=>{var L;if(s.disabled)return;const M=(L=S.target)==null?void 0:L.closest("td");if(!M||!M.textContent||pl(M,"disabled"))return;const P=M.cellIndex,T=M.parentNode.rowIndex*4+P+d.value,I=ht().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(S.type==="keydown"){o("pick",ao(s.parsedValue),!1);return}const R=xy(I.startOf("year"),l.value,s.disabledDate);o("pick",pl(M,"current")?ao(s.parsedValue).filter(V=>(V==null?void 0:V.year())!==T):ao(s.parsedValue).concat([R]))}else o("pick",T)},$=S=>{var I;if(!s.rangeState.selecting)return;const M=(I=S.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:ht().year(d.value).add(P*4+T,"year")}))};return Te(()=>s.date,async()=>{var S,M;(S=c.value)!=null&&S.contains(document.activeElement)&&(await ot(),(M=u.value)==null||M.focus())}),e({focus:y}),(S,M)=>(v(),A("table",{role:"grid","aria-label":E(a)("el.datepicker.yearTablePrompt"),class:q(E(r).b()),onClick:C,onMousemove:$},[g("tbody",{ref_key:"tbodyRef",ref:c},[(v(!0),A(ee,null,we(m.value,(P,T)=>(v(),A("tr",{key:T},[(v(!0),A(ee,null,we(P,(I,L)=>(v(),A("td",{key:`${T}_${L}`,ref_for:!0,ref:R=>I.isSelected&&(u.value=R),class:q(["available",b(I)]),"aria-selected":I.isSelected,"aria-label":String(I.text),tabindex:I.isSelected?0:-1,onKeydown:[ut(Ee(C,["prevent","stop"]),["space"]),ut(Ee(C,["prevent","stop"]),["enter"])]},[_(E(g8),{cell:I},null,8,["cell"])],42,Hpe))),128))]))),128))],512)],42,zpe))}}),i1=Upe;const jpe=["disabled","onClick"],Wpe=["aria-label","disabled"],Ype=["aria-label","disabled"],qpe=["tabindex","aria-disabled"],Gpe=["tabindex","aria-disabled"],Xpe=["aria-label","disabled"],Kpe=["aria-label","disabled"];var Zpe=fe({__name:"panel-date-pick",props:Spe,emits:["pick","set-picker-option","panel-change"],setup(t,{emit:e}){const n=(_e,Oe,ce)=>!0,i=t,s=e,o=Be("picker-panel"),r=Be("date-picker"),a=Dd(),l=mi(),{t:c,lang:u}=Qt(),d=qe(Ia),h=qe(W1,void 0),{shortcuts:f,disabledDate:p,cellClassName:m,defaultTime:y}=d.props,b=Sn(d.props,"defaultValue"),k=J(),C=J(ht().locale(u.value)),$=J(!1);let S=!1;const M=Y(()=>ht(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,B=_e=>y&&!Le.value&&!$.value&&!S?M.value.year(_e.year()).month(_e.month()).date(_e.date()):ie.value?_e.millisecond(0):_e.startOf("day"),F=(_e,...Oe)=>{_e?Me(_e)?s("pick",_e.map(B),...Oe):s("pick",B(_e),...Oe):s("pick",_e,...Oe),L.value=null,R.value=null,$.value=!1,S=!1},z=async(_e,Oe)=>{if(Q.value==="date"&&ht.isDayjs(_e)){const ce=Gp(i.parsedValue);let De=ce?ce.year(_e.year()).month(_e.month()).date(_e.date()):_e;V(De)||(De=I.value[0][0].year(_e.year()).month(_e.month()).date(_e.date())),C.value=De,F(De,ie.value||Oe)}else Q.value==="week"?F(_e.date):Q.value==="dates"&&F(_e,!0)},U=_e=>{const Oe=_e?"add":"subtract";C.value=C.value[Oe](1,"month"),mt("month")},G=_e=>{const Oe=C.value,ce=_e?"add":"subtract";C.value=K.value==="year"?Oe[ce](10,"year"):Oe[ce](1,"year"),mt("year")},K=J("date"),X=Y(()=>{const _e=c("el.datepicker.year");if(K.value==="year"){const Oe=Math.floor(T.value/10)*10;return _e?`${Oe} ${_e} - ${Oe+9} ${_e}`:`${Oe} - ${Oe+9}`}return`${T.value} ${_e}`}),W=_e=>{const Oe=et(_e.value)?_e.value():_e.value;if(Oe){S=!0,F(ht(Oe).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),ge=async(_e,Oe)=>{Q.value==="month"?(C.value=Wf(C.value,C.value.year(),_e,u.value,p),F(C.value,!1)):Q.value==="months"?F(_e,Oe??!0):(C.value=Wf(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(),_t())),mt("month")},Ce=async(_e,Oe)=>{Q.value==="year"?(C.value=xy(C.value.startOf("year").year(_e),u.value,p),F(C.value,!1)):Q.value==="years"?F(_e,Oe??!0):(C.value=xy(C.value.year(_e),u.value,p),K.value="month",["month","year","date","week"].includes(Q.value)&&(F(C.value,!0),await ot(),_t())),mt("year")},oe=bs(),pe=async _e=>{oe.value||(K.value=_e,await ot(),_t())},ie=Y(()=>i.type==="datetime"||i.type==="datetimerange"),re=Y(()=>{const _e=ie.value||Q.value==="dates",Oe=Q.value==="years",ce=Q.value==="months",De=K.value==="date",gt=K.value==="year",bn=K.value==="month";return _e&&De||Oe&>||ce&&bn}),ke=Y(()=>!ne.value&&i.showNow||i.showConfirm),je=Y(()=>p?i.parsedValue?Me(i.parsedValue)?p(i.parsedValue[0].toDate()):p(i.parsedValue.toDate()):!0:!1),te=()=>{if(ne.value)F(i.parsedValue);else{let _e=Gp(i.parsedValue);if(!_e){const Oe=ht(y).locale(u.value),ce=Ie();_e=Oe.year(ce.year()).month(ce.month()).date(ce.date())}C.value=_e,F(_e)}},se=Y(()=>p?p(ht().locale(u.value).toDate()):!1),me=()=>{const _e=ht().locale(u.value).toDate();$.value=!0,(!p||!p(_e))&&V(_e)&&(C.value=ht().locale(u.value),F(C.value))},$e=Y(()=>i.timeFormat||qR(i.format)||Jg),Se=Y(()=>i.dateFormat||YR(i.format)||mc),Le=Y(()=>{if(R.value)return R.value;if(!(!i.parsedValue&&!b.value))return(Gp(i.parsedValue)||C.value).format($e.value)}),We=Y(()=>{if(L.value)return L.value;if(!(!i.parsedValue&&!b.value))return(Gp(i.parsedValue)||C.value).format(Se.value)}),Fe=J(!1),ze=()=>{Fe.value=!0},Ae=()=>{Fe.value=!1},Ze=_e=>({hour:_e.hour(),minute:_e.minute(),second:_e.second(),year:_e.year(),month:_e.month(),date:_e.date()}),Ye=(_e,Oe,ce)=>{const{hour:De,minute:gt,second:bn}=Ze(_e),gs=Gp(i.parsedValue);C.value=gs?gs.hour(De).minute(gt).second(bn):_e,F(C.value,!0),ce||(Fe.value=Oe)},it=_e=>{const Oe=ht(_e,$e.value).locale(u.value);if(Oe.isValid()&&V(Oe)){const{year:ce,month:De,date:gt}=Ze(C.value);C.value=Oe.year(ce).month(De).date(gt),R.value=null,Fe.value=!1,F(C.value,!0)}},ye=_e=>{const Oe=Yf(_e,Se.value,u.value,h);if(Oe.isValid()){if(p&&p(Oe.toDate()))return;const{hour:ce,minute:De,second:gt}=Ze(C.value);C.value=Oe.hour(ce).minute(De).second(gt),L.value=null,F(C.value,!0)}},ve=_e=>ht.isDayjs(_e)&&_e.isValid()&&(p?!p(_e.toDate()):!0),Pe=_e=>Yf(_e,i.format,u.value,h),Ie=()=>{const _e=ht(b.value).locale(u.value);if(!b.value){const Oe=M.value;return ht().hour(Oe.hour()).minute(Oe.minute()).second(Oe.second()).locale(u.value)}return _e},_t=()=>{var _e;["week","month","year","date"].includes(Q.value)&&((_e=k.value)==null||_e.focus())},Lt=()=>{_t(),Q.value==="week"&&dt(Ue.down)},Je=_e=>{const Oe=ls(_e);[Ue.up,Ue.down,Ue.left,Ue.right,Ue.home,Ue.end,Ue.pageUp,Ue.pageDown].includes(Oe)&&(dt(Oe),_e.stopPropagation(),_e.preventDefault()),[Ue.enter,Ue.space,Ue.numpadEnter].includes(Oe)&&L.value===null&&R.value===null&&(_e.preventDefault(),F(C.value,!1))},dt=_e=>{const{up:Oe,down:ce,left:De,right:gt,home:bn,end:gs,pageUp:du,pageDown:Vp}=Ue,Vl={year:{[Oe]:-4,[ce]:4,[De]:-1,[gt]:1,offset:($n,Di)=>$n.setFullYear($n.getFullYear()+Di)},month:{[Oe]:-4,[ce]:4,[De]:-1,[gt]:1,offset:($n,Di)=>$n.setMonth($n.getMonth()+Di)},week:{[Oe]:-1,[ce]:1,[De]:-1,[gt]:1,offset:($n,Di)=>$n.setDate($n.getDate()+Di*7)},date:{[Oe]:-7,[ce]:7,[De]:-1,[gt]:1,[bn]:$n=>-$n.getDay(),[gs]:$n=>-$n.getDay()+6,[du]:$n=>-new Date($n.getFullYear(),$n.getMonth(),0).getDate(),[Vp]:$n=>new Date($n.getFullYear(),$n.getMonth()+1,0).getDate(),offset:($n,Di)=>$n.setDate($n.getDate()+Di)}},ca=C.value.toDate();for(;Math.abs(C.value.diff(ca,"year",!0))<1;){const $n=Vl[Z.value];if(!$n)return;if($n.offset(ca,et($n[_e])?$n[_e](ca):$n[_e]??0),p&&p(ca))break;const Di=ht(ca).locale(u.value);C.value=Di,s("pick",Di,!0);break}},mt=_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||Me(_e))return;C.value=_e}else C.value=Ie()},{immediate:!0}),s("set-picker-option",["isValidValue",ve]),s("set-picker-option",["parseUserInput",Pe]),s("set-picker-option",["handleFocusPicker",Lt]),(_e,Oe)=>(v(),A("div",{class:q([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:q(E(o).e("body-wrapper"))},[le(_e.$slots,"sidebar",{class:q(E(o).e("sidebar"))}),ae.value?(v(),A("div",{key:0,class:q(E(o).e("sidebar"))},[(v(!0),A(ee,null,we(E(f),(ce,De)=>(v(),A("button",{key:De,type:"button",disabled:E(oe),class:q(E(o).e("shortcut")),onClick:gt=>W(ce)},x(ce.text),11,jpe))),128))],2)):O("v-if",!0),g("div",{class:q(E(o).e("body"))},[ie.value?(v(),A("div",{key:0,class:q(E(r).e("time-header"))},[g("span",{class:q(E(r).e("editor-wrap"))},[_(E(ft),{placeholder:E(c)("el.datepicker.selectDate"),"model-value":We.value,size:"small","validate-event":!1,disabled:E(oe),readonly:!_e.editable,onInput:Oe[0]||(Oe[0]=ce=>L.value=ce),onChange:ye},null,8,["placeholder","model-value","disabled","readonly"])],2),Re((v(),A("span",{class:q(E(r).e("editor-wrap"))},[_(E(ft),{placeholder:E(c)("el.datepicker.selectTime"),"model-value":Le.value,size:"small","validate-event":!1,disabled:E(oe),readonly:!_e.editable,onFocus:ze,onInput:Oe[1]||(Oe[1]=ce=>R.value=ce),onChange:it},null,8,["placeholder","model-value","disabled","readonly"]),_(E(wC),{visible:Fe.value,format:$e.value,"parsed-value":C.value,onPick:Ye},null,8,["visible","format","parsed-value"])],2)),[[E(Qg),Ae]])],2)):O("v-if",!0),Re(g("div",{class:q([E(r).e("header"),(K.value==="year"||K.value==="month")&&E(r).em("header","bordered")])},[g("span",{class:q(E(r).e("prev-btn"))},[g("button",{type:"button","aria-label":E(c)("el.datepicker.prevYear"),class:q(["d-arrow-left",E(o).e("icon-btn")]),disabled:E(oe),onClick:Oe[2]||(Oe[2]=ce=>G(!1))},[le(_e.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(zc))]),_:1})])],10,Wpe),Re(g("button",{type:"button","aria-label":E(c)("el.datepicker.prevMonth"),class:q([E(o).e("icon-btn"),"arrow-left"]),disabled:E(oe),onClick:Oe[3]||(Oe[3]=ce=>U(!1))},[le(_e.$slots,"prev-month",{},()=>[_(E(be),null,{default:w(()=>[_(E(bd))]),_:1})])],10,Ype),[[jt,K.value==="date"]])],2),g("span",{role:"button",class:q(E(r).e("header-label")),"aria-live":"polite",tabindex:_e.disabled?void 0:0,"aria-disabled":_e.disabled,onKeydown:Oe[4]||(Oe[4]=ut(ce=>pe("year"),["enter"])),onClick:Oe[5]||(Oe[5]=ce=>pe("year"))},x(X.value),43,qpe),Re(g("span",{role:"button","aria-live":"polite",tabindex:_e.disabled?void 0:0,"aria-disabled":_e.disabled,class:q([E(r).e("header-label"),{active:K.value==="month"}]),onKeydown:Oe[6]||(Oe[6]=ut(ce=>pe("month"),["enter"])),onClick:Oe[7]||(Oe[7]=ce=>pe("month"))},x(E(c)(`el.datepicker.month${P.value+1}`)),43,Gpe),[[jt,K.value==="date"]]),g("span",{class:q(E(r).e("next-btn"))},[Re(g("button",{type:"button","aria-label":E(c)("el.datepicker.nextMonth"),class:q([E(o).e("icon-btn"),"arrow-right"]),disabled:E(oe),onClick:Oe[8]||(Oe[8]=ce=>U(!0))},[le(_e.$slots,"next-month",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hr))]),_:1})])],10,Xpe),[[jt,K.value==="date"]]),g("button",{type:"button","aria-label":E(c)("el.datepicker.nextYear"),class:q([E(o).e("icon-btn"),"d-arrow-right"]),disabled:E(oe),onClick:Oe[9]||(Oe[9]=ce=>G(!0))},[le(_e.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hc))]),_:1})])],10,Kpe)],2)],2),[[jt,K.value!=="time"]]),g("div",{class:q(E(o).e("content")),onKeydown:Je},[K.value==="date"?(v(),D(SC,{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(i1,{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:Ce},null,8,["selection-mode","date","disabled-date","disabled","parsed-value","cell-class-name"])):O("v-if",!0),K.value==="month"?(v(),D(s1,{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:ge},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:q(E(o).e("footer"))},[Re(_(E(He),{text:"",size:"small",class:q(E(o).e("link-btn")),disabled:se.value,onClick:me},{default:w(()=>[N(x(E(c)("el.datepicker.now")),1)]),_:1},8,["class","disabled"]),[[jt,!ne.value&&_e.showNow]]),_e.showConfirm?(v(),D(E(He),{key:0,plain:"",size:"small",class:q(E(o).e("link-btn")),disabled:je.value,onClick:te},{default:w(()=>[N(x(E(c)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):O("v-if",!0)],2)):O("v-if",!0)],2))}}),Jpe=Zpe;const Qpe=Ge({...FV,...p8}),eme=t=>{const{emit:e}=pt(),n=Dd(),i=mi();return o=>{const r=et(o.value)?o.value():o.value;if(r){e("pick",[ht(r[0]).locale(t.value),ht(r[1]).locale(t.value)]);return}o.onClick&&o.onClick({attrs:n,slots:i,emit:e})}},v8=(t,{defaultValue:e,defaultTime:n,leftDate:i,rightDate:s,step:o,unit:r,sortDates:a})=>{const{emit:l}=pt(),{pickerNs:c}=qe(h8),u=Be("date-range-picker"),{t:d,lang:h}=Qt(),f=eme(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);n1([P,T])&&l("pick",[P,T],M)},C=M=>{y.value.selecting=M,M||(y.value.endDate=null)},$=M=>{if(Me(M)&&M.length===2){const[P,T]=M;p.value=P,i.value=P,m.value=T,a(E(p),E(m))}else S()},S=()=>{let[M,P]=i2(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(Me(I)){const[V,B]=I.map(ht);L=T(V),R=T(B)}else{const V=T(ht(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&&S()},{immediate:!0}),Te(()=>t.parsedValue,M=>{(!(M!=null&&M.length)||!Wi(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}},tme=(t,e,n,i)=>{const s=J("date"),o=J(),r=J("date"),a=J(),{disabledDate:l}=qe(Ia).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(S,M){const P=c("el.datepicker.year");if(S.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(S){S==null||S.focus()}async function b(S,M){if(t.disabled)return;const P=S==="left"?s:r,T=S==="left"?o:a;P.value=M,await ot(),y(T.value)}async function k(S,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;S==="year"&&(I.value=xy(I.value.year(P),u.value,l)),S==="month"&&(I.value=Wf(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=S==="year"?"month":"date",await ot(),y(V.value),C(S)}function C(S){e("panel-change",[n.value.toDate(),i.value.toDate()],S)}function $(S,M,P){const T=P?"add":"subtract";return S==="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:S=>b("left",S),showRightPicker:S=>b("right",S),handleLeftYearPick:S=>k("year","left",S),handleRightYearPick:S=>k("year","right",S),handleLeftMonthPick:S=>k("month","left",S),handleRightMonthPick:S=>k("month","right",S),handlePanelChange:C,adjustDateByView:$}},nme=["disabled","onClick"],sme=["aria-label","disabled"],ime=["aria-label","disabled"],ome=["disabled","aria-label"],rme=["disabled","aria-label"],ame=["tabindex","aria-disabled"],lme=["tabindex","aria-disabled"],cme=["disabled","aria-label"],ume=["disabled","aria-label"],dme=["aria-label","disabled"],hme=["disabled","aria-label"],fme=["tabindex","aria-disabled"],pme=["tabindex","aria-disabled"],s0="month";var mme=fe({__name:"panel-date-range",props:Qpe,emits:["pick","set-picker-option","calendar-change","panel-change","clear"],setup(t,{emit:e}){const n=t,i=e,s=qe(Ia),o=qe(W1,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(ht().locale(f.value)),m=J(ht().locale(f.value).add(1,s0)),{minDate:y,maxDate:b,rangeState:k,ppNs:C,drpNs:$,handleChangeRange:S,handleRangeConfirm:M,handleShortcutClick:P,onSelect:T,parseValue:I,t:L}=v8(n,{defaultValue:h,defaultTime:l,leftDate:p,rightDate:m,unit:s0,sortDates:Di});Te(()=>n.visible,nt=>{!nt&&k.value.selecting&&(I(n.parsedValue),T(!1))});const R=J({min:null,max:null}),V=J({min:null,max:null}),{leftCurrentView:B,rightCurrentView:F,leftCurrentViewRef:z,rightCurrentViewRef:U,leftYear:G,rightYear:K,leftMonth:X,rightMonth:W,leftYearLabel:Q,rightYearLabel:ne,showLeftPicker:Z,showRightPicker:ae,handleLeftYearPick:ge,handleRightYearPick:Ce,handleLeftMonthPick:oe,handleRightMonthPick:pe,handlePanelChange:ie,adjustDateByView:re}=tme(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):""),me=Y(()=>V.value.max!==null?V.value.max:b.value||y.value?(b.value||y.value).format($e.value):""),$e=Y(()=>n.timeFormat||qR(u.value||"")||Jg),Se=Y(()=>n.dateFormat||YR(u.value||"")||mc),Le=nt=>n1(nt)&&(r?!r(nt[0].toDate())&&!r(nt[1].toDate()):!0),We=()=>{p.value=re(B.value,p.value,!1),n.unlinkPanels||(m.value=p.value.add(1,"month")),ie("year")},Fe=()=>{p.value=p.value.subtract(1,"month"),n.unlinkPanels||(m.value=p.value.add(1,"month")),ie("month")},ze=()=>{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")},Ae=()=>{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")},Ze=()=>{p.value=re(B.value,p.value,!0),ie("year")},Ye=()=>{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")},ve=Y(()=>{const nt=(X.value+1)%12,at=X.value+1>=12?1:0;return n.unlinkPanels&&new Date(G.value+at,nt)<new Date(K.value,W.value)}),Pe=Y(()=>n.unlinkPanels&&K.value*12+W.value-(G.value*12+X.value+1)>=12),Ie=bs(),_t=Y(()=>!(y.value&&b.value&&!k.value.selecting&&n1([y.value,b.value])&&!Ie.value)),Lt=Y(()=>n.type==="datetime"||n.type==="datetimerange"),Je=(nt,at)=>{if(nt)return l?ht(l[at]||l).locale(f.value).year(nt.year()).month(nt.month()).date(nt.date()):nt},dt=(nt,at=!0)=>{const vt=nt.minDate,Ko=nt.maxDate,Fl=Je(vt,0),hu=Je(Ko,1);b.value===hu&&y.value===Fl||(i("calendar-change",[vt.toDate(),Ko&&Ko.toDate()]),b.value=hu,y.value=Fl,!Lt.value&&at&&(at=!Fl||!hu),M(at))},mt=J(!1),_e=J(!1),Oe=()=>{mt.value=!1},ce=()=>{_e.value=!1},De=(nt,at)=>{R.value[at]=nt;const vt=ht(nt,Se.value).locale(f.value);if(vt.isValid()){if(r&&r(vt.toDate()))return;at==="min"?(p.value=vt,y.value=(y.value||p.value).year(vt.year()).month(vt.month()).date(vt.date()),!n.unlinkPanels&&(!b.value||b.value.isBefore(y.value))&&(m.value=vt.add(1,"month"),b.value=y.value.add(1,"month"))):(m.value=vt,b.value=(b.value||m.value).year(vt.year()).month(vt.month()).date(vt.date()),!n.unlinkPanels&&(!y.value||y.value.isAfter(b.value))&&(p.value=vt.subtract(1,"month"),y.value=b.value.subtract(1,"month"))),Di(y.value,b.value),M(!0)}},gt=(nt,at)=>{R.value[at]=null},bn=(nt,at)=>{V.value[at]=nt;const vt=ht(nt,$e.value).locale(f.value);vt.isValid()&&(at==="min"?(mt.value=!0,y.value=(y.value||p.value).hour(vt.hour()).minute(vt.minute()).second(vt.second()),p.value=y.value):(_e.value=!0,b.value=(b.value||m.value).hour(vt.hour()).minute(vt.minute()).second(vt.second()),m.value=b.value))},gs=(nt,at)=>{V.value[at]=null,at==="min"?(p.value=y.value,mt.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)},du=(nt,at,vt)=>{V.value.min||(nt&&(y.value=(y.value||p.value).hour(nt.hour()).minute(nt.minute()).second(nt.second())),vt||(mt.value=at),(!b.value||b.value.isBefore(y.value))&&(b.value=y.value,m.value=nt,ot(()=>{I(n.parsedValue)})),M(!0))},Vp=(nt,at,vt)=>{V.value.max||(nt&&(b.value=(b.value||m.value).hour(nt.hour()).minute(nt.minute()).second(nt.second())),vt||(_e.value=at),b.value&&b.value.isBefore(y.value)&&(y.value=b.value),M(!0))},Vl=()=>{ca(),i("clear")},ca=()=>{let nt=null;s!=null&&s.emptyValues&&(nt=s.emptyValues.valueOnClear.value),p.value=i2(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",nt)},$n=nt=>Yf(nt,u.value||"",f.value,o);function Di(nt,at){if(n.unlinkPanels&&at){const vt=(nt==null?void 0:nt.year())||0,Ko=(nt==null?void 0:nt.month())||0,Fl=at.year(),hu=at.month();m.value=vt===Fl&&Ko===hu?at.add(1,s0):at}else m.value=p.value.add(1,s0),at&&(m.value=m.value.hour(at.hour()).minute(at.minute()).second(at.second()))}return i("set-picker-option",["isValidValue",Le]),i("set-picker-option",["parseUserInput",$n]),i("set-picker-option",["handleClear",ca]),(nt,at)=>(v(),A("div",{class:q([E(C).b(),E($).b(),E(C).is("border",nt.border),E(C).is("disabled",E(Ie)),{"has-sidebar":nt.$slots.sidebar||ke.value,"has-time":Lt.value}])},[g("div",{class:q(E(C).e("body-wrapper"))},[le(nt.$slots,"sidebar",{class:q(E(C).e("sidebar"))}),ke.value?(v(),A("div",{key:0,class:q(E(C).e("sidebar"))},[(v(!0),A(ee,null,we(d.value,(vt,Ko)=>(v(),A("button",{key:Ko,type:"button",disabled:E(Ie),class:q(E(C).e("shortcut")),onClick:Fl=>E(P)(vt)},x(vt.text),11,nme))),128))],2)):O("v-if",!0),g("div",{class:q(E(C).e("body"))},[Lt.value?(v(),A("div",{key:0,class:q(E($).e("time-header"))},[g("span",{class:q(E($).e("editors-wrap"))},[g("span",{class:q(E($).e("time-picker-wrap"))},[_(E(ft),{size:"small",disabled:E(k).selecting||E(Ie),placeholder:E(L)("el.datepicker.startDate"),class:q(E($).e("editor")),"model-value":je.value,"validate-event":!1,readonly:!nt.editable,onInput:at[0]||(at[0]=vt=>De(vt,"min")),onChange:at[1]||(at[1]=vt=>gt(vt,"min"))},null,8,["disabled","placeholder","class","model-value","readonly"])],2),Re((v(),A("span",{class:q(E($).e("time-picker-wrap"))},[_(E(ft),{size:"small",class:q(E($).e("editor")),disabled:E(k).selecting||E(Ie),placeholder:E(L)("el.datepicker.startTime"),"model-value":se.value,"validate-event":!1,readonly:!nt.editable,onFocus:at[2]||(at[2]=vt=>mt.value=!0),onInput:at[3]||(at[3]=vt=>bn(vt,"min")),onChange:at[4]||(at[4]=vt=>gs(vt,"min"))},null,8,["class","disabled","placeholder","model-value","readonly"]),_(E(wC),{visible:mt.value,format:$e.value,"datetime-role":"start","parsed-value":E(y)||p.value,onPick:du},null,8,["visible","format","parsed-value"])],2)),[[E(Qg),Oe]])],2),g("span",null,[_(E(be),null,{default:w(()=>[_(E(Hr))]),_:1})]),g("span",{class:q([E($).e("editors-wrap"),"is-right"])},[g("span",{class:q(E($).e("time-picker-wrap"))},[_(E(ft),{size:"small",class:q(E($).e("editor")),disabled:E(k).selecting||E(Ie),placeholder:E(L)("el.datepicker.endDate"),"model-value":te.value,readonly:!E(y)||!nt.editable,"validate-event":!1,onInput:at[5]||(at[5]=vt=>De(vt,"max")),onChange:at[6]||(at[6]=vt=>gt(vt,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"])],2),Re((v(),A("span",{class:q(E($).e("time-picker-wrap"))},[_(E(ft),{size:"small",class:q(E($).e("editor")),disabled:E(k).selecting||E(Ie),placeholder:E(L)("el.datepicker.endTime"),"model-value":me.value,readonly:!E(y)||!nt.editable,"validate-event":!1,onFocus:at[7]||(at[7]=vt=>E(y)&&(_e.value=!0)),onInput:at[8]||(at[8]=vt=>bn(vt,"max")),onChange:at[9]||(at[9]=vt=>gs(vt,"max"))},null,8,["class","disabled","placeholder","model-value","readonly"]),_(E(wC),{"datetime-role":"end",visible:_e.value,format:$e.value,"parsed-value":E(b)||m.value,onPick:Vp},null,8,["visible","format","parsed-value"])],2)),[[E(Qg),ce]])],2)],2)):O("v-if",!0),g("div",{class:q([[E(C).e("content"),E($).e("content")],"is-left"])},[g("div",{class:q(E($).e("header"))},[g("button",{type:"button",class:q([E(C).e("icon-btn"),"d-arrow-left"]),"aria-label":E(L)("el.datepicker.prevYear"),disabled:E(Ie),onClick:We},[le(nt.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(zc))]),_:1})])],10,sme),Re(g("button",{type:"button",class:q([E(C).e("icon-btn"),"arrow-left"]),"aria-label":E(L)("el.datepicker.prevMonth"),disabled:E(Ie),onClick:Fe},[le(nt.$slots,"prev-month",{},()=>[_(E(be),null,{default:w(()=>[_(E(bd))]),_:1})])],10,ime),[[jt,E(B)==="date"]]),nt.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!Pe.value||E(Ie),class:q([[E(C).e("icon-btn"),E(C).is("disabled",!Pe.value||E(Ie))],"d-arrow-right"]),"aria-label":E(L)("el.datepicker.nextYear"),onClick:Ze},[le(nt.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hc))]),_:1})])],10,ome)):O("v-if",!0),nt.unlinkPanels&&E(B)==="date"?(v(),A("button",{key:1,type:"button",disabled:!ve.value||E(Ie),class:q([[E(C).e("icon-btn"),E(C).is("disabled",!ve.value||E(Ie))],"arrow-right"]),"aria-label":E(L)("el.datepicker.nextMonth"),onClick:Ye},[le(nt.$slots,"next-month",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hr))]),_:1})])],10,rme)):O("v-if",!0),g("div",null,[g("span",{role:"button",class:q(E($).e("header-label")),"aria-live":"polite",tabindex:nt.disabled?void 0:0,"aria-disabled":nt.disabled,onKeydown:at[10]||(at[10]=ut(vt=>E(Z)("year"),["enter"])),onClick:at[11]||(at[11]=vt=>E(Z)("year"))},x(E(Q)),43,ame),Re(g("span",{role:"button","aria-live":"polite",tabindex:nt.disabled?void 0:0,"aria-disabled":nt.disabled,class:q([E($).e("header-label"),{active:E(B)==="month"}]),onKeydown:at[12]||(at[12]=ut(vt=>E(Z)("month"),["enter"])),onClick:at[13]||(at[13]=vt=>E(Z)("month"))},x(E(L)(`el.datepicker.month${p.value.month()+1}`)),43,lme),[[jt,E(B)==="date"]])])],2),E(B)==="date"?(v(),D(SC,{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":nt.showWeekNumber,disabled:E(Ie),onChangerange:E(S),onPick:dt,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(B)==="year"?(v(),D(i1,{key:1,ref_key:"leftCurrentViewRef",ref:z,"selection-mode":"year",date:p.value,"disabled-date":E(r),"parsed-value":nt.parsedValue,disabled:E(Ie),onPick:E(ge)},null,8,["date","disabled-date","parsed-value","disabled","onPick"])):O("v-if",!0),E(B)==="month"?(v(),D(s1,{key:2,ref_key:"leftCurrentViewRef",ref:z,"selection-mode":"month",date:p.value,"parsed-value":nt.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:q([[E(C).e("content"),E($).e("content")],"is-right"])},[g("div",{class:q(E($).e("header"))},[nt.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!Pe.value||E(Ie),class:q([[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(nt.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(zc))]),_:1})])],10,cme)):O("v-if",!0),nt.unlinkPanels&&E(F)==="date"?(v(),A("button",{key:1,type:"button",disabled:!ve.value||E(Ie),class:q([[E(C).e("icon-btn"),E(C).is("disabled",!ve.value||E(Ie))],"arrow-left"]),"aria-label":E(L)("el.datepicker.prevMonth"),onClick:ye},[le(nt.$slots,"prev-month",{},()=>[_(E(be),null,{default:w(()=>[_(E(bd))]),_:1})])],10,ume)):O("v-if",!0),g("button",{type:"button","aria-label":E(L)("el.datepicker.nextYear"),class:q([E(C).e("icon-btn"),"d-arrow-right"]),disabled:E(Ie),onClick:ze},[le(nt.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hc))]),_:1})])],10,dme),Re(g("button",{type:"button",class:q([E(C).e("icon-btn"),"arrow-right"]),disabled:E(Ie),"aria-label":E(L)("el.datepicker.nextMonth"),onClick:Ae},[le(nt.$slots,"next-month",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hr))]),_:1})])],10,hme),[[jt,E(F)==="date"]]),g("div",null,[g("span",{role:"button",class:q(E($).e("header-label")),"aria-live":"polite",tabindex:nt.disabled?void 0:0,"aria-disabled":nt.disabled,onKeydown:at[14]||(at[14]=ut(vt=>E(ae)("year"),["enter"])),onClick:at[15]||(at[15]=vt=>E(ae)("year"))},x(E(ne)),43,fme),Re(g("span",{role:"button","aria-live":"polite",tabindex:nt.disabled?void 0:0,"aria-disabled":nt.disabled,class:q([E($).e("header-label"),{active:E(F)==="month"}]),onKeydown:at[16]||(at[16]=ut(vt=>E(ae)("month"),["enter"])),onClick:at[17]||(at[17]=vt=>E(ae)("month"))},x(E(L)(`el.datepicker.month${m.value.month()+1}`)),43,pme),[[jt,E(F)==="date"]])])],2),E(F)==="date"?(v(),D(SC,{key:0,ref_key:"rightCurrentViewRef",ref:U,"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":nt.showWeekNumber,disabled:E(Ie),onChangerange:E(S),onPick:dt,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(i1,{key:1,ref_key:"rightCurrentViewRef",ref:U,"selection-mode":"year",date:m.value,"disabled-date":E(r),"parsed-value":nt.parsedValue,disabled:E(Ie),onPick:E(Ce)},null,8,["date","disabled-date","parsed-value","disabled","onPick"])):O("v-if",!0),E(F)==="month"?(v(),D(s1,{key:2,ref_key:"rightCurrentViewRef",ref:U,"selection-mode":"month",date:m.value,"parsed-value":nt.parsedValue,"disabled-date":E(r),disabled:E(Ie),onPick:E(pe)},null,8,["date","parsed-value","disabled-date","disabled","onPick"])):O("v-if",!0)],2)],2)],2),nt.showFooter&&Lt.value&&(nt.showConfirm||E(c))?(v(),A("div",{key:0,class:q(E(C).e("footer"))},[E(c)?(v(),D(E(He),{key:0,text:"",size:"small",class:q(E(C).e("link-btn")),onClick:Vl},{default:w(()=>[N(x(E(L)("el.datepicker.clear")),1)]),_:1},8,["class"])):O("v-if",!0),nt.showConfirm?(v(),D(E(He),{key:1,plain:"",size:"small",class:q(E(C).e("link-btn")),disabled:_t.value,onClick:at[18]||(at[18]=vt=>E(M)(!1))},{default:w(()=>[N(x(E(L)("el.datepicker.confirm")),1)]),_:1},8,["class","disabled"])):O("v-if",!0)],2)):O("v-if",!0)],2))}}),gme=mme;const vme=Ge({...p8}),_me=["pick","set-picker-option","calendar-change"],yme=({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())}},bme=["disabled","onClick"],wme=["disabled"],kme=["disabled"],Cme=["disabled"],xme=["disabled"],i0="year";var Sme=fe({name:"DatePickerMonthRange",__name:"panel-month-range",props:vme,emits:_me,setup(t,{emit:e}){const n=t,i=e,{lang:s}=Qt(),o=qe(Ia),r=qe(W1,void 0),{shortcuts:a,disabledDate:l,cellClassName:c}=o.props,u=Sn(o.props,"format"),d=Sn(o.props,"defaultValue"),h=J(ht().locale(s.value)),f=J(ht().locale(s.value).add(1,i0)),{minDate:p,maxDate:m,rangeState:y,ppNs:b,drpNs:k,handleChangeRange:C,handleRangeConfirm:$,handleShortcutClick:S,onSelect:M,parseValue:P}=v8(n,{defaultValue:d,leftDate:h,rightDate:f,unit:i0,sortDates:Q}),T=Y(()=>!!a.length),{leftPrevYear:I,rightNextYear:L,leftNextYear:R,rightPrevYear:V,leftLabel:B,rightLabel:F,leftYear:z,rightYear:U}=yme({unlinkPanels:Sn(n,"unlinkPanels"),leftDate:h,rightDate:f}),G=Y(()=>n.unlinkPanels&&U.value>z.value+1),K=(Z,ae=!0)=>{const ge=Z.minDate,Ce=Z.maxDate;m.value===Ce&&p.value===ge||(i("calendar-change",[ge.toDate(),Ce&&Ce.toDate()]),m.value=Ce,p.value=ge,ae&&$())},X=()=>{let Z=null;o!=null&&o.emptyValues&&(Z=o.emptyValues.valueOnClear.value),h.value=i2(E(d),{lang:E(s),unit:"year",unlinkPanels:n.unlinkPanels})[0],f.value=h.value.add(1,"year"),i("pick",Z)},W=Z=>Yf(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,i0):ae:f.value=h.value.add(1,i0)}const ne=bs();return Te(()=>n.visible,Z=>{!Z&&y.value.selecting&&(P(n.parsedValue),M(!1))}),i("set-picker-option",["isValidValue",n1]),i("set-picker-option",["parseUserInput",W]),i("set-picker-option",["handleClear",X]),(Z,ae)=>(v(),A("div",{class:q([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:q(E(b).e("body-wrapper"))},[le(Z.$slots,"sidebar",{class:q(E(b).e("sidebar"))}),T.value?(v(),A("div",{key:0,class:q(E(b).e("sidebar"))},[(v(!0),A(ee,null,we(E(a),(ge,Ce)=>(v(),A("button",{key:Ce,type:"button",class:q(E(b).e("shortcut")),disabled:E(ne),onClick:oe=>E(S)(ge)},x(ge.text),11,bme))),128))],2)):O("v-if",!0),g("div",{class:q(E(b).e("body"))},[g("div",{class:q([[E(b).e("content"),E(k).e("content")],"is-left"])},[g("div",{class:q(E(k).e("header"))},[g("button",{type:"button",class:q([E(b).e("icon-btn"),"d-arrow-left"]),disabled:E(ne),onClick:ae[0]||(ae[0]=(...ge)=>E(I)&&E(I)(...ge))},[le(Z.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(zc))]),_:1})])],10,wme),Z.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!G.value||E(ne),class:q([[E(b).e("icon-btn"),E(b).is("disabled",!G.value||E(ne))],"d-arrow-right"]),onClick:ae[1]||(ae[1]=(...ge)=>E(R)&&E(R)(...ge))},[le(Z.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hc))]),_:1})])],10,kme)):O("v-if",!0),g("div",null,x(E(B)),1)],2),_(s1,{"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:q([[E(b).e("content"),E(k).e("content")],"is-right"])},[g("div",{class:q(E(k).e("header"))},[Z.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!G.value||E(ne),class:q([[E(b).e("icon-btn"),E(b).is("disabled",!G.value||E(ne))],"d-arrow-left"]),onClick:ae[2]||(ae[2]=(...ge)=>E(V)&&E(V)(...ge))},[le(Z.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(zc))]),_:1})])],10,Cme)):O("v-if",!0),g("button",{type:"button",class:q([E(b).e("icon-btn"),"d-arrow-right"]),disabled:E(ne),onClick:ae[3]||(ae[3]=(...ge)=>E(L)&&E(L)(...ge))},[le(Z.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hc))]),_:1})])],10,xme),g("div",null,x(E(F)),1)],2),_(s1,{"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))}}),$me=Sme;const Ame=Ge({...p8}),Eme=["pick","set-picker-option","calendar-change"],Mme=({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)}),Tme=["disabled","onClick"],Pme=["disabled"],Ime=["disabled"],Lme=["disabled"],Ome=["disabled"],uh=10,Xp="year";var Dme=fe({name:"DatePickerYearRange",__name:"panel-year-range",props:Ame,emits:Eme,setup(t,{emit:e}){const n=t,i=e,{lang:s}=Qt(),o=J(ht().locale(s.value)),r=J(ht().locale(s.value).add(uh,Xp)),a=qe(W1,void 0),l=qe(Ia),{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:S,onSelect:M,parseValue:P}=v8(n,{defaultValue:f,leftDate:o,rightDate:r,step:uh,unit:Xp,sortDates:Ce}),{leftPrevYear:T,rightNextYear:I,leftNextYear:L,rightPrevYear:R,leftLabel:V,rightLabel:B,leftYear:F,rightYear:z}=Mme({unlinkPanels:Sn(n,"unlinkPanels"),leftDate:o,rightDate:r}),U=bs(),G=Y(()=>!!c.length),K=Y(()=>[b.b(),k.b(),b.is("border",n.border),b.is("disabled",U.value),{"has-sidebar":!!mi().sidebar||G.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||U.value),"d-arrow-right"]})),W=Y(()=>({content:[b.e("content"),k.e("content"),"is-right"],arrowLeftBtn:[b.e("icon-btn"),b.is("disabled",!Q.value||U.value),"d-arrow-left"],arrowRightBtn:[b.e("icon-btn"),"d-arrow-right"]})),Q=Y(()=>n.unlinkPanels&&z.value>F.value+1),ne=(oe,pe=!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,pe&&$())},Z=oe=>Yf(oe,h.value,s.value,a),ae=oe=>n1(oe)&&(u?!u(oe[0].toDate())&&!u(oe[1].toDate()):!0),ge=()=>{let oe=null;l!=null&&l.emptyValues&&(oe=l.emptyValues.valueOnClear.value);const pe=i2(E(f),{lang:E(s),step:uh,unit:Xp,unlinkPanels:n.unlinkPanels});o.value=pe[0],r.value=pe[1],i("pick",oe)};function Ce(oe,pe){if(n.unlinkPanels&&pe){const ie=(oe==null?void 0:oe.year())||0,re=pe.year();r.value=ie+uh>re?pe.add(uh,Xp):pe}else r.value=o.value.add(uh,Xp)}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",ge]),(oe,pe)=>(v(),A("div",{class:q(K.value)},[g("div",{class:q(E(b).e("body-wrapper"))},[le(oe.$slots,"sidebar",{class:q(E(b).e("sidebar"))}),G.value?(v(),A("div",{key:0,class:q(E(b).e("sidebar"))},[(v(!0),A(ee,null,we(E(c),(ie,re)=>(v(),A("button",{key:re,type:"button",class:q(E(b).e("shortcut")),disabled:E(U),onClick:ke=>E(S)(ie)},x(ie.text),11,Tme))),128))],2)):O("v-if",!0),g("div",{class:q(E(b).e("body"))},[g("div",{class:q(X.value.content)},[g("div",{class:q(E(k).e("header"))},[g("button",{type:"button",class:q(X.value.arrowLeftBtn),disabled:E(U),onClick:pe[0]||(pe[0]=(...ie)=>E(T)&&E(T)(...ie))},[le(oe.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(zc))]),_:1})])],10,Pme),oe.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!Q.value||E(U),class:q(X.value.arrowRightBtn),onClick:pe[1]||(pe[1]=(...ie)=>E(L)&&E(L)(...ie))},[le(oe.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hc))]),_:1})])],10,Ime)):O("v-if",!0),g("div",null,x(E(V)),1)],2),_(i1,{"selection-mode":"range",date:o.value,"min-date":E(p),"max-date":E(m),"range-state":E(y),"disabled-date":E(u),disabled:E(U),"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:q(W.value.content)},[g("div",{class:q(E(k).e("header"))},[oe.unlinkPanels?(v(),A("button",{key:0,type:"button",disabled:!Q.value||E(U),class:q(W.value.arrowLeftBtn),onClick:pe[2]||(pe[2]=(...ie)=>E(R)&&E(R)(...ie))},[le(oe.$slots,"prev-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(zc))]),_:1})])],10,Lme)):O("v-if",!0),g("button",{type:"button",class:q(W.value.arrowRightBtn),disabled:E(U),onClick:pe[3]||(pe[3]=(...ie)=>E(I)&&E(I)(...ie))},[le(oe.$slots,"next-year",{},()=>[_(E(be),null,{default:w(()=>[_(E(Hc))]),_:1})])],10,Ome),g("div",null,x(E(B)),1)],2),_(i1,{"selection-mode":"range",date:r.value,"min-date":E(p),"max-date":E(m),"range-state":E(y),"disabled-date":E(u),disabled:E(U),"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))}}),Rme=Dme;const Vme=function(t){switch(t){case"daterange":case"datetimerange":return gme;case"monthrange":return $me;case"yearrange":return Rme;default:return Jpe}};var NV={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,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)}}})})(NV);var Fme=NV.exports;const Nme=vi(Fme);var BV={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,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)}}})})(BV);var Bme=BV.exports;const zme=vi(Bme);var zV={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,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}}})})(zV);var Hme=zV.exports;const Ume=vi(Hme);var HV={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,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")}}})})(HV);var jme=HV.exports;const Wme=vi(jme);var UV={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,function(){return function(n,i){i.prototype.isSameOrAfter=function(s,o){return this.isSame(s,o)||this.isAfter(s,o)}}})})(UV);var Yme=UV.exports;const qme=vi(Yme);var jV={exports:{}};(function(t,e){(function(n,i){t.exports=i()})(xs,function(){return function(n,i){i.prototype.isSameOrBefore=function(s,o){return this.isSame(s,o)||this.isBefore(s,o)}}})})(jV);var Gme=jV.exports;const Xme=vi(Gme);function Kme(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!is(t)}ht.extend(Khe);ht.extend(Nme);ht.extend(aV);ht.extend(zme);ht.extend(Ume);ht.extend(Wme);ht.extend(qme);ht.extend(Xme);var Zme=fe({name:"ElDatePickerPanel",install:null,inheritAttrs:!1,props:Cpe,emits:[Mt,"calendar-change","panel-change","visible-change","clear"],setup(t,{slots:e,emit:n,attrs:i}){const s=Be("picker-panel");nn(qe(Ia,void 0))&&Pt(Ia,{props:In({...go(t)})}),Pt(h8,{slots:e,pickerNs:s});const{parsedValue:o,onCalendarChange:r,onPanelChange:a,onSetPickerOption:l,onPick:c}=qe(UR,()=>KR(t,n),!0);return()=>_(Vme(t.type),Wt(zb(i,"onPick"),t,{parsedValue:o.value,"onSet-picker-option":l,"onCalendar-change":r,"onPanel-change":a,onClear:()=>n("clear"),onPick:c}),Kme(e)?e:{default:()=>[e]})}});const Jme=qt(Zme),Qme=Ge({...XR,type:{type:de(String),default:"date"}});function ege(t){return typeof t=="function"||Object.prototype.toString.call(t)==="[object Object]"&&!is(t)}var tge=fe({name:"ElDatePicker",install:null,props:Qme,emits:[Mt],setup(t,{expose:e,emit:n,slots:i}){Pt(W1,Y(()=>!t.format)),Pt(HR,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??(Yde[t.type]||mc);return _(the,Wt(t,{format:r,type:t.type,ref:s,"onUpdate:modelValue":o}),{default:a=>_(Jme,Wt({disabled:t.disabled,editable:t.editable,border:!1},a),ege(i)?i:{default:()=>[i]}),"range-separator":i["range-separator"]})}}});const Wd=qt(tge),WV=Ge({center:Boolean,alignCenter:{type:Boolean,default:void 0},closeIcon:{type:ds},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"}}),nge={close:()=>!0},YV=Ge({...WV,appendToBody:Boolean,appendTo:{type:A4.to.type,default:"body"},beforeClose:{type:de(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:de([String,Object]),default:void 0}}),qV={open:()=>!0,opened:()=>!0,close:()=>!0,closed:()=>!0,[Mt]:t=>Jn(t),openAutoFocus:()=>!0,closeAutoFocus:()=>!0},sge=Ge({mask:{type:Boolean,default:!0},customMaskEvent:Boolean,overlayClass:{type:de([String,Array,Object])},zIndex:{type:de([String,Number])}}),ige={click:t=>t instanceof MouseEvent},oge="overlay";var rge=fe({name:"ElOverlay",props:sge,emits:ige,setup(t,{slots:e,emit:n}){const i=Be(oge),s=l=>{n("click",l)},{onClick:o,onMousedown:r,onMouseup:a}=B4(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")],$w.STYLE|$w.CLASS|$w.PROPS,["onClick","onMouseup","onMousedown"]):bt("div",{class:t.overlayClass,style:{zIndex:t.zIndex,position:"fixed",top:"0px",right:"0px",bottom:"0px",left:"0px"}},[le(e,"default")])}});const _8=rge,GV=Symbol("dialogInjectionKey"),Bw="dialog-fade",age="ElDialog",XV=(t,e)=>{const n=pt().emit,{nextZIndex:i}=Yb();let s="";const o=kr(),r=kr(),a=J(!1),l=J(!1),c=J(!1),u=J(t.zIndex??i()),d=J(!1);let h,f;const p=Jc(),m=Y(()=>{var W;return((W=p.value)==null?void 0:W.namespace)??Jm}),y=Y(()=>{var W;return(W=p.value)==null?void 0:W.dialog}),b=Y(()=>{const W={},Q=`--${m.value}-dialog`;if(!t.fullscreen){t.top&&(W[`${Q}-margin-top`]=t.top);const ne=fi(t.width);ne&&(W[`${Q}-width`]=ne)}return W}),k=Y(()=>{var W;return(t.draggable??((W=y.value)==null?void 0:W.draggable)??!1)&&!t.fullscreen}),C=Y(()=>{var W;return t.alignCenter??((W=y.value)==null?void 0:W.alignCenter)??!1}),$=Y(()=>{var W;return t.overflow??((W=y.value)==null?void 0:W.overflow)??!1}),S=Y(()=>C.value?{display:"flex"}:{}),M=Y(()=>{var ne;const W=t.transition??((ne=y.value)==null?void 0:ne.transition)??Bw,Q={name:W,onAfterEnter:P,onBeforeLeave:I,onAfterLeave:T};if(yt(W)){const Z={...W},ae=(ge,Ce)=>oe=>{Me(ge)?ge.forEach(pe=>{et(pe)&&pe(oe)}):et(ge)&&ge(oe),Ce()};return Z.onAfterEnter=ae(Z.onAfterEnter,P),Z.onBeforeLeave=ae(Z.onBeforeLeave,I),Z.onAfterLeave=ae(Z.onAfterLeave,T),Z.name||(Z.name=Bw,Tt(age,`transition.name is missing when using object syntax, fallback to '${Bw}'`)),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}=Gk(()=>F(),t.openDelay):F()}function R(){h==null||h(),f==null||f(),t.closeDelay&&t.closeDelay>0?{stop:f}=Gk(()=>z(),t.closeDelay):z()}function V(){function W(Q){Q||(l.value=!0,a.value=!1)}t.beforeClose?t.beforeClose(W):R()}function B(){t.closeOnClickModal&&V()}function F(){Kt&&(a.value=!0)}function z(){a.value=!1}function U(){n("openAutoFocus")}function G(){n("closeAutoFocus")}function K(W){var Q;((Q=W.detail)==null?void 0:Q.focusReason)==="pointer"&&W.preventDefault()}t.lockScroll&&P4(a);function X(){t.closeOnPressEscape&&V()}return Te(()=>t.zIndex,()=>{u.value=t.zIndex??i()}),Te(()=>t.modelValue,W=>{W?(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,W=>{e.value&&(W?(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:B,close:R,doClose:z,onOpenAutoFocus:U,onCloseAutoFocus:G,onCloseRequested:X,onFocusoutPrevented:K,titleId:o,bodyId:r,closed:l,style:b,overlayDialogStyle:S,rendered:c,visible:a,zIndex:u,transitionConfig:M,_draggable:k,_alignCenter:C,_overflow:$,closing:d}},y8=(...t)=>e=>{t.forEach(n=>{n.value=e})},lge=["aria-level"],cge=["aria-label"],uge=["id"];var dge=fe({name:"ElDialogContent",__name:"dialog-content",props:WV,emits:nge,setup(t,{expose:e}){const{t:n}=Qt(),{Close:i}=Xle,s=t,{dialogRef:o,headerRef:r,bodyId:a,ns:l,style:c}=qe(GV),{focusTrapRef:u}=qe(MR),d=y8(u,o),h=Y(()=>!!s.draggable),{resetPosition:f,updatePosition:p,isDragging:m}=SD(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:q(y.value),style:Xe(E(c)),tabindex:"-1"},[g("header",{ref_key:"headerRef",ref:r,class:q([E(l).e("header"),t.headerClass,{"show-close":t.showClose}])},[le(b.$slots,"header",{},()=>[g("span",{role:"heading","aria-level":t.ariaLevel,class:q(E(l).e("title"))},x(t.title),11,lge)]),t.showClose?(v(),A("button",{key:0,"aria-label":E(n)("el.dialog.close"),class:q(E(l).e("headerbtn")),type:"button",onClick:k[0]||(k[0]=C=>b.$emit("close"))},[_(E(be),{class:q(E(l).e("close"))},{default:w(()=>[(v(),D(Ct(t.closeIcon||E(i))))]),_:1},8,["class"])],10,cge)):O("v-if",!0)],2),g("div",{id:E(a),class:q([E(l).e("body"),t.bodyClass])},[le(b.$slots,"default")],10,uge),b.$slots.footer?(v(),A("footer",{key:0,class:q([E(l).e("footer"),t.footerClass])},[le(b.$slots,"footer")],2)):O("v-if",!0)],6))}}),hge=dge;const fge=["aria-label","aria-labelledby","aria-describedby"];var pge=fe({name:"ElDialog",inheritAttrs:!1,__name:"dialog",props:YV,emits:qV,setup(t,{expose:e}){const n=t,i=mi();fl({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=Be("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:S,onCloseAutoFocus:M,onCloseRequested:P,onFocusoutPrevented:T,closing:I}=XV(n,o);Pt(GV,{dialogRef:o,headerRef:r,bodyId:u,ns:s,rendered:f,style:d});const L=B4($),R=Y(()=>n.modalPenetrable&&!n.modal&&!n.fullscreen);return e({visible:l,dialogContentRef:a,resetPosition:()=>{var B;(B=a.value)==null||B.resetPosition()},handleClose:C}),(B,F)=>(v(),D(E(Kb),{to:t.appendTo,disabled:t.appendTo!=="body"?!1:!t.appendToBody},{default:w(()=>[_(Ho,Wt(E(p),{persisted:""}),{default:w(()=>[Re(_(E(_8),{"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:q([`${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(z1),{loop:"",trapped:E(l),"focus-start-el":"container",onFocusAfterTrapped:E(S),onFocusAfterReleased:E(M),onFocusoutPrevented:E(T),onReleaseRequested:E(P)},{default:w(()=>[E(f)?(v(),D(hge,Wt({key:0,ref_key:"dialogContentRef",ref:a},B.$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)}),hs({header:w(()=>[B.$slots.title?le(B.$slots,"title",{key:1}):le(B.$slots,"header",{key:0,close:E(C),titleId:E(c),titleClass:E(s).e("title")})]),default:w(()=>[le(B.$slots,"default")]),_:2},[B.$slots.footer?{name:"footer",fn:w(()=>[le(B.$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,fge)]),_:3},8,["mask","overlay-class","z-index"]),[[jt,E(l)]])]),_:3},16)]),_:3},8,["to","disabled"]))}}),mge=pge;const $s=qt(mge),gge=Ge({direction:{type:String,values:["horizontal","vertical"],default:"horizontal"},contentPosition:{type:String,values:["left","center","right"],default:"center"},borderStyle:{type:de(String),default:"solid"}});var vge=fe({name:"ElDivider",__name:"divider",props:gge,setup(t){const e=t,n=Be("divider"),i=Y(()=>n.cssVar({"border-style":e.borderStyle}));return(s,o)=>(v(),A("div",{class:q([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:q([E(n).e("text"),E(n).is(t.contentPosition)])},[le(s.$slots,"default")],2)):O("v-if",!0)],6))}}),_ge=vge;const b8=qt(_ge),yge=Ge({...YV,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"}}),bge={...qV,"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 wge(t,e,n){const{width:i,height:s}=Pie(),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(()=>mD(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 S;const $=(S=e.value)==null?void 0:S.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(Hn(window,"mouseup",k),Hn(window,"mousemove",b)))},b=$=>{const{pageX:S,pageY:M}=$,P=S-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(S=>S==null?void 0:S()),p=[],$&&n("resize-end",$,c.value))},C=Hn(e,"mousedown",y);return wn(()=>{C(),k()}),{size:Y(()=>h.value?`${l.value}px`:fi(t.size)),isResizing:d,isHorizontal:o}}const kge=["aria-label","aria-labelledby","aria-describedby"],Cge=["id","aria-level"],xge=["aria-label"],Sge=["id"];var $ge=fe({name:"ElDrawer",inheritAttrs:!1,__name:"drawer",props:yge,emits:bge,setup(t,{expose:e,emit:n}){const i=t,s=n,o=mi();fl({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=Be("drawer"),{t:u}=Qt(),{afterEnter:d,afterLeave:h,beforeLeave:f,visible:p,rendered:m,titleId:y,bodyId:b,zIndex:k,onModalClick:C,onOpenAutoFocus:$,onCloseAutoFocus:S,onFocusoutPrevented:M,onCloseRequested:P,handleClose:T}=XV(i,r),{isHorizontal:I,size:L,isResizing:R}=wge(i,l,s),V=Y(()=>i.modalPenetrable&&!i.modal);return e({handleClose:T,afterEnter:d,afterLeave:h}),(B,F)=>(v(),D(E(Kb),{to:t.appendTo,disabled:t.appendTo!=="body"?!1:!t.appendToBody},{default:w(()=>[_(Ho,{name:E(c).b("fade"),onAfterEnter:E(d),onAfterLeave:E(h),onBeforeLeave:E(f),persisted:""},{default:w(()=>[Re(_(E(_8),{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(z1),{loop:"",trapped:E(p),"focus-trap-el":r.value,"focus-start-el":a.value,onFocusAfterTrapped:E($),onFocusAfterReleased:E(S),onFocusoutPrevented:E(M),onReleaseRequested:E(P)},{default:w(()=>[g("div",Wt({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)},B.$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]=Ee(()=>{},["stop"]))}),[g("span",{ref_key:"focusStartRef",ref:a,class:q(E(c).e("sr-focus")),tabindex:"-1"},null,2),t.withHeader?(v(),A("header",{key:0,class:q([E(c).e("header"),t.headerClass])},[B.$slots.title?le(B.$slots,"title",{key:1},()=>[O(" DEPRECATED SLOT ")]):le(B.$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:q(E(c).e("title"))},x(t.title),11,Cge)]),t.showClose?(v(),A("button",{key:2,"aria-label":E(u)("el.drawer.close"),class:q(E(c).e("close-btn")),type:"button",onClick:F[0]||(F[0]=(...z)=>E(T)&&E(T)(...z))},[_(E(be),{class:q(E(c).e("close"))},{default:w(()=>[_(E(Bo))]),_:1},8,["class"])],10,xge)):O("v-if",!0)],2)):O("v-if",!0),E(m)?(v(),A("div",{key:1,id:E(b),class:q([E(c).e("body"),t.bodyClass])},[le(B.$slots,"default")],10,Sge)):O("v-if",!0),B.$slots.footer?(v(),A("div",{key:2,class:q([E(c).e("footer"),t.footerClass])},[le(B.$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:q(E(c).e("dragger"))},null,6)):O("v-if",!0)],16,kge)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onFocusAfterTrapped","onFocusAfterReleased","onFocusoutPrevented","onReleaseRequested"])]),_:3},8,["mask","overlay-class","z-index","onClick"]),[[jt,E(p)]])]),_:3},8,["name","onAfterEnter","onAfterLeave","onBeforeLeave"])]),_:3},8,["to","disabled"]))}}),Age=$ge;const Va=qt(Age),N0=Ge({trigger:{...Ec.trigger,type:de([String,Array])},triggerKeys:{type:de(Array),default:()=>[Ue.enter,Ue.numpadEnter,Ue.space,Ue.down]},virtualTriggering:Ec.virtualTriggering,virtualRef:Ec.virtualRef,effect:{...zn.effect,default:"light"},type:{type:de(String)},placement:{type:de(String),default:"bottom"},popperOptions:{type:de(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:de([Number,String]),default:0},maxHeight:{type:de([Number,String]),default:""},popperClass:zn.popperClass,popperStyle:zn.popperStyle,disabled:Boolean,role:{type:String,values:yR,default:"menu"},buttonProps:{type:de(Object)},teleported:zn.teleported,appendTo:zn.appendTo,persistent:{type:Boolean,default:!0}}),KV=Ge({command:{type:[Object,String,Number],default:()=>({})},disabled:Boolean,divided:Boolean,textValue:String,icon:{type:ds}}),Ege=Ge({onKeydown:{type:de(Function)}}),o2=Symbol("elDropdown"),ZV="elDropdown";var Mge=fe({inheritAttrs:!1});function Tge(t,e,n,i,s,o){return le(t.$slots,"default")}var Pge=gi(Mge,[["render",Tge]]),Ige=fe({name:"ElCollectionItem",inheritAttrs:!1});function Lge(t,e,n,i,s,o){return le(t.$slots,"default")}var Oge=gi(Ige,[["render",Lge]]);const JV="data-el-collection-item",Dge=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({},Pge,{name:e,setup(){const o=J(),r=new Map;Pt(i,{itemMap:r,getItems:()=>{const l=E(o);if(!l)return[];const c=Array.from(l.querySelectorAll(`[${JV}]`));return[...r.values()].sort((u,d)=>c.indexOf(u.ref)-c.indexOf(d.ref))},collectionRef:o})}}),ElCollectionItem:Object.assign({},Oge,{name:n,setup(o,{attrs:r}){const a=J(),l=qe(i,void 0);Pt(s,{collectionItemRef:a}),Ft(()=>{const c=E(a);c&&l.itemMap.set(c,{ref:c,...r})}),wn(()=>{const c=E(a);l.itemMap.delete(c)})}})}},Rge=Ge({style:{type:de([String,Array,Object])},currentTabId:{type:de(String)},defaultCurrentTabId:String,loop:Boolean,dir:{type:String,values:["ltr","rtl"],default:"ltr"},orientation:{type:de(String)},onBlur:Function,onFocus:Function,onMousedown:Function}),{ElCollection:Vge,ElCollectionItem:Fge,COLLECTION_INJECTION_KEY:QV,COLLECTION_ITEM_INJECTION_KEY:Nge}=Dge("RovingFocusGroup"),w8=Symbol("elRovingFocusGroup"),eF=Symbol("elRovingFocusGroupItem"),Bge={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"},zge=(t,e)=>{if(e!=="rtl")return t;switch(t){case Ue.right:return Ue.left;case Ue.left:return Ue.right;default:return t}},Hge=(t,e,n)=>{const i=zge(ls(t),n);if(!(e==="vertical"&&[Ue.left,Ue.right].includes(i))&&!(e==="horizontal"&&[Ue.up,Ue.down].includes(i)))return Bge[i]},Uge=(t,e)=>t.map((n,i)=>t[(i+e)%t.length]),wA=t=>{const{activeElement:e}=document;for(const n of t)if(n===e||(n.focus(),e!==document.activeElement))return},kA="currentTabIdChange",CA="rovingFocusGroup.entryFocus",jge={bubbles:!1,cancelable:!0};var Wge=fe({name:"ElRovingFocusGroupImpl",inheritAttrs:!1,props:Rge,emits:[kA,"entryFocus"],setup(t,{emit:e}){const n=J((t.currentTabId||t.defaultCurrentTabId)??null),i=J(!1),s=J(!1),o=J(),{getItems:r}=qe(QV,void 0),a=Y(()=>[{outline:"none"},t.style]),l=m=>{e(kA,m)},c=()=>{i.value=!0},u=Ms(m=>{var y;(y=t.onMousedown)==null||y.call(t,m)},()=>{s.value=!0}),d=Ms(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(CA,jge);if(k==null||k.dispatchEvent(C),!C.defaultPrevented){const $=r().filter(S=>S.focusable);wA([$.find(S=>S.active),$.find(S=>S.id===E(n)),...$].filter(Boolean).map(S=>S.ref))}}s.value=!1}),h=Ms(m=>{var y;(y=t.onBlur)==null||y.call(t,m)},()=>{i.value=!1}),f=(...m)=>{e("entryFocus",...m)},p=m=>{const y=Hge(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?Uge(b,k+1):b.slice(k+1);break}}ot(()=>{wA(b)})}};Pt(w8,{currentTabbedId:Rc(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}),Hn(o,CA,f)}});function Yge(t,e,n,i,s,o){return le(t.$slots,"default")}var qge=gi(Wge,[["render",Yge]]),Gge=fe({name:"ElRovingFocusGroup",components:{ElFocusGroupCollection:Vge,ElRovingFocusGroupImpl:qge}});function Xge(t,e,n,i,s,o){const r=H("el-roving-focus-group-impl"),a=H("el-focus-group-collection");return v(),D(a,null,{default:w(()=>[_(r,ef(of(t.$attrs)),{default:w(()=>[le(t.$slots,"default")]),_:3},16)]),_:3})}var Kge=gi(Gge,[["render",Xge]]),Zge=fe({components:{ElRovingFocusCollectionItem:Fge},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(w8,void 0),r=kr(),a=J(),l=Ms(h=>{e("mousedown",h)},h=>{t.focusable?i(E(r)):h.preventDefault()}),c=Ms(h=>{e("focus",h)},()=>{i(E(r))}),u=Ms(h=>{e("keydown",h)},h=>{const{shiftKey:f,target:p,currentTarget:m}=h;if(ls(h)===Ue.tab&&f){s();return}p===m&&o(h)}),d=Y(()=>n.value===E(r));return Pt(eF,{rovingFocusGroupItemRef:a,tabIndex:Y(()=>E(d)?0:-1),handleMousedown:l,handleFocus:c,handleKeydown:u}),{id:r,handleKeydown:u,handleFocus:c,handleMousedown:l}}});function Jge(t,e,n,i,s,o){const r=H("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 Qge=gi(Zge,[["render",Jge]]),e1e=Kge;const{ButtonGroup:t1e}=He;var n1e=fe({name:"ElDropdown",components:{ElButton:He,ElButtonGroup:t1e,ElScrollbar:qs,ElTooltip:Ss,ElRovingFocusGroup:e1e,ElOnlyChild:CR,ElIcon:be,ArrowDown:Bd},props:N0,emits:["visible-change","click","command"],setup(t,{emit:e}){const n=pt(),i=Be("dropdown"),{t:s}=Qt(),o=J(),r=J(),a=J(),l=J(),c=J(null),u=J(null),d=J(!1),h=Y(()=>({maxHeight:fi(t.maxHeight)})),f=Y(()=>[i.m($.value)]),p=Y(()=>Us(t.trigger)),m=kr().value,y=Y(()=>t.id||m);function b(){var B;(B=a.value)==null||B.onClose(void 0,0)}function k(){var B;(B=a.value)==null||B.onClose()}function C(){var B;(B=a.value)==null||B.onOpen()}const $=Ii();function S(...B){e("command",...B)}function M(){}function P(){const B=E(l);p.value.includes("hover")&&(B==null||B.focus({preventScroll:!0})),u.value=null}function T(B){u.value=B}function I(){e("visible-change",!0)}function L(B){var F;d.value=(B==null?void 0:B.type)==="keydown",(F=l.value)==null||F.focus()}function R(){e("visible-change",!1)}return Pt(o2,{contentRef:l,role:Y(()=>t.role),triggerId:y,isUsingKeyboard:d,onItemEnter:M,onItemLeave:P,handleClose:k}),Pt(ZV,{instance:n,dropdownSize:$,handleClick:b,commandHandler:S,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:B=>{e("click",B)},handleClose:k,handleOpen:C,handleBeforeShowTooltip:I,handleShowTooltip:L,handleBeforeHideTooltip:R,popperRef:a,contentRef:l,triggeringElementRef:o,referenceElementRef:r}}});function s1e(t,e,n,i,s,o){const r=H("el-roving-focus-group"),a=H("el-scrollbar"),l=H("el-only-child"),c=H("el-tooltip"),u=H("el-button"),d=H("arrow-down"),h=H("el-icon"),f=H("el-button-group");return v(),A("div",{class:q([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},hs({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,Wt({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,Wt({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:q(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 i1e=gi(n1e,[["render",s1e]]),o1e=fe({name:"DropdownItemImpl",components:{ElIcon:be},props:KV,emits:["pointermove","pointerleave","click","clickimpl"],setup(t,{emit:e}){const n=Be("dropdown"),{role:i}=qe(o2,void 0),{collectionItemRef:s}=qe(Nge,void 0),{rovingFocusGroupItemRef:o,tabIndex:r,handleFocus:a,handleKeydown:l,handleMousedown:c}=qe(eF,void 0),u=y8(s,o),d=Y(()=>i.value==="menu"?"menuitem":i.value==="navigation"?"link":"button"),h=Ms(f=>{const p=ls(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:{[JV]:""},role:d,tabIndex:r,handleFocus:a,handleKeydown:h,handleMousedown:c}}});const r1e=["aria-disabled","tabindex","role"];function a1e(t,e,n,i,s,o){const r=H("el-icon");return v(),A(ee,null,[t.divided?(v(),A("li",{key:0,role:"separator",class:q(t.ns.bem("menu","item","divided"))},null,2)):O("v-if",!0),g("li",Wt({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]=Ee((...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,r1e)],64)}var l1e=gi(o1e,[["render",a1e]]);const tF=()=>{const t=qe(ZV,{});return{elDropdown:t,_elDropdownSize:Y(()=>t==null?void 0:t.dropdownSize)}};var c1e=fe({name:"ElDropdownItem",components:{ElRovingFocusItem:Qge,ElDropdownItemImpl:l1e},inheritAttrs:!1,props:KV,emits:["pointermove","pointerleave","click"],setup(t,{emit:e,attrs:n}){const{elDropdown:i}=tF(),s=pt(),{onItemEnter:o,onItemLeave:r}=qe(o2,void 0),a=Ms(c=>(e("pointermove",c),c.defaultPrevented),g$(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=Ms(c=>(e("pointerleave",c),c.defaultPrevented),g$(r));return{handleClick:Ms(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 u1e(t,e,n,i,s,o){const r=H("el-dropdown-item-impl"),a=H("el-roving-focus-item");return v(),D(a,{focusable:!t.disabled},{default:w(()=>[_(r,Wt(t.propsAndAttrs,{onPointerleave:t.handlePointerLeave,onPointermove:t.handlePointerMove,onClickimpl:t.handleClick}),hs({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 nF=gi(c1e,[["render",u1e]]),d1e=fe({name:"ElDropdownMenu",props:Ege,setup(t){const e=Be("dropdown"),{_elDropdownSize:n}=tF(),i=n.value,{contentRef:s,role:o,triggerId:r,isUsingKeyboard:a,handleClose:l}=qe(o2,void 0),{rovingFocusGroupRef:c,rovingFocusGroupRootStyle:u,onBlur:d,onFocus:h,onKeydown:f,onMousedown:p}=qe(w8,void 0),{collectionRef:m}=qe(QV,void 0),y=Y(()=>[e.b("menu"),e.bm("menu",i==null?void 0:i.value)]),b=y8(s,c,m),k=Ms($=>{var S;(S=t.onKeydown)==null||S.call(t,$)},$=>{const{currentTarget:S,target:M}=$,P=ls($);if(S.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 h1e=["role","aria-labelledby"];function f1e(t,e,n,i,s,o){return v(),A("ul",{ref:t.dropdownListWrapperRef,class:q(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]=Ee((...r)=>t.handleKeydown&&t.handleKeydown(...r),["self"])),onMousedown:e[3]||(e[3]=Ee((...r)=>t.onMousedown&&t.onMousedown(...r),["self"]))},[le(t.$slots,"default")],46,h1e)}var sF=gi(d1e,[["render",f1e]]);const Sr=qt(i1e,{DropdownItem:nF,DropdownMenu:sF}),$r=Os(nF),Ar=Os(sF),p1e=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:de([String,Object])},previewSrcList:{type:de(Array),default:()=>ri([])},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:de(String)}}),m1e={load:t=>t instanceof Event,error:t=>t instanceof Event,switch:t=>wt(t),close:()=>!0,show:()=>!0},g1e=Ge({urlList:{type:de(Array),default:()=>ri([])},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:de(String)}}),v1e={close:()=>!0,error:t=>t instanceof Event,switch:t=>wt(t),rotate:t=>wt(t)},_1e=["src","crossorigin"];var y1e=fe({name:"ElImageViewer",__name:"image-viewer",props:g1e,emits:v1e,setup(t,{expose:e,emit:n}){const i={CONTAIN:{name:"contain",icon:Pi(hR)},ORIGINAL:{name:"original",icon:Pi(Ile)}},s=t,o=n;let r;const{t:a}=Qt(),l=Be("image-viewer"),{nextZIndex:c}=Yb(),u=J(),d=J(),h=fb(),f=Y(()=>{const{scale:ie,minScale:re,maxScale:ke}=s;return mD(ie,re,ke)}),p=J(!0),m=J(!1),y=J(!1),b=J(s.initialIndex),k=Fn(i.CONTAIN),C=J({scale:f.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}),$=J(s.zIndex??c());P4(y,{ns:l});const S=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,me=je/ie;const $e=re*Math.PI/180,Se=Math.cos($e),Le=Math.sin($e);se=se*Se+me*Le,me=me*Se-ke/ie*Le;const We={transform:`scale(${ie}) rotate(${re}deg) translate(${se}px, ${me}px)`,transition:te?"transform .3s":""};return k.value.name===i.CONTAIN.name&&(We.maxWidth=We.maxHeight="100%"),We}),V=Y(()=>`${b.value+1} / ${s.urlList.length}`);function B(){z(),r==null||r(),y.value=!1,o("close")}function F(){const ie=jv(ke=>{switch(ls(ke)){case Ue.esc:s.closeOnPressEscape&&B();break;case Ue.space:Q();break;case Ue.left:Z();break;case Ue.up:ge("zoomIn");break;case Ue.right:ae();break;case Ue.down:ge("zoomOut");break}}),re=jv(ke=>{ge((ke.deltaY||ke.deltaX)<0?"zoomIn":"zoomOut",{zoomRate:s.zoomRate,enableTransition:!1})});h.run(()=>{Hn(document,"keydown",ie),Hn(u,"wheel",re)})}function z(){h.stop()}function U(){p.value=!1}function G(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=jv(Se=>{C.value={...C.value,offsetX:re+Se.pageX-je,offsetY:ke+Se.pageY-te}}),me=Hn(document,"mousemove",se),$e=Hn(document,"mouseup",()=>{me(),$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=jv(Se=>{const Le=Se.touches[0];C.value={...C.value,offsetX:re+Le.pageX-je,offsetY:ke+Le.pageY-te}}),me=Hn(document,"touchmove",se),$e=Hn(document,"touchend",()=>{me(),$e()});ie.preventDefault()}function W(){C.value={scale:f.value,deg:0,offsetX:0,offsetY:0,enableTransition:!1}}function Q(){if(p.value||m.value)return;const ie=my(i),re=Object.values(i),ke=k.value.name;k.value=i[ie[(re.findIndex(je=>je.name===ke)+1)%ie.length]],W()}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 ge(ie,re={}){if(p.value||m.value)return;const{minScale:ke,maxScale:je}=s,{zoomRate:te,rotateDeg:se,enableTransition:me}={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=me}function Ce(ie){var re;((re=ie.detail)==null?void 0:re.focusReason)==="pointer"&&ie.preventDefault()}function oe(){s.closeOnPressEscape&&B()}function pe(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=>{W(),o("switch",ie)}),Ft(()=>{y.value=!0,F(),r=Hn("wheel",pe,{passive:!1})}),e({setActiveItem:ne}),(ie,re)=>(v(),D(E(Kb),{to:"body",disabled:!t.teleported},{default:w(()=>[_(Ho,{name:"viewer-fade",appear:""},{default:w(()=>[g("div",{ref_key:"wrapper",ref:u,tabindex:-1,class:q(E(l).e("wrapper")),style:Xe({zIndex:$.value})},[_(E(z1),{loop:"",trapped:"","focus-trap-el":u.value,"focus-start-el":"container",onFocusoutPrevented:Ce,onReleaseRequested:oe},{default:w(()=>[g("div",{class:q(E(l).e("mask")),onClick:re[0]||(re[0]=Ee(ke=>t.hideOnClickModal&&B(),["self"]))},null,2),O(" CLOSE "),g("span",{class:q([E(l).e("btn"),E(l).e("close")]),onClick:B},[_(E(be),null,{default:w(()=>[_(E(Bo))]),_:1})],2),O(" ARROW "),S.value?O("v-if",!0):(v(),A(ee,{key:0},[g("span",{class:q(I.value),onClick:Z},[_(E(be),null,{default:w(()=>[_(E(bd))]),_:1})],2),g("span",{class:q(L.value),onClick:ae},[_(E(be),null,{default:w(()=>[_(E(Hr))]),_:1})],2)],64)),ie.$slots.progress||t.showProgress?(v(),A("div",{key:1,class:q([E(l).e("btn"),E(l).e("progress")])},[le(ie.$slots,"progress",{activeIndex:b.value,total:t.urlList.length},()=>[N(x(V.value),1)])],2)):O("v-if",!0),O(" ACTIONS "),g("div",{class:q([E(l).e("btn"),E(l).e("actions")])},[g("div",{class:q(E(l).e("actions__inner"))},[le(ie.$slots,"toolbar",{actions:ge,prev:Z,next:ae,reset:Q,activeIndex:b.value,setActiveItem:ne},()=>[_(E(be),{onClick:re[1]||(re[1]=ke=>ge("zoomOut"))},{default:w(()=>[_(E(Gle))]),_:1}),_(E(be),{onClick:re[2]||(re[2]=ke=>ge("zoomIn"))},{default:w(()=>[_(E(vR))]),_:1}),g("i",{class:q(E(l).e("actions__divider"))},null,2),_(E(be),{onClick:Q},{default:w(()=>[(v(),D(Ct(k.value.icon)))]),_:1}),g("i",{class:q(E(l).e("actions__divider"))},null,2),_(E(be),{onClick:re[3]||(re[3]=ke=>ge("anticlockwise"))},{default:w(()=>[_(E(mR))]),_:1}),_(E(be),{onClick:re[4]||(re[4]=ke=>ge("clockwise"))},{default:w(()=>[_(E(Tle))]),_:1})])],2)],2),O(" CANVAS "),g("div",{class:q(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:q(E(l).e("img")),crossorigin:t.crossorigin,onLoad:U,onError:G,onMousedown:K,onTouchstart:X},null,46,_1e))],2),le(ie.$slots,"default")]),_:3},8,["focus-trap-el"])],6)]),_:3})]),_:3},8,["disabled"]))}}),b1e=y1e;const iF=qt(b1e),w1e=["src","loading","crossorigin"],k1e={key:0};var C1e=fe({name:"ElImage",inheritAttrs:!1,__name:"image",props:p1e,emits:m1e,setup(t,{expose:e,emit:n}){const i=t,s=n,{t:o}=Qt(),r=Be("image"),a=Dd(),l=Y(()=>Df(Object.entries(a).filter(([G])=>/^(data-|on[A-Z])/i.test(G)||["id","style"].includes(G)))),c=Ub({excludeListeners:!0,excludeKeys:Y(()=>Object.keys(l.value))}),u=J(),d=J(!1),h=J(!0),f=J(!1),p=J(),m=J(),y=Kt&&"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:G}=i;return Kt&&G?{objectFit:G}:{}}),$=Y(()=>{const{previewSrcList:G}=i;return Me(G)&&G.length>0}),S=Y(()=>{const{previewSrcList:G,initialIndex:K}=i;let X=K;return K>G.length-1&&(X=0),X}),M=Y(()=>i.loading==="eager"?!1:!y&&i.loading==="lazy"||i.lazy),P=()=>{Kt&&(h.value=!0,d.value=!1,u.value=i.src)};function T(G){h.value=!1,d.value=!1,s("load",G)}function I(G){h.value=!1,d.value=!0,s("error",G)}function L(G){G&&(P(),B())}const R=wie(L,200,!0);async function V(){if(!Kt)return;await ot();const{scrollContainer:G}=i;if(Po(G))m.value=G;else if(Ke(G)&&G!=="")m.value=document.querySelector(G)??void 0;else if(p.value){const X=Uie(p.value);m.value=aie(X)?void 0:X}const{stop:K}=Eie(p,([X])=>{R(X.isIntersecting)},{root:m});b=K}function B(){!Kt||!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 U(G){s("switch",G)}return Te(()=>i.src,()=>{M.value?(h.value=!0,d.value=!1,B(),V()):P()}),Ft(()=>{M.value?V():P()}),e({showPreview:F}),(G,K)=>(v(),A("div",Wt({ref_key:"container",ref:p},l.value,{class:[E(r).b(),G.$attrs.class]}),[d.value?le(G.$slots,"error",{key:0},()=>[g("div",{class:q(E(r).e("error"))},x(E(o)("el.image.error")),3)]):(v(),A(ee,{key:1},[u.value!==void 0?(v(),A("img",Wt({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,w1e)):O("v-if",!0),h.value?(v(),A("div",{key:1,class:q(E(r).e("wrapper"))},[le(G.$slots,"placeholder",{},()=>[g("div",{class:q(E(r).e("placeholder"))},null,2)])],2)):O("v-if",!0)],64)),$.value?(v(),A(ee,{key:2},[f.value?(v(),D(E(iF),{key:0,"z-index":t.zIndex,"initial-index":S.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:U},hs({toolbar:w(X=>[le(G.$slots,"toolbar",ef(of(X)))]),default:w(()=>[G.$slots.viewer?(v(),A("div",k1e,[le(G.$slots,"viewer")])):O("v-if",!0)]),_:2},[G.$slots.progress?{name:"progress",fn:w(X=>[le(G.$slots,"progress",ef(of(X)))]),key:"0"}:void 0,G.$slots["viewer-error"]?{name:"viewer-error",fn:w(X=>[le(G.$slots,"viewer-error",ef(of(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))}}),x1e=C1e;const Wo=qt(x1e),S1e=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:Zi,controls:{type:Boolean,default:!0},controlsPosition:{type:String,default:"",values:["","right"]},valueOnClear:{type:de([String,Number,null]),validator:t=>t===null||wt(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},...xr(["ariaLabel"]),inputmode:{type:de(String),default:void 0},align:{type:de(String),default:"center"},disabledScientific:Boolean}),$1e={[dn]:(t,e)=>e!==t,blur:t=>t instanceof FocusEvent,focus:t=>t instanceof FocusEvent,[Do]:t=>wt(t)||ui(t),[Mt]:t=>wt(t)||ui(t)},A1e=["aria-label"],E1e=["aria-label"];var M1e=fe({name:"ElInputNumber",__name:"input-number",props:S1e,emits:$1e,setup(t,{expose:e,emit:n}){const i=t,s=n,{t:o}=Qt(),r=Be("input-number"),a=J(),l=In({currentValue:i.modelValue,userInput:null}),{formItem:c}=_o(),u=Y(()=>wt(i.modelValue)&&i.modelValue<=i.min),d=Y(()=>wt(i.modelValue)&&i.modelValue>=i.max),h=Y(()=>{const G=k(i.step);return nn(i.precision)?Math.max(k(i.modelValue),G):(G>i.precision&&Tt("InputNumber","precision should not be less than the decimal places of step"),i.precision)}),f=Y(()=>i.controls&&i.controlsPosition==="right"),p=Ii(),m=bs(),y=Y(()=>{if(l.userInput!==null)return l.userInput;let G=l.currentValue;if(ui(G))return"";if(wt(G)){if(Number.isNaN(G))return"";nn(i.precision)||(G=G.toFixed(i.precision))}return G}),b=(G,K)=>{if(nn(K)&&(K=h.value),K===0)return Math.round(G);let X=String(G);const W=X.indexOf(".");if(W===-1||!X.replace(".","").split("")[W+K])return G;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=G=>{if(ui(G))return 0;const K=G.toString(),X=K.indexOf(".");let W=0;return X!==-1&&(W=K.length-X-1),W},C=(G,K=1)=>wt(G)?G>=Number.MAX_SAFE_INTEGER&&K===1?(Tt("InputNumber","The value has reached the maximum safe integer limit."),G):G<=Number.MIN_SAFE_INTEGER&&K===-1?(Tt("InputNumber","The value has reached the minimum safe integer limit."),G):b(G+i.step*K):l.currentValue,$=G=>{const K=ls(G),X=ED(G);if(i.disabledScientific&&["e","E"].includes(X)){G.preventDefault();return}switch(K){case Ue.up:G.preventDefault(),S();break;case Ue.down:G.preventDefault(),M();break}},S=()=>{i.readonly||m.value||d.value||(T(C(Number(y.value)||0)),s(Do,l.currentValue),z())},M=()=>{i.readonly||m.value||u.value||(T(C(Number(y.value)||0,-1)),s(Do,l.currentValue),z())},P=(G,K)=>{const{max:X,min:W,step:Q,precision:ne,stepStrictly:Z,valueOnClear:ae}=i;X<W&&vo("InputNumber","min should not be greater than max.");let ge=Number(G);if(ui(G)||Number.isNaN(ge))return null;if(G===""){if(ae===null)return null;ge=Ke(ae)?{min:W,max:X}[ae]:ae}return Z&&(ge=b(Math.round(b(ge/Q))*Q,ne),ge!==G&&K&&s(Mt,ge)),nn(ne)||(ge=b(ge,ne)),(ge>X||ge<W)&&(ge=ge>X?X:W,K&&s(Mt,ge)),ge},T=(G,K=!0)=>{var Q;const X=l.currentValue,W=P(G);if(!K){s(Mt,W);return}l.userInput=null,!(X===W&&G)&&(s(Mt,W),X!==W&&s(dn,W,X),i.validateEvent&&((Q=c==null?void 0:c.validate)==null||Q.call(c,"change").catch(ne=>Tt(ne))),l.currentValue=W)},I=G=>{l.userInput=G;const K=G===""?null:Number(G);s(Do,K),T(K,!1)},L=G=>{const K=G!==""?Number(G):"";(wt(K)&&!Number.isNaN(K)||G==="")&&T(K),z(),l.userInput=null},R=()=>{var G,K;(K=(G=a.value)==null?void 0:G.focus)==null||K.call(G)},V=()=>{var G,K;(K=(G=a.value)==null?void 0:G.blur)==null||K.call(G)},B=G=>{s("focus",G)},F=G=>{var K,X;l.userInput=null,l.currentValue===null&&((K=a.value)!=null&&K.input)&&(a.value.input.value=""),s("blur",G),i.validateEvent&&((X=c==null?void 0:c.validate)==null||X.call(c,"blur").catch(W=>Tt(W)))},z=()=>{l.currentValue!==i.modelValue&&(l.currentValue=i.modelValue)},U=G=>{document.activeElement===G.target&&G.preventDefault()};return Te(()=>i.modelValue,(G,K)=>{const X=P(G,!0);l.userInput===null&&X!==K&&(l.currentValue=X)},{immediate:!0}),Te(()=>i.precision,()=>{l.currentValue=P(i.modelValue)}),Ft(()=>{var Q;const{min:G,max:K,modelValue:X}=i,W=(Q=a.value)==null?void 0:Q.input;if(W.setAttribute("role","spinbutton"),Number.isFinite(K)?W.setAttribute("aria-valuemax",String(K)):W.removeAttribute("aria-valuemax"),Number.isFinite(G)?W.setAttribute("aria-valuemin",String(G)):W.removeAttribute("aria-valuemin"),W.setAttribute("aria-valuenow",l.currentValue||l.currentValue===0?String(l.currentValue):""),W.setAttribute("aria-disabled",String(m.value)),!wt(X)&&X!=null){let ne=Number(X);Number.isNaN(ne)&&(ne=null),s(Mt,ne)}W.addEventListener("wheel",U,{passive:!1})}),xl(()=>{var G,K;(K=(G=a.value)==null?void 0:G.input)==null||K.setAttribute("aria-valuenow",`${l.currentValue??""}`)}),e({focus:R,blur:V}),(G,K)=>(v(),A("div",{class:q([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]=Ee(()=>{},["prevent"]))},[t.controls?Re((v(),A("span",{key:0,role:"button","aria-label":E(o)("el.inputNumber.decrease"),class:q([E(r).e("decrease"),E(r).is("disabled",u.value)]),onKeydown:ut(M,["enter"])},[le(G.$slots,"decrease-icon",{},()=>[_(E(be),null,{default:w(()=>[f.value?(v(),D(E(Bd),{key:0})):(v(),D(E(cle),{key:1}))]),_:1})])],42,A1e)),[[E(wy),M]]):O("v-if",!0),t.controls?Re((v(),A("span",{key:1,role:"button","aria-label":E(o)("el.inputNumber.increase"),class:q([E(r).e("increase"),E(r).is("disabled",d.value)]),onKeydown:ut(S,["enter"])},[le(G.$slots,"increase-icon",{},()=>[_(E(be),null,{default:w(()=>[f.value?(v(),D(E(Zb),{key:0})):(v(),D(E(X4),{key:1}))]),_:1})])],42,E1e)),[[E(wy),S]]):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:B,onInput:I,onChange:L},hs({_:2},[G.$slots.prefix?{name:"prefix",fn:w(()=>[le(G.$slots,"prefix")]),key:"0"}:void 0,G.$slots.suffix?{name:"suffix",fn:w(()=>[le(G.$slots,"suffix")]),key:"1"}:void 0]),1032,["id","step","model-value","placeholder","readonly","disabled","size","max","min","name","aria-label","inputmode"])],34))}}),T1e=M1e;const r2=qt(T1e),P1e=Ge({modelValue:{type:de(Array)},max:Number,tagType:{...e1.type,default:"info"},tagEffect:e1.effect,effect:{type:de(String),default:"light"},trigger:{type:de(String),default:Ue.enter},draggable:Boolean,delimiter:{type:[String,RegExp],default:""},size:Zi,clearable:Boolean,clearIcon:{type:ds,default:Zc},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:de(String),default:"off"},saveOnBlur:{type:Boolean,default:!0},collapseTags:Boolean,collapseTagsTooltip:Boolean,maxCollapseTags:{type:Number,default:1},ariaLabel:String}),I1e={[Mt]:t=>Me(t)||nn(t),[dn]:t=>Me(t)||nn(t),[Do]:t=>Ke(t),"add-tag":t=>Ke(t)||Me(t),"remove-tag":(t,e)=>Ke(t)&&wt(e),"drag-tag":(t,e,n)=>wt(t)&&wt(e)&&Ke(n),focus:t=>t instanceof FocusEvent,blur:t=>t instanceof FocusEvent,clear:()=>!0};function L1e({wrapperRef:t,handleDragged:e,afterDragged:n}){const i=Be("input-tag"),s=Fn(),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",nn(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,S=k?b?.5:0:1;C<=y.width*$?c="before":C>y.width*S?c="after":c=void 0;const M=t.value.querySelector(`.${i.e("inner")}`),P=M.getBoundingClientRect(),T=Number.parseFloat(il(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)}xD(s.value,{top:`${I}px`,left:`${L}px`}),o.value=!!c}function f(p){p.preventDefault(),a&&(a.style.opacity=""),c&&!nn(r)&&!nn(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 O1e(){const t=J(!1);return{hovering:t,handleMouseEnter:()=>{t.value=!0},handleMouseLeave:()=>{t.value=!1}}}function D1e({props:t,emit:e,formItem:n}){const i=bs(),s=Ii(),o=Fn(),r=J(),a=J(),l=Y(()=>["small"].includes(s.value)?"small":"default"),c=Y(()=>{var U;return(U=t.modelValue)!=null&&U.length?void 0:t.placeholder}),u=Y(()=>!(t.readonly||i.value)),d=Y(()=>{var U;return nn(t.max)?!1:(((U=t.modelValue)==null?void 0:U.length)??0)>=t.max}),h=Y(()=>{var U;return t.collapseTags?(U=t.modelValue)==null?void 0:U.slice(0,t.maxCollapseTags):t.modelValue}),f=Y(()=>{var U;return t.collapseTags?(U=t.modelValue)==null?void 0:U.slice(t.maxCollapseTags):[]}),p=U=>{const G=[...t.modelValue??[],...Us(U)];e(Mt,G),e(dn,G),e("add-tag",U),r.value=void 0},m=U=>{var X;const G=U.split(t.delimiter),K=G.length>1?G.map(W=>W.trim()).filter(Boolean):[];if(t.max){const W=t.max-(((X=t.modelValue)==null?void 0:X.length)??0);K.splice(W)}return K.length===1?K[0]:K},y=U=>{var Z;const G=(Z=U.clipboardData)==null?void 0:Z.getData("text");if(t.readonly||d.value||!t.delimiter||!G)return;const{selectionStart:K=0,selectionEnd:X=0,value:W}=U.target,Q=W.slice(0,K)+G+W.slice(X),ne=m(Q);ne.length&&(p(ne),e(Do,Q),U.preventDefault())},b=U=>{if(d.value){r.value=void 0;return}if(!V.value){if(t.delimiter&&r.value){const G=m(r.value);G.length&&p(G)}e(Do,U.target.value)}},k=U=>{var G;if(!V.value)switch(ls(U)){case t.trigger:U.preventDefault(),U.stopPropagation(),$();break;case Ue.numpadEnter:t.trigger===Ue.enter&&(U.preventDefault(),U.stopPropagation(),$());break;case Ue.backspace:!r.value&&((G=t.modelValue)!=null&&G.length)&&(U.preventDefault(),U.stopPropagation(),S(t.modelValue.length-1));break}},C=U=>{if(!(V.value||!kD()))switch(ls(U)){case Ue.space:t.trigger===Ue.space&&(U.preventDefault(),U.stopPropagation(),$());break}},$=()=>{var G;const U=(G=r.value)==null?void 0:G.trim();!U||d.value||p(U)},S=U=>{const G=(t.modelValue??[]).slice(),[K]=G.splice(U,1);e(Mt,G),e(dn,G),e("remove-tag",K,U)},M=()=>{r.value=void 0,e(Mt,void 0),e(dn,void 0),e("clear")},P=(U,G,K)=>{const X=(t.modelValue??[]).slice(),[W]=X.splice(U,1),Q=G>U&&K==="before"?-1:G<U&&K==="after"?1:0;X.splice(G+Q,0,W),e(Mt,X),e(dn,X),e("drag-tag",U,G+Q,W)},T=()=>{var U;(U=o.value)==null||U.focus()},I=()=>{var U;(U=o.value)==null||U.blur()},{wrapperRef:L,isFocused:R}=pp(o,{disabled:i,beforeBlur(U){var G;return(G=a.value)==null?void 0:G.isFocusInsideContent(U)},afterBlur(){var U;t.saveOnBlur?$():r.value=void 0,t.validateEvent&&((U=n==null?void 0:n.validate)==null||U.call(n,"blur").catch(G=>Tt(G)))}}),{isComposing:V,handleCompositionStart:B,handleCompositionUpdate:F,handleCompositionEnd:z}=W4({afterComposition:b});return Te(()=>t.modelValue,()=>{var U;t.validateEvent&&((U=n==null?void 0:n.validate)==null||U.call(n,dn).catch(G=>Tt(G)))}),{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:S,handleClear:M,handleCompositionStart:B,handleCompositionUpdate:F,handleCompositionEnd:z,focus:T,blur:I}}function R1e({props:t,isFocused:e,hovering:n,disabled:i,inputValue:s,size:o,validateState:r,validateIcon:a,needStatusIcon:l}){const c=Dd(),u=mi(),d=Be("input-tag"),h=Be("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}),S=()=>{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=S(),L=I+a4,R=f.value&&t.maxCollapseTags===1?$.innerWidth-$.collapseItemWidth-I-L:$.innerWidth-L;return{maxWidth:`${Math.max(R,0)}px`}});return Ts(p,M),Ts(f,P),{ns:d,nsInput:h,containerKls:m,containerStyle:y,innerKls:b,showClear:k,showSuffix:C,tagStyle:T,collapseItemRef:f,innerRef:p}}const V1e=["id","minlength","maxlength","disabled","readonly","autocomplete","tabindex","placeholder","autofocus","ariaLabel"],F1e=["textContent"];var N1e=fe({name:"ElInputTag",inheritAttrs:!1,__name:"input-tag",props:P1e,emits:I1e,setup(t,{expose:e,emit:n}){const i=t,s=n,o=Ub(),r=mi(),{form:a,formItem:l}=_o(),{inputId:c}=Tl(i,{formItemContext:l}),u=Y(()=>(a==null?void 0:a.statusIcon)??!1),d=Y(()=>(l==null?void 0:l.validateState)||""),h=Y(()=>d.value&&Q4[d.value]),{inputRef:f,wrapperRef:p,tagTooltipRef:m,isFocused:y,inputValue:b,size:k,tagSize:C,placeholder:$,closable:S,disabled:M,showTagList:P,collapseTagList:T,handleDragged:I,handlePaste:L,handleInput:R,handleKeydown:V,handleKeyup:B,handleRemoveTag:F,handleClear:z,handleCompositionStart:U,handleCompositionUpdate:G,handleCompositionEnd:K,focus:X,blur:W}=D1e({props:i,emit:s,formItem:l}),{hovering:Q,handleMouseEnter:ne,handleMouseLeave:Z}=O1e(),{calculatorRef:ae,inputStyle:ge}=bD(),{dropIndicatorRef:Ce,showDropIndicator:oe,handleDragStart:pe,handleDragOver:ie,handleDragEnd:re}=L1e({wrapperRef:p,handleDragged:I,afterDragged:X}),{ns:ke,nsInput:je,containerKls:te,containerStyle:se,innerKls:me,showClear:$e,showSuffix:Se,tagStyle:Le,collapseItemRef:We,innerRef:Fe}=R1e({props:i,hovering:Q,isFocused:y,inputValue:b,disabled:M,size:k,validateState:d,validateIcon:h,needStatusIcon:u});return e({focus:X,blur:W}),(ze,Ae)=>(v(),A("div",{ref_key:"wrapperRef",ref:p,class:q(E(te)),style:Xe(E(se)),onMouseenter:Ae[9]||(Ae[9]=(...Ze)=>E(ne)&&E(ne)(...Ze)),onMouseleave:Ae[10]||(Ae[10]=(...Ze)=>E(Z)&&E(Z)(...Ze))},[E(r).prefix?(v(),A("div",{key:0,class:q(E(ke).e("prefix"))},[le(ze.$slots,"prefix")],2)):O("v-if",!0),g("div",{ref_key:"innerRef",ref:Fe,class:q(E(me))},[(v(!0),A(ee,null,we(E(P),(Ze,Ye)=>(v(),D(E(hi),{key:Ye,size:E(C),closable:E(S),type:t.tagType,effect:t.tagEffect,draggable:E(S)&&t.draggable,style:Xe(E(Le)),"disable-transitions":"",onClose:it=>E(F)(Ye),onDragstart:it=>E(pe)(it,Ye),onDragover:it=>E(ie)(it,Ye),onDragend:E(re),onDrop:Ae[0]||(Ae[0]=Ee(()=>{},["stop"]))},{default:w(()=>[le(ze.$slots,"tag",{value:Ze,index:Ye},()=>[N(x(Ze),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(Ss),{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:We,class:q(E(ke).e("collapse-tag"))},[_(E(hi),{closable:!1,size:E(C),type:t.tagType,effect:t.tagEffect,"disable-transitions":""},{default:w(()=>[N(" + "+x(t.modelValue.length-t.maxCollapseTags),1)]),_:1},8,["size","type","effect"])],2)]),content:w(()=>[g("div",{class:q(E(ke).e("input-tag-list"))},[(v(!0),A(ee,null,we(E(T),(Ze,Ye)=>(v(),D(E(hi),{key:Ye,size:E(C),closable:E(S),type:t.tagType,effect:t.tagEffect,"disable-transitions":"",onClose:it=>E(F)(Ye+t.maxCollapseTags)},{default:w(()=>[le(ze.$slots,"tag",{value:Ze,index:Ye+t.maxCollapseTags},()=>[N(x(Ze),1)])]),_:2},1032,["size","closable","type","effect","onClose"]))),128))],2)]),_:3},8,["disabled","effect"])):O("v-if",!0),g("div",{class:q(E(ke).e("input-wrapper"))},[Re(g("input",Wt({id:E(c),ref_key:"inputRef",ref:f,"onUpdate:modelValue":Ae[1]||(Ae[1]=Ze=>hn(b)?b.value=Ze: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(ge),onCompositionstart:Ae[2]||(Ae[2]=(...Ze)=>E(U)&&E(U)(...Ze)),onCompositionupdate:Ae[3]||(Ae[3]=(...Ze)=>E(G)&&E(G)(...Ze)),onCompositionend:Ae[4]||(Ae[4]=(...Ze)=>E(K)&&E(K)(...Ze)),onPaste:Ae[5]||(Ae[5]=(...Ze)=>E(L)&&E(L)(...Ze)),onInput:Ae[6]||(Ae[6]=(...Ze)=>E(R)&&E(R)(...Ze)),onKeydown:Ae[7]||(Ae[7]=(...Ze)=>E(V)&&E(V)(...Ze)),onKeyup:Ae[8]||(Ae[8]=(...Ze)=>E(B)&&E(B)(...Ze))}),null,16,V1e),[[md,E(b)]]),g("span",{ref_key:"calculatorRef",ref:ae,"aria-hidden":"true",class:q(E(ke).e("input-calculator")),textContent:x(E(b))},null,10,F1e)],2),Re(g("div",{ref_key:"dropIndicatorRef",ref:Ce,class:q(E(ke).e("drop-indicator"))},null,2),[[jt,E(oe)]])],2),E(Se)?(v(),A("div",{key:1,class:q(E(ke).e("suffix"))},[le(ze.$slots,"suffix"),E($e)?(v(),D(E(be),{key:0,class:q([E(ke).e("icon"),E(ke).e("clear")]),onMousedown:Ee(E(Dt),["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:q([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))}}),B1e=N1e;const z1e=qt(B1e),H1e=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:ds}}),U1e={click:t=>t instanceof MouseEvent},j1e=["href","target"];var W1e=fe({name:"ElLink",__name:"link",props:H1e,emits:U1e,setup(t,{emit:e}){const n=t,i=e,s=Jc("link");fl({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(()=>Jn(n.underline)));const o=Be("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 Jn(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:q(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:q(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,j1e))}}),Y1e=W1e;const k8=qt(Y1e),oF=Symbol("elPaginationKey"),q1e=Ge({disabled:Boolean,currentPage:{type:Number,default:1},prevText:{type:String},prevIcon:{type:ds}}),G1e={click:t=>t instanceof MouseEvent},X1e=["disabled","aria-label","aria-disabled"],K1e={key:0};var Z1e=fe({name:"ElPaginationPrev",__name:"prev",props:q1e,emits:G1e,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",K1e,x(s.prevText),1)):(v(),D(E(be),{key:1},{default:w(()=>[(v(),D(Ct(s.prevIcon)))]),_:1}))],8,X1e))}}),J1e=Z1e;const Q1e=Ge({disabled:Boolean,currentPage:{type:Number,default:1},pageCount:{type:Number,default:50},nextText:{type:String},nextIcon:{type:ds}}),eve=["disabled","aria-label","aria-disabled"],tve={key:0};var nve=fe({name:"ElPaginationNext",__name:"next",props:Q1e,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",tve,x(s.nextText),1)):(v(),D(E(be),{key:1},{default:w(()=>[(v(),D(Ct(s.nextIcon)))]),_:1}))],8,eve))}}),sve=nve;const C8=()=>qe(oF,{}),ive=Ge({pageSize:{type:Number,required:!0},pageSizes:{type:de(Array),default:()=>ri([10,20,30,40,50,100])},popperClass:{type:String},popperStyle:{type:de([String,Object])},disabled:Boolean,teleported:Boolean,size:{type:String,values:$l},appendSizeTo:String});var ove=fe({name:"ElPaginationSizes",__name:"sizes",props:ive,emits:["page-size-change"],setup(t,{emit:e}){const n=t,i=e,{t:s}=Qt(),o=Be("pagination"),r=C8(),a=J(n.pageSize);Te(()=>n.pageSizes,(u,d)=>{Wi(u,d)||Me(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:q(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,we(l.value,h=>(v(),D(E(sn),{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))}}),rve=ove;const ave=Ge({size:{type:String,values:$l}}),lve=["disabled"];var cve=fe({name:"ElPaginationJumper",__name:"jumper",props:ave,setup(t){const{t:e}=Qt(),n=Be("pagination"),{pageCount:i,disabled:s,currentPage:o,changeEvent:r}=C8(),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:q(E(n).e("jump")),disabled:E(s)},[g("span",{class:q([E(n).e("goto")])},x(E(e)("el.pagination.goto")),3),_(E(ft),{size:d.size,class:q([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:q([E(n).e("classifier")])},x(E(e)("el.pagination.pageClassifier")),3)],10,lve))}}),uve=cve;const dve=Ge({total:{type:Number,default:1e3}}),hve=["disabled"];var fve=fe({name:"ElPaginationTotal",__name:"total",props:dve,setup(t){const{t:e}=Qt(),n=Be("pagination"),{disabled:i}=C8();return(s,o)=>(v(),A("span",{class:q(E(n).e("total")),disabled:E(i)},x(E(e)("el.pagination.total",{total:s.total})),11,hve))}}),pve=fve;const mve=Ge({currentPage:{type:Number,default:1},pageCount:{type:Number,required:!0},pagerCount:{type:Number,default:7},disabled:Boolean}),gve=["aria-current","aria-label","tabindex"],vve=["tabindex","aria-label"],_ve=["aria-current","aria-label","tabindex"],yve=["tabindex","aria-label"],bve=["aria-current","aria-label","tabindex"];var wve=fe({name:"ElPaginationPager",__name:"pager",props:mve,emits:[dn],setup(t,{emit:e}){const n=t,i=e,s=Be("pager"),o=Be("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 S=n.pagerCount,M=(S-1)/2,P=Number(n.currentPage),T=Number(n.pageCount);let I=!1,L=!1;T>S&&(P>S-M&&(I=!0),P<T-M&&(L=!0));const R=[];if(I&&!L){const V=T-(S-2);for(let B=V;B<T;B++)R.push(B)}else if(!I&&L)for(let V=2;V<S;V++)R.push(V);else if(I&&L){const V=Math.floor(S/2)-1;for(let B=P-V;B<=P+V;B++)R.push(B)}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],([S,M,P])=>{const T=(M-1)/2;let I=!1,L=!1;S>M&&(I=P>M-T,L=P<S-T),c.value&&(c.value=I),u.value&&(u.value=L),a.value=I,l.value=L},{immediate:!0});function b(S=!1){n.disabled||(S?c.value=!0:u.value=!0)}function k(S=!1){S?d.value=!0:h.value=!0}function C(S){const M=S.target;if(M.tagName.toLowerCase()==="li"&&Array.from(M.classList).includes("number")){const P=Number(M.textContent);P!==n.currentPage&&i(dn,P)}else M.tagName.toLowerCase()==="li"&&Array.from(M.classList).includes("more")&&$(S)}function $(S){const M=S.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(dn,P)}return(S,M)=>(v(),A("ul",{class:q(E(s).b()),onClick:$,onKeyup:ut(C,["enter"])},[S.pageCount>0?(v(),A("li",{key:0,class:q([[E(s).is("active",S.currentPage===1),E(s).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===1,"aria-label":E(r)("el.pagination.currentPage",{pager:1}),tabindex:y.value}," 1 ",10,gve)):O("v-if",!0),a.value?(v(),A("li",{key:1,class:q(p.value),tabindex:y.value,"aria-label":E(r)("el.pagination.prevPages",{pager:S.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)&&!S.disabled?(v(),D(E(zc),{key:0})):(v(),D(E(sC),{key:1}))],42,vve)):O("v-if",!0),(v(!0),A(ee,null,we(f.value,P=>(v(),A("li",{key:P,class:q([[E(s).is("active",S.currentPage===P),E(s).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===P,"aria-label":E(r)("el.pagination.currentPage",{pager:P}),tabindex:y.value},x(P),11,_ve))),128)),l.value?(v(),A("li",{key:2,class:q(m.value),tabindex:y.value,"aria-label":E(r)("el.pagination.nextPages",{pager:S.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)&&!S.disabled?(v(),D(E(Hc),{key:0})):(v(),D(E(sC),{key:1}))],42,yve)):O("v-if",!0),S.pageCount>1?(v(),A("li",{key:3,class:q([[E(s).is("active",S.currentPage===S.pageCount),E(s).is("disabled",S.disabled)],"number"]),"aria-current":S.currentPage===S.pageCount,"aria-label":E(r)("el.pagination.currentPage",{pager:S.pageCount}),tabindex:y.value},x(S.pageCount),11,bve)):O("v-if",!0)],34))}}),kve=wve;const Ri=t=>typeof t!="number",Cve=Ge({pageSize:Number,defaultPageSize:Number,total:Number,pageCount:Number,pagerCount:{type:Number,validator:t=>wt(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:de(Array),default:()=>ri([10,20,30,40,50,100])},popperClass:{type:String,default:""},popperStyle:{type:de([String,Object])},prevText:{type:String,default:""},prevIcon:{type:ds,default:()=>bd},nextText:{type:String,default:""},nextIcon:{type:ds,default:()=>Hr},teleported:{type:Boolean,default:!0},small:Boolean,size:Zi,background:Boolean,disabled:Boolean,hideOnSinglePage:Boolean,appendSizeTo:String}),xve={"update:current-page":t=>wt(t),"update:page-size":t=>wt(t),"size-change":t=>wt(t),change:(t,e)=>wt(t)&&wt(e),"current-change":t=>wt(t),"prev-click":t=>wt(t),"next-click":t=>wt(t)},xA="ElPagination";var Sve=fe({name:xA,props:Cve,emits:xve,setup(t,{emit:e,slots:n}){const{t:i}=Qt(),s=Be("pagination"),o=pt().vnode.props||{},r=sR(),a=Y(()=>t.small?"small":t.size??r.value);fl({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(Ri(t.total)&&Ri(t.pageCount)||!Ri(t.currentPage)&&!l)return!1;if(t.layout.includes("sizes")){if(Ri(t.pageCount)){if(!Ri(t.total)&&!Ri(t.pageSize)&&!c)return!1}else if(!c)return!1}return!0}),d=J(Ri(t.defaultPageSize)?10:t.defaultPageSize),h=J(Ri(t.defaultCurrentPage)?1:t.defaultCurrentPage),f=Y({get(){return Ri(t.pageSize)?d.value:t.pageSize},set(S){Ri(t.pageSize)&&(d.value=S),c&&(e("update:page-size",S),e("size-change",S))}}),p=Y(()=>{let S=0;return Ri(t.pageCount)?Ri(t.total)||(S=Math.max(1,Math.ceil(t.total/f.value))):S=t.pageCount,S}),m=Y({get(){return Ri(t.currentPage)?h.value:t.currentPage},set(S){let M=S;S<1?M=1:S>p.value&&(M=p.value),Ri(t.currentPage)&&(h.value=M),l&&(e("update:current-page",M),e("current-change",M))}});Te(p,S=>{m.value>S&&(m.value=S)}),Te([m,f],S=>{e(dn,...S)},{flush:"post"});function y(S){m.value=S}function b(S){f.value=S;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 $(S,M){S&&(S.props||(S.props={}),S.props.class=[S.props.class,M].join(" "))}return Pt(oF,{pageCount:p,disabled:Y(()=>t.disabled),currentPage:m,changeEvent:y,handleSizeChange:b}),()=>{var R;if(!u.value)return Tt(xA,i("el.pagination.deprecationWarning")),null;if(!t.layout||t.hideOnSinglePage&&p.value<=1)return null;const S=[],M=[],P=bt("div",{class:s.e("rightwrapper")},M),T={prev:bt(J1e,{disabled:t.disabled,currentPage:m.value,prevText:t.prevText,prevIcon:t.prevIcon,onClick:k}),jumper:bt(uve,{size:a.value}),pager:bt(kve,{currentPage:m.value,pageCount:p.value,pagerCount:t.pagerCount,onChange:y,disabled:t.disabled}),next:bt(sve,{disabled:t.disabled,currentPage:m.value,pageCount:p.value,nextText:t.nextText,nextIcon:t.nextIcon,onClick:C}),sizes:bt(rve,{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:bt(pve,{total:Ri(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]):S.push(T[V])}),$(S[0],s.is("first")),$(S[S.length-1],s.is("last")),L&&M.length>0&&($(M[0],s.is("first")),$(M[M.length-1],s.is("last")),S.push(P)),bt("div",{class:[s.b(),s.is("background",t.background),s.m(a.value)]},S)}}});const $ve=qt(Sve),Ave=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:de(String),default:"round"},textInside:Boolean,width:{type:Number,default:126},showText:{type:Boolean,default:!0},color:{type:de([String,Array,Function]),default:""},striped:Boolean,stripedFlow:Boolean,format:{type:de(Function),default:t=>`${t}%`}}),Eve=["aria-valuenow"],Mve={viewBox:"0 0 100 100"},Tve=["d","stroke","stroke-linecap","stroke-width"],Pve=["d","stroke","opacity","stroke-linecap","stroke-width"],Ive={key:0};var Lve=fe({name:"ElProgress",__name:"progress",props:Ave,setup(t){const e={success:"#13ce66",exception:"#ff4949",warning:"#e6a23c",default:"#20a0ff"},n=t,i=Be("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` | |
| 74 | 73 | M 50 50 |
| 75 | - m 0 ${x?"":"-"}${k} | |
| 76 | - a ${k} ${k} 0 1 1 0 ${x?"-":""}${k*2} | |
| 77 | - a ${k} ${k} 0 1 1 0 ${x?"":"-"}${k*2} | |
| 78 | - `}),l=q(()=>2*Math.PI*r.value),c=q(()=>e.type==="dashboard"?.75:1),u=q(()=>`${-1*l.value*(1-c.value)/2}px`),d=q(()=>({strokeDasharray:`${l.value*c.value}px, ${l.value}px`,strokeDashoffset:u.value})),h=q(()=>({strokeDasharray:`${l.value*c.value*(e.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=q(()=>{let k;return e.color?k=C(e.percentage):k=n[e.status]||n.default,k}),p=q(()=>e.status==="warning"?Fx:e.type==="line"?e.status==="success"?Ix:Of:e.status==="success"?Px:Ir),m=q(()=>e.type==="line"?12+e.strokeWidth*.4:e.width*.111111+2),b=q(()=>e.format(e.percentage));function y(k){const x=100/k.length;return k.map((E,T)=>nt(E)?{color:E,percentage:(T+1)*x}:E).sort((E,T)=>E.percentage-T.percentage)}const C=k=>{var x;const{color:S}=e;if(ot(S))return S(k);if(nt(S))return S;{const E=y(S);for(const T of E)if(T.percentage>k)return T.color;return(x=E[E.length-1])==null?void 0:x.color}};return(k,x)=>(v(),$("div",{class:W([A(s).b(),A(s).m(k.type),A(s).is(k.status),{[A(s).m("without-text")]:!k.showText,[A(s).m("text-inside")]:k.textInside}]),role:"progressbar","aria-valuenow":k.percentage,"aria-valuemin":"0","aria-valuemax":"100"},[k.type==="line"?(v(),$("div",{key:0,class:W(A(s).b("bar"))},[g("div",{class:W(A(s).be("bar","outer")),style:Ke({height:`${k.strokeWidth}px`})},[g("div",{class:W([A(s).be("bar","inner"),{[A(s).bem("bar","inner","indeterminate")]:k.indeterminate},{[A(s).bem("bar","inner","striped")]:k.striped},{[A(s).bem("bar","inner","striped-flow")]:k.stripedFlow}]),style:Ke(A(i))},[(k.showText||k.$slots.default)&&k.textInside?(v(),$("div",{key:0,class:W(A(s).be("bar","innerText"))},[ae(k.$slots,"default",{percentage:k.percentage},()=>[g("span",null,M(A(b)),1)])],2)):O("v-if",!0)],6)],6)],2)):(v(),$("div",{key:1,class:W(A(s).b("circle")),style:Ke({height:`${k.width}px`,width:`${k.width}px`})},[(v(),$("svg",{viewBox:"0 0 100 100"},[g("path",{class:W(A(s).be("circle","track")),d:A(a),stroke:`var(${A(s).cssVarName("fill-color-light")}, #e5e9f2)`,"stroke-linecap":k.strokeLinecap,"stroke-width":A(o),fill:"none",style:Ke(A(d))},null,14,["d","stroke","stroke-linecap","stroke-width"]),g("path",{class:W(A(s).be("circle","path")),d:A(a),stroke:A(f),fill:"none",opacity:k.percentage?1:0,"stroke-linecap":k.strokeLinecap,"stroke-width":A(o),style:Ke(A(h))},null,14,["d","stroke","opacity","stroke-linecap","stroke-width"])]))],6)),(k.showText||k.$slots.default)&&!k.textInside?(v(),$("div",{key:2,class:W(A(s).e("text")),style:Ke({fontSize:`${A(m)}px`})},[ae(k.$slots,"default",{percentage:k.percentage},()=>[k.status?(v(),R(A(ye),{key:1},{default:w(()=>[(v(),R(Tt(A(p))))]),_:1})):(v(),$("span",{key:0},M(A(b)),1))])],6)):O("v-if",!0)],10,["aria-valuenow"]))}});var Oge=Ye(Lge,[["__file","progress.vue"]]);const pb=jt(Oge),Dge=Ze({animated:{type:Boolean,default:!1},count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:Number}}),Rge=Ze({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}}),Vge=se({name:"ElSkeletonItem"}),Fge=se({...Vge,props:Rge,setup(t){const e=He("skeleton");return(n,s)=>(v(),$("div",{class:W([A(e).e("item"),A(e).e(n.variant)])},[n.variant==="image"?(v(),R(A(roe),{key:0})):O("v-if",!0)],2))}});var V_=Ye(Fge,[["__file","skeleton-item.vue"]]);const Nge=se({name:"ElSkeleton"}),Bge=se({...Nge,props:Dge,setup(t,{expose:e}){const n=t,s=He("skeleton"),i=Qre(kn(n,"loading"),n.throttle);return e({uiLoading:i}),(o,r)=>A(i)?(v(),$("div",Mn({key:0,class:[A(s).b(),A(s).is("animated",o.animated)]},o.$attrs),[(v(!0),$(te,null,be(o.count,a=>(v(),$(te,{key:a},[o.loading?ae(o.$slots,"template",{key:a},()=>[_(V_,{class:W(A(s).is("first")),variant:"p"},null,8,["class"]),(v(!0),$(te,null,be(o.rows,l=>(v(),R(V_,{key:l,class:W([A(s).e("paragraph"),A(s).is("last",l===o.rows&&o.rows>1)]),variant:"p"},null,8,["class"]))),128))]):O("v-if",!0)],64))),128))],16)):ae(o.$slots,"default",Ck(Mn({key:1},o.$attrs)))}});var zge=Ye(Bge,[["__file","skeleton.vue"]]);const Wt=jt(zge,{SkeletonItem:V_});xs(V_);const Hge=Ze({modelValue:{type:[Boolean,String,Number],default:!1},disabled:Boolean,loading:Boolean,size:{type:String,validator:IO},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:ms},activeActionIcon:{type:ms},activeIcon:{type:ms},inactiveIcon:{type:ms},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:xe(Function)},id:String,tabindex:{type:[String,Number]},...ir(["ariaLabel"])}),Uge={[mn]:t=>li(t)||nt(t)||xt(t),[Lr]:t=>li(t)||nt(t)||xt(t),[Au]:t=>li(t)||nt(t)||xt(t)},jR="ElSwitch",jge=se({name:jR}),Wge=se({...jge,props:Hge,emits:Uge,setup(t,{expose:e,emit:n}){const s=t,{formItem:i}=Br(),o=Mi(),r=He("switch"),{inputId:a}=dd(s,{formItemContext:i}),l=Co(q(()=>s.loading)),c=J(s.modelValue!==!1),u=J(),d=J(),h=q(()=>[r.b(),r.m(o.value),r.is("disabled",l.value),r.is("checked",y.value)]),f=q(()=>[r.e("label"),r.em("label","left"),r.is("active",!y.value)]),p=q(()=>[r.e("label"),r.em("label","right"),r.is("active",y.value)]),m=q(()=>({width:Ai(s.width)}));Te(()=>s.modelValue,()=>{c.value=!0});const b=q(()=>c.value?s.modelValue:!1),y=q(()=>b.value===s.activeValue);[s.activeValue,s.inactiveValue].includes(b.value)||(n(mn,s.inactiveValue),n(Lr,s.inactiveValue),n(Au,s.inactiveValue)),Te(y,S=>{var E;u.value.checked=S,s.validateEvent&&((E=i==null?void 0:i.validate)==null||E.call(i,"change").catch(T=>void 0))});const C=()=>{const S=y.value?s.inactiveValue:s.activeValue;n(mn,S),n(Lr,S),n(Au,S),dt(()=>{u.value.checked=y.value})},k=()=>{if(l.value)return;const{beforeChange:S}=s;if(!S){C();return}const E=S();[zm(E),li(E)].includes(!0)||sr(jR,"beforeChange must return type `Promise<boolean>` or `boolean`"),zm(E)?E.then(P=>{P&&C()}).catch(P=>{}):E&&C()},x=()=>{var S,E;(E=(S=u.value)==null?void 0:S.focus)==null||E.call(S)};return Pt(()=>{u.value.checked=y.value}),e({focus:x,checked:y}),(S,E)=>(v(),$("div",{class:W(A(h)),onClick:Be(k,["prevent"])},[g("input",{id:A(a),ref_key:"input",ref:u,class:W(A(r).e("input")),type:"checkbox",role:"switch","aria-checked":A(y),"aria-disabled":A(l),"aria-label":S.ariaLabel,name:S.name,"true-value":S.activeValue,"false-value":S.inactiveValue,disabled:A(l),tabindex:S.tabindex,onChange:C,onKeydown:$t(k,["enter"])},null,42,["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex","onKeydown"]),!S.inlinePrompt&&(S.inactiveIcon||S.inactiveText)?(v(),$("span",{key:0,class:W(A(f))},[S.inactiveIcon?(v(),R(A(ye),{key:0},{default:w(()=>[(v(),R(Tt(S.inactiveIcon)))]),_:1})):O("v-if",!0),!S.inactiveIcon&&S.inactiveText?(v(),$("span",{key:1,"aria-hidden":A(y)},M(S.inactiveText),9,["aria-hidden"])):O("v-if",!0)],2)):O("v-if",!0),g("span",{ref_key:"core",ref:d,class:W(A(r).e("core")),style:Ke(A(m))},[S.inlinePrompt?(v(),$("div",{key:0,class:W(A(r).e("inner"))},[S.activeIcon||S.inactiveIcon?(v(),R(A(ye),{key:0,class:W(A(r).is("icon"))},{default:w(()=>[(v(),R(Tt(A(y)?S.activeIcon:S.inactiveIcon)))]),_:1},8,["class"])):S.activeText||S.inactiveText?(v(),$("span",{key:1,class:W(A(r).is("text")),"aria-hidden":!A(y)},M(A(y)?S.activeText:S.inactiveText),11,["aria-hidden"])):O("v-if",!0)],2)):O("v-if",!0),g("div",{class:W(A(r).e("action"))},[S.loading?(v(),R(A(ye),{key:0,class:W(A(r).is("loading"))},{default:w(()=>[_(A(rf))]),_:1},8,["class"])):A(y)?ae(S.$slots,"active-action",{key:1},()=>[S.activeActionIcon?(v(),R(A(ye),{key:0},{default:w(()=>[(v(),R(Tt(S.activeActionIcon)))]),_:1})):O("v-if",!0)]):A(y)?O("v-if",!0):ae(S.$slots,"inactive-action",{key:2},()=>[S.inactiveActionIcon?(v(),R(A(ye),{key:0},{default:w(()=>[(v(),R(Tt(S.inactiveActionIcon)))]),_:1})):O("v-if",!0)])],2)],6),!S.inlinePrompt&&(S.activeIcon||S.activeText)?(v(),$("span",{key:1,class:W(A(p))},[S.activeIcon?(v(),R(A(ye),{key:0},{default:w(()=>[(v(),R(Tt(S.activeIcon)))]),_:1})):O("v-if",!0),!S.activeIcon&&S.activeText?(v(),$("span",{key:1,"aria-hidden":!A(y)},M(S.activeText),9,["aria-hidden"])):O("v-if",!0)],2)):O("v-if",!0)],10,["onClick"]))}});var Yge=Ye(Wge,[["__file","switch.vue"]]);const gd=jt(Yge),Y2=function(t){var e;return(e=t.target)==null?void 0:e.closest("td")},Gge=function(t,e,n,s,i){if(!e&&!s&&(!i||Array.isArray(i)&&!i.length))return t;typeof n=="string"?n=n==="descending"?-1:1:n=n&&n<0?-1:1;const o=s?null:function(a,l){return i?(Array.isArray(i)||(i=[i]),i.map(c=>typeof c=="string"?No(a,c):c(a,l,t))):(e!=="$key"&&Ct(a)&&"$value"in a&&(a=a.$value),[Ct(a)?No(a,e):a])},r=function(a,l){if(s)return s(a.value,l.value);for(let c=0,u=a.key.length;c<u;c++){if(a.key[c]<l.key[c])return-1;if(a.key[c]>l.key[c])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)},WR=function(t,e){let n=null;return t.columns.forEach(s=>{s.id===e&&(n=s)}),n},qge=function(t,e){let n=null;for(let s=0;s<t.columns.length;s++){const i=t.columns[s];if(i.columnKey===e){n=i;break}}return n||sr("ElTable",`No column matching with column-key: ${e}`),n},P$=function(t,e,n){const s=(e.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return s?WR(t,s[0]):null},ii=(t,e)=>{if(!t)throw new Error("Row is required when get row identity");if(typeof e=="string"){if(!e.includes("."))return`${t[e]}`;const n=e.split(".");let s=t;for(const i of n)s=s[i];return`${s}`}else if(typeof e=="function")return e.call(null,t)},fu=function(t,e){const n={};return(t||[]).forEach((s,i)=>{n[ii(s,e)]={row:s,index:i}}),n};function Xge(t,e){const n={};let s;for(s in t)n[s]=t[s];for(s in e)if(Rt(e,s)){const i=e[s];typeof i<"u"&&(n[s]=i)}return n}function y4(t){return t===""||t!==void 0&&(t=Number.parseInt(t,10),Number.isNaN(t)&&(t="")),t}function YR(t){return t===""||t!==void 0&&(t=y4(t),Number.isNaN(t)&&(t=80)),t}function Kge(t){return typeof t=="number"?t:typeof t=="string"?/^\d+(?:px)?$/.test(t)?Number.parseInt(t,10):t:null}function Zge(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...s)=>e(n(...s)))}function F_(t,e,n,s,i,o){let r=o??0,a=!1;const l=t.indexOf(e),c=l!==-1,u=i==null?void 0:i.call(null,e,o),d=f=>{f==="add"?t.push(e):t.splice(l,1),a=!0},h=f=>{let p=0;const m=(s==null?void 0:s.children)&&f[s.children];return m&&Le(m)&&(p+=m.length,m.forEach(b=>{p+=h(b)})),p};return(!i||u)&&(li(n)?n&&!c?d("add"):!n&&c&&d("remove"):d(c?"remove":"add")),!(s!=null&&s.checkStrictly)&&(s!=null&&s.children)&&Le(e[s.children])&&e[s.children].forEach(f=>{F_(t,f,n??!c,s,i,r+1),r+=h(f)+1}),a}function Jge(t,e,n="children",s="hasChildren"){const i=r=>!(Array.isArray(r)&&r.length);function o(r,a,l){e(r,a,l),a.forEach(c=>{if(c[s]){e(c,null,l+1);return}const u=c[n];i(u)||o(c,u,l+1)})}t.forEach(r=>{if(r[s]){e(r,null,0);return}const a=r[n];i(a)||o(r,a,0)})}let Po=null;function Qge(t,e,n,s){if((Po==null?void 0:Po.trigger)===n)return;Po==null||Po();const i=s==null?void 0:s.refs.tableWrapper,o=i==null?void 0:i.dataset.prefix,r={strategy:"fixed",...t.popperOptions},a=_(di,{content:e,virtualTriggering:!0,virtualRef:n,appendTo:i,placement:"top",transition:"none",offset:0,hideAfter:0,...t,popperOptions:r,onHide:()=>{Po==null||Po()}});a.appContext={...s.appContext,...s};const l=document.createElement("div");fc(a,l),a.component.exposed.onOpen();const c=i==null?void 0:i.querySelector(`.${o}-scrollbar__wrap`);Po=()=>{fc(null,l),c==null||c.removeEventListener("scroll",Po),Po=null},Po.trigger=n,c==null||c.addEventListener("scroll",Po)}function GR(t){return t.children?_se(t.children,GR):[t]}function I$(t,e){return t+e.colSpan}const qR=(t,e,n,s)=>{let i=0,o=t;const r=n.states.columns.value;if(s){const l=GR(s[t]);i=r.slice(0,r.indexOf(l[0])).reduce(I$,0),o=i+l.reduce(I$,0)-1}else i=t;let a;switch(e){case"left":o<n.states.fixedLeafColumnsLength.value&&(a="left");break;case"right":i>=r.length-n.states.rightFixedLeafColumnsLength.value&&(a="right");break;default:o<n.states.fixedLeafColumnsLength.value?a="left":i>=r.length-n.states.rightFixedLeafColumnsLength.value&&(a="right")}return a?{direction:a,start:i,after:o}:{}},b4=(t,e,n,s,i,o=0)=>{const r=[],{direction:a,start:l,after:c}=qR(e,n,s,i);if(a){const u=a==="left";r.push(`${t}-fixed-column--${a}`),u&&c+o===s.states.fixedLeafColumnsLength.value-1?r.push("is-last-column"):!u&&l-o===s.states.columns.value.length-s.states.rightFixedLeafColumnsLength.value&&r.push("is-first-column")}return r};function L$(t,e){return t+(e.realWidth===null||Number.isNaN(e.realWidth)?Number(e.width):e.realWidth)}const w4=(t,e,n,s)=>{const{direction:i,start:o=0,after:r=0}=qR(t,e,n,s);if(!i)return;const a={},l=i==="left",c=n.states.columns.value;return l?a.left=c.slice(0,o).reduce(L$,0):a.right=c.slice(r+1).reverse().reduce(L$,0),a},vf=(t,e)=>{t&&(Number.isNaN(t[e])||(t[e]=`${t[e]}px`))};function e1e(t){const e=pt(),n=J(!1),s=J([]);return{updateExpandRows:()=>{const l=t.data.value||[],c=t.rowKey.value;if(n.value)s.value=l.slice();else if(c){const u=fu(s.value,c);s.value=l.reduce((d,h)=>{const f=ii(h,c);return u[f]&&d.push(h),d},[])}else s.value=[]},toggleRowExpansion:(l,c)=>{F_(s.value,l,c)&&e.emit("expand-change",l,s.value.slice())},setExpandRowKeys:l=>{e.store.assertRowKey();const c=t.data.value||[],u=t.rowKey.value,d=fu(c,u);s.value=l.reduce((h,f)=>{const p=d[f];return p&&h.push(p.row),h},[])},isRowExpanded:l=>{const c=t.rowKey.value;return c?!!fu(s.value,c)[ii(l,c)]:s.value.includes(l)},states:{expandRows:s,defaultExpandAll:n}}}function t1e(t){const e=pt(),n=J(null),s=J(null),i=c=>{e.store.assertRowKey(),n.value=c,r(c)},o=()=>{n.value=null},r=c=>{const{data:u,rowKey:d}=t;let h=null;d.value&&(h=(A(u)||[]).find(f=>ii(f,d.value)===c)),s.value=h,e.emit("current-change",s.value,null)};return{setCurrentRowKey:i,restoreCurrentRowKey:o,setCurrentRowByKey:r,updateCurrentRow:c=>{const u=s.value;if(c&&c!==u){s.value=c,e.emit("current-change",s.value,u);return}!c&&u&&(s.value=null,e.emit("current-change",null,u))},updateCurrentRowData:()=>{const c=t.rowKey.value,u=t.data.value||[],d=s.value;if(!u.includes(d)&&d){if(c){const h=ii(d,c);r(h)}else s.value=null;s.value===null&&e.emit("current-change",null,d)}else n.value&&(r(n.value),o())},states:{_currentRowKey:n,currentRow:s}}}function n1e(t){const e=J([]),n=J({}),s=J(16),i=J(!1),o=J({}),r=J("hasChildren"),a=J("children"),l=J(!1),c=pt(),u=q(()=>{if(!t.rowKey.value)return{};const C=t.data.value||[];return h(C)}),d=q(()=>{const C=t.rowKey.value,k=Object.keys(o.value),x={};return k.length&&k.forEach(S=>{if(o.value[S].length){const E={children:[]};o.value[S].forEach(T=>{const P=ii(T,C);E.children.push(P),T[r.value]&&!x[P]&&(x[P]={children:[]})}),x[S]=E}}),x}),h=C=>{const k=t.rowKey.value,x={};return Jge(C,(S,E,T)=>{const P=ii(S,k);Array.isArray(E)?x[P]={children:E.map(I=>ii(I,k)),level:T}:i.value&&(x[P]={children:[],lazy:!0,level:T})},a.value,r.value),x},f=(C=!1,k=(x=>(x=c.store)==null?void 0:x.states.defaultExpandAll.value)())=>{var x;const S=u.value,E=d.value,T=Object.keys(S),P={};if(T.length){const I=A(n),L=[],V=(z,Y)=>{if(C)return e.value?k||e.value.includes(Y):!!(k||z!=null&&z.expanded);{const B=k||e.value&&e.value.includes(Y);return!!(z!=null&&z.expanded||B)}};T.forEach(z=>{const Y=I[z],B={...S[z]};if(B.expanded=V(Y,z),B.lazy){const{loaded:U=!1,loading:X=!1}=Y||{};B.loaded=!!U,B.loading=!!X,L.push(z)}P[z]=B});const D=Object.keys(E);i.value&&D.length&&L.length&&D.forEach(z=>{const Y=I[z],B=E[z].children;if(L.includes(z)){if(P[z].children.length!==0)throw new Error("[ElTable]children must be an empty array.");P[z].children=B}else{const{loaded:U=!1,loading:X=!1}=Y||{};P[z]={lazy:!0,loaded:!!U,loading:!!X,expanded:V(Y,z),children:B,level:""}}})}n.value=P,(x=c.store)==null||x.updateTableScrollY()};Te(()=>e.value,()=>{f(!0)}),Te(()=>u.value,()=>{f()}),Te(()=>d.value,()=>{f()});const p=C=>{e.value=C,f()},m=(C,k)=>{c.store.assertRowKey();const x=t.rowKey.value,S=ii(C,x),E=S&&n.value[S];if(S&&E&&"expanded"in E){const T=E.expanded;k=typeof k>"u"?!E.expanded:k,n.value[S].expanded=k,T!==k&&c.emit("expand-change",C,k),c.store.updateTableScrollY()}},b=C=>{c.store.assertRowKey();const k=t.rowKey.value,x=ii(C,k),S=n.value[x];i.value&&S&&"loaded"in S&&!S.loaded?y(C,x,S):m(C,void 0)},y=(C,k,x)=>{const{load:S}=c.props;S&&!n.value[k].loaded&&(n.value[k].loading=!0,S(C,x,E=>{if(!Array.isArray(E))throw new TypeError("[ElTable] data must be an array");n.value[k].loading=!1,n.value[k].loaded=!0,n.value[k].expanded=!0,E.length&&(o.value[k]=E),c.emit("expand-change",C,!0)}))};return{loadData:y,loadOrToggle:b,toggleTreeExpansion:m,updateTreeExpandKeys:p,updateTreeData:f,normalize:h,states:{expandRowKeys:e,treeData:n,indent:s,lazy:i,lazyTreeNodeMap:o,lazyColumnIdentifier:r,childrenColumnName:a,checkStrictly:l}}}const s1e=(t,e)=>{const n=e.sortingColumn;return!n||typeof n.sortable=="string"?t:Gge(t,e.sortProp,e.sortOrder,n.sortMethod,n.sortBy)},ev=t=>{const e=[];return t.forEach(n=>{n.children&&n.children.length>0?e.push.apply(e,ev(n.children)):e.push(n)}),e};function i1e(){var t;const e=pt(),{size:n}=yo((t=e.proxy)==null?void 0:t.$props),s=J(null),i=J([]),o=J([]),r=J(!1),a=J([]),l=J([]),c=J([]),u=J([]),d=J([]),h=J([]),f=J([]),p=J([]),m=[],b=J(0),y=J(0),C=J(0),k=J(!1),x=J([]),S=J(!1),E=J(!1),T=J(null),P=J({}),I=J(null),L=J(null),V=J(null),D=J(null),z=J(null);Te(i,()=>e.state&&X(!1),{deep:!0});const Y=()=>{if(!s.value)throw new Error("[ElTable] prop row-key is required")},B=Ne=>{var Qe;(Qe=Ne.children)==null||Qe.forEach(he=>{he.fixed=Ne.fixed,B(he)})},U=()=>{a.value.forEach(ve=>{B(ve)}),u.value=a.value.filter(ve=>ve.fixed===!0||ve.fixed==="left"),d.value=a.value.filter(ve=>ve.fixed==="right"),u.value.length>0&&a.value[0]&&a.value[0].type==="selection"&&!a.value[0].fixed&&(a.value[0].fixed=!0,u.value.unshift(a.value[0]));const Ne=a.value.filter(ve=>!ve.fixed);l.value=[].concat(u.value).concat(Ne).concat(d.value);const Qe=ev(Ne),he=ev(u.value),Ee=ev(d.value);b.value=Qe.length,y.value=he.length,C.value=Ee.length,c.value=[].concat(he).concat(Qe).concat(Ee),r.value=u.value.length>0||d.value.length>0},X=(Ne,Qe=!1)=>{Ne&&U(),Qe?e.state.doLayout():e.state.debouncedUpdateLayout()},K=Ne=>x.value.some(Qe=>mc(Qe,Ne)),N=()=>{k.value=!1;const Ne=x.value;x.value=[],Ne.length&&e.emit("selection-change",[])},F=()=>{let Ne;if(s.value){Ne=[];const Qe=fu(x.value,s.value),he=fu(i.value,s.value);for(const Ee in Qe)Rt(Qe,Ee)&&!he[Ee]&&Ne.push(Qe[Ee].row)}else Ne=x.value.filter(Qe=>!i.value.includes(Qe));if(Ne.length){const Qe=x.value.filter(he=>!Ne.includes(he));x.value=Qe,e.emit("selection-change",Qe.slice())}},Q=()=>(x.value||[]).slice(),ie=(Ne,Qe,he=!0)=>{var Ee,ve,We,Re;const Et={children:(ve=(Ee=e==null?void 0:e.store)==null?void 0:Ee.states)==null?void 0:ve.childrenColumnName.value,checkStrictly:(Re=(We=e==null?void 0:e.store)==null?void 0:We.states)==null?void 0:Re.checkStrictly.value};if(F_(x.value,Ne,Qe,Et)){const fe=(x.value||[]).slice();he&&e.emit("select",fe,Ne),e.emit("selection-change",fe)}},Z=()=>{var Ne,Qe;const he=E.value?!k.value:!(k.value||x.value.length);k.value=he;let Ee=!1,ve=0;const We=(Qe=(Ne=e==null?void 0:e.store)==null?void 0:Ne.states)==null?void 0:Qe.rowKey.value,{childrenColumnName:Re}=e.store.states,Et={children:Re.value,checkStrictly:!1};i.value.forEach((ln,fe)=>{const ct=fe+ve;F_(x.value,ln,he,Et,T.value,ct)&&(Ee=!0),ve+=we(ii(ln,We))}),Ee&&e.emit("selection-change",x.value?x.value.slice():[]),e.emit("select-all",(x.value||[]).slice())},me=()=>{const Ne=fu(x.value,s.value);i.value.forEach(Qe=>{const he=ii(Qe,s.value),Ee=Ne[he];Ee&&(x.value[Ee.index]=Qe)})},Se=()=>{var Ne;if(((Ne=i.value)==null?void 0:Ne.length)===0){k.value=!1;return}const{childrenColumnName:Qe}=e.store.states,he=s.value?fu(x.value,s.value):void 0;let Ee=0,ve=0;const We=ln=>he?!!he[ii(ln,s.value)]:x.value.includes(ln),Re=ln=>{var fe;for(const ct of ln){const Nt=T.value&&T.value.call(null,ct,Ee);if(We(ct))ve++;else if(!T.value||Nt)return!1;if(Ee++,(fe=ct[Qe.value])!=null&&fe.length&&!Re(ct[Qe.value]))return!1}return!0},Et=Re(i.value||[]);k.value=ve===0?!1:Et},we=Ne=>{var Qe;if(!e||!e.store)return 0;const{treeData:he}=e.store.states;let Ee=0;const ve=(Qe=he.value[Ne])==null?void 0:Qe.children;return ve&&(Ee+=ve.length,ve.forEach(We=>{Ee+=we(We)})),Ee},oe=(Ne,Qe)=>{Array.isArray(Ne)||(Ne=[Ne]);const he={};return Ne.forEach(Ee=>{P.value[Ee.id]=Qe,he[Ee.columnKey||Ee.id]=Qe}),he},ce=(Ne,Qe,he)=>{L.value&&L.value!==Ne&&(L.value.order=null),L.value=Ne,V.value=Qe,D.value=he},re=()=>{let Ne=A(o);Object.keys(P.value).forEach(Qe=>{const he=P.value[Qe];if(!he||he.length===0)return;const Ee=WR({columns:c.value},Qe);Ee&&Ee.filterMethod&&(Ne=Ne.filter(ve=>he.some(We=>Ee.filterMethod.call(null,We,ve,Ee))))}),I.value=Ne},ge=()=>{i.value=s1e(I.value,{sortingColumn:L.value,sortProp:V.value,sortOrder:D.value})},ze=(Ne=void 0)=>{Ne&&Ne.filter||re(),ge()},st=Ne=>{const{tableHeaderRef:Qe}=e.refs;if(!Qe)return;const he=Object.assign({},Qe.filterPanels),Ee=Object.keys(he);if(Ee.length)if(typeof Ne=="string"&&(Ne=[Ne]),Array.isArray(Ne)){const ve=Ne.map(We=>qge({columns:c.value},We));Ee.forEach(We=>{const Re=ve.find(Et=>Et.id===We);Re&&(Re.filteredValue=[])}),e.store.commit("filterChange",{column:ve,values:[],silent:!0,multi:!0})}else Ee.forEach(ve=>{const We=c.value.find(Re=>Re.id===ve);We&&(We.filteredValue=[])}),P.value={},e.store.commit("filterChange",{column:{},values:[],silent:!0})},ee=()=>{L.value&&(ce(null,null,null),e.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:ne,toggleRowExpansion:pe,updateExpandRows:Ae,states:Ce,isRowExpanded:Me}=e1e({data:i,rowKey:s}),{updateTreeExpandKeys:je,toggleTreeExpansion:Fe,updateTreeData:Ue,loadOrToggle:Oe,states:ht}=n1e({data:i,rowKey:s}),{updateCurrentRowData:Ie,updateCurrentRow:_e,setCurrentRowKey:le,states:ke}=t1e({data:i,rowKey:s});return{assertRowKey:Y,updateColumns:U,scheduleLayout:X,isSelected:K,clearSelection:N,cleanSelection:F,getSelectionRows:Q,toggleRowSelection:ie,_toggleAllSelection:Z,toggleAllSelection:null,updateSelectionByRowKey:me,updateAllSelected:Se,updateFilters:oe,updateCurrentRow:_e,updateSort:ce,execFilter:re,execSort:ge,execQuery:ze,clearFilter:st,clearSort:ee,toggleRowExpansion:pe,setExpandRowKeysAdapter:Ne=>{ne(Ne),je(Ne)},setCurrentRowKey:le,toggleRowExpansionAdapter:(Ne,Qe)=>{c.value.some(({type:Ee})=>Ee==="expand")?pe(Ne,Qe):Fe(Ne,Qe)},isRowExpanded:Me,updateExpandRows:Ae,updateCurrentRowData:Ie,loadOrToggle:Oe,updateTreeData:Ue,states:{tableSize:n,rowKey:s,data:i,_data:o,isComplex:r,_columns:a,originColumns:l,columns:c,fixedColumns:u,rightFixedColumns:d,leafColumns:h,fixedLeafColumns:f,rightFixedLeafColumns:p,updateOrderFns:m,leafColumnsLength:b,fixedLeafColumnsLength:y,rightFixedLeafColumnsLength:C,isAllSelected:k,selection:x,reserveSelection:S,selectOnIndeterminate:E,selectable:T,filters:P,filteredData:I,sortingColumn:L,sortProp:V,sortOrder:D,hoverRow:z,...Ce,...ht,...ke}}}function T6(t,e){return t.map(n=>{var s;return n.id===e.id?e:((s=n.children)!=null&&s.length&&(n.children=T6(n.children,e)),n)})}function P6(t){t.forEach(e=>{var n,s;e.no=(n=e.getColumnIndex)==null?void 0:n.call(e),(s=e.children)!=null&&s.length&&P6(e.children)}),t.sort((e,n)=>e.no-n.no)}function o1e(){const t=pt(),e=i1e();return{ns:He("table"),...e,mutations:{setData(r,a){const l=A(r._data)!==a;r.data.value=a,r._data.value=a,t.store.execQuery(),t.store.updateCurrentRowData(),t.store.updateExpandRows(),t.store.updateTreeData(t.store.states.defaultExpandAll.value),A(r.reserveSelection)?(t.store.assertRowKey(),t.store.updateSelectionByRowKey()):l?t.store.clearSelection():t.store.cleanSelection(),t.store.updateAllSelected(),t.$ready&&t.store.scheduleLayout()},insertColumn(r,a,l,c){const u=A(r._columns);let d=[];l?(l&&!l.children&&(l.children=[]),l.children.push(a),d=T6(u,l)):(u.push(a),d=u),P6(d),r._columns.value=d,r.updateOrderFns.push(c),a.type==="selection"&&(r.selectable.value=a.selectable,r.reserveSelection.value=a.reserveSelection),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},updateColumnOrder(r,a){var l;((l=a.getColumnIndex)==null?void 0:l.call(a))!==a.no&&(P6(r._columns.value),t.$ready&&t.store.updateColumns())},removeColumn(r,a,l,c){const u=A(r._columns)||[];if(l)l.children.splice(l.children.findIndex(h=>h.id===a.id),1),dt(()=>{var h;((h=l.children)==null?void 0:h.length)===0&&delete l.children}),r._columns.value=T6(u,l);else{const h=u.indexOf(a);h>-1&&(u.splice(h,1),r._columns.value=u)}const d=r.updateOrderFns.indexOf(c);d>-1&&r.updateOrderFns.splice(d,1),t.$ready&&(t.store.updateColumns(),t.store.scheduleLayout())},sort(r,a){const{prop:l,order:c,init:u}=a;if(l){const d=A(r.columns).find(h=>h.property===l);d&&(d.order=c,t.store.updateSort(d,l,c),t.store.commit("changeSortCondition",{init:u}))}},changeSortCondition(r,a){const{sortingColumn:l,sortProp:c,sortOrder:u}=r,d=A(l),h=A(c),f=A(u);f===null&&(r.sortingColumn.value=null,r.sortProp.value=null);const p={filter:!0};t.store.execQuery(p),(!a||!(a.silent||a.init))&&t.emit("sort-change",{column:d,prop:h,order:f}),t.store.updateTableScrollY()},filterChange(r,a){const{column:l,values:c,silent:u}=a,d=t.store.updateFilters(l,c);t.store.execQuery(),u||t.emit("filter-change",d),t.store.updateTableScrollY()},toggleAllSelection(){t.store.toggleAllSelection()},rowSelectedChanged(r,a){t.store.toggleRowSelection(a),t.store.updateAllSelected()},setHoverRow(r,a){r.hoverRow.value=a},setCurrentRow(r,a){t.store.updateCurrentRow(a)}},commit:function(r,...a){const l=t.store.mutations;if(l[r])l[r].apply(t,[t.store.states].concat(a));else throw new Error(`Action not found: ${r}`)},updateTableScrollY:function(){dt(()=>t.layout.updateScrollY.apply(t.layout))}}}const Cm={rowKey:"rowKey",defaultExpandAll:"defaultExpandAll",selectOnIndeterminate:"selectOnIndeterminate",indent:"indent",lazy:"lazy",data:"data","treeProps.hasChildren":{key:"lazyColumnIdentifier",default:"hasChildren"},"treeProps.children":{key:"childrenColumnName",default:"children"},"treeProps.checkStrictly":{key:"checkStrictly",default:!1}};function r1e(t,e){if(!t)throw new Error("Table is required.");const n=o1e();return n.toggleAllSelection=pc(n._toggleAllSelection,10),Object.keys(Cm).forEach(s=>{XR(KR(e,s),s,n)}),a1e(n,e),n}function a1e(t,e){Object.keys(Cm).forEach(n=>{Te(()=>KR(e,n),s=>{XR(s,n,t)})})}function XR(t,e,n){let s=t,i=Cm[e];typeof Cm[e]=="object"&&(i=i.key,s=s||Cm[e].default),n.states[i].value=s}function KR(t,e){if(e.includes(".")){const n=e.split(".");let s=t;return n.forEach(i=>{s=s[i]}),s}else return t[e]}class l1e{constructor(e){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 n in e)Rt(e,n)&&(hn(this[n])?this[n].value=e[n]:this[n]=e[n]);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(){if(this.height.value===null)return!1;const n=this.table.refs.scrollBarRef;if(this.table.vnode.el&&(n!=null&&n.wrapRef)){let s=!0;const i=this.scrollY.value;return s=n.wrapRef.scrollHeight>n.wrapRef.clientHeight,this.scrollY.value=s,i!==s}return!1}setHeight(e,n="height"){if(!Ut)return;const s=this.table.vnode.el;if(e=Kge(e),this.height.value=Number(e),!s&&(e||e===0))return dt(()=>this.setHeight(e,n));typeof e=="number"?(s.style[n]=`${e}px`,this.updateElsHeight()):typeof e=="string"&&(s.style[n]=e,this.updateElsHeight())}setMaxHeight(e){this.setHeight(e,"max-height")}getFlattenColumns(){const e=[];return this.table.store.states.columns.value.forEach(s=>{s.isColumnGroup?e.push.apply(e,s.columns):e.push(s)}),e}updateElsHeight(){this.updateScrollY(),this.notifyObservers("scrollable")}headerDisplayNone(e){if(!e)return!0;let n=e;for(;n.tagName!=="DIV";){if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}updateColumnsWidth(){if(!Ut)return;const e=this.fit,n=this.table.vnode.el.clientWidth;let s=0;const i=this.getFlattenColumns(),o=i.filter(l=>typeof l.width!="number");if(i.forEach(l=>{typeof l.width=="number"&&l.realWidth&&(l.realWidth=null)}),o.length>0&&e){if(i.forEach(l=>{s+=Number(l.width||l.minWidth||80)}),s<=n){this.scrollX.value=!1;const l=n-s;if(o.length===1)o[0].realWidth=Number(o[0].minWidth||80)+l;else{const c=o.reduce((h,f)=>h+Number(f.minWidth||80),0),u=l/c;let d=0;o.forEach((h,f)=>{if(f===0)return;const p=Math.floor(Number(h.minWidth||80)*u);d+=p,h.realWidth=Number(h.minWidth||80)+p}),o[0].realWidth=Number(o[0].minWidth||80)+l-d}}else this.scrollX.value=!0,o.forEach(l=>{l.realWidth=Number(l.minWidth)});this.bodyWidth.value=Math.max(s,n),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),s+=l.realWidth}),this.scrollX.value=s>n,this.bodyWidth.value=s;const r=this.store.states.fixedColumns.value;if(r.length>0){let l=0;r.forEach(c=>{l+=Number(c.realWidth||c.width)}),this.fixedWidth.value=l}const a=this.store.states.rightFixedColumns.value;if(a.length>0){let l=0;a.forEach(c=>{l+=Number(c.realWidth||c.width)}),this.rightFixedWidth.value=l}this.notifyObservers("columns")}addObserver(e){this.observers.push(e)}removeObserver(e){const n=this.observers.indexOf(e);n!==-1&&this.observers.splice(n,1)}notifyObservers(e){this.observers.forEach(s=>{var i,o;switch(e){case"columns":(i=s.state)==null||i.onColumnsChange(this);break;case"scrollable":(o=s.state)==null||o.onScrollableChange(this);break;default:throw new Error(`Table Layout don't have event ${e}.`)}})}}const{CheckboxGroup:c1e}=Ht,u1e=se({name:"ElTableFilterPanel",components:{ElCheckbox:Ht,ElCheckboxGroup:c1e,ElScrollbar:ui,ElTooltip:di,ElIcon:ye,ArrowDown:ud,ArrowUp:Xy},directives:{ClickOutside:mf},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function}},setup(t){const e=pt(),{t:n}=fn(),s=He("table-filter"),i=e==null?void 0:e.parent;i.filterPanels.value[t.column.id]||(i.filterPanels.value[t.column.id]=e);const o=J(!1),r=J(null),a=q(()=>t.column&&t.column.filters),l=q(()=>t.column.filterClassName?`${s.b()} ${t.column.filterClassName}`:s.b()),c=q({get:()=>{var S;return(((S=t.column)==null?void 0:S.filteredValue)||[])[0]},set:S=>{u.value&&(typeof S<"u"&&S!==null?u.value.splice(0,1,S):u.value.splice(0,1))}}),u=q({get(){return t.column?t.column.filteredValue||[]:[]},set(S){t.column&&t.upDataColumn("filteredValue",S)}}),d=q(()=>t.column?t.column.filterMultiple:!0),h=S=>S.value===c.value,f=()=>{o.value=!1},p=S=>{S.stopPropagation(),o.value=!o.value},m=()=>{o.value=!1},b=()=>{k(u.value),f()},y=()=>{u.value=[],k(u.value),f()},C=S=>{c.value=S,k(typeof S<"u"&&S!==null?u.value:[]),f()},k=S=>{t.store.commit("filterChange",{column:t.column,values:S}),t.store.updateAllSelected()};Te(o,S=>{t.column&&t.upDataColumn("filterOpened",S)},{immediate:!0});const x=q(()=>{var S,E;return(E=(S=r.value)==null?void 0:S.popperRef)==null?void 0:E.contentRef});return{tooltipVisible:o,multiple:d,filterClassName:l,filteredValue:u,filterValue:c,filters:a,handleConfirm:b,handleReset:y,handleSelect:C,isActive:h,t:n,ns:s,showFilterPanel:p,hideFilterPanel:m,popperPaneRef:x,tooltip:r}}});function d1e(t,e,n,s,i,o){const r=H("el-checkbox"),a=H("el-checkbox-group"),l=H("el-scrollbar"),c=H("arrow-up"),u=H("arrow-down"),d=H("el-icon"),h=H("el-tooltip"),f=_t("click-outside");return v(),R(h,{ref:"tooltip",visible:t.tooltipVisible,offset:0,placement:t.placement,"show-arrow":!1,"stop-popper-mouse-event":!1,teleported:"",effect:"light",pure:"","popper-class":t.filterClassName,persistent:""},{content:w(()=>[t.multiple?(v(),$("div",{key:0},[g("div",{class:W(t.ns.e("content"))},[_(l,{"wrap-class":t.ns.e("wrap")},{default:w(()=>[_(a,{modelValue:t.filteredValue,"onUpdate:modelValue":p=>t.filteredValue=p,class:W(t.ns.e("checkbox-group"))},{default:w(()=>[(v(!0),$(te,null,be(t.filters,p=>(v(),R(r,{key:p.value,value:p.value},{default:w(()=>[G(M(p.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue","class"])]),_:1},8,["wrap-class"])],2),g("div",{class:W(t.ns.e("bottom"))},[g("button",{class:W({[t.ns.is("disabled")]:t.filteredValue.length===0}),disabled:t.filteredValue.length===0,type:"button",onClick:t.handleConfirm},M(t.t("el.table.confirmFilter")),11,["disabled","onClick"]),g("button",{type:"button",onClick:t.handleReset},M(t.t("el.table.resetFilter")),9,["onClick"])],2)])):(v(),$("ul",{key:1,class:W(t.ns.e("list"))},[g("li",{class:W([t.ns.e("list-item"),{[t.ns.is("active")]:t.filterValue===void 0||t.filterValue===null}]),onClick:p=>t.handleSelect(null)},M(t.t("el.table.clearFilter")),11,["onClick"]),(v(!0),$(te,null,be(t.filters,p=>(v(),$("li",{key:p.value,class:W([t.ns.e("list-item"),t.ns.is("active",t.isActive(p))]),label:p.value,onClick:m=>t.handleSelect(p.value)},M(p.text),11,["label","onClick"]))),128))],2))]),default:w(()=>[Pe((v(),$("span",{class:W([`${t.ns.namespace.value}-table__column-filter-trigger`,`${t.ns.namespace.value}-none-outline`]),onClick:t.showFilterPanel},[_(d,null,{default:w(()=>[ae(t.$slots,"filter-icon",{},()=>[t.column.filterOpened?(v(),R(c,{key:0})):(v(),R(u,{key:1}))])]),_:3})],10,["onClick"])),[[f,t.hideFilterPanel,t.popperPaneRef]])]),_:3},8,["visible","placement","popper-class"])}var h1e=Ye(u1e,[["render",d1e],["__file","filter-panel.vue"]]);function ZR(t){const e=pt();rd(()=>{n.value.addObserver(e)}),Pt(()=>{s(n.value),i(n.value)}),ll(()=>{s(n.value),i(n.value)}),_a(()=>{n.value.removeObserver(e)});const n=q(()=>{const o=t.layout;if(!o)throw new Error("Can not find table layout.");return o}),s=o=>{var r;const a=((r=t.vnode.el)==null?void 0:r.querySelectorAll("colgroup > col"))||[];if(!a.length)return;const l=o.getFlattenColumns(),c={};l.forEach(u=>{c[u.id]=u});for(let u=0,d=a.length;u<d;u++){const h=a[u],f=h.getAttribute("name"),p=c[f];p&&h.setAttribute("width",p.realWidth||p.width)}},i=o=>{var r,a;const l=((r=t.vnode.el)==null?void 0:r.querySelectorAll("colgroup > col[name=gutter]"))||[];for(let u=0,d=l.length;u<d;u++)l[u].setAttribute("width",o.scrollY.value?o.gutterWidth:"0");const c=((a=t.vnode.el)==null?void 0:a.querySelectorAll("th.gutter"))||[];for(let u=0,d=c.length;u<d;u++){const h=c[u];h.style.width=o.scrollY.value?`${o.gutterWidth}px`:"0",h.style.display=o.scrollY.value?"":"none"}};return{tableLayout:n.value,onColumnsChange:s,onScrollableChange:i}}const Sa=Symbol("ElTable");function f1e(t,e){const n=pt(),s=qe(Sa),i=m=>{m.stopPropagation()},o=(m,b)=>{!b.filters&&b.sortable?p(m,b,!1):b.filterable&&!b.sortable&&i(m),s==null||s.emit("header-click",b,m)},r=(m,b)=>{s==null||s.emit("header-contextmenu",b,m)},a=J(null),l=J(!1),c=J({}),u=(m,b)=>{if(Ut&&!(b.children&&b.children.length>0)&&a.value&&t.border){l.value=!0;const y=s;e("set-drag-visible",!0);const k=(y==null?void 0:y.vnode.el).getBoundingClientRect().left,x=n.vnode.el.querySelector(`th.${b.id}`),S=x.getBoundingClientRect(),E=S.left-k+30;Wu(x,"noclick"),c.value={startMouseLeft:m.clientX,startLeft:S.right-k,startColumnLeft:S.left-k,tableLeft:k};const T=y==null?void 0:y.refs.resizeProxy;T.style.left=`${c.value.startLeft}px`,document.onselectstart=function(){return!1},document.ondragstart=function(){return!1};const P=L=>{const V=L.clientX-c.value.startMouseLeft,D=c.value.startLeft+V;T.style.left=`${Math.max(E,D)}px`},I=()=>{if(l.value){const{startColumnLeft:L,startLeft:V}=c.value,z=Number.parseInt(T.style.left,10)-L;b.width=b.realWidth=z,y==null||y.emit("header-dragend",b.width,V-L,b,m),requestAnimationFrame(()=>{t.store.scheduleLayout(!1,!0)}),document.body.style.cursor="",l.value=!1,a.value=null,c.value={},e("set-drag-visible",!1)}document.removeEventListener("mousemove",P),document.removeEventListener("mouseup",I),document.onselectstart=null,document.ondragstart=null,setTimeout(()=>{da(x,"noclick")},0)};document.addEventListener("mousemove",P),document.addEventListener("mouseup",I)}},d=(m,b)=>{if(b.children&&b.children.length>0)return;const y=m.target;if(!Yo(y))return;const C=y==null?void 0:y.closest("th");if(!(!b||!b.resizable)&&!l.value&&t.border){const k=C.getBoundingClientRect(),x=document.body.style;k.width>12&&k.right-m.pageX<8?(x.cursor="col-resize",mr(C,"is-sortable")&&(C.style.cursor="col-resize"),a.value=b):l.value||(x.cursor="",mr(C,"is-sortable")&&(C.style.cursor="pointer"),a.value=null)}},h=()=>{Ut&&(document.body.style.cursor="")},f=({order:m,sortOrders:b})=>{if(m==="")return b[0];const y=b.indexOf(m||null);return b[y>b.length-2?0:y+1]},p=(m,b,y)=>{var C;m.stopPropagation();const k=b.order===y?null:y||f(b),x=(C=m.target)==null?void 0:C.closest("th");if(x&&mr(x,"noclick")){da(x,"noclick");return}if(!b.sortable)return;const S=m.currentTarget;if(["ascending","descending"].some(L=>mr(S,L)&&!b.sortOrders.includes(L)))return;const E=t.store.states;let T=E.sortProp.value,P;const I=E.sortingColumn.value;(I!==b||I===b&&I.order===null)&&(I&&(I.order=null),E.sortingColumn.value=b,T=b.property),k?P=b.order=k:P=b.order=null,E.sortProp.value=T,E.sortOrder.value=P,s==null||s.store.commit("changeSortCondition")};return{handleHeaderClick:o,handleHeaderContextMenu:r,handleMouseDown:u,handleMouseMove:d,handleMouseOut:h,handleSortClick:p,handleFilterClick:i}}function p1e(t){const e=qe(Sa),n=He("table");return{getHeaderRowStyle:a=>{const l=e==null?void 0:e.props.headerRowStyle;return typeof l=="function"?l.call(null,{rowIndex:a}):l},getHeaderRowClass:a=>{const l=[],c=e==null?void 0:e.props.headerRowClassName;return typeof c=="string"?l.push(c):typeof c=="function"&&l.push(c.call(null,{rowIndex:a})),l.join(" ")},getHeaderCellStyle:(a,l,c,u)=>{var d;let h=(d=e==null?void 0:e.props.headerCellStyle)!=null?d:{};typeof h=="function"&&(h=h.call(null,{rowIndex:a,columnIndex:l,row:c,column:u}));const f=w4(l,u.fixed,t.store,c);return vf(f,"left"),vf(f,"right"),Object.assign({},h,f)},getHeaderCellClass:(a,l,c,u)=>{const d=b4(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 typeof f=="string"?h.push(f):typeof f=="function"&&h.push(f.call(null,{rowIndex:a,columnIndex:l,row:c,column:u})),h.push(n.e("cell")),h.filter(p=>!!p).join(" ")}}}const JR=t=>{const e=[];return t.forEach(n=>{n.children?(e.push(n),e.push.apply(e,JR(n.children))):e.push(n)}),e},QR=t=>{let e=1;const n=(o,r)=>{if(r&&(o.level=r.level+1,e<o.level&&(e=o.level)),o.children){let a=0;o.children.forEach(l=>{n(l,o),a+=l.colSpan}),o.colSpan=a}else o.colSpan=1};t.forEach(o=>{o.level=1,n(o,void 0)});const s=[];for(let o=0;o<e;o++)s.push([]);return JR(t).forEach(o=>{o.children?(o.rowSpan=1,o.children.forEach(r=>r.isSubColumn=!0)):o.rowSpan=e-o.level+1,s[o.level-1].push(o)}),s};function m1e(t){const e=qe(Sa),n=q(()=>QR(t.store.states.originColumns.value));return{isGroup:q(()=>{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 g1e=se({name:"ElTableHeader",components:{ElCheckbox:Ht},props:{fixed:{type:String,default:""},store:{required:!0,type:Object},border:Boolean,defaultSort:{type:Object,default:()=>({prop:"",order:""})}},setup(t,{emit:e}){const n=pt(),s=qe(Sa),i=He("table"),o=J({}),{onColumnsChange:r,onScrollableChange:a}=ZR(s);Pt(async()=>{await dt(),await dt();const{prop:E,order:T}=t.defaultSort;s==null||s.store.commit("sort",{prop:E,order:T,init:!0})});const{handleHeaderClick:l,handleHeaderContextMenu:c,handleMouseDown:u,handleMouseMove:d,handleMouseOut:h,handleSortClick:f,handleFilterClick:p}=f1e(t,e),{getHeaderRowStyle:m,getHeaderRowClass:b,getHeaderCellStyle:y,getHeaderCellClass:C}=p1e(t),{isGroup:k,toggleAllSelection:x,columnRows:S}=m1e(t);return n.state={onColumnsChange:r,onScrollableChange:a},n.filterPanels=o,{ns:i,filterPanels:o,onColumnsChange:r,onScrollableChange:a,columnRows:S,getHeaderRowClass:b,getHeaderRowStyle:m,getHeaderCellClass:C,getHeaderCellStyle:y,handleHeaderClick:l,handleHeaderContextMenu:c,handleMouseDown:u,handleMouseMove:d,handleMouseOut:h,handleSortClick:f,handleFilterClick:p,isGroup:k,toggleAllSelection:x}},render(){const{ns:t,isGroup:e,columnRows:n,getHeaderCellStyle:s,getHeaderCellClass:i,getHeaderRowClass:o,getHeaderRowStyle:r,handleHeaderClick:a,handleHeaderContextMenu:l,handleMouseDown:c,handleMouseMove:u,handleSortClick:d,handleMouseOut:h,store:f,$parent:p}=this;let m=1;return gt("thead",{class:{[t.is("group")]:e}},n.map((b,y)=>gt("tr",{class:o(y),key:y,style:r(y)},b.map((C,k)=>(C.rowSpan>m&&(m=C.rowSpan),gt("th",{class:i(y,k,b,C),colspan:C.colSpan,key:`${C.id}-thead`,rowspan:C.rowSpan,style:s(y,k,b,C),onClick:x=>{x.currentTarget.classList.contains("noclick")||a(x,C)},onContextmenu:x=>l(x,C),onMousedown:x=>c(x,C),onMousemove:x=>u(x,C),onMouseout:h},[gt("div",{class:["cell",C.filteredValue&&C.filteredValue.length>0?"highlight":""]},[C.renderHeader?C.renderHeader({column:C,$index:k,store:f,_self:p}):C.label,C.sortable&>("span",{onClick:x=>d(x,C),class:"caret-wrapper"},[gt("i",{onClick:x=>d(x,C,"ascending"),class:"sort-caret ascending"}),gt("i",{onClick:x=>d(x,C,"descending"),class:"sort-caret descending"})]),C.filterable&>(h1e,{store:f,placement:C.filterPlacement||"bottom-start",column:C,upDataColumn:(x,S)=>{C[x]=S}},{"filter-icon":()=>C.renderFilterIcon?C.renderFilterIcon({filterOpened:C.filterOpened}):null})])]))))))}});function G2(t,e,n=.03){return t-e>n}function v1e(t){const e=qe(Sa),n=J(""),s=J(gt("div")),i=(p,m,b)=>{var y;const C=e,k=Y2(p);let x;const S=(y=C==null?void 0:C.vnode.el)==null?void 0:y.dataset.prefix;k&&(x=P$({columns:t.store.states.columns.value},k,S),x&&(C==null||C.emit(`cell-${b}`,m,x,k,p))),C==null||C.emit(`row-${b}`,m,x,p)},o=(p,m)=>{i(p,m,"dblclick")},r=(p,m)=>{t.store.commit("setCurrentRow",m),i(p,m,"click")},a=(p,m)=>{i(p,m,"contextmenu")},l=pc(p=>{t.store.commit("setHoverRow",p)},30),c=pc(()=>{t.store.commit("setHoverRow",null)},30),u=p=>{const m=window.getComputedStyle(p,null),b=Number.parseInt(m.paddingLeft,10)||0,y=Number.parseInt(m.paddingRight,10)||0,C=Number.parseInt(m.paddingTop,10)||0,k=Number.parseInt(m.paddingBottom,10)||0;return{left:b,right:y,top:C,bottom:k}},d=(p,m,b)=>{let y=m.target.parentNode;for(;p>1&&(y=y==null?void 0:y.nextSibling,!(!y||y.nodeName!=="TR"));)b(y,"hover-row hover-fixed-row"),p--};return{handleDoubleClick:o,handleClick:r,handleContextMenu:a,handleMouseEnter:l,handleMouseLeave:c,handleCellMouseEnter:(p,m,b)=>{var y;const C=e,k=Y2(p),x=(y=C==null?void 0:C.vnode.el)==null?void 0:y.dataset.prefix;if(k){const X=P$({columns:t.store.states.columns.value},k,x);k.rowSpan>1&&d(k.rowSpan,p,Wu);const K=C.hoverState={cell:k,column:X,row:m};C==null||C.emit("cell-mouse-enter",K.row,K.column,K.cell,p)}if(!b)return;const S=p.target.querySelector(".cell");if(!(mr(S,`${x}-tooltip`)&&S.childNodes.length))return;const E=document.createRange();E.setStart(S,0),E.setEnd(S,S.childNodes.length);const{width:T,height:P}=E.getBoundingClientRect(),{width:I,height:L}=S.getBoundingClientRect(),{top:V,left:D,right:z,bottom:Y}=u(S),B=D+z,U=V+Y;(G2(T+B,I)||G2(P+U,L)||G2(S.scrollWidth,I))&&Qge(b,k.innerText||k.textContent,k,C)},handleCellMouseLeave:p=>{const m=Y2(p);if(!m)return;m.rowSpan>1&&d(m.rowSpan,p,da);const b=e==null?void 0:e.hoverState;e==null||e.emit("cell-mouse-leave",b==null?void 0:b.row,b==null?void 0:b.column,b==null?void 0:b.cell,p)},tooltipContent:n,tooltipTrigger:s}}function _1e(t){const e=qe(Sa),n=He("table");return{getRowStyle:(c,u)=>{const d=e==null?void 0:e.props.rowStyle;return typeof d=="function"?d.call(null,{row:c,rowIndex:u}):d||null},getRowClass:(c,u)=>{const d=[n.e("row")];e!=null&&e.props.highlightCurrentRow&&c===t.store.states.currentRow.value&&d.push("current-row"),t.stripe&&u%2===1&&d.push(n.em("row","striped"));const h=e==null?void 0:e.props.rowClassName;return typeof h=="string"?d.push(h):typeof h=="function"&&d.push(h.call(null,{row:c,rowIndex:u})),d},getCellStyle:(c,u,d,h)=>{const f=e==null?void 0:e.props.cellStyle;let p=f??{};typeof f=="function"&&(p=f.call(null,{rowIndex:c,columnIndex:u,row:d,column:h}));const m=w4(u,t==null?void 0:t.fixed,t.store);return vf(m,"left"),vf(m,"right"),Object.assign({},p,m)},getCellClass:(c,u,d,h,f)=>{const p=b4(n.b(),u,t==null?void 0:t.fixed,t.store,void 0,f),m=[h.id,h.align,h.className,...p],b=e==null?void 0:e.props.cellClassName;return typeof b=="string"?m.push(b):typeof b=="function"&&m.push(b.call(null,{rowIndex:c,columnIndex:u,row:d,column:h})),m.push(n.e("cell")),m.filter(y=>!!y).join(" ")},getSpan:(c,u,d,h)=>{let f=1,p=1;const m=e==null?void 0:e.props.spanMethod;if(typeof m=="function"){const b=m({row:c,column:u,rowIndex:d,columnIndex:h});Array.isArray(b)?(f=b[0],p=b[1]):typeof b=="object"&&(f=b.rowspan,p=b.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))}}}function y1e(t){const e=qe(Sa),n=He("table"),{handleDoubleClick:s,handleClick:i,handleContextMenu:o,handleMouseEnter:r,handleMouseLeave:a,handleCellMouseEnter:l,handleCellMouseLeave:c,tooltipContent:u,tooltipTrigger:d}=v1e(t),{getRowStyle:h,getRowClass:f,getCellStyle:p,getCellClass:m,getSpan:b,getColspanRealWidth:y}=_1e(t),C=q(()=>t.store.states.columns.value.findIndex(({type:T})=>T==="default")),k=(T,P)=>{const I=e.props.rowKey;return I?ii(T,I):P},x=(T,P,I,L=!1)=>{const{tooltipEffect:V,tooltipOptions:D,store:z}=t,{indent:Y,columns:B}=z.states,U=f(T,P);let X=!0;return I&&(U.push(n.em("row",`level-${I.level}`)),X=I.display),gt("tr",{style:[X?null:{display:"none"},h(T,P)],class:U,key:k(T,P),onDblclick:N=>s(N,T),onClick:N=>i(N,T),onContextmenu:N=>o(N,T),onMouseenter:()=>r(P),onMouseleave:a},B.value.map((N,F)=>{const{rowspan:Q,colspan:ie}=b(T,N,P,F);if(!Q||!ie)return null;const Z=Object.assign({},N);Z.realWidth=y(B.value,ie,F);const me={store:t.store,_self:t.context||e,column:Z,row:T,$index:P,cellIndex:F,expanded:L};F===C.value&&I&&(me.treeNode={indent:I.level*Y.value,level:I.level},typeof I.expanded=="boolean"&&(me.treeNode.expanded=I.expanded,"loading"in I&&(me.treeNode.loading=I.loading),"noLazyChildren"in I&&(me.treeNode.noLazyChildren=I.noLazyChildren)));const Se=`${k(T,P)},${F}`,we=Z.columnKey||Z.rawColumnKey||"",oe=S(F,N,me),ce=N.showOverflowTooltip&&bse({effect:V},D,N.showOverflowTooltip);return gt("td",{style:p(P,F,T,N),class:m(P,F,T,N,ie-1),key:`${we}${Se}`,rowspan:Q,colspan:ie,onMouseenter:re=>l(re,T,ce),onMouseleave:c},[oe])}))},S=(T,P,I)=>P.renderCell(I);return{wrappedRowRender:(T,P)=>{const I=t.store,{isRowExpanded:L,assertRowKey:V}=I,{treeData:D,lazyTreeNodeMap:z,childrenColumnName:Y,rowKey:B}=I.states,U=I.states.columns.value;if(U.some(({type:K})=>K==="expand")){const K=L(T),N=x(T,P,void 0,K),F=e.renderExpanded;return K?F?[[N,gt("tr",{key:`expanded-row__${N.key}`},[gt("td",{colspan:U.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[F({row:T,$index:P,store:I,expanded:K})])])]]:(console.error("[Element Error]renderExpanded is required."),N):[[N]]}else if(Object.keys(D.value).length){V();const K=ii(T,B.value);let N=D.value[K],F=null;N&&(F={expanded:N.expanded,level:N.level,display:!0},typeof N.lazy=="boolean"&&(typeof N.loaded=="boolean"&&N.loaded&&(F.noLazyChildren=!(N.children&&N.children.length)),F.loading=N.loading));const Q=[x(T,P,F)];if(N){let ie=0;const Z=(Se,we)=>{Se&&Se.length&&we&&Se.forEach(oe=>{const ce={display:we.display&&we.expanded,level:we.level+1,expanded:!1,noLazyChildren:!1,loading:!1},re=ii(oe,B.value);if(re==null)throw new Error("For nested data item, row-key is required.");if(N={...D.value[re]},N&&(ce.expanded=N.expanded,N.level=N.level||ce.level,N.display=!!(N.expanded&&ce.display),typeof N.lazy=="boolean"&&(typeof N.loaded=="boolean"&&N.loaded&&(ce.noLazyChildren=!(N.children&&N.children.length)),ce.loading=N.loading)),ie++,Q.push(x(oe,P+ie,ce)),N){const ge=z.value[re]||oe[Y.value];Z(ge,N)}})};N.display=!0;const me=z.value[K]||T[Y.value];Z(me,N)}return Q}else return x(T,P,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=se({name:"ElTableBody",props:b1e,setup(t){const e=pt(),n=qe(Sa),s=He("table"),{wrappedRowRender:i,tooltipContent:o,tooltipTrigger:r}=y1e(t),{onColumnsChange:a,onScrollableChange:l}=ZR(n),c=[];return Te(t.store.states.hoverRow,(u,d)=>{var h;const f=e==null?void 0:e.vnode.el,p=Array.from((f==null?void 0:f.children)||[]).filter(y=>y==null?void 0:y.classList.contains(`${s.e("row")}`));let m=u;const b=(h=p[m])==null?void 0:h.childNodes;if(b!=null&&b.length){let y=0;Array.from(b).reduce((k,x,S)=>{var E,T;return((E=b[S])==null?void 0:E.colSpan)>1&&(y=(T=b[S])==null?void 0:T.colSpan),x.nodeName!=="TD"&&y===0&&k.push(S),y>0&&y--,k},[]).forEach(k=>{var x;for(m=u;m>0;){const S=(x=p[m-1])==null?void 0:x.childNodes;if(S[k]&&S[k].nodeName==="TD"&&S[k].rowSpan>1){Wu(S[k],"hover-cell"),c.push(S[k]);break}m--}})}else c.forEach(y=>da(y,"hover-cell")),c.length=0;!t.store.states.isComplex.value||!Ut||Ase(()=>{const y=p[d],C=p[u];y&&!y.classList.contains("hover-fixed-row")&&da(y,"hover-row"),C&&Wu(C,"hover-row")})}),_a(()=>{var u;(u=Po)==null||u()}),{ns:s,onColumnsChange:a,onScrollableChange:l,wrappedRowRender:i,tooltipContent:o,tooltipTrigger:r}},render(){const{wrappedRowRender:t,store:e}=this,n=e.states.data.value||[];return gt("tbody",{tabIndex:-1},[n.reduce((s,i)=>s.concat(t(i,s.length)),[])])}});function C1e(){const t=qe(Sa),e=t==null?void 0:t.store,n=q(()=>e.states.fixedLeafColumnsLength.value),s=q(()=>e.states.rightFixedColumns.value.length),i=q(()=>e.states.columns.value.length),o=q(()=>e.states.fixedColumns.value.length),r=q(()=>e.states.rightFixedColumns.value.length);return{leftFixedLeafCount:n,rightFixedLeafCount:s,columnsCount:i,leftFixedCount:o,rightFixedCount:r,columns:e.states.columns}}function k1e(t){const{columns:e}=C1e(),n=He("table");return{getCellClasses:(o,r)=>{const a=o[r],l=[n.e("cell"),a.id,a.align,a.labelClassName,...b4(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=w4(r,o.fixed,t.store);return vf(a,"left"),vf(a,"right"),a},columns:e}}var x1e=se({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{getCellClasses:e,getCellStyles:n,columns:s}=k1e(t);return{ns:He("table"),getCellClasses:e,getCellStyles:n,columns:s}},render(){const{columns:t,getCellStyles:e,getCellClasses:n,summaryMethod:s,sumText:i}=this,o=this.store.states.data.value;let r=[];return s?r=s({columns:t,data:o}):t.forEach((a,l)=>{if(l===0){r[l]=i;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)}),gt(gt("tfoot",[gt("tr",{},[...t.map((a,l)=>gt("td",{key:l,colspan:a.colSpan,rowspan:a.rowSpan,class:n(t,l),style:e(a,l)},[gt("div",{class:["cell",a.labelClassName]},[r[l]])]))])]))}});function S1e(t){return{setCurrentRow:u=>{t.commit("setCurrentRow",u)},getSelectionRows:()=>t.getSelectionRows(),toggleRowSelection:(u,d)=>{t.toggleRowSelection(u,d,!1),t.updateAllSelected()},clearSelection:()=>{t.clearSelection()},clearFilter:u=>{t.clearFilter(u)},toggleAllSelection:()=>{t.commit("toggleAllSelection")},toggleRowExpansion:(u,d)=>{t.toggleRowExpansionAdapter(u,d)},clearSort:()=>{t.clearSort()},sort:(u,d)=>{t.commit("sort",{prop:u,order:d})}}}function $1e(t,e,n,s){const i=J(!1),o=J(null),r=J(!1),a=N=>{r.value=N},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),b=J(0);br(()=>{e.setHeight(t.height)}),br(()=>{e.setMaxHeight(t.maxHeight)}),Te(()=>[t.currentRowKey,n.states.rowKey],([N,F])=>{!A(F)||!A(N)||n.setCurrentRowKey(`${N}`)},{immediate:!0}),Te(()=>t.data,N=>{s.store.commit("setData",N)},{immediate:!0,deep:!0}),br(()=>{t.expandRowKeys&&n.setExpandRowKeysAdapter(t.expandRowKeys)});const y=()=>{s.store.commit("setHoverRow",null),s.hoverState&&(s.hoverState=null)},C=(N,F)=>{const{pixelX:Q,pixelY:ie}=F;Math.abs(Q)>=Math.abs(ie)&&(s.refs.bodyWrapper.scrollLeft+=F.pixelX/5)},k=q(()=>t.height||t.maxHeight||n.states.fixedColumns.value.length>0||n.states.rightFixedColumns.value.length>0),x=q(()=>({width:e.bodyWidth.value?`${e.bodyWidth.value}px`:""})),S=()=>{k.value&&e.updateElsHeight(),e.updateColumnsWidth(),requestAnimationFrame(I)};Pt(async()=>{await dt(),n.updateColumns(),L(),requestAnimationFrame(S);const N=s.vnode.el,F=s.refs.headerWrapper;t.flexible&&N&&N.parentElement&&(N.parentElement.style.minWidth="0"),l.value={width:d.value=N.offsetWidth,height:N.offsetHeight,headerHeight:t.showHeader&&F?F.offsetHeight:null},n.states.columns.value.forEach(Q=>{Q.filteredValue&&Q.filteredValue.length&&s.store.commit("filterChange",{column:Q,values:Q.filteredValue,silent:!0})}),s.$ready=!0});const E=(N,F)=>{if(!N)return;const Q=Array.from(N.classList).filter(ie=>!ie.startsWith("is-scrolling-"));Q.push(e.scrollX.value?F:"is-scrolling-none"),N.className=Q.join(" ")},T=N=>{const{tableWrapper:F}=s.refs;E(F,N)},P=N=>{const{tableWrapper:F}=s.refs;return!!(F&&F.classList.contains(N))},I=function(){if(!s.refs.scrollBarRef)return;if(!e.scrollX.value){const we="is-scrolling-none";P(we)||T(we);return}const N=s.refs.scrollBarRef.wrapRef;if(!N)return;const{scrollLeft:F,offsetWidth:Q,scrollWidth:ie}=N,{headerWrapper:Z,footerWrapper:me}=s.refs;Z&&(Z.scrollLeft=F),me&&(me.scrollLeft=F);const Se=ie-Q-1;F>=Se?T("is-scrolling-right"):T(F===0?"is-scrolling-left":"is-scrolling-middle")},L=()=>{s.refs.scrollBarRef&&(s.refs.scrollBarRef.wrapRef&&is(s.refs.scrollBarRef.wrapRef,"scroll",I,{passive:!0}),t.fit?bi(s.vnode.el,V):is(window,"resize",V),bi(s.refs.bodyWrapper,()=>{var N,F;V(),(F=(N=s.refs)==null?void 0:N.scrollBarRef)==null||F.update()}))},V=()=>{var N,F,Q,ie;const Z=s.vnode.el;if(!s.$ready||!Z)return;let me=!1;const{width:Se,height:we,headerHeight:oe}=l.value,ce=d.value=Z.offsetWidth;Se!==ce&&(me=!0);const re=Z.offsetHeight;(t.height||k.value)&&we!==re&&(me=!0);const ge=t.tableLayout==="fixed"?s.refs.headerWrapper:(N=s.refs.tableHeaderRef)==null?void 0:N.$el;t.showHeader&&(ge==null?void 0:ge.offsetHeight)!==oe&&(me=!0),h.value=((F=s.refs.tableWrapper)==null?void 0:F.scrollHeight)||0,p.value=(ge==null?void 0:ge.scrollHeight)||0,m.value=((Q=s.refs.footerWrapper)==null?void 0:Q.offsetHeight)||0,b.value=((ie=s.refs.appendWrapper)==null?void 0:ie.offsetHeight)||0,f.value=h.value-p.value-m.value-b.value,me&&(l.value={width:ce,height:re,headerHeight:t.showHeader&&(ge==null?void 0:ge.offsetHeight)||0},S())},D=Mi(),z=q(()=>{const{bodyWidth:N,scrollY:F,gutterWidth:Q}=e;return N.value?`${N.value-(F.value?Q:0)}px`:""}),Y=q(()=>t.maxHeight?"fixed":t.tableLayout),B=q(()=>{if(t.data&&t.data.length)return null;let N="100%";t.height&&f.value&&(N=`${f.value}px`);const F=d.value;return{width:F?`${F}px`:"",height:N}}),U=q(()=>t.height?{height:Number.isNaN(Number(t.height))?t.height:`${t.height}px`}:t.maxHeight?{maxHeight:Number.isNaN(Number(t.maxHeight))?t.maxHeight:`${t.maxHeight}px`}:{}),X=q(()=>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`}:{});return{isHidden:i,renderExpanded:o,setDragVisible:a,isGroup:c,handleMouseLeave:y,handleHeaderFooterMousewheel:C,tableSize:D,emptyBlockStyle:B,handleFixedMousewheel:(N,F)=>{const Q=s.refs.bodyWrapper;if(Math.abs(F.spinY)>0){const ie=Q.scrollTop;F.pixelY<0&&ie!==0&&N.preventDefault(),F.pixelY>0&&Q.scrollHeight-Q.clientHeight>ie&&N.preventDefault(),Q.scrollTop+=Math.ceil(F.pixelY/5)}else Q.scrollLeft+=Math.ceil(F.pixelX/5)},resizeProxyVisible:r,bodyWidth:z,resizeState:l,doLayout:S,tableBodyStyles:x,tableLayout:Y,scrollbarViewStyle:u,tableInnerStyle:U,scrollbarStyle:X}}function A1e(t){const e=J(),n=()=>{const i=t.vnode.el.querySelector(".hidden-columns"),o={childList:!0,subtree:!0},r=t.store.states.updateOrderFns;e.value=new MutationObserver(()=>{r.forEach(a=>a())}),e.value.observe(i,o)};Pt(()=>{n()}),_a(()=>{var s;(s=e.value)==null||s.disconnect()})}var M1e={data:{type:Array,default:()=>[]},size:Ji,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,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:Object,default:()=>({})},className:{type:String,default:""},tableLayout:{type:String,default:"fixed"},scrollbarAlwaysOn:Boolean,flexible:Boolean,showOverflowTooltip:[Boolean,Object]};function eV(t){const e=t.tableLayout==="auto";let n=t.columns||[];e&&n.every(i=>i.width===void 0)&&(n=[]);const s=i=>{const o={key:`${t.tableLayout}_${i.id}`,style:{},name:void 0};return e?o.style={width:`${i.width}px`}:o.name=i.id,o};return gt("colgroup",{},n.map(i=>gt("col",s(i))))}eV.props=["columns","tableLayout"];const E1e=()=>{const t=J(),e=(o,r)=>{const a=t.value;a&&a.scrollTo(o,r)},n=(o,r)=>{const a=t.value;a&&xt(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;const P1e=se({name:"ElTable",directives:{Mousewheel:kde},components:{TableHeader:g1e,TableBody:w1e,TableFooter:x1e,ElScrollbar:ui,hColgroup:eV},props:M1e,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"],setup(t){const{t:e}=fn(),n=He("table"),s=pt();It(Sa,s);const i=r1e(s,t);s.store=i;const o=new l1e({store:s.store,table:s,fit:t.fit,showHeader:t.showHeader});s.layout=o;const r=q(()=>(i.states.data.value||[]).length===0),{setCurrentRow:a,getSelectionRows:l,toggleRowSelection:c,clearSelection:u,clearFilter:d,toggleAllSelection:h,toggleRowExpansion:f,clearSort:p,sort:m}=S1e(i),{isHidden:b,renderExpanded:y,setDragVisible:C,isGroup:k,handleMouseLeave:x,handleHeaderFooterMousewheel:S,tableSize:E,emptyBlockStyle:T,handleFixedMousewheel:P,resizeProxyVisible:I,bodyWidth:L,resizeState:V,doLayout:D,tableBodyStyles:z,tableLayout:Y,scrollbarViewStyle:B,tableInnerStyle:U,scrollbarStyle:X}=$1e(t,o,i,s),{scrollBarRef:K,scrollTo:N,setScrollLeft:F,setScrollTop:Q}=E1e(),ie=pc(D,50),Z=`${n.namespace.value}-table_${T1e++}`;s.tableId=Z,s.state={isGroup:k,resizeState:V,doLayout:D,debouncedUpdateLayout:ie};const me=q(()=>{var oe;return(oe=t.sumText)!=null?oe:e("el.table.sumText")}),Se=q(()=>{var oe;return(oe=t.emptyText)!=null?oe:e("el.table.emptyText")}),we=q(()=>QR(i.states.originColumns.value)[0]);return A1e(s),{ns:n,layout:o,store:i,columns:we,handleHeaderFooterMousewheel:S,handleMouseLeave:x,tableId:Z,tableSize:E,isHidden:b,isEmpty:r,renderExpanded:y,resizeProxyVisible:I,resizeState:V,isGroup:k,bodyWidth:L,tableBodyStyles:z,emptyBlockStyle:T,debouncedUpdateLayout:ie,handleFixedMousewheel:P,setCurrentRow:a,getSelectionRows:l,toggleRowSelection:c,clearSelection:u,clearFilter:d,toggleAllSelection:h,toggleRowExpansion:f,clearSort:p,doLayout:D,sort:m,t:e,setDragVisible:C,context:s,computedSumText:me,computedEmptyText:Se,tableLayout:Y,scrollbarViewStyle:B,tableInnerStyle:U,scrollbarStyle:X,scrollBarRef:K,scrollTo:N,setScrollLeft:F,setScrollTop:Q}}});function I1e(t,e,n,s,i,o){const r=H("hColgroup"),a=H("table-header"),l=H("table-body"),c=H("table-footer"),u=H("el-scrollbar"),d=_t("mousewheel");return v(),$("div",{ref:"tableWrapper",class:W([{[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:Ke(t.style),"data-prefix":t.ns.namespace.value,onMouseleave:t.handleMouseLeave},[g("div",{class:W(t.ns.e("inner-wrapper")),style:Ke(t.tableInnerStyle)},[g("div",{ref:"hiddenColumns",class:"hidden-columns"},[ae(t.$slots,"default")],512),t.showHeader&&t.tableLayout==="fixed"?Pe((v(),$("div",{key:0,ref:"headerWrapper",class:W(t.ns.e("header-wrapper"))},[g("table",{ref:"tableHeader",class:W(t.ns.e("header")),style:Ke(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,onSetDragVisible:t.setDragVisible},null,8,["border","default-sort","store","onSetDragVisible"])],6)],2)),[[d,t.handleHeaderFooterMousewheel]]):O("v-if",!0),g("div",{ref:"bodyWrapper",class:W(t.ns.e("body-wrapper"))},[_(u,{ref:"scrollBarRef","view-style":t.scrollbarViewStyle,"wrap-style":t.scrollbarStyle,always:t.scrollbarAlwaysOn},{default:w(()=>[g("table",{ref:"tableBody",class:W(t.ns.e("body")),cellspacing:"0",cellpadding:"0",border:"0",style:Ke({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(),R(a,{key:0,ref:"tableHeaderRef",class:W(t.ns.e("body-header")),border:t.border,"default-sort":t.defaultSort,store:t.store,onSetDragVisible:t.setDragVisible},null,8,["class","border","default-sort","store","onSetDragVisible"])):O("v-if",!0),_(l,{context:t.context,highlight:t.highlightCurrentRow,"row-class-name":t.rowClassName,"tooltip-effect":t.tooltipEffect,"tooltip-options":t.tooltipOptions,"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(),R(c,{key:1,class:W(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(),$("div",{key:0,ref:"emptyBlock",style:Ke(t.emptyBlockStyle),class:W(t.ns.e("empty-block"))},[g("span",{class:W(t.ns.e("empty-text"))},[ae(t.$slots,"empty",{},()=>[G(M(t.computedEmptyText),1)])],2)],6)):O("v-if",!0),t.$slots.append?(v(),$("div",{key:1,ref:"appendWrapper",class:W(t.ns.e("append-wrapper"))},[ae(t.$slots,"append")],2)):O("v-if",!0)]),_:3},8,["view-style","wrap-style","always"])],2),t.showSummary&&t.tableLayout==="fixed"?Pe((v(),$("div",{key:1,ref:"footerWrapper",class:W(t.ns.e("footer-wrapper"))},[g("table",{class:W(t.ns.e("footer")),cellspacing:"0",cellpadding:"0",border:"0",style:Ke(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)),[[Xt,!t.isEmpty],[d,t.handleHeaderFooterMousewheel]]):O("v-if",!0),t.border||t.isGroup?(v(),$("div",{key:2,class:W(t.ns.e("border-left-patch"))},null,2)):O("v-if",!0)],6),Pe(g("div",{ref:"resizeProxy",class:W(t.ns.e("column-resize-proxy"))},null,2),[[Xt,t.resizeProxyVisible]])],46,["data-prefix","onMouseleave"])}var L1e=Ye(P1e,[["render",I1e],["__file","table.vue"]]);const O1e={selection:"table-column--selection",expand:"table__expand-column"},D1e={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:""}},R1e=t=>O1e[t]||"",V1e={selection:{renderHeader({store:t,column:e}){function n(){return t.states.data.value&&t.states.data.value.length===0}return gt(Ht,{disabled:n(),size:t.states.tableSize.value,indeterminate:t.states.selection.value.length>0&&!t.states.isAllSelected.value,"onUpdate:modelValue":t.toggleAllSelection,modelValue:t.states.isAllSelected.value,ariaLabel:e.label})},renderCell({row:t,column:e,store:n,$index:s}){return gt(Ht,{disabled:e.selectable?!e.selectable.call(null,t,s):!1,size:n.states.tableSize.value,onChange:()=>{n.commit("rowSelectedChanged",t)},onClick:i=>i.stopPropagation(),modelValue:n.isSelected(t),ariaLabel:e.label})},sortable:!1,resizable:!1},index:{renderHeader({column:t}){return t.label||"#"},renderCell({column:t,$index:e}){let n=e+1;const s=t.index;return typeof s=="number"?n=e+s:typeof s=="function"&&(n=s(e)),gt("div",{},[n])},sortable:!1},expand:{renderHeader({column:t}){return t.label||""},renderCell({row:t,store:e,expanded:n}){const{ns:s}=e,i=[s.e("expand-icon")];return n&&i.push(s.em("expand-icon","expanded")),gt("div",{class:i,onClick:function(r){r.stopPropagation(),e.toggleRowExpansion(t)}},{default:()=>[gt(ye,null,{default:()=>[gt(kr)]})]})},sortable:!1,resizable:!1}};function F1e({row:t,column:e,$index:n}){var s;const i=e.property,o=i&&j0(t,i).value;return e&&e.formatter?e.formatter(t,e,o,n):((s=o==null?void 0:o.toString)==null?void 0:s.call(o))||""}function N1e({row:t,treeNode:e,store:n},s=!1){const{ns:i}=n;if(!e)return s?[gt("span",{class:i.e("placeholder")})]:null;const o=[],r=function(a){a.stopPropagation(),!e.loading&&n.loadOrToggle(t)};if(e.indent&&o.push(gt("span",{class:i.e("indent"),style:{"padding-left":`${e.indent}px`}})),typeof e.expanded=="boolean"&&!e.noLazyChildren){const a=[i.e("expand-icon"),e.expanded?i.em("expand-icon","expanded"):""];let l=kr;e.loading&&(l=rf),o.push(gt("div",{class:a,onClick:r},{default:()=>[gt(ye,{class:{[i.is("loading")]:e.loading}},{default:()=>[gt(l)]})]}))}else o.push(gt("span",{class:i.e("placeholder")}));return o}function O$(t,e){return t.reduce((n,s)=>(n[s]=s,n),e)}function B1e(t,e){const n=pt();return{registerComplexWatchers:()=>{const o=["fixed"],r={realWidth:"width",realMinWidth:"minWidth"},a=O$(o,r);Object.keys(a).forEach(l=>{const c=r[l];Rt(e,c)&&Te(()=>e[c],u=>{let d=u;c==="width"&&l==="realWidth"&&(d=y4(u)),c==="minWidth"&&l==="realMinWidth"&&(d=YR(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"],r={property:"prop",align:"realAlign",headerAlign:"realHeaderAlign"},a=O$(o,r);Object.keys(a).forEach(l=>{const c=r[l];Rt(e,c)&&Te(()=>e[c],u=>{n.columnConfig.value[l]=u})})}}}function z1e(t,e,n){const s=pt(),i=J(""),o=J(!1),r=J(),a=J(),l=He("table");br(()=>{r.value=t.align?`is-${t.align}`:null,r.value}),br(()=>{a.value=t.headerAlign?`is-${t.headerAlign}`:r.value,a.value});const c=q(()=>{let x=s.vnode.vParent||s.parent;for(;x&&!x.tableId&&!x.columnId;)x=x.vnode.vParent||x.parent;return x}),u=q(()=>{const{store:x}=s.parent;if(!x)return!1;const{treeData:S}=x.states,E=S.value;return E&&Object.keys(E).length>0}),d=J(y4(t.width)),h=J(YR(t.minWidth)),f=x=>(d.value&&(x.width=d.value),h.value&&(x.minWidth=h.value),!d.value&&h.value&&(x.width=void 0),x.minWidth||(x.minWidth=80),x.realWidth=Number(x.width===void 0?x.minWidth:x.width),x),p=x=>{const S=x.type,E=V1e[S]||{};Object.keys(E).forEach(P=>{const I=E[P];P!=="className"&&I!==void 0&&(x[P]=I)});const T=R1e(S);if(T){const P=`${A(l.namespace)}-${T}`;x.className=x.className?`${x.className} ${P}`:P}return x},m=x=>{Array.isArray(x)?x.forEach(E=>S(E)):S(x);function S(E){var T;((T=E==null?void 0:E.type)==null?void 0:T.name)==="ElTableColumn"&&(E.vParent=s)}};return{columnId:i,realAlign:r,isSubColumn:o,realHeaderAlign:a,columnOrTableParent:c,setColumnWidth:f,setColumnForcedProps:p,setColumnRenders:x=>{t.renderHeader||x.type!=="selection"&&(x.renderHeader=E=>(s.columnConfig.value.label,ae(e,"header",E,()=>[x.label]))),e["filter-icon"]&&(x.renderFilterIcon=E=>ae(e,"filter-icon",E));let S=x.renderCell;return x.type==="expand"?(x.renderCell=E=>gt("div",{class:"cell"},[S(E)]),n.value.renderExpanded=E=>e.default?e.default(E):e.default):(S=S||F1e,x.renderCell=E=>{let T=null;if(e.default){const z=e.default(E);T=z.some(Y=>Y.type!==Qn)?z:S(E)}else T=S(E);const{columns:P}=n.value.store.states,I=P.value.findIndex(z=>z.type==="default"),L=u.value&&E.cellIndex===I,V=N1e(E,L),D={class:"cell",style:{}};return x.showOverflowTooltip&&(D.class=`${D.class} ${A(l.namespace)}-tooltip`,D.style={width:`${(E.column.realWidth||Number(E.column.width))-1}px`}),m(T),gt("div",D,[V,T])}),x},getPropsData:(...x)=>x.reduce((S,E)=>(Array.isArray(E)&&E.forEach(T=>{S[T]=t[T]}),S),{}),getColumnElIndex:(x,S)=>Array.prototype.indexOf.call(x,S),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",s.columnConfig.value)}}}var H1e={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},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 U1e=1;var tV=se({name:"ElTableColumn",components:{ElCheckbox:Ht},props:H1e,setup(t,{slots:e}){const n=pt(),s=J({}),i=q(()=>{let k=n.parent;for(;k&&!k.tableId;)k=k.parent;return k}),{registerNormalWatchers:o,registerComplexWatchers:r}=B1e(i,t),{columnId:a,isSubColumn:l,realHeaderAlign:c,columnOrTableParent:u,setColumnWidth:d,setColumnForcedProps:h,setColumnRenders:f,getPropsData:p,getColumnElIndex:m,realAlign:b,updateColumnOrder:y}=z1e(t,e,i),C=u.value;a.value=`${C.tableId||C.columnId}_column_${U1e++}`,rd(()=>{l.value=i.value!==C;const k=t.type||"default",x=t.sortable===""?!0:t.sortable,S=js(t.showOverflowTooltip)?C.props.showOverflowTooltip:t.showOverflowTooltip,E={...D1e[k],id:a.value,type:k,property:t.prop||t.property,align:b,headerAlign:c,showOverflowTooltip:S,filterable:t.filters||t.filterMethod,filteredValue:[],filterPlacement:"",filterClassName:"",isColumnGroup:!1,isSubColumn:!1,filterOpened:!1,sortable:x,index:t.index,rawColumnKey:n.vnode.key};let V=p(["columnKey","label","className","labelClassName","type","renderHeader","formatter","fixed","resizable"],["sortMethod","sortBy","sortOrders"],["selectable","reserveSelection"],["filterMethod","filters","filterMultiple","filterOpened","filteredValue","filterPlacement","filterClassName"]);V=Xge(E,V),V=Zge(f,d,h)(V),s.value=V,o(),r()}),Pt(()=>{var k;const x=u.value,S=l.value?x.vnode.el.children:(k=x.refs.hiddenColumns)==null?void 0:k.children,E=()=>m(S||[],n.vnode.el);s.value.getColumnIndex=E,E()>-1&&i.value.store.commit("insertColumn",s.value,l.value?x.columnConfig.value:null,y)}),Gn(()=>{const k=s.value.getColumnIndex;(k?k():-1)>-1&&i.value.store.commit("removeColumn",s.value,l.value?C.columnConfig.value:null,y)}),n.columnId=a.value,n.columnConfig=s},render(){var t,e,n;try{const s=(e=(t=this.$slots).default)==null?void 0:e.call(t,{row:{},column:{},$index:-1}),i=[];if(Array.isArray(s))for(const r of s)((n=r.type)==null?void 0:n.name)==="ElTableColumn"||r.shapeFlag&2?i.push(r):r.type===te&&Array.isArray(r.children)&&r.children.forEach(a=>{(a==null?void 0:a.patchFlag)!==1024&&!nt(a==null?void 0:a.children)&&i.push(a)});return gt("div",i)}catch{return gt("div",[])}}});const zr=jt(L1e,{TableColumn:tV}),Hr=xs(tV),mb=Symbol("tabsRootContextKey"),j1e=Ze({tabs:{type:xe(Array),default:()=>si([])}}),nV="ElTabBar",W1e=se({name:nV}),Y1e=se({...W1e,props:j1e,setup(t,{expose:e}){const n=t,s=pt(),i=qe(mb);i||sr(nV,"<el-tabs><el-tab-bar /></el-tabs>");const o=He("tabs"),r=J(),a=J(),l=()=>{let f=0,p=0;const m=["top","bottom"].includes(i.props.tabPosition)?"width":"height",b=m==="width"?"x":"y",y=b==="x"?"left":"top";return n.tabs.every(C=>{var k,x;const S=(x=(k=s.parent)==null?void 0:k.refs)==null?void 0:x[`tab-${C.uid}`];if(!S)return!1;if(!C.active)return!0;f=S[`offset${Wl(y)}`],p=S[`client${Wl(m)}`];const E=window.getComputedStyle(S);return m==="width"&&(p-=Number.parseFloat(E.paddingLeft)+Number.parseFloat(E.paddingRight),f+=Number.parseFloat(E.paddingLeft)),!1}),{[m]:`${p}px`,transform:`translate${Wl(b)}(${f}px)`}},c=()=>a.value=l(),u=[],d=()=>{var f;u.forEach(m=>m.stop()),u.length=0;const p=(f=s.parent)==null?void 0:f.refs;if(p){for(const m in p)if(m.startsWith("tab-")){const b=p[m];b&&u.push(bi(b,c))}}};Te(()=>n.tabs,async()=>{await dt(),c(),d()},{immediate:!0});const h=bi(r,()=>c());return Gn(()=>{u.forEach(f=>f.stop()),u.length=0,h.stop()}),e({ref:r,update:c}),(f,p)=>(v(),$("div",{ref_key:"barRef",ref:r,class:W([A(o).e("active-bar"),A(o).is(A(i).props.tabPosition)]),style:Ke(a.value)},null,6))}});var G1e=Ye(Y1e,[["__file","tab-bar.vue"]]);const q1e=Ze({panes:{type:xe(Array),default:()=>si([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean}),X1e={tabClick:(t,e,n)=>n instanceof Event,tabRemove:(t,e)=>e instanceof Event},D$="ElTabNav",K1e=se({name:D$,props:q1e,emits:X1e,setup(t,{expose:e,emit:n}){const s=qe(mb);s||sr(D$,"<el-tabs><tab-nav /></el-tabs>");const i=He("tabs"),o=dZ(),r=SZ(),a=J(),l=J(),c=J(),u=J(),d=J(!1),h=J(0),f=J(!1),p=J(!0),m=q(()=>["top","bottom"].includes(s.props.tabPosition)?"width":"height"),b=q(()=>({transform:`translate${m.value==="width"?"X":"Y"}(-${h.value}px)`})),y=()=>{if(!a.value)return;const P=a.value[`offset${Wl(m.value)}`],I=h.value;if(!I)return;const L=I>P?I-P:0;h.value=L},C=()=>{if(!a.value||!l.value)return;const P=l.value[`offset${Wl(m.value)}`],I=a.value[`offset${Wl(m.value)}`],L=h.value;if(P-L<=I)return;const V=P-L>I*2?L+I:P-I;h.value=V},k=async()=>{const P=l.value;if(!d.value||!c.value||!a.value||!P)return;await dt();const I=c.value.querySelector(".is-active");if(!I)return;const L=a.value,V=["top","bottom"].includes(s.props.tabPosition),D=I.getBoundingClientRect(),z=L.getBoundingClientRect(),Y=V?P.offsetWidth-z.width:P.offsetHeight-z.height,B=h.value;let U=B;V?(D.left<z.left&&(U=B-(z.left-D.left)),D.right>z.right&&(U=B+D.right-z.right)):(D.top<z.top&&(U=B-(z.top-D.top)),D.bottom>z.bottom&&(U=B+(D.bottom-z.bottom))),U=Math.max(U,0),h.value=Math.min(U,Y)},x=()=>{var P;if(!l.value||!a.value)return;t.stretch&&((P=u.value)==null||P.update());const I=l.value[`offset${Wl(m.value)}`],L=a.value[`offset${Wl(m.value)}`],V=h.value;L<I?(d.value=d.value||{},d.value.prev=V,d.value.next=V+L<I,I-V<L&&(h.value=I-L)):(d.value=!1,V>0&&(h.value=0))},S=P=>{const I=P.code,{up:L,down:V,left:D,right:z}=ft;if(![L,V,D,z].includes(I))return;const Y=Array.from(P.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)")),B=Y.indexOf(P.target);let U;I===D||I===L?B===0?U=Y.length-1:U=B-1:B<Y.length-1?U=B+1:U=0,Y[U].focus({preventScroll:!0}),Y[U].click(),E()},E=()=>{p.value&&(f.value=!0)},T=()=>f.value=!1;return Te(o,P=>{P==="hidden"?p.value=!1:P==="visible"&&setTimeout(()=>p.value=!0,50)}),Te(r,P=>{P?setTimeout(()=>p.value=!0,50):p.value=!1}),bi(c,x),Pt(()=>setTimeout(()=>k(),0)),ll(()=>x()),e({scrollToActiveTab:k,removeFocus:T}),()=>{const P=d.value?[_("span",{class:[i.e("nav-prev"),i.is("disabled",!d.value.prev)],onClick:y},[_(ye,null,{default:()=>[_(Yu,null,null)]})]),_("span",{class:[i.e("nav-next"),i.is("disabled",!d.value.next)],onClick:C},[_(ye,null,{default:()=>[_(kr,null,null)]})])]:null,I=t.panes.map((L,V)=>{var D,z,Y,B;const U=L.uid,X=L.props.disabled,K=(z=(D=L.props.name)!=null?D:L.index)!=null?z:`${V}`,N=!X&&(L.isClosable||t.editable);L.index=`${V}`;const F=N?_(ye,{class:"is-icon-close",onClick:Z=>n("tabRemove",L,Z)},{default:()=>[_(Ir,null,null)]}):null,Q=((B=(Y=L.slots).label)==null?void 0:B.call(Y))||L.props.label,ie=!X&&L.active?0:-1;return _("div",{ref:`tab-${U}`,class:[i.e("item"),i.is(s.props.tabPosition),i.is("active",L.active),i.is("disabled",X),i.is("closable",N),i.is("focus",f.value)],id:`tab-${K}`,key:`tab-${U}`,"aria-controls":`pane-${K}`,role:"tab","aria-selected":L.active,tabindex:ie,onFocus:()=>E(),onBlur:()=>T(),onClick:Z=>{T(),n("tabClick",L,K,Z)},onKeydown:Z=>{N&&(Z.code===ft.delete||Z.code===ft.backspace)&&n("tabRemove",L,Z)}},[Q,F])});return _("div",{ref:c,class:[i.e("nav-wrap"),i.is("scrollable",!!d.value),i.is(s.props.tabPosition)]},[P,_("div",{class:i.e("nav-scroll"),ref:a},[_("div",{class:[i.e("nav"),i.is(s.props.tabPosition),i.is("stretch",t.stretch&&["top","bottom"].includes(s.props.tabPosition))],ref:l,style:b.value,role:"tablist",onKeydown:S},[t.type?null:_(G1e,{ref:u,tabs:[...t.panes]},null),I])])])}}}),Z1e=Ze({type:{type:String,values:["card","border-card",""],default:""},closable:Boolean,addable:Boolean,modelValue:{type:[String,Number]},editable:Boolean,tabPosition:{type:String,values:["top","right","bottom","left"],default:"top"},beforeLeave:{type:xe(Function),default:()=>!0},stretch:Boolean}),q2=t=>nt(t)||xt(t),J1e={[mn]:t=>q2(t),tabClick:(t,e)=>e instanceof Event,tabChange:t=>q2(t),edit:(t,e)=>["remove","add"].includes(e),tabRemove:t=>q2(t),tabAdd:()=>!0},Q1e=se({name:"ElTabs",props:Z1e,emits:J1e,setup(t,{emit:e,slots:n,expose:s}){var i;const o=He("tabs"),r=q(()=>["left","right"].includes(t.tabPosition)),{children:a,addChild:l,removeChild:c}=Bae(pt(),"ElTabPane"),u=J(),d=J((i=t.modelValue)!=null?i:"0"),h=async(y,C=!1)=>{var k,x,S;if(!(d.value===y||js(y)))try{await((k=t.beforeLeave)==null?void 0:k.call(t,y,d.value))!==!1&&(d.value=y,C&&(e(mn,y),e("tabChange",y)),(S=(x=u.value)==null?void 0:x.removeFocus)==null||S.call(x))}catch{}},f=(y,C,k)=>{y.props.disabled||(h(C,!0),e("tabClick",y,k))},p=(y,C)=>{y.props.disabled||js(y.props.name)||(C.stopPropagation(),e("edit",y.props.name,"remove"),e("tabRemove",y.props.name))},m=()=>{e("edit",void 0,"add"),e("tabAdd")};Te(()=>t.modelValue,y=>h(y)),Te(d,async()=>{var y;await dt(),(y=u.value)==null||y.scrollToActiveTab()}),It(mb,{props:t,currentName:d,registerPane:y=>{a.value.push(y)},sortPane:l,unregisterPane:c}),s({currentName:d});const b=({render:y})=>y();return()=>{const y=n["add-icon"],C=t.editable||t.addable?_("div",{class:[o.e("new-tab"),r.value&&o.e("new-tab-vertical")],tabindex:"0",onClick:m,onKeydown:S=>{S.code===ft.enter&&m()}},[y?ae(n,"add-icon"):_(ye,{class:o.is("icon-plus")},{default:()=>[_(Ox,null,null)]})]):null,k=_("div",{class:[o.e("header"),r.value&&o.e("header-vertical"),o.is(t.tabPosition)]},[_(b,{render:()=>{const S=a.value.some(E=>E.slots.label);return _(K1e,{ref:u,currentName:d.value,editable:t.editable,type:t.type,panes:a.value,stretch:t.stretch,onTabClick:f,onTabRemove:p},{$stable:!S})}},null),C]),x=_("div",{class:o.e("content")},[ae(n,"default")]);return _("div",{class:[o.b(),o.m(t.tabPosition),{[o.m("card")]:t.type==="card",[o.m("border-card")]:t.type==="border-card"}]},[x,k])}}}),e0e=Ze({label:{type:String,default:""},name:{type:[String,Number]},closable:Boolean,disabled:Boolean,lazy:Boolean}),sV="ElTabPane",t0e=se({name:sV}),n0e=se({...t0e,props:e0e,setup(t){const e=t,n=pt(),s=Zi(),i=qe(mb);i||sr(sV,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const o=He("tab-pane"),r=J(),a=q(()=>e.closable||i.props.closable),l=L9(()=>{var f;return i.currentName.value===((f=e.name)!=null?f:r.value)}),c=J(l.value),u=q(()=>{var f;return(f=e.name)!=null?f:r.value}),d=L9(()=>!e.lazy||c.value||l.value);Te(l,f=>{f&&(c.value=!0)});const h=as({uid:n.uid,slots:s,props:e,paneName:u,active:l,index:r,isClosable:a});return i.registerPane(h),Pt(()=>{i.sortPane(h)}),_a(()=>{i.unregisterPane(h.uid)}),(f,p)=>A(d)?Pe((v(),$("div",{key:0,id:`pane-${A(u)}`,class:W(A(o).b()),role:"tabpanel","aria-hidden":!A(l),"aria-labelledby":`tab-${A(u)}`},[ae(f.$slots,"default")],10,["id","aria-hidden","aria-labelledby"])),[[Xt,A(l)]]):O("v-if",!0)}});var iV=Ye(n0e,[["__file","tab-pane.vue"]]);const gb=jt(Q1e,{TabPane:iV}),vb=xs(iV),s0e=Ze({format:{type:String,default:"HH:mm"},modelValue:String,disabled:Boolean,editable:{type:Boolean,default:!0},effect:{type:xe(String),default:"light"},clearable:{type:Boolean,default:!0},size:Ji,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:"00:30"},minTime:String,maxTime:String,name:String,prefixIcon:{type:xe([String,Object]),default:()=>_O},clearIcon:{type:xe([String,Object]),default:()=>Of},...sb}),Ya=t=>{const e=(t||"").split(":");if(e.length>=2){let n=Number.parseInt(e[0],10);const s=Number.parseInt(e[1],10),i=t.toUpperCase();return i.includes("AM")&&n===12?n=0:i.includes("PM")&&n!==12&&(n+=12),{hours:n,minutes:s}}return null},X2=(t,e)=>{const n=Ya(t);if(!n)return-1;const s=Ya(e);if(!s)return-1;const i=n.minutes+n.hours*60,o=s.minutes+s.hours*60;return i===o?0:i>o?1:-1},R$=t=>`${t}`.padStart(2,"0"),th=t=>`${R$(t.hours)}:${R$(t.minutes)}`,i0e=(t,e)=>{const n=Ya(t);if(!n)return"";const s=Ya(e);if(!s)return"";const i={hours:n.hours,minutes:n.minutes};return i.minutes+=s.minutes,i.hours+=s.hours,i.hours+=Math.floor(i.minutes/60),i.minutes=i.minutes%60,th(i)},o0e=se({name:"ElTimeSelect"}),r0e=se({...o0e,props:s0e,emits:["change","blur","focus","clear","update:modelValue"],setup(t,{expose:e}){const n=t;ut.extend(DD);const{Option:s}=Jt,i=He("input"),o=J(),r=Co(),{lang:a}=fn(),l=q(()=>n.modelValue),c=q(()=>{const y=Ya(n.start);return y?th(y):null}),u=q(()=>{const y=Ya(n.end);return y?th(y):null}),d=q(()=>{const y=Ya(n.step);return y?th(y):null}),h=q(()=>{const y=Ya(n.minTime||"");return y?th(y):null}),f=q(()=>{const y=Ya(n.maxTime||"");return y?th(y):null}),p=q(()=>{const y=[];if(n.start&&n.end&&n.step){let C=c.value,k;for(;C&&u.value&&X2(C,u.value)<=0;)k=ut(C,"HH:mm").locale(a.value).format(n.format),y.push({value:k,disabled:X2(C,h.value||"-1:-1")<=0||X2(C,f.value||"100:100")>=0}),C=i0e(C,d.value)}return y});return e({blur:()=>{var y,C;(C=(y=o.value)==null?void 0:y.blur)==null||C.call(y)},focus:()=>{var y,C;(C=(y=o.value)==null?void 0:y.focus)==null||C.call(y)}}),(y,C)=>(v(),R(A(Jt),{ref_key:"select",ref:o,"model-value":A(l),disabled:A(r),clearable:y.clearable,"clear-icon":y.clearIcon,size:y.size,effect:y.effect,placeholder:y.placeholder,"default-first-option":"",filterable:y.editable,"empty-values":y.emptyValues,"value-on-clear":y.valueOnClear,"onUpdate:modelValue":k=>y.$emit("update:modelValue",k),onChange:k=>y.$emit("change",k),onBlur:k=>y.$emit("blur",k),onFocus:k=>y.$emit("focus",k),onClear:()=>y.$emit("clear")},{prefix:w(()=>[y.prefixIcon?(v(),R(A(ye),{key:0,class:W(A(i).e("prefix-icon"))},{default:w(()=>[(v(),R(Tt(y.prefixIcon)))]),_:1},8,["class"])):O("v-if",!0)]),default:w(()=>[(v(!0),$(te,null,be(A(p),k=>(v(),R(A(s),{key:k.value,label:k.value,value:k.value,disabled:k.disabled},null,8,["label","value","disabled"]))),128))]),_:1},8,["model-value","disabled","clearable","clear-icon","size","effect","placeholder","filterable","empty-values","value-on-clear","onUpdate:modelValue","onChange","onBlur","onFocus","onClear"]))}});var a0e=Ye(r0e,[["__file","time-select.vue"]]);const C4=jt(a0e),oV=Symbol("uploadContextKey"),l0e="ElUpload";class c0e extends Error{constructor(e,n,s,i){super(e),this.name="UploadAjaxError",this.status=n,this.method=s,this.url=i}}function V$(t,e,n){let s;return n.response?s=`${n.response.error||n.response}`:n.responseText?s=`${n.responseText}`:s=`fail to ${e.method} ${t} ${n.status}`,new c0e(s,n.status,e.method,t)}function u0e(t){const e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}const d0e=t=>{typeof XMLHttpRequest>"u"&&sr(l0e,"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 s=new FormData;if(t.data)for(const[o,r]of Object.entries(t.data))Le(r)&&r.length?s.append(o,...r):s.append(o,r);s.append(t.filename,t.file,t.file.name),e.addEventListener("error",()=>{t.onError(V$(n,t,e))}),e.addEventListener("load",()=>{if(e.status<200||e.status>=300)return t.onError(V$(n,t,e));t.onSuccess(u0e(e))}),e.open(t.method,n,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);const i=t.headers||{};if(i instanceof Headers)i.forEach((o,r)=>e.setRequestHeader(r,o));else for(const[o,r]of Object.entries(i))xi(r)||e.setRequestHeader(o,String(r));return e.send(s),e},rV=["text","picture","picture-card"];let h0e=1;const I6=()=>Date.now()+h0e++,aV=Ze({action:{type:String,default:"#"},headers:{type:xe(Object)},method:{type:String,default:"post"},data:{type:xe([Object,Function,Promise]),default:()=>si({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:xe(Array),default:()=>si([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:rV,default:"text"},httpRequest:{type:xe(Function),default:d0e},disabled:Boolean,limit:Number}),f0e=Ze({...aV,beforeUpload:{type:xe(Function),default:Vt},beforeRemove:{type:xe(Function)},onRemove:{type:xe(Function),default:Vt},onChange:{type:xe(Function),default:Vt},onPreview:{type:xe(Function),default:Vt},onSuccess:{type:xe(Function),default:Vt},onProgress:{type:xe(Function),default:Vt},onError:{type:xe(Function),default:Vt},onExceed:{type:xe(Function),default:Vt},crossorigin:{type:xe(String)}}),p0e=Ze({files:{type:xe(Array),default:()=>si([])},disabled:{type:Boolean,default:!1},handlePreview:{type:xe(Function),default:Vt},listType:{type:String,values:rV,default:"text"},crossorigin:{type:xe(String)}}),m0e={remove:t=>!!t},g0e=se({name:"ElUploadList"}),v0e=se({...g0e,props:p0e,emits:m0e,setup(t,{emit:e}){const n=t,{t:s}=fn(),i=He("upload"),o=He("icon"),r=He("list"),a=Co(),l=J(!1),c=q(()=>[i.b("list"),i.bm("list",n.listType),i.is("disabled",n.disabled)]),u=d=>{e("remove",d)};return(d,h)=>(v(),R(Vy,{tag:"ul",class:W(A(c)),name:A(r).b()},{default:w(()=>[(v(!0),$(te,null,be(d.files,(f,p)=>(v(),$("li",{key:f.uid||f.name,class:W([A(i).be("list","item"),A(i).is(f.status),{focusing:l.value}]),tabindex:"0",onKeydown:$t(m=>!A(a)&&u(f),["delete"]),onFocus:m=>l.value=!0,onBlur:m=>l.value=!1,onClick:m=>l.value=!1},[ae(d.$slots,"default",{file:f,index:p},()=>[d.listType==="picture"||f.status!=="uploading"&&d.listType==="picture-card"?(v(),$("img",{key:0,class:W(A(i).be("list","item-thumbnail")),src:f.url,crossorigin:d.crossorigin,alt:""},null,10,["src","crossorigin"])):O("v-if",!0),f.status==="uploading"||d.listType!=="picture-card"?(v(),$("div",{key:1,class:W(A(i).be("list","item-info"))},[g("a",{class:W(A(i).be("list","item-name")),onClick:Be(m=>d.handlePreview(f),["prevent"])},[_(A(ye),{class:W(A(o).m("document"))},{default:w(()=>[_(A(e1))]),_:1},8,["class"]),g("span",{class:W(A(i).be("list","item-file-name")),title:f.name},M(f.name),11,["title"])],10,["onClick"]),f.status==="uploading"?(v(),R(A(pb),{key:0,type:d.listType==="picture-card"?"circle":"line","stroke-width":d.listType==="picture-card"?6:2,percentage:Number(f.percentage),style:Ke(d.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:W(A(i).be("list","item-status-label"))},[d.listType==="text"?(v(),R(A(ye),{key:0,class:W([A(o).m("upload-success"),A(o).m("circle-check")])},{default:w(()=>[_(A(Ix))]),_:1},8,["class"])):["picture-card","picture"].includes(d.listType)?(v(),R(A(ye),{key:1,class:W([A(o).m("upload-success"),A(o).m("check")])},{default:w(()=>[_(A(Px))]),_:1},8,["class"])):O("v-if",!0)],2),A(a)?O("v-if",!0):(v(),R(A(ye),{key:2,class:W(A(o).m("close")),onClick:m=>u(f)},{default:w(()=>[_(A(Ir))]),_:2},1032,["class","onClick"])),O(" Due to close btn only appears when li gets focused disappears after li gets blurred, thus keyboard navigation can never reach close btn"),O(" This is a bug which needs to be fixed "),O(" TODO: Fix the incorrect navigation interaction "),A(a)?O("v-if",!0):(v(),$("i",{key:3,class:W(A(o).m("close-tip"))},M(A(s)("el.upload.deleteTip")),3)),d.listType==="picture-card"?(v(),$("span",{key:4,class:W(A(i).be("list","item-actions"))},[g("span",{class:W(A(i).be("list","item-preview")),onClick:m=>d.handlePreview(f)},[_(A(ye),{class:W(A(o).m("zoom-in"))},{default:w(()=>[_(A(AO))]),_:1},8,["class"])],10,["onClick"]),A(a)?O("v-if",!0):(v(),$("span",{key:0,class:W(A(i).be("list","item-delete")),onClick:m=>u(f)},[_(A(ye),{class:W(A(o).m("delete"))},{default:w(()=>[_(A(bO))]),_:1},8,["class"])],10,["onClick"]))],2)):O("v-if",!0)])],42,["onKeydown","onFocus","onBlur","onClick"]))),128)),ae(d.$slots,"append")]),_:3},8,["class","name"]))}});var F$=Ye(v0e,[["__file","upload-list.vue"]]);const _0e=Ze({disabled:{type:Boolean,default:!1}}),y0e={file:t=>Le(t)},lV="ElUploadDrag",b0e=se({name:lV}),w0e=se({...b0e,props:_0e,emits:y0e,setup(t,{emit:e}){qe(oV)||sr(lV,"usage: <el-upload><el-upload-dragger /></el-upload>");const s=He("upload"),i=J(!1),o=Co(),r=l=>{if(o.value)return;i.value=!1,l.stopPropagation();const c=Array.from(l.dataTransfer.files);e("file",c)},a=()=>{o.value||(i.value=!0)};return(l,c)=>(v(),$("div",{class:W([A(s).b("dragger"),A(s).is("dragover",i.value)]),onDrop:Be(r,["prevent"]),onDragover:Be(a,["prevent"]),onDragleave:Be(u=>i.value=!1,["prevent"])},[ae(l.$slots,"default")],42,["onDrop","onDragover","onDragleave"]))}});var C0e=Ye(w0e,[["__file","upload-dragger.vue"]]);const k0e=Ze({...aV,beforeUpload:{type:xe(Function),default:Vt},onRemove:{type:xe(Function),default:Vt},onStart:{type:xe(Function),default:Vt},onSuccess:{type:xe(Function),default:Vt},onProgress:{type:xe(Function),default:Vt},onError:{type:xe(Function),default:Vt},onExceed:{type:xe(Function),default:Vt}}),x0e=se({name:"ElUploadContent",inheritAttrs:!1}),S0e=se({...x0e,props:k0e,setup(t,{expose:e}){const n=t,s=He("upload"),i=Co(),o=ss({}),r=ss(),a=m=>{if(m.length===0)return;const{autoUpload:b,limit:y,fileList:C,multiple:k,onStart:x,onExceed:S}=n;if(y&&C.length+m.length>y){S(m,C);return}k||(m=m.slice(0,1));for(const E of m){const T=E;T.uid=I6(),x(T),b&&l(T)}},l=async m=>{if(r.value.value="",!n.beforeUpload)return u(m);let b,y={};try{const k=n.data,x=n.beforeUpload(m);y=jh(n.data)?g7(n.data):n.data,b=await x,jh(n.data)&&mc(k,y)&&(y=g7(n.data))}catch{b=!1}if(b===!1){n.onRemove(m);return}let C=m;b instanceof Blob&&(b instanceof File?C=b:C=new File([b],m.name,{type:m.type})),u(Object.assign(C,{uid:m.uid}),y)},c=async(m,b)=>ot(m)?m(b):m,u=async(m,b)=>{const{headers:y,data:C,method:k,withCredentials:x,name:S,action:E,onProgress:T,onSuccess:P,onError:I,httpRequest:L}=n;try{b=await c(b??C,m)}catch{n.onRemove(m);return}const{uid:V}=m,D={headers:y||{},withCredentials:x,file:m,data:b,method:k,filename:S,action:E,onProgress:Y=>{T(Y,m)},onSuccess:Y=>{P(Y,m),delete o.value[V]},onError:Y=>{I(Y,m),delete o.value[V]}},z=L(D);o.value[V]=z,z instanceof Promise&&z.then(D.onSuccess,D.onError)},d=m=>{const b=m.target.files;b&&a(Array.from(b))},h=()=>{i.value||(r.value.value="",r.value.click())},f=()=>{h()};return e({abort:m=>{Ese(o.value).filter(m?([y])=>String(m.uid)===y:()=>!0).forEach(([y,C])=>{C instanceof XMLHttpRequest&&C.abort(),delete o.value[y]})},upload:l}),(m,b)=>(v(),$("div",{class:W([A(s).b(),A(s).m(m.listType),A(s).is("drag",m.drag),A(s).is("disabled",A(i))]),tabindex:A(i)?"-1":"0",onClick:h,onKeydown:$t(Be(f,["self"]),["enter","space"])},[m.drag?(v(),R(C0e,{key:0,disabled:A(i),onFile:a},{default:w(()=>[ae(m.$slots,"default")]),_:3},8,["disabled"])):ae(m.$slots,"default",{key:1}),g("input",{ref_key:"inputRef",ref:r,class:W(A(s).e("input")),name:m.name,disabled:A(i),multiple:m.multiple,accept:m.accept,type:"file",onChange:d,onClick:Be(()=>{},["stop"])},null,42,["name","disabled","multiple","accept","onClick"])],42,["tabindex","onKeydown"]))}});var N$=Ye(S0e,[["__file","upload-content.vue"]]);const B$="ElUpload",z$=t=>{var e;(e=t.url)!=null&&e.startsWith("blob:")&&URL.revokeObjectURL(t.url)},$0e=(t,e)=>{const n=xZ(t,"fileList",void 0,{passive:!0}),s=f=>n.value.find(p=>p.uid===f.uid);function i(f){var p;(p=e.value)==null||p.abort(f)}function o(f=["ready","uploading","success","fail"]){n.value=n.value.filter(p=>!f.includes(p.status))}function r(f){n.value=n.value.filter(p=>p!==f)}const a=(f,p)=>{const m=s(p);m&&(console.error(f),m.status="fail",r(m),t.onError(f,m,n.value),t.onChange(m,n.value))},l=(f,p)=>{const m=s(p);m&&(t.onProgress(f,m,n.value),m.status="uploading",m.percentage=Math.round(f.percent))},c=(f,p)=>{const m=s(p);m&&(m.status="success",m.response=f,t.onSuccess(f,m,n.value),t.onChange(m,n.value))},u=f=>{xi(f.uid)&&(f.uid=I6());const p={name:f.name,percentage:0,status:"ready",size:f.size,raw:f,uid:f.uid};if(t.listType==="picture-card"||t.listType==="picture")try{p.url=URL.createObjectURL(f)}catch(m){m.message,t.onError(m,p,n.value)}n.value=[...n.value,p],t.onChange(p,n.value)},d=async f=>{const p=f instanceof File?s(f):f;p||sr(B$,"file to be removed not found");const m=b=>{i(b),r(b),t.onRemove(b,n.value),z$(b)};t.beforeRemove?await t.beforeRemove(p,n.value)!==!1&&m(p):m(p)};function h(){n.value.filter(({status:f})=>f==="ready").forEach(({raw:f})=>{var p;return f&&((p=e.value)==null?void 0:p.upload(f))})}return Te(()=>t.listType,f=>{f!=="picture-card"&&f!=="picture"||(n.value=n.value.map(p=>{const{raw:m,url:b}=p;if(!b&&m)try{p.url=URL.createObjectURL(m)}catch(y){t.onError(y,p,n.value)}return p}))}),Te(n,f=>{for(const p of f)p.uid||(p.uid=I6()),p.status||(p.status="success")},{immediate:!0,deep:!0}),{uploadFiles:n,abort:i,clearFiles:o,handleError:a,handleProgress:l,handleStart:u,handleSuccess:c,handleRemove:d,submit:h,revokeFileObjectURL:z$}},A0e=se({name:"ElUpload"}),M0e=se({...A0e,props:f0e,setup(t,{expose:e}){const n=t,s=Co(),i=ss(),{abort:o,submit:r,clearFiles:a,uploadFiles:l,handleStart:c,handleError:u,handleRemove:d,handleSuccess:h,handleProgress:f,revokeFileObjectURL:p}=$0e(n,i),m=q(()=>n.listType==="picture-card"),b=q(()=>({...n,fileList:l.value,onStart:c,onProgress:f,onSuccess:h,onError:u,onRemove:d}));return Gn(()=>{l.value.forEach(p)}),It(oV,{accept:kn(n,"accept")}),e({abort:o,submit:r,clearFiles:a,handleStart:c,handleRemove:d}),(y,C)=>(v(),$("div",null,[A(m)&&y.showFileList?(v(),R(F$,{key:0,disabled:A(s),"list-type":y.listType,files:A(l),crossorigin:y.crossorigin,"handle-preview":y.onPreview,onRemove:A(d)},Es({append:w(()=>[_(N$,Mn({ref_key:"uploadRef",ref:i},A(b)),{default:w(()=>[y.$slots.trigger?ae(y.$slots,"trigger",{key:0}):O("v-if",!0),!y.$slots.trigger&&y.$slots.default?ae(y.$slots,"default",{key:1}):O("v-if",!0)]),_:3},16)]),_:2},[y.$slots.file?{name:"default",fn:w(({file:k,index:x})=>[ae(y.$slots,"file",{file:k,index:x})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):O("v-if",!0),!A(m)||A(m)&&!y.showFileList?(v(),R(N$,Mn({key:1,ref_key:"uploadRef",ref:i},A(b)),{default:w(()=>[y.$slots.trigger?ae(y.$slots,"trigger",{key:0}):O("v-if",!0),!y.$slots.trigger&&y.$slots.default?ae(y.$slots,"default",{key:1}):O("v-if",!0)]),_:3},16)):O("v-if",!0),y.$slots.trigger?ae(y.$slots,"default",{key:2}):O("v-if",!0),ae(y.$slots,"tip"),!A(m)&&y.showFileList?(v(),R(F$,{key:3,disabled:A(s),"list-type":y.listType,files:A(l),crossorigin:y.crossorigin,"handle-preview":y.onPreview,onRemove:A(d)},Es({_:2},[y.$slots.file?{name:"default",fn:w(({file:k,index:x})=>[ae(y.$slots,"file",{file:k,index:x})])}:void 0]),1032,["disabled","list-type","files","crossorigin","handle-preview","onRemove"])):O("v-if",!0)]))}});var E0e=Ye(M0e,[["__file","upload.vue"]]);const l1=jt(E0e);function T0e(t){let e;const n=J(!1),s=as({...t,originalPosition:"",originalOverflow:"",visible:!1});function i(h){s.text=h}function o(){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()):(da(h,f.bm("parent","relative")),h.removeAttribute("loading-number")),da(h,f.bm("parent","hidden"))}r(),u.unmount()}function r(){var h,f;(f=(h=d.$el)==null?void 0:h.parentNode)==null||f.removeChild(d.$el)}function a(){var h;t.beforeClose&&!t.beforeClose()||(n.value=!0,clearTimeout(e),e=setTimeout(l,400),s.visible=!1,(h=t.closed)==null||h.call(t))}function l(){if(!n.value)return;const h=s.parent;n.value=!1,h.vLoadingAddClassList=void 0,o()}const u=Zm(se({name:"ElLoading",setup(h,{expose:f}){const{ns:p,zIndex:m}=t4("loading");return f({ns:p,zIndex:m}),()=>{const b=s.spinner||s.svg,y=gt("svg",{class:"circular",viewBox:s.svgViewBox?s.svgViewBox:"0 0 50 50",...b?{innerHTML:b}:{}},[gt("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),C=s.text?gt("p",{class:p.b("text")},[s.text]):void 0;return gt(bo,{name:p.b("fade"),onAfterLeave:l},{default:w(()=>[Pe(_("div",{style:{backgroundColor:s.background||""},class:[p.b("mask"),s.customClass,s.fullscreen?"is-fullscreen":""]},[gt("div",{class:p.b("spinner")},[y,C])]),[[Xt,s.visible]])])})}}})),d=u.mount(document.createElement("div"));return{...yo(s),setText:i,removeElLoadingChild:r,close:a,handleAfterLeave:l,vm:d,get $el(){return d.$el}}}let g0;const L6=function(t={}){if(!Ut)return;const e=P0e(t);if(e.fullscreen&&g0)return g0;const n=T0e({...e,closed:()=>{var i;(i=e.closed)==null||i.call(e),e.fullscreen&&(g0=void 0)}});I0e(e,e.parent,n),H$(e,e.parent,n),e.parent.vLoadingAddClassList=()=>H$(e,e.parent,n);let s=e.parent.getAttribute("loading-number");return s?s=`${Number.parseInt(s)+1}`:s="1",e.parent.setAttribute("loading-number",s),e.parent.appendChild(n.$el),dt(()=>n.visible.value=e.visible),e.fullscreen&&(g0=n),n},P0e=t=>{var e,n,s,i;let o;return nt(t.target)?o=(e=document.querySelector(t.target))!=null?e:document.body:o=t.target||document.body,{parent:o===document.body||t.body?document.body:o,background:t.background||"",svg:t.svg||"",svgViewBox:t.svgViewBox||"",spinner:t.spinner||!1,text:t.text||"",fullscreen:o===document.body&&((n=t.fullscreen)!=null?n:!0),lock:(s=t.lock)!=null?s:!1,customClass:t.customClass||"",visible:(i=t.visible)!=null?i:!0,beforeClose:t.beforeClose,closed:t.closed,target:o}},I0e=async(t,e,n)=>{const{nextZIndex:s}=n.vm.zIndex||n.vm._.exposed.zIndex,i={};if(t.fullscreen)n.originalPosition.value=Yl(document.body,"position"),n.originalOverflow.value=Yl(document.body,"overflow"),i.zIndex=s();else if(t.parent===document.body){n.originalPosition.value=Yl(document.body,"position"),await dt();for(const o of["top","left"]){const r=o==="top"?"scrollTop":"scrollLeft";i[o]=`${t.target.getBoundingClientRect()[o]+document.body[r]+document.documentElement[r]-Number.parseInt(Yl(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])i[o]=`${t.target.getBoundingClientRect()[o]}px`}else n.originalPosition.value=Yl(e,"position");for(const[o,r]of Object.entries(i))n.$el.style[o]=r},H$=(t,e,n)=>{const s=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?da(e,s.bm("parent","relative")):Wu(e,s.bm("parent","relative")),t.fullscreen&&t.lock?Wu(e,s.bm("parent","hidden")):da(e,s.bm("parent","hidden"))},tv=Symbol("ElLoading"),U$=(t,e)=>{var n,s,i,o;const r=e.instance,a=h=>Ct(e.value)?e.value[h]:void 0,l=h=>{const f=nt(h)&&(r==null?void 0:r[h])||h;return f&&J(f)},c=h=>l(a(h)||t.getAttribute(`element-loading-${wi(h)}`)),u=(n=a("fullscreen"))!=null?n:e.modifiers.fullscreen,d={text:c("text"),svg:c("svg"),svgViewBox:c("svgViewBox"),spinner:c("spinner"),background:c("background"),customClass:c("customClass"),fullscreen:u,target:(s=a("target"))!=null?s:u?void 0:t,body:(i=a("body"))!=null?i:e.modifiers.body,lock:(o=a("lock"))!=null?o:e.modifiers.lock};t[tv]={options:d,instance:L6(d)}},L0e=(t,e)=>{for(const n of Object.keys(e))hn(e[n])&&(e[n].value=t[n])},j$={mounted(t,e){e.value&&U$(t,e)},updated(t,e){const n=t[tv];e.oldValue!==e.value&&(e.value&&!e.oldValue?U$(t,e):e.value&&e.oldValue?Ct(e.value)&&L0e(e.value,n.options):n==null||n.instance.close())},unmounted(t){var e;(e=t[tv])==null||e.instance.close(),t[tv]=null}},O0e={install(t){t.directive("loading",j$),t.config.globalProperties.$loading=L6},directive:j$,service:L6},D0e=se({name:"ElMessageBox",directives:{TrapFocus:gde},components:{ElButton:Ge,ElFocusTrap:rb,ElInput:vt,ElOverlay:f4,ElIcon:ye,...TO},inheritAttrs:!1,props:{buttonSize:{type:String,validator:IO},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:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup(t,{emit:e}){const{locale:n,zIndex:s,ns:i,size:o}=t4("message-box",q(()=>t.buttonSize)),{t:r}=n,{nextZIndex:a}=s,l=J(!1),c=as({autofocus:!0,beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonLoadingIcon:Ki(rf),cancelButtonLoadingIcon:Ki(rf),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:a()}),u=q(()=>{const U=c.type;return{[i.bm("icon",U)]:U&&af[U]}}),d=tr(),h=tr(),f=q(()=>c.icon||af[c.type]||""),p=q(()=>!!c.message),m=J(),b=J(),y=J(),C=J(),k=J(),x=q(()=>c.confirmButtonClass);Te(()=>c.inputValue,async U=>{await dt(),t.boxType==="prompt"&&U!==null&&D()},{immediate:!0}),Te(()=>l.value,U=>{var X,K;U&&(t.boxType!=="prompt"&&(c.autofocus?y.value=(K=(X=k.value)==null?void 0:X.$el)!=null?K:m.value:y.value=m.value),c.zIndex=a()),t.boxType==="prompt"&&(U?dt().then(()=>{var N;C.value&&C.value.$el&&(c.autofocus?y.value=(N=z())!=null?N:m.value:y.value=m.value)}):(c.editorErrorMessage="",c.validateError=!1))});const S=q(()=>t.draggable),E=q(()=>t.overflow);OO(m,b,S,E),Pt(async()=>{await dt(),t.closeOnHashChange&&window.addEventListener("hashchange",T)}),Gn(()=>{t.closeOnHashChange&&window.removeEventListener("hashchange",T)});function T(){l.value&&(l.value=!1,dt(()=>{c.action&&e("action",c.action)}))}const P=()=>{t.closeOnClickModal&&V(c.distinguishCancelAndClose?"close":"cancel")},I=Xx(P),L=U=>{if(c.inputType!=="textarea")return U.preventDefault(),V("confirm")},V=U=>{var X;t.boxType==="prompt"&&U==="confirm"&&!D()||(c.action=U,c.beforeClose?(X=c.beforeClose)==null||X.call(c,U,c,T):T())},D=()=>{if(t.boxType==="prompt"){const U=c.inputPattern;if(U&&!U.test(c.inputValue||""))return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;const X=c.inputValidator;if(typeof X=="function"){const K=X(c.inputValue);if(K===!1)return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;if(typeof K=="string")return c.editorErrorMessage=K,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},z=()=>{const U=C.value.$refs;return U.input||U.textarea},Y=()=>{V("close")},B=()=>{t.closeOnPressEscape&&Y()};return t.lockScroll&&VO(l),{...yo(c),ns:i,overlayEvent:I,visible:l,hasMessage:p,typeClass:u,contentId:d,inputId:h,btnSize:o,iconComponent:f,confirmButtonClasses:x,rootRef:m,focusStartRef:y,headerRef:b,inputRef:C,confirmRef:k,doClose:T,handleClose:Y,onCloseRequested:B,handleWrapperClick:P,handleInputEnter:L,handleAction:V,t:r}}});function R0e(t,e,n,s,i,o){const r=H("el-icon"),a=H("close"),l=H("el-input"),c=H("el-button"),u=H("el-focus-trap"),d=H("el-overlay");return v(),R(bo,{name:"fade-in-linear",onAfterLeave:h=>t.$emit("vanish"),persisted:""},{default:w(()=>[Pe(_(d,{"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:W(`${t.ns.namespace.value}-overlay-message-box`),onClick:t.overlayEvent.onClick,onMousedown:t.overlayEvent.onMousedown,onMouseup:t.overlayEvent.onMouseup},[_(u,{loop:"",trapped:t.visible,"focus-trap-el":t.rootRef,"focus-start-el":t.focusStartRef,onReleaseRequested:t.onCloseRequested},{default:w(()=>[g("div",{ref:"rootRef",class:W([t.ns.b(),t.customClass,t.ns.is("draggable",t.draggable),{[t.ns.m("center")]:t.center}]),style:Ke(t.customStyle),tabindex:"-1",onClick:Be(()=>{},["stop"])},[t.title!==null&&t.title!==void 0?(v(),$("div",{key:0,ref:"headerRef",class:W([t.ns.e("header"),{"show-close":t.showClose}])},[g("div",{class:W(t.ns.e("title"))},[t.iconComponent&&t.center?(v(),R(r,{key:0,class:W([t.ns.e("status"),t.typeClass])},{default:w(()=>[(v(),R(Tt(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),g("span",null,M(t.title),1)],2),t.showClose?(v(),$("button",{key:0,type:"button",class:W(t.ns.e("headerbtn")),"aria-label":t.t("el.messagebox.close"),onClick:h=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),onKeydown:$t(Be(h=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"])},[_(r,{class:W(t.ns.e("close"))},{default:w(()=>[_(a)]),_:1},8,["class"])],42,["aria-label","onClick","onKeydown"])):O("v-if",!0)],2)):O("v-if",!0),g("div",{id:t.contentId,class:W(t.ns.e("content"))},[g("div",{class:W(t.ns.e("container"))},[t.iconComponent&&!t.center&&t.hasMessage?(v(),R(r,{key:0,class:W([t.ns.e("status"),t.typeClass])},{default:w(()=>[(v(),R(Tt(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),t.hasMessage?(v(),$("div",{key:1,class:W(t.ns.e("message"))},[ae(t.$slots,"default",{},()=>[t.dangerouslyUseHTMLString?(v(),R(Tt(t.showInput?"label":"p"),{key:1,for:t.showInput?t.inputId:void 0,innerHTML:t.message},null,8,["for","innerHTML"])):(v(),R(Tt(t.showInput?"label":"p"),{key:0,for:t.showInput?t.inputId:void 0},{default:w(()=>[G(M(t.dangerouslyUseHTMLString?"":t.message),1)]),_:1},8,["for"]))])],2)):O("v-if",!0)],2),Pe(g("div",{class:W(t.ns.e("input"))},[_(l,{id:t.inputId,ref:"inputRef",modelValue:t.inputValue,"onUpdate:modelValue":h=>t.inputValue=h,type:t.inputType,placeholder:t.inputPlaceholder,"aria-invalid":t.validateError,class:W({invalid:t.validateError}),onKeydown:$t(t.handleInputEnter,["enter"])},null,8,["id","modelValue","onUpdate:modelValue","type","placeholder","aria-invalid","class","onKeydown"]),g("div",{class:W(t.ns.e("errormsg")),style:Ke({visibility:t.editorErrorMessage?"visible":"hidden"})},M(t.editorErrorMessage),7)],2),[[Xt,t.showInput]])],10,["id"]),g("div",{class:W(t.ns.e("btns"))},[t.showCancelButton?(v(),R(c,{key:0,loading:t.cancelButtonLoading,"loading-icon":t.cancelButtonLoadingIcon,class:W([t.cancelButtonClass]),round:t.roundButton,size:t.btnSize,onClick:h=>t.handleAction("cancel"),onKeydown:$t(Be(h=>t.handleAction("cancel"),["prevent"]),["enter"])},{default:w(()=>[G(M(t.cancelButtonText||t.t("el.messagebox.cancel")),1)]),_:1},8,["loading","loading-icon","class","round","size","onClick","onKeydown"])):O("v-if",!0),Pe(_(c,{ref:"confirmRef",type:"primary",loading:t.confirmButtonLoading,"loading-icon":t.confirmButtonLoadingIcon,class:W([t.confirmButtonClasses]),round:t.roundButton,disabled:t.confirmButtonDisabled,size:t.btnSize,onClick:h=>t.handleAction("confirm"),onKeydown:$t(Be(h=>t.handleAction("confirm"),["prevent"]),["enter"])},{default:w(()=>[G(M(t.confirmButtonText||t.t("el.messagebox.confirm")),1)]),_:1},8,["loading","loading-icon","class","round","disabled","size","onClick","onKeydown"]),[[Xt,t.showConfirmButton]])],2)],14,["onClick"])]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,["aria-label","aria-describedby","onClick","onMousedown","onMouseup"])]),_:3},8,["z-index","overlay-class","mask"]),[[Xt,t.visible]])]),_:3},8,["onAfterLeave"])}var V0e=Ye(D0e,[["render",R0e],["__file","index.vue"]]);const wg=new Map,F0e=t=>{let e=document.body;return t.appendTo&&(nt(t.appendTo)&&(e=document.querySelector(t.appendTo)),Yo(t.appendTo)&&(e=t.appendTo),Yo(e)||(e=document.body)),e},N0e=(t,e,n=null)=>{const s=_(V0e,t,ot(t.message)||Gs(t.message)?{default:ot(t.message)?t.message:()=>t.message}:null);return s.appContext=n,fc(s,e),F0e(t).appendChild(e.firstElementChild),s.component},B0e=()=>document.createElement("div"),z0e=(t,e)=>{const n=B0e();t.onVanish=()=>{fc(null,n),wg.delete(i)},t.onAction=o=>{const r=wg.get(i);let a;t.showInput?a={value:i.inputValue,action:o}:a=o,t.callback?t.callback(a,s.proxy):o==="cancel"||o==="close"?t.distinguishCancelAndClose&&o!=="cancel"?r.reject("close"):r.reject("cancel"):r.resolve(a)};const s=N0e(t,n,e),i=s.proxy;for(const o in t)Rt(t,o)&&!Rt(i.$props,o)&&(i[o]=t[o]);return i.visible=!0,i};function Nf(t,e=null){if(!Ut)return Promise.reject();let n;return nt(t)||Gs(t)?t={message:t}:n=t.callback,new Promise((s,i)=>{const o=z0e(t,e??Nf._context);wg.set(o,{options:t,callback:n,resolve:s,reject:i})})}const H0e=["alert","confirm","prompt"],U0e={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};H0e.forEach(t=>{Nf[t]=j0e(t)});function j0e(t){return(e,n,s,i)=>{let o="";return Ct(n)?(s=n,o=""):js(n)?o="":o=n,Nf(Object.assign({title:o,message:e,type:"",...U0e[t]},s,{boxType:t}),i)}}Nf.close=()=>{wg.forEach((t,e)=>{e.doClose()}),wg.clear()};Nf._context=null;const xl=Nf;xl.install=t=>{xl._context=t._context,t.config.globalProperties.$msgbox=xl,t.config.globalProperties.$messageBox=xl,t.config.globalProperties.$alert=xl.alert,t.config.globalProperties.$confirm=xl.confirm,t.config.globalProperties.$prompt=xl.prompt};const K2=xl,cV=["success","info","warning","error"],W0e=Ze({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:ms},id:{type:String,default:""},message:{type:xe([String,Object]),default:""},offset:{type:Number,default:0},onClick:{type:xe(Function),default:()=>{}},onClose:{type:xe(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:[...cV,""],default:""},zIndex:Number}),Y0e={destroy:()=>!0},G0e=se({name:"ElNotification"}),q0e=se({...G0e,props:W0e,emits:Y0e,setup(t,{expose:e}){const n=t,{ns:s,zIndex:i}=t4("notification"),{nextZIndex:o,currentZIndex:r}=i,{Close:a}=EO,l=J(!1);let c;const u=q(()=>{const k=n.type;return k&&af[n.type]?s.m(k):""}),d=q(()=>n.type&&af[n.type]||n.icon),h=q(()=>n.position.endsWith("right")?"right":"left"),f=q(()=>n.position.startsWith("top")?"top":"bottom"),p=q(()=>{var k;return{[f.value]:`${n.offset}px`,zIndex:(k=n.zIndex)!=null?k:r.value}});function m(){n.duration>0&&({stop:c}=j3(()=>{l.value&&y()},n.duration))}function b(){c==null||c()}function y(){l.value=!1}function C({code:k}){k===ft.delete||k===ft.backspace?b():k===ft.esc?l.value&&y():m()}return Pt(()=>{m(),o(),l.value=!0}),is(document,"keydown",C),e({visible:l,close:y}),(k,x)=>(v(),R(bo,{name:A(s).b("fade"),onBeforeLeave:k.onClose,onAfterLeave:S=>k.$emit("destroy"),persisted:""},{default:w(()=>[Pe(g("div",{id:k.id,class:W([A(s).b(),k.customClass,A(h)]),style:Ke(A(p)),role:"alert",onMouseenter:b,onMouseleave:m,onClick:k.onClick},[A(d)?(v(),R(A(ye),{key:0,class:W([A(s).e("icon"),A(u)])},{default:w(()=>[(v(),R(Tt(A(d))))]),_:1},8,["class"])):O("v-if",!0),g("div",{class:W(A(s).e("group"))},[g("h2",{class:W(A(s).e("title")),textContent:M(k.title)},null,10,["textContent"]),Pe(g("div",{class:W(A(s).e("content")),style:Ke(k.title?void 0:{margin:0})},[ae(k.$slots,"default",{},()=>[k.dangerouslyUseHTMLString?(v(),$(te,{key:1},[O(" Caution here, message could've been compromised, never use user's input as message "),g("p",{innerHTML:k.message},null,8,["innerHTML"])],2112)):(v(),$("p",{key:0},M(k.message),1))])],6),[[Xt,k.message]]),k.showClose?(v(),R(A(ye),{key:0,class:W(A(s).e("closeBtn")),onClick:Be(y,["stop"])},{default:w(()=>[_(A(a))]),_:1},8,["class","onClick"])):O("v-if",!0)],2)],46,["id","onClick"]),[[Xt,l.value]])]),_:3},8,["name","onBeforeLeave","onAfterLeave"]))}});var X0e=Ye(q0e,[["__file","notification.vue"]]);const N_={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},O6=16;let K0e=1;const _f=function(t={},e=null){if(!Ut)return{close:()=>{}};(typeof t=="string"||Gs(t))&&(t={message:t});const n=t.position||"top-right";let s=t.offset||0;N_[n].forEach(({vm:u})=>{var d;s+=(((d=u.el)==null?void 0:d.offsetHeight)||0)+O6}),s+=O6;const i=`notification_${K0e++}`,o=t.onClose,r={...t,offset:s,id:i,onClose:()=>{Z0e(i,n,o)}};let a=document.body;Yo(t.appendTo)?a=t.appendTo:nt(t.appendTo)&&(a=document.querySelector(t.appendTo)),Yo(a)||(a=document.body);const l=document.createElement("div"),c=_(X0e,r,Gs(r.message)?{default:()=>r.message}:null);return c.appContext=e??_f._context,c.props.onDestroy=()=>{fc(null,l)},fc(c,l),N_[n].push({vm:c}),a.appendChild(l.firstElementChild),{close:()=>{c.component.exposed.visible.value=!1}}};cV.forEach(t=>{_f[t]=(e={})=>((typeof e=="string"||Gs(e))&&(e={message:e}),_f({...e,type:t}))});function Z0e(t,e,n){const s=N_[e],i=s.findIndex(({vm:c})=>{var u;return((u=c.component)==null?void 0:u.props.id)===t});if(i===-1)return;const{vm:o}=s[i];if(!o)return;n==null||n(o);const r=o.el.offsetHeight,a=e.split("-")[0];s.splice(i,1);const l=s.length;if(!(l<1))for(let c=i;c<l;c++){const{el:u,component:d}=s[c].vm,h=Number.parseInt(u.style[a],10)-r-O6;d.props.offset=h}}function J0e(){for(const t of Object.values(N_))t.forEach(({vm:e})=>{e.component.exposed.visible.value=!1})}_f.closeAll=J0e;_f._context=null;const Q0e=Roe(_f,"$notify");/*! | |
| 74 | + m 0 ${$?"":"-"}${C} | |
| 75 | + a ${C} ${C} 0 1 1 0 ${$?"-":""}${C*2} | |
| 76 | + a ${C} ${C} 0 1 1 0 ${$?"":"-"}${C*2} | |
| 77 | + `}),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"?J4:n.type==="line"?n.status==="success"?G4:Zc:n.status==="success"?q4:Bo),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((S,M)=>Ke(S)?{color:S,percentage:(M+1)*$}:S).sort((S,M)=>S.percentage-M.percentage)}const k=C=>{var S;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(S=M[M.length-1])==null?void 0:S.color}};return(C,$)=>(v(),A("div",{class:q([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:q(E(i).b("bar"))},[g("div",{class:q(E(i).be("bar","outer")),style:Xe({height:`${t.strokeWidth}px`})},[g("div",{class:q([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:q(E(i).be("bar","innerText"))},[le(C.$slots,"default",{percentage:t.percentage},()=>[g("span",null,x(y.value),1)])],2)):O("v-if",!0)],6)],6)],2)):(v(),A("div",{key:1,class:q(E(i).b("circle")),style:Xe({height:`${t.width}px`,width:`${t.width}px`})},[(v(),A("svg",Mve,[g("path",{class:q(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,Tve),g("path",{class:q(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,Pve)]))],6)),(t.showText||C.$slots.default)&&!t.textInside?(v(),A("div",{key:2,class:q(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",Ive,x(y.value),1))])],6)):O("v-if",!0)],10,Eve))}}),Ove=Lve;const a2=qt(Ove),Dve="horizontal",Rve=({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=>{zie(s);let{deltaX:c,deltaY:u}=l;l.shiftKey&&u!==0&&(c=u,u=0);const d=n.value===Dve?c:u;r(d)||(o+=d,!M4()&&d!==0&&l.preventDefault(),s=Yg(()=>{i(o),o=0}))}}},Vve=Ge({animated:Boolean,count:{type:Number,default:1},rows:{type:Number,default:3},loading:{type:Boolean,default:!0},throttle:{type:de([Number,Object])}}),Fve=Ge({variant:{type:String,values:["circle","rect","h1","h3","text","caption","p","image","button"],default:"text"}});var Nve=fe({name:"ElSkeletonItem",__name:"skeleton-item",props:Fve,setup(t){const e=Be("skeleton");return(n,i)=>(v(),A("div",{class:q([E(e).e("item"),E(e).e(t.variant)])},[t.variant==="image"?(v(),D(E(ble),{key:0})):O("v-if",!0)],2))}}),$y=Nve,Bve=fe({name:"ElSkeleton",__name:"skeleton",props:Vve,setup(t,{expose:e}){const n=t,i=Be("skeleton"),s=Joe(Sn(n,"loading"),n.throttle);return e({uiLoading:s}),(o,r)=>E(s)?(v(),A("div",Wt({key:0,class:[E(i).b(),E(i).is("animated",t.animated)]},o.$attrs),[(v(!0),A(ee,null,we(t.count,a=>(v(),A(ee,{key:a},[E(s)?le(o.$slots,"template",{key:a},()=>[_($y,{class:q(E(i).is("first")),variant:"p"},null,8,["class"]),(v(!0),A(ee,null,we(t.rows,l=>(v(),D($y,{key:l,class:q([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",ef(Wt({key:1},o.$attrs)))}}),zve=Bve;const Nt=qt(zve,{SkeletonItem:$y});Os($y);const rF=t=>["",...$l].includes(t),Hve=Ge({modelValue:{type:[Boolean,String,Number],default:!1},disabled:{type:Boolean,default:void 0},loading:Boolean,size:{type:String,validator:rF},width:{type:[String,Number],default:""},inlinePrompt:Boolean,inactiveActionIcon:{type:ds},activeActionIcon:{type:ds},activeIcon:{type:ds},inactiveIcon:{type:ds},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:de(Function)},id:String,tabindex:{type:[String,Number]},...xr(["ariaLabel"])}),Uve={[Mt]:t=>Jn(t)||Ke(t)||wt(t),[dn]:t=>Jn(t)||Ke(t)||wt(t),[Do]:t=>Jn(t)||Ke(t)||wt(t)},jve=["id","aria-checked","aria-disabled","aria-label","name","true-value","false-value","disabled","tabindex"],Wve=["aria-hidden"],Yve={key:1},qve={key:1},Gve=["aria-hidden"],zw="ElSwitch";var Xve=fe({name:zw,__name:"switch",props:Hve,emits:Uve,setup(t,{expose:e,emit:n}){const i=t,s=n,{formItem:o}=_o(),r=Ii(),a=Be("switch"),{inputId:l}=Tl(i,{formItemContext:o}),c=bs(Y(()=>{if(i.loading)return!0})),u=J(i.modelValue!==!1),d=Fn(),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:fi(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(dn,i.inactiveValue),s(Do,i.inactiveValue)),Te(b,S=>{var M;d.value.checked=S,i.validateEvent&&((M=o==null?void 0:o.validate)==null||M.call(o,"change").catch(P=>Tt(P)))});const k=()=>{const S=b.value?i.inactiveValue:i.activeValue;s(Mt,S),s(dn,S),s(Do,S),ot(()=>{d.value.checked=b.value})},C=()=>{if(c.value)return;const{beforeChange:S}=i;if(!S){k();return}const M=S();[dd(M),Jn(M)].includes(!0)||vo(zw,"beforeChange must return type `Promise<boolean>` or `boolean`"),dd(M)?M.then(P=>{P&&k()}).catch(P=>{Tt(zw,`some error occurred: ${P}`)}):M&&k()},$=()=>{var S,M;(M=(S=d.value)==null?void 0:S.focus)==null||M.call(S)};return Ft(()=>{d.value.checked=b.value}),e({focus:$,checked:b}),(S,M)=>(v(),A("div",{class:q(h.value),onClick:Ee(C,["prevent"])},[g("input",{id:E(l),ref_key:"input",ref:d,class:q(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,jve),!t.inlinePrompt&&(t.inactiveIcon||t.inactiveText||S.$slots.inactive)?(v(),A("span",{key:0,class:q(f.value)},[le(S.$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},x(t.inactiveText),9,Wve)):O("v-if",!0)])],2)):O("v-if",!0),g("span",{class:q(E(a).e("core")),style:Xe(m.value)},[t.inlinePrompt?(v(),A("div",{key:0,class:q(E(a).e("inner"))},[b.value?(v(),A("div",{key:1,class:q(E(a).e("inner-wrapper"))},[le(S.$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",qve,x(t.activeText),1)):O("v-if",!0)])],2)):(v(),A("div",{key:0,class:q(E(a).e("inner-wrapper"))},[le(S.$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",Yve,x(t.inactiveText),1)):O("v-if",!0)])],2))],2)):O("v-if",!0),g("div",{class:q(E(a).e("action"))},[t.loading?(v(),D(E(be),{key:0,class:q(E(a).is("loading"))},{default:w(()=>[_(E(Uf))]),_:1},8,["class"])):b.value?le(S.$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(S.$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||S.$slots.active)?(v(),A("span",{key:1,class:q(p.value)},[le(S.$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},x(t.activeText),9,Gve)):O("v-if",!0)])],2)):O("v-if",!0)],2))}}),Kve=Xve;const eu=qt(Kve),Hw=function(t){var e;return(e=t.target)==null?void 0:e.closest("td")},Zve=function(t,e,n,i,s){if(!e&&!i&&(!s||Me(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?aD(Us(s),c=>Ke(c)?ji(a,c):c(a,l,t)):(e!=="$key"&&yt(a)&&"$value"in a&&(a=a.$value),[yt(a)?e?ji(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)},aF=function(t,e){let n=null;return t.columns.forEach(i=>{i.id===e&&(n=i)}),n},Jve=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||vo("ElTable",`No column matching with column-key: ${e}`),n},SA=function(t,e,n){const i=(e.className||"").match(new RegExp(`${n}-table_[^\\s]+`,"gm"));return i?aF(t,i[0]):null},ai=(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""},lf=function(t,e,n=!1,i="children"){const s=t||[],o={};return s.forEach((r,a)=>{if(o[ai(r,e)]={row:r,index:a},n){const l=r[i];Me(l)&&Object.assign(o,lf(l,e,!0,i))}}),o};function Qve(t,e){const n={};let i;for(i in t)n[i]=t[i];for(i in e)if(zt(e,i)){const s=e[i];nn(s)||(n[i]=s)}return n}function x8(t){return t===""||nn(t)||(t=Number.parseInt(t,10),Number.isNaN(t)&&(t="")),t}function lF(t){return t===""||nn(t)||(t=x8(t),Number.isNaN(t)&&(t=80)),t}function e0e(t){return wt(t)?t:Ke(t)?/^\d+(?:px)?$/.test(t)?Number.parseInt(t,10):t:null}function t0e(...t){return t.length===0?e=>e:t.length===1?t[0]:t.reduce((e,n)=>(...i)=>e(n(...i)))}function Ay(t,e,n,i,s,o,r){let a=o??0,l=!1;const u=(()=>{if(!r)return t.indexOf(e);const m=ai(e,r);return t.findIndex(y=>ai(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&&Me(b)&&(y+=b.length,b.forEach(k=>{y+=p(k)})),y};return(!s||h)&&(Jn(n)?n&&!d?f("add"):!n&&d&&f("remove"):f(d?"remove":"add")),!(i!=null&&i.checkStrictly)&&(i!=null&&i.children)&&Me(e[i.children])&&e[i.children].forEach(m=>{const y=Ay(t,m,n??!d,i,s,a+1,r);a+=p(m)+1,y&&(l=y)}),l}function n0e(t,e,n="children",i="hasChildren",s=!1){const o=a=>!(Me(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 s0e=(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:Ac(n,i.property).value}):void 0;return is(o)?{slotContent:o,content:null,...t,popperOptions:s}:{slotContent:null,content:o??e,...t,popperOptions:s}};let Rn=null;function i0e(t,e,n,i,s,o){var f;const r=s0e(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;lD(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=_(Ss,{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");Fc(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(),Fc(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 cF(t){return t.children?aD(t.children,cF):[t]}function $A(t,e){return t+e.colSpan}const uF=(t,e,n,i)=>{let s=0,o=t;const r=n.states.columns.value;if(i){const l=cF(i[t]);s=r.slice(0,r.indexOf(l[0])).reduce($A,0),o=s+l.reduce($A,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}:{}},S8=(t,e,n,i,s,o=0)=>{const r=[],{direction:a,start:l,after:c}=uF(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 AA(t,e){return t+(Bb(e.realWidth)||Number.isNaN(e.realWidth)?Number(e.width):e.realWidth)}const $8=(t,e,n,i)=>{const{direction:s,start:o=0,after:r=0}=uF(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(AA,0):a.right=c.slice(r+1).reverse().reduce(AA,0),a},qf=(t,e)=>{t&&(Number.isNaN(t[e])||(t[e]=`${t[e]}px`))};function dF(t){return t.some(e=>is(e)?!(e.type===Zn||e.type===ee&&!dF(e.children)):!0)?t:null}function o0e(t){const e=pt(),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=lf(i.value,u);i.value=c.filter((h,f)=>!!d[ai(h,u)]&&s(h,f))}else i.value=[]},toggleRowExpansion:(c,u)=>{const d=(t.data.value||[]).indexOf(c);d>-1&&!s(c,d)||Ay(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=lf(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?!!lf(i.value,u)[ai(c,u)]:i.value.includes(c)},states:{expandRows:i,defaultExpandAll:n}}}function r0e(t){const e=pt(),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=>ai(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(ai(d,c)):(i.value=null,e.emit("current-change",null,d)):n.value&&(r(n.value),o())},states:{_currentRowKey:n,currentRow:i}}}function a0e(t){const e=J([]),n=J({}),i=J(16),s=J(!1),o=J({}),r=J("hasChildren"),a=J("children"),l=J(!1),c=pt(),u=Y(()=>t.rowKey.value?h(t.data.value||[]):{}),d=Y(()=>{const $=t.rowKey.value,S=Object.keys(o.value),M={};return S.length&&S.forEach(P=>{if(o.value[P].length){const T={children:[]};o.value[P].forEach(I=>{const L=ai(I,$);T.children.push(L),I[r.value]&&!M[L]&&(M[L]={children:[]})}),M[P]=T}}),M}),h=$=>{const S=t.rowKey.value,M={};return n0e($,(P,T,I)=>{const L=ai(P,S);Me(T)?M[L]={children:T.map(R=>ai(R,S)),level:I}:s.value&&(M[L]={children:[],lazy:!0,level:I})},a.value,r.value,s.value),M},f=($=!1,S)=>{var L,R;S||(S=(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),B=[],F=(U,G)=>{if($)return e.value?S||e.value.includes(G):!!(S||U!=null&&U.expanded);{const K=S||e.value&&e.value.includes(G);return!!(U!=null&&U.expanded||K)}};T.forEach(U=>{const G=V[U],K={...M[U]};if(K.expanded=F(G,U),K.lazy){const{loaded:X=!1,loading:W=!1}=G||{};K.loaded=!!X,K.loading=!!W,B.push(U)}I[U]=K});const z=Object.keys(P);s.value&&z.length&&B.length&&z.forEach(U=>{var X;const G=V[U],K=P[U].children;if(B.includes(U)){if(((X=I[U].children)==null?void 0:X.length)!==0)throw new Error("[ElTable]children must be an empty array.");I[U].children=K}else{const{loaded:W=!1,loading:Q=!1}=G||{};I[U]={lazy:!0,loaded:!!W,loading:!!Q,expanded:F(G,U),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=($,S)=>{c.store.assertRowKey();const M=t.rowKey.value,P=ai($,M),T=P&&n.value[P];if(P&&T&&"expanded"in T){const I=T.expanded;S=nn(S)?!T.expanded:S,n.value[P].expanded=S,I!==S&&c.emit("expand-change",$,S),S&&m(T)&&k($,P,T),c.store.updateTableScrollY()}},b=$=>{c.store.assertRowKey();const S=t.rowKey.value,M=ai($,S),P=n.value[M];m(P)?k($,M,P):y($,void 0)},k=($,S,M)=>{const{load:P}=c.props;P&&!n.value[S].loaded&&(n.value[S].loading=!0,P($,M,T=>{if(!Me(T))throw new TypeError("[ElTable] data must be an array");n.value[S].loading=!1,n.value[S].loaded=!0,n.value[S].expanded=!0,T.length&&(o.value[S]=T),c.emit("expand-change",$,!0)}))};return{loadData:k,loadOrToggle:b,toggleTreeExpansion:y,updateTreeExpandKeys:p,updateTreeData:f,updateKeyChildren:($,S)=>{const{lazy:M,rowKey:P}=c.props;if(M){if(!P)throw new Error("[Table] rowKey is required in updateKeyChild");o.value[$]&&(o.value[$]=S)}},normalize:h,states:{expandRowKeys:e,treeData:n,indent:i,lazy:s,lazyTreeNodeMap:o,lazyColumnIdentifier:r,childrenColumnName:a,checkStrictly:l}}}const l0e=(t,e)=>{const n=e.sortingColumn;return!n||Ke(n.sortable)?t:Zve(t,e.sortProp,e.sortOrder,n.sortMethod,n.sortBy)},B0=t=>{const e=[];return t.forEach(n=>{n.children&&n.children.length>0?e.push.apply(e,B0(n.children)):e.push(n)}),e};function c0e(){var Lt;const t=pt(),{size:e}=go((Lt=t.proxy)==null?void 0:Lt.$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),S=J(!1),M=J(null),P=J(null),T=J({}),I=J(null),L=J(null),R=J(null),V=J(null),B=J(null),F=Y(()=>n.value?lf(C.value,n.value):void 0);Te(i,()=>{var Je;t.state&&(K(!1),t.props.tableLayout==="auto"&&((Je=t.refs.tableHeaderRef)==null||Je.updateFixedColumnStyle()))},{deep:!0});const z=()=>{if(!n.value)throw new Error("[ElTable] prop row-key is required")},U=Je=>{var dt;(dt=Je.children)==null||dt.forEach(mt=>{mt.fixed=Je.fixed,U(mt)})},G=()=>{r.value.forEach(De=>{U(De)}),c.value=r.value.filter(De=>[!0,"left"].includes(De.fixed));const Je=r.value.find(De=>De.type==="selection");let dt;Je&&Je.fixed!=="right"&&!c.value.includes(Je)&&r.value.indexOf(Je)===0&&c.value.length&&(c.value.unshift(Je),dt=!0),u.value=r.value.filter(De=>De.fixed==="right");const mt=r.value.filter(De=>(dt?De.type!=="selection":!0)&&!De.fixed);a.value=Array.from(c.value).concat(mt).concat(u.value);const _e=B0(mt),Oe=B0(c.value),ce=B0(u.value);m.value=_e.length,y.value=Oe.length,b.value=ce.length,l.value=Array.from(Oe).concat(_e).concat(ce),o.value=c.value.length>0||u.value.length>0},K=(Je,dt=!1)=>{Je&&G(),dt?t.state.doLayout():t.state.debouncedUpdateLayout()},X=Je=>F.value?!!F.value[ai(Je,n.value)]:C.value.includes(Je),W=()=>{k.value=!1;const Je=C.value;C.value=[],Je.length&&t.emit("selection-change",[])},Q=()=>{var dt,mt;let Je;if(n.value){Je=[];const _e=(mt=(dt=t==null?void 0:t.store)==null?void 0:dt.states)==null?void 0:mt.childrenColumnName.value,Oe=lf(i.value,n.value,!0,_e);for(const ce in F.value)zt(F.value,ce)&&!Oe[ce]&&Je.push(F.value[ce].row)}else Je=C.value.filter(_e=>!i.value.includes(_e));if(Je.length){const _e=C.value.filter(Oe=>!Je.includes(Oe));C.value=_e,t.emit("selection-change",_e.slice())}},ne=()=>(C.value||[]).slice(),Z=(Je,dt,mt=!0,_e=!1)=>{var ce,De,gt,bn;const Oe={children:(De=(ce=t==null?void 0:t.store)==null?void 0:ce.states)==null?void 0:De.childrenColumnName.value,checkStrictly:(bn=(gt=t==null?void 0:t.store)==null?void 0:gt.states)==null?void 0:bn.checkStrictly.value};if(Ay(C.value,Je,dt,Oe,_e?void 0:M.value,i.value.indexOf(Je),n.value)){const gs=(C.value||[]).slice();mt&&t.emit("select",gs,Je),t.emit("selection-change",gs)}},ae=()=>{var De,gt;const Je=S.value?!k.value:!(k.value||C.value.length);k.value=Je;let dt=!1,mt=0;const _e=(gt=(De=t==null?void 0:t.store)==null?void 0:De.states)==null?void 0:gt.rowKey.value,{childrenColumnName:Oe}=t.store.states,ce={children:Oe.value,checkStrictly:!1};i.value.forEach((bn,gs)=>{const du=gs+mt;Ay(C.value,bn,Je,ce,M.value,du,_e)&&(dt=!0),mt+=Ce(ai(bn,_e))}),dt&&t.emit("selection-change",C.value?C.value.slice():[]),t.emit("select-all",(C.value||[]).slice())},ge=()=>{var ce;if(((ce=i.value)==null?void 0:ce.length)===0){k.value=!1;return}const{childrenColumnName:Je}=t.store.states;let dt=0,mt=0;const _e=De=>{var gt;for(const bn of De){const gs=M.value&&M.value.call(null,bn,dt);if(X(bn))mt++;else if(!M.value||gs)return!1;if(dt++,(gt=bn[Je.value])!=null&>.length&&!_e(bn[Je.value]))return!1}return!0},Oe=_e(i.value||[]);k.value=mt===0?!1:Oe},Ce=Je=>{var Oe;if(!t||!t.store)return 0;const{treeData:dt}=t.store.states;let mt=0;const _e=(Oe=dt.value[Je])==null?void 0:Oe.children;return _e&&(mt+=_e.length,_e.forEach(ce=>{mt+=Ce(ce)})),mt},oe=(Je,dt)=>{const mt={};return Us(Je).forEach(_e=>{T.value[_e.id]=dt,mt[_e.columnKey||_e.id]=dt}),mt},pe=(Je,dt,mt)=>{L.value&&L.value!==Je&&(L.value.order=null),L.value=Je,R.value=dt,V.value=mt},ie=()=>{let Je=E(s);Object.keys(T.value).forEach(dt=>{const mt=T.value[dt];if(!mt||mt.length===0)return;const _e=aF({columns:l.value},dt);_e&&_e.filterMethod&&(Je=Je.filter(Oe=>mt.some(ce=>_e.filterMethod.call(null,ce,Oe,_e))))}),I.value=Je},re=()=>{i.value=l0e(I.value??[],{sortingColumn:L.value,sortProp:R.value,sortOrder:V.value})},ke=(Je=void 0)=>{Je!=null&&Je.filter||ie(),re()},je=Je=>{const{tableHeaderRef:dt}=t.refs;if(!dt)return;const mt=Object.assign({},dt.filterPanels),_e=Object.keys(mt);if(_e.length)if(Ke(Je)&&(Je=[Je]),Me(Je)){const Oe=Je.map(ce=>Jve({columns:l.value},ce));_e.forEach(ce=>{const De=Oe.find(gt=>gt.id===ce);De&&(De.filteredValue=[])}),t.store.commit("filterChange",{column:Oe,values:[],silent:!0,multi:!0})}else _e.forEach(Oe=>{const ce=l.value.find(De=>De.id===Oe);ce&&(ce.filteredValue=[])}),T.value={},t.store.commit("filterChange",{column:{},values:[],silent:!0})},te=()=>{L.value&&(pe(null,null,null),t.store.commit("changeSortCondition",{silent:!0}))},{setExpandRowKeys:se,toggleRowExpansion:me,updateExpandRows:$e,states:Se,isRowExpanded:Le}=o0e({data:i,rowKey:n}),{updateTreeExpandKeys:We,toggleTreeExpansion:Fe,updateTreeData:ze,updateKeyChildren:Ae,loadOrToggle:Ze,states:Ye}=a0e({data:i,rowKey:n}),{updateCurrentRowData:it,updateCurrentRow:ye,setCurrentRowKey:ve,states:Pe}=r0e({data:i,rowKey:n});return{assertRowKey:z,updateColumns:G,scheduleLayout:K,isSelected:X,clearSelection:W,cleanSelection:Q,getSelectionRows:ne,toggleRowSelection:Z,_toggleAllSelection:ae,toggleAllSelection:null,updateAllSelected:ge,updateFilters:oe,updateCurrentRow:ye,updateSort:pe,execFilter:ie,execSort:re,execQuery:ke,clearFilter:je,clearSort:te,toggleRowExpansion:me,setExpandRowKeysAdapter:Je=>{se(Je),We(Je)},setCurrentRowKey:ve,toggleRowExpansionAdapter:(Je,dt)=>{l.value.some(({type:mt})=>mt==="expand")?me(Je,dt):Fe(Je,dt)},isRowExpanded:Le,updateExpandRows:$e,updateCurrentRowData:it,loadOrToggle:Ze,updateTreeData:ze,updateKeyChildren:Ae,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:S,selectable:M,rowExpandable:P,filters:T,filteredData:I,sortingColumn:L,sortProp:R,sortOrder:V,hoverRow:B,...Se,...Ye,...Pe}}}function $C(t,e){return t.map(n=>{var i;return n.id===e.id?e:((i=n.children)!=null&&i.length&&(n.children=$C(n.children,e)),n)})}function AC(t){t.forEach(e=>{var n,i;e.no=(n=e.getColumnIndex)==null?void 0:n.call(e),(i=e.children)!=null&&i.length&&AC(e.children)}),t.sort((e,n)=>e.no-n.no)}function u0e(){const t=pt(),e=c0e(),n=Be("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=$C(d,c)):(d.push(l),h=d),AC(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&&(AC(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=$C(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);Bb(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 A8={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 d0e(t,e){if(!t)throw new Error("Table is required.");const n=u0e();return n.toggleAllSelection=_d(n._toggleAllSelection,10),Object.keys(A8).forEach(i=>{hF(fF(e,i),i,n)}),h0e(n,e),n}function h0e(t,e){Object.keys(A8).forEach(n=>{Te(()=>fF(e,n),i=>{hF(i,n,t)})})}function hF(t,e,n){let i=t,s=A8[e];yt(s)&&(i=i||s.default,s=s.key),n.states[s].value=i}function fF(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 f0e=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)zt(t,e)&&(hn(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(Bb(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(!Kt)return;const n=this.table.vnode.el;if(t=e0e(t),this.height.value=Number(t),!n&&(t||t===0)){ot(()=>this.setHeight(t,e));return}n&&wt(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(!Kt)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=>!wt(l.width));if(i.forEach(l=>{wt(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 ia=Symbol("ElTable"),pF=t=>{const e=[];return t.forEach(n=>{n.children?(e.push(n),e.push.apply(e,pF(n.children))):e.push(n)}),e},mF=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 pF(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 p0e(t){const e=qe(ia),n=Y(()=>mF(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 m0e=fe({name:"ElTableFilterPanel",components:{ElCheckbox:Yt,ElCheckboxGroup:s2,ElScrollbar:qs,ElTooltip:Ss,ElIcon:be,ArrowDown:Bd,ArrowUp:Zb},props:{placement:{type:String,default:"bottom-start"},store:{type:Object},column:{type:Object},upDataColumn:{type:Function},appendTo:zn.appendTo},setup(t){const e=pt(),{t:n}=Qt(),i=Be("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&&(ka(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,ka(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&&S(),t.column&&((T=t.upDataColumn)==null||T.call(t,"filterOpened",!0))},$=()=>{var P;t.column&&((P=t.upDataColumn)==null||P.call(t,"filterOpened",!1))},S=()=>{if(ka(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:ka,isActive:f,t:n,ns:i,tooltipRef:o,rootRef:r,checkedIndex:a,handleShowTooltip:C,handleHideTooltip:$,handleKeydown:P=>{var V,B;const T=ls(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,(B=(V=r.value)==null?void 0:V.querySelector(`.${i.e("list-item")}:nth-child(${L+1})`))==null||B.focus()}}}});const g0e=["disabled"],v0e=["tabindex","aria-checked"],_0e=["tabindex","aria-checked","onClick"],y0e=["aria-label"];function b0e(t,e,n,i,s,o){const r=H("el-checkbox"),a=H("el-checkbox-group"),l=H("el-scrollbar"),c=H("arrow-up"),u=H("arrow-down"),d=H("el-icon"),h=H("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:q(t.ns.e("multiple"))},[g("div",{class:q(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:q(t.ns.e("checkbox-group"))},{default:w(()=>[(v(!0),A(ee,null,we(t.filters,f=>(v(),D(r,{key:f.value,value:f.value},{default:w(()=>[N(x(f.text),1)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue","class"])]),_:1},8,["wrap-class"])],2),g("div",{class:q(t.ns.e("bottom"))},[g("button",{class:q(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))},x(t.t("el.table.confirmFilter")),11,g0e),g("button",{type:"button",onClick:e[2]||(e[2]=(...f)=>t.handleReset&&t.handleReset(...f))},x(t.t("el.table.resetFilter")),1)],2)],2)):(v(),A("ul",{key:1,ref:"rootRef",tabindex:"-1",role:"radiogroup",class:q(t.ns.e("list")),onKeydown:e[4]||(e[4]=(...f)=>t.handleKeydown&&t.handleKeydown(...f))},[g("li",{role:"radio",class:q([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))},x(t.t("el.table.clearFilter")),11,v0e),(v(!0),A(ee,null,we(t.filters,(f,p)=>(v(),A("li",{key:f.value,role:"radio",class:q([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)},x(f.text),11,_0e))),128))],34))]),default:w(()=>{var f;return[g("button",{type:"button",class:q(`${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,y0e)]}),_:3},8,["placement","popper-class","append-to","onShow","onHide"])}var w0e=gi(m0e,[["render",b0e]]);function E8(t){const e=pt();Od(()=>{n.value.addObserver(e)}),Ft(()=>{i(n.value),s(n.value)}),xl(()=>{i(n.value),s(n.value)}),Sl(()=>{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 k0e(t,e){const n=pt(),i=qe(ia),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(Kt&&!(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 S=(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-S+30;yd(M,"noclick"),c.value={startMouseLeft:m.clientX,startLeft:P.right-S,startColumnLeft:P.left-S,tableLeft:S};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 B=V.clientX-c.value.startMouseLeft,F=c.value.startLeft+B;I.style.left=`${Math.max(T,F)}px`},R=()=>{if(l.value){const{startColumnLeft:V,startLeft:B}=c.value;y.width=y.realWidth=Number.parseInt(I.style.left,10)-V,$==null||$.emit("header-dragend",y.width,B-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(()=>{Ma(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=Po(b)?b.closest("th"):null;if(!k)return;const C=pl(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(),S=((I=k.parentNode)==null?void 0:I.lastElementChild)===k,M=t.allowDragLastColumn||!S,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=()=>{!Kt||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&&pl(C,"noclick")){Ma(C,"noclick");return}if(!y.sortable)return;const $=m.currentTarget;if(["ascending","descending"].some(L=>pl($,L)&&!y.sortOrders.includes(L)))return;const S=t.store.states;let M=S.sortProp.value,P;const T=S.sortingColumn.value;(T!==y||T===y&&Bb(T.order))&&(T&&(T.order=null),S.sortingColumn.value=y,M=y.property),k?P=y.order=k:P=y.order=null,S.sortProp.value=M,S.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 C0e(t){const e=qe(ia),n=Be("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=$8(l,u.fixed,t.store,c);return qf(h,"left"),qf(h,"right"),Object.assign({},d,h)},getHeaderCellClass:(a,l,c,u)=>{const d=S8(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 x0e=fe({name:"ElTableHeader",components:{ElCheckbox:Yt},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=pt(),i=qe(ia),s=Be("table"),o=J({}),{onColumnsChange:r,onScrollableChange:a}=E8(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,B)=>{const F=u.value.querySelector(`.${B.replace(/\s/g,".")}`);F&&(V.width=F.getBoundingClientRect().width||V.width)}),c.clear())})};Te(c,h),wn(()=>{d&&(clearTimeout(d),d=void 0)}),Ft(async()=>{await ot(),await ot();const{prop:V,order:B}=t.defaultSort;i==null||i.store.commit("sort",{prop:V,order:B,init:!0}),h()});const{handleHeaderClick:f,handleHeaderContextMenu:p,handleMouseDown:m,handleMouseMove:y,handleMouseOut:b,handleSortClick:k,handleFilterClick:C}=k0e(t,e),{getHeaderRowStyle:$,getHeaderRowClass:S,getHeaderCellStyle:M,getHeaderCellClass:P}=C0e(t),{isGroup:T,toggleAllSelection:I,columnRows:L}=p0e(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:S,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 bt("thead",{ref:"theadRef",class:t.is("group",n)},i.map((C,$)=>bt("tr",{class:r($),key:$,style:a($)},C.map((S,M)=>{S.rowSpan>k&&(k=S.rowSpan);const P=o($,M,C,S);return b&&S.fixed&&y.set(P,S),bt("th",{class:P,colspan:S.colSpan,key:`${S.id}-thead`,rowspan:S.rowSpan,scope:S.colSpan>1?"colgroup":"col",ariaSort:S.sortable?S.order:void 0,style:s($,M,C,S),onClick:T=>{var I;(I=T.currentTarget)!=null&&I.classList.contains("noclick")||l(T,S)},onContextmenu:T=>c(T,S),onMousedown:T=>u(T,S),onMousemove:T=>d(T,S),onMouseout:f},[bt("div",{class:["cell",S.filteredValue&&S.filteredValue.length>0?"highlight":""]},[S.renderHeader?S.renderHeader({column:S,$index:M,store:p,_self:m}):S.label,S.sortable&&bt("button",{type:"button",class:"caret-wrapper","aria-label":e("el.table.sortLabel",{column:S.label||""}),onClick:T=>h(T,S)},[bt("i",{onClick:T=>h(T,S,"ascending"),class:"sort-caret ascending"}),bt("i",{onClick:T=>h(T,S,"descending"),class:"sort-caret descending"})]),S.filterable&&bt(w0e,{store:p,placement:S.filterPlacement||"bottom-start",appendTo:m==null?void 0:m.appendFilterPanelTo,column:S,upDataColumn:(T,I)=>{S[T]=I}},{"filter-icon":()=>S.renderFilterIcon?S.renderFilterIcon({filterOpened:S.filterOpened}):null})])])}))))}});function cf(t,e,n=.03){return t-e>n}function S0e(t){const e=qe(ia),n=J(""),i=J(bt("div")),s=(p,m,y)=>{var S,M;const b=e,k=Hw(p);let C=null;const $=(S=b==null?void 0:b.vnode.el)==null?void 0:S.dataset.prefix;k&&(C=SA({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=_d(p=>{var m;(m=t.store)==null||m.commit("setHoverRow",p)},30),c=_d(()=>{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 G,K,X;if(!e)return;const b=e,k=Hw(p),C=(G=b==null?void 0:b.vnode.el)==null?void 0:G.dataset.prefix;let $=null;if(k){if($=SA({columns:((K=t.store)==null?void 0:K.states.columns.value)??[]},k,C),!$)return;k.rowSpan>1&&d(k.rowSpan,p,yd);const W=b.hoverState={cell:k,column:$,row:m};b==null||b.emit("cell-mouse-enter",W.row,W.column,W.cell,p)}if(!y){(Rn==null?void 0:Rn.trigger)===k&&(Rn==null||Rn());return}const S=p.target.querySelector(".cell");if(!(pl(S,`${C}-tooltip`)&&S.childNodes.length&&((X=S.textContent)!=null&&X.trim())))return;const M=document.createRange();M.setStart(S,0),M.setEnd(S,S.childNodes.length);const{width:P,height:T}=M.getBoundingClientRect(),{width:I,height:L}=S.getBoundingClientRect(),{top:R,left:V,right:B,bottom:F}=u(S),z=V+B,U=R+F;cf(P+z,I)||cf(T+U,L)||cf(S.scrollWidth,I)?i0e(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=Hw(p);if(!m)return;m.rowSpan>1&&d(m.rowSpan,p,Ma);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 $0e(t){const e=qe(ia),n=Be("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=$8(u,t==null?void 0:t.fixed,t.store);return qf(m,"left"),qf(m,"right"),Object.assign({},p,m)},getCellClass:(c,u,d,h,f)=>{const p=S8(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});Me(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 A0e=["colspan","rowspan"];var E0e=fe({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,A0e))}}),M0e=E0e;function T0e(t){const e=qe(ia),n=Be("table"),{handleDoubleClick:i,handleClick:s,handleContextMenu:o,handleMouseEnter:r,handleMouseLeave:a,handleCellMouseEnter:l,handleCellMouseLeave:c,tooltipContent:u,tooltipTrigger:d}=S0e(t),{getRowStyle:h,getRowClass:f,getCellStyle:p,getCellClass:m,getSpan:y,getColspanRealWidth:b}=$0e(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?ai(T,L):I},S=(T,I,L,R=!1)=>{const{tooltipEffect:V,tooltipOptions:B,store:F}=t,{indent:z,columns:U}=F.states,G=[];let K=!0;return L&&(G.push(n.em("row",`level-${L.level}`)),K=!!L.display),I===0&&(k=-1),t.stripe&&K&&k++,G.push(...f(T,I,k)),bt("tr",{style:[K?null:{display:"none"},h(T,I)],class:G,key:$(T,I),onDblclick:X=>i(X,T),onClick:X=>s(X,T),onContextmenu:X=>o(X,T),onMouseenter:()=>r(I),onMouseleave:a},U.value.map((X,W)=>{const{rowspan:Q,colspan:ne}=y(T,X,I,W);if(!Q||!ne)return null;const Z=Object.assign({},X);Z.realWidth=b(U.value,ne,W);const ae={store:F,_self:t.context||e,column:Z,row:T,$index:I,cellIndex:W,expanded:R};W===C.value&&L&&(ae.treeNode={indent:L.level&&L.level*z.value,level:L.level},Jn(L.expanded)&&(ae.treeNode.expanded=L.expanded,"loading"in L&&(ae.treeNode.loading=L.loading),"noLazyChildren"in L&&(ae.treeNode.noLazyChildren=L.noLazyChildren)));const ge=`${$(T,I)},${W}`,Ce=Z.columnKey||Z.rawColumnKey||"",oe=X.showOverflowTooltip&&lD({effect:V},B,X.showOverflowTooltip);return bt(M0e,{style:p(I,W,T,X),class:m(I,W,T,X,ne-1),key:`${Ce}${ge}`,rowspan:Q,colspan:ne,onMouseenter:pe=>l(pe,T,oe),onMouseleave:c},{default:()=>M(W,X,ae)})}))},M=(T,I,L)=>I.renderCell(L);return{wrappedRowRender:(T,I)=>{const L=t.store,{isRowExpanded:R,assertRowKey:V}=L,{treeData:B,lazyTreeNodeMap:F,childrenColumnName:z,rowKey:U}=L.states,G=L.states.columns.value;if(G.some(({type:K})=>K==="expand")){const K=R(T),X=S(T,I,void 0,K),W=e==null?void 0:e.renderExpanded;if(!W)return console.error("[Element Error]renderExpanded is required."),X;const Q=[[X]];return(e.props.preserveExpandedContent||K)&&Q[0].push(bt("tr",{key:`expanded-row__${X.key}`,style:{display:K?"":"none"}},[bt("td",{colspan:G.length,class:`${n.e("cell")} ${n.e("expanded-cell")}`},[W({row:T,$index:I,store:L,expanded:K})])])),Q}else if(Object.keys(B.value).length){V();const K=ai(T,U.value);let X=B.value[K],W=null;X&&(W={expanded:X.expanded,level:X.level,display:!0,noLazyChildren:void 0,loading:void 0},Jn(X.lazy)&&(W&&Jn(X.loaded)&&X.loaded&&(W.noLazyChildren=!(X.children&&X.children.length)),W.loading=X.loading));const Q=[S(T,I,W??void 0)];if(X){let ne=0;const Z=(ae,ge)=>{ae&&ae.length&&ge&&ae.forEach(Ce=>{const oe={display:ge.display&&ge.expanded,level:ge.level+1,expanded:!1,noLazyChildren:!1,loading:!1},pe=ai(Ce,U.value);if(ka(pe))throw new Error("For nested data item, row-key is required.");X={...B.value[pe]},X&&(oe.expanded=X.expanded,X.level=X.level||oe.level,X.display=!!(X.expanded&&oe.display),Jn(X.lazy)&&(Jn(X.loaded)&&X.loaded&&(oe.noLazyChildren=!(X.children&&X.children.length)),oe.loading=X.loading)),ne++,Q.push(S(Ce,I+ne,oe)),X&&Z(F.value[pe]||Ce[z.value],X)})};X.display=!0,Z(F.value[K]||T[z.value],X)}return Q}else return S(T,I,void 0)},tooltipContent:u,tooltipTrigger:d}}const P0e={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 I0e=fe({name:"ElTableBody",props:P0e,setup(t){var u;const e=pt(),n=qe(ia),i=Be("table"),{wrappedRowRender:s,tooltipContent:o,tooltipTrigger:r}=T0e(t),{onColumnsChange:a,onScrollableChange:l}=E8(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(($,S,M)=>{var P,T;return((P=y[M])==null?void 0:P.colSpan)>1&&(C=(T=y[M])==null?void 0:T.colSpan),S.nodeName!=="TD"&&C===0&&$.push(M),C>0&&C--,$},[]).forEach($=>{var S;for(m=d;m>0;){const M=(S=p[m-1])==null?void 0:S.childNodes;if(M[$]&&M[$].nodeName==="TD"&&M[$].rowSpan>1){yd(M[$],"hover-cell"),c.push(M[$]);break}m--}})}else c.forEach(C=>Ma(C,"hover-cell")),c.length=0;!((k=t.store)!=null&&k.states.isComplex.value)||!Kt||Yg(()=>{const C=p[h],$=p[d];C&&!C.classList.contains("hover-fixed-row")&&Ma(C,"hover-row"),$&&yd($,"hover-row")})}),Sl(()=>{Rn==null||Rn()}),{ns:i,onColumnsChange:a,onScrollableChange:l,wrappedRowRender:s,tooltipContent:o,tooltipTrigger:r}},render(){const{wrappedRowRender:t,store:e}=this;return bt("tbody",{tabIndex:-1},[((e==null?void 0:e.states.data.value)||[]).reduce((n,i)=>n.concat(t(i,n.length)),[])])}});function L0e(){var e;const t=(e=qe(ia))==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 O0e(t){const{columns:e}=L0e(),n=Be("table");return{getCellClasses:(o,r)=>{const a=o[r],l=[n.e("cell"),a.id,a.align,a.labelClassName,...S8(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=$8(r,o.fixed,t.store);return qf(a,"left"),qf(a,"right"),a},columns:e}}var D0e=fe({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(ia),n=Be("table"),{getCellClasses:i,getCellStyles:s,columns:o}=O0e(t),{onScrollableChange:r,onColumnsChange:a}=E8(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)}),bt(bt("tfoot",[bt("tr",{},[...t.map((a,l)=>bt("td",{key:l,colspan:a.colSpan,rowspan:a.rowSpan,class:n(t,l),style:e(a,l)},[bt("div",{class:["cell",a.labelClassName]},[r[l]])]))])]))}});function R0e(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 V0e(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,U])=>{!E(U)||!E(z)||n.setCurrentRowKey(`${z}`)},{immediate:!0}),Te(()=>t.data,z=>{i.store.commit("setData",z)},{immediate:!0,deep:!0}),_l(()=>{t.expandRowKeys&&n.setExpandRowKeysAdapter(t.expandRowKeys)});const b=()=>{i.store.commit("setHoverRow",null),i.hoverState&&(i.hoverState=null)},k=(z,U)=>{const{pixelX:G,pixelY:K}=U;Math.abs(G)>=Math.abs(K)&&(i.refs.bodyWrapper.scrollLeft+=U.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`:""})),S=()=>{C.value&&e.updateElsHeight(),e.updateColumnsWidth(),!(typeof window>"u")&&requestAnimationFrame(I)};Ft(async()=>{await ot(),n.updateColumns(),L(),requestAnimationFrame(S);const z=i.vnode.el,U=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&&U?U.offsetHeight:null},n.states.columns.value.forEach(G=>{G.filteredValue&&G.filteredValue.length&&i.store.commit("filterChange",{column:G,values:G.filteredValue,silent:!0})}),i.$ready=!0});const M=(z,U)=>{if(!z)return;const G=Array.from(z.classList).filter(K=>!K.startsWith("is-scrolling-"));G.push(e.scrollX.value?U:"is-scrolling-none"),z.className=G.join(" ")},P=z=>{const{tableWrapper:U}=i.refs;M(U,z)},T=z=>{const{tableWrapper:U}=i.refs;return!!(U&&U.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:U,offsetWidth:G,scrollWidth:K}=z,{headerWrapper:X,footerWrapper:W}=i.refs;X&&(X.scrollLeft=U),W&&(W.scrollLeft=U),U>=K-G-1?P("is-scrolling-right"):P(U===0?"is-scrolling-left":"is-scrolling-middle")},L=()=>{i.refs.scrollBarRef&&(i.refs.scrollBarRef.wrapRef&&Hn(i.refs.scrollBarRef.wrapRef,"scroll",I,{passive:!0}),t.fit?Ts(i.vnode.el,R):Hn(window,"resize",R),Ts(i.refs.tableInnerWrapper,()=>{var z,U;R(),(U=(z=i.refs)==null?void 0:z.scrollBarRef)==null||U.update()}))},R=()=>{var Z,ae,ge,Ce;const z=i.vnode.el;if(!i.$ready||!z)return;let U=!1;const{width:G,height:K,headerHeight:X}=l.value,W=d.value=z.offsetWidth;G!==W&&(U=!0);const Q=z.offsetHeight;(t.height||C.value)&&K!==Q&&(U=!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&&(U=!0),h.value=((ae=i.refs.tableWrapper)==null?void 0:ae.scrollHeight)||0,p.value=(ne==null?void 0:ne.scrollHeight)||0,m.value=((ge=i.refs.footerWrapper)==null?void 0:ge.offsetHeight)||0,y.value=((Ce=i.refs.appendWrapper)==null?void 0:Ce.offsetHeight)||0,f.value=h.value-p.value-m.value-y.value,U&&(l.value={width:W,height:Q,headerHeight:t.showHeader&&(ne==null?void 0:ne.offsetHeight)||0},S())},V=Ii(),B=Y(()=>{const{bodyWidth:z,scrollY:U,gutterWidth:G}=e;return z.value?`${z.value-(U.value?G: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 U=d.value;return{width:U?`${U}px`:"",height:z}}),resizeProxyVisible:r,bodyWidth:B,resizeState:l,doLayout:S,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 F0e(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()}),Sl(()=>{e==null||e.disconnect()})}var N0e={data:{type:Array,default:()=>[]},size:Zi,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 gF(t){const e=t.tableLayout==="auto";let n=t.columns||[];e&&n.every(({width:s})=>nn(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 bt("colgroup",{},n.map(s=>bt("col",i(s))))}gF.props=["columns","tableLayout"];const B0e=()=>{const t=J(),e=(o,r)=>{const a=t.value;a&&a.scrollTo(o,r)},n=(o,r)=>{const a=t.value;a&&wt(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 z0e=1;var H0e=fe({name:"ElTable",directives:{Mousewheel:uhe},components:{TableHeader:x0e,TableBody:I0e,TableFooter:D0e,ElScrollbar:qs,hColgroup:gF},props:N0e,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=Be("table"),i=Jc("table"),s=pt();Pt(ia,s);const o=d0e(s,t);s.store=o;const r=new f0e({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}=R0e(o),{isHidden:k,renderExpanded:C,setDragVisible:$,isGroup:S,handleMouseLeave:M,handleHeaderFooterMousewheel:P,tableSize:T,emptyBlockStyle:I,resizeProxyVisible:L,bodyWidth:R,resizeState:V,doLayout:B,tableBodyStyles:F,tableLayout:z,scrollbarViewStyle:U,scrollbarStyle:G}=V0e(t,r,o,s),{scrollBarRef:K,scrollTo:X,setScrollLeft:W,setScrollTop:Q}=B0e(),ne=_d(B,50),Z=`${n.namespace.value}-table_${z0e++}`;s.tableId=Z,s.state={isGroup:S,resizeState:V,doLayout:B,debouncedUpdateLayout:ne};const ae=Y(()=>t.sumText??e("el.table.sumText")),ge=Y(()=>t.emptyText??e("el.table.emptyText")),Ce=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)}),pe=Y(()=>mF(o.states.originColumns.value)[0]);return F0e(s),wn(()=>{ne.cancel()}),{ns:n,layout:r,store:o,columns:pe,handleHeaderFooterMousewheel:P,handleMouseLeave:M,tableId:Z,tableSize:T,isHidden:k,isEmpty:a,renderExpanded:C,resizeProxyVisible:L,resizeState:V,isGroup:S,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:B,sort:y,updateKeyChildren:b,t:e,setDragVisible:$,context:s,computedSumText:ae,computedEmptyText:ge,computedTooltipEffect:Ce,computedTooltipOptions:oe,tableLayout:z,scrollbarViewStyle:U,scrollbarStyle:G,scrollBarRef:K,scrollTo:X,setScrollLeft:W,setScrollTop:Q,allowDragLastColumn:t.allowDragLastColumn}}});const U0e=["data-prefix"],j0e={ref:"hiddenColumns",class:"hidden-columns"};function W0e(t,e,n,i,s,o){const r=H("hColgroup"),a=H("table-header"),l=H("table-body"),c=H("table-footer"),u=H("el-scrollbar"),d=xt("mousewheel");return v(),A("div",{ref:"tableWrapper",class:q([{[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:q(t.ns.e("inner-wrapper"))},[g("div",j0e,[le(t.$slots,"default")],512),t.showHeader&&t.tableLayout==="fixed"?Re((v(),A("div",{key:0,ref:"headerWrapper",class:q(t.ns.e("header-wrapper"))},[g("table",{ref:"tableHeader",class:q(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:q(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:q(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:q(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:q(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:q(t.ns.e("empty-block"))},[g("span",{class:q(t.ns.e("empty-text"))},[le(t.$slots,"empty",{},()=>[N(x(t.computedEmptyText),1)])],2)],6)):O("v-if",!0),t.$slots.append?(v(),A("div",{key:1,ref:"appendWrapper",class:q(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"?Re((v(),A("div",{key:1,ref:"footerWrapper",class:q(t.ns.e("footer-wrapper"))},[g("table",{class:q(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)),[[jt,!t.isEmpty],[d,t.handleHeaderFooterMousewheel]]):O("v-if",!0),t.border||t.isGroup?(v(),A("div",{key:2,class:q(t.ns.e("border-left-patch"))},null,2)):O("v-if",!0)],2),Re(g("div",{ref:"resizeProxy",class:q(t.ns.e("column-resize-proxy"))},null,2),[[jt,t.resizeProxyVisible]])],46,U0e)}var Y0e=gi(H0e,[["render",W0e]]);const q0e={selection:"table-column--selection",expand:"table__expand-column"},G0e={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:""}},X0e=t=>q0e[t]||"",K0e={selection:{renderHeader({store:t}){function e(){return t.states.data.value&&t.states.data.value.length===0}return bt(Yt,{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 bt(Yt,{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 wt(i)?n=e+i:et(i)&&(n=i(e)),bt("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")),bt("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})]:[bt(be,null,{default:()=>[bt(Hr)]})]})},sortable:!1,resizable:!1}};function Z0e({row:t,column:e,$index:n}){var o;const i=e.property,s=i&&Ac(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 J0e({row:t,treeNode:e,store:n},i=!1){const{ns:s}=n;if(!e)return i?[bt("span",{class:s.e("placeholder")})]:null;const o=[],r=function(a){a.stopPropagation(),!e.loading&&n.loadOrToggle(t)};if(e.indent&&o.push(bt("span",{class:s.e("indent"),style:{"padding-left":`${e.indent}px`}})),Jn(e.expanded)&&!e.noLazyChildren){const a=[s.e("expand-icon"),e.expanded?s.em("expand-icon","expanded"):""];let l=Hr;e.loading&&(l=Uf),o.push(bt("button",{type:"button","aria-label":n.t(e.expanded?"el.table.collapseRowLabel":"el.table.expandRowLabel"),"aria-expanded":e.expanded,class:a,onClick:r},{default:()=>[bt(be,{class:s.is("loading",e.loading)},{default:()=>[bt(l)]})]}))}else o.push(bt("span",{class:s.e("placeholder")}));return o}function EA(t,e){return t.reduce((n,i)=>(n[i]=i,n),e)}function Q0e(t,e){const n=pt();return{registerComplexWatchers:()=>{const o=["fixed"],r={realWidth:"width",realMinWidth:"minWidth"},a=EA(o,r);Object.keys(a).forEach(l=>{const c=r[l];zt(e,c)&&Te(()=>e[c],u=>{let d=u;c==="width"&&l==="realWidth"&&(d=x8(u)),c==="minWidth"&&l==="realMinWidth"&&(d=lF(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=EA(o,a);Object.keys(l).forEach(u=>{const d=a[u];zt(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=>{zt(t.value.props,u)&&Te(()=>t.value.props[u],d=>{n.columnConfig.value.type!=="selection"&&nn(e[u])&&(n.columnConfig.value[u]=d)})});const c=Jc("table");c.value&&zt(c.value,"showOverflowTooltip")&&Te(()=>{var u;return(u=c.value)==null?void 0:u.showOverflowTooltip},u=>{n.columnConfig.value.type!=="selection"&&(!nn(e.showOverflowTooltip)||!nn(t.value.props.showOverflowTooltip)||(n.columnConfig.value.showOverflowTooltip=u))})}}}function e_e(t,e,n){const i=pt(),s=J(""),o=J(!1),r=J(),a=J(),l=Be("table");_l(()=>{r.value=t.align?`is-${t.align}`:null,r.value}),_l(()=>{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:S}=$.states,M=S.value;return M&&Object.keys(M).length>0}),d=J(x8(t.width)),h=J(lF(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(nn($.width)?$.minWidth:$.width),$),p=$=>{const S=$.type,M=K0e[S]||{};Object.keys(M).forEach(T=>{const I=M[T];T!=="className"&&!nn(I)&&($[T]=I)});const P=X0e(S);if(P){const T=`${E(l.namespace)}-${P}`;$.className=$.className?`${$.className} ${T}`:T}return $},m=$=>{Me($)?$.forEach(M=>S(M)):S($);function S(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?Tt("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(dF(P))return bt(ee,P)}return N($.label)}),e["filter-icon"]&&($.renderFilterIcon=M=>le(e,"filter-icon",M)),e.expand&&($.renderExpand=M=>le(e,"expand",M));let S=$.renderCell;return $.type==="expand"?($.renderCell=M=>bt("div",{class:"cell"},[S(M)]),n.value.renderExpanded=M=>e.default?e.default(M):e.default):(S=S||Z0e,$.renderCell=M=>{let P=null;if(e.default){const V=e.default(M);P=V.some(B=>B.type!==Zn)?V:S(M)}else P=S(M);const{columns:T}=n.value.store.states,I=T.value.findIndex(V=>V.type==="default"),L=J0e(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),bt("div",R,[L,P])}),$},getPropsData:(...$)=>$.reduce((S,M)=>(Me(M)&&M.forEach(P=>{S[P]=t[P]}),S),{}),getColumnElIndex:($,S)=>Array.prototype.indexOf.call($,S),updateColumnOrder:()=>{n.value.store.commit("updateColumnOrder",i.columnConfig.value)}}}var t_e={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 n_e=1;var s_e=fe({name:"ElTableColumn",components:{ElCheckbox:Yt},props:t_e,setup(t,{slots:e}){const n=pt(),i=Jc("table"),s=J({}),o=Y(()=>{let $=n.parent;for(;$&&!$.tableId;)$=$.parent;return $}),{registerNormalWatchers:r,registerComplexWatchers:a}=Q0e(o,t),{columnId:l,isSubColumn:c,realHeaderAlign:u,columnOrTableParent:d,setColumnWidth:h,setColumnForcedProps:f,setColumnRenders:p,getPropsData:m,getColumnElIndex:y,realAlign:b,updateColumnOrder:k}=e_e(t,e,o),C=d.value;l.value=`${"tableId"in C&&C.tableId||"columnId"in C&&C.columnId}_column_${n_e++}`,Od(()=>{var L,R;c.value=o.value!==C;const $=t.type||"default",S=t.sortable===""?!0:t.sortable,M=$==="selection"?!1:nn(t.showOverflowTooltip)?C.props.showOverflowTooltip??((L=i.value)==null?void 0:L.showOverflowTooltip):t.showOverflowTooltip,P=nn(t.tooltipFormatter)?C.props.tooltipFormatter??((R=i.value)==null?void 0:R.tooltipFormatter):t.tooltipFormatter,T={...G0e[$],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:S,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=Qve(T,I),I=t0e(p,h,f)(I),s.value=I,r(),a()}),Ft(()=>{var P,T;const $=d.value,S=c.value?(P=$.vnode.el)==null?void 0:P.children:(T=$.refs.hiddenColumns)==null?void 0:T.children,M=()=>y(S||[],n.vnode.el);s.value.getColumnIndex=M,M()>-1&&o.value.store.commit("insertColumn",s.value,c.value?"columnConfig"in $&&$.columnConfig.value:null,k)}),wn(()=>{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(Me(i))for(const o of i)((n=o.type)==null?void 0:n.name)==="ElTableColumn"||o.shapeFlag&2?s.push(o):o.type===ee&&Me(o.children)&&o.children.forEach(r=>{(r==null?void 0:r.patchFlag)!==1024&&!Ke(r==null?void 0:r.children)&&s.push(r)});return bt("div",s)}catch{return bt("div",[])}}}),vF=s_e;const Pl=qt(Y0e,{TableColumn:vF}),Il=Os(vF),l2=Symbol("tabsRootContextKey"),i_e=Ge({tabs:{type:de(Array),default:()=>ri([])},tabRefs:{type:de(Object),default:()=>ri({})}}),MA="ElTabBar";var o_e=fe({name:MA,__name:"tab-bar",props:i_e,setup(t,{expose:e}){const n=t,i=qe(l2);i||vo(MA,"<el-tabs><el-tab-bar /></el-tabs>");const s=Be("tabs"),o=J(),r=J(),a=Y(()=>{var f;return nn(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(nn(k.paneName))return!1;const C=n.tabRefs[k.paneName];if(!C)return!1;if(!k.active)return!0;f=C[`offset${xw(b)}`],p=C[`client${xw(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${xw(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(Ts(f,c))})};Te(()=>n.tabs,async()=>{await ot(),c(),d()},{immediate:!0});const h=Ts(o,()=>c());return wn(()=>{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:q([E(s).e("active-bar"),E(s).is(E(i).props.tabPosition)]),style:Xe(r.value)},null,6)):O("v-if",!0)}}),r_e=o_e;const a_e=Ge({panes:{type:de(Array),default:()=>ri([])},currentName:{type:[String,Number],default:""},editable:Boolean,type:{type:String,values:["card","border-card",""],default:""},stretch:Boolean,tabindex:{type:[String,Number],default:void 0}}),l_e={tabClick:(t,e,n)=>n instanceof Event,tabRemove:(t,e)=>e instanceof Event},TA="ElTabNav",c_e=fe({name:TA,props:a_e,emits:l_e,setup(t,{expose:e,emit:n}){const i=qe(l2);i||vo(TA,"<el-tabs><tab-nav /></el-tabs>");const s=Be("tabs"),o=Aie(),r=Tie(),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=Fn(),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:S,height:M}=f$(a),{width:P,height:T}=f$(l,{width:0,height:0},{box:"border-box"}),I=Y(()=>k.value?S.value:M.value),L=Y(()=>k.value?P.value:T.value),{onWheel:R}=Rve({atStartEdge:Y(()=>f.value<=0),atEndEdge:Y(()=>L.value-f.value<=I.value),layout:Y(()=>k.value?"horizontal":"vertical")},ne=>{f.value=HO(f.value+ne,0,L.value-I.value)}),V=ne=>{y.value=!0,R(ne),Yg(()=>{y.value=!1})},B=()=>{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;cf(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,ge=Z.getBoundingClientRect(),Ce=ae.getBoundingClientRect(),oe=Ce.left+1,pe=Ce.right-1,ie=ne.getBoundingClientRect(),re=k.value?ie.width-Ce.width:ie.height-Ce.height,ke=f.value;let je=ke;k.value?(ge.left<oe&&(je=ke-(oe-ge.left)),ge.right>pe&&(je=ke+ge.right-pe)):(ge.top<Ce.top&&(je=ke-(Ce.top-ge.top)),ge.bottom>Ce.bottom&&(je=ke+(ge.bottom-Ce.bottom))),je=Math.max(je,0),f.value=Math.min(je,re)},U=()=>{var ge;if(!l.value||!a.value)return;t.stretch&&((ge=d.value)==null||ge.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=cf(ne,ae+Z),cf(Z,ne-ae)&&(f.value=ne-Z)):(h.value=!1,ae>0&&(f.value=0))},G=ne=>{const Z=ls(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 ge=Array.from(ne.currentTarget.querySelectorAll("[role=tab]:not(.is-disabled)"));let Ce=ge.indexOf(ne.target)+ae;Ce<0?Ce=ge.length-1:Ce>=ge.length&&(Ce=0),ge[Ce].focus({preventScroll:!0}),ge[Ce].click(),K()},K=()=>{m.value&&(p.value=!0)},X=()=>p.value=!1,W=(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}),Ts(c,()=>{Yg(U)}),Ft(()=>setTimeout(()=>z(),0)),xl(()=>U()),e({scrollToActiveTab:z,removeFocus:X,focusActiveTab:Q,tabListRef:l,tabBarRef:d,scheduleRender:()=>Hm(b)}),()=>{const ne=h.value?[_("span",{class:[s.e("nav-prev"),s.is("disabled",!h.value.prev)],onClick:B},[_(be,null,{default:()=>[_(bd,null,null)]})]),_("span",{class:[s.e("nav-next"),s.is("disabled",!h.value.next)],onClick:F},[_(be,null,{default:()=>[_(Hr,null,null)]})])]:null,Z=t.panes.map((ae,ge)=>{var te,se;const Ce=ae.uid,oe=ae.props.disabled,pe=ae.props.name??ae.index??`${ge}`,ie=!oe&&(ae.isClosable||ae.props.closable!==!1&&t.editable);ae.index=`${ge}`;const re=ie?_(be,{class:"is-icon-close",onClick:me=>n("tabRemove",ae,me)},{default:()=>[_(Bo,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:me=>W(me,pe),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-${pe}`,key:`tab-${Ce}`,"aria-controls":`pane-${pe}`,role:"tab","aria-selected":ae.active,tabindex:je,onFocus:()=>K(),onBlur:()=>X(),onClick:me=>{X(),n("tabClick",ae,pe,me)},onKeydown:me=>{const $e=ls(me);ie&&($e===Ue.delete||$e===Ue.backspace)&&n("tabRemove",ae,me)}},[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:G,onWheel:V},[t.type?null:_(r_e,{ref:d,tabs:[...t.panes],tabRefs:u.value},null),Z]):null])])}}}),u_e=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:de(Function),default:()=>!0},stretch:Boolean,tabindex:{type:[String,Number],default:0}}),Uw=t=>Ke(t)||wt(t),d_e={[Mt]:t=>Uw(t),tabClick:(t,e)=>e instanceof Event,tabChange:t=>Uw(t),edit:(t,e)=>["remove","add"].includes(e),tabRemove:t=>Uw(t),tabAdd:()=>!0},h_e=fe({name:"ElTabs",props:u_e,emits:d_e,setup(t,{emit:e,slots:n,expose:i}){const s=Be("tabs"),o=Y(()=>["left","right"].includes(t.tabPosition)),{children:r,addChild:a,removeChild:l,ChildrenSorter:c}=Bre(pt(),"ElTabPane"),u=J(),d=J((nn(t.modelValue)?t.defaultValue:t.modelValue)??"0"),h=async(k,C=!1)=>{var $,S,M,P;if(!(d.value===k||nn(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=(S=u.value)==null?void 0:S.removeFocus)==null||M.call(S),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||nn(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=ls(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()}),Pt(l2,{props:t,currentName:d,registerPane:a,unregisterPane:l,nav$:u}),i({currentName:d,get tabNavRef(){return zb(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:()=>[_(X4,null,null)]})]):null,$=()=>_(c_e,{ref:u,currentName:d.value,editable:t.editable,type:t.type,panes:r.value,stretch:t.stretch,onTabClick:f,onTabRemove:p},null),S=_("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,S])}}}),f_e=Ge({label:{type:String,default:""},name:{type:[String,Number]},closable:{type:Boolean,default:void 0},disabled:Boolean,lazy:Boolean}),p_e=["id","aria-hidden","aria-labelledby"],PA="ElTabPane";var m_e=fe({name:PA,__name:"tab-pane",props:f_e,setup(t){const e=t,n=pt(),i=mi(),s=qe(l2);s||vo(PA,"usage: <el-tabs><el-tab-pane /></el-tabs/>");const o=Be("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),wn(()=>{s.unregisterPane(p)}),Cb(()=>{var m;i.label&&((m=s.nav$.value)==null||m.scheduleRender())}),(m,y)=>h.value?Re((v(),A("div",{key:0,id:`pane-${d.value}`,ref_key:"paneRef",ref:r,class:q(E(o).b()),role:"tabpanel","aria-hidden":!c.value,"aria-labelledby":`tab-${d.value}`},[le(m.$slots,"default")],10,p_e)),[[jt,c.value]]):O("v-if",!0)}}),_F=m_e;const c2=qt(h_e,{TabPane:_F}),u2=Os(_F),EC="00:30",g_e=Ge({format:{type:String,default:"HH:mm"},modelValue:{type:de(String)},disabled:{type:Boolean,default:void 0},editable:{type:Boolean,default:!0},effect:{type:de(String),default:"light"},clearable:{type:Boolean,default:!0},size:Zi,placeholder:String,start:{type:String,default:"09:00"},end:{type:String,default:"18:00"},step:{type:String,default:EC},minTime:{type:de(String)},maxTime:{type:de(String)},includeEndTime:Boolean,name:String,prefixIcon:{type:de([String,Object]),default:()=>lR},clearIcon:{type:de([String,Object]),default:()=>Zc},popperClass:{type:String,default:""},popperStyle:{type:de([String,Object])},...F1}),ol=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},jw=(t,e)=>{const n=ol(t);if(!n)return-1;const i=ol(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},IA=t=>`${t}`.padStart(2,"0"),Eh=t=>`${IA(t.hours)}:${IA(t.minutes)}`,v_e=(t,e)=>{const n=ol(t);if(!n)return"";const i=ol(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,Eh(s)};var __e=fe({name:"ElTimeSelect",__name:"time-select",props:g_e,emits:[dn,"blur","focus","clear",Mt],setup(t,{expose:e}){ht.extend(aV);const{Option:n}=Jt,i=t,s=Be("input"),o=J(),r=bs(),{lang:a}=Qt(),l=Y(()=>i.modelValue),c=Y(()=>{const b=ol(i.start);return b?Eh(b):null}),u=Y(()=>{const b=ol(i.end);return b?Eh(b):null}),d=Y(()=>{const b=ol(i.minTime||"");return b?Eh(b):null}),h=Y(()=>{const b=ol(i.maxTime||"");return b?Eh(b):null}),f=Y(()=>{const b=ol(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&&Tt("ElTimeSelect",`invalid step, fallback to default step (${EC}).`),k?EC:Eh(b)}),p=Y(()=>{var C;const b=[],k=($,S)=>{b.push({value:$,rawValue:S,disabled:jw(S,d.value||"-1:-1")<=0||jw(S,h.value||"100:100")>=0})};if(i.start&&i.end&&i.step){let $=c.value,S;for(;$&&u.value&&jw($,u.value)<=0;)S=ht($,"HH:mm").locale(a.value).format(i.format),k(S,$),$=v_e($,f.value);i.includeEndTime&&u.value&&((C=b[b.length-1])==null?void 0:C.rawValue)!==u.value&&k(ht(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(dn),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:q(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,we(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"]))}}),y_e=__e;const M8=qt(y_e),b_e="ElUpload";var w_e=class extends Error{constructor(t,e,n,i){super(t),this.name="UploadAjaxError",this.status=e,this.method=n,this.url=i}};function LA(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 w_e(i,n.status,e.method,t)}function k_e(t){const e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch{return e}}const C_e=t=>{typeof XMLHttpRequest>"u"&&vo(b_e,"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))Me(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(LA(n,t,e))}),e.addEventListener("load",()=>{if(e.status<200||e.status>=300)return t.onError(LA(n,t,e));t.onSuccess(k_e(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))ui(r)||e.setRequestHeader(o,String(r));return e.send(i),e},yF=["text","picture","picture-card"];let x_e=1;const MC=()=>Date.now()+x_e++,bF=Ge({action:{type:String,default:"#"},headers:{type:de(Object)},method:{type:String,default:"post"},data:{type:de([Object,Function,Promise]),default:()=>ri({})},multiple:Boolean,name:{type:String,default:"file"},drag:Boolean,withCredentials:Boolean,showFileList:{type:Boolean,default:!0},accept:{type:String,default:""},fileList:{type:de(Array),default:()=>ri([])},autoUpload:{type:Boolean,default:!0},listType:{type:String,values:yF,default:"text"},httpRequest:{type:de(Function),default:C_e},disabled:{type:Boolean,default:void 0},limit:Number,directory:Boolean}),S_e=Ge({...bF,beforeUpload:{type:de(Function),default:Dt},beforeRemove:{type:de(Function)},onRemove:{type:de(Function),default:Dt},onChange:{type:de(Function),default:Dt},onPreview:{type:de(Function),default:Dt},onSuccess:{type:de(Function),default:Dt},onProgress:{type:de(Function),default:Dt},onError:{type:de(Function),default:Dt},onExceed:{type:de(Function),default:Dt},crossorigin:{type:de(String)}}),wF=Symbol("uploadContextKey"),$_e=Ge({files:{type:de(Array),default:()=>ri([])},disabled:{type:Boolean,default:void 0},handlePreview:{type:de(Function),default:Dt},listType:{type:String,values:yF,default:"text"},crossorigin:{type:de(String)}}),A_e={remove:t=>!!t},E_e=Ge({...bF,beforeUpload:{type:de(Function),default:Dt},onRemove:{type:de(Function),default:Dt},onStart:{type:de(Function),default:Dt},onSuccess:{type:de(Function),default:Dt},onProgress:{type:de(Function),default:Dt},onError:{type:de(Function),default:Dt},onExceed:{type:de(Function),default:Dt}}),M_e=Ge({disabled:{type:Boolean,default:void 0},directory:Boolean}),T_e={file:t=>Me(t)},P_e=["tabindex","aria-disabled","onKeydown"],I_e=["src","crossorigin"],L_e=["onClick"],O_e=["title"],D_e=["onClick"],R_e=["onClick"];var V_e=fe({name:"ElUploadList",__name:"upload-list",props:$_e,emits:A_e,setup(t,{emit:e}){const n=t,i=e,{t:s}=Qt(),o=Be("upload"),r=Be("icon"),a=Be("list"),l=bs(),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(Eb,{tag:"ul",class:q(u.value),name:E(a).b()},{default:w(()=>[(v(!0),A(ee,null,we(t.files,(p,m)=>(v(),A("li",{key:p.uid||p.name,class:q([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:q(E(o).be("list","item-thumbnail")),src:p.url,crossorigin:t.crossorigin,alt:""},null,10,I_e)):O("v-if",!0),p.status==="uploading"||t.listType!=="picture-card"?(v(),A("div",{key:1,class:q(E(o).be("list","item-info"))},[g("a",{class:q(E(o).be("list","item-name")),onClick:Ee(y=>t.handlePreview(p),["prevent"])},[_(E(be),{class:q(E(r).m("document"))},{default:w(()=>[_(E(N1))]),_:1},8,["class"]),g("span",{class:q(E(o).be("list","item-file-name")),title:p.name},x(p.name),11,O_e)],10,L_e),p.status==="uploading"?(v(),D(E(a2),{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:q(E(o).be("list","item-status-label"))},[t.listType==="text"?(v(),D(E(be),{key:0,class:q([E(r).m("upload-success"),E(r).m("circle-check")])},{default:w(()=>[_(E(G4))]),_:1},8,["class"])):["picture-card","picture"].includes(t.listType)?(v(),D(E(be),{key:1,class:q([E(r).m("upload-success"),E(r).m("check")])},{default:w(()=>[_(E(q4))]),_:1},8,["class"])):O("v-if",!0)],2),E(l)?O("v-if",!0):(v(),D(E(be),{key:2,class:q(E(r).m("close")),"aria-label":E(s)("el.upload.delete"),role:"button",tabindex:"0",onClick:y=>d(p),onKeydown:ut(Ee(y=>d(p),["prevent"]),["enter","space"])},{default:w(()=>[_(E(Bo))]),_:1},8,["class","aria-label","onClick","onKeydown"])),E(l)?O("v-if",!0):(v(),A("i",{key:3,class:q(E(r).m("close-tip"))},x(E(s)("el.upload.deleteTip")),3)),t.listType==="picture-card"?(v(),A("span",{key:4,class:q(E(o).be("list","item-actions"))},[g("span",{class:q(E(o).be("list","item-preview")),onClick:y=>t.handlePreview(p)},[_(E(be),{class:q(E(r).m("zoom-in"))},{default:w(()=>[_(E(vR))]),_:1},8,["class"])],10,D_e),E(l)?O("v-if",!0):(v(),A("span",{key:0,class:q(E(o).be("list","item-delete")),onClick:y=>d(p)},[_(E(be),{class:q(E(r).m("delete"))},{default:w(()=>[_(E(Jb))]),_:1},8,["class"])],10,R_e))],2)):O("v-if",!0)])],42,P_e))),128)),le(h.$slots,"append")]),_:3},8,["class","name"]))}}),OA=V_e;const DA="ElUploadDrag";var F_e=fe({name:DA,__name:"upload-dragger",props:M_e,emits:T_e,setup(t,{emit:e}){const n=t,i=e;qe(wF)||vo(DA,"usage: <el-upload><el-upload-dragger /></el-upload>");const s=Be("upload"),o=J(!1),r=bs(),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 hy(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",hy(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:q([E(s).b("dragger"),E(s).is("dragover",o.value)]),onDrop:Ee(c,["prevent"]),onDragover:Ee(u,["prevent"]),onDragleave:Ee(d,["prevent"])},[le(h.$slots,"default")],34))}}),N_e=F_e;const B_e=["tabindex","aria-disabled","onKeydown"],z_e=["name","disabled","multiple","accept","webkitdirectory"];var H_e=fe({name:"ElUploadContent",inheritAttrs:!1,__name:"upload-content",props:E_e,setup(t,{expose:e}){const n=t,i=Be("upload"),s=bs(),o=Fn({}),r=Fn(),a=m=>{if(m.length===0)return;const{autoUpload:y,limit:b,fileList:k,multiple:C,onStart:$,onExceed:S}=n;if(b&&k.length+m.length>b){S(m,k);return}C||(m=m.slice(0,1));for(const M of m){const P=M;P.uid=MC(),$(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=hd(n.data)?Qu(n.data):n.data,y=await $,hd(n.data)&&Wi(C,b)&&(b=Qu(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:S,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:S,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]}},B=L(V);o.value[R]=B,B instanceof Promise&&B.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=>{uD(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:q([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(Ee(f,["self"]),["enter","space"])},[t.drag?(v(),D(N_e,{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:q(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]=Ee(()=>{},["stop"]))},null,42,z_e)],42,B_e))}}),RA=H_e;const VA="ElUpload",FA=t=>{var e;(e=t.url)!=null&&e.startsWith("blob:")&&URL.revokeObjectURL(t.url)},U_e=(t,e)=>{const n=Mie(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=>{ui(p.uid)&&(p.uid=MC());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){Tt(VA,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||vo(VA,"file to be removed not found");const y=b=>{s(b),r(b),t.onRemove(b,n.value),FA(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=MC()),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:FA}};var j_e=fe({name:"ElUpload",__name:"upload",props:S_e,setup(t,{expose:e}){const n=t,i=bs(),s=Fn(),{abort:o,submit:r,clearFiles:a,uploadFiles:l,handleStart:c,handleError:u,handleRemove:d,handleSuccess:h,handleProgress:f,revokeFileObjectURL:p}=U_e(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 wn(()=>{l.value.forEach(p)}),Pt(wF,{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(OA,{key:0,disabled:E(i),"list-type":t.listType,files:E(l),crossorigin:t.crossorigin,"handle-preview":t.onPreview,onRemove:E(d)},hs({append:w(()=>[_(RA,Wt({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(RA,Wt({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(OA,{key:3,disabled:E(i),"list-type":t.listType,files:E(l),crossorigin:t.crossorigin,"handle-preview":t.onPreview,onRemove:E(d)},hs({_: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)]))}}),W_e=j_e;const Y1=qt(W_e);function Y_e(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()):(Ma(h,f.bm("parent","relative")),h.removeAttribute("loading-number")),Ma(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=Pg(fe({name:"ElLoading",setup(h,{expose:f}){const{ns:p,zIndex:m}=r8("loading");return f({ns:p,zIndex:m}),()=>{const y=s.spinner||s.svg,b=bt("svg",{class:"circular",viewBox:s.svgViewBox?s.svgViewBox:"0 0 50 50",...y?{innerHTML:y}:{}},[bt("circle",{class:"path",cx:"25",cy:"25",r:"20",fill:"none"})]),k=s.text?bt("p",{class:p.b("text")},[s.text]):void 0;return bt(Ho,{name:p.b("fade"),onAfterLeave:c},{default:w(()=>[Re(_("div",{style:{backgroundColor:s.background||""},class:[p.b("mask"),s.customClass,p.is("fullscreen",s.fullscreen)]},[bt("div",{class:p.b("spinner")},[b,k])]),[[jt,s.visible]])])})}}}));Object.assign(u._context,e??{});const d=u.mount(document.createElement("div"));return{...go(s),setText:o,removeElLoadingChild:a,close:l,handleAfterLeave:c,vm:d,get $el(){return d.$el}}}let o0;const uf=function(t={},e){if(!Kt)return;const n=q_e(t);if(n.fullscreen&&o0)return o0;const i=Y_e({...n,closed:()=>{var o;(o=n.closed)==null||o.call(n),n.fullscreen&&(o0=void 0)}},e??uf._context);G_e(n,n.parent,i),NA(n,n.parent,i),n.parent.vLoadingAddClassList=()=>NA(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&&(o0=i),i},q_e=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}},G_e=async(t,e,n)=>{const{nextZIndex:i}=n.vm.zIndex||n.vm._.exposed.zIndex,s={};if(t.fullscreen)n.originalPosition.value=il(document.body,"position"),n.originalOverflow.value=il(document.body,"overflow"),s.zIndex=i();else if(t.parent===document.body){n.originalPosition.value=il(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(il(document.body,`margin-${o}`),10)}px`}for(const o of["height","width"])s[o]=`${t.target.getBoundingClientRect()[o]}px`}else n.originalPosition.value=il(e,"position");for(const[o,r]of Object.entries(s))n.$el.style[o]=r},NA=(t,e,n)=>{const i=n.vm.ns||n.vm._.exposed.ns;["absolute","fixed","sticky"].includes(n.originalPosition.value)?Ma(e,i.bm("parent","relative")):yd(e,i.bm("parent","relative")),t.fullscreen&&t.lock?yd(e,i.bm("parent","hidden")):Ma(e,i.bm("parent","hidden"))};uf._context=null;const sm=Symbol("ElLoading"),ku=t=>`element-loading-${zi(t)}`,BA=(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(ku(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=uf(a);l._context=sg._context,t[sm]={options:a,instance:l}},X_e=(t,e)=>{for(const n of Object.keys(t))hn(t[n])&&(t[n].value=e[n])},sg={mounted(t,e){e.value&&BA(t,e)},updated(t,e){const n=t[sm];if(!e.value){n==null||n.instance.close(),t[sm]=null;return}n?X_e(n.options,yt(e.value)?e.value:{text:t.getAttribute(ku("text")),svg:t.getAttribute(ku("svg")),svgViewBox:t.getAttribute(ku("svgViewBox")),spinner:t.getAttribute(ku("spinner")),background:t.getAttribute(ku("background")),customClass:t.getAttribute(ku("customClass"))}):BA(t,e)},unmounted(t){var e;(e=t[sm])==null||e.instance.close(),t[sm]=null}};sg._context=null;const K_e={install(t){uf._context=t._context,sg._context=t._context,t.directive("loading",sg),t.config.globalProperties.$loading=uf},directive:sg,service:uf};var Z_e=fe({name:"ElMessageBox",directives:{TrapFocus:ihe},components:{ElButton:He,ElFocusTrap:z1,ElInput:ft,ElOverlay:_8,ElIcon:be,..._R},inheritAttrs:!1,props:{buttonSize:{type:String,validator:rF},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}=r8("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:Pi(Uf),cancelButtonLoadingIcon:Pi(Uf),confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:a()}),u=Y(()=>{const z=c.type;return{[s.bm("icon",z)]:z&&jf[z]}}),d=kr(),h=kr(),f=Y(()=>{const z=c.type;return c.icon||z&&jf[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 U;z&&(t.boxType!=="prompt"&&(c.autofocus?b.value=((U=C.value)==null?void 0:U.$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:S}=SD(m,y,Y(()=>t.draggable),Y(()=>t.overflow));Ft(async()=>{await ot(),t.closeOnHashChange&&window.addEventListener("hashchange",M)}),wn(()=>{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=B4(P),I=z=>{var U;if(c.inputType!=="textarea"&&!((U=k.value)!=null&&U.isComposing))return z.preventDefault(),L("confirm")},L=z=>{var U;t.boxType==="prompt"&&z==="confirm"&&!R()||(c.action=z,c.beforeClose?(U=c.beforeClose)==null||U.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 U=c.inputValidator;if(et(U)){const G=U(c.inputValue);if(G===!1)return c.editorErrorMessage=c.inputErrorMessage||r("el.messagebox.error"),c.validateError=!0,!1;if(Ke(G))return c.editorErrorMessage=G,c.validateError=!0,!1}}return c.editorErrorMessage="",c.validateError=!1,!0},V=()=>{var U;const z=(U=k.value)==null?void 0:U.$refs;return(z==null?void 0:z.input)??(z==null?void 0:z.textarea)},B=()=>{L("close")},F=()=>{t.closeOnPressEscape&&B()};return t.lockScroll&&P4(l,{ns:s}),{...go(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:S,confirmRef:C,doClose:M,handleClose:B,onCloseRequested:F,handleWrapperClick:P,handleInputEnter:I,handleAction:L,t:r}}});const J_e=["aria-label","aria-describedby"],Q_e=["aria-label"],eye=["id"];function tye(t,e,n,i,s,o){const r=H("el-icon"),a=H("el-input"),l=H("el-button"),c=H("el-focus-trap"),u=H("el-overlay");return v(),D(Ho,{name:"fade-in-linear",onAfterLeave:e[11]||(e[11]=d=>t.$emit("vanish")),persisted:""},{default:w(()=>[Re(_(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:q(`${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:q([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]=Ee(()=>{},["stop"]))},[t.title!==null&&t.title!==void 0?(v(),A("div",{key:0,ref:"headerRef",class:q([t.ns.e("header"),{"show-close":t.showClose}])},[g("div",{class:q(t.ns.e("title"))},[t.iconComponent&&t.center?(v(),D(r,{key:0,class:q([t.ns.e("status"),t.typeClass])},{default:w(()=>[(v(),D(Ct(t.iconComponent)))]),_:1},8,["class"])):O("v-if",!0),g("span",null,x(t.title),1)],2),t.showClose?(v(),A("button",{key:0,type:"button",class:q(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(Ee(d=>t.handleAction(t.distinguishCancelAndClose?"close":"cancel"),["prevent"]),["enter"]))},[_(r,{class:q(t.ns.e("close"))},{default:w(()=>[(v(),D(Ct(t.closeIcon||"close")))]),_:1},8,["class"])],42,Q_e)):O("v-if",!0)],2)):O("v-if",!0),g("div",{id:t.contentId,class:q(t.ns.e("content"))},[g("div",{class:q(t.ns.e("container"))},[t.iconComponent&&!t.center&&t.hasMessage?(v(),D(r,{key:0,class:q([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:q(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:x(t.message)},null,8,["for","textContent"]))])],2)):O("v-if",!0)],2),Re(g("div",{class:q(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:q({invalid:t.validateError}),onKeydown:ut(t.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),g("div",{class:q(t.ns.e("errormsg")),style:Xe({visibility:t.editorErrorMessage?"visible":"hidden"})},x(t.editorErrorMessage),7)],2),[[jt,t.showInput]])],10,eye),g("div",{class:q(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:q([t.cancelButtonClass]),round:t.roundButton,size:t.btnSize,onClick:e[3]||(e[3]=d=>t.handleAction("cancel")),onKeydown:e[4]||(e[4]=ut(Ee(d=>t.handleAction("cancel"),["prevent"]),["enter"]))},{default:w(()=>[N(x(t.cancelButtonText||t.t("el.messagebox.cancel")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","size"])):O("v-if",!0),Re(_(l,{ref:"confirmRef",type:t.confirmButtonType==="text"?"":t.confirmButtonType,text:t.confirmButtonType==="text",loading:t.confirmButtonLoading,"loading-icon":t.confirmButtonLoadingIcon,class:q([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(Ee(d=>t.handleAction("confirm"),["prevent"]),["enter"]))},{default:w(()=>[N(x(t.confirmButtonText||t.t("el.messagebox.confirm")),1)]),_:1},8,["type","text","loading","loading-icon","class","round","disabled","size"]),[[jt,t.showConfirmButton]])],2)],6)]),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,J_e)]),_:3},8,["z-index","overlay-class","mask"]),[[jt,t.visible]])]),_:3})}var nye=gi(Z_e,[["render",tye]]);const o1=new Map,sye=t=>{let e=document.body;return t.appendTo&&(Ke(t.appendTo)&&(e=document.querySelector(t.appendTo)),Po(t.appendTo)&&(e=t.appendTo),Po(e)||(Tt("ElMessageBox","the appendTo option is not an HTMLElement. Falling back to document.body."),e=document.body)),e},iye=(t,e,n=null)=>{const i=_(nye,t,et(t.message)||is(t.message)?{default:et(t.message)?t.message:()=>t.message}:null);return i.appContext=n,Fc(i,e),sye(t).appendChild(e.firstElementChild),i.component},oye=()=>document.createElement("div"),rye=(t,e)=>{const n=oye();t.onVanish=()=>{Fc(null,n),o1.delete(s)},t.onAction=o=>{const r=o1.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=iye(t,n,e),s=i.proxy;for(const o in t)zt(t,o)&&!zt(s.$props,o)&&(o==="closeIcon"&&yt(t[o])?s[o]=Pi(t[o]):s[o]=t[o]);return s.visible=!0,s};function gp(t,e=null){if(!Kt)return Promise.reject();let n;return Ke(t)||is(t)?t={message:t}:n=t.callback,new Promise((i,s)=>{const o=rye(t,e??gp._context);o1.set(o,{options:t,callback:n,resolve:i,reject:s})})}const aye=["alert","confirm","prompt"],lye={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};aye.forEach(t=>{gp[t]=cye(t)});function cye(t){return(e,n,i,s)=>{let o="";return yt(n)?(i=n,o=""):nn(n)?o="":o=n,gp(Object.assign({title:o,message:e,type:"",...lye[t]},i,{boxType:t}),s)}}gp.close=()=>{o1.forEach((t,e)=>{e.doClose()}),o1.clear()};gp._context=null;const Gl=gp;Gl.install=t=>{Gl._context=t._context,t.config.globalProperties.$msgbox=Gl,t.config.globalProperties.$messageBox=Gl,t.config.globalProperties.$alert=Gl.alert,t.config.globalProperties.$confirm=Gl.confirm,t.config.globalProperties.$prompt=Gl.prompt};const Ww=Gl,kF=["primary","success","info","warning","error"],uye=Ge({customClass:{type:String,default:""},dangerouslyUseHTMLString:Boolean,duration:{type:Number,default:4500},icon:{type:ds},id:{type:String,default:""},message:{type:de([String,Object,Function]),default:""},offset:{type:Number,default:0},onClick:{type:de(Function),default:()=>{}},onClose:{type:de(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:[...kF,""],default:""},zIndex:Number,closeIcon:{type:ds,default:Bo}}),dye={destroy:()=>!0},hye=["id"],fye=["textContent"],pye={key:0},mye=["innerHTML"];var gye=fe({name:"ElNotification",__name:"notification",props:uye,emits:dye,setup(t,{expose:e}){const n=t,{ns:i,zIndex:s}=r8("notification"),{nextZIndex:o,currentZIndex:r}=s,a=J(!1);let l;const c=Y(()=>{const k=n.type;return k&&jf[n.type]?i.m(k):""}),u=Y(()=>n.type&&jf[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}=Gk(()=>{a.value&&y()},n.duration))}function m(){l==null||l()}function y(){a.value=!1}function b(k){switch(ls(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}),Hn(document,"keydown",b),e({visible:a,close:y}),(k,C)=>(v(),D(Ho,{name:E(i).b("fade"),onBeforeLeave:t.onClose,onAfterLeave:C[1]||(C[1]=$=>k.$emit("destroy")),persisted:""},{default:w(()=>[Re(g("div",{id:t.id,class:q([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:q([E(i).e("icon"),c.value])},{default:w(()=>[(v(),D(Ct(u.value)))]),_:1},8,["class"])):O("v-if",!0),g("div",{class:q(E(i).e("group"))},[g("h2",{class:q(E(i).e("title")),textContent:x(t.title)},null,10,fye),Re(g("div",{class:q(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,mye)],2112)):(v(),A("p",pye,x(t.message),1))])],6),[[jt,t.message]]),t.showClose?(v(),D(E(be),{key:0,class:q(E(i).e("closeBtn")),onClick:Ee(y,["stop"])},{default:w(()=>[(v(),D(Ct(t.closeIcon)))]),_:1},8,["class"])):O("v-if",!0)],2)],46,hye),[[jt,a.value]])]),_:3},8,["name","onBeforeLeave"]))}}),vye=gye;const Gf={"top-left":[],"top-right":[],"bottom-left":[],"bottom-right":[]},Ey=16;let _ye=1;const kd=function(t={},e){if(!Kt)return{close:()=>{}};(Ke(t)||is(t))&&(t={message:t});const n=t.position||"top-right";let i=t.offset||0;Gf[n].forEach(({vm:u})=>{var d;i+=(((d=u.el)==null?void 0:d.offsetHeight)||0)+Ey}),i+=Ey;const s=`notification_${_ye++}`,o=t.onClose,r={...t,offset:i,id:s,onClose:()=>{yye(s,n,o)}};let a=document.body;Po(t.appendTo)?a=t.appendTo:Ke(t.appendTo)&&(a=document.querySelector(t.appendTo)),Po(a)||(Tt("ElNotification","the appendTo option is not an HTMLElement. Falling back to document.body."),a=document.body);const l=document.createElement("div"),c=_(vye,r,et(r.message)?r.message:is(r.message)?()=>r.message:null);return c.appContext=nn(e)?kd._context:e,c.props.onDestroy=()=>{Fc(null,l)},Fc(c,l),Gf[n].push({vm:c}),a.appendChild(l.firstElementChild),{close:()=>{c.component.exposed.visible.value=!1}}};kF.forEach(t=>{kd[t]=(e={},n)=>((Ke(e)||is(e))&&(e={message:e}),kd({...e,type:t},n))});function yye(t,e,n){const i=Gf[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-Ey;d.props.offset=h}}function bye(){for(const t of Object.values(Gf))t.forEach(({vm:e})=>{e.component.exposed.visible.value=!1})}function wye(t="top-right"){var n,i,s,o;let e=((s=(i=(n=Gf[t][0])==null?void 0:n.vm.component)==null?void 0:i.props)==null?void 0:s.offset)||0;for(const{vm:r}of Gf[t])r.component.props.offset=e,e+=(((o=r.el)==null?void 0:o.offsetHeight)||0)+Ey}kd.closeAll=bye;kd.updateOffsets=wye;kd._context=null;const kye=Wre(kd,"$notify"),Cye=Ge({trigger:Ec.trigger,triggerKeys:Ec.triggerKeys,placement:N0.placement,disabled:Ec.disabled,visible:zn.visible,transition:zn.transition,popperOptions:N0.popperOptions,tabindex:N0.tabindex,content:zn.content,popperStyle:zn.popperStyle,popperClass:zn.popperClass,enterable:{...zn.enterable,default:!0},effect:{...zn.effect,default:"light"},teleported:zn.teleported,appendTo:zn.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}}),xye={"update:visible":t=>Jn(t),"before-enter":()=>!0,"before-leave":()=>!0,"after-enter":()=>!0,"after-leave":()=>!0},Sye="onUpdate:visible";var $ye=fe({name:"ElPopover",__name:"popover",props:Cye,emits:xye,setup(t,{expose:e,emit:n}){const i=t,s=n,o=Y(()=>i[Sye]),r=Be("popover"),a=J(),l=Y(()=>{var b;return(b=E(a))==null?void 0:b.popperRef}),c=Y(()=>[{width:fi(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(Ss),Wt({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:q(E(r).e("title")),role:"title"},x(t.title),3)):O("v-if",!0),le(b.$slots,"default",{hide:h},()=>[N(x(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"]))}}),Aye=$ye;const zA=(t,e)=>{var i;const n=(i=e.arg||e.value)==null?void 0:i.popperRef;n&&(n.triggerRef=t)};var Eye={mounted(t,e){zA(t,e)},updated(t,e){zA(t,e)}};const Mye="popover",Tye=Yre(Eye,Mye),Yo=qt(Aye,{directive:Tye});var Pye=!1;/*! | |
| 79 | 78 | * pinia v2.3.1 |
| 80 | 79 | * (c) 2025 Eduardo San Martin Morote |
| 81 | 80 | * @license MIT |
| 82 | - */let uV;const _b=t=>uV=t,dV=Symbol();function D6(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var km;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(km||(km={}));function eve(){const t=xy(!0),e=t.run(()=>J({}));let n=[],s=[];const i=Ki({install(o){_b(i),i._a=o,o.provide(dV,i),o.config.globalProperties.$pinia=i,s.forEach(r=>n.push(r)),s=[]},use(o){return!this._a&&!WK?s.push(o):n.push(o),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return i}const hV=()=>{};function W$(t,e,n,s=hV){t.push(e);const i=()=>{const o=t.indexOf(e);o>-1&&(t.splice(o,1),s())};return!n&&Sy()&&$y(i),i}function Vd(t,...e){t.slice().forEach(n=>{n(...e)})}const tve=t=>t(),Y$=Symbol(),Z2=Symbol();function R6(t,e){t instanceof Map&&e instanceof Map?e.forEach((n,s)=>t.set(s,n)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const n in e){if(!e.hasOwnProperty(n))continue;const s=e[n],i=t[n];D6(i)&&D6(s)&&t.hasOwnProperty(n)&&!hn(s)&&!yr(s)?t[n]=R6(i,s):t[n]=s}return t}const nve=Symbol();function sve(t){return!D6(t)||!t.hasOwnProperty(nve)}const{assign:Sl}=Object;function ive(t){return!!(hn(t)&&t.effect)}function ove(t,e,n,s){const{state:i,actions:o,getters:r}=e,a=n.state.value[t];let l;function c(){a||(n.state.value[t]=i?i():{});const u=yo(n.state.value[t]);return Sl(u,o,Object.keys(r||{}).reduce((d,h)=>(d[h]=Ki(q(()=>{_b(n);const f=n._s.get(t);return r[h].call(f,f)})),d),{}))}return l=fV(t,c,e,n,s,!0),l}function fV(t,e,n={},s,i,o){let r;const a=Sl({actions:{}},n),l={deep:!0};let c,u,d=[],h=[],f;const p=s.state.value[t];!o&&!p&&(s.state.value[t]={});let m;function b(P){let I;c=u=!1,typeof P=="function"?(P(s.state.value[t]),I={type:km.patchFunction,storeId:t,events:f}):(R6(s.state.value[t],P),I={type:km.patchObject,payload:P,storeId:t,events:f});const L=m=Symbol();dt().then(()=>{m===L&&(c=!0)}),u=!0,Vd(d,I,s.state.value[t])}const y=o?function(){const{state:I}=n,L=I?I():{};this.$patch(V=>{Sl(V,L)})}:hV;function C(){r.stop(),d=[],h=[],s._s.delete(t)}const k=(P,I="")=>{if(Y$ in P)return P[Z2]=I,P;const L=function(){_b(s);const V=Array.from(arguments),D=[],z=[];function Y(X){D.push(X)}function B(X){z.push(X)}Vd(h,{args:V,name:L[Z2],store:S,after:Y,onError:B});let U;try{U=P.apply(this&&this.$id===t?this:S,V)}catch(X){throw Vd(z,X),X}return U instanceof Promise?U.then(X=>(Vd(D,X),X)).catch(X=>(Vd(z,X),Promise.reject(X))):(Vd(D,U),U)};return L[Y$]=!0,L[Z2]=I,L},x={_p:s,$id:t,$onAction:W$.bind(null,h),$patch:b,$reset:y,$subscribe(P,I={}){const L=W$(d,P,I.detached,()=>V()),V=r.run(()=>Te(()=>s.state.value[t],D=>{(I.flush==="sync"?u:c)&&P({storeId:t,type:km.direct,events:f},D)},Sl({},l,I)));return L},$dispose:C},S=as(x);s._s.set(t,S);const T=(s._a&&s._a.runWithContext||tve)(()=>s._e.run(()=>(r=xy()).run(()=>e({action:k}))));for(const P in T){const I=T[P];if(hn(I)&&!ive(I)||yr(I))o||(p&&sve(I)&&(hn(I)?I.value=p[P]:R6(I,p[P])),s.state.value[t][P]=I);else if(typeof I=="function"){const L=k(I,P);T[P]=L,a.actions[P]=I}}return Sl(S,T),Sl(Yt(S),T),Object.defineProperty(S,"$state",{get:()=>s.state.value[t],set:P=>{b(I=>{Sl(I,P)})}}),s._p.forEach(P=>{Sl(S,r.run(()=>P({store:S,app:s._a,pinia:s,options:a})))}),p&&o&&n.hydrate&&n.hydrate(S.$state,p),c=!0,u=!0,S}/*! #__NO_SIDE_EFFECTS__ */function yb(t,e,n){let s,i;const o=typeof e=="function";typeof t=="string"?(s=t,i=o?n:e):(i=t,s=t.id);function r(a,l){const c=aP();return a=a||(c?qe(dV,null):null),a&&_b(a),a=uV,a._s.has(s)||(o?fV(s,e,i,a):ove(s,i,a)),a._s.get(s)}return r.$id=s,r}function rve(t,e){return Array.isArray(e)?e.reduce((n,s)=>(n[s]=function(){return t(this.$pinia)[s]},n),{}):Object.keys(e).reduce((n,s)=>(n[s]=function(){const i=t(this.$pinia),o=e[s];return typeof o=="function"?o.call(this,i):i[o]},n),{})}function ave(t,e){return Array.isArray(e)?e.reduce((n,s)=>(n[s]=function(...i){return t(this.$pinia)[s](...i)},n),{}):Object.keys(e).reduce((n,s)=>(n[s]=function(...i){return t(this.$pinia)[e[s]](...i)},n),{})}function lve(t){return typeof t=="object"&&t!==null}function G$(t,e){return t=lve(t)?t:Object.create(null),new Proxy(t,{get(n,s,i){return s==="key"?Reflect.get(n,s,i):Reflect.get(n,s,i)||Reflect.get(e,s,i)}})}function cve(t,e){return e.reduce((n,s)=>n==null?void 0:n[s],t)}function uve(t,e,n){return e.slice(0,-1).reduce((s,i)=>/^(__proto__)$/.test(i)?{}:s[i]=s[i]||{},t)[e[e.length-1]]=n,t}function dve(t,e){return e.reduce((n,s)=>{const i=s.split(".");return uve(n,i,cve(t,i))},{})}function hve(t,e){return n=>{var s;try{const{storage:i=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:i,beforeRestore:o,afterRestore:r,serializer:a,key:((s=t.key)!=null?s:d=>d)(typeof l=="string"?l:l(e.$id)),paths:c,debug:u}}catch(i){return n.debug&&console.error("[pinia-plugin-persistedstate]",i),null}}}function q$(t,{storage:e,serializer:n,key:s,debug:i}){try{const o=e==null?void 0:e.getItem(s);o&&t.$patch(n==null?void 0:n.deserialize(o))}catch(o){i&&console.error("[pinia-plugin-persistedstate]",o)}}function X$(t,{storage:e,serializer:n,key:s,paths:i,debug:o}){try{const r=Array.isArray(i)?dve(t,i):t;e.setItem(s,n.serialize(r))}catch(r){o&&console.error("[pinia-plugin-persistedstate]",r)}}function fve(t={}){return e=>{const{auto:n=!1}=t,{options:{persist:s=n},store:i,pinia:o}=e;if(!s)return;if(!(i.$id in o.state.value)){const a=o._s.get(i.$id.replace("__hot:",""));a&&Promise.resolve().then(()=>a.$persist());return}const r=(Array.isArray(s)?s.map(a=>G$(a,t)):[G$(s,t)]).map(hve(t,i)).filter(Boolean);i.$persist=()=>{r.forEach(a=>{X$(i.$state,a)})},i.$hydrate=({runHooks:a=!0}={})=>{r.forEach(l=>{const{beforeRestore:c,afterRestore:u}=l;a&&(c==null||c(e)),q$(i,l),a&&(u==null||u(e))})},r.forEach(a=>{const{beforeRestore:l,afterRestore:c}=a;l==null||l(e),q$(i,a),c==null||c(e),i.$subscribe((u,d)=>{X$(d,a)},{detached:!0})})}}var pve=fve();const de=(t,e)=>{const n=t.__vccOpts||t;for(const[s,i]of e)n[s]=i;return n},mve={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()}}},gve=["id"];function vve(t,e,n,s,i,o){const r=or;return v(),R(r,Mn({"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}),Es({default:w(()=>[g("div",{class:W(n.bodyClass)},[ae(t.$slots,"default")],2)]),_:2},[n.withHeader?{name:"header",fn:w(({close:a,titleId:l,titleClass:c})=>[ae(t.$slots,"header",{close:a,titleId:l,titleClass:c},()=>[n.title?(v(),$("h4",{key:0,id:l,class:W([c,n.headerClass]),style:{margin:"0"}},M(n.title),11,gve)):O("",!0)])]),key:"0"}:void 0,t.$slots.footer?{name:"footer",fn:w(()=>[g("div",{class:W(n.footerClass)},[ae(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 k4=de(mve,[["render",vve]]);function _ve(t,e){for(var n=-1,s=t==null?0:t.length;++n<s&&e(t[n],n,t)!==!1;);return t}var yve=_ve;function bve(t){return function(e,n,s){for(var i=-1,o=Object(e),r=s(e),a=r.length;a--;){var l=r[t?a:++i];if(n(o[l],l,o)===!1)break}return e}}var wve=bve,Cve=wve,kve=Cve(),xve=kve;function Sve(t,e){for(var n=-1,s=Array(t);++n<t;)s[n]=e(n);return s}var $ve=Sve,Ave=typeof us=="object"&&us&&us.Object===Object&&us,pV=Ave,Mve=pV,Eve=typeof self=="object"&&self&&self.Object===Object&&self,Tve=Mve||Eve||Function("return this")(),$a=Tve,Pve=$a,Ive=Pve.Symbol,bb=Ive,K$=bb,mV=Object.prototype,Lve=mV.hasOwnProperty,Ove=mV.toString,gp=K$?K$.toStringTag:void 0;function Dve(t){var e=Lve.call(t,gp),n=t[gp];try{t[gp]=void 0;var s=!0}catch{}var i=Ove.call(t);return s&&(e?t[gp]=n:delete t[gp]),i}var Rve=Dve,Vve=Object.prototype,Fve=Vve.toString;function Nve(t){return Fve.call(t)}var Bve=Nve,Z$=bb,zve=Rve,Hve=Bve,Uve="[object Null]",jve="[object Undefined]",J$=Z$?Z$.toStringTag:void 0;function Wve(t){return t==null?t===void 0?jve:Uve:J$&&J$ in Object(t)?zve(t):Hve(t)}var c1=Wve;function Yve(t){return t!=null&&typeof t=="object"}var u1=Yve,Gve=c1,qve=u1,Xve="[object Arguments]";function Kve(t){return qve(t)&&Gve(t)==Xve}var Zve=Kve,Q$=Zve,Jve=u1,gV=Object.prototype,Qve=gV.hasOwnProperty,e_e=gV.propertyIsEnumerable,t_e=Q$(function(){return arguments}())?Q$:function(t){return Jve(t)&&Qve.call(t,"callee")&&!e_e.call(t,"callee")},x4=t_e,n_e=Array.isArray,Aa=n_e,B_={exports:{}};function s_e(){return!1}var i_e=s_e;B_.exports;(function(t,e){var n=$a,s=i_e,i=e&&!e.nodeType&&e,o=i&&!0&&t&&!t.nodeType&&t,r=o&&o.exports===i,a=r?n.Buffer:void 0,l=a?a.isBuffer:void 0,c=l||s;t.exports=c})(B_,B_.exports);var S4=B_.exports,o_e=9007199254740991,r_e=/^(?:0|[1-9]\d*)$/;function a_e(t,e){var n=typeof t;return e=e??o_e,!!e&&(n=="number"||n!="symbol"&&r_e.test(t))&&t>-1&&t%1==0&&t<e}var vV=a_e,l_e=9007199254740991;function c_e(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=l_e}var $4=c_e,u_e=c1,d_e=$4,h_e=u1,f_e="[object Arguments]",p_e="[object Array]",m_e="[object Boolean]",g_e="[object Date]",v_e="[object Error]",__e="[object Function]",y_e="[object Map]",b_e="[object Number]",w_e="[object Object]",C_e="[object RegExp]",k_e="[object Set]",x_e="[object String]",S_e="[object WeakMap]",$_e="[object ArrayBuffer]",A_e="[object DataView]",M_e="[object Float32Array]",E_e="[object Float64Array]",T_e="[object Int8Array]",P_e="[object Int16Array]",I_e="[object Int32Array]",L_e="[object Uint8Array]",O_e="[object Uint8ClampedArray]",D_e="[object Uint16Array]",R_e="[object Uint32Array]",Hn={};Hn[M_e]=Hn[E_e]=Hn[T_e]=Hn[P_e]=Hn[I_e]=Hn[L_e]=Hn[O_e]=Hn[D_e]=Hn[R_e]=!0;Hn[f_e]=Hn[p_e]=Hn[$_e]=Hn[m_e]=Hn[A_e]=Hn[g_e]=Hn[v_e]=Hn[__e]=Hn[y_e]=Hn[b_e]=Hn[w_e]=Hn[C_e]=Hn[k_e]=Hn[x_e]=Hn[S_e]=!1;function V_e(t){return h_e(t)&&d_e(t.length)&&!!Hn[u_e(t)]}var F_e=V_e;function N_e(t){return function(e){return t(e)}}var B_e=N_e,z_={exports:{}};z_.exports;(function(t,e){var n=pV,s=e&&!e.nodeType&&e,i=s&&!0&&t&&!t.nodeType&&t,o=i&&i.exports===s,r=o&&n.process,a=function(){try{var l=i&&i.require&&i.require("util").types;return l||r&&r.binding&&r.binding("util")}catch{}}();t.exports=a})(z_,z_.exports);var z_e=z_.exports,H_e=F_e,U_e=B_e,eA=z_e,tA=eA&&eA.isTypedArray,j_e=tA?U_e(tA):H_e,A4=j_e,W_e=$ve,Y_e=x4,G_e=Aa,q_e=S4,X_e=vV,K_e=A4,Z_e=Object.prototype,J_e=Z_e.hasOwnProperty;function Q_e(t,e){var n=G_e(t),s=!n&&Y_e(t),i=!n&&!s&&q_e(t),o=!n&&!s&&!i&&K_e(t),r=n||s||i||o,a=r?W_e(t.length,String):[],l=a.length;for(var c in t)(e||J_e.call(t,c))&&!(r&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||X_e(c,l)))&&a.push(c);return a}var eye=Q_e,tye=Object.prototype;function nye(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||tye;return t===n}var _V=nye;function sye(t,e){return function(n){return t(e(n))}}var iye=sye,oye=iye,rye=oye(Object.keys,Object),aye=rye,lye=_V,cye=aye,uye=Object.prototype,dye=uye.hasOwnProperty;function hye(t){if(!lye(t))return cye(t);var e=[];for(var n in Object(t))dye.call(t,n)&&n!="constructor"&&e.push(n);return e}var yV=hye;function fye(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Bf=fye,pye=c1,mye=Bf,gye="[object AsyncFunction]",vye="[object Function]",_ye="[object GeneratorFunction]",yye="[object Proxy]";function bye(t){if(!mye(t))return!1;var e=pye(t);return e==vye||e==_ye||e==gye||e==yye}var bV=bye,wye=bV,Cye=$4;function kye(t){return t!=null&&Cye(t.length)&&!wye(t)}var M4=kye,xye=eye,Sye=yV,$ye=M4;function Aye(t){return $ye(t)?xye(t):Sye(t)}var E4=Aye,Mye=xve,Eye=E4;function Tye(t,e){return t&&Mye(t,e,Eye)}var Pye=Tye,Iye=M4;function Lye(t,e){return function(n,s){if(n==null)return n;if(!Iye(n))return t(n,s);for(var i=n.length,o=e?i:-1,r=Object(n);(e?o--:++o<i)&&s(r[o],o,r)!==!1;);return n}}var Oye=Lye,Dye=Pye,Rye=Oye,Vye=Rye(Dye),Fye=Vye;function Nye(t){return t}var wV=Nye,Bye=wV;function zye(t){return typeof t=="function"?t:Bye}var Hye=zye,Uye=yve,jye=Fye,Wye=Hye,Yye=Aa;function Gye(t,e){var n=Yye(t)?Uye:jye;return n(t,Wye(e))}var qye=Gye,Xye=qye;const ic=Ts(Xye);function Bt(t){return window.fluentComAdmin.i18n[t]||t}const Kye={public:{label:Bt("Public"),description:Bt("__PUBLIC_SPACE_DESC"),space_description:Bt("__PIBLIC_SPACE_DESC_2")},private:{label:Bt("Private"),description:Bt("__PRIVATE_SPACE_DESC"),space_description:Bt("__PRIVATE_SPACE_DESC_2")},secret:{label:Bt("Secret"),description:Bt("Only invited members can view and post."),space_description:Bt("__SECRET_SPACE_DESC_2")}},Zye={public:{label:Bt("Public"),description:Bt("Anyone can view and enroll the course for free")},private:{label:Bt("Private"),description:Bt("__PRIVATE_COURSE_DESC")},secret:{label:Bt("Secret"),description:Bt("Only invited students can view and enroll the course content.")}},Jye={self_paced:{label:Bt("Self Paced"),description:Bt("__SELF_PAED_COURSE_DESC")},structured:{label:Bt("Structured"),description:Bt("__STRUCTURED_COURSE_DESC")},scheduled:{label:Bt("Scheduled"),description:Bt("Course starts on a specific date. Sections are dripped relative to that date.")}},Qye={leader_board_module:{headerTitle:Bt("Leaderboard Settings"),headerDescription:Bt("Settings for Leaderboard & Gamification features"),featureImage:"leaderboard_module.png",bodyTitle:Bt("Get Leaderboard & Gamification Module"),bodyDescription:Bt("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:Bt("Emoji Module"),headerDescription:Bt("Settings for Emoji & Reaction features"),featureImage:"emoji_module.png",bodyTitle:Bt("Get Emoji & Reaction Module"),bodyDescription:Bt("Use emojis to add a personal touch and make your new article, post, or comment more expressive")},giphy_module:{headerTitle:Bt("Giphy Module"),headerDescription:Bt("Customize Your Giphy Module Settings"),featureImage:"giphy_module.png",bodyTitle:Bt("Get Giphy Module"),bodyDescription:Bt("Want to use awesome GIFs? Upgrade to Pro plan now and enjoy surfing on FluentCommunity")},user_badge_module:{headerTitle:Bt("User Badge Module"),headerDescription:Bt("Add a badge next to user profile name to highlight valued users"),featureImage:"badge_module.png",bodyTitle:Bt("Get User Badge Module"),bodyDescription:Bt("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:Bt("Media Module"),headerDescription:Bt("Add a badge next to user profile name to highlight valued users"),featureImage:"media_module.png",bodyTitle:Bt("Get Media Module"),bodyDescription:Bt("Choose where to store your media files. Options include Local File System, Amazon S3, or Cloudflare R2 for storing and serving your media assets")}},nh=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]},ebe={name:"ImageUploader",emits:["uploaded","completed","uploading"],data(){return{loading:!1}},props:{button_text:{type:String,default:""},additionalData:{type:Object,default:()=>({})},isMultiple:{type:Boolean,default:!1},can_remove:{type:Boolean,default:!1},isTextBtn:{type:Boolean,default:!0},removeIcon:{type:Boolean,default:!0},className:{type:String,default:"image-uploader"}},methods:{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 tbe(t,e,n,s,i,o){const r=Ge,a=l1,l=H("CloseBold"),c=ye,u=_t("loading");return v(),$(te,null,[_(a,{class:W(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(()=>[ae(t.$slots,"trigger",{},()=>[ae(t.$slots,"default",{},()=>[Pe((v(),R(r,{disabled:i.loading,text:n.isTextBtn,class:"fcom_plain_button"},{default:w(()=>[G(M(n.button_text||t.$t("Upload Photo")),1)]),_:1},8,["disabled","text"])),[[u,i.loading]])])])]),_:3},8,["class","multiple","action","headers","data","on-success","on-progress","on-error"]),n.can_remove?(v(),R(r,{key:0,class:"remove_img",size:"small",type:"danger",plain:"",onClick:e[0]||(e[0]=d=>t.$emit("uploaded","")),text:n.isTextBtn},{default:w(()=>[ae(t.$slots,"remove",{},()=>[n.removeIcon?(v(),R(c,{key:0},{default:w(()=>[_(l)]),_:1})):O("",!0),g("span",null,M(t.$t("Remove")),1)])]),_:3},8,["text"])):O("",!0)],64)}const vd=de(ebe,[["render",tbe]]),nbe={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])}}},sbe={class:"fcom_svg_generator"},ibe={class:"fcom_form_item"},obe={class:"fcom_form_item"},rbe=["innerHTML"];function abe(t,e,n,s,i,o){const r=pd,a=Ff,l=Ps;return v(),$("div",sbe,[g("div",ibe,[g("label",null,M(t.$t("Select Shape Color:")),1),_(r,{predefine:t.appVars.suggestedColors,modelValue:i.currentColor,"onUpdate:modelValue":e[0]||(e[0]=c=>i.currentColor=c),onActiveChange:o.colorChanged,size:"large","show-alpha":""},null,8,["predefine","modelValue","onActiveChange"])]),g("div",obe,[g("label",null,M(t.$t("Select Shape:")),1),_(l,{onChange:e[1]||(e[1]=c=>o.selectShape(i.selectedShape)),modelValue:i.selectedShape,"onUpdate:modelValue":e[2]||(e[2]=c=>i.selectedShape=c)},{default:w(()=>[(v(!0),$(te,null,be(o.svgShapes,(c,u)=>(v(),R(a,{key:u,value:u},{default:w(()=>[g("div",{innerHTML:c},null,8,rbe)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])])}const lbe=de(nbe,[["render",abe]]);var T4="emoji-mart";const cbe=JSON;var CV=typeof window<"u"&&"localStorage"in window;let V6,F6;function ube(t){t||(t={}),V6=t.getter,F6=t.setter}function dbe(t){T4=t}function hbe(t){for(let e in t){let n=t[e];kV(e,n)}}function kV(t,e){if(F6)F6(t,e);else{if(!CV)return;try{window.localStorage[`${T4}.${t}`]=cbe.stringify(e)}catch{}}}function fbe(t){if(V6)return V6(t);if(!CV)return;try{var e=window.localStorage[`${T4}.${t}`]}catch{return}if(e)return JSON.parse(e)}const yf={update:hbe,set:kV,get:fbe,setNamespace:dbe,setHandlers:ube},J2={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"},xV=t=>{const e=[];var n=(s,i)=>{s&&(Array.isArray(s)?s:[s]).forEach(o=>{(i?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 SV(t){var e=Object.getOwnPropertyNames(t);for(let n of e){let s=t[n];t[n]=s&&typeof s=="object"?SV(s):s}return Object.freeze(t)}const pbe=t=>{if(!t.compressed)return t;t.compressed=!1;for(let e in t.emojis){let n=t.emojis[e];for(let s in J2)n[s]=n[J2[s]],delete n[J2[s]];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=xV(n)}return t=SV(t),t},Q2=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart","hankey"];let Vo,P4,N6={};function $V(){P4=!0,Vo=yf.get("frequently")}function mbe(t){P4||$V();var{id:e}=t;Vo||(Vo=N6),Vo[e]||(Vo[e]=0),Vo[e]+=1,yf.set("last",e),yf.set("frequently",Vo)}function gbe(t){if(P4||$V(),!Vo){N6={};const r=[];let a=Math.min(t,Q2.length);for(let l=0;l<a;l++)N6[Q2[l]]=parseInt((a-l)/4,10)+1,r.push(Q2[l]);return r}const e=t,n=[];for(let r in Vo)Vo.hasOwnProperty(r)&&n.push(r);const i=n.sort((r,a)=>Vo[r]-Vo[a]).reverse().slice(0,e),o=yf.get("last");return o&&i.indexOf(o)==-1&&(i.pop(),i.push(o)),i}const B6={add:mbe,get:gbe},vbe={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>'},_be={props:{i18n:{type:Object,required:!0},color:{type:String},categories:{type:Array,required:!0},activeCategory:{type:Object,default(){return{}}}},emits:["click"],created(){this.svgs=vbe}},ybe={role:"tablist",class:"emoji-mart-anchors"},bbe=["aria-label","aria-selected","data-title","onClick"],wbe=["innerHTML"];function Cbe(t,e,n,s,i,o){return v(),$("div",ybe,[(v(!0),$(te,null,be(n.categories,r=>(v(),$("button",{role:"tab",type:"button","aria-label":r.name,"aria-selected":r.id==n.activeCategory.id,key:r.id,class:W({"emoji-mart-anchor":!0,"emoji-mart-anchor-selected":r.id==n.activeCategory.id}),style:Ke({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,wbe),g("span",{"aria-hidden":"true",class:"emoji-mart-anchor-bar",style:Ke({backgroundColor:n.color})},null,4)],14,bbe))),128))])}const kbe=de(_be,[["render",Cbe]]),xbe=String,Sbe=xbe.fromCodePoint||function(){var e=16384,n=[],s,i,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,s=(l>>10)+55296,i=l%1024+56320,n.push(s,i)),(o+1===r||n.length>e)&&(a+=String.fromCharCode.apply(null,n),n.length=0)}return a};function $be(t){var e=t.split("-"),n=e.map(s=>`0x${s}`);return Sbe.apply(null,n)}function nA(t){return t.reduce((e,n)=>(e.indexOf(n)===-1&&e.push(n),e),[])}function Abe(t,e){const n=nA(t),s=nA(e);return n.filter(i=>s.indexOf(i)>=0)}function AV(t,e){var n={};for(let s in t){let i=t[s],o=i;e.hasOwnProperty(s)&&(o=e[s]),typeof o=="object"&&(o=AV(i,o)),n[s]=o}return n}function Mbe(){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 Ebe=61,Tbe=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/,sA=["1F3FA","1F3FB","1F3FC","1F3FD","1F3FE","1F3FF"];class Pbe{constructor(e,{emojisToShowFilter:n,include:s,exclude:i,custom:o,recent:r,recentLength:a=20}={}){this._data=pbe(e),this._emojisFilter=n||null,this._include=s||null,this._exclude=i||null,this._custom=o||[],this._recent=r||B6.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,s)=>{const i=this._include.indexOf(n.id),o=this._include.indexOf(s.id);return i<o?-1:i>o?1:0})),e.forEach(n=>{if(!this.isCategoryNeeded(n.id))return;let s={id:n.id,name:n.name,emojis:[]};n.emojis.forEach(i=>{let o=this.addEmoji(i);o&&s.emojis.push(o)}),s.emojis.length&&this._categories.push(s)}),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 s of this._customCategory.emojis)if(s.id===n){this._recentCategory.emojis.push(s);return}this.hasEmoji(n)&&this._recentCategory.emojis.push(this.emoji(n))}),this._recentCategory.emojis.length&&this._categories.unshift(this._recentCategory))}findEmoji(e,n){let s=e.match(Tbe);if(s&&(e=s[1],s[2]&&(n=parseInt(s[2],10))),this._data.aliases.hasOwnProperty(e)&&(e=this._data.aliases[e]),this._emojis.hasOwnProperty(e)){let i=this._emojis[e];return n?i.getSkin(n):i}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 s=e.toLowerCase().split(/[\s|,|\-|_]+/),i=[];s.length>2&&(s=[s[0],s[1]]),i=s.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,b=r.substr(0,c),y=m.indexOf(b);if(y!=-1){let C=y+1;b==f&&(C=0),l.results.push(p),l.emojis[f]=p,h[f]=C}}l.results.sort((f,p)=>{var m=h[f.id],b=h[p.id];return m-b})}a=l.emojis}return l.results}).filter(r=>r);var o=null;return i.length>1?o=Abe.apply(null,i):i.length?o=i[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=xV(n));let s=new H_(n);return this._emojis[s.id]=s,this._customCategory.emojis.push(s),s}addEmoji(e){let n=this._data.emojis[e];if(!this.isEmojiNeeded(n))return!1;let s=new H_(n);if(this._emojis[e]=s,s.native&&(this._nativeEmojis[s.native]=s),s._skins)for(let i in s._skins){let o=s._skins[i];o.native&&(this._nativeEmojis[o.native]=o)}return s.emoticons&&s.emoticons.forEach(i=>{this._emoticons[i]||(this._emoticons[i]=e)}),s}isCategoryNeeded(e){let n=this._include&&this._include.length?this._include.indexOf(e)>-1:!0,s=this._exclude&&this._exclude.length?this._exclude.indexOf(e)>-1:!1;return!(!n||s)}isEmojiNeeded(e){return this._emojisFilter?this._emojisFilter(e):!0}}class H_{constructor(e){if(this._data=Object.assign({},e),this._skins=null,this._data.skin_variations){this._skins=[];for(var n in sA){let s=sA[n],i=this._data.skin_variations[s],o=Object.assign({},e);for(let r in i)o[r]=i[r];delete o.skin_variations,o.skin_tone=parseInt(n)+1,this._skins.push(new H_(o))}}this._sanitized=Ibe(this._data);for(let s in this._sanitized)this[s]=this._sanitized[s];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=Ebe-1,n=+(100/e*this._data.sheet_x).toFixed(2),s=+(100/e*this._data.sheet_y).toFixed(2);return`${n}% ${s}%`}ariaLabel(){return[this.native].concat(this.short_names).filter(Boolean).join(", ")}}class MV{constructor(e,n,s,i,o,r,a){this._emoji=e,this._native=i,this._skin=n,this._set=s,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 Ibe(t){var{name:e,short_names:n,skin_tone:s,skin_variations:i,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}:(s&&(u+=`:skin-tone-${s}:`),{id:c,name:e,colons:u,emoticons:o,unified:r.toLowerCase(),skin:s||(i?1:null),native:$be(r)})}const Lbe={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"}},Obe={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{}}}},Dbe={props:{...Lbe,data:{type:Object,required:!0}},emits:["click","mouseenter","mouseleave"],computed:{view(){return new MV(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 Rbe(t,e,n,s,i,o){return o.view.canRender?(v(),R(Tt(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:W(o.view.cssClass),style:Ke(o.view.cssStyle)},M(o.view.content),7)]),_:1},40,["title","aria-label","data-title","onMouseenter","onMouseleave","onClick"])):O("",!0)}const EV=de(Dbe,[["render",Rbe]]),Vbe={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 MV(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:EV}},Fbe=["aria-label"],Nbe={class:"emoji-mart-category-label"},Bbe={class:"emoji-mart-category-label"},zbe=["aria-label","data-title","title","onMouseenter","onMouseleave","onClick"],Hbe={key:0},Ube={class:"emoji-mart-no-results-label"};function jbe(t,e,n,s,i,o){const r=H("emoji");return o.isVisible&&(o.isSearch||o.hasResults)?(v(),$("section",{key:0,class:W({"emoji-mart-category":!0,"emoji-mart-no-results":!o.hasResults}),"aria-label":n.i18n.categories[n.id]},[g("div",Nbe,[g("h3",Bbe,M(n.i18n.categories[n.id]),1)]),(v(!0),$(te,null,be(o.emojiObjects,({emojiObject:a,emojiView:l})=>(v(),$(te,null,[l.canRender?(v(),$("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:W(["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:W(l.cssClass),style:Ke(l.cssStyle)},M(l.content),7)],42,zbe)):O("",!0)],64))),256)),o.hasResults?O("",!0):(v(),$("div",Hbe,[_(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",Ube,M(n.i18n.notfound),1)]))],10,Fbe)):O("",!0)}const Wbe=de(Vbe,[["render",jbe]]),Ybe={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}}},Gbe=["onClick"];function qbe(t,e,n,s,i,o){return v(),$("div",{class:W({"emoji-mart-skin-swatches":!0,"emoji-mart-skin-swatches-opened":i.opened})},[(v(),$(te,null,be(6,r=>g("span",{key:r,class:W({"emoji-mart-skin-swatch":!0,"emoji-mart-skin-swatch-selected":n.skin==r})},[g("span",{class:W("emoji-mart-skin emoji-mart-skin-tone-"+r),onClick:a=>o.onClick(r)},null,10,Gbe)],2)),64))],2)}const Xbe=de(Ybe,[["render",qbe]]),Kbe={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:EV,Skins:Xbe}},Zbe={class:"emoji-mart-preview"},Jbe={class:"emoji-mart-preview-emoji"},Qbe={class:"emoji-mart-preview-data"},e2e={class:"emoji-mart-preview-name"},t2e={class:"emoji-mart-preview-shortnames"},n2e={class:"emoji-mart-preview-emoticons"},s2e={class:"emoji-mart-preview-emoji"},i2e={class:"emoji-mart-preview-data"},o2e={class:"emoji-mart-title-label"},r2e={key:0,class:"emoji-mart-preview-skins"};function a2e(t,e,n,s,i,o){const r=H("emoji"),a=H("skins");return v(),$("div",Zbe,[n.emoji?(v(),$(te,{key:0},[g("div",Jbe,[_(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",Qbe,[g("div",e2e,M(n.emoji.name),1),g("div",t2e,[(v(!0),$(te,null,be(o.emojiShortNames,l=>(v(),$("span",{key:l,class:"emoji-mart-preview-shortname"},":"+M(l)+":",1))),128))]),g("div",n2e,[(v(!0),$(te,null,be(o.emojiEmoticons,l=>(v(),$("span",{key:l,class:"emoji-mart-preview-emoticon"},M(l),1))),128))])])],64)):(v(),$(te,{key:1},[g("div",s2e,[_(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",i2e,[g("span",o2e,M(n.title),1)]),n.showSkinTones?(v(),$("div",r2e,[_(a,{skin:n.skinProps.skin,onChange:e[0]||(e[0]=l=>n.onSkinChange(l))},null,8,["skin"])])):O("",!0)],64))])}const l2e=de(Kbe,[["render",a2e]]),c2e={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()}},u2e={class:"emoji-mart-search"},d2e=["placeholder"];function h2e(t,e,n,s,i,o){return v(),$("div",u2e,[Pe(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]=$t(r=>t.$emit("arrowLeft",r),["left"])),e[1]||(e[1]=$t(()=>t.$emit("arrowRight"),["right"])),e[2]||(e[2]=$t(()=>t.$emit("arrowDown"),["down"])),e[3]||(e[3]=$t(r=>t.$emit("arrowUp",r),["up"])),e[4]||(e[4]=$t(()=>t.$emit("enter"),["enter"]))],"onUpdate:modelValue":e[5]||(e[5]=r=>i.value=r)},null,40,d2e),[[zu,i.value]]),e[6]||(e[6]=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))])}const f2e=de(c2e,[["render",h2e]]);var p2e=typeof window<"u";p2e&&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(s,i){var o=new Date().getTime(),r=Math.max(0,16-(o-t)),a=window.setTimeout(function(){s(o+r)},r);return t=o+r,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(s){clearTimeout(s)})}();class m2e{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 s=this.filteredCategories[0];for(let i=0,o=this.filteredCategories.length;i<o;i++){let r=this.filteredCategories[i],a=this._vm.getCategoryComponent(i);if(a&&a.$el.offsetTop-50>n)break;s=r}this.activeCategory=s}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),s=this._vm.getCategoryComponent(n),i=()=>{if(s){let o=s.$el.offsetTop;e.first&&(o=0),this._vm.$refs.scroll.scrollTop=o}};this._vm.infiniteScroll?i():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 s=0;s<n;s++)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"),s=e.offsetTop-e.offsetHeight;n&&n.offsetTop+n.offsetHeight>s+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 g2e={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"}},v2e={props:{...Obe,data:{type:Object,required:!0}},emits:["select","skin-change"],data(){return{activeSkin:this.skin||yf.get("skin")||this.defaultSkin,view:new m2e(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+Mbe()},filteredCategories(){return this.view.filteredCategories},mergedI18n(){return Object.freeze(AV(g2e,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),B6.add(this.view.previewEmoji))},onEmojiClick(t){this.$emit("select",t),B6.add(t)},onTextSelect(t){t.stopPropagation()},onSkinChange(t){this.activeSkin=t,yf.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:kbe,Category:Wbe,Preview:l2e,Search:f2e}},_2e={key:0,class:"emoji-mart-bar emoji-mart-bar-anchors"},y2e={id:"emoji-mart-list",ref:"scrollContent",role:"listbox","aria-expanded":"true"},b2e={key:0,class:"emoji-mart-bar emoji-mart-bar-preview"};function w2e(t,e,n,s,i,o){const r=H("anchors"),a=H("search"),l=H("category"),c=H("preview");return v(),$("section",{class:"emoji-mart emoji-mart-static",style:Ke(o.customStyles)},[t.showCategories?(v(),$("div",_2e,[_(r,{data:n.data,i18n:o.mergedI18n,color:t.color,categories:i.view.allCategories,"active-category":i.view.activeCategory,onClick:o.onAnchorClick},null,8,["data","i18n","color","categories","active-category","onClick"])])):O("",!0),ae(t.$slots,"searchTemplate",{data:n.data,i18n:t.i18n,autoFocus:t.autoFocus,onSearch:o.onSearch},()=>[t.showSearch?(v(),R(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",y2e,[ae(t.$slots,"customCategory"),(v(!0),$(te,null,be(i.view.filteredCategories,(u,d)=>Pe((v(),R(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"])),[[Xt,t.infiniteScroll||u==i.view.activeCategory]])),128))],512)],544),ae(t.$slots,"previewTemplate",{data:n.data,title:t.title,emoji:i.view.previewEmoji,idleEmoji:o.idleEmoji,showSkinTones:t.showSkinTones,emojiProps:o.emojiProps,skinProps:o.skinProps,onSkinChange:o.onSkinChange},()=>[t.showPreview?(v(),$("div",b2e,[_(c,{data:n.data,title:t.title,emoji:i.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 C2e=de(v2e,[["render",w2e]]),k2e={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}},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,s,i,o,r;const e=(s=(n=this.$refs.popoverRef)==null?void 0:n.popperRef)==null?void 0:s.contentRef;e!=null&&e.contains(t.target)||(i=this.$refs.triggerRef)!=null&&i.contains(t.target)||(r=(o=t.target).closest)!=null&&r.call(o,".el-popper")||this.hide()},handleAction(t){this.hide(),t.action&&t.action()}},beforeUnmount(){document.removeEventListener("click",this.onClickOutside,!0)}},x2e={class:"actions_items",role:"menu"},S2e=["onClick"];function $2e(t,e,n,s,i,o){const r=H("MoreFilled"),a=ye,l=Ge,c=Ii;return v(),R(c,{trigger:"manual",placement:n.placement,persistent:n.persistent,width:n.width,visible:i.visible,ref:"popoverRef"},{reference:w(()=>[g("span",{ref:"triggerRef",class:"fcom_action_popover_trigger",onClick:e[0]||(e[0]=(...u)=>o.toggle&&o.toggle(...u))},[ae(t.$slots,"trigger",{},()=>[_(l,{"aria-label":t.$t("View actions"),class:"fcom_action_popover_default_trigger_button",size:"small"},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1})]),_:1},8,["aria-label"])])],512)]),default:w(()=>[ae(t.$slots,"default",{hide:o.hide},()=>[g("ul",x2e,[(v(!0),$(te,null,be(n.items,(u,d)=>(v(),$("li",{key:d,class:W(["fcom_action_popover_item",u.type?"fcom_action_popover_item_"+u.type:""]),role:"menuitem",onClick:h=>o.handleAction(u)},M(u.label),11,S2e))),128))])])]),_:3},8,["placement","persistent","width","visible"])}const zf=de(k2e,[["render",$2e]]),A2e={name:"SmilyIcon"},M2e={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function E2e(t,e,n,s,i,o){return v(),$("svg",M2e,[...e[0]||(e[0]=[ya('<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)])])}const T2e=de(A2e,[["render",E2e]]),P2e={name:"EmojiPicker",components:{Picker:C2e,ActionPopover:zf,SmilyIcon:T2e},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 Pbe(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})}}},I2e={class:"ffcom_emoji"},L2e={key:0,class:"emoji-mart emoji-mart-static",style:{width:"320px",padding:"10px 20px"}},O2e={key:0},D2e={style:{"text-align":"center","margin-bottom":"20px"}},R2e={key:1,class:"fcom_emoji_holder"};function V2e(t,e,n,s,i,o){const r=H("SmilyIcon"),a=ye,l=Ge,c=Wt,u=H("Picker"),d=H("action-popover");return v(),R(d,{ref:"fcom_emoji_popover","close-on-click-outside":!0,placement:"bottom",persistent:!1,"trigger-interactive":!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",I2e,[i.emojiLoading?(v(),$("div",L2e,[i.errorMessage?(v(),$("div",O2e,M(i.errorMessage),1)):(v(),$(te,{key:1},[g("div",D2e,M(t.$t("Loading.....")),1),_(c,{animated:!0,rows:3})],64))])):i.emojiIndex?(v(),$("div",R2e,[_(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:i.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 TV=de(P2e,[["render",V2e]]),F2e={name:"LogoEmojiSelector",components:{EmojiPicker:TV,ImageUploader:vd,SvgShapeGenerator:lbe,ActionPopover:zf},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"}}},N2e=["innerHTML"];function B2e(t,e,n,s,i,o){const r=Ge,a=H("EmojiPicker"),l=vt,c=vb,u=H("SvgShapeGenerator"),d=xa,h=H("ImageUploader"),f=gb,p=H("action-popover");return v(),R(p,{ref:"iconPicker","close-on-click-outside":!0,"trigger-interactive":!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,N2e)]),_:1})]),default:w(({hide:m})=>[g("div",null,[_(f,{modelValue:i.selectedTab,"onUpdate:modelValue":e[5]||(e[5]=b=>i.selectedTab=b),type:"border-card"},{default:w(()=>[_(c,{name:"emoji",label:t.$t("Emoji")},{default:w(()=>[_(l,{onChange:e[1]||(e[1]=b=>o.setData("emoji")),modelValue:i.emoji,"onUpdate:modelValue":e[2]||(e[2]=b=>i.emoji=b),placeholder:t.$t("Select or paste your emoji here"),style:{width:"100%"}},Es({_:2},[t.has_pro?{name:"append",fn:w(()=>[_(a,{close_on_select:!0,onEmojiSelected:e[0]||(e[0]=b=>{i.emoji=b,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(),R(c,{key:0,name:"shape_svg",label:t.$t("Custom SVG")},{default:w(()=>[_(l,{rows:4,type:"textarea",onChange:e[3]||(e[3]=b=>o.setData("shape_svg")),modelValue:i.shape_svg,"onUpdate:modelValue":e[4]||(e[4]=b=>i.shape_svg=b),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(()=>[i.logo?(v(),R(d,{key:0,alt:t.$t("Logo"),src:i.logo,style:{"max-width":"100px"}},null,8,["alt","src"])):O("",!0),_(h,{can_remove:!!i.logo,additionalData:{resize:!0,max_width:400},onUploaded:o.handleLogoPhotoUpload},null,8,["can_remove","onUploaded"])]),_:1},8,["label"])]),_:1},8,["modelValue"]),_(r,{onClick:b=>m(),type:"success",plain:"",class:"fcom_mt_20"},{default:w(()=>[G(M(t.$t("Close")),1)]),_:1},8,["onClick"])])]),_:1},8,["width"])}const d1=de(F2e,[["render",B2e]]),z2e={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})}}},H2e={key:0,class:"fcom_slug_input_info"},U2e=["innerHTML"],j2e={key:1,class:"fcom_help_text"};function W2e(t,e,n,s,i,o){const r=Ge,a=vt;return v(),$(te,null,[_(a,{class:"fcom_slug_input",disabled:n.disabled,readonly:i.showEdit,modelValue:i.model,"onUpdate:modelValue":e[1]||(e[1]=l=>i.model=l),ref:"input",placeholder:n.placeholder,onInput:o.updateSlug},Es({_:2},[n.prefix?{name:"prepend",fn:w(()=>[g("span",null,M(n.prefix),1)]),key:"0"}:void 0,i.showEdit?{name:"append",fn:w(()=>[_(r,{onClick:e[0]||(e[0]=l=>o.confirmEditInit()),text:"",type:"info"},{default:w(()=>[G(M(t.$t("change")),1)]),_:1})]),key:"1"}:void 0]),1032,["disabled","readonly","modelValue","placeholder","onInput"]),!i.showEdit&&n.edit_notice?(v(),$("div",H2e,[g("p",{innerHTML:n.edit_notice},null,8,U2e)])):O("",!0),n.description?(v(),$("div",j2e,[g("p",null,M(n.description),1)])):O("",!0)],64)}const _d=de(z2e,[["render",W2e]]),Y2e={name:"ErrorAlerts",props:{errors:{type:Array,default:()=>[]},dismissable:{type:Boolean,default:!1}},data(){return{dismissed:!1}},watch:{errors(){this.dismissed=!1}}},G2e={class:"fcom_errors_alert_list"};function q2e(t,e,n,s,i,o){const r=Tc;return n.errors.length&&!i.dismissed?(v(),R(r,{key:0,type:"warning",closable:n.dismissable,"show-icon":"",onClose:e[0]||(e[0]=a=>i.dismissed=!0)},{title:w(()=>[g("ul",G2e,[(v(!0),$(te,null,be(n.errors,(a,l)=>(v(),$("li",{key:l},[g("strong",null,M(a.title)+":",1),G(" "+M(a.description),1)]))),128))])]),_:1},8,["closable"])):O("",!0)}const h1=de(Y2e,[["render",q2e]]),vi=t=>{var e,n;return((n=(e=window.fluentComAdmin)==null?void 0:e.i18n)==null?void 0:n[t])||t},X2e=t=>{const e=[];return!t||!t.trim()?(e.push(vi("Path cannot be empty.")),{valid:!1,type:"path",errors:e}):(t=t.trim(),t.startsWith("/")||e.push(vi("Path must start with /")),/\s/.test(t)&&e.push(vi("Path cannot contain spaces.")),/[<>{}|\\^`"']/.test(t)&&e.push(vi("Path contains invalid characters: < > { } | \\ ^ ` \" '")),t.includes("..")&&e.push(vi('Path cannot contain ".." (directory traversal).')),/#.*#/.test(t)&&e.push(vi("Path cannot contain multiple hash fragments.")),{valid:e.length===0,type:"path",errors:e})},PV=t=>{const e=[];if(!t||!t.trim())return e.push(vi("URL cannot be empty.")),{valid:!1,type:"url",errors:e};if(t=t.trim(),!/^https?:\/\//i.test(t))return e.push(vi("URL must start with http:// or https://")),{valid:!1,type:"url",errors:e};/\s/.test(t)&&e.push(vi("URL cannot contain spaces."));const n=t.replace(/^https?:\/\//i,"");(!n||n==="/")&&e.push(vi("URL must have a domain name (e.g. example.com)."));const s=n.split("/")[0].split("?")[0].split("#")[0],i=s.split(":")[0];if(!(i==="localhost"||i.startsWith("localhost."))&&!/^[a-zA-Z0-9][a-zA-Z0-9\-]*(\.[a-zA-Z0-9\-]+)*\.[a-zA-Z]{2,}$/.test(i)&&e.push(vi("Domain must include a valid TLD (e.g. .com, .org).")),/[^a-zA-Z0-9.\-:]/.test(s)&&e.push(vi("Domain contains invalid characters. Only letters, numbers, dots, hyphens, and port are allowed.")),s.includes(":")){const r=s.split(":")[1];r&&!/^\d+$/.test(r)&&e.push(vi("Port must be a number (e.g. :8080)."))}return(/javascript:/i.test(t)||/data:/i.test(t)||/vbscript:/i.test(t))&&e.push(vi("URL contains a blocked protocol (javascript:, data:, vbscript:).")),{valid:e.length===0,type:"url",errors:e}},f1=t=>!t||!t.trim()?{valid:!1,type:null,errors:[vi("URL or path cannot be empty.")]}:(t=t.trim(),t.startsWith("/")?X2e(t):PV(t)),K2e={name:"TopicSelector",props:["modelValue","creatable","space_id"],emits:["update:modelValue"],components:{SlugInput:_d,ActionPopover:zf,ErrorAlerts:h1},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(){if(this.newTopicErrors=[],(!this.newTopic.title||!this.newTopic.title.trim())&&this.newTopicErrors.push({title:this.$t("Title"),description:this.$t("Topic title is required.")}),this.newTopic.slug&&this.newTopic.slug.trim()){const t=f1("/"+this.newTopic.slug);t.valid||t.errors.forEach(e=>{this.newTopicErrors.push({title:this.$t("Slug"),description:this.$t(e)})})}return 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()}},Z2e={class:"fcom_topic_selector"},J2e={key:0,class:"fcom_meta_text"};function Q2e(t,e,n,s,i,o){const r=an,a=Jt,l=H("Plus"),c=ye,u=Ge,d=vt,h=en,f=H("slug-input"),p=H("error-alerts"),m=rn,b=H("action-popover"),y=_t("loading");return v(),$("div",Z2e,[Pe((v(),R(a,{modelValue:i.selected,"onUpdate:modelValue":e[0]||(e[0]=C=>i.selected=C),"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),$(te,null,be(i.topics,C=>(v(),R(r,{key:C.slug,label:C.title,value:C.id},{default:w(()=>[g("span",null,M(C.title),1),C.description?(v(),$("span",J2e,M(C.description),1)):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","multiple-limit","placeholder"])),[[y,i.loading]]),t.isAdmin()&&n.creatable?(v(),R(b,{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,M(t.$t("New")),1)]),_:1},8,["disabled"])]),default:w(({hide:C})=>[_(m,{modelValue:i.newTopic,"onUpdate:modelValue":e[4]||(e[4]=k=>i.newTopic=k),"label-position":"top","require-asterisk-position":"right"},{default:w(()=>[_(h,{label:t.$t("Title"),required:""},{default:w(()=>[_(d,{modelValue:i.newTopic.title,"onUpdate:modelValue":e[1]||(e[1]=k=>i.newTopic.title=k),placeholder:t.$t("Title of the topic")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(h,{label:t.$t("Slug (optional)")},{default:w(()=>[_(f,{modelValue:i.newTopic.slug,"onUpdate:modelValue":e[2]||(e[2]=k=>i.newTopic.slug=k),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:i.newTopic.description,"onUpdate:modelValue":e[3]||(e[3]=k=>i.newTopic.description=k),type:"textarea",rows:3,placeholder:t.$t("Description of the topic")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,{errors:i.newTopicErrors,style:{"margin-bottom":"16px"}},null,8,["errors"]),_(h,null,{default:w(()=>[_(u,{class:"fcom_primary_button",onClick:k=>o.createTopic(C),loading:i.creatingTopic},{default:w(()=>[G(M(t.$t("Create")),1)]),_:1},8,["onClick","loading"])]),_:2},1024)]),_:2},1032,["modelValue"])]),_:1},8,["onShow"])):O("",!0)])}const IV=de(K2e,[["render",Q2e]]),ewe={name:"ListViewIcon"},twe={width:"160",height:"158",viewBox:"0 0 160 158",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function nwe(t,e,n,s,i,o){return v(),$("svg",twe,[...e[0]||(e[0]=[ya('<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)])])}const swe=de(ewe,[["render",nwe]]),iwe={name:"TimelineViewIcon"},owe={width:"160",height:"158",viewBox:"0 0 160 158",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rwe(t,e,n,s,i,o){return v(),$("svg",owe,[...e[0]||(e[0]=[ya('<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)])])}const awe=de(iwe,[["render",rwe]]),lwe={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 cwe(t,e,n,s,i,o){const r=an,a=Jt,l=_t("loading");return Pe((v(),R(a,{placeholder:t.$t("Select Menu Group"),clearable:"",modelValue:i.selected,"onUpdate:modelValue":e[0]||(e[0]=c=>i.selected=c)},{default:w(()=>[(v(!0),$(te,null,be(i.groups,c=>(v(),R(r,{key:c.id,value:c.id.toString(),label:c.title},null,8,["value","label"]))),128))]),_:1},8,["placeholder","modelValue"])),[[l,i.loading]])}const I4=de(lwe,[["render",cwe]]),uwe={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)}}},dwe={class:"fcom_form_builder"},hwe=["innerHTML"],fwe={key:8},pwe={key:9,class:"fcom_help_text"},mwe=["innerHTML"];function gwe(t,e,n,s,i,o){const r=vt,a=ko,l=Ps,c=an,u=Jt,d=Ht,h=tR,f=md,p=pd,m=en,b=Ge,y=rn;return v(),$("div",dwe,[_(y,{"label-position":"top",model:n.formData,onSubmit:Be(t.doNothing,["prevent"])},{default:w(()=>[(v(!0),$(te,null,be(n.formFields,(C,k)=>(v(),R(m,{key:t.index,label:C.label},Es({default:w(()=>[C.type=="text"?(v(),R(r,{key:0,modelValue:n.formData[k],"onUpdate:modelValue":x=>n.formData[k]=x,placeholder:C.placeholder,type:C.data_type||"text"},null,8,["modelValue","onUpdate:modelValue","placeholder","type"])):C.type=="radio"?(v(),R(l,{key:1,modelValue:n.formData[k],"onUpdate:modelValue":x=>n.formData[k]=x},{default:w(()=>[(v(!0),$(te,null,be(C.options,(x,S)=>(v(),R(a,{key:S,value:x.value,label:x.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):C.type=="select"?(v(),R(u,{key:2,class:"fcom_select",multiple:C.is_multiple,clearable:"",filterable:"",modelValue:n.formData[k],"onUpdate:modelValue":x=>n.formData[k]=x,placeholder:C.placeholder},{default:w(()=>[(v(!0),$(te,null,be(C.options,(x,S)=>(v(),R(c,{key:S,label:x.label,value:x.value},null,8,["label","value"]))),128))]),_:2},1032,["multiple","modelValue","onUpdate:modelValue","placeholder"])):C.type=="checkbox"?(v(),R(h,{key:3,modelValue:n.formData[k],"onUpdate:modelValue":x=>n.formData[k]=x},{default:w(()=>[(v(!0),$(te,null,be(C.options,(x,S)=>(v(),R(d,{key:S,value:x.value,label:x.label},null,8,["value","label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue"])):C.type=="inline_checkbox"?(v(),R(d,{key:4,modelValue:n.formData[k],"onUpdate:modelValue":x=>n.formData[k]=x,"true-value":C.true_value||"yes","false-value":C.false_value||"no"},{default:w(()=>[G(M(C.checkbox_label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","true-value","false-value"])):C.type=="date"?(v(),R(f,{key:5,modelValue:n.formData[k],"onUpdate:modelValue":x=>n.formData[k]=x,type:C.data_type||"date","value-format":C.value_format||"YYYY-MM-DD",format:C.value_format||"YYYY-MM-DD",placeholder:C.placeholder},null,8,["modelValue","onUpdate:modelValue","type","value-format","format","placeholder"])):C.type=="color_picker"?(v(),R(p,{key:6,modelValue:n.formData[k],"onUpdate:modelValue":x=>n.formData[k]=x},null,8,["modelValue","onUpdate:modelValue"])):C.type=="raw_html"?(v(),$("div",{key:7,innerHTML:C.content},null,8,hwe)):(v(),$("div",fwe,[g("pre",null,M(C),1)])),C.help_text?(v(),$("div",pwe,[g("p",{innerHTML:C.help_text},null,8,mwe)])):O("",!0)]),_:2},[C.label?{name:"label",fn:w(()=>[G(M(C.label),1)]),key:"0"}:void 0]),1032,["label"]))),128)),n.disableSubmit?O("",!0):(v(),R(m,{key:0},{default:w(()=>[_(b,{class:"fcom_primary_button",onClick:Be(o.handleSubmit,["prevent"])},{default:w(()=>[G(M(n.submitButtonText),1)]),_:1},8,["onClick"])]),_:1}))]),_:1},8,["model","onSubmit"])])}const LV=de(uwe,[["render",gwe]]),vwe={name:"CardViewIcon"},_we={xmlns:"http://www.w3.org/2000/svg",width:"160",height:"158",viewBox:"0 0 160 158",fill:"none"};function ywe(t,e,n,s,i,o){return v(),$("svg",_we,[...e[0]||(e[0]=[ya('<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)])])}const bwe=de(vwe,[["render",ywe]]),wwe={name:"CreateSpaceForm",emits:["completed"],components:{SpaceGroupSelector:I4,SlugInput:_d,ImageUploader:vd,LogoEmojiSelector:d1,TopicSelector:IV,ListViewIcon:swe,TimelineViewIcon:awe,FormBuilder:LV,ErrorAlerts:h1,CardViewIcon:bwe},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:Kye,formErrors:[],form:{title:"",slug:"",privacy:"private",parent_id:"",description:"",settings:{custom_lock_screen:"no",restricted_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",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"])},validateForm(){if(this.formErrors=[],(!this.form.title||!this.form.title.trim())&&this.formErrors.push({title:this.$t("Space Title"),description:this.$t("Space title is required.")}),this.form.slug&&this.form.slug.trim()){const t=f1("/"+this.form.slug);t.valid||t.errors.forEach(e=>{this.formErrors.push({title:this.$t("Slug"),description:this.$t(e)})})}return this.formErrors.length===0},submit(){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 s={};this.each(this.metaSettings,(i,o)=>{s[o]=i.settings}),e.meta_settings=s}n(t,e).then(s=>{if(this.$eventBus.emit("reloadMenu"),!this.form.id&&!this.disable_redirect){let i=this.$router.resolve({name:"space_feeds",params:{space:s.space.slug}}).href;window.location.href=i;return}this.$notify.success(s.message),this.$emit("completed",s.space),s.redirect_url&&!this.disable_redirect&&(window.location.href=s.redirect_url)}).catch(s=>{this.form.id||(this.showingSections=["basic"]),this.$handleError(s)}).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}},Cwe={key:0},kwe={class:"fcom_form_section"},xwe={class:"fcom_help_text"},Swe={class:"fcom_form_section"},$we={style:{"font-weight":"bold"}},Awe=["innerHTML"],Mwe={key:0},Ewe={class:"fcom_help_text"},Twe={key:0},Pwe={key:1,class:"fcom_form_section"},Iwe={class:"fcom_lined_checkboxes"},Lwe={key:0,class:"fcom_pro_feature"},Owe={key:0,style:{background:"var(--fcom-active-bg, #f0f3f5)",padding:"10px 15px","margin-bottom":"10px","border-radius":"8px"}},Dwe={class:"fcom_form_section"},Rwe={class:"fcom_svg_radio_item"},Vwe={class:"svg_radio_label"},Fwe={class:"fcom_svg_radio_item"},Nwe={class:"svg_radio_label"},Bwe={class:"fcom_svg_radio_item"},zwe={class:"svg_radio_label"},Hwe={class:"fcom_help_text"},Uwe={key:0},jwe={key:1},Wwe={class:"fcom_form_section"},Ywe={class:"fcom_help_text"},Gwe=["href"],qwe={class:"fcom_image_uploader_wrapper"},Xwe={class:"fcom_help_text"},Kwe={class:"fcom_image_uploader_wrapper"},Zwe={class:"fcom_help_text"},Jwe={class:"fcom_space_form_bottom"},Qwe={class:"fcom_space_form_bottom"},e3e={key:0},t3e={class:"fcom_form_section fcom_mt_20"};function n3e(t,e,n,s,i,o){const r=H("logo-emoji-selector"),a=vt,l=en,c=H("SlugInput"),u=H("space-group-selector"),d=an,h=Jt,f=ko,p=Ps,m=Ht,b=H("TimelineViewIcon"),y=H("ListViewIcon"),C=H("CardViewIcon"),k=H("topic-selector"),x=xa,S=H("EditPen"),E=ye,T=Ge,P=H("Delete"),I=H("ImageUploader"),L=H("error-alerts"),V=rn,D=H("form-builder"),z=_t("loading");return v(),$("div",null,[_(V,{onSubmit:e[29]||(e[29]=Be(Y=>t.doNothing(),["prevent"])),modelValue:i.form,"onUpdate:modelValue":e[30]||(e[30]=Y=>i.form=Y),"label-position":"top","require-asterisk-position":"right",class:"fcom_space_form"},{default:w(()=>[i.showingSections.indexOf("basic")!==-1?(v(),$(te,{key:0},[i.form.id?O("",!0):(v(),$("h4",Cwe,M(t.$t("Basic Info")),1)),g("div",kwe,[g("h4",null,M(t.$t("General")),1),_(l,{label:t.$t("Space Title"),required:""},{default:w(()=>[_(a,{type:"text",placeholder:t.$t("Your Space Title"),modelValue:i.form.title,"onUpdate:modelValue":e[1]||(e[1]=Y=>i.form.title=Y)},{prepend:w(()=>{var Y,B;return[i.dataLoaded?(v(),R(r,{key:0,custom_svg:!0,onUpdate:e[0]||(e[0]=U=>{i.form.settings.emoji=U.emoji,i.form.logo=U.logo,i.form.settings.shape_svg=U.shape_svg}),config:{logo:i.form.logo,emoji:((Y=i.form.settings)==null?void 0:Y.emoji)||"",shape_svg:((B=i.form.settings)==null?void 0:B.shape_svg)||""}},null,8,["config"])):O("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),i.dataLoaded?(v(),R(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:!!i.form.id,modelValue:i.form.slug,"onUpdate:modelValue":e[2]||(e[2]=Y=>i.form.slug=Y),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:i.form.description,"onUpdate:modelValue":e[3]||(e[3]=Y=>i.form.description=Y)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),_(l,{label:t.$t("Menu Group")},{default:w(()=>[i.dataLoaded?(v(),R(u,{key:0,modelValue:i.form.parent_id,"onUpdate:modelValue":e[4]||(e[4]=Y=>i.form.parent_id=Y),space_id:i.form.id},null,8,["modelValue","space_id"])):O("",!0),g("div",xwe,[g("p",null,M(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",Swe,[g("h4",null,M(t.$t("Access Control")),1),_(l,{label:t.$t("Privacy")},{default:w(()=>[_(h,{"popper-class":"rich_select",modelValue:i.form.privacy,"onUpdate:modelValue":e[5]||(e[5]=Y=>i.form.privacy=Y),placeholder:t.$t("Select Privacy")},{default:w(()=>[(v(!0),$(te,null,be(i.privacies,(Y,B)=>(v(),R(d,{key:B,label:Y.label,value:B},{default:w(()=>[g("span",$we,M(t.$labelize(Y.label)),1),g("p",{innerHTML:Y.description},null,8,Awe)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),i.form.privacy=="private"?(v(),$(te,{key:0},[_(l,{label:t.$t("Lock Screen Type")},{default:w(()=>[_(p,{modelValue:i.form.settings.custom_lock_screen,"onUpdate:modelValue":e[6]||(e[6]=Y=>i.form.settings.custom_lock_screen=Y),class:""},{default:w(()=>[_(f,{value:"yes"},{default:w(()=>[G(M(t.$t("Custom Lock Screen")),1)]),_:1}),_(f,{value:"no"},{default:w(()=>[G(M(t.$t("Default Lock Screen")),1)]),_:1}),_(f,{disabled:!t.has_pro,value:"redirect"},{default:w(()=>[G(M(t.$t("Redirect to an URL"))+" ",1),t.has_pro?O("",!0):(v(),$("span",Mwe,M(t.$t("Require Pro")),1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),i.form.settings.custom_lock_screen=="redirect"&&t.has_pro?(v(),R(l,{key:0,label:t.$t("Provide the Redirect URL")},{default:w(()=>[_(a,{modelValue:i.form.settings.onboard_redirect_url,"onUpdate:modelValue":e[7]||(e[7]=Y=>i.form.settings.onboard_redirect_url=Y),type:"text",placeholder:t.$t("Redirect URL for unenrolled users")},null,8,["modelValue","placeholder"]),g("div",Ewe,[g("p",null,M(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(),R(l,{key:1,style:{"margin-bottom":"0"}},{default:w(()=>[_(m,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.can_request_join,"onUpdate:modelValue":e[8]||(e[8]=Y=>i.form.settings.can_request_join=Y),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Allow users to request to join this Space")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0),o.isDefaultLockscreen?(v(),R(l,{key:2},{default:w(()=>[_(m,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.show_paywalls,"onUpdate:modelValue":e[9]||(e[9]=Y=>i.form.settings.show_paywalls=Y),class:"fcom_checkbox"},{default:w(()=>[G(M(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:i.form.settings.members_page_status,"onUpdate:modelValue":e[10]||(e[10]=Y=>i.form.settings.members_page_status=Y)},{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),i.showingSections.indexOf("customization")!==-1?(v(),$(te,{key:1},[i.form.id?O("",!0):(v(),$("h4",Twe,M(t.$t("Customization")),1)),i.form.settings?(v(),$("div",Pwe,[g("h4",null,M(t.$t("Features Customizations")),1),_(l,null,{default:w(()=>[g("div",Iwe,[_(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:i.form.settings.restricted_post_only,"onUpdate:modelValue":e[11]||(e[11]=Y=>i.form.settings.restricted_post_only=Y)},{default:w(()=>[G(M(t.$t("Only admin or moderators can create post")),1)]),_:1},8,["modelValue"]),_(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:i.form.settings.show_sidebar,"onUpdate:modelValue":e[12]||(e[12]=Y=>i.form.settings.show_sidebar=Y)},{default:w(()=>[G(M(t.$t("Show Right Sidebar on Space")),1)]),_:1},8,["modelValue"]),_(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:i.form.settings.hide_members_count,"onUpdate:modelValue":e[13]||(e[13]=Y=>i.form.settings.hide_members_count=Y)},{default:w(()=>[G(M(t.$t("Hide Members count from spaces page (when members page access unavailable)")),1)]),_:1},8,["modelValue"]),_(m,{class:"fcom_checkbox",disabled:!t.has_pro,"true-value":"yes","false-value":"no",modelValue:i.form.settings.document_library,"onUpdate:modelValue":e[14]||(e[14]=Y=>i.form.settings.document_library=Y)},{default:w(()=>[G(M(t.$t("Enable File/Document Library for this space"))+" ",1),t.has_pro?O("",!0):(v(),$("span",Lwe," ("+M(t.$t("Pro Feature"))+") ",1))]),_:1},8,["disabled","modelValue"])])]),_:1}),i.form.settings.document_library=="yes"?(v(),$("div",Owe,[_(l,{label:t.$t("Document Library Access (View & Download)")},{default:w(()=>[_(p,{modelValue:i.form.settings.document_access,"onUpdate:modelValue":e[15]||(e[15]=Y=>i.form.settings.document_access=Y),class:"fcom_radio_group_inline"},{default:w(()=>[_(f,{value:"members_only"},{default:w(()=>[G(M(t.$t("Members of this space")),1)]),_:1}),_(f,{value:"logged_in"},{default:w(()=>[G(M(t.$t("Any Logged in users")),1)]),_:1}),_(f,{value:"everybody"},{default:w(()=>[G(M(t.$t("Public")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(l,{label:t.$t("Who can upload the documents?")},{default:w(()=>[_(p,{style:{"margin-bottom":"0"},modelValue:i.form.settings.document_upload,"onUpdate:modelValue":e[16]||(e[16]=Y=>i.form.settings.document_upload=Y),class:"fcom_radio_group_inline"},{default:w(()=>[_(f,{value:"members_only"},{default:w(()=>[G(M(t.$t("Any Members")),1)]),_:1}),_(f,{value:"admin_only"},{default:w(()=>[G(M(t.$t("Admin/Moderators Only")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])])):O("",!0),_(l,{label:t.$t("Default Post Sort By")},{default:w(()=>[_(h,{modelValue:i.form.settings.default_post_sort_by,"onUpdate:modelValue":e[17]||(e[17]=Y=>i.form.settings.default_post_sort_by=Y),clearable:"",class:"fcom_select",placeholder:t.$t("Latest Posts Sort")},{default:w(()=>[(v(!0),$(te,null,be(i.postOrderOptions,(Y,B)=>(v(),R(d,{key:B,value:B,label:Y},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),_(m,{class:"fcom_checkbox","true-value":"yes","false-value":"no",modelValue:i.form.settings.disable_post_sort_by,"onUpdate:modelValue":e[18]||(e[18]=Y=>i.form.settings.disable_post_sort_by=Y)},{default:w(()=>[G(M(t.$t("Disable Post Sort By Options")),1)]),_:1},8,["modelValue"]),_(l,{label:t.$t("Default Comment Sort By")},{default:w(()=>[_(h,{modelValue:i.form.settings.default_comment_sort_by,"onUpdate:modelValue":e[19]||(e[19]=Y=>i.form.settings.default_comment_sort_by=Y),clearable:"",class:"fcom_select",placeholder:t.$t("Latest Comments Sort")},{default:w(()=>[(v(!0),$(te,null,be(i.commentOrderOptions,(Y,B)=>(v(),R(d,{key:B,value:B,label:Y},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])])):O("",!0),g("div",Dwe,[g("h4",null,M(t.$t("Layout")),1),_(l,{label:t.$t("Default Layout Styles"),class:"fcom_mb_10"},{default:w(()=>[_(p,{modelValue:i.form.settings.layout_style,"onUpdate:modelValue":e[20]||(e[20]=Y=>i.form.settings.layout_style=Y),class:"fcom_svg_radio_group"},{default:w(()=>[g("div",Rwe,[_(f,{value:"timeline"},{default:w(()=>[_(b,{style:{width:"100px",height:"auto"}}),g("p",Vwe,M(t.$t("Timeline")),1)]),_:1})]),g("div",Fwe,[_(f,{value:"list"},{default:w(()=>[_(y,{style:{width:"100px",height:"auto"}}),g("p",Nwe,M(t.$t("List")),1)]),_:1})]),g("div",Bwe,[_(f,{value:"card"},{default:w(()=>[_(C,{style:{width:"100px",height:"auto"}}),g("p",zwe,M(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:i.form.settings.disable_layout_style,"onUpdate:modelValue":e[21]||(e[21]=Y=>i.form.settings.disable_layout_style=Y)},{default:w(()=>[G(M(t.$t("Disable Layout Style Change Option")),1)]),_:1},8,["modelValue"]),g("div",Hwe,[i.form.settings.disable_layout_style==="yes"?(v(),$("p",Uwe,M(t.$t("The selected layout will be applied for all members. They cannot switch to a different view.")),1)):(v(),$("p",jwe,M(t.$t("User can change the layout style to their own preference.")),1))])]),_:1})]),g("div",Wwe,[g("h4",null,M(t.$t("Others")),1),t.has_pro&&i.dataLoaded?(v(),R(l,{key:0,label:t.$t("Topic navigation")},{default:w(()=>[_(k,{creatable:!0,space_id:i.form.id,modelValue:i.form.topic_ids,"onUpdate:modelValue":e[22]||(e[22]=Y=>i.form.topic_ids=Y)},null,8,["space_id","modelValue"]),g("div",Ywe,[g("p",null,[G(M(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",{key:0,target:"_blank",rel:"noopener",href:t.$getRouteLink("admin/settings/topics-settings")},M(t.$t("Manage all topics.")),9,Gwe)):O("",!0)])]),_(m,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.topic_required,"onUpdate:modelValue":e[23]||(e[23]=Y=>i.form.settings.topic_required=Y)},{default:w(()=>[G(M(t.$t("Make members select a topic")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),t.appVars.has_chat?(v(),R(l,{key:1,label:t.$t("Group Chat?")},{default:w(()=>[_(m,{"true-value":"yes","false-value":"no",modelValue:i.form.group_chat_support,"onUpdate:modelValue":e[24]||(e[24]=Y=>i.form.group_chat_support=Y)},{default:w(()=>[G(M(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(()=>[i.form.settings.og_image?(v(),R(x,{key:0,alt:t.$t("Thumbnail / Open Graph Image"),src:i.form.settings.og_image,style:{"max-width":"100px",height:"auto"}},null,8,["alt","src"])):O("",!0),g("div",qwe,[_(I,{isTextBtn:!1,removeIcon:!0,can_remove:!!i.form.settings.og_image,additionalData:{resize:!1,disable_convert:"yes",max_width:1200,max_height:630},onUploaded:e[25]||(e[25]=Y=>{i.form.settings.og_image=Y})},Es({remove:w(()=>[_(E,null,{default:w(()=>[_(P)]),_:1})]),_:2},[i.form.settings.og_image?{name:"trigger",fn:w(()=>[_(T,{class:"fcom_plain_button"},{default:w(()=>[_(E,null,{default:w(()=>[_(S)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove"])]),g("div",Xwe,[g("p",null,M(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(()=>[i.form.cover_photo?(v(),R(x,{key:0,src:i.form.cover_photo,alt:t.$t("Featured Image Preview"),style:{"max-width":"100px",height:"auto"}},null,8,["src","alt"])):O("",!0),g("div",Kwe,[_(I,{isTextBtn:!1,removeIcon:!0,can_remove:!!i.form.cover_photo,additionalData:{resize:!0,max_width:1600},onUploaded:o.handleCoverPhotoUpload},Es({remove:w(()=>[_(E,null,{default:w(()=>[_(P)]),_:1})]),_:2},[i.form.cover_photo?{name:"trigger",fn:w(()=>[_(T,{class:"fcom_plain_button"},{default:w(()=>[_(E,null,{default:w(()=>[_(S)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove","onUploaded"])]),g("div",Zwe,[g("p",null,M(t.$t("If you add this image, it will be shown on the space homepage")),1)])]),_:1},8,["label"]),i.form.id?O("",!0):(v(),R(l,{key:2,style:{"margin-top":"45px"}},{default:w(()=>[g("div",Jwe,[i.showingSections.indexOf("basic")===-1?(v(),R(T,{key:0,class:"plain_button",text:"",onClick:e[26]||(e[26]=()=>{i.showingSections=["basic"]})},{default:w(()=>[g("span",null,M(t.$t("Go Back")),1)]),_:1})):O("",!0),Pe((v(),R(T,{class:"fcom_primary_button",disabled:i.saving,onClick:e[27]||(e[27]=Y=>o.submit())},{default:w(()=>[g("span",null,M(t.$t("Create")),1)]),_:1},8,["disabled"])),[[z,i.saving]])])]),_:1}))])],64)):(v(),$(te,{key:2},[_(L,{errors:i.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),_(l,null,{default:w(()=>[g("div",Qwe,[e[31]||(e[31]=g("span",null,null,-1)),_(T,{onClick:e[28]||(e[28]=Y=>o.goToCustomization()),class:"fcom_primary_button"},{default:w(()=>[g("span",null,M(t.$t("Next")),1)]),_:1})])]),_:1})],64))]),_:1},8,["modelValue"]),Pe((v(),$("div",null,[i.metaSettings&&Object.keys(i.metaSettings).length>0?(v(),$("div",e3e,[(v(!0),$(te,null,be(i.metaSettings,Y=>(v(),$("div",t3e,[g("h4",null,M(Y.section_title),1),_(D,{formData:Y.settings,formFields:Y.fields,disableSubmit:!0},null,8,["formData","formFields"])]))),256))])):O("",!0)])),[[z,i.fetchingMetaBoxes]])])}const L4=de(wwe,[["render",n3e]]);var Qi=(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))(Qi||{});let So=class extends Error{constructor(e,n){super(n),this.name="MilkdownError",this.code=e}};const s3e=(t,e)=>typeof e=="function"?"[Function]":e,bf=t=>JSON.stringify(t,s3e);function i3e(t){return new So(Qi.docTypeError,`Doc type error, unsupported type: ${bf(t)}`)}function o3e(t){return new So(Qi.contextNotFound,`Context "${t}" not found, do you forget to inject it?`)}function r3e(t){return new So(Qi.timerNotFound,`Timer "${t}" not found, do you forget to record it?`)}function O4(){return new So(Qi.ctxCallOutOfScope,"Should not call a context out of the plugin.")}function a3e(...t){const e=t.reduce((n,s)=>{if(!s)return n;const i=o=>Array.isArray(o)?o.map(r=>i(r)).join(", "):o.toJSON?bf(o.toJSON()):o.spec?bf(o.spec):o.toString();return`${n}, ${i(s)}`},"Create prosemirror node from remark failed in parser");return new So(Qi.createNodeInParserFail,e)}function OV(){return new So(Qi.stackOverFlow,"Stack over flow, cannot pop on an empty stack.")}function l3e(t){return new So(Qi.parserMatchError,`Cannot match target parser for node: ${bf(t)}.`)}function c3e(t){return new So(Qi.serializerMatchError,`Cannot match target serializer for node: ${bf(t)}.`)}function u3e(t,e){return new So(Qi.getAtomFromSchemaFail,`Cannot get ${t}: ${e} from schema.`)}function Ur(t){return new So(Qi.expectDomTypeError,`Expect to be a dom, but get: ${bf(t)}.`)}function d3e(){return new So(Qi.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 DV(t){return new So(Qi.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${t}" in schema.`)}function h3e(t){return new So(Qi.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${t}" in schema.`)}var RV=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},mt=(t,e,n)=>(RV(t,e,"read from private field"),n?n.call(t):e.get(t)),ts=(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)},_n=(t,e,n,s)=>(RV(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);let VV=class{constructor(){this.sliceMap=new Map,this.get=e=>{const n=typeof e=="string"?[...this.sliceMap.values()].find(s=>s.type.name===e):this.sliceMap.get(e.id);if(!n){const s=typeof e=="string"?e:e.name;throw o3e(s)}return n},this.remove=e=>{const n=typeof e=="string"?[...this.sliceMap.values()].find(s=>s.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 Xr,$l,kp;let f3e=class{constructor(e,n,s){ts(this,Xr,void 0),ts(this,$l,void 0),ts(this,kp,void 0),_n(this,Xr,[]),_n(this,kp,()=>{mt(this,Xr).forEach(i=>i(mt(this,$l)))}),this.set=i=>{_n(this,$l,i),mt(this,kp).call(this)},this.get=()=>mt(this,$l),this.update=i=>{_n(this,$l,i(mt(this,$l))),mt(this,kp).call(this)},this.type=s,_n(this,$l,n),e.set(s.id,this)}on(e){return mt(this,Xr).push(e),()=>{_n(this,Xr,mt(this,Xr).filter(n=>n!==e))}}once(e){const n=this.on(s=>{e(s),n()});return n}off(e){_n(this,Xr,mt(this,Xr).filter(n=>n!==e))}offAll(){_n(this,Xr,[])}};Xr=new WeakMap,$l=new WeakMap,kp=new WeakMap;let p3e=class{constructor(e,n){this.id=Symbol(`Context-${n}`),this.name=n,this._defaultValue=e,this._typeInfo=()=>{throw O4()}}create(e,n=this._defaultValue){return new f3e(e,n,this)}};const gn=(t,e)=>new p3e(t,e);var nv,sv,iv,sh,xp,Xc,Sp,$p,Ap;let m3e=class{constructor(e,n,s){ts(this,nv,void 0),ts(this,sv,void 0),ts(this,iv,void 0),ts(this,sh,void 0),ts(this,xp,void 0),ts(this,Xc,void 0),ts(this,Sp,void 0),ts(this,$p,void 0),ts(this,Ap,void 0),_n(this,sh,new Set),_n(this,xp,new Set),_n(this,Xc,new Map),_n(this,Sp,new Map),this.read=()=>({metadata:mt(this,nv),injectedSlices:[...mt(this,sh)].map(i=>({name:typeof i=="string"?i:i.name,value:mt(this,$p).call(this,i)})),consumedSlices:[...mt(this,xp)].map(i=>({name:typeof i=="string"?i:i.name,value:mt(this,$p).call(this,i)})),recordedTimers:[...mt(this,Xc)].map(([i,{duration:o}])=>({name:i.name,duration:o,status:mt(this,Ap).call(this,i)})),waitTimers:[...mt(this,Sp)].map(([i,{duration:o}])=>({name:i.name,duration:o,status:mt(this,Ap).call(this,i)}))}),this.onRecord=i=>{mt(this,Xc).set(i,{start:Date.now(),duration:0})},this.onClear=i=>{mt(this,Xc).delete(i)},this.onDone=i=>{const o=mt(this,Xc).get(i);o&&(o.duration=Date.now()-o.start)},this.onWait=(i,o)=>{const r=Date.now();o.finally(()=>{mt(this,Sp).set(i,{duration:Date.now()-r})})},this.onInject=i=>{mt(this,sh).add(i)},this.onRemove=i=>{mt(this,sh).delete(i)},this.onUse=i=>{mt(this,xp).add(i)},_n(this,$p,i=>mt(this,sv).get(i).get()),_n(this,Ap,i=>mt(this,iv).get(i).status),_n(this,sv,e),_n(this,iv,n),_n(this,nv,s)}};nv=new WeakMap,sv=new WeakMap,iv=new WeakMap,sh=new WeakMap,xp=new WeakMap,Xc=new WeakMap,Sp=new WeakMap,$p=new WeakMap,Ap=new WeakMap;var Al,Ml,ov,cr;const g3e=class FV{constructor(e,n,s){ts(this,Al,void 0),ts(this,Ml,void 0),ts(this,ov,void 0),ts(this,cr,void 0),this.produce=i=>i&&Object.keys(i).length?new FV(mt(this,Al),mt(this,Ml),{...i}):this,this.inject=(i,o)=>{var r;const a=i.create(mt(this,Al).sliceMap);return o!=null&&a.set(o),(r=mt(this,cr))==null||r.onInject(i),this},this.remove=i=>{var o;return mt(this,Al).remove(i),(o=mt(this,cr))==null||o.onRemove(i),this},this.record=i=>{var o;return i.create(mt(this,Ml).store),(o=mt(this,cr))==null||o.onRecord(i),this},this.clearTimer=i=>{var o;return mt(this,Ml).remove(i),(o=mt(this,cr))==null||o.onClear(i),this},this.isInjected=i=>mt(this,Al).has(i),this.isRecorded=i=>mt(this,Ml).has(i),this.use=i=>{var o;return(o=mt(this,cr))==null||o.onUse(i),mt(this,Al).get(i)},this.get=i=>this.use(i).get(),this.set=(i,o)=>this.use(i).set(o),this.update=(i,o)=>this.use(i).update(o),this.timer=i=>mt(this,Ml).get(i),this.done=i=>{var o;this.timer(i).done(),(o=mt(this,cr))==null||o.onDone(i)},this.wait=i=>{var o;const r=this.timer(i).start();return(o=mt(this,cr))==null||o.onWait(i,r),r},this.waitTimers=async i=>{await Promise.all(this.get(i).map(o=>this.wait(o)))},_n(this,Al,e),_n(this,Ml,n),_n(this,ov,s),s&&_n(this,cr,new m3e(e,n,s))}get meta(){return mt(this,ov)}get inspector(){return mt(this,cr)}};Al=new WeakMap,Ml=new WeakMap,ov=new WeakMap,cr=new WeakMap;let v3e=g3e,_3e=class{constructor(){this.store=new Map,this.get=e=>{const n=this.store.get(e.id);if(!n)throw r3e(e.name);return n},this.remove=e=>{this.store.delete(e.id)},this.has=e=>this.store.has(e.id)}};var ih,Kc,Mp,El,Ep,rv;let y3e=class{constructor(e,n){ts(this,ih,void 0),ts(this,Kc,void 0),ts(this,Mp,void 0),ts(this,El,void 0),ts(this,Ep,void 0),ts(this,rv,void 0),_n(this,ih,null),_n(this,Kc,null),_n(this,El,"pending"),this.start=()=>(mt(this,ih)??_n(this,ih,new Promise((s,i)=>{_n(this,Kc,o=>{o instanceof CustomEvent&&o.detail.id===mt(this,Mp)&&(_n(this,El,"resolved"),mt(this,Ep).call(this),o.stopImmediatePropagation(),s())}),mt(this,rv).call(this,()=>{mt(this,El)==="pending"&&_n(this,El,"rejected"),mt(this,Ep).call(this),i(new Error(`Timing ${this.type.name} timeout.`))}),_n(this,El,"pending"),addEventListener(this.type.name,mt(this,Kc))})),mt(this,ih)),this.done=()=>{const s=new CustomEvent(this.type.name,{detail:{id:mt(this,Mp)}});dispatchEvent(s)},_n(this,Ep,()=>{mt(this,Kc)&&removeEventListener(this.type.name,mt(this,Kc))}),_n(this,rv,s=>{setTimeout(()=>{s()},this.type.timeout)}),_n(this,Mp,Symbol(n.name)),this.type=n,e.set(n.id,this)}get status(){return mt(this,El)}};ih=new WeakMap,Kc=new WeakMap,Mp=new WeakMap,El=new WeakMap,Ep=new WeakMap,rv=new WeakMap;let b3e=class{constructor(e,n=3e3){this.create=s=>new y3e(s,this),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=n}};const Pc=(t,e=3e3)=>new b3e(t,e);function Rs(t){this.content=t}Rs.prototype={constructor:Rs,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 s=n&&n!=t?this.remove(n):this,i=s.find(t),o=s.content.slice();return i==-1?o.push(n||t,e):(o[i+1]=e,n&&(o[i]=n)),new Rs(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 Rs(n)},addToStart:function(t,e){return new Rs([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Rs(n)},addBefore:function(t,e,n){var s=this.remove(e),i=s.content.slice(),o=s.find(t);return i.splice(o==-1?i.length:o,0,e,n),new Rs(i)},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=Rs.from(t),t.size?new Rs(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Rs.from(t),t.size?new Rs(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Rs.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}};Rs.from=function(t){if(t instanceof Rs)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Rs(e)};function NV(t,e,n){for(let s=0;;s++){if(s==t.childCount||s==e.childCount)return t.childCount==e.childCount?null:n;let i=t.child(s),o=e.child(s);if(i==o){n+=i.nodeSize;continue}if(!i.sameMarkup(o))return n;if(i.isText&&i.text!=o.text){for(let r=0;i.text[r]==o.text[r];r++)n++;return n}if(i.content.size||o.content.size){let r=NV(i.content,o.content,n+1);if(r!=null)return r}n+=i.nodeSize}}function BV(t,e,n,s){for(let i=t.childCount,o=e.childCount;;){if(i==0||o==0)return i==o?null:{a:n,b:s};let r=t.child(--i),a=e.child(--o),l=r.nodeSize;if(r==a){n-=l,s-=l;continue}if(!r.sameMarkup(a))return{a:n,b:s};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--,s--;return{a:n,b:s}}if(r.content.size||a.content.size){let c=BV(r.content,a.content,n-1,s-1);if(c)return c}n-=l,s-=l}}let et=class mi{constructor(e,n){if(this.content=e,this.size=n||0,n==null)for(let s=0;s<e.length;s++)this.size+=e[s].nodeSize}nodesBetween(e,n,s,i=0,o){for(let r=0,a=0;a<n;r++){let l=this.content[r],c=a+l.nodeSize;if(c>e&&s(l,i+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),s,i+u)}a=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,n,s,i){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?i?typeof i=="function"?i(a):i:a.type.spec.leafText?a.type.spec.leafText(a):"":"";a.isBlock&&(a.isLeaf&&c||a.isTextblock)&&s&&(r?r=!1:o+=s),o+=c},0),o}append(e){if(!e.size)return this;if(!this.size)return e;let n=this.lastChild,s=e.firstChild,i=this.content.slice(),o=0;for(n.isText&&n.sameMarkup(s)&&(i[i.length-1]=n.withText(n.text+s.text),o=1);o<e.content.length;o++)i.push(e.content[o]);return new mi(i,this.size+e.size)}cut(e,n=this.size){if(e==0&&n==this.size)return this;let s=[],i=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))),s.push(a),i+=a.nodeSize),r=l}return new mi(s,i)}cutByIndex(e,n){return e==n?mi.empty:e==0&&n==this.content.length?this:new mi(this.content.slice(e,n))}replaceChild(e,n){let s=this.content[e];if(s==n)return this;let i=this.content.slice(),o=this.size+n.nodeSize-s.nodeSize;return i[e]=n,new mi(i,o)}addToStart(e){return new mi([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new mi(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,s=0;n<this.content.length;n++){let i=this.content[n];e(i,s,n),s+=i.nodeSize}}findDiffStart(e,n=0){return NV(this,e,n)}findDiffEnd(e,n=this.size,s=e.size){return BV(this,e,n,s)}findIndex(e,n=-1){if(e==0)return v0(0,e);if(e==this.size)return v0(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let s=0,i=0;;s++){let o=this.child(s),r=i+o.nodeSize;if(r>=e)return r==e||n>0?v0(s+1,r):v0(s,i);i=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 mi.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new mi(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return mi.empty;let n,s=0;for(let i=0;i<e.length;i++){let o=e[i];s+=o.nodeSize,i&&o.isText&&e[i-1].sameMarkup(o)?(n||(n=e.slice(0,i)),n[n.length-1]=o.withText(n[n.length-1].text+o.text)):n&&n.push(o)}return new mi(n||e,s)}static from(e){if(!e)return mi.empty;if(e instanceof mi)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new mi([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};et.empty=new et([],0);const ew={index:0,offset:0};function v0(t,e){return ew.index=t,ew.offset=e,ew}function U_(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 s=0;s<t.length;s++)if(!U_(t[s],e[s]))return!1}else{for(let s in t)if(!(s in e)||!U_(t[s],e[s]))return!1;for(let s in e)if(!(s in t))return!1}return!0}let bn=class z6{constructor(e,n){this.type=e,this.attrs=n}addToSet(e){let n,s=!1;for(let i=0;i<e.length;i++){let o=e[i];if(this.eq(o))return e;if(this.type.excludes(o.type))n||(n=e.slice(0,i));else{if(o.type.excludes(this.type))return e;!s&&o.type.rank>this.type.rank&&(n||(n=e.slice(0,i)),n.push(this),s=!0),n&&n.push(o)}}return n||(n=e.slice()),s||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&&U_(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 s=e.marks[n.type];if(!s)throw new RangeError(`There is no mark type ${n.type} in this schema`);let i=s.create(n.attrs);return s.checkAttrs(i.attrs),i}static sameSet(e,n){if(e==n)return!0;if(e.length!=n.length)return!1;for(let s=0;s<e.length;s++)if(!e[s].eq(n[s]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return z6.none;if(e instanceof z6)return[e];let n=e.slice();return n.sort((s,i)=>s.type.rank-i.type.rank),n}};bn.none=[];class j_ extends Error{}class it{constructor(e,n,s){this.content=e,this.openStart=n,this.openEnd=s}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,n){let s=HV(this.content,e+this.openStart,n);return s&&new it(s,this.openStart,this.openEnd)}removeBetween(e,n){return new it(zV(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 it.empty;let s=n.openStart||0,i=n.openEnd||0;if(typeof s!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new it(et.fromJSON(e,n.content),s,i)}static maxOpen(e,n=!0){let s=0,i=0;for(let o=e.firstChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.firstChild)s++;for(let o=e.lastChild;o&&!o.isLeaf&&(n||!o.type.spec.isolating);o=o.lastChild)i++;return new it(e,s,i)}}it.empty=new it(et.empty,0,0);function zV(t,e,n){let{index:s,offset:i}=t.findIndex(e),o=t.maybeChild(s),{index:r,offset:a}=t.findIndex(n);if(i==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(s!=r)throw new RangeError("Removing non-flat range");return t.replaceChild(s,o.copy(zV(o.content,e-i-1,n-i-1)))}function HV(t,e,n,s){let{index:i,offset:o}=t.findIndex(e),r=t.maybeChild(i);if(o==e||r.isText)return s&&!s.canReplace(i,i,n)?null:t.cut(0,e).append(n).append(t.cut(e));let a=HV(r.content,e-o-1,n);return a&&t.replaceChild(i,r.copy(a))}function w3e(t,e,n){if(n.openStart>t.depth)throw new j_("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new j_("Inconsistent open depths");return UV(t,e,n,0)}function UV(t,e,n,s){let i=t.index(s),o=t.node(s);if(i==e.index(s)&&s<t.depth-n.openStart){let r=UV(t,e,n,s+1);return o.copy(o.content.replaceChild(i,r))}else if(n.content.size)if(!n.openStart&&!n.openEnd&&t.depth==s&&e.depth==s){let r=t.parent,a=r.content;return Tu(r,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:r,end:a}=C3e(n,t);return Tu(o,WV(t,r,a,e,s))}else return Tu(o,W_(t,e,s))}function jV(t,e){if(!e.type.compatibleContent(t.type))throw new j_("Cannot join "+e.type.name+" onto "+t.type.name)}function H6(t,e,n){let s=t.node(n);return jV(s,e.node(n)),s}function Eu(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 xm(t,e,n,s){let i=(e||t).node(n),o=0,r=e?e.index(n):i.childCount;t&&(o=t.index(n),t.depth>n?o++:t.textOffset&&(Eu(t.nodeAfter,s),o++));for(let a=o;a<r;a++)Eu(i.child(a),s);e&&e.depth==n&&e.textOffset&&Eu(e.nodeBefore,s)}function Tu(t,e){return t.type.checkContent(e),t.copy(e)}function WV(t,e,n,s,i){let o=t.depth>i&&H6(t,e,i+1),r=s.depth>i&&H6(n,s,i+1),a=[];return xm(null,t,i,a),o&&r&&e.index(i)==n.index(i)?(jV(o,r),Eu(Tu(o,WV(t,e,n,s,i+1)),a)):(o&&Eu(Tu(o,W_(t,e,i+1)),a),xm(e,n,i,a),r&&Eu(Tu(r,W_(n,s,i+1)),a)),xm(s,null,i,a),new et(a)}function W_(t,e,n){let s=[];if(xm(null,t,n,s),t.depth>n){let i=H6(t,e,n+1);Eu(Tu(i,W_(t,e,n+1)),s)}return xm(e,null,n,s),new et(s)}function C3e(t,e){let n=e.depth-t.openStart,i=e.node(n).copy(t.content);for(let o=n-1;o>=0;o--)i=e.node(o).copy(et.from(i));return{start:i.resolveNoCache(t.openStart+n),end:i.resolveNoCache(i.content.size-t.openEnd-n)}}class Cg{constructor(e,n,s){this.pos=e,this.path=n,this.parentOffset=s,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 s=this.pos-this.path[this.path.length-1],i=e.child(n);return s?e.child(n).cut(s):i}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 s=this.path[n*3],i=n==0?0:this.path[n*3-1]+1;for(let o=0;o<e;o++)i+=s.child(o).nodeSize;return i}marks(){let e=this.parent,n=this.index();if(e.content.size==0)return bn.none;if(this.textOffset)return e.child(n).marks;let s=e.maybeChild(n-1),i=e.maybeChild(n);if(!s){let a=s;s=i,i=a}let o=s.marks;for(var r=0;r<o.length;r++)o[r].type.spec.inclusive===!1&&(!i||!o[r].isInSet(i.marks))&&(o=o[r--].removeFromSet(o));return o}marksAcross(e){let n=this.parent.maybeChild(this.index());if(!n||!n.isInline)return null;let s=n.marks,i=e.parent.maybeChild(e.index());for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}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 s=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);s>=0;s--)if(e.pos<=this.end(s)&&(!n||n(this.node(s))))return new YV(this,e,s);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 s=[],i=0,o=n;for(let r=e;;){let{index:a,offset:l}=r.content.findIndex(o),c=o-l;if(s.push(r,a,i+l),!c||(r=r.child(a),r.isText))break;o=c-1,i+=l+1}return new Cg(n,s,o)}static resolveCached(e,n){let s=iA.get(e);if(s)for(let o=0;o<s.elts.length;o++){let r=s.elts[o];if(r.pos==n)return r}else iA.set(e,s=new k3e);let i=s.elts[s.i]=Cg.resolve(e,n);return s.i=(s.i+1)%x3e,i}}class k3e{constructor(){this.elts=[],this.i=0}}const x3e=12,iA=new WeakMap;class YV{constructor(e,n,s){this.$from=e,this.$to=n,this.depth=s}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 S3e=Object.create(null);let oc=class U6{constructor(e,n,s,i=bn.none){this.type=e,this.attrs=n,this.marks=i,this.content=s||et.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,s,i=0){this.content.nodesBetween(e,n,s,i,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,s,i){return this.content.textBetween(e,n,s,i)}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,s){return this.type==e&&U_(this.attrs,n||e.defaultAttrs||S3e)&&bn.sameSet(this.marks,s||bn.none)}copy(e=null){return e==this.content?this:new U6(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new U6(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,s=!1){if(e==n)return it.empty;let i=this.resolve(e),o=this.resolve(n),r=s?0:i.sharedDepth(n),a=i.start(r),c=i.node(r).content.cut(i.pos-a,o.pos-a);return new it(c,i.depth-r,o.depth-r)}replace(e,n,s){return w3e(this.resolve(e),this.resolve(n),s)}nodeAt(e){for(let n=this;;){let{index:s,offset:i}=n.content.findIndex(e);if(n=n.maybeChild(s),!n)return null;if(i==e||n.isText)return n;e-=i+1}}childAfter(e){let{index:n,offset:s}=this.content.findIndex(e);return{node:this.content.maybeChild(n),index:n,offset:s}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:n,offset:s}=this.content.findIndex(e);if(s<e)return{node:this.content.child(n),index:n,offset:s};let i=this.content.child(n-1);return{node:i,index:n-1,offset:s-i.nodeSize}}resolve(e){return Cg.resolveCached(this,e)}resolveNoCache(e){return Cg.resolve(this,e)}rangeHasMark(e,n,s){let i=!1;return n>e&&this.nodesBetween(e,n,o=>(s.isInSet(o.marks)&&(i=!0),!i)),i}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()+")"),GV(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,s=et.empty,i=0,o=s.childCount){let r=this.contentMatchAt(e).matchFragment(s,i,o),a=r&&r.matchFragment(this.content,n);if(!a||!a.validEnd)return!1;for(let l=i;l<o;l++)if(!this.type.allowsMarks(s.child(l).marks))return!1;return!0}canReplaceWith(e,n,s,i){if(i&&!this.type.allowsMarks(i))return!1;let o=this.contentMatchAt(e).matchType(s),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=bn.none;for(let n=0;n<this.marks.length;n++){let s=this.marks[n];s.type.checkAttrs(s.attrs),e=s.addToSet(e)}if(!bn.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 s;if(n.marks){if(!Array.isArray(n.marks))throw new RangeError("Invalid mark data for Node.fromJSON");s=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,s)}let i=et.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,i,s);return o.type.checkAttrs(o.attrs),o}};oc.prototype.text=void 0;class Y_ extends oc{constructor(e,n,s,i){if(super(e,n,null,i),!s)throw new RangeError("Empty text nodes are not allowed");this.text=s}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):GV(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 Y_(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Y_(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 GV(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class qu{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let s=new $3e(e,n);if(s.next==null)return qu.empty;let i=qV(s);s.next&&s.err("Unexpected trailing text");let o=L3e(I3e(i));return O3e(o,s),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,s=e.childCount){let i=this;for(let o=n;i&&o<s;o++)i=i.matchType(e.child(o).type);return i}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 s=0;s<e.next.length;s++)if(this.next[n].type==e.next[s].type)return!0;return!1}fillBefore(e,n=!1,s=0){let i=[this];function o(r,a){let l=r.matchFragment(e,s);if(l&&(!n||l.validEnd))return et.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())&&i.indexOf(d)==-1){i.push(d);let h=o(d,a.concat(u));if(h)return h}}return null}return o(this,[])}findWrapping(e){for(let s=0;s<this.wrapCache.length;s+=2)if(this.wrapCache[s]==e)return this.wrapCache[s+1];let n=this.computeWrapping(e);return this.wrapCache.push(e,n),n}computeWrapping(e){let n=Object.create(null),s=[{match:this,type:null,via:null}];for(;s.length;){let i=s.shift(),o=i.match;if(o.matchType(e)){let r=[];for(let a=i;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)&&(!i.type||l.validEnd)&&(s.push({match:a.contentMatch,type:a,via:i}),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(s){e.push(s);for(let i=0;i<s.next.length;i++)e.indexOf(s.next[i].next)==-1&&n(s.next[i].next)}return n(this),e.map((s,i)=>{let o=i+(s.validEnd?"*":" ")+" ";for(let r=0;r<s.next.length;r++)o+=(r?", ":"")+s.next[r].type.name+"->"+e.indexOf(s.next[r].next);return o}).join(` | |
| 83 | -`)}}qu.empty=new qu(!0);class $3e{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 qV(t){let e=[];do e.push(A3e(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function A3e(t){let e=[];do e.push(M3e(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function M3e(t){let e=P3e(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=E3e(t,e);else break;return e}function oA(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function E3e(t,e){let n=oA(t),s=n;return t.eat(",")&&(t.next!="}"?s=oA(t):s=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:s,expr:e}}function T3e(t,e){let n=t.nodeTypes,s=n[e];if(s)return[s];let i=[];for(let o in n){let r=n[o];r.groups.indexOf(e)>-1&&i.push(r)}return i.length==0&&t.err("No node type or group '"+e+"' found"),i}function P3e(t){if(t.eat("(")){let e=qV(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=T3e(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 I3e(t){let e=[[]];return i(o(t,0),n()),e;function n(){return e.push([])-1}function s(r,a,l){let c={term:l,to:a};return e[r].push(c),c}function i(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;i(c,a=n())}else if(r.type=="star"){let l=n();return s(a,l),i(o(r.expr,l),l),[s(l)]}else if(r.type=="plus"){let l=n();return i(o(r.expr,a),l),i(o(r.expr,l),l),[s(l)]}else{if(r.type=="opt")return[s(a)].concat(o(r.expr,a));if(r.type=="range"){let l=a;for(let c=0;c<r.min;c++){let u=n();i(o(r.expr,l),u),l=u}if(r.max==-1)i(o(r.expr,l),l);else for(let c=r.min;c<r.max;c++){let u=n();s(l,u),i(o(r.expr,l),u),l=u}return[s(l)]}else{if(r.type=="name")return[s(a,void 0,r.value)];throw new Error("Unknown expr type")}}}}function XV(t,e){return e-t}function rA(t,e){let n=[];return s(e),n.sort(XV);function s(i){let o=t[i];if(o.length==1&&!o[0].term)return s(o[0].to);n.push(i);for(let r=0;r<o.length;r++){let{term:a,to:l}=o[r];!a&&n.indexOf(l)==-1&&s(l)}}}function L3e(t){let e=Object.create(null);return n(rA(t,0));function n(s){let i=[];s.forEach(r=>{t[r].forEach(({term:a,to:l})=>{if(!a)return;let c;for(let u=0;u<i.length;u++)i[u][0]==a&&(c=i[u][1]);rA(t,l).forEach(u=>{c||i.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[s.join(",")]=new qu(s.indexOf(t.length-1)>-1);for(let r=0;r<i.length;r++){let a=i[r][1].sort(XV);o.next.push({type:i[r][0],next:e[a.join(",")]||n(a)})}return o}}function O3e(t,e){for(let n=0,s=[t];n<s.length;n++){let i=s[n],o=!i.validEnd,r=[];for(let a=0;a<i.next.length;a++){let{type:l,next:c}=i.next[a];r.push(l.name),o&&!(l.isText||l.hasRequiredAttrs())&&(o=!1),s.indexOf(c)==-1&&s.push(c)}o&&e.err("Only non-generatable nodes ("+r.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function KV(t){let e=Object.create(null);for(let n in t){let s=t[n];if(!s.hasDefault)return null;e[n]=s.default}return e}function ZV(t,e){let n=Object.create(null);for(let s in t){let i=e&&e[s];if(i===void 0){let o=t[s];if(o.hasDefault)i=o.default;else throw new RangeError("No value supplied for attribute "+s)}n[s]=i}return n}function JV(t,e,n,s){for(let i in e)if(!(i in t))throw new RangeError(`Unsupported attribute ${i} for ${n} of type ${i}`);for(let i in t){let o=t[i];o.validate&&o.validate(e[i])}}function QV(t,e){let n=Object.create(null);if(e)for(let s in e)n[s]=new R3e(t,s,e[s]);return n}let G_=class eF{constructor(e,n,s){this.name=e,this.schema=n,this.spec=s,this.markSet=null,this.groups=s.group?s.group.split(" "):[],this.attrs=QV(e,s.attrs),this.defaultAttrs=KV(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(s.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==qu.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:ZV(this.attrs,e)}create(e=null,n,s){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new oc(this,this.computeAttrs(e),et.from(n),bn.setFrom(s))}createChecked(e=null,n,s){return n=et.from(n),this.checkContent(n),new oc(this,this.computeAttrs(e),n,bn.setFrom(s))}createAndFill(e=null,n,s){if(e=this.computeAttrs(e),n=et.from(n),n.size){let r=this.contentMatch.fillBefore(n);if(!r)return null;n=r.append(n)}let i=this.contentMatch.matchFragment(n),o=i&&i.fillBefore(et.empty,!0);return o?new oc(this,e,n.append(o),bn.setFrom(s)):null}validContent(e){let n=this.contentMatch.matchFragment(e);if(!n||!n.validEnd)return!1;for(let s=0;s<e.childCount;s++)if(!this.allowsMarks(e.child(s).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){JV(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 s=0;s<e.length;s++)this.allowsMarkType(e[s].type)?n&&n.push(e[s]):n||(n=e.slice(0,s));return n?n.length?n:bn.none:e}static compile(e,n){let s=Object.create(null);e.forEach((o,r)=>s[o]=new eF(o,n,r));let i=n.spec.topNode||"doc";if(!s[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!s.text)throw new RangeError("Every schema needs a 'text' type");for(let o in s.text.attrs)throw new RangeError("The text node type should not have attributes");return s}};function D3e(t,e,n){let s=n.split("|");return i=>{let o=i===null?"null":typeof i;if(s.indexOf(o)<0)throw new RangeError(`Expected value of type ${s} for attribute ${e} on type ${t}, got ${o}`)}}class R3e{constructor(e,n,s){this.hasDefault=Object.prototype.hasOwnProperty.call(s,"default"),this.default=s.default,this.validate=typeof s.validate=="string"?D3e(e,n,s.validate):s.validate}get isRequired(){return!this.hasDefault}}class wb{constructor(e,n,s,i){this.name=e,this.rank=n,this.schema=s,this.spec=i,this.attrs=QV(e,i.attrs),this.excluded=null;let o=KV(this.attrs);this.instance=o?new bn(this,o):null}create(e=null){return!e&&this.instance?this.instance:new bn(this,ZV(this.attrs,e))}static compile(e,n){let s=Object.create(null),i=0;return e.forEach((o,r)=>s[o]=new wb(o,i++,n,r)),s}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){JV(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class V3e{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let n=this.spec={};for(let i in e)n[i]=e[i];n.nodes=Rs.from(e.nodes),n.marks=Rs.from(e.marks||{}),this.nodes=G_.compile(this.spec.nodes,this),this.marks=wb.compile(this.spec.marks,this);let s=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let o=this.nodes[i],r=o.spec.content||"",a=o.spec.marks;if(o.contentMatch=s[r]||(s[r]=qu.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?aA(this,a.split(" ")):a==""||!o.inlineContent?[]:null}for(let i in this.marks){let o=this.marks[i],r=o.spec.excludes;o.excluded=r==null?[o]:r==""?[]:aA(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,s,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof G_){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,s,i)}text(e,n){let s=this.nodes.text;return new Y_(s,s.defaultAttrs,e,bn.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return oc.fromJSON(this,e)}markFromJSON(e){return bn.fromJSON(this,e)}nodeType(e){let n=this.nodes[e];if(!n)throw new RangeError("Unknown node type: "+e);return n}}function aA(t,e){let n=[];for(let s=0;s<e.length;s++){let i=e[s],o=t.marks[i],r=o;if(o)n.push(o);else for(let a in t.marks){let l=t.marks[a];(i=="_"||l.spec.group&&l.spec.group.split(" ").indexOf(i)>-1)&&n.push(r=l)}if(!r)throw new SyntaxError("Unknown mark type: '"+e[s]+"'")}return n}function F3e(t){return t.tag!=null}function N3e(t){return t.style!=null}class Xu{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let s=this.matchedStyles=[];n.forEach(i=>{if(F3e(i))this.tags.push(i);else if(N3e(i)){let o=/[^=]*/.exec(i.style)[0];s.indexOf(o)<0&&s.push(o),this.styles.push(i)}}),this.normalizeLists=!this.tags.some(i=>{if(!/^(ul|ol)\b/.test(i.tag)||!i.node)return!1;let o=e.nodes[i.node];return o.contentMatch.matchType(o)})}parse(e,n={}){let s=new cA(this,n,!1);return s.addAll(e,bn.none,n.from,n.to),s.finish()}parseSlice(e,n={}){let s=new cA(this,n,!0);return s.addAll(e,bn.none,n.from,n.to),it.maxOpen(s.finish())}matchTag(e,n,s){for(let i=s?this.tags.indexOf(s)+1:0;i<this.tags.length;i++){let o=this.tags[i];if(H3e(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,s,i){for(let o=i?this.styles.indexOf(i)+1:0;o<this.styles.length;o++){let r=this.styles[o],a=r.style;if(!(a.indexOf(e)!=0||r.context&&!s.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 s(i){let o=i.priority==null?50:i.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,i)}for(let i in e.marks){let o=e.marks[i].spec.parseDOM;o&&o.forEach(r=>{s(r=uA(r)),r.mark||r.ignore||r.clearMark||(r.mark=i)})}for(let i in e.nodes){let o=e.nodes[i].spec.parseDOM;o&&o.forEach(r=>{s(r=uA(r)),r.node||r.ignore||r.mark||(r.node=i)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Xu(e,Xu.schemaRules(e)))}}const tF={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},B3e={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},nF={ol:!0,ul:!0},q_=1,X_=2,Sm=4;function lA(t,e,n){return e!=null?(e?q_:0)|(e==="full"?X_:0):t&&t.whitespace=="pre"?q_|X_:n&~Sm}class _0{constructor(e,n,s,i,o,r){this.type=e,this.attrs=n,this.marks=s,this.solid=i,this.options=r,this.content=[],this.activeMarks=bn.none,this.match=o||(r&Sm?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(et.from(e));if(n)this.match=this.type.contentMatch.matchFragment(n);else{let s=this.type.contentMatch,i;return(i=s.findWrapping(e.type))?(this.match=s,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&q_)){let s=this.content[this.content.length-1],i;if(s&&s.isText&&(i=/[ \t\r\n\u000c]+$/.exec(s.text))){let o=s;s.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=o.withText(o.text.slice(0,o.text.length-i[0].length))}}let n=et.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(et.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&&!tF.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class cA{constructor(e,n,s){this.parser=e,this.options=n,this.isOpen=s,this.open=0;let i=n.topNode,o,r=lA(null,n.preserveWhitespace,0)|(s?Sm:0);i?o=new _0(i.type,i.attrs,bn.none,!0,n.topMatch||i.type.contentMatch,r):s?o=new _0(null,null,bn.none,!0,null,r):o=new _0(e.schema.topNodeType,null,bn.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 s=e.nodeValue,i=this.top;if(i.options&X_||i.inlineContext(e)||/[^ \t\r\n\u000c]/.test(s)){if(i.options&q_)i.options&X_?s=s.replace(/\r\n?/g,` | |
| 84 | -`):s=s.replace(/\r?\n|\r/g," ");else if(s=s.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(s)&&this.open==this.nodes.length-1){let o=i.content[i.content.length-1],r=e.previousSibling;(!o||r&&r.nodeName=="BR"||o.isText&&/[ \t\r\n\u000c]$/.test(o.text))&&(s=s.slice(1))}s&&this.insertNode(this.parser.schema.text(s),n),this.findInText(e)}else this.findInside(e)}addElement(e,n,s){let i=e.nodeName.toLowerCase(),o;nF.hasOwnProperty(i)&&this.parser.normalizeLists&&z3e(e);let r=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,s));if(r?r.ignore:B3e.hasOwnProperty(i))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(tF.hasOwnProperty(i))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(` | |
| 85 | -`),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 s=e.style;if(s&&s.length)for(let i=0;i<this.parser.matchedStyles.length;i++){let o=this.parser.matchedStyles[i],r=s.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,s,i){let o,r;if(n.node)if(r=this.parser.schema.nodes[n.node],r.isLeaf)this.insertNode(r.create(n.attrs),s)||this.leafFallback(e,s);else{let l=this.enter(r,n.attrs||null,s,n.preserveWhitespace);l&&(o=!0,s=l)}else{let l=this.parser.schema.marks[n.mark];s=s.concat(l.create(n.attrs))}let a=this.top;if(r&&r.isLeaf)this.findInside(e);else if(i)this.addElement(e,s,i);else if(n.getContent)this.findInside(e),n.getContent(e,this.parser.schema).forEach(l=>this.insertNode(l,s));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,s)}o&&this.sync(a)&&this.open--}addAll(e,n,s,i){let o=s||0;for(let r=s?e.childNodes[s]:e.firstChild,a=i==null?null:e.childNodes[i];r!=a;r=r.nextSibling,++o)this.findAtPoint(e,o),this.addDOM(r,n);this.findAtPoint(e,o)}findPlace(e,n){let s,i;for(let o=this.open;o>=0;o--){let r=this.nodes[o],a=r.findWrapping(e);if(a&&(!s||s.length>a.length)&&(s=a,i=r,!a.length)||r.solid)break}if(!s)return null;this.sync(i);for(let o=0;o<s.length;o++)n=this.enterInner(s[o],null,n,!1);return n}insertNode(e,n){if(e.isInline&&this.needsBlock&&!this.top.type){let i=this.textblockFromContext();i&&(n=this.enterInner(i,null,n))}let s=this.findPlace(e,n);if(s){this.closeExtra();let i=this.top;i.match&&(i.match=i.match.matchType(e.type));let o=bn.none;for(let r of s.concat(e.marks))(i.type?i.type.allowsMarkType(r.type):dA(r.type,e.type))&&(o=r.addToSet(o));return i.content.push(e.mark(o)),!0}return!1}enter(e,n,s,i){let o=this.findPlace(e.create(n),s);return o&&(o=this.enterInner(e,n,s,!0,i)),o}enterInner(e,n,s,i=!1,o){this.closeExtra();let r=this.top;r.match=r.match&&r.match.matchType(e);let a=lA(e,o,r.options);r.options&Sm&&r.content.length==0&&(a|=Sm);let l=bn.none;return s=s.filter(c=>(r.type?r.type.allowsMarkType(c.type):dA(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new _0(e,n,l,i,null,a)),this.open++,s}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 s=this.nodes[n].content;for(let i=s.length-1;i>=0;i--)e+=s[i].nodeSize;n&&e++}return e}findAtPoint(e,n){if(this.find)for(let s=0;s<this.find.length;s++)this.find[s].node==e&&this.find[s].offset==n&&(this.find[s].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,s){if(e!=n&&this.find)for(let i=0;i<this.find.length;i++)this.find[i].pos==null&&e.nodeType==1&&e.contains(this.find[i].node)&&n.compareDocumentPosition(this.find[i].node)&(s?2:4)&&(this.find[i].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("/"),s=this.options.context,i=!this.isOpen&&(!s||s.parent.type==this.nodes[0].type),o=-(s?s.depth+1:0)+(i?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&&i?this.nodes[l].type:s&&l>=o?s.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 s=e.node(n).contentMatchAt(e.indexAfter(n)).defaultType;if(s&&s.isTextblock&&s.defaultAttrs)return s}for(let n in this.parser.schema.nodes){let s=this.parser.schema.nodes[n];if(s.isTextblock&&s.defaultAttrs)return s}}}function z3e(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let s=e.nodeType==1?e.nodeName.toLowerCase():null;s&&nF.hasOwnProperty(s)&&n?(n.appendChild(e),e=n):s=="li"?n=e:s&&(n=null)}}function H3e(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function uA(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 s in n){let i=n[s];if(!i.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(i.contentMatch))return!0}}class Ic{constructor(e,n){this.nodes=e,this.marks=n}serializeFragment(e,n={},s){s||(s=tw(n).createDocumentFragment());let i=s,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;)i=o.pop()[1];for(;l<r.marks.length;){let c=r.marks[l++],u=this.serializeMark(c,r.isInline,n);u&&(o.push([c,i]),i.appendChild(u.dom),i=u.contentDOM||u.dom)}}i.appendChild(this.serializeNodeInner(r,n))}),s}serializeNodeInner(e,n){let{dom:s,contentDOM:i}=av(tw(n),this.nodes[e.type.name](e),null,e.attrs);if(i){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,n,i)}return s}serializeNode(e,n={}){let s=this.serializeNodeInner(e,n);for(let i=e.marks.length-1;i>=0;i--){let o=this.serializeMark(e.marks[i],e.isInline,n);o&&((o.contentDOM||o.dom).appendChild(s),s=o.dom)}return s}serializeMark(e,n,s={}){let i=this.marks[e.type.name];return i&&av(tw(s),i(e,n),null,e.attrs)}static renderSpec(e,n,s=null,i){return av(e,n,s,i)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Ic(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=hA(e.nodes);return n.text||(n.text=s=>s.text),n}static marksFromSchema(e){return hA(e.marks)}}function hA(t){let e={};for(let n in t){let s=t[n].spec.toDOM;s&&(e[n]=s)}return e}function tw(t){return t.document||window.document}const fA=new WeakMap;function U3e(t){let e=fA.get(t);return e===void 0&&fA.set(t,e=j3e(t)),e}function j3e(t){let e=null;function n(s){if(s&&typeof s=="object")if(Array.isArray(s))if(typeof s[0]=="string")e||(e=[]),e.push(s);else for(let i=0;i<s.length;i++)n(s[i]);else for(let i in s)n(s[i])}return n(t),e}function av(t,e,n,s){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 i=e[0],o;if(typeof i!="string")throw new RangeError("Invalid array passed to renderSpec");if(s&&(o=U3e(s))&&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=i.indexOf(" ");r>0&&(n=i.slice(0,r),i=i.slice(r+1));let a,l=n?t.createElementNS(n,i):t.createElement(i),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}=av(t,h,n,s);if(l.appendChild(f),p){if(a)throw new RangeError("Multiple content holes");a=p}}}return{dom:l,contentDOM:a}}const W3e={};function D4(t,e){const n=e||W3e,s=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return sF(t,s,i)}function sF(t,e,n){if(Y3e(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 pA(t.children,e,n)}return Array.isArray(t)?pA(t,e,n):""}function pA(t,e,n){const s=[];let i=-1;for(;++i<t.length;)s[i]=sF(t[i],e,n);return s.join("")}function Y3e(t){return!!(t&&typeof t=="object")}const mA=document.createElement("i");function R4(t){const e="&"+t+";";mA.innerHTML=e;const n=mA.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function qo(t,e,n,s){const i=t.length;let o=0,r;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,s.length<1e4)r=Array.from(s),r.unshift(e,n),t.splice(...r);else for(n&&t.splice(e,n);o<s.length;)r=s.slice(o,o+1e4),r.unshift(e,0),t.splice(...r),o+=1e4,e+=1e4}function Fo(t,e){return t.length>0?(qo(t,t.length,0,e),t):e}const gA={}.hasOwnProperty;function iF(t){const e={};let n=-1;for(;++n<t.length;)G3e(e,t[n]);return e}function G3e(t,e){let n;for(n in e){const i=(gA.call(t,n)?t[n]:void 0)||(t[n]={}),o=e[n];let r;if(o)for(r in o){gA.call(i,r)||(i[r]=[]);const a=o[r];q3e(i[r],Array.isArray(a)?a:a?[a]:[])}}}function q3e(t,e){let n=-1;const s=[];for(;++n<e.length;)(e[n].add==="after"?t:s).push(e[n]);qo(t,0,0,s)}function oF(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 xr(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ci=Lc(/[A-Za-z]/),ji=Lc(/[\dA-Za-z]/),X3e=Lc(/[#-'*+\--9=?A-Z^-~]/);function K_(t){return t!==null&&(t<32||t===127)}const j6=Lc(/\d/),K3e=Lc(/[\dA-Fa-f]/),Z3e=Lc(/[!-/:-@[-`{-~]/);function wt(t){return t!==null&&t<-2}function Pn(t){return t!==null&&(t<0||t===32)}function Qt(t){return t===-2||t===-1||t===32}const Cb=Lc(/\p{P}|\p{S}/u),Ku=Lc(/\s/);function Lc(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function dn(t,e,n,s){const i=s?s-1:Number.POSITIVE_INFINITY;let o=0;return r;function r(l){return Qt(l)?(t.enter(n),a(l)):e(l)}function a(l){return Qt(l)&&o++<i?(t.consume(l),a):(t.exit(n),e(l))}}const J3e={tokenize:Q3e};function Q3e(t){const e=t.attempt(this.parser.constructs.contentInitial,s,i);let n;return e;function s(a){if(a===null){t.consume(a);return}return t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),dn(t,e,"linePrefix")}function i(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 wt(a)?(t.consume(a),t.exit("chunkText"),o):(t.consume(a),r)}}const e6e={tokenize:t6e},vA={tokenize:n6e};function t6e(t){const e=this,n=[];let s=0,i,o,r;return a;function a(k){if(s<n.length){const x=n[s];return e.containerState=x[1],t.attempt(x[0].continuation,l,c)(k)}return c(k)}function l(k){if(s++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&C();const x=e.events.length;let S=x,E;for(;S--;)if(e.events[S][0]==="exit"&&e.events[S][1].type==="chunkFlow"){E=e.events[S][1].end;break}y(s);let T=x;for(;T<e.events.length;)e.events[T][1].end=Object.assign({},E),T++;return qo(e.events,S+1,0,e.events.slice(x)),e.events.length=T,c(k)}return a(k)}function c(k){if(s===n.length){if(!i)return h(k);if(i.currentConstruct&&i.currentConstruct.concrete)return p(k);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(vA,u,d)(k)}function u(k){return i&&C(),y(s),h(k)}function d(k){return e.parser.lazy[e.now().line]=s!==n.length,r=e.now().offset,p(k)}function h(k){return e.containerState={},t.attempt(vA,f,p)(k)}function f(k){return s++,n.push([e.currentConstruct,e.containerState]),h(k)}function p(k){if(k===null){i&&C(),y(0),t.consume(k);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),m(k)}function m(k){if(k===null){b(t.exit("chunkFlow"),!0),y(0),t.consume(k);return}return wt(k)?(t.consume(k),b(t.exit("chunkFlow")),s=0,e.interrupt=void 0,a):(t.consume(k),m)}function b(k,x){const S=e.sliceStream(k);if(x&&S.push(null),k.previous=o,o&&(o.next=k),o=k,i.defineSkip(k.start),i.write(S),e.parser.lazy[k.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<r&&(!i.events[E][1].end||i.events[E][1].end.offset>r))return;const T=e.events.length;let P=T,I,L;for(;P--;)if(e.events[P][0]==="exit"&&e.events[P][1].type==="chunkFlow"){if(I){L=e.events[P][1].end;break}I=!0}for(y(s),E=T;E<e.events.length;)e.events[E][1].end=Object.assign({},L),E++;qo(e.events,P+1,0,e.events.slice(T)),e.events.length=E}}function y(k){let x=n.length;for(;x-- >k;){const S=n[x];e.containerState=S[1],S[0].exit.call(e,t)}n.length=k}function C(){i.write([null]),o=void 0,i=void 0,e.containerState._closeFlow=void 0}}function n6e(t,e,n){return dn(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Z_(t){if(t===null||Pn(t)||Ku(t))return 1;if(Cb(t))return 2}function kb(t,e,n){const s=[];let i=-1;for(;++i<t.length;){const o=t[i].resolveAll;o&&!s.includes(o)&&(e=o(e,n),s.push(o))}return e}const W6={name:"attention",tokenize:i6e,resolveAll:s6e};function s6e(t,e){let n=-1,s,i,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(s=n;s--;)if(t[s][0]==="exit"&&t[s][1].type==="attentionSequence"&&t[s][1]._open&&e.sliceSerialize(t[s][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[s][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[s][1].end.offset-t[s][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;l=t[s][1].end.offset-t[s][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const d=Object.assign({},t[s][1].end),h=Object.assign({},t[n][1].start);_A(d,-l),_A(h,l),r={type:l>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},t[s][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[s][1].end),end:Object.assign({},t[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},r.start),end:Object.assign({},a.end)},t[s][1].end=Object.assign({},r.start),t[n][1].start=Object.assign({},a.end),c=[],t[s][1].end.offset-t[s][1].start.offset&&(c=Fo(c,[["enter",t[s][1],e],["exit",t[s][1],e]])),c=Fo(c,[["enter",i,e],["enter",r,e],["exit",r,e],["enter",o,e]]),c=Fo(c,kb(e.parser.constructs.insideSpan.null,t.slice(s+1,n),e)),c=Fo(c,[["exit",o,e],["enter",a,e],["exit",a,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(u=2,c=Fo(c,[["enter",t[n][1],e],["exit",t[n][1],e]])):u=0,qo(t,s-1,n-s+3,c),n=s+c.length-u-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function i6e(t,e){const n=this.parser.constructs.attentionMarkers.null,s=this.previous,i=Z_(s);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=Z_(l),d=!u||u===2&&i||n.includes(l),h=!i||i===2&&u||n.includes(s);return c._open=!!(o===42?d:d&&(i||!h)),c._close=!!(o===42?h:h&&(u||!d)),e(l)}}function _A(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const o6e={name:"autolink",tokenize:r6e};function r6e(t,e,n){let s=0;return i;function i(f){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(f),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(f){return Ci(f)?(t.consume(f),r):f===64?n(f):c(f)}function r(f){return f===43||f===45||f===46||ji(f)?(s=1,a(f)):c(f)}function a(f){return f===58?(t.consume(f),s=0,l):(f===43||f===45||f===46||ji(f))&&s++<32?(t.consume(f),a):(s=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||K_(f)?n(f):(t.consume(f),l)}function c(f){return f===64?(t.consume(f),u):X3e(f)?(t.consume(f),c):n(f)}function u(f){return ji(f)?d(f):n(f)}function d(f){return f===46?(t.consume(f),s=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||ji(f))&&s++<63){const p=f===45?h:d;return t.consume(f),p}return n(f)}}const p1={tokenize:a6e,partial:!0};function a6e(t,e,n){return s;function s(o){return Qt(o)?dn(t,i,"linePrefix")(o):i(o)}function i(o){return o===null||wt(o)?e(o):n(o)}}const rF={name:"blockQuote",tokenize:l6e,continuation:{tokenize:c6e},exit:u6e};function l6e(t,e,n){const s=this;return i;function i(r){if(r===62){const a=s.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 Qt(r)?(t.enter("blockQuotePrefixWhitespace"),t.consume(r),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(r))}}function c6e(t,e,n){const s=this;return i;function i(r){return Qt(r)?dn(t,o,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(r):o(r)}function o(r){return t.attempt(rF,e,n)(r)}}function u6e(t){t.exit("blockQuote")}const aF={name:"characterEscape",tokenize:d6e};function d6e(t,e,n){return s;function s(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),i}function i(o){return Z3e(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(o)}}const lF={name:"characterReference",tokenize:h6e};function h6e(t,e,n){const s=this;let i=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=ji,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=K3e,u):(t.enter("characterReferenceValue"),o=7,r=j6,u(d))}function u(d){if(d===59&&i){const h=t.exit("characterReferenceValue");return r===ji&&!R4(s.sliceSerialize(h))?n(d):(t.enter("characterReferenceMarker"),t.consume(d),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return r(d)&&i++<o?(t.consume(d),u):n(d)}}const yA={tokenize:p6e,partial:!0},bA={name:"codeFenced",tokenize:f6e,concrete:!0};function f6e(t,e,n){const s=this,i={tokenize:S,partial:!0};let o=0,r=0,a;return l;function l(E){return c(E)}function c(E){const T=s.events[s.events.length-1];return o=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,a=E,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),u(E)}function u(E){return E===a?(r++,t.consume(E),u):r<3?n(E):(t.exit("codeFencedFenceSequence"),Qt(E)?dn(t,d,"whitespace")(E):d(E))}function d(E){return E===null||wt(E)?(t.exit("codeFencedFence"),s.interrupt?e(E):t.check(yA,m,x)(E)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),h(E))}function h(E){return E===null||wt(E)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),d(E)):Qt(E)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),dn(t,f,"whitespace")(E)):E===96&&E===a?n(E):(t.consume(E),h)}function f(E){return E===null||wt(E)?d(E):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||wt(E)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),d(E)):E===96&&E===a?n(E):(t.consume(E),p)}function m(E){return t.attempt(i,x,b)(E)}function b(E){return t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),y}function y(E){return o>0&&Qt(E)?dn(t,C,"linePrefix",o+1)(E):C(E)}function C(E){return E===null||wt(E)?t.check(yA,m,x)(E):(t.enter("codeFlowValue"),k(E))}function k(E){return E===null||wt(E)?(t.exit("codeFlowValue"),C(E)):(t.consume(E),k)}function x(E){return t.exit("codeFenced"),e(E)}function S(E,T,P){let I=0;return L;function L(B){return E.enter("lineEnding"),E.consume(B),E.exit("lineEnding"),V}function V(B){return E.enter("codeFencedFence"),Qt(B)?dn(E,D,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):D(B)}function D(B){return B===a?(E.enter("codeFencedFenceSequence"),z(B)):P(B)}function z(B){return B===a?(I++,E.consume(B),z):I>=r?(E.exit("codeFencedFenceSequence"),Qt(B)?dn(E,Y,"whitespace")(B):Y(B)):P(B)}function Y(B){return B===null||wt(B)?(E.exit("codeFencedFence"),T(B)):P(B)}}}function p6e(t,e,n){const s=this;return i;function i(r){return r===null?n(r):(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),o)}function o(r){return s.parser.lazy[s.now().line]?n(r):e(r)}}const nw={name:"codeIndented",tokenize:g6e},m6e={tokenize:v6e,partial:!0};function g6e(t,e,n){const s=this;return i;function i(c){return t.enter("codeIndented"),dn(t,o,"linePrefix",4+1)(c)}function o(c){const u=s.events[s.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):wt(c)?t.attempt(m6e,r,l)(c):(t.enter("codeFlowValue"),a(c))}function a(c){return c===null||wt(c)?(t.exit("codeFlowValue"),r(c)):(t.consume(c),a)}function l(c){return t.exit("codeIndented"),e(c)}}function v6e(t,e,n){const s=this;return i;function i(r){return s.parser.lazy[s.now().line]?n(r):wt(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),i):dn(t,o,"linePrefix",4+1)(r)}function o(r){const a=s.events[s.events.length-1];return a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(r):wt(r)?i(r):n(r)}}const _6e={name:"codeText",tokenize:w6e,resolve:y6e,previous:b6e};function y6e(t){let e=t.length-4,n=3,s,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(s=n;++s<e;)if(t[s][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(s=n-1,e++;++s<=e;)i===void 0?s!==e&&t[s][1].type!=="lineEnding"&&(i=s):(s===e||t[s][1].type==="lineEnding")&&(t[i][1].type="codeTextData",s!==i+2&&(t[i][1].end=t[s-1][1].end,t.splice(i+2,s-i-2),e-=s-i-2,s=i+2),i=void 0);return t}function b6e(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function w6e(t,e,n){let s=0,i,o;return r;function r(d){return t.enter("codeText"),t.enter("codeTextSequence"),a(d)}function a(d){return d===96?(t.consume(d),s++,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"),i=0,u(d)):wt(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||wt(d)?(t.exit("codeTextData"),l(d)):(t.consume(d),c)}function u(d){return d===96?(t.consume(d),i++,u):i===s?(t.exit("codeTextSequence"),t.exit("codeText"),e(d)):(o.type="codeTextData",c(d))}}class C6e{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 s=n??Number.POSITIVE_INFINITY;return s<this.left.length?this.left.slice(e,s):e>this.left.length?this.right.slice(this.right.length-s+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-s+this.left.length).reverse())}splice(e,n,s){const i=n||0;this.setCursor(Math.trunc(e));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return s&&vp(this.left,s),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),vp(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),vp(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);vp(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);vp(this.left,n.reverse())}}}function vp(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 cF(t){const e={};let n=-1,s,i,o,r,a,l,c;const u=new C6e(t);for(;++n<u.length;){for(;n in e;)n=e[n];if(s=u.get(n),n&&s[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=s[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(s[0]==="enter")s[1].contentType&&(Object.assign(e,k6e(u,n)),n=e[n],c=!0);else if(s[1]._container){for(o=n,i=void 0;o--&&(r=u.get(o),r[1].type==="lineEnding"||r[1].type==="lineEndingBlank");)r[0]==="enter"&&(i&&(u.get(i)[1].type="lineEndingBlank"),r[1].type="lineEnding",i=o);i&&(s[1].end=Object.assign({},u.get(i)[1].start),a=u.slice(i,n),a.unshift(s),u.splice(i,n-i+1,a))}}return qo(t,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function k6e(t,e){const n=t.get(e)[1],s=t.get(e)[2];let i=e-1;const o=[],r=n._tokenizer||s.parser[n.contentType](n.start),a=r.events,l=[],c={};let u,d,h=-1,f=n,p=0,m=0;const b=[m];for(;f;){for(;t.get(++i)[1]!==f;);o.push(i),f._tokenizer||(u=s.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,b.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):b.pop(),h=b.length;h--;){const y=a.slice(b[h],b[h+1]),C=o.pop();l.push([C,C+y.length-1]),t.splice(C,2,y)}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 x6e={tokenize:A6e,resolve:$6e},S6e={tokenize:M6e,partial:!0};function $6e(t){return cF(t),t}function A6e(t,e){let n;return s;function s(a){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(a)}function i(a){return a===null?o(a):wt(a)?t.check(S6e,r,o)(a):(t.consume(a),i)}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,i}}function M6e(t,e,n){const s=this;return i;function i(r){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),dn(t,o,"linePrefix")}function o(r){if(r===null||wt(r))return n(r);const a=s.events[s.events.length-1];return!s.parser.constructs.disable.null.includes("codeIndented")&&a&&a[1].type==="linePrefix"&&a[2].sliceSerialize(a[1],!0).length>=4?e(r):t.interrupt(s.parser.constructs.flow,n,e)(r)}}function uF(t,e,n,s,i,o,r,a,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return d;function d(y){return y===60?(t.enter(s),t.enter(i),t.enter(o),t.consume(y),t.exit(o),h):y===null||y===32||y===41||K_(y)?n(y):(t.enter(s),t.enter(r),t.enter(a),t.enter("chunkString",{contentType:"string"}),m(y))}function h(y){return y===62?(t.enter(o),t.consume(y),t.exit(o),t.exit(i),t.exit(s),e):(t.enter(a),t.enter("chunkString",{contentType:"string"}),f(y))}function f(y){return y===62?(t.exit("chunkString"),t.exit(a),h(y)):y===null||y===60||wt(y)?n(y):(t.consume(y),y===92?p:f)}function p(y){return y===60||y===62||y===92?(t.consume(y),f):f(y)}function m(y){return!u&&(y===null||y===41||Pn(y))?(t.exit("chunkString"),t.exit(a),t.exit(r),t.exit(s),e(y)):u<c&&y===40?(t.consume(y),u++,m):y===41?(t.consume(y),u--,m):y===null||y===32||y===40||K_(y)?n(y):(t.consume(y),y===92?b:m)}function b(y){return y===40||y===41||y===92?(t.consume(y),m):m(y)}}function dF(t,e,n,s,i,o){const r=this;let a=0,l;return c;function c(f){return t.enter(s),t.enter(i),t.consume(f),t.exit(i),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(i),t.consume(f),t.exit(i),t.exit(s),e):wt(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||wt(f)||a++>999?(t.exit("chunkString"),u(f)):(t.consume(f),l||(l=!Qt(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(t.consume(f),a++,d):d(f)}}function hF(t,e,n,s,i,o){let r;return a;function a(h){return h===34||h===39||h===40?(t.enter(s),t.enter(i),t.consume(h),t.exit(i),r=h===40?41:h,l):n(h)}function l(h){return h===r?(t.enter(i),t.consume(h),t.exit(i),t.exit(s),e):(t.enter(o),c(h))}function c(h){return h===r?(t.exit(o),l(r)):h===null?n(h):wt(h)?(t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),dn(t,c,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===r||h===null||wt(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 $m(t,e){let n;return s;function s(i){return wt(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,s):Qt(i)?dn(t,s,n?"linePrefix":"lineSuffix")(i):e(i)}}const E6e={name:"definition",tokenize:P6e},T6e={tokenize:I6e,partial:!0};function P6e(t,e,n){const s=this;let i;return o;function o(f){return t.enter("definition"),r(f)}function r(f){return dF.call(s,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return i=xr(s.sliceSerialize(s.events[s.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 Pn(f)?$m(t,c)(f):c(f)}function c(f){return uF(t,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return t.attempt(T6e,d,d)(f)}function d(f){return Qt(f)?dn(t,h,"whitespace")(f):h(f)}function h(f){return f===null||wt(f)?(t.exit("definition"),s.parser.defined.push(i),e(f)):n(f)}}function I6e(t,e,n){return s;function s(a){return Pn(a)?$m(t,i)(a):n(a)}function i(a){return hF(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return Qt(a)?dn(t,r,"whitespace")(a):r(a)}function r(a){return a===null||wt(a)?e(a):n(a)}}const L6e={name:"hardBreakEscape",tokenize:O6e};function O6e(t,e,n){return s;function s(o){return t.enter("hardBreakEscape"),t.consume(o),i}function i(o){return wt(o)?(t.exit("hardBreakEscape"),e(o)):n(o)}}const D6e={name:"headingAtx",tokenize:V6e,resolve:R6e};function R6e(t,e){let n=t.length-2,s=3,i,o;return t[s][1].type==="whitespace"&&(s+=2),n-2>s&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(s===n-1||n-4>s&&t[n-2][1].type==="whitespace")&&(n-=s+1===n?2:4),n>s&&(i={type:"atxHeadingText",start:t[s][1].start,end:t[n][1].end},o={type:"chunkText",start:t[s][1].start,end:t[n][1].end,contentType:"text"},qo(t,s,n-s+1,[["enter",i,e],["enter",o,e],["exit",o,e],["exit",i,e]])),t}function V6e(t,e,n){let s=0;return i;function i(u){return t.enter("atxHeading"),o(u)}function o(u){return t.enter("atxHeadingSequence"),r(u)}function r(u){return u===35&&s++<6?(t.consume(u),r):u===null||Pn(u)?(t.exit("atxHeadingSequence"),a(u)):n(u)}function a(u){return u===35?(t.enter("atxHeadingSequence"),l(u)):u===null||wt(u)?(t.exit("atxHeading"),e(u)):Qt(u)?dn(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||Pn(u)?(t.exit("atxHeadingText"),a(u)):(t.consume(u),c)}}const F6e=["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"],N6e={name:"htmlFlow",tokenize:U6e,resolveTo:H6e,concrete:!0},B6e={tokenize:W6e,partial:!0},z6e={tokenize:j6e,partial:!0};function H6e(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 U6e(t,e,n){const s=this;let i,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),i=3,s.interrupt?e:F):Ci(Z)?(t.consume(Z),r=String.fromCharCode(Z),b):n(Z)}function h(Z){return Z===45?(t.consume(Z),i=2,f):Z===91?(t.consume(Z),i=5,a=0,p):Ci(Z)?(t.consume(Z),i=4,s.interrupt?e:F):n(Z)}function f(Z){return Z===45?(t.consume(Z),s.interrupt?e:F):n(Z)}function p(Z){const me="CDATA[";return Z===me.charCodeAt(a++)?(t.consume(Z),a===me.length?s.interrupt?e:D:p):n(Z)}function m(Z){return Ci(Z)?(t.consume(Z),r=String.fromCharCode(Z),b):n(Z)}function b(Z){if(Z===null||Z===47||Z===62||Pn(Z)){const me=Z===47,Se=r.toLowerCase();return!me&&!o&&wA.includes(Se)?(i=1,s.interrupt?e(Z):D(Z)):F6e.includes(r.toLowerCase())?(i=6,me?(t.consume(Z),y):s.interrupt?e(Z):D(Z)):(i=7,s.interrupt&&!s.parser.lazy[s.now().line]?n(Z):o?C(Z):k(Z))}return Z===45||ji(Z)?(t.consume(Z),r+=String.fromCharCode(Z),b):n(Z)}function y(Z){return Z===62?(t.consume(Z),s.interrupt?e:D):n(Z)}function C(Z){return Qt(Z)?(t.consume(Z),C):L(Z)}function k(Z){return Z===47?(t.consume(Z),L):Z===58||Z===95||Ci(Z)?(t.consume(Z),x):Qt(Z)?(t.consume(Z),k):L(Z)}function x(Z){return Z===45||Z===46||Z===58||Z===95||ji(Z)?(t.consume(Z),x):S(Z)}function S(Z){return Z===61?(t.consume(Z),E):Qt(Z)?(t.consume(Z),S):k(Z)}function E(Z){return Z===null||Z===60||Z===61||Z===62||Z===96?n(Z):Z===34||Z===39?(t.consume(Z),l=Z,T):Qt(Z)?(t.consume(Z),E):P(Z)}function T(Z){return Z===l?(t.consume(Z),l=null,I):Z===null||wt(Z)?n(Z):(t.consume(Z),T)}function P(Z){return Z===null||Z===34||Z===39||Z===47||Z===60||Z===61||Z===62||Z===96||Pn(Z)?S(Z):(t.consume(Z),P)}function I(Z){return Z===47||Z===62||Qt(Z)?k(Z):n(Z)}function L(Z){return Z===62?(t.consume(Z),V):n(Z)}function V(Z){return Z===null||wt(Z)?D(Z):Qt(Z)?(t.consume(Z),V):n(Z)}function D(Z){return Z===45&&i===2?(t.consume(Z),U):Z===60&&i===1?(t.consume(Z),X):Z===62&&i===4?(t.consume(Z),Q):Z===63&&i===3?(t.consume(Z),F):Z===93&&i===5?(t.consume(Z),N):wt(Z)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(B6e,ie,z)(Z)):Z===null||wt(Z)?(t.exit("htmlFlowData"),z(Z)):(t.consume(Z),D)}function z(Z){return t.check(z6e,Y,ie)(Z)}function Y(Z){return t.enter("lineEnding"),t.consume(Z),t.exit("lineEnding"),B}function B(Z){return Z===null||wt(Z)?z(Z):(t.enter("htmlFlowData"),D(Z))}function U(Z){return Z===45?(t.consume(Z),F):D(Z)}function X(Z){return Z===47?(t.consume(Z),r="",K):D(Z)}function K(Z){if(Z===62){const me=r.toLowerCase();return wA.includes(me)?(t.consume(Z),Q):D(Z)}return Ci(Z)&&r.length<8?(t.consume(Z),r+=String.fromCharCode(Z),K):D(Z)}function N(Z){return Z===93?(t.consume(Z),F):D(Z)}function F(Z){return Z===62?(t.consume(Z),Q):Z===45&&i===2?(t.consume(Z),F):D(Z)}function Q(Z){return Z===null||wt(Z)?(t.exit("htmlFlowData"),ie(Z)):(t.consume(Z),Q)}function ie(Z){return t.exit("htmlFlow"),e(Z)}}function j6e(t,e,n){const s=this;return i;function i(r){return wt(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),o):n(r)}function o(r){return s.parser.lazy[s.now().line]?n(r):e(r)}}function W6e(t,e,n){return s;function s(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(p1,e,n)}}const Y6e={name:"htmlText",tokenize:G6e};function G6e(t,e,n){const s=this;let i,o,r;return a;function a(F){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(F),l}function l(F){return F===33?(t.consume(F),c):F===47?(t.consume(F),S):F===63?(t.consume(F),k):Ci(F)?(t.consume(F),P):n(F)}function c(F){return F===45?(t.consume(F),u):F===91?(t.consume(F),o=0,p):Ci(F)?(t.consume(F),C):n(F)}function u(F){return F===45?(t.consume(F),f):n(F)}function d(F){return F===null?n(F):F===45?(t.consume(F),h):wt(F)?(r=d,X(F)):(t.consume(F),d)}function h(F){return F===45?(t.consume(F),f):d(F)}function f(F){return F===62?U(F):F===45?h(F):d(F)}function p(F){const Q="CDATA[";return F===Q.charCodeAt(o++)?(t.consume(F),o===Q.length?m:p):n(F)}function m(F){return F===null?n(F):F===93?(t.consume(F),b):wt(F)?(r=m,X(F)):(t.consume(F),m)}function b(F){return F===93?(t.consume(F),y):m(F)}function y(F){return F===62?U(F):F===93?(t.consume(F),y):m(F)}function C(F){return F===null||F===62?U(F):wt(F)?(r=C,X(F)):(t.consume(F),C)}function k(F){return F===null?n(F):F===63?(t.consume(F),x):wt(F)?(r=k,X(F)):(t.consume(F),k)}function x(F){return F===62?U(F):k(F)}function S(F){return Ci(F)?(t.consume(F),E):n(F)}function E(F){return F===45||ji(F)?(t.consume(F),E):T(F)}function T(F){return wt(F)?(r=T,X(F)):Qt(F)?(t.consume(F),T):U(F)}function P(F){return F===45||ji(F)?(t.consume(F),P):F===47||F===62||Pn(F)?I(F):n(F)}function I(F){return F===47?(t.consume(F),U):F===58||F===95||Ci(F)?(t.consume(F),L):wt(F)?(r=I,X(F)):Qt(F)?(t.consume(F),I):U(F)}function L(F){return F===45||F===46||F===58||F===95||ji(F)?(t.consume(F),L):V(F)}function V(F){return F===61?(t.consume(F),D):wt(F)?(r=V,X(F)):Qt(F)?(t.consume(F),V):I(F)}function D(F){return F===null||F===60||F===61||F===62||F===96?n(F):F===34||F===39?(t.consume(F),i=F,z):wt(F)?(r=D,X(F)):Qt(F)?(t.consume(F),D):(t.consume(F),Y)}function z(F){return F===i?(t.consume(F),i=void 0,B):F===null?n(F):wt(F)?(r=z,X(F)):(t.consume(F),z)}function Y(F){return F===null||F===34||F===39||F===60||F===61||F===96?n(F):F===47||F===62||Pn(F)?I(F):(t.consume(F),Y)}function B(F){return F===47||F===62||Pn(F)?I(F):n(F)}function U(F){return F===62?(t.consume(F),t.exit("htmlTextData"),t.exit("htmlText"),e):n(F)}function X(F){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(F),t.exit("lineEnding"),K}function K(F){return Qt(F)?dn(t,N,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):N(F)}function N(F){return t.enter("htmlTextData"),r(F)}}const V4={name:"labelEnd",tokenize:Q6e,resolveTo:J6e,resolveAll:Z6e},q6e={tokenize:eCe},X6e={tokenize:tCe},K6e={tokenize:nCe};function Z6e(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 J6e(t,e){let n=t.length,s=0,i,o,r,a;for(;n--;)if(i=t[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(r){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){s=2;break}}else i.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+s+2][1].end),end:Object.assign({},t[r-2][1].start)};return a=[["enter",l,e],["enter",c,e]],a=Fo(a,t.slice(o+1,o+s+3)),a=Fo(a,[["enter",u,e]]),a=Fo(a,kb(e.parser.constructs.insideSpan.null,t.slice(o+s+4,r-3),e)),a=Fo(a,[["exit",u,e],t[r-2],t[r-1],["exit",c,e]]),a=Fo(a,t.slice(r+1)),a=Fo(a,[["exit",l,e]]),qo(t,o,t.length,a),t}function Q6e(t,e,n){const s=this;let i=s.events.length,o,r;for(;i--;)if((s.events[i][1].type==="labelImage"||s.events[i][1].type==="labelLink")&&!s.events[i][1]._balanced){o=s.events[i][1];break}return a;function a(h){return o?o._inactive?d(h):(r=s.parser.defined.includes(xr(s.sliceSerialize({start:o.end,end:s.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(q6e,u,r?u:d)(h):h===91?t.attempt(X6e,u,r?c:d)(h):r?u(h):d(h)}function c(h){return t.attempt(K6e,u,d)(h)}function u(h){return e(h)}function d(h){return o._balanced=!0,n(h)}}function eCe(t,e,n){return s;function s(d){return t.enter("resource"),t.enter("resourceMarker"),t.consume(d),t.exit("resourceMarker"),i}function i(d){return Pn(d)?$m(t,o)(d):o(d)}function o(d){return d===41?u(d):uF(t,r,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function r(d){return Pn(d)?$m(t,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?hF(t,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return Pn(d)?$m(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 tCe(t,e,n){const s=this;return i;function i(a){return dF.call(s,t,o,r,"reference","referenceMarker","referenceString")(a)}function o(a){return s.parser.defined.includes(xr(s.sliceSerialize(s.events[s.events.length-1][1]).slice(1,-1)))?e(a):n(a)}function r(a){return n(a)}}function nCe(t,e,n){return s;function s(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),i}function i(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),e):n(o)}}const sCe={name:"labelStartImage",tokenize:iCe,resolveAll:V4.resolveAll};function iCe(t,e,n){const s=this;return i;function i(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 s.parser.constructs?n(a):e(a)}}const oCe={name:"labelStartLink",tokenize:rCe,resolveAll:V4.resolveAll};function rCe(t,e,n){const s=this;return i;function i(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 s.parser.constructs?n(r):e(r)}}const sw={name:"lineEnding",tokenize:aCe};function aCe(t,e){return n;function n(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),dn(t,e,"linePrefix")}}const lv={name:"thematicBreak",tokenize:lCe};function lCe(t,e,n){let s=0,i;return o;function o(c){return t.enter("thematicBreak"),r(c)}function r(c){return i=c,a(c)}function a(c){return c===i?(t.enter("thematicBreakSequence"),l(c)):s>=3&&(c===null||wt(c))?(t.exit("thematicBreak"),e(c)):n(c)}function l(c){return c===i?(t.consume(c),s++,l):(t.exit("thematicBreakSequence"),Qt(c)?dn(t,a,"whitespace")(c):a(c))}}const Fi={name:"list",tokenize:dCe,continuation:{tokenize:hCe},exit:pCe},cCe={tokenize:mCe,partial:!0},uCe={tokenize:fCe,partial:!0};function dCe(t,e,n){const s=this,i=s.events[s.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,r=0;return a;function a(f){const p=s.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!s.containerState.marker||f===s.containerState.marker:j6(f)){if(s.containerState.type||(s.containerState.type=p,t.enter(p,{_container:!0})),p==="listUnordered")return t.enter("listItemPrefix"),f===42||f===45?t.check(lv,n,c)(f):c(f);if(!s.interrupt||f===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),l(f)}return n(f)}function l(f){return j6(f)&&++r<10?(t.consume(f),l):(!s.interrupt||r<2)&&(s.containerState.marker?f===s.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"),s.containerState.marker=s.containerState.marker||f,t.check(p1,s.interrupt?n:u,t.attempt(cCe,h,d))}function u(f){return s.containerState.initialBlankLine=!0,o++,h(f)}function d(f){return Qt(f)?(t.enter("listItemPrefixWhitespace"),t.consume(f),t.exit("listItemPrefixWhitespace"),h):n(f)}function h(f){return s.containerState.size=o+s.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(f)}}function hCe(t,e,n){const s=this;return s.containerState._closeFlow=void 0,t.check(p1,i,o);function i(a){return s.containerState.furtherBlankLines=s.containerState.furtherBlankLines||s.containerState.initialBlankLine,dn(t,e,"listItemIndent",s.containerState.size+1)(a)}function o(a){return s.containerState.furtherBlankLines||!Qt(a)?(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,r(a)):(s.containerState.furtherBlankLines=void 0,s.containerState.initialBlankLine=void 0,t.attempt(uCe,e,r)(a))}function r(a){return s.containerState._closeFlow=!0,s.interrupt=void 0,dn(t,t.attempt(Fi,e,n),"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function fCe(t,e,n){const s=this;return dn(t,i,"listItemIndent",s.containerState.size+1);function i(o){const r=s.events[s.events.length-1];return r&&r[1].type==="listItemIndent"&&r[2].sliceSerialize(r[1],!0).length===s.containerState.size?e(o):n(o)}}function pCe(t){t.exit(this.containerState.type)}function mCe(t,e,n){const s=this;return dn(t,i,"listItemPrefixWhitespace",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function i(o){const r=s.events[s.events.length-1];return!Qt(o)&&r&&r[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}const CA={name:"setextUnderline",tokenize:vCe,resolveTo:gCe};function gCe(t,e){let n=t.length,s,i,o;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){s=n;break}t[n][1].type==="paragraph"&&(i=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[i][1].start),end:Object.assign({},t[t.length-1][1].end)};return t[i][1].type="setextHeadingText",o?(t.splice(i,0,["enter",r,e]),t.splice(o+1,0,["exit",t[s][1],e]),t[s][1].end=Object.assign({},t[o][1].end)):t[s][1]=r,t.push(["exit",r,e]),t}function vCe(t,e,n){const s=this;let i;return o;function o(c){let u=s.events.length,d;for(;u--;)if(s.events[u][1].type!=="lineEnding"&&s.events[u][1].type!=="linePrefix"&&s.events[u][1].type!=="content"){d=s.events[u][1].type==="paragraph";break}return!s.parser.lazy[s.now().line]&&(s.interrupt||d)?(t.enter("setextHeadingLine"),i=c,r(c)):n(c)}function r(c){return t.enter("setextHeadingLineSequence"),a(c)}function a(c){return c===i?(t.consume(c),a):(t.exit("setextHeadingLineSequence"),Qt(c)?dn(t,l,"lineSuffix")(c):l(c))}function l(c){return c===null||wt(c)?(t.exit("setextHeadingLine"),e(c)):n(c)}}const _Ce={tokenize:yCe};function yCe(t){const e=this,n=t.attempt(p1,s,t.attempt(this.parser.constructs.flowInitial,i,dn(t,t.attempt(this.parser.constructs.flow,i,t.attempt(x6e,i)),"linePrefix")));return n;function s(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const bCe={resolveAll:pF()},wCe=fF("string"),CCe=fF("text");function fF(t){return{tokenize:e,resolveAll:pF(t==="text"?kCe:void 0)};function e(n){const s=this,i=this.parser.constructs[t],o=n.attempt(i,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=i[u];let h=-1;if(d)for(;++h<d.length;){const f=d[h];if(!f.previous||f.previous.call(s,s.previous))return!0}return!1}}}function pF(t){return e;function e(n,s){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return t?t(n,s):n}}function kCe(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 s=t[n-1][1],i=e.sliceStream(s);let o=i.length,r=-1,a=0,l;for(;o--;){const c=i[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:s.end.line,column:s.end.column-a,offset:s.end.offset-a,_index:s.start._index+o,_bufferIndex:o?r:s.start._bufferIndex+r},end:Object.assign({},s.end)};s.end=Object.assign({},c.start),s.start.offset===s.end.offset?Object.assign(s,c):(t.splice(n,0,["enter",c,e],["exit",c,e]),n+=2)}n++}return t}function xCe(t,e,n){let s=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let r=[],a=[];const l={consume:C,enter:k,exit:x,attempt:T(S),check:T(E),interrupt:T(E,{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(V){return r=Fo(r,V),b(),r[r.length-1]!==null?[]:(P(e,0),c.events=kb(o,c.events,c),c.events)}function h(V,D){return $Ce(f(V),D)}function f(V){return SCe(r,V)}function p(){const{line:V,column:D,offset:z,_index:Y,_bufferIndex:B}=s;return{line:V,column:D,offset:z,_index:Y,_bufferIndex:B}}function m(V){i[V.line]=V.column,L()}function b(){let V;for(;s._index<r.length;){const D=r[s._index];if(typeof D=="string")for(V=s._index,s._bufferIndex<0&&(s._bufferIndex=0);s._index===V&&s._bufferIndex<D.length;)y(D.charCodeAt(s._bufferIndex));else y(D)}}function y(V){u=u(V)}function C(V){wt(V)?(s.line++,s.column=1,s.offset+=V===-3?2:1,L()):V!==-1&&(s.column++,s.offset++),s._bufferIndex<0?s._index++:(s._bufferIndex++,s._bufferIndex===r[s._index].length&&(s._bufferIndex=-1,s._index++)),c.previous=V}function k(V,D){const z=D||{};return z.type=V,z.start=p(),c.events.push(["enter",z,c]),a.push(z),z}function x(V){const D=a.pop();return D.end=p(),c.events.push(["exit",D,c]),D}function S(V,D){P(V,D.from)}function E(V,D){D.restore()}function T(V,D){return z;function z(Y,B,U){let X,K,N,F;return Array.isArray(Y)?ie(Y):"tokenize"in Y?ie([Y]):Q(Y);function Q(we){return oe;function oe(ce){const re=ce!==null&&we[ce],ge=ce!==null&&we.null,ze=[...Array.isArray(re)?re:re?[re]:[],...Array.isArray(ge)?ge:ge?[ge]:[]];return ie(ze)(ce)}}function ie(we){return X=we,K=0,we.length===0?U:Z(we[K])}function Z(we){return oe;function oe(ce){return F=I(),N=we,we.partial||(c.currentConstruct=we),we.name&&c.parser.constructs.disable.null.includes(we.name)?Se():we.tokenize.call(D?Object.assign(Object.create(c),D):c,l,me,Se)(ce)}}function me(we){return V(N,F),B}function Se(we){return F.restore(),++K<X.length?Z(X[K]):U}}}function P(V,D){V.resolveAll&&!o.includes(V)&&o.push(V),V.resolve&&qo(c.events,D,c.events.length-D,V.resolve(c.events.slice(D),c)),V.resolveTo&&(c.events=V.resolveTo(c.events,c))}function I(){const V=p(),D=c.previous,z=c.currentConstruct,Y=c.events.length,B=Array.from(a);return{restore:U,from:Y};function U(){s=V,c.previous=D,c.currentConstruct=z,c.events.length=Y,a=B,L()}}function L(){s.line in i&&s.column<2&&(s.column=i[s.line],s.offset+=i[s.line]-1)}}function SCe(t,e){const n=e.start._index,s=e.start._bufferIndex,i=e.end._index,o=e.end._bufferIndex;let r;if(n===i)r=[t[n].slice(s,o)];else{if(r=t.slice(n,i),s>-1){const a=r[0];typeof a=="string"?r[0]=a.slice(s):r.shift()}o>0&&r.push(t[i].slice(0,o))}return r}function $Ce(t,e){let n=-1;const s=[];let i;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=` | |
| 81 | + */let CF;const d2=t=>CF=t,xF=Symbol();function TC(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var ig;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(ig||(ig={}));function Iye(){const t=fb(!0),e=t.run(()=>J({}));let n=[],i=[];const s=Pi({install(o){d2(s),s._a=o,o.provide(xF,s),o.config.globalProperties.$pinia=s,i.forEach(r=>n.push(r)),i=[]},use(o){return!this._a&&!Pye?i.push(o):n.push(o),this},_p:n,_a:null,_e:t,_s:new Map,state:e});return s}const SF=()=>{};function HA(t,e,n,i=SF){t.push(e);const s=()=>{const o=t.indexOf(e);o>-1&&(t.splice(o,1),i())};return!n&&pb()&&mb(s),s}function dh(t,...e){t.slice().forEach(n=>{n(...e)})}const Lye=t=>t(),UA=Symbol(),Yw=Symbol();function PC(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];TC(s)&&TC(i)&&t.hasOwnProperty(n)&&!hn(i)&&!Fr(i)?t[n]=PC(s,i):t[n]=i}return t}const Oye=Symbol();function Dye(t){return!TC(t)||!t.hasOwnProperty(Oye)}const{assign:Xl}=Object;function Rye(t){return!!(hn(t)&&t.effect)}function Vye(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=go(n.state.value[t]);return Xl(u,o,Object.keys(r||{}).reduce((d,h)=>(d[h]=Pi(Y(()=>{d2(n);const f=n._s.get(t);return r[h].call(f,f)})),d),{}))}return l=$F(t,c,e,n,i,!0),l}function $F(t,e,n={},i,s,o){let r;const a=Xl({actions:{}},n),l={deep:!0};let c,u,d=[],h=[],f;const p=i.state.value[t];!o&&!p&&(i.state.value[t]={});let m;function y(T){let I;c=u=!1,typeof T=="function"?(T(i.state.value[t]),I={type:ig.patchFunction,storeId:t,events:f}):(PC(i.state.value[t],T),I={type:ig.patchObject,payload:T,storeId:t,events:f});const L=m=Symbol();ot().then(()=>{m===L&&(c=!0)}),u=!0,dh(d,I,i.state.value[t])}const b=o?function(){const{state:I}=n,L=I?I():{};this.$patch(R=>{Xl(R,L)})}:SF;function k(){r.stop(),d=[],h=[],i._s.delete(t)}const C=(T,I="")=>{if(UA in T)return T[Yw]=I,T;const L=function(){d2(i);const R=Array.from(arguments),V=[],B=[];function F(G){V.push(G)}function z(G){B.push(G)}dh(h,{args:R,name:L[Yw],store:S,after:F,onError:z});let U;try{U=T.apply(this&&this.$id===t?this:S,R)}catch(G){throw dh(B,G),G}return U instanceof Promise?U.then(G=>(dh(V,G),G)).catch(G=>(dh(B,G),Promise.reject(G))):(dh(V,U),U)};return L[UA]=!0,L[Yw]=I,L},$={_p:i,$id:t,$onAction:HA.bind(null,h),$patch:y,$reset:b,$subscribe(T,I={}){const L=HA(d,T,I.detached,()=>R()),R=r.run(()=>Te(()=>i.state.value[t],V=>{(I.flush==="sync"?u:c)&&T({storeId:t,type:ig.direct,events:f},V)},Xl({},l,I)));return L},$dispose:k},S=In($);i._s.set(t,S);const P=(i._a&&i._a.runWithContext||Lye)(()=>i._e.run(()=>(r=fb()).run(()=>e({action:C}))));for(const T in P){const I=P[T];if(hn(I)&&!Rye(I)||Fr(I))o||(p&&Dye(I)&&(hn(I)?I.value=p[T]:PC(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 Xl(S,P),Xl(an(S),P),Object.defineProperty(S,"$state",{get:()=>i.state.value[t],set:T=>{y(I=>{Xl(I,T)})}}),i._p.forEach(T=>{Xl(S,r.run(()=>T({store:S,app:i._a,pinia:i,options:a})))}),p&&o&&n.hydrate&&n.hydrate(S.$state,p),c=!0,u=!0,S}/*! #__NO_SIDE_EFFECTS__ */function q1(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=rI();return a=a||(c?qe(xF,null):null),a&&d2(a),a=CF,a._s.has(i)||(o?$F(i,e,s,a):Vye(i,s,a)),a._s.get(i)}return r.$id=i,r}function Fye(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 Nye(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 Bye(t){return typeof t=="object"&&t!==null}function jA(t,e){return t=Bye(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 zye(t,e){return e.reduce((n,i)=>n==null?void 0:n[i],t)}function Hye(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 Uye(t,e){return e.reduce((n,i)=>{const s=i.split(".");return Hye(n,s,zye(t,s))},{})}function jye(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 WA(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)?Uye(t,s):t;e.setItem(i,n.serialize(r))}catch(r){o&&console.error("[pinia-plugin-persistedstate]",r)}}function Wye(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=>jA(a,t)):[jA(i,t)]).map(jye(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)),WA(s,l),a&&(u==null||u(e))})},r.forEach(a=>{const{beforeRestore:l,afterRestore:c}=a;l==null||l(e),WA(s,a),c==null||c(e),s.$subscribe((u,d)=>{YA(d,a)},{detached:!0})})}}var Yye=Wye();const ue=(t,e)=>{const n=t.__vccOpts||t;for(const[i,s]of e)n[i]=s;return n},qye={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()}}},Gye=["id"];function Xye(t,e,n,i,s,o){const r=Va;return v(),D(r,Wt({"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}),hs({default:w(()=>[g("div",{class:q(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:q([c,n.headerClass]),style:{margin:"0"}},x(n.title),11,Gye)):O("",!0)])]),key:"0"}:void 0,t.$slots.footer?{name:"footer",fn:w(()=>[g("div",{class:q(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 tu=ue(qye,[["render",Xye]]);function Kye(t,e){for(var n=-1,i=t==null?0:t.length;++n<i&&e(t[n],n,t)!==!1;);return t}var Zye=Kye;function Jye(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 Qye=Jye,ebe=Qye,tbe=ebe(),nbe=tbe;function sbe(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}var ibe=sbe,obe=typeof xs=="object"&&xs&&xs.Object===Object&&xs,AF=obe,rbe=AF,abe=typeof self=="object"&&self&&self.Object===Object&&self,lbe=rbe||abe||Function("return this")(),Fa=lbe,cbe=Fa,ube=cbe.Symbol,h2=ube,qA=h2,EF=Object.prototype,dbe=EF.hasOwnProperty,hbe=EF.toString,Kp=qA?qA.toStringTag:void 0;function fbe(t){var e=dbe.call(t,Kp),n=t[Kp];try{t[Kp]=void 0;var i=!0}catch{}var s=hbe.call(t);return i&&(e?t[Kp]=n:delete t[Kp]),s}var pbe=fbe,mbe=Object.prototype,gbe=mbe.toString;function vbe(t){return gbe.call(t)}var _be=vbe,GA=h2,ybe=pbe,bbe=_be,wbe="[object Null]",kbe="[object Undefined]",XA=GA?GA.toStringTag:void 0;function Cbe(t){return t==null?t===void 0?kbe:wbe:XA&&XA in Object(t)?ybe(t):bbe(t)}var G1=Cbe;function xbe(t){return t!=null&&typeof t=="object"}var X1=xbe,Sbe=G1,$be=X1,Abe="[object Arguments]";function Ebe(t){return $be(t)&&Sbe(t)==Abe}var Mbe=Ebe,KA=Mbe,Tbe=X1,MF=Object.prototype,Pbe=MF.hasOwnProperty,Ibe=MF.propertyIsEnumerable,Lbe=KA(function(){return arguments}())?KA:function(t){return Tbe(t)&&Pbe.call(t,"callee")&&!Ibe.call(t,"callee")},T8=Lbe,Obe=Array.isArray,Na=Obe,My={exports:{}};function Dbe(){return!1}var Rbe=Dbe;My.exports;(function(t,e){var n=Fa,i=Rbe,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})(My,My.exports);var P8=My.exports,Vbe=9007199254740991,Fbe=/^(?:0|[1-9]\d*)$/;function Nbe(t,e){var n=typeof t;return e=e??Vbe,!!e&&(n=="number"||n!="symbol"&&Fbe.test(t))&&t>-1&&t%1==0&&t<e}var TF=Nbe,Bbe=9007199254740991;function zbe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Bbe}var I8=zbe,Hbe=G1,Ube=I8,jbe=X1,Wbe="[object Arguments]",Ybe="[object Array]",qbe="[object Boolean]",Gbe="[object Date]",Xbe="[object Error]",Kbe="[object Function]",Zbe="[object Map]",Jbe="[object Number]",Qbe="[object Object]",e2e="[object RegExp]",t2e="[object Set]",n2e="[object String]",s2e="[object WeakMap]",i2e="[object ArrayBuffer]",o2e="[object DataView]",r2e="[object Float32Array]",a2e="[object Float64Array]",l2e="[object Int8Array]",c2e="[object Int16Array]",u2e="[object Int32Array]",d2e="[object Uint8Array]",h2e="[object Uint8ClampedArray]",f2e="[object Uint16Array]",p2e="[object Uint32Array]",ts={};ts[r2e]=ts[a2e]=ts[l2e]=ts[c2e]=ts[u2e]=ts[d2e]=ts[h2e]=ts[f2e]=ts[p2e]=!0;ts[Wbe]=ts[Ybe]=ts[i2e]=ts[qbe]=ts[o2e]=ts[Gbe]=ts[Xbe]=ts[Kbe]=ts[Zbe]=ts[Jbe]=ts[Qbe]=ts[e2e]=ts[t2e]=ts[n2e]=ts[s2e]=!1;function m2e(t){return jbe(t)&&Ube(t.length)&&!!ts[Hbe(t)]}var g2e=m2e;function v2e(t){return function(e){return t(e)}}var _2e=v2e,Ty={exports:{}};Ty.exports;(function(t,e){var n=AF,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})(Ty,Ty.exports);var y2e=Ty.exports,b2e=g2e,w2e=_2e,ZA=y2e,JA=ZA&&ZA.isTypedArray,k2e=JA?w2e(JA):b2e,L8=k2e,C2e=ibe,x2e=T8,S2e=Na,$2e=P8,A2e=TF,E2e=L8,M2e=Object.prototype,T2e=M2e.hasOwnProperty;function P2e(t,e){var n=S2e(t),i=!n&&x2e(t),s=!n&&!i&&$2e(t),o=!n&&!i&&!s&&E2e(t),r=n||i||s||o,a=r?C2e(t.length,String):[],l=a.length;for(var c in t)(e||T2e.call(t,c))&&!(r&&(c=="length"||s&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||A2e(c,l)))&&a.push(c);return a}var I2e=P2e,L2e=Object.prototype;function O2e(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||L2e;return t===n}var PF=O2e;function D2e(t,e){return function(n){return t(e(n))}}var R2e=D2e,V2e=R2e,F2e=V2e(Object.keys,Object),N2e=F2e,B2e=PF,z2e=N2e,H2e=Object.prototype,U2e=H2e.hasOwnProperty;function j2e(t){if(!B2e(t))return z2e(t);var e=[];for(var n in Object(t))U2e.call(t,n)&&n!="constructor"&&e.push(n);return e}var IF=j2e;function W2e(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var K1=W2e,Y2e=G1,q2e=K1,G2e="[object AsyncFunction]",X2e="[object Function]",K2e="[object GeneratorFunction]",Z2e="[object Proxy]";function J2e(t){if(!q2e(t))return!1;var e=Y2e(t);return e==X2e||e==K2e||e==G2e||e==Z2e}var LF=J2e,Q2e=LF,ewe=I8;function twe(t){return t!=null&&ewe(t.length)&&!Q2e(t)}var O8=twe,nwe=I2e,swe=IF,iwe=O8;function owe(t){return iwe(t)?nwe(t):swe(t)}var D8=owe,rwe=nbe,awe=D8;function lwe(t,e){return t&&rwe(t,e,awe)}var cwe=lwe,uwe=O8;function dwe(t,e){return function(n,i){if(n==null)return n;if(!uwe(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 hwe=dwe,fwe=cwe,pwe=hwe,mwe=pwe(fwe),gwe=mwe;function vwe(t){return t}var OF=vwe,_we=OF;function ywe(t){return typeof t=="function"?t:_we}var bwe=ywe,wwe=Zye,kwe=gwe,Cwe=bwe,xwe=Na;function Swe(t,e){var n=xwe(t)?wwe:kwe;return n(t,Cwe(e))}var $we=Swe,Awe=$we;const Mc=vi(Awe);function Bt(t){return window.fluentComAdmin.i18n[t]||t}const Ewe={public:{label:Bt("Public"),description:Bt("__PUBLIC_SPACE_DESC"),space_description:Bt("__PIBLIC_SPACE_DESC_2")},private:{label:Bt("Private"),description:Bt("__PRIVATE_SPACE_DESC"),space_description:Bt("__PRIVATE_SPACE_DESC_2")},secret:{label:Bt("Secret"),description:Bt("Only invited members can view and post."),space_description:Bt("__SECRET_SPACE_DESC_2")}},Mwe={public:{label:Bt("Public"),description:Bt("Anyone can view and enroll the course for free")},private:{label:Bt("Private"),description:Bt("__PRIVATE_COURSE_DESC")},secret:{label:Bt("Secret"),description:Bt("Only invited students can view and enroll the course content.")}},Twe={self_paced:{label:Bt("Self Paced"),description:Bt("__SELF_PAED_COURSE_DESC")},structured:{label:Bt("Structured"),description:Bt("__STRUCTURED_COURSE_DESC")},scheduled:{label:Bt("Scheduled"),description:Bt("Course starts on a specific date. Sections are dripped relative to that date.")}},Pwe={leader_board_module:{headerTitle:Bt("Leaderboard Settings"),headerDescription:Bt("Settings for Leaderboard & Gamification features"),featureImage:"leaderboard_module.png",bodyTitle:Bt("Get Leaderboard & Gamification Module"),bodyDescription:Bt("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:Bt("Emoji Module"),headerDescription:Bt("Settings for Emoji & Reaction features"),featureImage:"emoji_module.png",bodyTitle:Bt("Get Emoji & Reaction Module"),bodyDescription:Bt("Use emojis to add a personal touch and make your new article, post, or comment more expressive")},giphy_module:{headerTitle:Bt("Giphy Module"),headerDescription:Bt("Customize Your Giphy Module Settings"),featureImage:"giphy_module.png",bodyTitle:Bt("Get Giphy Module"),bodyDescription:Bt("Want to use awesome GIFs? Upgrade to Pro plan now and enjoy surfing on FluentCommunity")},user_badge_module:{headerTitle:Bt("User Badge Module"),headerDescription:Bt("Add a badge next to user profile name to highlight valued users"),featureImage:"badge_module.png",bodyTitle:Bt("Get User Badge Module"),bodyDescription:Bt("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:Bt("Media Module"),headerDescription:Bt("Add a badge next to user profile name to highlight valued users"),featureImage:"media_module.png",bodyTitle:Bt("Get Media Module"),bodyDescription:Bt("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:Bt("Progressive Web App (PWA)"),headerDescription:Bt("Let members install your community as an app on their phone"),bodyTitle:Bt("Get Progressive Web App (PWA) Module"),bodyDescription:Bt("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.")}},Mh=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]},Iwe={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 Lwe(t,e,n,i,s,o){const r=He,a=Y1,l=H("CloseBold"),c=be,u=xt("loading");return v(),A(ee,null,[_(a,{class:q(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},()=>[Re((v(),D(r,{disabled:s.loading,text:n.isTextBtn,class:"fcom_plain_button"},{default:w(()=>[N(x(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,x(t.$t("Remove")),1)])]),_:3},8,["onClick","text","aria-label"])):O("",!0)],64)}const Ll=ue(Iwe,[["render",Lwe]]),Owe={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])}}},Dwe={class:"fcom_svg_generator"},Rwe={class:"fcom_form_item"},Vwe={class:"fcom_form_item"},Fwe=["innerHTML"];function Nwe(t,e,n,i,s,o){const r=Qc,a=Hd,l=ws;return v(),A("div",Dwe,[g("div",Rwe,[g("label",null,x(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",Vwe,[g("label",null,x(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,we(o.svgShapes,(c,u)=>(v(),D(a,{key:u,value:u},{default:w(()=>[g("div",{innerHTML:c},null,8,Fwe)]),_:2},1032,["value"]))),128))]),_:1},8,["modelValue"])])])}const Bwe=ue(Owe,[["render",Nwe]]);var R8="emoji-mart";const zwe=JSON;var DF=typeof window<"u"&&"localStorage"in window;let IC,LC;function Hwe(t){t||(t={}),IC=t.getter,LC=t.setter}function Uwe(t){R8=t}function jwe(t){for(let e in t){let n=t[e];RF(e,n)}}function RF(t,e){if(LC)LC(t,e);else{if(!DF)return;try{window.localStorage[`${R8}.${t}`]=zwe.stringify(e)}catch{}}}function Wwe(t){if(IC)return IC(t);if(!DF)return;try{var e=window.localStorage[`${R8}.${t}`]}catch{return}if(e)return JSON.parse(e)}const Xf={update:jwe,set:RF,get:Wwe,setNamespace:Uwe,setHandlers:Hwe},qw={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"},VF=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 FF(t){var e=Object.getOwnPropertyNames(t);for(let n of e){let i=t[n];t[n]=i&&typeof i=="object"?FF(i):i}return Object.freeze(t)}const Ywe=t=>{if(!t.compressed)return t;t.compressed=!1;for(let e in t.emojis){let n=t.emojis[e];for(let i in qw)n[i]=n[qw[i]],delete n[qw[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=VF(n)}return t=FF(t),t},Gw=["+1","grinning","kissing_heart","heart_eyes","laughing","stuck_out_tongue_winking_eye","sweat_smile","joy","scream","disappointed","unamused","weary","sob","sunglasses","heart","hankey"];let or,V8,OC={};function NF(){V8=!0,or=Xf.get("frequently")}function qwe(t){V8||NF();var{id:e}=t;or||(or=OC),or[e]||(or[e]=0),or[e]+=1,Xf.set("last",e),Xf.set("frequently",or)}function Gwe(t){if(V8||NF(),!or){OC={};const r=[];let a=Math.min(t,Gw.length);for(let l=0;l<a;l++)OC[Gw[l]]=parseInt((a-l)/4,10)+1,r.push(Gw[l]);return r}const e=t,n=[];for(let r in or)or.hasOwnProperty(r)&&n.push(r);const s=n.sort((r,a)=>or[r]-or[a]).reverse().slice(0,e),o=Xf.get("last");return o&&s.indexOf(o)==-1&&(s.pop(),s.push(o)),s}const DC={add:qwe,get:Gwe},Xwe={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>'},Kwe={props:{i18n:{type:Object,required:!0},color:{type:String},categories:{type:Array,required:!0},activeCategory:{type:Object,default(){return{}}}},emits:["click"],created(){this.svgs=Xwe}},Zwe={role:"tablist",class:"emoji-mart-anchors"},Jwe=["aria-label","aria-selected","data-title","onClick"],Qwe=["innerHTML"];function e3e(t,e,n,i,s,o){return v(),A("div",Zwe,[(v(!0),A(ee,null,we(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:q({"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,Qwe),g("span",{"aria-hidden":"true",class:"emoji-mart-anchor-bar",style:Xe({backgroundColor:n.color})},null,4)],14,Jwe))),128))])}const t3e=ue(Kwe,[["render",e3e]]),n3e=String,s3e=n3e.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 i3e(t){var e=t.split("-"),n=e.map(i=>`0x${i}`);return s3e.apply(null,n)}function QA(t){return t.reduce((e,n)=>(e.indexOf(n)===-1&&e.push(n),e),[])}function o3e(t,e){const n=QA(t),i=QA(e);return n.filter(s=>i.indexOf(s)>=0)}function BF(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=BF(s,o)),n[i]=o}return n}function r3e(){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 a3e=61,l3e=/^(?:\:([^\:]+)\:)(?:\:skin-tone-(\d)\:)?$/,eE=["1F3FA","1F3FB","1F3FC","1F3FD","1F3FE","1F3FF"];class c3e{constructor(e,{emojisToShowFilter:n,include:i,exclude:s,custom:o,recent:r,recentLength:a=20}={}){this._data=Ywe(e),this._emojisFilter=n||null,this._include=i||null,this._exclude=s||null,this._custom=o||[],this._recent=r||DC.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(l3e);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=o3e.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=VF(n));let i=new Py(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 Py(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 Py{constructor(e){if(this._data=Object.assign({},e),this._skins=null,this._data.skin_variations){this._skins=[];for(var n in eE){let i=eE[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 Py(o))}}this._sanitized=u3e(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=a3e-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 zF{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 u3e(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:i3e(r)})}const d3e={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"}},h3e={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{}}}},f3e={props:{...d3e,data:{type:Object,required:!0}},emits:["click","mouseenter","mouseleave"],computed:{view(){return new zF(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 p3e(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:q(o.view.cssClass),style:Xe(o.view.cssStyle)},x(o.view.content),7)]),_:1},40,["title","aria-label","data-title","onMouseenter","onMouseleave","onClick"])):O("",!0)}const HF=ue(f3e,[["render",p3e]]),m3e={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 zF(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:HF}},g3e=["aria-label"],v3e={class:"emoji-mart-category-label"},_3e={class:"emoji-mart-category-label"},y3e=["aria-label","data-title","title","onMouseenter","onMouseleave","onClick"],b3e={key:0},w3e={class:"emoji-mart-no-results-label"};function k3e(t,e,n,i,s,o){const r=H("emoji");return o.isVisible&&(o.isSearch||o.hasResults)?(v(),A("section",{key:0,class:q({"emoji-mart-category":!0,"emoji-mart-no-results":!o.hasResults}),"aria-label":n.i18n.categories[n.id]},[g("div",v3e,[g("h3",_3e,x(n.i18n.categories[n.id]),1)]),(v(!0),A(ee,null,we(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:q(["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:q(l.cssClass),style:Xe(l.cssStyle)},x(l.content),7)],42,y3e)):O("",!0)],64))),256)),o.hasResults?O("",!0):(v(),A("div",b3e,[_(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",w3e,x(n.i18n.notfound),1)]))],10,g3e)):O("",!0)}const C3e=ue(m3e,[["render",k3e]]),x3e={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}}},S3e=["onClick"];function $3e(t,e,n,i,s,o){return v(),A("div",{class:q({"emoji-mart-skin-swatches":!0,"emoji-mart-skin-swatches-opened":s.opened})},[(v(),A(ee,null,we(6,r=>g("span",{key:r,class:q({"emoji-mart-skin-swatch":!0,"emoji-mart-skin-swatch-selected":n.skin==r})},[g("span",{class:q("emoji-mart-skin emoji-mart-skin-tone-"+r),onClick:a=>o.onClick(r)},null,10,S3e)],2)),64))],2)}const A3e=ue(x3e,[["render",$3e]]),E3e={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:HF,Skins:A3e}},M3e={class:"emoji-mart-preview"},T3e={class:"emoji-mart-preview-emoji"},P3e={class:"emoji-mart-preview-data"},I3e={class:"emoji-mart-preview-name"},L3e={class:"emoji-mart-preview-shortnames"},O3e={class:"emoji-mart-preview-emoticons"},D3e={class:"emoji-mart-preview-emoji"},R3e={class:"emoji-mart-preview-data"},V3e={class:"emoji-mart-title-label"},F3e={key:0,class:"emoji-mart-preview-skins"};function N3e(t,e,n,i,s,o){const r=H("emoji"),a=H("skins");return v(),A("div",M3e,[n.emoji?(v(),A(ee,{key:0},[g("div",T3e,[_(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",P3e,[g("div",I3e,x(n.emoji.name),1),g("div",L3e,[(v(!0),A(ee,null,we(o.emojiShortNames,l=>(v(),A("span",{key:l,class:"emoji-mart-preview-shortname"},":"+x(l)+":",1))),128))]),g("div",O3e,[(v(!0),A(ee,null,we(o.emojiEmoticons,l=>(v(),A("span",{key:l,class:"emoji-mart-preview-emoticon"},x(l),1))),128))])])],64)):(v(),A(ee,{key:1},[g("div",D3e,[_(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",R3e,[g("span",V3e,x(n.title),1)]),n.showSkinTones?(v(),A("div",F3e,[_(a,{skin:n.skinProps.skin,onChange:e[0]||(e[0]=l=>n.onSkinChange(l))},null,8,["skin"])])):O("",!0)],64))])}const B3e=ue(E3e,[["render",N3e]]),z3e={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()}},H3e={class:"emoji-mart-search"},U3e=["placeholder"];function j3e(t,e,n,i,s,o){return v(),A("div",H3e,[Re(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,U3e),[[md,s.value]]),e[6]||(e[6]=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))])}const W3e=ue(z3e,[["render",j3e]]);var Y3e=typeof window<"u";Y3e&&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 q3e{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 G3e={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"}},X3e={props:{...h3e,data:{type:Object,required:!0}},emits:["select","skin-change"],data(){return{activeSkin:this.skin||Xf.get("skin")||this.defaultSkin,view:new q3e(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+r3e()},filteredCategories(){return this.view.filteredCategories},mergedI18n(){return Object.freeze(BF(G3e,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),DC.add(this.view.previewEmoji))},onEmojiClick(t){this.$emit("select",t),DC.add(t)},onTextSelect(t){t.stopPropagation()},onSkinChange(t){this.activeSkin=t,Xf.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:t3e,Category:C3e,Preview:B3e,Search:W3e}},K3e={key:0,class:"emoji-mart-bar emoji-mart-bar-anchors"},Z3e={id:"emoji-mart-list",ref:"scrollContent",role:"listbox","aria-expanded":"true"},J3e={key:0,class:"emoji-mart-bar emoji-mart-bar-preview"};function Q3e(t,e,n,i,s,o){const r=H("anchors"),a=H("search"),l=H("category"),c=H("preview");return v(),A("section",{class:"emoji-mart emoji-mart-static",style:Xe(o.customStyles)},[t.showCategories?(v(),A("div",K3e,[_(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",Z3e,[le(t.$slots,"customCategory"),(v(!0),A(ee,null,we(s.view.filteredCategories,(u,d)=>Re((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"])),[[jt,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",J3e,[_(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 eke=ue(X3e,[["render",Q3e]]),tke={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)}},nke=["onClick","onKeydown"];function ske(t,e,n,i,s,o){const r=H("MoreFilled"),a=be,l=He,c=Yo;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",{visible:s.visible},()=>[_(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(Ee((...u)=>o.hideAndFocusTrigger&&o.hideAndFocusTrigger(...u),["prevent","stop"]),["esc"]))},[(v(!0),A(ee,null,we(n.items,(u,d)=>(v(),A("li",{key:d,ref_for:!0,ref:"menuItems",class:q(["fcom_action_popover_item",u.type?"fcom_action_popover_item_"+u.type:""]),role:"menuitem",tabindex:"0",onClick:h=>o.handleAction(u),onKeydown:[ut(Ee(h=>o.handleAction(u),["prevent"]),["enter"]),ut(Ee(h=>o.handleAction(u),["prevent"]),["space"]),ut(Ee(h=>o.focusItem(d+1),["prevent"]),["down"]),ut(Ee(h=>o.focusItem(d-1),["prevent"]),["up"])]},x(u.label),43,nke))),128))],32)])]),_:3},8,["placement","persistent","width","visible","teleported","onAfterEnter"])}const oa=ue(tke,[["render",ske]]),ike={name:"SmilyIcon"},oke={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function rke(t,e,n,i,s,o){return v(),A("svg",oke,[...e[0]||(e[0]=[Ra('<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)])])}const ake=ue(ike,[["render",rke]]),lke={name:"EmojiPicker",components:{Picker:eke,ActionPopover:oa,SmilyIcon:ake},emits:["emoji-selected"],props:{close_on_select:{type:Boolean,default:!1}},data(){return{emojiIndex:null,emojiLoading:!1,errorMessage:"",isLoading:!1}},methods:{onEmojiSelect(t){this.$emit("emoji-selected",t.native),this.close_on_select&&this.closeAndRefocus()},closeAndRefocus(){var t;(t=this.$refs.fcom_emoji_popover)==null||t.hideAndFocusTrigger()},applyEmojiIndex(){this.emojiIndex=window.fcomEmojiIndex,this.emojiLoading=!1,this.focusSearchInput()},focusSearchInput(){this.$nextTick(()=>{var n,i,s,o;const t=document.activeElement,e=(n=this.$refs.emojiTrigger)==null?void 0:n.$el;t&&t!==document.body&&t!==e&&!t.closest(".ffcom_emoji")||(o=(s=(i=this.$refs.picker)==null?void 0:i.$el)==null?void 0:s.querySelector("input"))==null||o.focus()})},loadEmojiAssets(){if(this.isLoading)return;if(window.fcomEmojiIndex){this.applyEmojiIndex();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 c3e(e),this.applyEmojiIndex()):this.errorMessage=this.$t("Emoji loading failed")}).catch(()=>{this.errorMessage=this.$t("Emoji loading failed")}).finally(()=>{this.isLoading=!1})}}},cke={key:0,class:"emoji-mart emoji-mart-static",style:{width:"320px",padding:"10px 20px"}},uke={key:0},dke={style:{"text-align":"center","margin-bottom":"20px"}},hke={key:1,class:"fcom_emoji_holder"};function fke(t,e,n,i,s,o){const r=H("SmilyIcon"),a=be,l=He,c=Nt,u=H("Picker"),d=H("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(({visible:h})=>[_(l,{ref:"emojiTrigger","aria-label":t.$t("Pick Emoji"),"aria-haspopup":"dialog","aria-expanded":h?"true":"false",onKeydown:ut(f=>h&&o.closeAndRefocus(),["esc"]),text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1})]),_:1},8,["aria-label","aria-expanded","onKeydown"])]),default:w(()=>[g("div",{class:"ffcom_emoji",onKeydown:e[0]||(e[0]=ut(Ee(h=>o.closeAndRefocus(),["prevent","stop"]),["esc"]))},[s.emojiLoading?(v(),A("div",cke,[s.errorMessage?(v(),A("div",uke,x(s.errorMessage),1)):(v(),A(ee,{key:1},[g("div",dke,x(t.$t("Loading...")),1),_(c,{animated:!0,rows:3})],64))])):s.emojiIndex?(v(),A("div",hke,[_(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:o.onEmojiSelect,emojiSize:22,sheetSize:32,emojiTooltip:!1},null,8,["title","i18n","data","onSelect"])])):O("",!0)],32)]),_:1},8,["onShow"])}const UF=ue(lke,[["render",fke]]),pke={name:"LogoEmojiSelector",components:{EmojiPicker:UF,ImageUploader:Ll,SvgShapeGenerator:Bwe,ActionPopover:oa},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"}}},mke=["innerHTML"];function gke(t,e,n,i,s,o){const r=He,a=H("EmojiPicker"),l=ft,c=u2,u=H("SvgShapeGenerator"),d=Wo,h=H("ImageUploader"),f=c2,p=H("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":t.$t("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,mke)]),_:1},8,["aria-label"])]),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%"}},hs({_: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(()=>[N(x(t.$t("Close")),1)]),_:1},8,["onClick"])])]),_:1},8,["width"])}const Z1=ue(pke,[["render",gke]]),vke={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})}}},_ke={key:0,class:"fcom_slug_input_info"},yke=["innerHTML"],bke={key:1,class:"fcom_help_text"};function wke(t,e,n,i,s,o){const r=He,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},hs({_:2},[n.prefix?{name:"prepend",fn:w(()=>[g("span",null,x(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(()=>[N(x(t.$t("change")),1)]),_:1})]),key:"1"}:void 0]),1032,["disabled","readonly","modelValue","placeholder","onInput"]),!s.showEdit&&n.edit_notice?(v(),A("div",_ke,[g("p",{innerHTML:n.edit_notice},null,8,yke)])):O("",!0),n.description?(v(),A("div",bke,[g("p",null,x(n.description),1)])):O("",!0)],64)}const Yd=ue(vke,[["render",wke]]),kke={name:"ErrorAlerts",props:{errors:{type:Array,default:()=>[]},dismissable:{type:Boolean,default:!1}},data(){return{dismissed:!1}},watch:{errors(){this.dismissed=!1}}},Cke={class:"fcom_errors_alert_list"};function xke(t,e,n,i,s,o){const r=sa;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",Cke,[(v(!0),A(ee,null,we(n.errors,(a,l)=>(v(),A("li",{key:l},x(a),1))),128))])]),_:1},8,["closable"])):O("",!0)}const J1=ue(kke,[["render",xke]]),Ske={name:"TopicSelector",props:["modelValue","creatable","space_id"],emits:["update:modelValue"],components:{SlugInput:Yd,ActionPopover:oa,ErrorAlerts:J1},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()}},$ke={class:"fcom_topic_selector"},Ake={key:0,class:"fcom_meta_text"};function Eke(t,e,n,i,s,o){const r=sn,a=Jt,l=H("Plus"),c=be,u=He,d=ft,h=en,f=H("slug-input"),p=H("error-alerts"),m=tn,y=H("action-popover"),b=xt("loading");return v(),A("div",$ke,[Re((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,we(s.topics,k=>(v(),D(r,{key:k.slug,label:k.title,value:k.id},{default:w(()=>[g("span",null,x(k.title),1),k.description?(v(),A("span",Ake,x(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,x(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(()=>[N(x(t.$t("Create")),1)]),_:1},8,["onClick","loading"])]),_:2},1024)]),_:2},1032,["modelValue"])]),_:1},8,["onShow"])):O("",!0)])}const jF=ue(Ske,[["render",Eke]]),Mke={name:"ListViewIcon"},Tke={width:"160",height:"158",viewBox:"0 0 160 158",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Pke(t,e,n,i,s,o){return v(),A("svg",Tke,[...e[0]||(e[0]=[Ra('<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)])])}const Ike=ue(Mke,[["render",Pke]]),Lke={name:"TimelineViewIcon"},Oke={width:"160",height:"158",viewBox:"0 0 160 158",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Dke(t,e,n,i,s,o){return v(),A("svg",Oke,[...e[0]||(e[0]=[Ra('<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)])])}const Rke=ue(Lke,[["render",Dke]]),Vke={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 Fke(t,e,n,i,s,o){const r=sn,a=Jt,l=xt("loading");return Re((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,we(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 F8=ue(Vke,[["render",Fke]]),Nke={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)}}},Bke={class:"fcom_form_builder"},zke=["innerHTML"],Hke={key:8},Uke={key:9,class:"fcom_help_text"},jke=["innerHTML"];function Wke(t,e,n,i,s,o){const r=ft,a=Li,l=ws,c=sn,u=Jt,d=Yt,h=s2,f=Wd,p=Qc,m=en,y=He,b=tn;return v(),A("div",Bke,[_(b,{"label-position":"top",model:n.formData,onSubmit:Ee(t.doNothing,["prevent"])},{default:w(()=>[(v(!0),A(ee,null,we(n.formFields,(k,C)=>(v(),D(m,{key:t.index,label:k.label},hs({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,we(k.options,($,S)=>(v(),D(a,{key:S,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,we(k.options,($,S)=>(v(),D(c,{key:S,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,we(k.options,($,S)=>(v(),D(d,{key:S,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(()=>[N(x(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,zke)):(v(),A("div",Hke,[g("pre",null,x(k),1)])),k.help_text?(v(),A("div",Uke,[g("p",{innerHTML:k.help_text},null,8,jke)])):O("",!0)]),_:2},[k.label?{name:"label",fn:w(()=>[N(x(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:Ee(o.handleSubmit,["prevent"])},{default:w(()=>[N(x(n.submitButtonText),1)]),_:1},8,["onClick"])]),_:1}))]),_:1},8,["model","onSubmit"])])}const WF=ue(Nke,[["render",Wke]]),Yke={name:"CardViewIcon"},qke={xmlns:"http://www.w3.org/2000/svg",width:"160",height:"158",viewBox:"0 0 160 158",fill:"none"};function Gke(t,e,n,i,s,o){return v(),A("svg",qke,[...e[0]||(e[0]=[Ra('<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)])])}const Xke=ue(Yke,[["render",Gke]]),Kke={name:"CreateSpaceForm",emits:["completed"],components:{SpaceGroupSelector:F8,SlugInput:Yd,ImageUploader:Ll,LogoEmojiSelector:Z1,TopicSelector:jF,ListViewIcon:Ike,TimelineViewIcon:Rke,FormBuilder:WF,ErrorAlerts:J1,CardViewIcon:Xke},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:Ewe,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}},Zke={key:0},Jke={class:"fcom_form_section"},Qke={class:"fcom_help_text"},eCe={class:"fcom_form_section"},tCe={style:{"font-weight":"bold"}},nCe=["innerHTML"],sCe={key:0},iCe={class:"fcom_help_text"},oCe={key:0},rCe={key:1,class:"fcom_form_section"},aCe={class:"fcom_lined_checkboxes"},lCe={key:0,class:"fcom_pro_feature"},cCe={key:0,class:"fcom_feature_nested"},uCe={key:0,class:"fcom_pro_feature"},dCe={key:1,class:"fcom_feature_nested"},hCe={class:"fcom_form_section"},fCe={class:"fcom_svg_radio_item"},pCe={class:"svg_radio_label"},mCe={class:"fcom_svg_radio_item"},gCe={class:"svg_radio_label"},vCe={class:"fcom_svg_radio_item"},_Ce={class:"svg_radio_label"},yCe={class:"fcom_help_text"},bCe={key:0},wCe={key:1},kCe={class:"fcom_form_section"},CCe={class:"fcom_help_text"},xCe=["href"],SCe={class:"fcom_image_uploader_wrapper"},$Ce={class:"fcom_help_text"},ACe={class:"fcom_image_uploader_wrapper"},ECe={class:"fcom_help_text"},MCe={class:"fcom_space_form_bottom"},TCe={class:"fcom_space_form_bottom"},PCe={key:0},ICe={class:"fcom_form_section fcom_mt_20"};function LCe(t,e,n,i,s,o){const r=H("logo-emoji-selector"),a=ft,l=en,c=H("SlugInput"),u=H("space-group-selector"),d=sn,h=Jt,f=Li,p=ws,m=Yt,y=H("TimelineViewIcon"),b=H("ListViewIcon"),k=H("CardViewIcon"),C=H("topic-selector"),$=Wo,S=H("EditPen"),M=be,P=He,T=H("Delete"),I=H("ImageUploader"),L=H("error-alerts"),R=tn,V=H("form-builder"),B=xt("loading");return v(),A("div",null,[_(R,{onSubmit:e[32]||(e[32]=Ee(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",Zke,x(t.$t("Basic Info")),1)),g("div",Jke,[g("h4",null,x(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]=U=>{s.form.settings.emoji=U.emoji,s.form.logo=U.logo,s.form.settings.shape_svg=U.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",Qke,[g("p",null,x(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",eCe,[g("h4",null,x(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,we(s.privacies,(F,z)=>(v(),D(d,{key:z,label:F.label,value:z},{default:w(()=>[g("span",tCe,x(t.$labelize(F.label)),1),g("p",{innerHTML:F.description},null,8,nCe)]),_: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(()=>[N(x(t.$t("Custom Lock Screen")),1)]),_:1}),_(f,{value:"no"},{default:w(()=>[N(x(t.$t("Default Lock Screen")),1)]),_:1}),_(f,{disabled:!t.has_pro,value:"redirect"},{default:w(()=>[N(x(t.$t("Redirect to an URL"))+" ",1),t.has_pro?O("",!0):(v(),A("span",sCe,x(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",iCe,[g("p",null,x(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(()=>[N(x(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(()=>[N(x(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",oCe,x(t.$t("Customization")),1)),s.form.settings?(v(),A("div",rCe,[g("h4",null,x(t.$t("Features Customizations")),1),_(l,null,{default:w(()=>[g("div",aCe,[_(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(()=>[N(x(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(()=>[N(x(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(()=>[N(x(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(()=>[N(x(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(()=>[N(x(t.$t("Enable File/Document Library for this space"))+" ",1),t.has_pro?O("",!0):(v(),A("span",lCe," ("+x(t.$t("Pro Feature"))+") ",1))]),_:1},8,["disabled","modelValue"]),s.form.settings.document_library=="yes"?(v(),A("div",cCe,[_(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(()=>[N(x(t.$t("Members of this space")),1)]),_:1}),_(f,{value:"logged_in"},{default:w(()=>[N(x(t.$t("Any Logged in users")),1)]),_:1}),_(f,{value:"everybody"},{default:w(()=>[N(x(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(()=>[N(x(t.$t("Any Members")),1)]),_:1}),_(f,{value:"admin_only"},{default:w(()=>[N(x(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(()=>[N(x(t.$t("Enable Media Gallery for this space"))+" ",1),t.has_pro?O("",!0):(v(),A("span",uCe," ("+x(t.$t("Pro Feature"))+") ",1))]),_:1},8,["disabled","modelValue"]),t.has_pro&&s.form.settings.media_gallery=="yes"?(v(),A("div",dCe,[_(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(()=>[N(x(t.$t("Members of this space")),1)]),_:1}),_(f,{value:"logged_in"},{default:w(()=>[N(x(t.$t("Any Logged in users")),1)]),_:1}),_(f,{value:"everybody"},{default:w(()=>[N(x(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,we(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(()=>[N(x(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,we(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",hCe,[g("h4",null,x(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",fCe,[_(f,{value:"timeline"},{default:w(()=>[_(y,{style:{width:"100px",height:"auto"}}),g("p",pCe,x(t.$t("Timeline")),1)]),_:1})]),g("div",mCe,[_(f,{value:"list"},{default:w(()=>[_(b,{style:{width:"100px",height:"auto"}}),g("p",gCe,x(t.$t("List")),1)]),_:1})]),g("div",vCe,[_(f,{value:"card"},{default:w(()=>[_(k,{style:{width:"100px",height:"auto"}}),g("p",_Ce,x(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(()=>[N(x(t.$t("Disable Layout Style Change Option")),1)]),_:1},8,["modelValue"]),g("div",yCe,[s.form.settings.disable_layout_style==="yes"?(v(),A("p",bCe,x(t.$t("The selected layout will be applied for all members. They cannot switch to a different view.")),1)):(v(),A("p",wCe,x(t.$t("User can change the layout style to their own preference.")),1))])]),_:1})]),g("div",kCe,[g("h4",null,x(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",CCe,[g("p",null,[N(x(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")},x(t.$t("Manage all topics.")),9,xCe)):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(()=>[N(x(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(()=>[N(x(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",SCe,[_(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})},hs({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(()=>[_(S)]),_:1})]),_:1},8,["aria-label"])]),key:"0"}:void 0]),1032,["can_remove"])]),g("div",$Ce,[g("p",null,x(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",ACe,[_(I,{isTextBtn:!1,removeIcon:!0,can_remove:!!s.form.cover_photo,confirm_remove:!0,additionalData:{resize:!0,max_width:1600},onUploaded:o.handleCoverPhotoUpload},hs({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(()=>[_(S)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove","onUploaded"])]),g("div",ECe,[g("p",null,x(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",MCe,[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,x(t.$t("Go Back")),1)]),_:1})):O("",!0),Re((v(),D(P,{class:"fcom_primary_button",disabled:s.saving,onClick:e[30]||(e[30]=F=>o.submit())},{default:w(()=>[g("span",null,x(t.$t("Create")),1)]),_:1},8,["disabled"])),[[B,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",TCe,[e[34]||(e[34]=g("span",null,null,-1)),_(P,{onClick:e[31]||(e[31]=F=>o.goToCustomization()),class:"fcom_primary_button"},{default:w(()=>[g("span",null,x(t.$t("Next")),1)]),_:1})])]),_:1})],64))]),_:1},8,["modelValue"]),Re((v(),A("div",null,[s.metaSettings&&Object.keys(s.metaSettings).length>0?(v(),A("div",PCe,[(v(!0),A(ee,null,we(s.metaSettings,F=>(v(),A("div",ICe,[g("h4",null,x(F.section_title),1),_(V,{formData:F.settings,formFields:F.fields,disableSubmit:!0},null,8,["formData","formFields"])]))),256))])):O("",!0)])),[[B,s.fetchingMetaBoxes]])])}const N8=ue(Kke,[["render",LCe]]);var yo=(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))(yo||{});let qo=class extends Error{constructor(e,n){super(n),this.name="MilkdownError",this.code=e}};const OCe=(t,e)=>typeof e=="function"?"[Function]":e,Kf=t=>JSON.stringify(t,OCe);function DCe(t){return new qo(yo.docTypeError,`Doc type error, unsupported type: ${Kf(t)}`)}function RCe(t){return new qo(yo.contextNotFound,`Context "${t}" not found, do you forget to inject it?`)}function VCe(t){return new qo(yo.timerNotFound,`Timer "${t}" not found, do you forget to record it?`)}function B8(){return new qo(yo.ctxCallOutOfScope,"Should not call a context out of the plugin.")}function FCe(...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?Kf(o.toJSON()):o.spec?Kf(o.spec):o.toString();return`${n}, ${s(i)}`},"Create prosemirror node from remark failed in parser");return new qo(yo.createNodeInParserFail,e)}function YF(){return new qo(yo.stackOverFlow,"Stack over flow, cannot pop on an empty stack.")}function NCe(t){return new qo(yo.parserMatchError,`Cannot match target parser for node: ${Kf(t)}.`)}function BCe(t){return new qo(yo.serializerMatchError,`Cannot match target serializer for node: ${Kf(t)}.`)}function zCe(t,e){return new qo(yo.getAtomFromSchemaFail,`Cannot get ${t}: ${e} from schema.`)}function ra(t){return new qo(yo.expectDomTypeError,`Expect to be a dom, but get: ${Kf(t)}.`)}function HCe(){return new qo(yo.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 qF(t){return new qo(yo.missingNodeInSchema,`Missing node in schema, milkdown cannot find "${t}" in schema.`)}function UCe(t){return new qo(yo.missingMarkInSchema,`Missing mark in schema, milkdown cannot find "${t}" in schema.`)}var GF=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},kt=(t,e,n)=>(GF(t,e,"read from private field"),n?n.call(t):e.get(t)),vs=(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)},xn=(t,e,n,i)=>(GF(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);let XF=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 RCe(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 ha,Kl,im;let jCe=class{constructor(e,n,i){vs(this,ha,void 0),vs(this,Kl,void 0),vs(this,im,void 0),xn(this,ha,[]),xn(this,im,()=>{kt(this,ha).forEach(s=>s(kt(this,Kl)))}),this.set=s=>{xn(this,Kl,s),kt(this,im).call(this)},this.get=()=>kt(this,Kl),this.update=s=>{xn(this,Kl,s(kt(this,Kl))),kt(this,im).call(this)},this.type=i,xn(this,Kl,n),e.set(i.id,this)}on(e){return kt(this,ha).push(e),()=>{xn(this,ha,kt(this,ha).filter(n=>n!==e))}}once(e){const n=this.on(i=>{e(i),n()});return n}off(e){xn(this,ha,kt(this,ha).filter(n=>n!==e))}offAll(){xn(this,ha,[])}};ha=new WeakMap,Kl=new WeakMap,im=new WeakMap;let WCe=class{constructor(e,n){this.id=Symbol(`Context-${n}`),this.name=n,this._defaultValue=e,this._typeInfo=()=>{throw B8()}}create(e,n=this._defaultValue){return new jCe(e,n,this)}};const kn=(t,e)=>new WCe(t,e);var z0,H0,U0,Th,om,Cu,rm,am,lm;let YCe=class{constructor(e,n,i){vs(this,z0,void 0),vs(this,H0,void 0),vs(this,U0,void 0),vs(this,Th,void 0),vs(this,om,void 0),vs(this,Cu,void 0),vs(this,rm,void 0),vs(this,am,void 0),vs(this,lm,void 0),xn(this,Th,new Set),xn(this,om,new Set),xn(this,Cu,new Map),xn(this,rm,new Map),this.read=()=>({metadata:kt(this,z0),injectedSlices:[...kt(this,Th)].map(s=>({name:typeof s=="string"?s:s.name,value:kt(this,am).call(this,s)})),consumedSlices:[...kt(this,om)].map(s=>({name:typeof s=="string"?s:s.name,value:kt(this,am).call(this,s)})),recordedTimers:[...kt(this,Cu)].map(([s,{duration:o}])=>({name:s.name,duration:o,status:kt(this,lm).call(this,s)})),waitTimers:[...kt(this,rm)].map(([s,{duration:o}])=>({name:s.name,duration:o,status:kt(this,lm).call(this,s)}))}),this.onRecord=s=>{kt(this,Cu).set(s,{start:Date.now(),duration:0})},this.onClear=s=>{kt(this,Cu).delete(s)},this.onDone=s=>{const o=kt(this,Cu).get(s);o&&(o.duration=Date.now()-o.start)},this.onWait=(s,o)=>{const r=Date.now();o.finally(()=>{kt(this,rm).set(s,{duration:Date.now()-r})})},this.onInject=s=>{kt(this,Th).add(s)},this.onRemove=s=>{kt(this,Th).delete(s)},this.onUse=s=>{kt(this,om).add(s)},xn(this,am,s=>kt(this,H0).get(s).get()),xn(this,lm,s=>kt(this,U0).get(s).status),xn(this,H0,e),xn(this,U0,n),xn(this,z0,i)}};z0=new WeakMap,H0=new WeakMap,U0=new WeakMap,Th=new WeakMap,om=new WeakMap,Cu=new WeakMap,rm=new WeakMap,am=new WeakMap,lm=new WeakMap;var Zl,Jl,j0,Mr;const qCe=class KF{constructor(e,n,i){vs(this,Zl,void 0),vs(this,Jl,void 0),vs(this,j0,void 0),vs(this,Mr,void 0),this.produce=s=>s&&Object.keys(s).length?new KF(kt(this,Zl),kt(this,Jl),{...s}):this,this.inject=(s,o)=>{var r;const a=s.create(kt(this,Zl).sliceMap);return o!=null&&a.set(o),(r=kt(this,Mr))==null||r.onInject(s),this},this.remove=s=>{var o;return kt(this,Zl).remove(s),(o=kt(this,Mr))==null||o.onRemove(s),this},this.record=s=>{var o;return s.create(kt(this,Jl).store),(o=kt(this,Mr))==null||o.onRecord(s),this},this.clearTimer=s=>{var o;return kt(this,Jl).remove(s),(o=kt(this,Mr))==null||o.onClear(s),this},this.isInjected=s=>kt(this,Zl).has(s),this.isRecorded=s=>kt(this,Jl).has(s),this.use=s=>{var o;return(o=kt(this,Mr))==null||o.onUse(s),kt(this,Zl).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=>kt(this,Jl).get(s),this.done=s=>{var o;this.timer(s).done(),(o=kt(this,Mr))==null||o.onDone(s)},this.wait=s=>{var o;const r=this.timer(s).start();return(o=kt(this,Mr))==null||o.onWait(s,r),r},this.waitTimers=async s=>{await Promise.all(this.get(s).map(o=>this.wait(o)))},xn(this,Zl,e),xn(this,Jl,n),xn(this,j0,i),i&&xn(this,Mr,new YCe(e,n,i))}get meta(){return kt(this,j0)}get inspector(){return kt(this,Mr)}};Zl=new WeakMap,Jl=new WeakMap,j0=new WeakMap,Mr=new WeakMap;let GCe=qCe,XCe=class{constructor(){this.store=new Map,this.get=e=>{const n=this.store.get(e.id);if(!n)throw VCe(e.name);return n},this.remove=e=>{this.store.delete(e.id)},this.has=e=>this.store.has(e.id)}};var Ph,xu,cm,Ql,um,W0;let KCe=class{constructor(e,n){vs(this,Ph,void 0),vs(this,xu,void 0),vs(this,cm,void 0),vs(this,Ql,void 0),vs(this,um,void 0),vs(this,W0,void 0),xn(this,Ph,null),xn(this,xu,null),xn(this,Ql,"pending"),this.start=()=>(kt(this,Ph)??xn(this,Ph,new Promise((i,s)=>{xn(this,xu,o=>{o instanceof CustomEvent&&o.detail.id===kt(this,cm)&&(xn(this,Ql,"resolved"),kt(this,um).call(this),o.stopImmediatePropagation(),i())}),kt(this,W0).call(this,()=>{kt(this,Ql)==="pending"&&xn(this,Ql,"rejected"),kt(this,um).call(this),s(new Error(`Timing ${this.type.name} timeout.`))}),xn(this,Ql,"pending"),addEventListener(this.type.name,kt(this,xu))})),kt(this,Ph)),this.done=()=>{const i=new CustomEvent(this.type.name,{detail:{id:kt(this,cm)}});dispatchEvent(i)},xn(this,um,()=>{kt(this,xu)&&removeEventListener(this.type.name,kt(this,xu))}),xn(this,W0,i=>{setTimeout(()=>{i()},this.type.timeout)}),xn(this,cm,Symbol(n.name)),this.type=n,e.set(n.id,this)}get status(){return kt(this,Ql)}};Ph=new WeakMap,xu=new WeakMap,cm=new WeakMap,Ql=new WeakMap,um=new WeakMap,W0=new WeakMap;let ZCe=class{constructor(e,n=3e3){this.create=i=>new KCe(i,this),this.id=Symbol(`Timer-${e}`),this.name=e,this.timeout=n}};const nu=(t,e=3e3)=>new ZCe(t,e);function Js(t){this.content=t}Js.prototype={constructor:Js,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 Js(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 Js(n)},addToStart:function(t,e){return new Js([t,e].concat(this.remove(t).content))},addToEnd:function(t,e){var n=this.remove(t).content.slice();return n.push(t,e),new Js(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 Js(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=Js.from(t),t.size?new Js(t.content.concat(this.subtract(t).content)):this},append:function(t){return t=Js.from(t),t.size?new Js(this.subtract(t).content.concat(t.content)):this},subtract:function(t){var e=this;t=Js.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}};Js.from=function(t){if(t instanceof Js)return t;var e=[];if(t)for(var n in t)e.push(n,t[n]);return new Js(e)};function ZF(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=ZF(s.content,o.content,n+1);if(r!=null)return r}n+=s.nodeSize}}function JF(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=JF(r.content,a.content,n-1,i-1);if(c)return c}n-=l,i-=l}}let st=class Fi{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 Fi(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 Fi(i,s)}cutByIndex(e,n){return e==n?Fi.empty:e==0&&n==this.content.length?this:new Fi(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 Fi(s,o)}addToStart(e){return new Fi([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Fi(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 ZF(this,e,n)}findDiffEnd(e,n=this.size,i=e.size){return JF(this,e,n,i)}findIndex(e,n=-1){if(e==0)return r0(0,e);if(e==this.size)return r0(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?r0(i+1,r):r0(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 Fi.empty;if(!Array.isArray(n))throw new RangeError("Invalid input for Fragment.fromJSON");return new Fi(n.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Fi.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 Fi(n||e,i)}static from(e){if(!e)return Fi.empty;if(e instanceof Fi)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Fi([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}};st.empty=new st([],0);const Xw={index:0,offset:0};function r0(t,e){return Xw.index=t,Xw.offset=e,Xw}function Iy(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(!Iy(t[i],e[i]))return!1}else{for(let i in t)if(!(i in e)||!Iy(t[i],e[i]))return!1;for(let i in e)if(!(i in t))return!1}return!0}let En=class RC{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&&Iy(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 RC.none;if(e instanceof RC)return[e];let n=e.slice();return n.sort((i,s)=>i.type.rank-s.type.rank),n}};En.none=[];class Ly 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=eN(this.content,e+this.openStart,n);return i&&new rt(i,this.openStart,this.openEnd)}removeBetween(e,n){return new rt(QF(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(st.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(st.empty,0,0);function QF(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(QF(o.content,e-s-1,n-s-1)))}function eN(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=eN(r.content,e-o-1,n);return a&&t.replaceChild(s,r.copy(a))}function JCe(t,e,n){if(n.openStart>t.depth)throw new Ly("Inserted content deeper than insertion position");if(t.depth-n.openStart!=e.depth-n.openEnd)throw new Ly("Inconsistent open depths");return tN(t,e,n,0)}function tN(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=tN(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 nd(r,a.cut(0,t.parentOffset).append(n.content).append(a.cut(e.parentOffset)))}else{let{start:r,end:a}=QCe(n,t);return nd(o,sN(t,r,a,e,i))}else return nd(o,Oy(t,e,i))}function nN(t,e){if(!e.type.compatibleContent(t.type))throw new Ly("Cannot join "+e.type.name+" onto "+t.type.name)}function VC(t,e,n){let i=t.node(n);return nN(i,e.node(n)),i}function td(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 og(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&&(td(t.nodeAfter,i),o++));for(let a=o;a<r;a++)td(s.child(a),i);e&&e.depth==n&&e.textOffset&&td(e.nodeBefore,i)}function nd(t,e){return t.type.checkContent(e),t.copy(e)}function sN(t,e,n,i,s){let o=t.depth>s&&VC(t,e,s+1),r=i.depth>s&&VC(n,i,s+1),a=[];return og(null,t,s,a),o&&r&&e.index(s)==n.index(s)?(nN(o,r),td(nd(o,sN(t,e,n,i,s+1)),a)):(o&&td(nd(o,Oy(t,e,s+1)),a),og(e,n,s,a),r&&td(nd(r,Oy(n,i,s+1)),a)),og(i,null,s,a),new st(a)}function Oy(t,e,n){let i=[];if(og(null,t,n,i),t.depth>n){let s=VC(t,e,n+1);td(nd(s,Oy(t,e,n+1)),i)}return og(e,null,n,i),new st(i)}function QCe(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(st.from(s));return{start:s.resolveNoCache(t.openStart+n),end:s.resolveNoCache(s.content.size-t.openEnd-n)}}class r1{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 iN(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 r1(n,i,o)}static resolveCached(e,n){let i=tE.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 tE.set(e,i=new exe);let s=i.elts[i.i]=r1.resolve(e,n);return i.i=(i.i+1)%txe,s}}class exe{constructor(){this.elts=[],this.i=0}}const txe=12,tE=new WeakMap;class iN{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 nxe=Object.create(null);let Tc=class FC{constructor(e,n,i,s=En.none){this.type=e,this.attrs=n,this.marks=s,this.content=i||st.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&&Iy(this.attrs,n||e.defaultAttrs||nxe)&&En.sameSet(this.marks,i||En.none)}copy(e=null){return e==this.content?this:new FC(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new FC(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 JCe(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 r1.resolveCached(this,e)}resolveNoCache(e){return r1.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()+")"),oN(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=st.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=st.fromJSON(e,n.content),o=e.nodeType(n.type).create(n.attrs,s,i);return o.type.checkAttrs(o.attrs),o}};Tc.prototype.text=void 0;class Dy extends Tc{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):oN(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 Dy(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new Dy(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 oN(t,e){for(let n=t.length-1;n>=0;n--)e=t[n].type.name+"("+e+")";return e}class Cd{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,n){let i=new sxe(e,n);if(i.next==null)return Cd.empty;let s=rN(i);i.next&&i.err("Unexpected trailing text");let o=uxe(cxe(s));return dxe(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 st.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(` | |
| 82 | +`)}}Cd.empty=new Cd(!0);class sxe{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 rN(t){let e=[];do e.push(ixe(t));while(t.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function ixe(t){let e=[];do e.push(oxe(t));while(t.next&&t.next!=")"&&t.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function oxe(t){let e=lxe(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=rxe(t,e);else break;return e}function nE(t){/\D/.test(t.next)&&t.err("Expected number, got '"+t.next+"'");let e=Number(t.next);return t.pos++,e}function rxe(t,e){let n=nE(t),i=n;return t.eat(",")&&(t.next!="}"?i=nE(t):i=-1),t.eat("}")||t.err("Unclosed braced range"),{type:"range",min:n,max:i,expr:e}}function axe(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 lxe(t){if(t.eat("(")){let e=rN(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=axe(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 cxe(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 aN(t,e){return e-t}function sE(t,e){let n=[];return i(e),n.sort(aN);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 uxe(t){let e=Object.create(null);return n(sE(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]);sE(t,l).forEach(u=>{c||s.push([a,c=[]]),c.indexOf(u)==-1&&c.push(u)})})});let o=e[i.join(",")]=new Cd(i.indexOf(t.length-1)>-1);for(let r=0;r<s.length;r++){let a=s[r][1].sort(aN);o.next.push({type:s[r][0],next:e[a.join(",")]||n(a)})}return o}}function dxe(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 lN(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 cN(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 uN(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 dN(t,e){let n=Object.create(null);if(e)for(let i in e)n[i]=new fxe(t,i,e[i]);return n}let Ry=class hN{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=dN(e,i.attrs),this.defaultAttrs=lN(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==Cd.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:cN(this.attrs,e)}create(e=null,n,i){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Tc(this,this.computeAttrs(e),st.from(n),En.setFrom(i))}createChecked(e=null,n,i){return n=st.from(n),this.checkContent(n),new Tc(this,this.computeAttrs(e),n,En.setFrom(i))}createAndFill(e=null,n,i){if(e=this.computeAttrs(e),n=st.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(st.empty,!0);return o?new Tc(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){uN(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 hN(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 hxe(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 fxe{constructor(e,n,i){this.hasDefault=Object.prototype.hasOwnProperty.call(i,"default"),this.default=i.default,this.validate=typeof i.validate=="string"?hxe(e,n,i.validate):i.validate}get isRequired(){return!this.hasDefault}}class f2{constructor(e,n,i,s){this.name=e,this.rank=n,this.schema=i,this.spec=s,this.attrs=dN(e,s.attrs),this.excluded=null;let o=lN(this.attrs);this.instance=o?new En(this,o):null}create(e=null){return!e&&this.instance?this.instance:new En(this,cN(this.attrs,e))}static compile(e,n){let i=Object.create(null),s=0;return e.forEach((o,r)=>i[o]=new f2(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){uN(this.attrs,e,"mark",this.name)}excludes(e){return this.excluded.indexOf(e)>-1}}class pxe{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=Js.from(e.nodes),n.marks=Js.from(e.marks||{}),this.nodes=Ry.compile(this.spec.nodes,this),this.marks=f2.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]=Cd.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?iE(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==""?[]:iE(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 Ry){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 Dy(i,i.defaultAttrs,e,En.setFrom(n))}mark(e,n){return typeof e=="string"&&(e=this.marks[e]),e.create(n)}nodeFromJSON(e){return Tc.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 iE(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 mxe(t){return t.tag!=null}function gxe(t){return t.style!=null}let p2=class NC{constructor(e,n){this.schema=e,this.rules=n,this.tags=[],this.styles=[];let i=this.matchedStyles=[];n.forEach(s=>{if(mxe(s))this.tags.push(s);else if(gxe(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 rE(this,n,!1);return i.addAll(e,En.none,n.from,n.to),i.finish()}parseSlice(e,n={}){let i=new rE(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(yxe(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=aE(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=aE(r)),r.node||r.ignore||r.mark||(r.node=s)})}return n}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new NC(e,NC.schemaRules(e)))}};const fN={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},vxe={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},pN={ol:!0,ul:!0},Vy=1,Fy=2,rg=4;function oE(t,e,n){return e!=null?(e?Vy:0)|(e==="full"?Fy:0):t&&t.whitespace=="pre"?Vy|Fy:n&~rg}class a0{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&rg?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let n=this.type.contentMatch.fillBefore(st.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&Vy)){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=st.from(this.content);return!e&&this.match&&(n=n.append(this.match.fillBefore(st.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&&!fN.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class rE{constructor(e,n,i){this.parser=e,this.options=n,this.isOpen=i,this.open=0;let s=n.topNode,o,r=oE(null,n.preserveWhitespace,0)|(i?rg:0);s?o=new a0(s.type,s.attrs,En.none,!0,n.topMatch||s.type.contentMatch,r):i?o=new a0(null,null,En.none,!0,null,r):o=new a0(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&Fy||s.inlineContext(e)||/[^ \t\r\n\u000c]/.test(i)){if(s.options&Vy)s.options&Fy?i=i.replace(/\r\n?/g,` | |
| 83 | +`):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;pN.hasOwnProperty(s)&&this.parser.normalizeLists&&_xe(e);let r=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,i));if(r?r.ignore:vxe.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(fN.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(` | |
| 84 | +`),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):lE(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=oE(e,o,r.options);r.options&rg&&r.content.length==0&&(a|=rg);let l=En.none;return i=i.filter(c=>(r.type?r.type.allowsMarkType(c.type):lE(c.type,e))?(l=c.addToSet(l),!1):!0),this.nodes.push(new a0(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 _xe(t){for(let e=t.firstChild,n=null;e;e=e.nextSibling){let i=e.nodeType==1?e.nodeName.toLowerCase():null;i&&pN.hasOwnProperty(i)&&n?(n.appendChild(e),e=n):i=="li"?n=e:i&&(n=null)}}function yxe(t,e){return(t.matches||t.msMatchesSelector||t.webkitMatchesSelector||t.mozMatchesSelector).call(t,e)}function aE(t){let e={};for(let n in t)e[n]=t[n];return e}function lE(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 su{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}=Y0(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&&Y0(Kw(i),s(e,n),null,e.attrs)}static renderSpec(e,n,i=null,s){return Y0(e,n,i,s)}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new su(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let n=cE(e.nodes);return n.text||(n.text=i=>i.text),n}static marksFromSchema(e){return cE(e.marks)}}function cE(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 uE=new WeakMap;function bxe(t){let e=uE.get(t);return e===void 0&&uE.set(t,e=wxe(t)),e}function wxe(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 Y0(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=bxe(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}=Y0(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 kxe={};function z8(t,e){const n=e||kxe,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return mN(t,i,s)}function mN(t,e,n){if(Cxe(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 dE(t.children,e,n)}return Array.isArray(t)?dE(t,e,n):""}function dE(t,e,n){const i=[];let s=-1;for(;++s<t.length;)i[s]=mN(t[s],e,n);return i.join("")}function Cxe(t){return!!(t&&typeof t=="object")}const hE=document.createElement("i");function H8(t){const e="&"+t+";";hE.innerHTML=e;const n=hE.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function pr(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 rr(t,e){return t.length>0?(pr(t,t.length,0,e),t):e}const fE={}.hasOwnProperty;function gN(t){const e={};let n=-1;for(;++n<t.length;)xxe(e,t[n]);return e}function xxe(t,e){let n;for(n in e){const s=(fE.call(t,n)?t[n]:void 0)||(t[n]={}),o=e[n];let r;if(o)for(r in o){fE.call(s,r)||(s[r]=[]);const a=o[r];Sxe(s[r],Array.isArray(a)?a:a?[a]:[])}}}function Sxe(t,e){let n=-1;const i=[];for(;++n<e.length;)(e[n].add==="after"?t:i).push(e[n]);pr(t,0,0,i)}function vN(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 Ur(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Hi=iu(/[A-Za-z]/),co=iu(/[\dA-Za-z]/),$xe=iu(/[#-'*+\--9=?A-Z^-~]/);function Ny(t){return t!==null&&(t<32||t===127)}const BC=iu(/\d/),Axe=iu(/[\dA-Fa-f]/),Exe=iu(/[!-/:-@[-`{-~]/);function Et(t){return t!==null&&t<-2}function jn(t){return t!==null&&(t<0||t===32)}function un(t){return t===-2||t===-1||t===32}const m2=iu(/\p{P}|\p{S}/u),xd=iu(/\s/);function iu(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function _n(t,e,n,i){const s=i?i-1:Number.POSITIVE_INFINITY;let o=0;return r;function r(l){return un(l)?(t.enter(n),a(l)):e(l)}function a(l){return un(l)&&o++<s?(t.consume(l),a):(t.exit(n),e(l))}}const Mxe={tokenize:Txe};function Txe(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"),_n(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 Pxe={tokenize:Ixe},pE={tokenize:Lxe};function Ixe(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 S=$,M;for(;S--;)if(e.events[S][0]==="exit"&&e.events[S][1].type==="chunkFlow"){M=e.events[S][1].end;break}b(i);let P=$;for(;P<e.events.length;)e.events[P][1].end=Object.assign({},M),P++;return pr(e.events,S+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(pE,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(pE,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 S=e.sliceStream(C);if($&&S.push(null),C.previous=o,o&&(o.next=C),o=C,s.defineSkip(C.start),s.write(S),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++;pr(e.events,T+1,0,e.events.slice(P)),e.events.length=M}}function b(C){let $=n.length;for(;$-- >C;){const S=n[$];e.containerState=S[1],S[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 Lxe(t,e,n){return _n(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function By(t){if(t===null||jn(t)||xd(t))return 1;if(m2(t))return 2}function g2(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 zC={name:"attention",tokenize:Dxe,resolveAll:Oxe};function Oxe(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);mE(d,-l),mE(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=rr(c,[["enter",t[i][1],e],["exit",t[i][1],e]])),c=rr(c,[["enter",s,e],["enter",r,e],["exit",r,e],["enter",o,e]]),c=rr(c,g2(e.parser.constructs.insideSpan.null,t.slice(i+1,n),e)),c=rr(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=rr(c,[["enter",t[n][1],e],["exit",t[n][1],e]])):u=0,pr(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 Dxe(t,e){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,s=By(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=By(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 mE(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const Rxe={name:"autolink",tokenize:Vxe};function Vxe(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 Hi(f)?(t.consume(f),r):f===64?n(f):c(f)}function r(f){return f===43||f===45||f===46||co(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||co(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||Ny(f)?n(f):(t.consume(f),l)}function c(f){return f===64?(t.consume(f),u):$xe(f)?(t.consume(f),c):n(f)}function u(f){return co(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||co(f))&&i++<63){const p=f===45?h:d;return t.consume(f),p}return n(f)}}const Q1={tokenize:Fxe,partial:!0};function Fxe(t,e,n){return i;function i(o){return un(o)?_n(t,s,"linePrefix")(o):s(o)}function s(o){return o===null||Et(o)?e(o):n(o)}}const _N={name:"blockQuote",tokenize:Nxe,continuation:{tokenize:Bxe},exit:zxe};function Nxe(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 un(r)?(t.enter("blockQuotePrefixWhitespace"),t.consume(r),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(r))}}function Bxe(t,e,n){const i=this;return s;function s(r){return un(r)?_n(t,o,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(r):o(r)}function o(r){return t.attempt(_N,e,n)(r)}}function zxe(t){t.exit("blockQuote")}const yN={name:"characterEscape",tokenize:Hxe};function Hxe(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 Exe(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(o)}}const bN={name:"characterReference",tokenize:Uxe};function Uxe(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=co,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=Axe,u):(t.enter("characterReferenceValue"),o=7,r=BC,u(d))}function u(d){if(d===59&&s){const h=t.exit("characterReferenceValue");return r===co&&!H8(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 gE={tokenize:Wxe,partial:!0},vE={name:"codeFenced",tokenize:jxe,concrete:!0};function jxe(t,e,n){const i=this,s={tokenize:S,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"),un(M)?_n(t,d,"whitespace")(M):d(M))}function d(M){return M===null||Et(M)?(t.exit("codeFencedFence"),i.interrupt?e(M):t.check(gE,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)):un(M)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),_n(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&&un(M)?_n(t,k,"linePrefix",o+1)(M):k(M)}function k(M){return M===null||Et(M)?t.check(gE,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 S(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"),un(z)?_n(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"),B(z)):T(z)}function B(z){return z===a?(I++,M.consume(z),B):I>=r?(M.exit("codeFencedFenceSequence"),un(z)?_n(M,F,"whitespace")(z):F(z)):T(z)}function F(z){return z===null||Et(z)?(M.exit("codeFencedFence"),P(z)):T(z)}}}function Wxe(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 Zw={name:"codeIndented",tokenize:qxe},Yxe={tokenize:Gxe,partial:!0};function qxe(t,e,n){const i=this;return s;function s(c){return t.enter("codeIndented"),_n(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(Yxe,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 Gxe(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):_n(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 Xxe={name:"codeText",tokenize:Jxe,resolve:Kxe,previous:Zxe};function Kxe(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 Zxe(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Jxe(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 Qxe{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&&Zp(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),Zp(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Zp(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);Zp(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);Zp(this.left,n.reverse())}}}function Zp(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 wN(t){const e={};let n=-1,i,s,o,r,a,l,c;const u=new Qxe(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 pr(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 wN(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"),_n(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 kN(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||Ny(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||jn(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||Ny(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 CN(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=!un(f)),f===92?h:d)}function h(f){return f===91||f===92||f===93?(t.consume(f),a++,d):d(f)}}function xN(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"),_n(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 ag(t,e){let n;return i;function i(s){return Et(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),n=!0,i):un(s)?_n(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 CN.call(i,t,a,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function a(f){return s=Ur(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 jn(f)?ag(t,c)(f):c(f)}function c(f){return kN(t,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return t.attempt(a6e,d,d)(f)}function d(f){return un(f)?_n(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 jn(a)?ag(t,s)(a):n(a)}function s(a){return xN(t,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(a)}function o(a){return un(a)?_n(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"},pr(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||jn(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)):un(u)?_n(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||jn(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"],_E=["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:W):Hi(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):Hi(Z)?(t.consume(Z),s=4,i.interrupt?e:W):n(Z)}function f(Z){return Z===45?(t.consume(Z),i.interrupt?e:W):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 Hi(Z)?(t.consume(Z),r=String.fromCharCode(Z),y):n(Z)}function y(Z){if(Z===null||Z===47||Z===62||jn(Z)){const ae=Z===47,ge=r.toLowerCase();return!ae&&!o&&_E.includes(ge)?(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||co(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 un(Z)?(t.consume(Z),k):L(Z)}function C(Z){return Z===47?(t.consume(Z),L):Z===58||Z===95||Hi(Z)?(t.consume(Z),$):un(Z)?(t.consume(Z),C):L(Z)}function $(Z){return Z===45||Z===46||Z===58||Z===95||co(Z)?(t.consume(Z),$):S(Z)}function S(Z){return Z===61?(t.consume(Z),M):un(Z)?(t.consume(Z),S):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):un(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||jn(Z)?S(Z):(t.consume(Z),T)}function I(Z){return Z===47||Z===62||un(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):un(Z)?(t.consume(Z),R):n(Z)}function V(Z){return Z===45&&s===2?(t.consume(Z),U):Z===60&&s===1?(t.consume(Z),G):Z===62&&s===4?(t.consume(Z),Q):Z===63&&s===3?(t.consume(Z),W):Z===93&&s===5?(t.consume(Z),X):Et(Z)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(v6e,ne,B)(Z)):Z===null||Et(Z)?(t.exit("htmlFlowData"),B(Z)):(t.consume(Z),V)}function B(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)?B(Z):(t.enter("htmlFlowData"),V(Z))}function U(Z){return Z===45?(t.consume(Z),W):V(Z)}function G(Z){return Z===47?(t.consume(Z),r="",K):V(Z)}function K(Z){if(Z===62){const ae=r.toLowerCase();return _E.includes(ae)?(t.consume(Z),Q):V(Z)}return Hi(Z)&&r.length<8?(t.consume(Z),r+=String.fromCharCode(Z),K):V(Z)}function X(Z){return Z===93?(t.consume(Z),W):V(Z)}function W(Z){return Z===62?(t.consume(Z),Q):Z===45&&s===2?(t.consume(Z),W):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(Q1,e,n)}}const C6e={name:"htmlText",tokenize:x6e};function x6e(t,e,n){const i=this;let s,o,r;return a;function a(W){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(W),l}function l(W){return W===33?(t.consume(W),c):W===47?(t.consume(W),S):W===63?(t.consume(W),C):Hi(W)?(t.consume(W),T):n(W)}function c(W){return W===45?(t.consume(W),u):W===91?(t.consume(W),o=0,p):Hi(W)?(t.consume(W),k):n(W)}function u(W){return W===45?(t.consume(W),f):n(W)}function d(W){return W===null?n(W):W===45?(t.consume(W),h):Et(W)?(r=d,G(W)):(t.consume(W),d)}function h(W){return W===45?(t.consume(W),f):d(W)}function f(W){return W===62?U(W):W===45?h(W):d(W)}function p(W){const Q="CDATA[";return W===Q.charCodeAt(o++)?(t.consume(W),o===Q.length?m:p):n(W)}function m(W){return W===null?n(W):W===93?(t.consume(W),y):Et(W)?(r=m,G(W)):(t.consume(W),m)}function y(W){return W===93?(t.consume(W),b):m(W)}function b(W){return W===62?U(W):W===93?(t.consume(W),b):m(W)}function k(W){return W===null||W===62?U(W):Et(W)?(r=k,G(W)):(t.consume(W),k)}function C(W){return W===null?n(W):W===63?(t.consume(W),$):Et(W)?(r=C,G(W)):(t.consume(W),C)}function $(W){return W===62?U(W):C(W)}function S(W){return Hi(W)?(t.consume(W),M):n(W)}function M(W){return W===45||co(W)?(t.consume(W),M):P(W)}function P(W){return Et(W)?(r=P,G(W)):un(W)?(t.consume(W),P):U(W)}function T(W){return W===45||co(W)?(t.consume(W),T):W===47||W===62||jn(W)?I(W):n(W)}function I(W){return W===47?(t.consume(W),U):W===58||W===95||Hi(W)?(t.consume(W),L):Et(W)?(r=I,G(W)):un(W)?(t.consume(W),I):U(W)}function L(W){return W===45||W===46||W===58||W===95||co(W)?(t.consume(W),L):R(W)}function R(W){return W===61?(t.consume(W),V):Et(W)?(r=R,G(W)):un(W)?(t.consume(W),R):I(W)}function V(W){return W===null||W===60||W===61||W===62||W===96?n(W):W===34||W===39?(t.consume(W),s=W,B):Et(W)?(r=V,G(W)):un(W)?(t.consume(W),V):(t.consume(W),F)}function B(W){return W===s?(t.consume(W),s=void 0,z):W===null?n(W):Et(W)?(r=B,G(W)):(t.consume(W),B)}function F(W){return W===null||W===34||W===39||W===60||W===61||W===96?n(W):W===47||W===62||jn(W)?I(W):(t.consume(W),F)}function z(W){return W===47||W===62||jn(W)?I(W):n(W)}function U(W){return W===62?(t.consume(W),t.exit("htmlTextData"),t.exit("htmlText"),e):n(W)}function G(W){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(W),t.exit("lineEnding"),K}function K(W){return un(W)?_n(t,X,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):X(W)}function X(W){return t.enter("htmlTextData"),r(W)}}const U8={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=rr(a,t.slice(o+1,o+i+3)),a=rr(a,[["enter",u,e]]),a=rr(a,g2(e.parser.constructs.insideSpan.null,t.slice(o+i+4,r-3),e)),a=rr(a,[["exit",u,e],t[r-2],t[r-1],["exit",c,e]]),a=rr(a,t.slice(r+1)),a=rr(a,[["exit",l,e]]),pr(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(Ur(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 jn(d)?ag(t,o)(d):o(d)}function o(d){return d===41?u(d):kN(t,r,a,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function r(d){return jn(d)?ag(t,l)(d):u(d)}function a(d){return n(d)}function l(d){return d===34||d===39||d===40?xN(t,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function c(d){return jn(d)?ag(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 CN.call(i,t,o,r,"reference","referenceMarker","referenceString")(a)}function o(a){return i.parser.defined.includes(Ur(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:U8.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:U8.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 Jw={name:"lineEnding",tokenize:F6e};function F6e(t,e){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),_n(t,e,"linePrefix")}}const q0={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"),un(c)?_n(t,a,"whitespace")(c):a(c))}}const so={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:BC(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(q0,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 BC(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(Q1,i.interrupt?n:u,t.attempt(B6e,h,d))}function u(f){return i.containerState.initialBlankLine=!0,o++,h(f)}function d(f){return un(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(Q1,s,o);function s(a){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,_n(t,e,"listItemIndent",i.containerState.size+1)(a)}function o(a){return i.containerState.furtherBlankLines||!un(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,_n(t,t.attempt(so,e,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a)}}function j6e(t,e,n){const i=this;return _n(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 _n(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!un(o)&&r&&r[1].type==="listItemPrefixWhitespace"?e(o):n(o)}}const yE={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"),un(c)?_n(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(Q1,i,t.attempt(this.parser.constructs.flowInitial,s,_n(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:$N()},J6e=SN("string"),Q6e=SN("text");function SN(t){return{tokenize:e,resolveAll:$N(t==="text"?e4e: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 $N(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 e4e(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 t4e(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(S),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=rr(r,R),y(),r[r.length-1]!==null?[]:(T(e,0),c.events=g2(o,c.events,c),c.events)}function h(R,V){return s4e(f(R),V)}function f(R){return n4e(r,R)}function p(){const{line:R,column:V,offset:B,_index:F,_bufferIndex:z}=i;return{line:R,column:V,offset:B,_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 B=V||{};return B.type=R,B.start=p(),c.events.push(["enter",B,c]),a.push(B),B}function $(R){const V=a.pop();return V.end=p(),c.events.push(["exit",V,c]),V}function S(R,V){T(R,V.from)}function M(R,V){V.restore()}function P(R,V){return B;function B(F,z,U){let G,K,X,W;return Array.isArray(F)?ne(F):"tokenize"in F?ne([F]):Q(F);function Q(Ce){return oe;function oe(pe){const ie=pe!==null&&Ce[pe],re=pe!==null&&Ce.null,ke=[...Array.isArray(ie)?ie:ie?[ie]:[],...Array.isArray(re)?re:re?[re]:[]];return ne(ke)(pe)}}function ne(Ce){return G=Ce,K=0,Ce.length===0?U:Z(Ce[K])}function Z(Ce){return oe;function oe(pe){return W=I(),X=Ce,Ce.partial||(c.currentConstruct=Ce),Ce.name&&c.parser.constructs.disable.null.includes(Ce.name)?ge():Ce.tokenize.call(V?Object.assign(Object.create(c),V):c,l,ae,ge)(pe)}}function ae(Ce){return R(X,W),z}function ge(Ce){return W.restore(),++K<G.length?Z(G[K]):U}}}function T(R,V){R.resolveAll&&!o.includes(R)&&o.push(R),R.resolve&&pr(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,B=c.currentConstruct,F=c.events.length,z=Array.from(a);return{restore:U,from:F};function U(){i=R,c.previous=V,c.currentConstruct=B,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 n4e(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 s4e(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=` | |
| 86 | 85 | `;break}case-3:{r=`\r |
| 87 | -`;break}case-2:{r=e?" ":" ";break}case-1:{if(!e&&i)continue;r=" ";break}default:r=String.fromCharCode(o)}i=o===-2,s.push(r)}return s.join("")}const ACe={42:Fi,43:Fi,45:Fi,48:Fi,49:Fi,50:Fi,51:Fi,52:Fi,53:Fi,54:Fi,55:Fi,56:Fi,57:Fi,62:rF},MCe={91:E6e},ECe={[-2]:nw,[-1]:nw,32:nw},TCe={35:D6e,42:lv,45:[CA,lv],60:N6e,61:CA,95:lv,96:bA,126:bA},PCe={38:lF,92:aF},ICe={[-5]:sw,[-4]:sw,[-3]:sw,33:sCe,38:lF,42:W6,60:[o6e,Y6e],91:oCe,92:[L6e,aF],93:V4,95:W6,96:_6e},LCe={null:[W6,bCe]},OCe={null:[42,95]},DCe={null:[]},RCe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:OCe,contentInitial:MCe,disable:DCe,document:ACe,flow:TCe,flowInitial:ECe,insideSpan:LCe,string:PCe,text:ICe},Symbol.toStringTag,{value:"Module"}));function VCe(t){const n=iF([RCe,...(t||{}).extensions||[]]),s={defined:[],lazy:{},constructs:n,content:i(J3e),document:i(e6e),flow:i(_Ce),string:i(wCe),text:i(CCe)};return s;function i(o){return r;function r(a){return xCe(s,o,a)}}}function FCe(t){for(;!cF(t););return t}const kA=/[\0\t\n\r]/g;function NCe(){let t=1,e="",n=!0,s;return i;function i(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(kA.lastIndex=d,c=kA.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&&s)l.push(-3),s=void 0;else switch(s&&(l.push(-5),s=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:s=!0,t=1}d=h+1}return a&&(s&&l.push(-5),e&&l.push(e),l.push(null)),l}}const BCe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mF(t){return t.replace(BCe,zCe)}function zCe(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return oF(n.slice(o?2:1),o?16:10)}return R4(n)||t}function Am(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?xA(t.position):"start"in t||"end"in t?xA(t):"line"in t||"column"in t?Y6(t):""}function Y6(t){return SA(t&&t.line)+":"+SA(t&&t.column)}function xA(t){return Y6(t&&t.start)+"-"+Y6(t&&t.end)}function SA(t){return t&&typeof t=="number"?t:1}const gF={}.hasOwnProperty;function HCe(t,e,n){return typeof e!="string"&&(n=e,e=void 0),UCe(n)(FCe(VCe(n).document().write(NCe()(t,e,!0))))}function UCe(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(je),autolinkProtocol:I,autolinkEmail:I,atxHeading:o(pe),blockQuote:o(ge),characterEscape:I,characterReference:I,codeFenced:o(ze),codeFencedFenceInfo:r,codeFencedFenceMeta:r,codeIndented:o(ze,r),codeText:o(st,r),codeTextData:I,data:I,codeFlowValue:I,definition:o(ee),definitionDestinationString:r,definitionLabelString:r,definitionTitleString:r,emphasis:o(ne),hardBreakEscape:o(Ae),hardBreakTrailing:o(Ae),htmlFlow:o(Ce,r),htmlFlowData:I,htmlText:o(Ce,r),htmlTextData:I,image:o(Me),label:r,link:o(je),listItem:o(Ue),listItemValue:h,listOrdered:o(Fe,d),listUnordered:o(Fe),paragraph:o(Oe),reference:Z,referenceString:r,resourceDestinationString:r,resourceTitleString:r,setextHeading:o(pe),strong:o(ht),thematicBreak:o(_e)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:re,autolinkProtocol:ce,blockQuote:l(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:Se,characterReferenceMarkerNumeric:Se,characterReferenceValue:we,characterReference:oe,codeFenced:l(b),codeFencedFence:m,codeFencedFenceInfo:f,codeFencedFenceMeta:p,codeFlowValue:L,codeIndented:l(y),codeText:l(B),codeTextData:L,data:L,definition:l(),definitionDestinationString:x,definitionLabelString:C,definitionTitleString:k,emphasis:l(),hardBreakEscape:l(D),hardBreakTrailing:l(D),htmlFlow:l(z),htmlFlowData:L,htmlText:l(Y),htmlTextData:L,image:l(X),label:N,labelText:K,lineEnding:V,link:l(U),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:me,resourceDestinationString:F,resourceTitleString:Q,resource:ie,setextHeading:l(P),setextHeadingLineSequence:T,setextHeadingText:E,strong:l(),thematicBreak:l()}};vF(e,(t||{}).mdastExtensions||[]);const n={};return s;function s(le){let ke={type:"root",children:[]};const Xe={stack:[ke],tokenStack:[],config:e,enter:a,exit:c,buffer:r,resume:u,data:n},tt=[];let Ne=-1;for(;++Ne<le.length;)if(le[Ne][1].type==="listOrdered"||le[Ne][1].type==="listUnordered")if(le[Ne][0]==="enter")tt.push(Ne);else{const Qe=tt.pop();Ne=i(le,Qe,Ne)}for(Ne=-1;++Ne<le.length;){const Qe=e[le[Ne][0]];gF.call(Qe,le[Ne][1].type)&&Qe[le[Ne][1].type].call(Object.assign({sliceSerialize:le[Ne][2].sliceSerialize},Xe),le[Ne][1])}if(Xe.tokenStack.length>0){const Qe=Xe.tokenStack[Xe.tokenStack.length-1];(Qe[1]||$A).call(Xe,void 0,Qe[0])}for(ke.position={start:yl(le.length>0?le[0][1].start:{line:1,column:1,offset:0}),end:yl(le.length>0?le[le.length-2][1].end:{line:1,column:1,offset:0})},Ne=-1;++Ne<e.transforms.length;)ke=e.transforms[Ne](ke)||ke;return ke}function i(le,ke,Xe){let tt=ke-1,Ne=-1,Qe=!1,he,Ee,ve,We;for(;++tt<=Xe;){const Re=le[tt];switch(Re[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Re[0]==="enter"?Ne++:Ne--,We=void 0;break}case"lineEndingBlank":{Re[0]==="enter"&&(he&&!We&&!Ne&&!ve&&(ve=tt),We=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:We=void 0}if(!Ne&&Re[0]==="enter"&&Re[1].type==="listItemPrefix"||Ne===-1&&Re[0]==="exit"&&(Re[1].type==="listUnordered"||Re[1].type==="listOrdered")){if(he){let Et=tt;for(Ee=void 0;Et--;){const ln=le[Et];if(ln[1].type==="lineEnding"||ln[1].type==="lineEndingBlank"){if(ln[0]==="exit")continue;Ee&&(le[Ee][1].type="lineEndingBlank",Qe=!0),ln[1].type="lineEnding",Ee=Et}else if(!(ln[1].type==="linePrefix"||ln[1].type==="blockQuotePrefix"||ln[1].type==="blockQuotePrefixWhitespace"||ln[1].type==="blockQuoteMarker"||ln[1].type==="listItemIndent"))break}ve&&(!Ee||ve<Ee)&&(he._spread=!0),he.end=Object.assign({},Ee?le[Ee][1].start:Re[1].end),le.splice(Ee||tt,0,["exit",he,Re[2]]),tt++,Xe++}if(Re[1].type==="listItemPrefix"){const Et={type:"listItem",_spread:!1,start:Object.assign({},Re[1].start),end:void 0};he=Et,le.splice(tt,0,["enter",Et,Re[2]]),tt++,Xe++,ve=void 0,We=!0}}}return le[ke][1]._spread=Qe,Xe}function o(le,ke){return Xe;function Xe(tt){a.call(this,le(tt),tt),ke&&ke.call(this,tt)}}function r(){this.stack.push({type:"fragment",children:[]})}function a(le,ke,Xe){this.stack[this.stack.length-1].children.push(le),this.stack.push(le),this.tokenStack.push([ke,Xe]),le.position={start:yl(ke.start),end:void 0}}function l(le){return ke;function ke(Xe){le&&le.call(this,Xe),c.call(this,Xe)}}function c(le,ke){const Xe=this.stack.pop(),tt=this.tokenStack.pop();if(tt)tt[0].type!==le.type&&(ke?ke.call(this,le,tt[0]):(tt[1]||$A).call(this,le,tt[0]));else throw new Error("Cannot close `"+le.type+"` ("+Am({start:le.start,end:le.end})+"): it’s not open");Xe.position.end=yl(le.end)}function u(){return D4(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(le){if(this.data.expectingFirstListItemValue){const ke=this.stack[this.stack.length-2];ke.start=Number.parseInt(this.sliceSerialize(le),10),this.data.expectingFirstListItemValue=void 0}}function f(){const le=this.resume(),ke=this.stack[this.stack.length-1];ke.lang=le}function p(){const le=this.resume(),ke=this.stack[this.stack.length-1];ke.meta=le}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function b(){const le=this.resume(),ke=this.stack[this.stack.length-1];ke.value=le.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const le=this.resume(),ke=this.stack[this.stack.length-1];ke.value=le.replace(/(\r?\n|\r)$/g,"")}function C(le){const ke=this.resume(),Xe=this.stack[this.stack.length-1];Xe.label=ke,Xe.identifier=xr(this.sliceSerialize(le)).toLowerCase()}function k(){const le=this.resume(),ke=this.stack[this.stack.length-1];ke.title=le}function x(){const le=this.resume(),ke=this.stack[this.stack.length-1];ke.url=le}function S(le){const ke=this.stack[this.stack.length-1];if(!ke.depth){const Xe=this.sliceSerialize(le).length;ke.depth=Xe}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function T(le){const ke=this.stack[this.stack.length-1];ke.depth=this.sliceSerialize(le).codePointAt(0)===61?1:2}function P(){this.data.setextHeadingSlurpLineEnding=void 0}function I(le){const Xe=this.stack[this.stack.length-1].children;let tt=Xe[Xe.length-1];(!tt||tt.type!=="text")&&(tt=Ie(),tt.position={start:yl(le.start),end:void 0},Xe.push(tt)),this.stack.push(tt)}function L(le){const ke=this.stack.pop();ke.value+=this.sliceSerialize(le),ke.position.end=yl(le.end)}function V(le){const ke=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Xe=ke.children[ke.children.length-1];Xe.position.end=yl(le.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(ke.type)&&(I.call(this,le),L.call(this,le))}function D(){this.data.atHardBreak=!0}function z(){const le=this.resume(),ke=this.stack[this.stack.length-1];ke.value=le}function Y(){const le=this.resume(),ke=this.stack[this.stack.length-1];ke.value=le}function B(){const le=this.resume(),ke=this.stack[this.stack.length-1];ke.value=le}function U(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=ke,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function X(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=ke,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function K(le){const ke=this.sliceSerialize(le),Xe=this.stack[this.stack.length-2];Xe.label=mF(ke),Xe.identifier=xr(ke).toLowerCase()}function N(){const le=this.stack[this.stack.length-1],ke=this.resume(),Xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Xe.type==="link"){const tt=le.children;Xe.children=tt}else Xe.alt=ke}function F(){const le=this.resume(),ke=this.stack[this.stack.length-1];ke.url=le}function Q(){const le=this.resume(),ke=this.stack[this.stack.length-1];ke.title=le}function ie(){this.data.inReference=void 0}function Z(){this.data.referenceType="collapsed"}function me(le){const ke=this.resume(),Xe=this.stack[this.stack.length-1];Xe.label=ke,Xe.identifier=xr(this.sliceSerialize(le)).toLowerCase(),this.data.referenceType="full"}function Se(le){this.data.characterReferenceType=le.type}function we(le){const ke=this.sliceSerialize(le),Xe=this.data.characterReferenceType;let tt;Xe?(tt=oF(ke,Xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):tt=R4(ke);const Ne=this.stack[this.stack.length-1];Ne.value+=tt}function oe(le){const ke=this.stack.pop();ke.position.end=yl(le.end)}function ce(le){L.call(this,le);const ke=this.stack[this.stack.length-1];ke.url=this.sliceSerialize(le)}function re(le){L.call(this,le);const ke=this.stack[this.stack.length-1];ke.url="mailto:"+this.sliceSerialize(le)}function ge(){return{type:"blockquote",children:[]}}function ze(){return{type:"code",lang:null,meta:null,value:""}}function st(){return{type:"inlineCode",value:""}}function ee(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ne(){return{type:"emphasis",children:[]}}function pe(){return{type:"heading",depth:0,children:[]}}function Ae(){return{type:"break"}}function Ce(){return{type:"html",value:""}}function Me(){return{type:"image",title:null,url:"",alt:null}}function je(){return{type:"link",title:null,url:"",children:[]}}function Fe(le){return{type:"list",ordered:le.type==="listOrdered",start:null,spread:le._spread,children:[]}}function Ue(le){return{type:"listItem",spread:le._spread,checked:null,children:[]}}function Oe(){return{type:"paragraph",children:[]}}function ht(){return{type:"strong",children:[]}}function Ie(){return{type:"text",value:""}}function _e(){return{type:"thematicBreak"}}}function yl(t){return{line:t.line,column:t.column,offset:t.offset}}function vF(t,e){let n=-1;for(;++n<e.length;){const s=e[n];Array.isArray(s)?vF(t,s):jCe(t,s)}}function jCe(t,e){let n;for(n in e)if(gF.call(e,n))switch(n){case"canContainEols":{const s=e[n];s&&t[n].push(...s);break}case"transforms":{const s=e[n];s&&t[n].push(...s);break}case"enter":case"exit":{const s=e[n];s&&Object.assign(t[n],s);break}}}function $A(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Am({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Am({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Am({start:e.start,end:e.end})+") is still open")}function G6(t){const e=this;e.parser=n;function n(s){return HCe(s,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}const AA={}.hasOwnProperty;function WCe(t,e){const n=e||{};function s(i,...o){let r=s.invalid;const a=s.handlers;if(i&&AA.call(i,t)){const l=String(i[t]);r=AA.call(a,l)?a[l]:s.unknown}if(r)return r.call(this,i,...o)}return s.handlers=n.handlers||{},s.invalid=n.invalid,s.unknown=n.unknown,s}const YCe={}.hasOwnProperty;function _F(t,e){let n=-1,s;if(e.extensions)for(;++n<e.extensions.length;)_F(t,e.extensions[n]);for(s in e)if(YCe.call(e,s))switch(s){case"extensions":break;case"unsafe":{MA(t[s],e[s]);break}case"join":{MA(t[s],e[s]);break}case"handlers":{GCe(t[s],e[s]);break}default:t.options[s]=e[s]}return t}function MA(t,e){e&&t.push(...e)}function GCe(t,e){e&&Object.assign(t,e)}function qCe(t,e,n,s){const i=n.enter("blockquote"),o=n.createTracker(s);o.move("> "),o.shift(2);const r=n.indentLines(n.containerFlow(t,o.current()),XCe);return i(),r}function XCe(t,e,n){return">"+(n?"":" ")+t}function yF(t,e){return EA(t,e.inConstruct,!0)&&!EA(t,e.notInConstruct,!1)}function EA(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let s=-1;for(;++s<e.length;)if(t.includes(e[s]))return!0;return!1}function TA(t,e,n,s){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===` | |
| 88 | -`&&yF(n.stack,n.unsafe[i]))return/[ \t]/.test(s.before)?"":" ";return`\\ | |
| 89 | -`}function KCe(t,e){const n=String(t);let s=n.indexOf(e),i=s,o=0,r=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;s!==-1;)s===i?++o>r&&(r=o):o=1,i=s+e.length,s=n.indexOf(e,i);return r}function q6(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 ZCe(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 JCe(t,e,n,s){const i=ZCe(n),o=t.value||"",r=i==="`"?"GraveAccent":"Tilde";if(q6(t,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,QCe);return d(),h}const a=n.createTracker(s),l=i.repeat(Math.max(KCe(o,i)+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:` | |
| 86 | +`;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 i4e={42:so,43:so,45:so,48:so,49:so,50:so,51:so,52:so,53:so,54:so,55:so,56:so,57:so,62:_N},o4e={91:r6e},r4e={[-2]:Zw,[-1]:Zw,32:Zw},a4e={35:h6e,42:q0,45:[yE,q0],60:g6e,61:yE,95:q0,96:vE,126:vE},l4e={38:bN,92:yN},c4e={[-5]:Jw,[-4]:Jw,[-3]:Jw,33:O6e,38:bN,42:zC,60:[Rxe,C6e],91:R6e,92:[u6e,yN],93:U8,95:zC,96:Xxe},u4e={null:[zC,Z6e]},d4e={null:[42,95]},h4e={null:[]},f4e=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:d4e,contentInitial:o4e,disable:h4e,document:i4e,flow:a4e,flowInitial:r4e,insideSpan:u4e,string:l4e,text:c4e},Symbol.toStringTag,{value:"Module"}));function p4e(t){const n=gN([f4e,...(t||{}).extensions||[]]),i={defined:[],lazy:{},constructs:n,content:s(Mxe),document:s(Pxe),flow:s(X6e),string:s(J6e),text:s(Q6e)};return i;function s(o){return r;function r(a){return t4e(i,o,a)}}}function m4e(t){for(;!wN(t););return t}const bE=/[\0\t\n\r]/g;function g4e(){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(bE.lastIndex=d,c=bE.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 v4e=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function AN(t){return t.replace(v4e,_4e)}function _4e(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return vN(n.slice(o?2:1),o?16:10)}return H8(n)||t}function lg(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?wE(t.position):"start"in t||"end"in t?wE(t):"line"in t||"column"in t?HC(t):""}function HC(t){return kE(t&&t.line)+":"+kE(t&&t.column)}function wE(t){return HC(t&&t.start)+"-"+HC(t&&t.end)}function kE(t){return t&&typeof t=="number"?t:1}const EN={}.hasOwnProperty;function y4e(t,e,n){return typeof e!="string"&&(n=e,e=void 0),b4e(n)(m4e(p4e(n).document().write(g4e()(t,e,!0))))}function b4e(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(We),autolinkProtocol:I,autolinkEmail:I,atxHeading:o(me),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(Le),label:r,link:o(We),listItem:o(ze),listItemValue:h,listOrdered:o(Fe,d),listUnordered:o(Fe),paragraph:o(Ae),reference:Z,referenceString:r,resourceDestinationString:r,resourceTitleString:r,setextHeading:o(me),strong:o(Ze),thematicBreak:o(it)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ie,autolinkProtocol:pe,blockQuote:l(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:Ce,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(B),htmlFlowData:L,htmlText:l(F),htmlTextData:L,image:l(G),label:X,labelText:K,lineEnding:R,link:l(U),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ae,resourceDestinationString:W,resourceTitleString:Q,resource:ne,setextHeading:l(T),setextHeadingLineSequence:P,setextHeadingText:M,strong:l(),thematicBreak:l()}};MN(e,(t||{}).mdastExtensions||[]);const n={};return i;function i(ye){let ve={type:"root",children:[]};const Pe={stack:[ve],tokenStack:[],config:e,enter:a,exit:c,buffer:r,resume:u,data:n},Ie=[];let _t=-1;for(;++_t<ye.length;)if(ye[_t][1].type==="listOrdered"||ye[_t][1].type==="listUnordered")if(ye[_t][0]==="enter")Ie.push(_t);else{const Lt=Ie.pop();_t=s(ye,Lt,_t)}for(_t=-1;++_t<ye.length;){const Lt=e[ye[_t][0]];EN.call(Lt,ye[_t][1].type)&&Lt[ye[_t][1].type].call(Object.assign({sliceSerialize:ye[_t][2].sliceSerialize},Pe),ye[_t][1])}if(Pe.tokenStack.length>0){const Lt=Pe.tokenStack[Pe.tokenStack.length-1];(Lt[1]||CE).call(Pe,void 0,Lt[0])}for(ve.position={start:Ul(ye.length>0?ye[0][1].start:{line:1,column:1,offset:0}),end:Ul(ye.length>0?ye[ye.length-2][1].end:{line:1,column:1,offset:0})},_t=-1;++_t<e.transforms.length;)ve=e.transforms[_t](ve)||ve;return ve}function s(ye,ve,Pe){let Ie=ve-1,_t=-1,Lt=!1,Je,dt,mt,_e;for(;++Ie<=Pe;){const Oe=ye[Ie];switch(Oe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Oe[0]==="enter"?_t++:_t--,_e=void 0;break}case"lineEndingBlank":{Oe[0]==="enter"&&(Je&&!_e&&!_t&&!mt&&(mt=Ie),_e=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:_e=void 0}if(!_t&&Oe[0]==="enter"&&Oe[1].type==="listItemPrefix"||_t===-1&&Oe[0]==="exit"&&(Oe[1].type==="listUnordered"||Oe[1].type==="listOrdered")){if(Je){let ce=Ie;for(dt=void 0;ce--;){const De=ye[ce];if(De[1].type==="lineEnding"||De[1].type==="lineEndingBlank"){if(De[0]==="exit")continue;dt&&(ye[dt][1].type="lineEndingBlank",Lt=!0),De[1].type="lineEnding",dt=ce}else if(!(De[1].type==="linePrefix"||De[1].type==="blockQuotePrefix"||De[1].type==="blockQuotePrefixWhitespace"||De[1].type==="blockQuoteMarker"||De[1].type==="listItemIndent"))break}mt&&(!dt||mt<dt)&&(Je._spread=!0),Je.end=Object.assign({},dt?ye[dt][1].start:Oe[1].end),ye.splice(dt||Ie,0,["exit",Je,Oe[2]]),Ie++,Pe++}if(Oe[1].type==="listItemPrefix"){const ce={type:"listItem",_spread:!1,start:Object.assign({},Oe[1].start),end:void 0};Je=ce,ye.splice(Ie,0,["enter",ce,Oe[2]]),Ie++,Pe++,mt=void 0,_e=!0}}}return ye[ve][1]._spread=Lt,Pe}function o(ye,ve){return Pe;function Pe(Ie){a.call(this,ye(Ie),Ie),ve&&ve.call(this,Ie)}}function r(){this.stack.push({type:"fragment",children:[]})}function a(ye,ve,Pe){this.stack[this.stack.length-1].children.push(ye),this.stack.push(ye),this.tokenStack.push([ve,Pe]),ye.position={start:Ul(ve.start),end:void 0}}function l(ye){return ve;function ve(Pe){ye&&ye.call(this,Pe),c.call(this,Pe)}}function c(ye,ve){const Pe=this.stack.pop(),Ie=this.tokenStack.pop();if(Ie)Ie[0].type!==ye.type&&(ve?ve.call(this,ye,Ie[0]):(Ie[1]||CE).call(this,ye,Ie[0]));else throw new Error("Cannot close `"+ye.type+"` ("+lg({start:ye.start,end:ye.end})+"): it’s not open");Pe.position.end=Ul(ye.end)}function u(){return z8(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function h(ye){if(this.data.expectingFirstListItemValue){const ve=this.stack[this.stack.length-2];ve.start=Number.parseInt(this.sliceSerialize(ye),10),this.data.expectingFirstListItemValue=void 0}}function f(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.lang=ye}function p(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.meta=ye}function m(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function y(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ye.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function b(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ye.replace(/(\r?\n|\r)$/g,"")}function k(ye){const ve=this.resume(),Pe=this.stack[this.stack.length-1];Pe.label=ve,Pe.identifier=Ur(this.sliceSerialize(ye)).toLowerCase()}function C(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ye}function $(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ye}function S(ye){const ve=this.stack[this.stack.length-1];if(!ve.depth){const Pe=this.sliceSerialize(ye).length;ve.depth=Pe}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function P(ye){const ve=this.stack[this.stack.length-1];ve.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=Ye(),Ie.position={start:Ul(ye.start),end:void 0},Pe.push(Ie)),this.stack.push(Ie)}function L(ye){const ve=this.stack.pop();ve.value+=this.sliceSerialize(ye),ve.position.end=Ul(ye.end)}function R(ye){const ve=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Pe=ve.children[ve.children.length-1];Pe.position.end=Ul(ye.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(ve.type)&&(I.call(this,ye),L.call(this,ye))}function V(){this.data.atHardBreak=!0}function B(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ye}function F(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ye}function z(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.value=ye}function U(){const ye=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";ye.type+="Reference",ye.referenceType=ve,delete ye.url,delete ye.title}else delete ye.identifier,delete ye.label;this.data.referenceType=void 0}function G(){const ye=this.stack[this.stack.length-1];if(this.data.inReference){const ve=this.data.referenceType||"shortcut";ye.type+="Reference",ye.referenceType=ve,delete ye.url,delete ye.title}else delete ye.identifier,delete ye.label;this.data.referenceType=void 0}function K(ye){const ve=this.sliceSerialize(ye),Pe=this.stack[this.stack.length-2];Pe.label=AN(ve),Pe.identifier=Ur(ve).toLowerCase()}function X(){const ye=this.stack[this.stack.length-1],ve=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=ve}function W(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.url=ye}function Q(){const ye=this.resume(),ve=this.stack[this.stack.length-1];ve.title=ye}function ne(){this.data.inReference=void 0}function Z(){this.data.referenceType="collapsed"}function ae(ye){const ve=this.resume(),Pe=this.stack[this.stack.length-1];Pe.label=ve,Pe.identifier=Ur(this.sliceSerialize(ye)).toLowerCase(),this.data.referenceType="full"}function ge(ye){this.data.characterReferenceType=ye.type}function Ce(ye){const ve=this.sliceSerialize(ye),Pe=this.data.characterReferenceType;let Ie;Pe?(Ie=vN(ve,Pe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ie=H8(ve);const _t=this.stack[this.stack.length-1];_t.value+=Ie}function oe(ye){const ve=this.stack.pop();ve.position.end=Ul(ye.end)}function pe(ye){L.call(this,ye);const ve=this.stack[this.stack.length-1];ve.url=this.sliceSerialize(ye)}function ie(ye){L.call(this,ye);const ve=this.stack[this.stack.length-1];ve.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 me(){return{type:"heading",depth:0,children:[]}}function $e(){return{type:"break"}}function Se(){return{type:"html",value:""}}function Le(){return{type:"image",title:null,url:"",alt:null}}function We(){return{type:"link",title:null,url:"",children:[]}}function Fe(ye){return{type:"list",ordered:ye.type==="listOrdered",start:null,spread:ye._spread,children:[]}}function ze(ye){return{type:"listItem",spread:ye._spread,checked:null,children:[]}}function Ae(){return{type:"paragraph",children:[]}}function Ze(){return{type:"strong",children:[]}}function Ye(){return{type:"text",value:""}}function it(){return{type:"thematicBreak"}}}function Ul(t){return{line:t.line,column:t.column,offset:t.offset}}function MN(t,e){let n=-1;for(;++n<e.length;){const i=e[n];Array.isArray(i)?MN(t,i):w4e(t,i)}}function w4e(t,e){let n;for(n in e)if(EN.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 CE(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+lg({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+lg({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+lg({start:e.start,end:e.end})+") is still open")}function UC(t){const e=this;e.parser=n;function n(i){return y4e(i,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}const xE={}.hasOwnProperty;function k4e(t,e){const n=e||{};function i(s,...o){let r=i.invalid;const a=i.handlers;if(s&&xE.call(s,t)){const l=String(s[t]);r=xE.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 C4e={}.hasOwnProperty;function TN(t,e){let n=-1,i;if(e.extensions)for(;++n<e.extensions.length;)TN(t,e.extensions[n]);for(i in e)if(C4e.call(e,i))switch(i){case"extensions":break;case"unsafe":{SE(t[i],e[i]);break}case"join":{SE(t[i],e[i]);break}case"handlers":{x4e(t[i],e[i]);break}default:t.options[i]=e[i]}return t}function SE(t,e){e&&t.push(...e)}function x4e(t,e){e&&Object.assign(t,e)}function S4e(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()),$4e);return s(),r}function $4e(t,e,n){return">"+(n?"":" ")+t}function PN(t,e){return $E(t,e.inConstruct,!0)&&!$E(t,e.notInConstruct,!1)}function $E(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 AE(t,e,n,i){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===` | |
| 87 | +`&&PN(n.stack,n.unsafe[s]))return/[ \t]/.test(i.before)?"":" ";return`\\ | |
| 88 | +`}function A4e(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 jC(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 E4e(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 M4e(t,e,n,i){const s=E4e(n),o=t.value||"",r=s==="`"?"GraveAccent":"Tilde";if(jC(t,n)){const d=n.enter("codeIndented"),h=n.indentLines(o,T4e);return d(),h}const a=n.createTracker(i),l=s.repeat(Math.max(A4e(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:` | |
| 90 | 89 | `,encode:["`"],...a.current()})),d()}return u+=a.move(` |
| 91 | 90 | `),o&&(u+=a.move(o+` |
| 92 | -`)),u+=a.move(l),c(),u}function QCe(t,e,n){return(n?"":" ")+t}function F4(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 eke(t,e,n,s){const i=F4(n),o=i==='"'?"Quote":"Apostrophe",r=n.enter("definition");let a=n.enter("label");const l=n.createTracker(s);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?" ":` | |
| 93 | -`,...l.current()}))),a(),t.title&&(a=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(t.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),r(),c}function tke(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}bF.peek=nke;function bF(t,e,n,s){const i=tke(n),o=n.enter("emphasis"),r=n.createTracker(s);let a=r.move(i);return a+=r.move(n.containerPhrasing(t,{before:a,after:i,...r.current()})),a+=r.move(i),o(),a}function nke(t,e,n){return n.options.emphasis||"*"}const xb=function(t){if(t==null)return rke;if(typeof t=="function")return Sb(t);if(typeof t=="object")return Array.isArray(t)?ske(t):ike(t);if(typeof t=="string")return oke(t);throw new Error("Expected function, string, or object as test")};function ske(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=xb(t[n]);return Sb(s);function s(...i){let o=-1;for(;++o<e.length;)if(e[o].apply(this,i))return!0;return!1}}function ike(t){const e=t;return Sb(n);function n(s){const i=s;let o;for(o in t)if(i[o]!==e[o])return!1;return!0}}function oke(t){return Sb(e);function e(n){return n&&n.type===t}}function Sb(t){return e;function e(n,s,i){return!!(ake(n)&&t.call(this,n,typeof s=="number"?s:void 0,i||void 0))}}function rke(){return!0}function ake(t){return t!==null&&typeof t=="object"&&"type"in t}const wF=[],lke=!0,X6=!1,K6="skip";function CF(t,e,n,s){let i;typeof e=="function"&&typeof n!="function"?(s=n,n=e):i=e;const o=xb(i),r=s?-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=wF,p,m,b;if((!e||o(l,c,u[u.length-1]||void 0))&&(f=cke(n(l,u)),f[0]===X6))return f;if("children"in l&&l.children){const y=l;if(y.children&&f[0]!==K6)for(m=(s?y.children.length:-1)+r,b=u.concat(y);m>-1&&m<y.children.length;){const C=y.children[m];if(p=a(C,m,b)(),p[0]===X6)return p;m=typeof p[1]=="number"?p[1]:m+r}}return f}}}function cke(t){return Array.isArray(t)?t:typeof t=="number"?[lke,t]:t==null?wF:[t]}function yd(t,e,n,s){let i,o,r;typeof e=="function"&&typeof n!="function"?(o=void 0,r=e,i=n):(o=e,r=n,i=s),CF(t,o,a,i);function a(l,c){const u=c[c.length-1],d=u?u.children.indexOf(l):void 0;return r(l,d,u)}}function kF(t,e){let n=!1;return yd(t,function(s){if("value"in s&&/\r?\n|\r/.test(s.value)||s.type==="break")return n=!0,X6}),!!((!t.depth||t.depth<3)&&D4(t)&&(e.options.setext||n))}function uke(t,e,n,s){const i=Math.max(Math.min(6,t.depth||1),1),o=n.createTracker(s);if(kF(t,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(t,{...o.current(),before:` | |
| 91 | +`)),u+=a.move(l),c(),u}function T4e(t,e,n){return(n?"":" ")+t}function j8(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 P4e(t,e,n,i){const s=j8(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?" ":` | |
| 92 | +`,...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 I4e(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}IN.peek=L4e;function IN(t,e,n,i){const s=I4e(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 L4e(t,e,n){return n.options.emphasis||"*"}const v2=function(t){if(t==null)return V4e;if(typeof t=="function")return _2(t);if(typeof t=="object")return Array.isArray(t)?O4e(t):D4e(t);if(typeof t=="string")return R4e(t);throw new Error("Expected function, string, or object as test")};function O4e(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=v2(t[n]);return _2(i);function i(...s){let o=-1;for(;++o<e.length;)if(e[o].apply(this,s))return!0;return!1}}function D4e(t){const e=t;return _2(n);function n(i){const s=i;let o;for(o in t)if(s[o]!==e[o])return!1;return!0}}function R4e(t){return _2(e);function e(n){return n&&n.type===t}}function _2(t){return e;function e(n,i,s){return!!(F4e(n)&&t.call(this,n,typeof i=="number"?i:void 0,s||void 0))}}function V4e(){return!0}function F4e(t){return t!==null&&typeof t=="object"&&"type"in t}const LN=[],N4e=!0,WC=!1,YC="skip";function ON(t,e,n,i){let s;typeof e=="function"&&typeof n!="function"?(i=n,n=e):s=e;const o=v2(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=LN,p,m,y;if((!e||o(l,c,u[u.length-1]||void 0))&&(f=B4e(n(l,u)),f[0]===WC))return f;if("children"in l&&l.children){const b=l;if(b.children&&f[0]!==YC)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]===WC)return p;m=typeof p[1]=="number"?p[1]:m+r}}return f}}}function B4e(t){return Array.isArray(t)?t:typeof t=="number"?[N4e,t]:t==null?LN:[t]}function qd(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),ON(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 DN(t,e){let n=!1;return qd(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,WC}),!!((!t.depth||t.depth<3)&&z8(t)&&(e.options.setext||n))}function z4e(t,e,n,i){const s=Math.max(Math.min(6,t.depth||1),1),o=n.createTracker(i);if(DN(t,n)){const u=n.enter("headingSetext"),d=n.enter("phrasing"),h=n.containerPhrasing(t,{...o.current(),before:` | |
| 94 | 93 | `,after:` |
| 95 | 94 | `});return d(),u(),h+` |
| 96 | -`+(i===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(` | |
| 97 | -`))+1))}const r="#".repeat(i),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(r+" ");let c=n.containerPhrasing(t,{before:"# ",after:` | |
| 98 | -`,...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}xF.peek=dke;function xF(t){return t.value||""}function dke(){return"<"}SF.peek=hke;function SF(t,e,n,s){const i=F4(n),o=i==='"'?"Quote":"Apostrophe",r=n.enter("image");let a=n.enter("label");const l=n.createTracker(s);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(" "+i),c+=l.move(n.safe(t.title,{before:c,after:i,...l.current()})),c+=l.move(i),a()),c+=l.move(")"),r(),c}function hke(){return"!"}$F.peek=fke;function $F(t,e,n,s){const i=t.referenceType,o=n.enter("imageReference");let r=n.enter("label");const a=n.createTracker(s);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(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function fke(){return"!"}AF.peek=pke;function AF(t,e,n){let s=t.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(s);)i+="`";for(/[^ \r\n]/.test(s)&&(/^[ \r\n]/.test(s)&&/[ \r\n]$/.test(s)||/^`|`$/.test(s))&&(s=" "+s+" ");++o<n.unsafe.length;){const r=n.unsafe[o],a=n.compilePattern(r);let l;if(r.atBreak)for(;l=a.exec(s);){let c=l.index;s.charCodeAt(c)===10&&s.charCodeAt(c-1)===13&&c--,s=s.slice(0,c)+" "+s.slice(l.index+1)}}return i+s+i}function pke(){return"`"}function MF(t,e){const n=D4(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))}EF.peek=mke;function EF(t,e,n,s){const i=F4(n),o=i==='"'?"Quote":"Apostrophe",r=n.createTracker(s);let a,l;if(MF(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(" "+i),c+=r.move(n.safe(t.title,{before:c,after:i,...r.current()})),c+=r.move(i),l()),c+=r.move(")"),a(),c}function mke(t,e,n){return MF(t,n)?"<":"["}TF.peek=gke;function TF(t,e,n,s){const i=t.referenceType,o=n.enter("linkReference");let r=n.enter("label");const a=n.createTracker(s);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(),i==="full"||!c||c!==d?l+=a.move(d+"]"):i==="shortcut"?l=l.slice(0,-1):l+=a.move("]"),l}function gke(){return"["}function N4(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 vke(t){const e=N4(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 _ke(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 PF(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 yke(t,e,n,s){const i=n.enter("list"),o=n.bulletCurrent;let r=t.ordered?_ke(n):N4(n);const a=t.ordered?r==="."?")":".":vke(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),PF(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,s);return n.bulletLastUsed=r,n.bulletCurrent=o,i(),c}function bke(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 wke(t,e,n,s){const i=bke(n);let o=n.bulletCurrent||N4(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;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(r=Math.ceil(r/4)*4);const a=n.createTracker(s);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 Cke(t,e,n,s){const i=n.enter("paragraph"),o=n.enter("phrasing"),r=n.containerPhrasing(t,s);return o(),i(),r}const kke=xb(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function xke(t,e,n,s){return(t.children.some(function(r){return kke(r)})?n.containerPhrasing:n.containerFlow).call(n,t,s)}function Ske(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}IF.peek=$ke;function IF(t,e,n,s){const i=Ske(n),o=n.enter("strong"),r=n.createTracker(s);let a=r.move(i+i);return a+=r.move(n.containerPhrasing(t,{before:a,after:i,...r.current()})),a+=r.move(i+i),o(),a}function $ke(t,e,n){return n.options.strong||"*"}function Ake(t,e,n,s){return n.safe(t.value,s)}function Mke(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 Eke(t,e,n){const s=(PF(n)+(n.options.ruleSpaces?" ":"")).repeat(Mke(n));return n.options.ruleSpaces?s.slice(0,-1):s}const B4={blockquote:qCe,break:TA,code:JCe,definition:eke,emphasis:bF,hardBreak:TA,heading:uke,html:xF,image:SF,imageReference:$F,inlineCode:AF,link:EF,linkReference:TF,list:yke,listItem:wke,paragraph:Cke,root:xke,strong:IF,text:Ake,thematicBreak:Eke},Tke=[Pke];function Pke(t,e,n,s){if(e.type==="code"&&q6(e,s)&&(t.type==="list"||t.type===e.type&&q6(t,s)))return!1;if("spread"in n&&typeof n.spread=="boolean")return t.type==="paragraph"&&(t.type===e.type||e.type==="definition"||e.type==="heading"&&kF(e,s))?void 0:n.spread?1:0}const Uc=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],Ike=[{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:` | |
| 99 | -`,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:Uc},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r | |
| 100 | -]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:Uc},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r | |
| 101 | -*])`},{character:"*",inConstruct:"phrasing",notInConstruct:Uc},{atBreak:!0,character:"+",after:`(?:[ \r | |
| 95 | +`+(s===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(` | |
| 96 | +`))+1))}const r="#".repeat(s),a=n.enter("headingAtx"),l=n.enter("phrasing");o.move(r+" ");let c=n.containerPhrasing(t,{before:"# ",after:` | |
| 97 | +`,...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}RN.peek=H4e;function RN(t){return t.value||""}function H4e(){return"<"}VN.peek=U4e;function VN(t,e,n,i){const s=j8(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 U4e(){return"!"}FN.peek=j4e;function FN(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 j4e(){return"!"}NN.peek=W4e;function NN(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 W4e(){return"`"}function BN(t,e){const n=z8(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))}zN.peek=Y4e;function zN(t,e,n,i){const s=j8(n),o=s==='"'?"Quote":"Apostrophe",r=n.createTracker(i);let a,l;if(BN(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 Y4e(t,e,n){return BN(t,n)?"<":"["}HN.peek=q4e;function HN(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 q4e(){return"["}function W8(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 G4e(t){const e=W8(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 X4e(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 UN(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 K4e(t,e,n,i){const s=n.enter("list"),o=n.bulletCurrent;let r=t.ordered?X4e(n):W8(n);const a=t.ordered?r==="."?")":".":G4e(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),UN(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 Z4e(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 J4e(t,e,n,i){const s=Z4e(n);let o=n.bulletCurrent||W8(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 Q4e(t,e,n,i){const s=n.enter("paragraph"),o=n.enter("phrasing"),r=n.containerPhrasing(t,i);return o(),s(),r}const e8e=v2(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function t8e(t,e,n,i){return(t.children.some(function(r){return e8e(r)})?n.containerPhrasing:n.containerFlow).call(n,t,i)}function n8e(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}jN.peek=s8e;function jN(t,e,n,i){const s=n8e(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 s8e(t,e,n){return n.options.strong||"*"}function i8e(t,e,n,i){return n.safe(t.value,i)}function o8e(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 r8e(t,e,n){const i=(UN(n)+(n.options.ruleSpaces?" ":"")).repeat(o8e(n));return n.options.ruleSpaces?i.slice(0,-1):i}const Y8={blockquote:S4e,break:AE,code:M4e,definition:P4e,emphasis:IN,hardBreak:AE,heading:z4e,html:RN,image:VN,imageReference:FN,inlineCode:NN,link:zN,linkReference:HN,list:K4e,listItem:J4e,paragraph:Q4e,root:t8e,strong:jN,text:i8e,thematicBreak:r8e},a8e=[l8e];function l8e(t,e,n,i){if(e.type==="code"&&jC(e,i)&&(t.type==="list"||t.type===e.type&&jC(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"&&DN(e,i))?void 0:n.spread?1:0}const gu=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],c8e=[{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:` | |
| 98 | +`,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:gu},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"#",inConstruct:"headingAtx",after:`(?:[\r | |
| 99 | +]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:gu},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ \r | |
| 100 | +*])`},{character:"*",inConstruct:"phrasing",notInConstruct:gu},{atBreak:!0,character:"+",after:`(?:[ \r | |
| 102 | 101 | ])`},{atBreak:!0,character:"-",after:`(?:[ \r |
| 103 | 102 | -])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ \r |
| 104 | -]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:Uc},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:Uc},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:Uc},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:Uc},{atBreak:!0,character:"~"}];function Lke(t){return t.label||!t.identifier?t.label||"":mF(t.identifier)}function Oke(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 Dke(t,e,n){const s=e.indexStack,i=t.children||[],o=[];let r=-1,a=n.before;s.push(-1);let l=e.createTracker(n);for(;++r<i.length;){const c=i[r];let u;if(s[s.length-1]=r,r+1<i.length){let d=e.handle.handlers[i[r+1].type];d&&d.peek&&(d=d.peek),u=d?d(i[r+1],t,e,{before:"",after:"",...l.current()}).charAt(0):""}else u=n.after;o.length>0&&(a==="\r"||a===` | |
| 105 | -`)&&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 s.pop(),o.join("")}function Rke(t,e,n){const s=e.indexStack,i=t.children||[],o=e.createTracker(n),r=[];let a=-1;for(s.push(-1);++a<i.length;){const l=i[a];s[s.length-1]=a,r.push(o.move(e.handle(l,t,e,{before:` | |
| 103 | +]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:gu},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:gu},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:gu},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:gu},{atBreak:!0,character:"~"}];function u8e(t){return t.label||!t.identifier?t.label||"":AN(t.identifier)}function d8e(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 h8e(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===` | |
| 104 | +`)&&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 f8e(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:` | |
| 106 | 105 | `,after:` |
| 107 | -`,...o.current()}))),l.type!=="list"&&(e.bulletLastUsed=void 0),a<i.length-1&&r.push(o.move(Vke(l,i[a+1],t,e)))}return s.pop(),r.join("")}function Vke(t,e,n,s){let i=s.join.length;for(;i--;){const o=s.join[i](t,e,n,s);if(o===!0||o===1)break;if(typeof o=="number")return` | |
| 106 | +`,...o.current()}))),l.type!=="list"&&(e.bulletLastUsed=void 0),a<s.length-1&&r.push(o.move(p8e(l,s[a+1],t,e)))}return i.pop(),r.join("")}function p8e(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` | |
| 108 | 107 | `.repeat(1+o);if(o===!1)return` |
| 109 | 108 | |
| 110 | 109 | <!----> |
| 111 | 110 | |
| @@ -110,68 +109,70 @@ | ||
| 110 | 109 | <!----> |
| 111 | 110 | |
| 112 | 111 | `}return` |
| 113 | 112 | |
| 114 | -`}const Fke=/\r?\n|\r/g;function Nke(t,e){const n=[];let s=0,i=0,o;for(;o=Fke.exec(t);)r(t.slice(s,o.index)),n.push(o[0]),s=o.index+o[0].length,i++;return r(t.slice(s)),n.join("");function r(a){n.push(e(a,i,!a))}}function Bke(t,e,n){const s=(n.before||"")+(e||"")+(n.after||""),i=[],o=[],r={};let a=-1;for(;++a<t.unsafe.length;){const u=t.unsafe[a];if(!yF(t.stack,u))continue;const d=t.compilePattern(u);let h;for(;h=d.exec(s);){const f="before"in u||!!u.atBreak,p="after"in u,m=h.index+(f?h[1].length:0);i.includes(m)?(r[m].before&&!f&&(r[m].before=!1),r[m].after&&!p&&(r[m].after=!1)):(i.push(m),r[m]={before:f,after:p})}}i.sort(zke);let l=n.before?n.before.length:0;const c=s.length-(n.after?n.after.length:0);for(a=-1;++a<i.length;){const u=i[a];u<l||u>=c||u+1<c&&i[a+1]===u+1&&r[u].after&&!r[u+1].before&&!r[u+1].after||i[a-1]===u-1&&r[u].before&&!r[u-1].before&&!r[u-1].after||(l!==u&&o.push(PA(s.slice(l,u),"\\")),l=u,/[!-/:-@[-`{-~]/.test(s.charAt(u))&&(!n.encode||!n.encode.includes(s.charAt(u)))?o.push("\\"):(o.push("&#x"+s.charCodeAt(u).toString(16).toUpperCase()+";"),l++))}return o.push(PA(s.slice(l,c),n.after)),o.join("")}function zke(t,e){return t-e}function PA(t,e){const n=/\\(?=[!-/:-@[-`{-~])/g,s=[],i=[],o=t+e;let r=-1,a=0,l;for(;l=n.exec(o);)s.push(l.index);for(;++r<s.length;)a!==s[r]&&i.push(t.slice(a,s[r])),i.push("\\"),a=s[r];return i.push(t.slice(a)),i.join("")}function Hke(t){const e=t||{},n=e.now||{};let s=e.lineShift||0,i=n.line||1,o=n.column||1;return{move:l,current:r,shift:a};function r(){return{now:{line:i,column:o},lineShift:s}}function a(c){s+=c}function l(c){const u=c||"",d=u.split(/\r?\n|\r/g),h=d[d.length-1];return i+=d.length-1,o=d.length===1?o+h.length:1+h.length+s,u}}function Uke(t,e={}){const n={enter:i,indentLines:Nke,associationId:Lke,containerPhrasing:Gke,containerFlow:qke,createTracker:Hke,compilePattern:Oke,safe:Xke,stack:[],unsafe:[...Ike],join:[...Tke],handlers:{...B4},options:{},indexStack:[],handle:void 0};_F(n,e),n.options.tightDefinitions&&n.join.push(Yke),n.handle=WCe("type",{invalid:jke,unknown:Wke,handlers:n.handlers});let s=n.handle(t,void 0,n,{before:` | |
| 113 | +`}const m8e=/\r?\n|\r/g;function g8e(t,e){const n=[];let i=0,s=0,o;for(;o=m8e.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 v8e(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(!PN(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(_8e);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(EE(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(EE(i.slice(l,c),n.after)),o.join("")}function _8e(t,e){return t-e}function EE(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 y8e(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 b8e(t,e={}){const n={enter:s,indentLines:g8e,associationId:u8e,containerPhrasing:x8e,containerFlow:S8e,createTracker:y8e,compilePattern:d8e,safe:$8e,stack:[],unsafe:[...c8e],join:[...a8e],handlers:{...Y8},options:{},indexStack:[],handle:void 0};TN(n,e),n.options.tightDefinitions&&n.join.push(C8e),n.handle=k4e("type",{invalid:w8e,unknown:k8e,handlers:n.handlers});let i=n.handle(t,void 0,n,{before:` | |
| 115 | 114 | `,after:` |
| 116 | -`,now:{line:1,column:1},lineShift:0});return s&&s.charCodeAt(s.length-1)!==10&&s.charCodeAt(s.length-1)!==13&&(s+=` | |
| 117 | -`),s;function i(o){return n.stack.push(o),r;function r(){n.stack.pop()}}}function jke(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function Wke(t){const e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function Yke(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function Gke(t,e){return Dke(t,this,e)}function qke(t,e){return Rke(t,this,e)}function Xke(t,e){return Bke(this,t,e)}function Z6(t){const e=this;e.compiler=n;function n(s){return Uke(s,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}}function IA(t){if(t)throw t}var cv=Object.prototype.hasOwnProperty,LF=Object.prototype.toString,LA=Object.defineProperty,OA=Object.getOwnPropertyDescriptor,DA=function(e){return typeof Array.isArray=="function"?Array.isArray(e):LF.call(e)==="[object Array]"},RA=function(e){if(!e||LF.call(e)!=="[object Object]")return!1;var n=cv.call(e,"constructor"),s=e.constructor&&e.constructor.prototype&&cv.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!s)return!1;var i;for(i in e);return typeof i>"u"||cv.call(e,i)},VA=function(e,n){LA&&n.name==="__proto__"?LA(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},FA=function(e,n){if(n==="__proto__")if(cv.call(e,n)){if(OA)return OA(e,n).value}else return;return e[n]},Kke=function t(){var e,n,s,i,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)s=FA(a,n),i=FA(e,n),a!==i&&(u&&i&&(RA(i)||(o=DA(i)))?(o?(o=!1,r=s&&DA(s)?s:[]):r=s&&RA(s)?s:{},VA(a,{name:n,newValue:t(u,r,i)})):typeof i<"u"&&VA(a,{name:n,newValue:i}));return a};const iw=Ts(Kke);function J6(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 Zke(){const t=[],e={run:n,use:s};return e;function n(...i){let o=-1;const r=i.pop();if(typeof r!="function")throw new TypeError("Expected function as last argument, not "+r);a(null,...i);function a(l,...c){const u=t[++o];let d=-1;if(l){r(l);return}for(;++d<i.length;)(c[d]===null||c[d]===void 0)&&(c[d]=i[d]);i=c,u?Jke(u,a)(...c):r(null,...c)}}function s(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function Jke(t,e){let n;return s;function s(...r){const a=t.length>r.length;let l;a&&r.push(i);try{l=t.apply(this,r)}catch(c){const u=c;if(a&&n)throw u;return i(u)}a||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(r,...a){n||(n=!0,e(r,...a))}function o(r){i(null,r)}}class eo extends Error{constructor(e,n,s){super(),typeof n=="string"&&(s=n,n=void 0);let i="",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"?i=e:!o.cause&&e&&(r=!0,i=e.message,o.cause=e),!o.ruleId&&!o.source&&typeof s=="string"){const l=s.indexOf(":");l===-1?o.ruleId=s:(o.source=s.slice(0,l),o.ruleId=s.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=i,this.line=a?a.line:void 0,this.name=Am(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}}eo.prototype.file="";eo.prototype.name="";eo.prototype.reason="";eo.prototype.message="";eo.prototype.stack="";eo.prototype.column=void 0;eo.prototype.line=void 0;eo.prototype.ancestors=void 0;eo.prototype.cause=void 0;eo.prototype.fatal=void 0;eo.prototype.place=void 0;eo.prototype.ruleId=void 0;eo.prototype.source=void 0;const ta={basename:Qke,dirname:exe,extname:txe,join:nxe,sep:"/"};function Qke(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');m1(t);let n=0,s=-1,i=t.length,o;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(o){n=i+1;break}}else s<0&&(o=!0,s=i+1);return s<0?"":t.slice(n,s)}if(e===t)return"";let r=-1,a=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1),a>-1&&(t.codePointAt(i)===e.codePointAt(a--)?a<0&&(s=i):(a=-1,s=r));return n===s?s=r:s<0&&(s=t.length),t.slice(n,s)}function exe(t){if(m1(t),t.length===0)return".";let e=-1,n=t.length,s;for(;--n;)if(t.codePointAt(n)===47){if(s){e=n;break}}else s||(s=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function txe(t){m1(t);let e=t.length,n=-1,s=0,i=-1,o=0,r;for(;e--;){const a=t.codePointAt(e);if(a===47){if(r){s=e+1;break}continue}n<0&&(r=!0,n=e+1),a===46?i<0?i=e:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===s+1?"":t.slice(i,n)}function nxe(...t){let e=-1,n;for(;++e<t.length;)m1(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":sxe(n)}function sxe(t){m1(t);const e=t.codePointAt(0)===47;let n=ixe(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function ixe(t,e){let n="",s=0,i=-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(!(i===r-1||o===1))if(i!==r-1&&o===2){if(n.length<2||s!==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="",s=0):(n=n.slice(0,l),s=n.length-1-n.lastIndexOf("/")),i=r,o=0;continue}}else if(n.length>0){n="",s=0,i=r,o=0;continue}}e&&(n=n.length>0?n+"/..":"..",s=2)}else n.length>0?n+="/"+t.slice(i+1,r):n=t.slice(i+1,r),s=r-i-1;i=r,o=0}else a===46&&o>-1?o++:o=-1}return n}function m1(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const oxe={cwd:rxe};function rxe(){return"/"}function Q6(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function axe(t){if(typeof t=="string")t=new URL(t);else if(!Q6(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 lxe(t)}function lxe(t){if(t.hostname!==""){const s=new TypeError('File URL host must be "localhost" or empty on darwin');throw s.code="ERR_INVALID_FILE_URL_HOST",s}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const s=e.codePointAt(n+2);if(s===70||s===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}const ow=["history","path","basename","stem","extname","dirname"];class cxe{constructor(e){let n;e?Q6(e)?n={path:e}:typeof e=="string"||uxe(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":oxe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let s=-1;for(;++s<ow.length;){const o=ow[s];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)ow.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?ta.basename(this.path):void 0}set basename(e){aw(e,"basename"),rw(e,"basename"),this.path=ta.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?ta.dirname(this.path):void 0}set dirname(e){NA(this.basename,"dirname"),this.path=ta.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?ta.extname(this.path):void 0}set extname(e){if(rw(e,"extname"),NA(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=ta.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Q6(e)&&(e=axe(e)),aw(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?ta.basename(this.path,this.extname):void 0}set stem(e){aw(e,"stem"),rw(e,"stem"),this.path=ta.join(this.dirname||"",e+(this.extname||""))}fail(e,n,s){const i=this.message(e,n,s);throw i.fatal=!0,i}info(e,n,s){const i=this.message(e,n,s);return i.fatal=void 0,i}message(e,n,s){const i=new eo(e,n,s);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function rw(t,e){if(t&&t.includes(ta.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+ta.sep+"`")}function aw(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function NA(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function uxe(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const dxe=function(t){const s=this.constructor.prototype,i=s[t],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,s),o},hxe={}.hasOwnProperty;class z4 extends dxe{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=Zke()}copy(){const e=new z4;let n=-1;for(;++n<this.attachers.length;){const s=this.attachers[n];e.use(...s)}return e.data(iw(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(uw("data",this.frozen),this.namespace[e]=n,this):hxe.call(this.namespace,e)&&this.namespace[e]||void 0:e?(uw("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,...s]=this.attachers[this.freezeIndex];if(s[0]===!1)continue;s[0]===!0&&(s[0]=void 0);const i=n.call(e,...s);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=y0(e),s=this.parser||this.Parser;return lw("parse",s),s(String(n),n)}process(e,n){const s=this;return this.freeze(),lw("process",this.parser||this.Parser),cw("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,r){const a=y0(e),l=s.parse(a);s.run(l,a,function(u,d,h){if(u||!d||!h)return c(u);const f=d,p=s.stringify(f,h);pxe(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,s;return this.freeze(),lw("processSync",this.parser||this.Parser),cw("processSync",this.compiler||this.Compiler),this.process(e,i),zA("processSync","process",n),s;function i(o,r){n=!0,IA(o),s=r}}run(e,n,s){BA(e),this.freeze();const i=this.transformers;return!s&&typeof n=="function"&&(s=n,n=void 0),s?o(void 0,s):new Promise(o);function o(r,a){const l=y0(n);i.run(e,l,c);function c(u,d,h){const f=d||e;u?a(u):r?r(f):s(void 0,f,h)}}}runSync(e,n){let s=!1,i;return this.run(e,n,o),zA("runSync","run",s),i;function o(r,a){IA(r),i=a,s=!0}}stringify(e,n){this.freeze();const s=y0(n),i=this.compiler||this.Compiler;return cw("stringify",i),BA(e),i(e,s)}use(e,...n){const s=this.attachers,i=this.namespace;if(uw("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&&(i.settings=iw(!0,i.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<s.length;)if(s[d][0]===c){h=d;break}if(h===-1)s.push([c,...u]);else if(u.length>0){let[f,...p]=u;const m=s[h][1];J6(m)&&J6(f)&&(f=iw(!0,m,f)),s[h]=[c,f,...p]}}}}const eC=new z4().freeze();function lw(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function cw(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function uw(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 BA(t){if(!J6(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function zA(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function y0(t){return fxe(t)?t:new cxe(t)}function fxe(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function pxe(t){return typeof t=="string"||mxe(t)}function mxe(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var OF=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},qt=(t,e,n)=>(OF(t,e,"read from private field"),n?n.call(t):e.get(t)),ds=(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)},Un=(t,e,n,s)=>(OF(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);let DF=class{},RF=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 OV();return e}}},gxe=class VF extends DF{constructor(e,n,s){super(),this.type=e,this.content=n,this.attrs=s}push(e,...n){this.content.push(e,...n)}pop(){return this.content.pop()}static create(e,n,s){return new VF(e,n,s)}};var Kr,Tp,uv,dv,hv,Pp,Ip;const tC=class extends RF{constructor(e){super(),ds(this,Kr,void 0),ds(this,Tp,void 0),ds(this,uv,void 0),ds(this,dv,void 0),ds(this,hv,void 0),ds(this,Pp,void 0),ds(this,Ip,void 0),Un(this,Kr,bn.none),Un(this,Tp,n=>n.isText),Un(this,uv,(n,s)=>{if(qt(this,Tp).call(this,n)&&qt(this,Tp).call(this,s)&&bn.sameSet(n.marks,s.marks))return this.schema.text(n.text+s.text,n.marks)}),Un(this,dv,n=>{const s=Object.values({...this.schema.nodes,...this.schema.marks}).find(i=>i.spec.parseMarkdown.match(n));if(!s)throw l3e(n);return s}),Un(this,hv,n=>{const s=qt(this,dv).call(this,n);s.spec.parseMarkdown.runner(this,n,s)}),this.injectRoot=(n,s,i)=>(this.openNode(s,i),this.next(n.children),this),this.openNode=(n,s)=>(this.open(gxe.create(n,[],s)),this),Un(this,Pp,()=>{Un(this,Kr,bn.none);const n=this.close();return qt(this,Ip).call(this,n.type,n.attrs,n.content)}),this.closeNode=()=>(qt(this,Pp).call(this),this),Un(this,Ip,(n,s,i)=>{const o=n.createAndFill(s,i,qt(this,Kr));if(!o)throw a3e(n,s,i);return this.push(o),o}),this.addNode=(n,s,i)=>(qt(this,Ip).call(this,n,s,i),this),this.openMark=(n,s)=>{const i=n.create(s);return Un(this,Kr,i.addToSet(qt(this,Kr))),this},this.closeMark=n=>(Un(this,Kr,n.removeFromSet(qt(this,Kr))),this),this.addText=n=>{const s=this.top();if(!s)throw OV();const i=s.pop(),o=this.schema.text(n,qt(this,Kr));if(!i)return s.push(o),this;const r=qt(this,uv).call(this,i,o);return r?(s.push(r),this):(s.push(i,o),this)},this.build=()=>{let n;do n=qt(this,Pp).call(this);while(this.size());return n},this.next=(n=[])=>([n].flat().forEach(s=>qt(this,hv).call(this,s)),this),this.toDoc=()=>this.build(),this.run=(n,s)=>{const i=n.runSync(n.parse(s),s);return this.next(i),this},this.schema=e}};Kr=new WeakMap,Tp=new WeakMap,uv=new WeakMap,dv=new WeakMap,hv=new WeakMap,Pp=new WeakMap,Ip=new WeakMap,tC.create=(t,e)=>{const n=new tC(t);return s=>(n.run(e,s),n.toDoc())};let vxe=tC;const nC=class extends DF{constructor(e,n,s,i={}){super(),this.type=e,this.children=n,this.value=s,this.props=i,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()}}};nC.create=(t,e,n,s={})=>new nC(t,e,n,s);let HA=nC;const _xe=t=>Object.prototype.hasOwnProperty.call(t,"size");var Ra,Lp,fv,pv,Op,mv,Dp,gv,vv,oh,Zc,_v,Rp;const sC=class extends RF{constructor(e){super(),ds(this,Ra,void 0),ds(this,Lp,void 0),ds(this,fv,void 0),ds(this,pv,void 0),ds(this,Op,void 0),ds(this,mv,void 0),ds(this,Dp,void 0),ds(this,gv,void 0),ds(this,vv,void 0),ds(this,oh,void 0),ds(this,Zc,void 0),ds(this,_v,void 0),ds(this,Rp,void 0),Un(this,Ra,bn.none),Un(this,Lp,n=>{const s=Object.values({...this.schema.nodes,...this.schema.marks}).find(i=>i.spec.toMarkdown.match(n));if(!s)throw c3e(n.type);return s}),Un(this,fv,n=>qt(this,Lp).call(this,n).spec.toMarkdown.runner(this,n)),Un(this,pv,(n,s)=>qt(this,Lp).call(this,n).spec.toMarkdown.runner(this,n,s)),Un(this,Op,n=>{const{marks:s}=n,i=o=>o.type.spec.priority??50;[...s].sort((o,r)=>i(o)-i(r)).every(o=>!qt(this,pv).call(this,o,n))&&qt(this,fv).call(this,n),s.forEach(o=>qt(this,Rp).call(this,o))}),Un(this,mv,(n,s)=>{var i;if(n.type===s||((i=n.children)==null?void 0:i.length)!==1)return n;const o=c=>{var u;if(c.type===s)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}),Un(this,Dp,n=>{const{children:s}=n;return s&&(n.children=s.reduce((i,o,r)=>{if(r===0)return[o];const a=i.at(-1);if(a&&a.isMark&&o.isMark){o=qt(this,mv).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 i.slice(0,-1).concat(qt(this,Dp).call(this,h))}}return i.concat(o)},[])),n}),Un(this,gv,n=>{const s={...n.props,type:n.type};return n.children&&(s.children=n.children),n.value&&(s.value=n.value),s}),this.openNode=(n,s,i)=>(this.open(HA.create(n,void 0,s,i)),this),Un(this,vv,(n,s)=>{let i="",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(" ")&&(i=h.value.match(/^ +/)[0],h.value=h.value.trimStart())}i.length&&qt(this,Zc).call(this,"text",void 0,i);const u=s();return o.length&&qt(this,Zc).call(this,"text",void 0,o),u}),Un(this,oh,(n=!1)=>{const s=this.close(),i=()=>qt(this,Zc).call(this,s.type,s.children,s.value,s.props);return n?qt(this,vv).call(this,s,i):i()}),this.closeNode=()=>(qt(this,oh).call(this),this),Un(this,Zc,(n,s,i,o)=>{const r=HA.create(n,s,i,o),a=qt(this,Dp).call(this,qt(this,gv).call(this,r));return this.push(a),a}),this.addNode=(n,s,i,o)=>(qt(this,Zc).call(this,n,s,i,o),this),Un(this,_v,(n,s,i,o)=>n.isInSet(qt(this,Ra))?this:(Un(this,Ra,n.addToSet(qt(this,Ra))),this.openNode(s,i,{...o,isMark:!0}))),Un(this,Rp,n=>{n.isInSet(qt(this,Ra))&&(Un(this,Ra,n.type.removeFromSet(qt(this,Ra))),qt(this,oh).call(this,!0))}),this.withMark=(n,s,i,o)=>(qt(this,_v).call(this,n,s,i,o),this),this.closeMark=n=>(qt(this,Rp).call(this,n),this),this.build=()=>{let n=null;do n=qt(this,oh).call(this);while(this.size());return n},this.next=n=>_xe(n)?(n.forEach(s=>{qt(this,Op).call(this,s)}),this):(qt(this,Op).call(this,n),this),this.toString=n=>n.stringify(this.build()),this.run=n=>(this.next(n),this),this.schema=e}};Ra=new WeakMap,Lp=new WeakMap,fv=new WeakMap,pv=new WeakMap,Op=new WeakMap,mv=new WeakMap,Dp=new WeakMap,gv=new WeakMap,vv=new WeakMap,oh=new WeakMap,Zc=new WeakMap,_v=new WeakMap,Rp=new WeakMap,sC.create=(t,e)=>{const n=new sC(t);return s=>(n.run(s),n.toString(e))};let yxe=sC;const FF=65535,NF=Math.pow(2,16);function bxe(t,e){return t+e*NF}function UA(t){return t&FF}function wxe(t){return(t-(t&FF))/NF}const BF=1,zF=2,yv=4,HF=8;class iC{constructor(e,n,s){this.pos=e,this.delInfo=n,this.recover=s}get deleted(){return(this.delInfo&HF)>0}get deletedBefore(){return(this.delInfo&(BF|yv))>0}get deletedAfter(){return(this.delInfo&(zF|yv))>0}get deletedAcross(){return(this.delInfo&yv)>0}}class co{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&co.empty)return co.empty}recover(e){let n=0,s=UA(e);if(!this.inverted)for(let i=0;i<s;i++)n+=this.ranges[i*3+2]-this.ranges[i*3+1];return this.ranges[s*3]+n+wxe(e)}mapResult(e,n=1){return this._map(e,n,!1)}map(e,n=1){return this._map(e,n,!0)}_map(e,n,s){let i=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?i: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+i+(h<0?0:u);if(s)return f;let p=e==(n<0?l:d)?null:bxe(a/3,e-l),m=e==l?zF:e==d?BF:yv;return(n<0?e!=l:e!=d)&&(m|=HF),new iC(f,m,p)}i+=u-c}return s?e+i:new iC(e+i,0,null)}touches(e,n){let s=0,i=UA(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?s:0);if(l>e)break;let c=this.ranges[a+o],u=l+c;if(e<=u&&a==i*3)return!0;s+=this.ranges[a+r]-c}return!1}forEach(e){let n=this.inverted?2:1,s=this.inverted?1:2;for(let i=0,o=0;i<this.ranges.length;i+=3){let r=this.ranges[i],a=r-(this.inverted?o:0),l=r+(this.inverted?0:o),c=this.ranges[i+n],u=this.ranges[i+s];e(a,a+c,l,l+u),o+=u-c}}invert(){return new co(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?co.empty:new co(e<0?[0,-e,0]:[0,0,e])}}co.empty=new co([]);class Ih{constructor(e=[],n,s=0,i=e.length){this.maps=e,this.mirror=n,this.from=s,this.to=i}slice(e=0,n=this.maps.length){return new Ih(this.maps,this.mirror,e,n)}copy(){return new Ih(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,s=this.maps.length;n<e.maps.length;n++){let i=e.getMirror(n);this.appendMap(e.maps[n],i!=null&&i<n?s+i: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,s=this.maps.length+e.maps.length;n>=0;n--){let i=e.getMirror(n);this.appendMap(e.maps[n].invert(),i!=null&&i>n?s-i-1:void 0)}}invert(){let e=new Ih;return e.appendMappingInverted(this),e}map(e,n=1){if(this.mirror)return this._map(e,n,!0);for(let s=this.from;s<this.to;s++)e=this.maps[s].map(e,n);return e}mapResult(e,n=1){return this._map(e,n,!1)}_map(e,n,s){let i=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}}i|=a.delInfo,e=a.pos}return s?e:new iC(e,i,null)}}const dw=Object.create(null);class hi{getMap(){return co.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let s=dw[n.stepType];if(!s)throw new RangeError(`No step type ${n.stepType} defined`);return s.fromJSON(e,n)}static jsonID(e,n){if(e in dw)throw new RangeError("Duplicate use of step JSON ID "+e);return dw[e]=n,n.prototype.jsonID=e,n}}class gs{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new gs(e,null)}static fail(e){return new gs(null,e)}static fromReplace(e,n,s,i){try{return gs.ok(e.replace(n,s,i))}catch(o){if(o instanceof j_)return gs.fail(o.message);throw o}}}function H4(t,e,n){let s=[];for(let i=0;i<t.childCount;i++){let o=t.child(i);o.content.size&&(o=o.copy(H4(o.content,e,o))),o.isInline&&(o=e(o,n,i)),s.push(o)}return et.fromArray(s)}class Xa extends hi{constructor(e,n,s){super(),this.from=e,this.to=n,this.mark=s}apply(e){let n=e.slice(this.from,this.to),s=e.resolve(this.from),i=s.node(s.sharedDepth(this.to)),o=new it(H4(n.content,(r,a)=>!r.isAtom||!a.type.allowsMarkType(this.mark.type)?r:r.mark(this.mark.addToSet(r.marks)),i),n.openStart,n.openEnd);return gs.fromReplace(e,this.from,this.to,o)}invert(){return new oa(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),s=e.mapResult(this.to,-1);return n.deleted&&s.deleted||n.pos>=s.pos?null:new Xa(n.pos,s.pos,this.mark)}merge(e){return e instanceof Xa&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Xa(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 Xa(n.from,n.to,e.markFromJSON(n.mark))}}hi.jsonID("addMark",Xa);class oa extends hi{constructor(e,n,s){super(),this.from=e,this.to=n,this.mark=s}apply(e){let n=e.slice(this.from,this.to),s=new it(H4(n.content,i=>i.mark(this.mark.removeFromSet(i.marks)),e),n.openStart,n.openEnd);return gs.fromReplace(e,this.from,this.to,s)}invert(){return new Xa(this.from,this.to,this.mark)}map(e){let n=e.mapResult(this.from,1),s=e.mapResult(this.to,-1);return n.deleted&&s.deleted||n.pos>=s.pos?null:new oa(n.pos,s.pos,this.mark)}merge(e){return e instanceof oa&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new oa(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 oa(n.from,n.to,e.markFromJSON(n.mark))}}hi.jsonID("removeMark",oa);class ec extends hi{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return gs.fail("No node at mark step's position");let s=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return gs.fromReplace(e,this.pos,this.pos+1,new it(et.from(s),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);if(n){let s=this.mark.addToSet(n.marks);if(s.length==n.marks.length){for(let i=0;i<n.marks.length;i++)if(!n.marks[i].isInSet(s))return new ec(this.pos,n.marks[i]);return new ec(this.pos,this.mark)}}return new wf(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new ec(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 ec(n.pos,e.markFromJSON(n.mark))}}hi.jsonID("addNodeMark",ec);class wf extends hi{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return gs.fail("No node at mark step's position");let s=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return gs.fromReplace(e,this.pos,this.pos+1,new it(et.from(s),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new ec(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new wf(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 wf(n.pos,e.markFromJSON(n.mark))}}hi.jsonID("removeNodeMark",wf);class Fs extends hi{constructor(e,n,s,i=!1){super(),this.from=e,this.to=n,this.slice=s,this.structure=i}apply(e){return this.structure&&oC(e,this.from,this.to)?gs.fail("Structure replace would overwrite content"):gs.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new co([this.from,this.to-this.from,this.slice.size])}invert(e){return new Fs(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let n=e.mapResult(this.from,1),s=e.mapResult(this.to,-1);return n.deletedAcross&&s.deletedAcross?null:new Fs(n.pos,Math.max(n.pos,s.pos),this.slice)}merge(e){if(!(e instanceof Fs)||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?it.empty:new it(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Fs(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?it.empty:new it(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Fs(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 Fs(n.from,n.to,it.fromJSON(e,n.slice),!!n.structure)}}hi.jsonID("replace",Fs);class ci extends hi{constructor(e,n,s,i,o,r,a=!1){super(),this.from=e,this.to=n,this.gapFrom=s,this.gapTo=i,this.slice=o,this.insert=r,this.structure=a}apply(e){if(this.structure&&(oC(e,this.from,this.gapFrom)||oC(e,this.gapTo,this.to)))return gs.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return gs.fail("Gap is not a flat range");let s=this.slice.insertAt(this.insert,n.content);return s?gs.fromReplace(e,this.from,this.to,s):gs.fail("Content does not fit in gap")}getMap(){return new co([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 ci(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),s=e.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:e.map(this.gapFrom,-1),o=this.to==this.gapTo?s.pos:e.map(this.gapTo,1);return n.deletedAcross&&s.deletedAcross||i<n.pos||o>s.pos?null:new ci(n.pos,s.pos,i,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 ci(n.from,n.to,n.gapFrom,n.gapTo,it.fromJSON(e,n.slice),n.insert,!!n.structure)}}hi.jsonID("replaceAround",ci);function oC(t,e,n){let s=t.resolve(e),i=n-e,o=s.depth;for(;i>0&&o>0&&s.indexAfter(o)==s.node(o).childCount;)o--,i--;if(i>0){let r=s.node(o).maybeChild(s.indexAfter(o));for(;i>0;){if(!r||r.isLeaf)return!0;r=r.firstChild,i--}}return!1}function Cxe(t,e,n,s){let i=[],o=[],r,a;t.doc.nodesBetween(e,n,(l,c,u)=>{if(!l.isInline)return;let d=l.marks;if(!s.isInSet(d)&&u.type.allowsMarkType(s.type)){let h=Math.max(c,e),f=Math.min(c+l.nodeSize,n),p=s.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:i.push(r=new oa(h,f,d[m])));a&&a.to==h?a.to=f:o.push(a=new Xa(h,f,s))}}),i.forEach(l=>t.step(l)),o.forEach(l=>t.step(l))}function kxe(t,e,n,s){let i=[],o=0;t.doc.nodesBetween(e,n,(r,a)=>{if(!r.isInline)return;o++;let l=null;if(s instanceof wb){let c=r.marks,u;for(;u=s.isInSet(c);)(l||(l=[])).push(u),c=u.removeFromSet(c)}else s?s.isInSet(r.marks)&&(l=[s]):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<i.length;f++){let p=i[f];p.step==o-1&&d.eq(i[f].style)&&(h=p)}h?(h.to=c,h.step=o):i.push({style:d,from:Math.max(a,e),to:c,step:o})}}}),i.forEach(r=>t.step(new oa(r.from,r.to,r.style)))}function UF(t,e,n,s=n.contentMatch,i=!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=s.matchType(c.type);if(!d)r.push(new Fs(a,u,it.empty));else{s=d;for(let h=0;h<c.marks.length;h++)n.allowsMarkType(c.marks[h].type)||t.step(new oa(a,u,c.marks[h]));if(i&&c.isText&&n.whitespace!="pre"){let h,f=/\r?\n|\r/g,p;for(;h=f.exec(c.text);)p||(p=new it(et.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),r.push(new Fs(a+h.index,a+h.index+h[0].length,p))}}a=u}if(!s.validEnd){let l=s.fillBefore(et.empty,!0);t.replace(a,a,new it(l,0,0))}for(let l=r.length-1;l>=0;l--)t.step(r[l])}function xxe(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function $b(t){let n=t.parent.content.cutByIndex(t.startIndex,t.endIndex);for(let s=t.depth;;--s){let i=t.$from.node(s),o=t.$from.index(s),r=t.$to.indexAfter(s);if(s<t.depth&&i.canReplace(o,r,n))return s;if(s==0||i.type.spec.isolating||!xxe(i,o,r))break}return null}function Sxe(t,e,n){let{$from:s,$to:i,depth:o}=e,r=s.before(o+1),a=i.after(o+1),l=r,c=a,u=et.empty,d=0;for(let p=o,m=!1;p>n;p--)m||s.index(p)>0?(m=!0,u=et.from(s.node(p).copy(u)),d++):l--;let h=et.empty,f=0;for(let p=o,m=!1;p>n;p--)m||i.after(p+1)<i.end(p)?(m=!0,h=et.from(i.node(p).copy(h)),f++):c++;t.step(new ci(l,c,r,a,new it(u.append(h),d,f),u.size-d,!0))}function U4(t,e,n=null,s=t){let i=$xe(t,e),o=i&&Axe(s,e);return o?i.map(jA).concat({type:e,attrs:n}).concat(o.map(jA)):null}function jA(t){return{type:t,attrs:null}}function $xe(t,e){let{parent:n,startIndex:s,endIndex:i}=t,o=n.contentMatchAt(s).findWrapping(e);if(!o)return null;let r=o.length?o[0]:e;return n.canReplaceWith(s,i,r)?o:null}function Axe(t,e){let{parent:n,startIndex:s,endIndex:i}=t,o=n.child(s),r=e.contentMatch.findWrapping(o.type);if(!r)return null;let l=(r.length?r[r.length-1]:e).contentMatch;for(let c=s;l&&c<i;c++)l=l.matchType(n.child(c).type);return!l||!l.validEnd?null:r}function Mxe(t,e,n){let s=et.empty;for(let r=n.length-1;r>=0;r--){if(s.size){let a=n[r].type.contentMatch.matchFragment(s);if(!a||!a.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}s=et.from(n[r].type.create(n[r].attrs,s))}let i=e.start,o=e.end;t.step(new ci(i,o,i,o,new it(s,0,0),n.length,!0))}function Exe(t,e,n,s,i){if(!s.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 i=="function"?i(r):i;if(r.isTextblock&&!r.hasMarkup(s,l)&&Ixe(t.doc,t.mapping.slice(o).map(a),s)){let c=null;if(s.schema.linebreakReplacement){let f=s.whitespace=="pre",p=!!s.contentMatch.matchType(s.schema.linebreakReplacement);f&&!p?c=!1:!f&&p&&(c=!0)}c===!1&&Pxe(t,r,a,o),UF(t,t.mapping.slice(o).map(a,1),s,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 ci(d,h,d+1,h-1,new it(et.from(s.create(l,null,r.marks)),0,0),1,!0)),c===!0&&Txe(t,r,a,o),!1}})}function Txe(t,e,n,s){e.forEach((i,o)=>{if(i.isText){let r,a=/\r?\n|\r/g;for(;r=a.exec(i.text);){let l=t.mapping.slice(s).map(n+1+o+r.index);t.replaceWith(l,l+1,e.type.schema.linebreakReplacement.create())}}})}function Pxe(t,e,n,s){e.forEach((i,o)=>{if(i.type==i.type.schema.linebreakReplacement){let r=t.mapping.slice(s).map(n+1+o);t.replaceWith(r,r+1,e.type.schema.text(` | |
| 118 | -`))}})}function Ixe(t,e,n){let s=t.resolve(e),i=s.index();return s.parent.canReplaceWith(i,i+1,n)}function Lxe(t,e,n,s,i){let o=t.doc.nodeAt(e);if(!o)throw new RangeError("No node at given position");n||(n=o.type);let r=n.create(s,null,i||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 ci(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new it(et.from(r),0,0),1,!0))}function Mm(t,e,n=1,s){let i=t.resolve(e),o=i.depth-n,r=s&&s[s.length-1]||i.parent;if(o<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!r.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let c=i.depth-1,u=n-2;c>o;c--,u--){let d=i.node(c),h=i.index(c);if(d.type.spec.isolating)return!1;let f=d.content.cutByIndex(h,d.childCount),p=s&&s[u+1];p&&(f=f.replaceChild(0,p.type.create(p.attrs)));let m=s&&s[u]||d;if(!d.canReplace(h+1,d.childCount)||!m.type.validContent(f))return!1}let a=i.indexAfter(o),l=s&&s[0];return i.node(o).canReplaceWith(a,a,l?l.type:i.node(o+1).type)}function Oxe(t,e,n=1,s){let i=t.doc.resolve(e),o=et.empty,r=et.empty;for(let a=i.depth,l=i.depth-n,c=n-1;a>l;a--,c--){o=et.from(i.node(a).copy(o));let u=s&&s[c];r=et.from(u?u.type.create(u.attrs,r):i.node(a).copy(r))}t.step(new Fs(e,e,new it(o.append(r),n,n),!0))}function Ab(t,e){let n=t.resolve(e),s=n.index();return Dxe(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(s,s+1)}function Dxe(t,e){return!!(t&&e&&!t.isLeaf&&t.canAppend(e))}function Rxe(t,e,n){let s=new Fs(e-n,e+n,it.empty,!0);t.step(s)}function Vxe(t,e,n){let s=t.resolve(e);if(s.parent.canReplaceWith(s.index(),s.index(),n))return e;if(s.parentOffset==0)for(let i=s.depth-1;i>=0;i--){let o=s.index(i);if(s.node(i).canReplaceWith(o,o,n))return s.before(i+1);if(o>0)return null}if(s.parentOffset==s.parent.content.size)for(let i=s.depth-1;i>=0;i--){let o=s.indexAfter(i);if(s.node(i).canReplaceWith(o,o,n))return s.after(i+1);if(o<s.node(i).childCount)return null}return null}function Fxe(t,e,n){let s=t.resolve(e);if(!n.content.size)return e;let i=n.content;for(let o=0;o<n.openStart;o++)i=i.firstChild.content;for(let o=1;o<=(n.openStart==0&&n.size?2:1);o++)for(let r=s.depth;r>=0;r--){let a=r==s.depth?0:s.pos<=(s.start(r+1)+s.end(r+1))/2?-1:1,l=s.index(r)+(a>0?1:0),c=s.node(r),u=!1;if(o==1)u=c.canReplace(l,l,i);else{let d=c.contentMatchAt(l).findWrapping(i.firstChild.type);u=d&&c.canReplaceWith(l,l,d[0])}if(u)return a==0?s.pos:a<0?s.before(r+1):s.after(r+1)}return null}function j4(t,e,n=e,s=it.empty){if(e==n&&!s.size)return null;let i=t.resolve(e),o=t.resolve(n);return jF(i,o,s)?new Fs(e,n,s):new Nxe(i,o,s).fit()}function jF(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class Nxe{constructor(e,n,s){this.$from=e,this.$to=n,this.unplaced=s,this.frontier=[],this.placed=et.empty;for(let i=0;i<=e.depth;i++){let o=e.node(i);this.frontier.push({type:o.type,match:o.contentMatchAt(e.indexAfter(i))})}for(let i=e.depth;i>0;i--)this.placed=et.from(e.node(i).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,s=this.$from,i=this.close(e<0?this.$to:s.doc.resolve(e));if(!i)return null;let o=this.placed,r=s.depth,a=i.depth;for(;r&&a&&o.childCount==1;)o=o.firstChild.content,r--,a--;let l=new it(o,r,a);return e>-1?new ci(s.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||s.pos!=this.$to.pos?new Fs(s.pos,i.pos,l):null}findFittable(){let e=this.unplaced.openStart;for(let n=this.unplaced.content,s=0,i=this.unplaced.openEnd;s<e;s++){let o=n.firstChild;if(n.childCount>1&&(i=0),o.type.spec.isolating&&i<=s){e=s;break}n=o.content}for(let n=1;n<=2;n++)for(let s=n==1?e:this.unplaced.openStart;s>=0;s--){let i,o=null;s?(o=hw(this.unplaced.content,s-1).firstChild,i=o.content):i=this.unplaced.content;let r=i.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(et.from(r),!1)):o&&l.compatibleContent(o.type)))return{sliceDepth:s,frontierDepth:a,parent:o,inject:d};if(n==2&&r&&(u=c.findWrapping(r.type)))return{sliceDepth:s,frontierDepth:a,parent:o,wrap:u};if(o&&c.matchType(o.type))break}}}openMore(){let{content:e,openStart:n,openEnd:s}=this.unplaced,i=hw(e,n);return!i.childCount||i.firstChild.isLeaf?!1:(this.unplaced=new it(e,n+1,Math.max(s,i.size+n>=e.size-s?n+1:0)),!0)}dropNode(){let{content:e,openStart:n,openEnd:s}=this.unplaced,i=hw(e,n);if(i.childCount<=1&&n>0){let o=e.size-n<=n+i.size;this.unplaced=new it(Vp(e,n-1,1),n-1,o?n-1:s)}else this.unplaced=new it(Vp(e,n,1),n,s)}placeNodes({sliceDepth:e,frontierDepth:n,parent:s,inject:i,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=s?s.content:r.content,l=r.openStart-e,c=0,u=[],{match:d,type:h}=this.frontier[n];if(i){for(let m=0;m<i.childCount;m++)u.push(i.child(m));d=d.matchFragment(i)}let f=a.size+e-(r.content.size-r.openEnd);for(;c<a.childCount;){let m=a.child(c),b=d.matchType(m.type);if(!b)break;c++,(c>1||l==0||m.content.size)&&(d=b,u.push(WF(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=Fp(this.placed,n,et.from(u)),this.frontier[n].match=d,p&&f<0&&s&&s.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let m=0,b=a;m<f;m++){let y=b.lastChild;this.frontier.push({type:y.type,match:y.contentMatchAt(y.childCount)}),b=y.content}this.unplaced=p?e==0?it.empty:new it(Vp(r.content,e-1,1),e-1,f<0?r.openEnd:e-1):new it(Vp(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||!fw(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:s}=this.$to,i=this.$to.after(s);for(;s>1&&i==this.$to.end(--s);)++i;return i}findCloseLevel(e){e:for(let n=Math.min(this.depth,e.depth);n>=0;n--){let{match:s,type:i}=this.frontier[n],o=n<e.depth&&e.end(n+1)==e.pos+(e.depth-(n+1)),r=fw(e,n,i,s,o);if(r){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=fw(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=Fp(this.placed,n.depth,n.fit)),e=n.move;for(let s=n.depth+1;s<=e.depth;s++){let i=e.node(s),o=i.type.contentMatch.fillBefore(i.content,!0,e.index(s));this.openFrontierNode(i.type,i.attrs,o)}return e}openFrontierNode(e,n=null,s){let i=this.frontier[this.depth];i.match=i.match.matchType(e),this.placed=Fp(this.placed,this.depth,et.from(e.create(n,s))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(et.empty,!0);n.childCount&&(this.placed=Fp(this.placed,this.frontier.length,n))}}function Vp(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(Vp(t.firstChild.content,e-1,n)))}function Fp(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(Fp(t.lastChild.content,e-1,n)))}function hw(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function WF(t,e,n){if(e<=0)return t;let s=t.content;return e>1&&(s=s.replaceChild(0,WF(s.firstChild,e-1,s.childCount==1?n-1:0))),e>0&&(s=t.type.contentMatch.fillBefore(s).append(s),n<=0&&(s=s.append(t.type.contentMatch.matchFragment(s).fillBefore(et.empty,!0)))),t.copy(s)}function fw(t,e,n,s,i){let o=t.node(e),r=i?t.indexAfter(e):t.index(e);if(r==o.childCount&&!n.compatibleContent(o.type))return null;let a=s.fillBefore(o.content,!0,r);return a&&!Bxe(n,o.content,r)?a:null}function Bxe(t,e,n){for(let s=n;s<e.childCount;s++)if(!t.allowsMarks(e.child(s).marks))return!0;return!1}function zxe(t){return t.spec.defining||t.spec.definingForContent}function Hxe(t,e,n,s){if(!s.size)return t.deleteRange(e,n);let i=t.doc.resolve(e),o=t.doc.resolve(n);if(jF(i,o,s))return t.step(new Fs(e,n,s));let r=GF(i,t.doc.resolve(n));r[r.length-1]==0&&r.pop();let a=-(i.depth+1);r.unshift(a);for(let h=i.depth,f=i.pos-1;h>0;h--,f--){let p=i.node(h).type.spec;if(p.defining||p.definingAsContext||p.isolating)break;r.indexOf(h)>-1?a=h:i.before(h)==f&&r.splice(1,0,-h)}let l=r.indexOf(a),c=[],u=s.openStart;for(let h=s.content,f=0;;f++){let p=h.firstChild;if(c.push(p),f==s.openStart)break;h=p.content}for(let h=u-1;h>=0;h--){let f=c[h],p=zxe(f.type);if(p&&!f.sameMarkup(i.node(Math.abs(a)-1)))u=h;else if(p||!f.type.isTextblock)break}for(let h=s.openStart;h>=0;h--){let f=(h+u+1)%(s.openStart+1),p=c[f];if(p)for(let m=0;m<r.length;m++){let b=r[(m+l)%r.length],y=!0;b<0&&(y=!1,b=-b);let C=i.node(b-1),k=i.index(b-1);if(C.canReplaceWith(k,k,p.type,p.marks))return t.replace(i.before(b),y?o.after(b):n,new it(YF(s.content,0,s.openStart,f),f,s.openEnd))}}let d=t.steps.length;for(let h=r.length-1;h>=0&&(t.replace(e,n,s),!(t.steps.length>d));h--){let f=r[h];f<0||(e=i.before(f),n=o.after(f))}}function YF(t,e,n,s,i){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(YF(o.content,e+1,n,s,o)))}if(e>s){let o=i.contentMatchAt(0),r=o.fillBefore(t).append(t);t=r.append(o.matchFragment(r).fillBefore(et.empty,!0))}return t}function Uxe(t,e,n,s){if(!s.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let i=Vxe(t.doc,e,s.type);i!=null&&(e=n=i)}t.replaceRange(e,n,new it(et.from(s),0,0))}function jxe(t,e,n){let s=t.doc.resolve(e),i=t.doc.resolve(n),o=GF(s,i);for(let r=0;r<o.length;r++){let a=o[r],l=r==o.length-1;if(l&&a==0||s.node(a).type.contentMatch.validEnd)return t.delete(s.start(a),i.end(a));if(a>0&&(l||s.node(a-1).canReplace(s.index(a-1),i.indexAfter(a-1))))return t.delete(s.before(a),i.after(a))}for(let r=1;r<=s.depth&&r<=i.depth;r++)if(e-s.start(r)==s.depth-r&&n>s.end(r)&&i.end(r)-n!=i.depth-r)return t.delete(s.before(r),n);t.delete(e,n)}function GF(t,e){let n=[],s=Math.min(t.depth,e.depth);for(let i=s;i>=0;i--){let o=t.start(i);if(o<t.pos-(t.depth-i)||e.end(i)>e.pos+(e.depth-i)||t.node(i).type.spec.isolating||e.node(i).type.spec.isolating)break;(o==e.start(i)||i==t.depth&&i==e.depth&&t.parent.inlineContent&&e.parent.inlineContent&&i&&e.start(i-1)==o-1)&&n.push(i)}return n}class Lh extends hi{constructor(e,n,s){super(),this.pos=e,this.attr=n,this.value=s}apply(e){let n=e.nodeAt(this.pos);if(!n)return gs.fail("No node at attribute step's position");let s=Object.create(null);for(let o in n.attrs)s[o]=n.attrs[o];s[this.attr]=this.value;let i=n.type.create(s,null,n.marks);return gs.fromReplace(e,this.pos,this.pos+1,new it(et.from(i),0,n.isLeaf?0:1))}getMap(){return co.empty}invert(e){return new Lh(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 Lh(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 Lh(n.pos,n.attr,n.value)}}hi.jsonID("attr",Lh);class kg extends hi{constructor(e,n){super(),this.attr=e,this.value=n}apply(e){let n=Object.create(null);for(let i in e.attrs)n[i]=e.attrs[i];n[this.attr]=this.value;let s=e.type.create(n,e.content,e.marks);return gs.ok(s)}getMap(){return co.empty}invert(e){return new kg(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 kg(n.attr,n.value)}}hi.jsonID("docAttr",kg);let Cf=class extends Error{};Cf=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Cf.prototype=Object.create(Error.prototype);Cf.prototype.constructor=Cf;Cf.prototype.name="TransformError";class qF{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Ih}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Cf(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,s=it.empty){let i=j4(this.doc,e,n,s);return i&&this.step(i),this}replaceWith(e,n,s){return this.replace(e,n,new it(et.from(s),0,0))}delete(e,n){return this.replace(e,n,it.empty)}insert(e,n){return this.replaceWith(e,e,n)}replaceRange(e,n,s){return Hxe(this,e,n,s),this}replaceRangeWith(e,n,s){return Uxe(this,e,n,s),this}deleteRange(e,n){return jxe(this,e,n),this}lift(e,n){return Sxe(this,e,n),this}join(e,n=1){return Rxe(this,e,n),this}wrap(e,n){return Mxe(this,e,n),this}setBlockType(e,n=e,s,i=null){return Exe(this,e,n,s,i),this}setNodeMarkup(e,n,s=null,i){return Lxe(this,e,n,s,i),this}setNodeAttribute(e,n,s){return this.step(new Lh(e,n,s)),this}setDocAttribute(e,n){return this.step(new kg(e,n)),this}addNodeMark(e,n){return this.step(new ec(e,n)),this}removeNodeMark(e,n){if(!(n instanceof bn)){let s=this.doc.nodeAt(e);if(!s)throw new RangeError("No node at position "+e);if(n=n.isInSet(s.marks),!n)return this}return this.step(new wf(e,n)),this}split(e,n=1,s){return Oxe(this,e,n,s),this}addMark(e,n,s){return Cxe(this,e,n,s),this}removeMark(e,n,s){return kxe(this,e,n,s),this}clearIncompatible(e,n,s){return UF(this,e,n,s),this}}const pw=Object.create(null);class Ot{constructor(e,n,s){this.$anchor=e,this.$head=n,this.ranges=s||[new J_(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=it.empty){let s=n.content.lastChild,i=null;for(let a=0;a<n.openEnd;a++)i=s,s=s.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?it.empty:n),a==0&&GA(e,o,(s?s.isInline:i&&i.isTextblock)?-1:1)}}replaceWith(e,n){let s=e.steps.length,i=this.ranges;for(let o=0;o<i.length;o++){let{$from:r,$to:a}=i[o],l=e.mapping.slice(s),c=l.map(r.pos),u=l.map(a.pos);o?e.deleteRange(c,u):(e.replaceRangeWith(c,u,n),GA(e,s,n.isInline?-1:1))}}static findFrom(e,n,s=!1){let i=e.parent.inlineContent?new St(e):rh(e.node(0),e.parent,e.pos,e.index(),n,s);if(i)return i;for(let o=e.depth-1;o>=0;o--){let r=n<0?rh(e.node(0),e.node(o),e.before(o+1),e.index(o),n,s):rh(e.node(0),e.node(o),e.after(o+1),e.index(o)+1,n,s);if(r)return r}return null}static near(e,n=1){return this.findFrom(e,n)||this.findFrom(e,-n)||new go(e.node(0))}static atStart(e){return rh(e,e,0,0,1)||new go(e)}static atEnd(e){return rh(e,e,e.content.size,e.childCount,-1)||new go(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let s=pw[n.type];if(!s)throw new RangeError(`No selection type ${n.type} defined`);return s.fromJSON(e,n)}static jsonID(e,n){if(e in pw)throw new RangeError("Duplicate use of selection JSON ID "+e);return pw[e]=n,n.prototype.jsonID=e,n}getBookmark(){return St.between(this.$anchor,this.$head).getBookmark()}}Ot.prototype.visible=!0;class J_{constructor(e,n){this.$from=e,this.$to=n}}let WA=!1;function YA(t){!WA&&!t.parent.inlineContent&&(WA=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class St extends Ot{constructor(e,n=e){YA(e),YA(n),super(e,n)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,n){let s=e.resolve(n.map(this.head));if(!s.parent.inlineContent)return Ot.near(s);let i=e.resolve(n.map(this.anchor));return new St(i.parent.inlineContent?i:s,s)}replace(e,n=it.empty){if(super.replace(e,n),n==it.empty){let s=this.$from.marksAcross(this.$to);s&&e.ensureMarks(s)}}eq(e){return e instanceof St&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new Mb(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 St(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,s=n){let i=e.resolve(n);return new this(i,s==n?i:e.resolve(s))}static between(e,n,s){let i=e.pos-n.pos;if((!s||i)&&(s=i>=0?1:-1),!n.parent.inlineContent){let o=Ot.findFrom(n,s,!0)||Ot.findFrom(n,-s,!0);if(o)n=o.$head;else return Ot.near(n,s)}return e.parent.inlineContent||(i==0?e=n:(e=(Ot.findFrom(e,-s,!0)||Ot.findFrom(e,s,!0)).$anchor,e.pos<n.pos!=i<0&&(e=n))),new St(e,n)}}Ot.jsonID("text",St);class Mb{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Mb(e.map(this.anchor),e.map(this.head))}resolve(e){return St.between(e.resolve(this.anchor),e.resolve(this.head))}}class At extends Ot{constructor(e){let n=e.nodeAfter,s=e.node(0).resolve(e.pos+n.nodeSize);super(e,s),this.node=n}map(e,n){let{deleted:s,pos:i}=n.mapResult(this.anchor),o=e.resolve(i);return s?Ot.near(o):new At(o)}content(){return new it(et.from(this.node),0,0)}eq(e){return e instanceof At&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new W4(this.anchor)}static fromJSON(e,n){if(typeof n.anchor!="number")throw new RangeError("Invalid input for NodeSelection.fromJSON");return new At(e.resolve(n.anchor))}static create(e,n){return new At(e.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}}At.prototype.visible=!1;Ot.jsonID("node",At);class W4{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:s}=e.mapResult(this.anchor);return n?new Mb(s,s):new W4(s)}resolve(e){let n=e.resolve(this.anchor),s=n.nodeAfter;return s&&At.isSelectable(s)?new At(n):Ot.near(n)}}class go extends Ot{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,n=it.empty){if(n==it.empty){e.delete(0,e.doc.content.size);let s=Ot.atStart(e.doc);s.eq(e.selection)||e.setSelection(s)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new go(e)}map(e){return new go(e)}eq(e){return e instanceof go}getBookmark(){return Wxe}}Ot.jsonID("all",go);const Wxe={map(){return this},resolve(t){return new go(t)}};function rh(t,e,n,s,i,o=!1){if(e.inlineContent)return St.create(t,n);for(let r=s-(i>0?0:1);i>0?r<e.childCount:r>=0;r+=i){let a=e.child(r);if(a.isAtom){if(!o&&At.isSelectable(a))return At.create(t,n-(i<0?a.nodeSize:0))}else{let l=rh(t,a,n+i,i<0?a.childCount:0,i,o);if(l)return l}n+=a.nodeSize*i}return null}function GA(t,e,n){let s=t.steps.length-1;if(s<e)return;let i=t.steps[s];if(!(i instanceof Fs||i instanceof ci))return;let o=t.mapping.maps[s],r;o.forEach((a,l,c,u)=>{r==null&&(r=u)}),t.setSelection(Ot.near(t.doc.resolve(r),n))}const qA=1,b0=2,XA=4;class Yxe extends qF{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|qA)&~b0,this.storedMarks=null,this}get selectionSet(){return(this.updated&qA)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=b0,this}ensureMarks(e){return bn.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&b0)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~b0,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,n=!0){let s=this.selection;return n&&(e=e.mark(this.storedMarks||(s.empty?s.$from.marks():s.$from.marksAcross(s.$to)||bn.none))),s.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,n,s){let i=this.doc.type.schema;if(n==null)return e?this.replaceSelectionWith(i.text(e),!0):this.deleteSelection();{if(s==null&&(s=n),s=s??n,!e)return this.deleteRange(n,s);let o=this.storedMarks;if(!o){let r=this.doc.resolve(n);o=s==n?r.marks():r.marksAcross(this.doc.resolve(s))}return this.replaceRangeWith(n,s,i.text(e,o)),this.selection.empty||this.setSelection(Ot.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|=XA,this}get scrolledIntoView(){return(this.updated&XA)>0}}function KA(t,e){return!e||!t?t:t.bind(e)}class Np{constructor(e,n,s){this.name=e,this.init=KA(n.init,s),this.apply=KA(n.apply,s)}}const Gxe=[new Np("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new Np("selection",{init(t,e){return t.selection||Ot.atStart(e.doc)},apply(t){return t.selection}}),new Np("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,s){return s.selection.$cursor?t.storedMarks:null}}),new Np("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class mw{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=Gxe.slice(),n&&n.forEach(s=>{if(this.pluginsByKey[s.key])throw new RangeError("Adding different instances of a keyed plugin ("+s.key+")");this.plugins.push(s),this.pluginsByKey[s.key]=s,s.spec.state&&this.fields.push(new Np(s.key,s.spec.state,s))})}}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 s=0;s<this.config.plugins.length;s++)if(s!=n){let i=this.config.plugins[s];if(i.spec.filterTransaction&&!i.spec.filterTransaction.call(i,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let n=[e],s=this.applyInner(e),i=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=i?i[r].n:0,c=i?i[r].state:this,u=l<n.length&&a.spec.appendTransaction.call(a,l?n.slice(l):n,c,s);if(u&&s.filterTransaction(u,r)){if(u.setMeta("appendedTransaction",e),!i){i=[];for(let d=0;d<this.config.plugins.length;d++)i.push(d<r?{state:s,n:n.length}:{state:this,n:0})}n.push(u),s=s.applyInner(u),o=!0}i&&(i[r]={state:s,n:n.length})}}if(!o)return{state:s,transactions:n}}}applyInner(e){if(!e.before.eq(this.doc))throw new RangeError("Applying a mismatched transaction");let n=new pu(this.config),s=this.config.fields;for(let i=0;i<s.length;i++){let o=s[i];n[o.name]=o.apply(e,this[o.name],this,n)}return n}get tr(){return new Yxe(this)}static create(e){let n=new mw(e.doc?e.doc.type.schema:e.schema,e.plugins),s=new pu(n);for(let i=0;i<n.fields.length;i++)s[n.fields[i].name]=n.fields[i].init(e,s);return s}reconfigure(e){let n=new mw(this.schema,e.plugins),s=n.fields,i=new pu(n);for(let o=0;o<s.length;o++){let r=s[o].name;i[r]=this.hasOwnProperty(r)?this[r]:s[o].init(e,i)}return i}toJSON(e){let n={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(n.storedMarks=this.storedMarks.map(s=>s.toJSON())),e&&typeof e=="object")for(let s in e){if(s=="doc"||s=="selection")throw new RangeError("The JSON fields `doc` and `selection` are reserved");let i=e[s],o=i.spec.state;o&&o.toJSON&&(n[s]=o.toJSON.call(i,this[i.key]))}return n}static fromJSON(e,n,s){if(!n)throw new RangeError("Invalid input for EditorState.fromJSON");if(!e.schema)throw new RangeError("Required config field 'schema' missing");let i=new mw(e.schema,e.plugins),o=new pu(i);return i.fields.forEach(r=>{if(r.name=="doc")o.doc=oc.fromJSON(e.schema,n.doc);else if(r.name=="selection")o.selection=Ot.fromJSON(o.doc,n.selection);else if(r.name=="storedMarks")n.storedMarks&&(o.storedMarks=n.storedMarks.map(e.schema.markFromJSON));else{if(s)for(let a in s){let l=s[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 XF(t,e,n){for(let s in t){let i=t[s];i instanceof Function?i=i.bind(e):s=="handleDOMEvents"&&(i=XF(i,e,{})),n[s]=i}return n}class Yn{constructor(e){this.spec=e,this.props={},e.props&&XF(e.props,this,this.props),this.key=e.key?e.key.key:KF("plugin")}getState(e){return e[this.key]}}const gw=Object.create(null);function KF(t){return t in gw?t+"$"+ ++gw[t]:(gw[t]=0,t+"$")}class Kn{constructor(e="key"){this.key=KF(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}class to{constructor(e,n,s={}){this.match=e,this.match=e,this.handler=typeof n=="string"?qxe(n):n,this.undoable=s.undoable!==!1,this.inCode=s.inCode||!1}}function qxe(t){return function(e,n,s,i){let o=t;if(n[1]){let r=n[0].lastIndexOf(n[1]);o+=n[0].slice(r+n[1].length),s+=r;let a=s-i;a>0&&(o=n[0].slice(r-a,r)+o,s=i)}return e.tr.insertText(o,s,i)}}const Xxe=500;function Kxe({rules:t}){let e=new Yn({state:{init(){return null},apply(n,s){let i=n.getMeta(this);return i||(n.selectionSet||n.docChanged?null:s)}},props:{handleTextInput(n,s,i,o){return ZA(n,s,i,o,t,e)},handleDOMEvents:{compositionend:n=>{setTimeout(()=>{let{$cursor:s}=n.state.selection;s&&ZA(n,s.pos,s.pos,"",t,e)})}}},isInputRules:!0});return e}function ZA(t,e,n,s,i,o){if(t.composing)return!1;let r=t.state,a=r.doc.resolve(e),l=a.parent.textBetween(Math.max(0,a.parentOffset-Xxe),a.parentOffset,null,"")+s;for(let c=0;c<i.length;c++){let u=i[c];if(a.parent.type.spec.code){if(!u.inCode)continue}else if(u.inCode==="only")continue;let d=u.match.exec(l),h=d&&u.handler(r,d,e-(d[0].length-s.length),n);if(h)return u.undoable&&h.setMeta(o,{transform:h,from:e,to:n,text:s}),t.dispatch(h),!0}return!1}const Zxe=(t,e)=>{let n=t.plugins;for(let s=0;s<n.length;s++){let i=n[s],o;if(i.spec.isInputRules&&(o=i.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 to(/--$/,"—");new to(/\.\.\.$/,"…");new to(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“");new to(/"$/,"”");new to(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘");new to(/'$/,"’");function Y4(t,e,n=null,s){return new to(t,(i,o,r,a)=>{let l=n instanceof Function?n(o):n,c=i.tr.delete(r,a),u=c.doc.resolve(r),d=u.blockRange(),h=d&&U4(d,e,l);if(!h)return null;c.wrap(d,h);let f=c.doc.resolve(r-1).nodeBefore;return f&&f.type==e&&Ab(c.doc,r-1)&&(!s||s(o,f))&&c.join(r-1),c})}function ZF(t,e,n=null){return new to(t,(s,i,o,r)=>{let a=s.doc.resolve(o),l=n instanceof Function?n(i):n;return a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),e)?s.tr.delete(o,r).setBlockType(o,o,e,l):null})}const bc=typeof navigator<"u"?navigator:null,JA=typeof document<"u"?document:null,Oc=bc&&bc.userAgent||"",rC=/Edge\/(\d+)/.exec(Oc),JF=/MSIE \d/.exec(Oc),aC=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Oc),Eb=!!(JF||aC||rC),Jxe=JF?document.documentMode:aC?+aC[1]:rC?+rC[1]:0,QF=!Eb&&/gecko\/(\d+)/i.test(Oc),Qxe=QF&&+(/Firefox\/(\d+)/.exec(Oc)||[0,0])[1],lC=!Eb&&/Chrome\/(\d+)/.exec(Oc),e4e=!!lC,t4e=lC?+lC[1]:0,eN=!Eb&&!!bc&&/Apple Computer/.test(bc.vendor),tN=eN&&(/Mobile\/\w+/.test(Oc)||!!bc&&bc.maxTouchPoints>2),n4e=tN||(bc?/Mac/.test(bc.platform):!1),s4e=/Android \d/.test(Oc),nN=!!JA&&"webkitFontSmoothing"in JA.documentElement.style,i4e=nN?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;var w0=Object.freeze({__proto__:null,android:s4e,chrome:e4e,chrome_version:t4e,gecko:QF,gecko_version:Qxe,ie:Eb,ie_version:Jxe,ios:tN,mac:n4e,safari:eN,webkit:nN,webkit_version:i4e});function vw(t,e,n,s,i,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,"")+s;for(let c=0;c<i.length;c++){const u=i[c].match.exec(l),d=u&&u[0]&&i[c].handler(r,u,e-(u[0].length-s.length),n);if(d)return t.dispatch(d.setMeta(o,{transform:d,from:e,to:n,text:s})),!0}return!1}const o4e=new Kn("MILKDOWN_CUSTOM_INPUTRULES");function r4e({rules:t}){const e=new Yn({key:o4e,isInputRules:!0,state:{init(){return null},apply(n,s){const i=n.getMeta(this);return i||(n.selectionSet||n.docChanged?null:s)}},props:{handleTextInput(n,s,i,o){return vw(n,s,i,o,t,e)},handleDOMEvents:{compositionend:n=>(setTimeout(()=>{const{$cursor:s}=n.state.selection;s&&vw(n,s.pos,s.pos,"",t,e)}),!1)},handleKeyDown(n,s){if(s.key!=="Enter")return!1;const{$cursor:i}=n.state.selection;return i?vw(n,i.pos,i.pos,` | |
| 119 | -`,t,e):!1}}});return e}function g1(t,e,n={}){return new to(t,(s,i,o,r)=>{var a,l,c,u;const{tr:d}=s,h=i.length;let f=i[h-1],p=i[0],m=[],b=r;const y={group:f,fullMatch:p,start:o,end:r},C=(a=n.updateCaptured)==null?void 0:a.call(n,y);if(Object.assign(y,C),{group:f,fullMatch:p,start:o,end:r}=y,p===null||(f==null?void 0:f.trim())==="")return null;if(f){const k=p.search(/\S/),x=o+p.indexOf(f),S=x+f.length;m=(l=d.storedMarks)!=null?l:[],S<r&&d.delete(S,r),x>o&&d.delete(o+k,x),b=o+k+f.length;const E=(c=n.getAttr)==null?void 0:c.call(n,i);d.addMark(o,b,e.create(E)),d.setStoredMarks(m),(u=n.beforeDispatch)==null||u.call(n,{match:i,start:o,end:r,tr:d})}return d})}var a4e=Object.defineProperty,l4e=Object.defineProperties,c4e=Object.getOwnPropertyDescriptors,QA=Object.getOwnPropertySymbols,u4e=Object.prototype.hasOwnProperty,d4e=Object.prototype.propertyIsEnumerable,eM=(t,e,n)=>e in t?a4e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,h4e=(t,e)=>{for(var n in e||(e={}))u4e.call(e,n)&&eM(t,n,e[n]);if(QA)for(var n of QA(e))d4e.call(e,n)&&eM(t,n,e[n]);return t},f4e=(t,e)=>l4e(t,c4e(e));function tM(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function Tb(t,e,n){const i=t.state.doc.content.size,o=tM(e,0,i),r=tM(n,0,i),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,y={top:c,bottom:u,left:d,right:h,width:f,height:p,x:d,y:c};return f4e(h4e({},y),{toJSON:()=>y})}function Pb(t){return Object.assign(Object.create(t),t).setTime(Date.now())}function p4e(t,e){return Array.isArray(t)&&t.includes(e.type)||e.type===t}function G4(t){return e=>{for(let n=e.depth;n>0;n-=1){const s=e.node(n);if(t(s)){const i=e.before(n),o=e.after(n);return{from:i,to:o,node:s}}}}}function m4e(t,e){return G4(n=>n.type===e)(t)}function g4e(t,e){const n=e.nodes[t];if(!n)throw u3e("node",t);return n}function q4(t){return e=>{for(let n=e.depth;n>0;n--){const s=e.node(n);if(t(s))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:s}}}}function v4e(t){return e=>q4(t)(e.$from)}function _4e(t,e){if(!(t instanceof At))return;const{node:n,$from:s}=t;if(p4e(e,n))return{node:n,pos:s.pos,start:s.start(s.depth),depth:s.depth}}const X4=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function y4e(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const sN=(t,e,n)=>{let s=y4e(t,n);if(!s)return!1;let i=oN(s);if(!i){let r=s.blockRange(),a=r&&$b(r);return a==null?!1:(e&&e(t.tr.lift(r,a).scrollIntoView()),!0)}let o=i.nodeBefore;if(aN(t,i,e,-1))return!0;if(s.parent.content.size==0&&(kf(o,"end")||At.isSelectable(o)))for(let r=s.depth;;r--){let a=j4(t.doc,s.before(r),s.after(r),it.empty);if(a&&a.slice.size<a.to-a.from){if(e){let l=t.tr.step(a);l.setSelection(kf(o,"end")?Ot.findFrom(l.doc.resolve(l.mapping.map(i.pos,-1)),-1):At.create(l.doc,i.pos-o.nodeSize)),e(l.scrollIntoView())}return!0}if(r==1||s.node(r-1).childCount>1)break}return o.isAtom&&i.depth==s.depth-1?(e&&e(t.tr.delete(i.pos-o.nodeSize,i.pos).scrollIntoView()),!0):!1};function kf(t,e,n=!1){for(let s=t;s;s=e=="start"?s.firstChild:s.lastChild){if(s.isTextblock)return!0;if(n&&s.childCount!=1)return!1}return!1}const iN=(t,e,n)=>{let{$head:s,empty:i}=t.selection,o=s;if(!i)return!1;if(s.parent.isTextblock){if(n?!n.endOfTextblock("backward",t):s.parentOffset>0)return!1;o=oN(s)}let r=o&&o.nodeBefore;return!r||!At.isSelectable(r)?!1:(e&&e(t.tr.setSelection(At.create(t.doc,o.pos-r.nodeSize)).scrollIntoView()),!0)};function oN(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 b4e(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const w4e=(t,e,n)=>{let s=b4e(t,n);if(!s)return!1;let i=rN(s);if(!i)return!1;let o=i.nodeAfter;if(aN(t,i,e,1))return!0;if(s.parent.content.size==0&&(kf(o,"start")||At.isSelectable(o))){let r=j4(t.doc,s.before(),s.after(),it.empty);if(r&&r.slice.size<r.to-r.from){if(e){let a=t.tr.step(r);a.setSelection(kf(o,"start")?Ot.findFrom(a.doc.resolve(a.mapping.map(i.pos)),1):At.create(a.doc,a.mapping.map(i.pos))),e(a.scrollIntoView())}return!0}}return o.isAtom&&i.depth==s.depth-1?(e&&e(t.tr.delete(i.pos,i.pos+o.nodeSize).scrollIntoView()),!0):!1},C4e=(t,e,n)=>{let{$head:s,empty:i}=t.selection,o=s;if(!i)return!1;if(s.parent.isTextblock){if(n?!n.endOfTextblock("forward",t):s.parentOffset<s.parent.content.size)return!1;o=rN(s)}let r=o&&o.nodeAfter;return!r||!At.isSelectable(r)?!1:(e&&e(t.tr.setSelection(At.create(t.doc,o.pos)).scrollIntoView()),!0)};function rN(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 k4e=(t,e)=>{let{$head:n,$anchor:s}=t.selection;return!n.parent.type.spec.code||!n.sameParent(s)?!1:(e&&e(t.tr.insertText(` | |
| 120 | -`).scrollIntoView()),!0)};function K4(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 x4e=(t,e)=>{let{$head:n,$anchor:s}=t.selection;if(!n.parent.type.spec.code||!n.sameParent(s))return!1;let i=n.node(-1),o=n.indexAfter(-1),r=K4(i.contentMatchAt(o));if(!r||!i.canReplaceWith(o,o,r))return!1;if(e){let a=n.after(),l=t.tr.replaceWith(a,a,r.createAndFill());l.setSelection(Ot.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},S4e=(t,e)=>{let n=t.selection,{$from:s,$to:i}=n;if(n instanceof go||s.parent.inlineContent||i.parent.inlineContent)return!1;let o=K4(i.parent.contentMatchAt(i.indexAfter()));if(!o||!o.isTextblock)return!1;if(e){let r=(!s.parentOffset&&i.index()<i.parent.childCount?s:i).pos,a=t.tr.insert(r,o.createAndFill());a.setSelection(St.create(a.doc,r+1)),e(a.scrollIntoView())}return!0},$4e=(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(Mm(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let s=n.blockRange(),i=s&&$b(s);return i==null?!1:(e&&e(t.tr.lift(s,i).scrollIntoView()),!0)};function A4e(t){return(e,n)=>{let{$from:s,$to:i}=e.selection;if(e.selection instanceof At&&e.selection.node.isBlock)return!s.parentOffset||!Mm(e.doc,s.pos)?!1:(n&&n(e.tr.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;if(n){let o=i.parentOffset==i.parent.content.size,r=e.tr;(e.selection instanceof St||e.selection instanceof go)&&r.deleteSelection();let a=s.depth==0?null:K4(s.node(-1).contentMatchAt(s.indexAfter(-1))),l=t&&t(i.parent,o,s),c=l?[l]:o&&a?[{type:a}]:void 0,u=Mm(r.doc,r.mapping.map(s.pos),1,c);if(!c&&!u&&Mm(r.doc,r.mapping.map(s.pos),1,a?[{type:a}]:void 0)&&(a&&(c=[{type:a}]),u=!0),u&&(r.split(r.mapping.map(s.pos),1,c),!o&&!s.parentOffset&&s.parent.type!=a)){let d=r.mapping.map(s.before()),h=r.doc.resolve(d);a&&s.node(-1).canReplaceWith(h.index(),h.index()+1,a)&&r.setNodeMarkup(r.mapping.map(s.before()),a)}n(r.scrollIntoView())}return!0}}const M4e=A4e(),E4e=(t,e)=>(e&&e(t.tr.setSelection(new go(t.doc))),!0);function T4e(t,e,n){let s=e.nodeBefore,i=e.nodeAfter,o=e.index();return!s||!i||!s.type.compatibleContent(i.type)?!1:!s.content.size&&e.parent.canReplace(o-1,o)?(n&&n(t.tr.delete(e.pos-s.nodeSize,e.pos).scrollIntoView()),!0):!e.parent.canReplace(o,o+1)||!(i.isTextblock||Ab(t.doc,e.pos))?!1:(n&&n(t.tr.clearIncompatible(e.pos,s.type,s.contentMatchAt(s.childCount)).join(e.pos).scrollIntoView()),!0)}function aN(t,e,n,s){let i=e.nodeBefore,o=e.nodeAfter,r,a,l=i.type.spec.isolating||o.type.spec.isolating;if(!l&&T4e(t,e,n))return!0;let c=!l&&e.parent.canReplace(e.index(),e.index()+1);if(c&&(r=(a=i.contentMatchAt(i.childCount)).findWrapping(o.type))&&a.matchType(r[0]||o.type).validEnd){if(n){let f=e.pos+o.nodeSize,p=et.empty;for(let y=r.length-1;y>=0;y--)p=et.from(r[y].create(null,p));p=et.from(i.copy(p));let m=t.tr.step(new ci(e.pos-1,f,e.pos,f,new it(p,1,0),r.length,!0)),b=f+2*r.length;Ab(m.doc,b)&&m.join(b),n(m.scrollIntoView())}return!0}let u=o.type.spec.isolating||s>0&&l?null:Ot.findFrom(e,1),d=u&&u.$from.blockRange(u.$to),h=d&&$b(d);if(h!=null&&h>=e.depth)return n&&n(t.tr.lift(d,h).scrollIntoView()),!0;if(c&&kf(o,"start",!0)&&kf(i,"end")){let f=i,p=[];for(;p.push(f),!f.isTextblock;)f=f.lastChild;let m=o,b=1;for(;!m.isTextblock;m=m.firstChild)b++;if(f.canReplace(f.childCount,f.childCount,m.content)){if(n){let y=et.empty;for(let k=p.length-1;k>=0;k--)y=et.from(p[k].copy(y));let C=t.tr.step(new ci(e.pos-p.length,e.pos+o.nodeSize,e.pos+b,e.pos+o.nodeSize-b,new it(y,p.length,0),0,!0));n(C.scrollIntoView())}return!0}}return!1}function lN(t){return function(e,n){let s=e.selection,i=t<0?s.$from:s.$to,o=i.depth;for(;i.node(o).isInline;){if(!o)return!1;o--}return i.node(o).isTextblock?(n&&n(e.tr.setSelection(St.create(e.doc,t<0?i.start(o):i.end(o)))),!0):!1}}const P4e=lN(-1),I4e=lN(1);function Z4(t,e=null){return function(n,s){let{$from:i,$to:o}=n.selection,r=i.blockRange(o),a=r&&U4(r,t,e);return a?(s&&s(n.tr.wrap(r,a).scrollIntoView()),!0):!1}}function xg(t,e=null){return function(n,s){let i=!1;for(let o=0;o<n.selection.ranges.length&&!i;o++){let{$from:{pos:r},$to:{pos:a}}=n.selection.ranges[o];n.doc.nodesBetween(r,a,(l,c)=>{if(i)return!1;if(!(!l.isTextblock||l.hasMarkup(t,e)))if(l.type==t)i=!0;else{let u=n.doc.resolve(c),d=u.index();i=u.parent.canReplaceWith(d,d+1,t)}})}if(!i)return!1;if(s){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)}s(o.scrollIntoView())}return!0}}function L4e(t,e,n,s){for(let i=0;i<e.length;i++){let{$from:o,$to:r}=e[i],a=o.depth==0?t.inlineContent&&t.type.allowsMarkType(n):!1;if(t.nodesBetween(o.pos,r.pos,(l,c)=>{if(a||!s&&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 O4e(t){let e=[];for(let n=0;n<t.length;n++){let{$from:s,$to:i}=t[n];s.doc.nodesBetween(s.pos,i.pos,(o,r)=>{if(o.isAtom&&o.content.size&&o.isInline&&r>=s.pos&&r+o.nodeSize<=i.pos)return r+1>s.pos&&e.push(new J_(s,s.doc.resolve(r+1))),s=s.doc.resolve(r+1+o.content.size),!1}),s.pos<i.pos&&e.push(new J_(s,i))}return e}function Ib(t,e=null,n){let s=(n&&n.removeWhenPresent)!==!1,i=(n&&n.enterInlineAtoms)!==!1;return function(o,r){let{empty:a,$cursor:l,ranges:c}=o.selection;if(a&&!l||!L4e(o.doc,c,t,i))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;i||(c=O4e(c)),s?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,b)=>{if(f)return!1;f=!t.isInSet(p.marks)&&!!b&&b.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,b=p.pos,y=f.nodeAfter,C=p.nodeBefore,k=y&&y.isText?/^\s*/.exec(y.text)[0].length:0,x=C&&C.isText?/\s*$/.exec(C.text)[0].length:0;m+k<b&&(m+=k,b-=x),d.addMark(m,b,t.create(e))}}r(d.scrollIntoView())}return!0}}function Lb(...t){return function(e,n,s){for(let i=0;i<t.length;i++)if(t[i](e,n,s))return!0;return!1}}let _w=Lb(X4,sN,iN),nM=Lb(X4,w4e,C4e);const za={Enter:Lb(k4e,S4e,$4e,M4e),"Mod-Enter":x4e,Backspace:_w,"Mod-Backspace":_w,"Shift-Backspace":_w,Delete:nM,"Mod-Delete":nM,"Mod-a":E4e},cN={"Ctrl-h":za.Backspace,"Alt-Backspace":za["Mod-Backspace"],"Ctrl-d":za.Delete,"Ctrl-Alt-Backspace":za["Mod-Delete"],"Alt-Delete":za["Mod-Delete"],"Alt-d":za["Mod-Delete"],"Ctrl-a":P4e,"Ctrl-e":I4e};for(let t in za)cN[t]=za[t];const D4e=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,R4e=D4e?cN:za;var wc={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:"'"},Q_={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},V4e=typeof navigator<"u"&&/Mac/.test(navigator.platform),F4e=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Ns=0;Ns<10;Ns++)wc[48+Ns]=wc[96+Ns]=String(Ns);for(var Ns=1;Ns<=24;Ns++)wc[Ns+111]="F"+Ns;for(var Ns=65;Ns<=90;Ns++)wc[Ns]=String.fromCharCode(Ns+32),Q_[Ns]=String.fromCharCode(Ns);for(var yw in wc)Q_.hasOwnProperty(yw)||(Q_[yw]=wc[yw]);function N4e(t){var e=V4e&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||F4e&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Q_:wc)[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 B4e=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function z4e(t){let e=t.split(/-(?!$)/),n=e[e.length-1];n=="Space"&&(n=" ");let s,i,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))s=!0;else if(/^(c|ctrl|control)$/i.test(l))i=!0;else if(/^s(hift)?$/i.test(l))o=!0;else if(/^mod$/i.test(l))B4e?r=!0:i=!0;else throw new Error("Unrecognized modifier name: "+l)}return s&&(n="Alt-"+n),i&&(n="Ctrl-"+n),r&&(n="Meta-"+n),o&&(n="Shift-"+n),n}function H4e(t){let e=Object.create(null);for(let n in t)e[z4e(n)]=t[n];return e}function bw(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 uN(t){return new Yn({props:{handleKeyDown:dN(t)}})}function dN(t){let e=H4e(t);return function(n,s){let i=N4e(s),o,r=e[bw(i,s)];if(r&&r(n.state,n.dispatch,n))return!0;if(i.length==1&&i!=" "){if(s.shiftKey){let a=e[bw(i,s,!1)];if(a&&a(n.state,n.dispatch,n))return!0}if((s.shiftKey||s.altKey||s.metaKey||i.charCodeAt(0)>127)&&(o=wc[s.keyCode])&&o!=i){let a=e[bw(o,s)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const Bs=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},Sg=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let cC=null;const Na=function(t,e,n){let s=cC||(cC=document.createRange());return s.setEnd(t,n??t.nodeValue.length),s.setStart(t,e||0),s},U4e=function(){cC=null},Zu=function(t,e,n,s){return n&&(sM(t,e,n,s,-1)||sM(t,e,n,s,1))},j4e=/^(img|br|input|textarea|hr)$/i;function sM(t,e,n,s,i){for(;;){if(t==n&&e==s)return!0;if(e==(i<0?0:Bo(t))){let o=t.parentNode;if(!o||o.nodeType!=1||v1(t)||j4e.test(t.nodeName)||t.contentEditable=="false")return!1;e=Bs(t)+(i<0?0:1),t=o}else if(t.nodeType==1){if(t=t.childNodes[e+(i<0?-1:0)],t.contentEditable=="false")return!1;e=i<0?Bo(t):0}else return!1}}function Bo(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function W4e(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=Bo(t)}else if(t.parentNode&&!v1(t))e=Bs(t),t=t.parentNode;else return null}}function Y4e(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=Bs(t)+1,t=t.parentNode;else return null}}function G4e(t,e,n){for(let s=e==0,i=e==Bo(t);s||i;){if(t==n)return!0;let o=Bs(t);if(t=t.parentNode,!t)return!1;s=s&&o==0,i=i&&o==Bo(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 Ob=function(t){return t.focusNode&&Zu(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function ru(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function q4e(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function X4e(t,e,n){if(t.caretPositionFromPoint)try{let s=t.caretPositionFromPoint(e,n);if(s)return{node:s.offsetNode,offset:Math.min(Bo(s.offsetNode),s.offset)}}catch{}if(t.caretRangeFromPoint){let s=t.caretRangeFromPoint(e,n);if(s)return{node:s.startContainer,offset:Math.min(Bo(s.startContainer),s.startOffset)}}}const pa=typeof navigator<"u"?navigator:null,iM=typeof document<"u"?document:null,Dc=pa&&pa.userAgent||"",uC=/Edge\/(\d+)/.exec(Dc),hN=/MSIE \d/.exec(Dc),dC=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Dc),qi=!!(hN||dC||uC),rc=hN?document.documentMode:dC?+dC[1]:uC?+uC[1]:0,Rr=!qi&&/gecko\/(\d+)/i.test(Dc);Rr&&+(/Firefox\/(\d+)/.exec(Dc)||[0,0])[1];const hC=!qi&&/Chrome\/(\d+)/.exec(Dc),ri=!!hC,fN=hC?+hC[1]:0,Ei=!qi&&!!pa&&/Apple Computer/.test(pa.vendor),xf=Ei&&(/Mobile\/\w+/.test(Dc)||!!pa&&pa.maxTouchPoints>2),Oo=xf||(pa?/Mac/.test(pa.platform):!1),K4e=pa?/Win/.test(pa.platform):!1,dr=/Android \d/.test(Dc),_1=!!iM&&"webkitFontSmoothing"in iM.documentElement.style,Z4e=_1?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function J4e(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 Oa(t,e){return typeof t=="number"?t:t[e]}function Q4e(t){let e=t.getBoundingClientRect(),n=e.width/t.offsetWidth||1,s=e.height/t.offsetHeight||1;return{left:e.left,right:e.left+t.clientWidth*n,top:e.top,bottom:e.top+t.clientHeight*s}}function oM(t,e,n){let s=t.someProp("scrollThreshold")||0,i=t.someProp("scrollMargin")||5,o=t.dom.ownerDocument;for(let r=n||t.dom;r;r=Sg(r)){if(r.nodeType!=1)continue;let a=r,l=a==o.body,c=l?J4e(o):Q4e(a),u=0,d=0;if(e.top<c.top+Oa(s,"top")?d=-(c.top-e.top+Oa(i,"top")):e.bottom>c.bottom-Oa(s,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+Oa(i,"top")-c.top:e.bottom-c.bottom+Oa(i,"bottom")),e.left<c.left+Oa(s,"left")?u=-(c.left-e.left+Oa(i,"left")):e.right>c.right-Oa(s,"right")&&(u=e.right-c.right+Oa(i,"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 e8e(t){let e=t.dom.getBoundingClientRect(),n=Math.max(0,e.top),s,i;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){s=a,i=l.top;break}}return{refDOM:s,refTop:i,stack:pN(t.dom)}}function pN(t){let e=[],n=t.ownerDocument;for(let s=t;s&&(e.push({dom:s,top:s.scrollTop,left:s.scrollLeft}),t!=n);s=Sg(s));return e}function t8e({refDOM:t,refTop:e,stack:n}){let s=t?t.getBoundingClientRect().top:0;mN(n,s==0?0:s-e)}function mN(t,e){for(let n=0;n<t.length;n++){let{dom:s,top:i,left:o}=t[n];s.scrollTop!=i+e&&(s.scrollTop=i+e),s.scrollLeft!=o&&(s.scrollLeft=o)}}let Fd=null;function n8e(t){if(t.setActive)return t.setActive();if(Fd)return t.focus(Fd);let e=pN(t);t.focus(Fd==null?{get preventScroll(){return Fd={preventScroll:!0},!0}}:void 0),Fd||(Fd=!1,mN(e,0))}function gN(t,e){let n,s=2e8,i,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=Na(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<s){n=u,s=m,i=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,i=c,s=0),n&&n.nodeType==3?s8e(n,i):!n||s&&n.nodeType==1?{node:t,offset:o}:gN(n,i)}function s8e(t,e){let n=t.nodeValue.length,s=document.createRange();for(let i=0;i<n;i++){s.setEnd(t,i+1),s.setStart(t,i);let o=Tl(s,1);if(o.top!=o.bottom&&J4(e,o))return{node:t,offset:i+(e.left>=(o.left+o.right)/2?1:0)}}return{node:t,offset:0}}function J4(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function i8e(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:s,offset:i}=gN(e,n),o=-1;if(s.nodeType==1&&!s.firstChild){let r=s.getBoundingClientRect();o=r.left!=r.right&&n.left>(r.left+r.right)/2?1:-1}return t.docView.posFromDOM(s,i,o)}function r8e(t,e,n,s){let i=-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>s.left||l.top>s.top?i=a.posBefore:(!r&&l.right<s.left||l.bottom<s.top)&&(i=a.posAfter),r=!0),!a.contentDOM&&i<0&&!a.node.isText)return(a.node.isBlock?s.top<(l.top+l.bottom)/2:s.left<(l.left+l.right)/2)?a.posBefore:a.posAfter}o=a.dom.parentNode}return i>-1?i:t.docView.posFromDOM(e,n,-1)}function vN(t,e,n){let s=t.childNodes.length;if(s&&n.top<n.bottom)for(let i=Math.max(0,Math.min(s-1,Math.floor(s*(e.top-n.top)/(n.bottom-n.top))-2)),o=i;;){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(J4(e,c))return vN(r,e,c)}}if((o=(o+1)%s)==i)break}return t}function a8e(t,e){let n=t.dom.ownerDocument,s,i=0,o=X4e(n,e.left,e.top);o&&({node:s,offset:i}=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(!J4(e,c)||(r=vN(t.dom,e,c),!r))return null}if(Ei)for(let c=r;s&&c;c=Sg(c))c.draggable&&(s=void 0);if(r=i8e(r,e),s){if(Rr&&s.nodeType==1&&(i=Math.min(i,s.childNodes.length),i<s.childNodes.length)){let u=s.childNodes[i],d;u.nodeName=="IMG"&&(d=u.getBoundingClientRect()).right<=e.left&&d.bottom>e.top&&i++}let c;_1&&i&&s.nodeType==1&&(c=s.childNodes[i-1]).nodeType==1&&c.contentEditable=="false"&&c.getBoundingClientRect().top>=e.top&&i--,s==t.dom&&i==s.childNodes.length-1&&s.lastChild.nodeType==1&&e.top>s.lastChild.getBoundingClientRect().bottom?a=t.state.doc.content.size:(i==0||s.nodeType!=1||s.childNodes[i-1].nodeName!="BR")&&(a=r8e(t,s,i,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 rM(t){return t.top<t.bottom||t.left<t.right}function Tl(t,e){let n=t.getClientRects();if(n.length){let s=n[e<0?0:n.length-1];if(rM(s))return s}return Array.prototype.find.call(n,rM)||t.getBoundingClientRect()}const l8e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function _N(t,e,n){let{node:s,offset:i,atom:o}=t.docView.domFromPos(e,n<0?-1:1),r=_1||Rr;if(s.nodeType==3)if(r&&(l8e.test(s.nodeValue)||(n<0?!i:i==s.nodeValue.length))){let l=Tl(Na(s,i,i),n);if(Rr&&i&&/\s/.test(s.nodeValue[i-1])&&i<s.nodeValue.length){let c=Tl(Na(s,i-1,i-1),-1);if(c.top==l.top){let u=Tl(Na(s,i,i+1),-1);if(u.top!=l.top)return _p(u,u.left<c.left)}}return l}else{let l=i,c=i,u=n<0?1:-1;return n<0&&!i?(c++,u=-1):n>=0&&i==s.nodeValue.length?(l--,u=1):n<0?l--:c++,_p(Tl(Na(s,l,c),u),u<0)}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&i&&(n<0||i==Bo(s))){let l=s.childNodes[i-1];if(l.nodeType==1)return ww(l.getBoundingClientRect(),!1)}if(o==null&&i<Bo(s)){let l=s.childNodes[i];if(l.nodeType==1)return ww(l.getBoundingClientRect(),!0)}return ww(s.getBoundingClientRect(),n>=0)}if(o==null&&i&&(n<0||i==Bo(s))){let l=s.childNodes[i-1],c=l.nodeType==3?Na(l,Bo(l)-(r?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return _p(Tl(c,1),!1)}if(o==null&&i<Bo(s)){let l=s.childNodes[i];for(;l.pmViewDesc&&l.pmViewDesc.ignoreForCoords;)l=l.nextSibling;let c=l?l.nodeType==3?Na(l,0,r?0:1):l.nodeType==1?l:null:null;if(c)return _p(Tl(c,-1),!0)}return _p(Tl(s.nodeType==3?Na(s):s,-n),n>=0)}function _p(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 ww(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 yN(t,e,n){let s=t.state,i=t.root.activeElement;s!=e&&t.updateState(e),i!=t.dom&&t.focus();try{return n()}finally{s!=e&&t.updateState(s),i!=t.dom&&i&&i.focus()}}function c8e(t,e,n){let s=e.selection,i=n=="up"?s.$from:s.$to;return yN(t,e,()=>{let{node:o}=t.docView.domFromPos(i.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=_N(t,i.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=Na(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 u8e=/[\u0590-\u08ac]/;function d8e(t,e,n){let{$head:s}=e.selection;if(!s.parent.isTextblock)return!1;let i=s.parentOffset,o=!i,r=i==s.parent.content.size,a=t.domSelection();return a?!u8e.test(s.parent.textContent)||!a.modify?n=="left"||n=="backward"?o:r:yN(t,e,()=>{let{focusNode:l,focusOffset:c,anchorNode:u,anchorOffset:d}=t.domSelectionRange(),h=a.caretBidiLevel;a.modify("move",n,"character");let f=s.depth?t.docView.domAfterPos(s.before()):t.dom,{focusNode:p,focusOffset:m}=t.domSelectionRange(),b=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),b}):s.pos==s.start()||s.pos==s.end()}let aM=null,lM=null,cM=!1;function h8e(t,e,n){return aM==e&&lM==n?cM:(aM=e,lM=n,cM=n=="up"||n=="down"?c8e(t,e,n):d8e(t,e,n))}const Xo=0,uM=1,mu=2,ma=3;class y1{constructor(e,n,s,i){this.parent=e,this.children=n,this.dom=s,this.contentDOM=i,this.dirty=Xo,s.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,n,s){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,s=this.posAtStart;;n++){let i=this.children[n];if(i==e)return s;s+=i.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,s){if(this.contentDOM&&this.contentDOM.contains(e.nodeType==1?e:e.parentNode))if(s<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 i;if(e==this.dom&&this.contentDOM)i=n>Bs(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM))i=e.compareDocumentPosition(this.contentDOM)&2;else if(this.dom.firstChild){if(n==0)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!1;break}if(o.previousSibling)break}if(i==null&&n==e.childNodes.length)for(let o=e;;o=o.parentNode){if(o==this.dom){i=!0;break}if(o.nextSibling)break}}return i??s>0?this.posAtEnd:this.posAtStart}nearestDesc(e,n=!1){for(let s=!0,i=e;i;i=i.parentNode){let o=this.getDesc(i),r;if(o&&(!n||o.node))if(s&&(r=o.nodeDOM)&&!(r.nodeType==1?r.contains(e.nodeType==1?e:e.parentNode):r==e))s=!1;else return o}}getDesc(e){let n=e.pmViewDesc;for(let s=n;s;s=s.parent)if(s==this)return n}posFromDOM(e,n,s){for(let i=e;i;i=i.parentNode){let o=this.getDesc(i);if(o)return o.localPosFromDOM(e,n,s)}return-1}descAt(e){for(let n=0,s=0;n<this.children.length;n++){let i=this.children[n],o=s+i.size;if(s==e&&o!=s){for(;!i.border&&i.children.length;)i=i.children[0];return i}if(e<o)return i.descAt(e-s-i.border);s=o}}domFromPos(e,n){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let s=0,i=0;for(let o=0;s<this.children.length;s++){let r=this.children[s],a=o+r.size;if(a>e||r instanceof wN){i=e-o;break}o=a}if(i)return this.children[s].domFromPos(i-this.children[s].border,n);for(let o;s&&!(o=this.children[s-1]).size&&o instanceof bN&&o.side>=0;s--);if(n<=0){let o,r=!0;for(;o=s?this.children[s-1]:null,!(!o||o.dom.parentNode==this.contentDOM);s--,r=!1);return o&&n&&r&&!o.border&&!o.domAtom?o.domFromPos(o.size,n):{node:this.contentDOM,offset:o?Bs(o.dom)+1:0}}else{let o,r=!0;for(;o=s<this.children.length?this.children[s]:null,!(!o||o.dom.parentNode==this.contentDOM);s++,r=!1);return o&&r&&!o.border&&!o.domAtom?o.domFromPos(0,n):{node:this.contentDOM,offset:o?Bs(o.dom):this.contentDOM.childNodes.length}}}parseRange(e,n,s=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:n,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let i=-1,o=-1;for(let r=s,a=0;;a++){let l=this.children[a],c=r+l.size;if(i==-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)){i=Bs(h.dom)+1;break}e-=h.size}i==-1&&(i=0)}if(i>-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=Bs(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:i,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:s}=this.domFromPos(e,0);if(n.nodeType!=1||s==n.childNodes.length)throw new RangeError("No node after pos "+e);return n.childNodes[s]}setSelection(e,n,s,i=!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,s,i);f=m}let a=this.domFromPos(e,e?-1:1),l=n==e?a:this.domFromPos(n,n?-1:1),c=s.getSelection(),u=!1;if((Rr||Ei)&&e==n){let{node:h,offset:f}=a;if(h.nodeType==3){if(u=!!(f&&h.nodeValue[f-1]==` | |
| 121 | -`),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:Bs(m)+1});break}let b=p.pmViewDesc;if(b&&b.node&&b.node.isBlock)break}}else{let p=h.childNodes[f-1];u=p&&(p.nodeName=="BR"||p.contentEditable=="false")}}if(Rr&&c.focusNode&&c.focusNode!=l.node&&c.focusNode.nodeType==1){let h=c.focusNode.childNodes[c.focusOffset];h&&h.contentEditable=="false"&&(i=!0)}if(!(i||u&&Ei)&&Zu(a.node,a.offset,c.anchorNode,c.anchorOffset)&&Zu(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 s=0,i=0;i<this.children.length;i++){let o=this.children[i],r=s+o.size;if(s==r?e<=r&&n>=s:e<r&&n>s){let a=s+o.border,l=r-o.border;if(e>=a&&n<=l){this.dirty=e==s||n==r?mu:uM,e==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=ma:o.markDirty(e-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?mu:ma}s=r}this.dirty=mu}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let s=e==1?mu:uM;n.dirty<s&&(n.dirty=s)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class bN extends y1{constructor(e,n,s,i){let o,r=n.type.toDOM;if(typeof r=="function"&&(r=r(s,()=>{if(!o)return i;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==Xo&&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 f8e extends y1{constructor(e,n,s,i){super(e,[],n,null),this.textDOM=s,this.text=i}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 Ju extends y1{constructor(e,n,s,i){super(e,[],s,i),this.mark=n}static create(e,n,s,i){let o=i.nodeViews[n.type.name],r=o&&o(n,i,s);return(!r||!r.dom)&&(r=Ic.renderSpec(document,n.type.spec.toDOM(n,s),null,n.attrs)),new Ju(e,n,r.dom,r.contentDOM||r.dom)}parseRule(){return this.dirty&ma||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=ma&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=Xo){let s=this.parent;for(;!s.node;)s=s.parent;s.dirty<this.dirty&&(s.dirty=this.dirty),this.dirty=Xo}}slice(e,n,s){let i=Ju.create(this.parent,this.mark,!0,s),o=this.children,r=this.size;n<r&&(o=mC(o,n,r,s)),e>0&&(o=mC(o,0,e,s));for(let a=0;a<o.length;a++)o[a].parent=i;return i.children=o,i}}class ac extends y1{constructor(e,n,s,i,o,r,a,l,c){super(e,[],o,r),this.node=n,this.outerDeco=s,this.innerDeco=i,this.nodeDOM=a}static create(e,n,s,i,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)},s,i),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}=Ic.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=xN(u,s,n),c?l=new p8e(e,n,s,i,u,d||null,h,c,o,r+1):n.isText?new Db(e,n,s,i,u,h,o):new ac(e,n,s,i,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 s=this.children[n];if(this.dom.contains(s.dom.parentNode)){e.contentElement=s.dom.parentNode;break}}e.contentElement||(e.getContent=()=>et.empty)}return e}matchesNode(e,n,s){return this.dirty==Xo&&e.eq(this.node)&&pC(n,this.outerDeco)&&s.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return this.node.isLeaf?0:1}updateChildren(e,n){let s=this.node.inlineContent,i=n,o=e.composing?this.localCompositionInfo(e,n):null,r=o&&o.pos>-1?o:null,a=o&&o.pos<0,l=new g8e(this,r&&r.node,e);y8e(this.node,this.innerDeco,(c,u,d)=>{c.spec.marks?l.syncToMarks(c.spec.marks,s,e):c.type.side>=0&&!d&&l.syncToMarks(u==this.node.childCount?bn.none:this.node.child(u).marks,s,e),l.placeWidget(c,e,i)},(c,u,d,h)=>{l.syncToMarks(c.marks,s,e);let f;l.findNodeMatch(c,u,d,h)||a&&e.state.selection.from>i&&e.state.selection.to<i+c.nodeSize&&(f=l.findIndexWithChild(o.node))>-1&&l.updateNodeAt(c,u,d,f,e)||l.updateNextNode(c,u,d,e,h,i)||l.addNode(c,u,d,e,i),i+=c.nodeSize}),l.syncToMarks([],s,e),this.node.isTextblock&&l.addTextblockHacks(),l.destroyRest(),(l.changed||this.dirty==mu)&&(r&&this.protectLocalComposition(e,r),CN(this.contentDOM,this.children,e),xf&&b8e(this.dom))}localCompositionInfo(e,n){let{from:s,to:i}=e.state.selection;if(!(e.state.selection instanceof St)||s<n||i>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=w8e(this.node.content,r,s-n,i-n);return a<0?null:{node:o,pos:a,text:r}}else return{node:o,pos:-1,text:""}}protectLocalComposition(e,{node:n,pos:s,text:i}){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 f8e(this,o,n,i);e.input.compositionNodes.push(r),this.children=mC(this.children,s,s+i.length,e,r)}update(e,n,s,i){return this.dirty==ma||!e.sameMarkup(this.node)?!1:(this.updateInner(e,n,s,i),!0)}updateInner(e,n,s,i){this.updateOuterDeco(n),this.node=e,this.innerDeco=s,this.contentDOM&&this.updateChildren(i,this.posAtStart),this.dirty=Xo}updateOuterDeco(e){if(pC(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,s=this.dom;this.dom=kN(this.dom,this.nodeDOM,fC(this.outerDeco,this.node,n),fC(e,this.node,n)),this.dom!=s&&(s.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 dM(t,e,n,s,i){xN(s,e,t);let o=new ac(void 0,t,e,n,s,s,s,i,0);return o.contentDOM&&o.updateChildren(i,0),o}class Db extends ac{constructor(e,n,s,i,o,r,a){super(e,n,s,i,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,s,i){return this.dirty==ma||this.dirty!=Xo&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=Xo||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,i.trackWrites==this.nodeDOM&&(i.trackWrites=null)),this.node=e,this.dirty=Xo,!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,s){return e==this.nodeDOM?this.posAtStart+Math.min(n,this.node.text.length):super.localPosFromDOM(e,n,s)}ignoreMutation(e){return e.type!="characterData"&&e.type!="selection"}slice(e,n,s){let i=this.node.cut(e,n),o=document.createTextNode(i.text);return new Db(this.parent,i,this.outerDeco,this.innerDeco,o,o,s)}markDirty(e,n){super.markDirty(e,n),this.dom!=this.nodeDOM&&(e==0||n==this.nodeDOM.nodeValue.length)&&(this.dirty=ma)}get domAtom(){return!1}isText(e){return this.node.text==e}}class wN extends y1{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==Xo&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class p8e extends ac{constructor(e,n,s,i,o,r,a,l,c,u){super(e,n,s,i,o,r,a,c,u),this.spec=l}update(e,n,s,i){if(this.dirty==ma)return!1;if(this.spec.update){let o=this.spec.update(e,n,s);return o&&this.updateInner(e,n,s,i),o}else return!this.contentDOM&&!e.isLeaf?!1:super.update(e,n,s,i)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,n,s,i){this.spec.setSelection?this.spec.setSelection(e,n,s):super.setSelection(e,n,s,i)}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 CN(t,e,n){let s=t.firstChild,i=!1;for(let o=0;o<e.length;o++){let r=e[o],a=r.dom;if(a.parentNode==t){for(;a!=s;)s=hM(s),i=!0;s=s.nextSibling}else i=!0,t.insertBefore(a,s);if(r instanceof Ju){let l=s?s.previousSibling:t.lastChild;CN(r.contentDOM,r.children,n),s=l?l.nextSibling:t.firstChild}}for(;s;)s=hM(s),i=!0;i&&n.trackWrites==t&&(n.trackWrites=null)}const Em=function(t){t&&(this.nodeName=t)};Em.prototype=Object.create(null);const gu=[new Em];function fC(t,e,n){if(t.length==0)return gu;let s=n?gu[0]:new Em,i=[s];for(let o=0;o<t.length;o++){let r=t[o].type.attrs;if(r){r.nodeName&&i.push(s=new Em(r.nodeName));for(let a in r){let l=r[a];l!=null&&(n&&i.length==1&&i.push(s=new Em(e.isInline?"span":"div")),a=="class"?s.class=(s.class?s.class+" ":"")+l:a=="style"?s.style=(s.style?s.style+";":"")+l:a!="nodeName"&&(s[a]=l))}}}return i}function kN(t,e,n,s){if(n==gu&&s==gu)return e;let i=e;for(let o=0;o<s.length;o++){let r=s[o],a=n[o];if(o){let l;a&&a.nodeName==r.nodeName&&i!=t&&(l=i.parentNode)&&l.nodeName.toLowerCase()==r.nodeName||(l=document.createElement(r.nodeName),l.pmIsDeco=!0,l.appendChild(i),a=gu[0]),i=l}m8e(i,a||gu[0],r)}return i}function m8e(t,e,n){for(let s in e)s!="class"&&s!="style"&&s!="nodeName"&&!(s in n)&&t.removeAttribute(s);for(let s in n)s!="class"&&s!="style"&&s!="nodeName"&&n[s]!=e[s]&&t.setAttribute(s,n[s]);if(e.class!=n.class){let s=e.class?e.class.split(" ").filter(Boolean):[],i=n.class?n.class.split(" ").filter(Boolean):[];for(let o=0;o<s.length;o++)i.indexOf(s[o])==-1&&t.classList.remove(s[o]);for(let o=0;o<i.length;o++)s.indexOf(i[o])==-1&&t.classList.add(i[o]);t.classList.length==0&&t.removeAttribute("class")}if(e.style!=n.style){if(e.style){let s=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,i;for(;i=s.exec(e.style);)t.style.removeProperty(i[1])}n.style&&(t.style.cssText+=n.style)}}function xN(t,e,n){return kN(t,t,gu,fC(e,n,t.nodeType!=1))}function pC(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 hM(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class g8e{constructor(e,n,s){this.lock=n,this.view=s,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=v8e(e.node.content,e)}destroyBetween(e,n){if(e!=n){for(let s=e;s<n;s++)this.top.children[s].destroy();this.top.children.splice(e,n-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,n,s){let i=0,o=this.stack.length>>1,r=Math.min(o,e.length);for(;i<r&&(i==o-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<o;)this.destroyRest(),this.top.dirty=Xo,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=Ju.create(this.top,e[o],n,s);this.top.children.splice(this.index,0,l),this.top=l,this.changed=!0}this.index=0,o++}}findNodeMatch(e,n,s,i){let o=-1,r;if(i>=this.preMatch.index&&(r=this.preMatch.matches[i-this.preMatch.index]).parent==this.top&&r.matchesNode(e,n,s))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,s)&&!this.preMatch.matched.has(c)){o=a;break}}return o<0?!1:(this.destroyBetween(this.index,o),this.index++,!0)}updateNodeAt(e,n,s,i,o){let r=this.top.children[i];return r.dirty==ma&&r.dom==r.contentDOM&&(r.dirty=mu),r.update(e,n,s,o)?(this.destroyBetween(this.index,i),this.index++,!0):!1}findIndexWithChild(e){for(;;){let n=e.parentNode;if(!n)return-1;if(n==this.top.contentDOM){let s=e.pmViewDesc;if(s){for(let i=this.index;i<this.top.children.length;i++)if(this.top.children[i]==s)return i}return-1}e=n}}updateNextNode(e,n,s,i,o,r){for(let a=this.index;a<this.top.children.length;a++){let l=this.top.children[a];if(l instanceof ac){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!=ma&&pC(n,l.outerDeco));if(!h&&l.update(e,n,s,i))return this.destroyBetween(this.index,a),l.dom!=u&&(this.changed=!0),this.index++,!0;if(!h&&(d=this.recreateWrapper(l,e,n,s,i,r)))return this.top.children[this.index]=d,d.contentDOM&&(d.dirty=mu,d.updateChildren(i,r+1),d.dirty=Xo),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,n,s,i,o,r){if(e.dirty||n.isAtom||!e.children.length||!e.node.content.eq(n.content))return null;let a=ac.create(this.top,n,s,i,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,s,i,o){let r=ac.create(this.top,e,n,s,i,o);r.contentDOM&&r.updateChildren(i,o+1),this.top.children.splice(this.index++,0,r),this.changed=!0}placeWidget(e,n,s){let i=this.index<this.top.children.length?this.top.children[this.index]:null;if(i&&i.matchesWidget(e)&&(e==i.widget||!i.widget.type.toDOM.parentNode))this.index++;else{let o=new bN(this.top,e,n,s);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 Ju;)n=e,e=n.children[n.children.length-1];(!e||!(e instanceof Db)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((Ei||ri)&&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 s=document.createElement(e);e=="IMG"&&(s.className="ProseMirror-separator",s.alt=""),e=="BR"&&(s.className="ProseMirror-trailingBreak");let i=new wN(this.top,[],s,null);n!=this.top?n.children.push(i):n.children.splice(this.index++,0,i),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||e.nodeType==1&&e.contains(this.lock.parentNode))}}function v8e(t,e){let n=e,s=n.children.length,i=t.childCount,o=new Map,r=[];e:for(;i>0;){let a;for(;;)if(s){let c=n.children[s-1];if(c instanceof Ju)n=c,s=c.children.length;else{a=c,s--;break}}else{if(n==e)break e;s=n.parent.children.indexOf(n),n=n.parent}let l=a.node;if(l){if(l!=t.child(i-1))break;--i,o.set(a,i),r.push(a)}}return{index:i,matched:o,matches:r.reverse()}}function _8e(t,e){return t.type.side-e.type.side}function y8e(t,e,n,s){let i=e.locals(t),o=0;if(i.length==0){for(let c=0;c<t.childCount;c++){let u=t.child(c);s(u,i,e.forChild(o,u),c),o+=u.nodeSize}return}let r=0,a=[],l=null;for(let c=0;;){let u,d;for(;r<i.length&&i[r].to==o;){let b=i[r++];b.widget&&(u?(d||(d=[u])).push(b):u=b)}if(u)if(d){d.sort(_8e);for(let b=0;b<d.length;b++)n(d[b],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 b=0;b<a.length;b++)a[b].to<=o&&a.splice(b--,1);for(;r<i.length&&i[r].from<=o&&i[r].to>o;)a.push(i[r++]);let p=o+h.nodeSize;if(h.isText){let b=p;r<i.length&&i[r].from<b&&(b=i[r].from);for(let y=0;y<a.length;y++)a[y].to<b&&(b=a[y].to);b<p&&(l=h.cut(b-o),h=h.cut(0,b-o),p=b,f=-1)}else for(;r<i.length&&i[r].to<p;)r++;let m=h.isInline&&!h.isLeaf?a.filter(b=>!b.inline):a.slice();s(h,m,e.forChild(o,h),f),o=p}}function b8e(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 w8e(t,e,n,s){for(let i=0,o=0;i<t.childCount&&o<=s;){let r=t.child(i++),a=o;if(o+=r.nodeSize,!r.isText)continue;let l=r.text;for(;i<t.childCount;){let c=t.child(i++);if(o+=c.nodeSize,!c.isText)break;l+=c.text}if(o>=n){if(o>=s&&l.slice(s-e.length-a,s-a)==e)return s-e.length;let c=a<s?l.lastIndexOf(e,s-a-1):-1;if(c>=0&&c+e.length+a>=n)return a+c;if(n==s&&l.length>=s+e.length-a&&l.slice(s-a,s-a+e.length)==e)return s}}return-1}function mC(t,e,n,s,i){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,s)),i&&(o.push(i),i=void 0),u>n&&o.push(l.slice(n-c,l.size,s)))}return o}function Q4(t,e=null){let n=t.domSelectionRange(),s=t.state.doc;if(!n.focusNode)return null;let i=t.docView.nearestDesc(n.focusNode),o=i&&i.size==0,r=t.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(r<0)return null;let a=s.resolve(r),l,c;if(Ob(n)){for(l=a;i&&!i.node;)i=i.parent;let u=i.node;if(i&&u.isAtom&&At.isSelectable(u)&&i.parent&&!(u.isInline&&G4e(n.focusNode,n.focusOffset,i.dom))){let d=i.posBefore;c=new At(r==d?a:s.resolve(d))}}else{let u=t.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(u<0)return null;l=s.resolve(u)}if(!c){let u=e=="pointer"||t.state.selection.head<a.pos&&!o?1:-1;c=e8(t,l,a,u)}return c}function SN(t){return t.editable?t.hasFocus():AN(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function tl(t,e=!1){let n=t.state.selection;if($N(t,n),!!SN(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&ri){let s=t.domSelectionRange(),i=t.domObserver.currentSelection;if(s.anchorNode&&i.anchorNode&&Zu(s.anchorNode,s.anchorOffset,i.anchorNode,i.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)k8e(t);else{let{anchor:s,head:i}=n,o,r;fM&&!(n instanceof St)&&(n.$from.parent.inlineContent||(o=pM(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(r=pM(t,n.to))),t.docView.setSelection(s,i,t.root,e),fM&&(o&&mM(o),r&&mM(r)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&C8e(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const fM=Ei||ri&&fN<63;function pM(t,e){let{node:n,offset:s}=t.docView.domFromPos(e,0),i=s<n.childNodes.length?n.childNodes[s]:null,o=s?n.childNodes[s-1]:null;if(Ei&&i&&i.contentEditable=="false")return Cw(i);if((!i||i.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(i)return Cw(i);if(o)return Cw(o)}}function Cw(t){return t.contentEditable="true",Ei&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function mM(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function C8e(t){let e=t.dom.ownerDocument;e.removeEventListener("selectionchange",t.input.hideSelectionGuard);let n=t.domSelectionRange(),s=n.anchorNode,i=n.anchorOffset;e.addEventListener("selectionchange",t.input.hideSelectionGuard=()=>{(n.anchorNode!=s||n.anchorOffset!=i)&&(e.removeEventListener("selectionchange",t.input.hideSelectionGuard),setTimeout(()=>{(!SN(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function k8e(t){let e=t.domSelection(),n=document.createRange();if(!e)return;let s=t.cursorWrapper.dom,i=s.nodeName=="IMG";i?n.setStart(s.parentNode,Bs(s)+1):n.setStart(s,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!i&&!t.state.selection.visible&&qi&&rc<=11&&(s.disabled=!0,s.disabled=!1)}function $N(t,e){if(e instanceof At){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(gM(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else gM(t)}function gM(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function e8(t,e,n,s){return t.someProp("createSelectionBetween",i=>i(t,e,n))||St.between(e,n,s)}function vM(t){return t.editable&&!t.hasFocus()?!1:AN(t)}function AN(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 x8e(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Zu(e.node,e.offset,n.anchorNode,n.anchorOffset)}function gC(t,e){let{$anchor:n,$head:s}=t.selection,i=e>0?n.max(s):n.min(s),o=i.parent.inlineContent?i.depth?t.doc.resolve(e>0?i.after():i.before()):null:i;return o&&Ot.findFrom(o,e)}function Hl(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function _M(t,e,n){let s=t.state.selection;if(s instanceof St)if(n.indexOf("s")>-1){let{$head:i}=s,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter;if(!o||o.isText||!o.isLeaf)return!1;let r=t.state.doc.resolve(i.pos+o.nodeSize*(e<0?-1:1));return Hl(t,new St(s.$anchor,r))}else if(s.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let i=gC(t.state,e);return i&&i instanceof At?Hl(t,i):!1}else if(!(Oo&&n.indexOf("m")>-1)){let i=s.$head,o=i.textOffset?null:e<0?i.nodeBefore:i.nodeAfter,r;if(!o||o.isText)return!1;let a=e<0?i.pos-o.nodeSize:i.pos;return o.isAtom||(r=t.docView.descAt(a))&&!r.contentDOM?At.isSelectable(o)?Hl(t,new At(e<0?t.state.doc.resolve(i.pos-o.nodeSize):i)):_1?Hl(t,new St(t.state.doc.resolve(e<0?a:a+o.nodeSize))):!1:!1}}else return!1;else{if(s instanceof At&&s.node.isInline)return Hl(t,new St(e>0?s.$to:s.$from));{let i=gC(t.state,e);return i?Hl(t,i):!1}}}function ey(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Tm(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function Nd(t,e){return e<0?S8e(t):$8e(t)}function S8e(t){let e=t.domSelectionRange(),n=e.focusNode,s=e.focusOffset;if(!n)return;let i,o,r=!1;for(Rr&&n.nodeType==1&&s<ey(n)&&Tm(n.childNodes[s],-1)&&(r=!0);;)if(s>0){if(n.nodeType!=1)break;{let a=n.childNodes[s-1];if(Tm(a,-1))i=n,o=--s;else if(a.nodeType==3)n=a,s=n.nodeValue.length;else break}}else{if(MN(n))break;{let a=n.previousSibling;for(;a&&Tm(a,-1);)i=n.parentNode,o=Bs(a),a=a.previousSibling;if(a)n=a,s=ey(n);else{if(n=n.parentNode,n==t.dom)break;s=0}}}r?vC(t,n,s):i&&vC(t,i,o)}function $8e(t){let e=t.domSelectionRange(),n=e.focusNode,s=e.focusOffset;if(!n)return;let i=ey(n),o,r;for(;;)if(s<i){if(n.nodeType!=1)break;let a=n.childNodes[s];if(Tm(a,1))o=n,r=++s;else break}else{if(MN(n))break;{let a=n.nextSibling;for(;a&&Tm(a,1);)o=a.parentNode,r=Bs(a)+1,a=a.nextSibling;if(a)n=a,s=0,i=ey(n);else{if(n=n.parentNode,n==t.dom)break;s=i=0}}}o&&vC(t,o,r)}function MN(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function A8e(t,e){for(;t&&e==t.childNodes.length&&!v1(t);)e=Bs(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 M8e(t,e){for(;t&&!e&&!v1(t);)e=Bs(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 vC(t,e,n){if(e.nodeType!=3){let o,r;(r=A8e(e,n))?(e=r,n=0):(o=M8e(e,n))&&(e=o,n=o.nodeValue.length)}let s=t.domSelection();if(!s)return;if(Ob(s)){let o=document.createRange();o.setEnd(e,n),o.setStart(e,n),s.removeAllRanges(),s.addRange(o)}else s.extend&&s.extend(e,n);t.domObserver.setCurSelection();let{state:i}=t;setTimeout(()=>{t.state==i&&tl(t)},50)}function yM(t,e){let n=t.state.doc.resolve(e);if(!(ri||K4e)&&n.parent.inlineContent){let i=t.coordsAtPos(e);if(e>n.start()){let o=t.coordsAtPos(e-1),r=(o.top+o.bottom)/2;if(r>i.top&&r<i.bottom&&Math.abs(o.left-i.left)>1)return o.left<i.left?"ltr":"rtl"}if(e<n.end()){let o=t.coordsAtPos(e+1),r=(o.top+o.bottom)/2;if(r>i.top&&r<i.bottom&&Math.abs(o.left-i.left)>1)return o.left>i.left?"ltr":"rtl"}}return getComputedStyle(t.dom).direction=="rtl"?"rtl":"ltr"}function bM(t,e,n){let s=t.state.selection;if(s instanceof St&&!s.empty||n.indexOf("s")>-1||Oo&&n.indexOf("m")>-1)return!1;let{$from:i,$to:o}=s;if(!i.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let r=gC(t.state,e);if(r&&r instanceof At)return Hl(t,r)}if(!i.parent.inlineContent){let r=e<0?i:o,a=s instanceof go?Ot.near(r,e):Ot.findFrom(r,e);return a?Hl(t,a):!1}return!1}function wM(t,e){if(!(t.state.selection instanceof St))return!0;let{$head:n,$anchor:s,empty:i}=t.state.selection;if(!n.sameParent(s))return!0;if(!i)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 CM(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function E8e(t){if(!Ei||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 s=e.firstChild;CM(t,s,"true"),setTimeout(()=>CM(t,s,"false"),20)}return!1}function T8e(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function P8e(t,e){let n=e.keyCode,s=T8e(e);if(n==8||Oo&&n==72&&s=="c")return wM(t,-1)||Nd(t,-1);if(n==46&&!e.shiftKey||Oo&&n==68&&s=="c")return wM(t,1)||Nd(t,1);if(n==13||n==27)return!0;if(n==37||Oo&&n==66&&s=="c"){let i=n==37?yM(t,t.state.selection.from)=="ltr"?-1:1:-1;return _M(t,i,s)||Nd(t,i)}else if(n==39||Oo&&n==70&&s=="c"){let i=n==39?yM(t,t.state.selection.from)=="ltr"?1:-1:1;return _M(t,i,s)||Nd(t,i)}else{if(n==38||Oo&&n==80&&s=="c")return bM(t,-1,s)||Nd(t,-1);if(n==40||Oo&&n==78&&s=="c")return E8e(t)||bM(t,1,s)||Nd(t,1);if(s==(Oo?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function EN(t,e){t.someProp("transformCopied",f=>{e=f(e,t)});let n=[],{content:s,openStart:i,openEnd:o}=e;for(;i>1&&o>1&&s.childCount==1&&s.firstChild.childCount==1;){i--,o--;let f=s.firstChild;n.push(f.type.name,f.attrs!=f.type.defaultAttrs?f.attrs:null),s=f.content}let r=t.someProp("clipboardSerializer")||Ic.fromSchema(t.state.schema),a=DN(),l=a.createElement("div");l.appendChild(r.serializeFragment(s,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=ON[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",`${i} ${o}${d?` -${d}`:""} ${JSON.stringify(n)}`);let h=t.someProp("clipboardTextSerializer",f=>f(e,t))||e.content.textBetween(0,e.content.size,` | |
| 115 | +`,now:{line:1,column:1},lineShift:0});return i&&i.charCodeAt(i.length-1)!==10&&i.charCodeAt(i.length-1)!==13&&(i+=` | |
| 116 | +`),i;function s(o){return n.stack.push(o),r;function r(){n.stack.pop()}}}function w8e(t){throw new Error("Cannot handle value `"+t+"`, expected node")}function k8e(t){const e=t;throw new Error("Cannot handle unknown node `"+e.type+"`")}function C8e(t,e){if(t.type==="definition"&&t.type===e.type)return 0}function x8e(t,e){return h8e(t,this,e)}function S8e(t,e){return f8e(t,this,e)}function $8e(t,e){return v8e(this,t,e)}function qC(t){const e=this;e.compiler=n;function n(i){return b8e(i,{...e.data("settings"),...t,extensions:e.data("toMarkdownExtensions")||[]})}}function ME(t){if(t)throw t}var G0=Object.prototype.hasOwnProperty,WN=Object.prototype.toString,TE=Object.defineProperty,PE=Object.getOwnPropertyDescriptor,IE=function(e){return typeof Array.isArray=="function"?Array.isArray(e):WN.call(e)==="[object Array]"},LE=function(e){if(!e||WN.call(e)!=="[object Object]")return!1;var n=G0.call(e,"constructor"),i=e.constructor&&e.constructor.prototype&&G0.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!i)return!1;var s;for(s in e);return typeof s>"u"||G0.call(e,s)},OE=function(e,n){TE&&n.name==="__proto__"?TE(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},DE=function(e,n){if(n==="__proto__")if(G0.call(e,n)){if(PE)return PE(e,n).value}else return;return e[n]},A8e=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=DE(a,n),s=DE(e,n),a!==s&&(u&&s&&(LE(s)||(o=IE(s)))?(o?(o=!1,r=i&&IE(i)?i:[]):r=i&&LE(i)?i:{},OE(a,{name:n,newValue:t(u,r,s)})):typeof s<"u"&&OE(a,{name:n,newValue:s}));return a};const Qw=vi(A8e);function GC(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 E8e(){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?M8e(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 M8e(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 bo 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=lg(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}}bo.prototype.file="";bo.prototype.name="";bo.prototype.reason="";bo.prototype.message="";bo.prototype.stack="";bo.prototype.column=void 0;bo.prototype.line=void 0;bo.prototype.ancestors=void 0;bo.prototype.cause=void 0;bo.prototype.fatal=void 0;bo.prototype.place=void 0;bo.prototype.ruleId=void 0;bo.prototype.source=void 0;const _a={basename:T8e,dirname:P8e,extname:I8e,join:L8e,sep:"/"};function T8e(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');ev(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 P8e(t){if(ev(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 I8e(t){ev(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 L8e(...t){let e=-1,n;for(;++e<t.length;)ev(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":O8e(n)}function O8e(t){ev(t);const e=t.codePointAt(0)===47;let n=D8e(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function D8e(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 ev(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const R8e={cwd:V8e};function V8e(){return"/"}function XC(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function F8e(t){if(typeof t=="string")t=new URL(t);else if(!XC(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 N8e(t)}function N8e(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 e3=["history","path","basename","stem","extname","dirname"];class B8e{constructor(e){let n;e?XC(e)?n={path:e}:typeof e=="string"||z8e(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":R8e.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<e3.length;){const o=e3[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)e3.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?_a.basename(this.path):void 0}set basename(e){n3(e,"basename"),t3(e,"basename"),this.path=_a.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?_a.dirname(this.path):void 0}set dirname(e){RE(this.basename,"dirname"),this.path=_a.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?_a.extname(this.path):void 0}set extname(e){if(t3(e,"extname"),RE(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=_a.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){XC(e)&&(e=F8e(e)),n3(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?_a.basename(this.path,this.extname):void 0}set stem(e){n3(e,"stem"),t3(e,"stem"),this.path=_a.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 bo(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 t3(t,e){if(t&&t.includes(_a.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+_a.sep+"`")}function n3(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function RE(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function z8e(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const H8e=function(t){const i=this.constructor.prototype,s=i[t],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,i),o},U8e={}.hasOwnProperty;class q8 extends H8e{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=E8e()}copy(){const e=new q8;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];e.use(...i)}return e.data(Qw(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(o3("data",this.frozen),this.namespace[e]=n,this):U8e.call(this.namespace,e)&&this.namespace[e]||void 0:e?(o3("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=l0(e),i=this.parser||this.Parser;return s3("parse",i),i(String(n),n)}process(e,n){const i=this;return this.freeze(),s3("process",this.parser||this.Parser),i3("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,r){const a=l0(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);W8e(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(),s3("processSync",this.parser||this.Parser),i3("processSync",this.compiler||this.Compiler),this.process(e,s),FE("processSync","process",n),i;function s(o,r){n=!0,ME(o),i=r}}run(e,n,i){VE(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=l0(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),FE("runSync","run",i),s;function o(r,a){ME(r),s=a,i=!0}}stringify(e,n){this.freeze();const i=l0(n),s=this.compiler||this.Compiler;return i3("stringify",s),VE(e),s(e,i)}use(e,...n){const i=this.attachers,s=this.namespace;if(o3("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=Qw(!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];GC(m)&&GC(f)&&(f=Qw(!0,m,f)),i[h]=[c,f,...p]}}}}const KC=new q8().freeze();function s3(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function i3(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function o3(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 VE(t){if(!GC(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function FE(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function l0(t){return j8e(t)?t:new B8e(t)}function j8e(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function W8e(t){return typeof t=="string"||Y8e(t)}function Y8e(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var YN=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},rn=(t,e,n)=>(YN(t,e,"read from private field"),n?n.call(t):e.get(t)),As=(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)},ns=(t,e,n,i)=>(YN(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);let qN=class{},GN=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 YF();return e}}},q8e=class XN extends qN{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 XN(e,n,i)}};var fa,dm,X0,K0,Z0,hm,fm;const ZC=class extends GN{constructor(e){super(),As(this,fa,void 0),As(this,dm,void 0),As(this,X0,void 0),As(this,K0,void 0),As(this,Z0,void 0),As(this,hm,void 0),As(this,fm,void 0),ns(this,fa,En.none),ns(this,dm,n=>n.isText),ns(this,X0,(n,i)=>{if(rn(this,dm).call(this,n)&&rn(this,dm).call(this,i)&&En.sameSet(n.marks,i.marks))return this.schema.text(n.text+i.text,n.marks)}),ns(this,K0,n=>{const i=Object.values({...this.schema.nodes,...this.schema.marks}).find(s=>s.spec.parseMarkdown.match(n));if(!i)throw NCe(n);return i}),ns(this,Z0,n=>{const i=rn(this,K0).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(q8e.create(n,[],i)),this),ns(this,hm,()=>{ns(this,fa,En.none);const n=this.close();return rn(this,fm).call(this,n.type,n.attrs,n.content)}),this.closeNode=()=>(rn(this,hm).call(this),this),ns(this,fm,(n,i,s)=>{const o=n.createAndFill(i,s,rn(this,fa));if(!o)throw FCe(n,i,s);return this.push(o),o}),this.addNode=(n,i,s)=>(rn(this,fm).call(this,n,i,s),this),this.openMark=(n,i)=>{const s=n.create(i);return ns(this,fa,s.addToSet(rn(this,fa))),this},this.closeMark=n=>(ns(this,fa,n.removeFromSet(rn(this,fa))),this),this.addText=n=>{const i=this.top();if(!i)throw YF();const s=i.pop(),o=this.schema.text(n,rn(this,fa));if(!s)return i.push(o),this;const r=rn(this,X0).call(this,s,o);return r?(i.push(r),this):(i.push(s,o),this)},this.build=()=>{let n;do n=rn(this,hm).call(this);while(this.size());return n},this.next=(n=[])=>([n].flat().forEach(i=>rn(this,Z0).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}};fa=new WeakMap,dm=new WeakMap,X0=new WeakMap,K0=new WeakMap,Z0=new WeakMap,hm=new WeakMap,fm=new WeakMap,ZC.create=(t,e)=>{const n=new ZC(t);return i=>(n.run(e,i),n.toDoc())};let G8e=ZC;const JC=class extends qN{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()}}};JC.create=(t,e,n,i={})=>new JC(t,e,n,i);let NE=JC;const X8e=t=>Object.prototype.hasOwnProperty.call(t,"size");var Ga,pm,J0,Q0,mm,e_,gm,t_,n_,Ih,Su,s_,vm;const QC=class extends GN{constructor(e){super(),As(this,Ga,void 0),As(this,pm,void 0),As(this,J0,void 0),As(this,Q0,void 0),As(this,mm,void 0),As(this,e_,void 0),As(this,gm,void 0),As(this,t_,void 0),As(this,n_,void 0),As(this,Ih,void 0),As(this,Su,void 0),As(this,s_,void 0),As(this,vm,void 0),ns(this,Ga,En.none),ns(this,pm,n=>{const i=Object.values({...this.schema.nodes,...this.schema.marks}).find(s=>s.spec.toMarkdown.match(n));if(!i)throw BCe(n.type);return i}),ns(this,J0,n=>rn(this,pm).call(this,n).spec.toMarkdown.runner(this,n)),ns(this,Q0,(n,i)=>rn(this,pm).call(this,n).spec.toMarkdown.runner(this,n,i)),ns(this,mm,n=>{const{marks:i}=n,s=o=>o.type.spec.priority??50;[...i].sort((o,r)=>s(o)-s(r)).every(o=>!rn(this,Q0).call(this,o,n))&&rn(this,J0).call(this,n),i.forEach(o=>rn(this,vm).call(this,o))}),ns(this,e_,(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}),ns(this,gm,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=rn(this,e_).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(rn(this,gm).call(this,h))}}return s.concat(o)},[])),n}),ns(this,t_,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(NE.create(n,void 0,i,s)),this),ns(this,n_,(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&&rn(this,Su).call(this,"text",void 0,s);const u=i();return o.length&&rn(this,Su).call(this,"text",void 0,o),u}),ns(this,Ih,(n=!1)=>{const i=this.close(),s=()=>rn(this,Su).call(this,i.type,i.children,i.value,i.props);return n?rn(this,n_).call(this,i,s):s()}),this.closeNode=()=>(rn(this,Ih).call(this),this),ns(this,Su,(n,i,s,o)=>{const r=NE.create(n,i,s,o),a=rn(this,gm).call(this,rn(this,t_).call(this,r));return this.push(a),a}),this.addNode=(n,i,s,o)=>(rn(this,Su).call(this,n,i,s,o),this),ns(this,s_,(n,i,s,o)=>n.isInSet(rn(this,Ga))?this:(ns(this,Ga,n.addToSet(rn(this,Ga))),this.openNode(i,s,{...o,isMark:!0}))),ns(this,vm,n=>{n.isInSet(rn(this,Ga))&&(ns(this,Ga,n.type.removeFromSet(rn(this,Ga))),rn(this,Ih).call(this,!0))}),this.withMark=(n,i,s,o)=>(rn(this,s_).call(this,n,i,s,o),this),this.closeMark=n=>(rn(this,vm).call(this,n),this),this.build=()=>{let n=null;do n=rn(this,Ih).call(this);while(this.size());return n},this.next=n=>X8e(n)?(n.forEach(i=>{rn(this,mm).call(this,i)}),this):(rn(this,mm).call(this,n),this),this.toString=n=>n.stringify(this.build()),this.run=n=>(this.next(n),this),this.schema=e}};Ga=new WeakMap,pm=new WeakMap,J0=new WeakMap,Q0=new WeakMap,mm=new WeakMap,e_=new WeakMap,gm=new WeakMap,t_=new WeakMap,n_=new WeakMap,Ih=new WeakMap,Su=new WeakMap,s_=new WeakMap,vm=new WeakMap,QC.create=(t,e)=>{const n=new QC(t);return i=>(n.run(i),n.toString(e))};let K8e=QC;const KN=65535,ZN=Math.pow(2,16);function Z8e(t,e){return t+e*ZN}function BE(t){return t&KN}function J8e(t){return(t-(t&KN))/ZN}const JN=1,QN=2,i_=4,eB=8;class ex{constructor(e,n,i){this.pos=e,this.delInfo=n,this.recover=i}get deleted(){return(this.delInfo&eB)>0}get deletedBefore(){return(this.delInfo&(JN|i_))>0}get deletedAfter(){return(this.delInfo&(QN|i_))>0}get deletedAcross(){return(this.delInfo&i_)>0}}class Mo{constructor(e,n=!1){if(this.ranges=e,this.inverted=n,!e.length&&Mo.empty)return Mo.empty}recover(e){let n=0,i=BE(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+J8e(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:Z8e(a/3,e-l),m=e==l?QN:e==d?JN:i_;return(n<0?e!=l:e!=d)&&(m|=eB),new ex(f,m,p)}s+=u-c}return i?e+s:new ex(e+s,0,null)}touches(e,n){let i=0,s=BE(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 Mo(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return e==0?Mo.empty:new Mo(e<0?[0,-e,0]:[0,0,e])}}Mo.empty=new Mo([]);class df{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 df(this.maps,this.mirror,e,n)}copy(){return new df(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 df;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 ex(e,s,null)}}const r3=Object.create(null);class Oi{getMap(){return Mo.empty}merge(e){return null}static fromJSON(e,n){if(!n||!n.stepType)throw new RangeError("Invalid input for Step.fromJSON");let i=r3[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 r3)throw new RangeError("Duplicate use of step JSON ID "+e);return r3[e]=n,n.prototype.jsonID=e,n}}class Is{constructor(e,n){this.doc=e,this.failed=n}static ok(e){return new Is(e,null)}static fail(e){return new Is(null,e)}static fromReplace(e,n,i,s){try{return Is.ok(e.replace(n,i,s))}catch(o){if(o instanceof Ly)return Is.fail(o.message);throw o}}}function G8(t,e,n){let i=[];for(let s=0;s<t.childCount;s++){let o=t.child(s);o.content.size&&(o=o.copy(G8(o.content,e,o))),o.isInline&&(o=e(o,n,s)),i.push(o)}return st.fromArray(i)}class al extends Oi{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(G8(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 Is.fromReplace(e,this.from,this.to,o)}invert(){return new Ca(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 al(n.pos,i.pos,this.mark)}merge(e){return e instanceof al&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new al(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 al(n.from,n.to,e.markFromJSON(n.mark))}}Oi.jsonID("addMark",al);class Ca extends Oi{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(G8(n.content,s=>s.mark(this.mark.removeFromSet(s.marks)),e),n.openStart,n.openEnd);return Is.fromReplace(e,this.from,this.to,i)}invert(){return new al(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 Ca(n.pos,i.pos,this.mark)}merge(e){return e instanceof Ca&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Ca(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 Ca(n.from,n.to,e.markFromJSON(n.mark))}}Oi.jsonID("removeMark",Ca);class xc extends Oi{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Is.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.addToSet(n.marks));return Is.fromReplace(e,this.pos,this.pos+1,new rt(st.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 xc(this.pos,n.marks[s]);return new xc(this.pos,this.mark)}}return new Zf(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new xc(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 xc(n.pos,e.markFromJSON(n.mark))}}Oi.jsonID("addNodeMark",xc);class Zf extends Oi{constructor(e,n){super(),this.pos=e,this.mark=n}apply(e){let n=e.nodeAt(this.pos);if(!n)return Is.fail("No node at mark step's position");let i=n.type.create(n.attrs,null,this.mark.removeFromSet(n.marks));return Is.fromReplace(e,this.pos,this.pos+1,new rt(st.from(i),0,n.isLeaf?0:1))}invert(e){let n=e.nodeAt(this.pos);return!n||!this.mark.isInSet(n.marks)?this:new xc(this.pos,this.mark)}map(e){let n=e.mapResult(this.pos,1);return n.deletedAfter?null:new Zf(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 Zf(n.pos,e.markFromJSON(n.mark))}}Oi.jsonID("removeNodeMark",Zf);class ti extends Oi{constructor(e,n,i,s=!1){super(),this.from=e,this.to=n,this.slice=i,this.structure=s}apply(e){return this.structure&&tx(e,this.from,this.to)?Is.fail("Structure replace would overwrite content"):Is.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Mo([this.from,this.to-this.from,this.slice.size])}invert(e){return new ti(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 ti(n.pos,Math.max(n.pos,i.pos),this.slice)}merge(e){if(!(e instanceof ti)||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 ti(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 ti(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 ti(n.from,n.to,rt.fromJSON(e,n.slice),!!n.structure)}}Oi.jsonID("replace",ti);class Ti extends Oi{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&&(tx(e,this.from,this.gapFrom)||tx(e,this.gapTo,this.to)))return Is.fail("Structure gap-replace would overwrite content");let n=e.slice(this.gapFrom,this.gapTo);if(n.openStart||n.openEnd)return Is.fail("Gap is not a flat range");let i=this.slice.insertAt(this.insert,n.content);return i?Is.fromReplace(e,this.from,this.to,i):Is.fail("Content does not fit in gap")}getMap(){return new Mo([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 Ti(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 Ti(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 Ti(n.from,n.to,n.gapFrom,n.gapTo,rt.fromJSON(e,n.slice),n.insert,!!n.structure)}}Oi.jsonID("replaceAround",Ti);function tx(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 Q8e(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 Ca(h,f,d[m])));a&&a.to==h?a.to=f:o.push(a=new al(h,f,i))}}),s.forEach(l=>t.step(l)),o.forEach(l=>t.step(l))}function e5e(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 f2){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 Ca(r.from,r.to,r.style)))}function tB(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 ti(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 Ca(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(st.from(n.schema.text(" ",n.allowedMarks(c.marks))),0,0)),r.push(new ti(a+h.index,a+h.index+h[0].length,p))}}a=u}if(!i.validEnd){let l=i.fillBefore(st.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 t5e(t,e,n){return(e==0||t.canReplace(e,t.childCount))&&(n==t.childCount||t.canReplace(0,n))}function y2(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||!t5e(s,o,r))break}return null}function n5e(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=st.empty,d=0;for(let p=o,m=!1;p>n;p--)m||i.index(p)>0?(m=!0,u=st.from(i.node(p).copy(u)),d++):l--;let h=st.empty,f=0;for(let p=o,m=!1;p>n;p--)m||s.after(p+1)<s.end(p)?(m=!0,h=st.from(s.node(p).copy(h)),f++):c++;t.step(new Ti(l,c,r,a,new rt(u.append(h),d,f),u.size-d,!0))}function X8(t,e,n=null,i=t){let s=s5e(t,e),o=s&&i5e(i,e);return o?s.map(zE).concat({type:e,attrs:n}).concat(o.map(zE)):null}function zE(t){return{type:t,attrs:null}}function s5e(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 i5e(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 o5e(t,e,n){let i=st.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=st.from(n[r].type.create(n[r].attrs,i))}let s=e.start,o=e.end;t.step(new Ti(s,o,s,o,new rt(i,0,0),n.length,!0))}function r5e(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)&&c5e(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&&l5e(t,r,a,o),tB(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 Ti(d,h,d+1,h-1,new rt(st.from(i.create(l,null,r.marks)),0,0),1,!0)),c===!0&&a5e(t,r,a,o),!1}})}function a5e(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 l5e(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(` | |
| 117 | +`))}})}function c5e(t,e,n){let i=t.resolve(e),s=i.index();return i.parent.canReplaceWith(s,s+1,n)}function u5e(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 Ti(e,e+o.nodeSize,e+1,e+o.nodeSize-1,new rt(st.from(r),0,0),1,!0))}function cg(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 d5e(t,e,n=1,i){let s=t.doc.resolve(e),o=st.empty,r=st.empty;for(let a=s.depth,l=s.depth-n,c=n-1;a>l;a--,c--){o=st.from(s.node(a).copy(o));let u=i&&i[c];r=st.from(u?u.type.create(u.attrs,r):s.node(a).copy(r))}t.step(new ti(e,e,new rt(o.append(r),n,n),!0))}function b2(t,e){let n=t.resolve(e),i=n.index();return h5e(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(i,i+1)}function h5e(t,e){return!!(t&&e&&!t.isLeaf&&t.canAppend(e))}function f5e(t,e,n){let i=new ti(e-n,e+n,rt.empty,!0);t.step(i)}function p5e(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 m5e(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 K8(t,e,n=e,i=rt.empty){if(e==n&&!i.size)return null;let s=t.resolve(e),o=t.resolve(n);return nB(s,o,i)?new ti(e,n,i):new g5e(s,o,i).fit()}function nB(t,e,n){return!n.openStart&&!n.openEnd&&t.start()==e.start()&&t.parent.canReplace(t.index(),e.index(),n.content)}class g5e{constructor(e,n,i){this.$from=e,this.$to=n,this.unplaced=i,this.frontier=[],this.placed=st.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=st.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 Ti(i.pos,e,this.$to.pos,this.$to.end(),l,n):l.size||i.pos!=this.$to.pos?new ti(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=a3(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(st.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=a3(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=a3(e,n);if(s.childCount<=1&&n>0){let o=e.size-n<=n+s.size;this.unplaced=new rt(_m(e,n-1,1),n-1,o?n-1:i)}else this.unplaced=new rt(_m(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(sB(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=ym(this.placed,n,st.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(_m(r.content,e-1,1),e-1,f<0?r.openEnd:e-1):new rt(_m(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||!l3(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=l3(e,n,s,i,o);if(r){for(let a=n-1;a>=0;a--){let{match:l,type:c}=this.frontier[a],u=l3(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=ym(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=ym(this.placed,this.depth,st.from(e.create(n,i))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let n=this.frontier.pop().match.fillBefore(st.empty,!0);n.childCount&&(this.placed=ym(this.placed,this.frontier.length,n))}}function _m(t,e,n){return e==0?t.cutByIndex(n,t.childCount):t.replaceChild(0,t.firstChild.copy(_m(t.firstChild.content,e-1,n)))}function ym(t,e,n){return e==0?t.append(n):t.replaceChild(t.childCount-1,t.lastChild.copy(ym(t.lastChild.content,e-1,n)))}function a3(t,e){for(let n=0;n<e;n++)t=t.firstChild.content;return t}function sB(t,e,n){if(e<=0)return t;let i=t.content;return e>1&&(i=i.replaceChild(0,sB(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(st.empty,!0)))),t.copy(i)}function l3(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&&!v5e(n,o.content,r)?a:null}function v5e(t,e,n){for(let i=n;i<e.childCount;i++)if(!t.allowsMarks(e.child(i).marks))return!0;return!1}function _5e(t){return t.spec.defining||t.spec.definingForContent}function y5e(t,e,n,i){if(!i.size)return t.deleteRange(e,n);let s=t.doc.resolve(e),o=t.doc.resolve(n);if(nB(s,o,i))return t.step(new ti(e,n,i));let r=oB(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=_5e(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(iB(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 iB(t,e,n,i,s){if(e<n){let o=t.firstChild;t=t.replaceChild(0,o.copy(iB(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(st.empty,!0))}return t}function b5e(t,e,n,i){if(!i.isInline&&e==n&&t.doc.resolve(e).parent.content.size){let s=p5e(t.doc,e,i.type);s!=null&&(e=n=s)}t.replaceRange(e,n,new rt(st.from(i),0,0))}function w5e(t,e,n){let i=t.doc.resolve(e),s=t.doc.resolve(n),o=oB(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 oB(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 hf extends Oi{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 Is.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 Is.fromReplace(e,this.pos,this.pos+1,new rt(st.from(s),0,n.isLeaf?0:1))}getMap(){return Mo.empty}invert(e){return new hf(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 hf(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 hf(n.pos,n.attr,n.value)}}Oi.jsonID("attr",hf);class a1 extends Oi{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 Is.ok(i)}getMap(){return Mo.empty}invert(e){return new a1(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 a1(n.attr,n.value)}}Oi.jsonID("docAttr",a1);let Jf=class extends Error{};Jf=function t(e){let n=Error.call(this,e);return n.__proto__=t.prototype,n};Jf.prototype=Object.create(Error.prototype);Jf.prototype.constructor=Jf;Jf.prototype.name="TransformError";class rB{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new df}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let n=this.maybeStep(e);if(n.failed)throw new Jf(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=K8(this.doc,e,n,i);return s&&this.step(s),this}replaceWith(e,n,i){return this.replace(e,n,new rt(st.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 y5e(this,e,n,i),this}replaceRangeWith(e,n,i){return b5e(this,e,n,i),this}deleteRange(e,n){return w5e(this,e,n),this}lift(e,n){return n5e(this,e,n),this}join(e,n=1){return f5e(this,e,n),this}wrap(e,n){return o5e(this,e,n),this}setBlockType(e,n=e,i,s=null){return r5e(this,e,n,i,s),this}setNodeMarkup(e,n,i=null,s){return u5e(this,e,n,i,s),this}setNodeAttribute(e,n,i){return this.step(new hf(e,n,i)),this}setDocAttribute(e,n){return this.step(new a1(e,n)),this}addNodeMark(e,n){return this.step(new xc(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 Zf(e,n)),this}split(e,n=1,i){return d5e(this,e,n,i),this}addMark(e,n,i){return Q8e(this,e,n,i),this}removeMark(e,n,i){return e5e(this,e,n,i),this}clearIncompatible(e,n,i){return tB(this,e,n,i),this}}const c3=Object.create(null);class Ut{constructor(e,n,i){this.$anchor=e,this.$head=n,this.ranges=i||[new zy(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&&jE(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),jE(e,i,n.isInline?-1:1))}}static findFrom(e,n,i=!1){let s=e.parent.inlineContent?new Ot(e):Lh(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?Lh(e.node(0),e.node(o),e.before(o+1),e.index(o),n,i):Lh(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 Fo(e.node(0))}static atStart(e){return Lh(e,e,0,0,1)||new Fo(e)}static atEnd(e){return Lh(e,e,e.content.size,e.childCount,-1)||new Fo(e)}static fromJSON(e,n){if(!n||!n.type)throw new RangeError("Invalid input for Selection.fromJSON");let i=c3[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 c3)throw new RangeError("Duplicate use of selection JSON ID "+e);return c3[e]=n,n.prototype.jsonID=e,n}getBookmark(){return Ot.between(this.$anchor,this.$head).getBookmark()}}Ut.prototype.visible=!0;class zy{constructor(e,n){this.$from=e,this.$to=n}}let HE=!1;function UE(t){!HE&&!t.parent.inlineContent&&(HE=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+t.parent.type.name+")"))}class Ot extends Ut{constructor(e,n=e){UE(e),UE(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 Ut.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 w2(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=Ut.findFrom(n,i,!0)||Ut.findFrom(n,-i,!0);if(o)n=o.$head;else return Ut.near(n,i)}return e.parent.inlineContent||(s==0?e=n:(e=(Ut.findFrom(e,-i,!0)||Ut.findFrom(e,i,!0)).$anchor,e.pos<n.pos!=s<0&&(e=n))),new Ot(e,n)}}Ut.jsonID("text",Ot);class w2{constructor(e,n){this.anchor=e,this.head=n}map(e){return new w2(e.map(this.anchor),e.map(this.head))}resolve(e){return Ot.between(e.resolve(this.anchor),e.resolve(this.head))}}class Rt extends Ut{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?Ut.near(o):new Rt(o)}content(){return new rt(st.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 Z8(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;Ut.jsonID("node",Rt);class Z8{constructor(e){this.anchor=e}map(e){let{deleted:n,pos:i}=e.mapResult(this.anchor);return n?new w2(i,i):new Z8(i)}resolve(e){let n=e.resolve(this.anchor),i=n.nodeAfter;return i&&Rt.isSelectable(i)?new Rt(n):Ut.near(n)}}class Fo extends Ut{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=Ut.atStart(e.doc);i.eq(e.selection)||e.setSelection(i)}else super.replace(e,n)}toJSON(){return{type:"all"}}static fromJSON(e){return new Fo(e)}map(e){return new Fo(e)}eq(e){return e instanceof Fo}getBookmark(){return k5e}}Ut.jsonID("all",Fo);const k5e={map(){return this},resolve(t){return new Fo(t)}};function Lh(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=Lh(t,a,n+s,s<0?a.childCount:0,s,o);if(l)return l}n+=a.nodeSize*s}return null}function jE(t,e,n){let i=t.steps.length-1;if(i<e)return;let s=t.steps[i];if(!(s instanceof ti||s instanceof Ti))return;let o=t.mapping.maps[i],r;o.forEach((a,l,c,u)=>{r==null&&(r=u)}),t.setSelection(Ut.near(t.doc.resolve(r),n))}const WE=1,c0=2,YE=4;class C5e extends rB{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|WE)&~c0,this.storedMarks=null,this}get selectionSet(){return(this.updated&WE)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=c0,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&c0)>0}addStep(e,n){super.addStep(e,n),this.updated=this.updated&~c0,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(Ut.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 qE(t,e){return!e||!t?t:t.bind(e)}class bm{constructor(e,n,i){this.name=e,this.init=qE(n.init,i),this.apply=qE(n.apply,i)}}const x5e=[new bm("doc",{init(t){return t.doc||t.schema.topNodeType.createAndFill()},apply(t){return t.doc}}),new bm("selection",{init(t,e){return t.selection||Ut.atStart(e.doc)},apply(t){return t.selection}}),new bm("storedMarks",{init(t){return t.storedMarks||null},apply(t,e,n,i){return i.selection.$cursor?t.storedMarks:null}}),new bm("scrollToSelection",{init(){return 0},apply(t,e){return t.scrolledIntoView?e+1:e}})];class u3{constructor(e,n){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=x5e.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 bm(i.key,i.spec.state,i))})}}class Bu{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 Bu(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 C5e(this)}static create(e){let n=new u3(e.doc?e.doc.type.schema:e.schema,e.plugins),i=new Bu(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 u3(this.schema,e.plugins),i=n.fields,s=new Bu(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 u3(e.schema,e.plugins),o=new Bu(s);return s.fields.forEach(r=>{if(r.name=="doc")o.doc=Tc.fromJSON(e.schema,n.doc);else if(r.name=="selection")o.selection=Ut.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 aB(t,e,n){for(let i in t){let s=t[i];s instanceof Function?s=s.bind(e):i=="handleDOMEvents"&&(s=aB(s,e,{})),n[i]=s}return n}class rs{constructor(e){this.spec=e,this.props={},e.props&&aB(e.props,this,this.props),this.key=e.key?e.key.key:lB("plugin")}getState(e){return e[this.key]}}const d3=Object.create(null);function lB(t){return t in d3?t+"$"+ ++d3[t]:(d3[t]=0,t+"$")}class ps{constructor(e="key"){this.key=lB(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}class Go{constructor(e,n,i={}){this.match=e,this.match=e,this.handler=typeof n=="string"?S5e(n):n,this.undoable=i.undoable!==!1,this.inCode=i.inCode||!1}}function S5e(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 $5e=(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 Go(/--$/,"—");new Go(/\.\.\.$/,"…");new Go(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(")$/,"“");new Go(/"$/,"”");new Go(/(?:^|[\s\{\[\(\<'"\u2018\u201C])(')$/,"‘");new Go(/'$/,"’");function J8(t,e,n=null,i){return new Go(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&&X8(d,e,l);if(!h)return null;c.wrap(d,h);let f=c.doc.resolve(r-1).nodeBefore;return f&&f.type==e&&b2(c.doc,r-1)&&(!i||i(o,f))&&c.join(r-1),c})}function cB(t,e,n=null){return new Go(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 Uc=typeof navigator<"u"?navigator:null,GE=typeof document<"u"?document:null,ou=Uc&&Uc.userAgent||"",nx=/Edge\/(\d+)/.exec(ou),uB=/MSIE \d/.exec(ou),sx=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ou),k2=!!(uB||sx||nx),A5e=uB?document.documentMode:sx?+sx[1]:nx?+nx[1]:0,dB=!k2&&/gecko\/(\d+)/i.test(ou),E5e=dB&&+(/Firefox\/(\d+)/.exec(ou)||[0,0])[1],ix=!k2&&/Chrome\/(\d+)/.exec(ou),M5e=!!ix,T5e=ix?+ix[1]:0,hB=!k2&&!!Uc&&/Apple Computer/.test(Uc.vendor),fB=hB&&(/Mobile\/\w+/.test(ou)||!!Uc&&Uc.maxTouchPoints>2),P5e=fB||(Uc?/Mac/.test(Uc.platform):!1),I5e=/Android \d/.test(ou),pB=!!GE&&"webkitFontSmoothing"in GE.documentElement.style,L5e=pB?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;var u0=Object.freeze({__proto__:null,android:I5e,chrome:M5e,chrome_version:T5e,gecko:dB,gecko_version:E5e,ie:k2,ie_version:A5e,ios:fB,mac:P5e,safari:hB,webkit:pB,webkit_version:L5e});function h3(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 O5e=new ps("MILKDOWN_CUSTOM_INPUTRULES");function D5e({rules:t}){const e=new rs({key:O5e,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 h3(n,i,s,o,t,e)},handleDOMEvents:{compositionend:n=>(setTimeout(()=>{const{$cursor:i}=n.state.selection;i&&h3(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?h3(n,s.pos,s.pos,` | |
| 118 | +`,t,e):!1}}});return e}function tv(t,e,n={}){return new Go(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),S=$+f.length;m=(l=d.storedMarks)!=null?l:[],S<r&&d.delete(S,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 R5e=Object.defineProperty,V5e=Object.defineProperties,F5e=Object.getOwnPropertyDescriptors,XE=Object.getOwnPropertySymbols,N5e=Object.prototype.hasOwnProperty,B5e=Object.prototype.propertyIsEnumerable,KE=(t,e,n)=>e in t?R5e(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,z5e=(t,e)=>{for(var n in e||(e={}))N5e.call(e,n)&&KE(t,n,e[n]);if(XE)for(var n of XE(e))B5e.call(e,n)&&KE(t,n,e[n]);return t},H5e=(t,e)=>V5e(t,F5e(e));function ZE(t=0,e=0,n=0){return Math.min(Math.max(t,e),n)}function C2(t,e,n){const s=t.state.doc.content.size,o=ZE(e,0,s),r=ZE(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 H5e(z5e({},b),{toJSON:()=>b})}function x2(t){return Object.assign(Object.create(t),t).setTime(Date.now())}function U5e(t,e){return Array.isArray(t)&&t.includes(e.type)||e.type===t}function Q8(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 j5e(t,e){return Q8(n=>n.type===e)(t)}function W5e(t,e){const n=e.nodes[t];if(!n)throw zCe("node",t);return n}function e5(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 Y5e(t){return e=>e5(t)(e.$from)}function q5e(t,e){if(!(t instanceof Rt))return;const{node:n,$from:i}=t;if(U5e(e,n))return{node:n,pos:i.pos,start:i.start(i.depth),depth:i.depth}}const t5=(t,e)=>t.selection.empty?!1:(e&&e(t.tr.deleteSelection().scrollIntoView()),!0);function G5e(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("backward",t):n.parentOffset>0)?null:n}const mB=(t,e,n)=>{let i=G5e(t,n);if(!i)return!1;let s=vB(i);if(!s){let r=i.blockRange(),a=r&&y2(r);return a==null?!1:(e&&e(t.tr.lift(r,a).scrollIntoView()),!0)}let o=s.nodeBefore;if(yB(t,s,e,-1))return!0;if(i.parent.content.size==0&&(Qf(o,"end")||Rt.isSelectable(o)))for(let r=i.depth;;r--){let a=K8(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(Qf(o,"end")?Ut.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 Qf(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 gB=(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=vB(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 vB(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 X5e(t,e){let{$cursor:n}=t.selection;return!n||(e?!e.endOfTextblock("forward",t):n.parentOffset<n.parent.content.size)?null:n}const K5e=(t,e,n)=>{let i=X5e(t,n);if(!i)return!1;let s=_B(i);if(!s)return!1;let o=s.nodeAfter;if(yB(t,s,e,1))return!0;if(i.parent.content.size==0&&(Qf(o,"start")||Rt.isSelectable(o))){let r=K8(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(Qf(o,"start")?Ut.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},Z5e=(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=_B(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 _B(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 J5e=(t,e)=>{let{$head:n,$anchor:i}=t.selection;return!n.parent.type.spec.code||!n.sameParent(i)?!1:(e&&e(t.tr.insertText(` | |
| 119 | +`).scrollIntoView()),!0)};function n5(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 Q5e=(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=n5(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(Ut.near(l.doc.resolve(a),1)),e(l.scrollIntoView())}return!0},eSe=(t,e)=>{let n=t.selection,{$from:i,$to:s}=n;if(n instanceof Fo||i.parent.inlineContent||s.parent.inlineContent)return!1;let o=n5(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},tSe=(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(cg(t.doc,o))return e&&e(t.tr.split(o).scrollIntoView()),!0}let i=n.blockRange(),s=i&&y2(i);return s==null?!1:(e&&e(t.tr.lift(i,s).scrollIntoView()),!0)};function nSe(t){return(e,n)=>{let{$from:i,$to:s}=e.selection;if(e.selection instanceof Rt&&e.selection.node.isBlock)return!i.parentOffset||!cg(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 Fo)&&r.deleteSelection();let a=i.depth==0?null:n5(i.node(-1).contentMatchAt(i.indexAfter(-1))),l=t&&t(s.parent,o,i),c=l?[l]:o&&a?[{type:a}]:void 0,u=cg(r.doc,r.mapping.map(i.pos),1,c);if(!c&&!u&&cg(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 sSe=nSe(),iSe=(t,e)=>(e&&e(t.tr.setSelection(new Fo(t.doc))),!0);function oSe(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||b2(t.doc,e.pos))?!1:(n&&n(t.tr.clearIncompatible(e.pos,i.type,i.contentMatchAt(i.childCount)).join(e.pos).scrollIntoView()),!0)}function yB(t,e,n,i){let s=e.nodeBefore,o=e.nodeAfter,r,a,l=s.type.spec.isolating||o.type.spec.isolating;if(!l&&oSe(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=st.empty;for(let b=r.length-1;b>=0;b--)p=st.from(r[b].create(null,p));p=st.from(s.copy(p));let m=t.tr.step(new Ti(e.pos-1,f,e.pos,f,new rt(p,1,0),r.length,!0)),y=f+2*r.length;b2(m.doc,y)&&m.join(y),n(m.scrollIntoView())}return!0}let u=o.type.spec.isolating||i>0&&l?null:Ut.findFrom(e,1),d=u&&u.$from.blockRange(u.$to),h=d&&y2(d);if(h!=null&&h>=e.depth)return n&&n(t.tr.lift(d,h).scrollIntoView()),!0;if(c&&Qf(o,"start",!0)&&Qf(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=st.empty;for(let C=p.length-1;C>=0;C--)b=st.from(p[C].copy(b));let k=t.tr.step(new Ti(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 bB(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 rSe=bB(-1),aSe=bB(1);function s5(t,e=null){return function(n,i){let{$from:s,$to:o}=n.selection,r=s.blockRange(o),a=r&&X8(r,t,e);return a?(i&&i(n.tr.wrap(r,a).scrollIntoView()),!0):!1}}function l1(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 lSe(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 cSe(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 zy(i,i.doc.resolve(r+1))),i=i.doc.resolve(r+1+o.content.size),!1}),i.pos<s.pos&&e.push(new zy(i,s))}return e}function S2(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||!lSe(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=cSe(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 $2(...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 f3=$2(t5,mB,gB),JE=$2(t5,K5e,Z5e);const Qa={Enter:$2(J5e,eSe,tSe,sSe),"Mod-Enter":Q5e,Backspace:f3,"Mod-Backspace":f3,"Shift-Backspace":f3,Delete:JE,"Mod-Delete":JE,"Mod-a":iSe},wB={"Ctrl-h":Qa.Backspace,"Alt-Backspace":Qa["Mod-Backspace"],"Ctrl-d":Qa.Delete,"Ctrl-Alt-Backspace":Qa["Mod-Delete"],"Alt-Delete":Qa["Mod-Delete"],"Alt-d":Qa["Mod-Delete"],"Ctrl-a":rSe,"Ctrl-e":aSe};for(let t in Qa)wB[t]=Qa[t];const uSe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<"u"&&os.platform?os.platform()=="darwin":!1,dSe=uSe?wB:Qa;var jc={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:"'"},Hy={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},hSe=typeof navigator<"u"&&/Mac/.test(navigator.platform),fSe=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var ni=0;ni<10;ni++)jc[48+ni]=jc[96+ni]=String(ni);for(var ni=1;ni<=24;ni++)jc[ni+111]="F"+ni;for(var ni=65;ni<=90;ni++)jc[ni]=String.fromCharCode(ni+32),Hy[ni]=String.fromCharCode(ni);for(var p3 in jc)Hy.hasOwnProperty(p3)||(Hy[p3]=jc[p3]);function pSe(t){var e=hSe&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||fSe&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?Hy:jc)[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 mSe=typeof navigator<"u"?/Mac|iP(hone|[oa]d)/.test(navigator.platform):!1;function gSe(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))mSe?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 vSe(t){let e=Object.create(null);for(let n in t)e[gSe(n)]=t[n];return e}function m3(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 kB(t){return new rs({props:{handleKeyDown:CB(t)}})}function CB(t){let e=vSe(t);return function(n,i){let s=pSe(i),o,r=e[m3(s,i)];if(r&&r(n.state,n.dispatch,n))return!0;if(s.length==1&&s!=" "){if(i.shiftKey){let a=e[m3(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=jc[i.keyCode])&&o!=s){let a=e[m3(o,i)];if(a&&a(n.state,n.dispatch,n))return!0}}return!1}}const si=function(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e},c1=function(t){let e=t.assignedSlot||t.parentNode;return e&&e.nodeType==11?e.host:e};let ox=null;const Za=function(t,e,n){let i=ox||(ox=document.createRange());return i.setEnd(t,n??t.nodeValue.length),i.setStart(t,e||0),i},_Se=function(){ox=null},Sd=function(t,e,n,i){return n&&(QE(t,e,n,i,-1)||QE(t,e,n,i,1))},ySe=/^(img|br|input|textarea|hr)$/i;function QE(t,e,n,i,s){for(;;){if(t==n&&e==i)return!0;if(e==(s<0?0:ar(t))){let o=t.parentNode;if(!o||o.nodeType!=1||nv(t)||ySe.test(t.nodeName)||t.contentEditable=="false")return!1;e=si(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?ar(t):0}else return!1}}function ar(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function bSe(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=ar(t)}else if(t.parentNode&&!nv(t))e=si(t),t=t.parentNode;else return null}}function wSe(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&&!nv(t))e=si(t)+1,t=t.parentNode;else return null}}function kSe(t,e,n){for(let i=e==0,s=e==ar(t);i||s;){if(t==n)return!0;let o=si(t);if(t=t.parentNode,!t)return!1;i=i&&o==0,s=s&&o==ar(t)}}function nv(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 A2=function(t){return t.focusNode&&Sd(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)};function Lu(t,e){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=t,n.key=n.code=e,n}function CSe(t){let e=t.activeElement;for(;e&&e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function xSe(t,e,n){if(t.caretPositionFromPoint)try{let i=t.caretPositionFromPoint(e,n);if(i)return{node:i.offsetNode,offset:Math.min(ar(i.offsetNode),i.offset)}}catch{}if(t.caretRangeFromPoint){let i=t.caretRangeFromPoint(e,n);if(i)return{node:i.startContainer,offset:Math.min(ar(i.startContainer),i.startOffset)}}}const La=typeof navigator<"u"?navigator:null,eM=typeof document<"u"?document:null,ru=La&&La.userAgent||"",rx=/Edge\/(\d+)/.exec(ru),xB=/MSIE \d/.exec(ru),ax=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ru),po=!!(xB||ax||rx),Pc=xB?document.documentMode:ax?+ax[1]:rx?+rx[1]:0,Jr=!po&&/gecko\/(\d+)/i.test(ru);Jr&&+(/Firefox\/(\d+)/.exec(ru)||[0,0])[1];const lx=!po&&/Chrome\/(\d+)/.exec(ru),Ei=!!lx,SB=lx?+lx[1]:0,Gi=!po&&!!La&&/Apple Computer/.test(La.vendor),ep=Gi&&(/Mobile\/\w+/.test(ru)||!!La&&La.maxTouchPoints>2),nr=ep||(La?/Mac/.test(La.platform):!1),SSe=La?/Win/.test(La.platform):!1,Pr=/Android \d/.test(ru),sv=!!eM&&"webkitFontSmoothing"in eM.documentElement.style,$Se=sv?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function ASe(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 Ya(t,e){return typeof t=="number"?t:t[e]}function ESe(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 tM(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=c1(r)){if(r.nodeType!=1)continue;let a=r,l=a==o.body,c=l?ASe(o):ESe(a),u=0,d=0;if(e.top<c.top+Ya(i,"top")?d=-(c.top-e.top+Ya(s,"top")):e.bottom>c.bottom-Ya(i,"bottom")&&(d=e.bottom-e.top>c.bottom-c.top?e.top+Ya(s,"top")-c.top:e.bottom-c.bottom+Ya(s,"bottom")),e.left<c.left+Ya(i,"left")?u=-(c.left-e.left+Ya(s,"left")):e.right>c.right-Ya(i,"right")&&(u=e.right-c.right+Ya(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 MSe(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:$B(t.dom)}}function $B(t){let e=[],n=t.ownerDocument;for(let i=t;i&&(e.push({dom:i,top:i.scrollTop,left:i.scrollLeft}),t!=n);i=c1(i));return e}function TSe({refDOM:t,refTop:e,stack:n}){let i=t?t.getBoundingClientRect().top:0;AB(n,i==0?0:i-e)}function AB(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 hh=null;function PSe(t){if(t.setActive)return t.setActive();if(hh)return t.focus(hh);let e=$B(t);t.focus(hh==null?{get preventScroll(){return hh={preventScroll:!0},!0}}:void 0),hh||(hh=!1,AB(e,0))}function EB(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?ISe(n,s):!n||i&&n.nodeType==1?{node:t,offset:o}:EB(n,s)}function ISe(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=ec(i,1);if(o.top!=o.bottom&&i5(e,o))return{node:t,offset:s+(e.left>=(o.left+o.right)/2?1:0)}}return{node:t,offset:0}}function i5(t,e){return t.left>=e.left-1&&t.left<=e.right+1&&t.top>=e.top-1&&t.top<=e.bottom+1}function LSe(t,e){let n=t.parentNode;return n&&/^li$/i.test(n.nodeName)&&e.left<t.getBoundingClientRect().left?n:t}function OSe(t,e,n){let{node:i,offset:s}=EB(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 DSe(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 MB(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(i5(e,c))return MB(r,e,c)}}if((o=(o+1)%i)==s)break}return t}function RSe(t,e){let n=t.dom.ownerDocument,i,s=0,o=xSe(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(!i5(e,c)||(r=MB(t.dom,e,c),!r))return null}if(Gi)for(let c=r;i&&c;c=c1(c))c.draggable&&(i=void 0);if(r=LSe(r,e),i){if(Jr&&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;sv&&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=DSe(t,i,s,e))}a==null&&(a=OSe(t,r,e));let l=t.docView.nearestDesc(r,!0);return{pos:a,inside:l?l.posAtStart-l.border:-1}}function nM(t){return t.top<t.bottom||t.left<t.right}function ec(t,e){let n=t.getClientRects();if(n.length){let i=n[e<0?0:n.length-1];if(nM(i))return i}return Array.prototype.find.call(n,nM)||t.getBoundingClientRect()}const VSe=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function TB(t,e,n){let{node:i,offset:s,atom:o}=t.docView.domFromPos(e,n<0?-1:1),r=sv||Jr;if(i.nodeType==3)if(r&&(VSe.test(i.nodeValue)||(n<0?!s:s==i.nodeValue.length))){let l=ec(Za(i,s,s),n);if(Jr&&s&&/\s/.test(i.nodeValue[s-1])&&s<i.nodeValue.length){let c=ec(Za(i,s-1,s-1),-1);if(c.top==l.top){let u=ec(Za(i,s,s+1),-1);if(u.top!=l.top)return Jp(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++,Jp(ec(Za(i,l,c),u),u<0)}if(!t.state.doc.resolve(e-(o||0)).parent.inlineContent){if(o==null&&s&&(n<0||s==ar(i))){let l=i.childNodes[s-1];if(l.nodeType==1)return g3(l.getBoundingClientRect(),!1)}if(o==null&&s<ar(i)){let l=i.childNodes[s];if(l.nodeType==1)return g3(l.getBoundingClientRect(),!0)}return g3(i.getBoundingClientRect(),n>=0)}if(o==null&&s&&(n<0||s==ar(i))){let l=i.childNodes[s-1],c=l.nodeType==3?Za(l,ar(l)-(r?0:1)):l.nodeType==1&&(l.nodeName!="BR"||!l.nextSibling)?l:null;if(c)return Jp(ec(c,1),!1)}if(o==null&&s<ar(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 Jp(ec(c,-1),!0)}return Jp(ec(i.nodeType==3?Za(i):i,-n),n>=0)}function Jp(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 g3(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 PB(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 FSe(t,e,n){let i=e.selection,s=n=="up"?i.$from:i.$to;return PB(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=TB(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 NSe=/[\u0590-\u08ac]/;function BSe(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?!NSe.test(i.parent.textContent)||!a.modify?n=="left"||n=="backward"?o:r:PB(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 sM=null,iM=null,oM=!1;function zSe(t,e,n){return sM==e&&iM==n?oM:(sM=e,iM=n,oM=n=="up"||n=="down"?FSe(t,e,n):BSe(t,e,n))}const mr=0,rM=1,zu=2,Oa=3;class iv{constructor(e,n,i,s){this.parent=e,this.children=n,this.dom=i,this.contentDOM=s,this.dirty=mr,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>si(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 LB){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 IB&&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?si(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?si(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=si(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=si(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((Jr||Gi)&&e==n){let{node:h,offset:f}=a;if(h.nodeType==3){if(u=!!(f&&h.nodeValue[f-1]==` | |
| 120 | +`),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:si(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(Jr&&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&&Gi)&&Sd(a.node,a.offset,c.anchorNode,c.anchorOffset)&&Sd(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?zu:rM,e==a&&n==l&&(o.contentLost||o.dom.parentNode!=this.contentDOM)?o.dirty=Oa:o.markDirty(e-a,n-a);return}else o.dirty=o.dom==o.contentDOM&&o.dom.parentNode==this.contentDOM&&!o.children.length?zu:Oa}i=r}this.dirty=zu}markParentsDirty(){let e=1;for(let n=this.parent;n;n=n.parent,e++){let i=e==1?zu:rM;n.dirty<i&&(n.dirty=i)}}get domAtom(){return!1}get ignoreForCoords(){return!1}isText(e){return!1}}class IB extends iv{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==mr&&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 HSe extends iv{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 $d extends iv{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=su.renderSpec(document,n.type.spec.toDOM(n,i),null,n.attrs)),new $d(e,n,r.dom,r.contentDOM||r.dom)}parseRule(){return this.dirty&Oa||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Oa&&this.mark.eq(e)}markDirty(e,n){if(super.markDirty(e,n),this.dirty!=mr){let i=this.parent;for(;!i.node;)i=i.parent;i.dirty<this.dirty&&(i.dirty=this.dirty),this.dirty=mr}}slice(e,n,i){let s=$d.create(this.parent,this.mark,!0,i),o=this.children,r=this.size;n<r&&(o=dx(o,n,r,i)),e>0&&(o=dx(o,0,e,i));for(let a=0;a<o.length;a++)o[a].parent=s;return s.children=o,s}}class Ic extends iv{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}=su.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=RB(u,i,n),c?l=new USe(e,n,i,s,u,d||null,h,c,o,r+1):n.isText?new E2(e,n,i,s,u,h,o):new Ic(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=()=>st.empty)}return e}matchesNode(e,n,i){return this.dirty==mr&&e.eq(this.node)&&ux(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 WSe(this,r&&r.node,e);GSe(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==zu)&&(r&&this.protectLocalComposition(e,r),OB(this.contentDOM,this.children,e),ep&&XSe(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=KSe(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 HSe(this,o,n,s);e.input.compositionNodes.push(r),this.children=dx(this.children,i,i+s.length,e,r)}update(e,n,i,s){return this.dirty==Oa||!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=mr}updateOuterDeco(e){if(ux(e,this.outerDeco))return;let n=this.nodeDOM.nodeType!=1,i=this.dom;this.dom=DB(this.dom,this.nodeDOM,cx(this.outerDeco,this.node,n),cx(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 aM(t,e,n,i,s){RB(i,e,t);let o=new Ic(void 0,t,e,n,i,i,i,s,0);return o.contentDOM&&o.updateChildren(s,0),o}class E2 extends Ic{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==Oa||this.dirty!=mr&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(n),(this.dirty!=mr||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=mr,!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=Oa)}get domAtom(){return!1}isText(e){return this.node.text==e}}class LB extends iv{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==mr&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName=="IMG"}}class USe extends Ic{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==Oa)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 OB(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=lM(i),s=!0;i=i.nextSibling}else s=!0,t.insertBefore(a,i);if(r instanceof $d){let l=i?i.previousSibling:t.lastChild;OB(r.contentDOM,r.children,n),i=l?l.nextSibling:t.firstChild}}for(;i;)i=lM(i),s=!0;s&&n.trackWrites==t&&(n.trackWrites=null)}const ug=function(t){t&&(this.nodeName=t)};ug.prototype=Object.create(null);const Hu=[new ug];function cx(t,e,n){if(t.length==0)return Hu;let i=n?Hu[0]:new ug,s=[i];for(let o=0;o<t.length;o++){let r=t[o].type.attrs;if(r){r.nodeName&&s.push(i=new ug(r.nodeName));for(let a in r){let l=r[a];l!=null&&(n&&s.length==1&&s.push(i=new ug(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 DB(t,e,n,i){if(n==Hu&&i==Hu)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=Hu[0]),s=l}jSe(s,a||Hu[0],r)}return s}function jSe(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 RB(t,e,n){return DB(t,t,Hu,cx(e,n,t.nodeType!=1))}function ux(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 lM(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class WSe{constructor(e,n,i){this.lock=n,this.view=i,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=YSe(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=mr,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=$d.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==Oa&&r.dom==r.contentDOM&&(r.dirty=zu),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 Ic){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!=Oa&&ux(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=zu,d.updateChildren(s,r+1),d.dirty=mr),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=Ic.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=Ic.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 IB(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 $d;)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))&&((Gi||Ei)&&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 LB(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 YSe(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 $d)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 qSe(t,e){return t.type.side-e.type.side}function GSe(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(qSe);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 XSe(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 KSe(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 dx(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 o5(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(A2(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&&kSe(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=r5(t,l,a,u)}return c}function VB(t){return t.editable?t.hasFocus():NB(t)&&document.activeElement&&document.activeElement.contains(t.dom)}function ml(t,e=!1){let n=t.state.selection;if(FB(t,n),!!VB(t)){if(!e&&t.input.mouseDown&&t.input.mouseDown.allowDefault&&Ei){let i=t.domSelectionRange(),s=t.domObserver.currentSelection;if(i.anchorNode&&s.anchorNode&&Sd(i.anchorNode,i.anchorOffset,s.anchorNode,s.anchorOffset)){t.input.mouseDown.delayedSelectionSync=!0,t.domObserver.setCurSelection();return}}if(t.domObserver.disconnectSelection(),t.cursorWrapper)JSe(t);else{let{anchor:i,head:s}=n,o,r;cM&&!(n instanceof Ot)&&(n.$from.parent.inlineContent||(o=uM(t,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(r=uM(t,n.to))),t.docView.setSelection(i,s,t.root,e),cM&&(o&&dM(o),r&&dM(r)),n.visible?t.dom.classList.remove("ProseMirror-hideselection"):(t.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&ZSe(t))}t.domObserver.setCurSelection(),t.domObserver.connectSelection()}}const cM=Gi||Ei&&SB<63;function uM(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(Gi&&s&&s.contentEditable=="false")return v3(s);if((!s||s.contentEditable=="false")&&(!o||o.contentEditable=="false")){if(s)return v3(s);if(o)return v3(o)}}function v3(t){return t.contentEditable="true",Gi&&t.draggable&&(t.draggable=!1,t.wasDraggable=!0),t}function dM(t){t.contentEditable="false",t.wasDraggable&&(t.draggable=!0,t.wasDraggable=null)}function ZSe(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(()=>{(!VB(t)||t.state.selection.visible)&&t.dom.classList.remove("ProseMirror-hideselection")},20))})}function JSe(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,si(i)+1):n.setStart(i,0),n.collapse(!0),e.removeAllRanges(),e.addRange(n),!s&&!t.state.selection.visible&&po&&Pc<=11&&(i.disabled=!0,i.disabled=!1)}function FB(t,e){if(e instanceof Rt){let n=t.docView.descAt(e.from);n!=t.lastSelectedViewDesc&&(hM(t),n&&n.selectNode(),t.lastSelectedViewDesc=n)}else hM(t)}function hM(t){t.lastSelectedViewDesc&&(t.lastSelectedViewDesc.parent&&t.lastSelectedViewDesc.deselectNode(),t.lastSelectedViewDesc=void 0)}function r5(t,e,n,i){return t.someProp("createSelectionBetween",s=>s(t,e,n))||Ot.between(e,n,i)}function fM(t){return t.editable&&!t.hasFocus()?!1:NB(t)}function NB(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 QSe(t){let e=t.docView.domFromPos(t.state.selection.anchor,0),n=t.domSelectionRange();return Sd(e.node,e.offset,n.anchorNode,n.anchorOffset)}function hx(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&&Ut.findFrom(o,e)}function hc(t,e){return t.dispatch(t.state.tr.setSelection(e).scrollIntoView()),!0}function pM(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 hc(t,new Ot(i.$anchor,r))}else if(i.empty){if(t.endOfTextblock(e>0?"forward":"backward")){let s=hx(t.state,e);return s&&s instanceof Rt?hc(t,s):!1}else if(!(nr&&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)?hc(t,new Rt(e<0?t.state.doc.resolve(s.pos-o.nodeSize):s)):sv?hc(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 hc(t,new Ot(e>0?i.$to:i.$from));{let s=hx(t.state,e);return s?hc(t,s):!1}}}function Uy(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function dg(t,e){let n=t.pmViewDesc;return n&&n.size==0&&(e<0||t.nextSibling||t.nodeName!="BR")}function fh(t,e){return e<0?e9e(t):t9e(t)}function e9e(t){let e=t.domSelectionRange(),n=e.focusNode,i=e.focusOffset;if(!n)return;let s,o,r=!1;for(Jr&&n.nodeType==1&&i<Uy(n)&&dg(n.childNodes[i],-1)&&(r=!0);;)if(i>0){if(n.nodeType!=1)break;{let a=n.childNodes[i-1];if(dg(a,-1))s=n,o=--i;else if(a.nodeType==3)n=a,i=n.nodeValue.length;else break}}else{if(BB(n))break;{let a=n.previousSibling;for(;a&&dg(a,-1);)s=n.parentNode,o=si(a),a=a.previousSibling;if(a)n=a,i=Uy(n);else{if(n=n.parentNode,n==t.dom)break;i=0}}}r?fx(t,n,i):s&&fx(t,s,o)}function t9e(t){let e=t.domSelectionRange(),n=e.focusNode,i=e.focusOffset;if(!n)return;let s=Uy(n),o,r;for(;;)if(i<s){if(n.nodeType!=1)break;let a=n.childNodes[i];if(dg(a,1))o=n,r=++i;else break}else{if(BB(n))break;{let a=n.nextSibling;for(;a&&dg(a,1);)o=a.parentNode,r=si(a)+1,a=a.nextSibling;if(a)n=a,i=0,s=Uy(n);else{if(n=n.parentNode,n==t.dom)break;i=s=0}}}o&&fx(t,o,r)}function BB(t){let e=t.pmViewDesc;return e&&e.node&&e.node.isBlock}function n9e(t,e){for(;t&&e==t.childNodes.length&&!nv(t);)e=si(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 s9e(t,e){for(;t&&!e&&!nv(t);)e=si(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 fx(t,e,n){if(e.nodeType!=3){let o,r;(r=n9e(e,n))?(e=r,n=0):(o=s9e(e,n))&&(e=o,n=o.nodeValue.length)}let i=t.domSelection();if(!i)return;if(A2(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&&ml(t)},50)}function mM(t,e){let n=t.state.doc.resolve(e);if(!(Ei||SSe)&&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 gM(t,e,n){let i=t.state.selection;if(i instanceof Ot&&!i.empty||n.indexOf("s")>-1||nr&&n.indexOf("m")>-1)return!1;let{$from:s,$to:o}=i;if(!s.parent.inlineContent||t.endOfTextblock(e<0?"up":"down")){let r=hx(t.state,e);if(r&&r instanceof Rt)return hc(t,r)}if(!s.parent.inlineContent){let r=e<0?s:o,a=i instanceof Fo?Ut.near(r,e):Ut.findFrom(r,e);return a?hc(t,a):!1}return!1}function vM(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 _M(t,e,n){t.domObserver.stop(),e.contentEditable=n,t.domObserver.start()}function i9e(t){if(!Gi||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;_M(t,i,"true"),setTimeout(()=>_M(t,i,"false"),20)}return!1}function o9e(t){let e="";return t.ctrlKey&&(e+="c"),t.metaKey&&(e+="m"),t.altKey&&(e+="a"),t.shiftKey&&(e+="s"),e}function r9e(t,e){let n=e.keyCode,i=o9e(e);if(n==8||nr&&n==72&&i=="c")return vM(t,-1)||fh(t,-1);if(n==46&&!e.shiftKey||nr&&n==68&&i=="c")return vM(t,1)||fh(t,1);if(n==13||n==27)return!0;if(n==37||nr&&n==66&&i=="c"){let s=n==37?mM(t,t.state.selection.from)=="ltr"?-1:1:-1;return pM(t,s,i)||fh(t,s)}else if(n==39||nr&&n==70&&i=="c"){let s=n==39?mM(t,t.state.selection.from)=="ltr"?1:-1:1;return pM(t,s,i)||fh(t,s)}else{if(n==38||nr&&n==80&&i=="c")return gM(t,-1,i)||fh(t,-1);if(n==40||nr&&n==78&&i=="c")return i9e(t)||gM(t,1,i)||fh(t,1);if(i==(nr?"m":"c")&&(n==66||n==73||n==89||n==90))return!0}return!1}function zB(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")||su.fromSchema(t.state.schema),a=qB(),l=a.createElement("div");l.appendChild(r.serializeFragment(i,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType==1&&(u=YB[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,` | |
| 122 | 121 | |
| 123 | -`);return{dom:l,text:h,slice:e}}function TN(t,e,n,s,i){let o=i.parent.type.spec.code,r,a;if(!n&&!e)return null;let l=e&&(s||o||!n);if(l){if(t.someProp("transformPastedText",h=>{e=h(e,o||s,t)}),o)return e?new it(et.from(t.state.schema.text(e.replace(/\r\n?/g,` | |
| 124 | -`))),0,0):it.empty;let d=t.someProp("clipboardTextParser",h=>h(e,i,s,t));if(d)a=d;else{let h=i.marks(),{schema:f}=t.state,p=Ic.fromSchema(f);r=document.createElement("div"),e.split(/(?:\r\n?|\n)+/).forEach(m=>{let b=r.appendChild(document.createElement("p"));m&&b.appendChild(p.serializeNode(f.text(m,h)))})}}else t.someProp("transformPastedHTML",d=>{n=d(n,t)}),r=D8e(n),_1&&R8e(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")||Xu.fromSchema(t.state.schema)).parseSlice(r,{preserveWhitespace:!!(l||u),context:i,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!I8e.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)a=V8e(kM(a,+u[1],+u[2]),u[4]);else if(a=it.maxOpen(L8e(a.content,i),!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=kM(a,d,h)}return t.someProp("transformPasted",d=>{a=d(a,t)}),a}const I8e=/^(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 L8e(t,e){if(t.childCount<2)return t;for(let n=e.depth;n>=0;n--){let i=e.node(n).contentMatchAt(e.index(n)),o,r=[];if(t.forEach(a=>{if(!r)return;let l=i.findWrapping(a.type),c;if(!l)return r=null;if(c=r.length&&o.length&&IN(l,o,a,r[r.length-1],0))r[r.length-1]=c;else{r.length&&(r[r.length-1]=LN(r[r.length-1],o.length));let u=PN(a,l);r.push(u),i=i.matchType(u.type),o=l}}),r)return et.from(r)}return t}function PN(t,e,n=0){for(let s=e.length-1;s>=n;s--)t=e[s].create(null,et.from(t));return t}function IN(t,e,n,s,i){if(i<t.length&&i<e.length&&t[i]==e[i]){let o=IN(t,e,n,s.lastChild,i+1);if(o)return s.copy(s.content.replaceChild(s.childCount-1,o));if(s.contentMatchAt(s.childCount).matchType(i==t.length-1?n.type:t[i+1]))return s.copy(s.content.append(et.from(PN(n,t,i+1))))}}function LN(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,LN(t.lastChild,e-1)),s=t.contentMatchAt(t.childCount).fillBefore(et.empty,!0);return t.copy(n.append(s))}function _C(t,e,n,s,i,o){let r=e<0?t.firstChild:t.lastChild,a=r.content;return t.childCount>1&&(o=0),i<s-1&&(a=_C(a,e,n,s,i+1,o)),i>=n&&(a=e<0?r.contentMatchAt(0).fillBefore(a,o<=i).append(a):a.append(r.contentMatchAt(r.childCount).fillBefore(et.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,r.copy(a))}function kM(t,e,n){return e<t.openStart&&(t=new it(_C(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new it(_C(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const ON={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 xM=null;function DN(){return xM||(xM=document.implementation.createHTMLDocument("title"))}function O8e(t){let e=window.trustedTypes;return e?e.createPolicy("detachedDocument",{createHTML:n=>n}).createHTML(t):t}function D8e(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=DN().createElement("div"),s=/<([a-z][^>\s]+)/i.exec(t),i;if((i=s&&ON[s[1].toLowerCase()])&&(t=i.map(o=>"<"+o+">").join("")+t+i.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=O8e(t),i)for(let o=0;o<i.length;o++)n=n.querySelector(i[o])||n;return n}function R8e(t){let e=t.querySelectorAll(ri?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<e.length;n++){let s=e[n];s.childNodes.length==1&&s.textContent==" "&&s.parentNode&&s.parentNode.replaceChild(t.ownerDocument.createTextNode(" "),s)}}function V8e(t,e){if(!t.size)return t;let n=t.content.firstChild.type.schema,s;try{s=JSON.parse(e)}catch{return t}let{content:i,openStart:o,openEnd:r}=t;for(let a=s.length-2;a>=0;a-=2){let l=n.nodes[s[a]];if(!l||l.hasRequiredAttrs())break;i=et.from(l.create(s[a+1],i)),o++,r++}return new it(i,o,r)}const Ti={},Pi={},F8e={touchstart:!0,touchmove:!0};class N8e{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 B8e(t){for(let e in Ti){let n=Ti[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=s=>{H8e(t,s)&&!t8(t,s)&&(t.editable||!(s.type in Pi))&&n(t,s)},F8e[e]?{passive:!0}:void 0)}Ei&&t.dom.addEventListener("input",()=>null),yC(t)}function tc(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function z8e(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 yC(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=s=>t8(t,s))})}function t8(t,e){return t.someProp("handleDOMEvents",n=>{let s=n[e.type];return s?s(t,e)||e.defaultPrevented:!1})}function H8e(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 U8e(t,e){!t8(t,e)&&Ti[e.type]&&(t.editable||!(e.type in Pi))&&Ti[e.type](t,e)}Pi.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!VN(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(dr&&ri&&n.keyCode==13)))if(t.domObserver.selectionChanged(t.domSelectionRange())?t.domObserver.flush():n.keyCode!=229&&t.domObserver.forceFlush(),xf&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let s=Date.now();t.input.lastIOSEnter=s,t.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{t.input.lastIOSEnter==s&&(t.someProp("handleKeyDown",i=>i(t,ru(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",s=>s(t,n))||P8e(t,n)?n.preventDefault():tc(t,"key")};Pi.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Pi.keypress=(t,e)=>{let n=e;if(VN(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||Oo&&n.metaKey)return;if(t.someProp("handleKeyPress",i=>i(t,n))){n.preventDefault();return}let s=t.state.selection;if(!(s instanceof St)||!s.$from.sameParent(s.$to)){let i=String.fromCharCode(n.charCode);!/[\r\n]/.test(i)&&!t.someProp("handleTextInput",o=>o(t,s.$from.pos,s.$to.pos,i))&&t.dispatch(t.state.tr.insertText(i).scrollIntoView()),n.preventDefault()}};function Rb(t){return{left:t.clientX,top:t.clientY}}function j8e(t,e){let n=e.x-t.clientX,s=e.y-t.clientY;return n*n+s*s<100}function n8(t,e,n,s,i){if(s==-1)return!1;let o=t.state.doc.resolve(s);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),i,!0):a(t,n,o.node(r),o.before(r),i,!1)))return!0;return!1}function Oh(t,e,n){if(t.focused||t.focus(),t.state.selection.eq(e))return;let s=t.state.tr.setSelection(e);n=="pointer"&&s.setMeta("pointer",!0),t.dispatch(s)}function W8e(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),s=n.nodeAfter;return s&&s.isAtom&&At.isSelectable(s)?(Oh(t,new At(n),"pointer"),!0):!1}function Y8e(t,e){if(e==-1)return!1;let n=t.state.selection,s,i;n instanceof At&&(s=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(At.isSelectable(a)){s&&n.$from.depth>0&&r>=n.$from.depth&&o.before(n.$from.depth+1)==n.$from.pos?i=o.before(n.$from.depth):i=o.before(r);break}}return i!=null?(Oh(t,At.create(t.state.doc,i),"pointer"),!0):!1}function G8e(t,e,n,s,i){return n8(t,"handleClickOn",e,n,s)||t.someProp("handleClick",o=>o(t,e,s))||(i?Y8e(t,n):W8e(t,n))}function q8e(t,e,n,s){return n8(t,"handleDoubleClickOn",e,n,s)||t.someProp("handleDoubleClick",i=>i(t,e,s))}function X8e(t,e,n,s){return n8(t,"handleTripleClickOn",e,n,s)||t.someProp("handleTripleClick",i=>i(t,e,s))||K8e(t,n,s)}function K8e(t,e,n){if(n.button!=0)return!1;let s=t.state.doc;if(e==-1)return s.inlineContent?(Oh(t,St.create(s,0,s.content.size),"pointer"),!0):!1;let i=s.resolve(e);for(let o=i.depth+1;o>0;o--){let r=o>i.depth?i.nodeAfter:i.node(o),a=i.before(o);if(r.inlineContent)Oh(t,St.create(s,a+1,a+1+r.content.size),"pointer");else if(At.isSelectable(r))Oh(t,At.create(s,a),"pointer");else continue;return!0}}function s8(t){return ty(t)}const RN=Oo?"metaKey":"ctrlKey";Ti.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let s=s8(t),i=Date.now(),o="singleClick";i-t.input.lastClick.time<500&&j8e(n,t.input.lastClick)&&!n[RN]&&(t.input.lastClick.type=="singleClick"?o="doubleClick":t.input.lastClick.type=="doubleClick"&&(o="tripleClick")),t.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:o};let r=t.posAtCoords(Rb(n));r&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new Z8e(t,r,n,!!s)):(o=="doubleClick"?q8e:X8e)(t,r.pos,r.inside,n)?n.preventDefault():tc(t,"pointer"))};class Z8e{constructor(e,n,s,i){this.view=e,this.pos=n,this.event=s,this.flushed=i,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!s[RN],this.allowDefault=s.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=i?null:s.target,l=a?e.docView.nearestDesc(a,!0):null;this.target=l&&l.dom.nodeType==1?l.dom:null;let{selection:c}=e.state;(s.button==0&&o.type.spec.draggable&&o.type.spec.selectable!==!1||c instanceof At&&c.from<=r&&c.to>r)&&(this.mightDrag={node:o,pos:r,addAttr:!!(this.target&&!this.target.draggable),setUneditable:!!(this.target&&Rr&&!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)),tc(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(()=>tl(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(Rb(e))),this.updateAllowDefault(e),this.allowDefault||!n?tc(this.view,"pointer"):G8e(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Ei&&this.mightDrag&&!this.mightDrag.node.isAtom||ri&&!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)?(Oh(this.view,Ot.near(this.view.state.doc.resolve(n.pos)),"pointer"),e.preventDefault()):tc(this.view,"pointer")}move(e){this.updateAllowDefault(e),tc(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)}}Ti.touchstart=t=>{t.input.lastTouch=Date.now(),s8(t),tc(t,"pointer")};Ti.touchmove=t=>{t.input.lastTouch=Date.now(),tc(t,"pointer")};Ti.contextmenu=t=>s8(t);function VN(t,e){return t.composing?!0:Ei&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const J8e=dr?5e3:-1;Pi.compositionstart=Pi.compositionupdate=t=>{if(!t.composing){t.domObserver.flush();let{state:e}=t,n=e.selection.$to;if(e.selection instanceof St&&(e.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(s=>s.type.spec.inclusive===!1)))t.markCursor=t.state.storedMarks||n.marks(),ty(t,!0),t.markCursor=null;else if(ty(t,!e.selection.empty),Rr&&e.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let s=t.domSelectionRange();for(let i=s.focusNode,o=s.focusOffset;i&&i.nodeType==1&&o!=0;){let r=o<0?i.lastChild:i.childNodes[o-1];if(!r)break;if(r.nodeType==3){let a=t.domSelection();a&&a.collapse(r,r.nodeValue.length);break}else i=r,o=-1}}t.input.composing=!0}FN(t,J8e)};Pi.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++,FN(t,20))};function FN(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>ty(t),e))}function NN(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=e5e());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function Q8e(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=W4e(e.focusNode,e.focusOffset),s=Y4e(e.focusNode,e.focusOffset);if(n&&s&&n!=s){let i=s.pmViewDesc,o=t.domObserver.lastChangedTextNode;if(n==o||s==o)return o;if(!i||!i.isText(s.nodeValue))return s;if(t.input.compositionNode==s){let r=n.pmViewDesc;if(!(!r||!r.isText(n.nodeValue)))return s}}return n||s}function e5e(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function ty(t,e=!1){if(!(dr&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),NN(t),e||t.docView&&t.docView.dirty){let n=Q4(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 t5e(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 s=getSelection(),i=document.createRange();i.selectNodeContents(e),t.dom.blur(),s.removeAllRanges(),s.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),t.focus()},50)}const $g=qi&&rc<15||xf&&Z4e<604;Ti.copy=Pi.cut=(t,e)=>{let n=e,s=t.state.selection,i=n.type=="cut";if(s.empty)return;let o=$g?null:n.clipboardData,r=s.content(),{dom:a,text:l}=EN(t,r);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):t5e(t,a),i&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function n5e(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function s5e(t,e){if(!t.dom.parentNode)return;let n=t.input.shiftKey||t.state.selection.$from.parent.type.spec.code,s=t.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(s.contentEditable="true"),s.style.cssText="position: fixed; left: -10000px; top: 10px",s.focus();let i=t.input.shiftKey&&t.input.lastKeyCode!=45;setTimeout(()=>{t.focus(),s.parentNode&&s.parentNode.removeChild(s),n?Ag(t,s.value,null,i,e):Ag(t,s.textContent,s.innerHTML,i,e)},50)}function Ag(t,e,n,s,i){let o=TN(t,e,n,s,t.state.selection.$from);if(t.someProp("handlePaste",l=>l(t,i,o||it.empty)))return!0;if(!o)return!1;let r=n5e(o),a=r?t.state.tr.replaceSelectionWith(r,s):t.state.tr.replaceSelection(o);return t.dispatch(a.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}function BN(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," "):""}Pi.paste=(t,e)=>{let n=e;if(t.composing&&!dr)return;let s=$g?null:n.clipboardData,i=t.input.shiftKey&&t.input.lastKeyCode!=45;s&&Ag(t,BN(s),s.getData("text/html"),i,n)?n.preventDefault():s5e(t,n)};class zN{constructor(e,n,s){this.slice=e,this.move=n,this.node=s}}const HN=Oo?"altKey":"ctrlKey";Ti.dragstart=(t,e)=>{let n=e,s=t.input.mouseDown;if(s&&s.done(),!n.dataTransfer)return;let i=t.state.selection,o=i.empty?null:t.posAtCoords(Rb(n)),r;if(!(o&&o.pos>=i.from&&o.pos<=(i instanceof At?i.to-1:i.to))){if(s&&s.mightDrag)r=At.create(t.state.doc,s.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=At.create(t.state.doc,d.posBefore))}}let a=(r||t.state.selection).content(),{dom:l,text:c,slice:u}=EN(t,a);(!n.dataTransfer.files.length||!ri||fN>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData($g?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",$g||n.dataTransfer.setData("text/plain",c),t.dragging=new zN(u,!n[HN],r)};Ti.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Pi.dragover=Pi.dragenter=(t,e)=>e.preventDefault();Pi.drop=(t,e)=>{let n=e,s=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let i=t.posAtCoords(Rb(n));if(!i)return;let o=t.state.doc.resolve(i.pos),r=s&&s.slice;r?t.someProp("transformPasted",p=>{r=p(r,t)}):r=TN(t,BN(n.dataTransfer),$g?null:n.dataTransfer.getData("text/html"),!1,o);let a=!!(s&&!n[HN]);if(t.someProp("handleDrop",p=>p(t,n,r||it.empty,a))){n.preventDefault();return}if(!r)return;n.preventDefault();let l=r?Fxe(t.state.doc,o.pos,r):o.pos;l==null&&(l=o.pos);let c=t.state.tr;if(a){let{node:p}=s;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&&At.isSelectable(r.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(r.content.firstChild))c.setSelection(new At(f));else{let p=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach((m,b,y,C)=>p=C),c.setSelection(e8(t,f,c.doc.resolve(p)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))};Ti.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())&&tl(t)},20))};Ti.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)};Ti.beforeinput=(t,e)=>{if(ri&&dr&&e.inputType=="deleteContentBackward"){t.domObserver.flushSoon();let{domChangeCount:s}=t.input;setTimeout(()=>{if(t.input.domChangeCount!=s||(t.dom.blur(),t.focus(),t.someProp("handleKeyDown",o=>o(t,ru(8,"Backspace")))))return;let{$cursor:i}=t.state.selection;i&&i.pos>0&&t.dispatch(t.state.tr.delete(i.pos-1,i.pos).scrollIntoView())},50)}};for(let t in Pi)Ti[t]=Pi[t];function Mg(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 ny{constructor(e,n){this.toDOM=e,this.spec=n||Pu,this.side=this.spec.side||0}map(e,n,s,i){let{pos:o,deleted:r}=e.mapResult(n.from+i,this.side<0?-1:1);return r?null:new ws(o-s,o-s,this)}valid(){return!0}eq(e){return this==e||e instanceof ny&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&Mg(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class lc{constructor(e,n){this.attrs=e,this.spec=n||Pu}map(e,n,s,i){let o=e.map(n.from+i,this.spec.inclusiveStart?-1:1)-s,r=e.map(n.to+i,this.spec.inclusiveEnd?1:-1)-s;return o>=r?null:new ws(o,r,this)}valid(e,n){return n.from<n.to}eq(e){return this==e||e instanceof lc&&Mg(this.attrs,e.attrs)&&Mg(this.spec,e.spec)}static is(e){return e.type instanceof lc}destroy(){}}class i8{constructor(e,n){this.attrs=e,this.spec=n||Pu}map(e,n,s,i){let o=e.mapResult(n.from+i,1);if(o.deleted)return null;let r=e.mapResult(n.to+i,-1);return r.deleted||r.pos<=o.pos?null:new ws(o.pos-s,r.pos-s,this)}valid(e,n){let{index:s,offset:i}=e.content.findIndex(n.from),o;return i==n.from&&!(o=e.child(s)).isText&&i+o.nodeSize==n.to}eq(e){return this==e||e instanceof i8&&Mg(this.attrs,e.attrs)&&Mg(this.spec,e.spec)}destroy(){}}class ws{constructor(e,n,s){this.from=e,this.to=n,this.type=s}copy(e,n){return new ws(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,s){return this.type.map(e,this,n,s)}static widget(e,n,s){return new ws(e,e,new ny(n,s))}static inline(e,n,s,i){return new ws(e,n,new lc(s,i))}static node(e,n,s,i){return new ws(e,n,new i8(s,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof lc}get widget(){return this.type instanceof ny}}const ah=[],Pu={};class Nn{constructor(e,n){this.local=e.length?e:ah,this.children=n.length?n:ah}static create(e,n){return n.length?sy(n,e,0,Pu):ei}find(e,n,s){let i=[];return this.findInner(e??0,n??1e9,i,0,s),i}findInner(e,n,s,i,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))&&s.push(a.copy(a.from+i,a.to+i))}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,s,i+a,o)}}map(e,n,s){return this==ei||e.maps.length==0?this:this.mapInner(e,n,0,0,s||Pu)}mapInner(e,n,s,i,o){let r;for(let a=0;a<this.local.length;a++){let l=this.local[a].map(e,s,i);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,s,i,o):r?new Nn(r.sort(Iu),ah):ei}add(e,n){return n.length?this==ei?Nn.create(e,n):this.addInner(e,n,0):this}addInner(e,n,s){let i,o=0;e.forEach((a,l)=>{let c=l+s,u;if(u=jN(n,a,c)){for(i||(i=this.children.slice());o<i.length&&i[o]<l;)o+=3;i[o]==l?i[o+2]=i[o+2].addInner(a,u,c+1):i.splice(o,0,l,l+a.nodeSize,sy(u,a,c+1,Pu)),o+=3}});let r=UN(o?WN(n):n,-s);for(let a=0;a<r.length;a++)r[a].type.valid(e,r[a])||r.splice(a--,1);return new Nn(r.length?this.local.concat(r).sort(Iu):this.local,i||this.children)}remove(e){return e.length==0||this==ei?this:this.removeInner(e,0)}removeInner(e,n){let s=this.children,i=this.local;for(let o=0;o<s.length;o+=3){let r,a=s[o]+n,l=s[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;s==this.children&&(s=this.children.slice());let c=s[o+2].removeInner(r,a+1);c!=ei?s[o+2]=c:(s.splice(o,3),o-=3)}if(i.length){for(let o=0,r;o<e.length;o++)if(r=e[o])for(let a=0;a<i.length;a++)i[a].eq(r,n)&&(i==this.local&&(i=this.local.slice()),i.splice(a--,1))}return s==this.children&&i==this.local?this:i.length||s.length?new Nn(i,s):ei}forChild(e,n){if(this==ei)return this;if(n.isLeaf)return Nn.empty;let s,i;for(let a=0;a<this.children.length;a+=3)if(this.children[a]>=e){this.children[a]==e&&(s=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 lc){let c=Math.max(o,l.from)-o,u=Math.min(r,l.to)-o;c<u&&(i||(i=[])).push(l.copy(c,u))}}if(i){let a=new Nn(i.sort(Iu),ah);return s?new Gl([a,s]):a}return s||ei}eq(e){if(this==e)return!0;if(!(e instanceof Nn)||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 o8(this.localsInner(e))}localsInner(e){if(this==ei)return ah;if(e.inlineContent||!this.local.some(lc.is))return this.local;let n=[];for(let s=0;s<this.local.length;s++)this.local[s].type instanceof lc||n.push(this.local[s]);return n}forEachSet(e){e(this)}}Nn.empty=new Nn([],[]);Nn.removeOverlap=o8;const ei=Nn.empty;class Gl{constructor(e){this.members=e}map(e,n){const s=this.members.map(i=>i.map(e,n,Pu));return Gl.from(s)}forChild(e,n){if(n.isLeaf)return Nn.empty;let s=[];for(let i=0;i<this.members.length;i++){let o=this.members[i].forChild(e,n);o!=ei&&(o instanceof Gl?s=s.concat(o.members):s.push(o))}return Gl.from(s)}eq(e){if(!(e instanceof Gl)||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,s=!0;for(let i=0;i<this.members.length;i++){let o=this.members[i].localsInner(e);if(o.length)if(!n)n=o;else{s&&(n=n.slice(),s=!1);for(let r=0;r<o.length;r++)n.push(o[r])}}return n?o8(s?n:n.sort(Iu)):ah}static from(e){switch(e.length){case 0:return ei;case 1:return e[0];default:return new Gl(e.every(n=>n instanceof Nn)?e:e.reduce((n,s)=>n.concat(s instanceof Nn?s:s.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function i5e(t,e,n,s,i,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 b=m-p-(f-h);for(let y=0;y<a.length;y+=3){let C=a[y+1];if(C<0||h>C+u-d)continue;let k=a[y]+u-d;f>=k?a[y+1]=h<=k?-2:-1:h>=u&&b&&(a[y]+=b,a[y+1]+=b)}d+=b}),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-i;if(d<0||d>=s.content.size){l=!0;continue}let h=n.map(t[c+1]+o,-1),f=h-i,{index:p,offset:m}=s.content.findIndex(d),b=s.maybeChild(p);if(b&&m==d&&m+b.nodeSize==f){let y=a[c+2].mapInner(n,b,u+1,t[c]+o+1,r);y!=ei?(a[c]=d,a[c+1]=f,a[c+2]=y):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=o5e(a,t,e,n,i,o,r),u=sy(c,s,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 Nn(e.sort(Iu),a)}function UN(t,e){if(!e||!t.length)return t;let n=[];for(let s=0;s<t.length;s++){let i=t[s];n.push(new ws(i.from+e,i.to+e,i.type))}return n}function o5e(t,e,n,s,i,o,r){function a(l,c){for(let u=0;u<l.local.length;u++){let d=l.local[u].map(s,i,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 jN(t,e,n){if(e.isLeaf)return null;let s=n+e.nodeSize,i=null;for(let o=0,r;o<t.length;o++)(r=t[o])&&r.from>n&&r.to<s&&((i||(i=[])).push(r),t[o]=null);return i}function WN(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function sy(t,e,n,s){let i=[],o=!1;e.forEach((a,l)=>{let c=jN(t,a,l+n);if(c){o=!0;let u=sy(c,a,n+l+1,s);u!=ei&&i.push(l,l+a.nodeSize,u)}});let r=UN(o?WN(t):t,-n).sort(Iu);for(let a=0;a<r.length;a++)r[a].type.valid(e,r[a])||(s.onRemove&&s.onRemove(r[a].spec),r.splice(a--,1));return r.length||i.length?new Nn(r,i):ei}function Iu(t,e){return t.from-e.from||t.to-e.to}function o8(t){let e=t;for(let n=0;n<e.length-1;n++){let s=e[n];if(s.from!=s.to)for(let i=n+1;i<e.length;i++){let o=e[i];if(o.from==s.from){o.to!=s.to&&(e==t&&(e=t.slice()),e[i]=o.copy(o.from,s.to),SM(e,i+1,o.copy(s.to,o.to)));continue}else{o.from<s.to&&(e==t&&(e=t.slice()),e[n]=s.copy(s.from,o.from),SM(e,i,s.copy(o.from,s.to)));break}}}return e}function SM(t,e,n){for(;e<t.length&&Iu(n,t[e])>0;)e++;t.splice(e,0,n)}function kw(t){let e=[];return t.someProp("decorations",n=>{let s=n(t.state);s&&s!=ei&&e.push(s)}),t.cursorWrapper&&e.push(Nn.create(t.state.doc,[t.cursorWrapper.deco])),Gl.from(e)}const r5e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},a5e=qi&&rc<=11;class l5e{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 c5e{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new l5e,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(s=>{for(let i=0;i<s.length;i++)this.queue.push(s[i]);qi&&rc<=11&&s.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),a5e&&(this.onCharData=s=>{this.queue.push({target:s.target,type:"characterData",oldValue:s.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,r5e)),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(vM(this.view)){if(this.suppressingSelectionUpdates)return tl(this.view);if(qi&&rc<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Zu(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,s;for(let o=e.focusNode;o;o=Sg(o))n.add(o);for(let o=e.anchorNode;o;o=Sg(o))if(n.has(o)){s=o;break}let i=s&&this.view.docView.nearestDesc(s);if(i&&i.ignoreMutation({type:"selection",target:s.nodeType==3?s.parentNode:s}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}selectionChanged(e){return!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&vM(this.view)&&!this.ignoreSelectionChange(e)}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let n=this.pendingRecords();n.length&&(this.queue=[]);let s=e.domSelectionRange(),i=this.selectionChanged(s),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(Rr&&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||h5e(e,d)!=f)&&h.remove()}}}let c=null;o<0&&i&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Ob(s)&&(c=Q4(e))&&c.eq(Ot.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,tl(e),this.currentSelection.set(s),e.scrollToSelection()):(o>-1||i)&&(o>-1&&(e.docView.markDirty(o,r),u5e(e)),this.handleDOMChange(o,r,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(s)||tl(e),this.currentSelection.set(s))}registerMutation(e,n){if(n.indexOf(e.target)>-1)return null;let s=this.view.docView.nearestDesc(e.target);if(e.type=="attributes"&&(s==this.view.docView||e.attributeName=="contenteditable"||e.attributeName=="style"&&!e.oldValue&&!e.target.getAttribute("style"))||!s||s.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(s.contentDOM&&s.contentDOM!=s.dom&&!s.contentDOM.contains(e.target))return{from:s.posBefore,to:s.posAfter};let i=e.previousSibling,o=e.nextSibling;if(qi&&rc<=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)&&(i=d),(!h||Array.prototype.indexOf.call(e.addedNodes,h)<0)&&(o=h)}let r=i&&i.parentNode==e.target?Bs(i)+1:0,a=s.localPosFromDOM(e.target,r,-1),l=o&&o.parentNode==e.target?Bs(o):e.target.childNodes.length,c=s.localPosFromDOM(e.target,l,1);return{from:a,to:c}}else return e.type=="attributes"?{from:s.posAtStart-s.border,to:s.posAtEnd+s.border}:(this.lastChangedTextNode=e.target,{from:s.posAtStart,to:s.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}}let $M=new WeakMap,AM=!1;function u5e(t){if(!$M.has(t)&&($M.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Rr,AM)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."),AM=!0}}function MM(t,e){let n=e.startContainer,s=e.startOffset,i=e.endContainer,o=e.endOffset,r=t.domAtPos(t.state.selection.anchor);return Zu(r.node,r.offset,i,o)&&([n,s,i,o]=[i,o,n,s]),{anchorNode:n,anchorOffset:s,focusNode:i,focusOffset:o}}function d5e(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return MM(t,i)}let n;function s(i){i.preventDefault(),i.stopImmediatePropagation(),n=i.getTargetRanges()[0]}return t.dom.addEventListener("beforeinput",s,!0),document.execCommand("indent"),t.dom.removeEventListener("beforeinput",s,!0),n?MM(t,n):null}function h5e(t,e){for(let n=e.parentNode;n&&n!=t.dom;n=n.parentNode){let s=t.docView.nearestDesc(n,!0);if(s&&s.node.isBlock)return n}return null}function f5e(t,e,n){let{node:s,fromOffset:i,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}],Ob(l)||c.push({node:l.focusNode,offset:l.focusOffset})),ri&&t.input.lastKeyCode===8)for(let b=o;b>i;b--){let y=s.childNodes[b-1],C=y.pmViewDesc;if(y.nodeName=="BR"&&!C){o=b;break}if(!C||C.size)break}let d=t.state.doc,h=t.someProp("domParser")||Xu.fromSchema(t.state.schema),f=d.resolve(r),p=null,m=h.parse(s,{topNode:f.parent,topMatch:f.parent.contentMatchAt(f.index()),topOpen:!0,from:i,to:o,preserveWhitespace:f.parent.type.whitespace=="pre"?"full":!0,findPositions:c,ruleFromNode:p5e,context:f});if(c&&c[0].pos!=null){let b=c[0].pos,y=c[1]&&c[1].pos;y==null&&(y=b),p={anchor:b+r,head:y+r}}return{doc:m,sel:p,from:r,to:a}}function p5e(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Ei&&/^(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||Ei&&/^(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 m5e=/^(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 g5e(t,e,n,s,i){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=Q4(t,I);if(L&&!t.state.selection.eq(L)){if(ri&&dr&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",D=>D(t,ru(13,"Enter"))))return;let V=t.state.tr.setSelection(L);I=="pointer"?V.setMeta("pointer",!0):I=="key"&&V.scrollIntoView(),o&&V.setMeta("composition",o),t.dispatch(V)}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=f5e(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=y5e(d.content,c.doc.content,c.from,h,f);if(p&&t.input.domChangeCount++,(xf&&t.input.lastIOSEnter>Date.now()-225||dr)&&i.some(I=>I.nodeType==1&&!m5e.test(I.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",I=>I(t,ru(13,"Enter")))){t.input.lastIOSEnter=0;return}if(!p)if(s&&l instanceof St&&!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=EM(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.state.selection.from<t.state.selection.to&&p.start==p.endB&&t.state.selection instanceof St&&(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)),qi&&rc<=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),b=c.doc.resolveNoCache(p.endB-c.from),y=u.resolve(p.start),C=m.sameParent(b)&&m.parent.inlineContent&&y.end()>=p.endA,k;if((xf&&t.input.lastIOSEnter>Date.now()-225&&(!C||i.some(I=>I.nodeName=="DIV"||I.nodeName=="P"))||!C&&m.pos<c.doc.content.size&&!m.sameParent(b)&&(k=Ot.findFrom(c.doc.resolve(m.pos+1),1,!0))&&k.head==b.pos)&&t.someProp("handleKeyDown",I=>I(t,ru(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>p.start&&_5e(u,p.start,p.endA,m,b)&&t.someProp("handleKeyDown",I=>I(t,ru(8,"Backspace")))){dr&&ri&&t.domObserver.suppressSelectionUpdates();return}ri&&dr&&p.endB==p.start&&(t.input.lastAndroidDelete=Date.now()),dr&&!C&&m.start()!=b.start()&&b.parentOffset==0&&m.depth==b.depth&&c.sel&&c.sel.anchor==c.sel.head&&c.sel.head==p.endA&&(p.endB-=2,b=c.doc.resolveNoCache(p.endB-c.from),setTimeout(()=>{t.someProp("handleKeyDown",function(I){return I(t,ru(13,"Enter"))})},20));let x=p.start,S=p.endA,E,T,P;if(C){if(m.pos==b.pos)qi&&rc<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>tl(t),20)),E=t.state.tr.delete(x,S),T=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(P=v5e(m.parent.content.cut(m.parentOffset,b.parentOffset),y.parent.content.cut(y.parentOffset,p.endA-y.start()))))E=t.state.tr,P.type=="add"?E.addMark(x,S,P.mark):E.removeMark(x,S,P.mark);else if(m.parent.child(m.index()).isText&&m.index()==b.index()-(b.textOffset?0:1)){let I=m.parent.textBetween(m.parentOffset,b.parentOffset);if(t.someProp("handleTextInput",L=>L(t,x,S,I)))return;E=t.state.tr.insertText(I,x,S)}}if(E||(E=t.state.tr.replace(x,S,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let I=EM(t,E.doc,c.sel);I&&!(ri&&dr&&t.composing&&I.empty&&(p.start!=p.endB||t.input.lastAndroidDelete<Date.now()-100)&&(I.head==x||I.head==E.mapping.map(S)-1)||qi&&I.empty&&I.head==x)&&E.setSelection(I)}T&&E.ensureMarks(T),o&&E.setMeta("composition",o),t.dispatch(E.scrollIntoView())}function EM(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:e8(t,e.resolve(n.anchor),e.resolve(n.head))}function v5e(t,e){let n=t.firstChild.marks,s=e.firstChild.marks,i=n,o=s,r,a,l;for(let u=0;u<s.length;u++)i=s[u].removeFromSet(i);for(let u=0;u<n.length;u++)o=n[u].removeFromSet(o);if(i.length==1&&o.length==0)a=i[0],r="add",l=u=>u.mark(a.addToSet(u.marks));else if(i.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(et.from(c).eq(t))return{mark:a,type:r}}function _5e(t,e,n,s,i){if(n-e<=i.pos-s.pos||xw(s,!0,!1)<i.pos)return!1;let o=t.resolve(e);if(!s.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(xw(o,!0,!0));return!r.parent.isTextblock||r.pos>n||xw(r,!0,!1)<n?!1:s.parent.content.cut(s.parentOffset).eq(r.parent.content)}function xw(t,e,n){let s=t.depth,i=e?t.end():t.pos;for(;s>0&&(e||t.indexAfter(s)==t.node(s).childCount);)s--,i++,e=!1;if(n){let o=t.node(s).maybeChild(t.indexAfter(s));for(;o&&!o.isLeaf;)o=o.firstChild,i++}return i}function y5e(t,e,n,s,i){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(i=="end"){let l=Math.max(0,o-Math.min(r,a));s-=r+l-o}if(r<o&&t.size<e.size){let l=s<=o&&s>=r?o-s:0;o-=l,o&&o<e.size&&TM(e.textBetween(o-1,o+1))&&(o+=l?1:-1),a=o+(a-r),r=o}else if(a<o){let l=s<=o&&s>=a?o-s:0;o-=l,o&&o<t.size&&TM(t.textBetween(o-1,o+1))&&(o+=l?1:-1),r=o+(r-a),a=o}return{start:o,endA:r,endB:a}}function TM(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 b5e{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 N8e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(DM),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=LM(this),IM(this),this.nodeViews=OM(this),this.docView=dM(this.state.doc,PM(this),kw(this),this.dom,this),this.domObserver=new c5e(this,(s,i,o,r)=>g5e(this,s,i,o,r)),this.domObserver.start(),B8e(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&&yC(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(DM),this.directPlugins=e.plugins),this.updateStateInner(e.state,n)}setProps(e){let n={};for(let s in this._props)n[s]=this._props[s];n.state=this.state;for(let s in e)n[s]=e[s];this.update(n)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,n){var s;let i=this.state,o=!1,r=!1;e.storedMarks&&this.composing&&(NN(this),r=!0),this.state=e;let a=i.plugins!=e.plugins||this._props.plugins!=n.plugins;if(a||this._props.plugins!=n.plugins||this._props.nodeViews!=n.nodeViews){let f=OM(this);C5e(f,this.nodeViews)&&(this.nodeViews=f,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&yC(this),this.editable=LM(this),IM(this);let l=kw(this),c=PM(this),u=i.plugins!=e.plugins&&!i.doc.eq(e.doc)?"reset":e.scrollToSelection>i.scrollToSelection?"to selection":"preserve",d=o||!this.docView.matchesNode(e.doc,c,l);(d||!e.selection.eq(i.selection))&&(r=!0);let h=u=="preserve"&&r&&this.dom.style.overflowAnchor==null&&e8e(this);if(r){this.domObserver.stop();let f=d&&(qi||ri)&&!this.composing&&!i.selection.empty&&!e.selection.empty&&w5e(i.selection,e.selection);if(d){let p=ri?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Q8e(this)),(o||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=dM(e.doc,c,l,this.dom,this)),p&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&x8e(this))?tl(this,f):($N(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(i),!((s=this.dragging)===null||s===void 0)&&s.node&&!i.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,i),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 At){let n=this.docView.domAfterPos(this.state.selection.from);n.nodeType==1&&oM(this,n.getBoundingClientRect(),e)}else oM(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 s=this.directPlugins[n];s.spec.view&&this.pluginViews.push(s.spec.view(this))}for(let n=0;n<this.state.plugins.length;n++){let s=this.state.plugins[n];s.spec.view&&this.pluginViews.push(s.spec.view(this))}}else for(let n=0;n<this.pluginViews.length;n++){let s=this.pluginViews[n];s.update&&s.update(this,e)}}updateDraggedNode(e,n){let s=e.node,i=-1;if(this.state.doc.nodeAt(s.from)==s.node)i=s.from;else{let o=s.from+(this.state.doc.content.size-n.doc.content.size);(o>0&&this.state.doc.nodeAt(o))==s.node&&(i=o)}this.dragging=new zN(e.slice,e.move,i<0?void 0:At.create(this.state.doc,i))}someProp(e,n){let s=this._props&&this._props[e],i;if(s!=null&&(i=n?n(s):s))return i;for(let r=0;r<this.directPlugins.length;r++){let a=this.directPlugins[r].props[e];if(a!=null&&(i=n?n(a):a))return i}let o=this.state.plugins;if(o)for(let r=0;r<o.length;r++){let a=o[r].props[e];if(a!=null&&(i=n?n(a):a))return i}}hasFocus(){if(qi){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&&n8e(this.dom),tl(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 a8e(this,e)}coordsAtPos(e,n=1){return _N(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,s=-1){let i=this.docView.posFromDOM(e,n,s);if(i==null)throw new RangeError("DOM position not inside the editor");return i}endOfTextblock(e,n){return h8e(this,n||this.state,e)}pasteHTML(e,n){return Ag(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return Ag(this,e,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(z8e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],kw(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,U4e())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return U8e(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?Ei&&this.root.nodeType===11&&q4e(this.dom.ownerDocument)==this.dom&&d5e(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function PM(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 s in n)s=="class"?e.class+=" "+n[s]:s=="style"?e.style=(e.style?e.style+";":"")+n[s]:!e[s]&&s!="contenteditable"&&s!="nodeName"&&(e[s]=String(n[s]))}),e.translate||(e.translate="no"),[ws.node(0,t.state.doc.content.size,e)]}function IM(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:ws.widget(t.state.selection.from,e,{raw:!0,marks:t.markCursor})}}else t.cursorWrapper=null}function LM(t){return!t.someProp("editable",e=>e(t.state)===!1)}function w5e(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 OM(t){let e=Object.create(null);function n(s){for(let i in s)Object.prototype.hasOwnProperty.call(e,i)||(e[i]=s[i])}return t.someProp("nodeViews",n),t.someProp("markViews",n),e}function C5e(t,e){let n=0,s=0;for(let i in t){if(t[i]!=e[i])return!0;n++}for(let i in e)s++;return n!=s}function DM(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 YN=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},yt=(t,e,n)=>(YN(t,e,"read from private field"),n?n.call(t):e.get(t)),Ls=(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)},Jn=(t,e,n,s)=>(YN(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);function Rc(t,e){return t.meta={package:"@milkdown/core",group:"System",...e},t}const GN={strong:(t,e,n,s)=>{const i=t.marker||n.options.strong||"*",o=n.enter("strong"),r=n.createTracker(s);let a=r.move(i+i);return a+=r.move(n.containerPhrasing(t,{before:a,after:i,...r.current()})),a+=r.move(i+i),o(),a},emphasis:(t,e,n,s)=>{const i=t.marker||n.options.emphasis||"*",o=n.enter("emphasis"),r=n.createTracker(s);let a=r.move(i);return a+=r.move(n.containerPhrasing(t,{before:a,after:i,...r.current()})),a+=r.move(i),o(),a}},Vn=gn({},"editorView"),Bp=gn({},"editorState"),Sw=gn([],"initTimer"),RM=gn({},"editor"),Eg=gn([],"inputRules"),Vr=gn([],"prosePlugins"),Tg=gn([],"remarkPlugins"),Pg=gn([],"nodeView"),Ig=gn([],"markView"),Lu=gn(eC().use(G6).use(Z6),"remark"),Pm=gn({handlers:GN},"remarkStringifyOptions"),bv=Pc("ConfigReady");function k5e(t){const e=n=>(n.record(bv),async()=>(await t(n),n.done(bv),()=>{n.clearTimer(bv)}));return Rc(e,{displayName:"Config"}),e}const Ou=Pc("InitReady");function x5e(t){const e=n=>(n.inject(RM,t).inject(Vr,[]).inject(Tg,[]).inject(Eg,[]).inject(Pg,[]).inject(Ig,[]).inject(Pm,{handlers:GN}).inject(Lu,eC().use(G6).use(Z6)).inject(Sw,[bv]).record(Ou),async()=>{await n.waitTimers(Sw);const s=n.get(Pm);return n.set(Lu,eC().use(G6).use(Z6,s)),n.done(Ou),()=>{n.remove(RM).remove(Vr).remove(Tg).remove(Eg).remove(Pg).remove(Ig).remove(Pm).remove(Lu).remove(Sw).clearTimer(Ou)}});return Rc(e,{displayName:"Init"}),e}const Sr=Pc("SchemaReady"),$w=gn([],"schemaTimer"),$r=gn({},"schema"),Dh=gn([],"nodes"),Rh=gn([],"marks");function VM(t){var e;return{...t,parseDOM:(e=t.parseDOM)==null?void 0:e.map(n=>({priority:t.priority,...n}))}}const qN=t=>(t.inject($r,{}).inject(Dh,[]).inject(Rh,[]).inject($w,[Ou]).record(Sr),async()=>{await t.waitTimers($w);const e=t.get(Lu),n=t.get(Tg).reduce((r,a)=>r.use(a.plugin,a.options),e);t.set(Lu,n);const s=Object.fromEntries(t.get(Dh).map(([r,a])=>[r,VM(a)])),i=Object.fromEntries(t.get(Rh).map(([r,a])=>[r,VM(a)])),o=new V3e({nodes:s,marks:i});return t.set($r,o),t.done(Sr),()=>{t.remove($r).remove(Dh).remove(Rh).remove($w).clearTimer(Sr)}});Rc(qN,{displayName:"Schema"});var lh,Jc;let XN=class{constructor(){Ls(this,lh,void 0),Ls(this,Jc,void 0),Jn(this,lh,new VV),Jn(this,Jc,null),this.setCtx=e=>{Jn(this,Jc,e)}}get ctx(){return yt(this,Jc)}create(e,n){const s=e.create(yt(this,lh).sliceMap);return s.set(n),s}get(e){return yt(this,lh).get(e).get()}remove(e){return yt(this,lh).remove(e)}call(e,n){if(yt(this,Jc)==null)throw d3e();const s=this.get(e)(n),i=yt(this,Jc).get(Vn);return s(i.state,i.dispatch,i)}};lh=new WeakMap,Jc=new WeakMap;function S5e(t="cmdKey"){return gn(()=>()=>!1,t)}const cn=gn(new XN,"commands"),Aw=gn([Sr],"commandsTimer"),Im=Pc("CommandsReady"),KN=t=>{const e=new XN;return e.setCtx(t),t.inject(cn,e).inject(Aw,[Sr]).record(Im),async()=>(await t.waitTimers(Aw),t.done(Im),()=>{t.remove(cn).remove(Aw).clearTimer(Im)})};Rc(KN,{displayName:"Commands"});const wv=Pc("ParserReady"),ZN=()=>{throw O4()},Vh=gn(ZN,"parser"),Mw=gn([],"parserTimer"),JN=t=>(t.inject(Vh,ZN).inject(Mw,[Sr]).record(wv),async()=>{await t.waitTimers(Mw);const e=t.get(Lu),n=t.get($r);return t.set(Vh,vxe.create(n,e)),t.done(wv),()=>{t.remove(Vh).remove(Mw).clearTimer(wv)}});Rc(JN,{displayName:"Parser"});const Lm=Pc("SerializerReady"),Ew=gn([],"serializerTimer"),QN=()=>{throw O4()},Fh=gn(QN,"serializer"),eB=t=>(t.inject(Fh,QN).inject(Ew,[Sr]).record(Lm),async()=>{await t.waitTimers(Ew);const e=t.get(Lu),n=t.get($r);return t.set(Fh,yxe.create(n,e)),t.done(Lm),()=>{t.remove(Fh).remove(Ew).clearTimer(Lm)}});Rc(eB,{displayName:"Serializer"});const Cv=gn("","defaultValue"),kv=gn(t=>t,"stateOptions"),Tw=gn([],"editorStateTimer"),xv=Pc("EditorStateReady");function $5e(t,e,n){if(typeof t=="string")return e(t);if(t.type==="html")return Xu.fromSchema(n).parse(t.dom);if(t.type==="json")return oc.fromJSON(n,t.value);throw i3e(t)}const A5e=new Kn("MILKDOWN_STATE_TRACKER");function M5e(t){const e=Lb(Zxe,X4,sN,iN);return t.Backspace=e,t}const tB=t=>(t.inject(Cv,"").inject(Bp,{}).inject(kv,e=>e).inject(Tw,[wv,Lm,Im]).record(xv),async()=>{await t.waitTimers(Tw);const e=t.get($r),n=t.get(Vh),s=t.get(Eg),i=t.get(kv),o=t.get(Vr),r=t.get(Cv),a=$5e(r,n,e),l=[...o,new Yn({key:A5e,state:{init:()=>{},apply:(d,h,f,p)=>{t.set(Bp,p)}}}),r4e({rules:s}),uN(M5e(R4e))];t.set(Vr,l);const c=i({schema:e,doc:a,plugins:l}),u=pu.create(c);return t.set(Bp,u),t.done(xv),()=>{t.remove(Cv).remove(Bp).remove(kv).remove(Tw).clearTimer(xv)}});Rc(tB,{displayName:"EditorState"});const Sv=Pc("EditorViewReady"),Pw=gn([],"editorViewTimer"),Om=gn({},"editorViewOptions"),$v=gn(null,"root"),bC=gn(null,"rootDOM"),wC=gn({},"rootAttrs");function E5e(t,e){const n=document.createElement("div");n.className="milkdown",t.appendChild(n),e.set(bC,n);const s=e.get(wC);return Object.entries(s).forEach(([i,o])=>n.setAttribute(i,o)),n}function T5e(t){t.classList.add("editor"),t.setAttribute("role","textbox")}const P5e=new Kn("MILKDOWN_VIEW_CLEAR"),nB=t=>(t.inject($v,document.body).inject(Vn,{}).inject(Om,{}).inject(bC,null).inject(wC,{}).inject(Pw,[xv]).record(Sv),async()=>{await t.wait(Ou);const e=t.get($v)||document.body,n=typeof e=="string"?document.querySelector(e):e;t.update(Vr,l=>[new Yn({key:P5e,view:c=>{const u=n?E5e(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(Pw);const s=t.get(Bp),i=t.get(Om),o=Object.fromEntries(t.get(Pg)),r=Object.fromEntries(t.get(Ig)),a=new b5e(n,{state:s,nodeViews:o,markViews:r,...i});return T5e(a.dom),t.set(Vn,a),t.done(Sv),()=>{a==null||a.destroy(),t.remove($v).remove(Vn).remove(Om).remove(bC).remove(wC).remove(Pw).clearTimer(Sv)}});Rc(nB,{displayName:"EditorView"});var ch,Io,Pl,zp,Av,Mv,oo,Il,uh,Ev,dh,Hp,Tv,Qc,Up;const I5e=class sB{constructor(){Ls(this,ch,void 0),Ls(this,Io,void 0),Ls(this,Pl,void 0),Ls(this,zp,void 0),Ls(this,Av,void 0),Ls(this,Mv,void 0),Ls(this,oo,void 0),Ls(this,Il,void 0),Ls(this,uh,void 0),Ls(this,Ev,void 0),Ls(this,dh,void 0),Ls(this,Hp,void 0),Ls(this,Tv,void 0),Ls(this,Qc,void 0),Ls(this,Up,void 0),Jn(this,ch,!1),Jn(this,Io,"Idle"),Jn(this,Pl,[]),Jn(this,zp,()=>{}),Jn(this,Av,new VV),Jn(this,Mv,new _3e),Jn(this,oo,new Map),Jn(this,Il,new Map),Jn(this,uh,new v3e(yt(this,Av),yt(this,Mv))),Jn(this,Ev,()=>{const e=k5e(async s=>{await Promise.all(yt(this,Pl).map(i=>i(s)))}),n=[qN,JN,eB,KN,tB,nB,x5e(this),e];yt(this,dh).call(this,n,yt(this,Il))}),Jn(this,dh,(e,n)=>{e.forEach(s=>{const i=yt(this,uh).produce(yt(this,ch)?s.meta:void 0),o=s(i);n.set(s,{ctx:i,handler:o,cleanup:void 0})})}),Jn(this,Hp,(e,n=!1)=>Promise.all([e].flat().map(s=>{const i=yt(this,oo).get(s),o=i==null?void 0:i.cleanup;return n?yt(this,oo).delete(s):yt(this,oo).set(s,{ctx:void 0,handler:void 0,cleanup:void 0}),typeof o=="function"?o():o}))),Jn(this,Tv,async()=>{await Promise.all([...yt(this,Il).entries()].map(([e,{cleanup:n}])=>typeof n=="function"?n():n)),yt(this,Il).clear()}),Jn(this,Qc,e=>{Jn(this,Io,e),yt(this,zp).call(this,e)}),Jn(this,Up,e=>[...e.entries()].map(async([n,s])=>{const{ctx:i,handler:o}=s;if(!o)return;const r=await o();e.set(n,{ctx:i,handler:o,cleanup:r})})),this.enableInspector=(e=!0)=>(Jn(this,ch,e),this),this.onStatusChange=e=>(Jn(this,zp,e),this),this.config=e=>(yt(this,Pl).push(e),this),this.removeConfig=e=>(Jn(this,Pl,yt(this,Pl).filter(n=>n!==e)),this),this.use=e=>{const n=[e].flat();return n.flat().forEach(s=>{yt(this,oo).set(s,{ctx:void 0,handler:void 0,cleanup:void 0})}),yt(this,Io)==="Created"&&yt(this,dh).call(this,n,yt(this,oo)),this},this.remove=async e=>yt(this,Io)==="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 yt(this,Hp).call(this,[e].flat(),!0),this),this.create=async()=>yt(this,Io)==="OnCreate"?this:(yt(this,Io)==="Created"&&await this.destroy(),yt(this,Qc).call(this,"OnCreate"),yt(this,Ev).call(this),yt(this,dh).call(this,[...yt(this,oo).keys()],yt(this,oo)),await Promise.all([yt(this,Up).call(this,yt(this,Il)),yt(this,Up).call(this,yt(this,oo))].flat()),yt(this,Qc).call(this,"Created"),this),this.destroy=async(e=!1)=>yt(this,Io)==="Destroyed"||yt(this,Io)==="OnDestroy"?this:yt(this,Io)==="OnCreate"?new Promise(n=>{setTimeout(()=>{n(this.destroy(e))},50)}):(e&&Jn(this,Pl,[]),yt(this,Qc).call(this,"OnDestroy"),await yt(this,Hp).call(this,[...yt(this,oo).keys()],e),await yt(this,Tv).call(this),yt(this,Qc).call(this,"Destroyed"),this),this.action=e=>e(yt(this,uh)),this.inspect=()=>yt(this,ch)?[...yt(this,Il).values(),...yt(this,oo).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 sB}get ctx(){return yt(this,uh)}get status(){return yt(this,Io)}};ch=new WeakMap,Io=new WeakMap,Pl=new WeakMap,zp=new WeakMap,Av=new WeakMap,Mv=new WeakMap,oo=new WeakMap,Il=new WeakMap,uh=new WeakMap,Ev=new WeakMap,dh=new WeakMap,Hp=new WeakMap,Tv=new WeakMap,Qc=new WeakMap,Up=new WeakMap;let L5e=I5e,O5e=t=>crypto.getRandomValues(new Uint8Array(t)),D5e=(t,e,n)=>{let s=(2<<Math.log(t.length-1)/Math.LN2)-1,i=-~(1.6*s*e/t.length);return(o=e)=>{let r="";for(;;){let a=n(i),l=i;for(;l--;)if(r+=t[a[l]&s]||"",r.length===o)return r}}},R5e=(t,e=21)=>D5e(t,e,O5e);R5e("abcedfghicklmn",10);function Gt(t,e){const n=S5e(t),s=i=>async()=>{s.key=n,await i.wait(Im);const o=e(i);return i.get(cn).create(n,o),s.run=r=>i.get(cn).call(t,r),()=>{i.get(cn).remove(n)}};return s}function no(t){const e=n=>async()=>{await n.wait(Sr);const s=t(n);return n.update(Eg,i=>[...i,s]),e.inputRule=s,()=>{n.update(Eg,i=>i.filter(o=>o!==s))}};return e}function V5e(t,e){const n=s=>async()=>{const i=e(s);return s.update(Rh,o=>[...o.filter(r=>r[0]!==t),[t,i]]),n.id=t,n.schema=i,()=>{s.update(Rh,o=>o.filter(([r])=>r!==t))}};return n.type=s=>{const i=s.get($r).marks[t];if(!i)throw h3e(t);return i},n}function r8(t,e){const n=s=>async()=>{const i=e(s);return s.update(Dh,o=>[...o.filter(r=>r[0]!==t),[t,i]]),n.id=t,n.schema=i,()=>{s.update(Dh,o=>o.filter(([r])=>r!==t))}};return n.type=s=>{const i=s.get($r).nodes[t];if(!i)throw DV(t);return i},n}function vs(t){let e;const n=s=>async()=>(await s.wait(Sr),e=t(s),s.update(Vr,i=>[...i,e]),()=>{s.update(Vr,i=>i.filter(o=>o!==e))});return n.plugin=()=>e,n.key=()=>e.spec.key,n}function F5e(t){const e=n=>async()=>{await n.wait(Sr);const s=t(n),i=uN(s);return n.update(Vr,o=>[...o,i]),e.keymap=s,()=>{n.update(Vr,o=>o.filter(r=>r!==i))}};return e}function iB(t,e){const n=s=>async()=>{await s.wait(Sr);const i=e(s);return t.type(s)instanceof G_?s.update(Pg,o=>[...o,[t.id,i]]):s.update(Ig,o=>[...o,[t.id,i]]),n.view=i,n.type=t,()=>{t.type(s)instanceof G_?s.update(Pg,o=>o.filter(r=>r[0]!==t.id)):s.update(Ig,o=>o.filter(r=>r[0]!==t.id))}};return n}function es(t,e){const n=gn(t,e),s=i=>(i.inject(n),()=>()=>{i.remove(n)});return s.key=n,s}function $s(t,e){const n=es(e,t),s=r8(t,o=>o.get(n.key)(o)),i=[n,s];return i.id=s.id,i.node=s,i.type=o=>s.type(o),i.schema=s.schema,i.ctx=n,i.key=n.key,i.extendSchema=o=>r=>()=>{const a=r.get(n.key),l=o(a)(r);r.update(Dh,c=>[...c.filter(u=>u[0]!==t),[t,l]]),i.schema=l},i}function b1(t,e){const n=es(e,t),s=V5e(t,o=>o.get(n.key)(o)),i=[n,s];return i.id=s.id,i.mark=s,i.type=s.type,i.schema=s.schema,i.ctx=n,i.key=n.key,i.extendSchema=o=>r=>()=>{const a=r.get(n.key),l=o(a)(r);r.update(Rh,c=>[...c.filter(u=>u[0]!==t),[t,l]]),i.schema=l},i}function so(t,e){const n=Object.fromEntries(Object.entries(e).map(([r,{shortcuts:a}])=>[r,a])),s=es(n,`${t}Keymap`),i=F5e(r=>{const a=r.get(s.key),l=Object.entries(e).flatMap(([c,{command:u}])=>[a[c]].flat().map(d=>[d,u(r)]));return Object.fromEntries(l)}),o=[s,i];return o.ctx=s,o.shortcuts=i,o.key=s.key,o.keymap=i.keymap,o}const jr=(t,e=()=>({}))=>es(e,`${t}Attr`),w1=(t,e=()=>({}))=>es(e,`${t}Attr`);function bd(t,e,n){const s=es(n??{},t),i=r=>async()=>{await r.wait(Ou);const a={plugin:e(r),options:r.get(s.key)};return r.update(Tg,l=>[...l,a]),()=>{r.update(Tg,l=>l.filter(c=>c!==a))}},o=[s,i];return o.id=t,o.plugin=i,o.options=s,o}function N5e(){return t=>{const e=t.get(Vn);return t.get(Fh)(e.state.doc)}}function B5e(t,e=!1){return n=>{const s=n.get(Vn),i=n.get(Vh)(t);if(!i)return;if(!e){const{state:c}=s;return s.dispatch(c.tr.replace(0,c.doc.content.size,new it(i.content,0,0)))}const o=n.get($r),r=n.get(kv),a=n.get(Vr),l=pu.create({schema:o,doc:i,plugins:a,...r});s.updateState(l)}}function Vb(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const z5e=[["ß","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"],["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"]],H5e=(t,e)=>{for(const[n,s]of e)t=t.replace(new RegExp(Vb(n),"g"),s);return t};function U5e(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={customReplacements:[],...e};const n=new Map([...z5e,...e.customReplacements]);return t=t.normalize(),t=H5e(t,n),t=t.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),t}const j5e=[["&"," and "],["🦄"," unicorn "],["♥"," love "]],W5e=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"),Y5e=(t,e)=>{const n=Vb(e);return t.replace(new RegExp(`${n}{2,}`,"g"),e).replace(new RegExp(`^${n}|${n}$`,"g"),"")},G5e=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+=Vb(n)}return new RegExp(`[^${e}]+`,"g")};function q5e(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("_"),s=e.preserveTrailingDash&&t.endsWith("-"),i=new Map([...j5e,...e.customReplacements]);t=U5e(t,{customReplacements:i}),e.decamelize&&(t=W5e(t));const o=G5e(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=Y5e(t,e.separator)),n&&(t=`_${t}`),s&&(t=`${t}-`),t}function X5e(t,e){return function(n,s){let{$from:i,$to:o,node:r}=n.selection;if(r&&r.isBlock||i.depth<2||!i.sameParent(o))return!1;let a=i.node(-1);if(a.type!=t)return!1;if(i.parent.content.size==0&&i.node(-1).childCount==i.indexAfter(-1)){if(i.depth==3||i.node(-3).type!=t||i.index(-2)!=i.node(-2).childCount-1)return!1;if(s){let d=et.empty,h=i.index(-1)?1:i.index(-2)?2:3;for(let y=i.depth-h;y>=i.depth-3;y--)d=et.from(i.node(y).copy(d));let f=i.indexAfter(-1)<i.node(-2).childCount?1:i.indexAfter(-2)<i.node(-3).childCount?2:3;d=d.append(et.from(t.createAndFill()));let p=i.before(i.depth-(h-1)),m=n.tr.replace(p,i.after(-f),new it(d,4-h,0)),b=-1;m.doc.nodesBetween(p,m.doc.content.size,(y,C)=>{if(b>-1)return!1;y.isTextblock&&y.content.size==0&&(b=C+1)}),b>-1&&m.setSelection(Ot.near(m.doc.resolve(b))),s(m.scrollIntoView())}return!0}let l=o.pos==i.end()?a.contentMatchAt(0).defaultType:null,c=n.tr.delete(i.pos,o.pos),u=l?[e?{type:t,attrs:e}:null,{type:l}]:void 0;return Mm(c.doc,i.pos,2,u)?(s&&s(c.split(i.pos,2,u).scrollIntoView()),!0):!1}}function oB(t){return function(e,n){let{$from:s,$to:i}=e.selection,o=s.blockRange(i,r=>r.childCount>0&&r.firstChild.type==t);return o?n?s.node(o.depth-1).type==t?K5e(e,n,t,o):Z5e(e,n,o):!0:!1}}function K5e(t,e,n,s){let i=t.tr,o=s.end,r=s.$to.end(s.depth);o<r&&(i.step(new ci(o-1,r,o,r,new it(et.from(n.create(null,s.parent.copy())),1,0),1,!0)),s=new YV(i.doc.resolve(s.$from.pos),i.doc.resolve(r),s.depth));const a=$b(s);if(a==null)return!1;i.lift(s,a);let l=i.mapping.map(o,-1)-1;return Ab(i.doc,l)&&i.join(l),e(i.scrollIntoView()),!0}function Z5e(t,e,n){let s=t.tr,i=n.parent;for(let f=n.end,p=n.endIndex-1,m=n.startIndex;p>m;p--)f-=i.child(p).nodeSize,s.delete(f-1,f+1);let o=s.doc.resolve(n.start),r=o.nodeAfter;if(s.mapping.map(n.end)!=n.start+o.nodeAfter.nodeSize)return!1;let a=n.startIndex==0,l=n.endIndex==i.childCount,c=o.node(-1),u=o.index(-1);if(!c.canReplace(u+(a?0:1),u+1,r.content.append(l?et.empty:et.from(i))))return!1;let d=o.pos,h=d+r.nodeSize;return s.step(new ci(d-(a?1:0),h+(l?1:0),d+1,h-1,new it((a?et.empty:et.from(i.copy(et.empty))).append(l?et.empty:et.from(i.copy(et.empty))),a?0:1,l?0:1),a?0:1)),e(s.scrollIntoView()),!0}function J5e(t){return function(e,n){let{$from:s,$to:i}=e.selection,o=s.blockRange(i,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=et.from(c?t.create():null),d=new it(et.from(t.create(null,et.from(a.type.create(null,u)))),c?3:1,0),h=o.start,f=o.end;n(e.tr.step(new ci(h-(c?3:1),f,h,f,d,1,!0)).scrollIntoView())}return!0}}function Q5e(t){const e=new Map;if(!t||!t.type)throw new Error("mdast-util-definitions expected node");return yd(t,"definition",function(s){const i=FM(s.identifier);i&&!e.get(i)&&e.set(i,s)}),n;function n(s){const i=FM(s);return e.get(i)}}function FM(t){return String(t||"").toUpperCase()}function eSe(){return function(t){const e=Q5e(t);yd(t,function(n,s,i){if(n.type==="definition"&&i!==void 0&&typeof s=="number")return i.children.splice(s,1),[K6,s];if(n.type==="imageReference"||n.type==="linkReference"){const o=e(n.identifier);if(o&&i&&typeof s=="number")return i.children[s]=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},[K6,s]}})}}function rB(t,e){var n;if(!(e.childCount>=1&&((n=e.lastChild)==null?void 0:n.type.name)==="hardbreak")){t.next(e.content);return}const s=[];e.content.forEach((i,o,r)=>{r!==e.childCount-1&&s.push(i)}),t.next(et.fromArray(s))}function De(t,e){return Object.assign(t,{meta:{package:"@milkdown/preset-commonmark",...e}}),t}const a8=w1("emphasis");De(a8,{displayName:"Attr<emphasis>",group:"Emphasis"});const wd=b1("emphasis",t=>({attrs:{marker:{default:t.get(Pm).emphasis||"*"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:e=>e==="italic"}],toDOM:e=>["em",t.get(a8.key)(e)],parseMarkdown:{match:e=>e.type==="emphasis",runner:(e,n,s)=>{e.openMark(s,{marker:n.marker}),e.next(n.children),e.closeMark(s)}},toMarkdown:{match:e=>e.type.name==="emphasis",runner:(e,n)=>{e.withMark(n,"emphasis",void 0,{marker:n.attrs.marker})}}}));De(wd.mark,{displayName:"MarkSchema<emphasis>",group:"Emphasis"});De(wd.ctx,{displayName:"MarkSchemaCtx<emphasis>",group:"Emphasis"});const Fb=Gt("ToggleEmphasis",t=>()=>Ib(wd.type(t)));De(Fb,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});const aB=no(t=>g1(/(?:^|[^*])\*([^*]+)\*$/,wd.type(t),{getAttr:()=>({marker:"*"}),updateCaptured:({fullMatch:e,start:n})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:n+1}}));De(aB,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});const lB=no(t=>g1(/(?:^|[^_])_([^_]+)_$/,wd.type(t),{getAttr:()=>({marker:"_"}),updateCaptured:({fullMatch:e,start:n})=>e.startsWith("_")?{}:{fullMatch:e.slice(1),start:n+1}}));De(lB,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});const l8=so("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:t=>{const e=t.get(cn);return()=>e.call(Fb.key)}}});De(l8.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"});De(l8.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});const c8=w1("strong");De(c8,{displayName:"Attr<strong>",group:"Strong"});const Hf=b1("strong",t=>({attrs:{marker:{default:t.get(Pm).strong||"*"}},parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:e=>e==="bold"}],toDOM:e=>["strong",t.get(c8.key)(e)],parseMarkdown:{match:e=>e.type==="strong",runner:(e,n,s)=>{e.openMark(s,{marker:n.marker}),e.next(n.children),e.closeMark(s)}},toMarkdown:{match:e=>e.type.name==="strong",runner:(e,n)=>{e.withMark(n,"strong",void 0,{marker:n.attrs.marker})}}}));De(Hf.mark,{displayName:"MarkSchema<strong>",group:"Strong"});De(Hf.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});const Nb=Gt("ToggleStrong",t=>()=>Ib(Hf.type(t)));De(Nb,{displayName:"Command<toggleStrongCommand>",group:"Strong"});const cB=no(t=>g1(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,Hf.type(t),{getAttr:e=>({marker:e[0].startsWith("*")?"*":"_"})}));De(cB,{displayName:"InputRule<strong>",group:"Strong"});const u8=so("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:t=>{const e=t.get(cn);return()=>e.call(Nb.key)}}});De(u8.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"});De(u8.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});const d8=w1("inlineCode");De(d8,{displayName:"Attr<inlineCode>",group:"InlineCode"});const Ka=b1("inlineCode",t=>({priority:100,code:!0,inclusive:!1,parseDOM:[{tag:"code"}],toDOM:e=>["code",t.get(d8.key)(e)],parseMarkdown:{match:e=>e.type==="inlineCode",runner:(e,n,s)=>{e.openMark(s),e.addText(n.value),e.closeMark(s)}},toMarkdown:{match:e=>e.type.name==="inlineCode",runner:(e,n,s)=>{e.withMark(n,"inlineCode",s.text||"")}}}));De(Ka.mark,{displayName:"MarkSchema<inlineCode>",group:"InlineCode"});De(Ka.ctx,{displayName:"MarkSchemaCtx<inlineCode>",group:"InlineCode"});const Bb=Gt("ToggleInlineCode",t=>()=>(e,n)=>{const{selection:s,tr:i}=e;if(s.empty)return!1;const{from:o,to:r}=s;return e.doc.rangeHasMark(o,r,Ka.type(t))?(n==null||n(i.removeMark(o,r,Ka.type(t))),!0):(Object.keys(e.schema.marks).filter(a=>a!==Ka.type.name).map(a=>e.schema.marks[a]).forEach(a=>{i.removeMark(o,r,a)}),n==null||n(i.addMark(o,r,Ka.type(t).create())),!0)});De(Bb,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});const uB=no(t=>g1(/(?:\`)([^\`]+)(?:\`)$/,Ka.type(t)));De(uB,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});const h8=so("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:t=>{const e=t.get(cn);return()=>e.call(Bb.key)}}});De(h8.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"});De(h8.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});const f8=w1("link");De(f8,{displayName:"Attr<link>",group:"Link"});const Ar=b1("link",t=>({attrs:{href:{},title:{default:null}},parseDOM:[{tag:"a[href]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw Ur(e);return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM:e=>["a",{...t.get(f8.key)(e),...e.attrs}],parseMarkdown:{match:e=>e.type==="link",runner:(e,n,s)=>{const i=n.url,o=n.title;e.openMark(s,{href:i,title:o}),e.next(n.children),e.closeMark(s)}},toMarkdown:{match:e=>e.type.name==="link",runner:(e,n)=>{e.withMark(n,"link",void 0,{title:n.attrs.title,url:n.attrs.href})}}}));De(Ar.mark,{displayName:"MarkSchema<link>",group:"Link"});const dB=Gt("ToggleLink",t=>(e={})=>Ib(Ar.type(t),e));De(dB,{displayName:"Command<toggleLinkCommand>",group:"Link"});const hB=Gt("UpdateLink",t=>(e={})=>(n,s)=>{if(!s)return!1;let i,o=-1;const{selection:r}=n,{from:a,to:l}=r;if(n.doc.nodesBetween(a,a===l?l+1:l,(p,m)=>{if(Ar.type(t).isInSet(p.marks))return i=p,o=m,!1}),!i)return!1;const c=i.marks.find(({type:p})=>p===Ar.type(t));if(!c)return!1;const u=o,d=o+i.nodeSize,{tr:h}=n,f=Ar.type(t).create({...c.attrs,...e});return f?(s(h.removeMark(u,d,c).addMark(u,d,f).setSelection(new St(h.selection.$anchor)).scrollIntoView()),!0):!1});De(hB,{displayName:"Command<updateLinkCommand>",group:"Link"});const fB=r8("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)}}}));De(fB,{displayName:"NodeSchema<doc>",group:"Doc"});const p8=jr("paragraph");De(p8,{displayName:"Attr<paragraph>",group:"Paragraph"});const dl=$s("paragraph",t=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:e=>["p",t.get(p8.key)(e),0],parseMarkdown:{match:e=>e.type==="paragraph",runner:(e,n,s)=>{e.openNode(s),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"),rB(e,n),e.closeNode()}}}));De(dl.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"});De(dl.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});const m8=Gt("TurnIntoText",t=>()=>xg(dl.type(t)));De(m8,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});const g8=so("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:t=>{const e=t.get(cn);return()=>e.call(m8.key)}}});De(g8.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"});De(g8.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});const tSe=Array(6).fill(0).map((t,e)=>e+1);function nSe(t){return q5e(t.textContent)}const zb=es(nSe,"headingIdGenerator");De(zb,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});const v8=jr("heading");De(v8,{displayName:"Attr<heading>",group:"Heading"});const la=$s("heading",t=>{const e=t.get(zb.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:""},level:{default:1}},parseDOM:tSe.map(n=>({tag:`h${n}`,getAttrs:s=>{if(!(s instanceof HTMLElement))throw Ur(s);return{level:n,id:s.id}}})),toDOM:n=>[`h${n.attrs.level}`,{...t.get(v8.key)(n),id:n.attrs.id||e(n)},0],parseMarkdown:{match:({type:n})=>n==="heading",runner:(n,s,i)=>{const o=s.depth;n.openNode(i,{level:o}),n.next(s.children),n.closeNode()}},toMarkdown:{match:n=>n.type.name==="heading",runner:(n,s)=>{n.openNode("heading",void 0,{depth:s.attrs.level}),rB(n,s),n.closeNode()}}}});De(la.node,{displayName:"NodeSchema<heading>",group:"Heading"});De(la.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});const pB=no(t=>ZF(/^(?<hashes>#+)\s$/,la.type(t),e=>{var n,s;const i=((s=(n=e.groups)==null?void 0:n.hashes)==null?void 0:s.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(i);return l>6&&(l=6),{level:l}}return{level:i}}));De(pB,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});const Ul=Gt("WrapInHeading",t=>e=>(e??(e=1),e<1?xg(dl.type(t)):xg(la.type(t),{level:e})));De(Ul,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});const _8=Gt("DowngradeHeading",t=>()=>(e,n,s)=>{const{$from:i}=e.selection,o=i.node();if(o.type!==la.type(t)||!e.selection.empty||i.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):xg(dl.type(t))(e,n,s)});De(_8,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});const y8=so("headingKeymap",{TurnIntoH1:{shortcuts:"Mod-Alt-1",command:t=>{const e=t.get(cn);return()=>e.call(Ul.key,1)}},TurnIntoH2:{shortcuts:"Mod-Alt-2",command:t=>{const e=t.get(cn);return()=>e.call(Ul.key,2)}},TurnIntoH3:{shortcuts:"Mod-Alt-3",command:t=>{const e=t.get(cn);return()=>e.call(Ul.key,3)}},TurnIntoH4:{shortcuts:"Mod-Alt-4",command:t=>{const e=t.get(cn);return()=>e.call(Ul.key,4)}},TurnIntoH5:{shortcuts:"Mod-Alt-5",command:t=>{const e=t.get(cn);return()=>e.call(Ul.key,5)}},TurnIntoH6:{shortcuts:"Mod-Alt-6",command:t=>{const e=t.get(cn);return()=>e.call(Ul.key,6)}},DowngradeHeading:{shortcuts:["Delete","Backspace"],command:t=>{const e=t.get(cn);return()=>e.call(_8.key)}}});De(y8.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"});De(y8.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});const b8=jr("blockquote");De(b8,{displayName:"Attr<blockquote>",group:"Blockquote"});const Uf=$s("blockquote",t=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:e=>["blockquote",t.get(b8.key)(e),0],parseMarkdown:{match:({type:e})=>e==="blockquote",runner:(e,n,s)=>{e.openNode(s).next(n.children).closeNode()}},toMarkdown:{match:e=>e.type.name==="blockquote",runner:(e,n)=>{e.openNode("blockquote").next(n.content).closeNode()}}}));De(Uf.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"});De(Uf.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});const mB=no(t=>Y4(/^\s*>\s$/,Uf.type(t)));De(mB,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});const w8=Gt("WrapInBlockquote",t=>()=>Z4(Uf.type(t)));De(w8,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});const C8=so("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:t=>{const e=t.get(cn);return()=>e.call(w8.key)}}});De(C8.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"});De(C8.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});const k8=jr("codeBlock",()=>({pre:{},code:{}}));De(k8,{displayName:"Attr<codeBlock>",group:"CodeBlock"});const jf=$s("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 Ur(e);return{language:e.dataset.language}}}],toDOM:e=>{const n=t.get(k8.key)(e);return["pre",{...n.pre,"data-language":e.attrs.language},["code",n.code,0]]},parseMarkdown:{match:({type:e})=>e==="code",runner:(e,n,s)=>{const i=n.lang,o=n.value;e.openNode(s,{language:i}),o&&e.addText(o),e.closeNode()}},toMarkdown:{match:e=>e.type.name==="code_block",runner:(e,n)=>{var s;e.addNode("code",void 0,((s=n.content.firstChild)==null?void 0:s.text)||"",{lang:n.attrs.language})}}}));De(jf.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"});De(jf.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});const gB=no(t=>ZF(/^```(?<language>[a-z]*)?[\s\n]$/,jf.type(t),e=>{var n;return{language:((n=e.groups)==null?void 0:n.language)??""}}));De(gB,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});const x8=Gt("CreateCodeBlock",t=>(e="")=>xg(jf.type(t),{language:e}));De(x8,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"});const sSe=Gt("UpdateCodeBlockLanguage",()=>({pos:t,language:e}={pos:-1,language:""})=>(n,s)=>t>=0?(s==null||s(n.tr.setNodeAttribute(t,"language",e)),!0):!1);De(sSe,{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});const S8=so("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:t=>{const e=t.get(cn);return()=>e.call(x8.key)}}});De(S8.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"});De(S8.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});const $8=jr("image");De($8,{displayName:"Attr<image>",group:"Image"});const Cd=$s("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 Ur(e);return{src:e.getAttribute("src")||"",alt:e.getAttribute("alt")||"",title:e.getAttribute("title")||e.getAttribute("alt")||""}}}],toDOM:e=>["img",{...t.get($8.key)(e),...e.attrs}],parseMarkdown:{match:({type:e})=>e==="image",runner:(e,n,s)=>{const i=n.url,o=n.alt,r=n.title;e.addNode(s,{src:i,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})}}}));De(Cd.node,{displayName:"NodeSchema<image>",group:"Image"});De(Cd.ctx,{displayName:"NodeSchemaCtx<image>",group:"Image"});const vB=Gt("InsertImage",t=>(e={})=>(n,s)=>{if(!s)return!0;const{src:i="",alt:o="",title:r=""}=e,a=Cd.type(t).create({src:i,alt:o,title:r});return a&&s(n.tr.replaceSelectionWith(a).scrollIntoView()),!0});De(vB,{displayName:"Command<insertImageCommand>",group:"Image"});const _B=Gt("UpdateImage",t=>(e={})=>(n,s)=>{const i=_4e(n.selection,Cd.type(t));if(!i)return!1;const{node:o,pos:r}=i,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),s==null||s(n.tr.setNodeMarkup(r,void 0,a).scrollIntoView()),!0});De(_B,{displayName:"Command<updateImageCommand>",group:"Image"});const iSe=no(t=>new to(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,(e,n,s,i)=>{const[o,r,a="",l]=n;return o?e.tr.replaceWith(s,i,Cd.type(t).create({src:a,alt:r,title:l})):null}));De(iSe,{displayName:"InputRule<insertImageInputRule>",group:"Image"});const iy=jr("hardbreak",t=>({"data-type":"hardbreak","data-is-inline":t.attrs.isInline}));De(iy,{displayName:"Attr<hardbreak>",group:"Hardbreak"});const Du=$s("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(iy.key)(e)," "]:["br",t.get(iy.key)(e)],parseMarkdown:{match:({type:e})=>e==="break",runner:(e,n,s)=>{var i;e.addNode(s,{isInline:!!((i=n.data)!=null&&i.isInline)})}},leafText:()=>` | |
| 122 | +`);return{dom:l,text:h,slice:e}}function HB(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(st.from(t.state.schema.text(e.replace(/\r\n?/g,` | |
| 123 | +`))),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=su.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=u9e(n),sv&&d9e(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")||p2.fromSchema(t.state.schema)).parseSlice(r,{preserveWhitespace:!!(l||u),context:s,ruleFromNode(h){return h.nodeName=="BR"&&!h.nextSibling&&h.parentNode&&!a9e.test(h.parentNode.nodeName)?{ignore:!0}:null}})),u)a=h9e(yM(a,+u[1],+u[2]),u[4]);else if(a=rt.maxOpen(l9e(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=yM(a,d,h)}return t.someProp("transformPasted",d=>{a=d(a,t)}),a}const a9e=/^(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 l9e(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&&jB(l,o,a,r[r.length-1],0))r[r.length-1]=c;else{r.length&&(r[r.length-1]=WB(r[r.length-1],o.length));let u=UB(a,l);r.push(u),s=s.matchType(u.type),o=l}}),r)return st.from(r)}return t}function UB(t,e,n=0){for(let i=e.length-1;i>=n;i--)t=e[i].create(null,st.from(t));return t}function jB(t,e,n,i,s){if(s<t.length&&s<e.length&&t[s]==e[s]){let o=jB(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(st.from(UB(n,t,s+1))))}}function WB(t,e){if(e==0)return t;let n=t.content.replaceChild(t.childCount-1,WB(t.lastChild,e-1)),i=t.contentMatchAt(t.childCount).fillBefore(st.empty,!0);return t.copy(n.append(i))}function px(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=px(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(st.empty,!0))),t.replaceChild(e<0?0:t.childCount-1,r.copy(a))}function yM(t,e,n){return e<t.openStart&&(t=new rt(px(t.content,-1,e,t.openStart,0,t.openEnd),e,t.openEnd)),n<t.openEnd&&(t=new rt(px(t.content,1,n,t.openEnd,0,0),t.openStart,n)),t}const YB={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 bM=null;function qB(){return bM||(bM=document.implementation.createHTMLDocument("title"))}function c9e(t){let e=window.trustedTypes;return e?e.createPolicy("detachedDocument",{createHTML:n=>n}).createHTML(t):t}function u9e(t){let e=/^(\s*<meta [^>]*>)*/.exec(t);e&&(t=t.slice(e[0].length));let n=qB().createElement("div"),i=/<([a-z][^>\s]+)/i.exec(t),s;if((s=i&&YB[i[1].toLowerCase()])&&(t=s.map(o=>"<"+o+">").join("")+t+s.map(o=>"</"+o+">").reverse().join("")),n.innerHTML=c9e(t),s)for(let o=0;o<s.length;o++)n=n.querySelector(s[o])||n;return n}function d9e(t){let e=t.querySelectorAll(Ei?"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 h9e(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=st.from(l.create(i[a+1],s)),o++,r++}return new rt(s,o,r)}const Xi={},Ki={},f9e={touchstart:!0,touchmove:!0};class p9e{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 m9e(t){for(let e in Xi){let n=Xi[e];t.dom.addEventListener(e,t.input.eventHandlers[e]=i=>{v9e(t,i)&&!a5(t,i)&&(t.editable||!(i.type in Ki))&&n(t,i)},f9e[e]?{passive:!0}:void 0)}Gi&&t.dom.addEventListener("input",()=>null),mx(t)}function Sc(t,e){t.input.lastSelectionOrigin=e,t.input.lastSelectionTime=Date.now()}function g9e(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 mx(t){t.someProp("handleDOMEvents",e=>{for(let n in e)t.input.eventHandlers[n]||t.dom.addEventListener(n,t.input.eventHandlers[n]=i=>a5(t,i))})}function a5(t,e){return t.someProp("handleDOMEvents",n=>{let i=n[e.type];return i?i(t,e)||e.defaultPrevented:!1})}function v9e(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 _9e(t,e){!a5(t,e)&&Xi[e.type]&&(t.editable||!(e.type in Ki))&&Xi[e.type](t,e)}Ki.keydown=(t,e)=>{let n=e;if(t.input.shiftKey=n.keyCode==16||n.shiftKey,!XB(t,n)&&(t.input.lastKeyCode=n.keyCode,t.input.lastKeyCodeTime=Date.now(),!(Pr&&Ei&&n.keyCode==13)))if(t.domObserver.selectionChanged(t.domSelectionRange())?t.domObserver.flush():n.keyCode!=229&&t.domObserver.forceFlush(),ep&&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,Lu(13,"Enter"))),t.input.lastIOSEnter=0)},200)}else t.someProp("handleKeyDown",i=>i(t,n))||r9e(t,n)?n.preventDefault():Sc(t,"key")};Ki.keyup=(t,e)=>{e.keyCode==16&&(t.input.shiftKey=!1)};Ki.keypress=(t,e)=>{let n=e;if(XB(t,n)||!n.charCode||n.ctrlKey&&!n.altKey||nr&&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 M2(t){return{left:t.clientX,top:t.clientY}}function y9e(t,e){let n=e.x-t.clientX,i=e.y-t.clientY;return n*n+i*i<100}function l5(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 ff(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 b9e(t,e){if(e==-1)return!1;let n=t.state.doc.resolve(e),i=n.nodeAfter;return i&&i.isAtom&&Rt.isSelectable(i)?(ff(t,new Rt(n),"pointer"),!0):!1}function w9e(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?(ff(t,Rt.create(t.state.doc,s),"pointer"),!0):!1}function k9e(t,e,n,i,s){return l5(t,"handleClickOn",e,n,i)||t.someProp("handleClick",o=>o(t,e,i))||(s?w9e(t,n):b9e(t,n))}function C9e(t,e,n,i){return l5(t,"handleDoubleClickOn",e,n,i)||t.someProp("handleDoubleClick",s=>s(t,e,i))}function x9e(t,e,n,i){return l5(t,"handleTripleClickOn",e,n,i)||t.someProp("handleTripleClick",s=>s(t,e,i))||S9e(t,n,i)}function S9e(t,e,n){if(n.button!=0)return!1;let i=t.state.doc;if(e==-1)return i.inlineContent?(ff(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)ff(t,Ot.create(i,a+1,a+1+r.content.size),"pointer");else if(Rt.isSelectable(r))ff(t,Rt.create(i,a),"pointer");else continue;return!0}}function c5(t){return jy(t)}const GB=nr?"metaKey":"ctrlKey";Xi.mousedown=(t,e)=>{let n=e;t.input.shiftKey=n.shiftKey;let i=c5(t),s=Date.now(),o="singleClick";s-t.input.lastClick.time<500&&y9e(n,t.input.lastClick)&&!n[GB]&&(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(M2(n));r&&(o=="singleClick"?(t.input.mouseDown&&t.input.mouseDown.done(),t.input.mouseDown=new $9e(t,r,n,!!i)):(o=="doubleClick"?C9e:x9e)(t,r.pos,r.inside,n)?n.preventDefault():Sc(t,"pointer"))};class $9e{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[GB],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&&Jr&&!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)),Sc(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(()=>ml(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(M2(e))),this.updateAllowDefault(e),this.allowDefault||!n?Sc(this.view,"pointer"):k9e(this.view,n.pos,n.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||Gi&&this.mightDrag&&!this.mightDrag.node.isAtom||Ei&&!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)?(ff(this.view,Ut.near(this.view.state.doc.resolve(n.pos)),"pointer"),e.preventDefault()):Sc(this.view,"pointer")}move(e){this.updateAllowDefault(e),Sc(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)}}Xi.touchstart=t=>{t.input.lastTouch=Date.now(),c5(t),Sc(t,"pointer")};Xi.touchmove=t=>{t.input.lastTouch=Date.now(),Sc(t,"pointer")};Xi.contextmenu=t=>c5(t);function XB(t,e){return t.composing?!0:Gi&&Math.abs(e.timeStamp-t.input.compositionEndedAt)<500?(t.input.compositionEndedAt=-2e8,!0):!1}const A9e=Pr?5e3:-1;Ki.compositionstart=Ki.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(),jy(t,!0),t.markCursor=null;else if(jy(t,!e.selection.empty),Jr&&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}KB(t,A9e)};Ki.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++,KB(t,20))};function KB(t,e){clearTimeout(t.input.composingTimeout),e>-1&&(t.input.composingTimeout=setTimeout(()=>jy(t),e))}function ZB(t){for(t.composing&&(t.input.composing=!1,t.input.compositionEndedAt=M9e());t.input.compositionNodes.length>0;)t.input.compositionNodes.pop().markParentsDirty()}function E9e(t){let e=t.domSelectionRange();if(!e.focusNode)return null;let n=bSe(e.focusNode,e.focusOffset),i=wSe(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 M9e(){let t=document.createEvent("Event");return t.initEvent("event",!0,!0),t.timeStamp}function jy(t,e=!1){if(!(Pr&&t.domObserver.flushingSoon>=0)){if(t.domObserver.forceFlush(),ZB(t),e||t.docView&&t.docView.dirty){let n=o5(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 T9e(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 u1=po&&Pc<15||ep&&$Se<604;Xi.copy=Ki.cut=(t,e)=>{let n=e,i=t.state.selection,s=n.type=="cut";if(i.empty)return;let o=u1?null:n.clipboardData,r=i.content(),{dom:a,text:l}=zB(t,r);o?(n.preventDefault(),o.clearData(),o.setData("text/html",a.innerHTML),o.setData("text/plain",l)):T9e(t,a),s&&t.dispatch(t.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))};function P9e(t){return t.openStart==0&&t.openEnd==0&&t.content.childCount==1?t.content.firstChild:null}function I9e(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?d1(t,i.value,null,s,e):d1(t,i.textContent,i.innerHTML,s,e)},50)}function d1(t,e,n,i,s){let o=HB(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=P9e(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 JB(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," "):""}Ki.paste=(t,e)=>{let n=e;if(t.composing&&!Pr)return;let i=u1?null:n.clipboardData,s=t.input.shiftKey&&t.input.lastKeyCode!=45;i&&d1(t,JB(i),i.getData("text/html"),s,n)?n.preventDefault():I9e(t,n)};class QB{constructor(e,n,i){this.slice=e,this.move=n,this.node=i}}const ez=nr?"altKey":"ctrlKey";Xi.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(M2(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}=zB(t,a);(!n.dataTransfer.files.length||!Ei||SB>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(u1?"Text":"text/html",l.innerHTML),n.dataTransfer.effectAllowed="copyMove",u1||n.dataTransfer.setData("text/plain",c),t.dragging=new QB(u,!n[ez],r)};Xi.dragend=t=>{let e=t.dragging;window.setTimeout(()=>{t.dragging==e&&(t.dragging=null)},50)};Ki.dragover=Ki.dragenter=(t,e)=>e.preventDefault();Ki.drop=(t,e)=>{let n=e,i=t.dragging;if(t.dragging=null,!n.dataTransfer)return;let s=t.posAtCoords(M2(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=HB(t,JB(n.dataTransfer),u1?null:n.dataTransfer.getData("text/html"),!1,o);let a=!!(i&&!n[ez]);if(t.someProp("handleDrop",p=>p(t,n,r||rt.empty,a))){n.preventDefault();return}if(!r)return;n.preventDefault();let l=r?m5e(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(r5(t,f,c.doc.resolve(p)))}t.focus(),t.dispatch(c.setMeta("uiEvent","drop"))};Xi.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())&&ml(t)},20))};Xi.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)};Xi.beforeinput=(t,e)=>{if(Ei&&Pr&&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,Lu(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 Ki)Xi[t]=Ki[t];function h1(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 Wy{constructor(e,n){this.toDOM=e,this.spec=n||sd,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 Wy&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&h1(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class Lc{constructor(e,n){this.attrs=e,this.spec=n||sd}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 Lc&&h1(this.attrs,e.attrs)&&h1(this.spec,e.spec)}static is(e){return e.type instanceof Lc}destroy(){}}class u5{constructor(e,n){this.attrs=e,this.spec=n||sd}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 u5&&h1(this.attrs,e.attrs)&&h1(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 Wy(n,i))}static inline(e,n,i,s){return new Fs(e,n,new Lc(i,s))}static node(e,n,i,s){return new Fs(e,n,new u5(i,s))}get spec(){return this.type.spec}get inline(){return this.type instanceof Lc}get widget(){return this.type instanceof Wy}}const Oh=[],sd={};class Kn{constructor(e,n){this.local=e.length?e:Oh,this.children=n.length?n:Oh}static create(e,n){return n.length?Yy(n,e,0,sd):xi}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==xi||e.maps.length==0?this:this.mapInner(e,n,0,0,i||sd)}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?L9e(this.children,r||[],e,n,i,s,o):r?new Kn(r.sort(id),Oh):xi}add(e,n){return n.length?this==xi?Kn.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=nz(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,Yy(u,a,c+1,sd)),o+=3}});let r=tz(o?sz(n):n,-i);for(let a=0;a<r.length;a++)r[a].type.valid(e,r[a])||r.splice(a--,1);return new Kn(r.length?this.local.concat(r).sort(id):this.local,s||this.children)}remove(e){return e.length==0||this==xi?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!=xi?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 Kn(s,i):xi}forChild(e,n){if(this==xi)return this;if(n.isLeaf)return Kn.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 Lc){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 Kn(s.sort(id),Oh);return i?new gc([a,i]):a}return i||xi}eq(e){if(this==e)return!0;if(!(e instanceof Kn)||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 d5(this.localsInner(e))}localsInner(e){if(this==xi)return Oh;if(e.inlineContent||!this.local.some(Lc.is))return this.local;let n=[];for(let i=0;i<this.local.length;i++)this.local[i].type instanceof Lc||n.push(this.local[i]);return n}forEachSet(e){e(this)}}Kn.empty=new Kn([],[]);Kn.removeOverlap=d5;const xi=Kn.empty;class gc{constructor(e){this.members=e}map(e,n){const i=this.members.map(s=>s.map(e,n,sd));return gc.from(i)}forChild(e,n){if(n.isLeaf)return Kn.empty;let i=[];for(let s=0;s<this.members.length;s++){let o=this.members[s].forChild(e,n);o!=xi&&(o instanceof gc?i=i.concat(o.members):i.push(o))}return gc.from(i)}eq(e){if(!(e instanceof gc)||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?d5(i?n:n.sort(id)):Oh}static from(e){switch(e.length){case 0:return xi;case 1:return e[0];default:return new gc(e.every(n=>n instanceof Kn)?e:e.reduce((n,i)=>n.concat(i instanceof Kn?i:i.members),[]))}}forEachSet(e){for(let n=0;n<this.members.length;n++)this.members[n].forEachSet(e)}}function L9e(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!=xi?(a[c]=d,a[c+1]=f,a[c+2]=b):(a[c+1]=-2,l=!0)}else l=!0}if(l){let c=O9e(a,t,e,n,s,o,r),u=Yy(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 Kn(e.sort(id),a)}function tz(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 O9e(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 nz(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 sz(t){let e=[];for(let n=0;n<t.length;n++)t[n]!=null&&e.push(t[n]);return e}function Yy(t,e,n,i){let s=[],o=!1;e.forEach((a,l)=>{let c=nz(t,a,l+n);if(c){o=!0;let u=Yy(c,a,n+l+1,i);u!=xi&&s.push(l,l+a.nodeSize,u)}});let r=tz(o?sz(t):t,-n).sort(id);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 Kn(r,s):xi}function id(t,e){return t.from-e.from||t.to-e.to}function d5(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),wM(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),wM(e,s,i.copy(o.from,i.to)));break}}}return e}function wM(t,e,n){for(;e<t.length&&id(n,t[e])>0;)e++;t.splice(e,0,n)}function _3(t){let e=[];return t.someProp("decorations",n=>{let i=n(t.state);i&&i!=xi&&e.push(i)}),t.cursorWrapper&&e.push(Kn.create(t.state.doc,[t.cursorWrapper.deco])),gc.from(e)}const D9e={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},R9e=po&&Pc<=11;class V9e{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 F9e{constructor(e,n){this.view=e,this.handleDOMChange=n,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new V9e,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]);po&&Pc<=11&&i.some(s=>s.type=="childList"&&s.removedNodes.length||s.type=="characterData"&&s.oldValue.length>s.target.nodeValue.length)?this.flushSoon():this.flush()}),R9e&&(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,D9e)),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(fM(this.view)){if(this.suppressingSelectionUpdates)return ml(this.view);if(po&&Pc<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Sd(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=c1(o))n.add(o);for(let o=e.anchorNode;o;o=c1(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}selectionChanged(e){return!this.suppressingSelectionUpdates&&!this.currentSelection.eq(e)&&fM(this.view)&&!this.ignoreSelectionChange(e)}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.selectionChanged(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(Jr&&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||z9e(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&&A2(i)&&(c=o5(e))&&c.eq(Ut.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,ml(e),this.currentSelection.set(i),e.scrollToSelection()):(o>-1||s)&&(o>-1&&(e.docView.markDirty(o,r),N9e(e)),this.handleDOMChange(o,r,a,l),e.docView&&e.docView.dirty?e.updateState(e.state):this.currentSelection.eq(i)||ml(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(po&&Pc<=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?si(s)+1:0,a=i.localPosFromDOM(e.target,r,-1),l=o&&o.parentNode==e.target?si(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 kM=new WeakMap,CM=!1;function N9e(t){if(!kM.has(t)&&(kM.set(t,null),["normal","nowrap","pre-line"].indexOf(getComputedStyle(t.dom).whiteSpace)!==-1)){if(t.requiresGeckoHackNode=Jr,CM)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."),CM=!0}}function xM(t,e){let n=e.startContainer,i=e.startOffset,s=e.endContainer,o=e.endOffset,r=t.domAtPos(t.state.selection.anchor);return Sd(r.node,r.offset,s,o)&&([n,i,s,o]=[s,o,n,i]),{anchorNode:n,anchorOffset:i,focusNode:s,focusOffset:o}}function B9e(t,e){if(e.getComposedRanges){let s=e.getComposedRanges(t.root)[0];if(s)return xM(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?xM(t,n):null}function z9e(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 H9e(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}],A2(l)||c.push({node:l.focusNode,offset:l.focusOffset})),Ei&&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")||p2.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:U9e,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 U9e(t){let e=t.pmViewDesc;if(e)return e.parseRule();if(t.nodeName=="BR"&&t.parentNode){if(Gi&&/^(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||Gi&&/^(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 j9e=/^(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 W9e(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=o5(t,I);if(L&&!t.state.selection.eq(L)){if(Ei&&Pr&&t.input.lastKeyCode===13&&Date.now()-100<t.input.lastKeyCodeTime&&t.someProp("handleKeyDown",V=>V(t,Lu(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=H9e(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=G9e(d.content,c.doc.content,c.from,h,f);if(p&&t.input.domChangeCount++,(ep&&t.input.lastIOSEnter>Date.now()-225||Pr)&&s.some(I=>I.nodeType==1&&!j9e.test(I.nodeName))&&(!p||p.endA>=p.endB)&&t.someProp("handleKeyDown",I=>I(t,Lu(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=SM(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.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)),po&&Pc<=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((ep&&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=Ut.findFrom(c.doc.resolve(m.pos+1),1,!0))&&C.head==y.pos)&&t.someProp("handleKeyDown",I=>I(t,Lu(13,"Enter")))){t.input.lastIOSEnter=0;return}if(t.state.selection.anchor>p.start&&q9e(u,p.start,p.endA,m,y)&&t.someProp("handleKeyDown",I=>I(t,Lu(8,"Backspace")))){Pr&&Ei&&t.domObserver.suppressSelectionUpdates();return}Ei&&Pr&&p.endB==p.start&&(t.input.lastAndroidDelete=Date.now()),Pr&&!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,Lu(13,"Enter"))})},20));let $=p.start,S=p.endA,M,P,T;if(k){if(m.pos==y.pos)po&&Pc<=11&&m.parentOffset==0&&(t.domObserver.suppressSelectionUpdates(),setTimeout(()=>ml(t),20)),M=t.state.tr.delete($,S),P=u.resolve(p.start).marksAcross(u.resolve(p.endA));else if(p.endA==p.endB&&(T=Y9e(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($,S,T.mark):M.removeMark($,S,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,$,S,I)))return;M=t.state.tr.insertText(I,$,S)}}if(M||(M=t.state.tr.replace($,S,c.doc.slice(p.start-c.from,p.endB-c.from))),c.sel){let I=SM(t,M.doc,c.sel);I&&!(Ei&&Pr&&t.composing&&I.empty&&(p.start!=p.endB||t.input.lastAndroidDelete<Date.now()-100)&&(I.head==$||I.head==M.mapping.map(S)-1)||po&&I.empty&&I.head==$)&&M.setSelection(I)}P&&M.ensureMarks(P),o&&M.setMeta("composition",o),t.dispatch(M.scrollIntoView())}function SM(t,e,n){return Math.max(n.anchor,n.head)>e.content.size?null:r5(t,e.resolve(n.anchor),e.resolve(n.head))}function Y9e(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(st.from(c).eq(t))return{mark:a,type:r}}function q9e(t,e,n,i,s){if(n-e<=s.pos-i.pos||y3(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(y3(o,!0,!0));return!r.parent.isTextblock||r.pos>n||y3(r,!0,!1)<n?!1:i.parent.content.cut(i.parentOffset).eq(r.parent.content)}function y3(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 G9e(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&&$M(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&&$M(t.textBetween(o-1,o+1))&&(o+=l?1:-1),r=o+(r-a),a=o}return{start:o,endA:r,endB:a}}function $M(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 X9e{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 p9e,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=n,this.state=n.state,this.directPlugins=n.plugins||[],this.directPlugins.forEach(PM),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=MM(this),EM(this),this.nodeViews=TM(this),this.docView=aM(this.state.doc,AM(this),_3(this),this.dom,this),this.domObserver=new F9e(this,(i,s,o,r)=>W9e(this,i,s,o,r)),this.domObserver.start(),m9e(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&&mx(this);let n=this._props;this._props=e,e.plugins&&(e.plugins.forEach(PM),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&&(ZB(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=TM(this);Z9e(f,this.nodeViews)&&(this.nodeViews=f,o=!0)}(a||n.handleDOMEvents!=this._props.handleDOMEvents)&&mx(this),this.editable=MM(this),EM(this);let l=_3(this),c=AM(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&&MSe(this);if(r){this.domObserver.stop();let f=d&&(po||Ei)&&!this.composing&&!s.selection.empty&&!e.selection.empty&&K9e(s.selection,e.selection);if(d){let p=Ei?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=E9e(this)),(o||!this.docView.update(e.doc,c,l,this))&&(this.docView.updateOuterDeco(c),this.docView.destroy(),this.docView=aM(e.doc,c,l,this.dom,this)),p&&!this.trackWrites&&(f=!0)}f||!(this.input.mouseDown&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&QSe(this))?ml(this,f):(FB(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&&TSe(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&&tM(this,n.getBoundingClientRect(),e)}else tM(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 QB(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(po){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&&PSe(this.dom),ml(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 RSe(this,e)}coordsAtPos(e,n=1){return TB(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 zSe(this,n||this.state,e)}pasteHTML(e,n){return d1(this,"",e,!1,n||new ClipboardEvent("paste"))}pasteText(e,n){return d1(this,e,null,!0,n||new ClipboardEvent("paste"))}destroy(){this.docView&&(g9e(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],_3(this),this),this.dom.textContent=""):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,_Se())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return _9e(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?Gi&&this.root.nodeType===11&&CSe(this.dom.ownerDocument)==this.dom&&B9e(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}}function AM(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 EM(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 MM(t){return!t.someProp("editable",e=>e(t.state)===!1)}function K9e(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 TM(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 Z9e(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 PM(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 iz=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},St=(t,e,n)=>(iz(t,e,"read from private field"),n?n.call(t):e.get(t)),Xs=(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)},fs=(t,e,n,i)=>(iz(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);function au(t,e){return t.meta={package:"@milkdown/core",group:"System",...e},t}const oz={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=kn({},"editorView"),wm=kn({},"editorState"),b3=kn([],"initTimer"),IM=kn({},"editor"),f1=kn([],"inputRules"),Qr=kn([],"prosePlugins"),p1=kn([],"remarkPlugins"),m1=kn([],"nodeView"),g1=kn([],"markView"),od=kn(KC().use(UC).use(qC),"remark"),hg=kn({handlers:oz},"remarkStringifyOptions"),o_=nu("ConfigReady");function J9e(t){const e=n=>(n.record(o_),async()=>(await t(n),n.done(o_),()=>{n.clearTimer(o_)}));return au(e,{displayName:"Config"}),e}const rd=nu("InitReady");function Q9e(t){const e=n=>(n.inject(IM,t).inject(Qr,[]).inject(p1,[]).inject(f1,[]).inject(m1,[]).inject(g1,[]).inject(hg,{handlers:oz}).inject(od,KC().use(UC).use(qC)).inject(b3,[o_]).record(rd),async()=>{await n.waitTimers(b3);const i=n.get(hg);return n.set(od,KC().use(UC).use(qC,i)),n.done(rd),()=>{n.remove(IM).remove(Qr).remove(p1).remove(f1).remove(m1).remove(g1).remove(hg).remove(od).remove(b3).clearTimer(rd)}});return au(e,{displayName:"Init"}),e}const jr=nu("SchemaReady"),w3=kn([],"schemaTimer"),Wr=kn({},"schema"),pf=kn([],"nodes"),mf=kn([],"marks");function LM(t){var e;return{...t,parseDOM:(e=t.parseDOM)==null?void 0:e.map(n=>({priority:t.priority,...n}))}}const rz=t=>(t.inject(Wr,{}).inject(pf,[]).inject(mf,[]).inject(w3,[rd]).record(jr),async()=>{await t.waitTimers(w3);const e=t.get(od),n=t.get(p1).reduce((r,a)=>r.use(a.plugin,a.options),e);t.set(od,n);const i=Object.fromEntries(t.get(pf).map(([r,a])=>[r,LM(a)])),s=Object.fromEntries(t.get(mf).map(([r,a])=>[r,LM(a)])),o=new pxe({nodes:i,marks:s});return t.set(Wr,o),t.done(jr),()=>{t.remove(Wr).remove(pf).remove(mf).remove(w3).clearTimer(jr)}});au(rz,{displayName:"Schema"});var Dh,$u;let az=class{constructor(){Xs(this,Dh,void 0),Xs(this,$u,void 0),fs(this,Dh,new XF),fs(this,$u,null),this.setCtx=e=>{fs(this,$u,e)}}get ctx(){return St(this,$u)}create(e,n){const i=e.create(St(this,Dh).sliceMap);return i.set(n),i}get(e){return St(this,Dh).get(e).get()}remove(e){return St(this,Dh).remove(e)}call(e,n){if(St(this,$u)==null)throw HCe();const i=this.get(e)(n),s=St(this,$u).get(Vn);return i(s.state,s.dispatch,s)}};Dh=new WeakMap,$u=new WeakMap;function e7e(t="cmdKey"){return kn(()=>()=>!1,t)}const gn=kn(new az,"commands"),k3=kn([jr],"commandsTimer"),fg=nu("CommandsReady"),lz=t=>{const e=new az;return e.setCtx(t),t.inject(gn,e).inject(k3,[jr]).record(fg),async()=>(await t.waitTimers(k3),t.done(fg),()=>{t.remove(gn).remove(k3).clearTimer(fg)})};au(lz,{displayName:"Commands"});const r_=nu("ParserReady"),cz=()=>{throw B8()},gf=kn(cz,"parser"),C3=kn([],"parserTimer"),uz=t=>(t.inject(gf,cz).inject(C3,[jr]).record(r_),async()=>{await t.waitTimers(C3);const e=t.get(od),n=t.get(Wr);return t.set(gf,G8e.create(n,e)),t.done(r_),()=>{t.remove(gf).remove(C3).clearTimer(r_)}});au(uz,{displayName:"Parser"});const pg=nu("SerializerReady"),x3=kn([],"serializerTimer"),dz=()=>{throw B8()},vf=kn(dz,"serializer"),hz=t=>(t.inject(vf,dz).inject(x3,[jr]).record(pg),async()=>{await t.waitTimers(x3);const e=t.get(od),n=t.get(Wr);return t.set(vf,K8e.create(n,e)),t.done(pg),()=>{t.remove(vf).remove(x3).clearTimer(pg)}});au(hz,{displayName:"Serializer"});const a_=kn("","defaultValue"),l_=kn(t=>t,"stateOptions"),S3=kn([],"editorStateTimer"),c_=nu("EditorStateReady");function t7e(t,e,n){if(typeof t=="string")return e(t);if(t.type==="html")return p2.fromSchema(n).parse(t.dom);if(t.type==="json")return Tc.fromJSON(n,t.value);throw DCe(t)}const n7e=new ps("MILKDOWN_STATE_TRACKER");function s7e(t){const e=$2($5e,t5,mB,gB);return t.Backspace=e,t}const fz=t=>(t.inject(a_,"").inject(wm,{}).inject(l_,e=>e).inject(S3,[r_,pg,fg]).record(c_),async()=>{await t.waitTimers(S3);const e=t.get(Wr),n=t.get(gf),i=t.get(f1),s=t.get(l_),o=t.get(Qr),r=t.get(a_),a=t7e(r,n,e),l=[...o,new rs({key:n7e,state:{init:()=>{},apply:(d,h,f,p)=>{t.set(wm,p)}}}),D5e({rules:i}),kB(s7e(dSe))];t.set(Qr,l);const c=s({schema:e,doc:a,plugins:l}),u=Bu.create(c);return t.set(wm,u),t.done(c_),()=>{t.remove(a_).remove(wm).remove(l_).remove(S3).clearTimer(c_)}});au(fz,{displayName:"EditorState"});const u_=nu("EditorViewReady"),$3=kn([],"editorViewTimer"),mg=kn({},"editorViewOptions"),d_=kn(null,"root"),gx=kn(null,"rootDOM"),vx=kn({},"rootAttrs");function i7e(t,e){const n=document.createElement("div");n.className="milkdown",t.appendChild(n),e.set(gx,n);const i=e.get(vx);return Object.entries(i).forEach(([s,o])=>n.setAttribute(s,o)),n}function o7e(t){t.classList.add("editor"),t.setAttribute("role","textbox")}const r7e=new ps("MILKDOWN_VIEW_CLEAR"),pz=t=>(t.inject(d_,document.body).inject(Vn,{}).inject(mg,{}).inject(gx,null).inject(vx,{}).inject($3,[c_]).record(u_),async()=>{await t.wait(rd);const e=t.get(d_)||document.body,n=typeof e=="string"?document.querySelector(e):e;t.update(Qr,l=>[new rs({key:r7e,view:c=>{const u=n?i7e(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($3);const i=t.get(wm),s=t.get(mg),o=Object.fromEntries(t.get(m1)),r=Object.fromEntries(t.get(g1)),a=new X9e(n,{state:i,nodeViews:o,markViews:r,...s});return o7e(a.dom),t.set(Vn,a),t.done(u_),()=>{a==null||a.destroy(),t.remove(d_).remove(Vn).remove(mg).remove(gx).remove(vx).remove($3).clearTimer(u_)}});au(pz,{displayName:"EditorView"});var Rh,er,tc,km,h_,f_,$o,nc,Vh,p_,Fh,Cm,m_,Au,xm;const a7e=class mz{constructor(){Xs(this,Rh,void 0),Xs(this,er,void 0),Xs(this,tc,void 0),Xs(this,km,void 0),Xs(this,h_,void 0),Xs(this,f_,void 0),Xs(this,$o,void 0),Xs(this,nc,void 0),Xs(this,Vh,void 0),Xs(this,p_,void 0),Xs(this,Fh,void 0),Xs(this,Cm,void 0),Xs(this,m_,void 0),Xs(this,Au,void 0),Xs(this,xm,void 0),fs(this,Rh,!1),fs(this,er,"Idle"),fs(this,tc,[]),fs(this,km,()=>{}),fs(this,h_,new XF),fs(this,f_,new XCe),fs(this,$o,new Map),fs(this,nc,new Map),fs(this,Vh,new GCe(St(this,h_),St(this,f_))),fs(this,p_,()=>{const e=J9e(async i=>{await Promise.all(St(this,tc).map(s=>s(i)))}),n=[rz,uz,hz,lz,fz,pz,Q9e(this),e];St(this,Fh).call(this,n,St(this,nc))}),fs(this,Fh,(e,n)=>{e.forEach(i=>{const s=St(this,Vh).produce(St(this,Rh)?i.meta:void 0),o=i(s);n.set(i,{ctx:s,handler:o,cleanup:void 0})})}),fs(this,Cm,(e,n=!1)=>Promise.all([e].flat().map(i=>{const s=St(this,$o).get(i),o=s==null?void 0:s.cleanup;return n?St(this,$o).delete(i):St(this,$o).set(i,{ctx:void 0,handler:void 0,cleanup:void 0}),typeof o=="function"?o():o}))),fs(this,m_,async()=>{await Promise.all([...St(this,nc).entries()].map(([e,{cleanup:n}])=>typeof n=="function"?n():n)),St(this,nc).clear()}),fs(this,Au,e=>{fs(this,er,e),St(this,km).call(this,e)}),fs(this,xm,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)=>(fs(this,Rh,e),this),this.onStatusChange=e=>(fs(this,km,e),this),this.config=e=>(St(this,tc).push(e),this),this.removeConfig=e=>(fs(this,tc,St(this,tc).filter(n=>n!==e)),this),this.use=e=>{const n=[e].flat();return n.flat().forEach(i=>{St(this,$o).set(i,{ctx:void 0,handler:void 0,cleanup:void 0})}),St(this,er)==="Created"&&St(this,Fh).call(this,n,St(this,$o)),this},this.remove=async e=>St(this,er)==="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,Cm).call(this,[e].flat(),!0),this),this.create=async()=>St(this,er)==="OnCreate"?this:(St(this,er)==="Created"&&await this.destroy(),St(this,Au).call(this,"OnCreate"),St(this,p_).call(this),St(this,Fh).call(this,[...St(this,$o).keys()],St(this,$o)),await Promise.all([St(this,xm).call(this,St(this,nc)),St(this,xm).call(this,St(this,$o))].flat()),St(this,Au).call(this,"Created"),this),this.destroy=async(e=!1)=>St(this,er)==="Destroyed"||St(this,er)==="OnDestroy"?this:St(this,er)==="OnCreate"?new Promise(n=>{setTimeout(()=>{n(this.destroy(e))},50)}):(e&&fs(this,tc,[]),St(this,Au).call(this,"OnDestroy"),await St(this,Cm).call(this,[...St(this,$o).keys()],e),await St(this,m_).call(this),St(this,Au).call(this,"Destroyed"),this),this.action=e=>e(St(this,Vh)),this.inspect=()=>St(this,Rh)?[...St(this,nc).values(),...St(this,$o).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 mz}get ctx(){return St(this,Vh)}get status(){return St(this,er)}};Rh=new WeakMap,er=new WeakMap,tc=new WeakMap,km=new WeakMap,h_=new WeakMap,f_=new WeakMap,$o=new WeakMap,nc=new WeakMap,Vh=new WeakMap,p_=new WeakMap,Fh=new WeakMap,Cm=new WeakMap,m_=new WeakMap,Au=new WeakMap,xm=new WeakMap;let l7e=a7e,c7e=t=>crypto.getRandomValues(new Uint8Array(t)),u7e=(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}}},d7e=(t,e=21)=>u7e(t,e|0,c7e);d7e("abcedfghicklmn",10);function on(t,e){const n=e7e(t),i=s=>async()=>{i.key=n,await s.wait(fg);const o=e(s);return s.get(gn).create(n,o),i.run=r=>s.get(gn).call(t,r),()=>{s.get(gn).remove(n)}};return i}function wo(t){const e=n=>async()=>{await n.wait(jr);const i=t(n);return n.update(f1,s=>[...s,i]),e.inputRule=i,()=>{n.update(f1,s=>s.filter(o=>o!==i))}};return e}function h7e(t,e){const n=i=>async()=>{const s=e(i);return i.update(mf,o=>[...o.filter(r=>r[0]!==t),[t,s]]),n.id=t,n.schema=s,()=>{i.update(mf,o=>o.filter(([r])=>r!==t))}};return n.type=i=>{const s=i.get(Wr).marks[t];if(!s)throw UCe(t);return s},n}function h5(t,e){const n=i=>async()=>{const s=e(i);return i.update(pf,o=>[...o.filter(r=>r[0]!==t),[t,s]]),n.id=t,n.schema=s,()=>{i.update(pf,o=>o.filter(([r])=>r!==t))}};return n.type=i=>{const s=i.get(Wr).nodes[t];if(!s)throw qF(t);return s},n}function Ls(t){let e;const n=i=>async()=>(await i.wait(jr),e=t(i),i.update(Qr,s=>[...s,e]),()=>{i.update(Qr,s=>s.filter(o=>o!==e))});return n.plugin=()=>e,n.key=()=>e.spec.key,n}function f7e(t){const e=n=>async()=>{await n.wait(jr);const i=t(n),s=kB(i);return n.update(Qr,o=>[...o,s]),e.keymap=i,()=>{n.update(Qr,o=>o.filter(r=>r!==s))}};return e}function gz(t,e){const n=i=>async()=>{await i.wait(jr);const s=e(i);return t.type(i)instanceof Ry?i.update(m1,o=>[...o,[t.id,s]]):i.update(g1,o=>[...o,[t.id,s]]),n.view=s,n.type=t,()=>{t.type(i)instanceof Ry?i.update(m1,o=>o.filter(r=>r[0]!==t.id)):i.update(g1,o=>o.filter(r=>r[0]!==t.id))}};return n}function ms(t,e){const n=kn(t,e),i=s=>(s.inject(n),()=>()=>{s.remove(n)});return i.key=n,i}function zs(t,e){const n=ms(e,t),i=h5(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(pf,c=>[...c.filter(u=>u[0]!==t),[t,l]]),s.schema=l},s}function ov(t,e){const n=ms(e,t),i=h7e(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(mf,c=>[...c.filter(u=>u[0]!==t),[t,l]]),s.schema=l},s}function ko(t,e){const n=Object.fromEntries(Object.entries(e).map(([r,{shortcuts:a}])=>[r,a])),i=ms(n,`${t}Keymap`),s=f7e(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 aa=(t,e=()=>({}))=>ms(e,`${t}Attr`),rv=(t,e=()=>({}))=>ms(e,`${t}Attr`);function Gd(t,e,n){const i=ms(n??{},t),s=r=>async()=>{await r.wait(rd);const a={plugin:e(r),options:r.get(i.key)};return r.update(p1,l=>[...l,a]),()=>{r.update(p1,l=>l.filter(c=>c!==a))}},o=[i,s];return o.id=t,o.plugin=s,o.options=i,o}function p7e(){return t=>{const e=t.get(Vn);return t.get(vf)(e.state.doc)}}function m7e(t,e=!1){return n=>{const i=n.get(Vn),s=n.get(gf)(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(Wr),r=n.get(l_),a=n.get(Qr),l=Bu.create({schema:o,doc:s,plugins:a,...r});i.updateState(l)}}function T2(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}const g7e=[["ß","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"],["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"]],v7e=(t,e)=>{for(const[n,i]of e)t=t.replace(new RegExp(T2(n),"g"),i);return t};function _7e(t,e){if(typeof t!="string")throw new TypeError(`Expected a string, got \`${typeof t}\``);e={customReplacements:[],...e};const n=new Map([...g7e,...e.customReplacements]);return t=t.normalize(),t=v7e(t,n),t=t.normalize("NFD").replace(/\p{Diacritic}/gu,"").normalize(),t}const y7e=[["&"," and "],["🦄"," unicorn "],["♥"," love "]],b7e=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"),w7e=(t,e)=>{const n=T2(e);return t.replace(new RegExp(`${n}{2,}`,"g"),e).replace(new RegExp(`^${n}|${n}$`,"g"),"")},k7e=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+=T2(n)}return new RegExp(`[^${e}]+`,"g")};function C7e(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([...y7e,...e.customReplacements]);t=_7e(t,{customReplacements:s}),e.decamelize&&(t=b7e(t));const o=k7e(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=w7e(t,e.separator)),n&&(t=`_${t}`),i&&(t=`${t}-`),t}function x7e(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=st.empty,h=s.index(-1)?1:s.index(-2)?2:3;for(let b=s.depth-h;b>=s.depth-3;b--)d=st.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(st.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(Ut.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 cg(c.doc,s.pos,2,u)?(i&&i(c.split(s.pos,2,u).scrollIntoView()),!0):!1}}function vz(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?S7e(e,n,t,o):$7e(e,n,o):!0:!1}}function S7e(t,e,n,i){let s=t.tr,o=i.end,r=i.$to.end(i.depth);o<r&&(s.step(new Ti(o-1,r,o,r,new rt(st.from(n.create(null,i.parent.copy())),1,0),1,!0)),i=new iN(s.doc.resolve(i.$from.pos),s.doc.resolve(r),i.depth));const a=y2(i);if(a==null)return!1;s.lift(i,a);let l=s.mapping.map(o,-1)-1;return b2(s.doc,l)&&s.join(l),e(s.scrollIntoView()),!0}function $7e(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?st.empty:st.from(s))))return!1;let d=o.pos,h=d+r.nodeSize;return i.step(new Ti(d-(a?1:0),h+(l?1:0),d+1,h-1,new rt((a?st.empty:st.from(s.copy(st.empty))).append(l?st.empty:st.from(s.copy(st.empty))),a?0:1,l?0:1),a?0:1)),e(i.scrollIntoView()),!0}function A7e(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=st.from(c?t.create():null),d=new rt(st.from(t.create(null,st.from(a.type.create(null,u)))),c?3:1,0),h=o.start,f=o.end;n(e.tr.step(new Ti(h-(c?3:1),f,h,f,d,1,!0)).scrollIntoView())}return!0}}function E7e(t){const e=new Map;if(!t||!t.type)throw new Error("mdast-util-definitions expected node");return qd(t,"definition",function(i){const s=OM(i.identifier);s&&!e.get(s)&&e.set(s,i)}),n;function n(i){const s=OM(i);return e.get(s)}}function OM(t){return String(t||"").toUpperCase()}function M7e(){return function(t){const e=E7e(t);qd(t,function(n,i,s){if(n.type==="definition"&&s!==void 0&&typeof i=="number")return s.children.splice(i,1),[YC,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},[YC,i]}})}}function _z(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(st.fromArray(i))}function Ve(t,e){return Object.assign(t,{meta:{package:"@milkdown/preset-commonmark",...e}}),t}const f5=rv("emphasis");Ve(f5,{displayName:"Attr<emphasis>",group:"Emphasis"});const Xd=ov("emphasis",t=>({attrs:{marker:{default:t.get(hg).emphasis||"*"}},parseDOM:[{tag:"i"},{tag:"em"},{style:"font-style",getAttrs:e=>e==="italic"}],toDOM:e=>["em",t.get(f5.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(Xd.mark,{displayName:"MarkSchema<emphasis>",group:"Emphasis"});Ve(Xd.ctx,{displayName:"MarkSchemaCtx<emphasis>",group:"Emphasis"});const P2=on("ToggleEmphasis",t=>()=>S2(Xd.type(t)));Ve(P2,{displayName:"Command<toggleEmphasisCommand>",group:"Emphasis"});const yz=wo(t=>tv(/(?:^|[^*])\*([^*]+)\*$/,Xd.type(t),{getAttr:()=>({marker:"*"}),updateCaptured:({fullMatch:e,start:n})=>e.startsWith("*")?{}:{fullMatch:e.slice(1),start:n+1}}));Ve(yz,{displayName:"InputRule<emphasis>|Star",group:"Emphasis"});const bz=wo(t=>tv(/(?:^|[^_])_([^_]+)_$/,Xd.type(t),{getAttr:()=>({marker:"_"}),updateCaptured:({fullMatch:e,start:n})=>e.startsWith("_")?{}:{fullMatch:e.slice(1),start:n+1}}));Ve(bz,{displayName:"InputRule<emphasis>|Underscore",group:"Emphasis"});const p5=ko("emphasisKeymap",{ToggleEmphasis:{shortcuts:"Mod-i",command:t=>{const e=t.get(gn);return()=>e.call(P2.key)}}});Ve(p5.ctx,{displayName:"KeymapCtx<emphasis>",group:"Emphasis"});Ve(p5.shortcuts,{displayName:"Keymap<emphasis>",group:"Emphasis"});const m5=rv("strong");Ve(m5,{displayName:"Attr<strong>",group:"Strong"});const vp=ov("strong",t=>({attrs:{marker:{default:t.get(hg).strong||"*"}},parseDOM:[{tag:"b"},{tag:"strong"},{style:"font-style",getAttrs:e=>e==="bold"}],toDOM:e=>["strong",t.get(m5.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(vp.mark,{displayName:"MarkSchema<strong>",group:"Strong"});Ve(vp.ctx,{displayName:"MarkSchemaCtx<strong>",group:"Strong"});const I2=on("ToggleStrong",t=>()=>S2(vp.type(t)));Ve(I2,{displayName:"Command<toggleStrongCommand>",group:"Strong"});const wz=wo(t=>tv(/(?:\*\*|__)([^*_]+)(?:\*\*|__)$/,vp.type(t),{getAttr:e=>({marker:e[0].startsWith("*")?"*":"_"})}));Ve(wz,{displayName:"InputRule<strong>",group:"Strong"});const g5=ko("strongKeymap",{ToggleBold:{shortcuts:["Mod-b"],command:t=>{const e=t.get(gn);return()=>e.call(I2.key)}}});Ve(g5.ctx,{displayName:"KeymapCtx<strong>",group:"Strong"});Ve(g5.shortcuts,{displayName:"Keymap<strong>",group:"Strong"});const v5=rv("inlineCode");Ve(v5,{displayName:"Attr<inlineCode>",group:"InlineCode"});const ll=ov("inlineCode",t=>({priority:100,code:!0,inclusive:!1,parseDOM:[{tag:"code"}],toDOM:e=>["code",t.get(v5.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(ll.mark,{displayName:"MarkSchema<inlineCode>",group:"InlineCode"});Ve(ll.ctx,{displayName:"MarkSchemaCtx<inlineCode>",group:"InlineCode"});const L2=on("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,ll.type(t))?(n==null||n(s.removeMark(o,r,ll.type(t))),!0):(Object.keys(e.schema.marks).filter(a=>a!==ll.type.name).map(a=>e.schema.marks[a]).forEach(a=>{s.removeMark(o,r,a)}),n==null||n(s.addMark(o,r,ll.type(t).create())),!0)});Ve(L2,{displayName:"Command<toggleInlineCodeCommand>",group:"InlineCode"});const kz=wo(t=>tv(/(?:\`)([^\`]+)(?:\`)$/,ll.type(t)));Ve(kz,{displayName:"InputRule<inlineCodeInputRule>",group:"InlineCode"});const _5=ko("inlineCodeKeymap",{ToggleInlineCode:{shortcuts:"Mod-e",command:t=>{const e=t.get(gn);return()=>e.call(L2.key)}}});Ve(_5.ctx,{displayName:"KeymapCtx<inlineCode>",group:"InlineCode"});Ve(_5.shortcuts,{displayName:"Keymap<inlineCode>",group:"InlineCode"});const y5=rv("link");Ve(y5,{displayName:"Attr<link>",group:"Link"});const Yr=ov("link",t=>({attrs:{href:{},title:{default:null}},parseDOM:[{tag:"a[href]",getAttrs:e=>{if(!(e instanceof HTMLElement))throw ra(e);return{href:e.getAttribute("href"),title:e.getAttribute("title")}}}],toDOM:e=>["a",{...t.get(y5.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(Yr.mark,{displayName:"MarkSchema<link>",group:"Link"});const Cz=on("ToggleLink",t=>(e={})=>S2(Yr.type(t),e));Ve(Cz,{displayName:"Command<toggleLinkCommand>",group:"Link"});const xz=on("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(Yr.type(t).isInSet(p.marks))return s=p,o=m,!1}),!s)return!1;const c=s.marks.find(({type:p})=>p===Yr.type(t));if(!c)return!1;const u=o,d=o+s.nodeSize,{tr:h}=n,f=Yr.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(xz,{displayName:"Command<updateLinkCommand>",group:"Link"});const Sz=h5("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(Sz,{displayName:"NodeSchema<doc>",group:"Doc"});const b5=aa("paragraph");Ve(b5,{displayName:"Attr<paragraph>",group:"Paragraph"});const Ol=zs("paragraph",t=>({content:"inline*",group:"block",parseDOM:[{tag:"p"}],toDOM:e=>["p",t.get(b5.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"),_z(e,n),e.closeNode()}}}));Ve(Ol.node,{displayName:"NodeSchema<paragraph>",group:"Paragraph"});Ve(Ol.ctx,{displayName:"NodeSchemaCtx<paragraph>",group:"Paragraph"});const w5=on("TurnIntoText",t=>()=>l1(Ol.type(t)));Ve(w5,{displayName:"Command<turnIntoTextCommand>",group:"Paragraph"});const k5=ko("paragraphKeymap",{TurnIntoText:{shortcuts:"Mod-Alt-0",command:t=>{const e=t.get(gn);return()=>e.call(w5.key)}}});Ve(k5.ctx,{displayName:"KeymapCtx<paragraph>",group:"Paragraph"});Ve(k5.shortcuts,{displayName:"Keymap<paragraph>",group:"Paragraph"});const T7e=Array(6).fill(0).map((t,e)=>e+1);function P7e(t){return C7e(t.textContent)}const O2=ms(P7e,"headingIdGenerator");Ve(O2,{displayName:"Ctx<HeadingIdGenerator>",group:"Heading"});const C5=aa("heading");Ve(C5,{displayName:"Attr<heading>",group:"Heading"});const $a=zs("heading",t=>{const e=t.get(O2.key);return{content:"inline*",group:"block",defining:!0,attrs:{id:{default:""},level:{default:1}},parseDOM:T7e.map(n=>({tag:`h${n}`,getAttrs:i=>{if(!(i instanceof HTMLElement))throw ra(i);return{level:n,id:i.id}}})),toDOM:n=>[`h${n.attrs.level}`,{...t.get(C5.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}),_z(n,i),n.closeNode()}}}});Ve($a.node,{displayName:"NodeSchema<heading>",group:"Heading"});Ve($a.ctx,{displayName:"NodeSchemaCtx<heading>",group:"Heading"});const $z=wo(t=>cB(/^(?<hashes>#+)\s$/,$a.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($z,{displayName:"InputRule<wrapInHeadingInputRule>",group:"Heading"});const fc=on("WrapInHeading",t=>e=>(e??(e=1),e<1?l1(Ol.type(t)):l1($a.type(t),{level:e})));Ve(fc,{displayName:"Command<wrapInHeadingCommand>",group:"Heading"});const x5=on("DowngradeHeading",t=>()=>(e,n,i)=>{const{$from:s}=e.selection,o=s.node();if(o.type!==$a.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):l1(Ol.type(t))(e,n,i)});Ve(x5,{displayName:"Command<downgradeHeadingCommand>",group:"Heading"});const S5=ko("headingKeymap",{TurnIntoH1:{shortcuts:"Mod-Alt-1",command:t=>{const e=t.get(gn);return()=>e.call(fc.key,1)}},TurnIntoH2:{shortcuts:"Mod-Alt-2",command:t=>{const e=t.get(gn);return()=>e.call(fc.key,2)}},TurnIntoH3:{shortcuts:"Mod-Alt-3",command:t=>{const e=t.get(gn);return()=>e.call(fc.key,3)}},TurnIntoH4:{shortcuts:"Mod-Alt-4",command:t=>{const e=t.get(gn);return()=>e.call(fc.key,4)}},TurnIntoH5:{shortcuts:"Mod-Alt-5",command:t=>{const e=t.get(gn);return()=>e.call(fc.key,5)}},TurnIntoH6:{shortcuts:"Mod-Alt-6",command:t=>{const e=t.get(gn);return()=>e.call(fc.key,6)}},DowngradeHeading:{shortcuts:["Delete","Backspace"],command:t=>{const e=t.get(gn);return()=>e.call(x5.key)}}});Ve(S5.ctx,{displayName:"KeymapCtx<heading>",group:"Heading"});Ve(S5.shortcuts,{displayName:"Keymap<heading>",group:"Heading"});const $5=aa("blockquote");Ve($5,{displayName:"Attr<blockquote>",group:"Blockquote"});const _p=zs("blockquote",t=>({content:"block+",group:"block",defining:!0,parseDOM:[{tag:"blockquote"}],toDOM:e=>["blockquote",t.get($5.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(_p.node,{displayName:"NodeSchema<blockquote>",group:"Blockquote"});Ve(_p.ctx,{displayName:"NodeSchemaCtx<blockquote>",group:"Blockquote"});const Az=wo(t=>J8(/^\s*>\s$/,_p.type(t)));Ve(Az,{displayName:"InputRule<wrapInBlockquoteInputRule>",group:"Blockquote"});const A5=on("WrapInBlockquote",t=>()=>s5(_p.type(t)));Ve(A5,{displayName:"Command<wrapInBlockquoteCommand>",group:"Blockquote"});const E5=ko("blockquoteKeymap",{WrapInBlockquote:{shortcuts:"Mod-Shift-b",command:t=>{const e=t.get(gn);return()=>e.call(A5.key)}}});Ve(E5.ctx,{displayName:"KeymapCtx<blockquote>",group:"Blockquote"});Ve(E5.shortcuts,{displayName:"Keymap<blockquote>",group:"Blockquote"});const M5=aa("codeBlock",()=>({pre:{},code:{}}));Ve(M5,{displayName:"Attr<codeBlock>",group:"CodeBlock"});const yp=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 ra(e);return{language:e.dataset.language}}}],toDOM:e=>{const n=t.get(M5.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(yp.node,{displayName:"NodeSchema<codeBlock>",group:"CodeBlock"});Ve(yp.ctx,{displayName:"NodeSchemaCtx<codeBlock>",group:"CodeBlock"});const Ez=wo(t=>cB(/^```(?<language>[a-z]*)?[\s\n]$/,yp.type(t),e=>{var n;return{language:((n=e.groups)==null?void 0:n.language)??""}}));Ve(Ez,{displayName:"InputRule<createCodeBlockInputRule>",group:"CodeBlock"});const T5=on("CreateCodeBlock",t=>(e="")=>l1(yp.type(t),{language:e}));Ve(T5,{displayName:"Command<createCodeBlockCommand>",group:"CodeBlock"});const I7e=on("UpdateCodeBlockLanguage",()=>({pos:t,language:e}={pos:-1,language:""})=>(n,i)=>t>=0?(i==null||i(n.tr.setNodeAttribute(t,"language",e)),!0):!1);Ve(I7e,{displayName:"Command<updateCodeBlockLanguageCommand>",group:"CodeBlock"});const P5=ko("codeBlockKeymap",{CreateCodeBlock:{shortcuts:"Mod-Alt-c",command:t=>{const e=t.get(gn);return()=>e.call(T5.key)}}});Ve(P5.ctx,{displayName:"KeymapCtx<codeBlock>",group:"CodeBlock"});Ve(P5.shortcuts,{displayName:"Keymap<codeBlock>",group:"CodeBlock"});const I5=aa("image");Ve(I5,{displayName:"Attr<image>",group:"Image"});const Kd=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 ra(e);return{src:e.getAttribute("src")||"",alt:e.getAttribute("alt")||"",title:e.getAttribute("title")||e.getAttribute("alt")||""}}}],toDOM:e=>["img",{...t.get(I5.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(Kd.node,{displayName:"NodeSchema<image>",group:"Image"});Ve(Kd.ctx,{displayName:"NodeSchemaCtx<image>",group:"Image"});const Mz=on("InsertImage",t=>(e={})=>(n,i)=>{if(!i)return!0;const{src:s="",alt:o="",title:r=""}=e,a=Kd.type(t).create({src:s,alt:o,title:r});return a&&i(n.tr.replaceSelectionWith(a).scrollIntoView()),!0});Ve(Mz,{displayName:"Command<insertImageCommand>",group:"Image"});const Tz=on("UpdateImage",t=>(e={})=>(n,i)=>{const s=q5e(n.selection,Kd.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(Tz,{displayName:"Command<updateImageCommand>",group:"Image"});const L7e=wo(t=>new Go(/!\[(?<alt>.*?)]\((?<filename>.*?)\s*(?="|\))"?(?<title>[^"]+)?"?\)/,(e,n,i,s)=>{const[o,r,a="",l]=n;return o?e.tr.replaceWith(i,s,Kd.type(t).create({src:a,alt:r,title:l})):null}));Ve(L7e,{displayName:"InputRule<insertImageInputRule>",group:"Image"});const qy=aa("hardbreak",t=>({"data-type":"hardbreak","data-is-inline":t.attrs.isInline}));Ve(qy,{displayName:"Attr<hardbreak>",group:"Hardbreak"});const ad=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(qy.key)(e)," "]:["br",t.get(qy.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:()=>` | |
| 125 | 124 | `,toMarkdown:{match:e=>e.type.name==="hardbreak",runner:(e,n)=>{n.attrs.isInline?e.addNode("text",void 0,` |
| 126 | -`):e.addNode("break")}}}));De(Du.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"});De(Du.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});const A8=Gt("InsertHardbreak",t=>()=>(e,n)=>{var s;const{selection:i,tr:o}=e;if(!(i instanceof St))return!1;if(i.empty){const r=i.$from.node();if(r.childCount>0&&((s=r.lastChild)==null?void 0:s.type.name)==="hardbreak")return n==null||n(o.replaceRangeWith(i.to-1,i.to,e.schema.node("paragraph")).setSelection(Ot.near(o.doc.resolve(i.to))).scrollIntoView()),!0}return n==null||n(o.setMeta("hardbreak",!0).replaceSelectionWith(Du.type(t).create()).scrollIntoView()),!0});De(A8,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});const M8=so("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:t=>{const e=t.get(cn);return()=>e.call(A8.key)}}});De(M8.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"});De(M8.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});const E8=jr("hr");De(E8,{displayName:"Attr<hr>",group:"Hr"});const C1=$s("hr",t=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:e=>["hr",t.get(E8.key)(e)],parseMarkdown:{match:({type:e})=>e==="thematicBreak",runner:(e,n,s)=>{e.addNode(s)}},toMarkdown:{match:e=>e.type.name==="hr",runner:e=>{e.addNode("thematicBreak")}}}));De(C1.node,{displayName:"NodeSchema<hr>",group:"Hr"});De(C1.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});const yB=no(t=>new to(/^(?:---|___\s|\*\*\*\s)$/,(e,n,s,i)=>{const{tr:o}=e;return n[0]&&o.replaceWith(s-1,i,C1.type(t).create()),o}));De(yB,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});const bB=Gt("InsertHr",t=>()=>(e,n)=>{if(!n)return!0;const s=dl.node.type(t).create(),{tr:i,selection:o}=e,{from:r}=o,a=C1.type(t).create();if(!a)return!0;const l=i.replaceSelectionWith(a).insert(r,s),c=Ot.findFrom(l.doc.resolve(r),1,!0);return c&&n(l.setSelection(c).scrollIntoView()),!0});De(bB,{displayName:"Command<insertHrCommand>",group:"Hr"});const T8=jr("bulletList");De(T8,{displayName:"Attr<bulletList>",group:"BulletList"});const kd=$s("bullet_list",t=>({content:"listItem+",group:"block",attrs:{spread:{default:!1}},parseDOM:[{tag:"ul",getAttrs:e=>{if(!(e instanceof HTMLElement))throw Ur(e);return{spread:e.dataset.spread}}}],toDOM:e=>["ul",{...t.get(T8.key)(e),"data-spread":e.attrs.spread},0],parseMarkdown:{match:({type:e,ordered:n})=>e==="list"&&!n,runner:(e,n,s)=>{const i=n.spread!=null?`${n.spread}`:"false";e.openNode(s,{spread:i}).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()}}}));De(kd.node,{displayName:"NodeSchema<bulletList>",group:"BulletList"});De(kd.ctx,{displayName:"NodeSchemaCtx<bulletList>",group:"BulletList"});const wB=no(t=>Y4(/^\s*([-+*])\s$/,kd.type(t)));De(wB,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});const P8=Gt("WrapInBulletList",t=>()=>Z4(kd.type(t)));De(P8,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});const I8=so("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:t=>{const e=t.get(cn);return()=>e.call(P8.key)}}});De(I8.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"});De(I8.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});const L8=jr("orderedList");De(L8,{displayName:"Attr<orderedList>",group:"OrderedList"});const xd=$s("ordered_list",t=>({content:"listItem+",group:"block",attrs:{order:{default:1},spread:{default:!1}},parseDOM:[{tag:"ol",getAttrs:e=>{if(!(e instanceof HTMLElement))throw Ur(e);return{spread:e.dataset.spread,order:e.hasAttribute("start")?Number(e.getAttribute("start")):1}}}],toDOM:e=>["ol",{...t.get(L8.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,s)=>{const i=n.spread!=null?`${n.spread}`:"true";e.openNode(s,{spread:i}).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()}}}));De(xd.node,{displayName:"NodeSchema<orderedList>",group:"OrderedList"});De(xd.ctx,{displayName:"NodeSchemaCtx<orderedList>",group:"OrderedList"});const CB=no(t=>Y4(/^\s*(\d+)\.\s$/,xd.type(t),e=>({order:Number(e[1])}),(e,n)=>n.childCount+n.attrs.order===Number(e[1])));De(CB,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});const O8=Gt("WrapInOrderedList",t=>()=>Z4(xd.type(t)));De(O8,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});const D8=so("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:t=>{const e=t.get(cn);return()=>e.call(O8.key)}}});De(D8.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"});De(D8.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});const R8=jr("listItem");De(R8,{displayName:"Attr<listItem>",group:"ListItem"});const ga=$s("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 Ur(e);return{label:e.dataset.label,listType:e.dataset.listType,spread:e.dataset.spread}}}],toDOM:e=>["li",{...t.get(R8.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,s)=>{const i=n.label!=null?`${n.label}.`:"•",o=n.label!=null?"ordered":"bullet",r=n.spread!=null?`${n.spread}`:"true";e.openNode(s,{label:i,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()}}}));De(ga.node,{displayName:"NodeSchema<listItem>",group:"ListItem"});De(ga.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});const V8=Gt("SinkListItem",t=>()=>J5e(ga.type(t)));De(V8,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});const F8=Gt("LiftListItem",t=>()=>oB(ga.type(t)));De(F8,{displayName:"Command<liftListItemCommand>",group:"ListItem"});const N8=Gt("SplitListItem",t=>()=>X5e(ga.type(t)));De(N8,{displayName:"Command<splitListItemCommand>",group:"ListItem"});function oSe(t){return(e,n,s)=>{const{selection:i}=e;if(!(i instanceof St))return!1;const{empty:o,$from:r}=i;if(!o||r.parentOffset!==0)return!1;const a=r.node(-1);return a.type!==ga.type(t)||a.firstChild!==r.node()||r.node(-2).childCount>1?!1:oB(ga.type(t))(e,n,s)}}const B8=Gt("LiftFirstListItem",t=>()=>oSe(t));De(B8,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});const z8=so("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:t=>{const e=t.get(cn);return()=>e.call(N8.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:t=>{const e=t.get(cn);return()=>e.call(V8.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:t=>{const e=t.get(cn);return()=>e.call(F8.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:t=>{const e=t.get(cn);return()=>e.call(B8.key)}}});De(z8.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"});De(z8.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});const kB=r8("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)}}}));De(kB,{displayName:"NodeSchema<text>",group:"Text"});const H8=jr("html");De(H8,{displayName:"Attr<html>",group:"Html"});const U8=$s("html",t=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:""}},toDOM:e=>{const n=document.createElement("span"),s={...t.get(H8.key)(e),"data-value":e.attrs.value,"data-type":"html"};return n.textContent=e.attrs.value,["span",s,e.attrs.value]},parseDOM:[{tag:'span[data-type="html"]',getAttrs:e=>({value:e.dataset.value??""})}],parseMarkdown:{match:({type:e})=>e==="html",runner:(e,n,s)=>{e.addNode(s,{value:n.value})}},toMarkdown:{match:e=>e.type.name==="html",runner:(e,n)=>{e.addNode("html",void 0,n.attrs.value)}}}));De(U8.node,{displayName:"NodeSchema<html>",group:"Html"});De(U8.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});const rSe=[fB,p8,dl,zb,v8,la,iy,Du,b8,Uf,k8,jf,E8,C1,$8,Cd,T8,kd,L8,xd,R8,ga,a8,wd,c8,Hf,d8,Ka,f8,Ar,H8,U8,kB].flat(),aSe=[mB,wB,CB,gB,yB,pB].flat(),lSe=[aB,lB,uB,cB],cSe=[m8,w8,Ul,_8,x8,A8,bB,vB,_B,O8,P8,V8,N8,F8,B8,Fb,Bb,Nb,dB,hB],uSe=[C8,S8,M8,y8,z8,D8,I8,g8,l8,h8,u8].flat(),j8=bd("remarkAddOrderInList",()=>()=>t=>{yd(t,"list",e=>{if(e.ordered){const n=e.start??1;e.children.forEach((s,i)=>{s.label=i+n})}})});De(j8.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"});De(j8.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});const W8=bd("remarkLineBreak",()=>()=>t=>{const e=/[\t ]*(?:\r?\n|\r)/g;yd(t,"text",(n,s,i)=>{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&&i&&typeof s=="number")return r<n.value.length&&o.push({type:"text",value:n.value.slice(r)}),i.children.splice(s,1,...o),s+o.length})});De(W8.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"});De(W8.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});const Y8=bd("remarkInlineLink",()=>eSe);De(Y8.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"});De(Y8.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});const dSe=t=>!!t.children,hSe=t=>t.type==="html";function fSe(t,e){return n(t,0,null)[0];function n(s,i,o){if(dSe(s)){const r=[];for(let a=0,l=s.children.length;a<l;a++){const c=s.children[a];if(c){const u=n(c,a,s);if(u)for(let d=0,h=u.length;d<h;d++){const f=u[d];f&&r.push(f)}}}s.children=r}return e(s,i,o)}}const G8=bd("remarkHTMLTransformer",()=>()=>t=>{fSe(t,(e,n,s)=>hSe(e)?((s==null?void 0:s.type)==="root"&&(e.children=[{...e}],delete e.value,e.type="paragraph"),[e]):[e])});De(G8.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"});De(G8.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});const q8=bd("remarkMarker",()=>()=>(t,e)=>{const n=s=>e.value.charAt(s.position.start.offset);yd(t,s=>["strong","emphasis"].includes(s.type),s=>{s.marker=n(s)})});De(q8.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"});De(q8.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});const xB=vs(()=>{let t=!1;const e=new Kn("MILKDOWN_INLINE_NODES_CURSOR"),n=new Yn({key:e,state:{init(){return!1},apply(s){if(!s.selection.empty)return!1;const i=s.selection.$from,o=i.nodeBefore,r=i.nodeAfter;return!!(o&&r&&o.isInline&&!o.isText&&r.isInline&&!r.isText)}},props:{handleDOMEvents:{compositionend:(s,i)=>t?(t=!1,requestAnimationFrame(()=>{if(n.getState(s.state)){const o=s.state.selection.from;i.preventDefault(),s.dispatch(s.state.tr.insertText(i.data||"",o))}}),!0):!1,compositionstart:s=>(n.getState(s.state)&&(t=!0),!1),beforeinput:(s,i)=>{if(n.getState(s.state)&&i instanceof InputEvent&&i.data&&!t){const o=s.state.selection.from;return i.preventDefault(),s.dispatch(s.state.tr.insertText(i.data||"",o)),!0}return!1}},decorations(s){if(n.getState(s)){const i=s.selection.$from.pos,o=document.createElement("span"),r=ws.widget(i,o,{side:-1}),a=document.createElement("span"),l=ws.widget(i,a);return setTimeout(()=>{o.contentEditable="true",a.contentEditable="true"}),Nn.create(s.doc,[r,l])}return Nn.empty}}});return n});De(xB,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});const SB=vs(t=>new Yn({key:new Kn("MILKDOWN_HARDBREAK_MARKS"),appendTransaction:(e,n,s)=>{if(!e.length)return;const[i]=e;if(!i)return;const[o]=i.steps;if(i.getMeta("hardbreak")){if(!(o instanceof Fs))return;const{from:r}=o;return s.tr.setNodeMarkup(r,Du.type(t),void 0,[])}if(o instanceof Xa){let r=s.tr;const{from:a,to:l}=o;return s.doc.nodesBetween(a,l,(c,u)=>{c.type===Du.type(t)&&(r=r.setNodeMarkup(u,Du.type(t),void 0,[]))}),r}}}));De(SB,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});const X8=es(["table","code_block"],"hardbreakFilterNodes");De(X8,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});const $B=vs(t=>{const e=t.get(X8.key);return new Yn({key:new Kn("MILKDOWN_HARDBREAK_FILTER"),filterTransaction:(n,s)=>{const i=n.getMeta("hardbreak"),[o]=n.steps;if(i&&o){const{from:r}=o,a=s.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}})});De($B,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});const AB=vs(t=>{const e=new Kn("MILKDOWN_HEADING_ID"),n=s=>{if(s.composing)return;const i=t.get(zb.key),o=s.state.tr.setMeta("addToHistory",!1);let r=!1;s.state.doc.descendants((a,l)=>{if(a.type===la.type(t)){if(a.textContent.trim().length===0)return;const c=a.attrs,u=i(a);c.id!==u&&(r=!0,o.setMeta(e,!0).setNodeMarkup(l,void 0,{...c,id:u}))}}),r&&s.dispatch(o)};return new Yn({key:e,view:s=>(n(s),{update:(i,o)=>{i.state.doc.eq(o.doc)||n(i)}})})});De(AB,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});const MB=vs(t=>{const e=n=>{if(n.composing||!n.editable)return;const s=xd.type(t),i=kd.type(t),o=ga.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===i){const p=u.maybeChild(0);(p==null?void 0:p.type)===o&&p.attrs.listType==="ordered"&&(c=!0,l.setNodeMarkup(d,s,{spread:"true"}),u.descendants((m,b,y,C)=>{if(m.type===o){const k={...m.attrs};a(k,C)&&(l=l.setNodeMarkup(b,void 0,k))}return!1}))}else if(u.type===o&&(h==null?void 0:h.type)===s){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 Yn({key:new Kn("MILKDOWN_KEEP_LIST_ORDER"),view:n=>(e(n),{update:s=>{e(s)}})})});De(MB,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});const pSe=[SB,X8,$B,xB,j8,Y8,W8,G8,q8,AB,MB].flat(),mSe=[rSe,aSe,lSe,cSe,uSe,pSe].flat();var CC,kC;if(typeof WeakMap<"u"){let t=new WeakMap;CC=e=>t.get(e),kC=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;CC=s=>{for(let i=0;i<t.length;i+=2)if(t[i]==s)return t[i+1]},kC=(s,i)=>(n==10&&(n=0),t[n++]=s,t[n++]=i)}var Cn=class{constructor(t,e,n,s){this.width=t,this.height=e,this.map=n,this.problems=s}findCell(t){for(let e=0;e<this.map.length;e++){const n=this.map[e];if(n!=t)continue;const s=e%this.width,i=e/this.width|0;let o=s+1,r=i+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:s,top:i,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:s,right:i,top:o,bottom:r}=this.findCell(t);return e=="horiz"?(n<0?s==0:i==this.width)?null:this.map[o*this.width+(n<0?s-1:i)]:(n<0?o==0:r==this.height)?null:this.map[s+this.width*(n<0?o-1:r)]}rectBetween(t,e){const{left:n,right:s,top:i,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(i,l),right:Math.max(s,a),bottom:Math.max(o,c)}}cellsInRect(t){const e=[],n={};for(let s=t.top;s<t.bottom;s++)for(let i=t.left;i<t.right;i++){const o=s*this.width+i,r=this.map[o];n[r]||(n[r]=!0,!(i==t.left&&i&&this.map[o-1]==r||s==t.top&&s&&this.map[o-this.width]==r)&&e.push(r))}return e}positionAt(t,e,n){for(let s=0,i=0;;s++){const o=i+n.child(s).nodeSize;if(s==t){let r=e+t*this.width;const a=(t+1)*this.width;for(;r<a&&this.map[r]<i;)r++;return r==a?o-1:this.map[r]}i=o}}static get(t){return CC(t)||kC(t,gSe(t))}};function gSe(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=vSe(t),n=t.childCount,s=[];let i=0,o=null;const r=[];for(let c=0,u=e*n;c<u;c++)s[c]=0;for(let c=0,u=0;c<n;c++){const d=t.child(c);u++;for(let p=0;;p++){for(;i<s.length&&s[i]!=0;)i++;if(p==d.childCount)break;const m=d.child(p),{colspan:b,rowspan:y,colwidth:C}=m.attrs;for(let k=0;k<y;k++){if(k+c>=n){(o||(o=[])).push({type:"overlong_rowspan",pos:u,n:y-k});break}const x=i+k*e;for(let S=0;S<b;S++){s[x+S]==0?s[x+S]=u:(o||(o=[])).push({type:"collision",row:c,pos:u,n:b-S});const E=C&&C[S];if(E){const T=(x+S)%e*2,P=r[T];P==null||P!=E&&r[T+1]==1?(r[T]=E,r[T+1]=1):P==E&&r[T+1]++}}}i+=b,u+=m.nodeSize}const h=(c+1)*e;let f=0;for(;i<h;)s[i++]==0&&f++;f&&(o||(o=[])).push({type:"missing",row:c,n:f}),u++}const a=new Cn(e,n,s,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&&_Se(a,r,t),a}function vSe(t){let e=-1,n=!1;for(let s=0;s<t.childCount;s++){const i=t.child(s);let o=0;if(n)for(let r=0;r<s;r++){const a=t.child(r);for(let l=0;l<a.childCount;l++){const c=a.child(l);r+c.attrs.rowspan>s&&(o+=c.attrs.colspan)}}for(let r=0;r<i.childCount;r++){const a=i.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 _Se(t,e,n){t.problems||(t.problems=[]);const s={};for(let i=0;i<t.map.length;i++){const o=t.map[i];if(s[o])continue;s[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=(i+c)%t.width,d=e[u*2];d!=null&&(!l.colwidth||l.colwidth[c]!=d)&&((a||(a=ySe(l)))[c]=d)}a&&t.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}function ySe(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function NM(t,e){if(typeof t=="string")return{};const n=t.getAttribute("data-colwidth"),s=n&&/^\d+(,\d+)*$/.test(n)?n.split(",").map(r=>Number(r)):null,i=Number(t.getAttribute("colspan")||1),o={colspan:i,rowspan:Number(t.getAttribute("rowspan")||1),colwidth:s&&s.length==i?s:null};for(const r in e){const a=e[r].getFromDOM,l=a&&a(t);l!=null&&(o[r]=l)}return o}function BM(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 s in e){const i=e[s].setDOMAttr;i&&i(t.attrs[s],n)}return n}function bSe(t){const e=t.cellAttributes||{},n={colspan:{default:1},rowspan:{default:1},colwidth:{default:null}};for(const s in e)n[s]={default:e[s].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:s=>NM(s,e)}],toDOM(s){return["td",BM(s,e),0]}},table_header:{content:t.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:s=>NM(s,e)}],toDOM(s){return["th",BM(s,e),0]}}}}function nr(t){let e=t.cached.tableNodeTypes;if(!e){e=t.cached.tableNodeTypes={};for(const n in t.nodes){const s=t.nodes[n],i=s.spec.tableRole;i&&(e[i]=s)}}return e}var ql=new Kn("selectingCells");function k1(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 rr(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 Hb(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=k1(e.$head)||wSe(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function wSe(t){for(let e=t.nodeAfter,n=t.pos;e;e=e.firstChild,n++){const s=e.type.spec.tableRole;if(s=="cell"||s=="header_cell")return t.doc.resolve(n)}for(let e=t.nodeBefore,n=t.pos;e;e=e.lastChild,n--){const s=e.type.spec.tableRole;if(s=="cell"||s=="header_cell")return t.doc.resolve(n-e.nodeSize)}}function xC(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function CSe(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function K8(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function EB(t,e,n){const s=t.node(-1),i=Cn.get(s),o=t.start(-1),r=i.nextCell(t.pos-o,e,n);return r==null?null:t.node(0).resolve(o+r)}function Qu(t,e,n=1){const s={...t,colspan:t.colspan-n};return s.colwidth&&(s.colwidth=s.colwidth.slice(),s.colwidth.splice(e,n),s.colwidth.some(i=>i>0)||(s.colwidth=null)),s}function kSe(t,e,n=1){const s={...t,colspan:t.colspan+n};if(s.colwidth){s.colwidth=s.colwidth.slice();for(let i=0;i<n;i++)s.colwidth.splice(e,0,0)}return s}function xSe(t,e,n){const s=nr(e.type.schema).header_cell;for(let i=0;i<t.height;i++)if(e.nodeAt(t.map[n+i*t.width]).type!=s)return!1;return!0}var Wn=class Va extends Ot{constructor(e,n=e){const s=e.node(-1),i=Cn.get(s),o=e.start(-1),r=i.rectBetween(e.pos-o,n.pos-o),a=e.node(0),l=i.cellsInRect(r).filter(u=>u!=n.pos-o);l.unshift(n.pos-o);const c=l.map(u=>{const d=s.nodeAt(u);if(!d)throw RangeError(`No cell with offset ${u} found`);const h=o+u+1;return new J_(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 s=e.resolve(n.map(this.$anchorCell.pos)),i=e.resolve(n.map(this.$headCell.pos));if(xC(s)&&xC(i)&&K8(s,i)){const o=this.$anchorCell.node(-1)!=s.node(-1);return o&&this.isRowSelection()?Va.rowSelection(s,i):o&&this.isColSelection()?Va.colSelection(s,i):new Va(s,i)}return St.between(s,i)}content(){const e=this.$anchorCell.node(-1),n=Cn.get(e),s=this.$anchorCell.start(-1),i=n.rectBetween(this.$anchorCell.pos-s,this.$headCell.pos-s),o={},r=[];for(let l=i.top;l<i.bottom;l++){const c=[];for(let u=l*n.width+i.left,d=i.left;d<i.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=i.left-f.left,b=f.right-i.right;if(m>0||b>0){let y=p.attrs;if(m>0&&(y=Qu(y,0,m)),b>0&&(y=Qu(y,y.colspan-b,b)),f.left<i.left){if(p=p.type.createAndFill(y),!p)throw RangeError(`Could not create cell with attrs ${JSON.stringify(y)}`)}else p=p.type.create(y,p.content)}if(f.top<i.top||f.bottom>i.bottom){const y={...p.attrs,rowspan:Math.min(f.bottom,i.bottom)-Math.max(f.top,i.top)};f.top<i.top?p=p.type.createAndFill(y):p=p.type.create(y,p.content)}c.push(p)}r.push(e.child(l).copy(et.from(c)))}const a=this.isColSelection()&&this.isRowSelection()?e:r;return new it(et.from(a),1,1)}replace(e,n=it.empty){const s=e.steps.length,i=this.ranges;for(let r=0;r<i.length;r++){const{$from:a,$to:l}=i[r],c=e.mapping.slice(s);e.replace(c.map(a.pos),c.map(l.pos),r?it.empty:n)}const o=Ot.findFrom(e.doc.resolve(e.mapping.slice(s).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,n){this.replace(e,new it(et.from(n),0,0))}forEachCell(e){const n=this.$anchorCell.node(-1),s=Cn.get(n),i=this.$anchorCell.start(-1),o=s.cellsInRect(s.rectBetween(this.$anchorCell.pos-i,this.$headCell.pos-i));for(let r=0;r<o.length;r++)e(n.nodeAt(o[r]),i+o[r])}isColSelection(){const e=this.$anchorCell.index(-1),n=this.$headCell.index(-1);if(Math.min(e,n)>0)return!1;const s=e+this.$anchorCell.nodeAfter.attrs.rowspan,i=n+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(s,i)==this.$headCell.node(-1).childCount}static colSelection(e,n=e){const s=e.node(-1),i=Cn.get(s),o=e.start(-1),r=i.findCell(e.pos-o),a=i.findCell(n.pos-o),l=e.node(0);return r.top<=a.top?(r.top>0&&(e=l.resolve(o+i.map[r.left])),a.bottom<i.height&&(n=l.resolve(o+i.map[i.width*(i.height-1)+a.right-1]))):(a.top>0&&(n=l.resolve(o+i.map[a.left])),r.bottom<i.height&&(e=l.resolve(o+i.map[i.width*(i.height-1)+r.right-1]))),new Va(e,n)}isRowSelection(){const e=this.$anchorCell.node(-1),n=Cn.get(e),s=this.$anchorCell.start(-1),i=n.colCount(this.$anchorCell.pos-s),o=n.colCount(this.$headCell.pos-s);if(Math.min(i,o)>0)return!1;const r=i+this.$anchorCell.nodeAfter.attrs.colspan,a=o+this.$headCell.nodeAfter.attrs.colspan;return Math.max(r,a)==n.width}eq(e){return e instanceof Va&&e.$anchorCell.pos==this.$anchorCell.pos&&e.$headCell.pos==this.$headCell.pos}static rowSelection(e,n=e){const s=e.node(-1),i=Cn.get(s),o=e.start(-1),r=i.findCell(e.pos-o),a=i.findCell(n.pos-o),l=e.node(0);return r.left<=a.left?(r.left>0&&(e=l.resolve(o+i.map[r.top*i.width])),a.right<i.width&&(n=l.resolve(o+i.map[i.width*(a.top+1)-1]))):(a.left>0&&(n=l.resolve(o+i.map[a.top*i.width])),r.right<i.width&&(e=l.resolve(o+i.map[i.width*(r.top+1)-1]))),new Va(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Va(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,s=n){return new Va(e.resolve(n),e.resolve(s))}getBookmark(){return new SSe(this.$anchorCell.pos,this.$headCell.pos)}};Wn.prototype.visible=!1;Ot.jsonID("cell",Wn);var SSe=class TB{constructor(e,n){this.anchor=e,this.head=n}map(e){return new TB(e.map(this.anchor),e.map(this.head))}resolve(e){const n=e.resolve(this.anchor),s=e.resolve(this.head);return n.parent.type.spec.tableRole=="row"&&s.parent.type.spec.tableRole=="row"&&n.index()<n.parent.childCount&&s.index()<s.parent.childCount&&K8(n,s)?new Wn(n,s):Ot.near(s,1)}};function $Se(t){if(!(t.selection instanceof Wn))return null;const e=[];return t.selection.forEachCell((n,s)=>{e.push(ws.node(s,s+n.nodeSize,{class:"selectedCell"}))}),Nn.create(t.doc,e)}function ASe({$from:t,$to:e}){if(t.pos==e.pos||t.pos<t.pos-6)return!1;let n=t.pos,s=e.pos,i=t.depth;for(;i>=0&&!(t.after(i+1)<t.end(i));i--,n++);for(let o=e.depth;o>=0&&!(e.before(o+1)>e.start(o));o--,s--);return n==s&&/row|table/.test(t.node(i).type.spec.tableRole)}function MSe({$from:t,$to:e}){let n,s;for(let i=t.depth;i>0;i--){const o=t.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){n=o;break}}for(let i=e.depth;i>0;i--){const o=e.node(i);if(o.type.spec.tableRole==="cell"||o.type.spec.tableRole==="header_cell"){s=o;break}}return n!==s&&e.parentOffset===0}function ESe(t,e,n){const s=(e||t).selection,i=(e||t).doc;let o,r;if(s instanceof At&&(r=s.node.type.spec.tableRole)){if(r=="cell"||r=="header_cell")o=Wn.create(i,s.from);else if(r=="row"){const a=i.resolve(s.from+1);o=Wn.rowSelection(a,a)}else if(!n){const a=Cn.get(s.node),l=s.from+1,c=l+a.map[a.width*a.height-1];o=Wn.create(i,l+1,c)}}else s instanceof St&&ASe(s)?o=St.create(i,s.from):s instanceof St&&MSe(s)&&(o=St.create(i,s.$from.start(),s.$from.end()));return o&&(e||(e=t.tr)).setSelection(o),e}var TSe=new Kn("fix-tables");function PB(t,e,n,s){const i=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(i,r+3);c<u;c++)if(t.child(c)==l){a=c+1,n+=l.nodeSize;continue e}s(l,n),a<i&&t.child(a).sameMarkup(l)?PB(t.child(a),l,n+1,s):l.nodesBetween(0,l.content.size,s,n+1),n+=l.nodeSize}}function PSe(t,e){let n;const s=(i,o)=>{i.type.spec.tableRole=="table"&&(n=ISe(t,i,o,n))};return e?e.doc!=t.doc&&PB(e.doc,t.doc,0,s):t.doc.descendants(s),n}function ISe(t,e,n,s){const i=Cn.get(e);if(!i.problems)return s;s||(s=t.tr);const o=[];for(let l=0;l<i.height;l++)o.push(0);for(let l=0;l<i.problems.length;l++){const c=i.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;s.setNodeMarkup(s.mapping.map(n+1+c.pos),null,Qu(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;s.setNodeMarkup(s.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;s.setNodeMarkup(s.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<i.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 b=0;b<h;b++){const y=nr(t.schema)[f].createAndFill();y&&p.push(y)}const m=(l==0||r==l-1)&&a==l?c+1:d-1;s.insert(s.mapping.map(m),p)}c=d}return s.setMeta(TSe,{fixTables:!0})}function Vc(t){const e=t.selection,n=Hb(t),s=n.node(-1),i=n.start(-1),o=Cn.get(s);return{...e instanceof Wn?o.rectBetween(e.$anchorCell.pos-i,e.$headCell.pos-i):o.findCell(n.pos-i),tableStart:i,map:o,table:s}}function IB(t,{map:e,tableStart:n,table:s},i){let o=i>0?-1:0;xSe(e,s,i+o)&&(o=i==0||i==e.width?null:0);for(let r=0;r<e.height;r++){const a=r*e.width+i;if(i>0&&i<e.width&&e.map[a-1]==e.map[a]){const l=e.map[a],c=s.nodeAt(l);t.setNodeMarkup(t.mapping.map(n+l),null,kSe(c.attrs,i-e.colCount(l))),r+=c.attrs.rowspan-1}else{const l=o==null?nr(s.type.schema).cell:s.nodeAt(e.map[a+o]).type,c=e.positionAt(r,i,s);t.insert(t.mapping.map(n+c),l.createAndFill())}}return t}function LSe(t,e){if(!rr(t))return!1;if(e){const n=Vc(t);e(IB(t.tr,n,n.left))}return!0}function OSe(t,e){if(!rr(t))return!1;if(e){const n=Vc(t);e(IB(t.tr,n,n.right))}return!0}function DSe(t,{map:e,table:n,tableStart:s},i){const o=t.mapping.maps.length;for(let r=0;r<e.height;){const a=r*e.width+i,l=e.map[a],c=n.nodeAt(l),u=c.attrs;if(i>0&&e.map[a-1]==l||i<e.width-1&&e.map[a+1]==l)t.setNodeMarkup(t.mapping.slice(o).map(s+l),null,Qu(u,i-e.colCount(l)));else{const d=t.mapping.slice(o).map(s+l);t.delete(d,d+c.nodeSize)}r+=u.rowspan}}function RSe(t,e){if(!rr(t))return!1;if(e){const n=Vc(t),s=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let i=n.right-1;DSe(s,n,i),i!=n.left;i--){const o=n.tableStart?s.doc.nodeAt(n.tableStart-1):s.doc;if(!o)throw RangeError("No table found");n.table=o,n.map=Cn.get(o)}e(s)}return!0}function VSe(t,{map:e,table:n,tableStart:s},i){let o=0;for(let c=0;c<i;c++)o+=n.child(c).nodeSize;const r=o+n.child(i).nodeSize,a=t.mapping.maps.length;t.delete(o+s,r+s);const l=new Set;for(let c=0,u=i*e.width;c<e.width;c++,u++){const d=e.map[u];if(!l.has(d)){if(l.add(d),i>0&&d==e.map[u-e.width]){const h=n.nodeAt(d).attrs;t.setNodeMarkup(t.mapping.slice(a).map(d+s),null,{...h,rowspan:h.rowspan-1}),c+=h.colspan-1}else if(i<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(i+1,c,n);t.insert(t.mapping.slice(a).map(s+m),p),c+=f.colspan-1}}}}function FSe(t,e){if(!rr(t))return!1;if(e){const n=Vc(t),s=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let i=n.bottom-1;VSe(s,n,i),i!=n.top;i--){const o=n.tableStart?s.doc.nodeAt(n.tableStart-1):s.doc;if(!o)throw RangeError("No table found");n.table=o,n.map=Cn.get(n.table)}e(s)}return!0}function NSe(t,e){return function(n,s){if(!rr(n))return!1;const i=Hb(n);if(i.nodeAfter.attrs[t]===e)return!1;if(s){const o=n.tr;n.selection instanceof Wn?n.selection.forEachCell((r,a)=>{r.attrs[t]!==e&&o.setNodeMarkup(a,null,{...r.attrs,[t]:e})}):o.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[t]:e}),s(o)}return!0}}function BSe(t){return function(e,n){if(!rr(e))return!1;if(n){const s=nr(e.schema),i=Vc(e),o=e.tr,r=i.map.cellsInRect(t=="column"?{left:i.left,top:0,right:i.right,bottom:i.map.height}:t=="row"?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),a=r.map(l=>i.table.nodeAt(l));for(let l=0;l<r.length;l++)a[l].type==s.header_cell&&o.setNodeMarkup(i.tableStart+r[l],s.cell,a[l].attrs);if(o.steps.length==0)for(let l=0;l<r.length;l++)o.setNodeMarkup(i.tableStart+r[l],s.header_cell,a[l].attrs);n(o)}return!0}}function zM(t,e,n){const s=e.map.cellsInRect({left:0,top:0,right:t=="row"?e.map.width:1,bottom:t=="column"?e.map.height:1});for(let i=0;i<s.length;i++){const o=e.table.nodeAt(s[i]);if(o&&o.type!==n.header_cell)return!1}return!0}function Z8(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?BSe(t):function(n,s){if(!rr(n))return!1;if(s){const i=nr(n.schema),o=Vc(n),r=n.tr,a=zM("row",o,i),l=zM("column",o,i),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?i.cell:i.header_cell:t=="row"?a?i.cell:i.header_cell:i.cell;o.map.cellsInRect(d).forEach(f=>{const p=f+o.tableStart,m=r.doc.nodeAt(p);m&&r.setNodeMarkup(p,h,m.attrs)}),s(r)}return!0}}Z8("row",{useDeprecatedLogic:!0});Z8("column",{useDeprecatedLogic:!0});Z8("cell",{useDeprecatedLogic:!0});function zSe(t,e){if(e<0){const n=t.nodeBefore;if(n)return t.pos-n.nodeSize;for(let s=t.index(-1)-1,i=t.before();s>=0;s--){const o=t.node(-1).child(s),r=o.lastChild;if(r)return i-1-r.nodeSize;i-=o.nodeSize}}else{if(t.index()<t.parent.childCount-1)return t.pos+t.nodeAfter.nodeSize;const n=t.node(-1);for(let s=t.indexAfter(-1),i=t.after();s<n.childCount;s++){const o=n.child(s);if(o.childCount)return i+1;i+=o.nodeSize}}return null}function LB(t){return function(e,n){if(!rr(e))return!1;const s=zSe(Hb(e),t);if(s==null)return!1;if(n){const i=e.doc.resolve(s);n(e.tr.setSelection(St.between(i,CSe(i))).scrollIntoView())}return!0}}function HSe(t,e){const n=t.selection.$anchor;for(let s=n.depth;s>0;s--)if(n.node(s).type.spec.tableRole=="table")return e&&e(t.tr.delete(n.before(s),n.after(s)).scrollIntoView()),!0;return!1}function C0(t,e){const n=t.selection;if(!(n instanceof Wn))return!1;if(e){const s=t.tr,i=nr(t.schema).cell.createAndFill().content;n.forEachCell((o,r)=>{o.content.eq(i)||s.replace(s.mapping.map(r+1),s.mapping.map(r+o.nodeSize-1),new it(i,0,0))}),s.docChanged&&e(s)}return!0}function USe(t){if(!t.size)return null;let{content:e,openStart:n,openEnd:s}=t;for(;e.childCount==1&&(n>0&&s>0||e.child(0).type.spec.tableRole=="table");)n--,s--,e=e.child(0).content;const i=e.child(0),o=i.type.spec.tableRole,r=i.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,s-1);(u||d)&&(c=SC(nr(r).row,new it(c,u,d)).content),a.push(c)}else if(o=="cell"||o=="header_cell")a.push(n||s?SC(nr(r).row,new it(e,n,s)).content:e);else return null;return jSe(r,a)}function jSe(t,e){const n=[];for(let i=0;i<e.length;i++){const o=e[i];for(let r=o.childCount-1;r>=0;r--){const{rowspan:a,colspan:l}=o.child(r).attrs;for(let c=i;c<i+a;c++)n[c]=(n[c]||0)+l}}let s=0;for(let i=0;i<n.length;i++)s=Math.max(s,n[i]);for(let i=0;i<n.length;i++)if(i>=e.length&&e.push(et.empty),n[i]<s){const o=nr(t).cell.createAndFill(),r=[];for(let a=n[i];a<s;a++)r.push(o);e[i]=e[i].append(et.from(r))}return{height:e.length,width:s,rows:e}}function SC(t,e){const n=t.createAndFill();return new qF(n).replace(0,n.content.size,e).doc}function WSe({width:t,height:e,rows:n},s,i){if(t!=s){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<s;d++){let h=l.child(d%l.childCount);u+h.attrs.colspan>s&&(h=h.type.createChecked(Qu(h.attrs,h.attrs.colspan,u+h.attrs.colspan-s),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(et.from(c))}n=r,t=s}if(e!=i){const o=[];for(let r=0,a=0;r<i;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>i&&(d=d.type.create({...d.attrs,rowspan:Math.max(1,i-d.attrs.rowspan)},d.content)),l.push(d)}o.push(et.from(l))}n=o,e=i}return{width:t,height:e,rows:n}}function YSe(t,e,n,s,i,o,r){const a=t.doc.type.schema,l=nr(a);let c,u;if(i>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 b=e.width;b<i;b++)p.push(m);t.insert(t.mapping.slice(r).map(h-1+s),p)}if(o>e.height){const d=[];for(let p=0,m=(e.height-1)*e.width;p<Math.max(e.width,i);p++){const b=p>=e.width?!1:n.nodeAt(e.map[m+p]).type==l.header_cell;d.push(b?u||(u=l.header_cell.createAndFill()):c||(c=l.cell.createAndFill()))}const h=l.row.create(null,et.from(d)),f=[];for(let p=e.height;p<o;p++)f.push(h);t.insert(t.mapping.slice(r).map(s+n.nodeSize-2),f)}return!!(c||u)}function HM(t,e,n,s,i,o,r,a){if(r==0||r==e.height)return!1;let l=!1;for(let c=i;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+s),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 UM(t,e,n,s,i,o,r,a){if(r==0||r==e.width)return!1;let l=!1;for(let c=i;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+s);t.setNodeMarkup(p,null,Qu(h.attrs,r-f,h.attrs.colspan-(r-f))),t.insert(p+h.nodeSize,h.type.createAndFill(Qu(h.attrs,0,r-f))),c+=h.attrs.rowspan-1}}return l}function jM(t,e,n,s,i){let o=n?t.doc.nodeAt(n-1):t.doc;if(!o)throw new Error("No table found");let r=Cn.get(o);const{top:a,left:l}=s,c=l+i.width,u=a+i.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=Cn.get(o),h=d.mapping.maps.length}YSe(d,r,o,n,c,u,h)&&f(),HM(d,r,o,n,l,c,a,h)&&f(),HM(d,r,o,n,l,c,u,h)&&f(),UM(d,r,o,n,a,u,l,h)&&f(),UM(d,r,o,n,a,u,c,h)&&f();for(let p=a;p<u;p++){const m=r.positionAt(p,l,o),b=r.positionAt(p,c,o);d.replace(d.mapping.slice(h).map(m+n),d.mapping.slice(h).map(b+n),new it(i.rows[p-a],0,0))}f(),d.setSelection(new Wn(d.doc.resolve(n+r.positionAt(a,l,o)),d.doc.resolve(n+r.positionAt(u-1,c-1,o)))),e(d)}var GSe=dN({ArrowLeft:k0("horiz",-1),ArrowRight:k0("horiz",1),ArrowUp:k0("vert",-1),ArrowDown:k0("vert",1),"Shift-ArrowLeft":x0("horiz",-1),"Shift-ArrowRight":x0("horiz",1),"Shift-ArrowUp":x0("vert",-1),"Shift-ArrowDown":x0("vert",1),Backspace:C0,"Mod-Backspace":C0,Delete:C0,"Mod-Delete":C0});function Pv(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function k0(t,e){return(n,s,i)=>{if(!i)return!1;const o=n.selection;if(o instanceof Wn)return Pv(n,s,Ot.near(o.$headCell,e));if(t!="horiz"&&!o.empty)return!1;const r=OB(i,t,e);if(r==null)return!1;if(t=="horiz")return Pv(n,s,Ot.near(n.doc.resolve(o.head+e),e));{const a=n.doc.resolve(r),l=EB(a,t,e);let c;return l?c=Ot.near(l,1):e<0?c=Ot.near(n.doc.resolve(a.before(-1)),-1):c=Ot.near(n.doc.resolve(a.after(-1)),1),Pv(n,s,c)}}}function x0(t,e){return(n,s,i)=>{if(!i)return!1;const o=n.selection;let r;if(o instanceof Wn)r=o;else{const l=OB(i,t,e);if(l==null)return!1;r=new Wn(n.doc.resolve(l))}const a=EB(r.$headCell,t,e);return a?Pv(n,s,new Wn(r.$anchorCell,a)):!1}}function qSe(t,e){const n=t.state.doc,s=k1(n.resolve(e));return s?(t.dispatch(t.state.tr.setSelection(new Wn(s))),!0):!1}function XSe(t,e,n){if(!rr(t.state))return!1;let s=USe(n);const i=t.state.selection;if(i instanceof Wn){s||(s={width:1,height:1,rows:[et.from(SC(nr(t.state.schema).cell,n))]});const o=i.$anchorCell.node(-1),r=i.$anchorCell.start(-1),a=Cn.get(o).rectBetween(i.$anchorCell.pos-r,i.$headCell.pos-r);return s=WSe(s,a.right-a.left,a.bottom-a.top),jM(t.state,t.dispatch,r,a,s),!0}else if(s){const o=Hb(t.state),r=o.start(-1);return jM(t.state,t.dispatch,r,Cn.get(o.node(-1)).findCell(o.pos-r),s),!0}else return!1}function KSe(t,e){var n;if(e.ctrlKey||e.metaKey)return;const s=WM(t,e.target);let i;if(e.shiftKey&&t.state.selection instanceof Wn)o(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&s&&(i=k1(t.state.selection.$anchor))!=null&&((n=Iw(t,e))==null?void 0:n.pos)!=i.pos)o(i,e),e.preventDefault();else if(!s)return;function o(l,c){let u=Iw(t,c);const d=ql.getState(t.state)==null;if(!u||!K8(l,u))if(d)u=l;else return;const h=new Wn(l,u);if(d||!t.state.selection.eq(h)){const f=t.state.tr.setSelection(h);d&&f.setMeta(ql,l.pos),t.dispatch(f)}}function r(){t.root.removeEventListener("mouseup",r),t.root.removeEventListener("dragstart",r),t.root.removeEventListener("mousemove",a),ql.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(ql,-1))}function a(l){const c=l,u=ql.getState(t.state);let d;if(u!=null)d=t.state.doc.resolve(u);else if(WM(t,c.target)!=s&&(d=Iw(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 OB(t,e,n){if(!(t.state.selection instanceof St))return null;const{$head:s}=t.state.selection;for(let i=s.depth-1;i>=0;i--){const o=s.node(i);if((n<0?s.index(i):s.indexAfter(i))!=(n<0?0:o.childCount))return null;if(o.type.spec.tableRole=="cell"||o.type.spec.tableRole=="header_cell"){const a=s.before(i),l=e=="vert"?n>0?"down":"up":n>0?"right":"left";return t.endOfTextblock(l)?a:null}}return null}function WM(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function Iw(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?k1(t.state.doc.resolve(n.pos)):null}var ZSe=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")),$C(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,$C(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function $C(t,e,n,s,i,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 b=i==h?o:p&&p[m],y=b?b+"px":"";a+=b||s,b||(l=!1),c?(c.style.width!=y&&(c.style.width=y),c=c.nextSibling):e.appendChild(document.createElement("col")).style.width=y}}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 zo=new Kn("tableColumnResizing");function JSe({handleWidth:t=5,cellMinWidth:e=25,View:n=ZSe,lastColumnResizable:s=!0}={}){const i=new Yn({key:zo,state:{init(o,r){var a,l;const c=(l=(a=i.spec)==null?void 0:a.props)==null?void 0:l.nodeViews,u=nr(r.schema).table.name;return n&&c&&(c[u]=(d,h)=>new n(d,e,h)),new QSe(-1,!1)},apply(o,r){return r.apply(o)}},props:{attributes:o=>{const r=zo.getState(o);return r&&r.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,r)=>{e9e(o,r,t,e,s)},mouseleave:o=>{t9e(o)},mousedown:(o,r)=>{n9e(o,r,e)}},decorations:o=>{const r=zo.getState(o);if(r&&r.activeHandle>-1)return l9e(o,r.activeHandle)},nodeViews:{}}});return i}var QSe=class Iv{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,s=e.getMeta(zo);if(s&&s.setHandle!=null)return new Iv(s.setHandle,!1);if(s&&s.setDragging!==void 0)return new Iv(n.activeHandle,s.setDragging);if(n.activeHandle>-1&&e.docChanged){let i=e.mapping.map(n.activeHandle,-1);return xC(e.doc.resolve(i))||(i=-1),new Iv(i,n.dragging)}return n}};function e9e(t,e,n,s,i){const o=zo.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=YM(t,e,"left",n):c-e.clientX<=n&&(a=YM(t,e,"right",n))}if(a!=o.activeHandle){if(!i&&a!==-1){const l=t.state.doc.resolve(a),c=l.node(-1),u=Cn.get(c),d=l.start(-1);if(u.colCount(l.pos-d)+l.nodeAfter.attrs.colspan-1==u.width-1)return}DB(t,a)}}}function t9e(t){const e=zo.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&DB(t,-1)}function n9e(t,e,n){var s;const i=(s=t.dom.ownerDocument.defaultView)!=null?s:window,o=zo.getState(t.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const r=t.state.doc.nodeAt(o.activeHandle),a=s9e(t,o.activeHandle,r.attrs);t.dispatch(t.state.tr.setMeta(zo,{setDragging:{startX:e.clientX,startWidth:a}}));function l(u){i.removeEventListener("mouseup",l),i.removeEventListener("mousemove",c);const d=zo.getState(t.state);d!=null&&d.dragging&&(o9e(t,d.activeHandle,GM(d.dragging,u,n)),t.dispatch(t.state.tr.setMeta(zo,{setDragging:null})))}function c(u){if(!u.which)return l(u);const d=zo.getState(t.state);if(d&&d.dragging){const h=GM(d.dragging,u,n);r9e(t,d.activeHandle,h,n)}}return i.addEventListener("mouseup",l),i.addEventListener("mousemove",c),e.preventDefault(),!0}function s9e(t,e,{colspan:n,colwidth:s}){const i=s&&s[s.length-1];if(i)return i;const o=t.domAtPos(e);let a=o.node.childNodes[o.offset].offsetWidth,l=n;if(s)for(let c=0;c<n;c++)s[c]&&(a-=s[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 YM(t,e,n,s){const i=n=="right"?-s:s,o=t.posAtCoords({left:e.clientX+i,top:e.clientY});if(!o)return-1;const{pos:r}=o,a=k1(t.state.doc.resolve(r));if(!a)return-1;if(n=="right")return a.pos;const l=Cn.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 s=e.clientX-t.startX;return Math.max(n,t.startWidth+s)}function DB(t,e){t.dispatch(t.state.tr.setMeta(zo,{setHandle:e}))}function o9e(t,e,n){const s=t.state.doc.resolve(e),i=s.node(-1),o=Cn.get(i),r=s.start(-1),a=o.colCount(s.pos-r)+s.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=i.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():a9e(h.colspan);p[f]=n,l.setNodeMarkup(r+d,null,{...h,colwidth:p})}l.docChanged&&t.dispatch(l)}function r9e(t,e,n,s){const i=t.state.doc.resolve(e),o=i.node(-1),r=i.start(-1),a=Cn.get(o).colCount(i.pos-r)+i.nodeAfter.attrs.colspan-1;let l=t.domAtPos(i.start(-1)).node;for(;l&&l.nodeName!="TABLE";)l=l.parentNode;l&&$C(o,l.firstChild,l,s,a,n)}function a9e(t){return Array(t).fill(0)}function l9e(t,e){const n=[],s=t.doc.resolve(e),i=s.node(-1);if(!i)return Nn.empty;const o=Cn.get(i),r=s.start(-1),a=o.colCount(s.pos-r)+s.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+i.nodeAt(u).nodeSize-1,h=document.createElement("div");h.className="column-resize-handle",n.push(ws.widget(d,h))}}return Nn.create(t.doc,n)}function c9e({allowTableNodeSelection:t=!1}={}){return new Yn({key:ql,state:{init(){return null},apply(e,n){const s=e.getMeta(ql);if(s!=null)return s==-1?null:s;if(n==null||!e.docChanged)return n;const{deleted:i,pos:o}=e.mapping.mapResult(n);return i?null:o}},props:{decorations:$Se,handleDOMEvents:{mousedown:KSe},createSelectionBetween(e){return ql.getState(e.state)!=null?e.state.selection:null},handleTripleClick:qSe,handleKeyDown:GSe,handlePaste:XSe},appendTransaction(e,n,s){return ESe(s,PSe(s,n),t)}})}var oy=typeof navigator<"u"?navigator:null,J8=oy&&oy.userAgent||"",u9e=/Edge\/(\d+)/.exec(J8),d9e=/MSIE \d/.exec(J8),h9e=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(J8),f9e=!!(d9e||h9e||u9e),p9e=!f9e&&!!oy&&/Apple Computer/.test(oy.vendor),RB=new Kn("safari-ime-span"),AC=!1,m9e={key:RB,props:{decorations:g9e,handleDOMEvents:{compositionstart:()=>{AC=!0},compositionend:()=>{AC=!1}}}};function g9e(t){const{$from:e,$to:n,to:s}=t.selection;if(AC&&e.sameParent(n)){const i=ws.widget(s,v9e,{ignoreSelection:!0,key:"safari-ime-span"});return Nn.create(t.doc,[i])}}function v9e(t){const e=t.dom.ownerDocument.createElement("span");return e.className="ProseMirror-safari-ime-span",e}var _9e=new Yn(p9e?m9e:{key:RB});function qM(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let s=0,i=n.indexOf(e);for(;i!==-1;)s++,i=n.indexOf(e,i+e.length);return s}function y9e(t,e,n){const i=xb((n||{}).ignore||[]),o=b9e(e);let r=-1;for(;++r<o.length;)CF(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(i(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 b=d.children.indexOf(c);let y=!1,C=[];h.lastIndex=0;let k=h.exec(c.value);for(;k;){const x=k.index,S={index:k.index,input:k.input,stack:[...u,c]};let E=f(...k,S);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?h.lastIndex=x+1:(p!==x&&C.push({type:"text",value:c.value.slice(p,x)}),Array.isArray(E)?C.push(...E):E&&C.push(E),p=x+k[0].length,y=!0),!h.global)break;k=h.exec(c.value)}return y?(p<c.value.length&&C.push({type:"text",value:c.value.slice(p)}),d.children.splice(b,1,...C)):C=[c],b+C.length}}function b9e(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 s=-1;for(;++s<n.length;){const i=n[s];e.push([w9e(i[0]),C9e(i[1])])}return e}function w9e(t){return typeof t=="string"?new RegExp(Vb(t),"g"):t}function C9e(t){return typeof t=="function"?t:function(){return t}}const Lw="phrasing",Ow=["autolink","link","image","label"];function k9e(){return{transforms:[T9e],enter:{literalAutolink:S9e,literalAutolinkEmail:Dw,literalAutolinkHttp:Dw,literalAutolinkWww:Dw},exit:{literalAutolink:E9e,literalAutolinkEmail:M9e,literalAutolinkHttp:$9e,literalAutolinkWww:A9e}}}function x9e(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Lw,notInConstruct:Ow},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Lw,notInConstruct:Ow},{character:":",before:"[ps]",after:"\\/",inConstruct:Lw,notInConstruct:Ow}]}}function S9e(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Dw(t){this.config.enter.autolinkProtocol.call(this,t)}function $9e(t){this.config.exit.autolinkProtocol.call(this,t)}function A9e(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 M9e(t){this.config.exit.autolinkEmail.call(this,t)}function E9e(t){this.exit(t)}function T9e(t){y9e(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,P9e],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),I9e]],{ignore:["link","linkReference"]})}function P9e(t,e,n,s,i){let o="";if(!VB(i)||(/^w/i.test(e)&&(n=e+n,e="",o="http://"),!L9e(n)))return!1;const r=O9e(n+s);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 I9e(t,e,n,s){return!VB(s,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function L9e(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 O9e(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],s=n.indexOf(")");const i=qM(t,"(");let o=qM(t,")");for(;s!==-1&&i>o;)t+=n.slice(0,s+1),n=n.slice(s+1),s=n.indexOf(")"),o++;return[t,n]}function VB(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||Ku(n)||Cb(n))&&(!e||n!==47)}FB.peek=W9e;function D9e(){return{enter:{gfmFootnoteDefinition:V9e,gfmFootnoteDefinitionLabelString:F9e,gfmFootnoteCall:z9e,gfmFootnoteCallString:H9e},exit:{gfmFootnoteDefinition:B9e,gfmFootnoteDefinitionLabelString:N9e,gfmFootnoteCall:j9e,gfmFootnoteCallString:U9e}}}function R9e(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:Y9e,footnoteReference:FB}}}function V9e(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function F9e(){this.buffer()}function N9e(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=xr(this.sliceSerialize(t)).toLowerCase()}function B9e(t){this.exit(t)}function z9e(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function H9e(){this.buffer()}function U9e(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=xr(this.sliceSerialize(t)).toLowerCase()}function j9e(t){this.exit(t)}function FB(t,e,n,s){const i=n.createTracker(s);let o=i.move("[^");const r=n.enter("footnoteReference"),a=n.enter("reference");return o+=i.move(n.safe(n.associationId(t),{...i.current(),before:o,after:"]"})),a(),r(),o+=i.move("]"),o}function W9e(){return"["}function Y9e(t,e,n,s){const i=n.createTracker(s);let o=i.move("[^");const r=n.enter("footnoteDefinition"),a=n.enter("label");return o+=i.move(n.safe(n.associationId(t),{...i.current(),before:o,after:"]"})),a(),o+=i.move("]:"+(t.children&&t.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(t,i.current()),G9e)),r(),o}function G9e(t,e,n){return e===0?t:(n?"":" ")+t}const q9e=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];NB.peek=Q9e;function X9e(){return{canContainEols:["delete"],enter:{strikethrough:Z9e},exit:{strikethrough:J9e}}}function K9e(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:q9e}],handlers:{delete:NB}}}function Z9e(t){this.enter({type:"delete",children:[]},t)}function J9e(t){this.exit(t)}function NB(t,e,n,s){const i=n.createTracker(s),o=n.enter("strikethrough");let r=i.move("~~");return r+=n.containerPhrasing(t,{...i.current(),before:r,after:"~"}),r+=i.move("~~"),o(),r}function Q9e(){return"~"}function e7e(t,e={}){const n=(e.align||[]).concat(),s=e.stringLength||n7e,i=[],o=[],r=[],a=[];let l=0,c=-1;for(;++c<t.length;){const p=[],m=[];let b=-1;for(t[c].length>l&&(l=t[c].length);++b<t[c].length;){const y=t7e(t[c][b]);if(e.alignDelimiters!==!1){const C=s(y);m[b]=C,(a[b]===void 0||C>a[b])&&(a[b]=C)}p.push(y)}o[c]=p,r[c]=m}let u=-1;if(typeof n=="object"&&"length"in n)for(;++u<l;)i[u]=XM(n[u]);else{const p=XM(n);for(;++u<l;)i[u]=p}u=-1;const d=[],h=[];for(;++u<l;){const p=i[u];let m="",b="";p===99?(m=":",b=":"):p===108?m=":":p===114&&(b=":");let y=e.alignDelimiters===!1?1:Math.max(1,a[u]-m.length-b.length);const C=m+"-".repeat(y)+b;e.alignDelimiters!==!1&&(y=m.length+y+b.length,y>a[u]&&(a[u]=y),h[u]=y),d[u]=C}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 b=[];for(;++u<l;){const y=p[u]||"";let C="",k="";if(e.alignDelimiters!==!1){const x=a[u]-(m[u]||0),S=i[u];S===114?C=" ".repeat(x):S===99?x%2?(C=" ".repeat(x/2+.5),k=" ".repeat(x/2-.5)):(C=" ".repeat(x/2),k=C):k=" ".repeat(x)}e.delimiterStart!==!1&&!u&&b.push("|"),e.padding!==!1&&!(e.alignDelimiters===!1&&y==="")&&(e.delimiterStart!==!1||u)&&b.push(" "),e.alignDelimiters!==!1&&b.push(C),b.push(y),e.alignDelimiters!==!1&&b.push(k),e.padding!==!1&&b.push(" "),(e.delimiterEnd!==!1||u!==l-1)&&b.push("|")}f.push(e.delimiterEnd===!1?b.join("").replace(/ +$/,""):b.join(""))}return f.join(` | |
| 127 | -`)}function t7e(t){return t==null?"":String(t)}function n7e(t){return t.length}function XM(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 s7e(){return{enter:{table:i7e,tableData:KM,tableHeader:KM,tableRow:r7e},exit:{codeText:a7e,table:o7e,tableData:Rw,tableHeader:Rw,tableRow:Rw}}}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 o7e(t){this.exit(t),this.data.inTable=void 0}function r7e(t){this.enter({type:"tableRow",children:[]},t)}function Rw(t){this.exit(t)}function KM(t){this.enter({type:"tableCell",children:[]},t)}function a7e(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,l7e));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function l7e(t,e){return e==="|"?e:t}function c7e(t){const e=t||{},n=e.tableCellPadding,s=e.tablePipeAlign,i=e.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` | |
| 128 | -`,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,b){return c(u(f,m,b),f.align)}function a(f,p,m,b){const y=d(f,m,b),C=c([y]);return C.slice(0,C.indexOf(` | |
| 129 | -`))}function l(f,p,m,b){const y=m.enter("tableCell"),C=m.enter("phrasing"),k=m.containerPhrasing(f,{...b,before:o,after:o});return C(),y(),k}function c(f,p){return e7e(f,{align:p,alignDelimiters:s,padding:n,stringLength:i})}function u(f,p,m){const b=f.children;let y=-1;const C=[],k=p.enter("table");for(;++y<b.length;)C[y]=d(b[y],p,m);return k(),C}function d(f,p,m){const b=f.children;let y=-1;const C=[],k=p.enter("tableRow");for(;++y<b.length;)C[y]=l(b[y],f,p,m);return k(),C}function h(f,p,m){let b=B4.inlineCode(f,p,m);return m.stack.includes("tableCell")&&(b=b.replace(/\|/g,"\\$&")),b}}function u7e(){return{exit:{taskListCheckValueChecked:ZM,taskListCheckValueUnchecked:ZM,paragraph:h7e}}}function d7e(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:f7e}}}function ZM(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function h7e(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 s=n.children[0];if(s&&s.type==="text"){const i=e.children;let o=-1,r;for(;++o<i.length;){const a=i[o];if(a.type==="paragraph"){r=a;break}}r===n&&(s.value=s.value.slice(1),s.value.length===0?n.children.shift():n.position&&s.position&&typeof s.position.start.offset=="number"&&(s.position.start.column++,s.position.start.offset++,n.position.start=Object.assign({},s.position.start)))}}this.exit(t)}function f7e(t,e,n,s){const i=t.children[0],o=typeof t.checked=="boolean"&&i&&i.type==="paragraph",r="["+(t.checked?"x":" ")+"] ",a=n.createTracker(s);o&&a.move(r);let l=B4.listItem(t,e,n,{...s,...a.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+r}}function p7e(){return[k9e(),D9e(),X9e(),s7e(),u7e()]}function m7e(t){return{extensions:[x9e(),R9e(),K9e(),c7e(t),d7e()]}}const g7e={tokenize:C7e,partial:!0},BB={tokenize:k7e,partial:!0},zB={tokenize:x7e,partial:!0},HB={tokenize:S7e,partial:!0},v7e={tokenize:$7e,partial:!0},UB={name:"wwwAutolink",tokenize:b7e,previous:WB},jB={name:"protocolAutolink",tokenize:w7e,previous:YB},hl={name:"emailAutolink",tokenize:y7e,previous:GB},Ma={};function _7e(){return{text:Ma}}let jc=48;for(;jc<123;)Ma[jc]=hl,jc++,jc===58?jc=65:jc===91&&(jc=97);Ma[43]=hl;Ma[45]=hl;Ma[46]=hl;Ma[95]=hl;Ma[72]=[hl,jB];Ma[104]=[hl,jB];Ma[87]=[hl,UB];Ma[119]=[hl,UB];function y7e(t,e,n){const s=this;let i,o;return r;function r(d){return!MC(d)||!GB.call(s,s.previous)||Q8(s.events)?n(d):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(d))}function a(d){return MC(d)?(t.consume(d),a):d===64?(t.consume(d),l):n(d)}function l(d){return d===46?t.check(v7e,u,c)(d):d===45||d===95||ji(d)?(o=!0,t.consume(d),l):u(d)}function c(d){return t.consume(d),i=!0,l}function u(d){return o&&i&&Ci(s.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(d)):n(d)}}function b7e(t,e,n){const s=this;return i;function i(r){return r!==87&&r!==119||!WB.call(s,s.previous)||Q8(s.events)?n(r):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(g7e,t.attempt(BB,t.attempt(zB,o),n),n)(r))}function o(r){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(r)}}function w7e(t,e,n){const s=this;let i="",o=!1;return r;function r(d){return(d===72||d===104)&&YB.call(s,s.previous)&&!Q8(s.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(d),t.consume(d),a):n(d)}function a(d){if(Ci(d)&&i.length<5)return i+=String.fromCodePoint(d),t.consume(d),a;if(d===58){const h=i.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||K_(d)||Pn(d)||Ku(d)||Cb(d)?n(d):t.attempt(BB,t.attempt(zB,u),n)(d)}function u(d){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(d)}}function C7e(t,e,n){let s=0;return i;function i(r){return(r===87||r===119)&&s<3?(s++,t.consume(r),i):r===46&&s===3?(t.consume(r),o):n(r)}function o(r){return r===null?n(r):e(r)}}function k7e(t,e,n){let s,i,o;return r;function r(c){return c===46||c===95?t.check(HB,l,a)(c):c===null||Pn(c)||Ku(c)||c!==45&&Cb(c)?l(c):(o=!0,t.consume(c),r)}function a(c){return c===95?s=!0:(i=s,s=void 0),t.consume(c),r}function l(c){return i||s||!o?n(c):e(c)}}function x7e(t,e){let n=0,s=0;return i;function i(r){return r===40?(n++,t.consume(r),i):r===41&&s<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(HB,e,o)(r):r===null||Pn(r)||Ku(r)?e(r):(t.consume(r),i)}function o(r){return r===41&&s++,t.consume(r),i}}function S7e(t,e,n){return s;function s(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),s):a===38?(t.consume(a),o):a===93?(t.consume(a),i):a===60||a===null||Pn(a)||Ku(a)?e(a):n(a)}function i(a){return a===null||a===40||a===91||Pn(a)||Ku(a)?e(a):s(a)}function o(a){return Ci(a)?r(a):n(a)}function r(a){return a===59?(t.consume(a),s):Ci(a)?(t.consume(a),r):n(a)}}function $7e(t,e,n){return s;function s(o){return t.consume(o),i}function i(o){return ji(o)?n(o):e(o)}}function WB(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||Pn(t)}function YB(t){return!Ci(t)}function GB(t){return!(t===47||MC(t))}function MC(t){return t===43||t===45||t===46||t===95||ji(t)}function Q8(t){let e=t.length,n=!1;for(;e--;){const s=t[e][1];if((s.type==="labelLink"||s.type==="labelImage")&&!s._balanced){n=!0;break}if(s._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const A7e={tokenize:D7e,partial:!0};function M7e(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:I7e,continuation:{tokenize:L7e},exit:O7e}},text:{91:{name:"gfmFootnoteCall",tokenize:P7e},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:E7e,resolveTo:T7e}}}}function E7e(t,e,n){const s=this;let i=s.events.length;const o=s.parser.gfmFootnotes||(s.parser.gfmFootnotes=[]);let r;for(;i--;){const l=s.events[i][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=xr(s.sliceSerialize({start:r.end,end:s.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 T7e(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 s={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.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",s,e],t[n+3],t[n+4],["enter",i,e],["exit",i,e],["enter",o,e],["enter",r,e],["exit",r,e],["exit",o,e],t[t.length-2],t[t.length-1],["exit",s,e]];return t.splice(n,t.length-n+1,...a),t}function P7e(t,e,n){const s=this,i=s.parser.gfmFootnotes||(s.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||Pn(d))return n(d);if(d===93){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return i.includes(xr(s.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(d)}return Pn(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 I7e(t,e,n){const s=this,i=s.parser.gfmFootnotes||(s.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||Pn(p))return n(p);if(p===93){t.exit("chunkString");const m=t.exit("gfmFootnoteDefinitionLabelString");return o=xr(s.sliceSerialize(m)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(p),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return Pn(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"),i.includes(o)||i.push(o),dn(t,f,"gfmFootnoteDefinitionWhitespace")):n(p)}function f(p){return e(p)}}function L7e(t,e,n){return t.check(p1,e,t.attempt(A7e,e,n))}function O7e(t){t.exit("gfmFootnoteDefinition")}function D7e(t,e,n){const s=this;return dn(t,i,"gfmFootnoteDefinitionIndent",4+1);function i(o){const r=s.events[s.events.length-1];return r&&r[1].type==="gfmFootnoteDefinitionIndent"&&r[2].sliceSerialize(r[1],!0).length===4?e(o):n(o)}}function R7e(t){let n=(t||{}).singleTilde;const s={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:s},insideSpan:{null:[s]},attentionMarkers:{null:[126]}};function i(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&&qo(h,h.length,0,kb(f,r.slice(c+1,l),a)),qo(h,h.length,0,[["exit",d,a],["enter",r[l][1],a],["exit",r[l][1],a],["exit",u,a]]),qo(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=Z_(c);if(p===126)return d>1?l(p):(r.consume(p),d++,f);if(d<2&&!n)return l(p);const b=r.exit("strikethroughSequenceTemporary"),y=Z_(p);return b._open=!y||y===2&&!!m,b._close=!m||m===2&&!!y,a(p)}}}class V7e{constructor(){this.map=[]}add(e,n,s){F7e(this,e,n,s)}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 s=[];for(;n>0;)n-=1,s.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];s.push([...e]),e.length=0;let i=s.pop();for(;i;)e.push(...i),i=s.pop();this.map.length=0}}function F7e(t,e,n,s){let i=0;if(!(n===0&&s.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...s);return}i+=1}t.map.push([e,n,s])}}function N7e(t,e){let n=!1;const s=[];for(;e<t.length;){const i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&s.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const o=s.length-1;s[o]=s[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return s}function B7e(){return{flow:{null:{name:"table",tokenize:z7e,resolveAll:H7e}}}}function z7e(t,e,n){const s=this;let i=0,o=0,r;return a;function a(L){let V=s.events.length-1;for(;V>-1;){const Y=s.events[V][1].type;if(Y==="lineEnding"||Y==="linePrefix")V--;else break}const D=V>-1?s.events[V][1].type:null,z=D==="tableHead"||D==="tableRow"?E:l;return z===E&&s.parser.lazy[s.now().line]?n(L):z(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):wt(L)?o>1?(o=0,s.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),f):n(L):Qt(L)?dn(t,u,"whitespace")(L):(o+=1,r&&(r=!1,i+=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||Pn(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 s.interrupt=!1,s.parser.lazy[s.now().line]?n(L):(t.enter("tableDelimiterRow"),r=!1,Qt(L)?dn(t,p,"linePrefix",s.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):p(L))}function p(L){return L===45||L===58?b(L):L===124?(r=!0,t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),m):S(L)}function m(L){return Qt(L)?dn(t,b,"whitespace")(L):b(L)}function b(L){return L===58?(o+=1,r=!0,t.enter("tableDelimiterMarker"),t.consume(L),t.exit("tableDelimiterMarker"),y):L===45?(o+=1,y(L)):L===null||wt(L)?x(L):S(L)}function y(L){return L===45?(t.enter("tableDelimiterFiller"),C(L)):S(L)}function C(L){return L===45?(t.consume(L),C):L===58?(r=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(L),t.exit("tableDelimiterMarker"),k):(t.exit("tableDelimiterFiller"),k(L))}function k(L){return Qt(L)?dn(t,x,"whitespace")(L):x(L)}function x(L){return L===124?p(L):L===null||wt(L)?!r||i!==o?S(L):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(L)):S(L)}function S(L){return n(L)}function E(L){return t.enter("tableRow"),T(L)}function T(L){return L===124?(t.enter("tableCellDivider"),t.consume(L),t.exit("tableCellDivider"),T):L===null||wt(L)?(t.exit("tableRow"),e(L)):Qt(L)?dn(t,T,"whitespace")(L):(t.enter("data"),P(L))}function P(L){return L===null||L===124||Pn(L)?(t.exit("data"),T(L)):(t.consume(L),L===92?I:P)}function I(L){return L===92||L===124?(t.consume(L),P):P(L)}}function H7e(t,e){let n=-1,s=!0,i=0,o=[0,0,0,0],r=[0,0,0,0],a=!1,l=0,c,u,d;const h=new V7e;for(;++n<t.length;){const f=t[n],p=f[1];f[0]==="enter"?p.type==="tableHead"?(a=!1,l!==0&&(JM(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"?(s=!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]])),i=p.type==="tableDelimiterRow"?2:u?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(s=!1,r[2]===0&&(o[1]!==0&&(r[0]=r[1],d=S0(h,e,o,i,void 0,d),o=[0,0,0,0]),r[2]=n)):p.type==="tableCellDivider"&&(s?s=!1:(o[1]!==0&&(r[0]=r[1],d=S0(h,e,o,i,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=S0(h,e,o,i,n,d)):r[1]!==0&&(d=S0(h,e,r,i,n,d)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(r[3]=n)}for(l!==0&&JM(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=N7e(e.events,n))}return t}function S0(t,e,n,s,i,o){const r=s===1?"tableHeader":s===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},hh(e.events,n[0])),t.add(n[0],0,[["exit",o,e]]));const l=hh(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=hh(e.events,n[2]),u=hh(e.events,n[3]),d={type:a,start:Object.assign({},c),end:Object.assign({},u)};if(t.add(n[2],0,[["enter",d,e]]),s!==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 i!==void 0&&(o.end=Object.assign({},hh(e.events,i)),t.add(i,0,[["exit",o,e]]),o=void 0),o}function JM(t,e,n,s,i){const o=[],r=hh(e.events,n);i&&(i.end=Object.assign({},r),o.push(["exit",i,e])),s.end=Object.assign({},r),o.push(["exit",s,e]),t.add(n+1,0,o)}function hh(t,e){const n=t[e],s=n[0]==="enter"?"start":"end";return n[1][s]}const U7e={name:"tasklistCheck",tokenize:W7e};function j7e(){return{text:{91:U7e}}}function W7e(t,e,n){const s=this;return i;function i(l){return s.previous!==null||!s._gfmTasklistFirstContentOfListItem?n(l):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(l),t.exit("taskListCheckMarker"),o)}function o(l){return Pn(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 wt(l)?e(l):Qt(l)?t.check({tokenize:Y7e},e,n)(l):n(l)}}function Y7e(t,e,n){return dn(t,s,"whitespace");function s(i){return i===null?n(i):e(i)}}function G7e(t){return iF([_7e(),M7e(),R7e(t),B7e(),j7e()])}const q7e={};function X7e(t){const e=this,n=t||q7e,s=e.data(),i=s.micromarkExtensions||(s.micromarkExtensions=[]),o=s.fromMarkdownExtensions||(s.fromMarkdownExtensions=[]),r=s.toMarkdownExtensions||(s.toMarkdownExtensions=[]);i.push(G7e(n)),o.push(p7e()),r.push(m7e(n))}function Mt(t,e){return Object.assign(t,{meta:{package:"@milkdown/preset-gfm",...e}}),t}const e5=w1("strike_through");Mt(e5,{displayName:"Attr<strikethrough>",group:"Strikethrough"});const Wf=b1("strike_through",t=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:e=>e==="line-through"}],toDOM:e=>["del",t.get(e5.key)(e)],parseMarkdown:{match:e=>e.type==="delete",runner:(e,n,s)=>{e.openMark(s),e.next(n.children),e.closeMark(s)}},toMarkdown:{match:e=>e.type.name==="strike_through",runner:(e,n)=>{e.withMark(n,"delete")}}}));Mt(Wf.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"});Mt(Wf.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});const Ub=Gt("ToggleStrikeThrough",t=>()=>Ib(Wf.type(t)));Mt(Ub,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});const qB=no(t=>g1(/~([^~]+)~$/,Wf.type(t)));Mt(qB,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});const t5=so("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:t=>{const e=t.get(cn);return()=>e.call(Ub.key)}}});Mt(t5.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"});Mt(t5.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});const x1=bSe({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:t=>t.style.textAlign||"left",setDOMAttr:(t,e)=>{e.style=`text-align: ${t||"left"}`}}}}),Yf=$s("table",()=>({...x1.table,content:"table_header_row table_row+",disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="table",runner:(t,e,n)=>{const s=e.align,i=e.children.map((o,r)=>({...o,align:s,isHeader:r===0}));t.openNode(n),t.next(i),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table",runner:(t,e)=>{var n;const s=(n=e.content.firstChild)==null?void 0:n.content;if(!s)return;const i=[];s.forEach(o=>{i.push(o.attrs.alignment)}),t.openNode("table",void 0,{align:i}),t.next(e.content),t.closeNode()}}}));Mt(Yf.node,{displayName:"NodeSchema<table>",group:"Table"});Mt(Yf.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});const jb=$s("table_header_row",()=>({...x1.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 s=e.align,i=e.children.map((o,r)=>({...o,align:s[r],isHeader:e.isHeader}));t.openNode(n),t.next(i),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()}}}));Mt(jb.node,{displayName:"NodeSchema<tableHeaderRow>",group:"Table"});Mt(jb.ctx,{displayName:"NodeSchemaCtx<tableHeaderRow>",group:"Table"});const S1=$s("table_row",()=>({...x1.table_row,disableDropCursor:!0,content:"(table_cell)*",parseMarkdown:{match:t=>t.type==="tableRow",runner:(t,e,n)=>{const s=e.align,i=e.children.map((o,r)=>({...o,align:s[r]}));t.openNode(n),t.next(i),t.closeNode()}},toMarkdown:{match:t=>t.type.name==="table_row",runner:(t,e)=>{t.openNode("tableRow"),t.next(e.content),t.closeNode()}}}));Mt(S1.node,{displayName:"NodeSchema<tableRow>",group:"Table"});Mt(S1.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});const $1=$s("table_cell",()=>({...x1.table_cell,disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="tableCell"&&!t.isHeader,runner:(t,e,n)=>{const s=e.align;t.openNode(n,{alignment:s}).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()}}}));Mt($1.node,{displayName:"NodeSchema<tableCell>",group:"Table"});Mt($1.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});const Wb=$s("table_header",()=>({...x1.table_header,disableDropCursor:!0,parseMarkdown:{match:t=>t.type==="tableCell"&&!!t.isHeader,runner:(t,e,n)=>{const s=e.align;t.openNode(n,{alignment:s}),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()}}}));Mt(Wb.node,{displayName:"NodeSchema<tableHeader>",group:"Table"});Mt(Wb.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});function XB(t,e=3,n=3){const s=Array(n).fill(0).map(()=>$1.type(t).createAndFill()),i=Array(n).fill(0).map(()=>Wb.type(t).createAndFill()),o=Array(e).fill(0).map((r,a)=>a===0?jb.type(t).create(null,i):S1.type(t).create(null,s));return Yf.type(t).create(null,o)}function A1(t){return q4(e=>e.type.spec.tableRole==="table")(t)}function fh(t,e){const n=A1(e.$from);if(!n)return;const s=Cn.get(n.node);if(!(t<0||t>=s.width))return s.cellsInRect({left:t,right:t+1,top:0,bottom:s.height}).map(i=>{const o=n.node.nodeAt(i);if(!o)return;const r=i+n.start;return{pos:r,start:r+1,node:o}}).filter(i=>i!=null)}function ph(t,e){const n=A1(e.$from);if(!n)return;const s=Cn.get(n.node);if(!(t<0||t>=s.height))return s.cellsInRect({left:0,right:s.width,top:t,bottom:t+1}).map(i=>{const o=n.node.nodeAt(i);if(!o)return;const r=i+n.start;return{pos:r,start:r+1,node:o}}).filter(i=>i!=null)}function K7e(t){const e=A1(t.$from);if(!e)return;const n=Cn.get(e.node);return n.cellsInRect({left:0,right:n.width,top:0,bottom:n.height}).map(s=>{const i=e.node.nodeAt(s),o=s+e.start;return{pos:o,start:o+1,node:i}})}function Z7e(t){const e=K7e(t.selection);if(e&&e[0]){const n=t.doc.resolve(e[0].pos),s=e[e.length-1];if(s){const i=t.doc.resolve(s.pos);return Pb(t.setSelection(new Wn(i,n)))}}return t}function KB(t,e,{map:n,tableStart:s,table:i},o){const r=Array(o).fill(0).reduce((l,c,u)=>l+i.child(u).nodeSize,s),a=Array(n.width).fill(0).map((l,c)=>{const u=i.nodeAt(n.map[c]);return $1.type(t).createAndFill({alignment:u==null?void 0:u.attrs.alignment})});return e.insert(r,S1.type(t).create(null,a)),e}function ZB(t){return(e,n)=>s=>{n=n??s.selection.from;const i=s.doc.resolve(n),o=q4(l=>l.type.name==="table")(i),r=o?{node:o.node,from:o.start}:void 0,a=t==="row";if(r){const l=Cn.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=s.doc.resolve(r.from+c),d=a?Wn.rowSelection:Wn.colSelection,h=l.positionAt(a?e:0,a?0:e,r.node),f=s.doc.resolve(r.from+h);return Pb(s.setSelection(d(u,f)))}}return s}}const J7e=ZB("row"),Q7e=ZB("col");function QM(t){return t[0].map((e,n)=>t.map(s=>s[n]))}function JB(t,e){const n=[],s=Cn.get(t);for(let i=0;i<s.height;i++){const o=t.child(i),r=[];for(let a=0;a<s.width;a++){if(!e[i][a])continue;const l=s.map[i*s.width+a],c=e[i][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 QB(t){const e=Cn.get(t),n=[];for(let s=0;s<e.height;s++){const i=[],o={};for(let r=0;r<e.width;r++){const a=e.map[s*e.width+r],l=t.nodeAt(a),c=e.findCell(a);if(o[a]||c.top!==s){i.push(null);continue}o[a]=!0,i.push(l)}n.push(i)}return n}function ez(t,e,n,s){const i=e[0]>n[0]?-1:1,o=t.splice(e[0],e.length),r=o.length%2===0?1:0;let a;return s===-1&&i===1?a=n[0]-1:s===1&&i===-1?a=n[n.length-1]-r+1:a=i===-1?n[0]:n[n.length-1]-r,t.splice(a,0,...o),t}function e$e(t,e,n,s){let i=QM(QB(t.node));return i=ez(i,e,n,s),i=QM(i),JB(t.node,i)}function t$e(t,e,n,s){let i=QB(t.node);return i=ez(i,e,n,s),JB(t.node,i)}function eE(t,e){let n=t,s=t;for(let u=t;u>=0;u--){const d=fh(u,e.selection);d&&d.forEach(h=>{const f=h.node.attrs.colspan+u-1;f>=n&&(n=u),f>s&&(s=f)})}for(let u=t;u<=s;u++){const d=fh(u,e.selection);d&&d.forEach(h=>{const f=h.node.attrs.colspan+u-1;h.node.attrs.colspan>1&&f>s&&(s=f)})}const i=[];for(let u=n;u<=s;u++){const d=fh(u,e.selection);d&&d.length&&i.push(u)}n=i[0],s=i[i.length-1];const o=fh(n,e.selection),r=ph(0,e.selection),a=e.doc.resolve(o[o.length-1].pos);let l;for(let u=s;u>=n;u--){const d=fh(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:i}}function tE(t,e){let n=t,s=t;for(let u=t;u>=0;u--)ph(u,e.selection).forEach(d=>{const h=d.node.attrs.rowspan+u-1;h>=n&&(n=u),h>s&&(s=h)});for(let u=t;u<=s;u++)ph(u,e.selection).forEach(d=>{const h=d.node.attrs.rowspan+u-1;d.node.attrs.rowspan>1&&h>s&&(s=h)});const i=[];for(let u=n;u<=s;u++){const d=ph(u,e.selection);d&&d.length&&i.push(u)}n=i[0],s=i[i.length-1];const o=ph(n,e.selection),r=fh(0,e.selection),a=e.doc.resolve(o[o.length-1].pos);let l;for(let u=s;u>=n;u--){const d=ph(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:i}}function n$e(t){const{tr:e,origin:n,target:s,select:i=!0,pos:o}=t,r=o!=null?e.doc.resolve(o):e.selection.$from,a=A1(r);if(!a)return e;const{indexes:l}=eE(n,e),{indexes:c}=eE(s,e);if(l.includes(s))return e;const u=e$e(a,l,c,0),d=Pb(e).replaceWith(a.pos,a.pos+a.node.nodeSize,u);if(!i)return d;const h=Cn.get(u),f=a.start,p=s,m=h.positionAt(h.height-1,p,u),b=d.doc.resolve(f+m),y=Wn.colSelection,C=h.positionAt(0,p,u),k=d.doc.resolve(f+C);return d.setSelection(y(b,k))}function s$e(t){const{tr:e,origin:n,target:s,select:i=!0,pos:o}=t,r=o!=null?e.doc.resolve(o):e.selection.$from,a=A1(r);if(!a)return e;const{indexes:l}=tE(n,e),{indexes:c}=tE(s,e);if(l.includes(s))return e;const u=t$e(a,l,c,0),d=Pb(e).replaceWith(a.pos,a.pos+a.node.nodeSize,u);if(!i)return d;const h=Cn.get(u),f=a.start,p=s,m=h.positionAt(p,h.width-1,u),b=d.doc.resolve(f+m),y=Wn.rowSelection,C=h.positionAt(p,0,u),k=d.doc.resolve(f+C);return d.setSelection(y(b,k))}const n5=Gt("GoToPrevTableCell",()=>()=>LB(-1));Mt(n5,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});const s5=Gt("GoToNextTableCell",()=>()=>LB(1));Mt(s5,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});const i5=Gt("ExitTable",t=>()=>(e,n)=>{if(!rr(e))return!1;const{$head:s}=e.selection,i=m4e(s,Yf.type(t));if(!i)return!1;const{to:o}=i,r=e.tr.replaceWith(o,o,dl.type(t).createAndFill());return r.setSelection(Ot.near(r.doc.resolve(o),1)).scrollIntoView(),n==null||n(r),!0});Mt(i5,{displayName:"Command<breakTableCommand>",group:"Table"});const tz=Gt("InsertTable",t=>({row:e,col:n}={})=>(s,i)=>{const{selection:o,tr:r}=s,{from:a}=o,l=XB(t,e,n),c=r.replaceSelectionWith(l),u=Ot.findFrom(c.doc.resolve(a),1,!0);return u&&c.setSelection(u),i==null||i(c),!0});Mt(tz,{displayName:"Command<insertTableCommand>",group:"Table"});const nz=Gt("MoveRow",()=>({from:t,to:e,pos:n}={})=>(s,i)=>{const{tr:o}=s;return!!(i!=null&&i(s$e({tr:o,origin:t??0,target:e??0,pos:n,select:!0})))});Mt(nz,{displayName:"Command<moveRowCommand>",group:"Table"});const sz=Gt("MoveCol",()=>({from:t,to:e,pos:n}={})=>(s,i)=>{const{tr:o}=s;return!!(i!=null&&i(n$e({tr:o,origin:t??0,target:e??0,pos:n,select:!0})))});Mt(sz,{displayName:"Command<moveColCommand>",group:"Table"});const iz=Gt("SelectRow",()=>(t={index:0})=>(e,n)=>{const{tr:s}=e;return!!(n!=null&&n(J7e(t.index,t.pos)(s)))});Mt(iz,{displayName:"Command<selectRowCommand>",group:"Table"});const oz=Gt("SelectCol",()=>(t={index:0})=>(e,n)=>{const{tr:s}=e;return!!(n!=null&&n(Q7e(t.index,t.pos)(s)))});Mt(oz,{displayName:"Command<selectColCommand>",group:"Table"});const rz=Gt("SelectTable",()=>()=>(t,e)=>{const{tr:n}=t;return!!(e!=null&&e(Z7e(n)))});Mt(rz,{displayName:"Command<selectTableCommand>",group:"Table"});const az=Gt("DeleteSelectedCells",()=>()=>(t,e)=>{const{selection:n}=t;if(!(n instanceof Wn))return!1;const s=n.isRowSelection(),i=n.isColSelection();return s&&i?HSe(t,e):i?RSe(t,e):FSe(t,e)});Mt(az,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});const lz=Gt("AddColBefore",()=>()=>LSe);Mt(lz,{displayName:"Command<addColBeforeCommand>",group:"Table"});const cz=Gt("AddColAfter",()=>()=>OSe);Mt(cz,{displayName:"Command<addColAfterCommand>",group:"Table"});const uz=Gt("AddRowBefore",t=>()=>(e,n)=>{if(!rr(e))return!1;if(n){const s=Vc(e);n(KB(t,e.tr,s,s.top))}return!0});Mt(uz,{displayName:"Command<addRowBeforeCommand>",group:"Table"});const dz=Gt("AddRowAfter",t=>()=>(e,n)=>{if(!rr(e))return!1;if(n){const s=Vc(e);n(KB(t,e.tr,s,s.bottom))}return!0});Mt(dz,{displayName:"Command<addRowAfterCommand>",group:"Table"});const hz=Gt("SetAlign",()=>(t="left")=>NSe("alignment",t));Mt(hz,{displayName:"Command<setAlignCommand>",group:"Table"});const fz=no(t=>new to(/^\|(?<col>\d+)[xX](?<row>\d+)\|\s$/,(e,n,s,i)=>{var o,r;const a=e.doc.resolve(s);if(!a.node(-1).canReplaceWith(a.index(-1),a.indexAfter(-1),Yf.type(t)))return null;const l=XB(t,Number((o=n.groups)==null?void 0:o.row),Number((r=n.groups)==null?void 0:r.col)),c=e.tr.replaceRangeWith(s,i,l);return c.setSelection(St.create(c.doc,s+3)).scrollIntoView()}));Mt(fz,{displayName:"InputRule<insertTableInputRule>",group:"Table"});const o5=so("tableKeymap",{NextCell:{shortcuts:["Mod-]","Tab"],command:t=>{const e=t.get(cn);return()=>e.call(s5.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:t=>{const e=t.get(cn);return()=>e.call(n5.key)}},ExitTable:{shortcuts:["Mod-Enter"],command:t=>{const e=t.get(cn);return()=>e.call(i5.key)}}});Mt(o5.ctx,{displayName:"KeymapCtx<table>",group:"Table"});Mt(o5.shortcuts,{displayName:"Keymap<table>",group:"Table"});const Vw="footnote_definition",nE="footnoteDefinition",r5=$s("footnote_definition",()=>({group:"block",content:"block+",defining:!0,attrs:{label:{default:""}},parseDOM:[{tag:`dl[data-type="${Vw}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw Ur(t);return{label:t.dataset.label}},contentElement:"dd"}],toDOM:t=>{const e=t.attrs.label;return["dl",{"data-label":e,"data-type":Vw},["dt",e],["dd",0]]},parseMarkdown:{match:({type:t})=>t===nE,runner:(t,e,n)=>{t.openNode(n,{label:e.label}).next(e.children).closeNode()}},toMarkdown:{match:t=>t.type.name===Vw,runner:(t,e)=>{t.openNode(nE,void 0,{label:e.attrs.label,identifier:e.attrs.label}).next(e.content).closeNode()}}}));Mt(r5.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"});Mt(r5.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});const Fw="footnote_reference",a5=$s("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:""}},parseDOM:[{tag:`sup[data-type="${Fw}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw Ur(t);return{label:t.dataset.label}}}],toDOM:t=>{const e=t.attrs.label;return["sup",{"data-label":e,"data-type":Fw},e]},parseMarkdown:{match:({type:t})=>t==="footnoteReference",runner:(t,e,n)=>{t.addNode(n,{label:e.label})}},toMarkdown:{match:t=>t.type.name===Fw,runner:(t,e)=>{t.addNode("footnoteReference",void 0,void 0,{label:e.attrs.label,identifier:e.attrs.label})}}}));Mt(a5.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"});Mt(a5.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});const pz=ga.extendSchema(t=>e=>{const n=t(e);return{...n,attrs:{...n.attrs,checked:{default:null}},parseDOM:[{tag:'li[data-item-type="task"]',getAttrs:s=>{if(!(s instanceof HTMLElement))throw Ur(s);return{label:s.dataset.label,listType:s.dataset.listType,spread:s.dataset.spread,checked:s.dataset.checked?s.dataset.checked==="true":null}}},...(n==null?void 0:n.parseDOM)||[]],toDOM:s=>n.toDOM&&s.attrs.checked==null?n.toDOM(s):["li",{"data-item-type":"task","data-label":s.attrs.label,"data-list-type":s.attrs.listType,"data-spread":s.attrs.spread,"data-checked":s.attrs.checked},0],parseMarkdown:{match:({type:s})=>s==="listItem",runner:(s,i,o)=>{if(i.checked==null){n.parseMarkdown.runner(s,i,o);return}const r=i.label!=null?`${i.label}.`:"•",a=i.checked!=null?!!i.checked:null,l=i.label!=null?"ordered":"bullet",c=i.spread!=null?`${i.spread}`:"true";s.openNode(o,{label:r,listType:l,spread:c,checked:a}),s.next(i.children),s.closeNode()}},toMarkdown:{match:s=>s.type.name==="list_item",runner:(s,i)=>{if(i.attrs.checked==null){n.toMarkdown.runner(s,i);return}const o=i.attrs.label,r=i.attrs.listType,a=i.attrs.spread==="true",l=i.attrs.checked;s.openNode("listItem",void 0,{label:o,listType:r,spread:a,checked:l}),s.next(i.content),s.closeNode()}}}});Mt(pz,{displayName:"NodeSchema<listItem>",group:"ListItem"});const mz=no(()=>new to(/^\[(?<checked>\s|x)\]\s$/,(t,e,n,s)=>{var i;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=((i=e.groups)==null?void 0:i.checked)==="x",c=o.before(r),u=t.tr;return u.deleteRange(n,s).setNodeMarkup(c,void 0,{...a.attrs,checked:l}),u}));Mt(mz,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});const i$e=[t5,o5].flat(),o$e=[fz,mz],r$e=[qB],gz=vs(()=>_9e);Mt(gz,{displayName:"Prose<autoInsertSpanPlugin>",group:"Prose"});const a$e=vs(()=>JSe({}));Mt(a$e,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});const vz=vs(()=>c9e({allowTableNodeSelection:!0}));Mt(vz,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});const l5=bd("remarkGFM",()=>X7e);Mt(l5.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"});Mt(l5.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});const l$e=new Kn("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");function c$e(t,e){let n=0;return e.forEach((s,i,o)=>{s===t&&(n=o)}),n}const _z=vs(()=>new Yn({key:l$e,appendTransaction:(t,e,n)=>{let s;const i=(o,r)=>{if(s||(s=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=c$e(o,l),d=c.maybeChild(u);if(!d)return;const h=d.attrs.alignment,f=o.attrs.alignment;h!==f&&s.setNodeMarkup(r,void 0,{...o.attrs,alignment:h})};return e.doc!==n.doc&&n.doc.descendants(i),s}}));Mt(_z,{displayName:"Prose<keepTableAlignPlugin>",group:"Prose"});const u$e=[_z,gz,l5,vz].flat(),d$e=[pz,Yf,jb,S1,Wb,$1,r5,a5,e5,Wf].flat(),h$e=[s5,n5,i5,tz,nz,sz,iz,oz,rz,az,uz,dz,lz,cz,hz,Ub],f$e=[d$e,o$e,r$e,i$e,h$e,u$e].flat();var ry=200,Ms=function(){};Ms.prototype.append=function(e){return e.length?(e=Ms.from(e),!this.length&&e||e.length<ry&&this.leafAppend(e)||this.length<ry&&e.leafPrepend(this)||this.appendInner(e)):this};Ms.prototype.prepend=function(e){return e.length?Ms.from(e).append(this):this};Ms.prototype.appendInner=function(e){return new p$e(this,e)};Ms.prototype.slice=function(e,n){return e===void 0&&(e=0),n===void 0&&(n=this.length),e>=n?Ms.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,n))};Ms.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)};Ms.prototype.forEach=function(e,n,s){n===void 0&&(n=0),s===void 0&&(s=this.length),n<=s?this.forEachInner(e,n,s,0):this.forEachInvertedInner(e,n,s,0)};Ms.prototype.map=function(e,n,s){n===void 0&&(n=0),s===void 0&&(s=this.length);var i=[];return this.forEach(function(o,r){return i.push(e(o,r))},n,s),i};Ms.from=function(e){return e instanceof Ms?e:e&&e.length?new yz(e):Ms.empty};var yz=function(t){function e(s){t.call(this),this.values=s}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(i,o){return i==0&&o==this.length?this:new e(this.values.slice(i,o))},e.prototype.getInner=function(i){return this.values[i]},e.prototype.forEachInner=function(i,o,r,a){for(var l=o;l<r;l++)if(i(this.values[l],a+l)===!1)return!1},e.prototype.forEachInvertedInner=function(i,o,r,a){for(var l=o-1;l>=r;l--)if(i(this.values[l],a+l)===!1)return!1},e.prototype.leafAppend=function(i){if(this.length+i.length<=ry)return new e(this.values.concat(i.flatten()))},e.prototype.leafPrepend=function(i){if(this.length+i.length<=ry)return new e(i.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(e.prototype,n),e}(Ms);Ms.empty=new yz([]);var p$e=function(t){function e(n,s){t.call(this),this.left=n,this.right=s,this.length=n.length+s.length,this.depth=Math.max(n.depth,s.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(s){return s<this.left.length?this.left.get(s):this.right.get(s-this.left.length)},e.prototype.forEachInner=function(s,i,o,r){var a=this.left.length;if(i<a&&this.left.forEachInner(s,i,Math.min(o,a),r)===!1||o>a&&this.right.forEachInner(s,Math.max(i-a,0),Math.min(this.length,o)-a,r+a)===!1)return!1},e.prototype.forEachInvertedInner=function(s,i,o,r){var a=this.left.length;if(i>a&&this.right.forEachInvertedInner(s,i-a,Math.max(o,a)-a,r+a)===!1||o<a&&this.left.forEachInvertedInner(s,Math.min(i,a),o,r)===!1)return!1},e.prototype.sliceInner=function(s,i){if(s==0&&i==this.length)return this;var o=this.left.length;return i<=o?this.left.slice(s,i):s>=o?this.right.slice(s-o,i-o):this.left.slice(s,o).append(this.right.slice(0,i-o))},e.prototype.leafAppend=function(s){var i=this.right.leafAppend(s);if(i)return new e(this.left,i)},e.prototype.leafPrepend=function(s){var i=this.left.leafPrepend(s);if(i)return new e(i,this.right)},e.prototype.appendInner=function(s){return this.left.depth>=Math.max(this.right.depth,s.depth)+1?new e(this.left,new e(this.right,s)):new e(this,s)},e}(Ms);const m$e=500;class fr{constructor(e,n){this.items=e,this.eventCount=n}popEvent(e,n){if(this.eventCount==0)return null;let s=this.items.length;for(;;s--)if(this.items.get(s-1).selection){--s;break}let i,o;n&&(i=this.remapping(s,this.items.length),o=i.maps.length);let r=e.tr,a,l,c=[],u=[];return this.items.forEach((d,h)=>{if(!d.step){i||(i=this.remapping(s,h+1),o=i.maps.length),o--,u.push(d);return}if(i){u.push(new na(d.map));let f=d.step.map(i.slice(o)),p;f&&r.maybeStep(f).doc&&(p=r.mapping.maps[r.mapping.maps.length-1],c.push(new na(p,void 0,void 0,c.length+u.length))),o--,p&&i.appendMap(p,o)}else r.maybeStep(d.step);if(d.selection)return a=i?d.selection.map(i.slice(o)):d.selection,l=new fr(this.items.slice(0,s).append(u.reverse().concat(c)),this.eventCount-1),!1},this.items.length,0),{remaining:l,transform:r,selection:a}}addTransform(e,n,s,i){let o=[],r=this.eventCount,a=this.items,l=!i&&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 na(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),i||(l=h)}let c=r-s.depth;return c>v$e&&(a=g$e(a,c),r-=c),new fr(a.append(o),r)}remapping(e,n){let s=new Ih;return this.items.forEach((i,o)=>{let r=i.mirrorOffset!=null&&o-i.mirrorOffset>=e?s.maps.length-i.mirrorOffset:void 0;s.appendMap(i.map,r)},e,n),s}addMaps(e){return this.eventCount==0?this:new fr(this.items.append(e.map(n=>new na(n))),this.eventCount)}rebased(e,n){if(!this.eventCount)return this;let s=[],i=Math.max(0,this.items.length-n),o=e.mapping,r=e.steps.length,a=this.eventCount;this.items.forEach(h=>{h.selection&&a--},i);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]),b=h.selection&&h.selection.map(o.slice(l+1,f));b&&a++,s.push(new na(p,m,b))}else s.push(new na(p))},i);let c=[];for(let h=n;h<r;h++)c.push(new na(o.maps[h]));let u=this.items.slice(0,i).append(c).append(s),d=new fr(u,a);return d.emptyItemCount()>m$e&&(d=d.compress(this.items.length-s.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),s=n.maps.length,i=[],o=0;return this.items.forEach((r,a)=>{if(a>=e)i.push(r),r.selection&&o++;else if(r.step){let l=r.step.map(n.slice(s)),c=l&&l.getMap();if(s--,c&&n.appendMap(c,s),l){let u=r.selection&&r.selection.map(n.slice(s));u&&o++;let d=new na(c.invert(),l,u),h,f=i.length-1;(h=i.length&&i[f].merge(d))?i[f]=h:i.push(d)}}else r.map&&s--},this.items.length,0),new fr(Ms.from(i.reverse()),o)}}fr.empty=new fr(Ms.empty,0);function g$e(t,e){let n;return t.forEach((s,i)=>{if(s.selection&&e--==0)return n=i,!1}),t.slice(n)}class na{constructor(e,n,s,i){this.map=e,this.step=n,this.selection=s,this.mirrorOffset=i}merge(e){if(this.step&&e.step&&!e.selection){let n=e.step.merge(this.step);if(n)return new na(n.getMap().invert(),n,this.selection)}}}class jl{constructor(e,n,s,i,o){this.done=e,this.undone=n,this.prevRanges=s,this.prevTime=i,this.prevComposition=o}}const v$e=20;function _$e(t,e,n,s){let i=n.getMeta(Ru),o;if(i)return i.historyState;n.getMeta(w$e)&&(t=new jl(t.done,t.undone,null,0,-1));let r=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(r&&r.getMeta(Ru))return r.getMeta(Ru).redo?new jl(t.done.addTransform(n,void 0,s,Lv(e)),t.undone,sE(n.mapping.maps),t.prevTime,t.prevComposition):new jl(t.done,t.undone.addTransform(n,void 0,s,Lv(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)-s.newGroupDelay||!y$e(n,t.prevRanges)),c=r?Nw(t.prevRanges,n.mapping):sE(n.mapping.maps);return new jl(t.done.addTransform(n,l?e.selection.getBookmark():void 0,s,Lv(e)),fr.empty,c,n.time,a??t.prevComposition)}else return(o=n.getMeta("rebased"))?new jl(t.done.rebased(n,o),t.undone.rebased(n,o),Nw(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new jl(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),Nw(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function y$e(t,e){if(!e)return!1;if(!t.docChanged)return!0;let n=!1;return t.mapping.maps[0].forEach((s,i)=>{for(let o=0;o<e.length;o+=2)s<=e[o+1]&&i>=e[o]&&(n=!0)}),n}function sE(t){let e=[];for(let n=t.length-1;n>=0&&e.length==0;n--)t[n].forEach((s,i,o,r)=>e.push(o,r));return e}function Nw(t,e){if(!t)return null;let n=[];for(let s=0;s<t.length;s+=2){let i=e.map(t[s],1),o=e.map(t[s+1],-1);i<=o&&n.push(i,o)}return n}function b$e(t,e,n){let s=Lv(e),i=Ru.get(e).spec.config,o=(n?t.undone:t.done).popEvent(e,s);if(!o)return null;let r=o.selection.resolve(o.transform.doc),a=(n?t.done:t.undone).addTransform(o.transform,e.selection.getBookmark(),i,s),l=new jl(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(r).setMeta(Ru,{redo:n,historyState:l})}let Bw=!1,iE=null;function Lv(t){let e=t.plugins;if(iE!=e){Bw=!1,iE=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){Bw=!0;break}}return Bw}const Ru=new Kn("history"),w$e=new Kn("closeHistory");function C$e(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new Yn({key:Ru,state:{init(){return new jl(fr.empty,fr.empty,null,0,-1)},apply(e,n,s){return _$e(n,s,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let s=n.inputType,i=s=="historyUndo"?wz:s=="historyRedo"?Cz:null;return i?(n.preventDefault(),i(e.state,e.dispatch)):!1}}}})}function bz(t,e){return(n,s)=>{let i=Ru.getState(n);if(!i||(t?i.undone:i.done).eventCount==0)return!1;if(s){let o=b$e(i,n,t);o&&s(e?o.scrollIntoView():o)}return!0}}const wz=bz(!1,!0),Cz=bz(!0,!0);function Gf(t,e){return Object.assign(t,{meta:{package:"@milkdown/plugin-history",...e}}),t}const c5=Gt("Undo",()=>()=>wz);Gf(c5,{displayName:"Command<undo>"});const u5=Gt("Redo",()=>()=>Cz);Gf(u5,{displayName:"Command<redo>"});const d5=es({},"historyProviderConfig");Gf(d5,{displayName:"Ctx<historyProviderConfig>"});const kz=vs(t=>C$e(t.get(d5.key)));Gf(kz,{displayName:"Ctx<historyProviderPlugin>"});const h5=so("historyKeymap",{Undo:{shortcuts:"Mod-z",command:t=>{const e=t.get(cn);return()=>e.call(c5.key)}},Redo:{shortcuts:["Mod-y","Shift-Mod-z"],command:t=>{const e=t.get(cn);return()=>e.call(u5.key)}}});Gf(h5.ctx,{displayName:"KeymapCtx<history>"});Gf(h5.shortcuts,{displayName:"Keymap<history>"});const k$e=[d5,kz,h5,c5,u5].flat();function EC(t){if(!t)return!1;if(Array.isArray(t))return t.length>1?!1:EC(t[0]);const e=t.content;return e?EC(e):t.type==="text"}function x$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 xz=vs(t=>{const e=t.get($r);t.update(Om,s=>({...s,editable:s.editable??(()=>!0)}));const n=new Kn("MILKDOWN_CLIPBOARD");return new Yn({key:n,props:{handlePaste:(s,i)=>{var o,r;const a=t.get(Vh),l=(r=(o=s.props).editable)==null?void 0:r.call(o,s.state),{clipboardData:c}=i;if(!l||!c||s.state.selection.$from.node().type.spec.code)return!1;const u=c.getData("text/plain"),d=c.getData("vscode-editor-data");if(d){const y=JSON.parse(d),C=y==null?void 0:y.mode;if(u&&C){const{tr:k}=s.state,x=g4e("code_block",e);return k.replaceSelectionWith(x.create({language:C})).setSelection(St.near(k.doc.resolve(Math.max(0,k.selection.from-2)))).insertText(u.replace(/\r\n?/g,` | |
| 130 | -`)),s.dispatch(k),!0}}const h=c.getData("text/html");if(h.length===0&&u.length===0)return!1;const f=Xu.fromSchema(e);let p;if(h.length===0){const y=a(u);if(!y||typeof y=="string")return!1;p=Ic.fromSchema(e).serializeFragment(y.content)}else{const y=document.createElement("template");y.innerHTML=h,p=y.content.cloneNode(!0),y.remove()}const m=f.parseSlice(p),b=x$e(m);return b?(s.dispatch(s.state.tr.replaceSelectionWith(b,!0)),!0):(s.dispatch(s.state.tr.replaceSelection(m)),!0)},clipboardTextSerializer:s=>{const i=t.get(Fh);if(EC(s.content.toJSON()))return s.content.textBetween(0,s.content.size,` | |
| 125 | +`):e.addNode("break")}}}));Ve(ad.node,{displayName:"NodeSchema<hardbreak>",group:"Hardbreak"});Ve(ad.ctx,{displayName:"NodeSchemaCtx<hardbreak>",group:"Hardbreak"});const L5=on("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(Ut.near(o.doc.resolve(s.to))).scrollIntoView()),!0}return n==null||n(o.setMeta("hardbreak",!0).replaceSelectionWith(ad.type(t).create()).scrollIntoView()),!0});Ve(L5,{displayName:"Command<insertHardbreakCommand>",group:"Hardbreak"});const O5=ko("hardbreakKeymap",{InsertHardbreak:{shortcuts:"Shift-Enter",command:t=>{const e=t.get(gn);return()=>e.call(L5.key)}}});Ve(O5.ctx,{displayName:"KeymapCtx<hardbreak>",group:"Hardbreak"});Ve(O5.shortcuts,{displayName:"Keymap<hardbreak>",group:"Hardbreak"});const D5=aa("hr");Ve(D5,{displayName:"Attr<hr>",group:"Hr"});const bp=zs("hr",t=>({group:"block",parseDOM:[{tag:"hr"}],toDOM:e=>["hr",t.get(D5.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(bp.node,{displayName:"NodeSchema<hr>",group:"Hr"});Ve(bp.ctx,{displayName:"NodeSchemaCtx<hr>",group:"Hr"});const Pz=wo(t=>new Go(/^(?:---|___\s|\*\*\*\s)$/,(e,n,i,s)=>{const{tr:o}=e;return n[0]&&o.replaceWith(i-1,s,bp.type(t).create()),o}));Ve(Pz,{displayName:"InputRule<insertHrInputRule>",group:"Hr"});const Iz=on("InsertHr",t=>()=>(e,n)=>{if(!n)return!0;const i=Ol.node.type(t).create(),{tr:s,selection:o}=e,{from:r}=o,a=bp.type(t).create();if(!a)return!0;const l=s.replaceSelectionWith(a).insert(r,i),c=Ut.findFrom(l.doc.resolve(r),1,!0);return c&&n(l.setSelection(c).scrollIntoView()),!0});Ve(Iz,{displayName:"Command<insertHrCommand>",group:"Hr"});const R5=aa("bulletList");Ve(R5,{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 ra(e);return{spread:e.dataset.spread}}}],toDOM:e=>["ul",{...t.get(R5.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 Lz=wo(t=>J8(/^\s*([-+*])\s$/,Zd.type(t)));Ve(Lz,{displayName:"InputRule<wrapInBulletListInputRule>",group:"BulletList"});const V5=on("WrapInBulletList",t=>()=>s5(Zd.type(t)));Ve(V5,{displayName:"Command<wrapInBulletListCommand>",group:"BulletList"});const F5=ko("bulletListKeymap",{WrapInBulletList:{shortcuts:"Mod-Alt-8",command:t=>{const e=t.get(gn);return()=>e.call(V5.key)}}});Ve(F5.ctx,{displayName:"KeymapCtx<bulletListKeymap>",group:"BulletList"});Ve(F5.shortcuts,{displayName:"Keymap<bulletListKeymap>",group:"BulletList"});const N5=aa("orderedList");Ve(N5,{displayName:"Attr<orderedList>",group:"OrderedList"});const Jd=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 ra(e);return{spread:e.dataset.spread,order:e.hasAttribute("start")?Number(e.getAttribute("start")):1}}}],toDOM:e=>["ol",{...t.get(N5.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(Jd.node,{displayName:"NodeSchema<orderedList>",group:"OrderedList"});Ve(Jd.ctx,{displayName:"NodeSchemaCtx<orderedList>",group:"OrderedList"});const Oz=wo(t=>J8(/^\s*(\d+)\.\s$/,Jd.type(t),e=>({order:Number(e[1])}),(e,n)=>n.childCount+n.attrs.order===Number(e[1])));Ve(Oz,{displayName:"InputRule<wrapInOrderedListInputRule>",group:"OrderedList"});const B5=on("WrapInOrderedList",t=>()=>s5(Jd.type(t)));Ve(B5,{displayName:"Command<wrapInOrderedListCommand>",group:"OrderedList"});const z5=ko("orderedListKeymap",{WrapInOrderedList:{shortcuts:"Mod-Alt-7",command:t=>{const e=t.get(gn);return()=>e.call(B5.key)}}});Ve(z5.ctx,{displayName:"KeymapCtx<orderedList>",group:"OrderedList"});Ve(z5.shortcuts,{displayName:"Keymap<orderedList>",group:"OrderedList"});const H5=aa("listItem");Ve(H5,{displayName:"Attr<listItem>",group:"ListItem"});const Da=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 ra(e);return{label:e.dataset.label,listType:e.dataset.listType,spread:e.dataset.spread}}}],toDOM:e=>["li",{...t.get(H5.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(Da.node,{displayName:"NodeSchema<listItem>",group:"ListItem"});Ve(Da.ctx,{displayName:"NodeSchemaCtx<listItem>",group:"ListItem"});const U5=on("SinkListItem",t=>()=>A7e(Da.type(t)));Ve(U5,{displayName:"Command<sinkListItemCommand>",group:"ListItem"});const j5=on("LiftListItem",t=>()=>vz(Da.type(t)));Ve(j5,{displayName:"Command<liftListItemCommand>",group:"ListItem"});const W5=on("SplitListItem",t=>()=>x7e(Da.type(t)));Ve(W5,{displayName:"Command<splitListItemCommand>",group:"ListItem"});function O7e(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!==Da.type(t)||a.firstChild!==r.node()||r.node(-2).childCount>1?!1:vz(Da.type(t))(e,n,i)}}const Y5=on("LiftFirstListItem",t=>()=>O7e(t));Ve(Y5,{displayName:"Command<liftFirstListItemCommand>",group:"ListItem"});const q5=ko("listItemKeymap",{NextListItem:{shortcuts:"Enter",command:t=>{const e=t.get(gn);return()=>e.call(W5.key)}},SinkListItem:{shortcuts:["Tab","Mod-]"],command:t=>{const e=t.get(gn);return()=>e.call(U5.key)}},LiftListItem:{shortcuts:["Shift-Tab","Mod-["],command:t=>{const e=t.get(gn);return()=>e.call(j5.key)}},LiftFirstListItem:{shortcuts:["Backspace","Delete"],command:t=>{const e=t.get(gn);return()=>e.call(Y5.key)}}});Ve(q5.ctx,{displayName:"KeymapCtx<listItem>",group:"ListItem"});Ve(q5.shortcuts,{displayName:"Keymap<listItem>",group:"ListItem"});const Dz=h5("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(Dz,{displayName:"NodeSchema<text>",group:"Text"});const G5=aa("html");Ve(G5,{displayName:"Attr<html>",group:"Html"});const X5=zs("html",t=>({atom:!0,group:"inline",inline:!0,attrs:{value:{default:""}},toDOM:e=>{const n=document.createElement("span"),i={...t.get(G5.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(X5.node,{displayName:"NodeSchema<html>",group:"Html"});Ve(X5.ctx,{displayName:"NodeSchemaCtx<html>",group:"Html"});const D7e=[Sz,b5,Ol,O2,C5,$a,qy,ad,$5,_p,M5,yp,D5,bp,I5,Kd,R5,Zd,N5,Jd,H5,Da,f5,Xd,m5,vp,v5,ll,y5,Yr,G5,X5,Dz].flat(),R7e=[Az,Lz,Oz,Ez,Pz,$z].flat(),V7e=[yz,bz,kz,wz],F7e=[w5,A5,fc,x5,T5,L5,Iz,Mz,Tz,B5,V5,U5,W5,j5,Y5,P2,L2,I2,Cz,xz],N7e=[E5,P5,O5,S5,q5,z5,F5,k5,p5,_5,g5].flat(),K5=Gd("remarkAddOrderInList",()=>()=>t=>{qd(t,"list",e=>{if(e.ordered){const n=e.start??1;e.children.forEach((i,s)=>{i.label=s+n})}})});Ve(K5.plugin,{displayName:"Remark<remarkAddOrderInListPlugin>",group:"Remark"});Ve(K5.options,{displayName:"RemarkConfig<remarkAddOrderInListPlugin>",group:"Remark"});const Z5=Gd("remarkLineBreak",()=>()=>t=>{const e=/[\t ]*(?:\r?\n|\r)/g;qd(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(Z5.plugin,{displayName:"Remark<remarkLineBreak>",group:"Remark"});Ve(Z5.options,{displayName:"RemarkConfig<remarkLineBreak>",group:"Remark"});const J5=Gd("remarkInlineLink",()=>M7e);Ve(J5.plugin,{displayName:"Remark<remarkInlineLinkPlugin>",group:"Remark"});Ve(J5.options,{displayName:"RemarkConfig<remarkInlineLinkPlugin>",group:"Remark"});const B7e=t=>!!t.children,z7e=t=>t.type==="html";function H7e(t,e){return n(t,0,null)[0];function n(i,s,o){if(B7e(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 Q5=Gd("remarkHTMLTransformer",()=>()=>t=>{H7e(t,(e,n,i)=>z7e(e)?((i==null?void 0:i.type)==="root"&&(e.children=[{...e}],delete e.value,e.type="paragraph"),[e]):[e])});Ve(Q5.plugin,{displayName:"Remark<remarkHtmlTransformer>",group:"Remark"});Ve(Q5.options,{displayName:"RemarkConfig<remarkHtmlTransformer>",group:"Remark"});const eS=Gd("remarkMarker",()=>()=>(t,e)=>{const n=i=>e.value.charAt(i.position.start.offset);qd(t,i=>["strong","emphasis"].includes(i.type),i=>{i.marker=n(i)})});Ve(eS.plugin,{displayName:"Remark<remarkMarker>",group:"Remark"});Ve(eS.options,{displayName:"RemarkConfig<remarkMarker>",group:"Remark"});const Rz=Ls(()=>{let t=!1;const e=new ps("MILKDOWN_INLINE_NODES_CURSOR"),n=new rs({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"}),Kn.create(i.doc,[r,l])}return Kn.empty}}});return n});Ve(Rz,{displayName:"Prose<inlineNodesCursorPlugin>",group:"Prose"});const Vz=Ls(t=>new rs({key:new ps("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 ti))return;const{from:r}=o;return i.tr.setNodeMarkup(r,ad.type(t),void 0,[])}if(o instanceof al){let r=i.tr;const{from:a,to:l}=o;return i.doc.nodesBetween(a,l,(c,u)=>{c.type===ad.type(t)&&(r=r.setNodeMarkup(u,ad.type(t),void 0,[]))}),r}}}));Ve(Vz,{displayName:"Prose<hardbreakClearMarkPlugin>",group:"Prose"});const tS=ms(["table","code_block"],"hardbreakFilterNodes");Ve(tS,{displayName:"Ctx<hardbreakFilterNodes>",group:"Prose"});const Fz=Ls(t=>{const e=t.get(tS.key);return new rs({key:new ps("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(Fz,{displayName:"Prose<hardbreakFilterPlugin>",group:"Prose"});const Nz=Ls(t=>{const e=new ps("MILKDOWN_HEADING_ID"),n=i=>{if(i.composing)return;const s=t.get(O2.key),o=i.state.tr.setMeta("addToHistory",!1);let r=!1;i.state.doc.descendants((a,l)=>{if(a.type===$a.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 rs({key:e,view:i=>(n(i),{update:(s,o)=>{s.state.doc.eq(o.doc)||n(s)}})})});Ve(Nz,{displayName:"Prose<syncHeadingIdPlugin>",group:"Prose"});const Bz=Ls(t=>{const e=n=>{if(n.composing||!n.editable)return;const i=Jd.type(t),s=Zd.type(t),o=Da.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 rs({key:new ps("MILKDOWN_KEEP_LIST_ORDER"),view:n=>(e(n),{update:i=>{e(i)}})})});Ve(Bz,{displayName:"Prose<syncListOrderPlugin>",group:"Prose"});const U7e=[Vz,tS,Fz,Rz,K5,J5,Z5,Q5,eS,Nz,Bz].flat(),j7e=[D7e,R7e,V7e,F7e,N7e,U7e].flat();var _x,yx;if(typeof WeakMap<"u"){let t=new WeakMap;_x=e=>t.get(e),yx=(e,n)=>(t.set(e,n),n)}else{const t=[];let n=0;_x=i=>{for(let s=0;s<t.length;s+=2)if(t[s]==i)return t[s+1]},yx=(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 _x(t)||yx(t,W7e(t))}};function W7e(t){if(t.type.spec.tableRole!="table")throw new RangeError("Not a table node: "+t.type.name);const e=Y7e(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 S=0;S<y;S++){i[$+S]==0?i[$+S]=u:(o||(o=[])).push({type:"collision",row:c,pos:u,n:y-S});const M=k&&k[S];if(M){const P=($+S)%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&&q7e(a,r,t),a}function Y7e(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 q7e(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=G7e(l)))[c]=d)}a&&t.problems.unshift({type:"colwidth mismatch",pos:o,colwidth:a})}}function G7e(t){if(t.colwidth)return t.colwidth.slice();const e=[];for(let n=0;n<t.colspan;n++)e.push(0);return e}function DM(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 RM(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 X7e(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=>DM(i,e)}],toDOM(i){return["td",RM(i,e),0]}},table_header:{content:t.cellContent,attrs:n,tableRole:"header_cell",isolating:!0,parseDOM:[{tag:"th",getAttrs:i=>DM(i,e)}],toDOM(i){return["th",RM(i,e),0]}}}}function Cr(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 vc=new ps("selectingCells");function av(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 Er(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 D2(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=av(e.$head)||K7e(e.$head);if(n)return n;throw new RangeError(`No cell found around position ${e.head}`)}function K7e(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 bx(t){return t.parent.type.spec.tableRole=="row"&&!!t.nodeAfter}function Z7e(t){return t.node(0).resolve(t.pos+t.nodeAfter.nodeSize)}function nS(t,e){return t.depth==e.depth&&t.pos>=e.start(-1)&&t.pos<=e.end(-1)}function zz(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 Ad(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 J7e(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 Q7e(t,e,n){const i=Cr(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 as=class Xa extends Ut{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 zy(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(bx(i)&&bx(s)&&nS(i,s)){const o=this.$anchorCell.node(-1)!=i.node(-1);return o&&this.isRowSelection()?Xa.rowSelection(i,s):o&&this.isColSelection()?Xa.colSelection(i,s):new Xa(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=Ad(b,0,m)),y>0&&(b=Ad(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(st.from(c)))}const a=this.isColSelection()&&this.isRowSelection()?e:r;return new rt(st.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=Ut.findFrom(e.doc.resolve(e.mapping.slice(i).map(this.to)),-1);o&&e.setSelection(o)}replaceWith(e,n){this.replace(e,new rt(st.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 Xa(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 Xa&&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 Xa(e,n)}toJSON(){return{type:"cell",anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(e,n){return new Xa(e.resolve(n.anchor),e.resolve(n.head))}static create(e,n,i=n){return new Xa(e.resolve(n),e.resolve(i))}getBookmark(){return new e$e(this.$anchorCell.pos,this.$headCell.pos)}};as.prototype.visible=!1;Ut.jsonID("cell",as);var e$e=class Hz{constructor(e,n){this.anchor=e,this.head=n}map(e){return new Hz(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&&nS(n,i)?new as(n,i):Ut.near(i,1)}};function t$e(t){if(!(t.selection instanceof as))return null;const e=[];return t.selection.forEachCell((n,i)=>{e.push(Fs.node(i,i+n.nodeSize,{class:"selectedCell"}))}),Kn.create(t.doc,e)}function n$e({$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 s$e({$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 i$e(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=as.create(s,i.from);else if(r=="row"){const a=s.resolve(i.from+1);o=as.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=as.create(s,l+1,c)}}else i instanceof Ot&&n$e(i)?o=Ot.create(s,i.from):i instanceof Ot&&s$e(i)&&(o=Ot.create(s,i.$from.start(),i.$from.end()));return o&&(e||(e=t.tr)).setSelection(o),e}var o$e=new ps("fix-tables");function Uz(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)?Uz(t.child(a),l,n+1,i):l.nodesBetween(0,l.content.size,i,n+1),n+=l.nodeSize}}function r$e(t,e){let n;const i=(s,o)=>{s.type.spec.tableRole=="table"&&(n=a$e(t,s,o,n))};return e?e.doc!=t.doc&&Uz(e.doc,t.doc,0,i):t.doc.descendants(i),n}function a$e(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,Ad(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=Cr(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(o$e,{fixTables:!0})}function lu(t){const e=t.selection,n=D2(t),i=n.node(-1),s=n.start(-1),o=Pn.get(i);return{...e instanceof as?o.rectBetween(e.$anchorCell.pos-s,e.$headCell.pos-s):o.findCell(n.pos-s),tableStart:s,map:o,table:i}}function jz(t,{map:e,tableStart:n,table:i},s){let o=s>0?-1:0;Q7e(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,J7e(c.attrs,s-e.colCount(l))),r+=c.attrs.rowspan-1}else{const l=o==null?Cr(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 l$e(t,e){if(!Er(t))return!1;if(e){const n=lu(t);e(jz(t.tr,n,n.left))}return!0}function c$e(t,e){if(!Er(t))return!1;if(e){const n=lu(t);e(jz(t.tr,n,n.right))}return!0}function u$e(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,Ad(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 d$e(t,e){if(!Er(t))return!1;if(e){const n=lu(t),i=t.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let s=n.right-1;u$e(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 h$e(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 f$e(t,e){if(!Er(t))return!1;if(e){const n=lu(t),i=t.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let s=n.bottom-1;h$e(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 p$e(t,e){return function(n,i){if(!Er(n))return!1;const s=D2(n);if(s.nodeAfter.attrs[t]===e)return!1;if(i){const o=n.tr;n.selection instanceof as?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 m$e(t){return function(e,n){if(!Er(e))return!1;if(n){const i=Cr(e.schema),s=lu(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 VM(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 sS(t,e){return e=e||{useDeprecatedLogic:!1},e.useDeprecatedLogic?m$e(t):function(n,i){if(!Er(n))return!1;if(i){const s=Cr(n.schema),o=lu(n),r=n.tr,a=VM("row",o,s),l=VM("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}}sS("row",{useDeprecatedLogic:!0});sS("column",{useDeprecatedLogic:!0});sS("cell",{useDeprecatedLogic:!0});function g$e(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 Wz(t){return function(e,n){if(!Er(e))return!1;const i=g$e(D2(e),t);if(i==null)return!1;if(n){const s=e.doc.resolve(i);n(e.tr.setSelection(Ot.between(s,Z7e(s))).scrollIntoView())}return!0}}function v$e(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 d0(t,e){const n=t.selection;if(!(n instanceof as))return!1;if(e){const i=t.tr,s=Cr(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 _$e(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=wx(Cr(r).row,new rt(c,u,d)).content),a.push(c)}else if(o=="cell"||o=="header_cell")a.push(n||i?wx(Cr(r).row,new rt(e,n,i)).content:e);else return null;return y$e(r,a)}function y$e(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(st.empty),n[s]<i){const o=Cr(t).cell.createAndFill(),r=[];for(let a=n[s];a<i;a++)r.push(o);e[s]=e[s].append(st.from(r))}return{height:e.length,width:i,rows:e}}function wx(t,e){const n=t.createAndFill();return new rB(n).replace(0,n.content.size,e).doc}function b$e({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(Ad(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(st.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(st.from(l))}n=o,e=s}return{width:t,height:e,rows:n}}function w$e(t,e,n,i,s,o,r){const a=t.doc.type.schema,l=Cr(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,st.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 FM(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 NM(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,Ad(h.attrs,r-f,h.attrs.colspan-(r-f))),t.insert(p+h.nodeSize,h.type.createAndFill(Ad(h.attrs,0,r-f))),c+=h.attrs.rowspan-1}}return l}function BM(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}w$e(d,r,o,n,c,u,h)&&f(),FM(d,r,o,n,l,c,a,h)&&f(),FM(d,r,o,n,l,c,u,h)&&f(),NM(d,r,o,n,a,u,l,h)&&f(),NM(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 as(d.doc.resolve(n+r.positionAt(a,l,o)),d.doc.resolve(n+r.positionAt(u-1,c-1,o)))),e(d)}var k$e=CB({ArrowLeft:h0("horiz",-1),ArrowRight:h0("horiz",1),ArrowUp:h0("vert",-1),ArrowDown:h0("vert",1),"Shift-ArrowLeft":f0("horiz",-1),"Shift-ArrowRight":f0("horiz",1),"Shift-ArrowUp":f0("vert",-1),"Shift-ArrowDown":f0("vert",1),Backspace:d0,"Mod-Backspace":d0,Delete:d0,"Mod-Delete":d0});function g_(t,e,n){return n.eq(t.selection)?!1:(e&&e(t.tr.setSelection(n).scrollIntoView()),!0)}function h0(t,e){return(n,i,s)=>{if(!s)return!1;const o=n.selection;if(o instanceof as)return g_(n,i,Ut.near(o.$headCell,e));if(t!="horiz"&&!o.empty)return!1;const r=Yz(s,t,e);if(r==null)return!1;if(t=="horiz")return g_(n,i,Ut.near(n.doc.resolve(o.head+e),e));{const a=n.doc.resolve(r),l=zz(a,t,e);let c;return l?c=Ut.near(l,1):e<0?c=Ut.near(n.doc.resolve(a.before(-1)),-1):c=Ut.near(n.doc.resolve(a.after(-1)),1),g_(n,i,c)}}}function f0(t,e){return(n,i,s)=>{if(!s)return!1;const o=n.selection;let r;if(o instanceof as)r=o;else{const l=Yz(s,t,e);if(l==null)return!1;r=new as(n.doc.resolve(l))}const a=zz(r.$headCell,t,e);return a?g_(n,i,new as(r.$anchorCell,a)):!1}}function C$e(t,e){const n=t.state.doc,i=av(n.resolve(e));return i?(t.dispatch(t.state.tr.setSelection(new as(i))),!0):!1}function x$e(t,e,n){if(!Er(t.state))return!1;let i=_$e(n);const s=t.state.selection;if(s instanceof as){i||(i={width:1,height:1,rows:[st.from(wx(Cr(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=b$e(i,a.right-a.left,a.bottom-a.top),BM(t.state,t.dispatch,r,a,i),!0}else if(i){const o=D2(t.state),r=o.start(-1);return BM(t.state,t.dispatch,r,Pn.get(o.node(-1)).findCell(o.pos-r),i),!0}else return!1}function S$e(t,e){var n;if(e.ctrlKey||e.metaKey)return;const i=zM(t,e.target);let s;if(e.shiftKey&&t.state.selection instanceof as)o(t.state.selection.$anchorCell,e),e.preventDefault();else if(e.shiftKey&&i&&(s=av(t.state.selection.$anchor))!=null&&((n=A3(t,e))==null?void 0:n.pos)!=s.pos)o(s,e),e.preventDefault();else if(!i)return;function o(l,c){let u=A3(t,c);const d=vc.getState(t.state)==null;if(!u||!nS(l,u))if(d)u=l;else return;const h=new as(l,u);if(d||!t.state.selection.eq(h)){const f=t.state.tr.setSelection(h);d&&f.setMeta(vc,l.pos),t.dispatch(f)}}function r(){t.root.removeEventListener("mouseup",r),t.root.removeEventListener("dragstart",r),t.root.removeEventListener("mousemove",a),vc.getState(t.state)!=null&&t.dispatch(t.state.tr.setMeta(vc,-1))}function a(l){const c=l,u=vc.getState(t.state);let d;if(u!=null)d=t.state.doc.resolve(u);else if(zM(t,c.target)!=i&&(d=A3(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 Yz(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 zM(t,e){for(;e&&e!=t.dom;e=e.parentNode)if(e.nodeName=="TD"||e.nodeName=="TH")return e;return null}function A3(t,e){const n=t.posAtCoords({left:e.clientX,top:e.clientY});return n&&n?av(t.state.doc.resolve(n.pos)):null}var $$e=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")),kx(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,kx(t,this.colgroup,this.table,this.cellMinWidth),!0)}ignoreMutation(t){return t.type=="attributes"&&(t.target==this.table||this.colgroup.contains(t.target))}};function kx(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 lr=new ps("tableColumnResizing");function A$e({handleWidth:t=5,cellMinWidth:e=25,View:n=$$e,lastColumnResizable:i=!0}={}){const s=new rs({key:lr,state:{init(o,r){var a,l;const c=(l=(a=s.spec)==null?void 0:a.props)==null?void 0:l.nodeViews,u=Cr(r.schema).table.name;return n&&c&&(c[u]=(d,h)=>new n(d,e,h)),new E$e(-1,!1)},apply(o,r){return r.apply(o)}},props:{attributes:o=>{const r=lr.getState(o);return r&&r.activeHandle>-1?{class:"resize-cursor"}:{}},handleDOMEvents:{mousemove:(o,r)=>{M$e(o,r,t,e,i)},mouseleave:o=>{T$e(o)},mousedown:(o,r)=>{P$e(o,r,e)}},decorations:o=>{const r=lr.getState(o);if(r&&r.activeHandle>-1)return V$e(o,r.activeHandle)},nodeViews:{}}});return s}var E$e=class v_{constructor(e,n){this.activeHandle=e,this.dragging=n}apply(e){const n=this,i=e.getMeta(lr);if(i&&i.setHandle!=null)return new v_(i.setHandle,!1);if(i&&i.setDragging!==void 0)return new v_(n.activeHandle,i.setDragging);if(n.activeHandle>-1&&e.docChanged){let s=e.mapping.map(n.activeHandle,-1);return bx(e.doc.resolve(s))||(s=-1),new v_(s,n.dragging)}return n}};function M$e(t,e,n,i,s){const o=lr.getState(t.state);if(o&&!o.dragging){const r=L$e(e.target);let a=-1;if(r){const{left:l,right:c}=r.getBoundingClientRect();e.clientX-l<=n?a=HM(t,e,"left",n):c-e.clientX<=n&&(a=HM(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}qz(t,a)}}}function T$e(t){const e=lr.getState(t.state);e&&e.activeHandle>-1&&!e.dragging&&qz(t,-1)}function P$e(t,e,n){var i;const s=(i=t.dom.ownerDocument.defaultView)!=null?i:window,o=lr.getState(t.state);if(!o||o.activeHandle==-1||o.dragging)return!1;const r=t.state.doc.nodeAt(o.activeHandle),a=I$e(t,o.activeHandle,r.attrs);t.dispatch(t.state.tr.setMeta(lr,{setDragging:{startX:e.clientX,startWidth:a}}));function l(u){s.removeEventListener("mouseup",l),s.removeEventListener("mousemove",c);const d=lr.getState(t.state);d!=null&&d.dragging&&(O$e(t,d.activeHandle,UM(d.dragging,u,n)),t.dispatch(t.state.tr.setMeta(lr,{setDragging:null})))}function c(u){if(!u.which)return l(u);const d=lr.getState(t.state);if(d&&d.dragging){const h=UM(d.dragging,u,n);D$e(t,d.activeHandle,h,n)}}return s.addEventListener("mouseup",l),s.addEventListener("mousemove",c),e.preventDefault(),!0}function I$e(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 L$e(t){for(;t&&t.nodeName!="TD"&&t.nodeName!="TH";)t=t.classList&&t.classList.contains("ProseMirror")?null:t.parentNode;return t}function HM(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=av(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 UM(t,e,n){const i=e.clientX-t.startX;return Math.max(n,t.startWidth+i)}function qz(t,e){t.dispatch(t.state.tr.setMeta(lr,{setHandle:e}))}function O$e(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():R$e(h.colspan);p[f]=n,l.setNodeMarkup(r+d,null,{...h,colwidth:p})}l.docChanged&&t.dispatch(l)}function D$e(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&&kx(o,l.firstChild,l,i,a,n)}function R$e(t){return Array(t).fill(0)}function V$e(t,e){const n=[],i=t.doc.resolve(e),s=i.node(-1);if(!s)return Kn.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 Kn.create(t.doc,n)}function F$e({allowTableNodeSelection:t=!1}={}){return new rs({key:vc,state:{init(){return null},apply(e,n){const i=e.getMeta(vc);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:t$e,handleDOMEvents:{mousedown:S$e},createSelectionBetween(e){return vc.getState(e.state)!=null?e.state.selection:null},handleTripleClick:C$e,handleKeyDown:k$e,handlePaste:x$e},appendTransaction(e,n,i){return i$e(i,r$e(i,n),t)}})}var Gy=typeof navigator<"u"?navigator:null,iS=Gy&&Gy.userAgent||"",N$e=/Edge\/(\d+)/.exec(iS),B$e=/MSIE \d/.exec(iS),z$e=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(iS),H$e=!!(B$e||z$e||N$e),U$e=!H$e&&!!Gy&&/Apple Computer/.test(Gy.vendor),Gz=new ps("safari-ime-span"),Cx=!1,j$e={key:Gz,props:{decorations:W$e,handleDOMEvents:{compositionstart:()=>{Cx=!0},compositionend:()=>{Cx=!1}}}};function W$e(t){const{$from:e,$to:n,to:i}=t.selection;if(Cx&&e.sameParent(n)){const s=Fs.widget(i,Y$e,{ignoreSelection:!0,key:"safari-ime-span"});return Kn.create(t.doc,[s])}}function Y$e(t){const e=t.dom.ownerDocument.createElement("span");return e.className="ProseMirror-safari-ime-span",e}var q$e=new rs(U$e?j$e:{key:Gz});function jM(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 G$e(t,e,n){const s=v2((n||{}).ignore||[]),o=X$e(e);let r=-1;for(;++r<o.length;)ON(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,S={index:C.index,input:C.input,stack:[...u,c]};let M=f(...C,S);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 X$e(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([K$e(s[0]),Z$e(s[1])])}return e}function K$e(t){return typeof t=="string"?new RegExp(T2(t),"g"):t}function Z$e(t){return typeof t=="function"?t:function(){return t}}const E3="phrasing",M3=["autolink","link","image","label"];function J$e(){return{transforms:[oAe],enter:{literalAutolink:eAe,literalAutolinkEmail:T3,literalAutolinkHttp:T3,literalAutolinkWww:T3},exit:{literalAutolink:iAe,literalAutolinkEmail:sAe,literalAutolinkHttp:tAe,literalAutolinkWww:nAe}}}function Q$e(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:E3,notInConstruct:M3},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:E3,notInConstruct:M3},{character:":",before:"[ps]",after:"\\/",inConstruct:E3,notInConstruct:M3}]}}function eAe(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function T3(t){this.config.enter.autolinkProtocol.call(this,t)}function tAe(t){this.config.exit.autolinkProtocol.call(this,t)}function nAe(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 sAe(t){this.config.exit.autolinkEmail.call(this,t)}function iAe(t){this.exit(t)}function oAe(t){G$e(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,rAe],[/([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,aAe]],{ignore:["link","linkReference"]})}function rAe(t,e,n,i,s){let o="";if(!Xz(s)||(/^w/i.test(e)&&(n=e+n,e="",o="http://"),!lAe(n)))return!1;const r=cAe(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 aAe(t,e,n,i){return!Xz(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function lAe(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 cAe(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=jM(t,"(");let o=jM(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 Xz(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||xd(n)||m2(n))&&(!e||n!==47)}Kz.peek=bAe;function uAe(){return{enter:{gfmFootnoteDefinition:hAe,gfmFootnoteDefinitionLabelString:fAe,gfmFootnoteCall:gAe,gfmFootnoteCallString:vAe},exit:{gfmFootnoteDefinition:mAe,gfmFootnoteDefinitionLabelString:pAe,gfmFootnoteCall:yAe,gfmFootnoteCallString:_Ae}}}function dAe(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:wAe,footnoteReference:Kz}}}function hAe(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function fAe(){this.buffer()}function pAe(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Ur(this.sliceSerialize(t)).toLowerCase()}function mAe(t){this.exit(t)}function gAe(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function vAe(){this.buffer()}function _Ae(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=e,n.identifier=Ur(this.sliceSerialize(t)).toLowerCase()}function yAe(t){this.exit(t)}function Kz(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 bAe(){return"["}function wAe(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()),kAe)),r(),o}function kAe(t,e,n){return e===0?t:(n?"":" ")+t}const CAe=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Zz.peek=EAe;function xAe(){return{canContainEols:["delete"],enter:{strikethrough:$Ae},exit:{strikethrough:AAe}}}function SAe(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:CAe}],handlers:{delete:Zz}}}function $Ae(t){this.enter({type:"delete",children:[]},t)}function AAe(t){this.exit(t)}function Zz(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 EAe(){return"~"}function MAe(t,e={}){const n=(e.align||[]).concat(),i=e.stringLength||PAe,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=TAe(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]=WM(n[u]);else{const p=WM(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),S=s[u];S===114?k=" ".repeat($):S===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(` | |
| 126 | +`)}function TAe(t){return t==null?"":String(t)}function PAe(t){return t.length}function WM(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 IAe(){return{enter:{table:LAe,tableData:YM,tableHeader:YM,tableRow:DAe},exit:{codeText:RAe,table:OAe,tableData:P3,tableHeader:P3,tableRow:P3}}}function LAe(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 OAe(t){this.exit(t),this.data.inTable=void 0}function DAe(t){this.enter({type:"tableRow",children:[]},t)}function P3(t){this.exit(t)}function YM(t){this.enter({type:"tableCell",children:[]},t)}function RAe(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,VAe));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function VAe(t,e){return e==="|"?e:t}function FAe(t){const e=t||{},n=e.tableCellPadding,i=e.tablePipeAlign,s=e.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` | |
| 127 | +`,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(` | |
| 128 | +`))}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 MAe(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=Y8.inlineCode(f,p,m);return m.stack.includes("tableCell")&&(y=y.replace(/\|/g,"\\$&")),y}}function NAe(){return{exit:{taskListCheckValueChecked:qM,taskListCheckValueUnchecked:qM,paragraph:zAe}}}function BAe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:HAe}}}function qM(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function zAe(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 HAe(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=Y8.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 UAe(){return[J$e(),uAe(),xAe(),IAe(),NAe()]}function jAe(t){return{extensions:[Q$e(),dAe(),SAe(),FAe(t),BAe()]}}const WAe={tokenize:ZAe,partial:!0},Jz={tokenize:JAe,partial:!0},Qz={tokenize:QAe,partial:!0},eH={tokenize:eEe,partial:!0},YAe={tokenize:tEe,partial:!0},tH={name:"wwwAutolink",tokenize:XAe,previous:sH},nH={name:"protocolAutolink",tokenize:KAe,previous:iH},Dl={name:"emailAutolink",tokenize:GAe,previous:oH},Ba={};function qAe(){return{text:Ba}}let vu=48;for(;vu<123;)Ba[vu]=Dl,vu++,vu===58?vu=65:vu===91&&(vu=97);Ba[43]=Dl;Ba[45]=Dl;Ba[46]=Dl;Ba[95]=Dl;Ba[72]=[Dl,nH];Ba[104]=[Dl,nH];Ba[87]=[Dl,tH];Ba[119]=[Dl,tH];function GAe(t,e,n){const i=this;let s,o;return r;function r(d){return!xx(d)||!oH.call(i,i.previous)||oS(i.events)?n(d):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),a(d))}function a(d){return xx(d)?(t.consume(d),a):d===64?(t.consume(d),l):n(d)}function l(d){return d===46?t.check(YAe,u,c)(d):d===45||d===95||co(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&&Hi(i.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(d)):n(d)}}function XAe(t,e,n){const i=this;return s;function s(r){return r!==87&&r!==119||!sH.call(i,i.previous)||oS(i.events)?n(r):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(WAe,t.attempt(Jz,t.attempt(Qz,o),n),n)(r))}function o(r){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(r)}}function KAe(t,e,n){const i=this;let s="",o=!1;return r;function r(d){return(d===72||d===104)&&iH.call(i,i.previous)&&!oS(i.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(d),t.consume(d),a):n(d)}function a(d){if(Hi(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||Ny(d)||jn(d)||xd(d)||m2(d)?n(d):t.attempt(Jz,t.attempt(Qz,u),n)(d)}function u(d){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(d)}}function ZAe(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 JAe(t,e,n){let i,s,o;return r;function r(c){return c===46||c===95?t.check(eH,l,a)(c):c===null||jn(c)||xd(c)||c!==45&&m2(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 QAe(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(eH,e,o)(r):r===null||jn(r)||xd(r)?e(r):(t.consume(r),s)}function o(r){return r===41&&i++,t.consume(r),s}}function eEe(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||jn(a)||xd(a)?e(a):n(a)}function s(a){return a===null||a===40||a===91||jn(a)||xd(a)?e(a):i(a)}function o(a){return Hi(a)?r(a):n(a)}function r(a){return a===59?(t.consume(a),i):Hi(a)?(t.consume(a),r):n(a)}}function tEe(t,e,n){return i;function i(o){return t.consume(o),s}function s(o){return co(o)?n(o):e(o)}}function sH(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||jn(t)}function iH(t){return!Hi(t)}function oH(t){return!(t===47||xx(t))}function xx(t){return t===43||t===45||t===46||t===95||co(t)}function oS(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 nEe={tokenize:uEe,partial:!0};function sEe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:aEe,continuation:{tokenize:lEe},exit:cEe}},text:{91:{name:"gfmFootnoteCall",tokenize:rEe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:iEe,resolveTo:oEe}}}}function iEe(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=Ur(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 oEe(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 rEe(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||jn(d))return n(d);if(d===93){t.exit("chunkString");const h=t.exit("gfmFootnoteCallString");return s.includes(Ur(i.sliceSerialize(h)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(d),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(d)}return jn(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 aEe(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||jn(p))return n(p);if(p===93){t.exit("chunkString");const m=t.exit("gfmFootnoteDefinitionLabelString");return o=Ur(i.sliceSerialize(m)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(p),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),h}return jn(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),_n(t,f,"gfmFootnoteDefinitionWhitespace")):n(p)}function f(p){return e(p)}}function lEe(t,e,n){return t.check(Q1,e,t.attempt(nEe,e,n))}function cEe(t){t.exit("gfmFootnoteDefinition")}function uEe(t,e,n){const i=this;return _n(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 dEe(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&&pr(h,h.length,0,g2(f,r.slice(c+1,l),a)),pr(h,h.length,0,[["exit",d,a],["enter",r[l][1],a],["exit",r[l][1],a],["exit",u,a]]),pr(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=By(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=By(p);return y._open=!b||b===2&&!!m,y._close=!m||m===2&&!!b,a(p)}}}class hEe{constructor(){this.map=[]}add(e,n,i){fEe(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 fEe(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 pEe(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 mEe(){return{flow:{null:{name:"table",tokenize:gEe,resolveAll:vEe}}}}function gEe(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,B=V==="tableHead"||V==="tableRow"?M:l;return B===M&&i.parser.lazy[i.now().line]?n(L):B(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):un(L)?_n(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||jn(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,un(L)?_n(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):S(L)}function m(L){return un(L)?_n(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):S(L)}function b(L){return L===45?(t.enter("tableDelimiterFiller"),k(L)):S(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 un(L)?_n(t,$,"whitespace")(L):$(L)}function $(L){return L===124?p(L):L===null||Et(L)?!r||s!==o?S(L):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(L)):S(L)}function S(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)):un(L)?_n(t,P,"whitespace")(L):(t.enter("data"),T(L))}function T(L){return L===null||L===124||jn(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 vEe(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 hEe;for(;++n<t.length;){const f=t[n],p=f[1];f[0]==="enter"?p.type==="tableHead"?(a=!1,l!==0&&(GM(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=p0(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=p0(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=p0(h,e,o,s,n,d)):r[1]!==0&&(d=p0(h,e,r,s,n,d)),s=0):s&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(r[3]=n)}for(l!==0&&GM(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=pEe(e.events,n))}return t}function p0(t,e,n,i,s,o){const r=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",a="tableContent";n[0]!==0&&(o.end=Object.assign({},Nh(e.events,n[0])),t.add(n[0],0,[["exit",o,e]]));const l=Nh(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=Nh(e.events,n[2]),u=Nh(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({},Nh(e.events,s)),t.add(s,0,[["exit",o,e]]),o=void 0),o}function GM(t,e,n,i,s){const o=[],r=Nh(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 Nh(t,e){const n=t[e],i=n[0]==="enter"?"start":"end";return n[1][i]}const _Ee={name:"tasklistCheck",tokenize:bEe};function yEe(){return{text:{91:_Ee}}}function bEe(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 jn(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):un(l)?t.check({tokenize:wEe},e,n)(l):n(l)}}function wEe(t,e,n){return _n(t,i,"whitespace");function i(s){return s===null?n(s):e(s)}}function kEe(t){return gN([qAe(),sEe(),dEe(t),mEe(),yEe()])}const CEe={};function xEe(t){const e=this,n=t||CEe,i=e.data(),s=i.micromarkExtensions||(i.micromarkExtensions=[]),o=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),r=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);s.push(kEe(n)),o.push(UAe()),r.push(jAe(n))}function Vt(t,e){return Object.assign(t,{meta:{package:"@milkdown/preset-gfm",...e}}),t}const rS=rv("strike_through");Vt(rS,{displayName:"Attr<strikethrough>",group:"Strikethrough"});const wp=ov("strike_through",t=>({parseDOM:[{tag:"del"},{style:"text-decoration",getAttrs:e=>e==="line-through"}],toDOM:e=>["del",t.get(rS.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(wp.mark,{displayName:"MarkSchema<strikethrough>",group:"Strikethrough"});Vt(wp.ctx,{displayName:"MarkSchemaCtx<strikethrough>",group:"Strikethrough"});const R2=on("ToggleStrikeThrough",t=>()=>S2(wp.type(t)));Vt(R2,{displayName:"Command<ToggleStrikethrough>",group:"Strikethrough"});const rH=wo(t=>tv(/~([^~]+)~$/,wp.type(t)));Vt(rH,{displayName:"InputRule<strikethrough>",group:"Strikethrough"});const aS=ko("strikeThroughKeymap",{ToggleStrikethrough:{shortcuts:"Mod-Alt-x",command:t=>{const e=t.get(gn);return()=>e.call(R2.key)}}});Vt(aS.ctx,{displayName:"KeymapCtx<strikethrough>",group:"Strikethrough"});Vt(aS.shortcuts,{displayName:"Keymap<strikethrough>",group:"Strikethrough"});const lv=X7e({tableGroup:"block",cellContent:"paragraph",cellAttributes:{alignment:{default:"left",getFromDOM:t=>t.style.textAlign||"left",setDOMAttr:(t,e)=>{e.style=`text-align: ${t||"left"}`}}}}),kp=zs("table",()=>({...lv.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(kp.node,{displayName:"NodeSchema<table>",group:"Table"});Vt(kp.ctx,{displayName:"NodeSchemaCtx<table>",group:"Table"});const V2=zs("table_header_row",()=>({...lv.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(V2.node,{displayName:"NodeSchema<tableHeaderRow>",group:"Table"});Vt(V2.ctx,{displayName:"NodeSchemaCtx<tableHeaderRow>",group:"Table"});const cv=zs("table_row",()=>({...lv.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(cv.node,{displayName:"NodeSchema<tableRow>",group:"Table"});Vt(cv.ctx,{displayName:"NodeSchemaCtx<tableRow>",group:"Table"});const uv=zs("table_cell",()=>({...lv.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(uv.node,{displayName:"NodeSchema<tableCell>",group:"Table"});Vt(uv.ctx,{displayName:"NodeSchemaCtx<tableCell>",group:"Table"});const F2=zs("table_header",()=>({...lv.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(F2.node,{displayName:"NodeSchema<tableHeader>",group:"Table"});Vt(F2.ctx,{displayName:"NodeSchemaCtx<tableHeader>",group:"Table"});function aH(t,e=3,n=3){const i=Array(n).fill(0).map(()=>uv.type(t).createAndFill()),s=Array(n).fill(0).map(()=>F2.type(t).createAndFill()),o=Array(e).fill(0).map((r,a)=>a===0?V2.type(t).create(null,s):cv.type(t).create(null,i));return kp.type(t).create(null,o)}function dv(t){return e5(e=>e.type.spec.tableRole==="table")(t)}function Bh(t,e){const n=dv(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 zh(t,e){const n=dv(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 SEe(t){const e=dv(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 $Ee(t){const e=SEe(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 x2(t.setSelection(new as(s,n)))}}return t}function lH(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 uv.type(t).createAndFill({alignment:u==null?void 0:u.attrs.alignment})});return e.insert(r,cv.type(t).create(null,a)),e}function cH(t){return(e,n)=>i=>{n=n??i.selection.from;const s=i.doc.resolve(n),o=e5(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?as.rowSelection:as.colSelection,h=l.positionAt(a?e:0,a?0:e,r.node),f=i.doc.resolve(r.from+h);return x2(i.setSelection(d(u,f)))}}return i}}const AEe=cH("row"),EEe=cH("col");function XM(t){return t[0].map((e,n)=>t.map(i=>i[n]))}function uH(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 dH(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 hH(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 MEe(t,e,n,i){let s=XM(dH(t.node));return s=hH(s,e,n,i),s=XM(s),uH(t.node,s)}function TEe(t,e,n,i){let s=dH(t.node);return s=hH(s,e,n,i),uH(t.node,s)}function KM(t,e){let n=t,i=t;for(let u=t;u>=0;u--){const d=Bh(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=Bh(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=Bh(u,e.selection);d&&d.length&&s.push(u)}n=s[0],i=s[s.length-1];const o=Bh(n,e.selection),r=zh(0,e.selection),a=e.doc.resolve(o[o.length-1].pos);let l;for(let u=i;u>=n;u--){const d=Bh(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 ZM(t,e){let n=t,i=t;for(let u=t;u>=0;u--)zh(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++)zh(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=zh(u,e.selection);d&&d.length&&s.push(u)}n=s[0],i=s[s.length-1];const o=zh(n,e.selection),r=Bh(0,e.selection),a=e.doc.resolve(o[o.length-1].pos);let l;for(let u=i;u>=n;u--){const d=zh(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 PEe(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=dv(r);if(!a)return e;const{indexes:l}=KM(n,e),{indexes:c}=KM(i,e);if(l.includes(i))return e;const u=MEe(a,l,c,0),d=x2(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=as.colSelection,k=h.positionAt(0,p,u),C=d.doc.resolve(f+k);return d.setSelection(b(y,C))}function IEe(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=dv(r);if(!a)return e;const{indexes:l}=ZM(n,e),{indexes:c}=ZM(i,e);if(l.includes(i))return e;const u=TEe(a,l,c,0),d=x2(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=as.rowSelection,k=h.positionAt(p,0,u),C=d.doc.resolve(f+k);return d.setSelection(b(y,C))}const lS=on("GoToPrevTableCell",()=>()=>Wz(-1));Vt(lS,{displayName:"Command<goToPrevTableCellCommand>",group:"Table"});const cS=on("GoToNextTableCell",()=>()=>Wz(1));Vt(cS,{displayName:"Command<goToNextTableCellCommand>",group:"Table"});const uS=on("ExitTable",t=>()=>(e,n)=>{if(!Er(e))return!1;const{$head:i}=e.selection,s=j5e(i,kp.type(t));if(!s)return!1;const{to:o}=s,r=e.tr.replaceWith(o,o,Ol.type(t).createAndFill());return r.setSelection(Ut.near(r.doc.resolve(o),1)).scrollIntoView(),n==null||n(r),!0});Vt(uS,{displayName:"Command<breakTableCommand>",group:"Table"});const fH=on("InsertTable",t=>({row:e,col:n}={})=>(i,s)=>{const{selection:o,tr:r}=i,{from:a}=o,l=aH(t,e,n),c=r.replaceSelectionWith(l),u=Ut.findFrom(c.doc.resolve(a),1,!0);return u&&c.setSelection(u),s==null||s(c),!0});Vt(fH,{displayName:"Command<insertTableCommand>",group:"Table"});const pH=on("MoveRow",()=>({from:t,to:e,pos:n}={})=>(i,s)=>{const{tr:o}=i;return!!(s!=null&&s(IEe({tr:o,origin:t??0,target:e??0,pos:n,select:!0})))});Vt(pH,{displayName:"Command<moveRowCommand>",group:"Table"});const mH=on("MoveCol",()=>({from:t,to:e,pos:n}={})=>(i,s)=>{const{tr:o}=i;return!!(s!=null&&s(PEe({tr:o,origin:t??0,target:e??0,pos:n,select:!0})))});Vt(mH,{displayName:"Command<moveColCommand>",group:"Table"});const gH=on("SelectRow",()=>(t={index:0})=>(e,n)=>{const{tr:i}=e;return!!(n!=null&&n(AEe(t.index,t.pos)(i)))});Vt(gH,{displayName:"Command<selectRowCommand>",group:"Table"});const vH=on("SelectCol",()=>(t={index:0})=>(e,n)=>{const{tr:i}=e;return!!(n!=null&&n(EEe(t.index,t.pos)(i)))});Vt(vH,{displayName:"Command<selectColCommand>",group:"Table"});const _H=on("SelectTable",()=>()=>(t,e)=>{const{tr:n}=t;return!!(e!=null&&e($Ee(n)))});Vt(_H,{displayName:"Command<selectTableCommand>",group:"Table"});const yH=on("DeleteSelectedCells",()=>()=>(t,e)=>{const{selection:n}=t;if(!(n instanceof as))return!1;const i=n.isRowSelection(),s=n.isColSelection();return i&&s?v$e(t,e):s?d$e(t,e):f$e(t,e)});Vt(yH,{displayName:"Command<deleteSelectedCellsCommand>",group:"Table"});const bH=on("AddColBefore",()=>()=>l$e);Vt(bH,{displayName:"Command<addColBeforeCommand>",group:"Table"});const wH=on("AddColAfter",()=>()=>c$e);Vt(wH,{displayName:"Command<addColAfterCommand>",group:"Table"});const kH=on("AddRowBefore",t=>()=>(e,n)=>{if(!Er(e))return!1;if(n){const i=lu(e);n(lH(t,e.tr,i,i.top))}return!0});Vt(kH,{displayName:"Command<addRowBeforeCommand>",group:"Table"});const CH=on("AddRowAfter",t=>()=>(e,n)=>{if(!Er(e))return!1;if(n){const i=lu(e);n(lH(t,e.tr,i,i.bottom))}return!0});Vt(CH,{displayName:"Command<addRowAfterCommand>",group:"Table"});const xH=on("SetAlign",()=>(t="left")=>p$e("alignment",t));Vt(xH,{displayName:"Command<setAlignCommand>",group:"Table"});const SH=wo(t=>new Go(/^\|(?<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),kp.type(t)))return null;const l=aH(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(SH,{displayName:"InputRule<insertTableInputRule>",group:"Table"});const dS=ko("tableKeymap",{NextCell:{shortcuts:["Mod-]","Tab"],command:t=>{const e=t.get(gn);return()=>e.call(cS.key)}},PrevCell:{shortcuts:["Mod-[","Shift-Tab"],command:t=>{const e=t.get(gn);return()=>e.call(lS.key)}},ExitTable:{shortcuts:["Mod-Enter"],command:t=>{const e=t.get(gn);return()=>e.call(uS.key)}}});Vt(dS.ctx,{displayName:"KeymapCtx<table>",group:"Table"});Vt(dS.shortcuts,{displayName:"Keymap<table>",group:"Table"});const I3="footnote_definition",JM="footnoteDefinition",hS=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 ra(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===JM,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(JM,void 0,{label:e.attrs.label,identifier:e.attrs.label}).next(e.content).closeNode()}}}));Vt(hS.ctx,{displayName:"NodeSchemaCtx<footnodeDef>",group:"footnote"});Vt(hS.node,{displayName:"NodeSchema<footnodeDef>",group:"footnote"});const L3="footnote_reference",fS=zs("footnote_reference",()=>({group:"inline",inline:!0,atom:!0,attrs:{label:{default:""}},parseDOM:[{tag:`sup[data-type="${L3}"]`,getAttrs:t=>{if(!(t instanceof HTMLElement))throw ra(t);return{label:t.dataset.label}}}],toDOM:t=>{const e=t.attrs.label;return["sup",{"data-label":e,"data-type":L3},e]},parseMarkdown:{match:({type:t})=>t==="footnoteReference",runner:(t,e,n)=>{t.addNode(n,{label:e.label})}},toMarkdown:{match:t=>t.type.name===L3,runner:(t,e)=>{t.addNode("footnoteReference",void 0,void 0,{label:e.attrs.label,identifier:e.attrs.label})}}}));Vt(fS.ctx,{displayName:"NodeSchemaCtx<footnodeRef>",group:"footnote"});Vt(fS.node,{displayName:"NodeSchema<footnodeRef>",group:"footnote"});const $H=Da.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 ra(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($H,{displayName:"NodeSchema<listItem>",group:"ListItem"});const AH=wo(()=>new Go(/^\[(?<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(AH,{displayName:"InputRule<wrapInTaskListInputRule>",group:"ListItem"});const LEe=[aS,dS].flat(),OEe=[SH,AH],DEe=[rH],EH=Ls(()=>q$e);Vt(EH,{displayName:"Prose<autoInsertSpanPlugin>",group:"Prose"});const REe=Ls(()=>A$e({}));Vt(REe,{displayName:"Prose<columnResizingPlugin>",group:"Prose"});const MH=Ls(()=>F$e({allowTableNodeSelection:!0}));Vt(MH,{displayName:"Prose<tableEditingPlugin>",group:"Prose"});const pS=Gd("remarkGFM",()=>xEe);Vt(pS.plugin,{displayName:"Remark<remarkGFMPlugin>",group:"Remark"});Vt(pS.options,{displayName:"RemarkConfig<remarkGFMPlugin>",group:"Remark"});const VEe=new ps("MILKDOWN_KEEP_TABLE_ALIGN_PLUGIN");function FEe(t,e){let n=0;return e.forEach((i,s,o)=>{i===t&&(n=o)}),n}const TH=Ls(()=>new rs({key:VEe,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=FEe(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(TH,{displayName:"Prose<keepTableAlignPlugin>",group:"Prose"});const NEe=[TH,EH,pS,MH].flat(),BEe=[$H,kp,V2,cv,F2,uv,hS,fS,rS,wp].flat(),zEe=[cS,lS,uS,fH,pH,mH,gH,vH,_H,yH,kH,CH,bH,wH,xH,R2],HEe=[BEe,OEe,DEe,LEe,zEe,NEe].flat();var Xy=200,Ys=function(){};Ys.prototype.append=function(e){return e.length?(e=Ys.from(e),!this.length&&e||e.length<Xy&&this.leafAppend(e)||this.length<Xy&&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 UEe(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 PH(e):Ys.empty};var PH=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<=Xy)return new e(this.values.concat(s.flatten()))},e.prototype.leafPrepend=function(s){if(this.length+s.length<=Xy)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 PH([]);var UEe=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 jEe=500;class Lr{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 ya(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 ya(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 Lr(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 ya(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>YEe&&(a=WEe(a,c),r-=c),new Lr(a.append(o),r)}remapping(e,n){let i=new df;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 Lr(this.items.append(e.map(n=>new ya(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 ya(p,m,y))}else i.push(new ya(p))},s);let c=[];for(let h=n;h<r;h++)c.push(new ya(o.maps[h]));let u=this.items.slice(0,s).append(c).append(i),d=new Lr(u,a);return d.emptyItemCount()>jEe&&(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 ya(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 Lr(Ys.from(s.reverse()),o)}}Lr.empty=new Lr(Ys.empty,0);function WEe(t,e){let n;return t.forEach((i,s)=>{if(i.selection&&e--==0)return n=s,!1}),t.slice(n)}class ya{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 ya(n.getMap().invert(),n,this.selection)}}}class pc{constructor(e,n,i,s,o){this.done=e,this.undone=n,this.prevRanges=i,this.prevTime=s,this.prevComposition=o}}const YEe=20;function qEe(t,e,n,i){let s=n.getMeta(ld),o;if(s)return s.historyState;n.getMeta(KEe)&&(t=new pc(t.done,t.undone,null,0,-1));let r=n.getMeta("appendedTransaction");if(n.steps.length==0)return t;if(r&&r.getMeta(ld))return r.getMeta(ld).redo?new pc(t.done.addTransform(n,void 0,i,__(e)),t.undone,QM(n.mapping.maps),t.prevTime,t.prevComposition):new pc(t.done,t.undone.addTransform(n,void 0,i,__(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||!GEe(n,t.prevRanges)),c=r?O3(t.prevRanges,n.mapping):QM(n.mapping.maps);return new pc(t.done.addTransform(n,l?e.selection.getBookmark():void 0,i,__(e)),Lr.empty,c,n.time,a??t.prevComposition)}else return(o=n.getMeta("rebased"))?new pc(t.done.rebased(n,o),t.undone.rebased(n,o),O3(t.prevRanges,n.mapping),t.prevTime,t.prevComposition):new pc(t.done.addMaps(n.mapping.maps),t.undone.addMaps(n.mapping.maps),O3(t.prevRanges,n.mapping),t.prevTime,t.prevComposition)}function GEe(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 QM(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 O3(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 XEe(t,e,n){let i=__(e),s=ld.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 pc(n?a:o.remaining,n?o.remaining:a,null,0,-1);return o.transform.setSelection(r).setMeta(ld,{redo:n,historyState:l})}let D3=!1,eT=null;function __(t){let e=t.plugins;if(eT!=e){D3=!1,eT=e;for(let n=0;n<e.length;n++)if(e[n].spec.historyPreserveItems){D3=!0;break}}return D3}const ld=new ps("history"),KEe=new ps("closeHistory");function ZEe(t={}){return t={depth:t.depth||100,newGroupDelay:t.newGroupDelay||500},new rs({key:ld,state:{init(){return new pc(Lr.empty,Lr.empty,null,0,-1)},apply(e,n,i){return qEe(n,i,e,t)}},config:t,props:{handleDOMEvents:{beforeinput(e,n){let i=n.inputType,s=i=="historyUndo"?LH:i=="historyRedo"?OH:null;return s?(n.preventDefault(),s(e.state,e.dispatch)):!1}}}})}function IH(t,e){return(n,i)=>{let s=ld.getState(n);if(!s||(t?s.undone:s.done).eventCount==0)return!1;if(i){let o=XEe(s,n,t);o&&i(e?o.scrollIntoView():o)}return!0}}const LH=IH(!1,!0),OH=IH(!0,!0);function Cp(t,e){return Object.assign(t,{meta:{package:"@milkdown/plugin-history",...e}}),t}const mS=on("Undo",()=>()=>LH);Cp(mS,{displayName:"Command<undo>"});const gS=on("Redo",()=>()=>OH);Cp(gS,{displayName:"Command<redo>"});const vS=ms({},"historyProviderConfig");Cp(vS,{displayName:"Ctx<historyProviderConfig>"});const DH=Ls(t=>ZEe(t.get(vS.key)));Cp(DH,{displayName:"Ctx<historyProviderPlugin>"});const _S=ko("historyKeymap",{Undo:{shortcuts:"Mod-z",command:t=>{const e=t.get(gn);return()=>e.call(mS.key)}},Redo:{shortcuts:["Mod-y","Shift-Mod-z"],command:t=>{const e=t.get(gn);return()=>e.call(gS.key)}}});Cp(_S.ctx,{displayName:"KeymapCtx<history>"});Cp(_S.shortcuts,{displayName:"Keymap<history>"});const JEe=[vS,DH,_S,mS,gS].flat();function Sx(t){if(!t)return!1;if(Array.isArray(t))return t.length>1?!1:Sx(t[0]);const e=t.content;return e?Sx(e):t.type==="text"}function QEe(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 RH=Ls(t=>{const e=t.get(Wr);t.update(mg,i=>({...i,editable:i.editable??(()=>!0)}));const n=new ps("MILKDOWN_CLIPBOARD");return new rs({key:n,props:{handlePaste:(i,s)=>{var o,r;const a=t.get(gf),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,$=W5e("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,` | |
| 129 | +`)),i.dispatch(C),!0}}const h=c.getData("text/html");if(h.length===0&&u.length===0)return!1;const f=p2.fromSchema(e);let p;if(h.length===0){const b=a(u);if(!b||typeof b=="string")return!1;p=su.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=QEe(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(vf);if(Sx(i.content.toJSON()))return i.content.textBetween(0,i.content.size,` | |
| 131 | 130 | |
| 132 | -`);const o=e.topNodeType.createAndFill(void 0,s.content);return o?i(o):""}}})});xz.meta={displayName:"Prose<clipboard>",package:"@milkdown/plugin-clipboard"};const f5=es({shouldAppend:t=>!(!t||["heading","paragraph"].includes(t.type.name)),getNode:t=>t.schema.nodes.paragraph.create()},"trailingConfig");f5.meta={package:"@milkdown/plugin-trailing",displayName:"Ctx<trailingConfig>"};const Sz=vs(t=>{const e=new Kn("MILKDOWN_TRAILING"),{shouldAppend:n,getNode:s}=t.get(f5.key),i=new Yn({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=s==null?void 0:s(a),d=i.getState(a),h=l.content.size;if(!(!d||!u))return c.insert(h,u)}});return i});Sz.meta={package:"@milkdown/plugin-trailing",displayName:"Prose<trailing>"};const S$e=[f5,Sz];var $z=(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))($z||{});const $$e={cursor:!0,"link-tooltip":!0,"block-edit":!0,placeholder:!0,toolbar:!0,"code-mirror":!0,"image-block":!0};async function A$e(t,e,n){switch(t){case"link-tooltip":{const{defineFeature:s}=await iu(()=>Promise.resolve().then(()=>Yyt),void 0);return s(e,n)}case"block-edit":{const{defineFeature:s}=await iu(()=>Promise.resolve().then(()=>jbt),void 0);return s(e,n)}case"placeholder":{const{defineFeature:s}=await iu(()=>Promise.resolve().then(()=>qbt),void 0);return s(e,n)}case"toolbar":{const{defineFeature:s}=await iu(()=>Promise.resolve().then(()=>Zbt),void 0);return s(e,n)}case"image-block":{const{defineFeature:s}=await iu(()=>Promise.resolve().then(()=>l2t),void 0);return s(e,n)}}}const M$e=gn([],"FeaturesCtx");function E$e(t){return e=>{e.inject(M$e,t)}}var T$e="Expected a function",oE=0/0,P$e="[object Symbol]",I$e=/^\s+|\s+$/g,L$e=/^[-+]0x[0-9a-f]+$/i,O$e=/^0b[01]+$/i,D$e=/^0o[0-7]+$/i,R$e=parseInt,V$e=typeof us=="object"&&us&&us.Object===Object&&us,F$e=typeof self=="object"&&self&&self.Object===Object&&self,N$e=V$e||F$e||Function("return this")(),B$e=Object.prototype,z$e=B$e.toString,H$e=Math.max,U$e=Math.min,zw=function(){return N$e.Date.now()};function j$e(t,e,n){var s,i,o,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(T$e);e=rE(e)||0,TC(n)&&(u=!!n.leading,d="maxWait"in n,o=d?H$e(rE(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(E){var T=s,P=i;return s=i=void 0,c=E,r=t.apply(P,T),r}function p(E){return c=E,a=setTimeout(y,e),u?f(E):r}function m(E){var T=E-l,P=E-c,I=e-T;return d?U$e(I,o-P):I}function b(E){var T=E-l,P=E-c;return l===void 0||T>=e||T<0||d&&P>=o}function y(){var E=zw();if(b(E))return C(E);a=setTimeout(y,m(E))}function C(E){return a=void 0,h&&s?f(E):(s=i=void 0,r)}function k(){a!==void 0&&clearTimeout(a),c=0,s=l=i=a=void 0}function x(){return a===void 0?r:C(zw())}function S(){var E=zw(),T=b(E);if(s=arguments,i=this,l=E,T){if(a===void 0)return p(l);if(d)return a=setTimeout(y,e),f(l)}return a===void 0&&(a=setTimeout(y,e)),r}return S.cancel=k,S.flush=x,S}function TC(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function W$e(t){return!!t&&typeof t=="object"}function Y$e(t){return typeof t=="symbol"||W$e(t)&&z$e.call(t)==P$e}function rE(t){if(typeof t=="number")return t;if(Y$e(t))return oE;if(TC(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=TC(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(I$e,"");var n=O$e.test(t);return n||D$e.test(t)?R$e(t.slice(2),n?2:8):L$e.test(t)?oE:+t}var G$e=j$e;const Yb=Ts(G$e);let Az=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 PC=gn(new Az,"listener"),q$e=new Kn("MILKDOWN_LISTENER"),Mz=t=>(t.inject(PC,new Az),async()=>{await t.wait(Ou);const e=t.get(PC),{listeners:n}=e;n.beforeMount.forEach(a=>a(t)),await t.wait(Lm);const s=t.get(Fh);let i=null,o=null;const r=new Yn({key:q$e,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)=>{i=l.doc,o=s(l.doc)},apply:a=>!a.docChanged||a.getMeta("addToHistory")===!1?void 0:Yb(()=>{const{doc:l}=a;if(n.updated.length>0&&i&&!i.eq(l)&&n.updated.forEach(c=>{c(t,l,i)}),n.markdownUpdated.length>0&&i&&!i.eq(l)){const c=s(l);n.markdownUpdated.forEach(u=>{u(t,c,o)}),o=c}i=l},200)()}});t.update(Vr,a=>a.concat(r)),await t.wait(Sv),n.mounted.forEach(a=>a(t))});Mz.meta={package:"@milkdown/plugin-listener",displayName:"Listener"};function X$e(t){return new Promise(e=>{const n=new FileReader;n.addEventListener("load",()=>{e({alt:t.name,src:n.result})},!1),n.readAsDataURL(t)})}const K$e=async(t,e)=>{const n=[];for(let i=0;i<t.length;i++){const o=t.item(i);o&&o.type.includes("image")&&n.push(o)}const{image:s}=e.nodes;if(!s)throw DV("image");return(await Promise.all(n.map(i=>X$e(i)))).map(({alt:i,src:o})=>s.createAndFill({src:o,alt:i}))},Nh=es({uploader:K$e,enableHtmlFileUploader:!1,uploadWidgetFactory:(t,e)=>{const n=document.createElement("span");return n.textContent="Upload in progress...",ws.widget(t,n,e)}},"uploadConfig");Nh.meta={package:"@milkdown/plugin-upload",displayName:"Ctx<uploadConfig>"};const Ez=vs(t=>{const e=new Kn("MILKDOWN_UPLOAD"),n=(i,o)=>{var r;const a=e.getState(i);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},s=(i,o,r)=>{var a;if(!r||r.length<=0)return!1;const l=Symbol("upload symbol"),c=t.get($r),{tr:u}=i.state,d=o instanceof DragEvent?((a=i.posAtCoords({left:o.clientX,top:o.clientY}))==null?void 0:a.pos)??u.selection.from:u.selection.from;i.dispatch(u.setMeta(e,{add:{id:l,pos:d}}));const{uploader:h}=t.get(Nh.key);return h(r,c).then(f=>{const p=n(i.state,l);p<0||i.dispatch(i.state.tr.replaceWith(p,p,f).setMeta(e,{remove:{id:l}}))}).catch(f=>{console.error(f)}),!0};return new Yn({key:e,state:{init(){return Nn.empty},apply(i,o){const r=o.map(i.mapping,i.doc),a=i.getMeta(this);if(!a)return r;if(a.add){const{uploadWidgetFactory:l}=t.get(Nh.key),c=l(a.add.pos,{id:a.add.id});return r.add(i.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(i){return this.getState(i)},handlePaste:(i,o)=>{var r,a;const{enableHtmlFileUploader:l}=t.get(Nh.key);return!(o instanceof ClipboardEvent)||!l&&(r=o.clipboardData)!=null&&r.getData("text/html")?!1:s(i,o,(a=o.clipboardData)==null?void 0:a.files)},handleDrop:(i,o)=>{var r;return o instanceof DragEvent?s(i,o,(r=o.dataTransfer)==null?void 0:r.files):!1}}})});Ez.meta={package:"@milkdown/plugin-upload",displayName:"Prose<upload>"};const Z$e=[Nh,Ez];var p5=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Os=(t,e,n)=>(p5(t,e,"read from private field"),n?n.call(t):e.get(t)),Bd=(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)},jp=(t,e,n,s)=>(p5(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),J$e=(t,e,n)=>(p5(t,e,"access private method"),n),Lo,Wp,Dm,Ov,Bh,IC,Tz;class Pz{constructor({root:e,features:n={},featureConfigs:s={},defaultValue:i="",onUpdate:o=a=>{},handleCommonActions:r=(a,l)=>{}}){var u;Bd(this,IC),Bd(this,Lo,void 0),Bd(this,Wp,void 0),Bd(this,Dm,void 0),Bd(this,Ov,!0),Bd(this,Bh,null);const a=Object.entries({...$$e,...n}).filter(([,d])=>d).map(([d])=>d);jp(this,Dm,(typeof e=="string"?document.querySelector(e):e)??document.body),jp(this,Lo,L5e.make().config(E$e(a)).config(d=>{d.set($v,Os(this,Dm)),d.set(Cv,i),d.set(Om,{editable:()=>Os(this,Ov)})}).config(d=>{const h=async(f,p)=>await r("handleFileUpload",{ctx:d,files:f,schema:p});d.update(Nh.key,f=>({...f,uploader:h}))}).config(d=>{const h=d.get(PC);h.markdownUpdated((f,p,m)=>{p!==m&&o(p)}),h.updated((f,p,m)=>{r("editor_updated",f)})}).use(mSe).use(k$e).use(S$e).use(xz).use(Mz).use(Z$e).use(f$e));const l=(u=s==null?void 0:s["block-edit"])==null?void 0:u.canAddImage;l&&Os(this,Lo).use(vs(()=>new Yn({filterTransaction:d=>d.docChanged?!d.steps.some(f=>{var m,b;let p=!1;return(b=(m=f.slice)==null?void 0:m.content)==null||b.forEach(y=>{var C;y.type.name.includes("image")&&(p=!0),(C=y.content)==null||C.forEach(k=>{k.type.name.includes("image")&&(p=!0)})}),p})||l():!0}))),Os(this,Lo).use(vs(()=>new Yn({key:new Kn("link-non-inclusive"),appendTransaction:(d,h,f)=>{var x,S;const p=f.schema.marks.link;if(!p||!d.some(E=>E.docChanged))return null;const m=f.selection.$cursor;if(!m||m.pos<2)return null;const b=m.pos-1,y=m.pos;if(f.doc.textBetween(b,y)!==" "||!f.doc.rangeHasMark(b,y,p))return null;const C=(x=f.doc.resolve(b).nodeBefore)==null?void 0:x.marks.find(E=>E.type===p),k=(S=f.doc.resolve(y).nodeAfter)==null?void 0:S.marks.find(E=>E.type===p);return k&&(C==null?void 0:C.attrs.href)===k.attrs.href?null:f.tr.removeMark(b,y,p)}}))),Os(this,Lo).use(vs(()=>{const d=new to(/(?:^|\s)((?:https?:\/\/|www\.)[^\s]+)\s$/,(h,f,p)=>{const m=h.schema.marks.link;if(!m)return null;const b=f[1].replace(/[.,)]+$/,""),y=p+f[0].indexOf(b),C=y+b.length;if(h.doc.rangeHasMark(y,C,m))return null;const k=b.startsWith("http")?b:`https://${b}`;return h.tr.addMark(y,C,m.create({href:k}))});return Kxe({rules:[d]})}));const c=[];a.forEach(d=>{const h=s[d];c.push(A$e(d,Os(this,Lo),h))}),jp(this,Wp,Promise.all(c))}async create(){await Os(this,Wp);const e=await Os(this,Lo).create();return J$e(this,IC,Tz).call(this),e}async destroy(){var e;return(e=Os(this,Bh))==null||e.disconnect(),await Os(this,Wp),Os(this,Lo).destroy()}get editor(){return Os(this,Lo)}setReadonly(e){return jp(this,Ov,!e),this}getMarkdown(){return Os(this,Lo).action(N5e())}getEditor(){return Os(this,Lo)}destroyEditor(){this.destroy()}}Lo=new WeakMap;Wp=new WeakMap;Dm=new WeakMap;Ov=new WeakMap;Bh=new WeakMap;IC=new WeakSet;Tz=function(){const t=Os(this,Dm),e=s=>{parseFloat(s.style.left)<0&&(s.style.left="0px")},n=s=>{const i=t.querySelector(s);i&&(Os(this,Bh).observe(i,{attributes:!0,attributeFilter:["style"]}),setTimeout(()=>e(i),0))};jp(this,Bh,new MutationObserver(s=>{const i=s[0];i.type==="childList"?(n("milkdown-link-edit"),n("milkdown-link-preview")):e(i.target)})),Os(this,Bh).observe(t,{childList:!0,subtree:!0})};Pz.Feature=$z;const Q$e=Symbol("editorInfoCtxKey"),eAe=se({name:"MilkdownProvider",setup:(t,{slots:e})=>(It(Q$e,{loading:J(!0),dom:J(null),editor:J(void 0),editorFactory:J(void 0)}),()=>{var r;return _(te,null,[(r=e.default)==null?void 0:r.call(e)])})});var tAe=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Iz=(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)},LC=(t,e,n)=>(tAe(t,e,"access private method"),n),Dv,OC;let nAe=class{constructor({node:e,view:n,getPos:s,decorations:i,innerDecorations:o,options:r}){Iz(this,Dv),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=s,this.decorations=i,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 LC(this,Dv,OC).call(this,e)}createContentDOM(e){return LC(this,Dv,OC).call(this,e)}get component(){return this.options.component}};Dv=new WeakSet,OC=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 sAe=class{constructor(e){this.view=e.view,this.options=e.options}get component(){return this.options.component}get root(){var e,n;let s=(n=(e=this.options).root)==null?void 0:n.call(e,this.view.dom);return s||(s=this.view.dom.parentElement??document.body),s}update(e,n){var s,i;this.view=e,this.prevState=n,(i=(s=this.options).update)==null||i.call(s,e,n)}destroy(){var e,n;(n=(e=this.options).destroy)==null||n.call(e)}};var DC,Lz;let iAe=class{constructor({pos:e,spec:n,options:s}){Iz(this,DC),this.pos=e,this.options=s,this.spec=n,this.dom=LC(this,DC,Lz).call(this,s.as),this.dom.setAttribute("data-widget-view-root","true")}bind(e,n){this.view=e,this.getPos=n}get component(){return this.options.component}};DC=new WeakSet,Lz=function(t){return t instanceof HTMLElement?t:document.createElement(t)};let m5=(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 oAe=Object.defineProperty,rAe=(t,e,n)=>e in t?oAe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Uo=(t,e,n)=>(rAe(t,typeof e!="symbol"?e+"":e,n),n);const aAe=Symbol("[ProsemirrorAdapter]nodeViewContext"),lAe=Symbol("[ProsemirrorAdapter]useNodeViewFactory");let cAe=class extends nAe{constructor(){super(...arguments),Uo(this,"key",m5()),Uo(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:ss(this.node),selected:ss(this.selected),decorations:ss(this.decorations),innerDecorations:ss(this.innerDecorations)}),Uo(this,"updateContext",()=>{Object.entries({node:this.node,selected:this.selected,decorations:this.decorations,innerDecorations:this.innerDecorations}).forEach(([e,n])=>{const s=this.context[e];s.value!==n&&(s.value=n)})}),Uo(this,"render",()=>{const e=this.component;return Ki(se({name:"ProsemirrorNodeView",setup:()=>(It(aAe,this.context),()=>_(va,{key:this.key,to:this.dom},{default:()=>[_(e,null,null)]}))}))})}};const uAe=(t,e)=>n=>(s,i,o,r,a)=>{const l=new cAe({node:s,view:i,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},dAe=Symbol("[ProsemirrorAdapter]nodeViewContext"),hAe=Symbol("[ProsemirrorAdapter]usePluginViewFactory");let fAe=class extends sAe{constructor(){super(...arguments),Uo(this,"key",m5()),Uo(this,"context",{view:ss(this.view),prevState:ss(this.prevState)}),Uo(this,"updateContext",()=>{Object.entries({view:this.view,prevState:this.prevState}).forEach(([e,n])=>{const s=this.context[e];if(e==="view"){const i=Object.assign(Object.create(Object.getPrototypeOf(n)),n);s.value=i;return}s.value=n})}),Uo(this,"render",()=>{const e=this.component;return Ki(se({name:"ProsemirrorNodeView",setup:()=>(It(dAe,this.context),()=>_(va,{key:this.key,to:this.root},{default:()=>[_(e,null,null)]}))}))})}};const pAe=(t,e)=>n=>s=>{const i=new fAe({view:s,options:{...n,update:(o,r)=>{var a;(a=n.update)==null||a.call(n,o,r),i.updateContext()},destroy:()=>{var o;(o=n.destroy)==null||o.call(n),e(i)}}});return t(i),i},mAe=()=>{const t=J({}),e=pt(),n=Ki({});return rd(()=>{n.updater=()=>{e==null||e.update()}}),_a(()=>{n.updater=void 0}),{portals:t,renderVueRenderer:s=>{var i;t.value[s.key]=s.render(),(i=n.updater)==null||i.call(n)},removeVueRenderer:s=>{delete t.value[s.key]}}},gAe=Symbol("[ProsemirrorAdapter]widgetViewContext"),vAe=Symbol("[ProsemirrorAdapter]useWidgetViewFactory");let _Ae=class extends iAe{constructor(){super(...arguments),Uo(this,"key",m5()),Uo(this,"context",{view:this.view,getPos:this.getPos,spec:this.spec}),Uo(this,"updateContext",()=>{Object.assign(this.context,{view:this.view,getPos:this.getPos,spec:this.spec})}),Uo(this,"render",()=>{const e=this.component;return Ki(se({name:"ProsemirrorWidgetView",setup:()=>(It(gAe,this.context),()=>_(va,{key:this.key,to:this.dom},{default:()=>[_(e,null,null)]}))}))})}};const yAe=(t,e)=>n=>(s,i={})=>{const o=new _Ae({pos:s,options:n}),r={...i,destroy:a=>{var l;(l=i.destroy)==null||l.call(i,a),e(o)}};return o.spec=r,ws.widget(s,(a,l)=>(o.bind(a,l),o.updateContext(),t(o),o.dom),r)},bAe=se({name:"ProsemirrorAdapterProvider",setup:(t,{slots:e})=>{const{portals:n,renderVueRenderer:s,removeVueRenderer:i}=mAe(),o=uAe(s,i),r=pAe(s,i),a=yAe(s,i);return It(lAe,o),It(hAe,r),It(vAe,a),()=>{var l;return _(te,null,[(l=e.default)==null?void 0:l.call(e),Object.values(n.value).map(c=>gt(c))])}}}),wAe={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:bAe},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(/ |\u00A0/gi,"").trim()),this.context==="comment"&&this.is_modal&&(window.fcom_modal_comment_unsaved=this.hasUnsavedChanges)}},methods:{updateContent(t){this.editor.action(e=>{const n=e.get(Vn),{state:s}=n,{from:i}=s.selection,o=t,r=s.tr.insertText(o,i),a=i+o.length,l=r.setSelection(St.create(r.doc,a));n.dispatch(l),n.focus()})},initEditor(){const t=this,e=new Pz({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")}},onUpdate(n){n=n.replace(/!\[[^\]]*\]\(\s*\)/g,""),t.$emit("update:modelValue",n),t.currentContent=n},async handleCommonActions(n,s){if(n==="editor_updated"){if(t.disable_mention)return!1;t.checkforMention(s)}else if(n==="handleFileUpload")return t.disable_media?[]:await t.handleFileUpload(s)}});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:s}=n;let i=null;t&&s.doc.descendants((r,a)=>{if(r.isText&&r.text){const l=r.text.lastIndexOf(t);l!==-1&&(i=a+l+t.length+1)}});const o=i!==null?Math.min(i,s.doc.content.size-1):Math.max(1,s.doc.content.size-1);n.dispatch(s.tr.setSelection(St.create(s.doc,o))),n.focus()})},checkforMention(t){if(!this.currentContent.includes("@")||this.justReplaced){this.showMentionPop=!1,this.currentMentionSearch="";return}const n=t.get(Vn),{state:s}=n,{selection:i}=s;if(!i)return;const r=s.doc.textBetween(0,i.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(B5e(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 s=e.item(n);if(s&&s.type.includes("image"))if(this.onInlineUpload){if(this.canAddImage&&!this.canAddImage())continue;await this.insertInlineImage(s)}else this.$emit("handleMediaUpload",s)}return[]},async insertInlineImage(t){try{const e=await this.onInlineUpload(t);if(!e)return;this.editor.action(n=>{const s=n.get(Vn),{state:i}=s,o=i.schema.nodes["image-block"];if(!o)return;const r=o.create({src:e,caption:"",ratio:1}),{$from:a}=i.selection,l=a.after(1),c=i.tr.insert(l,r);s.dispatch(c),s.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"),s=this.appVars.portal_url;if(!n)return;const i=n.startsWith(s)||n.startsWith("/"),o=n===window.location.href;i&&!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",()=>{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)}})},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))}},CAe={style:{position:"relative"},class:"fcom_md_editor"},kAe={ref:"crepe_editor_vue",class:"crepe-editor feed_md_content fcom_md_seditor_wrapper"},xAe={class:"fcom_mention_pop_wrap"},SAe={key:0},$Ae={key:0},AAe=["onClick"],MAe=["src"],EAe={key:1};function TAe(t,e,n,s,i,o){const r=H("ProsemirrorAdapterProvider"),a=H("MilkdownProvider"),l=Ii;return v(),$(te,null,[_(a,null,{default:w(()=>[_(r,null,{default:w(()=>[g("div",CAe,[g("div",kAe,null,512)])]),_:1})]),_:1}),g("div",xAe,[_(l,{"popper-class":"fcom_mention_pop",ref:"mentionPopoverRef",placement:"bottom",visible:i.showMentionPop,width:300,persistent:!1},{reference:w(()=>[...e[0]||(e[0]=[g("span",{style:{}},null,-1)])]),default:w(()=>[i.justReplaced?O("",!0):(v(),$("div",SAe,[i.mentionResults.length?(v(),$("ul",$Ae,[(v(!0),$(te,null,be(i.mentionResults,c=>(v(),$("li",{key:c.user_id,onClick:u=>o.addMention("@"+c.username)},[c.avatar?(v(),$("img",{key:0,alt:"",src:c.avatar},null,8,MAe)):O("",!0),g("span",null,M(c.display_name)+" (@"+M(c.username)+")",1)],8,AAe))),128))])):i.searchingMention?O("",!0):(v(),$("div",EAe,[g("p",null,M(t.$t("No results found. Please search by username")),1)]))]))]),_:1},8,["visible"])])],64)}const Sd=de(wAe,[["render",TAe]]),PAe={name:"CreateCorseForm",components:{FormBuilder:LV,SpaceGroupSelector:I4,TopicSelector:IV,SlugInput:_d,ImageUploader:vd,LogoEmojiSelector:d1,ErrorAlerts:h1,CrepeEditor:Sd},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:Zye,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:Jye,dataLoaded:!1,metaSettings:null,fetchingMetaBoxes:!1,appReady:!1,courseInstructors:[],fetchingInstructors:!1}},watch:{savingCount(){this.submit(!0)}},methods:{validateForm(){var t;if(this.formErrors=[],(!this.form.title||!this.form.title.trim())&&this.formErrors.push({title:this.$t("Course Title"),description:this.$t("Course title is required.")}),(!this.form.description||!this.form.description.trim())&&this.formErrors.push({title:this.$t("Short Description"),description:this.$t("Short description is required.")}),(t=this.form.slug)!=null&&t.trim()){const e=f1("/"+this.form.slug);e.valid||e.errors.forEach(n=>{this.formErrors.push({title:this.$t("Slug"),description:this.$t(n)})})}return this.formErrors.length===0},submit(t=!1){if(!this.form.id&&!this.validateForm())return;this.saving=!0;let e="admin/courses",n=this.form,s=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},s=this.$put,this.form.created_by&&this.isAdmin()&&(n.created_by=this.form.created_by),this.metaSettings)){let i={};this.each(this.metaSettings,(o,r)=>{i[r]=o.settings}),n.meta_settings=i}s(e,n).then(i=>{if(!this.form.id&&!this.disable_redirect){let o=this.$getRouteLink("admin/manage-courses/edit/"+i.course.id+"/lessons");window.location.href=o,this.form={};return}this.$eventBus.emit("reloadMenu"),this.$notify.success(i.message||this.$t("Course has been created successfully")),this.$emit("completed",i.course),t&&this.$emit("close")}).catch(i=>{this.$handleError(i)}).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,s,i,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&&!((s=this.form)!=null&&s.course_type)&&(this.form.course_type=t),(!((o=(i=this.form)==null?void 0:i.settings)!=null&&o.course_layout)||!this.has_pro)&&(this.form.settings.course_layout="classic"),this.dataLoaded=!0,this.$nextTick(()=>{this.appReady=!0})}},IAe={key:0},LAe={class:"fcom_form_section"},OAe={class:"fcom_help_text"},DAe={class:"fcom_help_text"},RAe={class:"fcom_form_section"},VAe={style:{"font-weight":"bold"}},FAe={key:0},NAe={class:"fcom_help_text"},BAe={style:{"font-weight":"bold"}},zAe={class:"fcom_form_section"},HAe={class:"fcom_lined_checkboxes"},UAe={key:0},jAe={class:"fcom_help_text"},WAe={key:0,class:"fcom_form_section"},YAe={class:"fcom_select_photo",style:{float:"left"}},GAe=["src","alt"],qAe={style:{float:"right",color:"#8492a6","font-size":"13px"}},XAe={class:"fcom_lined_checkboxes"},KAe={class:"fcom_form_section"},ZAe={class:"fcom_help_text"},JAe=["href"],QAe={class:"fcom_image_uploader_wrapper"},eMe={class:"fcom_help_text"},tMe={class:"fcom_space_form_bottom"},nMe={key:0},sMe={class:"fcom_form_section fcom_mt_20"},iMe={key:1},oMe=["href"];function rMe(t,e,n,s,i,o){const r=H("logo-emoji-selector"),a=vt,l=en,c=H("SlugInput"),u=H("crepe-editor"),d=H("space-group-selector"),h=ko,f=Ps,p=an,m=Jt,b=Ht,y=H("topic-selector"),C=xa,k=H("EditPen"),x=ye,S=Ge,E=H("Delete"),T=H("ImageUploader"),P=H("error-alerts"),I=rn,L=H("form-builder"),V=_t("loading");return t.hasFeature("has_course")?(v(),$("div",IAe,[_(I,{onSubmit:e[21]||(e[21]=Be(D=>t.doNothing(),["prevent"])),modelValue:i.form,"onUpdate:modelValue":e[22]||(e[22]=D=>i.form=D),"label-position":"top","require-asterisk-position":"right"},{default:w(()=>[g("div",LAe,[g("h4",null,M(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:i.form.title,"onUpdate:modelValue":e[1]||(e[1]=D=>i.form.title=D)},{prepend:w(()=>{var D,z;return[i.dataLoaded?(v(),R(r,{key:0,custom_svg:!0,config:{logo:i.form.logo,emoji:(D=i.form.settings)==null?void 0:D.emoji,shape_svg:((z=i.form.settings)==null?void 0:z.shape_svg)||""},onUpdate:e[0]||(e[0]=Y=>{i.form.settings.emoji=Y.emoji,i.form.logo=Y.logo,i.form.settings.shape_svg=Y.shape_svg})},null,8,["config"])):O("",!0)]}),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),i.dataLoaded?(v(),R(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:!!i.form.id,modelValue:i.form.slug,"onUpdate:modelValue":e[2]||(e[2]=D=>i.form.slug=D),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:i.form.description,"onUpdate:modelValue":e[3]||(e[3]=D=>i.form.description=D)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),_(l,{class:"form_label_with_tooltip",label:t.$t("Course Details")},{default:w(()=>[i.appReady?(v(),R(u,{key:0,modelValue:i.form.settings.course_details,"onUpdate:modelValue":e[4]||(e[4]=D=>i.form.settings.course_details=D),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",OAe,[g("p",null,M(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(()=>[i.dataLoaded?(v(),R(d,{key:0,modelValue:i.form.parent_id,"onUpdate:modelValue":e[5]||(e[5]=D=>i.form.parent_id=D),space_id:i.form.id},null,8,["modelValue","space_id"])):O("",!0),g("div",DAe,[g("p",null,M(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:i.form.status,"onUpdate:modelValue":e[6]||(e[6]=D=>i.form.status=D),class:"fcom_radio_group"},{default:w(()=>[_(h,{value:"published"},{default:w(()=>[G(M(t.$t("Published")),1)]),_:1}),_(h,{value:"draft"},{default:w(()=>[G(M(t.$t("Draft")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])]),g("div",RAe,[g("h4",null,M(t.$t("Access Control")),1),_(l,{label:t.$t("Privacy")},{default:w(()=>[_(m,{"popper-class":"rich_select",modelValue:i.form.privacy,"onUpdate:modelValue":e[7]||(e[7]=D=>i.form.privacy=D),placeholder:t.$t("Select Privacy")},{default:w(()=>[(v(!0),$(te,null,be(i.privacies,(D,z)=>(v(),R(p,{key:z,label:D.label,value:z},{default:w(()=>[g("span",VAe,M(D.label),1),g("p",null,M(D.description),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),i.form.privacy=="private"?(v(),$(te,{key:0},[_(l,{label:t.$t("Lock Screen Type")},{default:w(()=>[_(f,{modelValue:i.form.settings.custom_lock_screen,"onUpdate:modelValue":e[8]||(e[8]=D=>i.form.settings.custom_lock_screen=D),class:"fcom_radio_group"},{default:w(()=>[_(h,{value:"yes"},{default:w(()=>[G(M(t.$t("Custom")),1)]),_:1}),_(h,{value:"no"},{default:w(()=>[G(M(t.$t("Default")),1)]),_:1}),_(h,{disabled:!t.has_pro,value:"redirect"},{default:w(()=>[G(M(t.$t("Redirect to an URL"))+" ",1),t.has_pro?O("",!0):(v(),$("span",FAe,M(t.$t("Require Pro")),1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),i.form.settings.custom_lock_screen=="redirect"&&t.has_pro?(v(),R(l,{key:0,label:t.$t("Provide the Redirect URL")},{default:w(()=>[_(a,{modelValue:i.form.settings.onboard_redirect_url,"onUpdate:modelValue":e[9]||(e[9]=D=>i.form.settings.onboard_redirect_url=D),type:"text",placeholder:t.$t("Redirect URL for unenrolled users")},null,8,["modelValue","placeholder"]),g("div",NAe,[g("p",null,M(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),i.form.settings.custom_lock_screen=="no"?(v(),R(l,{key:1},{default:w(()=>[_(b,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.show_paywalls,"onUpdate:modelValue":e[10]||(e[10]=D=>i.form.settings.show_paywalls=D),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Show Paywalls 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:i.form.course_type,"onUpdate:modelValue":e[11]||(e[11]=D=>i.form.course_type=D),placeholder:t.$t("Select Type")},{default:w(()=>[(v(!0),$(te,null,be(i.courseTypes,(D,z)=>(v(),R(p,{key:z,label:D.label,value:z},{default:w(()=>[g("span",BAe,M(D.label),1),g("p",null,M(D.description),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),g("div",zAe,[g("h4",null,M(t.$t("Features Customizations")),1),_(l,null,{default:w(()=>[g("div",HAe,[i.form.privacy=="public"&&i.form.course_type=="self_paced"?(v(),R(b,{key:0,"true-value":"yes","false-value":"no",modelValue:i.form.settings.public_lesson_view,"onUpdate:modelValue":e[12]||(e[12]=D=>i.form.settings.public_lesson_view=D),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Public users can view the lessons without enrolling in the course")),1)]),_:1},8,["modelValue"])):O("",!0),_(b,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.disable_comments,"onUpdate:modelValue":e[13]||(e[13]=D=>i.form.settings.disable_comments=D),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Disable comments for all the lessons for this course")),1)]),_:1},8,["modelValue"]),_(b,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.hide_members_count,"onUpdate:modelValue":e[14]||(e[14]=D=>i.form.settings.hide_members_count=D),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Hide students count from courses page")),1)]),_:1},8,["modelValue"])])]),_:1}),_(l,{label:t.$t("Course Layout")},{default:w(()=>[_(f,{modelValue:i.form.settings.course_layout,"onUpdate:modelValue":e[15]||(e[15]=D=>i.form.settings.course_layout=D),class:"fcom_radio_group"},{default:w(()=>[_(h,{value:"classic"},{default:w(()=>[G(M(t.$t("Classic")),1)]),_:1}),_(h,{disabled:!t.has_pro,value:"modern"},{default:w(()=>[G(M(t.$t("Modern"))+" ",1),t.has_pro?O("",!0):(v(),$("span",UAe,"("+M(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",jAe,[g("p",null,M(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"])]),i.form.id?(v(),$("div",WAe,[g("h4",null,M(t.$t("Course Instructor")),1),_(l,{label:t.$t("Instructor")},{default:w(()=>[_(m,{disabled:!t.isAdmin(),class:"rich_select",filterable:"",remote:"",loading:i.fetchingInstructors,"remote-method":o.searchUsers,placeholder:t.$t("Select User"),modelValue:i.form.created_by,"onUpdate:modelValue":e[16]||(e[16]=D=>i.form.created_by=D)},{default:w(()=>[(v(!0),$(te,null,be(i.courseInstructors,D=>(v(),R(p,{class:"fcom_with_photo_option",key:D.ID,label:D.display_name+" ("+(D.user_email||D.ID)+")",value:D.ID},{default:w(()=>[g("span",YAe,[g("img",{src:D.photo,alt:D.display_name},null,8,GAe),g("span",null,M(D.display_name),1)]),g("span",qAe,M(D.user_email||D.ID),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["disabled","loading","remote-method","placeholder","modelValue"])]),_:1},8,["label"]),_(l,null,{default:w(()=>[g("div",XAe,[_(b,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.hide_instructor_view,"onUpdate:modelValue":e[17]||(e[17]=D=>i.form.settings.hide_instructor_view=D),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Hide course instructor view from course overview page")),1)]),_:1},8,["modelValue"]),i.form.settings.hide_instructor_view!="yes"?(v(),R(b,{key:0,"true-value":"yes","false-value":"no",modelValue:i.form.settings.show_instructor_students_count,"onUpdate:modelValue":e[18]||(e[18]=D=>i.form.settings.show_instructor_students_count=D),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Show students count in course instructor view")),1)]),_:1},8,["modelValue"])):O("",!0)])]),_:1})])):O("",!0),g("div",KAe,[g("h4",null,M(t.$t("Others")),1),t.has_pro&&i.dataLoaded?(v(),R(l,{key:0,label:t.$t("Topic navigation")},{default:w(()=>[_(y,{modelValue:i.form.category_ids,"onUpdate:modelValue":e[19]||(e[19]=D=>i.form.category_ids=D),creatable:!0},null,8,["modelValue"]),g("div",ZAe,[g("p",null,M(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",{key:0,target:"_blank",rel:"noopener",href:t.$getRouteLink("admin/settings/topics-settings")},M(t.$t("Manage all topics")),9,JAe)):O("",!0)])])]),_:1},8,["label"])):O("",!0),_(l,{label:t.$t("Thumbnail / Open Graph Image (Recommended Size: 1200 x 630)")},{default:w(()=>[i.form.cover_photo?(v(),R(C,{key:0,alt:t.$t("Cover Photo"),src:i.form.cover_photo,style:{"max-width":"100px",height:"auto"}},null,8,["alt","src"])):O("",!0),g("div",QAe,[_(T,{isTextBtn:!1,can_remove:!!i.form.cover_photo,additionalData:{resize:!1,disable_convert:"yes",max_width:1200,max_height:630},onUploaded:o.handlePhotoUpload},Es({remove:w(()=>[_(x,null,{default:w(()=>[_(E)]),_:1})]),_:2},[i.form.cover_photo?{name:"trigger",fn:w(()=>[_(S,{class:"fcom_plain_button"},{default:w(()=>[_(x,null,{default:w(()=>[_(k)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["can_remove","onUploaded"])]),g("div",eMe,[g("p",null,M(t.$t("Will be used on course card preview and social sharing preview.")),1)])]),_:1},8,["label"]),_(P,{errors:i.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),i.form.id?O("",!0):(v(),R(l,{key:1,style:{"margin-top":"45px"}},{default:w(()=>[g("div",tMe,[e[23]||(e[23]=g("span",null,null,-1)),_(S,{class:"fcom_primary_button",disabled:i.saving,onClick:e[20]||(e[20]=D=>o.submit()),loading:i.saving},{default:w(()=>[g("span",null,M(t.$t("Create")),1)]),_:1},8,["disabled","loading"])])]),_:1}))])]),_:1},8,["modelValue"]),Pe((v(),$("div",null,[i.metaSettings&&Object.keys(i.metaSettings).length>0?(v(),$("div",nMe,[(v(!0),$(te,null,be(i.metaSettings,D=>(v(),$("div",sMe,[g("h4",null,M(D.section_title),1),_(L,{formData:D.settings,formFields:D.fields,disableSubmit:!0},null,8,["formData","formFields"])]))),256))])):O("",!0)])),[[V,i.fetchingMetaBoxes]])])):(v(),$("div",iMe,[g("p",null,M(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")},M(t.$t("Go to features settings")),9,oMe)]))}const g5=de(PAe,[["render",rMe]]),aMe={name:"SpaceIcon",props:["space_profile"]},lMe=["alt","src"],cMe={key:1,class:"fcom_emoji"},uMe={key:2,class:"fcom_shape"},dMe={key:3,class:"fcom_no_avatar"};function hMe(t,e,n,s,i,o){var a,l,c,u;const r=ye;return n.space_profile.logo?(v(),$("img",{key:0,alt:t.$t("Space Logo"),src:n.space_profile.logo},null,8,lMe)):(a=n.space_profile.settings)!=null&&a.emoji?(v(),$("span",cMe,M((l=n.space_profile.settings)==null?void 0:l.emoji),1)):(c=n.space_profile.settings)!=null&&c.shape_svg?(v(),$("span",uMe,[_(r,{innerHTML:(u=n.space_profile.settings)==null?void 0:u.shape_svg},null,8,["innerHTML"])])):(v(),$("span",dMe))}const qf=de(aMe,[["render",hMe]]),fMe={name:"SpaceCourseSelector",components:{SpaceIcon:qf},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=[],s=[];this.each(e,o=>{let r=t.filter(a=>{let l=a.parent_id==o.id;return l&&s.push(a.slug),l});r.length&&n.push({label:o.title,spaces:r})});let i=t.filter(o=>o.parent_id===null);i&&i.length&&n.push({label:this.$t("Uncategorized"),spaces:i}),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}},pMe={key:0,class:"fcom_space_title"},mMe={key:0},gMe={key:1};function vMe(t,e,n,s,i,o){const r=H("SpaceIcon"),a=an,l=fb,c=Jt,u=_t("loading");return i.app_ready?(v(),R(c,{key:0,onChange:o.emitChanges,modelValue:i.selected_spaces,"onUpdate:modelValue":e[0]||(e[0]=d=>i.selected_spaces=d),filterable:"",multiple:n.is_multiple,placeholder:n.placeholder_text,style:{width:"100%"}},{default:w(()=>[(v(!0),$(te,null,be(i.formattedSpaceGroups,d=>Pe((v(),R(l,{key:d.label,label:d.label},{default:w(()=>[(v(!0),$(te,null,be(d.spaces,h=>(v(),R(a,{key:h.slug,label:h.title,disabled:o.isMemberOfSpace(h.id),value:h.id.toString()},{default:w(()=>[h.id?(v(),$("span",pMe,[_(r,{space_profile:h},null,8,["space_profile"]),g("span",null,[G(M(t.getExcerpt(h.title,50))+" ",1),h.type=="course"?(v(),$("span",mMe," ("+M(t.$t("course"))+")",1)):O("",!0)])])):(v(),$("span",gMe,M(t.getExcerpt(h.title,50)),1))]),_:2},1032,["label","disabled","value"]))),128))]),_:2},1032,["label"])),[[u,i.loading]])),128))]),_:1},8,["onChange","modelValue","multiple","placeholder"])):O("",!0)}const v5=de(fMe,[["render",vMe]]),_Me={name:"SidebarLinkForm",components:{SpaceGroupSelector:I4,LogoEmojiSelector:d1,SpaceCourseSelector:v5,ErrorAlerts:h1},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(){this.formErrors=[],(!this.form.title||!this.form.title.trim())&&this.formErrors.push({title:this.$t("Title"),description:this.$t("Link title is required.")});const t=PV(this.form.settings.permalink);return t.valid||t.errors.forEach(e=>{this.formErrors.push({title:this.$t("Permalink"),description:this.$t(e)})}),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}},yMe={class:"fcom_form_section"},bMe={class:"fcom_help_text"},wMe={class:"fcom_help_text"},CMe={class:"fcom_help_text"},kMe={key:0},xMe={key:1};function SMe(t,e,n,s,i,o){const r=H("logo-emoji-selector"),a=vt,l=en,c=Ht,u=H("space-group-selector"),d=ko,h=Ps,f=H("SpaceCourseSelector"),p=H("error-alerts"),m=Ge,b=rn,y=_t("loading");return v(),R(b,{onSubmit:e[8]||(e[8]=Be(C=>t.doNothing(),["prevent"])),modelValue:i.form,"onUpdate:modelValue":e[9]||(e[9]=C=>i.form=C),"label-position":"top","require-asterisk-position":"right",class:"fcom_space_form"},{default:w(()=>[g("div",yMe,[_(l,{label:t.$t("Link Title"),required:""},{default:w(()=>[_(a,{type:"text",placeholder:t.$t("Your Link Title"),modelValue:i.form.title,"onUpdate:modelValue":e[1]||(e[1]=C=>i.form.title=C)},{prepend:w(()=>{var C,k;return[i.dataLoaded?(v(),R(r,{key:0,custom_svg:!0,onUpdate:e[0]||(e[0]=x=>{i.form.settings.emoji=x.emoji,i.form.logo=x.logo,i.form.settings.shape_svg=x.shape_svg}),config:{logo:i.form.logo,emoji:((C=i.form.settings)==null?void 0:C.emoji)||"",shape_svg:((k=i.form.settings)==null?void 0:k.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:i.form.settings.permalink,"onUpdate:modelValue":e[2]||(e[2]=C=>i.form.settings.permalink=C)},null,8,["placeholder","modelValue"]),g("div",bMe,[_(c,{modelValue:i.form.settings.new_tab,"onUpdate:modelValue":e[3]||(e[3]=C=>i.form.settings.new_tab=C),"true-value":"yes","false-value":"no"},{default:w(()=>[G(M(t.$t("Open this link in new tab")),1)]),_:1},8,["modelValue"])])]),_:1},8,["label"]),_(l,{label:t.$t("Menu Group")},{default:w(()=>[i.dataLoaded?(v(),R(u,{key:0,modelValue:i.form.parent_id,"onUpdate:modelValue":e[4]||(e[4]=C=>i.form.parent_id=C),space_id:i.form.id},null,8,["modelValue","space_id"])):O("",!0),g("div",wMe,[g("p",null,M(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:i.form.privacy,"onUpdate:modelValue":e[5]||(e[5]=C=>i.form.privacy=C)},{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",CMe,[g("p",null,M(t.$t("Select who can see this link.")),1)])]),_:1},8,["label"]),i.form.privacy=="members_only"?(v(),R(l,{key:0,label:t.$t("Select Space/Course Memberships")},{default:w(()=>[_(f,{modelValue:i.form.settings.membership_ids,"onUpdate:modelValue":e[6]||(e[6]=C=>i.form.settings.membership_ids=C),placeholder_text:t.$t("Select Memberships"),is_multiple:!0},null,8,["modelValue","placeholder_text"])]),_:1},8,["label"])):O("",!0),_(p,{errors:i.formErrors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),_(l,{style:{"margin-top":"45px"}},{default:w(()=>[Pe((v(),R(m,{class:"fcom_primary_button",disabled:i.saving,onClick:e[7]||(e[7]=C=>o.saveSettings())},{default:w(()=>[i.form.id?(v(),$("span",kMe,M(t.$t("Update")),1)):(v(),$("span",xMe,M(t.$t("Create Link")),1))]),_:1},8,["disabled"])),[[y,i.saving]])]),_:1})])]),_:1},8,["modelValue"])}const Oz=de(_Me,[["render",SMe]]),$Me={name:"SpaceIcon"},AMe={version:"1.1",viewBox:"0 0 128 128","xml:space":"preserve"};function MMe(t,e,n,s,i,o){return v(),$("svg",AMe,[...e[0]||(e[0]=[ya('<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)])])}const EMe=de($Me,[["render",MMe]]),TMe={name:"CourseIcon"},PMe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function IMe(t,e,n,s,i,o){return v(),$("svg",PMe,[...e[0]||(e[0]=[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),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)])])}const Dz=de(TMe,[["render",IMe]]),LMe={name:"SpaceCreateModal",components:{Drawer:k4,CreateSpaceForm:L4,CreateCourseForm:g5,SidebarLinkForm:Oz,ArrowLeftBold:Nse,SpaceIcon:EMe,CourseIcon:Dz,Link:xO},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})})}},OMe={class:"dialog_header"},DMe={class:"dialog_left"},RMe={class:"dialog_body"},VMe={key:0,class:"space-type-selector"},FMe={class:"space-cards"},NMe={class:"space-card-label"},BMe={class:"space-card-label"},zMe={key:0,class:"space-card-note"},HMe={class:"space-card-label"},UMe={key:0,class:"space-card-note"},jMe={class:"dialog_footer"};function WMe(t,e,n,s,i,o){const r=H("ArrowLeftBold"),a=ye,l=Ge,c=H("SpaceIcon"),u=H("CourseIcon"),d=H("Link"),h=H("create-space-form"),f=H("create-course-form"),p=H("sidebar-link-form"),m=H("Drawer");return v(),R(m,{modelValue:i.showCreateSpaceModal,"onUpdate:modelValue":e[5]||(e[5]=b=>i.showCreateSpaceModal=b),size:t.drawerWidth,"close-on-click-modal":!0,"has-close-confirmation":i.enteredForm,"close-confirmation-message":o.leaveMessage,drawerClass:"fcom_space_create_drawer"},Es({header:w(()=>[g("div",OMe,[g("div",DMe,[i.step!="choose_type"?(v(),R(l,{key:0,onClick:e[0]||(e[0]=b=>i.step="choose_type"),text:"",size:"small"},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1})]),_:1})):O("",!0),g("h4",null,M(o.currentTitle),1)])])]),default:w(()=>[g("div",RMe,[i.step=="choose_type"?(v(),$("div",VMe,[g("div",FMe,[g("div",{onClick:e[1]||(e[1]=b=>i.select_type="space_form"),class:W([{"is-active":i.select_type==="space_form"},"space-card"])},[_(a,{class:"space-card-icon"},{default:w(()=>[_(c)]),_:1}),g("span",NMe,M(t.$t("Discussion Space")),1)],2),g("div",{onClick:e[2]||(e[2]=b=>!!t.hasFeature("has_course")&&(i.select_type="course_form")),class:W([{"is-active":i.select_type==="course_form","is-disabled":!t.hasFeature("has_course")},"space-card"])},[_(a,{class:"space-card-icon"},{default:w(()=>[_(u)]),_:1}),g("span",BMe,M(t.$t("Course")),1),t.hasFeature("has_course")?O("",!0):(v(),$("span",zMe,M(t.$t("Course Module is disabled")),1))],2),g("div",{onClick:e[3]||(e[3]=b=>!!t.appVars.pro&&(i.select_type="link_form")),class:W([{"is-active":i.select_type==="link_form","is-disabled":!t.appVars.pro},"space-card"])},[_(a,{class:"space-card-icon"},{default:w(()=>[_(d)]),_:1}),g("span",HMe,M(t.$t("Link")),1),t.appVars.pro?O("",!0):(v(),$("span",UMe,M(t.$t("Pro Required")),1))],2)])])):i.step=="space_form"?(v(),R(h,{key:1,disable_redirect:i.disable_redirect,parent_id:i.parent_id,onCompleted:o.handleCompleted},null,8,["disable_redirect","parent_id","onCompleted"])):i.step=="course_form"?(v(),R(f,{key:2,disable_redirect:i.disable_redirect,parent_id:i.parent_id,onCompleted:o.handleCompleted},null,8,["disable_redirect","parent_id","onCompleted"])):i.step=="link_form"?(v(),R(p,{key:3,parent_id:i.parent_id,onCompleted:o.handleCompleted},null,8,["parent_id","onCompleted"])):O("",!0)])]),_:2},[i.step=="choose_type"?{name:"footer",fn:w(()=>[g("div",jMe,[_(l,{disabled:!i.select_type,class:"fcom_primary_button",onClick:e[4]||(e[4]=b=>o.handleNextStep())},{default:w(()=>[G(M(t.$t("Next")),1)]),_:1},8,["disabled"])])]),key:"0"}:void 0]),1032,["modelValue","size","has-close-confirmation","close-confirmation-message"])}const YMe=de(LMe,[["render",WMe]]),cs=yb("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 s=Date.now()-n.timestamp,i=n.ttl||e||5*60*1e3;return s>i?(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,s])=>({key:n,lastAccessed:s.lastAccessed||s.timestamp})).sort((n,s)=>n.lastAccessed-s.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(([s,i])=>{n-i.timestamp>t&&(delete this.cache[s],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)})}}}),_5=yb("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 s=String(e);n==null?delete this.follows[s]:this.follows[s]=String(n)}},removeFollow(t){delete this.follows[String(t)]},async fetchProfile(t,e=!1){const n=cs(),s=`user-profile:${t}`;if(!e){const i=n.get(s);if(i)return this.profilesByUsername[t]=i,i.follow!==void 0&&i.user_id&&this.setFollows({[i.user_id]:i.follow}),i}this.loading[t]=!0;try{const i=await this.$api.get(`profile/${t}`),o=i.profile;return o.follow!==void 0&&o.user_id&&this.setFollows({[o.user_id]:o.follow}),i.current_user_follows&&this.setFollows(i.current_user_follows),this.profilesByUsername[t]=o,this.lastFetched[t]=Date.now(),n.set(s,o,5*60*1e3),this.loading[t]=!1,o}catch(i){throw this.loading[t]=!1,console.error("Failed to fetch user profile:",i),i}},async updateProfile(t,e=null,n=null){var i;const s=cs();try{const o=n?await this.$api.put(`profile/${n}`,{data:t}):await this.$api.put("profile",t),r=o.profile||o.user||o;return this.currentUser={...this.currentUser,...r},e&&e!==r.username&&(delete this.profilesByUsername[e],s.invalidate(`user-profile:${e}`)),r.username&&(this.profilesByUsername[r.username]=r,s.invalidate(`user-profile:${r.username}`)),(i=window.fluentComAdmin)!=null&&i.auth&&(window.fluentComAdmin.auth={...window.fluentComAdmin.auth,...r}),r}catch(o){throw console.error("Failed to update profile:",o),o}},async toggleFollow(t,e=null){var a,l,c;const n=cs(),s=String(t),i=this.follows[s],o=i!==void 0&&["1","2"].includes(String(i)),r=i;o?(delete this.follows[s],e&&this.profilesByUsername[e]&&(this.profilesByUsername[e].followers_count--,this.profilesByUsername[e].follow=void 0)):(this.follows[s]="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[s]:((a=d.follow)==null?void 0:a.level)!==void 0&&this.setFollows({[s]: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[s]=r,e&&this.profilesByUsername[e]&&(this.profilesByUsername[e].followers_count++,this.profilesByUsername[e].follow=r)):(delete this.follows[s],e&&this.profilesByUsername[e]&&(this.profilesByUsername[e].followers_count--,this.profilesByUsername[e].follow=void 0)),console.error("Failed to toggle follow:",u),u}},async fetchFollowing(){const t=cs(),e="user-following",n=t.get(e);if(n)return n;try{const s=await this.$api.get("profile/following"),i=s.following||s;return s.current_user_follows&&this.setFollows(s.current_user_follows),t.set(e,i,5*60*1e3),i}catch(s){throw console.error("Failed to fetch following:",s),s}},invalidateProfile(t){cs().invalidate(`user-profile:${t}`),delete this.lastFetched[t]},clearAll(){this.currentUser=null,this.profilesByUsername={},this.follows={},this.followers=[],this.loading={},this.lastFetched={};const t=cs();t.invalidatePattern("user-profile:"),t.invalidate("user-following")}}});var GMe=$a,qMe=GMe["__core-js_shared__"],XMe=qMe,Hw=XMe,aE=function(){var t=/[^.]+$/.exec(Hw&&Hw.keys&&Hw.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function KMe(t){return!!aE&&aE in t}var ZMe=KMe,JMe=Function.prototype,QMe=JMe.toString;function eEe(t){if(t!=null){try{return QMe.call(t)}catch{}try{return t+""}catch{}}return""}var Rz=eEe,tEe=bV,nEe=ZMe,sEe=Bf,iEe=Rz,oEe=/[\\^$.*+?()[\]{}|]/g,rEe=/^\[object .+?Constructor\]$/,aEe=Function.prototype,lEe=Object.prototype,cEe=aEe.toString,uEe=lEe.hasOwnProperty,dEe=RegExp("^"+cEe.call(uEe).replace(oEe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hEe(t){if(!sEe(t)||nEe(t))return!1;var e=tEe(t)?dEe:rEe;return e.test(iEe(t))}var fEe=hEe;function pEe(t,e){return t==null?void 0:t[e]}var mEe=pEe,gEe=fEe,vEe=mEe;function _Ee(t,e){var n=vEe(t,e);return gEe(n)?n:void 0}var Xf=_Ee,yEe=Xf,bEe=$a,wEe=yEe(bEe,"DataView"),CEe=wEe,kEe=Xf,xEe=$a,SEe=kEe(xEe,"Map"),y5=SEe,$Ee=Xf,AEe=$a,MEe=$Ee(AEe,"Promise"),EEe=MEe,TEe=Xf,PEe=$a,IEe=TEe(PEe,"Set"),Vz=IEe,LEe=Xf,OEe=$a,DEe=LEe(OEe,"WeakMap"),REe=DEe,RC=CEe,VC=y5,FC=EEe,NC=Vz,BC=REe,Fz=c1,Kf=Rz,lE="[object Map]",VEe="[object Object]",cE="[object Promise]",uE="[object Set]",dE="[object WeakMap]",hE="[object DataView]",FEe=Kf(RC),NEe=Kf(VC),BEe=Kf(FC),zEe=Kf(NC),HEe=Kf(BC),eu=Fz;(RC&&eu(new RC(new ArrayBuffer(1)))!=hE||VC&&eu(new VC)!=lE||FC&&eu(FC.resolve())!=cE||NC&&eu(new NC)!=uE||BC&&eu(new BC)!=dE)&&(eu=function(t){var e=Fz(t),n=e==VEe?t.constructor:void 0,s=n?Kf(n):"";if(s)switch(s){case FEe:return hE;case NEe:return lE;case BEe:return cE;case zEe:return uE;case HEe:return dE}return e});var Nz=eu,UEe=yV,jEe=Nz,WEe=x4,YEe=Aa,GEe=M4,qEe=S4,XEe=_V,KEe=A4,ZEe="[object Map]",JEe="[object Set]",QEe=Object.prototype,eTe=QEe.hasOwnProperty;function tTe(t){if(t==null)return!0;if(GEe(t)&&(YEe(t)||typeof t=="string"||typeof t.splice=="function"||qEe(t)||KEe(t)||WEe(t)))return!t.length;var e=jEe(t);if(e==ZEe||e==JEe)return!t.size;if(XEe(t))return!UEe(t).length;for(var n in t)if(eTe.call(t,n))return!1;return!0}var nTe=tTe;const Bz=Ts(nTe),sTe={name:"SocialLinks",props:["xprofile","isOwn"],computed:{hasSocialLinks(){return this.socialLinks.length>0},socialLinks(){var s;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=(s=this.xprofile.meta)==null?void 0:s.social_links),Bz(e))return t;const n=this.appVars.socialLinkProviders;return n&&this.each(n,(i,o)=>{e[o]&&t.push({title:i.title,icon:i.icon_svg,url:i.domain+e[o]})}),t}}},iTe={key:0,class:"fcom_social_links"},oTe=["href","title"];function rTe(t,e,n,s,i,o){const r=ye,a=H("router-link");return o.hasSocialLinks?(v(),$("div",iTe,[(v(!0),$(te,null,be(o.socialLinks,l=>(v(),$("a",{rel:"noopener nofollow",target:"_blank",href:l.url,key:l.title,title:l.title},[_(r,{innerHTML:l.icon},null,8,["innerHTML"])],8,oTe))),128)),n.isOwn&&!o.hasSocialLinks?(v(),R(a,{key:0,to:{name:"update_profile",params:{username:n.xprofile.username}}},{default:w(()=>[G(M("+ "+t.$t("Add social links")),1)]),_:1},8,["to"])):O("",!0)])):O("",!0)}const aTe=de(sTe,[["render",rTe]]),fE=yb("feed",{state:()=>({feedsByContext:{},feedsById:{},stickyFeeds:{},loading:{},pagination:{},filters:{},tickerIntervals:{},tickerEnabled:{},lastTickerCheck:{},tickerPending:{},newPostsCount:{},ticker:{count:0,lastFetched:0},executionTimes:{},_pendingRequests:{}}),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 s;e+=((s=n.data)==null?void 0:s.length)||0}),e},disableAutoLoad:t=>e=>{const n=t.loading[e]||!1,s=t.pagination[e];return s?n||s.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 s=Object.keys(t.feedsById).length,i=(e*5/1024).toFixed(2);return{totalFeeds:e,feedsByContextCount:n,feedsByIdCount:s,estimatedMemoryMB:i,contexts:Object.keys(t.feedsByContext).length}}},actions:{async fetchFeeds(t,e={},n=!1){var l,c,u;if(console.log("[Feed Store] fetchFeeds called:",{context:t,loadMore:n,paramsPage:e.page,currentLoading:this.loading[t],currentPage:(l=this.pagination[t])==null?void 0:l.page}),this.loading[t]){console.log("[Feed Store] Already loading for context:",t,"- ignoring duplicate request");return}const s=n?(((c=this.pagination[t])==null?void 0:c.page)||0)+1:e.page||1,i={...e,page:s,per_page:e.per_page||10},o=`feeds:${t}:${JSON.stringify(i)}`,r=cs();if(!n&&s===1){const d=r.get(o,3e5);if(d)return this.feedsByContext[t]=d.feedsByContext,this.pagination[t]=d.pagination,this.executionTimes[t]=d.executionTime,d.stickyFeed&&!window["viewed_sticky_posts_"+d.stickyFeed.id]?this.stickyFeeds[t]=d.stickyFeed:(this.stickyFeeds[t]=null,d.stickyFeed&&((u=this.feedsByContext[t])!=null&&u.data)&&(this.feedsByContext[t].data.some(h=>h.id===d.stickyFeed.id)||this.feedsByContext[t].data.unshift(d.stickyFeed))),d.feedsByContext.data.forEach(h=>{this.feedsById[h.id]=h}),this.loading[t]=!1,d}return this.loading[t]=!0,this.$api.get(e.feed_base_url||"feeds",i).then(d=>{var h,f,p,m;if(d.sticky){const b="viewed_sticky_posts_"+d.sticky.id;window[b]?(d.feeds.data.some(y=>y.id===d.sticky.id)||d.feeds.data.unshift(d.sticky),this.stickyFeeds[t]=null):this.stickyFeeds[t]=d.sticky}else s===1&&(this.stickyFeeds[t]=null);if(n){const b=((h=this.feedsByContext[t])==null?void 0:h.data)||[];this.feedsByContext[t]={data:[...b,...d.feeds.data],timestamp:Date.now()}}else this.feedsByContext[t]={data:d.feeds.data,timestamp:Date.now()};if(this.pagination[t]={page:s,per_page:i.per_page,total:d.feeds.total,last_page:d.feeds.last_page,has_more:d.feeds.has_more},console.log("[Feed Store] Updated pagination:",{context:t,page:s,has_more:d.feeds.has_more,total:d.feeds.total}),d.execution_time&&(this.executionTimes[t]=d.execution_time),d.feeds.data.forEach(b=>{this.feedsById[b.id]={...b,timestamp:Date.now()}}),n){const b=((p=(f=this.feedsByContext[t])==null?void 0:f.data)==null?void 0:p.length)||0;b>500&&(console.log("[Feed Store] Pruning feeds, count:",b),this.pruneOldFeeds(t))}return d.last_fetched_timestamp&&(this.ticker.lastFetched=d.last_fetched_timestamp,(m=window.fluentFrameworkApp)!=null&&m.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("newest_feed_fetched",{last_fetched_timestamp:d.last_fetched_timestamp})),d.current_user_follows&&_5().setFollows(d.current_user_follows),!n&&s===1&&r.set(o,{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(d=>{throw console.error("[Feed Store] Failed to fetch feeds:",d),this.loading[t]=!1,console.log("[Feed Store] Set loading to FALSE after error for context:",t),d})},async fetchFeedBySlug(t){const e=`feed:slug:${t}`,n=cs(),s=n.get(e,10*60*1e3);if(s)return this.feedsById[s.id]=s,s;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(i){throw console.error("Failed to fetch feed:",i),i}},async createFeed(t,e){var n,s,i;try{const o=await this.$api.post("feeds",e),r=o.feed;if(this.feedsById[r.id]={...r,timestamp:Date.now()},!o.scheduled_at){const l=u=>{this.feedsByContext[u]||(this.feedsByContext[u]={data:[],timestamp:Date.now()}),this.stickyFeeds[u]&&(this.feedsByContext[u].data.some(h=>h.id===this.stickyFeeds[u].id)||this.feedsByContext[u].data.unshift(this.stickyFeeds[u]),this.stickyFeeds[u]=null);const d=this.feedsByContext[u].data.findIndex(h=>h.id===r.id);d===-1&&this.feedsByContext[u].data.unshift(r),this.pagination[u]?d===-1&&this.pagination[u].total++:this.pagination[u]={page:1,per_page:10,total:1,last_page:1,has_more:!1}};l(t),r.space_id&&t!=="global"&&(l("global"),cs().invalidatePattern("feeds:global"));const c=`user-${r.user_id}`;this.feedsByContext[c]&&t!==c&&l(c)}return o.last_fetched_timestamp&&(this.ticker.lastFetched=o.last_fetched_timestamp,(n=window.FluentCommunityUtil)!=null&&n.eventBus&&((i=(s=window.fluentFrameworkApp)==null?void 0:s.$eventBus)==null||i.emit("newest_feed_fetched",{last_fetched_timestamp:o.last_fetched_timestamp}))),cs().invalidatePattern(`feeds:${t}`),o}catch(o){throw console.error("Failed to create feed:",o),o}},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(s=>{const i=this.feedsByContext[s].data.findIndex(o=>o.id===t);i!==-1&&(this.feedsByContext[s].data[i]={...this.feedsByContext[s].data[i],...e})});try{const i=(await this.$api.patch(`feeds/${t}`,e)).feed;return this.feedsById[t]={...this.feedsById[t],...i,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],...i})}),cs().invalidatePattern("feed:"),i}catch(s){throw n&&(this.feedsById[t]=n,Object.keys(this.feedsByContext).forEach(i=>{const o=this.feedsByContext[i].data.findIndex(r=>r.id===t);o!==-1&&(this.feedsByContext[i].data[o]=n)})),console.error("Failed to update feed:",s),s}},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(i=>{var o;(o=this.feedsByContext[i])!=null&&o.data&&(this.feedsByContext[i].data=this.feedsByContext[i].data.filter(r=>r.id!==e))}),this.pagination[t]&&this.pagination[t].total--,cs().invalidatePattern("feed:"),!0}catch(s){throw console.error("Failed to delete feed:",s),s}},async toggleBookmark(t){const e=this.feedsById[t];if(!e)return;const n=e.is_bookmarked;e.is_bookmarked=!n,Object.keys(this.feedsByContext).forEach(s=>{var o;const i=(o=this.feedsByContext[s].data)==null?void 0:o.findIndex(r=>r.id===t);i!==-1&&(this.feedsByContext[s].data[i].is_bookmarked=!n)});try{const s=await this.$api.post(`feeds/${t}/toggle-bookmark`);return e.is_bookmarked=s.is_bookmarked,Object.keys(this.feedsByContext).forEach(i=>{var r;const o=(r=this.feedsByContext[i].data)==null?void 0:r.findIndex(a=>a.id===t);o!==-1&&(this.feedsByContext[i].data[o].is_bookmarked=s.is_bookmarked)}),s}catch(s){throw e.is_bookmarked=n,Object.keys(this.feedsByContext).forEach(i=>{var r;const o=(r=this.feedsByContext[i].data)==null?void 0:r.findIndex(a=>a.id===t);o!==-1&&(this.feedsByContext[i].data[o].is_bookmarked=n)}),s}},async fetchTicker(t){var e,n,s;try{const i=t||this.ticker.lastFetched;console.log("[Legacy Ticker] Fetching ticker with timestamp:",i);const o=await this.$api.get("feeds/ticker",{last_fetched_timestamp:i});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(s=window.fluentFrameworkApp)!=null&&s.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("ticker_updated",o),this.ticker}catch(i){throw console.error("[Legacy Ticker] Failed to fetch ticker:",i),i}},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(s=>s.id===n.id)||this.feedsByContext[t].data.unshift(n)),this.stickyFeeds[t]=null)},pruneOldFeeds(t=null){(t?[t]:Object.keys(this.feedsByContext)).forEach(s=>{var o;const i=((o=this.feedsByContext[s])==null?void 0:o.data)||[];if(i.length>500){const r=i.slice(0,i.length-500);this.feedsByContext[s].data=i.slice(i.length-500),console.log(`[Feed Store] Pruned ${r.length} old feeds from ${s}, kept ${this.feedsByContext[s].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]="",cs().invalidatePattern(`feeds:${t}`)},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 i;console.log(`[processTickerUpdates] Called for context: ${t} with ${e.length} updates`),console.log("[processTickerUpdates] Updates:",e);const n=[],s=[];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`),s.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:s.length,fetchIds:n,deleteIds:s}),s.length>0&&(console.log(`[processTickerUpdates] 🗑️ Deleting ${s.length} feeds from ${t}`),this.deleteFeedsFromStore(t,s)),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)}(i=window.fluentFrameworkApp)!=null&&i.$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:s.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 s=0;s<e.length;s+=n){const i=e.slice(s,s+n);await this.fetchFeedBatch(t,i)}}else await this.fetchFeedBatch(t,e);console.log(`[Feed Store] Successfully fetched ${e.length} feeds for ${t}`)}catch(s){console.error("[Feed Store] Failed to fetch feeds by IDs:",{context:t,feedIds:e,error:s})}},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(s=>{this.feedsById[s.id]=s,this.feedsByContext[t]||(this.feedsByContext[t]={data:[],timestamp:Date.now()});const i=this.feedsByContext[t].data,o=i.findIndex(r=>r.id===s.id);o===-1?i.unshift(s):i[o]=s})}catch(n){throw console.error("[Feed Store] Failed to fetch batch for context:",t,n),n}},deleteFeedsFromStore(t,e){e.forEach(n=>{var i;delete this.feedsById[n],(i=this.feedsByContext[t])!=null&&i.data&&(this.feedsByContext[t].data=this.feedsByContext[t].data.filter(o=>o.id!==n)),cs().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={}}}}),lTe=yb("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=cs(),s=`space:${t}`;if(!e){const i=n.get(s);if(i)return this.spacesBySlug[t]=i,this.currentSpace=i,i}this.loading[t]=!0;try{const i=await this.$api.get(`spaces/${t}/by-slug`),o=i.space||i;return this.spacesBySlug[t]=o,this.currentSpace=o,this.lastFetched[t]=Date.now(),i.topics&&(this.topicsBySpace[t]=i.topics),i.pending_count!==void 0&&(o.pending_count=i.pending_count),n.set(s,o,15*60*1e3),typeof window<"u"&&(window.fcom_current_community=o),this.loading[t]=!1,o}catch(i){throw this.loading[t]=!1,console.error("Failed to fetch space:",i),i}},async fetchMySpaces(t=!1){const e=cs(),n="my-spaces";if(!t){const s=e.get(n);if(s)return this.mySpaces=s,s}this.mySpacesLoading=!0;try{const s=await this.$api.get("spaces/my-spaces"),i=s.spaces||s;return this.mySpaces=i,i.forEach(o=>{this.spacesBySlug[o.slug]=o}),e.set(n,i,10*60*1e3),this.mySpacesLoading=!1,i}catch(s){throw this.mySpacesLoading=!1,console.error("Failed to fetch my spaces:",s),s}},async joinSpace(t,e=null){var o,r,a;const n=cs(),s=e||this.spacesBySlug[t];if(!s)throw new Error("Space not found");const i=((o=s.user_status)==null?void 0:o.status)==="active";i||(s.user_status||(s.user_status={}),s.user_status.status="active",s.members_count=(s.members_count||0)+1,this.mySpaces.find(l=>l.slug===t)||this.mySpaces.push(s));try{const l=await this.$api.post(`spaces/${t}/join`),c=l.space||l;this.spacesBySlug[t]=c,((r=this.currentSpace)==null?void 0:r.slug)===t&&(this.currentSpace=c);const u=this.mySpaces.findIndex(d=>d.slug===t);return u!==-1?this.mySpaces[u]=c:this.mySpaces.push(c),n.invalidate(`space:${t}`),n.invalidate("my-spaces"),(a=window.fluentFrameworkApp)!=null&&a.$eventBus&&window.fluentFrameworkApp.$eventBus.emit("space_joined",c),c}catch(l){if(!i){s.user_status.status=null,s.members_count=Math.max(0,(s.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=cs(),n=this.spacesBySlug[t];if(!n)throw new Error("Space not found");const s=((r=n.user_status)==null?void 0:r.status)==="active",i=(a=n.user_status)==null?void 0:a.status,o=n.members_count;if(s){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 s&&(n.user_status.status=i,n.members_count=o,this.mySpaces.push(n)),console.error("Failed to leave space:",u),u}},async fetchSpaceTopics(t,e=!1){const n=cs(),s=`space-topics:${t}`;if(!e){const i=n.get(s);if(i)return this.topicsBySpace[t]=i,i}try{const i=await this.$api.get(`spaces/${t}/topics`),o=i.topics||i;return this.topicsBySpace[t]=o,n.set(s,o,30*60*1e3),o}catch(i){throw console.error("Failed to fetch space topics:",i),i}},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=cs();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=cs();t.invalidatePattern("space:"),t.invalidatePattern("space-topics:"),t.invalidate("my-spaces")}}}),cTe={name:"FollowAction",props:{profile:{type:Object,required:!0},followButtonText:{type:String,default:""}},emits:["refetch"],setup(){return{userStore:_5()}},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{await this.userStore.toggleFollow(this.profile.user_id,this.profile.username),this.$notify.success(this.$t("Successfully followed user")),this.$emit("refetch")}catch(t){this.$handleError(t)}finally{this.loading=!1}},async unfollowUser(){this.loading=!0;try{await this.userStore.toggleFollow(this.profile.user_id,this.profile.username),this.$notify.success(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})}}},uTe={key:0},dTe={key:1},hTe={key:0},fTe={key:1};function pTe(t,e,n,s,i,o){const r=Ge;return o.showFollowAction?(v(),$(te,{key:0},[o.isBlocked?(v(),R(r,{key:0,class:"fcom_secondary_button danger_button",loading:i.loading,disabled:i.loading,style:{"min-width":"90px","max-height":"30px"},onClick:o.unblockUser,onMouseenter:e[0]||(e[0]=a=>i.hovering=!0),onMouseleave:e[1]||(e[1]=a=>i.hovering=!1)},{default:w(()=>[i.hovering?(v(),$("span",dTe,M(t.$t("Unblock")),1)):(v(),$("span",uTe,M(t.$t("Blocked")),1))]),_:1},8,["loading","disabled","onClick"])):o.isFollowing?(v(),R(r,{key:1,onClick:o.confirmUnfollow,class:W(["fcom_secondary_button",{danger_button:i.hovering}]),style:{"min-width":"95px","max-height":"30px"},loading:i.loading,disabled:i.loading,onMouseenter:e[2]||(e[2]=a=>i.hovering=!0),onMouseleave:e[3]||(e[3]=a=>i.hovering=!1)},{default:w(()=>[i.hovering?(v(),$("span",fTe,M(t.$t("Unfollow")),1)):(v(),$("span",hTe,M(t.$t("Following")),1))]),_:1},8,["onClick","class","loading","disabled"])):(v(),R(r,{key:2,onClick:o.followUser,class:"fcom_color_button",style:{"max-height":"30px"},loading:i.loading,disabled:i.loading},{default:w(()=>[g("span",null,M(o.followBtnText),1)]),_:1},8,["onClick","loading","disabled"]))],64)):O("",!0)}const mTe=de(cTe,[["render",pTe]]),gTe={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:aTe,FollowAction:mTe},data(){return{}},computed:{userLevel(){var t;return this.has_leaderboard&&((t=this.xprofile)!=null&&t.total_points)?nh(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)}},vTe=["href"],_Te={class:"fcom_user_display_name"},yTe={key:1,class:"user_route"},bTe=["href"],wTe={class:"fcom_user_display_name"},CTe={class:"fcom_profile_pop_avatar"},kTe={key:0,class:"fcom_prfile_tagline"},xTe={class:"fcom_level_name"},STe={style:{display:"block"},class:"fcoml_level_sub meta_line"},$Te={class:"fcom_profile_pop_info"},ATe={class:"pop_info_header"},MTe={class:"header_name"},ETe=["href"],TTe={class:"fcom_user_display_name"},PTe={class:"fcom_user_name"},ITe={key:0,class:"header_actions"},LTe={key:0,class:"fcom_profile_pop_bio"},OTe=["title"],DTe=["title"],RTe={class:"pop_info_btns"},VTe=["href"],FTe=["href"];function NTe(t,e,n,s,i,o){const r=H("verified-sign"),a=H("UserBadge"),l=H("UserAvatar"),c=fd,u=H("follow-action"),d=H("SocialLinks"),h=hd,f=Ii;return n.show_pop?(v(),$("span",yTe,[_(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(()=>[ae(t.$slots,"default",{},()=>[g("a",{href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[g("p",wTe,M(n.xprofile.display_name),1)],8,bTe)])]),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(),R(h,{key:0,gutter:20},{default:w(()=>[_(c,{sm:24,md:8},{default:w(()=>[g("div",CTe,[_(l,{xprofile:n.xprofile},null,8,["xprofile"]),o.userLevel?(v(),$("div",kTe,[g("div",xTe,M(o.userLevel.title),1),g("div",STe,M(o.userLevel.tagline),1)])):O("",!0)])]),_:1}),_(c,{sm:24,md:16},{default:w(()=>{var p,m;return[g("div",$Te,[g("div",ATe,[g("div",MTe,[g("a",{href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[g("p",TTe,M(n.xprofile.display_name),1),n.xprofile.is_verified?(v(),R(r,{key:0})):O("",!0),n.show_badge?(v(),R(a,{key:1,profile:n.xprofile},null,8,["profile"])):O("",!0)],8,ETe),g("span",PTe," @"+M(n.xprofile.username),1)]),n.show_follow?(v(),$("div",ITe,[_(u,{profile:n.xprofile},null,8,["profile"])])):O("",!0)]),(p=n.xprofile.meta)!=null&&p.short_description_rendered||n.xprofile.short_description_rendered?(v(),$("div",LTe,M(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(),$("div",{key:1,title:n.xprofile.created_at,class:"meta_line"},M(t.$t("Joined: %s",t.humanDateDiff(n.xprofile.created_at))),9,OTe)):O("",!0),n.xprofile.last_activity?(v(),$("div",{key:2,title:n.xprofile.last_activity,class:"meta_line"},M(t.$t("Last seen: %s",t.humanDateDiff(n.xprofile.last_activity))),9,DTe)):O("",!0),g("div",RTe,[g("a",{class:"el-button el-button--primary is-text is-has-bg",href:t.$getRouteLink("u/:username",{username:n.xprofile.username})},M(t.$t("View Profile")),9,VTe),t.appVars.has_chat&&t.hasPermission("can_initiate_message")?(v(),$("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})},M(t.$t("Message")),9,FTe)):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(),R(r,{key:0})):O("",!0),n.show_badge?(v(),R(a,{key:1,profile:n.xprofile},null,8,["profile"])):O("",!0)])):(v(),$("a",{key:0,href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[ae(t.$slots,"default",{},()=>[g("p",_Te,M(n.xprofile.display_name),1)]),n.show_verified&&n.xprofile.is_verified?(v(),R(r,{key:0})):O("",!0),n.show_badge?(v(),R(a,{key:1,profile:n.xprofile},null,8,["profile"])):O("",!0)],8,vTe))}const Wr=de(gTe,[["render",NTe]]),BTe={name:"MentionPopover",components:{UserRouteLink:Wr},setup(){return{userStore:_5()}},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 s=this.getCached(t);if(!s){try{s=await this.userStore.fetchProfile(t)}catch{return}this.setCache(t,s)}n===this.requestId&&(this.xprofile=s,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 zTe(t,e,n,s,i,o){const r=H("UserRouteLink");return i.virtualRef&&i.xprofile?(v(),R(r,{key:0,xprofile:i.xprofile,virtualRef:i.virtualRef,show_badge:!0,show_follow:!0,onPopoverMouseenter:o.cancelHide,onPopoverMouseleave:o.startHideTimeout},null,8,["xprofile","virtualRef","onPopoverMouseenter","onPopoverMouseleave"])):O("",!0)}const HTe=de(BTe,[["render",zTe]]),UTe={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)}},jTe={class:"dialog_header"},WTe={class:"dialog_left"},YTe={class:"dialog_body"},GTe={class:"dialog_footer"};function qTe(t,e,n,s,i,o){const r=Ge,a=Ss;return v(),R(a,{"modal-class":"fcom_common_dialog fcom_editor_unfinished_dialog",modelValue:i.isVisible,"onUpdate:modelValue":e[0]||(e[0]=l=>i.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",jTe,[g("div",WTe,[g("h4",null,M(t.$t("Leave Page?")),1)])])]),footer:w(()=>[g("div",GTe,[_(r,{class:"fcom_secondary_button",onClick:o.handleCancel},{default:w(()=>[G(M(t.$t("Cancel")),1)]),_:1},8,["onClick"]),_(r,{class:"fcom_primary_button",onClick:o.handleProceed},{default:w(()=>[G(M(t.$t("Leave")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",YTe,[g("span",null,M(i.message),1)])]),_:1},8,["modelValue","width"])}const XTe=de(UTe,[["render",qTe]]);/*! Element Plus v2.8.2 */var zz={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"},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",week:"week",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"},tour:{next:"Next",previous:"Previous",finish:"Finish"},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 KTe=window.fluentComAdmin.el_i18n;for(const[t,e]of Object.entries(KTe))zz.el[t]=e;const ZTe={name:"PortalApplication",components:{Back:gO,SpaceCreateModal:YMe,CourseIcon:Dz,AnalyticsIcon:Oie,MentionPopover:HTe,UnfinishedChangesModal:XTe},data(){return{loading:!1,hasSearchHolder:!1,hasNotificationHolder:!1,isSmallScreen:!1,menuItems:this.appVars.portalSettingsMenus,enLang:zz}},created(){this.isSmallScreen=window.innerWidth<=1024}},JTe={class:"fcom_general_menu"},QTe=["href"],ePe={class:"el-icon fcom_arrow_icon"},tPe={class:"fcom_communities_menu fcom_admin_menu"},nPe={class:"fcom_general_menu"},sPe={class:"community_avatar"},iPe={class:"fcom_shape"},oPe={class:"community_name"},rPe={class:"fcom_general_menu"},aPe={class:"community_avatar"},lPe={class:"fcom_shape"},cPe={class:"community_name"},uPe={class:"fcom_general_menu"},dPe={class:"community_avatar"},hPe={class:"fcom_shape"},fPe={class:"community_name"};function pPe(t,e,n,s,i,o){const r=H("router-view"),a=H("Back"),l=ye,c=H("router-link"),u=H("CourseIcon"),d=H("AnalyticsIcon"),h=H("space-create-modal"),f=H("mention-popover"),p=H("unfinished-changes-modal"),m=qae;return v(),R(m,{locale:i.enLang},{default:w(()=>[_(r),(v(),R(va,{to:"#fcom_menu_sidebar"},[g("ul",JTe,[g("li",null,[g("a",{href:t.appVars.portal_url},[g("i",ePe,[_(a)]),g("span",null,M(t.$t("Back to home")),1)],8,QTe)])]),g("div",tPe,[Object.keys(i.menuItems).length>0?(v(),$(te,{key:0},[g("h4",null,M(t.$t("Portal Settings")),1),g("ul",nPe,[(v(!0),$(te,null,be(i.menuItems,b=>(v(),$("li",{key:b.route,class:W("settings_inner_menu_"+b.route)},[_(c,{to:{name:b.route}},{default:w(()=>[g("div",sPe,[g("span",iPe,[_(l,{innerHTML:b.icon_svg},null,8,["innerHTML"])])]),g("span",oPe,M(b.label),1)]),_:2},1032,["to"])],2))),128))])],64)):O("",!0),t.hasFeature("has_course")&&t.hasCourseCreatorAccess()?(v(),$(te,{key:1},[g("h4",null,M(t.$t("Course Management")),1),g("ul",rPe,[g("li",null,[_(c,{to:{name:"manage_courses"}},{default:w(()=>[g("div",aPe,[g("span",lPe,[_(l,null,{default:w(()=>[_(u)]),_:1})])]),g("span",cPe,M(t.$t("Manage Courses")),1)]),_:1})])])],64)):O("",!0),t.hasFeature("has_analytics")&&t.isAdmin()?(v(),$(te,{key:2},[g("h4",null,M(t.$t("Reports")),1),g("ul",uPe,[g("li",null,[_(c,{to:{name:"analytics_overview"}},{default:w(()=>[g("div",dPe,[g("span",hPe,[_(l,null,{default:w(()=>[_(d)]),_:1})])]),g("span",fPe,M(t.$t("Analytics")),1)]),_:1})])])],64)):O("",!0)])])),_(h),_(f),_(p)]),_:1},8,["locale"])}const mPe=de(ZTe,[["render",pPe]]),gPe={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")}}},vPe={class:"fcom_pagination_wrap"};function _Pe(t,e,n,s,i,o){const r=wge;return v(),$("div",vPe,[_(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 $d=de(gPe,[["render",_Pe]]),yPe={name:"AddMembersForm",components:{SpaceCourseSelector:v5},props:{context:{type:String,required:!0},target:{type:Object,required:!0}},emits:["completed","membersAdded"],data(){return{sourceMode:"wp_users",wpUsers:[],wpLoading:!1,selectedUserIds:[],role:"member",saving:!1,selectedSourceId:"",selectedSourceType:"",selectedSourceSlug:"",csvRows:[],csvFileName:"",createMissingUsers:!1,wpUsersLoaded:!1,crmTags:[],crmTagsLoading:!1,crmTagsLoaded:!1,selectedTagId:null,createMissingCrmUsers:!1,batchRunning:!1,batchProgress:0,batchProcessed:0,batchTotal:0,importDone:null}},watch:{sourceMode(t){t==="wp_users"&&!this.wpUsersLoaded&&this.fetchWpUsers(),t==="crm_tag"&&this.appVars.pro&&!this.crmTagsLoaded&&this.fetchCrmTags()}},methods:{searchWpUsers(t=""){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",s=e?{search:t}:{context:"add_member",search:t,space_id:this.target.id};this.$get(n,s).then(i=>{this.wpUsers=i.users.data,this.wpUsersLoaded=!0}).catch(i=>{this.$handleError(i)}).finally(()=>{this.wpLoading=!1})},addWpUsers(){if(!this.selectedUserIds.length)return;const t=this.context==="course";if(this.selectedUserIds.length===1){this.saving=!0;const s=t?"admin/courses/"+this.target.id+"/students":"spaces/"+this.target.slug+"/members",i=t?{user_id:this.selectedUserIds[0]}:{user_id:this.selectedUserIds[0],role:this.role};this.$post(s,i).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,s=>({url:e,data:{user_ids:s,...n}}))},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",s=e?{from_course_id:parseInt(this.selectedSourceId,10)}:{from_space_slug:this.selectedSourceSlug};this.runOffsetImport(n,s)},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=s=>{this.csvRows=this.parseCsvText(s.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()),s=["name","email","username"],i=n.some(d=>s.includes(d));let o=0,r=1,a=2,l=0;i&&(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,s={added:0,skipped:0,failed:0};this.batchRunning=!0,this.batchTotal=n,this.batchProcessed=0,this.batchProgress=0;const i=o=>{if(o>=n){this.batchRunning=!1,this.importDone={...s,total:n},this.$emit("membersAdded");return}const r=this.csvRows.slice(o,o+e);this.$post(t,{rows:r,create_missing:this.createMissingUsers}).then(a=>{s.added+=a.added||0,s.skipped+=a.skipped||0,s.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),i(c)}).catch(a=>{this.$handleError(a),this.batchRunning=!1,this.importDone={...s,total:n},this.$emit("membersAdded")})};i(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`,s=[];let i=0;this.batchRunning=!0,this.batchTotal=0,this.batchProcessed=0,this.batchProgress=0;const o=()=>{this.batchRunning=!1;const a=s.length+i;this.importDone={added:0,skipped:0,failed:i,total:a},this.$emit("membersAdded")},r=a=>{this.$post(e,{tag_id:this.selectedTagId,create_missing:this.createMissingCrmUsers,offset:a,per_page:200}).then(l=>{if(l.user_ids&&l.user_ids.length&&s.push(...l.user_ids),i+=l.failed||0,l.has_more){r(l.next_offset);return}if(!s.length){o();return}this.runChunkedImport(s,c=>({url:n,data:{user_ids:c}}),i)}).catch(l=>{this.$handleError(l),this.batchRunning=!1;const c=s.length+i;this.importDone={added:0,skipped:0,failed:i,total:c},this.$emit("membersAdded")})};r(0)},runChunkedImport(t,e,n=0){const i=t.length,o={added:0,skipped:0,failed:n},r=i+n;this.batchRunning=!0,this.batchTotal=i,this.batchProcessed=0,this.batchProgress=0;const a=l=>{if(l>=i){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(i,p),this.batchProgress=Math.round(this.batchProcessed/i*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 s=i=>{this.$post(t,{...e,offset:i,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||i+(o.processed||0),this.batchProgress=this.batchTotal?Math.min(99,Math.round(this.batchProcessed/this.batchTotal*100)):50,o.has_more?s(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")})};s(0)}},mounted(){this.sourceMode==="wp_users"&&!this.wpUsersLoaded&&this.fetchWpUsers()}},bPe={class:"fcom_add_members_form"},wPe={key:0,class:"fcom_source_selector_wrap fcom_mb_20"},CPe={key:1,class:"fcom_import_done"},kPe={class:"fcom_done_title"},xPe={class:"fcom_done_subtitle"},SPe={class:"fcom_import_summary"},$Pe={class:"fcom_import_summary_title"},APe={class:"fcom_import_summary_row"},MPe={class:"fcom_import_summary_row"},EPe={key:0,class:"fcom_import_summary_row"},TPe={key:1,class:"fcom_import_summary_row"},PPe={key:2,class:"fcom_import_progress_wrap"},IPe={class:"fcom_help_text fcom_mb_15"},LPe={key:0,class:"fcom_muted_text fcom_mt_10"},OPe={class:"fcom_select_photo",style:{float:"left"}},DPe=["src","alt"],RPe={style:{float:"right",color:"#8492a6","font-size":"13px"}},VPe={key:0,class:"fcom_help_text fcom_mb_10"},FPe=["href"],NPe={class:"fcom_help_text fcom_mb_15"},BPe={key:0},zPe={key:2},HPe={class:"fcom_spaced_flex fcom_mb_10"},UPe={class:"fcom_csv_drop_inner"},jPe={class:"el-upload__text fcom_mt_10"},WPe={key:0},YPe={class:"el-upload__tip"},GPe={class:"fcom_spaced_flex fcom_mb_10"},qPe={class:"fcom_muted_text",style:{"margin-left":"8px"}},XPe={key:0,class:"fcom_muted_text fcom_mb_10"},KPe={class:"fcom_help_text fcom_mb_15"},ZPe={class:"fcom_help_text fcom_mb_15"},JPe={key:0};function QPe(t,e,n,s,i,o){const r=Ff,a=Ps,l=pb,c=an,u=Jt,d=en,h=Ge,f=rn,p=H("SpaceCourseSelector"),m=l1,b=Hr,y=zr,C=Ht,k=_t("loading");return v(),$("div",bPe,[!i.batchRunning&&!i.importDone?(v(),$("div",wPe,[_(a,{modelValue:i.sourceMode,"onUpdate:modelValue":e[0]||(e[0]=x=>i.sourceMode=x),size:"small"},{default:w(()=>[_(r,{value:"wp_users"},{default:w(()=>[G(M(t.$t("WP Users")),1)]),_:1}),_(r,{value:"from_source"},{default:w(()=>[G(M(t.$t("From Space/Course")),1)]),_:1}),_(r,{value:"csv"},{default:w(()=>[G(M(t.$t("CSV Import")),1)]),_:1}),t.appVars.has_fluentcrm?(v(),R(r,{key:0,value:"crm_tag"},{default:w(()=>[G(M(t.$t("CRM Tag")),1)]),_:1})):O("",!0)]),_:1},8,["modelValue"])])):O("",!0),i.importDone?(v(),$("div",CPe,[e[16]||(e[16]=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)),g("h3",kPe,M(t.$t("All Done!")),1),g("p",xPe,M(t.$t("Import has been completed. You may close this now.")),1),g("div",SPe,[g("strong",$Pe,M(t.$t("Import Summary")),1),g("p",APe,M(t.$t("Total Records:"))+" "+M(i.importDone.total),1),g("p",MPe,M(n.context==="course"?t.$t("Enrolled:"):t.$t("Added:"))+" "+M(i.importDone.added),1),i.importDone.skipped?(v(),$("p",EPe,M(t.$t("Skipped:"))+" "+M(i.importDone.skipped),1)):O("",!0),i.importDone.failed?(v(),$("p",TPe,M(t.$t("Failed:"))+" "+M(i.importDone.failed),1)):O("",!0)])])):i.batchRunning?(v(),$("div",PPe,[g("div",IPe,[g("p",null,M(t.$t("Importing… Please do not close this window.")),1)]),_(l,{percentage:i.batchProgress,"stroke-width":12},null,8,["percentage"]),i.batchTotal?(v(),$("p",LPe,M(i.batchProcessed)+" / "+M(i.batchTotal)+" "+M(t.$t("processed")),1)):O("",!0)])):(v(),$(te,{key:3},[i.sourceMode==="wp_users"?(v(),R(f,{key:0,onSubmit:e[4]||(e[4]=Be(()=>{},["prevent"])),"label-position":"top"},{default:w(()=>[_(d,{label:t.$t("Users")},{default:w(()=>[_(u,{class:"rich_select",multiple:"",filterable:"",remote:"",loading:i.wpLoading,"remote-method":o.searchWpUsers,placeholder:t.$t("Search and select users"),modelValue:i.selectedUserIds,"onUpdate:modelValue":e[1]||(e[1]=x=>i.selectedUserIds=x)},{default:w(()=>[(v(!0),$(te,null,be(i.wpUsers,x=>(v(),R(c,{class:"fcom_with_photo_option",key:x.ID,label:`${x.display_name} (${x.user_email||x.ID})`,value:x.ID},{default:w(()=>[g("span",OPe,[g("img",{src:x.photo,alt:x.display_name},null,8,DPe),g("span",null,M(x.display_name),1)]),g("span",RPe,M(x.user_email||x.ID),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["loading","remote-method","placeholder","modelValue"])]),_:1},8,["label"]),n.context==="space"?(v(),R(d,{key:0,label:t.$t("Membership Role")},{default:w(()=>[_(u,{modelValue:i.role,"onUpdate:modelValue":e[2]||(e[2]=x=>i.role=x),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),_(d,null,{default:w(()=>[i.selectedUserIds.length>1&&!t.appVars.pro?(v(),$("div",VPe,[g("p",null,[G(M(t.$t("Bulk adding requires FluentCommunity Pro."))+" ",1),t.appVars.upgrade_url?(v(),$("a",{key:0,href:t.appVars.upgrade_url,target:"_blank"},M(t.$t("Upgrade")),9,FPe)):O("",!0)])])):O("",!0),Pe((v(),R(h,{class:"fcom_primary_button",onClick:e[3]||(e[3]=x=>o.addWpUsers())},{default:w(()=>[G(M(n.context==="course"?t.$t("Add Students"):t.$t("Add as %s",i.role)),1)]),_:1})),[[k,i.saving]])]),_:1})]),_:1})):i.sourceMode==="from_source"?(v(),R(f,{key:1,"label-position":"top"},{default:w(()=>[_(d,{label:t.$t("Select Source Space or Course")},{default:w(()=>[_(p,{modelValue:i.selectedSourceId,"onUpdate:modelValue":e[5]||(e[5]=x=>i.selectedSourceId=x),placeholder_text:t.$t("Select a space or course..."),memberships:[n.target.id.toString()],onSelectedType:e[6]||(e[6]=x=>i.selectedSourceType=x),onSelectedSlug:e[7]||(e[7]=x=>i.selectedSourceSlug=x)},null,8,["modelValue","placeholder_text","memberships"])]),_:1},8,["label"]),g("div",NPe,[g("p",null,M(n.context==="course"?t.$t("All users will be enrolled as Student."):t.$t("All users will be added as Member.")),1)]),_(h,{class:"fcom_primary_button",onClick:e[8]||(e[8]=x=>o.importFromSource())},{default:w(()=>[G(M(n.context==="course"?t.$t("Import Students"):t.$t("Import Members"))+" ",1),t.appVars.pro?O("",!0):(v(),$("span",BPe," ("+M(t.$t("Pro"))+")",1))]),_:1})]),_:1})):i.sourceMode==="csv"?(v(),$("div",zPe,[i.csvRows.length?(v(),$(te,{key:1},[g("div",GPe,[g("div",null,[g("strong",null,M(i.csvFileName),1),g("span",qPe,M(i.csvRows.length)+" "+M(t.$t("contacts")),1)]),_(h,{link:"",size:"small",onClick:e[10]||(e[10]=x=>o.resetCsvImport())},{default:w(()=>[G(M(t.$t("Change")),1)]),_:1})]),_(y,{data:i.csvRows.slice(0,5),size:"small",class:"fcom_mb_10"},{default:w(()=>[_(b,{prop:"name",label:t.$t("Name"),"min-width":"120"},null,8,["label"]),_(b,{prop:"email",label:t.$t("Email"),"min-width":"160"},null,8,["label"]),_(b,{prop:"username",label:t.$t("Username"),"min-width":"110"},null,8,["label"])]),_:1},8,["data"]),i.csvRows.length>5?(v(),$("p",XPe," + "+M(i.csvRows.length-5)+" "+M(t.$t("more rows")),1)):O("",!0),_(f,{"label-position":"top"},{default:w(()=>[_(d,null,{default:w(()=>[_(C,{modelValue:i.createMissingUsers,"onUpdate:modelValue":e[11]||(e[11]=x=>i.createMissingUsers=x)},{default:w(()=>[G(M(t.$t("Create WordPress accounts for new email addresses")),1)]),_:1},8,["modelValue"])]),_:1}),g("div",KPe,[g("p",null,M(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)]),_(d,null,{default:w(()=>[_(h,{class:"fcom_primary_button",onClick:e[12]||(e[12]=x=>o.importCsv())},{default:w(()=>[G(M(n.context==="course"?t.$t("Import Students"):t.$t("Import Members")),1)]),_:1})]),_:1})]),_:1})],64)):(v(),$(te,{key:0},[g("div",HPe,[e[17]||(e[17]=g("span",null,null,-1)),t.appVars.pro?(v(),R(h,{key:0,link:"",size:"small",onClick:e[9]||(e[9]=x=>o.downloadSampleCsv())},{default:w(()=>[G("↓ "+M(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",YPe,M(t.$t("Columns: Name, Email, Username")),1)]),default:w(()=>[g("div",UPe,[e[19]||(e[19]=g("div",{class:"fcom_csv_drop_arrow"},"↑",-1)),g("div",jPe,[G(M(t.$t("Drop CSV here or"))+" ",1),g("em",null,M(t.$t("click to browse")),1),e[18]||(e[18]=G()),t.appVars.pro?O("",!0):(v(),$("span",WPe," ("+M(t.$t("Pro"))+")",1))])])]),_:1},8,["on-change","disabled"])],64))])):i.sourceMode==="crm_tag"?(v(),R(f,{key:3,"label-position":"top"},{default:w(()=>[_(d,{label:t.$t("FluentCRM Tag")},{default:w(()=>[_(u,{modelValue:i.selectedTagId,"onUpdate:modelValue":e[13]||(e[13]=x=>i.selectedTagId=x),loading:i.crmTagsLoading,placeholder:t.$t("Select a tag"),style:{width:"100%"}},{default:w(()=>[(v(!0),$(te,null,be(i.crmTags,x=>(v(),R(c,{key:x.id,label:x.title,value:x.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","loading","placeholder"])]),_:1},8,["label"]),_(d,null,{default:w(()=>[_(C,{modelValue:i.createMissingCrmUsers,"onUpdate:modelValue":e[14]||(e[14]=x=>i.createMissingCrmUsers=x)},{default:w(()=>[G(M(t.$t("Create WordPress accounts for contacts without an existing account")),1)]),_:1},8,["modelValue"])]),_:1}),g("div",ZPe,[g("p",null,M(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,{class:"fcom_primary_button",onClick:e[15]||(e[15]=x=>o.addFromCrmTag())},{default:w(()=>[G(M(n.context==="course"?t.$t("Add Students"):t.$t("Add Members")),1),t.appVars.pro?O("",!0):(v(),$("span",JPe," ("+M(t.$t("Pro"))+")",1))]),_:1})]),_:1})):O("",!0)],64))])}const eIe=de(yPe,[["render",QPe]]),tIe={name:"ExportIcon"},nIe={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function sIe(t,e,n,s,i,o){return v(),$("svg",nIe,[...e[0]||(e[0]=[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),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)])])}const Hz=de(tIe,[["render",sIe]]),iIe={name:"CourseMembers",props:["course"],components:{Search:Dx,UserRouteLink:Wr,Pagination:$d,AddMembersForm:eIe,ExportIcon:Hz},data(){return{students:[],search:"",loading:!0,exporting:!1,isAddStdOpen:!1,pagination:{page:1,per_page:20,total:0}}},methods:{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()},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}).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.fetchStudents()}},oIe={class:"fcom_course_members"},rIe={class:"fcom_course_member_header"},aIe={class:"fcom_course_member_actions"},lIe={key:0},cIe={key:1},uIe={class:"search_member fcom_mb_20"},dIe={class:"table_user_card"},hIe={class:"card_avatar"},fIe={class:"card_info"},pIe={class:"card_name"},mIe={key:0,class:"meta_line"},gIe={class:"progress_wrap"},vIe=["title"],_Ie=["title"];function yIe(t,e,n,s,i,o){const r=H("ExportIcon"),a=ye,l=Ge,c=H("Search"),u=vt,d=H("UserAvatar"),h=H("UserRouteLink"),f=Hr,p=pb,m=H("MoreFilled"),b=Ca,y=ka,C=wa,k=zr,x=H("pagination"),S=H("add-members-form"),E=or,T=_t("loading");return v(),$("div",oIe,[g("div",rIe,[g("h3",null,M(t.$t("Course Students")),1),g("div",aIe,[t.hasCourseCreatorAccess()?(v(),R(l,{key:0,class:"fcom_secondary_button",loading:i.exporting,onClick:e[0]||(e[0]=P=>o.exportStudents())},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),t.has_pro?(v(),$("span",lIe,M(t.$t("Export")),1)):(v(),$("span",cIe,M(t.$t("Export (Pro)")),1))]),_:1},8,["loading"])):O("",!0),t.hasCourseCreatorAccess()?(v(),R(l,{key:1,class:"fcom_primary_button",onClick:e[1]||(e[1]=P=>i.isAddStdOpen=!0)},{default:w(()=>[G(M(t.$t("Add Student")),1)]),_:1})):O("",!0)])]),g("div",uIe,[_(u,{onKeydown:$t(o.toSearch,["enter"]),onInput:o.handleSearch,modelValue:i.search,"onUpdate:modelValue":e[2]||(e[2]=P=>i.search=P),clearable:"",onClear:o.toSearch,placeholder:t.$t("Search Members...")},{prefix:w(()=>[_(a,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["onKeydown","onInput","modelValue","onClear","placeholder"])]),Pe((v(),R(k,{data:i.students,style:{width:"100%","border-radius":"8px"},"empty-text":t.$t("No Students Found")},{default:w(()=>[_(f,{prop:"ID",label:t.$t("Name"),"min-width":"200"},{default:w(P=>{var I;return[g("div",dIe,[g("div",hIe,[_(d,{xprofile:P.row},null,8,["xprofile"])]),g("div",fIe,[g("div",pIe,[_(h,{show_badge:!0,xprofile:P.row},null,8,["xprofile"])]),P.row.short_description?(v(),$("div",mIe,M(t.getExcerpt(((I=P.row.meta)==null?void 0:I.short_description_rendered)||P.row.short_description,160)),1)):O("",!0)])])]}),_:1},8,["label"]),_(f,{width:"160",prop:"progress",label:t.$t("Progress")},{default:w(P=>[g("div",gIe,[_(p,{class:"fcom_progress",percentage:parseInt(P.row.progress)},null,8,["percentage"])])]),_:1},8,["label"]),_(f,{width:"160",label:t.$t("Start Date")},{default:w(P=>[g("div",{title:P.row.space_pivot.created_at},M(t.smartDate(P.row.space_pivot.created_at,!0)),9,vIe)]),_:1},8,["label"]),_(f,{width:"150",label:t.$t("Last Seen")},{default:w(P=>[g("div",{title:P.row.last_activity},M(t.humanDateDiff(P.row.last_activity)),9,_Ie)]),_:1},8,["label"]),_(f,{width:"60"},{default:w(P=>[t.hasCourseCreatorAccess()?(v(),R(C,{key:0,trigger:"click"},{dropdown:w(()=>[_(y,null,{default:w(()=>[_(b,{onClick:I=>o.removeStudentPrompt(P.row)},{default:w(()=>[G(M(t.$t("Remove")),1)]),_:1},8,["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(()=>[_(m)]),_:1})]),_:1},8,["aria-label"])]),_:2},1024)):O("",!0)]),_:1})]),_:1},8,["data","empty-text"])),[[T,i.loading]]),_(x,{hide_on_single:!0,onFetch:o.fetchStudents,pagination:i.pagination},null,8,["onFetch","pagination"]),_(E,{modelValue:i.isAddStdOpen,"onUpdate:modelValue":e[4]||(e[4]=P=>i.isAddStdOpen=P),"close-on-click-modal":!1,"append-to-body":!0,size:t.drawerWidth,direction:"rtl"},{header:w(()=>[g("h4",null,M(t.$t("Add Student")),1)]),default:w(()=>[i.isAddStdOpen?(v(),R(S,{key:0,context:"course",target:n.course,onCompleted:o.studentAdded,onMembersAdded:e[3]||(e[3]=P=>o.fetchStudents())},null,8,["target","onCompleted"])):O("",!0)]),_:1},8,["modelValue","size"])])}const bIe=de(iIe,[["render",yIe]]),wIe={name:"ViewQuizResult",props:["result","course"],emits:["close","updateResult"],components:{Check:Px},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 n;return((n=this.userAnswers[t.slug])==null?void 0:n.user_answer)===e.label},isSingleChoice(t){return t.type==="single_choice"},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")})}}},CIe={class:"dialog_header"},kIe={class:"dialog_left"},xIe={class:"fcom_view_quiz_result"},SIe={class:"fcom_result_details"},$Ie={class:"fcom_questions_wrap"},AIe={key:0,class:"fcom_question"},MIe={key:0,class:"fcom_question_image"},EIe={class:"fcom_question_header"},TIe=["innerHTML"],PIe={class:"fcom_question_body"},IIe={key:0,class:"correct_text"},LIe={key:1,class:"correct_text"},OIe={class:"fcom_question_options"},DIe={key:0,class:"question_help_text"},RIe={class:"fcom_result_info"},VIe={class:"result_info_item"},FIe={class:"left_side"},NIe={class:"sub_title"},BIe={class:"right_side"},zIe={class:"result_info_item"},HIe={class:"left_side"},UIe={class:"title"},jIe={class:"sub_title"},WIe={class:"result_info_item"},YIe={class:"left_side"},GIe={class:"title"},qIe={class:"sub_title"},XIe={class:"result_info_item"},KIe={class:"left_side"},ZIe={class:"title"},JIe={class:"score"},QIe={class:"right_side"},eLe={class:"title"},tLe={class:"score"},nLe={class:"result_info_item"},sLe={class:"left_side"},iLe={class:"title"},oLe={class:"dialog_footer"};function rLe(t,e,n,s,i,o){const r=xa,a=H("Check"),l=ye,c=H("Close"),u=Ht,d=H("UserRouteLink"),h=H("UserAvatar"),f=an,p=Jt,m=Ge,b=Ss;return v(),R(b,{modelValue:i.openModal,"onUpdate:modelValue":e[1]||(e[1]=y=>i.openModal=y),"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",CIe,[g("div",kIe,[g("h4",null,M(t.$t("Quiz Result")),1)])])]),footer:w(()=>[g("div",oLe,[_(m,{class:"fcom_secondary_button",onClick:o.closeModal},{default:w(()=>[G(M(t.$t("Cancel")),1)]),_:1},8,["onClick"]),_(m,{class:"fcom_primary_button",onClick:o.updateResult},{default:w(()=>[G(M(t.$t("Update Result")),1)]),_:1},8,["onClick"])])]),default:w(()=>{var y;return[g("div",xIe,[g("div",SIe,[g("div",$Ie,[(v(!0),$(te,null,be(o.questions,C=>(v(),$(te,{key:C.slug},[o.showQuestion(C)?(v(),$("div",AIe,[o.showQuestionImage(C)?(v(),$("div",MIe,[_(r,{src:C.image_url},null,8,["src"])])):O("",!0),g("div",EIe,[g("div",{innerHTML:C.label_rendered,class:"fcom_question_label"},null,8,TIe)]),g("div",PIe,[g("div",{class:W(["fcom_is_correct",o.isQuestionCorrect(C)?"correct":"incorrect"])},[o.isQuestionCorrect(C)?(v(),$("p",IIe,[_(l,null,{default:w(()=>[_(a)]),_:1}),G(" "+M(t.$t("Correct")),1)])):(v(),$("p",LIe,[_(l,null,{default:w(()=>[_(c)]),_:1}),G(" "+M(t.$t("Incorrect")),1)]))],2),g("div",OIe,[(v(!0),$(te,null,be(C.options,k=>(v(),$("div",{key:k.label,class:"fcom_question_option"},[_(u,{class:W({single_choice:o.isSingleChoice(C)}),"model-value":o.isOptionSelected(C,k),onChange:x=>o.handleOptionChange(C,k)},{default:w(()=>[G(M(k.label),1)]),_:2},1032,["class","model-value","onChange"])]))),128))]),C.help_text?(v(),$("div",DIe,M(C.help_text),1)):O("",!0)])])):O("",!0)],64))),128))])]),g("div",RIe,[g("div",VIe,[g("div",FIe,[_(d,{show_badge:!0,xprofile:i.xprofile},null,8,["xprofile"]),g("div",NIe,M(t.$t("Attempts")+": "+n.result.meta.attempts),1)]),g("div",BIe,[_(h,{xprofile:i.xprofile,with_level:!1},null,8,["xprofile"])])]),g("div",zIe,[g("div",HIe,[g("div",UIe,M(n.result.lesson.title),1),g("div",jIe,M((y=n.course)==null?void 0:y.title),1)])]),g("div",WIe,[g("div",YIe,[g("div",GIe,M(t.$t("Submitted")),1),g("div",qIe,M(t.smartDate(n.result.updated_at,!0)),1)])]),g("div",XIe,[g("div",KIe,[g("div",ZIe,M(t.$t("Score")),1),g("div",JIe,M(n.result.score+"%"),1)]),g("div",QIe,[g("div",eLe,M(t.$t("Correct")),1),g("div",tLe,M(n.result.meta.correct_answers+"/"+n.result.meta.total_questions),1)])]),g("div",nLe,[g("div",sLe,[g("div",iLe,M(t.$t("Did the student pass or fail?")),1),_(p,{modelValue:i.currentStatus,"onUpdate:modelValue":e[0]||(e[0]=C=>i.currentStatus=C),placeholder:t.$t("-- Select --")},{default:w(()=>[(v(!0),$(te,null,be(Object.keys(i.statuses),C=>(v(),R(f,{key:C,label:i.statuses[C],value:C},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])])])])]}),_:1},8,["modelValue","width","onClose"])}const aLe=de(wIe,[["render",rLe]]),lLe={name:"QuizResults",props:["course","course_id"],components:{UserRouteLink:Wr,Pagination:$d,ViewQuizResult:aLe,Search:Dx,ExportIcon:Hz},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()}},cLe={class:"fcom_course_members"},uLe={class:"fcom_course_member_header"},dLe={key:0,class:"fcom_course_member_actions"},hLe={class:"search_member"},fLe={class:"feed_filters"},pLe={id:"feed_short_by",class:"fcom_feed_filter_label"},mLe={class:"table_user_card"},gLe={class:"card_avatar"},vLe={class:"card_info"},_Le={class:"card_name"},yLe={class:"meta_line"};function bLe(t,e,n,s,i,o){const r=H("ExportIcon"),a=ye,l=Ge,c=H("Search"),u=vt,d=an,h=Jt,f=H("UserAvatar"),p=H("UserRouteLink"),m=Hr,b=xo,y=zr,C=H("pagination"),k=H("ViewQuizResult"),x=_t("loading");return v(),$("div",cLe,[g("div",uLe,[g("h3",null,M(t.$t("Quiz Results")),1),t.has_pro?(v(),$("div",dLe,[_(l,{class:"fcom_secondary_button",loading:i.exporting,onClick:e[0]||(e[0]=S=>o.exportResults())},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,M(t.$t("Export")),1)]),_:1},8,["loading"])])):O("",!0)]),g("div",hLe,[_(u,{clearable:"",onClear:o.toSearch,onKeydown:$t(o.toSearch,["enter"]),onInput:o.handleSearch,modelValue:i.search,"onUpdate:modelValue":e[1]||(e[1]=S=>i.search=S),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",fLe,[e[4]||(e[4]=g("div",{class:"fcom_feed_divider"},null,-1)),g("span",pLe,M(t.$t("Filter by:")),1),_(h,{"aria-label":t.$t("Sort members by"),modelValue:i.filter_by,"onUpdate:modelValue":e[2]||(e[2]=S=>i.filter_by=S),class:"fcom_minimal_select","popper-class":"plain_select",placeholder:t.$t("All"),onChange:e[3]||(e[3]=S=>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"])]),Pe((v(),R(y,{data:i.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(S=>{var E;return[g("div",mLe,[g("div",gLe,[_(f,{xprofile:S.row.xprofile},null,8,["xprofile"])]),g("div",vLe,[g("div",_Le,[_(p,{show_badge:!0,xprofile:S.row.xprofile},null,8,["xprofile"])]),g("div",yLe,M(t.getExcerpt((E=S.row.lesson)==null?void 0:E.title,160)),1)])])]}),_:1},8,["label"]),_(m,{width:"260",label:t.$t("Submitted Date")},{default:w(S=>[G(M(t.smartDate(S.row.updated_at,!0)),1)]),_:1},8,["label"]),_(m,{width:"120",label:t.$t("Score")},{default:w(S=>[G(M(S.row.score)+"% ",1)]),_:1},8,["label"]),_(m,{width:"120",label:t.$t("Result")},{default:w(S=>[_(b,{type:o.getTagType(S.row.status),size:"small"},{default:w(()=>[G(M(o.getResultText(S.row.status)),1)]),_:2},1032,["type"])]),_:1},8,["label"]),_(m,{width:"160",label:t.$t("Actions")},{default:w(S=>[_(l,{class:"fcom_secondary_button",onClick:E=>o.isOpenResult(S.row)},{default:w(()=>[G(M(t.$t("View")),1)]),_:1},8,["onClick"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[x,i.loading]]),_(C,{hide_on_single:!0,onFetch:o.fetchResults,pagination:i.pagination},null,8,["onFetch","pagination"]),i.openResult?(v(),R(k,{key:0,open:i.openResult,result:i.result,course:n.course,onClose:o.closeResult,onUpdateResult:o.fetchResults},null,8,["open","result","course","onClose","onUpdateResult"])):O("",!0)])}const wLe=de(lLe,[["render",bLe]]),CLe={name:"ChatIcon"},kLe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function xLe(t,e,n,s,i,o){return v(),$("svg",kLe,[...e[0]||(e[0]=[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),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)])])}const Uz=de(CLe,[["render",xLe]]),SLe={name:"HeartIcon",props:{filled:{default:!1}}},$Le={key:0,viewBox:"0 0 24 24","aria-hidden":"true"},ALe={key:1,viewBox:"0 0 24 24","aria-hidden":"true"};function MLe(t,e,n,s,i,o){return n.filled?(v(),$("svg",$Le,[...e[0]||(e[0]=[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)])])):(v(),$("svg",ALe,[...e[1]||(e[1]=[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)])]))}const Gb=de(SLe,[["render",MLe]]),ELe={name:"ImageIcon"},TLe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function PLe(t,e,n,s,i,o){return v(),$("svg",TLe,[...e[0]||(e[0]=[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),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),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)])])}const jz=de(ELe,[["render",PLe]]),ILe={name:"PollIcon"},LLe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function OLe(t,e,n,s,i,o){return v(),$("svg",LLe,[...e[0]||(e[0]=[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),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),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),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)])])}const DLe=de(ILe,[["render",OLe]]),RLe={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)}}},VLe={class:"fcom_compose_app_form"},FLe={class:"fcom_app_header"},NLe={class:"fcom_app_options"},BLe={class:"fcom_app_pref"},zLe={class:"fcom_app_footer"},HLe={style:{"font-weight":"500",color:"var(--el-text-color-regular)","font-size":"14px"}};function ULe(t,e,n,s,i,o){const r=Ge,a=vt,l=H("Plus"),c=ye,u=Ht,d=md;return v(),$("div",VLe,[g("div",FLe,[g("h5",null,M(t.$t("Poll Options")),1),g("div",null,[_(r,{onClick:e[0]||(e[0]=h=>t.$emit("cancel")),size:"small",text:""},{default:w(()=>[G(M(t.$t("cancel")),1)]),_:1})])]),g("div",NLe,[(v(!0),$(te,null,be(n.form.options,(h,f)=>(v(),$("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")},Es({_:2},[!h.slug&&f!==0?{name:"suffix",fn:w(()=>[_(r,{onClick:p=>o.removeOption(f),text:"",size:"small"},{default:w(()=>[...e[3]||(e[3]=[G("x",-1)])]),_:1},8,["onClick"])]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128)),g("div",BLe,[_(r,{onClick:o.addOption,text:"",size:"small"},{default:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1}),g("span",null,M(t.$t("Add More")),1)]),_:1},8,["onClick"])])]),g("div",zLe,[g("h5",null,M(t.$t("Poll Settings")),1),n.is_editing?O("",!0):(v(),R(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(()=>[G(M(t.$t("Users can choose multiple options")),1)]),_:1},8,["modelValue"])),e[4]||(e[4]=g("br",null,null,-1)),g("label",HLe,M(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 jLe=de(RLe,[["render",ULe]]),WLe={name:"GiphyIcon"},YLe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function GLe(t,e,n,s,i,o){return v(),$("svg",YLe,[...e[0]||(e[0]=[ya('<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)])])}const qLe=de(WLe,[["render",GLe]]);var XLe=$a,KLe=function(){return XLe.Date.now()},ZLe=KLe,JLe=/\s/;function QLe(t){for(var e=t.length;e--&&JLe.test(t.charAt(e)););return e}var eOe=QLe,tOe=eOe,nOe=/^\s+/;function sOe(t){return t&&t.slice(0,tOe(t)+1).replace(nOe,"")}var iOe=sOe,oOe=c1,rOe=u1,aOe="[object Symbol]";function lOe(t){return typeof t=="symbol"||rOe(t)&&oOe(t)==aOe}var qb=lOe,cOe=iOe,pE=Bf,uOe=qb,mE=0/0,dOe=/^[-+]0x[0-9a-f]+$/i,hOe=/^0b[01]+$/i,fOe=/^0o[0-7]+$/i,pOe=parseInt;function mOe(t){if(typeof t=="number")return t;if(uOe(t))return mE;if(pE(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=pE(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=cOe(t);var n=hOe.test(t);return n||fOe.test(t)?pOe(t.slice(2),n?2:8):dOe.test(t)?mE:+t}var gOe=mOe,vOe=Bf,Uw=ZLe,gE=gOe,_Oe="Expected a function",yOe=Math.max,bOe=Math.min;function wOe(t,e,n){var s,i,o,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(_Oe);e=gE(e)||0,vOe(n)&&(u=!!n.leading,d="maxWait"in n,o=d?yOe(gE(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(E){var T=s,P=i;return s=i=void 0,c=E,r=t.apply(P,T),r}function p(E){return c=E,a=setTimeout(y,e),u?f(E):r}function m(E){var T=E-l,P=E-c,I=e-T;return d?bOe(I,o-P):I}function b(E){var T=E-l,P=E-c;return l===void 0||T>=e||T<0||d&&P>=o}function y(){var E=Uw();if(b(E))return C(E);a=setTimeout(y,m(E))}function C(E){return a=void 0,h&&s?f(E):(s=i=void 0,r)}function k(){a!==void 0&&clearTimeout(a),c=0,s=l=i=a=void 0}function x(){return a===void 0?r:C(Uw())}function S(){var E=Uw(),T=b(E);if(s=arguments,i=this,l=E,T){if(a===void 0)return p(l);if(d)return clearTimeout(a),a=setTimeout(y,e),f(l)}return a===void 0&&(a=setTimeout(y,e)),r}return S.cancel=k,S.flush=x,S}var Wz=wOe;const COe=Ts(Wz),kOe={name:"Giphy",components:{GiphyIcon:qLe},data(){return{gifs:[],searchQuery:"",offset:0,limit:20,loading:!1}},methods:{loadGifs(){var e,n;if(((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(s=>{this.gifs=this.offset===0?s.gifs:this.gifs.concat(s.gifs),!this.searchQuery&&this.offset===0&&(this.$gloablStorage.gifs=this.gifs),this.offset+=this.limit}).catch(s=>{this.$handleError(s)}).finally(()=>{this.loading=!1})},handleGiphyClick(){this.offset=0,this.searchQuery="",this.loadGifs()},handleSearch:COe(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()}}},xOe={class:"fcom_giphy_composer"},SOe={class:"search-container"},$Oe=["onLoad","src","alt","onClick"],AOe={key:0,class:"img_loading"},MOe={key:1,class:"no_result"};function EOe(t,e,n,s,i,o){const r=vt,a=fd,l=hd,c=H("GiphyIcon"),u=ye,d=Ge,h=Ii,f=_t("loading");return v(),$("div",xOe,[_(h,{placement:"bottom-end",width:300,persistent:!1,trigger:"click","popper-class":"fcom_giphy_popover",ref:"popover"},{reference:w(()=>[_(d,{"aria-label":"Pick GIF",text:"",onClick:o.handleGiphyClick},{default:w(()=>[_(u,{class:W(["fcom_apps_icon"])},{default:w(()=>[_(c)]),_:1})]),_:1},8,["onClick"])]),default:w(()=>[Pe((v(),$("div",SOe,[_(r,{modelValue:i.searchQuery,"onUpdate:modelValue":e[0]||(e[0]=p=>i.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))},[i.gifs.length>0?(v(),R(l,{key:0,gutter:5},{default:w(()=>[(v(!0),$(te,null,be(i.gifs,p=>(v(),R(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,$Oe),p.loaded?O("",!0):(v(),$("p",AOe))]),_:2},1024))),128))]),_:1})):(v(),$("p",MOe,M(t.$t("No results")),1))],32),e[2]||(e[2]=g("div",{class:"fcom_giphy_powered_by"},[g("span",{class:"powered_by"},"POWERED BY "),g("span",null,"GIPHY")],-1))])),[[f,i.loading]])]),_:1},512)])}const TOe=de(kOe,[["render",EOe]]),POe={name:"VideoIcon"},IOe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function LOe(t,e,n,s,i,o){return v(),$("svg",IOe,[...e[0]||(e[0]=[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),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)])])}const OOe=de(POe,[["render",LOe]]),DOe={name:"FluentPlayerPreview",emits:["load-failed"],props:{media:{type:Object,required:!0}},data(){return{html:"",loading:!1,playerInstanceKey:""}},watch:{"media.url"(){this.loadFluentPlayerContent()}},async mounted(){await this.loadFluentPlayerContent()},methods:{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 s,i,o,r,a,l,c,u,d,h,f,p;const t=Number.parseInt((s=this.media)==null?void 0:s.media_id,10);if(Number.isSafeInteger(t)&&t>0)return t;const e=[(i=this.media)==null?void 0:i.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.loading=!0;try{if(!this.appVars.features.has_fluent_player||this.appVars.features.enable_fluent_player!=="yes"){this.$emit("load-failed");return}const t=this.getStableMediaId(),e=await this.$get("fluent-player/video-content/"+t,{...this.media,media_id:t,player_instance_key:this.getPlayerInstanceKey()});e.html?(this.html=e.html,this.$nextTick(()=>{const n=this.$el.querySelector(".fluent-player");document.dispatchEvent(new CustomEvent("InitSingleFluentPlayer",{detail:{container:n,playerData:{media:e.media}}}))})):this.$emit("load-failed")}catch(t){console.warn("Failed to load fluent-player assets:",t),this.$emit("load-failed")}finally{this.loading=!1}}}},ROe={class:"fluent-player-preview"},VOe={key:0,class:"player-container"},FOe=["innerHTML"];function NOe(t,e,n,s,i,o){const r=Wt;return v(),$("div",ROe,[i.html?(v(),$("div",VOe,[g("div",{innerHTML:i.html},null,8,FOe)])):O("",!0),i.loading?(v(),R(r,{key:1,animated:"",rows:5})):O("",!0)])}const BOe=de(DOe,[["render",NOe],["__scopeId","data-v-53b0e6e6"]]),zOe={name:"MediaPreview",components:{Postcard:doe,FluentPlayerPreview:BOe},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},playerMedia(){var t,e,n,s;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)||((s=this.media)==null?void 0:s.share_url)||""}},isVideoMedia(){return["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:{getDomainName(t){return t?t.split("/")[2].replace("www.",""):""},isSupportedByFluentPlayer(){var n,s;const t=((s=(n=this.media)==null?void 0:n.settings)==null?void 0:s.src)||this.media.url;return!t||!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)(\?.*)?$/i}].some(i=>i.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"},n=t.split(".").pop().toLowerCase();return e[n]||"video/mp4"},playVideo(){this.$refs.nativeVideo&&this.$refs.nativeVideo.play()},onVideoPause(){this.$refs.nativeVideo&&this.$refs.nativeVideo.currentTime>0&&(this.isPlaying=!0)}}},HOe={key:0},UOe={key:1},jOe=["innerHTML"],WOe=["controls","preload","poster"],YOe=["src","type"],GOe=["href"],qOe={key:0,class:"feed_media_image"},XOe={key:1,class:"feed_media_content"},KOe={class:"media_domain"},ZOe={class:"feed_media_title"},JOe={key:0,class:"feed_media_description"},QOe={class:"feed_meta_desc"};function eDe(t,e,n,s,i,o){const r=H("fluent-player-preview"),a=Wt,l=xa;return v(),$("div",{class:W(["feed_media","feed_media_"+o.media.type])},[o.isVideoMedia?(v(),$(te,{key:0},[o.hasFluentPlayer&&o.isSupportedByFluentPlayer()&&!i.fluentPlayerFailed?(v(),$("div",HOe,[_(r,{media:o.playerMedia,onLoadFailed:e[0]||(e[0]=c=>i.fluentPlayerFailed=!0)},null,8,["media"])])):o.media.html?(v(),$("div",UOe,[g("div",{class:"feed_media_ext_video",innerHTML:o.media.html},null,8,jOe)])):o.media.url?(v(),$("div",{key:2,class:W(["native_video_wrapper",{video_playing:i.isPlaying}])},[g("video",{ref:"nativeVideo",class:"native_video_player",controls:i.isPlaying,preload:n.is_single?"metadata":"none",poster:o.media.thumbnail,onPlay:e[1]||(e[1]=c=>i.isPlaying=!0),onPause:e[2]||(e[2]=(...c)=>o.onVideoPause&&o.onVideoPause(...c)),onEnded:e[3]||(e[3]=c=>i.isPlaying=!1)},[g("source",{src:o.media.url,type:o.getVideoType(o.media.url)},null,8,YOe)],40,WOe),i.isPlaying?O("",!0):(v(),$("div",{key:0,class:"native_video_overlay",onClick:e[4]||(e[4]=(...c)=>o.playVideo&&o.playVideo(...c))},[...e[6]||(e[6]=[g("div",{class:"native_play_button"},[g("svg",{viewBox:"0 0 24 24",fill:"currentColor"},[g("path",{d:"M8 5v14l11-7z"})])],-1)])]))],2)):O("",!0)],64)):o.media.type=="image"||o.media.is_uploaded?(v(),$("div",{key:1,class:W(["feed_media_provider_"+o.media.provider,"feed_media_image feed_custom_uploaded"])},[o.media.image&&!i.is_error?(v(),R(l,{key:0,alt:"",style:Ke({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:W("fcom_media_provider_"+o.media.provider),fit:"scale-down"},{placeholder:w(()=>[_(a,{animated:!0})]),_:1},8,["style","src","previewSrcList","onError","class"])):O("",!0)],2)):(v(),$("a",{key:2,href:o.media.url,target:"_blank",rel:"noopener",class:"feed_media_link"},[o.media.image&&!i.is_error?(v(),$("div",qOe,[_(l,{onError:e[5]||(e[5]=c=>o.handleImageError()),style:{width:"100%"},src:o.media.image},{error:w(()=>[...e[7]||(e[7]=[g("span",null,null,-1)])]),_:1},8,["src"])])):O("",!0),o.media.title?(v(),$("div",XOe,[g("div",KOe,M(o.getDomainName(o.media.url)),1),g("div",ZOe,M(t.getExcerpt(o.media.title,88)),1),o.media.description?(v(),$("div",JOe,[g("div",QOe,M(t.getExcerpt(o.media.description,160)),1)])):O("",!0)])):O("",!0)],8,GOe))],2)}const Zf=de(zOe,[["render",eDe],["__scopeId","data-v-c28b0c69"]]),tDe=[{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)(\?.*)?$/i}],nDe={name:"FluentPlayerUploader",components:{UploadFilled:Vx},emits:["video-added","completed","uploading"],props:{className:{type:String,default:"video-uploader"},type:{type:String,default:"url"}},data(){return{videoUrl:"",processing:!1}},computed:{uploadData(){return{context:"fluent_player"}},action_url(){return this.appVars.rest.url+"/fluent-player/video-upload"},headers(){return{"X-WP-Nonce":this.appVars.rest.nonce}}},methods:{async handleUrlSubmit(){if(!this.videoUrl)return;const t=tDe.some(n=>n.regex.test(this.videoUrl));let e={};t?e={type:"oembed",url:this.videoUrl,html:"",content_type:"video",player:"fluent_player",media_id:new Date().getTime()}:e={type:"oembed",url:this.videoUrl,html:"",content_type:"video"},this.$emit("video-added",e)},handleVideoUploadSuccess(t){var e;try{if(!t||!t.media||!t.media.url)throw new Error("Invalid response: missing media.url");const{media:n}=t,s={type:"upload",url:n.url,player:"fluent_player",provider:"upload",content_type:"video",html:"",title:((e=n.settings)==null?void 0:e.title)||"",media_id:n.media_id};this.$emit("video-added",s)}catch(n){console.error("[FluentPlayerUploader] handleVideoUploadSuccess error:",n,t)}finally{this.$emit("completed",t),this.processing=!1}},handleError(t){try{const e=(t==null?void 0:t.message)||t;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}}},sDe=["element-loading-text"],iDe={key:0,class:"upload-options"},oDe={class:"uploader-content"},rDe={key:1,class:"url-input-section"};function aDe(t,e,n,s,i,o){const r=H("upload-filled"),a=ye,l=Ge,c=l1,u=vt,d=_t("loading");return Pe((v(),$("div",{class:"fluent-player-uploader","element-loading-text":t.$t("Uploading video..."),"element-loading-background":"rgba(255, 255, 255, 0.85)"},[n.type==="upload"?(v(),$("div",iDe,[_(c,{drag:"",class:W([n.className,"video-drag-uploader"]),multiple:!1,action:o.action_url,headers:o.headers,accept:"video/*",data:o.uploadData,"on-success":o.handleVideoUploadSuccess,"on-progress":o.inProgress,"on-error":o.handleError,"show-file-list":!1,disabled:i.processing},{default:w(()=>[g("div",oDe,[_(a,{class:"el-icon--upload"},{default:w(()=>[_(r)]),_:1}),e[1]||(e[1]=g("div",{class:"el-upload__text"},[G(" Drop file here or "),g("em",null,"upload by clicking")],-1)),_(l,{type:"primary",class:"upload-button",loading:i.processing,disabled:i.processing},{default:w(()=>[ae(t.$slots,"trigger",{},()=>[ae(t.$slots,"default",{},()=>[G(M(i.processing?t.$t("Uploading..."):t.$t("Upload Video")),1)])])]),_:3},8,["loading","disabled"])])]),_:3},8,["class","action","headers","data","on-success","on-progress","on-error","disabled"])])):(v(),$("div",rDe,[_(u,{modelValue:i.videoUrl,"onUpdate:modelValue":e[0]||(e[0]=h=>i.videoUrl=h),type:"url",placeholder:t.$t("Enter video URL"),size:"large"},{append:w(()=>[_(l,{onClick:o.handleUrlSubmit,loading:i.processing},{default:w(()=>[G(M(t.$t("Embed")),1)]),_:1},8,["onClick","loading"])]),_:1},8,["modelValue","placeholder"])]))],8,sDe)),[[d,i.processing]])}const lDe=de(nDe,[["render",aDe]]),cDe={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:Zf,FluentPlayerUploader:lDe},computed:{showPreview(){return this.media.html&&!this.showInput},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},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}},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(){this.media.content_type="video",this.$emit("embeded",this.media),this.showInput=!1},handleFluentPlayerVideo(t){if(Object.assign(this.media,t),this.media.player==="fluent_player"&&this.media.type==="upload"){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()}},uDe={key:0},dDe={key:0,class:"fcom_media_editor_actions"},hDe={key:1,class:"fcom_media_editor fcom_media_embeder"},fDe={key:0},pDe={key:1},mDe={key:2,class:"fcom_course_media"};function gDe(t,e,n,s,i,o){var f;const r=Ge,a=Ff,l=Ps,c=vt,u=H("fluent-player-uploader"),d=H("media-preview"),h=_t("loading");return i.appReady?Pe((v(),$("div",uDe,[n.has_iframe||o.hasUpload?(v(),$("div",dDe,[o.showPreview?(v(),R(r,{key:0,onClick:e[0]||(e[0]=p=>i.showInput=!0),type:"danger",size:"small",text:""},{default:w(()=>[G(M(t.$t("Edit media")),1)]),_:1})):(v(),R(l,{key:1,onChange:e[1]||(e[1]=p=>{n.media.html="",n.media.url="",i.showInput=!0}),size:"small",modelValue:n.media.type,"onUpdate:modelValue":e[2]||(e[2]=p=>n.media.type=p)},{default:w(()=>[_(a,{label:t.$t("Oembed"),value:"oembed"},null,8,["label"]),n.has_iframe?(v(),R(a,{key:0,label:t.$t("HTML Code"),value:"iframe_html"},null,8,["label"])):O("",!0),o.hasUpload?(v(),R(a,{key:1,label:t.$t("Upload Video"),value:"upload"},null,8,["label"])):O("",!0)]),_:1},8,["modelValue"]))])):O("",!0),o.showPreview?(v(),$("div",mDe,[_(d,{media_item:n.media},null,8,["media_item"])])):(v(),$("div",hDe,[n.media.type=="iframe_html"&&n.has_iframe?(v(),$(te,{key:0},[g("h3",null,M(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(()=>[G(M(t.$t("Embed")),1)]),_:1})],64)):(v(),$(te,{key:1},[g("h3",null,M(n.box_title||t.$t("Featured media")),1),o.hasFluentPlayerInstalled&&n.media.type==="upload"?(v(),$("p",fDe,M(t.$t("The file must be a valid video type (MP4, M3U8, MPD, WebM, MOV)")),1)):(v(),$("p",pDe,M(n.box_description||t.$t("Embed from Vimeo, YouTube, Wistia and more")),1)),o.hasFluentPlayer&&(n.media.type==="upload"||o.playEmbeddedVideos)?(v(),R(u,{key:2,type:((f=n.media)==null?void 0:f.type)==="upload"?"upload":"url",onVideoAdded:o.handleFluentPlayerVideo},null,8,["type","onVideoAdded"])):(v(),R(c,{key:3,onKeydown:$t(o.fetchData,["enter"]),size:"large",modelValue:n.media.url,"onUpdate:modelValue":e[5]||(e[5]=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(()=>[G(M(t.$t("Embed")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeydown","modelValue","placeholder"]))],64))]))])),[[h,i.fetching]]):O("",!0)}const Xb=de(cDe,[["render",gDe]]),vDe={name:"VideoEmbeder",emits:["embeded"],props:["is_admin","space"],components:{MediaEmbeder:Xb,VideoIcon:OOe},data(){return{videoUrl:"",showVideoPop:!1,media:{type:"oembed",url:"",inner_html:"",content_type:"video"}}},methods:{show(){this.showVideoPop=!0},embeded(t){this.$emit("embeded",t),this.showVideoPop=!1,this.media={type:"oembed",url:"",inner_html:"",content_type:"video"}}}},_De={class:"fcom_video_embeder"};function yDe(t,e,n,s,i,o){const r=H("VideoIcon"),a=ye,l=Ge,c=H("media-embeder"),u=Ss;return v(),$("div",_De,[_(l,{"aria-label":"Add Video",text:"",onClick:o.show},{default:w(()=>[_(a,{class:W(["fcom_apps_icon"])},{default:w(()=>[_(r)]),_:1})]),_:1},8,["onClick"]),i.showVideoPop?(v(),R(u,{key:0,title:t.$t("Attach Video"),modelValue:i.showVideoPop,"onUpdate:modelValue":e[0]||(e[0]=d=>i.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:i.media},null,8,["box_title","has_iframe","onEmbeded","space","media"])]),_:1},8,["title","modelValue","width"])):O("",!0)])}const bDe=de(vDe,[["render",yDe]]),wDe={name:"DocumentsUploader",components:{UploadFilled:Vx,Document:e1},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,s;(s=(n=e==null?void 0:e.response)==null?void 0:n.file)!=null&&s.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))}}},CDe={class:"fcom_documents_uploader"},kDe={class:"el-upload__text"},xDe={key:0},SDe={class:"fcom_document_lists"},$De={class:"fcom_each_document"},ADe={class:"fcom_document_info"},MDe={class:"fcom_document_icon"},EDe={class:"fcom_document_title"},TDe={class:"fcom_document_actions"};function PDe(t,e,n,s,i,o){const r=H("UploadFilled"),a=ye,l=l1,c=H("Document"),u=Ge;return v(),$("div",CDe,[_(l,{action:o.action_url,headers:o.headers,"file-list":i.fileList,"onUpdate:fileList":e[0]||(e[0]=d=>i.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",kDe,M(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(),$("div",xDe,[g("div",SDe,[(v(!0),$(te,null,be(o.uploadingFiles,d=>(v(),$("div",$De,[g("div",ADe,[g("div",MDe,[_(a,null,{default:w(()=>[_(c)]),_:1})]),g("span",EDe,M(d.name),1)]),g("div",TDe,[_(u,{text:"",size:"small",loading:!0},{default:w(()=>[G(M(t.$t("Uploading...")),1)]),_:1})])]))),256))])])):O("",!0)])}const Yz=de(wDe,[["render",PDe]]),IDe={name:"PdfIcon"},LDe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function ODe(t,e,n,s,i,o){return v(),$("svg",LDe,[...e[0]||(e[0]=[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),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)])])}const DDe=de(IDe,[["render",ODe]]),RDe={name:"ZipIcon"},VDe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function FDe(t,e,n,s,i,o){return v(),$("svg",VDe,[...e[0]||(e[0]=[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),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),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),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)])])}const NDe=de(RDe,[["render",FDe]]),BDe={name:"AudioIcon"},zDe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function HDe(t,e,n,s,i,o){return v(),$("svg",zDe,[...e[0]||(e[0]=[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),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)])])}const UDe=de(BDe,[["render",HDe]]),jDe={name:"DocIcon"},WDe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function YDe(t,e,n,s,i,o){return v(),$("svg",WDe,[...e[0]||(e[0]=[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),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)])])}const GDe=de(jDe,[["render",YDe]]),qDe={name:"VideoFileIcon"},XDe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function KDe(t,e,n,s,i,o){return v(),$("svg",XDe,[...e[0]||(e[0]=[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),g("path",{d:"M12 2V7C12 8.10457 12.8954 9 14 9H19",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"},null,-1),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)])])}const ZDe=de(qDe,[["render",KDe]]),JDe={name:"DocumentLists",components:{Document:e1,Download:kie,PdfIcon:DDe,ImageIcon:jz,ZipIcon:NDe,AudioIcon:UDe,DocIcon:GDe,VideoFileIcon:ZDe},props:["document_lists","additional_data","is_editable"],emits:["fileRemoved","documentsUpdated"],data(){return{editingIndex:null,isSaving:!1}},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"},saveDoc(t){this.isSaving=!0,this.$post("documents/update",{id:t.id,title:t.title,...this.additional_data}).then(e=>{this.$notify.success(e.message),this.isSaving=!1,this.editingIndex=null,this.$emit("documentsUpdated",this.document_lists)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.isSaving=!1})}}},QDe={class:"fcom_document_lists"},eRe={class:"fcom_each_document"},tRe={class:"fcom_document_info"},nRe={class:"fcom_document_icon"},sRe=["href"],iRe=["onClick"],oRe={class:"fcom_document_actions"},rRe=["href"];function aRe(t,e,n,s,i,o){const r=ye,a=H("EditPen"),l=Ge,c=vt,u=H("Download"),d=H("DeleteFilled"),h=_t("loading");return v(),$("div",QDe,[(v(!0),$(te,null,be(n.document_lists,(f,p)=>(v(),$("div",eRe,[g("div",tRe,[g("div",nRe,[_(r,null,{default:w(()=>[(v(),R(Tt(o.getIcon(f.type))))]),_:2},1024)]),n.is_editable?(v(),$(te,{key:1},[i.editingIndex!=p?(v(),$("span",{key:0,style:{cursor:"pointer"},onClick:m=>i.editingIndex=p,class:"fcom_document_title"},[g("span",null,M(f.title),1),_(r,{style:{"margin-left":"10px","font-size":"80%"}},{default:w(()=>[_(a)]),_:1})],8,iRe)):(v(),R(c,{key:1,readonly:i.isSaving,size:"small",style:{width:"80%"},modelValue:f.title,"onUpdate:modelValue":m=>f.title=m},{append:w(()=>[_(l,{disabled:i.isSaving,loading:i.isSaving,onClick:m=>o.saveDoc(f)},{default:w(()=>[g("span",null,M(t.$t("Update")),1)]),_:1},8,["disabled","loading","onClick"])]),_:2},1032,["readonly","modelValue","onUpdate:modelValue"]))],64)):(v(),$("a",{key:0,href:f.url,target:"_blank",rel:"noopener",class:"fcom_document_title"},M(f.title),9,sRe))]),Pe((v(),$("div",oRe,[!n.is_editable&&f.url?(v(),$("a",{key:0,href:f.url+"&force_download=1",target:"_blank",class:"el-button el-button--text"},[_(r,null,{default:w(()=>[_(u)]),_:1})],8,rRe)):O("",!0),n.is_editable?(v(),R(l,{key:1,onClick:m=>o.removeDocument(p,f),plain:"",text:"",size:"small"},{default:w(()=>[_(r,null,{default:w(()=>[_(d)]),_:1})]),_:1},8,["onClick"])):O("",!0)])),[[h,i.isSaving]])]))),256))])}const M1=de(JDe,[["render",aRe]]),lRe={name:"DocumentUploaderPop",components:{DocumentLists:M1,DocumentsUploader:Yz,Document:e1},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="")}}},cRe={class:"fcom_inline_docs_form"},uRe={class:"fcom_doc_upload_modal"};function dRe(t,e,n,s,i,o){var c;const r=Ge,a=H("documents-uploader"),l=H("document-lists");return v(),$("div",cRe,[g("div",uRe,[_(r,{onClick:e[0]||(e[0]=u=>o.reset()),class:"fcom_file_cancel_btn",text:"",size:"small"},{default:w(()=>[G(M(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 hRe=de(lRe,[["render",dRe]]),fRe={name:"PaperClipIcon"},pRe={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function mRe(t,e,n,s,i,o){return v(),$("svg",pRe,[...e[0]||(e[0]=[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)])])}const gRe=de(fRe,[["render",mRe]]),vRe=window.fluentComAdmin.auth,_Re={name:"FeedTextComposer",components:{PaperClipIcon:gRe,DocumentLists:M1,DocumentUploaderPop:hRe,Document:e1,MediaPreview:Zf,Giphy:TOe,ImageUploader:vd,SurveyEditForm:jLe,MarkdownEditor:Sd,EmojiPicker:TV,VideoEmbeder:bDe,ImageIcon:jz,PollIcon:DLe},emits:["editorCreated"],props:{placeholder:{type:String,default(){return"What's happening, "+vRe.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"}},data(){return{mentionResults:[],mentionSearch:"",uploading:!1,isEmojiPickerVisible:!1,maxMediaPerPost:this.appVars.features.max_media_per_post}},methods:{cencelSurvey(){this.content.survey=null},insertEmoji(t){this.$refs.markdownEditor&&this.$refs.markdownEditor.updateContent(t)},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 s=n.getAsFile(),i=t.clipboardData.getData("text")||"clipboard-image.png";this.uploadImage(new File([s],i,{type:s.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(s=>(e&&this.handleMediaUpload(s.media.url),s.media.url)).catch(s=>{this.$handleError(s)}).finally(()=>{this.uploading=!1})},handleMediaUpload(t,e="uploader"){var n,s;if(this.content.media_images||(this.content.media_images=[]),(s=(n=this.content)==null?void 0:n.meta)!=null&&s.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.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,s;this.content.meta||(this.content.meta=[]),(n=this.content)!=null&&n.media_images&&(this.content.media_images=[]),(s=this.content)!=null&&s.media&&(this.content.media=null);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){this.content.media_images=[],this.content.meta=[],this.content.media=t},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(){this.autofocus&&this.$nextTick(()=>{this.$refs.create_status&&this.$refs.create_status.focus()})}},yRe={class:"fcom_text_composer"},bRe={class:"fcom_editor status_text_input"},wRe={key:1,style:{position:"relative","text-align":"center"}},CRe={key:2,class:"fcom_media_items"},kRe={key:0,class:"fcom_media_images"},xRe=["src","alt"],SRe={key:1,class:"fcrom_media_images"},$Re={class:"fcrom_media_image"},ARe=["src","alt"],MRe={key:3,class:"fcrom_media_images"},ERe=["src","alt"],TRe={key:4,class:"fcrom_media_images"},PRe={class:"fcrom_media_image"},IRe=["src","alt"],LRe={class:"fcom_composer_footer"},ORe={class:"fcom_composer_apps"},DRe={key:0},RRe={class:"fcom_composer_actions"};function VRe(t,e,n,s,i,o){var S,E,T,P,I,L,V,D,z;const r=H("MarkdownEditor"),a=H("DocumentUploaderPop"),l=H("SurveyEditForm"),c=Ge,u=H("media-preview"),d=H("CloseBold"),h=ye,f=H("ImageIcon"),p=H("image-uploader"),m=H("video-embeder"),b=H("PaperClipIcon"),y=H("PollIcon"),C=H("EmojiPicker"),k=H("Giphy"),x=_t("loading");return v(),$(te,null,[g("div",yRe,[g("div",bRe,[ae(t.$slots,"before_input"),_(r,{ref:"markdownEditor",modelValue:n.content.message,"onUpdate:modelValue":e[0]||(e[0]=Y=>n.content.message=Y),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?Y=>o.uploadImage(Y,!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"]),ae(t.$slots,"after_input")]),n.content.content_type=="document"?(v(),$(te,{key:0},[n.config.documentsApp&&n.config.space_id?(v(),R(a,{key:0,is_inline:!0,feed:n.content,space_id:n.config.space_id},null,8,["feed","space_id"])):O("",!0)],64)):(v(),$(te,{key:1},[n.content.survey?(v(),R(l,{key:0,onCancel:o.cencelSurvey,form:n.content.survey,is_editing:n.is_editing},null,8,["onCancel","form","is_editing"])):O("",!0),(E=(S=n.content)==null?void 0:S.media)!=null&&E.type?(v(),$("div",wRe,[_(c,{onClick:e[2]||(e[2]=Y=>{n.content.media=null}),text:"",type:"danger"},{default:w(()=>[G(M(t.$t("Remove Media")),1)]),_:1}),_(u,{media_item:n.content.media},null,8,["media_item"])])):(T=n.content)!=null&&T.meta?(v(),$("div",CRe,[(I=(P=n.content.meta)==null?void 0:P.media_items)!=null&&I.length?(v(!0),$(te,{key:0},be(n.content.meta.media_items,(Y,B)=>(v(),$("div",{key:B},[Y.type=="image"?(v(),$("div",kRe,[g("img",{class:"fcom_media_image",src:Y.url,alt:t.$t("Media image")},null,8,xRe),_(c,{class:"fcom_media_images_cross_button",link:"",onClick:U=>n.content.meta.media_items.splice(B,1)},{default:w(()=>[_(h,null,{default:w(()=>[_(d)]),_:1})]),_:1},8,["onClick"])])):O("",!0)]))),128)):((V=(L=n.content.meta)==null?void 0:L.media_preview)==null?void 0:V.type)=="image"||(z=(D=n.content.meta)==null?void 0:D.media_preview)!=null&&z.image?(v(),$("div",SRe,[g("div",$Re,[g("img",{src:n.content.meta.media_preview.image,alt:t.$t("Media Preview image")},null,8,ARe),_(c,{link:"",onClick:e[3]||(e[3]=Y=>n.content.meta.media_preview=null)},{default:w(()=>[_(h,null,{default:w(()=>[_(d)]),_:1})]),_:1})])])):O("",!0)])):n.content.media_images&&n.content.media_images.length?(v(),$("div",MRe,[(v(!0),$(te,null,be(n.content.media_images,(Y,B)=>(v(),$("div",{class:"fcrom_media_image",key:B},[g("img",{src:Y.url,alt:t.$t("Media image")},null,8,ERe),_(c,{link:"",onClick:U=>n.content.media_images.splice(B,1)},{default:w(()=>[_(h,null,{default:w(()=>[_(d)]),_:1})]),_:1},8,["onClick"])]))),128))])):o.checkHasImageForCommentsEdit(n.content)?(v(),$("div",TRe,[g("div",PRe,[g("img",{src:n.content.media.media_url,alt:t.$t("Media image")},null,8,IRe),_(c,{link:"",onClick:e[4]||(e[4]=Y=>o.removeImageFromComments())},{default:w(()=>[_(h,null,{default:w(()=>[_(d)]),_:1})]),_:1})])])):O("",!0)],64))]),ae(t.$slots,"before_composer_footer"),Pe((v(),$("div",LRe,[g("div",ORe,[o.hasActiveApp?O("",!0):(v(),$(te,{key:0},[i.maxMediaPerPost?(v(),R(p,{key:0,additionalData:{resize:!0,context:n.context,max_width:1400},isMultiple:n.config.multipleMedia,onUploading:e[5]||(e[5]=()=>{i.uploading=!0}),onCompleted:e[6]||(e[6]=()=>{i.uploading=!1}),onUploaded:o.handleMediaUpload},{default:w(()=>[_(c,{"aria-label":"Upload Media",loading:i.uploading,text:""},{default:w(()=>[_(h,{class:"fcom_status_img_icon"},{default:w(()=>[_(f)]),_:1}),i.uploading?(v(),$("span",DRe,M(t.$t("Uploading...")),1)):O("",!0)]),_:1},8,["loading"])]),_:1},8,["additionalData","isMultiple","onUploaded"])):O("",!0),n.config.videoApp&&t.hasFeature("video_embeder")?(v(),R(m,{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.documentsApp&&n.config.space_id?(v(),R(c,{key:2,"aria-label":t.$t("Add Documents"),title:t.$t("Upload Documents"),text:"",onClick:e[7]||(e[7]=Y=>n.content.content_type="document")},{default:w(()=>[_(h,{class:W(["fcom_apps_icon"])},{default:w(()=>[_(b)]),_:1})]),_:1},8,["aria-label","title"])):O("",!0),n.config.surveyApp&&t.hasFeature("has_survey_poll")?(v(),R(c,{key:3,"aria-label":"Create Poll",onClick:o.initSurveyForm,text:""},{default:w(()=>[_(h,{class:"fcom_apps_icon"},{default:w(()=>[_(y)]),_:1})]),_:1},8,["onClick"])):O("",!0),t.hasFeature("emoji_app")?(v(),R(C,{key:4,onEmojiSelected:o.insertEmoji},null,8,["onEmojiSelected"])):O("",!0),t.hasFeature("giphy_app")?(v(),R(k,{key:5,onSelectedGiphy:o.selectedGiphy},null,8,["onSelectedGiphy"])):O("",!0)],64))]),g("div",RRe,[ae(t.$slots,"default")])])),[[x,i.uploading]]),ae(t.$slots,"after_composer_footer")],64)}const E1=de(_Re,[["render",VRe]]),FRe={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 s=n.getAttribute("href"),i=(s==null?void 0:s.startsWith(this.appVars.portal_url))&&s.match(e);if(!i)return;const o=i[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._lightboxHandler=n=>{const s=n.target.closest('img[src^="http"]');if(!s)return;n.preventDefault();const i=Array.from(t.querySelectorAll('img[src^="http"]')).map(o=>o.src);this.lightboxImages=i,this.lightboxIndex=Math.max(0,i.indexOf(s.src))},t.addEventListener("click",this._lightboxHandler)},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._lightboxHandler&&(t.removeEventListener("click",this._lightboxHandler),this._lightboxHandler=null))}},mounted(){this.$nextTick(()=>this.setupListeners())},beforeUnmount(){this.cleanupListeners()}},NRe=["innerHTML"];function BRe(t,e,n,s,i,o){const r=NR;return v(),$(te,null,[g("div",{ref:"content",class:W(["feed_md_content",n.class_name]),innerHTML:n.content},null,10,NRe),i.lightboxImages.length?(v(),R(r,{key:0,"url-list":i.lightboxImages,"initial-index":i.lightboxIndex,"hide-on-click-modal":!0,onClose:e[0]||(e[0]=a=>i.lightboxImages=[])},null,8,["url-list","initial-index"])):O("",!0)],64)}const T1=de(FRe,[["render",BRe]]),zRe={name:"CommentReacts",components:{UserRouteLink:Wr},data(){return{centerDialogVisible:!1,reactions:null,loading:!1}},props:{comment:{required:!0,default:null}},methods:{getReactions(){this.reactions||(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}))}}},HRe={style:{"margin-left":"5px"}},URe={key:0},jRe={key:1},WRe={class:"fcom_user_lists"},YRe={key:2};function GRe(t,e,n,s,i,o){const r=Wt,a=H("UserAvatar"),l=H("UserRouteLink"),c=ui,u=Ii;return v(),R(u,{persistent:!1,placement:"bottom",title:t.$t("Likes"),width:210,trigger:"click",onShow:o.getReactions},{reference:w(()=>[g("span",HRe,M(n.comment.reactions_count),1)]),default:w(()=>[i.loading?(v(),$("div",URe,[_(r,{animated:!0,rows:1})])):i.reactions?(v(),$("div",jRe,[_(c,{"max-height":"300px"},{default:w(()=>[g("ul",WRe,[(v(!0),$(te,null,be(i.reactions,d=>(v(),$("li",null,[d.xprofile?(v(),$(te,{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(),$("div",YRe,[g("p",null,M(t.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const Gz=de(zRe,[["render",GRe]]),qRe={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}}},XRe={class:"fcom_image_carousel"},KRe={key:0},ZRe=["preload","poster"],JRe=["src","type"],QRe={key:1,class:"fcom_image_wrap"},eVe={key:0,class:"fcom_image_overlay"};function tVe(t,e,n,s,i,o){const r=xa;return v(),$("div",XRe,[g("div",{class:W([o.carouselClass+" "+n.feed.type,"fcom_image_carousel__container"])},[(v(!0),$(te,null,be(o.visibleMedia,(a,l)=>(v(),$("div",{class:W(["fcom_carousel__image","fcom_media_type_"+a.type])},[a.type==="video"?(v(),$("div",KRe,[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,JRe)],8,ZRe)])):(v(),$("div",QRe,[_(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,fit:"cover"},null,8,["src","initial-index","preview-src-list"]),o.isOverflowSlot(l)?(v(),$("div",eVe,"+"+M(o.overflowCount),1)):O("",!0)]))],2))),256))],2)])}const b5=de(qRe,[["render",tVe]]),nVe={name:"ErrorIcon"},sVe={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"};function iVe(t,e,n,s,i,o){return v(),$("svg",sVe,[...e[0]||(e[0]=[g("circle",{cx:"12",cy:"12",r:"10"},null,-1),g("line",{x1:"12",x2:"12",y1:"16",y2:"12"},null,-1),g("line",{x1:"12",x2:"12.01",y1:"8",y2:"8"},null,-1)])])}const oVe=de(nVe,[["render",iVe]]),rVe={name:"ReportReview",components:{ErrorIcon:oVe},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)}},aVe={class:"fcom_feed_report_wrap"},lVe={class:"fcom_feed_report_content"},cVe={key:0},uVe={key:1},dVe={key:2},hVe={class:"fcom_feed_report_action"};function fVe(t,e,n,s,i,o){const r=H("ErrorIcon"),a=Ge;return v(),$("div",aVe,[g("div",lVe,[_(r),n.feed.meta.auto_flagged=="yes"?(v(),$("span",cVe,M(t.$t("This %s has been flagged automatically by the site rule.",n.type)),1)):n.feed.meta.reports_count>1?(v(),$("span",uVe,M(t.$t("This %1$s has been flagged with %2$s reports",n.type,n.feed.meta.reports_count)),1)):(v(),$("span",dVe,M(t.$t("This %1$s has been flagged with %2$s report",n.type,n.feed.meta.reports_count)),1))]),g("div",hVe,[_(a,{onClick:e[0]||(e[0]=l=>o.openReportDetails())},{default:w(()=>[G(M(t.$t("Review")),1)]),_:1})])])}const qz=de(rVe,[["render",fVe]]),pVe={name:"StickyIcon"},mVe={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"};function gVe(t,e,n,s,i,o){return v(),$("svg",mVe,[...e[0]||(e[0]=[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)])])}const Xz=de(pVe,[["render",gVe]]),vVe={name:"SingleComment",components:{ImageCarousel:b5,FeedTextComposer:E1,MediaPreview:Zf,ReportReview:qz,StickyIcon:Xz,FeedMdContent:T1},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"],data(){return{working:!1,isEdit:!1,editingComment:null,focusTrigger:0}},computed:{isReportEnabled(){return this.has_pro&&this.appVars.moderationConfig.is_enabled},showReport(){var t;return this.hasSpaceModeratorAccess()&&this.isReportEnabled&&this.show_report&&((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}}},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,s,i;const t=((e=this.editingComment.media_images)==null?void 0:e.length)>0||((s=(n=this.editingComment.meta)==null?void 0:n.media_preview)==null?void 0:s.image);if(!((i=this.editingComment.message)!=null&&i.replace(/ |\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=[]}).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 s=window.location.origin,i=new RegExp(s,"g");return t=t.replace(/<a(.*?)href="(.*?)"(.*?)>/g,(o,r,a,l)=>a.match(i)?`<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"})},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"))}}},_Ve={key:1,class:"person_avatar"},yVe={class:"comment_wrap"},bVe={key:0,class:"comment_text"},wVe={key:0,class:"comment_text_head"},CVe={class:"comment_text_head_name"},kVe=["title"],xVe={key:0,class:"comment_text_head_status"},SVe={class:"comment_actions"},$Ve={class:"actions_items"},AVe={key:1,class:"comment_text_media"},MVe={key:2,class:"comment_text_media"};function EVe(t,e,n,s,i,o){const r=H("ReportReview"),a=H("UserAvatar"),l=H("UserRouteLink"),c=xo,u=H("StickyIcon"),d=ye,h=Ge,f=H("MoreFilled"),p=Ii,m=H("FeedMdContent"),b=H("MediaPreview"),y=H("ImageCarousel"),C=H("feed-text-composer"),k=_t("loading");return v(),$(te,null,[o.showReport?(v(),R(r,{key:0,feed:o.getReportComment,type:"comment",onUpdated:o.reportUpdated},null,8,["feed","onUpdated"])):O("",!0),n.show_header&&n.comment.xprofile?(v(),$("div",_Ve,[_(a,{with_level:!1,xprofile:n.comment.xprofile,is_rounded:!0},null,8,["xprofile"])])):O("",!0),Pe((v(),$("div",yVe,[i.isEdit?(v(),$("div",{key:1,onKeydown:e[9]||(e[9]=$t((...x)=>o.maybeSave&&o.maybeSave(...x),["enter"])),class:"comment_text"},[_(C,{context:"comment",config:{multipleMedia:!0},placeholder:t.$t("Write a comment"),content:i.editingComment,autofocus:!0,autofocus_changed:i.focusTrigger},{default:w(()=>[g("div",null,[_(h,{onClick:e[7]||(e[7]=x=>i.isEdit=!1),class:"fcom_secondary_button"},{default:w(()=>[G(M(t.$t("Cancel")),1)]),_:1}),_(h,{class:"fcom_primary_button",onClick:e[8]||(e[8]=x=>o.updateComment(i.editingComment))},{default:w(()=>[G(M(t.$t("Update")),1)]),_:1})])]),_:1},8,["placeholder","content","autofocus_changed"])],32)):(v(),$("div",bVe,[n.show_header?(v(),$("div",wVe,[g("div",CVe,[_(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"},M(t.humanDateDiff(n.comment.created_at)),9,kVe),n.comment.status=="pending"?(v(),$("div",xVe,[_(c,{type:"warning"},{default:w(()=>[G(M(t.$t("In Review")),1)]),_:1})])):O("",!0)]),g("div",SVe,[n.comment.is_sticky?(v(),R(h,{key:0,onClick:e[0]||(e[0]=x=>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,{persistent:!1,placement:"bottom",ref:"comment_actions",width:200,trigger:"click"},{reference: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"])]),default:w(()=>[g("ul",$Ve,[g("li",{onClick:e[1]||(e[1]=x=>o.copyCommentLink(n.comment))},M(t.$t("Copy Link")),1),o.showStickyOption?(v(),$(te,{key:0},[n.comment.is_sticky?(v(),$("li",{key:0,onClick:e[2]||(e[2]=x=>o.toggleSticky())},M(t.$t("Unpin from Top")),1)):(v(),$("li",{key:1,onClick:e[3]||(e[3]=x=>o.toggleSticky())},M(t.$t("Pin to Top")),1))],64)):O("",!0),o.showReportOption?(v(),$("li",{key:1,onClick:e[4]||(e[4]=x=>o.reportComment(n.comment))},M(t.$t("Report Comment")),1)):O("",!0),t.canEditComment(n.comment)?(v(),$("li",{key:2,onClick:e[5]||(e[5]=x=>o.editComment())},M(t.$t("Edit")),1)):O("",!0),t.canDeleteComment(n.comment)?(v(),$("li",{key:3,onClick:e[6]||(e[6]=x=>o.deleteComment())},M(t.$t("Delete")),1)):O("",!0)])]),_:1},512)])])):O("",!0),_(m,{class_name:"comment_text_body",content:o.renderedComment(n.comment.message_rendered)},null,8,["content"]),n.comment.meta.media_preview?(v(),$("div",AVe,[_(b,{media_item:n.comment.meta.media_preview},null,8,["media_item"])])):n.comment.meta.media_items?(v(),$("div",MVe,[n.comment.meta.media_items?(v(),R(y,{key:0,feed:n.comment},null,8,["feed"])):O("",!0)])):O("",!0)])),ae(t.$slots,"after_comment_text")])),[[k,i.working]])],64)}const Kb=de(vVe,[["render",EVe]]),TVe={name:"IndividualCommentReply",components:{FeedTextComposer:E1,FeedMdContent:T1,HeartIcon:Gb,SingleComment:Kb,CommentReactions:Gz},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},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.newComment={message:"",media_images:[]}}).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()}},PVe={class:"fcom_course_comment each_comment"},IVe={key:0,class:"person_avatar"},LVe=["src","alt"],OVe={class:"comment_wrap"},DVe={class:"comment_text"},RVe={class:"comment_text_head"},VVe={class:"comment_text_head_name"},FVe=["title"],NVe={class:"reply_box"},BVe={class:"fcom_comments_react"},zVe={class:"child_comments"},HVe=["id"],UVe={class:"reply_box"},jVe=["onClick"],WVe={class:"fcom_comments_react fcom_reaction_list"},YVe={key:0,class:"child_reply_wrap"},GVe={class:"feed_commenting"},qVe={class:"person_avatar"},XVe=["src"],KVe={class:"feed_comment_input comment_text"};function ZVe(t,e,n,s,i,o){const r=H("UserRouteLink"),a=H("FeedMdContent"),l=H("HeartIcon"),c=ye,u=H("CommentReactions"),d=H("single-comment"),h=Ge,f=H("FeedTextComposer"),p=_t("loading");return v(),$("div",PVe,[i.replyingComment.xprofile?(v(),$("div",IVe,[g("img",{src:i.replyingComment.xprofile.avatar,alt:t.$t("avatar")},null,8,LVe)])):O("",!0),g("div",OVe,[g("div",DVe,[g("div",RVe,[g("div",VVe,[_(r,{xprofile:i.replyingComment.xprofile,show_follow:!0},null,8,["xprofile"]),g("div",{title:i.replyingComment.created_at,class:"comment_text_head_time"},M(t.humanDateDiff(i.replyingComment.created_at)),9,FVe)])]),_(a,{content:i.replyingComment.message_rendered,class_name:"comment_text_body"},null,8,["content"])]),g("div",NVe,[g("span",{onClick:e[0]||(e[0]=(...m)=>o.toggleCommentBox&&o.toggleCommentBox(...m)),class:"reply_btn"},M(t.$t("Post Comment")),1),g("span",{class:W([{fcom_is_liked:i.replyingComment.liked},"reply_btn"])},[g("div",BVe,[_(c,{class:W({user_reacted:i.replyingComment.liked}),onClick:e[1]||(e[1]=m=>o.toggleLike(n.comment))},{default:w(()=>[_(l,{filled:i.replyingComment.liked},null,8,["filled"])]),_:1},8,["class"]),parseInt(i.replyingComment.reactions_count)?(v(),R(u,{key:0,comment:n.comment},null,8,["comment"])):O("",!0)])],2)]),g("div",zVe,[(v(!0),$(te,null,be(i.replyingComment.comments,(m,b)=>(v(),$("div",{id:"comment_"+m.id,class:"each_comment"},[_(d,{onDeleted:y=>t.handleCommentDelete(b),comment:m},{after_comment_text:w(()=>[g("div",UVe,[g("span",{onClick:y=>o.toggleCommentBox(m),class:"reply_btn"},M(t.$t("Reply")),9,jVe),g("span",{class:W([{fcom_is_liked:m.liked},"reply_btn"])},[g("div",WVe,[_(c,{class:W({user_reacted:m.liked}),onClick:y=>o.toggleLike(m)},{default:w(()=>[_(l,{filled:m.liked},null,8,["filled"])]),_:2},1032,["class","onClick"]),parseInt(m.reactions_count)?(v(),R(u,{key:0,comment:m},null,8,["comment"])):O("",!0)])],2)])]),_:2},1032,["onDeleted","comment"])],8,HVe))),256))]),i.commenting?(v(),$("div",YVe,[g("div",GVe,[g("div",qVe,[g("img",{alt:"",src:t.auth.avatar},null,8,XVe)]),g("div",KVe,[_(f,{context:"comment",mentionQuery:{space_id:i.replyingComment.space_id},autofocus_changed:i.commenting,autofocus:i.commenting,disabled:i.saving,placeholder:t.$t("Write a reply"),content:i.newComment},{default:w(()=>[Pe((v(),R(h,{disabled:i.saving,class:"fcom_primary_button",onClick:e[2]||(e[2]=m=>o.postComment())},{default:w(()=>[G(M(t.$t("Post Comment")),1)]),_:1},8,["disabled"])),[[p,i.saving]])]),_:1},8,["mentionQuery","autofocus_changed","autofocus","disabled","placeholder","content"])])])])):O("",!0)])])}const JVe=de(TVe,[["render",ZVe]]),QVe={name:"CourseComments",props:["course"],components:{IndividualCommentReply:JVe,Pagination:$d,ChatIcon:Uz,HeartIcon:Gb,FeedMdContent:T1},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()}},eFe={key:0,class:"white_loaded"},tFe={key:0,class:"fcom_course_comments_header"},nFe={class:"course_comments feed_comments overview_comments"},sFe={key:0,class:"person_avatar"},iFe={class:"comment_wrap"},oFe={class:"comment_text"},rFe={class:"comment_text_head"},aFe={class:"comment_text_head_name"},lFe=["title"],cFe={class:"comment_actions"},uFe={class:"actions_items"},dFe=["onClick"],hFe={class:"comment_text_details"},fFe=["href"],pFe={class:"comment_text_actions"},mFe={key:0},gFe={key:1};function vFe(t,e,n,s,i,o){const r=Wt,a=H("UserAvatar"),l=H("UserRouteLink"),c=H("MoreFilled"),u=ye,d=Ge,h=Ii,f=H("FeedMdContent"),p=H("ChatIcon"),m=H("HeartIcon"),b=H("pagination"),y=H("IndividualCommentReply"),C=or,k=_t("loading");return i.loading?(v(),$("div",eFe,[_(r,{row:5})])):(v(),$(te,{key:1},[i.pagination.total?(v(),$("div",tFe,[g("h5",null,M(t.$t("Comments (%s)",i.pagination.total)),1)])):O("",!0),g("div",nFe,[(v(!0),$(te,null,be(i.comments,(x,S)=>(v(),$("div",{key:x.id,class:"fcom_course_comment each_comment"},[x.xprofile?(v(),$("div",sFe,[_(a,{with_level:!1,xprofile:x.xprofile},null,8,["xprofile"])])):O("",!0),g("div",iFe,[g("div",oFe,[g("div",rFe,[g("div",aFe,[_(l,{xprofile:x.xprofile},null,8,["xprofile"]),g("div",{title:x.created_at,class:"comment_text_head_time"},M(t.humanDateDiff(x.created_at)),9,lFe)]),Pe((v(),$("div",cFe,[t.canDeleteComment(x)?(v(),R(h,{key:0,persistent:!1,placement:"bottom",width:200,trigger:"click"},{reference: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"])]),default:w(()=>[g("ul",uFe,[g("li",{onClick:E=>o.deleteComment(x,S)},"Delete",8,dFe)])]),_:2},1024)):O("",!0)])),[[k,i.working]])]),g("div",hFe,[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:x.post.slug,comment_id:x.id})},[G(M(t.$t("Commented in"))+" ",1),g("b",null,M(t.getExcerpt(x.post.title,60)),1)],8,fFe)]),_(f,{content:x.message_rendered,class_name:"comment_text_body"},null,8,["content"]),g("div",pFe,[_(d,{onClick:E=>o.initCommentReply(x),text:""},{default:w(()=>[_(u,null,{default:w(()=>[_(p)]),_:1}),g("span",null,M(t.$t("Reply")),1)]),_:1},8,["onClick"]),_(d,{text:""},{default:w(()=>[_(u,{class:W({user_reacted:x.liked}),onClick:E=>o.toggleLike(x)},{default:w(()=>[_(m,{filled:x.liked},null,8,["filled"])]),_:2},1032,["class","onClick"]),g("span",null,M(x.reactions_count||""),1)]),_:2},1024)])])])]))),128)),i.pagination.total?O("",!0):(v(),$("div",mFe,[g("h5",null,M(t.$t("No comments from any lessons yet! Comments from all lessons will be shown here.")),1)]))]),_(b,{pagination:i.pagination,onFetch:o.fetchComments},null,8,["pagination","onFetch"]),_(C,{"append-to-body":!0,modelValue:i.isReplying,"onUpdate:modelValue":e[0]||(e[0]=x=>i.isReplying=x),size:t.dialogWidth},{header:w(()=>{var x;return[g("p",null,[G(M(t.$t("Replying to"))+" ",1),g("b",null,M((x=i.replyingComemnt)==null?void 0:x.post.title),1)])]}),default:w(()=>[i.replyingComemnt?(v(),R(y,{key:0,comment:i.replyingComemnt,comments:i.comments,onToggleLike:o.toggleLike},null,8,["comment","comments","onToggleLike"])):(v(),$("h3",gFe,M(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 _Fe=de(QVe,[["render",vFe]]),yFe={name:"CourseOverview",props:["course","course_id"],components:{CourseComments:_Fe}},bFe={class:"fcom_cards fcom_cards_2"},wFe={class:"fcom_card"},CFe={class:"fcom_card_body"},kFe={class:"fcom_card"},xFe={class:"fcom_card_body"};function SFe(t,e,n,s,i,o){const r=H("course-comments");return v(),$(te,null,[g("div",bFe,[g("div",wFe,[g("div",CFe,[g("p",null,M(t.$t("Students")),1),g("h3",null,M(n.course.students_count),1)])]),g("div",kFe,[g("div",xFe,[g("p",null,M(t.$t("Average Completion Rate")),1),g("h3",null,M(n.course.overAllProgress)+"%",1)])])]),_(r,{course:n.course},null,8,["course"])],64)}const $Fe=de(yFe,[["render",SFe]]);var AFe=Wz,MFe=Bf,EFe="Expected a function";function TFe(t,e,n){var s=!0,i=!0;if(typeof t!="function")throw new TypeError(EFe);return MFe(n)&&(s="leading"in n?!!n.leading:s,i="trailing"in n?!!n.trailing:i),AFe(t,e,{leading:s,maxWait:e,trailing:i})}var PFe=TFe;const IFe=Ts(PFe),LFe={name:"ContentLayout",props:["title","content_class","wrapper_class"],data(){return{throttledScrollHandler:null,lastScrolledTop:0}},created(){this.throttledScrollHandler=IFe(t=>{t>this.lastScrolledTop?document.body.classList.add("fcom_scrolling-down"):document.body.classList.remove("fcom_scrolling-down"),this.lastScrolledTop=t,document.dispatchEvent(new CustomEvent("fcom_layout_scroll",{detail:{scrollTop:t}}))},1e3)},methods:{handleLayoutScroll(t){this.throttledScrollHandler(t.scrollTop)}},mounted(){window.fcomLayoutRef=this.$refs.layoutScrollbarRef}},OFe={key:0,class:"fhr_content_layout_header"},DFe={role:"region","aria-label":"Actions",class:"fhr_page_actions"};function RFe(t,e,n,s,i,o){const r=ui;return v(),$("div",{class:W([n.wrapper_class,"fhr_content_layout"])},[_(r,{"min-size":100,always:!0,noresize:!0,native:!0,onScroll:o.handleLayoutScroll,ref:"layoutScrollbarRef",height:"calc(100dvh - var(--fcom-header-height, 0px) - var(--fcom-mobile-menu-height, 0px))"},{default:w(()=>[ae(t.$slots,"header",{},()=>[n.title?(v(),$("div",OFe,[ae(t.$slots,"title",{},()=>[g("h1",{role:"region","aria-label":"Page Title",style:{cursor:"pointer"},onClick:e[0]||(e[0]=a=>t.$eventBus.emit("toTop")),class:"fhr_page_title"},M(n.title),1)]),g("div",DFe,[ae(t.$slots,"actions")])])):O("",!0)]),ae(t.$slots,"sub_header"),g("div",{class:W([n.content_class,"fhr_content_layout_body"])},[ae(t.$slots,"default")],2)]),_:3},8,["onScroll"])],2)}const Xs=de(LFe,[["render",RFe]]),VFe={name:"AppLayout",props:["wrapper_class"]},FFe={class:"feeds_main"};function NFe(t,e,n,s,i,o){const r=H("router-view");return v(),$("div",{class:W([n.wrapper_class,"feeds"])},[g("div",FFe,[ae(t.$slots,"before_route_view"),ae(t.$slots,"default",{},()=>[_(r)]),ae(t.$slots,"after_route_view")])],2)}const Ks=de(VFe,[["render",NFe]]),BFe={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 zFe(t,e,n,s,i,o){const r=xa,a=Ge,l=l1,c=H("CloseBold"),u=ye;return v(),$(te,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(()=>[ae(t.$slots,"trigger",{},()=>[ae(t.$slots,"default",{},()=>[i.imageUrl?(v(),R(r,{key:0,alt:t.$t("Image Preview"),src:i.imageUrl},null,8,["alt","src"])):(v(),R(a,{key:1,class:"fcom_btn_upload",text:""},{default:w(()=>[G(M(n.button_text||t.$t("Upload Image")),1)]),_:1}))])])]),_:3},8,["action","headers","multiple","data","on-success","on-error"]),i.imageUrl&&n.can_remove?(v(),R(a,{key:0,class:"fcom_bg_remove",text:"",size:"small",onClick:o.removeImage},{default:w(()=>[_(u,null,{default:w(()=>[_(c)]),_:1})]),_:1},8,["onClick"])):O("",!0)],64)}const Zb=de(BFe,[["render",zFe]]),HFe={name:"ImagePlaceholder"},UFe={width:"240",height:"240",viewBox:"0 0 240 240",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function jFe(t,e,n,s,i,o){return v(),$("svg",UFe,[...e[0]||(e[0]=[g("rect",{width:"240",height:"240",fill:"#F5F6F7"},null,-1),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)])])}const w5=de(HFe,[["render",jFe]]),WFe={name:"LockscreenPaywallMeta",components:{ImagePlaceholder:w5},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()}},YFe={key:0,class:"fcom_paywalls"},GFe={class:"fcom_paywall"},qFe={class:"fcom_select_photo",style:{float:"left"}},XFe=["src"],KFe={key:0,class:"fcom_description"},ZFe={class:"fcom_paywall_actions"},JFe={class:"fcom_color_input_wrap"},QFe={class:"fcom_color_input_wrap"},eNe={class:"fcom_color_input_wrap"},tNe={class:"fcom_color_input_wrap"};function nNe(t,e,n,s,i,o){const r=H("image-placeholder"),a=an,l=fb,c=Jt,u=H("Delete"),d=ye,h=Ge,f=Wt,p=vb,m=vt,b=en,y=Ht,C=rn,k=pd,x=gb;return v(),R(x,{modelValue:i.editTab,"onUpdate:modelValue":e[12]||(e[12]=S=>i.editTab=S)},{default:w(()=>[_(p,{label:t.$t("Paywalls"),name:"paywall"},{default:w(()=>[i.loading?(v(),R(f,{key:1,rows:2,animated:""})):(v(),$("div",YFe,[(v(!0),$(te,null,be(n.field.paywalls,(S,E)=>(v(),$("div",GFe,[_(c,{modelValue:n.field.paywalls[E],"onUpdate:modelValue":T=>n.field.paywalls[E]=T,placeholder:t.$t("Select Paywall")},{default:w(()=>[(v(!0),$(te,null,be(i.availablePaywalls,T=>(v(),R(l,{key:T.ID,label:T.post_title},{default:w(()=>[(v(!0),$(te,null,be(T.variants,P=>(v(),R(a,{key:P.id,value:P.id.toString(),label:P.variation_title,disabled:o.isPaywallAdded(P.id),class:"fcom_with_photo_option"},{default:w(()=>[g("span",qFe,[P.photo?(v(),$("img",{key:0,src:P.photo},null,8,XFe)):(v(),R(r,{key:1})),g("span",null,M(P.variation_title),1)])]),_:2},1032,["value","label","disabled"]))),128))]),_:2},1032,["label"]))),128))]),_:2},1032,["modelValue","onUpdate:modelValue","placeholder"]),_(d,{onClick:T=>o.removePaywall(S)},{default:w(()=>[_(u)]),_:1},8,["onClick"])]))),256)),!n.field.paywalls||Object.keys(n.field.paywalls).length<1?(v(),$("div",KFe,[g("p",null,M(t.$t("Please add paywall pricing options")),1)])):O("",!0),g("div",ZFe,[_(h,{style:{width:"100%"},class:"fcom_plain_button",onClick:o.initAddPaywall},{default:w(()=>[g("span",null,M("+ "+t.$t("Add Paywall")),1)]),_:1},8,["onClick"])])]))]),_:1},8,["label"]),_(p,{label:t.$t("Content"),name:"content"},{default:w(()=>[_(C,{onSubmit:e[2]||(e[2]=Be(S=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(b,{label:t.$t("Button Label")},{default:w(()=>[_(m,{modelValue:n.field.button_text,"onUpdate:modelValue":e[0]||(e[0]=S=>n.field.button_text=S),placeholder:t.$t("Button Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(b,null,{default:w(()=>[_(y,{modelValue:n.field.show_description,"onUpdate:modelValue":e[1]||(e[1]=S=>n.field.show_description=S),"true-value":"yes","false-value":"no"},{default:w(()=>[G(M(t.$t("Show Paywall Description")),1)]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["label"]),_(p,{label:t.$t("Design"),name:"design"},{default:w(()=>[_(C,{onSubmit:e[11]||(e[11]=Be(S=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(b,{label:t.$t("Background Color")},{default:w(()=>[g("div",JFe,[_(k,{predefine:t.appVars.suggestedColors,modelValue:n.field.background_color,"onUpdate:modelValue":e[3]||(e[3]=S=>n.field.background_color=S)},null,8,["predefine","modelValue"]),_(m,{modelValue:n.field.background_color,"onUpdate:modelValue":e[4]||(e[4]=S=>n.field.background_color=S)},null,8,["modelValue"])])]),_:1},8,["label"]),_(b,{label:t.$t("Text Color")},{default:w(()=>[g("div",QFe,[_(k,{predefine:t.appVars.suggestedColors,modelValue:n.field.text_color,"onUpdate:modelValue":e[5]||(e[5]=S=>n.field.text_color=S)},null,8,["predefine","modelValue"]),_(m,{modelValue:n.field.text_color,"onUpdate:modelValue":e[6]||(e[6]=S=>n.field.text_color=S)},null,8,["modelValue"])])]),_:1},8,["label"]),_(b,{label:t.$t("Button Label")},{default:w(()=>[g("div",eNe,[_(k,{predefine:t.appVars.suggestedColors,modelValue:n.field.button_text_color,"onUpdate:modelValue":e[7]||(e[7]=S=>n.field.button_text_color=S)},null,8,["predefine","modelValue"]),_(m,{modelValue:n.field.button_text_color,"onUpdate:modelValue":e[8]||(e[8]=S=>n.field.button_text_color=S)},null,8,["modelValue"])])]),_:1},8,["label"]),_(b,{label:t.$t("Button Background")},{default:w(()=>[g("div",tNe,[_(k,{predefine:t.appVars.suggestedColors,modelValue:n.field.button_color,"onUpdate:modelValue":e[9]||(e[9]=S=>n.field.button_color=S),"show-alpha":""},null,8,["predefine","modelValue"]),_(m,{modelValue:n.field.button_color,"onUpdate:modelValue":e[10]||(e[10]=S=>n.field.button_color=S)},null,8,["modelValue"])])]),_:1},8,["label"])]),_:1})]),_:1},8,["label"])]),_:1},8,["modelValue"])}const sNe=de(WFe,[["render",nNe]]),iNe={name:"LockscreenMeta",components:{BgImageUpload:Zb,LockscreenPaywallMeta:sNe},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"};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)}}},oNe={key:0,class:"fcom_lockscreen_meta"},rNe={class:"fcom_meta_section lockscreen_meta"},aNe={class:"fcom_description"},lNe={class:"fcom_meta_section lockscreen_meta"},cNe={class:"fcom_meta_label"},uNe={class:"fcom_meta_content"},dNe={class:"fcom_meta_block"},hNe={class:"fcom_block_label"},fNe={class:"fcom_meta_sorting"},pNe={class:"fcom_block_action"},mNe={key:1,class:"fcom_lockscreen_meta"},gNe={class:"fcom_edit_title"},vNe={class:"fcom_edit_content"},_Ne={class:"fcom_color_input_wrap"},yNe={class:"fcom_color_input_wrap"},bNe={class:"fcom_color_input_wrap"},wNe={class:"fcom_color_input_wrap"},CNe={class:"fcom_color_input_wrap"},kNe={key:1,class:"fcom_description"},xNe={key:2,class:"fcom_description"};function SNe(t,e,n,s,i,o){const r=ye,a=H("Top"),l=H("Bottom"),c=H("EditPen"),u=H("Hide"),d=H("View"),h=H("Back"),f=vt,p=en,m=Ht,b=rn,y=vb,C=H("BgImageUpload"),k=pd,x=gb,S=H("lockscreen-paywall-meta");return i.editing?(v(),$("div",mNe,[g("div",gNe,[_(r,{onClick:o.backToFields},{default:w(()=>[_(h)]),_:1},8,["onClick"]),g("p",null,M(t.$labelize(i.editingField.label)),1)]),g("div",vNe,[i.editingField.type=="image"?(v(),R(x,{key:0,modelValue:i.editTab,"onUpdate:modelValue":e[18]||(e[18]=E=>i.editTab=E)},{default:w(()=>[_(y,{label:t.$t("Content"),name:"content"},{default:w(()=>[_(b,{onSubmit:e[5]||(e[5]=Be(E=>t.doNothing(),["prevent"])),model:i.editingField,"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(p,{label:t.$t("Heading")},{default:w(()=>[_(f,{modelValue:i.editingField.heading,"onUpdate:modelValue":e[0]||(e[0]=E=>i.editingField.heading=E),placeholder:t.$t("Heading")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,{label:t.$t("Description")},{default:w(()=>[_(f,{modelValue:i.editingField.description,"onUpdate:modelValue":e[1]||(e[1]=E=>i.editingField.description=E),type:"textarea",placeholder:t.$t("Description")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,{label:t.$t("Button Label")},{default:w(()=>[_(f,{modelValue:i.editingField.button_text,"onUpdate:modelValue":e[2]||(e[2]=E=>i.editingField.button_text=E),placeholder:t.$t("Button Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,{label:t.$t("Button Link")},{default:w(()=>[_(f,{modelValue:i.editingField.button_link,"onUpdate:modelValue":e[3]||(e[3]=E=>i.editingField.button_link=E)},null,8,["modelValue"])]),_:1},8,["label"]),i.editingField.type=="image"?(v(),R(p,{key:0},{default:w(()=>[_(m,{modelValue:i.editingField.new_tab,"onUpdate:modelValue":e[4]||(e[4]=E=>i.editingField.new_tab=E),"true-value":"yes","false-value":"no"},{default:w(()=>[G(M(t.$t("Open in New Tab")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0)]),_:1},8,["model"])]),_:1},8,["label"]),_(y,{label:t.$t("Design"),name:"design"},{default:w(()=>[_(b,{onSubmit:e[17]||(e[17]=Be(E=>t.doNothing(),["prevent"])),model:i.editingField,"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(p,{label:t.$t("Background Image"),class:"fcom_bg_image"},{default:w(()=>[_(C,{modelValue:i.editingField.background_image,"onUpdate:modelValue":e[6]||(e[6]=E=>i.editingField.background_image=E),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"]),_(p,{label:t.$t("Overlay Color")},{default:w(()=>[g("div",_Ne,[_(k,{predefine:t.appVars.suggestedColors,modelValue:i.editingField.overlay_color,"onUpdate:modelValue":e[7]||(e[7]=E=>i.editingField.overlay_color=E)},null,8,["predefine","modelValue"]),_(f,{modelValue:i.editingField.overlay_color,"onUpdate:modelValue":e[8]||(e[8]=E=>i.editingField.overlay_color=E)},null,8,["modelValue"])])]),_:1},8,["label"]),_(p,{label:t.$t("Heading Color")},{default:w(()=>[g("div",yNe,[_(k,{predefine:t.appVars.suggestedColors,modelValue:i.editingField.heading_color,"onUpdate:modelValue":e[9]||(e[9]=E=>i.editingField.heading_color=E)},null,8,["predefine","modelValue"]),_(f,{modelValue:i.editingField.heading_color,"onUpdate:modelValue":e[10]||(e[10]=E=>i.editingField.heading_color=E)},null,8,["modelValue"])])]),_:1},8,["label"]),_(p,{label:t.$t("Text Color")},{default:w(()=>[g("div",bNe,[_(k,{predefine:t.appVars.suggestedColors,modelValue:i.editingField.text_color,"onUpdate:modelValue":e[11]||(e[11]=E=>i.editingField.text_color=E)},null,8,["predefine","modelValue"]),_(f,{modelValue:i.editingField.text_color,"onUpdate:modelValue":e[12]||(e[12]=E=>i.editingField.text_color=E)},null,8,["modelValue"])])]),_:1},8,["label"]),_(p,{label:t.$t("Button Label")},{default:w(()=>[g("div",wNe,[_(k,{predefine:t.appVars.suggestedColors,modelValue:i.editingField.button_text_color,"onUpdate:modelValue":e[13]||(e[13]=E=>i.editingField.button_text_color=E)},null,8,["predefine","modelValue"]),_(f,{modelValue:i.editingField.button_text_color,"onUpdate:modelValue":e[14]||(e[14]=E=>i.editingField.button_text_color=E)},null,8,["modelValue"])])]),_:1},8,["label"]),_(p,{label:t.$t("Button Background")},{default:w(()=>[g("div",CNe,[_(k,{predefine:t.appVars.suggestedColors,modelValue:i.editingField.button_color,"onUpdate:modelValue":e[15]||(e[15]=E=>i.editingField.button_color=E),"show-alpha":""},null,8,["predefine","modelValue"]),_(f,{modelValue:i.editingField.button_color,"onUpdate:modelValue":e[16]||(e[16]=E=>i.editingField.button_color=E)},null,8,["modelValue"])])]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["label"])]),_:1},8,["modelValue"])):i.editingField.type=="block"?(v(),$("div",kNe,M(t.$t("Edit the field from block editor ")),1)):i.editingField.type=="lesson"?(v(),$("div",xNe,M(t.$t("Edit lessons from lesson editor ")),1)):i.editingField.type=="paywall"?(v(),R(S,{key:3,field:i.editingField,space_id:n.space_id},null,8,["field","space_id"])):O("",!0)])])):(v(),$("div",oNe,[g("div",rNe,[g("div",aNe,[g("p",null,M(t.$t("This page is only visible to non-members viewing a private space.")),1)])]),g("div",lNe,[g("div",cNe,M(t.$t("Page Blocks")),1),g("div",uNe,[g("ul",dNe,[(v(!0),$(te,null,be(o.lockscreenFields,(E,T)=>(v(),$("li",{class:W(["fcom_block_list",{block_hidden:E.hidden}])},[g("div",hNe,[_(r,{class:"fcom_el_icon"},{default:w(()=>[(v(),R(Tt(o.getFieldIcon(E))))]),_:2},1024),g("p",null,M(t.$labelize(E.label)),1)]),g("div",fNe,[_(r,{onClick:P=>o.moveUp(T)},{default:w(()=>[_(a)]),_:1},8,["onClick"]),_(r,{onClick:P=>o.moveDown(T)},{default:w(()=>[_(l)]),_:1},8,["onClick"])]),g("div",pNe,[_(r,{onClick:P=>o.updateField(E)},{default:w(()=>[_(c)]),_:1},8,["onClick"]),E.hidden?(v(),R(r,{key:0,onClick:P=>o.toggleHidden(E)},{default:w(()=>[_(u)]),_:1},8,["onClick"])):(v(),R(r,{key:1,onClick:P=>o.toggleHidden(E)},{default:w(()=>[_(d)]),_:1},8,["onClick"]))])],2))),256))])])])]))}const $Ne=de(iNe,[["render",SNe]]),ANe={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 s=document.createElement("script");s.src=t,s.onload=e,s.onerror=n,document.head.append(s)})},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 s=document.createElement("link");s.rel="stylesheet",s.href=t,s.onload=e,s.onerror=n,document.head.append(s)})},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)}},MNe={class:"fcom_block_editor"};function ENe(t,e,n,s,i,o){const r=Wt;return v(),$("div",MNe,[Pe(g("div",null,[g("textarea",{ref:"block_editor",id:"fcom_block_editor",name:"block_editor"}," "+M(i.html)+` | |
| 133 | - `,513)],512),[[Xt,i.all_loaded]]),i.all_loaded?O("",!0):(v(),R(r,{key:0,class:"white_loaded",rows:7,animated:!0}))])}const Kz=de(ANe,[["render",ENe]]),TNe={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())}}},PNe={key:0,style:{display:"flex","justify-content":"center","align-items":"center","column-gap":"10px"}},INe=["element-loading-text"],LNe={ref:"iframeContainer",class:"iframe-container"};function ONe(t,e,n,s,i,o){const r=Ge,a=Wt,l=_t("loading");return v(),$(te,null,[o.notLoading?(v(),$("div",PNe,[e[2]||(e[2]=g("p",null,"Problem with loading the editor?",-1)),_(r,{onClick:e[0]||(e[0]=c=>o.editorFailed())},{default:w(()=>[...e[1]||(e[1]=[G("Use Alternative Editor",-1)])]),_:1})])):O("",!0),Pe((v(),$("div",{"element-loading-text":t.$t("Loading editor. Please wait...."),class:"editor-container"},[i.dataSent?O("",!0):(v(),R(a,{key:0,style:{margin:"50px"},animated:!0,rows:2})),g("div",LNe,null,512)],8,INe)),[[l,!i.dataSent]])],64)}const Zz=de(TNe,[["render",ONe],["__scopeId","data-v-03a63740"]]),DNe={name:"CircleIcon",props:{fill:{type:String,default:"currentColor"}}},RNe=["fill"];function VNe(t,e,n,s,i,o){return v(),$("svg",{fill:n.fill,width:"20",height:"20",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[...e[0]||(e[0]=[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)])],8,RNe)}const FNe=de(DNe,[["render",VNe]]),NNe={name:"LessonIcon"},BNe={width:"60",height:"48",viewBox:"0 0 60 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function zNe(t,e,n,s,i,o){return v(),$("svg",BNe,[...e[0]||(e[0]=[g("rect",{width:"60",height:"48",rx:"4",fill:"#F2F5F8"},null,-1),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)])])}const HNe=de(NNe,[["render",zNe]]),UNe={name:"PlayIcon"},jNe={width:"20",height:"19",viewBox:"0 0 20 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function WNe(t,e,n,s,i,o){return v(),$("svg",jNe,[...e[0]||(e[0]=[ya('<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)])])}const YNe=de(UNe,[["render",WNe]]),GNe={name:"PlayPlaceholderIcon"},qNe={width:"60",height:"48",viewBox:"0 0 60 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function XNe(t,e,n,s,i,o){return v(),$("svg",qNe,[...e[0]||(e[0]=[ya('<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)])])}const KNe=de(GNe,[["render",XNe]]),ZNe={name:"_LockscreenLessonEditor",components:{CircleIcon:FNe,LessonIcon:HNe,PlayIcon:YNe,PlayPlaceholderIcon:KNe},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,s)=>n+(s.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),s=t%60,i="";return e>0&&(i+=`${e}h `),n>0&&(i+=`${n}m `),s>0&&(i+=`${s}s`),i.trim()||null}}},JNe={class:"fcom_course_sections"},QNe={class:"fcom_course_intro"},eBe={class:"fcom_course_labels"},tBe={class:"fcom_course_info"},nBe={class:"fcom_card_sections"},sBe={class:"fcom_section_items"},iBe=["onClick"],oBe={class:"fcom_section_primary_item_title"},rBe={class:"title_line_container"},aBe={class:"title_line"},lBe={class:"fcom_meta_text"},cBe={key:0,class:"fcom_meta_text"},uBe={class:"fcom_section_primary_item_actions"},dBe=["onClick"],hBe={class:"fcom_heading_item clickable"},fBe={class:"lesson_feature_media"},pBe=["src","alt"],mBe=["src","alt"],gBe={class:"lesson_title"},vBe=["innerHTML"],_Be={class:"lesson_duration"},yBe={key:0},bBe={key:1},wBe=["innerHTML"];function CBe(t,e,n,s,i,o){const r=H("ArrowRight"),a=H("ArrowDown"),l=ye,c=H("CircleIcon"),u=H("Lock"),d=H("PlayPlaceholderIcon"),h=H("LessonIcon"),f=H("PlayIcon");return v(),$("div",JNe,[g("div",QNe,[g("div",eBe,[g("h3",null,M(t.$t("Course Content")),1),g("p",tBe,[G(M(t.$_n("%s Topic","%s Topics",o.sectionsCount))+" ",1),e[0]||(e[0]=g("span",null," • ",-1)),G(" "+M(t.$_n("%s Lesson","%s Lessons",o.lessonsCount)),1)])])]),g("div",nBe,[g("div",sBe,[(v(!0),$(te,null,be(n.sections,p=>(v(),$("div",{key:p.id,class:"fcom_section_primary"},[p.lessons.length?(v(),$("div",{key:0,onClick:m=>p.is_closed=!p.is_closed,class:W(["clickable fcom_section_primary_item",{is_closed:p.is_closed}])},[g("div",oBe,[g("div",rBe,[g("div",aBe,[g("h4",null,M(p.title),1)]),g("span",lBe,M(t.$t("%d lessons",p.lessons.length)),1),o.lessonDuration(p)?(v(),$("span",cBe," • "+M(o.lessonDuration(p)),1)):O("",!0)])]),g("div",uBe,[_(l,{class:"clickable"},{default:w(()=>[p.is_closed?(v(),R(r,{key:0,class:"fcom_arrow_icon"})):(v(),R(a,{key:1}))]),_:2},1024)])],10,iBe)):O("",!0),p.is_closed?O("",!0):(v(!0),$(te,{key:1},be(p.lessons,m=>(v(),$("div",{key:m.id,class:W(["fcom_section_item",{is_locked:!o.isFreePreview(m)}])},[g("div",{onClick:b=>o.maybeGotoLesson(m,p),class:"fcom_section_item_title"},[g("p",hBe,[_(l,null,{default:w(()=>[o.isFreePreview(m)?(v(),R(c,{key:0})):(v(),R(u,{key:1}))]),_:2},1024),o.isModernLayout?(v(),$(te,{key:0},[g("span",fBe,[m.featured_image?(v(),$("img",{key:0,src:m.featured_image,alt:m.title},null,8,pBe)):o.hasMediaImage(m)?(v(),$("img",{key:1,src:m.meta.media.image,alt:m.title},null,8,mBe)):o.hasMediaVideo(m)?(v(),R(d,{key:2})):(v(),R(h,{key:3})),o.showPlayIcon(m)?(v(),R(f,{key:4,class:"play_icon"})):O("",!0)]),g("span",gBe,[g("span",{innerHTML:m.title},null,8,vBe),g("span",_Be,[m.meta.video_length?(v(),$("span",yBe,M(o.formatSeconds(m.meta.video_length)),1)):(v(),$("span",bBe,M("---")))])])],64)):(v(),$("span",{key:1,innerHTML:m.title},null,8,wBe))])],8,dBe)],2))),128))]))),128))])])])}const kBe=de(ZNe,[["render",CBe]]),xBe={name:"LockscreenPaywallView",components:{ImagePlaceholder:w5},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(s=>String(s.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 s;const e=(s=t.other_info)==null?void 0:s.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()}},SBe={class:"fcom_paywall_cards"},$Be={class:"paywall_header"},ABe={class:"paywall_body"},MBe=["innerHTML"],EBe={key:0,class:"subscription"},TBe={class:"paywall_footer"},PBe={key:0,class:"fcom_mb_10"},IBe=["href"];function LBe(t,e,n,s,i,o){const r=Wt,a=a4,l=H("ImagePlaceholder");return v(),$("div",SBe,[i.loading?(v(),R(r,{key:0,rows:3,animated:!0})):(v(!0),$(te,{key:1},be(o.filteredPaywalls,c=>(v(),$("div",{key:c.id,class:"fcom_paywall",style:Ke(o.cardStyles)},[g("div",$Be,[c.photo?(v(),R(a,{key:0,src:c.photo},null,8,["src"])):(v(),R(a,{key:1},{default:w(()=>[_(l)]),_:1})),g("span",null,M(c.variation_title),1)]),g("div",ABe,[g("span",{innerHTML:c.total_price},null,8,MBe),o.isSubscriptionPaywall(c)?(v(),$("span",EBe," / "+M(o.getRepeatInterval(c)),1)):O("",!0)]),g("div",TBe,[n.field.show_description=="yes"&&(c!=null&&c.description)?(v(),$("span",PBe,M(c.description),1)):O("",!0),n.editable?Pe((v(),$("input",{key:1,class:"el-button fcom_primary_button link_button",style:Ke(o.buttonStyles),type:"text","onUpdate:modelValue":e[0]||(e[0]=u=>n.field.button_text=u)},null,4)),[[zu,n.field.button_text]]):(v(),$("a",{key:2,class:"el-button fcom_primary_button link_button",style:Ke(o.buttonStyles),href:c.checkout_url},M(n.field.button_text),13,IBe))])],4))),128))])}const OBe=de(xBe,[["render",LBe]]),DBe={name:"LockScreenEditor",props:["title","lockscreen","sections","saving","loading","space_id","settings"],emits:["save","close"],components:{LockscreenLessonEditor:kBe,MediaEmbeder:Xb,BlockEditor:Kz,LockscreenMeta:$Ne,LockscreenPaywallView:OBe,FullEditorFrame:Zz},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}}},RBe={class:"fcom_editor_topbar"},VBe={class:"fcom_editor_content"},FBe={class:"fcom_item"},NBe={class:"fcom_content"},BBe=["onBlur"],zBe=["onBlur"],HBe=["onBlur"],UBe={key:1,class:"fcom_content_wrap"},jBe={id:"fcomBlockContent"},WBe={key:2,class:"fcom_content_wrap"},YBe={key:3,class:"fcom_paywall_wrap"};function GBe(t,e,n,s,i,o){const r=H("lockscreen-meta"),a=r1,l=H("Lock"),c=ye,u=H("block-editor"),d=H("FullEditorFrame"),h=H("lockscreen-lesson-editor"),f=Wt,p=H("lockscreen-paywall-view"),m=ui,b=ba;return v(),$(te,null,[_(a,{class:"fcom_full_editor_side lockscreen_editor",width:"250px"},{default:w(()=>[ae(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(()=>[_(m,null,{default:w(()=>[g("div",RBe,[_(c,null,{default:w(()=>[_(l)]),_:1}),g("h3",null,M(n.title),1)]),g("div",VBe,[(v(!0),$(te,null,be(o.lockscreenFields,y=>{var C;return v(),$("div",FBe,[y.type=="image"?(v(),$("div",{key:0,class:"fcom_image_wrap",style:Ke(o.imageStyles(y))},[g("div",NBe,[g("h2",{style:Ke(o.headingStyles(y)),contenteditable:"true",onBlur:k=>o.updateHeading(k,y)},M(y.heading),45,BBe),y.description?(v(),$("p",{key:0,style:Ke(o.descriptionStyles(y)),contenteditable:"true",onBlur:k=>o.updateDescription(k,y)},M(y.description),45,zBe)):O("",!0),y.button_text?(v(),$("button",{key:1,class:"fcom_btn",style:Ke(o.buttonStyles(y)),contenteditable:"true",onBlur:k=>o.updateButtonLabel(k,y)},M(y.button_text),45,HBe)):O("",!0)])],4)):O("",!0),y.type=="block"?(v(),$("div",UBe,[g("div",jBe,[i.useClassic?(v(),R(u,{key:0,modelValue:y.content,"onUpdate:modelValue":k=>y.content=k},null,8,["modelValue","onUpdate:modelValue"])):(v(),R(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:y.content,"onUpdate:modelValue":k=>y.content=k},null,8,["onUseAlternateEditor","editorParams","modelValue","onUpdate:modelValue"]))])])):O("",!0),y.type=="lesson"?(v(),$("div",WBe,[n.loading?(v(),R(f,{key:1,rows:5,animated:!0})):(v(),R(h,{key:0,sections:n.sections,is_editor:!0,settings:n.settings},null,8,["sections","settings"]))])):O("",!0),y.type=="paywall"&&((C=y.paywalls)==null?void 0:C.length)>0?(v(),$("div",YBe,[_(p,{space_id:n.space_id,field:y,editable:!0},null,8,["space_id","field"])])):O("",!0)])}),256))])]),_:1})]),_:1})],64)}const Jz=de(DBe,[["render",GBe]]),qBe={name:"CourseLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:Jz},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()}},XBe={key:0,class:"fcom_lockscreen_meta"},KBe={class:"fcom_description"};function ZBe(t,e,n,s,i,o){const r=H("lock-screen-editor");return i.lockscreen?(v(),R(r,{key:0,title:n.spaceProfile.title,space_id:n.spaceProfile.id,settings:n.spaceProfile.settings,lockscreen:i.lockscreen,sections:i.sections,saving:i.saving,loading:i.loading,onSave:o.saveChanges,onClose:e[0]||(e[0]=a=>t.$emit("close"))},{before_meta:w(()=>[n.spaceProfile.settings.custom_lock_screen!="yes"?(v(),$("div",XBe,[g("div",KBe,[g("p",null,M(t.$t("__LOCK_SCRREN_DESC")),1)])])):O("",!0)]),_:1},8,["title","space_id","settings","lockscreen","sections","saving","loading","onSave"])):O("",!0)}const JBe=de(qBe,[["render",ZBe]]),QBe={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}},emits:["drop","crossDrop","drag-start"],data(){return{draggingIndex:null,startIndex:null,snapshotBeforeDrag:null}},methods:{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],s=this.items[e];if(n===s)return;const i=t.currentTarget.getBoundingClientRect(),o=i.top+i.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 s=t.dataTransfer.getData("text/plain");this.$emit("crossDrop",{itemKey:s,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)}}},eze=["onDragstart","onDragover","onDrop","draggable"];function tze(t,e,n,s,i,o){return v(),$("div",{class:"drag-container",onDragover:e[1]||(e[1]=Be((...r)=>o.onContainerDragOver&&o.onContainerDragOver(...r),["prevent"])),onDrop:e[2]||(e[2]=Be((...r)=>o.onContainerDrop&&o.onContainerDrop(...r),["prevent"]))},[_(Vy,{name:"flip-list",tag:"div",class:"drag-group",style:Ke(n.gap?{display:"flex",flexDirection:"column",gap:n.gap}:{})},{default:w(()=>[(v(!0),$(te,null,be(n.items,(r,a)=>(v(),$("div",{key:r[n.rowKey],onDragstart:l=>o.dragStart(l,a),onDragend:e[0]||(e[0]=(...l)=>o.dragEnd&&o.dragEnd(...l)),onDragover:Be(l=>o.dragOver(l,a),["prevent"]),onDrop:Be(l=>o.dropEnd(l,a),["prevent"]),draggable:n.draggable,class:W(["drag-item",n.itemClass,{dragging:i.draggingIndex===a}]),style:Ke(n.itemStyle)},[ae(t.$slots,"item",{data:r,index:a},void 0,!0)],46,eze))),128))]),_:3},8,["style"])],32)}const P1=de(QBe,[["render",tze],["__scopeId","data-v-97dc50e4"]]),nze={name:"MenuGroupSettings",components:{SpaceCourseSelector:v5,FluentDnD:P1,LogoEmojiSelector:d1,Drawer:k4},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:{validateLinkForm(){if(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"){const t=f1(this.editingItem.permalink);t.valid||this.urlErrors.push(...t.errors)}return this.urlErrors.length===0},initEditLink(t,e="create"){!t.is_system&&!t.privacy&&(t.privacy="public",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()}}},sze={key:0,class:"fcom_section_primary"},ize={class:"fcom_section_primary_item"},oze={class:"fcom_section_primary_item_title"},rze={class:"fcom_heading_item"},aze={class:"fcom_section_item_actions"},lze={class:"fcom_section_items menu-items-container"},cze={key:0,style:{padding:"1rem"}},uze={class:"fcom_section_item_title"},dze={class:"fcom_heading_item"},hze={key:0,class:"community_avatar"},fze=["src"],pze={key:1,class:"fcom_emoji"},mze={key:2,class:"fcom_shape"},gze=["innerHTML"],vze={class:"fcom_section_item_actions"},_ze={key:0},yze={key:1},bze={key:0},wze={class:"fcom_help_text"},Cze={class:"fcom_help_text"};function kze(t,e,n,s,i,o){const r=Ge,a=ye,l=xo,c=H("FluentDnD"),u=H("logo-emoji-selector"),d=vt,h=en,f=Ht,p=ko,m=Ps,b=H("SpaceCourseSelector"),y=Tc,C=rn,k=H("drawer");return v(),$(te,null,[n.menuItems?(v(),$("div",sze,[g("div",ize,[g("div",oze,[g("div",rze,[ae(t.$slots,"title",{},()=>[g("h4",null,M(n.title),1)])])]),g("div",aze,[_(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=x=>o.initEditLink({enabled:"yes",privacy:"public",membership_ids:[],new_tab:"yes"}))},{default:w(()=>[G(M(t.$t("Add New Link")),1)]),_:1})])]),g("div",lze,[n.menuItems.length?O("",!0):(v(),$("div",cze,[g("p",null,M(t.$t("No link has been added for this section")),1)])),_(c,{items:n.menuItems,"row-key":"slug",onDrop:o.drop,"item-class":"fcom_section_item"+(n.saving?"":" fcom_cursor_move"),"item-style":"padding: 15px 15px 15px 35px"},{item:w(({data:x,index:S})=>[g("div",uze,[g("p",dze,[n.use_icon_selector?(v(),$(te,{key:0},[e[12]||(e[12]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),x.icon_image?(v(),$("div",hze,[_(a,null,{default:w(()=>[g("img",{alt:"",style:{"max-width":"16px","max-height":"16px"},src:x.icon_image},null,8,fze)]),_:2},1024)])):x.emoji?(v(),$("span",pze,M(x.emoji),1)):x.shape_svg?(v(),$("span",mze,[_(a,{innerHTML:x.shape_svg},null,8,["innerHTML"])])):O("",!0)],64)):x.icon_svg?(v(),R(a,{key:1},{default:w(()=>[g("span",{innerHTML:x.icon_svg},null,8,gze)]),_:2},1024)):O("",!0),g("span",null,M(x.title),1),x.is_unavailable=="yes"?(v(),R(l,{key:2,type:"danger"},{default:w(()=>[G(M(t.$t("unavailable")),1)]),_:1})):x.enabled=="yes"?(v(),R(l,{key:3,type:"success"},{default:w(()=>[G(M(t.$t("enabled")),1)]),_:1})):(v(),R(l,{key:4,type:"info"},{default:w(()=>[G(M(t.$t("disabled")),1)]),_:1}))])]),g("div",vze,[g("div",null,[_(r,{onClick:E=>o.initEditLink(x,"edit"),size:"small"},{default:w(()=>[G(M(t.$t("Edit")),1)]),_:1},8,["onClick"]),x.is_system!="yes"?(v(),R(r,{key:0,onClick:E=>o.removeLink(S),type:"danger",plain:"",size:"small"},{default:w(()=>[G(M(t.$t("Delete")),1)]),_:1},8,["onClick"])):O("",!0)])])]),_:1},8,["items","onDrop","item-class"])])])):O("",!0),_(k,{modelValue:i.openEditLinkDrawer,"onUpdate:modelValue":e[11]||(e[11]=x=>i.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(()=>[i.mode==="edit"?(v(),$("h4",_ze,M(t.$t("Edit Link")),1)):(v(),$("h4",yze,M(t.$t("Add Custom Link")),1))]),default:w(()=>[i.editingItem?(v(),$("div",bze,[_(C,{onSubmit:e[10]||(e[10]=Be(x=>t.doNothing(),["prevent"])),"label-position":"top",disabled:n.saving},{default:w(()=>[_(h,{label:t.$t("Name of the Link")},{default:w(()=>[_(d,{disabled:n.saving,placeholder:t.$t("Public Name of the item"),modelValue:i.editingItem.title,"onUpdate:modelValue":e[2]||(e[2]=x=>i.editingItem.title=x)},Es({_:2},[n.use_icon_selector?{name:"prepend",fn:w(()=>[_(u,{custom_svg:n.custom_svg,fallback_mark:"<span style='font-size: 20px;'>☺</span>",onUpdate:e[1]||(e[1]=x=>{n.saving||(i.editingItem.emoji=x.emoji,i.editingItem.icon_image=x.logo,i.editingItem.shape_svg=x.shape_svg)}),config:{logo:i.editingItem.icon_image,emoji:i.editingItem.emoji||"",shape_svg:i.editingItem.shape_svg||""}},null,8,["custom_svg","config"])]),key:"0"}:void 0]),1032,["disabled","placeholder","modelValue"])]),_:1},8,["label"]),_(h,{label:t.$t("URL")},{default:w(()=>[_(d,{disabled:n.saving||i.editingItem.is_system=="yes",type:"text",placeholder:t.$t("URL or path (e.g. https://example.com or /members)"),modelValue:i.editingItem.permalink,"onUpdate:modelValue":e[3]||(e[3]=x=>i.editingItem.permalink=x)},null,8,["disabled","placeholder","modelValue"]),g("div",wze,[g("p",null,M(t.$t("For internal links, start with / (e.g. /members).")),1)])]),_:1},8,["label"]),n.has_svg?(v(),R(h,{key:0,label:t.$t("SVG Code for Icon (Simplified SVG Code) / Emoji")},{default:w(()=>[_(d,{disabled:n.saving,placeholder:t.$t("SVG Code. No url please / You can use emoji"),type:"textarea",rows:3,modelValue:i.editingItem.icon_svg,"onUpdate:modelValue":e[4]||(e[4]=x=>i.editingItem.icon_svg=x)},null,8,["disabled","placeholder","modelValue"])]),_:1},8,["label"])):O("",!0),n.has_enable_disable?(v(),R(h,{key:1,style:{"margin-bottom":"5px"}},{default:w(()=>[_(f,{disabled:n.saving,"true-value":"yes","false-value":"no",modelValue:i.editingItem.enabled,"onUpdate:modelValue":e[5]||(e[5]=x=>i.editingItem.enabled=x),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Enable this link")),1)]),_:1},8,["disabled","modelValue"])]),_:1})):O("",!0),i.editingItem.is_system?O("",!0):(v(),$(te,{key:2},[_(h,null,{default:w(()=>[_(f,{disabled:n.saving,"true-value":"yes","false-value":"no",modelValue:i.editingItem.new_tab,"onUpdate:modelValue":e[6]||(e[6]=x=>i.editingItem.new_tab=x),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Open this link in a new tab.")),1)]),_:1},8,["disabled","modelValue"])]),_:1}),_(h,{label:t.$t("Visibility")},{default:w(()=>[_(m,{disabled:n.saving,modelValue:i.editingItem.privacy,"onUpdate:modelValue":e[7]||(e[7]=x=>i.editingItem.privacy=x)},{default:w(()=>[_(p,{label:t.$t("Everyone"),value:"public"},null,8,["label"]),_(p,{label:t.$t("Logged-in only"),value:"logged_in"},null,8,["label"]),_(p,{label:t.$t("Public only"),value:"logged_out_only"},null,8,["label"]),_(p,{label:t.$t("By Space/Course Memberships"),value:"members_only"},null,8,["label"])]),_:1},8,["disabled","modelValue"]),g("div",Cze,M(t.$t("Select who can see this link.")),1)]),_:1},8,["label"]),i.editingItem.privacy=="members_only"?(v(),R(h,{key:0,label:t.$t("Select Space/Course Memberships")},{default:w(()=>[_(b,{disabled:n.saving,modelValue:i.editingItem.membership_ids,"onUpdate:modelValue":e[8]||(e[8]=x=>i.editingItem.membership_ids=x),placeholder_text:t.$t("Select Memberships"),is_multiple:!0},null,8,["disabled","modelValue","placeholder_text"])]),_:1},8,["label"])):O("",!0)],64)),i.urlErrors.length?(v(),R(y,{key:i.validationAttempt,type:"warning",closable:!0,"show-icon":"",style:{margin:"8px 0"}},{title:w(()=>[g("div",null,[g("ul",null,[(v(!0),$(te,null,be(i.urlErrors,(x,S)=>(v(),$("li",{style:{"margin-bottom":"0"},key:S},M(x),1))),128))])])]),_:1})):O("",!0),_(h,null,{default:w(()=>[_(r,{disabled:n.saving,class:"fcom_primary_button",onClick:e[9]||(e[9]=x=>o.createOrUpdateLink())},{default:w(()=>[G(M(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 Qz=de(nze,[["render",kze]]),xze={name:"ManageSpaceLinks",components:{MenuGroupSettings:Qz},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})}}},Sze={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},$ze={class:"fcom_card_sections"};function Aze(t,e,n,s,i,o){const r=H("menu-group-settings"),a=ui,l=ba;return v(),R(l,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(a,null,{default:w(()=>[g("div",Sze,[g("div",$ze,[_(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 eH=de(xze,[["render",Aze]]),Mze={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 s;this.products.push(n.product),this.productID=(s=n.product)==null?void 0:s.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}).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()}},Eze={class:"fcom_topic_selector"},Tze={class:"fcom_select_photo",style:{float:"left"}},Pze=["src","alt"],Ize=["innerHTML"];function Lze(t,e,n,s,i,o){const r=an,a=Jt,l=H("Plus"),c=ye,u=Ge,d=vt,h=en,f=rn,p=Ii,m=or,b=_t("loading");return v(),R(m,{"modal-class":"fcom_common_dialog",class:"fcom_high_drawer",size:t.drawerWidth,modelValue:o.addPaywallModal,"onUpdate:modelValue":e[6]||(e[6]=y=>o.addPaywallModal=y),"close-on-click-modal":!1,visible:o.addPaywallModal,direction:"rtl"},{header:w(()=>[g("h4",null,M(t.$t("Add Paywall")),1)]),default:w(()=>[_(f,{onSubmit:e[5]||(e[5]=Be(y=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(h,null,{default:w(()=>[g("div",Eze,[Pe((v(),R(a,{style:{width:"100%"},modelValue:i.productID,"onUpdate:modelValue":e[0]||(e[0]=y=>i.productID=y),filterable:"",clearable:"",remote:"",loading:i.fetchingProducts,"remote-method":o.searchProducts,placeholder:t.$t("Search Product")},{default:w(()=>[(v(!0),$(te,null,be(i.products,y=>(v(),R(r,{key:y.id,label:y.title,value:y.id,disabled:o.isProductAdded(y.id),class:"fcom_with_photo_option"},{default:w(()=>[g("span",Tze,[g("img",{src:y.image,alt:y.title},null,8,Pze),g("span",null,M(y.title),1)]),g("span",{style:{float:"right",color:"#8492a6","font-size":"13px"},innerHTML:y.price},null,8,Ize)]),_:2},1032,["label","value","disabled"]))),128))]),_:1},8,["modelValue","loading","remote-method","placeholder"])),[[b,i.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,M(t.$t("New")),1)]),_:1})]),default:w(()=>[_(f,{modelValue:i.newPaywall,"onUpdate:modelValue":e[4]||(e[4]=y=>i.newPaywall=y),"label-position":"top"},{default:w(()=>[_(h,{label:t.$t("Title")},{default:w(()=>[_(d,{modelValue:i.newPaywall.title,"onUpdate:modelValue":e[1]||(e[1]=y=>i.newPaywall.title=y),placeholder:t.$t("Title of the product")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(h,{label:t.$t("Price")},{default:w(()=>[_(d,{modelValue:i.newPaywall.price,"onUpdate:modelValue":e[2]||(e[2]=y=>i.newPaywall.price=y),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]=y=>o.createProduct()),loading:i.creatingProduct,disabled:i.creatingProduct},{default:w(()=>[G(M(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:i.saving,onClick:o.addPaywall},{default:w(()=>[G(M(t.$t("Add")),1)]),_:1},8,["loading","onClick"])]),_:1})]),_:1})]),_:1},8,["size","modelValue","visible"])}const Oze=de(Mze,[["render",Lze]]),Dze={name:"ManagePaywalls",components:{ImagePlaceholder:w5,AddPaywallModal:Oze},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()}},Rze={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},Vze={class:"fcom_card_sections"},Fze={class:"fcom_card_section_heading"},Nze={class:"fcom_section_primary_item_title"},Bze={class:"fcom_heading_item"},zze={key:0,class:"fcom_section_item_actions"},Hze={class:"fcom_section_primary"},Uze={class:"fcom_section_primary_item"},jze={class:"fcom_section_primary_item_title"},Wze={class:"fcom_heading_item"},Yze={class:"fcom_shape"},Gze={class:"fcom_section_item_actions"},qze=["href"],Xze=["href"],Kze={class:"fcom_section_items"},Zze={class:"fcom_section_item_title"},Jze={class:"fcom_heading_item"},Qze={class:"fcom_shape"},eHe={class:"fcom_section_item_actions"},tHe=["innerHTML"],nHe={key:2,style:{padding:"1rem"}},sHe={key:1,class:"fcom_section_item"},iHe={class:"fcom_section_primary"},oHe={class:"fcom_section_primary_item"},rHe=["disabled"],aHe={class:"dialog_header"},lHe={class:"dialog_left"},cHe={class:"dialog_body"},uHe={style:{"text-align":"center"}},dHe={class:"fcom_heading_item",style:{"justify-content":"center"}},hHe={class:"fcom_shape"},fHe={style:{margin:"1rem 0px 0.8rem"}},pHe={class:"dialog_footer"};function mHe(t,e,n,s,i,o){const r=Ge,a=Wt,l=a4,c=H("MoreFilled"),u=ye,d=Ca,h=ka,f=wa,p=H("ImagePlaceholder"),m=ui,b=ba,y=H("AddPaywallModal"),C=Ht,k=Ss,x=_t("loading");return v(),$(te,null,[_(b,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(m,null,{default:w(()=>[g("div",Rze,[g("div",Vze,[g("div",Fze,[g("div",Nze,[g("div",Bze,[ae(t.$slots,"title",{},()=>[g("h4",null,M(t.$t("Manage Paywalls")),1)])])]),i.hasFluentCart?(v(),$("div",zze,[_(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=S=>o.initAddPaywall())},{default:w(()=>[G(M(t.$t("Add Paywall")),1)]),_:1})])):O("",!0)]),i.hasFluentCart?(v(),$(te,{key:0},[i.loading||i.removing?(v(),R(a,{key:0,class:"white_loaded",rows:5,animated:!0})):i.paywalls.length?(v(!0),$(te,{key:1},be(i.paywalls,S=>(v(),$("div",{class:"fcom_section_item",key:S.ID},[g("div",Hze,[g("div",Uze,[g("div",jze,[g("h4",Wze,[g("span",Yze,[_(l,{src:S==null?void 0:S.thumbnail},null,8,["src"])]),g("span",null,M((S==null?void 0:S.post_title)||""),1)])]),g("div",Gze,[_(f,{trigger:"click","popper-class":"fcom_pop_action"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,null,{default:w(()=>[g("a",{href:S==null?void 0:S.view_url,target:"_blank",rel:"noopener"},M(t.$t("View Product")),9,qze)]),_:2},1024),_(d,null,{default:w(()=>[g("a",{href:S==null?void 0:S.admin_url,target:"_blank",rel:"noopener"},M(t.$t("Edit Product")),9,Xze)]),_:2},1024),_(d,{type:"danger",onClick:E=>o.initRemovePaywall(S)},{default:w(()=>[G(M(t.$t("Delete Paywall")),1)]),_:1},8,["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",Kze,[(v(!0),$(te,null,be(S.variants,E=>(v(),$("div",{class:"fcom_section_item",key:E.id},[g("div",Zze,[g("div",Jze,[g("span",Qze,[E.photo?(v(),R(l,{key:0,src:E.photo},null,8,["src"])):(v(),R(l,{key:1},{default:w(()=>[_(p)]),_:1}))]),g("span",null,M(E.variation_title),1)])]),g("div",eHe,[g("span",{class:"fcom_price",innerHTML:E.total_price},null,8,tHe),_(f,{trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{onClick:T=>o.copyCheckoutUrl(E.checkout_url)},{default:w(()=>[G(M(t.$t("Copy Checkout URL")),1)]),_:1},8,["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(),$("div",nHe,[g("p",null,M(t.$t("No paywall has been added yet")),1)]))],64)):(v(),$("div",sHe,[g("div",iHe,[g("div",oHe,[g("span",null,[G(M(t.$t("To monetize your ")+o.spaceType+", ")+" ",1),Pe((v(),$("a",{disabled:i.installing,onClick:e[1]||(e[1]=(...S)=>o.installPlugin&&o.installPlugin(...S)),class:"fcom_link"},[G(M(t.$t("click here")),1)],8,rHe)),[[x,i.installing]]),G(" "+M(t.$t("to install and activate FluentCart.")),1)])])])]))])])]),_:3})]),_:3}),i.addPaywallModal?(v(),R(y,{key:0,modelValue:i.addPaywallModal,"onUpdate:modelValue":e[2]||(e[2]=S=>i.addPaywallModal=S),spaceProfile:n.spaceProfile,onAdded:o.paywallAdded},null,8,["modelValue","spaceProfile","onAdded"])):O("",!0),_(k,{"modal-class":"fcom_common_dialog","close-on-click-modal":!1,"append-to-body":!0,width:t.drawerWidth,modelValue:i.removePaywallModal,"onUpdate:modelValue":e[5]||(e[5]=S=>i.removePaywallModal=S),direction:"rtl",onClose:e[6]||(e[6]=S=>i.removePaywallModal=!1)},{header:w(()=>[g("div",aHe,[g("div",lHe,[g("h4",null,M(t.$t("Delete Paywall")),1)])])]),footer:w(()=>[g("div",pHe,[_(r,{class:"fcom_primary_button",disabled:i.removing,onClick:o.deletePaywall},{default:w(()=>[G(M(t.$t("Delete")),1)]),_:1},8,["disabled","onClick"]),_(r,{class:"fcom_secondary_button",onClick:e[4]||(e[4]=S=>i.removePaywallModal=!1)},{default:w(()=>[G(M(t.$t("Cancel")),1)]),_:1})])]),default:w(()=>{var S,E;return[g("div",cHe,[g("div",uHe,[g("h4",dHe,[g("span",hHe,[_(l,{src:(S=i.removePaywall)==null?void 0:S.thumbnail},null,8,["src"])]),g("span",null,M((E=i.removePaywall)==null?void 0:E.post_title),1)]),g("p",fHe,M(t.$t("Are you sure you want to delete this paywall? This action cannot be undone.")),1),_(C,{modelValue:i.revokeAccess,"onUpdate:modelValue":e[3]||(e[3]=T=>i.revokeAccess=T),"true-value":"yes","false-value":"no"},{default:w(()=>[G(M(t.$t("Also remove the this space from the product integration?")),1)]),_:1},8,["modelValue"])])])]}),_:1},8,["width","modelValue"])],64)}const tH=de(Dze,[["render",mHe]]),gHe={name:"CourseCustomizer",props:["course"],emits:["close","completed"],components:{ManageSpaceLinks:eH,CourseLockscreen:JBe,CreateCourseForm:g5,ManagePaywalls:tH},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_course:1}})},unmounted(){const t={...this.$route.query};delete t.customize_course,this.$router.push({query:t})}},vHe={key:0,class:"fcom_full_editor"},_He={class:"fcom_full_editor_header"},yHe={class:"fcom_editor_menu object_menu"},bHe={class:"fcom_space_menu_ul"},wHe={class:"full_editor_actions"},CHe={style:{"max-width":"800px",margin:"0 auto"}};function kHe(t,e,n,s,i,o){const r=H("ArrowLeft"),a=ye,l=Ge,c=a1,u=H("create-course-form"),d=ui,h=ba,f=H("course-lockscreen"),p=H("manage-space-links"),m=H("manage-paywalls"),b=o1,y=_t("loading");return n.course.id?(v(),$("div",vHe,[_(b,null,{default:w(()=>[_(c,{class:"fcom_full_editor_header_wrap"},{default:w(()=>{var C;return[g("div",_He,[g("div",{onClick:e[0]||(e[0]=k=>t.$emit("completed")),class:"fcom_back_header"},[_(a,null,{default:w(()=>[_(r)]),_:1}),G(" "+M(n.course.title),1)]),g("div",yHe,[g("ul",bHe,[g("li",{onClick:e[1]||(e[1]=k=>i.currentTab="general")},[g("a",{class:W({"router-link-exact-active":i.currentTab==="general"}),href:"#"},M(t.$t("General Settings")),3)]),g("li",{onClick:e[2]||(e[2]=k=>i.currentTab="paywalls")},[g("a",{class:W({"router-link-exact-active":i.currentTab==="paywalls"}),href:"#"},M(t.$t("Paywalls")),3)]),n.course.privacy=="private"&&((C=n.course.settings)==null?void 0:C.custom_lock_screen)=="yes"?(v(),$("li",{key:0,onClick:e[3]||(e[3]=k=>i.currentTab="lock_screen")},[g("a",{class:W({"router-link-exact-active":i.currentTab==="lock_screen"}),href:"#"},M(t.$t("Lock Screen")),3)])):O("",!0),g("li",{onClick:e[4]||(e[4]=k=>i.currentTab="manage_links")},[g("a",{class:W({"router-link-exact-active":i.currentTab==="manage_links"}),href:"#"},M(t.$t("Course Links")),3)])])]),g("div",wHe,[Pe((v(),R(l,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveChanges,bg:""},{default:w(()=>[G(M(!i.hasPro&&i.currentTab=="lock_screen"?t.$t("Save Changes (Pro Required)"):t.$t("Save Changes & Close")),1)]),_:1},8,["disabled","onClick"])),[[y,i.saving]])])])]}),_:1}),_(b,{class:"fcom_full_editor_container editor_customizer_container"},{default:w(()=>[i.currentTab=="general"?(v(),R(h,{key:0,class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(d,null,{default:w(()=>[g("div",CHe,[_(u,{onClose:e[5]||(e[5]=C=>t.$emit("close")),savingCount:i.savingCount,course:n.course},null,8,["savingCount","course"])])]),_:1})]),_:1})):i.currentTab=="lock_screen"?(v(),R(f,{key:1,savingCount:i.savingCount,spaceProfile:n.course,onClose:e[6]||(e[6]=C=>t.$emit("close"))},null,8,["savingCount","spaceProfile"])):i.currentTab=="manage_links"?(v(),R(p,{key:2,savingCount:i.savingCount,onClose:e[7]||(e[7]=C=>t.$emit("close")),spaceProfile:n.course},null,8,["savingCount","spaceProfile"])):i.currentTab=="paywalls"?(v(),R(m,{key:3,savingCount:i.savingCount,onClose:e[8]||(e[8]=C=>t.$emit("close")),spaceProfile:n.course},null,8,["savingCount","spaceProfile"])):O("",!0)]),_:1})]),_:1})])):O("",!0)}const nH=de(gHe,[["render",kHe]]),xHe={name:"EditCourseRoute",components:{CourseCustomizer:nH,AppLayout:Ks,Layout:Xs},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)}},SHe={class:"object_menu"},$He={class:"fcom_space_menu_ul"},AHe={key:0},MHe={class:"actions_items"},EHe={key:0,class:"white_loaded"},THe={key:2},PHe={key:0};function IHe(t,e,n,s,i,o){const r=Iue,a=Pue,l=H("router-link"),c=H("MoreFilled"),u=ye,d=Ge,h=Ii,f=Wt,p=H("router-view"),m=H("layout"),b=H("app-layout"),y=H("course-customizer");return v(),$(te,null,[_(b,{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(()=>[G(M(t.$t("Courses")),1)]),_:1}),i.course.id?(v(),R(r,{key:0},{default:w(()=>[G(M(i.course.title)+" ",1),t.hasCourseCreatorAccess()?(v(),$("span",{key:0,class:"fcom_edit_course fcom_secondary_button clickable",onClick:e[0]||(e[0]=C=>{i.customizeCourse=!0})},M(t.$t("Edit Info")),1)):O("",!0)]),_:1})):O("",!0)]),_:1})]),actions:w(()=>[g("div",SHe,[g("ul",$He,[(v(!0),$(te,null,be(o.computedMenuItems,C=>(v(),$("li",{key:C.name,class:W("course_inner_menu_"+C.name)},[_(l,{to:{name:C.route,params:{course_id:i.course.id}}},{default:w(()=>[G(M(C.title),1)]),_:2},1032,["to"])],2))),128)),t.hasCourseCreatorAccess()?(v(),$("li",AHe,[_(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",MHe,[g("li",{onClick:e[1]||(e[1]=C=>o.toViewCourse())},M(t.$t("View Course")),1),g("li",{onClick:e[2]||(e[2]=()=>{t.$refs.course_actions.hide(),i.customizeCourse=!0})},M(t.$t("Edit Course")),1),g("li",{onClick:e[3]||(e[3]=(...C)=>o.initDuplicateCourse&&o.initDuplicateCourse(...C))},M(t.$t("Duplicate Course")),1),g("li",{onClick:e[4]||(e[4]=(...C)=>o.initDeleteCourse&&o.initDeleteCourse(...C))},M(t.$t("Delete Course")),1)])]),_:1},512)])):O("",!0)])])]),default:w(()=>[i.loading?(v(),$("div",EHe,[_(f,{loading:i.loading,animation:"pulse",row:"10"},null,8,["loading"])])):i.course.id?(v(),R(p,{key:1,course:i.course},null,8,["course"])):(v(),$("div",THe,[g("h3",null,M(t.$t("Sorry, the course cannot be loaded")),1)]))]),_:1},8,["title"])]),_:1}),i.customizeCourse&&i.course.id?(v(),$("div",PHe,[(v(),R(va,{to:"body"},[_(y,{course:i.course,onClose:e[5]||(e[5]=C=>{i.customizeCourse=null,o.fetchCourse()}),onCompleted:e[6]||(e[6]=C=>{i.customizeCourse=null,o.fetchCourse()})},null,8,["course"])]))])):O("",!0)],64)}const LHe=de(xHe,[["render",IHe]]),OHe={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||"")}},DHe={class:"fcom_length_input"};function RHe(t,e,n,s,i,o){const r=vt;return v(),$("div",DHe,[_(r,{type:"number",modelValue:i.muinutes,"onUpdate:modelValue":e[0]||(e[0]=a=>i.muinutes=a),onChange:o.updateLength,min:0,max:1444,size:"small"},{append:w(()=>[G(M(t.$t("min")),1)]),_:1},8,["modelValue","onChange"]),_(r,{type:"number",modelValue:i.seconds,"onUpdate:modelValue":e[1]||(e[1]=a=>i.seconds=a),onChange:o.updateLength,min:0,max:59,size:"small"},{append:w(()=>[G(M(t.$t("sec")),1)]),_:1},8,["modelValue","onChange"])])}const VHe=de(OHe,[["render",RHe]]),FHe={name:"LessonDocuments",components:{DocumentLists:M1,DocumentsUploader:Yz},props:["lesson"],methods:{fileAdded(t){this.lesson.meta.document_ids=this.lesson.meta.document_lists||[],this.lesson.meta.document_lists.push(t)}}},NHe={class:"fcom_meta_section fcom_lesson_documents_form"},BHe={class:"fcom_meta_label"},zHe={style:{"font-size":"90%",padding:"0px",margin:"0 0 15px","line-height":"120%"}},HHe={key:0,class:"fcom_lesson_documents_list"},UHe={key:1,class:"fcom_lesson_documents_list"};function jHe(t,e,n,s,i,o){const r=H("documents-uploader"),a=H("document-lists");return v(),$("div",NHe,[g("div",BHe,M(t.$t("Documents & Files")),1),g("p",zHe,M(t.$t("These files will be available to your students to view and download")),1),t.has_pro?(v(),$("div",HHe,[_(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(),$("div",UHe,[g("p",null,M(t.$t("You need to upgrade to Pro to upload documents")),1)]))])}const sH=de(FHe,[["render",jHe]]),WHe={name:"CourseMeta",components:{LessonDocuments:sH,MediaEmbeder:Xb,LengthInput:VHe,BgImageUpload:Zb},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"}}},YHe={class:"fcom_course_meta"},GHe={class:"fcom_meta_section"},qHe={class:"fcom_meta_label"},XHe={class:"fcom_meta_content"},KHe={key:2,class:"checkbox_with_tooltip"},ZHe={key:0},JHe={key:1,class:"checkbox_with_tooltip"},QHe={key:0,class:"fcom_meta_section"},eUe={class:"fcom_meta_label"},tUe={class:"fcom_meta_content"},nUe={key:1,class:"fcom_meta_section"},sUe={class:"fcom_meta_label"},iUe={class:"fcom_edit_lesson_documents"};function oUe(t,e,n,s,i,o){var b;const r=Ht,a=H("InfoFilled"),l=ye,c=di,u=vt,d=H("media-embeder"),h=H("length-input"),f=H("BgImageUpload"),p=en,m=H("LessonDocuments");return v(),$("div",YHe,[g("div",GHe,[g("div",qHe,M(t.$t("Features Settings")),1),g("div",XHe,[_(r,{modelValue:n.lesson.meta.enable_media,"onUpdate:modelValue":e[0]||(e[0]=y=>n.lesson.meta.enable_media=y),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Enable Video Embed")),1)]),_:1},8,["modelValue"]),o.showCommentsDisabled?(v(),R(r,{key:0,disabled:!0,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Comments are disabled for this course")),1)]),_:1})):(v(),R(r,{key:1,modelValue:n.lesson.meta.enable_comments,"onUpdate:modelValue":e[1]||(e[1]=y=>n.lesson.meta.enable_comments=y),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Enable Comments")),1)]),_:1},8,["modelValue"])),n.quiz_meta?O("",!0):(v(),$("div",KHe,[_(r,{modelValue:n.lesson.meta.free_preview_lesson,"onUpdate:modelValue":e[2]||(e[2]=y=>n.lesson.meta.free_preview_lesson=y),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Free Preview Lesson"))+" ",1),t.has_pro?O("",!0):(v(),$("span",ZHe,"("+M(t.$t("Available on Pro"))+")",1))]),_:1},8,["modelValue","disabled"]),_(c,{class:"box-item",effect:"dark",placement:"right-end"},{content:w(()=>[G(M(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(),$(te,{key:3},[_(r,{modelValue:n.lesson.meta.enable_passing_score,"onUpdate:modelValue":e[3]||(e[3]=y=>n.lesson.meta.enable_passing_score=y),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Set a passing grade")),1)]),_:1},8,["modelValue"]),o.enablePassingScore?(v(),R(u,{key:0,modelValue:n.lesson.meta.passing_score,"onUpdate:modelValue":e[4]||(e[4]=y=>n.lesson.meta.passing_score=y),min:10,max:100,step:1,type:"number",class:"fcom_input_number",placeholder:"80"},{append:w(()=>[...e[9]||(e[9]=[G("%",-1)])]),_:1},8,["modelValue"])):O("",!0),o.enablePassingScore?(v(),$("div",JHe,[_(r,{modelValue:n.lesson.meta.enforce_passing_score,"onUpdate:modelValue":e[5]||(e[5]=y=>n.lesson.meta.enforce_passing_score=y),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Enforce pass to continue")),1)]),_:1},8,["modelValue"]),_(c,{class:"box-item",effect:"dark",placement:"right-end"},{content:w(()=>[G(M(t.$t("If enabled, members will have to achieve a minimum score before")),1),e[10]||(e[10]=g("br",null,null,-1)),G(" "+M(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]=y=>n.lesson.meta.hide_result=y),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Hide answers on result page")),1)]),_:1},8,["modelValue"])],64)):O("",!0)])]),((b=n.lesson.meta)==null?void 0:b.enable_media)=="yes"?(v(),$("div",QHe,[n.lesson.meta.enable_media=="yes"?(v(),R(d,{key:0,style:{margin:"0"},media:n.lesson.meta.media},null,8,["media"])):O("",!0),g("div",eUe,M(t.$t("Lesson Duration")),1),g("div",tUe,[_(h,{modelValue:n.lesson.meta.video_length,"onUpdate:modelValue":e[7]||(e[7]=y=>n.lesson.meta.video_length=y)},null,8,["modelValue"])])])):O("",!0),n.quiz_meta?(v(),$("div",nUe,[g("div",sUe,M(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]=y=>n.lesson.meta.featured_image_id=y),can_remove:!0},null,8,["modelValue"])]),_:1})])):O("",!0),g("div",iUe,[_(m,{lesson:n.lesson},null,8,["lesson"])])])}const iH=de(WHe,[["render",oUe]]),rUe={name:"LessonEditor",props:["lesson","section","course","editingIndex"],emits:["saved","close","changeLesson"],components:{LessonDocuments:sH,BlockEditor:Kz,MediaEmbeder:Xb,LessonMeta:iH,FullEditorFrame:Zz},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 s=new CustomEvent("fluentcommunity:lesson:after_save",{detail:n});this.$refs.fullEditorFrame.editorFrame.contentWindow.dispatchEvent(s);return}}catch(s){console.warn("Could not dispatch event to iframe:",s)}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")}},aUe={class:"fcom_full_editor"},lUe={class:"fcom_full_editor_header"},cUe={class:"fcom_desktop_only"},uUe={key:0},dUe={class:"full_editor_actions"},hUe={class:"fcom_lesson_camp"},fUe={class:"fcom_lesson_nav"},pUe=["title","href"],mUe={style:{padding:"20px"}},gUe={class:"fcom_lesson_content"},vUe={key:0},_Ue={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},yUe={class:"fcom_lesson_title"},bUe={class:"fcom_documents_dialog_footer"};function wUe(t,e,n,s,i,o){const r=H("ArrowLeft"),a=ye,l=Ge,c=H("ArrowRight"),u=H("arrow-down"),d=Ca,h=ka,f=wa,p=H("View"),m=a1,b=H("lesson-meta"),y=ui,C=r1,k=vt,x=H("block-editor"),S=H("FullEditorFrame"),E=ba,T=o1,P=H("LessonDocuments"),I=Ss,L=_t("loading");return v(),$("div",aUe,[_(T,null,{default:w(()=>[_(m,{class:"fcom_full_editor_header_wrap"},{default:w(()=>[g("div",lUe,[g("div",{onClick:e[0]||(e[0]=V=>t.$emit("close")),class:"fcom_back_header"},[_(a,{class:"fcom_arrow_icon"},{default:w(()=>[_(r)]),_:1}),g("span",cUe,M(t.$t("Back to Lessons")),1),n.course&&n.course.title?(v(),$("span",uUe,"("+M(n.course.title)+")",1)):O("",!0)]),g("div",dUe,[g("div",hUe,[g("div",null,M(t.$t("Lesson %1$s of %2$s - %3$s",n.editingIndex+1,n.section.lessons.length,n.section.title)),1),g("div",fUe,[_(l,{onClick:e[1]||(e[1]=V=>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]=V=>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&&!i.showSideBar?(v(),R(l,{key:0,text:"",onClick:e[3]||(e[3]=V=>i.showSideBar=!i.showSideBar)},{default:w(()=>[g("span",null,M(t.$t("Features")),1)]),_:1})):O("",!0),_(f,{onCommand:e[4]||(e[4]=V=>{n.lesson.status=V}),trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"draft"},{default:w(()=>[G(M(t.$t("Draft")),1)]),_:1}),_(d,{command:"published"},{default:w(()=>[G(M(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[_(l,{type:n.lesson.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:w(()=>[G(M(t.$labelize(n.lesson.status))+" ",1),_(a,{class:"el-icon--right"},{default:w(()=>[_(u)]),_:1})]),_:1},8,["type"])]),_:1}),Pe((v(),R(l,{style:{"margin-left":"15px"},disabled:i.saving,onClick:o.saveData,class:"fcom_primary_button"},{default:w(()=>[G(M(t.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[L,i.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,pUe)])])]),_:1}),_(T,{class:"fcom_full_editor_container fcom_lesson_editor_full"},{default:w(()=>[i.useClassic?Pe((v(),R(C,{key:0,style:{padding:"0"},class:"fcom_full_editor_side",width:"300px"},{default:w(()=>[_(y,{height:"calc(100vh - 60px)"},{default:w(()=>[g("div",mUe,[_(b,{course:n.course,lesson:n.lesson},null,8,["course","lesson"]),t.isMobile?(v(),R(l,{key:0,size:"small",onClick:e[5]||(e[5]=V=>i.showSideBar=!1)},{default:w(()=>[_(a,{class:"fcom_arrow_icon"},{default:w(()=>[_(r)]),_:1}),g("span",null,M(t.$t("Close")),1)]),_:1})):O("",!0)])]),_:1})]),_:1},512)),[[Xt,i.showSideBar||!t.isMobile]]):O("",!0),_(E,{style:{overflow:"hidden",padding:"0"},class:"fcom_full_editor_main"},{default:w(()=>[O("",!0),g("div",gUe,[i.useClassic?(v(),$("div",vUe,[_(y,{height:"calc(100vh - 60px)",class:"fcom_lesson_editor_scroll"},{default:w(()=>[g("div",_Ue,[g("div",yUe,[g("label",null,M(t.$t("Lesson Title")),1),_(k,{type:"text",class:"fcom_input_h1",modelValue:n.lesson.title,"onUpdate:modelValue":e[7]||(e[7]=V=>n.lesson.title=V),size:"large",placeholder:t.$t("Lesson Title")},null,8,["modelValue","placeholder"])]),g("label",null,M(t.$t("Lesson Content")),1),_(x,{modelValue:n.lesson.message,"onUpdate:modelValue":e[8]||(e[8]=V=>n.lesson.message=V)},null,8,["modelValue"])])]),_:1})])):(v(),R(S,{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]=V=>{n.lesson.title=V}),onMetaUpdated:e[10]||(e[10]=V=>{n.lesson.meta=V}),featured_image_id:n.lesson.meta.featured_image_id||"",onFeaturedMediaUpdated:e[11]||(e[11]=V=>{n.lesson.meta.featured_image_id=V}),onManageDocuments:e[12]||(e[12]=V=>i.showDocumentsModal=!0),modelValue:n.lesson.message,"onUpdate:modelValue":e[13]||(e[13]=V=>n.lesson.message=V)},null,8,["onUseAlternateEditor","editorParams","documentTitle","metaSettings","featured_image_id","modelValue"]))])]),_:1})]),_:1})]),_:1}),_(I,{modelValue:i.showDocumentsModal,"onUpdate:modelValue":e[15]||(e[15]=V=>i.showDocumentsModal=V),title:t.$t("Documents & Files"),width:"600px","close-on-click-modal":!1,onClosed:o.onDocumentsModalClosed,class:"fcom_documents_dialog"},{footer:w(()=>[g("div",bUe,[_(l,{type:"primary",onClick:e[14]||(e[14]=V=>i.showDocumentsModal=!1)},{default:w(()=>[G(M(t.$t("Done")),1)]),_:1})])]),default:w(()=>[_(P,{lesson:n.lesson},null,8,["lesson"])]),_:1},8,["modelValue","title","onClosed"])])}const oH=de(rUe,[["render",wUe]]),CUe={name:"LessonLine",emits:["showEditor","updated","deleteLesson","moveLesson"],props:["course","sections","lesson"],components:{LessonEditor:oH,SlugInput:_d},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"}},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==="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")})}}},kUe={key:0,class:"fcom_heading_item"},xUe=["innerHTML"],SUe={class:"fcom_section_item_actions"},$Ue={class:"fcom_action_lesson"},AUe={class:"fcom_move_popup_close"},MUe={class:"fcom_move_popup_close"};function EUe(t,e,n,s,i,o){const r=xo,a=Ge,l=vt,c=H("arrow-down"),u=ye,d=Ca,h=ka,f=wa,p=H("MoreFilled"),m=an,b=Jt,y=en,C=rn,k=H("Close"),x=H("slug-input");return v(),$(te,null,[g("div",{class:W([{fcom_title_editing:i.editing_title},"fcom_section_item_title fcom_title_editable"])},[ae(t.$slots,"before_section_heading"),i.editing_title?(v(),R(l,{key:1,onKeydown:e[1]||(e[1]=$t(S=>i.editing_title=!1,["esc"])),ref:"lesson_title_edit",onKeyup:$t(o.updateLessonTitle,["enter"]),modelValue:n.lesson.title,"onUpdate:modelValue":e[2]||(e[2]=S=>n.lesson.title=S)},{append:w(()=>[_(a,{onClick:o.updateLessonTitle},{default:w(()=>[G(M(t.$t("Save")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeyup","modelValue"])):(v(),$("p",kUe,[g("span",{onClick:e[0]||(e[0]=S=>t.$emit("showEditor",n.lesson)),innerHTML:n.lesson.title},null,8,xUe),o.isQuizType?(v(),R(r,{key:0},{default:w(()=>[G(M(t.$t("quiz")),1)]),_:1})):O("",!0)]))],2),g("div",SUe,[_(a,{onClick:e[3]||(e[3]=S=>t.$emit("showEditor",n.lesson)),class:"fcom_show_hover",text:""},{default:w(()=>[G(M(o.isQuizType?t.$t("Edit Quiz"):t.$t("Edit Lesson")),1)]),_:1}),_(f,{onCommand:e[4]||(e[4]=S=>{o.updateLessonStatus(S)}),trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"draft"},{default:w(()=>[G(M(t.$t("Draft")),1)]),_:1}),_(d,{command:"published"},{default:w(()=>[G(M(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[_(a,{class:W(["el-dropdown-link",`fcom_button_${n.lesson.status==="published"?"success":"info"}`]),bg:"",text:""},{default:w(()=>[G(M(t.$labelize(n.lesson.status))+" ",1),_(u,{class:"el-icon--right"},{default:w(()=>[_(c)]),_:1})]),_:1},8,["class"])]),_:1}),g("div",$Ue,[_(f,{onCommand:o.handleLessonAction,trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"edit_lesson"},{default:w(()=>[G(M(t.$t("Edit Lesson Content")),1)]),_:1}),_(d,{command:"edit_title"},{default:w(()=>[G(M(t.$t("Edit Title")),1)]),_:1}),_(d,{command:"edit_slug"},{default:w(()=>[G(M(t.$t("Edit Slug")),1)]),_:1}),_(d,{command:"preview_lesson"},{default:w(()=>[G(M(t.$t("Preview Lesson")),1)]),_:1}),_(d,{command:"move_lesson"},{default:w(()=>[G(M(t.$t("Move Lesson")),1)]),_:1}),_(d,{command:"delete"},{default:w(()=>[G(M(t.$t("Delete Lesson")),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"]),Pe(g("div",{class:W(["fcom_action_lesson_popup","lesson_"+n.lesson.id])},[_(C,{onSubmit:e[6]||(e[6]=Be(S=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(y,{label:t.$t("Move to a different Section")},{default:w(()=>[_(b,{placeholder:t.$t("Select Section"),modelValue:i.selectedSectionId,"onUpdate:modelValue":e[5]||(e[5]=S=>i.selectedSectionId=S)},{default:w(()=>[(v(!0),$(te,null,be(o.filteredSections,S=>(v(),R(m,{key:S.id,label:S.title,value:S.id},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),_(a,{onClick:o.moveLesson,disabled:!i.selectedSectionId,class:"fcom_primary_button"},{default:w(()=>[G(M(t.$t("Move Lesson")),1)]),_:1},8,["onClick","disabled"])]),_:1}),g("div",AUe,[_(u,{onClick:e[7]||(e[7]=S=>i.showMoveLessonPopup=!1)},{default:w(()=>[_(k)]),_:1})])],2),[[Xt,i.showMoveLessonPopup]]),Pe(g("div",{class:W(["fcom_edit_slug_popup","lesson_"+n.lesson.id])},[_(C,{onSubmit:e[9]||(e[9]=Be(S=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(y,{label:t.$t("Slug (optional)")},{default:w(()=>[_(x,{modelValue:n.lesson.slug,"onUpdate:modelValue":e[8]||(e[8]=S=>n.lesson.slug=S),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(()=>[G(M(t.$t("Save")),1)]),_:1},8,["onClick"])]),_:1}),g("div",MUe,[_(u,{onClick:e[10]||(e[10]=S=>i.editingSlugPopup=!1)},{default:w(()=>[_(k)]),_:1})])],2),[[Xt,i.editingSlugPopup]])])])],64)}const TUe=de(CUe,[["render",EUe]]),PUe={name:"AddQuestionModal",components:{CrepeEditor:Sd,BgImageUpload:Zb},emits:["close","addQuestion","updateQuestion"],props:{lesson:{type:Object,required:!0},question:{type:Object,required:!1}},data(){return{showModal:!0,appReady:!1,questionData:null,CloseBoldIcon:Ki(Lx),questionTypes:this.appVars.question_types,newQuestion:{slug:"",type:"single_choice",label:"",image_url:"",enabled:!0,image_enabled:!1,help_text:"",options:[{label:"Option 1",is_correct:!0},{label:"Option 2",is_correct:!1}]}}},watch:{showModal(){this.$emit("close")},"questionData.type":{handler(t,e){t=="single_choice"&&e=="multiple_choice"&&this.questionData.options.forEach((n,s)=>{n.is_correct=s===0})},deep:!0}},computed:{isRemovable(){return this.questionData.options.length>1},isSingleChoice(){return this.questionData.type=="single_choice"},isNewQuestion(){return!this.question}},methods:{addQuestion(){this.checkValidation()&&(this.showModal=!1,this.$emit("addQuestion",this.questionData))},updateQuestion(){this.checkValidation()&&(this.showModal=!1,this.$emit("updateQuestion",this.questionData))},addNewOption(){const t=this.questionData.options.length;this.questionData.options.push({label:`Option ${t+1}`,is_correct:!1})},removeOption(t){this.questionData.options.splice(t,1)},checkOption(t){this.isSingleChoice&&this.questionData.options.forEach(e=>{e.label!==t.label&&(e.is_correct=!1)})},checkValidation(){if(!this.has_pro)return!1;const{label:t,options:e}=this.questionData,s=[{valid:!!t&&t.trim()!=="",message:this.$t("Please enter a question")},{valid:Array.isArray(e)&&e.length>=2,message:this.$t("Please add at least 2 options")},{valid:e&&e.every(i=>i.label&&i.label.trim()!==""),message:this.$t("Please enter a label for each option")},{valid:e&&e.some(i=>i.is_correct===!0),message:this.$t("Please select the correct option")}].find(i=>!i.valid);return s?(this.$handleError(s.message),!1):!0}},mounted(){this.questionData=this.isNewQuestion?this.newQuestion:this.question,this.$nextTick(()=>{this.appReady=!0})}},IUe={class:"dialog_header"},LUe={class:"dialog_left"},OUe={class:"dialog_body"},DUe={class:"fcom_choices question_choices"},RUe=["onClick"],VUe={class:"fcom_choice_btn"},FUe={key:0,class:"fcom_banner_image_holder"},NUe={key:1,class:"fcom_banner_image_preview"},BUe={class:"sub_label"},zUe={class:"dialog_footer"},HUe={key:0};function UUe(t,e,n,s,i,o){const r=en,a=gd,l=H("BgImageUpload"),c=xa,u=H("CloseBold"),d=ye,h=Ge,f=H("crepe-editor"),p=Ht,m=vt,b=BR,y=rn,C=Ss;return v(),R(C,{modelValue:i.showModal,"onUpdate:modelValue":e[8]||(e[8]=k=>i.showModal=k),width:t.modalWidth,"modal-class":"fcom_common_dialog question_dialog","align-center":!0,"close-on-click-modal":!1,"close-on-press-escape":!1},{header:w(()=>[g("div",IUe,[g("div",LUe,[g("h4",null,M(o.isNewQuestion?t.$t("Add Question"):t.$t("Edit Question")),1)])])]),footer:w(()=>[g("div",zUe,[_(h,{class:"fcom_secondary_button",onClick:e[7]||(e[7]=k=>i.showModal=!1)},{default:w(()=>[G(M(t.$t("Cancel")),1)]),_:1}),o.isNewQuestion?(v(),R(h,{key:0,class:"fcom_primary_button",onClick:o.addQuestion},{default:w(()=>[G(M(t.$t("Add Question")),1)]),_:1},8,["onClick"])):(v(),R(h,{key:1,class:"fcom_primary_button",onClick:o.updateQuestion},{default:w(()=>[G(M(t.$t("Update Question"))+" ",1),t.has_pro?O("",!0):(v(),$("span",HUe," ("+M(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"]))])]),default:w(()=>[g("div",OUe,[_(y,{onSubmit:e[6]||(e[6]=Be(k=>t.doNothing(),["prevent"])),"label-position":"top",model:i.questionData},{default:w(()=>[_(r,{label:t.$t("Type")},{default:w(()=>[g("div",DUe,[(v(!0),$(te,null,be(i.questionTypes,k=>(v(),$("div",{key:k.value,onClick:x=>i.questionData.type=k.value,class:W({fcom_choice:!0,fcom_choice_active:i.questionData.type==k.value})},[g("div",VUe,[g("p",null,M(t.$t(k.label)),1)])],10,RUe))),128))])]),_:1},8,["label"]),_(r,{label:t.$t("Image")},{default:w(()=>[_(a,{class:"fcom_question_switch",modelValue:i.questionData.image_enabled,"onUpdate:modelValue":e[0]||(e[0]=k=>i.questionData.image_enabled=k)},null,8,["modelValue"]),i.questionData.image_enabled&&!i.questionData.image_url?(v(),$("div",FUe,[g("h4",null,M(t.$t("Banner Image")),1),g("p",null,M(t.$t("Upload a banner image at the top of the question. Recommended image dimension: 1080x420")),1),_(l,{modelValue:i.questionData.image_url,"onUpdate:modelValue":e[1]||(e[1]=k=>i.questionData.image_url=k)},null,8,["modelValue"])])):i.questionData.image_enabled&&i.questionData.image_url?(v(),$("div",NUe,[_(c,{alt:t.$t("Image Preview"),src:i.questionData.image_url},null,8,["alt","src"]),_(h,{class:"fcom_secondary_button",text:"",onClick:e[2]||(e[2]=k=>i.questionData.image_url="")},{default:w(()=>[_(d,null,{default:w(()=>[_(u)]),_:1})]),_:1})])):O("",!0)]),_:1},8,["label"]),_(r,{label:t.$t("Question")},{default:w(()=>[i.appReady?(v(),R(f,{key:0,modelValue:i.questionData.label,"onUpdate:modelValue":e[3]||(e[3]=k=>i.questionData.label=k),placeholder:t.$t("Write your question here")},null,8,["modelValue","placeholder"])):O("",!0)]),_:1},8,["label"]),_(r,{label:t.$t("Responses"),class:"fcom_question_options"},{default:w(()=>[g("span",BUe,M(t.$t("Select correct answer")),1),(v(!0),$(te,null,be(i.questionData.options,(k,x)=>(v(),$("div",{key:x,class:"fcom_question_option"},[_(p,{modelValue:k.is_correct,"onUpdate:modelValue":S=>k.is_correct=S,onChange:S=>o.checkOption(k),value:k.label,class:W({single_choice:o.isSingleChoice})},null,8,["modelValue","onUpdate:modelValue","onChange","value","class"]),_(m,{modelValue:k.label,"onUpdate:modelValue":S=>k.label=S,type:"text"},null,8,["modelValue","onUpdate:modelValue"]),o.isRemovable?(v(),R(b,{key:0,type:"danger",title:t.$t("Remove"),icon:i.CloseBoldIcon,underline:!1,onClick:S=>o.removeOption(x)},null,8,["title","icon","onClick"])):O("",!0)]))),128)),_(b,{type:"primary",underline:!1,onClick:o.addNewOption},{default:w(()=>[G(M("+ "+t.$t("Add new option")),1)]),_:1},8,["onClick"])]),_:1},8,["label"]),_(r,{label:t.$t("Help Text")},{default:w(()=>[_(m,{modelValue:i.questionData.help_text,"onUpdate:modelValue":e[4]||(e[4]=k=>i.questionData.help_text=k),type:"text"},null,8,["modelValue"])]),_:1},8,["label"]),_(r,{label:t.$t("Status")},{default:w(()=>[_(p,{modelValue:i.questionData.enabled,"onUpdate:modelValue":e[5]||(e[5]=k=>i.questionData.enabled=k)},{default:w(()=>[G(M(t.$t("Enable this question")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model"])])]),_:1},8,["modelValue","width"])}const jUe=de(PUe,[["render",UUe]]),WUe={name:"QuizEditor",props:["lesson","section","course","editingIndex"],emits:["saved","close","changeLesson"],components:{LessonMeta:iH,CrepeEditor:Sd,AddQuestionModal:jUe,Edit:wO,SwitchButton:Coe},data(){return{saving:!1,showSideBar:!1,appReady:!1,showQuestionModal:!1,question:null}},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()},openEditQuestionModal(t){this.question=t,this.showQuestionModal=!0},openAddQuestionModal(){this.has_pro&&(this.question=null,this.showQuestionModal=!0)},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},moveDown(t){var n,s;if(t==((s=(n=this.lesson.meta)==null?void 0:n.quiz_questions)==null?void 0:s.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},addQuestion(t){Array.isArray(this.lesson.meta.quiz_questions)||(this.lesson.meta.quiz_questions=[]),this.lesson.meta.quiz_questions.push({...t}),this.saveData()},updateQuestion(t){var e,n,s;this.lesson.meta.quiz_questions=(s=(n=(e=this.lesson)==null?void 0:e.meta)==null?void 0:n.quiz_questions)==null?void 0:s.map(i=>i.slug==t.slug?t:i),this.saveData()},checkAndSaveQuestion(t,e){if(!t.enabled){e.is_correct=!e.is_correct;return}if(t.type=="single_choice"){if(!e.is_correct){e.is_correct=!0;return}t.options.forEach(n=>{n.label!==e.label&&(n.is_correct=!1)})}if(t.type=="multiple_choice"&&!t.options.filter(s=>s.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,s;this.lesson.meta.quiz_questions=(s=(n=(e=this.lesson)==null?void 0:e.meta)==null?void 0:n.quiz_questions)==null?void 0:s.filter(i=>i.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.lesson.meta,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.$emit("saved",e.lesson)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}},beforeUnmount(){document.body.classList.remove("fcom-no-scroll")},mounted(){document.body.classList.add("fcom-no-scroll"),this.$nextTick(()=>{this.appReady=!0})}},YUe={class:"fcom_full_editor"},GUe={class:"fcom_full_editor_header"},qUe={class:"fcom_desktop_only"},XUe={key:0},KUe={class:"full_editor_actions"},ZUe={class:"fcom_lesson_camp"},JUe={class:"fcom_lesson_nav"},QUe=["title","href"],eje={class:"fcom_lesson_content"},tje={class:"fcom_quiz_editor"},nje={class:"fcom_questions_wrap"},sje={key:0,class:"fcom_question_image"},ije={class:"fcom_question_header"},oje=["innerHTML","onClick"],rje={class:"fcom_question_body"},aje={class:"fcom_question_options"},lje={key:0,class:"question_help_text"},cje={key:1,class:"fcom_meta_sorting"},uje={key:1,class:"fcom_banner_image_holder add_quiz_banner"},dje={key:0},hje={key:0},fje={style:{padding:"20px"}};function pje(t,e,n,s,i,o){const r=H("ArrowLeft"),a=ye,l=Ge,c=H("ArrowRight"),u=H("arrow-down"),d=Ca,h=ka,f=wa,p=H("View"),m=a1,b=vt,y=H("crepe-editor"),C=xa,k=H("MoreFilled"),x=H("SwitchButton"),S=H("Edit"),E=H("Delete"),T=Ht,P=H("Top"),I=H("Bottom"),L=ui,V=ba,D=H("lesson-meta"),z=r1,Y=H("AddQuestionModal"),B=o1,U=_t("loading");return v(),$("div",YUe,[_(B,null,{default:w(()=>[_(m,{class:"fcom_full_editor_header_wrap"},{default:w(()=>{var X;return[g("div",GUe,[g("div",{onClick:e[0]||(e[0]=K=>t.$emit("close")),class:"fcom_back_header"},[_(a,{class:"fcom_arrow_icon"},{default:w(()=>[_(r)]),_:1}),g("span",qUe,M(t.$t("Back to Lessons")),1),(X=n.course)!=null&&X.title?(v(),$("span",XUe,"("+M(n.course.title)+")",1)):O("",!0)]),g("div",KUe,[g("div",ZUe,[g("div",null,M(t.$t("Lesson %1$s of %2$s - %3$s",n.editingIndex+1,n.section.lessons.length,n.section.title)),1),g("div",JUe,[_(l,{onClick:e[1]||(e[1]=K=>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]=K=>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&&!i.showSideBar?(v(),R(l,{key:0,text:"",onClick:e[3]||(e[3]=K=>i.showSideBar=!i.showSideBar)},{default:w(()=>[g("span",null,M(t.$t("Features")),1)]),_:1})):O("",!0),_(f,{onCommand:e[4]||(e[4]=K=>{n.lesson.status=K}),trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"draft"},{default:w(()=>[G(M(t.$t("Draft")),1)]),_:1}),_(d,{command:"published"},{default:w(()=>[G(M(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[_(l,{type:n.lesson.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:w(()=>[G(M(t.$labelize(n.lesson.status))+" ",1),_(a,{class:"el-icon--right"},{default:w(()=>[_(u)]),_:1})]),_:1},8,["type"])]),_:1}),Pe((v(),R(l,{style:{"margin-left":"15px"},disabled:i.saving,onClick:o.saveData,class:"fcom_primary_button"},{default:w(()=>[G(M(t.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[U,i.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,QUe)])])]}),_:1}),_(B,{class:"fcom_full_editor_container fcom_lesson_editor_full"},{default:w(()=>[_(V,{style:{overflow:"hidden",padding:"0"},class:"fcom_full_editor_main"},{default:w(()=>[g("div",eje,[_(L,{height:"calc(100vh - 60px)",class:"fcom_lesson_editor_scroll"},{default:w(()=>{var X,K;return[g("div",tje,[_(b,{modelValue:n.lesson.title,"onUpdate:modelValue":e[5]||(e[5]=N=>n.lesson.title=N),placeholder:t.$t("Title")},null,8,["modelValue","placeholder"]),i.appReady?(v(),R(y,{key:0,modelValue:n.lesson.message,"onUpdate:modelValue":e[6]||(e[6]=N=>n.lesson.message=N),autofocus:!0,placeholder:t.$t("Describe about this quiz")+"...",disable_media:!0},null,8,["modelValue","placeholder"])):O("",!0),g("div",nje,[(v(!0),$(te,null,be(n.lesson.meta.quiz_questions,(N,F)=>(v(),$("div",{key:N.slug,class:W(["fcom_question",{disabled:!N.enabled}])},[o.showQuestionImage(N)?(v(),$("div",sje,[_(C,{src:N.image_url},null,8,["src"])])):O("",!0),g("div",ije,[g("div",{innerHTML:N.label_rendered,onClick:Q=>o.openEditQuestionModal(N),style:{cursor:"pointer"}},null,8,oje),_(f,{trigger:"click",class:"fcom_question_actions"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{onClick:Q=>o.toggleQuestion(N)},{default:w(()=>[_(a,null,{default:w(()=>[_(x)]),_:1}),g("span",null,M(o.getStatusText(N)),1)]),_:2},1032,["onClick"]),_(d,{onClick:Q=>o.openEditQuestionModal(N)},{default:w(()=>[_(a,null,{default:w(()=>[_(S)]),_:1}),G(" "+M(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(d,{onClick:Q=>o.openDeleteQuestionPrompt(N.slug)},{default:w(()=>[_(a,null,{default:w(()=>[_(E)]),_:1}),G(" "+M(t.$t("Delete")),1)]),_:1},8,["onClick"])]),_:2},1024)]),default:w(()=>[_(l,{"aria-label":t.$t("Hide Banner"),class:"fcom_dot_menu",size:"small",text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(k)]),_:1})]),_:1},8,["aria-label"])]),_:2},1024)]),g("div",rje,[g("div",aje,[(v(!0),$(te,null,be(N.options,Q=>(v(),$("div",{key:Q.label,class:"fcom_question_option"},[_(T,{modelValue:Q.is_correct,"onUpdate:modelValue":ie=>Q.is_correct=ie,onChange:ie=>o.checkAndSaveQuestion(N,Q),class:W({single_choice:N.type=="single_choice"})},{default:w(()=>[G(M(Q.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","class"])]))),128))]),N.help_text?(v(),$("div",lje,M(N.help_text),1)):O("",!0)]),o.showMoving?(v(),$("div",cje,[_(a,{onClick:Q=>o.moveUp(F)},{default:w(()=>[_(P)]),_:1},8,["onClick"]),_(a,{onClick:Q=>o.moveDown(F)},{default:w(()=>[_(I)]),_:1},8,["onClick"])])):O("",!0)],2))),128))]),(K=(X=n.lesson.meta)==null?void 0:X.quiz_questions)!=null&&K.length?(v(),R(l,{key:2,onClick:o.openAddQuestionModal,class:"fcom_primary_button add_btn"},{default:w(()=>[G(M("+ "+t.$t("Add Question"))+" ",1),t.has_pro?O("",!0):(v(),$("span",hje," ("+M(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"])):(v(),$("div",uje,[g("h4",null,M(t.$t("Add Question")),1),g("p",null,M(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(()=>[G(M("+ "+t.$t("Add Question"))+" ",1),t.has_pro?O("",!0):(v(),$("span",dje," ("+M(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"])]))])]}),_:1})])]),_:1}),Pe(_(z,{style:{padding:"0"},class:"fcom_full_editor_side",width:"300px"},{default:w(()=>[_(L,{height:"calc(100vh - 60px)"},{default:w(()=>[g("div",fje,[_(D,{course:n.course,lesson:n.lesson,quiz_meta:!0},null,8,["course","lesson"]),t.isMobile?(v(),R(l,{key:0,size:"small",onClick:e[7]||(e[7]=X=>i.showSideBar=!1)},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,M(t.$t("Close")),1)]),_:1})):O("",!0)])]),_:1})]),_:1},512),[[Xt,i.showSideBar||!t.isMobile]]),i.showQuestionModal?(v(),R(Y,{key:0,lesson:n.lesson,question:i.question,onClose:o.closeModal,onAddQuestion:o.addQuestion,onUpdateQuestion:o.updateQuestion},null,8,["lesson","question","onClose","onAddQuestion","onUpdateQuestion"])):O("",!0)]),_:1})]),_:1})])}const mje=de(WUe,[["render",pje]]),gje={name:"SectionScheduler",components:{CaretBottom:tie},props:["section","course"],data(){return{saving:!1,show:!1,time:"09:00",date:"",unlock_after:0}},methods:{saveSchedule(){let t=this.date+" "+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("HH:mm"),this.show=!0}}},vje={style:{"padding-left":"10px"},class:"fcom_section_scheduler"},_je={class:"fcom_scheduler_form"},yje={class:"fcom_input_group"},bje={class:"el_inline_date_picker"},wje={class:"fcom_input_group"},Cje={class:"fcom_input_group"},kje={class:"fcom_scheduler_form scheduler_structured"},xje={class:"fcom_input_group"},Sje={class:"fcom_label"},$je={class:"fcom_input_group"};function Aje(t,e,n,s,i,o){const r=H("CaretBottom"),a=ye,l=md,c=C4,u=Ge,d=Ii,h=db,f=_t("loading");return v(),$("div",vje,[n.course.settings.course_type=="scheduled"?(v(),R(d,{key:0,persistent:!1,placement:"bottom",width:400,visible:i.show},{reference:w(()=>[g("button",{onClick:e[0]||(e[0]=(...p)=>o.initPicker&&o.initPicker(...p)),class:"fcom_input_select_btn"},[g("span",null,M(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",_je,[g("div",yje,[g("div",bje,[_(l,{"value-format":"YYYY-MM-DD",format:"YYYY-MM-DD",teleported:!1,"popper-class":"el_inline_date_picker_box",modelValue:i.date,"onUpdate:modelValue":e[1]||(e[1]=p=>i.date=p)},null,8,["modelValue"])])]),g("div",wje,[_(c,{modelValue:i.time,"onUpdate:modelValue":e[2]||(e[2]=p=>i.time=p),start:"00:00",end:"23:59",steps:15},null,8,["modelValue"])]),g("div",Cje,[Pe((v(),R(u,{disabled:i.saving,type:"success",onClick:o.saveSchedule},{default:w(()=>[G(M(t.$t("Update Date")),1)]),_:1},8,["disabled","onClick"])),[[f,i.saving]])])])]),_:1},8,["visible"])):O("",!0),n.course.settings.course_type=="structured"?(v(),R(d,{key:1,persistent:!1,placement:"bottom",width:275,visible:i.show},{reference:w(()=>[g("button",{onClick:e[3]||(e[3]=(...p)=>o.initUnlockDay&&o.initUnlockDay(...p)),class:"fcom_input_select_btn"},[g("span",null,M(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",kje,[g("div",xje,[g("div",Sje,M(t.$t("Unlock section after")),1),_(h,{modelValue:i.unlock_after,"onUpdate:modelValue":e[4]||(e[4]=p=>i.unlock_after=p),min:0,max:1e3,"controls-position":"right",precision:0},null,8,["modelValue"]),G(" "+M(t.$t("Days")),1)]),g("div",$je,[Pe((v(),R(u,{disabled:i.saving,type:"success",onClick:o.saveUnlockDays},{default:w(()=>[G(M(t.$t("Update")),1)]),_:1},8,["disabled","onClick"])),[[f,i.saving]])])])]),_:1},8,["visible"])):O("",!0)])}const Mje=de(gje,[["render",Aje]]),Eje={name:"_SectionSechedulerEmail",components:{CrepeEditor:Sd},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+` | |
| 134 | -`:"")+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()})}},Tje={class:"fcom_section_email_config"},Pje={class:"dialog_header"},Ije={class:"dialog_left"},Lje={class:"dialog_body"},Oje={class:"fcom_input_group"},Dje={class:"fcom_label label_row"},Rje={class:"fcom_input_group"},Vje={class:"fcom_label label_row"},Fje={class:"fcom_extra_editor"},Nje={class:"dialog_footer"};function Bje(t,e,n,s,i,o){const r=gd,a=Ge,l=Ca,c=ka,u=wa,d=vt,h=H("crepe-editor"),f=Ss;return v(),$("div",Tje,[_(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(()=>[G(M(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(f,{"modal-class":"fcom_common_dialog","append-to-body":!0,"close-on-click-modal":!1,modelValue:i.editorOpen,"onUpdate:modelValue":e[4]||(e[4]=p=>i.editorOpen=p),width:t.drawerWidth},{header:w(()=>[g("div",Pje,[g("div",Ije,[g("h4",null,M(t.$t("Edit Email Notification")),1)])])]),footer:w(()=>[g("div",Nje,[_(a,{class:"fcom_secondary_button",onClick:e[3]||(e[3]=p=>i.editorOpen=!1)},{default:w(()=>[G(M(t.$t("Cancel")),1)]),_:1}),_(a,{class:"fcom_primary_button",loading:i.savingEmailMeta,onClick:o.saveSectionMeta},{default:w(()=>[G(M(t.$t("Save")),1)]),_:1},8,["loading","onClick"])])]),default:w(()=>[g("div",Lje,[g("div",Oje,[g("div",Dje,[g("span",null,M(t.$t("Subject")),1),_(u,{trigger:"click",onCommand:o.insertIntoSubject},{dropdown:w(()=>[_(c,null,{default:w(()=>[(v(!0),$(te,null,be(i.smartCodes,(p,m)=>(v(),R(l,{key:m,command:m},{default:w(()=>[G(M(p),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:w(()=>[_(a,{class:"fcom_secondary_button"},{default:w(()=>[G(M(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",Rje,[g("div",Vje,[g("span",null,M(t.$t("Message")),1),_(u,{trigger:"click",onCommand:o.insertIntoMessage},{dropdown:w(()=>[_(c,null,{default:w(()=>[(v(!0),$(te,null,be(i.smartCodes,(p,m)=>(v(),R(l,{key:m,command:m},{default:w(()=>[G(M(p),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:w(()=>[_(a,{class:"fcom_secondary_button"},{default:w(()=>[G(M(t.$t("Add shortcode")),1)]),_:1})]),_:1},8,["onCommand"])]),g("div",Fje,[_(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 zje=de(Eje,[["render",Bje]]),Hje={name:"SectionPart",props:["course","sections","section"],emits:["reload"],components:{LessonEditor:oH,LessonLine:TUe,SectionScheduler:Mje,FluentDnD:P1,QuizEditor:mje,SectionSechedulerEmail:zje},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){this.editingLesson=t,this.section.lessons[this.editingIndex]=t},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(s=>{n[s]=t[s]}),this.editing_title=!1,this.$patch("admin/courses/"+this.course.id+"/lessons/"+t.id,n).then(s=>{this.$notify.success(s.message)}).catch(s=>{this.$handleError(s)})},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 s=this.section.lessons.length-1;this.editingLesson=this.section.lessons[s],this.editingIndex=s})}).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(s=>s.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(s=>s.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)})},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={};ic(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()})}},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)}}},Uje={class:"fcom_section_primary"},jje={class:"fcom_section_primary_item"},Wje={key:0,class:"fcom_heading_item"},Yje={class:"fcom_space_counts"},Gje={class:"fcom_section_config fcom_label_schedule"},qje={class:"fcom_section_config fcom_label_email"},Xje={class:"fcom_section_primary_item_actions fcom_label_actions add_section_item"},Kje={key:0},Zje={class:"fcom_move_popup_close"},Jje={class:"fcom_move_popup_close"},Qje={key:0,class:"fcom_section_items"},eWe={key:0};function tWe(t,e,n,s,i,o){const r=ye,a=Ge,l=vt,c=H("section-scheduler"),u=H("SectionSechedulerEmail"),d=Ca,h=ka,f=wa,p=en,m=rn,b=H("Close"),y=an,C=Jt,k=H("MoreFilled"),x=H("lesson-line"),S=H("FluentDnD"),E=H("LessonEditor"),T=H("QuizEditor"),P=_t("loading");return v(),$(te,null,[Pe((v(),$("div",Uje,[g("div",jje,[g("div",{class:W(["fcom_section_primary_item_title fcom_title_editable fcom_label_lesson",{fcom_title_editing:i.editing_title}])},[ae(t.$slots,"before_section_heading"),i.editing_title?(v(),R(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]=$t(I=>o.patchSection(["title"]),["enter"]))},{append:w(()=>[_(a,{onClick:e[2]||(e[2]=I=>o.patchSection(["title"]))},{default:w(()=>[G(M(t.$t("save")),1)]),_:1})]),_:1},8,["modelValue"])):(v(),$("h4",Wje,[g("span",{onClick:e[0]||(e[0]=I=>i.editing_title=!0)},M(n.section.title),1),n.section.lessons&&n.section.lessons.length?(v(),R(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:Ke(n.section.isCollapsed?"transform: rotate(-90deg);":"")},{default:w(()=>[...e[12]||(e[12]=[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)])]),_:1},8,["style"]),g("span",Yje,M(t.$_n("%s lesson","%s lessons",n.section.lessons.length)),1)]),_:1})):O("",!0)]))],2),o.hasSchedule?(v(),$(te,{key:0},[g("div",Gje,[_(c,{section:n.section,course:n.course},null,8,["section","course"])]),g("div",qje,[o.showEmailConfig?(v(),R(u,{key:0,section:n.section,course:n.course},null,8,["section","course"])):O("",!0)])],64)):O("",!0),g("div",Xje,[_(f,{onCommand:o.handleAddSectionItem,trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"lesson"},{default:w(()=>[G(M(t.$t("Lesson")),1)]),_:1}),_(d,{disabled:!t.has_pro,command:"quiz"},{default:w(()=>[G(M(t.$t("Quiz"))+" ",1),t.has_pro?O("",!0):(v(),$("span",Kje," ("+M(t.$t("Pro Required"))+")",1))]),_:1},8,["disabled"])]),_:1})]),default:w(()=>[_(a,{"aria-label":t.$t("Add New"),class:"fcom_secondary_button"},{default:w(()=>[G(M(t.$t("Add New")),1)]),_:1},8,["aria-label"])]),_:1},8,["onCommand"]),Pe(g("div",{class:W(["fcom_add_section_popup","section_"+n.section.id])},[_(m,{onSubmit:[e[7]||(e[7]=Be(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:i.newSectionItem.title,"onUpdate:modelValue":e[5]||(e[5]=I=>i.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(()=>[Pe((v(),R(a,{disabled:i.addingSectionItem,class:"fcom_secondary_button",onClick:o.addSectionItem},{default:w(()=>[G(M(t.$t("Add")),1)]),_:1},8,["disabled","onClick"])),[[P,i.addingSectionItem]]),Pe((v(),R(a,{disabled:i.addingSectionItem,class:"fcom_primary_button",onClick:e[6]||(e[6]=()=>{o.addSectionItem(!1,!0)})},{default:w(()=>[G(M(t.$t("Add & Edit")),1)]),_:1},8,["disabled"])),[[P,i.addingSectionItem]])]),_:1})]),_:1},8,["onSubmit"]),g("div",Zje,[_(r,{onClick:e[8]||(e[8]=I=>i.showAddSectionPopup=!1)},{default:w(()=>[_(b)]),_:1})])],2),[[Xt,i.showAddSectionPopup]]),Pe(g("div",{class:W(["fcom_copy_section_popup","section_"+n.section.id])},[_(m,{onSubmit:e[10]||(e[10]=Be(I=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(p,{label:t.$t("Copy Section to a different Course")},{default:w(()=>[_(C,{filterable:"",clearable:"",remote:"","remote-show-suffix":"","remote-method":o.fetchCourses,modelValue:i.selectedCourseId,"onUpdate:modelValue":e[9]||(e[9]=I=>i.selectedCourseId=I),loading:i.loading,placeholder:t.$t("Select Course")},{default:w(()=>[(v(!0),$(te,null,be(i.courses,I=>(v(),R(y,{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:!i.selectedCourseId,class:"fcom_primary_button"},{default:w(()=>[G(M(t.$t("Copy Section")),1)]),_:1},8,["onClick","disabled"])]),_:1}),g("div",Jje,[_(r,{onClick:e[11]||(e[11]=I=>i.showCopySectionPopup=!1)},{default:w(()=>[_(b)]),_:1})])],2),[[Xt,i.showCopySectionPopup]]),_(f,{onCommand:o.handleSectionAction,trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"edit_title"},{default:w(()=>[G(M(t.$t("Edit Title")),1)]),_:1}),_(d,{command:"copy_section"},{default:w(()=>[G(M(t.$t("Copy To")),1)]),_:1}),_(d,{command:"delete"},{default:w(()=>[G(M(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(()=>[_(k)]),_:1})]),_:1},8,["aria-label"])]),_:1},8,["onCommand"])])]),n.section.lessons.length&&!n.section.isCollapsed?(v(),$("div",Qje,[_(S,{items:n.section.lessons,onDrop:o.dropLesson,"item-class":"fcom_section_item"},{item:w(({data:I,index:L})=>[(v(),R(x,{course:n.course,sections:n.sections,key:I.id,lesson:I,onDeleteLesson:o.handleDeleteLesson,onUpdated:o.handleLessonUpdated,onMoveLesson:o.handleMoveLesson,onShowEditor:V=>o.initLessonEditor(I,L)},{before_section_heading:w(()=>[...e[13]||(e[13]=[g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)])]),_:1},8,["course","sections","lesson","onDeleteLesson","onUpdated","onMoveLesson","onShowEditor"]))]),_:1},8,["items","onDrop"])])):O("",!0)])),[[P,i.working]]),i.editingLesson?(v(),$("div",eWe,[(v(),R(va,{to:"body"},[o.isLesson?(v(),R(E,{key:0,course:n.course,section:n.section,lesson:i.editingLesson,editingIndex:i.editingIndex,onChangeLesson:o.handleChangeLesson,onClose:o.handleCloseLessonEditor},null,8,["course","section","lesson","editingIndex","onChangeLesson","onClose"])):O("",!0),o.isQuiz?(v(),R(T,{key:1,course:n.course,section:n.section,lesson:i.editingLesson,editingIndex:i.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 nWe=de(Hje,[["render",tWe]]),sWe={name:"EditLessons",props:["course"],components:{SectionPart:nWe,FluentDnD:P1},data(){return{sections:[],loading:!1,newSection:{title:""},addingSection:!1,isCollapsed:!1}},computed:{lessonsCount(){let t=0;return ic(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={};ic(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,ic(this.sections,t=>{t.isCollapsed=this.isCollapsed})}},mounted(){this.fetchSections(),this.showAddSectionPopup()}},iWe={class:"fcom_course_lessons"},oWe={class:"fcom_settings_header"},rWe={class:"fcom_settings_header_meta"},aWe={class:"fcom_settings_header_meta_item"},lWe={class:"fcom_card_section_heading"},cWe={key:0},uWe={class:"fcom_section_labels"},dWe={class:"fcom_lebel fcom_label_lesson"},hWe={class:"fcom_lebel fcom_label_schedule"},fWe={class:"fcom_lebel fcom_label_email"};function pWe(t,e,n,s,i,o){const r=Wt,a=ye,l=Ge,c=vt,u=en,d=rn,h=Ii,f=H("section-part"),p=H("FluentDnD"),m=_t("loading");return v(),$("div",iWe,[g("div",oWe,[g("div",null,[g("h2",null,M(t.$t("Lessons")),1),g("div",rWe,[g("div",aWe,[g("b",null,M(t.$t("Type:")),1),G(" "+M(t.$labelize(n.course.settings.course_type))+" • ",1),g("b",null,M(t.$t("Status:")),1),G(" "+M(t.$labelize(n.course.status))+" • ",1),g("b",null,M(t.$t("Visibility:")),1),G(" "+M(t.$labelize(n.course.privacy)),1)])])])]),g("div",{class:W(["fcom_card_sections","fcom_course_type_"+n.course.settings.course_type])},[g("div",lWe,[i.loading?(v(),R(r,{key:1,rows:1})):(v(),$("h3",cWe,M(t.$_n("%d Section","%d Sections",i.sections.length))+" • "+M(t.$_n("%d Lesson","%d Lessons",o.lessonsCount)),1)),g("div",null,[o.lessonsCount&&i.sections.length>1?(v(),R(l,{key:0,title:t.$t("Expand/Close all sections"),onClick:o.toggleSectionCollapse,class:"fcom_secondary_button"},{default:w(()=>[_(a,{style:Ke(i.isCollapsed?"transform: rotate(-90deg);":"")},{default:w(()=>[...e[2]||(e[2]=[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)])]),_: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(()=>[G(M(t.$t("+ Add Section")),1)]),_:1})]),default:w(()=>[_(d,{onSubmit:e[1]||(e[1]=Be(b=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(u,{label:t.$t("Section Title")},{default:w(()=>[_(c,{ref:"fcom_section_title_add",onKeydown:$t(Be(o.addSection,["prevent"]),["enter"]),modelValue:i.newSection.title,"onUpdate:modelValue":e[0]||(e[0]=b=>i.newSection.title=b),placeholder:t.$t("Enter Section title")},null,8,["onKeydown","modelValue","placeholder"])]),_:1},8,["label"]),_(u,null,{default:w(()=>[Pe((v(),R(l,{disabled:i.addingSection,class:"fcom_primary_button",onClick:o.addSection},{default:w(()=>[G(M(t.$t("Save")),1)]),_:1},8,["disabled","onClick"])),[[m,i.addingSection]])]),_:1})]),_:1})]),_:1},8,["onShow"])])]),i.loading?(v(),R(r,{key:0,animated:!0,rows:10,style:{padding:"1rem"}})):O("",!0),g("div",uWe,[g("div",dWe,M(t.$t("Lesson name")),1),g("div",hWe,M(t.$t("Schedule")),1),g("div",fWe,M(t.$t("E-mail")),1),e[3]||(e[3]=g("div",{class:"fcom_lebel fcom_label_actions"},null,-1))]),_(p,{items:i.sections,onDrop:o.dropSection,"item-class":"fcom_section_item"},{item:w(({data:b})=>[_(f,{onReload:o.fetchSections,course:n.course,sections:i.sections,section:b},{before_section_heading:w(()=>[...e[4]||(e[4]=[g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)])]),_:1},8,["onReload","course","sections","section"])]),_:1},8,["items","onDrop"])],2)])}const mWe=de(sWe,[["render",pWe]]),gWe={name:"GroupIcon"},vWe={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _We(t,e,n,s,i,o){return v(),$("svg",vWe,[...e[0]||(e[0]=[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),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),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),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)])])}const yWe=de(gWe,[["render",_We]]),bWe={name:"ManageCourses",components:{CreateCourseForm:g5,AppLayout:Ks,Layout:Xs,GroupIcon:yWe,Pagination:$d},data(){return{courses:[],loading:!0,pagination:{page:1,per_page:24,total:0},type:"all",newCourseModal:!1}},methods:{fetchCourses(){this.loading=!0,this.$get("admin/courses",{page:this.pagination.page,per_page:this.pagination.per_page,type:this.type}).then(t=>{this.courses=t.courses.data,this.pagination.total=t.courses.total}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},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()}},wWe={class:"fcom_courses"},CWe={class:"fcom_box_card_list"},kWe=["onClick"],xWe=["src"],SWe={key:1,class:"fcom_no_image"},$We={class:"fcom_box_card_info"},AWe={class:"fcom_box_card_name"},MWe={class:"fcom_box_card_by"},EWe={class:"fcom_box_card_details"},TWe={class:"inline_details"},PWe={class:"inline_details"},IWe={key:0,class:"fcom_box_card_description"},LWe={class:"fcom_box_card_action"},OWe=["onClick"],DWe={key:0,class:"fcom_no_items_wrap"};function RWe(t,e,n,s,i,o){const r=Ge,a=xo,l=H("router-link"),c=H("GroupIcon"),u=ye,d=H("pagination"),h=H("layout"),f=H("app-layout"),p=H("create-course-form"),m=or,b=_t("loading");return v(),$(te,null,[_(f,{wrapper_class:"fcom_single_layout fcom_max_layout"},{default:w(()=>[_(h,{wrapper_class:"no_bg_layout",title:t.$t("Manage Courses")},{actions:w(()=>[_(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=y=>i.newCourseModal=!0)},{default:w(()=>[G(M(t.$t("Add Course")),1)]),_:1})]),default:w(()=>[Pe((v(),$("div",wWe,[g("div",CWe,[(v(!0),$(te,null,be(i.courses,y=>{var C;return v(),$("div",{key:y.id,class:"fcom_each_box_card"},[g("div",{class:"fcom_box_card_avatar",onClick:k=>o.navigateToEditLessons(y.id)},[y.cover_photo?(v(),$("img",{key:0,src:y.cover_photo,alt:""},null,8,xWe)):(v(),$("div",SWe))],8,kWe),g("div",$We,[g("div",AWe,[_(l,{class:"course_route",to:{name:"course_overview",params:{course_id:y.id}}},{default:w(()=>[G(M(o.getExcerpt(y.title,20))+" ",1),y.status=="draft"?(v(),R(a,{key:0,type:"info"},{default:w(()=>[G(M(y.status),1)]),_:2},1024)):O("",!0)]),_:2},1032,["to"]),g("span",MWe,M(t.$t("by %s",(C=y==null?void 0:y.owner)==null?void 0:C.display_name)),1)]),g("div",EWe,[g("div",TWe,[g("span",null,M(t.$_n("%d Section","%d Sections",y.sectionsCount)),1),e[4]||(e[4]=g("span",{class:"fcom_inline_separator"},null,-1)),g("span",null,M(t.$_n("%d Lesson","%d Lessons",y.lessonsCount)),1)]),g("div",PWe,[_(u,null,{default:w(()=>[_(c)]),_:1}),G(" "+M(t.$_n("%d student","%d students",y.students_count||0)),1)])]),y.description?(v(),$("div",IWe,M(o.getExcerpt(y.description,40)),1)):O("",!0),g("div",LWe,[g("button",{class:"fcom_card_button",onClick:k=>o.navigateToEditLessons(y.id)},M(t.$t("Manage")),9,OWe)])])])}),128))]),_(d,{hide_on_single:!0,onFetch:o.fetchCourses,pagination:i.pagination},null,8,["onFetch","pagination"]),!i.loading&&!i.courses.length?(v(),$("div",DWe,[g("h3",null,M(t.$t("Create your first course")),1),g("p",null,M(t.$t("Deliver engaging & high-performance learning experiences in your community.")),1),_(r,{onClick:e[1]||(e[1]=y=>i.newCourseModal=!0),class:"fcom_primary_button fcom_mt_10"},{default:w(()=>[G(M(t.$t("Create a Course")),1)]),_:1})])):O("",!0)])),[[b,i.loading]])]),_:1},8,["title"])]),_:1}),_(m,{"close-on-click-modal":!1,"append-to-body":!0,size:t.drawerWidth,modelValue:i.newCourseModal,"onUpdate:modelValue":e[3]||(e[3]=y=>i.newCourseModal=y),direction:"rtl"},{header:w(()=>[g("h4",null,M(t.$t("Create a new course")),1)]),default:w(()=>[i.newCourseModal?(v(),R(p,{key:0,onCompleted:e[2]||(e[2]=y=>{i.newCourseModal=!1})})):O("",!0)]),_:1},8,["size","modelValue"])],64)}const VWe=de(bWe,[["render",RWe]]),FWe={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"}},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.delete_current_data}).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:{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()}},NWe={class:"setting_header"},BWe={class:"setting_body"},zWe={key:1,class:"fcom_bp_migration_space_table"},HWe={class:"fcom_listed fcom_mb_20"},UWe={key:0},jWe={key:1},WWe={key:2,style:{"text-align":"center"}},YWe={style:{"text-align":"left",margin:"0px 20px 30px","font-size":"20px"},class:"fcom_listed"},GWe={key:0},qWe={key:1},XWe={key:0},KWe={key:1},ZWe={key:2},JWe={key:3},QWe=["href"],eYe={key:3};function tYe(t,e,n,s,i,o){const r=Wt,a=xo,l=Hr,c=H("InfoFilled"),u=ye,d=di,h=an,f=Jt,p=zr,m=Ht,b=Ge,y=pb,C=_t("loading");return v(),$(te,null,[g("div",NWe,[g("h2",null,M(t.$t("%s Migration",o.providerName)),1)]),g("div",BWe,[i.loading?(v(),R(r,{key:0,animated:!0,rows:5})):i.stage=="config"?(v(),$("div",zWe,[g("h5",null,"Please configure your "+M(o.providerName)+" groups for FluentCommunity Menu",1),g("p",null,"The "+M(o.providerName)+" groups will be created with the same name and users, posts, comments, reactions will be migrated to FluentCommunity.",1),e[5]||(e[5]=g("hr",null,null,-1)),i.featureConfig.has_groups?(v(),R(p,{key:0,data:i.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(k=>[g("div",null,[G(M(k.row.name)+" ",1),k.row.is_migrated?(v(),R(a,{key:0,type:"success"},{default:w(()=>[G(M(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,M(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(k=>[_(f,{clearable:"",placeholder:t.$t("No Menu Group"),modelValue:i.configMap[k.row.id],"onUpdate:modelValue":x=>i.configMap[k.row.id]=x,filterable:""},{default:w(()=>[_(h,{value:0,label:t.$t("No Menu Group")},null,8,["label"]),(v(!0),$(te,null,be(i.spaceGroups,x=>(v(),R(h,{key:x.id,label:x.title,value:x.id},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue","onUpdate:modelValue"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])):O("",!0),e[6]||(e[6]=g("h5",{style:{margin:"20px 0 20px"}},"The following data will be migrated to FluentCommunity",-1)),g("ul",HWe,[i.featureConfig.has_groups?(v(),$("li",UWe,"Total Groups: "+M(i.groupItems.length),1)):O("",!0),g("li",null,"Total Activity (Posts): "+M(t.$formatNumber(i.stats.total_posts))+" (+ associate favorites/reactions)",1),g("li",null,"Total Comments: "+M(t.$formatNumber(i.stats.total_comments)),1),g("li",null,"Total Users: "+M(t.$formatNumber(i.stats.total_community_users)),1),i.stats.total_reactions?(v(),$("li",jWe,"Total Reactions: "+M(t.$formatNumber(i.stats.total_reactions)),1)):O("",!0)]),i.has_previous_migration?(v(),R(m,{key:1,modelValue:i.reset_migration,"onUpdate:modelValue":e[0]||(e[0]=k=>i.reset_migration=k),"true-value":"yes","false-value":"no"},{default:w(()=>[...e[3]||(e[3]=[G(" Restart Migration (If unchecked, then it will continue from the last migration stage) ",-1)])]),_:1},8,["modelValue"])):O("",!0),i.has_previous_migration&&i.reset_migration=="yes"?(v(),R(m,{key:2,modelValue:i.delete_current_data,"onUpdate:modelValue":e[1]||(e[1]=k=>i.delete_current_data=k),"true-value":"yes","false-value":"no"},{default:w(()=>[...e[4]||(e[4]=[G(" 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),e[7]||(e[7]=g("hr",{class:"fcom_mb_20"},null,-1)),_(b,{loading:i.migrating,onClick:e[2]||(e[2]=k=>o.startMigration()),class:"fcom_primary_button"},{default:w(()=>[G(M(t.$t("Start Migrating Data")),1)]),_:1},8,["loading"])])):i.stage=="migrating"?(v(),$("div",WWe,[g("ul",YWe,[i.featureConfig.has_groups?(v(),$("li",GWe,[e[8]||(e[8]=G("Groups ",-1)),_(a,{type:"success"},{default:w(()=>[G(M(t.$t("Migrated")),1)]),_:1})])):O("",!0),i.featureConfig.has_groups?Pe((v(),$("li",qWe,[e[9]||(e[9]=G(" Group Members ",-1)),o.completedSteps.group_members?(v(),R(a,{key:0,type:"success"},{default:w(()=>[G(M(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[C,i.current_status.current_stage=="group_members"]]):O("",!0),Pe((v(),$("li",null,[G(M(t.$t("Posts & Activities"))+" ",1),o.completedSteps.posts?(v(),R(a,{key:0,type:"success"},{default:w(()=>[G(M(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[C,i.current_status.current_stage=="posts"]]),Pe((v(),$("li",null,[G(M(t.$t("Users"))+" ",1),o.completedSteps.users?(v(),R(a,{key:0,type:"success"},{default:w(()=>[G(M(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[C,i.current_status.current_stage=="users"]])]),e[16]||(e[16]=g("hr",{style:{"margin-bottom":"20px"}},null,-1)),i.current_status.current_stage=="group_members"?(v(),$("div",XWe,[g("h3",null,"Migrating Group Members from "+M(o.providerName)+" to FluentCommunity Spaces",1),e[10]||(e[10]=g("p",null,"Please do not close this window or go to other pages",-1)),e[11]||(e[11]=g("hr",null,null,-1)),g("h4",null," Current Stage: "+M(i.current_status.last_migrated_member_id)+"/"+M(i.max_ids.group_member_max),1),_(y,{"stroke-width":26,percentage:o.percentage(i.current_status.last_migrated_member_id,i.max_ids.group_member_max),indeterminate:!0},null,8,["percentage"])])):i.current_status.current_stage=="posts"?(v(),$("div",KWe,[g("h3",null,"Migrating Posts from "+M(o.providerName)+" to FluentCommunity",1),e[12]||(e[12]=g("p",null,"Please do not close this window or go to other pages",-1)),e[13]||(e[13]=g("hr",null,null,-1)),g("h4",null," Current Stage: "+M(i.current_status.last_activity_id)+"/"+M(i.max_ids.max_activity_id),1),_(y,{"stroke-width":26,percentage:o.percentage(i.current_status.last_activity_id,i.max_ids.max_activity_id),indeterminate:!0},null,8,["percentage"])])):i.current_status.current_stage=="users"?(v(),$("div",ZWe,[g("h3",null,"Syncing User Data from "+M(o.providerName)+" to FluentCommunity",1),e[14]||(e[14]=g("p",null,"Please do not close this window or go to other pages",-1)),e[15]||(e[15]=g("hr",null,null,-1)),g("h4",null," Current Stage: "+M(i.current_status.last_migrated_user_id)+"/"+M(i.max_ids.max_user_id),1),_(y,{"stroke-width":26,percentage:o.percentage(i.current_status.last_migrated_user_id,i.max_ids.max_user_id),indeterminate:!0},null,8,["percentage"])])):i.current_status.current_stage=="completed"?(v(),$("div",JWe,[g("h3",null,M(t.$t("Congratulation! Migration has been completed!")),1),g("p",null,M(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},M(t.$t("Go to Community Portal")),9,QWe)])):O("",!0)])):(v(),$("div",eYe,M(t.$t("Migration Completed")),1))])],64)}const nYe=de(FWe,[["render",tYe]]),sYe={name:"ManageMigrations",components:{BuddyPress:nYe,Layout:Xs,AppLayout:Ks},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()}},iYe={class:"settings_router"},oYe={class:"fhr_content_layout_body"},rYe={key:0,class:"fcom_migration_selectors white_loaded"},aYe={key:1},lYe={style:{margin:"0"}},cYe={class:"fcom_box_card_list"},uYe=["onClick"],dYe={style:{padding:"10px"},class:"fcom_box_card_avatar"},hYe=["src"],fYe={class:"fcom_box_card_info"},pYe={style:{"text-align":"center",display:"block"},class:"fcom_box_card_name"},mYe={href:"https://fluentcommunity.co/docs/fluentcommunity-buddyboss-migration",target:"_blank",rel:"noopener"},gYe={key:1,class:"fcom_migration_content"};function vYe(t,e,n,s,i,o){const r=Wt,a=Tc,l=H("BuddyPress"),c=H("layout"),u=H("app-layout");return v(),R(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",iYe,[g("div",oYe,[i.selectedMigration?(v(),$("div",gYe,[i.selectedMigration=="buddypress"||i.selectedMigration=="buddyboss"?(v(),R(l,{key:0,is_buddyboss:i.selectedMigration=="buddyboss"},null,8,["is_buddyboss"])):O("",!0)])):(v(),$("div",rYe,[i.loading?(v(),R(r,{key:0,animated:!0})):(v(),$("div",aYe,[g("h3",lYe,M(t.$t("Migrate Data from other plugins.")),1),e[0]||(e[0]=g("p",{style:{margin:"10px 0 20px"}},"Please select a plugin from where you want to migrate data to FluentCommunity.",-1)),g("div",cYe,[(v(!0),$(te,null,be(i.migrations,d=>(v(),$("div",{style:{border:"1px solid var(--fcom-primary-border, #e5e7eb)","text-align":"center"},key:d.key,onClick:h=>i.selectedMigration=d.key,class:"fcom_each_box_card"},[g("div",dYe,[d.logo?(v(),$("img",{key:0,style:{width:"200px","max-width":"100%","object-fit":"scale-down"},src:d.logo,alt:""},null,8,hYe)):O("",!0)]),g("div",fYe,[g("div",pYe,[g("h4",null,M(d.title),1)])])],8,uYe))),128))])])),_(a,{type:"warning",closable:!1,style:{"margin-top":"15px"}},{default:w(()=>[g("p",null,[G(M(t.$t("For large databases, please read our documentation and use wp-cli."))+" ",1),g("a",mYe,M(t.$t("Read Documentation")),1)])]),_:1})]))])])]),_:1},8,["title"])]),_:1})}const _Ye=de(sYe,[["render",vYe]]),yYe={name:"GeneticPromo"},bYe={class:"fcom_generic_promo"},wYe={style:{"text-align":"center"},class:"fcom_upgrade_banner"},CYe={style:{"font-size":"18px","margin-bottom":"10px"}},kYe=["href"];function xYe(t,e,n,s,i,o){return v(),$("div",bYe,[g("div",wYe,[g("h3",CYe,M(t.$t("This feature is available on the pro version of FluentCommunity")),1),g("a",{class:"el-button fcom_primary_button",href:t.appVars.upgrade_url,target:"_blank"},M(t.$t("Upgrade Now")),9,kYe)])])}const SYe=de(yYe,[["render",xYe]]),$Ye={name:"AccessAutomator",components:{GeneticPromo:SYe,AppLayout:Ks,Layout:Xs},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()}},AYe={class:"settings_router"},MYe={class:"fhr_content_layout_body_"},EYe={class:"fcom_settings_header"},TYe={class:"setting_body_"},PYe={key:0,class:"white_loaded"},IYe={key:1,class:"white_loaded"},LYe={key:2,class:"white_loaded"},OYe={class:"fcom_generic_promo"},DYe={style:{"text-align":"center"},class:"fcom_upgrade_banner"},RYe={style:{"font-size":"18px","margin-bottom":"10px"}},VYe={key:3},FYe={class:"white_loaded fcom_mb_20"},NYe={class:"fcom_input_wrap"},BYe={key:0},zYe={class:"fcom_input_wrap"},HYe={class:"fcom_input_wrap"},UYe={key:0,class:"fcom_input_wrap"},jYe={key:0,class:"fcom_card_sections fcom_course_type_structured"},WYe={class:"fcom_section_labels"},YYe={style:{"font-weight":"bold","font-size":"16px"},class:"fcom_lebel fcom_label_lesson"},GYe={style:{"text-align":"right","font-weight":"bold","font-size":"16px"},class:"fcom_lebel fcom_label_actions"},qYe={class:"fcom_section_primary"},XYe={class:"fcom_section_primary_item"},KYe={class:"fcom_section_primary_item_title"},ZYe={class:"fcom_section_items"},JYe={class:"fcom_section_item"},QYe={class:"fcom_section_item_title"},eGe=["innerHTML"],tGe=["innerHTML"],nGe={key:2,class:"fcom_no_avatar"},sGe={class:"fcom_section_item_actions fcom_section_item_actions_separated"},iGe={key:1,class:"white_loaded"},oGe={key:4};function rGe(t,e,n,s,i,o){const r=Ge,a=Tc,l=Wt,c=H("genetic-promo"),u=Ht,d=rn,h=ye,f=an,p=Jt,m=H("layout"),b=H("app-layout");return v(),R(b,{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(()=>[i.spaceGroups?(v(),R(r,{key:0,class:"fcom_primary_button",loading:i.saving,onClick:o.saveSettings},{default:w(()=>[g("span",null,M(t.$t("Save Settings")),1)]),_:1},8,["loading","onClick"])):O("",!0)]),default:w(()=>[g("div",AYe,[g("div",MYe,[g("div",EYe,[g("h2",null,M(t.$t("Automate your Course or Space accesses with FluentCRM Tags")),1),g("p",null,M(t.$t("Control user accesses to different spaces/courses of your portal based on the contact tags.")),1),g("p",null,M(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(()=>[G(M(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",TYe,[i.loading?(v(),$("div",PYe,[_(l,{rows:5,animated:!0})])):t.has_pro?i.has_fluentcrm?i.settings&&i.spaceGroups?(v(),$("div",VYe,[g("div",FYe,[_(d,{onSubmit:e[5]||(e[5]=Be(y=>t.doNothing(),["prevent"])),modelValue:i.settings,"onUpdate:modelValue":e[6]||(e[6]=y=>i.settings=y),"label-position":"top"},{default:w(()=>[g("div",NYe,[_(u,{modelValue:i.settings.is_enabled,"onUpdate:modelValue":e[1]||(e[1]=y=>i.settings.is_enabled=y),"true-value":"yes","false-value":"no"},{default:w(()=>[G(M(t.$t("Enable Access Management with FluentCRM")),1)]),_:1},8,["modelValue"]),i.settings.is_enabled!="yes"?(v(),$("p",BYe,M(t.$t("Enable to configure your access management with FluentCRM")),1)):O("",!0)]),i.settings.is_enabled=="yes"?(v(),$(te,{key:0},[g("div",zYe,[_(u,{modelValue:i.settings.create_crm_contact,"onUpdate:modelValue":e[2]||(e[2]=y=>i.settings.create_crm_contact=y),"true-value":"yes","false-value":"no"},{default:w(()=>[G(M(t.$t("Create contact in FluentCRM (if not exist) when join in the configured spaces / courses.")),1)]),_:1},8,["modelValue"]),g("p",null,M(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",HYe,[_(u,{modelValue:i.settings.create_user,"onUpdate:modelValue":e[3]||(e[3]=y=>i.settings.create_user=y),"true-value":"yes","false-value":"no"},{default:w(()=>[G(M(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,M(t.$t("If enabled then, a WP user will be created if not exist and add to the configured course or space.")),1)]),i.settings.create_user=="yes"?(v(),$("div",UYe,[_(u,{modelValue:i.settings.send_welcome_email,"onUpdate:modelValue":e[4]||(e[4]=y=>i.settings.send_welcome_email=y),"true-value":"yes","false-value":"no"},{default:w(()=>[G(M(t.$t("Send default WP welcome email when creating the user by tagging.")),1)]),_:1},8,["modelValue"]),g("p",null,M(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"])]),i.settings.is_enabled=="yes"?(v(),$("div",jYe,[g("div",WYe,[g("div",YYe,M(t.$t("Space")),1),g("div",GYe,M(t.$t("Mapped FluentCRM Tag")),1)]),(v(!0),$(te,null,be(i.spaceGroups,y=>(v(),$("div",{key:y.id},[g("div",qYe,[g("div",XYe,[g("div",KYe,[g("h4",null,M(y.title),1)])])]),g("div",ZYe,[(v(!0),$(te,null,be(y.spaces,C=>(v(),$("div",JYe,[g("div",QYe,[C.icon?(v(),R(h,{key:0},{default:w(()=>[g("span",{innerHTML:C.icon},null,8,eGe)]),_:2},1024)):C.shape_svg?(v(),$("span",{key:1,innerHTML:C.shape_svg},null,8,tGe)):(v(),$("span",nGe)),g("span",null,M(C.title),1)]),g("div",sGe,[_(p,{filterable:"",size:"small",clearable:"",placeholder:t.$t("No Mapping"),style:{width:"100%","min-width":"180px"},modelValue:i.settings.tagging_maps[C.id],"onUpdate:modelValue":k=>i.settings.tagging_maps[C.id]=k},{default:w(()=>[(v(!0),$(te,null,be(i.crm_tags,k=>(v(),R(f,{label:k.title,value:k.id},null,8,["label","value"]))),256))]),_:1},8,["placeholder","modelValue","onUpdate:modelValue"]),i.settings.tagging_maps[C.id]?(v(),R(u,{key:0,modelValue:i.settings.linked_maps[C.id],"onUpdate:modelValue":k=>i.settings.linked_maps[C.id]=k,"true-value":i.settings.tagging_maps[C.id],"false-value":""},{default:w(()=>[G(M(t.$t("Sync this tag with the %s access",C.type=="community"?t.$labelize("space"):t.$labelize("course"))),1)]),_:2},1032,["modelValue","onUpdate:modelValue","true-value"])):O("",!0)])]))),256))])]))),128))])):O("",!0),t.has_pro?(v(),R(r,{key:2,class:"fcom_primary_button",loading:i.saving,onClick:o.saveSettings},{default:w(()=>[g("span",null,M(t.$t("Save Settings")),1)]),_:1},8,["loading","onClick"])):(v(),$("div",iGe,[_(c)]))])):(v(),$("div",oGe,[g("p",null,M(t.$t("Settings could not be loaded")),1)])):(v(),$("div",LYe,[g("div",OYe,[g("div",DYe,[g("h3",RYe,M(t.$t("FluentCRM is not installed!")),1),g("p",null,M(t.$t("Please install FluentCRM to enable this feature.")),1),_(r,{loading:i.saving,class:"el-button fcom_primary_button",onClick:e[0]||(e[0]=y=>o.installPlugin("fluent-crm"))},{default:w(()=>[G(M(t.$t("Install FluentCRM")),1)]),_:1},8,["loading"])])])])):(v(),$("div",IYe,[_(c)]))])])])]),_:1},8,["title"])]),_:1})}const aGe=de($Ye,[["render",rGe]]),lGe={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 cGe(t,e,n,s,i,o){const r=db,a=en,l=Ht,c=Ge,u=rn,d=_t("loading");return v(),R(u,{onSubmit:e[4]||(e[4]=Be(h=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:i.config,"onUpdate:modelValue":e[5]||(e[5]=h=>i.config=h)},{default:w(()=>[_(a,{label:t.$t("Maximum Number of Topics a user can select when creating a post")},{default:w(()=>[_(r,{modelValue:i.config.max_topics_per_post,"onUpdate:modelValue":e[0]||(e[0]=h=>i.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:i.config.max_topics_per_space,"onUpdate:modelValue":e[1]||(e[1]=h=>i.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:i.config.show_on_post_card,"onUpdate:modelValue":e[2]||(e[2]=h=>i.config.show_on_post_card=h),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Show Topics on Post Card")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(a,null,{default:w(()=>[Pe((v(),R(c,{class:"fcom_primary_button",onClick:e[3]||(e[3]=h=>o.update())},{default:w(()=>[G(M(t.$t("Update")),1)]),_:1})),[[d,i.loading]])]),_:1})]),_:1},8,["modelValue"])}const uGe=de(lGe,[["render",cGe]]),dGe={name:"TopicCreateForm",components:{SpaceIcon:qf,SlugInput:_d},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=[],s=[];this.each(e,r=>{let a=t.filter(l=>{let c=l.parent_id==r.id;return c&&s.push(l.slug),c});a.length&&n.push({label:r.title,spaces:a})});let i=e.map(r=>r.id),o=t.filter(r=>{let a=!i.includes(r.id),l=!r.parent_id||!i.includes(r.parent_id);return a&&l&&!s.includes(r.slug)});o.length&&n.push({label:this.$t("Other Spaces - No Assigned Group"),spaces:o}),this.formattedSpaceGroups=n}},mounted(){this.formatSpaceGroups()}},hGe={class:"fcom_help_text"},fGe={key:0,class:"fcom_space_title"},pGe={key:0},mGe={key:1},gGe={class:"fcom_help_text"};function vGe(t,e,n,s,i,o){const r=vt,a=en,l=H("slug-input"),c=H("SpaceIcon"),u=an,d=fb,h=Jt,f=Ht,p=Ge,m=rn,b=_t("loading");return v(),R(m,{onSubmit:e[5]||(e[5]=Be(y=>t.doNothing(),["prevent"])),modelValue:i.editing_topic,"onUpdate:modelValue":e[6]||(e[6]=y=>i.editing_topic=y),"label-position":"top"},{default:w(()=>[_(a,{label:t.$t("Topic Title")},{default:w(()=>[_(r,{placeholder:t.$t("Title of your topic"),modelValue:i.editing_topic.title,"onUpdate:modelValue":e[0]||(e[0]=y=>i.editing_topic.title=y),type:"text"},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),_(a,{label:t.$t("Topic Slug")},{default:w(()=>[_(l,{disabled:!!i.editing_topic.id,modelValue:i.editing_topic.slug,"onUpdate:modelValue":e[1]||(e[1]=y=>i.editing_topic.slug=y),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:i.editing_topic.description,"onUpdate:modelValue":e[2]||(e[2]=y=>i.editing_topic.description=y),type:"text"},null,8,["placeholder","modelValue"]),g("div",hGe,[g("p",null,M(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(),R(a,{key:0,label:t.$t("Space visibility")},{default:w(()=>[_(h,{modelValue:i.editing_topic.space_ids,"onUpdate:modelValue":e[3]||(e[3]=y=>i.editing_topic.space_ids=y),multiple:"",placeholder:t.$t("Select Spaces"),style:{width:"100%"}},{default:w(()=>[(v(!0),$(te,null,be(i.formattedSpaceGroups,y=>(v(),R(d,{key:y.label,label:y.label},{default:w(()=>[(v(!0),$(te,null,be(y.spaces,C=>(v(),R(u,{key:C.slug,label:C.title,value:C.id.toString()},{default:w(()=>[C.id?(v(),$("span",fGe,[_(c,{space_profile:C},null,8,["space_profile"]),g("span",null,[G(M(t.getExcerpt(C.title,50))+" ",1),C.type=="course"?(v(),$("span",pGe," ("+M(t.$t("course"))+")",1)):O("",!0)])])):(v(),$("span",mGe,M(t.getExcerpt(C.title,50)),1))]),_:2},1032,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"]),g("div",gGe,[g("p",null,M(t.$t("Select spaces where this topic will be visible.")),1)])]),_:1},8,["label"])),_(a,null,{default:w(()=>[_(f,{modelValue:i.editing_topic.admin_only,"onUpdate:modelValue":e[4]||(e[4]=y=>i.editing_topic.admin_only=y),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Only admins and moderators can select this topic")),1)]),_:1},8,["modelValue"])]),_:1}),_(a,null,{default:w(()=>[Pe((v(),R(p,{class:"fcom_primary_button",onClick:o.createOrupdateTopic,disabled:i.saving},{default:w(()=>[G(M(t.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[b,i.saving]])]),_:1})]),_:1},8,["modelValue"])}const _Ge=de(dGe,[["render",vGe]]),yGe={name:"AllTopics",components:{TopicCreateForm:_Ge,SlugInput:_d,SpaceIcon:qf,Layout:Xs,AppLayout:Ks,TopicsConfig:uGe},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(s=>{let i=e.find(o=>o.id==s);i&&n.push(i.title)}),n.join(", ")}},mounted(){this.has_pro&&this.fetch(),this.changeTitle(this.$t("Topics Settings"))}},bGe=["href"],wGe={key:0,class:"fhr_content_layout_body"},CGe={class:"fcom_mb_10"},kGe={class:"fcom_manager_actions fcom_mb_10"},xGe={class:"bulk_search"},SGe={style:{margin:"0",padding:"0"}},$Ge={class:"fcom_meta_text"},AGe={class:"fcom_table_action_col"},MGe={key:1,class:"settings_router"},EGe={class:"fhr_content_layout_body"},TGe={class:"setting_body",style:{"text-align":"center"}},PGe={class:"promo_description"},IGe=["href"],LGe={class:"dialog_header"},OGe={class:"dialog_left"},DGe={key:0,class:"dialog_body"};function RGe(t,e,n,s,i,o){const r=H("Plus"),a=ye,l=Ge,c=H("Operation"),u=vt,d=Hr,h=H("DeleteFilled"),f=zr,p=H("layout"),m=H("app-layout"),b=H("TopicCreateForm"),y=Ss,C=H("TopicsConfig"),k=_t("loading");return v(),$(te,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(),$(te,{key:0},[_(l,{class:"fcom_primary_button",onClick:e[0]||(e[0]=x=>o.showForm(null))},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,M(t.$t("New Topic")),1)]),_:1}),_(l,{onClick:e[1]||(e[1]=x=>i.showConfig=!0),class:"fcom_secondary_button"},{default:w(()=>[_(a,null,{default:w(()=>[_(c)]),_:1}),g("span",null,M(t.$t("Settings")),1)]),_:1})],64)):(v(),$("a",{key:1,target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},M(t.$t("Upgrade to Pro")),9,bGe))]),default:w(()=>[t.has_pro?(v(),$("div",wGe,[g("div",null,[g("p",CGe,M(t.$t("Categorize your content and allow members to filter posts with the topic navigation bar in spaces.")),1),g("div",kGe,[g("div",xGe,[_(u,{modelValue:i.search,"onUpdate:modelValue":e[2]||(e[2]=x=>i.search=x),onKeydown:$t(o.fetch,["enter"]),placeholder:t.$t("Search"),class:"el-input-round"},{prefix:w(()=>[...e[7]||(e[7]=[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)])]),_:1},8,["modelValue","onKeydown","placeholder"])])]),Pe((v(),R(f,{data:i.topics,style:{"border-radius":"8px"},"empty-text":t.$t("No Topics Found")},{default:w(()=>[_(d,{label:t.$t("Title"),"min-width":"160"},{default:w(x=>[g("p",SGe,M(x.row.title),1),g("span",$Ge,M(x.row.description),1)]),_:1},8,["label"]),_(d,{label:t.$t("Spaces"),"min-width":"140"},{default:w(x=>[g("span",null,M(o.formatTopics(x.row.space_ids)),1)]),_:1},8,["label"]),_(d,{label:t.$t("Admin Only?"),width:"120"},{default:w(x=>[g("span",null,M(x.row.admin_only=="yes"?t.$t("Yes"):t.$t("No")),1)]),_:1},8,["label"]),_(d,{label:t.$t("Actions"),width:"160"},{default:w(x=>[g("div",AGe,[_(l,{onClick:S=>o.showForm(x.row),size:"small"},{default:w(()=>[G(M(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(l,{onClick:S=>o.removeTopic(x.row),type:"danger",plain:"",size:"small"},{default:w(()=>[_(a,null,{default:w(()=>[_(h)]),_:1})]),_:1},8,["onClick"])])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[k,i.loading]])])])):(v(),$("div",MGe,[g("div",EGe,[g("div",TGe,[g("p",PGe,M(t.$t("__TOPIC_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},M(t.$t("Upgrade to Pro")),9,IGe)])])]))]),_:1},8,["title"])]),_:1}),_(y,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:i.showModal,"onUpdate:modelValue":e[4]||(e[4]=x=>i.showModal=x),direction:"rtl"},{header:w(({close:x})=>[g("div",LGe,[g("div",OGe,[e[8]||(e[8]=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)),g("div",null,[g("h4",null,M(i.editing_topic.id?t.$t("Update Topic"):t.$t("Add Topic")),1)])])])]),default:w(()=>[i.showModal?(v(),$("div",DGe,[i.showModal?(v(),R(b,{key:0,all_spaces:i.all_spaces,topic:i.editing_topic,onSaved:e[3]||(e[3]=x=>{i.showModal=!1,o.fetch()})},null,8,["all_spaces","topic"])):O("",!0)])):O("",!0)]),_:1},8,["width","modelValue"]),_(y,{"close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,title:t.$t("Topics Settings"),modelValue:i.showConfig,"onUpdate:modelValue":e[6]||(e[6]=x=>i.showConfig=x),direction:"rtl"},{default:w(()=>[i.showConfig?(v(),R(C,{key:0,onSaved:e[5]||(e[5]=x=>{i.showConfig=!1})})):O("",!0)]),_:1},8,["width","title","modelValue"])],64)}const VGe=de(yGe,[["render",RGe]]),FGe={name:"CustomizationSettings",components:{Layout:Xs,AppLayout:Ks},data(){return{loadingCustomizations:!1,loadingSnippets:!1,savingCustomizations:!1,savingSnippets:!1,settings:null,snippetsSettings:null,postOrderOptions:this.appVars.post_order_by_options}},methods:{getCustomizations(){this.loadingCustomizations=!0,this.$get("settings/customization-settings").then(t=>{this.settings=t.settings}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loadingCustomizations=!1})},saveCustomizations(){this.savingCustomizations=!0,this.$post("settings/customization-settings",{settings:this.settings}).then(t=>{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}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loadingSnippets=!1})},saveSnippets(){this.savingSnippets=!0,this.$post("settings/snippets-settings",{snippets:this.snippetsSettings}).then(t=>{this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.savingSnippets=!1})}},mounted(){this.getCustomizations(),this.has_pro&&this.getSnippetsSettings(),this.changeTitle(this.$t("Customization Settings"))}},NGe={class:"settings_router"},BGe={key:0,class:"white_loaded"},zGe={key:1,class:"fhr_content_layout_body"},HGe={class:"setting_header"},UGe={class:"setting_body"},jGe={class:"fcom_input_wrap"},WGe={class:"fcom_input_wrap"},YGe={class:"fcom_input_wrap"},GGe={class:"fcom_input_wrap"},qGe={key:0,class:"fcom_input_wrap"},XGe=["innerHTML"],KGe={key:1,style:{cursor:"pointer","font-weight":"bold"}},ZGe={class:"fcom_input_wrap"},JGe={style:{"font-weight":"bold"}},QGe={class:"fcom_help_text"},eqe={target:"_blank",rel:"noopener",href:"https://wpmanageninja.com/affiliate/"},tqe={class:"fcom_input_wrap"},nqe={class:"fcom_input_wrap"},sqe={class:"fcom_input_wrap"},iqe={key:0},oqe={class:"fcom_help_text"},rqe={class:"fcom_input_wrap"},aqe={key:0},lqe={class:"fcom_help_text"},cqe={class:"fcom_input_wrap"},uqe={class:"fcom_help_text"},dqe={class:"fcom_input_wrap"},hqe={class:"fcom_help_text"},fqe={key:0},pqe={key:1},mqe={class:"fcom_input_wrap"},gqe={class:"fcom_input_wrap"},vqe={style:{margin:"20px 0 0 0"},class:"fcom_input_wrap"},_qe={key:2},yqe={key:0,class:"white_loaded"},bqe={key:1,class:"fhr_content_layout_body"},wqe={class:"setting_header"},Cqe={class:"setting_body"},kqe={class:"setting_sub_header"},xqe={class:"setting_sub_body"},Sqe={class:"setting_sub_header"},$qe={class:"setting_sub_body"},Aqe={style:{margin:"20px 0 0 0"},class:"fcom_input_wrap"},Mqe={key:2},Eqe={key:4,class:"fhr_content_layout_body",style:{"text-align":"center"}},Tqe={class:"setting_header"},Pqe={class:"setting_body"},Iqe={class:"promo_description"},Lqe=["href"];function Oqe(t,e,n,s,i,o){const r=Wt,a=Ht,l=vt,c=Ge,u=Ii,d=ko,h=Ps,f=en,p=an,m=Jt,b=rn,y=TR,C=H("layout"),k=H("app-layout"),x=_t("loading");return v(),R(k,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(C,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Customize Your Portal")},{default:w(()=>[g("div",NGe,[i.loadingCustomizations?(v(),$("div",BGe,[_(r,{rows:5,animated:!0})])):i.settings?(v(),$("div",zGe,[g("div",HGe,[g("h2",null,M(t.$t("Customize the UI features of the portal")),1)]),g("div",UGe,[_(b,{onSubmit:e[17]||(e[17]=Be(S=>t.doNothing(),["prevent"])),modelValue:i.settings,"onUpdate:modelValue":e[18]||(e[18]=S=>i.settings=S),"label-position":"top"},{default:w(()=>[g("div",jGe,[_(a,{"true-value":"yes","false-value":"no",modelValue:i.settings.dark_mode,"onUpdate:modelValue":e[0]||(e[0]=S=>i.settings.dark_mode=S),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Enable Dark Mode")),1)]),_:1},8,["modelValue"]),g("p",null,M(t.$t("Enables switching between dark and light interface themes, accommodating different lighting conditions and user preferences.")),1)]),g("div",WGe,[_(a,{"true-value":"yes","false-value":"no",modelValue:i.settings.fixed_page_header,"onUpdate:modelValue":e[1]||(e[1]=S=>i.settings.fixed_page_header=S),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Enable Sticky Page headers across portal")),1)]),_:1},8,["modelValue"]),g("p",null,M(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",YGe,[_(a,{"true-value":"yes","false-value":"no",modelValue:i.settings.feed_link_on_sidebar,"onUpdate:modelValue":e[2]||(e[2]=S=>i.settings.feed_link_on_sidebar=S),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Show Default Feed link on left sidebar")),1)]),_:1},8,["modelValue"]),g("p",null,M(t.$t("Adds the default Feed link in the sidebar, providing an extra access point to the all feeds page")),1)]),g("div",GGe,[_(a,{"true-value":"yes","false-value":"no",modelValue:i.settings.collapse_sidebar_groups,"onUpdate:modelValue":e[3]||(e[3]=S=>i.settings.collapse_sidebar_groups=S),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Collapse sidebar groups by default")),1)]),_:1},8,["modelValue"]),g("p",null,M(t.$t("When enabled, all space groups in the left sidebar will be collapsed by default. Users can still expand them manually.")),1)]),t.has_pro?(v(),$("div",qGe,[_(a,{"true-value":"yes","false-value":"no",modelValue:i.settings.show_powered_by,"onUpdate:modelValue":e[4]||(e[4]=S=>i.settings.show_powered_by=S),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Show powered by text")),1)]),_:1},8,["modelValue"]),g("p",null,[G(M(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(()=>[i.settings.affiliate_id?(v(),$("span",KGe,M(t.$t("Affiliate ID: %s",i.settings.affiliate_id)),1)):(v(),$("span",{key:0,style:{cursor:"pointer"},innerHTML:t.$t("%1$sClick here%2$s to add affiliate ID","<b>","</b>")},null,8,XGe))]),default:w(()=>[g("div",ZGe,[g("label",JGe,M(t.$t("Your affiliate ID")),1),_(l,{style:{margin:"20px 0"},placeholder:t.$t("Affiliate ID"),type:"number",modelValue:i.settings.affiliate_id,"onUpdate:modelValue":e[5]||(e[5]=S=>i.settings.affiliate_id=S)},null,8,["placeholder","modelValue"]),Pe((v(),R(c,{onClick:o.saveCustomizations,disabled:i.savingCustomizations,class:"fcom_primary_button"},{default:w(()=>[G(M(t.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[x,i.savingCustomizations]])]),g("div",QGe,[g("p",null,[G(M(t.$t("Don't have an affiliate account?"))+" ",1),g("a",eqe,M(t.$t("Click here"))+".",1)])])]),_:1})])])):O("",!0),g("div",tqe,[_(a,{"true-value":"yes","false-value":"no",modelValue:i.settings.icon_on_header_menu,"onUpdate:modelValue":e[6]||(e[6]=S=>i.settings.icon_on_header_menu=S),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Show icon on header menu items")),1)]),_:1},8,["modelValue"]),g("p",null,M(t.$t("Adds icons next to text in header menu items, enhancing visual appeal and improving navigation clarity.")),1)]),g("div",nqe,[_(a,{"true-value":"yes","false-value":"no",modelValue:i.settings.show_post_modal,"onUpdate:modelValue":e[7]||(e[7]=S=>i.settings.show_post_modal=S),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Use Modal UI for quick post view")),1)]),_:1},8,["modelValue"]),g("p",null,M(t.$t("If you enable this then, posts will be shown as modal when interacting")),1)]),O("",!0),g("div",sqe,[_(f,{label:t.$t("Rich Media Post Layout")},{default:w(()=>[_(h,{modelValue:i.settings.rich_post_layout,"onUpdate:modelValue":e[9]||(e[9]=S=>i.settings.rich_post_layout=S),class:"fcom_radio_group"},{default:w(()=>[_(d,{value:"classic"},{default:w(()=>[G(M(t.$t("Classic")),1)]),_:1}),_(d,{disabled:!t.has_pro,value:"modern"},{default:w(()=>[G(M(t.$t("Modern"))+" ",1),t.has_pro?O("",!0):(v(),$("span",iqe,"("+M(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",oqe,[g("p",null,M(t.$t("Classic: Image/Video after the content. Modern: Image/Video at first")),1)])]),_:1},8,["label"])]),g("div",rqe,[_(f,{label:t.$t("Members List Layout")},{default:w(()=>[_(h,{modelValue:i.settings.member_list_layout,"onUpdate:modelValue":e[10]||(e[10]=S=>i.settings.member_list_layout=S),class:"fcom_radio_group"},{default:w(()=>[_(d,{value:"classic"},{default:w(()=>[G(M(t.$t("List View")),1)]),_:1}),_(d,{disabled:!t.has_pro,value:"grid"},{default:w(()=>[G(M(t.$t("Grid View"))+" ",1),t.has_pro?O("",!0):(v(),$("span",aqe,"("+M(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",lqe,[g("p",null,M(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",cqe,[_(f,{label:t.$t("Post Title Requirements")},{default:w(()=>[_(h,{modelValue:i.settings.post_title_pref,"onUpdate:modelValue":e[11]||(e[11]=S=>i.settings.post_title_pref=S),class:"fcom_radio_group"},{default:w(()=>[_(d,{value:"optional"},{default:w(()=>[G(M(t.$t("Optional")),1)]),_:1}),_(d,{value:"required"},{default:w(()=>[G(M(t.$t("Required")),1)]),_:1}),_(d,{value:"disabled"},{default:w(()=>[G(M(t.$t("Disabled")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",uqe,[g("p",null,M(t.$t("When creating a new post, check if the post title is required or not")),1)])]),_:1},8,["label"])]),g("div",dqe,[_(f,{label:t.$t("Default Feed Layout")},{default:w(()=>[_(h,{modelValue:i.settings.default_feed_layout,"onUpdate:modelValue":e[12]||(e[12]=S=>i.settings.default_feed_layout=S),class:"fcom_radio_group"},{default:w(()=>[_(d,{value:"timeline"},{default:w(()=>[G(M(t.$t("Timeline View")),1)]),_:1}),_(d,{value:"list"},{default:w(()=>[G(M(t.$t("List View")),1)]),_:1}),_(d,{value:"card"},{default:w(()=>[G(M(t.$t("Card View")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(a,{modelValue:i.settings.disable_feed_layout,"onUpdate:modelValue":e[13]||(e[13]=S=>i.settings.disable_feed_layout=S),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Disable Layout Style Change Option")),1)]),_:1},8,["modelValue"]),g("div",hqe,[i.settings.disable_feed_layout==="yes"?(v(),$("p",fqe,M(t.$t("The selected layout will be applied for all members. They cannot switch to a different view.")),1)):(v(),$("p",pqe,M(t.$t("User can change the layout style to their own preference.")),1))])]),g("div",mqe,[_(f,{label:t.$t("Max Media Per Post")},{default:w(()=>[_(l,{modelValue:i.settings.max_media_per_post,"onUpdate:modelValue":e[14]||(e[14]=S=>i.settings.max_media_per_post=S),placeholder:t.$t("Max Media Per Post"),type:"number",min:1,max:100},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),g("div",gqe,[_(f,{label:t.$t("Default Feed Sort By")},{default:w(()=>[_(m,{modelValue:i.settings.default_feed_sort_by,"onUpdate:modelValue":e[15]||(e[15]=S=>i.settings.default_feed_sort_by=S),clearable:"",class:"fcom_select",placeholder:t.$t("Latest Posts Sort")},{default:w(()=>[(v(!0),$(te,null,be(i.postOrderOptions,(S,E)=>(v(),R(p,{key:E,value:E,label:S},null,8,["value","label"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),_(a,{modelValue:i.settings.disable_feed_sort_by,"onUpdate:modelValue":e[16]||(e[16]=S=>i.settings.disable_feed_sort_by=S),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Disable Feed Sort By Options")),1)]),_:1},8,["modelValue"])]),g("div",vqe,[Pe((v(),R(c,{onClick:o.saveCustomizations,disabled:i.savingCustomizations,class:"fcom_primary_button"},{default:w(()=>[G(M(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[x,i.savingCustomizations]])])]),_:1},8,["modelValue"])])])):(v(),$("div",_qe,[g("p",null,M(t.$t("Customizations could not be loaded")),1)])),e[21]||(e[21]=g("div",{style:{"margin-top":"30px"}},null,-1)),t.has_pro?(v(),$(te,{key:3},[i.loadingSnippets?(v(),$("div",yqe,[_(r,{rows:5,animated:!0})])):i.snippetsSettings?(v(),$("div",bqe,[g("div",wqe,[g("h2",null,M(t.$t("Custom Snippets")),1)]),g("div",Cqe,[g("div",kqe,[g("h3",null,M(t.$t("Custom CSS")),1),g("p",null,M(t.$t("You can write your custom CSS here for the portal. Please do not include %s tag","<style> </style>")),1)]),g("div",xqe,[_(l,{placeholder:t.$t("Your CSS Code"),type:"textarea",modelValue:i.snippetsSettings.custom_css,"onUpdate:modelValue":e[19]||(e[19]=S=>i.snippetsSettings.custom_css=S),rows:5},null,8,["placeholder","modelValue"])]),_(y),g("div",Sqe,[g("h3",null,M(t.$t("Custom JavaScript")),1),g("p",null,M(t.$t("You can write your custom JavaScript (with script tag), analytics code, and more here for the portal")),1)]),g("div",$qe,[_(l,{placeholder:t.$t("Your Javascript or Analytics Code"),type:"textarea",modelValue:i.snippetsSettings.custom_js,"onUpdate:modelValue":e[20]||(e[20]=S=>i.snippetsSettings.custom_js=S),rows:5},null,8,["placeholder","modelValue"])]),g("div",Aqe,[Pe((v(),R(c,{onClick:o.saveSnippets,disabled:i.savingSnippets,class:"fcom_primary_button"},{default:w(()=>[G(M(t.$t("Save Custom CSS & JS")),1)]),_:1},8,["onClick","disabled"])),[[x,i.savingSnippets]])])])])):(v(),$("div",Mqe,[g("p",null,M(t.$t("Custom Snippets could not be loaded")),1)]))],64)):(v(),$("div",Eqe,[g("div",Tqe,[g("h2",null,M(t.$t("Custom Snippets")),1)]),g("div",Pqe,[g("p",Iqe,M(t.$t("__CUSTOM_SNIPPETS_PROMO__")),1),g("a",{class:"el-button fcom_primary_button",href:t.appVars.upgrade_url,target:"_blank"},M(t.$t("Upgrade to Pro")),9,Lqe)])]))])]),_:1},8,["title"])]),_:1})}const Dqe=de(FGe,[["render",Oqe]]),Rqe={name:"EmailNotification",components:{ImageUploader:vd,CrepeEditor:Sd,Layout:Xs,AppLayout:Ks},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"))}},Vqe={class:"settings_router fcom_mb_20"},Fqe={key:0,class:"white_loaded"},Nqe={key:1,class:"fhr_content_layout_body"},Bqe={class:"setting_body"},zqe={style:{"font-size":"18px",margin:"0",padding:"0"}},Hqe={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},Uqe={class:"fcom_help_text"},jqe={class:"fcom_help_text"},Wqe={class:"fcom_help_text"},Yqe={class:"fcom_help_text"},Gqe={class:"fcom_extra_editor"},qqe={class:"fcom_help_text"},Xqe=["innerHTML"],Kqe=["src"],Zqe={class:"fcom_image_uploader_wrapper"},Jqe={class:"setting_body"},Qqe={style:{"font-size":"18px",margin:"0",padding:"0"}},eXe={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},tXe={key:0,class:"fcom_help_text"},nXe={key:0,class:"fcom_help_text"},sXe={key:0,class:"fcom_help_text"},iXe={class:"fcom_help_text"},oXe={key:0,class:"fcom_help_text"},rXe={class:"fcom_meta_text"},aXe={class:"setting_body"},lXe={key:2};function cXe(t,e,n,s,i,o){const r=Ge,a=Wt,l=vt,c=en,u=fd,d=an,h=Jt,f=hd,p=H("crepe-editor"),m=H("EditPen"),b=ye,y=H("Delete"),C=H("ImageUploader"),k=Ht,x=C4,S=rn,E=H("layout"),T=H("app-layout"),P=_t("loading");return v(),R(T,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(E,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Email Settings")},{actions:w(()=>[Pe((v(),R(r,{class:"fcom_primary_button",onClick:o.save},{default:w(()=>[g("span",null,M(t.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[P,i.saving]])]),default:w(()=>[g("div",Vqe,[i.loading?(v(),$("div",Fqe,[_(a,{rows:5,animated:!0})])):i.email_settings?(v(),$("div",Nqe,[_(S,{onSubmit:e[14]||(e[14]=Be(I=>t.doNothing(),["prevent"])),modelValue:i.email_settings,"onUpdate:modelValue":e[15]||(e[15]=I=>i.email_settings=I),"label-position":"top"},{default:w(()=>[g("div",Bqe,[g("h3",zqe,M(t.$t("Mailing Settings")),1),g("p",Hqe,M(t.$t("Set your from name, email, and email footer. These configurations will be used to send emails from FluentCommunity.")),1),e[16]||(e[16]=g("hr",null,null,-1)),_(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:i.email_settings.send_from_name,"onUpdate:modelValue":e[0]||(e[0]=I=>i.email_settings.send_from_name=I)},null,8,["placeholder","modelValue"]),g("div",Uqe,[g("p",null,M(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=i.verifiedEmailSenders)==null?void 0:I.length)>0?(v(),R(h,{key:0,class:"fcom_select",placeholder:t.$t("Select Email Address"),modelValue:i.email_settings.send_from_email,"onUpdate:modelValue":e[1]||(e[1]=L=>i.email_settings.send_from_email=L)},{default:w(()=>[(v(!0),$(te,null,be(i.verifiedEmailSenders,L=>(v(),R(d,{key:L,label:L,value:L},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"])):(v(),R(l,{key:1,placeholder:t.$t("Valid Email address"),modelValue:i.email_settings.send_from_email,"onUpdate:modelValue":e[2]||(e[2]=L=>i.email_settings.send_from_email=L)},null,8,["placeholder","modelValue"])),g("div",jqe,[g("p",null,M(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:i.email_settings.reply_to_name,"onUpdate:modelValue":e[3]||(e[3]=I=>i.email_settings.reply_to_name=I)},null,8,["placeholder","modelValue"]),g("div",Wqe,[g("p",null,M(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:i.email_settings.reply_to_email,"onUpdate:modelValue":e[4]||(e[4]=I=>i.email_settings.reply_to_email=I)},null,8,["placeholder","modelValue"]),g("div",Yqe,[g("p",null,M(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",Gqe,[_(p,{modelValue:i.email_settings.email_footer,"onUpdate:modelValue":e[5]||(e[5]=I=>i.email_settings.email_footer=I)},null,8,["modelValue"])]),g("div",qqe,[g("p",null,M(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,Xqe)])]),_: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(()=>[i.email_settings.logo||i.email_settings.global_logo?(v(),$("img",{key:0,src:i.email_settings.logo||i.email_settings.global_logo,style:{"max-width":"100px",height:"auto"}},null,8,Kqe)):O("",!0),g("div",Zqe,[_(C,{additionalData:{resize:!1,max_width:500,skip_convert:"yes"},button_text:i.email_settings.logo?t.$t("Change"):t.$t("Upload Logo"),can_remove:!!i.email_settings.logo,isTextBtn:!1,onUploaded:e[6]||(e[6]=I=>{i.email_settings.logo=I})},Es({remove:w(()=>[_(b,null,{default:w(()=>[_(y)]),_:1})]),_:2},[i.email_settings.logo||i.email_settings.global_logo?{name:"trigger",fn:w(()=>[_(r,{class:"fcom_plain_button"},{default:w(()=>[_(b,null,{default:w(()=>[_(m)]),_:1})]),_:1})]),key:"0"}:void 0]),1032,["button_text","can_remove"])])]),_:1},8,["label"])]),_:1}),_(u,{sm:24,md:12},{default:w(()=>[t.has_pro?(v(),R(c,{key:0},{default:w(()=>[_(k,{modelValue:i.email_settings.disable_powered_by,"onUpdate:modelValue":e[7]||(e[7]=I=>i.email_settings.disable_powered_by=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Disable powered by FluentCommunity in the email footer")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0)]),_:1})]),_:1})]),e[18]||(e[18]=g("hr",null,null,-1)),g("div",Jqe,[g("h3",Qqe,M(t.$t("Email Notification Settings")),1),g("p",eXe,M(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),e[17]||(e[17]=g("hr",null,null,-1)),_(c,{label:t.$t("Email on new comment")},{default:w(()=>[_(k,{modelValue:i.email_settings.com_my_post_mail,"onUpdate:modelValue":e[8]||(e[8]=I=>i.email_settings.com_my_post_mail=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Send an email to the author when a new comment is added to a post.")),1)]),_:1},8,["modelValue"]),i.email_settings.com_my_post_mail!="yes"?(v(),$("div",tXe,[g("p",null,M(t.$t("You should enable this. Currently disabled.")),1)])):O("",!0)]),_:1},8,["label"]),_(c,{label:t.$t("Email on comment reply")},{default:w(()=>[_(k,{modelValue:i.email_settings.reply_my_com_mail,"onUpdate:modelValue":e[9]||(e[9]=I=>i.email_settings.reply_my_com_mail=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Email authors when someone replies to their comments.")),1)]),_:1},8,["modelValue"]),i.email_settings.reply_my_com_mail!="yes"?(v(),$("div",nXe,[g("p",null,M(t.$t("You should enable this. Currently disabled.")),1)])):O("",!0)]),_:1},8,["label"]),_(c,{label:t.$t("Email Announcement on Post")},{default:w(()=>[_(k,{modelValue:i.email_settings.mention_mail,"onUpdate:modelValue":e[10]||(e[10]=I=>i.email_settings.mention_mail=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Give option to admin/moderators to send email when posting on a space")),1)]),_:1},8,["modelValue"]),i.email_settings.mention_mail!="yes"?(v(),$("div",sXe,[g("p",null,M(t.$t("You should enable this. Currently disabled.")),1)])):O("",!0)]),_:1},8,["label"]),_(c,null,{default:w(()=>[_(k,{"true-value":"yes","false-value":"no",modelValue:i.email_settings.digest_email_status,"onUpdate:modelValue":e[11]||(e[11]=I=>i.email_settings.digest_email_status=I),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Enable Weekly Digest Email for community members")),1)]),_:1},8,["modelValue"]),g("div",iXe,[g("p",null,M(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:i.email_settings.digest_mail_day,"onUpdate:modelValue":e[12]||(e[12]=I=>i.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"]),i.email_settings.digest_email_status=="yes"?(v(),$("div",oXe,[g("p",null,M(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(()=>[_(x,{step:"00:10",start:"00:10",end:"23:59",modelValue:i.email_settings.daily_digest_time,"onUpdate:modelValue":e[13]||(e[13]=I=>i.email_settings.daily_digest_time=I)},null,8,["modelValue"]),g("p",rXe,M(t.$t("Approximate time when the digest emails will start sending for the members")),1)]),_:1},8,["label"])]),_:1})]),_:1})]),e[19]||(e[19]=g("hr",null,null,-1)),g("div",aXe,[Pe((v(),R(r,{onClick:o.save,disabled:i.saving,class:"fcom_primary_button"},{default:w(()=>[G(M(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[P,i.saving]])])]),_:1},8,["modelValue"])])):(v(),$("div",lXe,[g("p",null,M(t.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const uXe=de(Rqe,[["render",cXe]]),dXe={name:"UpgradeToProModal",props:{showModal:{type:Boolean,default:!0},upgrade_module:{type:String,required:!0}},data(){return{openModal:this.showModal,upgradeModule:Qye[this.upgrade_module]||{}}},watch:{openModal:function(){this.$emit("closeModal")}}},hXe={class:"fcom_upgrade_header"},fXe={class:"dialog_body"},pXe={class:"fcom_upgrade_banner"},mXe=["href"],gXe={class:"fcom_upgrade_content"},vXe={key:0,class:"fcom_feature_image"},_Xe=["src","alt"],yXe={class:"fcom_upgrade_body"},bXe={class:"fcom_upgrade_description"},wXe=["href"];function CXe(t,e,n,s,i,o){const r=or;return v(),R(r,{"modal-class":"fcom_upgrade_dialog","close-on-click-modal":!1,"append-to-body":!0,size:"50%",modelValue:i.openModal,"onUpdate:modelValue":e[0]||(e[0]=a=>i.openModal=a),direction:"rtl"},{header:w(()=>[g("div",hXe,[g("h4",null,M(i.upgradeModule.headerTitle),1),g("p",null,M(i.upgradeModule.headerDescription),1)])]),default:w(()=>[g("div",fXe,[g("div",pXe,[g("p",null," 🎉 "+M(t.$t("Discover exciting new features now!")),1),g("a",{href:t.appVars.upgrade_url,target:"_blank"},M(t.$t("Upgrade Now")),9,mXe)]),g("div",gXe,[i.upgradeModule.featureImage?(v(),$("div",vXe,[g("img",{src:t.appVars.assets_url+"images/upgrades/"+i.upgradeModule.featureImage,alt:i.upgradeModule.headerTitle},null,8,_Xe)])):O("",!0),g("div",yXe,[g("h4",null,M(i.upgradeModule.bodyTitle),1),g("p",bXe,M(i.upgradeModule.bodyDescription),1),g("a",{class:"el-button fcom_primary_button",href:t.appVars.upgrade_url,target:"_blank"},M(t.$t("Upgrade to Pro")),9,wXe)])])])]),_:1},8,["modelValue"])}const Jf=de(dXe,[["render",CXe]]),kXe={name:"StorageSettings",props:["features"],components:{UpgradeToProModal:Jf},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()}},xXe={class:"fcom_storage_settings"},SXe={class:"dialog_header"},$Xe={class:"dialog_left"},AXe={key:0,class:"white_loaded"},MXe={key:1,class:"dialog_body"},EXe={key:0},TXe={class:"fcom_cloudflare_settings"},PXe={class:"fcom_s3_settings"},IXe={class:"fcom_cloudflare_settings"},LXe={key:3,class:"fcom_mb_10"},OXe={class:"dialog_footer"},DXe={key:2};function RXe(t,e,n,s,i,o){const r=Ge,a=Wt,l=Ff,c=Ps,u=en,d=vt,h=an,f=Jt,p=rn,m=Ss,b=H("UpgradeToProModal"),y=_t("loading");return v(),$(te,null,[g("div",xXe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=C=>o.openSettings())},{default:w(()=>{var C;return[G(M(t.$t("Configure"))+" ("+M((C=i.storageConfig)==null?void 0:C.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:i.showSettings,"onUpdate:modelValue":e[18]||(e[18]=C=>i.showSettings=C),direction:"rtl"},{header:w(({close:C})=>[g("div",SXe,[g("div",$Xe,[g("div",null,[g("h4",null,M(t.$t("Configure Media Storage")),1)])])])]),default:w(()=>[i.fetching?(v(),$("div",AXe,[_(a,{rows:5,animated:!0})])):i.storageConfig?(v(),$("div",MXe,[i.storageConfig.is_defined?(v(),$("p",EXe,M(t.$t("__CLOUD_STORAGE_CONFIGURED")),1)):(v(),$(te,{key:1},[_(p,{onSubmit:e[17]||(e[17]=Be(C=>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]=C=>o.maybeResetConfig()),modelValue:i.storageConfig.driver,"onUpdate:modelValue":e[2]||(e[2]=C=>i.storageConfig.driver=C)},{default:w(()=>[_(l,{type:"primary",value:"local"},{default:w(()=>[G(M(t.$t("Server Storage")),1)]),_:1}),_(l,{value:"cloudflare_r2"},{default:w(()=>[G(M(t.$t("Cloudflare R2 (Recommended)")),1)]),_:1}),_(l,{value:"amazon_s3"},{default:w(()=>[G(M(t.$t("Amazon S3")),1)]),_:1}),_(l,{value:"bunny_cdn"},{default:w(()=>[G(M(t.$t("BunnyCDN")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),i.storageConfig.driver==="cloudflare_r2"?(v(),$(te,{key:0},[e[20]||(e[20]=g("p",null,[G(" Please "),g("a",{target:"_blank",rel:"noopener",href:"https://github.com/WPManageNinja/fluent-community-docs/blob/master/configure-cloudflare-r2.md"},"Read the documentation first "),G(" to configure Cloudflare R2. ")],-1)),e[21]||(e[21]=g("hr",null,null,-1)),g("div",TXe,[_(u,{label:t.$t("Cloudflare Access Key")},{default:w(()=>[_(d,{type:"password",modelValue:i.storageConfig.access_key,"onUpdate:modelValue":e[3]||(e[3]=C=>i.storageConfig.access_key=C)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Cloudflare Secret Key")},{default:w(()=>[_(d,{type:"password",modelValue:i.storageConfig.secret_key,"onUpdate:modelValue":e[4]||(e[4]=C=>i.storageConfig.secret_key=C)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Cloudflare Bucket Public URL")},{default:w(()=>[_(d,{modelValue:i.storageConfig.public_url,"onUpdate:modelValue":e[5]||(e[5]=C=>i.storageConfig.public_url=C)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Cloudflare Endpoint URL")},{default:w(()=>[_(d,{modelValue:i.storageConfig.endpoint_url,"onUpdate:modelValue":e[6]||(e[6]=C=>i.storageConfig.endpoint_url=C),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:i.storageConfig.sub_folder,"onUpdate:modelValue":e[7]||(e[7]=C=>i.storageConfig.sub_folder=C),placeholder:t.$t("If you want to store files in a folder within the bucket.")},null,8,["modelValue","placeholder"])]),_:1},8,["label"])])],64)):i.storageConfig.driver==="amazon_s3"?(v(),$(te,{key:1},[e[22]||(e[22]=g("p",null,[G(" Please "),g("a",{target:"_blank",rel:"noopener",href:"https://github.com/WPManageNinja/fluent-community-docs/blob/master/configure-amazon-s3.md"},"Read the documentation first "),G(" to configure Amazon S3. ")],-1)),e[23]||(e[23]=g("hr",null,null,-1)),g("div",PXe,[_(u,{label:t.$t("Amazon S3 Access Key")},{default:w(()=>[_(d,{type:"password",modelValue:i.storageConfig.access_key,"onUpdate:modelValue":e[8]||(e[8]=C=>i.storageConfig.access_key=C)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Amazon S3 Secret Key")},{default:w(()=>[_(d,{type:"password",modelValue:i.storageConfig.secret_key,"onUpdate:modelValue":e[9]||(e[9]=C=>i.storageConfig.secret_key=C)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Amazon S3 Bucket Name")},{default:w(()=>[_(d,{modelValue:i.storageConfig.bucket,"onUpdate:modelValue":e[10]||(e[10]=C=>i.storageConfig.bucket=C)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Amazon S3 Location")},{default:w(()=>[_(f,{modelValue:i.storageConfig.s3_endpoint,"onUpdate:modelValue":e[11]||(e[11]=C=>i.storageConfig.s3_endpoint=C),placeholder:t.$t("Select S3 Location")},{default:w(()=>[(v(!0),$(te,null,be(i.s3Locations,(C,k)=>(v(),R(h,{label:C,value:k},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:i.storageConfig.sub_folder,"onUpdate:modelValue":e[12]||(e[12]=C=>i.storageConfig.sub_folder=C)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])])],64)):O("",!0),i.storageConfig.driver==="bunny_cdn"?(v(),$(te,{key:2},[e[24]||(e[24]=g("p",null,[G(" Please "),g("a",{target:"_blank",rel:"noopener",href:"https://github.com/WPManageNinja/fluent-community-docs/blob/master/configure-bunny_cdn.md"},"Read the documentation first "),G(" to configure BunnyCDN. ")],-1)),e[25]||(e[25]=g("hr",null,null,-1)),g("div",IXe,[_(u,{label:t.$t("BunnyCDN API Key")},{default:w(()=>[_(d,{type:"password",modelValue:i.storageConfig.access_key,"onUpdate:modelValue":e[13]||(e[13]=C=>i.storageConfig.access_key=C)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("BunnyCDN Storage Zone Name")},{default:w(()=>[_(d,{modelValue:i.storageConfig.bucket,"onUpdate:modelValue":e[14]||(e[14]=C=>i.storageConfig.bucket=C)},null,8,["modelValue"])]),_:1},8,["label"]),_(u,{label:t.$t("Primary Storage Region")},{default:w(()=>[_(f,{modelValue:i.storageConfig.s3_endpoint,"onUpdate:modelValue":e[15]||(e[15]=C=>i.storageConfig.s3_endpoint=C),placeholder:t.$t("Select Storage Region")},{default:w(()=>[(v(!0),$(te,null,be(i.bunnyLocations,(C,k)=>(v(),R(h,{label:C,value:k},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:i.storageConfig.public_url,"onUpdate:modelValue":e[16]||(e[16]=C=>i.storageConfig.public_url=C)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])])],64)):(v(),$("p",LXe,M(t.$t("Your files will be stored in the default Uploads folder")),1))]),_:1}),g("div",OXe,[Pe((v(),R(r,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[G(M(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[y,i.saving]])])],64))])):(v(),$("div",DXe,[g("p",null,M(t.$t("Config could not be loaded")),1)]))]),_:1},8,["width","modelValue"]),i.openUpgradeModal?(v(),R(b,{key:0,showModal:i.openUpgradeModal,onCloseModal:e[19]||(e[19]=C=>i.openUpgradeModal=!1),upgrade_module:"media_module"},null,8,["showModal"])):O("",!0)],64)}const VXe=de(kXe,[["render",RXe]]),FXe={name:"LeaderBoardConfig",props:["features"],emits:["saveSettings"],data(){return{levels:null,excludedUserIds:[],showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1,users:[],usersLoaded:!1}},components:{UpgradeToProModal:Jf},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})}}},NXe={class:"fcom_storage_settings"},BXe={key:0,class:"white_loaded"},zXe={key:1,class:"dialog_body"},HXe={class:"fcom_mb_20"},UXe={class:"fcom_level_table"},jXe={class:"fcom_level_table_row fcom_header_row"},WXe={class:"fcom_lavel_desc"},YXe={class:"fcom_lavel_actions"},GXe={class:"fcom_lavel_num"},qXe={class:"fcom_lavel_desc"},XXe={class:"fcom_lavel_actions"},KXe={class:"fcom_user_selector fcom_mb_20"},ZXe={class:"fcom_mb_20"},JXe={style:{float:"left"}},QXe={style:{float:"right",color:"#8492a6","font-size":"13px"}},eKe={class:"dialog_footer"},tKe={key:2};function nKe(t,e,n,s,i,o){const r=Ge,a=Wt,l=Ht,c=en,u=vt,d=an,h=Jt,f=rn,p=or,m=H("UpgradeToProModal"),b=_t("loading");return v(),$(te,null,[g("div",NXe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=y=>o.openSettings())},{default:w(()=>[G(M(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:i.showSettings,"onUpdate:modelValue":e[4]||(e[4]=y=>i.showSettings=y),direction:"rtl"},{header:w(({close:y})=>[g("h4",null,M(t.$t("Leaderboard / Gamification Settings")),1)]),default:w(()=>[i.fetching?(v(),$("div",BXe,[_(a,{rows:5,animated:!0})])):i.levels?(v(),$("div",zXe,[_(f,{onSubmit:e[3]||(e[3]=Be(y=>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]=y=>n.features.leader_board_module=y),"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(),$(te,{key:0},[g("h5",HXe,M(t.$t("Leaderboard Levels")),1),g("div",UXe,[g("div",jXe,[e[6]||(e[6]=g("div",{class:"fcom_lavel_num"}," # ",-1)),g("div",WXe,M(t.$t("Title & Description")),1),g("div",YXe,M(t.$t("Minimum Points")),1)]),(v(!0),$(te,null,be(i.levels,(y,C,k)=>(v(),$("div",{class:"fcom_level_table_row",key:C},[g("div",GXe,M(k+1),1),g("div",qXe,[_(u,{class:"fcom_bold_input",type:"text",modelValue:y.title,"onUpdate:modelValue":x=>y.title=x,placeholder:t.$t("Level Title")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),_(u,{type:"text",modelValue:y.tagline,"onUpdate:modelValue":x=>y.tagline=x,placeholder:t.$t("Level Tagline")},null,8,["modelValue","onUpdate:modelValue","placeholder"])]),g("div",XXe,[_(c,{label:""},{default:w(()=>[_(u,{min:0,max:999999999,disabled:C==="level_1",type:"number",modelValue:y.min_points,"onUpdate:modelValue":x=>y.min_points=x,placeholder:t.$t("Minimum Points")},null,8,["disabled","modelValue","onUpdate:modelValue","placeholder"])]),_:2},1024)])]))),128))]),g("div",KXe,[g("h5",ZXe,M(t.$t("Exclude Users")),1),_(c,{label:t.$t("Exclude selected users from the leaderboard")},{default:w(()=>[i.usersLoaded?(v(),R(h,{key:0,multiple:!0,class:"rich_select",filterable:"",remote:"","remote-method":o.fetchUsers,placeholder:t.$t("Select Users"),modelValue:i.excludedUserIds,"onUpdate:modelValue":e[2]||(e[2]=y=>i.excludedUserIds=y)},{default:w(()=>[(v(!0),$(te,null,be(i.users,y=>(v(),R(d,{key:y.ID,label:y.display_name+" ("+y.user_email+")",value:y.ID},{default:w(()=>[g("span",JXe,M(y.display_name),1),g("span",QXe,M(y.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",eKe,[Pe((v(),R(r,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[G(M(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[b,i.saving]])])])):(v(),$("div",tKe,[g("p",null,M(t.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"]),i.openUpgradeModal?(v(),R(m,{key:0,showModal:i.openUpgradeModal,onCloseModal:e[5]||(e[5]=y=>i.openUpgradeModal=!1),upgrade_module:"leader_board_module"},null,8,["showModal"])):O("",!0)],64)}const sKe=de(FXe,[["render",nKe]]),iKe={name:"UserBadgesConfig",components:{LogoEmojiSelector:d1,UpgradeToProModal:Jf},props:["features"],emits:["saveSettings"],data(){return{badges:null,showSettings:!1,fetching:!1,saving:!1,editingBadge:null,showEditBagdeModal:!1,openUpgradeModal:!1}},methods:{openSettings(){if(!this.has_pro){this.openUpgradeModal=!0;return}this.fetchSettings(),this.showSettings=!0},fetchSettings(){this.fetching=!0,this.$get("admin/user-badges").then(t=>{this.badges=t.badges}).catch(t=>{this.$handleError(t)}).finally(()=>{this.fetching=!1})},saveSettings(){let t=this.features.user_badge=="yes";this.$emit("saveSettings",!t),t&&this.saveBadgeSettings()},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}).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()}}},oKe={class:"fcom_storage_settings"},rKe={key:0,class:"white_loaded"},aKe={key:1},lKe={class:"header_user_badge"},cKe={style:{"margin-bottom":"30px"},class:"fcom_user_badges fcom_manager_table"},uKe={class:"fcom_badge_preview"},dKe={class:"fcom_table_action_col",style:{display:"flex",gap:"10px"}},hKe=["onClick"],fKe=["onClick"],pKe={key:2};function mKe(t,e,n,s,i,o){const r=Ge,a=Wt,l=Ht,c=en,u=Hr,d=H("UserBadge"),h=H("Edit"),f=ye,p=H("Delete"),m=zr,b=rn,y=or,C=H("logo-emoji-selector"),k=vt,x=pd,S=fd,E=hd,T=Ss,P=H("UpgradeToProModal"),I=_t("loading");return v(),$(te,null,[g("div",oKe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=L=>o.openSettings())},{default:w(()=>[G(M(t.$t("Settings")),1)]),_:1})]),_(y,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:t.dialogWidth,modelValue:i.showSettings,"onUpdate:modelValue":e[4]||(e[4]=L=>i.showSettings=L),direction:"rtl"},{header:w(()=>[g("h4",null,M(t.$t("User Badge Settings")),1)]),default:w(()=>[i.fetching?(v(),$("div",rKe,[_(a,{rows:5,animated:!0})])):i.badges?(v(),$("div",aKe,[_(b,{onSubmit:e[3]||(e[3]=Be(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(),$(te,{key:0},[g("div",lKe,[g("h3",null,M(t.$t("User Badges")),1),_(r,{class:"fcom_secondary_button",onClick:e[2]||(e[2]=L=>o.initAddNew()),size:"small"},{default:w(()=>[G(M(t.$t("Add New")),1)]),_:1})]),g("div",cKe,[_(m,{stripe:"","empty-text":t.$t("No badges have been configured."),data:i.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",uKe,[_(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",dKe,[g("div",{onClick:V=>o.initEdit(L.row),class:"action_item clickable"},[_(f,null,{default:w(()=>[_(h)]),_:1})],8,hKe),g("div",{class:"action_item clickable",onClick:V=>o.deleteBadge(L.row)},[_(f,null,{default:w(()=>[_(p)]),_:1})],8,fKe)])]),_:1},8,["label"])]),_:1},8,["empty-text","data"])])],64)):O("",!0),_(c,null,{default:w(()=>[Pe((v(),R(r,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[G(M(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[I,i.saving]])]),_:1})]),_:1})])):(v(),$("div",pKe,[g("p",null,M(t.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"]),_(T,{"append-to-body":!0,modelValue:i.showEditBagdeModal,"onUpdate:modelValue":e[14]||(e[14]=L=>i.showEditBagdeModal=L),title:t.$t("Edit Badge"),width:"30%"},{default:w(()=>[i.editingBadge?(v(),R(b,{key:0,onSubmit:e[13]||(e[13]=Be(L=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,{label:t.$t("Title")},{default:w(()=>[_(k,{modelValue:i.editingBadge.title,"onUpdate:modelValue":e[6]||(e[6]=L=>i.editingBadge.title=L),placeholder:t.$t("Badge Title")},{prepend:w(()=>{var L,V;return[_(C,{fallback_mark:"",custom_svg:!0,onUpdate:e[5]||(e[5]=D=>{i.editingBadge.config.emoji=D.emoji,i.editingBadge.config.logo=D.logo,i.editingBadge.config.shape_svg=D.shape_svg}),config:{logo:i.editingBadge.config.logo,emoji:((L=i.editingBadge.config)==null?void 0:L.emoji)||"",shape_svg:(V=i.editingBadge.config)==null?void 0:V.shape_svg}},null,8,["config"])]}),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"]),_(c,null,{default:w(()=>[_(l,{modelValue:i.editingBadge.show_label,"onUpdate:modelValue":e[7]||(e[7]=L=>i.editingBadge.show_label=L),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Show Label on Badge")),1)]),_:1},8,["modelValue"])]),_:1}),i.editingBadge.show_label=="yes"?(v(),$(te,{key:0},[_(E,{gutter:20},{default:w(()=>[_(S,{span:12},{default:w(()=>[_(c,{label:t.$t("Color")},{default:w(()=>[_(x,{predefine:t.appVars.suggestedColors,onActiveChange:e[8]||(e[8]=L=>{i.editingBadge.color=L}),modelValue:i.editingBadge.color,"onUpdate:modelValue":e[9]||(e[9]=L=>i.editingBadge.color=L)},null,8,["predefine","modelValue"])]),_:1},8,["label"])]),_:1}),_(S,{span:12},{default:w(()=>[_(c,{label:t.$t("Background Color")},{default:w(()=>[_(x,{predefine:t.appVars.suggestedColors,onActiveChange:e[10]||(e[10]=L=>{i.editingBadge.background_color=L}),modelValue:i.editingBadge.background_color,"onUpdate:modelValue":e[11]||(e[11]=L=>i.editingBadge.background_color=L)},null,8,["predefine","modelValue"])]),_:1},8,["label"])]),_:1})]),_:1}),g("p",null,M(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(()=>[G(M(t.$t("Save")),1)]),_:1})]),_:1})]),_:1})):O("",!0)]),_:1},8,["modelValue","title"]),i.openUpgradeModal?(v(),R(P,{key:0,showModal:i.openUpgradeModal,onCloseModal:e[15]||(e[15]=L=>i.openUpgradeModal=!1),upgrade_module:"user_badge_module"},null,8,["showModal"])):O("",!0)],64)}const gKe=de(iKe,[["render",mKe],["__scopeId","data-v-e4527d65"]]),vKe={name:"SocialMediaLinkConfig",data(){return{providers:null,loading:!1,saving:!1,showSettings:!1}},methods:{openSettings(){this.loading=!0,this.showSettings=!0,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)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.saving=!1})}}},_Ke={class:"fcom_storage_settings"},yKe={key:0,class:"white_loaded"},bKe={key:1,class:"dialog_body"},wKe={class:"fcom_level_table"},CKe={class:"fcom_level_table_row fcom_header_row"},kKe={class:"fcom_lavel_desc"},xKe={class:"fcom_lavel_actions"},SKe={style:{display:"flex","align-items":"center","column-gap":"10px"},class:"fcom_lavel_desc"},$Ke=["innerHTML"],AKe={class:"fcom_lavel_actions"},MKe={class:"dialog_footer"},EKe={key:1,class:"fcom_upgrade_banner"},TKe={class:"fcom_upgrade_description"},PKe=["href"],IKe={key:2};function LKe(t,e,n,s,i,o){const r=Ge,a=Wt,l=ye,c=xo,u=gd,d=or,h=_t("loading");return v(),$(te,null,[g("div",_Ke,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=f=>o.openSettings())},{default:w(()=>[G(M(t.$t("Settings")),1)]),_:1})]),_(d,{"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:i.showSettings,"onUpdate:modelValue":e[1]||(e[1]=f=>i.showSettings=f),direction:"rtl"},{header:w(({close:f})=>[g("h4",null,M(t.$t("Social Media Links Settings")),1)]),default:w(()=>[i.loading?(v(),$("div",yKe,[_(a,{rows:5,animated:!0})])):i.providers?(v(),$("div",bKe,[g("div",wKe,[g("div",CKe,[g("div",kKe,M(t.$t("Provider")),1),g("div",xKe,M(t.$t("Status")),1)]),(v(!0),$(te,null,be(i.providers,(f,p)=>(v(),$("div",{style:{padding:"5px 10px"},class:"fcom_level_table_row",key:p},[g("div",SKe,[_(l,null,{default:w(()=>[g("span",{innerHTML:f.icon_svg},null,8,$Ke)]),_:2},1024),g("span",null,M(f.title),1),f.enabled==="yes"?(v(),R(c,{key:0,type:"success",size:"small",effect:"light"},{default:w(()=>[G(M(t.$t("Enabled")),1)]),_:1})):(v(),R(c,{key:1,type:"info",size:"small"},{default:w(()=>[G(M(t.$t("disabled")),1)]),_:1}))]),g("div",AKe,[_(u,{modelValue:f.enabled,"onUpdate:modelValue":m=>f.enabled=m,"active-value":"yes","inactive-value":"no"},null,8,["modelValue","onUpdate:modelValue"])])]))),128))]),g("div",MKe,[t.has_pro?Pe((v(),R(r,{key:0,class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[G(M(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[h,i.saving]]):(v(),$("div",EKe,[g("p",TKe,M(t.$t("Please upgrade to Pro to use this feature")),1),g("a",{class:"el-button",href:t.appVars.upgrade_url,target:"_blank"},M(t.$t("Upgrade to Pro")),9,PKe)]))])])):(v(),$("div",IKe,[g("p",null,M(t.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"])],64)}const OKe=de(vKe,[["render",LKe]]),DKe={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(s=>!this.socketConfig[s]).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()}},RKe={key:1},VKe={class:"fcom_help_text"},FKe={key:0},NKe={key:1},BKe={class:"fcom_help_text"},zKe={class:"fcom_help_text"},HKe={class:"fcom_section_divider"},UKe={class:"fcom_help_text"},jKe={key:0},WKe={key:1},YKe={class:"fcom_help_text"},GKe={key:0},qKe={key:1},XKe={key:2},KKe={class:"fcom_help_text"},ZKe={key:2},JKe={class:"dialog_footer"},QKe={key:1,class:"fcom_upgrade_banner"},eZe={class:"fcom_upgrade_description"},tZe=["href"];function nZe(t,e,n,s,i,o){const r=Wt,a=Ht,l=en,c=ko,u=Ps,d=db,h=Tc,f=vt,p=an,m=Jt,b=rn,y=Ge,C=_t("loading");return v(),$(te,null,[i.loading?(v(),R(r,{key:0,animated:!0,rows:5})):i.settings?(v(),$("div",RKe,[_(b,{modelValue:i.settings,"onUpdate:modelValue":e[14]||(e[14]=k=>i.settings=k),"label-position":"top"},{default:w(()=>[_(l,null,{default:w(()=>[_(a,{"true-value":"yes","false-value":"no",modelValue:i.settings.messaging_email_status,"onUpdate:modelValue":e[0]||(e[0]=k=>i.settings.messaging_email_status=k),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Send email notification on one-to-one messages (unread) to individual members")),1)]),_:1},8,["modelValue"]),g("div",VKe,[i.settings.messaging_email_status=="no"?(v(),$("p",FKe,M(t.$t("Email notification on messaging is disabled")),1)):(v(),$("p",NKe,M(t.$t("Emails will be sent based on your Email Frequency settings")),1))])]),_:1}),i.settings.messaging_email_status=="yes"?(v(),R(l,{key:0,label:t.$t("Default Email sending frequency for one-to-one messages")},{default:w(()=>[_(u,{modelValue:i.settings.messaging_email_frequency,"onUpdate:modelValue":e[1]||(e[1]=k=>i.settings.messaging_email_frequency=k)},{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",BKe,[g("p",null,M(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:i.settings.who_can_initiate_message,"onUpdate:modelValue":e[2]||(e[2]=k=>i.settings.who_can_initiate_message=k)},{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"]),i.settings.who_can_initiate_message==="everyone"?(v(),R(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:i.settings.points_to_initiate_message,"onUpdate:modelValue":e[3]||(e[3]=k=>i.settings.points_to_initiate_message=k),min:0},null,8,["modelValue"]),g("div",zKe,[g("p",null,M(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",HKe,[g("h4",null,M(t.$t("Real-time Chat")),1)]),_(l,null,{default:w(()=>[_(a,{"true-value":"yes","false-value":"no",modelValue:i.settings.realtime_enabled,"onUpdate:modelValue":e[4]||(e[4]=k=>i.settings.realtime_enabled=k),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Enable Real-time Chat")),1)]),_:1},8,["modelValue"]),g("div",UKe,[i.settings.realtime_enabled==="no"?(v(),$("p",jKe,M(t.$t("Real-time chat is disabled. Messages will be delivered on page refresh.")),1)):(v(),$("p",WKe,M(t.$t("Real-time chat is enabled. Messages will be delivered instantly via WebSocket.")),1))])]),_:1}),o.isRealTimeEnabled?(v(),R(l,{key:2,label:t.$t("Socket Provider")},{default:w(()=>[_(u,{modelValue:i.settings.socket_provider,"onUpdate:modelValue":e[5]||(e[5]=k=>i.settings.socket_provider=k),onChange:e[6]||(e[6]=k=>o.maybeResetConfig())},{default:w(()=>[_(c,{value:"fluent-socket"},{default:w(()=>[G(M(t.$t("Fluent Socket")),1)]),_:1}),_(c,{value:"pusher"},{default:w(()=>[G(M(t.$t("Pusher")),1)]),_:1}),_(c,{value:"custom"},{default:w(()=>[G(M(t.$t("Custom")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",YKe,[i.settings.socket_provider==="fluent-socket"?(v(),$("p",GKe,[G(M(t.$t("Use the built-in Fluent Socket server. You can create your free credentials at"))+" ",1),e[15]||(e[15]=g("a",{href:"https://fluentsocket.com/",target:"_blank",rel:"noopener"},"fluentsocket.com",-1))])):i.settings.socket_provider==="pusher"?(v(),$("p",qKe,M(t.$t("Use Pusher.com for WebSocket connections")),1)):(v(),$("p",XKe,M(t.$t("Use a custom Pusher-compatible WebSocket server (e.g., Soketi)")),1))])]),_:1},8,["label"])):O("",!0),o.isRealTimeEnabled&&o.isWpConfigDefined?(v(),R(h,{key:3,type:"info",closable:!1,class:"fcom_mb_20"},{default:w(()=>[G(M(t.$t("Socket configuration is defined in wp-config.php and cannot be changed here.")),1)]),_:1})):o.isRealTimeEnabled?(v(),$(te,{key:4},[_(l,{label:t.$t("App ID")},{default:w(()=>[_(f,{modelValue:i.socketConfig.appId,"onUpdate:modelValue":e[7]||(e[7]=k=>i.socketConfig.appId=k),placeholder:t.$t("Your app ID")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(l,{label:t.$t("App Key")},{default:w(()=>[_(f,{modelValue:i.socketConfig.key,"onUpdate:modelValue":e[8]||(e[8]=k=>i.socketConfig.key=k),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:i.socketConfig.secret,"onUpdate:modelValue":e[9]||(e[9]=k=>i.socketConfig.secret=k),placeholder:t.$t("Your app secret"),"show-password":""},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),o.showClusterField?(v(),R(l,{key:0,label:t.$t("Cluster")},{default:w(()=>[_(f,{modelValue:i.socketConfig.cluster,"onUpdate:modelValue":e[10]||(e[10]=k=>i.socketConfig.cluster=k),placeholder:i.settings.socket_provider==="pusher"?"mt1":t.$t("Optional")},null,8,["modelValue","placeholder"]),g("div",KKe,[g("p",null,M(t.$t("Pusher cluster region (e.g., mt1, us2, eu, ap1). Optional for custom providers.")),1)])]),_:1},8,["label"])):O("",!0),o.isCustomProvider?(v(),$(te,{key:1},[_(l,{label:t.$t("Host")},{default:w(()=>[_(f,{modelValue:i.socketConfig.options.host,"onUpdate:modelValue":e[11]||(e[11]=k=>i.socketConfig.options.host=k),placeholder:t.$t("e.g., ws.example.com")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(l,{label:t.$t("Port")},{default:w(()=>[_(f,{modelValue:i.socketConfig.options.port,"onUpdate:modelValue":e[12]||(e[12]=k=>i.socketConfig.options.port=k),placeholder:"443"},null,8,["modelValue"])]),_:1},8,["label"]),_(l,{label:t.$t("Scheme")},{default:w(()=>[_(m,{modelValue:i.socketConfig.options.scheme,"onUpdate:modelValue":e[13]||(e[13]=k=>i.socketConfig.options.scheme=k),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(),$("div",ZKe,[...e[16]||(e[16]=[g("h3",null,"Sorry, settings could not be loaded. Please make sure you have latest version of FluentCommunity Pro and Fluent Messaging Addons",-1)])])),g("div",JKe,[t.has_pro?Pe((v(),R(y,{key:0,class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[G(M(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[C,i.saving]]):(v(),$("div",QKe,[g("p",eZe,M(t.$t("Please upgrade to Pro to use this feature")),1),g("a",{class:"el-button",href:t.appVars.upgrade_url,target:"_blank"},M(t.$t("Upgrade to Pro")),9,tZe)]))])],64)}const sZe=de(DKe,[["render",nZe]]),iZe={name:"FollowingConfigView",props:["features"],data(){return{follower_settings:null,showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1}},components:{UpgradeToProModal:Jf},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})}}},oZe={class:"fcom_storage_settings"},rZe={key:0,class:"white_loaded"},aZe={key:1,class:"dialog_body"},lZe={class:"fcom_mb_20"},cZe={class:"dialog_footer"},uZe={key:2};function dZe(t,e,n,s,i,o){const r=Ge,a=Wt,l=Ht,c=en,u=ko,d=Ps,h=rn,f=or,p=H("UpgradeToProModal"),m=_t("loading");return v(),$(te,null,[g("div",oZe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=b=>o.openSettings())},{default:w(()=>[G(M(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:i.showSettings,"onUpdate:modelValue":e[5]||(e[5]=b=>i.showSettings=b),direction:"rtl"},{header:w(({close:b})=>[g("h4",null,M(t.$t("Follower Module Settings")),1)]),default:w(()=>[i.fetching?(v(),$("div",rZe,[_(a,{rows:5,animated:!0})])):i.follower_settings?(v(),$("div",aZe,[_(h,{onSubmit:e[4]||(e[4]=Be(b=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,null,{default:w(()=>[_(l,{modelValue:n.features.followers_module,"onUpdate:modelValue":e[1]||(e[1]=b=>n.features.followers_module=b),"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(),$(te,{key:0},[g("h5",lZe,M(t.$t("Following Config")),1),_(c,{label:t.$t("Who can see the followers list on the user's profile?")},{default:w(()=>[_(d,{modelValue:i.follower_settings.who_can_see_followers,"onUpdate:modelValue":e[2]||(e[2]=b=>i.follower_settings.who_can_see_followers=b)},{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:i.follower_settings.who_can_see_followings,"onUpdate:modelValue":e[3]||(e[3]=b=>i.follower_settings.who_can_see_followings=b)},{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",cZe,[Pe((v(),R(r,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[G(M(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[m,i.saving]])])])):(v(),$("div",uZe,[g("p",null,M(t.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"]),i.openUpgradeModal?(v(),R(p,{key:0,showModal:i.openUpgradeModal,onCloseModal:e[6]||(e[6]=b=>i.openUpgradeModal=!1),upgrade_module:"follower_module"},null,8,["showModal"])):O("",!0)],64)}const hZe=de(iZe,[["render",dZe]]),fZe={name:"FluentPlayerCustomization",components:{InfoFilled:$c},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}}},pZe={key:0,class:"fluent-player-top-title-overlay"},mZe={class:"fluent-player-title-stack"},gZe={class:"fluent-player-media-title"},vZe={key:1,class:"fp-media-controls-center"},_Ze={class:"fp-controls-group center"},yZe={key:2,class:"fp-media-controls-bottom"},bZe={key:0,class:"fp-controls-group"},wZe={key:0,class:"fp-media-button vds-button"},CZe={key:1,class:"fp-media-button vds-button"},kZe={key:2,class:"fp-media-button vds-button"},xZe={key:3,class:"fp-media-button vds-button"},SZe={key:4,class:"fp-media-slider vds-time-slider slider-volume"},$Ze={key:5,class:"fp-media-time-group"},AZe={key:6,class:"fp-media-controls-spacer-slider"},MZe={key:7,class:"fp-media-button vds-button"},EZe={key:8,class:"fp-media-button vds-button"},TZe={key:9,class:"fp-media-button vds-button"},PZe={key:10,class:"fp-media-button vds-button"},IZe={key:11,class:"fp-media-button vds-button"},LZe={key:0,class:"fp-media-slider vds-time-slider"},OZe={key:1,class:"fp-controls-group"},DZe={key:0,class:"fp-media-button vds-button"},RZe={key:1,class:"fp-media-button vds-button"},VZe={key:2,class:"fp-media-button vds-button"},FZe={key:3,class:"fp-media-button vds-button"},NZe={key:4,class:"fp-media-slider vds-time-slider slider-volume"},BZe={key:5,class:"fp-media-time-group"},zZe={key:6,class:"fp-media-button vds-button"},HZe={key:7,class:"fp-media-button vds-button"},UZe={key:8,class:"fp-media-button vds-button"},jZe={key:9,class:"fp-media-button vds-button"},WZe={key:10,class:"fp-media-button vds-button"},YZe={key:2,class:"fp-controls-group"},GZe={key:0,class:"fp-media-button vds-button"},qZe={key:1,class:"fp-media-button vds-button"},XZe={key:2,class:"fp-media-slider vds-time-slider slider-volume"},KZe={key:3,class:"fp-media-button vds-button"},ZZe={key:4,class:"fp-media-button vds-button"},JZe={key:5,class:"fp-media-button vds-button"},QZe={key:3,class:"fp-controls-group fp-floating-bar"},eJe={key:0,class:"fp-media-button vds-button"},tJe={key:1,class:"fp-media-button vds-button"},nJe={key:2,class:"fp-media-button vds-button"},sJe={key:3,class:"fp-media-time-group"},iJe={key:4,class:"fp-media-controls-spacer-slider"},oJe={key:5,class:"fp-media-button vds-button"},rJe={key:6,class:"fp-media-slider vds-time-slider slider-volume"},aJe={key:7,class:"fp-media-button vds-button"},lJe={key:8,class:"fp-media-button vds-button"},cJe={key:9,class:"fp-media-button vds-button"},uJe={key:10,class:"fp-media-button vds-button"},dJe={key:11,class:"fp-media-button vds-button"},hJe={class:"player_settings_wrap"},fJe={class:"setting_row"},pJe={class:"setting_row_flex"},mJe={class:"setting_row_flex"},gJe={key:0,class:"setting_row"},vJe={key:1,class:"setting_row"},_Je={key:2,class:"setting_row"},yJe={key:3,class:"setting_row"},bJe={key:4,class:"setting_row"},wJe={key:5,class:"setting_row"},CJe={key:6,class:"setting_row"},kJe={key:7,class:"setting_row"},xJe={key:8,class:"setting_row"},SJe={key:9,class:"setting_row"},$Je={key:10,class:"setting_row"},AJe={key:1,class:"setting_row"},MJe={class:"setting_row"},EJe={key:2,class:"setting_row"},TJe={key:3,class:"setting_row"},PJe={key:4,class:"setting_row"},IJe={class:"setting_row setting_row--column"},LJe={class:"setting_row__label-with-icon"},OJe={class:"fcom_help_text"},DJe={class:"fcom_form_label"},RJe={class:"fcom_help_text"};function VJe(t,e,n,s,i,o){const r=fd,a=an,l=Jt,c=pd,u=gd,d=H("InfoFilled"),h=ye,f=di,p=hd,m=en,b=ko,y=Ps;return v(),$("div",{class:W(["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:Ke({"--media-brand":o.localSettings.brandColor,"--fp-control-bar-bg":o.localSettings.controlBarColor||void 0})},[g("div",{class:W(["player-preview","fp-skin-"+o.localSettings.skin])},[o.localSettings.skin!=="minimal"&&!o.behaviors.hide_top_controls?(v(),$("div",pZe,[g("div",mZe,[g("span",gZe,M(t.$t("The Title of the Video")),1)])])):O("",!0),o.behaviors.hide_center_controls?O("",!0):(v(),$("div",vZe,[g("div",_Ze,[g("button",{onClick:e[0]||(e[0]=Be(C=>t.doNothing(),["prevent"])),class:"fp-media-button vds-button"},[...e[24]||(e[24]=[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)])])])])),o.localSettings.skin!=="minimal"&&!o.behaviors.hide_bottom_controls?(v(),$("div",yZe,[o.localSettings.skin==="modern"?(v(),$("div",bZe,[o.controls.backward?(v(),$("button",wZe,[...e[25]||(e[25]=[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)])])):O("",!0),o.controls.play?(v(),$("button",CZe,[...e[26]||(e[26]=[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)])])):O("",!0),o.controls.forward?(v(),$("button",kZe,[...e[27]||(e[27]=[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)])])):O("",!0),o.controls.volume?(v(),$("button",xZe,[...e[28]||(e[28]=[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)])])):O("",!0),o.controls.volume?(v(),$("div",SZe,[...e[29]||(e[29]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),o.controls.current_time?(v(),$("div",$Ze,[...e[30]||(e[30]=[g("span",null,"0:00",-1),g("span",null,"/",-1),g("span",null,"5:34",-1)])])):O("",!0),o.controls.progress_bar?(v(),$("div",AZe,[...e[31]||(e[31]=[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)])])):O("",!0),o.controls.captions_toggle?(v(),$("button",MZe,[...e[32]||(e[32]=[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)])])):O("",!0),o.controls.playback_speed?(v(),$("button",EZe,[...e[33]||(e[33]=[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)])])):O("",!0),o.controls.settings?(v(),$("button",TZe,[...e[34]||(e[34]=[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)])])):O("",!0),o.controls.pip?(v(),$("button",PZe,[...e[35]||(e[35]=[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)])])):O("",!0),o.controls.fullscreen?(v(),$("button",IZe,[...e[36]||(e[36]=[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)])])):O("",!0)])):O("",!0),o.localSettings.skin==="classic"?(v(),$(te,{key:1},[o.controls.progress_bar?(v(),$("div",LZe,[...e[37]||(e[37]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),o.localSettings.skin==="classic"?(v(),$("div",OZe,[o.controls.backward?(v(),$("button",DZe,[...e[38]||(e[38]=[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)])])):O("",!0),o.controls.play?(v(),$("button",RZe,[...e[39]||(e[39]=[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)])])):O("",!0),o.controls.forward?(v(),$("button",VZe,[...e[40]||(e[40]=[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)])])):O("",!0),o.controls.volume?(v(),$("button",FZe,[...e[41]||(e[41]=[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)])])):O("",!0),o.controls.volume?(v(),$("div",NZe,[...e[42]||(e[42]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),o.controls.current_time?(v(),$("div",BZe,[...e[43]||(e[43]=[g("span",null,"0:00",-1),g("span",null,"/",-1),g("span",null,"5:34",-1)])])):O("",!0),e[49]||(e[49]=g("div",{class:"fp-media-controls-spacer"},null,-1)),o.controls.captions_toggle?(v(),$("button",zZe,[...e[44]||(e[44]=[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)])])):O("",!0),o.controls.playback_speed?(v(),$("button",HZe,[...e[45]||(e[45]=[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)])])):O("",!0),o.controls.settings?(v(),$("button",UZe,[...e[46]||(e[46]=[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)])])):O("",!0),o.controls.pip?(v(),$("button",jZe,[...e[47]||(e[47]=[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)])])):O("",!0),o.controls.fullscreen?(v(),$("button",WZe,[...e[48]||(e[48]=[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)])])):O("",!0)])):O("",!0)],64)):O("",!0),o.localSettings.skin==="simple"?(v(),$("div",YZe,[o.controls.play?(v(),$("button",GZe,[...e[50]||(e[50]=[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)])])):O("",!0),o.controls.volume?(v(),$("button",qZe,[...e[51]||(e[51]=[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)])])):O("",!0),o.controls.volume?(v(),$("div",XZe,[...e[52]||(e[52]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),e[56]||(e[56]=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)),o.controls.captions_toggle?(v(),$("button",KZe,[...e[53]||(e[53]=[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)])])):O("",!0),o.controls.pip?(v(),$("button",ZZe,[...e[54]||(e[54]=[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)])])):O("",!0),o.controls.fullscreen?(v(),$("button",JZe,[...e[55]||(e[55]=[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)])])):O("",!0)])):O("",!0),o.localSettings.skin==="floating"?(v(),$("div",QZe,[o.controls.backward?(v(),$("button",eJe,[...e[57]||(e[57]=[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)])])):O("",!0),o.controls.play?(v(),$("button",tJe,[...e[58]||(e[58]=[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)])])):O("",!0),o.controls.forward?(v(),$("button",nJe,[...e[59]||(e[59]=[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)])])):O("",!0),o.controls.current_time?(v(),$("div",sJe,[...e[60]||(e[60]=[g("span",null,"0:00",-1),g("span",null,"/",-1),g("span",null,"5:34",-1)])])):O("",!0),o.controls.progress_bar?(v(),$("div",iJe,[...e[61]||(e[61]=[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)])])):O("",!0),o.controls.volume?(v(),$("button",oJe,[...e[62]||(e[62]=[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)])])):O("",!0),o.controls.volume?(v(),$("div",rJe,[...e[63]||(e[63]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),o.controls.captions_toggle?(v(),$("button",aJe,[...e[64]||(e[64]=[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)])])):O("",!0),o.controls.playback_speed?(v(),$("button",lJe,[...e[65]||(e[65]=[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)])])):O("",!0),o.controls.settings?(v(),$("button",cJe,[...e[66]||(e[66]=[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)])])):O("",!0),o.controls.pip?(v(),$("button",uJe,[...e[67]||(e[67]=[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)])])):O("",!0),o.controls.fullscreen?(v(),$("button",dJe,[...e[68]||(e[68]=[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)])])):O("",!0)])):O("",!0)])):O("",!0)],2)],4)]),_:1}),_(r,{span:7,class:"player_settings_col"},{default:w(()=>[g("div",hJe,[g("div",fJe,[g("span",null,M(t.$t("Skin")),1),_(l,{modelValue:o.localSettings.skin,"onUpdate:modelValue":e[1]||(e[1]=C=>o.localSettings.skin=C)},{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",pJe,[g("label",null,M(t.$t("Brand Color")),1),_(c,{modelValue:o.localSettings.brandColor,"onUpdate:modelValue":e[2]||(e[2]=C=>o.localSettings.brandColor=C)},null,8,["modelValue"])]),g("div",mJe,[g("label",null,M(t.$t("Control Bar Color")),1),_(c,{modelValue:o.localSettings.controlBarColor,"onUpdate:modelValue":e[3]||(e[3]=C=>o.localSettings.controlBarColor=C)},null,8,["modelValue"])]),o.localSettings.skin!=="minimal"?(v(),$(te,{key:0},[g("h4",null,M(t.$t("Controls")),1),o.isControlVisible("progress_bar")?(v(),$("div",gJe,[g("span",null,M(t.$t("Progress Bar")),1),_(u,{modelValue:o.localSettings.controls.progress_bar,"onUpdate:modelValue":e[4]||(e[4]=C=>o.localSettings.controls.progress_bar=C)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("play")?(v(),$("div",vJe,[g("span",null,M(t.$t("Play/Pause")),1),_(u,{modelValue:o.localSettings.controls.play,"onUpdate:modelValue":e[5]||(e[5]=C=>o.localSettings.controls.play=C)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("forward")?(v(),$("div",_Je,[g("span",null,M(t.$t("Forward")),1),_(u,{modelValue:o.localSettings.controls.forward,"onUpdate:modelValue":e[6]||(e[6]=C=>o.localSettings.controls.forward=C)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("backward")?(v(),$("div",yJe,[g("span",null,M(t.$t("Backward")),1),_(u,{modelValue:o.localSettings.controls.backward,"onUpdate:modelValue":e[7]||(e[7]=C=>o.localSettings.controls.backward=C)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("volume")?(v(),$("div",bJe,[g("span",null,M(t.$t("Volume")),1),_(u,{modelValue:o.localSettings.controls.volume,"onUpdate:modelValue":e[8]||(e[8]=C=>o.localSettings.controls.volume=C)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("current_time")?(v(),$("div",wJe,[g("span",null,M(t.$t("Current Time")),1),_(u,{modelValue:o.localSettings.controls.current_time,"onUpdate:modelValue":e[9]||(e[9]=C=>o.localSettings.controls.current_time=C)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("playback_speed")?(v(),$("div",CJe,[g("span",null,M(t.$t("Playback Speed")),1),_(u,{modelValue:o.localSettings.controls.playback_speed,"onUpdate:modelValue":e[10]||(e[10]=C=>o.localSettings.controls.playback_speed=C)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("settings")?(v(),$("div",kJe,[g("span",null,M(t.$t("Settings Menu")),1),_(u,{modelValue:o.localSettings.controls.settings,"onUpdate:modelValue":e[11]||(e[11]=C=>o.localSettings.controls.settings=C)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("fullscreen")?(v(),$("div",xJe,[g("span",null,M(t.$t("Fullscreen")),1),_(u,{modelValue:o.localSettings.controls.fullscreen,"onUpdate:modelValue":e[12]||(e[12]=C=>o.localSettings.controls.fullscreen=C)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("pip")?(v(),$("div",SJe,[g("span",null,M(t.$t("Picture in Picture")),1),_(u,{modelValue:o.localSettings.controls.pip,"onUpdate:modelValue":e[13]||(e[13]=C=>o.localSettings.controls.pip=C)},null,8,["modelValue"])])):O("",!0),o.isControlVisible("captions_toggle")?(v(),$("div",$Je,[g("span",null,M(t.$t("Captions Toggle")),1),_(u,{modelValue:o.localSettings.controls.captions_toggle,"onUpdate:modelValue":e[14]||(e[14]=C=>o.localSettings.controls.captions_toggle=C)},null,8,["modelValue"])])):O("",!0)],64)):O("",!0),g("h4",null,M(t.$t("Behaviors")),1),o.localSettings.skin!=="minimal"?(v(),$("div",AJe,[g("span",null,M(t.$t("Muted Autoplay")),1),_(u,{modelValue:o.localSettings.behaviors.muted_autoplay,"onUpdate:modelValue":e[15]||(e[15]=C=>o.localSettings.behaviors.muted_autoplay=C)},null,8,["modelValue"])])):O("",!0),g("div",MJe,[g("span",null,M(t.$t("Save Play Position")),1),_(u,{modelValue:o.localSettings.behaviors.save_play_position,"onUpdate:modelValue":e[16]||(e[16]=C=>o.localSettings.behaviors.save_play_position=C)},null,8,["modelValue"])]),o.localSettings.skin!=="minimal"?(v(),$("div",EJe,[g("span",null,M(t.$t("Hide Top Controls")),1),_(u,{modelValue:o.localSettings.behaviors.hide_top_controls,"onUpdate:modelValue":e[17]||(e[17]=C=>o.localSettings.behaviors.hide_top_controls=C)},null,8,["modelValue"])])):O("",!0),o.localSettings.skin!=="minimal"?(v(),$("div",TJe,[g("span",null,M(t.$t("Hide Center Controls")),1),_(u,{modelValue:o.localSettings.behaviors.hide_center_controls,"onUpdate:modelValue":e[18]||(e[18]=C=>o.localSettings.behaviors.hide_center_controls=C)},null,8,["modelValue"])])):O("",!0),o.localSettings.skin!=="minimal"?(v(),$("div",PJe,[g("span",null,M(t.$t("Hide Bottom Controls")),1),_(u,{modelValue:o.localSettings.behaviors.hide_bottom_controls,"onUpdate:modelValue":e[19]||(e[19]=C=>o.localSettings.behaviors.hide_bottom_controls=C)},null,8,["modelValue"])])):O("",!0),g("div",IJe,[g("span",LJe,[G(M(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[20]||(e[20]=C=>o.localSettings.behaviors.load_strategy=C),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[21]||(e[21]=C=>o.localSettings.video_upload=C),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),_:1},8,["label"]),g("div",OJe,[g("p",null,M(t.$t("Allow space members to upload videos on post based on their permission.")),1)])]),_:1})]),_:1}),o.localSettings.video_upload==="yes"?(v(),R(p,{key:0,gutter:30,style:{"margin-top":"16px"}},{default:w(()=>[_(r,{span:24,style:{"margin-bottom":"4px"}},{default:w(()=>[g("label",DJe,M(t.$t("Who Can Upload Videos")),1)]),_:1}),_(r,{span:24},{default:w(()=>[_(y,{modelValue:o.localSettings.video_upload_role,"onUpdate:modelValue":e[22]||(e[22]=C=>o.localSettings.video_upload_role=C)},{default:w(()=>[_(b,{value:"admin",class:"fcom_radio"},{default:w(()=>[G(M(t.$t("Admins")),1)]),_:1}),_(b,{value:"admin_moderator",class:"fcom_radio"},{default:w(()=>[G(M(t.$t("Admins and Moderators")),1)]),_:1}),_(b,{value:"everyone",class:"fcom_radio"},{default:w(()=>[G(M(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[23]||(e[23]=C=>o.localSettings.play_embedded_videos=C),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),_:1},8,["label"]),g("div",RJe,[g("p",null,M(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 FJe=de(fZe,[["render",VJe]]),NJe={name:"FluentPlayerSettings",components:{FluentPlayerCustomization:FJe},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()}},BJe={key:1},zJe={class:"fcom_help_text"},HJe={class:"dialog_footer fcom_mt_20"};function UJe(t,e,n,s,i,o){const r=Wt,a=gd,l=en,c=H("FluentPlayerCustomization"),u=rn,d=Ge,h=_t("loading");return i.loading?(v(),R(r,{key:0,animated:!0,rows:5})):i.settings?(v(),$("div",BJe,[_(u,null,{default:w(()=>[_(l,{label:t.$t("Enable FluentPlayer"),class:"fcom_input_wrap",style:{"margin-bottom":"0"}},{default:w(()=>[_(a,{modelValue:i.settings.enable_fluent_player,"onUpdate:modelValue":e[0]||(e[0]=f=>i.settings.enable_fluent_player=f),"active-value":"yes","inactive-value":"no"},null,8,["modelValue"])]),_:1},8,["label"]),g("div",zJe,[g("p",null,M(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)]),_(c,{modelValue:i.settings,"onUpdate:modelValue":e[1]||(e[1]=f=>i.settings=f)},null,8,["modelValue"])]),_:1}),g("div",HJe,[Pe((v(),R(d,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[G(M(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[h,i.saving]])])])):O("",!0)}const jJe=de(NJe,[["render",UJe]]),WJe={name:"CustomProfileFieldsConfig",components:{UpgradeToProModal:Jf,FluentDnD:P1},props:["features"],data(){return{CloseBoldIcon:Ki(Lx),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:[],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"}]}},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}).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)}).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 s=this.$t("Are you sure you want to delete this group?");n&&(s+=" "+this.$t("Fields in this group will be moved to the default group.")),this.$confirm(s,this.$t("Warning"),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{const i=this.getDefaultGroupSlug();this.config.fields.forEach(o=>{o.group===e.slug&&(o.group=i)}),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(s=>s.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(([s,i])=>({key:s,label:i})):[]}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)},moveField(t,e){const n=this.config.fields.find(s=>s.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(i=>i.group!==e),s=[];this.config.groups.forEach(i=>{i.slug===e?s.push(...t.newItems):s.push(...n.filter(o=>o.group===i.slug))}),this.config.fields=s},onFieldCrossDrop({itemKey:t,sourceGroup:e,targetGroup:n}){const s=this.config.fields.find(i=>i.slug===t&&i.group===e);s&&(s.group=n,this.saveSettings())},onEmptyGroupDrop(t,e){const n=t.dataTransfer.getData("source-group"),s=t.dataTransfer.getData("text/plain");if(!n||!s||n===e)return;const i=this.config.fields.find(o=>o.slug===s&&o.group===n);i&&(i.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())}},YJe={class:"fcom_storage_settings"},GJe={key:0,class:"white_loaded"},qJe={key:1,class:"fcom_cpf_settings"},XJe={class:"fcom_cpf_header"},KJe={key:0,style:{padding:"1rem"}},ZJe={key:1,class:"fcom_card_sections fcom_cpf_groups"},JJe={class:"fcom_section_primary_item"},QJe={class:"fcom_section_primary_item_title"},eQe={class:"fcom_heading_item"},tQe={class:"fcom_space_counts"},nQe={class:"fcom_section_item_actions"},sQe={key:0,class:"fcom_section_items"},iQe={class:"fcom_heading_item"},oQe={key:0,style:{color:"var(--el-color-danger)"}},rQe={class:"fcom_section_item_actions"},aQe={style:{position:"relative"}},lQe={class:"fcom_action_field_popup"},cQe={class:"fcom_move_popup_close"},uQe=["onDrop"],dQe={key:2},hQe={class:"dialog_header"},fQe={class:"dialog_body"},pQe={class:"dialog_footer"},mQe={class:"dialog_header"},gQe={class:"dialog_body"},vQe={style:{display:"flex",gap:"8px","margin-bottom":"4px","font-size":"12px",color:"var(--fcom-text-off, #919399)",width:"100%"}},_Qe={style:{flex:"1"}},yQe={style:{flex:"1"}},bQe={class:"dialog_footer"};function wQe(t,e,n,s,i,o){const r=Ge,a=Wt,l=Ht,c=en,u=ye,d=xo,h=H("Plus"),f=H("MoreFilled"),p=Ca,m=ka,b=wa,y=gd,C=an,k=Jt,x=rn,S=H("CloseBold"),E=H("FluentDnD"),T=or,P=vt,I=Ss,L=BR,V=ko,D=Ps,z=H("UpgradeToProModal"),Y=_t("loading");return v(),$(te,null,[g("div",YJe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=B=>o.openSettings())},{default:w(()=>[G(M(t.$t("Settings")),1)]),_:1})]),_(T,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,size:t.dialogWidth,modelValue:i.showSettings,"onUpdate:modelValue":e[9]||(e[9]=B=>i.showSettings=B),direction:"rtl"},{header:w(()=>[g("h4",null,M(t.$t("Custom Profile Fields Settings")),1)]),default:w(()=>[i.fetching?(v(),$("div",GJe,[_(a,{rows:5,animated:!0})])):i.config!==null?(v(),$("div",qJe,[_(x,{onSubmit:e[8]||(e[8]=Be(B=>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]=B=>n.features.custom_profile_fields=B),label:t.$t("Enable Custom Profile Fields"),size:"large",class:"fcom_checkbox",onChange:e[2]||(e[2]=B=>{B==="yes"&&i.config.is_enabled!=="yes"&&!i.saving&&o.saveSettings()})},null,8,["modelValue","label"])]),_:1}),n.features.custom_profile_fields==="yes"?(v(),$(te,{key:0},[g("div",XJe,[g("h3",null,M(t.$t("Field Groups")),1),_(r,{class:"fcom_primary_button",onClick:e[3]||(e[3]=B=>o.openGroupEditor())},{default:w(()=>[G(M(t.$t("Add Group")),1)]),_:1})]),i.config.groups.length?(v(),$("div",ZJe,[_(E,{items:i.config.groups,"row-key":"slug"},{item:w(({data:B,index:U})=>[g("div",{class:W({fcom_collapsed_group:i.collapsedGroups.includes(B.slug)})},[g("div",JJe,[g("div",QJe,[e[28]||(e[28]=g("div",{class:"fcom_drag_handle"},"⋮⋮",-1)),g("div",eQe,[g("h4",null,M(B.label),1),g("div",null,[o.getGroupFields(B.slug).length?(v(),R(r,{key:0,style:{"background-color":"var(--el-fill-color-light)"},class:"fcom_collapse_btn",onClick:X=>o.toggleGroup(B.slug),size:"small",text:""},{default:w(()=>[_(u,null,{default:w(()=>[...e[27]||(e[27]=[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)])]),_:1}),g("span",tQe,M(t.$t("%s fields",o.getGroupFields(B.slug).length)),1)]),_:2},1032,["onClick"])):O("",!0),B.is_system?(v(),R(d,{key:1,size:"small",type:"info",style:{"margin-left":"6px"}},{default:w(()=>[G(M(t.$t("System")),1)]),_:1})):O("",!0),_(r,{style:{"background-color":"var(--el-fill-color-light)","margin-left":"5px"},size:"small",text:"",onClick:X=>o.openFieldEditor(null,B.slug)},{default:w(()=>[_(u,null,{default:w(()=>[_(h)]),_:1})]),_:1},8,["onClick"])])])]),g("div",nQe,[_(r,{class:"fcom_secondary_button",onClick:X=>o.openGroupEditor(U)},{default:w(()=>[G(M(t.$t("Edit Info")),1)]),_:1},8,["onClick"]),B.is_system?O("",!0):(v(),R(b,{key:0,trigger:"click",onCommand:X=>o.handleGroupAction(X,U)},{dropdown:w(()=>[_(m,null,{default:w(()=>[_(p,{command:"delete"},{default:w(()=>[G(M(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"])]),_:1},8,["onCommand"]))])]),i.collapsedGroups.includes(B.slug)?O("",!0):(v(),$("div",sQe,[o.hasGroupFields(B.slug)?(v(),R(E,{key:0,items:o.getGroupFields(B.slug),"row-key":"slug",group:B.slug,"item-class":"fcom_section_item",onDrop:X=>o.onFieldDrop(X,B.slug),onCrossDrop:o.onFieldCrossDrop},{item:w(({data:X})=>[g("div",{class:"fcom_section_item_title",style:Ke(X.is_enabled?"":"opacity: 0.5")},[e[29]||(e[29]=g("div",{class:"fcom_drag_handle"},"⋮⋮",-1)),g("p",iQe,[G(M(X.label)+" ",1),X.is_required?(v(),$("span",oQe,"*")):O("",!0),_(d,{size:"small",type:"info"},{default:w(()=>[G(M(X.type),1)]),_:2},1024),_(d,{size:"small",type:o.privacyMeta(X.privacy).tag},{default:w(()=>[G(M(o.privacyMeta(X.privacy).short),1)]),_:2},1032,["type"])])],4),g("div",rQe,[_(y,{modelValue:X.is_enabled,"onUpdate:modelValue":K=>X.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(X.slug)},{default:w(()=>[G(M(t.$t("Edit")),1)]),_:1},8,["onClick"]),g("div",aQe,[_(b,{trigger:"click",onCommand:K=>o.handleFieldAction(K,X)},{dropdown:w(()=>[_(m,null,{default:w(()=>[_(p,{command:"move"},{default:w(()=>[G(M(t.$t("Move")),1)]),_:1}),_(p,{command:"delete"},{default:w(()=>[G(M(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"])]),_:1},8,["onCommand"]),Pe(g("div",lQe,[_(x,{onSubmit:e[5]||(e[5]=Be(K=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,{label:t.$t("Move to a different Group")},{default:w(()=>[_(k,{placeholder:t.$t("Select Group"),modelValue:i.moveTargetGroup,"onUpdate:modelValue":e[4]||(e[4]=K=>i.moveTargetGroup=K)},{default:w(()=>[(v(!0),$(te,null,be(i.config.groups.filter(K=>K.slug!==X.group),K=>(v(),R(C,{key:K.slug,label:K.label,value:K.slug},null,8,["label","value"]))),128))]),_:2},1032,["placeholder","modelValue"])]),_:2},1032,["label"]),_(r,{disabled:!i.moveTargetGroup,onClick:K=>o.moveField(X.slug,i.moveTargetGroup),class:"fcom_primary_button"},{default:w(()=>[G(M(t.$t("Move Field")),1)]),_:1},8,["disabled","onClick"])]),_:2},1024),g("div",cQe,[_(u,{onClick:e[6]||(e[6]=K=>i.openedFieldSlug=null)},{default:w(()=>[_(S)]),_:1})])],512),[[Xt,i.openedFieldSlug===X.slug]])])])]),_:2},1032,["items","group","onDrop","onCrossDrop"])):(v(),$("div",{key:1,style:{padding:"10px 15px 10px 35px",color:"var(--fcom-text-off, #919399)","font-size":"13px"},onDragover:e[7]||(e[7]=Be(()=>{},["prevent"])),onDrop:Be(X=>o.onEmptyGroupDrop(X,B.slug),["prevent"])},M(t.$t("No fields in this group. Click + to add one.")),41,uQe))]))],2)]),_:1},8,["items"])])):(v(),$("div",KJe,[g("p",null,M(t.$t("No groups configured yet.")),1)]))],64)):O("",!0),_(c,null,{default:w(()=>[Pe((v(),R(r,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[G(M(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[Y,i.saving]])]),_:1})]),_:1})])):(v(),$("div",dQe,[g("p",null,M(t.$t("Config could not be loaded")),1)]))]),_:1},8,["size","modelValue"]),_(I,{"modal-class":"fcom_common_dialog fcom_cpf_dialog","append-to-body":!0,"close-on-click-modal":!1,modelValue:i.showGroupEditor,"onUpdate:modelValue":e[14]||(e[14]=B=>i.showGroupEditor=B),width:"40%"},{header:w(()=>[g("div",hQe,[g("h4",null,M(i.editingGroupIndex!==null?t.$t("Edit Group"):t.$t("Add Group")),1)])]),footer:w(()=>[g("div",pQe,[_(r,{class:"fcom_secondary_button",onClick:e[13]||(e[13]=B=>i.showGroupEditor=!1)},{default:w(()=>[G(M(t.$t("Cancel")),1)]),_:1}),_(r,{class:"fcom_primary_button",onClick:o.confirmGroup},{default:w(()=>[G(M(i.editingGroupIndex!==null?t.$t("Update Group"):t.$t("Add Group")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",fQe,[i.editingGroup?(v(),R(x,{key:0,onSubmit:e[12]||(e[12]=Be(B=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,{label:t.$t("Group Label")},{default:w(()=>[_(P,{modelValue:i.editingGroup.label,"onUpdate:modelValue":e[10]||(e[10]=B=>i.editingGroup.label=B),placeholder:t.$t("Group name"),disabled:i.editingGroup.is_system},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["label"]),_(c,{label:t.$t("Description (shown on edit form)")},{default:w(()=>[_(P,{modelValue:i.editingGroup.edit_description,"onUpdate:modelValue":e[11]||(e[11]=B=>i.editingGroup.edit_description=B),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:i.showFieldEditor,"onUpdate:modelValue":e[25]||(e[25]=B=>i.showFieldEditor=B),width:"40%"},{header:w(()=>[g("div",mQe,[g("h4",null,M(i.editingFieldSlug!==null?t.$t("Edit Field"):t.$t("Add Field")),1)])]),footer:w(()=>[g("div",bQe,[_(r,{class:"fcom_secondary_button",onClick:e[24]||(e[24]=B=>i.showFieldEditor=!1)},{default:w(()=>[G(M(t.$t("Cancel")),1)]),_:1}),_(r,{class:"fcom_primary_button",onClick:o.confirmField},{default:w(()=>[G(M(i.editingFieldSlug!==null?t.$t("Update Field"):t.$t("Add Field")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",gQe,[i.editingField?(v(),R(x,{key:0,onSubmit:e[23]||(e[23]=Be(B=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,{label:t.$t("Field Type")},{default:w(()=>[_(k,{modelValue:i.editingField.type,"onUpdate:modelValue":e[15]||(e[15]=B=>i.editingField.type=B),disabled:i.editingFieldSlug!==null,onChange:o.onTypeChange},{default:w(()=>[(v(!0),$(te,null,be(i.fieldTypes,(B,U)=>(v(),R(C,{key:U,label:B,value:U},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled","onChange"])]),_:1},8,["label"]),_(c,{label:t.$t("Label")},{default:w(()=>[_(P,{modelValue:i.editingField.label,"onUpdate:modelValue":e[16]||(e[16]=B=>i.editingField.label=B),placeholder:t.$t("Field Label")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(c,{label:t.$t("Placeholder")},{default:w(()=>[_(P,{modelValue:i.editingField.placeholder,"onUpdate:modelValue":e[17]||(e[17]=B=>i.editingField.placeholder=B),placeholder:t.$t("Placeholder text")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(c,{label:t.$t("Privacy")},{default:w(()=>[_(k,{modelValue:i.editingField.privacy,"onUpdate:modelValue":e[18]||(e[18]=B=>i.editingField.privacy=B)},{default:w(()=>[(v(!0),$(te,null,be(i.privacyOptions,B=>(v(),R(C,{key:B.value,label:B.label,value:B.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(c,{label:t.$t("Group")},{default:w(()=>[_(k,{modelValue:i.editingField.group,"onUpdate:modelValue":e[19]||(e[19]=B=>i.editingField.group=B)},{default:w(()=>[(v(!0),$(te,null,be(i.config.groups,B=>(v(),R(C,{key:B.slug,label:B.label,value:B.slug},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1},8,["label"]),o.isOptionType&&i.editingField.type!=="multiselect"?(v(),R(c,{key:0,label:t.$t("Options"),class:"fcom_question_options"},{default:w(()=>[(v(!0),$(te,null,be(i.editingField.options,(B,U)=>(v(),$("div",{key:U,class:"fcom_question_option"},[_(P,{modelValue:i.editingField.options[U],"onUpdate:modelValue":X=>i.editingField.options[U]=X,type:"text"},null,8,["modelValue","onUpdate:modelValue"]),i.editingField.options.length>1?(v(),R(L,{key:0,type:"danger",title:t.$t("Remove"),icon:i.CloseBoldIcon,underline:!1,onClick:X=>i.editingField.options.splice(U,1)},null,8,["title","icon","onClick"])):O("",!0)]))),128)),_(L,{type:"primary",underline:!1,onClick:e[20]||(e[20]=B=>i.editingField.options.push(`Option ${i.editingField.options.length+1}`))},{default:w(()=>[G(M("+ "+t.$t("Add new option")),1)]),_:1})]),_:1},8,["label"])):O("",!0),i.editingField.type==="multiselect"?(v(),R(c,{key:1,label:t.$t("Options (Key-Value)"),class:"fcom_question_options"},{default:w(()=>[g("div",vQe,[g("span",_Qe,M(t.$t("Key")),1),g("span",yQe,M(t.$t("Label")),1),e[30]||(e[30]=g("span",{style:{width:"32px"}},null,-1))]),(v(!0),$(te,null,be(i.multiselectOptionsList,(B,U)=>(v(),$("div",{key:U,class:"fcom_question_option"},[_(P,{modelValue:B.key,"onUpdate:modelValue":X=>B.key=X,type:"text",placeholder:t.$t("Key")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),_(P,{modelValue:B.label,"onUpdate:modelValue":X=>B.label=X,type:"text",placeholder:t.$t("Label")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),i.multiselectOptionsList.length>1?(v(),R(L,{key:0,type:"danger",title:t.$t("Remove"),icon:i.CloseBoldIcon,underline:!1,onClick:X=>i.multiselectOptionsList.splice(U,1)},null,8,["title","icon","onClick"])):O("",!0)]))),128)),_(L,{type:"primary",underline:!1,onClick:e[21]||(e[21]=B=>i.multiselectOptionsList.push({key:`option_${i.multiselectOptionsList.length+1}`,label:`Option ${i.multiselectOptionsList.length+1}`}))},{default:w(()=>[G(M("+ "+t.$t("Add new option")),1)]),_:1})]),_:1},8,["label"])):O("",!0),_(c,{label:t.$t("Required")},{default:w(()=>[_(D,{modelValue:i.editingField.is_required,"onUpdate:modelValue":e[22]||(e[22]=B=>i.editingField.is_required=B)},{default:w(()=>[_(V,{value:!0},{default:w(()=>[G(M(t.$t("Yes")),1)]),_:1}),_(V,{value:!1},{default:w(()=>[G(M(t.$t("No")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1})):O("",!0)])]),_:1},8,["modelValue"]),i.openUpgradeModal?(v(),R(z,{key:0,showModal:i.openUpgradeModal,onCloseModal:e[26]||(e[26]=B=>i.openUpgradeModal=!1),upgrade_module:"custom_profile_fields"},null,8,["showModal"])):O("",!0)],64)}const CQe=de(WJe,[["render",wQe]]),kQe={name:"Features",components:{UserBadgesConfig:gKe,LeaderBoardConfig:sKe,StorageSettings:VXe,Layout:Xs,AppLayout:Ks,UpgradeToProModal:Jf,SocialMediaLinkConfig:OKe,MessagingSettings:sZe,FollowingConfigView:hZe,FluentPlayerSettings:jJe,CustomProfileFieldsConfig:CQe},data(){return{features:null,addOns:{},loading:!1,installing:!1,openGiphyUpgradeModal:!1,openEmojiUpgradeModal:!1,showMessagingSettings:!1,showFluentPlayerSettings:!1}},methods:{saveFeatures(t=!0){if(this.features.giphy_module==="yes"&&Bz(this.features.giphy_api_key)){this.$handleError("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.installing=!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.getFeatures()}).catch(e=>{this.$handleError(e)}).finally(()=>{this.installing=!1})}},mounted(){this.getFeatures(),this.changeTitle(this.$t("Features Settings"))}},xQe={class:"settings_router"},SQe={key:0,class:"white_loaded"},$Qe={key:1,style:{"margin-bottom":"30px"}},AQe={class:"fhr_content_layout_body"},MQe={class:"setting_header"},EQe={class:"fcom_advanced_features"},TQe={key:0,class:"setting_body"},PQe={class:"setting_item"},IQe={class:"setting_field_placeholder"},LQe={class:"title"},OQe={class:"info"},DQe={class:"settings_field_data"},RQe={class:"align-right"},VQe={class:"setting_item"},FQe={class:"setting_field_placeholder"},NQe={class:"title"},BQe={class:"info"},zQe={class:"settings_field_data"},HQe={class:"align-right"},UQe={class:"setting_item"},jQe={class:"setting_field_placeholder"},WQe={class:"title"},YQe={class:"info"},GQe={class:"settings_field_data"},qQe={class:"align-right"},XQe={class:"setting_item"},KQe={class:"setting_field_placeholder"},ZQe={class:"title"},JQe={class:"info"},QQe={class:"settings_field_data"},eet={class:"align-right"},tet={class:"fcom_module_popover_content"},net={class:"setting_item"},set={class:"setting_field_placeholder"},iet={class:"title"},oet={class:"info"},ret={class:"settings_field_data"},aet={class:"align-right"},cet={key:0,class:"fcom_giphy_api",style:{"margin-bottom":"5px"}},uet={class:"fcom_module_popover_content"},det={class:"setting_item"},het={class:"setting_field_placeholder"},fet={class:"title"},pet={class:"info"},met={class:"settings_field_data"},get={class:"align-right"},vet={class:"fcom_module_popover_content"},_et={class:"setting_item"},yet={class:"setting_field_placeholder"},bet={class:"title"},wet={class:"info"},Cet={class:"settings_field_data"},ket={class:"align-right"},xet={class:"setting_item"},$et={class:"setting_field_placeholder"},Aet={class:"title"},Met={class:"info"},Eet={class:"settings_field_data"},Tet={class:"align-right"},Pet={class:"setting_item"},Iet={class:"setting_field_placeholder"},Let={class:"title"},Oet={class:"info"},Det={class:"settings_field_data"},Ret={class:"align-right"},Vet={class:"fhr_content_layout_body"},Fet={class:"setting_header"},Net={class:"fcom_advanced_features"},Bet={key:0,class:"setting_body"},zet={class:"setting_field_placeholder"},Het={class:"title recommend_plugin",style:{display:"flex","align-items":"flex-start"}},Uet={class:"avatar",style:{"margin-right":"15px"}},jet=["src"],Wet=["href"],Yet={class:"info"},Get={class:"settings_field_data"},qet={class:"align-right"},Xet=["href"],Ket={key:0,class:"dialog_body"},Zet={key:0,class:"dialog_body fluent_player_settings_body"};function Jet(t,e,n,s,i,o){const r=Wt,a=xo,l=H("FollowingConfigView"),c=H("LeaderBoardConfig"),u=H("UserBadgesConfig"),d=Ht,h=Ge,f=Ii,p=vt,m=H("UpgradeToProModal"),b=H("storage-settings"),y=H("SocialMediaLinkConfig"),C=H("CustomProfileFieldsConfig"),k=H("messaging-settings"),x=or,S=H("fluent-player-settings"),E=H("layout"),T=H("app-layout");return v(),R(T,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(E,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Advanced Features & Addons")},{default:w(()=>[g("div",xQe,[i.loading?(v(),$("div",SQe,[_(r,{rows:5,animated:!0}),e[12]||(e[12]=g("hr",null,null,-1)),_(r,{rows:7,animated:!0})])):(v(),$("div",$Qe,[g("div",AQe,[g("div",MQe,[g("h2",null,M(t.$t("Advanced Features")),1)]),g("div",EQe,[i.features?(v(),$("div",TQe,[g("div",PQe,[g("div",IQe,[g("div",LQe,[G(M(t.$t("Follower Module"))+" ",1),t.has_pro?(v(),$(te,{key:0},[i.features.followers_module==="no"?(v(),R(a,{key:0,type:"info",size:"small"},{default:w(()=>[G(M(t.$t("Disabled")),1)]),_:1})):i.features.followers_module==="yes"?(v(),R(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[G(M(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",OQe,M(t.$t("Let your community users to follow each other and filter posts by their followings.")),1)]),g("div",DQe,[g("div",RQe,[_(l,{features:i.features},null,8,["features"])])])]),g("div",VQe,[g("div",FQe,[g("div",NQe,[G(M(t.$t("Leaderboards Module"))+" ",1),t.has_pro?(v(),$(te,{key:0},[i.features.leader_board_module==="no"?(v(),R(a,{key:0,type:"info",size:"small"},{default:w(()=>[G(M(t.$t("Disabled")),1)]),_:1})):i.features.leader_board_module==="yes"?(v(),R(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[G(M(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",BQe,M(t.$t("__LEADERBOARD_DESC")),1)]),g("div",zQe,[g("div",HQe,[_(c,{onSaveSettings:o.saveFeatures,features:i.features},null,8,["onSaveSettings","features"])])])]),g("div",UQe,[g("div",jQe,[g("div",WQe,[G(M(t.$t("User Badges"))+" ",1),t.has_pro?(v(),$(te,{key:0},[i.features.user_badge==="no"?(v(),R(a,{key:0,type:"info",size:"small"},{default:w(()=>[G(M(t.$t("Disabled")),1)]),_:1})):i.features.user_badge==="yes"?(v(),R(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[G(M(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",YQe,M(t.$t("__USER_BADGE_DESC")),1)]),g("div",GQe,[g("div",qQe,[_(u,{onSaveSettings:o.saveFeatures,features:i.features},null,8,["onSaveSettings","features"])])])]),g("div",XQe,[g("div",KQe,[g("div",ZQe,[G(M(t.$t("Course Module"))+" ",1),i.features.course_module==="no"?(v(),R(a,{key:0,type:"info",size:"small"},{default:w(()=>[G(M(t.$t("Disabled")),1)]),_:1})):i.features.course_module==="yes"?(v(),R(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[G(M(t.$t("Enabled")),1)]),_:1})):O("",!0)]),g("div",JQe,M(t.$t("__COURSE_STRUCTURED_LESSONS")),1)]),g("div",QQe,[g("div",eet,[_(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(()=>[G(M(t.$t("Settings")),1)]),_:1})]),default:w(()=>[g("div",tet,[_(d,{modelValue:i.features.course_module,"onUpdate:modelValue":e[0]||(e[0]=P=>i.features.course_module=P),"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(()=>[G(M(t.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])])])]),g("div",net,[g("div",set,[g("div",iet,[G(M(t.$t("Giphy Module"))+" ",1),t.has_pro?(v(),$(te,{key:0},[i.features.giphy_module==="no"?(v(),R(a,{key:0,type:"info",size:"small",effect:"dark"},{default:w(()=>[G(M(t.$t("Disabled")),1)]),_:1})):i.features.giphy_module==="yes"?(v(),R(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[G(M(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",oet,M(t.$t("Unlock potential by using Giphy when creating a new article, post, or comment")),1)]),g("div",ret,[g("div",aet,[i.openGiphyUpgradeModal?O("",!0):(v(),R(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]=P=>!t.has_pro&&(i.openGiphyUpgradeModal=!0))},{default:w(()=>[G(M(t.$t("Settings")),1)]),_:1})]),default:w(()=>[i.features.giphy_module==="yes"?(v(),$("div",cet,[_(p,{modelValue:i.features.giphy_api_key,"onUpdate:modelValue":e[1]||(e[1]=P=>i.features.giphy_api_key=P),placeholder:t.$t("Giphy API Key")},null,8,["modelValue","placeholder"])])):O("",!0),g("div",uet,[_(d,{"true-value":"yes","false-value":"no",modelValue:i.features.giphy_module,"onUpdate:modelValue":e[2]||(e[2]=P=>i.features.giphy_module=P),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(()=>[G(M(t.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])),i.openGiphyUpgradeModal?(v(),R(m,{key:1,showModal:i.openGiphyUpgradeModal,onCloseModal:e[4]||(e[4]=P=>i.openGiphyUpgradeModal=!1),upgrade_module:"giphy_module"},null,8,["showModal"])):O("",!0)])])]),g("div",det,[g("div",het,[g("div",fet,[G(M(t.$t("Emoji Module"))+" ",1),t.has_pro?(v(),$(te,{key:0},[i.features.emoji_module==="no"?(v(),R(a,{key:0,type:"info",size:"small",effect:"dark"},{default:w(()=>[G(M(t.$t("Disabled")),1)]),_:1})):i.features.emoji_module==="yes"?(v(),R(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[G(M(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",pet,M(t.$t("__EMOJIS_DESC")),1)]),g("div",met,[g("div",get,[i.openEmojiUpgradeModal?O("",!0):(v(),R(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]=P=>!t.has_pro&&(i.openEmojiUpgradeModal=!0))},{default:w(()=>[G(M(t.$t("Settings")),1)]),_:1})]),default:w(()=>[g("div",vet,[_(d,{"true-value":"yes","false-value":"no",modelValue:i.features.emoji_module,"onUpdate:modelValue":e[5]||(e[5]=P=>i.features.emoji_module=P),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(()=>[G(M(t.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])),i.openEmojiUpgradeModal?(v(),R(m,{key:1,showModal:i.openEmojiUpgradeModal,onCloseModal:e[7]||(e[7]=P=>i.openEmojiUpgradeModal=!1),upgrade_module:"emoji_module"},null,8,["showModal"])):O("",!0)])])]),g("div",_et,[g("div",yet,[g("div",bet,[G(M(t.$t("Media Module"))+" ",1),i.features.cloud_storage==="yes"?(v(),R(a,{key:0,type:"success",size:"small",effect:"light"},{default:w(()=>[G(M(t.$t("Enabled")),1)]),_:1})):i.features.cloud_storage==="no"?(v(),R(a,{key:1,type:"info",size:"small"},{default:w(()=>[G(M(t.$t("Local")),1)]),_:1})):O("",!0)]),g("div",wet,M(t.$t("__CLOUD_STORAGE_DESC")),1)]),g("div",Cet,[g("div",ket,[_(b,{features:i.features},null,8,["features"])])])]),g("div",xet,[g("div",$et,[g("div",Aet,M(t.$t("Profile Social Media Links")),1),g("div",Met,M(t.$t("Enable/Disable Social Media Links for profiles")),1)]),g("div",Eet,[g("div",Tet,[_(y)])])]),g("div",Pet,[g("div",Iet,[g("div",Let,[G(M(t.$t("Custom Profile Fields"))+" ",1),t.has_pro?(v(),$(te,{key:0},[i.features.custom_profile_fields==="no"?(v(),R(a,{key:0,type:"info",size:"small"},{default:w(()=>[G(M(t.$t("Disabled")),1)]),_:1})):(v(),R(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[G(M(t.$t("Enabled")),1)]),_:1}))],64)):O("",!0)]),g("div",Oet,M(t.$t("Add custom fields to member profiles like Gender, DOB, Designation, Blood Group and more.")),1)]),g("div",Det,[g("div",Ret,[_(C,{features:i.features},null,8,["features"])])])])])):O("",!0)])])])),g("div",Vet,[g("div",Fet,[g("h2",null,M(t.$t("Recommended Plugins and Addons")),1)]),g("div",Net,[i.features?(v(),$("div",Bet,[(v(!0),$(te,null,be(i.addOns,(P,I)=>(v(),$("div",{key:I,class:"setting_item"},[g("div",zet,[g("div",Het,[g("div",Uet,[g("img",{alt:"",src:P.logo,style:{width:"60px"}},null,8,jet)]),g("div",null,[g("a",{target:"_blank",href:P.learn_more_url},M(P.title),9,Wet),P.is_installed?(v(),R(a,{key:0,type:"success",size:"small",effect:"light",style:{"margin-left":"8px"}},{default:w(()=>[G(M(t.$t("Installed")),1)]),_:1})):O("",!0),g("div",Yet,M(P.description),1)])])]),g("div",Get,[g("div",qet,[P.is_installed?O("",!0):(v(),R(h,{key:0,class:"fcom_secondary_button",onClick:L=>o.installPlugin(I)},{default:w(()=>[G(M(P.action_text),1)]),_:2},1032,["onClick"])),I==="fluent-messaging"?(v(),R(h,{key:1,onClick:e[8]||(e[8]=L=>i.showMessagingSettings=!0),class:"fcom_secondary_button"},{default:w(()=>[G(M(t.$t("Messaging Settings")),1)]),_:1})):I==="fluent-player"&&P.is_installed?(v(),R(h,{key:2,onClick:e[9]||(e[9]=L=>i.showFluentPlayerSettings=!0),class:"fcom_secondary_button"},{default:w(()=>[G(M(t.$t("Player Settings")),1)]),_:1})):P.settings_url?(v(),$("a",{key:3,href:P.settings_url,class:"el-button el-button--default fcom_secondary_button"},M(t.$t("View Settings")),9,Xet)):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:i.showMessagingSettings,"onUpdate:modelValue":e[10]||(e[10]=P=>i.showMessagingSettings=P),direction:"rtl"},{header:w(({close:P})=>[g("h4",null,M(t.$t("Messaging Settings")),1)]),default:w(()=>[i.showMessagingSettings?(v(),$("div",Ket,[_(k)])):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:i.showFluentPlayerSettings,"onUpdate:modelValue":e[11]||(e[11]=P=>i.showFluentPlayerSettings=P),direction:"rtl"},{header:w(()=>[g("h4",null,M(t.$t("FluentPlayer Settings")),1)]),default:w(()=>[i.showFluentPlayerSettings?(v(),$("div",Zet,[_(S)])):O("",!0)]),_:1},8,["modelValue"])]),_:1},8,["title"])]),_:1})}const Qet=de(kQe,[["render",Jet]]),ett={name:"FComColorPicker",components:{InfoFilled:$c},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()}}},ttt={class:"fcom_color_item"};function ntt(t,e,n,s,i,o){const r=pd,a=H("InfoFilled"),l=ye,c=di;return v(),$("div",ttt,[_(r,{predefine:t.appVars.suggestedColors,ref:"colorPicker",onActiveChange:e[0]||(e[0]=u=>{i.color=u}),modelValue:i.color,"onUpdate:modelValue":e[1]||(e[1]=u=>i.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))},M(n.label),1),n.help_msg?(v(),R(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 stt=de(ett,[["render",ntt]]),itt={name:"AuthMeta",components:{BgImageUpload:Zb,CrepeEditor:Sd,FComColorPicker:stt},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}}},ott={key:0,class:"fcom_lockscreen_meta"},rtt={class:"fcom_meta_section lockscreen_meta"},att={key:0,class:"fcom_description"},ltt={key:1,class:"fcom_description"},ctt={class:"fcom_meta_section lockscreen_meta"},utt={key:0,class:"fcom_meta_label"},dtt={key:1,class:"fcom_meta_label"},htt={class:"fcom_meta_content"},ftt={class:"fcom_meta_block"},ptt={class:"fcom_block_label"},mtt={class:"fcom_meta_sorting"},gtt={class:"fcom_block_action"},vtt={key:1,class:"fcom_lockscreen_meta"},_tt={class:"fcom_edit_title"},ytt={class:"fcom_edit_content"},btt={key:0,class:"fcom_help_text"},wtt={key:0,class:"fcom_help_text"};function Ctt(t,e,n,s,i,o){const r=ye,a=H("Top"),l=H("Bottom"),c=H("EditPen"),u=H("Hide"),d=H("View"),h=H("Back"),f=H("BgImageUpload"),p=en,m=vt,b=H("crepe-editor"),y=rn,C=vb,k=H("FComColorPicker"),x=ko,S=Ps,E=gd,T=Phe,P=The,I=gb;return i.editing?(v(),$("div",vtt,[g("div",_tt,[_(r,{onClick:o.backToFields},{default:w(()=>[_(h)]),_:1},8,["onClick"]),g("p",null,M(i.editingField.label),1)]),g("div",ytt,[o.isBannerField||o.isFormField?(v(),R(I,{key:0,modelValue:i.editTab,"onUpdate:modelValue":e[18]||(e[18]=L=>i.editTab=L)},{default:w(()=>[_(C,{label:t.$t("Content"),name:"content"},{default:w(()=>[_(y,{onSubmit:e[4]||(e[4]=Be(L=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[o.isBannerField?(v(),R(p,{key:0,label:t.$t("Logo"),class:"fcom_bg_image"},{default:w(()=>[_(f,{modelValue:i.editingField.logo,"onUpdate:modelValue":e[0]||(e[0]=L=>i.editingField.logo=L),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"])):O("",!0),_(p,{label:t.$t("Title")},{default:w(()=>[_(m,{modelValue:i.editingField.title,"onUpdate:modelValue":e[1]||(e[1]=L=>i.editingField.title=L),placeholder:t.$t("Title")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(p,{label:t.$t("Description")},{default:w(()=>[_(b,{modelValue:i.editingField.description,"onUpdate:modelValue":e[2]||(e[2]=L=>i.editingField.description=L)},null,8,["modelValue"]),i.isDirty?(v(),$("span",btt,M(t.$t("Please save the changes to update the view")),1)):O("",!0)]),_:1},8,["label"]),o.isFormField?(v(),R(p,{key:1,label:t.$t("Button Label")},{default:w(()=>[_(m,{modelValue:i.editingField.button_label,"onUpdate:modelValue":e[3]||(e[3]=L=>i.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(),R(C,{key:0,label:t.$t("Design"),name:"design"},{default:w(()=>[_(y,{onSubmit:e[11]||(e[11]=Be(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:i.editingField.background_image,"onUpdate:modelValue":e[5]||(e[5]=L=>i.editingField.background_image=L),can_remove:!0},null,8,["modelValue"])]),_:1},8,["label"]),_(k,{help_msg:t.$t("The main background color of the form"),label:t.$t("Background Color"),modelValue:i.editingField.background_color,"onUpdate:modelValue":e[6]||(e[6]=L=>i.editingField.background_color=L)},null,8,["help_msg","label","modelValue"]),_(k,{help_msg:t.$t("The title color of the form"),label:t.$t("Title Color"),modelValue:i.editingField.title_color,"onUpdate:modelValue":e[7]||(e[7]=L=>i.editingField.title_color=L)},null,8,["help_msg","label","modelValue"]),_(k,{help_msg:t.$t("The text color of the form"),label:t.$t("Text Color"),modelValue:i.editingField.text_color,"onUpdate:modelValue":e[8]||(e[8]=L=>i.editingField.text_color=L)},null,8,["help_msg","label","modelValue"]),o.isFormField?(v(),R(k,{key:0,help_msg:t.$t("The button text color of the form"),label:t.$t("Button Text Color"),modelValue:i.editingField.button_label_color,"onUpdate:modelValue":e[9]||(e[9]=L=>i.editingField.button_label_color=L)},null,8,["help_msg","label","modelValue"])):O("",!0),o.isFormField?(v(),R(k,{key:1,help_msg:t.$t("The button background color of the form"),label:t.$t("Button Background"),modelValue:i.editingField.button_color,"onUpdate:modelValue":e[10]||(e[10]=L=>i.editingField.button_color=L)},null,8,["help_msg","label","modelValue"])):O("",!0)]),_:1})]),_:1},8,["label"])):O("",!0),o.isFormField&&i.editingField.fields.terms?(v(),R(C,{key:1,label:t.$t("Fields"),name:"fields"},{default:w(()=>[_(P,{modelValue:i.formField,"onUpdate:modelValue":e[17]||(e[17]=L=>i.formField=L),accordion:""},{default:w(()=>[_(T,{title:t.$t("Terms"),name:"terms"},{default:w(()=>[_(y,{onSubmit:e[15]||(e[15]=Be(L=>t.doNothing(),["prevent"])),onInput:e[16]||(e[16]=L=>i.isDirty=!0),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(p,{label:t.$t("Label")},{default:w(()=>[_(b,{modelValue:i.editingField.fields.terms.label,"onUpdate:modelValue":e[12]||(e[12]=L=>i.editingField.fields.terms.label=L)},null,8,["modelValue"]),i.isDirty?(v(),$("span",wtt,M(t.$t("Please save the changes to update the view")),1)):O("",!0)]),_:1},8,["label"]),_(p,{label:t.$t("Required")},{default:w(()=>[_(S,{modelValue:i.editingField.fields.terms.required,"onUpdate:modelValue":e[13]||(e[13]=L=>i.editingField.fields.terms.required=L)},{default:w(()=>[_(x,{value:!0},{default:w(()=>[G(M(t.$t("Yes")),1)]),_:1}),_(x,{value:!1},{default:w(()=>[G(M(t.$t("No")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(p,{label:t.$t("Disabled")},{default:w(()=>[_(E,{modelValue:i.editingField.fields.terms.disabled,"onUpdate:modelValue":e[14]||(e[14]=L=>i.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(),$("div",ott,[g("div",rtt,[n.currentTab=="login"?(v(),$("div",att,[g("p",null,M(t.$t("Configure the appearance and behavior of your login form.")),1)])):O("",!0),n.currentTab=="signup"?(v(),$("div",ltt,[g("p",null,M(t.$t("Configure the appearance and behavior of your signup form.")),1)])):O("",!0)]),g("div",ctt,[n.currentTab=="login"?(v(),$("div",utt,M(t.$t("Customize Login")),1)):O("",!0),n.currentTab=="signup"?(v(),$("div",dtt,M(t.$t("Customize Sign Up")),1)):O("",!0),g("div",htt,[g("ul",ftt,[(v(!0),$(te,null,be(o.sortedFields,L=>(v(),$("li",{class:W(["fcom_block_list",{block_hidden:L.hidden}])},[g("div",ptt,[_(r,{class:"fcom_el_icon"},{default:w(()=>[(v(),R(Tt(o.getFieldIcon(L))))]),_:2},1024),g("p",null,M(o.getLabel(L.type)),1)]),g("div",mtt,[_(r,{onClick:o.togglePosition},{default:w(()=>[_(a)]),_:1},8,["onClick"]),_(r,{onClick:o.togglePosition},{default:w(()=>[_(l)]),_:1},8,["onClick"])]),g("div",gtt,[_(r,{onClick:V=>o.updateField(L)},{default:w(()=>[_(c)]),_:1},8,["onClick"]),L.type=="banner"?(v(),$(te,{key:0},[L.hidden?(v(),R(r,{key:0,onClick:V=>o.toggleHidden(L)},{default:w(()=>[_(u)]),_:1},8,["onClick"])):(v(),R(r,{key:1,onClick:V=>o.toggleHidden(L)},{default:w(()=>[_(d)]),_:1},8,["onClick"]))],64)):O("",!0)])],2))),256))])])])]))}const ktt=de(itt,[["render",Ctt]]),xtt={name:"AuthEditor",emits:["updateAuthSettings"],props:["currentTab","savingCount","authSettings"],components:{AuthMeta:ktt},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})}}},Stt={class:"fcom_auth_content"},$tt={key:0,class:"fcom_auth_image"},Att=["src","alt"],Mtt={class:"fcom_auth_title"},Ett=["innerHTML"],Ttt={class:"fcom_auth_content form_content"},Ptt={class:"fcom_auth_form_header"},Itt={class:"fcom_auth_title"},Ltt=["innerHTML"],Ott=["innerHTML"];function Dtt(t,e,n,s,i,o){const r=H("auth-meta"),a=r1,l=vt,c=en,u=Ht,d=rn,h=Ge,f=ba;return v(),$(te,null,[_(a,{class:"fcom_full_editor_side lockscreen_editor auth_editor",width:"300px"},{default:w(()=>[ae(t.$slots,"before_meta"),_(r,{currentTab:n.currentTab,settings:i.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,b,y,C,k,x,S,E;return[g("div",{class:"fcom_editor_content",style:Ke(o.contentStyles)},[(p=i.settings.banner)!=null&&p.hidden?O("",!0):(v(),$("div",{key:0,class:"fcom_auth_wrap",style:Ke(o.backgroundStyles(i.settings.banner))},[g("div",Stt,[(m=i.settings.banner)!=null&&m.logo?(v(),$("div",$tt,[g("img",{src:(b=i.settings.banner)==null?void 0:b.logo,alt:(y=i.settings.banner)==null?void 0:y.title},null,8,Att)])):O("",!0),g("div",Mtt,[g("h2",{style:Ke(o.titleStyles(i.settings.banner)),contenteditable:"true",onBlur:e[0]||(e[0]=T=>o.updateTitle(T,i.settings.banner))},M((C=i.settings.banner)==null?void 0:C.title),37)]),(k=i.settings.banner)!=null&&k.description?(v(),$("div",{key:1,class:"fcom_auth_description",style:Ke(o.descriptionStyles(i.settings.banner))},[g("p",{innerHTML:i.settings.banner.description_rendered},null,8,Ett)],4)):O("",!0)])],4)),g("div",{class:"fcom_auth_wrap",style:Ke(o.backgroundStyles(i.settings.form))},[g("div",Ttt,[g("div",Ptt,[g("div",Itt,[g("h2",{style:Ke(o.titleStyles(i.settings.form)),contenteditable:"true",onBlur:e[1]||(e[1]=T=>o.updateTitle(T,i.settings.form))},M((x=i.settings.form)==null?void 0:x.title),37)]),(S=i.settings.form)!=null&&S.description?(v(),$("div",{key:0,class:"fcom_auth_description",style:Ke(o.descriptionStyles(i.settings.form))},[g("p",{innerHTML:i.settings.form.description_rendered},null,8,Ltt)],4)):O("",!0)]),(E=i.settings.form)!=null&&E.fields?(v(),R(d,{key:0,"label-position":"top",class:"fcom_auth_form"},{default:w(()=>[(v(!0),$(te,null,be(i.settings.form.fields,T=>(v(),$("div",{key:T.name},[["text","email","number","textarea","password"].includes(T.type)?(v(),R(c,{key:0,label:T.label},{default:w(()=>[_(l,{type:T.type,placeholder:T.placeholder},null,8,["type","placeholder"])]),_:2},1032,["label"])):O("",!0),T.type=="inline_checkbox"&&!T.disabled?(v(),R(c,{key:1},{default:w(()=>[_(u,{class:"fcom_checkbox"},{default:w(()=>[g("span",{innerHTML:T.inline_label},null,8,Ott)]),_:2},1024)]),_:2},1024)):O("",!0)]))),128))]),_:1})):O("",!0),_(h,{style:Ke(o.buttonStyles(i.settings.form)),contenteditable:"true",onBlur:e[2]||(e[2]=T=>o.updateButtonLabel(T,i.settings.form))},{default:w(()=>{var T;return[G(M((T=i.settings.form)==null?void 0:T.button_label),1)]}),_:1},8,["style"])])],4)],4)]}),_:1})],64)}const Rtt=de(xtt,[["render",Dtt]]),Vtt={name:"AuthSettings",emits:["completed"],components:{AuthEditor:Rtt},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()}},Ftt={class:"fcom_full_editor"},Ntt={class:"fcom_full_editor_header"},Btt={class:"fcom_editor_menu object_menu"},ztt={class:"fcom_space_menu_ul"},Htt={class:"full_editor_actions"},Utt={key:0},jtt={key:1};function Wtt(t,e,n,s,i,o){const r=H("ArrowLeft"),a=ye,l=Ge,c=a1,u=H("auth-editor"),d=Wt,h=r1,f=ba,p=o1,m=_t("loading");return v(),$("div",Ftt,[_(p,null,{default:w(()=>[_(c,{class:"fcom_full_editor_header_wrap"},{default:w(()=>[g("div",Ntt,[g("div",{onClick:e[0]||(e[0]=b=>t.$emit("completed")),class:"fcom_back_header"},[_(a,null,{default:w(()=>[_(r)]),_:1}),G(" "+M(t.$t("General Settings")),1)]),g("div",Btt,[g("ul",ztt,[g("li",{onClick:e[1]||(e[1]=b=>i.currentTab="login")},[g("a",{class:W({"router-link-exact-active":i.currentTab=="login"}),href:"#"},M(t.$t("Login")),3)]),g("li",{onClick:e[2]||(e[2]=b=>i.currentTab="signup")},[g("a",{class:W({"router-link-exact-active":i.currentTab=="signup"}),href:"#"},M(t.$t("Sign Up")),3)])])]),g("div",Htt,[Pe((v(),R(l,{class:"fcom_primary_button",disabled:i.saving,onClick:o.saveSettings},{default:w(()=>[i.hasPro?(v(),$("span",Utt,M(t.$t("Save Changes")),1)):(v(),$("span",jtt,M(t.$t("Save Changes (Pro Required)")),1))]),_:1},8,["disabled","onClick"])),[[m,i.saving]])])])]),_:1}),_(p,{class:"fcom_full_editor_container"},{default:w(()=>[i.loading?(v(),$(te,{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(),R(u,{key:0,currentTab:i.currentTab,savingCount:i.savingCount,"auth-settings":i.authSettings,onUpdateAuthSettings:o.updateAuthSettings},null,8,["currentTab","savingCount","auth-settings","onUpdateAuthSettings"]))]),_:1})]),_:1})])}const Ytt=de(Vtt,[["render",Wtt]]),Gtt={name:"GeneralSettings",components:{ImageUploader:vd,Layout:Xs,AppLayout:Ks,CopyDocument:yO,AuthSettings:Ytt},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"))}},qtt={class:"settings_router"},Xtt={class:"fhr_content_layout_body"},Ktt={class:"setting_body"},Ztt={class:"settings_title"},Jtt={class:"settings_subtitle"},Qtt={class:"settings_title"},ent={class:"settings_subtitle"},tnt=["src"],nnt={class:"settings_title"},snt={class:"settings_subtitle"},int=["src"],ont={class:"settings_title"},rnt={class:"settings_subtitle"},ant={class:"settings_title"},lnt={class:"settings_subtitle"},cnt=["src"],unt={class:"settings_title"},dnt={class:"settings_subtitle"},hnt={class:"fcom_help_text"},fnt={class:"settings_title"},pnt={class:"settings_subtitle"},mnt={class:"settings_title"},gnt={class:"settings_subtitle"},vnt={class:"help_text"},_nt={class:"settings_title"},ynt={class:"settings_subtitle"},bnt={class:"settings_title"},wnt={class:"settings_subtitle"},Cnt={class:"fcom_help_text"},knt={class:"settings_title"},xnt={class:"settings_subtitle"},Snt={class:"fcom_help_text"},$nt=["href"],Ant={class:"settings_title"},Mnt={class:"settings_subtitle"},Ent={key:0};function Tnt(t,e,n,s,i,o){const r=Ge,a=fd,l=vt,c=en,u=hd,d=H("image-uploader"),h=Ff,f=Ps,p=H("CopyDocument"),m=ye,b=Ht,y=ko,C=an,k=Jt,x=rn,S=Wt,E=H("auth-settings"),T=H("layout"),P=H("app-layout");return v(),R(P,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(T,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("General Settings")},{actions:w(()=>[_(r,{class:"fcom_primary_button",disabled:i.saving||i.loading,onClick:o.saveSettings},{default:w(()=>[g("span",null,M(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),default:w(()=>[g("div",qtt,[g("div",Xtt,[g("div",Ktt,[i.settings?(v(),R(x,{key:0,onSubmit:e[19]||(e[19]=Be(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",Ztt,M(t.$t("Community Title")),1),g("span",Jtt,M(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:i.settings.site_title,"onUpdate:modelValue":e[0]||(e[0]=I=>i.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",Qtt,M(t.$t("Site Logo (For Light Background)")),1),g("span",ent,M(t.$t("Recommended dimensions: 480 x 120, 4:1 aspect ratio.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[i.settings.logo?(v(),$("img",{key:0,alt:"",class:"settings_img",src:i.settings.logo},null,8,tnt)):O("",!0),_(d,{additionalData:{resize:!1,max_width:500,skip_convert:"yes"},button_text:i.settings.logo?t.$t("Change"):t.$t("Upload Logo"),can_remove:!!i.settings.logo,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:e[1]||(e[1]=I=>{i.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",nnt,M(t.$t("Site Logo (For Dark Mode)")),1),g("span",snt,M(t.$t("Recommended dimensions: 480 x 120, 4:1 aspect ratio.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[i.settings.white_logo?(v(),$("img",{key:0,alt:"",class:"settings_img",src:i.settings.white_logo},null,8,int)):O("",!0),_(d,{additionalData:{resize:!1,max_width:500,skip_convert:"yes"},button_text:i.settings.white_logo?t.$t("Change"):t.$t("Set Logo"),can_remove:!!i.settings.white_logo,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:e[2]||(e[2]=I=>{i.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",ont,M(t.$t("Logo Permalink")),1),g("span",rnt,M(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:i.settings.logo_permalink_type,"onUpdate:modelValue":e[3]||(e[3]=I=>i.settings.logo_permalink_type=I),class:"fcom_radio_group"},{default:w(()=>[_(h,{value:"default"},{default:w(()=>[G(M(t.$t("Default")),1)]),_:1}),_(h,{value:"custom"},{default:w(()=>[G(M(t.$t("Custom")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1}),i.settings.logo_permalink_type=="default"?(v(),R(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,M(t.$t("Copy")),1)]),_:1})]),_:1},8,["value","placeholder"])]),_:1},8,["label"])):O("",!0),i.settings.logo_permalink_type=="custom"?(v(),R(c,{key:1,class:"fcom_mt_20",label:t.$t("Custom Permalink")},{default:w(()=>[_(l,{modelValue:i.settings.logo_permalink,"onUpdate:modelValue":e[5]||(e[5]=I=>i.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",ant,M(t.$t("Default Open Graph Image")),1),g("span",lnt,M(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(()=>[i.settings.featured_image?(v(),$("img",{key:0,alt:"",style:{"max-height":"100px"},class:"settings_img",src:i.settings.featured_image},null,8,cnt)):O("",!0),_(d,{additionalData:{resize:!1,disable_convert:"yes",max_width:1600,skip_convert:"yes"},button_text:i.settings.featured_image?t.$t("Change"):t.$t("Set Open Graph Image"),can_remove:!!i.settings.featured_image,className:"setting_img_upload",isTextBtn:!1,removeIcon:!1,onUploaded:e[6]||(e[6]=I=>{i.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",unt,M(t.$t("Global Post Status")),1),g("span",dnt,M(t.$t("Enable/disable Post Status")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(b,{modelValue:i.settings.disable_global_posts,"onUpdate:modelValue":e[7]||(e[7]=I=>i.settings.disable_global_posts=I),class:"fcom_checkbox","true-value":"no","false-value":"yes"},{default:w(()=>[G(M(t.$t("Enable Global Posts Status Form")),1)]),_:1},8,["modelValue"]),g("div",hnt,[g("p",null,M(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",fnt,M(t.$t("Portal Access Settings")),1),g("span",pnt,M(t.$t("Who can access the portal.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(f,{modelValue:i.settings.access.acess_level,"onUpdate:modelValue":e[8]||(e[8]=I=>i.settings.access.acess_level=I),class:"fcom_radio_group"},{default:w(()=>[_(y,{value:"public"},{default:w(()=>[G(M(t.$t("Everyone")),1)]),_:1}),_(y,{value:"logged_in"},{default:w(()=>[G(M(t.$t("Only Logged In Users")),1)]),_:1}),_(y,{value:"role_based"},{default:w(()=>[G(M(t.$t("Only Selected User Roles")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),o.isRoleBase?(v(),$(te,{key:0},[_(u,{gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",mnt,M(t.$t("User Roles")),1),g("span",gnt,M(t.$t("Select user roles who can access the portal.")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(k,{placeholder:t.$t("Select Access Roles"),"allow-create":"",modelValue:i.settings.access.access_roles,"onUpdate:modelValue":e[9]||(e[9]=I=>i.settings.access.access_roles=I),multiple:""},{default:w(()=>[(v(!0),$(te,null,be(i.user_roles,(I,L)=>(v(),R(C,{key:L,label:I,value:L},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"]),g("span",vnt,M(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",_nt,M(t.$t("Not Matched User Roles")),1),g("span",ynt,M(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:i.settings.restricted_role_content,"onUpdate:modelValue":e[10]||(e[10]=I=>i.settings.restricted_role_content=I)},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})],64)):O("",!0),o.isPublic?O("",!0):(v(),R(u,{key:1,gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",bnt,M(t.$t("Redirect URL")),1),g("span",wnt,M(t.$t("Redirect URL for Public Users")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[_(c,null,{default:w(()=>[_(l,{modelValue:i.settings.auth_url,"onUpdate:modelValue":e[11]||(e[11]=I=>i.settings.auth_url=I)},null,8,["modelValue"]),g("div",Cnt,[g("p",null,M(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",knt,M(t.$t("Login / Registration URLs")),1),g("span",xnt,M(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:i.settings.auth_form_type,"onUpdate:modelValue":e[12]||(e[12]=I=>i.settings.auth_form_type=I),class:"fcom_radio_group"},{default:w(()=>[_(h,{value:"default"},{default:w(()=>[G(M(t.$t("Use Default")),1)]),_:1}),_(h,{value:"custom"},{default:w(()=>[G(M(t.$t("Use Custom Login Page")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),o.isCustomLogin?(v(),R(c,{key:0,label:t.$t("Please provide your custom Authentication Url"),class:"fcom_mt_20"},{default:w(()=>[_(l,{modelValue:i.settings.cutsom_auth_url,"onUpdate:modelValue":e[13]||(e[13]=I=>i.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,M(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,M(t.$t("Copy")),1)]),_:1})]),_:1},8,["value","placeholder"]),i.users_can_register?O("",!0):(v(),$(te,{key:0},[g("div",Snt,[g("p",null,[G(M(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:i.user_registration_enable_url},M(t.$t("Go to General Settings.")),9,$nt)])]),e[21]||(e[21]=g("div",{style:{width:"100%"}},[g("hr")],-1)),_(b,{modelValue:i.settings.explicit_registration,"onUpdate:modelValue":e[16]||(e[16]=I=>i.settings.explicit_registration=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Enable User Registration via FluentCommunity Signup Form")),1)]),_:1},8,["modelValue"])],64))]),_:1},8,["label"]),i.settings.auth_form_type=="default"?(v(),$(te,{key:1},[_(c,{class:"fcom_mt_20"},{default:w(()=>[_(b,{modelValue:i.settings.use_custom_signup_page,"onUpdate:modelValue":e[17]||(e[17]=I=>i.settings.use_custom_signup_page=I),"true-value":"yes","false-value":"no"},{default:w(()=>[G(M(t.$t("Use custom signup URL instead of default signup page")),1)]),_:1},8,["modelValue"])]),_:1}),i.settings.use_custom_signup_page=="yes"?(v(),R(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:i.settings.custom_signup_url,"onUpdate:modelValue":e[18]||(e[18]=I=>i.settings.custom_signup_url=I)},null,8,["placeholder","modelValue"])]),_:1},8,["label"])):O("",!0)],64)):O("",!0)]),_:1})]),_:1}),o.isDefaultLogin?(v(),R(u,{key:2,gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",Ant,M(t.$t("Customize Login/Signup Form")),1),g("span",Mnt,M(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(()=>[G(M(t.$t("Customize")),1)]),_:1},8,["onClick"])]),_:1})]),_:1})):O("",!0),_(u,{gutter:30},{default:w(()=>[_(r,{class:"fcom_primary_button",disabled:i.saving||i.loading,onClick:o.saveSettings},{default:w(()=>[g("span",null,M(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})):i.loading?(v(),R(S,{key:1,animated:!0,rows:10})):O("",!0)])])]),i.showCustomLoginForm?(v(),$("div",Ent,[(v(),R(va,{to:"body"},[_(E,{onCompleted:e[20]||(e[20]=I=>i.showCustomLoginForm=!1)})]))])):O("",!0)]),_:1},8,["title"])]),_:1})}const Pnt=de(Gtt,[["render",Tnt]]),Int={name:"ContentDivider",props:{lineColor:{type:String,default:"var(--fcom-secondary-border, #e5e7eb)"},position:{type:String,default:"center",validator:t=>["center","left","right"].includes(t)}}},Lnt={class:"fcom_content_divider__content"};function Ont(t,e,n,s,i,o){return v(),$("div",{class:W(["fcom_content_divider","fcom_content_divider--"+n.position])},[n.position!=="left"?(v(),$("span",{key:0,class:"fcom_content_divider__line",style:Ke({background:n.lineColor})},null,4)):O("",!0),g("div",Lnt,[ae(t.$slots,"default")]),n.position!=="right"?(v(),$("span",{key:1,class:"fcom_content_divider__line",style:Ke({background:n.lineColor})},null,4)):O("",!0)],2)}const Dnt=de(Int,[["render",Ont]]),Rnt={name:"MenuSettings",components:{MenuGroupSettings:Qz,Layout:Xs,AppLayout:Ks,ContentDivider:Dnt,ActionPopover:zf},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()}},Vnt={class:"settings_router"},Fnt={key:0},Nnt={class:"fcom_card_sections"},Bnt={class:"fcom_card_sections"},znt={class:"fcom_card_sections"},Hnt={key:0,style:{display:"flex","align-items":"center",gap:"8px"}},Unt={key:1,style:{display:"flex","align-items":"center",gap:"8px"}},jnt={style:{margin:"0"}},Wnt={style:{"margin-top":"20px","text-align":"center"}},Ynt={key:1,class:"fcom_card_sections",style:{padding:"30px","text-align":"center"}},Gnt={style:{margin:"0 0 15px",color:"var(--fcom-secondary-text, #6b7280)"}},qnt={key:1,class:"white_loaded"};function Xnt(t,e,n,s,i,o){const r=Ge,a=H("menu-group-settings"),l=H("content-divider"),c=vt,u=H("action-popover"),d=Wt,h=H("layout"),f=H("app-layout");return v(),R(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:i.saving||i.loading,onClick:e[0]||(e[0]=p=>o.saveMenuItems({customSuccessMessage:t.$t("Menu settings saved successfully.")}))},{default:w(()=>[g("span",null,M(t.$t("Save Settings")),1)]),_:1},8,["disabled"])]),default:w(()=>[g("div",Vnt,[i.menuSettings?(v(),$("div",Fnt,[g("div",Nnt,[i.menuSettings.mainMenuItems?(v(),R(a,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:o.saveMenuItems,title:t.$t("Primary Menu Items"),menuItems:i.menuSettings.mainMenuItems,saving:i.saving},null,8,["onSave","title","menuItems","saving"])):O("",!0)]),g("div",Bnt,[i.menuSettings.profileDropdownItems?(v(),R(a,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:o.saveMenuItems,title:t.$t("Profile Dropdown Items"),menuItems:i.menuSettings.profileDropdownItems,saving:i.saving},null,8,["onSave","title","menuItems","saving"])):O("",!0)]),g("div",znt,[i.menuSettings.beforeCommunityMenuItems?(v(),R(a,{key:0,custom_svg:!0,use_icon_selector:!0,has_svg:!1,onSave:o.saveMenuItems,title:t.$t("Top Links (At Sidebar)"),menuItems:i.menuSettings.beforeCommunityMenuItems,saving:i.saving},null,8,["onSave","title","menuItems","saving"])):O("",!0)]),i.menuSettings.afterCommunityLinkGroups?(v(),$(te,{key:0},[_(l,null,{default:w(()=>[G(M(t.$t("Sidebar Bottom Link Groups")),1)]),_:1}),i.menuSettings.afterCommunityLinkGroups.length?(v(),$(te,{key:0},[(v(!0),$(te,null,be(i.menuSettings.afterCommunityLinkGroups,(p,m)=>(v(),$("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:i.saving},{title:w(()=>[i.editingGroupSlug===p.slug?(v(),$("div",Hnt,[_(c,{modelValue:i.editingGroupTitle,"onUpdate:modelValue":e[1]||(e[1]=b=>i.editingGroupTitle=b),disabled:i.saving,placeholder:t.$t("Group Title"),size:"default",onKeyup:$t(b=>o.saveGroupTitle(m),["enter"])},null,8,["modelValue","disabled","placeholder","onKeyup"]),_(r,{class:"fcom_primary_button",disabled:i.saving,onClick:b=>o.saveGroupTitle(m),style:{"padding-top":"18px","padding-bottom":"18px"}},{default:w(()=>[G(M(t.$t("Save")),1)]),_:1},8,["disabled","onClick"]),_(r,{class:"fcom_secondary_button",disabled:i.saving,style:{"margin-left":"0px","padding-top":"18px","padding-bottom":"18px"},onClick:o.resetGroupEditState},{default:w(()=>[G(M(t.$t("Cancel")),1)]),_:1},8,["disabled","onClick"])])):(v(),$("div",Unt,[g("h4",jnt,M(p.title||t.$t("Untitled Group")),1),i.saving?O("",!0):(v(),R(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",Wnt,[_(r,{disabled:i.saving,onClick:e[2]||(e[2]=p=>o.addFooterGroup()),class:"fcom_secondary_button"},{default:w(()=>[G(M(t.$t("Add Another Group")),1)]),_:1},8,["disabled"])])],64)):(v(),$("div",Ynt,[g("p",Gnt,M(t.$t("No bottom link group has been created yet. Create one to add links to the sidebar bottom.")),1),_(r,{disabled:i.saving,onClick:e[3]||(e[3]=p=>o.addFooterGroup()),class:"fcom_primary_button"},{default:w(()=>[G(M(t.$t("Add Group")),1)]),_:1},8,["disabled"])]))],64)):O("",!0)])):(v(),$("div",qnt,[_(d,{animated:!0,rows:10})]))])]),_:1},8,["title"])]),_:1})}const Knt=de(Rnt,[["render",Xnt]]),Znt={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()}},Jnt={style:{float:"left"}},Qnt={style:{float:"right",color:"#8492a6","font-size":"13px"}},est={key:1},tst={class:"dialog_footer"},nst={key:0},sst={key:1};function ist(t,e,n,s,i,o){const r=an,a=Jt,l=en,c=Tc,u=Ht,d=tR,h=Ge,f=rn,p=_t("loading");return v(),R(f,{onSubmit:e[3]||(e[3]=Be(m=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:i.form,"onUpdate:modelValue":e[4]||(e[4]=m=>i.form=m),size:"large"},{default:w(()=>[i.form.editing_user?(v(),$("p",est,M(t.$t("Editing manager role for %s",i.form.editing_user.display_name)),1)):(v(),R(l,{key:0,label:t.$t("User")},{default:w(()=>[_(a,{class:"rich_select",filterable:"",remote:"",loading:i.loading,"remote-method":o.fetchUsers,placeholder:t.$t("Select User"),modelValue:i.form.user_id,"onUpdate:modelValue":e[0]||(e[0]=m=>i.form.user_id=m)},{default:w(()=>[(v(!0),$(te,null,be(i.users,m=>(v(),R(r,{key:m.ID,label:m.display_name+" ("+m.user_email+")",value:m.ID},{default:w(()=>[g("span",Jnt,M(m.display_name),1),g("span",Qnt,M(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(()=>[G(M(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:i.form.roles,"onUpdate:modelValue":e[1]||(e[1]=m=>i.form.roles=m)},{default:w(()=>[_(u,{value:"admin",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Community Admin (All Access)")),1)]),_:1}),_(u,{disabled:i.form.roles.includes("admin"),value:"moderator",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Space Moderator")),1)]),_:1},8,["disabled"]),_(u,{disabled:i.form.roles.includes("admin"),value:"course_admin",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Course Admin")),1)]),_:1},8,["disabled"]),_(u,{disabled:i.form.roles.includes("admin")||i.form.roles.includes("course_admin"),value:"course_creator",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Course Creator")),1)]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),g("div",tst,[ae(t.$slots,"after_form",{},()=>[Pe((v(),R(h,{class:"fcom_primary_button",disabled:i.adding,onClick:e[2]||(e[2]=m=>o.addManager())},{default:w(()=>[i.form.editing_user?(v(),$("span",nst,M(t.$t("Update Role")),1)):(v(),$("span",sst,M(t.$t("Add Manager")),1))]),_:1},8,["disabled"])),[[p,i.adding]])])])]),_:3},8,["modelValue"])}const ost=de(Znt,[["render",ist]]),rst={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=nh(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=nh(this.xprofile.total_points),e=nh(t.max_points+1);return t.level!==e.level},getOutlineStyle(){if(!this.withCompletion)return{};const t=nh(this.xprofile.total_points),e=nh(t.max_points+1),n=this.xprofile.total_points-t.min_points,s=e.min_points-t.min_points,o=n/s*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"}}},ast=["src"],lst={key:1,class:"fcom_no_image"},cst={key:0,role:"region","aria-label":"User Level",class:"fcom_user_level_mark"};function ust(t,e,n,s,i,o){return v(),$("div",{class:W([{fcom_avatar_is_rounded:n.is_rounded,is_member_online:n.is_online},"fcom_user_avatar"])},[g("span",{style:Ke(o.getOutlineStyle),class:W({fcom_compilation_avatar:o.withCompletion})},[n.xprofile?(v(),$("img",{key:0,onError:e[0]||(e[0]=(...r)=>o.setAltImg&&o.setAltImg(...r)),src:n.xprofile.avatar,alt:""},null,40,ast)):(v(),$("span",lst))],6),o.level||n.is_online?(v(),$("div",cst,[g("span",null,M(o.level),1)])):O("",!0)],2)}const Jb=de(rst,[["render",ust]]),dst={name:"ModeratorSettings",components:{UserAvatar:Jb,UserRouteLink:Wr,ManagerForm:ost,Layout:Xs,AppLayout:Ks},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"))}},hst=["href"],fst={class:"settings_router manager_section"},pst={class:"fhr_content_layout_body"},mst={key:0,class:"setting_body"},gst={class:"fcom_manager_actions"},vst={class:"bulk_search"},_st={class:"fcom_manager_table"},yst={class:"user_col"},bst={class:"user_info"},wst={style:{display:"flex"}},Cst={class:"user_id"},kst={class:"user_email"},xst={class:"fcom_table_action_col"},Sst={key:1,class:"setting_body",style:{"text-align":"center"}},$st={class:"promo_description"},Ast=["href"],Mst={class:"dialog_header"},Est={class:"dialog_left"},Tst={class:"dialog_body"};function Pst(t,e,n,s,i,o){const r=H("Plus"),a=ye,l=Ge,c=vt,u=a4,d=H("user-route-link"),h=Hr,f=zr,p=H("layout"),m=H("app-layout"),b=H("manager-form"),y=Ss,C=_t("loading");return v(),$(te,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(),R(l,{key:0,class:"fcom_primary_button",onClick:e[0]||(e[0]=k=>o.showForm(null))},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,M(t.$t("Add Manager")),1)]),_:1})):(v(),$("a",{key:1,target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},M(t.$t("Upgrade to Pro")),9,hst))]),default:w(()=>[g("div",fst,[g("div",pst,[t.has_pro?(v(),$("div",mst,[g("div",gst,[g("div",vst,[_(c,{modelValue:i.search,"onUpdate:modelValue":e[1]||(e[1]=k=>i.search=k),onKeydown:$t(o.fetch,["enter"]),placeholder:t.$t("Search"),class:"el-input-round"},{prefix:w(()=>[...e[5]||(e[5]=[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)])]),_:1},8,["modelValue","onKeydown","placeholder"])])]),g("div",_st,[Pe((v(),R(f,{data:i.managers,"empty-text":t.$t("No Managers Found")},{default:w(()=>[_(h,{label:t.$t("Members"),sortable:"","min-width":"160"},{default:w(k=>[g("div",yst,[_(u,{src:k.row.xprofile.avatar},null,8,["src"]),g("div",bst,[g("div",wst,[_(d,{xprofile:k.row.xprofile},null,8,["xprofile"]),g("span",Cst,"#"+M(k.row.ID),1)]),g("span",kst,M(k.row.user_email),1)])])]),_:1},8,["label"]),_(h,{label:t.$t("Role"),sortable:""},{default:w(k=>[g("span",null,M(o.formatRoles(k.row.community_role.value)),1)]),_:1},8,["label"]),_(h,null,{default:w(k=>[g("div",xst,[_(l,{onClick:x=>o.showForm(k.row),size:"small"},{default:w(()=>[G(M(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(l,{onClick:x=>o.removeManager(k.row),type:"danger",plain:"",size:"small"},{default:w(()=>[G(M(t.$t("Remove")),1)]),_:1},8,["onClick"])])]),_:1})]),_:1},8,["data","empty-text"])),[[C,i.loading]])])])):(v(),$("div",Sst,[g("p",$st,M(t.$t("__MODERATOR_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},M(t.$t("Upgrade to Pro")),9,Ast)]))])])]),_:1},8,["title"])]),_:1}),_(y,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:i.showModal,"onUpdate:modelValue":e[4]||(e[4]=k=>i.showModal=k),direction:"rtl"},{header:w(({close:k})=>[g("div",Mst,[g("div",Est,[e[6]||(e[6]=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)),g("div",null,[g("h4",null,M(t.$t(i.editing_manager.editing_user?"Update Role":"Add Manager")),1),g("p",null,M(t.$t("you can edit your role here")),1)])])])]),default:w(()=>[g("div",Tst,[i.showModal?(v(),R(b,{key:0,onCompleted:e[2]||(e[2]=()=>{o.fetch(),i.showModal=!1}),modelValue:i.editing_manager,"onUpdate:modelValue":e[3]||(e[3]=k=>i.editing_manager=k)},null,8,["modelValue"])):O("",!0)])]),_:1},8,["width","modelValue"])],64)}const Ist=de(dst,[["render",Pst]]),Lst={name:"NestedReplyBox",components:{SingleComment:Kb,FeedTextComposer:E1,CommentReactions:Gz,HeartIcon:Gb},props:["comment","feed","checkPermission","show_reacts_only","defaultMentions"],emits:["commented","copyLink"],data(){return{open:!1,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,s;const t=((e=this.commentReply.media_images)==null?void 0:e.length)>0||((s=(n=this.commentReply.meta)==null?void 0:n.media_preview)==null?void 0:s.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(i=>{this.comment.comments||(this.comment.comments=[]),this.commentReply={message:"",media_images:[]},this.comment.comments.push(i.comment),Array.isArray(this.feed.comments)&&this.feed.comments.push(i.comment),this.$emit("commented",i.comment),this.feed.comments_count=parseInt(this.feed.comments_count)+1,this.open=!1}).catch(i=>{this.$handleError(i)}).finally(()=>{this.submitting=!1}))},toggleCommentBox(t){var n;if(!this.hasCommentPermission(this.feed)){this.$notify({message:this.$t("Please join the Space to post a comment."),type:"warning"});return}this.open=!this.open;let e=(n=t==null?void 0:t.xprofile)==null?void 0:n.username;this.open&&e&&t.user_id!=this.auth.user_id&&(this.commentReply.message=`@${e} `)},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)}}},Ost={key:0,class:"reply_box"},Dst={class:"fcom_comments_react fcom_reaction_list"},Rst={class:"child_comments"},Vst=["id"],Fst={key:0,class:"reply_box"},Nst=["onClick"],Bst={class:"fcom_comments_react fcom_reaction_list"},zst={key:0,class:"child_reply_wrap"},Hst={class:"feed_commenting"},Ust={class:"person_avatar"},jst=["alt","src"];function Wst(t,e,n,s,i,o){var h;const r=H("HeartIcon"),a=ye,l=H("CommentReactions"),c=H("single-comment"),u=Ge,d=H("feed-text-composer");return v(),$(te,null,[o.canComment?(v(),$("div",Ost,[((h=n.feed.meta)==null?void 0:h.comments_disabled)!=="yes"?(v(),$("span",{key:0,onClick:e[0]||(e[0]=f=>o.toggleCommentBox(n.comment)),class:"reply_btn"},M(t.$t("Reply")),1)):O("",!0),g("span",{class:W([{fcom_is_liked:n.comment.liked},"reply_btn"])},[g("div",Dst,[_(a,{class:W({user_reacted:n.comment.liked}),onClick:e[1]||(e[1]=f=>o.toggleLike(n.comment))},{default:w(()=>[_(r,{filled:n.comment.liked},null,8,["filled"])]),_:1},8,["class"]),parseInt(n.comment.reactions_count)?(v(),R(l,{key:0,comment:n.comment},null,8,["comment"])):O("",!0)])],2),ae(t.$slots,"after_reply_box_text")])):O("",!0),!n.show_reacts_only||i.open?(v(),$(te,{key:1},[g("div",Rst,[(v(!0),$(te,null,be(n.comment.comments,(f,p)=>(v(),$("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(),$("div",Fst,[((m=n.feed.meta)==null?void 0:m.comments_disabled)!=="yes"?(v(),$("span",{key:0,onClick:b=>o.toggleCommentBox(f),class:"reply_btn"},M(t.$t("Reply")),9,Nst)):O("",!0),g("span",{class:W([{fcom_is_liked:f.liked},"reply_btn"])},[g("div",Bst,[_(a,{class:W({user_reacted:f.liked}),onClick:b=>o.toggleLike(f)},{default:w(()=>[_(r,{filled:f.liked},null,8,["filled"])]),_:2},1032,["class","onClick"]),parseInt(f.reactions_count)?(v(),R(l,{key:0,comment:f},null,8,["comment"])):O("",!0)])],2)])):O("",!0)]}),_:2},1032,["onCopyLink","onDeleted","comment"])],8,Vst))),256))]),i.open?(v(),$("div",zst,[g("div",Hst,[g("div",Ust,[g("img",{alt:t.$t("Your Photo"),src:t.auth.avatar},null,8,jst)]),g("div",{onKeydown:e[3]||(e[3]=$t((...f)=>o.maybeSave&&o.maybeSave(...f),["enter"])),class:"feed_comment_input comment_text"},[_(d,{config:{multipleMedia:!0},context:"comment",defaultMentions:n.defaultMentions?n.defaultMentions:[],disabled:i.submitting,autofocus:i.open,mentionQuery:{space_id:n.feed.space_id},content:i.commentReply,placeholder:t.$t("Leave a reply")},{default:w(()=>[_(u,{loading:i.submitting,disabled:i.submitting,onClick:e[2]||(e[2]=f=>o.addComment()),class:"fcom_primary_button"},{default:w(()=>[G(M(t.$t("Reply")),1)]),_:1},8,["loading","disabled"])]),_:1},8,["defaultMentions","disabled","autofocus","mentionQuery","content","placeholder"])],32)])])):O("",!0)],64)):O("",!0)],64)}const Yst=de(Lst,[["render",Wst]]),Gst={name:"FeedComments",components:{SingleComment:Kb,NestedReplyBox:Yst},props:["feed","show_all","checkPermission","defaultMentions","sortBy","is_single"],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=[],s={};let i=null;for(let l=0;l<t.length;l++){const c=t[l];!i&&c.is_sticky&&(i=c),c.parent_id?(e[c.parent_id]||(e[c.parent_id]=[]),e[c.parent_id].push(c)):(n.push(c.id),s[c.id]=c)}for(const l of n)s[l].comments=e[l]||void 0;if(i&&s[i.id]){i=s[i.id];const l=n.indexOf(i.id);l!==-1&&n.splice(l,1),delete s[i.id]}const o=i||(n.length?s[n[n.length-1]]:null);if(!n.length&&!i)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=s[u])==null?void 0:d.reactions_count)||0)-(((h=s[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)&&s[u]).map(u=>s[u]);for(let u=n.length-1;u>=0;u--)c.has(n[u])||a.unshift(s[n[u]])}else a=n.map(l=>s[l]);return i&&a.unshift(i),{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,this.feed.type=="text"&&this.$eventBus.emit("feed_interaction",this.feed.id)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})},collectCommentIds(t){var s;const e=new Set([t.id]),n=t.comments?[...t.comments]:[];for(;n.length;){const i=n.pop();e.add(i.id),(s=i.comments)!=null&&s.length&&n.push(...i.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),s=this.appVars.urls.portal_base;s=s.replace(/\/$/,"");let i=s+n.fullPath;navigator.clipboard.writeText(i).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()}},qst={key:0,class:"feed_comments"},Xst=["id"],Kst={key:1,class:"feed_comments"},Zst={class:"each_comment"};function Jst(t,e,n,s,i,o){const r=Wt,a=H("nested-reply-box"),l=H("single-comment");return n.show_all?(v(),$("div",qst,[i.loading?(v(),R(r,{key:0,row:5,class:"feed_comments_skeleton"})):(v(),$(te,{key:1},[ae(t.$slots,"before_comments_start"),(v(!0),$(te,null,be(o.displayComments,(c,u)=>(v(),$("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)},Es({_: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:[],onCopyLink:o.copyCommentLink},null,8,["feed","comment","checkPermission","defaultMentions","onCopyLink"])]),key:"0"}]),1032,["comment","space_id","onCopyLink","onReload","onDeleted"])],8,Xst))),128))],64))])):o.lastComment?(v(),$("div",Kst,[g("div",Zst,[_(l,{comment:o.lastComment,space_id:n.feed.space_id,show_report:!0,onCopyLink:o.copyCommentLink,onDeleted:e[1]||(e[1]=c=>o.handleCommentDelete(o.lastComment))},Es({_: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},{after_reply_box_text:w(()=>[o.lastComment.comments&&o.lastComment.comments.length?(v(),$("span",{key:0,onClick:e[0]||(e[0]=c=>t.$emit("forceShowAll")),class:"reply_btn last_comment_reply_txt"},M(t.$_n("%d reply","%d replies",o.lastComment.comments.length)),1)):O("",!0)]),_:1},8,["defaultMentions","onCopyLink","checkPermission","feed","comment"])]),key:"0"}]),1032,["comment","space_id","onCopyLink"])]),n.feed.comments_count>1?(v(),$("div",{key:0,onClick:e[2]||(e[2]=c=>o.maybeShowAllComments()),class:"each_comment show_all_comments"},M(t.$t("View more comments")),1)):O("",!0)])):O("",!0)}const Qst=de(Gst,[["render",Jst]]),eit={name:"ReactedUsers",components:{UserRouteLink:Wr},data(){return{centerDialogVisible:!1,reactions:null,loading:!1}},props:{feed:{type:Object,required:!0,default:()=>({})}},computed:{reactedProfiles(){let t=[],e=null;return this.feed.has_user_react&&(e=this.auth.user_id,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,s,i;(i=(s=(n=(e=this.$refs.reactedPopover)==null?void 0:e.popperRef)==null?void 0:n.popperInstanceRef)==null?void 0:s.update)==null||i.call(s)})}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1}))}}},tit=["title"],nit={key:0,class:"reactions_avatars"},sit=["alt","src"],iit={key:0},oit={key:1},rit={class:"fcom_user_lists"},ait={key:2};function lit(t,e,n,s,i,o){const r=Wt,a=H("UserAvatar"),l=H("UserRouteLink"),c=ui,u=Ii;return v(),R(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(),$("div",nit,[(v(!0),$(te,null,be(o.reactedProfiles,d=>(v(),$("span",{key:d.id,class:"fcom_reaction_avatar fcom_avatar_is_rounded fcom_user_avatar"},[d!=null&&d.avatar?(v(),$("img",{key:0,alt:t.$t("Reacted Users"),src:d.avatar},null,8,sit)):O("",!0)]))),128))])):O("",!0),g("span",null,M(t.$_n("%s like","%s likes",n.feed.reactions_count)),1)],8,tit)]),default:w(()=>[i.loading?(v(),$("div",iit,[_(r,{animated:!0,rows:3})])):i.reactions?(v(),$("div",oit,[_(c,{"max-height":"300px"},{default:w(()=>[g("ul",rit,[(v(!0),$(te,null,be(i.reactions,d=>(v(),$("li",null,[d.xprofile?(v(),$(te,{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(),$("div",ait,[g("p",null,M(t.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const cit=de(eit,[["render",lit]]);function uit(){this.__data__=[],this.size=0}var dit=uit;function hit(t,e){return t===e||t!==t&&e!==e}var rH=hit,fit=rH;function pit(t,e){for(var n=t.length;n--;)if(fit(t[n][0],e))return n;return-1}var Qb=pit,mit=Qb,git=Array.prototype,vit=git.splice;function _it(t){var e=this.__data__,n=mit(e,t);if(n<0)return!1;var s=e.length-1;return n==s?e.pop():vit.call(e,n,1),--this.size,!0}var yit=_it,bit=Qb;function wit(t){var e=this.__data__,n=bit(e,t);return n<0?void 0:e[n][1]}var Cit=wit,kit=Qb;function xit(t){return kit(this.__data__,t)>-1}var Sit=xit,$it=Qb;function Ait(t,e){var n=this.__data__,s=$it(n,t);return s<0?(++this.size,n.push([t,e])):n[s][1]=e,this}var Mit=Ait,Eit=dit,Tit=yit,Pit=Cit,Iit=Sit,Lit=Mit;function Qf(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}Qf.prototype.clear=Eit;Qf.prototype.delete=Tit;Qf.prototype.get=Pit;Qf.prototype.has=Iit;Qf.prototype.set=Lit;var e2=Qf,Oit=e2;function Dit(){this.__data__=new Oit,this.size=0}var Rit=Dit;function Vit(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var Fit=Vit;function Nit(t){return this.__data__.get(t)}var Bit=Nit;function zit(t){return this.__data__.has(t)}var Hit=zit,Uit=Xf,jit=Uit(Object,"create"),t2=jit,vE=t2;function Wit(){this.__data__=vE?vE(null):{},this.size=0}var Yit=Wit;function Git(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var qit=Git,Xit=t2,Kit="__lodash_hash_undefined__",Zit=Object.prototype,Jit=Zit.hasOwnProperty;function Qit(t){var e=this.__data__;if(Xit){var n=e[t];return n===Kit?void 0:n}return Jit.call(e,t)?e[t]:void 0}var eot=Qit,tot=t2,not=Object.prototype,sot=not.hasOwnProperty;function iot(t){var e=this.__data__;return tot?e[t]!==void 0:sot.call(e,t)}var oot=iot,rot=t2,aot="__lodash_hash_undefined__";function lot(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=rot&&e===void 0?aot:e,this}var cot=lot,uot=Yit,dot=qit,hot=eot,fot=oot,pot=cot;function ep(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}ep.prototype.clear=uot;ep.prototype.delete=dot;ep.prototype.get=hot;ep.prototype.has=fot;ep.prototype.set=pot;var mot=ep,_E=mot,got=e2,vot=y5;function _ot(){this.size=0,this.__data__={hash:new _E,map:new(vot||got),string:new _E}}var yot=_ot;function bot(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var wot=bot,Cot=wot;function kot(t,e){var n=t.__data__;return Cot(e)?n[typeof e=="string"?"string":"hash"]:n.map}var n2=kot,xot=n2;function Sot(t){var e=xot(this,t).delete(t);return this.size-=e?1:0,e}var $ot=Sot,Aot=n2;function Mot(t){return Aot(this,t).get(t)}var Eot=Mot,Tot=n2;function Pot(t){return Tot(this,t).has(t)}var Iot=Pot,Lot=n2;function Oot(t,e){var n=Lot(this,t),s=n.size;return n.set(t,e),this.size+=n.size==s?0:1,this}var Dot=Oot,Rot=yot,Vot=$ot,Fot=Eot,Not=Iot,Bot=Dot;function tp(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var s=t[e];this.set(s[0],s[1])}}tp.prototype.clear=Rot;tp.prototype.delete=Vot;tp.prototype.get=Fot;tp.prototype.has=Not;tp.prototype.set=Bot;var C5=tp,zot=e2,Hot=y5,Uot=C5,jot=200;function Wot(t,e){var n=this.__data__;if(n instanceof zot){var s=n.__data__;if(!Hot||s.length<jot-1)return s.push([t,e]),this.size=++n.size,this;n=this.__data__=new Uot(s)}return n.set(t,e),this.size=n.size,this}var Yot=Wot,Got=e2,qot=Rit,Xot=Fit,Kot=Bit,Zot=Hit,Jot=Yot;function np(t){var e=this.__data__=new Got(t);this.size=e.size}np.prototype.clear=qot;np.prototype.delete=Xot;np.prototype.get=Kot;np.prototype.has=Zot;np.prototype.set=Jot;var aH=np,Qot="__lodash_hash_undefined__";function ert(t){return this.__data__.set(t,Qot),this}var trt=ert;function nrt(t){return this.__data__.has(t)}var srt=nrt,irt=C5,ort=trt,rrt=srt;function ay(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new irt;++e<n;)this.add(t[e])}ay.prototype.add=ay.prototype.push=ort;ay.prototype.has=rrt;var lH=ay;function art(t,e){for(var n=-1,s=t==null?0:t.length;++n<s;)if(e(t[n],n,t))return!0;return!1}var lrt=art;function crt(t,e){return t.has(e)}var cH=crt,urt=lH,drt=lrt,hrt=cH,frt=1,prt=2;function mrt(t,e,n,s,i,o){var r=n&frt,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&prt?new urt:void 0;for(o.set(t,e),o.set(e,t);++d<a;){var p=t[d],m=e[d];if(s)var b=r?s(m,p,d,e,t,o):s(p,m,d,t,e,o);if(b!==void 0){if(b)continue;h=!1;break}if(f){if(!drt(e,function(y,C){if(!hrt(f,C)&&(p===y||i(p,y,n,s,o)))return f.push(C)})){h=!1;break}}else if(!(p===m||i(p,m,n,s,o))){h=!1;break}}return o.delete(t),o.delete(e),h}var uH=mrt,grt=$a,vrt=grt.Uint8Array,_rt=vrt;function yrt(t){var e=-1,n=Array(t.size);return t.forEach(function(s,i){n[++e]=[i,s]}),n}var brt=yrt;function wrt(t){var e=-1,n=Array(t.size);return t.forEach(function(s){n[++e]=s}),n}var k5=wrt,yE=bb,bE=_rt,Crt=rH,krt=uH,xrt=brt,Srt=k5,$rt=1,Art=2,Mrt="[object Boolean]",Ert="[object Date]",Trt="[object Error]",Prt="[object Map]",Irt="[object Number]",Lrt="[object RegExp]",Ort="[object Set]",Drt="[object String]",Rrt="[object Symbol]",Vrt="[object ArrayBuffer]",Frt="[object DataView]",wE=yE?yE.prototype:void 0,jw=wE?wE.valueOf:void 0;function Nrt(t,e,n,s,i,o,r){switch(n){case Frt:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Vrt:return!(t.byteLength!=e.byteLength||!o(new bE(t),new bE(e)));case Mrt:case Ert:case Irt:return Crt(+t,+e);case Trt:return t.name==e.name&&t.message==e.message;case Lrt:case Drt:return t==e+"";case Prt:var a=xrt;case Ort:var l=s&$rt;if(a||(a=Srt),t.size!=e.size&&!l)return!1;var c=r.get(t);if(c)return c==e;s|=Art,r.set(t,e);var u=krt(a(t),a(e),s,i,o,r);return r.delete(t),u;case Rrt:if(jw)return jw.call(t)==jw.call(e)}return!1}var Brt=Nrt;function zrt(t,e){for(var n=-1,s=e.length,i=t.length;++n<s;)t[i+n]=e[n];return t}var Hrt=zrt,Urt=Hrt,jrt=Aa;function Wrt(t,e,n){var s=e(t);return jrt(t)?s:Urt(s,n(t))}var Yrt=Wrt;function Grt(t,e){for(var n=-1,s=t==null?0:t.length,i=0,o=[];++n<s;){var r=t[n];e(r,n,t)&&(o[i++]=r)}return o}var qrt=Grt;function Xrt(){return[]}var Krt=Xrt,Zrt=qrt,Jrt=Krt,Qrt=Object.prototype,eat=Qrt.propertyIsEnumerable,CE=Object.getOwnPropertySymbols,tat=CE?function(t){return t==null?[]:(t=Object(t),Zrt(CE(t),function(e){return eat.call(t,e)}))}:Jrt,nat=tat,sat=Yrt,iat=nat,oat=E4;function rat(t){return sat(t,oat,iat)}var aat=rat,kE=aat,lat=1,cat=Object.prototype,uat=cat.hasOwnProperty;function dat(t,e,n,s,i,o){var r=n&lat,a=kE(t),l=a.length,c=kE(e),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in e:uat.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 b=r;++d<l;){h=a[d];var y=t[h],C=e[h];if(s)var k=r?s(C,y,h,e,t,o):s(y,C,h,t,e,o);if(!(k===void 0?y===C||i(y,C,n,s,o):k)){m=!1;break}b||(b=h=="constructor")}if(m&&!b){var x=t.constructor,S=e.constructor;x!=S&&"constructor"in t&&"constructor"in e&&!(typeof x=="function"&&x instanceof x&&typeof S=="function"&&S instanceof S)&&(m=!1)}return o.delete(t),o.delete(e),m}var hat=dat,Ww=aH,fat=uH,pat=Brt,mat=hat,xE=Nz,SE=Aa,$E=S4,gat=A4,vat=1,AE="[object Arguments]",ME="[object Array]",$0="[object Object]",_at=Object.prototype,EE=_at.hasOwnProperty;function yat(t,e,n,s,i,o){var r=SE(t),a=SE(e),l=r?ME:xE(t),c=a?ME:xE(e);l=l==AE?$0:l,c=c==AE?$0:c;var u=l==$0,d=c==$0,h=l==c;if(h&&$E(t)){if(!$E(e))return!1;r=!0,u=!1}if(h&&!u)return o||(o=new Ww),r||gat(t)?fat(t,e,n,s,i,o):pat(t,e,l,n,s,i,o);if(!(n&vat)){var f=u&&EE.call(t,"__wrapped__"),p=d&&EE.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,b=p?e.value():e;return o||(o=new Ww),i(m,b,n,s,o)}}return h?(o||(o=new Ww),mat(t,e,n,s,i,o)):!1}var bat=yat,wat=bat,TE=u1;function dH(t,e,n,s,i){return t===e?!0:t==null||e==null||!TE(t)&&!TE(e)?t!==t&&e!==e:wat(t,e,n,s,dH,i)}var hH=dH,Cat=aH,kat=hH,xat=1,Sat=2;function $at(t,e,n,s){var i=n.length,o=i,r=!s;if(t==null)return!o;for(t=Object(t);i--;){var a=n[i];if(r&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){a=n[i];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 Cat;if(s)var h=s(c,u,l,t,e,d);if(!(h===void 0?kat(u,c,xat|Sat,s,d):h))return!1}}return!0}var Aat=$at,Mat=Bf;function Eat(t){return t===t&&!Mat(t)}var fH=Eat,Tat=fH,Pat=E4;function Iat(t){for(var e=Pat(t),n=e.length;n--;){var s=e[n],i=t[s];e[n]=[s,i,Tat(i)]}return e}var Lat=Iat;function Oat(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var pH=Oat,Dat=Aat,Rat=Lat,Vat=pH;function Fat(t){var e=Rat(t);return e.length==1&&e[0][2]?Vat(e[0][0],e[0][1]):function(n){return n===t||Dat(n,t,e)}}var Nat=Fat,Bat=Aa,zat=qb,Hat=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Uat=/^\w*$/;function jat(t,e){if(Bat(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||zat(t)?!0:Uat.test(t)||!Hat.test(t)||e!=null&&t in Object(e)}var x5=jat,mH=C5,Wat="Expected a function";function S5(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Wat);var n=function(){var s=arguments,i=e?e.apply(this,s):s[0],o=n.cache;if(o.has(i))return o.get(i);var r=t.apply(this,s);return n.cache=o.set(i,r)||o,r};return n.cache=new(S5.Cache||mH),n}S5.Cache=mH;var Yat=S5,Gat=Yat,qat=500;function Xat(t){var e=Gat(t,function(s){return n.size===qat&&n.clear(),s}),n=e.cache;return e}var Kat=Xat,Zat=Kat,Jat=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qat=/\\(\\)?/g,elt=Zat(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Jat,function(n,s,i,o){e.push(i?o.replace(Qat,"$1"):s||n)}),e}),tlt=elt;function nlt(t,e){for(var n=-1,s=t==null?0:t.length,i=Array(s);++n<s;)i[n]=e(t[n],n,t);return i}var slt=nlt,PE=bb,ilt=slt,olt=Aa,rlt=qb,alt=1/0,IE=PE?PE.prototype:void 0,LE=IE?IE.toString:void 0;function gH(t){if(typeof t=="string")return t;if(olt(t))return ilt(t,gH)+"";if(rlt(t))return LE?LE.call(t):"";var e=t+"";return e=="0"&&1/t==-alt?"-0":e}var llt=gH,clt=llt;function ult(t){return t==null?"":clt(t)}var dlt=ult,hlt=Aa,flt=x5,plt=tlt,mlt=dlt;function glt(t,e){return hlt(t)?t:flt(t,e)?[t]:plt(mlt(t))}var vH=glt,vlt=qb,_lt=1/0;function ylt(t){if(typeof t=="string"||vlt(t))return t;var e=t+"";return e=="0"&&1/t==-_lt?"-0":e}var s2=ylt,blt=vH,wlt=s2;function Clt(t,e){e=blt(e,t);for(var n=0,s=e.length;t!=null&&n<s;)t=t[wlt(e[n++])];return n&&n==s?t:void 0}var _H=Clt,klt=_H;function xlt(t,e,n){var s=t==null?void 0:klt(t,e);return s===void 0?n:s}var Slt=xlt;function $lt(t,e){return t!=null&&e in Object(t)}var Alt=$lt,Mlt=vH,Elt=x4,Tlt=Aa,Plt=vV,Ilt=$4,Llt=s2;function Olt(t,e,n){e=Mlt(e,t);for(var s=-1,i=e.length,o=!1;++s<i;){var r=Llt(e[s]);if(!(o=t!=null&&n(t,r)))break;t=t[r]}return o||++s!=i?o:(i=t==null?0:t.length,!!i&&Ilt(i)&&Plt(r,i)&&(Tlt(t)||Elt(t)))}var Dlt=Olt,Rlt=Alt,Vlt=Dlt;function Flt(t,e){return t!=null&&Vlt(t,e,Rlt)}var Nlt=Flt,Blt=hH,zlt=Slt,Hlt=Nlt,Ult=x5,jlt=fH,Wlt=pH,Ylt=s2,Glt=1,qlt=2;function Xlt(t,e){return Ult(t)&&jlt(e)?Wlt(Ylt(t),e):function(n){var s=zlt(n,t);return s===void 0&&s===e?Hlt(n,t):Blt(e,s,Glt|qlt)}}var Klt=Xlt;function Zlt(t){return function(e){return e==null?void 0:e[t]}}var Jlt=Zlt,Qlt=_H;function ect(t){return function(e){return Qlt(e,t)}}var tct=ect,nct=Jlt,sct=tct,ict=x5,oct=s2;function rct(t){return ict(t)?nct(oct(t)):sct(t)}var act=rct,lct=Nat,cct=Klt,uct=wV,dct=Aa,hct=act;function fct(t){return typeof t=="function"?t:t==null?uct:typeof t=="object"?dct(t)?cct(t[0],t[1]):lct(t):hct(t)}var pct=fct;function mct(t,e,n,s){for(var i=t.length,o=n+(s?1:-1);s?o--:++o<i;)if(e(t[o],o,t))return o;return-1}var gct=mct;function vct(t){return t!==t}var _ct=vct;function yct(t,e,n){for(var s=n-1,i=t.length;++s<i;)if(t[s]===e)return s;return-1}var bct=yct,wct=gct,Cct=_ct,kct=bct;function xct(t,e,n){return e===e?kct(t,e,n):wct(t,Cct,n)}var Sct=xct,$ct=Sct;function Act(t,e){var n=t==null?0:t.length;return!!n&&$ct(t,e,0)>-1}var Mct=Act;function Ect(t,e,n){for(var s=-1,i=t==null?0:t.length;++s<i;)if(n(e,t[s]))return!0;return!1}var Tct=Ect;function Pct(){}var Ict=Pct,Yw=Vz,Lct=Ict,Oct=k5,Dct=1/0,Rct=Yw&&1/Oct(new Yw([,-0]))[1]==Dct?function(t){return new Yw(t)}:Lct,Vct=Rct,Fct=lH,Nct=Mct,Bct=Tct,zct=cH,Hct=Vct,Uct=k5,jct=200;function Wct(t,e,n){var s=-1,i=Nct,o=t.length,r=!0,a=[],l=a;if(n)r=!1,i=Bct;else if(o>=jct){var c=e?null:Hct(t);if(c)return Uct(c);r=!1,i=zct,l=new Fct}else l=e?[]:a;e:for(;++s<o;){var u=t[s],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 i(l,d,n)||(l!==a&&l.push(d),a.push(u))}return a}var Yct=Wct,Gct=pct,qct=Yct;function Xct(t,e){return t&&t.length?qct(t,Gct(e)):[]}var Kct=Xct;const Zct=Ts(Kct),Jct={name:"FeedFooter",components:{ReactedUsers:cit,FeedComments:Qst,FeedTextComposer:E1,ChatIcon:Uz,HeartIcon:Gb},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=>{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,this.showCommentBox=!1,this.$notify.success(t.message),this.$nextTick(()=>{this.showCommentBox=!0,this.$emit("commented",t.comment)})}).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,s=>{s.user_id!=t&&e.push(s.xprofile)}),this.defaultMentions=Zct(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)}},Qct={ref:"feed_footer",class:"feed_footer"},eut={class:"fcom_feed_footer_actions"},tut={class:"fcom_sr_only"},nut={class:"fcom_feed_footer_meta"},sut={key:0},iut={key:0,class:"fcom_reactions_count feed_reaction_meta"},out={class:"feed_comment_count"},rut={key:2,class:"feed_reaction_meta"},aut={key:0,ref:"fcom_comment_sorting",class:"fcom_comment_sorting"},lut=["id"],cut={key:0,style:{padding:"0",margin:"0","text-align":"center"}},uut={key:1,class:"feed_commenting"},dut={class:"person_avatar"},hut=["src"],fut={key:2,class:""},put={style:{padding:"0",margin:"0","text-align":"center"}},mut={key:0,style:{margin:"10px 0"}},gut=["href"];function vut(t,e,n,s,i,o){var m,b,y,C;const r=H("HeartIcon"),a=ye,l=H("ChatIcon"),c=H("ReactedUsers"),u=an,d=Jt,h=H("feed-comments"),f=Ge,p=H("feed-text-composer");return v(),$(te,null,[g("div",Qct,[g("div",eut,[g("ul",null,[g("li",{class:W(["fcom_reaction fcom_reaction_list",{react_active:n.feed.has_user_react}]),onClick:e[0]||(e[0]=k=>o.toggleReact())},[_(a,{class:W({user_reacted:n.feed.has_user_react})},{default:w(()=>[_(r,{filled:n.feed.has_user_react},null,8,["filled"])]),_:1},8,["class"])],2),((m=n.feed.meta)==null?void 0:m.comments_disabled)!=="yes"?(v(),$("li",{key:0,class:"fcom_comment_btn_wrap",onClick:e[1]||(e[1]=k=>o.showCommentForm())},[_(a,null,{default:w(()=>[_(l)]),_:1}),g("span",null,[g("span",tut,M(t.$t("Comment")),1)])])):O("",!0)])]),g("div",nut,[n.feed.reactions_count||n.feed.comments_count||((b=n.feed.meta)==null?void 0:b.comments_disabled)==="yes"?(v(),$("ul",sut,[n.feed.reactions_count?(v(),$("li",iut,[_(c,{feed:n.feed},null,8,["feed"])])):O("",!0),n.feed.comments_count>0?(v(),$("li",{key:1,onClick:e[2]||(e[2]=(...k)=>o.maybeShowFeedModal&&o.maybeShowFeedModal(...k)),class:"feed_reaction_meta"},[g("div",out,M(t.$_n("%d comment","%d comments",n.feed.comments_count)),1)])):((y=n.feed.meta)==null?void 0:y.comments_disabled)==="yes"?(v(),$("li",rut,M(t.$t("comments disabled")),1)):O("",!0)])):O("",!0)])],512),_(h,{sortBy:i.sortBy,defaultMentions:i.defaultMentions,onForceShowAll:o.showAll,show_all:i.show_all_comments,feed:n.feed,is_single:n.is_single},{before_comments_start:w(()=>[n.feed.comments_count>=2?(v(),$("div",aut,[_(d,{"aria-label":t.$t("Sort comments by"),onChange:e[3]||(e[3]=k=>o.changeCommentsSortBy()),modelValue:i.sortBy,"onUpdate:modelValue":e[4]||(e[4]=k=>i.sortBy=k),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"]),i.commenting||n.is_single?(v(),$("div",{key:0,id:"feed_comment_form_"+n.feed.id,class:"feed_comment feed_commentbox_main"},[((C=n.feed.meta)==null?void 0:C.comments_disabled)==="yes"?(v(),$(te,{key:0},[n.feed.comments_count?(v(),$("p",cut,M(t.$t("Comments are disabled for this post.")),1)):O("",!0)],64)):t.hasCommentPermission(n.feed)?(v(),$("div",uut,[g("div",dut,[g("img",{alt:"",src:t.auth.photo},null,8,hut)]),i.showCommentBox?(v(),$("div",{key:0,onKeydown:e[6]||(e[6]=$t((...k)=>o.maybeSave&&o.maybeSave(...k),["enter"])),class:"feed_comment_input"},[_(p,{context:"comment",is_modal:n.is_modal,config:{multipleMedia:!0},mentionQuery:{space_id:n.feed.space_id},autofocus_changed:i.commenting,defaultMentions:i.defaultMentions,autofocus:i.isAutoFocus,disabled:i.saving,placeholder:t.$t("Write a comment"),content:i.comment},{default:w(()=>[_(f,{loading:i.saving,disabled:i.saving,class:"fcom_primary_button",onClick:e[5]||(e[5]=k=>o.postComment())},{default:w(()=>[G(M(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(),$("div",fut,[g("p",put,[G(M(t.$t("Please join the Space to post a comment."))+" ",1),t.appVars.auth.user_id?(v(),$("div",mut,[_(f,{class:"fcom_primary_button",onClick:e[7]||(e[7]=()=>{t.$emit("joinSpace")})},{default:w(()=>[G(M(t.$t("Join Space")),1)]),_:1})])):(v(),$("a",{key:1,href:t.getCurrentAuthUrl()},M(t.appVars.allow_signup?t.$t("Login / Signup"):t.$t("Login")),9,gut))])]))],8,lut)):O("",!0)],64)}const _ut=de(Jct,[["render",vut]]),yut={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)}}},but=["value","maxlength","placeholder"];function wut(t,e,n,s,i,o){return v(),$("textarea",{value:n.modelValue,onInput:e[0]||(e[0]=(...r)=>o.onInput&&o.onInput(...r)),onKeydown:e[1]||(e[1]=$t(Be(r=>t.$emit("enter"),["prevent"]),["enter"])),ref:"textarea",maxlength:n.maxlength,class:"fcom_status_title_input",rows:"1",placeholder:n.placeholder},null,40,but)}const Cut=de(yut,[["render",wut]]),kut={name:"EyeIcon"},xut={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Sut(t,e,n,s,i,o){return v(),$("svg",xut,[...e[0]||(e[0]=[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),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)])])}const $ut=de(kut,[["render",Sut]]),Aut={name:"CalendarIcon"},Mut={width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Eut(t,e,n,s,i,o){return v(),$("svg",Mut,[...e[0]||(e[0]=[ya('<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)])])}const Tut=de(Aut,[["render",Eut]]),Put={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"})},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:qf,FeedTextComposer:E1,SingleLineTextarea:Cut,EyeIcon:$ut,CalendarIcon:Tut},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:{...rve(lTe,["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.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 s=parseInt(e.format("mm"),10);return s=Math.ceil(s/10)*10,s===60?this.dayjs(e).add(1,"hour").format("HH")+":00":n+":"+(s<10?"0":"")+s},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(s=>s.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:{...ave(fE,["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"}},schedulePost(){if(this.scheduleModalVisible=!1,!this.scheduleForm.date||!this.scheduleForm.time){this.feed.scheduled_at=null;return}this.feed.scheduled_at=`${this.scheduleForm.date} ${this.scheduleForm.time}: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=""},async postStatus(t){var e;this.posting=!0;try{const s=await fE().createFeed(this.feedContext,t);if(s.scheduled_at||(this.$notify.success(s.message),this.$emit("added",s.feed)),this.feed=this.initFeed(),this.state="idle",s.scheduled_at){const i=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",i))}this.editorReady=!1}catch(n){this.$handleError(n),(e=n==null?void 0:n.shakes)!=null&&e.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(){if(this.space)return[];let t=Object.values(this.allSpaces),e=this.appVars.space_groups,n=[],s=[];this.each(e,o=>{let r=t.filter(a=>{let l=a.parent_id==o.id&&a.permissions&&a.permissions.can_create_post;return l&&s.push(a.slug),l});r.length&&n.push({label:o.title,spaces:r})});let i=t.filter(o=>!o.parent_id&&o.permissions&&o.permissions.can_create_post);i&&i.length&&n.push({label:this.$t("Others"),spaces:i}),this.globalDisabled||n.unshift({label:"",spaces:[{title:this.$t("On my profile"),slug:"__self__post__"}]}),this.postableSpaces=n}},mounted(){(this.editing_feed.id||this.defaultState=="active")&&(this.editorReady=!0)}},Iut={class:"person_avatar"},Lut=["alt","src"],Out={class:"create_header_content"},Dut={key:0,class:"fcom_create_status_box_header"},Rut={class:"user_infos"},Vut={class:"feed_user_name"},Fut={class:"feed_meta_info"},Nut={key:1,class:"feed_timestamp"},But={class:"create_header_action"},zut={key:0,ref:"fcom_topics_input",class:"fcom_topics_input"},Hut={style:{margin:"0",display:"block",width:"100%",padding:"5px 0","font-weight":"500"}},Uut={key:0,class:"fcom_meta_text"},jut={class:"fcom_post_actions"},Wut={key:0,class:"fcom_post_space_name"},Yut={class:"target_label"},Gut={ref:"fcom_posting_space",style:{"margin-right":"10px"}},qut={key:0,class:"fcom_space_title"},Xut={key:1},Kut={class:"fcom_empty_spaces_dropdown"},Zut={key:0,class:"fcom_composer_admin_actions"},Jut={key:0},Qut={class:"dialog_header"},edt={class:"dialog_left schedule_header_left"},tdt={class:"dialog_body"},ndt={class:"fcom_input_help"},sdt={class:"dialog_footer"};function idt(t,e,n,s,i,o){const r=H("EditPen"),a=ye,l=H("CalendarIcon"),c=Ge,u=H("EyeIcon"),d=H("Close"),h=H("SingleLineTextarea"),f=an,p=Jt,m=H("SpaceIcon"),b=fb,y=Ht,C=H("feed-text-composer"),k=md,x=en,S=C4,E=rn,T=Ss;return o.canPost?(v(),$("div",{key:0,class:W([{state_active:o.isStateActive},"create_status_holder"])},[g("div",{class:W(["create_header",{state_active:o.isStateActive}])},[g("div",Iut,[g("img",{alt:n.author.name||t.$t("Your Photo"),src:n.author.avatar||t.auth.avatar},null,8,Lut)]),g("div",Out,[o.isStateActive?O("",!0):(v(),$("div",{key:0,onClick:e[0]||(e[0]=(...P)=>o.makeActive&&o.makeActive(...P)),class:"form_placeholder"},M(o.currentPlaceHolder),1)),g("div",{class:W([{fcom_editor_with_title:i.hasPostTitle,"is-active":o.isStateActive},"fcom_create_status_box"])},[o.isStateActive?(v(),$("div",Dut,[g("div",Rut,[g("div",Vut,M(o.getPostTitle),1),g("div",Fut,[!n.editing_feed.id&&o.showScheduleInfo?(v(),$("div",{key:0,onClick:e[1]||(e[1]=(...P)=>o.openScheduleModal&&o.openScheduleModal(...P)),class:"feed_scheduled_info"},[g("span",null,M(o.getScheduleLabel),1),_(a,null,{default:w(()=>[_(r)]),_:1})])):(v(),$("span",Nut,M(n.editing_feed.id?t.humanDateDiff(n.editing_feed.created_at):t.dayjs().format(t.appVars.date_time_formatter)),1))])]),g("div",But,[o.showScheduleIcon?(v(),R(c,{key:0,onClick:o.openScheduleModal,text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(l)]),_:1})]),_:1},8,["onClick"])):O("",!0),_(c,{onClick:o.previewPost,text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(u)]),_:1})]),_:1},8,["onClick"]),o.isEditing?O("",!0):(v(),R(c,{key:1,class:"close_btn",onClick:o.cancelPost,text:""},{default:w(()=>[_(a,null,{default:w(()=>[_(d)]),_:1})]),_:1},8,["onClick"]))])])):O("",!0),i.editorReady?(v(),R(C,{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:i.isAutoFocus||!i.hasPostTitle,onEditorCreated:e[9]||(e[9]=()=>{i.isAutoFocus=!0}),mentionQuery:o.currentSpaceSlug&&o.currentSpaceSlug!=="__self__post__"?{space:o.currentSpaceSlug}:{},disabled:i.posting,autofocus_changed:i.autofocus_changed,is_editing:!!o.isEditing,content:i.feed},{before_input:w(()=>[i.hasPostTitle?(v(),R(h,{key:0,maxlength:120,autofocus:!0,isActive:o.isStateActive,modelValue:i.feed.title,"onUpdate:modelValue":e[2]||(e[2]=P=>i.feed.title=P),onEnter:e[3]||(e[3]=P=>o.changeAutoFocus()),placeholder:i.hasPostTitle=="required"?t.$t("Short title of this post"):t.$t("Title (optional)")},null,8,["isActive","modelValue","placeholder"])):O("",!0)]),before_composer_footer:w(()=>[ae(t.$slots,"before_footer")]),after_input:w(()=>[t.has_pro&&o.currentTopics.length?(v(),$("div",zut,[_(p,{"popper-class":"fcom_topics_select","multiple-limit":t.appVars.topicsConfig.max_topics_per_post,modelValue:i.feed.topic_ids,"onUpdate:modelValue":e[4]||(e[4]=P=>i.feed.topic_ids=P),multiple:t.appVars.topicsConfig.max_topics_per_post>1,placeholder:o.getPlaceholder},{default:w(()=>[(v(!0),$(te,null,be(o.currentTopics,P=>(v(),R(f,{key:P.slug,label:P.title,value:P.id},{default:w(()=>[g("span",Hut,M(P.title),1),P.description?(v(),$("span",Uut,M(P.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&&i.feed.send_announcement_email?(v(),$("div",Zut,[_(y,{disabled:!t.has_pro,"true-value":"yes","false-value":"no",modelValue:i.feed.send_announcement_email,"onUpdate:modelValue":e[8]||(e[8]=P=>i.feed.send_announcement_email=P)},{default:w(()=>[G(M(t.$t("Send announcement email to space members"))+" ",1),t.has_pro?O("",!0):(v(),$("span",Jut,"("+M(t.$t("Require Pro"))+")",1))]),_:1},8,["disabled","modelValue"])])):O("",!0)]),default:w(()=>[g("div",jut,[n.space&&o.isStateActive?(v(),$("div",Wut,[g("span",null,"#"+M(n.space),1)])):O("",!0),!n.space&&!n.disableSpace?(v(),$(te,{key:1},[g("span",Yut,M(t.$t("Posting in:")),1),g("span",Gut,[_(p,{modelValue:i.feed.space,"onUpdate:modelValue":e[5]||(e[5]=P=>i.feed.space=P),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]=P=>o.feedSpaceChanged())},{empty:w(()=>[g("p",Kut,M(Object.keys(o.allSpaces).length?t.$t("No spaces to post in"):t.$t("Join a space to post")),1)]),default:w(()=>[(v(!0),$(te,null,be(i.postableSpaces,P=>(v(),R(b,{key:P.label,label:P.label},{default:w(()=>[(v(!0),$(te,null,be(P.spaces,I=>(v(),R(f,{key:I.slug,label:I.title,value:I.slug},{default:w(()=>[I.id?(v(),$("span",qut,[_(m,{space_profile:I},null,8,["space_profile"]),g("span",null,M(t.getExcerpt(I.title,30)),1)])):(v(),$("span",Xut,M(t.getExcerpt(I.title,30)),1))]),_:2},1032,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"])],512)],64)):O("",!0),ae(t.$slots,"before_submit_btn"),_(c,{onClick:e[7]||(e[7]=P=>o.post()),disabled:i.posting||o.isEditing&&n.saving,loading:o.isEditing?n.saving:i.posting,class:W(["fcom_primary_button",{fcom_update_button:o.isEditing}])},{default:w(()=>[G(M(o.getButtonLabel),1)]),_:1},8,["disabled","loading","class"])])]),_:3},8,["placeholder","config","autofocus","mentionQuery","disabled","autofocus_changed","is_editing","content"])):O("",!0),ae(t.$slots,"after_composer")],2)])],2),_(T,{modelValue:i.scheduleModalVisible,"onUpdate:modelValue":e[12]||(e[12]=P=>i.scheduleModalVisible=P),width:t.modalWidth,"modal-class":"fcom_common_dialog","append-to-body":!0,"close-on-click-modal":!1},{header:w(()=>[g("div",Qut,[g("div",edt,[g("h4",null,M(t.$t("Schedule Post")),1),g("p",null,M(t.$t("Choose a date and time in the future when you want your post to be published")),1)])])]),footer:w(()=>[g("div",sdt,[_(c,{class:"fcom_secondary_button",onClick:o.cancelSchedule},{default:w(()=>[G(M(t.$t("Remove Schedule")),1)]),_:1},8,["onClick"]),_(c,{class:"fcom_primary_button",disabled:o.isScheduleDisabled,onClick:o.schedulePost},{default:w(()=>[G(M(t.$t("Select Schedule")),1)]),_:1},8,["disabled","onClick"])])]),default:w(()=>[g("div",tdt,[_(E,{"label-position":"top",class:"fcom_schedule_form"},{default:w(()=>[_(x,{label:t.$t("Date")},{default:w(()=>[_(k,{modelValue:i.scheduleForm.date,"onUpdate:modelValue":e[10]||(e[10]=P=>i.scheduleForm.date=P),type:"date","value-format":"YYYY-MM-DD",format:"YYYY-MM-DD",placeholder:t.$t("Select Date"),"disabled-date":o.isDateDisabled},null,8,["modelValue","placeholder","disabled-date"])]),_:1},8,["label"]),_(x,{label:t.$t("Time")},{default:w(()=>[_(S,{modelValue:i.scheduleForm.time,"onUpdate:modelValue":e[11]||(e[11]=P=>i.scheduleForm.time=P),disabled:!i.scheduleForm.date,style:{width:"210px"},step:"00:10",start:o.getStartTime,end:"23:59",placeholder:t.$t("Select Time")},null,8,["modelValue","disabled","start","placeholder"])]),_:1},8,["label"])]),_:1}),_(x,null,{default:w(()=>[g("p",ndt,M(t.$t("The date and time is based on your site's Timezone")),1)]),_:1})])]),_:1},8,["modelValue","width"])],2)):O("",!0)}const odt=de(Put,[["render",idt]]),rdt={name:"EditFeed",components:{SpaceIcon:qf,CreateStatusForm:odt},data(){return{loading:!1,saving:!1,localDialogVisible:this.dialogVisible,feed:{},autofocus_changed:!1,hasPostTitle:this.hasFeature("has_post_title"),changeSpace:!1,newSpaceId:null,makePublish:!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}).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),this.makePublish&&(e.status="published"),this.saving=!0,this.$post(`feeds/${t.id}`,e).then(s=>{this.$notify.success(s.message),this.$emit("updated",s.feed),this.handleClose()}).catch(s=>{this.$handleError(s)}).finally(()=>{this.saving=!1})},handleClose(){this.localDialogVisible=!1,this.$emit("close")}},mounted(){this.getFeed()}},adt={class:"fcom_feed_edit"},ldt={class:"fcom_feed_edit_dialog_header"},cdt={key:0,class:"fcom_feed_edit_dialog_body"},udt={key:0},ddt={key:0,style:{"margin-top":"5px"}},hdt={class:"fcom_space_title"};function fdt(t,e,n,s,i,o){const r=H("Close"),a=ye,l=Ht,c=an,u=H("SpaceIcon"),d=Jt,h=H("create-status-form"),f=Wt,p=Ss,m=_t("loading");return v(),$("div",adt,[_(p,{class:"fcom_feed_edit_dialog",modelValue:i.localDialogVisible,"onUpdate:modelValue":e[3]||(e[3]=b=>i.localDialogVisible=b),width:t.dialogWidth,"append-to-body":!0,overflow:"","before-close":()=>{},"show-close":!1},{default:w(()=>{var b,y;return[Pe((v(),$("div",null,[g("div",ldt,[g("span",null,M(t.$t("Edit Feed")),1),_(a,{onClick:o.handleClose},{default:w(()=>[_(r)]),_:1},8,["onClick"])]),i.feed.id?(v(),$("div",cdt,[!(n.hide_create_form&&t.auth.user_id)||t.canEditFeed(i.feed)?(v(),R(h,{key:0,"default-state":"active",btn_text:t.$t("Update"),editing_feed:i.feed,author:n.author,onUpdatePost:o.handleUpdatePost,saving:i.saving,disableSpace:!0,space:(y=(b=i.feed)==null?void 0:b.space)==null?void 0:y.slug},{after_composer:w(()=>[o.canMovePost?(v(),$("div",udt,[_(l,{modelValue:i.changeSpace,"onUpdate:modelValue":e[0]||(e[0]=C=>i.changeSpace=C)},{default:w(()=>[G(M(t.$t("Move to a different space")),1)]),_:1},8,["modelValue"]),i.changeSpace?(v(),$("div",ddt,[_(d,{modelValue:i.newSpaceId,"onUpdate:modelValue":e[1]||(e[1]=C=>i.newSpaceId=C),placeholder:t.$t("Select destination"),style:{width:"100%"}},{default:w(()=>[_(c,{value:"profile",label:o.profileOptionLabel,disabled:!i.feed.space_id},{default:w(()=>[g("span",null,M(o.profileOptionLabel),1)]),_:1},8,["label","disabled"]),(v(!0),$(te,null,be(t.appVars.auth.spaces,C=>(v(),R(c,{disabled:i.feed.space_id==C.id,key:C.id,label:C.title,value:C.id},{default:w(()=>[g("span",hdt,[_(u,{space_profile:C},null,8,["space_profile"]),g("span",null,M(t.getExcerpt(C.title,30)),1)])]),_:2},1032,["disabled","label","value"]))),128))]),_:1},8,["modelValue","placeholder"])])):O("",!0)])):O("",!0)]),before_submit_btn:w(()=>[i.feed.status=="unlisted"?(v(),R(l,{key:0,modelValue:i.makePublish,"onUpdate:modelValue":e[2]||(e[2]=C=>i.makePublish=C)},{default:w(()=>[G(M(t.$t("Publish as a post")),1)]),_:1},8,["modelValue"])):O("",!0)]),_:1},8,["btn_text","editing_feed","author","onUpdatePost","saving","space"])):O("",!0)])):(v(),R(f,{key:1,rows:5,animated:!0}))])),[[m,i.loading]])]}),_:1},8,["modelValue","width"])])}const yH=de(rdt,[["render",fdt]]),pdt={name:"SurveyVoters",props:["feed","option","options","totalCount"],components:{UserRouteLink:Wr,UserAvatar:Jb},data(){return{voters:[],loading:!1,showVotersDialog:!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 t;this.loading=!0,this.$get(`feeds/${this.feed.id}/apps/survey-voters/${(t=this.option)==null?void 0:t.slug}`).then(e=>{this.voters=e.voters}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})}},mounted(){this.loadVoters()}},mdt={class:"dialog_header"},gdt={class:"fcom_filter_menu"},vdt={class:"fcom_filter_menu_ul"},_dt=["onClick"],ydt={key:1},bdt={class:"feed_meta_info survey_voters_meta"},wdt={class:"meta_line"},Cdt={class:"meta_line"},kdt={class:"voters_list"},xdt={class:"voter_avatar"},Sdt={class:"voter_info"},$dt=["title"],Adt={key:2,class:"not_found"};function Mdt(t,e,n,s,i,o){const r=Wt,a=H("UserAvatar"),l=H("UserRouteLink"),c=ui,u=Ss;return v(),R(u,{modelValue:i.showVotersDialog,"onUpdate:modelValue":e[0]||(e[0]=d=>i.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",mdt,[g("div",gdt,[g("ul",vdt,[(v(!0),$(te,null,be(n.options,h=>(v(),$("li",{key:h.slug},[g("a",{onClick:Be(f=>o.switchOption(h.slug),["prevent"]),class:W({"router-link-exact-active":n.option.slug==h.slug}),href:"#"},M(h.label),11,_dt)]))),128))])])])]),default:w(()=>[i.loading?(v(),R(r,{key:0,animated:"",rows:4})):i.voters.length?(v(),$("div",ydt,[g("div",bdt,[g("span",wdt,M(o.getVotePercentage),1),g("span",Cdt,M(t.$_n("%s Vote","%s Votes",n.option.vote_counts)),1)]),_(c,{"max-height":"800px"},{default:w(()=>[g("div",kdt,[(v(!0),$(te,null,be(i.voters,d=>(v(),$("div",{key:d.id,class:"voter_item"},[d.xprofile?(v(),$(te,{key:0},[g("div",xdt,[_(a,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"])]),g("div",Sdt,[_(l,{show_badge:!0,xprofile:d.xprofile},null,8,["xprofile"]),d.xprofile.created_at?(v(),$("div",{key:0,title:d.xprofile.created_at,class:"voter_time"},M(t.$t("Joined %s",t.humanDateDiff(d.xprofile.created_at))),9,$dt)):O("",!0)])],64)):O("",!0)]))),128))])]),_:1})])):(v(),$("div",Adt,[g("p",null,M(t.$t("No voters yet")),1)]))]),_:1},8,["modelValue","width","onClose"])}const Edt=de(pdt,[["render",Mdt]]),Tdt={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:Edt},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()}},Pdt={class:"fcom_app_options"},Idt=["onClick"],Ldt={class:"fcom_app_text"},Odt={class:"fcom_app_input_wrap"},Ddt={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 6"},Rdt={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8 8"},Vdt=["onClick"],Fdt={key:0},Ndt={class:"feed_meta_info"},Bdt={key:0,class:"meta_line"},zdt=["title"],Hdt=["title"];function Udt(t,e,n,s,i,o){const r=H("ArrowRight"),a=ye,l=H("SurveyVoters");return v(),$(te,null,[g("div",{class:W(["fcom_app_render",{"no-border":o.shouldHideBorder}])},[g("div",Pdt,[(v(!0),$(te,null,be(i.formattedOptions,(c,u)=>(v(),$("div",{key:c.slug,onClick:d=>o.toggleVote(u),class:W([c.voted?"fcom_is_voted":"","fcom_app_option"])},[g("div",Ldt,[g("span",Odt,[g("span",{class:W("fcom_input_"+i.inputType)},[i.inputType=="single_choice"?(v(),$("svg",Ddt,[...e[1]||(e[1]=[g("circle",{cx:"3",cy:"3",r:"2.5",fill:"currentColor"},null,-1)])])):(v(),$("svg",Rdt,[...e[2]||(e[2]=[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)])]))],2)]),g("span",null,M(c.label),1)]),g("div",{class:"fcom_app_counts",onClick:d=>o.showVoters(c)},[G(M(c.vote_counts?Math.floor(c.vote_counts/i.totalCount*100)+"%":"")+" ",1),c.vote_counts?(v(),$("span",Fdt,"("+M(c.vote_counts)+")",1)):O("",!0),c.vote_counts?(v(),R(a,{key:1,class:"fcom_arrow_icon"},{default:w(()=>[_(r)]),_:1})):O("",!0)],8,Vdt),i.totalCount?(v(),$("span",{key:0,style:Ke(o.getVoteStyle(c.vote_counts)),class:"fc_app_shadow"},null,4)):O("",!0)],10,Idt))),128))]),g("div",Ndt,[i.totalCount?(v(),$("span",Bdt,M(t.$_n("%d vote","%d votes",i.totalCount)),1)):O("",!0),i.endingDate?(v(),$(te,{key:1},[o.isEnded?(v(),$("span",{key:0,title:t.$t("Ended at: %s",i.endingDate),class:"meta_line"},M(o.endedDateLabel),9,zdt)):(v(),$("span",{key:1,title:t.$t("Will end at: %s",i.endingDate),class:"meta_line"},M(o.endingDateLabel),9,Hdt))],64)):O("",!0)])],2),i.showVotersDialog?(v(),R(l,{key:0,feed:n.feed,option:i.selectedOption,options:i.formattedOptions,totalCount:i.totalCount,onUpdateOption:o.updateOption,onClose:e[0]||(e[0]=c=>i.showVotersDialog=!1)},null,8,["feed","option","options","totalCount","onUpdateOption"])):O("",!0)],64)}const bH=de(Tdt,[["render",Udt]]),jdt={name:"BookmarkIcon",props:["is_active"]},Wdt={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"},Ydt={key:1,width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Gdt(t,e,n,s,i,o){return n.is_active?(v(),$("svg",Wdt,[...e[0]||(e[0]=[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)])])):(v(),$("svg",Ydt,[...e[1]||(e[1]=[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)])]))}const qdt=de(jdt,[["render",Gdt]]),Xdt={name:"RenderChildPost",components:{ImageCarousel:b5,SurveyRenderer:bH,DocumentLists:M1,UserRouteLink:Wr,MediaPreview:Zf,FeedMdContent:T1},props:["feed_id"],data(){return{feed:null,loading:!1,notFound:null,in_space:this.$route.params.space,hasOverflowContent:!1}},computed:{hasTopMedia(){var e,n,s,i,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=(i=(s=this.feed.meta)==null?void 0:s.media_preview)==null?void 0:i.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()}},Kdt=["id"],Zdt={key:0,class:"fcom_top_media"},Jdt={class:"fcom_feed_header_wrap"},Qdt={class:"feed_header"},eht={key:0,class:"feed_user"},tht={class:"feed_user_name"},nht={class:"feed_meta_info"},sht={key:0,class:"meta_line"},iht=["title","href"],oht={key:1,class:"feed_timestamp"},rht={key:0,class:"feed_title"},aht={class:"feed_title_heading"},lht={key:1,class:"expand-button"};function cht(t,e,n,s,i,o){var p,m,b,y,C,k,x,S,E,T;const r=H("media-preview"),a=H("UserAvatar"),l=H("UserRouteLink"),c=H("FeedMdContent"),u=Ge,d=H("DocumentLists"),h=H("SurveyRenderer"),f=H("ImageCarousel");return i.feed?(v(),$("div",{key:0,onClick:e[0]||(e[0]=(...P)=>o.handleFeedClick&&o.handleFeedClick(...P)),class:"fcom_child_feed"},[g("div",{id:"feed_id_"+i.feed.id,class:W([o.feedClasses,"feed"])},[o.hasTopMedia?(v(),$("div",Zdt,[i.feed.meta&&i.feed.meta.media_preview?(v(),R(r,{key:0,feed:i.feed},null,8,["feed"])):O("",!0)])):O("",!0),g("div",Jdt,[g("div",Qdt,[i.feed.xprofile?(v(),$("div",eht,[_(a,{with_level:!1,xprofile:i.feed.xprofile},null,8,["xprofile"]),g("div",null,[g("div",tht,[_(l,{show_badge:!0,xprofile:i.feed.xprofile,show_follow:!0},null,8,["xprofile"])]),g("div",nht,[i.feed.content_type=="survey"&&((y=(b=(m=(p=i.feed)==null?void 0:p.meta)==null?void 0:m.survey_config)==null?void 0:b.options)!=null&&y.length)?(v(),$("span",sht,M(t.$t("created a poll")),1)):O("",!0),g("a",{title:i.feed.created_at,href:i.feed.permalink,class:"feed_timestamp"},M(t.humanDateDiff(i.feed.created_at)),9,iht),!i.in_space&&i.feed.space?(v(),$("span",oht,M(t.$t("Posted in %s",t.getExcerpt(i.feed.space.title,30))),1)):O("",!0)])])])):O("",!0)])]),g("div",{ref:"feed_body",class:W([{feed_is_overflow_content:i.hasOverflowContent},"feed_body"])},[i.feed.title?(v(),$("div",rht,[g("h2",aht,M(i.feed.title),1)])):O("",!0),_(c,{class_name:"feed_texts",content:i.feed.message_rendered},null,8,["content"]),i.hasOverflowContent?(v(),$("div",lht,[_(u,{class:"btn_expand"},{default:w(()=>[G(M(t.$t("Show More")),1)]),_:1})])):O("",!0)],2),i.feed.content_type=="document"?(v(),R(d,{key:1,document_lists:((k=(C=i.feed)==null?void 0:C.meta)==null?void 0:k.document_lists)||[]},null,8,["document_lists"])):(v(),$(te,{key:2},[i.feed.content_type=="survey"&&((T=(E=(S=(x=i.feed)==null?void 0:x.meta)==null?void 0:S.survey_config)==null?void 0:E.options)!=null&&T.length)?(v(),R(h,{key:0,feed:i.feed,isChildFeed:!0},null,8,["feed"])):O("",!0),i.feed.meta?(v(),$(te,{key:1},[i.feed.meta.media_items?(v(),R(f,{key:0,feed:i.feed},null,8,["feed"])):!o.hasTopMedia&&i.feed.meta.media_preview?(v(),R(r,{key:1,feed:i.feed},null,8,["feed"])):O("",!0)],64)):O("",!0)],64))],10,Kdt)])):O("",!0)}const uht=de(Xdt,[["render",cht]]),dht={name:"CustomAppMeta",components:{RenderChildPost:uht},props:{feed:{type:Object,required:!0}}},hht={ref:"fcom_custom_app"},fht={key:0},pht=["innerHTML"];function mht(t,e,n,s,i,o){const r=H("RenderChildPost");return v(),$("div",hht,[n.feed.meta.custom_app_preview.app_name=="child_post"&&n.feed.meta.custom_app_preview.feed_id?(v(),$("div",fht,[_(r,{feed_id:n.feed.meta.custom_app_preview.feed_id},null,8,["feed_id"])])):n.feed.meta.custom_app_preview.custom_html?(v(),$("div",{key:1,innerHTML:n.feed.meta.custom_app_preview.custom_html},null,8,pht)):O("",!0)],512)}const ght=de(dht,[["render",mht]]),vht={name:"FeedAction",components:{EditFeed:yH},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("fcon_shake"),setTimeout(()=>{e.classList.remove("fcon_shake")},1e3))},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}))},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 i;let s=((i=n.feed.meta)==null?void 0:i.comments_disabled)=="yes";this.$notify.success(s?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(()=>{}))}}},_ht={class:"actions_items"},yht={key:0},bht={key:1},wht={key:0},Cht={key:1},kht={key:0},xht={key:1};function Sht(t,e,n,s,i,o){var d,h;const r=H("MoreFilled"),a=ye,l=Ge,c=Ii,u=H("EditFeed");return v(),$(te,null,[_(c,{persistent:!1,ref:"popover",placement:"bottom",width:200,trigger:"click"},{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",_ht,[ae(t.$slots,"before_feed_actions_pop"),g("li",{onClick:e[0]||(e[0]=m=>o.copyFeedLink())},M(t.$t("Copy Link")),1),o.showReportOption?(v(),$("li",{key:0,onClick:e[1]||(e[1]=m=>o.reportPost())},M(t.$t("Report Post")),1)):O("",!0),t.canEditFeed(n.feed)?(v(),$(te,{key:1},[g("li",{onClick:e[2]||(e[2]=m=>o.editItem())},M(t.$t("Edit")),1),n.feed.space&&t.hasSpaceAdminAccess(n.feed.space)?(v(),$(te,{key:0},[g("li",{onClick:e[3]||(e[3]=m=>o.toggleSticky())},[n.feed.is_sticky?(v(),$("span",yht,M(t.$t("Unpin from Top")),1)):(v(),$("span",bht,M(t.$t("Pin to top")),1))]),g("li",{onClick:e[4]||(e[4]=m=>o.toggleSidebarPin())},[n.feed.priority?(v(),$("span",Cht,M(t.$t("Unpin from sidebar")),1)):(v(),$("span",wht,M(t.$t("Pin to sidebar")),1))])],64)):O("",!0),(f=n.feed.meta)!=null&&f.media_preview?(v(),$("li",{key:1,onClick:e[5]||(e[5]=m=>o.removePreview())},M(t.$t("Remove Preview")),1)):O("",!0),t.hasSpaceAdminAccess(n.feed.space)?(v(),$("li",{key:2,onClick:e[6]||(e[6]=m=>o.toggleCommentStatus())},[((p=n.feed.meta)==null?void 0:p.comments_disabled)=="yes"?(v(),$("span",kht,M(t.$t("Enable comments")),1)):(v(),$("span",xht,M(t.$t("Disable comments")),1))])):O("",!0)],64)):O("",!0),t.canDeleteFeed(n.feed)?(v(),$("li",{key:2,onClick:e[7]||(e[7]=m=>o.deleteItem())},M(t.$t("Delete")),1)):O("",!0),ae(t.$slots,"after_feed_actions_pop")])]}),_:3},512),i.isEdit?(v(),R(u,{key:0,feedSlug:n.feed.slug,dialogVisible:i.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[8]||(e[8]=f=>i.isEdit=!1)},null,8,["feedSlug","dialogVisible","hide_create_form","author","onUpdated"])):O("",!0)],64)}const $ht=de(vht,[["render",Sht]]),Aht={name:"Feed",components:{DocumentLists:M1,CustomAppMeta:ght,BookmarkIcon:qdt,StickyIcon:Xz,UserRouteLink:Wr,EditFeed:yH,FeedFooter:_ut,MediaPreview:Zf,ImageCarousel:b5,SurveyRenderer:bH,ReportReview:qz,FeedAction:$ht,FeedMdContent:T1},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&&((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,s,i,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=(i=(s=this.feed.meta)==null?void 0:s.media_preview)==null?void 0:i.is_uploaded),t||(t=((r=(o=this.feed.meta)==null?void 0:o.media_items)==null?void 0:r.length)==1),t}},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.formattedDate(t)+" at "+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},showFullContent(t){if(!this.hasFeature("show_post_modal")){this.hasOverflowContent=!1,this.isExpanded=!0;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,(i,o,r,a)=>i.startsWith("<a")&&!i.includes('target="_blank"')?i.includes(window.location.origin)?i:i.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>`:i);return n.indexOf('<span class="fcom_dynamic_prop" data-type="timestamp"')===-1?n:(i=>i.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("D MMM YYYY, LT (")+this.currentTimeZoneName+")";return`<span class="fcom_timestamp" title="${a}">${u}</span>`}catch{return o}}))(n)},isInsideHtmlTag(t,e){let n=!1;for(let s=0;s<e;s++)t[s]==="<"&&(n=!0),t[s]===">"&&(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})}},created(){this.$eventBus.on("updateModerationReport",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)))})},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)}},Mht=["id"],Eht={key:1,class:"fcom_top_media"},Tht={key:2,class:"fcom_feed_header_wrap"},Pht={class:"feed_actions fcom_concat_buttons"},Iht={key:0,class:"fcom_feed_topics"},Lht={class:"feed_header"},Oht={key:0,class:"feed_user"},Dht={class:"feed_user_info"},Rht={class:"feed_user_name"},Vht={key:0,class:"feed_status"},Fht={key:1,class:"feed_status"},Nht={class:"feed_meta_info"},Bht={key:0,class:"meta_line"},zht=["title","href"],Hht=["title","href"],Uht={key:3},jht={key:0,class:"feed_title"},Wht={key:0,class:"feed_title_heading"},Yht=["href"],Ght={key:1,class:"feed_title_heading"};function qht(t,e,n,s,i,o){var P,I,L,V,D,z,Y,B,U,X,K,N,F;const r=H("report-review"),a=H("media-preview"),l=Ge,c=H("StickyIcon"),u=ye,d=H("BookmarkIcon"),h=H("FeedAction"),f=H("router-link"),p=H("UserAvatar"),m=H("UserRouteLink"),b=xo,y=H("FeedMdContent"),C=H("SurveyRenderer"),k=H("ImageCarousel"),x=H("DocumentLists"),S=H("CustomAppMeta"),E=H("feed-footer"),T=_t("loading");return Pe((v(),$("div",{id:"feed_id_"+((P=n.feed)==null?void 0:P.id),class:W([o.feedClasses,"feed"])},[o.showReport?(v(),R(r,{key:0,feed:n.feed},null,8,["feed"])):O("",!0),o.hasTopMedia?(v(),$("div",Eht,[n.feed.meta&&n.feed.meta.media_preview?(v(),R(a,{key:0,feed:n.feed,is_preview:n.is_preview},null,8,["feed","is_preview"])):O("",!0)])):O("",!0),n.show_header?(v(),$("div",Tht,[g("div",Pht,[t.auth.user_id&&!t.hasSpaceAccess((I=n.feed.space)==null?void 0:I.slug)&&!n.is_single&&!n.isSingleSpacePage?(v(),R(l,{key:0,loading:i.joiningSpace,class:"fcom_secondary_button join_button",onClick:e[0]||(e[0]=Q=>o.joinSpace())},{default:w(()=>[G(M(t.$t("Join")),1)]),_:1},8,["loading"])):O("",!0),n.show_actions?(v(),$(te,{key:1},[n.feed.is_sticky&&i.in_space?(v(),R(l,{key:0,onClick:e[1]||(e[1]=Q=>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(),R(l,{key:1,"aria-label":t.$t("Toggle Bookmark"),size:"small",text:"",onClick:e[2]||(e[2]=Q=>o.toggleBookmark()),class:W([{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(),$("li",{key:0,onClick:e[3]||(e[3]=Q=>t.$emit("reload"))},M(t.$t("Refresh")),1)):O("",!0)]),_:1},8,["feed","hide_create_form","onUpdated","onDeleted"])],64)):O("",!0),ae(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(),$("div",Iht,[(v(!0),$(te,null,be(n.feed.terms,Q=>(v(),R(f,{onClick:Be(ie=>o.gotoTopicUrl(Q.slug),["prevent"]),key:Q.slug,to:o.getTopicRoute(Q.slug),class:"feed_timestamp"},{default:w(()=>[G("#"+M(Q.title),1)]),_:2},1032,["onClick","to"]))),128))])):O("",!0),g("div",Lht,[n.feed.xprofile?(v(),$("div",Oht,[_(p,{with_level:!1,xprofile:n.feed.xprofile},null,8,["xprofile"]),g("div",Dht,[g("div",Rht,[_(m,{show_badge:!0,xprofile:n.feed.xprofile,show_follow:!0},null,8,["xprofile"]),n.feed.status=="pending"?(v(),$("span",Vht,[_(b,{type:"warning"},{default:w(()=>[G(M(t.$t("In Review")),1)]),_:1})])):O("",!0),n.feed.status=="scheduled"?(v(),$("span",Fht,[_(b,{type:"warning"},{default:w(()=>[G(M(t.$t("Scheduled")),1)]),_:1})])):O("",!0)]),g("div",Nht,[n.feed.content_type=="survey"&&((Y=(z=(D=(V=n.feed)==null?void 0:V.meta)==null?void 0:D.survey_config)==null?void 0:z.options)!=null&&Y.length)?(v(),$("span",Bht,M(t.$t("created a poll")),1)):O("",!0),n.feed.status=="scheduled"?(v(),$("a",{key:1,title:n.feed.scheduled_at,onClick:e[4]||(e[4]=(...Q)=>o.gotoFeed&&o.gotoFeed(...Q)),href:n.feed.permalink,class:"feed_timestamp"},M(o.getScheduledTime(n.feed.scheduled_at)),9,zht)):(v(),$("a",{key:2,title:n.feed.created_at,onClick:e[5]||(e[5]=(...Q)=>o.gotoFeed&&o.gotoFeed(...Q)),href:n.feed.permalink,class:"feed_timestamp"},M(t.humanDateDiff(n.feed.created_at)),9,Hht)),!i.in_space&&n.feed.space?(v(),$("span",Uht,[_(f,{to:o.getSpaceRoute(n.feed.space.slug),class:"feed_timestamp"},{default:w(()=>[G(M(t.$t("Posted in %s",t.getExcerpt(n.feed.space.title,30))),1)]),_:1},8,["to"])])):O("",!0)])])])):O("",!0),ae(t.$slots,"after_feed_header")])])):O("",!0),g("div",{ref:"feed_body",class:W([{feed_is_overflow_content:i.hasOverflowContent},"feed_body"])},[n.feed.title?(v(),$("div",jht,[n.is_single?(v(),$("h2",Ght,M(n.feed.title),1)):(v(),$("h2",Wht,[g("a",{onClick:e[6]||(e[6]=Be((...Q)=>o.showFullContent&&o.showFullContent(...Q),["prevent"])),href:n.feed.permalink},M(n.feed.title),9,Yht)]))])):O("",!0),_(y,{class_name:"feed_texts",content:o.parseMessage(n.feed.message_rendered)},null,8,["content"]),i.hasOverflowContent&&!i.isExpanded?(v(),$("div",{key:1,onClick:e[7]||(e[7]=Q=>o.showFullContent()),class:"expand-button"},[_(l,{class:"btn_expand"},{default:w(()=>[G(M(t.$t("Show More")),1)]),_:1})])):O("",!0)],2),n.feed.content_type=="survey"&&((K=(X=(U=(B=n.feed)==null?void 0:B.meta)==null?void 0:U.survey_config)==null?void 0:X.options)!=null&&K.length)?(v(),$(te,{key:3},[_(C,{feed:n.feed,is_preview:n.is_preview,hasTopMedia:o.hasTopMedia},null,8,["feed","is_preview","hasTopMedia"]),n.feed.meta.media_items?(v(),R(k,{key:0,is_single:n.is_single,feed:n.feed},null,8,["is_single","feed"])):!o.hasTopMedia&&n.feed.meta.media_preview?(v(),R(a,{key:1,feed:n.feed},null,8,["feed"])):O("",!0)],64)):n.feed.content_type=="document"?(v(),R(x,{key:4,document_lists:((F=(N=n.feed)==null?void 0:N.meta)==null?void 0:F.document_lists)||[]},null,8,["document_lists"])):n.feed.meta?(v(),$(te,{key:5},[n.feed.meta.media_items?(v(),R(k,{key:0,is_single:n.is_single,feed:n.feed},null,8,["is_single","feed"])):!o.hasTopMedia&&n.feed.meta.media_preview?(v(),R(a,{key:1,feed:n.feed},null,8,["feed"])):O("",!0),n.feed.meta.custom_app_preview?(v(),R(S,{key:2,feed:n.feed},null,8,["feed"])):O("",!0)],64)):O("",!0),n.show_footer?(v(),R(E,{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]=Q=>{t.$emit("commented",Q)})},null,8,["feed","is_modal","is_single","space_slug"])):O("",!0),ae(t.$slots,"after_feed_footer")],10,Mht)),[[T,i.working]])}const Xht=de(Aht,[["render",qht]]),Kht={name:"ReportDetails",components:{Feed:Xht,SingleComent:Kb,Pagination:$d},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,s;const e=(n=t.post)==null?void 0:n.permalink;return t.content_type=="comment"?`${e}?comment_id=${(s=t.comment)==null?void 0:s.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()}},Zht={class:"dialog_header report_details_header"},Jht={class:"report_details_header_left"},Qht={class:"report_details_header_right"},eft=["href"],tft=["href"],nft=["href"],sft=["href"],ift={class:"meta_line"},oft=["href","title"],rft={key:0,class:"dialog_body"},aft={class:"fcom_filter_menu"},lft={class:"fcom_filter_menu_ul"},cft={key:0,class:"report_details"},uft={key:1,class:"report_details"},dft={class:"report_details_header"},hft={class:"report_details_header_left"},fft={class:"report_details_header_right"},pft={key:0},mft={key:1},gft={key:1},vft={class:"report_reason"},_ft=["title"],yft={key:0,class:"report_details_body"},bft=["innerHTML"],wft={key:2,role:"region","aria-label":"Pagination",class:"pagination_wrap"},Cft={class:"dialog_footer report_footer"};function kft(t,e,n,s,i,o){const r=H("UserAvatar"),a=H("UserRouteLink"),l=H("SingleComent"),c=H("Feed"),u=Wt,d=H("Pagination"),h=Ge,f=Ss;return v(),R(f,{modelValue:i.isOpen,"onUpdate:modelValue":e[6]||(e[6]=p=>i.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,b,y,C,k,x,S,E,T,P,I,L;return[g("div",Zht,[g("div",Jht,[_(r,{with_level:!1,xprofile:o.getAuthorProfile(n.report)},null,8,["xprofile"])]),g("div",Qht,[g("div",null,[_(a,{show_verified:!1,xprofile:o.getAuthorProfile(n.report)},null,8,["xprofile"]),o.isCommentReport(n.report)?(v(),$("a",{key:0,href:o.getPermalink(n.report)},M(t.$t("commented ")),9,eft)):(v(),$("a",{key:1,href:o.getPermalink(n.report)},M(t.$t("posted ")),9,tft)),g("span",null,M(t.$t("in ")),1),o.isCommentReport(n.report)?(v(),$("a",{key:2,href:(m=(p=n.report)==null?void 0:p.post)==null?void 0:m.permalink},M(((y=(b=n.report)==null?void 0:b.post)==null?void 0:y.title)||((x=(k=(C=n.report)==null?void 0:C.post)==null?void 0:k.space)==null?void 0:x.title)),9,nft)):(v(),$("a",{key:3,href:t.$getRouteLink("s/:slug",{slug:(T=(E=(S=n.report)==null?void 0:S.post)==null?void 0:E.space)==null?void 0:T.slug})},M((L=(I=(P=n.report)==null?void 0:P.post)==null?void 0:I.space)==null?void 0:L.title),9,sft))]),g("div",ift,[g("a",{href:o.getPermalink(n.report),title:n.report.created_at},M(t.$t("Reported at ")+t.humanDateDiff(n.report.created_at)),9,oft)])])])]}),footer:w(()=>[g("div",Cft,[n.status!="ignored"?(v(),R(h,{key:0,class:"fcom_secondary_button",onClick:e[3]||(e[3]=p=>o.ignoreReport(n.report))},{default:w(()=>[G(M(o.getIgnoreBtnText(n.report)),1)]),_:1})):O("",!0),n.status!="unpublished"?(v(),R(h,{key:1,class:"fcom_primary_button",onClick:e[4]||(e[4]=p=>o.unpublishReport(n.report))},{default:w(()=>[G(M(o.getUnpublishBtnText(n.report)),1)]),_:1})):O("",!0),["pending","flagged"].includes(n.status)?O("",!0):(v(),R(h,{key:2,class:"el-button el-button--danger",onClick:e[5]||(e[5]=p=>o.deleteReport(n.report))},{default:w(()=>[G(M(t.$t("Delete Report")),1)]),_:1}))])]),default:w(()=>[n.report?(v(),$("div",rft,[g("div",aft,[g("ul",lft,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Be(p=>o.switchOption("details"),["prevent"])),class:W({"router-link-exact-active":i.currentTab=="details"}),href:"#"},M(t.$t("Details")),3)]),g("li",null,[g("a",{onClick:e[1]||(e[1]=Be(p=>o.switchOption("reports"),["prevent"])),class:W({"router-link-exact-active":i.currentTab=="reports"}),href:"#"},M(t.$t("Reports")+" "+n.report.reports_count),3)])])]),i.currentTab=="details"?(v(),$("div",cft,[o.isCommentReport(n.report)&&n.report.comment?(v(),R(l,{key:0,comment:n.report.comment,show_header:!1},null,8,["comment"])):n.report.post?(v(),R(c,{key:1,feed:n.report.post,show_header:!1,show_footer:!1},null,8,["feed"])):O("",!0)])):O("",!0),i.currentTab=="reports"?(v(),$("div",uft,[i.loading?(v(),R(u,{key:1,rows:5,animated:!0})):(v(!0),$(te,{key:0},be(i.postReports,p=>(v(),$("div",{key:p.id,class:"report_details_item"},[g("div",dft,[g("div",hft,[p.reporter?(v(),R(r,{key:0,with_level:!1,xprofile:p.reporter},null,8,["xprofile"])):O("",!0)]),g("div",fft,[!p.reporter&&!o.getReason(p.reason)?(v(),$("div",pft,M(t.$t("Flagged automatically by the site rule")),1)):(v(),$("div",mft,[p.reporter?(v(),R(a,{key:0,show_verified:!1,xprofile:p.reporter},null,8,["xprofile"])):(v(),$("span",gft,M(t.$t("By System ")),1)),o.getReason(p.reason)?(v(),$(te,{key:2},[g("span",null,M(t.$t("reported for ")),1),g("span",vft,M(o.getReason(p.reason)),1)],64)):O("",!0)])),g("div",{title:p.created_at,class:"meta_line"},M(t.humanDateDiff(p.created_at)),9,_ft)])]),p.explanation?(v(),$("div",yft,[g("div",{innerHTML:p.explanation},null,8,bft)])):O("",!0)]))),128)),i.pagination.total?(v(),$("div",wft,[_(d,{hide_on_single:!0,onFetch:e[2]||(e[2]=p=>o.getPostReports()),pagination:i.pagination},null,8,["pagination"])])):O("",!0)])):O("",!0)])):O("",!0)]),_:1},8,["modelValue","title","width"])}const xft=de(Kht,[["render",kft]]),Sft={name:"ModerationConfig",props:{is_open:{type:Boolean,required:!0},moderation_config:{type:Object,required:!0}},watch:{is_open(t){this.showConfig=t}},data(){return{showConfig:this.is_open,config:this.moderation_config}},methods:{saveConfig(){this.showConfig=!1,this.$emit("saveConfig",this.config)},closeConfig(){this.showConfig=!1,this.$emit("closeConfig")}}},$ft={class:"help_text"},Aft={class:"help_text"},Mft={class:"help_text"};function Eft(t,e,n,s,i,o){const r=Ht,a=en,l=vt,c=db,u=an,d=Jt,h=Ge,f=rn,p=Ss;return v(),R(p,{"close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,"align-center":!0,title:t.$t("Moderation Settings"),"modal-class":"fcom_moderation_dialog",modelValue:i.showConfig,"onUpdate:modelValue":e[8]||(e[8]=m=>i.showConfig=m),onClose:o.closeConfig,direction:"rtl"},{default:w(()=>[_(f,{onSubmit:e[6]||(e[6]=Be(m=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:i.config,"onUpdate:modelValue":e[7]||(e[7]=m=>i.config=m)},{default:w(()=>[_(a,{label:t.$t("Moderation")},{default:w(()=>[_(r,{modelValue:i.config.is_enabled,"onUpdate:modelValue":e[0]||(e[0]=m=>i.config.is_enabled=m),"true-value":"yes","false-value":"no"},{default:w(()=>[G(M(t.$t("Enable Content Moderation")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),i.config.is_enabled=="yes"?(v(),$(te,{key:0},[_(a,{label:t.$t("Profanity Filter")},{default:w(()=>[_(l,{modelValue:i.config.profanity_filter,"onUpdate:modelValue":e[1]||(e[1]=m=>i.config.profanity_filter=m),placeholder:t.$t("bad, words, here")},null,8,["modelValue","placeholder"]),g("span",$ft,M(t.$t("__PROFANITY_FILTER_DESC")),1)]),_:1},8,["label"]),_(a,{label:t.$t("Flag a post or comment after it's reported X times")},{default:w(()=>[_(c,{modelValue:i.config.flag_after_threshold,"onUpdate:modelValue":e[2]||(e[2]=m=>i.config.flag_after_threshold=m),min:0,max:100,step:1},null,8,["modelValue"]),g("span",Aft,M(t.$t("__FLAG_AFTER_THRESHOLD_DESC")),1)]),_:1},8,["label"]),_(a,{label:t.$t("Mark all new posts as Pending")},{default:w(()=>[_(r,{modelValue:i.config.flag_all_new_posts,"onUpdate:modelValue":e[3]||(e[3]=m=>i.config.flag_all_new_posts=m),"true-value":"yes","false-value":"no"},{default:w(()=>[G(M(t.$t("__FLAG_ALL_NEW_POSTS_DESC")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(a,{label:t.$t("Require approval for first post")},{default:w(()=>[_(r,{modelValue:i.config.first_post_approval,"onUpdate:modelValue":e[4]||(e[4]=m=>i.config.first_post_approval=m),"true-value":"yes","false-value":"no"},{default:w(()=>[G(M(t.$t("__FIRST_POST_APPROVAL_DESC")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(a,{label:t.$t("Mark all new posts as Pending in the given spaces")},{default:w(()=>[_(d,{modelValue:i.config.flag_all_new_posts_spaces,"onUpdate:modelValue":e[5]||(e[5]=m=>i.config.flag_all_new_posts_spaces=m),placeholder:t.$t("Select Spaces"),filterable:"",clearable:"",multiple:""},{default:w(()=>[(v(!0),$(te,null,be(t.appVars.auth.spaces,m=>(v(),R(u,{key:m.id,label:m.title,value:m.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),g("span",Mft,M(t.$t("__FLAG_ALL_NEW_POSTS_SPACES_DESC")),1)]),_:1},8,["label"])],64)):O("",!0),_(a,null,{default:w(()=>[_(h,{class:"fcom_primary_button",onClick:o.saveConfig},{default:w(()=>[G(M(t.$t("Update")),1)]),_:1},8,["onClick"])]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["width","title","modelValue","onClose"])}const Tft=de(Sft,[["render",Eft]]),Pft={name:"Moderation",components:{Layout:Xs,AppLayout:Ks,Pagination:$d,ReportDetails:xft,ModerationConfigModal:Tft},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"),s=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?"),i=e?this.$t("Yes, Dismiss"):this.$t("Yes, Approve");this.$confirm(s,n,{confirmButtonText:i,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"),s=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?"),i=e?this.$t("Yes, Unpublish"):this.$t("Yes, Publish");this.$confirm(s,n,{confirmButtonText:i,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"))}},Ift=["href"],Lft={style:{padding:"20px"},class:"fhr_content_layout_body moderation_layout"},Oft={key:0,class:"card_header"},Dft={role:"region","aria-label":"Member Navigation",class:"member_status"},Rft={key:1,class:W("fcom_dir_layout fcom_dir_layout_classic")},Vft={key:0,class:"loading"},Fft={key:1,class:"fcom_moderation_table"},Nft={class:"moderation_table"},Bft={class:"moderation_table_header"},zft={style:{"min-width":"100px"}},Hft={class:"moderation_table_body"},Uft=["onClick"],jft={key:0,class:"user_avatar moderation_avatar"},Wft={class:"feed_user_name"},Yft={key:1},Gft={key:2,class:"no_reports"},qft={key:3,role:"region","aria-label":"Pagination",class:"pagination_wrap"},Xft={key:2,style:{"max-width":"800px",margin:"0 auto"},class:"setting_body white_loaded"},Kft={style:{"text-align":"center"}},Zft={style:{"font-size":"18px","margin-bottom":"10px"}},Jft={class:"promo_description"},Qft={key:1,class:"setting_body",style:{"text-align":"center"}},ept={class:"promo_description"},tpt=["href"];function npt(t,e,n,s,i,o){const r=H("Operation"),a=ye,l=Ge,c=Ff,u=Ps,d=Wt,h=H("UserAvatar"),f=H("UserRouteLink"),p=H("MoreFilled"),m=Ca,b=ka,y=wa,C=H("Pagination"),k=H("layout"),x=H("app-layout"),S=H("report-details"),E=H("moderation-config-modal");return v(),$(te,null,[_(x,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_full_layout"},{default:w(()=>[_(k,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Moderation")},{actions:w(()=>[t.has_pro?(v(),R(l,{key:0,onClick:e[0]||(e[0]=T=>i.showConfig=!0),class:"fcom_secondary_button"},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,M(t.$t("Settings")),1)]),_:1})):(v(),$("a",{key:1,target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},M(t.$t("Upgrade to Pro")),9,Ift))]),default:w(()=>[g("div",Lft,[t.has_pro?(v(),$(te,{key:0},[i.moderationConfig.is_enabled=="yes"?(v(),$("div",Oft,[g("div",Dft,[_(u,{onChange:e[1]||(e[1]=T=>o.getReports()),modelValue:i.status,"onUpdate:modelValue":e[2]||(e[2]=T=>i.status=T),class:"status_group"},{default:w(()=>[_(c,{value:"pending"},{default:w(()=>[G(M(t.$t("Pending")),1)]),_:1}),_(c,{value:"flagged"},{default:w(()=>[G(M(t.$t("Flagged")),1)]),_:1}),_(c,{value:"ignored"},{default:w(()=>[G(M(t.$t("Dismissed")),1)]),_:1}),_(c,{value:"unpublished"},{default:w(()=>[G(M(t.$t("Unpublished")),1)]),_:1})]),_:1},8,["modelValue"])])])):O("",!0),i.moderationConfig.is_enabled=="yes"?(v(),$("div",Rft,[i.loading?(v(),$("div",Vft,[_(d,{class:"white_loaded",rows:3,animated:!0})])):i.reports.length?(v(),$("div",Fft,[g("table",Nft,[g("thead",Bft,[g("tr",null,[g("th",null,M(t.$t("Title")),1),g("th",null,M(t.$t("Type")),1),g("th",null,M(t.$t("Reporter")),1),g("th",zft,M(t.$t("Date")),1),g("th",null,M(t.$t("Reports")),1)])]),g("tbody",Hft,[(v(!0),$(te,null,be(i.reports,T=>{var P,I;return v(),$("tr",{key:T.id},[g("td",{onClick:L=>o.openReportDetails(T),class:"report_reason"},M(o.getTitle(T)),9,Uft),g("td",null,M(T.content_type),1),g("td",null,[T.reporter?(v(),$("div",jft,[_(h,{xprofile:T.reporter},null,8,["xprofile"]),g("div",Wft,[_(f,{xprofile:T.reporter},null,8,["xprofile"])])])):(P=T.meta)!=null&&P.flagged_by?(v(),$("div",Yft,M((I=T.meta)==null?void 0:I.flagged_by),1)):O("",!0)]),g("td",null,M(t.humanDateDiff(T.created_at)),1),g("td",null,M(T.reports_count),1),g("td",null,[_(y,{trigger:"click"},{dropdown:w(()=>[_(b,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(T)},{default:w(()=>[G(M(t.$t("Review Report")),1)]),_:1},8,["aria-label","onClick"])]),_:2},1024),T.status!="ignored"?(v(),R(m,{key:0},{default:w(()=>[_(l,{class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:L=>o.confirmAndIgnoreReport(T)},{default:w(()=>[G(M(o.getIgnoreBtnText(T)),1)]),_:2},1032,["onClick"])]),_:2},1024)):O("",!0),T.status!="unpublished"?(v(),R(m,{key:1},{default:w(()=>[_(l,{class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:L=>o.confirmAndUnpublishReport(T)},{default:w(()=>[G(M(o.getUnpublishBtnText(T)),1)]),_:2},1032,["onClick"])]),_:2},1024)):O("",!0),T.status!="pending"?(v(),R(m,{key:2},{default:w(()=>[_(l,{class:"fcom_dot_menu edit_action",size:"small",text:"",onClick:L=>o.deleteReport(T)},{default:w(()=>[G(M(t.$t("Delete Report")),1)]),_:1},8,["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(),$("div",Gft,M(t.$t("No reports to review")),1)),i.pagination.total?(v(),$("div",qft,[_(C,{hide_on_single:!0,onFetch:e[3]||(e[3]=T=>o.getReports()),pagination:i.pagination},null,8,["pagination"])])):O("",!0)])):(v(),$("div",Xft,[g("div",Kft,[g("h3",Zft,M(t.$t("Content Moderation is disabled")),1),g("p",Jft,M(t.$t("__MODERATION_DISABLED_DESC")),1),_(l,{loading:i.saving,class:"el-button fcom_primary_button",onClick:e[4]||(e[4]=T=>o.saveConfig({is_enabled:"yes"}))},{default:w(()=>[G(M(t.$t("Enable Content Moderation")),1)]),_:1},8,["loading"])])]))],64)):(v(),$("div",Qft,[g("p",ept,M(t.$t("__REPORT_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},M(t.$t("Upgrade to Pro")),9,tpt)]))])]),_:1},8,["title"])]),_:1}),i.reportDetails?(v(),R(S,{key:0,report:i.reportDetails,is_open:i.isOpenReportDetails,status:i.status,onIgnore:o.ignoreReport,onUnpublish:o.unpublishReport,onDelete:o.deleteReport,onClose:e[5]||(e[5]=T=>o.closeReportDetails())},null,8,["report","is_open","status","onIgnore","onUnpublish","onDelete"])):O("",!0),i.showConfig?(v(),R(E,{key:1,is_open:i.showConfig,moderation_config:i.moderationConfig,onCloseConfig:e[6]||(e[6]=T=>i.showConfig=!1),onSaveConfig:o.saveConfig},null,8,["is_open","moderation_config","onSaveConfig"])):O("",!0)],64)}const spt=de(Pft,[["render",npt]]),ipt={name:"Tools",components:{Layout:Xs,AppLayout:Ks},computed:{sitemapUrl(){return this.appVars.urls.portal_base+"site-maps/index.xml"},isPublicPortal(){return this.appVars.access_level==="public"}}},opt=["href"],rpt={class:"settings_router"},apt={class:"fhr_content_layout_body"},lpt={class:"setting_header"},cpt={key:0,class:"setting_body tools_body"},upt={key:0,class:"sitemap_configured"},dpt={class:"sitemap_header"},hpt={class:"sitemap_body"},fpt=["href"],ppt={key:1,class:"setting_body",style:{"text-align":"center"}},mpt={class:"promo_description"},gpt=["href"];function vpt(t,e,n,s,i,o){const r=ye,a=Tc,l=H("layout"),c=H("app-layout");return v(),R(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",{key:0,target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},M(t.$t("Upgrade to Pro")),9,opt))]),default:w(()=>[g("div",rpt,[g("div",apt,[g("div",lpt,[g("h2",null,M(t.$t("Sitemap Configuration")),1)]),t.has_pro?(v(),$("div",cpt,[o.isPublicPortal?(v(),$("div",upt,[g("div",dpt,[_(r,null,{default:w(()=>[...e[0]||(e[0]=[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)])]),_:1}),g("h4",null,M(t.$t("Sitemap is configured and will be generated automatically.")),1)]),g("div",hpt,[_(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,M(t.$t("Sitemap URL : ")),1),g("a",{href:o.sitemapUrl,target:"_blank",rel:"noopener"},M(o.sitemapUrl),9,fpt)])])])):(v(),R(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(),$("div",ppt,[g("p",mpt,M(t.$t("__SITEMAP_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},M(t.$t("Upgrade to Pro")),9,gpt)]))])])]),_:1},8,["title"])]),_:1})}const _pt=de(ipt,[["render",vpt]]),ypt={name:"PrivacySettings",components:{Layout:Xs,AppLayout:Ks},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"))}},bpt={class:"settings_router"},wpt={key:0,class:"white_loaded"},Cpt={key:1,class:"fhr_content_layout_body"},kpt={class:"setting_body"},xpt={class:"fcom_help_text fcom_mt_10"},Spt={class:"fcom_help_text fcom_mt_10"},$pt={class:"fcom_help_text fcom_mt_10"},Apt={class:"fcom_help_text fcom_mt_10"},Mpt={class:"fcom_input_wrap"},Ept={key:0},Tpt={class:"fcom_input_wrap"},Ppt={key:0},Ipt={class:"fcom_input_wrap"},Lpt={key:0},Opt={class:"fcom_input_wrap"},Dpt={class:"fcom_input_wrap"},Rpt={class:"fcom_input_wrap"},Vpt={class:"fcom_input_wrap"},Fpt={style:{"margin-top":"50px"},class:"fcom_input_wrap"},Npt={key:2};function Bpt(t,e,n,s,i,o){const r=Ge,a=Wt,l=TR,c=ko,u=Ps,d=en,h=Ht,f=rn,p=H("layout"),m=H("app-layout"),b=_t("loading");return v(),R(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(()=>[Pe((v(),R(r,{class:"fcom_primary_button",onClick:o.save},{default:w(()=>[g("span",null,M(t.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[b,i.saving]])]),default:w(()=>[g("div",bpt,[i.loading?(v(),$("div",wpt,[_(a,{rows:5,animated:!0})])):i.settings?(v(),$("div",Cpt,[g("div",kpt,[g("p",null,M(t.$t("Customize the privacy and compliance settings as per your needs.")),1),_(l),_(f,{onSubmit:e[11]||(e[11]=Be(y=>t.doNothing(),["prevent"])),modelValue:i.settings,"onUpdate:modelValue":e[12]||(e[12]=y=>i.settings=y),"label-position":"top"},{default:w(()=>[_(d,{label:t.$t("Who can view all members page?")},{default:w(()=>[_(u,{modelValue:i.settings.members_page_status,"onUpdate:modelValue":e[0]||(e[0]=y=>i.settings.members_page_status=y),class:"fcom_radio_group"},{default:w(()=>[_(c,{border:"",value:"everybody"},{default:w(()=>[G(M(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:w(()=>[G(M(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:w(()=>[G(M(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",xpt,[g("p",null,M(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:i.settings.profile_page_visibility,"onUpdate:modelValue":e[1]||(e[1]=y=>i.settings.profile_page_visibility=y),class:"fcom_radio_group"},{default:w(()=>[_(c,{border:"",value:"everybody"},{default:w(()=>[G(M(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:w(()=>[G(M(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:w(()=>[G(M(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",Spt,[g("p",null,M(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:i.settings.leaderboard_members_visibility,"onUpdate:modelValue":e[2]||(e[2]=y=>i.settings.leaderboard_members_visibility=y),class:"fcom_radio_group"},{default:w(()=>[_(c,{border:"",value:"everybody"},{default:w(()=>[G(M(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:w(()=>[G(M(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:w(()=>[G(M(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",$pt,[g("p",null,M(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 membership spaces on the user profile page.")},{default:w(()=>[_(u,{modelValue:i.settings.user_space_visibility,"onUpdate:modelValue":e[3]||(e[3]=y=>i.settings.user_space_visibility=y),class:"fcom_radio_group"},{default:w(()=>[_(c,{border:"",value:"everybody"},{default:w(()=>[G(M(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:w(()=>[G(M(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:w(()=>[G(M(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",Apt,[g("p",null,M(t.$t("Choose the privacy settings for spaces page of a member profile.")),1)])]),_:1},8,["label"]),g("div",Mpt,[_(h,{modelValue:i.settings.can_customize_username,"onUpdate:modelValue":e[4]||(e[4]=y=>i.settings.can_customize_username=y),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Allow users to change their community username"))+" ",1),t.has_pro?O("",!0):(v(),$("span",Ept,"("+M(t.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["modelValue","disabled"]),g("p",null,M(t.$t("When enabled, members can change their username on their own. Otherwise, an admin or moderator can change the username.")),1)]),g("div",Tpt,[_(h,{modelValue:i.settings.can_change_email,"onUpdate:modelValue":e[5]||(e[5]=y=>i.settings.can_change_email=y),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Allow users to change their account email address"))+" ",1),t.has_pro?O("",!0):(v(),$("span",Ppt,"("+M(t.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["modelValue","disabled"]),g("p",null,M(t.$t("When enabled, members can change their email address of the account (WordPress User account).")),1)]),g("div",Ipt,[_(h,{modelValue:i.settings.email_auto_login,"onUpdate:modelValue":e[6]||(e[6]=y=>i.settings.email_auto_login=y),disabled:!t.has_pro,"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Automatically login the user to the portal (secure with signed URL) from email notification links"))+" ",1),t.has_pro?O("",!0):(v(),$("span",Lpt,"("+M(t.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["modelValue","disabled"]),g("p",null,M(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",Opt,[_(h,{modelValue:i.settings.enable_gravatar,"onUpdate:modelValue":e[7]||(e[7]=y=>i.settings.enable_gravatar=y),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Use Gravatar Photo Service for default user photo")),1)]),_:1},8,["modelValue"]),g("p",null,M(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",Dpt,[_(h,{modelValue:i.settings.enable_user_sync,"onUpdate:modelValue":e[8]||(e[8]=y=>i.settings.enable_user_sync=y),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Sync Community Profile with WordPress User Data")),1)]),_:1},8,["modelValue"]),g("p",null,M(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)]),g("div",Rpt,[_(h,{"true-value":"yes","false-value":"no",modelValue:i.settings.show_last_activity,"onUpdate:modelValue":e[9]||(e[9]=y=>i.settings.show_last_activity=y),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Show last activity of a user on the profile card")),1)]),_:1},8,["modelValue"]),g("p",null,M(t.$t("If unchecked, then the last activity will be shown to only admins/moderators")),1)]),g("div",Vpt,[_(h,{"true-value":"yes","false-value":"no",modelValue:i.settings.can_deactive_account,"onUpdate:modelValue":e[10]||(e[10]=y=>i.settings.can_deactive_account=y),class:"fcom_checkbox"},{default:w(()=>[G(M(t.$t("Allow users to deactivate their account directly from their profile settings")),1)]),_:1},8,["modelValue"]),g("p",null,M(t.$t("When enabled, this option allows users to deactivate their account directly from their profile settings.")),1)]),g("div",Fpt,[Pe((v(),R(r,{onClick:o.save,disabled:i.saving,class:"fcom_primary_button"},{default:w(()=>[G(M(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[b,i.saving]])])]),_:1},8,["modelValue"])])])):(v(),$("div",Npt,[g("p",null,M(t.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const zpt=de(ypt,[["render",Bpt]]),Hpt={name:"SettingsRoute",components:{},data(){return{loading:!1}}};function Upt(t,e,n,s,i,o){const r=H("router-view");return v(),R(r)}const jpt=de(Hpt,[["render",Upt]]),Wpt={name:"CreateGroupForm",emits:["completed","dirty"],components:{ImageUploader:vd,SlugInput:_d,ErrorAlerts:h1},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(){if(this.errors=[],(!this.form.title||!this.form.title.trim())&&this.errors.push({title:this.$t("Title"),description:this.$t("Group title cannot be empty.")}),!this.form.id)if(!this.form.slug||!this.form.slug.trim())this.errors.push({title:this.$t("Slug"),description:this.$t("Slug cannot be empty.")});else{const t=f1("/"+this.form.slug);t.valid||t.errors.forEach(e=>{this.errors.push({title:this.$t("Slug"),description:this.$t(e)})})}return 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(s=>{this.$eventBus.emit("reloadMenu"),this.form={},this.$notify.success(s.message),this.$emit("completed",s.group)}).catch(s=>{this.$handleError(s)}).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})}},Ypt={key:0},Gpt={key:1};function qpt(t,e,n,s,i,o){const r=vt,a=en,l=H("slug-input"),c=Ht,u=H("error-alerts"),d=Ge,h=rn;return v(),R(h,{onSubmit:e[5]||(e[5]=Be(f=>t.doNothing(),["prevent"])),modelValue:i.form,"onUpdate:modelValue":e[6]||(e[6]=f=>i.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:i.form.title,"onUpdate:modelValue":e[0]||(e[0]=f=>i.form.title=f)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),_(a,{label:t.$t("Slug")},{default:w(()=>[_(l,{modelValue:i.form.slug,"onUpdate:modelValue":e[1]||(e[1]=f=>i.form.slug=f),disabled:!!i.form.id,placeholder:t.$t("Group Slug (no spaces or special characters)"),is_inital_inactive:!!i.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:i.form.description,"onUpdate:modelValue":e[2]||(e[2]=f=>i.form.description=f)},null,8,["placeholder","modelValue"])]),_:1},8,["label"]),i.form.settings?(v(),R(a,{key:0,label:t.$t("Appearance")},{default:w(()=>[_(c,{"true-value":"yes","false-value":"no",modelValue:i.form.settings.always_show_spaces,"onUpdate:modelValue":e[3]||(e[3]=f=>i.form.settings.always_show_spaces=f),class:"fcom_checkbox"},{default:w(()=>[G(M(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:i.errors,style:{"margin-bottom":"16px"},dismissable:""},null,8,["errors"]),_(a,null,{default:w(()=>[_(d,{class:"fcom_primary_button",disabled:i.saving,onClick:e[4]||(e[4]=f=>o.submit()),loading:i.saving},{default:w(()=>[i.form.id?(v(),$("span",Ypt,M(t.$t("Update Info")),1)):(v(),$("span",Gpt,M(t.$t("Create")),1))]),_:1},8,["disabled","loading"])]),_:1})]),_:1},8,["modelValue"])}const Xpt=de(Wpt,[["render",qpt]]),Kpt={name:"MoveGroupPopup",components:{ActionPopover:zf},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})}}},Zpt={style:{display:"inline-block",cursor:"pointer",width:"100%","text-align":"left"}};function Jpt(t,e,n,s,i,o){const r=an,a=Jt,l=en,c=Ge,u=rn,d=H("action-popover"),h=_t("loading");return v(),R(d,{placement:"bottom",width:350},{trigger:w(()=>[g("span",Zpt,M(t.$t("Move")),1)]),default:w(({hide:f})=>[_(u,{onSubmit:e[1]||(e[1]=Be(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:i.selectedGroupId,"onUpdate:modelValue":e[0]||(e[0]=p=>i.selectedGroupId=p)},{default:w(()=>[(v(!0),$(te,null,be(o.filteredGroups,p=>(v(),R(r,{key:p.id,label:p.title,value:p.id},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue"])]),_:1},8,["label"]),Pe((v(),R(c,{disabled:!i.selectedGroupId||i.working,onClick:p=>o.moveSpace(f),class:"fcom_primary_button"},{default:w(()=>[G(M(t.$t("Move Space")),1)]),_:1},8,["disabled","onClick"])),[[h,i.working]])]),_:2},1024)]),_:1})}const Qpt=de(Kpt,[["render",Jpt]]),emt={name:"SpaceLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:Jz},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()}},tmt={key:0,class:"fcom_lockscreen_meta"},nmt={class:"fcom_description"},smt={class:"white_loaded"};function imt(t,e,n,s,i,o){const r=H("lock-screen-editor"),a=Wt,l=ba;return i.lockscreen?(v(),R(r,{key:0,title:n.spaceProfile.title,space_id:n.spaceProfile.id,settings:n.spaceProfile.settings,lockscreen:i.lockscreen,saving:i.saving,loading:i.loading,onSave:o.saveChanges,onClose:e[0]||(e[0]=c=>t.$emit("close"))},{before_meta:w(()=>[n.spaceProfile.settings.custom_lock_screen!="yes"?(v(),$("div",tmt,[g("div",nmt,[g("p",null,M(t.$t("__LOCK_SCRREN_DESC")),1)])])):O("",!0)]),_:1},8,["title","space_id","settings","lockscreen","saving","loading","onSave"])):i.loading?(v(),R(l,{key:1,class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[g("div",smt,[_(a,{animated:!0,rows:10})])]),_:1})):O("",!0)}const omt=de(emt,[["render",imt]]),rmt={name:"SpaceCustomizer",props:["space_profile"],emits:["close","completed"],components:{SpaceLockscreen:omt,CreateSpaceForm:L4,ManageSpaceLinks:eH,ManagePaywalls:tH},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})}},amt={key:0,class:"fcom_full_editor"},lmt={class:"fcom_full_editor_header fcom_space_settings_nav"},cmt={class:"fcom_editor_menu object_menu"},umt={class:"fcom_space_menu_ul"},dmt={class:"full_editor_actions"},hmt={style:{"max-width":"800px",margin:"0 auto"},class:"fcom_full_editor_content"};function fmt(t,e,n,s,i,o){const r=H("ArrowLeft"),a=ye,l=Ge,c=a1,u=H("create-space-form"),d=ui,h=ba,f=H("space-lockscreen"),p=H("manage-space-links"),m=H("manage-paywalls"),b=o1;return n.space_profile?(v(),$("div",amt,[_(b,null,{default:w(()=>[_(c,{class:"fcom_full_editor_header_wrap"},{default:w(()=>{var y;return[g("div",lmt,[g("div",{onClick:e[0]||(e[0]=C=>t.$emit("completed")),class:"fcom_back_header"},[_(a,null,{default:w(()=>[_(r)]),_:1}),G(" "+M(n.space_profile.title),1)]),g("div",cmt,[g("ul",umt,[g("li",{onClick:e[1]||(e[1]=C=>i.currentTab="general")},[g("a",{class:W({"router-link-exact-active":i.currentTab==="general"}),href:"#"},M(t.$t("General Settings")),3)]),g("li",{onClick:e[2]||(e[2]=C=>i.currentTab="paywalls")},[g("a",{class:W({"router-link-exact-active":i.currentTab==="paywalls"}),href:"#"},M(t.$t("Paywalls")),3)]),n.space_profile.privacy=="private"&&((y=n.space_profile.settings)==null?void 0:y.custom_lock_screen)=="yes"?(v(),$("li",{key:0,onClick:e[3]||(e[3]=C=>i.currentTab="lock_screen")},[g("a",{class:W({"router-link-exact-active":i.currentTab==="lock_screen"}),href:"#"},M(t.$t("Lock Screen")),3)])):O("",!0),g("li",{onClick:e[4]||(e[4]=C=>i.currentTab="manage_links")},[g("a",{class:W({"router-link-exact-active":i.currentTab==="manage_links"}),href:"#"},M(t.$t("Space Links")),3)])])]),g("div",dmt,[_(l,{class:"fcom_primary_button",disabled:i.saving,loading:i.saving,onClick:o.saveChanges},{default:w(()=>[G(M(!i.hasPro&&i.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]=C=>t.$emit("completed")),text:""},{default:w(()=>[...e[9]||(e[9]=[G(" X ",-1)])]),_:1})])])]}),_:1}),_(b,{class:"fcom_full_editor_container editor_customizer_container"},{default:w(()=>[i.currentTab=="general"?(v(),R(h,{key:0,class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(d,null,{default:w(()=>[g("div",hmt,[_(u,{savingCount:i.savingCount,community:n.space_profile},null,8,["savingCount","community"])])]),_:1})]),_:1})):i.currentTab=="lock_screen"?(v(),R(f,{key:1,savingCount:i.savingCount,onClose:e[6]||(e[6]=y=>t.$emit("close")),spaceProfile:n.space_profile},null,8,["savingCount","spaceProfile"])):i.currentTab=="manage_links"?(v(),R(p,{key:2,savingCount:i.savingCount,onClose:e[7]||(e[7]=y=>t.$emit("close")),spaceProfile:n.space_profile},null,8,["savingCount","spaceProfile"])):i.currentTab=="paywalls"?(v(),R(m,{key:3,savingCount:i.savingCount,onClose:e[8]||(e[8]=y=>t.$emit("close")),spaceProfile:n.space_profile},null,8,["savingCount","spaceProfile"])):O("",!0)]),_:1})]),_:1})])):O("",!0)}const pmt=de(rmt,[["render",fmt]]),mmt={name:"SpaceLinkEditModal",components:{SidebarLinkForm:Oz},emits:["completed"],props:["link"],data(){return{showModal:!0}}};function gmt(t,e,n,s,i,o){const r=H("SidebarLinkForm"),a=Ss;return v(),R(a,{"modal-class":"fcom_common_dialog","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:i.showModal,"onUpdate:modelValue":e[1]||(e[1]=l=>i.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 vmt=de(mmt,[["render",gmt]]),_mt={name:"SpaceGroups",components:{FluentDnD:P1,ActionPopover:zf,ArrowDownBold:Rse,Drawer:k4,CreateSpaceForm:L4,CreateGroupForm:Xpt,Layout:Xs,AppLayout:Ks,MoveGroupPopup:Qpt,SpaceCustomizer:pmt,CourseCustomizer:nH,SpaceLinkEditModal:vmt},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 s;return e+(((s=n.spaces)==null?void 0:s.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(s=>{s.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={};ic(this.groups,(n,s)=>{e[n.id]=s+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(s=>{this.$notify.success(s.message)}).catch(s=>{this.$handleError(s);const i=this.groups.find(o=>Number(o.id)===Number(n));i&&(i.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 s=this.groups.find(a=>Number(a.id)===Number(n)).spaces||[];const i=[...s],o=s.splice(e,1)[0];s.splice(e,0,o);let r=[];ic(s,(a,l)=>{r.push(a.id)}),this.resetSpaceIndexes(r,i,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)}},ymt={class:"settings_router"},bmt={class:"fcom_communities"},wmt={class:"fcom_card_sections",style:{"margin-bottom":"16px"}},Cmt={class:"fcom_card_section_heading"},kmt={key:1},xmt={class:"fcom_card_sections",style:{"margin-bottom":"0"}},Smt={class:"fcom_section_primary_item_title"},$mt={class:"fcom_heading_item"},Amt={class:"fcom_space_counts"},Mmt={class:"fcom_section_item_actions"},Emt={key:0,class:"fcom_section_items"},Tmt={class:"fcom_section_item_title"},Pmt={class:"fcom_heading_item"},Imt={class:"fcom_section_item_actions"},Lmt=["href"],Omt={class:"actions_items"},Dmt=["onClick"],Rmt=["onClick"],Vmt={key:0,class:"fcom_card_sections",style:{"margin-top":"16px"}},Fmt={class:"fcom_section_primary_item fcom_no_top_border"},Nmt={class:"fcom_heading_item"},Bmt={class:"fcom_section_items"},zmt={class:"fcom_section_item"},Hmt={class:"fcom_section_item_title"},Umt={class:"fcom_heading_item"},jmt={class:"fcom_section_item_actions"},Wmt=["href"],Ymt={class:"actions_items"},Gmt=["onClick"],qmt=["onClick"],Xmt={key:0};function Kmt(t,e,n,s,i,o){const r=Ge,a=Wt,l=H("ArrowDownBold"),c=ye,u=H("Plus"),d=H("action-popover"),h=xo,f=H("MoveGroupPopup"),p=H("FluentDnD"),m=H("layout"),b=H("app-layout"),y=H("create-group-form"),C=H("drawer"),k=H("course-customizer"),x=H("space-customizer"),S=H("SpaceLinkEditModal"),E=_t("loading");return v(),$(te,null,[_(b,{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]=T=>o.initCreateGroup())},{default:w(()=>[G(M(t.$t("Create New Group")),1)]),_:1})]),default:w(()=>[g("div",ymt,[Pe((v(),$("div",bmt,[g("div",wmt,[g("div",Cmt,[g("h3",null,M(t.$_n("%d Group","%d Groups",i.groups.length))+" • "+M(t.$_n("%d Space","%d Spaces",o.communityCounts)),1)])]),i.loading?(v(),R(a,{key:0,animated:!0,row:5})):(v(),$("div",kmt,[_(p,{items:i.groups,onDrop:o.dropGroup,"item-class":"fcom_cursor_move",gap:"16px"},{item:w(({data:T})=>[g("div",xmt,[g("div",{class:W([{fcom_collapsed_group:i.collapsedGroups.indexOf(T.id)!==-1},"fcom_section_primary_item fcom_no_top_border"])},[g("div",Smt,[e[10]||(e[10]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),g("div",$mt,[g("h4",null,M(t.$t("Group:"))+" "+M(T.title),1),g("div",null,[T.spaces&&T.spaces.length?(v(),R(r,{key:0,style:{"background-color":"var(--el-fill-color-light)"},class:"fcom_collapse_btn",onClick:P=>o.toggleGroup(T),size:"small",text:""},{default:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1}),g("span",Amt,M(t.$t("%s items",T.spaces.length)),1)]),_:2},1032,["onClick"])):O("",!0),_(r,{onClick:P=>o.openCreateSpaceModal(T),style:{"margin-left":"5px","background-color":"var(--el-fill-color-light)"},size:"small",text:""},{default:w(()=>[_(c,null,{default:w(()=>[_(u)]),_:1})]),_:1},8,["onClick"])])])]),g("div",Mmt,[_(d,{items:[{label:t.$t("Add new space"),action:()=>{o.openCreateSpaceModal(T)}},{label:t.$t("Edit Group Info"),action:()=>{o.initEditGroup(T)}},{label:t.$t("Delete Group"),type:"danger",action:()=>{o.removeGroup(T)}}]},null,8,["items"])])],2),i.collapsedGroups.indexOf(T.id)===-1?(v(),$("div",Emt,[_(p,{items:T.spaces,"item-class":"fcom_section_item cursor-move","item-style":"padding: 15px 15px 15px 35px",onDrop:o.dropSpace},{item:w(({data:P,index:I})=>[g("div",Tmt,[e[11]||(e[11]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),g("p",Pmt,[G(M(P.title)+" ",1),P.status!="published"?(v(),R(h,{key:0,type:"info"},{default:w(()=>[G(M(t.$labelize(P.status)),1)]),_:2},1024)):O("",!0),_(h,null,{default:w(()=>[G(M(o.getTypeTitle(P.type)),1)]),_:2},1024),P.type=="sidebar_link"?(v(),R(h,{key:1,type:"info",class:"fcom_hover_show"},{default:w(()=>[G(M(P.settings.permalink),1)]),_:2},1024)):(v(),R(h,{key:2,type:"info",class:"fcom_hover_show"},{default:w(()=>[G("ID: "+M(P.id),1)]),_:2},1024))])]),g("div",Imt,[g("a",{target:"_blank",class:"el-button el-button--small el-button--secondary",href:P.permalink},M(t.$t("View")),9,Lmt),_(d,null,{default:w(({hide:L})=>[g("ul",Omt,[g("li",null,[_(f,{groups:i.groups,currentSpace:P,onMoved:V=>{L(),o.getGroups()}},null,8,["groups","currentSpace","onMoved"])]),g("li",{onClick:V=>{L(),o.openEditSpace(P)}},M(t.$t("Edit")),9,Dmt),g("li",{class:"fcom_action_popover_item fcom_action_popover_item_danger",onClick:V=>{L(),o.initDeleteSpace(P)}},M(t.$t("Delete")),9,Rmt)])]),_:2},1024)])]),_:1},8,["items","onDrop"])])):O("",!0)])]),_:1},8,["items","onDrop"]),i.orphanedSpaces&&i.orphanedSpaces.length?(v(),$("div",Vmt,[g("div",Fmt,[g("div",Nmt,[g("h4",null,M(t.$t("Other Spaces - No Assigned Group")),1)])]),g("div",Bmt,[(v(!0),$(te,null,be(i.orphanedSpaces,T=>(v(),$("div",zmt,[g("div",Hmt,[g("p",Umt,[G(M(T.title)+" ",1),T.status!="published"?(v(),R(h,{key:0,type:"info"},{default:w(()=>[G(M(t.$labelize(T.status)),1)]),_:2},1024)):O("",!0),_(h,null,{default:w(()=>[G(M(o.getTypeTitle(T.type)),1)]),_:2},1024),_(h,{type:"info",class:"fcom_hover_show"},{default:w(()=>[G(" ID: "+M(T.id),1)]),_:2},1024)])]),g("div",jmt,[g("a",{class:"el-button el-button--small el-button--secondary",target:"_blank",href:T.permalink},M(t.$t("View")),9,Wmt),_(d,null,{default:w(({hide:P})=>[g("ul",Ymt,[g("li",null,[_(f,{groups:i.groups,currentSpace:T,onMoved:I=>{P(),o.getGroups()}},null,8,["groups","currentSpace","onMoved"])]),g("li",{onClick:I=>{P(),o.openEditSpace(T)}},M(t.$t("Edit")),9,Gmt),g("li",{class:"fcom_action_popover_item fcom_action_popover_item_danger",onClick:I=>{P(),o.initDeleteSpace(T)}},M(t.$t("Delete")),9,qmt)])]),_:2},1024)])]))),256))])])):O("",!0)]))])),[[E,i.loading]])])]),_:1},8,["title"])]),_:1}),_(C,{id:"fluent_comminity_body",modelValue:i.showGroupDrawer,"onUpdate:modelValue":e[3]||(e[3]=T=>i.showGroupDrawer=T),size:t.drawerWidth,title:i.editingGroup?t.$t("Edit Group"):t.$t("Create a new Group"),"close-on-click-modal":!0,"has-close-confirmation":i.isGroupFormDirty,"close-confirmation-message":t.$t("Closing will discard your changes. Are you sure?")},{default:w(()=>[i.showGroupDrawer?(v(),R(y,{key:0,group:i.editingGroup,onDirty:e[1]||(e[1]=T=>i.isGroupFormDirty=!0),onCompleted:e[2]||(e[2]=T=>{i.showGroupDrawer=!1,o.getGroups()})},null,8,["group"])):O("",!0)]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"]),i.editSpace?(v(),$("div",Xmt,[(v(),R(va,{to:"body"},[i.editSpace.type=="course"?(v(),R(k,{key:0,course:i.editSpace,onClose:e[4]||(e[4]=T=>i.editSpace=null),onCompleted:e[5]||(e[5]=T=>{i.editSpace=null,o.getGroups()})},null,8,["course"])):i.editSpace.type=="community"?(v(),R(x,{key:1,space_profile:i.editSpace,onClose:e[6]||(e[6]=T=>i.editSpace=null),onCompleted:e[7]||(e[7]=T=>{i.editSpace=null,o.getGroups()})},null,8,["space_profile"])):i.editSpace.type=="sidebar_link"?(v(),R(S,{key:2,link:i.editSpace,onClose:e[8]||(e[8]=T=>i.editSpace=null),onCompleted:e[9]||(e[9]=T=>{i.editSpace=null,o.getGroups()})},null,8,["link"])):O("",!0)]))])):O("",!0)],64)}const Zmt=de(_mt,[["render",Kmt]]),Jmt={name:"WebhookForm",components:{SpaceIcon:qf},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})}}},Qmt={key:0,class:"fcom_highlight_block"},egt={style:{color:"#E6A23C"}},tgt={target:"_blank",rel:"noopener",href:"https://github.com/WPManageNinja/fluent-community-docs/blob/master/incoming-webhook-config.md"},ngt={key:0,class:"fcom_space_title"},sgt={key:0,class:"fcom_space_title"},igt={key:0,class:"fcom_space_title"},ogt={key:0,class:"fcom_space_title"},rgt={class:"dialog_footer fcom_mt_20"},agt={key:0},lgt={key:1};function cgt(t,e,n,s,i,o){const r=H("CopyDocument"),a=ye,l=Ge,c=vt,u=Tc,d=Hr,h=zr,f=en,p=H("SpaceIcon"),m=an,b=Jt,y=fd,C=hd,k=Ht,x=rn,S=_t("loading");return v(),R(x,{onSubmit:e[8]||(e[8]=Be(E=>t.doNothing(),["prevent"])),"label-position":"top",modelValue:i.form,"onUpdate:modelValue":e[9]||(e[9]=E=>i.form=E),size:"large"},{default:w(()=>[i.form.webhook_url?(v(),$("div",Qmt,[g("p",null,M(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:i.form.webhook_url,readonly:""},{append:w(()=>[_(l,{onClick:e[0]||(e[0]=E=>t.$toClipboard(i.form.webhook_url,this.$t("Link copied to clipboard")))},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1})]),_:1})]),_:1},8,["value"]),_(u,{type:"info",closable:!1,class:"fcom_mb_20"},{default:w(()=>[G(M(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",egt,M(t.$t("The email address is required!")),1),e[10]||(e[10]=G()),g("a",tgt,M(t.$t("Read the documentation")),1)]),_:1}),_(h,{style:{margin:"20px 0"},"empty-text":t.$t("No Data Found"),border:"",stripe:"",height:"250",data:i.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:i.form.title,"onUpdate:modelValue":e[1]||(e[1]=E=>i.form.title=E),placeholder:t.$t("Your Webhook Title")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),_(C,{gutter:20},{default:w(()=>[_(y,{sm:24,md:12},{default:w(()=>[_(f,{label:t.$t("Add to Spaces")},{default:w(()=>[_(b,{modelValue:i.form.space_ids,"onUpdate:modelValue":e[2]||(e[2]=E=>i.form.space_ids=E),multiple:"",placeholder:t.$t("Select Spaces"),style:{width:"100%"}},{default:w(()=>[(v(!0),$(te,null,be(n.spaces,E=>(v(),R(m,{key:E.slug,label:E.title,value:E.id},{default:w(()=>[E.id?(v(),$("span",ngt,[_(p,{space_profile:E},null,8,["space_profile"]),g("span",null,M(t.getExcerpt(E.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),_(y,{sm:24,md:12},{default:w(()=>[_(f,{label:t.$t("Remove from Spaces")},{default:w(()=>[_(b,{modelValue:i.form.remove_space_ids,"onUpdate:modelValue":e[3]||(e[3]=E=>i.form.remove_space_ids=E),multiple:"",placeholder:t.$t("Select Spaces that you want to remove from the user"),style:{width:"100%"}},{default:w(()=>[(v(!0),$(te,null,be(n.spaces,E=>(v(),R(m,{key:E.slug,label:E.title,value:E.id},{default:w(()=>[E.id?(v(),$("span",sgt,[_(p,{space_profile:E},null,8,["space_profile"]),g("span",null,M(t.getExcerpt(E.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1}),n.courses?(v(),R(C,{key:1,gutter:20},{default:w(()=>[_(y,{sm:24,md:12},{default:w(()=>[_(f,{label:t.$t("Add to Courses")},{default:w(()=>[_(b,{modelValue:i.form.course_ids,"onUpdate:modelValue":e[4]||(e[4]=E=>i.form.course_ids=E),multiple:"",placeholder:t.$t("Select Courses"),style:{width:"100%"}},{default:w(()=>[(v(!0),$(te,null,be(n.courses,E=>(v(),R(m,{key:E.slug,label:E.title,value:E.id},{default:w(()=>[E.id?(v(),$("span",igt,[_(p,{space_profile:E},null,8,["space_profile"]),g("span",null,M(t.getExcerpt(E.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1}),_(y,{sm:24,md:12},{default:w(()=>[_(f,{label:t.$t("Remove from Courses")},{default:w(()=>[_(b,{modelValue:i.form.remove_course_ids,"onUpdate:modelValue":e[5]||(e[5]=E=>i.form.remove_course_ids=E),multiple:"",placeholder:t.$t("Select Courses that you want to remove from the user"),style:{width:"100%"}},{default:w(()=>[(v(!0),$(te,null,be(n.courses,E=>(v(),R(m,{key:E.slug,label:E.title,value:E.id},{default:w(()=>[E.id?(v(),$("span",ogt,[_(p,{space_profile:E},null,8,["space_profile"]),g("span",null,M(t.getExcerpt(E.title,50)),1)])):O("",!0)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),_:1})]),_:1})):O("",!0),_(k,{modelValue:i.form.send_wp_welcome_email,"onUpdate:modelValue":e[6]||(e[6]=E=>i.form.send_wp_welcome_email=E),"true-value":"yes","false-value":"no"},{default:w(()=>[G(M(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),g("div",rgt,[ae(t.$slots,"after_form",{},()=>[Pe((v(),R(l,{class:"fcom_primary_button",disabled:i.adding,onClick:e[7]||(e[7]=E=>o.addWebhook())},{default:w(()=>[i.form.id?(v(),$("span",agt,M(t.$t("Update Webhook")),1)):(v(),$("span",lgt,M(t.$t("Add Webhook")),1))]),_:1},8,["disabled"])),[[S,i.adding]])])])]),_:3},8,["modelValue"])}const ugt=de(Jmt,[["render",cgt]]),dgt={name:"IncomingWebhooks",components:{Pagination:$d,UserAvatar:Jb,UserRouteLink:Wr,WebhookForm:ugt,Layout:Xs,AppLayout:Ks},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"))}},hgt=["href"],fgt={class:"settings_router manager_section"},pgt={class:"fhr_content_layout_body"},mgt={key:0,class:"setting_body"},ggt={class:"fcom_manager_actions"},vgt={class:"bulk_search"},_gt={class:"fcom_manager_table"},ygt={class:"fcom_webhook_url"},bgt={class:"fcom_table_action_col"},wgt={role:"region","aria-label":"Pagination",class:"pagination_wrap"},Cgt={key:1,class:"setting_body",style:{"text-align":"center"}},kgt=["href"],xgt={class:"dialog_header"},Sgt={class:"dialog_body"};function $gt(t,e,n,s,i,o){const r=H("Plus"),a=ye,l=Ge,c=vt,u=xo,d=Hr,h=H("CopyDocument"),f=zr,p=H("Pagination"),m=H("layout"),b=H("app-layout"),y=H("webhook-form"),C=Ss,k=_t("loading");return v(),$(te,null,[_(b,{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(),R(l,{key:0,class:"fcom_primary_button",onClick:e[0]||(e[0]=x=>o.showForm(null))},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,M(t.$t("Add New Webhook")),1)]),_:1})):(v(),$("a",{key:1,target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},M(t.$t("Upgrade to Pro")),9,hgt))]),default:w(()=>[g("div",fgt,[g("div",pgt,[t.has_pro?(v(),$("div",mgt,[g("div",ggt,[g("div",vgt,[_(c,{modelValue:i.search,"onUpdate:modelValue":e[1]||(e[1]=x=>i.search=x),onKeydown:$t(o.fetch,["enter"]),placeholder:t.$t("Search"),class:"el-input-round"},{prefix:w(()=>[...e[6]||(e[6]=[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)])]),_:1},8,["modelValue","onKeydown","placeholder"])])]),g("div",_gt,[Pe((v(),R(f,{data:i.webhooks,"empty-text":t.$t("No Webhooks Found")},{default:w(()=>[_(d,{label:t.$t("Title"),sortable:"","min-width":"160"},{default:w(x=>[G(M(x.row.value.title)+" ",1),x.row.value.running_count?(v(),R(u,{key:0,title:t.$t("Ran count"),size:"small"},{default:w(()=>[G(M(x.row.value.running_count),1)]),_:2},1032,["title"])):O("",!0)]),_:1},8,["label"]),_(d,{label:t.$t("Webhook URL"),sortable:""},{default:w(x=>[g("div",ygt,[_(c,{size:"small",value:x.row.webhook_url,readonly:""},{append:w(()=>[_(l,{onClick:S=>o.copyToClipboard(x.row.webhook_url),size:"small"},{default:w(()=>[_(a,null,{default:w(()=>[_(h)]),_:1})]),_:1},8,["onClick"])]),_:2},1032,["value"])])]),_:1},8,["label"]),_(d,{label:t.$t("Actions"),width:150},{default:w(x=>[g("div",bgt,[_(l,{onClick:S=>o.showForm(x.row),size:"small"},{default:w(()=>[G(M(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(l,{onClick:S=>o.removeWebhook(x.row),type:"danger",plain:"",size:"small"},{default:w(()=>[G(M(t.$t("Remove")),1)]),_:1},8,["onClick"])])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[k,i.loading]])]),g("div",wgt,[_(p,{hide_on_single:!1,onFetch:e[2]||(e[2]=x=>o.fetch()),pagination:i.paginate},null,8,["pagination"])])])):(v(),$("div",Cgt,[e[7]||(e[7]=g("p",null,null,-1)),g("a",{target:"_blank",rel:"noopener",href:t.appVars.upgrade_url,class:"el-button el-button--danger"},M(t.$t("Upgrade to Pro")),9,kgt)]))])])]),_:1},8,["title"])]),_:1}),_(C,{"modal-class":"fcom_common_dialog",id:"fluent_comminity_body","close-on-click-modal":!1,"append-to-body":!0,width:t.dialogWidth,modelValue:i.showModal,"onUpdate:modelValue":e[5]||(e[5]=x=>i.showModal=x),direction:"rtl"},{header:w(({close:x})=>[g("div",xgt,[g("h4",null,M(t.$t(i.editing_webhook.id?"Update Webhook":"Add Webhook")),1)])]),default:w(()=>[g("div",Sgt,[i.showModal?(v(),R(y,{key:0,onCompleted:e[3]||(e[3]=()=>{o.fetch(),i.showModal=!1}),modelValue:i.editing_webhook,"onUpdate:modelValue":e[4]||(e[4]=x=>i.editing_webhook=x),courses:i.courses,spaces:i.spaces},null,8,["modelValue","courses","spaces"])):O("",!0)])]),_:1},8,["width","modelValue"])],64)}const Agt=de(dgt,[["render",$gt]]),Mgt={name:"Overview",components:{AppLayout:Ks,Layout:Xs},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"))}},Egt={class:"object_menu"},Tgt={class:"fcom_space_menu_ul"};function Pgt(t,e,n,s,i,o){const r=H("router-link"),a=H("RouterView"),l=H("layout"),c=H("app-layout");return v(),R(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",Egt,[g("ul",Tgt,[(v(!0),$(te,null,be(i.analyticsNavigations,(u,d)=>(v(),$("li",{key:`analytics-navigation-${d}`},[_(r,{to:{name:u.route}},{default:w(()=>[G(M(t.$t(u.title)),1)]),_:2},1032,["to"])]))),128))])])]),default:w(()=>[_(a)]),_:1},8,["title"])]),_:1})}const Igt=de(Mgt,[["render",Pgt]]),Lgt={name:"CheckProStatus"},Ogt={class:"upgrade-pro-wrapper"};function Dgt(t,e,n,s,i,o){return v(),$("div",Ogt,[...e[0]||(e[0]=[g("div",{class:"upgrade-text"},[g("h2",null,"This Feature is [Pro] Only"),g("p",null,"Upgrade to Pro and unlock this feature and many others!")],-1),g("div",{class:"upgrade-button"},[g("a",{href:"https://fluentcommunity.co/",class:"button",target:"_blank"},"Upgrade Now")],-1)])])}const $5=de(Lgt,[["render",Dgt],["__scopeId","data-v-cc4c5d40"]]),Rgt={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],s=new Date().toISOString().split("T")[0];this.localDateRanges=[n,s],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)}}},Vgt={class:"fcom-report-header"},Fgt={class:"fcom-report-header-action"};function Ngt(t,e,n,s,i,o){const r=an,a=Jt,l=md;return v(),$("div",Vgt,[g("h4",null,M(t.$t("Overview")),1),g("div",Fgt,[_(a,{modelValue:i.localPredefinedDate,"onUpdate:modelValue":e[0]||(e[0]=c=>i.localPredefinedDate=c),onChange:o.setDateRange,class:"date-selector"},{default:w(()=>[(v(!0),$(te,null,be(n.predefinedDates,(c,u)=>(v(),R(r,{key:`date-shortcut-${u}`,label:c.label,value:c.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"]),_(l,{modelValue:i.localDateRanges,"onUpdate:modelValue":e[1]||(e[1]=c=>i.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:"YYYY-MM-DD","value-format":"YYYY-MM-DD",onChange:o.setDateRange},null,8,["modelValue","disabled-date","start-placeholder","end-placeholder","onChange"])])])}const Bgt=de(Rgt,[["render",Ngt]]),zgt={name:"Loading",props:{section:{type:Number,default:()=>1}}};function Hgt(t,e,n,s,i,o){const r=Wt;return v(!0),$(te,null,be(n.section,a=>(v(),$("div",{class:"fcom-loading",key:`loading-spinner-item-${a}`},[_(r,{rows:5,loading:"",animated:""})]))),128)}const Ea=de(zgt,[["render",Hgt]]),Ugt={name:"AnalyticsWidgets",components:{Loading:Ea},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 s=typeof(n==null?void 0:n.comparison)=="string"&&n.comparison.startsWith("-");return{...n,down:s}});this.widgets=e}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.fetchData()}},jgt={key:1,class:"fcom-report-stat-widgets"},Wgt={class:"stat-title"};function Ygt(t,e,n,s,i,o){const r=H("Loading");return i.loading?(v(),R(r,{key:0,section:1})):(v(),$("div",jgt,[(v(!0),$(te,null,be(i.widgets,(a,l)=>(v(),$("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",Wgt,M(a.title),1),g("h3",null,[G(M(a.total_records)+" ",1),g("span",{class:W(["stat-percent",{"stat-down":a.down}])},M(a.comparison),3)])]))),128))]))}const Ggt=de(Ugt,[["render",Ygt]]);/*! | |
| 131 | +`);const o=e.topNodeType.createAndFill(void 0,i.content);return o?s(o):""}}})});RH.meta={displayName:"Prose<clipboard>",package:"@milkdown/plugin-clipboard"};const yS=ms({shouldAppend:t=>!(!t||["heading","paragraph"].includes(t.type.name)),getNode:t=>t.schema.nodes.paragraph.create()},"trailingConfig");yS.meta={package:"@milkdown/plugin-trailing",displayName:"Ctx<trailingConfig>"};const VH=Ls(t=>{const e=new ps("MILKDOWN_TRAILING"),{shouldAppend:n,getNode:i}=t.get(yS.key),s=new rs({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});VH.meta={package:"@milkdown/plugin-trailing",displayName:"Prose<trailing>"};const eMe=[yS,VH];var FH=(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))(FH||{});const tMe={cursor:!0,"link-tooltip":!0,"block-edit":!0,placeholder:!0,toolbar:!0,"code-mirror":!0,"image-block":!0};async function nMe(t,e,n){switch(t){case"link-tooltip":{const{defineFeature:i}=await Qs(()=>Promise.resolve().then(()=>p3t),void 0);return i(e,n)}case"block-edit":{const{defineFeature:i}=await Qs(()=>Promise.resolve().then(()=>hkt),void 0);return i(e,n)}case"placeholder":{const{defineFeature:i}=await Qs(()=>Promise.resolve().then(()=>gkt),void 0);return i(e,n)}case"toolbar":{const{defineFeature:i}=await Qs(()=>Promise.resolve().then(()=>ykt),void 0);return i(e,n)}case"image-block":{const{defineFeature:i}=await Qs(()=>Promise.resolve().then(()=>Tkt),void 0);return i(e,n)}}}const sMe=kn([],"FeaturesCtx");function iMe(t){return e=>{e.inject(sMe,t)}}var oMe="Expected a function",tT=0/0,rMe="[object Symbol]",aMe=/^\s+|\s+$/g,lMe=/^[-+]0x[0-9a-f]+$/i,cMe=/^0b[01]+$/i,uMe=/^0o[0-7]+$/i,dMe=parseInt,hMe=typeof xs=="object"&&xs&&xs.Object===Object&&xs,fMe=typeof self=="object"&&self&&self.Object===Object&&self,pMe=hMe||fMe||Function("return this")(),mMe=Object.prototype,gMe=mMe.toString,vMe=Math.max,_Me=Math.min,R3=function(){return pMe.Date.now()};function yMe(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(oMe);e=nT(e)||0,$x(n)&&(u=!!n.leading,d="maxWait"in n,o=d?vMe(nT(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?_Me(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=R3();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(R3())}function S(){var M=R3(),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 S.cancel=C,S.flush=$,S}function $x(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function bMe(t){return!!t&&typeof t=="object"}function wMe(t){return typeof t=="symbol"||bMe(t)&&gMe.call(t)==rMe}function nT(t){if(typeof t=="number")return t;if(wMe(t))return tT;if($x(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=$x(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(aMe,"");var n=cMe.test(t);return n||uMe.test(t)?dMe(t.slice(2),n?2:8):lMe.test(t)?tT:+t}var kMe=yMe;const N2=vi(kMe);let NH=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 Ax=kn(new NH,"listener"),CMe=new ps("MILKDOWN_LISTENER"),BH=t=>(t.inject(Ax,new NH),async()=>{await t.wait(rd);const e=t.get(Ax),{listeners:n}=e;n.beforeMount.forEach(a=>a(t)),await t.wait(pg);const i=t.get(vf);let s=null,o=null;const r=new rs({key:CMe,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:N2(()=>{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(Qr,a=>a.concat(r)),await t.wait(u_),n.mounted.forEach(a=>a(t))});BH.meta={package:"@milkdown/plugin-listener",displayName:"Listener"};function xMe(t){return new Promise(e=>{const n=new FileReader;n.addEventListener("load",()=>{e({alt:t.name,src:n.result})},!1),n.readAsDataURL(t)})}const SMe=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 qF("image");return(await Promise.all(n.map(s=>xMe(s)))).map(({alt:s,src:o})=>i.createAndFill({src:o,alt:s}))},_f=ms({uploader:SMe,enableHtmlFileUploader:!1,uploadWidgetFactory:(t,e)=>{const n=document.createElement("span");return n.textContent="Upload in progress...",Fs.widget(t,n,e)}},"uploadConfig");_f.meta={package:"@milkdown/plugin-upload",displayName:"Ctx<uploadConfig>"};const zH=Ls(t=>{const e=new ps("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(Wr),{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(_f.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 rs({key:e,state:{init(){return Kn.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(_f.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(_f.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}}})});zH.meta={package:"@milkdown/plugin-upload",displayName:"Prose<upload>"};const $Me=[_f,zH];var bS=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Ks=(t,e,n)=>(bS(t,e,"read from private field"),n?n.call(t):e.get(t)),ph=(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)},Sm=(t,e,n,i)=>(bS(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),AMe=(t,e,n)=>(bS(t,e,"access private method"),n),tr,$m,gg,y_,yf,Ex,HH;class UH{constructor({root:e,features:n={},featureConfigs:i={},defaultValue:s="",onUpdate:o=a=>{},handleCommonActions:r=(a,l)=>{}}){var u;ph(this,Ex),ph(this,tr,void 0),ph(this,$m,void 0),ph(this,gg,void 0),ph(this,y_,!0),ph(this,yf,null);const a=Object.entries({...tMe,...n}).filter(([,d])=>d).map(([d])=>d);Sm(this,gg,(typeof e=="string"?document.querySelector(e):e)??document.body),Sm(this,tr,l7e.make().config(iMe(a)).config(d=>{d.set(d_,Ks(this,gg)),d.set(a_,s),d.set(mg,{editable:()=>Ks(this,y_)})}).config(d=>{const h=async(f,p)=>await r("handleFileUpload",{ctx:d,files:f,schema:p});d.update(_f.key,f=>({...f,uploader:h}))}).config(d=>{const h=d.get(Ax);h.markdownUpdated((f,p,m)=>{p!==m&&o(p)}),h.updated((f,p,m)=>{r("editor_updated",f)})}).use(j7e).use(JEe).use(eMe).use(RH).use(BH).use($Me).use(HEe));const l=(u=i==null?void 0:i["block-edit"])==null?void 0:u.canAddImage;l&&Ks(this,tr).use(Ls(()=>new rs({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}))),Ks(this,tr).use(Ls(()=>new rs({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 S=(k.startsWith("http")?"":"https://")+k,M=d.state.tr.insertText(p,h).addMark(C,$,m.create({href:S})).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),S=y(f.doc.resolve(C).nodeAfter);return S&&($==null?void 0:$.attrs.href)===S.attrs.href?null:f.tr.removeMark(C-1,C,p).removeStoredMark(p)}}))),Ks(this,tr).use(Ls(()=>{let d=!1,h=!1;return new rs({view:f=>({update(){var $;const p=f.state.schema.marks.link,m=f.state.selection.$cursor,y=S=>S.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 S=f.coordsAtPos(($=m.nodeBefore)!=null&&$.marks.some(y)?m.pos-1:m.pos);f.dom.dispatchEvent(new MouseEvent("mousemove",{bubbles:!0,clientX:S.left+1,clientY:(S.top+S.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(nMe(d,Ks(this,tr),h))}),Sm(this,$m,Promise.all(c))}async create(){await Ks(this,$m);const e=await Ks(this,tr).create();return AMe(this,Ex,HH).call(this),e}async destroy(){var e;return(e=Ks(this,yf))==null||e.disconnect(),await Ks(this,$m),Ks(this,tr).destroy()}get editor(){return Ks(this,tr)}setReadonly(e){return Sm(this,y_,!e),this}getMarkdown(){return Ks(this,tr).action(p7e())}getEditor(){return Ks(this,tr)}destroyEditor(){this.destroy()}}tr=new WeakMap;$m=new WeakMap;gg=new WeakMap;y_=new WeakMap;yf=new WeakMap;Ex=new WeakSet;HH=function(){const t=Ks(this,gg),e=i=>{parseFloat(i.style.left)<0&&(i.style.left="0px")},n=i=>{const s=t.querySelector(i);s&&(Ks(this,yf).observe(s,{attributes:!0,attributeFilter:["style"]}),setTimeout(()=>e(s),0))};Sm(this,yf,new MutationObserver(i=>{const s=i[0];s.type==="childList"?(n("milkdown-link-edit"),n("milkdown-link-preview")):e(s.target)})),Ks(this,yf).observe(t,{childList:!0,subtree:!0})};UH.Feature=FH;const EMe=Symbol("editorInfoCtxKey"),MMe=fe({name:"MilkdownProvider",setup:(t,{slots:e})=>(Pt(EMe,{loading:J(!0),dom:J(null),editor:J(void 0),editorFactory:J(void 0)}),()=>{var r;return _(ee,null,[(r=e.default)==null?void 0:r.call(e)])})});var TMe=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},jH=(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)},Mx=(t,e,n)=>(TMe(t,e,"access private method"),n),b_,Tx;let PMe=class{constructor({node:e,view:n,getPos:i,decorations:s,innerDecorations:o,options:r}){jH(this,b_),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 Mx(this,b_,Tx).call(this,e)}createContentDOM(e){return Mx(this,b_,Tx).call(this,e)}get component(){return this.options.component}};b_=new WeakSet,Tx=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 IMe=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 Px,WH;let LMe=class{constructor({pos:e,spec:n,options:i}){jH(this,Px),this.pos=e,this.options=i,this.spec=n,this.dom=Mx(this,Px,WH).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}};Px=new WeakSet,WH=function(t){return t instanceof HTMLElement?t:document.createElement(t)};let wS=(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 OMe=Object.defineProperty,DMe=(t,e,n)=>e in t?OMe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ur=(t,e,n)=>(DMe(t,typeof e!="symbol"?e+"":e,n),n);const RMe=Symbol("[ProsemirrorAdapter]nodeViewContext"),VMe=Symbol("[ProsemirrorAdapter]useNodeViewFactory");let FMe=class extends PMe{constructor(){super(...arguments),ur(this,"key",wS()),ur(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:Fn(this.node),selected:Fn(this.selected),decorations:Fn(this.decorations),innerDecorations:Fn(this.innerDecorations)}),ur(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)})}),ur(this,"render",()=>{const e=this.component;return Pi(fe({name:"ProsemirrorNodeView",setup:()=>(Pt(RMe,this.context),()=>_(ea,{key:this.key,to:this.dom},{default:()=>[_(e,null,null)]}))}))})}};const NMe=(t,e)=>n=>(i,s,o,r,a)=>{const l=new FMe({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},BMe=Symbol("[ProsemirrorAdapter]nodeViewContext"),zMe=Symbol("[ProsemirrorAdapter]usePluginViewFactory");let HMe=class extends IMe{constructor(){super(...arguments),ur(this,"key",wS()),ur(this,"context",{view:Fn(this.view),prevState:Fn(this.prevState)}),ur(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})}),ur(this,"render",()=>{const e=this.component;return Pi(fe({name:"ProsemirrorNodeView",setup:()=>(Pt(BMe,this.context),()=>_(ea,{key:this.key,to:this.root},{default:()=>[_(e,null,null)]}))}))})}};const UMe=(t,e)=>n=>i=>{const s=new HMe({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},jMe=()=>{const t=J({}),e=pt(),n=Pi({});return Od(()=>{n.updater=()=>{e==null||e.update()}}),Sl(()=>{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]}}},WMe=Symbol("[ProsemirrorAdapter]widgetViewContext"),YMe=Symbol("[ProsemirrorAdapter]useWidgetViewFactory");let qMe=class extends LMe{constructor(){super(...arguments),ur(this,"key",wS()),ur(this,"context",{view:this.view,getPos:this.getPos,spec:this.spec}),ur(this,"updateContext",()=>{Object.assign(this.context,{view:this.view,getPos:this.getPos,spec:this.spec})}),ur(this,"render",()=>{const e=this.component;return Pi(fe({name:"ProsemirrorWidgetView",setup:()=>(Pt(WMe,this.context),()=>_(ea,{key:this.key,to:this.dom},{default:()=>[_(e,null,null)]}))}))})}};const GMe=(t,e)=>n=>(i,s={})=>{const o=new qMe({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)},XMe=fe({name:"ProsemirrorAdapterProvider",setup:(t,{slots:e})=>{const{portals:n,renderVueRenderer:i,removeVueRenderer:s}=jMe(),o=NMe(i,s),r=UMe(i,s),a=GMe(i,s);return Pt(VMe,o),Pt(zMe,r),Pt(YMe,a),()=>{var l;return _(ee,null,[(l=e.default)==null?void 0:l.call(e),Object.values(n.value).map(c=>bt(c))])}}}),KMe={name:"CrepeEditor",emits:["update:modelValue","handleMediaUpload","editorCreated","editor-escape"],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:MMe,ProsemirrorAdapterProvider:XMe},data(){return{editor:null,editorFailed:!1,currentContent:"",showMentionPop:!1,currentMentionSearch:"",mentionResults:[],justReplaced:!1,searchingMention:!1,hasUnsavedChanges:!1,pendingNavigation:null,activeUploadBlock:null}},watch:{autofocus_changed(t){t&&this.focusOnEditor()},editorFailed(t){t&&this.$nextTick(this.resizeFallback)},modelValue(){this.editorFailed&&this.$nextTick(this.resizeFallback)},currentContent(){var e;const t=this.context==="feed"||this.context==="comment";this.hasUnsavedChanges=t&&!!((e=this.currentContent)!=null&&e.replace(/ |\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(){if(!this.editor){this.currentContent="",this.$emit("update:modelValue",""),this.$refs.fallbackInput&&(this.$refs.fallbackInput.style.height="");return}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){if(!this.editor){this.currentContent=(this.modelValue||"")+t,this.$emit("update:modelValue",this.currentContent);return}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 UH({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")}).catch(n=>{console.error("FluentCommunity: rich editor failed to load, falling back to plain text",n),this.editorFailed=!0,this.$emit("editorCreated")})},onFallbackInput(t){this.currentContent=t.target.value,this.$emit("update:modelValue",t.target.value),this.resizeFallback()},resizeFallback(){const t=this.$refs.fallbackInput;t&&(t.style.height="auto",t.style.height=t.scrollHeight+"px")},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||!this.editor)return;const e=new RegExp(`@${this.currentMentionSearch}(?!.*@${this.currentMentionSearch})`);this.currentContent=this.currentContent.replace(e,t+" "),this.editor.action(m7e(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||!this.editor)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()))},handleEditorKeydown(t){const e=this.$refs.crepe_editor_vue;t.key!=="Escape"||!(e!=null&&e.contains(t.target))||this.showMentionPop||e.querySelector('milkdown-slash-menu[data-show="true"], milkdown-toolbar[data-show="true"], milkdown-link-preview[data-show="true"], milkdown-link-edit[data-show="true"]')||this.$emit("editor-escape")}},mounted(){this.initEditor(),window.addEventListener("beforeunload",this.handleBeforeUnload),document.addEventListener("click",this.handleLinkClick,!0),document.addEventListener("keydown",this.handleEditorKeydown,!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),document.removeEventListener("keydown",this.handleEditorKeydown,!0),this.onInlineUpload&&((t=this.$refs.crepe_editor_vue)==null||t.removeEventListener("click",this.handleImageBlockClick,!0)),this.$eventBus.off("unsavedChangesProceeded",this.onUnsavedChangesProceeded)}},ZMe={style:{position:"relative"},class:"fcom_md_editor"},JMe={ref:"crepe_editor_vue",class:"crepe-editor feed_md_content fcom_md_seditor_wrapper"},QMe=["placeholder","value"],eTe={class:"fcom_mention_pop_wrap"},tTe={key:0},nTe={key:0},sTe=["onClick"],iTe=["src"],oTe={key:1};function rTe(t,e,n,i,s,o){const r=H("ProsemirrorAdapterProvider"),a=H("MilkdownProvider"),l=Yo;return v(),A(ee,null,[_(a,null,{default:w(()=>[_(r,null,{default:w(()=>[g("div",ZMe,[Re(g("div",JMe,null,512),[[jt,!s.editorFailed]]),s.editorFailed?(v(),A("textarea",{key:0,ref:"fallbackInput",class:"fcom_md_editor_fallback",placeholder:n.placeholder||t.$t("Type your message here!"),value:n.modelValue,onInput:e[0]||(e[0]=(...c)=>o.onFallbackInput&&o.onFallbackInput(...c))},null,40,QMe)):O("",!0)])]),_:1})]),_:1}),g("div",eTe,[_(l,{"popper-class":"fcom_mention_pop",ref:"mentionPopoverRef",placement:"bottom",visible:s.showMentionPop,width:300,persistent:!1},{reference:w(()=>[...e[1]||(e[1]=[g("span",{style:{}},null,-1)])]),default:w(()=>[s.justReplaced?O("",!0):(v(),A("div",tTe,[s.mentionResults.length?(v(),A("ul",nTe,[(v(!0),A(ee,null,we(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,iTe)):O("",!0),g("span",null,x(c.display_name)+" (@"+x(c.username)+")",1)],8,sTe))),128))])):s.searchingMention?O("",!0):(v(),A("div",oTe,[g("p",null,x(t.$t("No results found. Please search by username")),1)]))]))]),_:1},8,["visible"])])],64)}const cu=ue(KMe,[["render",rTe]]),aTe={name:"CreateCorseForm",components:{FormBuilder:WF,SpaceGroupSelector:F8,TopicSelector:jF,SlugInput:Yd,ImageUploader:Ll,LogoEmojiSelector:Z1,ErrorAlerts:J1,CrepeEditor:cu},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:Mwe,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:Twe,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})}},lTe={key:0},cTe={class:"fcom_form_section"},uTe={class:"fcom_help_text"},dTe={class:"fcom_help_text"},hTe={class:"fcom_form_section"},fTe={style:{"font-weight":"bold"}},pTe={key:0},mTe={class:"fcom_help_text"},gTe={style:{"font-weight":"bold"}},vTe={class:"fcom_form_section"},_Te={class:"fcom_lined_checkboxes"},yTe={class:"fcom_checkbox_with_tooltip"},bTe={key:0},wTe={key:0},kTe={class:"fcom_help_text"},CTe={key:0,class:"fcom_form_section"},xTe={class:"fcom_select_photo",style:{float:"left"}},STe=["src","alt"],$Te={style:{float:"right",color:"#8492a6","font-size":"13px"}},ATe={class:"fcom_lined_checkboxes"},ETe={class:"fcom_form_section"},MTe={class:"fcom_help_text"},TTe=["href"],PTe={class:"fcom_image_uploader_wrapper"},ITe={class:"fcom_help_text"},LTe={class:"fcom_space_form_bottom"},OTe={key:0},DTe={class:"fcom_form_section fcom_mt_20"},RTe={key:1},VTe=["href"];function FTe(t,e,n,i,s,o){const r=H("logo-emoji-selector"),a=ft,l=en,c=H("SlugInput"),u=H("crepe-editor"),d=H("space-group-selector"),h=Li,f=ws,p=sn,m=Jt,y=Yt,b=H("InfoFilled"),k=be,C=Ss,$=H("topic-selector"),S=Wo,M=H("EditPen"),P=He,T=H("Delete"),I=H("ImageUploader"),L=H("error-alerts"),R=tn,V=H("form-builder"),B=xt("loading");return t.hasFeature("has_course")?(v(),A("div",lTe,[_(R,{onSubmit:e[23]||(e[23]=Ee(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",cTe,[g("h4",null,x(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]=U=>{s.form.settings.emoji=U.emoji,s.form.logo=U.logo,s.form.settings.shape_svg=U.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",uTe,[g("p",null,x(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",dTe,[g("p",null,x(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(()=>[N(x(t.$t("Published")),1)]),_:1}),_(h,{value:"draft"},{default:w(()=>[N(x(t.$t("Draft")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])]),g("div",hTe,[g("h4",null,x(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,we(s.privacies,(F,z)=>(v(),D(p,{key:z,label:F.label,value:z},{default:w(()=>[g("span",fTe,x(F.label),1),g("p",null,x(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(()=>[N(x(t.$t("Custom")),1)]),_:1}),_(h,{value:"no"},{default:w(()=>[N(x(t.$t("Default")),1)]),_:1}),_(h,{disabled:!t.has_pro,value:"redirect"},{default:w(()=>[N(x(t.$t("Redirect to an URL"))+" ",1),t.has_pro?O("",!0):(v(),A("span",pTe,"("+x(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",mTe,[g("p",null,x(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(()=>[N(x(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(()=>[N(x(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,we(s.courseTypes,(F,z)=>(v(),D(p,{key:z,label:F.label,value:z},{default:w(()=>[g("span",gTe,x(F.label),1),g("p",null,x(F.description),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["label"])]),g("div",vTe,[g("h4",null,x(t.$t("Features Customizations")),1),_(l,null,{default:w(()=>[g("div",_Te,[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(()=>[N(x(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(()=>[N(x(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(()=>[N(x(t.$t("Hide students count from courses page")),1)]),_:1},8,["modelValue"]),g("div",yTe,[_(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(()=>[N(x(t.$t("Lesson order enforcement"))+" ",1),t.has_pro?O("",!0):(v(),A("span",bTe,"("+x(t.$t("Pro Required"))+")",1))]),_:1},8,["disabled","model-value"]),_(C,{class:"box-item fcom_checkbox_tooltip",effect:"dark",placement:"right-end"},{content:w(()=>[N(x(t.$t("Your members will have to complete each lesson")),1),e[25]||(e[25]=g("br",null,null,-1)),N(" "+x(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(()=>[N(x(t.$t("Classic")),1)]),_:1}),_(h,{disabled:!t.has_pro,value:"modern"},{default:w(()=>[N(x(t.$t("Modern"))+" ",1),t.has_pro?O("",!0):(v(),A("span",wTe,"("+x(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",kTe,[g("p",null,x(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",CTe,[g("h4",null,x(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,we(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",xTe,[g("img",{src:F.photo,alt:F.display_name},null,8,STe),g("span",null,x(F.display_name),1)]),g("span",$Te,x(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",ATe,[_(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(()=>[N(x(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(()=>[N(x(t.$t("Show students count in course instructor view")),1)]),_:1},8,["modelValue"])):O("",!0)])]),_:1})])):O("",!0),g("div",ETe,[g("h4",null,x(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",MTe,[g("p",null,x(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")},x(t.$t("Manage all topics")),9,TTe)):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(S,{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",PTe,[_(I,{isTextBtn:!1,can_remove:!!s.form.cover_photo,additionalData:{resize:!1,disable_convert:"yes",max_width:1200,max_height:630},onUploaded:o.handlePhotoUpload},hs({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",ITe,[g("p",null,x(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",LTe,[e[26]||(e[26]=g("span",null,null,-1)),_(P,{class:"fcom_primary_button",disabled:s.saving,onClick:e[22]||(e[22]=F=>o.submit()),loading:s.saving},{default:w(()=>[g("span",null,x(t.$t("Create")),1)]),_:1},8,["disabled","loading"])])]),_:1}))])]),_:1},8,["modelValue"]),Re((v(),A("div",null,[s.metaSettings&&Object.keys(s.metaSettings).length>0?(v(),A("div",OTe,[(v(!0),A(ee,null,we(s.metaSettings,F=>(v(),A("div",DTe,[g("h4",null,x(F.section_title),1),_(V,{formData:F.settings,formFields:F.fields,disableSubmit:!0},null,8,["formData","formFields"])]))),256))])):O("",!0)])),[[B,s.fetchingMetaBoxes]])])):(v(),A("div",RTe,[g("p",null,x(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")},x(t.$t("Go to features settings")),9,VTe)]))}const kS=ue(aTe,[["render",FTe]]),NTe={name:"SpaceIcon",props:["space_profile"]},BTe=["alt","src"],zTe={key:1,class:"fcom_emoji"},HTe={key:2,class:"fcom_shape"},UTe={key:3,class:"fcom_no_avatar"};function jTe(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,BTe)):(a=n.space_profile.settings)!=null&&a.emoji?(v(),A("span",zTe,x((l=n.space_profile.settings)==null?void 0:l.emoji),1)):(c=n.space_profile.settings)!=null&&c.shape_svg?(v(),A("span",HTe,[_(r,{innerHTML:(u=n.space_profile.settings)==null?void 0:u.shape_svg},null,8,["innerHTML"])])):(v(),A("span",UTe))}const xp=ue(NTe,[["render",jTe]]),WTe={name:"SpaceCourseSelector",components:{SpaceIcon:xp},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}},YTe={key:0,class:"fcom_space_title"},qTe={key:0},GTe={key:1};function XTe(t,e,n,i,s,o){const r=H("SpaceIcon"),a=sn,l=n2,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,we(s.formattedSpaceGroups,d=>Re((v(),D(l,{key:d.label,label:d.label},{default:w(()=>[(v(!0),A(ee,null,we(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",YTe,[_(r,{space_profile:h},null,8,["space_profile"]),g("span",null,[N(x(t.getExcerpt(h.title,50))+" ",1),h.type=="course"?(v(),A("span",qTe," ("+x(t.$t("course"))+")",1)):O("",!0)])])):(v(),A("span",GTe,x(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 CS=ue(WTe,[["render",XTe]]),KTe={name:"SidebarLinkForm",components:{SpaceGroupSelector:F8,LogoEmojiSelector:Z1,SpaceCourseSelector:CS,ErrorAlerts:J1},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}},ZTe={class:"fcom_form_section"},JTe={class:"fcom_help_text"},QTe={class:"fcom_help_text"},ePe={class:"fcom_help_text"},tPe={key:0},nPe={key:1};function sPe(t,e,n,i,s,o){const r=H("logo-emoji-selector"),a=ft,l=en,c=Yt,u=H("space-group-selector"),d=Li,h=ws,f=H("SpaceCourseSelector"),p=H("error-alerts"),m=He,y=tn,b=xt("loading");return v(),D(y,{onSubmit:e[8]||(e[8]=Ee(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",ZTe,[_(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",JTe,[_(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(()=>[N(x(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",QTe,[g("p",null,x(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",ePe,[g("p",null,x(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(()=>[Re((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",tPe,x(t.$t("Update")),1)):(v(),A("span",nPe,x(t.$t("Create Link")),1))]),_:1},8,["disabled"])),[[b,s.saving]])]),_:1})])]),_:1},8,["modelValue"])}const YH=ue(KTe,[["render",sPe]]),iPe={name:"SpaceIcon"},oPe={version:"1.1",viewBox:"0 0 128 128","xml:space":"preserve"};function rPe(t,e,n,i,s,o){return v(),A("svg",oPe,[...e[0]||(e[0]=[Ra('<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)])])}const aPe=ue(iPe,[["render",rPe]]),lPe={name:"CourseIcon"},cPe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function uPe(t,e,n,i,s,o){return v(),A("svg",cPe,[...e[0]||(e[0]=[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),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)])])}const qH=ue(lPe,[["render",uPe]]),dPe={name:"SpaceCreateModal",components:{Drawer:tu,CreateSpaceForm:N8,CreateCourseForm:kS,SidebarLinkForm:YH,ArrowLeftBold:Qre,SpaceIcon:aPe,CourseIcon:qH,Link:pR},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})})}},hPe={class:"dialog_header"},fPe={class:"dialog_left"},pPe={class:"dialog_body"},mPe={key:0,class:"space-type-selector"},gPe={class:"space-cards"},vPe={class:"space-card-label"},_Pe={class:"space-card-label"},yPe={key:0,class:"space-card-note"},bPe={class:"space-card-label"},wPe={key:0,class:"space-card-note"},kPe={class:"dialog_footer"};function CPe(t,e,n,i,s,o){const r=H("ArrowLeftBold"),a=be,l=He,c=H("SpaceIcon"),u=H("CourseIcon"),d=H("Link"),h=H("create-space-form"),f=H("create-course-form"),p=H("sidebar-link-form"),m=H("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"},hs({header:w(()=>[g("div",hPe,[g("div",fPe,[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,x(o.currentTitle),1)])])]),default:w(()=>[g("div",pPe,[s.step=="choose_type"?(v(),A("div",mPe,[g("div",gPe,[g("div",{onClick:e[1]||(e[1]=y=>s.select_type="space_form"),class:q([{"is-active":s.select_type==="space_form"},"space-card"])},[_(a,{class:"space-card-icon"},{default:w(()=>[_(c)]),_:1}),g("span",vPe,x(t.$t("Discussion Space")),1)],2),g("div",{onClick:e[2]||(e[2]=y=>!!t.hasFeature("has_course")&&(s.select_type="course_form")),class:q([{"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",_Pe,x(t.$t("Course")),1),t.hasFeature("has_course")?O("",!0):(v(),A("span",yPe,x(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:q([{"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",bPe,x(t.$t("Link")),1),t.appVars.pro?O("",!0):(v(),A("span",wPe,x(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",kPe,[_(l,{disabled:!s.select_type,class:"fcom_primary_button",onClick:e[4]||(e[4]=y=>o.handleNextStep())},{default:w(()=>[N(x(t.$t("Next")),1)]),_:1},8,["disabled"])])]),key:"0"}:void 0]),1032,["modelValue","size","has-close-confirmation","close-confirmation-message"])}const xPe=ue(dPe,[["render",CPe]]),Hs=q1("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)})}}}),xS=q1("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 SPe=Fa,$Pe=SPe["__core-js_shared__"],APe=$Pe,V3=APe,sT=function(){var t=/[^.]+$/.exec(V3&&V3.keys&&V3.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function EPe(t){return!!sT&&sT in t}var MPe=EPe,TPe=Function.prototype,PPe=TPe.toString;function IPe(t){if(t!=null){try{return PPe.call(t)}catch{}try{return t+""}catch{}}return""}var GH=IPe,LPe=LF,OPe=MPe,DPe=K1,RPe=GH,VPe=/[\\^$.*+?()[\]{}|]/g,FPe=/^\[object .+?Constructor\]$/,NPe=Function.prototype,BPe=Object.prototype,zPe=NPe.toString,HPe=BPe.hasOwnProperty,UPe=RegExp("^"+zPe.call(HPe).replace(VPe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function jPe(t){if(!DPe(t)||OPe(t))return!1;var e=LPe(t)?UPe:FPe;return e.test(RPe(t))}var WPe=jPe;function YPe(t,e){return t==null?void 0:t[e]}var qPe=YPe,GPe=WPe,XPe=qPe;function KPe(t,e){var n=XPe(t,e);return GPe(n)?n:void 0}var Sp=KPe,ZPe=Sp,JPe=Fa,QPe=ZPe(JPe,"DataView"),eIe=QPe,tIe=Sp,nIe=Fa,sIe=tIe(nIe,"Map"),SS=sIe,iIe=Sp,oIe=Fa,rIe=iIe(oIe,"Promise"),aIe=rIe,lIe=Sp,cIe=Fa,uIe=lIe(cIe,"Set"),XH=uIe,dIe=Sp,hIe=Fa,fIe=dIe(hIe,"WeakMap"),pIe=fIe,Ix=eIe,Lx=SS,Ox=aIe,Dx=XH,Rx=pIe,KH=G1,$p=GH,iT="[object Map]",mIe="[object Object]",oT="[object Promise]",rT="[object Set]",aT="[object WeakMap]",lT="[object DataView]",gIe=$p(Ix),vIe=$p(Lx),_Ie=$p(Ox),yIe=$p(Dx),bIe=$p(Rx),Eu=KH;(Ix&&Eu(new Ix(new ArrayBuffer(1)))!=lT||Lx&&Eu(new Lx)!=iT||Ox&&Eu(Ox.resolve())!=oT||Dx&&Eu(new Dx)!=rT||Rx&&Eu(new Rx)!=aT)&&(Eu=function(t){var e=KH(t),n=e==mIe?t.constructor:void 0,i=n?$p(n):"";if(i)switch(i){case gIe:return lT;case vIe:return iT;case _Ie:return oT;case yIe:return rT;case bIe:return aT}return e});var ZH=Eu,wIe=IF,kIe=ZH,CIe=T8,xIe=Na,SIe=O8,$Ie=P8,AIe=PF,EIe=L8,MIe="[object Map]",TIe="[object Set]",PIe=Object.prototype,IIe=PIe.hasOwnProperty;function LIe(t){if(t==null)return!0;if(SIe(t)&&(xIe(t)||typeof t=="string"||typeof t.splice=="function"||$Ie(t)||EIe(t)||CIe(t)))return!t.length;var e=kIe(t);if(e==MIe||e==TIe)return!t.size;if(AIe(t))return!wIe(t).length;for(var n in t)if(IIe.call(t,n))return!1;return!0}var OIe=LIe;const JH=vi(OIe),DIe={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),JH(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}}},RIe={key:0,class:"fcom_social_links"},VIe=["href","title"];function FIe(t,e,n,i,s,o){const r=be,a=H("router-link");return o.hasSocialLinks?(v(),A("div",RIe,[(v(!0),A(ee,null,we(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,VIe))),128)),n.isOwn&&!o.hasSocialLinks?(v(),D(a,{key:0,to:{name:"update_profile",params:{username:n.xprofile.username}}},{default:w(()=>[N(x("+ "+t.$t("Add social links")),1)]),_:1},8,["to"])):O("",!0)])):O("",!0)}const NIe=ue(DIe,[["render",FIe]]),QH=q1("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}}}),cT=q1("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&&xS().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={}}}}),$S=q1("space",{state:()=>({spacesBySlug:{},currentSpace:null,currentPageLayout: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))},setCurrentPageLayout(t){this.currentPageLayout=t||null},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],this.currentSpace&&this.currentSpace.slug===t&&(this.currentSpace=null),delete this.spacesBySlug[t],delete this.topicsBySpace[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")}}}),BIe={name:"FollowAction",props:{profile:{type:Object,required:!0},followButtonText:{type:String,default:""}},emits:["refetch"],setup(){return{userStore:xS()}},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})}}},zIe={key:0},HIe={key:1},UIe={key:0},jIe={key:1};function WIe(t,e,n,i,s,o){const r=He;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",HIe,x(t.$t("Unblock")),1)):(v(),A("span",zIe,x(t.$t("Blocked")),1))]),_:1},8,["loading","disabled","onClick"])):o.isFollowing?(v(),D(r,{key:1,onClick:o.confirmUnfollow,class:q(["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",jIe,x(t.$t("Unfollow")),1)):(v(),A("span",UIe,x(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,x(o.followBtnText),1)]),_:1},8,["onClick","loading","disabled"]))],64)):O("",!0)}const YIe=ue(BIe,[["render",WIe]]),qIe={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:NIe,FollowAction:YIe},data(){return{}},computed:{userLevel(){var t;return this.has_leaderboard&&((t=this.xprofile)!=null&&t.total_points)?Mh(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)}},GIe=["href"],XIe={class:"fcom_user_display_name"},KIe={key:1,class:"user_route"},ZIe=["href"],JIe={class:"fcom_user_display_name"},QIe={class:"fcom_profile_pop_avatar"},eLe={key:0,class:"fcom_prfile_tagline"},tLe={class:"fcom_level_name"},nLe={style:{display:"block"},class:"fcoml_level_sub meta_line"},sLe={class:"fcom_profile_pop_info"},iLe={class:"pop_info_header"},oLe={class:"header_name"},rLe=["href"],aLe={class:"fcom_user_display_name"},lLe={class:"fcom_user_name"},cLe={key:0,class:"header_actions"},uLe={key:0,class:"fcom_profile_pop_bio"},dLe=["title"],hLe=["title"],fLe={class:"pop_info_btns"},pLe=["href"],mLe=["href"];function gLe(t,e,n,i,s,o){const r=H("verified-sign"),a=H("UserBadge"),l=H("UserAvatar"),c=jd,u=H("follow-action"),d=H("SocialLinks"),h=Ud,f=Yo;return n.show_pop?(v(),A("span",KIe,[_(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",JIe,x(n.xprofile.display_name),1)],8,ZIe)])]),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",QIe,[_(l,{xprofile:n.xprofile},null,8,["xprofile"]),o.userLevel?(v(),A("div",eLe,[g("div",tLe,x(o.userLevel.title),1),g("div",nLe,x(o.userLevel.tagline),1)])):O("",!0)])]),_:1}),_(c,{sm:24,md:16},{default:w(()=>{var p,m;return[g("div",sLe,[g("div",iLe,[g("div",oLe,[g("a",{href:t.$getRouteLink("u/:username",{username:n.xprofile.username}),class:"user_route"},[g("p",aLe,x(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,rLe),g("span",lLe," @"+x(n.xprofile.username),1)]),n.show_follow?(v(),A("div",cLe,[_(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",uLe,x(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"},x(t.$t("Joined: %s",t.humanDateDiff(n.xprofile.created_at))),9,dLe)):O("",!0),n.xprofile.last_activity?(v(),A("div",{key:2,title:n.xprofile.last_activity,class:"meta_line"},x(t.$t("Last seen: %s",t.humanDateDiff(n.xprofile.last_activity))),9,hLe)):O("",!0),g("div",fLe,[g("a",{class:"el-button el-button--primary is-text is-has-bg",href:t.$getRouteLink("u/:username",{username:n.xprofile.username})},x(t.$t("View Profile")),9,pLe),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})},x(t.$t("Message")),9,mLe)):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",XIe,x(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,GIe))}const la=ue(qIe,[["render",gLe]]),vLe={name:"MentionPopover",components:{UserRouteLink:la},setup(){return{userStore:xS()}},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 _Le(t,e,n,i,s,o){const r=H("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 yLe=ue(vLe,[["render",_Le]]),bLe={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)}},wLe={class:"dialog_header"},kLe={class:"dialog_left"},CLe={class:"dialog_body"},xLe={class:"dialog_footer"};function SLe(t,e,n,i,s,o){const r=He,a=$s;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",wLe,[g("div",kLe,[g("h4",null,x(t.$t("Leave Page?")),1)])])]),footer:w(()=>[g("div",xLe,[_(r,{class:"fcom_secondary_button",onClick:o.handleCancel},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["onClick"]),_(r,{class:"fcom_primary_button",onClick:o.handleProceed},{default:w(()=>[N(x(t.$t("Leave")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",CLe,[g("span",null,x(s.message),1)])]),_:1},8,["modelValue","width"])}const $Le=ue(bLe,[["render",SLe]]),ALe={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")}}},ELe={class:"fcom_pagination_wrap"};function MLe(t,e,n,i,s,o){const r=$ve;return v(),A("div",ELe,[_(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 uu=ue(ALe,[["render",MLe]]),TLe={name:"ReportReviewModal",components:{Pagination:uu},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)}},PLe={class:"dialog_body"},ILe={class:"report_details"},LLe={class:"report_details_header"},OLe={class:"report_details_header_left"},DLe={class:"report_details_header_right"},RLe={key:0},VLe={key:1},FLe={key:1},NLe={class:"report_reason"},BLe=["title"],zLe={key:0,class:"report_details_body"},HLe=["textContent"],ULe=["aria-label"],jLe={class:"dialog_footer report_footer"};function WLe(t,e,n,i,s,o){const r=H("UserAvatar"),a=H("UserRouteLink"),l=Nt,c=H("Pagination"),u=He,d=$s;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",jLe,[_(u,{class:"fcom_secondary_button",onClick:e[1]||(e[1]=h=>o.unpublishReport()),loading:s.unpublishing,disabled:!s.loading&&!s.report},{default:w(()=>[N(x(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(()=>[N(x(o.getPublishBtnText),1)]),_:1},8,["loading","disabled"])])]),default:w(()=>{var h,f;return[g("div",PLe,[g("h4",null,x(t.$t("Reports")+" ("+((f=(h=s.content)==null?void 0:h.meta)==null?void 0:f.reports_count)+")"),1),g("div",ILe,[s.loading?(v(),D(l,{key:1,rows:5,animated:!0})):(v(!0),A(ee,{key:0},we(s.postReports,p=>(v(),A("div",{key:p.id,class:"report_details_item"},[g("div",LLe,[g("div",OLe,[p.reporter?(v(),D(r,{key:0,with_level:!1,xprofile:p.reporter},null,8,["xprofile"])):O("",!0)]),g("div",DLe,[!p.reporter&&!o.getReason(p.reason)?(v(),A("div",RLe,x(t.$t("Flagged automatically by the site rule")),1)):(v(),A("div",VLe,[p.reporter?(v(),D(a,{key:0,show_verified:!1,xprofile:p.reporter},null,8,["xprofile"])):(v(),A("span",FLe,x(t.$t("By System ")),1)),o.getReason(p.reason)?(v(),A(ee,{key:2},[g("span",null,x(t.$t("reported for ")),1),g("span",NLe,x(o.getReason(p.reason)),1)],64)):O("",!0)])),g("div",{title:p.created_at,class:"meta_line"},x(t.humanDateDiff(p.created_at)),9,BLe)])]),p.explanation?(v(),A("div",zLe,[g("div",{textContent:x(p.explanation)},null,8,HLe)])):O("",!0)]))),128)),s.pagination.total?(v(),A("div",{key:2,role:"region","aria-label":t.$t("Pagination"),class:"pagination_wrap"},[_(c,{hide_on_single:!0,onFetch:e[0]||(e[0]=p=>o.getPostReports()),pagination:s.pagination},null,8,["pagination"])],8,ULe)):O("",!0)])])]}),_:1},8,["modelValue","width","onClose"])}const YLe=ue(TLe,[["render",WLe]]),qLe={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)}},GLe={class:"dialog_header"},XLe={class:"dialog_left"},KLe={class:"dialog_body"},ZLe={class:"fcom_report_content_form"},JLe={class:"dialog_footer"};function QLe(t,e,n,i,s,o){const r=sn,a=Jt,l=en,c=ft,u=tn,d=He,h=$s;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",GLe,[g("div",XLe,[g("h4",null,x(o.currentTitle),1)])])]),footer:w(()=>[g("div",JLe,[_(d,{class:"fcom_secondary_button",onClick:e[2]||(e[2]=f=>o.closeModal())},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(d,{class:"fcom_primary_button",onClick:e[3]||(e[3]=f=>o.validateAndSubmit()),loading:s.saving},{default:w(()=>[N(x(t.$t("Report")),1)]),_:1},8,["loading"])])]),default:w(()=>[g("div",KLe,[g("div",ZLe,[_(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,we(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 eOe=ue(qLe,[["render",QLe]]);/*! Element Plus v2.13.6 */var eU={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 tOe=window.fluentComAdmin.el_i18n;for(const[t,e]of Object.entries(tOe))eU.el[t]=e;const nOe={name:"PortalApplication",components:{Back:rR,SpaceCreateModal:xPe,CourseIcon:qH,AnalyticsIcon:Gae,MentionPopover:yLe,UnfinishedChangesModal:$Le,ReportReviewModal:YLe,ReportContentModal:eOe},data(){return{loading:!1,hasSearchHolder:!1,hasNotificationHolder:!1,isSmallScreen:!1,menuItems:this.appVars.portalSettingsMenus,enLang:eU}},created(){this.isSmallScreen=window.innerWidth<=1024}},sOe={class:"fcom_general_menu"},iOe=["href"],oOe={class:"el-icon fcom_arrow_icon"},rOe={class:"fcom_communities_menu fcom_admin_menu"},aOe={class:"fcom_general_menu"},lOe={class:"community_avatar"},cOe={class:"fcom_shape"},uOe={class:"community_name"},dOe={class:"fcom_general_menu"},hOe={class:"community_avatar"},fOe={class:"fcom_shape"},pOe={class:"community_name"},mOe={class:"fcom_general_menu"},gOe={class:"community_avatar"},vOe={class:"fcom_shape"},_Oe={class:"community_name"};function yOe(t,e,n,i,s,o){const r=H("router-view"),a=H("Back"),l=be,c=H("router-link"),u=H("CourseIcon"),d=H("AnalyticsIcon"),h=H("space-create-modal"),f=H("mention-popover"),p=H("unfinished-changes-modal"),m=H("report-review-modal"),y=H("report-content-modal"),b=$de;return v(),D(b,{locale:s.enLang},{default:w(()=>[_(r),(v(),D(ea,{to:"#fcom_menu_sidebar"},[g("ul",sOe,[g("li",null,[g("a",{href:t.appVars.portal_url},[g("i",oOe,[_(a)]),g("span",null,x(t.$t("Back to home")),1)],8,iOe)])]),g("div",rOe,[Object.keys(s.menuItems).length>0?(v(),A(ee,{key:0},[g("h4",null,x(t.$t("Portal Settings")),1),g("ul",aOe,[(v(!0),A(ee,null,we(s.menuItems,k=>(v(),A("li",{key:k.route,class:q("settings_inner_menu_"+k.route)},[_(c,{to:{name:k.route}},{default:w(()=>[g("div",lOe,[g("span",cOe,[_(l,{innerHTML:k.icon_svg},null,8,["innerHTML"])])]),g("span",uOe,x(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,x(t.$t("Course Management")),1),g("ul",dOe,[g("li",null,[_(c,{to:{name:"manage_courses"}},{default:w(()=>[g("div",hOe,[g("span",fOe,[_(l,null,{default:w(()=>[_(u)]),_:1})])]),g("span",pOe,x(t.$t("Manage Courses")),1)]),_:1})])])],64)):O("",!0),t.hasFeature("has_analytics")&&t.isAdmin()?(v(),A(ee,{key:2},[g("h4",null,x(t.$t("Reports")),1),g("ul",mOe,[g("li",null,[_(c,{to:{name:"analytics_overview"}},{default:w(()=>[g("div",gOe,[g("span",vOe,[_(l,null,{default:w(()=>[_(d)]),_:1})])]),g("span",_Oe,x(t.$t("Analytics")),1)]),_:1})])])],64)):O("",!0)])])),_(h),_(f),_(p),_(m),_(y)]),_:1},8,["locale"])}const bOe=ue(nOe,[["render",yOe]]),wOe={name:"AddMembersForm",components:{SpaceCourseSelector:CS},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()}},kOe={class:"fcom_add_members_form"},COe={key:0,class:"fcom_source_selector_wrap fcom_mb_20"},xOe={key:1,class:"fcom_import_done"},SOe={class:"fcom_done_title"},$Oe={class:"fcom_done_subtitle"},AOe={class:"fcom_import_summary"},EOe={class:"fcom_import_summary_title"},MOe={class:"fcom_import_summary_row"},TOe={class:"fcom_import_summary_row"},POe={key:0,class:"fcom_import_summary_row"},IOe={key:1,class:"fcom_import_summary_row"},LOe={key:2,class:"fcom_import_progress_wrap"},OOe={class:"fcom_help_text fcom_mb_15"},DOe={key:0,class:"fcom_muted_text fcom_mt_10"},ROe={class:"fcom_select_photo",style:{float:"left"}},VOe=["src","alt"],FOe={style:{float:"right",color:"#8492a6","font-size":"13px"}},NOe={style:{padding:"4px","text-align":"center"}},BOe={style:{margin:"0 0 8px"}},zOe={key:0},HOe={key:1},UOe={key:2},jOe={key:1,style:{margin:"4px 0 0","font-size":"12px"}},WOe={key:0,class:"fcom_help_text fcom_mb_10"},YOe=["href"],qOe={class:"fcom_help_text fcom_mb_15"},GOe={key:0},XOe={key:2},KOe={class:"fcom_spaced_flex fcom_mb_10"},ZOe={class:"fcom_csv_drop_inner"},JOe={class:"el-upload__text fcom_mt_10"},QOe={key:0},eDe={class:"el-upload__tip"},tDe={class:"fcom_spaced_flex fcom_mb_10"},nDe={class:"fcom_muted_text",style:{"margin-left":"8px"}},sDe={key:0,class:"fcom_muted_text fcom_mb_10"},iDe=["aria-label"],oDe={class:"fcom_help_text fcom_mb_15"},rDe=["aria-label"],aDe={class:"fcom_help_text fcom_mb_15"},lDe={key:0};function cDe(t,e,n,i,s,o){const r=Hd,a=ws,l=a2,c=sn,u=He,d=Jt,h=en,f=tn,p=H("SpaceCourseSelector"),m=Y1,y=Il,b=Pl,k=Yt,C=xt("loading");return v(),A("div",kOe,[!s.batchRunning&&!s.importDone?(v(),A("div",COe,[_(a,{modelValue:s.sourceMode,"onUpdate:modelValue":e[0]||(e[0]=$=>s.sourceMode=$),size:"small"},{default:w(()=>[_(r,{value:"wp_users"},{default:w(()=>[N(x(t.$t("WP Users")),1)]),_:1}),_(r,{value:"from_source"},{default:w(()=>[N(x(t.$t("From Space/Course")),1)]),_:1}),_(r,{value:"csv"},{default:w(()=>[N(x(t.$t("CSV Import")),1)]),_:1}),t.appVars.has_fluentcrm?(v(),D(r,{key:0,value:"crm_tag"},{default:w(()=>[N(x(t.$t("CRM Tag")),1)]),_:1})):O("",!0)]),_:1},8,["modelValue"])])):O("",!0),s.importDone?(v(),A("div",xOe,[e[19]||(e[19]=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)),g("h3",SOe,x(t.$t("All Done!")),1),g("p",$Oe,x(t.$t("Import has been completed. You may close this now.")),1),g("div",AOe,[g("strong",EOe,x(t.$t("Import Summary")),1),g("p",MOe,x(t.$t("Total Records:"))+" "+x(s.importDone.total),1),g("p",TOe,x(n.context==="course"?t.$t("Enrolled:"):t.$t("Added:"))+" "+x(s.importDone.added),1),s.importDone.skipped?(v(),A("p",POe,x(t.$t("Skipped:"))+" "+x(s.importDone.skipped),1)):O("",!0),s.importDone.failed?(v(),A("p",IOe,x(t.$t("Failed:"))+" "+x(s.importDone.failed),1)):O("",!0)])])):s.batchRunning?(v(),A("div",LOe,[g("div",OOe,[g("p",null,x(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",DOe,x(s.batchProcessed)+" / "+x(s.batchTotal)+" "+x(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]=Ee(()=>{},["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",NOe,[g("p",BOe,[o.isEmail?(v(),A("span",zOe,[N(x(t.$t("User not registered:"))+" ",1),g("strong",null,x(s.currentSearch),1)])):s.currentSearch?(v(),A("span",HOe,x(t.$t("No matching user found.")),1)):(v(),A("span",UOe,x(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(()=>[N(x(t.$t("Send Email Invitation")),1)]),_:1},8,["loading","disabled","aria-label"])):s.currentSearch?(v(),A("p",jOe,x(t.$t("Type a valid email to invite.")),1)):O("",!0)],64)):O("",!0)])]),default:w(()=>[(v(!0),A(ee,null,we(s.wpUsers,$=>(v(),D(c,{class:"fcom_with_photo_option",key:$.ID,label:`${$.display_name} (${$.user_email||$.ID})`,value:$.ID},{default:w(()=>[g("span",ROe,[g("img",{src:$.photo,alt:$.display_name},null,8,VOe),g("span",null,x($.display_name),1)]),g("span",FOe,x($.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",WOe,[g("p",null,[N(x(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"},x(t.$t("Upgrade")),9,YOe)):O("",!0)])])):O("",!0),Re((v(),D(u,{class:"fcom_primary_button",onClick:e[4]||(e[4]=$=>o.addWpUsers())},{default:w(()=>[N(x(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",qOe,[g("p",null,x(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(()=>[N(x(n.context==="course"?t.$t("Import Students"):t.$t("Import Members"))+" ",1),t.appVars.pro?O("",!0):(v(),A("span",GOe," ("+x(t.$t("Pro"))+")",1))]),_:1})]),_:1})):s.sourceMode==="csv"?(v(),A("div",XOe,[s.csvRows.length?(v(),A(ee,{key:1},[g("div",tDe,[g("div",null,[g("strong",null,x(s.csvFileName),1),g("span",nDe,x(s.csvRows.length)+" "+x(t.$t("contacts")),1)]),_(u,{link:"",size:"small",onClick:e[11]||(e[11]=$=>o.resetCsvImport())},{default:w(()=>[N(x(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",sDe," + "+x(s.csvRows.length-5)+" "+x(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(()=>[N(x(t.$t("Create WordPress accounts for new email addresses")),1)]),_:1},8,["modelValue"])]),g("div",null,[Re(_(k,{modelValue:s.sendWelcomeEmailCsv,"onUpdate:modelValue":e[13]||(e[13]=$=>s.sendWelcomeEmailCsv=$),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),[[jt,s.createMissingUsers]])])],8,iDe)]),_:1}),g("div",oDe,[g("p",null,x(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(()=>[N(x(n.context==="course"?t.$t("Import Students"):t.$t("Import Members")),1)]),_:1})]),_:1})]),_:1})],64)):(v(),A(ee,{key:0},[g("div",KOe,[e[20]||(e[20]=g("span",null,null,-1)),t.appVars.pro?(v(),D(u,{key:0,link:"",size:"small",onClick:e[10]||(e[10]=$=>o.downloadSampleCsv())},{default:w(()=>[N("↓ "+x(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",eDe,x(t.$t("Columns: Name, Email, Username")),1)]),default:w(()=>[g("div",ZOe,[e[22]||(e[22]=g("div",{class:"fcom_csv_drop_arrow"},"↑",-1)),g("div",JOe,[N(x(t.$t("Drop CSV here or"))+" ",1),g("em",null,x(t.$t("click to browse")),1),e[21]||(e[21]=N()),t.appVars.pro?O("",!0):(v(),A("span",QOe," ("+x(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,we(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(()=>[N(x(t.$t("Create WordPress accounts for contacts without an existing account")),1)]),_:1},8,["modelValue"])]),g("div",null,[Re(_(k,{modelValue:s.sendWelcomeEmailCrm,"onUpdate:modelValue":e[17]||(e[17]=$=>s.sendWelcomeEmailCrm=$),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),[[jt,s.createMissingCrmUsers]])])],8,rDe)]),_:1}),g("div",aDe,[g("p",null,x(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(()=>[N(x(n.context==="course"?t.$t("Add Students"):t.$t("Add Members")),1),t.appVars.pro?O("",!0):(v(),A("span",lDe," ("+x(t.$t("Pro"))+")",1))]),_:1})]),_:1})):O("",!0)],64))])}const uDe=ue(wOe,[["render",cDe]]),dDe={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"}}},hDe={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"},fDe=["d"];function pDe(t,e,n,i,s,o){return v(),A("svg",hDe,[e[0]||(e[0]=g("line",{x1:"2.5",y1:"4",x2:"8.5",y2:"4"},null,-1)),e[1]||(e[1]=g("line",{x1:"2.5",y1:"8",x2:"6.5",y2:"8"},null,-1)),e[2]||(e[2]=g("line",{x1:"2.5",y1:"12",x2:"4.5",y2:"12"},null,-1)),g("path",{d:o.arrowPath},null,8,fDe)])}const mDe=ue(dDe,[["render",pDe]]);let gDe=0;const vDe={name:"SortControl",components:{SortDirIcon:mDe},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=++gDe;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"))}}},_De={class:"fcom_feed_filter_icon"},yDe={class:"fcom_feed_filter_value"},bDe={role:"presentation",class:"fcom_feed_filter_group"},wDe=["id"],kDe=["aria-labelledby"],CDe={role:"presentation",class:"fcom_feed_filter_group"},xDe=["id"],SDe=["aria-labelledby"],$De={class:"fcom_sort_option"},ADe={class:"fcom_sort_option"};function EDe(t,e,n,i,s,o){const r=H("SortDirIcon"),a=H("ArrowDown"),l=be,c=He,u=$r,d=Ar,h=Sr;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",bDe,[g("span",{id:s.sortLabelId,class:"fcom_feed_filter_group_label"},x(t.$t("Sort by")),9,wDe),g("ul",{role:"group","aria-labelledby":s.sortLabelId,class:"fcom_feed_filter_group_list"},[(v(!0),A(ee,null,we(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:q({fcom_feed_filter_selected:n.field===f.value}),onClick:p=>o.selectField(f)},{default:w(()=>[N(x(f.label),1)]),_:2},1032,["aria-checked","aria-current","class","onClick"]))),128))],8,kDe)]),g("li",CDe,[g("span",{id:s.orderLabelId,class:"fcom_feed_filter_group_label fcom_feed_filter_group_divided"},x(t.$t("Order")),9,xDe),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:q({fcom_feed_filter_selected:n.dir==="asc"}),onClick:e[0]||(e[0]=f=>o.selectDir("asc"))},{default:w(()=>[g("span",$De,[_(r,{dir:"asc"}),N(x(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:q({fcom_feed_filter_selected:n.dir==="desc"}),onClick:e[1]||(e[1]=f=>o.selectDir("desc"))},{default:w(()=>[g("span",ADe,[_(r,{dir:"desc"}),N(x(t.$t("Descending")),1)])]),_:1},8,["aria-checked","aria-current","class"])],8,SDe)])]),_:1})]),default:w(()=>[_(c,{text:"",class:"fcom_feed_filter_trigger","aria-label":o.ariaLabel},{default:w(()=>[g("span",_De,[_(r,{dir:n.dir},null,8,["dir"])]),g("span",yDe,x(o.currentLabel),1),_(l,{class:"fcom_feed_filter_caret"},{default:w(()=>[_(a)]),_:1})]),_:1},8,["aria-label"])]),_:1})}const MDe=ue(vDe,[["render",EDe]]),TDe={name:"ExportIcon"},PDe={viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function IDe(t,e,n,i,s,o){return v(),A("svg",PDe,[...e[0]||(e[0]=[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),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)])])}const tU=ue(TDe,[["render",IDe]]),LDe={name:"CourseMembers",props:["course"],components:{Search:Qb,UserRouteLink:la,Pagination:uu,AddMembersForm:uDe,ExportIcon:tU,SortControl:MDe},setup(){return{uiStore:QH()}},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()}},ODe={class:"fcom_course_members"},DDe={class:"fcom_course_member_header"},RDe={class:"fcom_course_member_actions"},VDe={key:0},FDe={key:1},NDe={class:"search_member fcom_mb_20"},BDe={class:"feed_filters"},zDe={class:"table_user_card"},HDe={class:"card_avatar"},UDe={class:"card_info"},jDe={class:"card_name"},WDe={key:0,class:"meta_line"},YDe={class:"progress_wrap"},qDe=["title"],GDe=["title"];function XDe(t,e,n,i,s,o){const r=H("ExportIcon"),a=be,l=He,c=H("Search"),u=ft,d=H("SortControl"),h=H("UserAvatar"),f=H("UserRouteLink"),p=Il,m=a2,y=H("MoreFilled"),b=$r,k=Ar,C=Sr,$=Pl,S=H("pagination"),M=H("add-members-form"),P=Va,T=xt("loading");return v(),A("div",ODe,[g("div",DDe,[g("h3",null,x(t.$t("Course Students")),1),g("div",RDe,[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",VDe,x(t.$t("Export")),1)):(v(),A("span",FDe,x(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(()=>[N(x(t.$t("Add Student")),1)]),_:1})):O("",!0)])]),g("div",NDe,[_(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",BDe,[e[7]||(e[7]=g("div",{class:"fcom_feed_divider"},null,-1)),_(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"])]),Re((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",zDe,[g("div",HDe,[_(h,{xprofile:I.row},null,8,["xprofile"])]),g("div",UDe,[g("div",jDe,[_(f,{show_badge:!0,xprofile:I.row},null,8,["xprofile"])]),I.row.short_description?(v(),A("div",WDe,x(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",YDe,[_(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},x(t.smartDate(I.row.space_pivot.created_at,!0)),9,qDe)]),_:1},8,["label"]),_(p,{width:"150",label:t.$t("Last Seen")},{default:w(I=>[g("div",{title:I.row.last_activity},x(t.humanDateDiff(I.row.last_activity)),9,GDe)]),_: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(()=>[N(x(t.$t("Remove")),1)]),_:1},8,["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]]),_(S,{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,x(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 KDe=ue(LDe,[["render",XDe]]),ZDe={name:"ViewQuizResult",props:["result","course"],emits:["close","updateResult"],components:{Check:q4},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")})}}},JDe={class:"dialog_header"},QDe={class:"dialog_left"},eRe={class:"fcom_view_quiz_result"},tRe={class:"fcom_result_details"},nRe={class:"fcom_questions_wrap"},sRe={key:0,class:"fcom_question_image"},iRe={class:"fcom_question_header"},oRe=["innerHTML"],rRe={class:"fcom_question_body"},aRe={key:0,class:"correct_text"},lRe={key:1,class:"correct_text"},cRe={class:"fcom_written_answer_answer"},uRe={class:"fcom_user_answer_text"},dRe={key:0,class:"correct_text"},hRe={key:1,class:"correct_text"},fRe={class:"fcom_question_options"},pRe={key:2,class:"question_help_text"},mRe={class:"fcom_result_info"},gRe={class:"result_info_item"},vRe={class:"left_side"},_Re={class:"sub_title"},yRe={class:"right_side"},bRe={class:"result_info_item"},wRe={class:"left_side"},kRe={class:"title"},CRe={class:"sub_title"},xRe={class:"result_info_item"},SRe={class:"left_side"},$Re={class:"title"},ARe={class:"sub_title"},ERe={class:"result_info_item"},MRe={class:"left_side"},TRe={class:"title"},PRe={class:"score"},IRe={class:"right_side"},LRe={class:"title"},ORe={class:"score"},DRe={class:"result_info_item"},RRe={class:"left_side"},VRe={class:"title"},FRe={class:"dialog_footer"};function NRe(t,e,n,i,s,o){const r=Wo,a=H("Check"),l=be,c=H("Close"),u=Yt,d=H("UserRouteLink"),h=H("UserAvatar"),f=sn,p=Jt,m=He,y=$s;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",JDe,[g("div",QDe,[g("h4",null,x(t.$t("Quiz Result")),1)])])]),footer:w(()=>[g("div",FRe,[_(m,{class:"fcom_secondary_button",onClick:o.closeModal},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["onClick"]),_(m,{class:"fcom_primary_button",onClick:o.updateResult},{default:w(()=>[N(x(t.$t("Update Result")),1)]),_:1},8,["onClick"])])]),default:w(()=>{var b;return[g("div",eRe,[g("div",tRe,[g("div",nRe,[(v(!0),A(ee,null,we(o.questions,k=>{var C;return v(),A(ee,{key:k.slug},[o.showQuestion(k)?(v(),A("div",{key:0,class:q(["fcom_question",k.type])},[o.showQuestionImage(k)?(v(),A("div",sRe,[_(r,{src:k.image_url},null,8,["src"])])):O("",!0),g("div",iRe,[g("div",{innerHTML:k.label_rendered,class:"fcom_question_label"},null,8,oRe)]),g("div",rRe,[o.isWrittenAnswer(k)?(v(),A(ee,{key:0},[g("div",{class:q(["fcom_is_correct",o.freeTextBadgeClass(k)])},[o.isExactMatchQuestion(k)?(v(),A("p",aRe,[o.isQuestionCorrect(k)?(v(),A(ee,{key:0},[_(l,null,{default:w(()=>[_(a)]),_:1}),N(" "+x(t.$t("Correct")),1)],64)):(v(),A(ee,{key:1},[_(l,null,{default:w(()=>[_(c)]),_:1}),N(" "+x(t.$t("Incorrect")),1)],64))])):(v(),A("p",lRe,[_(l,null,{default:w(()=>[_(a)]),_:1}),N(" "+x(t.$t("Answered")),1)]))],2),g("div",cRe,[g("div",uRe,x((C=s.userAnswers[k.slug])==null?void 0:C.user_answer),1)])],64)):(v(),A(ee,{key:1},[g("div",{class:q(["fcom_is_correct",o.isQuestionCorrect(k)?"correct":"incorrect"])},[o.isQuestionCorrect(k)?(v(),A("p",dRe,[_(l,null,{default:w(()=>[_(a)]),_:1}),N(" "+x(t.$t("Correct")),1)])):(v(),A("p",hRe,[_(l,null,{default:w(()=>[_(c)]),_:1}),N(" "+x(t.$t("Incorrect")),1)]))],2),g("div",fRe,[(v(!0),A(ee,null,we(k.options,$=>(v(),A("div",{key:$.label,class:"fcom_question_option"},[_(u,{class:q({single_choice:o.isSingleChoice(k)}),"model-value":o.isOptionSelected(k,$),onChange:S=>o.handleOptionChange(k,$)},{default:w(()=>[N(x($.label),1)]),_:2},1032,["class","model-value","onChange"])]))),128))])],64)),k.help_text?(v(),A("div",pRe,x(k.help_text),1)):O("",!0)])],2)):O("",!0)],64)}),128))])]),g("div",mRe,[g("div",gRe,[g("div",vRe,[_(d,{show_badge:!0,xprofile:s.xprofile},null,8,["xprofile"]),g("div",_Re,x(t.$t("Attempts")+": "+n.result.meta.attempts),1)]),g("div",yRe,[_(h,{xprofile:s.xprofile,with_level:!1},null,8,["xprofile"])])]),g("div",bRe,[g("div",wRe,[g("div",kRe,x(n.result.lesson.title),1),g("div",CRe,x((b=n.course)==null?void 0:b.title),1)])]),g("div",xRe,[g("div",SRe,[g("div",$Re,x(t.$t("Submitted")),1),g("div",ARe,x(t.smartDate(n.result.updated_at,!0)),1)])]),g("div",ERe,[g("div",MRe,[g("div",TRe,x(t.$t("Score")),1),g("div",PRe,x(n.result.score+"%"),1)]),g("div",IRe,[g("div",LRe,x(t.$t("Correct")),1),g("div",ORe,x(n.result.meta.correct_answers+"/"+n.result.meta.total_questions),1)])]),g("div",DRe,[g("div",RRe,[g("div",VRe,x(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,we(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 BRe=ue(ZDe,[["render",NRe]]),zRe={name:"QuizResults",props:["course","course_id"],components:{UserRouteLink:la,Pagination:uu,ViewQuizResult:BRe,Search:Qb,ExportIcon:tU},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()}},HRe={class:"fcom_course_members"},URe={class:"fcom_course_member_header"},jRe={key:0,class:"fcom_course_member_actions"},WRe={class:"search_member"},YRe={class:"feed_filters"},qRe={id:"feed_short_by",class:"fcom_feed_filter_label"},GRe={class:"table_user_card"},XRe={class:"card_avatar"},KRe={class:"card_info"},ZRe={class:"card_name"},JRe={class:"meta_line"};function QRe(t,e,n,i,s,o){const r=H("ExportIcon"),a=be,l=He,c=H("Search"),u=ft,d=sn,h=Jt,f=H("UserAvatar"),p=H("UserRouteLink"),m=Il,y=hi,b=Pl,k=H("pagination"),C=H("ViewQuizResult"),$=xt("loading");return v(),A("div",HRe,[g("div",URe,[g("h3",null,x(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]=S=>o.exportResults())},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,x(t.$t("Export")),1)]),_:1},8,["loading"])])):O("",!0)]),g("div",WRe,[_(u,{clearable:"",onClear:o.toSearch,onKeydown:ut(o.toSearch,["enter"]),onInput:o.handleSearch,modelValue:s.search,"onUpdate:modelValue":e[1]||(e[1]=S=>s.search=S),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",YRe,[e[4]||(e[4]=g("div",{class:"fcom_feed_divider"},null,-1)),g("span",qRe,x(t.$t("Filter by:")),1),_(h,{"aria-label":t.$t("Sort members by"),modelValue:s.filter_by,"onUpdate:modelValue":e[2]||(e[2]=S=>s.filter_by=S),class:"fcom_minimal_select","popper-class":"plain_select",placeholder:t.$t("All"),onChange:e[3]||(e[3]=S=>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"])]),Re((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(S=>{var M;return[g("div",GRe,[g("div",XRe,[_(f,{xprofile:S.row.xprofile},null,8,["xprofile"])]),g("div",KRe,[g("div",ZRe,[_(p,{show_badge:!0,xprofile:S.row.xprofile},null,8,["xprofile"])]),g("div",JRe,x(t.getExcerpt((M=S.row.lesson)==null?void 0:M.title,160)),1)])])]}),_:1},8,["label"]),_(m,{width:"260",label:t.$t("Submitted Date")},{default:w(S=>[N(x(t.smartDate(S.row.updated_at,!0)),1)]),_:1},8,["label"]),_(m,{width:"120",label:t.$t("Score")},{default:w(S=>[N(x(S.row.score)+"% ",1)]),_:1},8,["label"]),_(m,{width:"120",label:t.$t("Result")},{default:w(S=>[_(y,{type:o.getTagType(S.row.status),size:"small"},{default:w(()=>[N(x(o.getResultText(S.row.status)),1)]),_:2},1032,["type"])]),_:1},8,["label"]),_(m,{width:"160",label:t.$t("Actions")},{default:w(S=>[_(l,{class:"fcom_secondary_button",onClick:M=>o.isOpenResult(S.row)},{default:w(()=>[N(x(t.$t("View")),1)]),_:1},8,["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 eVe=ue(zRe,[["render",QRe]]),tVe={name:"ChatIcon"},nVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function sVe(t,e,n,i,s,o){return v(),A("svg",nVe,[...e[0]||(e[0]=[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),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)])])}const nU=ue(tVe,[["render",sVe]]),iVe={name:"HeartIcon",props:{filled:{default:!1}}},oVe={key:0,viewBox:"0 0 24 24","aria-hidden":"true"},rVe={key:1,viewBox:"0 0 24 24","aria-hidden":"true"};function aVe(t,e,n,i,s,o){return n.filled?(v(),A("svg",oVe,[...e[0]||(e[0]=[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)])])):(v(),A("svg",rVe,[...e[1]||(e[1]=[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)])]))}const B2=ue(iVe,[["render",aVe]]),lVe={name:"ImageIcon"},cVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function uVe(t,e,n,i,s,o){return v(),A("svg",cVe,[...e[0]||(e[0]=[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),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),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)])])}const sU=ue(lVe,[["render",uVe]]),dVe={name:"PollIcon"},hVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function fVe(t,e,n,i,s,o){return v(),A("svg",hVe,[...e[0]||(e[0]=[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),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),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),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)])])}const pVe=ue(dVe,[["render",fVe]]),mVe={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)}}},gVe={class:"fcom_compose_app_form"},vVe={class:"fcom_app_header"},_Ve={class:"fcom_app_options"},yVe={class:"fcom_app_pref"},bVe={class:"fcom_app_footer"},wVe={style:{"font-weight":"500",color:"var(--el-text-color-regular)","font-size":"14px"}};function kVe(t,e,n,i,s,o){const r=He,a=ft,l=H("Plus"),c=be,u=Yt,d=Wd;return v(),A("div",gVe,[g("div",vVe,[g("h5",null,x(t.$t("Poll Options")),1),g("div",null,[_(r,{onClick:e[0]||(e[0]=h=>t.$emit("cancel")),size:"small",text:""},{default:w(()=>[N(x(t.$t("cancel")),1)]),_:1})])]),g("div",_Ve,[(v(!0),A(ee,null,we(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")},hs({_:2},[!h.slug&&f!==0?{name:"suffix",fn:w(()=>[_(r,{onClick:p=>o.removeOption(f),text:"",size:"small"},{default:w(()=>[...e[3]||(e[3]=[N("x",-1)])]),_:1},8,["onClick"])]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","placeholder"])]))),128)),g("div",yVe,[_(r,{onClick:o.addOption,text:"",size:"small"},{default:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1}),g("span",null,x(t.$t("Add More")),1)]),_:1},8,["onClick"])])]),g("div",bVe,[g("h5",null,x(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(()=>[N(x(t.$t("Users can choose multiple options")),1)]),_:1},8,["modelValue"])),e[4]||(e[4]=g("br",null,null,-1)),g("label",wVe,x(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 CVe=ue(mVe,[["render",kVe]]),xVe={name:"GiphyIcon"},SVe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function $Ve(t,e,n,i,s,o){return v(),A("svg",SVe,[...e[0]||(e[0]=[Ra('<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)])])}const AVe=ue(xVe,[["render",$Ve]]);var EVe=Fa,MVe=function(){return EVe.Date.now()},TVe=MVe,PVe=/\s/;function IVe(t){for(var e=t.length;e--&&PVe.test(t.charAt(e)););return e}var LVe=IVe,OVe=LVe,DVe=/^\s+/;function RVe(t){return t&&t.slice(0,OVe(t)+1).replace(DVe,"")}var VVe=RVe,FVe=G1,NVe=X1,BVe="[object Symbol]";function zVe(t){return typeof t=="symbol"||NVe(t)&&FVe(t)==BVe}var z2=zVe,HVe=VVe,uT=K1,UVe=z2,dT=0/0,jVe=/^[-+]0x[0-9a-f]+$/i,WVe=/^0b[01]+$/i,YVe=/^0o[0-7]+$/i,qVe=parseInt;function GVe(t){if(typeof t=="number")return t;if(UVe(t))return dT;if(uT(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=uT(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=HVe(t);var n=WVe.test(t);return n||YVe.test(t)?qVe(t.slice(2),n?2:8):jVe.test(t)?dT:+t}var XVe=GVe,KVe=K1,F3=TVe,hT=XVe,ZVe="Expected a function",JVe=Math.max,QVe=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(ZVe);e=hT(e)||0,KVe(n)&&(u=!!n.leading,d="maxWait"in n,o=d?JVe(hT(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?QVe(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=F3();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(F3())}function S(){var M=F3(),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 S.cancel=C,S.flush=$,S}var tFe=eFe;const nFe=vi(tFe),sFe={name:"Giphy",components:{GiphyIcon:AVe},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:nFe(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"},oFe={class:"search-container"},rFe=["onLoad","src","alt","onClick"],aFe={key:0,class:"img_loading"},lFe={key:1,class:"no_result"};function cFe(t,e,n,i,s,o){const r=ft,a=jd,l=Ud,c=H("GiphyIcon"),u=be,d=He,h=Yo,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":t.$t("Pick GIF"),text:"",onClick:o.handleGiphyClick},{default:w(()=>[_(u,{class:q(["fcom_apps_icon"])},{default:w(()=>[_(c)]),_:1})]),_:1},8,["aria-label","onClick"])]),default:w(()=>[Re((v(),A("div",oFe,[_(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,we(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,rFe),p.loaded?O("",!0):(v(),A("p",aFe))]),_:2},1024))),128))]),_:1})):(v(),A("p",lFe,x(t.$t("No results")),1))],32),e[2]||(e[2]=g("div",{class:"fcom_giphy_powered_by"},[g("span",{class:"powered_by"},"POWERED BY "),g("span",null,"GIPHY")],-1))])),[[f,s.loading]])]),_:1},512)])}const uFe=ue(sFe,[["render",cFe]]),dFe={name:"VideoIcon"},hFe={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function fFe(t,e,n,i,s,o){return v(),A("svg",hFe,[...e[0]||(e[0]=[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),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)])])}const pFe=ue(dFe,[["render",fFe]]),mFe={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"},vFe={key:0,class:"player-container"},_Fe=["innerHTML"];function yFe(t,e,n,i,s,o){const r=Nt;return v(),A("div",gFe,[s.html?(v(),A("div",vFe,[g("div",{innerHTML:s.html},null,8,_Fe)])):O("",!0),s.loading?(v(),D(r,{key:1,animated:"",rows:5})):O("",!0)])}const iU=ue(mFe,[["render",yFe],["__scopeId","data-v-f5d37d95"]]),bFe={name:"TuneIcon"},wFe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",fill:"none","aria-hidden":"true",focusable:"false"};function kFe(t,e,n,i,s,o){return v(),A("svg",wFe,[...e[0]||(e[0]=[g("path",{d:"M6 4v6M6 14v6M12 4v3M12 11v9M18 4v9M18 17v3",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round"},null,-1),g("path",{d:"M4 12h4M10 9h4M16 15h4",stroke:"currentColor","stroke-width":"1.6","stroke-linecap":"round"},null,-1)])])}const CFe=ue(bFe,[["render",kFe]]),xFe={name:"AudioList",components:{FluentPlayerPreview:iU,TuneIcon:CFe,Close:Bo},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}}},SFe={class:"fcom_audio_list"},$Fe={key:1,class:"fcom_audio_native_wrap"},AFe={class:"fcom_audio_native",controls:"",preload:"metadata"},EFe=["src","type"],MFe=["aria-label","onClick"],TFe=["aria-label","onClick"];function PFe(t,e,n,i,s,o){const r=H("fluent-player-preview"),a=H("tune-icon"),l=H("Close"),c=be;return v(),A("div",SFe,[(v(!0),A(ee,null,we(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",$Fe,[g("audio",AFe,[g("source",{src:o.audioUrl(u),type:o.audioType(u)},null,8,EFe)])])):(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,MFe),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,TFe)],64)):O("",!0)]))),128))])}const oU=ue(xFe,[["render",PFe]]),IFe={name:"MediaPreview",components:{Postcard:Sle,FluentPlayerPreview:iU,AudioList:oU},props:["feed","media_item","is_single"],data(){return{is_error:!1,isPlaying:!1,videoFailed:!1,fluentPlayerFailed:!1}},watch:{"media.url"(){this.fluentPlayerFailed=!1,this.videoFailed=!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(/&/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)}}},LFe={key:0,class:"feed_media feed_media_audio_list"},OFe={key:0},DFe={key:1},RFe=["innerHTML"],VFe={key:2,class:"native_audio_wrapper"},FFe=["preload"],NFe=["src","type"],BFe=["controls","preload","poster"],zFe=["src","type"],HFe={key:4,class:"native_video_wrapper"},UFe={key:1,class:"fcom_media_load_error"},jFe=["href"],WFe={key:0,class:"feed_media_image"},YFe={key:1,class:"feed_media_content"},qFe={class:"media_domain"},GFe={class:"feed_media_title"},XFe={key:0,class:"feed_media_description"},KFe={class:"feed_meta_desc"};function ZFe(t,e,n,i,s,o){const r=H("audio-list"),a=H("fluent-player-preview"),l=Wo,c=Nt;return o.audioMedias.length?(v(),A("div",LFe,[_(r,{feed:n.feed,audios:o.audioMedias},null,8,["feed","audios"])])):(v(),A("div",{key:1,class:q(["feed_media","feed_media_"+o.mediaWrapperType])},[o.isVideoMedia?(v(),A(ee,{key:0},[o.hasFluentPlayer&&o.isSupportedByFluentPlayer()&&!s.fluentPlayerFailed?(v(),A("div",OFe,[_(a,{media:o.playerMedia,onLoadFailed:e[0]||(e[0]=u=>s.fluentPlayerFailed=!0)},null,8,["media"])])):o.media.html?(v(),A("div",DFe,[g("div",{class:"feed_media_ext_video",innerHTML:o.media.html},null,8,RFe)])):o.media.url&&o.isAudioUrl(o.media.url)?(v(),A("div",VFe,[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,NFe)],8,FFe)])):o.media.url&&!s.videoFailed?(v(),A("div",{key:3,class:q(["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[2]||(e[2]=u=>s.isPlaying=!0),onPause:e[3]||(e[3]=(...u)=>o.onVideoPause&&o.onVideoPause(...u)),onEnded:e[4]||(e[4]=u=>s.isPlaying=!1)},[g("source",{src:o.media.url,type:o.getVideoType(o.media.url),onError:e[1]||(e[1]=u=>s.videoFailed=!0)},null,40,zFe)],40,BFe),s.isPlaying?O("",!0):(v(),A("div",{key:0,class:"native_video_overlay",onClick:e[5]||(e[5]=(...u)=>o.playVideo&&o.playVideo(...u))},[...e[7]||(e[7]=[g("div",{class:"native_play_button"},[g("svg",{viewBox:"0 0 24 24",fill:"currentColor"},[g("path",{d:"M8 5v14l11-7z"})])],-1)])]))],2)):o.media.url?(v(),A("div",HFe,[o.media.thumbnail?(v(),D(l,{key:0,src:o.media.thumbnail,alt:"",style:{width:"100%"}},null,8,["src"])):(v(),A("p",UFe,x(t.$t("This video could not be played.")),1))])):O("",!0)],64)):o.media.type=="image"||o.media.is_uploaded?(v(),A("div",{key:1,class:q(["feed_media_provider_"+o.media.provider,"feed_media_image feed_custom_uploaded"])},[o.media.image&&!s.is_error?(v(),D(l,{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:q("fcom_media_provider_"+o.media.provider),fit:"scale-down"},{placeholder:w(()=>[_(c,{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",WFe,[_(l,{onError:e[6]||(e[6]=u=>o.handleImageError()),style:{width:"100%"},src:o.media.image},{error:w(()=>[...e[8]||(e[8]=[g("span",null,null,-1)])]),_:1},8,["src"])])):O("",!0),o.media.title||o.media.url?(v(),A("div",YFe,[g("div",qFe,x(o.getDomainName(o.media.url)),1),g("div",GFe,x(t.getExcerpt(o.media.title||o.media.url,88)),1),o.media.description?(v(),A("div",XFe,[g("div",KFe,x(t.getExcerpt(o.media.description,160)),1)])):O("",!0)])):O("",!0)],8,jFe))],2))}const Ap=ue(IFe,[["render",ZFe],["__scopeId","data-v-de1ae8ac"]]),fT={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}},pT=[{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}],JFe={name:"FluentPlayerUploader",components:{UploadFilled:Z4},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 fT[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 fT[this.uploadKind].pattern.test(t.name||"")?!0:(this.$handleError(this.kindErrorMessage),!1)},async handleUrlSubmit(){if(!this.videoUrl)return;const t=pT.some(i=>i.name==="file"&&i.regex.test(this.videoUrl)),e=pT.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}}},QFe=["element-loading-text"],eNe={key:0,class:"upload-options"},tNe={class:"uploader-content"},nNe={class:"el-upload__text"},sNe={key:1,class:"url-input-section"};function iNe(t,e,n,i,s,o){const r=H("upload-filled"),a=be,l=He,c=Y1,u=ft,d=xt("loading");return Re((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",eNe,[_(c,{drag:"",class:q([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",tNe,[_(a,{class:"el-icon--upload"},{default:w(()=>[_(r)]),_:1}),g("div",nNe,[N(x(t.$t("Drop file here or"))+" ",1),g("em",null,x(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",{},()=>[N(x(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",sNe,[_(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(()=>[N(x(t.$t("Embed")),1)]),_:1},8,["onClick","loading"])]),_:1},8,["modelValue","placeholder"])]))],8,QFe)),[[d,s.processing]])}const oNe=ue(JFe,[["render",iNe]]),rNe={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:Ap,FluentPlayerUploader:oNe},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()}},aNe={key:0},lNe={key:0,class:"fcom_media_editor_actions"},cNe={key:1,class:"fcom_media_editor fcom_media_embeder"},uNe={key:0},dNe={key:1},hNe={key:2,class:"fcom_course_media"};function fNe(t,e,n,i,s,o){var f;const r=He,a=Hd,l=ws,c=ft,u=H("fluent-player-uploader"),d=H("media-preview"),h=xt("loading");return s.appReady?Re((v(),A("div",aNe,[n.has_iframe||o.hasUpload?(v(),A("div",lNe,[o.showPreview?(v(),D(r,{key:0,onClick:e[0]||(e[0]=p=>s.showInput=!0),size:"small",text:""},{default:w(()=>[N(x(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",hNe,[_(d,{media_item:n.media},null,8,["media_item"])])):(v(),A("div",cNe,[n.media.type=="iframe_html"&&n.has_iframe?(v(),A(ee,{key:0},[g("h3",null,x(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(()=>[N(x(t.$t("Embed")),1)]),_:1})],64)):(v(),A(ee,{key:1},[g("h3",null,x(o.editorTitle),1),o.hasFluentPlayerInstalled&&n.media.type==="upload"?(v(),A("p",uNe,x(o.uploadHint),1)):(v(),A("p",dNe,x(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(()=>[N(x(t.$t("Embed")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeydown","modelValue","placeholder"]))],64))]))])),[[h,s.fetching]]):O("",!0)}const hv=ue(rNe,[["render",fNe]]),pNe={name:"VideoEmbeder",emits:["embeded"],props:["is_admin","space"],components:{MediaEmbeder:hv,VideoIcon:pFe},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())}}},mNe={class:"fcom_video_embeder"};function gNe(t,e,n,i,s,o){const r=H("VideoIcon"),a=be,l=He,c=H("media-embeder"),u=$s;return v(),A("div",mNe,[_(l,{"aria-label":t.$t("Add Video"),text:"",onClick:o.show},{default:w(()=>[_(a,{class:q(["fcom_apps_icon"])},{default:w(()=>[_(r)]),_:1})]),_:1},8,["aria-label","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 vNe=ue(pNe,[["render",gNe]]),_Ne={name:"AudioEditModal",components:{ImageUploader:Ll,EditPen:dR,Delete:Jb},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}}}},yNe={class:"fcom_audio_edit"},bNe={id:"fcom_audio_name_label",class:"fcom_audio_edit__label"},wNe={class:"fcom_audio_edit__label"},kNe={class:"fcom_audio_edit__thumb_row"},CNe={class:"fcom_image_uploader_wrapper"},xNe={class:"fcom_sr_only"};function SNe(t,e,n,i,s,o){const r=ft,a=Wo,l=H("EditPen"),c=be,u=He,d=H("Delete"),h=H("image-uploader"),f=$s;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(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(u,{class:"fcom_primary_button",loading:s.saving,disabled:!s.localTitle||!s.localTitle.trim(),onClick:o.save},{default:w(()=>[N(x(t.$t("Save")),1)]),_:1},8,["loading","disabled","onClick"])]),default:w(()=>[g("div",yNe,[g("label",bNe,x(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",wNe,x(t.$t("Thumbnail")),1),g("div",kNe,[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",CNe,[_(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})},hs({remove:w(()=>[_(c,null,{default:w(()=>[_(d)]),_:1}),g("span",xNe,x(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})]),_:1},8,["loading","disabled","aria-label","title"])]),key:"0"}:void 0]),1032,["can_remove"])])])])]),_:1},8,["model-value","title"])}const $Ne=ue(_Ne,[["render",SNe]]),ANe={name:"MusicIcon"},ENe={width:"22",height:"22",viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",focusable:"false"};function MNe(t,e,n,i,s,o){return v(),A("svg",ENe,[...e[0]||(e[0]=[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),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),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)])])}const TNe=ue(ANe,[["render",MNe]]),PNe={name:"AudioUploadButton",components:{MusicIcon:TNe},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 INe(t,e,n,i,s,o){const r=H("MusicIcon"),a=be,l=He;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 LNe=ue(PNe,[["render",INe]]),ONe={name:"DocumentsUploader",components:{UploadFilled:Z4,Document:N1},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))}}},DNe={class:"fcom_documents_uploader"},RNe={class:"el-upload__text"},VNe={key:0},FNe={class:"fcom_document_lists"},NNe={class:"fcom_each_document"},BNe={class:"fcom_document_info"},zNe={class:"fcom_document_icon"},HNe={class:"fcom_document_title"},UNe={class:"fcom_document_actions"};function jNe(t,e,n,i,s,o){const r=H("UploadFilled"),a=be,l=Y1,c=H("Document"),u=He;return v(),A("div",DNe,[_(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",RNe,x(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",VNe,[g("div",FNe,[(v(!0),A(ee,null,we(o.uploadingFiles,d=>(v(),A("div",NNe,[g("div",BNe,[g("div",zNe,[_(a,null,{default:w(()=>[_(c)]),_:1})]),g("span",HNe,x(d.name),1)]),g("div",UNe,[_(u,{text:"",size:"small",loading:!0},{default:w(()=>[N(x(t.$t("Uploading...")),1)]),_:1})])]))),256))])])):O("",!0)])}const rU=ue(ONe,[["render",jNe]]),WNe={name:"PdfIcon"},YNe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function qNe(t,e,n,i,s,o){return v(),A("svg",YNe,[...e[0]||(e[0]=[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),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)])])}const GNe=ue(WNe,[["render",qNe]]),XNe={name:"ZipIcon"},KNe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function ZNe(t,e,n,i,s,o){return v(),A("svg",KNe,[...e[0]||(e[0]=[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),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),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),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)])])}const JNe=ue(XNe,[["render",ZNe]]),QNe={name:"AudioIcon"},eBe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function tBe(t,e,n,i,s,o){return v(),A("svg",eBe,[...e[0]||(e[0]=[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),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)])])}const nBe=ue(QNe,[["render",tBe]]),sBe={name:"DocIcon"},iBe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function oBe(t,e,n,i,s,o){return v(),A("svg",iBe,[...e[0]||(e[0]=[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),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)])])}const rBe=ue(sBe,[["render",oBe]]),aBe={name:"VideoFileIcon"},lBe={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"20",height:"20",color:"currentColor",fill:"none"};function cBe(t,e,n,i,s,o){return v(),A("svg",lBe,[...e[0]||(e[0]=[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),g("path",{d:"M12 2V7C12 8.10457 12.8954 9 14 9H19",stroke:"currentColor","stroke-width":"1.5","stroke-linejoin":"round"},null,-1),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)])])}const uBe=ue(aBe,[["render",cBe]]),dBe={name:"DocumentLists",components:{Document:N1,Download:Vae,PdfIcon:GNe,ImageIcon:sU,ZipIcon:JNe,AudioIcon:nBe,DocIcon:rBe,VideoFileIcon:uBe},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})}}},hBe={class:"fcom_document_lists"},fBe={class:"fcom_each_document"},pBe={class:"fcom_document_info"},mBe={class:"fcom_document_icon"},gBe={class:"fcom_document_ext"},vBe={class:"fcom_rename_actions"},_Be=["href"],yBe={class:"fcom_document_actions"},bBe=["href","aria-label"];function wBe(t,e,n,i,s,o){const r=be,a=ft,l=He,c=H("EditPen"),u=H("Download"),d=H("DeleteFilled"),h=xt("loading");return v(),A("div",hBe,[(v(!0),A(ee,null,we(n.document_lists,(f,p)=>(v(),A("div",fBe,[g("div",pBe,[g("div",mBe,[_(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)},hs({_:2},[o.getFileExtension(f.title)?{name:"suffix",fn:w(()=>[g("span",gBe,x(o.getFileExtension(f.title)),1)]),key:"0"}:void 0]),1032,["readonly","aria-label","modelValue"]),g("div",vBe,[_(l,{disabled:s.isSaving||!s.editingTitle.trim(),loading:s.isSaving,onClick:m=>o.saveDoc(f),type:"primary",size:"small"},{default:w(()=>[N(x(t.$t("Update")),1)]),_:1},8,["disabled","loading","onClick"]),_(l,{disabled:s.isSaving,onClick:o.cancelEdit,size:"small"},{default:w(()=>[N(x(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"},x(f.title),9,_Be))]),Re((v(),A("div",yBe,[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})]),_:1},8,["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,bBe)):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})]),_:1},8,["aria-label","onClick"])):O("",!0)])),[[h,s.isSaving]])]))),256))])}const fv=ue(dBe,[["render",wBe]]),kBe={name:"DocumentUploaderPop",components:{DocumentLists:fv,DocumentsUploader:rU,Document:N1},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="")}}},CBe={class:"fcom_inline_docs_form"},xBe={class:"fcom_doc_upload_modal"};function SBe(t,e,n,i,s,o){var c;const r=He,a=H("documents-uploader"),l=H("document-lists");return v(),A("div",CBe,[g("div",xBe,[_(r,{onClick:e[0]||(e[0]=u=>o.reset()),class:"fcom_file_cancel_btn",text:"",size:"small"},{default:w(()=>[N(x(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 $Be=ue(kBe,[["render",SBe]]),ABe={name:"PaperClipIcon"},EBe={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none"};function MBe(t,e,n,i,s,o){return v(),A("svg",EBe,[...e[0]||(e[0]=[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)])])}const TBe=ue(ABe,[["render",MBe]]),PBe=window.fluentComAdmin.auth,IBe={name:"FeedTextComposer",components:{AudioEditModal:$Ne,AudioList:oU,AudioUploadButton:LNe,PaperClipIcon:TBe,DocumentLists:fv,DocumentUploaderPop:$Be,Document:N1,MediaPreview:Ap,Giphy:uFe,ImageUploader:Ll,SurveyEditForm:CVe,MarkdownEditor:cu,EmojiPicker:UF,VideoEmbeder:vNe,ImageIcon:sU,PollIcon:pVe},emits:["editorCreated"],props:{placeholder:{type:String,default(){return"What's happening, "+PBe.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)},focusComposerAction(){var e,n,i;const t=((e=this.$refs.composerActions)==null?void 0:e.querySelector("button:not([disabled])"))||((i=(n=this.$refs.composerActions)==null?void 0:n.parentElement)==null?void 0:i.querySelector("button:not([disabled])"));t==null||t.focus()},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()})}},LBe={class:"fcom_text_composer"},OBe={class:"fcom_editor status_text_input"},DBe={key:1,class:"fcom_audio_compose_list"},RBe={key:2,style:{position:"relative","text-align":"center"}},VBe={key:3,class:"fcom_media_items"},FBe={key:0,class:"fcom_media_images"},NBe=["src","alt"],BBe={key:1,class:"fcrom_media_images"},zBe={class:"fcrom_media_image"},HBe=["src","alt"],UBe={key:4,class:"fcrom_media_images"},jBe=["src","alt"],WBe={key:5,class:"fcrom_media_images"},YBe={class:"fcrom_media_image"},qBe=["src","alt"],GBe={class:"fcom_composer_footer"},XBe={class:"fcom_composer_apps"},KBe={key:0},ZBe={ref:"composerActions",class:"fcom_composer_actions"};function JBe(t,e,n,i,s,o){var T,I,L,R,V,B,F,z,U,G,K;const r=H("MarkdownEditor"),a=H("DocumentUploaderPop"),l=H("SurveyEditForm"),c=H("audio-list"),u=H("audio-edit-modal"),d=He,h=H("media-preview"),f=H("CloseBold"),p=be,m=H("ImageIcon"),y=H("image-uploader"),b=H("video-embeder"),k=H("audio-upload-button"),C=H("PaperClipIcon"),$=H("PollIcon"),S=H("EmojiPicker"),M=H("Giphy"),P=xt("loading");return v(),A(ee,null,[g("div",LBe,[g("div",OBe,[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")}),onEditorEscape:o.focusComposerAction},null,8,["modelValue","context","is_modal","autofocus","placeholder","mentionQuery","defaultMentions","autofocus_changed","onInlineUpload","canAddImage","onHandleMediaUpload","onEditorEscape"]),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",DBe,[_(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",RBe,[_(d,{onClick:e[3]||(e[3]=X=>{n.content.media=null}),text:"",type:"danger"},{default:w(()=>[N(x(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",VBe,[(F=(B=n.content.meta)==null?void 0:B.media_items)!=null&&F.length?(v(!0),A(ee,{key:0},we(n.content.meta.media_items,(X,W)=>(v(),A("div",{key:W},[X.type=="image"?(v(),A("div",FBe,[g("img",{class:"fcom_media_image",src:X.url,alt:t.$t("Media image")},null,8,NBe),_(d,{"aria-label":t.$t("Remove image"),class:"fcom_media_images_cross_button",link:"",onClick:Q=>n.content.meta.media_items.splice(W,1)},{default:w(()=>[_(p,null,{default:w(()=>[_(f)]),_:1})]),_:1},8,["aria-label","onClick"])])):O("",!0)]))),128)):((U=(z=n.content.meta)==null?void 0:z.media_preview)==null?void 0:U.type)=="image"||(K=(G=n.content.meta)==null?void 0:G.media_preview)!=null&&K.image?(v(),A("div",BBe,[g("div",zBe,[g("img",{src:n.content.meta.media_preview.image,alt:t.$t("Media Preview image")},null,8,HBe),_(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",UBe,[(v(!0),A(ee,null,we(n.content.media_images,(X,W)=>(v(),A("div",{class:"fcrom_media_image",key:W},[g("img",{src:X.url,alt:t.$t("Media image")},null,8,jBe),_(d,{"aria-label":t.$t("Remove image"),link:"",onClick:Q=>n.content.media_images.splice(W,1)},{default:w(()=>[_(p,null,{default:w(()=>[_(f)]),_:1})]),_:1},8,["aria-label","onClick"])]))),128))])):o.checkHasImageForCommentsEdit(n.content)?(v(),A("div",WBe,[g("div",YBe,[g("img",{src:n.content.media.media_url,alt:t.$t("Media image")},null,8,qBe),_(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"),Re((v(),A("div",GBe,[g("div",XBe,[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":t.$t("Upload Media"),loading:s.uploading,text:""},{default:w(()=>[_(p,{class:"fcom_status_img_icon"},{default:w(()=>[_(m)]),_:1}),s.uploading?(v(),A("span",KBe,x(t.$t("Uploading...")),1)):O("",!0)]),_:1},8,["aria-label","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:q(["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":t.$t("Create Poll"),onClick:o.initSurveyForm,text:""},{default:w(()=>[_(p,{class:"fcom_apps_icon"},{default:w(()=>[_($)]),_:1})]),_:1},8,["aria-label","onClick"])):O("",!0),t.hasFeature("emoji_app")?(v(),D(S,{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",ZBe,[le(t.$slots,"default")],512)])),[[P,s.uploading]]),le(t.$slots,"after_composer_footer")],64)}const pv=ue(IBe,[["render",JBe]]),QBe={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()}},eze=["innerHTML"];function tze(t,e,n,i,s,o){const r=iF;return v(),A(ee,null,[g("div",{ref:"content",class:q(["feed_md_content",n.class_name]),innerHTML:n.content},null,10,eze),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 mv=ue(QBe,[["render",tze]]),nze={name:"CommentReacts",components:{UserRouteLink:la},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}))}}},sze={style:{"margin-left":"5px"}},ize={key:0},oze={key:1},rze={class:"fcom_user_lists"},aze={key:2};function lze(t,e,n,i,s,o){const r=Nt,a=H("UserAvatar"),l=H("UserRouteLink"),c=qs,u=Yo;return v(),D(u,{persistent:!1,placement:"bottom",title:t.$t("Likes"),width:210,trigger:"click","popper-class":"fcom_menu_below_nav",onShow:o.getReactions},{reference:w(()=>[g("span",sze,x(n.comment.reactions_count),1)]),default:w(()=>[s.loading?(v(),A("div",ize,[_(r,{animated:!0,rows:1})])):s.reactions?(v(),A("div",oze,[_(c,{"max-height":"300px"},{default:w(()=>[g("ul",rze,[(v(!0),A(ee,null,we(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",aze,[g("p",null,x(t.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const aU=ue(nze,[["render",lze]]),cze={name:"ImageCarousel",props:["feed","is_single"],data(){return{failedMedia:{}}},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}}},uze={class:"fcom_image_carousel"},dze={key:0},hze=["preload","poster"],fze=["src","type","onError"],pze={key:1,class:"fcom_media_load_error"},mze={key:1,class:"fcom_image_wrap"},gze={key:0,class:"fcom_image_overlay"};function vze(t,e,n,i,s,o){const r=Wo;return v(),A("div",uze,[g("div",{class:q([o.carouselClass+" "+n.feed.type,"fcom_image_carousel__container"])},[(v(!0),A(ee,null,we(o.visibleMedia,(a,l)=>(v(),A("div",{class:q(["fcom_carousel__image","fcom_media_type_"+a.type])},[a.type==="video"?(v(),A("div",dze,[s.failedMedia[a.url]?(v(),A("p",pze,x(t.$t("This video could not be played.")),1)):(v(),A("video",{key:0,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),onError:c=>s.failedMedia[a.url]=!0},null,40,fze)],8,hze))])):(v(),A("div",mze,[_(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",gze,"+"+x(o.overflowCount),1)):O("",!0)]))],2))),256))],2)])}const AS=ue(cze,[["render",vze]]),_ze={name:"ErrorIcon"},yze={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"};function bze(t,e,n,i,s,o){return v(),A("svg",yze,[...e[0]||(e[0]=[g("circle",{cx:"12",cy:"12",r:"10"},null,-1),g("line",{x1:"12",x2:"12",y1:"16",y2:"12"},null,-1),g("line",{x1:"12",x2:"12.01",y1:"8",y2:"8"},null,-1)])])}const wze=ue(_ze,[["render",bze]]),kze={name:"ReportReview",components:{ErrorIcon:wze},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)}},Cze={class:"fcom_feed_report_wrap"},xze={class:"fcom_feed_report_content"},Sze={key:0},$ze={key:1},Aze={key:2},Eze={class:"fcom_feed_report_action"};function Mze(t,e,n,i,s,o){const r=H("ErrorIcon"),a=He;return v(),A("div",Cze,[g("div",xze,[_(r),n.feed.meta.auto_flagged=="yes"?(v(),A("span",Sze,x(t.$t("This %s has been flagged automatically by the site rule.",n.type)),1)):n.feed.meta.reports_count>1?(v(),A("span",$ze,x(t.$t("This %1$s has been flagged with %2$s reports",n.type,n.feed.meta.reports_count)),1)):(v(),A("span",Aze,x(t.$t("This %1$s has been flagged with %2$s report",n.type,n.feed.meta.reports_count)),1))]),g("div",Eze,[_(a,{onClick:e[0]||(e[0]=l=>o.openReportDetails())},{default:w(()=>[N(x(t.$t("Review")),1)]),_:1})])])}const lU=ue(kze,[["render",Mze]]),Tze={name:"StickyIcon"},Pze={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"};function Ize(t,e,n,i,s,o){return v(),A("svg",Pze,[...e[0]||(e[0]=[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)])])}const cU=ue(Tze,[["render",Ize]]),Lze=80,Oze=20,Dze=5e3,H2={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"),Dze),setTimeout(()=>{const l=o.getBoundingClientRect();l.top>=Lze&&l.bottom<=window.innerHeight-Oze||o.scrollIntoView({behavior:"smooth",block:"center"})},50)}}},Rze={name:"SingleComment",mixins:[H2],components:{ImageCarousel:AS,FeedTextComposer:pv,MediaPreview:Ap,ReportReview:lU,StickyIcon:cU,FeedMdContent:mv,ActionPopover:oa},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(/ |\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"))}}},Vze={key:1,class:"person_avatar"},Fze={class:"comment_wrap"},Nze={key:0,class:"comment_text"},Bze={key:0,class:"comment_text_head"},zze={class:"comment_text_head_name"},Hze=["title"],Uze={key:0,class:"comment_text_head_status"},jze={class:"comment_actions"},Wze={key:2,class:"comment_text_media"},Yze={key:3,class:"comment_text_media"};function qze(t,e,n,i,s,o){const r=H("ReportReview"),a=H("UserAvatar"),l=H("UserRouteLink"),c=hi,u=H("StickyIcon"),d=be,h=He,f=H("MoreFilled"),p=H("ActionPopover"),m=H("FeedMdContent"),y=H("MediaPreview"),b=H("ImageCarousel"),k=H("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",Vze,[_(a,{with_level:!1,xprofile:n.comment.xprofile,is_rounded:!0},null,8,["xprofile"])])):O("",!0),Re((v(),A("div",Fze,[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(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(h,{class:"fcom_primary_button",onClick:e[3]||(e[3]=$=>o.updateComment(s.editingComment))},{default:w(()=>[N(x(t.$t("Update")),1)]),_:1})])]),_:1},8,["placeholder","content","autofocus_changed"])],32)):(v(),A("div",Nze,[n.show_header?(v(),A("div",Bze,[g("div",zze,[_(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"},x(t.humanDateDiff(n.comment.created_at)),9,Hze),n.comment.status=="pending"?(v(),A("div",Uze,[_(c,{type:"warning"},{default:w(()=>[N(x(t.$t("In Review")),1)]),_:1})])):O("",!0)]),g("div",jze,[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(...$))},x(s.expanded?t.$t("See less"):t.$t("See more")),1)):O("",!0),n.comment.meta.media_preview?(v(),A("div",Wze,[_(y,{media_item:n.comment.meta.media_preview},null,8,["media_item"])])):n.comment.meta.media_items?(v(),A("div",Yze,[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 U2=ue(Rze,[["render",qze]]),Gze={name:"IndividualCommentReply",mixins:[H2],components:{FeedTextComposer:pv,FeedMdContent:mv,HeartIcon:B2,SingleComment:U2,CommentReactions:aU},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()}},Xze={class:"fcom_course_comment each_comment"},Kze={key:0,class:"person_avatar"},Zze=["src","alt"],Jze={class:"comment_wrap"},Qze={class:"comment_text"},eHe={class:"comment_text_head"},tHe={class:"comment_text_head_name"},nHe=["title"],sHe={class:"reply_box"},iHe={class:"fcom_comments_react"},oHe={class:"child_comments"},rHe=["id"],aHe={class:"reply_box"},lHe=["onClick"],cHe={class:"fcom_comments_react fcom_reaction_list"},uHe={key:0,class:"child_reply_wrap"},dHe={class:"feed_commenting"},hHe={class:"person_avatar"},fHe=["src"],pHe={class:"feed_comment_input comment_text"};function mHe(t,e,n,i,s,o){const r=H("UserRouteLink"),a=H("FeedMdContent"),l=H("HeartIcon"),c=be,u=H("CommentReactions"),d=H("single-comment"),h=He,f=H("FeedTextComposer"),p=xt("loading");return v(),A("div",Xze,[s.replyingComment.xprofile?(v(),A("div",Kze,[g("img",{src:s.replyingComment.xprofile.avatar,alt:t.$t("avatar")},null,8,Zze)])):O("",!0),g("div",Jze,[g("div",Qze,[g("div",eHe,[g("div",tHe,[_(r,{xprofile:s.replyingComment.xprofile,show_follow:!0},null,8,["xprofile"]),g("div",{title:s.replyingComment.created_at,class:"comment_text_head_time"},x(t.humanDateDiff(s.replyingComment.created_at)),9,nHe)])]),_(a,{content:s.replyingComment.message_rendered,class_name:"comment_text_body"},null,8,["content"])]),g("div",sHe,[g("span",{onClick:e[0]||(e[0]=(...m)=>o.toggleCommentBox&&o.toggleCommentBox(...m)),class:"reply_btn"},x(t.$t("Post Comment")),1),g("span",{class:q([{fcom_is_liked:s.replyingComment.liked},"reply_btn"])},[g("div",iHe,[_(c,{role:"button",tabindex:"0","aria-label":t.$t("React"),"aria-pressed":!!s.replyingComment.liked,class:q({user_reacted:s.replyingComment.liked}),onClick:e[1]||(e[1]=m=>o.toggleLike(s.replyingComment)),onKeydown:[e[2]||(e[2]=ut(Ee(m=>o.toggleLike(s.replyingComment),["prevent"]),["enter"])),e[3]||(e[3]=ut(Ee(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",oHe,[(v(!0),A(ee,null,we(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",aHe,[g("span",{onClick:b=>o.toggleCommentBox(m),class:"reply_btn"},x(t.$t("Reply")),9,lHe),g("span",{class:q([{fcom_is_liked:m.liked},"reply_btn"])},[g("div",cHe,[_(c,{role:"button",tabindex:"0","aria-label":t.$t("React"),"aria-pressed":!!m.liked,class:q({user_reacted:m.liked}),onClick:b=>o.toggleLike(m),onKeydown:[ut(Ee(b=>o.toggleLike(m),["prevent"]),["enter"]),ut(Ee(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,rHe))),256))]),s.commenting?(v(),A("div",uHe,[g("div",dHe,[g("div",hHe,[g("img",{alt:"",src:t.auth.avatar},null,8,fHe)]),g("div",pHe,[_(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(()=>[Re((v(),D(h,{disabled:s.saving,class:"fcom_primary_button",onClick:e[4]||(e[4]=m=>o.postComment())},{default:w(()=>[N(x(t.$t("Post Comment")),1)]),_:1},8,["disabled"])),[[p,s.saving]])]),_:1},8,["mentionQuery","autofocus_changed","autofocus","disabled","placeholder","content"])])])])):O("",!0)])])}const gHe=ue(Gze,[["render",mHe]]),vHe={name:"CourseComments",props:["course"],components:{IndividualCommentReply:gHe,Pagination:uu,ChatIcon:nU,HeartIcon:B2,FeedMdContent:mv,ActionPopover:oa},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()}},_He={key:0,class:"white_loaded"},yHe={key:0,class:"fcom_course_comments_header"},bHe={class:"course_comments feed_comments overview_comments"},wHe={key:0,class:"person_avatar"},kHe={class:"comment_wrap"},CHe={class:"comment_text"},xHe={class:"comment_text_head"},SHe={class:"comment_text_head_name"},$He=["title"],AHe={class:"comment_actions"},EHe={class:"comment_text_details"},MHe=["href"],THe={class:"comment_text_actions"},PHe={key:0};function IHe(t,e,n,i,s,o){const r=Nt,a=H("UserAvatar"),l=H("UserRouteLink"),c=H("MoreFilled"),u=be,d=He,h=H("ActionPopover"),f=H("FeedMdContent"),p=H("ChatIcon"),m=H("HeartIcon"),y=H("pagination"),b=H("IndividualCommentReply"),k=Va,C=xt("loading");return s.loading?(v(),A("div",_He,[_(r,{row:5})])):(v(),A(ee,{key:1},[s.pagination.total?(v(),A("div",yHe,[g("h5",null,x(t.$t("Comments (%s)",s.pagination.total)),1)])):O("",!0),g("div",bHe,[(v(!0),A(ee,null,we(s.comments,($,S)=>(v(),A("div",{key:$.id,class:"fcom_course_comment each_comment"},[$.xprofile?(v(),A("div",wHe,[_(a,{with_level:!1,xprofile:$.xprofile},null,8,["xprofile"])])):O("",!0),g("div",kHe,[g("div",CHe,[g("div",xHe,[g("div",SHe,[_(l,{xprofile:$.xprofile},null,8,["xprofile"]),g("div",{title:$.created_at,class:"comment_text_head_time"},x(t.humanDateDiff($.created_at)),9,$He)]),Re((v(),A("div",AHe,[t.canDeleteComment($)?(v(),D(h,{key:0,placement:"bottom",width:200,items:[{label:t.$t("Delete"),type:"danger",action:()=>o.deleteComment($,S)}]},{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"])]),_:1},8,["items"])):O("",!0)])),[[C,s.working]])]),g("div",EHe,[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})},[N(x(t.$t("Commented in"))+" ",1),g("b",null,x(t.getExcerpt($.post.title,60)),1)],8,MHe)]),_(f,{content:$.message_rendered,class_name:"comment_text_body"},null,8,["content"]),g("div",THe,[_(d,{onClick:M=>o.initCommentReply($),text:""},{default:w(()=>[_(u,null,{default:w(()=>[_(p)]),_:1}),g("span",null,x(t.$t("Reply")),1)]),_:1},8,["onClick"]),_(d,{"aria-label":t.$t("React"),text:""},{default:w(()=>[_(u,{class:q({user_reacted:$.liked}),onClick:M=>o.toggleLike($)},{default:w(()=>[_(m,{filled:$.liked},null,8,["filled"])]),_:2},1032,["class","onClick"]),g("span",null,x($.reactions_count||""),1)]),_:2},1032,["aria-label"])])])])]))),128)),s.pagination.total?O("",!0):(v(),A("div",PHe,[g("h5",null,x(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,[N(x(t.$t("Replying to"))+" ",1),g("b",null,x(($=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"])):O("",!0)]),_:1},8,["modelValue","size"])],64))}const LHe=ue(vHe,[["render",IHe]]),OHe={name:"CourseOverview",props:["course","course_id"],components:{CourseComments:LHe}},DHe={class:"fcom_cards fcom_cards_2"},RHe={class:"fcom_card"},VHe={class:"fcom_card_body"},FHe={class:"fcom_card"},NHe={class:"fcom_card_body"};function BHe(t,e,n,i,s,o){const r=H("course-comments");return v(),A(ee,null,[g("div",DHe,[g("div",RHe,[g("div",VHe,[g("p",null,x(t.$t("Students")),1),g("h3",null,x(n.course.students_count),1)])]),g("div",FHe,[g("div",NHe,[g("p",null,x(t.$t("Average Completion Rate")),1),g("h3",null,x(n.course.overAllProgress)+"%",1)])])]),_(r,{course:n.course},null,8,["course"])],64)}const zHe=ue(OHe,[["render",BHe]]),HHe={name:"ContentLayout",props:["title","content_class","wrapper_class"]},UHe={key:0,class:"fhr_content_layout_header"},jHe=["aria-label"],WHe=["aria-label"];function YHe(t,e,n,i,s,o){return v(),A("div",{class:q([n.wrapper_class,"fhr_content_layout"])},[le(t.$slots,"header",{},()=>[n.title?(v(),A("div",UHe,[le(t.$slots,"title",{},()=>[g("h1",{role:"region","aria-label":t.$t("Page Title"),style:{cursor:"pointer"},onClick:e[0]||(e[0]=r=>t.$eventBus.emit("toTop")),class:"fhr_page_title"},x(n.title),9,jHe)]),g("div",{role:"region","aria-label":t.$t("Actions"),class:"fhr_page_actions"},[le(t.$slots,"actions")],8,WHe)])):O("",!0)]),le(t.$slots,"sub_header"),g("div",{class:q([n.content_class,"fhr_content_layout_body"])},[le(t.$slots,"default")],2)],2)}const _i=ue(HHe,[["render",YHe]]),qHe={name:"AppLayout",props:["wrapper_class"]},GHe={class:"feeds_main"};function XHe(t,e,n,i,s,o){const r=H("router-view");return v(),A("div",{class:q([n.wrapper_class,"feeds fcom_feeds"])},[g("div",GHe,[le(t.$slots,"before_route_view"),le(t.$slots,"default",{},()=>[_(r)]),le(t.$slots,"after_route_view")])],2)}const yi=ue(qHe,[["render",XHe]]),KHe={name:"EditCourseRoute",components:{AppLayout:yi,Layout:_i},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")}]}},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})},goToSettings(){this.$router.push({name:"course_settings_general",params:{course_id:this.course_id}})},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.$router.replace({name:"course_settings_general",params:{course_id:this.course_id}})}},ZHe={class:"object_menu"},JHe={class:"fcom_space_menu_ul"},QHe={key:0},eUe={class:"actions_items"},tUe={key:0,class:"white_loaded"},nUe={key:2};function sUe(t,e,n,i,s,o){const r=_de,a=vde,l=H("router-link"),c=H("MoreFilled"),u=be,d=He,h=Yo,f=Nt,p=H("router-view"),m=H("layout"),y=H("app-layout");return v(),D(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(()=>[N(x(t.$t("Courses")),1)]),_:1}),s.course.id?(v(),D(r,{key:0},{default:w(()=>[N(x(s.course.title)+" ",1),t.hasCourseCreatorAccess()?(v(),A("span",{key:0,class:"fcom_edit_course fcom_secondary_button clickable",onClick:e[0]||(e[0]=b=>o.goToSettings())},x(t.$t("Edit Info")),1)):O("",!0)]),_:1})):O("",!0)]),_:1})]),actions:w(()=>[g("div",ZHe,[g("ul",JHe,[(v(!0),A(ee,null,we(o.computedMenuItems,b=>(v(),A("li",{key:b.name,class:q("course_inner_menu_"+b.name)},[_(l,{to:{name:b.route,params:{course_id:s.course.id}}},{default:w(()=>[N(x(b.title),1)]),_:2},1032,["to"])],2))),128)),t.hasCourseCreatorAccess()?(v(),A("li",QHe,[_(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",eUe,[g("li",{onClick:e[1]||(e[1]=b=>o.toViewCourse())},x(t.$t("View Course")),1),g("li",{onClick:e[2]||(e[2]=()=>{t.$refs.course_actions.hide(),o.goToSettings()})},x(t.$t("Edit Course")),1),g("li",{onClick:e[3]||(e[3]=(...b)=>o.initDuplicateCourse&&o.initDuplicateCourse(...b))},x(t.$t("Duplicate Course")),1),g("li",{onClick:e[4]||(e[4]=(...b)=>o.initDeleteCourse&&o.initDeleteCourse(...b))},x(t.$t("Delete Course")),1)])]),_:1},512)])):O("",!0)])])]),default:w(()=>[s.loading?(v(),A("div",tUe,[_(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",nUe,[g("h3",null,x(t.$t("Sorry, the course cannot be loaded")),1)]))]),_:1},8,["title"])]),_:1})}const iUe=ue(KHe,[["render",sUe]]),oUe={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},handle:{type:String,default:""}},emits:["drop","crossDrop","drag-start"],data(){return{draggingIndex:null,startIndex:null,snapshotBeforeDrag:null,handleIndex:null}},computed:{keyboardEnabled(){return this.keyboard&&this.draggable}},methods:{isItemDraggable(t){return this.draggable?this.handle?this.handleIndex===t:!0:!1},onItemMouseDown(t,e){var n,i;!this.handle||!this.draggable||(this.handleIndex=(i=(n=t.target)==null?void 0:n.closest)!=null&&i.call(n,this.handle)?e:null)},releaseHandle(){this.handleIndex=null},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.handleIndex=null,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.handleIndex=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)}}},rUe=["onDragstart","onDragover","onDrop","onKeydown","onMousedown","draggable","tabindex","aria-label"];function aUe(t,e,n,i,s,o){return v(),A("div",{class:"drag-container",onDragover:e[2]||(e[2]=Ee((...r)=>o.onContainerDragOver&&o.onContainerDragOver(...r),["prevent"])),onDrop:e[3]||(e[3]=Ee((...r)=>o.onContainerDrop&&o.onContainerDrop(...r),["prevent"]))},[_(Eb,{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,we(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:Ee(l=>o.dragOver(l,a),["prevent"]),onDrop:Ee(l=>o.dropEnd(l,a),["prevent"]),onKeydown:l=>o.onItemKeydown(l,a),onMousedown:l=>o.onItemMouseDown(l,a),onMouseup:e[1]||(e[1]=(...l)=>o.releaseHandle&&o.releaseHandle(...l)),draggable:o.isItemDraggable(a),tabindex:o.keyboardEnabled?0:null,"aria-label":o.keyboardEnabled?o.itemAriaLabel(r,a):null,class:q(["drag-item",n.itemClass,{dragging:s.draggingIndex===a}]),style:Xe(n.itemStyle)},[le(t.$slots,"item",{data:r,index:a},void 0,!0)],46,rUe))),128))]),_:3},8,["style"])],32)}const za=ue(oUe,[["render",aUe],["__scopeId","data-v-5e8fd425"]]),lUe={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)}},cUe={class:"fcom_block_editor"};function uUe(t,e,n,i,s,o){const r=Nt;return v(),A("div",cUe,[Re(g("div",null,[g("textarea",{ref:"block_editor",id:"fcom_block_editor",name:"block_editor"}," "+x(s.html)+` | |
| 132 | + `,513)],512),[[jt,s.all_loaded]]),s.all_loaded?O("",!0):(v(),D(r,{key:0,class:"white_loaded",rows:7,animated:!0}))])}const uU=ue(lUe,[["render",uUe]]),dUe={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||"")}},hUe={class:"fcom_length_input"};function fUe(t,e,n,i,s,o){const r=ft;return v(),A("div",hUe,[_(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(()=>[N(x(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(()=>[N(x(t.$t("sec")),1)]),_:1},8,["modelValue","onChange"])])}const pUe=ue(dUe,[["render",fUe]]),mUe={name:"LessonDocuments",components:{DocumentLists:fv,DocumentsUploader:rU},props:["lesson"],methods:{fileAdded(t){this.lesson.meta.document_ids=this.lesson.meta.document_lists||[],this.lesson.meta.document_lists.push(t)}}},gUe={class:"fcom_meta_section fcom_lesson_documents_form"},vUe={class:"fcom_meta_label"},_Ue={style:{"font-size":"90%",padding:"0px",margin:"0 0 15px","line-height":"120%"}},yUe={key:0,class:"fcom_lesson_documents_list"},bUe={key:1,class:"fcom_lesson_documents_list"};function wUe(t,e,n,i,s,o){const r=H("documents-uploader"),a=H("document-lists");return v(),A("div",gUe,[g("div",vUe,x(t.$t("Documents & Files")),1),g("p",_Ue,x(t.$t("These files will be available to your students to view and download")),1),t.has_pro?(v(),A("div",yUe,[_(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",bUe,[g("p",null,x(t.$t("You need to upgrade to Pro to upload documents")),1)]))])}const dU=ue(mUe,[["render",wUe]]),kUe={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 CUe(t,e,n,i,s,o){const r=Wo,a=He,l=Y1,c=H("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(()=>[N(x(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 gv=ue(kUe,[["render",CUe]]),xUe={name:"CourseMeta",components:{LessonDocuments:dU,MediaEmbeder:hv,LengthInput:pUe,BgImageUpload:gv},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"}}},SUe={class:"fcom_course_meta"},$Ue={class:"fcom_meta_section"},AUe={class:"fcom_meta_label"},EUe={class:"fcom_meta_content"},MUe={key:2,class:"checkbox_with_tooltip"},TUe={key:0},PUe={key:1,class:"checkbox_with_tooltip"},IUe={key:0,class:"fcom_meta_section"},LUe={key:0,class:"fcom_meta_content"},OUe={class:"fcom_meta_label"},DUe={class:"fcom_meta_content"},RUe={key:1,class:"fcom_meta_section"},VUe={class:"fcom_meta_label"},FUe={class:"fcom_edit_lesson_documents"};function NUe(t,e,n,i,s,o){var y;const r=Yt,a=H("InfoFilled"),l=be,c=Ss,u=ft,d=H("media-embeder"),h=H("length-input"),f=H("BgImageUpload"),p=en,m=H("LessonDocuments");return v(),A("div",SUe,[g("div",$Ue,[g("div",AUe,x(t.$t("Features Settings")),1),g("div",EUe,[_(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(()=>[N(x(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(()=>[N(x(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(()=>[N(x(t.$t("Enable Comments")),1)]),_:1},8,["modelValue"])),n.quiz_meta?O("",!0):(v(),A("div",MUe,[_(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(()=>[N(x(t.$t("Free Preview Lesson"))+" ",1),t.has_pro?O("",!0):(v(),A("span",TUe,"("+x(t.$t("Available on Pro"))+")",1))]),_:1},8,["modelValue","disabled"]),_(c,{class:"box-item",effect:"dark",placement:"right-end"},{content:w(()=>[N(x(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(()=>[N(x(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(()=>[...e[9]||(e[9]=[N("%",-1)])]),_:1},8,["modelValue"])):O("",!0),o.enablePassingScore?(v(),A("div",PUe,[_(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(()=>[N(x(t.$t("Enforce pass to continue")),1)]),_:1},8,["modelValue"]),_(c,{class:"box-item",effect:"dark",placement:"right-end"},{content:w(()=>[N(x(t.$t("If enabled, members will have to achieve a minimum score before")),1),e[10]||(e[10]=g("br",null,null,-1)),N(" "+x(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(()=>[N(x(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",IUe,[o.isFluentPlayerMedia?(v(),A("div",LUe,[g("p",null,x(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",OUe,x(t.$t("Lesson Duration")),1),g("div",DUe,[_(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",RUe,[g("div",VUe,x(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",FUe,[_(m,{lesson:n.lesson},null,8,["lesson"])])])}const hU=ue(xUe,[["render",NUe]]),BUe={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,loadTimer:null,readyTimer:null}},computed:{hasFailed(){return!this.dataSent&&this.isFailing}},mounted(){this.loadTimer=setTimeout(this.markEditorFailed,3e4),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.clearFailureTimers(),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.onload=()=>{clearTimeout(this.loadTimer),this.loadTimer=null,!(this.dataSent||this.readyTimer)&&(this.readyTimer=setTimeout(this.markEditorFailed,15e3))},this.editorFrame.onerror=this.markEditorFailed,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")},markEditorFailed(){this.clearFailureTimers(),this.dataSent||(this.isFailing=!0)},clearFailureTimers(){clearTimeout(this.loadTimer),clearTimeout(this.readyTimer),this.loadTimer=null,this.readyTimer=null},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"&&(this.clearFailureTimers(),this.isFailing=!1,this.sendDataToEditor())}}},zUe={key:0,style:{display:"flex","justify-content":"center","align-items":"center","column-gap":"10px"}},HUe=["element-loading-text"];function UUe(t,e,n,i,s,o){const r=He,a=Nt,l=xt("loading");return v(),A(ee,null,[o.hasFailed?(v(),A("div",zUe,[g("p",null,x(t.$t("Problem with loading the editor?")),1),_(r,{onClick:e[0]||(e[0]=c=>o.editorFailed())},{default:w(()=>[N(x(t.$t("Use Alternative Editor")),1)]),_:1})])):O("",!0),Re((v(),A("div",{"element-loading-text":t.$t("Loading editor. Please wait..."),class:"editor-container"},[!s.dataSent&&!o.hasFailed?(v(),D(a,{key:0,style:{margin:"50px"},animated:!0,rows:2})):O("",!0),g("div",{ref:"iframeContainer",class:q(["iframe-container",{"is-hidden":o.hasFailed}])},null,2)],8,HUe)),[[l,!s.dataSent&&!o.hasFailed]])],64)}const ES=ue(BUe,[["render",UUe],["__scopeId","data-v-1796445f"]]),jUe={name:"LessonEditor",props:["lesson","section","course","editingIndex"],emits:["saved","close","changeLesson"],components:{LessonDocuments:dU,BlockEditor:uU,MediaEmbeder:hv,LessonMeta:hU,FullEditorFrame:ES},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")}},WUe={class:"fcom_full_editor"},YUe={class:"fcom_full_editor_header"},qUe=["aria-label"],GUe={class:"fcom_desktop_only"},XUe={key:0},KUe={class:"full_editor_actions"},ZUe={class:"fcom_lesson_camp"},JUe={class:"fcom_lesson_nav"},QUe=["title","href"],eje={style:{padding:"20px"}},tje={class:"fcom_lesson_content"},nje={key:0},sje={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},ije={class:"fcom_lesson_title"},oje={class:"fcom_documents_dialog_footer"};function rje(t,e,n,i,s,o){const r=H("ArrowLeft"),a=be,l=He,c=H("ArrowRight"),u=H("arrow-down"),d=$r,h=Ar,f=Sr,p=H("View"),m=j1,y=H("lesson-meta"),b=qs,k=U1,C=ft,$=H("block-editor"),S=H("FullEditorFrame"),M=jo,P=H1,T=H("LessonDocuments"),I=$s,L=xt("loading");return v(),A("div",WUe,[_(P,null,{default:w(()=>[_(m,{class:"fcom_full_editor_header_wrap"},{default:w(()=>[g("div",YUe,[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",GUe,x(t.$t("Back to Lessons")),1),n.course&&n.course.title?(v(),A("span",XUe,"("+x(n.course.title)+")",1)):O("",!0)],8,qUe),g("div",KUe,[g("div",ZUe,[g("div",null,x(t.$t("Lesson %1$s of %2$s - %3$s",n.editingIndex+1,n.section.lessons.length,n.section.title)),1),g("div",JUe,[_(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,x(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(()=>[N(x(t.$t("Draft")),1)]),_:1}),_(d,{command:"published"},{default:w(()=>[N(x(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[_(l,{type:n.lesson.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:w(()=>[N(x(t.$labelize(n.lesson.status))+" ",1),_(a,{class:"el-icon--right"},{default:w(()=>[_(u)]),_:1})]),_:1},8,["type"])]),_:1}),Re((v(),D(l,{style:{"margin-left":"15px"},disabled:s.saving,onClick:o.saveData,class:"fcom_primary_button"},{default:w(()=>[N(x(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,QUe)])])]),_:1}),_(P,{class:"fcom_full_editor_container fcom_lesson_editor_full"},{default:w(()=>[s.useClassic?Re((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",eje,[_(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,x(t.$t("Close")),1)]),_:1})):O("",!0)])]),_:1})]),_:1},512)),[[jt,s.showSideBar||!t.isMobile]]):O("",!0),_(M,{style:{overflow:"hidden",padding:"0"},class:"fcom_full_editor_main"},{default:w(()=>[O("",!0),g("div",tje,[s.useClassic?(v(),A("div",nje,[_(b,{height:"calc(100vh - 60px)",class:"fcom_lesson_editor_scroll"},{default:w(()=>[g("div",sje,[g("div",ije,[g("label",null,x(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,x(t.$t("Lesson Content")),1),_($,{modelValue:n.lesson.message,"onUpdate:modelValue":e[8]||(e[8]=R=>n.lesson.message=R)},null,8,["modelValue"])])]),_:1})])):(v(),D(S,{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","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",oje,[_(l,{type:"primary",onClick:e[14]||(e[14]=R=>s.showDocumentsModal=!1)},{default:w(()=>[N(x(t.$t("Done")),1)]),_:1})])]),default:w(()=>[_(T,{lesson:n.lesson},null,8,["lesson"])]),_:1},8,["modelValue","title","onClosed"])])}const fU=ue(jUe,[["render",rje]]),aje={name:"LessonLine",emits:["showEditor","updated","deleteLesson","moveLesson","duplicateLesson"],props:["course","sections","lesson"],components:{LessonEditor:fU,SlugInput:Yd},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")})}}},lje={key:0,class:"fcom_heading_item"},cje=["innerHTML"],uje={class:"fcom_section_item_actions"},dje={class:"fcom_action_lesson"},hje={class:"fcom_move_popup_close"},fje={class:"fcom_move_popup_close"};function pje(t,e,n,i,s,o){const r=hi,a=He,l=ft,c=H("arrow-down"),u=be,d=$r,h=Ar,f=Sr,p=H("MoreFilled"),m=sn,y=Jt,b=en,k=tn,C=H("Close"),$=H("slug-input");return v(),A(ee,null,[g("div",{class:q([{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(S=>s.editing_title=!1,["esc"])),ref:"lesson_title_edit",onKeyup:ut(o.updateLessonTitle,["enter"]),modelValue:n.lesson.title,"onUpdate:modelValue":e[2]||(e[2]=S=>n.lesson.title=S)},{append:w(()=>[_(a,{onClick:o.updateLessonTitle},{default:w(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick"])]),_:1},8,["onKeyup","modelValue"])):(v(),A("p",lje,[g("span",{onClick:e[0]||(e[0]=S=>t.$emit("showEditor",n.lesson)),innerHTML:n.lesson.title},null,8,cje),o.isQuizType?(v(),D(r,{key:0},{default:w(()=>[N(x(t.$t("quiz")),1)]),_:1})):O("",!0)]))],2),g("div",uje,[_(a,{onClick:e[3]||(e[3]=S=>t.$emit("showEditor",n.lesson)),class:"fcom_show_hover",text:""},{default:w(()=>[N(x(o.isQuizType?t.$t("Edit Quiz"):t.$t("Edit Lesson")),1)]),_:1}),_(f,{onCommand:e[4]||(e[4]=S=>{o.updateLessonStatus(S)}),trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"draft"},{default:w(()=>[N(x(t.$t("Draft")),1)]),_:1}),_(d,{command:"published"},{default:w(()=>[N(x(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[_(a,{class:q(["el-dropdown-link",`fcom_button_${n.lesson.status==="published"?"success":"info"}`]),bg:"",text:""},{default:w(()=>[N(x(t.$labelize(n.lesson.status))+" ",1),_(u,{class:"el-icon--right"},{default:w(()=>[_(c)]),_:1})]),_:1},8,["class"])]),_:1}),g("div",dje,[_(f,{onCommand:o.handleLessonAction,trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"edit_lesson"},{default:w(()=>[N(x(t.$t("Edit Content")),1)]),_:1}),_(d,{command:"edit_title"},{default:w(()=>[N(x(t.$t("Edit Title")),1)]),_:1}),_(d,{command:"edit_slug"},{default:w(()=>[N(x(t.$t("Edit Slug")),1)]),_:1}),_(d,{command:"preview_lesson"},{default:w(()=>[N(x(o.menuLabels.preview),1)]),_:1}),_(d,{command:"move_lesson"},{default:w(()=>[N(x(o.menuLabels.move),1)]),_:1}),_(d,{command:"duplicate_lesson"},{default:w(()=>[N(x(o.menuLabels.duplicate),1)]),_:1}),_(d,{command:"delete"},{default:w(()=>[N(x(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"]),Re(g("div",{class:q(["fcom_action_lesson_popup","lesson_"+n.lesson.id])},[_(k,{onSubmit:e[6]||(e[6]=Ee(S=>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]=S=>s.selectedSectionId=S)},{default:w(()=>[(v(!0),A(ee,null,we(o.filteredSections,S=>(v(),D(m,{key:S.id,label:S.title,value:S.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(()=>[N(x(o.menuLabels.move),1)]),_:1},8,["onClick","disabled"])]),_:1}),g("div",hje,[_(u,{onClick:e[7]||(e[7]=S=>s.showMoveLessonPopup=!1)},{default:w(()=>[_(C)]),_:1})])],2),[[jt,s.showMoveLessonPopup]]),Re(g("div",{class:q(["fcom_edit_slug_popup","lesson_"+n.lesson.id])},[_(k,{onSubmit:e[9]||(e[9]=Ee(S=>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]=S=>n.lesson.slug=S),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(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick"])]),_:1}),g("div",fje,[_(u,{onClick:e[10]||(e[10]=S=>s.editingSlugPopup=!1)},{default:w(()=>[_(C)]),_:1})])],2),[[jt,s.editingSlugPopup]])])])],64)}const mje=ue(aje,[["render",pje]]),gje={name:"AddQuestionModal",components:{CrepeEditor:cu,BgImageUpload:gv,FluentDnD:za},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:Pi(Jb),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})}},vje={class:"dialog_header"},_je={class:"dialog_left"},yje={class:"dialog_body"},bje={key:0,class:"fcom_banner_image_holder"},wje={key:1,class:"fcom_banner_image_preview"},kje=["aria-label"],Cje=["aria-checked","onClick","onKeydown"],xje={class:"fcom_choice_btn"},Sje={class:"fcom_help_text"},$je={class:"sub_label"},Aje={class:"fcom_question_option"},Eje={class:"dialog_footer"},Mje={key:0};function Tje(t,e,n,i,s,o){const r=eu,a=H("BgImageUpload"),l=Wo,c=H("CloseBold"),u=be,d=He,h=en,f=H("crepe-editor"),p=Li,m=ws,y=z1e,b=Yt,k=ft,C=k8,$=H("FluentDnD"),S=tn,M=$s;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",vje,[g("div",_je,[g("h4",null,x(o.isNewQuestion?t.$t("Add Question"):t.$t("Edit Question")),1)])])]),footer:w(()=>[g("div",Eje,[_(d,{class:"fcom_secondary_button",onClick:o.requestClose},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["onClick"]),o.isNewQuestion?(v(),D(d,{key:0,class:"fcom_primary_button",onClick:o.addQuestion},{default:w(()=>[N(x(t.$t("Add Question")),1)]),_:1},8,["onClick"])):(v(),D(d,{key:1,class:"fcom_primary_button",onClick:o.updateQuestion},{default:w(()=>[N(x(t.$t("Update Question"))+" ",1),t.has_pro?O("",!0):(v(),A("span",Mje," ("+x(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"]))])]),default:w(()=>[g("div",yje,[_(S,{onSubmit:e[8]||(e[8]=Ee(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",bje,[g("h4",null,x(t.$t("Banner Image")),1),g("p",null,x(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",wje,[_(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,we(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(Ee(T=>s.questionData.type=P.value,["prevent"]),["enter"]),ut(Ee(T=>s.questionData.type=P.value,["prevent"]),["space"])],class:q({fcom_choice:!0,fcom_choice_active:s.questionData.type==P.value})},[g("div",xje,[g("p",null,x(t.$t(P.label)),1)])],42,Cje))),128))],8,kje)]),_: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(()=>[N(x(t.$t("Open (any answer accepted)")),1)]),_:1}),_(p,{value:"exact_match"},{default:w(()=>[N(x(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",Sje,[g("p",null,x(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",$je,x(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",Aje,[e[10]||(e[10]=g("div",{class:"fcom_drag_handle fcom_option_drag","aria-hidden":"true"},"⋮⋮",-1)),_(b,{modelValue:P.is_correct,"onUpdate:modelValue":I=>P.is_correct=I,onChange:I=>o.checkOption(P),class:q({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(()=>[N(x("+ "+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(()=>[N(x(t.$t("Enable this question")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1},8,["model"])])]),_:1},8,["modelValue","width","before-close"])}const Pje=ue(gje,[["render",Tje]]),Ije={name:"QuizEditor",props:["lesson","section","course","editingIndex"],emits:["close","changeLesson","saved"],components:{LessonMeta:hU,CrepeEditor:cu,AddQuestionModal:Pje,FluentDnD:za,ActionPopover:oa},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(` | |
| 133 | +`),s=n.replace(/\s*\(Copy(?:\s+\d+)?\)\s*$/,""),o=l=>[s+(l>1?` (Copy ${l})`:" (Copy)"),...i].join(` | |
| 134 | +`);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})}},Lje={class:"fcom_full_editor"},Oje={class:"fcom_full_editor_header"},Dje=["aria-label"],Rje={class:"fcom_desktop_only"},Vje={key:0},Fje={class:"full_editor_actions"},Nje={class:"fcom_lesson_camp"},Bje={class:"fcom_lesson_nav"},zje=["title","href"],Hje={class:"fcom_lesson_content"},Uje={class:"fcom_quiz_editor"},jje={key:1,class:"fcom_questions_wrap"},Wje=["id"],Yje={key:0,class:"fcom_question_image"},qje={class:"fcom_question_header"},Gje=["aria-label","onClick","onKeydown"],Xje=["innerHTML"],Kje={key:1},Zje={class:"fcom_question_actions"},Jje={class:"fcom_question_body"},Qje={class:"fcom_question_option"},eWe={key:0,class:"question_help_text"},tWe={key:1,class:"fcom_meta_sorting"},nWe={key:2,class:"fcom_banner_image_holder add_quiz_banner"},sWe={key:0},iWe={key:0},oWe={style:{padding:"20px"}};function rWe(t,e,n,i,s,o){const r=H("ArrowLeft"),a=be,l=He,c=H("ArrowRight"),u=H("arrow-down"),d=$r,h=Ar,f=Sr,p=H("View"),m=j1,y=ft,b=H("crepe-editor"),k=Wo,C=H("action-popover"),$=Yt,S=H("FluentDnD"),M=H("Top"),P=H("Bottom"),T=qs,I=jo,L=H("lesson-meta"),R=U1,V=H("AddQuestionModal"),B=H1,F=xt("loading");return v(),A("div",Lje,[_(B,null,{default:w(()=>[_(m,{class:"fcom_full_editor_header_wrap"},{default:w(()=>{var z;return[g("div",Oje,[g("button",{type:"button",onClick:e[0]||(e[0]=U=>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",Rje,x(t.$t("Back to Lessons")),1),(z=n.course)!=null&&z.title?(v(),A("span",Vje,"("+x(n.course.title)+")",1)):O("",!0)],8,Dje),g("div",Fje,[g("div",Nje,[g("div",null,x(t.$t("Lesson %1$s of %2$s - %3$s",n.editingIndex+1,n.section.lessons.length,n.section.title)),1),g("div",Bje,[_(l,{onClick:e[1]||(e[1]=U=>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]=U=>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]=U=>s.showSideBar=!s.showSideBar)},{default:w(()=>[g("span",null,x(t.$t("Features")),1)]),_:1})):O("",!0),_(f,{onCommand:e[4]||(e[4]=U=>{n.lesson.status=U}),trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"draft"},{default:w(()=>[N(x(t.$t("Draft")),1)]),_:1}),_(d,{command:"published"},{default:w(()=>[N(x(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[_(l,{type:n.lesson.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:w(()=>[N(x(t.$labelize(n.lesson.status))+" ",1),_(a,{class:"el-icon--right"},{default:w(()=>[_(u)]),_:1})]),_:1},8,["type"])]),_:1}),Re((v(),D(l,{style:{"margin-left":"15px"},disabled:s.saving,onClick:o.saveData,class:"fcom_primary_button"},{default:w(()=>[N(x(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,zje)])])]}),_:1}),_(B,{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",Hje,[_(T,{height:"calc(100vh - 60px)",class:"fcom_lesson_editor_scroll"},{default:w(()=>{var z,U,G,K;return[g("div",Uje,[_(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),(U=(z=n.lesson.meta)==null?void 0:z.quiz_questions)!=null&&U.length?(v(),A("div",jje,[(v(!0),A(ee,null,we(n.lesson.meta.quiz_questions,(X,W)=>(v(),A("div",{key:X.slug,id:"fcom_question_"+X.slug,class:q(["fcom_question",[X.type,{disabled:!X.enabled}]])},[o.showQuestionImage(X)?(v(),A("div",Yje,[_(k,{src:X.image_url},null,8,["src"])])):O("",!0),g("div",qje,[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(Ee(Q=>o.openEditQuestionModal(X),["prevent"]),["space"])]},[X.label_rendered?(v(),A("span",{key:0,innerHTML:X.label_rendered},null,8,Xje)):(v(),A("span",Kje,x(X.label||t.$t("Untitled question")),1))],40,Gje),g("div",Zje,[_(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",Jje,[_(S,{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",Qje,[e[8]||(e[8]=g("div",{class:"fcom_drag_handle fcom_option_drag","aria-hidden":"true"},"⋮⋮",-1)),_($,{modelValue:Q.is_correct,"onUpdate:modelValue":ne=>Q.is_correct=ne,onChange:ne=>o.checkAndSaveQuestion(X,Q),class:q({single_choice:X.type=="single_choice"})},{default:w(()=>[N(x(Q.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange","class"])])]),_:2},1032,["items","onDrop"]),X.help_text?(v(),A("div",eWe,x(X.help_text),1)):O("",!0)]),o.showMoving?(v(),A("div",tWe,[_(a,{role:"button",tabindex:W===0?-1:0,"aria-disabled":W===0,"aria-label":t.$t("Move question up"),onClick:Q=>o.moveUp(W),onKeydown:[ut(Q=>o.moveUp(W),["enter"]),ut(Ee(Q=>o.moveUp(W),["prevent"]),["space"])]},{default:w(()=>[_(M)]),_:1},8,["tabindex","aria-disabled","aria-label","onClick","onKeydown"]),_(a,{role:"button",tabindex:W===n.lesson.meta.quiz_questions.length-1?-1:0,"aria-disabled":W===n.lesson.meta.quiz_questions.length-1,"aria-label":t.$t("Move question down"),onClick:Q=>o.moveDown(W),onKeydown:[ut(Q=>o.moveDown(W),["enter"]),ut(Ee(Q=>o.moveDown(W),["prevent"]),["space"])]},{default:w(()=>[_(P)]),_:1},8,["tabindex","aria-disabled","aria-label","onClick","onKeydown"])])):O("",!0)],10,Wje))),128))])):O("",!0),(K=(G=n.lesson.meta)==null?void 0:G.quiz_questions)!=null&&K.length?(v(),D(l,{key:3,onClick:o.openAddQuestionModal,class:"fcom_primary_button add_btn"},{default:w(()=>[N(x("+ "+t.$t("Add Question"))+" ",1),t.has_pro?O("",!0):(v(),A("span",iWe," ("+x(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"])):(v(),A("div",nWe,[g("h4",null,x(t.$t("Add Question")),1),g("p",null,x(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(()=>[N(x("+ "+t.$t("Add Question"))+" ",1),t.has_pro?O("",!0):(v(),A("span",sWe," ("+x(t.$t("Pro Required"))+")",1))]),_:1},8,["onClick"])]))])]}),_:1})])]),_:1}),Re(_(R,{style:{padding:"0"},class:"fcom_full_editor_side",width:"300px"},{default:w(()=>[_(T,{height:"calc(100vh - 60px)"},{default:w(()=>[g("div",oWe,[_(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,x(t.$t("Close")),1)]),_:1})):O("",!0)])]),_:1})]),_:1},512),[[jt,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 aWe=ue(Ije,[["render",rWe]]),lWe={name:"SectionScheduler",components:{CaretBottom:mae},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}}},cWe={style:{"padding-left":"10px"},class:"fcom_section_scheduler"},uWe={class:"fcom_scheduler_form"},dWe={class:"fcom_input_group"},hWe={class:"el_inline_date_picker"},fWe={class:"fcom_input_group"},pWe={class:"fcom_input_group"},mWe={class:"fcom_scheduler_form scheduler_structured"},gWe={class:"fcom_input_group"},vWe={class:"fcom_label"},_We={class:"fcom_input_group"};function yWe(t,e,n,i,s,o){const r=H("CaretBottom"),a=be,l=Wd,c=M8,u=He,d=Yo,h=r2,f=xt("loading");return v(),A("div",cWe,[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,x(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",uWe,[g("div",dWe,[g("div",hWe,[_(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",fWe,[_(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",pWe,[Re((v(),D(u,{disabled:s.saving,type:"success",onClick:o.saveSchedule},{default:w(()=>[N(x(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,x(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",mWe,[g("div",gWe,[g("div",vWe,x(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"]),N(" "+x(t.$t("Days")),1)]),g("div",_We,[Re((v(),D(u,{disabled:s.saving,type:"success",onClick:o.saveUnlockDays},{default:w(()=>[N(x(t.$t("Update")),1)]),_:1},8,["disabled","onClick"])),[[f,s.saving]])])])]),_:1},8,["visible"])):O("",!0)])}const bWe=ue(lWe,[["render",yWe]]),wWe={name:"_SectionSechedulerEmail",components:{CrepeEditor:cu},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+` | |
| 135 | +`:"")+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()})}},kWe={class:"fcom_section_email_config"},CWe={class:"dialog_header"},xWe={class:"dialog_left"},SWe={class:"dialog_body"},$We={class:"fcom_input_group"},AWe={class:"fcom_label label_row"},EWe={class:"fcom_input_group"},MWe={class:"fcom_label label_row"},TWe={class:"fcom_extra_editor"},PWe={class:"dialog_footer"};function IWe(t,e,n,i,s,o){const r=eu,a=He,l=$r,c=Ar,u=Sr,d=ft,h=H("crepe-editor"),f=$s;return v(),A("div",kWe,[_(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(()=>[N(x(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",CWe,[g("div",xWe,[g("h4",null,x(t.$t("Edit Email Notification")),1)])])]),footer:w(()=>[g("div",PWe,[_(a,{class:"fcom_secondary_button",onClick:e[3]||(e[3]=p=>s.editorOpen=!1)},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(a,{class:"fcom_primary_button",loading:s.savingEmailMeta,onClick:o.saveSectionMeta},{default:w(()=>[N(x(t.$t("Save")),1)]),_:1},8,["loading","onClick"])])]),default:w(()=>[g("div",SWe,[g("div",$We,[g("div",AWe,[g("span",null,x(t.$t("Subject")),1),_(u,{trigger:"click",onCommand:o.insertIntoSubject},{dropdown:w(()=>[_(c,null,{default:w(()=>[(v(!0),A(ee,null,we(s.smartCodes,(p,m)=>(v(),D(l,{key:m,command:m},{default:w(()=>[N(x(p),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:w(()=>[_(a,{class:"fcom_secondary_button"},{default:w(()=>[N(x(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",EWe,[g("div",MWe,[g("span",null,x(t.$t("Message")),1),_(u,{trigger:"click",onCommand:o.insertIntoMessage},{dropdown:w(()=>[_(c,null,{default:w(()=>[(v(!0),A(ee,null,we(s.smartCodes,(p,m)=>(v(),D(l,{key:m,command:m},{default:w(()=>[N(x(p),1)]),_:2},1032,["command"]))),128))]),_:1})]),default:w(()=>[_(a,{class:"fcom_secondary_button"},{default:w(()=>[N(x(t.$t("Add shortcode")),1)]),_:1})]),_:1},8,["onCommand"])]),g("div",TWe,[_(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 LWe=ue(wWe,[["render",IWe]]),OWe={name:"SectionPart",props:["course","sections","section"],emits:["reload"],components:{LessonEditor:fU,LessonLine:mje,SectionScheduler:bWe,FluentDnD:za,QuizEditor:aWe,SectionSechedulerEmail:LWe},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={};Mc(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)}}},DWe={class:"fcom_section_primary"},RWe={class:"fcom_section_primary_item"},VWe={key:0,class:"fcom_heading_item"},FWe={class:"fcom_space_counts"},NWe={class:"fcom_section_config fcom_label_schedule"},BWe={class:"fcom_section_config fcom_label_email"},zWe={class:"fcom_section_primary_item_actions fcom_label_actions add_section_item"},HWe={key:0},UWe={class:"fcom_move_popup_close"},jWe={class:"fcom_move_popup_close"},WWe={key:0,class:"fcom_section_items"},YWe={key:0};function qWe(t,e,n,i,s,o){const r=be,a=He,l=ft,c=H("section-scheduler"),u=H("SectionSechedulerEmail"),d=$r,h=Ar,f=Sr,p=en,m=tn,y=H("Close"),b=sn,k=Jt,C=H("MoreFilled"),$=H("lesson-line"),S=H("FluentDnD"),M=H("LessonEditor"),P=H("QuizEditor"),T=xt("loading");return v(),A(ee,null,[Re((v(),A("div",DWe,[g("div",RWe,[g("div",{class:q(["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(()=>[N(x(t.$t("save")),1)]),_:1})]),_:1},8,["modelValue"])):(v(),A("h4",VWe,[g("span",{onClick:e[0]||(e[0]=I=>s.editing_title=!0)},x(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(()=>[...e[12]||(e[12]=[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)])]),_:1},8,["style"]),g("span",FWe,x(t.$_n("%s lesson","%s lessons",n.section.lessons.length)),1)]),_:1})):O("",!0)]))],2),o.hasSchedule?(v(),A(ee,{key:0},[g("div",NWe,[_(c,{section:n.section,course:n.course},null,8,["section","course"])]),g("div",BWe,[o.showEmailConfig?(v(),D(u,{key:0,section:n.section,course:n.course},null,8,["section","course"])):O("",!0)])],64)):O("",!0),g("div",zWe,[_(f,{onCommand:o.handleAddSectionItem,trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"lesson"},{default:w(()=>[N(x(t.$t("Lesson")),1)]),_:1}),_(d,{disabled:!t.has_pro,command:"quiz"},{default:w(()=>[N(x(t.$t("Quiz"))+" ",1),t.has_pro?O("",!0):(v(),A("span",HWe," ("+x(t.$t("Pro Required"))+")",1))]),_:1},8,["disabled"])]),_:1})]),default:w(()=>[_(a,{"aria-label":t.$t("Add New"),class:"fcom_secondary_button"},{default:w(()=>[N(x(t.$t("Add New")),1)]),_:1},8,["aria-label"])]),_:1},8,["onCommand"]),Re(g("div",{class:q(["fcom_add_section_popup","section_"+n.section.id])},[_(m,{onSubmit:[e[7]||(e[7]=Ee(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(()=>[Re((v(),D(a,{disabled:s.addingSectionItem,class:"fcom_secondary_button",onClick:o.addSectionItem},{default:w(()=>[N(x(t.$t("Add")),1)]),_:1},8,["disabled","onClick"])),[[T,s.addingSectionItem]]),Re((v(),D(a,{disabled:s.addingSectionItem,class:"fcom_primary_button",onClick:e[6]||(e[6]=()=>{o.addSectionItem(!1,!0)})},{default:w(()=>[N(x(t.$t("Add & Edit")),1)]),_:1},8,["disabled"])),[[T,s.addingSectionItem]])]),_:1})]),_:1},8,["onSubmit"]),g("div",UWe,[_(r,{onClick:e[8]||(e[8]=I=>s.showAddSectionPopup=!1)},{default:w(()=>[_(y)]),_:1})])],2),[[jt,s.showAddSectionPopup]]),Re(g("div",{class:q(["fcom_copy_section_popup","section_"+n.section.id])},[_(m,{onSubmit:e[10]||(e[10]=Ee(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,we(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(()=>[N(x(t.$t("Copy Section")),1)]),_:1},8,["onClick","disabled"])]),_:1}),g("div",jWe,[_(r,{onClick:e[11]||(e[11]=I=>s.showCopySectionPopup=!1)},{default:w(()=>[_(y)]),_:1})])],2),[[jt,s.showCopySectionPopup]]),_(f,{onCommand:o.handleSectionAction,trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{command:"edit_title"},{default:w(()=>[N(x(t.$t("Edit Title")),1)]),_:1}),_(d,{command:"copy_section"},{default:w(()=>[N(x(t.$t("Copy To")),1)]),_:1}),_(d,{command:"delete"},{default:w(()=>[N(x(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",WWe,[_(S,{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(()=>[...e[13]||(e[13]=[g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)])]),_:1},8,["course","sections","lesson","onDeleteLesson","onUpdated","onMoveLesson","onDuplicateLesson","onShowEditor"]))]),_:1},8,["items","onDrop"])])):O("",!0)])),[[T,s.working]]),s.editingLesson?(v(),A("div",YWe,[(v(),D(ea,{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 GWe=ue(OWe,[["render",qWe]]),XWe={name:"EditLessons",props:["course"],components:{SectionPart:GWe,FluentDnD:za},data(){return{sections:[],loading:!1,newSection:{title:""},addingSection:!1,isCollapsed:!1}},computed:{lessonsCount(){let t=0;return Mc(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={};Mc(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,Mc(this.sections,t=>{t.isCollapsed=this.isCollapsed})}},mounted(){this.fetchSections(),this.showAddSectionPopup()}},KWe={class:"fcom_course_lessons"},ZWe={class:"fcom_settings_header"},JWe={class:"fcom_settings_header_meta"},QWe={class:"fcom_settings_header_meta_item"},eYe={class:"fcom_card_section_heading"},tYe={key:0},nYe={class:"fcom_section_labels"},sYe={class:"fcom_lebel fcom_label_lesson"},iYe={class:"fcom_lebel fcom_label_schedule"},oYe={class:"fcom_lebel fcom_label_email"};function rYe(t,e,n,i,s,o){const r=Nt,a=be,l=He,c=ft,u=en,d=tn,h=Yo,f=H("section-part"),p=H("FluentDnD"),m=xt("loading");return v(),A("div",KWe,[g("div",ZWe,[g("div",null,[g("h2",null,x(t.$t("Lessons")),1),g("div",JWe,[g("div",QWe,[g("b",null,x(t.$t("Type:")),1),N(" "+x(t.$labelize(n.course.settings.course_type))+" • ",1),g("b",null,x(t.$t("Status:")),1),N(" "+x(t.$labelize(n.course.status))+" • ",1),g("b",null,x(t.$t("Visibility:")),1),N(" "+x(t.$labelize(n.course.privacy)),1)])])])]),g("div",{class:q(["fcom_card_sections","fcom_course_type_"+n.course.settings.course_type])},[g("div",eYe,[s.loading?(v(),D(r,{key:1,rows:1})):(v(),A("h3",tYe,x(t.$_n("%d Section","%d Sections",s.sections.length))+" • "+x(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(()=>[...e[2]||(e[2]=[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)])]),_: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(()=>[N(x(t.$t("+ Add Section")),1)]),_:1})]),default:w(()=>[_(d,{onSubmit:e[1]||(e[1]=Ee(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(Ee(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(()=>[Re((v(),D(l,{disabled:s.addingSection,class:"fcom_primary_button",onClick:o.addSection},{default:w(()=>[N(x(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",nYe,[g("div",sYe,x(t.$t("Lesson name")),1),g("div",iYe,x(t.$t("Schedule")),1),g("div",oYe,x(t.$t("E-mail")),1),e[3]||(e[3]=g("div",{class:"fcom_lebel fcom_label_actions"},null,-1))]),_(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(()=>[...e[4]||(e[4]=[g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)])]),_:1},8,["onReload","course","sections","section"])]),_:1},8,["items","onDrop"])],2)])}const aYe=ue(XWe,[["render",rYe]]),lYe={name:"GroupIcon"},cYe={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function uYe(t,e,n,i,s,o){return v(),A("svg",cYe,[...e[0]||(e[0]=[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),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),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),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)])])}const dYe=ue(lYe,[["render",uYe]]),hYe={name:"ManageCourses",components:{CreateCourseForm:kS,AppLayout:yi,Layout:_i,GroupIcon:dYe,Pagination:uu,Search:Qb},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()}},fYe={class:"object_menu"},pYe={class:"fcom_space_menu_ul"},mYe={key:0,class:"fcom_space_topics"},gYe={class:"fcom_topics_filters"},vYe={class:"search_member"},_Ye={class:"feed_filters"},yYe={class:"fcom_feed_filter_label"},bYe={class:"fcom_courses"},wYe={class:"fcom_box_card_list"},kYe=["onClick"],CYe=["src","onError"],xYe={key:1,class:"fcom_no_image"},SYe={class:"fcom_box_card_info"},$Ye={class:"fcom_box_card_name"},AYe={class:"fcom_box_card_by"},EYe={class:"fcom_box_card_details"},MYe={class:"inline_details"},TYe={class:"inline_details"},PYe={key:0,class:"fcom_box_card_description"},IYe={class:"fcom_box_card_action"},LYe=["onClick"],OYe={key:0,class:"fcom_no_items_wrap"};function DYe(t,e,n,i,s,o){const r=He,a=qs,l=H("Search"),c=be,u=ft,d=sn,h=Jt,f=hi,p=H("router-link"),m=H("GroupIcon"),y=H("pagination"),b=H("layout"),k=H("app-layout"),C=H("create-course-form"),$=Va,S=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",fYe,[g("ul",pYe,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Ee(M=>o.setStatus(""),["prevent"])),class:q(s.status===""?"router-link-active router-link-exact-active":""),href:"#"},x(t.$t("All")),3)]),g("li",null,[g("a",{onClick:e[1]||(e[1]=Ee(M=>o.setStatus("published"),["prevent"])),class:q(s.status==="published"?"router-link-active router-link-exact-active":""),href:"#"},x(t.$t("Published")),3)]),g("li",null,[g("a",{onClick:e[2]||(e[2]=Ee(M=>o.setStatus("draft"),["prevent"])),class:q(s.status==="draft"?"router-link-active router-link-exact-active":""),href:"#"},x(t.$t("Draft")),3)]),g("li",null,[_(r,{class:"fcom_primary_button",onClick:e[3]||(e[3]=M=>s.newCourseModal=!0)},{default:w(()=>[N(x(t.$t("Add Course")),1)]),_:1})])])])]),default:w(()=>[s.courseCategories&&s.courseCategories.length?(v(),A("div",mYe,[_(a,null,{default:w(()=>[g("div",gYe,[_(r,{onClick:e[4]||(e[4]=M=>o.setTopic("")),class:q({fcom_active_topic:!s.topic_slug})},{default:w(()=>[N(x(t.$t("All")),1)]),_:1},8,["class"]),(v(!0),A(ee,null,we(s.courseCategories,M=>(v(),D(r,{key:M.slug,onClick:P=>o.setTopic(M.slug),class:q({fcom_active_topic:M.slug==s.topic_slug})},{default:w(()=>[N(x(M.title),1)]),_:2},1032,["onClick","class"]))),128))])]),_:1})])):O("",!0),g("div",vYe,[_(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",_Ye,[e[10]||(e[10]=g("div",{class:"fcom_feed_divider"},null,-1)),g("span",yYe,x(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"])]),Re((v(),A("div",bYe,[g("div",wYe,[(v(!0),A(ee,null,we(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,CYe)):(v(),A("div",xYe))],8,kYe),g("div",SYe,[g("div",$Ye,[_(p,{class:"course_route",to:{name:"course_overview",params:{course_id:M.id}}},{default:w(()=>[N(x(o.getExcerpt(M.title,20))+" ",1),M.status=="draft"?(v(),D(f,{key:0,type:"info"},{default:w(()=>[N(x(M.status),1)]),_:2},1024)):O("",!0)]),_:2},1032,["to"]),g("span",AYe,x(t.$t("by %s",(P=M==null?void 0:M.owner)==null?void 0:P.display_name)),1)]),g("div",EYe,[g("div",MYe,[g("span",null,x(t.$_n("%d Section","%d Sections",M.sectionsCount)),1),e[11]||(e[11]=g("span",{class:"fcom_inline_separator"},null,-1)),g("span",null,x(t.$_n("%d Lesson","%d Lessons",M.lessonsCount)),1)]),g("div",TYe,[_(c,null,{default:w(()=>[_(m)]),_:1}),N(" "+x(t.$_n("%d student","%d students",M.students_count||0)),1)])]),M.description?(v(),A("div",PYe,x(o.getExcerpt(M.description,40)),1)):O("",!0),g("div",IYe,[g("button",{class:"fcom_card_button",onClick:T=>o.navigateToEditLessons(M.id)},x(t.$t("Manage")),9,LYe)])])])}),128))]),_(y,{hide_on_single:!0,onFetch:o.fetchCourses,pagination:s.pagination},null,8,["onFetch","pagination"]),!s.loading&&!s.courses.length?(v(),A("div",OYe,[s.topic_slug?(v(),A(ee,{key:0},[g("h3",null,x(t.$t("No courses found in this topic")),1),g("p",null,x(t.$t("No courses found based on your search criteria")),1)],64)):s.search?(v(),A(ee,{key:1},[g("h3",null,x(t.$t("No courses found based on your search criteria")),1),g("p",null,x(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,x(t.$t("No courses found")),1),g("p",null,x(t.$t("No courses match your current filters. Try adjusting your filters.")),1)],64)):(v(),A(ee,{key:3},[g("h3",null,x(t.$t("Create your first course")),1),g("p",null,x(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(()=>[N(x(t.$t("Create a Course")),1)]),_:1})],64))])):O("",!0)])),[[S,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,x(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 RYe=ue(hYe,[["render",DYe]]),VYe={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()}},FYe={class:"setting_header"},NYe={class:"setting_body"},BYe={key:1,class:"fcom_bp_migration_space_table"},zYe={style:{margin:"20px 0 20px"}},HYe={class:"fcom_listed fcom_mb_20"},UYe={key:0},jYe={key:1},WYe={key:3,class:"fcom_mt_10"},YYe={key:2,style:{"text-align":"center"}},qYe={style:{"text-align":"left",margin:"0px 20px 30px","font-size":"20px"},class:"fcom_listed"},GYe={key:0},XYe={key:1},KYe={key:0},ZYe={key:1},JYe={key:2},QYe={key:3},eqe=["href"],tqe={key:3};function nqe(t,e,n,i,s,o){const r=Nt,a=hi,l=Il,c=H("InfoFilled"),u=be,d=Ss,h=sn,f=Jt,p=Pl,m=Yt,y=sa,b=ft,k=He,C=a2,$=xt("loading");return v(),A(ee,null,[g("div",FYe,[g("h2",null,x(t.$t("%s Migration",o.providerName)),1)]),g("div",NYe,[s.loading?(v(),D(r,{key:0,animated:!0,rows:5})):s.stage=="config"?(v(),A("div",BYe,[g("h5",null,x(t.$t("Please configure your %s groups for FluentCommunity Menu",o.providerName)),1),g("p",null,x(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),e[4]||(e[4]=g("hr",null,null,-1)),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(S=>[g("div",null,[N(x(S.row.name)+" ",1),S.row.is_migrated?(v(),D(a,{key:0,type:"success"},{default:w(()=>[N(x(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,x(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(S=>[_(f,{clearable:"",placeholder:t.$t("No Menu Group"),modelValue:s.configMap[S.row.id],"onUpdate:modelValue":M=>s.configMap[S.row.id]=M,filterable:""},{default:w(()=>[_(h,{value:0,label:t.$t("No Menu Group")},null,8,["label"]),(v(!0),A(ee,null,we(s.spaceGroups,M=>(v(),D(h,{key:M.id,label:M.title,value:M.id},null,8,["label","value"]))),128))]),_:1},8,["placeholder","modelValue","onUpdate:modelValue"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])):O("",!0),g("h5",zYe,x(t.$t("The following data will be migrated to FluentCommunity")),1),g("ul",HYe,[s.featureConfig.has_groups?(v(),A("li",UYe,x(t.$t("Total Groups:"))+" "+x(s.groupItems.length),1)):O("",!0),g("li",null,x(t.$t("Total Activity (Posts):"))+" "+x(t.$formatNumber(s.stats.total_posts))+" "+x(t.$t("(+ associate favorites/reactions)")),1),g("li",null,x(t.$t("Total Comments:"))+" "+x(t.$formatNumber(s.stats.total_comments)),1),g("li",null,x(t.$t("Total Users:"))+" "+x(t.$formatNumber(s.stats.total_community_users)),1),s.stats.total_reactions?(v(),A("li",jYe,x(t.$t("Total Reactions:"))+" "+x(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]=S=>s.reset_migration=S),"true-value":"yes","false-value":"no"},{default:w(()=>[N(x(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]=S=>s.delete_current_data=S),"true-value":"yes","false-value":"no"},{default:w(()=>[N(x(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",WYe,[_(y,{type:"error",closable:!1,"show-icon":""},{default:w(()=>[N(x(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]=S=>s.delete_confirmation=S),"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),e[5]||(e[5]=g("hr",{class:"fcom_mb_20"},null,-1)),_(k,{loading:s.migrating,disabled:o.isDeletionRequested&&s.delete_confirmation!=="DELETE",onClick:e[3]||(e[3]=S=>o.startMigration()),class:"fcom_primary_button"},{default:w(()=>[N(x(t.$t("Start Migrating Data")),1)]),_:1},8,["loading","disabled"])])):s.stage=="migrating"?(v(),A("div",YYe,[g("ul",qYe,[s.featureConfig.has_groups?(v(),A("li",GYe,[N(x(t.$t("Groups"))+" ",1),_(a,{type:"success"},{default:w(()=>[N(x(t.$t("Migrated")),1)]),_:1})])):O("",!0),s.featureConfig.has_groups?Re((v(),A("li",XYe,[N(x(t.$t("Group Members"))+" ",1),o.completedSteps.group_members?(v(),D(a,{key:0,type:"success"},{default:w(()=>[N(x(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[$,s.current_status.current_stage=="group_members"]]):O("",!0),Re((v(),A("li",null,[N(x(t.$t("Posts & Activities"))+" ",1),o.completedSteps.posts?(v(),D(a,{key:0,type:"success"},{default:w(()=>[N(x(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[$,s.current_status.current_stage=="posts"]]),Re((v(),A("li",null,[N(x(t.$t("Users"))+" ",1),o.completedSteps.users?(v(),D(a,{key:0,type:"success"},{default:w(()=>[N(x(t.$t("Migrated")),1)]),_:1})):O("",!0)])),[[$,s.current_status.current_stage=="users"]])]),e[9]||(e[9]=g("hr",{style:{"margin-bottom":"20px"}},null,-1)),s.current_status.current_stage=="group_members"?(v(),A("div",KYe,[g("h3",null,x(t.$t("Migrating Group Members from %s to FluentCommunity Spaces",o.providerName)),1),g("p",null,x(t.$t("Please do not close this window or go to other pages")),1),e[6]||(e[6]=g("hr",null,null,-1)),g("h4",null,x(t.$t("Current Stage:"))+" "+x(s.current_status.last_migrated_member_id)+"/"+x(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",ZYe,[g("h3",null,x(t.$t("Migrating Posts from %s to FluentCommunity",o.providerName)),1),g("p",null,x(t.$t("Please do not close this window or go to other pages")),1),e[7]||(e[7]=g("hr",null,null,-1)),g("h4",null,x(t.$t("Current Stage:"))+" "+x(s.current_status.last_activity_id)+"/"+x(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",JYe,[g("h3",null,x(t.$t("Syncing User Data from %s to FluentCommunity",o.providerName)),1),g("p",null,x(t.$t("Please do not close this window or go to other pages")),1),e[8]||(e[8]=g("hr",null,null,-1)),g("h4",null,x(t.$t("Current Stage:"))+" "+x(s.current_status.last_migrated_user_id)+"/"+x(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",QYe,[g("h3",null,x(t.$t("Congratulation! Migration has been completed!")),1),g("p",null,x(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},x(t.$t("Go to Community Portal")),9,eqe)])):O("",!0)])):(v(),A("div",tqe,x(t.$t("Migration Completed")),1))])],64)}const sqe=ue(VYe,[["render",nqe]]),iqe={name:"ManageMigrations",components:{BuddyPress:sqe,Layout:_i,AppLayout:yi},data(){return{selectedMigration:"",loading:!1,migrations:[]}},computed:{canManageMigrations(){return this.hasPermission("super_admin")}},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.canManageMigrations&&this.getMigrations()}},oqe={class:"settings_router"},rqe={class:"fhr_content_layout_body"},aqe={key:0,class:"no_members"},lqe={key:1,class:"fcom_migration_selectors white_loaded"},cqe={key:1},uqe={style:{margin:"0"}},dqe={style:{margin:"10px 0 20px"}},hqe={class:"fcom_box_card_list"},fqe=["onClick"],pqe={style:{padding:"10px"},class:"fcom_box_card_avatar"},mqe=["src"],gqe={class:"fcom_box_card_info"},vqe={style:{"text-align":"center",display:"block"},class:"fcom_box_card_name"},_qe={href:"https://fluentcommunity.co/docs/fluentcommunity-buddyboss-migration",target:"_blank",rel:"noopener"},yqe={key:2,class:"fcom_migration_content"};function bqe(t,e,n,i,s,o){const r=Nt,a=sa,l=H("BuddyPress"),c=H("layout"),u=H("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",oqe,[g("div",rqe,[o.canManageMigrations?s.selectedMigration?(v(),A("div",yqe,[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",lqe,[s.loading?(v(),D(r,{key:0,animated:!0})):(v(),A("div",cqe,[g("h3",uqe,x(t.$t("Migrate Data from other plugins.")),1),g("p",dqe,x(t.$t("Please select a plugin from where you want to migrate data to FluentCommunity.")),1),g("div",hqe,[(v(!0),A(ee,null,we(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",pqe,[d.logo?(v(),A("img",{key:0,style:{width:"200px","max-width":"100%","object-fit":"scale-down"},src:d.logo,alt:""},null,8,mqe)):O("",!0)]),g("div",gqe,[g("div",vqe,[g("h4",null,x(d.title),1)])])],8,fqe))),128))])])),_(a,{type:"warning",closable:!1,style:{"margin-top":"15px"}},{default:w(()=>[g("p",null,[N(x(t.$t("For large databases, please read our documentation and use wp-cli."))+" ",1),g("a",_qe,x(t.$t("Read Documentation")),1)])]),_:1})])):(v(),A("div",aqe,x(t.$t("Sorry, you do not have permission to view this page")),1))])])]),_:1},8,["title"])]),_:1})}const wqe=ue(iqe,[["render",bqe]]),kqe={name:"GeneticPromo",props:{placement:{type:String,default:"generic_promo"}}},Cqe={class:"fcom_generic_promo"},xqe={style:{"text-align":"center"},class:"fcom_upgrade_banner"},Sqe={style:{"font-size":"18px","margin-bottom":"10px"}},$qe=["href"];function Aqe(t,e,n,i,s,o){return v(),A("div",Cqe,[g("div",xqe,[g("h3",Sqe,x(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"},x(t.$t("Upgrade Now")),9,$qe)])])}const pU=ue(kqe,[["render",Aqe]]),Eqe={name:"AccessAutomator",components:{GeneticPromo:pU,AppLayout:yi,Layout:_i},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()}},Mqe={class:"settings_router"},Tqe={class:"fhr_content_layout_body_"},Pqe={class:"fcom_settings_header"},Iqe={class:"setting_body_"},Lqe={key:0,class:"white_loaded"},Oqe={key:1,class:"white_loaded"},Dqe={key:2,class:"white_loaded"},Rqe={class:"fcom_generic_promo"},Vqe={style:{"text-align":"center"},class:"fcom_upgrade_banner"},Fqe={style:{"font-size":"18px","margin-bottom":"10px"}},Nqe={key:3},Bqe={class:"white_loaded fcom_mb_20"},zqe={class:"fcom_input_wrap"},Hqe={key:0},Uqe={class:"fcom_input_wrap"},jqe={class:"fcom_input_wrap"},Wqe={key:0,class:"fcom_input_wrap"},Yqe={key:0,class:"fcom_mapped_list"},qqe={class:"fcom_mapped_list__head"},Gqe={class:"fcom_mapped_list__group_title"},Xqe={class:"fcom_mapped_list__space"},Kqe=["innerHTML"],Zqe=["innerHTML"],Jqe={key:2,class:"fcom_mapped_list__icon fcom_no_avatar"},Qqe={class:"fcom_mapped_list__name"},eGe={class:"fcom_mapped_list__actions"},tGe={key:1,class:"white_loaded"},nGe={key:4};function sGe(t,e,n,i,s,o){const r=He,a=sa,l=Nt,c=H("genetic-promo"),u=Yt,d=tn,h=be,f=sn,p=Jt,m=H("layout"),y=H("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,x(t.$t("Save Settings")),1)]),_:1},8,["loading","onClick"])):O("",!0)]),default:w(()=>[g("div",Mqe,[g("div",Tqe,[g("div",Pqe,[g("h2",null,x(t.$t("Automate your Course or Space accesses with FluentCRM Tags")),1),g("p",null,x(t.$t("Control user accesses to different spaces/courses of your portal based on the contact tags.")),1),g("p",null,x(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(()=>[N(x(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",Iqe,[s.loading?(v(),A("div",Lqe,[_(l,{rows:5,animated:!0})])):t.has_pro?s.has_fluentcrm?s.settings&&s.spaceGroups?(v(),A("div",Nqe,[g("div",Bqe,[_(d,{onSubmit:e[5]||(e[5]=Ee(b=>t.doNothing(),["prevent"])),modelValue:s.settings,"onUpdate:modelValue":e[6]||(e[6]=b=>s.settings=b),"label-position":"top"},{default:w(()=>[g("div",zqe,[_(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(()=>[N(x(t.$t("Enable Access Management with FluentCRM")),1)]),_:1},8,["modelValue"]),s.settings.is_enabled!="yes"?(v(),A("p",Hqe,x(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",Uqe,[_(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(()=>[N(x(t.$t("Create contact in FluentCRM (if not exist) when join in the configured spaces / courses.")),1)]),_:1},8,["modelValue"]),g("p",null,x(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",jqe,[_(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(()=>[N(x(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,x(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",Wqe,[_(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(()=>[N(x(t.$t("Send default WP welcome email when creating the user by tagging.")),1)]),_:1},8,["modelValue"]),g("p",null,x(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",Yqe,[g("div",qqe,[g("span",null,x(t.$t("Space")),1),g("span",null,x(t.$t("Mapped FluentCRM Tag")),1)]),(v(!0),A(ee,null,we(s.spaceGroups,b=>(v(),A("div",{class:"fcom_mapped_list__group",key:b.id},[g("div",Gqe,x(b.title),1),(v(!0),A(ee,null,we(b.spaces,k=>(v(),A("div",{class:"fcom_mapped_list__row",key:k.id},[g("div",Xqe,[k.icon?(v(),D(h,{key:0,class:"fcom_mapped_list__icon"},{default:w(()=>[g("span",{innerHTML:k.icon},null,8,Kqe)]),_: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",Jqe)),g("span",Qqe,x(k.title),1)]),g("div",eGe,[_(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,we(s.crm_tags,C=>(v(),D(f,{label:C.title,value:C.id},null,8,["label","value"]))),256))]),_:1},8,["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(()=>[N(x(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,x(t.$t("Save Settings")),1)]),_:1},8,["loading","onClick"])):(v(),A("div",tGe,[_(c,{placement:"feature_lock_access_automator"})]))])):(v(),A("div",nGe,[g("p",null,x(t.$t("Settings could not be loaded")),1)])):(v(),A("div",Dqe,[g("div",Rqe,[g("div",Vqe,[g("h3",Fqe,x(t.$t("FluentCRM is not installed!")),1),g("p",null,x(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(()=>[N(x(t.$t("Install FluentCRM")),1)]),_:1},8,["loading"])])])])):(v(),A("div",Oqe,[_(c,{placement:"feature_lock_access_automator"})]))])])])]),_:1},8,["title"])]),_:1})}const iGe=ue(Eqe,[["render",sGe]]),oGe={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 rGe(t,e,n,i,s,o){const r=r2,a=en,l=Yt,c=He,u=tn,d=xt("loading");return v(),D(u,{onSubmit:e[4]||(e[4]=Ee(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(()=>[N(x(t.$t("Show Topics on Post Card")),1)]),_:1},8,["modelValue"])]),_:1},8,["label"]),_(a,null,{default:w(()=>[Re((v(),D(c,{class:"fcom_primary_button",onClick:e[3]||(e[3]=h=>o.update())},{default:w(()=>[N(x(t.$t("Update")),1)]),_:1})),[[d,s.loading]])]),_:1})]),_:1},8,["modelValue"])}const aGe=ue(oGe,[["render",rGe]]),lGe={name:"TopicCreateForm",components:{SpaceIcon:xp,SlugInput:Yd},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()}},cGe={class:"fcom_help_text"},uGe={key:0,class:"fcom_space_title"},dGe={key:0},hGe={key:1},fGe={class:"fcom_help_text"};function pGe(t,e,n,i,s,o){const r=ft,a=en,l=H("slug-input"),c=H("SpaceIcon"),u=sn,d=n2,h=Jt,f=Yt,p=He,m=tn,y=xt("loading");return v(),D(m,{onSubmit:e[5]||(e[5]=Ee(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",cGe,[g("p",null,x(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,we(s.formattedSpaceGroups,b=>(v(),D(d,{key:b.label,label:b.label},{default:w(()=>[(v(!0),A(ee,null,we(b.spaces,k=>(v(),D(u,{key:k.slug,label:k.title,value:k.id.toString()},{default:w(()=>[k.id?(v(),A("span",uGe,[_(c,{space_profile:k},null,8,["space_profile"]),g("span",null,[N(x(t.getExcerpt(k.title,50))+" ",1),k.type=="course"?(v(),A("span",dGe," ("+x(t.$t("course"))+")",1)):O("",!0)])])):(v(),A("span",hGe,x(t.getExcerpt(k.title,50)),1))]),_:2},1032,["label","value"]))),128))]),_:2},1032,["label"]))),128))]),_:1},8,["modelValue","placeholder"]),g("div",fGe,[g("p",null,x(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(()=>[N(x(t.$t("Only admins and moderators can select this topic")),1)]),_:1},8,["modelValue"])]),_:1}),_(a,null,{default:w(()=>[Re((v(),D(p,{class:"fcom_primary_button",onClick:o.createOrupdateTopic,disabled:s.saving},{default:w(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[y,s.saving]])]),_:1})]),_:1},8,["modelValue"])}const mGe=ue(lGe,[["render",pGe]]),gGe={name:"AllTopics",components:{TopicCreateForm:mGe,SlugInput:Yd,SpaceIcon:xp,Layout:_i,AppLayout:yi,TopicsConfig:aGe,FluentDnD:za},data(){return{topics:[],saving:!1,loading:!1,search:"",applied_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(){const t=this.search;this.loading=!0,this.$get("admin/topics",{search:t}).then(e=>{this.topics=e.topics,this.all_spaces=e.all_spaces,this.applied_search=t,this._savedOrder=this.topicOrderKey()}).catch(e=>{this.$handleError(e)}).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(", ")},onTopicDrop(){this.applied_search||(clearTimeout(this._reorderTimer),this._reorderTimer=setTimeout(()=>{this.saveTopicOrder()},400))},saveTopicOrder(){if(this._savingOrder){this._orderQueued=!0;return}const t=this.topicOrderKey();t!==this._savedOrder&&(this._savingOrder=!0,this.$post("admin/topics/reorder",{topic_ids:this.topics.map(e=>e.id)}).then(e=>{this._savedOrder=t,this.$notify.success(e.message)}).catch(e=>{this.$handleError(e),this._orderQueued||this.fetch()}).finally(()=>{this._savingOrder=!1,this._orderQueued&&(this._orderQueued=!1,this.saveTopicOrder())}))},topicOrderKey(){return this.topics.map(t=>t.id).join(",")},topicItemLabel(t,e){return this.$t("%1$s. Sortable item %2$s of %3$s. Use the up and down arrow keys to reorder.",t.title,e+1,this.topics.length)}},watch:{search(t){!t&&this.applied_search&&this.fetch()}},mounted(){this.has_pro&&this.fetch(),this.changeTitle(this.$t("Topics Settings"))},beforeUnmount(){clearTimeout(this._reorderTimer)}},vGe=["href"],_Ge={key:0,class:"fhr_content_layout_body"},yGe={class:"fcom_mb_10"},bGe={class:"fcom_manager_actions fcom_mb_10"},wGe={class:"bulk_search"},kGe={class:"fcom_topics_dnd fcom_manager_table"},CGe={key:0,class:"fcom_topic_row fcom_topic_row_head"},xGe={class:"col_title"},SGe={class:"col_spaces"},$Ge={class:"col_admin"},AGe={class:"col_actions"},EGe={class:"fcom_topic_row"},MGe=["title"],TGe={class:"col_title"},PGe={class:"fcom_topic_title"},IGe={class:"fcom_meta_text"},LGe={class:"col_spaces"},OGe={class:"col_admin"},DGe={class:"col_actions"},RGe={class:"fcom_table_action_col"},VGe={key:2,class:"fcom_topic_empty"},FGe={key:1,class:"settings_router"},NGe={class:"fhr_content_layout_body"},BGe={class:"setting_body",style:{"text-align":"center"}},zGe={class:"promo_description"},HGe=["href"],UGe={class:"dialog_header"},jGe={class:"dialog_left"},WGe={key:0,class:"dialog_body"};function YGe(t,e,n,i,s,o){const r=H("Plus"),a=be,l=He,c=H("Operation"),u=ft,d=H("DeleteFilled"),h=H("FluentDnD"),f=H("layout"),p=H("app-layout"),m=H("TopicCreateForm"),y=$s,b=H("TopicsConfig"),k=xt("loading");return v(),A(ee,null,[_(p,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(f,{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]=C=>o.showForm(null))},{default:w(()=>[_(a,null,{default:w(()=>[_(r)]),_:1}),g("span",null,x(t.$t("New Topic")),1)]),_:1}),_(l,{onClick:e[1]||(e[1]=C=>s.showConfig=!0),class:"fcom_secondary_button"},{default:w(()=>[_(a,null,{default:w(()=>[_(c)]),_:1}),g("span",null,x(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"},x(t.$t("Upgrade to Pro")),9,vGe))]),default:w(()=>[t.has_pro?(v(),A("div",_Ge,[g("div",null,[g("p",yGe,x(t.$t("Categorize your content and allow members to filter posts with the topic navigation bar in spaces.")),1),g("div",bGe,[g("div",wGe,[_(u,{modelValue:s.search,"onUpdate:modelValue":e[2]||(e[2]=C=>s.search=C),onKeydown:ut(o.fetch,["enter"]),clearable:"",placeholder:t.$t("Search"),class:"el-input-round"},{prefix:w(()=>[...e[7]||(e[7]=[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)])]),_:1},8,["modelValue","onKeydown","placeholder"])])]),Re((v(),A("div",kGe,[s.topics.length?(v(),A("div",CGe,[e[8]||(e[8]=g("span",{class:"col_handle"},null,-1)),g("span",xGe,x(t.$t("Title")),1),g("span",SGe,x(t.$t("Spaces")),1),g("span",$Ge,x(t.$t("Admin Only?")),1),g("span",AGe,x(t.$t("Actions")),1)])):O("",!0),s.topics.length?(v(),D(h,{key:1,items:s.topics,"row-key":"id",draggable:!s.applied_search,"item-label":o.topicItemLabel,onDrop:o.onTopicDrop},{item:w(({data:C})=>[g("div",EGe,[g("span",{class:q(["col_handle fcom_drag_handle",{fcom_drag_disabled:s.applied_search}]),title:s.applied_search?t.$t("Clear the search to reorder"):t.$t("Drag to reorder"),"aria-hidden":"true"},"⋮⋮",10,MGe),g("span",TGe,[g("p",PGe,x(C.title),1),g("span",IGe,x(C.description),1)]),g("span",LGe,x(o.formatTopics(C.space_ids)),1),g("span",OGe,x(C.admin_only=="yes"?t.$t("Yes"):t.$t("No")),1),g("span",DGe,[g("div",RGe,[_(l,{onClick:$=>o.showForm(C),size:"small"},{default:w(()=>[N(x(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(l,{"aria-label":t.$t("Delete"),onClick:$=>o.removeTopic(C),type:"danger",plain:"",size:"small"},{default:w(()=>[_(a,null,{default:w(()=>[_(d)]),_:1})]),_:1},8,["aria-label","onClick"])])])])]),_:1},8,["items","draggable","item-label","onDrop"])):(v(),A("p",VGe,x(t.$t("No Topics Found")),1))])),[[k,s.loading]])])])):(v(),A("div",FGe,[g("div",NGe,[g("div",BGe,[g("p",zGe,x(t.$t("__TOPIC_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_topics"),class:"el-button el-button--danger"},x(t.$t("Upgrade to Pro")),9,HGe)])])]))]),_:1},8,["title"])]),_:1}),_(y,{"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",UGe,[g("div",jGe,[e[9]||(e[9]=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)),g("div",null,[g("h4",null,x(s.editing_topic.id?t.$t("Update Topic"):t.$t("Add Topic")),1)])])])]),default:w(()=>[s.showModal?(v(),A("div",WGe,[s.showModal?(v(),D(m,{key:0,all_spaces:s.all_spaces,topic:s.editing_topic,onSaved:e[3]||(e[3]=C=>{s.showModal=!1,o.fetch()})},null,8,["all_spaces","topic"])):O("",!0)])):O("",!0)]),_:1},8,["width","modelValue"]),_(y,{"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]=C=>s.showConfig=C),direction:"rtl"},{default:w(()=>[s.showConfig?(v(),D(b,{key:0,onSaved:e[5]||(e[5]=C=>{s.showConfig=!1})})):O("",!0)]),_:1},8,["width","title","modelValue"])],64)}const qGe=ue(gGe,[["render",YGe]]),GGe={name:"CustomizationSettings",components:{Layout:_i,AppLayout:yi},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"))}},XGe={class:"settings_router"},KGe={key:0,class:"white_loaded"},ZGe={key:1,class:"fhr_content_layout_body"},JGe={class:"setting_header"},QGe={class:"setting_body"},eXe={class:"fcom_input_wrap"},tXe={class:"fcom_input_wrap"},nXe={class:"fcom_input_wrap"},sXe={class:"fcom_input_wrap"},iXe={class:"fcom_input_wrap"},oXe={key:0},rXe={class:"fcom_input_wrap"},aXe={key:0,class:"fcom_input_wrap"},lXe=["innerHTML"],cXe={key:1,style:{cursor:"pointer","font-weight":"bold"}},uXe={class:"fcom_input_wrap"},dXe={style:{"font-weight":"bold"}},hXe={class:"fcom_help_text"},fXe={target:"_blank",rel:"noopener",href:"https://wpmanageninja.com/affiliate/"},pXe={class:"fcom_input_wrap"},mXe={class:"fcom_input_wrap"},gXe={class:"fcom_input_wrap"},vXe={key:0},_Xe={class:"fcom_help_text"},yXe={class:"fcom_input_wrap"},bXe={key:0},wXe={class:"fcom_help_text"},kXe={class:"fcom_input_wrap"},CXe={class:"fcom_help_text"},xXe={key:2,class:"fcom_input_wrap"},SXe={class:"fcom_help_text"},$Xe={class:"fcom_input_wrap"},AXe={class:"fcom_help_text"},EXe={key:0},MXe={key:1},TXe={class:"fcom_input_wrap"},PXe={class:"fcom_input_wrap"},IXe={style:{margin:"20px 0 0 0"},class:"fcom_input_wrap"},LXe={key:2},OXe={key:0,class:"white_loaded"},DXe={key:1,class:"fhr_content_layout_body"},RXe={class:"setting_header"},VXe={class:"setting_body"},FXe={class:"setting_sub_header"},NXe={class:"setting_sub_body"},BXe={class:"setting_sub_header"},zXe={class:"setting_sub_body"},HXe={style:{margin:"20px 0 0 0"},class:"fcom_input_wrap"},UXe={key:2},jXe={key:4,class:"fhr_content_layout_body",style:{"text-align":"center"}},WXe={class:"setting_header"},YXe={class:"setting_body"},qXe={class:"promo_description"},GXe=["href"];function XXe(t,e,n,i,s,o){const r=He,a=Nt,l=Yt,c=ft,u=Yo,d=Li,h=ws,f=en,p=sn,m=Jt,y=tn,b=b8,k=H("layout"),C=H("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,x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),default:w(()=>[g("div",XGe,[s.loadingCustomizations?(v(),A("div",KGe,[_(a,{rows:5,animated:!0})])):s.settings?(v(),A("div",ZGe,[g("div",JGe,[g("h2",null,x(t.$t("Customize the UI features of the portal")),1)]),g("div",QGe,[_(y,{onSubmit:e[20]||(e[20]=Ee(S=>t.doNothing(),["prevent"])),modelValue:s.settings,"onUpdate:modelValue":e[21]||(e[21]=S=>s.settings=S),"label-position":"top"},{default:w(()=>[g("div",eXe,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.dark_mode,"onUpdate:modelValue":e[0]||(e[0]=S=>s.settings.dark_mode=S),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Enable Dark Mode")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("Enables switching between dark and light interface themes, accommodating different lighting conditions and user preferences.")),1)]),g("div",tXe,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.fixed_page_header,"onUpdate:modelValue":e[1]||(e[1]=S=>s.settings.fixed_page_header=S),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Enable Sticky Page headers across portal")),1)]),_:1},8,["modelValue"]),g("p",null,x(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",nXe,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.feed_link_on_sidebar,"onUpdate:modelValue":e[2]||(e[2]=S=>s.settings.feed_link_on_sidebar=S),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Show Default Feed link on left sidebar")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("Adds the default Feed link in the sidebar, providing an extra access point to the all feeds page")),1)]),g("div",sXe,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.collapse_sidebar_groups,"onUpdate:modelValue":e[3]||(e[3]=S=>s.settings.collapse_sidebar_groups=S),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Collapse sidebar groups by default")),1)]),_:1},8,["modelValue"]),g("p",null,x(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",iXe,[_(l,{disabled:!t.has_pro,"true-value":"yes","false-value":"no",modelValue:s.settings.enable_sidebar_toggle,"onUpdate:modelValue":e[4]||(e[4]=S=>s.settings.enable_sidebar_toggle=S),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Enable sidebar collapse on desktop"))+" ",1),t.has_pro?O("",!0):(v(),A("span",oXe,"("+x(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled","modelValue"]),g("p",null,x(t.$t("__SIDEBAR_TOGGLE_DESC")),1)]),g("div",rXe,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.hide_header_on_scroll,"onUpdate:modelValue":e[5]||(e[5]=S=>s.settings.hide_header_on_scroll=S),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Hide Header & Footer on Scroll (Mobile)")),1)]),_:1},8,["modelValue"]),g("p",null,x(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",aXe,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.show_powered_by,"onUpdate:modelValue":e[6]||(e[6]=S=>s.settings.show_powered_by=S),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Show powered by text")),1)]),_:1},8,["modelValue"]),g("p",null,[N(x(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",cXe,x(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,lXe))]),default:w(()=>[g("div",uXe,[g("label",dXe,x(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]=S=>s.settings.affiliate_id=S)},null,8,["placeholder","modelValue"]),Re((v(),D(r,{onClick:o.saveCustomizations,disabled:s.savingCustomizations,class:"fcom_primary_button"},{default:w(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick","disabled"])),[[$,s.savingCustomizations]])]),g("div",hXe,[g("p",null,[N(x(t.$t("Don't have an affiliate account?"))+" ",1),g("a",fXe,x(t.$t("Click here"))+".",1)])])]),_:1})])])):O("",!0),g("div",pXe,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.icon_on_header_menu,"onUpdate:modelValue":e[8]||(e[8]=S=>s.settings.icon_on_header_menu=S),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Show icon on header menu items")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("Adds icons next to text in header menu items, enhancing visual appeal and improving navigation clarity.")),1)]),g("div",mXe,[_(l,{"true-value":"yes","false-value":"no",modelValue:s.settings.show_post_modal,"onUpdate:modelValue":e[9]||(e[9]=S=>s.settings.show_post_modal=S),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Use Modal UI for quick post view")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("If you enable this then, posts will be shown as modal when interacting")),1)]),O("",!0),g("div",gXe,[_(f,{label:t.$t("Rich Media Post Layout")},{default:w(()=>[_(h,{modelValue:s.settings.rich_post_layout,"onUpdate:modelValue":e[11]||(e[11]=S=>s.settings.rich_post_layout=S),class:"fcom_radio_group"},{default:w(()=>[_(d,{value:"classic"},{default:w(()=>[N(x(t.$t("Classic")),1)]),_:1}),_(d,{disabled:!t.has_pro,value:"modern"},{default:w(()=>[N(x(t.$t("Modern"))+" ",1),t.has_pro?O("",!0):(v(),A("span",vXe,"("+x(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",_Xe,[g("p",null,x(t.$t("Classic: Image/Video after the content. Modern: Image/Video at first")),1)])]),_:1},8,["label"])]),g("div",yXe,[_(f,{label:t.$t("Members List Layout")},{default:w(()=>[_(h,{modelValue:s.settings.member_list_layout,"onUpdate:modelValue":e[12]||(e[12]=S=>s.settings.member_list_layout=S),class:"fcom_radio_group"},{default:w(()=>[_(d,{value:"classic"},{default:w(()=>[N(x(t.$t("List View")),1)]),_:1}),_(d,{disabled:!t.has_pro,value:"grid"},{default:w(()=>[N(x(t.$t("Grid View"))+" ",1),t.has_pro?O("",!0):(v(),A("span",bXe,"("+x(t.$t("Available on Pro"))+")",1))]),_:1},8,["disabled"])]),_:1},8,["modelValue"]),g("div",wXe,[g("p",null,x(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",kXe,[_(f,{label:t.$t("Post Title Requirements")},{default:w(()=>[_(h,{modelValue:s.settings.post_title_pref,"onUpdate:modelValue":e[13]||(e[13]=S=>s.settings.post_title_pref=S),class:"fcom_radio_group"},{default:w(()=>[_(d,{value:"optional"},{default:w(()=>[N(x(t.$t("Optional")),1)]),_:1}),_(d,{value:"required"},{default:w(()=>[N(x(t.$t("Required")),1)]),_:1}),_(d,{value:"disabled"},{default:w(()=>[N(x(t.$t("Disabled")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",CXe,[g("p",null,x(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",xXe,[_(f,{label:t.$t("Default Theme Mode")},{default:w(()=>[_(h,{modelValue:s.settings.default_theme_mode,"onUpdate:modelValue":e[14]||(e[14]=S=>s.settings.default_theme_mode=S),class:"fcom_radio_group"},{default:w(()=>[_(d,{value:"light"},{default:w(()=>[N(x(t.$t("Light")),1)]),_:1}),_(d,{value:"dark"},{default:w(()=>[N(x(t.$t("Dark")),1)]),_:1}),_(d,{value:"system"},{default:w(()=>[N(x(t.$t("System")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",SXe,[g("p",null,x(t.$t("New members see the selected theme by default and can change it anytime.")),1)])]),_:1},8,["label"])])):O("",!0),g("div",$Xe,[_(f,{label:t.$t("Default Feed Layout")},{default:w(()=>[_(h,{modelValue:s.settings.default_feed_layout,"onUpdate:modelValue":e[15]||(e[15]=S=>s.settings.default_feed_layout=S),class:"fcom_radio_group"},{default:w(()=>[_(d,{value:"timeline"},{default:w(()=>[N(x(t.$t("Timeline View")),1)]),_:1}),_(d,{value:"list"},{default:w(()=>[N(x(t.$t("List View")),1)]),_:1}),_(d,{value:"card"},{default:w(()=>[N(x(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]=S=>s.settings.disable_feed_layout=S),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Disable Layout Style Change Option")),1)]),_:1},8,["modelValue"]),g("div",AXe,[s.settings.disable_feed_layout==="yes"?(v(),A("p",EXe,x(t.$t("The selected layout will be applied for all members. They cannot switch to a different view.")),1)):(v(),A("p",MXe,x(t.$t("User can change the layout style to their own preference.")),1))])]),g("div",TXe,[_(f,{label:t.$t("Max Media Per Post")},{default:w(()=>[_(c,{modelValue:s.settings.max_media_per_post,"onUpdate:modelValue":e[17]||(e[17]=S=>s.settings.max_media_per_post=S),placeholder:t.$t("Max Media Per Post"),type:"number",min:1,max:100},null,8,["modelValue","placeholder"])]),_:1},8,["label"])]),g("div",PXe,[_(f,{label:t.$t("Default Feed Sort By")},{default:w(()=>[_(m,{modelValue:s.settings.default_feed_sort_by,"onUpdate:modelValue":e[18]||(e[18]=S=>s.settings.default_feed_sort_by=S),clearable:"",class:"fcom_select",placeholder:t.$t("Latest Posts Sort")},{default:w(()=>[(v(!0),A(ee,null,we(s.postOrderOptions,(S,M)=>(v(),D(p,{key:M,value:M,label:S},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]=S=>s.settings.disable_feed_sort_by=S),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Disable Feed Sort By Options")),1)]),_:1},8,["modelValue"])]),g("div",IXe,[Re((v(),D(r,{onClick:o.saveCustomizations,disabled:s.savingCustomizations,class:"fcom_primary_button"},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[$,s.savingCustomizations]])])]),_:1},8,["modelValue"])])])):(v(),A("div",LXe,[g("p",null,x(t.$t("Customizations could not be loaded")),1)])),e[24]||(e[24]=g("div",{style:{"margin-top":"30px"}},null,-1)),t.has_pro?(v(),A(ee,{key:3},[s.loadingSnippets?(v(),A("div",OXe,[_(a,{rows:5,animated:!0})])):s.snippetsSettings?(v(),A("div",DXe,[g("div",RXe,[g("h2",null,x(t.$t("Custom Snippets")),1)]),g("div",VXe,[g("div",FXe,[g("h3",null,x(t.$t("Custom CSS")),1),g("p",null,x(t.$t("You can write your custom CSS here for the portal. Please do not include %s tag","<style> </style>")),1)]),g("div",NXe,[_(c,{placeholder:t.$t("Your CSS Code"),type:"textarea",modelValue:s.snippetsSettings.custom_css,"onUpdate:modelValue":e[22]||(e[22]=S=>s.snippetsSettings.custom_css=S),rows:5},null,8,["placeholder","modelValue"])]),_(b),g("div",BXe,[g("h3",null,x(t.$t("Custom JavaScript")),1),g("p",null,x(t.$t("You can write your custom JavaScript (with script tag), analytics code, and more here for the portal")),1)]),g("div",zXe,[_(c,{placeholder:t.$t("Your Javascript or Analytics Code"),type:"textarea",modelValue:s.snippetsSettings.custom_js,"onUpdate:modelValue":e[23]||(e[23]=S=>s.snippetsSettings.custom_js=S),rows:5},null,8,["placeholder","modelValue"])]),g("div",HXe,[Re((v(),D(r,{onClick:o.saveSnippets,disabled:s.savingSnippets,class:"fcom_primary_button"},{default:w(()=>[N(x(t.$t("Save Custom CSS & JS")),1)]),_:1},8,["onClick","disabled"])),[[$,s.savingSnippets]])])])])):(v(),A("div",UXe,[g("p",null,x(t.$t("Custom Snippets could not be loaded")),1)]))],64)):(v(),A("div",jXe,[g("div",WXe,[g("h2",null,x(t.$t("Custom Snippets")),1)]),g("div",YXe,[g("p",qXe,x(t.$t("__CUSTOM_SNIPPETS_PROMO__")),1),g("a",{class:"el-button fcom_primary_button",href:t.$upgradeUrl("feature_lock_customization"),target:"_blank"},x(t.$t("Upgrade to Pro")),9,GXe)])]))])]),_:1},8,["title"])]),_:1})}const KXe=ue(GGe,[["render",XXe]]),ZXe={name:"EmailNotification",components:{ImageUploader:Ll,CrepeEditor:cu,Layout:_i,AppLayout:yi},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"))}},JXe={class:"settings_router fcom_mb_20"},QXe={key:0,class:"white_loaded"},eKe={key:1,class:"fhr_content_layout_body"},tKe={class:"setting_body"},nKe={style:{"font-size":"18px",margin:"0",padding:"0"}},sKe={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},iKe={class:"fcom_help_text"},oKe={class:"fcom_help_text"},rKe={class:"fcom_help_text"},aKe={class:"fcom_help_text"},lKe={class:"fcom_extra_editor"},cKe={class:"fcom_help_text"},uKe=["innerHTML"],dKe=["src","alt"],hKe={class:"fcom_image_uploader_wrapper"},fKe={class:"setting_body"},pKe={style:{"font-size":"18px",margin:"0",padding:"0"}},mKe={style:{margin:"5px 0","font-size":"90%","line-height":"120%"}},gKe={key:0,class:"fcom_help_text"},vKe={key:0,class:"fcom_help_text"},_Ke={key:0,class:"fcom_help_text"},yKe={class:"fcom_help_text"},bKe={key:0,class:"fcom_help_text"},wKe={class:"fcom_meta_text"},kKe={class:"setting_body"},CKe={key:2};function xKe(t,e,n,i,s,o){const r=He,a=Nt,l=ft,c=en,u=jd,d=sn,h=Jt,f=Ud,p=H("crepe-editor"),m=H("EditPen"),y=be,b=H("Delete"),k=H("ImageUploader"),C=Yt,$=M8,S=tn,M=H("layout"),P=H("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(()=>[Re((v(),D(r,{class:"fcom_primary_button",onClick:o.save},{default:w(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[T,s.saving]])]),default:w(()=>[g("div",JXe,[s.loading?(v(),A("div",QXe,[_(a,{rows:5,animated:!0})])):s.email_settings?(v(),A("div",eKe,[_(S,{onSubmit:e[14]||(e[14]=Ee(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",tKe,[g("h3",nKe,x(t.$t("Mailing Settings")),1),g("p",sKe,x(t.$t("Set your from name, email, and email footer. These configurations will be used to send emails from FluentCommunity.")),1),e[16]||(e[16]=g("hr",null,null,-1)),_(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",iKe,[g("p",null,x(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,we(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",oKe,[g("p",null,x(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",rKe,[g("p",null,x(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",aKe,[g("p",null,x(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",lKe,[_(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",cKe,[g("p",null,x(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,uKe)])]),_: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,dKe)):O("",!0),g("div",hKe,[_(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})},hs({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(()=>[N(x(t.$t("Disable powered by FluentCommunity in the email footer")),1)]),_:1},8,["modelValue"])]),_:1})):O("",!0)]),_:1})]),_:1})]),e[18]||(e[18]=g("hr",null,null,-1)),g("div",fKe,[g("h3",pKe,x(t.$t("Email Notification Settings")),1),g("p",mKe,x(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),e[17]||(e[17]=g("hr",null,null,-1)),_(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(()=>[N(x(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",gKe,[g("p",null,x(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(()=>[N(x(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",vKe,[g("p",null,x(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(()=>[N(x(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",_Ke,[g("p",null,x(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(()=>[N(x(t.$t("Enable Weekly Digest Email for community members")),1)]),_:1},8,["modelValue"]),g("div",yKe,[g("p",null,x(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",bKe,[g("p",null,x(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",wKe,x(t.$t("Approximate time when the digest emails will start sending for the members")),1)]),_:1},8,["label"])]),_:1})]),_:1})]),e[19]||(e[19]=g("hr",null,null,-1)),g("div",kKe,[Re((v(),D(r,{onClick:o.save,disabled:s.saving,class:"fcom_primary_button"},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[T,s.saving]])])]),_:1},8,["modelValue"])])):(v(),A("div",CKe,[g("p",null,x(t.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const SKe=ue(ZXe,[["render",xKe]]),$Ke={name:"UpgradeToProModal",props:{showModal:{type:Boolean,default:!0},upgrade_module:{type:String,required:!0}},data(){return{openModal:this.showModal,upgradeModule:Pwe[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")}}},AKe={class:"fcom_upgrade_header"},EKe={class:"dialog_body"},MKe={class:"fcom_upgrade_banner"},TKe=["href"],PKe={class:"fcom_upgrade_content"},IKe={key:0,class:"fcom_feature_image"},LKe=["src","alt"],OKe={class:"fcom_upgrade_body"},DKe={class:"fcom_upgrade_description"},RKe=["href"];function VKe(t,e,n,i,s,o){const r=Va;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",AKe,[g("h4",null,x(s.upgradeModule.headerTitle),1),g("p",null,x(s.upgradeModule.headerDescription),1)])]),default:w(()=>[g("div",EKe,[g("div",MKe,[g("p",null," 🎉 "+x(t.$t("Discover exciting new features now!")),1),g("a",{href:o.upgradeUrl,target:"_blank"},x(t.$t("Upgrade Now")),9,TKe)]),g("div",PKe,[s.upgradeModule.featureImage?(v(),A("div",IKe,[g("img",{src:t.appVars.assets_url+"images/upgrades/"+s.upgradeModule.featureImage,alt:s.upgradeModule.headerTitle},null,8,LKe)])):O("",!0),g("div",OKe,[g("h4",null,x(s.upgradeModule.bodyTitle),1),g("p",DKe,x(s.upgradeModule.bodyDescription),1),g("a",{class:"el-button fcom_primary_button",href:o.upgradeUrl,target:"_blank"},x(t.$t("Upgrade to Pro")),9,RKe)])])])]),_:1},8,["modelValue"])}const Qd=ue($Ke,[["render",VKe]]),FKe={name:"StorageSettings",props:["features"],components:{UpgradeToProModal:Qd},data(){return{openUpgradeModal:!1,storageConfig:!1,showSettings:!1,fetching:!1,saving:!1,s3Locations:{},bunnyLocations:{}}},methods:{docsNotice(t,e){const n='<a target="_blank" rel="noopener" href="'+t+'">';return this.$t("Please %1$sRead the documentation first%2$s to configure %3$s.",n,"</a>",e)},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()}},NKe={class:"fcom_storage_settings"},BKe={class:"dialog_header"},zKe={class:"dialog_left"},HKe={key:0,class:"white_loaded"},UKe={key:1,class:"dialog_body"},jKe={key:0},WKe=["innerHTML"],YKe={class:"fcom_cloudflare_settings"},qKe=["innerHTML"],GKe={class:"fcom_s3_settings"},XKe=["innerHTML"],KKe={class:"fcom_cloudflare_settings"},ZKe={key:3,class:"fcom_mb_10"},JKe={class:"dialog_footer"},QKe={key:2};function eZe(t,e,n,i,s,o){const r=He,a=Nt,l=Hd,c=ws,u=en,d=ft,h=sn,f=Jt,p=tn,m=$s,y=H("UpgradeToProModal"),b=xt("loading");return v(),A(ee,null,[g("div",NKe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=k=>o.openSettings())},{default:w(()=>{var k;return[N(x(t.$t("Configure"))+" ("+x((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",BKe,[g("div",zKe,[g("div",null,[g("h4",null,x(t.$t("Configure Media Storage")),1)])])])]),default:w(()=>[s.fetching?(v(),A("div",HKe,[_(a,{rows:5,animated:!0})])):s.storageConfig?(v(),A("div",UKe,[s.storageConfig.is_defined?(v(),A("p",jKe,x(t.$t("__CLOUD_STORAGE_CONFIGURED")),1)):(v(),A(ee,{key:1},[_(p,{onSubmit:e[17]||(e[17]=Ee(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(()=>[N(x(t.$t("Server Storage")),1)]),_:1}),_(l,{value:"cloudflare_r2"},{default:w(()=>[N(x(t.$t("Cloudflare R2 (Recommended)")),1)]),_:1}),_(l,{value:"amazon_s3"},{default:w(()=>[N(x(t.$t("Amazon S3")),1)]),_:1}),_(l,{value:"bunny_cdn"},{default:w(()=>[N(x(t.$t("BunnyCDN")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"]),s.storageConfig.driver==="cloudflare_r2"?(v(),A(ee,{key:0},[g("p",{innerHTML:o.docsNotice("https://fluentcommunity.co/docs/configuring-cloudflare-r2/","Cloudflare R2")},null,8,WKe),e[20]||(e[20]=g("hr",null,null,-1)),g("div",YKe,[_(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},[g("p",{innerHTML:o.docsNotice("https://fluentcommunity.co/docs/configuring-amazon-s3/","Amazon S3")},null,8,qKe),e[21]||(e[21]=g("hr",null,null,-1)),g("div",GKe,[_(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,we(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},[g("p",{innerHTML:o.docsNotice("https://fluentcommunity.co/docs/configuring-bunnycdn","BunnyCDN")},null,8,XKe),e[22]||(e[22]=g("hr",null,null,-1)),g("div",KKe,[_(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,we(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",ZKe,x(t.$t("Your files will be stored in the default Uploads folder")),1))]),_:1}),g("div",JKe,[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[b,s.saving]])])],64))])):(v(),A("div",QKe,[g("p",null,x(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 tZe=ue(FKe,[["render",eZe]]),nZe={name:"LeaderBoardConfig",props:["features"],emits:["saveSettings"],data(){return{levels:null,excludedUserIds:[],showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1,users:[],usersLoaded:!1}},components:{UpgradeToProModal:Qd},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})}}},sZe={class:"fcom_storage_settings"},iZe={key:0,class:"white_loaded"},oZe={key:1,class:"dialog_body"},rZe={class:"fcom_mb_20"},aZe={class:"fcom_level_table"},lZe={class:"fcom_level_table_row fcom_header_row"},cZe={class:"fcom_lavel_desc"},uZe={class:"fcom_lavel_actions"},dZe={class:"fcom_lavel_num"},hZe={class:"fcom_lavel_desc"},fZe={class:"fcom_lavel_actions"},pZe={class:"fcom_user_selector fcom_mb_20"},mZe={class:"fcom_mb_20"},gZe={style:{float:"left"}},vZe={style:{float:"right",color:"#8492a6","font-size":"13px"}},_Ze={class:"dialog_footer"},yZe={key:2};function bZe(t,e,n,i,s,o){const r=He,a=Nt,l=Yt,c=en,u=ft,d=sn,h=Jt,f=tn,p=Va,m=H("UpgradeToProModal"),y=xt("loading");return v(),A(ee,null,[g("div",sZe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=b=>o.openSettings())},{default:w(()=>[N(x(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,x(t.$t("Leaderboard / Gamification Settings")),1)]),default:w(()=>[s.fetching?(v(),A("div",iZe,[_(a,{rows:5,animated:!0})])):s.levels?(v(),A("div",oZe,[_(f,{onSubmit:e[3]||(e[3]=Ee(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",rZe,x(t.$t("Leaderboard Levels")),1),g("div",aZe,[g("div",lZe,[e[6]||(e[6]=g("div",{class:"fcom_lavel_num"}," # ",-1)),g("div",cZe,x(t.$t("Title & Description")),1),g("div",uZe,x(t.$t("Minimum Points")),1)]),(v(!0),A(ee,null,we(s.levels,(b,k,C)=>(v(),A("div",{class:"fcom_level_table_row",key:k},[g("div",dZe,x(C+1),1),g("div",hZe,[_(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",fZe,[_(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",pZe,[g("h5",mZe,x(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,we(s.users,b=>(v(),D(d,{key:b.ID,label:b.display_name+" ("+b.user_email+")",value:b.ID},{default:w(()=>[g("span",gZe,x(b.display_name),1),g("span",vZe,x(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",_Ze,[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[y,s.saving]])])])):(v(),A("div",yZe,[g("p",null,x(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 wZe=ue(nZe,[["render",bZe]]),kZe={name:"UserBadgesConfig",components:{LogoEmojiSelector:Z1,UpgradeToProModal:Qd,Drawer:tu,FluentDnD:za},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._savedOrder=this.badgeOrderKey(),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._savedOrder=this.badgeOrderKey(),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),this.fetchSettings()}).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()},onBadgeDrop(){clearTimeout(this._reorderTimer),this._reorderTimer=setTimeout(()=>{this.badgeOrderKey()!==this._savedOrder&&this.saveBadgeSettings()},400)},badgeOrderKey(){return this.badges.map(t=>t.slug).join(",")}},beforeUnmount(){clearTimeout(this._reorderTimer)}},CZe={class:"fcom_storage_settings"},xZe={key:0,class:"white_loaded"},SZe={key:1},$Ze={class:"header_user_badge"},AZe={class:"fcom_user_badges fcom_manager_table fcom_badge_dnd"},EZe={key:0,class:"fcom_badge_row fcom_badge_row_head"},MZe={class:"col_title"},TZe={class:"col_preview"},PZe={class:"col_actions"},IZe={class:"fcom_badge_row"},LZe=["title"],OZe={class:"col_title"},DZe={class:"col_preview"},RZe={class:"fcom_badge_preview"},VZe={class:"col_actions"},FZe={class:"fcom_table_action_col"},NZe=["onClick"],BZe=["onClick"],zZe={key:2,class:"fcom_badge_empty"},HZe={key:2};function UZe(t,e,n,i,s,o){const r=He,a=Nt,l=Yt,c=en,u=H("UserBadge"),d=H("Edit"),h=be,f=H("Delete"),p=H("FluentDnD"),m=tn,y=H("Drawer"),b=H("logo-emoji-selector"),k=ft,C=Qc,$=jd,S=Ud,M=$s,P=H("UpgradeToProModal"),T=xt("loading");return v(),A(ee,null,[g("div",CZe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=I=>o.openSettings())},{default:w(()=>[N(x(t.$t("Settings")),1)]),_:1})]),_(y,{modelValue:s.showSettings,"onUpdate:modelValue":e[4]||(e[4]=I=>s.showSettings=I),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",xZe,[_(a,{rows:5,animated:!0})])):s.badges?(v(),A("div",SZe,[_(m,{onSubmit:e[3]||(e[3]=Ee(I=>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]=I=>n.features.user_badge=I),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",$Ze,[g("h3",null,x(t.$t("User Badges")),1),_(r,{class:"fcom_secondary_button",onClick:e[2]||(e[2]=I=>o.initAddNew()),size:"small"},{default:w(()=>[N(x(t.$t("Add New")),1)]),_:1})]),g("div",AZe,[s.badges.length?(v(),A("div",EZe,[e[16]||(e[16]=g("span",{class:"col_handle"},null,-1)),g("span",MZe,x(t.$t("Title")),1),g("span",TZe,x(t.$t("Preview")),1),g("span",PZe,x(t.$t("Actions")),1)])):O("",!0),s.badges.length?(v(),D(p,{key:1,items:s.badges,"row-key":"slug",onDrop:o.onBadgeDrop},{item:w(({data:I})=>[g("div",IZe,[g("span",{class:"col_handle fcom_drag_handle",title:t.$t("Drag to reorder")},"⋮⋮",8,LZe),g("span",OZe,x(I.title),1),g("span",DZe,[g("div",RZe,[_(u,{is_preview:!0,badge:I},null,8,["badge"])])]),g("span",VZe,[g("div",FZe,[g("div",{onClick:L=>o.initEdit(I),class:"action_item clickable"},[_(h,null,{default:w(()=>[_(d)]),_:1})],8,NZe),g("div",{class:"action_item clickable",onClick:L=>o.deleteBadge(I)},[_(h,null,{default:w(()=>[_(f)]),_:1})],8,BZe)])])])]),_:1},8,["items","onDrop"])):(v(),A("p",zZe,x(t.$t("No badges have been configured.")),1))])],64)):O("",!0),_(c,null,{default:w(()=>[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[T,s.saving]])]),_:1})]),_:1})])):(v(),A("div",HZe,[g("p",null,x(t.$t("Config could not be loaded")),1)]))]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"]),_(M,{"append-to-body":!0,modelValue:s.showEditBagdeModal,"onUpdate:modelValue":e[14]||(e[14]=I=>s.showEditBagdeModal=I),title:t.$t("Edit Badge"),width:"30%"},{default:w(()=>[s.editingBadge?(v(),D(m,{key:0,onSubmit:e[13]||(e[13]=Ee(I=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(c,{label:t.$t("Title")},{default:w(()=>[_(k,{modelValue:s.editingBadge.title,"onUpdate:modelValue":e[6]||(e[6]=I=>s.editingBadge.title=I),placeholder:t.$t("Badge Title")},{prepend:w(()=>{var I,L;return[_(b,{fallback_mark:"",custom_svg:!0,onUpdate:e[5]||(e[5]=R=>{s.editingBadge.config.emoji=R.emoji,s.editingBadge.config.logo=R.logo,s.editingBadge.config.shape_svg=R.shape_svg}),config:{logo:s.editingBadge.config.logo,emoji:((I=s.editingBadge.config)==null?void 0:I.emoji)||"",shape_svg:(L=s.editingBadge.config)==null?void 0:L.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]=I=>s.editingBadge.show_label=I),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Show Label on Badge")),1)]),_:1},8,["modelValue"])]),_:1}),s.editingBadge.show_label=="yes"?(v(),A(ee,{key:0},[_(S,{gutter:20},{default:w(()=>[_($,{span:12},{default:w(()=>[_(c,{label:t.$t("Color")},{default:w(()=>[_(C,{predefine:t.appVars.suggestedColors,onActiveChange:e[8]||(e[8]=I=>{s.editingBadge.color=I}),modelValue:s.editingBadge.color,"onUpdate:modelValue":e[9]||(e[9]=I=>s.editingBadge.color=I)},null,8,["predefine","modelValue"])]),_:1},8,["label"])]),_:1}),_($,{span:12},{default:w(()=>[_(c,{label:t.$t("Background Color")},{default:w(()=>[_(C,{predefine:t.appVars.suggestedColors,onActiveChange:e[10]||(e[10]=I=>{s.editingBadge.background_color=I}),modelValue:s.editingBadge.background_color,"onUpdate:modelValue":e[11]||(e[11]=I=>s.editingBadge.background_color=I)},null,8,["predefine","modelValue"])]),_:1},8,["label"])]),_:1})]),_:1}),g("p",null,x(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]=I=>o.closeEdit())},{default:w(()=>[N(x(t.$t("Save")),1)]),_:1})]),_:1})]),_:1})):O("",!0)]),_:1},8,["modelValue","title"]),s.openUpgradeModal?(v(),D(P,{key:0,showModal:s.openUpgradeModal,onCloseModal:e[15]||(e[15]=I=>s.openUpgradeModal=!1),upgrade_module:"user_badge_module"},null,8,["showModal"])):O("",!0)],64)}const jZe=ue(kZe,[["render",UZe],["__scopeId","data-v-cde5da01"]]),WZe={name:"SocialMediaLinkConfig",components:{Drawer:tu},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})}}},YZe={class:"fcom_storage_settings"},qZe={key:0,class:"white_loaded"},GZe={key:1,class:"dialog_body"},XZe={class:"fcom_level_table"},KZe={class:"fcom_level_table_row fcom_header_row"},ZZe={class:"fcom_lavel_desc"},JZe={class:"fcom_lavel_actions"},QZe={style:{display:"flex","align-items":"center","column-gap":"10px"},class:"fcom_lavel_desc"},eJe=["innerHTML"],tJe={class:"fcom_lavel_actions"},nJe={class:"dialog_footer"},sJe={key:1,class:"fcom_upgrade_banner"},iJe={class:"fcom_upgrade_description"},oJe=["href"],rJe={key:2};function aJe(t,e,n,i,s,o){const r=He,a=Nt,l=be,c=hi,u=eu,d=H("Drawer"),h=xt("loading");return v(),A(ee,null,[g("div",YZe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=f=>o.openSettings())},{default:w(()=>[N(x(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",qZe,[_(a,{rows:5,animated:!0})])):s.providers?(v(),A("div",GZe,[g("div",XZe,[g("div",KZe,[g("div",ZZe,x(t.$t("Provider")),1),g("div",JZe,x(t.$t("Status")),1)]),(v(!0),A(ee,null,we(s.providers,(f,p)=>(v(),A("div",{style:{padding:"5px 10px"},class:"fcom_level_table_row",key:p},[g("div",QZe,[_(l,null,{default:w(()=>[g("span",{innerHTML:f.icon_svg},null,8,eJe)]),_:2},1024),g("span",null,x(f.title),1),f.enabled==="yes"?(v(),D(c,{key:0,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):(v(),D(c,{key:1,type:"info",size:"small"},{default:w(()=>[N(x(t.$t("disabled")),1)]),_:1}))]),g("div",tJe,[_(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",nJe,[t.has_pro?Re((v(),D(r,{key:0,class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[h,s.saving]]):(v(),A("div",sJe,[g("p",iJe,x(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"},x(t.$t("Upgrade to Pro")),9,oJe)]))])])):(v(),A("div",rJe,[g("p",null,x(t.$t("Config could not be loaded")),1)]))]),_:1},8,["modelValue","size","title","has-close-confirmation","close-confirmation-message"])],64)}const lJe=ue(WZe,[["render",aJe]]),cJe={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()}},uJe={key:1},dJe={class:"fcom_help_text"},hJe={key:0},fJe={key:1},pJe={class:"fcom_help_text"},mJe={class:"fcom_help_text"},gJe={class:"fcom_section_divider"},vJe={class:"fcom_help_text"},_Je={key:0},yJe={key:1},bJe={class:"fcom_help_text"},wJe={key:0},kJe={key:1},CJe={key:2},xJe={class:"fcom_help_text"},SJe={key:2},$Je={class:"dialog_footer"},AJe={key:1,class:"fcom_upgrade_banner"},EJe={class:"fcom_upgrade_description"},MJe=["href"];function TJe(t,e,n,i,s,o){const r=Nt,a=Yt,l=en,c=Li,u=ws,d=r2,h=sa,f=ft,p=sn,m=Jt,y=tn,b=He,k=xt("loading");return v(),A(ee,null,[s.loading?(v(),D(r,{key:0,animated:!0,rows:5})):s.settings?(v(),A("div",uJe,[_(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(()=>[N(x(t.$t("Send email notification on one-to-one messages (unread) to individual members")),1)]),_:1},8,["modelValue"]),g("div",dJe,[s.settings.messaging_email_status=="no"?(v(),A("p",hJe,x(t.$t("Email notification on messaging is disabled")),1)):(v(),A("p",fJe,x(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",pJe,[g("p",null,x(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",mJe,[g("p",null,x(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",gJe,[g("h4",null,x(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(()=>[N(x(t.$t("Enable Real-time Chat")),1)]),_:1},8,["modelValue"]),g("div",vJe,[s.settings.realtime_enabled==="no"?(v(),A("p",_Je,x(t.$t("Real-time chat is disabled. Messages will be delivered on page refresh.")),1)):(v(),A("p",yJe,x(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(()=>[N(x(t.$t("Fluent Socket")),1)]),_:1}),_(c,{value:"pusher"},{default:w(()=>[N(x(t.$t("Pusher")),1)]),_:1}),_(c,{value:"custom"},{default:w(()=>[N(x(t.$t("Custom")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",bJe,[s.settings.socket_provider==="fluent-socket"?(v(),A("p",wJe,[N(x(t.$t("Use the built-in Fluent Socket server. You can create your free credentials at"))+" ",1),e[15]||(e[15]=g("a",{href:"https://fluentsocket.com/",target:"_blank",rel:"noopener"},"fluentsocket.com",-1))])):s.settings.socket_provider==="pusher"?(v(),A("p",kJe,x(t.$t("Use Pusher.com for WebSocket connections")),1)):(v(),A("p",CJe,x(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(()=>[N(x(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",xJe,[g("p",null,x(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:t.$t("HTTPS (Secure)")},null,8,["label"]),_(p,{value:"http",label:"HTTP"})]),_:1},8,["modelValue"])]),_:1},8,["label"])],64)):O("",!0)],64)):O("",!0)]),_:1},8,["modelValue"])])):(v(),A("div",SJe,[g("h3",null,x(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",$Je,[t.has_pro?Re((v(),D(b,{key:0,class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[k,s.saving]]):(v(),A("div",AJe,[g("p",EJe,x(t.$t("Please upgrade to Pro to use this feature")),1),g("a",{class:"el-button",href:t.$upgradeUrl("feature_lock_messaging"),target:"_blank"},x(t.$t("Upgrade to Pro")),9,MJe)]))])],64)}const PJe=ue(cJe,[["render",TJe]]),IJe={name:"FollowingConfigView",props:["features"],data(){return{follower_settings:null,showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1}},components:{UpgradeToProModal:Qd},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})}}},LJe={class:"fcom_storage_settings"},OJe={key:0,class:"white_loaded"},DJe={key:1,class:"dialog_body"},RJe={class:"fcom_mb_20"},VJe={class:"dialog_footer"},FJe={key:2};function NJe(t,e,n,i,s,o){const r=He,a=Nt,l=Yt,c=en,u=Li,d=ws,h=tn,f=Va,p=H("UpgradeToProModal"),m=xt("loading");return v(),A(ee,null,[g("div",LJe,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=y=>o.openSettings())},{default:w(()=>[N(x(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,x(t.$t("Follower Module Settings")),1)]),default:w(()=>[s.fetching?(v(),A("div",OJe,[_(a,{rows:5,animated:!0})])):s.follower_settings?(v(),A("div",DJe,[_(h,{onSubmit:e[4]||(e[4]=Ee(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",RJe,x(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",VJe,[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[m,s.saving]])])])):(v(),A("div",FJe,[g("p",null,x(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 BJe=ue(IJe,[["render",NJe]]),zJe={name:"FluentPlayerCustomization",components:{InfoFilled:wl},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}}},HJe={key:0,class:"fluent-player-top-title-overlay"},UJe={class:"fluent-player-title-stack"},jJe={class:"fluent-player-media-title"},WJe={key:1,class:"fp-media-controls-center"},YJe={class:"fp-controls-group center"},qJe={key:2,class:"fp-media-controls-bottom"},GJe={key:0,class:"fp-controls-group"},XJe={key:0,class:"fp-media-button vds-button"},KJe={key:1,class:"fp-media-button vds-button"},ZJe={key:2,class:"fp-media-button vds-button"},JJe={key:3,class:"fp-media-button vds-button"},QJe={key:4,class:"fp-media-slider vds-time-slider slider-volume"},eQe={key:5,class:"fp-media-time-group"},tQe={key:6,class:"fp-media-controls-spacer-slider"},nQe={key:7,class:"fp-media-button vds-button"},sQe={key:8,class:"fp-media-button vds-button"},iQe={key:9,class:"fp-media-button vds-button"},oQe={key:10,class:"fp-media-button vds-button"},rQe={key:11,class:"fp-media-button vds-button"},aQe={key:0,class:"fp-media-slider vds-time-slider"},lQe={key:1,class:"fp-controls-group"},cQe={key:0,class:"fp-media-button vds-button"},uQe={key:1,class:"fp-media-button vds-button"},dQe={key:2,class:"fp-media-button vds-button"},hQe={key:3,class:"fp-media-button vds-button"},fQe={key:4,class:"fp-media-slider vds-time-slider slider-volume"},pQe={key:5,class:"fp-media-time-group"},mQe={key:6,class:"fp-media-button vds-button"},gQe={key:7,class:"fp-media-button vds-button"},vQe={key:8,class:"fp-media-button vds-button"},_Qe={key:9,class:"fp-media-button vds-button"},yQe={key:10,class:"fp-media-button vds-button"},bQe={key:2,class:"fp-controls-group"},wQe={key:0,class:"fp-media-button vds-button"},kQe={key:1,class:"fp-media-button vds-button"},CQe={key:2,class:"fp-media-slider vds-time-slider slider-volume"},xQe={key:3,class:"fp-media-button vds-button"},SQe={key:4,class:"fp-media-button vds-button"},$Qe={key:5,class:"fp-media-button vds-button"},AQe={key:3,class:"fp-controls-group fp-floating-bar"},EQe={key:0,class:"fp-media-button vds-button"},MQe={key:1,class:"fp-media-button vds-button"},TQe={key:2,class:"fp-media-button vds-button"},PQe={key:3,class:"fp-media-time-group"},IQe={key:4,class:"fp-media-controls-spacer-slider"},LQe={key:5,class:"fp-media-button vds-button"},OQe={key:6,class:"fp-media-slider vds-time-slider slider-volume"},DQe={key:7,class:"fp-media-button vds-button"},RQe={key:8,class:"fp-media-button vds-button"},VQe={key:9,class:"fp-media-button vds-button"},FQe={key:10,class:"fp-media-button vds-button"},NQe={key:11,class:"fp-media-button vds-button"},BQe={class:"player_settings_wrap"},zQe={class:"setting_row"},HQe={class:"setting_row_flex"},UQe={class:"setting_row_flex"},jQe={class:"setting_row_flex"},WQe={class:"setting_row_flex"},YQe={key:0,class:"setting_row"},qQe={key:1,class:"setting_row"},GQe={key:2,class:"setting_row"},XQe={key:3,class:"setting_row"},KQe={key:4,class:"setting_row"},ZQe={key:5,class:"setting_row"},JQe={key:6,class:"setting_row"},QQe={key:7,class:"setting_row"},eet={key:8,class:"setting_row"},tet={key:9,class:"setting_row"},net={key:10,class:"setting_row"},set={key:1,class:"setting_row"},iet={class:"setting_row"},oet={key:2,class:"setting_row"},ret={key:3,class:"setting_row"},aet={key:4,class:"setting_row"},cet={class:"setting_row setting_row--column"},uet={class:"setting_row__label-with-icon"},det={class:"fcom_help_text"},het={class:"fcom_form_label"},fet={class:"fcom_help_text"};function pet(t,e,n,i,s,o){const r=jd,a=sn,l=Jt,c=Qc,u=eu,d=H("InfoFilled"),h=be,f=Ss,p=Ud,m=en,y=Li,b=ws;return v(),A("div",{class:q(["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:q(["player-preview","fp-skin-"+o.localSettings.skin])},[o.localSettings.skin!=="minimal"&&!o.behaviors.hide_top_controls?(v(),A("div",HJe,[g("div",UJe,[g("span",jJe,x(t.$t("The Title of the Video")),1)])])):O("",!0),o.behaviors.hide_center_controls?O("",!0):(v(),A("div",WJe,[g("div",YJe,[g("button",{onClick:e[0]||(e[0]=Ee(k=>t.doNothing(),["prevent"])),class:"fp-media-button vds-button"},[...e[26]||(e[26]=[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)])])])])),o.localSettings.skin!=="minimal"&&!o.behaviors.hide_bottom_controls?(v(),A("div",qJe,[o.localSettings.skin==="modern"?(v(),A("div",GJe,[o.controls.backward?(v(),A("button",XJe,[...e[27]||(e[27]=[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)])])):O("",!0),o.controls.play?(v(),A("button",KJe,[...e[28]||(e[28]=[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)])])):O("",!0),o.controls.forward?(v(),A("button",ZJe,[...e[29]||(e[29]=[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)])])):O("",!0),o.controls.volume?(v(),A("button",JJe,[...e[30]||(e[30]=[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)])])):O("",!0),o.controls.volume?(v(),A("div",QJe,[...e[31]||(e[31]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),o.controls.current_time?(v(),A("div",eQe,[...e[32]||(e[32]=[g("span",null,"0:00",-1),g("span",null,"/",-1),g("span",null,"5:34",-1)])])):O("",!0),o.controls.progress_bar?(v(),A("div",tQe,[...e[33]||(e[33]=[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)])])):O("",!0),o.controls.captions_toggle?(v(),A("button",nQe,[...e[34]||(e[34]=[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)])])):O("",!0),o.controls.playback_speed?(v(),A("button",sQe,[...e[35]||(e[35]=[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)])])):O("",!0),o.controls.settings?(v(),A("button",iQe,[...e[36]||(e[36]=[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)])])):O("",!0),o.controls.pip?(v(),A("button",oQe,[...e[37]||(e[37]=[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)])])):O("",!0),o.controls.fullscreen?(v(),A("button",rQe,[...e[38]||(e[38]=[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)])])):O("",!0)])):O("",!0),o.localSettings.skin==="classic"?(v(),A(ee,{key:1},[o.controls.progress_bar?(v(),A("div",aQe,[...e[39]||(e[39]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),o.localSettings.skin==="classic"?(v(),A("div",lQe,[o.controls.backward?(v(),A("button",cQe,[...e[40]||(e[40]=[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)])])):O("",!0),o.controls.play?(v(),A("button",uQe,[...e[41]||(e[41]=[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)])])):O("",!0),o.controls.forward?(v(),A("button",dQe,[...e[42]||(e[42]=[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)])])):O("",!0),o.controls.volume?(v(),A("button",hQe,[...e[43]||(e[43]=[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)])])):O("",!0),o.controls.volume?(v(),A("div",fQe,[...e[44]||(e[44]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),o.controls.current_time?(v(),A("div",pQe,[...e[45]||(e[45]=[g("span",null,"0:00",-1),g("span",null,"/",-1),g("span",null,"5:34",-1)])])):O("",!0),e[51]||(e[51]=g("div",{class:"fp-media-controls-spacer"},null,-1)),o.controls.captions_toggle?(v(),A("button",mQe,[...e[46]||(e[46]=[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)])])):O("",!0),o.controls.playback_speed?(v(),A("button",gQe,[...e[47]||(e[47]=[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)])])):O("",!0),o.controls.settings?(v(),A("button",vQe,[...e[48]||(e[48]=[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)])])):O("",!0),o.controls.pip?(v(),A("button",_Qe,[...e[49]||(e[49]=[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)])])):O("",!0),o.controls.fullscreen?(v(),A("button",yQe,[...e[50]||(e[50]=[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)])])):O("",!0)])):O("",!0)],64)):O("",!0),o.localSettings.skin==="simple"?(v(),A("div",bQe,[o.controls.play?(v(),A("button",wQe,[...e[52]||(e[52]=[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)])])):O("",!0),o.controls.volume?(v(),A("button",kQe,[...e[53]||(e[53]=[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)])])):O("",!0),o.controls.volume?(v(),A("div",CQe,[...e[54]||(e[54]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),e[58]||(e[58]=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)),o.controls.captions_toggle?(v(),A("button",xQe,[...e[55]||(e[55]=[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)])])):O("",!0),o.controls.pip?(v(),A("button",SQe,[...e[56]||(e[56]=[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)])])):O("",!0),o.controls.fullscreen?(v(),A("button",$Qe,[...e[57]||(e[57]=[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)])])):O("",!0)])):O("",!0),o.localSettings.skin==="floating"?(v(),A("div",AQe,[o.controls.backward?(v(),A("button",EQe,[...e[59]||(e[59]=[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)])])):O("",!0),o.controls.play?(v(),A("button",MQe,[...e[60]||(e[60]=[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)])])):O("",!0),o.controls.forward?(v(),A("button",TQe,[...e[61]||(e[61]=[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)])])):O("",!0),o.controls.current_time?(v(),A("div",PQe,[...e[62]||(e[62]=[g("span",null,"0:00",-1),g("span",null,"/",-1),g("span",null,"5:34",-1)])])):O("",!0),o.controls.progress_bar?(v(),A("div",IQe,[...e[63]||(e[63]=[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)])])):O("",!0),o.controls.volume?(v(),A("button",LQe,[...e[64]||(e[64]=[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)])])):O("",!0),o.controls.volume?(v(),A("div",OQe,[...e[65]||(e[65]=[g("div",{class:"vds-slider-track"},null,-1),g("div",{class:"vds-slider-track-fill vds-slider-track"},null,-1),g("div",{class:"vds-slider-thumb"},null,-1)])])):O("",!0),o.controls.captions_toggle?(v(),A("button",DQe,[...e[66]||(e[66]=[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)])])):O("",!0),o.controls.playback_speed?(v(),A("button",RQe,[...e[67]||(e[67]=[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)])])):O("",!0),o.controls.settings?(v(),A("button",VQe,[...e[68]||(e[68]=[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)])])):O("",!0),o.controls.pip?(v(),A("button",FQe,[...e[69]||(e[69]=[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)])])):O("",!0),o.controls.fullscreen?(v(),A("button",NQe,[...e[70]||(e[70]=[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)])])):O("",!0)])):O("",!0)])):O("",!0)],2)],4)]),_:1}),_(r,{span:7,class:"player_settings_col"},{default:w(()=>[g("div",BQe,[g("div",zQe,[g("span",null,x(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",HQe,[g("label",null,x(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",UQe,[g("label",null,x(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",jQe,[g("label",null,x(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",WQe,[g("label",null,x(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,x(t.$t("Controls")),1),o.isControlVisible("progress_bar")?(v(),A("div",YQe,[g("span",null,x(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",qQe,[g("span",null,x(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",GQe,[g("span",null,x(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",XQe,[g("span",null,x(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",KQe,[g("span",null,x(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",ZQe,[g("span",null,x(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",JQe,[g("span",null,x(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",QQe,[g("span",null,x(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",eet,[g("span",null,x(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",tet,[g("span",null,x(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",net,[g("span",null,x(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,x(t.$t("Behaviors")),1),o.localSettings.skin!=="minimal"?(v(),A("div",set,[g("span",null,x(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",iet,[g("span",null,x(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",oet,[g("span",null,x(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",ret,[g("span",null,x(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",aet,[g("span",null,x(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",cet,[g("span",uet,[N(x(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",det,[g("p",null,x(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",het,x(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(()=>[N(x(t.$t("Admins")),1)]),_:1}),_(y,{value:"admin_moderator",class:"fcom_radio"},{default:w(()=>[N(x(t.$t("Admins and Moderators")),1)]),_:1}),_(y,{value:"everyone",class:"fcom_radio"},{default:w(()=>[N(x(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",fet,[g("p",null,x(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 met=ue(zJe,[["render",pet]]),get={name:"FluentPlayerSettings",components:{FluentPlayerCustomization:met},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()}},vet={key:1},_et={class:"fcom_help_text"},yet={class:"fcom_help_text"},bet={class:"dialog_footer fcom_mt_20"};function wet(t,e,n,i,s,o){const r=Nt,a=eu,l=en,c=H("FluentPlayerCustomization"),u=tn,d=He,h=xt("loading");return s.loading?(v(),D(r,{key:0,animated:!0,rows:5})):s.settings?(v(),A("div",vet,[_(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",_et,[g("p",null,x(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",yet,[g("p",null,x(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",bet,[Re((v(),D(d,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[h,s.saving]])])])):O("",!0)}const ket=ue(get,[["render",wet]]),Cet={name:"CustomProfileFieldsConfig",components:{UpgradeToProModal:Qd,FluentDnD:za,Drawer:tu},props:["features"],data(){return{CloseBoldIcon:Pi(cR),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())}},xet={class:"fcom_storage_settings"},$et={key:0,class:"white_loaded"},Aet={key:1,class:"fcom_cpf_settings"},Eet={class:"fcom_cpf_header"},Met={key:0,style:{padding:"1rem"}},Tet={key:1,class:"fcom_card_sections fcom_cpf_groups"},Pet={class:"fcom_section_primary_item"},Iet={class:"fcom_section_primary_item_title"},Let={class:"fcom_heading_item"},Oet={class:"fcom_space_counts"},Det={class:"fcom_section_item_actions"},Ret={key:0,class:"fcom_section_items"},Vet={class:"fcom_heading_item"},Fet={key:0,style:{color:"var(--el-color-danger)"}},Net={class:"fcom_section_item_actions"},Bet={style:{position:"relative"}},zet={class:"fcom_action_field_popup"},Het={class:"fcom_move_popup_close"},Uet=["onDrop"],jet={key:2},Wet={class:"dialog_header"},Yet={class:"dialog_body"},qet={class:"dialog_footer"},Get={class:"dialog_header"},Xet={class:"dialog_body"},Ket={style:{display:"flex",gap:"8px","margin-bottom":"4px","font-size":"12px",color:"var(--fcom-text-off, #919399)",width:"100%"}},Zet={style:{flex:"1"}},Jet={style:{flex:"1"}},Qet={class:"dialog_footer"};function ett(t,e,n,i,s,o){const r=He,a=Nt,l=Yt,c=en,u=be,d=hi,h=H("Plus"),f=H("MoreFilled"),p=$r,m=Ar,y=Sr,b=eu,k=sn,C=Jt,$=tn,S=H("CloseBold"),M=H("FluentDnD"),P=H("drawer"),T=ft,I=$s,L=k8,R=Li,V=ws,B=H("UpgradeToProModal"),F=xt("loading");return v(),A(ee,null,[g("div",xet,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=z=>o.openSettings())},{default:w(()=>[N(x(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",$et,[_(a,{rows:5,animated:!0})])):s.config!==null?(v(),A("div",Aet,[_($,{onSubmit:e[8]||(e[8]=Ee(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",Eet,[g("h3",null,x(t.$t("Field Groups")),1),_(r,{class:"fcom_primary_button",onClick:e[3]||(e[3]=z=>o.openGroupEditor())},{default:w(()=>[N(x(t.$t("Add Group")),1)]),_:1})]),s.config.groups.length?(v(),A("div",Tet,[_(M,{items:s.config.groups,"row-key":"slug"},{item:w(({data:z,index:U})=>[g("div",{class:q({fcom_collapsed_group:s.collapsedGroups.includes(z.slug)})},[g("div",Pet,[g("div",Iet,[e[28]||(e[28]=g("div",{class:"fcom_drag_handle"},"⋮⋮",-1)),g("div",Let,[g("h4",null,x(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:G=>o.toggleGroup(z.slug),size:"small",text:""},{default:w(()=>[_(u,null,{default:w(()=>[...e[27]||(e[27]=[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)])]),_:1}),g("span",Oet,x(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(()=>[N(x(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:G=>o.openFieldEditor(null,z.slug)},{default:w(()=>[_(u,null,{default:w(()=>[_(h)]),_:1})]),_:1},8,["aria-label","onClick"])])])]),g("div",Det,[_(r,{class:"fcom_secondary_button",onClick:G=>o.openGroupEditor(U)},{default:w(()=>[N(x(t.$t("Edit Info")),1)]),_:1},8,["onClick"]),z.is_system?O("",!0):(v(),D(y,{key:0,trigger:"click",onCommand:G=>o.handleGroupAction(G,U)},{dropdown:w(()=>[_(m,null,{default:w(()=>[_(p,{command:"delete"},{default:w(()=>[N(x(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"])]),_:1},8,["onCommand"]))])]),s.collapsedGroups.includes(z.slug)?O("",!0):(v(),A("div",Ret,[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:G=>o.onFieldDrop(G,z.slug),onCrossDrop:o.onFieldCrossDrop},{item:w(({data:G})=>[g("div",{class:"fcom_section_item_title",style:Xe(G.is_enabled?"":"opacity: 0.5")},[e[29]||(e[29]=g("div",{class:"fcom_drag_handle"},"⋮⋮",-1)),g("p",Vet,[N(x(G.label)+" ",1),G.is_required?(v(),A("span",Fet,"*")):O("",!0),_(d,{size:"small",type:"info"},{default:w(()=>[N(x(G.type),1)]),_:2},1024),_(d,{size:"small",type:o.privacyMeta(G.privacy).tag},{default:w(()=>[N(x(o.privacyMeta(G.privacy).short),1)]),_:2},1032,["type"])])],4),g("div",Net,[_(b,{modelValue:G.is_enabled,"onUpdate:modelValue":K=>G.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(G.slug)},{default:w(()=>[N(x(t.$t("Edit")),1)]),_:1},8,["onClick"]),g("div",Bet,[_(y,{trigger:"click",onCommand:K=>o.handleFieldAction(K,G)},{dropdown:w(()=>[_(m,{class:"fcom_cpf_field_dropdown"},{default:w(()=>[_(p,{command:"duplicate"},{default:w(()=>[N(x(t.$t("Duplicate")),1)]),_:1}),_(p,{command:"move"},{default:w(()=>[N(x(t.$t("Move")),1)]),_:1}),_(p,{command:"delete"},{default:w(()=>[N(x(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"])]),_:1},8,["onCommand"]),Re(g("div",zet,[_($,{onSubmit:e[5]||(e[5]=Ee(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,we(s.config.groups.filter(K=>K.slug!==G.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(G.slug,s.moveTargetGroup),class:"fcom_primary_button"},{default:w(()=>[N(x(t.$t("Move Field")),1)]),_:1},8,["disabled","onClick"])]),_:2},1024),g("div",Het,[_(u,{onClick:e[6]||(e[6]=K=>s.openedFieldSlug=null)},{default:w(()=>[_(S)]),_:1})])],512),[[jt,s.openedFieldSlug===G.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]=Ee(()=>{},["prevent"])),onDrop:Ee(G=>o.onEmptyGroupDrop(G,z.slug),["prevent"])},x(t.$t("No fields in this group. Click + to add one.")),41,Uet))]))],2)]),_:1},8,["items"])])):(v(),A("div",Met,[g("p",null,x(t.$t("No groups configured yet.")),1)]))],64)):O("",!0),_(c,null,{default:w(()=>[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[F,s.saving]])]),_:1})]),_:1})])):(v(),A("div",jet,[g("p",null,x(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",Wet,[g("h4",null,x(s.editingGroupIndex!==null?t.$t("Edit Group"):t.$t("Add Group")),1)])]),footer:w(()=>[g("div",qet,[_(r,{class:"fcom_secondary_button",onClick:e[13]||(e[13]=z=>s.showGroupEditor=!1)},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(r,{class:"fcom_primary_button",onClick:o.confirmGroup},{default:w(()=>[N(x(s.editingGroupIndex!==null?t.$t("Update Group"):t.$t("Add Group")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",Yet,[s.editingGroup?(v(),D($,{key:0,onSubmit:e[12]||(e[12]=Ee(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",Get,[g("h4",null,x(s.editingFieldSlug!==null?t.$t("Edit Field"):t.$t("Add Field")),1)])]),footer:w(()=>[g("div",Qet,[_(r,{class:"fcom_secondary_button",onClick:e[24]||(e[24]=z=>s.showFieldEditor=!1)},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1}),_(r,{class:"fcom_primary_button",onClick:o.confirmField},{default:w(()=>[N(x(s.editingFieldSlug!==null?t.$t("Update Field"):t.$t("Add Field")),1)]),_:1},8,["onClick"])])]),default:w(()=>[g("div",Xet,[s.editingField?(v(),D($,{key:0,onSubmit:e[23]||(e[23]=Ee(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,we(s.fieldTypes,(z,U)=>(v(),D(k,{key:U,label:z,value:U},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,we(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,we(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,we(s.editingField.options,(z,U)=>(v(),A("div",{key:U,class:"fcom_question_option"},[_(T,{modelValue:s.editingField.options[U],"onUpdate:modelValue":G=>s.editingField.options[U]=G,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:G=>s.editingField.options.splice(U,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(()=>[N(x("+ "+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",Ket,[g("span",Zet,x(t.$t("Key")),1),g("span",Jet,x(t.$t("Label")),1),e[30]||(e[30]=g("span",{style:{width:"32px"}},null,-1))]),(v(!0),A(ee,null,we(s.multiselectOptionsList,(z,U)=>(v(),A("div",{key:U,class:"fcom_question_option"},[_(T,{modelValue:z.key,"onUpdate:modelValue":G=>z.key=G,type:"text",placeholder:t.$t("Key")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),_(T,{modelValue:z.label,"onUpdate:modelValue":G=>z.label=G,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:G=>s.multiselectOptionsList.splice(U,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(()=>[N(x("+ "+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(()=>[N(x(t.$t("Yes")),1)]),_:1}),_(R,{value:!1},{default:w(()=>[N(x(t.$t("No")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])]),_:1})):O("",!0)])]),_:1},8,["modelValue"]),s.openUpgradeModal?(v(),D(B,{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 ttt=ue(Cet,[["render",ett]]),ntt={name:"PwaConfig",props:["features"],emits:["saveSettings"],data(){return{settings:null,defaultIcon:null,showSettings:!1,fetching:!1,saving:!1,openUpgradeModal:!1}},components:{UpgradeToProModal:Qd,ImageUploader:Ll},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})}}},stt={class:"fcom_pwa_settings"},itt=["id"],ott={key:0,class:"white_loaded"},rtt={key:1,class:"dialog_body"},att={class:"fcom_help_text"},ltt={class:"fcom_help_text"},ctt={class:"fcom_help_text"},utt={class:"fcom_help_text"},dtt={class:"fcom_image_uploader_wrapper"},htt={class:"fcom_help_text"},ftt={class:"fcom_help_text"},ptt={class:"fcom_help_text"},mtt={class:"dialog_footer"},gtt={key:2};function vtt(t,e,n,i,s,o){const r=He,a=Nt,l=Yt,c=en,u=ft,d=Qc,h=Li,f=ws,p=sa,m=Wo,y=H("EditPen"),b=be,k=H("Delete"),C=H("ImageUploader"),$=tn,S=Va,M=H("UpgradeToProModal"),P=xt("loading");return v(),A(ee,null,[g("div",stt,[_(r,{class:"fcom_secondary_button",onClick:e[0]||(e[0]=T=>o.openSettings())},{default:w(()=>[N(x(t.$t("Settings")),1)]),_:1})]),_(S,{"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:q(I)},x(t.$t("Progressive Web App (PWA) Settings")),11,itt)]),default:w(()=>[s.fetching?(v(),A("div",ott,[_(a,{rows:5,animated:!0})])):s.settings?(v(),A("div",rtt,[_($,{onSubmit:e[10]||(e[10]=Ee(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",att,[g("p",null,x(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",ltt,[g("p",null,x(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",ctt,[g("p",null,x(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(()=>[N(x(t.$t("Default (Site Icon)")),1)]),_:1}),_(h,{value:"custom"},{default:w(()=>[N(x(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(()=>[N(x(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",utt,[g("p",null,x(t.$t("This is the icon members will install.")),1)])],64)):(v(),D(p,{key:0,type:"warning",closable:!1,"show-icon":""},{default:w(()=>[N(x(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",dtt,[_(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})},hs({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",htt,[g("p",null,x(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",ftt,[g("p",null,x(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",ptt,[g("p",null,x(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(()=>[N(x(t.$t("Sidebar Top")),1)]),_:1}),_(h,{value:"bottom"},{default:w(()=>[N(x(t.$t("Sidebar Bottom")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0)],64)):O("",!0)]),_:1}),g("div",mtt,[Re((v(),D(r,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])),[[P,s.saving]])])])):(v(),A("div",gtt,[g("p",null,x(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 _tt=ue(ntt,[["render",vtt]]),ytt={name:"PushNotificationSettings",emits:["dirty-change"],data(){return{loading:!1,saving:!1,push_settings:null,push_available:!1,push_setup:{state:"",settings_url:"",can_install:!1,can_activate:!1,has_installer:!1,learn_more_url:""},installing:!1,initialState:null}},computed:{setupTrack(){const t=[{key:"install",name:this.isInactive?this.$t("Activate FluentNotify"):this.$t("Install FluentNotify"),note:this.isInactive?this.$t("Already installed, it just needs activating."):this.$t("The companion plugin that delivers push.")},{key:"enable",name:this.$t("Enable the push service"),note:this.$t("One switch inside FluentNotify.")},{key:"firebase",name:this.$t("Connect Firebase"),note:this.$t("The SDK values plus a service account.")},{key:"ready",name:this.$t("Ready to send"),note:this.$t("Choose what members get notified about.")}],e=this.currentStopIndex;return t.map((n,i)=>{let s="ahead";return i<e?s="done":i===e&&(s="current"),Object.assign({},n,{position:i+1,status:s})})},currentStopIndex(){const e={not_installed:0,inactive:0,disabled:1,incomplete:2}[this.push_setup.state];return e===void 0?1:e},isInactive(){return this.push_setup.state==="inactive"},setupAction(){return this.isInactive?this.push_setup.can_activate?"activate":"":this.push_setup.state==="not_installed"?this.push_setup.can_install?this.push_setup.has_installer?"install":"guide":"":this.push_setup.settings_url?"configure":""},isPushEnabled(){return this.push_settings&&this.push_settings.push_enabled==="yes"},placementOptions(){return[{value:"feed_sidebar",label:this.$t("Show the push notification prompt in the feed sidebar")},{value:"profile_sidebar",label:this.$t("Show the push notification prompt in the profile sidebar")},{value:"profile_notification_prefs",label:this.$t("Show the push notification prompt on the notification preferences page")},{value:"notification_popover",label:this.$t("Show the push notification prompt in the notifications dropdown")}]},isDirty(){return this.initialState?JSON.stringify(this.push_settings)!==this.initialState:!1}},watch:{isDirty(t){this.$emit("dirty-change",t)}},methods:{getSettings(){this.loading||(this.loading=!0,this.$get("admin/push-settings").then(t=>{this.push_settings=t.push_settings,this.push_available=!!t.push_available,t.push_setup&&(this.push_setup=t.push_setup),this.initialState=JSON.stringify(this.push_settings)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.loading=!1}))},openFluentNotifySettings(){this.push_setup.settings_url&&window.open(this.push_setup.settings_url,"_blank","noopener")},installFluentNotify(){if(this.installing)return;const t=this.isInactive;this.installing=!0,this.$post("settings/install_plugin",{plugin:"fluent-notify"}).then(e=>{e.is_installed?(this.$notify.success(e.message),this.getSettings()):t?this.$notify.error(this.$t("Sorry, FluentNotify could not be activated")):this.$notify.error(this.$t("Sorry, FluentNotify could not be installed"))}).catch(e=>{this.$handleError(e)}).finally(()=>{this.installing=!1})},save(){!this.push_available||this.saving||(this.saving=!0,this.$post("admin/push-settings",{settings:this.push_settings}).then(t=>{this.initialState=JSON.stringify(this.push_settings),this.$notify.success(t.message)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1}))}},mounted(){this.getSettings()}},btt={key:1,class:"fluent-notify-settings"},wtt={key:0,class:"fcom_push_setup"},ktt={class:"fcom_push_track"},Ctt={class:"fcom_push_track_rail"},xtt={class:"fcom_push_track_node"},Stt={key:0,"aria-hidden":"true"},$tt={key:1},Att={class:"fcom_push_track_text"},Ett={class:"fcom_push_track_name"},Mtt={class:"fcom_push_track_note"},Ttt={class:"fcom_push_setup_actions"},Ptt=["href"],Itt={class:"fcom_push_setup_note"},Ltt={key:4,class:"fcom_push_setup_note"},Ott={key:5,class:"fcom_push_setup_note"},Dtt={key:0,class:"fcom_help_text"},Rtt={class:"setting_sub_header"},Vtt={class:"setting_sub_header"},Ftt={key:2,class:"fluent-notify-settings"};function Ntt(t,e,n,i,s,o){const r=Nt,a=He,l=Yt,c=en,u=tn,d=b8,h=s2;return s.loading?(v(),D(r,{key:0,animated:!0,rows:4})):s.push_settings?(v(),A("div",btt,[s.push_available?(v(),A(ee,{key:1},[_(u,{modelValue:s.push_settings,"onUpdate:modelValue":e[1]||(e[1]=f=>s.push_settings=f),"label-position":"top"},{default:w(()=>[_(c,null,{default:w(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:s.push_settings.push_enabled,"onUpdate:modelValue":e[0]||(e[0]=f=>s.push_settings.push_enabled=f),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Enable push notifications for this community")),1)]),_:1},8,["modelValue"]),o.isPushEnabled?O("",!0):(v(),A("div",Dtt,[g("p",null,x(t.$t("When off, this community sends no push notifications. FluentNotify keeps working for everything else.")),1)]))]),_:1})]),_:1},8,["modelValue"]),o.isPushEnabled?(v(),A(ee,{key:0},[_(d),g("div",Rtt,[g("h3",null,x(t.$t("Default Member Preferences")),1),g("p",null,x(t.$t("These apply to members who have not set their own preference. A member who changes a setting keeps their choice.")),1)]),_(u,{modelValue:s.push_settings,"onUpdate:modelValue":e[6]||(e[6]=f=>s.push_settings=f),"label-position":"top"},{default:w(()=>[_(c,null,{default:w(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:s.push_settings.com_my_post_push,"onUpdate:modelValue":e[2]||(e[2]=f=>s.push_settings.com_my_post_push=f),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Notify when someone comments on their post")),1)]),_:1},8,["modelValue"])]),_:1}),_(c,null,{default:w(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:s.push_settings.reply_my_com_push,"onUpdate:modelValue":e[3]||(e[3]=f=>s.push_settings.reply_my_com_push=f),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Notify when someone replies to their comment")),1)]),_:1},8,["modelValue"])]),_:1}),_(c,null,{default:w(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:s.push_settings.mention_push,"onUpdate:modelValue":e[4]||(e[4]=f=>s.push_settings.mention_push=f),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Notify when someone mentions them")),1)]),_:1},8,["modelValue"])]),_:1}),_(c,null,{default:w(()=>[_(l,{"true-value":"yes","false-value":"no",modelValue:s.push_settings.co_com_push,"onUpdate:modelValue":e[5]||(e[5]=f=>s.push_settings.co_com_push=f),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Notify when someone also comments on a post they commented on")),1)]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"]),_(d),g("div",Vtt,[g("h3",null,x(t.$t("Prompt Placements")),1)]),_(u,{modelValue:s.push_settings,"onUpdate:modelValue":e[8]||(e[8]=f=>s.push_settings=f),"label-position":"top"},{default:w(()=>[_(c,null,{default:w(()=>[_(h,{modelValue:s.push_settings.prompt_placements,"onUpdate:modelValue":e[7]||(e[7]=f=>s.push_settings.prompt_placements=f)},{default:w(()=>[(v(!0),A(ee,null,we(o.placementOptions,f=>(v(),D(l,{key:f.value,value:f.value,disabled:f.upcoming,class:"fcom_checkbox"},{default:w(()=>[N(x(f.label),1)]),_:2},1032,["value","disabled"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["modelValue"])],64)):O("",!0),_(a,{class:"fcom_primary_button",loading:s.saving,disabled:s.saving,onClick:o.save},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["loading","disabled","onClick"])],64)):(v(),A("div",wtt,[g("ol",ktt,[(v(!0),A(ee,null,we(o.setupTrack,f=>(v(),A("li",{key:f.key,class:q("is_"+f.status)},[g("span",Ctt,[g("span",xtt,[f.status==="done"?(v(),A("span",Stt,"✓")):(v(),A("span",$tt,x(f.position),1))])]),g("span",Att,[g("span",Ett,x(f.name),1),g("span",Mtt,x(f.note),1)])],2))),128))]),g("div",Ttt,[o.setupAction==="activate"?(v(),D(a,{key:0,class:"fcom_primary_button",loading:s.installing,disabled:s.installing,onClick:o.installFluentNotify},{default:w(()=>[N(x(t.$t("Activate FluentNotify")),1)]),_:1},8,["loading","disabled","onClick"])):o.setupAction==="install"?(v(),D(a,{key:1,class:"fcom_primary_button",loading:s.installing,disabled:s.installing,onClick:o.installFluentNotify},{default:w(()=>[N(x(t.$t("Install FluentNotify")),1)]),_:1},8,["loading","disabled","onClick"])):o.setupAction==="configure"?(v(),D(a,{key:2,class:"fcom_primary_button",onClick:o.openFluentNotifySettings},{default:w(()=>[N(x(t.$t("Open FluentNotify Settings")),1)]),_:1},8,["onClick"])):o.setupAction==="guide"?(v(),A(ee,{key:3},[g("a",{href:s.push_setup.learn_more_url,target:"_blank",rel:"noopener",class:"el-button fcom_primary_button"},x(t.$t("Get FluentNotify")),9,Ptt),g("p",Itt,x(t.$t("Download and install FluentNotify, then come back here to finish the setup.")),1)],64)):o.isInactive?(v(),A("p",Ltt,x(t.$t("Ask a site administrator to activate FluentNotify.")),1)):(v(),A("p",Ott,x(t.$t("Ask a site administrator to install FluentNotify.")),1))])]))])):(v(),A("div",Ftt,[g("h3",null,x(t.$t("Sorry, the settings could not be loaded. Please reload the page and try again.")),1)]))}const Btt=ue(ytt,[["render",Ntt]]),ztt={name:"Features",components:{UserBadgesConfig:jZe,LeaderBoardConfig:wZe,StorageSettings:tZe,Layout:_i,AppLayout:yi,UpgradeToProModal:Qd,SocialMediaLinkConfig:lJe,MessagingSettings:PJe,FollowingConfigView:BJe,FluentPlayerSettings:ket,CustomProfileFieldsConfig:ttt,PwaConfig:_tt,PushNotificationSettings:Btt,Drawer:tu},data(){return{features:null,addOns:{},loading:!1,installingSlug:"",openGiphyUpgradeModal:!1,openEmojiUpgradeModal:!1,showMessagingSettings:!1,showFluentPlayerSettings:!1,showNotifySettings:!1,notifySettingsDirty:!1}},watch:{showNotifySettings(t){t||(this.notifySettingsDirty=!1,this.getFeatures())}},methods:{saveFeatures(t=!0){if(this.features.giphy_module==="yes"&&JH(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})},hasGuidedSetup(t){return t==="fluent-notify"},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"))}},Htt={class:"settings_router"},Utt={key:0,class:"white_loaded"},jtt={key:1,style:{"margin-bottom":"30px"}},Wtt={class:"fhr_content_layout_body"},Ytt={class:"setting_header"},qtt={class:"fcom_advanced_features"},Gtt={key:0,class:"setting_body"},Xtt={class:"setting_item"},Ktt={class:"setting_field_placeholder"},Ztt={class:"title"},Jtt={class:"info"},Qtt={class:"settings_field_data"},ent={class:"align-right"},tnt={class:"setting_item"},nnt={class:"setting_field_placeholder"},snt={class:"title"},int={class:"info"},ont={class:"settings_field_data"},rnt={class:"align-right"},ant={class:"setting_item"},lnt={class:"setting_field_placeholder"},cnt={class:"title"},unt={class:"info"},dnt={class:"settings_field_data"},hnt={class:"align-right"},fnt={class:"setting_item"},pnt={class:"setting_field_placeholder"},mnt={class:"title"},gnt={class:"info"},vnt={class:"settings_field_data"},_nt={class:"align-right"},ynt={class:"fcom_module_popover_content"},bnt={class:"setting_item"},wnt={class:"setting_field_placeholder"},knt={class:"title"},Cnt={class:"info"},xnt={class:"settings_field_data"},Snt={class:"align-right"},$nt={key:0,class:"fcom_giphy_api",style:{"margin-bottom":"5px"}},Ant={class:"fcom_module_popover_content"},Ent={class:"setting_item"},Mnt={class:"setting_field_placeholder"},Tnt={class:"title"},Pnt={class:"info"},Int={class:"settings_field_data"},Lnt={class:"align-right"},Ont={class:"fcom_module_popover_content"},Dnt={class:"setting_item"},Rnt={class:"setting_field_placeholder"},Vnt={class:"title"},Fnt={class:"info"},Nnt={class:"settings_field_data"},Bnt={class:"align-right"},znt={class:"setting_item"},Hnt={class:"setting_field_placeholder"},Unt={class:"title"},jnt={class:"info"},Wnt={class:"settings_field_data"},Ynt={class:"align-right"},qnt={class:"setting_item"},Gnt={class:"setting_field_placeholder"},Xnt={class:"title"},Knt={class:"info"},Znt={class:"settings_field_data"},Jnt={class:"align-right"},Qnt={class:"setting_item"},est={class:"setting_field_placeholder"},tst={class:"title"},nst={class:"info"},sst={class:"settings_field_data"},ist={class:"align-right"},ost={class:"fhr_content_layout_body"},rst={class:"setting_header"},ast={class:"fcom_advanced_features"},lst={key:0,class:"white_loaded"},cst={key:1,class:"setting_body"},ust={class:"setting_field_placeholder"},dst={class:"title recommend_plugin",style:{display:"flex","align-items":"flex-start"}},hst={class:"avatar",style:{"margin-right":"15px"}},fst=["src"],pst=["href"],mst={class:"info"},gst={class:"settings_field_data"},vst={class:"align-right"},_st=["href"],yst={key:0,class:"dialog_body"},bst={key:0,class:"dialog_body fluent_player_settings_body"};function wst(t,e,n,i,s,o){const r=Nt,a=hi,l=H("FollowingConfigView"),c=H("LeaderBoardConfig"),u=H("UserBadgesConfig"),d=Yt,h=He,f=Yo,p=ft,m=H("UpgradeToProModal"),y=H("storage-settings"),b=H("SocialMediaLinkConfig"),k=H("CustomProfileFieldsConfig"),C=H("PwaConfig"),$=H("messaging-settings"),S=Va,M=H("push-notification-settings"),P=H("drawer"),T=H("fluent-player-settings"),I=H("layout"),L=H("app-layout");return v(),D(L,{wrapper_class:"fcom_single_layout fcom_member_profile fcom_max_layout"},{default:w(()=>[_(I,{wrapper_class:"no_bg_layout fcom_setting_route",title:t.$t("Advanced Features & Addons")},{default:w(()=>[g("div",Htt,[s.loading?(v(),A("div",Utt,[_(r,{rows:5,animated:!0}),e[15]||(e[15]=g("hr",null,null,-1)),_(r,{rows:7,animated:!0})])):(v(),A("div",jtt,[g("div",Wtt,[g("div",Ytt,[g("h2",null,x(t.$t("Advanced Features")),1)]),g("div",qtt,[s.features?(v(),A("div",Gtt,[g("div",Xtt,[g("div",Ktt,[g("div",Ztt,[N(x(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(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.followers_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",Jtt,x(t.$t("Let your community users to follow each other and filter posts by their followings.")),1)]),g("div",Qtt,[g("div",ent,[_(l,{features:s.features},null,8,["features"])])])]),g("div",tnt,[g("div",nnt,[g("div",snt,[N(x(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(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.leader_board_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",int,x(t.$t("__LEADERBOARD_DESC")),1)]),g("div",ont,[g("div",rnt,[_(c,{onSaveSettings:o.saveFeatures,features:s.features},null,8,["onSaveSettings","features"])])])]),g("div",ant,[g("div",lnt,[g("div",cnt,[N(x(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(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.user_badge==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",unt,x(t.$t("__USER_BADGE_DESC")),1)]),g("div",dnt,[g("div",hnt,[_(u,{onSaveSettings:o.saveFeatures,features:s.features},null,8,["onSaveSettings","features"])])])]),g("div",fnt,[g("div",pnt,[g("div",mnt,[N(x(t.$t("Course Module"))+" ",1),s.features.course_module==="no"?(v(),D(a,{key:0,type:"info",size:"small"},{default:w(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.course_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)]),g("div",gnt,x(t.$t("__COURSE_STRUCTURED_LESSONS")),1)]),g("div",vnt,[g("div",_nt,[_(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(()=>[N(x(t.$t("Settings")),1)]),_:1})]),default:w(()=>[g("div",ynt,[_(d,{modelValue:s.features.course_module,"onUpdate:modelValue":e[0]||(e[0]=R=>s.features.course_module=R),"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(()=>[N(x(t.$t("Save")),1)]),_:1},8,["onClick"])])]),_:1},8,["title"])])])]),g("div",bnt,[g("div",wnt,[g("div",knt,[N(x(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(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.giphy_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",Cnt,x(t.$t("Unlock potential by using Giphy when creating a new article, post, or comment")),1)]),g("div",xnt,[g("div",Snt,[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]=R=>!t.has_pro&&(s.openGiphyUpgradeModal=!0))},{default:w(()=>[N(x(t.$t("Settings")),1)]),_:1})]),default:w(()=>[s.features.giphy_module==="yes"?(v(),A("div",$nt,[_(p,{modelValue:s.features.giphy_api_key,"onUpdate:modelValue":e[1]||(e[1]=R=>s.features.giphy_api_key=R),placeholder:t.$t("Giphy API Key")},null,8,["modelValue","placeholder"])])):O("",!0),g("div",Ant,[_(d,{"true-value":"yes","false-value":"no",modelValue:s.features.giphy_module,"onUpdate:modelValue":e[2]||(e[2]=R=>s.features.giphy_module=R),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(()=>[N(x(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]=R=>s.openGiphyUpgradeModal=!1),upgrade_module:"giphy_module"},null,8,["showModal"])):O("",!0)])])]),g("div",Ent,[g("div",Mnt,[g("div",Tnt,[N(x(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(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.emoji_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",Pnt,x(t.$t("__EMOJIS_DESC")),1)]),g("div",Int,[g("div",Lnt,[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]=R=>!t.has_pro&&(s.openEmojiUpgradeModal=!0))},{default:w(()=>[N(x(t.$t("Settings")),1)]),_:1})]),default:w(()=>[g("div",Ont,[_(d,{"true-value":"yes","false-value":"no",modelValue:s.features.emoji_module,"onUpdate:modelValue":e[5]||(e[5]=R=>s.features.emoji_module=R),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(()=>[N(x(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]=R=>s.openEmojiUpgradeModal=!1),upgrade_module:"emoji_module"},null,8,["showModal"])):O("",!0)])])]),g("div",Dnt,[g("div",Rnt,[g("div",Vnt,[N(x(t.$t("Media Module"))+" ",1),s.features.cloud_storage==="yes"?(v(),D(a,{key:0,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):s.features.cloud_storage==="no"?(v(),D(a,{key:1,type:"info",size:"small"},{default:w(()=>[N(x(t.$t("Local")),1)]),_:1})):O("",!0)]),g("div",Fnt,x(t.$t("__CLOUD_STORAGE_DESC")),1)]),g("div",Nnt,[g("div",Bnt,[_(y,{features:s.features},null,8,["features"])])])]),g("div",znt,[g("div",Hnt,[g("div",Unt,x(t.$t("Profile Social Media Links")),1),g("div",jnt,x(t.$t("Enable/Disable Social Media Links for profiles")),1)]),g("div",Wnt,[g("div",Ynt,[_(b)])])]),g("div",qnt,[g("div",Gnt,[g("div",Xnt,[N(x(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(()=>[N(x(t.$t("Disabled")),1)]),_:1})):(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1}))],64)):O("",!0)]),g("div",Knt,x(t.$t("Add custom fields to member profiles like Gender, DOB, Designation, Blood Group and more.")),1)]),g("div",Znt,[g("div",Jnt,[_(k,{features:s.features},null,8,["features"])])])]),g("div",Qnt,[g("div",est,[g("div",tst,[N(x(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(()=>[N(x(t.$t("Disabled")),1)]),_:1})):s.features.pwa_module==="yes"?(v(),D(a,{key:1,type:"success",size:"small",effect:"light"},{default:w(()=>[N(x(t.$t("Enabled")),1)]),_:1})):O("",!0)],64)):O("",!0)]),g("div",nst,x(t.$t("Let members install your community as an app on their phone with your own name, icon and colors.")),1)]),g("div",sst,[g("div",ist,[_(C,{onSaveSettings:o.saveFeatures,features:s.features},null,8,["onSaveSettings","features"])])])])])):O("",!0)])])])),g("div",ost,[g("div",rst,[g("h2",null,x(t.$t("Recommended Plugins and Addons")),1)]),g("div",ast,[s.loading?(v(),A("div",lst,[_(r,{rows:6,animated:!0})])):s.features?(v(),A("div",cst,[(v(!0),A(ee,null,we(s.addOns,(R,V)=>(v(),A("div",{key:V,class:"setting_item"},[g("div",ust,[g("div",dst,[g("div",hst,[g("img",{alt:"",src:R.logo,style:{width:"60px"}},null,8,fst)]),g("div",null,[g("a",{target:"_blank",href:R.learn_more_url},x(R.title),9,pst),R.is_installed?(v(),D(a,{key:0,type:"success",size:"small",effect:"light",style:{"margin-left":"8px"}},{default:w(()=>[N(x(t.$t("Installed")),1)]),_:1})):O("",!0),g("div",mst,x(R.description),1)])])]),g("div",gst,[g("div",vst,[!R.is_installed&&!o.hasGuidedSetup(V)?(v(),D(h,{key:0,class:"fcom_secondary_button",onClick:B=>o.installPlugin(V),loading:s.installingSlug===V,disabled:!!s.installingSlug&&s.installingSlug!==V},{default:w(()=>[N(x(R.action_text),1)]),_:2},1032,["onClick","loading","disabled"])):O("",!0),V==="fluent-messaging"?(v(),D(h,{key:1,onClick:e[8]||(e[8]=B=>s.showMessagingSettings=!0),class:"fcom_secondary_button"},{default:w(()=>[N(x(t.$t("Messaging Settings")),1)]),_:1})):o.hasGuidedSetup(V)?(v(),D(h,{key:2,onClick:e[9]||(e[9]=B=>s.showNotifySettings=!0),class:"fcom_secondary_button"},{default:w(()=>[N(x(R.is_installed?t.$t("View Settings"):t.$t("Set up FluentNotify")),1)]),_:2},1024)):V==="fluent-player"&&R.is_installed?(v(),D(h,{key:3,onClick:e[10]||(e[10]=B=>s.showFluentPlayerSettings=!0),class:"fcom_secondary_button"},{default:w(()=>[N(x(t.$t("Player Settings")),1)]),_:1})):R.settings_url?(v(),A("a",{key:4,href:R.settings_url,class:"el-button el-button--default fcom_secondary_button"},x(t.$t("View Settings")),9,_st)):O("",!0)])])]))),128))])):O("",!0)])])]),_(S,{"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[11]||(e[11]=R=>s.showMessagingSettings=R),direction:"rtl"},{header:w(({close:R})=>[g("h4",null,x(t.$t("Messaging Settings")),1)]),default:w(()=>[s.showMessagingSettings?(v(),A("div",yst,[_($)])):O("",!0)]),_:1},8,["size","modelValue"]),_(P,{modelValue:s.showNotifySettings,"onUpdate:modelValue":e[13]||(e[13]=R=>s.showNotifySettings=R),title:t.$t("Push Notification Settings"),size:t.drawerWidth,"append-to-body":!0,"destroy-on-close":!0,"close-on-click-modal":!0,"has-close-confirmation":s.notifySettingsDirty,"close-confirmation-message":t.$t("You have unsaved changes. Are you sure you want to close?"),"modal-class":"fcom_common_dialog fcom_upgrade_dialog","body-class":"dialog_body",id:"fluent_notify_settings_drawer"},{default:w(()=>[_(M,{onDirtyChange:e[12]||(e[12]=R=>s.notifySettingsDirty=R)})]),_:1},8,["modelValue","title","size","has-close-confirmation","close-confirmation-message"]),_(S,{"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[14]||(e[14]=R=>s.showFluentPlayerSettings=R),direction:"rtl"},{header:w(()=>[g("h4",null,x(t.$t("FluentPlayer Settings")),1)]),default:w(()=>[s.showFluentPlayerSettings?(v(),A("div",bst,[_(T)])):O("",!0)]),_:1},8,["modelValue"])]),_:1},8,["title"])]),_:1})}const kst=ue(ztt,[["render",wst]]),Cst={name:"FComColorPicker",components:{InfoFilled:wl},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()}}},xst={class:"fcom_color_item"};function Sst(t,e,n,i,s,o){const r=Qc,a=H("InfoFilled"),l=be,c=Ss;return v(),A("div",xst,[_(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))},x(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 $st=ue(Cst,[["render",Sst]]),Ast={name:"AuthMeta",components:{BgImageUpload:gv,CrepeEditor:cu,FComColorPicker:$st},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}}},Est={key:0,class:"fcom_lockscreen_meta"},Mst={class:"fcom_meta_section lockscreen_meta"},Tst={key:0,class:"fcom_description"},Pst={key:1,class:"fcom_description"},Ist={class:"fcom_meta_section lockscreen_meta"},Lst={key:0,class:"fcom_meta_label"},Ost={key:1,class:"fcom_meta_label"},Dst={class:"fcom_meta_content"},Rst={class:"fcom_meta_block"},Vst={class:"fcom_block_label"},Fst={class:"fcom_meta_sorting"},Nst={class:"fcom_block_action"},Bst={key:1,class:"fcom_lockscreen_meta"},zst={class:"fcom_edit_title"},Hst={class:"fcom_edit_content"},Ust={key:0,class:"fcom_help_text"},jst={key:0,class:"fcom_help_text"};function Wst(t,e,n,i,s,o){const r=be,a=H("Top"),l=H("Bottom"),c=H("EditPen"),u=H("Hide"),d=H("View"),h=H("Back"),f=H("BgImageUpload"),p=en,m=ft,y=H("crepe-editor"),b=tn,k=u2,C=H("FComColorPicker"),$=Li,S=ws,M=eu,P=Hfe,T=zfe,I=c2;return s.editing?(v(),A("div",Bst,[g("div",zst,[_(r,{onClick:o.backToFields},{default:w(()=>[_(h)]),_:1},8,["onClick"]),g("p",null,x(s.editingField.label),1)]),g("div",Hst,[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]=Ee(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",Ust,x(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]=Ee(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]=Ee(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",jst,x(t.$t("Please save the changes to update the view")),1)):O("",!0)]),_:1},8,["label"]),_(p,{label:t.$t("Required")},{default:w(()=>[_(S,{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(()=>[N(x(t.$t("Yes")),1)]),_:1}),_($,{value:!1},{default:w(()=>[N(x(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",Est,[g("div",Mst,[n.currentTab=="login"?(v(),A("div",Tst,[g("p",null,x(t.$t("Configure the appearance and behavior of your login form.")),1)])):O("",!0),n.currentTab=="signup"?(v(),A("div",Pst,[g("p",null,x(t.$t("Configure the appearance and behavior of your signup form.")),1)])):O("",!0)]),g("div",Ist,[n.currentTab=="login"?(v(),A("div",Lst,x(t.$t("Customize Login")),1)):O("",!0),n.currentTab=="signup"?(v(),A("div",Ost,x(t.$t("Customize Sign Up")),1)):O("",!0),g("div",Dst,[g("ul",Rst,[(v(!0),A(ee,null,we(o.sortedFields,L=>(v(),A("li",{class:q(["fcom_block_list",{block_hidden:L.hidden}])},[g("div",Vst,[_(r,{class:"fcom_el_icon"},{default:w(()=>[(v(),D(Ct(o.getFieldIcon(L))))]),_:2},1024),g("p",null,x(o.getLabel(L.type)),1)]),g("div",Fst,[_(r,{onClick:o.togglePosition},{default:w(()=>[_(a)]),_:1},8,["onClick"]),_(r,{onClick:o.togglePosition},{default:w(()=>[_(l)]),_:1},8,["onClick"])]),g("div",Nst,[_(r,{onClick:R=>o.updateField(L)},{default:w(()=>[_(c)]),_:1},8,["onClick"]),L.type=="banner"?(v(),A(ee,{key:0},[L.hidden?(v(),D(r,{key:0,onClick:R=>o.toggleHidden(L)},{default:w(()=>[_(u)]),_:1},8,["onClick"])):(v(),D(r,{key:1,onClick:R=>o.toggleHidden(L)},{default:w(()=>[_(d)]),_:1},8,["onClick"]))],64)):O("",!0)])],2))),256))])])])]))}const Yst=ue(Ast,[["render",Wst]]),qst={name:"AuthEditor",emits:["updateAuthSettings"],props:["currentTab","savingCount","authSettings"],components:{AuthMeta:Yst},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})}}},Gst={class:"fcom_auth_content"},Xst={key:0,class:"fcom_auth_image"},Kst=["src","alt"],Zst={class:"fcom_auth_title"},Jst=["innerHTML"],Qst={class:"fcom_auth_content form_content"},eit={class:"fcom_auth_form_header"},tit={class:"fcom_auth_title"},nit=["innerHTML"],sit=["innerHTML"];function iit(t,e,n,i,s,o){const r=H("auth-meta"),a=U1,l=ft,c=en,u=Yt,d=tn,h=He,f=jo;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,$,S,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",Gst,[(m=s.settings.banner)!=null&&m.logo?(v(),A("div",Xst,[g("img",{src:(y=s.settings.banner)==null?void 0:y.logo,alt:(b=s.settings.banner)==null?void 0:b.title},null,8,Kst)])):O("",!0),g("div",Zst,[g("h2",{style:Xe(o.titleStyles(s.settings.banner)),contenteditable:"true",onBlur:e[0]||(e[0]=P=>o.updateTitle(P,s.settings.banner))},x((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,Jst)],4)):O("",!0)])],4)),g("div",{class:"fcom_auth_wrap",style:Xe(o.backgroundStyles(s.settings.form))},[g("div",Qst,[g("div",eit,[g("div",tit,[g("h2",{style:Xe(o.titleStyles(s.settings.form)),contenteditable:"true",onBlur:e[1]||(e[1]=P=>o.updateTitle(P,s.settings.form))},x(($=s.settings.form)==null?void 0:$.title),37)]),(S=s.settings.form)!=null&&S.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,nit)],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,we(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,sit)]),_: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[N(x((P=s.settings.form)==null?void 0:P.button_label),1)]}),_:1},8,["style"])])],4)],4)]}),_:1})],64)}const oit=ue(qst,[["render",iit]]),rit={name:"AuthSettings",emits:["completed"],components:{AuthEditor:oit},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()}},ait={class:"fcom_full_editor"},lit={class:"fcom_full_editor_header"},cit=["aria-label"],uit={class:"fcom_editor_menu object_menu"},dit={class:"fcom_space_menu_ul"},hit={class:"full_editor_actions"},fit={key:0},pit={key:1};function mit(t,e,n,i,s,o){const r=H("ArrowLeft"),a=be,l=He,c=j1,u=H("auth-editor"),d=Nt,h=U1,f=jo,p=H1,m=xt("loading");return v(),A("div",ait,[_(p,null,{default:w(()=>[_(c,{class:"fcom_full_editor_header_wrap"},{default:w(()=>[g("div",lit,[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}),N(" "+x(t.$t("General Settings")),1)],8,cit),g("div",uit,[g("ul",dit,[g("li",{onClick:e[1]||(e[1]=y=>s.currentTab="login")},[g("a",{class:q({"router-link-exact-active":s.currentTab=="login"}),href:"#"},x(t.$t("Login")),3)]),g("li",{onClick:e[2]||(e[2]=y=>s.currentTab="signup")},[g("a",{class:q({"router-link-exact-active":s.currentTab=="signup"}),href:"#"},x(t.$t("Sign Up")),3)])])]),g("div",hit,[Re((v(),D(l,{class:"fcom_primary_button",disabled:s.saving,onClick:o.saveSettings},{default:w(()=>[s.hasPro?(v(),A("span",fit,x(t.$t("Save Changes")),1)):(v(),A("span",pit,x(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 git=ue(rit,[["render",mit]]),vit={name:"GeneralSettings",components:{ImageUploader:Ll,Layout:_i,AppLayout:yi,CopyDocument:uR,AuthSettings:git},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"},canManageAuthSettings(){return this.hasPermission("super_admin")}},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"))}},_it={class:"settings_router"},yit={class:"fhr_content_layout_body"},bit={class:"setting_body"},wit={class:"settings_title"},kit={class:"settings_subtitle"},Cit={class:"settings_title"},xit={class:"settings_subtitle"},Sit=["src"],$it={class:"settings_title"},Ait={class:"settings_subtitle"},Eit=["src"],Mit={class:"settings_title"},Tit={class:"settings_subtitle"},Pit={class:"settings_title"},Iit={class:"settings_subtitle"},Lit=["src"],Oit={class:"settings_title"},Dit={class:"settings_subtitle"},Rit={class:"fcom_help_text"},Vit={class:"settings_title"},Fit={class:"settings_subtitle"},Nit={class:"settings_title"},Bit={class:"settings_subtitle"},zit={class:"help_text"},Hit={class:"settings_title"},Uit={class:"settings_subtitle"},jit={class:"settings_title"},Wit={class:"settings_subtitle"},Yit={class:"fcom_help_text"},qit={class:"settings_title"},Git={class:"settings_subtitle"},Xit={class:"fcom_help_text"},Kit=["href"],Zit={class:"settings_title"},Jit={class:"settings_subtitle"},Qit={key:0};function eot(t,e,n,i,s,o){const r=He,a=jd,l=ft,c=en,u=Ud,d=H("image-uploader"),h=Hd,f=ws,p=H("CopyDocument"),m=be,y=Yt,b=Li,k=sn,C=Jt,$=tn,S=Nt,M=H("auth-settings"),P=H("layout"),T=H("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,x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),default:w(()=>[g("div",_it,[g("div",yit,[g("div",bit,[s.settings?(v(),D($,{key:0,onSubmit:e[19]||(e[19]=Ee(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",wit,x(t.$t("Community Title")),1),g("span",kit,x(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",Cit,x(t.$t("Site Logo (For Light Background)")),1),g("span",xit,x(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,Sit)):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",$it,x(t.$t("Site Logo (For Dark Mode)")),1),g("span",Ait,x(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,Eit)):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",Mit,x(t.$t("Logo Permalink")),1),g("span",Tit,x(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(()=>[N(x(t.$t("Default")),1)]),_:1}),_(h,{value:"custom"},{default:w(()=>[N(x(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,x(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",Pit,x(t.$t("Default Open Graph Image")),1),g("span",Iit,x(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,Lit)):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",Oit,x(t.$t("Global Post Status")),1),g("span",Dit,x(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(()=>[N(x(t.$t("Enable Global Posts Status Form")),1)]),_:1},8,["modelValue"]),g("div",Rit,[g("p",null,x(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",Vit,x(t.$t("Portal Access Settings")),1),g("span",Fit,x(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(()=>[N(x(t.$t("Everyone")),1)]),_:1}),_(b,{value:"logged_in"},{default:w(()=>[N(x(t.$t("Only Logged In Users")),1)]),_:1}),_(b,{value:"role_based"},{default:w(()=>[N(x(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",Nit,x(t.$t("User Roles")),1),g("span",Bit,x(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,we(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",zit,x(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",Hit,x(t.$t("Not Matched User Roles")),1),g("span",Uit,x(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.canManageAuthSettings?(v(),D(u,{key:1,gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",jit,x(t.$t("Redirect URL")),1),g("span",Wit,x(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",Yit,[g("p",null,x(t.$t("Do not use your community portal URL here. Maybe you can use your login/signup URL")),1)])]),_:1})]),_:1})]),_:1})):O("",!0),_(u,{gutter:30,class:"setting_row"},{default:w(()=>[_(a,{sm:12},{default:w(()=>[g("p",qit,x(t.$t("Login / Registration URLs")),1),g("span",Git,x(t.$t("Find the default Login/Registration Urls")),1)]),_:1}),_(a,{sm:12},{default:w(()=>[o.canManageAuthSettings?(v(),D(c,{key:0,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(()=>[N(x(t.$t("Use Default")),1)]),_:1}),_(h,{value:"custom"},{default:w(()=>[N(x(t.$t("Use Custom Login Page")),1)]),_:1})]),_:1},8,["modelValue"])]),_:1},8,["label"])):O("",!0),o.isCustomLogin&&o.canManageAuthSettings?(v(),D(c,{key:1,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,x(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,x(t.$t("Copy")),1)]),_:1})]),_:1},8,["value","placeholder"]),s.users_can_register?O("",!0):(v(),A(ee,{key:0},[g("div",Xit,[g("p",null,[N(x(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},x(t.$t("Go to General Settings.")),9,Kit)])]),e[21]||(e[21]=g("div",{style:{width:"100%"}},[g("hr")],-1)),o.canManageAuthSettings?(v(),D(y,{key:0,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(()=>[N(x(t.$t("Enable User Registration via FluentCommunity Signup Form")),1)]),_:1},8,["modelValue"])):O("",!0)],64))]),_:1},8,["label"]),s.settings.auth_form_type=="default"&&o.canManageAuthSettings?(v(),A(ee,{key:2},[_(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",class:"fcom_checkbox"},{default:w(()=>[N(x(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",Zit,x(t.$t("Customize Login/Signup Form")),1),g("span",Jit,x(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(()=>[N(x(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,x(t.$t("Save Settings")),1)]),_:1},8,["disabled","onClick"])]),_:1})]),_:1})):s.loading?(v(),D(S,{key:1,animated:!0,rows:10})):O("",!0)])])]),s.showCustomLoginForm?(v(),A("div",Qit,[(v(),D(ea,{to:"body"},[_(M,{onCompleted:e[20]||(e[20]=I=>s.showCustomLoginForm=!1)})]))])):O("",!0)]),_:1},8,["title"])]),_:1})}const tot=ue(vit,[["render",eot]]),not={name:"ContentDivider",props:{lineColor:{type:String,default:"var(--fcom-secondary-border, #e5e7eb)"},position:{type:String,default:"center",validator:t=>["center","left","right"].includes(t)}}},sot={class:"fcom_content_divider__content"};function iot(t,e,n,i,s,o){return v(),A("div",{class:q(["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",sot,[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 oot=ue(not,[["render",iot]]),rot={name:"MenuGroupSettings",components:{SpaceCourseSelector:CS,FluentDnD:za,LogoEmojiSelector:Z1,Drawer:tu,ActionPopover:oa},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()}}},aot={key:0,class:"fcom_section_primary fcom_menu_group_settings"},lot={class:"fcom_section_primary_item"},cot={class:"fcom_section_primary_item_title"},uot={class:"fcom_heading_item"},dot={class:"fcom_section_item_actions"},hot={class:"fcom_section_items menu-items-container"},fot={key:0,style:{padding:"1rem"}},pot={class:"fcom_section_item_title"},mot={class:"fcom_heading_item"},got={key:0,class:"community_avatar"},vot=["src"],_ot={key:1,class:"fcom_emoji"},yot={key:2,class:"fcom_shape"},bot=["innerHTML"],wot={class:"fcom_section_item_actions"},kot={key:0},Cot={key:1},xot={key:0},Sot={class:"fcom_help_text"},$ot={class:"fcom_help_text"};function Aot(t,e,n,i,s,o){const r=He,a=be,l=hi,c=H("action-popover"),u=H("FluentDnD"),d=H("logo-emoji-selector"),h=ft,f=en,p=Yt,m=Li,y=ws,b=H("SpaceCourseSelector"),k=sa,C=tn,$=H("drawer");return v(),A(ee,null,[n.menuItems?(v(),A("div",aot,[g("div",lot,[g("div",cot,[g("div",uot,[le(t.$slots,"title",{},()=>[g("h4",null,x(n.title),1)])])]),g("div",dot,[_(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=S=>o.initEditLink({enabled:"yes",privacy:"public",membership_ids:[],new_tab:"yes"}))},{default:w(()=>[N(x(t.$t("Add New Link")),1)]),_:1})])]),g("div",hot,[n.menuItems.length?O("",!0):(v(),A("div",fot,[g("p",null,x(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:S,index:M})=>[g("div",pot,[g("p",mot,[n.use_icon_selector?(v(),A(ee,{key:0},[e[12]||(e[12]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),S.icon_image?(v(),A("div",got,[_(a,null,{default:w(()=>[g("img",{alt:"",style:{"max-width":"16px","max-height":"16px"},src:S.icon_image},null,8,vot)]),_:2},1024)])):S.emoji?(v(),A("span",_ot,x(S.emoji),1)):S.shape_svg?(v(),A("span",yot,[_(a,{innerHTML:S.shape_svg},null,8,["innerHTML"])])):O("",!0)],64)):S.icon_svg?(v(),D(a,{key:1},{default:w(()=>[g("span",{innerHTML:S.icon_svg},null,8,bot)]),_:2},1024)):O("",!0),g("span",null,x(S.title),1),S.is_unavailable=="yes"?(v(),D(l,{key:2,type:"danger"},{default:w(()=>[N(x(t.$t("unavailable")),1)]),_:1})):S.enabled=="yes"?(v(),D(l,{key:3,type:"success"},{default:w(()=>[N(x(t.$t("enabled")),1)]),_:1})):(v(),D(l,{key:4,type:"info"},{default:w(()=>[N(x(t.$t("disabled")),1)]),_:1}))])]),g("div",wot,[_(c,{items:o.linkRowActions(S,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]=S=>s.openEditLinkDrawer=S),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",kot,x(t.$t("Edit Link")),1)):(v(),A("h4",Cot,x(t.$t("Add Custom Link")),1))]),default:w(()=>[s.editingItem?(v(),A("div",xot,[_(C,{onSubmit:e[10]||(e[10]=Ee(S=>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]=S=>s.editingItem.title=S)},hs({_: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]=S=>{n.saving||(s.editingItem.emoji=S.emoji,s.editingItem.icon_image=S.logo,s.editingItem.shape_svg=S.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]=S=>s.editingItem.permalink=S)},null,8,["disabled","placeholder","modelValue"]),g("div",Sot,[g("p",null,x(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]=S=>s.editingItem.icon_svg=S)},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]=S=>s.editingItem.enabled=S),class:"fcom_checkbox"},{default:w(()=>[N(x(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]=S=>s.editingItem.new_tab=S),class:"fcom_checkbox"},{default:w(()=>[N(x(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]=S=>s.editingItem.privacy=S)},{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",$ot,x(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]=S=>s.editingItem.membership_ids=S),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,we(s.urlErrors,(S,M)=>(v(),A("li",{style:{"margin-bottom":"0"},key:M},x(S),1))),128))])])]),_:1})):O("",!0),_(f,null,{default:w(()=>[_(r,{disabled:n.saving,class:"fcom_primary_button",onClick:e[9]||(e[9]=S=>o.createOrUpdateLink())},{default:w(()=>[N(x(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 mU=ue(rot,[["render",Aot]]),Eot={name:"MenuSettings",components:{MenuGroupSettings:mU,Layout:_i,AppLayout:yi,ContentDivider:oot,ActionPopover:oa},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()}},Mot={class:"settings_router"},Tot={key:0},Pot={class:"fcom_card_sections"},Iot={class:"fcom_card_sections"},Lot={class:"fcom_card_sections"},Oot={key:0,style:{display:"flex","align-items":"center",gap:"8px"}},Dot={key:1,style:{display:"flex","align-items":"center",gap:"8px"}},Rot={style:{margin:"0"}},Vot={style:{"margin-top":"20px","text-align":"center"}},Fot={key:1,class:"fcom_card_sections",style:{padding:"30px","text-align":"center"}},Not={style:{margin:"0 0 15px",color:"var(--fcom-secondary-text, #6b7280)"}},Bot={key:1,class:"white_loaded"};function zot(t,e,n,i,s,o){const r=He,a=H("menu-group-settings"),l=H("content-divider"),c=ft,u=H("action-popover"),d=Nt,h=H("layout"),f=H("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,x(t.$t("Save Settings")),1)]),_:1},8,["disabled"])]),default:w(()=>[g("div",Mot,[s.menuSettings?(v(),A("div",Tot,[g("div",Pot,[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",Iot,[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",Lot,[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(()=>[N(x(t.$t("Sidebar Bottom Link Groups")),1)]),_:1}),s.menuSettings.afterCommunityLinkGroups.length?(v(),A(ee,{key:0},[(v(!0),A(ee,null,we(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",Oot,[_(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(()=>[N(x(t.$t("Save")),1)]),_:1},8,["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(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["disabled","onClick"])])):(v(),A("div",Dot,[g("h4",Rot,x(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",Vot,[_(r,{disabled:s.saving,onClick:e[2]||(e[2]=p=>o.addFooterGroup()),class:"fcom_secondary_button"},{default:w(()=>[N(x(t.$t("Add Another Group")),1)]),_:1},8,["disabled"])])],64)):(v(),A("div",Fot,[g("p",Not,x(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(()=>[N(x(t.$t("Add Group")),1)]),_:1},8,["disabled"])]))],64)):O("",!0)])):(v(),A("div",Bot,[_(d,{animated:!0,rows:10})]))])]),_:1},8,["title"])]),_:1})}const Hot=ue(Eot,[["render",zot]]),Uot={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()}},jot={style:{float:"left"}},Wot={style:{float:"right",color:"#8492a6","font-size":"13px"}},Yot={key:1},qot={class:"dialog_footer"},Got={key:0},Xot={key:1};function Kot(t,e,n,i,s,o){const r=sn,a=Jt,l=en,c=sa,u=Yt,d=s2,h=He,f=tn,p=xt("loading");return v(),D(f,{onSubmit:e[3]||(e[3]=Ee(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",Yot,x(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,we(s.users,m=>(v(),D(r,{key:m.ID,label:m.display_name+" ("+m.user_email+")",value:m.ID},{default:w(()=>[g("span",jot,x(m.display_name),1),g("span",Wot,x(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(()=>[N(x(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(()=>[N(x(t.$t("Community Admin (All Access)")),1)]),_:1}),_(u,{disabled:s.form.roles.includes("admin"),value:"moderator",class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Space Moderator")),1)]),_:1},8,["disabled"]),_(u,{disabled:s.form.roles.includes("admin"),value:"course_admin",class:"fcom_checkbox"},{default:w(()=>[N(x(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(()=>[N(x(t.$t("Course Creator")),1)]),_:1},8,["disabled"])]),_:1},8,["modelValue"])]),_:1},8,["label"]),g("div",qot,[le(t.$slots,"after_form",{},()=>[Re((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",Got,x(t.$t("Update Role")),1)):(v(),A("span",Xot,x(t.$t("Add Manager")),1))]),_:1},8,["disabled"])),[[p,s.adding]])])])]),_:3},8,["modelValue"])}const Zot=ue(Uot,[["render",Kot]]),Jot={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=Mh(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=Mh(this.xprofile.total_points),e=Mh(t.max_points+1);return t.level!==e.level},getOutlineStyle(){if(!this.withCompletion)return{};const t=Mh(this.xprofile.total_points),e=Mh(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"}}},Qot=["src"],ert={key:1,class:"fcom_no_image"},trt=["aria-label"];function nrt(t,e,n,i,s,o){return v(),A("div",{class:q([{fcom_avatar_is_rounded:n.is_rounded,is_member_online:n.is_online},"fcom_user_avatar"])},[g("span",{style:Xe(o.getOutlineStyle),class:q({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,Qot)):(v(),A("span",ert))],6),o.level||n.is_online?(v(),A("div",{key:0,role:"region","aria-label":t.$t("User Level"),class:"fcom_user_level_mark"},[g("span",null,x(o.level),1)],8,trt)):O("",!0)],2)}const j2=ue(Jot,[["render",nrt]]),srt={name:"ModeratorSettings",components:{UserAvatar:j2,UserRouteLink:la,ManagerForm:Zot,Layout:_i,AppLayout:yi},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"))}},irt=["href"],ort={class:"settings_router manager_section"},rrt={class:"fhr_content_layout_body"},art={key:0,class:"setting_body"},lrt={class:"fcom_manager_actions"},crt={class:"bulk_search"},urt={class:"fcom_manager_table"},drt={class:"user_col"},hrt={class:"user_info"},frt={style:{display:"flex"}},prt={class:"user_id"},mrt={class:"user_email"},grt={class:"fcom_table_action_col"},vrt={key:1,class:"setting_body",style:{"text-align":"center"}},_rt={class:"promo_description"},yrt=["href"],brt={class:"dialog_header"},wrt={class:"dialog_left"},krt={class:"dialog_body"};function Crt(t,e,n,i,s,o){const r=H("Plus"),a=be,l=He,c=ft,u=o8,d=H("user-route-link"),h=Il,f=Pl,p=H("layout"),m=H("app-layout"),y=H("manager-form"),b=$s,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,x(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"},x(t.$t("Upgrade to Pro")),9,irt))]),default:w(()=>[g("div",ort,[g("div",rrt,[t.has_pro?(v(),A("div",art,[g("div",lrt,[g("div",crt,[_(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(()=>[...e[5]||(e[5]=[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)])]),_:1},8,["modelValue","onKeydown","placeholder"])])]),g("div",urt,[Re((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",drt,[_(u,{src:C.row.xprofile.avatar},null,8,["src"]),g("div",hrt,[g("div",frt,[_(d,{xprofile:C.row.xprofile},null,8,["xprofile"]),g("span",prt,"#"+x(C.row.ID),1)]),g("span",mrt,x(C.row.user_email),1)])])]),_:1},8,["label"]),_(h,{label:t.$t("Role"),sortable:""},{default:w(C=>[g("span",null,x(o.formatRoles(C.row.community_role.value)),1)]),_:1},8,["label"]),_(h,null,{default:w(C=>[g("div",grt,[_(l,{onClick:$=>o.showForm(C.row),size:"small"},{default:w(()=>[N(x(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(l,{onClick:$=>o.removeManager(C.row),type:"danger",plain:"",size:"small"},{default:w(()=>[N(x(t.$t("Remove")),1)]),_:1},8,["onClick"])])]),_:1})]),_:1},8,["data","empty-text"])),[[k,s.loading]])])])):(v(),A("div",vrt,[g("p",_rt,x(t.$t("__MODERATOR_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_moderators"),class:"el-button el-button--danger"},x(t.$t("Upgrade to Pro")),9,yrt)]))])])]),_: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",brt,[g("div",wrt,[e[6]||(e[6]=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)),g("div",null,[g("h4",null,x(t.$t(s.editing_manager.editing_user?"Update Role":"Add Manager")),1),g("p",null,x(t.$t("you can edit your role here")),1)])])])]),default:w(()=>[g("div",krt,[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 xrt=ue(srt,[["render",Crt]]),Srt={name:"NestedReplyBox",mixins:[H2],components:{SingleComment:U2,FeedTextComposer:pv,CommentReactions:aU,HeartIcon:B2},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(/ |\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)}}},$rt={key:0,class:"reply_box"},Art=["aria-expanded"],Ert={class:"fcom_comments_react fcom_reaction_list"},Mrt={class:"child_comments"},Trt=["id"],Prt={key:0,class:"reply_box"},Irt=["onClick","aria-expanded"],Lrt={class:"fcom_comments_react fcom_reaction_list"},Ort={key:0,class:"child_reply_wrap"},Drt={class:"feed_commenting"},Rrt={class:"person_avatar"},Vrt=["alt","src"];function Frt(t,e,n,i,s,o){var h;const r=H("HeartIcon"),a=be,l=H("CommentReactions"),c=H("single-comment"),u=He,d=H("feed-text-composer");return v(),A(ee,null,[o.canComment?(v(),A("div",$rt,[((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},x(t.$t("Reply")),9,Art)):O("",!0),g("span",{class:q([{fcom_is_liked:n.comment.liked},"reply_btn"])},[g("div",Ert,[_(a,{role:"button",tabindex:"0","aria-label":t.$t("React"),"aria-pressed":!!n.comment.liked,class:q({user_reacted:n.comment.liked}),onClick:e[1]||(e[1]=f=>o.toggleLike(n.comment)),onKeydown:[e[2]||(e[2]=ut(Ee(f=>o.toggleLike(n.comment),["prevent"]),["enter"])),e[3]||(e[3]=ut(Ee(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",Mrt,[(v(!0),A(ee,null,we(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",Prt,[((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},x(t.$t("Reply")),9,Irt)):O("",!0),g("span",{class:q([{fcom_is_liked:f.liked},"reply_btn"])},[g("div",Lrt,[_(a,{role:"button",tabindex:"0","aria-label":t.$t("React"),"aria-pressed":!!f.liked,class:q({user_reacted:f.liked}),onClick:y=>o.toggleLike(f),onKeydown:[ut(Ee(y=>o.toggleLike(f),["prevent"]),["enter"]),ut(Ee(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,Trt))),256))]),s.composerOpen?(v(),A("div",Ort,[g("div",Drt,[g("div",Rrt,[g("img",{alt:t.$t("Your Photo"),src:t.auth.avatar},null,8,Vrt)]),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(()=>[N(x(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 Nrt=ue(Srt,[["render",Frt]]),Brt={name:"FeedComments",components:{SingleComment:U2,NestedReplyBox:Nrt},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()}},zrt={key:0,class:"feed_comments"},Hrt=["id"],Urt={key:1,class:"feed_comments"},jrt=["id"],Wrt=["onClick","aria-expanded"];function Yrt(t,e,n,i,s,o){const r=Nt,a=H("nested-reply-box"),l=H("single-comment");return n.show_all?(v(),A("div",zrt,[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,we(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)},hs({_: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,Hrt))),128))],64))])):o.lastComment?(v(),A("div",Urt,[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))},hs({_: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},x(t.$_n("%d reply","%d replies",o.lastComment.comments.length)),9,Wrt)):O("",!0)]),_:1},8,["defaultMentions","onCopyLink","checkPermission","feed","comment","is_modal"])]),key:"0"}]),1032,["comment","space_id","onCopyLink"])],8,jrt),n.feed.comments_count>1?(v(),A("div",{key:0,onClick:e[1]||(e[1]=c=>o.maybeShowAllComments()),class:"each_comment show_all_comments"},x(t.$t("View more comments")),1)):O("",!0)])):O("",!0)}const qrt=ue(Brt,[["render",Yrt]]),Grt={name:"ReactedUsers",components:{UserRouteLink:la},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}))}}},Xrt=["title"],Krt={key:0,class:"reactions_avatars"},Zrt=["alt","src"],Jrt={key:0},Qrt={key:1},eat={class:"fcom_user_lists"},tat={key:2};function nat(t,e,n,i,s,o){const r=Nt,a=H("UserAvatar"),l=H("UserRouteLink"),c=qs,u=Yo;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",Krt,[(v(!0),A(ee,null,we(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,Zrt)):O("",!0)]))),128))])):O("",!0),g("span",null,x(t.$_n("%s like","%s likes",n.feed.reactions_count)),1)],8,Xrt)]),default:w(()=>[s.loading?(v(),A("div",Jrt,[_(r,{animated:!0,rows:3})])):s.reactions?(v(),A("div",Qrt,[_(c,{"max-height":"300px"},{default:w(()=>[g("ul",eat,[(v(!0),A(ee,null,we(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",tat,[g("p",null,x(t.$t("Failed to load the list")),1)]))]),_:1},8,["title","onShow"])}const sat=ue(Grt,[["render",nat]]);function iat(){this.__data__=[],this.size=0}var oat=iat;function rat(t,e){return t===e||t!==t&&e!==e}var gU=rat,aat=gU;function lat(t,e){for(var n=t.length;n--;)if(aat(t[n][0],e))return n;return-1}var W2=lat,cat=W2,uat=Array.prototype,dat=uat.splice;function hat(t){var e=this.__data__,n=cat(e,t);if(n<0)return!1;var i=e.length-1;return n==i?e.pop():dat.call(e,n,1),--this.size,!0}var fat=hat,pat=W2;function mat(t){var e=this.__data__,n=pat(e,t);return n<0?void 0:e[n][1]}var gat=mat,vat=W2;function _at(t){return vat(this.__data__,t)>-1}var yat=_at,bat=W2;function wat(t,e){var n=this.__data__,i=bat(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}var kat=wat,Cat=oat,xat=fat,Sat=gat,$at=yat,Aat=kat;function Ep(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])}}Ep.prototype.clear=Cat;Ep.prototype.delete=xat;Ep.prototype.get=Sat;Ep.prototype.has=$at;Ep.prototype.set=Aat;var Y2=Ep,Eat=Y2;function Mat(){this.__data__=new Eat,this.size=0}var Tat=Mat;function Pat(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}var Iat=Pat;function Lat(t){return this.__data__.get(t)}var Oat=Lat;function Dat(t){return this.__data__.has(t)}var Rat=Dat,Vat=Sp,Fat=Vat(Object,"create"),q2=Fat,mT=q2;function Nat(){this.__data__=mT?mT(null):{},this.size=0}var Bat=Nat;function zat(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Hat=zat,Uat=q2,jat="__lodash_hash_undefined__",Wat=Object.prototype,Yat=Wat.hasOwnProperty;function qat(t){var e=this.__data__;if(Uat){var n=e[t];return n===jat?void 0:n}return Yat.call(e,t)?e[t]:void 0}var Gat=qat,Xat=q2,Kat=Object.prototype,Zat=Kat.hasOwnProperty;function Jat(t){var e=this.__data__;return Xat?e[t]!==void 0:Zat.call(e,t)}var Qat=Jat,elt=q2,tlt="__lodash_hash_undefined__";function nlt(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=elt&&e===void 0?tlt:e,this}var slt=nlt,ilt=Bat,olt=Hat,rlt=Gat,alt=Qat,llt=slt;function Mp(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])}}Mp.prototype.clear=ilt;Mp.prototype.delete=olt;Mp.prototype.get=rlt;Mp.prototype.has=alt;Mp.prototype.set=llt;var clt=Mp,gT=clt,ult=Y2,dlt=SS;function hlt(){this.size=0,this.__data__={hash:new gT,map:new(dlt||ult),string:new gT}}var flt=hlt;function plt(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var mlt=plt,glt=mlt;function vlt(t,e){var n=t.__data__;return glt(e)?n[typeof e=="string"?"string":"hash"]:n.map}var G2=vlt,_lt=G2;function ylt(t){var e=_lt(this,t).delete(t);return this.size-=e?1:0,e}var blt=ylt,wlt=G2;function klt(t){return wlt(this,t).get(t)}var Clt=klt,xlt=G2;function Slt(t){return xlt(this,t).has(t)}var $lt=Slt,Alt=G2;function Elt(t,e){var n=Alt(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}var Mlt=Elt,Tlt=flt,Plt=blt,Ilt=Clt,Llt=$lt,Olt=Mlt;function Tp(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])}}Tp.prototype.clear=Tlt;Tp.prototype.delete=Plt;Tp.prototype.get=Ilt;Tp.prototype.has=Llt;Tp.prototype.set=Olt;var MS=Tp,Dlt=Y2,Rlt=SS,Vlt=MS,Flt=200;function Nlt(t,e){var n=this.__data__;if(n instanceof Dlt){var i=n.__data__;if(!Rlt||i.length<Flt-1)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new Vlt(i)}return n.set(t,e),this.size=n.size,this}var Blt=Nlt,zlt=Y2,Hlt=Tat,Ult=Iat,jlt=Oat,Wlt=Rat,Ylt=Blt;function Pp(t){var e=this.__data__=new zlt(t);this.size=e.size}Pp.prototype.clear=Hlt;Pp.prototype.delete=Ult;Pp.prototype.get=jlt;Pp.prototype.has=Wlt;Pp.prototype.set=Ylt;var vU=Pp,qlt="__lodash_hash_undefined__";function Glt(t){return this.__data__.set(t,qlt),this}var Xlt=Glt;function Klt(t){return this.__data__.has(t)}var Zlt=Klt,Jlt=MS,Qlt=Xlt,ect=Zlt;function Ky(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Jlt;++e<n;)this.add(t[e])}Ky.prototype.add=Ky.prototype.push=Qlt;Ky.prototype.has=ect;var _U=Ky;function tct(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 nct=tct;function sct(t,e){return t.has(e)}var yU=sct,ict=_U,oct=nct,rct=yU,act=1,lct=2;function cct(t,e,n,i,s,o){var r=n&act,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&lct?new ict: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(!oct(e,function(b,k){if(!rct(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 bU=cct,uct=Fa,dct=uct.Uint8Array,hct=dct;function fct(t){var e=-1,n=Array(t.size);return t.forEach(function(i,s){n[++e]=[s,i]}),n}var pct=fct;function mct(t){var e=-1,n=Array(t.size);return t.forEach(function(i){n[++e]=i}),n}var TS=mct,vT=h2,_T=hct,gct=gU,vct=bU,_ct=pct,yct=TS,bct=1,wct=2,kct="[object Boolean]",Cct="[object Date]",xct="[object Error]",Sct="[object Map]",$ct="[object Number]",Act="[object RegExp]",Ect="[object Set]",Mct="[object String]",Tct="[object Symbol]",Pct="[object ArrayBuffer]",Ict="[object DataView]",yT=vT?vT.prototype:void 0,N3=yT?yT.valueOf:void 0;function Lct(t,e,n,i,s,o,r){switch(n){case Ict:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Pct:return!(t.byteLength!=e.byteLength||!o(new _T(t),new _T(e)));case kct:case Cct:case $ct:return gct(+t,+e);case xct:return t.name==e.name&&t.message==e.message;case Act:case Mct:return t==e+"";case Sct:var a=_ct;case Ect:var l=i&bct;if(a||(a=yct),t.size!=e.size&&!l)return!1;var c=r.get(t);if(c)return c==e;i|=wct,r.set(t,e);var u=vct(a(t),a(e),i,s,o,r);return r.delete(t),u;case Tct:if(N3)return N3.call(t)==N3.call(e)}return!1}var Oct=Lct;function Dct(t,e){for(var n=-1,i=e.length,s=t.length;++n<i;)t[s+n]=e[n];return t}var Rct=Dct,Vct=Rct,Fct=Na;function Nct(t,e,n){var i=e(t);return Fct(t)?i:Vct(i,n(t))}var Bct=Nct;function zct(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 Hct=zct;function Uct(){return[]}var jct=Uct,Wct=Hct,Yct=jct,qct=Object.prototype,Gct=qct.propertyIsEnumerable,bT=Object.getOwnPropertySymbols,Xct=bT?function(t){return t==null?[]:(t=Object(t),Wct(bT(t),function(e){return Gct.call(t,e)}))}:Yct,Kct=Xct,Zct=Bct,Jct=Kct,Qct=D8;function eut(t){return Zct(t,Qct,Jct)}var tut=eut,wT=tut,nut=1,sut=Object.prototype,iut=sut.hasOwnProperty;function out(t,e,n,i,s,o){var r=n&nut,a=wT(t),l=a.length,c=wT(e),u=c.length;if(l!=u&&!r)return!1;for(var d=l;d--;){var h=a[d];if(!(r?h in e:iut.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,S=e.constructor;$!=S&&"constructor"in t&&"constructor"in e&&!(typeof $=="function"&&$ instanceof $&&typeof S=="function"&&S instanceof S)&&(m=!1)}return o.delete(t),o.delete(e),m}var rut=out,B3=vU,aut=bU,lut=Oct,cut=rut,kT=ZH,CT=Na,xT=P8,uut=L8,dut=1,ST="[object Arguments]",$T="[object Array]",m0="[object Object]",hut=Object.prototype,AT=hut.hasOwnProperty;function fut(t,e,n,i,s,o){var r=CT(t),a=CT(e),l=r?$T:kT(t),c=a?$T:kT(e);l=l==ST?m0:l,c=c==ST?m0:c;var u=l==m0,d=c==m0,h=l==c;if(h&&xT(t)){if(!xT(e))return!1;r=!0,u=!1}if(h&&!u)return o||(o=new B3),r||uut(t)?aut(t,e,n,i,s,o):lut(t,e,l,n,i,s,o);if(!(n&dut)){var f=u&&AT.call(t,"__wrapped__"),p=d&&AT.call(e,"__wrapped__");if(f||p){var m=f?t.value():t,y=p?e.value():e;return o||(o=new B3),s(m,y,n,i,o)}}return h?(o||(o=new B3),cut(t,e,n,i,s,o)):!1}var put=fut,mut=put,ET=X1;function wU(t,e,n,i,s){return t===e?!0:t==null||e==null||!ET(t)&&!ET(e)?t!==t&&e!==e:mut(t,e,n,i,wU,s)}var kU=wU,gut=vU,vut=kU,_ut=1,yut=2;function but(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 gut;if(i)var h=i(c,u,l,t,e,d);if(!(h===void 0?vut(u,c,_ut|yut,i,d):h))return!1}}return!0}var wut=but,kut=K1;function Cut(t){return t===t&&!kut(t)}var CU=Cut,xut=CU,Sut=D8;function $ut(t){for(var e=Sut(t),n=e.length;n--;){var i=e[n],s=t[i];e[n]=[i,s,xut(s)]}return e}var Aut=$ut;function Eut(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}var xU=Eut,Mut=wut,Tut=Aut,Put=xU;function Iut(t){var e=Tut(t);return e.length==1&&e[0][2]?Put(e[0][0],e[0][1]):function(n){return n===t||Mut(n,t,e)}}var Lut=Iut,Out=Na,Dut=z2,Rut=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Vut=/^\w*$/;function Fut(t,e){if(Out(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Dut(t)?!0:Vut.test(t)||!Rut.test(t)||e!=null&&t in Object(e)}var PS=Fut,SU=MS,Nut="Expected a function";function IS(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Nut);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(IS.Cache||SU),n}IS.Cache=SU;var But=IS,zut=But,Hut=500;function Uut(t){var e=zut(t,function(i){return n.size===Hut&&n.clear(),i}),n=e.cache;return e}var jut=Uut,Wut=jut,Yut=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,qut=/\\(\\)?/g,Gut=Wut(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Yut,function(n,i,s,o){e.push(s?o.replace(qut,"$1"):i||n)}),e}),Xut=Gut;function Kut(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 Zut=Kut,MT=h2,Jut=Zut,Qut=Na,edt=z2,tdt=1/0,TT=MT?MT.prototype:void 0,PT=TT?TT.toString:void 0;function $U(t){if(typeof t=="string")return t;if(Qut(t))return Jut(t,$U)+"";if(edt(t))return PT?PT.call(t):"";var e=t+"";return e=="0"&&1/t==-tdt?"-0":e}var ndt=$U,sdt=ndt;function idt(t){return t==null?"":sdt(t)}var odt=idt,rdt=Na,adt=PS,ldt=Xut,cdt=odt;function udt(t,e){return rdt(t)?t:adt(t,e)?[t]:ldt(cdt(t))}var AU=udt,ddt=z2,hdt=1/0;function fdt(t){if(typeof t=="string"||ddt(t))return t;var e=t+"";return e=="0"&&1/t==-hdt?"-0":e}var X2=fdt,pdt=AU,mdt=X2;function gdt(t,e){e=pdt(e,t);for(var n=0,i=e.length;t!=null&&n<i;)t=t[mdt(e[n++])];return n&&n==i?t:void 0}var EU=gdt,vdt=EU;function _dt(t,e,n){var i=t==null?void 0:vdt(t,e);return i===void 0?n:i}var ydt=_dt;function bdt(t,e){return t!=null&&e in Object(t)}var wdt=bdt,kdt=AU,Cdt=T8,xdt=Na,Sdt=TF,$dt=I8,Adt=X2;function Edt(t,e,n){e=kdt(e,t);for(var i=-1,s=e.length,o=!1;++i<s;){var r=Adt(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&&$dt(s)&&Sdt(r,s)&&(xdt(t)||Cdt(t)))}var Mdt=Edt,Tdt=wdt,Pdt=Mdt;function Idt(t,e){return t!=null&&Pdt(t,e,Tdt)}var Ldt=Idt,Odt=kU,Ddt=ydt,Rdt=Ldt,Vdt=PS,Fdt=CU,Ndt=xU,Bdt=X2,zdt=1,Hdt=2;function Udt(t,e){return Vdt(t)&&Fdt(e)?Ndt(Bdt(t),e):function(n){var i=Ddt(n,t);return i===void 0&&i===e?Rdt(n,t):Odt(e,i,zdt|Hdt)}}var jdt=Udt;function Wdt(t){return function(e){return e==null?void 0:e[t]}}var Ydt=Wdt,qdt=EU;function Gdt(t){return function(e){return qdt(e,t)}}var Xdt=Gdt,Kdt=Ydt,Zdt=Xdt,Jdt=PS,Qdt=X2;function eht(t){return Jdt(t)?Kdt(Qdt(t)):Zdt(t)}var tht=eht,nht=Lut,sht=jdt,iht=OF,oht=Na,rht=tht;function aht(t){return typeof t=="function"?t:t==null?iht:typeof t=="object"?oht(t)?sht(t[0],t[1]):nht(t):rht(t)}var lht=aht;function cht(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 uht=cht;function dht(t){return t!==t}var hht=dht;function fht(t,e,n){for(var i=n-1,s=t.length;++i<s;)if(t[i]===e)return i;return-1}var pht=fht,mht=uht,ght=hht,vht=pht;function _ht(t,e,n){return e===e?vht(t,e,n):mht(t,ght,n)}var yht=_ht,bht=yht;function wht(t,e){var n=t==null?0:t.length;return!!n&&bht(t,e,0)>-1}var kht=wht;function Cht(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 xht=Cht;function Sht(){}var $ht=Sht,z3=XH,Aht=$ht,Eht=TS,Mht=1/0,Tht=z3&&1/Eht(new z3([,-0]))[1]==Mht?function(t){return new z3(t)}:Aht,Pht=Tht,Iht=_U,Lht=kht,Oht=xht,Dht=yU,Rht=Pht,Vht=TS,Fht=200;function Nht(t,e,n){var i=-1,s=Lht,o=t.length,r=!0,a=[],l=a;if(n)r=!1,s=Oht;else if(o>=Fht){var c=e?null:Rht(t);if(c)return Vht(c);r=!1,s=Dht,l=new Iht}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 Bht=Nht,zht=lht,Hht=Bht;function Uht(t,e){return t&&t.length?Hht(t,zht(e)):[]}var jht=Uht;const Wht=vi(jht),Yht={name:"FeedFooter",mixins:[H2],components:{ReactedUsers:sat,FeedComments:qrt,FeedTextComposer:pv,ChatIcon:nU,HeartIcon:B2},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=Wht(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)}},qht={ref:"feed_footer",class:"feed_footer"},Ght={class:"fcom_feed_footer_actions"},Xht=["aria-label","aria-pressed"],Kht={class:"fcom_sr_only"},Zht={class:"fcom_sr_only"},Jht={class:"fcom_feed_footer_meta"},Qht={key:0},eft={key:0,class:"fcom_reactions_count feed_reaction_meta"},tft={class:"feed_comment_count"},nft={key:2,class:"feed_reaction_meta"},sft={key:0,ref:"fcom_comment_sorting",class:"fcom_comment_sorting"},ift=["id"],oft={key:0,style:{padding:"0",margin:"0","text-align":"center"}},rft={key:1,class:"feed_commenting"},aft={class:"person_avatar"},lft=["src"],cft={key:2,class:""},uft={style:{padding:"0",margin:"0","text-align":"center"}},dft={key:0,style:{margin:"10px 0"}},hft=["href"];function fft(t,e,n,i,s,o){var m,y,b,k;const r=H("HeartIcon"),a=be,l=H("ChatIcon"),c=H("ReactedUsers"),u=sn,d=Jt,h=H("feed-comments"),f=He,p=H("feed-text-composer");return v(),A(ee,null,[g("div",qht,[g("div",Ght,[g("ul",null,[g("li",{class:q(["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(Ee(C=>o.toggleReact(),["prevent"]),["enter"])),e[2]||(e[2]=ut(Ee(C=>o.toggleReact(),["prevent"]),["space"]))]},[_(a,{class:q({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",Kht,x(t.$t("React")),1)])],42,Xht),((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(Ee(C=>o.showCommentForm(),["prevent"]),["enter"])),e[5]||(e[5]=ut(Ee(C=>o.showCommentForm(),["prevent"]),["space"]))]},[_(a,null,{default:w(()=>[_(l)]),_:1}),g("span",null,[g("span",Zht,x(t.$t("Comment")),1)])],32)):O("",!0)])]),g("div",Jht,[n.feed.reactions_count||n.feed.comments_count||((y=n.feed.meta)==null?void 0:y.comments_disabled)==="yes"?(v(),A("ul",Qht,[n.feed.reactions_count?(v(),A("li",eft,[_(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",tft,x(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",nft,x(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",sft,[_(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",oft,x(t.$t("Comments are disabled for this post.")),1)):O("",!0)],64)):t.hasCommentPermission(n.feed)?(v(),A("div",rft,[g("div",aft,[g("img",{alt:"",src:t.auth.photo},null,8,lft)]),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(()=>[N(x(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",cft,[g("p",uft,[N(x(t.$t("Please join the Space to post a comment."))+" ",1),t.appVars.auth.user_id?(v(),A("div",dft,[_(f,{class:"fcom_primary_button",onClick:e[11]||(e[11]=()=>{t.$emit("joinSpace")})},{default:w(()=>[N(x(t.$t("Join Space")),1)]),_:1})])):(v(),A("a",{key:1,href:t.getCurrentAuthUrl()},x(t.appVars.allow_signup?t.$t("Login / Signup"):t.$t("Login")),9,hft))])]))],8,ift)):O("",!0)],64)}const pft=ue(Yht,[["render",fft]]),mft={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)}}},gft=["value","maxlength","placeholder"];function vft(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(Ee(r=>t.$emit("enter"),["prevent"]),["enter"])),ref:"textarea",maxlength:n.maxlength,class:"fcom_status_title_input",rows:"1",placeholder:n.placeholder},null,40,gft)}const _ft=ue(mft,[["render",vft]]),yft={name:"EyeIcon"},bft={width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function wft(t,e,n,i,s,o){return v(),A("svg",bft,[...e[0]||(e[0]=[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),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)])])}const kft=ue(yft,[["render",wft]]),Cft={name:"CalendarIcon"},xft={width:"14",height:"16",viewBox:"0 0 14 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Sft(t,e,n,i,s,o){return v(),A("svg",xft,[...e[0]||(e[0]=[Ra('<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)])])}const $ft=ue(Cft,[["render",Sft]]),Aft={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:xp,FeedTextComposer:pv,SingleLineTextarea:_ft,EyeIcon:kft,CalendarIcon:$ft},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:{...Fye($S,["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:{...Nye(cT,["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 cT().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)}},Eft={class:"person_avatar"},Mft=["alt","src"],Tft={class:"create_header_content"},Pft={key:0,class:"fcom_create_status_box_header"},Ift={class:"user_infos"},Lft={class:"feed_user_name"},Oft={class:"feed_meta_info"},Dft={key:1,class:"feed_timestamp"},Rft={class:"create_header_action"},Vft={key:0,ref:"fcom_topics_input",class:"fcom_topics_input"},Fft={style:{margin:"0",display:"block",width:"100%",padding:"5px 0","font-weight":"500"}},Nft={key:0,class:"fcom_meta_text"},Bft={class:"fcom_post_actions"},zft={key:0,class:"fcom_post_space_name"},Hft={class:"target_label"},Uft={ref:"fcom_posting_space",style:{"margin-right":"10px"}},jft={key:0,class:"fcom_space_title"},Wft={key:1},Yft={class:"fcom_empty_spaces_dropdown"},qft={key:0,class:"fcom_composer_admin_actions"},Gft={key:0},Xft={class:"dialog_header"},Kft={class:"dialog_left schedule_header_left"},Zft={class:"dialog_body"},Jft={class:"fcom_input_help"},Qft={class:"dialog_footer"};function ept(t,e,n,i,s,o){const r=H("EditPen"),a=be,l=H("CalendarIcon"),c=He,u=H("EyeIcon"),d=H("Close"),h=H("SingleLineTextarea"),f=sn,p=Jt,m=H("SpaceIcon"),y=n2,b=Yt,k=H("feed-text-composer"),C=Wd,$=en,S=M8,M=tn,P=$s;return o.canPost?(v(),A("div",{key:0,class:q([{state_active:o.isStateActive},"create_status_holder"])},[g("div",{class:q(["create_header",{state_active:o.isStateActive}])},[g("div",Eft,[g("img",{alt:n.author.name||t.$t("Your Photo"),src:n.author.avatar||t.auth.avatar},null,8,Mft)]),g("div",Tft,[o.isStateActive?O("",!0):(v(),A("div",{key:0,onClick:e[0]||(e[0]=(...T)=>o.makeActive&&o.makeActive(...T)),class:"form_placeholder"},x(o.currentPlaceHolder),1)),g("div",{class:q([{fcom_editor_with_title:s.hasPostTitle,"is-active":o.isStateActive},"fcom_create_status_box"])},[o.isStateActive?(v(),A("div",Pft,[g("div",Ift,[g("div",Lft,x(o.getPostTitle),1),g("div",Oft,[!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,x(o.getScheduleLabel),1),_(a,null,{default:w(()=>[_(r)]),_:1})])):(v(),A("span",Dft,x(n.editing_feed.id?t.humanDateDiff(n.editing_feed.created_at):t.dayjs().format(t.siteDateTimeFormat)),1))])]),g("div",Rft,[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",Vft,[_(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,we(o.currentTopics,T=>(v(),D(f,{key:T.slug,label:T.title,value:T.id},{default:w(()=>[g("span",Fft,x(T.title),1),T.description?(v(),A("span",Nft,x(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",qft,[_(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(()=>[N(x(t.$t("Send announcement email to space members"))+" ",1),t.has_pro?O("",!0):(v(),A("span",Gft,"("+x(t.$t("Require Pro"))+")",1))]),_:1},8,["disabled","modelValue"])])):O("",!0)]),default:w(()=>[g("div",Bft,[n.space&&o.isStateActive?(v(),A("div",zft,[g("span",null,"#"+x(n.space),1)])):O("",!0),!n.space&&!n.disableSpace?(v(),A(ee,{key:1},[g("span",Hft,x(t.$t("Posting in:")),1),g("span",Uft,[_(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",Yft,x(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,we(s.postableSpaces,T=>(v(),D(y,{key:T.label,label:T.label},{default:w(()=>[(v(!0),A(ee,null,we(T.spaces,I=>(v(),D(f,{key:I.slug,label:I.title,value:I.slug},{default:w(()=>[I.id?(v(),A("span",jft,[_(m,{space_profile:I},null,8,["space_profile"]),g("span",null,x(t.getExcerpt(I.title,30)),1)])):(v(),A("span",Wft,x(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:q(["fcom_primary_button",{fcom_update_button:o.isEditing}])},{default:w(()=>[N(x(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",Xft,[g("div",Kft,[g("h4",null,x(t.$t("Schedule Post")),1),g("p",null,x(t.$t("Choose a date and time in the future when you want your post to be published")),1)])])]),footer:w(()=>[g("div",Qft,[_(c,{class:"fcom_secondary_button",onClick:o.cancelSchedule},{default:w(()=>[N(x(t.$t("Remove Schedule")),1)]),_:1},8,["onClick"]),_(c,{class:"fcom_primary_button",disabled:o.isScheduleDisabled,onClick:o.schedulePost},{default:w(()=>[N(x(t.$t("Select Schedule")),1)]),_:1},8,["disabled","onClick"])])]),default:w(()=>[g("div",Zft,[_(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(()=>[_(S,{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",Jft,x(t.$t("The date and time is based on your site's Timezone")),1)]),_:1})])]),_:1},8,["modelValue","width"])],2)):O("",!0)}const tpt=ue(Aft,[["render",ept]]),npt={name:"EditFeed",components:{SpaceIcon:xp,CreateStatusForm:tpt},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()}},spt={class:"fcom_feed_edit"},ipt={class:"fcom_feed_edit_dialog_header"},opt={key:0,class:"fcom_feed_edit_dialog_body"},rpt={key:0},apt={key:0,style:{"margin-top":"5px"}},lpt={class:"fcom_space_title"};function cpt(t,e,n,i,s,o){const r=H("Close"),a=be,l=Yt,c=sn,u=H("SpaceIcon"),d=Jt,h=Ss,f=H("create-status-form"),p=Nt,m=$s,y=xt("loading");return v(),A("div",spt,[_(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[Re((v(),A("div",null,[g("div",ipt,[g("span",null,x(t.$t("Edit Feed")),1),_(a,{onClick:o.handleClose},{default:w(()=>[_(r)]),_:1},8,["onClick"])]),s.feed.id?(v(),A("div",opt,[!(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",rpt,[_(l,{modelValue:s.changeSpace,"onUpdate:modelValue":e[0]||(e[0]=C=>s.changeSpace=C),class:"fcom_checkbox"},{default:w(()=>[N(x(t.$t("Move to a different space")),1)]),_:1},8,["modelValue"]),s.changeSpace?(v(),A("div",apt,[_(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,x(o.profileOptionLabel),1)]),_:1},8,["label","disabled"]),(v(!0),A(ee,null,we(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",lpt,[_(u,{space_profile:C},null,8,["space_profile"]),g("span",null,x(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(()=>[N(x(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 MU=ue(npt,[["render",cpt]]),upt={name:"SurveyVoters",props:["feed","option","options","totalCount"],components:{UserRouteLink:la,UserAvatar:j2},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()}},dpt={class:"dialog_header"},hpt={class:"fcom_filter_menu"},fpt={class:"fcom_filter_menu_ul"},ppt=["onClick"],mpt={key:1},gpt={class:"feed_meta_info survey_voters_meta"},vpt={class:"meta_line"},_pt={class:"meta_line"},ypt={class:"voters_list"},bpt={class:"voter_avatar"},wpt={class:"voter_info"},kpt=["title"],Cpt={key:2,class:"not_found"};function xpt(t,e,n,i,s,o){const r=Nt,a=H("UserAvatar"),l=H("UserRouteLink"),c=qs,u=$s;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",dpt,[g("div",hpt,[g("ul",fpt,[(v(!0),A(ee,null,we(n.options,h=>(v(),A("li",{key:h.slug},[g("a",{onClick:Ee(f=>o.switchOption(h.slug),["prevent"]),class:q({"router-link-exact-active":n.option.slug==h.slug}),href:"#"},x(h.label),11,ppt)]))),128))])])])]),default:w(()=>[s.loading?(v(),D(r,{key:0,animated:"",rows:4})):s.voters.length?(v(),A("div",mpt,[g("div",gpt,[g("span",vpt,x(o.getVotePercentage),1),g("span",_pt,x(t.$_n("%s Vote","%s Votes",n.option.vote_counts)),1)]),_(c,{"max-height":"800px"},{default:w(()=>[g("div",ypt,[(v(!0),A(ee,null,we(s.voters,d=>(v(),A("div",{key:d.id,class:"voter_item"},[d.xprofile?(v(),A(ee,{key:0},[g("div",bpt,[_(a,{with_level:!1,xprofile:d.xprofile},null,8,["xprofile"])]),g("div",wpt,[_(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"},x(t.$t("Joined %s",t.humanDateDiff(d.xprofile.created_at))),9,kpt)):O("",!0)])],64)):O("",!0)]))),128))])]),_:1})])):(v(),A("div",Cpt,[g("p",null,x(t.$t("No voters yet")),1)]))]),_:1},8,["modelValue","width","onClose"])}const Spt=ue(upt,[["render",xpt]]),$pt={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:Spt},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()}},Apt={class:"fcom_app_options"},Ept=["onClick"],Mpt={class:"fcom_app_text"},Tpt={class:"fcom_app_input_wrap"},Ppt={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 6 6"},Ipt={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 8 8"},Lpt=["onClick"],Opt={key:0},Dpt={class:"feed_meta_info"},Rpt={key:0,class:"meta_line"},Vpt=["title"],Fpt=["title"];function Npt(t,e,n,i,s,o){const r=H("ArrowRight"),a=be,l=H("SurveyVoters");return v(),A(ee,null,[g("div",{class:q(["fcom_app_render",{"no-border":o.shouldHideBorder}])},[g("div",Apt,[(v(!0),A(ee,null,we(s.formattedOptions,(c,u)=>(v(),A("div",{key:c.slug,onClick:d=>o.toggleVote(u),class:q([c.voted?"fcom_is_voted":"","fcom_app_option"])},[g("div",Mpt,[g("span",Tpt,[g("span",{class:q("fcom_input_"+s.inputType)},[s.inputType=="single_choice"?(v(),A("svg",Ppt,[...e[1]||(e[1]=[g("circle",{cx:"3",cy:"3",r:"2.5",fill:"currentColor"},null,-1)])])):(v(),A("svg",Ipt,[...e[2]||(e[2]=[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)])]))],2)]),g("span",null,x(c.label),1)]),g("div",{class:"fcom_app_counts",onClick:d=>o.showVoters(c)},[N(x(c.vote_counts?Math.floor(c.vote_counts/s.totalCount*100)+"%":"")+" ",1),c.vote_counts?(v(),A("span",Opt,"("+x(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,Lpt),s.totalCount?(v(),A("span",{key:0,style:Xe(o.getVoteStyle(c.vote_counts)),class:"fc_app_shadow"},null,4)):O("",!0)],10,Ept))),128))]),g("div",Dpt,[s.totalCount?(v(),A("span",Rpt,x(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"},x(o.endedDateLabel),9,Vpt)):(v(),A("span",{key:1,title:t.$t("Will end at: %s",s.endingDate),class:"meta_line"},x(o.endingDateLabel),9,Fpt))],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 TU=ue($pt,[["render",Npt]]),Bpt={name:"BookmarkIcon",props:["is_active"]},zpt={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"},Hpt={key:1,width:"16",height:"20",viewBox:"0 0 16 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Upt(t,e,n,i,s,o){return n.is_active?(v(),A("svg",zpt,[...e[0]||(e[0]=[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)])])):(v(),A("svg",Hpt,[...e[1]||(e[1]=[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)])]))}const jpt=ue(Bpt,[["render",Upt]]),Wpt={name:"RenderChildPost",components:{ImageCarousel:AS,SurveyRenderer:TU,DocumentLists:fv,UserRouteLink:la,MediaPreview:Ap,FeedMdContent:mv},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()}},Ypt=["id"],qpt={key:0,class:"fcom_top_media"},Gpt={class:"fcom_feed_header_wrap"},Xpt={class:"feed_header"},Kpt={key:0,class:"feed_user"},Zpt={class:"feed_user_name"},Jpt={class:"feed_meta_info"},Qpt={key:0,class:"meta_line"},emt=["title","href"],tmt={key:1,class:"feed_timestamp"},nmt={key:0,class:"feed_title"},smt={class:"feed_title_heading"},imt={key:1,class:"expand-button"};function omt(t,e,n,i,s,o){var p,m,y,b,k,C,$,S,M,P,T;const r=H("media-preview"),a=H("UserAvatar"),l=H("UserRouteLink"),c=H("FeedMdContent"),u=He,d=H("DocumentLists"),h=H("SurveyRenderer"),f=H("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:q([o.feedClasses,"feed"])},[o.hasTopMedia?(v(),A("div",qpt,[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",Gpt,[g("div",Xpt,[s.feed.xprofile?(v(),A("div",Kpt,[_(a,{with_level:!1,xprofile:s.feed.xprofile},null,8,["xprofile"]),g("div",null,[g("div",Zpt,[_(l,{show_badge:!0,xprofile:s.feed.xprofile,show_follow:!0},null,8,["xprofile"])]),g("div",Jpt,[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",Qpt,x(t.$t("created a poll")),1)):O("",!0),g("a",{title:s.feed.created_at,href:s.feed.permalink,class:"feed_timestamp"},x(t.humanDateDiff(s.feed.created_at)),9,emt),!s.in_space&&s.feed.space?(v(),A("span",tmt,x(t.$t("Posted in %s",t.getExcerpt(s.feed.space.title,30))),1)):O("",!0)])])])):O("",!0)])]),g("div",{ref:"feed_body",class:q([{feed_is_overflow_content:s.hasOverflowContent},"feed_body"])},[s.feed.title?(v(),A("div",nmt,[g("h2",smt,x(s.feed.title),1)])):O("",!0),_(c,{class_name:"feed_texts",content:s.feed.message_rendered},null,8,["content"]),s.hasOverflowContent?(v(),A("div",imt,[_(u,{class:"btn_expand"},{default:w(()=>[N(x(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=(S=($=s.feed)==null?void 0:$.meta)==null?void 0:S.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,Ypt)])):O("",!0)}const rmt=ue(Wpt,[["render",omt]]),amt={name:"CustomAppMeta",components:{RenderChildPost:rmt},props:{feed:{type:Object,required:!0}}},lmt={ref:"fcom_custom_app"},cmt={key:0},umt=["innerHTML"];function dmt(t,e,n,i,s,o){const r=H("RenderChildPost");return v(),A("div",lmt,[n.feed.meta.custom_app_preview.app_name=="child_post"&&n.feed.meta.custom_app_preview.feed_id?(v(),A("div",cmt,[_(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,umt)):O("",!0)],512)}const hmt=ue(amt,[["render",dmt]]),fmt={name:"FeedAction",components:{EditFeed:MU},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(()=>{}))}}},pmt={class:"actions_items"},mmt={key:0},gmt={key:1},vmt={key:0},_mt={key:1},ymt={key:0},bmt={key:1},wmt={key:0},kmt={key:1};function Cmt(t,e,n,i,s,o){var d,h;const r=H("MoreFilled"),a=be,l=He,c=Yo,u=H("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",pmt,[le(t.$slots,"before_feed_actions_pop"),g("li",{onClick:e[0]||(e[0]=m=>o.copyFeedLink())},x(t.$t("Copy Link")),1),o.showReportOption?(v(),A("li",{key:0,onClick:e[1]||(e[1]=m=>o.reportPost())},x(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())},x(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",mmt,x(t.$t("List Post")),1)):(v(),A("span",gmt,x(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",vmt,x(t.$t("Unpin from Top")),1)):(v(),A("span",_mt,x(t.$t("Pin to top")),1))]),g("li",{onClick:e[5]||(e[5]=m=>o.toggleSidebarPin())},[n.feed.priority?(v(),A("span",bmt,x(t.$t("Unpin from sidebar")),1)):(v(),A("span",ymt,x(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())},x(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",wmt,x(t.$t("Enable comments")),1)):(v(),A("span",kmt,x(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())},x(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 xmt=ue(fmt,[["render",Cmt]]),Smt={name:"Feed",components:{DocumentLists:fv,CustomAppMeta:hmt,BookmarkIcon:jpt,StickyIcon:cU,UserRouteLink:la,EditFeed:MU,FeedFooter:pft,MediaPreview:Ap,ImageCarousel:AS,SurveyRenderer:TU,ReportReview:lU,FeedAction:xmt,FeedMdContent:mv},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)}},$mt=["id"],Amt={key:1,class:"fcom_top_media"},Emt={key:2,class:"fcom_feed_header_wrap"},Mmt={class:"feed_actions fcom_concat_buttons"},Tmt={key:0,class:"fcom_feed_topics"},Pmt={class:"feed_header"},Imt={key:0,class:"feed_user"},Lmt={class:"feed_user_info"},Omt={class:"feed_user_name"},Dmt={key:0,class:"feed_status"},Rmt={key:1,class:"feed_status"},Vmt={key:2,class:"feed_status"},Fmt={class:"feed_meta_info"},Nmt={key:0,class:"meta_line"},Bmt=["title","href"],zmt=["title","href"],Hmt={key:3},Umt={key:0,class:"feed_title"},jmt={key:0,class:"feed_title_heading"},Wmt=["href"],Ymt={key:1,class:"feed_title_heading"};function qmt(t,e,n,i,s,o){var T,I,L,R,V,B,F,z,U,G,K,X,W,Q,ne;const r=H("report-review"),a=H("media-preview"),l=He,c=H("StickyIcon"),u=be,d=H("BookmarkIcon"),h=H("FeedAction"),f=H("router-link"),p=H("UserAvatar"),m=H("UserRouteLink"),y=hi,b=H("FeedMdContent"),k=H("SurveyRenderer"),C=H("ImageCarousel"),$=H("DocumentLists"),S=H("CustomAppMeta"),M=H("feed-footer"),P=xt("loading");return Re((v(),A("div",{id:"feed_id_"+((T=n.feed)==null?void 0:T.id),class:q([o.feedClasses,"feed"])},[o.showReport?(v(),D(r,{key:0,feed:n.feed},null,8,["feed"])):O("",!0),o.hasTopMedia?(v(),A("div",Amt,[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",Emt,[g("div",Mmt,[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(()=>[N(x(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:q([{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"))},x(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",Tmt,[(v(!0),A(ee,null,we(n.feed.terms,Z=>(v(),D(f,{onClick:Ee(ae=>o.gotoTopicUrl(Z.slug),["prevent"]),key:Z.slug,to:o.getTopicRoute(Z.slug),class:"feed_timestamp"},{default:w(()=>[N("#"+x(Z.title),1)]),_:2},1032,["onClick","to"]))),128))])):O("",!0),g("div",Pmt,[n.feed.xprofile?(v(),A("div",Imt,[_(p,{with_level:!1,xprofile:n.feed.xprofile},null,8,["xprofile"]),g("div",Lmt,[g("div",Omt,[_(m,{show_badge:!0,xprofile:n.feed.xprofile,show_follow:!0},null,8,["xprofile"]),n.feed.status=="pending"?(v(),A("span",Dmt,[_(y,{type:"warning"},{default:w(()=>[N(x(t.$t("In Review")),1)]),_:1})])):O("",!0),n.feed.status=="scheduled"?(v(),A("span",Rmt,[_(y,{type:"warning"},{default:w(()=>[N(x(t.$t("Scheduled")),1)]),_:1})])):O("",!0),n.feed.status=="unlisted"&&!n.is_single?(v(),A("span",Vmt,[_(y,{class:"fcom_unlisted_tag"},{default:w(()=>[N(x(t.$t("Unlisted")),1)]),_:1})])):O("",!0)]),g("div",Fmt,[n.feed.content_type=="survey"&&((F=(B=(V=(R=n.feed)==null?void 0:R.meta)==null?void 0:V.survey_config)==null?void 0:B.options)!=null&&F.length)?(v(),A("span",Nmt,x(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"},x(o.getScheduledTime(n.feed.scheduled_at)),9,Bmt)):(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"},x(t.humanDateDiff(n.feed.created_at)),9,zmt)),!s.in_space&&n.feed.space?(v(),A("span",Hmt,[_(f,{to:o.getSpaceRoute(n.feed.space.slug),class:"feed_timestamp"},{default:w(()=>[N(x(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:q([{feed_is_overflow_content:s.hasOverflowContent},"feed_body"])},[n.feed.title?(v(),A("div",Umt,[n.is_single?(v(),A("h2",Ymt,x(n.feed.title),1)):(v(),A("h2",jmt,[g("a",{onClick:e[6]||(e[6]=Ee((...Z)=>o.showFullContent&&o.showFullContent(...Z),["prevent"])),href:n.feed.permalink},x(n.feed.title),9,Wmt)]))])):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(()=>[N(x(t.$t("Show More")),1)]),_:1})])):O("",!0)],2),n.feed.content_type=="survey"&&((K=(G=(U=(z=n.feed)==null?void 0:z.meta)==null?void 0:U.survey_config)==null?void 0:G.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=(W=n.feed)==null?void 0:W.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(S,{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,$mt)),[[P,s.working]])}const Gmt=ue(Smt,[["render",qmt]]),Xmt={name:"ReportDetails",components:{Feed:Gmt,SingleComent:U2,Pagination:uu},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()}},Kmt={class:"dialog_header report_details_header"},Zmt={class:"report_details_header_left"},Jmt={class:"report_details_header_right"},Qmt=["href"],egt=["href"],tgt=["href"],ngt=["href"],sgt={class:"meta_line"},igt=["href","title"],ogt={key:0,class:"dialog_body"},rgt={class:"fcom_filter_menu"},agt={class:"fcom_filter_menu_ul"},lgt={key:0,class:"report_details"},cgt={key:1,class:"report_details"},ugt={class:"report_details_header"},dgt={class:"report_details_header_left"},hgt={class:"report_details_header_right"},fgt={key:0},pgt={key:1},mgt={key:1},ggt={class:"report_reason"},vgt=["title"],_gt={key:0,class:"report_details_body"},ygt=["textContent"],bgt=["aria-label"],wgt={class:"dialog_footer report_footer"};function kgt(t,e,n,i,s,o){const r=H("UserAvatar"),a=H("UserRouteLink"),l=H("SingleComent"),c=H("Feed"),u=Nt,d=H("Pagination"),h=He,f=$s;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,$,S,M,P,T,I,L;return[g("div",Kmt,[g("div",Zmt,[_(r,{with_level:!1,xprofile:o.getAuthorProfile(n.report)},null,8,["xprofile"])]),g("div",Jmt,[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)},x(t.$t("commented ")),9,Qmt)):(v(),A("a",{key:1,href:o.getPermalink(n.report)},x(t.$t("posted ")),9,egt)),g("span",null,x(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},x(((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,tgt)):(v(),A("a",{key:3,href:t.$getRouteLink("s/:slug",{slug:(P=(M=(S=n.report)==null?void 0:S.post)==null?void 0:M.space)==null?void 0:P.slug})},x((L=(I=(T=n.report)==null?void 0:T.post)==null?void 0:I.space)==null?void 0:L.title),9,ngt))]),g("div",sgt,[g("a",{href:o.getPermalink(n.report),title:n.report.created_at},x(t.$t("Reported at ")+t.humanDateDiff(n.report.created_at)),9,igt)])])])]}),footer:w(()=>[g("div",wgt,[n.status!="ignored"?(v(),D(h,{key:0,class:"fcom_secondary_button",onClick:e[3]||(e[3]=p=>o.ignoreReport(n.report))},{default:w(()=>[N(x(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(()=>[N(x(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(()=>[N(x(t.$t("Delete Report")),1)]),_:1}))])]),default:w(()=>[n.report?(v(),A("div",ogt,[g("div",rgt,[g("ul",agt,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Ee(p=>o.switchOption("details"),["prevent"])),class:q({"router-link-exact-active":s.currentTab=="details"}),href:"#"},x(t.$t("Details")),3)]),g("li",null,[g("a",{onClick:e[1]||(e[1]=Ee(p=>o.switchOption("reports"),["prevent"])),class:q({"router-link-exact-active":s.currentTab=="reports"}),href:"#"},x(t.$t("Reports")+" "+n.report.reports_count),3)])])]),s.currentTab=="details"?(v(),A("div",lgt,[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",cgt,[s.loading?(v(),D(u,{key:1,rows:5,animated:!0})):(v(!0),A(ee,{key:0},we(s.postReports,p=>(v(),A("div",{key:p.id,class:"report_details_item"},[g("div",ugt,[g("div",dgt,[p.reporter?(v(),D(r,{key:0,with_level:!1,xprofile:p.reporter},null,8,["xprofile"])):O("",!0)]),g("div",hgt,[!p.reporter&&!o.getReason(p.reason)?(v(),A("div",fgt,x(t.$t("Flagged automatically by the site rule")),1)):(v(),A("div",pgt,[p.reporter?(v(),D(a,{key:0,show_verified:!1,xprofile:p.reporter},null,8,["xprofile"])):(v(),A("span",mgt,x(t.$t("By System ")),1)),o.getReason(p.reason)?(v(),A(ee,{key:2},[g("span",null,x(t.$t("reported for ")),1),g("span",ggt,x(o.getReason(p.reason)),1)],64)):O("",!0)])),g("div",{title:p.created_at,class:"meta_line"},x(t.humanDateDiff(p.created_at)),9,vgt)])]),p.explanation?(v(),A("div",_gt,[g("div",{textContent:x(p.explanation)},null,8,ygt)])):O("",!0)]))),128)),s.pagination.total?(v(),A("div",{key:2,role:"region","aria-label":t.$t("Pagination"),class:"pagination_wrap"},[_(d,{hide_on_single:!0,onFetch:e[2]||(e[2]=p=>o.getPostReports()),pagination:s.pagination},null,8,["pagination"])],8,bgt)):O("",!0)])):O("",!0)])):O("",!0)]),_:1},8,["modelValue","title","width"])}const Cgt=ue(Xmt,[["render",kgt]]),xgt={name:"ModerationConfig",components:{Drawer:tu},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})}},Sgt={class:"fcom_moderation_settings"},$gt={class:"fcom_moderation_section"},Agt={class:"fcom_input_wrap"},Egt={class:"fcom_moderation_section"},Mgt={class:"fcom_moderation_section_head"},Tgt={class:"help_text"},Pgt={class:"fcom_moderation_section"},Igt={class:"fcom_moderation_section_head"},Lgt={class:"fcom_inline_field"},Ogt={class:"fcom_inline_row"},Dgt={class:"fcom_inline_field"},Rgt={class:"fcom_inline_row"},Vgt={class:"fcom_inline_field"},Fgt={class:"fcom_inline_row"},Ngt={class:"fcom_moderation_section"},Bgt={class:"fcom_moderation_section_head"},zgt={class:"fcom_input_wrap"},Hgt={class:"fcom_input_wrap"},Ugt={class:"fcom_input_wrap"},jgt={class:"help_text"},Wgt={class:"fcom_moderation_footer"};function Ygt(t,e,n,i,s,o){const r=H("InfoFilled"),a=be,l=Ss,c=Yt,u=ft,d=en,h=r2,f=sa,p=sn,m=Jt,y=tn,b=He,k=H("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",Wgt,[_(b,{class:"fcom_secondary_button",onClick:o.handleCancel},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1},8,["onClick"]),_(b,{class:"fcom_primary_button",loading:n.saving,disabled:n.saving,onClick:o.saveConfig},{default:w(()=>[N(x(t.$t("Update")),1)]),_:1},8,["loading","disabled","onClick"])])]),default:w(()=>[g("div",Sgt,[_(y,{onSubmit:e[13]||(e[13]=Ee(C=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[g("div",$gt,[g("div",Agt,[_(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(()=>[N(x(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]=Ee(()=>{},["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",Egt,[g("div",Mgt,[g("h4",null,x(t.$t("Content Filtering")),1),g("p",null,x(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",Tgt,x(t.$t("Use comma-separated words. If these words found then the content will go in review state.")),1)]),_:1},8,["label"])]),g("div",Pgt,[g("div",Igt,[g("h4",null,x(t.$t("Automatic Moderation")),1),g("p",null,x(t.$t("Automatically act on content and members once a threshold is reached.")),1)]),g("div",Lgt,[g("div",Ogt,[g("span",null,x(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,x(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",Dgt,[g("div",Rgt,[g("span",null,x(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,x(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",Vgt,[g("div",Fgt,[g("span",null,x(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,x(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",Ngt,[g("div",Bgt,[g("h4",null,x(t.$t("New Content Approval")),1),g("p",null,x(t.$t("Require approval before new posts or comments become visible.")),1)]),g("div",zgt,[_(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(()=>[N(x(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]=Ee(()=>{},["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",Hgt,[_(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(()=>[N(x(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]=Ee(()=>{},["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",Ugt,[_(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(()=>[N(x(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]=Ee(()=>{},["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,we(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",jgt,x(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 qgt=ue(xgt,[["render",Ygt]]),Ggt={name:"Moderation",components:{Layout:_i,AppLayout:yi,Pagination:uu,ReportDetails:Cgt,ModerationConfigDrawer:qgt},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"))}},Xgt=["href"],Kgt={style:{padding:"20px"},class:"fhr_content_layout_body moderation_layout"},Zgt={key:0,class:"card_header"},Jgt=["aria-label"],Qgt={key:1,class:q("fcom_dir_layout fcom_dir_layout_classic")},e1t={key:0,class:"loading"},t1t={key:1,class:"fcom_moderation_table"},n1t={class:"moderation_table"},s1t={class:"moderation_table_header"},i1t={style:{"min-width":"100px"}},o1t={class:"moderation_table_body"},r1t=["onClick"],a1t={key:0,class:"user_avatar moderation_avatar"},l1t={class:"feed_user_name"},c1t={key:1},u1t={key:2,class:"no_reports"},d1t=["aria-label"],h1t={key:2,style:{"max-width":"800px",margin:"0 auto"},class:"setting_body white_loaded"},f1t={style:{"text-align":"center"}},p1t={style:{"font-size":"18px","margin-bottom":"10px"}},m1t={class:"promo_description"},g1t={key:1,class:"setting_body",style:{"text-align":"center"}},v1t={class:"promo_description"},_1t=["href"];function y1t(t,e,n,i,s,o){const r=H("Operation"),a=be,l=He,c=Hd,u=ws,d=Nt,h=H("UserAvatar"),f=H("UserRouteLink"),p=H("MoreFilled"),m=$r,y=Ar,b=Sr,k=H("Pagination"),C=H("layout"),$=H("app-layout"),S=H("report-details"),M=H("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,x(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"},x(t.$t("Upgrade to Pro")),9,Xgt))]),default:w(()=>[g("div",Kgt,[t.has_pro?(v(),A(ee,{key:0},[s.moderationConfig.is_enabled=="yes"?(v(),A("div",Zgt,[g("div",{role:"region","aria-label":t.$t("Member Navigation"),class:"member_status"},[_(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(()=>[N(x(t.$t("Pending")),1)]),_:1}),_(c,{value:"flagged"},{default:w(()=>[N(x(t.$t("Flagged")),1)]),_:1}),_(c,{value:"ignored"},{default:w(()=>[N(x(t.$t("Dismissed")),1)]),_:1}),_(c,{value:"unpublished"},{default:w(()=>[N(x(t.$t("Unpublished")),1)]),_:1})]),_:1},8,["modelValue"])],8,Jgt)])):O("",!0),s.moderationConfig.is_enabled=="yes"?(v(),A("div",Qgt,[s.loading?(v(),A("div",e1t,[_(d,{class:"white_loaded",rows:3,animated:!0})])):s.reports.length?(v(),A("div",t1t,[g("table",n1t,[g("thead",s1t,[g("tr",null,[g("th",null,x(t.$t("Title")),1),g("th",null,x(t.$t("Type")),1),g("th",null,x(t.$t("Reporter")),1),g("th",i1t,x(t.$t("Date")),1),g("th",null,x(t.$t("Reports")),1)])]),g("tbody",o1t,[(v(!0),A(ee,null,we(s.reports,P=>{var T,I;return v(),A("tr",{key:P.id},[g("td",{onClick:L=>o.openReportDetails(P),class:"report_reason"},x(o.getTitle(P)),9,r1t),g("td",null,x(P.content_type),1),g("td",null,[P.reporter?(v(),A("div",a1t,[_(h,{xprofile:P.reporter},null,8,["xprofile"]),g("div",l1t,[_(f,{xprofile:P.reporter},null,8,["xprofile"])])])):(T=P.meta)!=null&&T.flagged_by?(v(),A("div",c1t,x((I=P.meta)==null?void 0:I.flagged_by),1)):O("",!0)]),g("td",null,x(t.humanDateDiff(P.created_at)),1),g("td",null,x(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(()=>[N(x(t.$t("Review Report")),1)]),_:1},8,["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(()=>[N(x(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(()=>[N(x(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(()=>[N(x(t.$t("Delete Report")),1)]),_:1},8,["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",u1t,x(t.$t("No reports to review")),1)),s.pagination.total?(v(),A("div",{key:3,role:"region","aria-label":t.$t("Pagination"),class:"pagination_wrap"},[_(k,{hide_on_single:!0,onFetch:e[3]||(e[3]=P=>o.getReports()),pagination:s.pagination},null,8,["pagination"])],8,d1t)):O("",!0)])):(v(),A("div",h1t,[g("div",f1t,[g("h3",p1t,x(t.$t("Content Moderation is disabled")),1),g("p",m1t,x(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(()=>[N(x(t.$t("Enable Content Moderation")),1)]),_:1},8,["loading"])])]))],64)):(v(),A("div",g1t,[g("p",v1t,x(t.$t("__REPORT_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_moderation"),class:"el-button el-button--danger"},x(t.$t("Upgrade to Pro")),9,_1t)]))])]),_:1},8,["title"])]),_:1}),s.reportDetails?(v(),D(S,{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 b1t=ue(Ggt,[["render",y1t]]),w1t={name:"Tools",components:{Layout:_i,AppLayout:yi},computed:{sitemapUrl(){return this.appVars.urls.portal_base+"site-maps/index.xml"},isPublicPortal(){return this.appVars.access_level==="public"}}},k1t=["href"],C1t={class:"settings_router"},x1t={class:"fhr_content_layout_body"},S1t={class:"setting_header"},$1t={key:0,class:"setting_body tools_body"},A1t={key:0,class:"sitemap_configured"},E1t={class:"sitemap_header"},M1t={class:"sitemap_body"},T1t=["href"],P1t={key:1,class:"setting_body",style:{"text-align":"center"}},I1t={class:"promo_description"},L1t=["href"];function O1t(t,e,n,i,s,o){const r=be,a=sa,l=H("layout"),c=H("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"},x(t.$t("Upgrade to Pro")),9,k1t))]),default:w(()=>[g("div",C1t,[g("div",x1t,[g("div",S1t,[g("h2",null,x(t.$t("Sitemap Configuration")),1)]),t.has_pro?(v(),A("div",$1t,[o.isPublicPortal?(v(),A("div",A1t,[g("div",E1t,[_(r,null,{default:w(()=>[...e[0]||(e[0]=[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)])]),_:1}),g("h4",null,x(t.$t("Sitemap is configured and will be generated automatically.")),1)]),g("div",M1t,[_(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,x(t.$t("Sitemap URL : ")),1),g("a",{href:o.sitemapUrl,target:"_blank",rel:"noopener"},x(o.sitemapUrl),9,T1t)])])])):(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",P1t,[g("p",I1t,x(t.$t("__SITEMAP_PROMO__")),1),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_tools"),class:"el-button el-button--danger"},x(t.$t("Upgrade to Pro")),9,L1t)]))])])]),_:1},8,["title"])]),_:1})}const D1t=ue(w1t,[["render",O1t]]),R1t={name:"PrivacySettings",components:{Layout:_i,AppLayout:yi},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"))}},V1t={class:"settings_router"},F1t={key:0,class:"white_loaded"},N1t={key:1,class:"fhr_content_layout_body"},B1t={class:"setting_body"},z1t={class:"fcom_help_text fcom_mt_10"},H1t={class:"fcom_help_text fcom_mt_10"},U1t={class:"fcom_help_text fcom_mt_10"},j1t={class:"fcom_help_text fcom_mt_10"},W1t={class:"fcom_input_wrap"},Y1t={key:0},q1t={class:"fcom_input_wrap"},G1t={key:0},X1t={class:"fcom_input_wrap"},K1t={class:"fcom_input_wrap"},Z1t={key:0},J1t={class:"fcom_input_wrap"},Q1t={class:"fcom_input_wrap"},evt={key:0,class:"fcom_input_wrap"},tvt={class:"fcom_input_wrap"},nvt={class:"fcom_input_wrap"},svt={style:{"margin-top":"50px"},class:"fcom_input_wrap"},ivt={key:2};function ovt(t,e,n,i,s,o){const r=He,a=Nt,l=b8,c=Li,u=ws,d=en,h=Yt,f=tn,p=H("layout"),m=H("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(()=>[Re((v(),D(r,{class:"fcom_primary_button",onClick:o.save},{default:w(()=>[g("span",null,x(t.$t("Save Settings")),1)]),_:1},8,["onClick"])),[[y,s.saving]])]),default:w(()=>[g("div",V1t,[s.loading?(v(),A("div",F1t,[_(a,{rows:5,animated:!0})])):s.settings?(v(),A("div",N1t,[g("div",B1t,[g("p",null,x(t.$t("Customize the privacy and compliance settings as per your needs.")),1),_(l),_(f,{onSubmit:e[13]||(e[13]=Ee(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(()=>[N(x(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:w(()=>[N(x(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:w(()=>[N(x(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",z1t,[g("p",null,x(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(()=>[N(x(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:w(()=>[N(x(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:w(()=>[N(x(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",H1t,[g("p",null,x(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(()=>[N(x(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:w(()=>[N(x(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:w(()=>[N(x(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",U1t,[g("p",null,x(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(()=>[N(x(t.$t("Everybody")),1)]),_:1}),_(c,{border:"",value:"logged_in"},{default:w(()=>[N(x(t.$t("Only logged-in members")),1)]),_:1}),_(c,{border:"",value:"admin_only"},{default:w(()=>[N(x(t.$t("Only Admin/Moderators")),1)]),_:1})]),_:1},8,["modelValue"]),g("div",j1t,[g("p",null,x(t.$t("Choose the privacy settings for the Spaces and Courses tabs of a member profile.")),1)])]),_:1},8,["label"]),g("div",W1t,[_(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(()=>[N(x(t.$t("Allow users to change their community username"))+" ",1),t.has_pro?O("",!0):(v(),A("span",Y1t,"("+x(t.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["modelValue","disabled"]),g("p",null,x(t.$t("When enabled, members can change their username on their own. Otherwise, an admin or moderator can change the username.")),1)]),g("div",q1t,[_(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(()=>[N(x(t.$t("Allow users to change their account email address"))+" ",1),t.has_pro?O("",!0):(v(),A("span",G1t,"("+x(t.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["modelValue","disabled"]),g("p",null,x(t.$t("When enabled, members can change their email address of the account (WordPress User account).")),1)]),g("div",X1t,[_(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(()=>[N(x(t.$t("Allow users to change their password from profile")),1)]),_:1},8,["modelValue"]),g("p",null,x(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",K1t,[_(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(()=>[N(x(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",Z1t,"("+x(t.$t("This feature is available on the pro version of FluentCommunity"))+")",1))]),_:1},8,["modelValue","disabled"]),g("p",null,x(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",J1t,[_(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(()=>[N(x(t.$t("Use Gravatar Photo Service for default user photo")),1)]),_:1},8,["modelValue"]),g("p",null,x(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",Q1t,[_(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(()=>[N(x(t.$t("Sync Community Profile with WordPress User Data")),1)]),_:1},8,["modelValue"]),g("p",null,x(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",evt,[_(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(()=>[N(x(t.$t("Do not send emails to contacts marked as Bounced, Complained, or Spammed in FluentCRM")),1)]),_:1},8,["modelValue"]),g("p",null,x(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",tvt,[_(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(()=>[N(x(t.$t("Show last activity of a user on the profile card")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("If unchecked, then the last activity will be shown to only admins/moderators")),1)]),g("div",nvt,[_(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(()=>[N(x(t.$t("Allow users to deactivate their account directly from their profile settings")),1)]),_:1},8,["modelValue"]),g("p",null,x(t.$t("When enabled, this option allows users to deactivate their account directly from their profile settings.")),1)]),g("div",svt,[Re((v(),D(r,{onClick:o.save,disabled:s.saving,class:"fcom_primary_button"},{default:w(()=>[N(x(t.$t("Save Settings")),1)]),_:1},8,["onClick","disabled"])),[[y,s.saving]])])]),_:1},8,["modelValue"])])])):(v(),A("div",ivt,[g("p",null,x(t.$t("Settings could not be loaded")),1)]))])]),_:1},8,["title"])]),_:1})}const rvt=ue(R1t,[["render",ovt]]),avt={name:"SettingsRoute",components:{},data(){return{loading:!1}}};function lvt(t,e,n,i,s,o){const r=H("router-view");return v(),D(r)}const cvt=ue(avt,[["render",lvt]]),uvt={name:"CreateGroupForm",emits:["completed","dirty"],components:{ImageUploader:Ll,SlugInput:Yd,ErrorAlerts:J1},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})}},dvt={key:0},hvt={key:1};function fvt(t,e,n,i,s,o){const r=ft,a=en,l=H("slug-input"),c=Yt,u=H("error-alerts"),d=He,h=tn;return v(),D(h,{onSubmit:e[5]||(e[5]=Ee(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(()=>[N(x(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",dvt,x(t.$t("Update Info")),1)):(v(),A("span",hvt,x(t.$t("Create")),1))]),_:1},8,["disabled","loading"])]),_:1})]),_:1},8,["modelValue"])}const pvt=ue(uvt,[["render",fvt]]),mvt={name:"MoveGroupPopup",components:{ActionPopover:oa},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})}}},gvt={style:{display:"inline-block",cursor:"pointer",width:"100%","text-align":"left"}};function vvt(t,e,n,i,s,o){const r=sn,a=Jt,l=en,c=He,u=tn,d=H("action-popover"),h=xt("loading");return v(),D(d,{placement:"bottom",width:350},{trigger:w(()=>[g("span",gvt,x(t.$t("Move")),1)]),default:w(({hide:f})=>[_(u,{onSubmit:e[1]||(e[1]=Ee(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,we(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"]),Re((v(),D(c,{disabled:!s.selectedGroupId||s.working,onClick:p=>o.moveSpace(f),class:"fcom_primary_button"},{default:w(()=>[N(x(t.$t("Move Space")),1)]),_:1},8,["disabled","onClick"])),[[h,s.working]])]),_:2},1024)]),_:1})}const _vt=ue(mvt,[["render",vvt]]),yvt={name:"SpaceLinkEditModal",components:{SidebarLinkForm:YH},emits:["completed"],props:["link"],data(){return{showModal:!0}}};function bvt(t,e,n,i,s,o){const r=H("SidebarLinkForm"),a=$s;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 wvt=ue(yvt,[["render",bvt]]),kvt={name:"SpaceGroups",components:{FluentDnD:za,ActionPopover:oa,ArrowDownBold:Kre,Drawer:tu,CreateSpaceForm:N8,CreateGroupForm:pvt,Layout:_i,AppLayout:yi,MoveGroupPopup:_vt,SpaceLinkEditModal:wvt},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}},methods:{toggleGroup(t){this.collapsedGroups.includes(t.id)?this.collapsedGroups=this.collapsedGroups.filter(e=>e!==t.id):this.collapsedGroups.push(t.id)},openEditSpace(t){if(t.type==="course"){this.$router.push({name:"course_settings_general",params:{course_id:t.id}});return}if(t.type==="community"){this.$router.push({name:"space_settings_general",params:{space:t.slug}});return}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={};Mc(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=[];Mc(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)}},Cvt={class:"settings_router"},xvt={class:"fcom_communities"},Svt={class:"fcom_card_sections",style:{"margin-bottom":"16px"}},$vt={class:"fcom_card_section_heading"},Avt={key:1},Evt={class:"fcom_card_sections",style:{"margin-bottom":"0"}},Mvt={class:"fcom_section_primary_item_title"},Tvt={class:"fcom_heading_item"},Pvt={class:"fcom_space_counts"},Ivt={class:"fcom_section_item_actions"},Lvt={key:0,class:"fcom_section_items"},Ovt={class:"fcom_section_item_title"},Dvt={class:"fcom_heading_item"},Rvt={class:"fcom_section_item_actions"},Vvt=["href"],Fvt={class:"actions_items"},Nvt=["onClick"],Bvt=["onClick"],zvt={key:0,class:"fcom_card_sections",style:{"margin-top":"16px"}},Hvt={class:"fcom_section_primary_item fcom_no_top_border"},Uvt={class:"fcom_heading_item"},jvt={class:"fcom_section_items"},Wvt={class:"fcom_section_item"},Yvt={class:"fcom_section_item_title"},qvt={class:"fcom_heading_item"},Gvt={class:"fcom_section_item_actions"},Xvt=["href"],Kvt={class:"actions_items"},Zvt=["onClick"],Jvt=["onClick"],Qvt={key:0};function e0t(t,e,n,i,s,o){const r=He,a=Nt,l=H("ArrowDownBold"),c=be,u=H("Plus"),d=H("action-popover"),h=hi,f=H("MoveGroupPopup"),p=H("FluentDnD"),m=H("layout"),y=H("app-layout"),b=H("create-group-form"),k=H("drawer"),C=H("SpaceLinkEditModal"),$=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]=S=>o.initCreateGroup())},{default:w(()=>[N(x(t.$t("Create New Group")),1)]),_:1})]),default:w(()=>[g("div",Cvt,[Re((v(),A("div",xvt,[g("div",Svt,[g("div",$vt,[g("h3",null,x(t.$_n("%d Group","%d Groups",s.groups.length))+" • "+x(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",Avt,[_(p,{items:s.groups,onDrop:o.dropGroup,"item-class":"fcom_cursor_move",gap:"16px"},{item:w(({data:S})=>[g("div",Evt,[g("div",{class:q([{fcom_collapsed_group:s.collapsedGroups.indexOf(S.id)!==-1},"fcom_section_primary_item fcom_no_top_border"])},[g("div",Mvt,[e[6]||(e[6]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),g("div",Tvt,[g("h4",null,x(t.$t("Group:"))+" "+x(S.title),1),g("div",null,[S.spaces&&S.spaces.length?(v(),D(r,{key:0,style:{"background-color":"var(--el-fill-color-light)"},class:"fcom_collapse_btn",onClick:M=>o.toggleGroup(S),size:"small",text:""},{default:w(()=>[_(c,null,{default:w(()=>[_(l)]),_:1}),g("span",Pvt,x(t.$t("%s items",S.spaces.length)),1)]),_:2},1032,["onClick"])):O("",!0),_(r,{onClick:M=>o.openCreateSpaceModal(S),style:{"margin-left":"5px","background-color":"var(--el-fill-color-light)"},size:"small",text:""},{default:w(()=>[_(c,null,{default:w(()=>[_(u)]),_:1})]),_:1},8,["onClick"])])])]),g("div",Ivt,[_(d,{items:[{label:t.$t("Add new space"),action:()=>{o.openCreateSpaceModal(S)}},{label:t.$t("Edit Group Info"),action:()=>{o.initEditGroup(S)}},{label:t.$t("Delete Group"),type:"danger",action:()=>{o.removeGroup(S)}}]},null,8,["items"])])],2),S.spaces&&S.spaces.length&&s.collapsedGroups.indexOf(S.id)===-1?(v(),A("div",Lvt,[_(p,{items:S.spaces,"item-class":"fcom_section_item cursor-move","item-style":"padding: 15px 15px 15px 35px",onDrop:o.dropSpace},{item:w(({data:M,index:P})=>[g("div",Ovt,[e[7]||(e[7]=g("div",{class:"fcom_drag_handle"}," ⋮⋮ ",-1)),g("p",Dvt,[N(x(M.title)+" ",1),M.status!="published"?(v(),D(h,{key:0,type:"info"},{default:w(()=>[N(x(t.$labelize(M.status)),1)]),_:2},1024)):O("",!0),_(h,null,{default:w(()=>[N(x(o.getTypeTitle(M.type)),1)]),_:2},1024),M.type=="sidebar_link"?(v(),D(h,{key:1,type:"info",class:"fcom_hover_show"},{default:w(()=>[N(x(M.settings.permalink),1)]),_:2},1024)):(v(),D(h,{key:2,type:"info",class:"fcom_hover_show"},{default:w(()=>[N("ID: "+x(M.id),1)]),_:2},1024))])]),g("div",Rvt,[g("a",{target:"_blank",class:"el-button el-button--small el-button--secondary",href:M.permalink},x(t.$t("View")),9,Vvt),_(d,null,{default:w(({hide:T})=>[g("ul",Fvt,[g("li",null,[_(f,{groups:s.groups,currentSpace:M,onMoved:I=>{T(),o.getGroups()}},null,8,["groups","currentSpace","onMoved"])]),g("li",{onClick:I=>{T(),o.openEditSpace(M)}},x(t.$t("Edit")),9,Nvt),g("li",{class:"fcom_action_popover_item fcom_action_popover_item_danger",onClick:I=>{T(),o.initDeleteSpace(M)}},x(t.$t("Delete")),9,Bvt)])]),_:2},1024)])]),_:1},8,["items","onDrop"])])):O("",!0)])]),_:1},8,["items","onDrop"]),s.orphanedSpaces&&s.orphanedSpaces.length?(v(),A("div",zvt,[g("div",Hvt,[g("div",Uvt,[g("h4",null,x(t.$t("Other Spaces - No Assigned Group")),1)])]),g("div",jvt,[(v(!0),A(ee,null,we(s.orphanedSpaces,S=>(v(),A("div",Wvt,[g("div",Yvt,[g("p",qvt,[N(x(S.title)+" ",1),S.status!="published"?(v(),D(h,{key:0,type:"info"},{default:w(()=>[N(x(t.$labelize(S.status)),1)]),_:2},1024)):O("",!0),_(h,null,{default:w(()=>[N(x(o.getTypeTitle(S.type)),1)]),_:2},1024),_(h,{type:"info",class:"fcom_hover_show"},{default:w(()=>[N(" ID: "+x(S.id),1)]),_:2},1024)])]),g("div",Gvt,[g("a",{class:"el-button el-button--small el-button--secondary",target:"_blank",href:S.permalink},x(t.$t("View")),9,Xvt),_(d,null,{default:w(({hide:M})=>[g("ul",Kvt,[g("li",null,[_(f,{groups:s.groups,currentSpace:S,onMoved:P=>{M(),o.getGroups()}},null,8,["groups","currentSpace","onMoved"])]),g("li",{onClick:P=>{M(),o.openEditSpace(S)}},x(t.$t("Edit")),9,Zvt),g("li",{class:"fcom_action_popover_item fcom_action_popover_item_danger",onClick:P=>{M(),o.initDeleteSpace(S)}},x(t.$t("Delete")),9,Jvt)])]),_:2},1024)])]))),256))])])):O("",!0)]))])),[[$,s.loading]])])]),_:1},8,["title"])]),_:1}),_(k,{id:"fluent_comminity_body",modelValue:s.showGroupDrawer,"onUpdate:modelValue":e[3]||(e[3]=S=>s.showGroupDrawer=S),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]=S=>s.isGroupFormDirty=!0),onCompleted:e[2]||(e[2]=S=>{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",Qvt,[(v(),D(ea,{to:"body"},[_(C,{link:s.editSpace,onClose:e[4]||(e[4]=S=>s.editSpace=null),onCompleted:e[5]||(e[5]=S=>{s.editSpace=null,o.getGroups()})},null,8,["link"])]))])):O("",!0)],64)}const t0t=ue(kvt,[["render",e0t]]),n0t={name:"CustomizerShell",inheritAttrs:!1,emits:["back","save"],props:{back_title:{type:String,required:!0},tabs:{type:Array,default:()=>[]},saving:{type:Boolean,default:!1},save_label:{type:String,default:""},show_save:{type:Boolean,default:!0},show_close:{type:Boolean,default:!0},header_class:{type:String,default:""},container_class:{type:String,default:""}}},s0t={class:"fcom_full_editor"},i0t=["aria-label"],o0t={class:"fcom_editor_menu object_menu"},r0t={class:"fcom_space_menu_ul"},a0t={class:"full_editor_actions"};function l0t(t,e,n,i,s,o){const r=H("ArrowLeft"),a=be,l=H("router-link"),c=He,u=j1,d=H1;return v(),D(ea,{to:"body"},[g("div",s0t,[_(d,null,{default:w(()=>[_(u,{class:"fcom_full_editor_header_wrap"},{default:w(()=>[g("div",{class:q([n.header_class,"fcom_full_editor_header"])},[g("button",{type:"button",onClick:e[0]||(e[0]=h=>t.$emit("back")),class:"fcom_back_header","aria-label":t.$t("Back to %s",n.back_title)},[_(a,null,{default:w(()=>[_(r)]),_:1}),N(" "+x(n.back_title),1)],8,i0t),g("div",o0t,[g("ul",r0t,[(v(!0),A(ee,null,we(n.tabs,h=>(v(),A("li",{key:h.name},[_(l,{to:h.route},{default:w(()=>[N(x(h.title),1)]),_:2},1032,["to"])]))),128))])]),g("div",a0t,[n.show_save?(v(),D(c,{key:0,class:"fcom_primary_button",size:t.isMobile?"small":"default",disabled:n.saving,loading:n.saving,onClick:e[1]||(e[1]=h=>t.$emit("save"))},{default:w(()=>[N(x(n.save_label||t.$t("Save Changes")),1)]),_:1},8,["size","disabled","loading"])):O("",!0),n.show_close?(v(),D(c,{key:1,"aria-label":t.$t("Close"),onClick:e[2]||(e[2]=h=>t.$emit("back")),text:""},{default:w(()=>[...e[3]||(e[3]=[N(" X ",-1)])]),_:1},8,["aria-label"])):O("",!0)])],2)]),_:1}),_(d,{class:q([n.container_class,"fcom_full_editor_container"])},{default:w(()=>[le(t.$slots,"default")]),_:3},8,["class"])]),_:3})])])}const PU=ue(n0t,[["render",l0t]]),IU={data(){return{originRoute:null}},beforeRouteEnter(t,e,n){n(i=>i.rememberOrigin(t,e))},methods:{rememberOrigin(t,e){var i;if(!e||!e.name)return;const n=(i=t.matched[0])==null?void 0:i.path;n&&e.matched.some(s=>s.path===n)||(this.originRoute={name:e.name,params:e.params,query:e.query})},goBackToOrigin(t){this.$router.push(this.originRoute||t)}}},c0t={name:"SpaceSettingsRoute",inheritAttrs:!1,mixins:[IU],components:{CustomizerShell:PU},setup(){return{spaceStore:$S()}},props:["space"],data(){return{saving:!1,savingCount:0,space_profile:null}},computed:{hasLockScreenTab(){var t,e,n;return((t=this.space_profile)==null?void 0:t.privacy)=="private"&&((n=(e=this.space_profile)==null?void 0:e.settings)==null?void 0:n.custom_lock_screen)=="yes"},hasPagesTab(){var t,e;return!this.has_pro||!!((e=(t=this.space_profile)==null?void 0:t.permissions)!=null&&e.can_manage_pages)},isPagesTab(){return this.$route.name=="space_settings_pages"},tabs(){const t={space:this.space},e=[{name:"general",title:this.$t("General Settings"),route:{name:"space_settings_general",params:t}},{name:"paywalls",title:this.$t("Paywalls"),route:{name:"space_settings_paywalls",params:t}}];return this.hasLockScreenTab&&e.push({name:"lock_screen",title:this.$t("Lock Screen"),route:{name:"space_settings_lockscreen",params:t}}),e.push({name:"manage_links",title:this.$t("Space Links"),route:{name:"space_settings_links",params:t}}),this.hasPagesTab&&e.push({name:"manage_pages",title:this.$t("Pages"),route:{name:"space_settings_pages",params:t}}),e},isLockScreenTab(){return this.$route.name=="space_settings_lockscreen"},saveLabel(){return!this.has_pro&&this.isLockScreenTab?this.$t("Save Changes (Pro Required)"):this.$t("Save Changes")},childProps(){return this.$route.name=="space_settings_general"?{savingCount:this.savingCount,community:this.space_profile}:{savingCount:this.savingCount,spaceProfile:this.space_profile}},childListeners(){return this.$route.name=="space_settings_general"?{completed:this.spaceUpdated}:{close:this.goBack}}},watch:{space(){this.fetchSpace()},hasLockScreenTab(t){!t&&this.isLockScreenTab&&this.$router.replace({name:"space_settings_general",params:{space:this.space}})},hasPagesTab(t){!t&&this.isPagesTab&&this.$router.replace({name:"space_settings_general",params:{space:this.space}})}},methods:{async fetchSpace(){try{const t=await this.spaceStore.fetchSpace(this.space,!0);if(!this.hasSpaceAdminAccess(t)){this.$notify.error(this.$t("You do not have permission to manage this space")),this.goBack();return}this.space_profile=t,this.changeTitle(t.title),this.isLockScreenTab&&!this.hasLockScreenTab&&this.$router.replace({name:"space_settings_general",params:{space:this.space}})}catch(t){this.$handleError(t),this.goBack()}},saveChanges(){if(!this.has_pro&&this.isLockScreenTab){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},async spaceUpdated(t){if(t!=null&&t.slug&&t.slug!=this.space){this.$router.replace({name:this.$route.name,params:{...this.$route.params,space:t.slug}});return}this.spaceStore.invalidateSpace(this.space);try{this.space_profile=await this.spaceStore.fetchSpace(this.space,!0)}catch{t&&(this.space_profile=t)}},goBack(){const t=this.$route.meta.back_route||"space_feeds",e=this.$route.meta.back_with_space===!1?{}:{space:this.space};this.goBackToOrigin({name:t,params:e})}},mounted(){this.fetchSpace()},beforeUnmount(){this.spaceStore.clearCurrentSpace()}};function u0t(t,e,n,i,s,o){const r=H("router-view"),a=H("customizer-shell");return s.space_profile?(v(),D(a,{key:0,back_title:s.space_profile.title,tabs:o.tabs,saving:s.saving,save_label:o.saveLabel,show_save:!o.isPagesTab,header_class:"fcom_space_settings_nav",container_class:"editor_customizer_container",onBack:e[0]||(e[0]=l=>o.goBack()),onSave:e[1]||(e[1]=l=>o.saveChanges())},{default:w(()=>[_(r,null,{default:w(({Component:l})=>[(v(),D(Ct(l),Wt(o.childProps,xb(o.childListeners)),null,16))]),_:1})]),_:1},8,["back_title","tabs","saving","save_label","show_save"])):O("",!0)}const d0t=ue(c0t,[["render",u0t]]),h0t={name:"CourseSettingsRoute",inheritAttrs:!1,mixins:[IU],components:{CustomizerShell:PU},props:["course_id"],data(){return{saving:!1,savingCount:0,course:{}}},computed:{hasLockScreenTab(){var t,e,n;return((t=this.course)==null?void 0:t.privacy)=="private"&&((n=(e=this.course)==null?void 0:e.settings)==null?void 0:n.custom_lock_screen)=="yes"},tabs(){const t={course_id:this.course_id},e=[{name:"general",title:this.$t("General Settings"),route:{name:"course_settings_general",params:t}},{name:"paywalls",title:this.$t("Paywalls"),route:{name:"course_settings_paywalls",params:t}}];return this.hasLockScreenTab&&e.push({name:"lock_screen",title:this.$t("Lock Screen"),route:{name:"course_settings_lockscreen",params:t}}),e.push({name:"welcome_banner",title:this.$t("Welcome Banner"),route:{name:"course_settings_welcome_banner",params:t}}),e.push({name:"manage_links",title:this.$t("Course Links"),route:{name:"course_settings_links",params:t}}),e},isProTab(){return["course_settings_lockscreen","course_settings_welcome_banner"].includes(this.$route.name)},saveLabel(){return!this.has_pro&&this.isProTab?this.$t("Save Changes (Pro Required)"):this.$t("Save Changes")},childProps(){const t=this.$route.name;return t=="course_settings_general"?{savingCount:this.savingCount,course:this.course}:t=="course_settings_welcome_banner"?{savingCount:this.savingCount,course:this.course,hasPro:this.has_pro}:{savingCount:this.savingCount,spaceProfile:this.course}},childListeners(){const t=this.$route.name;return t=="course_settings_general"?{completed:this.courseUpdated}:t=="course_settings_welcome_banner"?{}:{close:this.goBack}}},watch:{course_id(){this.fetchCourse()},hasLockScreenTab(t){!t&&this.$route.name=="course_settings_lockscreen"&&this.$router.replace({name:"course_settings_general",params:{course_id:this.course_id}})}},methods:{fetchCourse(){this.$get("admin/courses/"+this.course_id).then(t=>{this.course=t.course,this.changeTitle(this.course.title),this.$route.name=="course_settings_lockscreen"&&!this.hasLockScreenTab&&this.$router.replace({name:"course_settings_general",params:{course_id:this.course_id}})}).catch(t=>{this.$handleError(t),this.goBack()})},saveChanges(){if(!this.has_pro&&this.isProTab){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},courseUpdated(t){t&&(this.course=t)},goBack(){this.goBackToOrigin({name:"course_overview",params:{course_id:this.course_id}})}},mounted(){if(!this.hasCourseCreatorAccess()){this.$router.replace({name:"manage_courses"});return}this.fetchCourse()}};function f0t(t,e,n,i,s,o){const r=H("router-view"),a=H("customizer-shell");return s.course.id?(v(),D(a,{key:0,back_title:s.course.title,tabs:o.tabs,saving:s.saving,save_label:o.saveLabel,container_class:"editor_customizer_container",onBack:e[0]||(e[0]=l=>o.goBack()),onSave:e[1]||(e[1]=l=>o.saveChanges())},{default:w(()=>[_(r,null,{default:w(({Component:l})=>[(v(),D(Ct(l),Wt(o.childProps,xb(o.childListeners)),null,16))]),_:1})]),_:1},8,["back_title","tabs","saving","save_label"])):O("",!0)}const p0t=ue(h0t,[["render",f0t]]),m0t={name:"WebhookForm",components:{SpaceIcon:xp},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})}}},g0t={key:0,class:"fcom_highlight_block"},v0t={style:{color:"#E6A23C"}},_0t={target:"_blank",rel:"noopener",href:"https://github.com/WPManageNinja/fluent-community-docs/blob/master/incoming-webhook-config.md"},y0t={key:0,class:"fcom_space_title"},b0t={key:0,class:"fcom_space_title"},w0t={key:0,class:"fcom_space_title"},k0t={key:0,class:"fcom_space_title"},C0t={class:"dialog_footer fcom_mt_20"},x0t={key:0},S0t={key:1};function $0t(t,e,n,i,s,o){const r=H("CopyDocument"),a=be,l=He,c=ft,u=sa,d=Il,h=Pl,f=en,p=H("SpaceIcon"),m=sn,y=Jt,b=jd,k=Ud,C=Yt,$=tn,S=xt("loading");return v(),D($,{onSubmit:e[8]||(e[8]=Ee(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",g0t,[g("p",null,x(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(()=>[N(x(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",v0t,x(t.$t("The email address is required!")),1),e[10]||(e[10]=N()),g("a",_0t,x(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,we(n.spaces,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:w(()=>[M.id?(v(),A("span",y0t,[_(p,{space_profile:M},null,8,["space_profile"]),g("span",null,x(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,we(n.spaces,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:w(()=>[M.id?(v(),A("span",b0t,[_(p,{space_profile:M},null,8,["space_profile"]),g("span",null,x(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,we(n.courses,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:w(()=>[M.id?(v(),A("span",w0t,[_(p,{space_profile:M},null,8,["space_profile"]),g("span",null,x(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,we(n.courses,M=>(v(),D(m,{key:M.slug,label:M.title,value:M.id},{default:w(()=>[M.id?(v(),A("span",k0t,[_(p,{space_profile:M},null,8,["space_profile"]),g("span",null,x(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(()=>[N(x(t.$t("Send default WordPress welcome email for new users")),1)]),_:1},8,["modelValue"]),g("div",C0t,[le(t.$slots,"after_form",{},()=>[Re((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",x0t,x(t.$t("Update Webhook")),1)):(v(),A("span",S0t,x(t.$t("Add Webhook")),1))]),_:1},8,["disabled"])),[[S,s.adding]])])])]),_:3},8,["modelValue"])}const A0t=ue(m0t,[["render",$0t]]),E0t={name:"IncomingWebhooks",components:{Pagination:uu,UserAvatar:j2,UserRouteLink:la,WebhookForm:A0t,Layout:_i,AppLayout:yi},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"))}},M0t=["href"],T0t={class:"settings_router manager_section"},P0t={class:"fhr_content_layout_body"},I0t={key:0,class:"setting_body"},L0t={class:"fcom_manager_actions"},O0t={class:"bulk_search"},D0t={class:"fcom_manager_table"},R0t={class:"fcom_webhook_url"},V0t={class:"fcom_table_action_col"},F0t=["aria-label"],N0t={key:1,class:"setting_body",style:{"text-align":"center"}},B0t=["href"],z0t={class:"dialog_header"},H0t={class:"dialog_body"};function U0t(t,e,n,i,s,o){const r=H("Plus"),a=be,l=He,c=ft,u=hi,d=Il,h=H("CopyDocument"),f=Pl,p=H("Pagination"),m=H("layout"),y=H("app-layout"),b=H("webhook-form"),k=$s,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,x(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"},x(t.$t("Upgrade to Pro")),9,M0t))]),default:w(()=>[g("div",T0t,[g("div",P0t,[t.has_pro?(v(),A("div",I0t,[g("div",L0t,[g("div",O0t,[_(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(()=>[...e[6]||(e[6]=[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)])]),_:1},8,["modelValue","onKeydown","placeholder"])])]),g("div",D0t,[Re((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($=>[N(x($.row.value.title)+" ",1),$.row.value.running_count?(v(),D(u,{key:0,title:t.$t("Ran count"),size:"small"},{default:w(()=>[N(x($.row.value.running_count),1)]),_:2},1032,["title"])):O("",!0)]),_:1},8,["label"]),_(d,{label:t.$t("Webhook URL"),sortable:""},{default:w($=>[g("div",R0t,[_(c,{size:"small",value:$.row.webhook_url,readonly:""},{append:w(()=>[_(l,{"aria-label":t.$t("Copy webhook URL"),onClick:S=>o.copyToClipboard($.row.webhook_url),size:"small"},{default:w(()=>[_(a,null,{default:w(()=>[_(h)]),_:1})]),_:1},8,["aria-label","onClick"])]),_:2},1032,["value"])])]),_:1},8,["label"]),_(d,{label:t.$t("Actions"),width:150},{default:w($=>[g("div",V0t,[_(l,{onClick:S=>o.showForm($.row),size:"small"},{default:w(()=>[N(x(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(l,{onClick:S=>o.removeWebhook($.row),type:"danger",plain:"",size:"small"},{default:w(()=>[N(x(t.$t("Remove")),1)]),_:1},8,["onClick"])])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])),[[C,s.loading]])]),g("div",{role:"region","aria-label":t.$t("Pagination"),class:"pagination_wrap"},[_(p,{hide_on_single:!1,onFetch:e[2]||(e[2]=$=>o.fetch()),pagination:s.paginate},null,8,["pagination"])],8,F0t)])):(v(),A("div",N0t,[e[7]||(e[7]=g("p",null,null,-1)),g("a",{target:"_blank",rel:"noopener",href:t.$upgradeUrl("feature_lock_incoming_webhooks"),class:"el-button el-button--danger"},x(t.$t("Upgrade to Pro")),9,B0t)]))])])]),_: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",z0t,[g("h4",null,x(t.$t(s.editing_webhook.id?"Update Webhook":"Add Webhook")),1)])]),default:w(()=>[g("div",H0t,[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 j0t=ue(E0t,[["render",U0t]]),W0t={name:"Overview",components:{AppLayout:yi,Layout:_i},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"))}},Y0t={class:"object_menu"},q0t={class:"fcom_space_menu_ul"};function G0t(t,e,n,i,s,o){const r=H("router-link"),a=H("RouterView"),l=H("layout"),c=H("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",Y0t,[g("ul",q0t,[(v(!0),A(ee,null,we(s.analyticsNavigations,(u,d)=>(v(),A("li",{key:`analytics-navigation-${d}`},[_(r,{to:{name:u.route}},{default:w(()=>[N(x(t.$t(u.title)),1)]),_:2},1032,["to"])]))),128))])])]),default:w(()=>[_(a)]),_:1},8,["title"])]),_:1})}const X0t=ue(W0t,[["render",G0t]]),K0t={name:"CheckProStatus"},Z0t={class:"upgrade-pro-wrapper"},J0t={class:"upgrade-text"},Q0t={class:"upgrade-button"},e_t=["href"];function t_t(t,e,n,i,s,o){return v(),A("div",Z0t,[g("div",J0t,[g("h2",null,x(t.$t("This Feature is [Pro] Only")),1),g("p",null,x(t.$t("Upgrade to Pro and unlock this feature and many others!")),1)]),g("div",Q0t,[g("a",{href:t.$upgradeUrl("feature_lock_analytics"),class:"button",target:"_blank"},x(t.$t("Upgrade Now")),9,e_t)])])}const LS=ue(K0t,[["render",t_t],["__scopeId","data-v-492a58f0"]]),n_t={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)}}},s_t={class:"fcom-report-header"},i_t={class:"fcom-report-header-action"};function o_t(t,e,n,i,s,o){const r=sn,a=Jt,l=Wd;return v(),A("div",s_t,[g("h4",null,x(t.$t("Overview")),1),g("div",i_t,[_(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,we(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 r_t=ue(n_t,[["render",o_t]]),a_t={name:"Loading",props:{section:{type:Number,default:()=>1}}};function l_t(t,e,n,i,s,o){const r=Nt;return v(!0),A(ee,null,we(n.section,a=>(v(),A("div",{class:"fcom-loading",key:`loading-spinner-item-${a}`},[_(r,{rows:5,loading:"",animated:""})]))),128)}const Ha=ue(a_t,[["render",l_t]]),c_t={name:"AnalyticsWidgets",components:{Loading:Ha},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()}},u_t={key:1,class:"fcom-report-stat-widgets"},d_t={class:"stat-title"};function h_t(t,e,n,i,s,o){const r=H("Loading");return s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",u_t,[(v(!0),A(ee,null,we(s.widgets,(a,l)=>(v(),A("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",d_t,x(a.title),1),g("h3",null,[N(x(a.total_records)+" ",1),g("span",{class:q(["stat-percent",{"stat-down":a.down}])},x(a.comparison),3)])]))),128))]))}const f_t=ue(c_t,[["render",h_t]]);/*! | |
| 135 | 136 | * ApexCharts v4.3.0 |
| 136 | 137 | * (c) 2018-2024 ApexCharts |
| 137 | 138 | * Released under the MIT License. |
| 138 | - */function zC(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,s=Array(e);n<e;n++)s[n]=t[n];return s}function wH(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function at(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function OE(t,e){for(var n=0;n<e.length;n++){var s=e[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,xH(s.key),s)}}function lt(t,e,n){return e&&OE(t.prototype,e),n&&OE(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Yp(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=A5(t))||e&&t&&typeof t.length=="number"){n&&(t=n);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(l){throw l},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. | |
| 139 | -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 I1(t){var e=CH();return function(){var n,s=cy(t);if(e){var i=cy(this).constructor;n=Reflect.construct(s,arguments,i)}else n=s.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 wH(o)}(this,n)}}function ly(t,e,n){return(e=xH(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cy(t){return cy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},cy(t)}function L1(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&&HC(t,e)}function CH(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(CH=function(){return!!t})()}function DE(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,s)}return n}function Je(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?DE(Object(n),!0).forEach(function(s){ly(t,s,n[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):DE(Object(n)).forEach(function(s){Object.defineProperty(t,s,Object.getOwnPropertyDescriptor(n,s))})}return t}function HC(t,e){return HC=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,s){return n.__proto__=s,n},HC(t,e)}function kH(t,e){return function(n){if(Array.isArray(n))return n}(t)||function(n,s){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var o,r,a,l,c=[],u=!0,d=!1;try{if(a=(i=i.call(n)).next,s===0){if(Object(i)!==i)return;u=!1}else for(;!(u=(o=a.call(i)).done)&&(c.push(o.value),c.length!==s);u=!0);}catch(h){d=!0,r=h}finally{try{if(!u&&i.return!=null&&(l=i.return(),Object(l)!==l))return}finally{if(d)throw r}}return c}}(t,e)||A5(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. | |
| 140 | -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function Cs(t){return function(e){if(Array.isArray(e))return zC(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||A5(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. | |
| 141 | -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function xH(t){var e=function(n,s){if(typeof n!="object"||!n)return n;var i=n[Symbol.toPrimitive];if(i!==void 0){var o=i.call(n,s||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(n)}(t,"string");return typeof e=="symbol"?e:e+""}function Sf(t){return Sf=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},Sf(t)}function A5(t,e){if(t){if(typeof t=="string")return zC(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)?zC(t,e):void 0}}var ue=function(){function t(){at(this,t)}return lt(t,[{key:"shadeRGBColor",value:function(e,n){var s=n.split(","),i=e<0?0:255,o=e<0?-1*e:e,r=parseInt(s[0].slice(4),10),a=parseInt(s[1],10),l=parseInt(s[2],10);return"rgb("+(Math.round((i-r)*o)+r)+","+(Math.round((i-a)*o)+a)+","+(Math.round((i-l)*o)+l)+")"}},{key:"shadeHexColor",value:function(e,n){var s=parseInt(n.slice(1),16),i=e<0?0:255,o=e<0?-1*e:e,r=s>>16,a=s>>8&255,l=255&s;return"#"+(16777216+65536*(Math.round((i-r)*o)+r)+256*(Math.round((i-a)*o)+a)+(Math.round((i-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&&Sf(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,s=[];for(n=0;n<e.length;n++)s[n]=e[n];return s}},{key:"extend",value:function(e,n){var s=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 i=Object.assign({},e);return this.isObject(e)&&this.isObject(n)&&Object.keys(n).forEach(function(o){s.isObject(n[o])&&o in e?i[o]=s.extend(e[o],n[o]):Object.assign(i,ly({},o,n[o]))}),i}},{key:"extendArray",value:function(e,n){var s=[];return e.map(function(i){s.push(t.extend(n,i))}),e=s}},{key:"monthMod",value:function(e){return e%12}},{key:"clone",value:function(e){var n,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:new WeakMap;if(e===null||Sf(e)!=="object")return e;if(s.has(e))return s.get(e);if(Array.isArray(e)){n=[],s.set(e,n);for(var i=0;i<e.length;i++)n[i]=this.clone(e[i],s)}else if(e instanceof Date)n=new Date(e.getTime());else for(var o in n={},s.set(e,n),e)e.hasOwnProperty(o)&&(n[o]=this.clone(e[o],s));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),s=e.clientHeight,i=e.clientWidth;return s-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),[i-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),s]}},{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,s){return Array.isArray(s)&&(s=s.reduce(function(i,o){return i.length>o.length?i:o})),n.length>s.length?n:s},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 s=e.replace("#","");s=s.match(new RegExp("(.{"+s.length/3+"})","g"));for(var i=0;i<s.length;i++)s[i]=parseInt(s[i].length===1?s[i]+s[i]:s[i],16);return n!==void 0&&s.push(n),"rgba("+s.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 s=[],i=2*Math.PI/n,o=0;o<n;o++){var r={};r.x=e*Math.sin(o*i),r.y=-e*Math.cos(o*i),s.push(r)}return s}},{key:"polarToCartesian",value:function(e,n,s,i){var o=(i-90)*Math.PI/180;return{x:e+s*Math.cos(o),y:n+s*Math.sin(o)}}},{key:"escapeString",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"x",s=e.toString().slice();return s=s.replace(/[` ~!@#$%^&*()|+\=?;:'",.<>{}[\]\\/]/gi,n)}},{key:"negToZero",value:function(e){return e<0?0:e}},{key:"moveIndexInArray",value:function(e,n,s){if(s>=e.length)for(var i=s-e.length+1;i--;)e.push(void 0);return e.splice(s,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 s in n)n.hasOwnProperty(s)&&(e.style.key=n[s])}},{key:"preciseAddition",value:function(e,n){var s=(String(e).split(".")[1]||"").length,i=(String(n).split(".")[1]||"").length,o=Math.pow(10,Math.max(s,i));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 s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,i=Math.pow(10,s-Math.floor(Math.log10(Math.max(e,n))));for(e=Math.round(Math.abs(e)*i),n=Math.round(Math.abs(n)*i);n;){var o=n;n=e%n,e=o}return e/i}},{key:"getPrimeFactors",value:function(e){for(var n=[],s=2;e>=2;)e%s==0?(n.push(s),e/=s):s++;return n}},{key:"mod",value:function(e,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:7,i=Math.pow(10,s-Math.floor(Math.log10(Math.max(e,n))));return(e=Math.round(Math.abs(e)*i))%(n=Math.round(Math.abs(n)*i))/i}}]),t}(),sp=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"animateLine",value:function(e,n,s,i){e.attr(n).animate(i).attr(s)}},{key:"animateMarker",value:function(e,n,s,i){e.attr({opacity:0}).animate(n).attr({opacity:1}).after(function(){i()})}},{key:"animateRect",value:function(e,n,s,i,o){e.attr(n).animate(i).attr(s).after(function(){return o()})}},{key:"animatePathsGradually",value:function(e){var n=e.el,s=e.realIndex,i=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,s,i,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,s,i,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(){ue.isNumber(s)?s===u.globals.series[u.globals.maxValsInArrayIndex].length-2&&u.globals.shouldAnimate&&c.animationCompleted(e):i!=="none"&&u.globals.shouldAnimate&&(!u.globals.comboCharts&&n===u.globals.series.length-1||u.globals.comboCharts)&&c.animationCompleted(e),c.showDelayedElements()})}}]),t}();const UC={},SH=[];function zt(t,e){if(Array.isArray(t))for(const n of t)zt(n,e);else if(typeof t!="object")$H(Object.getOwnPropertyNames(e)),UC[t]=Object.assign(UC[t]||{},e);else for(const n in t)zt(n,t[n])}function Ri(t){return UC[t]||{}}function $H(t){SH.push(...t)}function M5(t,e){let n;const s=t.length,i=[];for(n=0;n<s;n++)i.push(e(t[n]));return i}function Gw(t){return t%360*Math.PI/180}function ip(t){return t.charAt(0).toUpperCase()+t.slice(1)}function op(t,e,n,s){return e!=null&&n!=null||(s=s||t.bbox(),e==null?e=s.width/s.height*n:n==null&&(n=s.height/s.width*e)),{width:e,height:n}}function jC(t,e){const n=t.origin;let s=t.ox!=null?t.ox:t.originX!=null?t.originX:"center",i=t.oy!=null?t.oy:t.originY!=null?t.originY:"center";n!=null&&([s,i]=Array.isArray(n)?n:typeof n=="object"?[n.x,n.y]:[n,n]);const o=typeof s=="string",r=typeof i=="string";if(o||r){const{height:a,width:l,x:c,y:u}=e.bbox();o&&(s=s.includes("left")?c:s.includes("right")?c+l:c+l/2),r&&(i=i.includes("top")?u:i.includes("bottom")?u+a:u+a/2)}return[s,i]}const qgt=new Set(["desc","metadata","title"]),WC=t=>qgt.has(t.nodeName),AH=(t,e,n={})=>{const s={...e};for(const i in s)s[i].valueOf()===n[i]&&delete s[i];Object.keys(s).length?t.node.setAttribute("data-svgjs",JSON.stringify(s)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},E5="http://www.w3.org/2000/svg",qw="http://www.w3.org/2000/xmlns/",rp="http://www.w3.org/1999/xlink",un={window:typeof window>"u"?null:window,document:typeof document>"u"?null:document};function O1(){return un.window}let T5=class{};const Vu={},P5="___SYMBOL___ROOT___";function Lg(t,e=E5){return un.document.createElementNS(e,t)}function ki(t,e=!1){if(t instanceof T5)return t;if(typeof t=="object")return Xw(t);if(t==null)return new Vu[P5];if(typeof t=="string"&&t.charAt(0)!=="<")return Xw(un.document.querySelector(t));const n=e?un.document.createElement("div"):Lg("svg");return n.innerHTML=t,t=Xw(n.firstChild),n.removeChild(n.firstChild),t}function Tn(t,e){return e&&(e instanceof un.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:Lg(t)}function Do(t){if(!t)return null;if(t.instance instanceof T5)return t.instance;if(t.nodeName==="#document-fragment")return new Vu.Fragment(t);let e=ip(t.nodeName||"Dom");return e==="LinearGradient"||e==="RadialGradient"?e="Gradient":Vu[e]||(e="Dom"),new Vu[e](t)}let Xw=Do;function pn(t,e=t.name,n=!1){return Vu[e]=t,n&&(Vu[P5]=t),$H(Object.getOwnPropertyNames(t.prototype)),t}let Xgt=1e3;function MH(t){return"Svgjs"+ip(t)+Xgt++}function EH(t){for(let e=t.children.length-1;e>=0;e--)EH(t.children[e]);return t.id&&(t.id=MH(t.nodeName)),t}function bt(t,e){let n,s;for(s=(t=Array.isArray(t)?t:[t]).length-1;s>=0;s--)for(n in e)t[s].prototype[n]=e[n]}function En(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)}}zt("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=ki(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=ki(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=ki(t)).before(this),this},insertAfter:function(t){return(t=ki(t)).after(this),this}});const TH=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,Kgt=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Zgt=/rgb\((\d+),(\d+),(\d+)\)/,Jgt=/(#[a-z_][a-z0-9\-_]*)/i,Qgt=/\)\s*,?\s*/,e1t=/\s/g,RE=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,VE=/^rgb\(/,FE=/^(\s+)?$/,NE=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,t1t=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,fl=/[\s,]+/,I5=/[MLHVCSQTAZ]/i;function n1t(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return n.length===1?"0"+n:n}function zd(t,e){for(let n=e.length;n--;)if(t[e[n]]==null)return!1;return!0}function Kw(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}zt("Dom",{classes:function(){const t=this.attr("class");return t==null?[]:t.trim().split(fl)},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)}}),zt("Dom",{css:function(t,e){const n={};if(arguments.length===0)return this.node.style.cssText.split(/\s*;\s*/).filter(function(s){return!!s.length}).forEach(function(s){const i=s.split(/\s*:\s*/);n[i[0]]=i[1]}),n;if(arguments.length<2){if(Array.isArray(t)){for(const s of t){const i=s;n[s]=this.node.style.getPropertyValue(i)}return n}if(typeof t=="string")return this.node.style.getPropertyValue(t);if(typeof t=="object")for(const s in t)this.node.style.setProperty(s,t[s]==null||FE.test(t[s])?"":t[s])}return arguments.length===2&&this.node.style.setProperty(t,e==null||FE.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return this.css("display")!=="none"}}),zt("Dom",{data:function(t,e,n){if(t==null)return this.data(M5(function(s,i){let o;const r=s.length,a=[];for(o=0;o<r;o++)i(s[o])&&a.push(s[o]);return a}(this.node.attributes,s=>s.nodeName.indexOf("data-")===0),s=>s.nodeName.slice(5)));if(t instanceof Array){const s={};for(const i of t)s[i]=this.data(i);return s}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}}),zt("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 Sn{constructor(...e){this.init(...e)}static isColor(e){return e&&(e instanceof Sn||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:s,round:i,sin:o,PI:r}=Math;if(e==="vibrant"){const a=24*s()+57,l=38*s()+45,c=360*s();return new Sn(a,l,c,"lch")}if(e==="sine"){const a=i(80*o(2*r*(n=n??s())/.5+.01)+150),l=i(50*o(2*r*n/.5+4.6)+200),c=i(100*o(2*r*n/.5+2.3)+150);return new Sn(a,l,c)}if(e==="pastel"){const a=8*s()+86,l=17*s()+9,c=360*s();return new Sn(a,l,c,"lch")}if(e==="dark"){const a=10+10*s(),l=50*s()+86,c=360*s();return new Sn(a,l,c,"lch")}if(e==="rgb"){const a=255*s(),l=255*s(),c=255*s();return new Sn(a,l,c)}if(e==="lab"){const a=100*s(),l=256*s()-128,c=256*s()-128;return new Sn(a,l,c,"lab")}if(e==="grey"){const a=255*s();return new Sn(a,a,a)}throw new Error("Unsupported random color mode")}static test(e){return typeof e=="string"&&(RE.test(e)||VE.test(e))}cmyk(){const{_a:e,_b:n,_c:s}=this.rgb(),[i,o,r]=[e,n,s].map(l=>l/255),a=Math.min(1-i,1-o,1-r);return a===1?new Sn(0,0,0,1,"cmyk"):new Sn((1-i-a)/(1-a),(1-o-a)/(1-a),(1-r-a)/(1-a),a,"cmyk")}hsl(){const{_a:e,_b:n,_c:s}=this.rgb(),[i,o,r]=[e,n,s].map(h=>h/255),a=Math.max(i,o,r),l=Math.min(i,o,r),c=(a+l)/2,u=a===l,d=a-l;return new Sn(360*(u?0:a===i?((o-r)/d+(o<r?6:0))/6:a===o?((r-i)/d+2)/6:a===r?((i-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,s=0,i=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 i=="string"?i:o,i=typeof i=="string"?0:i,Object.assign(this,{_a:e,_b:n,_c:s,_d:i,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=zd(h,"rgb")?{_a:h.r,_b:h.g,_c:h.b,_d:0,space:"rgb"}:zd(h,"xyz")?{_a:h.x,_b:h.y,_c:h.z,_d:0,space:"xyz"}:zd(h,"hsl")?{_a:h.h,_b:h.s,_c:h.l,_d:0,space:"hsl"}:zd(h,"lab")?{_a:h.l,_b:h.a,_c:h.b,_d:0,space:"lab"}:zd(h,"lch")?{_a:h.l,_b:h.c,_c:h.h,_d:0,space:"lch"}:zd(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(VE.test(e)){const d=e.replace(e1t,""),[h,f,p]=Zgt.exec(d).slice(1,4).map(m=>parseInt(m));Object.assign(this,{_a:h,_b:f,_c:p,_d:0,space:"rgb"})}else{if(!RE.test(e))throw Error("Unsupported string format, can't construct Color");{const d=m=>parseInt(m,16),[,h,f,p]=Kgt.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:s}=this.xyz();return new Sn(116*n-16,500*(e-n),200*(n-s),"lab")}lch(){const{l:e,a:n,b:s}=this.lab(),i=Math.sqrt(n**2+s**2);let o=180*Math.atan2(s,n)/Math.PI;return o<0&&(o*=-1,o=360-o),new Sn(e,i,o,"lch")}rgb(){if(this.space==="rgb")return this;if((e=this.space)==="lab"||e==="xyz"||e==="lch"){let{x:n,y:s,z:i}=this;if(this.space==="lab"||this.space==="lch"){let{l:f,a:p,b:m}=this;if(this.space==="lch"){const{c:E,h:T}=this,P=Math.PI/180;p=E*Math.cos(P*T),m=E*Math.sin(P*T)}const b=(f+16)/116,y=p/500+b,C=b-m/200,k=16/116,x=.008856,S=7.787;n=.95047*(y**3>x?y**3:(y-k)/S),s=1*(b**3>x?b**3:(b-k)/S),i=1.08883*(C**3>x?C**3:(C-k)/S)}const o=3.2406*n+-1.5372*s+-.4986*i,r=-.9689*n+1.8758*s+.0415*i,a=.0557*n+-.204*s+1.057*i,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 Sn(255*u,255*d,255*h)}if(this.space==="hsl"){let{h:n,s,l:i}=this;if(n/=360,s/=100,i/=100,s===0)return i*=255,new Sn(i,i,i);const o=i<.5?i*(1+s):i+s-i*s,r=2*i-o,a=255*Kw(r,o,n+1/3),l=255*Kw(r,o,n),c=255*Kw(r,o,n-1/3);return new Sn(a,l,c)}if(this.space==="cmyk"){const{c:n,m:s,y:i,k:o}=this,r=255*(1-Math.min(1,n*(1-o)+o)),a=255*(1-Math.min(1,s*(1-o)+o)),l=255*(1-Math.min(1,i*(1-o)+o));return new Sn(r,a,l)}return this;var e}toArray(){const{_a:e,_b:n,_c:s,_d:i,space:o}=this;return[e,n,s,i,o]}toHex(){const[e,n,s]=this._clamped().map(n1t);return`#${e}${n}${s}`}toRgb(){const[e,n,s]=this._clamped();return`rgb(${e},${n},${s})`}toString(){return this.toHex()}xyz(){const{_a:e,_b:n,_c:s}=this.rgb(),[i,o,r]=[e,n,s].map(b=>b/255),a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/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 Sn(f,p,m,"xyz")}_clamped(){const{_a:e,_b:n,_c:s}=this.rgb(),{max:i,min:o,round:r}=Math;return[e,n,s].map(a=>i(0,o(r(a),255)))}}let An=class PH{constructor(...e){this.init(...e)}clone(){return new PH(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){Kt.isMatrixLike(e)||(e=new Kt(e));const{x:n,y:s}=this;return this.x=e.a*n+e.c*s+e.e,this.y=e.b*n+e.d*s+e.f,this}};function Hd(t,e,n){return Math.abs(e-t)<(n||1e-6)}let Kt=class _s{constructor(...e){this.init(...e)}static formatTransforms(e){const n=e.flip==="both"||e.flip===!0,s=e.flip&&(n||e.flip==="x")?-1:1,i=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]*s:isFinite(e.scale)?e.scale*s:isFinite(e.scaleX)?e.scaleX*s:s,l=e.scale&&e.scale.length?e.scale[1]*i:isFinite(e.scale)?e.scale*i:isFinite(e.scaleY)?e.scaleY*i:i,c=e.shear||0,u=e.rotate||e.theta||0,d=new An(e.origin||e.around||e.ox||e.originX,e.oy||e.originY),h=d.x,f=d.y,p=new An(e.position||e.px||e.positionX||NaN,e.py||e.positionY||NaN),m=p.x,b=p.y,y=new An(e.translate||e.tx||e.translateX,e.ty||e.translateY),C=y.x,k=y.y,x=new An(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.x,ry:x.y,tx:C,ty:k,ox:h,oy:f,px:m,py:b}}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,s){const i=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 s.a=i,s.b=o,s.c=r,s.d=a,s.e=l,s.f=c,s}around(e,n,s){return this.clone().aroundO(e,n,s)}aroundO(e,n,s){const i=e||0,o=n||0;return this.translateO(-i,-o).lmultiplyO(s).translateO(i,o)}clone(){return new _s(this)}decompose(e=0,n=0){const s=this.a,i=this.b,o=this.c,r=this.d,a=this.e,l=this.f,c=s*r-i*o,u=c>0?1:-1,d=u*Math.sqrt(s*s+i*i),h=Math.atan2(u*i,u*s),f=180/Math.PI*h,p=Math.cos(h),m=Math.sin(h),b=(s*o+i*r)/c,y=o*d/(b*s-i)||r*d/(b*i+s);return{scaleX:d,scaleY:y,shear:b,rotate:f,translateX:a-e+e*p*d+n*(b*p*d-m*y),translateY:l-n+e*m*d+n*(b*m*d+p*y),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 _s(e);return Hd(this.a,n.a)&&Hd(this.b,n.b)&&Hd(this.c,n.c)&&Hd(this.d,n.d)&&Hd(this.e,n.e)&&Hd(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=_s.fromArray([1,0,0,1,0,0]);return e=e instanceof qs?e.matrixify():typeof e=="string"?_s.fromArray(e.split(fl).map(parseFloat)):Array.isArray(e)?_s.fromArray(e):typeof e=="object"&&_s.isMatrixLike(e)?e:typeof e=="object"?new _s().transform(e):arguments.length===6?_s.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,s=this.c,i=this.d,o=this.e,r=this.f,a=e*i-n*s;if(!a)throw new Error("Cannot invert "+this);const l=i/a,c=-n/a,u=-s/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 _s?e:new _s(e);return _s.matrixMultiply(n,this,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(e){const n=e instanceof _s?e:new _s(e);return _s.matrixMultiply(this,n,this)}rotate(e,n,s){return this.clone().rotateO(e,n,s)}rotateO(e,n=0,s=0){e=Gw(e);const i=Math.cos(e),o=Math.sin(e),{a:r,b:a,c:l,d:c,e:u,f:d}=this;return this.a=r*i-a*o,this.b=a*i+r*o,this.c=l*i-c*o,this.d=c*i+l*o,this.e=u*i-d*o+s*o-n*i+n,this.f=d*i+u*o-n*o-s*i+s,this}scale(){return this.clone().scaleO(...arguments)}scaleO(e,n=e,s=0,i=0){arguments.length===3&&(i=s,s=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-s*e+s,this.f=u*n-i*n+i,this}shear(e,n,s){return this.clone().shearO(e,n,s)}shearO(e,n=0,s=0){const{a:i,b:o,c:r,d:a,e:l,f:c}=this;return this.a=i+o*e,this.c=r+a*e,this.e=l+c*e-s*e,this}skew(){return this.clone().skewO(...arguments)}skewO(e,n=e,s=0,i=0){arguments.length===3&&(i=s,s=n,n=e),e=Gw(e),n=Gw(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-i*o,this.f=h+d*r-s*r,this}skewX(e,n,s){return this.skew(e,0,n,s)}skewY(e,n,s){return this.skew(0,e,n,s)}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(_s.isMatrixLike(e))return new _s(e).multiplyO(this);const n=_s.formatTransforms(e),{x:s,y:i}=new An(n.ox,n.oy).transform(this),o=new _s().translateO(n.rx,n.ry).lmultiplyO(this).translateO(-s,-i).scaleO(n.scaleX,n.scaleY).skewO(n.skewX,n.skewY).shearO(n.shear).rotateO(n.theta).translateO(s,i);if(isFinite(n.px)||isFinite(n.py)){const r=new An(s,i).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 Xl(){if(!Xl.nodes){const t=ki().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;Xl.nodes={svg:t,path:e}}if(!Xl.nodes.svg.node.parentNode){const t=un.document.body||un.document.documentElement;Xl.nodes.svg.addTo(t)}return Xl.nodes}function IH(t){return!(t.width||t.height||t.x||t.y)}pn(Kt,"Matrix");let As=class Rv{constructor(...e){this.init(...e)}addOffset(){return this.x+=un.window.pageXOffset,this.y+=un.window.pageYOffset,new Rv(this)}init(e){return e=typeof e=="string"?e.split(fl).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 IH(this)}merge(e){const n=Math.min(this.x,e.x),s=Math.min(this.y,e.y),i=Math.max(this.x+this.width,e.x+e.width)-n,o=Math.max(this.y+this.height,e.y+e.height)-s;return new Rv(n,s,i,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 Kt||(e=new Kt(e));let n=1/0,s=-1/0,i=1/0,o=-1/0;return[new An(this.x,this.y),new An(this.x2,this.y),new An(this.x,this.y2),new An(this.x2,this.y2)].forEach(function(r){r=r.transform(e),n=Math.min(n,r.x),s=Math.max(s,r.x),i=Math.min(i,r.y),o=Math.max(o,r.y)}),new Rv(n,i,s-n,o-i)}};function BE(t,e,n){let s;try{if(s=e(t.node),IH(s)&&(i=t.node)!==un.document&&!(un.document.documentElement.contains||function(o){for(;o.parentNode;)o=o.parentNode;return o===un.document}).call(un.document.documentElement,i))throw new Error("Element not in the dom")}catch{s=n(t)}var i;return s}zt({viewbox:{viewbox(t,e,n,s){return t==null?new As(this.attr("viewBox")):this.attr("viewBox",new As(t,e,n,s))},zoom(t,e){let{width:n,height:s}=this.attr(["width","height"]);if((n||s)&&typeof n!="string"&&typeof s!="string"||(n=this.node.clientWidth,s=this.node.clientHeight),!n||!s)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),o=n/i.width,r=s/i.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 An(n/2/o+i.x,s/2/r+i.y);const c=new As(i).transform(new Kt({scale:l,origin:e}));return this.viewbox(c)}}}),pn(As,"Box");let ed=class extends Array{constructor(e=[],...n){if(super(e,...n),typeof e=="number")return this;this.length=0,this.push(...e)}};bt([ed],{each(t,...e){return typeof t=="function"?this.map((n,s,i)=>t.call(n,n,s,i)):this.map(n=>n[t](...e))},toArray(){return Array.prototype.concat.apply([],this)}});const s1t=["toArray","constructor","each"];function Ad(t,e){return new ed(M5((e||un.document).querySelectorAll(t),function(n){return Do(n)}))}ed.extend=function(t){t=t.reduce((e,n)=>(s1t.includes(n)||n[0]==="_"||(n in Array.prototype&&(e["$"+n]=Array.prototype[n]),e[n]=function(...s){return this.each(n,...s)}),e),{}),bt([ed],t)};let i1t=0;const LH={};function OH(t){let e=t.getEventHolder();return e===un.window&&(e=LH),e.events||(e.events={}),e.events}function L5(t){return t.getEventTarget()}function Za(t,e,n,s,i){const o=n.bind(s||t),r=ki(t),a=OH(r),l=L5(r);e=Array.isArray(e)?e:e.split(fl),n._svgjsListenerId||(n._svgjsListenerId=++i1t),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,i||!1)})}function jo(t,e,n,s){const i=ki(t),o=OH(i),r=L5(i);(typeof n!="function"||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(fl)).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],s||!1),delete o[l][c||"*"][n]);else if(l&&c){if(o[l]&&o[l][c]){for(d in o[l][c])jo(r,[l,c].join("."),d);delete o[l][c]}}else if(c)for(a in o)for(u in o[a])c===u&&jo(r,[a,c].join("."));else if(l){if(o[l]){for(u in o[l])jo(r,[l,u].join("."));delete o[l]}}else{for(a in o)jo(r,a);(function(h){let f=h.getEventHolder();f===un.window&&(f=LH),f.events&&(f.events={})})(i)}})}class D1 extends T5{addEventListener(){}dispatch(e,n,s){return function(i,o,r,a){const l=L5(i);return o instanceof un.window.Event||(o=new un.window.CustomEvent(o,{detail:r,cancelable:!0,...a})),l.dispatchEvent(o),o}(this,e,n,s)}dispatchEvent(e){const n=this.getEventHolder().events;if(!n)return!0;const s=n[e.type];for(const i in s)for(const o in s[i])s[i][o](e);return!e.defaultPrevented}fire(e,n,s){return this.dispatch(e,n,s),this}getEventHolder(){return this}getEventTarget(){return this}off(e,n,s){return jo(this,e,n,s),this}on(e,n,s,i){return Za(this,e,n,s,i),this}removeEventListener(){}}function zE(){}pn(D1,"EventTarget");const Zw=400,o1t=">",r1t=0,a1t={"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 td 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(fl).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 Lt{constructor(...e){this.init(...e)}convert(e){return new Lt(this.value,e)}divide(e){return e=new Lt(e),new Lt(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(TH))&&(this.value=parseFloat(n[1]),n[5]==="%"?this.value/=100:n[5]==="s"&&(this.value*=1e3),this.unit=n[5]):e instanceof Lt&&(this.value=e.valueOf(),this.unit=e.unit),this}minus(e){return e=new Lt(e),new Lt(this-e,this.unit||e.unit)}plus(e){return e=new Lt(e),new Lt(this+e,this.unit||e.unit)}times(e){return e=new Lt(e),new Lt(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 l1t=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),DH=[];class Cc extends D1{constructor(e,n){super(),this.node=e,this.type=e.nodeName,n&&e!==n&&this.attr(n)}add(e,n){return(e=ki(e)).removeNamespace&&this.node instanceof un.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 ki(e).put(this,n)}children(){return new ed(M5(this.node.children,function(e){return Do(e)}))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(e=!0,n=!0){this.writeDataToDom();let s=this.node.cloneNode(e);return n&&(s=EH(s)),new this.constructor(s)}each(e,n){const s=this.children();let i,o;for(i=0,o=s.length;i<o;i++)e.apply(s[i],[i,s]),n&&s[i].each(e,n);return this}element(e,n){return this.put(new Cc(Lg(e),n))}first(){return Do(this.node.firstChild)}get(e){return Do(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=MH(this.type)),this.attr("id",e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return Do(this.node.lastChild)}matches(e){const n=this.node,s=n.matches||n.matchesSelector||n.msMatchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector||n.oMatchesSelector||null;return s&&s.call(n,e)}parent(e){let n=this;if(!n.node.parentNode)return null;if(n=Do(n.node.parentNode),!e)return n;do if(typeof e=="string"?n.matches(e):n instanceof e)return n;while(n=Do(n.node.parentNode));return n}put(e,n){return e=ki(e),this.add(e,n),e}putIn(e,n){return ki(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=ki(e),this.node.parentNode&&this.node.parentNode.replaceChild(e.node,this.node),e}round(e=2,n=null){const s=10**e,i=this.attr(n);for(const o in i)typeof i[o]=="number"&&(i[o]=Math.round(i[o]*s)/s);return this.attr(i),this}svg(e,n){return this.xml(e,n,E5)}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 s=n.index(this);return n.put(e,s).put(this)}writeDataToDom(){return this.each(function(){this.writeDataToDom()}),this}xml(e,n,s){if(typeof e=="boolean"&&(s=n,n=e,e=null),e==null||typeof e=="function"){n=n==null||n,this.writeDataToDom();let a=this;if(e!=null){if(a=Do(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 i=Lg("wrapper",s),o=un.document.createDocumentFragment();i.innerHTML=e;for(let a=i.children.length;a--;)o.appendChild(i.firstElementChild);const r=this.parent();return n?this.replace(o)&&r:this.add(o)}}bt(Cc,{attr:function(t,e,n){if(t==null){t={},e=this.node.attributes;for(const s of e)t[s.nodeName]=NE.test(s.nodeValue)?parseFloat(s.nodeValue):s.nodeValue;return t}if(t instanceof Array)return t.reduce((s,i)=>(s[i]=this.attr(i),s),{});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?a1t[t]:NE.test(e)?parseFloat(e):e;typeof(e=DH.reduce((s,i)=>i(t,s,this),e))=="number"?e=new Lt(e):l1t.has(t)&&Sn.isColor(e)?e=new Sn(e):e.constructor===Array&&(e=new td(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 Ad(t,this.node)},findOne:function(t){return Do(this.node.querySelector(t))}}),pn(Cc,"Dom");let qs=class extends Cc{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 Lt(t).plus(this.x()))}dy(t=0){return this.y(new Lt(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=ki(t));const n=new ed;let s=this;for(;(s=s.parent())&&s.node!==un.document&&s.nodeName!=="#document-fragment"&&(n.push(s),e||s.node!==t.node)&&(!e||!s.matches(t));)if(s.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(Jgt);return e?ki(e[1]):null}root(){const t=this.parent(function(e){return Vu[e]}(P5));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=op(this,t,e);return this.width(new Lt(n.width)).height(new Lt(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return AH(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}};bt(qs,{bbox:function(){const t=BE(this,e=>e.getBBox(),e=>{try{const n=e.clone().addTo(Xl().svg).show(),s=n.node.getBBox();return n.remove(),s}catch(n){throw new Error(`Getting bbox of element "${e.node.nodeName}" is not possible: ${n.toString()}`)}});return new As(t)},rbox:function(t){const e=BE(this,s=>s.getBoundingClientRect(),s=>{throw new Error(`Getting rbox of element "${s.node.nodeName}" is not possible`)}),n=new As(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 An(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new Kt(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 Kt(e)}return new Kt(this.node.getScreenCTM())}catch{return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new Kt}}}),pn(qs,"Element");const yp={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(s){if(s===void 0)return this.attr(t);if(typeof s=="string"||s instanceof Sn||Sn.isRgb(s)||s instanceof qs)this.attr(t,s);else for(n=yp[t].length-1;n>=0;n--)s[yp[t][n]]!=null&&this.attr(yp.prefix(t,yp[t][n]),s[yp[t][n]]);return this},zt(["Element","Runner"],e)}),zt(["Element","Runner"],{matrix:function(t,e,n,s,i,o){return t==null?new Kt(this):this.attr("transform",new Kt(t,e,n,s,i,o))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,s){return arguments.length===1||arguments.length===3?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:s},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,s){return arguments.length===1||arguments.length===3?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:s},!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)}}),zt("radius",{radius:function(t,e=t){return(this._element||this).type==="radialGradient"?this.attr("r",new Lt(t)):this.rx(t).ry(e)}}),zt("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new An(this.node.getPointAtLength(t))}}),zt(["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)}});zt("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},{})),zt("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(Qgt).slice(0,-1).map(function(e){const n=e.trim().split("(");return[n[0],n[1].split(fl).map(function(s){return parseFloat(s)})]}).reverse().reduce(function(e,n){return n[0]==="matrix"?e.lmultiply(Kt.fromArray(n[1])):e[n[0]].apply(e,n[1])},new Kt)},toParent:function(t,e){if(this===t)return this;if(WC(this.node))return this.addTo(t,e);const n=this.screenCTM(),s=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(s.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(t==null||typeof t=="string"){const s=new Kt(this).decompose();return t==null?s:s[t]}Kt.isMatrixLike(t)||(t={...t,origin:jC(t,this)});const n=new Kt(e===!0?this:e||!1).transform(t);return this.attr("transform",n)}});class Li extends qs{flatten(){return this.each(function(){if(this instanceof Li)return this.flatten().ungroup()}),this}ungroup(e=this.parent(),n=e.index(this)){return n=n===-1?e.children().length:n,this.each(function(s,i){return i[i.length-s-1].toParent(e,n)}),this.remove()}}pn(Li,"Container");class i2 extends Li{constructor(e,n=e){super(Tn("defs",e),n)}flatten(){return this}ungroup(){return this}}pn(i2,"Defs");class $o extends qs{}function O5(t){return this.attr("rx",t)}function D5(t){return this.attr("ry",t)}function RH(t){return t==null?this.cx()-this.rx():this.cx(t+this.rx())}function VH(t){return t==null?this.cy()-this.ry():this.cy(t+this.ry())}function FH(t){return this.attr("cx",t)}function NH(t){return this.attr("cy",t)}function BH(t){return t==null?2*this.rx():this.rx(new Lt(t).divide(2))}function zH(t){return t==null?2*this.ry():this.ry(new Lt(t).divide(2))}pn($o,"Shape");var c1t=Object.freeze({__proto__:null,cx:FH,cy:NH,height:zH,rx:O5,ry:D5,width:BH,x:RH,y:VH});class Vv extends $o{constructor(e,n=e){super(Tn("ellipse",e),n)}size(e,n){const s=op(this,e,n);return this.rx(new Lt(s.width).divide(2)).ry(new Lt(s.height).divide(2))}}bt(Vv,c1t),zt("Container",{ellipse:En(function(t=0,e=t){return this.put(new Vv).size(t,e).move(0,0)})}),pn(Vv,"Ellipse");class HH extends Cc{constructor(e=un.document.createDocumentFragment()){super(e)}xml(e,n,s){if(typeof e=="boolean"&&(s=n,n=e,e=null),e==null||typeof e=="function"){const i=new Cc(Lg("wrapper",s));return i.add(this.node.cloneNode(!0)),i.xml(!1,s)}return super.xml(e,!1,s)}}function UH(t,e){return(this._element||this).type==="radialGradient"?this.attr({fx:new Lt(t),fy:new Lt(e)}):this.attr({x1:new Lt(t),y1:new Lt(e)})}function jH(t,e){return(this._element||this).type==="radialGradient"?this.attr({cx:new Lt(t),cy:new Lt(e)}):this.attr({x2:new Lt(t),y2:new Lt(e)})}pn(HH,"Fragment");var u1t=Object.freeze({__proto__:null,from:UH,to:jH});class Rm extends Li{constructor(e,n){super(Tn(e+"Gradient",typeof e=="string"?null:e),n)}attr(e,n,s){return e==="transform"&&(e="gradientTransform"),super.attr(e,n,s)}bbox(){return new As}targets(){return Ad("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()+")"}}bt(Rm,u1t),zt({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:En(function(t,e){return this.put(new Rm(t)).update(e)})}}),pn(Rm,"Gradient");class Og extends Li{constructor(e,n=e){super(Tn("pattern",e),n)}attr(e,n,s){return e==="transform"&&(e="patternTransform"),super.attr(e,n,s)}bbox(){return new As}targets(){return Ad("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()+")"}}zt({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:En(function(t,e,n){return this.put(new Og).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})})}}),pn(Og,"Pattern");let Fv=class extends $o{constructor(t,e=t){super(Tn("image",t),e)}load(t,e){if(!t)return this;const n=new un.window.Image;return Za(n,"load",function(s){const i=this.parent(Og);this.width()===0&&this.height()===0&&this.size(n.width,n.height),i instanceof Og&&i.width()===0&&i.height()===0&&i.size(this.width(),this.height()),typeof e=="function"&&e.call(this,s)},this),Za(n,"load error",function(){jo(n)}),this.attr("href",n.src=t,rp)}};var HE;HE=function(t,e,n){return t!=="fill"&&t!=="stroke"||t1t.test(e)&&(e=n.root().defs().image(e)),e instanceof Fv&&(e=n.root().defs().pattern(0,0,s=>{s.add(e)})),e},DH.push(HE),zt({Container:{image:En(function(t,e){return this.put(new Fv).size(0,0).load(t,e)})}}),pn(Fv,"Image");class kc extends td{bbox(){let e=-1/0,n=-1/0,s=1/0,i=1/0;return this.forEach(function(o){e=Math.max(o[0],e),n=Math.max(o[1],n),s=Math.min(o[0],s),i=Math.min(o[1],i)}),new As(s,i,e-s,n-i)}move(e,n){const s=this.bbox();if(e-=s.x,n-=s.y,!isNaN(e)&&!isNaN(n))for(let i=this.length-1;i>=0;i--)this[i]=[this[i][0]+e,this[i][1]+n];return this}parse(e=[0,0]){const n=[];(e=e instanceof Array?Array.prototype.concat.apply([],e):e.trim().split(fl).map(parseFloat)).length%2!=0&&e.pop();for(let s=0,i=e.length;s<i;s+=2)n.push([e[s],e[s+1]]);return n}size(e,n){let s;const i=this.bbox();for(s=this.length-1;s>=0;s--)i.width&&(this[s][0]=(this[s][0]-i.x)*e/i.width+i.x),i.height&&(this[s][1]=(this[s][1]-i.y)*n/i.height+i.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,s=this.length;n<s;n++)e.push(this[n].join(","));return e.join(" ")}transform(e){return this.clone().transformO(e)}transformO(e){Kt.isMatrixLike(e)||(e=new Kt(e));for(let n=this.length;n--;){const[s,i]=this[n];this[n][0]=e.a*s+e.c*i+e.e,this[n][1]=e.b*s+e.d*i+e.f}return this}}const d1t=kc;var R5=Object.freeze({__proto__:null,MorphArray:d1t,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 vu=class extends $o{constructor(t,e=t){super(Tn("line",t),e)}array(){return new kc([[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,s){return t==null?this.array():(t=e!==void 0?{x1:t,y1:e,x2:n,y2:s}:new kc(t).toLine(),this.attr(t))}size(t,e){const n=op(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}};bt(vu,R5),zt({Container:{line:En(function(...t){return vu.prototype.plot.apply(this.put(new vu),t[0]!=null?t:[0,0,0,0])})}}),pn(vu,"Line");let Nv=class extends Li{constructor(t,e=t){super(Tn("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 Ch(t,e){return function(n){return n==null?this[t]:(this[t]=n,e&&e.call(this),this)}}zt({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:En(function(t,e,n){return this.put(new Nv).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)})},marker:{marker(t,e,n,s){let i=["marker"];return t!=="all"&&i.push(t),i=i.join("-"),t=arguments[1]instanceof Nv?arguments[1]:this.defs().marker(e,n,s),this.attr(i,t)}}}),pn(Nv,"Marker");const h1t={"-":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,s){return function(i){return i<0?t>0?e/t*i:n>0?s/n*i:0:i>1?n<1?(1-s)/(1-n)*i+(s-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*s+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return e==="none"?--n:e==="both"&&++n,(s,i=!1)=>{let o=Math.floor(s*t);const r=s*o%1==0;return e!=="start"&&e!=="both"||++o,i&&r&&--o,s>=0&&o<0&&(o=0),s<=1&&o>n&&(o=n),o/n}}};class V5{done(){return!1}}class YC extends V5{constructor(e=o1t){super(),this.ease=h1t[e]||e}step(e,n,s){return typeof e!="number"?s<1?e:n:e+(n-e)*this.ease(s)}}class uy extends V5{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,n,s,i){return this.stepper(e,n,s,i)}}function UE(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,s=Math.log(e/100+1e-10),i=-s/Math.sqrt(n*n+s*s),o=3.9/(i*t);this.d=2*i*o,this.k=o*o}bt(class extends uy{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,s){if(typeof t=="string")return t;if(s.done=n===1/0,n===1/0)return e;if(n===0)return t;n>100&&(n=16),n/=1e3;const i=s.velocity||0,o=-this.d*i-this.k*(t-e),r=t+i*n+o*n*n/2;return s.velocity=i+o*n,s.done=Math.abs(e-r)+Math.abs(i)<.002,s.done?e:r}},{duration:Ch("_duration",UE),overshoot:Ch("_overshoot",UE)});bt(class extends uy{constructor(t=.1,e=.01,n=0,s=1e3){super(),this.p(t).i(e).d(n).windup(s)}step(t,e,n,s){if(typeof t=="string")return t;if(s.done=n===1/0,n===1/0)return e;if(n===0)return t;const i=e-t;let o=(s.integral||0)+i*n;const r=(i-(s.error||0))/n,a=this._windup;return a!==!1&&(o=Math.max(-a,Math.min(o,a))),s.error=i,s.integral=o,s.done=Math.abs(i)<.001,s.done?e:t+(this.P*i+this.I*o+this.D*r)}},{windup:Ch("_windup"),p:Ch("P"),i:Ch("I"),d:Ch("D")});const f1t={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]]}},Jw="mlhvqtcsaz".split("");for(let t=0,e=Jw.length;t<e;++t)GC[Jw[t]]=function(n){return function(s,i,o){if(n==="H")s[0]=s[0]+i.x;else if(n==="V")s[0]=s[0]+i.y;else if(n==="A")s[5]=s[5]+i.x,s[6]=s[6]+i.y;else for(let r=0,a=s.length;r<a;++r)s[r]=s[r]+(r%2?i.y:i.x);return GC[n](s,i,o)}}(Jw[t].toUpperCase());function qC(t){return t.segment.length&&t.segment.length-1===f1t[t.segment[0].toUpperCase()]}function p1t(t,e){t.inNumber&&tu(t,!1);const n=I5.test(e);if(n)t.segment=[e];else{const s=t.lastCommand,i=s.toLowerCase(),o=s===i;t.segment=[i==="m"?o?"l":"L":s]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function tu(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,qC(t)&&XC(t)}function XC(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 m1t(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 g1t(t){return t.lastToken.toUpperCase()==="E"}const v1t=new Set([" ",","," ",` | |
| 142 | -`,"\r","\f"]);class gr extends td{bbox(){return Xl().path.setAttribute("d",this.toString()),new As(Xl.nodes.path.getBBox())}move(e,n){const s=this.bbox();if(e-=s.x,n-=s.y,!isNaN(e)&&!isNaN(n))for(let i,o=this.length-1;o>=0;o--)i=this[o][0],i==="M"||i==="L"||i==="T"?(this[o][1]+=e,this[o][2]+=n):i==="H"?this[o][1]+=e:i==="V"?this[o][1]+=n:i==="C"||i==="S"||i==="Q"?(this[o][1]+=e,this[o][2]+=n,this[o][3]+=e,this[o][4]+=n,i==="C"&&(this[o][5]+=e,this[o][6]+=n)):i==="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,s=!0){let i=0,o="";const r={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:s,p0:new An,p:new An};for(;r.lastToken=o,o=n.charAt(i++);)if(r.inSegment||!p1t(r,o))if(o!==".")if(isNaN(parseInt(o)))if(v1t.has(o))r.inNumber&&tu(r,!1);else if(o!=="-"&&o!=="+")if(o.toUpperCase()!=="E"){if(I5.test(o)){if(r.inNumber)tu(r,!1);else{if(!qC(r))throw new Error("parser Error");XC(r)}--i}}else r.number+=o,r.hasExponent=!0;else{if(r.inNumber&&!g1t(r)){tu(r,!1),--i;continue}r.number+=o,r.inNumber=!0}else{if(r.number==="0"||m1t(r)){r.inNumber=!0,r.number=o,tu(r,!0);continue}r.inNumber=!0,r.number+=o}else{if(r.pointSeen||r.hasExponent){tu(r,!1),--i;continue}r.inNumber=!0,r.pointSeen=!0,r.number+=o}return r.inNumber&&tu(r,!1),r.inSegment&&qC(r)&&XC(r),r.segments}(e)}size(e,n){const s=this.bbox();let i,o;for(s.width=s.width===0?1:s.width,s.height=s.height===0?1:s.height,i=this.length-1;i>=0;i--)o=this[i][0],o==="M"||o==="L"||o==="T"?(this[i][1]=(this[i][1]-s.x)*e/s.width+s.x,this[i][2]=(this[i][2]-s.y)*n/s.height+s.y):o==="H"?this[i][1]=(this[i][1]-s.x)*e/s.width+s.x:o==="V"?this[i][1]=(this[i][1]-s.y)*n/s.height+s.y:o==="C"||o==="S"||o==="Q"?(this[i][1]=(this[i][1]-s.x)*e/s.width+s.x,this[i][2]=(this[i][2]-s.y)*n/s.height+s.y,this[i][3]=(this[i][3]-s.x)*e/s.width+s.x,this[i][4]=(this[i][4]-s.y)*n/s.height+s.y,o==="C"&&(this[i][5]=(this[i][5]-s.x)*e/s.width+s.x,this[i][6]=(this[i][6]-s.y)*n/s.height+s.y)):o==="A"&&(this[i][1]=this[i][1]*e/s.width,this[i][2]=this[i][2]*n/s.height,this[i][6]=(this[i][6]-s.x)*e/s.width+s.x,this[i][7]=(this[i][7]-s.y)*n/s.height+s.y);return this}toString(){return function(e){let n="";for(let s=0,i=e.length;s<i;s++)n+=e[s][0],e[s][1]!=null&&(n+=e[s][1],e[s][2]!=null&&(n+=" ",n+=e[s][2],e[s][3]!=null&&(n+=" ",n+=e[s][3],n+=" ",n+=e[s][4],e[s][5]!=null&&(n+=" ",n+=e[s][5],n+=" ",n+=e[s][6],e[s][7]!=null&&(n+=" ",n+=e[s][7])))));return n+" "}(this)}}const WH=t=>{const e=typeof t;return e==="number"?Lt:e==="string"?Sn.isColor(t)?Sn:fl.test(t)?I5.test(t)?gr:td:TH.test(t)?Lt:KC:ZC.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?td:e==="object"?Dg:KC};class nu{constructor(e){this._stepper=e||new YC("-"),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(WH(e));let n=new this._type(e);return this._type===Sn&&(n=this._to?n[this._to[4]]():this._from?n[this._from[4]]():n),this._type===Dg&&(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(s){return s.done=!0,s}),n}}class KC{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 R1{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,R1.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}R1.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const _1t=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Dg{constructor(...e){this.init(...e)}align(e){const n=this.values;for(let s=0,i=n.length;s<i;++s){if(n[s+1]===e[s+1]){if(n[s+1]===Sn&&e[s+7]!==n[s+7]){const a=e[s+7],l=new Sn(this.values.splice(s+3,5))[a]().toArray();this.values.splice(s+3,0,...l)}s+=n[s+2]+2;continue}if(!e[s+1])return this;const o=new e[s+1]().toArray(),r=n[s+2]+3;n.splice(s,r,e[s],e[s+1],e[s+2],...o),s+=n[s+2]+2}return this}init(e){if(this.values=[],Array.isArray(e))return void(this.values=e.slice());e=e||{};const n=[];for(const s in e){const i=WH(e[s]),o=new i(e[s]).toArray();n.push([s,i,o.length,...o])}return n.sort(_1t),this.values=n.reduce((s,i)=>s.concat(i),[]),this}toArray(){return this.values}valueOf(){const e={},n=this.values;for(;n.length;){const s=n.shift(),i=n.shift(),o=n.shift(),r=n.splice(0,o);e[s]=new i(r)}return e}}const ZC=[KC,R1,Dg];class zh extends $o{constructor(e,n=e){super(Tn("path",e),n)}array(){return this._array||(this._array=new gr(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 gr(e))}size(e,n){const s=op(this,e,n);return this.attr("d",this.array().size(s.width,s.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)}}zh.prototype.MorphArray=gr,zt({Container:{path:En(function(t){return this.put(new zh).plot(t||new gr)})}}),pn(zh,"Path");var YH=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new kc(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 kc(t))},size:function(t,e){const n=op(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}});class _u extends $o{constructor(e,n=e){super(Tn("polygon",e),n)}}zt({Container:{polygon:En(function(t){return this.put(new _u).plot(t||new kc)})}}),bt(_u,R5),bt(_u,YH),pn(_u,"Polygon");class yu extends $o{constructor(e,n=e){super(Tn("polyline",e),n)}}zt({Container:{polyline:En(function(t){return this.put(new yu).plot(t||new kc)})}}),bt(yu,R5),bt(yu,YH),pn(yu,"Polyline");class Bv extends $o{constructor(e,n=e){super(Tn("rect",e),n)}}bt(Bv,{rx:O5,ry:D5}),zt({Container:{rect:En(function(t,e){return this.put(new Bv).size(t,e)})}}),pn(Bv,"Rect");class Qw{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 wn={nextDraw:null,frames:new Qw,timeouts:new Qw,immediates:new Qw,timer:()=>un.window.performance||un.window.Date,transforms:[],frame(t){const e=wn.frames.push({run:t});return wn.nextDraw===null&&(wn.nextDraw=un.window.requestAnimationFrame(wn._draw)),e},timeout(t,e){e=e||0;const n=wn.timer().now()+e,s=wn.timeouts.push({run:t,time:n});return wn.nextDraw===null&&(wn.nextDraw=un.window.requestAnimationFrame(wn._draw)),s},immediate(t){const e=wn.immediates.push(t);return wn.nextDraw===null&&(wn.nextDraw=un.window.requestAnimationFrame(wn._draw)),e},cancelFrame(t){t!=null&&wn.frames.remove(t)},clearTimeout(t){t!=null&&wn.timeouts.remove(t)},cancelImmediate(t){t!=null&&wn.immediates.remove(t)},_draw(t){let e=null;const n=wn.timeouts.last();for(;(e=wn.timeouts.shift())&&(t>=e.time?e.run():wn.timeouts.push(e),e!==n););let s=null;const i=wn.frames.last();for(;s!==i&&(s=wn.frames.shift());)s.run(t);let o=null;for(;o=wn.immediates.shift();)o();wn.nextDraw=wn.timeouts.first()||wn.frames.first()?un.window.requestAnimationFrame(wn._draw):null}},y1t=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},b1t=function(){const t=un.window;return(t.performance||t.Date).now()};class GH extends D1{constructor(e=b1t){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 s=Math.abs(n);return this.speed(e?-s:s)}schedule(e,n,s){if(e==null)return this._runners.map(y1t);let i=0;const o=this.getEndTime();if(n=n||0,s==null||s==="last"||s==="after")i=o;else if(s==="absolute"||s==="start")i=n,n=0;else if(s==="now")i=this._time;else if(s==="relative"){const l=this.getRunnerInfoById(e.id);l&&(i=l.start+n,n=0)}else{if(s!=="with-last")throw new Error('Invalid value for the "when" parameter');{const l=this.getLastRunnerInfo();i=l?l.start:this._time}}e.unschedule(),e.timeline(this);const r=e.persist(),a={persist:r===null?this._persist:r,start:i+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 wn.cancelFrame(this._nextFrame),this._nextFrame=null,e?this._stepImmediate():(this._paused||(this._nextFrame=wn.frame(this._step)),this)}_stepFn(e=!1){const n=this._timeSource();let s=n-this._lastSourceTime;e&&(s=0);const i=this._speed*s+(this._time-this._lastStepTime);this._lastSourceTime=n,e||(this._time+=i,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=i;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)}}zt({Element:{timeline:function(t){return t==null?(this._timeline=this._timeline||new GH,this._timeline):(this._timeline=t,this)}}});class vo extends D1{constructor(e){super(),this.id=vo.id++,e=typeof(e=e??Zw)=="function"?new uy(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof e=="number"&&e,this._isDeclarative=e instanceof uy,this._stepper=this._isDeclarative?e:new YC,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new Kt,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,s){let i=1,o=!1,r=0;return n=n??r1t,s=s||"last",typeof(e=e??Zw)!="object"||e instanceof V5||(n=e.delay??n,s=e.when??s,o=e.swing||o,i=e.times??i,r=e.wait??r,e=e.duration??Zw),{duration:e,delay:n,swing:o,times:i,wait:r,when:s}}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,s){const i=vo.sanitise(e,n,s),o=new vo(i.duration);return this._timeline&&o.timeline(this._timeline),this._element&&o.element(this._element),o.loop(i).schedule(i.delay,i.when)}clearTransform(){return this.transforms=new Kt,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 YC(e),this}element(e){return e==null?this._element:(this._element=e,e._prepareRunner(),this)}finish(){return this.step(1/0)}loop(e,n,s){return typeof e=="object"&&(n=e.swing,s=e.wait,e=e.times),this._times=e||1/0,this._swing=n||!1,this._wait=s||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 s=e%1,i=n*Math.floor(e)+this._duration*s;return this.time(i)}persist(e){return e==null?this._persist:(this._persist=e,this)}position(e){const n=this._time,s=this._duration,i=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*(i+s))/(i+s)),m=p&&!a||!p&&a,b=Math.pow(-1,m)*(f%(i+s))/s+m;return Math.max(Math.min(b,1),0)},h=o*(i+s)-i;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,s,i){return this._queue.push({initialiser:e||zE,runner:n||zE,retarget:s,isTransform:i,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,s){if(e instanceof GH||(s=n,n=e,e=this.timeline()),!e)throw Error("Runner cannot be scheduled without timeline");return e.schedule(this,n,s),this}step(e){if(!this.enabled)return this;e=e??16,this._time+=e;const n=this.position(),s=this._lastPosition!==n&&this._time>=0;this._lastPosition=n;const i=this.duration(),o=this._lastTime<=0&&this._time>0,r=this._lastTime<i&&this._time>=i;this._lastTime=this._time,o&&this.fire("start",this);const a=this._isDeclarative;this.done=!a&&!r&&this._time>=i,this._reseted=!1;let l=!1;return(s||a)&&(this._initialise(s),this.transforms=new Kt,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,s=this._queue.length;n<s;++n){const i=this._queue[n],o=this._isDeclarative||!i.initialised&&e;e=!i.finished,o&&e&&(i.initialiser.call(this),i.initialised=!0)}}_rememberMorpher(e,n){if(this._history[e]={morpher:n,caller:this._queue[this._queue.length-1]},this._isDeclarative){const s=this.timeline();s&&s.play()}}_run(e){let n=!0;for(let s=0,i=this._queue.length;s<i;++s){const o=this._queue[s],r=o.runner.call(this,e);o.finished=o.finished||r===!0,n=n&&o.finished}return n}_tryRetarget(e,n,s){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,s):this._history[e].morpher.to(n),this._history[e].caller.finished=!1;const i=this.timeline();return i&&i.play(),!0}return!1}}vo.id=0;class dy{constructor(e=new Kt,n=-1,s=!0){this.transforms=e,this.id=n,this.done=s}clearTransformsFromQueue(){}}bt([vo,dy],{mergeWith(t){return new dy(t.transforms.lmultiply(this.transforms),t.id)}});const qH=(t,e)=>t.lmultiplyO(e),XH=t=>t.transforms;function w1t(){const t=this._transformationRunners.runners.map(XH).reduce(qH,new Kt);this.transform(t),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}class C1t{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(s=>s.clearTransformsFromQueue()),this}edit(e,n){const s=this.ids.indexOf(e+1);return this.ids.splice(s,1,e+1),this.runners.splice(s,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 s=this.runners[n];if(e&&s.done&&e.done&&(!s._timeline||!s._timeline._runnerIds.includes(s.id))&&(!e._timeline||!e._timeline._runnerIds.includes(e.id))){this.remove(s.id);const i=s.mergeWith(e);this.edit(e.id,i),e=i,--n}else e=s}return this}remove(e){const n=this.ids.indexOf(e+1);return this.ids.splice(n,1),this.runners.splice(n,1),this}}zt({Element:{animate(t,e,n){const s=vo.sanitise(t,e,n),i=this.timeline();return new vo(s.duration).loop(s).element(this).timeline(i.play()).schedule(s.delay,s.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(XH).reduce(qH,new Kt)},_addRunner(t){this._transformationRunners.add(t),wn.cancelImmediate(this._frameId),this._frameId=wn.immediate(w1t.bind(this))},_prepareRunner(){this._frameId==null&&(this._transformationRunners=new C1t().add(new dy(new Kt(this))))}}});bt(vo,{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 s=e;if(this._tryRetarget(t,s))return this;let i=new nu(this._stepper).to(s),o=Object.keys(s);return this.queue(function(){i=i.from(this.element()[t](o))},function(r){return this.element()[t](i.at(r).valueOf()),i.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 Dg(i.from()).valueOf();Object.assign(h,d),i.from(h)}const u=new Dg(i.to()).valueOf();Object.assign(u,r),i.to(u),o=a,s=r}),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new nu(this._stepper).to(new Lt(t));return this.queue(function(){n=n.from(this.element().zoom())},function(s){return this.element().zoom(n.at(s),e),n.done()},function(s,i){e=i,n.to(s)}),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const s=Kt.isMatrixLike(t);n=t.affine!=null?t.affine:n??!s;const i=new nu(this._stepper).type(n?R1:Kt);let o,r,a,l,c;return this.queue(function(){r=r||this.element(),o=o||jC(t,r),c=new Kt(e?void 0:r),r._addRunner(this),e||r._clearTransformRunnersBefore(this)},function(u){e||this.clearTransform();const{x:d,y:h}=new An(o).transform(r._currentTransform(this));let f=new Kt({...t,origin:[d,h]}),p=this._isDeclarative&&a?a:c;if(n){f=f.decompose(d,h),p=p.decompose(d,h);const b=f.rotate,y=p.rotate,C=[b-360,b,b+360],k=C.map(E=>Math.abs(E-y)),x=Math.min(...k),S=k.indexOf(x);f.rotate=C[S]}e&&(s||(f.rotate=t.rotate||0),this._isDeclarative&&l&&(p.rotate=l)),i.from(p),i.to(f);const m=i.at(u);return l=m.rotate,a=new Kt(m),this.addTransform(a),r._addRunner(this),i.done()},function(u){(u.origin||"center").toString()!==(t.origin||"center").toString()&&(o=jC(u,r)),t={...u,origin:o}},!0),this._isDeclarative&&this._rememberMorpher("transform",i),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 Lt(e),this._tryRetarget(t,e))return this;const n=new nu(this._stepper).to(e);let s=null;return this.queue(function(){s=this.element()[t](),n.from(s),n.to(s+e)},function(i){return this.element()[t](n.at(i)),n.done()},function(i){n.to(s+new Lt(i))}),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new nu(this._stepper).to(e);return this.queue(function(){n.from(this.element()[t]())},function(s){return this.element()[t](n.at(s)),n.done()}),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new Lt(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,s){if(arguments.length===4)return this.plot([t,e,n,s]);if(this._tryRetarget("plot",t))return this;const i=new nu(this._stepper).type(this._element.MorphArray).to(t);return this.queue(function(){i.from(this._element.array())},function(o){return this._element.plot(i.at(o)),i.done()}),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,s){return this._queueObject("viewbox",new As(t,e,n,s))},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)}}),bt(vo,{rx:O5,ry:D5,from:UH,to:jH}),pn(vo,"Runner");class JC extends Li{constructor(e,n=e){super(Tn("svg",e),n),this.namespace()}defs(){return this.isRoot()?Do(this.node.querySelector("defs"))||this.put(new i2):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof un.window.SVGElement)&&this.node.parentNode.nodeName!=="#document-fragment"}namespace(){return this.isRoot()?this.attr({xmlns:E5,version:"1.1"}).attr("xmlns:xlink",rp,qw):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,qw).attr("xmlns:svgjs",null,qw)}root(){return this.isRoot()?this:super.root()}}zt({Container:{nested:En(function(){return this.put(new JC)})}}),pn(JC,"Svg",!0);let QC=class extends Li{constructor(t,e=t){super(Tn("symbol",t),e)}};zt({Container:{symbol:En(function(){return this.put(new QC)})}}),pn(QC,"Symbol");var KH=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(un.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 vr extends $o{constructor(e,n=e){super(Tn("text",e),n),this.dom.leading=this.dom.leading??new Lt(1.3),this._rebuild=!0,this._build=!1}leading(e){return e==null?this.dom.leading:(this.dom.leading=new Lt(e),this.rebuild())}rebuild(e){if(typeof e=="boolean"&&(this._rebuild=e),this._rebuild){const n=this;let s=0;const i=this.dom.leading;this.each(function(o){if(WC(this.node))return;const r=un.window.getComputedStyle(this.node).getPropertyValue("font-size"),a=i*new Lt(r);this.dom.newLined&&(this.attr("x",n.attr("x")),this.text()===` | |
| 143 | -`?s+=a:(this.attr("dy",o?a+s:0),s=0))}),this.fire("rebuild")}return this}setData(e){return this.dom=e,this.dom.leading=new Lt(e.leading||1.3),this}writeDataToDom(){return AH(this,this.dom,{leading:1.3}),this}text(e){if(e===void 0){const n=this.node.childNodes;let s=0;e="";for(let i=0,o=n.length;i<o;++i)n[i].nodeName==="textPath"||WC(n[i])?i===0&&(s=i+1):(i!==s&&n[i].nodeType!==3&&Do(n[i]).dom.newLined===!0&&(e+=` | |
| 144 | -`),e+=n[i].textContent);return e}if(this.clear().build(!0),typeof e=="function")e.call(this,this);else for(let n=0,s=(e=(e+"").split(` | |
| 145 | -`)).length;n<s;n++)this.newLine(e[n]);return this.build(!1).rebuild()}}bt(vr,KH),zt({Container:{text:En(function(t=""){return this.put(new vr).text(t)}),plain:En(function(t=""){return this.put(new vr).plain(t)})}}),pn(vr,"Text");class zv extends $o{constructor(e,n=e){super(Tn("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 vr))return this;const n=e.index(this),s=un.window.getComputedStyle(this.node).getPropertyValue("font-size"),i=e.dom.leading*new Lt(s);return this.dy(n?i:0).attr("x",e.x())}text(e){return e==null?this.node.textContent+(this.dom.newLined?` | |
| 146 | -`:""):(typeof e=="function"?(this.clear().build(!0),e.call(this,this),this.build(!1)):this.plain(e),this)}}bt(zv,KH),zt({Tspan:{tspan:En(function(t=""){const e=new zv;return this._build||this.clear(),this.put(e).text(t)})},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),pn(zv,"Tspan");class e3 extends $o{constructor(e,n=e){super(Tn("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 Lt(e).divide(2))}}bt(e3,{x:RH,y:VH,cx:FH,cy:NH,width:BH,height:zH}),zt({Container:{circle:En(function(t=0){return this.put(new e3).size(t).move(0,0)})}}),pn(e3,"Circle");class t3 extends Li{constructor(e,n=e){super(Tn("clipPath",e),n)}remove(){return this.targets().forEach(function(e){e.unclip()}),super.remove()}targets(){return Ad("svg [clip-path*="+this.id()+"]")}}zt({Container:{clip:En(function(){return this.defs().put(new t3)})},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof t3?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),pn(t3,"ClipPath");class jE extends qs{constructor(e,n=e){super(Tn("foreignObject",e),n)}}zt({Container:{foreignObject:En(function(t,e){return this.put(new jE).size(t,e)})}}),pn(jE,"ForeignObject");var ZH=Object.freeze({__proto__:null,dmove:function(t,e){return this.children().forEach(n=>{let s;try{s=n.node instanceof O1().SVGSVGElement?new As(n.attr(["x","y","width","height"])):n.bbox()}catch{return}const i=new Kt(n),o=i.translate(t,e).transform(i.inverse()),r=new An(s.x,s.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 s=t-n.x,i=e-n.y;return this.dmove(s,i)},size:function(t,e,n=this.bbox()){const s=op(this,t,e,n),i=s.width/n.width,o=s.height/n.height;return this.children().forEach(r=>{const a=new An(n).transform(new Kt(r).inverse());r.scale(i,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 Li{constructor(e,n=e){super(Tn("g",e),n)}}bt(cc,ZH),zt({Container:{group:En(function(){return this.put(new cc)})}}),pn(cc,"G");class A0 extends Li{constructor(e,n=e){super(Tn("a",e),n)}target(e){return this.attr("target",e)}to(e){return this.attr("href",e,rp)}}bt(A0,ZH),zt({Container:{link:En(function(t){return this.put(new A0).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 A0,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}}}),pn(A0,"A");class n3 extends Li{constructor(e,n=e){super(Tn("mask",e),n)}remove(){return this.targets().forEach(function(e){e.unmask()}),super.remove()}targets(){return Ad("svg [mask*="+this.id()+"]")}}zt({Container:{mask:En(function(){return this.defs().put(new n3)})},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof n3?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),pn(n3,"Mask");class WE extends qs{constructor(e,n=e){super(Tn("stop",e),n)}update(e){return(typeof e=="number"||e instanceof Lt)&&(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 Lt(e.offset)),this}}zt({Gradient:{stop:function(t,e,n){return this.put(new WE).update(t,e,n)}}}),pn(WE,"Stop");class s3 extends qs{constructor(e,n=e){super(Tn("style",e),n)}addText(e=""){return this.node.textContent+=e,this}font(e,n,s={}){return this.rule("@font-face",{fontFamily:e,src:n,...s})}rule(e,n){return this.addText(function(s,i){if(!s)return"";if(!i)return s;let o=s+"{";for(const r in i)o+=r.replace(/([A-Z])/g,function(a,l){return"-"+l.toLowerCase()})+":"+i[r]+";";return o+="}",o}(e,n))}}zt("Dom",{style(t,e){return this.put(new s3).rule(t,e)},fontface(t,e,n){return this.put(new s3).font(t,e,n)}}),pn(s3,"Style");class i3 extends vr{constructor(e,n=e){super(Tn("textPath",e),n)}array(){const e=this.track();return e?e.array():null}plot(e){const n=this.track();let s=null;return n&&(s=n.plot(e)),e==null?s:this}track(){return this.reference("href")}}zt({Container:{textPath:En(function(t,e){return t instanceof vr||(t=this.text(t)),t.path(e)})},Text:{path:En(function(t,e=!0){const n=new i3;let s;if(t instanceof zh||(t=this.defs().path(t)),n.attr("href","#"+t,rp),e)for(;s=this.node.firstChild;)n.node.appendChild(s);return this.put(n)}),textPath(){return this.findOne("textPath")}},Path:{text:En(function(t){return t instanceof vr||(t=new vr().addTo(this.parent()).text(t)),t.path(this)}),targets(){return Ad("svg textPath").filter(t=>(t.attr("href")||"").includes(this.id()))}}}),i3.prototype.MorphArray=gr,pn(i3,"TextPath");class YE extends $o{constructor(e,n=e){super(Tn("use",e),n)}use(e,n){return this.attr("href",(n||"")+"#"+e,rp)}}zt({Container:{use:En(function(t,e){return this.put(new YE).use(t,e)})}}),pn(YE,"Use");const k1t=ki;bt([JC,QC,Fv,Og,Nv],Ri("viewbox")),bt([vu,yu,_u,zh],Ri("marker")),bt(vr,Ri("Text")),bt(zh,Ri("Path")),bt(i2,Ri("Defs")),bt([vr,zv],Ri("Tspan")),bt([Bv,Vv,Rm,vo],Ri("radius")),bt(D1,Ri("EventTarget")),bt(Cc,Ri("Dom")),bt(qs,Ri("Element")),bt($o,Ri("Shape")),bt([Li,HH],Ri("Container")),bt(Rm,Ri("Gradient")),bt(vo,Ri("Runner")),ed.extend([...new Set(SH)]),function(t=[]){ZC.push(...[].concat(t))}([Lt,Sn,As,Kt,td,kc,gr,An]),bt(ZC,{to(t){return new nu().type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,s,i){return this.fromArray(t.map(function(o,r){return s.step(o,e[r],n,i[r],i)}))}});class Fn extends qs{constructor(e){super(Tn("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 Ad('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class F5 extends qs{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 Eo=t=>function(...e){for(let n=t.length;n--;)e[n]!=null&&this.attr(t[n],e[n])},x1t={blend:Eo(["in","in2","mode"]),colorMatrix:Eo(["type","values"]),composite:Eo(["in","in2","operator"]),convolveMatrix:function(t){t=new td(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Eo(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Eo(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Eo(["in","dx","dy","stdDeviation"]),flood:Eo(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,rp)},morphology:Eo(["operator","radius"]),offset:Eo(["dx","dy"]),specularLighting:Eo(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Eo([]),turbulence:Eo(["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=ip(t),n=x1t[t];Fn[e+"Effect"]=class extends F5{constructor(s){super(Tn("fe"+e,s),s)}update(s){return n.apply(this,s),this}},Fn.prototype[t]=En(function(s,...i){const o=new Fn[e+"Effect"];return s==null?this.put(o):(typeof s=="function"?s.call(o,o):i.unshift(s),this.put(o).update(i))})}),bt(Fn,{merge(t){const e=this.put(new Fn.MergeEffect);return typeof t=="function"?(t.call(e,e),e):((t instanceof Array?t:[...arguments]).forEach(n=>{n instanceof Fn.MergeNode?e.put(n):e.mergeNode(n)}),e)},componentTransfer(t={}){const e=this.put(new Fn.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 Fn["Func"+n.toUpperCase()](t[n]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach(t=>{const e=ip(t);Fn[e]=class extends F5{constructor(n){super(Tn("fe"+e,n),n)}}});["funcR","funcG","funcB","funcA"].forEach(function(t){const e=Fn[ip(t)],n=En(function(){return this.put(new e)});Fn.ComponentTransferEffect.prototype[t]=n});["distantLight","pointLight","spotLight"].forEach(t=>{const e=Fn[ip(t)],n=En(function(){return this.put(new e)});Fn.DiffuseLightingEffect.prototype[t]=n,Fn.SpecularLightingEffect.prototype[t]=n}),bt(Fn.MergeEffect,{mergeNode(t){return this.put(new Fn.MergeNode).attr("in",t)}}),bt(i2,{filter:function(t){const e=this.put(new Fn);return typeof t=="function"&&t.call(e,e),e}}),bt(Li,{filter:function(t){return this.defs().filter(t)}}),bt(qs,{filterWith:function(t){const e=t instanceof Fn?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const S1t={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,s){return this.parent()&&this.parent().diffuseLighting(t,n,s).in(this)},displacementMap:function(t,e,n,s){return this.parent()&&this.parent().displacementMap(this,t,e,n,s)},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,s,i){return this.parent()&&this.parent().specularLighting(t,n,s,i).in(this)},tile:function(){return this.parent()&&this.parent().tile().in(this)},turbulence:function(t,e,n,s,i){return this.parent()&&this.parent().turbulence(t,e,n,s,i).in(this)}};bt(F5,S1t),bt(Fn.MergeEffect,{in:function(t){return t instanceof Fn.MergeNode?this.add(t,0):this.add(new Fn.MergeNode().in(t),0),this}}),bt([Fn.CompositeEffect,Fn.BlendEffect,Fn.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)}}),Fn.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var Ws=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"getDefaultFilter",value:function(e,n){var s=this.w;e.unfilter(!0),new Fn().size("120%","180%","-5%","-40%"),s.config.chart.dropShadow.enabled&&this.dropShadow(e,s.config.chart.dropShadow,n)}},{key:"applyFilter",value:function(e,n,s){var i,o=this,r=this.w;if(e.unfilter(!0),s!=="none"){var a,l,c=r.config.chart.dropShadow,u=s==="lighten"?2:.3;e.filterWith(function(d){d.colorMatrix({type:"matrix",values:` | |
| 139 | + */function Vx(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 LU(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 IT(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,RU(i.key),i)}}function ct(t,e,n){return e&&IT(t.prototype,e),n&&IT(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Am(t,e){var n=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=OS(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. | |
| 140 | +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 vv(t){var e=OU();return function(){var n,i=Jy(t);if(e){var s=Jy(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 LU(o)}(this,n)}}function Zy(t,e,n){return(e=RU(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Jy(t){return Jy=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Jy(t)}function _v(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&&Fx(t,e)}function OU(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(OU=function(){return!!t})()}function LT(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 tt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?LT(Object(n),!0).forEach(function(i){Zy(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):LT(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Fx(t,e){return Fx=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Fx(t,e)}function DU(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)||OS(t,e)||function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. | |
| 141 | +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 Vx(e)}(t)||function(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}(t)||OS(t)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance. | |
| 142 | +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function RU(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 tp(t){return tp=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},tp(t)}function OS(t,e){if(t){if(typeof t=="string")return Vx(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)?Vx(t,e):void 0}}var he=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&&tp(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,Zy({},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||tp(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}(),Ip=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(){he.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 Nx={},VU=[];function Zt(t,e){if(Array.isArray(t))for(const n of t)Zt(n,e);else if(typeof t!="object")FU(Object.getOwnPropertyNames(e)),Nx[t]=Object.assign(Nx[t]||{},e);else for(const n in t)Zt(n,t[n])}function to(t){return Nx[t]||{}}function FU(t){VU.push(...t)}function DS(t,e){let n;const i=t.length,s=[];for(n=0;n<i;n++)s.push(e(t[n]));return s}function H3(t){return t%360*Math.PI/180}function Lp(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Op(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 Bx(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 p_t=new Set(["desc","metadata","title"]),zx=t=>p_t.has(t.nodeName),NU=(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"))},RS="http://www.w3.org/2000/svg",U3="http://www.w3.org/2000/xmlns/",Dp="http://www.w3.org/1999/xlink",vn={window:typeof window>"u"?null:window,document:typeof document>"u"?null:document};function yv(){return vn.window}let VS=class{};const cd={},FS="___SYMBOL___ROOT___";function v1(t,e=RS){return vn.document.createElementNS(e,t)}function Ui(t,e=!1){if(t instanceof VS)return t;if(typeof t=="object")return j3(t);if(t==null)return new cd[FS];if(typeof t=="string"&&t.charAt(0)!=="<")return j3(vn.document.querySelector(t));const n=e?vn.document.createElement("div"):v1("svg");return n.innerHTML=t,t=j3(n.firstChild),n.removeChild(n.firstChild),t}function Bn(t,e){return e&&(e instanceof vn.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:v1(t)}function sr(t){if(!t)return null;if(t.instance instanceof VS)return t.instance;if(t.nodeName==="#document-fragment")return new cd.Fragment(t);let e=Lp(t.nodeName||"Dom");return e==="LinearGradient"||e==="RadialGradient"?e="Gradient":cd[e]||(e="Dom"),new cd[e](t)}let j3=sr;function yn(t,e=t.name,n=!1){return cd[e]=t,n&&(cd[FS]=t),FU(Object.getOwnPropertyNames(t.prototype)),t}let m_t=1e3;function BU(t){return"Svgjs"+Lp(t)+m_t++}function zU(t){for(let e=t.children.length-1;e>=0;e--)zU(t.children[e]);return t.id&&(t.id=BU(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 Nn(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)}}Zt("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=Ui(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=Ui(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=Ui(t)).before(this),this},insertAfter:function(t){return(t=Ui(t)).after(this),this}});const HU=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,g_t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,v_t=/rgb\((\d+),(\d+),(\d+)\)/,__t=/(#[a-z_][a-z0-9\-_]*)/i,y_t=/\)\s*,?\s*/,b_t=/\s/g,OT=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,DT=/^rgb\(/,RT=/^(\s+)?$/,VT=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,w_t=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Rl=/[\s,]+/,NS=/[MLHVCSQTAZ]/i;function k_t(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return n.length===1?"0"+n:n}function mh(t,e){for(let n=e.length;n--;)if(t[e[n]]==null)return!1;return!0}function W3(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}Zt("Dom",{classes:function(){const t=this.attr("class");return t==null?[]:t.trim().split(Rl)},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)}}),Zt("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||RT.test(t[i])?"":t[i])}return arguments.length===2&&this.node.style.setProperty(t,e==null||RT.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return this.css("display")!=="none"}}),Zt("Dom",{data:function(t,e,n){if(t==null)return this.data(DS(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}}),Zt("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"&&(OT.test(e)||DT.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=mh(h,"rgb")?{_a:h.r,_b:h.g,_c:h.b,_d:0,space:"rgb"}:mh(h,"xyz")?{_a:h.x,_b:h.y,_c:h.z,_d:0,space:"xyz"}:mh(h,"hsl")?{_a:h.h,_b:h.s,_c:h.l,_d:0,space:"hsl"}:mh(h,"lab")?{_a:h.l,_b:h.a,_c:h.b,_d:0,space:"lab"}:mh(h,"lch")?{_a:h.l,_b:h.c,_c:h.h,_d:0,space:"lch"}:mh(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(DT.test(e)){const d=e.replace(b_t,""),[h,f,p]=v_t.exec(d).slice(1,4).map(m=>parseInt(m));Object.assign(this,{_a:h,_b:f,_c:p,_d:0,space:"rgb"})}else{if(!OT.test(e))throw Error("Unsupported string format, can't construct Color");{const d=m=>parseInt(m,16),[,h,f,p]=g_t.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,S=7.787;n=.95047*(b**3>$?b**3:(b-C)/S),i=1*(y**3>$?y**3:(y-C)/S),s=1.08883*(k**3>$?k**3:(k-C)/S)}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*W3(r,o,n+1/3),l=255*W3(r,o,n),c=255*W3(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(k_t);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 UU{constructor(...e){this.init(...e)}clone(){return new UU(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 gh(t,e,n){return Math.abs(e-t)<(n||1e-6)}let ln=class Ds{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 Ds(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 Ds(e);return gh(this.a,n.a)&&gh(this.b,n.b)&&gh(this.c,n.c)&&gh(this.d,n.d)&&gh(this.e,n.e)&&gh(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=Ds.fromArray([1,0,0,1,0,0]);return e=e instanceof pi?e.matrixify():typeof e=="string"?Ds.fromArray(e.split(Rl).map(parseFloat)):Array.isArray(e)?Ds.fromArray(e):typeof e=="object"&&Ds.isMatrixLike(e)?e:typeof e=="object"?new Ds().transform(e):arguments.length===6?Ds.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 Ds?e:new Ds(e);return Ds.matrixMultiply(n,this,this)}multiply(e){return this.clone().multiplyO(e)}multiplyO(e){const n=e instanceof Ds?e:new Ds(e);return Ds.matrixMultiply(this,n,this)}rotate(e,n,i){return this.clone().rotateO(e,n,i)}rotateO(e,n=0,i=0){e=H3(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=H3(e),n=H3(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(Ds.isMatrixLike(e))return new Ds(e).multiplyO(this);const n=Ds.formatTransforms(e),{x:i,y:s}=new Dn(n.ox,n.oy).transform(this),o=new Ds().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 _c(){if(!_c.nodes){const t=Ui().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;_c.nodes={svg:t,path:e}}if(!_c.nodes.svg.node.parentNode){const t=vn.document.body||vn.document.documentElement;_c.nodes.svg.addTo(t)}return _c.nodes}function jU(t){return!(t.width||t.height||t.x||t.y)}yn(ln,"Matrix");let Ws=class w_{constructor(...e){this.init(...e)}addOffset(){return this.x+=vn.window.pageXOffset,this.y+=vn.window.pageYOffset,new w_(this)}init(e){return e=typeof e=="string"?e.split(Rl).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 jU(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 w_(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 w_(n,s,i-n,o-s)}};function FT(t,e,n){let i;try{if(i=e(t.node),jU(i)&&(s=t.node)!==vn.document&&!(vn.document.documentElement.contains||function(o){for(;o.parentNode;)o=o.parentNode;return o===vn.document}).call(vn.document.documentElement,s))throw new Error("Element not in the dom")}catch{i=n(t)}var s;return i}Zt({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)}}}),yn(Ws,"Box");let Ed=class extends Array{constructor(e=[],...n){if(super(e,...n),typeof e=="number")return this;this.length=0,this.push(...e)}};At([Ed],{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 C_t=["toArray","constructor","each"];function eh(t,e){return new Ed(DS((e||vn.document).querySelectorAll(t),function(n){return sr(n)}))}Ed.extend=function(t){t=t.reduce((e,n)=>(C_t.includes(n)||n[0]==="_"||(n in Array.prototype&&(e["$"+n]=Array.prototype[n]),e[n]=function(...i){return this.each(n,...i)}),e),{}),At([Ed],t)};let x_t=0;const WU={};function YU(t){let e=t.getEventHolder();return e===vn.window&&(e=WU),e.events||(e.events={}),e.events}function BS(t){return t.getEventTarget()}function cl(t,e,n,i,s){const o=n.bind(i||t),r=Ui(t),a=YU(r),l=BS(r);e=Array.isArray(e)?e:e.split(Rl),n._svgjsListenerId||(n._svgjsListenerId=++x_t),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 dr(t,e,n,i){const s=Ui(t),o=YU(s),r=BS(s);(typeof n!="function"||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Rl)).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])dr(r,[l,c].join("."),d);delete o[l][c]}}else if(c)for(a in o)for(u in o[a])c===u&&dr(r,[a,c].join("."));else if(l){if(o[l]){for(u in o[l])dr(r,[l,u].join("."));delete o[l]}}else{for(a in o)dr(r,a);(function(h){let f=h.getEventHolder();f===vn.window&&(f=WU),f.events&&(f.events={})})(s)}})}class bv extends VS{addEventListener(){}dispatch(e,n,i){return function(s,o,r,a){const l=BS(s);return o instanceof vn.window.Event||(o=new vn.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 dr(this,e,n,i),this}on(e,n,i,s){return cl(this,e,n,i,s),this}removeEventListener(){}}function NT(){}yn(bv,"EventTarget");const Y3=400,S_t=">",$_t=0,A_t={"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 Md 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(Rl).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 Ht{constructor(...e){this.init(...e)}convert(e){return new Ht(this.value,e)}divide(e){return e=new Ht(e),new Ht(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(HU))&&(this.value=parseFloat(n[1]),n[5]==="%"?this.value/=100:n[5]==="s"&&(this.value*=1e3),this.unit=n[5]):e instanceof Ht&&(this.value=e.valueOf(),this.unit=e.unit),this}minus(e){return e=new Ht(e),new Ht(this-e,this.unit||e.unit)}plus(e){return e=new Ht(e),new Ht(this+e,this.unit||e.unit)}times(e){return e=new Ht(e),new Ht(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 E_t=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),qU=[];class Wc extends bv{constructor(e,n){super(),this.node=e,this.type=e.nodeName,n&&e!==n&&this.attr(n)}add(e,n){return(e=Ui(e)).removeNamespace&&this.node instanceof vn.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 Ui(e).put(this,n)}children(){return new Ed(DS(this.node.children,function(e){return sr(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=zU(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 Wc(v1(e),n))}first(){return sr(this.node.firstChild)}get(e){return sr(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=BU(this.type)),this.attr("id",e)}index(e){return[].slice.call(this.node.childNodes).indexOf(e.node)}last(){return sr(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=sr(n.node.parentNode),!e)return n;do if(typeof e=="string"?n.matches(e):n instanceof e)return n;while(n=sr(n.node.parentNode));return n}put(e,n){return e=Ui(e),this.add(e,n),e}putIn(e,n){return Ui(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=Ui(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,RS)}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=sr(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=v1("wrapper",i),o=vn.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(Wc,{attr:function(t,e,n){if(t==null){t={},e=this.node.attributes;for(const i of e)t[i.nodeName]=VT.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?A_t[t]:VT.test(e)?parseFloat(e):e;typeof(e=qU.reduce((i,s)=>s(t,i,this),e))=="number"?e=new Ht(e):E_t.has(t)&&Ln.isColor(e)?e=new Ln(e):e.constructor===Array&&(e=new Md(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 eh(t,this.node)},findOne:function(t){return sr(this.node.querySelector(t))}}),yn(Wc,"Dom");let pi=class extends Wc{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 Ht(t).plus(this.x()))}dy(t=0){return this.y(new Ht(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=Ui(t));const n=new Ed;let i=this;for(;(i=i.parent())&&i.node!==vn.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(__t);return e?Ui(e[1]):null}root(){const t=this.parent(function(e){return cd[e]}(FS));return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=Op(this,t,e);return this.width(new Ht(n.width)).height(new Ht(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return NU(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}};At(pi,{bbox:function(){const t=FT(this,e=>e.getBBox(),e=>{try{const n=e.clone().addTo(_c().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=FT(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}}}),yn(pi,"Element");const Qp={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 pi)this.attr(t,i);else for(n=Qp[t].length-1;n>=0;n--)i[Qp[t][n]]!=null&&this.attr(Qp.prefix(t,Qp[t][n]),i[Qp[t][n]]);return this},Zt(["Element","Runner"],e)}),Zt(["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)}}),Zt("radius",{radius:function(t,e=t){return(this._element||this).type==="radialGradient"?this.attr("r",new Ht(t)):this.rx(t).ry(e)}}),Zt("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Dn(this.node.getPointAtLength(t))}}),Zt(["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)}});Zt("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},{})),Zt("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(y_t).slice(0,-1).map(function(e){const n=e.trim().split("(");return[n[0],n[1].split(Rl).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(zx(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:Bx(t,this)});const n=new ln(e===!0?this:e||!1).transform(t);return this.attr("transform",n)}});class Ji extends pi{flatten(){return this.each(function(){if(this instanceof Ji)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()}}yn(Ji,"Container");class K2 extends Ji{constructor(e,n=e){super(Bn("defs",e),n)}flatten(){return this}ungroup(){return this}}yn(K2,"Defs");class Xo extends pi{}function zS(t){return this.attr("rx",t)}function HS(t){return this.attr("ry",t)}function GU(t){return t==null?this.cx()-this.rx():this.cx(t+this.rx())}function XU(t){return t==null?this.cy()-this.ry():this.cy(t+this.ry())}function KU(t){return this.attr("cx",t)}function ZU(t){return this.attr("cy",t)}function JU(t){return t==null?2*this.rx():this.rx(new Ht(t).divide(2))}function QU(t){return t==null?2*this.ry():this.ry(new Ht(t).divide(2))}yn(Xo,"Shape");var M_t=Object.freeze({__proto__:null,cx:KU,cy:ZU,height:QU,rx:zS,ry:HS,width:JU,x:GU,y:XU});class k_ extends Xo{constructor(e,n=e){super(Bn("ellipse",e),n)}size(e,n){const i=Op(this,e,n);return this.rx(new Ht(i.width).divide(2)).ry(new Ht(i.height).divide(2))}}At(k_,M_t),Zt("Container",{ellipse:Nn(function(t=0,e=t){return this.put(new k_).size(t,e).move(0,0)})}),yn(k_,"Ellipse");class ej extends Wc{constructor(e=vn.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 Wc(v1("wrapper",i));return s.add(this.node.cloneNode(!0)),s.xml(!1,i)}return super.xml(e,!1,i)}}function tj(t,e){return(this._element||this).type==="radialGradient"?this.attr({fx:new Ht(t),fy:new Ht(e)}):this.attr({x1:new Ht(t),y1:new Ht(e)})}function nj(t,e){return(this._element||this).type==="radialGradient"?this.attr({cx:new Ht(t),cy:new Ht(e)}):this.attr({x2:new Ht(t),y2:new Ht(e)})}yn(ej,"Fragment");var T_t=Object.freeze({__proto__:null,from:tj,to:nj});class vg extends Ji{constructor(e,n){super(Bn(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 eh("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(vg,T_t),Zt({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:Nn(function(t,e){return this.put(new vg(t)).update(e)})}}),yn(vg,"Gradient");class _1 extends Ji{constructor(e,n=e){super(Bn("pattern",e),n)}attr(e,n,i){return e==="transform"&&(e="patternTransform"),super.attr(e,n,i)}bbox(){return new Ws}targets(){return eh("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()+")"}}Zt({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:Nn(function(t,e,n){return this.put(new _1).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})})}}),yn(_1,"Pattern");let C_=class extends Xo{constructor(t,e=t){super(Bn("image",t),e)}load(t,e){if(!t)return this;const n=new vn.window.Image;return cl(n,"load",function(i){const s=this.parent(_1);this.width()===0&&this.height()===0&&this.size(n.width,n.height),s instanceof _1&&s.width()===0&&s.height()===0&&s.size(this.width(),this.height()),typeof e=="function"&&e.call(this,i)},this),cl(n,"load error",function(){dr(n)}),this.attr("href",n.src=t,Dp)}};var BT;BT=function(t,e,n){return t!=="fill"&&t!=="stroke"||w_t.test(e)&&(e=n.root().defs().image(e)),e instanceof C_&&(e=n.root().defs().pattern(0,0,i=>{i.add(e)})),e},qU.push(BT),Zt({Container:{image:Nn(function(t,e){return this.put(new C_).size(0,0).load(t,e)})}}),yn(C_,"Image");class Yc extends Md{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(Rl).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 P_t=Yc;var US=Object.freeze({__proto__:null,MorphArray:P_t,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 Uu=class extends Xo{constructor(t,e=t){super(Bn("line",t),e)}array(){return new Yc([[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 Yc(t).toLine(),this.attr(t))}size(t,e){const n=Op(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}};At(Uu,US),Zt({Container:{line:Nn(function(...t){return Uu.prototype.plot.apply(this.put(new Uu),t[0]!=null?t:[0,0,0,0])})}}),yn(Uu,"Line");let x_=class extends Ji{constructor(t,e=t){super(Bn("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 Xh(t,e){return function(n){return n==null?this[t]:(this[t]=n,e&&e.call(this),this)}}Zt({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:Nn(function(t,e,n){return this.put(new x_).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 x_?arguments[1]:this.defs().marker(e,n,i),this.attr(s,t)}}}),yn(x_,"Marker");const I_t={"-":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 jS{done(){return!1}}class Hx extends jS{constructor(e=S_t){super(),this.ease=I_t[e]||e}step(e,n,i){return typeof e!="number"?i<1?e:n:e+(n-e)*this.ease(i)}}class Qy extends jS{constructor(e){super(),this.stepper=e}done(e){return e.done}step(e,n,i,s){return this.stepper(e,n,i,s)}}function zT(){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 Qy{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:Xh("_duration",zT),overshoot:Xh("_overshoot",zT)});At(class extends Qy{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:Xh("_windup"),p:Xh("P"),i:Xh("I"),d:Xh("D")});const L_t={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Ux={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]]}},q3="mlhvqtcsaz".split("");for(let t=0,e=q3.length;t<e;++t)Ux[q3[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 Ux[n](i,s,o)}}(q3[t].toUpperCase());function jx(t){return t.segment.length&&t.segment.length-1===L_t[t.segment[0].toUpperCase()]}function O_t(t,e){t.inNumber&&Mu(t,!1);const n=NS.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 Mu(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,jx(t)&&Wx(t)}function Wx(t){t.inSegment=!1,t.absolute&&(t.segment=function(e){const n=e.segment[0];return Ux[n](e.segment.slice(1),e.p,e.p0)}(t)),t.segments.push(t.segment)}function D_t(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 R_t(t){return t.lastToken.toUpperCase()==="E"}const V_t=new Set([" ",","," ",` | |
| 143 | +`,"\r","\f"]);class Dr extends Md{bbox(){return _c().path.setAttribute("d",this.toString()),new Ws(_c.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||!O_t(r,o))if(o!==".")if(isNaN(parseInt(o)))if(V_t.has(o))r.inNumber&&Mu(r,!1);else if(o!=="-"&&o!=="+")if(o.toUpperCase()!=="E"){if(NS.test(o)){if(r.inNumber)Mu(r,!1);else{if(!jx(r))throw new Error("parser Error");Wx(r)}--s}}else r.number+=o,r.hasExponent=!0;else{if(r.inNumber&&!R_t(r)){Mu(r,!1),--s;continue}r.number+=o,r.inNumber=!0}else{if(r.number==="0"||D_t(r)){r.inNumber=!0,r.number=o,Mu(r,!0);continue}r.inNumber=!0,r.number+=o}else{if(r.pointSeen||r.hasExponent){Mu(r,!1),--s;continue}r.inNumber=!0,r.pointSeen=!0,r.number+=o}return r.inNumber&&Mu(r,!1),r.inSegment&&jx(r)&&Wx(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 sj=t=>{const e=typeof t;return e==="number"?Ht:e==="string"?Ln.isColor(t)?Ln:Rl.test(t)?NS.test(t)?Dr:Md:HU.test(t)?Ht:Yx:qx.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Md:e==="object"?y1:Yx};class Tu{constructor(e){this._stepper=e||new Hx("-"),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(sj(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===y1&&(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 Yx{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 wv{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,wv.defaults,e),this}toArray(){const e=this;return[e.scaleX,e.scaleY,e.shear,e.rotate,e.translateX,e.translateY,e.originX,e.originY]}}wv.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const F_t=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class y1{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=sj(e[i]),o=new s(e[i]).toArray();n.push([i,s,o.length,...o])}return n.sort(F_t),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 qx=[Yx,wv,y1];class bf extends Xo{constructor(e,n=e){super(Bn("path",e),n)}array(){return this._array||(this._array=new Dr(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 Dr(e))}size(e,n){const i=Op(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)}}bf.prototype.MorphArray=Dr,Zt({Container:{path:Nn(function(t){return this.put(new bf).plot(t||new Dr)})}}),yn(bf,"Path");var ij=Object.freeze({__proto__:null,array:function(){return this._array||(this._array=new Yc(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 Yc(t))},size:function(t,e){const n=Op(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}});class ju extends Xo{constructor(e,n=e){super(Bn("polygon",e),n)}}Zt({Container:{polygon:Nn(function(t){return this.put(new ju).plot(t||new Yc)})}}),At(ju,US),At(ju,ij),yn(ju,"Polygon");class Wu extends Xo{constructor(e,n=e){super(Bn("polyline",e),n)}}Zt({Container:{polyline:Nn(function(t){return this.put(new Wu).plot(t||new Yc)})}}),At(Wu,US),At(Wu,ij),yn(Wu,"Polyline");class S_ extends Xo{constructor(e,n=e){super(Bn("rect",e),n)}}At(S_,{rx:zS,ry:HS}),Zt({Container:{rect:Nn(function(t,e){return this.put(new S_).size(t,e)})}}),yn(S_,"Rect");class G3{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 G3,timeouts:new G3,immediates:new G3,timer:()=>vn.window.performance||vn.window.Date,transforms:[],frame(t){const e=Tn.frames.push({run:t});return Tn.nextDraw===null&&(Tn.nextDraw=vn.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=vn.window.requestAnimationFrame(Tn._draw)),i},immediate(t){const e=Tn.immediates.push(t);return Tn.nextDraw===null&&(Tn.nextDraw=vn.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()?vn.window.requestAnimationFrame(Tn._draw):null}},N_t=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},B_t=function(){const t=vn.window;return(t.performance||t.Date).now()};class oj extends bv{constructor(e=B_t){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(N_t);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)}}Zt({Element:{timeline:function(t){return t==null?(this._timeline=this._timeline||new oj,this._timeline):(this._timeline=t,this)}}});class No extends bv{constructor(e){super(),this.id=No.id++,e=typeof(e=e??Y3)=="function"?new Qy(e):e,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration=typeof e=="number"&&e,this._isDeclarative=e instanceof Qy,this._stepper=this._isDeclarative?e:new Hx,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??$_t,i=i||"last",typeof(e=e??Y3)!="object"||e instanceof jS||(n=e.delay??n,i=e.when??i,o=e.swing||o,s=e.times??s,r=e.wait??r,e=e.duration??Y3),{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=No.sanitise(e,n,i),o=new No(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 Hx(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||NT,runner:n||NT,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 oj||(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}}No.id=0;class eb{constructor(e=new ln,n=-1,i=!0){this.transforms=e,this.id=n,this.done=i}clearTransformsFromQueue(){}}At([No,eb],{mergeWith(t){return new eb(t.transforms.lmultiply(this.transforms),t.id)}});const rj=(t,e)=>t.lmultiplyO(e),aj=t=>t.transforms;function z_t(){const t=this._transformationRunners.runners.map(aj).reduce(rj,new ln);this.transform(t),this._transformationRunners.merge(),this._transformationRunners.length()===1&&(this._frameId=null)}class H_t{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 eb).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}}Zt({Element:{animate(t,e,n){const i=No.sanitise(t,e,n),s=this.timeline();return new No(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(aj).reduce(rj,new ln)},_addRunner(t){this._transformationRunners.add(t),Tn.cancelImmediate(this._frameId),this._frameId=Tn.immediate(z_t.bind(this))},_prepareRunner(){this._frameId==null&&(this._transformationRunners=new H_t().add(new eb(new ln(this))))}}});At(No,{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 Tu(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 y1(s.from()).valueOf();Object.assign(h,d),s.from(h)}const u=new y1(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 Tu(this._stepper).to(new Ht(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 Tu(this._stepper).type(n?wv:ln);let o,r,a,l,c;return this.queue(function(){r=r||this.element(),o=o||Bx(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),S=C.indexOf($);f.rotate=k[S]}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=Bx(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 Ht(e),this._tryRetarget(t,e))return this;const n=new Tu(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 Ht(s))}),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new Tu(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 Ht(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 Tu(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(No,{rx:zS,ry:HS,from:tj,to:nj}),yn(No,"Runner");class Gx extends Ji{constructor(e,n=e){super(Bn("svg",e),n),this.namespace()}defs(){return this.isRoot()?sr(this.node.querySelector("defs"))||this.put(new K2):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof vn.window.SVGElement)&&this.node.parentNode.nodeName!=="#document-fragment"}namespace(){return this.isRoot()?this.attr({xmlns:RS,version:"1.1"}).attr("xmlns:xlink",Dp,U3):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,U3).attr("xmlns:svgjs",null,U3)}root(){return this.isRoot()?this:super.root()}}Zt({Container:{nested:Nn(function(){return this.put(new Gx)})}}),yn(Gx,"Svg",!0);let Xx=class extends Ji{constructor(t,e=t){super(Bn("symbol",t),e)}};Zt({Container:{symbol:Nn(function(){return this.put(new Xx)})}}),yn(Xx,"Symbol");var lj=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(vn.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 Rr extends Xo{constructor(e,n=e){super(Bn("text",e),n),this.dom.leading=this.dom.leading??new Ht(1.3),this._rebuild=!0,this._build=!1}leading(e){return e==null?this.dom.leading:(this.dom.leading=new Ht(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(zx(this.node))return;const r=vn.window.getComputedStyle(this.node).getPropertyValue("font-size"),a=s*new Ht(r);this.dom.newLined&&(this.attr("x",n.attr("x")),this.text()===` | |
| 144 | +`?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 Ht(e.leading||1.3),this}writeDataToDom(){return NU(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"||zx(n[s])?s===0&&(i=s+1):(s!==i&&n[s].nodeType!==3&&sr(n[s]).dom.newLined===!0&&(e+=` | |
| 145 | +`),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(` | |
| 146 | +`)).length;n<i;n++)this.newLine(e[n]);return this.build(!1).rebuild()}}At(Rr,lj),Zt({Container:{text:Nn(function(t=""){return this.put(new Rr).text(t)}),plain:Nn(function(t=""){return this.put(new Rr).plain(t)})}}),yn(Rr,"Text");class $_ extends Xo{constructor(e,n=e){super(Bn("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 Rr))return this;const n=e.index(this),i=vn.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=e.dom.leading*new Ht(i);return this.dy(n?s:0).attr("x",e.x())}text(e){return e==null?this.node.textContent+(this.dom.newLined?` | |
| 147 | +`:""):(typeof e=="function"?(this.clear().build(!0),e.call(this,this),this.build(!1)):this.plain(e),this)}}At($_,lj),Zt({Tspan:{tspan:Nn(function(t=""){const e=new $_;return this._build||this.clear(),this.put(e).text(t)})},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),yn($_,"Tspan");class X3 extends Xo{constructor(e,n=e){super(Bn("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 Ht(e).divide(2))}}At(X3,{x:GU,y:XU,cx:KU,cy:ZU,width:JU,height:QU}),Zt({Container:{circle:Nn(function(t=0){return this.put(new X3).size(t).move(0,0)})}}),yn(X3,"Circle");class K3 extends Ji{constructor(e,n=e){super(Bn("clipPath",e),n)}remove(){return this.targets().forEach(function(e){e.unclip()}),super.remove()}targets(){return eh("svg [clip-path*="+this.id()+"]")}}Zt({Container:{clip:Nn(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)}}}),yn(K3,"ClipPath");class HT extends pi{constructor(e,n=e){super(Bn("foreignObject",e),n)}}Zt({Container:{foreignObject:Nn(function(t,e){return this.put(new HT).size(t,e)})}}),yn(HT,"ForeignObject");var cj=Object.freeze({__proto__:null,dmove:function(t,e){return this.children().forEach(n=>{let i;try{i=n.node instanceof yv().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=Op(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 Oc extends Ji{constructor(e,n=e){super(Bn("g",e),n)}}At(Oc,cj),Zt({Container:{group:Nn(function(){return this.put(new Oc)})}}),yn(Oc,"G");class g0 extends Ji{constructor(e,n=e){super(Bn("a",e),n)}target(e){return this.attr("target",e)}to(e){return this.attr("href",e,Dp)}}At(g0,cj),Zt({Container:{link:Nn(function(t){return this.put(new g0).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 g0,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}}}),yn(g0,"A");class Z3 extends Ji{constructor(e,n=e){super(Bn("mask",e),n)}remove(){return this.targets().forEach(function(e){e.unmask()}),super.remove()}targets(){return eh("svg [mask*="+this.id()+"]")}}Zt({Container:{mask:Nn(function(){return this.defs().put(new Z3)})},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof Z3?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),yn(Z3,"Mask");class UT extends pi{constructor(e,n=e){super(Bn("stop",e),n)}update(e){return(typeof e=="number"||e instanceof Ht)&&(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 Ht(e.offset)),this}}Zt({Gradient:{stop:function(t,e,n){return this.put(new UT).update(t,e,n)}}}),yn(UT,"Stop");class J3 extends pi{constructor(e,n=e){super(Bn("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))}}Zt("Dom",{style(t,e){return this.put(new J3).rule(t,e)},fontface(t,e,n){return this.put(new J3).font(t,e,n)}}),yn(J3,"Style");class Q3 extends Rr{constructor(e,n=e){super(Bn("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")}}Zt({Container:{textPath:Nn(function(t,e){return t instanceof Rr||(t=this.text(t)),t.path(e)})},Text:{path:Nn(function(t,e=!0){const n=new Q3;let i;if(t instanceof bf||(t=this.defs().path(t)),n.attr("href","#"+t,Dp),e)for(;i=this.node.firstChild;)n.node.appendChild(i);return this.put(n)}),textPath(){return this.findOne("textPath")}},Path:{text:Nn(function(t){return t instanceof Rr||(t=new Rr().addTo(this.parent()).text(t)),t.path(this)}),targets(){return eh("svg textPath").filter(t=>(t.attr("href")||"").includes(this.id()))}}}),Q3.prototype.MorphArray=Dr,yn(Q3,"TextPath");class jT extends Xo{constructor(e,n=e){super(Bn("use",e),n)}use(e,n){return this.attr("href",(n||"")+"#"+e,Dp)}}Zt({Container:{use:Nn(function(t,e){return this.put(new jT).use(t,e)})}}),yn(jT,"Use");const U_t=Ui;At([Gx,Xx,C_,_1,x_],to("viewbox")),At([Uu,Wu,ju,bf],to("marker")),At(Rr,to("Text")),At(bf,to("Path")),At(K2,to("Defs")),At([Rr,$_],to("Tspan")),At([S_,k_,vg,No],to("radius")),At(bv,to("EventTarget")),At(Wc,to("Dom")),At(pi,to("Element")),At(Xo,to("Shape")),At([Ji,ej],to("Container")),At(vg,to("Gradient")),At(No,to("Runner")),Ed.extend([...new Set(VU)]),function(t=[]){qx.push(...[].concat(t))}([Ht,Ln,Ws,ln,Md,Yc,Dr,Dn]),At(qx,{to(t){return new Tu().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 Xn extends pi{constructor(e){super(Bn("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 eh('svg [filter*="'+this.id()+'"]')}toString(){return"url(#"+this.id()+")"}}class WS extends pi{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 Jo=t=>function(...e){for(let n=t.length;n--;)e[n]!=null&&this.attr(t[n],e[n])},j_t={blend:Jo(["in","in2","mode"]),colorMatrix:Jo(["type","values"]),composite:Jo(["in","in2","operator"]),convolveMatrix:function(t){t=new Md(t).toString(),this.attr({order:Math.sqrt(t.split(" ").length),kernelMatrix:t})},diffuseLighting:Jo(["surfaceScale","lightingColor","diffuseConstant","kernelUnitLength"]),displacementMap:Jo(["in","in2","scale","xChannelSelector","yChannelSelector"]),dropShadow:Jo(["in","dx","dy","stdDeviation"]),flood:Jo(["flood-color","flood-opacity"]),gaussianBlur:function(t=0,e=t){this.attr("stdDeviation",t+" "+e)},image:function(t){this.attr("href",t,Dp)},morphology:Jo(["operator","radius"]),offset:Jo(["dx","dy"]),specularLighting:Jo(["surfaceScale","lightingColor","diffuseConstant","specularExponent","kernelUnitLength"]),tile:Jo([]),turbulence:Jo(["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=Lp(t),n=j_t[t];Xn[e+"Effect"]=class extends WS{constructor(i){super(Bn("fe"+e,i),i)}update(i){return n.apply(this,i),this}},Xn.prototype[t]=Nn(function(i,...s){const o=new Xn[e+"Effect"];return i==null?this.put(o):(typeof i=="function"?i.call(o,o):s.unshift(i),this.put(o).update(s))})}),At(Xn,{merge(t){const e=this.put(new Xn.MergeEffect);return typeof t=="function"?(t.call(e,e),e):((t instanceof Array?t:[...arguments]).forEach(n=>{n instanceof Xn.MergeNode?e.put(n):e.mergeNode(n)}),e)},componentTransfer(t={}){const e=this.put(new Xn.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 Xn["Func"+n.toUpperCase()](t[n]));return e}});["distantLight","pointLight","spotLight","mergeNode","FuncR","FuncG","FuncB","FuncA"].forEach(t=>{const e=Lp(t);Xn[e]=class extends WS{constructor(n){super(Bn("fe"+e,n),n)}}});["funcR","funcG","funcB","funcA"].forEach(function(t){const e=Xn[Lp(t)],n=Nn(function(){return this.put(new e)});Xn.ComponentTransferEffect.prototype[t]=n});["distantLight","pointLight","spotLight"].forEach(t=>{const e=Xn[Lp(t)],n=Nn(function(){return this.put(new e)});Xn.DiffuseLightingEffect.prototype[t]=n,Xn.SpecularLightingEffect.prototype[t]=n}),At(Xn.MergeEffect,{mergeNode(t){return this.put(new Xn.MergeNode).attr("in",t)}}),At(K2,{filter:function(t){const e=this.put(new Xn);return typeof t=="function"&&t.call(e,e),e}}),At(Ji,{filter:function(t){return this.defs().filter(t)}}),At(pi,{filterWith:function(t){const e=t instanceof Xn?t:this.defs().filter(t);return this.attr("filter",e)},unfilter:function(t){return this.attr("filter",null)},filterer(){return this.reference("filter")}});const W_t={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(WS,W_t),At(Xn.MergeEffect,{in:function(t){return t instanceof Xn.MergeNode?this.add(t,0):this.add(new Xn.MergeNode().in(t),0),this}}),At([Xn.CompositeEffect,Xn.BlendEffect,Xn.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)}}),Xn.filter={sepiatone:[.343,.669,.119,0,0,.249,.626,.13,0,0,.172,.334,.111,0,0,0,0,0,1,0]};var ci=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 Xn().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:` | |
| 147 | 148 | `.concat(u,` 0 0 0 0 |
| 148 | 149 | 0 `).concat(u,` 0 0 0 |
| 149 | 150 | 0 0 `).concat(u,` 0 0 |
| 150 | 151 | 0 0 0 1 0 |
| 151 | - `),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((i=e.filterer())===null||i===void 0?void 0:i.node)}else this.getDefaultFilter(e,n)}},{key:"addShadow",value:function(e,n,s,i){var o,r=this.w,a=s.blur,l=s.top,c=s.left,u=s.color,d=s.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:i,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",i])}},{key:"dropShadow",value:function(e,n){var s,i,o,r,a,l=this,c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,u=this.w;return e.unfilter(!0),ue.isMsEdge()&&u.config.chart.type==="radialBar"||((s=u.config.chart.dropShadow.enabledOnSeries)===null||s===void 0?void 0:s.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((i=e.filterer())===null||i===void 0?void 0:i.node),e)}},{key:"setSelectionFilter",value:function(e,n,s){var i=this.w;if(i.globals.selectedDataPoints[n]!==void 0&&i.globals.selectedDataPoints[n].indexOf(s)>-1){e.node.setAttribute("selected",!0);var o=i.config.states.active.filter;o!=="none"&&this.applyFilter(e,n,o.type)}}},{key:"_scaleFilterSize",value:function(e){e&&function(n){for(var s in n)n.hasOwnProperty(s)&&e.setAttribute(s,n[s])}({width:"200%",height:"200%",x:"-50%",y:"-50%"})}}]),t}(),Ve=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"roundPathCorners",value:function(e,n){function s(P,I,L){var V=I.x-P.x,D=I.y-P.y,z=Math.sqrt(V*V+D*D);return i(P,I,Math.min(1,L/z))}function i(P,I,L){return{x:P.x+(I.x-P.x)*L,y:P.y+(I.y-P.y)*L}}function o(P,I){P.length>2&&(P[P.length-2]=I.x,P[P.length-1]=I.y)}function r(P){return{x:parseFloat(P[P.length-2]),y:parseFloat(P[P.length-1])}}e.indexOf("NaN")>-1&&(e="");var a=e.split(/[,\s]/).reduce(function(P,I){var L=I.match("([a-zA-Z])(.+)");return L?(P.push(L[1]),P.push(L[2])):P.push(I),P},[]).reduce(function(P,I){return parseFloat(I)==I&&P.length?P[P.length-1].push(I):P.push([I]),P},[]),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,b,y=r(h),C=r(f),k=r(p);m=s(C,y,n),b=s(C,k,n),o(f,m),f.origPoint=C,l.push(f);var x=i(m,C,.5),S=i(C,b,.5),E=["C",x.x,x.y,S.x,S.y,b.x,b.y];E.origPoint=C,l.push(E)}else l.push(f)}if(u){var T=r(l[l.length-1]);l.push(["Z"]),o(l[0],T)}}else l=a;return l.reduce(function(P,I){return P+I.join(" ")+" "},"")}},{key:"drawLine",value:function(e,n,s,i){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:s,y2:i,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,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=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:s>0?s:0,height:i>0?i: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",s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"none";return this.w.globals.dom.Paper.polygon(e).attr({fill:i,stroke:n,"stroke-width":s})}},{key:"drawCircle",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;e<0&&(e=0);var s=this.w.globals.dom.Paper.circle(2*e);return n!==null&&s.attr(n),s}},{key:"drawPath",value:function(e){var n=e.d,s=n===void 0?"":n,i=e.stroke,o=i===void 0?"#a8a8a8":i,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,b=e.strokeDashArray,y=b===void 0?0:b,C=this.w;return m===null&&(m=C.config.stroke.lineCap),(s.indexOf("undefined")>-1||s.indexOf("NaN")>-1)&&(s="M 0 ".concat(C.globals.gridHeight)),C.globals.dom.Paper.path(s).attr({fill:l,"fill-opacity":u,stroke:o,"stroke-opacity":h,"stroke-linecap":m,"stroke-width":a,"stroke-dasharray":y,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 s=["M",e,n].join(" ");return s}},{key:"line",value:function(e,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=null;return s===null?i=[" L",e,n].join(" "):s==="H"?i=[" H",e].join(" "):s==="V"&&(i=[" V",n].join(" ")),i}},{key:"curve",value:function(e,n,s,i,o,r){var a=["C",e,n,s,i,o,r].join(" ");return a}},{key:"quadraticCurve",value:function(e,n,s,i){return["Q",e,n,s,i].join(" ")}},{key:"arc",value:function(e,n,s,i,o,r,a){var l="A";arguments.length>7&&arguments[7]!==void 0&&arguments[7]&&(l="a");var c=[l,e,n,s,i,o,r,a].join(" ");return c}},{key:"renderPaths",value:function(e){var n,s=e.j,i=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,b=e.shouldClipToGrid,y=b===void 0||b,C=e.bindEventsOnPaths,k=C===void 0||C,x=e.drawShadow,S=x===void 0||x,E=this.w,T=new Ws(this.ctx),P=new sp(this.ctx),I=this.w.config.chart.animations.enabled,L=I&&this.w.config.chart.animations.dynamicAnimation.enabled,V=!!(I&&!E.globals.resized||L&&E.globals.dataChanged&&E.globals.shouldAnimate);V?n=o:(n=r,E.globals.animationEnded=!0);var D=E.config.stroke.dashArray,z=0;z=Array.isArray(D)?D[i]:E.config.stroke.dashArray;var Y=this.drawPath({d:n,stroke:a,strokeWidth:l,fill:u,fillOpacity:1,classes:p,strokeLinecap:c,strokeDashArray:z});Y.attr("index",i),y&&(m==="bar"&&!E.globals.isHorizontal||E.globals.comboCharts?Y.attr({"clip-path":"url(#gridRectBarMask".concat(E.globals.cuid,")")}):Y.attr({"clip-path":"url(#gridRectMask".concat(E.globals.cuid,")")})),E.config.chart.dropShadow.enabled&&S&&T.dropShadow(Y,E.config.chart.dropShadow,i),k&&(Y.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,Y)),Y.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,Y)),Y.node.addEventListener("mousedown",this.pathMouseDown.bind(this,Y))),Y.attr({pathTo:r,pathFrom:o});var B={el:Y,j:s,realIndex:i,pathFrom:o,pathTo:r,fill:u,strokeWidth:l,delay:d};return!I||E.globals.resized||E.globals.dataChanged?!E.globals.resized&&E.globals.dataChanged||P.showDelayedElements():P.animatePathsGradually(Je(Je({},B),{},{speed:h})),E.globals.dataChanged&&L&&V&&P.animatePathsGradually(Je(Je({},B),{},{speed:f})),Y}},{key:"drawPattern",value:function(e,n,s){var i=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,s,function(r){e==="horizontalLines"?r.line(0,0,s,0).stroke({color:i,width:o+1}):e==="verticalLines"?r.line(0,0,0,n).stroke({color:i,width:o+1}):e==="slantedLines"?r.line(0,0,n,s).stroke({color:i,width:o}):e==="squares"?r.rect(n,s).fill("none").stroke({color:i,width:o}):e==="circles"&&r.circle(n).fill("none").stroke({color:i,width:o})})}},{key:"drawGradient",value:function(e,n,s,i,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=ue.hexToRgba(n,i)),s.length<9&&s.indexOf("#")===0&&(s=ue.hexToRgba(s,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 b=!(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(b?"radial":"linear",function(k){(Array.isArray(c[u])?c[u]:c).forEach(function(x){k.stop(x.offset/100,x.color,x.opacity)})}):d.globals.dom.Paper.gradient(b?"radial":"linear",function(k){k.stop(h,n,i),k.stop(f,s,o),k.stop(p,s,o),m!==null&&k.stop(m,n,i)}),b){var y=d.globals.gridWidth/2,C=d.globals.gridHeight/2;d.config.chart.type!=="bubble"?r.attr({gradientUnits:"userSpaceOnUse",cx:y,cy:C,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,s=e.maxWidth,i=e.fontSize,o=e.fontFamily,r=this.getTextRects(n,i,o),a=r.width/n.length,l=Math.floor(s/a);return s<r.width?n.slice(0,l-3)+"...":n}},{key:"drawText",value:function(e){var n=this,s=e.x,i=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,b=m===void 0||m,y=e.dominantBaseline,C=y===void 0?"auto":y,k=this.w;o===void 0&&(o="");var x=o;r||(r="start"),u&&u.length||(u=k.config.chart.foreColor),l=l||k.config.chart.fontFamily,c=c||"regular";var S,E={maxWidth:h,fontSize:a=a||"11px",fontFamily:l};return Array.isArray(o)?S=k.globals.dom.Paper.text(function(T){for(var P=0;P<o.length;P++)x=o[P],h&&(x=n.getTextBasedOnMaxWidth(Je({text:o[P]},E))),P===0?T.tspan(x):T.tspan(x).newLine()}):(h&&(x=this.getTextBasedOnMaxWidth(Je({text:o},E))),S=b?k.globals.dom.Paper.plain(o):k.globals.dom.Paper.text(function(T){return T.tspan(x)})),S.attr({x:s,y:i,"text-anchor":r,"dominant-baseline":C,"font-size":a,"font-family":l,"font-weight":c,fill:u,class:"apexcharts-text "+p}),S.node.style.fontFamily=l,S.node.style.opacity=d,S}},{key:"getMarkerPath",value:function(e,n,s,i){var o="";switch(s){case"cross":o="M ".concat(e-(i/=1.4)," ").concat(n-i," L ").concat(e+i," ").concat(n+i," M ").concat(e-i," ").concat(n+i," L ").concat(e+i," ").concat(n-i);break;case"plus":o="M ".concat(e-(i/=1.12)," ").concat(n," L ").concat(e+i," ").concat(n," M ").concat(e," ").concat(n-i," L ").concat(e," ").concat(n+i);break;case"star":case"sparkle":var r=5;i*=1.15,s==="sparkle"&&(i/=1.1,r=4);for(var a=Math.PI/r,l=0;l<=2*r;l++){var c=l*a,u=l%2==0?i:i/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-i,` | |
| 152 | - L `).concat(e+i," ").concat(n+i,` | |
| 153 | - L `).concat(e-i," ").concat(n+i,` | |
| 154 | - Z`);break;case"square":case"rect":o="M ".concat(e-(i/=1.125)," ").concat(n-i,` | |
| 155 | - L `).concat(e+i," ").concat(n-i,` | |
| 156 | - L `).concat(e+i," ").concat(n+i,` | |
| 157 | - L `).concat(e-i," ").concat(n+i,` | |
| 158 | - Z`);break;case"diamond":i*=1.05,o="M ".concat(e," ").concat(n-i,` | |
| 159 | - L `).concat(e+i," ").concat(n,` | |
| 160 | - L `).concat(e," ").concat(n+i,` | |
| 161 | - L `).concat(e-i," ").concat(n,` | |
| 162 | - Z`);break;case"line":o="M ".concat(e-(i/=1.1)," ").concat(n,` | |
| 163 | - L `).concat(e+i," ").concat(n);break;default:i*=2,o="M ".concat(e,", ").concat(n,` | |
| 164 | - m -`).concat(i/2,`, 0 | |
| 165 | - a `).concat(i/2,",").concat(i/2," 0 1,0 ").concat(i,`,0 | |
| 166 | - a `).concat(i/2,",").concat(i/2," 0 1,0 -").concat(i,",0")}return o}},{key:"drawMarkerShape",value:function(e,n,s,i,o){var r=this.drawPath({d:this.getMarkerPath(e,n,s,i,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,s){e=e||0;var i=s.pSize||0;return ue.isNumber(n)||(i=0,n=0),this.drawMarkerShape(e,n,s==null?void 0:s.shape,i,Je(Je({},s),s.shape==="line"||s.shape==="plus"||s.shape==="cross"?{pointStrokeColor:s.pointFillColor,pointStrokeOpacity:s.pointFillOpacity}:{}))}},{key:"pathMouseEnter",value:function(e,n){var s=this.w,i=new Ws(this.ctx),o=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10);if(typeof s.config.chart.events.dataPointMouseEnter=="function"&&s.config.chart.events.dataPointMouseEnter(n,this.ctx,{seriesIndex:o,dataPointIndex:r,w:s}),this.ctx.events.fireEvent("dataPointMouseEnter",[n,this.ctx,{seriesIndex:o,dataPointIndex:r,w:s}]),(s.config.states.active.filter.type==="none"||e.node.getAttribute("selected")!=="true")&&s.config.states.hover.filter.type!=="none"&&!s.globals.isTouchDevice){var a=s.config.states.hover.filter;i.applyFilter(e,o,a.type)}}},{key:"pathMouseLeave",value:function(e,n){var s=this.w,i=new Ws(this.ctx),o=parseInt(e.node.getAttribute("index"),10),r=parseInt(e.node.getAttribute("j"),10);typeof s.config.chart.events.dataPointMouseLeave=="function"&&s.config.chart.events.dataPointMouseLeave(n,this.ctx,{seriesIndex:o,dataPointIndex:r,w:s}),this.ctx.events.fireEvent("dataPointMouseLeave",[n,this.ctx,{seriesIndex:o,dataPointIndex:r,w:s}]),s.config.states.active.filter.type!=="none"&&e.node.getAttribute("selected")==="true"||s.config.states.hover.filter.type!=="none"&&i.getDefaultFilter(e,o)}},{key:"pathMouseDown",value:function(e,n){var s=this.w,i=new Ws(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"),s.globals.selectedDataPoints[o].indexOf(r)>-1){var l=s.globals.selectedDataPoints[o].indexOf(r);s.globals.selectedDataPoints[o].splice(l,1)}}else{if(!s.config.states.active.allowMultipleDataPointsSelection&&s.globals.selectedDataPoints.length>0){s.globals.selectedDataPoints=[];var c=s.globals.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),u=s.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"),i.getDefaultFilter(m,o)})};d(c),d(u)}e.node.setAttribute("selected","true"),a="true",s.globals.selectedDataPoints[o]===void 0&&(s.globals.selectedDataPoints[o]=[]),s.globals.selectedDataPoints[o].push(r)}if(a==="true"){var h=s.config.states.active.filter;if(h!=="none")i.applyFilter(e,o,h.type);else if(s.config.states.hover.filter!=="none"&&!s.globals.isTouchDevice){var f=s.config.states.hover.filter;i.applyFilter(e,o,f.type)}}else s.config.states.active.filter.type!=="none"&&(s.config.states.hover.filter.type==="none"||s.globals.isTouchDevice?i.getDefaultFilter(e,o):(f=s.config.states.hover.filter,i.applyFilter(e,o,f.type)));typeof s.config.chart.events.dataPointSelection=="function"&&s.config.chart.events.dataPointSelection(n,this.ctx,{selectedDataPoints:s.globals.selectedDataPoints,seriesIndex:o,dataPointIndex:r,w:s}),n&&this.ctx.events.fireEvent("dataPointSelection",[n,this.ctx,{selectedDataPoints:s.globals.selectedDataPoints,seriesIndex:o,dataPointIndex:r,w:s}])}},{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,s,i){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:s,foreColor:"#fff",opacity:0});i&&a.attr("transform",i),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,s){if(typeof e.getComputedTextLength=="function"&&(e.textContent=n,n.length>0&&e.getComputedTextLength()>=s/1.1)){for(var i=n.length-3;i>0;i-=3)if(e.getSubStringLength(0,i)<=s/1.1)return void(e.textContent=n.substring(0,i)+"...");e.textContent="."}}}],[{key:"setAttrs",value:function(e,n){for(var s in n)n.hasOwnProperty(s)&&e.setAttribute(s,n[s])}}]),t}(),rs=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"getStackedSeriesTotals",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],n=this.w,s=[];if(n.globals.series.length===0)return s;for(var i=0;i<n.globals.series[n.globals.maxValsInArrayIndex].length;i++){for(var o=0,r=0;r<n.globals.series.length;r++)n.globals.series[r][i]!==void 0&&e.indexOf(r)===-1&&(o+=n.globals.series[r][i]);s.push(o)}return s}},{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,s){return n+s},0):this.w.globals.series[e].reduce(function(n,s){return n+s},0)}},{key:"getStackedSeriesTotalsByGroups",value:function(){var e=this,n=this.w,s=[];return n.globals.seriesGroups.forEach(function(i){var o=[];n.config.series.forEach(function(a,l){i.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});s.push(e.getStackedSeriesTotals(r))}),s}},{key:"setSeriesYAxisMappings",value:function(){var e=this.w.globals,n=this.w.config,s=[],i=[],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),i.push(null)}),n.yaxis.forEach(function(d,h){s[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(b,y){if(b.name===m){var C=y;h===y||r?!r||o.indexOf(y)>-1?s[h].push([h,y]):console.warn("Series '"+b.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."):(s[y].push([y,h]),C=h),f=!0,(C=o.indexOf(C))!==-1&&o.splice(C,1)}})})}f||a.push(h)}),s=s.map(function(d,h){var f=[];return d.forEach(function(p){i[p[1]]=p[0],f.push(p[1])}),f});for(var l=n.yaxis.length-1,c=0;c<a.length&&(l=a[c],s[l]=[],o);c++){var u=o[0];o.shift(),s[l].push(u),i[u]=l}o.forEach(function(d){s[l].push(d),i[d]=l}),e.seriesYAxisMap=s.map(function(d){return d}),e.seriesYAxisReverseMap=i.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,s,i){return n===i[0]})}},{key:"getCategoryLabels",value:function(e){var n=this.w,s=e.slice();return n.config.xaxis.convertedCatToNumeric&&(s=e.map(function(i,o){return n.config.xaxis.labels.formatter(i-n.globals.minX+1)})),s}},{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(s){n=Math.max(n,s)}),e.config.markers.discrete&&e.config.markers.discrete.length&&e.config.markers.discrete.forEach(function(s){n=Math.max(n,s.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,s){var i=0;if(Array.isArray(n))for(var o=0;o<n.length;o++)i+=n[o];else i+=n;return i})}},{key:"getSeriesTotalsXRange",value:function(e,n){var s=this.w;return s.globals.series.map(function(i,o){for(var r=0,a=0;a<i.length;a++)s.globals.seriesX[o][a]>e&&s.globals.seriesX[o][a]<n&&(r+=i[a]);return r})}},{key:"getPercentSeries",value:function(){var e=this.w;e.globals.seriesPercent=e.globals.series.map(function(n,s){var i=[];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),i.push(a)}else{var l=100*n/e.globals.seriesTotals.reduce(function(c,u){return c+u},0);i.push(l)}return i})}},{key:"getCalculatedRatios",value:function(){var e,n,s,i=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,s=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(b,y){var C=o.config.yaxis[o.globals.seriesYAxisReverseMap[y]],k=b<0?-1:1;return b=Math.abs(b),C.logarithmic&&(b=i.getBaseLog(C.logBase,b)),-k*b/a[y]};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:s,baseLineInvertedY:u,baseLineY:c,baseLineX:d}}},{key:"getLogSeries",value:function(e){var n=this,s=this.w;return s.globals.seriesLog=e.map(function(i,o){var r=s.globals.seriesYAxisReverseMap[o];return s.config.yaxis[r]&&s.config.yaxis[r].logarithmic?i.map(function(a){return a===null?null:n.getLogVal(s.config.yaxis[r].logBase,a,o)}):i}),s.globals.invalidLogScale?e:s.globals.seriesLog}},{key:"getLogValAtSeriesIndex",value:function(e,n){if(e===null)return null;var s=this.w,i=s.globals.seriesYAxisReverseMap[n];return s.config.yaxis[i]&&s.config.yaxis[i].logarithmic?this.getLogVal(s.config.yaxis[i].logBase,e,n):e}},{key:"getBaseLog",value:function(e,n){return Math.log(n)/Math.log(e)}},{key:"getLogVal",value:function(e,n,s){if(n<=0)return 0;var i=this.w,o=i.globals.minYArr[s]===0?-1:this.getBaseLog(e,i.globals.minYArr[s]),r=(i.globals.maxYArr[s]===0?0:this.getBaseLog(e,i.globals.maxYArr[s]))-o;return n<1?n/r:(this.getBaseLog(e,n)-o)/r}},{key:"getLogYRatios",value:function(e){var n=this,s=this.w,i=this.w.globals;return i.yLogRatio=e.slice(),i.logYRange=i.yRange.map(function(o,r){var a=s.globals.seriesYAxisReverseMap[r];if(s.config.yaxis[a]&&n.w.config.yaxis[a].logarithmic){var l,c=-Number.MAX_VALUE,u=Number.MIN_VALUE;return i.seriesLog.forEach(function(d,h){d.forEach(function(f){s.config.yaxis[h]&&s.config.yaxis[h].logarithmic&&(c=Math.max(f,c),u=Math.min(f,u))})}),l=Math.pow(i.yRange[r],Math.abs(u-c)/i.yRange[r]),i.yLogRatio[r]=l/i.gridHeight,l}}),i.invalidLogScale?e.slice():i.yLogRatio}},{key:"drawSeriesByGroup",value:function(e,n,s,i){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(i.draw(l,s,c))}),r}}],[{key:"checkComboSeries",value:function(e,n){var s=!1,i=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"||i++,r.type!==void 0&&r.type!==n&&o++}),o>0&&(s=!0),{comboBarCount:i,comboCharts:s}}},{key:"extendArrayProps",value:function(e,n,s){var i,o,r,a,l,c;return(i=n)!==null&&i!==void 0&&i.yaxis&&(n=e.extendYAxis(n,s)),(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}(),o2=function(){function t(e){at(this,t),this.w=e.w,this.annoCtx=e}return lt(t,[{key:"setOrientations",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,s=this.w;if(e.label.orientation==="vertical"){var i=n!==null?n:0,o=s.globals.dom.baseEl.querySelector(".apexcharts-xaxis-annotations .apexcharts-xaxis-annotation-label[rel='".concat(i,"']"));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 s=this.w;if(!e||!n.label.text||!String(n.label.text).trim())return null;var i=s.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-i.left-a,f=o.top-i.top-c,p=this.annoCtx.graphics.drawRect(h-s.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,s=function(i,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,i);c&&(l.insertBefore(c.node,a),i.label.mouseEnter&&c.node.addEventListener("mouseenter",i.label.mouseEnter.bind(e,i)),i.label.mouseLeave&&c.node.addEventListener("mouseleave",i.label.mouseLeave.bind(e,i)),i.label.click&&c.node.addEventListener("click",i.label.click.bind(e,i)))}};n.config.annotations.xaxis.forEach(function(i,o){return s(i,o,"xaxis")}),n.config.annotations.yaxis.forEach(function(i,o){return s(i,o,"yaxis")}),n.config.annotations.points.forEach(function(i,o){return s(i,o,"point")})}},{key:"getY1Y2",value:function(e,n){var s,i=this.w,o=e==="y1"?n.y:n.y2,r=!1;if(this.annoCtx.invertAxis){var a=i.config.xaxis.convertedCatToNumeric?i.globals.categoryLabels:i.globals.labels,l=a.indexOf(o),c=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis-texts-g text:nth-child(".concat(l+1,")"));s=c?parseFloat(c.getAttribute("y")):(i.globals.gridHeight/a.length-1)*(l+1)-i.globals.barHeight,n.seriesIndex!==void 0&&i.globals.barHeight&&(s-=i.globals.barHeight/2*(i.globals.series.length-1)-i.globals.barHeight*n.seriesIndex)}else{var u,d=i.globals.seriesYAxisMap[n.yAxisIndex][0],h=i.config.yaxis[n.yAxisIndex].logarithmic?new rs(this.annoCtx.ctx).getLogVal(i.config.yaxis[n.yAxisIndex].logBase,o,d)/i.globals.yLogRatio[d]:(o-i.globals.minYArr[d])/(i.globals.yRange[d]/i.globals.gridHeight);s=i.globals.gridHeight-Math.min(Math.max(h,0),i.globals.gridHeight),r=h>i.globals.gridHeight||h<0,!n.marker||n.y!==void 0&&n.y!==null||(s=0),(u=i.config.yaxis[n.yAxisIndex])!==null&&u!==void 0&&u.reversed&&(s=h)}return typeof o=="string"&&o.includes("px")&&(s=parseFloat(o)),{yP:s,clipped:r}}},{key:"getX1X2",value:function(e,n){var s=this.w,i=e==="x1"?n.x:n.x2,o=this.annoCtx.invertAxis?s.globals.minY:s.globals.minX,r=this.annoCtx.invertAxis?s.globals.maxY:s.globals.maxX,a=this.annoCtx.invertAxis?s.globals.yRange[0]:s.globals.xRange,l=!1,c=this.annoCtx.inversedReversedAxis?(r-i)/(a/s.globals.gridWidth):(i-o)/(a/s.globals.gridWidth);return s.config.xaxis.type!=="category"&&!s.config.xaxis.convertedCatToNumeric||this.annoCtx.invertAxis||s.globals.dataFormatXNumeric||s.config.chart.sparkline.enabled||(c=this.getStringX(i)),typeof i=="string"&&i.includes("px")&&(c=parseFloat(i)),i==null&&n.marker&&(c=s.globals.gridWidth),n.seriesIndex!==void 0&&s.globals.barWidth&&!this.annoCtx.invertAxis&&(c-=s.globals.barWidth/2*(s.globals.series.length-1)-s.globals.barWidth*n.seriesIndex),c>s.globals.gridWidth?(c=s.globals.gridWidth,l=!0):c<0&&(c=0,l=!0),{x:c,clipped:l}}},{key:"getStringX",value:function(e){var n=this.w,s=e;n.config.xaxis.convertedCatToNumeric&&n.globals.categoryLabels.length&&(e=n.globals.categoryLabels.indexOf(e)+1);var i=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(i+1,")"));return o&&(s=parseFloat(o.getAttribute("x"))),s}}]),t}(),$1t=function(){function t(e){at(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new o2(this.annoCtx)}return lt(t,[{key:"addXaxisAnnotation",value:function(e,n,s){var i,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(ue.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(i=f.x,c=f.clipped,!l||!c){if(i<a){var p=a;a=i,i=p}var m=this.annoCtx.graphics.drawRect(a+e.offsetX,0+e.offsetY,i-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 b=this.annoCtx.graphics.getTextRects(u,parseFloat(e.label.style.fontSize)),y=e.label.position==="top"?4:e.label.position==="center"?o.globals.gridHeight/2+(e.label.orientation==="vertical"?b.width/2:0):o.globals.gridHeight,C=this.annoCtx.graphics.drawText({x:a+e.label.offsetX,y:y+e.label.offsetY-(e.label.orientation==="vertical"?e.label.position==="top"?b.width/2-12:-b.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:"")});C.attr({rel:s}),n.appendChild(C.node),this.annoCtx.helpers.setOrientations(e,s)}}}},{key:"drawXAxisAnnotations",value:function(){var e=this,n=this.w,s=this.annoCtx.graphics.group({class:"apexcharts-xaxis-annotations"});return n.config.annotations.xaxis.map(function(i,o){e.addXaxisAnnotation(i,s.node,o)}),s}}]),t}(),zs=function(){function t(e){at(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 lt(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 s=Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "));return s=this.getTimeStamp(s)}},{key:"parseDateWithTimezone",value:function(e){return Date.parse(e.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(e,n){var s=this.w.globals.locale,i=this.w.config.xaxis.labels.datetimeUTC,o=["\0"].concat(Cs(s.months)),r=[""].concat(Cs(s.shortMonths)),a=[""].concat(Cs(s.days)),l=[""].concat(Cs(s.shortDays));function c(P,I){var L=P+"";for(I=I||2;L.length<I;)L="0"+L;return L}var u=i?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=(i?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=i?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=i?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=i?e.getUTCMinutes():e.getMinutes();n=(n=n.replace(/(^|[^\\])mm+/g,"$1"+c(m))).replace(/(^|[^\\])m/g,"$1"+m);var b=i?e.getUTCSeconds():e.getSeconds();n=(n=n.replace(/(^|[^\\])ss+/g,"$1"+c(b))).replace(/(^|[^\\])s/g,"$1"+b);var y=i?e.getUTCMilliseconds():e.getMilliseconds();n=n.replace(/(^|[^\\])fff+/g,"$1"+c(y,3)),y=Math.round(y/10),n=n.replace(/(^|[^\\])ff/g,"$1"+c(y)),y=Math.round(y/10);var C=f<12?"AM":"PM";n=(n=(n=n.replace(/(^|[^\\])f/g,"$1"+y)).replace(/(^|[^\\])TT+/g,"$1"+C)).replace(/(^|[^\\])T/g,"$1"+C.charAt(0));var k=C.toLowerCase();n=(n=n.replace(/(^|[^\\])tt+/g,"$1"+k)).replace(/(^|[^\\])t/g,"$1"+k.charAt(0));var x=-e.getTimezoneOffset(),S=i||!x?"Z":x>0?"+":"-";if(!i){var E=(x=Math.abs(x))%60;S+=c(Math.floor(x/60))+":"+c(E)}n=n.replace(/(^|[^\\])K/g,"$1"+S);var T=(i?e.getUTCDay():e.getDay())+1;return n=(n=(n=(n=(n=n.replace(new RegExp(a[0],"g"),a[T])).replace(new RegExp(l[0],"g"),l[T])).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,s){var i=this.w;i.config.xaxis.min!==void 0&&(e=i.config.xaxis.min),i.config.xaxis.max!==void 0&&(n=i.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,s){return this.determineDaysOfMonths(e,n)-s}},{key:"determineDaysOfYear",value:function(e){var n=365;return this.isLeapYear(e)&&(n=366),n}},{key:"determineRemainingDaysOfYear",value:function(e,n,s){var i=this.daysCntOfYear[n]+s;return n>1&&this.isLeapYear()&&i++,i}},{key:"determineDaysOfMonths",value:function(e,n){var s=30;switch(e=ue.monthMod(e),!0){case this.months30.indexOf(e)>-1:e===2&&(s=this.isLeapYear(n)?29:28);break;case this.months31.indexOf(e)>-1:default:s=31}return s}}]),t}(),V1=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return lt(t,[{key:"xLabelFormat",value:function(e,n,s,i){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 zs(this.ctx);return r.formatDate(r.getDate(n),o.config.tooltip.x.format)}return e(n,s,i)}},{key:"defaultGeneralFormatter",value:function(e){return Array.isArray(e)?e.map(function(n){return n}):e}},{key:"defaultYFormatter",value:function(e,n,s){var i=this.w;if(ue.isNumber(e))if(i.globals.yValueDecimal!==0)e=e.toFixed(n.decimalsInFloat!==void 0?n.decimalsInFloat:i.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(s){return e.defaultGeneralFormatter(s)},n.globals.ttKeyFormatter=function(s){return e.defaultGeneralFormatter(s)},n.globals.ttZFormatter=function(s){return s},n.globals.legendFormatter=function(s){return e.defaultGeneralFormatter(s)},n.config.xaxis.labels.formatter!==void 0?n.globals.xLabelFormatter=n.config.xaxis.labels.formatter:n.globals.xLabelFormatter=function(s){if(ue.isNumber(s)){if(!n.config.xaxis.convertedCatToNumeric&&n.config.xaxis.type==="numeric"){if(ue.isNumber(n.config.xaxis.decimalsInFloat))return s.toFixed(n.config.xaxis.decimalsInFloat);var i=n.globals.maxX-n.globals.minX;return i>0&&i<100?s.toFixed(1):s.toFixed(0)}return n.globals.isBarHorizontal&&n.globals.maxY-n.globals.minYArr<4?s.toFixed(1):s.toFixed(0)}return s},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(s,i){s.labels.formatter!==void 0?n.globals.yLabelFormatters[i]=s.labels.formatter:n.globals.yLabelFormatters[i]=function(o){return n.globals.xyCharts?Array.isArray(o)?o.map(function(r){return e.defaultYFormatter(r,s,i)}):e.defaultYFormatter(o,s,i):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(s,i){return s.length>i.length?s:i},0);e.globals.yAxisScale[0].niceMax=n,e.globals.yAxisScale[0].niceMin=n}}}]),t}(),xc=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"getLabel",value:function(e,n,s,i){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[i]===void 0?"":e[i],u=c,d=l.globals.xLabelFormatter,h=l.config.xaxis.labels.formatter,f=!1,p=new V1(this.ctx),m=c;a&&(u=p.xLabelFormat(d,c,m,{i,dateFormatter:new zs(this.ctx).formatDate,w:l}),h!==void 0&&(u=h(c,e[i],{i,dateFormatter:new zs(this.ctx).formatDate,w:l})));var b,y;n.length>0?(b=n[i].unit,y=null,n.forEach(function(S){S.unit==="month"?y="year":S.unit==="day"?y="month":S.unit==="hour"?y="day":S.unit==="minute"&&(y="hour")}),f=y===b,s=n[i].position,u=n[i].value):l.config.xaxis.type==="datetime"&&h===void 0&&(u=""),u===void 0&&(u=""),u=Array.isArray(u)?u:u.toString();var C=new Ve(this.ctx),k={};k=l.globals.rotateXLabels&&a?C.getTextRects(u,parseInt(r,10),null,"rotate(".concat(l.config.xaxis.labels.rotate," 0 0)"),!1):C.getTextRects(u,parseInt(r,10));var x=!l.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(u)&&(String(u)==="NaN"||o.indexOf(u)>=0&&x)&&(u=""),{x:s,text:u,textRect:k,isBold:f}}},{key:"checkLabelBasedOnTickamount",value:function(e,n,s){var i=this.w,o=i.config.xaxis.tickAmount;return o==="dataPoints"&&(o=Math.round(i.globals.gridWidth/120)),o>s||e%Math.round(s/(o+1))==0||(n.text=""),n}},{key:"checkForOverflowingLabels",value:function(e,n,s,i,o){var r=this.w;if(e===0&&r.globals.skipFirstTimelinelabel&&(n.text=""),e===s-1&&r.globals.skipLastTimelinelabel&&(n.text=""),r.config.xaxis.labels.hideOverlappingLabels&&i.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 s=this.w;return s.config.yaxis[e]&&s.config.yaxis[e].reversed&&n.reverse(),n}},{key:"yAxisAllSeriesCollapsed",value:function(e){var n=this.w.globals;return!n.seriesYAxisMap[e].some(function(s){return n.collapsedSeriesIndices.indexOf(s)===-1})}},{key:"translateYAxisIndex",value:function(e){var n=this.w,s=n.globals,i=n.config.yaxis;return s.series.length>i.length||i.some(function(o){return Array.isArray(o.seriesName)})?e:s.seriesYAxisReverseMap[e]}},{key:"isYAxisHidden",value:function(e){var n=this.w,s=n.config.yaxis[e];if(!s.show||this.yAxisAllSeriesCollapsed(e))return!0;if(!s.showForNullSeries){var i=n.globals.seriesYAxisMap[e],o=new rs(this.ctx);return i.every(function(r){return o.isSeriesNull(r)})}return!1}},{key:"getYAxisForeColor",value:function(e,n){var s=this.w;return Array.isArray(e)&&s.globals.yAxisScale[n]&&this.ctx.theme.pushExtraColors(e,s.globals.yAxisScale[n].result.length,!1),e}},{key:"drawYAxisTicks",value:function(e,n,s,i,o,r,a){var l=this.w,c=new Ve(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),i.show&&n>0){l.config.yaxis[o].opposite===!0&&(e+=i.width);for(var d=n;d>=0;d--){var h=c.drawLine(e+s.offsetX-i.width+i.offsetX,u+i.offsetY,e+s.offsetX+i.offsetX,u+i.offsetY,i.color);a.add(h),u+=r}}}}]),t}(),A1t=function(){function t(e){at(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new o2(this.annoCtx),this.axesUtils=new xc(this.annoCtx)}return lt(t,[{key:"addYaxisAnnotation",value:function(e,n,s){var i,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(i=(a=this.helpers.getY1Y2("y2",e)).yP,u=a.clipped,i>l){var p=l;l=i,i=p}if(!c||!u){d=!0;var m=this.annoCtx.graphics.drawRect(0+e.offsetX,i+e.offsetY,this._getYAxisAnnotationWidth(e),l-i,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 b=e.label.position==="right"?o.globals.gridWidth:e.label.position==="center"?o.globals.gridWidth/2:0,y=this.annoCtx.graphics.drawText({x:b+e.label.offsetX,y:(i??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:"")});y.attr({rel:s}),n.appendChild(y.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,s=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return n.config.annotations.yaxis.forEach(function(i,o){i.yAxisIndex=e.axesUtils.translateYAxisIndex(i.yAxisIndex),e.axesUtils.isYAxisHidden(i.yAxisIndex)&&e.axesUtils.yAxisAllSeriesCollapsed(i.yAxisIndex)||e.addYaxisAnnotation(i,s.node,o)}),s}}]),t}(),M1t=function(){function t(e){at(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new o2(this.annoCtx)}return lt(t,[{key:"addPointAnnotation",value:function(e,n,s){if(!(this.w.globals.collapsedSeriesIndices.indexOf(e.seriesIndex)>-1)){var i=this.helpers.getX1X2("x1",e),o=i.x,r=i.clipped,a=(i=this.helpers.getY1Y2("y1",e)).yP,l=i.clipped;if(ue.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:s}),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,s=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return n.config.annotations.points.map(function(i,o){e.addPointAnnotation(i,s.node,o)}),s}}]),t}(),JH={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"}}},au=function(){function t(){at(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 lt(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:[JH],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}},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,s){return n+s},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,s){return n+s},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}(),E1t=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.graphics=new Ve(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new o2(this),this.xAxisAnnotations=new $1t(this),this.yAxisAnnotations=new A1t(this),this.pointsAnnotations=new M1t(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 lt(t,[{key:"drawAxesAnnotations",value:function(){var e=this.w;if(e.globals.axisCharts&&e.globals.dataPoints){for(var n=this.yAxisAnnotations.drawYAxisAnnotations(),s=this.xAxisAnnotations.drawXAxisAnnotations(),i=this.pointsAnnotations.drawPointAnnotations(),o=e.config.chart.animations.enabled,r=[n,s,i],a=[s.node,n.node,i.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,s){e.addImage(n,s)})}},{key:"drawTextAnnos",value:function(){var e=this;this.w.config.annotations.texts.map(function(n,s){e.addText(n,s)})}},{key:"addXaxisAnnotation",value:function(e,n,s){this.xAxisAnnotations.addXaxisAnnotation(e,n,s)}},{key:"addYaxisAnnotation",value:function(e,n,s){this.yAxisAnnotations.addYaxisAnnotation(e,n,s)}},{key:"addPointAnnotation",value:function(e,n,s){this.pointsAnnotations.addPointAnnotation(e,n,s)}},{key:"addText",value:function(e,n){var s=e.x,i=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,b=e.borderColor,y=e.appendTo,C=y===void 0?".apexcharts-svg":y,k=e.paddingLeft,x=k===void 0?4:k,S=e.paddingRight,E=S===void 0?4:S,T=e.paddingBottom,P=T===void 0?2:T,I=e.paddingTop,L=I===void 0?2:I,V=this.w,D=this.graphics.drawText({x:s,y:i,text:o,textAnchor:r||"start",fontSize:l||"12px",fontWeight:u||"regular",fontFamily:c||V.config.chart.fontFamily,foreColor:a||V.config.chart.foreColor,cssClass:d}),z=V.globals.dom.baseEl.querySelector(C);z&&z.appendChild(D.node);var Y=D.bbox();if(o){var B=this.graphics.drawRect(Y.x-x,Y.y-L,Y.width+x+E,Y.height+P+L,m,h||"transparent",1,f,b,p);z.insertBefore(B.node,D.node)}}},{key:"addImage",value:function(e,n){var s=this.w,i=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=s.globals.dom.Paper.image(i);m.size(u,h).move(r,l);var b=s.globals.dom.baseEl.querySelector(p);return b&&b.appendChild(m.node),m}},{key:"addXaxisAnnotationExternal",value:function(e,n,s){return this.addAnnotationExternal({params:e,pushToMemory:n,context:s,type:"xaxis",contextMethod:s.addXaxisAnnotation}),s}},{key:"addYaxisAnnotationExternal",value:function(e,n,s){return this.addAnnotationExternal({params:e,pushToMemory:n,context:s,type:"yaxis",contextMethod:s.addYaxisAnnotation}),s}},{key:"addPointAnnotationExternal",value:function(e,n,s){return this.invertAxis===void 0&&(this.invertAxis=s.w.globals.isBarHorizontal),this.addAnnotationExternal({params:e,pushToMemory:n,context:s,type:"point",contextMethod:s.addPointAnnotation}),s}},{key:"addAnnotationExternal",value:function(e){var n=e.params,s=e.pushToMemory,i=e.context,o=e.type,r=e.contextMethod,a=i,l=a.w,c=l.globals.dom.baseEl.querySelector(".apexcharts-".concat(o,"-annotations")),u=c.childNodes.length+1,d=new au,h=Object.assign({},o==="xaxis"?d.xAxisAnnotation:o==="yaxis"?d.yAxisAnnotation:d.pointAnnotation),f=ue.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),s&&l.globals.memory.methodsToExec.push({context:a,id:f.id?f.id:ue.randomId(),method:r,label:"addAnnotation",params:n}),i}},{key:"clearAnnotations",value:function(e){for(var n=e.w,s=n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations"),i=n.globals.memory.methodsToExec.length-1;i>=0;i--)n.globals.memory.methodsToExec[i].label!=="addText"&&n.globals.memory.methodsToExec[i].label!=="addAnnotation"||n.globals.memory.methodsToExec.splice(i,1);s=ue.listToArray(s),Array.prototype.forEach.call(s,function(o){for(;o.firstChild;)o.removeChild(o.firstChild)})}},{key:"removeAnnotation",value:function(e,n){var s=e.w,i=s.globals.dom.baseEl.querySelectorAll(".".concat(n));i&&(s.globals.memory.methodsToExec.map(function(o,r){o.id===n&&s.globals.memory.methodsToExec.splice(r,1)}),Array.prototype.forEach.call(i,function(o){o.parentElement.removeChild(o)}))}}]),t}(),o3=function(t){var e,n=t.isTimeline,s=t.ctx,i=t.seriesIndex,o=t.dataPointIndex,r=t.y1,a=t.y2,l=t.w,c=l.globals.seriesRangeStart[i][o],u=l.globals.seriesRangeEnd[i][o],d=l.globals.labels[o],h=l.config.series[i].name?l.config.series[i].name:"",f=l.globals.ttKeyFormatter,p=l.config.tooltip.y.title.formatter,m={w:l,seriesIndex:i,dataPointIndex:o,start:c,end:u};typeof p=="function"&&(h=p(h,m)),(e=l.config.series[i].data[o])!==null&&e!==void 0&&e.x&&(d=l.config.series[i].data[o].x),n||l.config.xaxis.type==="datetime"&&(d=new V1(s).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new zs(s).formatDate,w:l})),typeof f=="function"&&(d=f(d,m)),Number.isFinite(r)&&Number.isFinite(a)&&(c=r,u=a);var b="",y="",C=l.globals.colors[i];if(l.config.tooltip.x.formatter===void 0)if(l.config.xaxis.type==="datetime"){var k=new zs(s);b=k.formatDate(k.getDate(c),l.config.tooltip.x.format),y=k.formatDate(k.getDate(u),l.config.tooltip.x.format)}else b=c,y=u;else b=l.config.tooltip.x.formatter(c),y=l.config.tooltip.x.formatter(u);return{start:c,end:u,startVal:b,endVal:y,ylabel:d,color:C,seriesName:h}},r3=function(t){var e=t.color,n=t.seriesName,s=t.ylabel,i=t.start,o=t.end,r=t.seriesIndex,a=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(r);i=l.yLbFormatter(i),o=l.yLbFormatter(o);var c=l.yLbFormatter(t.w.globals.series[r][a]),u=`<span class="value start-value"> | |
| 167 | - `.concat(i,` | |
| 152 | + `),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),he.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}(),Ne=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,B=Math.sqrt(R*R+V*V);return s(T,I,Math.min(1,L/B))}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),S=s(k,y,.5),M=["C",$.x,$.y,S.x,S.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,S=$===void 0||$,M=this.w,P=new ci(this.ctx),T=new Ip(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,B=0;B=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:B});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&&S&&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(tt(tt({},z),{},{speed:h})),M.globals.dataChanged&&L&&R&&T.animatePathsGradually(tt(tt({},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=he.hexToRgba(n,s)),i.length<9&&i.indexOf("#")===0&&(i=he.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 S,M={maxWidth:h,fontSize:a=a||"11px",fontFamily:l};return Array.isArray(o)?S=C.globals.dom.Paper.text(function(P){for(var T=0;T<o.length;T++)$=o[T],h&&($=n.getTextBasedOnMaxWidth(tt({text:o[T]},M))),T===0?P.tspan($):P.tspan($).newLine()}):(h&&($=this.getTextBasedOnMaxWidth(tt({text:o},M))),S=y?C.globals.dom.Paper.plain(o):C.globals.dom.Paper.text(function(P){return P.tspan($)})),S.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}),S.node.style.fontFamily=l,S.node.style.opacity=d,S}},{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,` | |
| 153 | + L `).concat(e+s," ").concat(n+s,` | |
| 154 | + L `).concat(e-s," ").concat(n+s,` | |
| 155 | + Z`);break;case"square":case"rect":o="M ".concat(e-(s/=1.125)," ").concat(n-s,` | |
| 156 | + L `).concat(e+s," ").concat(n-s,` | |
| 157 | + L `).concat(e+s," ").concat(n+s,` | |
| 158 | + L `).concat(e-s," ").concat(n+s,` | |
| 159 | + Z`);break;case"diamond":s*=1.05,o="M ".concat(e," ").concat(n-s,` | |
| 160 | + L `).concat(e+s," ").concat(n,` | |
| 161 | + L `).concat(e," ").concat(n+s,` | |
| 162 | + L `).concat(e-s," ").concat(n,` | |
| 163 | + Z`);break;case"line":o="M ".concat(e-(s/=1.1)," ").concat(n,` | |
| 164 | + L `).concat(e+s," ").concat(n);break;default:s*=2,o="M ".concat(e,", ").concat(n,` | |
| 165 | + m -`).concat(s/2,`, 0 | |
| 166 | + a `).concat(s/2,",").concat(s/2," 0 1,0 ").concat(s,`,0 | |
| 167 | + 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 he.isNumber(n)||(s=0,n=0),this.drawMarkerShape(e,n,i==null?void 0:i.shape,s,tt(tt({},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 ci(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 ci(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 ci(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}(),ys=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}(),Z2=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 ys(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}(),Y_t=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e,this.invertAxis=this.annoCtx.invertAxis,this.helpers=new Z2(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(he.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,!l||!c){if(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}(),ii=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(),S=s||!$?"Z":$>0?"+":"-";if(!s){var M=($=Math.abs($))%60;S+=c(Math.floor($/60))+":"+c(M)}n=n.replace(/(^|[^\\])K/g,"$1"+S);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=he.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}(),kv=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 ii(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(he.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(he.isNumber(i)){if(!n.config.xaxis.convertedCatToNumeric&&n.config.xaxis.type==="numeric"){if(he.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}(),qc=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 kv(this.ctx),m=c;a&&(u=p.xLabelFormat(d,c,m,{i:s,dateFormatter:new ii(this.ctx).formatDate,w:l}),h!==void 0&&(u=h(c,e[s],{i:s,dateFormatter:new ii(this.ctx).formatDate,w:l})));var y,b;n.length>0?(y=n[s].unit,b=null,n.forEach(function(S){S.unit==="month"?b="year":S.unit==="day"?b="month":S.unit==="hour"?b="day":S.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 Ne(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 ys(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 Ne(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}(),q_t=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Z2(this.annoCtx),this.axesUtils=new qc(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}(),G_t=function(){function t(e){lt(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new Z2(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(he.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}(),uj={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"}}},Ou=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:[uj],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}},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}(),X_t=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.graphics=new Ne(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new Z2(this),this.xAxisAnnotations=new Y_t(this),this.yAxisAnnotations=new q_t(this),this.pointsAnnotations=new G_t(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,S=e.paddingRight,M=S===void 0?4:S,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}),B=R.globals.dom.baseEl.querySelector(k);B&&B.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);B.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 Ou,h=Object.assign({},o==="xaxis"?d.xAxisAnnotation:o==="yaxis"?d.yAxisAnnotation:d.pointAnnotation),f=he.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:he.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=he.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}(),ek=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 kv(i).xLabelFormat(l.globals.ttKeyFormatter,d,d,{i:void 0,dateFormatter:new ii(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 ii(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}},tk=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"> | |
| 168 | + `.concat(s,` | |
| 168 | 169 | </span> <span class="separator">-</span> <span class="value end-value"> |
| 169 | 170 | `).concat(o,` |
| 170 | - </span>`);return'<div class="apexcharts-tooltip-rangebar"><div> <span class="series-name" style="color: '+e+'">'+(n||"")+'</span></div><div> <span class="category">'+s+": </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>"},Rg=function(){function t(e){at(this,t),this.opts=e}return lt(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(),ue.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 s=n.w.config.series[n.seriesIndex].name;return e!==null?s+": "+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:"round"},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 s=n.seriesIndex,i=n.dataPointIndex,o=n.w;return e._getBoxTooltip(o,s,i,["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 s=n.seriesIndex,i=n.dataPointIndex,o=n.w;return e._getBoxTooltip(o,s,i,["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 s=n.seriesIndex,i=n.dataPointIndex,o=n.w,r=function(){var a=o.globals.seriesRangeStart[s][i];return o.globals.seriesRangeEnd[s][i]-a};return o.globals.comboCharts?o.config.series[s].type==="rangeBar"||o.config.series[s].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 s=o3(Je(Je({},n),{},{isTimeline:!0})),i=s.color,o=s.seriesName,r=s.ylabel,a=s.startVal,l=s.endVal;return r3(Je(Je({},n),{},{color:i,seriesName:o,ylabel:r,start:a,end:l}))}(e):function(n){var s=o3(n),i=s.color,o=s.seriesName,r=s.ylabel,a=s.start,l=s.end;return r3(Je(Je({},n),{},{color:i,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,s;return(n=e.plotOptions.bar)!==null&&n!==void 0&&n.barHeight||(e.plotOptions.bar.barHeight=2),(s=e.plotOptions.bar)!==null&&s!==void 0&&s.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 s=o3(n),i=s.color,o=s.seriesName,r=s.ylabel,a=s.start,l=s.end;return r3(Je(Je({},n),{},{color:i,seriesName:o,ylabel:r,start:a,end:l}))}(e)}}}}},{key:"brush",value:function(e){return ue.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(s,i){e.yaxis[i].min=0,e.yaxis[i].max=100}),e.chart.type==="bar"&&(e.dataLabels.formatter=n||function(s){return typeof s=="number"&&s?s.toFixed(0)+"%":s}),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,s){e.xaxis.type="numeric",e.xaxis.labels=e.xaxis.labels||{},e.xaxis.labels.formatter=e.xaxis.labels.formatter||function(r){return ue.isNumber(r)?Math.floor(r):r};var i=e.xaxis.labels.formatter,o=e.xaxis.categories&&e.xaxis.categories.length?e.xaxis.categories:e.labels;return s&&s.length&&(o=s.map(function(r){return Array.isArray(r)?r:String(r)})),o&&o.length&&(e.xaxis.labels.formatter=function(r){return ue.isNumber(r)?i(o[Math.floor(r)-1]):i(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,s,i,o){var r=e.globals.seriesCandleO[n][s],a=e.globals.seriesCandleH[n][s],l=e.globals.seriesCandleM[n][s],c=e.globals.seriesCandleL[n][s],u=e.globals.seriesCandleC[n][s];return e.config.series[n].type&&e.config.series[n].type!==o?`<div class="apexcharts-custom-tooltip"> | |
| 171 | - `.concat(e.config.series[n].name?e.config.series[n].name:"series-"+(n+1),": <strong>").concat(e.globals.series[n][s],`</strong> | |
| 172 | - </div>`):'<div class="apexcharts-tooltip-box apexcharts-tooltip-'.concat(e.config.chart.type,'">')+"<div>".concat(i[0],': <span class="value">')+r+"</span></div>"+"<div>".concat(i[1],': <span class="value">')+a+"</span></div>"+(l?"<div>".concat(i[2],': <span class="value">')+l+"</span></div>":"")+"<div>".concat(i[3],': <span class="value">')+c+"</span></div>"+"<div>".concat(i[4],': <span class="value">')+u+"</span></div></div>"}}]),t}(),Vg=function(){function t(e){at(this,t),this.opts=e}return lt(t,[{key:"init",value:function(e){var n=e.responsiveOverride,s=this.opts,i=new au,o=new Rg(s);this.chartType=s.chart.type,s=this.extendYAxis(s),s=this.extendAnnotations(s);var r=i.init(),a={};if(s&&Sf(s)==="object"){var l,c,u,d,h,f,p,m,b,y,C={};C=["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(s.chart.type)!==-1?o[s.chart.type]():o.line(),(l=s.plotOptions)!==null&&l!==void 0&&(c=l.bar)!==null&&c!==void 0&&c.isFunnel&&(C=o.funnel()),s.chart.stacked&&s.chart.type==="bar"&&(C=o.stackedBars()),(u=s.chart.brush)!==null&&u!==void 0&&u.enabled&&(C=o.brush(C)),(d=s.plotOptions)!==null&&d!==void 0&&(h=d.line)!==null&&h!==void 0&&h.isSlopeChart&&(C=o.slope()),s.chart.stacked&&s.chart.stackType==="100%"&&(s=o.stacked100(s)),(f=s.plotOptions)!==null&&f!==void 0&&(p=f.bar)!==null&&p!==void 0&&p.isDumbbell&&(s=o.dumbbell(s)),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(s),s.xaxis=s.xaxis||window.Apex.xaxis||{},n||(s.xaxis.convertedCatToNumeric=!1),((m=(s=this.checkForCatToNumericXAxis(this.chartType,C,s)).chart.sparkline)!==null&&m!==void 0&&m.enabled||(b=window.Apex.chart)!==null&&b!==void 0&&(y=b.sparkline)!==null&&y!==void 0&&y.enabled)&&(C=o.sparkline(C)),a=ue.extend(r,C)}var k=ue.extend(a,window.Apex);return r=ue.extend(k,s),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(e,n,s){var i,o,r=new Rg(s),a=(e==="bar"||e==="boxPlot")&&((i=s.plotOptions)===null||i===void 0||(o=i.bar)===null||o===void 0?void 0:o.horizontal),l=e==="pie"||e==="polarArea"||e==="donut"||e==="radar"||e==="radialBar"||e==="heatmap",c=s.xaxis.type!=="datetime"&&s.xaxis.type!=="numeric",u=s.xaxis.tickPlacement?s.xaxis.tickPlacement:n.xaxis&&n.xaxis.tickPlacement;return a||l||!c||u==="between"||(s=r.convertCatToNumeric(s)),s}},{key:"extendYAxis",value:function(e,n){var s=new au;(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=ue.extend(e.yaxis,window.Apex.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[ue.extend(s.yAxis,e.yaxis)]:e.yaxis=ue.extendArray(e.yaxis,s.yAxis);var i=!1;e.yaxis.forEach(function(r){r.logarithmic&&(i=!0)});var o=e.series;return n&&!o&&(o=n.config.series),i&&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=ue.extend(s.yAxis,e.yaxis[0]);return l.show=!1,l})),i&&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 au;return e.annotations.yaxis=ue.extendArray(e.annotations.yaxis!==void 0?e.annotations.yaxis:[],n.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var n=new au;return e.annotations.xaxis=ue.extendArray(e.annotations.xaxis!==void 0?e.annotations.xaxis:[],n.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var n=new au;return e.annotations.points=ue.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}(),QH=function(){function t(){at(this,t)}return lt(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=ue.extend({},e),n.initialSeries=ue.clone(e.series),n.lastXAxis=ue.clone(n.initialConfig.xaxis),n.lastYAxis=ue.clone(n.initialConfig.yaxis),n}}]),t}(),T1t=function(){function t(e){at(this,t),this.opts=e}return lt(t,[{key:"init",value:function(){var e=new Vg(this.opts).init({responsiveOverride:!1});return{config:e,globals:new QH().init(e)}}}]),t}(),Mr=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}return lt(t,[{key:"clippedImgArea",value:function(e){var n=this.w,s=n.config,i=parseInt(n.globals.gridWidth,10),o=parseInt(n.globals.gridHeight,10),r=i>o?i:o,a=e.image,l=0,c=0;e.width===void 0&&e.height===void 0?s.fill.image.width!==void 0&&s.fill.image.height!==void 0?(l=s.fill.image.width+1,c=s.fill.image.height):(l=r+1,c=r):(l=e.width,c=e.height);var u=document.createElementNS(n.globals.SVGNS,"pattern");Ve.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),Ve.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,s=n.config.chart.type;return(s==="bar"||s==="rangeBar")&&n.config.plotOptions.bar.distributed||s==="heatmap"||s==="treemap"?this.seriesIndex=e.seriesNumber:this.seriesIndex=e.seriesNumber%n.globals.series.length,this.seriesIndex}},{key:"computeColorStops",value:function(e,n){var s,i=this.w,o=null,r=null,a=Yp(e);try{for(a.s();!(s=a.n()).done;){var l=s.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:i.config.fill.opacity},{offset:0,color:n.colorBelowThreshold,opacity:i.config.fill.opacity}]}},{key:"fillPath",value:function(e){var n,s,i,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),b=Array.isArray(c.fill.opacity)?c.fill.opacity[this.seriesIndex]:c.fill.opacity,y=m==="gradient"||u;e.color&&(d=e.color),(n=o.config.series[this.seriesIndex])!==null&&n!==void 0&&(s=n.data)!==null&&s!==void 0&&(i=s[e.dataPointIndex])!==null&&i!==void 0&&i.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 C=d;if(d.indexOf("rgb")===-1?d.indexOf("#")===-1?C=d:d.length<9&&(C=ue.hexToRgba(d,b)):d.indexOf("rgba")>-1?b=ue.getOpacityFromRGBA(d):C=ue.hexToRgba(ue.rgb2hex(d),b),e.opacity&&(b=e.opacity),m==="pattern"&&(a=this.handlePatternFill({fillConfig:e.fillConfig,patternFill:a,fillColor:d,fillOpacity:b,defaultColor:C})),y){var k=Cs(c.fill.gradient.colorStops)||[],x=c.fill.gradient.type;u&&(k[this.seriesIndex]=this.computeColorStops(o.globals.series[this.seriesIndex],c.plotOptions.line.colors),x="vertical"),l=this.handleGradientFill({type:x,fillConfig:e.fillConfig,fillColor:d,fillOpacity:b,colorStops:k,i:this.seriesIndex})}if(m==="image"){var S=c.fill.image.src,E=e.patternID?e.patternID:"",T="pattern".concat(o.globals.cuid).concat(e.seriesNumber+1).concat(E);this.patternIDs.indexOf(T)===-1&&(this.clippedImgArea({opacity:b,image:Array.isArray(S)?e.seriesNumber<S.length?S[e.seriesNumber]:S[0]:S,width:e.width?e.width:void 0,height:e.height?e.height:void 0,patternUnits:e.patternUnits,patternID:T}),this.patternIDs.push(T)),r="url(#".concat(T,")")}else r=y?l:m==="pattern"?a:C;return e.solid&&(r=C),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,s=this.opts,i=[];return e.globals.comboCharts?e.config.series[this.seriesIndex].type==="line"?Array.isArray(e.globals.stroke.colors)?i=e.globals.stroke.colors:i.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?i=e.globals.fill.colors:i.push(e.globals.fill.colors):n.chart.type==="line"?Array.isArray(e.globals.stroke.colors)?i=e.globals.stroke.colors:i.push(e.globals.stroke.colors):Array.isArray(e.globals.fill.colors)?i=e.globals.fill.colors:i.push(e.globals.fill.colors),s.fillColors!==void 0&&(i=[],Array.isArray(s.fillColors)?i=s.fillColors.slice():i.push(s.fillColors)),i}},{key:"handlePatternFill",value:function(e){var n=e.fillConfig,s=e.patternFill,i=e.fillColor,o=e.fillOpacity,r=e.defaultColor,a=this.w.config.fill;n&&(a=n);var l=this.opts,c=new Ve(this.ctx),u=Array.isArray(a.pattern.strokeWidth)?a.pattern.strokeWidth[this.seriesIndex]:a.pattern.strokeWidth,d=i;return Array.isArray(a.pattern.style)?s=a.pattern.style[l.seriesNumber]!==void 0?c.drawPattern(a.pattern.style[l.seriesNumber],a.pattern.width,a.pattern.height,d,u,o):r:s=c.drawPattern(a.pattern.style,a.pattern.width,a.pattern.height,d,u,o),s}},{key:"handleGradientFill",value:function(e){var n=e.type,s=e.fillColor,i=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 Ve(this.ctx),d=new ue;n=n||l.gradient.type;var h,f=s,p=l.gradient.opacityFrom===void 0?i:Array.isArray(l.gradient.opacityFrom)?l.gradient.opacityFrom[a]:l.gradient.opacityFrom;f.indexOf("rgba")>-1&&(p=ue.getOpacityFromRGBA(f));var m=l.gradient.opacityTo===void 0?i: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),s.indexOf("rgb")>-1?ue.rgb2hex(s):s):d.shadeColor(parseFloat(l.gradient.shadeIntensity),s.indexOf("rgb")>-1?ue.rgb2hex(s):s);else if(l.gradient.gradientToColors[c.seriesNumber]){var b=l.gradient.gradientToColors[c.seriesNumber];h=b,b.indexOf("rgba")>-1&&(m=ue.getOpacityFromRGBA(b))}else h=s;if(l.gradient.gradientFrom&&(f=l.gradient.gradientFrom),l.gradient.gradientTo&&(h=l.gradient.gradientTo),l.gradient.inverseColors){var y=f;f=h,h=y}return f.indexOf("rgb")>-1&&(f=ue.rgb2hex(f)),h.indexOf("rgb")>-1&&(h=ue.rgb2hex(h)),u.drawGradient(n,f,h,p,m,c.size,l.gradient.stops,r,a)}}]),t}(),ap=function(){function t(e,n){at(this,t),this.ctx=e,this.w=e.w}return lt(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(s){return e.config.markers.size})}},{key:"plotChartMarkers",value:function(e,n,s,i){var o=arguments.length>4&&arguments[4]!==void 0&&arguments[4],r=this.w,a=n,l=e,c=null,u=new Ve(this.ctx),d=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(l.x))for(var h=0;h<l.x.length;h++){var f=void 0,p=s,m=!ue.isNumber(l.y[h]);s===1&&h===0&&(p=0),s===1&&h===1&&(p=1);var b="apexcharts-marker";if(r.config.chart.type!=="line"&&r.config.chart.type!=="area"||r.globals.comboCharts||r.config.tooltip.intersect||(b+=" no-pointer-events"),(Array.isArray(r.config.markers.size)?r.globals.markers.size[n]>0:r.config.markers.size>0)||o||d){m||(b+=" w".concat(ue.randomId()));var y=this.getMarkerConfig({cssClass:b,seriesIndex:n,dataPointIndex:p});r.config.series[a].data[p]&&(r.config.series[a].data[p].fillColor&&(y.pointFillColor=r.config.series[a].data[p].fillColor),r.config.series[a].data[p].strokeColor&&(y.pointStrokeColor=r.config.series[a].data[p].strokeColor)),i!==void 0&&(y.pSize=i),(l.x[h]<-r.globals.markers.largestSize||l.x[h]>r.globals.gridWidth+r.globals.markers.largestSize||l.y[h]<-r.globals.markers.largestSize||l.y[h]>r.globals.gridHeight+r.globals.markers.largestSize)&&(y.pSize=0),!m&&((r.globals.markers.size[n]>0||o||d)&&!c&&(c=u.group({class:o||d?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(f=u.drawMarker(l.x[h],l.y[h],y)).attr("rel",p),f.attr("j",p),f.attr("index",n),f.node.setAttribute("default-marker-size",y.pSize),new Ws(this.ctx).setSelectionFilter(f,n,p),this.addEvents(f),c&&c.add(f))}else r.globals.pointsArray[n]===void 0&&(r.globals.pointsArray[n]=[]),r.globals.pointsArray[n].push([l.x[h],l.y[h]])}return c}},{key:"getMarkerConfig",value:function(e){var n=e.cssClass,s=e.seriesIndex,i=e.dataPointIndex,o=i===void 0?null:i,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(s),p=c===null?h.globals.markers.size[s]:c,m=h.config.markers;return o!==null&&m.discrete.length&&m.discrete.map(function(b){b.seriesIndex===s&&b.dataPointIndex===o&&(f.pointStrokeColor=b.strokeColor,f.pointFillColor=b.fillColor,p=b.size,f.pointShape=b.shape)}),{pSize:a===null?p:a,pRadius:a!==null?a:m.radius,pointStrokeWidth:d!==null?d:Array.isArray(m.strokeWidth)?m.strokeWidth[s]:m.strokeWidth,pointStrokeColor:f.pointStrokeColor,pointFillColor:f.pointFillColor,shape:f.pointShape||(Array.isArray(m.shape)?m.shape[s]:m.shape),class:n,pointStrokeOpacity:Array.isArray(m.strokeOpacity)?m.strokeOpacity[s]:m.strokeOpacity,pointStrokeDashArray:Array.isArray(m.strokeDashArray)?m.strokeDashArray[s]:m.strokeDashArray,pointFillOpacity:Array.isArray(m.fillOpacity)?m.fillOpacity[s]:m.fillOpacity,seriesIndex:s}}},{key:"addEvents",value:function(e){var n=this.w,s=new Ve(this.ctx);e.node.addEventListener("mouseenter",s.pathMouseEnter.bind(this.ctx,e)),e.node.addEventListener("mouseleave",s.pathMouseLeave.bind(this.ctx,e)),e.node.addEventListener("mousedown",s.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",s.pathMouseDown.bind(this.ctx,e),{passive:!0})}},{key:"getMarkerStyle",value:function(e){var n=this.w,s=n.globals.markers.colors,i=n.config.markers.strokeColor||n.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(i)?i[e]:i,pointFillColor:Array.isArray(s)?s[e]:s}}}]),t}(),eU=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled}return lt(t,[{key:"draw",value:function(e,n,s){var i=this.w,o=new Ve(this.ctx),r=s.realIndex,a=s.pointsPos,l=s.zRatio,c=s.elParent,u=o.group({class:"apexcharts-series-markers apexcharts-series-".concat(i.config.chart.type)});if(u.attr("clip-path","url(#gridRectMarkerMask".concat(i.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=i.globals.markers.size[r];if(l!==1/0){var m=i.config.plotOptions.bubble;p=i.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 b=a.x[d],y=a.y[d];if(p=p||0,y!==null&&i.globals.series[r][h]!==void 0||(f=!1),f){var C=this.drawPoint(b,y,p,r,h,n);u.add(C)}c.add(u)}}},{key:"drawPoint",value:function(e,n,s,i,o,r){var a=this.w,l=i,c=new sp(this.ctx),u=new Ws(this.ctx),d=new Mr(this.ctx),h=new ap(this.ctx),f=new Ve(this.ctx),p=h.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:o,radius:a.config.chart.type==="bubble"||a.globals.comboCharts&&a.config.series[i]&&a.config.series[i].type==="bubble"?s:null}),m=d.fillPath({seriesNumber:i,dataPointIndex:o,color:p.pointFillColor,patternUnits:"objectBoundingBox",value:a.globals.series[i][r]}),b=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),b.attr({fill:m}),a.config.chart.dropShadow.enabled){var y=a.config.chart.dropShadow;u.dropShadow(b,y,i)}if(!this.initialAnim||a.globals.dataChanged||a.globals.resized)a.globals.animationEnded=!0;else{var C=a.config.chart.animations.speed;c.animateMarker(b,C,a.globals.easing,function(){window.setTimeout(function(){c.animationCompleted(b)},100)})}return b.attr({rel:o,j:o,index:i,"default-marker-size":p.pSize}),u.setSelectionFilter(b,i,o),h.addEvents(b),b.node.classList.add("apexcharts-marker"),b}},{key:"centerTextInBubble",value:function(e){var n=this.w;return{y:e+=parseInt(n.config.dataLabels.style.fontSize,10)/4}}}]),t}(),$f=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"dataLabelsCorrection",value:function(e,n,s,i,o,r,a){var l=this.w,c=!1,u=new Ve(this.ctx).getTextRects(s,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[i]===void 0&&(l.globals.dataLabelsRects[i]=[]),l.globals.dataLabelsRects[i].push({x:e,y:n,width:d,height:h});var f=l.globals.dataLabelsRects[i].length-2,p=l.globals.lastDrawnDataLabelsIndexes[i]!==void 0?l.globals.lastDrawnDataLabelsIndexes[i][l.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(l.globals.dataLabelsRects[i][f]!==void 0){var m=l.globals.dataLabelsRects[i][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,s=e.type,i=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 Ve(this.ctx),h=u.config.dataLabels,f=0,p=0,m=r,b=null;if(u.globals.collapsedSeriesIndices.indexOf(o)!==-1||!h.enabled||!Array.isArray(i.x))return b;b=d.group({class:"apexcharts-data-labels"});for(var y=0;y<i.x.length;y++)if(f=i.x[y]+h.offsetX,p=i.y[y]+h.offsetY+c,!isNaN(f)){r===1&&y===0&&(m=0),r===1&&y===1&&(m=1);var C=u.globals.series[o][m];s==="rangeArea"&&(C=a?u.globals.seriesRangeStart[o][m]:u.globals.seriesRangeEnd[o][m]);var k="",x=function(E){return u.config.dataLabels.formatter(E,{ctx:n.ctx,seriesIndex:o,dataPointIndex:m,w:u})};u.config.chart.type==="bubble"?(k=x(C=u.globals.seriesZ[o][m]),p=i.y[y],p=new eU(this.ctx).centerTextInBubble(p,o,m).y):C!==void 0&&(k=x(C));var S=u.config.dataLabels.textAnchor;u.globals.isSlopeChart&&(S=m===0?"end":m===u.config.series[o].data.length-1?"start":"middle"),this.plotDataLabelsText({x:f,y:p,text:k,i:o,j:m,parent:b,offsetCorrection:!0,dataLabelsConfig:u.config.dataLabels,textAnchor:S})}return b}},{key:"plotDataLabelsText",value:function(e){var n=this.w,s=new Ve(this.ctx),i=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,b=e.className,y=null;if(Array.isArray(n.config.dataLabels.enabledOnSeries)&&n.config.dataLabels.enabledOnSeries.indexOf(r)<0)return y;var C={x:i,y:o,drawnextLabel:!0,textRects:null};m&&(C=this.dataLabelsCorrection(i,o,l,r,a,p,parseInt(h.style.fontSize,10))),n.globals.zoomed||(i=C.x,o=C.y),C.textRects&&(i<-20-C.textRects.width||i>n.globals.gridWidth+C.textRects.width+30)&&(l="");var k=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)&&(k=n.globals.dataLabels.style.colors[a]),typeof k=="function"&&(k=k({series:n.globals.series,seriesIndex:r,dataPointIndex:a,w:n})),f&&(k=f);var x=h.offsetX,S=h.offsetY;if(n.config.chart.type!=="bar"&&n.config.chart.type!=="rangeBar"||(x=0,S=0),n.globals.isSlopeChart&&(a!==0&&(x=-2*h.offsetX+5),a!==0&&a!==n.config.series[r].data.length-1&&(x=0)),C.drawnextLabel){if((y=s.drawText({width:100,height:parseInt(h.style.fontSize,10),x:i+x,y:o+S,foreColor:k,textAnchor:c||h.textAnchor,text:l,fontSize:u||h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight||"normal"})).attr({class:b||"apexcharts-datalabel",cx:i,cy:o}),h.dropShadow.enabled){var E=h.dropShadow;new Ws(this.ctx).dropShadow(y,E)}d.add(y),n.globals.lastDrawnDataLabelsIndexes[r]===void 0&&(n.globals.lastDrawnDataLabelsIndexes[r]=[]),n.globals.lastDrawnDataLabelsIndexes[r].push(a)}return y}},{key:"addBackgroundToDataLabel",value:function(e,n){var s=this.w,i=s.config.dataLabels.background,o=i.padding,r=i.padding/2,a=n.width,l=n.height,c=new Ve(this.ctx).drawRect(n.x-o,n.y-r/2,a+2*o,l+r,i.borderRadius,s.config.chart.background!=="transparent"&&s.config.chart.background?s.config.chart.background:"#fff",i.opacity,i.borderWidth,i.borderColor);return i.dropShadow.enabled&&new Ws(this.ctx).dropShadow(c,i.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"),s=0;s<n.length;s++){var i=n[s],o=i.getBBox(),r=null;if(o.width&&o.height&&(r=this.addBackgroundToDataLabel(i,o)),r){i.parentNode.insertBefore(r.node,i);var a=i.getAttribute("fill");e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged?r.animate().attr({fill:a}):r.attr({fill:a}),i.setAttribute("fill",e.config.dataLabels.background.foreColor)}}}},{key:"bringForward",value:function(){for(var e=this.w,n=e.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels"),s=e.globals.dom.baseEl.querySelector(".apexcharts-plot-series:last-child"),i=0;i<n.length;i++)s&&s.insertBefore(n[i],s.nextSibling)}}]),t}(),Ko=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.legendInactiveClass="legend-mouseover-inactive"}return lt(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(ue.escapeString(e),"']"))}},{key:"isSeriesHidden",value:function(e){var n=this.getSeriesByName(e),s=parseInt(n.getAttribute("data:realIndex"),10);return{isHidden:n.classList.contains("apexcharts-series-collapsed"),realIndex:s}}},{key:"addCollapsedClassToSeries",value:function(e,n){var s=this.w;function i(o){for(var r=0;r<o.length;r++)o[r].index===n&&e.node.classList.add("apexcharts-series-collapsed")}i(s.globals.collapsedSeries),i(s.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],s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],i=this.w,o=ue.clone(i.globals.initialSeries);i.globals.previousPaths=[],s?(i.globals.collapsedSeries=[],i.globals.ancillaryCollapsedSeries=[],i.globals.collapsedSeriesIndices=[],i.globals.ancillaryCollapsedSeriesIndices=[]):o=this.emptyCollapsedSeries(o),i.config.series=o,e&&(n&&(i.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(o,i.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(e){for(var n=this.w,s=0;s<e.length;s++)n.globals.collapsedSeriesIndices.indexOf(s)>-1&&(e[s].data=[]);return e}},{key:"highlightSeries",value:function(e){var n=this.w,s=this.getSeriesByName(e),i=parseInt(s==null?void 0:s.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(i,"']")),a=n.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(i,"']"));var c=n.globals.seriesYAxisReverseMap[i];l=n.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(c,"']"))}else r=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+1,"']"));else r=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(i+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 s=this.w;n||(n=e.target);var i=s.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis");if(e.type==="mousemove"){var o=parseInt(n.getAttribute("rel"),10)-1;this.highlightSeries(s.globals.seriesNames[o])}else if(e.type==="mouseout")for(var r=0;r<i.length;r++)i[r].classList.remove(this.legendInactiveClass)}},{key:"highlightRangeInSeries",value:function(e,n){var s=this,i=this.w,o=i.globals.dom.baseEl.getElementsByClassName("apexcharts-heatmap-rect"),r=function(c){for(var u=0;u<o.length;u++)o[u].classList[c](s.legendInactiveClass)};if(e.type==="mousemove"){var a=parseInt(n.getAttribute("rel"),10)-1;r("add");var l=i.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(s.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]:[],s=this.w,i=0;if(s.config.series.length>1){for(var o=s.config.series.map(function(a,l){return a.data&&a.data.length>0&&s.globals.collapsedSeriesIndices.indexOf(l)===-1&&(!s.globals.comboCharts||n.length===0||n.length&&n.indexOf(s.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){i=o[r];break}}return i}},{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 s=e.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(e.config.chart.type," .apexcharts-series"));if(s.length>0)for(var i=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<s.length;o++)i(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,s=new Ve(this.ctx),i=e.globals.svgWidth/2,o=e.globals.svgHeight/2,r="middle";if(e.globals.noData=!0,e.globals.animationEnded=!0,n.align==="left"?(i=10,r="start"):n.align==="right"&&(i=e.globals.svgWidth-10,r="end"),n.verticalAlign==="top"?o=50:n.verticalAlign==="bottom"&&(o=e.globals.svgHeight-50),i+=n.offsetX,o=o+parseInt(n.style.fontSize,10)+2+n.offsetY,n.text!==void 0&&n.text!==""){var a=s.drawText({x:i,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,s=0;s<e.length;s++)if(e[s].length===0)for(var i=0;i<e[n.globals.maxValsInArrayIndex].length;i++)e[s].push(0);return e}},{key:"hasAllSeriesEqualX",value:function(){for(var e=!0,n=this.w,s=this.filteredSeriesX(),i=0;i<s.length-1;i++)if(s[i][0]!==s[i+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}(),N5=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new rs(this.ctx)}return lt(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var e=this.w.config.series.slice(),n=new Ko(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 Ko(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 s=this.w.config,i=this.w.globals,o=s.chart.type==="boxPlot"||s.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(ue.parseNumber(e[n].data[r][1][3])):e[n].data[r].length>=5?this.twoDSeries.push(ue.parseNumber(e[n].data[r][4])):this.twoDSeries.push(ue.parseNumber(e[n].data[r][1])),i.dataFormatXNumeric=!0),s.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]),i.isDataXYZ=!0)}},{key:"handleFormatXY",value:function(e,n){var s=this.w.config,i=this.w.globals,o=new zs(this.ctx),r=n;i.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(ue.parseNumber(e[n].data[a].y[e[n].data[a].y.length-1])):this.twoDSeries.push(ue.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||s.xaxis.convertedCatToNumeric){var h=i.isBarHorizontal&&i.isRangeData;s.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"||(i.isXNumeric=!0)):this.twoDSeriesX.push(o.parseDate(e[r].data[l].x))}else s.xaxis.type==="datetime"?this.twoDSeriesX.push(o.parseDate(e[r].data[l].x.toString())):(i.dataFormatXNumeric=!0,i.isXNumeric=!0,this.twoDSeriesX.push(parseFloat(e[r].data[l].x)));else u?(this.fallbackToCategory=!0,this.twoDSeriesX.push(e[r].data[l].x)):(i.isXNumeric=!0,i.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);i.isDataXYZ=!0}}},{key:"handleRangeData",value:function(e,n){var s=this.w.globals,i={};return this.isFormat2DArray()?i=this.handleRangeDataFormat("array",e,n):this.isFormatXY()&&(i=this.handleRangeDataFormat("xy",e,n)),s.seriesRangeStart.push(i.start===void 0?[]:i.start),s.seriesRangeEnd.push(i.end===void 0?[]:i.end),s.seriesRange.push(i.rangeUniques),s.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))}})})}),i}},{key:"handleCandleStickBoxData",value:function(e,n){var s=this.w.globals,i={};return this.isFormat2DArray()?i=this.handleCandleStickBoxDataFormat("array",e,n):this.isFormatXY()&&(i=this.handleCandleStickBoxDataFormat("xy",e,n)),s.seriesCandleO[n]=i.o,s.seriesCandleH[n]=i.h,s.seriesCandleM[n]=i.m,s.seriesCandleL[n]=i.l,s.seriesCandleC[n]=i.c,i}},{key:"handleRangeDataFormat",value:function(e,n,s){var i=[],o=[],r=n[s].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[s].data.length;a++)Array.isArray(n[s].data[a])?(i.push(n[s].data[a][1][0]),o.push(n[s].data[a][1][1])):(i.push(n[s].data[a]),o.push(n[s].data[a]));else if(e==="xy")for(var l=function(u){var d=Array.isArray(n[s].data[u].y),h=ue.randomId(),f=n[s].data[u].x,p={y1:d?n[s].data[u].y[0]:n[s].data[u].y,y2:d?n[s].data[u].y[1]:n[s].data[u].y,rangeName:h};n[s].data[u].rangeName=h;var m=r.findIndex(function(b){return b.x===f});r[m].y.push(p),i.push(p.y1),o.push(p.y2)},c=0;c<n[s].data.length;c++)l(c);return{start:i,end:o,rangeUniques:r}}},{key:"handleCandleStickBoxDataFormat",value:function(e,n,s){var i=this.w,o=i.config.chart.type==="boxPlot"||i.config.series[s].type==="boxPlot",r=[],a=[],l=[],c=[],u=[];if(e==="array")if(o&&n[s].data[0].length===6||!o&&n[s].data[0].length===5)for(var d=0;d<n[s].data.length;d++)r.push(n[s].data[d][1]),a.push(n[s].data[d][2]),o?(l.push(n[s].data[d][3]),c.push(n[s].data[d][4]),u.push(n[s].data[d][5])):(c.push(n[s].data[d][3]),u.push(n[s].data[d][4]));else for(var h=0;h<n[s].data.length;h++)Array.isArray(n[s].data[h][1])&&(r.push(n[s].data[h][1][0]),a.push(n[s].data[h][1][1]),o?(l.push(n[s].data[h][1][2]),c.push(n[s].data[h][1][3]),u.push(n[s].data[h][1][4])):(c.push(n[s].data[h][1][2]),u.push(n[s].data[h][1][3])));else if(e==="xy")for(var f=0;f<n[s].data.length;f++)Array.isArray(n[s].data[f].y)&&(r.push(n[s].data[f].y[0]),a.push(n[s].data[f].y[1]),o?(l.push(n[s].data[f].y[2]),c.push(n[s].data[f].y[3]),u.push(n[s].data[f].y[4])):(c.push(n[s].data[f].y[2]),u.push(n[s].data[f].y[3])));return{o:r,h:a,m:l,l:c,c:u}}},{key:"parseDataAxisCharts",value:function(e){var n=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.ctx,i=this.w.config,o=this.w.globals,r=new zs(s),a=i.labels.length>0?i.labels.slice():i.xaxis.categories.slice();o.isRangeBar=i.chart.type==="rangeBar"&&o.isBarHorizontal,o.hasXaxisGroups=i.xaxis.type==="category"&&i.xaxis.group.groups.length>0,o.hasXaxisGroups&&(o.groups=i.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=Cs(new Set(i.series.map(function(f){return f.group})));i.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(i.chart.type!=="rangeBar"&&i.chart.type!=="rangeArea"&&e[d].type!=="rangeBar"&&e[d].type!=="rangeArea"||(o.isRangeData=!0,i.chart.type!=="rangeBar"&&i.chart.type!=="rangeArea"||this.handleRangeData(e,d)),this.isMultiFormat())this.isFormat2DArray()?this.handleFormat2DArray(e,d):this.isFormatXY()&&this.handleFormatXY(e,d),i.chart.type!=="candlestick"&&e[d].type!=="candlestick"&&i.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{i.xaxis.type==="datetime"?(o.isXNumeric=!0,u(),o.seriesX.push(this.twoDSeriesX)):i.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 ue.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,s=this.w.config;n.series=e.slice(),n.seriesNames=s.labels.slice();for(var i=0;i<n.series.length;i++)n.seriesNames[i]===void 0&&n.seriesNames.push("series-"+(i+1));return this.w}},{key:"handleExternalLabelsData",value:function(e){var n=this.w.config,s=this.w.globals;n.xaxis.categories.length>0?s.labels=n.xaxis.categories:n.labels.length>0?s.labels=n.labels.slice():this.fallbackToCategory?(s.labels=s.labels[0],s.seriesRange.length&&(s.seriesRange.map(function(i){i.forEach(function(o){s.labels.indexOf(o.x)<0&&o.x&&s.labels.push(o.x)})}),s.labels=Array.from(new Set(s.labels.map(JSON.stringify)),JSON.parse)),n.xaxis.convertedCatToNumeric&&(new Rg(n).convertCatToNumericXaxis(n,this.ctx,s.seriesX[0]),this._generateExternalLabels(e))):this._generateExternalLabels(e)}},{key:"_generateExternalLabels",value:function(e){var n=this.w.globals,s=this.w.config,i=[];if(n.axisCharts){if(n.series.length>0)if(this.isFormatXY())for(var o=s.series.map(function(d,h){return d.data.filter(function(f,p,m){return m.findIndex(function(b){return b.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++)i.push(a+1);else for(var l=0;l<n.series[n.maxValsInArrayIndex].length;l++)i.push(l+1);n.seriesX=[];for(var c=0;c<e.length;c++)n.seriesX.push(i);this.w.globals.isBarHorizontal||(n.isXNumeric=!0)}if(i.length===0){i=n.axisCharts?[]:n.series.map(function(d,h){return h+1});for(var u=0;u<e.length;u++)n.seriesX.push(i)}n.labels=i,s.xaxis.convertedCatToNumeric&&(n.categoryLabels=i.map(function(d){return s.xaxis.labels.formatter(d)})),n.noLabelsProvided=!0}},{key:"parseData",value:function(e){var n=this.w,s=n.config,i=n.globals;if(this.excludeCollapsedSeriesInYAxis(),this.fallbackToCategory=!1,this.ctx.core.resetGlobals(),this.ctx.core.isMultipleY(),i.axisCharts?(this.parseDataAxisCharts(e),this.coreUtils.getLargestSeries()):this.parseDataNonAxisCharts(e),s.chart.stacked){var o=new Ko(this.ctx);i.series=o.setNullSeriesToZeroValues(i.series)}this.coreUtils.getSeriesTotals(),i.axisCharts&&(i.stackedSeriesTotals=this.coreUtils.getStackedSeriesTotals(),i.stackedSeriesTotalsByGroups=this.coreUtils.getStackedSeriesTotalsByGroups()),this.coreUtils.getPercentSeries(),i.dataFormatXNumeric||i.isXNumeric&&(s.xaxis.type!=="numeric"||s.labels.length!==0||s.xaxis.categories.length!==0)||this.handleExternalLabelsData(e);for(var r=this.coreUtils.getCategoryLabels(i.labels),a=0;a<r.length;a++)if(Array.isArray(r[a])){i.isMultiLineX=!0;break}}},{key:"excludeCollapsedSeriesInYAxis",value:function(){var e=this.w,n=[];e.globals.seriesYAxisMap.forEach(function(s,i){var o=0;s.forEach(function(r){e.globals.collapsedSeriesIndices.indexOf(r)!==-1&&o++}),o>0&&o==s.length&&n.push(i)}),e.globals.ignoreYAxisIndexes=n.map(function(s){return s})}}]),t}(),hy=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"scaleSvgNode",value:function(e,n){var s=parseFloat(e.getAttributeNS(null,"width")),i=parseFloat(e.getAttributeNS(null,"height"));e.setAttributeNS(null,"width",s*n),e.setAttributeNS(null,"height",i*n),e.setAttributeNS(null,"viewBox","0 0 "+s+" "+i)}},{key:"getSvgString",value:function(){var e=this;return new Promise(function(n){var s=e.w,i=s.config.chart.toolbar.export.width,o=s.config.chart.toolbar.export.scale||i/s.globals.svgWidth;o||(o=1);var r=e.w.globals.dom.Paper.svg(),a=e.w.globals.dom.Paper.node.cloneNode(!0);o!==1&&e.scaleSvgNode(a,o),e.convertImagesToBase64(a).then(function(){r=new XMLSerializer().serializeToString(a),n(r.replace(/ /g," "))})})}},{key:"convertImagesToBase64",value:function(e){var n=this,s=e.getElementsByTagName("image"),i=Array.from(s).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(i)}},{key:"getBase64FromUrl",value:function(e){return new Promise(function(n,s){var i=new Image;i.crossOrigin="Anonymous",i.onload=function(){var o=document.createElement("canvas");o.width=i.width,o.height=i.height,o.getContext("2d").drawImage(i,0,0),n(o.toDataURL())},i.onerror=s,i.src=e})}},{key:"cleanup",value:function(){var e=this.w,n=e.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),s=e.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(i,function(o){o.setAttribute("width",0)}),n&&n[0]&&(n[0].setAttribute("x",-500),n[0].setAttribute("x1",-500),n[0].setAttribute("x2",-500)),s&&s[0]&&(s[0].setAttribute("y",-100),s[0].setAttribute("y1",-100),s[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){var e=this;return new Promise(function(n){e.cleanup(),e.getSvgString().then(function(s){var i=new Blob([s],{type:"image/svg+xml;charset=utf-8"});n(URL.createObjectURL(i))})})}},{key:"dataURI",value:function(e){var n=this;return new Promise(function(s){var i=n.w,o=e?e.scale||e.width/i.globals.svgWidth:1;n.cleanup();var r=document.createElement("canvas");r.width=i.globals.svgWidth*o,r.height=parseInt(i.globals.dom.elWrap.style.height,10)*o;var a=i.config.chart.background!=="transparent"&&i.config.chart.background?i.config.chart.background:"#fff",l=r.getContext("2d");l.fillStyle=a,l.fillRect(0,0,r.width*o,r.height*o),n.getSvgString().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();s({blob:h})}else{var f=r.toDataURL("image/png");s({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,s=this.w.config.chart.toolbar.export.width,i=n?{scale:n}:s?{width:s}:void 0;this.dataURI(i).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,s=e.series,i=e.fileName,o=e.columnDelimiter,r=o===void 0?",":o,a=e.lineDelimiter,l=a===void 0?` | |
| 173 | -`:a,c=this.w;s||(s=c.config.series);var u=[],d=[],h="",f=c.globals.series.map(function(S,E){return c.globals.collapsedSeriesIndices.indexOf(E)===-1?S:[]}),p=function(S){return typeof c.config.chart.toolbar.export.csv.categoryFormatter=="function"?c.config.chart.toolbar.export.csv.categoryFormatter(S):c.config.xaxis.type==="datetime"&&String(S).length>=10?new Date(S).toDateString():ue.isNumber(S)?S:S.split(r).join("")},m=function(S){return typeof c.config.chart.toolbar.export.csv.valueFormatter=="function"?c.config.chart.toolbar.export.csv.valueFormatter(S):S},b=Math.max.apply(Math,Cs(s.map(function(S){return S.data?S.data.length:0}))),y=new N5(this.ctx),C=new xc(this.ctx),k=function(S){var E="";if(c.globals.axisCharts){if(c.config.xaxis.type==="category"||c.config.xaxis.convertedCatToNumeric)if(c.globals.isBarHorizontal){var T=c.globals.yLabelFormatters[0],P=new Ko(n.ctx).getActiveConfigSeriesIndex();E=T(c.globals.labels[S],{seriesIndex:P,dataPointIndex:S,w:c})}else E=C.getLabel(c.globals.labels,c.globals.timescaleLabels,0,S).text;c.config.xaxis.type==="datetime"&&(c.config.xaxis.categories.length?E=c.config.xaxis.categories[S]:c.config.labels.length&&(E=c.config.labels[S]))}else E=c.config.labels[S];return E===null?"nullvalue":(Array.isArray(E)&&(E=E.join(" ")),ue.isNumber(E)?E:E.split(r).join(""))},x=function(S,E){if(u.length&&E===0&&d.push(u.join(r)),S.data){S.data=S.data.length&&S.data||Cs(Array(b)).map(function(){return""});for(var T=0;T<S.data.length;T++){u=[];var P=k(T);if(P!=="nullvalue"){if(P||(y.isFormatXY()?P=s[E].data[T].x:y.isFormat2DArray()&&(P=s[E].data[T]?s[E].data[T][0]:"")),E===0){u.push(p(P));for(var I=0;I<c.globals.series.length;I++){var L,V=y.isFormatXY()?(L=s[I].data[T])===null||L===void 0?void 0:L.y:f[I][T];u.push(m(V))}}(c.config.chart.type==="candlestick"||S.type&&S.type==="candlestick")&&(u.pop(),u.push(c.globals.seriesCandleO[E][T]),u.push(c.globals.seriesCandleH[E][T]),u.push(c.globals.seriesCandleL[E][T]),u.push(c.globals.seriesCandleC[E][T])),(c.config.chart.type==="boxPlot"||S.type&&S.type==="boxPlot")&&(u.pop(),u.push(c.globals.seriesCandleO[E][T]),u.push(c.globals.seriesCandleH[E][T]),u.push(c.globals.seriesCandleM[E][T]),u.push(c.globals.seriesCandleL[E][T]),u.push(c.globals.seriesCandleC[E][T])),c.config.chart.type==="rangeBar"&&(u.pop(),u.push(c.globals.seriesRangeStart[E][T]),u.push(c.globals.seriesRangeEnd[E][T])),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")):s.map(function(S,E){var T=(S.name?S.name:"series-".concat(E))+"";c.globals.axisCharts&&u.push(T.split(r).join("")?T.split(r).join(""):"series-".concat(E))}),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?s.map(function(S,E){c.globals.axisCharts?x(S,E):((u=[]).push(p(c.globals.labels[E])),u.push(m(f[E])),d.push(u.join(r)))}):function(){var S=new Set,E={};s.forEach(function(T,P){T==null||T.data.forEach(function(I){var L,V;if(y.isFormatXY())L=I.x,V=I.y;else{if(!y.isFormat2DArray())return;L=I[0],V=I[1]}E[L]||(E[L]=Array(s.length).fill("")),E[L][P]=m(V),S.add(L)})}),u.length&&d.push(u.join(r)),Array.from(S).sort().forEach(function(T){d.push([p(T),E[T].join(r)])})}(),h+=d.join(l),this.triggerDownload("data:text/csv; charset=utf-8,"+encodeURIComponent("\uFEFF"+h),i||c.config.chart.toolbar.export.csv.filename,".csv")}},{key:"triggerDownload",value:function(e,n,s){var i=document.createElement("a");i.href=e,i.download=(n||this.w.globals.chartID)+s,document.body.appendChild(i),i.click(),document.body.removeChild(i)}}]),t}(),Fg=function(){function t(e,n){at(this,t),this.ctx=e,this.elgrid=n,this.w=e.w;var s=this.w;this.axesUtils=new xc(e),this.xaxisLabels=s.globals.labels.slice(),s.globals.timescaleLabels.length>0&&!s.globals.isBarHorizontal&&(this.xaxisLabels=s.globals.timescaleLabels.slice()),s.config.xaxis.overwriteCategories&&(this.xaxisLabels=s.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],s.config.xaxis.position==="top"?this.offY=0:this.offY=s.globals.gridHeight,this.offY=this.offY+s.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=s.config.chart.type==="bar"&&s.config.plotOptions.bar.horizontal,this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.xaxisBorderWidth=s.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=s.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=s.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=s.config.xaxis.axisBorder.height,this.yaxis=s.config.yaxis[0]}return lt(t,[{key:"drawXaxis",value:function(){var e=this.w,n=new Ve(this.ctx),s=n.group({class:"apexcharts-xaxis",transform:"translate(".concat(e.config.xaxis.offsetX,", ").concat(e.config.xaxis.offsetY,")")}),i=n.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});s.add(i);for(var o=[],r=0;r<this.xaxisLabels.length;r++)o.push(this.xaxisLabels[r]);if(this.drawXAxisLabelAndGroup(!0,n,i,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,i,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),s.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):s.add(f)}return s}},{key:"drawXAxisLabelAndGroup",value:function(e,n,s,i,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,b=c.fontWeight||h.config.xaxis.labels.style.fontWeight,y=c.cssClass||h.config.xaxis.labels.style.cssClass,C=h.globals.padHorizontal,k=i.length,x=h.config.xaxis.type==="category"?h.globals.dataPoints:k;if(x===0&&k>x&&(x=k),o){var S=Math.max(Number(h.config.xaxis.tickAmount)||1,x>1?x-1:x);a=h.globals.gridWidth/Math.min(S,k-1),C=C+r(0,a)/2+h.config.xaxis.labels.offsetX}else a=h.globals.gridWidth/x,C=C+r(0,a)+h.config.xaxis.labels.offsetX;for(var E=function(P){var I=C-r(P,a)/2+h.config.xaxis.labels.offsetX;P===0&&k===1&&a/2===C&&x===1&&(I=h.globals.gridWidth/2);var L=l.axesUtils.getLabel(i,h.globals.timescaleLabels,I,P,u,f,e),V=28;if(h.globals.rotateXLabels&&e&&(V=22),h.config.xaxis.title.text&&h.config.xaxis.position==="top"&&(V+=parseFloat(h.config.xaxis.title.style.fontSize)+2),e||(V=V+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(P,L,k):l.axesUtils.checkForOverflowingLabels(P,L,k,u,d),h.config.xaxis.labels.show){var D=n.drawText({x:L.x,y:l.offY+h.config.xaxis.labels.offsetY+V-(h.config.xaxis.position==="top"?h.globals.xAxisHeight+h.config.xaxis.axisTicks.height-2:0),text:L.text,textAnchor:"middle",fontWeight:L.isBold?600:b,fontSize:f,fontFamily:p,foreColor:Array.isArray(m)?e&&h.config.xaxis.convertedCatToNumeric?m[h.globals.minX+P-1]:m[P]:m,isPlainText:!1,cssClass:(e?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+y});if(s.add(D),D.on("click",function(Y){if(typeof h.config.chart.events.xAxisLabelClick=="function"){var B=Object.assign({},h,{labelIndex:P});h.config.chart.events.xAxisLabelClick(Y,l.ctx,B)}}),e){var z=document.createElementNS(h.globals.SVGNS,"title");z.textContent=Array.isArray(L.text)?L.text.join(" "):L.text,D.node.appendChild(z),L.text!==""&&(u.push(L.text),d.push(L))}}P<k-1&&(C+=r(P+1,a))},T=0;T<=k-1;T++)E(T)}},{key:"drawXaxisInversed",value:function(e){var n,s,i=this,o=this.w,r=new Ve(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,s=-n/2.2;var h=o.globals.yLabelFormatters[0],f=o.config.yaxis[0].labels;if(f.show)for(var p=function(S){var E=u[S]===void 0?"":u[S];E=h(E,{seriesIndex:e,dataPointIndex:S,w:o});var T=i.axesUtils.getYAxisForeColor(f.style.colors,e),P=0;Array.isArray(E)&&(P=E.length/2*parseInt(f.style.fontSize,10));var I=f.offsetX-15,L="end";i.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 V=r.drawText({x:I,y:s+n+f.offsetY-P,text:E,textAnchor:L,foreColor:Array.isArray(T)?T[S]:T,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(V),V.on("click",function(Y){if(typeof o.config.chart.events.xAxisLabelClick=="function"){var B=Object.assign({},o,{labelIndex:S});o.config.chart.events.xAxisLabelClick(Y,i.ctx,B)}});var D=document.createElementNS(o.globals.SVGNS,"title");if(D.textContent=Array.isArray(E)?E.join(" "):E,V.node.appendChild(D),o.config.yaxis[e].labels.rotate!==0){var z=r.rotateAroundCenter(V.node);V.node.setAttribute("transform","rotate(".concat(o.config.yaxis[e].labels.rotate," 0 ").concat(z.y,")"))}s+=n},m=0;m<=u.length-1;m++)p(m);if(o.config.yaxis[0].title.text!==void 0){var b=r.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+a+", 0)"}),y=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});b.add(y),l.add(b)}var C=0;this.isCategoryBarHorizontal&&o.config.yaxis[0].opposite&&(C=o.globals.gridWidth);var k=o.config.xaxis.axisBorder;if(k.show){var x=r.drawLine(o.globals.padHorizontal+k.offsetX+C,1+k.offsetY,o.globals.padHorizontal+k.offsetX+C,o.globals.gridHeight+k.offsetY,k.color,0);this.elgrid&&this.elgrid.elGridBorders&&o.config.grid.show?this.elgrid.elGridBorders.add(x):l.add(x)}return o.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(C,u.length,o.config.yaxis[0].axisBorder,o.config.yaxis[0].axisTicks,0,n,l),l}},{key:"drawXaxisTicks",value:function(e,n,s){var i=this.w,o=e;if(!(e<0||e-2>i.globals.gridWidth)){var r=this.offY+i.config.xaxis.axisTicks.offsetY;if(n=n+r+i.config.xaxis.axisTicks.height,i.config.xaxis.position==="top"&&(n=r-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){var a=new Ve(this.ctx).drawLine(e+i.config.xaxis.axisTicks.offsetX,r+i.config.xaxis.offsetY,o+i.config.xaxis.axisTicks.offsetX,n+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);s.add(a),a.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var e=this.w,n=[],s=this.xaxisLabels.length,i=e.globals.padHorizontal;if(e.globals.timescaleLabels.length>0)for(var o=0;o<s;o++)i=this.xaxisLabels[o].position,n.push(i);else for(var r=s,a=0;a<r;a++){var l=r;e.globals.isXNumeric&&e.config.chart.type!=="bar"&&(l-=1),i+=e.globals.gridWidth/l,n.push(i)}return n}},{key:"xAxisLabelCorrections",value:function(){var e=this.w,n=new Ve(this.ctx),s=e.globals.dom.baseEl.querySelector(".apexcharts-xaxis-texts-g"),i=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<i.length;a++){var l=n.rotateAroundCenter(i[a]);l.y=l.y-1,l.x=l.x+1,i[a].setAttribute("transform","rotate(".concat(e.config.xaxis.labels.rotate," ").concat(l.x," ").concat(l.y,")")),i[a].setAttribute("text-anchor","end"),s.setAttribute("transform","translate(0, ".concat(-10,")"));var c=i[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<i.length;p++){var m=i[p].childNodes;e.config.xaxis.labels.trim&&e.config.xaxis.type!=="datetime"&&Array.prototype.forEach.call(m,function(b){n.placeTextWithEllipsis(b,b.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}(),tU=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.xaxisLabels=n.globals.labels.slice(),this.axesUtils=new xc(e),this.isRangeBar=n.globals.seriesRange.length&&n.globals.isBarHorizontal,n.globals.timescaleLabels.length>0&&(this.xaxisLabels=n.globals.timescaleLabels.slice())}return lt(t,[{key:"drawGridArea",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,n=this.w,s=new Ve(this.ctx);e||(e=s.group({class:"apexcharts-grid"}));var i=s.drawLine(n.globals.padHorizontal,1,n.globals.padHorizontal,n.globals.gridHeight,"transparent"),o=s.drawLine(n.globals.padHorizontal,n.globals.gridHeight,n.globals.gridWidth,n.globals.gridHeight,"transparent");return e.add(o),e.add(i),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,s=new Ve(this.ctx),i=Array.isArray(e.config.stroke.width)?Math.max.apply(Math,Cs(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=s.drawRect(0,0,n.gridWidth,n.gridHeight,0,"#fff"),n.dom.elGridRectBar=s.drawRect(-i/2-r-2,-i/2-2,n.gridWidth+i+a+r+4,n.gridHeight+i+4,0,"#fff");var l=e.globals.markers.largestSize;n.dom.elGridRectMarker=s.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,s=e.x1,i=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:s,y1:i,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 Fg(this.ctx).drawXaxisTicks(s,u,c.globals.dom.elGraphical)}}},{key:"_drawGridLine",value:function(e){var n=e.i,s=e.x1,i=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=i===0&&r===0||s===0&&o===0||i===c.globals.gridHeight&&r===c.globals.gridHeight||c.globals.isBarHorizontal&&(n===0||n===a-1),f=new Ve(this).drawLine(s-(u?d:0),i,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,s=e.x1,i=e.y1,o=e.x2,r=e.y2,a=e.type,l=this.w,c=new Ve(this.ctx),u=l.globals.barPadForNumericAxis,d=l.config.grid[a].colors[n],h=c.drawRect(s-(a==="row"?u:0),i,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,s=e.xCount,i=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,b=p.x1,y=p.y1,C=p.x2,k=p.y2,x=0;x<m;x++)b=n.xaxisLabels[x].position,C=n.xaxisLabels[x].position,n._drawGridLines({i:x,x1:b,y1:y,x2:C,y2:k,xCount:s,parent:n.elgridLinesV})}({xC:s,x1:a,y1:0,x2:r,y2:l}):(o.globals.isXNumeric&&(s=o.globals.xAxisScale.result.length),function(p){for(var m=p.xC,b=p.x1,y=p.y1,C=p.x2,k=p.y2,x=0;x<m+(o.globals.isXNumeric?0:1);x++)x===0&&m===1&&o.globals.dataPoints===1&&(C=b=o.globals.gridWidth/2),n._drawGridLines({i:x,x1:b,y1:y,x2:C,y2:k,xCount:s,parent:n.elgridLinesV}),C=b+=o.globals.gridWidth/(o.globals.isXNumeric?m-1:m)}({xC:s,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=i+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:i)}}},{key:"_drawInvertedXYLines",value:function(e){var n=e.xCount,s=this.w;if(s.config.grid.xaxis.lines.show||s.config.xaxis.axisTicks.show)for(var i,o=s.globals.padHorizontal,r=s.globals.gridHeight,a=0;a<n+1;a++)s.config.grid.xaxis.lines.show&&this._drawGridLine({i:a,xCount:n+1,x1:o,y1:0,x2:i,y2:r,parent:this.elgridLinesV}),new Fg(this.ctx).drawXaxisTicks(o,0,s.globals.dom.elGraphical),i=o+=s.globals.gridWidth/n;if(s.config.grid.yaxis.lines.show)for(var l=0,c=0,u=s.globals.gridWidth,d=0;d<s.globals.dataPoints+1;d++)this._drawGridLine({i:d,xCount:s.globals.dataPoints+1,x1:0,y1:l,x2:u,y2:c,parent:this.elgridLinesH}),c=l+=s.globals.gridHeight/s.globals.dataPoints}},{key:"renderGrid",value:function(){var e=this.w,n=e.globals,s=new Ve(this.ctx);this.elg=s.group({class:"apexcharts-grid"}),this.elgridLinesH=s.group({class:"apexcharts-gridlines-horizontal"}),this.elgridLinesV=s.group({class:"apexcharts-gridlines-vertical"}),this.elGridBorders=s.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 i=0;i<n.seriesYAxisMap.length&&n.ignoreYAxisIndexes.includes(i);)i++;i===n.seriesYAxisMap.length&&(i=0);var o,r=n.yAxisScale[i].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[i])===null||l===void 0||(c=l.result)===null||c===void 0?void 0:c.length)>0&&e.config.xaxis.type!=="datetime"&&(o=n.yAxisScale[i].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 s,i,o=this,r=this.w;if(((s=r.config.grid.row.colors)===null||s===void 0?void 0:s.length)>0&&function(p,m,b,y,C,k){for(var x=0,S=0;x<m;x++,S++)S>=r.config.grid[p].colors.length&&(S=0),o._drawGridBandRect({c:S,x1:b,y1:y,x2:C,y2:k,type:p}),y+=r.globals.gridHeight/n}("row",n,0,0,r.globals.gridWidth,r.globals.gridHeight/n),((i=r.config.grid.column.colors)===null||i===void 0?void 0:i.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}(),nU=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new rs(this.ctx)}return lt(t,[{key:"niceScale",value:function(e,n){var s,i,o,r,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,l=1e-11,c=this.w,u=c.globals;u.isBarHorizontal?(s=c.config.xaxis,i=Math.max((u.svgWidth-100)/25,2)):(s=c.config.yaxis[a],i=Math.max((u.svgHeight-100)/15,2)),ue.isNumber(i)||(i=10),o=s.min!==void 0&&s.min!==null,r=s.max!==void 0&&s.min!==null;var d=s.stepSize!==void 0&&s.stepSize!==null,h=s.tickAmount!==void 0&&s.tickAmount!==null,f=h?s.tickAmount:u.niceScaleDefaultTicks[Math.min(Math.round(i/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||!ue.isNumber(e)&&!ue.isNumber(n)||e===Number.MIN_VALUE&&n===-Number.MAX_VALUE)&&(e=ue.isNumber(s.min)?s.min:0,n=ue.isNumber(s.max)?s.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 b=f,y=Math.abs(n-e);!o&&e>0&&e/y<.15&&(e=0,o=!0),!r&&n<0&&-n/y<.15&&(n=0,r=!0);var C=(y=Math.abs(n-e))/b,k=C,x=Math.floor(Math.log10(k)),S=Math.pow(10,x),E=Math.ceil(k/S);if(C=k=(E=u.niceScaleAllowedMagMsd[u.yValueDecimal===0?0:1][E])*S,u.isBarHorizontal&&s.stepSize&&s.type!=="datetime"?(C=s.stepSize,d=!0):d&&(C=s.stepSize),d&&s.forceNiceScale){var T=Math.floor(Math.log10(C));C*=Math.pow(10,x-T)}if(o&&r){var P=y/b;if(h)if(d)if(ue.mod(y,C)!=0){var I=ue.getGCD(C,P);C=P/I<10?I:P}else ue.mod(C,P)==0?C=P:(P=C,h=!1);else C=P;else if(d)ue.mod(y,C)==0?P=C:C=P;else if(ue.mod(y,C)==0)P=C;else{P=y/(b=Math.ceil(y/C));var L=ue.getGCD(y,C);y/L<i&&(P=L),C=P}b=Math.round(y/C)}else{if(o||r){if(r)if(h)e=n-C*b;else{var V=e;e=C*Math.floor(e/C),Math.abs(n-e)/ue.getGCD(y,C)>i&&(e=n-C*f,e+=C*Math.floor((V-e)/C))}else if(o)if(h)n=e+C*b;else{var D=n;n=C*Math.ceil(n/C),Math.abs(n-e)/ue.getGCD(y,C)>i&&(n=e+C*f,n+=C*Math.ceil((D-n)/C))}}else if(u.isMultipleYAxis&&h){var z=C*Math.floor(e/C),Y=z+C*b;Y<n&&(C*=2),Y=n,n=(e=z)+C*b,y=Math.abs(n-e),e>0&&e<Math.abs(Y-n)&&(e=0,n=C*b),n<0&&-n<Math.abs(z-e)&&(n=0,e=-C*b)}else e=C*Math.floor(e/C),n=C*Math.ceil(n/C);y=Math.abs(n-e),C=ue.getGCD(y,C),b=Math.round(y/C)}if(h||o||r||(b=Math.ceil((y-l)/(C+l)))>16&&ue.getPrimeFactors(b).length<2&&b++,!h&&s.forceNiceScale&&u.yValueDecimal===0&&b>y&&(b=y,C=Math.round(y/b)),b>i&&(!h&&!d||s.forceNiceScale)){var B=ue.getPrimeFactors(b),U=B.length-1,X=b;e:for(var K=0;K<U;K++)for(var N=0;N<=U-K;N++){for(var F=Math.min(N+K,U),Q=X,ie=1,Z=N;Z<=F;Z++)ie*=B[Z];if((Q/=ie)<i){X=Q;break e}}C=X===b?y:y/X,b=Math.round(y/C)}u.isMultipleYAxis&&u.multiAxisTickAmount==0&&u.ignoreYAxisIndexes.indexOf(a)<0&&(u.multiAxisTickAmount=b);var me=e-C,Se=C*l;do me+=C,m.push(ue.stripNumber(me,7));while(n-me>Se);return{result:m,niceMin:m[0],niceMax:m[m.length-1]}}},{key:"linearScale",value:function(e,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:10,i=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]};(s=this._adjustTicksForSmallRange(s,i,r))==="dataPoints"&&(s=this.w.globals.dataPoints-1),o||(o=r/s),o=Math.round(10*(o+Number.EPSILON))/10,s===Number.MAX_VALUE&&(s=5,o=1);for(var l=e;s>=0;)a.push(l),l=ue.preciseAddition(l,o),s-=1;return{result:a,niceMin:a[0],niceMax:a[a.length-1]}}},{key:"logarithmicScaleNice",value:function(e,n,s){n<=0&&(n=Math.max(e,s)),e<=0&&(e=Math.min(n,s));for(var i=[],o=Math.ceil(Math.log(n)/Math.log(s)+1),r=Math.floor(Math.log(e)/Math.log(s));r<o;r++)i.push(Math.pow(s,r));return{result:i,niceMin:i[0],niceMax:i[i.length-1]}}},{key:"logarithmicScale",value:function(e,n,s){n<=0&&(n=Math.max(e,s)),e<=0&&(e=Math.min(n,s));for(var i=[],o=Math.log(n)/Math.log(s),r=Math.log(e)/Math.log(s),a=o-r,l=Math.round(a),c=a/l,u=0,d=r;u<l;u++,d+=c)i.push(Math.pow(s,d));return i.push(Math.pow(s,o)),{result:i,niceMin:e,niceMax:n}}},{key:"_adjustTicksForSmallRange",value:function(e,n,s){var i=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));ue.isNumber(o)&&this.w.globals.yValueDecimal===0&&(i=Math.ceil(s))}return i<e?i:e}},{key:"setYScaleForIndex",value:function(e,n,s){var i=this.w.globals,o=this.w.config,r=i.isBarHorizontal?o.xaxis:o.yaxis[e];i.yAxisScale[e]===void 0&&(i.yAxisScale[e]=[]);var a=Math.abs(s-n);r.logarithmic&&a<=5&&(i.invalidLogScale=!0),r.logarithmic&&a>5?(i.allSeriesCollapsed=!1,i.yAxisScale[e]=r.forceNiceScale?this.logarithmicScaleNice(n,s,r.logBase):this.logarithmicScale(n,s,r.logBase)):s!==-Number.MAX_VALUE&&ue.isNumber(s)&&n!==Number.MAX_VALUE&&ue.isNumber(n)?(i.allSeriesCollapsed=!1,i.yAxisScale[e]=this.niceScale(n,s,e)):i.yAxisScale[e]=this.niceScale(Number.MIN_VALUE,0,e)}},{key:"setXScale",value:function(e,n){var s=this.w,i=s.globals,o=Math.abs(n-e);if(n!==-Number.MAX_VALUE&&ue.isNumber(n)){var r=i.xTickAmount;o<10&&o>1&&(r=o),i.xAxisScale=this.linearScale(e,n,r,0,s.config.xaxis.stepSize)}else i.xAxisScale=this.linearScale(0,10,10);return i.xAxisScale}},{key:"scaleMultipleYAxes",value:function(){var e=this,n=this.w.config,s=this.w.globals;this.coreUtils.setSeriesYAxisMappings();var i=s.seriesYAxisMap,o=s.minYArr,r=s.maxYArr;s.allSeriesCollapsed=!0,s.barGroups=[],i.forEach(function(a,l){var c=[];a.forEach(function(u){var d=n.series[u].group;c.indexOf(d)<0&&c.push(d)}),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 C=new Array(s.dataPoints).fill(0),k=[],x=[],S=[];c.forEach(function(){k.push(C.map(function(){return Number.MIN_VALUE})),x.push(C.map(function(){return Number.MIN_VALUE})),S.push(C.map(function(){return Number.MIN_VALUE}))});for(var E=function(P){!u&&n.series[a[P]].type&&(u=n.series[a[P]].type);var I=a[P];d=n.series[I].group?n.series[I].group:"axis-".concat(l),!(s.collapsedSeriesIndices.indexOf(I)<0&&s.ancillaryCollapsedSeriesIndices.indexOf(I)<0)||(s.allSeriesCollapsed=!1,c.forEach(function(L,V){if(n.series[I].group===L)for(var D=0;D<s.series[I].length;D++){var z=s.series[I][D];z>=0?x[V][D]+=z:S[V][D]+=z,k[V][D]+=z,p=Math.min(p,z),m=Math.max(m,z)}})),u!=="bar"&&u!=="column"||s.barGroups.push(d)},T=0;T<a.length;T++)E(T);u||(u=n.chart.type),u==="bar"||u==="column"?c.forEach(function(P,I){h=Math.min(h,Math.min.apply(null,S[I])),f=Math.max(f,Math.max.apply(null,x[I]))}):(c.forEach(function(P,I){p=Math.min(p,Math.min.apply(null,k[I])),m=Math.max(m,Math.max.apply(null,k[I]))}),h=p,f=m),h===Number.MIN_VALUE&&f===Number.MIN_VALUE&&(f=-Number.MAX_VALUE)})();else for(var b=0;b<a.length;b++){var y=a[b];h=Math.min(h,o[y]),f=Math.max(f,r[y]),!(s.collapsedSeriesIndices.indexOf(y)<0&&s.ancillaryCollapsedSeriesIndices.indexOf(y)<0)||(s.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),s.barGroups=s.barGroups.filter(function(C,k,x){return x.indexOf(C)===k}),e.setYScaleForIndex(l,h,f),a.forEach(function(C){o[C]=s.yAxisScale[l].niceMin,r[C]=s.yAxisScale[l].niceMax})}():e.setYScaleForIndex(l,0,-Number.MAX_VALUE)})}}]),t}(),ek=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.scales=new nU(e)}return lt(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,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-Number.MAX_VALUE,i=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;i===null&&(i=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>=i){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<i;m++){r.dataPoints=Math.max(r.dataPoints,c[m].length);var b=o.series[m].type;r.categoryLabels.length&&(r.dataPoints=r.categoryLabels.filter(function(S){return S!==void 0}).length),r.labels.length&&o.xaxis.type!=="datetime"&&r.series.reduce(function(S,E){return S+E.length},0)!==0&&(r.dataPoints=Math.max(r.dataPoints,r.labels.length));var y=0,C=c[m].length-1;if(h){if(o.xaxis.min)for(;y<C&&r.seriesX[m][y]<o.xaxis.min;y++);if(o.xaxis.max)for(;C>y&&r.seriesX[m][C]>o.xaxis.max;C--);}for(var k=y;k<=C&&k<r.series[m].length;k++){var x=c[m][k];if(x!==null&&ue.isNumber(x)){switch(d[m][k]!==void 0&&(a=Math.max(a,d[m][k]),n=Math.min(n,d[m][k])),u[m][k]!==void 0&&(n=Math.min(n,u[m][k]),s=Math.max(s,u[m][k])),b){case"candlestick":r.seriesCandleC[m][k]!==void 0&&(a=Math.max(a,r.seriesCandleH[m][k]),n=Math.min(n,r.seriesCandleL[m][k]));break;case"boxPlot":r.seriesCandleC[m][k]!==void 0&&(a=Math.max(a,r.seriesCandleC[m][k]),n=Math.min(n,r.seriesCandleO[m][k]))}b&&b!=="candlestick"&&b!=="boxPlot"&&b!=="rangeArea"&&b!=="rangeBar"&&(a=Math.max(a,r.series[m][k]),n=Math.min(n,r.series[m][k])),r.seriesGoals[m]&&r.seriesGoals[m][k]&&Array.isArray(r.seriesGoals[m][k])&&r.seriesGoals[m][k].forEach(function(S){a=Math.max(a,S.value),n=Math.min(n,S.value)}),s=a,ue.isFloat(x)&&(x=ue.noExponents(x),r.yValueDecimal=Math.max(r.yValueDecimal,x.toString().split(".")[1].length)),l>u[m][k]&&u[m][k]<0&&(l=u[m][k])}else r.hasNullValues=!0}b!=="bar"&&b!=="column"||(l<0&&a<0&&(a=0,s=Math.max(s,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:s}}},{key:"setYRange",value:function(){var e=this.w.globals,n=this.w.config;e.maxY=-Number.MAX_VALUE,e.minY=Number.MIN_VALUE;var s,i=Number.MAX_VALUE;if(e.isMultipleYAxis){i=Number.MAX_VALUE;for(var o=0;o<e.series.length;o++)s=this.getMinYMaxY(o),e.minYArr[o]=s.lowestY,e.maxYArr[o]=s.highestY,i=Math.min(i,s.lowestY)}return s=this.getMinYMaxY(0,i,null,e.series.length),n.chart.type==="bar"?(e.minY=s.minY,e.maxY=s.maxY):(e.minY=s.lowestY,e.maxY=s.highestY),i=s.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&&i!==-Number.MAX_VALUE&&i!==e.maxY&&(e.minY=i):e.minY=e.minY!==Number.MIN_VALUE?Math.min(s.minY,e.minY):s.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=i):(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,s=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&&ue.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 i=10;if(n.xaxis.tickAmount===void 0)i=Math.round(e.svgWidth/150),n.xaxis.type==="numeric"&&e.dataPoints<30&&(i=e.dataPoints-1),i>e.dataPoints&&e.dataPoints!==0&&(i=e.dataPoints-1);else if(n.xaxis.tickAmount==="dataPoints"){if(e.series.length>1&&(i=e.series[e.maxValsInArrayIndex].length-1),e.isXNumeric){var o=e.maxX-e.minX;o<30&&(i=o-1)}}else i=n.xaxis.tickAmount;if(e.xTickAmount=i,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,i,i,0,n.xaxis.stepSize),e.noLabelsProvided&&e.labels.length>0&&(e.xAxisScale=this.scales.linearScale(1,e.labels.length,i-1,0,n.xaxis.stepSize),e.seriesX=e.labels.slice());s&&(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 s=0;s<e.seriesZ[n].length;s++)e.seriesZ[n][s]!==null&&ue.isNumber(e.seriesZ[n][s])&&(e.maxZ=Math.max(e.maxZ,e.seriesZ[n][s]),e.minZ=Math.min(e.minZ,e.seriesZ[n][s]))}}},{key:"_handleSingleDataPoint",value:function(){var e=this.w.globals,n=this.w.config;if(e.minX===e.maxX){var s=new zs(this.ctx);if(n.xaxis.type==="datetime"){var i=s.getDate(e.minX);n.xaxis.labels.datetimeUTC?i.setUTCDate(i.getUTCDate()-2):i.setDate(i.getDate()-2),e.minX=new Date(i).getTime();var o=s.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,s){if(n.length){n.length===1&&n.push(e.seriesX[e.maxValsInArrayIndex][e.seriesX[e.maxValsInArrayIndex].length-1]);var i=n.slice();i.sort(function(o,r){return o-r}),i.forEach(function(o,r){if(r>0){var a=o-i[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 s=n.seriesGroups;s.length||(s=[this.w.globals.seriesNames.map(function(r){return r})]);var i={},o={};s.forEach(function(r){i[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;i[r][l]===void 0&&(i[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&&ue.isNumber(n.series[a][l])&&(n.series[a][l]>0?i[r][l]+=parseFloat(n.series[a][l])+1e-4:o[r][l]+=parseFloat(n.series[a][l]))}})}),Object.entries(i).forEach(function(r){var a=kH(r,1)[0];i[a].forEach(function(l,c){n.maxY=Math.max(n.maxY,i[a][c]),n.minY=Math.min(n.minY,o[a][c])})})}}}]),t}(),B5=function(){function t(e,n){at(this,t),this.ctx=e,this.elgrid=n,this.w=e.w;var s=this.w;this.xaxisFontSize=s.config.xaxis.labels.style.fontSize,this.axisFontFamily=s.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=s.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=s.config.chart.type==="bar"&&s.config.plotOptions.bar.horizontal,this.xAxisoffX=s.config.xaxis.position==="bottom"?s.globals.gridHeight:0,this.drawnLabels=[],this.axesUtils=new xc(e)}return lt(t,[{key:"drawYaxis",value:function(e){var n=this.w,s=new Ve(this.ctx),i=n.config.yaxis[e].labels.style,o=i.fontSize,r=i.fontFamily,a=i.fontWeight,l=s.group({class:"apexcharts-yaxis",rel:e,transform:"translate(".concat(n.globals.translateYAxisX[e],", 0)")});if(this.axesUtils.isYAxisHidden(e))return l;var c=s.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 b=h(f[m],m,n),y=n.config.yaxis[e].labels.padding;n.config.yaxis[e].opposite&&n.config.yaxis.length!==0&&(y*=-1);var C=this.getTextAnchor(n.config.yaxis[e].labels.align,n.config.yaxis[e].opposite),k=this.axesUtils.getYAxisForeColor(i.colors,e),x=Array.isArray(k)?k[m]:k,S=ue.listToArray(n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-label tspan"))).map(function(T){return T.textContent}),E=s.drawText({x:y,y:p,text:S.includes(b)&&!n.config.yaxis[e].labels.showDuplicates?"":b,textAnchor:C,fontSize:o,fontFamily:r,fontWeight:a,maxWidth:n.config.yaxis[e].labels.maxWidth,foreColor:x,isPlainText:!1,cssClass:"apexcharts-yaxis-label ".concat(i.cssClass)});c.add(E),this.addTooltip(E,b),n.config.yaxis[e].labels.rotate!==0&&this.rotateLabel(s,E,firstLabel,n.config.yaxis[e].labels.rotate),p+=d}}return this.addYAxisTitle(s,l,e),this.addAxisBorder(s,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 s=document.createElementNS(this.w.globals.SVGNS,"title");s.textContent=Array.isArray(n)?n.join(" "):n,e.node.appendChild(s)}},{key:"rotateLabel",value:function(e,n,s,i){var o=e.rotateAroundCenter(s.node),r=e.rotateAroundCenter(n.node);n.node.setAttribute("transform","rotate(".concat(i," ").concat(o.x," ").concat(r.y,")"))}},{key:"addYAxisTitle",value:function(e,n,s){var i=this.w;if(i.config.yaxis[s].title.text!==void 0){var o=e.group({class:"apexcharts-yaxis-title"}),r=i.config.yaxis[s].opposite?i.globals.translateYAxisX[s]:0,a=e.drawText({x:r,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[s].title.offsetY,text:i.config.yaxis[s].title.text,textAnchor:"end",foreColor:i.config.yaxis[s].title.style.color,fontSize:i.config.yaxis[s].title.style.fontSize,fontWeight:i.config.yaxis[s].title.style.fontWeight,fontFamily:i.config.yaxis[s].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text ".concat(i.config.yaxis[s].title.style.cssClass)});o.add(a),n.add(o)}}},{key:"addAxisBorder",value:function(e,n,s,i,o){var r=this.w,a=r.config.yaxis[s].axisBorder,l=31+a.offsetX;if(r.config.yaxis[s].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[s].axisTicks.show&&this.axesUtils.drawYAxisTicks(l,i,a,r.config.yaxis[s].axisTicks,s,o,n)}},{key:"drawYaxisInversed",value:function(e){var n=this.w,s=new Ve(this.ctx),i=s.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),o=s.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(n.globals.translateXAxisX,", ").concat(n.globals.translateXAxisY,")")});i.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 b=s.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(b),b.tspan(f),this.addTooltip(b,f),l+=a}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}},{key:"inversedYAxisBorder",value:function(e){var n=this.w,s=new Ve(this.ctx),i=n.config.xaxis.axisBorder;if(i.show){var o=0;n.config.chart.type==="bar"&&n.globals.isXNumeric&&(o-=15);var r=s.drawLine(n.globals.padHorizontal+o+i.offsetX,this.xAxisoffX,n.globals.gridWidth,this.xAxisoffX,i.color,0,i.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,s=new Ve(this.ctx);if(n.config.xaxis.title.text!==void 0){var i=s.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),o=s.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)});i.add(o),e.add(i)}}},{key:"yAxisTitleRotate",value:function(e,n){var s=this.w,i=new Ve(this.ctx),o=s.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(e,"'] .apexcharts-yaxis-texts-g")),r=o?o.getBoundingClientRect():{width:0,height:0},a=s.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=i.rotateAroundCenter(a);a.setAttribute("transform","rotate(".concat(n?-1*s.config.yaxis[e].title.rotate:s.config.yaxis[e].title.rotate," ").concat(u.x," ").concat(u.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(e,n,s,i){var o=this.w,r=0,a=10;return o.config.yaxis[e].title.text===void 0||e<0?{xPos:r,padd:0}:(i?r=n.width+o.config.yaxis[e].title.offsetX+s.width/2+a/2:(r=-1*n.width+o.config.yaxis[e].title.offsetX+a/2+s.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 s=this.w,i=0,o=0,r=18,a=1;s.config.yaxis.length>1&&(this.multipleYs=!0),s.config.yaxis.forEach(function(l,c){var u=s.globals.ignoreYAxisIndexes.includes(c)||!l.show||l.floating||e[c].width===0,d=e[c].width+n[c].width;l.opposite?s.globals.isBarHorizontal?(o=s.globals.gridWidth+s.globals.translateX-1,s.globals.translateYAxisX[c]=o-l.labels.offsetX):(o=s.globals.gridWidth+s.globals.translateX+a,u||(a+=d+20),s.globals.translateYAxisX[c]=o-l.labels.offsetX+20):(i=s.globals.translateX-r,u||(r+=d+20),s.globals.translateYAxisX[c]=i+l.labels.offsetX)})}},{key:"setYAxisTextAlignments",value:function(){var e=this.w;ue.listToArray(e.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach(function(n,s){var i=e.config.yaxis[s];if(i&&!i.floating&&i.labels.align!==void 0){var o=e.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(s,"'] .apexcharts-yaxis-texts-g")),r=ue.listToArray(e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(s,"'] .apexcharts-yaxis-label"))),a=o.getBoundingClientRect();r.forEach(function(l){l.setAttribute("text-anchor",i.labels.align)}),i.labels.align!=="left"||i.opposite?i.labels.align==="center"?o.setAttribute("transform","translate(".concat(a.width/2*(i.opposite?1:-1),", 0)")):i.labels.align==="right"&&i.opposite&&o.setAttribute("transform","translate(".concat(a.width,", 0)")):o.setAttribute("transform","translate(-".concat(a.width,", 0)"))}})}}]),t}(),P1t=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.documentEvent=ue.bind(this.documentEvent,this)}return lt(t,[{key:"addEventListener",value:function(e,n){var s=this.w;s.globals.events.hasOwnProperty(e)?s.globals.events[e].push(n):s.globals.events[e]=[n]}},{key:"removeEventListener",value:function(e,n){var s=this.w;if(s.globals.events.hasOwnProperty(e)){var i=s.globals.events[e].indexOf(n);i!==-1&&s.globals.events[e].splice(i,1)}}},{key:"fireEvent",value:function(e,n){var s=this.w;if(s.globals.events.hasOwnProperty(e)){n&&n.length||(n=[]);for(var i=s.globals.events[e],o=i.length,r=0;r<o;r++)i[r].apply(null,n)}}},{key:"setupEventHandlers",value:function(){var e=this,n=this.w,s=this.ctx,i=n.globals.dom.baseEl.querySelector(n.globals.chartClass);this.ctx.eventList.forEach(function(o){i.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,s,a):r.type==="mouseleave"||r.type==="touchleave"?typeof n.config.chart.events.mouseLeave=="function"&&n.config.chart.events.mouseLeave(r,s,a):(r.type==="mouseup"&&r.which===1||r.type==="touchend")&&(typeof n.config.chart.events.click=="function"&&n.config.chart.events.click(r,s,a),s.ctx.events.fireEvent("click",[r,s,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,s=e.target.className;if(e.type==="click"){var i=n.globals.dom.baseEl.querySelector(".apexcharts-menu");i&&i.classList.contains("apexcharts-menu-open")&&s!=="apexcharts-menu-icon"&&i.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}(),I1t=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(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 s=n.filter(function(o){return o.name===e})[0];if(!s)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var i=ue.extend(JH,s);this.w.globals.locale=i.options}}]),t}(),L1t=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"drawAxis",value:function(e,n){var s,i,o=this,r=this.w.globals,a=this.w.config,l=new Fg(this.ctx,n),c=new B5(this.ctx,n);r.axisCharts&&e!=="radar"&&(r.isBarHorizontal?(i=c.drawYaxisInversed(0),s=l.drawXaxisInversed(0),r.dom.elGraphical.add(s),r.dom.elGraphical.add(i)):(s=l.drawXaxis(),r.dom.elGraphical.add(s),a.yaxis.map(function(u,d){if(r.ignoreYAxisIndexes.indexOf(d)===-1&&(i=c.drawYaxis(d),r.dom.Paper.add(i),o.w.config.grid.position==="back")){var h=r.dom.Paper.children()[1];h.remove(),r.dom.Paper.add(h)}})))}}]),t}(),tk=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"drawXCrosshairs",value:function(){var e=this.w,n=new Ve(this.ctx),s=new Ws(this.ctx),i=e.config.xaxis.crosshairs.fill.gradient,o=e.config.xaxis.crosshairs.dropShadow,r=e.config.xaxis.crosshairs.fill.type,a=i.colorFrom,l=i.colorTo,c=i.opacityFrom,u=i.opacityTo,d=i.stops,h=o.enabled,f=o.left,p=o.top,m=o.blur,b=o.color,y=o.opacity,C=e.config.xaxis.crosshairs.fill.color;if(e.config.xaxis.crosshairs.show){r==="gradient"&&(C=n.drawGradient("vertical",a,l,c,u,null,d,null));var k=n.drawRect();e.config.xaxis.crosshairs.width===1&&(k=n.drawLine());var x=e.globals.gridHeight;(!ue.isNumber(x)||x<0)&&(x=0);var S=e.config.xaxis.crosshairs.width;(!ue.isNumber(S)||S<0)&&(S=0),k.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:x,width:S,height:x,fill:C,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&&(k=s.dropShadow(k,{left:f,top:p,blur:m,color:b,opacity:y})),e.globals.dom.elGraphical.add(k)}}},{key:"drawYCrosshairs",value:function(){var e=this.w,n=new Ve(this.ctx),s=e.config.yaxis[0].crosshairs,i=e.globals.barPadForNumericAxis;if(e.config.yaxis[0].crosshairs.show){var o=n.drawLine(-i,0,e.globals.gridWidth+i,0,s.stroke.color,s.stroke.dashArray,s.stroke.width);o.attr({class:"apexcharts-ycrosshairs"}),e.globals.dom.elGraphical.add(o)}var r=n.drawLine(-i,0,e.globals.gridWidth+i,0,s.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),e.globals.dom.elGraphical.add(r)}}]),t}(),O1t=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"checkResponsiveConfig",value:function(e){var n=this,s=this.w,i=s.config;if(i.responsive.length!==0){var o=i.responsive.slice();o.sort(function(c,u){return c.breakpoint>u.breakpoint?1:u.breakpoint>c.breakpoint?-1:0}).reverse();var r=new Vg({}),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=ue.clone(s.globals.initialConfig);h.series=ue.clone(s.config.series);var f=rs.extendArrayProps(r,h,s);c=ue.extend(f,c),c=ue.extend(s.config,c),n.overrideResponsiveOptions(c)}else for(var p=0;p<o.length;p++)d<o[p].breakpoint&&(c=rs.extendArrayProps(r,o[p].options,s),c=ue.extend(s.config,c),n.overrideResponsiveOptions(c))};if(e){var l=rs.extendArrayProps(r,e,s);l=ue.extend(s.config,l),a(l=ue.extend(l,e))}else a({})}}},{key:"overrideResponsiveOptions",value:function(e){var n=new Vg(e).init({responsiveOverride:!0});this.w.config=n}}]),t}(),D1t=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.colors=[],this.isColorFn=!1,this.isHeatmapDistributed=this.checkHeatmapDistributed(),this.isBarDistributed=this.checkBarDistributed()}return lt(t,[{key:"checkHeatmapDistributed",value:function(){var e=this.w.config,n=e.chart,s=e.plotOptions;return n.type==="treemap"&&s.treemap&&s.treemap.distributed||n.type==="heatmap"&&s.heatmap&&s.heatmap.distributed}},{key:"checkBarDistributed",value:function(){var e=this.w.config,n=e.chart,s=e.plotOptions;return s.bar&&s.bar.distributed&&(n.type==="bar"||n.type==="rangeBar")}},{key:"init",value:function(){this.setDefaultColors()}},{key:"setDefaultColors",value:function(){var e=this.w,n=new ue;e.globals.dom.elWrap.classList.add("apexcharts-theme-".concat(e.config.theme.mode));var s=Cs(e.config.colors||e.config.fill.colors||[]);e.globals.colors=this.getColors(s),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 i=e.globals.colors.slice();this.pushExtraColors(e.globals.colors),this.applyColorTypes(["fill","stroke"],i),this.applyDataLabelsColors(i),this.applyRadarPolygonsColors(),this.applyMarkersColors(i)}},{key:"getColors",value:function(e){var n=this,s=this.w;return e&&e.length!==0?Array.isArray(e)&&e.length>0&&typeof e[0]=="function"?(this.isColorFn=!0,s.config.series.map(function(i,o){var r=e[o]||e[0];return typeof r=="function"?r({value:s.globals.axisCharts?s.globals.series[o][0]||0:s.globals.series[o],seriesIndex:o,dataPointIndex:o,w:n.w}):r})):e:this.predefined()}},{key:"applySeriesColors",value:function(e,n){e.forEach(function(s,i){s&&(n[i]=s)})}},{key:"getMonochromeColors",value:function(e,n,s){var i=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"?s.shadeColor(-1*c,i):s.shadeColor(c,i);return c+=l,u})}},{key:"applyColorTypes",value:function(e,n){var s=this,i=this.w;e.forEach(function(o){i.globals[o].colors=i.config[o].colors===void 0?s.isColorFn?i.config.colors:n:i.config[o].colors.slice(),s.pushExtraColors(i.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 s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=this.w,o=n||i.globals.series.length;if(s===null&&(s=this.isBarDistributed||this.isHeatmapDistributed||i.config.chart.type==="heatmap"&&i.config.plotOptions.heatmap&&i.config.plotOptions.heatmap.colorScale.inverse),s&&i.globals.series.length&&(o=i.globals.series[i.globals.maxValsInArrayIndex].length*i.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,s=n==="dark"?"palette4":n==="light"?"palette1":e.theme.palette||"palette1",i=n==="dark"?"#f6f7f8":n==="light"?"#373d3f":e.chart.foreColor||"#373d3f";return e.tooltip.theme=n||"light",e.chart.foreColor=i,e.theme.palette=s,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}(),R1t=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"draw",value:function(){this.drawTitleSubtitle("title"),this.drawTitleSubtitle("subtitle")}},{key:"drawTitleSubtitle",value:function(e){var n=this.w,s=e==="title"?n.config.title:n.config.subtitle,i=n.globals.svgWidth/2,o=s.offsetY,r="middle";if(s.align==="left"?(i=10,r="start"):s.align==="right"&&(i=n.globals.svgWidth-10,r="end"),i+=s.offsetX,o=o+parseInt(s.style.fontSize,10)+s.margin/2,s.text!==void 0){var a=new Ve(this.ctx).drawText({x:i,y:o,text:s.text,textAnchor:r,fontSize:s.style.fontSize,fontFamily:s.style.fontFamily,fontWeight:s.style.fontWeight,foreColor:s.style.color,opacity:1});a.node.setAttribute("class","apexcharts-".concat(e,"-text")),n.globals.dom.Paper.add(a)}}}]),t}(),V1t=function(){function t(e){at(this,t),this.w=e.w,this.dCtx=e}return lt(t,[{key:"getTitleSubtitleCoords",value:function(e){var n=this.w,s=0,i=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();s=a.width,i=n.globals.axisCharts?a.height+5:a.height}return{width:s,height:i}}},{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 s=Object.assign({},ue.getBoundingClientRect(n));return n!==null&&!e.config.legend.floating&&e.config.legend.show?this.dCtx.lgRect={x:s.x,y:s.y,height:s.height,width:s.height===0?0:s.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,s=[];n.config.series.forEach(function(l,c){l.data.forEach(function(u,d){var h;h=n.globals.series[c][d],i=n.config.dataLabels.formatter(h,{ctx:e.dCtx.ctx,seriesIndex:c,dataPointIndex:d,w:n}),s.push(i)})});var i=ue.getLargestStringFromArr(s),o=new Ve(this.dCtx.ctx),r=n.config.dataLabels.style,a=o.getTextRects(i,parseInt(r.fontSize),r.fontFamily);return{width:1.05*a.width,height:a.height}}},{key:"getLargestStringFromMultiArr",value:function(e,n){var s=e;if(this.w.globals.isMultiLineX){var i=n.map(function(r,a){return Array.isArray(r)?r.length:1}),o=Math.max.apply(Math,Cs(i));s=n[i.indexOf(o)]}return s}}]),t}(),F1t=function(){function t(e){at(this,t),this.w=e.w,this.dCtx=e}return lt(t,[{key:"getxAxisLabelsCoords",value:function(){var e,n=this.w,s=n.globals.labels.slice();if(n.config.xaxis.convertedCatToNumeric&&s.length===0&&(s=n.globals.categoryLabels),n.globals.timescaleLabels.length>0){var i=this.getxAxisTimeScaleLabelsCoords();e={width:i.width,height:i.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=ue.getLargestStringFromArr(s),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,s);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 V1(this.dCtx.ctx),c=r;r=l.xLabelFormat(o,r,c,{i:void 0,dateFormatter:new zs(this.dCtx.ctx).formatDate,w:n}),a=l.xLabelFormat(o,a,c,{i:void 0,dateFormatter:new zs(this.dCtx.ctx).formatDate,w:n}),(n.config.xaxis.convertedCatToNumeric&&r===void 0||String(r).trim()==="")&&(a=r="1");var u=new Ve(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*s.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 s,i=((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=ue.getLargestStringFromArr(o),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,o),l=new Ve(this.dCtx.ctx),c=l.getTextRects(r,i),u=c;return r!==a&&(u=l.getTextRects(a,i)),s={width:c.width>=u.width?c.width:u.width,height:c.height>=u.height?c.height:u.height},n.config.xaxis.labels.show||(s={width:0,height:0}),{width:s.width,height:s.height}}},{key:"getxAxisTitleCoords",value:function(){var e=this.w,n=0,s=0;if(e.config.xaxis.title.text!==void 0){var i=new Ve(this.dCtx.ctx).getTextRects(e.config.xaxis.title.text,e.config.xaxis.title.style.fontSize);n=i.width,s=i.height}return{width:n,height:s}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var e,n=this.w;this.dCtx.timescaleLabels=n.globals.timescaleLabels.slice();var s=this.dCtx.timescaleLabels.map(function(o){return o.value}),i=s.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 Ve(this.dCtx.ctx).getTextRects(i,n.config.xaxis.labels.style.fontSize)).width*s.length>n.globals.gridWidth&&n.config.xaxis.labels.rotate!==0&&(n.globals.overlappingXLabels=!0),e}},{key:"additionalPaddingXLabels",value:function(e){var n=this,s=this.w,i=s.globals,o=s.config,r=o.xaxis.type,a=e.width;i.skipLastTimelinelabel=!1,i.skipFirstTimelinelabel=!1;var l=s.config.yaxis[0].opposite&&s.globals.isBarHorizontal,c=function(u,d){o.yaxis.length>1&&function(h){return i.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,b=s.config.legend.position==="right"&&n.dCtx.lgRect.width>0?n.dCtx.lgRect.width:0;p>i.svgWidth-i.translateX-b&&(i.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)&&(i.skipFirstTimelinelabel=!0)}else r==="datetime"?n.dCtx.gridPad.right<a&&!i.rotateXLabels&&(i.skipLastTimelinelabel=!0):r!=="datetime"&&n.dCtx.gridPad.right<a/2-n.dCtx.yAxisWidthRight&&!i.rotateXLabels&&!s.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}(),N1t=function(){function t(e){at(this,t),this.w=e.w,this.dCtx=e}return lt(t,[{key:"getyAxisLabelsCoords",value:function(){var e=this,n=this.w,s=[],i=10,o=new xc(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,S){var E,T;return((E=String(d(x,l)))===null||E===void 0?void 0:E.length)>((T=String(d(S,l)))===null||T===void 0?void 0:T.length)?x:S},h),p=f=d(f,l);if(f!==void 0&&f.length!==0||(f=c.niceMax),n.globals.isBarHorizontal){i=0;var m=n.globals.labels.slice();f=ue.getLargestStringFromArr(m),f=d(f,{seriesIndex:a,dataPointIndex:-1,w:n}),p=e.dCtx.dimHelpers.getLargestStringFromMultiArr(f,m)}var b=new Ve(e.dCtx.ctx),y="rotate(".concat(r.labels.rotate," 0 0)"),C=b.getTextRects(f,r.labels.style.fontSize,r.labels.style.fontFamily,y,!1),k=C;f!==p&&(k=b.getTextRects(p,r.labels.style.fontSize,r.labels.style.fontFamily,y,!1)),s.push({width:(u>k.width||u>C.width?u:k.width>C.width?k.width:C.width)+i,height:k.height>C.height?k.height:C.height})}else s.push({width:0,height:0})}),s}},{key:"getyAxisTitleCoords",value:function(){var e=this,n=this.w,s=[];return n.config.yaxis.map(function(i,o){if(i.show&&i.title.text!==void 0){var r=new Ve(e.dCtx.ctx),a="rotate(".concat(i.title.rotate," 0 0)"),l=r.getTextRects(i.title.text,i.title.style.fontSize,i.title.style.fontFamily,a,!1);s.push({width:l.width,height:l.height})}else s.push({width:0,height:0})}),s}},{key:"getTotalYAxisWidth",value:function(){var e=this.w,n=0,s=0,i=0,o=e.globals.yAxisScale.length>1?10:0,r=new xc(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?i+=d:s+=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=s,this.dCtx.yAxisWidthRight=i,n}}]),t}(),B1t=function(){function t(e){at(this,t),this.w=e.w,this.dCtx=e}return lt(t,[{key:"gridPadForColumnsInNumericAxis",value:function(e){var n=this.w,s=n.config,i=n.globals;if(i.noData||i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.series.length)return 0;var o=function(f){return["bar","rangeBar","candlestick","boxPlot"].includes(f)},r=s.chart.type,a=0,l=o(r)?s.series.length:1;i.comboBarCount>0&&(l=i.comboBarCount),i.collapsedSeries.forEach(function(f){o(f.type)&&(l-=1)}),s.chart.stacked&&(l=1);var c=o(r)||i.comboBarCount>0,u=Math.abs(i.initialMaxX-i.initialMinX);if(c&&i.isXNumeric&&!i.isBarHorizontal&&l>0&&u!==0){u<=3&&(u=i.dataPoints);var d=u/e,h=i.minXDiff&&i.minXDiff/d>0?i.minXDiff/d:0;h>e/2&&(h/=2),(a=h*parseInt(s.plotOptions.bar.columnWidth,10)/100)<1&&(a=1),i.barPadForNumericAxis=a}return a}},{key:"gridPadFortitleSubtitle",value:function(){var e=this,n=this.w,s=n.globals,i=this.dCtx.isSparkline||!s.axisCharts?0:10;["title","subtitle"].forEach(function(a){n.config[a].text!==void 0?i+=n.config[a].margin:i+=e.dCtx.isSparkline||!s.axisCharts?0:5}),!n.config.legend.show||n.config.legend.position!=="bottom"||n.config.legend.floating||s.axisCharts||(i+=10);var o=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");s.gridHeight-=o.height+r.height+i,s.translateY+=o.height+r.height+i}},{key:"setGridXPosForDualYAxis",value:function(e,n){var s=this.w,i=new xc(this.dCtx.ctx);s.config.yaxis.forEach(function(o,r){s.globals.ignoreYAxisIndexes.indexOf(r)!==-1||o.floating||i.isYAxisHidden(r)||(o.opposite&&(s.globals.translateX-=n[r].width+e[r].width+parseInt(o.labels.style.fontSize,10)/1.2+12),s.globals.translateX<2&&(s.globals.translateX=2))})}}]),t}(),fy=function(){function t(e){at(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 V1t(this),this.dimYAxis=new N1t(this),this.dimXAxis=new F1t(this),this.dimGrid=new B1t(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return lt(t,[{key:"plotCoords",value:function(){var e=this,n=this.w,s=n.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.datalabelsCoords={width:0,height:0};var i=Array.isArray(n.config.stroke.width)?Math.max.apply(Math,Cs(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=kH(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(i/2,this.gridPad.top),this.gridPad.bottom=Math.max(i/2,this.gridPad.bottom)),s.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),s.gridHeight=s.gridHeight-this.gridPad.top-this.gridPad.bottom,s.gridWidth=s.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var o=this.dimGrid.gridPadForColumnsInNumericAxis(s.gridWidth);s.gridWidth=s.gridWidth-2*o,s.translateX=s.translateX+this.gridPad.left+this.xPadLeft+(o>0?o:0),s.translateY=s.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var e=this,n=this.w,s=n.globals,i=this.dimYAxis.getyAxisLabelsCoords(),o=this.dimYAxis.getyAxisTitleCoords();s.isSlopeChart&&(this.datalabelsCoords=this.dimHelpers.getDatalabelsRect()),n.globals.yLabelsCoords=[],n.globals.yTitleCoords=[],n.config.yaxis.map(function(f,p){n.globals.yLabelsCoords.push({width:i[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),s.translateXAxisY=n.globals.rotateXLabels?this.xAxisHeight/8:-4,s.translateXAxisX=n.globals.rotateXLabels&&n.globals.isXNumeric&&n.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,n.globals.isBarHorizontal&&(s.rotateXLabels=!1,s.translateXAxisY=parseInt(n.config.xaxis.labels.style.fontSize,10)/1.5*-1),s.translateXAxisY=s.translateXAxisY+n.config.xaxis.labels.offsetY,s.translateXAxisX=s.translateXAxisX+n.config.xaxis.labels.offsetX;var c=this.yAxisWidth,u=this.xAxisHeight;s.xAxisLabelsHeight=this.xAxisHeight-l.height,s.xAxisGroupLabelsHeight=s.xAxisLabelsHeight-r.height,s.xAxisLabelsWidth=this.xAxisWidth,s.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(){s.translateX=c+e.datalabelsCoords.width,s.gridHeight=s.svgHeight-e.lgRect.height-u-(e.isSparkline||n.config.chart.type==="treemap"?0:n.globals.rotateXLabels?10:15),s.gridWidth=s.svgWidth-c-2*e.datalabelsCoords.width};switch(n.config.xaxis.position==="top"&&(d=s.xAxisHeight-n.config.xaxis.axisTicks.height-5),n.config.legend.position){case"bottom":s.translateY=d,h();break;case"top":s.translateY=this.lgRect.height+d,h();break;case"left":s.translateY=d,s.translateX=this.lgRect.width+c+this.datalabelsCoords.width,s.gridHeight=s.svgHeight-u-12,s.gridWidth=s.svgWidth-this.lgRect.width-c-2*this.datalabelsCoords.width;break;case"right":s.translateY=d,s.translateX=c+this.datalabelsCoords.width,s.gridHeight=s.svgHeight-u-12,s.gridWidth=s.svgWidth-this.lgRect.width-c-2*this.datalabelsCoords.width-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(o,i),new B5(this.ctx).setYAxisXPosition(i,o)}},{key:"setDimensionsForNonAxisCharts",value:function(){var e=this.w,n=e.globals,s=e.config,i=0;e.config.legend.show&&!e.config.legend.floating&&(i=20);var o=s.chart.type==="pie"||s.chart.type==="polarArea"||s.chart.type==="donut"?"pie":"radialBar",r=s.plotOptions[o].offsetY,a=s.plotOptions[o].offsetX;if(!s.legend.show||s.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(s.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-i,n.gridHeight=s.chart.height!=="auto"?n.svgHeight:n.gridWidth,n.translateY=r,n.translateX=a+this.lgRect.width+i;break;case"right":n.gridWidth=n.svgWidth-this.lgRect.width-i-5,n.gridHeight=s.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,s){var i=this.w,o=i.globals.hasXaxisGroups?2:1,r=s.height+e.height+n.height,a=i.globals.isMultiLineX?1.2:i.globals.LINE_HEIGHT_RATIO,l=i.globals.rotateXLabels?22:10,c=i.globals.rotateXLabels&&i.config.legend.position==="bottom"?10:0;this.xAxisHeight=r*a+o*l+c,this.xAxisWidth=e.width,this.xAxisHeight-n.height>i.config.xaxis.labels.maxHeight&&(this.xAxisHeight=i.config.xaxis.labels.maxHeight),i.config.xaxis.labels.minHeight&&this.xAxisHeight<i.config.xaxis.labels.minHeight&&(this.xAxisHeight=i.config.xaxis.labels.minHeight),i.config.xaxis.floating&&(this.xAxisHeight=0);var u=0,d=0;i.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}(),z1t=function(){function t(e){at(this,t),this.w=e.w,this.lgCtx=e}return lt(t,[{key:"getLegendStyles",value:function(){var e,n,s,i=document.createElement("style");i.setAttribute("type","text/css");var o=((e=this.lgCtx.ctx)===null||e===void 0||(n=e.opts)===null||n===void 0||(s=n.chart)===null||s===void 0?void 0:s.nonce)||this.w.config.chart.nonce;o&&i.setAttribute("nonce",o);var r=document.createTextNode(` | |
| 171 | + </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>"},b1=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(),he.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:"round"},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(),tt(tt({},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=ek(tt(tt({},n),{},{isTimeline:!0})),s=i.color,o=i.seriesName,r=i.ylabel,a=i.startVal,l=i.endVal;return tk(tt(tt({},n),{},{color:s,seriesName:o,ylabel:r,start:a,end:l}))}(e):function(n){var i=ek(n),s=i.color,o=i.seriesName,r=i.ylabel,a=i.start,l=i.end;return tk(tt(tt({},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=ek(n),s=i.color,o=i.seriesName,r=i.ylabel,a=i.start,l=i.end;return tk(tt(tt({},n),{},{color:s,seriesName:o,ylabel:r,start:a,end:l}))}(e)}}}}},{key:"brush",value:function(e){return he.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 tt(tt({},e),{},{plotOptions:tt(tt({},e.plotOptions),{},{bar:tt(tt({},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 he.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 he.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"> | |
| 172 | + `.concat(e.config.series[n].name?e.config.series[n].name:"series-"+(n+1),": <strong>").concat(e.globals.series[n][i],`</strong> | |
| 173 | + </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}(),w1=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 Ou,o=new b1(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=s.init(),a={};if(i&&tp(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=he.extend(r,k)}var C=he.extend(a,window.Apex);return r=he.extend(C,i),r=this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(e,n,i){var s,o,r=new b1(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 Ou;(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=he.extend(e.yaxis,window.Apex.yaxis)),e.yaxis.constructor!==Array?e.yaxis=[he.extend(i.yAxis,e.yaxis)]:e.yaxis=he.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=he.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 Ou;return e.annotations.yaxis=he.extendArray(e.annotations.yaxis!==void 0?e.annotations.yaxis:[],n.yAxisAnnotation),e}},{key:"extendXAxisAnnotations",value:function(e){var n=new Ou;return e.annotations.xaxis=he.extendArray(e.annotations.xaxis!==void 0?e.annotations.xaxis:[],n.xAxisAnnotation),e}},{key:"extendPointAnnotations",value:function(e){var n=new Ou;return e.annotations.points=he.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}(),dj=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=he.extend({},e),n.initialSeries=he.clone(e.series),n.lastXAxis=he.clone(n.initialConfig.xaxis),n.lastYAxis=he.clone(n.initialConfig.yaxis),n}}]),t}(),K_t=function(){function t(e){lt(this,t),this.opts=e}return ct(t,[{key:"init",value:function(){var e=new w1(this.opts).init({responsiveOverride:!1});return{config:e,globals:new dj().init(e)}}}]),t}(),qr=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");Ne.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),Ne.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=Am(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=he.hexToRgba(d,y)):d.indexOf("rgba")>-1?y=he.getOpacityFromRGBA(d):k=he.hexToRgba(he.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 S=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(S)?e.seriesNumber<S.length?S[e.seriesNumber]:S[0]:S,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 Ne(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=tt(tt({},l),o));var c=this.opts,u=new Ne(this.ctx),d=new he;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=he.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?he.rgb2hex(i):i):d.shadeColor(parseFloat(l.gradient.shadeIntensity),i.indexOf("rgb")>-1?he.rgb2hex(i):i);else if(l.gradient.gradientToColors[c.seriesNumber]){var y=l.gradient.gradientToColors[c.seriesNumber];h=y,y.indexOf("rgba")>-1&&(m=he.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=he.rgb2hex(f)),h.indexOf("rgb")>-1&&(h=he.rgb2hex(h)),u.drawGradient(n,f,h,p,m,c.size,l.gradient.stops,r,a)}}]),t}(),Rp=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,n,i,s){var o=arguments.length>4&&arguments[4]!==void 0&&arguments[4],r=this.w,a=n,l=e,c=null,u=new Ne(this.ctx),d=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(l.x))for(var h=0;h<l.x.length;h++){var f=void 0,p=i,m=!he.isNumber(l.y[h]);i===1&&h===0&&(p=0),i===1&&h===1&&(p=1);var y="apexcharts-marker";if(r.config.chart.type!=="line"&&r.config.chart.type!=="area"||r.globals.comboCharts||r.config.tooltip.intersect||(y+=" no-pointer-events"),(Array.isArray(r.config.markers.size)?r.globals.markers.size[n]>0:r.config.markers.size>0)||o||d){m||(y+=" w".concat(he.randomId()));var b=this.getMarkerConfig({cssClass:y,seriesIndex:n,dataPointIndex:p});r.config.series[a].data[p]&&(r.config.series[a].data[p].fillColor&&(b.pointFillColor=r.config.series[a].data[p].fillColor),r.config.series[a].data[p].strokeColor&&(b.pointStrokeColor=r.config.series[a].data[p].strokeColor)),s!==void 0&&(b.pSize=s),(l.x[h]<-r.globals.markers.largestSize||l.x[h]>r.globals.gridWidth+r.globals.markers.largestSize||l.y[h]<-r.globals.markers.largestSize||l.y[h]>r.globals.gridHeight+r.globals.markers.largestSize)&&(b.pSize=0),!m&&((r.globals.markers.size[n]>0||o||d)&&!c&&(c=u.group({class:o||d?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(r.globals.cuid,")")),(f=u.drawMarker(l.x[h],l.y[h],b)).attr("rel",p),f.attr("j",p),f.attr("index",n),f.node.setAttribute("default-marker-size",b.pSize),new ci(this.ctx).setSelectionFilter(f,n,p),this.addEvents(f),c&&c.add(f))}else r.globals.pointsArray[n]===void 0&&(r.globals.pointsArray[n]=[]),r.globals.pointsArray[n].push([l.x[h],l.y[h]])}return c}},{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 Ne(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}(),hj=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 Ne(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 Ip(this.ctx),u=new ci(this.ctx),d=new qr(this.ctx),h=new Rp(this.ctx),f=new Ne(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}(),np=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 Ne(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 Ne(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 hj(this.ctx).centerTextInBubble(p,o,m).y):k!==void 0&&(C=$(k));var S=u.config.dataLabels.textAnchor;u.globals.isSlopeChart&&(S=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:S})}return y}},{key:"plotDataLabelsText",value:function(e){var n=this.w,i=new Ne(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,S=h.offsetY;if(n.config.chart.type!=="bar"&&n.config.chart.type!=="rangeBar"||($=0,S=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+S,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 ci(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 Ne(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 ci(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}(),gr=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(he.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=he.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 Ne(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}(),YS=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 ys(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 gr(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 gr(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(he.parseNumber(e[n].data[r][1][3])):e[n].data[r].length>=5?this.twoDSeries.push(he.parseNumber(e[n].data[r][4])):this.twoDSeries.push(he.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 ii(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(he.parseNumber(e[n].data[a].y[e[n].data[a].y.length-1])):this.twoDSeries.push(he.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=he.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 ii(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 he.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 b1(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 gr(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}(),tb=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(){var e=this;return new Promise(function(n){var i=e.w,s=i.config.chart.toolbar.export.width,o=i.config.chart.toolbar.export.scale||s/i.globals.svgWidth;o||(o=1);var r=e.w.globals.dom.Paper.svg(),a=e.w.globals.dom.Paper.node.cloneNode(!0);o!==1&&e.scaleSvgNode(a,o),e.convertImagesToBase64(a).then(function(){r=new XMLSerializer().serializeToString(a),n(r.replace(/ /g," "))})})}},{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().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?` | |
| 174 | +`:a,c=this.w;i||(i=c.config.series);var u=[],d=[],h="",f=c.globals.series.map(function(S,M){return c.globals.collapsedSeriesIndices.indexOf(M)===-1?S:[]}),p=function(S){return typeof c.config.chart.toolbar.export.csv.categoryFormatter=="function"?c.config.chart.toolbar.export.csv.categoryFormatter(S):c.config.xaxis.type==="datetime"&&String(S).length>=10?new Date(S).toDateString():he.isNumber(S)?S:S.split(r).join("")},m=function(S){return typeof c.config.chart.toolbar.export.csv.valueFormatter=="function"?c.config.chart.toolbar.export.csv.valueFormatter(S):S},y=Math.max.apply(Math,Ns(i.map(function(S){return S.data?S.data.length:0}))),b=new YS(this.ctx),k=new qc(this.ctx),C=function(S){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 gr(n.ctx).getActiveConfigSeriesIndex();M=P(c.globals.labels[S],{seriesIndex:T,dataPointIndex:S,w:c})}else M=k.getLabel(c.globals.labels,c.globals.timescaleLabels,0,S).text;c.config.xaxis.type==="datetime"&&(c.config.xaxis.categories.length?M=c.config.xaxis.categories[S]:c.config.labels.length&&(M=c.config.labels[S]))}else M=c.config.labels[S];return M===null?"nullvalue":(Array.isArray(M)&&(M=M.join(" ")),he.isNumber(M)?M:M.split(r).join(""))},$=function(S,M){if(u.length&&M===0&&d.push(u.join(r)),S.data){S.data=S.data.length&&S.data||Ns(Array(y)).map(function(){return""});for(var P=0;P<S.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"||S.type&&S.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"||S.type&&S.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(S,M){var P=(S.name?S.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(S,M){c.globals.axisCharts?$(S,M):((u=[]).push(p(c.globals.labels[M])),u.push(m(f[M])),d.push(u.join(r)))}):function(){var S=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),S.add(L)})}),u.length&&d.push(u.join(r)),Array.from(S).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}(),k1=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 qc(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 Ne(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 S=Math.max(Number(h.config.xaxis.tickAmount)||1,$>1?$-1:$);a=h.globals.gridWidth/Math.min(S,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 B=document.createElementNS(h.globals.SVGNS,"title");B.textContent=Array.isArray(L.text)?L.text.join(" "):L.text,V.node.appendChild(B),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 Ne(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(S){var M=u[S]===void 0?"":u[S];M=h(M,{seriesIndex:e,dataPointIndex:S,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[S]: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:S});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 B=r.rotateAroundCenter(R.node);R.node.setAttribute("transform","rotate(".concat(o.config.yaxis[e].labels.rotate," 0 ").concat(B.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 Ne(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 Ne(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}(),fj=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 qc(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 Ne(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 Ne(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(0,0,n.gridWidth,n.gridHeight,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 k1(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 Ne(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 Ne(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 k1(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 Ne(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,S=0;$<m;$++,S++)S>=r.config.grid[p].colors.length&&(S=0),o._drawGridBandRect({c:S,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}(),pj=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.coreUtils=new ys(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)),he.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||!he.isNumber(e)&&!he.isNumber(n)||e===Number.MIN_VALUE&&n===-Number.MAX_VALUE)&&(e=he.isNumber(i.min)?i.min:0,n=he.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)),S=Math.pow(10,$),M=Math.ceil(C/S);if(k=C=(M=u.niceScaleAllowedMagMsd[u.yValueDecimal===0?0:1][M])*S,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(he.mod(b,k)!=0){var I=he.getGCD(k,T);k=T/I<10?I:T}else he.mod(k,T)==0?k=T:(T=k,h=!1);else k=T;else if(d)he.mod(b,k)==0?T=k:k=T;else if(he.mod(b,k)==0)T=k;else{T=b/(y=Math.ceil(b/k));var L=he.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)/he.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)/he.getGCD(b,k)>s&&(n=e+k*f,n+=k*Math.ceil((V-n)/k))}}else if(u.isMultipleYAxis&&h){var B=k*Math.floor(e/k),F=B+k*y;F<n&&(k*=2),F=n,n=(e=B)+k*y,b=Math.abs(n-e),e>0&&e<Math.abs(F-n)&&(e=0,n=k*y),n<0&&-n<Math.abs(B-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=he.getGCD(b,k),y=Math.round(b/k)}if(h||o||r||(y=Math.ceil((b-l)/(k+l)))>16&&he.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=he.getPrimeFactors(y),U=z.length-1,G=y;e:for(var K=0;K<U;K++)for(var X=0;X<=U-K;X++){for(var W=Math.min(X+K,U),Q=G,ne=1,Z=X;Z<=W;Z++)ne*=z[Z];if((Q/=ne)<s){G=Q;break e}}k=G===y?b:b/G,y=Math.round(b/k)}u.isMultipleYAxis&&u.multiAxisTickAmount==0&&u.ignoreYAxisIndexes.indexOf(a)<0&&(u.multiAxisTickAmount=y);var ae=e-k,ge=k*l;do ae+=k,m.push(he.stripNumber(ae,7));while(n-ae>ge);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=he.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));he.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&&he.isNumber(i)&&n!==Number.MAX_VALUE&&he.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&&he.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=n.series[u].group;c.indexOf(d)<0&&c.push(d)}),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=[],$=[],S=[];c.forEach(function(){C.push(k.map(function(){return Number.MIN_VALUE})),$.push(k.map(function(){return Number.MIN_VALUE})),S.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 B=i.series[I][V];B>=0?$[R][V]+=B:S[R][V]+=B,C[R][V]+=B,p=Math.min(p,B),m=Math.max(m,B)}})),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,S[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}(),Kx=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.scales=new pj(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(S){return S!==void 0}).length),r.labels.length&&o.xaxis.type!=="datetime"&&r.series.reduce(function(S,M){return S+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&&he.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(S){a=Math.max(a,S.value),n=Math.min(n,S.value)}),i=a,he.isFloat($)&&($=he.noExponents($),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&&he.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&&he.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 ii(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&&he.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=DU(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}(),qS=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 qc(e)}return ct(t,[{key:"drawYaxis",value:function(e){var n=this.w,i=new Ne(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,S=he.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:S.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 Ne(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 Ne(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 Ne(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 Ne(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;he.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=he.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}(),Z_t=function(){function t(e){lt(this,t),this.ctx=e,this.w=e.w,this.documentEvent=he.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}(),J_t=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=he.extend(uj,i);this.w.globals.locale=s.options}}]),t}(),Q_t=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 k1(this.ctx,n),c=new qS(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}(),Zx=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 Ne(this.ctx),i=new ci(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;(!he.isNumber($)||$<0)&&($=0);var S=e.config.xaxis.crosshairs.width;(!he.isNumber(S)||S<0)&&(S=0),C.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:$,width:S,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 Ne(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}(),eyt=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 w1({}),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=he.clone(i.globals.initialConfig);h.series=he.clone(i.config.series);var f=ys.extendArrayProps(r,h,i);c=he.extend(f,c),c=he.extend(i.config,c),n.overrideResponsiveOptions(c)}else for(var p=0;p<o.length;p++)d<o[p].breakpoint&&(c=ys.extendArrayProps(r,o[p].options,i),c=he.extend(i.config,c),n.overrideResponsiveOptions(c))};if(e){var l=ys.extendArrayProps(r,e,i);l=he.extend(i.config,l),a(l=he.extend(l,e))}else a({})}}},{key:"overrideResponsiveOptions",value:function(e){var n=new w1(e).init({responsiveOverride:!0});this.w.config=n}}]),t}(),tyt=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 he;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}(),nyt=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 Ne(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}(),syt=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({},he.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=he.getLargestStringFromArr(i),o=new Ne(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}(),iyt=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=he.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 kv(this.dCtx.ctx),c=r;r=l.xLabelFormat(o,r,c,{i:void 0,dateFormatter:new ii(this.dCtx.ctx).formatDate,w:n}),a=l.xLabelFormat(o,a,c,{i:void 0,dateFormatter:new ii(this.dCtx.ctx).formatDate,w:n}),(n.config.xaxis.convertedCatToNumeric&&r===void 0||String(r).trim()==="")&&(a=r="1");var u=new Ne(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=he.getLargestStringFromArr(o),a=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,o),l=new Ne(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 Ne(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 Ne(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}(),oyt=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 qc(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($,S){var M,P;return((M=String(d($,l)))===null||M===void 0?void 0:M.length)>((P=String(d(S,l)))===null||P===void 0?void 0:P.length)?$:S},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=he.getLargestStringFromArr(m),f=d(f,{seriesIndex:a,dataPointIndex:-1,w:n}),p=e.dCtx.dimHelpers.getLargestStringFromMultiArr(f,m)}var y=new Ne(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 Ne(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 qc(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}(),ryt=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 qc(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}(),nb=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 syt(this),this.dimYAxis=new oyt(this),this.dimXAxis=new iyt(this),this.dimGrid=new ryt(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=DU(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 qS(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}(),ayt=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(` | |
| 174 | 175 | .apexcharts-flip-y { |
| 175 | 176 | transform: scaleY(-1) translateY(-100%); |
| 176 | 177 | transform-origin: top; |
| 177 | 178 | transform-box: fill-box; |
| @@ -245,9 +246,9 @@ | ||
| 245 | 246 | .apexcharts-inactive-legend { |
| 246 | 247 | opacity: 0.45; |
| 247 | 248 | } |
| 248 | 249 | |
| 249 | - `);return i.appendChild(r),i}},{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 s=this,i=this.w;if(i.globals.axisCharts||i.config.chart.type==="radialBar"){i.globals.resized=!0;var o=null,r=null;i.globals.risingSeries=[],i.globals.axisCharts?(o=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(e,"']")),r=parseInt(o.getAttribute("data:realIndex"),10)):(o=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(e+1,"']")),r=parseInt(o.getAttribute("rel"),10)-1),n?[{cs:i.globals.collapsedSeries,csi:i.globals.collapsedSeriesIndices},{cs:i.globals.ancillaryCollapsedSeries,csi:i.globals.ancillaryCollapsedSeriesIndices}].forEach(function(u){s.riseCollapsedSeries(u.cs,u.csi,r)}):this.hideSeries({seriesEl:o,realIndex:r})}else{var a=i.globals.dom.Paper.findOne(" .apexcharts-series[rel='".concat(e+1,"'] path")),l=i.config.chart.type;if(l==="pie"||l==="polarArea"||l==="donut"){var c=i.config.plotOptions.pie.donut.labels;new Ve(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,s=this.w,i=s.globals,o=ue.clone(s.config.series);if(i.axisCharts){var r=s.config.yaxis[i.seriesYAxisReverseMap[n]],a={index:n,data:o[n].data.slice(),type:o[n].type||s.config.chart.type};if(r&&r.show&&r.showAlways)i.ancillaryCollapsedSeriesIndices.indexOf(n)<0&&(i.ancillaryCollapsedSeries.push(a),i.ancillaryCollapsedSeriesIndices.push(n));else if(i.collapsedSeriesIndices.indexOf(n)<0){i.collapsedSeries.push(a),i.collapsedSeriesIndices.push(n);var l=i.risingSeries.indexOf(n);i.risingSeries.splice(l,1)}}else i.collapsedSeries.push({index:n,data:o[n]}),i.collapsedSeriesIndices.push(n);return i.allSeriesCollapsed=i.collapsedSeries.length+i.ancillaryCollapsedSeries.length===s.config.series.length,this._getSeriesBasedOnCollapsedState(o)}},{key:"hideSeries",value:function(e){for(var n=e.seriesEl,s=e.realIndex,i=this.w,o=this.getSeriesAfterCollapsing({realIndex:s}),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,i.config.chart.animations.dynamicAnimation.enabled)}},{key:"riseCollapsedSeries",value:function(e,n,s){var i=this.w,o=ue.clone(i.config.series);if(e.length>0){for(var r=0;r<e.length;r++)e[r].index===s&&(i.globals.axisCharts?o[s].data=e[r].data.slice():o[s]=e[r].data,typeof o[s]!="number"&&(o[s].hidden=!1),e.splice(r,1),n.splice(r,1),i.globals.risingSeries.push(s));o=this._getSeriesBasedOnCollapsedState(o),this.lgCtx.ctx.updateHelpers._updateSeries(o,i.config.chart.animations.dynamicAnimation.enabled)}}},{key:"_getSeriesBasedOnCollapsedState",value:function(e){var n=this.w,s=0;return n.globals.axisCharts?e.forEach(function(i,o){n.globals.collapsedSeriesIndices.indexOf(o)<0&&n.globals.ancillaryCollapsedSeriesIndices.indexOf(o)<0||(e[o].data=[],s++)}):e.forEach(function(i,o){!n.globals.collapsedSeriesIndices.indexOf(o)<0&&(e[o]=0,s++)}),n.globals.allSeriesCollapsed=s===e.length,e}}]),t}(),sU=function(){function t(e){at(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 z1t(this)}return lt(t,[{key:"init",value:function(){var e=this.w,n=e.globals,s=e.config,i=s.legend.showForSingleSeries&&n.series.length===1||this.isBarsDistributed||n.series.length>1;if(this.legendHelpers.appendToForeignObject(),(i||!n.axisCharts)&&s.legend.show){for(;n.dom.elLegendWrap.firstChild;)n.dom.elLegendWrap.removeChild(n.dom.elLegendWrap.firstChild);this.drawLegends(),s.legend.position==="bottom"||s.legend.position==="top"?this.legendAlignHorizontal():s.legend.position!=="right"&&s.legend.position!=="left"||this.legendAlignVertical()}}},{key:"createLegendMarker",value:function(e){var n=e.i,s=e.fillcolor,i=this.w,o=document.createElement("span");o.classList.add("apexcharts-legend-marker");var r=i.config.legend.markers.shape||i.config.markers.shape,a=r;Array.isArray(r)&&(a=r[n]);var l=Array.isArray(i.config.legend.markers.size)?parseFloat(i.config.legend.markers.size[n]):parseFloat(i.config.legend.markers.size),c=Array.isArray(i.config.legend.markers.offsetX)?parseFloat(i.config.legend.markers.offsetX[n]):parseFloat(i.config.legend.markers.offsetX),u=Array.isArray(i.config.legend.markers.offsetY)?parseFloat(i.config.legend.markers.offsetY[n]):parseFloat(i.config.legend.markers.offsetY),d=Array.isArray(i.config.legend.markers.strokeWidth)?parseFloat(i.config.legend.markers.strokeWidth[n]):parseFloat(i.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",i.config.legend.markers.customHTML)h.background="transparent",h.color=s[n],Array.isArray(i.config.legend.markers.customHTML)?i.config.legend.markers.customHTML[n]&&(o.innerHTML=i.config.legend.markers.customHTML[n]()):o.innerHTML=i.config.legend.markers.customHTML();else{var f=new ap(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 Ve(this.ctx).drawMarker(0,0,Je(Je({},f),{},{pointFillColor:Array.isArray(s)?s[n]:f.pointFillColor,shape:a}));i.globals.dom.Paper.find(".apexcharts-legend-marker.apexcharts-marker").forEach(function(b){b.node.classList.contains("apexcharts-marker-triangle")?b.node.style.transform="translate(50%, 45%)":b.node.style.transform="translate(50%, 50%)"}),p.add(m)}return o}},{key:"drawLegends",value:function(){var e=this,n=this,s=this.w,i=s.config.legend.fontFamily,o=s.globals.seriesNames,r=s.config.legend.markers.fillColors?s.config.legend.markers.fillColors.slice():s.globals.colors.slice();if(s.config.chart.type==="heatmap"){var a=s.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=s.globals.labels.slice());s.config.legend.customLegendItems.length&&(o=s.config.legend.customLegendItems);var l=s.globals.legendFormatter,c=s.config.legend.inverseOrder,u=[];s.globals.seriesGroups.length>1&&s.config.legend.clusterGroupedSeries&&s.globals.seriesGroups.forEach(function(f,p){u[p]=document.createElement("div"),u[p].classList.add("apexcharts-legend-group","apexcharts-legend-group-".concat(p)),s.config.legend.clusterGroupedSeriesOrientation==="horizontal"?s.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:s}),b=!1,y=!1;if(s.globals.collapsedSeries.length>0)for(var C=0;C<s.globals.collapsedSeries.length;C++)s.globals.collapsedSeries[C].index===f&&(b=!0);if(s.globals.ancillaryCollapsedSeriesIndices.length>0)for(var k=0;k<s.globals.ancillaryCollapsedSeriesIndices.length;k++)s.globals.ancillaryCollapsedSeriesIndices[k]===f&&(y=!0);var x=e.createLegendMarker({i:f,fillcolor:r});Ve.setAttrs(x,{rel:f+1,"data:collapsed":b||y}),(b||y)&&x.classList.add("apexcharts-inactive-legend");var S=document.createElement("div"),E=document.createElement("span");E.classList.add("apexcharts-legend-text"),E.innerHTML=Array.isArray(m)?m.join(" "):m;var T=s.config.legend.labels.useSeriesColors?s.globals.colors[f]:Array.isArray(s.config.legend.labels.colors)?(p=s.config.legend.labels.colors)===null||p===void 0?void 0:p[f]:s.config.legend.labels.colors;T||(T=s.config.chart.foreColor),E.style.color=T,E.style.fontSize=parseFloat(s.config.legend.fontSize)+"px",E.style.fontWeight=s.config.legend.fontWeight,E.style.fontFamily=i||s.config.chart.fontFamily,Ve.setAttrs(E,{rel:f+1,i:f,"data:default-text":encodeURIComponent(m),"data:collapsed":b||y}),S.appendChild(x),S.appendChild(E);var P=new rs(e.ctx);s.config.legend.showForZeroSeries||P.getSeriesTotalByIndex(f)===0&&P.seriesHaveSameValues(f)&&!P.isSeriesNull(f)&&s.globals.collapsedSeriesIndices.indexOf(f)===-1&&s.globals.ancillaryCollapsedSeriesIndices.indexOf(f)===-1&&S.classList.add("apexcharts-hidden-zero-series"),s.config.legend.showForNullSeries||P.isSeriesNull(f)&&s.globals.collapsedSeriesIndices.indexOf(f)===-1&&s.globals.ancillaryCollapsedSeriesIndices.indexOf(f)===-1&&S.classList.add("apexcharts-hidden-null-series"),u.length?s.globals.seriesGroups.forEach(function(I,L){var V;I.includes((V=s.config.series[f])===null||V===void 0?void 0:V.name)&&(s.globals.dom.elLegendWrap.appendChild(u[L]),u[L].appendChild(S))}):s.globals.dom.elLegendWrap.appendChild(S),s.globals.dom.elLegendWrap.classList.add("apexcharts-align-".concat(s.config.legend.horizontalAlign)),s.globals.dom.elLegendWrap.classList.add("apx-legend-position-"+s.config.legend.position),S.classList.add("apexcharts-legend-series"),S.style.margin="".concat(s.config.legend.itemMargin.vertical,"px ").concat(s.config.legend.itemMargin.horizontal,"px"),s.globals.dom.elLegendWrap.style.width=s.config.legend.width?s.config.legend.width+"px":"",s.globals.dom.elLegendWrap.style.height=s.config.legend.height?s.config.legend.height+"px":"",Ve.setAttrs(S,{rel:f+1,seriesName:ue.escapeString(o[f]),"data:collapsed":b||y}),(b||y)&&S.classList.add("apexcharts-inactive-legend"),s.config.legend.onItemClick.toggleDataSeries||S.classList.add("apexcharts-no-click")},h=c?o.length-1:0;c?h>=0:h<=o.length-1;c?h--:h++)d(h);s.globals.dom.elWrap.addEventListener("click",n.onLegendClick,!0),s.config.legend.onItemHover.highlightDataSeries&&s.config.legend.customLegendItems.length===0&&(s.globals.dom.elWrap.addEventListener("mousemove",n.onLegendHovered,!0),s.globals.dom.elWrap.addEventListener("mouseout",n.onLegendHovered,!0))}},{key:"setLegendWrapXY",value:function(e,n){var s=this.w,i=s.globals.dom.elLegendWrap,o=i.clientHeight,r=0,a=0;if(s.config.legend.position==="bottom")a=s.globals.svgHeight-Math.min(o,s.globals.svgHeight/2)-5;else if(s.config.legend.position==="top"){var l=new fy(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)}i.style.position="absolute",r=r+e+s.config.legend.offsetX,a=a+n+s.config.legend.offsetY,i.style.left=r+"px",i.style.top=a+"px",s.config.legend.position==="right"&&(i.style.left="auto",i.style.right=25+s.config.legend.offsetX+"px"),["width","height"].forEach(function(d){i.style[d]&&(i.style[d]=parseInt(s.config.legend[d],10)+"px")})}},{key:"legendAlignHorizontal",value:function(){var e=this.w;e.globals.dom.elLegendWrap.style.right=0;var n=new fy(this.ctx),s=n.dimHelpers.getTitleSubtitleCoords("title"),i=n.dimHelpers.getTitleSubtitleCoords("subtitle"),o=0;e.config.legend.position==="top"&&(o=s.height+i.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(),s=0;e.config.legend.position==="left"&&(s=20),e.config.legend.position==="right"&&(s=e.globals.svgWidth-n.clww-10),this.setLegendWrapXY(s,20)}},{key:"onLegendHovered",value:function(e){var n=this.w,s=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(s){var i=parseInt(e.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,i,this.w]),new Ko(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&s&&new Ko(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 s=parseInt(e.target.getAttribute("rel"),10)-1,i=e.target.getAttribute("data:collapsed")==="true",o=this.w.config.chart.events.legendClick;typeof o=="function"&&o(this.ctx,s,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,s,this.w]);var r=this.w.config.legend.markers.onClick;typeof r=="function"&&e.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,s,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,s,this.w])),n.config.chart.type!=="treemap"&&n.config.chart.type!=="heatmap"&&!this.isBarsDistributed&&n.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(s,i)}}}]),t}(),iU=function(){function t(e){at(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 lt(t,[{key:"createToolbar",value:function(){var e=this,n=this.w,s=function(){return document.createElement("div")},i=s();if(i.setAttribute("class","apexcharts-toolbar"),i.style.top=n.config.chart.toolbar.offsetY+"px",i.style.right=3-n.config.chart.toolbar.offsetX+"px",n.globals.dom.elWrap.appendChild(i),this.elZoom=s(),this.elZoomIn=s(),this.elZoomOut=s(),this.elPan=s(),this.elSelection=s(),this.elZoomReset=s(),this.elMenuIcon=s(),this.elMenu=s(),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(s());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"> | |
| 250 | + `);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 Ne(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=he.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=he.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}(),mj=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 ayt(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 Rp(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 Ne(this.ctx).drawMarker(0,0,tt(tt({},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});Ne.setAttrs($,{rel:f+1,"data:collapsed":y||b}),(y||b)&&$.classList.add("apexcharts-inactive-legend");var S=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,Ne.setAttrs(M,{rel:f+1,i:f,"data:default-text":encodeURIComponent(m),"data:collapsed":y||b}),S.appendChild($),S.appendChild(M);var T=new ys(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&&S.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&&S.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(S))}):i.globals.dom.elLegendWrap.appendChild(S),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),S.classList.add("apexcharts-legend-series"),S.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":"",Ne.setAttrs(S,{rel:f+1,seriesName:he.escapeString(o[f]),"data:collapsed":y||b}),(y||b)&&S.classList.add("apexcharts-inactive-legend"),i.config.legend.onItemClick.toggleDataSeries||S.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 nb(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 nb(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 gr(this.ctx).highlightRangeInSeries(e,e.target)}}else!e.target.classList.contains("apexcharts-inactive-legend")&&i&&new gr(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}(),gj=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"> | |
| 250 | 251 | <path d="M0 0h24v24H0z" fill="none"/> |
| 251 | 252 | <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"/> |
| 252 | 253 | </svg> |
| 253 | 254 | `),a("zoomOut",this.elZoomOut,`<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| @@ -271,12 +272,12 @@ | ||
| 271 | 272 | <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"/> |
| 272 | 273 | </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"> |
| 273 | 274 | <path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/> |
| 274 | 275 | <path d="M0 0h24v24H0z" fill="none"/> |
| 275 | -</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&&ue.moveIndexInArray(r,h,d.index)});for(var u=0;u<r.length;u++)Ve.setAttrs(r[u].el,{class:r[u].class,title:r[u].title}),r[u].el.innerHTML=r[u].icon,i.appendChild(r[u].el);this._createHamburgerMenu(i),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),Ve.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}],s=0;s<n.length;s++)this.elMenuItems.push(document.createElement("div")),this.elMenuItems[s].innerHTML=n[s].title,Ve.setAttrs(this.elMenuItems[s],{class:"apexcharts-menu-item ".concat(n[s].name),title:n[s].title}),this.elMenu.appendChild(this.elMenuItems[s])}},{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(s){s.classList.contains("exportSVG")?s.addEventListener("click",e.handleDownload.bind(e,"svg")):s.classList.contains("exportPNG")?s.addEventListener("click",e.handleDownload.bind(e,"png")):s.classList.contains("exportCSV")&&s.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 s=e==="selection"?n.ctx.toolbar.elSelection:n.ctx.toolbar.elZoom,i=e==="selection"?"selectionEnabled":"zoomEnabled";n.w.globals[i]=!n.w.globals[i],s.classList.contains(n.ctx.toolbar.selectedClass)?s.classList.remove(n.ctx.toolbar.selectedClass):s.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,s=e==="pan"?this.elZoom:this.elPan;n&&n.classList.add(this.selectedClass),s&&s.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(s){s&&s.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,s=(this.minX+n)/2,i=(this.maxX+n)/2,o=this._getNewMinXMaxX(s,i);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,s=this.minX-(n-this.minX),i=this.maxX-(n-this.maxX),o=this._getNewMinXMaxX(s,i);e.globals.disableZoomOut||this.zoomUpdateOptions(o.minX,o.maxX)}}},{key:"_getNewMinXMaxX",value:function(e,n){var s=this.w.config.xaxis.convertedCatToNumeric;return{minX:s?Math.floor(e):e,maxX:s?Math.floor(n):n}}},{key:"zoomUpdateOptions",value:function(e,n){var s=this.w;if(e!==void 0||n!==void 0){if(!(s.config.xaxis.convertedCatToNumeric&&(e<1&&(e=1,n=s.globals.dataPoints),n-e<2))){var i={min:e,max:n},o=this.getBeforeZoomRange(i);o&&(i=o.xaxis);var r={xaxis:i},a=ue.clone(s.globals.initialConfig.yaxis);s.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(i,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 s=null;return typeof this.ev.beforeZoom=="function"&&(s=this.ev.beforeZoom(this,{xaxis:e,yaxis:n})),s}},{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,s=new hy(this.ctx);switch(e){case"svg":s.exportToSVG(this.ctx);break;case"png":s.exportToPng(this.ctx);break;case"csv":s.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 s=n.w;if(s.globals.lastXAxis.min=s.globals.initialConfig.xaxis.min,s.globals.lastXAxis.max=s.globals.initialConfig.xaxis.max,n.updateHelpers.revertDefaultAxisMinMax(),typeof s.config.chart.events.beforeResetZoom=="function"){var i=s.config.chart.events.beforeResetZoom(n,s);i&&n.updateHelpers.revertDefaultAxisMinMax(i)}typeof s.config.chart.events.zoomed=="function"&&n.ctx.toolbar.zoomCallback({min:s.config.xaxis.min,max:s.config.xaxis.max}),s.globals.zoomed=!1;var o=n.ctx.series.emptyCollapsedSeries(ue.clone(s.globals.initialSeries));n.updateHelpers._updateSeries(o,s.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}(),H1t=function(t){L1(n,iU);var e=I1(n);function n(s){var i;return at(this,n),(i=e.call(this,s)).ctx=s,i.w=s.w,i.dragged=!1,i.graphics=new Ve(i.ctx),i.eventList=["mousedown","mouseleave","mousemove","touchstart","touchmove","mouseup","touchend","wheel"],i.clientX=0,i.clientY=0,i.startX=0,i.endX=0,i.dragX=0,i.startY=0,i.endY=0,i.dragY=0,i.moveDirection="none",i.debounceTimer=null,i.debounceDelay=100,i.wheelDelay=400,i}return lt(n,[{key:"init",value:function(s){var i=this,o=s.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 As(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){i.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(s,i){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(i.shiftKey?(this.shiftWasPressed=!0,r.enableZoomPanFromToolbar(l==="pan"?"zoom":"pan")):this.shiftWasPressed&&(r.enableZoomPanFromToolbar(l),this.shiftWasPressed=!1),i.target){var c,u=i.target.classList;if(i.target.parentNode&&i.target.parentNode!==null&&(c=i.target.parentNode.classList),!(u.contains("apexcharts-legend-marker")||u.contains("apexcharts-legend-text")||c&&c.contains("apexcharts-toolbar"))){if(this.clientX=i.type==="touchmove"||i.type==="touchstart"?i.touches[0].clientX:i.type==="touchend"?i.changedTouches[0].clientX:i.clientX,this.clientY=i.type==="touchmove"||i.type==="touchstart"?i.touches[0].clientY:i.type==="touchend"?i.changedTouches[0].clientY:i.clientY,i.type==="mousedown"&&i.which===1||i.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}(i.type==="mousemove"&&i.which===1||i.type==="touchmove")&&(this.dragged=!0,o.globals.panEnabled?(o.globals.selection=null,this.w.globals.mousedown&&this.panDragging({context:this,zoomtype:a,xyRatios:s})):(this.w.globals.mousedown&&o.globals.zoomEnabled||this.w.globals.mousedown&&o.globals.selectionEnabled)&&(this.selection=this.selectionDrawing({context:this,zoomtype:a}))),i.type!=="mouseup"&&i.type!=="touchend"&&i.type!=="mouseleave"||this.handleMouseUp({zoomtype:a}),this.makeSelectionRectDraggable()}}}},{key:"handleMouseUp",value:function(s){var i,o=s.zoomtype,r=s.isResized,a=this.w,l=(i=this.gridRect)===null||i===void 0?void 0:i.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(s){var i=this,o=this.w;s.preventDefault();var r=Date.now();r-o.globals.lastWheelExecution>this.wheelDelay&&(this.executeMouseWheelZoom(s),o.globals.lastWheelExecution=r),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){r-o.globals.lastWheelExecution>i.wheelDelay&&(i.executeMouseWheelZoom(s),o.globals.lastWheelExecution=r)},this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(s){var i,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=(i=this.gridRect)===null||i===void 0?void 0:i.getBoundingClientRect();if(r){var a,l,c,u=(s.clientX-r.left)/r.width,d=this.minX,h=this.maxX,f=h-d;if(s.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 b=(l+c)/2;l=b-m/2,c=b+m/2}}var y=this._getNewMinXMaxX(l,c);isNaN(y.minX)||isNaN(y.maxX)||this.zoomUpdateOptions(y.minX,y.maxX)}}},{key:"makeSelectionRectDraggable",value:function(){var s=this,i=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=i.globals.zoomEnabled?i.config.chart.zoom.type:i.config.chart.selection.type;s.handleMouseUp({zoomtype:r,isResized:!0})}))}}},{key:"preselectedSelection",value:function(){var s=this.w,i=this.xyRatios;if(!s.globals.zoomEnabled){if(s.globals.selection!==void 0&&s.globals.selection!==null)this.drawSelectionRect(Je(Je({},s.globals.selection),{},{translateX:s.globals.translateX,translateY:s.globals.translateY}));else if(s.config.chart.selection.xaxis.min!==void 0&&s.config.chart.selection.xaxis.max!==void 0){var o=(s.config.chart.selection.xaxis.min-s.globals.minX)/i.xRatio,r=s.globals.gridWidth-(s.globals.maxX-s.config.chart.selection.xaxis.max)/i.xRatio-o;s.globals.isRangeBar&&(o=(s.config.chart.selection.xaxis.min-s.globals.yAxisScale[0].niceMin)/i.invertedYRatio,r=(s.config.chart.selection.xaxis.max-s.config.chart.selection.xaxis.min)/i.invertedYRatio);var a={x:o,y:0,width:r,height:s.globals.gridHeight,translateX:s.globals.translateX,translateY:s.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(a),this.makeSelectionRectDraggable(),typeof s.config.chart.events.selection=="function"&&s.config.chart.events.selection(this.ctx,{xaxis:{min:s.config.chart.selection.xaxis.min,max:s.config.chart.selection.xaxis.max},yaxis:{}})}}}},{key:"drawSelectionRect",value:function(s){var i=s.x,o=s.y,r=s.width,a=s.height,l=s.translateX,c=l===void 0?0:l,u=s.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:i,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}),Ve.setAttrs(f.node,m)),h.globals.selectionEnabled&&(p.attr({x:i,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}),Ve.setAttrs(p.node,m))}}},{key:"hideSelectionRect",value:function(s){s&&s.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(s){var i=s.context,o=s.zoomtype,r=this.w,a=i,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,b=p-u,y={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,b=Math.abs(b)),y=Je(Je({},y=o==="x"?{x:d?c-m:c,y:0,width:m,height:r.globals.gridHeight}:o==="y"?{x:0,y:h?u-b:u,width:r.globals.gridWidth,height:b}:{x:d?c-m:c,y:h?u-b:u,width:m,height:b}),{},{translateX:r.globals.translateX,translateY:r.globals.translateY}),a.drawSelectionRect(y),a.selectionDragging("resizing"),y}},{key:"selectionDragging",value:function(s,i){var o=this,r=this.w;if(i){i.preventDefault();var a=i.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;s==="resizing"&&(p=30);var m=function(y){return parseFloat(f.node.getAttribute(y))},b={x:m("x"),y:m("y"),width:m("width"),height:m("height")};r.globals.selection=b,typeof r.config.chart.events.selection=="function"&&r.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var y,C,k,x,S=o.gridRect.getBoundingClientRect(),E=f.node.getBoundingClientRect();r.globals.isRangeBar?(y=r.globals.yAxisScale[0].niceMin+(E.left-S.left)*h.invertedYRatio,C=r.globals.yAxisScale[0].niceMin+(E.right-S.left)*h.invertedYRatio,k=0,x=1):(y=r.globals.xAxisScale.niceMin+(E.left-S.left)*h.xRatio,C=r.globals.xAxisScale.niceMin+(E.right-S.left)*h.xRatio,k=r.globals.yAxisScale[0].niceMin+(S.bottom-E.bottom)*h.yRatio[0],x=r.globals.yAxisScale[0].niceMax-(E.top-S.top)*h.yRatio[0]);var T={xaxis:{min:y,max:C},yaxis:{min:k,max:x}};r.config.chart.events.selection(o.ctx,T),r.config.chart.brush.enabled&&r.config.chart.events.brushScrolled!==void 0&&r.config.chart.events.brushScrolled(o.ctx,T)},p))}}},{key:"selectionDrawn",value:function(s){var i=s.context,o=s.zoomtype,r=this.w,a=i,l=this.xyRatios,c=this.ctx.toolbar;if(a.startX>a.endX){var u=a.startX;a.startX=a.endX,a.endX=u}if(a.startY>a.endY){var d=a.startY;a.startY=a.endY,a.endY=d}var h=void 0,f=void 0;r.globals.isRangeBar?(h=r.globals.yAxisScale[0].niceMin+a.startX*l.invertedYRatio,f=r.globals.yAxisScale[0].niceMin+a.endX*l.invertedYRatio):(h=r.globals.xAxisScale.niceMin+a.startX*l.xRatio,f=r.globals.xAxisScale.niceMin+a.endX*l.xRatio);var p=[],m=[];if(r.config.yaxis.forEach(function(E,T){var P=r.globals.seriesYAxisMap[T][0];p.push(r.globals.yAxisScale[T].niceMax-l.yRatio[P]*a.startY),m.push(r.globals.yAxisScale[T].niceMax-l.yRatio[P]*a.endY)}),a.dragged&&(a.dragX>10||a.dragY>10)&&h!==f){if(r.globals.zoomEnabled){var b=ue.clone(r.globals.initialConfig.yaxis),y=ue.clone(r.globals.initialConfig.xaxis);if(r.globals.zoomed=!0,r.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),f=Math.floor(f),h<1&&(h=1,f=r.globals.dataPoints),f-h<2&&(f=h+1)),o!=="xy"&&o!=="x"||(y={min:h,max:f}),o!=="xy"&&o!=="y"||b.forEach(function(E,T){b[T].min=m[T],b[T].max=p[T]}),c){var C=c.getBeforeZoomRange(y,b);C&&(y=C.xaxis?C.xaxis:y,b=C.yaxis?C.yaxis:b)}var k={xaxis:y};r.config.chart.group||(k.yaxis=b),a.ctx.updateHelpers._updateOptions(k,!1,a.w.config.chart.animations.dynamicAnimation.enabled),typeof r.config.chart.events.zoomed=="function"&&c.zoomCallback(y,b)}else if(r.globals.selectionEnabled){var x,S=null;x={min:h,max:f},o!=="xy"&&o!=="y"||(S=ue.clone(r.config.yaxis)).forEach(function(E,T){S[T].min=m[T],S[T].max=p[T]}),r.globals.selection=a.selection,typeof r.config.chart.events.selection=="function"&&r.config.chart.events.selection(a.ctx,{xaxis:x,yaxis:S})}}}},{key:"panDragging",value:function(s){var i=s.context,o=this.w,r=i;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 s=this.w,i=s.globals.minX,o=s.globals.maxX,r=(s.globals.maxX-s.globals.minX)/2;this.moveDirection==="left"?(i=s.globals.minX+r,o=s.globals.maxX+r):this.moveDirection==="right"&&(i=s.globals.minX-r,o=s.globals.maxX-r),i=Math.floor(i),o=Math.floor(o),this.updateScrolledChart({xaxis:{min:i,max:o}},i,o)}},{key:"panScrolled",value:function(s,i){var o=this.w,r=this.xyRatios,a=ue.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"?(s=c+o.globals.gridWidth/15*l,i=u+o.globals.gridWidth/15*l):this.moveDirection==="right"&&(s=c-o.globals.gridWidth/15*l,i=u-o.globals.gridWidth/15*l),o.globals.isRangeBar||(s<o.globals.initialMinX||i>o.globals.initialMaxX)&&(s=c,i=u);var d={xaxis:{min:s,max:i}};o.config.chart.group||(d.yaxis=a),this.updateScrolledChart(d,s,i)}},{key:"updateScrolledChart",value:function(s,i,o){var r=this.w;this.ctx.updateHelpers._updateOptions(s,!1,!1),typeof r.config.chart.events.scrolled=="function"&&r.config.chart.events.scrolled(this.ctx,{xaxis:{min:i,max:o}})}}]),n}(),oU=function(){function t(e){at(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return lt(t,[{key:"getNearestValues",value:function(e){var n=e.hoverArea,s=e.elGrid,i=e.clientX,o=e.clientY,r=this.w,a=s.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=i-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),b=Math.floor(p/d);h&&!r.config.xaxis.convertedCatToNumeric&&(m=Math.ceil(f/u),m-=1);var y=null,C=null,k=r.globals.seriesXvalues.map(function(P){return P.filter(function(I){return ue.isNumber(I)})}),x=r.globals.seriesYvalues.map(function(P){return P.filter(function(I){return ue.isNumber(I)})});if(r.globals.isXNumeric){var S=this.ttCtx.getElGrid().getBoundingClientRect(),E=f*(S.width/l),T=p*(S.height/c);y=(C=this.closestInMultiArray(E,T,k,x)).index,m=C.j,y!==null&&r.globals.hasNullValues&&(k=r.globals.seriesXvalues[y],m=(C=this.closestInArray(E,k)).j)}return r.globals.capturedSeriesIndex=y===null?-1:y,(!m||m<1)&&(m=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=b:r.globals.capturedDataPointIndex=m,{capturedSeries:y,j:r.globals.isBarHorizontal?b:m,hoverX:f,hoverY:p}}},{key:"getFirstActiveXArray",value:function(e){for(var n=this.w,s=0,i=e.map(function(r,a){return r.length>0?a:-1}),o=0;o<i.length;o++)if(i[o]!==-1&&n.globals.collapsedSeriesIndices.indexOf(o)===-1&&n.globals.ancillaryCollapsedSeriesIndices.indexOf(o)===-1){s=i[o];break}return s}},{key:"closestInMultiArray",value:function(e,n,s,i){for(var o,r=this.w,a=1/0,l=null,c=null,u=0;u<s.length;u++)if(o=u,r.globals.collapsedSeriesIndices.indexOf(o)===-1&&r.globals.ancillaryCollapsedSeriesIndices.indexOf(o)===-1)for(var d=s[u],h=i[u],f=Math.min(d.length,h.length),p=0;p<f;p++){var m=e-d[p],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 s=n[0],i=null,o=Math.abs(e-s),r=0;r<n.length;r++){var a=Math.abs(e-n[r]);a<o&&(o=a,i=r)}return{j:i}}},{key:"isXoverlap",value:function(e){var n=[],s=this.w.globals.seriesX.filter(function(o){return o[0]!==void 0});if(s.length>0)for(var i=0;i<s.length-1;i++)s[i][e]!==void 0&&s[i+1][e]!==void 0&&s[i][e]!==s[i+1][e]&&n.push("unEqual");return n.length===0}},{key:"isInitialSeriesSameLen",value:function(){for(var e=!0,n=this.w.globals.initialSeries,s=0;s<n.length-1;s++)if(n[s].data.length!==n[s+1].data.length){e=!1;break}return e}},{key:"getBarsHeight",value:function(e){return Cs(e).reduce(function(n,s){return n+s.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],s=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");s=Cs(s),n&&(s=s.filter(function(o){var r=Number(o.getAttribute("data:realIndex"));return e.w.globals.collapsedSeriesIndices.indexOf(r)===-1})),s.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 i=[];return s.forEach(function(o){i.push(o.querySelector(".apexcharts-marker"))}),i}},{key:"hasMarkers",value:function(e){return this.getElMarkers(e).length>0}},{key:"getPathFromPoint",value:function(e,n){var s=Number(e.getAttribute("cx")),i=Number(e.getAttribute("cy")),o=e.getAttribute("shape");return new Ve(this.ctx).getMarkerPath(s,i,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,s=n.config.markers.hover.size;return s===void 0&&(s=n.globals.markers.size[e]+n.config.markers.hover.sizeOffset),s}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var n=this.w,s=this.ttCtx;s.allTooltipSeriesGroups.length===0&&(s.allTooltipSeriesGroups=n.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var i=s.allTooltipSeriesGroups,o=0;o<i.length;o++)e==="enable"?(i[o].classList.add("apexcharts-active"),i[o].style.display=n.config.tooltip.items.display):(i[o].classList.remove("apexcharts-active"),i[o].style.display="none")}}]),t}(),U1t=function(){function t(e){at(this,t),this.w=e.w,this.ctx=e.ctx,this.ttCtx=e,this.tooltipUtil=new oU(e)}return lt(t,[{key:"drawSeriesTexts",value:function(e){var n=e.shared,s=n===void 0||n,i=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(s,r);var f=this.getValuesToPrint({i:r,j:l});this.printLabels({i:r,j:l,values:f,ttItems:i,shared:s,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,s=this,i=e.i,o=e.j,r=e.values,a=e.ttItems,l=e.shared,c=e.e,u=this.w,d=[],h=function(S){return u.globals.seriesGoals[S]&&u.globals.seriesGoals[S][o]&&Array.isArray(u.globals.seriesGoals[S][o])},f=r.xVal,p=r.zVal,m=r.xAxisTTVal,b="",y=u.globals.colors[i];o!==null&&u.config.plotOptions.bar.distributed&&(y=u.globals.colors[o]);for(var C=function(S,E){var T=s.getFormatters(i);b=s.getSeriesName({fn:T.yLbTitleFormatter,index:i,seriesIndex:i,j:o}),u.config.chart.type==="treemap"&&(b=T.yLbTitleFormatter(String(u.config.series[i].data[o].x),{series:u.globals.series,seriesIndex:i,dataPointIndex:o,w:u}));var P=u.config.tooltip.inverseOrder?E:S;if(u.globals.axisCharts){var I=function(D){var z,Y,B,U;return u.globals.isRangeData?T.yLbFormatter((z=u.globals.seriesRangeStart)===null||z===void 0||(Y=z[D])===null||Y===void 0?void 0:Y[o],{series:u.globals.seriesRangeStart,seriesIndex:D,dataPointIndex:o,w:u})+" - "+T.yLbFormatter((B=u.globals.seriesRangeEnd)===null||B===void 0||(U=B[D])===null||U===void 0?void 0:U[o],{series:u.globals.seriesRangeEnd,seriesIndex:D,dataPointIndex:o,w:u}):T.yLbFormatter(u.globals.series[D][o],{series:u.globals.series,seriesIndex:D,dataPointIndex:o,w:u})};if(l)T=s.getFormatters(P),b=s.getSeriesName({fn:T.yLbTitleFormatter,index:P,seriesIndex:i,j:o}),y=u.globals.colors[P],n=I(P),h(P)&&(d=u.globals.seriesGoals[P][o].map(function(D){return{attrs:D,val:T.yLbFormatter(D.value,{seriesIndex:P,dataPointIndex:o,w:u})}}));else{var L,V=c==null||(L=c.target)===null||L===void 0?void 0:L.getAttribute("fill");V&&(V.indexOf("url")!==-1?V.indexOf("Pattern")!==-1&&(y=u.globals.dom.baseEl.querySelector(V.substr(4).slice(0,-1)).childNodes[0].getAttribute("stroke")):y=V),n=I(i),h(i)&&Array.isArray(u.globals.seriesGoals[i][o])&&(d=u.globals.seriesGoals[i][o].map(function(D){return{attrs:D,val:T.yLbFormatter(D.value,{seriesIndex:i,dataPointIndex:o,w:u})}}))}}o===null&&(n=T.yLbFormatter(u.globals.series[i],Je(Je({},u),{},{seriesIndex:i,dataPointIndex:i}))),s.DOMHandling({i,t:P,j:o,ttItems:a,values:{val:n,goalVals:d,xVal:f,xAxisTTVal:m,zVal:p},seriesName:b,shared:l,pColor:y})},k=0,x=u.globals.series.length-1;k<u.globals.series.length;k++,x--)C(k,x)}},{key:"getFormatters",value:function(e){var n,s=this.w,i=s.globals.yLabelFormatters[e];return s.globals.ttVal!==void 0?Array.isArray(s.globals.ttVal)?(i=s.globals.ttVal[e]&&s.globals.ttVal[e].formatter,n=s.globals.ttVal[e]&&s.globals.ttVal[e].title&&s.globals.ttVal[e].title.formatter):(i=s.globals.ttVal.formatter,typeof s.globals.ttVal.title.formatter=="function"&&(n=s.globals.ttVal.title.formatter)):n=s.config.tooltip.y.title.formatter,typeof i!="function"&&(i=s.globals.yLabelFormatters[0]?s.globals.yLabelFormatters[0]:function(o){return o}),typeof n!="function"&&(n=function(o){return o?o+": ":""}),{yLbFormatter:i,yLbTitleFormatter:n}}},{key:"getSeriesName",value:function(e){var n=e.fn,s=e.index,i=e.seriesIndex,o=e.j,r=this.w;return n(String(r.globals.seriesNames[s]),{series:r.globals.series,seriesIndex:i,dataPointIndex:o,w:r})}},{key:"DOMHandling",value:function(e){e.i;var n=e.t,s=e.j,i=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,b=null;b=i[n].children,c.config.tooltip.fillSeriesColor&&(i[n].style.backgroundColor=l,b[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 y=i[n].querySelector(".apexcharts-tooltip-text-y-label");y&&(y.innerHTML=r||"");var C=i[n].querySelector(".apexcharts-tooltip-text-y-value");C&&(C.innerHTML=d!==void 0?d:""),b[0]&&b[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]),b[0].style.backgroundColor=l),c.config.tooltip.marker.show||(b[0].style.display="none");var k=i[n].querySelector(".apexcharts-tooltip-text-goals-label"),x=i[n].querySelector(".apexcharts-tooltip-text-goals-value");if(h.length&&c.globals.seriesGoals[n]){var S=function(){var P="<div >",I="<div>";h.forEach(function(L,V){P+=' <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>")}),k.innerHTML=P+"</div>",x.innerHTML=I+"</div>"};a?c.globals.seriesGoals[n][s]&&Array.isArray(c.globals.seriesGoals[n][s])?S():(k.innerHTML="",x.innerHTML=""):S()}else k.innerHTML="",x.innerHTML="";if(m!==null&&(i[n].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=c.config.tooltip.z.title,i[n].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=m!==void 0?m:""),a&&b[0]){if(c.config.tooltip.hideEmptySeries){var E=i[n].querySelector(".apexcharts-tooltip-marker"),T=i[n].querySelector(".apexcharts-tooltip-text");parseFloat(d)==0?(E.style.display="none",T.style.display="none"):(E.style.display="block",T.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?b[0].parentNode.style.display="none":b[0].parentNode.style.display=c.config.tooltip.items.display}else Array.isArray(u.tConfig.enabledOnSeries)&&u.tConfig.enabledOnSeries.indexOf(n)===-1&&(b[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(e,n){var s=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=s.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(n));i&&(i.classList.add("apexcharts-active"),i.style.display=s.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var n=e.i,s=e.j,i=this.w,o=this.ctx.series.filteredSeriesX(),r="",a="",l=null,c=null,u={series:i.globals.series,seriesIndex:n,dataPointIndex:s,w:i},d=i.globals.ttZFormatter;s===null?c=i.globals.series[n]:i.globals.isXNumeric&&i.config.chart.type!=="treemap"?(r=o[n][s],o[n].length===0&&(r=o[this.tooltipUtil.getFirstActiveXArray(o)][s])):r=new N5(this.ctx).isFormatXY()?i.config.series[n].data[s]!==void 0?i.config.series[n].data[s].x:"":i.globals.labels[s]!==void 0?i.globals.labels[s]:"";var h=r;return i.globals.isXNumeric&&i.config.xaxis.type==="datetime"?r=new V1(this.ctx).xLabelFormat(i.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new zs(this.ctx).formatDate,w:this.w}):r=i.globals.isBarHorizontal?i.globals.yLabelFormatters[0](h,u):i.globals.xLabelFormatter(h,u),i.config.tooltip.x.formatter!==void 0&&(r=i.globals.ttKeyFormatter(h,u)),i.globals.seriesZ.length>0&&i.globals.seriesZ[n].length>0&&(l=d(i.globals.seriesZ[n][s],i)),a=typeof i.config.xaxis.tooltip.formatter=="function"?i.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,s=e.j,i=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:s,y1:i,y2:o,w:r});typeof c=="string"?a.innerHTML=c:(c instanceof Element||typeof c.nodeName=="string")&&(a.innerHTML="",a.appendChild(c))}}]),t}(),rU=function(){function t(e){at(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return lt(t,[{key:"moveXCrosshairs",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,s=this.ttCtx,i=this.w,o=s.getElXCrosshairs(),r=e-s.xcrosshairsWidth/2,a=i.globals.labels.slice().length;if(n!==null&&(r=i.globals.gridWidth/a*n),o===null||i.globals.isBarHorizontal||(o.setAttribute("x",r),o.setAttribute("x1",r),o.setAttribute("x2",r),o.setAttribute("y2",i.globals.gridHeight),o.classList.add("apexcharts-active")),r<0&&(r=0),r>i.globals.gridWidth&&(r=i.globals.gridWidth),s.isXAxisTooltipEnabled){var l=r;i.config.xaxis.crosshairs.width!=="tickWidth"&&i.config.xaxis.crosshairs.width!=="barWidth"||(l=r+s.xcrosshairsWidth/2),this.moveXAxisTooltip(l)}}},{key:"moveYCrosshairs",value:function(e){var n=this.ttCtx;n.ycrosshairs!==null&&Ve.setAttrs(n.ycrosshairs,{y1:e,y2:e}),n.ycrosshairsHidden!==null&&Ve.setAttrs(n.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var n=this.w,s=this.ttCtx;if(s.xaxisTooltip!==null&&s.xcrosshairsWidth!==0){s.xaxisTooltip.classList.add("apexcharts-active");var i=s.xaxisOffY+n.config.xaxis.tooltip.offsetY+n.globals.translateY+1+n.config.xaxis.offsetY;if(e-=s.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e)){e+=n.globals.translateX;var o;o=new Ve(this.ctx).getTextRects(s.xaxisTooltipText.innerHTML),s.xaxisTooltipText.style.minWidth=o.width+"px",s.xaxisTooltip.style.left=e+"px",s.xaxisTooltip.style.top=i+"px"}}}},{key:"moveYAxisTooltip",value:function(e){var n=this.w,s=this.ttCtx;s.yaxisTTEls===null&&(s.yaxisTTEls=n.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var i=parseInt(s.ycrosshairsHidden.getAttribute("y1"),10),o=n.globals.translateY+i,r=s.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?(s.yaxisTTEls[e].classList.add("apexcharts-active"),s.yaxisTTEls[e].style.top=o+"px",s.yaxisTTEls[e].style.left=a+n.config.yaxis[e].tooltip.offsetX+"px"):s.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=this.w,o=this.ttCtx,r=o.getElTooltip(),a=o.tooltipRect,l=s!==null?parseFloat(s):1,c=parseFloat(e)+l+5,u=parseFloat(n)+l/2;if(c>i.globals.gridWidth/2&&(c=c-a.ttWidth-l-10),c>i.globals.gridWidth-a.ttWidth-10&&(c=i.globals.gridWidth-a.ttWidth),c<-20&&(c=-20),i.config.tooltip.followCursor){var d=o.getElGrid().getBoundingClientRect();(c=o.e.clientX-d.left)>i.globals.gridWidth/2&&(c-=o.tooltipRect.ttWidth),(u=o.e.clientY+i.globals.translateY-d.top)>i.globals.gridHeight/2&&(u-=o.tooltipRect.ttHeight)}else i.globals.isBarHorizontal||a.ttHeight/2+u>i.globals.gridHeight&&(u=i.globals.gridHeight-a.ttHeight+i.globals.translateY);isNaN(c)||(c+=i.globals.translateX,r.style.left=c+"px",r.style.top=u+"px")}},{key:"moveMarkers",value:function(e,n){var s=this.w,i=this.ttCtx;if(s.globals.markers.size[e]>0)for(var o=s.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&&(i.marker.resetPointsSize(),i.marker.enlargeCurrentPoint(n,o[r]));else i.marker.resetPointsSize(),this.moveDynamicPointOnHover(n,e)}},{key:"moveDynamicPointOnHover",value:function(e,n){var s,i,o,r,a=this.w,l=this.ttCtx,c=new Ve(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=(s=u[n][e])===null||s===void 0?void 0:s[0],r=((i=u[n][e])===null||i===void 0?void 0:i[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,s=this.ttCtx,i=s.w,o=0,r=0,a=i.globals.pointsArray,l=new Ko(this.ctx),c=new Ve(this.ctx);n=l.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var u=s.tooltipUtil.getHoverMarkerSize(n);if(a[n]&&(o=a[n][e][0],r=a[n][e][1]),!isNaN(o)){var d=s.tooltipUtil.getAllMarkers();if(d.length)for(var h=0;h<i.globals.series.length;h++){var f=a[h];if(i.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 b=d[h].getAttribute("shape");if(i.config.chart.type==="rangeArea"&&!i.globals.comboCharts){var y=e+i.globals.series[h].length;m=a[h][y][1],p-=Math.abs(p-m)/2}if(p!==null&&!isNaN(p)&&p<i.globals.gridHeight+u&&p+u>0){var C=c.getMarkerPath(o,p,b,u);d[h].setAttribute("d",C)}else d[h].setAttribute("d","")}}this.moveXCrosshairs(o),s.fixedTooltip||this.moveTooltip(o,r||i.globals.gridHeight,u)}}},{key:"moveStickyTooltipOverBars",value:function(e,n){var s=this.w,i=this.ttCtx,o=s.globals.columnSeries?s.globals.columnSeries.length:s.globals.series.length,r=o>=2&&o%2==0?Math.floor(o/2):Math.floor(o/2)+1;s.globals.isBarHorizontal&&(r=new Ko(this.ctx).getActiveConfigSeriesIndex("desc")+1);var a=s.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=s.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(n,"'] path[j='").concat(e,`'], | |
| 276 | +</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&&he.moveIndexInArray(r,h,d.index)});for(var u=0;u<r.length;u++)Ne.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),Ne.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,Ne.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=he.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 tb(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(he.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}(),lyt=function(t){_v(n,gj);var e=vv(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 Ne(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(tt(tt({},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}),Ne.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}),Ne.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=tt(tt({},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,$,S=o.gridRect.getBoundingClientRect(),M=f.node.getBoundingClientRect();r.globals.isRangeBar?(b=r.globals.yAxisScale[0].niceMin+(M.left-S.left)*h.invertedYRatio,k=r.globals.yAxisScale[0].niceMin+(M.right-S.left)*h.invertedYRatio,C=0,$=1):(b=r.globals.xAxisScale.niceMin+(M.left-S.left)*h.xRatio,k=r.globals.xAxisScale.niceMin+(M.right-S.left)*h.xRatio,C=r.globals.yAxisScale[0].niceMin+(S.bottom-M.bottom)*h.yRatio[0],$=r.globals.yAxisScale[0].niceMax-(M.top-S.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=i.context,o=i.zoomtype,r=this.w,a=s,l=this.xyRatios,c=this.ctx.toolbar;if(a.startX>a.endX){var u=a.startX;a.startX=a.endX,a.endX=u}if(a.startY>a.endY){var d=a.startY;a.startY=a.endY,a.endY=d}var h=void 0,f=void 0;r.globals.isRangeBar?(h=r.globals.yAxisScale[0].niceMin+a.startX*l.invertedYRatio,f=r.globals.yAxisScale[0].niceMin+a.endX*l.invertedYRatio):(h=r.globals.xAxisScale.niceMin+a.startX*l.xRatio,f=r.globals.xAxisScale.niceMin+a.endX*l.xRatio);var p=[],m=[];if(r.config.yaxis.forEach(function(M,P){var T=r.globals.seriesYAxisMap[P][0];p.push(r.globals.yAxisScale[P].niceMax-l.yRatio[T]*a.startY),m.push(r.globals.yAxisScale[P].niceMax-l.yRatio[T]*a.endY)}),a.dragged&&(a.dragX>10||a.dragY>10)&&h!==f){if(r.globals.zoomEnabled){var y=he.clone(r.globals.initialConfig.yaxis),b=he.clone(r.globals.initialConfig.xaxis);if(r.globals.zoomed=!0,r.config.xaxis.convertedCatToNumeric&&(h=Math.floor(h),f=Math.floor(f),h<1&&(h=1,f=r.globals.dataPoints),f-h<2&&(f=h+1)),o!=="xy"&&o!=="x"||(b={min:h,max:f}),o!=="xy"&&o!=="y"||y.forEach(function(M,P){y[P].min=m[P],y[P].max=p[P]}),c){var k=c.getBeforeZoomRange(b,y);k&&(b=k.xaxis?k.xaxis:b,y=k.yaxis?k.yaxis:y)}var C={xaxis:b};r.config.chart.group||(C.yaxis=y),a.ctx.updateHelpers._updateOptions(C,!1,a.w.config.chart.animations.dynamicAnimation.enabled),typeof r.config.chart.events.zoomed=="function"&&c.zoomCallback(b,y)}else if(r.globals.selectionEnabled){var $,S=null;$={min:h,max:f},o!=="xy"&&o!=="y"||(S=he.clone(r.config.yaxis)).forEach(function(M,P){S[P].min=m[P],S[P].max=p[P]}),r.globals.selection=a.selection,typeof r.config.chart.events.selection=="function"&&r.config.chart.events.selection(a.ctx,{xaxis:$,yaxis:S})}}}},{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=he.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}(),vj=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 he.isNumber(I)})}),$=r.globals.seriesYvalues.map(function(T){return T.filter(function(I){return he.isNumber(I)})});if(r.globals.isXNumeric){var S=this.ttCtx.getElGrid().getBoundingClientRect(),M=f*(S.width/l),P=p*(S.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=n-h[p],b=Math.sqrt(m*m+y*y);b<a&&(a=b,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 Ne(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}(),cyt=function(){function t(e){lt(this,t),this.w=e.w,this.ctx=e.ctx,this.ttCtx=e,this.tooltipUtil=new vj(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(S){return u.globals.seriesGoals[S]&&u.globals.seriesGoals[S][o]&&Array.isArray(u.globals.seriesGoals[S][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(S,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:S;if(u.globals.axisCharts){var I=function(V){var B,F,z,U;return u.globals.isRangeData?P.yLbFormatter((B=u.globals.seriesRangeStart)===null||B===void 0||(F=B[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||(U=z[V])===null||U===void 0?void 0:U[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],tt(tt({},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.backgroundColor=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.backgroundColor=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 S=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])?S():(C.innerHTML="",$.innerHTML=""):S()}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 YS(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 kv(this.ctx).xLabelFormat(s.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new ii(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))}}]),t}(),_j=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&&Ne.setAttrs(n.ycrosshairs,{y1:e,y2:e}),n.ycrosshairsHidden!==null&&Ne.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 Ne(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 Ne(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 gr(this.ctx),c=new Ne(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,r=o>=2&&o%2==0?Math.floor(o/2):Math.floor(o/2)+1;i.globals.isBarHorizontal&&(r=new gr(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,`'], | |
| 276 | 277 | .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(e,`'], |
| 277 | 278 | .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='`).concat(n,"'] path[j='").concat(e,`'], |
| 278 | - .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=i.getElGrid().getBoundingClientRect(),h=a&&(a.classList.contains("apexcharts-candlestick-area")||a.classList.contains("apexcharts-boxPlot-area"));s.globals.isXNumeric?(a&&!h&&(l-=o%2!=0?u/2:0),a&&h&&(l-=u/2)):s.globals.isBarHorizontal||(l=i.xAxisTicksPositions[e-1]+i.dataPointsDividedWidth/2,isNaN(l)&&(l=i.xAxisTicksPositions[e]-i.dataPointsDividedWidth/2)),s.globals.isBarHorizontal?c-=i.tooltipRect.ttHeight:s.config.tooltip.followCursor?c=i.e.clientY-d.top-i.tooltipRect.ttHeight/2:c+i.tooltipRect.ttHeight+15>s.globals.gridHeight&&(c=s.globals.gridHeight),s.globals.isBarHorizontal||this.moveXCrosshairs(l),i.fixedTooltip||this.moveTooltip(l,c||s.globals.gridHeight)}}]),t}(),j1t=function(){function t(e){at(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new rU(e)}return lt(t,[{key:"drawDynamicPoints",value:function(){var e=this.w,n=new Ve(this.ctx),s=new ap(this.ctx),i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");i=Cs(i),e.config.chart.stacked&&i.sort(function(d,h){return parseFloat(d.getAttribute("data:realIndex"))-parseFloat(h.getAttribute("data:realIndex"))});for(var o=0;o<i.length;o++){var r=i[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=s.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 s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=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(s!==null&&i!==null&&(r=s,a=i),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,s=this,i=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)){s.newPointSize(o,r[l]);var d=r[l].getAttribute("cx"),h=r[l].getAttribute("cy");s.tooltipPosition.moveXCrosshairs(d),i.fixedTooltip||s.tooltipPosition.moveTooltip(d,h,a)}else s.oldPointSize(r[l])}}},{key:"newPointSize",value:function(e,n){var s=this.w,i=s.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);i===void 0&&(i=s.globals.markers.size[r]+s.config.markers.hover.sizeOffset),i<0&&(i=0);var a=this.ttCtx.tooltipUtil.getPathFromPoint(n,i);n.setAttribute("d",a)}}},{key:"oldPointSize",value:function(e){var n=parseFloat(e.getAttribute("default-marker-size")),s=this.ttCtx.tooltipUtil.getPathFromPoint(e,n);e.setAttribute("d",s)}},{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 s=parseFloat(e[n].getAttribute("default-marker-size"));if(ue.isNumber(s)&&s>0){var i=this.ttCtx.tooltipUtil.getPathFromPoint(e[n],s);e[n].setAttribute("d",i)}else e[n].setAttribute("d","M0,0")}}}]),t}(),W1t=function(){function t(e){at(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 lt(t,[{key:"getAttr",value:function(e,n){return parseFloat(e.target.getAttribute(n))}},{key:"handleHeatTreeTooltip",value:function(e){var n=e.e,s=e.opt,i=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:s.ttItems,i:c,j:u,shared:!1,e:n}),l.globals.capturedSeriesIndex=c,l.globals.capturedDataPointIndex=u,i=d+a.tooltipRect.ttWidth/2+f,o=h+a.tooltipRect.ttHeight/2-p/2,a.tooltipPosition.moveXCrosshairs(d+f/2),i>l.globals.gridWidth/2&&(i=d-a.tooltipRect.ttWidth/2+f),a.w.config.tooltip.followCursor){var m=l.globals.dom.elWrap.getBoundingClientRect();i=l.globals.clientX-m.left-(i>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:i,y:o}}},{key:"handleMarkerTooltip",value:function(e){var n,s,i=e.e,o=e.opt,r=e.x,a=e.y,l=this.w,c=this.ttCtx;if(i.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(s=parseInt(o.paths.getAttribute("rel"),10),n=parseInt(o.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,c.intersect){var f=ue.findAncestor(o.paths,"apexcharts-series");f&&(n=parseInt(f.getAttribute("data:realIndex"),10))}if(c.tooltipLabels.drawSeriesTexts({ttItems:o.ttItems,i:n,j:s,shared:!c.showOnIntersect&&l.config.tooltip.shared,e:i}),i.type==="mouseup"&&c.markerClick(i,n,s),l.globals.capturedSeriesIndex=n,l.globals.capturedDataPointIndex=s,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(s,o.paths,r,a)}return{x:r,y:a}}},{key:"handleBarTooltip",value:function(e){var n,s,i=e.e,o=e.opt,r=this.w,a=this.ttCtx,l=a.getElTooltip(),c=0,u=0,d=0,h=this.getBarTooltipXY({e:i,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,s=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+s/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,s=e.e,i=e.opt,o=this.w,r=null,a=this.ttCtx,l=0,c=0,u=0,d=0,h=0,f=s.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=s.target,m=p.getBoundingClientRect(),b=i.elGrid.getBoundingClientRect(),y=m.height;h=m.height;var C=m.width,k=parseInt(p.getAttribute("cx"),10),x=parseInt(p.getAttribute("cy"),10);d=parseFloat(p.getAttribute("barWidth"));var S=s.type==="touchmove"?s.touches[0].clientX:s.clientX;r=parseInt(p.getAttribute("j"),10),l=parseInt(p.parentNode.getAttribute("rel"),10)-1;var E=p.getAttribute("data-range-y1"),T=p.getAttribute("data-range-y2");o.globals.comboCharts&&(l=parseInt(p.parentNode.getAttribute("data:realIndex"),10));var P=function(L){return o.globals.isXNumeric?k-C/2:n.isVerticalGroupedRangeBar?k+C/2:k-a.dataPointsDividedWidth+C/2},I=function(){return x-a.dataPointsDividedHeight+y/2-a.tooltipRect.ttHeight/2};a.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:r,y1:E?parseInt(E,10):null,y2:T?parseInt(T,10):null,shared:!a.showOnIntersect&&o.config.tooltip.shared,e:s}),o.config.tooltip.followCursor?o.globals.isBarHorizontal?(c=S-b.left+15,u=I()):(c=P(),u=s.clientY-b.top-a.tooltipRect.ttHeight/2-15):o.globals.isBarHorizontal?((c=k)<a.xyRatios.baseLineInvertedY&&(c=k-a.tooltipRect.ttWidth),u=I()):(c=P(),u=x)}return{x:c,y:u,barHeight:h,barWidth:d,i:l,j:r}}}]),t}(),Y1t=function(){function t(e){at(this,t),this.w=e.w,this.ttCtx=e}return lt(t,[{key:"drawXaxisTooltip",value:function(){var e=this.w,n=this.ttCtx,s=e.config.xaxis.position==="bottom";n.xaxisOffY=s?e.globals.gridHeight+1:-e.globals.xAxisHeight-e.config.xaxis.axisTicks.height+3;var i=s?"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",i+" 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,s=0;s<e.config.yaxis.length;s++){var i=e.config.yaxis[s].opposite||e.config.yaxis[s].crosshairs.opposite;n.yaxisOffX=i?e.globals.gridWidth+1:1;var o="apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(s,i?" apexcharts-yaxistooltip-right":" apexcharts-yaxistooltip-left"),r=e.globals.dom.elWrap;e.globals.dom.baseEl.querySelector(".apexcharts-yaxistooltip apexcharts-yaxistooltip-".concat(s))===null&&(n.yaxisTooltip=document.createElement("div"),n.yaxisTooltip.setAttribute("class",o+" apexcharts-theme-"+e.config.tooltip.theme),r.appendChild(n.yaxisTooltip),s===0&&(n.yaxisTooltipText=[]),n.yaxisTooltipText[s]=document.createElement("div"),n.yaxisTooltipText[s].classList.add("apexcharts-yaxistooltip-text"),n.yaxisTooltip.appendChild(n.yaxisTooltipText[s]))}}},{key:"setXCrosshairWidth",value:function(){var e=this.w,n=this.ttCtx,s=n.getElXCrosshairs();if(n.xcrosshairsWidth=parseInt(e.config.xaxis.crosshairs.width,10),e.globals.comboCharts){var i=e.globals.dom.baseEl.querySelector(".apexcharts-bar-area");if(i!==null&&e.config.xaxis.crosshairs.width==="barWidth"){var o=parseFloat(i.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),s!==null&&n.xcrosshairsWidth>0&&s.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,s){var i=this.ttCtx,o=this.w,r=o.globals,a=r.seriesYAxisMap[e];if(i.yaxisTooltips[e]&&a.length>0){var l=r.yLabelFormatters[e],c=i.getElGrid().getBoundingClientRect(),u=a[0],d=0;s.yRatio.length>1&&(d=u);var h=(n-c.top)*s.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)),i.tooltipPosition.moveYCrosshairs(n-c.top),i.yaxisTooltipText[e].innerHTML=l(p),i.tooltipPosition.moveYAxisTooltip(e)}}}]),t}(),GE=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w;var n=this.w;this.tConfig=n.config.tooltip,this.tooltipUtil=new oU(this),this.tooltipLabels=new U1t(this),this.tooltipPosition=new rU(this),this.marker=new j1t(this),this.intersect=new W1t(this),this.axesTooltip=new Y1t(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 lt(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 s=document.createElement("div");if(s.classList.add("apexcharts-tooltip"),n.config.tooltip.cssClass&&s.classList.add(n.config.tooltip.cssClass),s.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),n.globals.dom.elWrap.appendChild(s),n.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var i=new Fg(this.ctx);this.xAxisTicksPositions=i.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,s.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,s=this.w,i=[],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=s.config.tooltip.inverseOrder?e-l:l+1;var u=document.createElement("span");u.classList.add("apexcharts-tooltip-marker"),u.style.backgroundColor=s.globals.colors[l],c.appendChild(u);var d=document.createElement("div");d.classList.add("apexcharts-tooltip-text"),d.style.fontFamily=n.tConfig.style.fontFamily||s.config.chart.fontFamily,d.style.fontSize=n.tConfig.style.fontSize,["y","goals","z"].forEach(function(h){var f=document.createElement("div");f.classList.add("apexcharts-tooltip-".concat(h,"-group"));var p=document.createElement("span");p.classList.add("apexcharts-tooltip-text-".concat(h,"-label")),f.appendChild(p);var m=document.createElement("span");m.classList.add("apexcharts-tooltip-text-".concat(h,"-value")),f.appendChild(m),d.appendChild(f)}),c.appendChild(d),o.appendChild(c),i.push(c)},a=0;a<e;a++)r(a);return i}},{key:"addSVGEvents",value:function(){var e=this.w,n=e.config.chart.type,s=this.getElTooltip(),i=!(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:s,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"):i?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||i&&this.tooltipUtil.hasBars()&&this.tConfig.shared)this.addPathsEventListeners([r],d);else if(i&&!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(),s=n.getBoundingClientRect(),i=s.width+10,o=s.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-i+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:i,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 s=this,i=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,s.onSeriesHover.bind(s,a),{capture:!1,passive:!0})})},o=0;o<e.length;o++)i(o)}},{key:"onSeriesHover",value:function(e,n){var s=this,i=Date.now()-this.lastHoverTime;i>=20?this.seriesHover(e,n):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){s.seriesHover(e,n)},20-i))}},{key:"seriesHover",value:function(e,n){var s=this;this.lastHoverTime=Date.now();var i=[],o=this.w;o.config.chart.group&&(i=this.ctx.getGroupedCharts()),o.globals.axisCharts&&(o.globals.minX===-1/0&&o.globals.maxX===1/0||o.globals.dataPoints===0)||(i.length?i.forEach(function(r){var a=s.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===s.w.globals.minX&&r.w.globals.maxX===s.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,s=e.ttCtx,i=e.opt,o=e.e,r=n.w,a=this.getElTooltip(n);a&&(s.tooltipRect={x:0,y:0,ttWidth:a.getBoundingClientRect().width,ttHeight:a.getBoundingClientRect().height},s.e=o,s.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!s.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new Ko(n).toggleSeriesOnHover(o,o.target.parentNode),s.fixedTooltip&&s.drawFixedTooltipRect(),r.globals.axisCharts?s.axisChartsTooltips({e:o,opt:i,tooltipRect:s.tooltipRect}):s.nonAxisChartsTooltips({e:o,opt:i,tooltipRect:s.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var n,s,i=e.e,o=e.opt,r=this.w,a=o.elGrid.getBoundingClientRect(),l=i.type==="touchmove"?i.touches[0].clientX:i.clientX,c=i.type==="touchmove"?i.touches[0].clientY:i.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(i.type==="mousemove"||i.type==="touchmove"||i.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(C){return C===!0});if(this.ycrosshairs!==null&&m.length&&this.ycrosshairs.classList.add("apexcharts-active"),p&&!this.showOnIntersect||f.length>1)this.handleStickyTooltip(i,l,c,o);else if(r.config.chart.type==="heatmap"||r.config.chart.type==="treemap"){var b=this.intersect.handleHeatTreeTooltip({e:i,opt:o,x:n,y:s,type:r.config.chart.type});n=b.x,s=b.y,d.style.left=n+"px",d.style.top=s+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:i,opt:o}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:i,opt:o,x:n,y:s});if(this.yaxisTooltips.length)for(var y=0;y<r.config.yaxis.length;y++)this.axesTooltip.drawYaxisTooltipText(y,c,this.xyRatios);r.globals.dom.baseEl.classList.add("apexcharts-tooltip-active"),o.tooltipEl.classList.add("apexcharts-active")}else i.type!=="mouseout"&&i.type!=="touchend"||this.handleMouseOut(o)}}},{key:"nonAxisChartsTooltips",value:function(e){var n=e.e,s=e.opt,i=e.tooltipRect,o=this.w,r=s.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:s.ttItems,i:parseInt(r,10)-1,shared:!1});var c=o.globals.clientX-l.left-i.ttWidth/2,u=o.globals.clientY-l.top-i.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,s,i){var o=this.w,r=this.tooltipUtil.getNearestValues({context:this,hoverArea:i.hoverArea,elGrid:i.elGrid,clientX:n,clientY:s}),a=r.j,l=r.capturedSeries;o.globals.collapsedSeriesIndices.includes(l)&&(l=null);var c=i.elGrid.getBoundingClientRect();if(r.hoverX<0||r.hoverX>c.width)this.handleMouseOut(i);else if(l!==null)this.handleStickyCapturedSeries(e,l,i,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,i.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,n,s,i){var o=this.w;if(!this.tConfig.shared&&o.globals.series[n][i]===null)return void this.handleMouseOut(s);if(o.globals.series[n][i]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(i)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,n,i,s.ttItems):this.create(e,this,n,i,s.ttItems,!1);else if(this.tooltipUtil.isXoverlap(i)){var r=o.globals.series.findIndex(function(a,l){return!o.globals.collapsedSeriesIndices.includes(l)});this.create(e,this,r,i,s.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,n=new Ve(this.ctx),s=e.globals.dom.Paper.find(".apexcharts-bar-area"),i=0;i<s.length;i++)n.pathMouseLeave(s[i])}},{key:"handleMouseOut",value:function(e){var n=this.w,s=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(),s!==null&&s.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 i=0;i<this.yaxisTTEls.length;i++)this.yaxisTTEls[i].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,s){var i=this.w;typeof i.config.chart.events.markerClick=="function"&&i.config.chart.events.markerClick(e,this.ctx,{seriesIndex:n,dataPointIndex:s,w:i}),this.ctx.events.fireEvent("markerClick",[e,this.ctx,{seriesIndex:n,dataPointIndex:s,w:i}])}},{key:"create",value:function(e,n,s,i,o){var r,a,l,c,u,d,h,f,p,m,b,y,C,k,x,S,E=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,T=this.w,P=n;e.type==="mouseup"&&this.markerClick(e,s,i),E===null&&(E=this.tConfig.shared);var I=this.tooltipUtil.hasMarkers(s),L=this.tooltipUtil.getElBars(),V=function(){T.globals.markers.largestSize>0?P.marker.enlargePoints(i):P.tooltipPosition.moveDynamicPointsOnHover(i)};if(T.config.legend.tooltipHoverFormatter){var D=T.config.legend.tooltipHoverFormatter,z=Array.from(this.legendLabels);z.forEach(function(Z){var me=Z.getAttribute("data:default-text");Z.innerHTML=decodeURIComponent(me)});for(var Y=0;Y<z.length;Y++){var B=z[Y],U=parseInt(B.getAttribute("i"),10),X=decodeURIComponent(B.getAttribute("data:default-text")),K=D(X,{seriesIndex:E?U:s,dataPointIndex:i,w:T});if(E)B.innerHTML=T.globals.collapsedSeriesIndices.indexOf(U)<0?K:X;else if(B.innerHTML=U===s?K:X,s===U)break}}var N=Je(Je({ttItems:o,i:s,j:i},((r=T.globals.seriesRange)===null||r===void 0||(a=r[s])===null||a===void 0||(l=a[i])===null||l===void 0||(c=l.y[0])===null||c===void 0?void 0:c.y1)!==void 0&&{y1:(u=T.globals.seriesRange)===null||u===void 0||(d=u[s])===null||d===void 0||(h=d[i])===null||h===void 0||(f=h.y[0])===null||f===void 0?void 0:f.y1}),((p=T.globals.seriesRange)===null||p===void 0||(m=p[s])===null||m===void 0||(b=m[i])===null||b===void 0||(y=b.y[0])===null||y===void 0?void 0:y.y2)!==void 0&&{y2:(C=T.globals.seriesRange)===null||C===void 0||(k=C[s])===null||k===void 0||(x=k[i])===null||x===void 0||(S=x.y[0])===null||S===void 0?void 0:S.y2});if(E){if(P.tooltipLabels.drawSeriesTexts(Je(Je({},N),{},{shared:!this.showOnIntersect&&this.tConfig.shared})),I)V();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var F=new Ve(this.ctx),Q=T.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(i,"']"));this.deactivateHoverFilter(),P.tooltipPosition.moveStickyTooltipOverBars(i,s),P.tooltipUtil.getAllMarkers(!0).length&&V();for(var ie=0;ie<Q.length;ie++)F.pathMouseEnter(Q[ie])}}else P.tooltipLabels.drawSeriesTexts(Je({shared:!1},N)),this.tooltipUtil.hasBars()&&P.tooltipPosition.moveStickyTooltipOverBars(i,s),I&&P.tooltipPosition.moveMarkers(s,i)}}]),t}(),G1t=function(){function t(e){at(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 lt(t,[{key:"handleBarDataLabels",value:function(e){var n,s,i=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,b=e.barYPosition,y=e.visibleSeries,C=e.renderedPath,k=this.w,x=new Ve(this.barCtx.ctx),S=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[u]:this.barCtx.strokeWidth;k.globals.isXNumeric&&!k.globals.isBarHorizontal?(n=i+parseFloat(p*(y+1)),s=o+parseFloat(f*(y+1))-S):(n=i+parseFloat(p*y),s=o+parseFloat(f*y));var E,T=null,P=i,I=o,L={},V=k.config.dataLabels,D=this.barCtx.barOptions.dataLabels,z=this.barCtx.barOptions.dataLabels.total;b!==void 0&&this.barCtx.isRangeBar&&(s=b,I=b),m!==void 0&&this.barCtx.isVerticalGroupedRangeBar&&(n=m,P=m);var Y=V.offsetX,B=V.offsetY,U={width:0,height:0};if(k.config.dataLabels.enabled){var X=k.globals.series[l][c];U=x.getTextRects(k.config.dataLabels.formatter?k.config.dataLabels.formatter(X,Je(Je({},k),{},{seriesIndex:l,dataPointIndex:c,w:k})):k.globals.yLabelFormatters[0](X),parseFloat(V.style.fontSize))}var K={x:i,y:o,i:l,j:c,realIndex:u,columnGroupIndex:d,renderedPath:C,bcx:n,bcy:s,barHeight:f,barWidth:p,textRects:U,strokeWidth:S,dataLabelsX:P,dataLabelsY:I,dataLabelsConfig:V,barDataLabelsConfig:D,barTotalDataLabelsConfig:z,offX:Y,offY:B};return L=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(K):this.calculateColumnsDataLabelsPosition(K),C.attr({cy:L.bcy,cx:L.bcx,j:c,val:k.globals.series[l][c],barHeight:f,barWidth:p}),E=this.drawCalculatedDataLabels({x:L.dataLabelsX,y:L.dataLabelsY,val:this.barCtx.isRangeBar?[r,a]:k.config.chart.stackType==="100%"?h[u][c]:k.globals.series[u][c],i:u,j:c,barWidth:p,barHeight:f,textRects:U,dataLabelsConfig:V}),k.config.chart.stacked&&z.enabled&&(T=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:V,barTotalDataLabelsConfig:z})),{dataLabels:E,totalDataLabels:T}}},{key:"getStackedTotalDataLabel",value:function(e){var n=e.realIndex,s=e.j,i=this.w,o=this.barCtx.stackedSeriesTotals[s];return this.totalFormatter&&(o=this.totalFormatter(o,Je(Je({},i),{},{seriesIndex:n,dataPointIndex:s,w:i}))),o}},{key:"calculateColumnsDataLabelsPosition",value:function(e){var n=this.w,s=e.i,i=e.j,o=e.realIndex;e.columnGroupIndex;var r,a,l=e.y,c=e.bcx,u=e.barWidth,d=e.barHeight,h=e.textRects,f=e.dataLabelsX,p=e.dataLabelsY,m=e.dataLabelsConfig,b=e.barDataLabelsConfig,y=e.barTotalDataLabelsConfig,C=e.strokeWidth,k=e.offX,x=e.offY,S=c;d=Math.abs(d);var E=n.config.plotOptions.bar.dataLabels.orientation==="vertical",T=this.barCtx.barHelpers.getZeroValueEncounters({i:s,j:i}).zeroEncounters;c-=C/2;var P=n.globals.gridWidth/n.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?f+=u/2:(f=n.globals.isXNumeric?c-u/2+k:c-P+u/2+k,T>0&&n.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=u*T)),E&&(f=f+h.height/2-C/2-2);var I=n.globals.series[s][i]<0,L=l;switch(this.barCtx.isReversed&&(L=l+(I?d:-d)),b.position){case"center":p=E?I?L-d/2+x:L+d/2-x:I?L-d/2+h.height/2+x:L+d/2+h.height/2-x;break;case"bottom":p=E?I?L-d+x:L+d-x:I?L-d+h.height+C+x:L+d-h.height/2+C-x;break;case"top":p=E?I?L+x:L-x:I?L-h.height/2-x:L+h.height+x}if(this.barCtx.lastActiveBarSerieIndex===o&&y.enabled){var V=new Ve(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:i}),m.fontSize);r=I?L-V.height/2-x-y.offsetY+18:L+V.height+x+y.offsetY-18;var D=P;a=S+(n.globals.isXNumeric?-u*n.globals.barGroups.length/2:n.globals.barGroups.length*u/2-(n.globals.barGroups.length-1)*u-D)+y.offsetX}return n.config.chart.stacked||(p<0?p=0+C:p+h.height/3>n.globals.gridHeight&&(p=n.globals.gridHeight-C)),{bcx:c,bcy:l,dataLabelsX:f,dataLabelsY:p,totalDataLabelsX:a,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var n=this.w,s=e.x,i=e.i,o=e.j,r=e.realIndex,a=e.bcy,l=e.barHeight,c=e.barWidth,u=e.textRects,d=e.dataLabelsX,h=e.strokeWidth,f=e.dataLabelsConfig,p=e.barDataLabelsConfig,m=e.barTotalDataLabelsConfig,b=e.offX,y=e.offY,C=n.globals.gridHeight/n.globals.dataPoints;c=Math.abs(c);var k,x,S=a-(this.barCtx.isRangeBar?0:C)+l/2+u.height/2+y-3,E="start",T=n.globals.series[i][o]<0,P=s;switch(this.barCtx.isReversed&&(P=s+(T?-c:c),E=T?"start":"end"),p.position){case"center":d=T?P+c/2-b:Math.max(u.width/2,P-c/2)+b;break;case"bottom":d=T?P+c-h-b:P-c+h+b;break;case"top":d=T?P-h-b:P-h+b}if(this.barCtx.lastActiveBarSerieIndex===r&&m.enabled){var I=new Ve(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:o}),f.fontSize);T?(k=P-h-b-m.offsetX,E="end"):k=P+b+m.offsetX+(this.barCtx.isReversed?-(c+h):h),x=S-u.height/2+I.height/2+m.offsetY+h}return n.config.chart.stacked||(f.textAnchor==="start"?d-u.width<0?d=T?u.width+h:h:d+u.width>n.globals.gridWidth&&(d=T?n.globals.gridWidth-h:n.globals.gridWidth-u.width-h):f.textAnchor==="middle"?d-u.width/2<0?d=u.width/2+h:d+u.width/2>n.globals.gridWidth&&(d=n.globals.gridWidth-u.width/2-h):f.textAnchor==="end"&&(d<1?d=u.width+h:d+1>n.globals.gridWidth&&(d=n.globals.gridWidth-u.width-h))),{bcx:s,bcy:a,dataLabelsX:d,dataLabelsY:S,totalDataLabelsX:k,totalDataLabelsY:x,totalDataLabelsAnchor:E}}},{key:"drawCalculatedDataLabels",value:function(e){var n=e.x,s=e.y,i=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(s,")"));var f=new $f(this.barCtx.ctx),p=new Ve(this.barCtx.ctx),m=u.formatter,b=null,y=d.globals.collapsedSeriesIndices.indexOf(o)>-1;if(u.enabled&&!y){b=p.group({class:"apexcharts-data-labels",transform:h});var C="";i!==void 0&&(C=m(i,Je(Je({},d),{},{seriesIndex:o,dataPointIndex:r,w:d}))),!i&&d.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(C="");var k=d.globals.series[o][r]<0,x=d.config.plotOptions.bar.dataLabels.position;d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(x==="top"&&(u.textAnchor=k?"end":"start"),x==="center"&&(u.textAnchor="middle"),x==="bottom"&&(u.textAnchor=k?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&c<p.getTextRects(C,parseFloat(u.style.fontSize)).width&&(C=""),d.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?a.width/1.6>Math.abs(c)&&(C=""):a.height/1.6>Math.abs(l)&&(C=""));var S=Je({},u);this.barCtx.isHorizontal&&i<0&&(u.textAnchor==="start"?S.textAnchor="end":u.textAnchor==="end"&&(S.textAnchor="start")),f.plotDataLabelsText({x:n,y:s,text:C,i:o,j:r,parent:b,dataLabelsConfig:S,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return b}},{key:"drawTotalDataLabels",value:function(e){var n=e.x,s=e.y,i=e.val,o=e.realIndex,r=e.textAnchor,a=e.barTotalDataLabelsConfig;this.w;var l,c=new Ve(this.barCtx.ctx);return a.enabled&&n!==void 0&&s!==void 0&&this.barCtx.lastActiveBarSerieIndex===o&&(l=c.drawText({x:n,y:s,foreColor:a.style.color,text:i,textAnchor:r,fontFamily:a.style.fontFamily,fontSize:a.style.fontSize,fontWeight:a.style.fontWeight})),l}}]),t}(),q1t=function(){function t(e){at(this,t),this.w=e.w,this.barCtx=e}return lt(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 s=0;s<e.length;s++)if(e[s].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[s].length),n.globals.isXNumeric)for(var i=0;i<e[s].length;i++)n.globals.seriesX[s][i]>n.globals.minX&&n.globals.seriesX[s][i]<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(){var e,n,s,i,o,r,a,l,c=this.w,u=c.globals.dataPoints;this.barCtx.isRangeBar&&(u=c.globals.labels.length);var d=this.barCtx.seriesLen;if(c.config.plotOptions.bar.rangeBarGroupRows&&(d=1),this.barCtx.isHorizontal)o=(s=c.globals.gridHeight/u)/d,c.globals.isXNumeric&&(o=(s=c.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf("%")===-1&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),l=this.barCtx.baseLineInvertedY+c.globals.padHorizontal+(this.barCtx.isReversed?c.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(l=c.globals.gridWidth/2),n=(s-o*this.barCtx.seriesLen)/2;else{if(i=c.globals.gridWidth/this.barCtx.visibleItems,c.config.xaxis.convertedCatToNumeric&&(i=c.globals.gridWidth/c.globals.dataPoints),r=i/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,c.globals.isXNumeric){var h=this.barCtx.xRatio;c.globals.minXDiff&&c.globals.minXDiff!==.5&&c.globals.minXDiff/h>0&&(i=c.globals.minXDiff/h),(r=i/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),a=c.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?c.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e=c.globals.padHorizontal+ue.noExponents(i-r*this.barCtx.seriesLen)/2}return c.globals.barHeight=o,c.globals.barWidth=r,{x:e,y:n,yDivision:s,xDivision:i,barHeight:o,barWidth:r,zeroH:a,zeroW:l}}},{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,s,i){var o,r,a,l,c=this.w,u=this.barCtx.ctx.fill,d=null,h=this.barCtx.barOptions.distributed?s:n,f=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(p){e[n][s]>=p.from&&e[n][s]<=p.to&&(d=p.color,f=!0)}),{color:u.fillPath({seriesNumber:this.barCtx.barOptions.distributed?h:i,dataPointIndex:s,color:d,value:e[n][s],fillConfig:(o=c.config.series[n].data[s])===null||o===void 0?void 0:o.fill,fillType:(r=c.config.series[n].data[s])!==null&&r!==void 0&&(a=r.fill)!==null&&a!==void 0&&a.type?(l=c.config.series[n].data[s])===null||l===void 0?void 0:l.fill.type:Array.isArray(c.config.fill.type)?c.config.fill.type[i]:c.config.fill.type}),useRangeColor:f}}},{key:"getStrokeWidth",value:function(e,n,s){var i=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||(i=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth)),i}},{key:"createBorderRadiusArr",value:function(e){var n,s=this.w,i=!this.w.config.chart.stacked||s.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(i?"top":"none")});if(i)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],b=c[c.length-1],y=Yp(c);try{for(y.s();!(p=y.n()).done;){var C=p.value;a[C][l]=C===m?"bottom":C===b?"top":"none"}}catch(U){y.e(U)}finally{y.f()}}else if(u.length>0&&c.length===0)if(u.length===1)a[u[0]][l]="both";else{var k,x=Math.max.apply(Math,u),S=Math.min.apply(Math,u),E=Yp(u);try{for(E.s();!(k=E.n()).done;){var T=k.value;a[T][l]=T===x?"bottom":T===S?"top":"none"}}catch(U){E.e(U)}finally{E.f()}}else if(c.length>0&&u.length>0){var P,I=c[c.length-1],L=Yp(c);try{for(L.s();!(P=L.n()).done;){var V=P.value;a[V][l]=V===I?"top":"none"}}catch(U){L.e(U)}finally{L.f()}var D,z=Math.max.apply(Math,u),Y=Yp(u);try{for(Y.s();!(D=Y.n()).done;){var B=D.value;a[B][l]=B===z?"bottom":"none"}}catch(U){Y.e(U)}finally{Y.f()}}else d===1&&(a[c[0]||u[0]][l]="both")}return a}},{key:"barBackground",value:function(e){var n=e.j,s=e.i,i=e.x1,o=e.x2,r=e.y1,a=e.y2,l=e.elSeries,c=this.w,u=new Ve(this.barCtx.ctx),d=new Ko(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&d===s){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(i!==void 0?i: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,s=e.barWidth,i=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 Ve(this.barCtx.ctx);(a=Array.isArray(a)?a[d]:a)||(a=0);var b=s,y=i;(n=p.config.series[d].data[f])!==null&&n!==void 0&&n.columnWidthOffset&&(y=i-p.config.series[d].data[f].columnWidthOffset/2,b=s+p.config.series[d].data[f].columnWidthOffset);var C=a/2,k=y+C,x=y+b-C,S=(c[h][f]>=0?1:-1)*(l?-1:1);o+=.001-C*S,r+=.001+C*S;var E=m.move(k,o),T=m.move(k,o),P=m.line(x,o);if(p.globals.previousPaths.length>0&&(T=this.barCtx.getPreviousPath(d,f,!1)),E=E+m.line(k,r)+m.line(x,r)+P+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),T=T+m.line(k,o)+P+P+P+P+P+m.line(k,o)+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),this.arrBorderRadius[d][f]!=="none"&&(E=m.roundPathCorners(E,p.config.plotOptions.bar.borderRadius)),p.config.chart.stacked){var I=this.barCtx;(I=this.barCtx[u]).yArrj.push(r-C*S),I.yArrjF.push(Math.abs(o-r+a*S)),I.yArrjVal.push(this.barCtx.series[h][f])}return{pathTo:E,pathFrom:T}}},{key:"getBarpaths",value:function(e){var n,s=e.barYPosition,i=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 Ve(this.barCtx.ctx);(a=Array.isArray(a)?a[d]:a)||(a=0);var b=s,y=i;(n=p.config.series[d].data[f])!==null&&n!==void 0&&n.barHeightOffset&&(b=s-p.config.series[d].data[f].barHeightOffset/2,y=i+p.config.series[d].data[f].barHeightOffset);var C=a/2,k=b+C,x=b+y-C,S=(c[h][f]>=0?1:-1)*(l?-1:1);o+=.001+C*S,r+=.001-C*S;var E=m.move(o,k),T=m.move(o,k);p.globals.previousPaths.length>0&&(T=this.barCtx.getPreviousPath(d,f,!1));var P=m.line(o,x);if(E=E+m.line(r,k)+m.line(r,x)+P+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),T=T+m.line(o,k)+P+P+P+P+P+m.line(o,k)+(p.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][f]==="both"?" Z":" z"),this.arrBorderRadius[d][f]!=="none"&&(E=m.roundPathCorners(E,p.config.plotOptions.bar.borderRadius)),p.config.chart.stacked){var I=this.barCtx;(I=this.barCtx[u]).xArrj.push(r+C*S),I.xArrjF.push(Math.abs(o-r-a*S)),I.xArrjVal.push(this.barCtx.series[h][f])}return{pathTo:E,pathFrom:T}}},{key:"checkZeroSeries",value:function(e){for(var n=e.series,s=this.w,i=0;i<n.length;i++){for(var o=0,r=0;r<n[s.globals.maxValsInArrayIndex].length;r++)o+=n[i][r];o===0&&this.barCtx.zeroSerieses.push(i)}}},{key:"getXForValue",value:function(e,n){var s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2]?n:null;return e!=null&&(s=n+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),s}},{key:"getYForValue",value:function(e,n,s){var i=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3]?n:null;return e!=null&&(i=n-e/this.barCtx.yRatio[s]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[s]:0)),i}},{key:"getGoalValues",value:function(e,n,s,i,o,r){var a=this,l=this.w,c=[],u=function(f,p){var m;c.push((ly(m={},e,e==="x"?a.getXForValue(f,n,!1):a.getYForValue(f,s,r,!1)),ly(m,"attrs",p),m))};if(l.globals.seriesGoals[i]&&l.globals.seriesGoals[i][o]&&Array.isArray(l.globals.seriesGoals[i][o])&&l.globals.seriesGoals[i][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[i],strokeWidth:e==="x"?l.globals.markers.size[i]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[i])?d[i][0]:d[i]};u(l.globals.seriesRangeStart[i][o],h),u(l.globals.seriesRangeEnd[i][o],Je(Je({},h),{},{strokeColor:Array.isArray(d[i])?d[i][1]:d[i]}))}return c}},{key:"drawGoalLine",value:function(e){var n=e.barXPosition,s=e.barYPosition,i=e.goalX,o=e.goalY,r=e.barWidth,a=e.barHeight,l=new Ve(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(i)&&i.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=s+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,s=e.currPaths,i=e.color,o=this.w,r=n.x,a=n.x1,l=n.barYPosition,c=s.x,u=s.x1,d=s.barYPosition,h=l+s.barHeight,f=new Ve(this.barCtx.ctx),p=new ue,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,ue.rgb2hex(i)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(e){var n,s=e.i,i=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][i];c&&r++,l<s&&c===0&&a++}),{nonZeroColumns:r,zeroEncounters:a}}},{key:"getGroupIndex",value:function(e){var n=this.w,s=n.globals.seriesGroups.findIndex(function(r){return r.indexOf(n.globals.seriesNames[e])>-1}),i=this.barCtx.columnGroupIndices,o=i.indexOf(s);return o<0&&(i.push(s),o=i.length-1),{groupIndex:s,columnGroupIndex:o}}}]),t}(),Af=function(){function t(e,n){at(this,t),this.ctx=e,this.w=e.w;var s=this.w;this.barOptions=s.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=s.config.stroke.width,this.isNullValue=!1,this.isRangeBar=s.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!s.globals.isBarHorizontal&&s.globals.seriesRange.length&&s.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 i=new Ko(this.ctx);this.lastActiveBarSerieIndex=i.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var o=i.getBarSeriesIndices(),r=new rs(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 q1t(this)}return lt(t,[{key:"draw",value:function(e,n){var s=this.w,i=new Ve(this.ctx),o=new rs(this.ctx,s);e=o.getLogSeries(e),this.series=e,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var r=i.group({class:"apexcharts-bar-series apexcharts-plot-series"});s.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=[],b=[],y=s.globals.comboCharts?n[a]:a,C=this.barHelpers.getGroupIndex(y).columnGroupIndex,k=i.group({class:"apexcharts-series",rel:a+1,seriesName:ue.escapeString(s.globals.seriesNames[y]),"data:realIndex":y});this.ctx.series.addCollapsedClassToSeries(k,y),e[a].length>0&&(this.visibleI=this.visibleI+1);var x=0,S=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[y],this.translationsIndex=y);var E=this.translationsIndex;this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;var T=this.barHelpers.initialPositions();p=T.y,x=T.barHeight,u=T.yDivision,h=T.zeroW,f=T.x,S=T.barWidth,c=T.xDivision,d=T.zeroH,this.isHorizontal||b.push(f+S/2);var P=i.group({class:"apexcharts-datalabels","data:realIndex":y});s.globals.delayedElements.push({el:P.node}),P.node.classList.add("apexcharts-element-hidden");var I=i.group({class:"apexcharts-bar-goals-markers"}),L=i.group({class:"apexcharts-bar-shadows"});s.globals.delayedElements.push({el:L.node}),L.node.classList.add("apexcharts-element-hidden");for(var V=0;V<e[a].length;V++){var D=this.barHelpers.getStrokeWidth(a,V,y),z=null,Y={indexes:{i:a,j:V,realIndex:y,translationsIndex:E,bc:l},x:f,y:p,strokeWidth:D,elSeries:k};this.isHorizontal?(z=this.drawBarPaths(Je(Je({},Y),{},{barHeight:x,zeroW:h,yDivision:u})),S=this.series[a][V]/this.invertedYRatio):(z=this.drawColumnPaths(Je(Je({},Y),{},{xDivision:c,barWidth:S,zeroH:d})),x=this.series[a][V]/this.yRatio[E]);var B=this.barHelpers.getPathFillColor(e,a,V,y);if(this.isFunnel&&this.barOptions.isFunnel3d&&this.pathArr.length&&V>0){var U,X=this.barHelpers.drawBarShadow({color:typeof B.color=="string"&&((U=B.color)===null||U===void 0?void 0:U.indexOf("url"))===-1?B.color:ue.hexToRgba(s.globals.colors[a]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:z});L.add(X),s.config.chart.dropShadow.enabled&&new Ws(this.ctx).dropShadow(X,s.config.chart.dropShadow,y)}this.pathArr.push(z);var K=this.barHelpers.drawGoalLine({barXPosition:z.barXPosition,barYPosition:z.barYPosition,goalX:z.goalX,goalY:z.goalY,barHeight:x,barWidth:S});K&&I.add(K),p=z.y,f=z.x,V>0&&b.push(f+S/2),m.push(p),this.renderSeries(Je(Je({realIndex:y,pathFill:B.color},B.useRangeColor?{lineFill:B.color}:{}),{},{j:V,i:a,columnGroupIndex:C,pathFrom:z.pathFrom,pathTo:z.pathTo,strokeWidth:D,elSeries:k,x:f,y:p,series:e,barHeight:Math.abs(z.barHeight?z.barHeight:x),barWidth:Math.abs(z.barWidth?z.barWidth:S),elDataLabelsWrap:P,elGoalsMarkers:I,elBarShadows:L,visibleSeries:this.visibleI,type:"bar"}))}s.globals.seriesXvalues[y]=b,s.globals.seriesYvalues[y]=m,r.add(k)}return r}},{key:"renderSeries",value:function(e){var n=e.realIndex,s=e.pathFill,i=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,b=e.series,y=e.barHeight,C=e.barWidth,k=e.barXPosition,x=e.barYPosition,S=e.elDataLabelsWrap,E=e.elGoalsMarkers,T=e.elBarShadows,P=e.visibleSeries,I=e.type,L=e.classes,V=this.w,D=new Ve(this.ctx);if(!i){var z=typeof V.globals.stroke.colors[n]=="function"?function(K){var N,F=V.config.stroke.colors;return Array.isArray(F)&&F.length>0&&((N=F[K])||(N=""),typeof N=="function")?N({value:V.globals.series[K][o],dataPointIndex:o,w:V}):N}(n):V.globals.stroke.colors[n];i=this.barOptions.distributed?V.globals.stroke.colors[o]:z}V.config.series[r].data[o]&&V.config.series[r].data[o].strokeColor&&(i=V.config.series[r].data[o].strokeColor),this.isNullValue&&(s="none");var Y=o/V.config.chart.animations.animateGradually.delay*(V.config.chart.animations.speed/V.globals.dataPoints)/2.4,B=D.renderPaths({i:r,j:o,realIndex:n,pathFrom:l,pathTo:c,stroke:i,strokeWidth:u,strokeLineCap:V.config.stroke.lineCap,fill:s,animationDelay:Y,initialSpeed:V.config.chart.animations.speed,dataChangeSpeed:V.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(I,"-area ").concat(L),chartType:I});B.attr("clip-path","url(#gridRectBarMask".concat(V.globals.cuid,")"));var U=V.config.forecastDataPoints;U.count>0&&o>=V.globals.dataPoints-U.count&&(B.node.setAttribute("stroke-dasharray",U.dashArray),B.node.setAttribute("stroke-width",U.strokeWidth),B.node.setAttribute("fill-opacity",U.fillOpacity)),p!==void 0&&m!==void 0&&(B.attr("data-range-y1",p),B.attr("data-range-y2",m)),new Ws(this.ctx).setSelectionFilter(B,n,o),d.add(B);var X=new G1t(this).handleBarDataLabels({x:h,y:f,y1:p,y2:m,i:r,j:o,series:b,realIndex:n,columnGroupIndex:a,barHeight:y,barWidth:C,barXPosition:k,barYPosition:x,renderedPath:B,visibleSeries:P});return X.dataLabels!==null&&S.add(X.dataLabels),X.totalDataLabels&&S.add(X.totalDataLabels),d.add(S),E&&d.add(E),T&&d.add(T),d}},{key:"drawBarPaths",value:function(e){var n,s=e.indexes,i=e.barHeight,o=e.strokeWidth,r=e.zeroW,a=e.x,l=e.y,c=e.yDivision,u=e.elSeries,d=this.w,h=s.i,f=s.j;if(d.globals.isXNumeric)n=(l=(d.globals.seriesX[h][f]-d.globals.minX)/this.invertedXRatio-i)+i*this.visibleI;else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var p=0,m=0;d.globals.seriesPercent.forEach(function(y,C){y[f]&&p++,C<h&&y[f]===0&&m++}),p>0&&(i=this.seriesLen*i/p),n=l+i*this.visibleI,n-=i*m}else n=l+i*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 b=this.barHelpers.getBarpaths({barYPosition:n,barHeight:i,x1:r,x2:a,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:s.realIndex,i:h,j:f,w:d});return d.globals.isXNumeric||(l+=c),this.barHelpers.barBackground({j:f,i:h,y1:n-i*this.visibleI,y2:i*this.seriesLen,elSeries:u}),{pathTo:b.pathTo,pathFrom:b.pathFrom,x1:r,x:a,y:l,goalX:this.barHelpers.getGoalValues("x",r,null,h,f),barYPosition:n,barHeight:i}}},{key:"drawColumnPaths",value:function(e){var n,s=e.indexes,i=e.x,o=e.y,r=e.xDivision,a=e.barWidth,l=e.zeroH,c=e.strokeWidth,u=e.elSeries,d=this.w,h=s.realIndex,f=s.translationsIndex,p=s.i,m=s.j,b=s.bc;if(d.globals.isXNumeric){var y=this.getBarXForNumericXAxis({x:i,j:m,realIndex:h,barWidth:a});i=y.x,n=y.barXPosition}else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var C=this.barHelpers.getZeroValueEncounters({i:p,j:m}),k=C.nonZeroColumns,x=C.zeroEncounters;k>0&&(a=this.seriesLen*a/k),n=i+a*this.visibleI,n-=a*x}else n=i+a*this.visibleI;o=this.barHelpers.getYForValue(this.series[p][m],l,f);var S=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||(i+=r),this.barHelpers.barBackground({bc:b,j:m,i:p,x1:n-c/2-a*this.visibleI,x2:a*this.seriesLen+c/2,elSeries:u}),{pathTo:S.pathTo,pathFrom:S.pathFrom,x:i,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,s=e.barWidth,i=e.realIndex,o=e.j,r=this.w,a=i;return r.globals.seriesX[i].length||(a=r.globals.maxValsInArrayIndex),ue.isNumber(r.globals.seriesX[a][o])&&(n=(r.globals.seriesX[a][o]-r.globals.minX)/this.xRatio-s*this.seriesLen/2),{barXPosition:n+s*this.visibleI,x:n}}},{key:"getPreviousPath",value:function(e,n){for(var s,i=this.w,o=0;o<i.globals.previousPaths.length;o++){var r=i.globals.previousPaths[o];r.paths&&r.paths.length>0&&parseInt(r.realIndex,10)===parseInt(e,10)&&i.globals.previousPaths[o].paths[n]!==void 0&&(s=i.globals.previousPaths[o].paths[n].d)}return s}}]),t}(),qE=function(t){L1(n,Af);var e=I1(n);function n(){return at(this,n),e.apply(this,arguments)}return lt(n,[{key:"draw",value:function(s,i){var o=this,r=this.w;this.graphics=new Ve(this.ctx),this.bar=new Af(this.ctx,this.xyRatios);var a=new rs(this.ctx,r);s=a.getLogSeries(s),this.yRatio=a.getLogYRatios(this.yRatio),this.barHelpers.initVariables(s),r.config.chart.stackType==="100%"&&(s=r.globals.comboCharts?i.map(function(p){return r.globals.seriesPercent[p]}):r.globals.seriesPercent.slice()),this.series=s,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 b=void 0,y=void 0,C=void 0,k=void 0,x=r.globals.comboCharts?i[p]:p,S=o.barHelpers.getGroupIndex(x),E=S.groupIndex,T=S.columnGroupIndex;o.groupCtx=o[r.globals.seriesGroups[E]];var P=[],I=[],L=0;o.yRatio.length>1&&(o.yaxisIndex=r.globals.seriesYAxisReverseMap[x][0],L=x),o.isReversed=r.config.yaxis[o.yaxisIndex]&&r.config.yaxis[o.yaxisIndex].reversed;var V=o.graphics.group({class:"apexcharts-series",seriesName:ue.escapeString(r.globals.seriesNames[x]),rel:p+1,"data:realIndex":x});o.ctx.series.addCollapsedClassToSeries(V,x);var D=o.graphics.group({class:"apexcharts-datalabels","data:realIndex":x}),z=o.graphics.group({class:"apexcharts-bar-goals-markers"}),Y=0,B=0,U=o.initialPositions(c,u,b,y,C,k,L);u=U.y,Y=U.barHeight,y=U.yDivision,k=U.zeroW,c=U.x,B=U.barWidth,b=U.xDivision,C=U.zeroH,r.globals.barHeight=Y,r.globals.barWidth=B,o.barHelpers.initializeStackedXYVars(o),o.groupCtx.prevY.length===1&&o.groupCtx.prevY[0].every(function(Se){return isNaN(Se)})&&(o.groupCtx.prevY[0]=o.groupCtx.prevY[0].map(function(){return C}),o.groupCtx.prevYF[0]=o.groupCtx.prevYF[0].map(function(){return 0}));for(var X=0;X<r.globals.dataPoints;X++){var K=o.barHelpers.getStrokeWidth(p,X,x),N={indexes:{i:p,j:X,realIndex:x,translationsIndex:L,bc:m},strokeWidth:K,x:c,y:u,elSeries:V,columnGroupIndex:T,seriesGroup:r.globals.seriesGroups[E]},F=null;o.isHorizontal?(F=o.drawStackedBarPaths(Je(Je({},N),{},{zeroW:k,barHeight:Y,yDivision:y})),B=o.series[p][X]/o.invertedYRatio):(F=o.drawStackedColumnPaths(Je(Je({},N),{},{xDivision:b,barWidth:B,zeroH:C})),Y=o.series[p][X]/o.yRatio[L]);var Q=o.barHelpers.drawGoalLine({barXPosition:F.barXPosition,barYPosition:F.barYPosition,goalX:F.goalX,goalY:F.goalY,barHeight:Y,barWidth:B});Q&&z.add(Q),u=F.y,c=F.x,P.push(c),I.push(u);var ie=o.barHelpers.getPathFillColor(s,p,X,x),Z="",me=r.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";(o.barHelpers.arrBorderRadius[x][X]==="bottom"&&r.globals.series[x][X]>0||o.barHelpers.arrBorderRadius[x][X]==="top"&&r.globals.series[x][X]<0)&&(Z=me),V=o.renderSeries(Je(Je({realIndex:x,pathFill:ie.color},ie.useRangeColor?{lineFill:ie.color}:{}),{},{j:X,i:p,columnGroupIndex:T,pathFrom:F.pathFrom,pathTo:F.pathTo,strokeWidth:K,elSeries:V,x:c,y:u,series:s,barHeight:Y,barWidth:B,elDataLabelsWrap:D,elGoalsMarkers:z,type:"bar",visibleSeries:T,classes:Z}))}r.globals.seriesXvalues[x]=P,r.globals.seriesYvalues[x]=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(V)},h=0,f=0;h<s.length;h++,f++)d(h,f);return l}},{key:"initialPositions",value:function(s,i,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),i=(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],s=h.globals.padHorizontal+(o-d)/2}var m=h.globals.barGroups.length||1;return{x:s,y:i,yDivision:r,xDivision:o,barHeight:u/m,barWidth:d/m,zeroH:a,zeroW:l}}},{key:"drawStackedBarPaths",value:function(s){for(var i,o=s.indexes,r=s.barHeight,a=s.strokeWidth,l=s.zeroW,c=s.x,u=s.y,d=s.columnGroupIndex,h=s.seriesGroup,f=s.yDivision,p=s.elSeries,m=this.w,b=u+d*r,y=o.i,C=o.j,k=o.realIndex,x=o.translationsIndex,S=0,E=0;E<this.groupCtx.prevXF.length;E++)S+=this.groupCtx.prevXF[E][C];var T;if((T=h.indexOf(m.config.series[k].name))>0){var P=l;this.groupCtx.prevXVal[T-1][C]<0?P=this.series[y][C]>=0?this.groupCtx.prevX[T-1][C]+S-2*(this.isReversed?S:0):this.groupCtx.prevX[T-1][C]:this.groupCtx.prevXVal[T-1][C]>=0&&(P=this.series[y][C]>=0?this.groupCtx.prevX[T-1][C]:this.groupCtx.prevX[T-1][C]-S+2*(this.isReversed?S:0)),i=P}else i=l;c=this.series[y][C]===null?i:i+this.series[y][C]/this.invertedYRatio-2*(this.isReversed?this.series[y][C]/this.invertedYRatio:0);var I=this.barHelpers.getBarpaths({barYPosition:b,barHeight:r,x1:i,x2:c,strokeWidth:a,isReversed:this.isReversed,series:this.series,realIndex:o.realIndex,seriesGroup:h,i:y,j:C,w:m});return this.barHelpers.barBackground({j:C,i:y,y1:b,y2:r,elSeries:p}),u+=f,{pathTo:I.pathTo,pathFrom:I.pathFrom,goalX:this.barHelpers.getGoalValues("x",l,null,y,C,x),barXPosition:i,barYPosition:b,x:c,y:u}}},{key:"drawStackedColumnPaths",value:function(s){var i=s.indexes,o=s.x,r=s.y,a=s.xDivision,l=s.barWidth,c=s.zeroH,u=s.columnGroupIndex,d=s.seriesGroup,h=s.elSeries,f=this.w,p=i.i,m=i.j,b=i.bc,y=i.realIndex,C=i.translationsIndex;if(f.globals.isXNumeric){var k=f.globals.seriesX[y][m];k||(k=0),o=(k-f.globals.minX)/this.xRatio-l/2*f.globals.barGroups.length}for(var x,S=o+u*l,E=0,T=0;T<this.groupCtx.prevYF.length;T++)E+=isNaN(this.groupCtx.prevYF[T][m])?0:this.groupCtx.prevYF[T][m];var P=p;if(d&&(P=d.indexOf(f.globals.seriesNames[y])),P>0&&!f.globals.isXNumeric||P>0&&f.globals.isXNumeric&&f.globals.seriesX[y-1][m]===f.globals.seriesX[y][m]){var I,L,V,D=Math.min(this.yRatio.length+1,y+1);if(this.groupCtx.prevY[P-1]!==void 0&&this.groupCtx.prevY[P-1].length)for(var z=1;z<D;z++){var Y;if(!isNaN((Y=this.groupCtx.prevY[P-z])===null||Y===void 0?void 0:Y[m])){V=this.groupCtx.prevY[P-z][m];break}}for(var B=1;B<D;B++){var U,X;if(((U=this.groupCtx.prevYVal[P-B])===null||U===void 0?void 0:U[m])<0){L=this.series[p][m]>=0?V-E+2*(this.isReversed?E:0):V;break}if(((X=this.groupCtx.prevYVal[P-B])===null||X===void 0?void 0:X[m])>=0){L=this.series[p][m]>=0?V:V+E-2*(this.isReversed?E:0);break}}L===void 0&&(L=f.globals.gridHeight),x=(I=this.groupCtx.prevYF[0])!==null&&I!==void 0&&I.every(function(N){return N===0})&&this.groupCtx.prevYF.slice(1,P).every(function(N){return N.every(function(F){return isNaN(F)})})?c:L}else x=c;r=this.series[p][m]?x-this.series[p][m]/this.yRatio[C]+2*(this.isReversed?this.series[p][m]/this.yRatio[C]:0):x;var K=this.barHelpers.getColumnPaths({barXPosition:S,barWidth:l,y1:x,y2:r,yRatio:this.yRatio[C],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:d,realIndex:i.realIndex,i:p,j:m,w:f});return this.barHelpers.barBackground({bc:b,j:m,i:p,x1:S,x2:l,elSeries:h}),{pathTo:K.pathTo,pathFrom:K.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,c,p,m),barXPosition:S,x:f.globals.isXNumeric?o:o+a,y:r}}}]),n}(),a3=function(t){L1(n,Af);var e=I1(n);function n(){return at(this,n),e.apply(this,arguments)}return lt(n,[{key:"draw",value:function(s,i,o){var r=this,a=this.w,l=new Ve(this.ctx),c=a.globals.comboCharts?i:a.config.chart.type,u=new Mr(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 rs(this.ctx,a);s=d.getLogSeries(s),this.series=s,this.yRatio=d.getLogYRatios(this.yRatio),this.barHelpers.initVariables(s);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 b,y,C,k,x=void 0,S=void 0,E=[],T=[],P=a.globals.comboCharts?o[m]:m,I=r.barHelpers.getGroupIndex(P).columnGroupIndex,L=l.group({class:"apexcharts-series",seriesName:ue.escapeString(a.globals.seriesNames[P]),rel:m+1,"data:realIndex":P});r.ctx.series.addCollapsedClassToSeries(L,P),s[m].length>0&&(r.visibleI=r.visibleI+1);var V,D,z=0;r.yRatio.length>1&&(r.yaxisIndex=a.globals.seriesYAxisReverseMap[P][0],z=P);var Y=r.barHelpers.initialPositions();S=Y.y,V=Y.barHeight,y=Y.yDivision,k=Y.zeroW,x=Y.x,D=Y.barWidth,b=Y.xDivision,C=Y.zeroH,T.push(x+D/2);for(var B=l.group({class:"apexcharts-datalabels","data:realIndex":P}),U=l.group({class:"apexcharts-bar-goals-markers"}),X=function(N){var F=r.barHelpers.getStrokeWidth(m,N,P),Q=null,ie={indexes:{i:m,j:N,realIndex:P,translationsIndex:z},x,y:S,strokeWidth:F,elSeries:L};Q=r.isHorizontal?r.drawHorizontalBoxPaths(Je(Je({},ie),{},{yDivision:y,barHeight:V,zeroW:k})):r.drawVerticalBoxPaths(Je(Je({},ie),{},{xDivision:b,barWidth:D,zeroH:C})),S=Q.y,x=Q.x;var Z=r.barHelpers.drawGoalLine({barXPosition:Q.barXPosition,barYPosition:Q.barYPosition,goalX:Q.goalX,goalY:Q.goalY,barHeight:V,barWidth:D});Z&&U.add(Z),N>0&&T.push(x+D/2),E.push(S),Q.pathTo.forEach(function(me,Se){var we=!r.isBoxPlot&&r.candlestickOptions.wick.useFillColor?Q.color[Se]:a.globals.stroke.colors[m],oe=u.fillPath({seriesNumber:P,dataPointIndex:N,color:Q.color[Se],value:s[m][N]});r.renderSeries({realIndex:P,pathFill:oe,lineFill:we,j:N,i:m,pathFrom:Q.pathFrom,pathTo:me,strokeWidth:F,elSeries:L,x,y:S,series:s,columnGroupIndex:I,barHeight:V,barWidth:D,elDataLabelsWrap:B,elGoalsMarkers:U,visibleSeries:r.visibleI,type:a.config.chart.type})})},K=0;K<a.globals.dataPoints;K++)X(K);a.globals.seriesXvalues[P]=T,a.globals.seriesYvalues[P]=E,h.add(L)},p=0;p<s.length;p++)f(p);return h}},{key:"drawVerticalBoxPaths",value:function(s){var i=s.indexes,o=s.x;s.y;var r=s.xDivision,a=s.barWidth,l=s.zeroH,c=s.strokeWidth,u=this.w,d=new Ve(this.ctx),h=i.i,f=i.j,p=u.config.plotOptions.candlestick.colors,m=this.boxOptions.colors,b=i.realIndex,y=function(B){return Array.isArray(B)?B[b]:B},C=y(p.upward),k=y(p.downward),x=this.yRatio[i.translationsIndex],S=this.getOHLCValue(b,f),E=l,T=l,P=S.o<S.c?[C]:[k];this.isBoxPlot&&(P=[y(m.lower),y(m.upper)]);var I=Math.min(S.o,S.c),L=Math.max(S.o,S.c),V=S.m;u.globals.isXNumeric&&(o=(u.globals.seriesX[b][f]-u.globals.minX)/this.xRatio-a/2);var D=o+a*this.visibleI;this.series[h][f]===void 0||this.series[h][f]===null?(I=l,L=l):(I=l-I/x,L=l-L/x,E=l-S.h/x,T=l-S.l/x,V=l-S.m/x);var z=d.move(D,l),Y=d.move(D+a/2,I);return u.globals.previousPaths.length>0&&(Y=this.getPreviousPath(b,f,!0)),z=this.isBoxPlot?[d.move(D,I)+d.line(D+a/2,I)+d.line(D+a/2,E)+d.line(D+a/4,E)+d.line(D+a-a/4,E)+d.line(D+a/2,E)+d.line(D+a/2,I)+d.line(D+a,I)+d.line(D+a,V)+d.line(D,V)+d.line(D,I+c/2),d.move(D,V)+d.line(D+a,V)+d.line(D+a,L)+d.line(D+a/2,L)+d.line(D+a/2,T)+d.line(D+a-a/4,T)+d.line(D+a/4,T)+d.line(D+a/2,T)+d.line(D+a/2,L)+d.line(D,L)+d.line(D,V)+"z"]:[d.move(D,L)+d.line(D+a/2,L)+d.line(D+a/2,E)+d.line(D+a/2,L)+d.line(D+a,L)+d.line(D+a,I)+d.line(D+a/2,I)+d.line(D+a/2,T)+d.line(D+a/2,I)+d.line(D,I)+d.line(D,L-c/2)],Y+=d.move(D,I),u.globals.isXNumeric||(o+=r),{pathTo:z,pathFrom:Y,x:o,y:L,goalY:this.barHelpers.getGoalValues("y",null,l,h,f,i.translationsIndex),barXPosition:D,color:P}}},{key:"drawHorizontalBoxPaths",value:function(s){var i=s.indexes;s.x;var o=s.y,r=s.yDivision,a=s.barHeight,l=s.zeroW,c=s.strokeWidth,u=this.w,d=new Ve(this.ctx),h=i.i,f=i.j,p=this.boxOptions.colors.lower;this.isBoxPlot&&(p=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var m=this.invertedYRatio,b=i.realIndex,y=this.getOHLCValue(b,f),C=l,k=l,x=Math.min(y.o,y.c),S=Math.max(y.o,y.c),E=y.m;u.globals.isXNumeric&&(o=(u.globals.seriesX[b][f]-u.globals.minX)/this.invertedXRatio-a/2);var T=o+a*this.visibleI;this.series[h][f]===void 0||this.series[h][f]===null?(x=l,S=l):(x=l+x/m,S=l+S/m,C=l+y.h/m,k=l+y.l/m,E=l+y.m/m);var P=d.move(l,T),I=d.move(x,T+a/2);return u.globals.previousPaths.length>0&&(I=this.getPreviousPath(b,f,!0)),P=[d.move(x,T)+d.line(x,T+a/2)+d.line(C,T+a/2)+d.line(C,T+a/2-a/4)+d.line(C,T+a/2+a/4)+d.line(C,T+a/2)+d.line(x,T+a/2)+d.line(x,T+a)+d.line(E,T+a)+d.line(E,T)+d.line(x+c/2,T),d.move(E,T)+d.line(E,T+a)+d.line(S,T+a)+d.line(S,T+a/2)+d.line(k,T+a/2)+d.line(k,T+a-a/4)+d.line(k,T+a/4)+d.line(k,T+a/2)+d.line(S,T+a/2)+d.line(S,T)+d.line(E,T)+"z"],I+=d.move(x,T),u.globals.isXNumeric||(o+=r),{pathTo:P,pathFrom:I,x:S,y:o,goalX:this.barHelpers.getGoalValues("x",l,null,h,f),barYPosition:T,color:p}}},{key:"getOHLCValue",value:function(s,i){var o=this.w,r=new rs(this.ctx,o),a=r.getLogValAtSeriesIndex(o.globals.seriesCandleH[s][i],s),l=r.getLogValAtSeriesIndex(o.globals.seriesCandleO[s][i],s),c=r.getLogValAtSeriesIndex(o.globals.seriesCandleM[s][i],s),u=r.getLogValAtSeriesIndex(o.globals.seriesCandleC[s][i],s),d=r.getLogValAtSeriesIndex(o.globals.seriesCandleL[s][i],s);return{o:this.isBoxPlot?a:l,h:this.isBoxPlot?l:a,m:c,l:this.isBoxPlot?u:d,c:this.isBoxPlot?d:u}}}]),n}(),aU=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"checkColorRange",value:function(){var e=this.w,n=!1,s=e.config.plotOptions[e.config.chart.type];return s.colorScale.ranges.length>0&&s.colorScale.ranges.map(function(i,o){i.from<=0&&(n=!0)}),n}},{key:"getShadeColor",value:function(e,n,s,i){var o=this.w,r=1,a=o.config.plotOptions[e].shadeIntensity,l=this.determineColor(e,n,s);o.globals.hasNegs||i?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 ue;if(o.config.plotOptions[e].enableShades)if(this.w.config.theme.mode==="dark"){var d=u.shadeColor(-1*r,l.color);c=ue.hexToRgba(ue.isColorHex(d)?d:ue.rgb2hex(d),o.config.fill.opacity)}else{var h=u.shadeColor(r,l.color);c=ue.hexToRgba(ue.isColorHex(h)?h:ue.rgb2hex(h),o.config.fill.opacity)}return{color:c,colorProps:l}}},{key:"determineColor",value:function(e,n,s){var i=this.w,o=i.globals.series[n][s],r=i.config.plotOptions[e],a=r.colorScale.inverse?s:n;r.distributed&&i.config.chart.type==="treemap"&&(a=s);var l=i.globals.colors[a],c=null,u=Math.min.apply(Math,Cs(i.globals.series[n])),d=Math.max.apply(Math,Cs(i.globals.series[n]));r.distributed||e!=="heatmap"||(u=i.globals.minY,d=i.globals.maxY),r.colorScale.min!==void 0&&(u=r.colorScale.min<i.globals.minY?r.colorScale.min:i.globals.minY,d=r.colorScale.max>i.globals.maxY?r.colorScale.max:i.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 b=Math.abs(d)+Math.abs(u);f=100*o/(b===0?b-1e-6:b)}}),{color:l,foreColor:c,percent:f}}},{key:"calculateDataLabels",value:function(e){var n=e.text,s=e.x,i=e.y,o=e.i,r=e.j,a=e.colorProps,l=e.fontSize,c=this.w.config.dataLabels,u=new Ve(this.ctx),d=new $f(this.ctx),h=null;if(c.enabled){h=u.group({class:"apexcharts-data-labels"});var f=c.offsetX,p=c.offsetY,m=s+f,b=i+parseFloat(c.style.fontSize)/3+p;d.plotDataLabelsText({x:m,y:b,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 Ve(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}(),X1t=function(){function t(e,n){at(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 aU(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return lt(t,[{key:"draw",value:function(e){var n=this.w,s=new Ve(this.ctx),i=s.group({class:"apexcharts-heatmap"});i.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=s.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:ue.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 Ws(this.ctx).dropShadow(d,h,u)}for(var f=0,p=n.config.plotOptions.heatmap.shadeIntensity,m=0,b=0;b<n.globals.dataPoints;b++)if(n.globals.seriesX.length&&!n.globals.allSeriesHasEqualX&&n.globals.minX+n.globals.minXDiff*b<n.globals.seriesX[u][m])f+=o;else{if(m>=c[u].length)break;var y=this.helpers.getShadeColor(n.config.chart.type,u,m,this.negRange),C=y.color,k=y.colorProps;n.config.fill.type==="image"&&(C=new Mr(this.ctx).fillPath({seriesNumber:u,dataPointIndex:m,opacity:n.globals.hasNegs?k.percent<0?1-(1+k.percent/100):p+k.percent/100:k.percent/100,patternID:ue.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 x=this.rectRadius,S=s.drawRect(f,a,o,r,x);if(S.attr({cx:f,cy:a}),S.node.classList.add("apexcharts-heatmap-rect"),d.add(S),S.attr({fill:C,i:u,index:u,j:m,val:e[u][m],"stroke-width":this.strokeWidth,stroke:n.config.plotOptions.heatmap.useFillColorAsStroke?C:n.globals.stroke.colors[0],color:C}),this.helpers.addListeners(S),n.config.chart.animations.enabled&&!n.globals.dataChanged){var E=1;n.globals.resized||(E=n.config.chart.animations.speed),this.animateHeatMap(S,f,a,o,r,E)}if(n.globals.dataChanged){var T=1;if(this.dynamicAnim.enabled&&n.globals.shouldAnimate){T=this.dynamicAnim.speed;var P=n.globals.previousPaths[u]&&n.globals.previousPaths[u][m]&&n.globals.previousPaths[u][m].color;P||(P="rgba(255, 255, 255, 0)"),this.animateHeatColor(S,ue.isColorHex(P)?P:ue.rgb2hex(P),ue.isColorHex(C)?C:ue.rgb2hex(C),T)}}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:k,series:c});L!==null&&d.add(L),f+=o,m++}a+=r,i.add(d)}var V=n.globals.yAxisScale[0].result.slice();return n.config.yaxis[0].reversed?V.unshift(""):V.push(""),n.globals.yAxisScale[0].result=V,i}},{key:"animateHeatMap",value:function(e,n,s,i,o,r){var a=new sp(this.ctx);a.animateRect(e,{x:n+i/2,y:s+o/2,width:0,height:0},{x:n,y:s,width:i,height:o},r,function(){a.animationCompleted(e)})}},{key:"animateHeatColor",value:function(e,n,s,i){e.attr({fill:n}).animate(i).attr({fill:s})}}]),t}(),lU=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"drawYAxisTexts",value:function(e,n,s,i){var o=this.w,r=o.config.yaxis[0],a=o.globals.yLabelFormatters[0];return new Ve(this.ctx).drawText({x:e+r.labels.offsetX,y:n+r.labels.offsetY,text:a(i,s),textAnchor:"middle",fontSize:r.labels.style.fontSize,fontFamily:r.labels.style.fontFamily,foreColor:Array.isArray(r.labels.style.colors)?r.labels.style.colors[s]:r.labels.style.colors})}}]),t}(),cU=function(){function t(e){at(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 s=n.config.plotOptions.pie.customScale,i=n.globals.gridWidth/2,o=n.globals.gridHeight/2;this.translateX=i-i*s,this.translateY=o-o*s,this.dataLabelsGroup=new Ve(this.ctx).group({class:"apexcharts-datalabels-group",transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(s,")")}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return lt(t,[{key:"draw",value:function(e){var n=this,s=this.w,i=new Ve(this.ctx),o=i.group({class:"apexcharts-pie"});if(s.globals.noData)return o;for(var r=0,a=0;a<e.length;a++)r+=ue.negToZero(e[a]);var l=[],c=i.group();r===0&&(r=1e-5),e.forEach(function(k){n.maxY=Math.max(n.maxY,k)}),s.config.yaxis[0].max&&(this.maxY=s.config.yaxis[0].max),s.config.grid.position==="back"&&this.chartType==="polarArea"&&this.drawPolarElements(o);for(var u=0;u<e.length;u++){var d=this.fullAngle*ue.negToZero(e[u])/r;l.push(d),this.chartType==="polarArea"?(l[u]=this.fullAngle/e.length,this.sliceSizes.push(s.globals.radialSize*e[u]/this.maxY)):this.sliceSizes.push(s.globals.radialSize)}if(s.globals.dataChanged){for(var h,f=0,p=0;p<s.globals.previousPaths.length;p++)f+=ue.negToZero(s.globals.previousPaths[p]);for(var m=0;m<s.globals.previousPaths.length;m++)h=this.fullAngle*ue.negToZero(s.globals.previousPaths[m])/f,this.prevSectorAngleArr.push(h)}if(this.donutSize<0&&(this.donutSize=0),this.chartType==="donut"){var b=i.drawCircle(this.donutSize);b.attr({cx:this.centerX,cy:this.centerY,fill:s.config.plotOptions.pie.donut.background?s.config.plotOptions.pie.donut.background:"transparent"}),c.add(b)}var y=this.drawArcs(l,e);if(this.sliceLabels.forEach(function(k){y.add(k)}),c.attr({transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(s.config.plotOptions.pie.customScale,")")}),c.add(y),o.add(c),this.donutDataLabels.show){var C=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});o.add(C)}return s.config.grid.position==="front"&&this.chartType==="polarArea"&&this.drawPolarElements(o),o}},{key:"drawArcs",value:function(e,n){var s=this.w,i=new Ws(this.ctx),o=new Ve(this.ctx),r=new Mr(this.ctx),a=o.group({class:"apexcharts-slices"}),l=this.initialAngle,c=this.initialAngle,u=this.initialAngle,d=this.initialAngle;this.strokeWidth=s.config.stroke.show?s.config.stroke.width:0;for(var h=0;h<e.length;h++){var f=o.group({class:"apexcharts-series apexcharts-pie-series",seriesName:ue.escapeString(s.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]}),b=this.getChangedPath(c,d),y=o.drawPath({d:b,stroke:Array.isArray(this.lineColorArr)?this.lineColorArr[h]:this.lineColorArr,strokeWidth:0,fill:m,fillOpacity:s.config.fill.opacity,classes:"apexcharts-pie-area apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(h)});if(y.attr({index:0,j:h}),i.setSelectionFilter(y,0,h),s.config.chart.dropShadow.enabled){var C=s.config.chart.dropShadow;i.dropShadow(y,C,h)}this.addListeners(y,this.donutDataLabels),Ve.setAttrs(y.node,{"data:angle":p,"data:startAngle":l,"data:strokeWidth":this.strokeWidth,"data:value":n[h]});var k={x:0,y:0};this.chartType==="pie"||this.chartType==="polarArea"?k=ue.polarToCartesian(this.centerX,this.centerY,s.globals.radialSize/1.25+s.config.plotOptions.pie.dataLabels.offset,(l+p/2)%this.fullAngle):this.chartType==="donut"&&(k=ue.polarToCartesian(this.centerX,this.centerY,(s.globals.radialSize+this.donutSize)/2+s.config.plotOptions.pie.dataLabels.offset,(l+p/2)%this.fullAngle)),f.add(y);var x=0;if(!this.initialAnim||s.globals.resized||s.globals.dataChanged?this.animBeginArr.push(0):((x=p/this.fullAngle*s.config.chart.animations.speed)===0&&(x=1),this.animDur=x+this.animDur,this.animBeginArr.push(this.animDur)),this.dynamicAnim&&s.globals.dataChanged?this.animatePaths(y,{size:this.sliceSizes[h],endAngle:u,startAngle:l,prevStartAngle:c,prevEndAngle:d,animateStartingPos:!0,i:h,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:s.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(y,{size:this.sliceSizes[h],endAngle:u,startAngle:l,i:h,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:x}),s.config.plotOptions.pie.expandOnClick&&this.chartType!=="polarArea"&&y.node.addEventListener("mouseup",this.pieClicked.bind(this,h)),s.globals.selectedDataPoints[0]!==void 0&&s.globals.selectedDataPoints[0].indexOf(h)>-1&&this.pieClicked(h),s.config.dataLabels.enabled){var S=k.x,E=k.y,T=100*p/this.fullAngle+"%";if(p!==0&&s.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[h]){var P=s.config.dataLabels.formatter;P!==void 0&&(T=P(s.globals.seriesPercent[h][0],{seriesIndex:h,w:s}));var I=s.globals.dataLabels.style.colors[h],L=o.group({class:"apexcharts-datalabels"}),V=o.drawText({x:S,y:E,text:T,textAnchor:"middle",fontSize:s.config.dataLabels.style.fontSize,fontFamily:s.config.dataLabels.style.fontFamily,fontWeight:s.config.dataLabels.style.fontWeight,foreColor:I});if(L.add(V),s.config.dataLabels.dropShadow.enabled){var D=s.config.dataLabels.dropShadow;i.dropShadow(V,D)}V.node.classList.add("apexcharts-pie-label"),s.config.chart.animations.animate&&s.globals.resized===!1&&(V.node.classList.add("apexcharts-pie-label-delay"),V.node.style.animationDelay=s.config.chart.animations.speed/940+"s"),this.sliceLabels.push(L)}}}return a}},{key:"addListeners",value:function(e,n){var s=new Ve(this.ctx);e.node.addEventListener("mouseenter",s.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",s.pathMouseLeave.bind(this,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this,e.node,n)),e.node.addEventListener("mousedown",s.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 s=this.w,i=n.endAngle<n.startAngle?this.fullAngle+n.endAngle-n.startAngle:n.endAngle-n.startAngle,o=i,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===s.config.series.length-1&&(i+a>this.fullAngle?n.endAngle=n.endAngle-(i+a):i+a<this.fullAngle&&(n.endAngle=n.endAngle+(this.fullAngle-(i+a)))),i===this.fullAngle&&(i=this.fullAngle-.01),this.animateArc(e,r,a,i,o,n)}},{key:"animateArc",value:function(e,n,s,i,o,r){var a,l=this,c=this.w,u=new sp(this.ctx),d=r.size;(isNaN(n)||isNaN(o))&&(n=s,o=i,r.dur=0);var h=i,f=s,p=n<s?this.fullAngle+n-s:n-s;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+(i-p)*m,r.animateStartingPos&&(h=o+(i-o)*m,f=n-o+(s-(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:i,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,s=this.w,i=this,o=i.sliceSizes[e]+(s.config.plotOptions.pie.expandOnClick?4:0),r=s.globals.dom.Paper.findOne(".apexcharts-".concat(i.chartType.toLowerCase(),"-slice-").concat(e));if(r.attr("data:pieClicked")!=="true"){var a=s.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)}),s.globals.capturedDataPointIndex=e,r.attr("data:pieClicked","true");var l=parseInt(r.attr("data:startAngle"),10),c=parseInt(r.attr("data:angle"),10);n=i.getPiePath({me:i,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 s="";return this.dynamicAnim&&this.w.globals.dataChanged&&(s=this.getPiePath({me:this,startAngle:e,angle:n-e,size:this.size})),s}},{key:"getPiePath",value:function(e){var n,s=e.me,i=e.startAngle,o=e.angle,r=e.size,a=new Ve(this.ctx),l=i,c=Math.PI*(l-90)/180,u=o+i;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=s.centerX+r*Math.cos(c),f=s.centerY+r*Math.sin(c),p=s.centerX+r*Math.cos(d),m=s.centerY+r*Math.sin(d),b=ue.polarToCartesian(s.centerX,s.centerY,s.donutSize,u),y=ue.polarToCartesian(s.centerX,s.centerY,s.donutSize,l),C=o>180?1:0,k=["M",h,f,"A",r,r,0,C,1,p,m];return n=s.chartType==="donut"?[].concat(k,["L",b.x,b.y,"A",s.donutSize,s.donutSize,0,C,0,y.x,y.y,"L",h,f,"z"]).join(" "):s.chartType==="pie"||s.chartType==="polarArea"?[].concat(k,["L",s.centerX,s.centerY,"L",h,f]).join(" "):[].concat(k).join(" "),a.roundPathCorners(n,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(e){var n=this.w,s=new nU(this.ctx),i=new Ve(this.ctx),o=new lU(this.ctx),r=i.group(),a=i.group(),l=s.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=i.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,s){var i=this.w,o=new Ve(this.ctx),r=n.total.show;e.node.innerHTML="",e.node.style.opacity=s.opacity;var a,l,c=s.centerX,u=this.donutDataLabels.total.label?s.centerY:s.centerY-s.centerY/6;a=n.name.color===void 0?i.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?i.config.chart.foreColor:n.value.color;var p=n.value.formatter,m="",b="";if(r?(a=n.total.color,d=n.total.fontSize,h=n.total.fontFamily,f=n.total.fontWeight,b=this.donutDataLabels.total.label?n.total.label:"",m=n.total.formatter(i)):i.globals.series.length===1&&(m=p(i.globals.series[0],i),b=i.globals.seriesNames[0]),b&&(b=n.name.formatter(b,n.total.show,i)),n.name.show){var y=o.drawText({x:c,y:u+parseFloat(n.name.offsetY),text:b,textAnchor:"middle",foreColor:a,fontSize:d,fontWeight:f,fontFamily:h});y.node.classList.add("apexcharts-datalabel-label"),e.add(y)}if(n.value.show){var C=n.name.show?parseFloat(n.value.offsetY)+16:n.value.offsetY,k=o.drawText({x:c,y:u+C,text:m,textAnchor:"middle",foreColor:l,fontWeight:n.value.fontWeight,fontSize:n.value.fontSize,fontFamily:n.value.fontFamily});k.node.classList.add("apexcharts-datalabel-value"),e.add(k)}return e}},{key:"printInnerLabels",value:function(e,n,s,i){var o,r=this.w;i?o=e.name.color===void 0?r.globals.colors[parseInt(i.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");s=(0,e.value.formatter)(s,r),i||typeof e.total.formatter!="function"||(s=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=s),a!==null&&(a.style.fill=o)}},{key:"printDataLabelsInner",value:function(e,n){var s=this.w,i=e.getAttribute("data:value"),o=s.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];s.globals.series.length>1&&this.printInnerLabels(n,o,i,e);var r=s.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");r!==null&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(e){var n=this,s=this.w,i=new Ve(this.ctx),o=s.config.plotOptions.polarArea.spokes;if(o.strokeWidth!==0){for(var r=[],a=360/s.globals.series.length,l=0;l<s.globals.series.length;l++)r.push(ue.polarToCartesian(this.centerX,this.centerY,s.globals.radialSize,s.config.plotOptions.pie.startAngle+a*l));r.forEach(function(c,u){var d=i.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"),s=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(s)}}}]),t}(),K1t=function(){function t(e){at(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 Ve(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 rs(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 lt(t,[{key:"draw",value:function(e){var n=this,s=this.w,i=new Mr(this.ctx),o=[],r=new $f(this.ctx);e.length&&(this.dataPointsLen=e[s.globals.maxValsInArrayIndex].length),this.disAngle=2*Math.PI/this.dataPointsLen;var a=s.globals.gridWidth/2,l=s.globals.gridHeight/2,c=a+s.config.plotOptions.radar.offsetX,u=l+s.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(b,y){var C=b.length===s.globals.dataPoints,k=n.graphics.group().attr({class:"apexcharts-series","data:longestSeries":C,seriesName:ue.escapeString(s.globals.seriesNames[y]),rel:y+1,"data:realIndex":y});n.dataRadiusOfPercent[y]=[],n.dataRadius[y]=[],n.angleArr[y]=[],b.forEach(function(z,Y){var B=Math.abs(n.maxValue-n.minValue);z-=n.minValue,n.isLog&&(z=n.coreUtils.getLogVal(n.logBase,z,0)),n.dataRadiusOfPercent[y][Y]=z/B,n.dataRadius[y][Y]=n.dataRadiusOfPercent[y][Y]*n.size,n.angleArr[y][Y]=Y*n.disAngle}),h=n.getDataPointsPos(n.dataRadius[y],n.angleArr[y]);var x=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":y}),s.globals.delayedElements.push({el:f.node,index:y});var S={i:y,realIndex:y,animationDelay:y,initialSpeed:s.config.chart.animations.speed,dataChangeSpeed:s.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-radar",shouldClipToGrid:!1,bindEventsOnPaths:!1,stroke:s.globals.stroke.colors[y],strokeLineCap:s.config.stroke.lineCap},E=null;s.globals.previousPaths.length>0&&(E=n.getPreviousPath(y));for(var T=0;T<x.linePathsTo.length;T++){var P=n.graphics.renderPaths(Je(Je({},S),{},{pathFrom:E===null?x.linePathsFrom[T]:E,pathTo:x.linePathsTo[T],strokeWidth:Array.isArray(n.strokeWidth)?n.strokeWidth[y]:n.strokeWidth,fill:"none",drawShadow:!1}));k.add(P);var I=i.fillPath({seriesNumber:y}),L=n.graphics.renderPaths(Je(Je({},S),{},{pathFrom:E===null?x.areaPathsFrom[T]:E,pathTo:x.areaPathsTo[T],strokeWidth:0,fill:I,drawShadow:!1}));if(s.config.chart.dropShadow.enabled){var V=new Ws(n.ctx),D=s.config.chart.dropShadow;V.dropShadow(L,Object.assign({},D,{noUserSpaceOnUse:!0}),y)}k.add(L)}b.forEach(function(z,Y){var B=new ap(n.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:y,dataPointIndex:Y}),U=n.graphics.drawMarker(h[Y].x,h[Y].y,B);U.attr("rel",Y),U.attr("j",Y),U.attr("index",y),U.node.setAttribute("default-marker-size",B.pSize);var X=n.graphics.group({class:"apexcharts-series-markers"});X&&X.add(U),f.add(X),k.add(f);var K=s.config.dataLabels;if(K.enabled){var N=K.formatter(s.globals.series[y][Y],{seriesIndex:y,dataPointIndex:Y,w:s});r.plotDataLabelsText({x:h[Y].x,y:h[Y].y,text:N,textAnchor:"middle",i:y,j:y,parent:p,offsetCorrection:!1,dataLabelsConfig:Je({},K)})}k.add(p)}),o.push(k)}),this.drawPolygons({parent:d}),s.config.xaxis.labels.show){var m=this.drawXAxisTexts();d.add(m)}return o.forEach(function(b){d.add(b)}),d.add(this.yaxisLabels),d}},{key:"drawPolygons",value:function(e){for(var n=this,s=this.w,i=e.parent,o=new lU(this.ctx),r=s.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=ue.getPolygonPos(f,n.dataPointsLen),b="";m.forEach(function(y,C){if(p===0){var k=n.graphics.drawLine(y.x,y.y,0,0,Array.isArray(n.polygons.connectorColors)?n.polygons.connectorColors[C]:n.polygons.connectorColors);h.push(k)}C===0&&n.yaxisLabelsTextsPos.push({x:y.x,y:y.y}),b+=y.x+","+y.y+" "}),d.push(b)}),d.forEach(function(f,p){var m=n.polygons.strokeColors,b=n.polygons.strokeWidth,y=n.graphics.drawPolygon(f,Array.isArray(m)?m[p]:m,Array.isArray(b)?b[p]:b,s.globals.radarPolygons.fill.colors[p]);i.add(y)}),h.forEach(function(f){i.add(f)}),s.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,s=n.config.xaxis.labels,i=this.graphics.group({class:"apexcharts-xaxis"}),o=ue.getPolygonPos(this.size,this.dataPointsLen);return n.globals.labels.forEach(function(r,a){var l=n.config.xaxis.labels.formatter,c=new $f(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:i,className:"apexcharts-xaxis-label",color:Array.isArray(s.style.colors)&&s.style.colors[a]?s.style.colors[a]:"#a8a8a8",dataLabelsConfig:Je({textAnchor:u.textAnchor,dropShadow:{enabled:!1}},s),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)}})}}),i}},{key:"createPaths",value:function(e,n){var s=this,i=[],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+=s.graphics.line(u.x,u.y),c+=s.graphics.line(u.x,u.y),d===e.length-1&&(l+="Z",c+="Z")}),i.push(l),r.push(c)}return{linePathsFrom:o,linePathsTo:i,areaPathsFrom:a,areaPathsTo:r}}},{key:"getTextPos",value:function(e,n){var s="middle",i=e.x,o=e.y;return Math.abs(e.x)>=10?e.x>0?(s="start",i+=10):e.x<0&&(s="end",i-=10):s="middle",Math.abs(e.y)>=n-10&&(e.y<0?o-=10:e.y>0&&(o+=10)),{textAnchor:s,newX:i,newY:o}}},{key:"getPreviousPath",value:function(e){for(var n=this.w,s=null,i=0;i<n.globals.previousPaths.length;i++){var o=n.globals.previousPaths[i];o.paths.length>0&&parseInt(o.realIndex,10)===parseInt(e,10)&&n.globals.previousPaths[i].paths[0]!==void 0&&(s=n.globals.previousPaths[i].paths[0].d)}return s}},{key:"getDataPointsPos",value:function(e,n){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.dataPointsLen;e=e||[],n=n||[];for(var i=[],o=0;o<s;o++){var r={};r.x=e[o]*Math.sin(n[o]),r.y=-e[o]*Math.cos(n[o]),i.push(r)}return i}}]),t}(),Z1t=function(t){L1(n,cU);var e=I1(n);function n(s){var i;at(this,n),(i=e.call(this,s)).ctx=s,i.w=s.w,i.animBeginArr=[0],i.animDur=0;var o=i.w;return i.startAngle=o.config.plotOptions.radialBar.startAngle,i.endAngle=o.config.plotOptions.radialBar.endAngle,i.totalAngle=Math.abs(o.config.plotOptions.radialBar.endAngle-o.config.plotOptions.radialBar.startAngle),i.trackStartAngle=o.config.plotOptions.radialBar.track.startAngle,i.trackEndAngle=o.config.plotOptions.radialBar.track.endAngle,i.barLabels=i.w.config.plotOptions.radialBar.barLabels,i.donutDataLabels=i.w.config.plotOptions.radialBar.dataLabels,i.radialDataLabels=i.donutDataLabels,i.trackStartAngle||(i.trackStartAngle=i.startAngle),i.trackEndAngle||(i.trackEndAngle=i.endAngle),i.endAngle===360&&(i.endAngle=359.99),i.margin=parseInt(o.config.plotOptions.radialBar.track.margin,10),i.onBarLabelClick=i.onBarLabelClick.bind(wH(i)),i}return lt(n,[{key:"draw",value:function(s){var i=this.w,o=new Ve(this.ctx),r=o.group({class:"apexcharts-radialbar"});if(i.globals.noData)return r;var a=o.group(),l=this.defaultSize/2,c=i.globals.gridWidth/2,u=this.defaultSize/2.05;i.config.chart.sparkline.enabled||(u=u-i.config.stroke.width-i.config.chart.dropShadow.blur);var d=i.globals.fill.colors;if(i.config.plotOptions.radialBar.track.show){var h=this.drawTracks({size:u,centerX:c,centerY:l,colorArr:d,series:s});a.add(h)}var f=this.drawArcs({size:u,centerX:c,centerY:l,colorArr:d,series:s}),p=360;i.config.plotOptions.radialBar.startAngle<0&&(p=this.totalAngle);var m=(360-p)/360;if(i.globals.radialSize=u-u*m,this.radialDataLabels.value.show){var b=Math.max(this.radialDataLabels.value.offsetY,this.radialDataLabels.name.offsetY);i.globals.radialSize+=b*m}return a.add(f.g),i.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(s){var i=this.w,o=new Ve(this.ctx),r=o.group({class:"apexcharts-tracks"}),a=new Ws(this.ctx),l=new Mr(this.ctx),c=this.getStrokeWidth(s);s.size=s.size-c/2;for(var u=0;u<s.series.length;u++){var d=o.group({class:"apexcharts-radialbar-track apexcharts-track"});r.add(d),d.attr({rel:u+1}),s.size=s.size-c-this.margin;var h=i.config.plotOptions.radialBar.track,f=l.fillPath({seriesNumber:0,size:s.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 b=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 y=h.dropShadow;a.dropShadow(b,y)}d.add(b),b.attr("id","apexcharts-radialbarTrack-"+u),this.animatePaths(b,{centerX:s.centerX,centerY:s.centerY,endAngle:m,startAngle:p,size:s.size,i:u,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return r}},{key:"drawArcs",value:function(s){var i=this.w,o=new Ve(this.ctx),r=new Mr(this.ctx),a=new Ws(this.ctx),l=o.group(),c=this.getStrokeWidth(s);s.size=s.size-c/2;var u=i.config.plotOptions.radialBar.hollow.background,d=s.size-c*s.series.length-this.margin*s.series.length-c*parseInt(i.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,h=d-i.config.plotOptions.radialBar.hollow.margin;i.config.plotOptions.radialBar.hollow.image!==void 0&&(u=this.drawHollowImage(s,l,d,u));var f=this.drawHollow({size:h,centerX:s.centerX,centerY:s.centerY,fill:u||"transparent"});if(i.config.plotOptions.radialBar.hollow.dropShadow.enabled){var p=i.config.plotOptions.radialBar.hollow.dropShadow;a.dropShadow(f,p)}var m=1;!this.radialDataLabels.total.show&&i.globals.series.length>1&&(m=0);var b=null;if(this.radialDataLabels.show){var y=i.globals.dom.Paper.findOne(".apexcharts-datalabels-group");b=this.renderInnerDataLabels(y,this.radialDataLabels,{hollowSize:d,centerX:s.centerX,centerY:s.centerY,opacity:m})}i.config.plotOptions.radialBar.hollow.position==="back"&&(l.add(f),b&&l.add(b));var C=!1;i.config.plotOptions.radialBar.inverseOrder&&(C=!0);for(var k=C?s.series.length-1:0;C?k>=0:k<s.series.length;C?k--:k++){var x=o.group({class:"apexcharts-series apexcharts-radial-series",seriesName:ue.escapeString(i.globals.seriesNames[k])});l.add(x),x.attr({rel:k+1,"data:realIndex":k}),this.ctx.series.addCollapsedClassToSeries(x,k),s.size=s.size-c-this.margin;var S=r.fillPath({seriesNumber:k,size:s.size,value:s.series[k]}),E=this.startAngle,T=void 0,P=ue.negToZero(s.series[k]>100?100:s.series[k])/100,I=Math.round(this.totalAngle*P)+this.startAngle,L=void 0;i.globals.dataChanged&&(T=this.startAngle,L=Math.round(this.totalAngle*ue.negToZero(i.globals.previousPaths[k])/100)+T),Math.abs(I)+Math.abs(E)>360&&(I-=.01),Math.abs(L)+Math.abs(T)>360&&(L-=.01);var V=I-E,D=Array.isArray(i.config.stroke.dashArray)?i.config.stroke.dashArray[k]:i.config.stroke.dashArray,z=o.drawPath({d:"",stroke:S,strokeWidth:c,fill:"none",fillOpacity:i.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+k,strokeDashArray:D});if(Ve.setAttrs(z.node,{"data:angle":V,"data:value":s.series[k]}),i.config.chart.dropShadow.enabled){var Y=i.config.chart.dropShadow;a.dropShadow(z,Y,k)}if(a.setSelectionFilter(z,0,k),this.addListeners(z,this.radialDataLabels),x.add(z),z.attr({index:0,j:k}),this.barLabels.enabled){var B=ue.polarToCartesian(s.centerX,s.centerY,s.size,E),U=this.barLabels.formatter(i.globals.seriesNames[k],{seriesIndex:k,w:i}),X=["apexcharts-radialbar-label"];this.barLabels.onClick||X.push("apexcharts-no-click");var K=this.barLabels.useSeriesColors?i.globals.colors[k]:i.config.chart.foreColor;K||(K=i.config.chart.foreColor);var N=B.x+this.barLabels.offsetX,F=B.y+this.barLabels.offsetY,Q=o.drawText({x:N,y:F,text:U,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:K,cssClass:X.join(" ")});Q.on("click",this.onBarLabelClick),Q.attr({rel:k+1}),E!==0&&Q.attr({"transform-origin":"".concat(N," ").concat(F),transform:"rotate(".concat(E," 0 0)")}),x.add(Q)}var ie=0;!this.initialAnim||i.globals.resized||i.globals.dataChanged||(ie=i.config.chart.animations.speed),i.globals.dataChanged&&(ie=i.config.chart.animations.dynamicAnimation.speed),this.animDur=ie/(1.2*s.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(z,{centerX:s.centerX,centerY:s.centerY,endAngle:I,startAngle:E,prevEndAngle:L,prevStartAngle:T,size:s.size,i:k,totalItems:2,animBeginArr:this.animBeginArr,dur:ie,shouldSetPrevPaths:!0})}return{g:l,elHollow:f,dataLabels:b}}},{key:"drawHollow",value:function(s){var i=new Ve(this.ctx).drawCircle(2*s.size);return i.attr({class:"apexcharts-radialbar-hollow",cx:s.centerX,cy:s.centerY,r:s.size,fill:s.fill}),i}},{key:"drawHollowImage",value:function(s,i,o,r){var a=this.w,l=new Mr(this.ctx),c=ue.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(s.centerX-m.width/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,s.centerY-m.height/2+a.config.plotOptions.radialBar.hollow.imageOffsetY)});i.add(f)}else{var p=a.globals.dom.Paper.image(u,function(m){this.move(s.centerX-d/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,s.centerY-h/2+a.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(d,h)});i.add(p)}}return r}},{key:"getStrokeWidth",value:function(s){var i=this.w;return s.size*(100-parseInt(i.config.plotOptions.radialBar.hollow.size,10))/100/(s.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(s){var i=parseInt(s.target.getAttribute("rel"),10)-1,o=this.barLabels.onClick,r=this.w;o&&o(r.globals.seriesNames[i],{w:r,seriesIndex:i})}}]),n}(),J1t=function(t){L1(n,Af);var e=I1(n);function n(){return at(this,n),e.apply(this,arguments)}return lt(n,[{key:"draw",value:function(s,i){var o=this.w,r=new Ve(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=s,this.seriesRangeStart=o.globals.seriesRangeStart,this.seriesRangeEnd=o.globals.seriesRangeEnd,this.barHelpers.initVariables(s);for(var a=r.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),l=0;l<s.length;l++){var c,u,d,h,f=void 0,p=void 0,m=o.globals.comboCharts?i[l]:l,b=this.barHelpers.getGroupIndex(m).columnGroupIndex,y=r.group({class:"apexcharts-series",seriesName:ue.escapeString(o.globals.seriesNames[m]),rel:l+1,"data:realIndex":m});this.ctx.series.addCollapsedClassToSeries(y,m),s[l].length>0&&(this.visibleI=this.visibleI+1);var C=0,k=0,x=0;this.yRatio.length>1&&(this.yaxisIndex=o.globals.seriesYAxisReverseMap[m][0],x=m);var S=this.barHelpers.initialPositions();p=S.y,h=S.zeroW,f=S.x,k=S.barWidth,C=S.barHeight,c=S.xDivision,u=S.yDivision,d=S.zeroH;for(var E=r.group({class:"apexcharts-datalabels","data:realIndex":m}),T=r.group({class:"apexcharts-rangebar-goals-markers"}),P=0;P<o.globals.dataPoints;P++){var I=this.barHelpers.getStrokeWidth(l,P,m),L=this.seriesRangeStart[l][P],V=this.seriesRangeEnd[l][P],D=null,z=null,Y=null,B={x:f,y:p,strokeWidth:I,elSeries:y},U=this.seriesLen;if(o.config.plotOptions.bar.rangeBarGroupRows&&(U=1),o.config.series[l].data[P]===void 0)break;if(this.isHorizontal){Y=p+C*this.visibleI;var X=(u-C*U)/2;if(o.config.series[l].data[P].x){var K=this.detectOverlappingBars({i:l,j:P,barYPosition:Y,srty:X,barHeight:C,yDivision:u,initPositions:S});C=K.barHeight,Y=K.barYPosition}k=(D=this.drawRangeBarPaths(Je({indexes:{i:l,j:P,realIndex:m},barHeight:C,barYPosition:Y,zeroW:h,yDivision:u,y1:L,y2:V},B))).barWidth}else{o.globals.isXNumeric&&(f=(o.globals.seriesX[l][P]-o.globals.minX)/this.xRatio-k/2),z=f+k*this.visibleI;var N=(c-k*U)/2;if(o.config.series[l].data[P].x){var F=this.detectOverlappingBars({i:l,j:P,barXPosition:z,srtx:N,barWidth:k,xDivision:c,initPositions:S});k=F.barWidth,z=F.barXPosition}C=(D=this.drawRangeColumnPaths(Je({indexes:{i:l,j:P,realIndex:m,translationsIndex:x},barWidth:k,barXPosition:z,zeroH:d,xDivision:c},B))).barHeight}var Q=this.barHelpers.drawGoalLine({barXPosition:D.barXPosition,barYPosition:Y,goalX:D.goalX,goalY:D.goalY,barHeight:C,barWidth:k});Q&&T.add(Q),p=D.y,f=D.x;var ie=this.barHelpers.getPathFillColor(s,l,P,m);this.renderSeries({realIndex:m,pathFill:ie.color,lineFill:ie.useRangeColor?ie.color:o.globals.stroke.colors[m],j:P,i:l,x:f,y:p,y1:L,y2:V,pathFrom:D.pathFrom,pathTo:D.pathTo,strokeWidth:I,elSeries:y,series:s,barHeight:C,barWidth:k,barXPosition:z,barYPosition:Y,columnGroupIndex:b,elDataLabelsWrap:E,elGoalsMarkers:T,visibleSeries:this.visibleI,type:"rangebar"})}a.add(y)}return a}},{key:"detectOverlappingBars",value:function(s){var i=s.i,o=s.j,r=s.barYPosition,a=s.barXPosition,l=s.srty,c=s.srtx,u=s.barHeight,d=s.barWidth,h=s.yDivision,f=s.xDivision,p=s.initPositions,m=this.w,b=[],y=m.config.series[i].data[o].rangeName,C=m.config.series[i].data[o].x,k=Array.isArray(C)?C.join(" "):C,x=m.globals.labels.map(function(E){return Array.isArray(E)?E.join(" "):E}).indexOf(k),S=m.globals.seriesRange[i].findIndex(function(E){return E.x===k&&E.overlaps.length>0});return this.isHorizontal?(r=m.config.plotOptions.bar.rangeBarGroupRows?l+h*x:l+u*this.visibleI+h*x,S>-1&&!m.config.plotOptions.bar.rangeBarOverlap&&(b=m.globals.seriesRange[i][S].overlaps).indexOf(y)>-1&&(r=(u=p.barHeight/b.length)*this.visibleI+h*(100-parseInt(this.barOptions.barHeight,10))/100/2+u*(this.visibleI+b.indexOf(y))+h*x)):(x>-1&&!m.globals.timescaleLabels.length&&(a=m.config.plotOptions.bar.rangeBarGroupRows?c+f*x:c+d*this.visibleI+f*x),S>-1&&!m.config.plotOptions.bar.rangeBarOverlap&&(b=m.globals.seriesRange[i][S].overlaps).indexOf(y)>-1&&(a=(d=p.barWidth/b.length)*this.visibleI+f*(100-parseInt(this.barOptions.barWidth,10))/100/2+d*(this.visibleI+b.indexOf(y))+f*x)),{barYPosition:r,barXPosition:a,barHeight:u,barWidth:d}}},{key:"drawRangeColumnPaths",value:function(s){var i=s.indexes,o=s.x,r=s.xDivision,a=s.barWidth,l=s.barXPosition,c=s.zeroH,u=this.w,d=i.i,h=i.j,f=i.realIndex,p=i.translationsIndex,m=this.yRatio[p],b=this.getRangeValue(f,h),y=Math.min(b.start,b.end),C=Math.max(b.start,b.end);this.series[d][h]===void 0||this.series[d][h]===null?y=c:(y=c-y/m,C=c-C/m);var k=Math.abs(C-y),x=this.barHelpers.getColumnPaths({barXPosition:l,barWidth:a,y1:y,y2:C,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:f,i:f,j:h,w:u});if(u.globals.isXNumeric){var S=this.getBarXForNumericXAxis({x:o,j:h,realIndex:f,barWidth:a});o=S.x,l=S.barXPosition}else o+=r;return{pathTo:x.pathTo,pathFrom:x.pathFrom,barHeight:k,x:o,y:b.start<0&&b.end<0?y:C,goalY:this.barHelpers.getGoalValues("y",null,c,d,h,p),barXPosition:l}}},{key:"preventBarOverflow",value:function(s){var i=this.w;return s<0&&(s=0),s>i.globals.gridWidth&&(s=i.globals.gridWidth),s}},{key:"drawRangeBarPaths",value:function(s){var i=s.indexes,o=s.y,r=s.y1,a=s.y2,l=s.yDivision,c=s.barHeight,u=s.barYPosition,d=s.zeroW,h=this.w,f=i.realIndex,p=i.j,m=this.preventBarOverflow(d+r/this.invertedYRatio),b=this.preventBarOverflow(d+a/this.invertedYRatio),y=this.getRangeValue(f,p),C=Math.abs(b-m),k=this.barHelpers.getBarpaths({barYPosition:u,barHeight:c,x1:m,x2:b,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:f,realIndex:f,j:p,w:h});return h.globals.isXNumeric||(o+=l),{pathTo:k.pathTo,pathFrom:k.pathFrom,barWidth:C,x:y.start<0&&y.end<0?m:b,goalX:this.barHelpers.getGoalValues("x",d,null,f,p),y:o}}},{key:"getRangeValue",value:function(s,i){var o=this.w;return{start:o.globals.seriesRangeStart[s][i],end:o.globals.seriesRangeEnd[s][i]}}}]),n}(),Q1t=function(){function t(e){at(this,t),this.w=e.w,this.lineCtx=e}return lt(t,[{key:"sameValueSeriesFix",value:function(e,n){var s=this.w;if((s.config.fill.type==="gradient"||s.config.fill.type[e]==="gradient")&&new rs(this.lineCtx.ctx,s).seriesHaveSameValues(e)){var i=n[e].slice();i[i.length-1]=i[i.length-1]+1e-6,n[e]=i}return n}},{key:"calculatePoints",value:function(e){var n=e.series,s=e.realIndex,i=e.x,o=e.y,r=e.i,a=e.j,l=e.prevY,c=this.w,u=[],d=[];if(a===0){var h=this.lineCtx.categoryAxisCorrection+c.config.markers.offsetX;c.globals.isXNumeric&&(h=(c.globals.seriesX[s][0]-c.globals.minX)/this.lineCtx.xRatio+c.config.markers.offsetX),u.push(h),d.push(ue.isNumber(n[r][0])?l+c.config.markers.offsetY:null),u.push(i+c.config.markers.offsetX),d.push(ue.isNumber(n[r][a+1])?o+c.config.markers.offsetY:null)}else u.push(i+c.config.markers.offsetX),d.push(ue.isNumber(n[r][a+1])?o+c.config.markers.offsetY:null);return{x:u,y:d}}},{key:"checkPreviousPaths",value:function(e){for(var n=e.pathFromLine,s=e.pathFromArea,i=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(i,10)&&(a.type==="line"?(this.lineCtx.appendPathFrom=!1,n=o.globals.previousPaths[r].paths[0].d):a.type==="area"&&(this.lineCtx.appendPathFrom=!1,s=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:s}}},{key:"determineFirstPrevY",value:function(e){var n,s,i,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"||((s=this.w.config.series[r])===null||s===void 0?void 0:s.type)==="column");if(((i=a[o])===null||i===void 0?void 0:i[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}(),e0t=function(t){for(var e,n,s,i,o=function(u){for(var d=[],h=u[0],f=u[1],p=d[0]=l3(h,f),m=1,b=u.length-1;m<b;m++)h=f,f=u[m+1],d[m]=.5*(p+(p=l3(h,f)));return d[m]=p,d}(t),r=t.length-1,a=[],l=0;l<r;l++)s=l3(t[l],t[l+1]),Math.abs(s)<1e-6?o[l]=o[l+1]=0:(i=(e=o[l]/s)*e+(n=o[l+1]/s)*n)>9&&(i=3*s/Math.sqrt(i),o[l]=i*e,o[l+1]=i*n);for(var c=0;c<=r;c++)i=(t[Math.min(r,c+1)][0]-t[Math.max(0,c-1)][0])/(6*(1+o[c]*o[c])),a.push([i||0,o[c]*i||0]);return a},t0t=function(t){var e=e0t(t),n=t[1],s=t[0],i=[],o=e[1],r=e[0];i.push(s,[s[0]+r[0],s[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];i.push([c[0]-u[0],c[1]-u[1],c[0],c[1]])}return i},n0t=function(t,e,n){var s=t.slice(e,n);if(e){if(n-e>1&&s[1].length<6){var i=s[0].length;s[1]=[2*s[0][i-2]-s[0][i-4],2*s[0][i-1]-s[0][i-3]].concat(s[1])}s[0]=s[0].slice(-2)}return s};function l3(t,e){return(e[1]-t[1])/(e[0]-t[0])}var c3=function(){function t(e,n,s){at(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")||s,this.scatter=new eU(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new Q1t(this),this.markers=new ap(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return lt(t,[{key:"draw",value:function(e,n,s,i){var o,r=this.w,a=new Ve(this.ctx),l=r.globals.comboCharts?n:r.config.chart.type,c=a.group({class:"apexcharts-".concat(l,"-series apexcharts-plot-series")}),u=new rs(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?s[h]:h,p=this.yRatio.length>1?f:0;this._initSerieVariables(e,h,f);var m=[],b=[],y=[],C=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,f),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(C=(r.globals.seriesX[f][0]-r.globals.minX)/this.xRatio),y.push(C);var k,x=C,S=void 0,E=x,T=this.zeroY,P=this.zeroY;T=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:e,prevY:T,lineYPosition:0,translationsIndex:p}).prevY,r.config.stroke.curve==="monotoneCubic"&&e[h][0]===null?m.push(null):m.push(T),k=T,l==="rangeArea"&&(S=P=this.lineHelpers.determineFirstPrevY({i:h,realIndex:f,series:i,prevY:P,lineYPosition:0,translationsIndex:p}).prevY,b.push(m[0]!==null?P:null));var I=this._calculatePathsFrom({type:l,series:e,i:h,realIndex:f,translationsIndex:p,prevX:E,prevY:T,prevY2:P}),L=[m[0]],V=[b[0]],D={type:l,series:e,realIndex:f,translationsIndex:p,i:h,x:C,y:1,pX:x,pY:k,pathsFrom:I,linePaths:[],areaPaths:[],seriesIndex:s,lineYPosition:0,xArrj:y,yArrj:m,y2Arrj:b,seriesRangeEnd:i},z=this._iterateOverDataPoints(Je(Je({},D),{},{iterations:l==="rangeArea"?e[h].length-1:void 0,isRangeStart:!0}));if(l==="rangeArea"){for(var Y=this._calculatePathsFrom({series:i,i:h,realIndex:f,prevX:E,prevY:P}),B=this._iterateOverDataPoints(Je(Je({},D),{},{series:i,xArrj:[C],yArrj:L,y2Arrj:V,pY:S,areaPaths:z.areaPaths,pathsFrom:Y,iterations:i[h].length-1,isRangeStart:!1})),U=z.linePaths.length/2,X=0;X<U;X++)z.linePaths[X]=B.linePaths[X+U]+z.linePaths[X];z.linePaths.splice(U),z.pathFromLine=B.pathFromLine+z.pathFromLine}else z.pathFromArea+="z";this._handlePaths({type:l,realIndex:f,i:h,paths:z}),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(F,Q){return Number(F.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 N=0;N<d.length;N++)c.add(d[N]);return c}},{key:"_initSerieVariables",value:function(e,n,s){var i=this.w,o=new Ve(this.ctx);this.xDivision=i.globals.gridWidth/(i.globals.dataPoints-(i.config.xaxis.tickPlacement==="on"?1:0)),this.strokeWidth=Array.isArray(i.config.stroke.width)?i.config.stroke.width[s]:i.config.stroke.width;var r=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[s],r=s),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.zeroY=i.globals.gridHeight-this.baseLineY[r]-(this.isReversed?i.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>i.globals.gridHeight||i.config.plotOptions.area.fillTo==="end")&&(this.areaBottomY=i.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=o.group({class:"apexcharts-series",zIndex:i.config.series[s].zIndex!==void 0?i.config.series[s].zIndex:s,seriesName:ue.escapeString(i.globals.seriesNames[s])}),this.elPointsMain=o.group({class:"apexcharts-series-markers-wrap","data:realIndex":s}),this.elDataLabelsWrap=o.group({class:"apexcharts-datalabels","data:realIndex":s});var a=e[n].length===i.globals.dataPoints;this.elSeries.attr({"data:longestSeries":a,rel:n+1,"data:realIndex":s}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var n,s,i,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 Ve(this.ctx);if(a[l][0]===null){for(var b=0;b<a[l].length;b++)if(a[l][b]!==null){d=this.xDivision*b,h=this.zeroY-a[l][b]/this.yRatio[u],n=m.move(d,h),s=m.move(d,this.areaBottomY);break}}else n=m.move(d,h),r==="rangeArea"&&(n=m.move(d,f)+m.line(d,h)),s=m.move(d,this.areaBottomY)+m.line(d,h);if(i=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 y=this.lineHelpers.checkPreviousPaths({pathFromLine:i,pathFromArea:o,realIndex:c});i=y.pathFromLine,o=y.pathFromArea}return{prevX:d,prevY:h,linePath:n,areaPath:s,pathFromLine:i,pathFromArea:o}}},{key:"_handlePaths",value:function(e){var n=e.type,s=e.realIndex,i=e.i,o=e.paths,r=this.w,a=new Ve(this.ctx),l=new Mr(this.ctx);this.prevSeriesY.push(o.yArrj),r.globals.seriesXvalues[s]=o.xArrj,r.globals.seriesYvalues[s]=o.yArrj;var c=r.config.forecastDataPoints;if(c.count>0&&n!=="rangeArea"){var u=r.globals.seriesXvalues[s][r.globals.seriesXvalues[s].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:s});var f={i,realIndex:s,animationDelay:i,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:s}),m=0;m<o.areaPaths.length;m++){var b=a.renderPaths(Je(Je({},f),{},{pathFrom:o.pathFromArea,pathTo:o.areaPaths[m],stroke:"none",strokeWidth:0,strokeLineCap:null,fill:p}));this.elSeries.add(b)}if(r.config.stroke.show&&!this.pointsChart){var y=null;if(n==="line")y=l.fillPath({seriesNumber:s,i});else if(r.config.stroke.fill.type==="solid")y=r.globals.stroke.colors[s];else{var C=r.config.fill;r.config.fill=r.config.stroke.fill,y=l.fillPath({seriesNumber:s,i}),r.config.fill=C}for(var k=0;k<o.linePaths.length;k++){var x=y;n==="rangeArea"&&(x=l.fillPath({seriesNumber:s}));var S=Je(Je({},f),{},{pathFrom:o.pathFromLine,pathTo:o.linePaths[k],stroke:y,strokeWidth:this.strokeWidth,strokeLineCap:r.config.stroke.lineCap,fill:n==="rangeArea"?x:"none"}),E=a.renderPaths(S);if(this.elSeries.add(E),E.attr("fill-rule","evenodd"),c.count>0&&n!=="rangeArea"){var T=a.renderPaths(S);T.node.setAttribute("stroke-dasharray",c.dashArray),c.strokeWidth&&T.node.setAttribute("stroke-width",c.strokeWidth),this.elSeries.add(T),T.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),E.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){var n,s,i=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,b=e.linePaths,y=e.areaPaths,C=e.seriesIndex,k=e.lineYPosition,x=e.xArrj,S=e.yArrj,E=e.y2Arrj,T=e.isRangeStart,P=e.seriesRangeEnd,I=this.w,L=new Ve(this.ctx),V=this.yRatio,D=m.prevY,z=m.linePath,Y=m.areaPath,B=m.pathFromLine,U=m.pathFromArea,X=ue.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(re,ge){return ge-re/V[c]+2*(i.isReversed?re/V[c]:0)},N=h,F=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"||((s=this.w.config.series[l])===null||s===void 0?void 0:s.type)==="column"),Q=I.config.stroke.curve;Array.isArray(Q)&&(Q=Array.isArray(C)?Q[C[u]]:Q[u]);for(var ie,Z=0,me=0;me<a&&r[u].length!==0;me++){var Se=r[u][me+1]===void 0||r[u][me+1]===null;if(I.globals.isXNumeric){var we=I.globals.seriesX[l][me+1];I.globals.seriesX[l][me+1]===void 0&&(we=I.globals.seriesX[l][a-1]),d=(we-I.globals.minX)/this.xRatio}else d+=this.xDivision;F?u>0&&I.globals.collapsedSeries.length<I.config.series.length-1?k=this.prevSeriesY[function(re){for(var ge=re;ge>0;ge--){if(!(I.globals.collapsedSeriesIndices.indexOf((C==null?void 0:C[ge])||ge)>-1))return ge;ge--}return 0}(u-1)][me+1]:k=this.zeroY:k=this.zeroY,Se?h=K(X,k):(h=K(r[u][me+1],k),o==="rangeArea"&&(N=K(P[u][me+1],k))),x.push(r[u][me+1]===null?null:d),!Se||I.config.stroke.curve!=="smooth"&&I.config.stroke.curve!=="monotoneCubic"?(S.push(h),E.push(N)):(S.push(null),E.push(null));var oe=this.lineHelpers.calculatePoints({series:r,x:d,y:h,realIndex:l,i:u,j:me,prevY:D}),ce=this._createPaths({type:o,series:r,i:u,realIndex:l,j:me,x:d,y:h,y2:N,xArrj:x,yArrj:S,y2Arrj:E,pX:f,pY:p,pathState:Z,segmentStartX:ie,linePath:z,areaPath:Y,linePaths:b,areaPaths:y,curve:Q,isRangeStart:T});y=ce.areaPaths,b=ce.linePaths,f=ce.pX,p=ce.pY,Z=ce.pathState,ie=ce.segmentStartX,Y=ce.areaPath,z=ce.linePath,!this.appendPathFrom||I.globals.hasNullValues||Q==="monotoneCubic"&&o==="rangeArea"||(B+=L.line(d,this.areaBottomY),U+=L.line(d,this.areaBottomY)),this.handleNullDataPoints(r,oe,u,me,l),this._handleMarkersAndLabels({type:o,pointsPos:oe,i:u,j:me,realIndex:l,isRangeStart:T})}return{yArrj:S,xArrj:x,pathFromArea:U,areaPaths:y,pathFromLine:B,linePaths:b,linePath:z,areaPath:Y}}},{key:"_handleMarkersAndLabels",value:function(e){var n=e.type,s=e.pointsPos,i=e.isRangeStart,o=e.i,r=e.j,a=e.realIndex,l=this.w,c=new $f(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:a,pointsPos:s,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(s,a,r+1);u!==null&&this.elPointsMain.add(u)}var d=c.drawDataLabel({type:n,isRangeStart:i,pos:s,i:a,j:r+1});d!==null&&this.elDataLabelsWrap.add(d)}},{key:"_createPaths",value:function(e){var n=e.type,s=e.series,i=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,b=e.segmentStartX,y=e.linePath,C=e.areaPath,k=e.linePaths,x=e.areaPaths,S=e.curve,E=e.isRangeStart,T=new Ve(this.ctx),P=this.areaBottomY,I=n==="rangeArea",L=n==="rangeArea"&&E;switch(S){case"monotoneCubic":var V=E?u:h;switch(m){case 0:if(V[r+1]===null)break;m=1;case 1:if(!(I?c.length===s[i].length:r===s[i].length-2))break;case 2:var D=E?c:c.slice().reverse(),z=E?V:V.slice().reverse(),Y=(o=z,D.map(function(we,oe){return[we,o[oe]]}).filter(function(we){return we[1]!==null})),B=Y.length>1?t0t(Y):Y,U=[];I&&(L?x=Y:U=x.reverse());var X=0,K=0;if(function(we,oe){for(var ce=function(st){var ee=[],ne=0;return st.forEach(function(pe){pe!==null?ne++:ne>0&&(ee.push(ne),ne=0)}),ne>0&&ee.push(ne),ee}(we),re=[],ge=0,ze=0;ge<ce.length;ze+=ce[ge++])re[ge]=n0t(oe,ze,ze+ce[ge]);return re}(z,B).forEach(function(we){X++;var oe=function(ge){for(var ze="",st=0;st<ge.length;st++){var ee=ge[st],ne=ee.length;ne>4?(ze+="C".concat(ee[0],", ").concat(ee[1]),ze+=", ".concat(ee[2],", ").concat(ee[3]),ze+=", ".concat(ee[4],", ").concat(ee[5])):ne>2&&(ze+="S".concat(ee[0],", ").concat(ee[1]),ze+=", ".concat(ee[2],", ").concat(ee[3]))}return ze}(we),ce=K,re=(K+=we.length)-1;L?y=T.move(Y[ce][0],Y[ce][1])+oe:I?y=T.move(U[ce][0],U[ce][1])+T.line(Y[ce][0],Y[ce][1])+oe+T.line(U[re][0],U[re][1]):(y=T.move(Y[ce][0],Y[ce][1])+oe,C=y+T.line(Y[re][0],P)+T.line(Y[ce][0],P)+"z",x.push(C)),k.push(y)}),I&&X>1&&!L){var N=k.slice(X).reverse();k.splice(X),N.forEach(function(we){return k.push(we)})}m=0}break;case"smooth":var F=.35*(a-f);if(s[i][r]===null)m=0;else switch(m){case 0:if(b=f,y=L?T.move(f,h[r])+T.line(f,p):T.move(f,p),C=T.move(f,p),s[i][r+1]===null||s[i][r+1]===void 0){k.push(y),x.push(C);break}if(m=1,r<s[i].length-2){var Q=T.curve(f+F,p,a-F,l,a,l);y+=Q,C+=Q;break}case 1:if(s[i][r+1]===null)y+=L?T.line(f,d):T.move(f,p),C+=T.line(f,P)+T.line(b,P)+"z",k.push(y),x.push(C),m=-1;else{var ie=T.curve(f+F,p,a-F,l,a,l);y+=ie,C+=ie,r>=s[i].length-2&&(L&&(y+=T.curve(a,l,a,l,a,d)+T.move(a,d)),C+=T.curve(a,l,a,l,a,P)+T.line(b,P)+"z",k.push(y),x.push(C),m=-1)}}f=a,p=l;break;default:var Z=function(we,oe,ce){var re=[];switch(we){case"stepline":re=T.line(oe,null,"H")+T.line(null,ce,"V");break;case"linestep":re=T.line(null,ce,"V")+T.line(oe,null,"H");break;case"straight":re=T.line(oe,ce)}return re};if(s[i][r]===null)m=0;else switch(m){case 0:if(b=f,y=L?T.move(f,h[r])+T.line(f,p):T.move(f,p),C=T.move(f,p),s[i][r+1]===null||s[i][r+1]===void 0){k.push(y),x.push(C);break}if(m=1,r<s[i].length-2){var me=Z(S,a,l);y+=me,C+=me;break}case 1:if(s[i][r+1]===null)y+=L?T.line(f,d):T.move(f,p),C+=T.line(f,P)+T.line(b,P)+"z",k.push(y),x.push(C),m=-1;else{var Se=Z(S,a,l);y+=Se,C+=Se,r>=s[i].length-2&&(L&&(y+=T.line(a,d)),C+=T.line(a,P)+T.line(b,P)+"z",k.push(y),x.push(C),m=-1)}}f=a,p=l}return{linePaths:k,areaPaths:x,pX:f,pY:p,pathState:m,segmentStartX:b,linePath:y,areaPath:C}}},{key:"handleNullDataPoints",value:function(e,n,s,i,o){var r=this.w;if(e[s][i]===null&&r.config.markers.showNullDataPoints||e[s].length===1){var a=this.strokeWidth-r.config.markers.strokeWidth/2;a>0||(a=0);var l=this.markers.plotChartMarkers(n,o,i+1,a,!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,b=o(d)/this.height,y=o(d)/this.width;if(this.width>=this.height)for(h=0;h<d.length;h++)f.push([p,m,p+b,m+d[h]/b]),m+=d[h]/b;else for(h=0;h<d.length;h++)f.push([p,m,p+d[h]/y,m+y]),p+=d[h]/y;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,b=this.height-m;h=new t(this.xoffset,this.yoffset+m,this.width,b)}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,b=[],y=p/o(f);for(m=0;m<f.length;m++)b[m]=f[m]*y;return b}(a,l*c),[],new t(u,d,l,c),[]);return function(f){var p,m,b=[];for(p=0;p<f.length;p++)for(m=0;m<f[p].length;m++)b.push(f[p][m]);return b}(h)}function n(a,l,c,u){var d,h,f;if(a.length!==0)return d=c.shortestEdge(),function(p,m,b){var y;if(p.length===0)return!0;(y=p.slice()).push(m);var C=s(p,b),k=s(y,b);return C>=k}(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 s(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 i(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(i(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=[],b=[];if(i(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++)b.push(a(l[p],f[p][2]-f[p][0],f[p][3]-f[p][1],f[p][0],f[p][1]))}else b=e(l,c,u,d,h);return b}}();var s0t=function(){function t(e,n){at(this,t),this.ctx=e,this.w=e.w,this.strokeWidth=this.w.config.stroke.width,this.helpers=new aU(e),this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.labels=[]}return lt(t,[{key:"draw",value:function(e){var n=this,s=this.w,i=new Ve(this.ctx),o=new Mr(this.ctx),r=i.group({class:"apexcharts-treemap"});if(s.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(),s.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,s.globals.gridWidth,s.globals.gridHeight).forEach(function(l,c){var u=i.group({class:"apexcharts-series apexcharts-treemap-series",seriesName:ue.escapeString(s.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(s.config.chart.dropShadow.enabled){var d=s.config.chart.dropShadow;new Ws(n.ctx).dropShadow(r,d,c)}var h=i.group({class:"apexcharts-data-labels"});l.forEach(function(f,p){var m=f[0],b=f[1],y=f[2],C=f[3],k=i.drawRect(m,b,y-m,C-b,s.config.plotOptions.treemap.borderRadius,"#fff",1,n.strokeWidth,s.config.plotOptions.treemap.useFillColorAsStroke?S:s.globals.stroke.colors[c]);k.attr({cx:m,cy:b,index:c,i:c,j:p,width:y-m,height:C-b});var x=n.helpers.getShadeColor(s.config.chart.type,c,p,n.negRange),S=x.color,E=o.fillPath({color:S,seriesNumber:c,dataPointIndex:p});k.node.classList.add("apexcharts-treemap-rect"),k.attr({fill:E}),n.helpers.addListeners(k);var T={x:m+(y-m)/2,y:b+(C-b)/2,width:0,height:0},P={x:m,y:b,width:y-m,height:C-b};if(s.config.chart.animations.enabled&&!s.globals.dataChanged){var I=1;s.globals.resized||(I=s.config.chart.animations.speed),n.animateTreemap(k,T,P,I)}if(s.globals.dataChanged){var L=1;n.dynamicAnim.enabled&&s.globals.shouldAnimate&&(L=n.dynamicAnim.speed,s.globals.previousPaths[c]&&s.globals.previousPaths[c][p]&&s.globals.previousPaths[c][p].rect&&(T=s.globals.previousPaths[c][p].rect),n.animateTreemap(k,T,P,L))}var V=n.getFontSize(f),D=s.config.dataLabels.formatter(n.labels[c][p],{value:s.globals.series[c][p],seriesIndex:c,dataPointIndex:p,w:s});s.config.plotOptions.treemap.dataLabels.format==="truncate"&&(V=parseInt(s.config.dataLabels.style.fontSize,10),D=n.truncateLabels(D,V,m,b,y,C));var z=null;s.globals.series[c][p]&&(z=n.helpers.calculateDataLabels({text:D,x:(m+y)/2,y:(b+C)/2+n.strokeWidth/2+V/3,i:c,j:p,colorProps:x,fontSize:V,series:e})),s.config.dataLabels.enabled&&z&&n.rotateToFitLabel(z,V,D,m,b,y,C),u.add(k),z!==null&&u.add(z)}),u.add(h),r.add(u)}),r}},{key:"getFontSize",value:function(e){var n=this.w,s=function i(o){var r,a=0;if(Array.isArray(o[0]))for(r=0;r<o.length;r++)a+=i(o[r]);else for(r=0;r<o.length;r++)a+=o[r].length;return a}(this.labels)/function i(o){var r,a=0;if(Array.isArray(o[0]))for(r=0;r<o.length;r++)a+=i(o[r]);else for(r=0;r<o.length;r++)a+=1;return a}(this.labels);return function(i,o){var r=i*o,a=Math.pow(r,.5);return Math.min(a/s,parseInt(n.config.dataLabels.style.fontSize,10))}(e[2]-e[0],e[3]-e[1])}},{key:"rotateToFitLabel",value:function(e,n,s,i,o,r,a){var l=new Ve(this.ctx),c=l.getTextRects(s,n);if(c.width+this.w.config.stroke.width+5>r-i&&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,s,i,o,r){var a=new Ve(this.ctx),l=a.getTextRects(e,n).width+this.w.config.stroke.width+5>o-s&&r-i>o-s?r-i:o-s,c=a.getTextBasedOnMaxWidth({text:e,maxWidth:l,fontSize:n});return e.length!==c.length&&l/n<5?"":c}},{key:"animateTreemap",value:function(e,n,s,i){var o=new sp(this.ctx);o.animateRect(e,{x:n.x,y:n.y,width:n.width,height:n.height},{x:s.x,y:s.y,width:s.width,height:s.height},i,function(){o.animationCompleted(e)})}}]),t}(),uU=86400,i0t=10/uU,o0t=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return lt(t,[{key:"calculateTimeScaleTicks",value:function(e,n){var s=this,i=this.w;if(i.globals.allSeriesCollapsed)return i.globals.labels=[],i.globals.timescaleLabels=[],[];var o=new zs(this.ctx),r=(n-e)/864e5;this.determineInterval(r),i.globals.disableZoomIn=!1,i.globals.disableZoomOut=!1,r<i0t?i.globals.disableZoomIn=!0:r>5e4&&(i.globals.disableZoomOut=!0);var a=o.getTimeUnitsfromTimestamp(e,n,this.utc),l=i.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*uU),m=Math.floor(r),b=Math.floor(r/30),y=Math.floor(r/365),C={minMillisecond:a.minMillisecond,minSecond:a.minSecond,minMinute:a.minMinute,minHour:a.minHour,minDate:a.minDate,minMonth:a.minMonth,minYear:a.minYear},k={firstVal:C,currentMillisecond:C.minMillisecond,currentSecond:C.minSecond,currentMinute:C.minMinute,currentHour:C.minHour,currentMonthDate:C.minDate,currentDate:C.minDate,currentMonth:C.minMonth,currentYear:C.minYear,daysWidthOnXAxis:l,hoursWidthOnXAxis:c,minutesWidthOnXAxis:u,secondsWidthOnXAxis:d,numberOfSeconds:p,numberOfMinutes:f,numberOfHours:h,numberOfDays:m,numberOfMonths:b,numberOfYears:y};switch(this.tickInterval){case"years":this.generateYearScale(k);break;case"months":case"half_year":this.generateMonthScale(k);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(k);break;case"hours":this.generateHourScale(k);break;case"minutes_fives":case"minutes":this.generateMinuteScale(k);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(k)}var x=this.timeScaleArray.map(function(S){var E={position:S.position,unit:S.unit,year:S.year,day:S.day?S.day:1,hour:S.hour?S.hour:0,month:S.month+1};return S.unit==="month"?Je(Je({},E),{},{day:1,value:S.value+1}):S.unit==="day"||S.unit==="hour"?Je(Je({},E),{},{value:S.value}):S.unit==="minute"?Je(Je({},E),{},{value:S.value,minute:S.value}):S.unit==="second"?Je(Je({},E),{},{value:S.value,minute:S.minute,second:S.second}):S});return x.filter(function(S){var E=1,T=Math.ceil(i.globals.gridWidth/120),P=S.value;i.config.xaxis.tickAmount!==void 0&&(T=i.config.xaxis.tickAmount),x.length>T&&(E=Math.floor(x.length/T));var I=!1,L=!1;switch(s.tickInterval){case"years":S.unit==="year"&&(I=!0);break;case"half_year":E=7,S.unit==="year"&&(I=!0);break;case"months":E=1,S.unit==="year"&&(I=!0);break;case"months_fortnight":E=15,S.unit!=="year"&&S.unit!=="month"||(I=!0),P===30&&(L=!0);break;case"months_days":E=10,S.unit==="month"&&(I=!0),P===30&&(L=!0);break;case"week_days":E=8,S.unit==="month"&&(I=!0);break;case"days":E=1,S.unit==="month"&&(I=!0);break;case"hours":S.unit==="day"&&(I=!0);break;case"minutes_fives":case"seconds_fives":P%5!=0&&(L=!0);break;case"seconds_tens":P%10!=0&&(L=!0)}if(s.tickInterval==="hours"||s.tickInterval==="minutes_fives"||s.tickInterval==="seconds_tens"||s.tickInterval==="seconds_fives"){if(!L)return!0}else if((P%E==0||I)&&!L)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(e,n){var s=this.w,i=this.formatDates(e),o=this.removeOverlappingTS(i);s.globals.timescaleLabels=o.slice(),new fy(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var n=24*e,s=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 s>15:this.tickInterval="minutes_fives";break;case s>5:this.tickInterval="minutes";break;case s>1:this.tickInterval="seconds_tens";break;case 60*s>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(e){var n=e.firstVal,s=e.currentMonth,i=e.currentYear,o=e.daysWidthOnXAxis,r=e.numberOfYears,a=n.minYear,l=0,c=new zs(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:ue.monthMod(s+1)})}else n.minDate===1&&n.minMonth===0&&this.timeScaleArray.push({position:l,value:a,unit:u,year:i,month:ue.monthMod(s+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,s=e.currentMonthDate,i=e.currentMonth,o=e.currentYear,r=e.daysWidthOnXAxis,a=e.numberOfMonths,l=i,c=0,u=new zs(this.ctx),d="month",h=0;if(n.minDate>1){c=(u.determineDaysOfMonths(i+1,n.minYear)-s+1)*r,l=ue.monthMod(i+1);var f=o+h,p=ue.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:ue.monthMod(i)});for(var b=l+1,y=c,C=0,k=1;C<a;C++,k++){(b=ue.monthMod(b))===0?(d="year",h+=1):d="month";var x=this._getYear(o,b,h);y=u.determineDaysOfMonths(b,x)*r+y;var S=b===0?x:b;this.timeScaleArray.push({position:y,value:S,unit:d,year:x,month:b===0?1:b}),b++}}},{key:"generateDayScale",value:function(e){var n=e.firstVal,s=e.currentMonth,i=e.currentYear,o=e.hoursWidthOnXAxis,r=e.numberOfDays,a=new zs(this.ctx),l="day",c=n.minDate+1,u=c,d=function(k,x,S){return k>a.determineDaysOfMonths(x+1,S)&&(u=1,l="month",f=x+=1),x},h=(24-n.minHour)*o,f=c,p=d(u,s,i);n.minHour===0&&n.minDate===1?(h=0,f=ue.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,s,i),f!==1&&(l="day")),this.timeScaleArray.push({position:h,value:f,unit:l,year:this._getYear(i,p,0),month:ue.monthMod(p),day:u});for(var m=h,b=0;b<r;b++){l="day",p=d(u+=1,p,this._getYear(i,p,0));var y=this._getYear(i,p,0);m=24*o+m;var C=u===1?ue.monthMod(p):u;this.timeScaleArray.push({position:m,value:C,unit:l,year:y,month:ue.monthMod(p),day:C})}}},{key:"generateHourScale",value:function(e){var n=e.firstVal,s=e.currentDate,i=e.currentMonth,o=e.currentYear,r=e.minutesWidthOnXAxis,a=e.numberOfHours,l=new zs(this.ctx),c="hour",u=function(E,T){return E>l.determineDaysOfMonths(T+1,o)&&(b=1,T+=1),{month:T,date:b}},d=function(E,T){return E>l.determineDaysOfMonths(T+1,o)?T+=1:T},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 b=s;m>=24&&(m=0,c="day",p=b+=1);var y=u(b,i).month;y=d(b,y),p>31&&(p=b=1),this.timeScaleArray.push({position:f,value:p,unit:c,day:b,hour:m,year:o,month:ue.monthMod(y)}),m++;for(var C=f,k=0;k<a;k++){c="hour",m>=24&&(m=0,c="day",y=u(b+=1,y).month,y=d(b,y));var x=this._getYear(o,y,0);C=60*r+C;var S=m===0?b:m;this.timeScaleArray.push({position:C,value:S,unit:c,hour:m,day:b,year:x,month:ue.monthMod(y)}),m++}}},{key:"generateMinuteScale",value:function(e){for(var n=e.currentMillisecond,s=e.currentSecond,i=e.currentMinute,o=e.currentHour,r=e.currentDate,a=e.currentMonth,l=e.currentYear,c=e.minutesWidthOnXAxis,u=e.secondsWidthOnXAxis,d=e.numberOfMinutes,h=i+1,f=r,p=a,m=l,b=o,y=(60-s-n/1e3)*u,C=0;C<d;C++)h>=60&&(h=0,(b+=1)===24&&(b=0)),this.timeScaleArray.push({position:y,value:h,unit:"minute",hour:b,minute:h,day:f,year:this._getYear(m,p,0),month:ue.monthMod(p)}),y+=c,h++}},{key:"generateSecondScale",value:function(e){for(var n=e.currentMillisecond,s=e.currentSecond,i=e.currentMinute,o=e.currentHour,r=e.currentDate,a=e.currentMonth,l=e.currentYear,c=e.secondsWidthOnXAxis,u=e.numberOfSeconds,d=s+1,h=i,f=r,p=a,m=l,b=o,y=(1e3-n)/1e3*c,C=0;C<u;C++)d>=60&&(d=0,++h>=60&&(h=0,++b===24&&(b=0))),this.timeScaleArray.push({position:y,value:d,unit:"second",hour:b,minute:h,second:d,day:f,year:this._getYear(m,p,0),month:ue.monthMod(p)}),y+=c,d++}},{key:"createRawDateString",value:function(e,n){var s=e.year;return e.month===0&&(e.month=1),s+="-"+("0"+e.month.toString()).slice(-2),e.unit==="day"?s+=e.unit==="day"?"-"+("0"+n).slice(-2):"-01":s+="-"+("0"+(e.day?e.day:"1")).slice(-2),e.unit==="hour"?s+=e.unit==="hour"?"T"+("0"+n).slice(-2):"T00":s+="T"+("0"+(e.hour?e.hour:"0")).slice(-2),e.unit==="minute"?s+=":"+("0"+n).slice(-2):s+=":"+(e.minute?("0"+e.minute).slice(-2):"00"),e.unit==="second"?s+=":"+("0"+n).slice(-2):s+=":00",this.utc&&(s+=".000Z"),s}},{key:"formatDates",value:function(e){var n=this,s=this.w;return e.map(function(i){var o=i.value.toString(),r=new zs(n.ctx),a=n.createRawDateString(i,o),l=r.getDate(r.parseDate(a));if(n.utc||(l=r.getDate(r.parseDateWithTimezone(a))),s.config.xaxis.labels.format===void 0){var c="dd MMM",u=s.config.xaxis.labels.datetimeFormatter;i.unit==="year"&&(c=u.year),i.unit==="month"&&(c=u.month),i.unit==="day"&&(c=u.day),i.unit==="hour"&&(c=u.hour),i.unit==="minute"&&(c=u.minute),i.unit==="second"&&(c=u.second),o=r.formatDate(l,c)}else o=r.formatDate(l,s.config.xaxis.labels.format);return{dateString:a,position:i.position,value:o,unit:i.unit,year:i.year,month:i.month}})}},{key:"removeOverlappingTS",value:function(e){var n,s=this,i=new Ve(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=i.getTextRects(e[0].value).width);var r=0,a=e.map(function(l,c){if(c>0&&s.w.config.xaxis.labels.hideOverlappingLabels){var u=o?n:i.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,s){return e+Math.floor(n/12)+s}}]),t}(),r0t=function(){function t(e,n){at(this,t),this.ctx=n,this.w=n.w,this.el=e}return lt(t,[{key:"setupElements",value:function(){var e=this.w,n=e.globals,s=e.config,i=s.chart.type;n.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(i),n.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(i),n.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(i)&&s.plotOptions.bar.horizontal,n.chartClass=".apexcharts".concat(n.chartID),n.dom.baseEl=this.el,n.dom.elWrap=document.createElement("div"),Ve.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(s.chart.offsetX,", ").concat(s.chart.offsetY,")")}),n.dom.Paper.node.style.background=s.theme.mode!=="dark"||s.chart.background?s.theme.mode!=="light"||s.chart.background?s.chart.background:"#fff":"#424242",this.setSVGDimensions(),n.dom.elLegendForeign=document.createElementNS(n.SVGNS,"foreignObject"),Ve.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 s=this.w,i=this.ctx,o=s.config,r=s.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(E,T){var P=e[T].type||l;a[P]?(P==="rangeArea"?(a[P].series.push(r.seriesRangeStart[T]),a[P].seriesRangeEnd.push(r.seriesRangeEnd[T])):a[P].series.push(E),a[P].i.push(T),P!=="column"&&P!=="bar"||(s.globals.columnSeries=a.column)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(P)?c=P:P==="bar"?(a.column.series.push(E),a.column.i.push(T)):console.warn("You have specified an unrecognized series type (".concat(P,").")),l!==P&&P!=="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:[]},s.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 c3(i,n),h=new a3(i,n);i.pie=new cU(i);var f=new Z1t(i);i.rangeBar=new J1t(i,n);var p=new K1t(i),m=[];if(r.comboCharts){var b,y,C=new rs(i);if(a.area.series.length>0&&(b=m).push.apply(b,Cs(C.drawSeriesByGroup(a.area,r.areaGroups,"area",d))),a.column.series.length>0)if(o.chart.stacked){var k=new qE(i,n);m.push(k.draw(a.column.series,a.column.i))}else i.bar=new Af(i,n),m.push(i.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&&(y=m).push.apply(y,Cs(C.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(i.rangeBar.draw(a.rangeBar.series,a.rangeBar.i)),a.scatter.series.length>0){var x=new c3(i,n,!0);m.push(x.draw(a.scatter.series,"scatter",a.scatter.i))}if(a.bubble.series.length>0){var S=new c3(i,n,!0);m.push(S.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 qE(i,n).draw(r.series):(i.bar=new Af(i,n),m=i.bar.draw(r.series));break;case"candlestick":m=new a3(i,n).draw(r.series,"candlestick");break;case"boxPlot":m=new a3(i,n).draw(r.series,o.chart.type);break;case"rangeBar":m=i.rangeBar.draw(r.series);break;case"rangeArea":m=d.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":m=new X1t(i,n).draw(r.series);break;case"treemap":m=new s0t(i,n).draw(r.series);break;case"pie":case"donut":case"polarArea":m=i.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,s=e.config;s.chart.width=s.chart.width||"100%",s.chart.height=s.chart.height||"auto",n.svgWidth=s.chart.width,n.svgHeight=s.chart.height;var i=ue.getDimensions(this.el),o=s.chart.width.toString().split(/[0-9]+/g).pop();o==="%"?ue.isNumber(i[0])&&(i[0].width===0&&(i=ue.getDimensions(this.el.parentNode)),n.svgWidth=i[0]*parseInt(s.chart.width,10)/100):o!=="px"&&o!==""||(n.svgWidth=parseInt(s.chart.width,10));var r=String(s.chart.height).toString().split(/[0-9]+/g).pop();if(n.svgHeight!=="auto"&&n.svgHeight!=="")if(r==="%"){var a=ue.getDimensions(this.el.parentNode);n.svgHeight=a[1]*parseInt(s.chart.height,10)/100}else n.svgHeight=parseInt(s.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),Ve.setAttrs(n.dom.Paper.node,{width:n.svgWidth,height:n.svgHeight}),r!=="%"){var l=s.chart.sparkline.enabled?0:n.axisCharts?s.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,s=e.translateX;Ve.setAttrs(e.dom.elGraphical.node,{transform:"translate(".concat(s,", ").concat(n,")")})}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,n=e.globals,s=0,i=e.config.chart.sparkline.enabled?1:15;i+=e.config.grid.padding.bottom,["top","bottom"].includes(e.config.legend.position)&&e.config.legend.show&&!e.config.legend.floating&&(s=new sU(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=ue.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+s+i);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"),Ve.setAttrs(n.dom.Paper.node,{height:c}),n.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(c,"px"))}},{key:"coreCalculations",value:function(){new ek(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,n=function(){return e.w.config.series.map(function(){return[]})},s=new QH,i=this.w.globals;s.initGlobalVars(i),i.seriesXvalues=n(),i.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 tk(this.ctx).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position==="back"&&new tk(this.ctx).drawYCrosshairs(),e.config.xaxis.type==="datetime"&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new o0t(this.ctx);var s=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?s=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(s=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(s)}n=new rs(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,s=this.w;if(s.config.chart.brush.enabled&&typeof s.config.chart.events.selection!="function"){var i=Array.isArray(s.config.chart.brush.targets)?s.config.chart.brush.targets:[s.config.chart.brush.target];i.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)})}),s.config.chart.events.selection=function(o,r){i.forEach(function(a){n.constructor.getChartByID(a).ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max}},!1,!1,!1,!1)})}}}}]),t}(),a0t=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(t,[{key:"_updateOptions",value:function(e){var n=this,s=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=!(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=i,s||(d.globals.resized=!0,d.globals.dataChanged=!0,i&&c.series.getPreviousPaths()),e&&Sf(e)==="object"&&(c.config=new Vg(e),e=rs.extendArrayProps(c.config,e,d),c.w.globals.chartID!==n.ctx.w.globals.chartID&&delete e.series,d.config=ue.extend(d.config,e),r&&(d.globals.lastXAxis=e.xaxis?ue.clone(e.xaxis):[],d.globals.lastYAxis=e.yaxis?ue.clone(e.yaxis):[],d.globals.initialConfig=ue.extend({},d.config),d.globals.initialSeries=ue.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 s=this,i=arguments.length>2&&arguments[2]!==void 0&&arguments[2];return new Promise(function(o){var r,a=s.w;return a.globals.shouldAnimate=n,a.globals.dataChanged=!0,n&&s.ctx.series.getPreviousPaths(),a.globals.axisCharts?((r=e.map(function(l,c){return s._extendSeries(l,c)})).length===0&&(r=[{data:[]}]),a.config.series=r):a.config.series=e.slice(),i&&(a.globals.initialConfig.series=ue.clone(a.config.series),a.globals.initialSeries=ue.clone(a.config.series)),s.ctx.update().then(function(){o(s.ctx)})})}},{key:"_extendSeries",value:function(e,n){var s=this.w,i=s.config.series[n];return Je(Je({},s.config.series[n]),{},{name:e.name?e.name:i==null?void 0:i.name,color:e.color?e.color:i==null?void 0:i.color,type:e.type?e.type:i==null?void 0:i.type,group:e.group?e.group:i==null?void 0:i.group,hidden:e.hidden!==void 0?e.hidden:i==null?void 0:i.hidden,data:e.data?e.data:i==null?void 0:i.data,zIndex:e.zIndex!==void 0?e.zIndex:n})}},{key:"toggleDataPointSelection",value:function(e,n){var s=this.w,i=null,o=".apexcharts-series[data\\:realIndex='".concat(e,"']");return s.globals.axisCharts?i=s.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&&(i=s.globals.dom.Paper.findOne("".concat(o," path[j='").concat(e,"']")),s.config.chart.type!=="pie"&&s.config.chart.type!=="polarArea"&&s.config.chart.type!=="donut"||this.ctx.pie.pieClicked(e)),i?(new Ve(this.ctx).pathMouseDown(i,null),i.node?i.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var n=this.w;if(["min","max"].forEach(function(i){e.xaxis[i]!==void 0&&(n.config.xaxis[i]=e.xaxis[i],n.globals.lastXAxis[i]=e.xaxis[i])}),e.xaxis.categories&&e.xaxis.categories.length&&(n.config.xaxis.categories=e.xaxis.categories),n.config.xaxis.convertedCatToNumeric){var s=new Rg(e);e=s.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,s){e.yaxis[s].min=0,e.yaxis[s].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"revertDefaultAxisMinMax",value:function(e){var n=this,s=this.w,i=s.globals.lastXAxis,o=s.globals.lastYAxis;e&&e.xaxis&&(i=e.xaxis),e&&e.yaxis&&(o=e.yaxis),s.config.xaxis.min=i.min,s.config.xaxis.max=i.max;var r=function(a){o[a]!==void 0&&(s.config.yaxis[a].min=o[a].min,s.config.yaxis[a].max=o[a].max)};s.config.yaxis.map(function(a,l){s.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]},b={pos:[0,0],start:[0,0]};h[p]=e.call(m,h[p]),f[p]=e.call(b,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(s.call(m,h[p]))),Array.prototype.splice.apply(f,[p,1].concat(s.call(b,f[p])))):(h[p]=n.call(m,h[p]),f[p]=n.call(b,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",b.pos[0],b.pos[1],b.pos[0],b.pos[1],b.pos[0],b.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 s(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,b,y,C,k,x,S,E,T,P,I,L,V,D,z,Y,B,U,X,K,N=Math.abs(l[1]),F=Math.abs(l[2]),Q=l[3]%360,ie=l[4],Z=l[5],me=l[6],Se=l[7],we=new An(a),oe=new An(me,Se),ce=[];if(N===0||F===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 An((we.x-oe.x)/2,(we.y-oe.y)/2).transform(new Kt().rotate(Q)),u=c.x*c.x/(N*N)+c.y*c.y/(F*F),u>1&&(N*=u=Math.sqrt(u),F*=u),d=new Kt().rotate(Q).scale(1/N,1/F).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,ie===Z&&(m*=-1),b=new An((oe.x+we.x)/2+m*-h[1],(oe.y+we.y)/2+m*h[0]),y=new An(we.x-b.x,we.y-b.y),C=new An(oe.x-b.x,oe.y-b.y),k=Math.acos(y.x/Math.sqrt(y.x*y.x+y.y*y.y)),y.y<0&&(k*=-1),x=Math.acos(C.x/Math.sqrt(C.x*C.x+C.y*C.y)),C.y<0&&(x*=-1),Z&&k>x&&(x+=2*Math.PI),!Z&&k<x&&(x-=2*Math.PI),E=Math.ceil(2*Math.abs(k-x)/Math.PI),P=[],I=k,S=(x-k)/E,T=4*Math.tan(S/4)/3,z=0;z<=E;z++)V=Math.cos(I),L=Math.sin(I),D=new An(b.x+V,b.y+L),P[z]=[new An(D.x+T*L,D.y-T*V),D,new An(D.x-T*L,D.y+T*V)],I+=S;for(P[0][0]=P[0][1].clone(),P[P.length-1][2]=P[P.length-1][1].clone(),d=new Kt().rotate(Q).scale(N,F).rotate(-Q),z=0,Y=P.length;z<Y;z++)P[z][0]=P[z][0].transform(d),P[z][1]=P[z][1].transform(d),P[z][2]=P[z][2].transform(d);for(z=1,Y=P.length;z<Y;z++)B=(D=P[z-1][2]).x,U=D.y,X=(D=P[z][0]).x,K=D.y,me=(D=P[z][1]).x,Se=D.y,ce.push(["C",B,U,X,K,me,Se]);return ce}(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 i(){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}bt(gr,{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 b;p=i(u,h!==!1&&h+1),m=i(d,f!==!1&&f+1),h===!1&&(h=(b=new gr(y.start).bbox()).height==0||b.width==0?u.push(u[0])-1:u.push(["M",b.x+b.width/2,b.y+b.height/2])-1),f===!1&&(f=(b=new gr(y.dest).bbox()).height==0||b.width==0?d.push(d[0])-1:d.push(["M",b.x+b.width/2,b.y+b.height/2])-1);var y=t(u,h,p,d,f,m);u=u.slice(0,h).concat(y.start,p===!1?[]:u.slice(p)),d=d.slice(0,f).concat(y.dest,m===!1?[]:d.slice(m)),h=p!==!1&&h+y.start.length,f=m!==!1&&f+y.dest.length}this._array=u,this.destination=new gr,this.destination._array=d;var C=this.fromArray(u.map(function(k,x){var S=d[x].map(function(E,T){return T===0?E:l.step(k[T],d[x][T],a,c[x],c)});return S}));return C}})})();const XE=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class l0t{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(XE(e));const s=(n?"mouseup":"touchend")+".drag";Za(window,(n?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),Za(window,s,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:e,handler:this,box:this.box})}drag(e){const{box:n,lastClick:s}=this,i=this.el.point(XE(e)),o=i.x-s.x,r=i.y-s.y;if(!o&&!r)return n;const a=n.x+o,l=n.y+r;this.box=new As(a,l,n.w,n.h),this.lastClick=i,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}),jo(window,"mousemove.drag"),jo(window,"touchmove.drag"),jo(window,"mouseup.drag"),jo(window,"touchend.drag"),this.init(!0)}}/*! | |
| 279 | + .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}(),uyt=function(){function t(e){lt(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new _j(e)}return ct(t,[{key:"drawDynamicPoints",value:function(){var e=this.w,n=new Ne(this.ctx),i=new Rp(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(he.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}(),dyt=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=he.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 S=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=S-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}(),hyt=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}(),WT=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 vj(this),this.tooltipLabels=new cyt(this),this.tooltipPosition=new _j(this),this.marker=new uyt(this),this.intersect=new dyt(this),this.axesTooltip=new hyt(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 k1(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.backgroundColor=i.globals.colors[l],c.appendChild(u);var d=document.createElement("div");d.classList.add("apexcharts-tooltip-text"),d.style.fontFamily=n.tConfig.style.fontFamily||i.config.chart.fontFamily,d.style.fontSize=n.tConfig.style.fontSize,["y","goals","z"].forEach(function(h){var f=document.createElement("div");f.classList.add("apexcharts-tooltip-".concat(h,"-group"));var p=document.createElement("span");p.classList.add("apexcharts-tooltip-text-".concat(h,"-label")),f.appendChild(p);var m=document.createElement("span");m.classList.add("apexcharts-tooltip-text-".concat(h,"-value")),f.appendChild(m),d.appendChild(f)}),c.appendChild(d),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 gr(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 Ne(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,$,S,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,B=Array.from(this.legendLabels);B.forEach(function(Z){var ae=Z.getAttribute("data:default-text");Z.innerHTML=decodeURIComponent(ae)});for(var F=0;F<B.length;F++){var z=B[F],U=parseInt(z.getAttribute("i"),10),G=decodeURIComponent(z.getAttribute("data:default-text")),K=V(G,{seriesIndex:M?U:i,dataPointIndex:s,w:P});if(M)z.innerHTML=P.globals.collapsedSeriesIndices.indexOf(U)<0?K:G;else if(z.innerHTML=U===i?K:G,i===U)break}}var X=tt(tt({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||(S=$.y[0])===null||S===void 0?void 0:S.y2});if(M){if(T.tooltipLabels.drawSeriesTexts(tt(tt({},X),{},{shared:!this.showOnIntersect&&this.tConfig.shared})),I)R();else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var W=new Ne(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++)W.pathMouseEnter(Q[ne])}}else T.tooltipLabels.drawSeriesTexts(tt({shared:!1},X)),this.tooltipUtil.hasBars()&&T.tooltipPosition.moveStickyTooltipOverBars(s,i),I&&T.tooltipPosition.moveMarkers(i,s)}}]),t}(),fyt=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 Ne(this.barCtx.ctx),S=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))-S):(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,B=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,U={width:0,height:0};if(C.config.dataLabels.enabled){var G=C.globals.series[l][c];U=$.getTextRects(C.config.dataLabels.formatter?C.config.dataLabels.formatter(G,tt(tt({},C),{},{seriesIndex:l,dataPointIndex:c,w:C})):C.globals.yLabelFormatters[0](G),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:U,strokeWidth:S,dataLabelsX:T,dataLabelsY:I,dataLabelsConfig:R,barDataLabelsConfig:V,barTotalDataLabelsConfig:B,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:U,dataLabelsConfig:R}),C.config.chart.stacked&&B.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:B})),{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,tt(tt({},s),{},{seriesIndex:n,dataPointIndex:i,w:s}))),o}},{key:"calculateColumnsDataLabelsPosition",value:function(e){var n=this.w,i=e.i,s=e.j,o=e.realIndex;e.columnGroupIndex;var r,a,l=e.y,c=e.bcx,u=e.barWidth,d=e.barHeight,h=e.textRects,f=e.dataLabelsX,p=e.dataLabelsY,m=e.dataLabelsConfig,y=e.barDataLabelsConfig,b=e.barTotalDataLabelsConfig,k=e.strokeWidth,C=e.offX,$=e.offY,S=c;d=Math.abs(d);var M=n.config.plotOptions.bar.dataLabels.orientation==="vertical",P=this.barCtx.barHelpers.getZeroValueEncounters({i,j:s}).zeroEncounters;c-=k/2;var T=n.globals.gridWidth/n.globals.dataPoints;this.barCtx.isVerticalGroupedRangeBar?f+=u/2:(f=n.globals.isXNumeric?c-u/2+C:c-T+u/2+C,P>0&&n.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=u*P)),M&&(f=f+h.height/2-k/2-2);var I=n.globals.series[i][s]<0,L=l;switch(this.barCtx.isReversed&&(L=l+(I?d:-d)),y.position){case"center":p=M?I?L-d/2+$:L+d/2-$:I?L-d/2+h.height/2+$:L+d/2+h.height/2-$;break;case"bottom":p=M?I?L-d+$:L+d-$:I?L-d+h.height+k+$:L+d-h.height/2+k-$;break;case"top":p=M?I?L+$:L-$:I?L-h.height/2-$:L+h.height+$}if(this.barCtx.lastActiveBarSerieIndex===o&&b.enabled){var R=new Ne(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:s}),m.fontSize);r=I?L-R.height/2-$-b.offsetY+18:L+R.height+$+b.offsetY-18;var V=T;a=S+(n.globals.isXNumeric?-u*n.globals.barGroups.length/2:n.globals.barGroups.length*u/2-(n.globals.barGroups.length-1)*u-V)+b.offsetX}return n.config.chart.stacked||(p<0?p=0+k:p+h.height/3>n.globals.gridHeight&&(p=n.globals.gridHeight-k)),{bcx:c,bcy:l,dataLabelsX:f,dataLabelsY:p,totalDataLabelsX:a,totalDataLabelsY:r,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var n=this.w,i=e.x,s=e.i,o=e.j,r=e.realIndex,a=e.bcy,l=e.barHeight,c=e.barWidth,u=e.textRects,d=e.dataLabelsX,h=e.strokeWidth,f=e.dataLabelsConfig,p=e.barDataLabelsConfig,m=e.barTotalDataLabelsConfig,y=e.offX,b=e.offY,k=n.globals.gridHeight/n.globals.dataPoints;c=Math.abs(c);var C,$,S=a-(this.barCtx.isRangeBar?0:k)+l/2+u.height/2+b-3,M="start",P=n.globals.series[s][o]<0,T=i;switch(this.barCtx.isReversed&&(T=i+(P?-c:c),M=P?"start":"end"),p.position){case"center":d=P?T+c/2-y:Math.max(u.width/2,T-c/2)+y;break;case"bottom":d=P?T+c-h-y:T-c+h+y;break;case"top":d=P?T-h-y:T-h+y}if(this.barCtx.lastActiveBarSerieIndex===r&&m.enabled){var I=new Ne(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:o}),f.fontSize);P?(C=T-h-y-m.offsetX,M="end"):C=T+y+m.offsetX+(this.barCtx.isReversed?-(c+h):h),$=S-u.height/2+I.height/2+m.offsetY+h}return n.config.chart.stacked||(f.textAnchor==="start"?d-u.width<0?d=P?u.width+h:h:d+u.width>n.globals.gridWidth&&(d=P?n.globals.gridWidth-h:n.globals.gridWidth-u.width-h):f.textAnchor==="middle"?d-u.width/2<0?d=u.width/2+h:d+u.width/2>n.globals.gridWidth&&(d=n.globals.gridWidth-u.width/2-h):f.textAnchor==="end"&&(d<1?d=u.width+h:d+1>n.globals.gridWidth&&(d=n.globals.gridWidth-u.width-h))),{bcx:i,bcy:a,dataLabelsX:d,dataLabelsY:S,totalDataLabelsX:C,totalDataLabelsY:$,totalDataLabelsAnchor:M}}},{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 np(this.barCtx.ctx),p=new Ne(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,tt(tt({},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 S=tt({},u);this.barCtx.isHorizontal&&s<0&&(u.textAnchor==="start"?S.textAnchor="end":u.textAnchor==="end"&&(S.textAnchor="start")),f.plotDataLabelsText({x:n,y:i,text:k,i:o,j:r,parent:y,dataLabelsConfig:S,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 Ne(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}(),pyt=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(){var e,n,i,s,o,r,a,l,c=this.w,u=c.globals.dataPoints;this.barCtx.isRangeBar&&(u=c.globals.labels.length);var d=this.barCtx.seriesLen;if(c.config.plotOptions.bar.rangeBarGroupRows&&(d=1),this.barCtx.isHorizontal)o=(i=c.globals.gridHeight/u)/d,c.globals.isXNumeric&&(o=(i=c.globals.gridHeight/this.barCtx.totalItems)/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,String(this.barCtx.barOptions.barHeight).indexOf("%")===-1&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),l=this.barCtx.baseLineInvertedY+c.globals.padHorizontal+(this.barCtx.isReversed?c.globals.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(l=c.globals.gridWidth/2),n=(i-o*this.barCtx.seriesLen)/2;else{if(s=c.globals.gridWidth/this.barCtx.visibleItems,c.config.xaxis.convertedCatToNumeric&&(s=c.globals.gridWidth/c.globals.dataPoints),r=s/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100,c.globals.isXNumeric){var h=this.barCtx.xRatio;c.globals.minXDiff&&c.globals.minXDiff!==.5&&c.globals.minXDiff/h>0&&(s=c.globals.minXDiff/h),(r=s/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),a=c.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?c.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e=c.globals.padHorizontal+he.noExponents(s-r*this.barCtx.seriesLen)/2}return c.globals.barHeight=o,c.globals.barWidth=r,{x:e,y:n,yDivision:i,xDivision:s,barHeight:o,barWidth:r,zeroH:a,zeroW:l}}},{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=Am(c);try{for(b.s();!(p=b.n()).done;){var k=p.value;a[k][l]=k===m?"bottom":k===y?"top":"none"}}catch(U){b.e(U)}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),S=Math.min.apply(Math,u),M=Am(u);try{for(M.s();!(C=M.n()).done;){var P=C.value;a[P][l]=P===$?"bottom":P===S?"top":"none"}}catch(U){M.e(U)}finally{M.f()}}else if(c.length>0&&u.length>0){var T,I=c[c.length-1],L=Am(c);try{for(L.s();!(T=L.n()).done;){var R=T.value;a[R][l]=R===I?"top":"none"}}catch(U){L.e(U)}finally{L.f()}var V,B=Math.max.apply(Math,u),F=Am(u);try{for(F.s();!(V=F.n()).done;){var z=V.value;a[z][l]=z===B?"bottom":"none"}}catch(U){F.e(U)}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 Ne(this.barCtx.ctx),d=new gr(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 Ne(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,S=(c[h][f]>=0?1:-1)*(l?-1:1);o+=.001-k*S,r+=.001+k*S;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*S),I.yArrjF.push(Math.abs(o-r+a*S)),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 Ne(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,S=(c[h][f]>=0?1:-1)*(l?-1:1);o+=.001+k*S,r+=.001-k*S;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*S),I.xArrjF.push(Math.abs(o-r-a*S)),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((Zy(m={},e,e==="x"?a.getXForValue(f,n,!1):a.getYForValue(f,i,r,!1)),Zy(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],tt(tt({},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 Ne(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 Ne(this.barCtx.ctx),p=new he,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,he.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}(),sp=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 gr(this.ctx);this.lastActiveBarSerieIndex=s.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var o=s.getBarSeriesIndices(),r=new ys(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 pyt(this)}return ct(t,[{key:"draw",value:function(e,n){var i=this.w,s=new Ne(this.ctx),o=new ys(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:he.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,S=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();p=P.y,$=P.barHeight,u=P.yDivision,h=P.zeroW,f=P.x,S=P.barWidth,c=P.xDivision,d=P.zeroH,this.isHorizontal||y.push(f+S/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),B=null,F={indexes:{i:a,j:R,realIndex:b,translationsIndex:M,bc:l},x:f,y:p,strokeWidth:V,elSeries:C};this.isHorizontal?(B=this.drawBarPaths(tt(tt({},F),{},{barHeight:$,zeroW:h,yDivision:u})),S=this.series[a][R]/this.invertedYRatio):(B=this.drawColumnPaths(tt(tt({},F),{},{xDivision:c,barWidth:S,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 U,G=this.barHelpers.drawBarShadow({color:typeof z.color=="string"&&((U=z.color)===null||U===void 0?void 0:U.indexOf("url"))===-1?z.color:he.hexToRgba(i.globals.colors[a]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:B});L.add(G),i.config.chart.dropShadow.enabled&&new ci(this.ctx).dropShadow(G,i.config.chart.dropShadow,b)}this.pathArr.push(B);var K=this.barHelpers.drawGoalLine({barXPosition:B.barXPosition,barYPosition:B.barYPosition,goalX:B.goalX,goalY:B.goalY,barHeight:$,barWidth:S});K&&I.add(K),p=B.y,f=B.x,R>0&&y.push(f+S/2),m.push(p),this.renderSeries(tt(tt({realIndex:b,pathFill:z.color},z.useRangeColor?{lineFill:z.color}:{}),{},{j:R,i:a,columnGroupIndex:k,pathFrom:B.pathFrom,pathTo:B.pathTo,strokeWidth:V,elSeries:C,x:f,y:p,series:e,barHeight:Math.abs(B.barHeight?B.barHeight:$),barWidth:Math.abs(B.barWidth?B.barWidth:S),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,S=e.elDataLabelsWrap,M=e.elGoalsMarkers,P=e.elBarShadows,T=e.visibleSeries,I=e.type,L=e.classes,R=this.w,V=new Ne(this.ctx);if(!s){var B=typeof R.globals.stroke.colors[n]=="function"?function(K){var X,W=R.config.stroke.colors;return Array.isArray(W)&&W.length>0&&((X=W[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]:B}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 U=R.config.forecastDataPoints;U.count>0&&o>=R.globals.dataPoints-U.count&&(z.node.setAttribute("stroke-dasharray",U.dashArray),z.node.setAttribute("stroke-width",U.strokeWidth),z.node.setAttribute("fill-opacity",U.fillOpacity)),p!==void 0&&m!==void 0&&(z.attr("data-range-y1",p),z.attr("data-range-y2",m)),new ci(this.ctx).setSelectionFilter(z,n,o),d.add(z);var G=new fyt(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 G.dataLabels!==null&&S.add(G.dataLabels),G.totalDataLabels&&S.add(G.totalDataLabels),d.add(S),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 S=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:S.pathTo,pathFrom:S.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),he.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){_v(n,sp);var e=vv(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 Ne(this.ctx),this.bar=new sp(this.ctx,this.xyRatios);var a=new ys(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,S=o.barHelpers.getGroupIndex($),M=S.groupIndex,P=S.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:he.escapeString(r.globals.seriesNames[$]),rel:p+1,"data:realIndex":$});o.ctx.series.addCollapsedClassToSeries(R,$);var V=o.graphics.group({class:"apexcharts-datalabels","data:realIndex":$}),B=o.graphics.group({class:"apexcharts-bar-goals-markers"}),F=0,z=0,U=o.initialPositions(c,u,y,b,k,C,L);u=U.y,F=U.barHeight,b=U.yDivision,C=U.zeroW,c=U.x,z=U.barWidth,y=U.xDivision,k=U.zeroH,r.globals.barHeight=F,r.globals.barWidth=z,o.barHelpers.initializeStackedXYVars(o),o.groupCtx.prevY.length===1&&o.groupCtx.prevY[0].every(function(ge){return isNaN(ge)})&&(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 G=0;G<r.globals.dataPoints;G++){var K=o.barHelpers.getStrokeWidth(p,G,$),X={indexes:{i:p,j:G,realIndex:$,translationsIndex:L,bc:m},strokeWidth:K,x:c,y:u,elSeries:R,columnGroupIndex:P,seriesGroup:r.globals.seriesGroups[M]},W=null;o.isHorizontal?(W=o.drawStackedBarPaths(tt(tt({},X),{},{zeroW:C,barHeight:F,yDivision:b})),z=o.series[p][G]/o.invertedYRatio):(W=o.drawStackedColumnPaths(tt(tt({},X),{},{xDivision:y,barWidth:z,zeroH:k})),F=o.series[p][G]/o.yRatio[L]);var Q=o.barHelpers.drawGoalLine({barXPosition:W.barXPosition,barYPosition:W.barYPosition,goalX:W.goalX,goalY:W.goalY,barHeight:F,barWidth:z});Q&&B.add(Q),u=W.y,c=W.x,T.push(c),I.push(u);var ne=o.barHelpers.getPathFillColor(i,p,G,$),Z="",ae=r.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y";(o.barHelpers.arrBorderRadius[$][G]==="bottom"&&r.globals.series[$][G]>0||o.barHelpers.arrBorderRadius[$][G]==="top"&&r.globals.series[$][G]<0)&&(Z=ae),R=o.renderSeries(tt(tt({realIndex:$,pathFill:ne.color},ne.useRangeColor?{lineFill:ne.color}:{}),{},{j:G,i:p,columnGroupIndex:P,pathFrom:W.pathFrom,pathTo:W.pathTo,strokeWidth:K,elSeries:R,x:c,y:u,series:i,barHeight:F,barWidth:z,elDataLabelsWrap:V,elGoalsMarkers:B,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,S=0,M=0;M<this.groupCtx.prevXF.length;M++)S+=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]+S-2*(this.isReversed?S: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]-S+2*(this.isReversed?S: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 $,S=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 B=1;B<V;B++){var F;if(!isNaN((F=this.groupCtx.prevY[T-B])===null||F===void 0?void 0:F[m])){R=this.groupCtx.prevY[T-B][m];break}}for(var z=1;z<V;z++){var U,G;if(((U=this.groupCtx.prevYVal[T-z])===null||U===void 0?void 0:U[m])<0){L=this.series[p][m]>=0?R-M+2*(this.isReversed?M:0):R;break}if(((G=this.groupCtx.prevYVal[T-z])===null||G===void 0?void 0:G[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(W){return isNaN(W)})})?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:S,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:S,x2:l,elSeries:h}),{pathTo:K.pathTo,pathFrom:K.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,c,p,m),barXPosition:S,x:f.globals.isXNumeric?o:o+a,y:r}}}]),n}(),nk=function(t){_v(n,sp);var e=vv(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 Ne(this.ctx),c=a.globals.comboCharts?s:a.config.chart.type,u=new qr(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 ys(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,S=void 0,M=[],P=[],T=a.globals.comboCharts?o[m]:m,I=r.barHelpers.getGroupIndex(T).columnGroupIndex,L=l.group({class:"apexcharts-series",seriesName:he.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,B=0;r.yRatio.length>1&&(r.yaxisIndex=a.globals.seriesYAxisReverseMap[T][0],B=T);var F=r.barHelpers.initialPositions();S=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}),U=l.group({class:"apexcharts-bar-goals-markers"}),G=function(X){var W=r.barHelpers.getStrokeWidth(m,X,T),Q=null,ne={indexes:{i:m,j:X,realIndex:T,translationsIndex:B},x:$,y:S,strokeWidth:W,elSeries:L};Q=r.isHorizontal?r.drawHorizontalBoxPaths(tt(tt({},ne),{},{yDivision:b,barHeight:R,zeroW:C})):r.drawVerticalBoxPaths(tt(tt({},ne),{},{xDivision:y,barWidth:V,zeroH:k})),S=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&&U.add(Z),X>0&&P.push($+V/2),M.push(S),Q.pathTo.forEach(function(ae,ge){var Ce=!r.isBoxPlot&&r.candlestickOptions.wick.useFillColor?Q.color[ge]:a.globals.stroke.colors[m],oe=u.fillPath({seriesNumber:T,dataPointIndex:X,color:Q.color[ge],value:i[m][X]});r.renderSeries({realIndex:T,pathFill:oe,lineFill:Ce,j:X,i:m,pathFrom:Q.pathFrom,pathTo:ae,strokeWidth:W,elSeries:L,x:$,y:S,series:i,columnGroupIndex:I,barHeight:R,barWidth:V,elDataLabelsWrap:z,elGoalsMarkers:U,visibleSeries:r.visibleI,type:a.config.chart.type})})},K=0;K<a.globals.dataPoints;K++)G(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 Ne(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],S=this.getOHLCValue(y,f),M=l,P=l,T=S.o<S.c?[k]:[C];this.isBoxPlot&&(T=[b(m.lower),b(m.upper)]);var I=Math.min(S.o,S.c),L=Math.max(S.o,S.c),R=S.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-S.h/$,P=l-S.l/$,R=l-S.m/$);var B=d.move(V,l),F=d.move(V+a/2,I);return u.globals.previousPaths.length>0&&(F=this.getPreviousPath(y,f,!0)),B=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:B,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 Ne(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),S=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,S=l):($=l+$/m,S=l+S/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(S,P+a)+d.line(S,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(S,P+a/2)+d.line(S,P)+d.line(M,P)+"z"],I+=d.move($,P),u.globals.isXNumeric||(o+=r),{pathTo:T,pathFrom:I,x:S,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 ys(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}(),yj=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 he;if(o.config.plotOptions[e].enableShades)if(this.w.config.theme.mode==="dark"){var d=u.shadeColor(-1*r,l.color);c=he.hexToRgba(he.isColorHex(d)?d:he.rgb2hex(d),o.config.fill.opacity)}else{var h=u.shadeColor(r,l.color);c=he.hexToRgba(he.isColorHex(h)?h:he.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 Ne(this.ctx),d=new np(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 Ne(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}(),myt=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 yj(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 Ne(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:he.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 ci(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 qr(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:he.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,S=i.drawRect(f,a,o,r,$);if(S.attr({cx:f,cy:a}),S.node.classList.add("apexcharts-heatmap-rect"),d.add(S),S.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(S),n.config.chart.animations.enabled&&!n.globals.dataChanged){var M=1;n.globals.resized||(M=n.config.chart.animations.speed),this.animateHeatMap(S,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(S,he.isColorHex(T)?T:he.rgb2hex(T),he.isColorHex(k)?k:he.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 Ip(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}(),bj=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 Ne(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}(),wj=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 Ne(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 Ne(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+=he.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*he.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+=he.negToZero(i.globals.previousPaths[p]);for(var m=0;m<i.globals.previousPaths.length;m++)h=this.fullAngle*he.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 ci(this.ctx),o=new Ne(this.ctx),r=new qr(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:he.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),Ne.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=he.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=he.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 S=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:S,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 Ne(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 Ip(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 Ne(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=he.polarToCartesian(i.centerX,i.centerY,i.donutSize,u),b=he.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 pj(this.ctx),s=new Ne(this.ctx),o=new bj(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 Ne(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 Ne(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(he.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}(),gyt=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 Ne(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 ys(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 qr(this.ctx),o=[],r=new np(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:he.escapeString(i.globals.seriesNames[b]),rel:b+1,"data:realIndex":b});n.dataRadiusOfPercent[b]=[],n.dataRadius[b]=[],n.angleArr[b]=[],y.forEach(function(B,F){var z=Math.abs(n.maxValue-n.minValue);B-=n.minValue,n.isLog&&(B=n.coreUtils.getLogVal(n.logBase,B,0)),n.dataRadiusOfPercent[b][F]=B/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 S={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(tt(tt({},S),{},{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(tt(tt({},S),{},{pathFrom:M===null?$.areaPathsFrom[P]:M,pathTo:$.areaPathsTo[P],strokeWidth:0,fill:I,drawShadow:!1}));if(i.config.chart.dropShadow.enabled){var R=new ci(n.ctx),V=i.config.chart.dropShadow;R.dropShadow(L,Object.assign({},V,{noUserSpaceOnUse:!0}),b)}C.add(L)}y.forEach(function(B,F){var z=new Rp(n.ctx).getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:b,dataPointIndex:F}),U=n.graphics.drawMarker(h[F].x,h[F].y,z);U.attr("rel",F),U.attr("j",F),U.attr("index",b),U.node.setAttribute("default-marker-size",z.pSize);var G=n.graphics.group({class:"apexcharts-series-markers"});G&&G.add(U),f.add(G),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:tt({},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 bj(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=he.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=he.getPolygonPos(this.size,this.dataPointsLen);return n.globals.labels.forEach(function(r,a){var l=n.config.xaxis.labels.formatter,c=new np(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:tt({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}(),vyt=function(t){_v(n,wj);var e=vv(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(LU(s)),s}return ct(n,[{key:"draw",value:function(i){var s=this.w,o=new Ne(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 Ne(this.ctx),r=o.group({class:"apexcharts-tracks"}),a=new ci(this.ctx),l=new qr(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 Ne(this.ctx),r=new qr(this.ctx),a=new ci(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:he.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 S=r.fillPath({seriesNumber:C,size:i.size,value:i.series[C]}),M=this.startAngle,P=void 0,T=he.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*he.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,B=o.drawPath({d:"",stroke:S,strokeWidth:c,fill:"none",fillOpacity:s.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+C,strokeDashArray:V});if(Ne.setAttrs(B.node,{"data:angle":R,"data:value":i.series[C]}),s.config.chart.dropShadow.enabled){var F=s.config.chart.dropShadow;a.dropShadow(B,F,C)}if(a.setSelectionFilter(B,0,C),this.addListeners(B,this.radialDataLabels),$.add(B),B.attr({index:0,j:C}),this.barLabels.enabled){var z=he.polarToCartesian(i.centerX,i.centerY,i.size,M),U=this.barLabels.formatter(s.globals.seriesNames[C],{seriesIndex:C,w:s}),G=["apexcharts-radialbar-label"];this.barLabels.onClick||G.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,W=z.y+this.barLabels.offsetY,Q=o.drawText({x:X,y:W,text:U,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:K,cssClass:G.join(" ")});Q.on("click",this.onBarLabelClick),Q.attr({rel:C+1}),M!==0&&Q.attr({"transform-origin":"".concat(X," ").concat(W),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(B,{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 Ne(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 qr(this.ctx),c=he.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}(),_yt=function(t){_v(n,sp);var e=vv(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 Ne(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:he.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 S=this.barHelpers.initialPositions();p=S.y,h=S.zeroW,f=S.x,C=S.barWidth,k=S.barHeight,c=S.xDivision,u=S.yDivision,d=S.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,B=null,F=null,z={x:f,y:p,strokeWidth:I,elSeries:b},U=this.seriesLen;if(o.config.plotOptions.bar.rangeBarGroupRows&&(U=1),o.config.series[l].data[T]===void 0)break;if(this.isHorizontal){F=p+k*this.visibleI;var G=(u-k*U)/2;if(o.config.series[l].data[T].x){var K=this.detectOverlappingBars({i:l,j:T,barYPosition:F,srty:G,barHeight:k,yDivision:u,initPositions:S});k=K.barHeight,F=K.barYPosition}C=(V=this.drawRangeBarPaths(tt({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),B=f+C*this.visibleI;var X=(c-C*U)/2;if(o.config.series[l].data[T].x){var W=this.detectOverlappingBars({i:l,j:T,barXPosition:B,srtx:X,barWidth:C,xDivision:c,initPositions:S});C=W.barWidth,B=W.barXPosition}k=(V=this.drawRangeColumnPaths(tt({indexes:{i:l,j:T,realIndex:m,translationsIndex:$},barWidth:C,barXPosition:B,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:B,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),S=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*$,S>-1&&!m.config.plotOptions.bar.rangeBarOverlap&&(y=m.globals.seriesRange[s][S].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*$),S>-1&&!m.config.plotOptions.bar.rangeBarOverlap&&(y=m.globals.seriesRange[s][S].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 S=this.getBarXForNumericXAxis({x:o,j:h,realIndex:f,barWidth:a});o=S.x,l=S.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}(),yyt=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 ys(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=[];if(a===0){var h=this.lineCtx.categoryAxisCorrection+c.config.markers.offsetX;c.globals.isXNumeric&&(h=(c.globals.seriesX[i][0]-c.globals.minX)/this.lineCtx.xRatio+c.config.markers.offsetX),u.push(h),d.push(he.isNumber(n[r][0])?l+c.config.markers.offsetY:null),u.push(s+c.config.markers.offsetX),d.push(he.isNumber(n[r][a+1])?o+c.config.markers.offsetY:null)}else u.push(s+c.config.markers.offsetX),d.push(he.isNumber(n[r][a+1])?o+c.config.markers.offsetY:null);return{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}(),byt=function(t){for(var e,n,i,s,o=function(u){for(var d=[],h=u[0],f=u[1],p=d[0]=sk(h,f),m=1,y=u.length-1;m<y;m++)h=f,f=u[m+1],d[m]=.5*(p+(p=sk(h,f)));return d[m]=p,d}(t),r=t.length-1,a=[],l=0;l<r;l++)i=sk(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},wyt=function(t){var e=byt(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},kyt=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 sk(t,e){return(e[1]-t[1])/(e[0]-t[0])}var ik=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 hj(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new yyt(this),this.markers=new Rp(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 Ne(this.ctx),l=r.globals.comboCharts?n:r.config.chart.type,c=a.group({class:"apexcharts-".concat(l,"-series apexcharts-plot-series")}),u=new ys(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,S=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"&&(S=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},B=this._iterateOverDataPoints(tt(tt({},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(tt(tt({},V),{},{series:s,xArrj:[k],yArrj:L,y2Arrj:R,pY:S,areaPaths:B.areaPaths,pathsFrom:F,iterations:s[h].length-1,isRangeStart:!1})),U=B.linePaths.length/2,G=0;G<U;G++)B.linePaths[G]=z.linePaths[G+U]+B.linePaths[G];B.linePaths.splice(U),B.pathFromLine=z.pathFromLine+B.pathFromLine}else B.pathFromArea+="z";this._handlePaths({type:l,realIndex:f,i:h,paths:B}),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(W,Q){return Number(W.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 Ne(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;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:he.escapeString(s.globals.seriesNames[i])}),this.elPointsMain=o.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=o.group({class:"apexcharts-datalabels","data:realIndex":i});var a=e[n].length===s.globals.dataPoints;this.elSeries.attr({"data:longestSeries":a,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 Ne(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 Ne(this.ctx),l=new qr(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(tt(tt({},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 S=tt(tt({},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(S);if(this.elSeries.add(M),M.attr("fill-rule","evenodd"),c.count>0&&n!=="rangeArea"){var P=a.renderPaths(S);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,S=e.yArrj,M=e.y2Arrj,P=e.isRangeStart,T=e.seriesRangeEnd,I=this.w,L=new Ne(this.ctx),R=this.yRatio,V=m.prevY,B=m.linePath,F=m.areaPath,z=m.pathFromLine,U=m.pathFromArea,G=he.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,W=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 ge=r[u][ae+1]===void 0||r[u][ae+1]===null;if(I.globals.isXNumeric){var Ce=I.globals.seriesX[l][ae+1];I.globals.seriesX[l][ae+1]===void 0&&(Ce=I.globals.seriesX[l][a-1]),d=(Ce-I.globals.minX)/this.xRatio}else d+=this.xDivision;W?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,ge?h=K(G,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),!ge||I.config.stroke.curve!=="smooth"&&I.config.stroke.curve!=="monotoneCubic"?(S.push(h),M.push(X)):(S.push(null),M.push(null));var oe=this.lineHelpers.calculatePoints({series:r,x:d,y:h,realIndex:l,i:u,j:ae,prevY:V}),pe=this._createPaths({type:o,series:r,i:u,realIndex:l,j:ae,x:d,y:h,y2:X,xArrj:$,yArrj:S,y2Arrj:M,pX:f,pY:p,pathState:Z,segmentStartX:ne,linePath:B,areaPath:F,linePaths:y,areaPaths:b,curve:Q,isRangeStart:P});b=pe.areaPaths,y=pe.linePaths,f=pe.pX,p=pe.pY,Z=pe.pathState,ne=pe.segmentStartX,F=pe.areaPath,B=pe.linePath,!this.appendPathFrom||I.globals.hasNullValues||Q==="monotoneCubic"&&o==="rangeArea"||(z+=L.line(d,this.areaBottomY),U+=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:S,xArrj:$,pathFromArea:U,areaPaths:b,pathFromLine:z,linePaths:y,linePath:B,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 np(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(i,a,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,S=e.curve,M=e.isRangeStart,P=new Ne(this.ctx),T=this.areaBottomY,I=n==="rangeArea",L=n==="rangeArea"&&M;switch(S){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(),B=M?R:R.slice().reverse(),F=(o=B,V.map(function(Ce,oe){return[Ce,o[oe]]}).filter(function(Ce){return Ce[1]!==null})),z=F.length>1?wyt(F):F,U=[];I&&(L?$=F:U=$.reverse());var G=0,K=0;if(function(Ce,oe){for(var pe=function(je){var te=[],se=0;return je.forEach(function(me){me!==null?se++:se>0&&(te.push(se),se=0)}),se>0&&te.push(se),te}(Ce),ie=[],re=0,ke=0;re<pe.length;ke+=pe[re++])ie[re]=kyt(oe,ke,ke+pe[re]);return ie}(B,z).forEach(function(Ce){G++;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}(Ce),pe=K,ie=(K+=Ce.length)-1;L?b=P.move(F[pe][0],F[pe][1])+oe:I?b=P.move(U[pe][0],U[pe][1])+P.line(F[pe][0],F[pe][1])+oe+P.line(U[ie][0],U[ie][1]):(b=P.move(F[pe][0],F[pe][1])+oe,k=b+P.line(F[ie][0],T)+P.line(F[pe][0],T)+"z",$.push(k)),C.push(b)}),I&&G>1&&!L){var X=C.slice(G).reverse();C.splice(G),X.forEach(function(Ce){return C.push(Ce)})}m=0}break;case"smooth":var W=.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+W,p,a-W,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+W,p,a-W,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(Ce,oe,pe){var ie=[];switch(Ce){case"stepline":ie=P.line(oe,null,"H")+P.line(null,pe,"V");break;case"linestep":ie=P.line(null,pe,"V")+P.line(oe,null,"H");break;case"straight":ie=P.line(oe,pe)}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(S,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 ge=Z(S,a,l);b+=ge,k+=ge,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(n,o,s+1,a,!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 Cyt=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 yj(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 Ne(this.ctx),o=new qr(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:he.escapeString(i.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(i.config.chart.dropShadow.enabled){var d=i.config.chart.dropShadow;new ci(n.ctx).dropShadow(r,d,c)}var h=s.group({class:"apexcharts-data-labels"});l.forEach(function(f,p){var m=f[0],y=f[1],b=f[2],k=f[3],C=s.drawRect(m,y,b-m,k-y,i.config.plotOptions.treemap.borderRadius,"#fff",1,n.strokeWidth,i.config.plotOptions.treemap.useFillColorAsStroke?S:i.globals.stroke.colors[c]);C.attr({cx:m,cy:y,index:c,i:c,j:p,width:b-m,height:k-y});var $=n.helpers.getShadeColor(i.config.chart.type,c,p,n.negRange),S=$.color,M=o.fillPath({color:S,seriesNumber:c,dataPointIndex:p});C.node.classList.add("apexcharts-treemap-rect"),C.attr({fill:M}),n.helpers.addListeners(C);var P={x:m+(b-m)/2,y:y+(k-y)/2,width:0,height:0},T={x:m,y,width:b-m,height:k-y};if(i.config.chart.animations.enabled&&!i.globals.dataChanged){var I=1;i.globals.resized||(I=i.config.chart.animations.speed),n.animateTreemap(C,P,T,I)}if(i.globals.dataChanged){var L=1;n.dynamicAnim.enabled&&i.globals.shouldAnimate&&(L=n.dynamicAnim.speed,i.globals.previousPaths[c]&&i.globals.previousPaths[c][p]&&i.globals.previousPaths[c][p].rect&&(P=i.globals.previousPaths[c][p].rect),n.animateTreemap(C,P,T,L))}var R=n.getFontSize(f),V=i.config.dataLabels.formatter(n.labels[c][p],{value:i.globals.series[c][p],seriesIndex:c,dataPointIndex:p,w:i});i.config.plotOptions.treemap.dataLabels.format==="truncate"&&(R=parseInt(i.config.dataLabels.style.fontSize,10),V=n.truncateLabels(V,R,m,y,b,k));var B=null;i.globals.series[c][p]&&(B=n.helpers.calculateDataLabels({text:V,x:(m+b)/2,y:(y+k)/2+n.strokeWidth/2+R/3,i:c,j:p,colorProps:$,fontSize:R,series:e})),i.config.dataLabels.enabled&&B&&n.rotateToFitLabel(B,R,V,m,y,b,k),u.add(C),B!==null&&u.add(B)}),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 Ne(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 Ne(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 Ip(this.ctx);o.animateRect(e,{x:n.x,y:n.y,width:n.width,height:n.height},{x:i.x,y:i.y,width:i.width,height:i.height},s,function(){o.animationCompleted(e)})}}]),t}(),kj=86400,xyt=10/kj,Syt=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 ii(this.ctx),r=(n-e)/864e5;this.determineInterval(r),s.globals.disableZoomIn=!1,s.globals.disableZoomOut=!1,r<xyt?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*kj),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(S){var M={position:S.position,unit:S.unit,year:S.year,day:S.day?S.day:1,hour:S.hour?S.hour:0,month:S.month+1};return S.unit==="month"?tt(tt({},M),{},{day:1,value:S.value+1}):S.unit==="day"||S.unit==="hour"?tt(tt({},M),{},{value:S.value}):S.unit==="minute"?tt(tt({},M),{},{value:S.value,minute:S.value}):S.unit==="second"?tt(tt({},M),{},{value:S.value,minute:S.minute,second:S.second}):S});return $.filter(function(S){var M=1,P=Math.ceil(s.globals.gridWidth/120),T=S.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":S.unit==="year"&&(I=!0);break;case"half_year":M=7,S.unit==="year"&&(I=!0);break;case"months":M=1,S.unit==="year"&&(I=!0);break;case"months_fortnight":M=15,S.unit!=="year"&&S.unit!=="month"||(I=!0),T===30&&(L=!0);break;case"months_days":M=10,S.unit==="month"&&(I=!0),T===30&&(L=!0);break;case"week_days":M=8,S.unit==="month"&&(I=!0);break;case"days":M=1,S.unit==="month"&&(I=!0);break;case"hours":S.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 nb(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 ii(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:he.monthMod(i+1)})}else n.minDate===1&&n.minMonth===0&&this.timeScaleArray.push({position:l,value:a,unit:u,year:s,month:he.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 ii(this.ctx),d="month",h=0;if(n.minDate>1){c=(u.determineDaysOfMonths(s+1,n.minYear)-i+1)*r,l=he.monthMod(s+1);var f=o+h,p=he.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:he.monthMod(s)});for(var y=l+1,b=c,k=0,C=1;k<a;k++,C++){(y=he.monthMod(y))===0?(d="year",h+=1):d="month";var $=this._getYear(o,y,h);b=u.determineDaysOfMonths(y,$)*r+b;var S=y===0?$:y;this.timeScaleArray.push({position:b,value:S,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 ii(this.ctx),l="day",c=n.minDate+1,u=c,d=function(C,$,S){return C>a.determineDaysOfMonths($+1,S)&&(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=he.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:he.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?he.monthMod(p):u;this.timeScaleArray.push({position:m,value:k,unit:l,year:b,month:he.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 ii(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:he.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 S=m===0?y:m;this.timeScaleArray.push({position:k,value:S,unit:c,hour:m,day:y,year:$,month:he.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:he.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:he.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 ii(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 Ne(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}(),$yt=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"),Ne.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"),Ne.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 ik(s,n),h=new nk(s,n);s.pie=new wj(s);var f=new vyt(s);s.rangeBar=new _yt(s,n);var p=new gyt(s),m=[];if(r.comboCharts){var y,b,k=new ys(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 sp(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 ik(s,n,!0);m.push($.draw(a.scatter.series,"scatter",a.scatter.i))}if(a.bubble.series.length>0){var S=new ik(s,n,!0);m.push(S.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 sp(s,n),m=s.bar.draw(r.series));break;case"candlestick":m=new nk(s,n).draw(r.series,"candlestick");break;case"boxPlot":m=new nk(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 myt(s,n).draw(r.series);break;case"treemap":m=new Cyt(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=he.getDimensions(this.el),o=i.chart.width.toString().split(/[0-9]+/g).pop();o==="%"?he.isNumber(s[0])&&(s[0].width===0&&(s=he.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=he.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),Ne.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;Ne.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 mj(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=he.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"),Ne.setAttrs(n.dom.Paper.node,{height:c}),n.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(c,"px"))}},{key:"coreCalculations",value:function(){new Kx(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,n=function(){return e.w.config.series.map(function(){return[]})},i=new dj,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 Zx(this.ctx).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position==="back"&&new Zx(this.ctx).drawYCrosshairs(),e.config.xaxis.type==="datetime"&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new Syt(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 ys(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}(),Ayt=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&&tp(e)==="object"&&(c.config=new w1(e),e=ys.extendArrayProps(c.config,e,d),c.w.globals.chartID!==n.ctx.w.globals.chartID&&delete e.series,d.config=he.extend(d.config,e),r&&(d.globals.lastXAxis=e.xaxis?he.clone(e.xaxis):[],d.globals.lastYAxis=e.yaxis?he.clone(e.yaxis):[],d.globals.initialConfig=he.extend({},d.config),d.globals.initialSeries=he.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=he.clone(a.config.series),a.globals.initialSeries=he.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 tt(tt({},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 Ne(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 b1(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,$,S,M,P,T,I,L,R,V,B,F,z,U,G,K,X=Math.abs(l[1]),W=Math.abs(l[2]),Q=l[3]%360,ne=l[4],Z=l[5],ae=l[6],ge=l[7],Ce=new Dn(a),oe=new Dn(ae,ge),pe=[];if(X===0||W===0||Ce.x===oe.x&&Ce.y===oe.y)return[["C",Ce.x,Ce.y,oe.x,oe.y,oe.x,oe.y]];for(c=new Dn((Ce.x-oe.x)/2,(Ce.y-oe.y)/2).transform(new ln().rotate(Q)),u=c.x*c.x/(X*X)+c.y*c.y/(W*W),u>1&&(X*=u=Math.sqrt(u),W*=u),d=new ln().rotate(Q).scale(1/X,1/W).rotate(-Q),Ce=Ce.transform(d),oe=oe.transform(d),h=[oe.x-Ce.x,oe.y-Ce.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+Ce.x)/2+m*-h[1],(oe.y+Ce.y)/2+m*h[0]),b=new Dn(Ce.x-y.x,Ce.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,S=($-C)/M,P=4*Math.tan(S/4)/3,B=0;B<=M;B++)R=Math.cos(I),L=Math.sin(I),V=new Dn(y.x+R,y.y+L),T[B]=[new Dn(V.x+P*L,V.y-P*R),V,new Dn(V.x-P*L,V.y+P*R)],I+=S;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,W).rotate(-Q),B=0,F=T.length;B<F;B++)T[B][0]=T[B][0].transform(d),T[B][1]=T[B][1].transform(d),T[B][2]=T[B][2].transform(d);for(B=1,F=T.length;B<F;B++)z=(V=T[B-1][2]).x,U=V.y,G=(V=T[B][0]).x,K=V.y,ae=(V=T[B][1]).x,ge=V.y,pe.push(["C",z,U,G,K,ae,ge]);return pe}(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(Dr,{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 Dr(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 Dr(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 Dr,this.destination._array=d;var k=this.fromArray(u.map(function(C,$){var S=d[$].map(function(M,P){return P===0?M:l.step(C[P],d[$][P],a,c[$],c)});return S}));return k}})})();const qT=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY});class Eyt{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(qT(e));const i=(n?"mouseup":"touchend")+".drag";cl(window,(n?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),cl(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(qT(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"?Oc.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}),dr(window,"mousemove.drag"),dr(window,"touchmove.drag"),dr(window,"mouseup.drag"),dr(window,"touchend.drag"),this.init(!0)}}/*! | |
| 279 | 280 | * @svgdotjs/svg.select.js - An extension of svg.js which allows to select elements with mouse |
| 280 | 281 | * @version 4.0.1 |
| 281 | 282 | * https://github.com/svgdotjs/svg.select.js |
| 282 | 283 | * |
| @@ -283,9 +284,9 @@ | ||
| 283 | 284 | * @copyright Ulrich-Matthias Schäfer |
| 284 | 285 | * @license MIT |
| 285 | 286 | * |
| 286 | 287 | * BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time) |
| 287 | -*/function nk(t,e,n,s=null){return function(i){i.preventDefault(),i.stopPropagation();var o=i.pageX||i.touches[0].pageX,r=i.pageY||i.touches[0].pageY;e.fire(t,{x:o,y:r,event:i,index:s,points:n})}}function sk([t,e],{a:n,b:s,c:i,d:o,e:r,f:a}){return[t*n+e*i+r,t*s+e*o+a]}bt(qs,{draggable(t=!0){return(this.remember("_draggable")||new l0t(this)).init(t),this}});let dU=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=O1();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 s=this.order[e];this.createHandle.call(this,this.selection,t,e,n,s),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+s).on("mousedown.selection touchstart.selection",nk(s,this.el,this.handlePoints,e))})}createHandleFn(t){t.polyline()}updateHandleFn(t,e,n,s){const i=s.at(n-1),o=s[(n+1)%s.length],r=e,a=[r[0]-i[0],r[1]-i[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 s=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),t,e,n,s)})}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",nk("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=>sk(n,e)),this.rotationPoint=sk(this.getRotationPoint(t),e)}getHandlePoints({x:t,x2:e,y:n,y2:s,cx:i,cy:o}=this.el.bbox()){return[[t,n],[i,n],[e,n],[e,o],[e,s],[i,s],[t,s],[t,o]]}getRotationPoint({y:t,cx:e}=this.el.bbox()){return[e,t-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}};const KE=t=>function(e=!0,n={}){typeof e=="object"&&(n=e,e=!0);let s=this.remember("_"+t.name);return s||(e.prototype instanceof dU?(s=new e(this),e=!0):s=new t(this),this.remember("_"+t.name,s)),s.active(e,n),this};/*! | |
| 288 | +*/function Jx(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 Qx([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(pi,{draggable(t=!0){return(this.remember("_draggable")||new Eyt(this)).init(t),this}});let Cj=class{constructor(t){this.el=t,t.remember("_selectHandler",this),this.selection=new Oc,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=yv();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",Jx(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",Jx("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=>Qx(n,e)),this.rotationPoint=Qx(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 GT=t=>function(e=!0,n={}){typeof e=="object"&&(n=e,e=!0);let i=this.remember("_"+t.name);return i||(e.prototype instanceof Cj?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,n),this};/*! | |
| 288 | 289 | * @svgdotjs/svg.resize.js - An extension for svg.js which allows to resize elements which are selected |
| 289 | 290 | * @version 2.0.4 |
| 290 | 291 | * https://github.com/svgdotjs/svg.resize.js |
| 291 | 292 | * |
| @@ -301,9 +302,9 @@ | ||
| 301 | 302 | * @copyright Ulrich-Matthias Schäfer |
| 302 | 303 | * @license MIT |
| 303 | 304 | * |
| 304 | 305 | * BUILT: Mon Jul 01 2024 15:04:42 GMT+0200 (Central European Summer Time) |
| 305 | -*/function ik(t,e,n,s=null){return function(i){i.preventDefault(),i.stopPropagation();var o=i.pageX||i.touches[0].pageX,r=i.pageY||i.touches[0].pageY;e.fire(t,{x:o,y:r,event:i,index:s,points:n})}}function ok([t,e],{a:n,b:s,c:i,d:o,e:r,f:a}){return[t*n+e*i+r,t*s+e*o+a]}bt(qs,{select:KE(dU)}),bt([_u,yu,vu],{pointSelect:KE(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=O1();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",nk("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=>sk(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=O1();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,s)=>{const i=this.order[n];this.createHandle.call(this,this.selection,e,n,s,i),this.selection.get(n+1).addClass("svg_select_handle svg_select_handle_"+i).on("mousedown.selection touchstart.selection",ik(i,this.el,this.handlePoints,n))})}createHandleFn(e){e.polyline()}updateHandleFn(e,n,s,i){const o=i.at(s-1),r=i[(s+1)%i.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,s)=>{const i=this.order[n];this.updateHandle.call(this,this.selection.get(n+1),e,n,s,i)})}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 s=this.getPoint("t");e.get(0).plot(s[0],s[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",ik("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(s=>ok(s,n)),this.rotationPoint=ok(this.getRotationPoint(e),n)}getHandlePoints({x:e,x2:n,y:s,y2:i,cx:o,cy:r}=this.el.bbox()){return[[e,s],[o,s],[n,s],[n,r],[n,i],[o,i],[e,i],[e,r]]}getRotationPoint({y:e,cx:n}=this.el.bbox()){return[n,e-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}}const ZE=t=>function(e=!0,n={}){typeof e=="object"&&(n=e,e=!0);let s=this.remember("_"+t.name);return s||(e.prototype instanceof hU?(s=new e(this),e=!0):s=new t(this),this.remember("_"+t.name,s)),s.active(e,n),this};bt(qs,{select:ZE(hU)}),bt([_u,yu,vu],{pointSelect:ZE(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=O1();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",ik("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=>ok(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const M0=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),JE=t=>{let e=1/0,n=1/0,s=-1/0,i=-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]),s=Math.max(s,r[0]),i=Math.max(i,r[1])}return new As(e,n,s-e,i-n)};class QE{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:s,points:i}=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(M0(n)),this.index=s,this.points=i.slice();const r=(o?"mousemove":"touchmove")+".resize",a=(o?"mouseup":"touchcancel.resize touchend")+".resize";e.type==="point"?Za(window,r,this.movePoint):e.type==="rot"?Za(window,r,this.rotate):Za(window,r,this.resize),Za(window,a,this.endResize)}resize(e){this.lastEvent=e;const n=this.snapToGrid(this.el.point(M0(e)));let s=n.x-this.startPoint.x,i=n.y-this.startPoint.y;this.preserveAspectRatio&&this.aroundCenter&&(s*=2,i*=2);const o=this.box.x+s,r=this.box.y+i,a=this.box.x2+s,l=this.box.y2+i;let c=new As(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(b,y,C){const k=[[b.x,b.y],[b.x+b.width,b.y],[b.x+b.width,b.y+b.height],[b.x,b.y+b.height]].map(([x,S])=>{const E=x-y[0],T=(S-y[1])*C;return[E*C+y[0],T+y[1]]});return JE(k)}(this.box,p,m)}this.el.dispatch("resize",{box:new As(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:s}=this.snapToGrid(this.el.point(M0(e))),i=this.el.array().slice();i[this.index]=[n,s],this.el.dispatch("resize",{box:JE(i),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.plot(i)}rotate(e){this.lastEvent=e;const n=this.startPoint,s=this.el.point(M0(e)),{cx:i,cy:o}=this.box,r=n.x-i,a=n.y-o,l=s.x-i,c=s.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;s.x<n.x&&(d=-d);const h=new Kt(this.el),{x:f,y:p}=new An(i,o).transformO(h),{rotate:m}=h.decompose(),b=this.snapToAngle(m+d)-m;this.el.dispatch("resize",{box:this.box,angle:b,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.transform(h.rotateO(b,f,p))}endResize(e){this.eventType!=="rot"&&this.eventType!=="point"&&this.resize(e),this.lastEvent=null,this.eventType="",jo(window,"mousemove.resize touchmove.resize"),jo(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}}bt(qs,{resize:function(t=!0,e={}){typeof t=="object"&&(e=t,t=!0);let n=this.remember("_ResizeHandler");return n||(t.prototype instanceof QE?(n=new t(this),t=!0):n=new QE(this),this.remember("_resizeHandler",n)),n.active(t,e),this}}),window.SVG===void 0&&(window.SVG=k1t),window.Apex===void 0&&(window.Apex={});var eT=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(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 sp(this.ctx),this.ctx.axes=new L1t(this.ctx),this.ctx.core=new r0t(this.ctx.el,this.ctx),this.ctx.config=new Vg({}),this.ctx.data=new N5(this.ctx),this.ctx.grid=new tU(this.ctx),this.ctx.graphics=new Ve(this.ctx),this.ctx.coreUtils=new rs(this.ctx),this.ctx.crosshairs=new tk(this.ctx),this.ctx.events=new P1t(this.ctx),this.ctx.exports=new hy(this.ctx),this.ctx.fill=new Mr(this.ctx),this.ctx.localization=new I1t(this.ctx),this.ctx.options=new au,this.ctx.responsive=new O1t(this.ctx),this.ctx.series=new Ko(this.ctx),this.ctx.theme=new D1t(this.ctx),this.ctx.formatters=new V1(this.ctx),this.ctx.titleSubtitle=new R1t(this.ctx),this.ctx.legend=new sU(this.ctx),this.ctx.toolbar=new iU(this.ctx),this.ctx.tooltip=new GE(this.ctx),this.ctx.dimensions=new fy(this.ctx),this.ctx.updateHelpers=new a0t(this.ctx),this.ctx.zoomPanSelection=new H1t(this.ctx),this.ctx.w.globals.tooltip=new GE(this.ctx)}}]),t}(),tT=function(){function t(e){at(this,t),this.ctx=e,this.w=e.w}return lt(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,s=e.isUpdating,i=this.w.globals.dom.Paper.node;i.parentNode&&i.parentNode.parentNode&&!s&&(i.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}(),u3=new WeakMap,c0t=function(){function t(e,n){at(this,t),this.opts=n,this.ctx=this,this.w=new T1t(n).init(),this.el=e,this.w.globals.cuid=ue.randomId(),this.w.globals.chartID=this.w.config.chart.id?ue.escapeString(this.w.config.chart.id):this.w.globals.cuid,new eT(this).initModules(),this.create=ue.bind(this.create,this),this.windowResizeHandler=this._windowResizeHandler.bind(this),this.parentResizeHandler=this._parentResizeCallback.bind(this)}return lt(t,[{key:"render",value:function(){var e=this;return new Promise(function(n,s){if(ue.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 i=e.w.config.chart.events.beforeMount;typeof i=="function"&&i(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 b=new ResizeObserver(function(y){p&&f.call(h,y),p=!0});h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?Array.from(h.children).forEach(function(y){return b.observe(y)}):b.observe(h),u3.set(f,b)}(e.el.parentNode,e.parentResizeHandler);var o=e.el.getRootNode&&e.el.getRootNode(),r=ue.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 { | |
| 306 | +*/function e6(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 t6([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(pi,{select:GT(Cj)}),At([ju,Wu,Uu],{pointSelect:GT(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new Oc,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=yv();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",Jx("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=>Qx(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});class xj{constructor(e){this.el=e,e.remember("_selectHandler",this),this.selection=new Oc,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const n=yv();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",e6(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",e6("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=>t6(i,n)),this.rotationPoint=t6(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 XT=t=>function(e=!0,n={}){typeof e=="object"&&(n=e,e=!0);let i=this.remember("_"+t.name);return i||(e.prototype instanceof xj?(i=new e(this),e=!0):i=new t(this),this.remember("_"+t.name,i)),i.active(e,n),this};At(pi,{select:XT(xj)}),At([ju,Wu,Uu],{pointSelect:XT(class{constructor(t){this.el=t,t.remember("_pointSelectHandler",this),this.selection=new Oc,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);const e=yv();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",e6("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=>t6(e,t))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});const v0=t=>(t.changedTouches&&(t=t.changedTouches[0]),{x:t.clientX,y:t.clientY}),KT=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 ZT{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(v0(n)),this.index=i,this.points=s.slice();const r=(o?"mousemove":"touchmove")+".resize",a=(o?"mouseup":"touchcancel.resize touchend")+".resize";e.type==="point"?cl(window,r,this.movePoint):e.type==="rot"?cl(window,r,this.rotate):cl(window,r,this.resize),cl(window,a,this.endResize)}resize(e){this.lastEvent=e;const n=this.snapToGrid(this.el.point(v0(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(([$,S])=>{const M=$-b[0],P=(S-b[1])*k;return[M*k+b[0],P+b[1]]});return KT(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(v0(e))),s=this.el.array().slice();s[this.index]=[n,i],this.el.dispatch("resize",{box:KT(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(v0(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="",dr(window,"mousemove.resize touchmove.resize"),dr(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(pi,{resize:function(t=!0,e={}){typeof t=="object"&&(e=t,t=!0);let n=this.remember("_ResizeHandler");return n||(t.prototype instanceof ZT?(n=new t(this),t=!0):n=new ZT(this),this.remember("_resizeHandler",n)),n.active(t,e),this}}),window.SVG===void 0&&(window.SVG=U_t),window.Apex===void 0&&(window.Apex={});var JT=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 Ip(this.ctx),this.ctx.axes=new Q_t(this.ctx),this.ctx.core=new $yt(this.ctx.el,this.ctx),this.ctx.config=new w1({}),this.ctx.data=new YS(this.ctx),this.ctx.grid=new fj(this.ctx),this.ctx.graphics=new Ne(this.ctx),this.ctx.coreUtils=new ys(this.ctx),this.ctx.crosshairs=new Zx(this.ctx),this.ctx.events=new Z_t(this.ctx),this.ctx.exports=new tb(this.ctx),this.ctx.fill=new qr(this.ctx),this.ctx.localization=new J_t(this.ctx),this.ctx.options=new Ou,this.ctx.responsive=new eyt(this.ctx),this.ctx.series=new gr(this.ctx),this.ctx.theme=new tyt(this.ctx),this.ctx.formatters=new kv(this.ctx),this.ctx.titleSubtitle=new nyt(this.ctx),this.ctx.legend=new mj(this.ctx),this.ctx.toolbar=new gj(this.ctx),this.ctx.tooltip=new WT(this.ctx),this.ctx.dimensions=new nb(this.ctx),this.ctx.updateHelpers=new Ayt(this.ctx),this.ctx.zoomPanSelection=new lyt(this.ctx),this.ctx.w.globals.tooltip=new WT(this.ctx)}}]),t}(),QT=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}(),ok=new WeakMap,Myt=function(){function t(e,n){lt(this,t),this.opts=n,this.ctx=this,this.w=new K_t(n).init(),this.el=e,this.w.globals.cuid=he.randomId(),this.w.globals.chartID=this.w.config.chart.id?he.escapeString(this.w.config.chart.id):this.w.globals.cuid,new JT(this).initModules(),this.create=he.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(he.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),ok.set(f,y)}(e.el.parentNode,e.parentResizeHandler);var o=e.el.getRootNode&&e.el.getRootNode(),r=he.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 { | |
| 306 | 307 | 0% { |
| 307 | 308 | opacity: 0 |
| 308 | 309 | } |
| 309 | 310 | |
| @@ -979,11 +980,11 @@ | ||
| 979 | 980 | } |
| 980 | 981 | |
| 981 | 982 | .apexcharts-rangebar-goals-markers { |
| 982 | 983 | pointer-events: none |
| 983 | -}`;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){s(h)})}else s(new Error("Element not found"))})}},{key:"create",value:function(e,n){var s=this,i=this.w;new eT(this).initModules();var o=this.w.globals;if(o.noData=!1,o.animationEnded=!1,!ue.elementExists(this.el))return o.animationEnded=!0,this.destroy(),null;if(this.responsive.checkResponsiveConfig(n),i.config.xaxis.convertedCatToNumeric&&new Rg(i.config).convertCatToNumericXaxis(i.config,this.ctx),this.core.setupElements(),i.config.chart.type==="treemap"&&(i.config.grid.show=!1,i.config.yaxis[0].show=!1),o.svgWidth===0)return o.animationEnded=!0,null;var r=e;e.forEach(function(h,f){h.hidden&&(r=s.legend.legendHelpers.getSeriesAfterCollapsing({realIndex:f}))});var a=rs.checkComboSeries(r,i.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 ap(this).setGlobalMarkerSize(),this.formatters.setLabelFormatters(),this.titleSubtitle.draw(),o.noData&&o.collapsedSeries.length!==o.series.length&&!i.config.legend.showForSingleSeries||this.legend.init(),this.series.hasAllSeriesEqualX(),o.axisCharts&&(this.core.coreCalculations(),i.config.xaxis.type!=="category"&&this.formatters.setLabelFormatters(),this.ctx.toolbar.minX=i.globals.minX,this.ctx.toolbar.maxX=i.globals.maxX),this.formatters.heatmapLabelFormatters(),new rs(this).getLargestMarkerSize(),this.dimensions.plotCoords();var c=this.core.xySettings();this.grid.createGridMask();var u=this.core.plotChartType(r,c),d=new $f(this);return d.bringForward(),i.config.dataLabels.background.enabled&&d.dataLabelsBackground(),this.core.shiftGraphPosition(),{elGraph:u,xyRatios:c,dimensions:{plot:{left:i.globals.translateX,top:i.globals.translateY,width:i.globals.gridWidth,height:i.globals.gridHeight}}}}},{key:"mount",value:function(){var e=this,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,s=this,i=s.w;return new Promise(function(o,r){if(s.el===null)return r(new Error("Not enough data to display or target element not found"));(n===null||i.globals.allSeriesCollapsed)&&s.series.handleNoData(),s.grid=new tU(s);var a,l,c=s.grid.drawGrid();if(s.annotations=new E1t(s),s.annotations.drawImageAnnos(),s.annotations.drawTextAnnos(),i.config.grid.position==="back"&&(c&&i.globals.dom.elGraphical.add(c.el),c!=null&&(a=c.elGridBorders)!==null&&a!==void 0&&a.node&&i.globals.dom.elGraphical.add(c.elGridBorders)),Array.isArray(n.elGraph))for(var u=0;u<n.elGraph.length;u++)i.globals.dom.elGraphical.add(n.elGraph[u]);else i.globals.dom.elGraphical.add(n.elGraph);i.config.grid.position==="front"&&(c&&i.globals.dom.elGraphical.add(c.el),c!=null&&(l=c.elGridBorders)!==null&&l!==void 0&&l.node&&i.globals.dom.elGraphical.add(c.elGridBorders)),i.config.xaxis.crosshairs.position==="front"&&s.crosshairs.drawXCrosshairs(),i.config.yaxis[0].crosshairs.position==="front"&&s.crosshairs.drawYCrosshairs(),i.config.chart.type!=="treemap"&&s.axes.drawAxis(i.config.chart.type,c);var d=new Fg(e.ctx,c),h=new B5(e.ctx,c);if(c!==null&&(d.xAxisLabelCorrections(c.xAxisTickWidth),h.setYAxisTextAlignments(),i.config.yaxis.map(function(p,m){i.globals.ignoreYAxisIndexes.indexOf(m)===-1&&h.yAxisTitleRotate(m,p.opposite)})),s.annotations.drawAxesAnnotations(),!i.globals.noData){if(i.config.tooltip.enabled&&!i.globals.noData&&s.w.globals.tooltip.drawTooltip(n.xyRatios),i.globals.axisCharts&&(i.globals.isXNumeric||i.config.xaxis.convertedCatToNumeric||i.globals.isRangeBar))(i.config.chart.zoom.enabled||i.config.chart.selection&&i.config.chart.selection.enabled||i.config.chart.pan&&i.config.chart.pan.enabled)&&s.zoomPanSelection.init({xyRatios:n.xyRatios});else{var f=i.config.chart.toolbar.tools;["zoom","zoomin","zoomout","selection","pan","reset"].forEach(function(p){f[p]=!1})}i.config.chart.toolbar.show&&!i.globals.allSeriesCollapsed&&s.toolbar.createToolbar()}i.globals.memory.methodsToExec.length>0&&i.globals.memory.methodsToExec.forEach(function(p){p.method(p.params,!1,p.context)}),i.globals.axisCharts||i.globals.noData||s.core.resizeNonAxisCharts(),o(s)})}},{key:"destroy",value:function(){window.removeEventListener("resize",this.windowResizeHandler),function(n,s){var i=u3.get(s);i&&(i.disconnect(),u3.delete(s))}(this.el.parentNode,this.parentResizeHandler);var e=this.w.config.chart.id;e&&Apex._chartInstances.forEach(function(n,s){n.id===ue.escapeString(e)&&Apex._chartInstances.splice(s,1)}),new tT(this.ctx).clear({isUpdating:!1})}},{key:"updateOptions",value:function(e){var n=this,s=arguments.length>1&&arguments[1]!==void 0&&arguments[1],i=!(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,s,i,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],s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2];return this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(e,n,s)}},{key:"appendSeries",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],s=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],i=this.w.config.series.slice();return i.push(e),this.series.resetSeries(!1),this.updateHelpers.revertDefaultAxisMinMax(),this.updateHelpers._updateSeries(i,n,s)}},{key:"appendData",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],s=this;s.w.globals.dataChanged=!0,s.series.getPreviousPaths();for(var i=s.w.config.series.slice(),o=0;o<i.length;o++)if(e[o]!==null&&e[o]!==void 0)for(var r=0;r<e[o].data.length;r++)i[o].data.push(e[o].data[r]);return s.w.config.series=i,n&&(s.w.globals.initialSeries=ue.clone(s.w.config.series)),this.update()}},{key:"update",value:function(e){var n=this;return new Promise(function(s,i){new tT(n.ctx).clear({isUpdating:!0});var o=n.create(n.w.config.series,e);if(!o)return s(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,s(n)}).catch(function(r){i(r)})})}},{key:"getSyncedCharts",value:function(){var e=this.getGroupedCharts(),n=[this];return e.length&&(n=[],e.forEach(function(s){n.push(s)})),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],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,i=this;s&&(i=s),i.annotations.addXaxisAnnotationExternal(e,n,i)}},{key:"addYaxisAnnotation",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,i=this;s&&(i=s),i.annotations.addYaxisAnnotationExternal(e,n,i)}},{key:"addPointAnnotation",value:function(e){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,i=this;s&&(i=s),i.annotations.addPointAnnotationExternal(e,n,i)}},{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,s=this;n&&(s=n),s.annotations.removeAnnotation(s,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 ek(this.ctx).getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new ek(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 hy(this.ctx).dataURI(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new hy(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=ue.escapeString(e);if(Apex._chartInstances){var s=Apex._chartInstances.filter(function(i){return i.id===n})[0];return s&&s.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 s=this.getChartByID(e);if(s){s.w.globals.isExecCalled=!0;var i=null;if(s.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];i=s[n].apply(s,r)}return i}}},{key:"merge",value:function(e,n){return ue.extend(e,n)}}]),t}(),u0t=c0t;const nT=Ts(u0t),sT=["animationEnd","beforeMount","mounted","updated","click","mouseMove","mouseLeave","legendClick","markerClick","selection","dataPointSelection","dataPointMouseEnter","dataPointMouseLeave","beforeZoom","beforeResetZoom","zoomed","scrolled","brushScrolled"],py=se({name:"apexchart",props:{options:{type:Object},type:{type:String},series:{type:Array,required:!0},width:{default:"100%"},height:{default:"auto"}},emits:sT,setup(t,{emit:e}){const n=J(null),s=J(null),i=V=>V&&typeof V=="object"&&!Array.isArray(V)&&V!=null,o=(V,D)=>{typeof Object.assign!="function"&&function(){Object.assign=function(Y){if(Y==null)throw new TypeError("Cannot convert undefined or null to object");let B=Object(Y);for(let U=1;U<arguments.length;U++){let X=arguments[U];if(X!=null)for(let K in X)X.hasOwnProperty(K)&&(B[K]=X[K])}return B}}();let z=Object.assign({},V);return i(V)&&i(D)&&Object.keys(D).forEach(Y=>{i(D[Y])?Y in V?z[Y]=o(V[Y],D[Y]):Object.assign(z,{[Y]:D[Y]}):Object.assign(z,{[Y]:D[Y]})}),z},r=async()=>{if(await dt(),s.value)return;const V={chart:{type:t.type||t.options.chart.type||"line",height:t.height,width:t.width,events:{}},series:t.series},D=t.options.chart?t.options.chart.events:null;sT.forEach(Y=>{let B=(...U)=>e(Y,...U);V.chart.events[Y]=(...U)=>{B(...U),D&&D.hasOwnProperty(Y)&&D[Y](...U)}});const z=o(t.options,V);return s.value=new nT(n.value,z),s.value.render()},a=()=>(l(),r()),l=()=>{s.value.destroy(),s.value=null},c=(V,D)=>s.value.updateSeries(V,D),u=(V,D,z,Y)=>s.value.updateOptions(V,D,z,Y),d=V=>s.value.toggleSeries(V),h=V=>{s.value.showSeries(V)},f=V=>{s.value.hideSeries(V)},p=(V,D)=>s.value.appendSeries(V,D),m=()=>{s.value.resetSeries()},b=(V,D)=>{s.value.toggleDataPointSelection(V,D)},y=V=>s.value.appendData(V),C=(V,D)=>s.value.zoomX(V,D),k=V=>s.value.dataURI(V),x=V=>s.value.setLocale(V),S=(V,D)=>{s.value.addXaxisAnnotation(V,D)},E=(V,D)=>{s.value.addYaxisAnnotation(V,D)},T=(V,D)=>{s.value.addPointAnnotation(V,D)},P=(V,D)=>{s.value.removeAnnotation(V,D)},I=()=>{s.value.clearAnnotations()};rd(()=>{window.ApexCharts=nT}),Pt(()=>{n.value=pt().proxy.$el,r()}),Gn(()=>{s.value&&l()});const L=yo(t);return Te(L.options,()=>{!s.value&&t.options?r():s.value.updateOptions(t.options)}),Te(L.series,()=>{!s.value&&t.series?r():s.value.updateSeries(t.series)},{deep:!0}),Te(L.type,()=>{a()}),Te(L.width,()=>{a()}),Te(L.height,()=>{a()}),{chart:s,init:r,refresh:a,destroy:l,updateOptions:u,updateSeries:c,toggleSeries:d,showSeries:h,hideSeries:f,resetSeries:m,zoomX:C,toggleDataPointSelection:b,appendData:y,appendSeries:p,addXaxisAnnotation:S,addYaxisAnnotation:E,addPointAnnotation:T,removeAnnotation:P,clearAnnotations:I,setLocale:x,dataURI:k}},render(){return gt("div",{class:"vue-apexcharts"})}}),d0t=t=>{t.component(py.name,py)};py.install=d0t;const h0t={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()}},f0t={name:"ReportsChart",mixins:[h0t],props:{data:{type:Array,default:()=>[]},seriesName:{type:String},series:{type:Array},categories:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},components:{VueApexCharts:py},methods:{formatDate(t){const e=new Date(t),n=e.getDate().toString().padStart(2,"0"),s=(e.getMonth()+1).toString().padStart(2,"0"),i=e.getFullYear().toString().slice(-2);return`${n}-${s}-${i}`}},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()}},p0t={class:"reports-chart"};function m0t(t,e,n,s,i,o){const r=H("VueApexCharts");return v(),$("div",p0t,[_(r,{ref:"apexChart",height:"350",options:o.chartOptions,series:o.chartSeries},null,8,["options","series"])])}const z5=de(f0t,[["render",m0t]]),g0t={name:"ActivitiesChart",components:{ReportsChart:z5,Loading:Ea},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()}},v0t={class:"fcom-report-chart",style:{"min-height":"400px"}},_0t={key:1},y0t={class:"fcom-report-chart-header"},b0t={class:"fcom-report-header-action"},w0t={key:0};function C0t(t,e,n,s,i,o){const r=H("Loading"),a=an,l=Jt,c=H("ReportsChart");return v(),$("div",v0t,[i.loading?(v(),R(r,{key:0,section:1})):(v(),$("div",_0t,[g("div",y0t,[g("h4",null,M(t.$t("Activities")),1),g("div",b0t,[_(l,{modelValue:i.activity,"onUpdate:modelValue":e[0]||(e[0]=u=>i.activity=u),onChange:o.fetchActivity},{default:w(()=>[(v(!0),$(te,null,be(i.activitiesFilters,(u,d)=>(v(),R(a,{key:`activity-filter-${d}`,value:u.value,label:u.label},null,8,["value","label"]))),128))]),_:1},8,["modelValue","onChange"])])]),i.renderChart?(v(),$("div",w0t,[(v(),R(c,{key:i.chart.renderKey,"series-name":t.$t("Activities"),data:i.chart.data,options:i.chart,series:i.chart.series,categories:i.chart.categories},null,8,["series-name","data","options","series","categories"]))])):O("",!0)]))])}const k0t=de(g0t,[["render",C0t]]),x0t={name:"PopularDayTime",components:{Loading:Ea,InfoFilled:$c},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()}},S0t={class:"fcom-report-popular-time"},$0t={key:1},A0t={class:"fcom-report-chart-header"};function M0t(t,e,n,s,i,o){const r=H("Loading"),a=H("InfoFilled"),l=ye,c=di,u=Hr,d=zr;return v(),$("div",S0t,[i.loading?(v(),R(r,{key:0,section:1})):(v(),$("div",$0t,[g("div",A0t,[g("h4",null,[G(M(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:i.weekly_activities.data,style:{width:"100%"}},{default:w(()=>[(v(!0),$(te,null,be(i.weekly_activities.columns,(h,f)=>(v(),R(u,{key:`${h.prop}-${f}`,prop:h.prop,label:h.label,width:h.width},null,8,["prop","label","width"]))),128))]),_:1},8,["data"])]))])}const E0t=de(x0t,[["render",M0t]]),T0t={name:"Overview",components:{CheckProStatus:$5,AnalyticsHeader:Bgt,AnalyticsWidgets:Ggt,ActivitiesChart:k0t,PopularDayTime:E0t},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}}},P0t={key:0},I0t={key:1},L0t={class:"fcom-report-body"};function O0t(t,e,n,s,i,o){const r=H("CheckProStatus"),a=H("AnalyticsHeader"),l=H("AnalyticsWidgets"),c=H("ActivitiesChart"),u=H("PopularDayTime");return o.isAnalyticsEnabled?(v(),$("div",I0t,[(v(),$("div",{class:"fcom-report-wrap",key:i.instanceKey},[_(a,{"predefined-date":i.predefinedDate,"predefined-dates":i.predefinedDates,"date-ranges":i.dateRanges,"onUpdate:dateRanges":o.updateDateRanges,"onUpdate:predefinedDate":o.updatePredefinedDate},null,8,["predefined-date","predefined-dates","date-ranges","onUpdate:dateRanges","onUpdate:predefinedDate"]),g("div",L0t,[_(l,{"date-ranges":i.dateRanges},null,8,["date-ranges"]),_(c,{"date-ranges":i.dateRanges},null,8,["date-ranges"]),_(u,{"date-ranges":i.dateRanges},null,8,["date-ranges"])])]))])):(v(),$("div",P0t,[_(r)]))}const D0t=de(T0t,[["render",O0t]]),R0t={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],s=new Date().toISOString().split("T")[0];this.localDateRanges=[n,s],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}}},V0t={class:"fcom-report-header"},F0t={class:"fcom-report-header-action"};function N0t(t,e,n,s,i,o){const r=an,a=Jt,l=md;return v(),$("div",V0t,[g("h4",null,M(t.$t("Members")),1),g("div",F0t,[_(a,{modelValue:i.localPredefinedDate,"onUpdate:modelValue":e[0]||(e[0]=c=>i.localPredefinedDate=c),onChange:o.setDateRange,class:"date-selector"},{default:w(()=>[(v(!0),$(te,null,be(n.predefinedDates,(c,u)=>(v(),R(r,{key:`date-shortcut-${u}`,label:c.label,value:c.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"]),_(l,{modelValue:i.localDateRanges,"onUpdate:modelValue":e[1]||(e[1]=c=>i.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:"YYYY-MM-DD","value-format":"YYYY-MM-DD",onChange:o.onDateRangeChange},null,8,["modelValue","disabled-date","start-placeholder","end-placeholder","onChange"])])])}const B0t=de(R0t,[["render",N0t]]),z0t={name:"AnalyticsWidgets",components:{Loading:Ea},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)}}},H0t={key:1,class:"fcom-report-stat-widgets"},U0t={class:"stat-title"};function j0t(t,e,n,s,i,o){const r=H("Loading");return i.loading?(v(),R(r,{key:0,section:1})):(v(),$("div",H0t,[(v(!0),$(te,null,be(i.widgets,(a,l)=>(v(),$("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",U0t,M(a.title),1),g("h3",null,[G(M(a.total_records)+" ",1),g("span",{class:W(["stat-percent",{"stat-down":a.down}])},M(a.comparison)+" % ",3)])]))),128))]))}const W0t=de(z0t,[["render",j0t]]),Y0t={name:"MembersActivitiesChart",components:{Loading:Ea,ReportsChart:z5},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))}}},G0t={class:"fcom-report-chart",style:{"min-height":"400px"}},q0t={key:1},X0t={class:"fcom-report-chart-header"},K0t={key:0};function Z0t(t,e,n,s,i,o){const r=H("Loading"),a=H("ReportsChart");return v(),$("div",G0t,[i.loading?(v(),R(r,{key:0,section:1})):(v(),$("div",q0t,[g("div",X0t,[g("h4",null,M(t.$t("Members Activities")),1)]),i.renderChart?(v(),$("div",K0t,[(v(),R(a,{key:i.chartKey,"series-name":t.$t("Activities"),data:i.chartData,options:i.chartOptions,series:i.chartSeries,categories:i.chartCategories},null,8,["series-name","data","options","series","categories"]))])):O("",!0)]))])}const J0t=de(Y0t,[["render",Z0t]]),Q0t={name:"TopMembersSection",components:{Loading:Ea,InfoFilled:$c},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)}}},evt={class:"fcom-top-members-wrap"},tvt={key:1},nvt={class:"fcom-report-chart-header"},svt={class:"fcom-members-activity-lists"},ivt={key:0},ovt={class:"image-box"},rvt=["src"],avt={class:"number"},lvt={class:"content-box"},cvt=["title"],uvt={class:"points"};function dvt(t,e,n,s,i,o){const r=H("Loading"),a=H("InfoFilled"),l=ye,c=di;return v(),$("div",evt,[i.loading?(v(),R(r,{key:0,section:1})):(v(),$("div",tvt,[g("div",nvt,[g("h4",null,[G(M(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",svt,[i.members.length?(v(!0),$(te,{key:1},be(i.members,(u,d)=>(v(),$("div",{class:"fcom-members-activity-box",key:`top-member-${d}`},[g("div",ovt,[g("img",{src:u.avatar,alt:"Member"},null,8,rvt),g("span",avt,M(i.members.length-d),1)]),g("div",lvt,[g("h5",null,M(u.display_name),1),g("p",{title:u.created_at,class:"date meta_line"},M(t.$t("Joined %s",t.humanDateDiff(u.created_at))),9,cvt)]),g("div",uvt,M(u[n.pointLabel]),1)]))),128)):(v(),$("div",ivt,M(t.$t("No Activity")),1))])]))])}const hvt=de(Q0t,[["render",dvt]]),fvt={name:"MembersAnalytics",components:{CheckProStatus:$5,AnalyticsHeader:B0t,AnalyticsWidgets:W0t,MembersActivitiesChart:J0t,TopMembersSection:hvt},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}}},pvt={key:0},mvt={key:1},gvt={class:"fcom-report-body"},vvt={class:"fcom-members-activities-wrap"};function _vt(t,e,n,s,i,o){const r=H("CheckProStatus"),a=H("AnalyticsHeader"),l=H("AnalyticsWidgets"),c=H("MembersActivitiesChart"),u=H("TopMembersSection");return o.isAnalyticsEnabled?(v(),$("div",mvt,[(v(),$("div",{class:"fcom-report-wrap",key:i.instanceKey},[_(a,{"predefined-date":i.predefinedDate,"predefined-dates":i.predefinedDates,"date-ranges":i.dateRanges,"onUpdate:dateRanges":o.updateDateRanges,"onUpdate:predefinedDate":o.updatePredefinedDate},null,8,["predefined-date","predefined-dates","date-ranges","onUpdate:dateRanges","onUpdate:predefinedDate"]),g("div",gvt,[_(l,{"date-ranges":i.dateRanges},null,8,["date-ranges"]),_(c,{"date-ranges":i.dateRanges},null,8,["date-ranges"]),g("div",vvt,[_(u,{title:t.$t("Top Members"),"tooltip-content":t.$t("Top members by Activity count"),"date-ranges":i.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":i.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":i.dateRanges,endpoint:"analytics/members/top-commenters","point-label":"comments_count"},null,8,["title","tooltip-content","date-ranges"])])])]))])):(v(),$("div",pvt,[_(r)]))}const yvt=de(fvt,[["render",_vt]]),bvt={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],s=new Date().toISOString().split("T")[0];this.localDateRanges=[n,s],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}}},wvt={class:"fcom-report-header"},Cvt={class:"fcom-report-header-action"};function kvt(t,e,n,s,i,o){const r=an,a=Jt,l=md;return v(),$("div",wvt,[g("h4",null,M(t.$t("Spaces")),1),g("div",Cvt,[_(a,{class:"space-selector",modelValue:i.localActiveSpace,"onUpdate:modelValue":e[0]||(e[0]=c=>i.localActiveSpace=c),filterable:"",placeholder:t.$t("Select Space"),onChange:o.onSpaceChange,clearable:""},{default:w(()=>[(v(!0),$(te,null,be(t.appVars.auth.spaces,(c,u)=>(v(),R(r,{key:`space-${u}`,label:c.title,value:c.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder","onChange"]),_(a,{modelValue:i.localPredefinedDate,"onUpdate:modelValue":e[1]||(e[1]=c=>i.localPredefinedDate=c),onChange:o.setDateRange,class:"date-selector"},{default:w(()=>[(v(!0),$(te,null,be(n.predefinedDates,(c,u)=>(v(),R(r,{key:`date-shortcut-${u}`,label:c.label,value:c.key},null,8,["label","value"]))),128))]),_:1},8,["modelValue","onChange"]),_(l,{modelValue:i.localDateRanges,"onUpdate:modelValue":e[2]||(e[2]=c=>i.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:"YYYY-MM-DD","value-format":"YYYY-MM-DD",onChange:o.onDateRangeChange},null,8,["modelValue","disabled-date","start-placeholder","end-placeholder","onChange"])])])}const xvt=de(bvt,[["render",kvt]]),Svt={name:"AnalyticsWidgets",components:{Loading:Ea},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()}},$vt={class:"fcom-report-stat-widgets"},Avt={class:"stat-title"};function Mvt(t,e,n,s,i,o){const r=H("Loading");return v(),$("div",$vt,[i.loading?(v(),R(r,{key:0,section:1})):O("",!0),i.loading?O("",!0):(v(!0),$(te,{key:1},be(i.widgets,(a,l)=>(v(),$("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",Avt,M(a.title),1),g("h3",null,[G(M(a.total_records)+" ",1),g("span",{class:W(["stat-percent",{"stat-down":a.down}])},M(a.comparison)+" % ",3)])]))),128))])}const Evt=de(Svt,[["render",Mvt]]),Tvt={name:"AnalyticsChart",components:{ReportsChart:z5,Loading:Ea},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()}},Pvt={class:"fcom-report-chart",style:{"min-height":"400px"}},Ivt={key:1},Lvt={class:"fcom-report-chart-header"},Ovt={key:0};function Dvt(t,e,n,s,i,o){const r=H("Loading"),a=H("ReportsChart");return v(),$("div",Pvt,[i.loading?(v(),R(r,{key:0,section:1})):O("",!0),i.loading?O("",!0):(v(),$("div",Ivt,[g("div",Lvt,[g("h4",null,M(t.$t("Space Activities")),1)]),i.renderChart?(v(),$("div",Ovt,[(v(),R(a,{key:i.chart.renderKey,"series-name":t.$t("Activities"),data:i.chart.data,options:i.chart,series:i.chart.series,categories:i.chart.categories},null,8,["series-name","data","options","series","categories"]))])):O("",!0)]))])}const Rvt=de(Tvt,[["render",Dvt]]),Vvt={name:"PopularSpaces",components:{InfoFilled:$c,Loading:Ea},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()}},Fvt={class:"fcom-report-popular-time"},Nvt={key:1},Bvt={class:"fcom-report-chart-header"};function zvt(t,e,n,s,i,o){const r=H("Loading"),a=H("InfoFilled"),l=ye,c=di,u=Hr,d=zr;return v(),$("div",Fvt,[i.loading?(v(),R(r,{key:0,section:1})):O("",!0),i.loading?O("",!0):(v(),$("div",Nvt,[g("div",Bvt,[g("h4",null,[G(M(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:i.popularSpaces.data,style:{width:"100%"}},{default:w(()=>[(v(!0),$(te,null,be(i.popularSpaces.columns,(h,f)=>(v(),R(u,{key:`popular-spaces-${f}`,prop:h.prop,label:h.label,width:h.width},null,8,["prop","label","width"]))),128))]),_:1},8,["data"])]))])}const Hvt=de(Vvt,[["render",zvt]]),Uvt={name:"SpaceAnalytics",components:{CheckProStatus:$5,Loading:Ea,AnalyticsHeader:xvt,AnalyticsWidgets:Evt,AnalyticsChart:Rvt,PopularSpaces:Hvt},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"))}},jvt={key:0},Wvt={key:1},Yvt={class:"fcom-report-body"};function Gvt(t,e,n,s,i,o){const r=H("CheckProStatus"),a=H("Loading"),l=H("AnalyticsHeader"),c=H("AnalyticsWidgets"),u=H("AnalyticsChart"),d=H("PopularSpaces");return o.isAnalyticsEnabled?(v(),$("div",Wvt,[i.pageLoaded?(v(),$("div",{class:"fcom-report-wrap",key:i.instanceKey},[_(l,{"active-space":i.activeSpace,"date-ranges":i.dateRanges,"predefined-date":i.predefinedDate,"predefined-dates":i.predefinedDates,"onUpdate:activeSpace":e[0]||(e[0]=h=>i.activeSpace=h),"onUpdate:dateRanges":e[1]||(e[1]=h=>i.dateRanges=h),"onUpdate:predefinedDate":e[2]||(e[2]=h=>i.predefinedDate=h)},null,8,["active-space","date-ranges","predefined-date","predefined-dates"]),g("div",Yvt,[_(c,{"active-space":i.activeSpace,"date-ranges":i.dateRanges},null,8,["active-space","date-ranges"]),_(u,{"active-space":i.activeSpace,"date-ranges":i.dateRanges},null,8,["active-space","date-ranges"]),_(d,{"active-space":i.activeSpace,"date-ranges":i.dateRanges,title:i.activeSpace?t.$t("Popular Posts"):t.$t("Popular Spaces")},null,8,["active-space","date-ranges","title"])])])):(v(),R(a,{key:0,section:3}))])):(v(),$("div",jvt,[_(r)]))}const qvt=de(Uvt,[["render",Gvt]]),Xvt=[{path:"/settings",component:jpt,meta:{active_menu:"settings"},children:[{name:"settings",path:"",component:Pnt,meta:{active_menu:"settings"}},{name:"customization",path:"customization",component:Dqe,meta:{active_menu:"settings"}},{name:"admin_moderators",path:"moderators",component:Ist,meta:{active_menu:"settings"}},{name:"email_notifications",path:"email-notifications",component:uXe,meta:{active_menu:"settings"}},{name:"features",path:"features",component:Qet,meta:{active_menu:"settings"}},{name:"menu_settings",path:"menu-settings",component:Knt,meta:{active_menu:"settings"}},{path:"space_groups",name:"space_groups",component:Zmt,meta:{active_menu:"settings"}},{path:"topics-settings",name:"all_topics",component:VGe,meta:{active_menu:"settings"}},{path:"content-moderation",name:"content_moderation",component:spt,meta:{active_menu:"settings"}},{path:"privacy-settings",name:"privacy_settings",component:zpt,meta:{active_menu:"settings"}},{path:"tools",name:"tools",component:_pt,meta:{active_menu:"settings"}},{path:"crm-access-config",name:"crm_access_config",component:aGe,meta:{active_menu:"settings"}},{path:"incoming-webhooks",name:"incoming_webhooks",component:Agt,meta:{active_menu:"settings"}}]},{path:"/manage-courses",component:VWe,name:"manage_courses",meta:{active_menu:"manage_courses"}},{path:"/manage-courses/edit/:course_id",component:LHe,props:!0,meta:{active_menu:"manage_courses"},children:[{name:"edit_lessons",path:"lessons",component:mWe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_students",path:"students",component:bIe,props:!0,meta:{active_menu:"manage_courses"}},{name:"quiz_results",path:"quiz-results",component:wLe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_overview",path:"overview",component:$Fe,props:!0,meta:{active_menu:"manage_courses"}}]},{path:"/analytics",component:Igt,name:"analytics",meta:{active_menu:"analytics"},children:[{name:"analytics_overview",path:"overview",component:D0t,meta:{active_menu:"analytics_overview"}},{name:"analytics_members",path:"members",component:yvt,meta:{active_menu:"analytics_members"}},{name:"analytics_spaces",path:"spaces",component:qvt,meta:{active_menu:"analytics_spaces"}}]},{path:"/manage-migrations",component:_Ye,name:"manage_migrations",meta:{active_menu:"manage_migrations"}}],Kvt={name:"VerifiedSign"};function Zvt(t,e,n,s,i,o){const r=di;return v(),R(r,{content:t.$t("Verified"),placement:"top"},{default:w(()=>[...e[0]||(e[0]=[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)])]),_:1},8,["content"])}const Jvt=de(Kvt,[["render",Zvt]]),Qvt={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 s=0;s<e.length;s++){let i=this.appVars.user_badges[e[s]];i&&n.push(i)}return n}return[this.badge]}}},e_t=["src"],t_t={key:1,class:"fcom_emoji"},n_t={key:2,class:"fcom_shape"},s_t={key:1};function i_t(t,e,n,s,i,o){const r=ye,a=di;return o.renderingBadges?(v(!0),$(te,{key:0},be(o.renderingBadges,l=>(v(),$("div",{class:W([{user_icon_only:l.show_label!="yes"},"user_badge"])},[_(a,{content:l.title,placement:"top"},{default:w(()=>[g("div",{style:Ke({backgroundColor:l.background_color,color:l.color,borderColor:l.color}),class:"user_badge_inner"},[l.config?(v(),$(te,{key:0},[l.config.logo?(v(),$("img",{key:0,alt:"",src:l.config.logo},null,8,e_t)):l.config.emoji?(v(),$("span",t_t,M(l.config.emoji),1)):l.config.shape_svg?(v(),$("span",n_t,[_(r,{innerHTML:l.config.shape_svg},null,8,["innerHTML"])])):O("",!0)],64)):O("",!0),l.show_label=="yes"?(v(),$("span",s_t,M(l.title),1)):O("",!0)],4)]),_:2},1032,["content"])],2))),256)):O("",!0)}const o_t=de(Qvt,[["render",i_t]]),r_t={name:"WelcomeBanner",components:{MediaPreview:Zf},data(){return{config:this.appVars.welcome_banner}},computed:{showMedia(){return this.config&&this.config.mediaType=="video"&&this.config.bannerVideo},showCtaButtons(){var t;return this.config&&((t=this.config.ctaButtons)==null?void 0:t.length)&&this.config.ctaButtons.some(e=>e.link&&e.label)},isRemovable(){return this.config&&this.config.allowClose=="yes"},showBanner(){if(!this.isRemovable)return!0;let t=this.Storage.get(this.getCloseKey,!1);return t?new Date().getTime()>t:!0},getCloseKey(){return this.appVars.user_id?"fcom_welcome_banner_closed_auth":"fcom_welcome_banner_closed_guest"}},methods:{closeBanner(){this.config=null;let t=new Date().getTime()+7*24*60*60*1e3;this.Storage.set(this.getCloseKey,t)}}},a_t={key:0,class:"fcom_welcome_box"},l_t={key:2,class:"fcom_welcome_title"},c_t=["innerHTML"],u_t={key:4,class:"fcom_welcome_cta_buttons"},d_t=["href","target"];function h_t(t,e,n,s,i,o){const r=H("media-preview"),a=xa,l=H("MoreFilled"),c=ye,u=Ge,d=Ca,h=ka,f=wa;return i.config&&o.showBanner?(v(),$("div",a_t,[o.showMedia?(v(),R(r,{key:0,media_item:i.config.bannerVideo},null,8,["media_item"])):i.config.bannerImage?(v(),R(a,{key:1,class:"feed_media",alt:t.$t("Image Preview"),src:i.config.bannerImage},null,8,["alt","src"])):O("",!0),i.config.title?(v(),$("h2",l_t,M(i.config.title),1)):O("",!0),i.config.description_rendered?(v(),$("div",{key:3,class:"fcom_welcome_sub",innerHTML:i.config.description_rendered},null,8,c_t)):O("",!0),o.showCtaButtons?(v(),$("div",u_t,[(v(!0),$(te,null,be(i.config.ctaButtons,p=>(v(),$(te,null,[p.link&&p.label?(v(),$("a",{key:0,href:p.link,target:p.newTab=="yes"?"_blank":"",class:W({"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"})},M(p.label),11,d_t)):O("",!0)],64))),256))])):O("",!0),o.isRemovable?(v(),R(f,{key:5,trigger:"click",class:"fcom_welcome_close"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{onClick:o.closeBanner},{default:w(()=>[G(M(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)])):O("",!0)}const f_t=de(r_t,[["render",h_t]]);iu(()=>Promise.resolve().then(()=>u2t),void 0);iu(()=>Promise.resolve().then(()=>h2t),void 0);const p_t=[sie,xO,yie,yO,Sie,loe,xoe,Nie,Wie,Zie,Moe,Xse,Qse,$O,kO,eoe,gO,Gie,Xy,CO,Uie,Rx,kr,$oe,Yu,ud,oie,Q3,Vx,Mie,Rie,foe,jse,Ir,Lx,ioe,Ox,Pie,Gse,pie,noe,bO,SO,$c,Dx,wO];function Vm(t){const e=[];if(typeof t=="object"&&t.join===void 0)for(const n in t)e.push(Vm(t[n]));else if(typeof t=="object"&&t.join!==void 0)for(const n in t)e.push(Vm(t[n]));else typeof t=="function"||typeof t=="string"&&e.push(t);return e.join("<br />")}const ys=Zm(mPe),H5=eve();H5.use(pve);H5.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)}});ys.use(H5);ys.use(O0e);ys.config.globalProperties.appVars=window.fluentComAdmin;ys.config.globalProperties.auth=window.fluentComAdmin.auth;ys.config.globalProperties.has_pro=!!window.fluentComAdmin.pro;let rk="40%",ak="60%",fU="500px";window.innerWidth<600?(ak="95%",rk="90%",fU="90%"):window.innerWidth<800&&(ak="80%",rk="80%");p_t.forEach(t=>{ys.component(t.name,t)});ys.component("VerifiedSign",Jvt);ys.component("UserAvatar",Jb);ys.component("UserRouteLink",Wr);ys.component("WelcomeBanner",f_t);ys.component("UserBadge",o_t);function iT(){ys.use(window.FluentCommunityUtil.eventBus);const t=window.FluentCommunityUtil.Rest;ys.mixin({data(){return{Storage:window.FluentCommunityUtil.Storage,is_rtl:!1,drawerWidth:rk,dialogWidth:ak,modalWidth:fU,feedMonitorCache:{},mounted:!1,isMobile:window.innerWidth<=768,has_leaderboard:this.appVars.features.leaderboard}},methods:{$get:t.get,$post:t.post,$uploadFile:t.uploadFile,$put:t.put,$del:t.delete,$patch:t.patch,$ajax:t.ajax,changeTitle(i){document.title=i+" - "+this.appVars.site_title},$handleError(i){let o="";typeof i=="string"?o=i:i&&i.message?o=i.message:o=Vm(i),o||(o="Something is wrong!"),typeof o!="string"&&(o=Vm(o)),this.$notify({type:"error",title:this.$t("Error"),message:o,dangerouslyUseHTMLString:!0})},convertToText:Vm,$t(i){i=window.fluentComAdmin.i18n[i]||i;const o=Array.prototype.slice.call(arguments,1);if(o.length===0)return i;const r=/%(\d*)\$?s|%d/g;let a=0;return i=i.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}),i},$_n(i,o,r){return r>1?this.$t(o,r):this.$t(i,r)},$labelize(i){return i?(i=i.charAt(0).toUpperCase()+i.slice(1),window.fluentComAdmin.i18n[i]?window.fluentComAdmin.i18n[i]:i.replace(/_/g," ").replace(/\b\w/g,o=>o.toUpperCase())):""},$toClipboard(i,o="Copied to clipboard"){navigator.clipboard.writeText(i).then(()=>{this.$notify.success(this.$t(o))}).catch(r=>{this.$notify.error(this.$t("Failed to copy"))})},dayjs,relativeTimeFromUtc(i){return dayjs.utc(i).local().fromNow()},$storeLocalData(i,o){this.Storage.set(i,o)},$getLocalData(i,o=""){return this.Storage.get(i,o)},ucFirst(i){return i?i.charAt(0).toUpperCase()+i.slice(1):""},ucWords(i){return i?i.replace(/\b[a-z]/g,function(o){return o.toUpperCase()}):""},smartDate(i,o=!1,r=!1){if(!i)return"";let a="D MMM, YYYY";dayjs(i).isSame(new Date,"year")?(a="D MMM",o&&(Math.abs(dayjs(i).diff(new Date,"days"))<=5||r)&&(a="D MMM, HH:mm")):o&&r&&(a="D MMM, YYYY, HH:mm");const l=dayjs(i);return l.isValid()?l.format(a):null},hasPermission(i){return this.appVars.permissions[i]},isAdmin(){return!!this.appVars.permissions.community_admin},hasCourseAdminAccess(){return!!this.appVars.permissions.course_admin},hasCourseCreatorAccess(){return!!this.appVars.permissions.course_creator},hasSpaceAdminAccess(i=null){return this.hasPermissionOrInCurrentSpace("community_admin")||i&&this.isSpaceAdmin(i)},hasSpaceModeratorAccess(i=null){return this.hasPermissionOrInCurrentSpace("community_moderator")||i&&this.isSpaceModerator(i)},canDeleteFeed(i){return this.auth.user_id&&(i.user_id==this.auth.user_id||this.hasPermissionOrInCurrentSpace("delete_any_feed"))},canEditFeed(i){return this.auth.user_id&&(i.user_id==this.auth.user_id||this.hasPermissionOrInCurrentSpace("edit_any_feed"))},canDeleteComment(i){return this.auth&&(i.user_id==this.auth.user_id||this.hasPermissionOrInCurrentSpace("delete_any_comment"))},canEditComment(i){return this.auth.user_id&&(i.user_id==this.auth.user_id||this.hasPermissionOrInCurrentSpace("edit_any_comment"))},hasSpaceAccess(i){return i?this.appVars.user_membership_slugs.indexOf(i)!==-1:!0},hasInPermission(i,o){return!o||typeof o!="object"?!1:o[i]},hasCurrentSpacePermission(i){return window.fcom_current_community?this.hasInPermission(i,window.fcom_current_community.permissions):!1},hasPermissionOrInCurrentSpace(i){return this.hasPermission(i)?!0:this.hasCurrentSpacePermission(i)},humanDateDiff(i){if(!i)return"";const o=dayjs.utc(i,"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(i){var o;return this.auth.user_id?!i.space_id&&!i.course_id?this.auth.user_id&&(i.user_id==this.auth.user_id||i.privacy=="public"):this.hasSpaceAccess((o=i.space)==null?void 0:o.slug):!1},getExcerpt(i,o=250){if(!i)return"";let r=i.replace(/(<([^>]+)>)/ig,"");return r=r.replace(/(\*\*|__)(.*?)\1/g,"$2"),r=r.replace(/(#+)(.*)/g,"$2"),r=r.replace(/\[(.*?)\]\((.*?)\)/g,"$1"),r.length>o&&(r=r.substring(0,o)+"..."),r},mdToHtml(i){return i?(i=i.replace(" ","",i),i=i.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>"),i=i.replace(/\*(.*?)\*/g,"<em>$1</em>"),i=i.replace(/\~\~(.*?)\~\~/g,"<del>$1</del>"),i=i.replace(/\[([^\]]+)\]\(([^)]+)\)/g,'<a href="$2">$1</a>'),i=i.replace(/<(https?:\/\/[^\s>]+)>/g,'<a href="$1">$1</a>'),i=i.replace(/^##\s+(.*?)$/gm,"<h2>$1</h2>"),i=i.replace(/^###\s+(.*?)$/gm,"<h3>$1</h3>"),i=i.replace(/^####\s+(.*?)$/gm,"<h4>$1</h4>"),i=i.replace(/^>\s+(.*?)$/gm,"<blockquote>$1</blockquote>"),i=i.replace(/`{3}([\s\S]*?)`{3}/g,"<pre><code>$1</code></pre>"),i=i.replace(/`([^`]+)`/g,"<code>$1</code>"),i=i.replace(/^([\*\-])\s+(.*)$/gm,"<li>$2</li>"),i=i.replace(/(<li>.*?<\/li>(?:\n<li>.*?<\/li>)*)/g,function(o){return"<ul>"+o.replace(/\n/g,"")+"</ul>"}),i=i.replace(/\n/g,"<br>"),i):""},$convertToBoolean(i){return i==="true"||i===!0||i===1||i==="1"||i==="yes"||i==="on"},each:ic,hasFeature(i){return this.appVars.features[i]},isCommunityModerator(){return window.fluentComAdmin.auth.community_roles.some(i=>i==="admin"||i==="moderator")},isSpaceModerator(i){var r,a;return["admin","moderator"].includes((a=(r=i==null?void 0:i.membership)==null?void 0:r.pivot)==null?void 0:a.role)},isSpaceAdmin(i){var o,r;return((r=(o=i==null?void 0:i.membership)==null?void 0:o.pivot)==null?void 0:r.role)=="admin"},getCurrentAuthUrl(){let i=window.location.href,o=this.appVars.auth_url;return o=o.replace(/(\?|&)redirect_to=[^&]+/,""),o.indexOf("?")===-1?o+="?":o+="&",o+"redirect_to="+encodeURIComponent(i)},$formatNumber(i){return i&&i.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")},$getRouteLink(i,o={}){return ic(o,(r,a)=>{i=i.replace(":"+a,r)}),this.appVars.portal_url+i},isOnline(i){if(!i)return!1;const r=dayjs.utc(i,"YYYY-MM-DD HH:mm:ss").add(this.appVars.date_offset,"seconds").diff(dayjs.utc(),"minutes");return r<=5&&r>=0},$exportToCsv(i,o="fcom-export.csv"){if(!i||!Array.isArray(i)||i.length===0){this.$notify({type:"error",title:this.$t("Error"),message:this.$t("No data available to export.")});return}const r=Object.keys(i[0]),a=[r.join(",")];i.forEach(d=>{const h=r.map(f=>`"${String(d[f]??"").replace(/"/g,'""')}"`);a.push(h.join(","))});const l="\uFEFF"+a.join(` | |
| 984 | -`),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",i=>{this.$ajax("GET","fluent_community_renew_nonce",{ajax_nonce:window.fluentComAdmin.ajax_nonce}).then(o=>{o.rest_nonce&&(window.fluentComAdmin.rest.nonce=o.rest_nonce,window.fluentComAdmin.ajax_nonce=o.ajax_nonce)}).catch(o=>{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()}})})}))}}),ys.config.globalProperties.$notify=Q0e,ys.config.globalProperties.$confirm=K2.confirm,ys.config.globalProperties.$promt=K2.prompt,ys.config.globalProperties.$messageBox=K2,ys.config.globalProperties.$gloablStorage={};const e=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_routes",Xvt);let n=null;window.fluentComAdmin.routing_system=="hash"?n=M9({routes:e,history:gK()}):n=M9({routes:e,history:SL(window.fluentComAdmin.portal_slug)});const s=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_app",ys);window.fluentFrameworkApp=s.use(n).mount("#fluent_com_portal"),window.fluentFrameworkAppRouter=n}window.FluentCommunityUtil?iT():document.addEventListener("fluentCommunityUtilReady",function(){iT()});var bu,Hh;class m_t{constructor(e){Gr(this,bu,void 0);Gr(this,Hh,new Set);Oi(this,bu,e)}get current(){return Dt(this,bu)}set current(e){Dt(this,bu)!=e&&(Oi(this,bu,e),Dt(this,Hh).forEach(n=>n(e)))}on(e){return Dt(this,Hh).add(e),()=>Dt(this,Hh).delete(e)}}bu=new WeakMap,Hh=new WeakMap;const pU=t=>new m_t(t),lk=Symbol.for("atomico.hooks");globalThis[lk]=globalThis[lk]||{};let Mf=globalThis[lk];const g_t=Symbol.for("Atomico.suspense"),mU=Symbol.for("Atomico.effect"),v_t=Symbol.for("Atomico.layoutEffect"),gU=Symbol.for("Atomico.insertionEffect"),F1=(t,e,n)=>{const{i:s,hooks:i}=Mf.c,o=i[s]=i[s]||{};return o.value=t(o.value),o.effect=e,o.tag=n,Mf.c.i++,i[s].value},Fu=t=>F1((e=pU(t))=>e),U5=()=>F1((t=pU(Mf.c.host))=>t),vU=()=>Mf.c.update,__t=(t,e,n=0)=>{let s={},i=!1;const o=()=>i,r=(c,u)=>{for(const d in s){const h=s[d];h.effect&&h.tag===c&&(h.value=h.effect(h.value,u))}};return{load:c=>{Mf.c={host:e,hooks:s,update:t,i:0,id:n};let u;try{i=!1,u=c()}catch(d){if(d!==g_t)throw d;i=!0}finally{Mf.c=null}return u},cleanEffects:c=>(r(gU,c),()=>(r(v_t,c),()=>{r(mU,c)})),isSuspense:o}},N1=Symbol.for;function _U(t,e){const n=t.length;if(n!==e.length)return!1;for(let s=0;s<n;s++){let i=t[s],o=e[s];if(i!==o)return!1}return!0}const Ga=t=>typeof t=="function",Fm=t=>typeof t=="object",{isArray:y_t}=Array,ck=(t,e)=>(e?t instanceof HTMLStyleElement:!0)&&"hydrate"in((t==null?void 0:t.dataset)||{});function yU(t,e){let n;const s=i=>{let{length:o}=i;for(let r=0;r<o;r++){const a=i[r];if(a&&Array.isArray(a))s(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))}}};s(t),n!=null&&e(n)}const bU=(t,e,n)=>(t.addEventListener(e,n),()=>t.removeEventListener(e,n));let wU=class{constructor(e,n,s){this.message=n,this.target=e,this.value=s}};class b_t extends wU{}class w_t extends wU{}const my="Custom",C_t=null,k_t={true:1,"":1,1:1};function x_t(t,e,n,s,i){const{type:o,reflect:r,event:a,value:l,attr:c=$_t(e)}=(n==null?void 0:n.name)!=my&&Fm(n)&&n!=C_t?n:{type:n},u=(o==null?void 0:o.name)===my&&o.map,d=l!=null?o==Function||!Ga(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?E_t:T_t)(o,h);if(p&&m!=null)throw new b_t(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&&S_t(this,a),this.updated.then(()=>{r&&(this._ignoreAttr=c,A_t(this,o,c,this[e]),this._ignoreAttr=null)}))},get(){return this._props[e]}}),d&&(i[e]=d()),s[c]={prop:e,type:o}}const S_t=(t,{type:e,base:n=CustomEvent,...s})=>t.dispatchEvent(new n(e,s)),$_t=t=>t.replace(/([A-Z])/g,"-$1").toLowerCase(),A_t=(t,e,n,s)=>s==null||e==Boolean&&!s?t.removeAttribute(n):t.setAttribute(n,(e==null?void 0:e.name)===my&&(e!=null&&e.serialize)?e==null?void 0:e.serialize(s):Fm(s)?JSON.stringify(s):e==Boolean?"":s),M_t=(t,e)=>t==Boolean?!!k_t[e]:t==Number?Number(e):t==String?e:t==Array||t==Object?JSON.parse(e):t.name==my?e:new t(e),E_t=({map:t},e)=>{try{return{value:t(e),error:!1}}catch{return{value:e,error:!0}}},T_t=(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 P_t=0;const I_t=t=>{var n;const e=((n=(t==null?void 0:t.dataset)||{})==null?void 0:n.hydrate)||"";return e||"c"+P_t++},Md=(t,e=HTMLElement)=>{const n={},s={},i="prototype"in e&&e.prototype instanceof Element,o=i?e:"base"in e?e.base:HTMLElement,{props:r,styles:a}=i?t:e;class l extends o{constructor(){super(),this._setup(),this._render=()=>t({...this._props});for(const u in s)this[u]=s[u]}static get styles(){return[super.styles,a]}async _setup(){if(this._props)return;this._props={};let u,d;this.mounted=new Promise(b=>this.mount=()=>{b(),u!=this.parentNode&&(d!=u?this.unmounted.then(this.update):this.update()),u=this.parentNode}),this.unmounted=new Promise(b=>this.unmount=()=>{b(),(u!=this.parentNode||!this.isConnected)&&(h.cleanEffects(!0)()(),d=this.parentNode,u=null)}),this.symbolId=this.symbolId||Symbol(),this.symbolIdParent=Symbol();const h=__t(()=>this.update(),this,I_t(this));let f,p=!0;const m=ck(this);this.update=()=>(f||(f=!0,this.updated=(this.updated||this.mounted).then(()=>{try{const b=h.load(this._render),y=h.cleanEffects();return b&&b.render(this,this.symbolId,m),f=!1,p&&!h.isSuspense()&&(p=!1,!m&&L_t(this)),y()}finally{f=!1}}).then(b=>{b&&b()})),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]=M_t(p,h)}catch{throw new w_t(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)x_t(this.prototype,d,r[d],n,s);return Object.keys(n).concat(u)}}return l};function L_t(t){const{styles:e}=t.constructor,{shadowRoot:n}=t;if(n&&e.length){const s=[];yU(e,i=>{i&&(i instanceof Element?n.appendChild(i.cloneNode(!0)):s.push(i))}),s.length&&(n.adoptedStyleSheets=s)}}const CU=t=>(e,n)=>{F1(([s,i]=[])=>((i||!i)&&(i&&_U(i,n)?s=s||!0:(Ga(s)&&s(),s=null)),[s,n]),([s,i],o)=>o?(Ga(s)&&s(),[]):[s||e(),i],t)},nd=CU(mU),O_t=CU(gU);class D_t extends Array{constructor(e,n){let s=!0;const i=o=>{try{n(o,this,s)}finally{s=!1}};super(void 0,i,n),i(e)}}const pr=t=>{const e=vU();return F1((n=new D_t(t,(s,i,o)=>{s=Ga(s)?s(i[0]):s,s!==i[0]&&(i[0]=s,o||e())}))=>n)},gy=(t,e)=>{const[n]=F1(([s,i,o=0]=[])=>((!i||i&&!_U(i,e))&&(s=t()),[s,e,o]));return n},Ud=(t,e)=>gy(()=>t,e),uk=N1("atomico/options");globalThis[uk]=globalThis[uk]||{sheet:!!document.adoptedStyleSheets};const kU=globalThis[uk];new Promise(t=>{kU.ssr||(document.readyState==="loading"?bU(document,"DOMContentLoaded",t):t())});const R_t={checked:1,value:1,selected:1},V_t={list:1,type:1,size:1,form:1,width:1,height:1,src:1,href:1,slot:1},F_t={shadowDom:1,staticNode:1,cloneNode:1,children:1,key:1},Hv={},dk=[];class hk extends Text{}const N_t=N1("atomico/id"),Nm=N1("atomico/type"),d3=N1("atomico/ref"),xU=N1("atomico/vnode"),B_t=()=>{};function z_t(t,e,n){return $U(this,t,e,n)}const SU=(t,e,...n)=>{const s=e||Hv;let{children:i}=s;if(i=i??(n.length?n:dk),t===B_t)return i;const o=t?t instanceof Node?1:t.prototype instanceof HTMLElement&&2:0;if(o===!1&&t instanceof Function)return t(i!=dk?{children:i,...s}:s);const r=kU.render||z_t;return{[Nm]:xU,type:t,props:s,children:i,key:s.key,shadow:s.shadowDom,static:s.staticNode,raw:o,is:s.is,clone:s.cloneNode,render:r}};function $U(t,e,n=N_t,s,i){let o;if(e&&e[n]&&e[n].vnode==t||t[Nm]!=xU)return e;(t||!e)&&(i=i||t.type=="svg",o=t.type!="host"&&(t.raw==1?(e&&t.clone?e[d3]:e)!=t.type:t.raw==2?!(e instanceof t.type):e?e[d3]||e.localName!=t.type:!e),o&&t.type!=null&&(t.raw==1&&t.clone?(s=!0,e=t.type.cloneNode(!0),e[d3]=t.type):e=t.raw==1?t.type:t.raw==2?new t.type:i?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]:Hv,{vnode:a=Hv,cycle:l=0}=r;let{fragment:c,handlers:u}=r;const{children:d=dk,props:h=Hv}=a;if(u=o?{}:u||{},t.static&&!o)return e;if(t.shadow&&!e.shadowRoot&&e.attachShadow({mode:"open",...t.shadow}),t.props!=h&&j_t(e,h,t.props,u,i),t.children!==d){const f=t.shadow?e.shadowRoot:e;c=U_t(t.children,c,f,n,!l&&s,i&&t.type=="foreignObject"?!1:i)}return e[n]={vnode:t,handlers:u,fragment:c,cycle:l+1},e}function H_t(t,e){const n=new hk(""),s=new hk("");let i;if(t[e?"prepend":"append"](n),e){let{lastElementChild:o}=t;for(;o;){const{previousElementSibling:r}=o;if(ck(o,!0)&&!ck(r,!0)){i=o;break}o=r}}return i?i.before(s):t.append(s),{markStart:n,markEnd:s}}function U_t(t,e,n,s,i,o){t=t==null?null:y_t(t)?t:[t];const r=e||H_t(n,i),{markStart:a,markEnd:l,keyes:c}=r;let u;const d=c&&new Set;let h=a;if(t&&yU(t,f=>{if(typeof f=="object"&&!f[Nm])return;const p=f[Nm]&&f.key,m=c&&p!=null&&c.get(p);h!=l&&h===m?d.delete(h):h=h==l?l:h.nextSibling;const b=c?m:h;let y=b;if(f[Nm])y=$U(f,b,s,i,o);else{const C=f+"";!(y instanceof Text)||y instanceof hk?y=new Text(C):y.data!=C&&(y.data=C)}y!=h&&(c&&d.delete(y),!b||c?(n.insertBefore(y,h),c&&h!=l&&d.add(h)):b==l?n.insertBefore(y,l):(n.replaceChild(y,b),h=y)),p!=null&&(u=u||new Map,u.set(p,y))}),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 j_t(t,e,n,s,i){for(const o in e)!(o in n)&&oT(t,o,e[o],null,i,s);for(const o in n)oT(t,o,e[o],n[o],i,s)}function oT(t,e,n,s,i,o){if(e=e=="class"&&!i?"className":e,n=n??null,s=s??null,e in t&&R_t[e]&&(n=t[e]),!(s===n||F_t[e]||e[0]=="_"))if(t.localName==="slot"&&e==="assignNode"&&"assign"in t)t.assign(s);else if(e[0]=="o"&&e[1]=="n"&&(Ga(s)||Ga(n)))W_t(t,e.slice(2),s,o);else if(e=="ref")s&&(Ga(s)?s(t):s.current=t);else if(e=="style"){const{style:r}=t;n=n||"",s=s||"";const a=Fm(n),l=Fm(s);if(a)for(const c in n)if(l)!(c in s)&&rT(r,c,null);else break;if(l)for(const c in s){const u=s[c];a&&n[c]===u||rT(r,c,u)}else r.cssText=s}else{const r=e[0]=="$"?e.slice(1):e;r===e&&(!i&&!V_t[e]&&e in t||Ga(s)||Ga(n))?t[e]=s??"":s==null?t.removeAttribute(r):t.setAttribute(r,Fm(s)?JSON.stringify(s):s)}}function W_t(t,e,n,s){if(s.handleEvent||(s.handleEvent=i=>s[i.type].call(t,i)),n){if(!s[e]){const i=n.capture||n.once||n.passive?Object.assign({},n):null;t.addEventListener(e,s,i)}s[e]=n}else s[e]&&(t.removeEventListener(e,s),delete s[e])}function rT(t,e,n){let s="setProperty";n==null&&(s="removeProperty",n=null),~e.indexOf("-")?t[s](e,n):t[e]=n}const Y_t=SU("host",{style:"display: contents"}),G_t="value",q_t=(t,e)=>{const n=U5(),s=Fu();O_t(()=>bU(n.current,"ConnectContext",i=>{i.composedPath().at(0)!==i.currentTarget&&t===i.detail.id&&(i.stopPropagation(),i.detail.connect(s))}),[t]),s.current=e},X_t=t=>{const e=Md(({value:n})=>(q_t(e,n),Y_t),{props:{value:{type:Object,value:()=>t}}});return e[G_t]=t,e};X_t({dispatch(t,e){}});const K_t=0,jd=1,E0=2,T0=3,aT=4,Gp=5,fk=6,AU=0,Z_t=2,MU=3,EU=4,TU=Gp,J_t=fk,PU=(t,e,n,s)=>{let i;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===MU?s[0]=a:r===EU?s[1]=Object.assign(s[1]||{},a):r===TU?(s[1]=s[1]||{})[e[++o]]=a:r===J_t?s[1][e[++o]]+=a+"":r?(i=t.apply(a,PU(t,a,n,["",null])),s.push(i),a[0]?e[0]|=2:(e[o-2]=AU,e[o]=i)):s.push(a)}return s},Q_t=function(t){let e=jd,n="",s="",i=[0],o,r;const a=l=>{e===jd&&(l||(n=n.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?i.push(AU,l,n):e===T0&&(l||n)?(i.push(MU,l,n),e=E0):e===E0&&n==="..."&&l?i.push(EU,l,0):e===E0&&n&&!l?i.push(TU,0,!0,n):e>=Gp&&((n||!l&&e===Gp)&&(i.push(e,0,n,r),e=fk),l&&(i.push(e,l,0,r),e=fk)),n=""};for(let l=0;l<t.length;l++){l&&(e===jd&&a(),a(l));for(let c=0;c<t[l].length;c++)o=t[l][c],e===jd?o==="<"?(a(),i=[i],e=T0):n+=o:e===aT?n==="--"&&o===">"?(e=jd,n=""):n=o+n[0]:s?o===s?s="":n+=o:o==='"'||o==="'"?s=o:o===">"?(a(),e=jd):e&&(o==="="?(e=Gp,r=n,n=""):o==="/"&&(e<Gp||t[l][c+1]===">")?(a(),e===T0&&(i=i[0]),e=i,(i=i[0]).push(Z_t,0,e),e=K_t):o===" "||o===" "||o===` | |
| 985 | -`||o==="\r"?(a(),e=E0):n+=o),e===T0&&n==="!--"&&(e=aT,i=i[0])}return a(),i},eyt=new Map;function kt(t){let e=eyt;return e=PU(SU,e.get(t)||(e.set(t,e=Q_t(t)),e),arguments,[]),e.length>1?e:e[0]}var j5=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Wd=(t,e,n)=>(j5(t,e,"read from private field"),n?n.call(t):e.get(t)),Yd=(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)},Gd=(t,e,n,s)=>(j5(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),tyt=(t,e,n)=>(j5(t,e,"access private method"),n),Uv,jv,qp,Xp,Wv,pk,IU;let W5=class{constructor(e){Yd(this,pk),Yd(this,Uv,void 0),Yd(this,jv,void 0),Yd(this,qp,void 0),Yd(this,Xp,void 0),Yd(this,Wv,void 0),Gd(this,qp,!1),this.onShow=()=>{},this.onHide=()=>{},Gd(this,Wv,(n,s)=>{var i;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=s&&s.doc.eq(l)&&s.selection.eq(a);if(Wd(this,qp)||((i=n.dom.parentElement)==null||i.appendChild(this.element),Gd(this,qp,!0)),!(r||h)){if(!Wd(this,jv).call(this,n,s)){this.hide();return}r6({getBoundingClientRect:()=>Tb(n,u,d)},this.element,{placement:"top",middleware:[o6(),i6(Wd(this,Xp))]}).then(({x:f,y:p})=>{Object.assign(this.element.style,{left:`${f}px`,top:`${p}px`})}),this.show()}}),this.update=(n,s)=>{Yb(Wd(this,Wv),Wd(this,Uv))(n,s)},this.destroy=()=>{},this.show=n=>{this.element.dataset.show="true",n&&r6(n,this.element,{placement:"top",middleware:[o6(),i6(Wd(this,Xp))]}).then(({x:s,y:i})=>{Object.assign(this.element.style,{left:`${s}px`,top:`${i}px`})}),this.onShow()},this.hide=()=>{this.element.dataset.show!=="false"&&(this.element.dataset.show="false",this.onHide())},this.element=e.content,Gd(this,Uv,e.debounce??200),Gd(this,jv,e.shouldShow??tyt(this,pk,IU)),Gd(this,Xp,e.offset),this.element.dataset.show="false"}};Uv=new WeakMap,jv=new WeakMap,qp=new WeakMap,Xp=new WeakMap,Wv=new WeakMap,pk=new WeakSet,IU=function(t){const{doc:e,selection:n}=t.state,{empty:s,from:i,to:o}=n,r=!e.textBetween(i,o).length&&t.state.selection instanceof St,a=this.element.contains(document.activeElement),l=!t.hasFocus()&&!a,c=!t.editable;return!(l||s||r||c)};function Y5(t){const e=es({},`${t}_TOOLTIP_SPEC`),n=vs(i=>{const o=i.get(e.key);return new Yn({key:new Kn(`${t}_TOOLTIP`),...o})}),s=[e,n];return s.key=e.key,s.pluginKey=n.key,e.meta={package:"@milkdown/plugin-tooltip",displayName:`Ctx<tooltipSpec>|${t}`},n.meta={package:"@milkdown/plugin-tooltip",displayName:`Prose<tooltip>|${t}`},s}function LU(t){var e,n,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=LU(t[e]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n);return s}function Vs(){for(var t,e,n=0,s="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=LU(t))&&(s&&(s+=" "),s+=e);return s}var nyt=Object.defineProperty,lT=Object.getOwnPropertySymbols,syt=Object.prototype.hasOwnProperty,iyt=Object.prototype.propertyIsEnumerable,cT=(t,e,n)=>e in t?nyt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,oyt=(t,e)=>{for(var n in e||(e={}))syt.call(e,n)&&cT(t,n,e[n]);if(lT)for(var n of lT(e))iyt.call(e,n)&&cT(t,n,e[n]);return t};function Ed(t,e){return Object.assign(t,{meta:oyt({package:"@milkdown/components"},e)}),t}var ryt=Object.defineProperty,uT=Object.getOwnPropertySymbols,ayt=Object.prototype.hasOwnProperty,lyt=Object.prototype.propertyIsEnumerable,dT=(t,e,n)=>e in t?ryt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,G5=(t,e)=>{for(var n in e||(e={}))ayt.call(e,n)&&dT(t,n,e[n]);if(uT)for(var n of uT(e))lyt.call(e,n)&&dT(t,n,e[n]);return t};const cyt={mode:"preview"},rl=es(G5({},cyt),"linkTooltipStateCtx");Ed(rl,{displayName:"State<link-tooltip>",group:"LinkTooltip"});const uyt={addLink:()=>{},editLink:()=>{},removeLink:()=>{}},Ef=es(G5({},uyt),"linkTooltipAPICtx");Ed(rl,{displayName:"API<link-tooltip>",group:"LinkTooltip"});const dyt={linkIcon:()=>"🔗",editButton:()=>"✎",removeButton:()=>"⌫",confirmButton:()=>kt`Confirm ⏎`,onCopyLink:()=>{},inputPlaceholder:"Paste link..."},r2=es(G5({},dyt),"linkTooltipConfigCtx");Ed(rl,{displayName:"Config<link-tooltip>",group:"LinkTooltip"});const B1=Y5("LINK_PREVIEW");Ed(B1[0],{displayName:"PreviewTooltipSpec<link-tooltip>",group:"LinkTooltip"});Ed(B1[1],{displayName:"PreviewTooltipPlugin<link-tooltip>",group:"LinkTooltip"});const a2=Y5("LINK_EDIT");Ed(a2[0],{displayName:"EditTooltipSpec<link-tooltip>",group:"LinkTooltip"});Ed(a2[1],{displayName:"EditTooltipPlugin<link-tooltip>",group:"LinkTooltip"});function hyt(t,e,n,s,i){let o={start:-1,end:-1};return n.nodesBetween(s,i,(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 fyt(t,e,n){const s=e.posAtCoords({left:n.clientX,top:n.clientY});if(!s)return;const{pos:i}=s,o=e.state.doc.nodeAt(i);if(!o)return;const r=o.marks.find(l=>l.type===Ar.mark.type(t));if(!(!r||!B1.pluginKey()))return{show:!0,pos:i,node:o,mark:r}}function OU(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 DU=({config:t,src:e,onEdit:n,onRemove:s})=>{const i=a=>{a.stopPropagation(),a.preventDefault(),n==null||n()},o=a=>{a.stopPropagation(),a.preventDefault(),s==null||s()};return kt` | |
| 984 | +}`;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 JT(this).initModules();var o=this.w.globals;if(o.noData=!1,o.animationEnded=!1,!he.elementExists(this.el))return o.animationEnded=!0,this.destroy(),null;if(this.responsive.checkResponsiveConfig(n),s.config.xaxis.convertedCatToNumeric&&new b1(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=ys.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 Rp(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 ys(this).getLargestMarkerSize(),this.dimensions.plotCoords();var c=this.core.xySettings();this.grid.createGridMask();var u=this.core.plotChartType(r,c),d=new np(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 fj(i);var a,l,c=i.grid.drawGrid();if(i.annotations=new X_t(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 k1(e.ctx,c),h=new qS(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=ok.get(i);s&&(s.disconnect(),ok.delete(i))}(this.el.parentNode,this.parentResizeHandler);var e=this.w.config.chart.id;e&&Apex._chartInstances.forEach(function(n,i){n.id===he.escapeString(e)&&Apex._chartInstances.splice(i,1)}),new QT(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=he.clone(i.w.config.series)),this.update()}},{key:"update",value:function(e){var n=this;return new Promise(function(i,s){new QT(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 Kx(this.ctx).getMinYMaxY(e).highestY}},{key:"getLowestValueInSeries",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return new Kx(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 tb(this.ctx).dataURI(e)}},{key:"exportToCSV",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return new tb(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=he.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 he.extend(e,n)}}]),t}(),Tyt=Myt;const eP=vi(Tyt),tP=["animationEnd","beforeMount","mounted","updated","click","mouseMove","mouseLeave","legendClick","markerClick","selection","dataPointSelection","dataPointMouseEnter","dataPointMouseLeave","beforeZoom","beforeResetZoom","zoomed","scrolled","brushScrolled"],sb=fe({name:"apexchart",props:{options:{type:Object},type:{type:String},series:{type:Array,required:!0},width:{default:"100%"},height:{default:"auto"}},emits:tP,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 U=1;U<arguments.length;U++){let G=arguments[U];if(G!=null)for(let K in G)G.hasOwnProperty(K)&&(z[K]=G[K])}return z}}();let B=Object.assign({},R);return s(R)&&s(V)&&Object.keys(V).forEach(F=>{s(V[F])?F in R?B[F]=o(R[F],V[F]):Object.assign(B,{[F]:V[F]}):Object.assign(B,{[F]:V[F]})}),B},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;tP.forEach(F=>{let z=(...U)=>e(F,...U);R.chart.events[F]=(...U)=>{z(...U),V&&V.hasOwnProperty(F)&&V[F](...U)}});const B=o(t.options,R);return i.value=new eP(n.value,B),i.value.render()},a=()=>(l(),r()),l=()=>{i.value.destroy(),i.value=null},c=(R,V)=>i.value.updateSeries(R,V),u=(R,V,B,F)=>i.value.updateOptions(R,V,B,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),S=(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()};Od(()=>{window.ApexCharts=eP}),Ft(()=>{n.value=pt().proxy.$el,r()}),wn(()=>{i.value&&l()});const L=go(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:S,addYaxisAnnotation:M,addPointAnnotation:P,removeAnnotation:T,clearAnnotations:I,setLocale:$,dataURI:C}},render(){return bt("div",{class:"vue-apexcharts"})}}),Pyt=t=>{t.component(sb.name,sb)};sb.install=Pyt;const Iyt={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()}},Lyt={name:"ReportsChart",mixins:[Iyt],props:{data:{type:Array,default:()=>[]},seriesName:{type:String},series:{type:Array},categories:{type:Array,default:()=>[]},options:{type:Object,default:()=>({})}},components:{VueApexCharts:sb},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()}},Oyt={class:"reports-chart"};function Dyt(t,e,n,i,s,o){const r=H("VueApexCharts");return v(),A("div",Oyt,[_(r,{ref:"apexChart",height:"350",options:o.chartOptions,series:o.chartSeries},null,8,["options","series"])])}const GS=ue(Lyt,[["render",Dyt]]),Ryt={name:"ActivitiesChart",components:{ReportsChart:GS,Loading:Ha},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()}},Vyt={class:"fcom-report-chart",style:{"min-height":"400px"}},Fyt={key:1},Nyt={class:"fcom-report-chart-header"},Byt={class:"fcom-report-header-action"},zyt={key:0};function Hyt(t,e,n,i,s,o){const r=H("Loading"),a=sn,l=Jt,c=H("ReportsChart");return v(),A("div",Vyt,[s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",Fyt,[g("div",Nyt,[g("h4",null,x(t.$t("Activities")),1),g("div",Byt,[_(l,{modelValue:s.activity,"onUpdate:modelValue":e[0]||(e[0]=u=>s.activity=u),onChange:o.fetchActivity},{default:w(()=>[(v(!0),A(ee,null,we(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",zyt,[(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 Uyt=ue(Ryt,[["render",Hyt]]),jyt={name:"PopularDayTime",components:{Loading:Ha,InfoFilled:wl},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()}},Wyt={class:"fcom-report-popular-time"},Yyt={key:1},qyt={class:"fcom-report-chart-header"};function Gyt(t,e,n,i,s,o){const r=H("Loading"),a=H("InfoFilled"),l=be,c=Ss,u=Il,d=Pl;return v(),A("div",Wyt,[s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",Yyt,[g("div",qyt,[g("h4",null,[N(x(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,we(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 Xyt=ue(jyt,[["render",Gyt]]),Kyt={name:"Overview",components:{CheckProStatus:LS,AnalyticsHeader:r_t,AnalyticsWidgets:f_t,ActivitiesChart:Uyt,PopularDayTime:Xyt},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}}},Zyt={key:0},Jyt={key:1},Qyt={class:"fcom-report-body"};function ebt(t,e,n,i,s,o){const r=H("CheckProStatus"),a=H("AnalyticsHeader"),l=H("AnalyticsWidgets"),c=H("ActivitiesChart"),u=H("PopularDayTime");return o.isAnalyticsEnabled?(v(),A("div",Jyt,[(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",Qyt,[_(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",Zyt,[_(r)]))}const tbt=ue(Kyt,[["render",ebt]]),nbt={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}}},sbt={class:"fcom-report-header"},ibt={class:"fcom-report-header-action"};function obt(t,e,n,i,s,o){const r=sn,a=Jt,l=Wd;return v(),A("div",sbt,[g("h4",null,x(t.$t("Members")),1),g("div",ibt,[_(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,we(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 rbt=ue(nbt,[["render",obt]]),abt={name:"AnalyticsWidgets",components:{Loading:Ha},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)}}},lbt={key:1,class:"fcom-report-stat-widgets"},cbt={class:"stat-title"};function ubt(t,e,n,i,s,o){const r=H("Loading");return s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",lbt,[(v(!0),A(ee,null,we(s.widgets,(a,l)=>(v(),A("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",cbt,x(a.title),1),g("h3",null,[N(x(a.total_records)+" ",1),g("span",{class:q(["stat-percent",{"stat-down":a.down}])},x(a.comparison)+" % ",3)])]))),128))]))}const dbt=ue(abt,[["render",ubt]]),hbt={name:"MembersActivitiesChart",components:{Loading:Ha,ReportsChart:GS},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))}}},fbt={class:"fcom-report-chart",style:{"min-height":"400px"}},pbt={key:1},mbt={class:"fcom-report-chart-header"},gbt={key:0};function vbt(t,e,n,i,s,o){const r=H("Loading"),a=H("ReportsChart");return v(),A("div",fbt,[s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",pbt,[g("div",mbt,[g("h4",null,x(t.$t("Members Activities")),1)]),s.renderChart?(v(),A("div",gbt,[(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 _bt=ue(hbt,[["render",vbt]]),ybt={name:"TopMembersSection",components:{Loading:Ha,InfoFilled:wl},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)}}},bbt={class:"fcom-top-members-wrap"},wbt={key:1},kbt={class:"fcom-report-chart-header"},Cbt={class:"fcom-members-activity-lists"},xbt={key:0},Sbt={class:"image-box"},$bt=["src","alt"],Abt={class:"number"},Ebt={class:"content-box"},Mbt=["title"],Tbt={class:"points"};function Pbt(t,e,n,i,s,o){const r=H("Loading"),a=H("InfoFilled"),l=be,c=Ss;return v(),A("div",bbt,[s.loading?(v(),D(r,{key:0,section:1})):(v(),A("div",wbt,[g("div",kbt,[g("h4",null,[N(x(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",Cbt,[s.members.length?(v(!0),A(ee,{key:1},we(s.members,(u,d)=>(v(),A("div",{class:"fcom-members-activity-box",key:`top-member-${d}`},[g("div",Sbt,[g("img",{src:u.avatar,alt:t.$t("Member")},null,8,$bt),g("span",Abt,x(s.members.length-d),1)]),g("div",Ebt,[g("h5",null,x(u.display_name),1),g("p",{title:u.created_at,class:"date meta_line"},x(t.$t("Joined %s",t.humanDateDiff(u.created_at))),9,Mbt)]),g("div",Tbt,x(u[n.pointLabel]),1)]))),128)):(v(),A("div",xbt,x(t.$t("No Activity")),1))])]))])}const Ibt=ue(ybt,[["render",Pbt]]),Lbt={name:"MembersAnalytics",components:{CheckProStatus:LS,AnalyticsHeader:rbt,AnalyticsWidgets:dbt,MembersActivitiesChart:_bt,TopMembersSection:Ibt},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}}},Obt={key:0},Dbt={key:1},Rbt={class:"fcom-report-body"},Vbt={class:"fcom-members-activities-wrap"};function Fbt(t,e,n,i,s,o){const r=H("CheckProStatus"),a=H("AnalyticsHeader"),l=H("AnalyticsWidgets"),c=H("MembersActivitiesChart"),u=H("TopMembersSection");return o.isAnalyticsEnabled?(v(),A("div",Dbt,[(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",Rbt,[_(l,{"date-ranges":s.dateRanges},null,8,["date-ranges"]),_(c,{"date-ranges":s.dateRanges},null,8,["date-ranges"]),g("div",Vbt,[_(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",Obt,[_(r)]))}const Nbt=ue(Lbt,[["render",Fbt]]),Bbt={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}}},zbt={class:"fcom-report-header"},Hbt={class:"fcom-report-header-action"};function Ubt(t,e,n,i,s,o){const r=sn,a=Jt,l=Wd;return v(),A("div",zbt,[g("h4",null,x(t.$t("Spaces")),1),g("div",Hbt,[_(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,we(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,we(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 jbt=ue(Bbt,[["render",Ubt]]),Wbt={name:"AnalyticsWidgets",components:{Loading:Ha},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()}},Ybt={class:"fcom-report-stat-widgets"},qbt={class:"stat-title"};function Gbt(t,e,n,i,s,o){const r=H("Loading");return v(),A("div",Ybt,[s.loading?(v(),D(r,{key:0,section:1})):O("",!0),s.loading?O("",!0):(v(!0),A(ee,{key:1},we(s.widgets,(a,l)=>(v(),A("div",{class:"fcom-report-stat-widget",key:`widget-${l}`},[g("span",qbt,x(a.title),1),g("h3",null,[N(x(a.total_records)+" ",1),g("span",{class:q(["stat-percent",{"stat-down":a.down}])},x(a.comparison)+" % ",3)])]))),128))])}const Xbt=ue(Wbt,[["render",Gbt]]),Kbt={name:"AnalyticsChart",components:{ReportsChart:GS,Loading:Ha},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()}},Zbt={class:"fcom-report-chart",style:{"min-height":"400px"}},Jbt={key:1},Qbt={class:"fcom-report-chart-header"},e2t={key:0};function t2t(t,e,n,i,s,o){const r=H("Loading"),a=H("ReportsChart");return v(),A("div",Zbt,[s.loading?(v(),D(r,{key:0,section:1})):O("",!0),s.loading?O("",!0):(v(),A("div",Jbt,[g("div",Qbt,[g("h4",null,x(t.$t("Space Activities")),1)]),s.renderChart?(v(),A("div",e2t,[(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 n2t=ue(Kbt,[["render",t2t]]),s2t={name:"PopularSpaces",components:{InfoFilled:wl,Loading:Ha},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()}},i2t={class:"fcom-report-popular-time"},o2t={key:1},r2t={class:"fcom-report-chart-header"};function a2t(t,e,n,i,s,o){const r=H("Loading"),a=H("InfoFilled"),l=be,c=Ss,u=Il,d=Pl;return v(),A("div",i2t,[s.loading?(v(),D(r,{key:0,section:1})):O("",!0),s.loading?O("",!0):(v(),A("div",o2t,[g("div",r2t,[g("h4",null,[N(x(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,we(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 l2t=ue(s2t,[["render",a2t]]),c2t={name:"SpaceAnalytics",components:{CheckProStatus:LS,Loading:Ha,AnalyticsHeader:jbt,AnalyticsWidgets:Xbt,AnalyticsChart:n2t,PopularSpaces:l2t},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"))}},u2t={key:0},d2t={key:1},h2t={class:"fcom-report-body"};function f2t(t,e,n,i,s,o){const r=H("CheckProStatus"),a=H("Loading"),l=H("AnalyticsHeader"),c=H("AnalyticsWidgets"),u=H("AnalyticsChart"),d=H("PopularSpaces");return o.isAnalyticsEnabled?(v(),A("div",d2t,[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",h2t,[_(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",u2t,[_(r)]))}const p2t=ue(c2t,[["render",f2t]]),m2t=[{path:"/settings",component:cvt,meta:{active_menu:"settings"},children:[{name:"settings",path:"",component:tot,meta:{active_menu:"settings"}},{name:"customization",path:"customization",component:KXe,meta:{active_menu:"settings"}},{name:"admin_moderators",path:"moderators",component:xrt,meta:{active_menu:"settings"}},{name:"email_notifications",path:"email-notifications",component:SKe,meta:{active_menu:"settings"}},{name:"features",path:"features",component:kst,meta:{active_menu:"settings"}},{name:"menu_settings",path:"menu-settings",component:Hot,meta:{active_menu:"settings"}},{path:"space_groups",name:"space_groups",component:t0t,meta:{active_menu:"settings"}},{path:"topics-settings",name:"all_topics",component:qGe,meta:{active_menu:"settings"}},{path:"content-moderation",name:"content_moderation",component:b1t,meta:{active_menu:"settings"}},{path:"privacy-settings",name:"privacy_settings",component:rvt,meta:{active_menu:"settings"}},{path:"tools",name:"tools",component:D1t,meta:{active_menu:"settings"}},{path:"crm-access-config",name:"crm_access_config",component:iGe,meta:{active_menu:"settings"}},{path:"incoming-webhooks",name:"incoming_webhooks",component:j0t,meta:{active_menu:"settings"}}]},{path:"/manage-spaces/:space/settings",component:d0t,props:!0,redirect:t=>({name:"space_settings_general",params:t.params}),meta:{active_menu:"settings",back_route:"space_groups",back_with_space:!1},children:[{name:"space_settings_general",path:"general",component:()=>Qs(()=>Promise.resolve().then(()=>Dkt),void 0)},{name:"space_settings_paywalls",path:"paywalls",component:()=>Qs(()=>Promise.resolve().then(()=>EP),void 0)},{name:"space_settings_lockscreen",path:"lock-screen",component:()=>Qs(()=>Promise.resolve().then(()=>I6t),void 0)},{name:"space_settings_links",path:"links",component:()=>Qs(()=>Promise.resolve().then(()=>MP),void 0)},{name:"space_settings_pages",path:"pages",component:()=>Qs(()=>Promise.resolve().then(()=>N4t),void 0)}]},{path:"/manage-courses/edit/:course_id/settings",component:p0t,props:!0,redirect:t=>({name:"course_settings_general",params:t.params}),meta:{active_menu:"manage_courses"},children:[{name:"course_settings_general",path:"general",component:()=>Qs(()=>Promise.resolve().then(()=>j4t),void 0)},{name:"course_settings_paywalls",path:"paywalls",component:()=>Qs(()=>Promise.resolve().then(()=>EP),void 0)},{name:"course_settings_lockscreen",path:"lock-screen",component:()=>Qs(()=>Promise.resolve().then(()=>K4t),void 0)},{name:"course_settings_welcome_banner",path:"welcome-banner",component:()=>Qs(()=>Promise.resolve().then(()=>w8t),void 0)},{name:"course_settings_links",path:"links",component:()=>Qs(()=>Promise.resolve().then(()=>MP),void 0)}]},{path:"/manage-courses",component:RYe,name:"manage_courses",meta:{active_menu:"manage_courses"}},{path:"/manage-courses/edit/:course_id",component:iUe,props:!0,meta:{active_menu:"manage_courses"},children:[{name:"edit_lessons",path:"lessons",component:aYe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_students",path:"students",component:KDe,props:!0,meta:{active_menu:"manage_courses"}},{name:"quiz_results",path:"quiz-results",component:eVe,props:!0,meta:{active_menu:"manage_courses"}},{name:"course_overview",path:"overview",component:zHe,props:!0,meta:{active_menu:"manage_courses"}}]},{path:"/analytics",component:X0t,name:"analytics",meta:{active_menu:"analytics"},children:[{name:"analytics_overview",path:"overview",component:tbt,meta:{active_menu:"analytics_overview"}},{name:"analytics_members",path:"members",component:Nbt,meta:{active_menu:"analytics_members"}},{name:"analytics_spaces",path:"spaces",component:p2t,meta:{active_menu:"analytics_spaces"}}]},{path:"/manage-migrations",component:wqe,name:"manage_migrations",meta:{active_menu:"manage_migrations"}}],g2t={name:"VerifiedSign"},v2t={class:"fcom_verified"},_2t=["aria-label"];function y2t(t,e,n,i,s,o){const r=Ss;return v(),D(r,{content:t.$t("Verified"),placement:"top"},{default:w(()=>[g("span",v2t,[(v(),A("svg",{viewBox:"0 0 22 22","aria-label":t.$t("Verified account"),role:"img","data-testid":"icon-verified"},[...e[0]||(e[0]=[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)])],8,_2t))])]),_:1},8,["content"])}const b2t=ue(g2t,[["render",y2t]]),w2t={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;const n=new Set(e);return Object.keys(this.appVars.user_badges).filter(i=>n.has(i)).map(i=>this.appVars.user_badges[i])}return[this.badge]}}},k2t=["src"],C2t={key:1,class:"fcom_emoji"},x2t={key:2,class:"fcom_shape"},S2t={key:1};function $2t(t,e,n,i,s,o){const r=be,a=Ss;return o.renderingBadges?(v(!0),A(ee,{key:0},we(o.renderingBadges,l=>(v(),A("div",{class:q([{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,k2t)):l.config.emoji?(v(),A("span",C2t,x(l.config.emoji),1)):l.config.shape_svg?(v(),A("span",x2t,[_(r,{innerHTML:l.config.shape_svg},null,8,["innerHTML"])])):O("",!0)],64)):O("",!0),l.show_label=="yes"?(v(),A("span",S2t,x(l.title),1)):O("",!0)],4)]),_:2},1032,["content"])],2))),256)):O("",!0)}const A2t=ue(w2t,[["render",$2t]]),E2t={name:"WelcomeBanner",components:{MediaPreview:Ap},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}}},M2t={key:0,class:"fcom_welcome_title"},T2t=["innerHTML"],P2t={key:2,class:"fcom_welcome_cta_buttons"},I2t=["href","target"];function L2t(t,e,n,i,s,o){const r=H("media-preview"),a=Wo,l=H("MoreFilled"),c=be,u=He,d=$r,h=Ar,f=Sr;return o.effectiveConfig&&o.showBanner?(v(),A("div",{key:0,class:q(["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:q(n.contentClass)},[o.effectiveConfig.title?(v(),A("h2",M2t,x(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,T2t)):O("",!0),o.showCtaButtons?(v(),A("div",P2t,[(v(!0),A(ee,null,we(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:q({"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"})},x(p.label),11,I2t)):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(()=>[N(x(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 O2t=ue(E2t,[["render",L2t]]);Qs(()=>Promise.resolve().then(()=>C8t),void 0);Qs(()=>Promise.resolve().then(()=>S8t),void 0);const D2t=[vae,pR,Lae,uR,dR,kle,Rle,Qae,ole,dle,Ble,cae,fae,gR,fR,ple,rR,ale,Zb,hR,sle,K4,Hr,Fle,bd,Bd,yae,sC,Z4,Hae,Kae,Ale,iae,Bo,cR,_le,X4,Wae,aae,Eae,gle,Jb,mR,wl,Qb,Bae,Ule];function _g(t){const e=[];if(typeof t=="object"&&t.join===void 0)for(const n in t)e.push(_g(t[n]));else if(typeof t=="object"&&t.join!==void 0)for(const n in t)e.push(_g(t[n]));else typeof t=="function"||typeof t=="string"&&e.push(t);return e.join("<br />")}const Rs=Pg(bOe),XS=Iye();XS.use(Yye);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)}});Rs.use(XS);Rs.use(K_e);Rs.config.globalProperties.appVars=window.fluentComAdmin;Rs.config.globalProperties.auth=window.fluentComAdmin.auth;Rs.config.globalProperties.has_pro=!!window.fluentComAdmin.pro;let n6="40%",s6="60%",Sj="500px";window.innerWidth<600?(s6="95%",n6="90%",Sj="90%"):window.innerWidth<800&&(s6="80%",n6="80%");D2t.forEach(t=>{Rs.component(t.name,t)});Rs.component("VerifiedSign",b2t);Rs.component("UserAvatar",j2);Rs.component("UserRouteLink",la);Rs.component("WelcomeBanner",O2t);Rs.component("UserBadge",A2t);function nP(){if(window.fluentFrameworkApp){console.warn("FluentCommunity: the portal app is already mounted, skipping duplicate initialization.");return}Rs.use(window.FluentCommunityUtil.eventBus);const t=window.FluentCommunityUtil.Rest;Rs.mixin({data(){return{Storage:window.FluentCommunityUtil.Storage,is_rtl:!1,drawerWidth:n6,dialogWidth:s6,modalWidth:Sj,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=_g(s),o||(o="Something is wrong!"),typeof o!="string"&&(o=_g(o)),this.$notify({type:"error",title:this.$t("Error"),message:o,dangerouslyUseHTMLString:!0})},convertToText:_g,$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){const c=dayjs(s,this.siteTimeFormat);return c.isValid()?c.format("HH:mm"):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(" ","",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:Mc,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 Mc(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(` | |
| 985 | +`),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()})}))}}),Rs.config.globalProperties.$notify=kye,Rs.config.globalProperties.$confirm=Ww.confirm,Rs.config.globalProperties.$promt=Ww.prompt,Rs.config.globalProperties.$messageBox=Ww,Rs.config.globalProperties.$gloablStorage={};const e=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_routes",m2t);let n=null;window.fluentComAdmin.routing_system=="hash"?n=D7({routes:e,history:AZ()}):n=D7({routes:e,history:CO(window.fluentComAdmin.portal_slug)});const i=window.FluentCommunityUtil.hooks.applyFilters("fluent_com_portal_admin_app",Rs);QH().initialize(),window.fluentFrameworkApp=i.use(n).mount("#fluent_com_portal"),window.fluentFrameworkAppRouter=n}window.FluentCommunityUtil?nP():document.addEventListener("fluentCommunityUtilReady",function(){nP()});var Yu,wf;class R2t{constructor(e){ua(this,Yu,void 0);ua(this,wf,new Set);Qi(this,Yu,e)}get current(){return Gt(this,Yu)}set current(e){Gt(this,Yu)!=e&&(Qi(this,Yu,e),Gt(this,wf).forEach(n=>n(e)))}on(e){return Gt(this,wf).add(e),()=>Gt(this,wf).delete(e)}}Yu=new WeakMap,wf=new WeakMap;const $j=t=>new R2t(t),i6=Symbol.for("atomico.hooks");globalThis[i6]=globalThis[i6]||{};let ip=globalThis[i6];const V2t=Symbol.for("Atomico.suspense"),Aj=Symbol.for("Atomico.effect"),F2t=Symbol.for("Atomico.layoutEffect"),Ej=Symbol.for("Atomico.insertionEffect"),Cv=(t,e,n)=>{const{i,hooks:s}=ip.c,o=s[i]=s[i]||{};return o.value=t(o.value),o.effect=e,o.tag=n,ip.c.i++,s[i].value},ud=t=>Cv((e=$j(t))=>e),KS=()=>Cv((t=$j(ip.c.host))=>t),Mj=()=>ip.c.update,N2t=(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=>{ip.c={host:e,hooks:i,update:t,i:0,id:n};let u;try{s=!1,u=c()}catch(d){if(d!==V2t)throw d;s=!0}finally{ip.c=null}return u},cleanEffects:c=>(r(Ej,c),()=>(r(F2t,c),()=>{r(Aj,c)})),isSuspense:o}},xv=Symbol.for;function Tj(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 rl=t=>typeof t=="function",yg=t=>typeof t=="object",{isArray:B2t}=Array,o6=(t,e)=>(e?t instanceof HTMLStyleElement:!0)&&"hydrate"in((t==null?void 0:t.dataset)||{});function Pj(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 Ij=(t,e,n)=>(t.addEventListener(e,n),()=>t.removeEventListener(e,n));let Lj=class{constructor(e,n,i){this.message=n,this.target=e,this.value=i}};class z2t extends Lj{}class H2t extends Lj{}const ib="Custom",U2t=null,j2t={true:1,"":1,1:1};function W2t(t,e,n,i,s){const{type:o,reflect:r,event:a,value:l,attr:c=q2t(e)}=(n==null?void 0:n.name)!=ib&&yg(n)&&n!=U2t?n:{type:n},u=(o==null?void 0:o.name)===ib&&o.map,d=l!=null?o==Function||!rl(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?K2t:Z2t)(o,h);if(p&&m!=null)throw new z2t(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&&Y2t(this,a),this.updated.then(()=>{r&&(this._ignoreAttr=c,G2t(this,o,c,this[e]),this._ignoreAttr=null)}))},get(){return this._props[e]}}),d&&(s[e]=d()),i[c]={prop:e,type:o}}const Y2t=(t,{type:e,base:n=CustomEvent,...i})=>t.dispatchEvent(new n(e,i)),q2t=t=>t.replace(/([A-Z])/g,"-$1").toLowerCase(),G2t=(t,e,n,i)=>i==null||e==Boolean&&!i?t.removeAttribute(n):t.setAttribute(n,(e==null?void 0:e.name)===ib&&(e!=null&&e.serialize)?e==null?void 0:e.serialize(i):yg(i)?JSON.stringify(i):e==Boolean?"":i),X2t=(t,e)=>t==Boolean?!!j2t[e]:t==Number?Number(e):t==String?e:t==Array||t==Object?JSON.parse(e):t.name==ib?e:new t(e),K2t=({map:t},e)=>{try{return{value:t(e),error:!1}}catch{return{value:e,error:!0}}},Z2t=(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 J2t=0;const Q2t=t=>{var n;const e=((n=(t==null?void 0:t.dataset)||{})==null?void 0:n.hydrate)||"";return e||"c"+J2t++},th=(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=N2t(()=>this.update(),this,Q2t(this));let f,p=!0;const m=o6(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&&ewt(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]=X2t(p,h)}catch{throw new H2t(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)W2t(this.prototype,d,r[d],n,i);return Object.keys(n).concat(u)}}return l};function ewt(t){const{styles:e}=t.constructor,{shadowRoot:n}=t;if(n&&e.length){const i=[];Pj(e,s=>{s&&(s instanceof Element?n.appendChild(s.cloneNode(!0)):i.push(s))}),i.length&&(n.adoptedStyleSheets=i)}}const Oj=t=>(e,n)=>{Cv(([i,s]=[])=>((s||!s)&&(s&&Tj(s,n)?i=i||!0:(rl(i)&&i(),i=null)),[i,n]),([i,s],o)=>o?(rl(i)&&i(),[]):[i||e(),s],t)},Td=Oj(Aj),twt=Oj(Ej);class nwt 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 Or=t=>{const e=Mj();return Cv((n=new nwt(t,(i,s,o)=>{i=rl(i)?i(s[0]):i,i!==s[0]&&(s[0]=i,o||e())}))=>n)},ob=(t,e)=>{const[n]=Cv(([i,s,o=0]=[])=>((!s||s&&!Tj(s,e))&&(i=t()),[i,e,o]));return n},vh=(t,e)=>ob(()=>t,e),r6=xv("atomico/options");globalThis[r6]=globalThis[r6]||{sheet:!!document.adoptedStyleSheets};const Dj=globalThis[r6];new Promise(t=>{Dj.ssr||(document.readyState==="loading"?Ij(document,"DOMContentLoaded",t):t())});const swt={checked:1,value:1,selected:1},iwt={list:1,type:1,size:1,form:1,width:1,height:1,src:1,href:1,slot:1},owt={shadowDom:1,staticNode:1,cloneNode:1,children:1,key:1},A_={},a6=[];class l6 extends Text{}const rwt=xv("atomico/id"),bg=xv("atomico/type"),rk=xv("atomico/ref"),Rj=xv("atomico/vnode"),awt=()=>{};function lwt(t,e,n){return Fj(this,t,e,n)}const Vj=(t,e,...n)=>{const i=e||A_;let{children:s}=i;if(s=s??(n.length?n:a6),t===awt)return s;const o=t?t instanceof Node?1:t.prototype instanceof HTMLElement&&2:0;if(o===!1&&t instanceof Function)return t(s!=a6?{children:s,...i}:i);const r=Dj.render||lwt;return{[bg]:Rj,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 Fj(t,e,n=rwt,i,s){let o;if(e&&e[n]&&e[n].vnode==t||t[bg]!=Rj)return e;(t||!e)&&(s=s||t.type=="svg",o=t.type!="host"&&(t.raw==1?(e&&t.clone?e[rk]:e)!=t.type:t.raw==2?!(e instanceof t.type):e?e[rk]||e.localName!=t.type:!e),o&&t.type!=null&&(t.raw==1&&t.clone?(i=!0,e=t.type.cloneNode(!0),e[rk]=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]:A_,{vnode:a=A_,cycle:l=0}=r;let{fragment:c,handlers:u}=r;const{children:d=a6,props:h=A_}=a;if(u=o?{}:u||{},t.static&&!o)return e;if(t.shadow&&!e.shadowRoot&&e.attachShadow({mode:"open",...t.shadow}),t.props!=h&&dwt(e,h,t.props,u,s),t.children!==d){const f=t.shadow?e.shadowRoot:e;c=uwt(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 cwt(t,e){const n=new l6(""),i=new l6("");let s;if(t[e?"prepend":"append"](n),e){let{lastElementChild:o}=t;for(;o;){const{previousElementSibling:r}=o;if(o6(o,!0)&&!o6(r,!0)){s=o;break}o=r}}return s?s.before(i):t.append(i),{markStart:n,markEnd:i}}function uwt(t,e,n,i,s,o){t=t==null?null:B2t(t)?t:[t];const r=e||cwt(n,s),{markStart:a,markEnd:l,keyes:c}=r;let u;const d=c&&new Set;let h=a;if(t&&Pj(t,f=>{if(typeof f=="object"&&!f[bg])return;const p=f[bg]&&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[bg])b=Fj(f,y,i,s,o);else{const k=f+"";!(b instanceof Text)||b instanceof l6?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 dwt(t,e,n,i,s){for(const o in e)!(o in n)&&sP(t,o,e[o],null,s,i);for(const o in n)sP(t,o,e[o],n[o],s,i)}function sP(t,e,n,i,s,o){if(e=e=="class"&&!s?"className":e,n=n??null,i=i??null,e in t&&swt[e]&&(n=t[e]),!(i===n||owt[e]||e[0]=="_"))if(t.localName==="slot"&&e==="assignNode"&&"assign"in t)t.assign(i);else if(e[0]=="o"&&e[1]=="n"&&(rl(i)||rl(n)))hwt(t,e.slice(2),i,o);else if(e=="ref")i&&(rl(i)?i(t):i.current=t);else if(e=="style"){const{style:r}=t;n=n||"",i=i||"";const a=yg(n),l=yg(i);if(a)for(const c in n)if(l)!(c in i)&&iP(r,c,null);else break;if(l)for(const c in i){const u=i[c];a&&n[c]===u||iP(r,c,u)}else r.cssText=i}else{const r=e[0]=="$"?e.slice(1):e;r===e&&(!s&&!iwt[e]&&e in t||rl(i)||rl(n))?t[e]=i??"":i==null?t.removeAttribute(r):t.setAttribute(r,yg(i)?JSON.stringify(i):i)}}function hwt(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 iP(t,e,n){let i="setProperty";n==null&&(i="removeProperty",n=null),~e.indexOf("-")?t[i](e,n):t[e]=n}const fwt=Vj("host",{style:"display: contents"}),pwt="value",mwt=(t,e)=>{const n=KS(),i=ud();twt(()=>Ij(n.current,"ConnectContext",s=>{s.composedPath().at(0)!==s.currentTarget&&t===s.detail.id&&(s.stopPropagation(),s.detail.connect(i))}),[t]),i.current=e},gwt=t=>{const e=th(({value:n})=>(mwt(e,n),fwt),{props:{value:{type:Object,value:()=>t}}});return e[pwt]=t,e};gwt({dispatch(t,e){}});const vwt=0,_h=1,_0=2,y0=3,oP=4,Em=5,c6=6,Nj=0,_wt=2,Bj=3,zj=4,Hj=Em,ywt=c6,Uj=(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===Bj?i[0]=a:r===zj?i[1]=Object.assign(i[1]||{},a):r===Hj?(i[1]=i[1]||{})[e[++o]]=a:r===ywt?i[1][e[++o]]+=a+"":r?(s=t.apply(a,Uj(t,a,n,["",null])),i.push(s),a[0]?e[0]|=2:(e[o-2]=Nj,e[o]=s)):i.push(a)}return i},bwt=function(t){let e=_h,n="",i="",s=[0],o,r;const a=l=>{e===_h&&(l||(n=n.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?s.push(Nj,l,n):e===y0&&(l||n)?(s.push(Bj,l,n),e=_0):e===_0&&n==="..."&&l?s.push(zj,l,0):e===_0&&n&&!l?s.push(Hj,0,!0,n):e>=Em&&((n||!l&&e===Em)&&(s.push(e,0,n,r),e=c6),l&&(s.push(e,l,0,r),e=c6)),n=""};for(let l=0;l<t.length;l++){l&&(e===_h&&a(),a(l));for(let c=0;c<t[l].length;c++)o=t[l][c],e===_h?o==="<"?(a(),s=[s],e=y0):n+=o:e===oP?n==="--"&&o===">"?(e=_h,n=""):n=o+n[0]:i?o===i?i="":n+=o:o==='"'||o==="'"?i=o:o===">"?(a(),e=_h):e&&(o==="="?(e=Em,r=n,n=""):o==="/"&&(e<Em||t[l][c+1]===">")?(a(),e===y0&&(s=s[0]),e=s,(s=s[0]).push(_wt,0,e),e=vwt):o===" "||o===" "||o===` | |
| 986 | +`||o==="\r"?(a(),e=_0):n+=o),e===y0&&n==="!--"&&(e=oP,s=s[0])}return a(),s},wwt=new Map;function It(t){let e=wwt;return e=Uj(Vj,e.get(t)||(e.set(t,e=bwt(t)),e),arguments,[]),e.length>1?e:e[0]}var ZS=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},yh=(t,e,n)=>(ZS(t,e,"read from private field"),n?n.call(t):e.get(t)),bh=(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)},wh=(t,e,n,i)=>(ZS(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),kwt=(t,e,n)=>(ZS(t,e,"access private method"),n),E_,M_,Mm,Tm,T_,u6,jj;let JS=class{constructor(e){bh(this,u6),bh(this,E_,void 0),bh(this,M_,void 0),bh(this,Mm,void 0),bh(this,Tm,void 0),bh(this,T_,void 0),wh(this,Mm,!1),this.onShow=()=>{},this.onHide=()=>{},wh(this,T_,(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(yh(this,Mm)||((s=n.dom.parentElement)==null||s.appendChild(this.element),wh(this,Mm,!0)),!(r||h)){if(!yh(this,M_).call(this,n,i)){this.hide();return}nC({getBoundingClientRect:()=>C2(n,u,d)},this.element,{placement:"top",middleware:[tC(),eC(yh(this,Tm))]}).then(({x:f,y:p})=>{Object.assign(this.element.style,{left:`${f}px`,top:`${p}px`})}),this.show()}}),this.update=(n,i)=>{N2(yh(this,T_),yh(this,E_))(n,i)},this.destroy=()=>{},this.show=n=>{this.element.dataset.show="true",n&&nC(n,this.element,{placement:"top",middleware:[tC(),eC(yh(this,Tm))]}).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,wh(this,E_,e.debounce??200),wh(this,M_,e.shouldShow??kwt(this,u6,jj)),wh(this,Tm,e.offset),this.element.dataset.show="false"}};E_=new WeakMap,M_=new WeakMap,Mm=new WeakMap,Tm=new WeakMap,T_=new WeakMap,u6=new WeakSet,jj=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 QS(t){const e=ms({},`${t}_TOOLTIP_SPEC`),n=Ls(s=>{const o=s.get(e.key);return new rs({key:new ps(`${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 Wj(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=Wj(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function ei(){for(var t,e,n=0,i="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=Wj(t))&&(i&&(i+=" "),i+=e);return i}var Cwt=Object.defineProperty,rP=Object.getOwnPropertySymbols,xwt=Object.prototype.hasOwnProperty,Swt=Object.prototype.propertyIsEnumerable,aP=(t,e,n)=>e in t?Cwt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$wt=(t,e)=>{for(var n in e||(e={}))xwt.call(e,n)&&aP(t,n,e[n]);if(rP)for(var n of rP(e))Swt.call(e,n)&&aP(t,n,e[n]);return t};function nh(t,e){return Object.assign(t,{meta:$wt({package:"@milkdown/components"},e)}),t}var Awt=Object.defineProperty,lP=Object.getOwnPropertySymbols,Ewt=Object.prototype.hasOwnProperty,Mwt=Object.prototype.propertyIsEnumerable,cP=(t,e,n)=>e in t?Awt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,e9=(t,e)=>{for(var n in e||(e={}))Ewt.call(e,n)&&cP(t,n,e[n]);if(lP)for(var n of lP(e))Mwt.call(e,n)&&cP(t,n,e[n]);return t};const Twt={mode:"preview"},kl=ms(e9({},Twt),"linkTooltipStateCtx");nh(kl,{displayName:"State<link-tooltip>",group:"LinkTooltip"});const Pwt={addLink:()=>{},editLink:()=>{},removeLink:()=>{}},op=ms(e9({},Pwt),"linkTooltipAPICtx");nh(kl,{displayName:"API<link-tooltip>",group:"LinkTooltip"});const Iwt={linkIcon:()=>"🔗",editButton:()=>"✎",removeButton:()=>"⌫",confirmButton:()=>It`Confirm ⏎`,onCopyLink:()=>{},inputPlaceholder:"Paste link..."},J2=ms(e9({},Iwt),"linkTooltipConfigCtx");nh(kl,{displayName:"Config<link-tooltip>",group:"LinkTooltip"});const Sv=QS("LINK_PREVIEW");nh(Sv[0],{displayName:"PreviewTooltipSpec<link-tooltip>",group:"LinkTooltip"});nh(Sv[1],{displayName:"PreviewTooltipPlugin<link-tooltip>",group:"LinkTooltip"});const Q2=QS("LINK_EDIT");nh(Q2[0],{displayName:"EditTooltipSpec<link-tooltip>",group:"LinkTooltip"});nh(Q2[1],{displayName:"EditTooltipPlugin<link-tooltip>",group:"LinkTooltip"});function Lwt(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 Owt(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===Yr.mark.type(t));if(!(!r||!Sv.pluginKey()))return{show:!0,pos:s,node:o,mark:r}}function Yj(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 qj=({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 It` | |
| 986 | 987 | <host> |
| 987 | 988 | <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})}}> |
| 988 | 989 | <span class="link-icon"> |
| 989 | 990 | ${t==null?void 0:t.linkIcon()} |
| @@ -988,9 +989,9 @@ | ||
| 988 | 989 | <span class="link-icon"> |
| 989 | 990 | ${t==null?void 0:t.linkIcon()} |
| 990 | 991 | </span> |
| 991 | 992 | <a href=${e} target="_blank" class="link-display">${e}</a> |
| 992 | - <span class="button link-edit-button" onmousedown=${i}> | |
| 993 | + <span class="button link-edit-button" onmousedown=${s}> | |
| 993 | 994 | ${t==null?void 0:t.editButton()} |
| 994 | 995 | </span> |
| 995 | 996 | <span class="button link-remove-button" onmousedown=${o}> |
| 996 | 997 | ${t==null?void 0:t.removeButton()} |
| @@ -996,41 +997,41 @@ | ||
| 996 | 997 | ${t==null?void 0:t.removeButton()} |
| 997 | 998 | </span> |
| 998 | 999 | </div> |
| 999 | 1000 | </host> |
| 1000 | - `};DU.props={config:Object,src:String,onEdit:Function,onRemove:Function};const RU=Md(DU);var VU=t=>{throw TypeError(t)},FU=(t,e,n)=>e.has(t)||VU("Cannot "+n),Ln=(t,e,n)=>(FU(t,e,"read from private field"),n?n.call(t):e.get(t)),bl=(t,e,n)=>e.has(t)?VU("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),P0=(t,e,n,s)=>(FU(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),Ll,ur,Kp,Zp,Yv,Gv,qv,Jp;class pyt{constructor(e,n){this.ctx=e,bl(this,Ll,new RU),bl(this,ur),bl(this,Kp,this.ctx.use(rl.key)),bl(this,Zp,!1),bl(this,Yv,({mode:s})=>{s==="edit"&&Ln(this,Jp).call(this)}),bl(this,Gv,()=>{P0(this,Zp,!0)}),bl(this,qv,()=>{P0(this,Zp,!1)}),bl(this,Jp,()=>{Ln(this,ur).hide(),Ln(this,ur).element.removeEventListener("mouseenter",Ln(this,Gv)),Ln(this,ur).element.removeEventListener("mouseleave",Ln(this,qv))}),this.show=(s,i,o,r)=>{Ln(this,Ll).config=this.ctx.get(r2.key),Ln(this,Ll).src=s.attrs.href,Ln(this,Ll).onEdit=()=>{this.ctx.get(Ef.key).editLink(s,i,o)},Ln(this,Ll).onRemove=()=>{this.ctx.get(Ef.key).removeLink(i,o),Ln(this,Jp).call(this)},Ln(this,ur).show({getBoundingClientRect:()=>r}),Ln(this,ur).element.addEventListener("mouseenter",Ln(this,Gv)),Ln(this,ur).element.addEventListener("mouseleave",Ln(this,qv))},this.hide=()=>{Ln(this,Zp)||Ln(this,Jp).call(this)},this.update=()=>{},this.destroy=()=>{Ln(this,Kp).off(Ln(this,Yv)),Ln(this,ur).destroy(),Ln(this,Ll).remove()},P0(this,ur,new W5({debounce:0,content:Ln(this,Ll),shouldShow:()=>!1})),Ln(this,ur).update(n),P0(this,Kp,e.use(rl.key)),Ln(this,Kp).on(Ln(this,Yv))}}Ll=new WeakMap;ur=new WeakMap;Kp=new WeakMap;Zp=new WeakMap;Yv=new WeakMap;Gv=new WeakMap;qv=new WeakMap;Jp=new WeakMap;OU("milkdown-link-preview",RU);function myt(t){let e;const s=Yb((o,r)=>{if(!e||!o.hasFocus()||t.get(rl.key).mode==="edit")return;const l=fyt(t,o,r);if(l){const c=o.state.doc.resolve(l.pos),u=hyt(l.mark,l.node,o.state.doc,c.before(),c.after()),d=u.start,h=u.end;e.show(l.mark,d,h,Tb(o,d,h));return}e.hide()},200),i=()=>{setTimeout(()=>{e==null||e.hide()},200)};t.set(B1.key,{props:{handleDOMEvents:{mousemove:s,mouseleave:i}},view:o=>(e=new pyt(t,o),e)})}const NU=({src:t,onConfirm:e,onCancel:n,config:s})=>{const i=Fu(),[o,r]=pr(t);nd(()=>{r(t??"")},[t]);const a=()=>{var c,u;e==null||e((u=(c=i.current)==null?void 0:c.value)!=null?u:"")},l=c=>{var u,d;c.stopPropagation(),c.key==="Enter"&&(e==null||e((d=(u=i.current)==null?void 0:u.value)!=null?d:""),c.preventDefault()),c.key==="Escape"&&(n==null||n(),c.preventDefault())};return kt` | |
| 1001 | + `};qj.props={config:Object,src:String,onEdit:Function,onRemove:Function};const Gj=th(qj);var Xj=t=>{throw TypeError(t)},Kj=(t,e,n)=>e.has(t)||Xj("Cannot "+n),Wn=(t,e,n)=>(Kj(t,e,"read from private field"),n?n.call(t):e.get(t)),jl=(t,e,n)=>e.has(t)?Xj("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),b0=(t,e,n,i)=>(Kj(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),sc,Tr,Pm,Im,P_,I_,L_,Lm;class Dwt{constructor(e,n){this.ctx=e,jl(this,sc,new Gj),jl(this,Tr),jl(this,Pm,this.ctx.use(kl.key)),jl(this,Im,!1),jl(this,P_,({mode:i})=>{i==="edit"&&Wn(this,Lm).call(this)}),jl(this,I_,()=>{b0(this,Im,!0)}),jl(this,L_,()=>{b0(this,Im,!1)}),jl(this,Lm,()=>{Wn(this,Tr).hide(),Wn(this,Tr).element.removeEventListener("mouseenter",Wn(this,I_)),Wn(this,Tr).element.removeEventListener("mouseleave",Wn(this,L_))}),this.show=(i,s,o,r)=>{Wn(this,sc).config=this.ctx.get(J2.key),Wn(this,sc).src=i.attrs.href,Wn(this,sc).onEdit=()=>{this.ctx.get(op.key).editLink(i,s,o)},Wn(this,sc).onRemove=()=>{this.ctx.get(op.key).removeLink(s,o),Wn(this,Lm).call(this)},Wn(this,Tr).show({getBoundingClientRect:()=>r}),Wn(this,Tr).element.addEventListener("mouseenter",Wn(this,I_)),Wn(this,Tr).element.addEventListener("mouseleave",Wn(this,L_))},this.hide=()=>{Wn(this,Im)||Wn(this,Lm).call(this)},this.update=()=>{},this.destroy=()=>{Wn(this,Pm).off(Wn(this,P_)),Wn(this,Tr).destroy(),Wn(this,sc).remove()},b0(this,Tr,new JS({debounce:0,content:Wn(this,sc),shouldShow:()=>!1})),Wn(this,Tr).update(n),b0(this,Pm,e.use(kl.key)),Wn(this,Pm).on(Wn(this,P_))}}sc=new WeakMap;Tr=new WeakMap;Pm=new WeakMap;Im=new WeakMap;P_=new WeakMap;I_=new WeakMap;L_=new WeakMap;Lm=new WeakMap;Yj("milkdown-link-preview",Gj);function Rwt(t){let e;const i=N2((o,r)=>{if(!e||!o.hasFocus()||t.get(kl.key).mode==="edit")return;const l=Owt(t,o,r);if(l){const c=o.state.doc.resolve(l.pos),u=Lwt(l.mark,l.node,o.state.doc,c.before(),c.after()),d=u.start,h=u.end;e.show(l.mark,d,h,C2(o,d,h));return}e.hide()},200),s=()=>{setTimeout(()=>{e==null||e.hide()},200)};t.set(Sv.key,{props:{handleDOMEvents:{mousemove:i,mouseleave:s}},view:o=>(e=new Dwt(t,o),e)})}const Zj=({src:t,onConfirm:e,onCancel:n,config:i})=>{const s=ud(),[o,r]=Or(t);Td(()=>{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 It` | |
| 1001 | 1002 | <host> |
| 1002 | 1003 | <div class="link-edit"> |
| 1003 | 1004 | <input |
| 1004 | 1005 | class="input-area" |
| 1005 | - placeholder=${s==null?void 0:s.inputPlaceholder} | |
| 1006 | - ref=${i} | |
| 1006 | + placeholder=${i==null?void 0:i.inputPlaceholder} | |
| 1007 | + ref=${s} | |
| 1007 | 1008 | onkeydown=${l} |
| 1008 | 1009 | oninput=${c=>r(c.target.value)} |
| 1009 | 1010 | value=${o} |
| 1010 | 1011 | /> |
| 1011 | - <span class=${Vs("button confirm",!o&&"hidden")} onclick=${a}> | |
| 1012 | - ${s==null?void 0:s.confirmButton()} | |
| 1012 | + <span class=${ei("button confirm",!o&&"hidden")} onclick=${a}> | |
| 1013 | + ${i==null?void 0:i.confirmButton()} | |
| 1013 | 1014 | </span> |
| 1014 | 1015 | </div> |
| 1015 | 1016 | </host> |
| 1016 | - `};NU.props={config:Object,src:String,onConfirm:Function,onCancel:Function};const BU=Md(NU);var gyt=Object.defineProperty,vyt=Object.defineProperties,_yt=Object.getOwnPropertyDescriptors,hT=Object.getOwnPropertySymbols,yyt=Object.prototype.hasOwnProperty,byt=Object.prototype.propertyIsEnumerable,zU=t=>{throw TypeError(t)},fT=(t,e,n)=>e in t?gyt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,I0=(t,e)=>{for(var n in e||(e={}))yyt.call(e,n)&&fT(t,n,e[n]);if(hT)for(var n of hT(e))byt.call(e,n)&&fT(t,n,e[n]);return t},pT=(t,e)=>vyt(t,_yt(e)),HU=(t,e,n)=>e.has(t)||zU("Cannot "+n),qn=(t,e,n)=>(HU(t,e,"read from private field"),n?n.call(t):e.get(t)),qd=(t,e,n)=>e.has(t)?zU("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),L0=(t,e,n,s)=>(HU(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),Zr,Ol,Dl,su,mk,Xv;const mT={from:-1,to:-1,mark:null};class wyt{constructor(e,n){this.ctx=e,qd(this,Zr,new BU),qd(this,Ol),qd(this,Dl,I0({},mT)),qd(this,su,()=>{qn(this,Ol).hide(),this.ctx.update(rl.key,s=>pT(I0({},s),{mode:"preview"})),L0(this,Dl,I0({},mT))}),qd(this,mk,s=>{const i=this.ctx.get(Vn),{from:o,to:r,mark:a}=qn(this,Dl),l=Ar.type(this.ctx);if(a&&a.attrs.href===s){qn(this,su).call(this);return}const c=i.state.tr;a&&c.removeMark(o,r,a),c.addMark(o,r,l.create({href:s})),i.dispatch(c),qn(this,su).call(this)}),qd(this,Xv,(s,i,o)=>{const r=this.ctx.get(r2.key);qn(this,Zr).config=r,qn(this,Zr).src=s,this.ctx.update(rl.key,l=>pT(I0({},l),{mode:"edit"}));const a=this.ctx.get(Vn);a.dispatch(a.state.tr.setSelection(St.create(a.state.doc,i,o))),qn(this,Ol).show({getBoundingClientRect:()=>Tb(a,i,o)}),requestAnimationFrame(()=>{var l;(l=qn(this,Zr).querySelector("input"))==null||l.focus()})}),this.update=s=>{const{state:i}=s,{selection:o}=i;if(!(o instanceof St))return;const{from:r,to:a}=o;r===qn(this,Dl).from&&a===qn(this,Dl).to||qn(this,su).call(this)},this.destroy=()=>{qn(this,Ol).destroy(),qn(this,Zr).remove()},this.addLink=(s,i)=>{L0(this,Dl,{from:s,to:i,mark:null}),qn(this,Xv).call(this,"",s,i)},this.editLink=(s,i,o)=>{L0(this,Dl,{from:i,to:o,mark:s}),qn(this,Xv).call(this,s.attrs.href,i,o)},this.removeLink=(s,i)=>{const o=this.ctx.get(Vn),r=o.state.tr;r.removeMark(s,i,Ar.type(this.ctx)),o.dispatch(r),qn(this,su).call(this)},L0(this,Ol,new W5({content:qn(this,Zr),debounce:0,shouldShow:()=>!1})),qn(this,Ol).onHide=()=>{qn(this,Zr).update().catch(s=>{throw s}),n.dom.focus({preventScroll:!0})},qn(this,Ol).update(n),qn(this,Zr).onConfirm=qn(this,mk),qn(this,Zr).onCancel=qn(this,su)}}Zr=new WeakMap;Ol=new WeakMap;Dl=new WeakMap;su=new WeakMap;mk=new WeakMap;Xv=new WeakMap;var Cyt=Object.defineProperty,kyt=Object.defineProperties,xyt=Object.getOwnPropertyDescriptors,gT=Object.getOwnPropertySymbols,Syt=Object.prototype.hasOwnProperty,$yt=Object.prototype.propertyIsEnumerable,vT=(t,e,n)=>e in t?Cyt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ayt=(t,e)=>{for(var n in e||(e={}))Syt.call(e,n)&&vT(t,n,e[n]);if(gT)for(var n of gT(e))$yt.call(e,n)&&vT(t,n,e[n]);return t},Myt=(t,e)=>kyt(t,xyt(e));OU("milkdown-link-edit",BU);function Eyt(t){let e;t.update(Ef.key,n=>Myt(Ayt({},n),{addLink:(s,i)=>{e==null||e.addLink(s,i)},editLink:(s,i,o)=>{e==null||e.editLink(s,i,o)},removeLink:(s,i)=>{e==null||e.removeLink(s,i)}})),t.set(a2.key,{view:n=>(e=new wyt(t,n),e)})}function Tyt(t){myt(t),Eyt(t)}const Pyt=[rl,Ef,r2,B1,a2].flat();kt` | |
| 1017 | + `};Zj.props={config:Object,src:String,onConfirm:Function,onCancel:Function};const Jj=th(Zj);var Vwt=Object.defineProperty,Fwt=Object.defineProperties,Nwt=Object.getOwnPropertyDescriptors,uP=Object.getOwnPropertySymbols,Bwt=Object.prototype.hasOwnProperty,zwt=Object.prototype.propertyIsEnumerable,Qj=t=>{throw TypeError(t)},dP=(t,e,n)=>e in t?Vwt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,w0=(t,e)=>{for(var n in e||(e={}))Bwt.call(e,n)&&dP(t,n,e[n]);if(uP)for(var n of uP(e))zwt.call(e,n)&&dP(t,n,e[n]);return t},hP=(t,e)=>Fwt(t,Nwt(e)),eW=(t,e,n)=>e.has(t)||Qj("Cannot "+n),cs=(t,e,n)=>(eW(t,e,"read from private field"),n?n.call(t):e.get(t)),kh=(t,e,n)=>e.has(t)?Qj("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),k0=(t,e,n,i)=>(eW(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),pa,ic,oc,Pu,d6,O_;const fP={from:-1,to:-1,mark:null};class Hwt{constructor(e,n){this.ctx=e,kh(this,pa,new Jj),kh(this,ic),kh(this,oc,w0({},fP)),kh(this,Pu,()=>{cs(this,ic).hide(),this.ctx.update(kl.key,i=>hP(w0({},i),{mode:"preview"})),k0(this,oc,w0({},fP))}),kh(this,d6,i=>{const s=this.ctx.get(Vn),{from:o,to:r,mark:a}=cs(this,oc),l=Yr.type(this.ctx);if(a&&a.attrs.href===i){cs(this,Pu).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),cs(this,Pu).call(this)}),kh(this,O_,(i,s,o)=>{const r=this.ctx.get(J2.key);cs(this,pa).config=r,cs(this,pa).src=i,this.ctx.update(kl.key,l=>hP(w0({},l),{mode:"edit"}));const a=this.ctx.get(Vn);a.dispatch(a.state.tr.setSelection(Ot.create(a.state.doc,s,o))),cs(this,ic).show({getBoundingClientRect:()=>C2(a,s,o)}),requestAnimationFrame(()=>{var l;(l=cs(this,pa).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===cs(this,oc).from&&a===cs(this,oc).to||cs(this,Pu).call(this)},this.destroy=()=>{cs(this,ic).destroy(),cs(this,pa).remove()},this.addLink=(i,s)=>{k0(this,oc,{from:i,to:s,mark:null}),cs(this,O_).call(this,"",i,s)},this.editLink=(i,s,o)=>{k0(this,oc,{from:s,to:o,mark:i}),cs(this,O_).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,Yr.type(this.ctx)),o.dispatch(r),cs(this,Pu).call(this)},k0(this,ic,new JS({content:cs(this,pa),debounce:0,shouldShow:()=>!1})),cs(this,ic).onHide=()=>{cs(this,pa).update().catch(i=>{throw i}),n.dom.focus({preventScroll:!0})},cs(this,ic).update(n),cs(this,pa).onConfirm=cs(this,d6),cs(this,pa).onCancel=cs(this,Pu)}}pa=new WeakMap;ic=new WeakMap;oc=new WeakMap;Pu=new WeakMap;d6=new WeakMap;O_=new WeakMap;var Uwt=Object.defineProperty,jwt=Object.defineProperties,Wwt=Object.getOwnPropertyDescriptors,pP=Object.getOwnPropertySymbols,Ywt=Object.prototype.hasOwnProperty,qwt=Object.prototype.propertyIsEnumerable,mP=(t,e,n)=>e in t?Uwt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gwt=(t,e)=>{for(var n in e||(e={}))Ywt.call(e,n)&&mP(t,n,e[n]);if(pP)for(var n of pP(e))qwt.call(e,n)&&mP(t,n,e[n]);return t},Xwt=(t,e)=>jwt(t,Wwt(e));Yj("milkdown-link-edit",Jj);function Kwt(t){let e;t.update(op.key,n=>Xwt(Gwt({},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(Q2.key,{view:n=>(e=new Hwt(t,n),e)})}function Zwt(t){Rwt(t),Kwt(t)}const Jwt=[kl,op,J2,Sv,Q2].flat();It` | |
| 1017 | 1018 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1018 | 1019 | <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"/> |
| 1019 | 1020 | </svg> |
| 1020 | -`;kt` | |
| 1021 | +`;It` | |
| 1021 | 1022 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1022 | 1023 | <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"/> |
| 1023 | 1024 | </svg> |
| 1024 | -`;kt` | |
| 1025 | +`;It` | |
| 1025 | 1026 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1026 | 1027 | <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"/> |
| 1027 | 1028 | </svg> |
| 1028 | -`;const Iyt=kt` | |
| 1029 | +`;const Qwt=It` | |
| 1029 | 1030 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1030 | 1031 | <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"/> |
| 1031 | 1032 | </svg> |
| 1032 | -`;kt` | |
| 1033 | +`;It` | |
| 1033 | 1034 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1034 | 1035 | <g clip-path="url(#clip0_952_6527)"> |
| 1035 | 1036 | <circle cx="12" cy="12" r="3"/> |
| 1036 | 1037 | </g> |
| @@ -1039,9 +1040,9 @@ | ||
| 1039 | 1040 | <rect width="24" height="24"/> |
| 1040 | 1041 | </clipPath> |
| 1041 | 1042 | </defs> |
| 1042 | 1043 | </svg> |
| 1043 | -`;const Lyt=kt` | |
| 1044 | +`;const e3t=It` | |
| 1044 | 1045 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1045 | 1046 | <g clip-path="url(#clip0_977_8070)"> |
| 1046 | 1047 | <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"/> |
| 1047 | 1048 | </g> |
| @@ -1050,13 +1051,13 @@ | ||
| 1050 | 1051 | <rect width="24" height="24"/> |
| 1051 | 1052 | </clipPath> |
| 1052 | 1053 | </defs> |
| 1053 | 1054 | </svg> |
| 1054 | -`,Oyt=kt` | |
| 1055 | +`,t3t=It` | |
| 1055 | 1056 | <svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"> |
| 1056 | 1057 | <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"/> |
| 1057 | 1058 | </svg> |
| 1058 | -`;kt` | |
| 1059 | +`;It` | |
| 1059 | 1060 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1060 | 1061 | <g clip-path="url(#clip0_1803_1151)"> |
| 1061 | 1062 | <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"/> |
| 1062 | 1063 | </g> |
| @@ -1065,9 +1066,9 @@ | ||
| 1065 | 1066 | <rect width="24" height="24"/> |
| 1066 | 1067 | </clipPath> |
| 1067 | 1068 | </defs> |
| 1068 | 1069 | </svg> |
| 1069 | -`;kt` | |
| 1070 | +`;It` | |
| 1070 | 1071 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1071 | 1072 | <g clip-path="url(#clip0_1803_535)"> |
| 1072 | 1073 | <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"/> |
| 1073 | 1074 | </g> |
| @@ -1076,13 +1077,13 @@ | ||
| 1076 | 1077 | <rect width="24" height="24"/> |
| 1077 | 1078 | </clipPath> |
| 1078 | 1079 | </defs> |
| 1079 | 1080 | </svg> |
| 1080 | -`;kt` | |
| 1081 | +`;It` | |
| 1081 | 1082 | <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"> |
| 1082 | 1083 | <path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5" /> |
| 1083 | 1084 | </svg> |
| 1084 | -`;kt` | |
| 1085 | +`;It` | |
| 1085 | 1086 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1086 | 1087 | <g clip-path="url(#clip0_1098_15553)"> |
| 1087 | 1088 | <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"/> |
| 1088 | 1089 | </g> |
| @@ -1091,9 +1092,9 @@ | ||
| 1091 | 1092 | <rect width="24" height="24"/> |
| 1092 | 1093 | </clipPath> |
| 1093 | 1094 | </defs> |
| 1094 | 1095 | </svg> |
| 1095 | -`;const UU=kt` | |
| 1096 | +`;const tW=It` | |
| 1096 | 1097 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1097 | 1098 | <g clip-path="url(#clip0_977_8081)"> |
| 1098 | 1099 | <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"/> |
| 1099 | 1100 | </g> |
| @@ -1102,9 +1103,9 @@ | ||
| 1102 | 1103 | <rect width="24" height="24"/> |
| 1103 | 1104 | </clipPath> |
| 1104 | 1105 | </defs> |
| 1105 | 1106 | </svg> |
| 1106 | -`,jU=kt` | |
| 1107 | +`,nW=It` | |
| 1107 | 1108 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"> |
| 1108 | 1109 | <g clip-path="url(#clip0_1013_1606)"> |
| 1109 | 1110 | <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"/> |
| 1110 | 1111 | </g> |
| @@ -1113,9 +1114,9 @@ | ||
| 1113 | 1114 | <rect width="24" height="24" /> |
| 1114 | 1115 | </clipPath> |
| 1115 | 1116 | </defs> |
| 1116 | 1117 | </svg> |
| 1117 | -`;kt` | |
| 1118 | +`,n3t=It` | |
| 1118 | 1119 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1119 | 1120 | <g clip-path="url(#clip0_977_7900)"> |
| 1120 | 1121 | <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"/> |
| 1121 | 1122 | </g> |
| @@ -1124,13 +1125,13 @@ | ||
| 1124 | 1125 | <rect width="24" height="24"/> |
| 1125 | 1126 | </clipPath> |
| 1126 | 1127 | </defs> |
| 1127 | 1128 | </svg> |
| 1128 | -`;kt` | |
| 1129 | +`;It` | |
| 1129 | 1130 | <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"> |
| 1130 | 1131 | <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"/> |
| 1131 | 1132 | </svg> |
| 1132 | -`;const Dyt=kt` | |
| 1133 | +`;const s3t=It` | |
| 1133 | 1134 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1134 | 1135 | <g clip-path="url(#clip0_1013_1585)"> |
| 1135 | 1136 | <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"/> |
| 1136 | 1137 | </g> |
| @@ -1139,9 +1140,9 @@ | ||
| 1139 | 1140 | <rect width="24" height="24"/> |
| 1140 | 1141 | </clipPath> |
| 1141 | 1142 | </defs> |
| 1142 | 1143 | </svg> |
| 1143 | -`;kt` | |
| 1144 | +`;It` | |
| 1144 | 1145 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1145 | 1146 | <g clip-path="url(#clip0_992_5553)"> |
| 1146 | 1147 | <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"/> |
| 1147 | 1148 | </g> |
| @@ -1150,9 +1151,9 @@ | ||
| 1150 | 1151 | <rect width="24" height="24"/> |
| 1151 | 1152 | </clipPath> |
| 1152 | 1153 | </defs> |
| 1153 | 1154 | </svg> |
| 1154 | -`;const Ryt=kt` | |
| 1155 | +`;const i3t=It` | |
| 1155 | 1156 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1156 | 1157 | <g clip-path="url(#clip0_992_5559)"> |
| 1157 | 1158 | <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"/> |
| 1158 | 1159 | </g> |
| @@ -1161,9 +1162,9 @@ | ||
| 1161 | 1162 | <rect width="24" height="24"/> |
| 1162 | 1163 | </clipPath> |
| 1163 | 1164 | </defs> |
| 1164 | 1165 | </svg> |
| 1165 | -`,Vyt=kt` | |
| 1166 | +`,o3t=It` | |
| 1166 | 1167 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1167 | 1168 | <g clip-path="url(#clip0_992_5565)"> |
| 1168 | 1169 | <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"/> |
| 1169 | 1170 | </g> |
| @@ -1172,9 +1173,9 @@ | ||
| 1172 | 1173 | <rect width="24" height="24"/> |
| 1173 | 1174 | </clipPath> |
| 1174 | 1175 | </defs> |
| 1175 | 1176 | </svg> |
| 1176 | -`,Fyt=kt` | |
| 1177 | +`,r3t=It` | |
| 1177 | 1178 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1178 | 1179 | <g clip-path="url(#clip0_977_7757)"> |
| 1179 | 1180 | <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"/> |
| 1180 | 1181 | </g> |
| @@ -1183,9 +1184,9 @@ | ||
| 1183 | 1184 | <rect width="24" height="24"/> |
| 1184 | 1185 | </clipPath> |
| 1185 | 1186 | </defs> |
| 1186 | 1187 | </svg> |
| 1187 | -`;kt` | |
| 1188 | +`;It` | |
| 1188 | 1189 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1189 | 1190 | <g clip-path="url(#clip0_977_7760)"> |
| 1190 | 1191 | <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"/> |
| 1191 | 1192 | </g> |
| @@ -1194,9 +1195,9 @@ | ||
| 1194 | 1195 | <rect width="24" height="24"/> |
| 1195 | 1196 | </clipPath> |
| 1196 | 1197 | </defs> |
| 1197 | 1198 | </svg> |
| 1198 | -`;kt` | |
| 1199 | +`;It` | |
| 1199 | 1200 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1200 | 1201 | <g clip-path="url(#clip0_977_7763)"> |
| 1201 | 1202 | <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"/> |
| 1202 | 1203 | </g> |
| @@ -1205,9 +1206,9 @@ | ||
| 1205 | 1206 | <rect width="24" height="24"/> |
| 1206 | 1207 | </clipPath> |
| 1207 | 1208 | </defs> |
| 1208 | 1209 | </svg> |
| 1209 | -`;const gk=kt` | |
| 1210 | +`;const h6=It` | |
| 1210 | 1211 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1211 | 1212 | <g clip-path="url(#clip0_977_8075)"> |
| 1212 | 1213 | <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"/> |
| 1213 | 1214 | </g> |
| @@ -1216,17 +1217,17 @@ | ||
| 1216 | 1217 | <rect width="24" height="24"/> |
| 1217 | 1218 | </clipPath> |
| 1218 | 1219 | </defs> |
| 1219 | 1220 | </svg> |
| 1220 | -`,Nyt=kt` | |
| 1221 | +`,a3t=It` | |
| 1221 | 1222 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1222 | 1223 | <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"/> |
| 1223 | 1224 | </svg> |
| 1224 | -`,WU=kt` | |
| 1225 | +`,sW=It` | |
| 1225 | 1226 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1226 | 1227 | <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"/> |
| 1227 | 1228 | </svg> |
| 1228 | -`;kt` | |
| 1229 | +`;It` | |
| 1229 | 1230 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1230 | 1231 | <g clip-path="url(#clip0_971_7680)"> |
| 1231 | 1232 | <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" /> |
| 1232 | 1233 | </g> |
| @@ -1235,9 +1236,9 @@ | ||
| 1235 | 1236 | <rect width="24" height="24"/> |
| 1236 | 1237 | </clipPath> |
| 1237 | 1238 | </defs> |
| 1238 | 1239 | </svg> |
| 1239 | -`;const Byt=kt` | |
| 1240 | +`;const l3t=It` | |
| 1240 | 1241 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1241 | 1242 | <g clip-path="url(#clip0_977_8067)"> |
| 1242 | 1243 | <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"/> |
| 1243 | 1244 | </g> |
| @@ -1246,9 +1247,9 @@ | ||
| 1246 | 1247 | <rect width="24" height="24"/> |
| 1247 | 1248 | </clipPath> |
| 1248 | 1249 | </defs> |
| 1249 | 1250 | </svg> |
| 1250 | -`;kt` | |
| 1251 | +`;It` | |
| 1251 | 1252 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1252 | 1253 | <g clip-path="url(#clip0_971_7676)"> |
| 1253 | 1254 | <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"/> |
| 1254 | 1255 | </g> |
| @@ -1257,9 +1258,9 @@ | ||
| 1257 | 1258 | <rect width="24" height="24"/> |
| 1258 | 1259 | </clipPath> |
| 1259 | 1260 | </defs> |
| 1260 | 1261 | </svg> |
| 1261 | -`;const zyt=kt` | |
| 1262 | +`;const c3t=It` | |
| 1262 | 1263 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1263 | 1264 | <g clip-path="url(#clip0_977_7897)"> |
| 1264 | 1265 | <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"/> |
| 1265 | 1266 | </g> |
| @@ -1268,21 +1269,21 @@ | ||
| 1268 | 1269 | <rect width="24" height="24"/> |
| 1269 | 1270 | </clipPath> |
| 1270 | 1271 | </defs> |
| 1271 | 1272 | </svg> |
| 1272 | -`,Hyt=kt` | |
| 1273 | +`,u3t=It` | |
| 1273 | 1274 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1274 | 1275 | <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"/> |
| 1275 | 1276 | </svg> |
| 1276 | -`;kt` | |
| 1277 | +`;It` | |
| 1277 | 1278 | <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"> |
| 1278 | 1279 | <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" /> |
| 1279 | 1280 | </svg> |
| 1280 | -`;const Uyt=kt` | |
| 1281 | +`;const d3t=It` | |
| 1281 | 1282 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1282 | 1283 | <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"/> |
| 1283 | 1284 | </svg> |
| 1284 | -`;kt` | |
| 1285 | +`;It` | |
| 1285 | 1286 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1286 | 1287 | <g clip-path="url(#clip0_977_8078)"> |
| 1287 | 1288 | <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"/> |
| 1288 | 1289 | </g> |
| @@ -1291,9 +1292,9 @@ | ||
| 1291 | 1292 | <rect width="24" height="24"/> |
| 1292 | 1293 | </clipPath> |
| 1293 | 1294 | </defs> |
| 1294 | 1295 | </svg> |
| 1295 | -`;const jyt=kt` | |
| 1296 | +`;const h3t=It` | |
| 1296 | 1297 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1297 | 1298 | <g clip-path="url(#clip0_992_5547)"> |
| 1298 | 1299 | <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"/> |
| 1299 | 1300 | </g> |
| @@ -1302,81 +1303,81 @@ | ||
| 1302 | 1303 | <rect width="24" height="24"/> |
| 1303 | 1304 | </clipPath> |
| 1304 | 1305 | </defs> |
| 1305 | 1306 | </svg> |
| 1306 | -`;kt` | |
| 1307 | +`;It` | |
| 1307 | 1308 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> |
| 1308 | 1309 | <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"/> |
| 1309 | 1310 | </svg> |
| 1310 | -`;const Wyt=(t,e)=>{t.config(Tyt).config(n=>{n.update(r2.key,s=>({...s,linkIcon:(e==null?void 0:e.linkIcon)??(()=>WU),editButton:(e==null?void 0:e.editButton)??(()=>Dyt),removeButton:(e==null?void 0:e.removeButton)??(()=>Hyt),confirmButton:(e==null?void 0:e.confirmButton)??(()=>jU),inputPlaceholder:(e==null?void 0:e.inputPlaceholder)??"Paste link...",onCopyLink:(e==null?void 0:e.onCopyLink)??(()=>{})}))}).use(Pyt)},Yyt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:Wyt},Symbol.toStringTag,{value:"Module"}));var YU="Expected a function",_T=0/0,Gyt="[object Symbol]",qyt=/^\s+|\s+$/g,Xyt=/^[-+]0x[0-9a-f]+$/i,Kyt=/^0b[01]+$/i,Zyt=/^0o[0-7]+$/i,Jyt=parseInt,Qyt=typeof us=="object"&&us&&us.Object===Object&&us,ebt=typeof self=="object"&&self&&self.Object===Object&&self,tbt=Qyt||ebt||Function("return this")(),nbt=Object.prototype,sbt=nbt.toString,ibt=Math.max,obt=Math.min,h3=function(){return tbt.Date.now()};function rbt(t,e,n){var s,i,o,r,a,l,c=0,u=!1,d=!1,h=!0;if(typeof t!="function")throw new TypeError(YU);e=yT(e)||0,vy(n)&&(u=!!n.leading,d="maxWait"in n,o=d?ibt(yT(n.maxWait)||0,e):o,h="trailing"in n?!!n.trailing:h);function f(E){var T=s,P=i;return s=i=void 0,c=E,r=t.apply(P,T),r}function p(E){return c=E,a=setTimeout(y,e),u?f(E):r}function m(E){var T=E-l,P=E-c,I=e-T;return d?obt(I,o-P):I}function b(E){var T=E-l,P=E-c;return l===void 0||T>=e||T<0||d&&P>=o}function y(){var E=h3();if(b(E))return C(E);a=setTimeout(y,m(E))}function C(E){return a=void 0,h&&s?f(E):(s=i=void 0,r)}function k(){a!==void 0&&clearTimeout(a),c=0,s=l=i=a=void 0}function x(){return a===void 0?r:C(h3())}function S(){var E=h3(),T=b(E);if(s=arguments,i=this,l=E,T){if(a===void 0)return p(l);if(d)return a=setTimeout(y,e),f(l)}return a===void 0&&(a=setTimeout(y,e)),r}return S.cancel=k,S.flush=x,S}function abt(t,e,n){var s=!0,i=!0;if(typeof t!="function")throw new TypeError(YU);return vy(n)&&(s="leading"in n?!!n.leading:s,i="trailing"in n?!!n.trailing:i),rbt(t,e,{leading:s,maxWait:e,trailing:i})}function vy(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function lbt(t){return!!t&&typeof t=="object"}function cbt(t){return typeof t=="symbol"||lbt(t)&&sbt.call(t)==Gyt}function yT(t){if(typeof t=="number")return t;if(cbt(t))return _T;if(vy(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=vy(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(qyt,"");var n=Kyt.test(t);return n||Zyt.test(t)?Jyt(t.slice(2),n?2:8):Xyt.test(t)?_T:+t}var ubt=abt;const dbt=Ts(ubt);var GU=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},vn=(t,e,n)=>(GU(t,e,"read from private field"),n?n.call(t):e.get(t)),Js=(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)},On=(t,e,n,s)=>(GU(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);function l2(t,e){return Object.assign(t,{meta:{package:"@milkdown/plugin-block",...e}}),t}const hbt=t=>!G4(e=>e.type.name==="table")(t),z1=es({filterNodes:hbt},"blockConfig");l2(z1,{displayName:"Ctx<blockConfig>"});function fbt(t,e,n){var s;if(!t.dom.parentElement)return null;try{const i=(s=t.posAtCoords({left:e.x,top:e.y}))==null?void 0:s.inside;if(i==null||i<0)return null;let o=t.state.doc.resolve(i),r=t.state.doc.nodeAt(i),a=t.nodeDOM(i);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}}catch{return null}}let bT=null;function pbt(){return bT||(bT=document.implementation.createHTMLDocument("title"))}const mbt={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 gbt(t,e){const n=[];let{openStart:s,openEnd:i,content:o}=e;for(;s>1&&i>1&&o.childCount===1&&o.firstChild.childCount===1;){s-=1,i-=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")||Ic.fromSchema(t.state.schema),a=pbt(),l=a.createElement("div");l.appendChild(r.serializeFragment(o,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType===1&&(u=mbt[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",`${s} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`);const h=t.someProp("clipboardTextSerializer",f=>f(e,t))||e.content.textBetween(0,e.content.size,` | |
| 1311 | +`;const f3t=(t,e)=>{t.config(Zwt).config(n=>{n.update(J2.key,i=>({...i,linkIcon:(e==null?void 0:e.linkIcon)??(()=>sW),editButton:(e==null?void 0:e.editButton)??(()=>s3t),removeButton:(e==null?void 0:e.removeButton)??(()=>u3t),confirmButton:(e==null?void 0:e.confirmButton)??(()=>nW),inputPlaceholder:(e==null?void 0:e.inputPlaceholder)??"Paste link...",onCopyLink:(e==null?void 0:e.onCopyLink)??(()=>{})}))}).use(Jwt)},p3t=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:f3t},Symbol.toStringTag,{value:"Module"}));var iW="Expected a function",gP=0/0,m3t="[object Symbol]",g3t=/^\s+|\s+$/g,v3t=/^[-+]0x[0-9a-f]+$/i,_3t=/^0b[01]+$/i,y3t=/^0o[0-7]+$/i,b3t=parseInt,w3t=typeof xs=="object"&&xs&&xs.Object===Object&&xs,k3t=typeof self=="object"&&self&&self.Object===Object&&self,C3t=w3t||k3t||Function("return this")(),x3t=Object.prototype,S3t=x3t.toString,$3t=Math.max,A3t=Math.min,ak=function(){return C3t.Date.now()};function E3t(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(iW);e=vP(e)||0,rb(n)&&(u=!!n.leading,d="maxWait"in n,o=d?$3t(vP(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?A3t(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=ak();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(ak())}function S(){var M=ak(),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 S.cancel=C,S.flush=$,S}function M3t(t,e,n){var i=!0,s=!0;if(typeof t!="function")throw new TypeError(iW);return rb(n)&&(i="leading"in n?!!n.leading:i,s="trailing"in n?!!n.trailing:s),E3t(t,e,{leading:i,maxWait:e,trailing:s})}function rb(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function T3t(t){return!!t&&typeof t=="object"}function P3t(t){return typeof t=="symbol"||T3t(t)&&S3t.call(t)==m3t}function vP(t){if(typeof t=="number")return t;if(P3t(t))return gP;if(rb(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=rb(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(g3t,"");var n=_3t.test(t);return n||y3t.test(t)?b3t(t.slice(2),n?2:8):v3t.test(t)?gP:+t}var I3t=M3t;const L3t=vi(I3t);var oW=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Cn=(t,e,n)=>(oW(t,e,"read from private field"),n?n.call(t):e.get(t)),ki=(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)},Yn=(t,e,n,i)=>(oW(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n);function ew(t,e){return Object.assign(t,{meta:{package:"@milkdown/plugin-block",...e}}),t}const O3t=t=>!Q8(e=>e.type.name==="table")(t),$v=ms({filterNodes:O3t},"blockConfig");ew($v,{displayName:"Ctx<blockConfig>"});function D3t(t,e,n){var i;if(!t.dom.parentElement)return null;try{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}}catch{return null}}let _P=null;function R3t(){return _P||(_P=document.implementation.createHTMLDocument("title"))}const V3t={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 F3t(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")||su.fromSchema(t.state.schema),a=R3t(),l=a.createElement("div");l.appendChild(r.serializeFragment(o,{document:a}));let c=l.firstChild,u,d=0;for(;c&&c.nodeType===1&&(u=V3t[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,` | |
| 1311 | 1312 | |
| 1312 | -`);return{dom:l,text:h}}const wT=w0.ie&&w0.ie_version<15||w0.ios&&w0.webkit_version<604,CT=20;var Bm,Kv,mh,Jr,Qp,Qr,vk,qU,gh,em,vh,_h,Zv,tm,nm,sm,Jv,yh;class vbt{constructor(){Js(this,vk),Js(this,gh),Js(this,Bm,void 0),Js(this,Kv,void 0),Js(this,mh,void 0),Js(this,Jr,void 0),Js(this,Qp,void 0),Js(this,Qr,void 0),Js(this,vh,void 0),Js(this,_h,void 0),Js(this,Zv,void 0),Js(this,tm,void 0),Js(this,nm,void 0),Js(this,sm,void 0),Js(this,Jv,void 0),Js(this,yh,void 0),On(this,Kv,()=>{if(!vn(this,Jr))return null;const e=vn(this,Jr),n=vn(this,gh,em);if(n&&At.isSelectable(e.node)){const s=At.create(n.state.doc,e.$pos.pos);return n.dispatch(n.state.tr.setSelection(s)),n.focus(),On(this,mh,s),s}return null}),On(this,mh,null),On(this,Jr,null),On(this,Qp,void 0),On(this,Qr,!1),On(this,_h,()=>{var e;(e=vn(this,vh))==null||e.call(this,{type:"hide"}),On(this,Jr,null)}),On(this,Zv,e=>{var n;On(this,Jr,e),(n=vn(this,vh))==null||n.call(this,{type:"show",active:e})}),this.bind=(e,n)=>{On(this,Bm,e),On(this,vh,n)},this.addEvent=e=>{e.addEventListener("mousedown",vn(this,tm)),e.addEventListener("mouseup",vn(this,nm)),e.addEventListener("dragstart",vn(this,sm))},this.removeEvent=e=>{e.removeEventListener("mousedown",vn(this,tm)),e.removeEventListener("mouseup",vn(this,nm)),e.removeEventListener("dragstart",vn(this,sm))},this.unBind=()=>{On(this,vh,void 0)},On(this,tm,()=>{var e;On(this,Qp,(e=vn(this,Jr))==null?void 0:e.el.getBoundingClientRect()),vn(this,Kv).call(this)}),On(this,nm,()=>{if(!vn(this,Qr)){requestAnimationFrame(()=>{var e;vn(this,Qp)&&((e=vn(this,gh,em))==null||e.focus())});return}On(this,Qr,!1),On(this,mh,null)}),On(this,sm,e=>{var n;On(this,Qr,!0);const s=vn(this,gh,em);if(!s)return;s.dom.dataset.dragging="true";const i=vn(this,mh);if(e.dataTransfer&&i){const o=i.content();e.dataTransfer.effectAllowed="copyMove";const{dom:r,text:a}=gbt(s,o);e.dataTransfer.clearData(),e.dataTransfer.setData(wT?"Text":"text/html",r.innerHTML),wT||e.dataTransfer.setData("text/plain",a);const l=(n=vn(this,Jr))==null?void 0:n.el;l&&e.dataTransfer.setDragImage(l,0,0),s.dragging={slice:o,move:!0}}}),this.keydownCallback=e=>(vn(this,_h).call(this),On(this,Qr,!1),e.dom.dataset.dragging="false",!1),On(this,Jv,dbt((e,n)=>{if(!e.editable)return;const s=e.dom.getBoundingClientRect(),i=s.left+s.width/2;if(!(e.root.elementFromPoint(i,n.clientY)instanceof Element)){vn(this,_h).call(this);return}const o=vn(this,vk,qU);if(!o)return;const r=fbt(e,{x:i,y:n.clientY},o);if(!r){vn(this,_h).call(this);return}vn(this,Zv).call(this,r)},200)),this.mousemoveCallback=(e,n)=>(e.composing||!e.editable||vn(this,Jv).call(this,e,n),!1),this.dragoverCallback=(e,n)=>{var s;if(vn(this,Qr)){const i=(s=vn(this,gh,em))==null?void 0:s.dom.parentElement;if(!i)return!1;const o=i.scrollHeight>i.clientHeight,r=i.getBoundingClientRect();if(o){if(i.scrollTop>0&&Math.abs(n.y-r.y)<CT){const l=i.scrollTop>10?i.scrollTop-10:0;return i.scrollTop=l,!1}const a=Math.round(e.dom.getBoundingClientRect().height);if(Math.round(i.scrollTop+r.height)<a&&Math.abs(n.y-(r.height+r.y))<CT){const l=i.scrollTop+10;return i.scrollTop=l,!1}}}return!1},this.dragenterCallback=e=>{e.dragging&&(On(this,Qr,!0),e.dom.dataset.dragging="true")},this.dragleaveCallback=(e,n)=>{const s=n.clientX,i=n.clientY;(s<0||i<0||s>window.innerWidth||i>window.innerHeight)&&(On(this,Jr,null),vn(this,yh).call(this,e))},this.dropCallback=e=>(vn(this,yh).call(this,e),!1),this.dragendCallback=e=>{vn(this,yh).call(this,e)},On(this,yh,e=>{On(this,Qr,!1),e.dom.dataset.dragging="false"})}}Bm=new WeakMap,Kv=new WeakMap,mh=new WeakMap,Jr=new WeakMap,Qp=new WeakMap,Qr=new WeakMap,vk=new WeakSet,qU=function(){var t;return(t=vn(this,Bm))==null?void 0:t.get(z1.key).filterNodes},gh=new WeakSet,em=function(){var t;return(t=vn(this,Bm))==null?void 0:t.get(Vn)},vh=new WeakMap,_h=new WeakMap,Zv=new WeakMap,tm=new WeakMap,nm=new WeakMap,sm=new WeakMap,Jv=new WeakMap,yh=new WeakMap;const XU=es(new vbt,"blockService");l2(z1,{displayName:"Ctx<blockService>"});const q5=es({},"blockSpec");l2(z1,{displayName:"Ctx<blockSpec>"});const X5=vs(t=>{const e=new Kn("MILKDOWN_BLOCK"),n=t.get(XU.key),s=t.get(q5.key);return new Yn({key:e,...s,props:{...s.props,handleDOMEvents:{drop:i=>n.dropCallback(i),pointermove:(i,o)=>n.mousemoveCallback(i,o),keydown:i=>n.keydownCallback(i),dragover:(i,o)=>n.dragoverCallback(i,o),dragleave:(i,o)=>n.dragleaveCallback(i,o),dragenter:i=>n.dragenterCallback(i),dragend:i=>n.dragendCallback(i)}}})});l2(X5,{displayName:"Prose<block>"});const K5=[q5,z1,XU,X5];K5.key=q5.key;K5.pluginKey=X5.key;var Z5=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},Kl=(t,e,n)=>(Z5(t,e,"read from private field"),n?n.call(t):e.get(t)),Wc=(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)},Yc=(t,e,n,s)=>(Z5(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n),_bt=(t,e,n)=>(Z5(t,e,"access private method"),n);function ybt(t){const e=es({},`${t}_SLASH_SPEC`),n=vs(i=>{const o=i.get(e.key);return new Yn({key:new Kn(`${t}_SLASH`),...o})}),s=[e,n];return s.key=e.key,s.pluginKey=n.key,e.meta={package:"@milkdown/plugin-slash",displayName:`Ctx<slashSpec>|${t}`},n.meta={package:"@milkdown/plugin-slash",displayName:`Prose<slash>|${t}`},s}var im,Qv,kh,e_,t_,n_,_k,KU;class bbt{constructor(e){Wc(this,_k),Wc(this,im,void 0),Wc(this,Qv,void 0),Wc(this,kh,void 0),Wc(this,e_,void 0),Wc(this,t_,void 0),Wc(this,n_,void 0),Yc(this,im,!1),this.onShow=()=>{},this.onHide=()=>{},Yc(this,n_,(n,s)=>{var i;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=s&&s.doc.eq(l)&&s.selection.eq(a);if(Kl(this,im)||((i=n.dom.parentElement)==null||i.appendChild(this.element),Yc(this,im,!0)),!(r||h)){if(!Kl(this,e_).call(this,n,s)){this.hide();return}r6({getBoundingClientRect:()=>Tb(n,u,d)},this.element,{placement:"bottom-start",middleware:[o6(),i6(Kl(this,t_))]}).then(({x:f,y:p})=>{Object.assign(this.element.style,{left:`${f}px`,top:`${p}px`})}),this.show()}}),this.update=(n,s)=>{Yb(Kl(this,n_),Kl(this,Qv))(n,s)},this.getContent=(n,s=i=>i.type.name==="paragraph")=>{const{selection:i}=n.state,{empty:o,$from:r}=i,a=n.state.selection instanceof St,l=this.element.contains(document.activeElement),c=!n.hasFocus()&&!l,u=!n.editable,d=!v4e(s)(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,Yc(this,Qv,e.debounce??200),Yc(this,e_,e.shouldShow??_bt(this,_k,KU)),Yc(this,kh,e.trigger??"/"),Yc(this,t_,e.offset)}}im=new WeakMap,Qv=new WeakMap,kh=new WeakMap,e_=new WeakMap,t_=new WeakMap,n_=new WeakMap,_k=new WeakSet,KU=function(t){const e=this.getContent(t);if(!e)return!1;const n=e.at(-1);return n?Array.isArray(Kl(this,kh))?Kl(this,kh).includes(n):Kl(this,kh)===n:!1};function ZU(t){return t.$from.parent.type.name==="code_block"}function JU(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 QU(t,e){customElements.get(t)==null&&customElements.define(t,e)}var wbt=Object.defineProperty,kT=Object.getOwnPropertySymbols,Cbt=Object.prototype.hasOwnProperty,kbt=Object.prototype.propertyIsEnumerable,xT=(t,e,n)=>e in t?wbt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,xbt=(t,e)=>{for(var n in e||(e={}))Cbt.call(e,n)&&xT(t,n,e[n]);if(kT)for(var n of kT(e))kbt.call(e,n)&&xT(t,n,e[n]);return t};function H1(t,e){return Object.assign(t,{meta:xbt({package:"@milkdown/components"},e)}),t}var Sbt=Object.defineProperty,ST=Object.getOwnPropertySymbols,$bt=Object.prototype.hasOwnProperty,Abt=Object.prototype.propertyIsEnumerable,$T=(t,e,n)=>e in t?Sbt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Mbt=(t,e)=>{for(var n in e||(e={}))$bt.call(e,n)&&$T(t,n,e[n]);if(ST)for(var n of ST(e))Abt.call(e,n)&&$T(t,n,e[n]);return t};const yk="image-block",c2=$s("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="${yk}"]`,getAttrs:t=>{var e;if(!(t instanceof HTMLElement))throw Ur(t);return{src:t.getAttribute("src")||"",caption:t.getAttribute("caption")||"",ratio:Number((e=t.getAttribute("ratio"))!=null?e:1)}}}],toDOM:t=>["img",Mbt({"data-type":yk},t.attrs)],parseMarkdown:{match:({type:t})=>t==="image-block",runner:(t,e,n)=>{const s=e.url,i=e.title;let o=Number(e.alt||1);(Number.isNaN(o)||o===0)&&(o=1),t.addNode(n,{src:s,caption:i,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()}}}));H1(c2.node,{displayName:"NodeSchema<image-block>",group:"ImageBlock"});function Ebt(t){return yd(t,"paragraph",(e,n,s)=>{var i,o;if(((i=e.children)==null?void 0:i.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};s.children.splice(n,1,u)})}const J5=bd("remark-image-block",()=>()=>Ebt);H1(J5.plugin,{displayName:"Remark<remarkImageBlock>",group:"ImageBlock"});H1(J5.options,{displayName:"RemarkConfig<remarkImageBlock>",group:"ImageBlock"});const Tbt={imageIcon:()=>"🌌",captionIcon:()=>"💬",uploadButton:()=>kt`Upload file`,confirmButton:()=>kt`Confirm ⏎`,uploadPlaceholderText:"or paste the image link ...",captionPlaceholderText:"Image caption",onUpload:t=>Promise.resolve(URL.createObjectURL(t))},u2=es(Tbt,"imageBlockConfigCtx");H1(u2,{displayName:"Config<image-block>",group:"ImageBlock"});function Pbt(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 Ibt({image:t,resizeHandle:e,ratio:n,setRatio:s,src:i}){const o=U5(),r=gy(()=>o.current.getRootNode(),[o]);nd(()=>{const a=t.current;a&&(delete a.dataset.origin,delete a.dataset.height,a.style.height="")},[i]),nd(()=>{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,b=Number(m<100?100:m).toFixed(2);l.dataset.height=b,l.style.height=`${b}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)||s(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,b=m.height,y=m.width,C=y<p?b:p*(b/y),k=(C*n).toFixed(2);l.dataset.origin=C.toFixed(2),l.dataset.height=k,l.style.height=`${k}px`};return l.addEventListener("load",h),a.addEventListener("pointerdown",d),()=>{l.removeEventListener("load",h),a.removeEventListener("pointerdown",d)}},[])}var Lbt=(t,e,n)=>new Promise((s,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},r=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(o,r);a((n=n.apply(t,e)).next())});let Xd=0;const ej=({src:t="",caption:e="",ratio:n=1,selected:s=!1,readonly:i=!1,setAttr:o,config:r})=>{const a=Fu(),l=Fu(),c=Fu(),[u,d]=pr(e.length>0),[h,f]=pr(t.length!==0),[p]=pr(crypto.randomUUID()),[m,b]=pr(!1),[y,C]=pr(t);Ibt({image:a,resizeHandle:l,ratio:n,setRatio:D=>o==null?void 0:o("ratio",D),src:t}),nd(()=>{s||d(e.length>0)},[s]);const k=D=>{const Y=D.target.value;Xd&&window.clearTimeout(Xd),Xd=window.setTimeout(()=>{o==null||o("caption",Y)},1e3)},x=D=>{const Y=D.target.value;Xd&&(window.clearTimeout(Xd),Xd=0),o==null||o("caption",Y)},S=D=>{const Y=D.target.value;f(Y.length!==0),C(Y)},E=D=>Lbt(void 0,null,function*(){var z;const Y=(z=D.target.files)==null?void 0:z[0];if(!Y)return;const B=yield r==null?void 0:r.onUpload(Y);B&&(o==null||o("src",B),f(!0))}),T=D=>{D.preventDefault(),D.stopPropagation(),!i&&d(z=>!z)},P=()=>{var D,z;o==null||o("src",(z=(D=c.current)==null?void 0:D.value)!=null?z:"")},I=D=>{D.key==="Enter"&&P()},L=D=>{D.preventDefault(),D.stopPropagation()},V=D=>{D.stopPropagation(),D.preventDefault()};return kt`<host class=${Vs(s&&"selected")}> | |
| 1313 | - <div class=${Vs("image-edit",t.length>0&&"hidden")}> | |
| 1313 | +`);return{dom:l,text:h}}const yP=u0.ie&&u0.ie_version<15||u0.ios&&u0.webkit_version<604,bP=20;var wg,D_,Hh,ma,Om,ga,f6,rW,Uh,Dm,jh,Wh,R_,Rm,Vm,Fm,V_,Yh;class N3t{constructor(){ki(this,f6),ki(this,Uh),ki(this,wg,void 0),ki(this,D_,void 0),ki(this,Hh,void 0),ki(this,ma,void 0),ki(this,Om,void 0),ki(this,ga,void 0),ki(this,jh,void 0),ki(this,Wh,void 0),ki(this,R_,void 0),ki(this,Rm,void 0),ki(this,Vm,void 0),ki(this,Fm,void 0),ki(this,V_,void 0),ki(this,Yh,void 0),Yn(this,D_,()=>{if(!Cn(this,ma))return null;const e=Cn(this,ma),n=Cn(this,Uh,Dm);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(),Yn(this,Hh,i),i}return null}),Yn(this,Hh,null),Yn(this,ma,null),Yn(this,Om,void 0),Yn(this,ga,!1),Yn(this,Wh,()=>{var e;(e=Cn(this,jh))==null||e.call(this,{type:"hide"}),Yn(this,ma,null)}),Yn(this,R_,e=>{var n;Yn(this,ma,e),(n=Cn(this,jh))==null||n.call(this,{type:"show",active:e})}),this.bind=(e,n)=>{Yn(this,wg,e),Yn(this,jh,n)},this.addEvent=e=>{e.addEventListener("mousedown",Cn(this,Rm)),e.addEventListener("mouseup",Cn(this,Vm)),e.addEventListener("dragstart",Cn(this,Fm))},this.removeEvent=e=>{e.removeEventListener("mousedown",Cn(this,Rm)),e.removeEventListener("mouseup",Cn(this,Vm)),e.removeEventListener("dragstart",Cn(this,Fm))},this.unBind=()=>{Yn(this,jh,void 0)},Yn(this,Rm,()=>{var e;Yn(this,Om,(e=Cn(this,ma))==null?void 0:e.el.getBoundingClientRect()),Cn(this,D_).call(this)}),Yn(this,Vm,()=>{if(!Cn(this,ga)){requestAnimationFrame(()=>{var e;Cn(this,Om)&&((e=Cn(this,Uh,Dm))==null||e.focus())});return}Yn(this,ga,!1),Yn(this,Hh,null)}),Yn(this,Fm,e=>{var n;Yn(this,ga,!0);const i=Cn(this,Uh,Dm);if(!i)return;i.dom.dataset.dragging="true";const s=Cn(this,Hh);if(e.dataTransfer&&s){const o=s.content();e.dataTransfer.effectAllowed="copyMove";const{dom:r,text:a}=F3t(i,o);e.dataTransfer.clearData(),e.dataTransfer.setData(yP?"Text":"text/html",r.innerHTML),yP||e.dataTransfer.setData("text/plain",a);const l=(n=Cn(this,ma))==null?void 0:n.el;l&&e.dataTransfer.setDragImage(l,0,0),i.dragging={slice:o,move:!0}}}),this.keydownCallback=e=>(Cn(this,Wh).call(this),Yn(this,ga,!1),e.dom.dataset.dragging="false",!1),Yn(this,V_,L3t((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)){Cn(this,Wh).call(this);return}const o=Cn(this,f6,rW);if(!o)return;const r=D3t(e,{x:s,y:n.clientY},o);if(!r){Cn(this,Wh).call(this);return}Cn(this,R_).call(this,r)},200)),this.mousemoveCallback=(e,n)=>(e.composing||!e.editable||Cn(this,V_).call(this,e,n),!1),this.dragoverCallback=(e,n)=>{var i;if(Cn(this,ga)){const s=(i=Cn(this,Uh,Dm))==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)<bP){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))<bP){const l=s.scrollTop+10;return s.scrollTop=l,!1}}}return!1},this.dragenterCallback=e=>{e.dragging&&(Yn(this,ga,!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)&&(Yn(this,ma,null),Cn(this,Yh).call(this,e))},this.dropCallback=e=>(Cn(this,Yh).call(this,e),!1),this.dragendCallback=e=>{Cn(this,Yh).call(this,e)},Yn(this,Yh,e=>{Yn(this,ga,!1),e.dom.dataset.dragging="false"})}}wg=new WeakMap,D_=new WeakMap,Hh=new WeakMap,ma=new WeakMap,Om=new WeakMap,ga=new WeakMap,f6=new WeakSet,rW=function(){var t;return(t=Cn(this,wg))==null?void 0:t.get($v.key).filterNodes},Uh=new WeakSet,Dm=function(){var t;return(t=Cn(this,wg))==null?void 0:t.get(Vn)},jh=new WeakMap,Wh=new WeakMap,R_=new WeakMap,Rm=new WeakMap,Vm=new WeakMap,Fm=new WeakMap,V_=new WeakMap,Yh=new WeakMap;const aW=ms(new N3t,"blockService");ew($v,{displayName:"Ctx<blockService>"});const t9=ms({},"blockSpec");ew($v,{displayName:"Ctx<blockSpec>"});const n9=Ls(t=>{const e=new ps("MILKDOWN_BLOCK"),n=t.get(aW.key),i=t.get(t9.key);return new rs({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)}}})});ew(n9,{displayName:"Prose<block>"});const s9=[t9,$v,aW,n9];s9.key=t9.key;s9.pluginKey=n9.key;var i9=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)},yc=(t,e,n)=>(i9(t,e,"read from private field"),n?n.call(t):e.get(t)),_u=(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)},yu=(t,e,n,i)=>(i9(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),B3t=(t,e,n)=>(i9(t,e,"access private method"),n);function z3t(t){const e=ms({},`${t}_SLASH_SPEC`),n=Ls(s=>{const o=s.get(e.key);return new rs({key:new ps(`${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 Nm,F_,Kh,N_,B_,z_,p6,lW;class H3t{constructor(e){_u(this,p6),_u(this,Nm,void 0),_u(this,F_,void 0),_u(this,Kh,void 0),_u(this,N_,void 0),_u(this,B_,void 0),_u(this,z_,void 0),yu(this,Nm,!1),this.onShow=()=>{},this.onHide=()=>{},yu(this,z_,(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(yc(this,Nm)||((s=n.dom.parentElement)==null||s.appendChild(this.element),yu(this,Nm,!0)),!(r||h)){if(!yc(this,N_).call(this,n,i)){this.hide();return}nC({getBoundingClientRect:()=>C2(n,u,d)},this.element,{placement:"bottom-start",middleware:[tC(),eC(yc(this,B_))]}).then(({x:f,y:p})=>{Object.assign(this.element.style,{left:`${f}px`,top:`${p}px`})}),this.show()}}),this.update=(n,i)=>{N2(yc(this,z_),yc(this,F_))(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=!Y5e(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,yu(this,F_,e.debounce??200),yu(this,N_,e.shouldShow??B3t(this,p6,lW)),yu(this,Kh,e.trigger??"/"),yu(this,B_,e.offset)}}Nm=new WeakMap,F_=new WeakMap,Kh=new WeakMap,N_=new WeakMap,B_=new WeakMap,z_=new WeakMap,p6=new WeakSet,lW=function(t){const e=this.getContent(t);if(!e)return!1;const n=e.at(-1);return n?Array.isArray(yc(this,Kh))?yc(this,Kh).includes(n):yc(this,Kh)===n:!1};function cW(t){return t.$from.parent.type.name==="code_block"}function uW(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 dW(t,e){customElements.get(t)==null&&customElements.define(t,e)}var U3t=Object.defineProperty,wP=Object.getOwnPropertySymbols,j3t=Object.prototype.hasOwnProperty,W3t=Object.prototype.propertyIsEnumerable,kP=(t,e,n)=>e in t?U3t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Y3t=(t,e)=>{for(var n in e||(e={}))j3t.call(e,n)&&kP(t,n,e[n]);if(wP)for(var n of wP(e))W3t.call(e,n)&&kP(t,n,e[n]);return t};function Av(t,e){return Object.assign(t,{meta:Y3t({package:"@milkdown/components"},e)}),t}var q3t=Object.defineProperty,CP=Object.getOwnPropertySymbols,G3t=Object.prototype.hasOwnProperty,X3t=Object.prototype.propertyIsEnumerable,xP=(t,e,n)=>e in t?q3t(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,K3t=(t,e)=>{for(var n in e||(e={}))G3t.call(e,n)&&xP(t,n,e[n]);if(CP)for(var n of CP(e))X3t.call(e,n)&&xP(t,n,e[n]);return t};const m6="image-block",tw=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="${m6}"]`,getAttrs:t=>{var e;if(!(t instanceof HTMLElement))throw ra(t);return{src:t.getAttribute("src")||"",caption:t.getAttribute("caption")||"",ratio:Number((e=t.getAttribute("ratio"))!=null?e:1)}}}],toDOM:t=>["img",K3t({"data-type":m6},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()}}}));Av(tw.node,{displayName:"NodeSchema<image-block>",group:"ImageBlock"});function Z3t(t){return qd(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 o9=Gd("remark-image-block",()=>()=>Z3t);Av(o9.plugin,{displayName:"Remark<remarkImageBlock>",group:"ImageBlock"});Av(o9.options,{displayName:"RemarkConfig<remarkImageBlock>",group:"ImageBlock"});const J3t={imageIcon:()=>"🌌",captionIcon:()=>"💬",uploadButton:()=>It`Upload file`,confirmButton:()=>It`Confirm ⏎`,uploadPlaceholderText:"or paste the image link ...",captionPlaceholderText:"Image caption",onUpload:t=>Promise.resolve(URL.createObjectURL(t))},nw=ms(J3t,"imageBlockConfigCtx");Av(nw,{displayName:"Config<image-block>",group:"ImageBlock"});function Q3t(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 ekt({image:t,resizeHandle:e,ratio:n,setRatio:i,src:s}){const o=KS(),r=ob(()=>o.current.getRootNode(),[o]);Td(()=>{const a=t.current;a&&(delete a.dataset.origin,delete a.dataset.height,a.style.height="")},[s]),Td(()=>{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 tkt=(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 Ch=0;const hW=({src:t="",caption:e="",ratio:n=1,selected:i=!1,readonly:s=!1,setAttr:o,config:r})=>{const a=ud(),l=ud(),c=ud(),[u,d]=Or(e.length>0),[h,f]=Or(t.length!==0),[p]=Or(crypto.randomUUID()),[m,y]=Or(!1),[b,k]=Or(t);ekt({image:a,resizeHandle:l,ratio:n,setRatio:V=>o==null?void 0:o("ratio",V),src:t}),Td(()=>{i||d(e.length>0)},[i]);const C=V=>{const F=V.target.value;Ch&&window.clearTimeout(Ch),Ch=window.setTimeout(()=>{o==null||o("caption",F)},1e3)},$=V=>{const F=V.target.value;Ch&&(window.clearTimeout(Ch),Ch=0),o==null||o("caption",F)},S=V=>{const F=V.target.value;f(F.length!==0),k(F)},M=V=>tkt(void 0,null,function*(){var B;const F=(B=V.target.files)==null?void 0:B[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(B=>!B)},T=()=>{var V,B;o==null||o("src",(B=(V=c.current)==null?void 0:V.value)!=null?B:"")},I=V=>{V.key==="Enter"&&T()},L=V=>{V.preventDefault(),V.stopPropagation()},R=V=>{V.stopPropagation(),V.preventDefault()};return It`<host class=${ei(i&&"selected")}> | |
| 1314 | + <div class=${ei("image-edit",t.length>0&&"hidden")}> | |
| 1314 | 1315 | <div class="image-icon"> |
| 1315 | 1316 | ${r==null?void 0:r.imageIcon()} |
| 1316 | 1317 | </div> |
| 1317 | - <div class=${Vs("link-importer",m&&"focus")}> | |
| 1318 | + <div class=${ei("link-importer",m&&"focus")}> | |
| 1318 | 1319 | <input |
| 1319 | 1320 | ref=${c} |
| 1320 | 1321 | draggable="true" |
| 1321 | 1322 | ondragstart=${L} |
| 1322 | - disabled=${i} | |
| 1323 | + disabled=${s} | |
| 1323 | 1324 | class="link-input-area" |
| 1324 | - value=${y} | |
| 1325 | + value=${b} | |
| 1325 | 1326 | oninput=${S} |
| 1326 | 1327 | onkeydown=${I} |
| 1327 | - onfocus=${()=>b(!0)} | |
| 1328 | - onblur=${()=>b(!1)} | |
| 1328 | + onfocus=${()=>y(!0)} | |
| 1329 | + onblur=${()=>y(!1)} | |
| 1329 | 1330 | /> |
| 1330 | - <div class=${Vs("placeholder",h&&"hidden")}> | |
| 1331 | - <input disabled=${i} class="hidden" id=${p} type="file" accept="image/*" onchange=${E} /> | |
| 1332 | - <label onpointerdown=${V} class="uploader" for=${p}> | |
| 1331 | + <div class=${ei("placeholder",h&&"hidden")}> | |
| 1332 | + <input disabled=${s} class="hidden" id=${p} type="file" accept="image/*" onchange=${M} /> | |
| 1333 | + <label onpointerdown=${R} class="uploader" for=${p}> | |
| 1333 | 1334 | ${r==null?void 0:r.uploadButton()} |
| 1334 | 1335 | </label> |
| 1335 | - <span class="text" onclick=${()=>{var D;return(D=c.current)==null?void 0:D.focus()}}> | |
| 1336 | + <span class="text" onclick=${()=>{var V;return(V=c.current)==null?void 0:V.focus()}}> | |
| 1336 | 1337 | ${r==null?void 0:r.uploadPlaceholderText} |
| 1337 | 1338 | </span> |
| 1338 | 1339 | </div> |
| 1339 | 1340 | </div> |
| 1340 | 1341 | <div |
| 1341 | - class=${Vs("confirm",y.length===0&&"hidden")} | |
| 1342 | - onclick=${()=>P()} | |
| 1342 | + class=${ei("confirm",b.length===0&&"hidden")} | |
| 1343 | + onclick=${()=>T()} | |
| 1343 | 1344 | > |
| 1344 | 1345 | ${r==null?void 0:r.confirmButton()} |
| 1345 | 1346 | </div> |
| 1346 | 1347 | </div> |
| 1347 | - <div class=${Vs("image-wrapper",t.length===0&&"hidden")}> | |
| 1348 | + <div class=${ei("image-wrapper",t.length===0&&"hidden")}> | |
| 1348 | 1349 | <div class="operation"> |
| 1349 | - <div class="operation-item" onpointerdown=${T}>${r==null?void 0:r.captionIcon()}</div> | |
| 1350 | + <div class="operation-item" onpointerdown=${P}>${r==null?void 0:r.captionIcon()}</div> | |
| 1350 | 1351 | </div> |
| 1351 | - <img ref=${a} data-type=${yk} src=${t} alt=${e} ratio=${n} /> | |
| 1352 | + <img ref=${a} data-type=${m6} src=${t} alt=${e} ratio=${n} /> | |
| 1352 | 1353 | <div ref=${l} class="image-resize-handle"></div> |
| 1353 | 1354 | </div> |
| 1354 | 1355 | <input |
| 1355 | 1356 | draggable="true" |
| 1356 | 1357 | ondragstart=${L} |
| 1357 | - class=${Vs("caption-input",!u&&"hidden")} | |
| 1358 | + class=${ei("caption-input",!u&&"hidden")} | |
| 1358 | 1359 | placeholder=${r==null?void 0:r.captionPlaceholderText} |
| 1359 | - oninput=${k} | |
| 1360 | - onblur=${x} | |
| 1360 | + oninput=${C} | |
| 1361 | + onblur=${$} | |
| 1361 | 1362 | value=${e} |
| 1362 | 1363 | /> |
| 1363 | - </host>`};ej.props={src:String,caption:String,ratio:Number,selected:Boolean,readonly:Boolean,setAttr:Function,config:Object};const Obt=Md(ej);Pbt("milkdown-image-block",Obt);const tj=iB(c2.node,t=>(e,n,s)=>{const i=document.createElement("milkdown-image-block"),o=t.get(u2.key),r=a=>{i.src=a.attrs.src,i.ratio=a.attrs.ratio,i.caption=a.attrs.caption,i.readonly=!n.editable};return r(e),i.selected=!1,i.setAttr=(a,l)=>{const c=s();c!=null&&n.dispatch(n.state.tr.setNodeAttribute(c,a,l))},i.config=o,{dom:i,update:a=>a.type!==e.type?!1:(r(a),!0),stopEvent:a=>a.target instanceof HTMLInputElement,selectNode:()=>{i.selected=!0},deselectNode:()=>{i.selected=!1},destroy:()=>{i.remove()}}});H1(tj,{displayName:"NodeView<image-block>",group:"ImageBlock"});const Dbt=[J5,c2,tj,u2].flat();function Q5(t){const{$from:e,$to:n}=t.selection,{pos:s}=e,{pos:i}=n;return t=t.deleteRange(s-e.node().content.size,i),t}function Rbt(t,e,n=null){const{from:s,to:i}=t.selection;return t.setBlockType(s,i,e,n)}function Vbt(t,e,n=null){const{$from:s,$to:i}=t.selection,o=s.blockRange(i),r=o&&U4(o,e,n);return r?t.wrap(o,r):null}function Fbt(t,e,n=null){const s=e.createAndFill(n);return s?t.replaceSelectionWith(s):null}function O0(t,e=null){return(n,s)=>{if(s){const i=Rbt(Q5(n.tr),t,e);s(i.scrollIntoView())}return!0}}function f3(t,e=null){return(n,s)=>{const i=Vbt(Q5(n.tr),t,e);return i?(s&&s(i.scrollIntoView()),!0):!1}}function AT(t,e=null){return(n,s)=>{const i=Fbt(Q5(n.tr),t,e);return i?(s&&s(i.scrollIntoView()),!0):!1}}var Zl,Uh;class Nbt{constructor(){Gr(this,Zl,void 0);Gr(this,Uh,void 0);Oi(this,Zl,[]),this.clear=()=>(Oi(this,Zl,[]),this),Oi(this,Uh,e=>{const n={group:e,addItem:(s,i)=>{const o={key:s,...i};return e.items.push(o),n},clear:()=>(e.items=[],n)};return n}),this.addGroup=(e,n)=>{const i={key:e,label:n,items:[]};return Dt(this,Zl).push(i),Dt(this,Uh).call(this,i)},this.getGroup=e=>{const n=Dt(this,Zl).find(s=>s.key===e);if(!n)throw new Error(`Group with key ${e} not found`);return Dt(this,Uh).call(this,n)},this.build=()=>Dt(this,Zl)}}Zl=new WeakMap,Uh=new WeakMap;function To(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 Bbt(t,e){var o,r,a,l,c,u,d,h,f,p;const n=new Nbt;n.addGroup("text",(e==null?void 0:e.slashMenuTextGroupLabel)??To("Text")).addItem("text",{label:(e==null?void 0:e.slashMenuTextGroupLabel)??To("Text"),icon:((o=e==null?void 0:e.slashMenuTextIcon)==null?void 0:o.call(e))??jyt,onRun:m=>{const b=m.get(Vn),{dispatch:y,state:C}=b;O0(dl.type(m))(C,y)}}).addItem("h2",{label:(e==null?void 0:e.slashMenuH2Label)??To("Heading 2"),icon:((r=e==null?void 0:e.slashMenuH2Icon)==null?void 0:r.call(e))??Ryt,onRun:m=>{const b=m.get(Vn),{dispatch:y,state:C}=b;O0(la.type(m),{level:2})(C,y)}}).addItem("h3",{label:(e==null?void 0:e.slashMenuH3Label)??To("Heading 3"),icon:((a=e==null?void 0:e.slashMenuH3Icon)==null?void 0:a.call(e))??Vyt,onRun:m=>{const b=m.get(Vn),{dispatch:y,state:C}=b;O0(la.type(m),{level:3})(C,y)}}).addItem("h4",{label:(e==null?void 0:e.slashMenuH4Label)??To("Heading 4"),icon:((l=e==null?void 0:e.slashMenuH4Icon)==null?void 0:l.call(e))??Fyt,onRun:m=>{const b=m.get(Vn),{dispatch:y,state:C}=b;O0(la.type(m),{level:4})(C,y)}}).addItem("quote",{label:(e==null?void 0:e.slashMenuQuoteLabel)??To("Quote"),icon:((c=e==null?void 0:e.slashMenuQuoteIcon)==null?void 0:c.call(e))??zyt,onRun:m=>{const b=m.get(Vn),{dispatch:y,state:C}=b;f3(Uf.type(m))(C,y)}}).addItem("code",{label:(e==null?void 0:e.slashMenuCodeBlockLabel)??To("Code"),icon:((u=e==null?void 0:e.slashMenuCodeBlockIcon)==null?void 0:u.call(e))??UU,onRun:m=>{const b=m.get(Vn),{dispatch:y,state:C}=b;AT(jf.type(m))(C,y)}}),n.addGroup("list",(e==null?void 0:e.slashMenuListGroupLabel)??To("List")).addItem("bullet-list",{label:(e==null?void 0:e.slashMenuBulletListLabel)??To("Bullet List"),icon:((d=e==null?void 0:e.slashMenuBulletListIcon)==null?void 0:d.call(e))??Lyt,onRun:m=>{const b=m.get(Vn),{dispatch:y,state:C}=b;f3(kd.type(m))(C,y)}}).addItem("ordered-list",{label:(e==null?void 0:e.slashMenuOrderedListLabel)??To("Ordered List"),icon:((h=e==null?void 0:e.slashMenuOrderedListIcon)==null?void 0:h.call(e))??Byt,onRun:m=>{const b=m.get(Vn),{dispatch:y,state:C}=b;f3(xd.type(m))(C,y)}}),(e==null?void 0:e.hasImageBlock)!==!1&&n.addGroup("media",(e==null?void 0:e.slashMenuMediaGroupLabel)??To("Media")).addItem("image",{label:(e==null?void 0:e.slashMenuImageLabel)??To("Image"),icon:((f=e==null?void 0:e.slashMenuImageIcon)==null?void 0:f.call(e))??gk,onRun:m=>{if(e!=null&&e.canAddImage&&!e.canAddImage())return;const b=m.get(Vn),{dispatch:y,state:C}=b;AT(c2.type(m))(C,y)}}),(p=e==null?void 0:e.buildMenu)==null||p.call(e,n);let s=n.build();t&&(s=s.map(m=>{const b=m.items.filter(y=>y.label.toLowerCase().includes(t.toLowerCase()));return{...m,items:b}}).filter(m=>m.items.length>0));const i=s.flatMap(m=>m.items);return i.forEach((m,b)=>{Object.assign(m,{index:b})}),s.reduce((m,b)=>{const y=m+b.items.length;return Object.assign(b,{range:[m,y]}),y},0),{groups:s,size:i.length}}const nj=({show:t,hide:e,ctx:n,filter:s,config:i})=>{const{groups:o,size:r}=gy(()=>Bbt(s,i),[s]),a=U5(),[l,c]=pr(0),u=gy(()=>a.current.getRootNode(),[a]),d=Fu({x:-999,y:-999}),h=Ud(C=>{const k=d.current;if(!k)return;const{x,y:S}=C;k.x=x,k.y=S},[]);nd(()=>{r===0&&t&&(e==null||e())},[r,t]);const f=Ud((C,k)=>{c(x=>{const S=typeof C=="function"?C(x):C;return k==null||k(S),S})},[]),p=Ud(C=>{const k=a.current.querySelector(`[data-index="${C}"]`),x=a.current.querySelector(".menu-groups");!k||!x||(x.scrollTop=k.offsetTop-x.offsetTop)},[]),m=Ud(C=>{const k=o.flatMap(x=>x.items).at(C);k&&n&&k.onRun(n),e==null||e()},[o]),b=Ud(C=>{if(C.key==="Escape"){C.preventDefault(),e==null||e();return}if(C.key==="ArrowDown")return C.preventDefault(),f(k=>k<r-1?k+1:k,p);if(C.key==="ArrowUp")return C.preventDefault(),f(k=>k<=0?k:k-1,p);if(C.key==="ArrowLeft")return C.preventDefault(),f(k=>{const x=o.find(E=>E.range[0]<=k&&E.range[1]>k);if(!x)return k;const S=o[o.indexOf(x)-1];return S?S.range[1]-1:k},p);if(C.key==="ArrowRight")return C.preventDefault(),f(k=>{const x=o.find(E=>E.range[0]<=k&&E.range[1]>k);if(!x)return k;const S=o[o.indexOf(x)+1];return S?S.range[0]:k},p);C.key==="Enter"&&(C.preventDefault(),m(l))},[e,o,l]),y=Ud(C=>k=>{const x=d.current;if(!x)return;const{x:S,y:E}=k;S===x.x&&E===x.y||f(C)},[]);return nd(()=>(t?u.addEventListener("keydown",b,{capture:!0}):u.removeEventListener("keydown",b,{capture:!0}),()=>{u.removeEventListener("keydown",b,{capture:!0})}),[t,b]),kt` | |
| 1364 | - <host onmousedown=${C=>C.preventDefault()}> | |
| 1364 | + </host>`};hW.props={src:String,caption:String,ratio:Number,selected:Boolean,readonly:Boolean,setAttr:Function,config:Object};const nkt=th(hW);Q3t("milkdown-image-block",nkt);const fW=gz(tw.node,t=>(e,n,i)=>{const s=document.createElement("milkdown-image-block"),o=t.get(nw.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()}}});Av(fW,{displayName:"NodeView<image-block>",group:"ImageBlock"});const skt=[o9,tw,fW,nw].flat();function r9(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 ikt(t,e,n=null){const{from:i,to:s}=t.selection;return t.setBlockType(i,s,e,n)}function okt(t,e,n=null){const{$from:i,$to:s}=t.selection,o=i.blockRange(s),r=o&&X8(o,e,n);return r?t.wrap(o,r):null}function rkt(t,e,n=null){const i=e.createAndFill(n);return i?t.replaceSelectionWith(i):null}function C0(t,e=null){return(n,i)=>{if(i){const s=ikt(r9(n.tr),t,e);i(s.scrollIntoView())}return!0}}function lk(t,e=null){return(n,i)=>{const s=okt(r9(n.tr),t,e);return s?(i&&i(s.scrollIntoView()),!0):!1}}function ck(t,e=null){return(n,i)=>{const s=rkt(r9(n.tr),t,e);return s?(i&&i(s.scrollIntoView()),!0):!1}}var bc,kf;class akt{constructor(){ua(this,bc,void 0);ua(this,kf,void 0);Qi(this,bc,[]),this.clear=()=>(Qi(this,bc,[]),this),Qi(this,kf,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 Gt(this,bc).push(s),Gt(this,kf).call(this,s)},this.getGroup=e=>{const n=Gt(this,bc).find(i=>i.key===e);if(!n)throw new Error(`Group with key ${e} not found`);return Gt(this,kf).call(this,n)},this.build=()=>Gt(this,bc)}}bc=new WeakMap,kf=new WeakMap;function xo(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 lkt(t,e){var o,r,a,l,c,u,d,h,f,p,m;const n=new akt;n.addGroup("text",(e==null?void 0:e.slashMenuTextGroupLabel)??xo("Text")).addItem("text",{label:(e==null?void 0:e.slashMenuTextGroupLabel)??xo("Text"),icon:((o=e==null?void 0:e.slashMenuTextIcon)==null?void 0:o.call(e))??h3t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;C0(Ol.type(y))(C,k)}}).addItem("h2",{label:(e==null?void 0:e.slashMenuH2Label)??xo("Heading 2"),icon:((r=e==null?void 0:e.slashMenuH2Icon)==null?void 0:r.call(e))??i3t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;C0($a.type(y),{level:2})(C,k)}}).addItem("h3",{label:(e==null?void 0:e.slashMenuH3Label)??xo("Heading 3"),icon:((a=e==null?void 0:e.slashMenuH3Icon)==null?void 0:a.call(e))??o3t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;C0($a.type(y),{level:3})(C,k)}}).addItem("h4",{label:(e==null?void 0:e.slashMenuH4Label)??xo("Heading 4"),icon:((l=e==null?void 0:e.slashMenuH4Icon)==null?void 0:l.call(e))??r3t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;C0($a.type(y),{level:4})(C,k)}}).addItem("quote",{label:(e==null?void 0:e.slashMenuQuoteLabel)??xo("Quote"),icon:((c=e==null?void 0:e.slashMenuQuoteIcon)==null?void 0:c.call(e))??c3t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;lk(_p.type(y))(C,k)}}).addItem("code",{label:(e==null?void 0:e.slashMenuCodeBlockLabel)??xo("Code"),icon:((u=e==null?void 0:e.slashMenuCodeBlockIcon)==null?void 0:u.call(e))??tW,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;ck(yp.type(y))(C,k)}}).addItem("divider",{label:(e==null?void 0:e.slashMenuDividerLabel)??xo("Divider"),icon:((d=e==null?void 0:e.slashMenuDividerIcon)==null?void 0:d.call(e))??n3t,onRun:y=>{const b=y.get(Vn);ck(bp.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)??xo("List")).addItem("bullet-list",{label:(e==null?void 0:e.slashMenuBulletListLabel)??xo("Bullet List"),icon:((h=e==null?void 0:e.slashMenuBulletListIcon)==null?void 0:h.call(e))??e3t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;lk(Zd.type(y))(C,k)}}).addItem("ordered-list",{label:(e==null?void 0:e.slashMenuOrderedListLabel)??xo("Ordered List"),icon:((f=e==null?void 0:e.slashMenuOrderedListIcon)==null?void 0:f.call(e))??l3t,onRun:y=>{const b=y.get(Vn),{dispatch:k,state:C}=b;lk(Jd.type(y))(C,k)}}),(e==null?void 0:e.hasImageBlock)!==!1&&n.addGroup("media",(e==null?void 0:e.slashMenuMediaGroupLabel)??xo("Media")).addItem("image",{label:(e==null?void 0:e.slashMenuImageLabel)??xo("Image"),icon:((p=e==null?void 0:e.slashMenuImageIcon)==null?void 0:p.call(e))??h6,onRun:y=>{if(e!=null&&e.canAddImage&&!e.canAddImage())return;const b=y.get(Vn),{dispatch:k,state:C}=b;ck(tw.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 pW=({show:t,hide:e,ctx:n,filter:i,config:s})=>{const{groups:o,size:r}=ob(()=>lkt(i,s),[i]),a=KS(),[l,c]=Or(0),u=ob(()=>a.current.getRootNode(),[a]),d=ud({x:-999,y:-999}),h=vh(k=>{const C=d.current;if(!C)return;const{x:$,y:S}=k;C.x=$,C.y=S},[]);Td(()=>{r===0&&t&&(e==null||e())},[r,t]);const f=vh((k,C)=>{c($=>{const S=typeof k=="function"?k($):k;return C==null||C(S),S})},[]),p=vh(k=>{const C=a.current.querySelector(`[data-index="${k}"]`),$=a.current.querySelector(".menu-groups");!C||!$||($.scrollTop=C.offsetTop-$.offsetTop)},[]),m=vh(k=>{const C=o.flatMap($=>$.items).at(k);C&&n&&C.onRun(n),e==null||e()},[o]),y=vh(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 S=o[o.indexOf($)-1];return S?S.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 S=o[o.indexOf($)+1];return S?S.range[0]:C},p);k.key==="Enter"&&(k.preventDefault(),m(l))},[e,o,l]),b=vh(k=>C=>{const $=d.current;if(!$)return;const{x:S,y:M}=C;S===$.x&&M===$.y||f(k)},[]);return Td(()=>(t?u.addEventListener("keydown",y,{capture:!0}):u.removeEventListener("keydown",y,{capture:!0}),()=>{u.removeEventListener("keydown",y,{capture:!0})}),[t,y]),It` | |
| 1365 | + <host onmousedown=${k=>k.preventDefault()}> | |
| 1365 | 1366 | <div class="menu-groups" onmousemove=${h}> |
| 1366 | - ${o.map(C=>kt` | |
| 1367 | - <div key=${C.key} class="menu-group"> | |
| 1367 | + ${o.map(k=>It` | |
| 1368 | + <div key=${k.key} class="menu-group"> | |
| 1368 | 1369 | <ul> |
| 1369 | - ${C.items.map(k=>kt`<li | |
| 1370 | - key=${k.key} | |
| 1371 | - data-index=${k.index} | |
| 1372 | - class=${l===k.index?"hover":""} | |
| 1373 | - onmouseenter=${y(k.index)} | |
| 1374 | - onmousedown=${()=>{var x;(x=a.current.querySelector(`[data-index="${k.index}"]`))==null||x.classList.add("active")}} | |
| 1375 | - onmouseup=${()=>{var x;(x=a.current.querySelector(`[data-index="${k.index}"]`))==null||x.classList.remove("active"),m(k.index)}} | |
| 1370 | + ${k.items.map(C=>It`<li | |
| 1371 | + key=${C.key} | |
| 1372 | + data-index=${C.index} | |
| 1373 | + class=${l===C.index?"hover":""} | |
| 1374 | + onmouseenter=${b(C.index)} | |
| 1375 | + onmousedown=${()=>{var $;($=a.current.querySelector(`[data-index="${C.index}"]`))==null||$.classList.add("active")}} | |
| 1376 | + onmouseup=${()=>{var $;($=a.current.querySelector(`[data-index="${C.index}"]`))==null||$.classList.remove("active"),m(C.index)}} | |
| 1376 | 1377 | > |
| 1377 | - ${k.icon} | |
| 1378 | - <span>${k.label}</span> | |
| 1378 | + ${C.icon} | |
| 1379 | + <span>${C.label}</span> | |
| 1379 | 1380 | </li>`)} |
| 1380 | 1381 | </ul> |
| 1381 | 1382 | </div> |
| 1382 | 1383 | `)} |
| @@ -1381,73 +1382,73 @@ | ||
| 1381 | 1382 | </div> |
| 1382 | 1383 | `)} |
| 1383 | 1384 | </div> |
| 1384 | 1385 | </host> |
| 1385 | - `};nj.props={ctx:Object,config:Object,show:Boolean,filter:String,hide:Function};const sj=Md(nj),ij=ybt("CREPE_MENU"),oj=es({show:()=>{},hide:()=>{}},"menuAPICtx");QU("milkdown-slash-menu",sj);function zbt(t,e){t.set(ij.key,{view:n=>new Hbt(t,n,e)})}var ro,ia,Jl;class Hbt{constructor(e,n,s){Gr(this,ro,void 0);Gr(this,ia,void 0);Gr(this,Jl,void 0);Oi(this,Jl,null),this.update=o=>{Dt(this,ia).update(o)},this.show=o=>{Oi(this,Jl,o),Dt(this,ro).filter="",Dt(this,ia).show()},this.hide=()=>{Oi(this,Jl,null),Dt(this,ia).hide()},this.destroy=()=>{Dt(this,ia).destroy(),Dt(this,ro).remove()},Oi(this,ro,new sj),Dt(this,ro).hide=this.hide,Dt(this,ro).ctx=e,Dt(this,ro).config=s;const i=this;Oi(this,ia,new bbt({content:Dt(this,ro),debounce:20,shouldShow(o){if(ZU(o.state.selection)||JU(o.state.selection))return!1;const r=this.getContent(o,l=>["paragraph","heading"].includes(l.type.name));if(r==null)return!1;const a=Dt(i,Jl);return Dt(i,ro).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()?(Oi(i,Jl,null),!1):!0:!!r.startsWith("/")},offset:10})),Dt(this,ia).onShow=()=>{Dt(this,ro).show=!0},Dt(this,ia).onHide=()=>{Dt(this,ro).show=!1},this.update(n),e.set(oj.key,{show:o=>this.show(o),hide:()=>this.hide()})}}ro=new WeakMap,ia=new WeakMap,Jl=new WeakMap;const Ubt=(t,e)=>{t.config(n=>zbt(n,e)).use(oj).use(K5).use(ij)},jbt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:Ubt},Symbol.toStringTag,{value:"Module"}));function Wbt(t){var e;return t.childCount<=1&&!((e=t.firstChild)!=null&&e.content.size)}function Ybt(t,e){const{selection:n}=t;if(!n.empty)return null;const s=n.$anchor,i=s.parent;if(i.content.size>0||G4(a=>a.type.name==="table")(s))return null;const r=s.before();return ws.node(r,r+i.nodeSize,{class:"crepe-placeholder","data-placeholder":e})}const _y=es({text:"Please enter...",mode:"block"},"placeholderConfigCtx"),rj=vs(t=>new Yn({key:new Kn("CREPE_PLACEHOLDER"),props:{decorations:e=>{const n=t.get(_y.key);if(n.mode==="doc"&&!Wbt(e.doc)||ZU(e.selection)||JU(e.selection))return null;const s=n.text??"Please enter...",i=Ybt(e,s);return i?Nn.create(e.doc,[i]):null}}})),Gbt=(t,e)=>{t.config(n=>{e&&n.update(_y.key,s=>({...s,...e}))}).use(rj).use(_y)},qbt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:Gbt,placeholderConfig:_y,placeholderPlugin:rj},Symbol.toStringTag,{value:"Module"})),aj=({ctx:t,hide:e,show:n,config:s})=>{var a,l,c,u,d;const i=vU();nd(()=>{i()},[n]);const o=h=>f=>{f.preventDefault(),t&&h(t),i()},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 kt`<host> | |
| 1386 | + `};pW.props={ctx:Object,config:Object,show:Boolean,filter:String,hide:Function};const mW=th(pW),gW=z3t("CREPE_MENU"),vW=ms({show:()=>{},hide:()=>{}},"menuAPICtx");dW("milkdown-slash-menu",mW);function ckt(t,e){t.set(gW.key,{view:n=>new ukt(t,n,e)})}var Ao,wa,wc;class ukt{constructor(e,n,i){ua(this,Ao,void 0);ua(this,wa,void 0);ua(this,wc,void 0);Qi(this,wc,null),this.update=o=>{Gt(this,wa).update(o)},this.show=o=>{Qi(this,wc,o),Gt(this,Ao).filter="",Gt(this,wa).show()},this.hide=()=>{Qi(this,wc,null),Gt(this,wa).hide()},this.destroy=()=>{Gt(this,wa).destroy(),Gt(this,Ao).remove()},Qi(this,Ao,new mW),Gt(this,Ao).hide=this.hide,Gt(this,Ao).ctx=e,Gt(this,Ao).config=i;const s=this;Qi(this,wa,new H3t({content:Gt(this,Ao),debounce:20,shouldShow(o){if(cW(o.state.selection)||uW(o.state.selection))return!1;const r=this.getContent(o,l=>["paragraph","heading"].includes(l.type.name));if(r==null)return!1;const a=Gt(s,wc);return Gt(s,Ao).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,wc,null),!1):!0:!!r.startsWith("/")},offset:10})),Gt(this,wa).onShow=()=>{Gt(this,Ao).show=!0},Gt(this,wa).onHide=()=>{Gt(this,Ao).show=!1},this.update(n),e.set(vW.key,{show:o=>this.show(o),hide:()=>this.hide()})}}Ao=new WeakMap,wa=new WeakMap,wc=new WeakMap;const dkt=(t,e)=>{t.config(n=>ckt(n,e)).use(vW).use(s9).use(gW)},hkt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:dkt},Symbol.toStringTag,{value:"Module"}));function fkt(t){var e;return t.childCount<=1&&!((e=t.firstChild)!=null&&e.content.size)}function pkt(t,e){const{selection:n}=t;if(!n.empty)return null;const i=n.$anchor,s=i.parent;if(s.content.size>0||Q8(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 ab=ms({text:"Please enter...",mode:"block"},"placeholderConfigCtx"),_W=Ls(t=>new rs({key:new ps("CREPE_PLACEHOLDER"),props:{decorations:e=>{const n=t.get(ab.key);if(n.mode==="doc"&&!fkt(e.doc)||cW(e.selection)||uW(e.selection))return null;const i=n.text??"Please enter...",s=pkt(e,i);return s?Kn.create(e.doc,[s]):null}}})),mkt=(t,e)=>{t.config(n=>{e&&n.update(ab.key,i=>({...i,...e}))}).use(_W).use(ab)},gkt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:mkt,placeholderConfig:ab,placeholderPlugin:_W},Symbol.toStringTag,{value:"Module"})),yW=({ctx:t,hide:e,show:n,config:i})=>{var a,l,c,u,d;const s=Mj();Td(()=>{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 It`<host> | |
| 1386 | 1387 | <button |
| 1387 | - class=${Vs("toolbar-item",t&&r(Hf.type(t))&&"active")} | |
| 1388 | - onmousedown=${o(h=>{h.get(cn).call(Nb.key)})} | |
| 1388 | + class=${ei("toolbar-item",t&&r(vp.type(t))&&"active")} | |
| 1389 | + onmousedown=${o(h=>{h.get(gn).call(I2.key)})} | |
| 1389 | 1390 | > |
| 1390 | - ${((a=s==null?void 0:s.boldIcon)==null?void 0:a.call(s))??Iyt} | |
| 1391 | + ${((a=i==null?void 0:i.boldIcon)==null?void 0:a.call(i))??Qwt} | |
| 1391 | 1392 | </button> |
| 1392 | 1393 | <button |
| 1393 | - class=${Vs("toolbar-item",t&&r(wd.type(t))&&"active")} | |
| 1394 | - onmousedown=${o(h=>{h.get(cn).call(Fb.key)})} | |
| 1394 | + class=${ei("toolbar-item",t&&r(Xd.type(t))&&"active")} | |
| 1395 | + onmousedown=${o(h=>{h.get(gn).call(P2.key)})} | |
| 1395 | 1396 | > |
| 1396 | - ${((l=s==null?void 0:s.italicIcon)==null?void 0:l.call(s))??Nyt} | |
| 1397 | + ${((l=i==null?void 0:i.italicIcon)==null?void 0:l.call(i))??a3t} | |
| 1397 | 1398 | </button> |
| 1398 | 1399 | <button |
| 1399 | - class=${Vs("toolbar-item",t&&r(Wf.type(t))&&"active")} | |
| 1400 | - onmousedown=${o(h=>{h.get(cn).call(Ub.key)})} | |
| 1400 | + class=${ei("toolbar-item",t&&r(wp.type(t))&&"active")} | |
| 1401 | + onmousedown=${o(h=>{h.get(gn).call(R2.key)})} | |
| 1401 | 1402 | > |
| 1402 | - ${((c=s==null?void 0:s.strikethroughIcon)==null?void 0:c.call(s))??Uyt} | |
| 1403 | + ${((c=i==null?void 0:i.strikethroughIcon)==null?void 0:c.call(i))??d3t} | |
| 1403 | 1404 | </button> |
| 1404 | 1405 | <div class="divider"></div> |
| 1405 | 1406 | <button |
| 1406 | - class=${Vs("toolbar-item",t&&r(Ka.type(t))&&"active")} | |
| 1407 | - onmousedown=${o(h=>{h.get(cn).call(Bb.key)})} | |
| 1407 | + class=${ei("toolbar-item",t&&r(ll.type(t))&&"active")} | |
| 1408 | + onmousedown=${o(h=>{h.get(gn).call(L2.key)})} | |
| 1408 | 1409 | > |
| 1409 | - ${((u=s==null?void 0:s.codeIcon)==null?void 0:u.call(s))??UU} | |
| 1410 | + ${((u=i==null?void 0:i.codeIcon)==null?void 0:u.call(i))??tW} | |
| 1410 | 1411 | </button> |
| 1411 | 1412 | <button |
| 1412 | - class=${Vs("toolbar-item",t&&r(Ar.type(t))&&"active")} | |
| 1413 | - onmousedown=${o(h=>{const f=h.get(Vn),{selection:p}=f.state;if(r(Ar.type(h))){h.get(Ef.key).removeLink(p.from,p.to);return}h.get(Ef.key).addLink(p.from,p.to),e==null||e()})} | |
| 1413 | + class=${ei("toolbar-item",t&&r(Yr.type(t))&&"active")} | |
| 1414 | + onmousedown=${o(h=>{const f=h.get(Vn),{selection:p}=f.state;if(r(Yr.type(h))){h.get(op.key).removeLink(p.from,p.to);return}h.get(op.key).addLink(p.from,p.to),e==null||e()})} | |
| 1414 | 1415 | > |
| 1415 | - ${((d=s==null?void 0:s.linkIcon)==null?void 0:d.call(s))??WU} | |
| 1416 | + ${((d=i==null?void 0:i.linkIcon)==null?void 0:d.call(i))??sW} | |
| 1416 | 1417 | </button> |
| 1417 | - </host>`};aj.props={ctx:Object,hide:Function,show:Boolean,config:Object};const lj=Md(aj),MT=Y5("CREPE_TOOLBAR");var Ha,gi;class Xbt{constructor(e,n,s){Gr(this,Ha,void 0);Gr(this,gi,void 0);this.update=(o,r)=>{Dt(this,Ha).update(o,r)},this.destroy=()=>{Dt(this,Ha).destroy(),Dt(this,gi).remove()},this.hide=()=>{Dt(this,Ha).hide()};const i=new lj;Oi(this,gi,i),Dt(this,gi).ctx=e,Dt(this,gi).hide=this.hide,Dt(this,gi).config=s,Oi(this,Ha,new W5({content:Dt(this,gi),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 St,h=!(a instanceof St),f=o.dom.getRootNode().activeElement,p=i.contains(f),m=!o.hasFocus()&&!p,b=!o.editable;return!(m||h||l||d||b)}})),Dt(this,Ha).onShow=()=>{Dt(this,gi).show=!0,setTimeout(()=>{let o=Dt(this,gi).style.left;o=parseInt(o),console.log(o),o<0?(Dt(this,gi).style.left=0,console.log(Dt(this,gi))):o>350&&(Dt(this,gi).style.left="350px")},0)},Dt(this,Ha).onHide=()=>{Dt(this,gi).show=!1},this.update(n)}}Ha=new WeakMap,gi=new WeakMap;QU("milkdown-toolbar",lj);const Kbt=(t,e)=>{t.config(n=>{n.set(MT.key,{view:s=>new Xbt(n,s,e)})}).use(MT)},Zbt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:Kbt},Symbol.toStringTag,{value:"Module"}));var Jbt=Object.defineProperty,ET=Object.getOwnPropertySymbols,Qbt=Object.prototype.hasOwnProperty,e2t=Object.prototype.propertyIsEnumerable,TT=(t,e,n)=>e in t?Jbt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,t2t=(t,e)=>{for(var n in e||(e={}))Qbt.call(e,n)&&TT(t,n,e[n]);if(ET)for(var n of ET(e))e2t.call(e,n)&&TT(t,n,e[n]);return t};function cj(t,e){return Object.assign(t,{meta:t2t({package:"@milkdown/components"},e)}),t}const n2t={imageIcon:()=>"🌌",uploadButton:()=>kt`Upload`,confirmButton:()=>kt`⏎`,uploadPlaceholderText:"/Paste",onUpload:t=>Promise.resolve(URL.createObjectURL(t))},d2=es(n2t,"inlineImageConfigCtx");cj(d2,{displayName:"Config<image-inline>",group:"ImageInline"});function s2t(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 i2t=(t,e,n)=>new Promise((s,i)=>{var o=l=>{try{a(n.next(l))}catch(c){i(c)}},r=l=>{try{a(n.throw(l))}catch(c){i(c)}},a=l=>l.done?s(l.value):Promise.resolve(l.value).then(o,r);a((n=n.apply(t,e)).next())});const uj=({src:t="",selected:e=!1,alt:n,title:s,setAttr:i,config:o})=>{const r=Fu(),[a]=pr(crypto.randomUUID()),[l,c]=pr(!1),[u,d]=pr(t.length!==0),[h,f]=pr(t),p=x=>{const E=x.target.value;d(E.length!==0),f(E)},m=x=>i2t(void 0,null,function*(){var S;const E=(S=x.target.files)==null?void 0:S[0];if(!E)return;const T=yield o==null?void 0:o.onUpload(E);T&&(i==null||i("src",T),d(!0))}),b=()=>{var x,S;i==null||i("src",(S=(x=r.current)==null?void 0:x.value)!=null?S:"")},y=x=>{x.key==="Enter"&&b()},C=x=>{x.preventDefault(),x.stopPropagation()},k=x=>{x.stopPropagation(),x.preventDefault()};return kt`<host class=${Vs(e&&"selected",!t&&"empty")}> | |
| 1418 | - ${t?kt`<img class="image-inline" src=${t} alt=${n} title=${s} />`:kt`<div class="empty-image-inline"> | |
| 1418 | + </host>`};yW.props={ctx:Object,hide:Function,show:Boolean,config:Object};const bW=th(yW),SP=QS("CREPE_TOOLBAR");var el,io;class vkt{constructor(e,n,i){ua(this,el,void 0);ua(this,io,void 0);this.update=(o,r)=>{Gt(this,el).update(o,r)},this.destroy=()=>{Gt(this,el).destroy(),Gt(this,io).remove()},this.hide=()=>{Gt(this,el).hide()};const s=new bW;Qi(this,io,s),Gt(this,io).ctx=e,Gt(this,io).hide=this.hide,Gt(this,io).config=i,Qi(this,el,new JS({content:Gt(this,io),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)}})),Gt(this,el).onShow=()=>{Gt(this,io).show=!0,setTimeout(()=>{let o=Gt(this,io).style.left;o=parseInt(o),o<0?Gt(this,io).style.left=0:o>350&&(Gt(this,io).style.left="350px")},0)},Gt(this,el).onHide=()=>{Gt(this,io).show=!1},this.update(n)}}el=new WeakMap,io=new WeakMap;dW("milkdown-toolbar",bW);const _kt=(t,e)=>{t.config(n=>{n.set(SP.key,{view:i=>new vkt(n,i,e)})}).use(SP)},ykt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:_kt},Symbol.toStringTag,{value:"Module"}));var bkt=Object.defineProperty,$P=Object.getOwnPropertySymbols,wkt=Object.prototype.hasOwnProperty,kkt=Object.prototype.propertyIsEnumerable,AP=(t,e,n)=>e in t?bkt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ckt=(t,e)=>{for(var n in e||(e={}))wkt.call(e,n)&&AP(t,n,e[n]);if($P)for(var n of $P(e))kkt.call(e,n)&&AP(t,n,e[n]);return t};function wW(t,e){return Object.assign(t,{meta:Ckt({package:"@milkdown/components"},e)}),t}const xkt={imageIcon:()=>"🌌",uploadButton:()=>It`Upload`,confirmButton:()=>It`⏎`,uploadPlaceholderText:"/Paste",onUpload:t=>Promise.resolve(URL.createObjectURL(t))},sw=ms(xkt,"inlineImageConfigCtx");wW(sw,{displayName:"Config<image-inline>",group:"ImageInline"});function Skt(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 $kt=(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 kW=({src:t="",selected:e=!1,alt:n,title:i,setAttr:s,config:o})=>{const r=ud(),[a]=Or(crypto.randomUUID()),[l,c]=Or(!1),[u,d]=Or(t.length!==0),[h,f]=Or(t),p=$=>{const M=$.target.value;d(M.length!==0),f(M)},m=$=>$kt(void 0,null,function*(){var S;const M=(S=$.target.files)==null?void 0:S[0];if(!M)return;const P=yield o==null?void 0:o.onUpload(M);P&&(s==null||s("src",P),d(!0))}),y=()=>{var $,S;s==null||s("src",(S=($=r.current)==null?void 0:$.value)!=null?S:"")},b=$=>{$.key==="Enter"&&y()},k=$=>{$.preventDefault(),$.stopPropagation()},C=$=>{$.stopPropagation(),$.preventDefault()};return It`<host class=${ei(e&&"selected",!t&&"empty")}> | |
| 1419 | + ${t?It`<img class="image-inline" src=${t} alt=${n} title=${i} />`:It`<div class="empty-image-inline"> | |
| 1419 | 1420 | <div class="image-icon"> |
| 1420 | 1421 | ${o==null?void 0:o.imageIcon()} |
| 1421 | 1422 | </div> |
| 1422 | - <div class=${Vs("link-importer",l&&"focus")}> | |
| 1423 | + <div class=${ei("link-importer",l&&"focus")}> | |
| 1423 | 1424 | <input |
| 1424 | 1425 | draggable="true" |
| 1425 | 1426 | ref=${r} |
| 1426 | - ondragstart=${C} | |
| 1427 | + ondragstart=${k} | |
| 1427 | 1428 | class="link-input-area" |
| 1428 | 1429 | value=${h} |
| 1429 | 1430 | oninput=${p} |
| 1430 | - onkeydown=${y} | |
| 1431 | + onkeydown=${b} | |
| 1431 | 1432 | onfocus=${()=>c(!0)} |
| 1432 | 1433 | onblur=${()=>c(!1)} |
| 1433 | 1434 | /> |
| 1434 | - <div class=${Vs("placeholder",u&&"hidden")}> | |
| 1435 | + <div class=${ei("placeholder",u&&"hidden")}> | |
| 1435 | 1436 | <input class="hidden" id=${a} type="file" accept="image/*" onchange=${m} /> |
| 1436 | - <label onpointerdown=${k} class="uploader" for=${a}> | |
| 1437 | + <label onpointerdown=${C} class="uploader" for=${a}> | |
| 1437 | 1438 | ${o==null?void 0:o.uploadButton()} |
| 1438 | 1439 | </label> |
| 1439 | - <span class="text" onclick=${()=>{var x;return(x=r.current)==null?void 0:x.focus()}}> | |
| 1440 | + <span class="text" onclick=${()=>{var $;return($=r.current)==null?void 0:$.focus()}}> | |
| 1440 | 1441 | ${o==null?void 0:o.uploadPlaceholderText} |
| 1441 | 1442 | </span> |
| 1442 | 1443 | </div> |
| 1443 | 1444 | </div> |
| 1444 | 1445 | <div |
| 1445 | - class=${Vs("confirm",h.length===0&&"hidden")} | |
| 1446 | - onclick=${()=>b()} | |
| 1446 | + class=${ei("confirm",h.length===0&&"hidden")} | |
| 1447 | + onclick=${()=>y()} | |
| 1447 | 1448 | > |
| 1448 | 1449 | ${o==null?void 0:o.confirmButton()} |
| 1449 | 1450 | </div> |
| 1450 | 1451 | </div>`} |
| 1451 | - </host>`};uj.props={src:String,alt:String,title:String,selected:Boolean,setAttr:Function,config:Object};const o2t=Md(uj);s2t("milkdown-image-inline",o2t);const dj=iB(Cd.node,t=>(e,n,s)=>{const i=document.createElement("milkdown-image-inline"),o=t.get(d2.key),r=a=>{i.src=a.attrs.src,i.alt=a.attrs.alt,i.title=a.attrs.title};return r(e),i.selected=!1,i.setAttr=(a,l)=>{const c=s();c!=null&&n.dispatch(n.state.tr.setNodeAttribute(c,a,l))},i.config=o,{dom:i,update:a=>a.type!==e.type?!1:(r(a),!0),stopEvent:a=>!!(i.selected&&a.target instanceof HTMLInputElement),selectNode:()=>{i.selected=!0},deselectNode:()=>{i.selected=!1},destroy:()=>{i.remove()}}});cj(dj,{displayName:"NodeView<image-inline>",group:"ImageInline"});const r2t=[d2,dj],a2t=(t,e)=>{t.config(n=>{n.update(d2.key,s=>({uploadButton:(e==null?void 0:e.inlineUploadButton)??(()=>"Upload"),imageIcon:(e==null?void 0:e.inlineImageIcon)??(()=>gk),confirmButton:(e==null?void 0:e.inlineConfirmButton)??(()=>jU),uploadPlaceholderText:(e==null?void 0:e.inlineUploadPlaceholderText)??"or paste link",onUpload:(e==null?void 0:e.inlineOnUpload)??(e==null?void 0:e.onUpload)??s.onUpload})),n.update(u2.key,s=>({uploadButton:(e==null?void 0:e.blockUploadButton)??(()=>"Upload file"),imageIcon:(e==null?void 0:e.blockImageIcon)??(()=>gk),captionIcon:(e==null?void 0:e.blockCaptionIcon)??(()=>Oyt),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)??s.onUpload}))}).use(Dbt).use(r2t)},l2t=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:a2t},Symbol.toStringTag,{value:"Module"})),c2t=`.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%} | |
| 1452 | -`,u2t=Object.freeze(Object.defineProperty({__proto__:null,default:c2t},Symbol.toStringTag,{value:"Module"})),d2t=`.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} | |
| 1453 | -`,h2t=Object.freeze(Object.defineProperty({__proto__:null,default:d2t},Symbol.toStringTag,{value:"Module"}))});export default f2t(); | |
| 1452 | + </host>`};kW.props={src:String,alt:String,title:String,selected:Boolean,setAttr:Function,config:Object};const Akt=th(kW);Skt("milkdown-image-inline",Akt);const CW=gz(Kd.node,t=>(e,n,i)=>{const s=document.createElement("milkdown-image-inline"),o=t.get(sw.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()}}});wW(CW,{displayName:"NodeView<image-inline>",group:"ImageInline"});const Ekt=[sw,CW],Mkt=(t,e)=>{t.config(n=>{n.update(sw.key,i=>({uploadButton:(e==null?void 0:e.inlineUploadButton)??(()=>"Upload"),imageIcon:(e==null?void 0:e.inlineImageIcon)??(()=>h6),confirmButton:(e==null?void 0:e.inlineConfirmButton)??(()=>nW),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(nw.key,i=>({uploadButton:(e==null?void 0:e.blockUploadButton)??(()=>"Upload file"),imageIcon:(e==null?void 0:e.blockImageIcon)??(()=>h6),captionIcon:(e==null?void 0:e.blockCaptionIcon)??(()=>t3t),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(skt).use(Ekt)},Tkt=Object.freeze(Object.defineProperty({__proto__:null,defineFeature:Mkt},Symbol.toStringTag,{value:"Module"})),Pkt={name:"SpaceGeneralTab",components:{CreateSpaceForm:N8},props:["community","savingCount"],emits:["completed"]},Ikt={style:{"max-width":"800px",margin:"0 auto"},class:"fcom_full_editor_content"};function Lkt(t,e,n,i,s,o){const r=H("create-space-form"),a=qs,l=jo;return v(),D(l,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(a,null,{default:w(()=>[g("div",Ikt,[_(r,{savingCount:n.savingCount,community:n.community,onCompleted:e[0]||(e[0]=c=>t.$emit("completed",c))},null,8,["savingCount","community"])])]),_:1})]),_:1})}const Okt=ue(Pkt,[["render",Lkt]]),Dkt=Object.freeze(Object.defineProperty({__proto__:null,default:Okt},Symbol.toStringTag,{value:"Module"})),Rkt={name:"ImagePlaceholder"},Vkt={width:"240",height:"240",viewBox:"0 0 240 240",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fkt(t,e,n,i,s,o){return v(),A("svg",Vkt,[...e[0]||(e[0]=[g("rect",{width:"240",height:"240",fill:"#F5F6F7"},null,-1),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)])])}const a9=ue(Rkt,[["render",Fkt]]),Nkt={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()}},Bkt={class:"fcom_topic_selector"},zkt={class:"fcom_select_photo",style:{float:"left"}},Hkt=["src","alt"],Ukt=["innerHTML"];function jkt(t,e,n,i,s,o){const r=sn,a=Jt,l=H("Plus"),c=be,u=He,d=ft,h=en,f=tn,p=Yo,m=Va,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,x(t.$t("Add Paywall")),1)]),default:w(()=>[_(f,{onSubmit:e[5]||(e[5]=Ee(b=>t.doNothing(),["prevent"])),"label-position":"top"},{default:w(()=>[_(h,null,{default:w(()=>[g("div",Bkt,[Re((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,we(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",zkt,[g("img",{src:b.image,alt:b.title},null,8,Hkt),g("span",null,x(b.title),1)]),g("span",{style:{float:"right",color:"#8492a6","font-size":"13px"},innerHTML:b.price},null,8,Ukt)]),_: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,x(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(()=>[N(x(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(()=>[N(x(t.$t("Add")),1)]),_:1},8,["loading","onClick"])]),_:1})]),_:1})]),_:1},8,["size","modelValue","visible"])}const Wkt=ue(Nkt,[["render",jkt]]),Ykt={name:"ManagePaywalls",components:{ImagePlaceholder:a9,AddPaywallModal:Wkt},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()}},qkt={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},Gkt={class:"fcom_card_sections"},Xkt={class:"fcom_card_section_heading"},Kkt={class:"fcom_section_primary_item_title"},Zkt={class:"fcom_heading_item"},Jkt={key:0,class:"fcom_section_item_actions"},Qkt={class:"fcom_section_primary"},eCt={class:"fcom_section_primary_item"},tCt={class:"fcom_section_primary_item_title"},nCt={class:"fcom_heading_item"},sCt={class:"fcom_shape"},iCt={class:"fcom_section_item_actions"},oCt=["href"],rCt=["href"],aCt={class:"fcom_section_items"},lCt={class:"fcom_section_item_title"},cCt={class:"fcom_heading_item"},uCt={class:"fcom_shape"},dCt={class:"fcom_section_item_actions"},hCt=["innerHTML"],fCt={key:2,style:{padding:"1rem"}},pCt={key:1,class:"fcom_section_item"},mCt={class:"fcom_section_primary"},gCt={class:"fcom_section_primary_item"},vCt=["disabled"],_Ct={class:"dialog_header"},yCt={class:"dialog_left"},bCt={class:"dialog_body"},wCt={style:{"text-align":"center"}},kCt={class:"fcom_heading_item",style:{"justify-content":"center"}},CCt={class:"fcom_shape"},xCt={style:{margin:"1rem 0px 0.8rem"}},SCt={class:"dialog_footer"};function $Ct(t,e,n,i,s,o){const r=He,a=Nt,l=o8,c=H("MoreFilled"),u=be,d=$r,h=Ar,f=Sr,p=H("ImagePlaceholder"),m=qs,y=jo,b=H("AddPaywallModal"),k=Yt,C=$s,$=xt("loading");return v(),A(ee,null,[_(y,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(m,null,{default:w(()=>[g("div",qkt,[g("div",Gkt,[g("div",Xkt,[g("div",Kkt,[g("div",Zkt,[le(t.$slots,"title",{},()=>[g("h4",null,x(t.$t("Manage Paywalls")),1)])])]),s.hasFluentCart?(v(),A("div",Jkt,[_(r,{class:"fcom_primary_button",onClick:e[0]||(e[0]=S=>o.initAddPaywall())},{default:w(()=>[N(x(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},we(s.paywalls,S=>(v(),A("div",{class:"fcom_section_item",key:S.ID},[g("div",Qkt,[g("div",eCt,[g("div",tCt,[g("h4",nCt,[g("span",sCt,[_(l,{src:S==null?void 0:S.thumbnail},null,8,["src"])]),g("span",null,x((S==null?void 0:S.post_title)||""),1)])]),g("div",iCt,[_(f,{trigger:"click","popper-class":"fcom_pop_action"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,null,{default:w(()=>[g("a",{href:S==null?void 0:S.view_url,target:"_blank",rel:"noopener"},x(t.$t("View Product")),9,oCt)]),_:2},1024),_(d,null,{default:w(()=>[g("a",{href:S==null?void 0:S.admin_url,target:"_blank",rel:"noopener"},x(t.$t("Edit Product")),9,rCt)]),_:2},1024),_(d,{type:"danger",onClick:M=>o.initRemovePaywall(S)},{default:w(()=>[N(x(t.$t("Delete Paywall")),1)]),_:1},8,["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",aCt,[(v(!0),A(ee,null,we(S.variants,M=>(v(),A("div",{class:"fcom_section_item",key:M.id},[g("div",lCt,[g("div",cCt,[g("span",uCt,[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,x(M.variation_title),1)])]),g("div",dCt,[g("span",{class:"fcom_price",innerHTML:M.total_price},null,8,hCt),_(f,{trigger:"click"},{dropdown:w(()=>[_(h,null,{default:w(()=>[_(d,{onClick:P=>o.copyCheckoutUrl(M.checkout_url)},{default:w(()=>[N(x(t.$t("Copy Checkout URL")),1)]),_:1},8,["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",fCt,[g("p",null,x(t.$t("No paywall has been added yet")),1)]))],64)):(v(),A("div",pCt,[g("div",mCt,[g("div",gCt,[g("span",null,[N(x(t.$t("To monetize your ")+o.spaceType+", ")+" ",1),Re((v(),A("a",{disabled:s.installing,onClick:e[1]||(e[1]=(...S)=>o.installPlugin&&o.installPlugin(...S)),class:"fcom_link"},[N(x(t.$t("click here")),1)],8,vCt)),[[$,s.installing]]),N(" "+x(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]=S=>s.addPaywallModal=S),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]=S=>s.removePaywallModal=S),direction:"rtl",onClose:e[6]||(e[6]=S=>s.removePaywallModal=!1)},{header:w(()=>[g("div",_Ct,[g("div",yCt,[g("h4",null,x(t.$t("Delete Paywall")),1)])])]),footer:w(()=>[g("div",SCt,[_(r,{class:"fcom_primary_button",disabled:s.removing,onClick:o.deletePaywall},{default:w(()=>[N(x(t.$t("Delete")),1)]),_:1},8,["disabled","onClick"]),_(r,{class:"fcom_secondary_button",onClick:e[4]||(e[4]=S=>s.removePaywallModal=!1)},{default:w(()=>[N(x(t.$t("Cancel")),1)]),_:1})])]),default:w(()=>{var S,M;return[g("div",bCt,[g("div",wCt,[g("h4",kCt,[g("span",CCt,[_(l,{src:(S=s.removePaywall)==null?void 0:S.thumbnail},null,8,["src"])]),g("span",null,x((M=s.removePaywall)==null?void 0:M.post_title),1)]),g("p",xCt,x(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(()=>[N(x(t.$t("Also remove the this space from the product integration?")),1)]),_:1},8,["modelValue"])])])]}),_:1},8,["width","modelValue"])],64)}const ACt=ue(Ykt,[["render",$Ct]]),EP=Object.freeze(Object.defineProperty({__proto__:null,default:ACt},Symbol.toStringTag,{value:"Module"})),ECt={name:"LockscreenPaywallMeta",components:{ImagePlaceholder:a9},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()}},MCt={key:0,class:"fcom_paywalls"},TCt={class:"fcom_paywall"},PCt={class:"fcom_select_photo",style:{float:"left"}},ICt=["src"],LCt={key:0,class:"fcom_description"},OCt={class:"fcom_paywall_actions"},DCt={class:"fcom_color_input_wrap"},RCt={class:"fcom_color_input_wrap"},VCt={class:"fcom_color_input_wrap"},FCt={class:"fcom_color_input_wrap"};function NCt(t,e,n,i,s,o){const r=H("image-placeholder"),a=sn,l=n2,c=Jt,u=H("Delete"),d=be,h=He,f=Nt,p=u2,m=ft,y=en,b=Yt,k=tn,C=Qc,$=c2;return v(),D($,{modelValue:s.editTab,"onUpdate:modelValue":e[12]||(e[12]=S=>s.editTab=S)},{default:w(()=>[_(p,{label:t.$t("Paywalls"),name:"paywall"},{default:w(()=>[s.loading?(v(),D(f,{key:1,rows:2,animated:""})):(v(),A("div",MCt,[(v(!0),A(ee,null,we(n.field.paywalls,(S,M)=>(v(),A("div",TCt,[_(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,we(s.availablePaywalls,P=>(v(),D(l,{key:P.ID,label:P.post_title},{default:w(()=>[(v(!0),A(ee,null,we(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",PCt,[T.photo?(v(),A("img",{key:0,src:T.photo},null,8,ICt)):(v(),D(r,{key:1})),g("span",null,x(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(S)},{default:w(()=>[_(u)]),_:1},8,["onClick"])]))),256)),!n.field.paywalls||Object.keys(n.field.paywalls).length<1?(v(),A("div",LCt,[g("p",null,x(t.$t("Please add paywall pricing options")),1)])):O("",!0),g("div",OCt,[_(h,{style:{width:"100%"},class:"fcom_plain_button",onClick:o.initAddPaywall},{default:w(()=>[g("span",null,x("+ "+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]=Ee(S=>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]=S=>n.field.button_text=S),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]=S=>n.field.show_description=S),"true-value":"yes","false-value":"no",class:"fcom_checkbox"},{default:w(()=>[N(x(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]=Ee(S=>t.doNothing(),["prevent"])),"label-position":"top",class:"fcom_form_container"},{default:w(()=>[_(y,{label:t.$t("Background Color")},{default:w(()=>[g("div",DCt,[_(C,{predefine:t.appVars.suggestedColors,modelValue:n.field.background_color,"onUpdate:modelValue":e[3]||(e[3]=S=>n.field.background_color=S)},null,8,["predefine","modelValue"]),_(m,{modelValue:n.field.background_color,"onUpdate:modelValue":e[4]||(e[4]=S=>n.field.background_color=S)},null,8,["modelValue"])])]),_:1},8,["label"]),_(y,{label:t.$t("Text Color")},{default:w(()=>[g("div",RCt,[_(C,{predefine:t.appVars.suggestedColors,modelValue:n.field.text_color,"onUpdate:modelValue":e[5]||(e[5]=S=>n.field.text_color=S)},null,8,["predefine","modelValue"]),_(m,{modelValue:n.field.text_color,"onUpdate:modelValue":e[6]||(e[6]=S=>n.field.text_color=S)},null,8,["modelValue"])])]),_:1},8,["label"]),_(y,{label:t.$t("Button Label")},{default:w(()=>[g("div",VCt,[_(C,{predefine:t.appVars.suggestedColors,modelValue:n.field.button_text_color,"onUpdate:modelValue":e[7]||(e[7]=S=>n.field.button_text_color=S)},null,8,["predefine","modelValue"]),_(m,{modelValue:n.field.button_text_color,"onUpdate:modelValue":e[8]||(e[8]=S=>n.field.button_text_color=S)},null,8,["modelValue"])])]),_:1},8,["label"]),_(y,{label:t.$t("Button Background")},{default:w(()=>[g("div",FCt,[_(C,{predefine:t.appVars.suggestedColors,modelValue:n.field.button_color,"onUpdate:modelValue":e[9]||(e[9]=S=>n.field.button_color=S),"show-alpha":""},null,8,["predefine","modelValue"]),_(m,{modelValue:n.field.button_color,"onUpdate:modelValue":e[10]||(e[10]=S=>n.field.button_color=S)},null,8,["modelValue"])])]),_:1},8,["label"])]),_:1})]),_:1},8,["label"])]),_:1},8,["modelValue"])}const BCt=ue(ECt,[["render",NCt]]),zCt={name:"LockscreenMeta",components:{BgImageUpload:gv,LockscreenPaywallMeta:BCt},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)}}},HCt={key:0,class:"fcom_lockscreen_meta"},UCt={class:"fcom_meta_section lockscreen_meta"},jCt={class:"fcom_description"},WCt={class:"fcom_meta_section lockscreen_meta"},YCt={class:"fcom_meta_label"},qCt={class:"fcom_meta_content"},GCt={class:"fcom_meta_block"},XCt={class:"fcom_block_label"},KCt={class:"fcom_meta_sorting"},ZCt={class:"fcom_block_action"},JCt={key:1,class:"fcom_lockscreen_meta"},QCt={class:"fcom_edit_title"},ext={class:"fcom_edit_content"},txt={class:"fcom_color_input_wrap"},nxt={class:"fcom_color_input_wrap"},sxt={class:"fcom_color_input_wrap"},ixt={class:"fcom_color_input_wrap"},oxt={class:"fcom_color_input_wrap"},rxt={key:1,class:"fcom_description"},axt={key:2,class:"fcom_description"},lxt={key:3,class:"fcom_description"};function cxt(t,e,n,i,s,o){const r=be,a=H("Top"),l=H("Bottom"),c=H("EditPen"),u=H("Hide"),d=H("View"),h=H("Back"),f=ft,p=en,m=Yt,y=tn,b=u2,k=H("BgImageUpload"),C=Qc,$=c2,S=H("lockscreen-paywall-meta");return s.editing?(v(),A("div",JCt,[g("div",QCt,[_(r,{onClick:o.backToFields},{default:w(()=>[_(h)]),_:1},8,["onClick"]),g("p",null,x(t.$labelize(s.editingField.label)),1)]),g("div",ext,[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]=Ee(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(()=>[N(x(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]=Ee(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",txt,[_(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",nxt,[_(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",sxt,[_(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",ixt,[_(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",oxt,[_(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",rxt,x(t.$t("Edit the field from block editor ")),1)):s.editingField.type=="lesson"?(v(),A("div",axt,x(t.$t("Edit lessons from lesson editor ")),1)):s.editingField.type=="welcome_banner"?(v(),A("div",lxt,x(t.$t("__COURSE_BANNER_SOURCE_DESC")),1)):s.editingField.type=="paywall"?(v(),D(S,{key:4,field:s.editingField,space_id:n.space_id},null,8,["field","space_id"])):O("",!0)])])):(v(),A("div",HCt,[g("div",UCt,[g("div",jCt,[g("p",null,x(t.$t("This page is only visible to non-members viewing a private space.")),1)])]),g("div",WCt,[g("div",YCt,x(t.$t("Page Blocks")),1),g("div",qCt,[g("ul",GCt,[(v(!0),A(ee,null,we(o.lockscreenFields,(M,P)=>(v(),A("li",{class:q(["fcom_block_list",{block_hidden:M.hidden}])},[g("div",XCt,[_(r,{class:"fcom_el_icon"},{default:w(()=>[(v(),D(Ct(o.getFieldIcon(M))))]),_:2},1024),g("p",null,x(t.$labelize(M.label)),1)]),g("div",KCt,[_(r,{onClick:T=>o.moveUp(P)},{default:w(()=>[_(a)]),_:1},8,["onClick"]),_(r,{onClick:T=>o.moveDown(P)},{default:w(()=>[_(l)]),_:1},8,["onClick"])]),g("div",ZCt,[_(r,{onClick:T=>o.updateField(M)},{default:w(()=>[_(c)]),_:1},8,["onClick"]),M.hidden?(v(),D(r,{key:0,onClick:T=>o.toggleHidden(M)},{default:w(()=>[_(u)]),_:1},8,["onClick"])):(v(),D(r,{key:1,onClick:T=>o.toggleHidden(M)},{default:w(()=>[_(d)]),_:1},8,["onClick"]))])],2))),256))])])])]))}const uxt=ue(zCt,[["render",cxt]]),dxt={name:"CircleIcon",props:{fill:{type:String,default:"currentColor"}}},hxt=["fill"];function fxt(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"},[...e[0]||(e[0]=[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)])],8,hxt)}const pxt=ue(dxt,[["render",fxt]]),mxt={name:"LessonIcon"},gxt={width:"60",height:"48",viewBox:"0 0 60 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function vxt(t,e,n,i,s,o){return v(),A("svg",gxt,[...e[0]||(e[0]=[g("rect",{width:"60",height:"48",rx:"4",fill:"#F2F5F8"},null,-1),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)])])}const _xt=ue(mxt,[["render",vxt]]),yxt={name:"PlayIcon"},bxt={width:"20",height:"19",viewBox:"0 0 20 19",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function wxt(t,e,n,i,s,o){return v(),A("svg",bxt,[...e[0]||(e[0]=[Ra('<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)])])}const kxt=ue(yxt,[["render",wxt]]),Cxt={name:"PlayPlaceholderIcon"},xxt={width:"60",height:"48",viewBox:"0 0 60 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Sxt(t,e,n,i,s,o){return v(),A("svg",xxt,[...e[0]||(e[0]=[Ra('<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)])])}const $xt=ue(Cxt,[["render",Sxt]]),Axt={name:"_LockscreenLessonEditor",components:{CircleIcon:pxt,LessonIcon:_xt,PlayIcon:kxt,PlayPlaceholderIcon:$xt},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}}},Ext={class:"fcom_course_sections"},Mxt={class:"fcom_course_intro"},Txt={class:"fcom_course_labels"},Pxt={class:"fcom_course_info"},Ixt={class:"fcom_card_sections"},Lxt={class:"fcom_section_items"},Oxt=["onClick"],Dxt={class:"fcom_section_primary_item_title"},Rxt={class:"title_line_container"},Vxt={class:"title_line"},Fxt={class:"fcom_meta_text"},Nxt={key:0,class:"fcom_meta_text"},Bxt={class:"fcom_section_primary_item_actions"},zxt=["onClick"],Hxt={class:"fcom_heading_item clickable"},Uxt={class:"lesson_feature_media"},jxt=["src","alt"],Wxt=["src","alt"],Yxt={class:"lesson_title"},qxt=["innerHTML"],Gxt={class:"lesson_duration"},Xxt={key:0},Kxt={key:1},Zxt=["innerHTML"];function Jxt(t,e,n,i,s,o){const r=H("ArrowRight"),a=H("ArrowDown"),l=be,c=H("CircleIcon"),u=H("Lock"),d=H("PlayPlaceholderIcon"),h=H("LessonIcon"),f=H("PlayIcon");return v(),A("div",Ext,[g("div",Mxt,[g("div",Txt,[g("h3",null,x(t.$t("Course Content")),1),g("p",Pxt,[N(x(t.$_n("%s Topic","%s Topics",o.sectionsCount))+" ",1),e[0]||(e[0]=g("span",null," • ",-1)),N(" "+x(t.$_n("%s Lesson","%s Lessons",o.lessonsCount)),1)])])]),g("div",Ixt,[g("div",Lxt,[(v(!0),A(ee,null,we(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:q(["clickable fcom_section_primary_item",{is_closed:p.is_closed}])},[g("div",Dxt,[g("div",Rxt,[g("div",Vxt,[g("h4",null,x(p.title),1)]),g("span",Fxt,x(t.$t("%d lessons",p.lessons.length)),1),o.lessonDuration(p)?(v(),A("span",Nxt," • "+x(o.lessonDuration(p)),1)):O("",!0)])]),g("div",Bxt,[_(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,Oxt)):O("",!0),p.is_closed?O("",!0):(v(!0),A(ee,{key:1},we(p.lessons,m=>(v(),A("div",{key:m.id,class:q(["fcom_section_item",{is_locked:!o.isFreePreview(m)}])},[g("div",{onClick:y=>o.maybeGotoLesson(m,p),class:"fcom_section_item_title"},[g("p",Hxt,[_(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",Uxt,[m.featured_image?(v(),A("img",{key:0,src:m.featured_image,alt:m.title},null,8,jxt)):o.hasMediaImage(m)?(v(),A("img",{key:1,src:m.meta.media.image,alt:m.title},null,8,Wxt)):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",Yxt,[g("span",{innerHTML:m.title},null,8,qxt),g("span",Gxt,[m.meta.video_length?(v(),A("span",Xxt,x(o.formatSeconds(m.meta.video_length)),1)):(v(),A("span",Kxt,x("---")))])])],64)):(v(),A("span",{key:1,innerHTML:m.title},null,8,Zxt))])],8,zxt)],2))),128))]))),128))])])])}const Qxt=ue(Axt,[["render",Jxt]]),e6t={name:"LockscreenPaywallView",components:{ImagePlaceholder:a9},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()}},t6t={class:"fcom_paywall_cards"},n6t={class:"paywall_header"},s6t={class:"paywall_body"},i6t=["innerHTML"],o6t={key:0,class:"subscription"},r6t={class:"paywall_footer"},a6t={key:0,class:"fcom_mb_10"},l6t=["href"];function c6t(t,e,n,i,s,o){const r=Nt,a=o8,l=H("ImagePlaceholder");return v(),A("div",t6t,[s.loading?(v(),D(r,{key:0,rows:3,animated:!0})):(v(!0),A(ee,{key:1},we(o.filteredPaywalls,c=>(v(),A("div",{key:c.id,class:"fcom_paywall",style:Xe(o.cardStyles)},[g("div",n6t,[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,x(c.variation_title),1)]),g("div",s6t,[g("span",{innerHTML:c.total_price},null,8,i6t),o.isSubscriptionPaywall(c)?(v(),A("span",o6t," / "+x(o.getRepeatInterval(c)),1)):O("",!0)]),g("div",r6t,[n.field.show_description=="yes"&&(c!=null&&c.description)?(v(),A("span",a6t,x(c.description),1)):O("",!0),n.editable?Re((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)),[[md,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},x(n.field.button_text),13,l6t))])],4))),128))])}const u6t=ue(e6t,[["render",c6t]]),d6t={name:"LockScreenEditor",props:["title","lockscreen","sections","saving","loading","space_id","settings"],emits:["save","close"],components:{LockscreenLessonEditor:Qxt,MediaEmbeder:hv,BlockEditor:uU,LockscreenMeta:uxt,LockscreenPaywallView:u6t,FullEditorFrame:ES},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}}},h6t={class:"fcom_editor_topbar"},f6t={class:"fcom_editor_content"},p6t={class:"fcom_item"},m6t={class:"fcom_content"},g6t=["onBlur"],v6t=["onBlur"],_6t=["onBlur"],y6t={key:1,class:"fcom_content_wrap"},b6t={id:"fcomBlockContent"},w6t={key:2,class:"fcom_content_wrap"},k6t={key:1,class:"fcom_description"},C6t={key:3,class:"fcom_content_wrap"},x6t={key:4,class:"fcom_paywall_wrap"};function S6t(t,e,n,i,s,o){const r=H("lockscreen-meta"),a=U1,l=H("Lock"),c=be,u=H("block-editor"),d=H("FullEditorFrame"),h=H("welcome-banner"),f=H("lockscreen-lesson-editor"),p=Nt,m=H("lockscreen-paywall-view"),y=qs,b=jo;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",h6t,[_(c,null,{default:w(()=>[_(l)]),_:1}),g("h3",null,x(n.title),1)]),g("div",f6t,[(v(!0),A(ee,null,we(o.lockscreenFields,k=>{var C;return v(),A("div",p6t,[k.type=="image"?(v(),A("div",{key:0,class:"fcom_image_wrap",style:Xe(o.imageStyles(k))},[g("div",m6t,[g("h2",{style:Xe(o.headingStyles(k)),contenteditable:"true",onBlur:$=>o.updateHeading($,k)},x(k.heading),45,g6t),k.description?(v(),A("p",{key:0,style:Xe(o.descriptionStyles(k)),contenteditable:"true",onBlur:$=>o.updateDescription($,k)},x(k.description),45,v6t)):O("",!0),k.button_text?(v(),A("button",{key:1,class:"fcom_btn",style:Xe(o.buttonStyles(k)),contenteditable:"true",onBlur:$=>o.updateButtonLabel($,k)},x(k.button_text),45,_6t)):O("",!0)])],4)):O("",!0),k.type=="block"?(v(),A("div",y6t,[g("div",b6t,[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","modelValue","onUpdate:modelValue"]))])])):O("",!0),k.type=="welcome_banner"?(v(),A("div",w6t,[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",k6t,x(t.$t("__COURSE_BANNER_EMPTY_DESC")),1))])):O("",!0),k.type=="lesson"?(v(),A("div",C6t,[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",x6t,[_(m,{space_id:n.space_id,field:k,editable:!0},null,8,["space_id","field"])])):O("",!0)])}),256))])]),_:1})]),_:1})],64)}const xW=ue(d6t,[["render",S6t]]),$6t={name:"SpaceLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:xW},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()}},A6t={key:0,class:"fcom_lockscreen_meta"},E6t={class:"fcom_description"},M6t={class:"white_loaded"};function T6t(t,e,n,i,s,o){const r=H("lock-screen-editor"),a=Nt,l=jo;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",A6t,[g("div",E6t,[g("p",null,x(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",M6t,[_(a,{animated:!0,rows:10})])]),_:1})):O("",!0)}const P6t=ue($6t,[["render",T6t]]),I6t=Object.freeze(Object.defineProperty({__proto__:null,default:P6t},Symbol.toStringTag,{value:"Module"})),L6t={name:"ManageSpaceLinks",components:{MenuGroupSettings:mU},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})}}},O6t={style:{"max-width":"800px",padding:"20px",margin:"0 auto"}},D6t={class:"fcom_card_sections"};function R6t(t,e,n,i,s,o){const r=H("menu-group-settings"),a=qs,l=jo;return v(),D(l,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(a,null,{default:w(()=>[g("div",O6t,[g("div",D6t,[_(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 V6t=ue(L6t,[["render",R6t]]),MP=Object.freeze(Object.defineProperty({__proto__:null,default:V6t},Symbol.toStringTag,{value:"Module"})),F6t={name:"SpacePageEditor",components:{FullEditorFrame:ES},emits:["close","saved"],props:["page","spaceProfile"],data(){return{loading:!0,saving:!1,baseline:"",removeRouterGuard:null,form:{title:"",slug:"",message:"",status:"draft",privacy:"public",meta:{show_in_nav:"yes",nav_label:"",emoji:"",featured_image_id:0,enable_comments:"no",seo_description:"",layout:"unified",show_title:"yes",show_featured_image:"no"}}}},computed:{isDirty(){return!!this.baseline&&JSON.stringify(this.form)!==this.baseline},editorSettings(){return{...this.form.meta,slug:this.form.slug,privacy:this.form.privacy}}},methods:{applyEditorSettings(t){const{slug:e,privacy:n,...i}=t||{};this.form.slug=e||"",this.form.privacy=n==="members_only"?"members_only":"public",this.form.meta=i},fetchPage(){this.loading=!0,this.$get(`spaces/${this.spaceProfile.slug}/pages/${this.page.slug}`).then(t=>{const e=t.page;this.form={title:e.title||"",slug:e.slug||"",message:e.message||"",status:e.status||"draft",privacy:e.privacy||"public",meta:Object.assign({show_in_nav:"yes",nav_label:"",emoji:"",featured_image_id:0,enable_comments:"no",seo_description:"",layout:"unified",show_title:"yes",show_featured_image:"no"},e.meta||{})},this.baseline=JSON.stringify(this.form)}).catch(t=>{this.$handleError(t),this.$emit("close")}).finally(()=>{this.loading=!1})},save(){if(!this.saving){if(!this.form.title||!this.form.title.trim()){this.$notify.error(this.$t("Page title is required"));return}this.saving=!0,this.$put(`spaces/${this.spaceProfile.slug}/pages/${this.page.id}`,{page:this.form}).then(t=>{this.baseline=JSON.stringify(this.form),this.$notify.success(t.message),this.$emit("saved",t.page)}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1})}},confirmDiscard(){return this.isDirty?this.$confirm(this.$t("You have unsaved changes. Are you sure you want to close?"),this.$t("Confirm"),{confirmButtonText:this.$t("Yes"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>!0).catch(()=>!1):Promise.resolve(!0)},requestClose(){this.confirmDiscard().then(t=>{t&&this.$emit("close")})},handleBeforeUnload(t){this.isDirty&&(t.preventDefault(),t.returnValue="")}},mounted(){this.fetchPage(),window.addEventListener("beforeunload",this.handleBeforeUnload);const t=this.$route.name,e=this.$route.params.space;this.removeRouterGuard=this.$router.beforeEach((n,i,s)=>{if(n.name===t&&n.params.space===e){s();return}this.confirmDiscard().then(o=>{s(o?void 0:!1)})})},beforeUnmount(){window.removeEventListener("beforeunload",this.handleBeforeUnload),this.removeRouterGuard&&(this.removeRouterGuard(),this.removeRouterGuard=null)}},N6t={class:"fcom_full_editor fcom_space_page_editor"},B6t={class:"fcom_full_editor_header"},z6t=["aria-label"],H6t={class:"fcom_desktop_only"},U6t={class:"full_editor_actions"},j6t=["title","href"],W6t={key:0,style:{padding:"40px"}};function Y6t(t,e,n,i,s,o){const r=H("ArrowLeft"),a=be,l=H("arrow-down"),c=He,u=$r,d=Ar,h=Sr,f=H("View"),p=j1,m=Nt,y=H("FullEditorFrame"),b=jo,k=H1;return v(),A("div",N6t,[_(k,null,{default:w(()=>[_(p,{class:"fcom_full_editor_header_wrap"},{default:w(()=>[g("div",B6t,[g("button",{type:"button",onClick:e[0]||(e[0]=C=>o.requestClose()),class:"fcom_back_header","aria-label":t.$t("Back to Pages")},[_(a,{class:"fcom_arrow_icon"},{default:w(()=>[_(r)]),_:1}),g("span",H6t,x(t.$t("Back to Pages")),1)],8,z6t),g("div",U6t,[_(h,{onCommand:e[1]||(e[1]=C=>{s.form.status=C}),trigger:"click"},{dropdown:w(()=>[_(d,null,{default:w(()=>[_(u,{command:"draft"},{default:w(()=>[N(x(t.$t("Draft")),1)]),_:1}),_(u,{command:"published"},{default:w(()=>[N(x(t.$t("Published")),1)]),_:1})]),_:1})]),default:w(()=>[_(c,{type:s.form.status=="published"?"success":"info",bg:"",text:"",class:"el-dropdown-link"},{default:w(()=>[N(x(t.$labelize(s.form.status))+" ",1),_(a,{class:"el-icon--right"},{default:w(()=>[_(l)]),_:1})]),_:1},8,["type"])]),_:1}),_(c,{style:{"margin-left":"15px"},disabled:s.saving||s.loading,loading:s.saving,onClick:e[2]||(e[2]=C=>o.save()),class:"fcom_primary_button"},{default:w(()=>[N(x(t.$t("Save")),1)]),_:1},8,["disabled","loading"]),n.page.permalink?(v(),A("a",{key:0,title:t.$t("Preview Page"),class:"el-button el-button--text",target:"_blank",rel:"noopener",href:n.page.permalink},[_(a,null,{default:w(()=>[_(f)]),_:1})],8,j6t)):O("",!0)])])]),_:1}),_(k,{class:"fcom_full_editor_container"},{default:w(()=>[_(b,{style:{overflow:"hidden",padding:"0"},class:"fcom_full_editor_main"},{default:w(()=>[s.loading?(v(),A("div",W6t,[_(m,{rows:8,animated:!0})])):(v(),D(y,{key:1,ref:"fullEditorFrame",editorParams:{context:"space_page",page_id:n.page.id},frameHeight:"calc(100vh - 60px)",documentTitle:s.form.title,metaSettings:o.editorSettings,featured_image_id:s.form.meta.featured_image_id||"",onTitleUpdated:e[3]||(e[3]=C=>{s.form.title=C}),onMetaUpdated:o.applyEditorSettings,onFeaturedMediaUpdated:e[4]||(e[4]=C=>{s.form.meta.featured_image_id=C}),modelValue:s.form.message,"onUpdate:modelValue":e[5]||(e[5]=C=>s.form.message=C)},null,8,["editorParams","documentTitle","metaSettings","featured_image_id","onMetaUpdated","modelValue"]))]),_:1})]),_:1})]),_:1})])}const q6t=ue(F6t,[["render",Y6t]]),G6t={name:"ManageSpacePages",components:{FluentDnD:za,ActionPopover:oa,SpacePageEditor:q6t,GenericPromo:pU},emits:["close"],props:["spaceProfile","savingCount"],setup(){return{spaceStore:$S()}},data(){return{loading:!0,saving:!1,creating:!1,pages:[],search:"",statusFilter:"all",editingPage:null}},computed:{counts(){const t={all:this.pages.length,published:0,draft:0};return this.pages.forEach(e=>{e.status==="published"?t.published++:t.draft++}),t},isFiltered(){return this.statusFilter!=="all"||!!this.search.trim()},filteredPages(){if(!this.isFiltered)return this.pages;const t=this.search.trim().toLowerCase();return this.pages.filter(e=>this.statusFilter==="published"&&e.status!=="published"||this.statusFilter==="draft"&&e.status==="published"?!1:t?`${e.title||""} ${e.slug||""}`.toLowerCase().includes(t):!0)},canReorder(){return!this.isFiltered&&!this.saving}},watch:{savingCount(){this.$emit("close")}},methods:{isInNav(t){var e;return((e=t.meta)==null?void 0:e.show_in_nav)==="yes"},pageEmoji(t){var e;return((e=t.meta)==null?void 0:e.emoji)||""},pageInitial(t){return(t.title||"?").trim().charAt(0).toUpperCase()},clearFilters(){this.search="",this.statusFilter="all"},pageRowActions(t){const e=t.status==="published";return[{label:e?this.$t("Switch to Draft"):this.$t("Publish"),action:()=>this.setStatus(t,e?"draft":"published")},{label:this.isInNav(t)?this.$t("Hide from Menu"):this.$t("Show in Menu"),action:()=>this.setNavVisibility(t,!this.isInNav(t))},{label:this.$t("Copy Link"),action:()=>this.$toClipboard(t.permalink,"Page link copied to clipboard")},{label:this.$t("Duplicate"),action:()=>this.duplicatePage(t)},{label:this.$t("Delete"),type:"danger",action:()=>this.deletePage(t)}]},fetchPages(t=null){this.loading=!0,this.$get(`spaces/${this.spaceProfile.slug}/pages`).then(e=>{if(this.pages=e.pages||[],t){const n=this.pages.find(i=>i.id==t);n&&this.openEditor(n)}}).catch(e=>{this.$handleError(e)}).finally(()=>{this.loading=!1})},promptCreate(){this.$promt(this.$t("Give your page a title. You can change it later."),this.$t("New Page"),{confirmButtonText:this.$t("Create Page"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button"}).then(t=>{const e=(t.value||"").trim();if(!e){this.$notify.error(this.$t("Page title is required"));return}this.createPage(e)}).catch(()=>{})},createPage(t){this.creating=!0,this.$post(`spaces/${this.spaceProfile.slug}/pages`,{title:t}).then(e=>{this.$notify.success(e.message),this.pages.push(e.page),this.refreshSpace(),this.openEditor(e.page)}).catch(e=>{this.$handleError(e)}).finally(()=>{this.creating=!1})},duplicatePage(t){this.$post(`spaces/${this.spaceProfile.slug}/pages/${t.id}/duplicate`).then(e=>{this.$notify.success(e.message),this.pages.push(e.page),this.refreshSpace()}).catch(e=>{this.$handleError(e)})},setStatus(t,e){this.patchPage(t,{status:e})},setNavVisibility(t,e){this.patchPage(t,{meta:Object.assign({},t.meta,{show_in_nav:e?"yes":"no"})})},patchPage(t,e){this.$put(`spaces/${this.spaceProfile.slug}/pages/${t.id}`,{page:e}).then(n=>{this.$notify.success(n.message),this.replaceRow(n.page),this.refreshSpace()}).catch(n=>{this.$handleError(n)})},deletePage(t){this.$confirm(this.$t("Are you sure you want to delete this page? This cannot be undone."),this.$t("Delete Page"),{confirmButtonText:this.$t("Yes, Delete"),cancelButtonText:this.$t("Cancel"),confirmButtonClass:"fcom_primary_button",cancelButtonClass:"fcom_secondary_button",type:"warning"}).then(()=>{this.$del(`spaces/${this.spaceProfile.slug}/pages/${t.id}`).then(e=>{this.$notify.success(e.message),this.pages=this.pages.filter(n=>n.id!==t.id),this.refreshSpace()}).catch(e=>{this.$handleError(e)})}).catch(()=>{})},onReorder(){this.canReorder&&(this.saving=!0,this.$patch(`spaces/${this.spaceProfile.slug}/pages/re-index`,{page_ids:this.pages.map(t=>t.id)}).then(t=>{this.$notify.success(t.message),this.refreshSpace()}).catch(t=>{this.$handleError(t)}).finally(()=>{this.saving=!1}))},openEditor(t){this.editingPage=t},closeEditor(){this.editingPage=null},replaceRow(t){const e=this.pages.findIndex(n=>n.id===t.id);e!==-1&&this.pages.splice(e,1,Object.assign({},this.pages[e],t))},onPageSaved(t){this.replaceRow(t),this.editingPage&&this.editingPage.id===t.id&&(this.editingPage=Object.assign({},this.editingPage,t)),this.refreshSpace()},refreshSpace(){const t=this.spaceProfile.slug;this.spaceStore.invalidateSpace(t),this.spaceStore.fetchSpace(t,!0).catch(()=>{})}},mounted(){if(!this.has_pro){this.loading=!1;return}this.fetchPages(this.$route.query.page_id||null)}},X6t={style:{"max-width":"1200px",padding:"20px",margin:"0 auto"}},K6t={class:"fcom_card_sections"},Z6t={class:"fcom_section_primary fcom_space_pages_settings"},J6t={class:"fcom_section_primary_item"},Q6t={class:"fcom_section_primary_item_title"},e4t={class:"fcom_heading_item"},t4t={class:"fcom_section_subtitle"},n4t={key:0,class:"fcom_section_item_actions"},s4t={key:0,class:"fcom_section_items"},i4t={style:{padding:"1rem"}},o4t={key:1,class:"fcom_section_items"},r4t={key:0,style:{padding:"1rem"}},a4t={key:1,style:{padding:"1rem"}},l4t={class:"fcom_pages_toolbar"},c4t={key:0,class:"fcom_pages_filter_note"},u4t={key:0},d4t={key:1},h4t={class:"fcom_pages_table",role:"table"},f4t={class:"fcom_pages_table_head",role:"row"},p4t={class:"fcom_pages_col_main",role:"columnheader"},m4t={class:"fcom_pages_col_status",role:"columnheader"},g4t={class:"fcom_pages_col_layout",role:"columnheader"},v4t={class:"fcom_pages_col_updated",role:"columnheader"},_4t={class:"fcom_pages_col_actions",role:"columnheader"},y4t={class:"fcom_visually_hidden"},b4t={class:"fcom_pages_col_main",role:"cell"},w4t=["title"],k4t=["src"],C4t=["textContent"],x4t=["textContent"],S4t={class:"fcom_page_identity"},$4t=["title","onClick","textContent"],A4t=["href","title"],E4t={class:"fcom_pages_col_status",role:"cell"},M4t={class:"fcom_pages_col_layout",role:"cell"},T4t=["textContent"],P4t={key:0,class:"fcom_page_cell_sub"},I4t={key:1,class:"fcom_page_cell_sub fcom_page_empty"},L4t={class:"fcom_pages_col_updated",role:"cell"},O4t=["title"],D4t=["title"],R4t={class:"fcom_pages_col_actions fcom_section_item_actions",role:"cell"};function V4t(t,e,n,i,s,o){const r=hi,a=He,l=H("generic-promo"),c=Nt,u=ft,d=Hd,h=ws,f=H("action-popover"),p=H("FluentDnD"),m=qs,y=H("space-page-editor"),b=jo;return v(),D(b,{class:"fcom_full_editor_main"},{default:w(()=>[_(m,null,{default:w(()=>[g("div",X6t,[g("div",K6t,[g("div",Z6t,[g("div",J6t,[g("div",Q6t,[g("div",e4t,[g("h4",null,x(t.$t("Pages")),1),s.pages.length?(v(),D(r,{key:0,type:"info",size:"small",round:""},{default:w(()=>[N(x(s.pages.length),1)]),_:1})):O("",!0)]),g("p",t4t,x(t.$t("Static pages for this space, like rules, an FAQ or current offers.")),1)]),t.has_pro?(v(),A("div",n4t,[_(a,{class:"fcom_primary_button",disabled:s.creating,onClick:e[0]||(e[0]=k=>o.promptCreate())},{default:w(()=>[N(x(t.$t("Add New Page")),1)]),_:1},8,["disabled"])])):O("",!0)]),t.has_pro?(v(),A("div",o4t,[s.loading?(v(),A("div",r4t,[_(c,{rows:4,animated:!0})])):s.pages.length?(v(),A(ee,{key:2},[g("div",l4t,[_(u,{modelValue:s.search,"onUpdate:modelValue":e[1]||(e[1]=k=>s.search=k),clearable:"",size:"small",class:"fcom_pages_search",placeholder:t.$t("Search pages")},null,8,["modelValue","placeholder"]),_(h,{modelValue:s.statusFilter,"onUpdate:modelValue":e[2]||(e[2]=k=>s.statusFilter=k),size:"small"},{default:w(()=>[_(d,{value:"all"},{default:w(()=>[N(x(t.$t("All"))+" ("+x(o.counts.all)+") ",1)]),_:1}),_(d,{value:"published"},{default:w(()=>[N(x(t.$t("Published"))+" ("+x(o.counts.published)+") ",1)]),_:1}),_(d,{value:"draft"},{default:w(()=>[N(x(t.$t("Draft"))+" ("+x(o.counts.draft)+") ",1)]),_:1})]),_:1},8,["modelValue"])]),o.isFiltered?(v(),A("div",c4t,[o.filteredPages.length?(v(),A("span",u4t,x(t.$t("Showing %1$s of %2$s pages. Clear the filters to reorder.",o.filteredPages.length,s.pages.length)),1)):(v(),A("span",d4t,x(t.$t("No page matches these filters.")),1)),_(a,{link:"",type:"primary",size:"small",onClick:e[3]||(e[3]=k=>o.clearFilters())},{default:w(()=>[N(x(t.$t("Clear")),1)]),_:1})])):O("",!0),g("div",h4t,[g("div",f4t,[g("span",p4t,x(t.$t("Page")),1),g("span",m4t,x(t.$t("Status")),1),g("span",g4t,x(t.$t("Template")),1),g("span",v4t,x(t.$t("Last Updated")),1),g("span",_4t,[g("span",y4t,x(t.$t("Actions")),1)])]),_(p,{items:o.filteredPages,"row-key":"id",draggable:o.canReorder,handle:".fcom_drag_handle",onDrop:o.onReorder,"item-class":"fcom_pages_row"},{item:w(({data:k})=>[g("div",b4t,[o.canReorder?(v(),A("span",{key:0,class:"fcom_drag_handle",title:t.$t("Drag to reorder")},"⋮⋮",8,w4t)):O("",!0),g("span",{class:q(["fcom_page_thumb",{has_image:!!k.featured_image}])},[k.featured_image?(v(),A("img",{key:0,src:k.featured_image,alt:""},null,8,k4t)):o.pageEmoji(k)?(v(),A("span",{key:1,class:"fcom_page_thumb_emoji",textContent:x(o.pageEmoji(k))},null,8,C4t)):(v(),A("span",{key:2,class:"fcom_page_thumb_letter",textContent:x(o.pageInitial(k))},null,8,x4t))],2),g("span",S4t,[g("a",{href:"#",class:"fcom_page_title",title:k.title,onClick:Ee(C=>o.openEditor(k),["prevent"]),textContent:x(k.title)},null,8,$4t),g("a",{class:"fcom_page_slug",href:k.permalink,target:"_blank",rel:"noopener",title:k.status==="published"?t.$t("View page"):t.$t("Preview draft")},"/"+x(k.slug),9,A4t)])]),g("div",E4t,[_(r,{type:k.status==="published"?"success":"warning",size:"small","disable-transitions":""},{default:w(()=>[N(x(k.status==="published"?t.$t("Published"):t.$t("Draft")),1)]),_:2},1032,["type"]),k.privacy==="members_only"?(v(),D(r,{key:0,type:"info",size:"small","disable-transitions":""},{default:w(()=>[N(x(t.$t("Members Only")),1)]),_:1})):O("",!0),o.isInNav(k)?O("",!0):(v(),D(r,{key:1,type:"info",size:"small","disable-transitions":""},{default:w(()=>[N(x(t.$t("Hidden from menu")),1)]),_:1}))]),g("div",M4t,[g("span",{textContent:x(k.layout_label||t.$labelize(k.meta&&k.meta.layout))},null,8,T4t),k.word_count?(v(),A("span",P4t,x(t.$_n("%s word","%s words",k.word_count)),1)):(v(),A("span",I4t,x(t.$t("No content yet")),1))]),g("div",L4t,[g("span",{title:k.updated_at},x(k.updated_at?t.humanDateDiff(k.updated_at):"-"),9,O4t),k.author?(v(),A("span",{key:0,class:"fcom_page_cell_sub",title:k.author.name},x(t.$t("by %s",k.author.name)),9,D4t)):O("",!0)]),g("div",R4t,[_(a,{size:"small",onClick:C=>o.openEditor(k)},{default:w(()=>[N(x(t.$t("Edit")),1)]),_:1},8,["onClick"]),_(f,{items:o.pageRowActions(k),placement:"bottom-end",width:180},null,8,["items"])])]),_:1},8,["items","draggable","onDrop"])])],64)):(v(),A("div",a4t,[g("p",null,x(t.$t("No page has been created for this space yet.")),1)]))])):(v(),A("div",s4t,[g("div",i4t,[_(l,{placement:"feature_lock_space_pages"})])]))])])])]),_:1}),(v(),D(ea,{to:"body"},[s.editingPage?(v(),D(y,{key:0,page:s.editingPage,spaceProfile:n.spaceProfile,onClose:e[4]||(e[4]=k=>o.closeEditor()),onSaved:o.onPageSaved},null,8,["page","spaceProfile","onSaved"])):O("",!0)]))]),_:1})}const F4t=ue(G6t,[["render",V4t]]),N4t=Object.freeze(Object.defineProperty({__proto__:null,default:F4t},Symbol.toStringTag,{value:"Module"})),B4t={name:"CourseGeneralTab",components:{CreateCourseForm:kS},props:["course","savingCount"],emits:["completed"]},z4t={style:{"max-width":"800px",margin:"0 auto"}};function H4t(t,e,n,i,s,o){const r=H("create-course-form"),a=qs,l=jo;return v(),D(l,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(a,null,{default:w(()=>[g("div",z4t,[_(r,{savingCount:n.savingCount,course:n.course,onCompleted:e[0]||(e[0]=c=>t.$emit("completed",c))},null,8,["savingCount","course"])])]),_:1})]),_:1})}const U4t=ue(B4t,[["render",H4t]]),j4t=Object.freeze(Object.defineProperty({__proto__:null,default:U4t},Symbol.toStringTag,{value:"Module"})),W4t={name:"CourseLockscreen",props:["spaceProfile","savingCount"],emits:["close"],components:{LockScreenEditor:xW},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()}},Y4t={key:0,class:"fcom_lockscreen_meta"},q4t={class:"fcom_description"};function G4t(t,e,n,i,s,o){const r=H("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",Y4t,[g("div",q4t,[g("p",null,x(t.$t("__LOCK_SCRREN_DESC")),1)])])):O("",!0)]),_:1},8,["title","space_id","settings","lockscreen","sections","saving","loading","onSave"])):O("",!0)}const X4t=ue(W4t,[["render",G4t]]),K4t=Object.freeze(Object.defineProperty({__proto__:null,default:X4t},Symbol.toStringTag,{value:"Module"})),Z4t={name:"CourseWelcomeBannerConfig",props:["course","savingCount","hasPro"],emits:["saved"],components:{MediaEmbeder:hv,BgImageUpload:gv,CrepeEditor:cu},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()}},J4t={class:"fcom_customizer_container"},Q4t={class:"fcom_wc_banner_header"},e8t={class:"fcom_wc_banner_options"},t8t={class:"fcom_filter_menu"},n8t={class:"fcom_filter_menu_ul"},s8t={key:0,class:"fcom_wc_banner_load_error"},i8t={key:1,class:"fcom_wc_banner_content"},o8t={class:"fcom_wc_banner_content_header"},r8t={class:"fcom_wc_banner_media_type"},a8t={key:0,class:"fcom_banner_image_holder"},l8t={key:1,class:"fcom_banner_image_preview"},c8t={key:0,class:"fcom_wc_banner_cta_buttons"},u8t={class:"fcom_course_wc_help_text"},d8t={class:"fcom_wc_banner_content_footer"},h8t={key:1,class:"fcom_upgrade_banner"},f8t={class:"fcom_upgrade_description"},p8t=["href"];function m8t(t,e,n,i,s,o){const r=He,a=eu,l=Li,c=ws,u=H("BgImageUpload"),d=Wo,h=H("CloseBold"),f=be,p=H("media-embeder"),m=ft,y=en,b=H("crepe-editor"),k=sn,C=Jt,$=k8,S=Yt,M=tn,P=Nt;return v(),A("div",J4t,[g("div",Q4t,[g("h4",null,x(t.$t("Welcome Banner")),1)]),g("div",e8t,[g("div",t8t,[g("ul",n8t,[g("li",null,[g("a",{onClick:e[0]||(e[0]=Ee(T=>o.switchOption("enrolled"),["prevent"])),class:q({"router-link-exact-active":s.currentTab=="enrolled"}),href:"#"},x(t.$t("Enrolled")),3)]),g("li",null,[g("a",{onClick:e[1]||(e[1]=Ee(T=>o.switchOption("not_enrolled"),["prevent"])),class:q({"router-link-exact-active":s.currentTab=="not_enrolled"}),href:"#"},x(t.$t("Not Enrolled")),3)])])])]),s.loadFailed?(v(),A("div",s8t,[g("p",null,x(t.$t("Unable to load welcome banner settings. Please try again.")),1),_(r,{class:"fcom_primary_button",onClick:o.getSettings},{default:w(()=>[N(x(t.$t("Retry")),1)]),_:1},8,["onClick"])])):s.loading?(v(),D(P,{key:2,rows:5})):(v(),A("div",i8t,[g("div",o8t,[g("h4",null,x(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:q(["fcom_wc_banner_content_body",{fcom_wc_disabled:!o.isEnabled}])},[g("div",r8t,[g("p",null,x(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",l8t,[_(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",a8t,[g("h4",null,x(t.$t("Featured Image")),1),g("p",null,x(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:Ee(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",c8t,[(v(!0),A(ee,null,we(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"])]),_:1},8,["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"])]),_:1},8,["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})]),_:1},8,["onClick"])]))),128)),_($,{underline:!1,onClick:o.addButton},{default:w(()=>[N(x("+ "+t.$t("Add button")),1)]),_:1},8,["onClick"])])):(v(),D($,{key:1,underline:!1,onClick:o.addButton},{default:w(()=>[N(x("+ "+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(()=>[_(S,{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(()=>[N(x(t.$t("Allow members to close the welcome banner")),1)]),_:1},8,["modelValue"]),g("div",u8t,x(t.$t("If allowed, members will be able to hide the banner")),1)]),_:1})):O("",!0)]),_:1},8,["onSubmit"])],2),g("div",d8t,[n.hasPro?(v(),D(r,{key:0,class:"fcom_primary_button",disabled:s.saving,loading:s.saving,onClick:o.saveSettings},{default:w(()=>[N(x(t.$t("Update Info")),1)]),_:1},8,["disabled","loading","onClick"])):(v(),A("div",h8t,[g("p",f8t,x(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"},x(t.$t("Upgrade to Pro")),9,p8t)]))])]))])}const g8t=ue(Z4t,[["render",m8t]]),v8t={name:"CourseWelcomeBannerTab",components:{CourseWelcomeBannerConfig:g8t},props:["course","savingCount","hasPro"]},_8t={class:"fcom_course_welcome_banner_wrap"};function y8t(t,e,n,i,s,o){const r=H("course-welcome-banner-config"),a=qs,l=jo;return v(),D(l,{class:"fcom_full_editor_main lockscreen_editor"},{default:w(()=>[_(a,null,{default:w(()=>[g("div",_8t,[_(r,{course:n.course,savingCount:n.savingCount,hasPro:n.hasPro},null,8,["course","savingCount","hasPro"])])]),_:1})]),_:1})}const b8t=ue(v8t,[["render",y8t]]),w8t=Object.freeze(Object.defineProperty({__proto__:null,default:b8t},Symbol.toStringTag,{value:"Module"})),k8t=`.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%} | |
| 1453 | +`,C8t=Object.freeze(Object.defineProperty({__proto__:null,default:k8t},Symbol.toStringTag,{value:"Module"})),x8t=`.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} | |
| 1454 | +`,S8t=Object.freeze(Object.defineProperty({__proto__:null,default:x8t},Symbol.toStringTag,{value:"Module"}))});export default $8t(); | |