// SYSTEM PANEL //
[ROOT]
/
home
/
csender
/
legus.lawnet.me_backup_20250830-211559
/
assets
[ PARENT ]
EDIT :: index-BhhcJpm2.js
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ClientsManagement-Dhv4ZC-2.js","assets/ClientFormModal-CrBZzoXV.js","assets/ClientsManagement-tn0RQdqM.css","assets/CasesManagement-BQJLB9tv.js","assets/index-CJ0WrLJm.js","assets/CaseDetails-D3CyOhJA.js","assets/Permissions-Bu_NcXnh.js","assets/permissions-BurwELUK.js","assets/RoleEditor-RTkSpICa.js","assets/RoleEditor-BtcDgC_E.css","assets/EmployeeDetails-DI4FFMxc.js"])))=>i.map(i=>d[i]); var _l=Object.defineProperty;var xl=(e,t,s)=>t in e?_l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var Vt=(e,t,s)=>xl(e,typeof t!="symbol"?t+"":t,s);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const i of r.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&n(i)}).observe(document,{childList:!0,subtree:!0});function s(o){const r={};return o.integrity&&(r.integrity=o.integrity),o.referrerPolicy&&(r.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?r.credentials="include":o.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function n(o){if(o.ep)return;o.ep=!0;const r=s(o);fetch(o.href,r)}})();/** * @vue/shared v3.5.17 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **//*! #__NO_SIDE_EFFECTS__ */function No(e){const t=Object.create(null);for(const s of e.split(","))t[s]=1;return s=>s in t}const Se={},us=[],$t=()=>{},wl=()=>!1,Ln=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Bo=e=>e.startsWith("onUpdate:"),Ge=Object.assign,Uo=(e,t)=>{const s=e.indexOf(t);s>-1&&e.splice(s,1)},Cl=Object.prototype.hasOwnProperty,xe=(e,t)=>Cl.call(e,t),oe=Array.isArray,ds=e=>Xs(e)==="[object Map]",xs=e=>Xs(e)==="[object Set]",mr=e=>Xs(e)==="[object Date]",ce=e=>typeof e=="function",Me=e=>typeof e=="string",gt=e=>typeof e=="symbol",$e=e=>e!==null&&typeof e=="object",Ri=e=>($e(e)||ce(e))&&ce(e.then)&&ce(e.catch),Ti=Object.prototype.toString,Xs=e=>Ti.call(e),El=e=>Xs(e).slice(8,-1),Oi=e=>Xs(e)==="[object Object]",Vo=e=>Me(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Ps=No(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),Mn=e=>{const t=Object.create(null);return s=>t[s]||(t[s]=e(s))},Sl=/-(\w)/g,dt=Mn(e=>e.replace(Sl,(t,s)=>s?s.toUpperCase():"")),Al=/\B([A-Z])/g,is=Mn(e=>e.replace(Al,"-$1").toLowerCase()),Fn=Mn(e=>e.charAt(0).toUpperCase()+e.slice(1)),to=Mn(e=>e?`on${Fn(e)}`:""),Wt=(e,t)=>!Object.is(e,t),hn=(e,...t)=>{for(let s=0;s<e.length;s++)e[s](...t)},vo=(e,t,s,n=!1)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:n,value:s})},Cn=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let gr;const jn=()=>gr||(gr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Bs(e){if(oe(e)){const t={};for(let s=0;s<e.length;s++){const n=e[s],o=Me(n)?Tl(n):Bs(n);if(o)for(const r in o)t[r]=o[r]}return t}else if(Me(e)||$e(e))return e}const kl=/;(?![^(]*\))/g,$l=/:([^]+)/,Rl=/\/\*[^]*?\*\//g;function Tl(e){const t={};return e.replace(Rl,"").split(kl).forEach(s=>{if(s){const n=s.split($l);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function re(e){let t="";if(Me(e))t=e;else if(oe(e))for(let s=0;s<e.length;s++){const n=re(e[s]);n&&(t+=n+" ")}else if($e(e))for(const s in e)e[s]&&(t+=s+" ");return t.trim()}const Ol="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",Pl=No(Ol);function Pi(e){return!!e||e===""}function Il(e,t){if(e.length!==t.length)return!1;let s=!0;for(let n=0;s&&n<e.length;n++)s=ns(e[n],t[n]);return s}function ns(e,t){if(e===t)return!0;let s=mr(e),n=mr(t);if(s||n)return s&&n?e.getTime()===t.getTime():!1;if(s=gt(e),n=gt(t),s||n)return e===t;if(s=oe(e),n=oe(t),s||n)return s&&n?Il(e,t):!1;if(s=$e(e),n=$e(t),s||n){if(!s||!n)return!1;const o=Object.keys(e).length,r=Object.keys(t).length;if(o!==r)return!1;for(const i in e){const l=e.hasOwnProperty(i),c=t.hasOwnProperty(i);if(l&&!c||!l&&c||!ns(e[i],t[i]))return!1}}return String(e)===String(t)}function Ho(e,t){return e.findIndex(s=>ns(s,t))}const Ii=e=>!!(e&&e.__v_isRef===!0),F=e=>Me(e)?e:e==null?"":oe(e)||$e(e)&&(e.toString===Ti||!ce(e.toString))?Ii(e)?F(e.value):JSON.stringify(e,Li,2):String(e),Li=(e,t)=>Ii(t)?Li(e,t.value):ds(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((s,[n,o],r)=>(s[so(n,r)+" =>"]=o,s),{})}:xs(t)?{[`Set(${t.size})`]:[...t.values()].map(s=>so(s))}:gt(t)?so(t):$e(t)&&!oe(t)&&!Oi(t)?String(t):t,so=(e,t="")=>{var s;return gt(e)?`Symbol(${(s=e.description)!=null?s:t})`:e};/** * @vue/reactivity v3.5.17 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let st;class Ll{constructor(t=!1){this.detached=t,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=st,!t&&st&&(this.index=(st.scopes||(st.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].pause();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].pause()}}resume(){if(this._active&&this._isPaused){this._isPaused=!1;let t,s;if(this.scopes)for(t=0,s=this.scopes.length;t<s;t++)this.scopes[t].resume();for(t=0,s=this.effects.length;t<s;t++)this.effects[t].resume()}}run(t){if(this._active){const s=st;try{return st=this,t()}finally{st=s}}}on(){++this._on===1&&(this.prevScope=st,st=this)}off(){this._on>0&&--this._on===0&&(st=this.prevScope,this.prevScope=void 0)}stop(t){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s<n;s++)this.effects[s].stop();for(this.effects.length=0,s=0,n=this.cleanups.length;s<n;s++)this.cleanups[s]();if(this.cleanups.length=0,this.scopes){for(s=0,n=this.scopes.length;s<n;s++)this.scopes[s].stop(!0);this.scopes.length=0}if(!this.detached&&this.parent&&!t){const o=this.parent.scopes.pop();o&&o!==this&&(this.parent.scopes[this.index]=o,o.index=this.index)}this.parent=void 0}}}function Ml(){return st}let ke;const no=new WeakSet;class Mi{constructor(t){this.fn=t,this.deps=void 0,this.depsTail=void 0,this.flags=5,this.next=void 0,this.cleanup=void 0,this.scheduler=void 0,st&&st.active&&st.effects.push(this)}pause(){this.flags|=64}resume(){this.flags&64&&(this.flags&=-65,no.has(this)&&(no.delete(this),this.trigger()))}notify(){this.flags&2&&!(this.flags&32)||this.flags&8||ji(this)}run(){if(!(this.flags&1))return this.fn();this.flags|=2,vr(this),Di(this);const t=ke,s=ht;ke=this,ht=!0;try{return this.fn()}finally{Ni(this),ke=t,ht=s,this.flags&=-3}}stop(){if(this.flags&1){for(let t=this.deps;t;t=t.nextDep)Ko(t);this.deps=this.depsTail=void 0,vr(this),this.onStop&&this.onStop(),this.flags&=-2}}trigger(){this.flags&64?no.add(this):this.scheduler?this.scheduler():this.runIfDirty()}runIfDirty(){yo(this)&&this.run()}get dirty(){return yo(this)}}let Fi=0,Is,Ls;function ji(e,t=!1){if(e.flags|=8,t){e.next=Ls,Ls=e;return}e.next=Is,Is=e}function qo(){Fi++}function zo(){if(--Fi>0)return;if(Ls){let t=Ls;for(Ls=void 0;t;){const s=t.next;t.next=void 0,t.flags&=-9,t=s}}let e;for(;Is;){let t=Is;for(Is=void 0;t;){const s=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(n){e||(e=n)}t=s}}if(e)throw e}function Di(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ni(e){let t,s=e.depsTail,n=s;for(;n;){const o=n.prevDep;n.version===-1?(n===s&&(s=o),Ko(n),Fl(n)):t=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=o}e.deps=t,e.depsTail=s}function yo(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Bi(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Bi(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===Us)||(e.globalVersion=Us,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!yo(e))))return;e.flags|=2;const t=e.dep,s=ke,n=ht;ke=e,ht=!0;try{Di(e);const o=e.fn(e._value);(t.version===0||Wt(o,e._value))&&(e.flags|=128,e._value=o,t.version++)}catch(o){throw t.version++,o}finally{ke=s,ht=n,Ni(e),e.flags&=-3}}function Ko(e,t=!1){const{dep:s,prevSub:n,nextSub:o}=e;if(n&&(n.nextSub=o,e.prevSub=void 0),o&&(o.prevSub=n,e.nextSub=void 0),s.subs===e&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let r=s.computed.deps;r;r=r.nextDep)Ko(r,!0)}!t&&!--s.sc&&s.map&&s.map.delete(s.key)}function Fl(e){const{prevDep:t,nextDep:s}=e;t&&(t.nextDep=s,e.prevDep=void 0),s&&(s.prevDep=t,e.nextDep=void 0)}let ht=!0;const Ui=[];function jt(){Ui.push(ht),ht=!1}function Dt(){const e=Ui.pop();ht=e===void 0?!0:e}function vr(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const s=ke;ke=void 0;try{t()}finally{ke=s}}}let Us=0;class jl{constructor(t,s){this.sub=t,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Wo{constructor(t){this.computed=t,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(t){if(!ke||!ht||ke===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==ke)s=this.activeLink=new jl(ke,this),ke.deps?(s.prevDep=ke.depsTail,ke.depsTail.nextDep=s,ke.depsTail=s):ke.deps=ke.depsTail=s,Vi(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=ke.depsTail,s.nextDep=void 0,ke.depsTail.nextDep=s,ke.depsTail=s,ke.deps===s&&(ke.deps=n)}return s}trigger(t){this.version++,Us++,this.notify(t)}notify(t){qo();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{zo()}}}function Vi(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let n=t.deps;n;n=n.nextDep)Vi(n)}const s=e.dep.subs;s!==e&&(e.prevSub=s,s&&(s.nextSub=e)),e.dep.subs=e}}const bo=new WeakMap,ts=Symbol(""),_o=Symbol(""),Vs=Symbol("");function ze(e,t,s){if(ht&&ke){let n=bo.get(e);n||bo.set(e,n=new Map);let o=n.get(s);o||(n.set(s,o=new Wo),o.map=n,o.key=s),o.track()}}function It(e,t,s,n,o,r){const i=bo.get(e);if(!i){Us++;return}const l=c=>{c&&c.trigger()};if(qo(),t==="clear")i.forEach(l);else{const c=oe(e),d=c&&Vo(s);if(c&&s==="length"){const u=Number(n);i.forEach((f,m)=>{(m==="length"||m===Vs||!gt(m)&&m>=u)&&l(f)})}else switch((s!==void 0||i.has(void 0))&&l(i.get(s)),d&&l(i.get(Vs)),t){case"add":c?d&&l(i.get("length")):(l(i.get(ts)),ds(e)&&l(i.get(_o)));break;case"delete":c||(l(i.get(ts)),ds(e)&&l(i.get(_o)));break;case"set":ds(e)&&l(i.get(ts));break}}zo()}function as(e){const t=_e(e);return t===e?t:(ze(t,"iterate",Vs),lt(e)?t:t.map(Ue))}function Dn(e){return ze(e=_e(e),"iterate",Vs),e}const Dl={__proto__:null,[Symbol.iterator](){return oo(this,Symbol.iterator,Ue)},concat(...e){return as(this).concat(...e.map(t=>oe(t)?as(t):t))},entries(){return oo(this,"entries",e=>(e[1]=Ue(e[1]),e))},every(e,t){return Tt(this,"every",e,t,void 0,arguments)},filter(e,t){return Tt(this,"filter",e,t,s=>s.map(Ue),arguments)},find(e,t){return Tt(this,"find",e,t,Ue,arguments)},findIndex(e,t){return Tt(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Tt(this,"findLast",e,t,Ue,arguments)},findLastIndex(e,t){return Tt(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Tt(this,"forEach",e,t,void 0,arguments)},includes(...e){return ro(this,"includes",e)},indexOf(...e){return ro(this,"indexOf",e)},join(e){return as(this).join(e)},lastIndexOf(...e){return ro(this,"lastIndexOf",e)},map(e,t){return Tt(this,"map",e,t,void 0,arguments)},pop(){return ks(this,"pop")},push(...e){return ks(this,"push",e)},reduce(e,...t){return yr(this,"reduce",e,t)},reduceRight(e,...t){return yr(this,"reduceRight",e,t)},shift(){return ks(this,"shift")},some(e,t){return Tt(this,"some",e,t,void 0,arguments)},splice(...e){return ks(this,"splice",e)},toReversed(){return as(this).toReversed()},toSorted(e){return as(this).toSorted(e)},toSpliced(...e){return as(this).toSpliced(...e)},unshift(...e){return ks(this,"unshift",e)},values(){return oo(this,"values",Ue)}};function oo(e,t,s){const n=Dn(e),o=n[t]();return n!==e&&!lt(e)&&(o._next=o.next,o.next=()=>{const r=o._next();return r.value&&(r.value=s(r.value)),r}),o}const Nl=Array.prototype;function Tt(e,t,s,n,o,r){const i=Dn(e),l=i!==e&&!lt(e),c=i[t];if(c!==Nl[t]){const f=c.apply(e,r);return l?Ue(f):f}let d=s;i!==e&&(l?d=function(f,m){return s.call(this,Ue(f),m,e)}:s.length>2&&(d=function(f,m){return s.call(this,f,m,e)}));const u=c.call(i,d,n);return l&&o?o(u):u}function yr(e,t,s,n){const o=Dn(e);let r=s;return o!==e&&(lt(e)?s.length>3&&(r=function(i,l,c){return s.call(this,i,l,c,e)}):r=function(i,l,c){return s.call(this,i,Ue(l),c,e)}),o[t](r,...n)}function ro(e,t,s){const n=_e(e);ze(n,"iterate",Vs);const o=n[t](...s);return(o===-1||o===!1)&&Zo(s[0])?(s[0]=_e(s[0]),n[t](...s)):o}function ks(e,t,s=[]){jt(),qo();const n=_e(e)[t].apply(e,s);return zo(),Dt(),n}const Bl=No("__proto__,__v_isRef,__isVue"),Hi=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(gt));function Ul(e){gt(e)||(e=String(e));const t=_e(this);return ze(t,"has",e),t.hasOwnProperty(e)}class qi{constructor(t=!1,s=!1){this._isReadonly=t,this._isShallow=s}get(t,s,n){if(s==="__v_skip")return t.__v_skip;const o=this._isReadonly,r=this._isShallow;if(s==="__v_isReactive")return!o;if(s==="__v_isReadonly")return o;if(s==="__v_isShallow")return r;if(s==="__v_raw")return n===(o?r?Yl:Ji:r?Wi:Ki).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(n)?t:void 0;const i=oe(t);if(!o){let c;if(i&&(c=Dl[s]))return c;if(s==="hasOwnProperty")return Ul}const l=Reflect.get(t,s,Je(t)?t:n);return(gt(s)?Hi.has(s):Bl(s))||(o||ze(t,"get",s),r)?l:Je(l)?i&&Vo(s)?l:l.value:$e(l)?o?Zi(l):ws(l):l}}class zi extends qi{constructor(t=!1){super(!1,t)}set(t,s,n,o){let r=t[s];if(!this._isShallow){const c=Jt(r);if(!lt(n)&&!Jt(n)&&(r=_e(r),n=_e(n)),!oe(t)&&Je(r)&&!Je(n))return c?!1:(r.value=n,!0)}const i=oe(t)&&Vo(s)?Number(s)<t.length:xe(t,s),l=Reflect.set(t,s,n,Je(t)?t:o);return t===_e(o)&&(i?Wt(n,r)&&It(t,"set",s,n):It(t,"add",s,n)),l}deleteProperty(t,s){const n=xe(t,s);t[s];const o=Reflect.deleteProperty(t,s);return o&&n&&It(t,"delete",s,void 0),o}has(t,s){const n=Reflect.has(t,s);return(!gt(s)||!Hi.has(s))&&ze(t,"has",s),n}ownKeys(t){return ze(t,"iterate",oe(t)?"length":ts),Reflect.ownKeys(t)}}class Vl extends qi{constructor(t=!1){super(!0,t)}set(t,s){return!0}deleteProperty(t,s){return!0}}const Hl=new zi,ql=new Vl,zl=new zi(!0);const xo=e=>e,an=e=>Reflect.getPrototypeOf(e);function Kl(e,t,s){return function(...n){const o=this.__v_raw,r=_e(o),i=ds(r),l=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,d=o[e](...n),u=s?xo:t?En:Ue;return!t&&ze(r,"iterate",c?_o:ts),{next(){const{value:f,done:m}=d.next();return m?{value:f,done:m}:{value:l?[u(f[0]),u(f[1])]:u(f),done:m}},[Symbol.iterator](){return this}}}}function ln(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function Wl(e,t){const s={get(o){const r=this.__v_raw,i=_e(r),l=_e(o);e||(Wt(o,l)&&ze(i,"get",o),ze(i,"get",l));const{has:c}=an(i),d=t?xo:e?En:Ue;if(c.call(i,o))return d(r.get(o));if(c.call(i,l))return d(r.get(l));r!==i&&r.get(o)},get size(){const o=this.__v_raw;return!e&&ze(_e(o),"iterate",ts),Reflect.get(o,"size",o)},has(o){const r=this.__v_raw,i=_e(r),l=_e(o);return e||(Wt(o,l)&&ze(i,"has",o),ze(i,"has",l)),o===l?r.has(o):r.has(o)||r.has(l)},forEach(o,r){const i=this,l=i.__v_raw,c=_e(l),d=t?xo:e?En:Ue;return!e&&ze(c,"iterate",ts),l.forEach((u,f)=>o.call(r,d(u),d(f),i))}};return Ge(s,e?{add:ln("add"),set:ln("set"),delete:ln("delete"),clear:ln("clear")}:{add(o){!t&&!lt(o)&&!Jt(o)&&(o=_e(o));const r=_e(this);return an(r).has.call(r,o)||(r.add(o),It(r,"add",o,o)),this},set(o,r){!t&&!lt(r)&&!Jt(r)&&(r=_e(r));const i=_e(this),{has:l,get:c}=an(i);let d=l.call(i,o);d||(o=_e(o),d=l.call(i,o));const u=c.call(i,o);return i.set(o,r),d?Wt(r,u)&&It(i,"set",o,r):It(i,"add",o,r),this},delete(o){const r=_e(this),{has:i,get:l}=an(r);let c=i.call(r,o);c||(o=_e(o),c=i.call(r,o)),l&&l.call(r,o);const d=r.delete(o);return c&&It(r,"delete",o,void 0),d},clear(){const o=_e(this),r=o.size!==0,i=o.clear();return r&&It(o,"clear",void 0,void 0),i}}),["keys","values","entries",Symbol.iterator].forEach(o=>{s[o]=Kl(o,e,t)}),s}function Jo(e,t){const s=Wl(e,t);return(n,o,r)=>o==="__v_isReactive"?!e:o==="__v_isReadonly"?e:o==="__v_raw"?n:Reflect.get(xe(s,o)&&o in n?s:n,o,r)}const Jl={get:Jo(!1,!1)},Gl={get:Jo(!1,!0)},Zl={get:Jo(!0,!1)};const Ki=new WeakMap,Wi=new WeakMap,Ji=new WeakMap,Yl=new WeakMap;function Ql(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Xl(e){return e.__v_skip||!Object.isExtensible(e)?0:Ql(El(e))}function ws(e){return Jt(e)?e:Go(e,!1,Hl,Jl,Ki)}function Gi(e){return Go(e,!1,zl,Gl,Wi)}function Zi(e){return Go(e,!0,ql,Zl,Ji)}function Go(e,t,s,n,o){if(!$e(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const r=Xl(e);if(r===0)return e;const i=o.get(e);if(i)return i;const l=new Proxy(e,r===2?n:s);return o.set(e,l),l}function fs(e){return Jt(e)?fs(e.__v_raw):!!(e&&e.__v_isReactive)}function Jt(e){return!!(e&&e.__v_isReadonly)}function lt(e){return!!(e&&e.__v_isShallow)}function Zo(e){return e?!!e.__v_raw:!1}function _e(e){const t=e&&e.__v_raw;return t?_e(t):e}function ec(e){return!xe(e,"__v_skip")&&Object.isExtensible(e)&&vo(e,"__v_skip",!0),e}const Ue=e=>$e(e)?ws(e):e,En=e=>$e(e)?Zi(e):e;function Je(e){return e?e.__v_isRef===!0:!1}function G(e){return Yi(e,!1)}function tc(e){return Yi(e,!0)}function Yi(e,t){return Je(e)?e:new sc(e,t)}class sc{constructor(t,s){this.dep=new Wo,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?t:_e(t),this._value=s?t:Ue(t),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(t){const s=this._rawValue,n=this.__v_isShallow||lt(t)||Jt(t);t=n?t:_e(t),Wt(t,s)&&(this._rawValue=t,this._value=n?t:Ue(t),this.dep.trigger())}}function je(e){return Je(e)?e.value:e}const nc={get:(e,t,s)=>t==="__v_raw"?e:je(Reflect.get(e,t,s)),set:(e,t,s,n)=>{const o=e[t];return Je(o)&&!Je(s)?(o.value=s,!0):Reflect.set(e,t,s,n)}};function Qi(e){return fs(e)?e:new Proxy(e,nc)}class oc{constructor(t,s,n){this.fn=t,this.setter=s,this._value=void 0,this.dep=new Wo(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Us-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&ke!==this)return ji(this,!0),!0}get value(){const t=this.dep.track();return Bi(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function rc(e,t,s=!1){let n,o;return ce(e)?n=e:(n=e.get,o=e.set),new oc(n,o,s)}const cn={},Sn=new WeakMap;let Qt;function ic(e,t=!1,s=Qt){if(s){let n=Sn.get(s);n||Sn.set(s,n=[]),n.push(e)}}function ac(e,t,s=Se){const{immediate:n,deep:o,once:r,scheduler:i,augmentJob:l,call:c}=s,d=N=>o?N:lt(N)||o===!1||o===0?Lt(N,1):Lt(N);let u,f,m,y,b=!1,v=!1;if(Je(e)?(f=()=>e.value,b=lt(e)):fs(e)?(f=()=>d(e),b=!0):oe(e)?(v=!0,b=e.some(N=>fs(N)||lt(N)),f=()=>e.map(N=>{if(Je(N))return N.value;if(fs(N))return d(N);if(ce(N))return c?c(N,2):N()})):ce(e)?t?f=c?()=>c(e,2):e:f=()=>{if(m){jt();try{m()}finally{Dt()}}const N=Qt;Qt=u;try{return c?c(e,3,[y]):e(y)}finally{Qt=N}}:f=$t,t&&o){const N=f,W=o===!0?1/0:o;f=()=>Lt(N(),W)}const E=Ml(),A=()=>{u.stop(),E&&E.active&&Uo(E.effects,u)};if(r&&t){const N=t;t=(...W)=>{N(...W),A()}}let S=v?new Array(e.length).fill(cn):cn;const T=N=>{if(!(!(u.flags&1)||!u.dirty&&!N))if(t){const W=u.run();if(o||b||(v?W.some((te,Q)=>Wt(te,S[Q])):Wt(W,S))){m&&m();const te=Qt;Qt=u;try{const Q=[W,S===cn?void 0:v&&S[0]===cn?[]:S,y];S=W,c?c(t,3,Q):t(...Q)}finally{Qt=te}}}else u.run()};return l&&l(T),u=new Mi(f),u.scheduler=i?()=>i(T,!1):T,y=N=>ic(N,!1,u),m=u.onStop=()=>{const N=Sn.get(u);if(N){if(c)c(N,4);else for(const W of N)W();Sn.delete(u)}},t?n?T(!0):S=u.run():i?i(T.bind(null,!0),!0):u.run(),A.pause=u.pause.bind(u),A.resume=u.resume.bind(u),A.stop=A,A}function Lt(e,t=1/0,s){if(t<=0||!$e(e)||e.__v_skip||(s=s||new Set,s.has(e)))return e;if(s.add(e),t--,Je(e))Lt(e.value,t,s);else if(oe(e))for(let n=0;n<e.length;n++)Lt(e[n],t,s);else if(xs(e)||ds(e))e.forEach(n=>{Lt(n,t,s)});else if(Oi(e)){for(const n in e)Lt(e[n],t,s);for(const n of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,n)&&Lt(e[n],t,s)}return e}/** * @vue/runtime-core v3.5.17 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/function en(e,t,s,n){try{return n?e(...n):e()}catch(o){Nn(o,t,s)}}function Rt(e,t,s,n){if(ce(e)){const o=en(e,t,s,n);return o&&Ri(o)&&o.catch(r=>{Nn(r,t,s)}),o}if(oe(e)){const o=[];for(let r=0;r<e.length;r++)o.push(Rt(e[r],t,s,n));return o}}function Nn(e,t,s,n=!0){const o=t?t.vnode:null,{errorHandler:r,throwUnhandledErrorInProduction:i}=t&&t.appContext.config||Se;if(t){let l=t.parent;const c=t.proxy,d=`https://vuejs.org/error-reference/#runtime-${s}`;for(;l;){const u=l.ec;if(u){for(let f=0;f<u.length;f++)if(u[f](e,c,d)===!1)return}l=l.parent}if(r){jt(),en(r,null,10,[e,c,d]),Dt();return}}lc(e,s,o,n,i)}function lc(e,t,s,n=!0,o=!1){if(o)throw e;console.error(e)}const Qe=[];let St=-1;const ps=[];let qt=null,ls=0;const Xi=Promise.resolve();let An=null;function Yo(e){const t=An||Xi;return e?t.then(this?e.bind(this):e):t}function cc(e){let t=St+1,s=Qe.length;for(;t<s;){const n=t+s>>>1,o=Qe[n],r=Hs(o);r<e||r===e&&o.flags&2?t=n+1:s=n}return t}function Qo(e){if(!(e.flags&1)){const t=Hs(e),s=Qe[Qe.length-1];!s||!(e.flags&2)&&t>=Hs(s)?Qe.push(e):Qe.splice(cc(t),0,e),e.flags|=1,ea()}}function ea(){An||(An=Xi.then(sa))}function uc(e){oe(e)?ps.push(...e):qt&&e.id===-1?qt.splice(ls+1,0,e):e.flags&1||(ps.push(e),e.flags|=1),ea()}function br(e,t,s=St+1){for(;s<Qe.length;s++){const n=Qe[s];if(n&&n.flags&2){if(e&&n.id!==e.uid)continue;Qe.splice(s,1),s--,n.flags&4&&(n.flags&=-2),n(),n.flags&4||(n.flags&=-2)}}}function ta(e){if(ps.length){const t=[...new Set(ps)].sort((s,n)=>Hs(s)-Hs(n));if(ps.length=0,qt){qt.push(...t);return}for(qt=t,ls=0;ls<qt.length;ls++){const s=qt[ls];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}qt=null,ls=0}}const Hs=e=>e.id==null?e.flags&2?-1:1/0:e.id;function sa(e){try{for(St=0;St<Qe.length;St++){const t=Qe[St];t&&!(t.flags&8)&&(t.flags&4&&(t.flags&=-2),en(t,t.i,t.i?15:14),t.flags&4||(t.flags&=-2))}}finally{for(;St<Qe.length;St++){const t=Qe[St];t&&(t.flags&=-2)}St=-1,Qe.length=0,ta(),An=null,(Qe.length||ps.length)&&sa()}}let Ve=null,na=null;function kn(e){const t=Ve;return Ve=e,na=e&&e.type.__scopeId||null,t}function Re(e,t=Ve,s){if(!t||e._n)return e;const n=(...o)=>{n._d&&Rr(-1);const r=kn(t);let i;try{i=e(...o)}finally{kn(r),n._d&&Rr(1)}return i};return n._n=!0,n._c=!0,n._d=!0,n}function ge(e,t){if(Ve===null)return e;const s=Hn(Ve),n=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[r,i,l,c=Se]=t[o];r&&(ce(r)&&(r={mounted:r,updated:r}),r.deep&&Lt(i),n.push({dir:r,instance:s,value:i,oldValue:void 0,arg:l,modifiers:c}))}return e}function Zt(e,t,s,n){const o=e.dirs,r=t&&t.dirs;for(let i=0;i<o.length;i++){const l=o[i];r&&(l.oldValue=r[i].value);let c=l.dir[n];c&&(jt(),Rt(c,s,8,[e.el,l,e,t]),Dt())}}const dc=Symbol("_vte"),fc=e=>e.__isTeleport;function Xo(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Xo(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}/*! #__NO_SIDE_EFFECTS__ */function he(e,t){return ce(e)?Ge({name:e.name},t,{setup:e}):e}function oa(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Ms(e,t,s,n,o=!1){if(oe(e)){e.forEach((b,v)=>Ms(b,t&&(oe(t)?t[v]:t),s,n,o));return}if(hs(n)&&!o){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&Ms(e,t,s,n.component.subTree);return}const r=n.shapeFlag&4?Hn(n.component):n.el,i=o?null:r,{i:l,r:c}=e,d=t&&t.r,u=l.refs===Se?l.refs={}:l.refs,f=l.setupState,m=_e(f),y=f===Se?()=>!1:b=>xe(m,b);if(d!=null&&d!==c&&(Me(d)?(u[d]=null,y(d)&&(f[d]=null)):Je(d)&&(d.value=null)),ce(c))en(c,l,12,[i,u]);else{const b=Me(c),v=Je(c);if(b||v){const E=()=>{if(e.f){const A=b?y(c)?f[c]:u[c]:c.value;o?oe(A)&&Uo(A,r):oe(A)?A.includes(r)||A.push(r):b?(u[c]=[r],y(c)&&(f[c]=u[c])):(c.value=[r],e.k&&(u[e.k]=c.value))}else b?(u[c]=i,y(c)&&(f[c]=i)):v&&(c.value=i,e.k&&(u[e.k]=i))};i?(E.id=-1,it(E,s)):E()}}}jn().requestIdleCallback;jn().cancelIdleCallback;const hs=e=>!!e.type.__asyncLoader,ra=e=>e.type.__isKeepAlive;function pc(e,t){ia(e,"a",t)}function hc(e,t){ia(e,"da",t)}function ia(e,t,s=Ke){const n=e.__wdc||(e.__wdc=()=>{let o=s;for(;o;){if(o.isDeactivated)return;o=o.parent}return e()});if(Bn(t,n,s),s){let o=s.parent;for(;o&&o.parent;)ra(o.parent.vnode)&&mc(n,t,s,o),o=o.parent}}function mc(e,t,s,n){const o=Bn(t,e,n,!0);er(()=>{Uo(n[t],o)},s)}function Bn(e,t,s=Ke,n=!1){if(s){const o=s[e]||(s[e]=[]),r=t.__weh||(t.__weh=(...i)=>{jt();const l=nn(s),c=Rt(t,s,e,i);return l(),Dt(),c});return n?o.unshift(r):o.push(r),r}}const Bt=e=>(t,s=Ke)=>{(!Ks||e==="sp")&&Bn(e,(...n)=>t(...n),s)},gc=Bt("bm"),Ut=Bt("m"),vc=Bt("bu"),yc=Bt("u"),bc=Bt("bum"),er=Bt("um"),_c=Bt("sp"),xc=Bt("rtg"),wc=Bt("rtc");function Cc(e,t=Ke){Bn("ec",e,t)}const aa="components";function la(e,t){return ua(aa,e,!0,t)||e}const ca=Symbol.for("v-ndc");function Ec(e){return Me(e)?ua(aa,e,!1)||e:e||ca}function ua(e,t,s=!0,n=!1){const o=Ve||Ke;if(o){const r=o.type;{const l=cu(r,!1);if(l&&(l===t||l===dt(t)||l===Fn(dt(t))))return r}const i=_r(o[e]||r[e],t)||_r(o.appContext[e],t);return!i&&n?r:i}}function _r(e,t){return e&&(e[t]||e[dt(t)]||e[Fn(dt(t))])}function Le(e,t,s,n){let o;const r=s,i=oe(e);if(i||Me(e)){const l=i&&fs(e);let c=!1,d=!1;l&&(c=!lt(e),d=Jt(e),e=Dn(e)),o=new Array(e.length);for(let u=0,f=e.length;u<f;u++)o[u]=t(c?d?En(Ue(e[u])):Ue(e[u]):e[u],u,void 0,r)}else if(typeof e=="number"){o=new Array(e);for(let l=0;l<e;l++)o[l]=t(l+1,l,void 0,r)}else if($e(e))if(e[Symbol.iterator])o=Array.from(e,(l,c)=>t(l,c,void 0,r));else{const l=Object.keys(e);o=new Array(l.length);for(let c=0,d=l.length;c<d;c++){const u=l[c];o[c]=t(e[u],u,c,r)}}else o=[];return o}function tn(e,t,s={},n,o){if(Ve.ce||Ve.parent&&hs(Ve.parent)&&Ve.parent.ce)return R(),ct(ve,null,[X("slot",s,n)],64);let r=e[t];r&&r._c&&(r._d=!1),R();const i=r&&da(r(s)),l=s.key||i&&i.key,c=ct(ve,{key:(l&&!gt(l)?l:`_${t}`)+""},i||[],i&&e._===1?64:-2);return!o&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),r&&r._c&&(r._d=!0),c}function da(e){return e.some(t=>zs(t)?!(t.type===Nt||t.type===ve&&!da(t.children)):!0)?e:null}const wo=e=>e?Oa(e)?Hn(e):wo(e.parent):null,Fs=Ge(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>wo(e.parent),$root:e=>wo(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>pa(e),$forceUpdate:e=>e.f||(e.f=()=>{Qo(e.update)}),$nextTick:e=>e.n||(e.n=Yo.bind(e.proxy)),$watch:e=>zc.bind(e)}),io=(e,t)=>e!==Se&&!e.__isScriptSetup&&xe(e,t),Sc={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:s,setupState:n,data:o,props:r,accessCache:i,type:l,appContext:c}=e;let d;if(t[0]!=="$"){const y=i[t];if(y!==void 0)switch(y){case 1:return n[t];case 2:return o[t];case 4:return s[t];case 3:return r[t]}else{if(io(n,t))return i[t]=1,n[t];if(o!==Se&&xe(o,t))return i[t]=2,o[t];if((d=e.propsOptions[0])&&xe(d,t))return i[t]=3,r[t];if(s!==Se&&xe(s,t))return i[t]=4,s[t];Co&&(i[t]=0)}}const u=Fs[t];let f,m;if(u)return t==="$attrs"&&ze(e.attrs,"get",""),u(e);if((f=l.__cssModules)&&(f=f[t]))return f;if(s!==Se&&xe(s,t))return i[t]=4,s[t];if(m=c.config.globalProperties,xe(m,t))return m[t]},set({_:e},t,s){const{data:n,setupState:o,ctx:r}=e;return io(o,t)?(o[t]=s,!0):n!==Se&&xe(n,t)?(n[t]=s,!0):xe(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(r[t]=s,!0)},has({_:{data:e,setupState:t,accessCache:s,ctx:n,appContext:o,propsOptions:r}},i){let l;return!!s[i]||e!==Se&&xe(e,i)||io(t,i)||(l=r[0])&&xe(l,i)||xe(n,i)||xe(Fs,i)||xe(o.config.globalProperties,i)},defineProperty(e,t,s){return s.get!=null?e._.accessCache[t]=0:xe(s,"value")&&this.set(e,t,s.value,null),Reflect.defineProperty(e,t,s)}};function xr(e){return oe(e)?e.reduce((t,s)=>(t[s]=null,t),{}):e}let Co=!0;function Ac(e){const t=pa(e),s=e.proxy,n=e.ctx;Co=!1,t.beforeCreate&&wr(t.beforeCreate,e,"bc");const{data:o,computed:r,methods:i,watch:l,provide:c,inject:d,created:u,beforeMount:f,mounted:m,beforeUpdate:y,updated:b,activated:v,deactivated:E,beforeDestroy:A,beforeUnmount:S,destroyed:T,unmounted:N,render:W,renderTracked:te,renderTriggered:Q,errorCaptured:_,serverPrefetch:ne,expose:pe,inheritAttrs:Te,components:He,directives:ue,filters:Y}=t;if(d&&kc(d,n,null),i)for(const U in i){const J=i[U];ce(J)&&(n[U]=J.bind(s))}if(o){const U=o.call(s,s);$e(U)&&(e.data=ws(U))}if(Co=!0,r)for(const U in r){const J=r[U],Oe=ce(J)?J.bind(s,s):ce(J.get)?J.get.bind(s,s):$t,qe=!ce(J)&&ce(J.set)?J.set.bind(s):$t,De=le({get:Oe,set:qe});Object.defineProperty(n,U,{enumerable:!0,configurable:!0,get:()=>De.value,set:Ie=>De.value=Ie})}if(l)for(const U in l)fa(l[U],n,s,U);if(c){const U=ce(c)?c.call(s):c;Reflect.ownKeys(U).forEach(J=>{mn(J,U[J])})}u&&wr(u,e,"c");function p(U,J){oe(J)?J.forEach(Oe=>U(Oe.bind(s))):J&&U(J.bind(s))}if(p(gc,f),p(Ut,m),p(vc,y),p(yc,b),p(pc,v),p(hc,E),p(Cc,_),p(wc,te),p(xc,Q),p(bc,S),p(er,N),p(_c,ne),oe(pe))if(pe.length){const U=e.exposed||(e.exposed={});pe.forEach(J=>{Object.defineProperty(U,J,{get:()=>s[J],set:Oe=>s[J]=Oe})})}else e.exposed||(e.exposed={});W&&e.render===$t&&(e.render=W),Te!=null&&(e.inheritAttrs=Te),He&&(e.components=He),ue&&(e.directives=ue),ne&&oa(e)}function kc(e,t,s=$t){oe(e)&&(e=Eo(e));for(const n in e){const o=e[n];let r;$e(o)?"default"in o?r=mt(o.from||n,o.default,!0):r=mt(o.from||n):r=mt(o),Je(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:i=>r.value=i}):t[n]=r}}function wr(e,t,s){Rt(oe(e)?e.map(n=>n.bind(t.proxy)):e.bind(t.proxy),t,s)}function fa(e,t,s,n){let o=n.includes(".")?Aa(s,n):()=>s[n];if(Me(e)){const r=t[e];ce(r)&&kt(o,r)}else if(ce(e))kt(o,e.bind(s));else if($e(e))if(oe(e))e.forEach(r=>fa(r,t,s,n));else{const r=ce(e.handler)?e.handler.bind(s):t[e.handler];ce(r)&&kt(o,r,e)}}function pa(e){const t=e.type,{mixins:s,extends:n}=t,{mixins:o,optionsCache:r,config:{optionMergeStrategies:i}}=e.appContext,l=r.get(t);let c;return l?c=l:!o.length&&!s&&!n?c=t:(c={},o.length&&o.forEach(d=>$n(c,d,i,!0)),$n(c,t,i)),$e(t)&&r.set(t,c),c}function $n(e,t,s,n=!1){const{mixins:o,extends:r}=t;r&&$n(e,r,s,!0),o&&o.forEach(i=>$n(e,i,s,!0));for(const i in t)if(!(n&&i==="expose")){const l=$c[i]||s&&s[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const $c={data:Cr,props:Er,emits:Er,methods:Os,computed:Os,beforeCreate:Ze,created:Ze,beforeMount:Ze,mounted:Ze,beforeUpdate:Ze,updated:Ze,beforeDestroy:Ze,beforeUnmount:Ze,destroyed:Ze,unmounted:Ze,activated:Ze,deactivated:Ze,errorCaptured:Ze,serverPrefetch:Ze,components:Os,directives:Os,watch:Tc,provide:Cr,inject:Rc};function Cr(e,t){return t?e?function(){return Ge(ce(e)?e.call(this,this):e,ce(t)?t.call(this,this):t)}:t:e}function Rc(e,t){return Os(Eo(e),Eo(t))}function Eo(e){if(oe(e)){const t={};for(let s=0;s<e.length;s++)t[e[s]]=e[s];return t}return e}function Ze(e,t){return e?[...new Set([].concat(e,t))]:t}function Os(e,t){return e?Ge(Object.create(null),e,t):t}function Er(e,t){return e?oe(e)&&oe(t)?[...new Set([...e,...t])]:Ge(Object.create(null),xr(e),xr(t??{})):t}function Tc(e,t){if(!e)return t;if(!t)return e;const s=Ge(Object.create(null),e);for(const n in t)s[n]=Ze(e[n],t[n]);return s}function ha(){return{app:null,config:{isNativeTag:wl,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 Oc=0;function Pc(e,t){return function(n,o=null){ce(n)||(n=Ge({},n)),o!=null&&!$e(o)&&(o=null);const r=ha(),i=new WeakSet,l=[];let c=!1;const d=r.app={_uid:Oc++,_component:n,_props:o,_container:null,_context:r,_instance:null,version:du,get config(){return r.config},set config(u){},use(u,...f){return i.has(u)||(u&&ce(u.install)?(i.add(u),u.install(d,...f)):ce(u)&&(i.add(u),u(d,...f))),d},mixin(u){return r.mixins.includes(u)||r.mixins.push(u),d},component(u,f){return f?(r.components[u]=f,d):r.components[u]},directive(u,f){return f?(r.directives[u]=f,d):r.directives[u]},mount(u,f,m){if(!c){const y=d._ceVNode||X(n,o);return y.appContext=r,m===!0?m="svg":m===!1&&(m=void 0),e(y,u,m),c=!0,d._container=u,u.__vue_app__=d,Hn(y.component)}},onUnmount(u){l.push(u)},unmount(){c&&(Rt(l,d._instance,16),e(null,d._container),delete d._container.__vue_app__)},provide(u,f){return r.provides[u]=f,d},runWithContext(u){const f=ms;ms=d;try{return u()}finally{ms=f}}};return d}}let ms=null;function mn(e,t){if(Ke){let s=Ke.provides;const n=Ke.parent&&Ke.parent.provides;n===s&&(s=Ke.provides=Object.create(n)),s[e]=t}}function mt(e,t,s=!1){const n=Ke||Ve;if(n||ms){let o=ms?ms._context.provides:n?n.parent==null||n.ce?n.vnode.appContext&&n.vnode.appContext.provides:n.parent.provides:void 0;if(o&&e in o)return o[e];if(arguments.length>1)return s&&ce(t)?t.call(n&&n.proxy):t}}const ma={},ga=()=>Object.create(ma),va=e=>Object.getPrototypeOf(e)===ma;function Ic(e,t,s,n=!1){const o={},r=ga();e.propsDefaults=Object.create(null),ya(e,t,o,r);for(const i in e.propsOptions[0])i in o||(o[i]=void 0);s?e.props=n?o:Gi(o):e.type.props?e.props=o:e.props=r,e.attrs=r}function Lc(e,t,s,n){const{props:o,attrs:r,vnode:{patchFlag:i}}=e,l=_e(o),[c]=e.propsOptions;let d=!1;if((n||i>0)&&!(i&16)){if(i&8){const u=e.vnode.dynamicProps;for(let f=0;f<u.length;f++){let m=u[f];if(Un(e.emitsOptions,m))continue;const y=t[m];if(c)if(xe(r,m))y!==r[m]&&(r[m]=y,d=!0);else{const b=dt(m);o[b]=So(c,l,b,y,e,!1)}else y!==r[m]&&(r[m]=y,d=!0)}}}else{ya(e,t,o,r)&&(d=!0);let u;for(const f in l)(!t||!xe(t,f)&&((u=is(f))===f||!xe(t,u)))&&(c?s&&(s[f]!==void 0||s[u]!==void 0)&&(o[f]=So(c,l,f,void 0,e,!0)):delete o[f]);if(r!==l)for(const f in r)(!t||!xe(t,f))&&(delete r[f],d=!0)}d&&It(e.attrs,"set","")}function ya(e,t,s,n){const[o,r]=e.propsOptions;let i=!1,l;if(t)for(let c in t){if(Ps(c))continue;const d=t[c];let u;o&&xe(o,u=dt(c))?!r||!r.includes(u)?s[u]=d:(l||(l={}))[u]=d:Un(e.emitsOptions,c)||(!(c in n)||d!==n[c])&&(n[c]=d,i=!0)}if(r){const c=_e(s),d=l||Se;for(let u=0;u<r.length;u++){const f=r[u];s[f]=So(o,c,f,d[f],e,!xe(d,f))}}return i}function So(e,t,s,n,o,r){const i=e[s];if(i!=null){const l=xe(i,"default");if(l&&n===void 0){const c=i.default;if(i.type!==Function&&!i.skipFactory&&ce(c)){const{propsDefaults:d}=o;if(s in d)n=d[s];else{const u=nn(o);n=d[s]=c.call(null,t),u()}}else n=c;o.ce&&o.ce._setProp(s,n)}i[0]&&(r&&!l?n=!1:i[1]&&(n===""||n===is(s))&&(n=!0))}return n}const Mc=new WeakMap;function ba(e,t,s=!1){const n=s?Mc:t.propsCache,o=n.get(e);if(o)return o;const r=e.props,i={},l=[];let c=!1;if(!ce(e)){const u=f=>{c=!0;const[m,y]=ba(f,t,!0);Ge(i,m),y&&l.push(...y)};!s&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}if(!r&&!c)return $e(e)&&n.set(e,us),us;if(oe(r))for(let u=0;u<r.length;u++){const f=dt(r[u]);Sr(f)&&(i[f]=Se)}else if(r)for(const u in r){const f=dt(u);if(Sr(f)){const m=r[u],y=i[f]=oe(m)||ce(m)?{type:m}:Ge({},m),b=y.type;let v=!1,E=!0;if(oe(b))for(let A=0;A<b.length;++A){const S=b[A],T=ce(S)&&S.name;if(T==="Boolean"){v=!0;break}else T==="String"&&(E=!1)}else v=ce(b)&&b.name==="Boolean";y[0]=v,y[1]=E,(v||xe(y,"default"))&&l.push(f)}}const d=[i,l];return $e(e)&&n.set(e,d),d}function Sr(e){return e[0]!=="$"&&!Ps(e)}const tr=e=>e[0]==="_"||e==="$stable",sr=e=>oe(e)?e.map(At):[At(e)],Fc=(e,t,s)=>{if(t._n)return t;const n=Re((...o)=>sr(t(...o)),s);return n._c=!1,n},_a=(e,t,s)=>{const n=e._ctx;for(const o in e){if(tr(o))continue;const r=e[o];if(ce(r))t[o]=Fc(o,r,n);else if(r!=null){const i=sr(r);t[o]=()=>i}}},xa=(e,t)=>{const s=sr(t);e.slots.default=()=>s},wa=(e,t,s)=>{for(const n in t)(s||!tr(n))&&(e[n]=t[n])},jc=(e,t,s)=>{const n=e.slots=ga();if(e.vnode.shapeFlag&32){const o=t.__;o&&vo(n,"__",o,!0);const r=t._;r?(wa(n,t,s),s&&vo(n,"_",r,!0)):_a(t,n)}else t&&xa(e,t)},Dc=(e,t,s)=>{const{vnode:n,slots:o}=e;let r=!0,i=Se;if(n.shapeFlag&32){const l=t._;l?s&&l===1?r=!1:wa(o,t,s):(r=!t.$stable,_a(t,o)),i=t}else t&&(xa(e,t),i={default:1});if(r)for(const l in o)!tr(l)&&i[l]==null&&delete o[l]},it=Qc;function Nc(e){return Bc(e)}function Bc(e,t){const s=jn();s.__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:i,createText:l,createComment:c,setText:d,setElementText:u,parentNode:f,nextSibling:m,setScopeId:y=$t,insertStaticContent:b}=e,v=(h,g,w,I=null,D=null,M=null,V=void 0,j=null,B=!!g.dynamicChildren)=>{if(h===g)return;h&&!$s(h,g)&&(I=C(h),Ie(h,D,M,!0),h=null),g.patchFlag===-2&&(B=!1,g.dynamicChildren=null);const{type:q,ref:se,shapeFlag:Z}=g;switch(q){case Vn:E(h,g,w,I);break;case Nt:A(h,g,w,I);break;case gn:h==null&&S(g,w,I,V);break;case ve:He(h,g,w,I,D,M,V,j,B);break;default:Z&1?W(h,g,w,I,D,M,V,j,B):Z&6?ue(h,g,w,I,D,M,V,j,B):(Z&64||Z&128)&&q.process(h,g,w,I,D,M,V,j,B,z)}se!=null&&D?Ms(se,h&&h.ref,M,g||h,!g):se==null&&h&&h.ref!=null&&Ms(h.ref,null,M,h,!0)},E=(h,g,w,I)=>{if(h==null)n(g.el=l(g.children),w,I);else{const D=g.el=h.el;g.children!==h.children&&d(D,g.children)}},A=(h,g,w,I)=>{h==null?n(g.el=c(g.children||""),w,I):g.el=h.el},S=(h,g,w,I)=>{[h.el,h.anchor]=b(h.children,g,w,I,h.el,h.anchor)},T=({el:h,anchor:g},w,I)=>{let D;for(;h&&h!==g;)D=m(h),n(h,w,I),h=D;n(g,w,I)},N=({el:h,anchor:g})=>{let w;for(;h&&h!==g;)w=m(h),o(h),h=w;o(g)},W=(h,g,w,I,D,M,V,j,B)=>{g.type==="svg"?V="svg":g.type==="math"&&(V="mathml"),h==null?te(g,w,I,D,M,V,j,B):ne(h,g,D,M,V,j,B)},te=(h,g,w,I,D,M,V,j)=>{let B,q;const{props:se,shapeFlag:Z,transition:ee,dirs:ae}=h;if(B=h.el=i(h.type,M,se&&se.is,se),Z&8?u(B,h.children):Z&16&&_(h.children,B,null,I,D,ao(h,M),V,j),ae&&Zt(h,null,I,"created"),Q(B,h,h.scopeId,V,I),se){for(const Ae in se)Ae!=="value"&&!Ps(Ae)&&r(B,Ae,null,se[Ae],M,I);"value"in se&&r(B,"value",null,se.value,M),(q=se.onVnodeBeforeMount)&&wt(q,I,h)}ae&&Zt(h,null,I,"beforeMount");const me=Uc(D,ee);me&&ee.beforeEnter(B),n(B,g,w),((q=se&&se.onVnodeMounted)||me||ae)&&it(()=>{q&&wt(q,I,h),me&&ee.enter(B),ae&&Zt(h,null,I,"mounted")},D)},Q=(h,g,w,I,D)=>{if(w&&y(h,w),I)for(let M=0;M<I.length;M++)y(h,I[M]);if(D){let M=D.subTree;if(g===M||$a(M.type)&&(M.ssContent===g||M.ssFallback===g)){const V=D.vnode;Q(h,V,V.scopeId,V.slotScopeIds,D.parent)}}},_=(h,g,w,I,D,M,V,j,B=0)=>{for(let q=B;q<h.length;q++){const se=h[q]=j?zt(h[q]):At(h[q]);v(null,se,g,w,I,D,M,V,j)}},ne=(h,g,w,I,D,M,V)=>{const j=g.el=h.el;let{patchFlag:B,dynamicChildren:q,dirs:se}=g;B|=h.patchFlag&16;const Z=h.props||Se,ee=g.props||Se;let ae;if(w&&Yt(w,!1),(ae=ee.onVnodeBeforeUpdate)&&wt(ae,w,g,h),se&&Zt(g,h,w,"beforeUpdate"),w&&Yt(w,!0),(Z.innerHTML&&ee.innerHTML==null||Z.textContent&&ee.textContent==null)&&u(j,""),q?pe(h.dynamicChildren,q,j,w,I,ao(g,D),M):V||J(h,g,j,null,w,I,ao(g,D),M,!1),B>0){if(B&16)Te(j,Z,ee,w,D);else if(B&2&&Z.class!==ee.class&&r(j,"class",null,ee.class,D),B&4&&r(j,"style",Z.style,ee.style,D),B&8){const me=g.dynamicProps;for(let Ae=0;Ae<me.length;Ae++){const we=me[Ae],et=Z[we],tt=ee[we];(tt!==et||we==="value")&&r(j,we,et,tt,D,w)}}B&1&&h.children!==g.children&&u(j,g.children)}else!V&&q==null&&Te(j,Z,ee,w,D);((ae=ee.onVnodeUpdated)||se)&&it(()=>{ae&&wt(ae,w,g,h),se&&Zt(g,h,w,"updated")},I)},pe=(h,g,w,I,D,M,V)=>{for(let j=0;j<g.length;j++){const B=h[j],q=g[j],se=B.el&&(B.type===ve||!$s(B,q)||B.shapeFlag&198)?f(B.el):w;v(B,q,se,null,I,D,M,V,!0)}},Te=(h,g,w,I,D)=>{if(g!==w){if(g!==Se)for(const M in g)!Ps(M)&&!(M in w)&&r(h,M,g[M],null,D,I);for(const M in w){if(Ps(M))continue;const V=w[M],j=g[M];V!==j&&M!=="value"&&r(h,M,j,V,D,I)}"value"in w&&r(h,"value",g.value,w.value,D)}},He=(h,g,w,I,D,M,V,j,B)=>{const q=g.el=h?h.el:l(""),se=g.anchor=h?h.anchor:l("");let{patchFlag:Z,dynamicChildren:ee,slotScopeIds:ae}=g;ae&&(j=j?j.concat(ae):ae),h==null?(n(q,w,I),n(se,w,I),_(g.children||[],w,se,D,M,V,j,B)):Z>0&&Z&64&&ee&&h.dynamicChildren?(pe(h.dynamicChildren,ee,w,D,M,V,j),(g.key!=null||D&&g===D.subTree)&&Ca(h,g,!0)):J(h,g,w,se,D,M,V,j,B)},ue=(h,g,w,I,D,M,V,j,B)=>{g.slotScopeIds=j,h==null?g.shapeFlag&512?D.ctx.activate(g,w,I,V,B):Y(g,w,I,D,M,V,B):L(h,g,B)},Y=(h,g,w,I,D,M,V)=>{const j=h.component=ou(h,I,D);if(ra(h)&&(j.ctx.renderer=z),ru(j,!1,V),j.asyncDep){if(D&&D.registerDep(j,p,V),!h.el){const B=j.subTree=X(Nt);A(null,B,g,w)}}else p(j,h,g,w,D,M,V)},L=(h,g,w)=>{const I=g.component=h.component;if(Zc(h,g,w))if(I.asyncDep&&!I.asyncResolved){U(I,g,w);return}else I.next=g,I.update();else g.el=h.el,I.vnode=g},p=(h,g,w,I,D,M,V)=>{const j=()=>{if(h.isMounted){let{next:Z,bu:ee,u:ae,parent:me,vnode:Ae}=h;{const _t=Ea(h);if(_t){Z&&(Z.el=Ae.el,U(h,Z,V)),_t.asyncDep.then(()=>{h.isUnmounted||j()});return}}let we=Z,et;Yt(h,!1),Z?(Z.el=Ae.el,U(h,Z,V)):Z=Ae,ee&&hn(ee),(et=Z.props&&Z.props.onVnodeBeforeUpdate)&&wt(et,me,Z,Ae),Yt(h,!0);const tt=kr(h),bt=h.subTree;h.subTree=tt,v(bt,tt,f(bt.el),C(bt),h,D,M),Z.el=tt.el,we===null&&Yc(h,tt.el),ae&&it(ae,D),(et=Z.props&&Z.props.onVnodeUpdated)&&it(()=>wt(et,me,Z,Ae),D)}else{let Z;const{el:ee,props:ae}=g,{bm:me,m:Ae,parent:we,root:et,type:tt}=h,bt=hs(g);Yt(h,!1),me&&hn(me),!bt&&(Z=ae&&ae.onVnodeBeforeMount)&&wt(Z,we,g),Yt(h,!0);{et.ce&&et.ce._def.shadowRoot!==!1&&et.ce._injectChildStyle(tt);const _t=h.subTree=kr(h);v(null,_t,w,I,h,D,M),g.el=_t.el}if(Ae&&it(Ae,D),!bt&&(Z=ae&&ae.onVnodeMounted)){const _t=g;it(()=>wt(Z,we,_t),D)}(g.shapeFlag&256||we&&hs(we.vnode)&&we.vnode.shapeFlag&256)&&h.a&&it(h.a,D),h.isMounted=!0,g=w=I=null}};h.scope.on();const B=h.effect=new Mi(j);h.scope.off();const q=h.update=B.run.bind(B),se=h.job=B.runIfDirty.bind(B);se.i=h,se.id=h.uid,B.scheduler=()=>Qo(se),Yt(h,!0),q()},U=(h,g,w)=>{g.component=h;const I=h.vnode.props;h.vnode=g,h.next=null,Lc(h,g.props,I,w),Dc(h,g.children,w),jt(),br(h),Dt()},J=(h,g,w,I,D,M,V,j,B=!1)=>{const q=h&&h.children,se=h?h.shapeFlag:0,Z=g.children,{patchFlag:ee,shapeFlag:ae}=g;if(ee>0){if(ee&128){qe(q,Z,w,I,D,M,V,j,B);return}else if(ee&256){Oe(q,Z,w,I,D,M,V,j,B);return}}ae&8?(se&16&&K(q,D,M),Z!==q&&u(w,Z)):se&16?ae&16?qe(q,Z,w,I,D,M,V,j,B):K(q,D,M,!0):(se&8&&u(w,""),ae&16&&_(Z,w,I,D,M,V,j,B))},Oe=(h,g,w,I,D,M,V,j,B)=>{h=h||us,g=g||us;const q=h.length,se=g.length,Z=Math.min(q,se);let ee;for(ee=0;ee<Z;ee++){const ae=g[ee]=B?zt(g[ee]):At(g[ee]);v(h[ee],ae,w,null,D,M,V,j,B)}q>se?K(h,D,M,!0,!1,Z):_(g,w,I,D,M,V,j,B,Z)},qe=(h,g,w,I,D,M,V,j,B)=>{let q=0;const se=g.length;let Z=h.length-1,ee=se-1;for(;q<=Z&&q<=ee;){const ae=h[q],me=g[q]=B?zt(g[q]):At(g[q]);if($s(ae,me))v(ae,me,w,null,D,M,V,j,B);else break;q++}for(;q<=Z&&q<=ee;){const ae=h[Z],me=g[ee]=B?zt(g[ee]):At(g[ee]);if($s(ae,me))v(ae,me,w,null,D,M,V,j,B);else break;Z--,ee--}if(q>Z){if(q<=ee){const ae=ee+1,me=ae<se?g[ae].el:I;for(;q<=ee;)v(null,g[q]=B?zt(g[q]):At(g[q]),w,me,D,M,V,j,B),q++}}else if(q>ee)for(;q<=Z;)Ie(h[q],D,M,!0),q++;else{const ae=q,me=q,Ae=new Map;for(q=me;q<=ee;q++){const rt=g[q]=B?zt(g[q]):At(g[q]);rt.key!=null&&Ae.set(rt.key,q)}let we,et=0;const tt=ee-me+1;let bt=!1,_t=0;const As=new Array(tt);for(q=0;q<tt;q++)As[q]=0;for(q=ae;q<=Z;q++){const rt=h[q];if(et>=tt){Ie(rt,D,M,!0);continue}let xt;if(rt.key!=null)xt=Ae.get(rt.key);else for(we=me;we<=ee;we++)if(As[we-me]===0&&$s(rt,g[we])){xt=we;break}xt===void 0?Ie(rt,D,M,!0):(As[xt-me]=q+1,xt>=_t?_t=xt:bt=!0,v(rt,g[xt],w,null,D,M,V,j,B),et++)}const pr=bt?Vc(As):us;for(we=pr.length-1,q=tt-1;q>=0;q--){const rt=me+q,xt=g[rt],hr=rt+1<se?g[rt+1].el:I;As[q]===0?v(null,xt,w,hr,D,M,V,j,B):bt&&(we<0||q!==pr[we]?De(xt,w,hr,2):we--)}}},De=(h,g,w,I,D=null)=>{const{el:M,type:V,transition:j,children:B,shapeFlag:q}=h;if(q&6){De(h.component.subTree,g,w,I);return}if(q&128){h.suspense.move(g,w,I);return}if(q&64){V.move(h,g,w,z);return}if(V===ve){n(M,g,w);for(let Z=0;Z<B.length;Z++)De(B[Z],g,w,I);n(h.anchor,g,w);return}if(V===gn){T(h,g,w);return}if(I!==2&&q&1&&j)if(I===0)j.beforeEnter(M),n(M,g,w),it(()=>j.enter(M),D);else{const{leave:Z,delayLeave:ee,afterLeave:ae}=j,me=()=>{h.ctx.isUnmounted?o(M):n(M,g,w)},Ae=()=>{Z(M,()=>{me(),ae&&ae()})};ee?ee(M,me,Ae):Ae()}else n(M,g,w)},Ie=(h,g,w,I=!1,D=!1)=>{const{type:M,props:V,ref:j,children:B,dynamicChildren:q,shapeFlag:se,patchFlag:Z,dirs:ee,cacheIndex:ae}=h;if(Z===-2&&(D=!1),j!=null&&(jt(),Ms(j,null,w,h,!0),Dt()),ae!=null&&(g.renderCache[ae]=void 0),se&256){g.ctx.deactivate(h);return}const me=se&1&&ee,Ae=!hs(h);let we;if(Ae&&(we=V&&V.onVnodeBeforeUnmount)&&wt(we,g,h),se&6)$(h.component,w,I);else{if(se&128){h.suspense.unmount(w,I);return}me&&Zt(h,null,g,"beforeUnmount"),se&64?h.type.remove(h,g,w,z,I):q&&!q.hasOnce&&(M!==ve||Z>0&&Z&64)?K(q,g,w,!1,!0):(M===ve&&Z&384||!D&&se&16)&&K(B,g,w),I&&Xe(h)}(Ae&&(we=V&&V.onVnodeUnmounted)||me)&&it(()=>{we&&wt(we,g,h),me&&Zt(h,null,g,"unmounted")},w)},Xe=h=>{const{type:g,el:w,anchor:I,transition:D}=h;if(g===ve){Ne(w,I);return}if(g===gn){N(h);return}const M=()=>{o(w),D&&!D.persisted&&D.afterLeave&&D.afterLeave()};if(h.shapeFlag&1&&D&&!D.persisted){const{leave:V,delayLeave:j}=D,B=()=>V(w,M);j?j(h.el,M,B):B()}else M()},Ne=(h,g)=>{let w;for(;h!==g;)w=m(h),o(h),h=w;o(g)},$=(h,g,w)=>{const{bum:I,scope:D,job:M,subTree:V,um:j,m:B,a:q,parent:se,slots:{__:Z}}=h;Ar(B),Ar(q),I&&hn(I),se&&oe(Z)&&Z.forEach(ee=>{se.renderCache[ee]=void 0}),D.stop(),M&&(M.flags|=8,Ie(V,h,g,w)),j&&it(j,g),it(()=>{h.isUnmounted=!0},g),g&&g.pendingBranch&&!g.isUnmounted&&h.asyncDep&&!h.asyncResolved&&h.suspenseId===g.pendingId&&(g.deps--,g.deps===0&&g.resolve())},K=(h,g,w,I=!1,D=!1,M=0)=>{for(let V=M;V<h.length;V++)Ie(h[V],g,w,I,D)},C=h=>{if(h.shapeFlag&6)return C(h.component.subTree);if(h.shapeFlag&128)return h.suspense.next();const g=m(h.anchor||h.el),w=g&&g[dc];return w?m(w):g};let O=!1;const H=(h,g,w)=>{h==null?g._vnode&&Ie(g._vnode,null,null,!0):v(g._vnode||null,h,g,null,null,null,w),g._vnode=h,O||(O=!0,br(),ta(),O=!1)},z={p:v,um:Ie,m:De,r:Xe,mt:Y,mc:_,pc:J,pbc:pe,n:C,o:e};return{render:H,hydrate:void 0,createApp:Pc(H)}}function ao({type:e,props:t},s){return s==="svg"&&e==="foreignObject"||s==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:s}function Yt({effect:e,job:t},s){s?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Uc(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ca(e,t,s=!1){const n=e.children,o=t.children;if(oe(n)&&oe(o))for(let r=0;r<n.length;r++){const i=n[r];let l=o[r];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=o[r]=zt(o[r]),l.el=i.el),!s&&l.patchFlag!==-2&&Ca(i,l)),l.type===Vn&&(l.el=i.el),l.type===Nt&&!l.el&&(l.el=i.el)}}function Vc(e){const t=e.slice(),s=[0];let n,o,r,i,l;const c=e.length;for(n=0;n<c;n++){const d=e[n];if(d!==0){if(o=s[s.length-1],e[o]<d){t[n]=o,s.push(n);continue}for(r=0,i=s.length-1;r<i;)l=r+i>>1,e[s[l]]<d?r=l+1:i=l;d<e[s[r]]&&(r>0&&(t[n]=s[r-1]),s[r]=n)}}for(r=s.length,i=s[r-1];r-- >0;)s[r]=i,i=t[i];return s}function Ea(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Ea(t)}function Ar(e){if(e)for(let t=0;t<e.length;t++)e[t].flags|=8}const Hc=Symbol.for("v-scx"),qc=()=>mt(Hc);function kt(e,t,s){return Sa(e,t,s)}function Sa(e,t,s=Se){const{immediate:n,deep:o,flush:r,once:i}=s,l=Ge({},s),c=t&&n||!t&&r!=="post";let d;if(Ks){if(r==="sync"){const y=qc();d=y.__watcherHandles||(y.__watcherHandles=[])}else if(!c){const y=()=>{};return y.stop=$t,y.resume=$t,y.pause=$t,y}}const u=Ke;l.call=(y,b,v)=>Rt(y,u,b,v);let f=!1;r==="post"?l.scheduler=y=>{it(y,u&&u.suspense)}:r!=="sync"&&(f=!0,l.scheduler=(y,b)=>{b?y():Qo(y)}),l.augmentJob=y=>{t&&(y.flags|=4),f&&(y.flags|=2,u&&(y.id=u.uid,y.i=u))};const m=ac(e,t,l);return Ks&&(d?d.push(m):c&&m()),m}function zc(e,t,s){const n=this.proxy,o=Me(e)?e.includes(".")?Aa(n,e):()=>n[e]:e.bind(n,n);let r;ce(t)?r=t:(r=t.handler,s=t);const i=nn(this),l=Sa(o,r.bind(n),s);return i(),l}function Aa(e,t){const s=t.split(".");return()=>{let n=e;for(let o=0;o<s.length&&n;o++)n=n[s[o]];return n}}const Kc=(e,t)=>t==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${dt(t)}Modifiers`]||e[`${is(t)}Modifiers`];function Wc(e,t,...s){if(e.isUnmounted)return;const n=e.vnode.props||Se;let o=s;const r=t.startsWith("update:"),i=r&&Kc(n,t.slice(7));i&&(i.trim&&(o=s.map(u=>Me(u)?u.trim():u)),i.number&&(o=s.map(Cn)));let l,c=n[l=to(t)]||n[l=to(dt(t))];!c&&r&&(c=n[l=to(is(t))]),c&&Rt(c,e,6,o);const d=n[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,Rt(d,e,6,o)}}function ka(e,t,s=!1){const n=t.emitsCache,o=n.get(e);if(o!==void 0)return o;const r=e.emits;let i={},l=!1;if(!ce(e)){const c=d=>{const u=ka(d,t,!0);u&&(l=!0,Ge(i,u))};!s&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!r&&!l?($e(e)&&n.set(e,null),null):(oe(r)?r.forEach(c=>i[c]=null):Ge(i,r),$e(e)&&n.set(e,i),i)}function Un(e,t){return!e||!Ln(t)?!1:(t=t.slice(2).replace(/Once$/,""),xe(e,t[0].toLowerCase()+t.slice(1))||xe(e,is(t))||xe(e,t))}function kr(e){const{type:t,vnode:s,proxy:n,withProxy:o,propsOptions:[r],slots:i,attrs:l,emit:c,render:d,renderCache:u,props:f,data:m,setupState:y,ctx:b,inheritAttrs:v}=e,E=kn(e);let A,S;try{if(s.shapeFlag&4){const N=o||n,W=N;A=At(d.call(W,N,u,f,y,m,b)),S=l}else{const N=t;A=At(N.length>1?N(f,{attrs:l,slots:i,emit:c}):N(f,null)),S=t.props?l:Jc(l)}}catch(N){js.length=0,Nn(N,e,1),A=X(Nt)}let T=A;if(S&&v!==!1){const N=Object.keys(S),{shapeFlag:W}=T;N.length&&W&7&&(r&&N.some(Bo)&&(S=Gc(S,r)),T=gs(T,S,!1,!0))}return s.dirs&&(T=gs(T,null,!1,!0),T.dirs=T.dirs?T.dirs.concat(s.dirs):s.dirs),s.transition&&Xo(T,s.transition),A=T,kn(E),A}const Jc=e=>{let t;for(const s in e)(s==="class"||s==="style"||Ln(s))&&((t||(t={}))[s]=e[s]);return t},Gc=(e,t)=>{const s={};for(const n in e)(!Bo(n)||!(n.slice(9)in t))&&(s[n]=e[n]);return s};function Zc(e,t,s){const{props:n,children:o,component:r}=e,{props:i,children:l,patchFlag:c}=t,d=r.emitsOptions;if(t.dirs||t.transition)return!0;if(s&&c>=0){if(c&1024)return!0;if(c&16)return n?$r(n,i,d):!!i;if(c&8){const u=t.dynamicProps;for(let f=0;f<u.length;f++){const m=u[f];if(i[m]!==n[m]&&!Un(d,m))return!0}}}else return(o||l)&&(!l||!l.$stable)?!0:n===i?!1:n?i?$r(n,i,d):!0:!!i;return!1}function $r(e,t,s){const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!0;for(let o=0;o<n.length;o++){const r=n[o];if(t[r]!==e[r]&&!Un(s,r))return!0}return!1}function Yc({vnode:e,parent:t},s){for(;t;){const n=t.subTree;if(n.suspense&&n.suspense.activeBranch===e&&(n.el=e.el),n===e)(e=t.vnode).el=s,t=t.parent;else break}}const $a=e=>e.__isSuspense;function Qc(e,t){t&&t.pendingBranch?oe(e)?t.effects.push(...e):t.effects.push(e):uc(e)}const ve=Symbol.for("v-fgt"),Vn=Symbol.for("v-txt"),Nt=Symbol.for("v-cmt"),gn=Symbol.for("v-stc"),js=[];let at=null;function R(e=!1){js.push(at=e?null:[])}function Xc(){js.pop(),at=js[js.length-1]||null}let qs=1;function Rr(e,t=!1){qs+=e,e<0&&at&&t&&(at.hasOnce=!0)}function Ra(e){return e.dynamicChildren=qs>0?at||us:null,Xc(),qs>0&&at&&at.push(e),e}function P(e,t,s,n,o,r){return Ra(a(e,t,s,n,o,r,!0))}function ct(e,t,s,n,o){return Ra(X(e,t,s,n,o,!0))}function zs(e){return e?e.__v_isVNode===!0:!1}function $s(e,t){return e.type===t.type&&e.key===t.key}const Ta=({key:e})=>e??null,vn=({ref:e,ref_key:t,ref_for:s})=>(typeof e=="number"&&(e=""+e),e!=null?Me(e)||Je(e)||ce(e)?{i:Ve,r:e,k:t,f:!!s}:e:null);function a(e,t=null,s=null,n=0,o=null,r=e===ve?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ta(t),ref:t&&vn(t),scopeId:na,slotScopeIds:null,children:s,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:r,patchFlag:n,dynamicProps:o,dynamicChildren:null,appContext:null,ctx:Ve};return l?(nr(c,s),r&128&&e.normalize(c)):s&&(c.shapeFlag|=Me(s)?8:16),qs>0&&!i&&at&&(c.patchFlag>0||r&6)&&c.patchFlag!==32&&at.push(c),c}const X=eu;function eu(e,t=null,s=null,n=0,o=null,r=!1){if((!e||e===ca)&&(e=Nt),zs(e)){const l=gs(e,t,!0);return s&&nr(l,s),qs>0&&!r&&at&&(l.shapeFlag&6?at[at.indexOf(e)]=l:at.push(l)),l.patchFlag=-2,l}if(uu(e)&&(e=e.__vccOpts),t){t=tu(t);let{class:l,style:c}=t;l&&!Me(l)&&(t.class=re(l)),$e(c)&&(Zo(c)&&!oe(c)&&(c=Ge({},c)),t.style=Bs(c))}const i=Me(e)?1:$a(e)?128:fc(e)?64:$e(e)?4:ce(e)?2:0;return a(e,t,s,n,o,i,r,!0)}function tu(e){return e?Zo(e)||va(e)?Ge({},e):e:null}function gs(e,t,s=!1,n=!1){const{props:o,ref:r,patchFlag:i,children:l,transition:c}=e,d=t?sn(o||{},t):o,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&Ta(d),ref:t&&t.ref?s&&r?oe(r)?r.concat(vn(t)):[r,vn(t)]:vn(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ve?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&gs(e.ssContent),ssFallback:e.ssFallback&&gs(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&n&&Xo(u,c.clone(u)),u}function Ce(e=" ",t=0){return X(Vn,null,e,t)}function Ft(e,t){const s=X(gn,null,e);return s.staticCount=t,s}function ye(e="",t=!1){return t?(R(),ct(Nt,null,e)):X(Nt,null,e)}function At(e){return e==null||typeof e=="boolean"?X(Nt):oe(e)?X(ve,null,e.slice()):zs(e)?zt(e):X(Vn,null,String(e))}function zt(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:gs(e)}function nr(e,t){let s=0;const{shapeFlag:n}=e;if(t==null)t=null;else if(oe(t))s=16;else if(typeof t=="object")if(n&65){const o=t.default;o&&(o._c&&(o._d=!1),nr(e,o()),o._c&&(o._d=!0));return}else{s=32;const o=t._;!o&&!va(t)?t._ctx=Ve:o===3&&Ve&&(Ve.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ce(t)?(t={default:t,_ctx:Ve},s=32):(t=String(t),n&64?(s=16,t=[Ce(t)]):s=8);e.children=t,e.shapeFlag|=s}function sn(...e){const t={};for(let s=0;s<e.length;s++){const n=e[s];for(const o in n)if(o==="class")t.class!==n.class&&(t.class=re([t.class,n.class]));else if(o==="style")t.style=Bs([t.style,n.style]);else if(Ln(o)){const r=t[o],i=n[o];i&&r!==i&&!(oe(r)&&r.includes(i))&&(t[o]=r?[].concat(r,i):i)}else o!==""&&(t[o]=n[o])}return t}function wt(e,t,s,n=null){Rt(e,t,7,[s,n])}const su=ha();let nu=0;function ou(e,t,s){const n=e.type,o=(t?t.appContext:e.appContext)||su,r={uid:nu++,vnode:e,type:n,parent:t,appContext:o,root:null,next:null,subTree:null,effect:null,update:null,job:null,scope:new Ll(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(o.provides),ids:t?t.ids:["",0,0],accessCache:null,renderCache:[],components:null,directives:null,propsOptions:ba(n,o),emitsOptions:ka(n,o),emit:null,emitted:null,propsDefaults:Se,inheritAttrs:n.inheritAttrs,ctx:Se,data:Se,props:Se,attrs:Se,slots:Se,refs:Se,setupState:Se,setupContext:null,suspense:s,suspenseId:s?s.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 r.ctx={_:r},r.root=t?t.root:r,r.emit=Wc.bind(null,r),e.ce&&e.ce(r),r}let Ke=null,Rn,Ao;{const e=jn(),t=(s,n)=>{let o;return(o=e[s])||(o=e[s]=[]),o.push(n),r=>{o.length>1?o.forEach(i=>i(r)):o[0](r)}};Rn=t("__VUE_INSTANCE_SETTERS__",s=>Ke=s),Ao=t("__VUE_SSR_SETTERS__",s=>Ks=s)}const nn=e=>{const t=Ke;return Rn(e),e.scope.on(),()=>{e.scope.off(),Rn(t)}},Tr=()=>{Ke&&Ke.scope.off(),Rn(null)};function Oa(e){return e.vnode.shapeFlag&4}let Ks=!1;function ru(e,t=!1,s=!1){t&&Ao(t);const{props:n,children:o}=e.vnode,r=Oa(e);Ic(e,n,r,t),jc(e,o,s||t);const i=r?iu(e,t):void 0;return t&&Ao(!1),i}function iu(e,t){const s=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Sc);const{setup:n}=s;if(n){jt();const o=e.setupContext=n.length>1?lu(e):null,r=nn(e),i=en(n,e,0,[e.props,o]),l=Ri(i);if(Dt(),r(),(l||e.sp)&&!hs(e)&&oa(e),l){if(i.then(Tr,Tr),t)return i.then(c=>{Or(e,c)}).catch(c=>{Nn(c,e,0)});e.asyncDep=i}else Or(e,i)}else Pa(e)}function Or(e,t,s){ce(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:$e(t)&&(e.setupState=Qi(t)),Pa(e)}function Pa(e,t,s){const n=e.type;e.render||(e.render=n.render||$t);{const o=nn(e);jt();try{Ac(e)}finally{Dt(),o()}}}const au={get(e,t){return ze(e,"get",""),e[t]}};function lu(e){const t=s=>{e.exposed=s||{}};return{attrs:new Proxy(e.attrs,au),slots:e.slots,emit:e.emit,expose:t}}function Hn(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Qi(ec(e.exposed)),{get(t,s){if(s in t)return t[s];if(s in Fs)return Fs[s](e)},has(t,s){return s in t||s in Fs}})):e.proxy}function cu(e,t=!0){return ce(e)?e.displayName||e.name:e.name||t&&e.__name}function uu(e){return ce(e)&&"__vccOpts"in e}const le=(e,t)=>rc(e,t,Ks);function Ee(e,t,s){const n=arguments.length;return n===2?$e(t)&&!oe(t)?zs(t)?X(e,null,[t]):X(e,t):X(e,null,t):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&zs(s)&&(s=[s]),X(e,t,s))}const du="3.5.17";/** * @vue/runtime-dom v3.5.17 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/let ko;const Pr=typeof window<"u"&&window.trustedTypes;if(Pr)try{ko=Pr.createPolicy("vue",{createHTML:e=>e})}catch{}const Ia=ko?e=>ko.createHTML(e):e=>e,fu="http://www.w3.org/2000/svg",pu="http://www.w3.org/1998/Math/MathML",Pt=typeof document<"u"?document:null,Ir=Pt&&Pt.createElement("template"),hu={insert:(e,t,s)=>{t.insertBefore(e,s||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,s,n)=>{const o=t==="svg"?Pt.createElementNS(fu,e):t==="mathml"?Pt.createElementNS(pu,e):s?Pt.createElement(e,{is:s}):Pt.createElement(e);return e==="select"&&n&&n.multiple!=null&&o.setAttribute("multiple",n.multiple),o},createText:e=>Pt.createTextNode(e),createComment:e=>Pt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Pt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,s,n,o,r){const i=s?s.previousSibling:t.lastChild;if(o&&(o===r||o.nextSibling))for(;t.insertBefore(o.cloneNode(!0),s),!(o===r||!(o=o.nextSibling)););else{Ir.innerHTML=Ia(n==="svg"?`<svg>${e}</svg>`:n==="mathml"?`<math>${e}</math>`:e);const l=Ir.content;if(n==="svg"||n==="mathml"){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,s)}return[i?i.nextSibling:t.firstChild,s?s.previousSibling:t.lastChild]}},mu=Symbol("_vtc");function gu(e,t,s){const n=e[mu];n&&(t=(t?[t,...n]:[...n]).join(" ")),t==null?e.removeAttribute("class"):s?e.setAttribute("class",t):e.className=t}const Lr=Symbol("_vod"),vu=Symbol("_vsh"),yu=Symbol(""),bu=/(^|;)\s*display\s*:/;function _u(e,t,s){const n=e.style,o=Me(s);let r=!1;if(s&&!o){if(t)if(Me(t))for(const i of t.split(";")){const l=i.slice(0,i.indexOf(":")).trim();s[l]==null&&yn(n,l,"")}else for(const i in t)s[i]==null&&yn(n,i,"");for(const i in s)i==="display"&&(r=!0),yn(n,i,s[i])}else if(o){if(t!==s){const i=n[yu];i&&(s+=";"+i),n.cssText=s,r=bu.test(s)}}else t&&e.removeAttribute("style");Lr in e&&(e[Lr]=r?n.display:"",e[vu]&&(n.display="none"))}const Mr=/\s*!important$/;function yn(e,t,s){if(oe(s))s.forEach(n=>yn(e,t,n));else if(s==null&&(s=""),t.startsWith("--"))e.setProperty(t,s);else{const n=xu(e,t);Mr.test(s)?e.setProperty(is(n),s.replace(Mr,""),"important"):e[n]=s}}const Fr=["Webkit","Moz","ms"],lo={};function xu(e,t){const s=lo[t];if(s)return s;let n=dt(t);if(n!=="filter"&&n in e)return lo[t]=n;n=Fn(n);for(let o=0;o<Fr.length;o++){const r=Fr[o]+n;if(r in e)return lo[t]=r}return t}const jr="http://www.w3.org/1999/xlink";function Dr(e,t,s,n,o,r=Pl(t)){n&&t.startsWith("xlink:")?s==null?e.removeAttributeNS(jr,t.slice(6,t.length)):e.setAttributeNS(jr,t,s):s==null||r&&!Pi(s)?e.removeAttribute(t):e.setAttribute(t,r?"":gt(s)?String(s):s)}function Nr(e,t,s,n,o){if(t==="innerHTML"||t==="textContent"){s!=null&&(e[t]=t==="innerHTML"?Ia(s):s);return}const r=e.tagName;if(t==="value"&&r!=="PROGRESS"&&!r.includes("-")){const l=r==="OPTION"?e.getAttribute("value")||"":e.value,c=s==null?e.type==="checkbox"?"on":"":String(s);(l!==c||!("_value"in e))&&(e.value=c),s==null&&e.removeAttribute(t),e._value=s;return}let i=!1;if(s===""||s==null){const l=typeof e[t];l==="boolean"?s=Pi(s):s==null&&l==="string"?(s="",i=!0):l==="number"&&(s=0,i=!0)}try{e[t]=s}catch{}i&&e.removeAttribute(o||t)}function Mt(e,t,s,n){e.addEventListener(t,s,n)}function wu(e,t,s,n){e.removeEventListener(t,s,n)}const Br=Symbol("_vei");function Cu(e,t,s,n,o=null){const r=e[Br]||(e[Br]={}),i=r[t];if(n&&i)i.value=n;else{const[l,c]=Eu(t);if(n){const d=r[t]=ku(n,o);Mt(e,l,d,c)}else i&&(wu(e,l,i,c),r[t]=void 0)}}const Ur=/(?:Once|Passive|Capture)$/;function Eu(e){let t;if(Ur.test(e)){t={};let n;for(;n=e.match(Ur);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[e[2]===":"?e.slice(3):is(e.slice(2)),t]}let co=0;const Su=Promise.resolve(),Au=()=>co||(Su.then(()=>co=0),co=Date.now());function ku(e,t){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Rt($u(n,s.value),t,5,[n])};return s.value=e,s.attached=Au(),s}function $u(e,t){if(oe(t)){const s=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{s.call(e),e._stopped=!0},t.map(n=>o=>!o._stopped&&n&&n(o))}else return t}const Vr=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Ru=(e,t,s,n,o,r)=>{const i=o==="svg";t==="class"?gu(e,n,i):t==="style"?_u(e,s,n):Ln(t)?Bo(t)||Cu(e,t,s,n,r):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):Tu(e,t,n,i))?(Nr(e,t,n),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&Dr(e,t,n,i,r,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!Me(n))?Nr(e,dt(t),n,r,t):(t==="true-value"?e._trueValue=n:t==="false-value"&&(e._falseValue=n),Dr(e,t,n,i))};function Tu(e,t,s,n){if(n)return!!(t==="innerHTML"||t==="textContent"||t in e&&Vr(t)&&ce(s));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="autocorrect"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const o=e.tagName;if(o==="IMG"||o==="VIDEO"||o==="CANVAS"||o==="SOURCE")return!1}return Vr(t)&&Me(s)?!1:t in e}const Gt=e=>{const t=e.props["onUpdate:modelValue"]||!1;return oe(t)?s=>hn(t,s):t};function Ou(e){e.target.composing=!0}function Hr(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const ut=Symbol("_assign"),Be={created(e,{modifiers:{lazy:t,trim:s,number:n}},o){e[ut]=Gt(o);const r=n||o.props&&o.props.type==="number";Mt(e,t?"change":"input",i=>{if(i.target.composing)return;let l=e.value;s&&(l=l.trim()),r&&(l=Cn(l)),e[ut](l)}),s&&Mt(e,"change",()=>{e.value=e.value.trim()}),t||(Mt(e,"compositionstart",Ou),Mt(e,"compositionend",Hr),Mt(e,"change",Hr))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:s,modifiers:{lazy:n,trim:o,number:r}},i){if(e[ut]=Gt(i),e.composing)return;const l=(r||e.type==="number")&&!/^0\d/.test(e.value)?Cn(e.value):e.value,c=t??"";l!==c&&(document.activeElement===e&&e.type!=="range"&&(n&&t===s||o&&e.value.trim()===c)||(e.value=c))}},$o={deep:!0,created(e,t,s){e[ut]=Gt(s),Mt(e,"change",()=>{const n=e._modelValue,o=vs(e),r=e.checked,i=e[ut];if(oe(n)){const l=Ho(n,o),c=l!==-1;if(r&&!c)i(n.concat(o));else if(!r&&c){const d=[...n];d.splice(l,1),i(d)}}else if(xs(n)){const l=new Set(n);r?l.add(o):l.delete(o),i(l)}else i(La(e,r))})},mounted:qr,beforeUpdate(e,t,s){e[ut]=Gt(s),qr(e,t,s)}};function qr(e,{value:t,oldValue:s},n){e._modelValue=t;let o;if(oe(t))o=Ho(t,n.props.value)>-1;else if(xs(t))o=t.has(n.props.value);else{if(t===s)return;o=ns(t,La(e,!0))}e.checked!==o&&(e.checked=o)}const Pu={created(e,{value:t},s){e.checked=ns(t,s.props.value),e[ut]=Gt(s),Mt(e,"change",()=>{e[ut](vs(e))})},beforeUpdate(e,{value:t,oldValue:s},n){e[ut]=Gt(n),t!==s&&(e.checked=ns(t,n.props.value))}},Ye={deep:!0,created(e,{value:t,modifiers:{number:s}},n){const o=xs(t);Mt(e,"change",()=>{const r=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>s?Cn(vs(i)):vs(i));e[ut](e.multiple?o?new Set(r):r:r[0]),e._assigning=!0,Yo(()=>{e._assigning=!1})}),e[ut]=Gt(n)},mounted(e,{value:t}){zr(e,t)},beforeUpdate(e,t,s){e[ut]=Gt(s)},updated(e,{value:t}){e._assigning||zr(e,t)}};function zr(e,t){const s=e.multiple,n=oe(t);if(!(s&&!n&&!xs(t))){for(let o=0,r=e.options.length;o<r;o++){const i=e.options[o],l=vs(i);if(s)if(n){const c=typeof l;c==="string"||c==="number"?i.selected=t.some(d=>String(d)===String(l)):i.selected=Ho(t,l)>-1}else i.selected=t.has(l);else if(ns(vs(i),t)){e.selectedIndex!==o&&(e.selectedIndex=o);return}}!s&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function vs(e){return"_value"in e?e._value:e.value}function La(e,t){const s=t?"_trueValue":"_falseValue";return s in e?e[s]:t}const Iu={created(e,t,s){un(e,t,s,null,"created")},mounted(e,t,s){un(e,t,s,null,"mounted")},beforeUpdate(e,t,s,n){un(e,t,s,n,"beforeUpdate")},updated(e,t,s,n){un(e,t,s,n,"updated")}};function Lu(e,t){switch(e){case"SELECT":return Ye;case"TEXTAREA":return Be;default:switch(t){case"checkbox":return $o;case"radio":return Pu;default:return Be}}}function un(e,t,s,n,o){const i=Lu(e.tagName,s.props&&s.props.type)[o];i&&i(e,t,s,n)}const Mu=["ctrl","shift","alt","meta"],Fu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>Mu.some(s=>e[`${s}Key`]&&!t.includes(s))},Ws=(e,t)=>{const s=e._withMods||(e._withMods={}),n=t.join(".");return s[n]||(s[n]=(o,...r)=>{for(let i=0;i<t.length;i++){const l=Fu[t[i]];if(l&&l(o,t))return}return e(o,...r)})},ju=Ge({patchProp:Ru},hu);let Kr;function Du(){return Kr||(Kr=Nc(ju))}const Nu=(...e)=>{const t=Du().createApp(...e),{mount:s}=t;return t.mount=n=>{const o=Uu(n);if(!o)return;const r=t._component;!ce(r)&&!r.render&&!r.template&&(r.template=o.innerHTML),o.nodeType===1&&(o.textContent="");const i=s(o,!1,Bu(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),i},t};function Bu(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function Uu(e){return Me(e)?document.querySelector(e):e}const Vu={id:"app"},Hu=he({__name:"App",setup(e){return(t,s)=>{const n=la("router-view");return R(),P("div",Vu,[X(n)])}}}),Pe=(e,t)=>{const s=e.__vccOpts||e;for(const[n,o]of t)s[n]=o;return s},qu=Pe(Hu,[["__scopeId","data-v-39478ec0"]]),zu="modulepreload",Ku=function(e){return"/"+e},Wr={},ft=function(t,s,n){let o=Promise.resolve();if(s&&s.length>0){let i=function(d){return Promise.all(d.map(u=>Promise.resolve(u).then(f=>({status:"fulfilled",value:f}),f=>({status:"rejected",reason:f}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));o=i(s.map(d=>{if(d=Ku(d),d in Wr)return;Wr[d]=!0;const u=d.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${f}`))return;const m=document.createElement("link");if(m.rel=u?"stylesheet":zu,u||(m.as="script"),m.crossOrigin="",m.href=d,c&&m.setAttribute("nonce",c),document.head.appendChild(m),u)return new Promise((y,b)=>{m.addEventListener("load",y),m.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${d}`)))})}))}function r(i){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=i,window.dispatchEvent(l),!l.defaultPrevented)throw i}return o.then(i=>{for(const l of i||[])l.status==="rejected"&&r(l.reason);return t().catch(r)})};/*! * vue-router v4.5.1 * (c) 2025 Eduardo San Martin Morote * @license MIT */const cs=typeof document<"u";function Ma(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Wu(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Ma(e.default)}const be=Object.assign;function uo(e,t){const s={};for(const n in t){const o=t[n];s[n]=vt(o)?o.map(e):e(o)}return s}const Ds=()=>{},vt=Array.isArray,Fa=/#/g,Ju=/&/g,Gu=/\//g,Zu=/=/g,Yu=/\?/g,ja=/\+/g,Qu=/%5B/g,Xu=/%5D/g,Da=/%5E/g,ed=/%60/g,Na=/%7B/g,td=/%7C/g,Ba=/%7D/g,sd=/%20/g;function or(e){return encodeURI(""+e).replace(td,"|").replace(Qu,"[").replace(Xu,"]")}function nd(e){return or(e).replace(Na,"{").replace(Ba,"}").replace(Da,"^")}function Ro(e){return or(e).replace(ja,"%2B").replace(sd,"+").replace(Fa,"%23").replace(Ju,"%26").replace(ed,"`").replace(Na,"{").replace(Ba,"}").replace(Da,"^")}function od(e){return Ro(e).replace(Zu,"%3D")}function rd(e){return or(e).replace(Fa,"%23").replace(Yu,"%3F")}function id(e){return e==null?"":rd(e).replace(Gu,"%2F")}function Js(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const ad=/\/$/,ld=e=>e.replace(ad,"");function fo(e,t,s="/"){let n,o={},r="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return l<c&&l>=0&&(c=-1),c>-1&&(n=t.slice(0,c),r=t.slice(c+1,l>-1?l:t.length),o=e(r)),l>-1&&(n=n||t.slice(0,l),i=t.slice(l,t.length)),n=fd(n??t,s),{fullPath:n+(r&&"?")+r+i,path:n,query:o,hash:Js(i)}}function cd(e,t){const s=t.query?e(t.query):"";return t.path+(s&&"?")+s+(t.hash||"")}function Jr(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function ud(e,t,s){const n=t.matched.length-1,o=s.matched.length-1;return n>-1&&n===o&&ys(t.matched[n],s.matched[o])&&Ua(t.params,s.params)&&e(t.query)===e(s.query)&&t.hash===s.hash}function ys(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Ua(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(!dd(e[s],t[s]))return!1;return!0}function dd(e,t){return vt(e)?Gr(e,t):vt(t)?Gr(t,e):e===t}function Gr(e,t){return vt(t)?e.length===t.length&&e.every((s,n)=>s===t[n]):e.length===1&&e[0]===t}function fd(e,t){if(e.startsWith("/"))return e;if(!e)return t;const s=t.split("/"),n=e.split("/"),o=n[n.length-1];(o===".."||o===".")&&n.push("");let r=s.length-1,i,l;for(i=0;i<n.length;i++)if(l=n[i],l!==".")if(l==="..")r>1&&r--;else break;return s.slice(0,r).join("/")+"/"+n.slice(i).join("/")}const Ht={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Gs;(function(e){e.pop="pop",e.push="push"})(Gs||(Gs={}));var Ns;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Ns||(Ns={}));function pd(e){if(!e)if(cs){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),ld(e)}const hd=/^[^#]+#/;function md(e,t){return e.replace(hd,"#")+t}function gd(e,t){const s=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-s.left-(t.left||0),top:n.top-s.top-(t.top||0)}}const qn=()=>({left:window.scrollX,top:window.scrollY});function vd(e){let t;if("el"in e){const s=e.el,n=typeof s=="string"&&s.startsWith("#"),o=typeof s=="string"?n?document.getElementById(s.slice(1)):document.querySelector(s):s;if(!o)return;t=gd(o,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function Zr(e,t){return(history.state?history.state.position-t:-1)+e}const To=new Map;function yd(e,t){To.set(e,t)}function bd(e){const t=To.get(e);return To.delete(e),t}let _d=()=>location.protocol+"//"+location.host;function Va(e,t){const{pathname:s,search:n,hash:o}=t,r=e.indexOf("#");if(r>-1){let l=o.includes(e.slice(r))?e.slice(r).length:1,c=o.slice(l);return c[0]!=="/"&&(c="/"+c),Jr(c,"")}return Jr(s,e)+n+o}function xd(e,t,s,n){let o=[],r=[],i=null;const l=({state:m})=>{const y=Va(e,location),b=s.value,v=t.value;let E=0;if(m){if(s.value=y,t.value=m,i&&i===b){i=null;return}E=v?m.position-v.position:0}else n(y);o.forEach(A=>{A(s.value,b,{delta:E,type:Gs.pop,direction:E?E>0?Ns.forward:Ns.back:Ns.unknown})})};function c(){i=s.value}function d(m){o.push(m);const y=()=>{const b=o.indexOf(m);b>-1&&o.splice(b,1)};return r.push(y),y}function u(){const{history:m}=window;m.state&&m.replaceState(be({},m.state,{scroll:qn()}),"")}function f(){for(const m of r)m();r=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:c,listen:d,destroy:f}}function Yr(e,t,s,n=!1,o=!1){return{back:e,current:t,forward:s,replaced:n,position:window.history.length,scroll:o?qn():null}}function wd(e){const{history:t,location:s}=window,n={value:Va(e,s)},o={value:t.state};o.value||r(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function r(c,d,u){const f=e.indexOf("#"),m=f>-1?(s.host&&document.querySelector("base")?e:e.slice(f))+c:_d()+e+c;try{t[u?"replaceState":"pushState"](d,"",m),o.value=d}catch(y){console.error(y),s[u?"replace":"assign"](m)}}function i(c,d){const u=be({},t.state,Yr(o.value.back,c,o.value.forward,!0),d,{position:o.value.position});r(c,u,!0),n.value=c}function l(c,d){const u=be({},o.value,t.state,{forward:c,scroll:qn()});r(u.current,u,!0);const f=be({},Yr(n.value,c,null),{position:u.position+1},d);r(c,f,!1),n.value=c}return{location:n,state:o,push:l,replace:i}}function Cd(e){e=pd(e);const t=wd(e),s=xd(e,t.state,t.location,t.replace);function n(r,i=!0){i||s.pauseListeners(),history.go(r)}const o=be({location:"",base:e,go:n,createHref:md.bind(null,e)},t,s);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}function Ed(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),Cd(e)}function Sd(e){return typeof e=="string"||e&&typeof e=="object"}function Ha(e){return typeof e=="string"||typeof e=="symbol"}const qa=Symbol("");var Qr;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Qr||(Qr={}));function bs(e,t){return be(new Error,{type:e,[qa]:!0},t)}function Ot(e,t){return e instanceof Error&&qa in e&&(t==null||!!(e.type&t))}const Xr="[^/]+?",Ad={sensitive:!1,strict:!1,start:!0,end:!0},kd=/[.+*?^${}()[\]/\\]/g;function $d(e,t){const s=be({},Ad,t),n=[];let o=s.start?"^":"";const r=[];for(const d of e){const u=d.length?[]:[90];s.strict&&!d.length&&(o+="/");for(let f=0;f<d.length;f++){const m=d[f];let y=40+(s.sensitive?.25:0);if(m.type===0)f||(o+="/"),o+=m.value.replace(kd,"\\$&"),y+=40;else if(m.type===1){const{value:b,repeatable:v,optional:E,regexp:A}=m;r.push({name:b,repeatable:v,optional:E});const S=A||Xr;if(S!==Xr){y+=10;try{new RegExp(`(${S})`)}catch(N){throw new Error(`Invalid custom RegExp for param "${b}" (${S}): `+N.message)}}let T=v?`((?:${S})(?:/(?:${S}))*)`:`(${S})`;f||(T=E&&d.length<2?`(?:/${T})`:"/"+T),E&&(T+="?"),o+=T,y+=20,E&&(y+=-8),v&&(y+=-20),S===".*"&&(y+=-50)}u.push(y)}n.push(u)}if(s.strict&&s.end){const d=n.length-1;n[d][n[d].length-1]+=.7000000000000001}s.strict||(o+="/?"),s.end?o+="$":s.strict&&!o.endsWith("/")&&(o+="(?:/|$)");const i=new RegExp(o,s.sensitive?"":"i");function l(d){const u=d.match(i),f={};if(!u)return null;for(let m=1;m<u.length;m++){const y=u[m]||"",b=r[m-1];f[b.name]=y&&b.repeatable?y.split("/"):y}return f}function c(d){let u="",f=!1;for(const m of e){(!f||!u.endsWith("/"))&&(u+="/"),f=!1;for(const y of m)if(y.type===0)u+=y.value;else if(y.type===1){const{value:b,repeatable:v,optional:E}=y,A=b in d?d[b]:"";if(vt(A)&&!v)throw new Error(`Provided param "${b}" is an array but it is not repeatable (* or + modifiers)`);const S=vt(A)?A.join("/"):A;if(!S)if(E)m.length<2&&(u.endsWith("/")?u=u.slice(0,-1):f=!0);else throw new Error(`Missing required param "${b}"`);u+=S}}return u||"/"}return{re:i,score:n,keys:r,parse:l,stringify:c}}function Rd(e,t){let s=0;for(;s<e.length&&s<t.length;){const n=t[s]-e[s];if(n)return n;s++}return e.length<t.length?e.length===1&&e[0]===80?-1:1:e.length>t.length?t.length===1&&t[0]===80?1:-1:0}function za(e,t){let s=0;const n=e.score,o=t.score;for(;s<n.length&&s<o.length;){const r=Rd(n[s],o[s]);if(r)return r;s++}if(Math.abs(o.length-n.length)===1){if(ei(n))return 1;if(ei(o))return-1}return o.length-n.length}function ei(e){const t=e[e.length-1];return e.length>0&&t[t.length-1]<0}const Td={type:0,value:""},Od=/[a-zA-Z0-9_]/;function Pd(e){if(!e)return[[]];if(e==="/")return[[Td]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(y){throw new Error(`ERR (${s})/"${d}": ${y}`)}let s=0,n=s;const o=[];let r;function i(){r&&o.push(r),r=[]}let l=0,c,d="",u="";function f(){d&&(s===0?r.push({type:0,value:d}):s===1||s===2||s===3?(r.length>1&&(c==="*"||c==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:d,regexp:u,repeatable:c==="*"||c==="+",optional:c==="*"||c==="?"})):t("Invalid state to consume buffer"),d="")}function m(){d+=c}for(;l<e.length;){if(c=e[l++],c==="\\"&&s!==2){n=s,s=4;continue}switch(s){case 0:c==="/"?(d&&f(),i()):c===":"?(f(),s=1):m();break;case 4:m(),s=n;break;case 1:c==="("?s=2:Od.test(c)?m():(f(),s=0,c!=="*"&&c!=="?"&&c!=="+"&&l--);break;case 2:c===")"?u[u.length-1]=="\\"?u=u.slice(0,-1)+c:s=3:u+=c;break;case 3:f(),s=0,c!=="*"&&c!=="?"&&c!=="+"&&l--,u="";break;default:t("Unknown state");break}}return s===2&&t(`Unfinished custom RegExp for param "${d}"`),f(),i(),o}function Id(e,t,s){const n=$d(Pd(e.path),s),o=be(n,{record:e,parent:t,children:[],alias:[]});return t&&!o.record.aliasOf==!t.record.aliasOf&&t.children.push(o),o}function Ld(e,t){const s=[],n=new Map;t=oi({strict:!1,end:!0,sensitive:!1},t);function o(f){return n.get(f)}function r(f,m,y){const b=!y,v=si(f);v.aliasOf=y&&y.record;const E=oi(t,f),A=[v];if("alias"in f){const N=typeof f.alias=="string"?[f.alias]:f.alias;for(const W of N)A.push(si(be({},v,{components:y?y.record.components:v.components,path:W,aliasOf:y?y.record:v})))}let S,T;for(const N of A){const{path:W}=N;if(m&&W[0]!=="/"){const te=m.record.path,Q=te[te.length-1]==="/"?"":"/";N.path=m.record.path+(W&&Q+W)}if(S=Id(N,m,E),y?y.alias.push(S):(T=T||S,T!==S&&T.alias.push(S),b&&f.name&&!ni(S)&&i(f.name)),Ka(S)&&c(S),v.children){const te=v.children;for(let Q=0;Q<te.length;Q++)r(te[Q],S,y&&y.children[Q])}y=y||S}return T?()=>{i(T)}:Ds}function i(f){if(Ha(f)){const m=n.get(f);m&&(n.delete(f),s.splice(s.indexOf(m),1),m.children.forEach(i),m.alias.forEach(i))}else{const m=s.indexOf(f);m>-1&&(s.splice(m,1),f.record.name&&n.delete(f.record.name),f.children.forEach(i),f.alias.forEach(i))}}function l(){return s}function c(f){const m=jd(f,s);s.splice(m,0,f),f.record.name&&!ni(f)&&n.set(f.record.name,f)}function d(f,m){let y,b={},v,E;if("name"in f&&f.name){if(y=n.get(f.name),!y)throw bs(1,{location:f});E=y.record.name,b=be(ti(m.params,y.keys.filter(T=>!T.optional).concat(y.parent?y.parent.keys.filter(T=>T.optional):[]).map(T=>T.name)),f.params&&ti(f.params,y.keys.map(T=>T.name))),v=y.stringify(b)}else if(f.path!=null)v=f.path,y=s.find(T=>T.re.test(v)),y&&(b=y.parse(v),E=y.record.name);else{if(y=m.name?n.get(m.name):s.find(T=>T.re.test(m.path)),!y)throw bs(1,{location:f,currentLocation:m});E=y.record.name,b=be({},m.params,f.params),v=y.stringify(b)}const A=[];let S=y;for(;S;)A.unshift(S.record),S=S.parent;return{name:E,path:v,params:b,matched:A,meta:Fd(A)}}e.forEach(f=>r(f));function u(){s.length=0,n.clear()}return{addRoute:r,resolve:d,removeRoute:i,clearRoutes:u,getRoutes:l,getRecordMatcher:o}}function ti(e,t){const s={};for(const n of t)n in e&&(s[n]=e[n]);return s}function si(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:Md(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function Md(e){const t={},s=e.props||!1;if("component"in e)t.default=s;else for(const n in e.components)t[n]=typeof s=="object"?s[n]:s;return t}function ni(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Fd(e){return e.reduce((t,s)=>be(t,s.meta),{})}function oi(e,t){const s={};for(const n in e)s[n]=n in t?t[n]:e[n];return s}function jd(e,t){let s=0,n=t.length;for(;s!==n;){const r=s+n>>1;za(e,t[r])<0?n=r:s=r+1}const o=Dd(e);return o&&(n=t.lastIndexOf(o,n-1)),n}function Dd(e){let t=e;for(;t=t.parent;)if(Ka(t)&&za(e,t)===0)return t}function Ka({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function Nd(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<n.length;++o){const r=n[o].replace(ja," "),i=r.indexOf("="),l=Js(i<0?r:r.slice(0,i)),c=i<0?null:Js(r.slice(i+1));if(l in t){let d=t[l];vt(d)||(d=t[l]=[d]),d.push(c)}else t[l]=c}return t}function ri(e){let t="";for(let s in e){const n=e[s];if(s=od(s),n==null){n!==void 0&&(t+=(t.length?"&":"")+s);continue}(vt(n)?n.map(r=>r&&Ro(r)):[n&&Ro(n)]).forEach(r=>{r!==void 0&&(t+=(t.length?"&":"")+s,r!=null&&(t+="="+r))})}return t}function Bd(e){const t={};for(const s in e){const n=e[s];n!==void 0&&(t[s]=vt(n)?n.map(o=>o==null?null:""+o):n==null?n:""+n)}return t}const Ud=Symbol(""),ii=Symbol(""),zn=Symbol(""),rr=Symbol(""),Oo=Symbol("");function Rs(){let e=[];function t(n){return e.push(n),()=>{const o=e.indexOf(n);o>-1&&e.splice(o,1)}}function s(){e=[]}return{add:t,list:()=>e.slice(),reset:s}}function Kt(e,t,s,n,o,r=i=>i()){const i=n&&(n.enterCallbacks[o]=n.enterCallbacks[o]||[]);return()=>new Promise((l,c)=>{const d=m=>{m===!1?c(bs(4,{from:s,to:t})):m instanceof Error?c(m):Sd(m)?c(bs(2,{from:t,to:m})):(i&&n.enterCallbacks[o]===i&&typeof m=="function"&&i.push(m),l())},u=r(()=>e.call(n&&n.instances[o],t,s,d));let f=Promise.resolve(u);e.length<3&&(f=f.then(d)),f.catch(m=>c(m))})}function po(e,t,s,n,o=r=>r()){const r=[];for(const i of e)for(const l in i.components){let c=i.components[l];if(!(t!=="beforeRouteEnter"&&!i.instances[l]))if(Ma(c)){const u=(c.__vccOpts||c)[t];u&&r.push(Kt(u,s,n,i,l,o))}else{let d=c();r.push(()=>d.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${l}" at "${i.path}"`);const f=Wu(u)?u.default:u;i.mods[l]=u,i.components[l]=f;const y=(f.__vccOpts||f)[t];return y&&Kt(y,s,n,i,l,o)()}))}}return r}function ai(e){const t=mt(zn),s=mt(rr),n=le(()=>{const c=je(e.to);return t.resolve(c)}),o=le(()=>{const{matched:c}=n.value,{length:d}=c,u=c[d-1],f=s.matched;if(!u||!f.length)return-1;const m=f.findIndex(ys.bind(null,u));if(m>-1)return m;const y=li(c[d-2]);return d>1&&li(u)===y&&f[f.length-1].path!==y?f.findIndex(ys.bind(null,c[d-2])):m}),r=le(()=>o.value>-1&&Kd(s.params,n.value.params)),i=le(()=>o.value>-1&&o.value===s.matched.length-1&&Ua(s.params,n.value.params));function l(c={}){if(zd(c)){const d=t[je(e.replace)?"replace":"push"](je(e.to)).catch(Ds);return e.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>d),d}return Promise.resolve()}return{route:n,href:le(()=>n.value.href),isActive:r,isExactActive:i,navigate:l}}function Vd(e){return e.length===1?e[0]:e}const Hd=he({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"},viewTransition:Boolean},useLink:ai,setup(e,{slots:t}){const s=ws(ai(e)),{options:n}=mt(zn),o=le(()=>({[ci(e.activeClass,n.linkActiveClass,"router-link-active")]:s.isActive,[ci(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:s.isExactActive}));return()=>{const r=t.default&&Vd(t.default(s));return e.custom?r:Ee("a",{"aria-current":s.isExactActive?e.ariaCurrentValue:null,href:s.href,onClick:s.navigate,class:o.value},r)}}}),qd=Hd;function zd(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Kd(e,t){for(const s in t){const n=t[s],o=e[s];if(typeof n=="string"){if(n!==o)return!1}else if(!vt(o)||o.length!==n.length||n.some((r,i)=>r!==o[i]))return!1}return!0}function li(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ci=(e,t,s)=>e??t??s,Wd=he({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:s}){const n=mt(Oo),o=le(()=>e.route||n.value),r=mt(ii,0),i=le(()=>{let d=je(r);const{matched:u}=o.value;let f;for(;(f=u[d])&&!f.components;)d++;return d}),l=le(()=>o.value.matched[i.value]);mn(ii,le(()=>i.value+1)),mn(Ud,l),mn(Oo,o);const c=G();return kt(()=>[c.value,l.value,e.name],([d,u,f],[m,y,b])=>{u&&(u.instances[f]=d,y&&y!==u&&d&&d===m&&(u.leaveGuards.size||(u.leaveGuards=y.leaveGuards),u.updateGuards.size||(u.updateGuards=y.updateGuards))),d&&u&&(!y||!ys(u,y)||!m)&&(u.enterCallbacks[f]||[]).forEach(v=>v(d))},{flush:"post"}),()=>{const d=o.value,u=e.name,f=l.value,m=f&&f.components[u];if(!m)return ui(s.default,{Component:m,route:d});const y=f.props[u],b=y?y===!0?d.params:typeof y=="function"?y(d):y:null,E=Ee(m,be({},b,t,{onVnodeUnmounted:A=>{A.component.isUnmounted&&(f.instances[u]=null)},ref:c}));return ui(s.default,{Component:E,route:d})||E}}});function ui(e,t){if(!e)return null;const s=e(t);return s.length===1?s[0]:s}const Jd=Wd;function Gd(e){const t=Ld(e.routes,e),s=e.parseQuery||Nd,n=e.stringifyQuery||ri,o=e.history,r=Rs(),i=Rs(),l=Rs(),c=tc(Ht);let d=Ht;cs&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=uo.bind(null,C=>""+C),f=uo.bind(null,id),m=uo.bind(null,Js);function y(C,O){let H,z;return Ha(C)?(H=t.getRecordMatcher(C),z=O):z=C,t.addRoute(z,H)}function b(C){const O=t.getRecordMatcher(C);O&&t.removeRoute(O)}function v(){return t.getRoutes().map(C=>C.record)}function E(C){return!!t.getRecordMatcher(C)}function A(C,O){if(O=be({},O||c.value),typeof C=="string"){const w=fo(s,C,O.path),I=t.resolve({path:w.path},O),D=o.createHref(w.fullPath);return be(w,I,{params:m(I.params),hash:Js(w.hash),redirectedFrom:void 0,href:D})}let H;if(C.path!=null)H=be({},C,{path:fo(s,C.path,O.path).path});else{const w=be({},C.params);for(const I in w)w[I]==null&&delete w[I];H=be({},C,{params:f(w)}),O.params=f(O.params)}const z=t.resolve(H,O),x=C.hash||"";z.params=u(m(z.params));const h=cd(n,be({},C,{hash:nd(x),path:z.path})),g=o.createHref(h);return be({fullPath:h,hash:x,query:n===ri?Bd(C.query):C.query||{}},z,{redirectedFrom:void 0,href:g})}function S(C){return typeof C=="string"?fo(s,C,c.value.path):be({},C)}function T(C,O){if(d!==C)return bs(8,{from:O,to:C})}function N(C){return Q(C)}function W(C){return N(be(S(C),{replace:!0}))}function te(C){const O=C.matched[C.matched.length-1];if(O&&O.redirect){const{redirect:H}=O;let z=typeof H=="function"?H(C):H;return typeof z=="string"&&(z=z.includes("?")||z.includes("#")?z=S(z):{path:z},z.params={}),be({query:C.query,hash:C.hash,params:z.path!=null?{}:C.params},z)}}function Q(C,O){const H=d=A(C),z=c.value,x=C.state,h=C.force,g=C.replace===!0,w=te(H);if(w)return Q(be(S(w),{state:typeof w=="object"?be({},x,w.state):x,force:h,replace:g}),O||H);const I=H;I.redirectedFrom=O;let D;return!h&&ud(n,z,H)&&(D=bs(16,{to:I,from:z}),De(z,z,!0,!1)),(D?Promise.resolve(D):pe(I,z)).catch(M=>Ot(M)?Ot(M,2)?M:qe(M):J(M,I,z)).then(M=>{if(M){if(Ot(M,2))return Q(be({replace:g},S(M.to),{state:typeof M.to=="object"?be({},x,M.to.state):x,force:h}),O||I)}else M=He(I,z,!0,g,x);return Te(I,z,M),M})}function _(C,O){const H=T(C,O);return H?Promise.reject(H):Promise.resolve()}function ne(C){const O=Ne.values().next().value;return O&&typeof O.runWithContext=="function"?O.runWithContext(C):C()}function pe(C,O){let H;const[z,x,h]=Zd(C,O);H=po(z.reverse(),"beforeRouteLeave",C,O);for(const w of z)w.leaveGuards.forEach(I=>{H.push(Kt(I,C,O))});const g=_.bind(null,C,O);return H.push(g),K(H).then(()=>{H=[];for(const w of r.list())H.push(Kt(w,C,O));return H.push(g),K(H)}).then(()=>{H=po(x,"beforeRouteUpdate",C,O);for(const w of x)w.updateGuards.forEach(I=>{H.push(Kt(I,C,O))});return H.push(g),K(H)}).then(()=>{H=[];for(const w of h)if(w.beforeEnter)if(vt(w.beforeEnter))for(const I of w.beforeEnter)H.push(Kt(I,C,O));else H.push(Kt(w.beforeEnter,C,O));return H.push(g),K(H)}).then(()=>(C.matched.forEach(w=>w.enterCallbacks={}),H=po(h,"beforeRouteEnter",C,O,ne),H.push(g),K(H))).then(()=>{H=[];for(const w of i.list())H.push(Kt(w,C,O));return H.push(g),K(H)}).catch(w=>Ot(w,8)?w:Promise.reject(w))}function Te(C,O,H){l.list().forEach(z=>ne(()=>z(C,O,H)))}function He(C,O,H,z,x){const h=T(C,O);if(h)return h;const g=O===Ht,w=cs?history.state:{};H&&(z||g?o.replace(C.fullPath,be({scroll:g&&w&&w.scroll},x)):o.push(C.fullPath,x)),c.value=C,De(C,O,H,g),qe()}let ue;function Y(){ue||(ue=o.listen((C,O,H)=>{if(!$.listening)return;const z=A(C),x=te(z);if(x){Q(be(x,{replace:!0,force:!0}),z).catch(Ds);return}d=z;const h=c.value;cs&&yd(Zr(h.fullPath,H.delta),qn()),pe(z,h).catch(g=>Ot(g,12)?g:Ot(g,2)?(Q(be(S(g.to),{force:!0}),z).then(w=>{Ot(w,20)&&!H.delta&&H.type===Gs.pop&&o.go(-1,!1)}).catch(Ds),Promise.reject()):(H.delta&&o.go(-H.delta,!1),J(g,z,h))).then(g=>{g=g||He(z,h,!1),g&&(H.delta&&!Ot(g,8)?o.go(-H.delta,!1):H.type===Gs.pop&&Ot(g,20)&&o.go(-1,!1)),Te(z,h,g)}).catch(Ds)}))}let L=Rs(),p=Rs(),U;function J(C,O,H){qe(C);const z=p.list();return z.length?z.forEach(x=>x(C,O,H)):console.error(C),Promise.reject(C)}function Oe(){return U&&c.value!==Ht?Promise.resolve():new Promise((C,O)=>{L.add([C,O])})}function qe(C){return U||(U=!C,Y(),L.list().forEach(([O,H])=>C?H(C):O()),L.reset()),C}function De(C,O,H,z){const{scrollBehavior:x}=e;if(!cs||!x)return Promise.resolve();const h=!H&&bd(Zr(C.fullPath,0))||(z||!H)&&history.state&&history.state.scroll||null;return Yo().then(()=>x(C,O,h)).then(g=>g&&vd(g)).catch(g=>J(g,C,O))}const Ie=C=>o.go(C);let Xe;const Ne=new Set,$={currentRoute:c,listening:!0,addRoute:y,removeRoute:b,clearRoutes:t.clearRoutes,hasRoute:E,getRoutes:v,resolve:A,options:e,push:N,replace:W,go:Ie,back:()=>Ie(-1),forward:()=>Ie(1),beforeEach:r.add,beforeResolve:i.add,afterEach:l.add,onError:p.add,isReady:Oe,install(C){const O=this;C.component("RouterLink",qd),C.component("RouterView",Jd),C.config.globalProperties.$router=O,Object.defineProperty(C.config.globalProperties,"$route",{enumerable:!0,get:()=>je(c)}),cs&&!Xe&&c.value===Ht&&(Xe=!0,N(o.location).catch(x=>{}));const H={};for(const x in Ht)Object.defineProperty(H,x,{get:()=>c.value[x],enumerable:!0});C.provide(zn,O),C.provide(rr,Gi(H)),C.provide(Oo,c);const z=C.unmount;Ne.add(C),C.unmount=function(){Ne.delete(C),Ne.size<1&&(d=Ht,ue&&ue(),ue=null,c.value=Ht,Xe=!1,U=!1),z()}}};function K(C){return C.reduce((O,H)=>O.then(()=>ne(H)),Promise.resolve())}return $}function Zd(e,t){const s=[],n=[],o=[],r=Math.max(t.matched.length,e.matched.length);for(let i=0;i<r;i++){const l=t.matched[i];l&&(e.matched.find(d=>ys(d,l))?n.push(l):s.push(l));const c=e.matched[i];c&&(t.matched.find(d=>ys(d,c))||o.push(c))}return[s,n,o]}function Cs(){return mt(zn)}function Yd(e){return mt(rr)}const Qd=()=>localStorage.getItem("authToken"),Xd=e=>{localStorage.setItem("authToken",e)},ef=()=>{localStorage.removeItem("authToken")},Kn=()=>{const e=localStorage.getItem("currentUser");return e?JSON.parse(e):null},tf=e=>{localStorage.setItem("currentUser",JSON.stringify(e))},sf=()=>{localStorage.removeItem("currentUser")},di=()=>{ef(),sf()},fi=()=>!!Qd(),nf=e=>{if(!e||!e.roles||!Array.isArray(e.roles)||e.roles.length===0)return null;const t=e.roles[0].name;return{super_admin:"SuperAdmin",office_admin:"OfficeAdmin",office_employee:"Employee",employee:"Employee",client:"Client"}[t]||null},_s=()=>{const e=Kn();return e?e.role?e.role:nf(e):null},ir=e=>_s()===e,Py=()=>ir("OfficeAdmin"),Iy=()=>ir("Employee"),Ly=()=>ir("Client"),of=e=>{const t=_s();if(!t)return!1;const s={SuperAdmin:4,OfficeAdmin:3,Employee:2,Client:1};return s[t]>=s[e]},rf=["disabled"],af={key:0,class:"animate-spin -ml-1 mr-3 h-5 w-5 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},os=he({__name:"Button",props:{variant:{default:"primary"},size:{default:"md"},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1}},emits:["click"],setup(e,{emit:t}){const s=e,n=t,o=le(()=>{const i=["inline-flex","items-center","justify-center","font-medium","rounded-md","focus:outline-none","focus:ring-2","focus:ring-offset-2","transition-colors","disabled:opacity-50","disabled:cursor-not-allowed"],l={sm:["px-3","py-2","text-sm"],md:["px-4","py-2","text-sm"],lg:["px-6","py-3","text-base"]},c={primary:["bg-indigo-600","text-white","hover:bg-indigo-700","focus:ring-indigo-500"],secondary:["bg-gray-600","text-white","hover:bg-gray-700","focus:ring-gray-500"],outline:["bg-white","text-gray-700","border","border-gray-300","hover:bg-gray-50","focus:ring-indigo-500"],ghost:["bg-transparent","text-gray-700","hover:bg-gray-100","focus:ring-indigo-500"]};return[...i,...l[s.size],...c[s.variant]].join(" ")}),r=i=>{!s.disabled&&!s.loading&&n("click",i)};return(i,l)=>(R(),P("button",{class:re(o.value),disabled:i.disabled||i.loading,onClick:r},[i.loading?(R(),P("svg",af,l[0]||(l[0]=[a("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),a("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)]))):ye("",!0),tn(i.$slots,"default")],10,rf))}});function Wa(e,t){return function(){return e.apply(t,arguments)}}const{toString:lf}=Object.prototype,{getPrototypeOf:ar}=Object,{iterator:Wn,toStringTag:Ja}=Symbol,Jn=(e=>t=>{const s=lf.call(t);return e[s]||(e[s]=s.slice(8,-1).toLowerCase())})(Object.create(null)),yt=e=>(e=e.toLowerCase(),t=>Jn(t)===e),Gn=e=>t=>typeof t===e,{isArray:Es}=Array,Zs=Gn("undefined");function cf(e){return e!==null&&!Zs(e)&&e.constructor!==null&&!Zs(e.constructor)&&nt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Ga=yt("ArrayBuffer");function uf(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Ga(e.buffer),t}const df=Gn("string"),nt=Gn("function"),Za=Gn("number"),Zn=e=>e!==null&&typeof e=="object",ff=e=>e===!0||e===!1,bn=e=>{if(Jn(e)!=="object")return!1;const t=ar(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Ja in e)&&!(Wn in e)},pf=yt("Date"),hf=yt("File"),mf=yt("Blob"),gf=yt("FileList"),vf=e=>Zn(e)&&nt(e.pipe),yf=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||nt(e.append)&&((t=Jn(e))==="formdata"||t==="object"&&nt(e.toString)&&e.toString()==="[object FormData]"))},bf=yt("URLSearchParams"),[_f,xf,wf,Cf]=["ReadableStream","Request","Response","Headers"].map(yt),Ef=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function on(e,t,{allOwnKeys:s=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Es(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const r=s?Object.getOwnPropertyNames(e):Object.keys(e),i=r.length;let l;for(n=0;n<i;n++)l=r[n],t.call(null,e[l],l,e)}}function Ya(e,t){t=t.toLowerCase();const s=Object.keys(e);let n=s.length,o;for(;n-- >0;)if(o=s[n],t===o.toLowerCase())return o;return null}const es=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Qa=e=>!Zs(e)&&e!==es;function Po(){const{caseless:e}=Qa(this)&&this||{},t={},s=(n,o)=>{const r=e&&Ya(t,o)||o;bn(t[r])&&bn(n)?t[r]=Po(t[r],n):bn(n)?t[r]=Po({},n):Es(n)?t[r]=n.slice():t[r]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&on(arguments[n],s);return t}const Sf=(e,t,s,{allOwnKeys:n}={})=>(on(t,(o,r)=>{s&&nt(o)?e[r]=Wa(o,s):e[r]=o},{allOwnKeys:n}),e),Af=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),kf=(e,t,s,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),s&&Object.assign(e.prototype,s)},$f=(e,t,s,n)=>{let o,r,i;const l={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),r=o.length;r-- >0;)i=o[r],(!n||n(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=s!==!1&&ar(e)}while(e&&(!s||s(e,t))&&e!==Object.prototype);return t},Rf=(e,t,s)=>{e=String(e),(s===void 0||s>e.length)&&(s=e.length),s-=t.length;const n=e.indexOf(t,s);return n!==-1&&n===s},Tf=e=>{if(!e)return null;if(Es(e))return e;let t=e.length;if(!Za(t))return null;const s=new Array(t);for(;t-- >0;)s[t]=e[t];return s},Of=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ar(Uint8Array)),Pf=(e,t)=>{const n=(e&&e[Wn]).call(e);let o;for(;(o=n.next())&&!o.done;){const r=o.value;t.call(e,r[0],r[1])}},If=(e,t)=>{let s;const n=[];for(;(s=e.exec(t))!==null;)n.push(s);return n},Lf=yt("HTMLFormElement"),Mf=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(s,n,o){return n.toUpperCase()+o}),pi=(({hasOwnProperty:e})=>(t,s)=>e.call(t,s))(Object.prototype),Ff=yt("RegExp"),Xa=(e,t)=>{const s=Object.getOwnPropertyDescriptors(e),n={};on(s,(o,r)=>{let i;(i=t(o,r,e))!==!1&&(n[r]=i||o)}),Object.defineProperties(e,n)},jf=e=>{Xa(e,(t,s)=>{if(nt(e)&&["arguments","caller","callee"].indexOf(s)!==-1)return!1;const n=e[s];if(nt(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+s+"'")})}})},Df=(e,t)=>{const s={},n=o=>{o.forEach(r=>{s[r]=!0})};return Es(e)?n(e):n(String(e).split(t)),s},Nf=()=>{},Bf=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Uf(e){return!!(e&&nt(e.append)&&e[Ja]==="FormData"&&e[Wn])}const Vf=e=>{const t=new Array(10),s=(n,o)=>{if(Zn(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const r=Es(n)?[]:{};return on(n,(i,l)=>{const c=s(i,o+1);!Zs(c)&&(r[l]=c)}),t[o]=void 0,r}}return n};return s(e,0)},Hf=yt("AsyncFunction"),qf=e=>e&&(Zn(e)||nt(e))&&nt(e.then)&&nt(e.catch),el=((e,t)=>e?setImmediate:t?((s,n)=>(es.addEventListener("message",({source:o,data:r})=>{o===es&&r===s&&n.length&&n.shift()()},!1),o=>{n.push(o),es.postMessage(s,"*")}))(`axios@${Math.random()}`,[]):s=>setTimeout(s))(typeof setImmediate=="function",nt(es.postMessage)),zf=typeof queueMicrotask<"u"?queueMicrotask.bind(es):typeof process<"u"&&process.nextTick||el,Kf=e=>e!=null&&nt(e[Wn]),k={isArray:Es,isArrayBuffer:Ga,isBuffer:cf,isFormData:yf,isArrayBufferView:uf,isString:df,isNumber:Za,isBoolean:ff,isObject:Zn,isPlainObject:bn,isReadableStream:_f,isRequest:xf,isResponse:wf,isHeaders:Cf,isUndefined:Zs,isDate:pf,isFile:hf,isBlob:mf,isRegExp:Ff,isFunction:nt,isStream:vf,isURLSearchParams:bf,isTypedArray:Of,isFileList:gf,forEach:on,merge:Po,extend:Sf,trim:Ef,stripBOM:Af,inherits:kf,toFlatObject:$f,kindOf:Jn,kindOfTest:yt,endsWith:Rf,toArray:Tf,forEachEntry:Pf,matchAll:If,isHTMLForm:Lf,hasOwnProperty:pi,hasOwnProp:pi,reduceDescriptors:Xa,freezeMethods:jf,toObjectSet:Df,toCamelCase:Mf,noop:Nf,toFiniteNumber:Bf,findKey:Ya,global:es,isContextDefined:Qa,isSpecCompliantForm:Uf,toJSONObject:Vf,isAsyncFn:Hf,isThenable:qf,setImmediate:el,asap:zf,isIterable:Kf};function de(e,t,s,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),s&&(this.config=s),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}k.inherits(de,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:k.toJSONObject(this.config),code:this.code,status:this.status}}});const tl=de.prototype,sl={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{sl[e]={value:e}});Object.defineProperties(de,sl);Object.defineProperty(tl,"isAxiosError",{value:!0});de.from=(e,t,s,n,o,r)=>{const i=Object.create(tl);return k.toFlatObject(e,i,function(c){return c!==Error.prototype},l=>l!=="isAxiosError"),de.call(i,e.message,t,s,n,o),i.cause=e,i.name=e.name,r&&Object.assign(i,r),i};const Wf=null;function Io(e){return k.isPlainObject(e)||k.isArray(e)}function nl(e){return k.endsWith(e,"[]")?e.slice(0,-2):e}function hi(e,t,s){return e?e.concat(t).map(function(o,r){return o=nl(o),!s&&r?"["+o+"]":o}).join(s?".":""):t}function Jf(e){return k.isArray(e)&&!e.some(Io)}const Gf=k.toFlatObject(k,{},null,function(t){return/^is[A-Z]/.test(t)});function Yn(e,t,s){if(!k.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,s=k.toFlatObject(s,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,E){return!k.isUndefined(E[v])});const n=s.metaTokens,o=s.visitor||u,r=s.dots,i=s.indexes,c=(s.Blob||typeof Blob<"u"&&Blob)&&k.isSpecCompliantForm(t);if(!k.isFunction(o))throw new TypeError("visitor must be a function");function d(b){if(b===null)return"";if(k.isDate(b))return b.toISOString();if(k.isBoolean(b))return b.toString();if(!c&&k.isBlob(b))throw new de("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(b)||k.isTypedArray(b)?c&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function u(b,v,E){let A=b;if(b&&!E&&typeof b=="object"){if(k.endsWith(v,"{}"))v=n?v:v.slice(0,-2),b=JSON.stringify(b);else if(k.isArray(b)&&Jf(b)||(k.isFileList(b)||k.endsWith(v,"[]"))&&(A=k.toArray(b)))return v=nl(v),A.forEach(function(T,N){!(k.isUndefined(T)||T===null)&&t.append(i===!0?hi([v],N,r):i===null?v:v+"[]",d(T))}),!1}return Io(b)?!0:(t.append(hi(E,v,r),d(b)),!1)}const f=[],m=Object.assign(Gf,{defaultVisitor:u,convertValue:d,isVisitable:Io});function y(b,v){if(!k.isUndefined(b)){if(f.indexOf(b)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(b),k.forEach(b,function(A,S){(!(k.isUndefined(A)||A===null)&&o.call(t,A,k.isString(S)?S.trim():S,v,m))===!0&&y(A,v?v.concat(S):[S])}),f.pop()}}if(!k.isObject(e))throw new TypeError("data must be an object");return y(e),t}function mi(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function lr(e,t){this._pairs=[],e&&Yn(e,this,t)}const ol=lr.prototype;ol.append=function(t,s){this._pairs.push([t,s])};ol.toString=function(t){const s=t?function(n){return t.call(this,n,mi)}:mi;return this._pairs.map(function(o){return s(o[0])+"="+s(o[1])},"").join("&")};function Zf(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function rl(e,t,s){if(!t)return e;const n=s&&s.encode||Zf;k.isFunction(s)&&(s={serialize:s});const o=s&&s.serialize;let r;if(o?r=o(t,s):r=k.isURLSearchParams(t)?t.toString():new lr(t,s).toString(n),r){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+r}return e}class gi{constructor(){this.handlers=[]}use(t,s,n){return this.handlers.push({fulfilled:t,rejected:s,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){k.forEach(this.handlers,function(n){n!==null&&t(n)})}}const il={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Yf=typeof URLSearchParams<"u"?URLSearchParams:lr,Qf=typeof FormData<"u"?FormData:null,Xf=typeof Blob<"u"?Blob:null,ep={isBrowser:!0,classes:{URLSearchParams:Yf,FormData:Qf,Blob:Xf},protocols:["http","https","file","blob","url","data"]},cr=typeof window<"u"&&typeof document<"u",Lo=typeof navigator=="object"&&navigator||void 0,tp=cr&&(!Lo||["ReactNative","NativeScript","NS"].indexOf(Lo.product)<0),sp=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",np=cr&&window.location.href||"http://localhost",op=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:cr,hasStandardBrowserEnv:tp,hasStandardBrowserWebWorkerEnv:sp,navigator:Lo,origin:np},Symbol.toStringTag,{value:"Module"})),We={...op,...ep};function rp(e,t){return Yn(e,new We.classes.URLSearchParams,Object.assign({visitor:function(s,n,o,r){return We.isNode&&k.isBuffer(s)?(this.append(n,s.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}function ip(e){return k.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function ap(e){const t={},s=Object.keys(e);let n;const o=s.length;let r;for(n=0;n<o;n++)r=s[n],t[r]=e[r];return t}function al(e){function t(s,n,o,r){let i=s[r++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),c=r>=s.length;return i=!i&&k.isArray(o)?o.length:i,c?(k.hasOwnProp(o,i)?o[i]=[o[i],n]:o[i]=n,!l):((!o[i]||!k.isObject(o[i]))&&(o[i]=[]),t(s,n,o[i],r)&&k.isArray(o[i])&&(o[i]=ap(o[i])),!l)}if(k.isFormData(e)&&k.isFunction(e.entries)){const s={};return k.forEachEntry(e,(n,o)=>{t(ip(n),o,s,0)}),s}return null}function lp(e,t,s){if(k.isString(e))try{return(t||JSON.parse)(e),k.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(s||JSON.stringify)(e)}const rn={transitional:il,adapter:["xhr","http","fetch"],transformRequest:[function(t,s){const n=s.getContentType()||"",o=n.indexOf("application/json")>-1,r=k.isObject(t);if(r&&k.isHTMLForm(t)&&(t=new FormData(t)),k.isFormData(t))return o?JSON.stringify(al(t)):t;if(k.isArrayBuffer(t)||k.isBuffer(t)||k.isStream(t)||k.isFile(t)||k.isBlob(t)||k.isReadableStream(t))return t;if(k.isArrayBufferView(t))return t.buffer;if(k.isURLSearchParams(t))return s.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(r){if(n.indexOf("application/x-www-form-urlencoded")>-1)return rp(t,this.formSerializer).toString();if((l=k.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Yn(l?{"files[]":t}:t,c&&new c,this.formSerializer)}}return r||o?(s.setContentType("application/json",!1),lp(t)):t}],transformResponse:[function(t){const s=this.transitional||rn.transitional,n=s&&s.forcedJSONParsing,o=this.responseType==="json";if(k.isResponse(t)||k.isReadableStream(t))return t;if(t&&k.isString(t)&&(n&&!this.responseType||o)){const i=!(s&&s.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(l){if(i)throw l.name==="SyntaxError"?de.from(l,de.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:We.classes.FormData,Blob:We.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch"],e=>{rn.headers[e]={}});const cp=k.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),up=e=>{const t={};let s,n,o;return e&&e.split(` `).forEach(function(i){o=i.indexOf(":"),s=i.substring(0,o).trim().toLowerCase(),n=i.substring(o+1).trim(),!(!s||t[s]&&cp[s])&&(s==="set-cookie"?t[s]?t[s].push(n):t[s]=[n]:t[s]=t[s]?t[s]+", "+n:n)}),t},vi=Symbol("internals");function Ts(e){return e&&String(e).trim().toLowerCase()}function _n(e){return e===!1||e==null?e:k.isArray(e)?e.map(_n):String(e)}function dp(e){const t=Object.create(null),s=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=s.exec(e);)t[n[1]]=n[2];return t}const fp=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ho(e,t,s,n,o){if(k.isFunction(n))return n.call(this,t,s);if(o&&(t=s),!!k.isString(t)){if(k.isString(n))return t.indexOf(n)!==-1;if(k.isRegExp(n))return n.test(t)}}function pp(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,s,n)=>s.toUpperCase()+n)}function hp(e,t){const s=k.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+s,{value:function(o,r,i){return this[n].call(this,t,o,r,i)},configurable:!0})})}let ot=class{constructor(t){t&&this.set(t)}set(t,s,n){const o=this;function r(l,c,d){const u=Ts(c);if(!u)throw new Error("header name must be a non-empty string");const f=k.findKey(o,u);(!f||o[f]===void 0||d===!0||d===void 0&&o[f]!==!1)&&(o[f||c]=_n(l))}const i=(l,c)=>k.forEach(l,(d,u)=>r(d,u,c));if(k.isPlainObject(t)||t instanceof this.constructor)i(t,s);else if(k.isString(t)&&(t=t.trim())&&!fp(t))i(up(t),s);else if(k.isObject(t)&&k.isIterable(t)){let l={},c,d;for(const u of t){if(!k.isArray(u))throw TypeError("Object iterator must return a key-value pair");l[d=u[0]]=(c=l[d])?k.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}i(l,s)}else t!=null&&r(s,t,n);return this}get(t,s){if(t=Ts(t),t){const n=k.findKey(this,t);if(n){const o=this[n];if(!s)return o;if(s===!0)return dp(o);if(k.isFunction(s))return s.call(this,o,n);if(k.isRegExp(s))return s.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,s){if(t=Ts(t),t){const n=k.findKey(this,t);return!!(n&&this[n]!==void 0&&(!s||ho(this,this[n],n,s)))}return!1}delete(t,s){const n=this;let o=!1;function r(i){if(i=Ts(i),i){const l=k.findKey(n,i);l&&(!s||ho(n,n[l],l,s))&&(delete n[l],o=!0)}}return k.isArray(t)?t.forEach(r):r(t),o}clear(t){const s=Object.keys(this);let n=s.length,o=!1;for(;n--;){const r=s[n];(!t||ho(this,this[r],r,t,!0))&&(delete this[r],o=!0)}return o}normalize(t){const s=this,n={};return k.forEach(this,(o,r)=>{const i=k.findKey(n,r);if(i){s[i]=_n(o),delete s[r];return}const l=t?pp(r):String(r).trim();l!==r&&delete s[r],s[l]=_n(o),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const s=Object.create(null);return k.forEach(this,(n,o)=>{n!=null&&n!==!1&&(s[o]=t&&k.isArray(n)?n.join(", "):n)}),s}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,s])=>t+": "+s).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...s){const n=new this(t);return s.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[vi]=this[vi]={accessors:{}}).accessors,o=this.prototype;function r(i){const l=Ts(i);n[l]||(hp(o,i),n[l]=!0)}return k.isArray(t)?t.forEach(r):r(t),this}};ot.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);k.reduceDescriptors(ot.prototype,({value:e},t)=>{let s=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[s]=n}}});k.freezeMethods(ot);function mo(e,t){const s=this||rn,n=t||s,o=ot.from(n.headers);let r=n.data;return k.forEach(e,function(l){r=l.call(s,r,o.normalize(),t?t.status:void 0)}),o.normalize(),r}function ll(e){return!!(e&&e.__CANCEL__)}function Ss(e,t,s){de.call(this,e??"canceled",de.ERR_CANCELED,t,s),this.name="CanceledError"}k.inherits(Ss,de,{__CANCEL__:!0});function cl(e,t,s){const n=s.config.validateStatus;!s.status||!n||n(s.status)?e(s):t(new de("Request failed with status code "+s.status,[de.ERR_BAD_REQUEST,de.ERR_BAD_RESPONSE][Math.floor(s.status/100)-4],s.config,s.request,s))}function mp(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function gp(e,t){e=e||10;const s=new Array(e),n=new Array(e);let o=0,r=0,i;return t=t!==void 0?t:1e3,function(c){const d=Date.now(),u=n[r];i||(i=d),s[o]=c,n[o]=d;let f=r,m=0;for(;f!==o;)m+=s[f++],f=f%e;if(o=(o+1)%e,o===r&&(r=(r+1)%e),d-i<t)return;const y=u&&d-u;return y?Math.round(m*1e3/y):void 0}}function vp(e,t){let s=0,n=1e3/t,o,r;const i=(d,u=Date.now())=>{s=u,o=null,r&&(clearTimeout(r),r=null),e.apply(null,d)};return[(...d)=>{const u=Date.now(),f=u-s;f>=n?i(d,u):(o=d,r||(r=setTimeout(()=>{r=null,i(o)},n-f)))},()=>o&&i(o)]}const Tn=(e,t,s=3)=>{let n=0;const o=gp(50,250);return vp(r=>{const i=r.loaded,l=r.lengthComputable?r.total:void 0,c=i-n,d=o(c),u=i<=l;n=i;const f={loaded:i,total:l,progress:l?i/l:void 0,bytes:c,rate:d||void 0,estimated:d&&l&&u?(l-i)/d:void 0,event:r,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},s)},yi=(e,t)=>{const s=e!=null;return[n=>t[0]({lengthComputable:s,total:e,loaded:n}),t[1]]},bi=e=>(...t)=>k.asap(()=>e(...t)),yp=We.hasStandardBrowserEnv?((e,t)=>s=>(s=new URL(s,We.origin),e.protocol===s.protocol&&e.host===s.host&&(t||e.port===s.port)))(new URL(We.origin),We.navigator&&/(msie|trident)/i.test(We.navigator.userAgent)):()=>!0,bp=We.hasStandardBrowserEnv?{write(e,t,s,n,o,r){const i=[e+"="+encodeURIComponent(t)];k.isNumber(s)&&i.push("expires="+new Date(s).toGMTString()),k.isString(n)&&i.push("path="+n),k.isString(o)&&i.push("domain="+o),r===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function _p(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function xp(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function ul(e,t,s){let n=!_p(t);return e&&(n||s==!1)?xp(e,t):t}const _i=e=>e instanceof ot?{...e}:e;function rs(e,t){t=t||{};const s={};function n(d,u,f,m){return k.isPlainObject(d)&&k.isPlainObject(u)?k.merge.call({caseless:m},d,u):k.isPlainObject(u)?k.merge({},u):k.isArray(u)?u.slice():u}function o(d,u,f,m){if(k.isUndefined(u)){if(!k.isUndefined(d))return n(void 0,d,f,m)}else return n(d,u,f,m)}function r(d,u){if(!k.isUndefined(u))return n(void 0,u)}function i(d,u){if(k.isUndefined(u)){if(!k.isUndefined(d))return n(void 0,d)}else return n(void 0,u)}function l(d,u,f){if(f in t)return n(d,u);if(f in e)return n(void 0,d)}const c={url:r,method:r,data:r,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(d,u,f)=>o(_i(d),_i(u),f,!0)};return k.forEach(Object.keys(Object.assign({},e,t)),function(u){const f=c[u]||o,m=f(e[u],t[u],u);k.isUndefined(m)&&f!==l||(s[u]=m)}),s}const dl=e=>{const t=rs({},e);let{data:s,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:r,headers:i,auth:l}=t;t.headers=i=ot.from(i),t.url=rl(ul(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let c;if(k.isFormData(s)){if(We.hasStandardBrowserEnv||We.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((c=i.getContentType())!==!1){const[d,...u]=c?c.split(";").map(f=>f.trim()).filter(Boolean):[];i.setContentType([d||"multipart/form-data",...u].join("; "))}}if(We.hasStandardBrowserEnv&&(n&&k.isFunction(n)&&(n=n(t)),n||n!==!1&&yp(t.url))){const d=o&&r&&bp.read(r);d&&i.set(o,d)}return t},wp=typeof XMLHttpRequest<"u",Cp=wp&&function(e){return new Promise(function(s,n){const o=dl(e);let r=o.data;const i=ot.from(o.headers).normalize();let{responseType:l,onUploadProgress:c,onDownloadProgress:d}=o,u,f,m,y,b;function v(){y&&y(),b&&b(),o.cancelToken&&o.cancelToken.unsubscribe(u),o.signal&&o.signal.removeEventListener("abort",u)}let E=new XMLHttpRequest;E.open(o.method.toUpperCase(),o.url,!0),E.timeout=o.timeout;function A(){if(!E)return;const T=ot.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),W={data:!l||l==="text"||l==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:T,config:e,request:E};cl(function(Q){s(Q),v()},function(Q){n(Q),v()},W),E=null}"onloadend"in E?E.onloadend=A:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(A)},E.onabort=function(){E&&(n(new de("Request aborted",de.ECONNABORTED,e,E)),E=null)},E.onerror=function(){n(new de("Network Error",de.ERR_NETWORK,e,E)),E=null},E.ontimeout=function(){let N=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const W=o.transitional||il;o.timeoutErrorMessage&&(N=o.timeoutErrorMessage),n(new de(N,W.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,e,E)),E=null},r===void 0&&i.setContentType(null),"setRequestHeader"in E&&k.forEach(i.toJSON(),function(N,W){E.setRequestHeader(W,N)}),k.isUndefined(o.withCredentials)||(E.withCredentials=!!o.withCredentials),l&&l!=="json"&&(E.responseType=o.responseType),d&&([m,b]=Tn(d,!0),E.addEventListener("progress",m)),c&&E.upload&&([f,y]=Tn(c),E.upload.addEventListener("progress",f),E.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(u=T=>{E&&(n(!T||T.type?new Ss(null,e,E):T),E.abort(),E=null)},o.cancelToken&&o.cancelToken.subscribe(u),o.signal&&(o.signal.aborted?u():o.signal.addEventListener("abort",u)));const S=mp(o.url);if(S&&We.protocols.indexOf(S)===-1){n(new de("Unsupported protocol "+S+":",de.ERR_BAD_REQUEST,e));return}E.send(r||null)})},Ep=(e,t)=>{const{length:s}=e=e?e.filter(Boolean):[];if(t||s){let n=new AbortController,o;const r=function(d){if(!o){o=!0,l();const u=d instanceof Error?d:this.reason;n.abort(u instanceof de?u:new Ss(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,r(new de(`timeout ${t} of ms exceeded`,de.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(r):d.removeEventListener("abort",r)}),e=null)};e.forEach(d=>d.addEventListener("abort",r));const{signal:c}=n;return c.unsubscribe=()=>k.asap(l),c}},Sp=function*(e,t){let s=e.byteLength;if(s<t){yield e;return}let n=0,o;for(;n<s;)o=n+t,yield e.slice(n,o),n=o},Ap=async function*(e,t){for await(const s of kp(e))yield*Sp(s,t)},kp=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:s,value:n}=await t.read();if(s)break;yield n}}finally{await t.cancel()}},xi=(e,t,s,n)=>{const o=Ap(e,t);let r=0,i,l=c=>{i||(i=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:d,value:u}=await o.next();if(d){l(),c.close();return}let f=u.byteLength;if(s){let m=r+=f;s(m)}c.enqueue(new Uint8Array(u))}catch(d){throw l(d),d}},cancel(c){return l(c),o.return()}},{highWaterMark:2})},Qn=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",fl=Qn&&typeof ReadableStream=="function",$p=Qn&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),pl=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Rp=fl&&pl(()=>{let e=!1;const t=new Request(We.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),wi=64*1024,Mo=fl&&pl(()=>k.isReadableStream(new Response("").body)),On={stream:Mo&&(e=>e.body)};Qn&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!On[t]&&(On[t]=k.isFunction(e[t])?s=>s[t]():(s,n)=>{throw new de(`Response type '${t}' is not supported`,de.ERR_NOT_SUPPORT,n)})})})(new Response);const Tp=async e=>{if(e==null)return 0;if(k.isBlob(e))return e.size;if(k.isSpecCompliantForm(e))return(await new Request(We.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(k.isArrayBufferView(e)||k.isArrayBuffer(e))return e.byteLength;if(k.isURLSearchParams(e)&&(e=e+""),k.isString(e))return(await $p(e)).byteLength},Op=async(e,t)=>{const s=k.toFiniteNumber(e.getContentLength());return s??Tp(t)},Pp=Qn&&(async e=>{let{url:t,method:s,data:n,signal:o,cancelToken:r,timeout:i,onDownloadProgress:l,onUploadProgress:c,responseType:d,headers:u,withCredentials:f="same-origin",fetchOptions:m}=dl(e);d=d?(d+"").toLowerCase():"text";let y=Ep([o,r&&r.toAbortSignal()],i),b;const v=y&&y.unsubscribe&&(()=>{y.unsubscribe()});let E;try{if(c&&Rp&&s!=="get"&&s!=="head"&&(E=await Op(u,n))!==0){let W=new Request(t,{method:"POST",body:n,duplex:"half"}),te;if(k.isFormData(n)&&(te=W.headers.get("content-type"))&&u.setContentType(te),W.body){const[Q,_]=yi(E,Tn(bi(c)));n=xi(W.body,wi,Q,_)}}k.isString(f)||(f=f?"include":"omit");const A="credentials"in Request.prototype;b=new Request(t,{...m,signal:y,method:s.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:A?f:void 0});let S=await fetch(b,m);const T=Mo&&(d==="stream"||d==="response");if(Mo&&(l||T&&v)){const W={};["status","statusText","headers"].forEach(ne=>{W[ne]=S[ne]});const te=k.toFiniteNumber(S.headers.get("content-length")),[Q,_]=l&&yi(te,Tn(bi(l),!0))||[];S=new Response(xi(S.body,wi,Q,()=>{_&&_(),v&&v()}),W)}d=d||"text";let N=await On[k.findKey(On,d)||"text"](S,e);return!T&&v&&v(),await new Promise((W,te)=>{cl(W,te,{data:N,headers:ot.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:b})})}catch(A){throw v&&v(),A&&A.name==="TypeError"&&/Load failed|fetch/i.test(A.message)?Object.assign(new de("Network Error",de.ERR_NETWORK,e,b),{cause:A.cause||A}):de.from(A,A&&A.code,e,b)}}),Fo={http:Wf,xhr:Cp,fetch:Pp};k.forEach(Fo,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ci=e=>`- ${e}`,Ip=e=>k.isFunction(e)||e===null||e===!1,hl={getAdapter:e=>{e=k.isArray(e)?e:[e];const{length:t}=e;let s,n;const o={};for(let r=0;r<t;r++){s=e[r];let i;if(n=s,!Ip(s)&&(n=Fo[(i=String(s)).toLowerCase()],n===void 0))throw new de(`Unknown adapter '${i}'`);if(n)break;o[i||"#"+r]=n}if(!n){const r=Object.entries(o).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let i=t?r.length>1?`since : `+r.map(Ci).join(` `):" "+Ci(r[0]):"as no adapter specified";throw new de("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:Fo};function go(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ss(null,e)}function Ei(e){return go(e),e.headers=ot.from(e.headers),e.data=mo.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),hl.getAdapter(e.adapter||rn.adapter)(e).then(function(n){return go(e),n.data=mo.call(e,e.transformResponse,n),n.headers=ot.from(n.headers),n},function(n){return ll(n)||(go(e),n&&n.response&&(n.response.data=mo.call(e,e.transformResponse,n.response),n.response.headers=ot.from(n.response.headers))),Promise.reject(n)})}const ml="1.10.0",Xn={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Xn[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Si={};Xn.transitional=function(t,s,n){function o(r,i){return"[Axios v"+ml+"] Transitional option '"+r+"'"+i+(n?". "+n:"")}return(r,i,l)=>{if(t===!1)throw new de(o(i," has been removed"+(s?" in "+s:"")),de.ERR_DEPRECATED);return s&&!Si[i]&&(Si[i]=!0,console.warn(o(i," has been deprecated since v"+s+" and will be removed in the near future"))),t?t(r,i,l):!0}};Xn.spelling=function(t){return(s,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Lp(e,t,s){if(typeof e!="object")throw new de("options must be an object",de.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const r=n[o],i=t[r];if(i){const l=e[r],c=l===void 0||i(l,r,e);if(c!==!0)throw new de("option "+r+" must be "+c,de.ERR_BAD_OPTION_VALUE);continue}if(s!==!0)throw new de("Unknown option "+r,de.ERR_BAD_OPTION)}}const xn={assertOptions:Lp,validators:Xn},Ct=xn.validators;let ss=class{constructor(t){this.defaults=t||{},this.interceptors={request:new gi,response:new gi}}async request(t,s){try{return await this._request(t,s)}catch(n){if(n instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const r=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?r&&!String(n.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(n.stack+=` `+r):n.stack=r}catch{}}throw n}}_request(t,s){typeof t=="string"?(s=s||{},s.url=t):s=t||{},s=rs(this.defaults,s);const{transitional:n,paramsSerializer:o,headers:r}=s;n!==void 0&&xn.assertOptions(n,{silentJSONParsing:Ct.transitional(Ct.boolean),forcedJSONParsing:Ct.transitional(Ct.boolean),clarifyTimeoutError:Ct.transitional(Ct.boolean)},!1),o!=null&&(k.isFunction(o)?s.paramsSerializer={serialize:o}:xn.assertOptions(o,{encode:Ct.function,serialize:Ct.function},!0)),s.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?s.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:s.allowAbsoluteUrls=!0),xn.assertOptions(s,{baseUrl:Ct.spelling("baseURL"),withXsrfToken:Ct.spelling("withXSRFToken")},!0),s.method=(s.method||this.defaults.method||"get").toLowerCase();let i=r&&k.merge(r.common,r[s.method]);r&&k.forEach(["delete","get","head","post","put","patch","common"],b=>{delete r[b]}),s.headers=ot.concat(i,r);const l=[];let c=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(s)===!1||(c=c&&v.synchronous,l.unshift(v.fulfilled,v.rejected))});const d=[];this.interceptors.response.forEach(function(v){d.push(v.fulfilled,v.rejected)});let u,f=0,m;if(!c){const b=[Ei.bind(this),void 0];for(b.unshift.apply(b,l),b.push.apply(b,d),m=b.length,u=Promise.resolve(s);f<m;)u=u.then(b[f++],b[f++]);return u}m=l.length;let y=s;for(f=0;f<m;){const b=l[f++],v=l[f++];try{y=b(y)}catch(E){v.call(this,E);break}}try{u=Ei.call(this,y)}catch(b){return Promise.reject(b)}for(f=0,m=d.length;f<m;)u=u.then(d[f++],d[f++]);return u}getUri(t){t=rs(this.defaults,t);const s=ul(t.baseURL,t.url,t.allowAbsoluteUrls);return rl(s,t.params,t.paramsSerializer)}};k.forEach(["delete","get","head","options"],function(t){ss.prototype[t]=function(s,n){return this.request(rs(n||{},{method:t,url:s,data:(n||{}).data}))}});k.forEach(["post","put","patch"],function(t){function s(n){return function(r,i,l){return this.request(rs(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:r,data:i}))}}ss.prototype[t]=s(),ss.prototype[t+"Form"]=s(!0)});let Mp=class gl{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let s;this.promise=new Promise(function(r){s=r});const n=this;this.promise.then(o=>{if(!n._listeners)return;let r=n._listeners.length;for(;r-- >0;)n._listeners[r](o);n._listeners=null}),this.promise.then=o=>{let r;const i=new Promise(l=>{n.subscribe(l),r=l}).then(o);return i.cancel=function(){n.unsubscribe(r)},i},t(function(r,i,l){n.reason||(n.reason=new Ss(r,i,l),s(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const s=this._listeners.indexOf(t);s!==-1&&this._listeners.splice(s,1)}toAbortSignal(){const t=new AbortController,s=n=>{t.abort(n)};return this.subscribe(s),t.signal.unsubscribe=()=>this.unsubscribe(s),t.signal}static source(){let t;return{token:new gl(function(o){t=o}),cancel:t}}};function Fp(e){return function(s){return e.apply(null,s)}}function jp(e){return k.isObject(e)&&e.isAxiosError===!0}const jo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(jo).forEach(([e,t])=>{jo[t]=e});function vl(e){const t=new ss(e),s=Wa(ss.prototype.request,t);return k.extend(s,ss.prototype,t,{allOwnKeys:!0}),k.extend(s,t,null,{allOwnKeys:!0}),s.create=function(o){return vl(rs(e,o))},s}const Fe=vl(rn);Fe.Axios=ss;Fe.CanceledError=Ss;Fe.CancelToken=Mp;Fe.isCancel=ll;Fe.VERSION=ml;Fe.toFormData=Yn;Fe.AxiosError=de;Fe.Cancel=Fe.CanceledError;Fe.all=function(t){return Promise.all(t)};Fe.spread=Fp;Fe.isAxiosError=jp;Fe.mergeConfig=rs;Fe.AxiosHeaders=ot;Fe.formToJSON=e=>al(k.isHTMLForm(e)?new FormData(e):e);Fe.getAdapter=hl.getAdapter;Fe.HttpStatusCode=jo;Fe.default=Fe;const{Axios:jy,AxiosError:Dp,CanceledError:Dy,isCancel:Ny,CancelToken:By,VERSION:Uy,all:Vy,Cancel:Hy,isAxiosError:qy,spread:zy,toFormData:Ky,AxiosHeaders:Wy,HttpStatusCode:Jy,formToJSON:Gy,getAdapter:Zy,mergeConfig:Yy}=Fe,Np={timeout:1e4,retries:3,retryDelay:1e3,withCredentials:!1,headers:{"Content-Type":"application/json"}},Bp=()=>{throw new Error(`CRITICAL: VITE_API_BASE_URL is required but not set. Please check your .env file. Development: Add VITE_API_BASE_URL=http://localhost:8000/api to .env Production: Ensure VITE_API_BASE_URL is set in your deployment environment`)},Up={timeout:parseInt("30000"),retries:parseInt("3"),retryDelay:parseInt("1000"),withCredentials:!1},Vp=()=>{const e=Bp();return{...Np,...Up,...e}},yl={authToken:"authToken",currentUser:"currentUser"},fe={auth:{login:"/login",logout:"/logout",refresh:"/refresh",profile:"/profile",forgotPassword:"/forgot-password",resetPassword:"/reset-password"},offices:"/offices",officeAdmin:e=>`/offices/${e}/admin`,employees:"/employees",employeeCreateLookups:"/employees/create-lookups",employeePermissions:e=>`/employees/${e}/permissions`,employeeActivityLogs:e=>`/employees/${e}/activity-logs`,employeeActivityLogFilters:e=>`/employees/${e}/activity-logs/filters`,clients:"/clients",clientCreateLookups:"/clients/create-lookups",clientCases:e=>`/clients/${e}/cases`,clientConsultations:e=>`/clients/${e}/consultations`,clientSubClients:e=>`/clients/${e}/sub-clients`,clientActivityLogs:e=>`/clients/${e}/activity-logs`,clientActivityLogFilters:e=>`/clients/${e}/activity-logs/filters`,cases:"/cases",casesCreateLookups:"/cases/create-lookups",consultations:"/consultations",health:"/health",version:"/version",upload:"/upload"},Hp={upload:parseInt("300000")},Pn={maxRetries:parseInt("3"),retryDelay:parseInt("1000"),backoffMultiplier:parseInt("2"),maxRetryDelay:parseInt("10000")},qp=()=>{const e=[],t=[];return e.push("VITE_API_BASE_URL (CRITICAL - App will not function without this)"),e.push("VITE_API_KEY (REQUIRED - ALL API requests need API client authentication)"),e.push("VITE_API_SECRET (REQUIRED - ALL API requests need API client authentication)"),("".includes("localhost")||"".includes("127.0.0.1"))&&e.push("VITE_API_BASE_URL points to localhost/127.0.0.1 in production - THIS WILL BREAK YOUR APP"),t.push("API logging is enabled in production - may expose sensitive data"),{valid:e.length===0,missing:e,warnings:t}},dn=Vp(),fn=yl.authToken,Ai=yl.currentUser;class pn extends Error{constructor(s,n,o,r){super(s);Vt(this,"status");Vt(this,"code");Vt(this,"details");Vt(this,"timestamp");this.name="ApiClientError",this.status=n,this.code=o,this.details=r,this.timestamp=new Date().toISOString()}}const zp={retries:Pn.maxRetries,retryDelay:Pn.retryDelay,retryCondition:e=>!e.response||e.response.status>=500||e.code==="ECONNABORTED"};class Kp{constructor(t={},s={}){Vt(this,"instance");Vt(this,"config");Vt(this,"retryConfig");this.config={baseURL:dn.baseURL,timeout:dn.timeout,withCredentials:dn.withCredentials||!1,headers:dn.headers||{"Content-Type":"application/json"},...t},this.retryConfig={...zp,...s},this.instance=Fe.create(this.config),this.setupInterceptors()}setupInterceptors(){this.instance.interceptors.request.use(t=>{const s=localStorage.getItem(fn);return s&&(t.headers.Authorization=`Bearer ${s}`),t},t=>(console.error("Request interceptor error:",t),Promise.reject(new pn("Failed to prepare request",void 0,"REQUEST_SETUP_ERROR",t)))),this.instance.interceptors.response.use(t=>t,t=>(this.handleResponseError(t),Promise.reject(t)))}handleResponseError(t){const{response:s,code:n}=t,o={message:this.getErrorMessage(t),status:s==null?void 0:s.status,code:n,details:s==null?void 0:s.data,timestamp:new Date().toISOString()};throw(s==null?void 0:s.status)===401?this.handleUnauthorized():(s==null?void 0:s.status)===403?this.handleForbidden(o):(s==null?void 0:s.status)===429?this.handleRateLimit(o):s&&s.status>=500?this.handleServerError(o):n==="ECONNABORTED"?this.handleTimeout(o):s||this.handleNetworkError(o),new pn(o.message,o.status,o.code,o.details)}getErrorMessage(t){var s;if((s=t.response)!=null&&s.data){const n=t.response.data;return n.message||n.error||n.detail||`HTTP ${t.response.status}`}return t.code==="ECONNABORTED"?"Request timeout - please try again":t.response?t.message||"An unexpected error occurred":"Network error - please check your connection"}handleUnauthorized(){localStorage.removeItem(fn),localStorage.removeItem(Ai),window.dispatchEvent(new CustomEvent("auth:unauthorized")),window.location.pathname.includes("/login")||(window.location.href="/login")}handleForbidden(t){console.warn("Access forbidden:",t),window.dispatchEvent(new CustomEvent("auth:forbidden",{detail:t}))}handleRateLimit(t){console.warn("Rate limit exceeded:",t),window.dispatchEvent(new CustomEvent("api:rateLimit",{detail:t}))}handleServerError(t){console.error("Server error:",t),window.dispatchEvent(new CustomEvent("api:serverError",{detail:t}))}handleTimeout(t){console.warn("Request timeout:",t),window.dispatchEvent(new CustomEvent("api:timeout",{detail:t}))}handleNetworkError(t){console.error("Network error:",t),window.dispatchEvent(new CustomEvent("api:networkError",{detail:t}))}async retryRequest(t,s=1){var n,o;try{return await t()}catch(r){if(s<this.retryConfig.retries&&r instanceof Dp&&((o=(n=this.retryConfig).retryCondition)!=null&&o.call(n,r))){const i=Math.min(this.retryConfig.retryDelay*Math.pow(Pn.backoffMultiplier,s-1),Pn.maxRetryDelay);return await new Promise(l=>setTimeout(l,i)),this.retryRequest(t,s+1)}throw r}}async request(t,s,n,o){var r,i,l,c;try{const d=await this.retryRequest(()=>this.instance.request({method:t,url:s,data:n,...o}));return{data:d.data,status:d.status,success:!0,message:(r=d.data)==null?void 0:r.message}}catch(d){if(!(d instanceof pn)){const u=((l=(i=d.response)==null?void 0:i.data)==null?void 0:l.message)||d.message||"An unexpected error occurred";throw new pn(u,(c=d.response)==null?void 0:c.status)}throw d}}async get(t,s){return this.request("GET",t,void 0,s)}async post(t,s,n){return this.request("POST",t,s,n)}async put(t,s,n){return this.request("PUT",t,s,n)}async patch(t,s,n){return this.request("PATCH",t,s,n)}async delete(t,s){return this.request("DELETE",t,void 0,s)}async uploadFile(t,s,n){const o=new FormData;return o.append("file",s),this.post(t,o,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:n,timeout:Hp.upload})}async healthCheck(){try{return await this.get("/health"),!0}catch(t){return console.error("API health check failed:",t),!1}}async testConnection(){const t=Date.now();try{return await this.healthCheck(),{connected:!0,latency:Date.now()-t}}catch(s){return{connected:!1,error:s instanceof Error?s.message:"Unknown error"}}}validateConfig(){const t=[],s=[];if(!this.config.baseURL)t.push("API base URL is not configured");else{try{new URL(this.config.baseURL)}catch{t.push("API base URL is not a valid URL")}this.config.baseURL.includes("localhost")&&s.push("Using localhost URL in production environment"),this.config.baseURL.startsWith("http:")&&s.push("Using HTTP instead of HTTPS in production")}return this.config.timeout<=0?t.push("API timeout must be greater than 0"):this.config.timeout<5e3?s.push("API timeout is very low (< 5 seconds)"):this.config.timeout>6e4&&s.push("API timeout is very high (> 60 seconds)"),this.retryConfig.retries<0?t.push("Retry count cannot be negative"):this.retryConfig.retries>5&&s.push("High retry count may cause performance issues"),this.retryConfig.retryDelay<=0&&t.push("Retry delay must be greater than 0"),{valid:t.length===0,errors:t,warnings:s}}async getApiStatus(){var o;const t=new Date().toISOString(),s=await this.testConnection();let n;if(s.connected)try{n=(o=(await this.get("/version")).data)==null?void 0:o.version}catch{}return{url:this.config.baseURL,connected:s.connected,latency:s.latency,version:n,timestamp:t,error:s.error,config:{timeout:this.config.timeout,retries:this.retryConfig.retries,retryDelay:this.retryConfig.retryDelay}}}async initialize(){const t=qp();if(!t.valid)return console.error("❌ Environment validation failed:",t.missing),{success:!1,errors:[`Missing required environment variables: ${t.missing.join(", ")}`],warnings:t.warnings,connected:!1,envValidation:t};t.warnings.length>0&&console.warn("⚠️ Environment warnings:",t.warnings);const s=this.validateConfig();if(!s.valid)return console.error("❌ API configuration validation failed:",s.errors),{success:!1,errors:s.errors,warnings:[...s.warnings,...t.warnings],connected:!1,envValidation:t};s.warnings.length>0&&console.warn("⚠️ API configuration warnings:",s.warnings);const n=await this.testConnection();return n.connected||console.warn("⚠️ API client initialized but connection test failed:",n.error),{success:s.valid,errors:s.errors,warnings:[...s.warnings,...t.warnings],connected:n.connected,envValidation:t}}getConfig(){return{...this.config}}updateBaseURL(t){this.config.baseURL=t,this.instance.defaults.baseURL=t}updateTimeout(t){this.config.timeout=t,this.instance.defaults.timeout=t}setAuthToken(t){localStorage.setItem(fn,t)}clearAuthToken(){localStorage.removeItem(fn),localStorage.removeItem(Ai)}}const ie=new Kp,In={login:async e=>{var s;const t=await ie.post(fe.auth.login,e);return(s=t.data)!=null&&s.token&&ie.setAuthToken(t.data.token),t},logout:async()=>{const e=await ie.post(fe.auth.logout);return ie.clearAuthToken(),e},getCurrentProfile:async()=>ie.get(fe.auth.profile),refreshToken:async()=>{var t;const e=await ie.post(fe.auth.refresh);return(t=e.data)!=null&&t.token&&ie.setAuthToken(e.data.token),e},forgotPassword:async e=>ie.post(fe.auth.forgotPassword,{email:e}),resetPassword:async(e,t)=>ie.post(fe.auth.resetPassword,{token:e,password:t,password_confirmation:t}),getUsers:async(e=1,t=15)=>{var s,n,o,r,i,l,c,d,u;try{const f=await ie.get(`/users?page=${e}&per_page=${t}`);return{...f,data:((s=f.data)==null?void 0:s.data)||[],meta:{page:((o=(n=f.data)==null?void 0:n.pagination)==null?void 0:o.current_page)||e,limit:((i=(r=f.data)==null?void 0:r.pagination)==null?void 0:i.per_page)||t,total:((c=(l=f.data)==null?void 0:l.pagination)==null?void 0:c.total)||0,totalPages:((u=(d=f.data)==null?void 0:d.pagination)==null?void 0:u.last_page)||0}}}catch(f){throw console.warn("Users endpoint may not be available. Use employees API instead."),f}},getUserById:async e=>ie.get(`/users/${e}`),createUser:async e=>ie.post("/users",e),updateUser:async(e,t)=>ie.put(`/users/${e}`,t),deleteUser:async e=>ie.delete(`/users/${e}`),isAuthenticated:()=>!!localStorage.getItem("authToken"),getCurrentUser:()=>{const e=localStorage.getItem("currentUser");try{return e?JSON.parse(e):null}catch{return null}},getUserRole:()=>{var t,s;const e=In.getCurrentUser();return((s=(t=e==null?void 0:e.roles)==null?void 0:t[0])==null?void 0:s.name)||(e==null?void 0:e.role)||null},hasRole:e=>{var s;const t=In.getCurrentUser();return((s=t==null?void 0:t.roles)==null?void 0:s.some(n=>n.name===e))||!1}},Wp=he({name:"ChevronDownIcon",props:{className:{type:String,default:""}},setup(e){return()=>Ee("svg",{class:e.className,width:"14",height:"9",viewBox:"0 0 14 9",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.417969 1.70718L1.83218 0.292969L7.12508 5.58586L12.418 0.292969L13.8322 1.70718L7.12508 8.41429L0.417969 1.70718Z",fill:"currentColor"})])}}),Jp=he({name:"PlusIcon",props:{className:{type:String,default:""}},setup(e){return()=>Ee("svg",{class:e.className,width:"13",height:"12",viewBox:"0 0 13 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.625 5V0H7.625V5H12.625V7H7.625V12H5.625V7H0.625V5H5.625Z",fill:"currentColor"})])}}),Gp=he({name:"MapIcon",props:{className:{type:String,default:""}},setup(e){return()=>Ee("svg",{class:e.className,width:"18",height:"16",viewBox:"0 0 18 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M11.625 14.6663L6.625 12.9997V1.33301L11.625 2.99967V14.6663ZM11.625 2.99967L6.625 1.33301L1.625 2.99967V14.6663L6.625 12.9997L11.625 14.6663L16.625 12.9997V1.33301L11.625 2.99967Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})])}}),Zp=he({name:"HomeIcon",props:{className:{type:String,default:""}},setup(e){return()=>Ee("svg",{class:e.className,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M2 6L8 1L14 6V13C14 13.5304 13.7893 14.0391 13.4142 14.4142C13.0391 14.7893 12.5304 15 12 15H4C3.46957 15 2.96086 14.7893 2.58579 14.4142C2.21071 14.0391 2 13.5304 2 13V6Z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Ee("path",{d:"M6 15V9H10V15",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})])}}),Yp=he({name:"ChevronRightIcon",props:{className:{type:String,default:""}},setup(e){return()=>Ee("svg",{class:e.className,width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.29289 0.292893C1.68342 -0.0976311 2.31658 -0.0976311 2.70711 0.292893L7.70711 5.29289C8.09763 5.68342 8.09763 6.31658 7.70711 6.70711L2.70711 11.7071C2.31658 12.0976 1.68342 12.0976 1.29289 11.7071C0.902369 11.3166 0.902369 10.6834 1.29289 10.2929L5.58579 6L1.29289 1.70711C0.902369 1.31658 0.902369 0.683417 1.29289 0.292893Z",fill:"currentColor"})])}}),Qp=he({name:"ArrowLeftIcon",props:{className:{type:String,default:""}},setup(e){return()=>Ee("svg",{class:e.className,width:"16",height:"14",viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.70711 0.292893C7.09763 0.683417 7.09763 1.31658 6.70711 1.70711L2.41421 6H15C15.5523 6 16 6.44772 16 7C16 7.55228 15.5523 8 15 8H2.41421L6.70711 12.2929C7.09763 12.6834 7.09763 13.3166 6.70711 13.7071C6.31658 14.0976 5.68342 14.0976 5.29289 13.7071L0.292893 8.70711C-0.0976311 8.31658 -0.0976311 7.68342 0.292893 7.29289L5.29289 2.29289C5.68342 1.90237 6.31658 1.90237 6.70711 2.29289V0.292893Z",fill:"currentColor"})])}}),Xp=he({name:"CalendarIcon",props:{className:{type:String,default:""}},setup(e){return()=>Ee("svg",{class:e.className,width:"20",height:"22",viewBox:"0 0 20 22",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M1.21764 8.40426H19.0416M14.5671 12.3097H14.5763M10.1296 12.3097H10.1389M5.68289 12.3097H5.69215M14.5671 16.1962H14.5763M10.1296 16.1962H10.1389M5.68289 16.1962H5.69215M14.1687 1V4.29078M6.09051 1V4.29078M14.3633 2.5792H5.89596C2.95927 2.5792 1.125 4.21513 1.125 7.22222V16.2719C1.125 19.3262 2.95927 21 5.89596 21H14.354C17.3 21 19.125 19.3546 19.125 16.3475V7.22222C19.1342 4.21513 17.3092 2.5792 14.3633 2.5792Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})])}}),eh=he({name:"ConsultationIcon",props:{className:{type:String,default:""}},setup(e){return()=>Ee("svg",{class:e.className,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})])}}),th=he({name:"CasesIcon",props:{className:{type:String,default:""}},setup(e){return()=>Ee("svg",{class:e.className,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})])}}),sh=he({name:"ClientsIcon",props:{className:{type:String,default:""}},setup(e){return()=>Ee("svg",{class:e.className,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197m13.5-9a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})])}}),nh=he({name:"EmployeesIcon",props:{className:{type:String,default:""}},setup(e){return()=>Ee("svg",{class:e.className,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})])}}),oh=he({name:"SettingsIcon",props:{className:{type:String,default:""}},setup(e){return()=>Ee("svg",{class:e.className,width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[Ee("path",{d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),Ee("path",{d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})])}}),rh={class:"flex items-center gap-3 mr-4"},ih={class:"flex items-center gap-4"},ah={class:"h-10 w-10 rounded-full bg-gradient-to-r from-blue-500 to-purple-600 flex items-center justify-center ring-2 ring-white shadow-sm"},lh={class:"text-white text-sm font-semibold"},ch={class:"text-gray-800 font-normal text-base"},uh={key:0,class:"absolute left-0 mt-3 w-52 bg-white rounded-lg shadow-xl border border-gray-100 py-2 z-50"},dh=["disabled"],fh={key:0,class:"w-5 h-5 text-red-500 animate-spin",fill:"none",viewBox:"0 0 24 24"},ph={key:1,class:"w-5 h-5 text-red-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},hh=he({__name:"TopHeader",props:{sidebarCollapsed:{type:Boolean}},setup(e){const t=Cs(),s=le(()=>Kn()),n=le(()=>{var A,S;const b=s.value;if(!b)return"المستخدم";const v=((A=b.firstName)==null?void 0:A.trim())||"",E=((S=b.lastName)==null?void 0:S.trim())||"";return v&&E?`${v} ${E}`:v||E||"المستخدم"}),o=le(()=>{var A,S;const b=s.value;if(!b)return"م";const v=((A=b.firstName)==null?void 0:A.trim())||"",E=((S=b.lastName)==null?void 0:S.trim())||"";return v&&E?`${v.charAt(0)}${E.charAt(0)}`.toUpperCase():v?v.charAt(0).toUpperCase():E?E.charAt(0).toUpperCase():"م"}),r=G(null),i=G(!1),l=G(!1),c=()=>{i.value=!i.value},d=()=>{i.value=!1},u=()=>{d(),console.log("Navigate to profile")},f=()=>{d(),console.log("Navigate to settings")},m=async()=>{if(!l.value)try{l.value=!0,d(),console.log("🔄 Calling logout API..."),await In.logout(),console.log("✅ API logout successful"),di(),console.log("✅ Local auth data cleared"),await t.push("/login"),console.log("✅ Redirected to login page")}catch(b){console.error("❌ Logout error:",b),di();try{await t.push("/login")}catch(v){console.error("❌ Router redirect error:",v),window.location.href="/login"}}finally{l.value=!1}},y=b=>{const v=b.target;r.value&&!r.value.contains(v)&&d()};return Ut(()=>{document.addEventListener("click",y)}),er(()=>{document.removeEventListener("click",y)}),(b,v)=>(R(),P("header",{class:re(["flex h-16 items-center justify-between bg-white border-b border-gray-200 shadow-sm transition-all duration-300 w-full fixed top-0 left-0 z-10",b.sidebarCollapsed?"pr-16 pl-6":"pr-64 pl-6"])},[a("div",rh,[X(os,{variant:"outline",class:"h-12 px-4 border-[#273F62] text-[#273F62] font-semibold text-sm hover:bg-[#273F62] hover:text-white"},{default:Re(()=>[X(je(Jp),{className:"w-3 h-3 ml-2"}),v[0]||(v[0]=Ce(" طلب معاملات "))]),_:1,__:[0]}),X(os,{variant:"outline",class:"h-12 px-4 border-[#273F62] text-[#273F62] font-semibold text-sm hover:bg-[#273F62] hover:text-white"},{default:Re(()=>[X(je(Gp),{className:"w-4 h-4 ml-2"}),v[1]||(v[1]=Ce(" دليل الموقع "))]),_:1,__:[1]})]),a("div",ih,[v[8]||(v[8]=Ft('<div class="flex items-center gap-3" data-v-950e4642><button class="relative w-8 h-8 rounded-full bg-[#E8EBF0] hover:bg-[#DDE1E8] transition-colors flex items-center justify-center" data-v-950e4642><svg class="w-4 h-4 text-[#E53E3E]" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="1.5" data-v-950e4642><path stroke-linecap="round" stroke-linejoin="round" d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" data-v-950e4642></path><path stroke-linecap="round" stroke-linejoin="round" d="m22 6-10 7L2 6" data-v-950e4642></path></svg></button><button class="relative w-8 h-8 rounded-full bg-[#E8EBF0] hover:bg-[#DDE1E8] transition-colors flex items-center justify-center" data-v-950e4642><svg class="w-4 h-4 text-[#E53E3E]" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="1.5" data-v-950e4642><path stroke-linecap="round" stroke-linejoin="round" d="M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0" data-v-950e4642></path></svg></button></div>',1)),a("div",{class:"relative",ref_key:"dropdownRef",ref:r},[a("button",{onClick:c,class:"flex items-center gap-3 p-2 rounded-lg hover:bg-gray-50 transition-colors"},[a("div",ah,[a("span",lh,F(o.value),1)]),a("span",ch,F(n.value),1),(R(),P("svg",{class:re(["w-4 h-4 text-gray-500 transition-transform duration-200",i.value?"rotate-180":""]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},v[2]||(v[2]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)]),2))]),i.value?(R(),P("div",uh,[a("button",{onClick:u,class:"w-full text-right px-4 py-3 text-sm text-gray-700 hover:bg-gray-50 transition-colors flex items-center gap-3"},v[3]||(v[3]=[a("svg",{class:"w-5 h-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})],-1),Ce(" الملف الشخصي ")])),a("button",{onClick:f,class:"w-full text-right px-4 py-3 text-sm text-gray-700 hover:bg-gray-50 transition-colors flex items-center gap-3"},v[4]||(v[4]=[a("svg",{class:"w-5 h-5 text-gray-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})],-1),Ce(" الإعدادات ")])),v[7]||(v[7]=a("hr",{class:"my-2 border-gray-100"},null,-1)),a("button",{onClick:m,disabled:l.value,class:"w-full text-right px-4 py-3 text-sm text-red-600 hover:bg-red-50 transition-colors flex items-center gap-3 disabled:opacity-50 disabled:cursor-not-allowed"},[l.value?(R(),P("svg",fh,v[5]||(v[5]=[a("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),a("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)]))):(R(),P("svg",ph,v[6]||(v[6]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"},null,-1)]))),Ce(" "+F(l.value?"جاري تسجيل الخروج...":"تسجيل الخروج"),1)],8,dh)])):ye("",!0)],512)])],2))}}),ur=Pe(hh,[["__scopeId","data-v-950e4642"]]),mh={class:"flex h-16 items-center justify-between px-4 py-3"},gh={class:"flex flex-col items-end gap-1"},vh={class:"text-[#273F62] text-xl font-bold leading-tight"},yh={class:"flex items-center gap-3"},bh={class:"h-12 px-4 bg-[#DA7E13] text-white font-semibold text-sm hover:bg-[#DA7E13]/90 shadow-sm rounded flex items-center gap-2"},_h=he({__name:"PageToolbar",setup(e){const t=le(()=>Kn()),s=le(()=>{const o=t.value;return o?o.firstName&&o.firstName.trim()?o.firstName.trim():o.lastName&&o.lastName.trim()?o.lastName.trim():"المستخدم":"المستخدم"}),n=le(()=>`صباح الخير ${s.value} ☀️`);return(o,r)=>(R(),P("div",mh,[a("div",gh,[a("h1",vh,F(n.value),1),r[0]||(r[0]=a("p",{class:"text-[#54524F] text-sm font-medium"}," اليك اخر التحديثات ",-1))]),a("div",yh,[X(os,{variant:"outline",size:"sm",class:"h-12 w-12 !bg-transparent !border-[#DA7E13] hover:!bg-white"},{default:Re(()=>r[1]||(r[1]=[a("svg",{class:"w-5 h-5",viewBox:"0 0 21 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[a("g",{"clip-path":"url(#clip0_6916_57224)"},[a("path",{d:"M13.0317 9.77177C13.1633 11.2551 11.9983 12.5001 10.5417 12.5001H7.7475C7.10333 12.5001 6.63917 11.8759 6.83917 11.2643C7.27833 9.9201 8.09083 7.91427 9.94917 7.55594C11.4117 7.27427 12.9008 8.28844 13.0325 9.77177H13.0317ZM19.5375 0.589271C18.7533 -0.195729 17.4817 -0.196562 16.6967 0.587604C16.67 0.614271 11.7358 6.02927 11.7358 6.02927C12.9783 6.40427 13.9742 7.3326 14.4292 8.53844L19.5342 3.43344C20.32 2.64844 20.3225 1.3751 19.5375 0.589271ZM16.375 10.0001C15.6842 10.0001 15.125 10.5601 15.125 11.2501V15.4168C15.125 16.5659 14.19 17.5001 13.0417 17.5001H4.70833C3.56 17.5001 2.625 16.5659 2.625 15.4168V7.08344C2.625 5.93427 3.56 5.0001 4.70833 5.0001H9.70833C10.3992 5.0001 10.9583 4.4401 10.9583 3.7501C10.9583 3.0601 10.3992 2.5001 9.70833 2.5001H4.70833C2.18083 2.5001 0.125 4.55677 0.125 7.08344V15.4168C0.125 17.9434 2.18083 20.0001 4.70833 20.0001H13.0417C15.5692 20.0001 17.625 17.9434 17.625 15.4168V11.2501C17.625 10.5601 17.0658 10.0001 16.375 10.0001Z",fill:"#273F62"}),a("path",{d:"M10.5405 12.5001C11.9972 12.5001 13.1622 11.2551 13.0305 9.77177H13.0313C12.8997 8.28844 11.4105 7.27427 9.94799 7.55594C8.08966 7.91427 7.27716 9.9201 6.83799 11.2643C6.63799 11.8759 7.10216 12.5001 7.74632 12.5001H10.5405Z",fill:"#DA7E13"}),a("path",{d:"M16.6955 0.587604C17.4805 -0.196562 18.7522 -0.195729 19.5363 0.589271C20.3213 1.3751 20.3188 2.64844 19.533 3.43344L14.428 8.53844C13.973 7.3326 12.9772 6.40427 11.7347 6.02927C11.7347 6.02927 16.6688 0.614271 16.6955 0.587604Z",fill:"#DA7E13"})]),a("defs",null,[a("clipPath",{id:"clip0_6916_57224"},[a("rect",{width:"20",height:"20",fill:"white",transform:"translate(0.125)"})])])],-1)])),_:1,__:[1]}),a("button",bh,[X(je(Wp),{className:"w-2.5 h-2 text-white"}),r[2]||(r[2]=Ce(" إختصارات "))])])]))}}),xh=Pe(_h,[["__scopeId","data-v-8e9ca953"]]),wh={class:"flex justify-end items-center px-4 py-2"},Ch={class:"flex w-72 h-14 items-center justify-between px-4 py-2.5 bg-white rounded-lg ml-auto"},Eh=he({__name:"FilterContainer",setup(e){return(t,s)=>(R(),P("div",wh,[a("div",Ch,[X(je(Xp),{className:"w-4.5 h-5 text-[#828282]"}),s[0]||(s[0]=a("span",{class:"flex-1 text-center text-[#828282] text-sm font-medium font-cairo"}," الشهر الحالي ",-1))])]))}}),Sh=Pe(Eh,[["__scopeId","data-v-2432f301"]]);function eo(...e){return e.filter(Boolean).join(" ")}const Ah=he({inheritAttrs:!1,__name:"Card",setup(e){return(t,s)=>(R(),P("div",sn({class:je(eo)("rounded-lg border bg-card text-card-foreground shadow-sm",t.$attrs.class)},t.$attrs),[tn(t.$slots,"default",{},void 0,!0)],16))}}),Ys=Pe(Ah,[["__scopeId","data-v-b7e80c45"]]),kh=he({inheritAttrs:!1,__name:"CardHeader",setup(e){return(t,s)=>(R(),P("div",sn({class:je(eo)("flex flex-col space-y-1.5 p-6",t.$attrs.class)},t.$attrs),[tn(t.$slots,"default",{},void 0,!0)],16))}}),Do=Pe(kh,[["__scopeId","data-v-f384c320"]]),$h=he({inheritAttrs:!1,__name:"CardTitle",setup(e){return(t,s)=>(R(),P("h3",sn({class:je(eo)("text-2xl font-semibold leading-none tracking-tight",t.$attrs.class)},t.$attrs),[tn(t.$slots,"default",{},void 0,!0)],16))}}),ki=Pe($h,[["__scopeId","data-v-87b9ba33"]]),Rh=he({inheritAttrs:!1,__name:"CardContent",setup(e){return(t,s)=>(R(),P("div",sn({class:je(eo)("p-6 pt-0",t.$attrs.class)},t.$attrs),[tn(t.$slots,"default",{},void 0,!0)],16))}}),Qs=Pe(Rh,[["__scopeId","data-v-0d357897"]]),Th={class:"h-40 w-full flex items-center justify-center relative"},Oh={width:"160",height:"160",viewBox:"0 0 160 160",class:"transform -rotate-90"},Ph=["stroke","stroke-dasharray","stroke-dashoffset"],Ih={class:"absolute inset-0 flex items-center justify-center"},Lh={class:"text-2xl font-semibold text-[#DA7E13]"},Mh=he({__name:"DonutChart",props:{data:{},centerValue:{},className:{default:""}},setup(e){const t=e,s=le(()=>{const n=t.data.reduce((i,l)=>i+l.value,0),o=2*Math.PI*65;let r=0;return t.data.map(i=>{const l=i.value/n,c=`${l*o} ${o}`,d=-r*o;return r+=l,{color:i.color,dashArray:c,dashOffset:d}})});return(n,o)=>(R(),P("div",{class:re(`relative ${n.className}`)},[a("div",Th,[(R(),P("svg",Oh,[o[0]||(o[0]=a("circle",{cx:"80",cy:"80",r:"65",fill:"none",stroke:"#f3f4f6","stroke-width":"30"},null,-1)),(R(!0),P(ve,null,Le(s.value,(r,i)=>(R(),P("circle",{key:i,cx:"80",cy:"80",r:"65",fill:"none",stroke:r.color,"stroke-width":"30","stroke-dasharray":r.dashArray,"stroke-dashoffset":r.dashOffset,"stroke-linecap":"round"},null,8,Ph))),128))])),a("div",Ih,[a("span",Lh,F(n.centerValue),1)])])],2))}}),$i=Pe(Mh,[["__scopeId","data-v-3e2972c3"]]),pt={getEmployees:async e=>{var r,i,l;const t=new URLSearchParams;e&&(e.page&&t.append("page",e.page.toString()),e.per_page&&t.append("per_page",e.per_page.toString()),e.search&&t.append("search",e.search),e.status&&t.append("status",e.status),e.department&&t.append("department",e.department),e.position&&t.append("position",e.position));const s=t.toString(),n=s?`${fe.employees}?${s}`:fe.employees,o=await ie.get(n);return{data:((r=o.data)==null?void 0:r.data)||[],status:o.status,success:((i=o.data)==null?void 0:i.success)||!0,message:(l=o.data)==null?void 0:l.message}},getEmployeeById:async e=>{var s,n,o;const t=await ie.get(`${fe.employees}/${e}`);return{data:(s=t.data)==null?void 0:s.data,status:t.status,success:((n=t.data)==null?void 0:n.success)||!0,message:(o=t.data)==null?void 0:o.message}},getEmployeeForEdit:async e=>{var s,n,o;const t=await ie.get(`${fe.employees}/${e}/edit`);return{data:(s=t.data)==null?void 0:s.data,status:t.status,success:((n=t.data)==null?void 0:n.success)||!0,message:(o=t.data)==null?void 0:o.message}},getEmployeeCreationLookups:async()=>{var t,s,n;const e=await ie.get(fe.employeeCreateLookups);return{data:(t=e.data)==null?void 0:t.data,status:e.status,success:((s=e.data)==null?void 0:s.success)||!0,message:(n=e.data)==null?void 0:n.message}},createEmployee:async e=>{var s,n,o;const t=await ie.post(fe.employees,e);return{data:(s=t.data)==null?void 0:s.data,status:t.status,success:((n=t.data)==null?void 0:n.success)||!0,message:(o=t.data)==null?void 0:o.message}},updateEmployee:async(e,t)=>{var n,o,r;console.log(t);const s=await ie.put(`${fe.employees}/${e}`,t);return{data:(n=s.data)==null?void 0:n.data,status:s.status,success:((o=s.data)==null?void 0:o.success)||!0,message:(r=s.data)==null?void 0:r.message}},deleteEmployee:async e=>{var s,n;const t=await ie.delete(`${fe.employees}/${e}`);return{data:null,status:t.status,success:((s=t.data)==null?void 0:s.success)||!0,message:(n=t.data)==null?void 0:n.message}},updateEmployeePermissions:async(e,t)=>{var n,o,r;const s=await ie.put(fe.employeePermissions(e.toString()),{permissions:t});return{data:(n=s.data)==null?void 0:n.data,status:s.status,success:((o=s.data)==null?void 0:o.success)||!0,message:(r=s.data)==null?void 0:r.message}},getEmployeeActivityLogs:async(e,t)=>{var l,c,d;const s=new URLSearchParams;t&&(t.page&&s.append("page",t.page.toString()),t.per_page&&s.append("per_page",t.per_page.toString()),t.action_type&&t.action_type.forEach(u=>s.append("action_type[]",u)),t.model_type&&t.model_type.forEach(u=>s.append("model_type[]",u)),t.log_name&&s.append("log_name",t.log_name),t.date_from&&s.append("date_from",t.date_from),t.date_to&&s.append("date_to",t.date_to),t.sort_by&&s.append("sort_by",t.sort_by),t.sort_order&&s.append("sort_order",t.sort_order));const n=s.toString(),o=fe.employeeActivityLogs(e.toString()),r=n?`${o}?${n}`:o,i=await ie.get(r);return{data:((l=i.data)==null?void 0:l.data)||[],status:i.status,success:((c=i.data)==null?void 0:c.success)||!0,message:(d=i.data)==null?void 0:d.message}},getEmployeeActivityLogFilters:async e=>{var s,n,o;const t=await ie.get(fe.employeeActivityLogFilters(e.toString()));return{data:((s=t.data)==null?void 0:s.data)||{},status:t.status,success:((n=t.data)==null?void 0:n.success)||!0,message:(o=t.data)==null?void 0:o.message}},searchEmployees:async(e,t=1,s=15)=>pt.getEmployees({search:e,page:t,per_page:s}),getEmployeesByStatus:async(e,t=1,s=15)=>pt.getEmployees({status:e,page:t,per_page:s}),getEmployeesByDepartment:async(e,t=1,s=15)=>pt.getEmployees({department:e,page:t,per_page:s})},Et={getClients:async e=>{var r,i,l;const t=new URLSearchParams;e&&(e.page&&t.append("page",e.page.toString()),e.per_page&&t.append("per_page",e.per_page.toString()),e.search&&t.append("search",e.search),e.client_type&&t.append("client_type",e.client_type),e.status&&t.append("status",e.status),e.city&&t.append("city",e.city),e.nationality&&t.append("nationality",e.nationality));const s=t.toString(),n=s?`${fe.clients}?${s}`:fe.clients,o=await ie.get(n);return{data:((r=o.data)==null?void 0:r.data)||[],status:o.status,success:((i=o.data)==null?void 0:i.success)||!0,message:(l=o.data)==null?void 0:l.message}},getClientById:async e=>{var s,n,o;const t=await ie.get(`${fe.clients}/${e}`);return{data:(s=t.data)==null?void 0:s.data,status:t.status,success:((n=t.data)==null?void 0:n.success)||!0,message:(o=t.data)==null?void 0:o.message}},getClientForEdit:async e=>{var s,n,o;const t=await ie.get(`${fe.clients}/${e}/edit`);return{data:(s=t.data)==null?void 0:s.data,status:t.status,success:((n=t.data)==null?void 0:n.success)||!0,message:(o=t.data)==null?void 0:o.message}},getClientCreationLookups:async()=>{var t,s,n;const e=await ie.get(fe.clientCreateLookups);return{data:(t=e.data)==null?void 0:t.data,status:e.status,success:((s=e.data)==null?void 0:s.success)||!0,message:(n=e.data)==null?void 0:n.message}},createClient:async e=>{var s,n,o;const t=await ie.post(fe.clients,e);return{data:(s=t.data)==null?void 0:s.data,status:t.status,success:((n=t.data)==null?void 0:n.success)||!0,message:(o=t.data)==null?void 0:o.message}},createIndividualClient:async e=>Et.createClient(e),createCompanyClient:async e=>Et.createClient(e),createSubClient:async(e,t)=>{const s={...t,main_client_id:e};return Et.createIndividualClient(s)},updateClient:async(e,t)=>{var n,o,r;const s=await ie.patch(`${fe.clients}/${e}`,t);return{data:(n=s.data)==null?void 0:n.data,status:s.status,success:((o=s.data)==null?void 0:o.success)||!0,message:(r=s.data)==null?void 0:r.message}},deleteClient:async e=>{var s,n;const t=await ie.delete(`${fe.clients}/${e}`);return{data:null,status:t.status,success:((s=t.data)==null?void 0:s.success)||!0,message:(n=t.data)==null?void 0:n.message}},getClientCases:async e=>{var s,n,o;const t=await ie.get(fe.clientCases(e.toString()));return{data:((s=t.data)==null?void 0:s.data)||[],status:t.status,success:((n=t.data)==null?void 0:n.success)||!0,message:(o=t.data)==null?void 0:o.message}},getClientConsultations:async e=>{var s,n,o;const t=await ie.get(fe.clientConsultations(e.toString()));return{data:((s=t.data)==null?void 0:s.data)||[],status:t.status,success:((n=t.data)==null?void 0:n.success)||!0,message:(o=t.data)==null?void 0:o.message}},getClientSubClients:async e=>{var s,n,o;const t=await ie.get(fe.clientSubClients(e.toString()));return{data:((s=t.data)==null?void 0:s.data)||[],status:t.status,success:((n=t.data)==null?void 0:n.success)||!0,message:(o=t.data)==null?void 0:o.message}},getClientActivityLogs:async(e,t)=>{var l,c,d;const s=new URLSearchParams;t&&(t.page&&s.append("page",t.page.toString()),t.per_page&&s.append("per_page",t.per_page.toString()),t.action_type&&t.action_type.forEach(u=>s.append("action_type[]",u)),t.model_type&&t.model_type.forEach(u=>s.append("model_type[]",u)),t.log_name&&s.append("log_name",t.log_name),t.date_from&&s.append("date_from",t.date_from),t.date_to&&s.append("date_to",t.date_to),t.sort_by&&s.append("sort_by",t.sort_by),t.sort_order&&s.append("sort_order",t.sort_order));const n=s.toString(),o=fe.clientActivityLogs(e.toString()),r=n?`${o}?${n}`:o,i=await ie.get(r);return{data:((l=i.data)==null?void 0:l.data)||[],status:i.status,success:((c=i.data)==null?void 0:c.success)||!0,message:(d=i.data)==null?void 0:d.message}},getClientActivityLogFilters:async e=>{var s,n,o;const t=await ie.get(fe.clientActivityLogFilters(e.toString()));return{data:((s=t.data)==null?void 0:s.data)||{},status:t.status,success:((n=t.data)==null?void 0:n.success)||!0,message:(o=t.data)==null?void 0:o.message}},searchClients:async(e,t=1,s=15)=>Et.getClients({search:e,page:t,per_page:s}),getClientsByType:async(e,t=1,s=15)=>Et.getClients({client_type:e,page:t,per_page:s}),getClientsByStatus:async(e,t=1,s=15)=>Et.getClients({status:e,page:t,per_page:s}),getClientsByCity:async(e,t=1,s=15)=>Et.getClients({city:e,page:t,per_page:s}),getIndividualClients:async(e=1,t=15)=>Et.getClientsByType("individual",e,t),getCompanyClients:async(e=1,t=15)=>Et.getClientsByType("company",e,t)},Xt={getCases:async e=>{var r,i,l;const t=new URLSearchParams;e&&(e.page&&t.append("page",e.page.toString()),e.per_page&&t.append("per_page",e.per_page.toString()),e.search&&t.append("search",e.search),e.client_id&&t.append("client_id",e.client_id.toString()),e.assigned_employee_id&&t.append("assigned_employee_id",e.assigned_employee_id.toString()),e.case_type&&t.append("case_type",e.case_type),e.status&&t.append("status",e.status),e.priority&&t.append("priority",e.priority),e.start_date_from&&t.append("start_date_from",e.start_date_from),e.start_date_to&&t.append("start_date_to",e.start_date_to));const s=t.toString(),n=s?`${fe.cases}?${s}`:fe.cases,o=await ie.get(n);return{data:((r=o.data)==null?void 0:r.data)||[],status:o.status,success:((i=o.data)==null?void 0:i.success)||!0,message:(l=o.data)==null?void 0:l.message}},getCaseById:async e=>{var s,n,o;const t=await ie.get(`${fe.cases}/${e}`);return{data:(s=t.data)==null?void 0:s.data,status:t.status,success:((n=t.data)==null?void 0:n.success)||!0,message:(o=t.data)==null?void 0:o.message}},createCase:async e=>{var s,n,o;const t=await ie.post(fe.cases,e);return{data:(s=t.data)==null?void 0:s.data,status:t.status,success:((n=t.data)==null?void 0:n.success)||!0,message:(o=t.data)==null?void 0:o.message}},updateCase:async(e,t)=>{var n,o,r;const s=await ie.put(`${fe.cases}/${e}`,t);return{data:(n=s.data)==null?void 0:n.data,status:s.status,success:((o=s.data)==null?void 0:o.success)||!0,message:(r=s.data)==null?void 0:r.message}},deleteCase:async e=>{var s,n;const t=await ie.delete(`${fe.cases}/${e}`);return{data:null,status:t.status,success:((s=t.data)==null?void 0:s.success)||!0,message:(n=t.data)==null?void 0:n.message}},updateCaseStatus:async(e,t)=>Xt.updateCase(e,{case_status_id:t}),getCaseDocuments:async e=>{var t,s,n;try{const o=await ie.get(`${fe.cases}/${e}/documents`);return{data:((t=o.data)==null?void 0:t.data)||[],status:o.status,success:((s=o.data)==null?void 0:s.success)||!0,message:(n=o.data)==null?void 0:n.message}}catch{return console.warn("Case documents endpoint may not be available"),{data:[],status:200,success:!0,message:"Documents endpoint not available"}}},uploadCaseDocument:async(e,t)=>{var s,n,o;try{const r=new FormData;r.append("file",t);const i=await ie.post(`${fe.cases}/${e}/documents`,r,{headers:{"Content-Type":"multipart/form-data"}});return{data:((s=i.data)==null?void 0:s.data)||{},status:i.status,success:((n=i.data)==null?void 0:n.success)||!0,message:(o=i.data)==null?void 0:o.message}}catch(r){throw console.warn("Case document upload endpoint may not be available"),r}},getCaseNotes:async e=>{var t,s,n;try{const o=await ie.get(`${fe.cases}/${e}/notes`);return{data:((t=o.data)==null?void 0:t.data)||[],status:o.status,success:((s=o.data)==null?void 0:s.success)||!0,message:(n=o.data)==null?void 0:n.message}}catch{return console.warn("Case notes endpoint may not be available"),{data:[],status:200,success:!0,message:"Notes endpoint not available"}}},addCaseNote:async(e,t)=>{var s,n,o;try{const r=await ie.post(`${fe.cases}/${e}/notes`,t);return{data:((s=r.data)==null?void 0:s.data)||{},status:r.status,success:((n=r.data)==null?void 0:n.success)||!0,message:(o=r.data)==null?void 0:o.message}}catch(r){throw console.warn("Case notes endpoint may not be available"),r}},searchCases:async(e,t=1,s=15)=>Xt.getCases({search:e,page:t,per_page:s}),getCasesByStatus:async(e,t=1,s=15)=>Xt.getCases({status:e,page:t,per_page:s}),getCasesByClient:async(e,t=1,s=15)=>Xt.getCases({client_id:e,page:t,per_page:s}),getCasesByEmployee:async(e,t=1,s=15)=>Xt.getCases({assigned_employee_id:e,page:t,per_page:s}),getCasesByPriority:async(e,t=1,s=15)=>Xt.getCases({priority:e,page:t,per_page:s}),getCaseCreateLookups:async()=>{var t,s,n;const e=await ie.get(fe.casesCreateLookups);return{data:(t=e.data)==null?void 0:t.data,status:e.status,success:((s=e.data)==null?void 0:s.success)||!0,message:(n=e.data)==null?void 0:n.message}}},Fh={class:"flex justify-center items-center gap-2 flex-wrap"},jh={key:0,class:"flex justify-center py-4"},Dh={key:1,class:"flex flex-col items-center justify-center py-8 text-center"},Nh={class:"text-red-600 text-sm font-cairo"},Bh={key:2,class:"flex flex-col items-center justify-center py-8 text-center"},Uh={key:3},Vh={class:"flex flex-col gap-2"},Hh={class:"flex items-center gap-1"},qh={class:"text-[#1A1919] text-sm font-cairo text-right leading-none"},zh={class:"flex items-center gap-1"},Kh={class:"text-[#1A1919] text-sm font-cairo"},Wh={key:0,class:"flex justify-center py-4"},Jh={key:1,class:"flex flex-col items-center justify-center py-8 text-center"},Gh={class:"text-red-600 text-sm font-cairo"},Zh={key:2,class:"flex flex-col items-center justify-center py-8 text-center"},Yh={key:3},Qh={class:"flex flex-col gap-2"},Xh={class:"flex items-center gap-1"},em={class:"text-[#1A1919] text-sm font-cairo text-right leading-none"},tm={class:"flex items-center gap-1"},sm={class:"text-[#1A1919] text-sm font-cairo"},nm=he({__name:"StatisticsCards",setup(e){const t=G(!0),s=G(null),n=G({open:0,in_progress:0,closed:0,cancelled:0}),o=G({individual:0,company:0,active:0,inactive:0}),r=le(()=>Kn()),i=le(()=>n.value.open+n.value.in_progress+n.value.closed+n.value.cancelled),l=le(()=>o.value.individual+o.value.company),c=le(()=>[{name:"مفتوحة",value:n.value.open,color:"#DA7E13"},{name:"قيد التنفيذ",value:n.value.in_progress,color:"#20B75D"},{name:"مغلقة",value:n.value.closed,color:"#6B7280"},{name:"ملغاة",value:n.value.cancelled,color:"#C12424"}]),d=le(()=>[{name:"أفراد",value:o.value.individual,color:"#DA7E13"},{name:"شركات",value:o.value.company,color:"#20B75D"},{name:"غير نشط",value:o.value.inactive,color:"#C12424"}]),u=async()=>{var f,m,y;t.value=!0,s.value=null;try{const b=r.value;if(!b)throw new Error("لا يوجد مستخدم مسجل الدخول");const v="officeId"in b?b.officeId:"system-wide";console.log("📊 Loading statistics for office:",v);const E=_s();let A={per_page:1e3},S={per_page:1e3};E==="Client"?(A.client_id=b.id,S=null):(E==="Employee"||E==="OfficeAdmin")&&"officeId"in b&&(A.office_id=b.officeId,S.office_id=b.officeId),console.log("📊 Loading statistics for role:",E,"with filters:",{casesFilter:A,clientsFilter:S});const T=await Xt.getCases(A),N=S?await Et.getClients(S):null;if(T.success&&T.data){const W=T.data;console.log("🔍 Debug: Cases data received:",W),console.log("🔍 Debug: First case sample:",W[0]);const te=W.map(Q=>{var _,ne;return((_=Q.case_status)==null?void 0:_.name_en)||((ne=Q.case_status)==null?void 0:ne.name_ar)||"Unknown"});console.log("🔍 Debug: Unique case_status name_en values:",[...new Set(te)]),n.value={open:W.filter(Q=>{var ne,pe;const _=(pe=(ne=Q.case_status)==null?void 0:ne.name_en)==null?void 0:pe.toLowerCase();return _==="open"||_==="new"||_==="pending"}).length,in_progress:W.filter(Q=>{var ne,pe;const _=(pe=(ne=Q.case_status)==null?void 0:ne.name_en)==null?void 0:pe.toLowerCase();return _==="under review"||_==="in progress"||_==="active"||_==="processing"}).length,closed:W.filter(Q=>{var ne,pe;const _=(pe=(ne=Q.case_status)==null?void 0:ne.name_en)==null?void 0:pe.toLowerCase();return _==="closed"||_==="completed"||_==="resolved"||_==="finished"}).length,cancelled:W.filter(Q=>{var ne,pe;const _=(pe=(ne=Q.case_status)==null?void 0:ne.name_en)==null?void 0:pe.toLowerCase();return _==="cancelled"||_==="canceled"||_==="rejected"||_==="dismissed"}).length},console.log("📊 Cases statistics loaded:",n.value),console.log("📊 Total cases found:",W.length)}else console.warn("⚠️ Failed to load cases statistics:",T.message);if(N&&N.success&&N.data){const W=N.data;console.log("🔍 Debug: Clients data received:",W),console.log("🔍 Debug: First client sample:",W[0]),console.log("🔍 Debug: Unique client_type values:",[...new Set(W.map(te=>te.client_type))]),console.log("🔍 Debug: Unique status values:",[...new Set(W.map(te=>te.status))]),o.value={individual:W.filter(te=>te.client_type==="individual").length,company:W.filter(te=>te.client_type==="company").length,active:W.filter(te=>te.status==="active").length,inactive:W.filter(te=>te.status==="inactive").length},console.log("📊 Clients statistics loaded:",o.value)}else N?console.warn("⚠️ Failed to load clients statistics:",N.message):(o.value={individual:0,company:0,active:0,inactive:0},console.log("📊 Client statistics reset for client user"))}catch(b){console.error("❌ Failed to load statistics:",b),(f=b.message)!=null&&f.includes("مستخدم")?s.value=b.message:((m=b.response)==null?void 0:m.status)===403?s.value="ليس لديك صلاحية لعرض إحصائيات هذا المكتب":((y=b.response)==null?void 0:y.status)>=500?s.value="خطأ في الخادم. يرجى المحاولة لاحقاً":s.value="حدث خطأ في تحميل الإحصائيات. يرجى المحاولة مرة أخرى"}finally{t.value=!1}};return Ut(()=>{u()}),(f,m)=>(R(),P("div",Fh,[X(Ys,{class:"flex-1 min-w-0 bg-white rounded border shadow-sm"},{default:Re(()=>[X(Do,{class:"pb-6"},{default:Re(()=>[X(ki,{class:"text-[#273F62] text-base font-semibold font-cairo text-right"},{default:Re(()=>m[0]||(m[0]=[Ce(" القضايا ")])),_:1,__:[0]})]),_:1}),X(Qs,{class:"pb-3"},{default:Re(()=>[t.value?(R(),P("div",jh,m[1]||(m[1]=[a("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#DA7E13]"},null,-1)]))):s.value?(R(),P("div",Dh,[m[2]||(m[2]=a("svg",{class:"w-12 h-12 text-red-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),a("p",Nh,F(s.value),1),a("button",{onClick:u,class:"mt-4 px-4 py-2 bg-[#DA7E13] text-white text-sm rounded hover:bg-[#DA7E13]/90 transition-colors"}," إعادة المحاولة ")])):i.value===0?(R(),P("div",Bh,m[3]||(m[3]=[a("svg",{class:"w-12 h-12 text-gray-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})],-1),a("p",{class:"text-gray-500 text-sm font-cairo"},"لا توجد قضايا في هذا المكتب حتى الآن",-1)]))):(R(),P("div",Uh,[X($i,{data:c.value,centerValue:i.value.toString()},null,8,["data","centerValue"]),m[4]||(m[4]=a("div",{class:"w-full h-px bg-[#BDBDBD] my-6"},null,-1)),a("div",Vh,[(R(!0),P(ve,null,Le(c.value,(y,b)=>(R(),P("div",{key:b,class:"flex justify-between items-center"},[a("div",Hh,[a("div",{class:"w-3 h-3 rounded-full",style:Bs({backgroundColor:y.color})},null,4),a("span",qh,F(y.name),1)]),a("div",zh,[a("span",Kh,F(y.value),1)])]))),128))])]))]),_:1})]),_:1}),X(Ys,{class:"flex-1 min-w-0 bg-white rounded border shadow-sm"},{default:Re(()=>[X(Do,{class:"pb-6"},{default:Re(()=>[X(ki,{class:"text-[#273F62] text-base font-semibold font-cairo text-right"},{default:Re(()=>m[5]||(m[5]=[Ce(" العملاء ")])),_:1,__:[5]})]),_:1}),X(Qs,{class:"pb-3"},{default:Re(()=>[t.value?(R(),P("div",Wh,m[6]||(m[6]=[a("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#DA7E13]"},null,-1)]))):s.value?(R(),P("div",Jh,[m[7]||(m[7]=a("svg",{class:"w-12 h-12 text-red-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),a("p",Gh,F(s.value),1),a("button",{onClick:u,class:"mt-4 px-4 py-2 bg-[#DA7E13] text-white text-sm rounded hover:bg-[#DA7E13]/90 transition-colors"}," إعادة المحاولة ")])):l.value===0?(R(),P("div",Zh,m[8]||(m[8]=[a("svg",{class:"w-12 h-12 text-gray-400 mb-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"})],-1),a("p",{class:"text-gray-500 text-sm font-cairo"},"لا يوجد عملاء في هذا المكتب حتى الآن",-1)]))):(R(),P("div",Yh,[X($i,{data:d.value,centerValue:l.value.toString()},null,8,["data","centerValue"]),m[9]||(m[9]=a("div",{class:"w-full h-px bg-[#BDBDBD] my-6"},null,-1)),a("div",Qh,[(R(!0),P(ve,null,Le(d.value,(y,b)=>(R(),P("div",{key:b,class:"flex justify-between items-center"},[a("div",Xh,[a("div",{class:"w-3 h-3 rounded-full",style:Bs({backgroundColor:y.color})},null,4),a("span",em,F(y.name),1)]),a("div",tm,[a("span",sm,F(y.value),1)])]))),128))])]))]),_:1})]),_:1})]))}}),om=Pe(nm,[["__scopeId","data-v-4a123f27"]]),rm={class:"absolute top-4 left-4"},im={class:"grid grid-cols-3 gap-x-4 gap-y-4 pt-8"},am={class:"flex-1 text-[#54524F] text-sm font-medium"},lm={class:"text-[#DA7E13] text-base font-bold"},cm=he({__name:"TaskSummary",setup(e){const t=G([{number:"05",label:"دعاوي تحت الرفع"},{number:"20",label:"جلسات الاسبوع"},{number:"02",label:"جلسة بدون قرار"},{number:"05",label:"جلسات الغد"},{number:"05",label:"دفعات الاتعاب"},{number:"05",label:"دفعات الاتعاب"},{number:"05",label:"عمل إداري"},{number:"05",label:"إجراء تنفيذي"},{number:"05",label:"علامة تجارية للتجديد"},{number:"05",label:"ترخيص شركة للتجديد"},{number:"05",label:"عمليه تحت الرفع"},{number:"05",label:"موعد طعن"},{number:"05",label:"استشارات مفتوحة"},{number:"05",label:"مراجعة الملفات"},{number:"05",label:"تقارير شهرية"}]);return(s,n)=>(R(),ct(Ys,{class:"bg-white rounded-lg shadow-sm border flex-1"},{default:Re(()=>[X(Qs,{class:"p-6 relative"},{default:Re(()=>[a("div",rm,[X(os,{variant:"outline",size:"sm",class:"w-8 h-8 border-[#273F62] text-[#273F62] hover:bg-[#273F62] hover:text-white"},{default:Re(()=>n[0]||(n[0]=[a("span",{class:"text-xs"},"⚙",-1)])),_:1,__:[0]})]),a("div",im,[(R(!0),P(ve,null,Le(t.value,(o,r)=>(R(),P("div",{key:r,class:"flex items-center gap-2 p-1"},[n[1]||(n[1]=a("span",{class:"text-[#DA7E13] text-lg font-bold"},"|",-1)),a("span",am,F(o.label),1),n[2]||(n[2]=a("span",{class:"text-[#DA7E13] text-lg font-bold"},":",-1)),a("span",lm,F(o.number),1)]))),128))])]),_:1})]),_:1}))}}),um=Pe(cm,[["__scopeId","data-v-6aecd4ef"]]),dm=he({__name:"FooterActions",setup(e){return(t,s)=>(R(),ct(Ys,{class:"bg-white rounded shadow-sm border"},{default:Re(()=>[X(Qs,{class:"flex justify-start items-center gap-4 flex-wrap py-3 px-4 pt-3"},{default:Re(()=>[X(os,{variant:"outline",class:"h-14 px-6 border-[#DA7E13] text-[#DA7E13] font-semibold text-sm font-cairo hover:bg-[#DA7E13] hover:text-white"},{default:Re(()=>s[0]||(s[0]=[a("div",{class:"w-5 h-5 ml-1.5"},[a("div",{class:"w-5 h-5 bg-[#DA7E13] rounded"})],-1),Ce(" اجندة المكتب ")])),_:1,__:[0]}),X(os,{variant:"outline",class:"h-14 px-6 border-[#DA7E13] text-[#DA7E13] font-semibold text-sm font-cairo hover:bg-[#DA7E13] hover:text-white"},{default:Re(()=>s[1]||(s[1]=[a("div",{class:"w-5 h-5 ml-1.5"},[a("div",{class:"w-5 h-5 bg-[#DA7E13] rounded"})],-1),Ce(" البوابة القانونية ")])),_:1,__:[1]})]),_:1})]),_:1}))}}),fm=Pe(dm,[["__scopeId","data-v-1bf45afd"]]),pm={class:"flex flex-col gap-3 flex-1"},hm={class:"flex flex-col gap-2 flex-1 text-right"},mm={class:"text-[#54524F] text-xs leading-relaxed"},gm={class:"flex items-center justify-end gap-3 text-xs"},vm={class:"flex items-center gap-1"},ym={class:"flex items-center gap-1"},bm={class:"text-[#9CA3AF]"},_m={class:"flex justify-between items-center p-3 bg-white border-t border-gray-100"},xm={class:"flex items-center gap-2"},wm=he({__name:"NotificationsPanel",setup(e){const t=G([{id:"1",title:"جلسة محمد علي غدا!",content:"اقتراب جلسة محمد علي في محكمة الأحوال الشخصية الرجاء الاطلاع على التفاصيل وتجهيز الأوراق اللازمة",isRead:!1,timestamp:"منذ 5 د",priority:"high"},{id:"2",title:"جلسة محمد هذا الأسبوع بعد ثلاث أيام!",content:"اقتراب جلسة محمد علي في محكمة الأحوال الشخصية الرجاء الاطلاع على التفاصيل وتجهيز الأوراق اللازمة",isRead:!0,timestamp:"منذ يومين",priority:"normal"},{id:"3",title:"تذكير بموعد مراجعة الملف",content:"يرجى مراجعة ملف القضية رقم 12345 قبل نهاية الأسبوع الحالي لإتمام الإجراءات المطلوبة",isRead:!0,timestamp:"منذ يوم",priority:"normal"},{id:"4",title:"طلب تجديد رخصة",content:"موعد انتهاء رخصة الشركة يقترب، يرجى المتابعة مع الجهات المختصة لتجديدها في الوقت المناسب",isRead:!0,timestamp:"منذ يوم",priority:"normal"},{id:"5",title:"طلب تجديد رخصة",content:"موعد انتهاء رخصة الشركة يقترب، يرجى المتابعة مع الجهات المختصة لتجديدها في الوقت المناسب",isRead:!0,timestamp:"منذ يوم",priority:"normal"}]);return(s,n)=>(R(),ct(Ys,{class:"h-full bg-white rounded-lg shadow-sm border"},{default:Re(()=>[X(Do,{class:"p-4 pb-2"},{default:Re(()=>n[0]||(n[0]=[a("div",{class:"flex items-center gap-2"},[a("span",{class:"text-lg"},"🔔"),a("h2",{class:"text-[#273F62] text-lg font-semibold"}," التنبيهات ")],-1)])),_:1,__:[0]}),X(Qs,{class:"flex flex-col gap-3 flex-1 p-4 pt-0"},{default:Re(()=>[a("div",pm,[(R(!0),P(ve,null,Le(t.value,o=>(R(),P("div",{key:o.id,class:re(`flex items-start gap-3 p-4 rounded-lg ${o.priority==="high"&&!o.isRead?"bg-[#FFE8E8] border border-[#FF6B6B]":"bg-[#F8F9FA] border border-gray-100"}`)},[a("div",{class:re(`flex items-center justify-center w-8 h-8 rounded-lg flex-shrink-0 ${o.priority==="high"&&!o.isRead?"bg-[#FEE2E2]":"bg-[#F3F4F6]"}`)},[(R(),P("svg",{class:re(["w-6 h-6",o.priority==="high"&&!o.isRead?"text-[#DC2626]":"text-[#6B7280]"]),fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},n[1]||(n[1]=[a("path",{"fill-rule":"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z","clip-rule":"evenodd"},null,-1)]),2))],2),a("div",hm,[a("h3",{class:re(`text-sm font-semibold leading-tight ${o.isRead?"text-[#6B7280]":o.priority==="high"?"text-[#DC2626]":"text-[#374151]"}`)},F(o.title),3),a("p",mm,F(o.content),1),a("div",gm,[a("div",vm,[a("div",{class:re(`w-2 h-2 rounded-full ${o.isRead?"bg-[#10B981]":"bg-[#EF4444]"}`)},null,2),a("span",{class:re(`${o.isRead?"text-[#10B981]":"text-[#EF4444]"}`)},F(o.isRead?"مقروء":"غير مقروء"),3)]),a("div",ym,[n[2]||(n[2]=a("div",{class:"w-3 h-3 bg-[#9CA3AF] rounded-sm"},null,-1)),a("span",bm,F(o.timestamp),1)])])])],2))),128))]),a("div",_m,[a("div",xm,[(R(),P(ve,null,Le([10,"...",6,5,4,3,2],o=>a("button",{key:o,class:re(`px-2 py-1 text-sm rounded ${o===1?"bg-[#DA7E13] text-white":"text-[#6B7280] hover:bg-gray-100"}`)},F(o),3)),64)),n[3]||(n[3]=a("div",{class:"px-2 py-1 text-sm bg-[#DA7E13] text-white rounded"}," 1 ",-1))]),n[4]||(n[4]=a("span",{class:"text-[#6B7280] text-sm"}," من أصل 100 صفحة ",-1))])]),_:1})]),_:1}))}}),Cm=Pe(wm,[["__scopeId","data-v-8c355aa0"]]),Em={class:"flex w-64 h-screen flex-col bg-[#273F62] text-white fixed right-0 top-0 z-20"},Sm={class:"flex w-full p-4 items-center justify-start"},Am={class:"flex flex-col flex-1 px-2"},km=["onClick"],$m={class:"flex items-center justify-start w-6"},Rm={key:0,class:"flex w-5 h-5 items-center justify-center"},Tm={class:"flex-1 text-sm font-semibold text-right px-2"},Om={class:"flex items-center justify-end w-6"},Pm={key:0,class:"mt-1 mr-4"},Im=["onClick"],Lm={class:"flex-1 text-xs font-medium text-right px-2"},Mm=he({__name:"Sidebar",props:{isCollapsed:{type:Boolean,default:!1},onToggle:{}},emits:["toggle"],setup(e,{emit:t}){const s=e,n=t,o=Cs(),r=Yd();function i(){return"/clients"}function l(){return"/cases"}const c=v=>{v.url&&!v.hasSubmenu&&(o.push(v.url),f.forEach(E=>{E.active=E===v,E.submenu&&E.submenu.forEach(A=>{A.active=!1})}))},d=v=>{v.hasSubmenu?v.expanded=!v.expanded:c(v)},u=v=>{v.url&&(o.push(v.url),f.forEach(E=>{E.active=!1,E.submenu&&E.submenu.forEach(A=>{A.active=A===v})}))},f=ws([{icon:Zp,label:"الرئيسية",active:!1,hasSubmenu:!1,expanded:!1,url:"/dashboard",roles:["SuperAdmin","OfficeAdmin","Employee","Client"]},{icon:eh,label:"إدارة الاستشارات",active:!1,hasSubmenu:!1,expanded:!1,url:null,roles:["Client","OfficeAdmin","Employee"]},{icon:th,label:"إدارة القضايا",active:!1,hasSubmenu:!1,expanded:!1,url:l(),roles:["Client","OfficeAdmin","Employee"]},{icon:sh,label:"إدارة العملاء",active:!1,hasSubmenu:!1,expanded:!1,url:i(),roles:["OfficeAdmin","Employee"]},{icon:nh,label:"إدارة الموظفين",active:!1,hasSubmenu:!0,expanded:!1,url:null,roles:["OfficeAdmin"],submenu:[{label:"ملفات الموظفين",active:!1,url:"/office/employees/files"},{label:"الصلاحيات",active:!1,url:"/office/employees/permissions"}]},{icon:oh,label:"الإعدادات",active:!1,hasSubmenu:!0,expanded:!1,url:null,roles:["SuperAdmin","OfficeAdmin"],submenu:[]}]),m=le(()=>{const v=_s();return v?f.filter(E=>E.roles.includes(v)):[]}),y=()=>{const v=r.path,E=m.value;f.forEach(A=>{A.active=!1,A.expanded=!1,A.submenu&&A.submenu.forEach(S=>{S.active=!1})}),E.forEach(A=>{if(A.url&&v===A.url){A.active=!0;return}if(A.submenu){const S=A.submenu.find(N=>N.url&&v===N.url);if(S){S.active=!0,A.expanded=!0;return}const T=A.submenu.find(N=>N.url&&v.startsWith(N.url));if(T){T.active=!0,A.expanded=!0;return}}if(v==="/dashboard"||v==="/"){const S=E.find(T=>T.label==="الرئيسية");S&&(S.active=!0)}})};kt(()=>r.path,()=>{y()}),Ut(()=>{y()});const b=()=>{s.onToggle&&s.onToggle(),n("toggle")};return(v,E)=>(R(),P("div",Em,[a("div",Sm,[X(os,{variant:"ghost",size:"sm",onClick:b,class:"text-[#F1F5FB] hover:bg-[#273F62]/80 hover:text-white p-2"},{default:Re(()=>[X(je(Qp),{className:"w-4 h-4"})]),_:1})]),E[0]||(E[0]=a("div",{class:"flex w-full p-4 py-6 flex-col justify-center items-center"},[a("div",{class:"flex w-32 h-20 justify-center items-center"},[a("div",{class:"w-28 h-16 bg-[#F1F5FB] rounded opacity-20 flex items-center justify-center text-[#273F62] text-xs font-bold"}," LOGO ")])],-1)),a("div",Am,[(R(!0),P(ve,null,Le(m.value,(A,S)=>(R(),P("div",{key:S,class:"mb-1"},[a("div",{class:re(["flex p-3 py-3 items-center w-full rounded cursor-pointer transition-colors",[A.active&&!A.hasSubmenu?"bg-[#DA7E13] text-white":"hover:bg-[#273F62]/80 text-[#F1F5FB]",A.hasSubmenu&&A.expanded?"bg-[#DA7E13] text-white":""]]),onClick:T=>d(A)},[a("div",$m,[A.icon?(R(),P("div",Rm,[(R(),ct(Ec(A.icon),{class:re(["w-4 h-4",A.active&&!A.hasSubmenu?"text-white":"text-[#F1F5FB]",A.hasSubmenu&&A.expanded?"text-white":""])},null,8,["class"]))])):ye("",!0)]),a("span",Tm,F(A.label),1),a("div",Om,[A.hasSubmenu?(R(),ct(je(Yp),{key:0,class:re(["w-4 h-4 transition-transform",A.expanded?"rotate-90":"",A.hasSubmenu&&A.expanded||A.active&&!A.hasSubmenu?"text-white":"text-[#F1F5FB]"])},null,8,["class"])):ye("",!0)])],10,km),A.hasSubmenu&&A.expanded?(R(),P("div",Pm,[(R(!0),P(ve,null,Le(A.submenu,(T,N)=>(R(),P("div",{key:N,class:re(["flex p-2 py-2 items-center w-full rounded cursor-pointer transition-colors",[T.active?"bg-[#DA7E13] text-white":"hover:bg-[#273F62]/60 text-[#F1F5FB]"]]),onClick:W=>u(T),dir:"rtl"},[a("span",Lm,F(T.label),1)],10,Im))),128))])):ye("",!0)]))),128))]),E[1]||(E[1]=a("div",{class:"flex justify-center p-4 pb-8"},[a("div",{class:"w-12 h-12 rounded-lg border border-white bg-[#F1F5FB] shadow-sm relative"},[a("div",{class:"w-6 h-6 bg-gray-300 rounded-full absolute left-3 top-3 flex items-center justify-center"},[a("div",{class:"w-4 h-4 bg-[#273F62] rounded-full"})])])],-1))]))}}),dr=Pe(Mm,[["__scopeId","data-v-37ca81b5"]]),Fm={class:"min-h-screen bg-[#F4F4F6]",dir:"rtl"},jm={class:"flex pt-16"},Dm={class:"flex gap-4 flex-1 p-2"},Nm={class:"flex-1"},Bm={class:"flex flex-col gap-4 flex-1"},Um=he({__name:"Dashboard",setup(e){const t=G(!1),s=()=>{t.value=!t.value};return(n,o)=>(R(),P("div",Fm,[X(ur,{sidebarCollapsed:t.value,onToggleSidebar:s},null,8,["sidebarCollapsed"]),a("div",jm,[X(dr,{isCollapsed:t.value,onToggle:s},null,8,["isCollapsed"]),a("div",{class:re(["flex flex-col flex-1 min-h-full transition-all duration-300",t.value?"mr-16":"mr-64"])},[X(xh),X(Sh),a("div",Dm,[a("div",Nm,[X(Cm)]),a("div",Bm,[X(om),X(um),X(fm)])])],2)])]))}}),Vm=Pe(Um,[["__scopeId","data-v-31730656"]]),Hm=he({__name:"Dashboard",setup(e){return(t,s)=>(R(),ct(Vm))}}),qm={class:"min-h-screen flex cairo-font rtl bg-[rgb(244,244,246)]"},zm={class:"w-full md:w-1/2 flex flex-col items-center justify-center px-8 py-12 md:px-16 lg:px-32"},Km={class:"w-full max-w-md space-y-6"},Wm={key:0,class:"text-red-600 text-sm text-center bg-red-50 p-3 rounded"},Jm={class:"space-y-2"},Gm={class:"relative"},Zm={class:"space-y-2"},Ym={class:"relative"},Qm=["type"],Xm={class:"flex items-center justify-between"},e0={class:"flex items-center gap-2"},t0={class:"pt-4"},s0=["disabled"],n0={key:0},o0={key:1},r0=he({__name:"Login",setup(e){const t={template:` <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"/> <circle cx="12" cy="12" r="3"/> </svg> `},s={template:` <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path fill-rule="evenodd" clip-rule="evenodd" d="M5.39889 18.601C5.06695 18.2691 5.06695 17.7309 5.39889 17.399L17.3989 5.39896C17.7308 5.06701 18.269 5.06701 18.601 5.39896C18.9329 5.7309 18.9329 6.26909 18.601 6.60104L6.60097 18.601C6.26903 18.933 5.73084 18.933 5.39889 18.601Z" fill="currentColor"></path> <path fill-rule="evenodd" clip-rule="evenodd" d="M7.66405 15.538C11.111 17.6035 15.8071 16.9326 18.5146 13.5747C19.083 12.8697 19.083 11.8403 18.5146 11.1353C17.4829 9.8557 16.1624 8.9663 14.7323 8.46982L13.0944 10.1076C13.9255 10.5139 14.498 11.3676 14.498 12.355C14.498 13.7357 13.3787 14.855 11.998 14.855C11.0106 14.855 10.1569 14.2826 9.75062 13.4515L7.66405 15.538ZM12.7587 8.03922C10.0414 7.77777 7.22711 8.82293 5.39726 11.1911C4.86758 11.8766 4.86758 12.8333 5.39726 13.5189C5.6746 13.8778 5.97456 14.2063 6.29337 14.5045L12.7587 8.03922Z" fill="currentColor"></path> </svg> `},n={template:` <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="m9 12 2 2 4-4"/> </svg> `},o=Cs(),r=G(!1),i=G(!0),l=G(!1),c=G(""),d=ws({username:"",password:""}),u=()=>{r.value=!r.value},f=()=>{i.value=!i.value},m=async()=>{if(prompt("يرجى إدخال عنوان البريد الإلكتروني:"))try{alert("سيتم إضافة وظيفة استعادة كلمة المرور قريباً")}catch(v){console.error("Forgot password error:",v),alert("حدث خطأ، يرجى المحاولة مرة أخرى")}},y=async()=>{var b,v,E,A,S,T,N,W,te;if(!d.username||!d.password){c.value="يرجى ملء جميع الحقول";return}l.value=!0,c.value="";try{const Q=await In.login({email:d.username,password:d.password,rememberMe:i.value});if((b=Q.data)!=null&&b.user&&((v=Q.data)!=null&&v.token)){const _=Q.data.user,ne={id:_.id.toString(),email:_.email,firstName:_.first_name||"User",lastName:_.last_name||"",phone:void 0,isActive:_.status==="active",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};let pe;if(_.roles&&_.roles.length>0)switch(_.roles[0].name){case"super_admin":pe={...ne,role:"SuperAdmin",permissions:"all"};break;case"office_admin":pe={...ne,role:"OfficeAdmin",officeId:((E=_.office_id)==null?void 0:E.toString())||"",office:_.office||void 0,permissions:{canManageEmployees:!0,canManageClients:!0,canManageCases:!0,canViewReports:!0}};break;case"office_employee":pe={...ne,role:"Employee",officeId:((A=_.office_id)==null?void 0:A.toString())||"",office:_.office||void 0,employeeId:_.id.toString(),position:"Employee",permissions:{canManageClients:!0,canManageCases:!0,canViewReports:!1}};break;case"client":pe={...ne,role:"Client",officeId:((S=_.office_id)==null?void 0:S.toString())||"",office:_.office||void 0,permissions:{canManageClients:!1,canManageCases:!1,canViewReports:!1}};break;default:pe={...ne,role:"Employee",officeId:((T=_.office_id)==null?void 0:T.toString())||"",office:_.office||void 0,employeeId:_.id.toString(),position:"Employee",permissions:{canManageClients:!0,canManageCases:!0,canViewReports:!1}};break}else pe={...ne,role:"Employee",officeId:((N=_.office_id)==null?void 0:N.toString())||"",office:_.office||void 0,employeeId:_.id.toString(),position:"Employee",permissions:{canManageClients:!0,canManageCases:!0,canViewReports:!1}};Xd(Q.data.token),tf(pe),console.log("✅ Login successful:",{user:pe,token:Q.data.token.substring(0,20)+"...",message:Q.data.message}),await o.push("/dashboard")}else throw new Error("Invalid response format from login API")}catch(Q){console.error("❌ Login error:",Q),Q.status===401?c.value="اسم المستخدم أو كلمة المرور غير صحيحة":Q.status===429?c.value="تم تجاوز الحد المسموح من المحاولات. يرجى المحاولة لاحقاً":Q.status>=500?c.value="خطأ في الخادم. يرجى المحاولة لاحقاً":(W=Q.message)!=null&&W.includes("Network")?c.value="خطأ في الاتصال. يرجى التأكد من الاتصال بالإنترنت":(te=Q.details)!=null&&te.message?c.value=Q.details.message:c.value="حدث خطأ غير متوقع. يرجى المحاولة مرة أخرى"}finally{l.value=!1}};return(b,v)=>(R(),P("div",qm,[a("div",zm,[v[6]||(v[6]=a("div",{class:"md:hidden mb-8"},[a("img",{src:"https://cdn.builder.io/api/v1/image/assets/TEMP/2162a79a03053e222a4cb4ad494501c5cc4ae939?width=335",alt:"Logo",class:"w-24 h-16 object-contain"})],-1)),a("div",Km,[v[5]||(v[5]=a("div",{class:"text-right"},[a("h1",{class:"text-2xl font-bold leading-[22px] text-[rgb(39,63,98)]"}," تسجيل الدخول ")],-1)),c.value?(R(),P("div",Wm,F(c.value),1)):ye("",!0),a("form",{onSubmit:Ws(y,["prevent"]),class:"space-y-6"},[a("div",Jm,[v[2]||(v[2]=a("div",{class:"text-right"},[a("label",{class:"text-sm font-bold leading-[21.7px] text-[rgb(39,63,98)]"}," اسم المستخدم ")],-1)),a("div",Gm,[ge(a("input",{"onUpdate:modelValue":v[0]||(v[0]=E=>d.username=E),type:"text",placeholder:"رقم الهاتف او البريد",class:"h-12 px-2 text-right border border-[rgb(39,63,98)] rounded placeholder:text-[rgb(160,161,163)] text-sm leading-[21.7px] font-normal w-full focus:outline-none focus:ring-2 focus:ring-[rgb(39,63,98)] focus:border-transparent bg-white",dir:"rtl",required:""},null,512),[[Be,d.username]])])]),a("div",Zm,[v[3]||(v[3]=a("div",{class:"text-right"},[a("label",{class:"text-sm font-bold leading-[21.7px] text-[rgb(39,63,98)]"}," كلمة المرور ")],-1)),a("div",Ym,[ge(a("input",{"onUpdate:modelValue":v[1]||(v[1]=E=>d.password=E),type:r.value?"text":"password",class:"h-12 px-2 pr-12 text-right border border-[rgb(39,63,98)] rounded text-sm leading-[21.7px] font-normal w-full focus:outline-none focus:ring-2 focus:ring-[rgb(39,63,98)] focus:border-transparent bg-white",dir:"rtl",required:""},null,8,Qm),[[Iu,d.password]]),a("button",{type:"button",onClick:u,class:"absolute right-2 top-1/2 transform -translate-y-1/2 p-1 text-[rgb(39,63,98)] hover:text-[rgba(39,63,98,0.8)] transition-colors"},[r.value?(R(),ct(t,{key:1,class:"h-6 w-6"})):(R(),ct(s,{key:0,class:"h-6 w-6"}))])])]),a("div",Xm,[a("a",{href:"#",class:"text-xs underline leading-[18.6px] font-normal text-[rgb(39,63,98)] hover:text-[rgba(39,63,98,0.8)] transition-colors",onClick:Ws(m,["prevent"])}," نسيت كلمة المرور؟ "),a("div",e0,[v[4]||(v[4]=a("span",{class:"text-xs leading-[18.6px] font-normal text-[rgb(73,75,79)]"}," تذكرني ",-1)),a("button",{type:"button",onClick:f,class:re(["h-5 w-5 border border-[rgb(39,63,98)] rounded-sm flex items-center justify-center transition-colors",{"bg-[rgb(218,126,19)] border-[rgb(218,126,19)]":i.value,"bg-transparent":!i.value}])},[i.value?(R(),ct(n,{key:0,class:"h-4 w-4 text-white"})):ye("",!0)],2)])]),a("div",t0,[a("button",{type:"submit",disabled:l.value,class:"w-full h-14 text-sm font-bold leading-6 uppercase rounded shadow-sm bg-[rgb(39,63,98)] text-[rgb(244,244,246)] hover:bg-[rgba(39,63,98,0.9)] transition-colors disabled:opacity-50 disabled:cursor-not-allowed"},[l.value?(R(),P("span",o0,"جاري التحميل...")):(R(),P("span",n0,"تسجيل دخول"))],8,s0)])],32)])]),v[7]||(v[7]=Ft('<div class="hidden md:flex md:w-1/2 relative" data-v-64ca17a9><div class="absolute inset-0 bg-cover bg-center bg-no-repeat" style="background-image:linear-gradient(rgba(39, 63, 98, 0.8), rgba(39, 63, 98, 0.8)), url('https://cdn.builder.io/api/v1/image/assets/TEMP/0a536c2eecd6a2cb890c2b4d8c2fc35205ae6029?width=1440');" data-v-64ca17a9><div class="flex items-center justify-center h-full px-12" data-v-64ca17a9><div class="flex flex-col items-center gap-3 w-[338px]" data-v-64ca17a9><div class="flex items-center justify-center w-[196.727px] h-[158.438px] p-[21.125px_14.523px]" data-v-64ca17a9><img src="https://cdn.builder.io/api/v1/image/assets/TEMP/2162a79a03053e222a4cb4ad494501c5cc4ae939?width=335" alt="Logo" class="w-[168px] h-[116px] object-contain" data-v-64ca17a9></div></div></div></div></div>',1))]))}}),i0=Pe(r0,[["__scopeId","data-v-64ca17a9"]]),a0={class:"min-h-screen flex flex-col justify-center items-center bg-gray-50"},l0={class:"text-center"},c0={class:"flex flex-col sm:flex-row gap-4 justify-center items-center"},u0=he({__name:"NotFound",setup(e){const t=Cs(),s=()=>{window.history.length>1?t.go(-1):t.push("/dashboard")};return(n,o)=>{const r=la("router-link");return R(),P("div",a0,[a("div",l0,[o[2]||(o[2]=Ft('<div class="mb-8" data-v-f3de7071><h1 class="text-9xl font-bold text-gray-200" data-v-f3de7071>404</h1></div><div class="mb-8" data-v-f3de7071><h2 class="text-3xl font-bold text-gray-900 mb-2" data-v-f3de7071> Page Not Found </h2><p class="text-lg text-gray-600 mb-4" data-v-f3de7071> Sorry, we couldn't find the page you're looking for. </p><p class="text-sm text-gray-500" data-v-f3de7071> The page might have been moved, deleted, or you entered the wrong URL. </p></div>',2)),a("div",c0,[a("button",{onClick:s,class:"inline-flex items-center px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},o[0]||(o[0]=[a("svg",{class:"mr-2 -ml-1 w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 19l-7-7m0 0l7-7m-7 7h18"})],-1),Ce(" Go Back ")])),X(r,{to:"/dashboard",class:"inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},{default:Re(()=>o[1]||(o[1]=[a("svg",{class:"mr-2 -ml-1 w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})],-1),Ce(" Go to Dashboard ")])),_:1,__:[1]})])]),o[3]||(o[3]=Ft('<div class="mt-12 max-w-lg text-center" data-v-f3de7071><div class="text-gray-400" data-v-f3de7071><svg class="mx-auto h-12 w-12" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-f3de7071><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M9.172 16.172a4 4 0 015.656 0M9 12h6m-6-4h6m2 5.291A7.962 7.962 0 0112 20a7.962 7.962 0 01-5-1.709M15 11V9a6 6 0 00-12 0v2c0 .558.45 1.01 1.006 1.051L9.5 17.5" data-v-f3de7071></path></svg></div><p class="mt-2 text-sm text-gray-500" data-v-f3de7071> If you believe this is an error, please contact the system administrator. </p></div>',1))])}}}),d0=Pe(u0,[["__scopeId","data-v-f3de7071"]]),f0={class:"offices-management"},p0={class:"stats-grid grid grid-cols-1 md:grid-cols-4 gap-6 mb-8"},h0={class:"stat-card bg-white p-6 rounded-lg shadow"},m0={class:"text-3xl font-bold text-blue-600"},g0={class:"stat-card bg-white p-6 rounded-lg shadow"},v0={class:"text-3xl font-bold text-green-600"},y0={class:"stat-card bg-white p-6 rounded-lg shadow"},b0={class:"text-3xl font-bold text-purple-600"},_0={class:"stat-card bg-white p-6 rounded-lg shadow"},x0={class:"text-3xl font-bold text-orange-600"},w0={class:"filters-section bg-white p-6 rounded-lg shadow mb-6"},C0={class:"flex flex-wrap gap-4"},E0={class:"offices-table bg-white rounded-lg shadow"},S0={class:"table-container"},A0={class:"w-full"},k0={class:"divide-y divide-gray-200"},$0={class:"px-6 py-4"},R0={class:"font-medium text-gray-900"},T0={class:"text-sm text-gray-500"},O0={class:"px-6 py-4"},P0={class:"text-sm text-gray-900"},I0={class:"text-sm text-gray-500"},L0={class:"px-6 py-4"},M0={class:"text-sm text-gray-900"},F0={class:"px-6 py-4"},j0={class:"text-sm text-gray-900"},D0={class:"px-6 py-4"},N0={class:"pagination flex justify-between items-center mt-6"},B0={class:"text-sm text-gray-700"},U0={class:"flex space-x-2"},V0=["disabled"],H0=["disabled"],q0=he({__name:"Offices",setup(e){const t=G(""),s=G(""),n=G(1),o=G(10),r=G(0),i=G({totalOffices:0,activeOffices:0,totalEmployees:0,totalRevenue:0}),l=G([]),c=le(()=>{let b=l.value;return t.value&&(b=b.filter(v=>v.name.toLowerCase().includes(t.value.toLowerCase())||v.address.city.toLowerCase().includes(t.value.toLowerCase()))),s.value&&(b=b.filter(v=>s.value==="active"?v.isActive:!v.isActive)),b}),d=le(()=>Math.ceil(r.value/o.value)),u=async()=>{try{l.value=[{id:"1",name:"Johnson & Associates",address:{city:"New York",state:"NY",street:"123 Main St",zipCode:"10001",country:"USA"},phone:"555-0123",email:"contact@johnson-law.com",registrationNumber:"REG001",limits:{maxEmployees:50,maxClients:200,maxCases:100},currentCounts:{employees:25,clients:150,cases:75},adminId:"admin1",admin:{firstName:"John",lastName:"Johnson",email:"john@johnson-law.com"},isActive:!0,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}],i.value={totalOffices:12,activeOffices:10,totalEmployees:150,totalRevenue:25e5},r.value=l.value.length}catch(b){console.error("Failed to load offices:",b)}},f=()=>{n.value=1},m=()=>{n.value>1&&(n.value--,u())},y=()=>{n.value<d.value&&(n.value++,u())};return Ut(()=>{u()}),(b,v)=>(R(),P("div",f0,[v[9]||(v[9]=a("div",{class:"page-header flex justify-between items-center mb-8"},[a("div",null,[a("h1",{class:"text-3xl font-bold text-gray-900"},"Office Management"),a("p",{class:"text-gray-600"},"Manage all law offices in the system")]),a("button",{class:"btn-primary bg-blue-600 text-white px-6 py-2 rounded-lg hover:bg-blue-700"}," Create New Office ")],-1)),a("div",p0,[a("div",h0,[v[2]||(v[2]=a("h3",{class:"text-lg font-semibold text-gray-700"},"Total Offices",-1)),a("p",m0,F(i.value.totalOffices),1)]),a("div",g0,[v[3]||(v[3]=a("h3",{class:"text-lg font-semibold text-gray-700"},"Active Offices",-1)),a("p",v0,F(i.value.activeOffices),1)]),a("div",y0,[v[4]||(v[4]=a("h3",{class:"text-lg font-semibold text-gray-700"},"Total Employees",-1)),a("p",b0,F(i.value.totalEmployees),1)]),a("div",_0,[v[5]||(v[5]=a("h3",{class:"text-lg font-semibold text-gray-700"},"Total Revenue",-1)),a("p",x0,"$"+F(i.value.totalRevenue),1)])]),a("div",w0,[a("div",C0,[ge(a("input",{type:"text","onUpdate:modelValue":v[0]||(v[0]=E=>t.value=E),placeholder:"Search offices...",class:"form-input px-4 py-2 border border-gray-300 rounded-lg"},null,512),[[Be,t.value]]),ge(a("select",{"onUpdate:modelValue":v[1]||(v[1]=E=>s.value=E),class:"form-select px-4 py-2 border border-gray-300 rounded-lg"},v[6]||(v[6]=[a("option",{value:""},"All Status",-1),a("option",{value:"active"},"Active",-1),a("option",{value:"inactive"},"Inactive",-1)]),512),[[Ye,s.value]]),a("button",{onClick:f,class:"btn-secondary bg-gray-600 text-white px-4 py-2 rounded-lg"}," Apply Filters ")])]),a("div",E0,[a("div",S0,[a("table",A0,[v[8]||(v[8]=a("thead",{class:"bg-gray-50"},[a("tr",null,[a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Office"),a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Admin"),a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Employees"),a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Clients"),a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Status"),a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Actions")])],-1)),a("tbody",k0,[(R(!0),P(ve,null,Le(c.value,E=>{var A,S,T;return R(),P("tr",{key:E.id,class:"hover:bg-gray-50"},[a("td",$0,[a("div",null,[a("div",R0,F(E.name),1),a("div",T0,F(E.address.city)+", "+F(E.address.state),1)])]),a("td",O0,[a("div",P0,F((A=E.admin)==null?void 0:A.firstName)+" "+F((S=E.admin)==null?void 0:S.lastName),1),a("div",I0,F((T=E.admin)==null?void 0:T.email),1)]),a("td",L0,[a("span",M0,F(E.currentCounts.employees)+"/"+F(E.limits.maxEmployees),1)]),a("td",F0,[a("span",j0,F(E.currentCounts.clients)+"/"+F(E.limits.maxClients),1)]),a("td",D0,[a("span",{class:re([E.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800","px-2 py-1 text-xs font-medium rounded-full"])},F(E.isActive?"Active":"Inactive"),3)]),v[7]||(v[7]=a("td",{class:"px-6 py-4"},[a("div",{class:"flex space-x-2"},[a("button",{class:"text-blue-600 hover:text-blue-900 text-sm"},"Edit"),a("button",{class:"text-green-600 hover:text-green-900 text-sm"},"View"),a("button",{class:"text-red-600 hover:text-red-900 text-sm"},"Delete")])],-1))])}),128))])])])]),a("div",N0,[a("div",B0," Showing "+F((n.value-1)*o.value+1)+" to "+F(Math.min(n.value*o.value,r.value))+" of "+F(r.value)+" results ",1),a("div",U0,[a("button",{onClick:m,disabled:n.value===1,class:"px-3 py-1 border rounded text-sm"},"Previous",8,V0),a("button",{onClick:y,disabled:n.value>=d.value,class:"px-3 py-1 border rounded text-sm"},"Next",8,H0)])])]))}}),z0=Pe(q0,[["__scopeId","data-v-bdcf34e0"]]),K0={class:"admins-management"},W0={class:"stats-grid grid grid-cols-1 md:grid-cols-4 gap-6 mb-8"},J0={class:"stat-card bg-white p-6 rounded-lg shadow"},G0={class:"text-3xl font-bold text-blue-600"},Z0={class:"stat-card bg-white p-6 rounded-lg shadow"},Y0={class:"text-3xl font-bold text-green-600"},Q0={class:"stat-card bg-white p-6 rounded-lg shadow"},X0={class:"text-3xl font-bold text-purple-600"},eg={class:"stat-card bg-white p-6 rounded-lg shadow"},tg={class:"text-3xl font-bold text-orange-600"},sg={class:"filters-section bg-white p-6 rounded-lg shadow mb-6"},ng={class:"flex flex-wrap gap-4"},og=["value"],rg={class:"admins-table bg-white rounded-lg shadow"},ig={class:"table-container"},ag={class:"w-full"},lg={class:"divide-y divide-gray-200"},cg={class:"px-6 py-4"},ug={class:"flex items-center"},dg={class:"h-10 w-10 bg-gray-300 rounded-full flex items-center justify-center"},fg={class:"text-sm font-medium text-gray-700"},pg={class:"ml-4"},hg={class:"font-medium text-gray-900"},mg={class:"text-sm text-gray-500"},gg={class:"px-6 py-4"},vg={class:"text-sm text-gray-900"},yg={class:"text-sm text-gray-500"},bg={class:"px-6 py-4"},_g={class:"text-sm text-gray-900"},xg={class:"px-6 py-4"},wg={class:"text-sm text-gray-900"},Cg={class:"px-6 py-4"},Eg={class:"text-sm text-gray-900"},Sg={class:"px-6 py-4"},Ag={class:"pagination flex justify-between items-center mt-6"},kg={class:"text-sm text-gray-700"},$g={class:"flex space-x-2"},Rg=["disabled"],Tg=["disabled"],Og=he({__name:"Admins",setup(e){const t=G(""),s=G(""),n=G(""),o=G(1),r=G(10),i=G(0),l=G({totalAdmins:0,activeAdmins:0,officesManaged:0,pendingAssignments:0}),c=G([]),d=G([]),u=le(()=>{let A=c.value;return t.value&&(A=A.filter(S=>`${S.firstName} ${S.lastName}`.toLowerCase().includes(t.value.toLowerCase())||S.email.toLowerCase().includes(t.value.toLowerCase()))),s.value&&(A=A.filter(S=>S.officeId===s.value)),n.value&&(A=A.filter(S=>n.value==="active"?S.isActive:!S.isActive)),A}),f=le(()=>Math.ceil(i.value/r.value)),m=async()=>{try{c.value=[{id:"1",email:"john.doe@johnson-law.com",firstName:"John",lastName:"Doe",phone:"555-0123",isActive:!0,role:"OfficeAdmin",officeId:"1",office:{name:"Johnson & Associates",address:{city:"New York",state:"NY"},currentCounts:{employees:25,clients:150,cases:75}},permissions:{canManageEmployees:!0,canManageClients:!0,canManageCases:!0,canViewReports:!0},createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}],l.value={totalAdmins:12,activeAdmins:10,officesManaged:10,pendingAssignments:2},i.value=c.value.length}catch(A){console.error("Failed to load admins:",A)}},y=async()=>{try{d.value=[{id:"1",name:"Johnson & Associates"},{id:"2",name:"Smith Legal Group"}]}catch(A){console.error("Failed to load offices:",A)}},b=()=>{o.value=1},v=()=>{o.value>1&&(o.value--,m())},E=()=>{o.value<f.value&&(o.value++,m())};return Ut(()=>{m(),y()}),(A,S)=>(R(),P("div",K0,[S[11]||(S[11]=a("div",{class:"page-header flex justify-between items-center mb-8"},[a("div",null,[a("h1",{class:"text-3xl font-bold text-gray-900"},"Office Admins Management"),a("p",{class:"text-gray-600"},"Manage office administrators across all offices")]),a("button",{class:"btn-primary bg-blue-600 text-white px-6 py-2 rounded-lg hover:bg-blue-700"}," Create New Admin ")],-1)),a("div",W0,[a("div",J0,[S[3]||(S[3]=a("h3",{class:"text-lg font-semibold text-gray-700"},"Total Admins",-1)),a("p",G0,F(l.value.totalAdmins),1)]),a("div",Z0,[S[4]||(S[4]=a("h3",{class:"text-lg font-semibold text-gray-700"},"Active Admins",-1)),a("p",Y0,F(l.value.activeAdmins),1)]),a("div",Q0,[S[5]||(S[5]=a("h3",{class:"text-lg font-semibold text-gray-700"},"Offices Managed",-1)),a("p",X0,F(l.value.officesManaged),1)]),a("div",eg,[S[6]||(S[6]=a("h3",{class:"text-lg font-semibold text-gray-700"},"Pending Assignments",-1)),a("p",tg,F(l.value.pendingAssignments),1)])]),a("div",sg,[a("div",ng,[ge(a("input",{type:"text","onUpdate:modelValue":S[0]||(S[0]=T=>t.value=T),placeholder:"Search admins...",class:"form-input px-4 py-2 border border-gray-300 rounded-lg"},null,512),[[Be,t.value]]),ge(a("select",{"onUpdate:modelValue":S[1]||(S[1]=T=>s.value=T),class:"form-select px-4 py-2 border border-gray-300 rounded-lg"},[S[7]||(S[7]=a("option",{value:""},"All Offices",-1)),(R(!0),P(ve,null,Le(d.value,T=>(R(),P("option",{key:T.id,value:T.id},F(T.name),9,og))),128))],512),[[Ye,s.value]]),ge(a("select",{"onUpdate:modelValue":S[2]||(S[2]=T=>n.value=T),class:"form-select px-4 py-2 border border-gray-300 rounded-lg"},S[8]||(S[8]=[a("option",{value:""},"All Status",-1),a("option",{value:"active"},"Active",-1),a("option",{value:"inactive"},"Inactive",-1)]),512),[[Ye,n.value]]),a("button",{onClick:b,class:"btn-secondary bg-gray-600 text-white px-4 py-2 rounded-lg"}," Apply Filters ")])]),a("div",rg,[a("div",ig,[a("table",ag,[S[10]||(S[10]=a("thead",{class:"bg-gray-50"},[a("tr",null,[a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Admin"),a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Office"),a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Employees"),a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Clients"),a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Cases"),a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Status"),a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Actions")])],-1)),a("tbody",lg,[(R(!0),P(ve,null,Le(u.value,T=>{var N,W,te,Q,_,ne;return R(),P("tr",{key:T.id,class:"hover:bg-gray-50"},[a("td",cg,[a("div",ug,[a("div",dg,[a("span",fg,F(T.firstName.charAt(0))+F(T.lastName.charAt(0)),1)]),a("div",pg,[a("div",hg,F(T.firstName)+" "+F(T.lastName),1),a("div",mg,F(T.email),1)])])]),a("td",gg,[a("div",vg,F(((N=T.office)==null?void 0:N.name)||"Unassigned"),1),a("div",yg,F((W=T.office)==null?void 0:W.address.city)+", "+F((te=T.office)==null?void 0:te.address.state),1)]),a("td",bg,[a("span",_g,F(((Q=T.office)==null?void 0:Q.currentCounts.employees)||0),1)]),a("td",xg,[a("span",wg,F(((_=T.office)==null?void 0:_.currentCounts.clients)||0),1)]),a("td",Cg,[a("span",Eg,F(((ne=T.office)==null?void 0:ne.currentCounts.cases)||0),1)]),a("td",Sg,[a("span",{class:re([T.isActive?"bg-green-100 text-green-800":"bg-red-100 text-red-800","px-2 py-1 text-xs font-medium rounded-full"])},F(T.isActive?"Active":"Inactive"),3)]),S[9]||(S[9]=a("td",{class:"px-6 py-4"},[a("div",{class:"flex space-x-2"},[a("button",{class:"text-blue-600 hover:text-blue-900 text-sm"},"Edit"),a("button",{class:"text-green-600 hover:text-green-900 text-sm"},"View"),a("button",{class:"text-purple-600 hover:text-purple-900 text-sm"},"Permissions"),a("button",{class:"text-red-600 hover:text-red-900 text-sm"},"Delete")])],-1))])}),128))])])])]),a("div",Ag,[a("div",kg," Showing "+F((o.value-1)*r.value+1)+" to "+F(Math.min(o.value*r.value,i.value))+" of "+F(i.value)+" results ",1),a("div",$g,[a("button",{onClick:v,disabled:o.value===1,class:"px-3 py-1 border rounded text-sm"},"Previous",8,Rg),a("button",{onClick:E,disabled:o.value>=f.value,class:"px-3 py-1 border rounded text-sm"},"Next",8,Tg)])])]))}}),Pg=Pe(Og,[["__scopeId","data-v-8f5df1e3"]]),Ig={class:"flex items-center gap-3"},Lg={class:"flex-shrink-0"},Mg={key:0,class:"w-6 h-6 text-red-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Fg={key:1,class:"w-6 h-6 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},jg={key:2,class:"w-6 h-6 text-yellow-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Dg={key:3,class:"w-6 h-6 text-blue-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Ng={class:"px-6 py-4",dir:"rtl"},Bg={class:"text-gray-700 text-sm leading-relaxed"},Ug={class:"flex items-center justify-end gap-3 px-6 py-4 bg-gray-50 border-t border-gray-200"},Vg=he({__name:"AlertModal",props:{isVisible:{type:Boolean},type:{default:"info"},title:{default:""},message:{},confirmText:{default:"حسناً"},showCancel:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!1},autoCloseDelay:{default:3e3}},emits:["close","confirm"],setup(e,{emit:t}){const s=e,n=t,o=le(()=>["animate-in","fade-in","zoom-in-95","duration-200"].join(" ")),r=le(()=>{switch(s.type){case"error":return"border-b border-red-200 bg-red-50";case"success":return"border-b border-green-200 bg-green-50";case"warning":return"border-b border-yellow-200 bg-yellow-50";default:return"border-b border-blue-200 bg-blue-50"}}),i=le(()=>{switch(s.type){case"error":return"text-red-800";case"success":return"text-green-800";case"warning":return"text-yellow-800";default:return"text-blue-800"}}),l=le(()=>{switch(s.type){case"error":return"bg-red-600 text-white hover:bg-red-700";case"success":return"bg-green-600 text-white hover:bg-green-700";case"warning":return"bg-yellow-600 text-white hover:bg-yellow-700";default:return"bg-blue-600 text-white hover:bg-blue-700"}}),c=le(()=>{if(s.title)return s.title;switch(s.type){case"error":return"خطأ";case"success":return"نجح";case"warning":return"تحذير";default:return"معلومات"}}),d=()=>{n("close")},u=()=>{n("confirm"),n("close")};return s.autoClose&&s.isVisible&&setTimeout(()=>{s.isVisible&&d()},s.autoCloseDelay),(f,m)=>f.isVisible?(R(),P("div",{key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-[60]",onClick:d},[a("div",{class:re(["bg-white rounded-lg shadow-xl w-full max-w-md mx-4 overflow-hidden",o.value]),onClick:m[0]||(m[0]=Ws(()=>{},["stop"]))},[a("div",{class:re(["flex items-center justify-between px-6 py-4",r.value])},[a("div",Ig,[a("div",Lg,[f.type==="error"?(R(),P("svg",Mg,m[1]||(m[1]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"},null,-1)]))):f.type==="success"?(R(),P("svg",Fg,m[2]||(m[2]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)]))):f.type==="warning"?(R(),P("svg",jg,m[3]||(m[3]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"},null,-1)]))):(R(),P("svg",Dg,m[4]||(m[4]=[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"},null,-1)])))]),a("h3",{class:re(["text-lg font-semibold",i.value])},F(c.value),3)]),a("button",{onClick:d,class:"text-gray-400 hover:text-gray-600 text-2xl leading-none"}," × ")],2),a("div",Ng,[a("p",Bg,F(f.message),1)]),a("div",Ug,[f.showCancel?(R(),P("button",{key:0,onClick:d,class:"px-4 py-2 text-sm text-gray-600 border border-gray-300 rounded hover:bg-gray-100 transition-colors"}," إلغاء ")):ye("",!0),a("button",{onClick:u,class:re([l.value,"px-4 py-2 text-sm font-medium rounded transition-colors"])},F(f.confirmText),3)])],2)])):ye("",!0)}}),wn=Pe(Vg,[["__scopeId","data-v-95d8573a"]]),Hg={class:"flex items-center justify-between px-6 py-4 border-b border-gray-200"},qg={class:"text-lg font-semibold text-[#54524F]"},zg={class:"p-6"},Kg={key:0,class:"flex items-center justify-center py-12"},Wg={key:1,class:"text-center py-12"},Jg={class:"text-red-600 mb-4"},Gg={key:2,class:"flex items-center justify-center py-12"},Zg={class:"grid grid-cols-1 md:grid-cols-3 gap-4"},Yg=["readonly"],Qg={key:0,class:"text-red-500 text-xs mt-1"},Xg={key:0,class:"text-red-500 text-xs mt-1"},e1=["value"],t1={key:0,class:"text-red-500 text-xs mt-1"},s1={class:"grid grid-cols-1 md:grid-cols-3 gap-4"},n1=["value"],o1={key:0,class:"text-red-500 text-xs mt-1"},r1={key:0,class:"text-red-500 text-xs mt-1"},i1={key:0,class:"text-red-500 text-xs mt-1"},a1={class:"grid grid-cols-1 md:grid-cols-3 gap-4"},l1={class:"relative"},c1=["value"],u1={key:0,class:"text-red-500 text-xs mt-1"},d1=["value"],f1={key:0,class:"text-red-500 text-xs mt-1"},p1=["value"],h1={key:0,class:"text-red-500 text-xs mt-1"},m1={class:"grid grid-cols-1 md:grid-cols-3 gap-4"},g1={key:0,class:"text-red-500 text-xs mt-1"},v1=["value"],y1={key:0,class:"text-red-500 text-xs mt-1"},b1={class:"grid grid-cols-1 md:grid-cols-3 gap-4"},_1=["value"],x1={key:0,class:"text-red-500 text-xs mt-1"},w1={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},C1={class:"flex items-center gap-3"},E1={class:"flex items-center gap-2 cursor-pointer"},S1={class:"relative"},A1={key:0,class:"absolute top-0.5 left-0.5 w-3 h-3 text-white",fill:"currentColor",viewBox:"0 0 20 20"},k1={class:"flex items-center gap-3"},$1={class:"flex items-center gap-2 cursor-pointer"},R1={class:"relative"},T1={key:0,class:"absolute top-0.5 left-0.5 w-3 h-3 text-white",fill:"currentColor",viewBox:"0 0 20 20"},O1={class:"grid grid-cols-1 md:grid-cols-3 gap-4"},P1={class:"block text-sm text-gray-500 mb-1"},I1={key:0,class:"text-red-500"},L1={class:"relative"},M1=["value"],F1=["required"],j1={key:0,class:"text-red-500 text-xs mt-1"},D1={class:"block text-sm text-gray-500 mb-1"},N1={key:0,class:"text-red-500"},B1=["required"],U1={key:0,class:"text-red-500 text-xs mt-1"},V1={class:"block text-sm text-gray-500 mb-1"},H1={key:0,class:"text-red-500"},q1=["required"],z1={key:0,class:"text-red-500 text-xs mt-1"},K1={class:"flex items-center gap-4 p-6 border-t border-gray-200"},W1=["disabled"],J1={key:0,class:"animate-spin rounded-full h-4 w-4 border-b-2 border-white"},G1={key:1,class:"w-4 h-4 fill-current",viewBox:"0 0 24 24"},Z1=he({__name:"EmployeeFormModal",props:{isVisible:{type:Boolean},employeeId:{default:null},mode:{default:"add"}},emits:["close","success","error"],setup(e,{emit:t}){const s=e,n=t,o=G(!1),r=G(!1),i=G(""),l=G(!1),c=G(null),d=G({}),u=G({}),f=G({show:!1,type:"info",title:"",message:"",confirmText:"حسناً",showCancel:!1,onConfirm:void 0}),m=G(null),y=G({send_credentials:!1,create_user_account:!1}),b=le(()=>s.mode==="edit"&&s.employeeId),v=le(()=>{var p,U;const L=(U=(p=c.value)==null?void 0:p.lookup_options)==null?void 0:U.countries;return L&&L.length>0?L[0].phone_prefix:"+966"}),E=()=>{if(!m.value||!b.value)return{};const L={},p=_.value,U=m.value;p.name_ar!==U.name_ar&&(L.name_ar=p.name_ar),p.name_en!==U.name_en&&(L.name_en=p.name_en),p.email!==U.email&&(L.email=p.email);const J=(p.phone_prefix||v.value)+(p.phone||"");return J!==U.phone&&(L.phone=J),p.civil_id!==U.civil_id&&(L.civil_id=p.civil_id),p.nationality_id!==U.nationality_id&&(L.nationality_id=p.nationality_id),p.country_id!==U.country_id&&(L.country_id=p.country_id),p.city_id!==U.city_id&&(L.city_id=p.city_id),p.region!==U.region&&(L.region=p.region),p.building_number!==U.building_number&&(L.building_number=p.building_number),p.street!==U.street&&(L.street=p.street),p.apartment_number!==U.apartment_number&&(L.apartment_number=p.apartment_number),p.job_title_id!==U.job_title_id&&(L.job_title_id=p.job_title_id),p.branch_id!==U.branch_id&&(L.branch_id=p.branch_id),p.status!==U.status&&(L.status=p.status),p.role_id!==U.role_id&&(L.role_id=p.role_id),L},A=le(()=>{var L,p;return(p=(L=c.value)==null?void 0:L.lookup_options)!=null&&p.cities?_.value.country_id?c.value.lookup_options.cities.filter(U=>{var J,Oe;return((J=U.country_id)==null?void 0:J.toString())===((Oe=_.value.country_id)==null?void 0:Oe.toString())||!U.country_id}):c.value.lookup_options.cities:[]}),S=(L,p)=>{let U="";switch(L){case"employee_code":(!p||!p.toString().trim())&&(U="كود الموظف مطلوب");break;case"name_ar":(!p||!p.toString().trim())&&(U="الاسم بالعربي مطلوب");break;case"branch_id":(!p||!p.toString().trim())&&(U="الفرع مطلوب");break;case"job_title_id":(!p||!p.toString().trim())&&(U="المسمى الوظيفي مطلوب");break;case"civil_id":(!p||!p.toString().trim())&&(U="الرقم المدني مطلوب");break;case"email":!p||!p.toString().trim()?U="البريد الالكتروني مطلوب":/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(p)||(U="البريد الالكتروني غير صالح");break;case"phone":!p||!p.toString().trim()?U="رقم الجوال مطلوب":/^\d{8,15}$/.test(p.toString().replace(/\s/g,""))||(U="رقم الجوال غير صالح (يجب أن يحتوي على 8-15 رقم)");break;case"confirm_phone":if(!ne.value&&(!p||!p.toString().trim()))break;!p||!p.toString().trim()?U="تأكيد رقم الجوال مطلوب":p!==_.value.phone&&(U="أرقام الجوال غير متطابقة");break;case"nationality_id":(!p||!p.toString().trim())&&(U="الجنسية مطلوبة");break;case"country_id":(!p||!p.toString().trim())&&(U="الدولة مطلوبة");break;case"region":(!p||!p.toString().trim())&&(U="المنطقة مطلوبة");break;case"city_id":(!p||!p.toString().trim())&&(U="المدينة مطلوبة");break;case"role_id":(!p||!p.toString().trim())&&(U="الصلاحية مطلوبة");break;case"password":if(!ne.value&&(!p||!p.toString().trim()))break;!p||!p.toString().trim()?U="كلمة المرور مطلوبة":p.length<6&&(U="كلمة المرور يجب أن تحتوي على 6 أحرف على الأقل");break;case"confirm_password":if(!ne.value&&!_.value.password)break;!p||!p.toString().trim()?U="تأكيد كلمة المرور مطلوب":p!==_.value.password&&(U="كلمات المرور غير متطابقة");break}return U?d.value[L]=U:delete d.value[L],!U},T=()=>{let L=["employee_code","name_ar","branch_id","job_title_id","civil_id","email","phone","nationality_id","country_id","region","city_id","role_id"];ne.value&&L.push("password","confirm_password","confirm_phone");let p=!0;return L.forEach(U=>{const J=_.value[U];S(U,J)||(p=!1),u.value[U]=!0}),p},N=L=>{u.value[L]=!0;const p=_.value[L];S(L,p)},W=(L,p="info",U,J)=>{f.value={show:!0,type:p,title:U||"",message:L,confirmText:(J==null?void 0:J.confirmText)||"حسناً",showCancel:(J==null?void 0:J.showCancel)||!1,onConfirm:J==null?void 0:J.onConfirm}},te=()=>{f.value.show=!1,f.value.onConfirm=void 0},Q=()=>{f.value.onConfirm&&f.value.onConfirm(),te()},_=G({name_ar:"",name_en:"",email:"",phone:"",civil_id:"",nationality_id:"",country_id:"",city_id:"",region:"",building_number:"",street:"",apartment_number:"",job_title_id:"",branch_id:"",status:!0,create_user_account:!1,send_credentials:!1,role_id:"",password:"",password_confirmation:"",employee_code:"",phone_prefix:v.value,confirm_phone_prefix:v.value,confirm_phone:"",confirm_password:""}),ne=le(()=>{if(b.value){const L=!y.value.send_credentials&&_.value.send_credentials,p=!y.value.create_user_account&&_.value.create_user_account;return L||p}else return _.value.send_credentials||_.value.create_user_account});kt(()=>_.value.send_credentials,L=>{L&&!_.value.create_user_account&&(_.value.create_user_account=!0)});const pe=()=>{_.value={name_ar:"",name_en:"",email:"",phone:"",civil_id:"",nationality_id:"",country_id:"",city_id:"",region:"",building_number:"",street:"",apartment_number:"",job_title_id:"",branch_id:"",status:!0,create_user_account:!1,send_credentials:!1,role_id:"",password:"",password_confirmation:"",employee_code:"",phone_prefix:v.value,confirm_phone_prefix:v.value,confirm_phone:"",confirm_password:""},m.value=null,y.value={send_credentials:!1,create_user_account:!1},d.value={},u.value={},f.value.show=!1,f.value.onConfirm=void 0,i.value=""},Te=()=>{pe(),n("close")},He=async()=>{var L,p,U;r.value=!0,i.value="";try{const J=await pt.getEmployeeCreationLookups();if(J.success&&J.data)c.value=J.data,((p=(L=J.data.form_metadata)==null?void 0:L.available_statuses)==null?void 0:p.length)>0&&(_.value.status=J.data.form_metadata.available_statuses[0].value||!0),!b.value&&((U=J.data.form_metadata)!=null&&U.next_employee_code)&&(_.value.employee_code=J.data.form_metadata.next_employee_code);else throw new Error(J.message||"فشل في تحميل بيانات النموذج")}catch(J){i.value=J.message||"حدث خطأ في تحميل بيانات النموذج",console.error("Failed to load creation lookups:",J)}finally{r.value=!1}},ue=async()=>{var L,p,U,J,Oe,qe,De,Ie,Xe;if(s.employeeId){o.value=!0;try{const Ne=await pt.getEmployeeForEdit(s.employeeId);if(Ne.success&&Ne.data){const{employee:$,lookup_options:K}=Ne.data,C=K||((L=c.value)==null?void 0:L.lookup_options);let O=v.value,H="";if($.phone){const V=$.phone.match(/^(\+\d{3})(.+)$/);V?(O=V[1],H=V[2]):H=$.phone}else if($.mobile_number){const V=$.mobile_number.match(/^(\+\d{3})(.+)$/);if(V){O=V[1],H=V[2];const j=H.match(/^(\+\d{3})(.+)$/);j&&j[1]===O&&(H=j[2])}else H=$.mobile_number}let z="";if($.branch&&(C!=null&&C.branches)){if(typeof $.branch=="object"&&((p=$.branch)!=null&&p.id))z=$.branch.id.toString();else if(typeof $.branch=="string"||typeof $.branch=="number"){const V=C.branches.find(j=>j.id.toString()===$.branch.toString());if(V)z=V.id.toString();else{const j=C.branches.find(B=>B.name_ar===$.branch||B.name_en===$.branch||B.name===$.branch);j&&(z=j.id.toString())}}}let x="";if($.nationality&&(C!=null&&C.nationalities)){if(typeof $.nationality=="object"&&((U=$.nationality)!=null&&U.id))x=$.nationality.id.toString();else if(typeof $.nationality=="string"||typeof $.nationality=="number"){const V=C.nationalities.find(j=>j.id.toString()===$.nationality.toString());if(V)x=V.id.toString();else{const j=C.nationalities.find(B=>B.name_ar===$.nationality||B.name_en===$.nationality||B.name===$.nationality);j&&(x=j.id.toString())}}}let h="";const g=$.position||$.job_title||"";if(g&&(C!=null&&C.job_titles)){if(typeof g=="object"&&(g!=null&&g.id))h=g.id.toString();else if(typeof g=="string"||typeof g=="number"){const V=C.job_titles.find(j=>j.id.toString()===g.toString());if(V)h=V.id.toString();else{const j=C.job_titles.find(B=>B.name_ar===g||B.name_en===g||B.name===g);j&&(h=j.id.toString())}}}let w="";if($.role&&(C!=null&&C.roles)){if(typeof $.role=="object"&&((J=$.role)!=null&&J.id))w=$.role.id.toString();else if(typeof $.role=="string"||typeof $.role=="number"){const V=C.roles.find(j=>j.id.toString()===$.role.toString());if(V)w=V.id.toString();else{const j=C.roles.find(B=>B.display_name===$.role||B.name_ar===$.role||B.name_en===$.role||B.name===$.role);j&&(w=j.id.toString())}}}let I="";if($.country&&(C!=null&&C.countries)){if(typeof $.country=="object"&&((Oe=$.country)!=null&&Oe.id))I=$.country.id.toString();else if(typeof $.country=="string"||typeof $.country=="number"){const V=C.countries.find(j=>j.id.toString()===$.country.toString());if(V)I=V.id.toString();else{const j=C.countries.find(B=>B.name_ar===$.country||B.name_en===$.country||B.name===$.country);j&&(I=j.id.toString())}}}let D="";if($.city&&(C!=null&&C.cities)){if(typeof $.city=="object"&&((qe=$.city)!=null&&qe.id))D=$.city.id.toString();else if(typeof $.city=="string"||typeof $.city=="number"){const V=C.cities.find(j=>j.id.toString()===$.city.toString());if(V)D=V.id.toString();else{const j=C.cities.find(B=>B.name_ar===$.city||B.name_en===$.city||B.name===$.city);j&&(D=j.id.toString())}}}const M={name_ar:$.name_ar||"",name_en:$.name_en||"",email:$.email||"",phone:H,civil_id:$.civil_id||"",nationality_id:x,country_id:I,city_id:D,region:((De=$.region)==null?void 0:De.name_ar)||$.region||"",building_number:((Ie=$.building_number)==null?void 0:Ie.name_ar)||$.building_number||"",street:$.street||"",apartment_number:$.apartment_number||"",job_title_id:h,branch_id:z,status:$.status==="active"||!0,role_id:w};m.value={...M},y.value={send_credentials:!!$.send_credentials,create_user_account:!!$.create_user_account},_.value={..._.value,...M,phone_prefix:O,employee_code:$.employee_code||((Xe=$.id)==null?void 0:Xe.toString())||"",create_user_account:!!$.create_user_account,send_credentials:!!$.send_credentials,confirm_phone_prefix:O,confirm_phone:H,password:"",confirm_password:""}}else throw new Error(Ne.message||"فشل في تحميل بيانات الموظف")}catch(Ne){W(Ne.message||"حدث خطأ في تحميل بيانات الموظف","error","خطأ في تحميل البيانات"),console.error("Failed to load employee for edit:",Ne)}finally{o.value=!1}}},Y=async()=>{if(!T()){W("يرجى تصحيح الأخطاء في النموذج قبل المتابعة","error","خطأ في التحقق");return}l.value=!0;try{let L;if(b.value){const p=E();if(Object.keys(p).length===0){console.log("No fields changed, skipping update request"),n("success",{}),Te();return}console.log("Sending only changed fields for update:",p),L=await pt.updateEmployee(s.employeeId,p)}else{const p={name_ar:_.value.name_ar,name_en:_.value.name_en,email:_.value.email,phone:_.value.phone||"",civil_id:_.value.civil_id,nationality_id:_.value.nationality_id,country_id:_.value.country_id,city_id:_.value.city_id,region:_.value.region,building_number:_.value.building_number,street:_.value.street,apartment_number:_.value.apartment_number,job_title_id:_.value.job_title_id,branch_id:_.value.branch_id,status:_.value.status||!0,role_id:_.value.role_id,create_user_account:_.value.create_user_account||!1,send_credentials:_.value.send_credentials||!1,password:_.value.password,password_confirmation:_.value.confirm_password};L=await pt.createEmployee(p)}if(L.success&&L.data){const p=b.value?"تم تحديث بيانات الموظف بنجاح":"تم إضافة الموظف الجديد بنجاح",U=b.value?"تم التحديث":"تم الإضافة";W(p,"success",U,{onConfirm:()=>{n("success",L.data),Te()}})}else throw new Error(L.message||(b.value?"فشل في تحديث الموظف":"فشل في إضافة الموظف"))}catch(L){const p=b.value?"خطأ في تحديث الموظف":"خطأ في إضافة الموظف",U=L.message||(b.value?"حدث خطأ في تحديث الموظف":"حدث خطأ في إضافة الموظف");W(U,"error",p),console.error("Failed to submit employee:",L)}finally{l.value=!1}};return kt(()=>s.isVisible,L=>{L&&(He(),b.value&&ue())}),kt(()=>{var L,p;return(p=(L=c.value)==null?void 0:L.lookup_options)==null?void 0:p.countries},L=>{L&&L.length>0&&!b.value&&(_.value.phone_prefix||(_.value.phone_prefix=L[0].phone_prefix),_.value.confirm_phone_prefix||(_.value.confirm_phone_prefix=L[0].phone_prefix))}),kt(()=>_.value.password,()=>{u.value.confirm_password&&S("confirm_password",_.value.confirm_password)}),kt(()=>_.value.phone,()=>{u.value.confirm_phone&&S("confirm_phone",_.value.confirm_phone)}),Ut(()=>{s.isVisible&&(He(),b.value&&ue())}),(L,p)=>{var U,J,Oe,qe,De,Ie,Xe,Ne,$,K,C,O,H,z;return L.isVisible?(R(),P("div",{key:0,class:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",onClick:Te},[a("div",{class:"bg-white rounded-lg shadow-xl w-full max-w-4xl mx-4 max-h-[90vh] overflow-y-auto",onClick:p[52]||(p[52]=Ws(()=>{},["stop"])),dir:"rtl"},[a("div",Hg,[a("h2",qg,F(b.value?"تعديل بيانات الموظف":"إضافة موظف جديد"),1),a("button",{onClick:Te,class:"text-gray-400 hover:text-gray-600 text-2xl"}," × ")]),a("div",zg,[r.value?(R(),P("div",Kg,p[53]||(p[53]=[a("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#DA7E13]"},null,-1),a("span",{class:"mr-3 text-[#54524F]"},"جاري تحميل بيانات النموذج...",-1)]))):i.value?(R(),P("div",Wg,[p[54]||(p[54]=a("div",{class:"text-red-500 mb-4"},[a("svg",{class:"w-16 h-16 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})])],-1)),a("p",Jg,F(i.value),1),a("button",{onClick:He,class:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"}," إعادة المحاولة ")])):o.value&&b.value?(R(),P("div",Gg,p[55]||(p[55]=[a("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#DA7E13]"},null,-1),a("span",{class:"mr-3 text-[#54524F]"},"جاري تحميل بيانات الموظف...",-1)]))):(R(),P("form",{key:3,onSubmit:Ws(Y,["prevent"]),class:"space-y-4"},[a("div",Zg,[a("div",null,[p[56]||(p[56]=a("label",{class:"block text-sm text-gray-500 mb-1"},[Ce("كود الموظف عميل "),a("span",{class:"text-red-500"},"*")],-1)),ge(a("input",{"onUpdate:modelValue":p[0]||(p[0]=x=>_.value.employee_code=x),type:"text",required:"",readonly:!!b.value,onBlur:p[1]||(p[1]=x=>N("employee_code")),onInput:p[2]||(p[2]=x=>u.value.employee_code&&S("employee_code",_.value.employee_code)),class:re(["w-full px-3 py-2 border rounded focus:outline-none text-right text-sm",b.value?"bg-gray-50 cursor-not-allowed border-gray-200":"focus:border-gray-400",d.value.employee_code&&u.value.employee_code?"border-red-500":"border-gray-200"])},null,42,Yg),[[Be,_.value.employee_code]]),d.value.employee_code&&u.value.employee_code?(R(),P("div",Qg,F(d.value.employee_code),1)):ye("",!0)]),a("div",null,[p[57]||(p[57]=a("label",{class:"block text-sm text-gray-500 mb-1"},[Ce("الاسم بالعربي "),a("span",{class:"text-red-500"},"*")],-1)),ge(a("input",{"onUpdate:modelValue":p[3]||(p[3]=x=>_.value.name_ar=x),type:"text",required:"",onBlur:p[4]||(p[4]=x=>N("name_ar")),onInput:p[5]||(p[5]=x=>u.value.name_ar&&S("name_ar",_.value.name_ar)),class:re(["w-full px-3 py-2 border rounded focus:outline-none focus:border-gray-400 text-right text-sm",d.value.name_ar&&u.value.name_ar?"border-red-500":"border-gray-200"])},null,34),[[Be,_.value.name_ar]]),d.value.name_ar&&u.value.name_ar?(R(),P("div",Xg,F(d.value.name_ar),1)):ye("",!0)]),a("div",null,[p[59]||(p[59]=a("label",{class:"block text-sm text-gray-500 mb-1"},[Ce("الفرع "),a("span",{class:"text-red-500"},"*")],-1)),ge(a("select",{"onUpdate:modelValue":p[6]||(p[6]=x=>_.value.branch_id=x),required:"",onBlur:p[7]||(p[7]=x=>N("branch_id")),onChange:p[8]||(p[8]=x=>u.value.branch_id&&S("branch_id",_.value.branch_id)),class:re(["w-full px-3 py-2 border rounded focus:outline-none focus:border-gray-400 text-sm",d.value.branch_id&&u.value.branch_id?"border-red-500":"border-gray-200"])},[p[58]||(p[58]=a("option",{value:""},"اختار",-1)),(R(!0),P(ve,null,Le((J=(U=c.value)==null?void 0:U.lookup_options)==null?void 0:J.branches,x=>(R(),P("option",{key:x.id,value:x.id},F(x.name_ar),9,e1))),128))],34),[[Ye,_.value.branch_id]]),d.value.branch_id&&u.value.branch_id?(R(),P("div",t1,F(d.value.branch_id),1)):ye("",!0)])]),a("div",s1,[a("div",null,[p[61]||(p[61]=a("label",{class:"block text-sm text-gray-500 mb-1"},[Ce("المسمى الوظيفي "),a("span",{class:"text-red-500"},"*")],-1)),ge(a("select",{"onUpdate:modelValue":p[9]||(p[9]=x=>_.value.job_title_id=x),required:"",onBlur:p[10]||(p[10]=x=>N("job_title_id")),onChange:p[11]||(p[11]=x=>u.value.job_title_id&&S("job_title_id",_.value.job_title_id)),class:re(["w-full px-3 py-2 border rounded focus:outline-none focus:border-gray-400 text-sm",d.value.job_title_id&&u.value.job_title_id?"border-red-500":"border-gray-200"])},[p[60]||(p[60]=a("option",{value:""},"اختار",-1)),(R(!0),P(ve,null,Le((qe=(Oe=c.value)==null?void 0:Oe.lookup_options)==null?void 0:qe.job_titles,x=>(R(),P("option",{key:x.id,value:x.id},F(x.name_ar),9,n1))),128))],34),[[Ye,_.value.job_title_id]]),d.value.job_title_id&&u.value.job_title_id?(R(),P("div",o1,F(d.value.job_title_id),1)):ye("",!0)]),a("div",null,[p[62]||(p[62]=a("label",{class:"block text-sm text-gray-500 mb-1"},[Ce("الرقم المدني "),a("span",{class:"text-red-500"},"*")],-1)),ge(a("input",{"onUpdate:modelValue":p[12]||(p[12]=x=>_.value.civil_id=x),type:"text",required:"",onBlur:p[13]||(p[13]=x=>N("civil_id")),onInput:p[14]||(p[14]=x=>u.value.civil_id&&S("civil_id",_.value.civil_id)),class:re(["w-full px-3 py-2 border rounded focus:outline-none focus:border-gray-400 text-right text-sm",d.value.civil_id&&u.value.civil_id?"border-red-500":"border-gray-200"])},null,34),[[Be,_.value.civil_id]]),d.value.civil_id&&u.value.civil_id?(R(),P("div",r1,F(d.value.civil_id),1)):ye("",!0)]),a("div",null,[p[63]||(p[63]=a("label",{class:"block text-sm text-gray-500 mb-1"},[Ce("البريد الالكتروني "),a("span",{class:"text-red-500"},"*")],-1)),ge(a("input",{"onUpdate:modelValue":p[15]||(p[15]=x=>_.value.email=x),type:"email",required:"",onBlur:p[16]||(p[16]=x=>N("email")),onInput:p[17]||(p[17]=x=>u.value.email&&S("email",_.value.email)),class:re(["w-full px-3 py-2 border rounded focus:outline-none focus:border-gray-400 text-right text-sm",d.value.email&&u.value.email?"border-red-500":"border-gray-200"])},null,34),[[Be,_.value.email]]),d.value.email&&u.value.email?(R(),P("div",i1,F(d.value.email),1)):ye("",!0)])]),a("div",a1,[a("div",null,[p[65]||(p[65]=a("label",{class:"block text-sm text-gray-500 mb-1"},[Ce("رقم الجوال "),a("span",{class:"text-red-500"},"*")],-1)),a("div",{class:re(["flex border rounded-md overflow-hidden focus-within:border-blue-500 bg-white",d.value.phone&&u.value.phone?"border-red-500":"border-gray-300"]),dir:"ltr"},[a("div",l1,[ge(a("select",{"onUpdate:modelValue":p[18]||(p[18]=x=>_.value.phone_prefix=x),class:"px-3 py-2 bg-white text-sm focus:outline-none text-center min-w-[80px]"},[(R(!0),P(ve,null,Le((Ie=(De=c.value)==null?void 0:De.lookup_options)==null?void 0:Ie.countries,x=>(R(),P("option",{key:x.id,value:x.phone_prefix},F(x.phone_prefix),9,c1))),128))],512),[[Ye,_.value.phone_prefix]]),p[64]||(p[64]=a("div",{class:"absolute right-0 top-1/2 transform -translate-y-1/2 w-px h-4 bg-gray-300"},null,-1))]),ge(a("input",{"onUpdate:modelValue":p[19]||(p[19]=x=>_.value.phone=x),type:"tel",required:"",placeholder:"...",onBlur:p[20]||(p[20]=x=>N("phone")),onInput:p[21]||(p[21]=x=>u.value.phone&&S("phone",_.value.phone)),class:"flex-1 px-3 py-2 text-right text-sm focus:outline-none bg-white"},null,544),[[Be,_.value.phone]])],2),d.value.phone&&u.value.phone?(R(),P("div",u1,F(d.value.phone),1)):ye("",!0)]),a("div",null,[p[67]||(p[67]=a("label",{class:"block text-sm text-gray-500 mb-1"},[Ce("الجنسية "),a("span",{class:"text-red-500"},"*")],-1)),ge(a("select",{"onUpdate:modelValue":p[22]||(p[22]=x=>_.value.nationality_id=x),required:"",onBlur:p[23]||(p[23]=x=>N("nationality_id")),onChange:p[24]||(p[24]=x=>u.value.nationality_id&&S("nationality_id",_.value.nationality_id)),class:re(["w-full px-3 py-2 border rounded focus:outline-none focus:border-gray-400 text-sm",d.value.nationality_id&&u.value.nationality_id?"border-red-500":"border-gray-200"])},[p[66]||(p[66]=a("option",{value:""},"اختار",-1)),(R(!0),P(ve,null,Le((Ne=(Xe=c.value)==null?void 0:Xe.lookup_options)==null?void 0:Ne.nationalities,x=>(R(),P("option",{key:x.id,value:x.id},F(x.name_ar),9,d1))),128))],34),[[Ye,_.value.nationality_id]]),d.value.nationality_id&&u.value.nationality_id?(R(),P("div",f1,F(d.value.nationality_id),1)):ye("",!0)]),a("div",null,[p[69]||(p[69]=a("label",{class:"block text-sm text-gray-500 mb-1"},[Ce("الدولة "),a("span",{class:"text-red-500"},"*")],-1)),ge(a("select",{"onUpdate:modelValue":p[25]||(p[25]=x=>_.value.country_id=x),required:"",onBlur:p[26]||(p[26]=x=>N("country_id")),onChange:p[27]||(p[27]=x=>u.value.country_id&&S("country_id",_.value.country_id)),class:re(["w-full px-3 py-2 border rounded focus:outline-none focus:border-gray-400 text-sm",d.value.country_id&&u.value.country_id?"border-red-500":"border-gray-200"])},[p[68]||(p[68]=a("option",{value:""},"اختار",-1)),(R(!0),P(ve,null,Le((K=($=c.value)==null?void 0:$.lookup_options)==null?void 0:K.countries,x=>(R(),P("option",{key:x.id,value:x.id},F(x.name_ar),9,p1))),128))],34),[[Ye,_.value.country_id]]),d.value.country_id&&u.value.country_id?(R(),P("div",h1,F(d.value.country_id),1)):ye("",!0)])]),a("div",m1,[a("div",null,[p[70]||(p[70]=a("label",{class:"block text-sm text-gray-500 mb-1"},[Ce("المنطقة "),a("span",{class:"text-red-500"},"*")],-1)),ge(a("input",{"onUpdate:modelValue":p[28]||(p[28]=x=>_.value.region=x),type:"text",required:"",onBlur:p[29]||(p[29]=x=>N("region")),onInput:p[30]||(p[30]=x=>u.value.region&&S("region",_.value.region)),class:re(["w-full px-3 py-2 border rounded focus:outline-none focus:border-gray-400 text-right text-sm",d.value.region&&u.value.region?"border-red-500":"border-gray-200"])},null,34),[[Be,_.value.region]]),d.value.region&&u.value.region?(R(),P("div",g1,F(d.value.region),1)):ye("",!0)]),a("div",null,[p[72]||(p[72]=a("label",{class:"block text-sm text-gray-500 mb-1"},[Ce("المدينة "),a("span",{class:"text-red-500"},"*")],-1)),ge(a("select",{"onUpdate:modelValue":p[31]||(p[31]=x=>_.value.city_id=x),required:"",onBlur:p[32]||(p[32]=x=>N("city_id")),onChange:p[33]||(p[33]=x=>u.value.city_id&&S("city_id",_.value.city_id)),class:re(["w-full px-3 py-2 border rounded focus:outline-none focus:border-gray-400 text-sm",d.value.city_id&&u.value.city_id?"border-red-500":"border-gray-200"])},[p[71]||(p[71]=a("option",{value:""},"اختار",-1)),(R(!0),P(ve,null,Le(A.value,x=>(R(),P("option",{key:x.id,value:x.id.toString()},F(x.name_ar),9,v1))),128))],34),[[Ye,_.value.city_id]]),d.value.city_id&&u.value.city_id?(R(),P("div",y1,F(d.value.city_id),1)):ye("",!0)]),a("div",null,[p[73]||(p[73]=a("label",{class:"block text-sm text-gray-500 mb-1"},"الرقم الالى للشقة",-1)),ge(a("input",{"onUpdate:modelValue":p[34]||(p[34]=x=>_.value.apartment_number=x),type:"text",class:"w-full px-3 py-2 border border-gray-200 rounded focus:outline-none focus:border-gray-400 text-right text-sm"},null,512),[[Be,_.value.apartment_number]])])]),a("div",b1,[a("div",null,[p[74]||(p[74]=a("label",{class:"block text-sm text-gray-500 mb-1"},"الشارع",-1)),ge(a("input",{"onUpdate:modelValue":p[35]||(p[35]=x=>_.value.street=x),type:"text",class:"w-full px-3 py-2 border border-gray-200 rounded focus:outline-none focus:border-gray-400 text-right text-sm"},null,512),[[Be,_.value.street]])]),a("div",null,[p[75]||(p[75]=a("label",{class:"block text-sm text-gray-500 mb-1"},"رقم العقار",-1)),ge(a("input",{"onUpdate:modelValue":p[36]||(p[36]=x=>_.value.building_number=x),type:"text",class:"w-full px-3 py-2 border border-gray-200 rounded focus:outline-none focus:border-gray-400 text-right text-sm"},null,512),[[Be,_.value.building_number]])]),a("div",null,[p[77]||(p[77]=a("label",{class:"block text-sm text-gray-500 mb-1"},[Ce("الصلاحية "),a("span",{class:"text-red-500"},"*")],-1)),ge(a("select",{"onUpdate:modelValue":p[37]||(p[37]=x=>_.value.role_id=x),required:"",onBlur:p[38]||(p[38]=x=>N("role_id")),onChange:p[39]||(p[39]=x=>u.value.role_id&&S("role_id",_.value.role_id)),class:re(["w-full px-3 py-2 border rounded focus:outline-none focus:border-gray-400 text-sm",d.value.role_id&&u.value.role_id?"border-red-500":"border-gray-200"])},[p[76]||(p[76]=a("option",{value:""},"اختار",-1)),(R(!0),P(ve,null,Le(((O=(C=c.value)==null?void 0:C.lookup_options)==null?void 0:O.roles)||[],x=>(R(),P("option",{key:x.id,value:x.id.toString()},F(x.display_name),9,_1))),128))],34),[[Ye,_.value.role_id]]),d.value.role_id&&u.value.role_id?(R(),P("div",x1,F(d.value.role_id),1)):ye("",!0)])]),a("div",w1,[a("div",C1,[a("label",E1,[ge(a("input",{"onUpdate:modelValue":p[40]||(p[40]=x=>_.value.send_credentials=x),type:"checkbox",class:"sr-only"},null,512),[[$o,_.value.send_credentials]]),a("div",S1,[a("div",{class:re(["w-5 h-5 border-2 border-gray-300 rounded transition-colors",_.value.send_credentials?"bg-[#DA7E13] border-[#DA7E13]":""])},null,2),_.value.send_credentials?(R(),P("svg",A1,p[78]||(p[78]=[a("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"},null,-1)]))):ye("",!0)]),p[79]||(p[79]=a("span",{class:"text-sm text-gray-700"},"ارسال رسالة باسم مستخدم وكلمة مرور للمستخدم",-1))])]),a("div",k1,[a("label",$1,[ge(a("input",{"onUpdate:modelValue":p[41]||(p[41]=x=>_.value.create_user_account=x),type:"checkbox",class:"sr-only"},null,512),[[$o,_.value.create_user_account]]),a("div",R1,[a("div",{class:re(["w-5 h-5 border-2 border-gray-300 rounded transition-colors",_.value.create_user_account?"bg-[#DA7E13] border-[#DA7E13]":""])},null,2),_.value.create_user_account?(R(),P("svg",T1,p[80]||(p[80]=[a("path",{"fill-rule":"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z","clip-rule":"evenodd"},null,-1)]))):ye("",!0)]),p[81]||(p[81]=a("span",{class:"text-sm text-gray-700"},"انشاء حساب مستخدم",-1))])])]),a("div",O1,[a("div",null,[a("label",P1,[p[82]||(p[82]=Ce(" رقم الجوال ")),ne.value?(R(),P("span",I1,"*")):ye("",!0)]),a("div",{class:re(["flex border rounded-md overflow-hidden focus-within:border-blue-500 bg-white",d.value.confirm_phone&&u.value.confirm_phone?"border-red-500":"border-gray-300"]),dir:"ltr"},[a("div",L1,[ge(a("select",{"onUpdate:modelValue":p[42]||(p[42]=x=>_.value.confirm_phone_prefix=x),class:"px-3 py-2 bg-white text-sm focus:outline-none text-center min-w-[80px]"},[(R(!0),P(ve,null,Le((z=(H=c.value)==null?void 0:H.lookup_options)==null?void 0:z.countries,x=>(R(),P("option",{key:x.id,value:x.phone_prefix},F(x.phone_prefix),9,M1))),128))],512),[[Ye,_.value.confirm_phone_prefix]]),p[83]||(p[83]=a("div",{class:"absolute right-0 top-1/2 transform -translate-y-1/2 w-px h-4 bg-gray-300"},null,-1))]),ge(a("input",{"onUpdate:modelValue":p[43]||(p[43]=x=>_.value.confirm_phone=x),type:"tel",required:ne.value,placeholder:"...",onBlur:p[44]||(p[44]=x=>N("confirm_phone")),onInput:p[45]||(p[45]=x=>u.value.confirm_phone&&S("confirm_phone",_.value.confirm_phone)),class:"flex-1 px-3 py-2 text-right text-sm focus:outline-none bg-white"},null,40,F1),[[Be,_.value.confirm_phone]])],2),d.value.confirm_phone&&u.value.confirm_phone?(R(),P("div",j1,F(d.value.confirm_phone),1)):ye("",!0)]),a("div",null,[a("label",D1,[p[84]||(p[84]=Ce(" كلمة المرور ")),ne.value?(R(),P("span",N1,"*")):ye("",!0)]),ge(a("input",{"onUpdate:modelValue":p[46]||(p[46]=x=>_.value.password=x),type:"password",required:ne.value,onBlur:p[47]||(p[47]=x=>N("password")),onInput:p[48]||(p[48]=x=>u.value.password&&S("password",_.value.password)),class:re(["w-full px-3 py-2 border rounded focus:outline-none focus:border-gray-400 text-right text-sm",d.value.password&&u.value.password?"border-red-500":"border-gray-200"])},null,42,B1),[[Be,_.value.password]]),d.value.password&&u.value.password?(R(),P("div",U1,F(d.value.password),1)):ye("",!0)]),a("div",null,[a("label",V1,[p[85]||(p[85]=Ce(" تأكيد كلمة المرور ")),ne.value?(R(),P("span",H1,"*")):ye("",!0)]),ge(a("input",{"onUpdate:modelValue":p[49]||(p[49]=x=>_.value.confirm_password=x),type:"password",required:ne.value,onBlur:p[50]||(p[50]=x=>N("confirm_password")),onInput:p[51]||(p[51]=x=>u.value.confirm_password&&S("confirm_password",_.value.confirm_password)),class:re(["w-full px-3 py-2 border rounded focus:outline-none focus:border-gray-400 text-right text-sm",d.value.confirm_password&&u.value.confirm_password?"border-red-500":"border-gray-200"])},null,42,q1),[[Be,_.value.confirm_password]]),d.value.confirm_password&&u.value.confirm_password?(R(),P("div",z1,F(d.value.confirm_password),1)):ye("",!0)])])],32))]),a("div",K1,[a("button",{type:"button",onClick:Y,disabled:l.value||r.value,class:"flex-1 flex items-center justify-center gap-2 py-2 bg-[#DA7E13] text-white rounded hover:bg-[#DA7E13]/90 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"},[l.value?(R(),P("div",J1)):(R(),P("svg",G1,p[86]||(p[86]=[a("path",{d:"M12 2C13.1 2 14 2.9 14 4C14 5.1 13.1 6 12 6C10.9 6 10 5.1 10 4C10 2.9 10.9 2 12 2ZM21 9V7L15 1H5C3.89 1 3 1.89 3 3V21C3 22.11 3.89 23 5 23H19C20.11 23 21 22.11 21 21V9H21ZM19 21H5V3H13V9H19V21Z"},null,-1)]))),a("span",null,F(l.value?b.value?"جاري الحفظ...":"جاري الإضافة...":b.value?"حفظ التغييرات":"إضافة موظف جديد"),1)],8,W1),a("button",{onClick:Te,class:"flex-1 py-2 border border-gray-300 text-gray-700 rounded hover:bg-gray-50 transition-colors"}," إلغاء ")])]),X(je(wn),{isVisible:f.value.show,type:f.value.type,title:f.value.title,message:f.value.message,confirmText:f.value.confirmText,showCancel:f.value.showCancel,onClose:te,onConfirm:Q},null,8,["isVisible","type","title","message","confirmText","showCancel"])])):ye("",!0)}}}),bl=Pe(Z1,[["__scopeId","data-v-a3f646dd"]]),Y1={class:"min-h-screen bg-[#F4F4F6]",dir:"rtl"},Q1={class:"flex pt-16"},X1={class:"px-6"},ev={class:"employees-management"},tv={class:"stats-grid grid grid-cols-1 md:grid-cols-4 gap-6 mb-8"},sv={class:"stat-card bg-white p-6 rounded-lg shadow"},nv={class:"text-3xl font-bold text-blue-600"},ov={class:"stat-card bg-white p-6 rounded-lg shadow"},rv={class:"text-3xl font-bold text-green-600"},iv={class:"stat-card bg-white p-6 rounded-lg shadow"},av={class:"text-3xl font-bold text-purple-600"},lv={class:"stat-card bg-white p-6 rounded-lg shadow"},cv={class:"text-3xl font-bold text-orange-600"},uv={class:"filters-section bg-white p-6 rounded-lg shadow mb-6"},dv={class:"flex flex-wrap gap-4"},fv={key:0,class:"text-center py-12"},pv={key:1,class:"text-center py-12"},hv={class:"text-red-600 mb-4"},mv={key:2},gv={class:"employees-table bg-white rounded-lg shadow"},vv={class:"table-container"},yv={class:"w-full"},bv={class:"divide-y divide-gray-200"},_v={class:"px-6 py-4"},xv={class:"flex items-center"},wv={class:"h-10 w-10 bg-gray-300 rounded-full flex items-center justify-center"},Cv={class:"text-sm font-medium text-gray-700"},Ev={class:"ml-4"},Sv={class:"font-medium text-gray-900"},Av={class:"text-sm text-gray-500"},kv={class:"px-6 py-4"},$v={class:"text-sm text-gray-900"},Rv={class:"px-6 py-4"},Tv={class:"text-sm text-gray-900"},Ov={class:"px-6 py-4"},Pv={class:"text-sm text-gray-900"},Iv={class:"px-6 py-4"},Lv={class:"px-6 py-4"},Mv={class:"flex space-x-2"},Fv=["onClick"],jv=["onClick"],Dv={class:"pagination flex justify-between items-center mt-6"},Nv={class:"text-sm text-gray-700"},Bv={class:"flex space-x-2"},Uv=["disabled"],Vv=["disabled"],Hv={key:3,class:"text-center py-12"},qv=he({__name:"Employees",setup(e){const t=Cs(),s=G(""),n=G(""),o=G(""),r=G(1),i=G(10),l=G(0),c=G(!1),d=G(""),u=G({totalEmployees:0,activeEmployees:0,availableSlots:0,newThisMonth:0}),f=G([]),m=G(!1),y=G(null),b=G("add"),v=le(()=>{let ue=f.value;return s.value&&(ue=ue.filter(Y=>{var L,p;return Y.name_ar.toLowerCase().includes(s.value.toLowerCase())||Y.name_en.toLowerCase().includes(s.value.toLowerCase())||Y.email.toLowerCase().includes(s.value.toLowerCase())||((typeof Y.job_title=="object"?(L=Y.job_title)==null?void 0:L.name_ar:Y.job_title)||Y.position||"").toLowerCase().includes(s.value.toLowerCase())||((typeof Y.branch=="object"?(p=Y.branch)==null?void 0:p.name_ar:Y.branch)||Y.department||"").toLowerCase().includes(s.value.toLowerCase())})),n.value&&(ue=ue.filter(Y=>{var L;return(typeof Y.branch=="object"?(L=Y.branch)==null?void 0:L.name_ar:Y.branch)===n.value||Y.department===n.value})),o.value&&(ue=ue.filter(Y=>Y.status===o.value)),ue}),E=le(()=>Math.ceil(l.value/i.value)),A=async()=>{c.value=!0,d.value="";try{const ue=await pt.getEmployees({page:r.value,per_page:i.value,search:s.value||void 0,status:o.value||void 0,department:n.value||void 0});if(ue.success&&ue.data){f.value=ue.data;const Y=f.value.length,L=f.value.filter(p=>p.status==="active").length;u.value={totalEmployees:Y,activeEmployees:L,availableSlots:Math.max(0,50-Y),newThisMonth:f.value.filter(p=>{const U=new Date(p.created_at||""),J=new Date;return U.getMonth()===J.getMonth()&&U.getFullYear()===J.getFullYear()}).length},l.value=Y}else throw new Error(ue.message||"فشل في تحميل بيانات الموظفين")}catch(ue){d.value=ue.message||"حدث خطأ في تحميل بيانات الموظفين",console.error("Failed to load employees:",ue)}finally{c.value=!1}},S=()=>{r.value=1},T=()=>{r.value>1&&(r.value--,A())},N=()=>{r.value<E.value&&(r.value++,A())},W=ue=>{t.push(`/office/employees/${ue}`)},te=()=>{b.value="add",y.value=null,m.value=!0},Q=ue=>{b.value="edit",y.value=ue,m.value=!0},_=()=>{m.value=!1,y.value=null},ne=ue=>{console.log("Employee operation successful:",ue),A()},pe=ue=>{console.error("Employee operation failed:",ue)},Te=G(!1),He=()=>{Te.value=!Te.value};return Ut(()=>{A()}),(ue,Y)=>(R(),P("div",Y1,[X(ur,{sidebarCollapsed:Te.value,onToggleSidebar:He},null,8,["sidebarCollapsed"]),a("div",Q1,[X(dr,{isCollapsed:Te.value,onToggle:He},null,8,["isCollapsed"]),a("div",{class:re(["flex-1 min-h-full transition-all duration-300",Te.value?"mr-16":"mr-64"])},[a("div",{class:"px-6 py-4"},[a("div",{class:"flex items-center justify-between mb-4"},[Y[4]||(Y[4]=a("h1",{class:"text-2xl font-bold text-[#1a1a1a]"},"إدارة الموظفين",-1)),a("button",{onClick:te,class:"flex items-center gap-3 px-6 py-3 bg-[#DA7E13] text-white rounded-lg hover:bg-[#DA7E13]/90 transition-colors text-base font-medium"},Y[3]||(Y[3]=[a("svg",{class:"w-4 h-4 fill-current",viewBox:"0 0 24 24"},[a("path",{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"})],-1),a("span",null,"إضافة موظف",-1)]))]),Y[5]||(Y[5]=Ft('<nav class="flex items-center text-sm text-gray-600" dir="rtl" data-v-bbf23380><span class="text-[#DA7E13]" data-v-bbf23380>الرئيسية</span><span class="mx-2" data-v-bbf23380>/</span><span class="text-[#DA7E13]" data-v-bbf23380>إدارة الموظفين</span><span class="mx-2" data-v-bbf23380>/</span><span class="text-gray-400" data-v-bbf23380>الموظفين</span></nav>',1))]),a("div",X1,[a("div",ev,[a("div",tv,[a("div",sv,[Y[6]||(Y[6]=a("h3",{class:"text-lg font-semibold text-gray-700"},"Total Employees",-1)),a("p",nv,F(u.value.totalEmployees),1)]),a("div",ov,[Y[7]||(Y[7]=a("h3",{class:"text-lg font-semibold text-gray-700"},"Active",-1)),a("p",rv,F(u.value.activeEmployees),1)]),a("div",iv,[Y[8]||(Y[8]=a("h3",{class:"text-lg font-semibold text-gray-700"},"Available Slots",-1)),a("p",av,F(u.value.availableSlots),1)]),a("div",lv,[Y[9]||(Y[9]=a("h3",{class:"text-lg font-semibold text-gray-700"},"This Month",-1)),a("p",cv,F(u.value.newThisMonth),1)])]),a("div",uv,[a("div",dv,[ge(a("input",{type:"text","onUpdate:modelValue":Y[0]||(Y[0]=L=>s.value=L),placeholder:"Search employees...",class:"form-input px-4 py-2 border border-gray-300 rounded-lg"},null,512),[[Be,s.value]]),ge(a("select",{"onUpdate:modelValue":Y[1]||(Y[1]=L=>n.value=L),class:"form-select px-4 py-2 border border-gray-300 rounded-lg"},Y[10]||(Y[10]=[Ft('<option value="" data-v-bbf23380>All Branches</option><option value="main" data-v-bbf23380>الرئيسي</option><option value="02" data-v-bbf23380>فرع 02</option><option value="03" data-v-bbf23380>فرع 03</option><option value="riyadh" data-v-bbf23380>الرياض</option><option value="jeddah" data-v-bbf23380>جدة</option><option value="dammam" data-v-bbf23380>الدمام</option><option value="legal" data-v-bbf23380>القانوني</option><option value="admin" data-v-bbf23380>الإداري</option>',9)]),512),[[Ye,n.value]]),ge(a("select",{"onUpdate:modelValue":Y[2]||(Y[2]=L=>o.value=L),class:"form-select px-4 py-2 border border-gray-300 rounded-lg"},Y[11]||(Y[11]=[a("option",{value:""},"All Status",-1),a("option",{value:"active"},"Active",-1),a("option",{value:"inactive"},"Inactive",-1)]),512),[[Ye,o.value]]),a("button",{onClick:S,class:"btn-secondary bg-gray-600 text-white px-4 py-2 rounded-lg"}," Apply Filters ")])]),c.value?(R(),P("div",fv,Y[12]||(Y[12]=[a("div",{class:"animate-spin rounded-full h-12 w-12 border-b-2 border-blue-500 mx-auto"},null,-1),a("p",{class:"mt-4 text-gray-600"},"Loading employees...",-1)]))):d.value?(R(),P("div",pv,[Y[13]||(Y[13]=a("div",{class:"text-red-500 mb-4"},[a("svg",{class:"w-16 h-16 mx-auto",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1",d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z"})])],-1)),a("p",hv,F(d.value),1),a("button",{onClick:A,class:"px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700"}," Retry ")])):!c.value&&f.value.length>0?(R(),P("div",mv,[a("div",gv,[a("div",vv,[a("table",yv,[Y[16]||(Y[16]=a("thead",{class:"bg-gray-50"},[a("tr",null,[a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Employee"),a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Job Title"),a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Branch"),a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Employee ID"),a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Status"),a("th",{class:"px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase"},"Actions")])],-1)),a("tbody",bv,[(R(!0),P(ve,null,Le(v.value,L=>{var p,U;return R(),P("tr",{key:L.id,class:"hover:bg-gray-50"},[a("td",_v,[a("div",xv,[a("div",wv,[a("span",Cv,F((L.name_ar||L.name_en||"N").charAt(0))+F((L.name_en||L.name_ar||"A").charAt(0)),1)]),a("div",Ev,[a("div",Sv,F(L.name_ar||L.name_en),1),a("div",Av,F(L.email),1)])])]),a("td",kv,[a("div",$v,F((typeof L.job_title=="object"?(p=L.job_title)==null?void 0:p.name_ar:L.job_title)||L.position||"N/A"),1)]),a("td",Rv,[a("span",Tv,F((typeof L.branch=="object"?(U=L.branch)==null?void 0:U.name_ar:L.branch)||L.department||"General"),1)]),a("td",Ov,[a("span",Pv,"EMP"+F(String(L.id).padStart(3,"0")),1)]),a("td",Iv,[a("span",{class:re([L.status==="active"?"bg-green-100 text-green-800":"bg-red-100 text-red-800","px-2 py-1 text-xs font-medium rounded-full"])},F(L.status==="active"?"Active":"Inactive"),3)]),a("td",Lv,[a("div",Mv,[a("button",{onClick:J=>Q(L.id),class:"text-blue-600 hover:text-blue-900 text-sm"},"Edit",8,Fv),a("button",{onClick:J=>W(L.id.toString()),class:"text-green-600 hover:text-green-900 text-sm"},"View",8,jv),Y[14]||(Y[14]=a("button",{class:"text-purple-600 hover:text-purple-900 text-sm"},"Permissions",-1)),Y[15]||(Y[15]=a("button",{class:"text-red-600 hover:text-red-900 text-sm"},"Remove",-1))])])])}),128))])])])]),a("div",Dv,[a("div",Nv," Showing "+F((r.value-1)*i.value+1)+" to "+F(Math.min(r.value*i.value,l.value))+" of "+F(l.value)+" results ",1),a("div",Bv,[a("button",{onClick:T,disabled:r.value===1,class:"px-3 py-1 border rounded text-sm"},"Previous",8,Uv),a("button",{onClick:N,disabled:r.value>=E.value,class:"px-3 py-1 border rounded text-sm"},"Next",8,Vv)])])])):(R(),P("div",Hv,Y[17]||(Y[17]=[Ft('<div class="text-gray-400 mb-4" data-v-bbf23380><svg class="w-16 h-16 mx-auto" fill="none" stroke="currentColor" viewBox="0 0 24 24" data-v-bbf23380><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" data-v-bbf23380></path></svg></div><h3 class="text-lg font-medium text-gray-900 mb-2" data-v-bbf23380>No employees found</h3><p class="text-gray-600" data-v-bbf23380>Get started by adding your first employee.</p>',3)]))),X(bl,{isVisible:m.value,employeeId:y.value,mode:b.value,onClose:_,onSuccess:ne,onError:pe},null,8,["isVisible","employeeId","mode"])])])],2)])]))}}),zv=Pe(qv,[["__scopeId","data-v-bbf23380"]]),Kv={class:"min-h-screen bg-[#F4F4F6]",dir:"rtl"},Wv={class:"flex pt-16"},Jv={class:"flex flex-col flex-1 px-6"},Gv={class:"bg-white rounded-lg shadow-sm border p-6 mb-4"},Zv={class:"flex items-center justify-between w-full",dir:"rtl"},Yv={class:"flex-1 flex justify-center"},Qv={class:"relative"},Xv={class:"flex items-center gap-4"},ey={class:"flex items-center gap-2"},ty={class:"bg-white rounded-lg shadow-sm border flex-1"},sy={class:"overflow-x-auto"},ny={class:"w-full border-collapse border border-gray-200"},oy={class:"px-4 py-3 text-sm text-[#54524F] border-r border-gray-200"},ry={class:"px-4 py-3 border-r border-gray-200"},iy={class:"flex items-center gap-2"},ay={class:"text-sm text-[#DA7E13] font-medium"},ly=["onClick"],cy={class:"px-4 py-3 border-r border-gray-200"},uy={class:"flex items-center gap-2"},dy={class:"text-sm text-[#54524F]"},fy=["onClick"],py={class:"px-4 py-3 text-sm text-[#54524F] border-r border-gray-200"},hy={class:"px-4 py-3 text-sm text-[#54524F] border-r border-gray-200"},my={class:"px-4 py-3 text-sm text-[#54524F] border-r border-gray-200"},gy={class:"px-4 py-3 text-sm text-[#54524F] border-r border-gray-200"},vy={class:"px-4 py-3 border-r border-gray-200"},yy={class:"flex items-center gap-1 justify-end",dir:"rtl"},by=["onClick"],_y=["onClick"],xy=["onClick"],wy={class:"flex items-center justify-between px-6 py-4 border-t border-gray-200"},Cy={class:"text-sm text-[#54524F]"},Ey={class:"flex items-center gap-1"},Sy=["disabled"],Ay=["onClick","disabled"],ky=["disabled"],$y=he({__name:"EmployeeFiles",setup(e){const t=Cs(),s=G(!1),n=G([]),o=G(""),r=G(1),i=G("15"),l=G(!1),c=G(null),d=G("add"),u=G(!1),f=G(""),m=G(!1),y=G({show:!1,employeeToDelete:null}),b=G({show:!1,message:""}),v=G({show:!1,message:""}),E=G({job_titles:[],branches:[],nationalities:[],countries:[],cities:[]}),A=G({available_statuses:[],office_info:{},can_create_user_account:!1}),S=G({name_ar:"",name_en:"",email:"",mobile_number:"",civil_id:"",nationality:"",job_title:"",branch:"",status:"active",employee_code:"",country:""}),T=()=>{s.value=!s.value},N=()=>{d.value="add",c.value=null,l.value=!0},W=()=>{l.value=!1,c.value=null},te=$=>{console.log("Employee operation successful:",$),Oe()},Q=$=>{console.error("Employee operation failed:",$),alert($)},_=async $=>{var K,C,O,H;d.value="edit",c.value=$.id,l.value=!0,u.value=!0;try{const z=await pt.getEmployeeForEdit($.id);if(z.success&&z.data){const{employee:x,lookup_options:h,form_metadata:g}=z.data;E.value=h,A.value={...g,can_create_user_account:g.create_user_account},S.value={name_ar:x.name_ar||"",name_en:x.name_en||"",email:x.email||"",mobile_number:x.mobile_number||x.phone||"",civil_id:x.civil_id||"",nationality:((K=x.nationality)==null?void 0:K.name_ar)||((C=x.nationality)==null?void 0:C.name_en)||"",job_title:(typeof x.job_title=="object"?(O=x.job_title)==null?void 0:O.name_ar:x.job_title)||x.position||"",branch:(typeof x.branch=="object"?(H=x.branch)==null?void 0:H.name_ar:x.branch)||x.department||"",status:x.status||"active",employee_code:x.employee_code||"",country:x.country||""}}else throw new Error(z.message||"فشل في تحميل بيانات الموظف")}catch(z){console.error("Failed to load employee details:",z),alert(z.message||"حدث خطأ في تحميل بيانات الموظف"),W()}finally{u.value=!1}},ne=$=>{t.push(`/office/employees/${$.id}`)},pe=le(()=>{let $=n.value;return o.value&&($=$.filter(K=>{var C,O;return K.name_ar.toLowerCase().includes(o.value.toLowerCase())||K.name_en.toLowerCase().includes(o.value.toLowerCase())||K.email.toLowerCase().includes(o.value.toLowerCase())||((typeof K.job_title=="object"?(C=K.job_title)==null?void 0:C.name_ar:K.job_title)||K.position||"").toLowerCase().includes(o.value.toLowerCase())||((typeof K.branch=="object"?(O=K.branch)==null?void 0:O.name_ar:K.branch)||K.department||"").toLowerCase().includes(o.value.toLowerCase())||(K.mobile_number||K.phone).includes(o.value)})),$}),Te=le(()=>Math.ceil(pe.value.length/parseInt(i.value))),He=le(()=>{const $=(r.value-1)*parseInt(i.value),K=$+parseInt(i.value);return pe.value.slice($,K)}),ue=le(()=>Math.ceil(pe.value.length/parseInt(i.value))),Y=le(()=>{const $=ue.value,K=r.value,C=[];if($<=7)for(let O=1;O<=$;O++)C.push(O);else K<=4?C.push(1,2,3,4,5,"...",$):K>=$-3?C.push(1,"...",$-4,$-3,$-2,$-1,$):C.push(1,"...",K-1,K,K+1,"...",$);return C}),L=async $=>{try{await navigator.clipboard.writeText($)}catch(K){console.error("Failed to copy text: ",K)}},p=()=>{r.value>1&&r.value--},U=()=>{r.value<ue.value&&r.value++},J=$=>{typeof $=="number"&&(r.value=$)},Oe=async()=>{u.value=!0,f.value="";try{const $=await pt.getEmployees({page:r.value,per_page:parseInt(i.value),search:o.value||void 0});if($.success&&$.data)n.value=$.data;else throw new Error($.message||"فشل في تحميل بيانات الموظفين")}catch($){f.value=$.message||"حدث خطأ في تحميل بيانات الموظفين",console.error("Failed to load employees:",$)}finally{u.value=!1}},qe=$=>{y.value={show:!0,employeeToDelete:$}},De=()=>{y.value={show:!1,employeeToDelete:null}},Ie=()=>{b.value={show:!1,message:""}},Xe=()=>{v.value={show:!1,message:""}},Ne=async()=>{var K,C,O,H;if(!y.value.employeeToDelete)return;const $=y.value.employeeToDelete;De(),m.value=!0;try{console.log(`Attempting to delete employee with ID: ${$.id}`);const z=await pt.deleteEmployee($.id);if(console.log("Delete response:",z),z.success){n.value=n.value.filter(h=>h.id!==$.id);const x=z.message||`تم حذف الموظف "${$.name_ar}" من النظام بنجاح. سيتم تحديث قائمة الموظفين تلقائياً.`;b.value={show:!0,message:x},await Oe()}else{const x=z.message||"لم يتم حذف الموظف. يرجى المحاولة مرة أخرى.";throw new Error(x)}}catch(z){console.error("Failed to delete employee:",z);let x="";((K=z.response)==null?void 0:K.status)===404?x="الموظف غير موجود في النظام أو تم حذفه مسبقاً.":((C=z.response)==null?void 0:C.status)===403?x="ليس لديك صلاحية لحذف هذا الموظف.":((O=z.response)==null?void 0:O.status)===400?x="لا يمكن حذف هذا الموظف. قد يكون مرتبطاً ببيانات أخرى في النظام.":((H=z.response)==null?void 0:H.status)>=500?x="خطأ في الخادم. يرجى المحاولة لاحقاً أو الاتصال بالدعم الفني.":z.message?x=z.message:x=`حدث خطأ غير متوقع أثناء حذف الموظف "${$.name_ar}". يرجى المحاولة مرة أخرى.`,v.value={show:!0,message:x},await Oe()}finally{m.value=!1}};return Ut(()=>{Oe()}),($,K)=>{var C;return R(),P("div",Kv,[X(ur,{sidebarCollapsed:s.value,onToggleSidebar:T},null,8,["sidebarCollapsed"]),a("div",Wv,[X(dr,{isCollapsed:s.value,onToggle:T},null,8,["isCollapsed"]),a("div",{class:re(["flex flex-col flex-1 min-h-full transition-all duration-300",s.value?"mr-16":"mr-64"])},[a("div",{class:"px-6 py-4"},[a("div",{class:"flex items-center justify-between mb-4"},[K[3]||(K[3]=a("h1",{class:"text-2xl font-bold text-[#1a1a1a]"},"إدارة الموظفين",-1)),a("button",{onClick:N,class:"flex items-center gap-3 px-6 py-3 bg-[#DA7E13] text-white rounded-lg hover:bg-[#DA7E13]/90 transition-colors text-base font-medium"},K[2]||(K[2]=[a("svg",{class:"w-4 h-4 fill-current",viewBox:"0 0 24 24"},[a("path",{d:"M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z"})],-1),a("span",null,"إضافة موظف",-1)]))]),K[4]||(K[4]=Ft('<nav class="flex items-center text-sm text-gray-600" dir="rtl" data-v-0c1f66ac><span class="text-[#DA7E13]" data-v-0c1f66ac>الرئيسية</span><span class="mx-2" data-v-0c1f66ac>/</span><span class="text-[#DA7E13]" data-v-0c1f66ac>إدارة الموظفين</span><span class="mx-2" data-v-0c1f66ac>/</span><span class="text-gray-400" data-v-0c1f66ac>الموظفين</span></nav>',1))]),a("div",Jv,[a("div",Gv,[a("div",Zv,[K[9]||(K[9]=Ft('<div class="flex items-center gap-4" data-v-0c1f66ac><h2 class="text-lg font-semibold text-[#54524F] whitespace-nowrap" data-v-0c1f66ac>ملفات الموظفين</h2><select class="px-4 py-2 border border-gray-300 rounded text-sm focus:ring-2 focus:ring-[#DA7E13] focus:border-[#DA7E13] bg-white min-w-[140px]" data-v-0c1f66ac><option value="" data-v-0c1f66ac>الفرع</option><option value="main" data-v-0c1f66ac>الرئيسي</option><option value="02" data-v-0c1f66ac>02</option><option value="03" data-v-0c1f66ac>03</option></select><select class="px-4 py-2 border border-gray-300 rounded text-sm focus:ring-2 focus:ring-[#DA7E13] focus:border-[#DA7E13] bg-white min-w-[140px]" data-v-0c1f66ac><option value="" data-v-0c1f66ac>مكان البحث</option><option value="kuwait" data-v-0c1f66ac>الكويت</option><option value="riyadh" data-v-0c1f66ac>الرياض</option><option value="dubai" data-v-0c1f66ac>دبي</option></select></div>',1)),a("div",Yv,[a("div",Qv,[ge(a("input",{type:"text","onUpdate:modelValue":K[0]||(K[0]=O=>o.value=O),placeholder:"بحث...",class:"w-80 px-4 py-2 pr-10 border border-gray-300 rounded text-right text-sm focus:ring-2 focus:ring-[#DA7E13] focus:border-[#DA7E13] bg-white"},null,512),[[Be,o.value]]),K[5]||(K[5]=a("svg",{class:"absolute right-3 top-1/2 transform -translate-y-1/2 w-4 h-4 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})],-1))])]),a("div",Xv,[a("div",ey,[K[7]||(K[7]=a("span",{class:"text-sm text-[#54524F]"},"عرض",-1)),ge(a("select",{"onUpdate:modelValue":K[1]||(K[1]=O=>i.value=O),class:"px-3 py-2 border border-gray-300 rounded text-sm focus:ring-2 focus:ring-[#DA7E13] focus:border-[#DA7E13] bg-white"},K[6]||(K[6]=[a("option",{value:"15"},"15",-1),a("option",{value:"10"},"10",-1),a("option",{value:"25"},"25",-1),a("option",{value:"50"},"50",-1)]),512),[[Ye,i.value]])]),K[8]||(K[8]=a("button",{class:"flex items-center gap-2 px-4 py-2 bg-transparent text-[#54524F] text-sm font-medium rounded-lg border border-gray-300 hover:bg-gray-50 transition-colors"},[a("svg",{class:"w-4 h-4 fill-[#DA7E13]",viewBox:"0 0 24 24"},[a("path",{d:"M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z"})]),Ce(" تصدير ")],-1))])])]),a("div",ty,[a("div",sy,[a("table",ny,[K[15]||(K[15]=a("thead",{class:"bg-[#F8F9FA]"},[a("tr",{class:"text-right border-b border-gray-200"},[a("th",{class:"px-4 py-3 text-sm font-medium text-[#54524F] border-r border-gray-200"},"#"),a("th",{class:"px-4 py-3 text-sm font-medium text-[#54524F] border-r border-gray-200"},[a("div",{class:"flex items-center justify-end gap-1"},[a("span",null,"الاسم عربي"),a("svg",{class:"w-3 h-3 text-gray-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 9l4-4 4 4m0 6l-4 4-4-4"})])])]),a("th",{class:"px-4 py-3 text-sm font-medium text-[#54524F] border-r border-gray-200"},"الاسم انجليزي"),a("th",{class:"px-4 py-3 text-sm font-medium text-[#54524F] border-r border-gray-200"},"البريد الإلكتروني"),a("th",{class:"px-4 py-3 text-sm font-medium text-[#54524F] border-r border-gray-200"},"الفرع"),a("th",{class:"px-4 py-3 text-sm font-medium text-[#54524F] border-r border-gray-200"},"رقم الجوال"),a("th",{class:"px-4 py-3 text-sm font-medium text-[#54524F] border-r border-gray-200"},"المسمى الوظيفي"),a("th",{class:"px-4 py-3 text-sm font-medium text-[#54524F] border-r border-gray-200"},"خيارات")])],-1)),a("tbody",null,[(R(!0),P(ve,null,Le(He.value,(O,H)=>{var z,x;return R(),P("tr",{key:O.id,class:"hover:bg-gray-50 border-b border-gray-200 last:border-b"},[a("td",oy,F(String((r.value-1)*parseInt(i.value)+H+1).padStart(2,"0")),1),a("td",ry,[a("div",iy,[a("span",ay,F(O.name_ar),1),a("button",{class:"text-gray-400 hover:text-[#DA7E13] focus:outline-none focus:ring-0 active:outline-none",onClick:h=>L(O.name_ar)},K[10]||(K[10]=[a("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1)]),8,ly)])]),a("td",cy,[a("div",uy,[a("span",dy,F(O.name_en),1),a("button",{class:"text-gray-400 hover:text-[#DA7E13] focus:outline-none focus:ring-0 active:outline-none",onClick:h=>L(O.name_en)},K[11]||(K[11]=[a("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[a("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})],-1)]),8,fy)])]),a("td",py,F(O.email),1),a("td",hy,F((typeof O.branch=="object"?(z=O.branch)==null?void 0:z.name_ar:O.branch)||O.department||"N/A"),1),a("td",my,F(O.mobile_number||O.phone),1),a("td",gy,F((typeof O.job_title=="object"?(x=O.job_title)==null?void 0:x.name_ar:O.job_title)||O.position||"N/A"),1),a("td",vy,[a("div",yy,[a("button",{onClick:h=>ne(O),class:"p-1 text-[#DA7E13] hover:bg-orange-50 rounded",title:"عرض"},K[12]||(K[12]=[a("svg",{class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},[a("path",{d:"M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z"})],-1)]),8,by),a("button",{onClick:h=>_(O),class:"p-1 text-blue-600 hover:bg-blue-50 rounded",title:"تعديل"},K[13]||(K[13]=[a("svg",{class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},[a("path",{d:"M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z"})],-1)]),8,_y),a("button",{onClick:h=>qe(O),class:"p-1 text-red-600 hover:bg-red-50 rounded",title:"حذف"},K[14]||(K[14]=[a("svg",{class:"w-4 h-4",fill:"currentColor",viewBox:"0 0 24 24"},[a("path",{d:"M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z"})],-1)]),8,xy)])])])}),128))])])]),a("div",wy,[a("div",Cy," من أصل "+F(Te.value)+" صفحة ",1),a("div",Ey,[a("button",{onClick:p,disabled:r.value===1,class:"px-3 py-1 text-sm border border-gray-300 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"}," < ",8,Sy),(R(!0),P(ve,null,Le(Y.value,O=>(R(),P("button",{key:O,onClick:H=>J(O),class:re({"px-3 py-1 text-sm rounded":!0,"bg-[#DA7E13] text-white":O===r.value,"border border-gray-300 hover:bg-gray-50 text-[#54524F]":O!==r.value,"cursor-default":O==="..."}),disabled:O==="..."},F(O),11,Ay))),128)),a("button",{onClick:U,disabled:r.value>=ue.value,class:"px-3 py-1 text-sm border border-gray-300 rounded hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed"}," > ",8,ky)])])])])],2)]),X(bl,{isVisible:l.value,employeeId:c.value,mode:d.value,onClose:W,onSuccess:te,onError:Q},null,8,["isVisible","employeeId","mode"]),X(je(wn),{isVisible:y.value.show,type:"warning",title:"تأكيد حذف الموظف",message:`هل أنت متأكد من حذف الموظف '${(C=y.value.employeeToDelete)==null?void 0:C.name_ar}'؟ لا يمكن التراجع عن هذا الإجراء وسيتم حذف جميع البيانات المرتبطة بهذا الموظف نهائياً.`,confirmText:"حذف",showCancel:!0,onClose:De,onConfirm:Ne},null,8,["isVisible","message"]),X(je(wn),{isVisible:b.value.show,type:"success",title:"تم حذف الموظف بنجاح",message:b.value.message,confirmText:"حسناً",onClose:Ie},null,8,["isVisible","message"]),X(je(wn),{isVisible:v.value.show,type:"error",title:"فشل في حذف الموظف",message:v.value.message,confirmText:"حسناً",onClose:Xe},null,8,["isVisible","message"])])}}}),Ry=Pe($y,[["__scopeId","data-v-0c1f66ac"]]),Ty=[{path:"/",redirect:"/dashboard"},{path:"/dashboard",name:"Dashboard",component:Hm,meta:{requiresAuth:!0}},{path:"/clients",name:"Clients",component:()=>ft(()=>import("./ClientsManagement-Dhv4ZC-2.js"),__vite__mapDeps([0,1,2])),meta:{requiresAuth:!0}},{path:"/cases",name:"Cases",component:()=>ft(()=>import("./CasesManagement-BQJLB9tv.js"),__vite__mapDeps([3,2])),meta:{requiresAuth:!0}},{path:"/clients/:id",name:"ClientDetails",component:()=>ft(()=>import("./ClientDetails-CiPqnIEM.js"),[]),meta:{requiresAuth:!0}},{path:"/cases/add",name:"AddCase",component:()=>ft(()=>import("./index-CJ0WrLJm.js"),__vite__mapDeps([4,1,2])),meta:{requiresAuth:!0}},{path:"/cases/:id",name:"CaseDetails",component:()=>ft(()=>import("./CaseDetails-D3CyOhJA.js"),__vite__mapDeps([5,2])),meta:{requiresAuth:!0}},{path:"/clients/:id/add-case",name:"AddCaseFromClient",component:()=>ft(()=>import("./index-CJ0WrLJm.js"),__vite__mapDeps([4,1,2])),meta:{requiresAuth:!0}},{path:"/superadmin",meta:{requiresAuth:!0,role:"SuperAdmin"},children:[{path:"offices",name:"SuperAdminOffices",component:z0,meta:{requiresAuth:!0,role:"SuperAdmin"}},{path:"admins",name:"SuperAdminAdmins",component:Pg,meta:{requiresAuth:!0,role:"SuperAdmin"}}]},{path:"/office",meta:{requiresAuth:!0,role:"OfficeAdmin"},children:[{path:"employees",name:"OfficeAdminEmployees",component:zv,meta:{requiresAuth:!0,role:"OfficeAdmin"}},{path:"employees/files",name:"OfficeAdminEmployeeFiles",component:Ry,meta:{requiresAuth:!0,role:"OfficeAdmin"}},{path:"employees/permissions",name:"OfficeAdminEmployeePermissions",component:()=>ft(()=>import("./Permissions-Bu_NcXnh.js"),__vite__mapDeps([6,7,2])),meta:{requiresAuth:!0,role:"OfficeAdmin"}},{path:"employees/permissions/add",name:"OfficeAdminAddRole",component:()=>ft(()=>import("./RoleEditor-RTkSpICa.js"),__vite__mapDeps([8,7,9])),meta:{requiresAuth:!0,role:"OfficeAdmin"}},{path:"employees/permissions/:id/edit",name:"OfficeAdminEditRole",component:()=>ft(()=>import("./RoleEditor-RTkSpICa.js"),__vite__mapDeps([8,7,9])),meta:{requiresAuth:!0,role:"OfficeAdmin"}},{path:"employees/permissions/:id/view",name:"OfficeAdminViewRole",component:()=>ft(()=>import("./RoleEditor-RTkSpICa.js"),__vite__mapDeps([8,7,9])),meta:{requiresAuth:!0,role:"OfficeAdmin"}},{path:"employees/:id",name:"EmployeeDetails",component:()=>ft(()=>import("./EmployeeDetails-DI4FFMxc.js"),__vite__mapDeps([10,2])),meta:{requiresAuth:!0,role:"OfficeAdmin"}}]},{path:"/login",name:"Login",component:i0,meta:{requiresGuest:!0}},{path:"/:pathMatch(.*)*",name:"NotFound",component:d0,meta:{requiresAuth:!0}}],fr=Gd({history:Ed(),routes:Ty});fr.beforeEach((e,t,s)=>{const n=e.matched.some(i=>i.meta.requiresAuth),o=e.matched.some(i=>i.meta.requiresGuest),r=e.meta.role;if(n){if(!fi()){s("/login");return}if(r&&!of(r)){const i=_s();s(i==="SuperAdmin"?"/superadmin/offices":i==="OfficeAdmin"?"/office/employees":i==="Employee"?"/clients":"/login");return}}if(o&&fi()){const i=_s();s(i==="SuperAdmin"?"/superadmin/offices":i==="OfficeAdmin"?"/office/employees":i==="Employee"?"/clients":"/dashboard");return}s()});fr.afterEach(e=>{const t="Legal Office Management System";document.title=e.name?`${String(e.name)} - ${t}`:t});Nu(qu).use(fr).mount("#app");export{wn as A,Ws as B,Xt as C,pt as D,Cs as E,ve as F,Yd as G,$o as H,kt as I,Bs as J,Pu as K,ie as L,dr as S,ur as T,Pe as _,_s as a,P as b,le as c,he as d,X as e,a as f,Kn as g,Ft as h,ye as i,Ly as j,Be as k,Ce as l,Le as m,re as n,Ut as o,Iy as p,Py as q,G as r,Et as s,F as t,je as u,Ye as v,ge as w,Re as x,la as y,R as z};
SAVE
CANCEL