@studio-west/employees 0.6.70 → 0.6.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/dist/SheetTable.cjs +2 -2
  2. package/dist/SheetTable.js +2 -2
  3. package/dist/{SwDatePicker-CJjKSM8k-DcbaIBqf.cjs → SwDatePicker-CJjKSM8k-BM055u68.cjs} +1 -1
  4. package/dist/{SwDatePicker-CJjKSM8k-Dz6BUMAi.js → SwDatePicker-CJjKSM8k-MaDENLOD.js} +1 -1
  5. package/dist/{SwDropdownItem-CtlMVgsX-Dhus9MXM.js → SwDropdownItem-CtlMVgsX-B0y_klNq.js} +1 -1
  6. package/dist/{SwDropdownItem-CtlMVgsX-ZJmmZqlp.cjs → SwDropdownItem-CtlMVgsX-DZBTkRCg.cjs} +1 -1
  7. package/dist/{SwGide-DbSSyZ-y-DpAbGOSb.cjs → SwGide-DbSSyZ-y-BJOOalKN.cjs} +1 -1
  8. package/dist/{SwGide-DbSSyZ-y-cGa25fRm.js → SwGide-DbSSyZ-y-CdqOXtTf.js} +1 -1
  9. package/dist/{SwInput-DCV1rrWa-uyVhv0SO.js → SwInput-DCV1rrWa-RwwuH45g.js} +1 -1
  10. package/dist/{SwInput-DCV1rrWa-cwMXMtK3.cjs → SwInput-DCV1rrWa-VI25fSFi.cjs} +1 -1
  11. package/dist/{SwMessage-CovKkpf6-7NQhNWpm.cjs → SwMessage-CovKkpf6-BldEKjAC.cjs} +1 -1
  12. package/dist/{SwMessage-CovKkpf6-BgcDsGln.js → SwMessage-CovKkpf6-DgzuTa6f.js} +1 -1
  13. package/dist/{SwSlider-YncjYKPw-C4F8HTBj.js → SwSlider-YncjYKPw-DWb3SdAc.js} +1 -1
  14. package/dist/{SwSlider-YncjYKPw-BwGmkWB-.cjs → SwSlider-YncjYKPw-RQiE3xTC.cjs} +1 -1
  15. package/dist/{VacationTable-C2EEujIB.js → VacationTable-B0YqgIi2.js} +2 -2
  16. package/dist/{VacationTable-DkgIpYNP.cjs → VacationTable-DT5FUQ4-.cjs} +1 -1
  17. package/dist/VacationTable.cjs +1 -1
  18. package/dist/VacationTable.js +2 -2
  19. package/dist/WorkTable.cjs +2 -2
  20. package/dist/WorkTable.js +61 -61
  21. package/dist/{index-BgsOWV25.js → index-DaZTfcYO.js} +2 -2
  22. package/dist/{index-CP8E7I_f.cjs → index-uKIn9vG1.cjs} +1 -1
  23. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { ref as Q, computed as Bt, watch as qe, resolveComponent as Ct, resolveDirective as bn, createElementBlock as Le, openBlock as le, Fragment as Be, createElementVNode as Ce, createVNode as j, withDirectives as Sn, createBlock as fe, createCommentVNode as ye, unref as h, withCtx as M, renderList as ut, createTextVNode as ie, toDisplayString as q, resolveDynamicComponent as Cn, nextTick as wn } from "vue";
2
2
  import { useI18n as An } from "vue-i18n";
3
- import { p as ge, b as Ve, a as Yt, h as In, c as jt, d as ae, e as Ht } from "./index-BgsOWV25.js";
3
+ import { p as ge, b as Ve, a as Yt, h as In, c as jt, d as ae, e as Ht } from "./index-DaZTfcYO.js";
4
4
  import { ElSelect as xn, ElOption as Nn, ElButton as De, ElSwitch as dt, ElTable as Tn, ElTableColumn as ce, ElDialog as On, ElForm as $n } from "element-plus";
5
5
  import { ContextMenu as Dn, ContextMenuSeparator as _n, ContextMenuGroup as kn, ContextMenuItem as et } from "@imengyu/vue3-context-menu";
6
6
  import { saveAs as Gt } from "file-saver";
@@ -4095,7 +4095,7 @@ const Pn = /* @__PURE__ */ Kt(Fn), Rn = { class: "nav" }, zn = { style: { height
4095
4095
  return s = typeof s < "u" ? s.match(/(\d{1,2}):\d{2}\s*-\s*(\d{1,2})/) : [0, 9, 18], Number(i[1]) < Number(s[1]) ? `${i[1]}:00 по ${Number(i[1]) + S.value}:00` : `${Number(i[2]) - S.value}:00 по ${i[2]}:00`;
4096
4096
  }, ht = () => {
4097
4097
  let i = /РВ/.test(Oe.value), s = Ht(f.value[y.value.ids * 2].name.match(/\(([^)]+)\)/)[1]), T = Ht(Me.value), d = f.value[y.value.ids * 2].fio.split(" ");
4098
- d = At({ last: d[0], first: d[1], middle: d[2] }, "genitive");
4098
+ d = At({ last: d[0], first: d[1], middle: d[2] }, "accusative");
4099
4099
  let C = N.fullName.split(" ");
4100
4100
  C = At({ last: C[0], first: C[1], middle: C[2] }, "genitive");
4101
4101
  let u = i ? Oe.value.match(/\(([^)]+)\)/)[1].replace("-", " по ") : Pe();
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./VacationTable-DkgIpYNP.cjs"),H={class:"sw-data-picker"},J={key:0,class:"month_year"},K={class:"text"},R={key:1,class:"month_year"},Z={class:"text"},Q={key:2,class:"week"},X={key:3,class:"year"},ee=["onClick"],te={key:4,class:"year"},ae=["onClick"],le={key:5,class:"month"},ne=["onClick"],re={key:0},oe={key:0,class:"month_year"},ue={class:"text"},ce={key:1,class:"month_year"},se={class:"text"},ie={key:2,class:"week"},ve={key:3,class:"year"},de=["onClick"],me={key:4,class:"year"},ke=["onClick"],pe={key:5,class:"month"},ye=["onClick"],ge={__name:"SwDatePicker",props:{data:Object,limitation:{type:[Boolean,Array],default:()=>!1},range:{type:String,default:"solid"}},emits:["input"],setup(q,{emit:A}){var Y,z,_,I,j;const r=q,b=A,s=e.ref(5),y=e.ref(new Date),N=e.ref(new Date),u=e.ref(new Date().getFullYear()),o=e.ref(new Date().getMonth()),T=e.ref(new Date().getFullYear()),F=e.ref(new Date().getMonth()),V=e.ref(new Date(u.value,o.value+1,1).getMonth()),c=e.ref([]),B=e.ref(0),m=e.ref(-1),f=e.ref(-1),x=e.ref(navigator.language||"ru"),w=/en|zh|ja|he/.test(x.value)?0:1,L=e.computed(()=>Array.from({length:12},(l,t)=>{const a=new Date(2024,t);return new Intl.DateTimeFormat(x.value,{month:"long"}).format(a)})),h=e.ref(Math.floor(u.value/10)*10),D=e.computed(()=>Array.from({length:12},(l,t)=>h.value+t-1));(Y=r.data)!=null&&Y.startDate?(y.value=new Date(v.U(r.data.startDate)),u.value=y.value.getFullYear(),o.value=y.value.getMonth()):(z=r.data)!=null&&z.firstDate&&(u.value=new Date(v.U(r.data.firstDate)).getFullYear(),o.value=new Date(v.U(r.data.firstDate)).getMonth(),V.value=new Date(u.value,o.value+1,1).getMonth()),(_=r.data)!=null&&_.endDate&&r.range==="range"&&(N.value=new Date(v.U(r.data.endDate)),T.value=N.value.getFullYear(),F.value=N.value.getMonth());const $=()=>{c.value=[],B.value=0;const l=new Date(u.value,o.value,0);for(let a=l.getDate()-l.getDay()+w;a<=l.getDate();a++)l.getDay()!==6+w&&(c.value.push({day:a,month:l.getMonth(),year:l.getFullYear(),class:[]}),B.value++);const t=new Date(u.value,o.value+1,0).getDate();for(let a=1;a<=t;a++)c.value.push({day:a,month:o.value,year:u.value,class:[]}),B.value++;if(r.range==="range"){const a=new Date(u.value,o.value+1,1),n=new Date(u.value,o.value+2,0).getDate();for(let i=1;i<=n;i++)c.value.push({day:i,month:a.getMonth(),year:a.getFullYear(),class:[]})}O()},O=()=>{var t;if(!((t=r.data)!=null&&t.holiday))return;const l=(a,n)=>{a.forEach(i=>{const[p,k,g]=i.split("-").map(Number),E=c.value.findIndex(S=>S.year===p&&S.month+1===k&&S.day===g);E!==-1&&(c.value[E].class[0]=n)})};l(r.data.holiday.preholidays,"preholiday"),l(r.data.holiday.holidays,"weekend"),l(r.data.holiday.holiday,"holiday"),l(r.data.holiday.nowork,"nowork")},P=()=>{if(!r.limitation||r.limitation.length<2)return!1;const l=[...r.limitation].sort((t,a)=>new Date(v.U(t.startDate)).getTime()-new Date(v.U(a.startDate)).getTime());for(let t=1;t<l.length;t++){const a=new Date(v.U(l[t-1].endDate));if(new Date(v.U(l[t].startDate))<=a)return console.warn("Warning: Диапазоны пересекаются:",l[t-1],l[t]),!0}return!1},C=(l,t,a)=>{if(!r.limitation||r.limitation.length===0)return!0;const n=new Date(l,t,a).getTime();for(let i of r.limitation){const{startDate:p,endDate:k}=i;if(!p&&k){const g=new Date(v.U(k)).getTime();if(n<=g)return!1}if(p&&!k){const g=new Date(v.U(p)).getTime();if(n>=g)return!1}if(p&&k){const g=new Date(v.U(p)).getTime(),E=new Date(v.U(k)).getTime();if(g<=E){if(n>=g&&n<=E)return!1}else if(n>=g||n<=E)return!1}}return!0},M=(l,t)=>{const a=v.L(new Date(l.year,l.month,l.day),"{dd}.{m}.{Y}");r.range==="range"?f.value!==-1?(W(),m.value=t,c.value[t].class[1]="active"):m.value!==-1?(f.value=t,G(m.value,f.value,a)):(m.value=t,c.value[t].class[1]="active"):(m.value!==-1&&(c.value[m.value].class[1]=""),m.value=t,c.value[t].class[1]="active",b("input",{dateStart:a,count:1}))},W=()=>{c.value.forEach(l=>l.class[1]=""),m.value=-1,f.value=-1},G=(l,t,a)=>{let n=v.L(new Date(c.value[l].year,c.value[l].month,c.value[l].day),"{dd}.{m}.{Y}");if(t>=l){for(let i=l+1;i<t;i++)c.value[i].class[1]="select";b("input",{dateStart:n,dateEnd:a,count:U(l,t)})}else{for(let i=t+1;i<l;i++)c.value[i].class[1]="select";b("input",{dateStart:a,dateEnd:n,count:U(t,l)})}c.value[t].class[1]="active"},U=(l,t)=>{var p;let a=Math.abs(l-t)+1,[n,i]=[Math.min(l,t),Math.max(l,t)];for(let k=n;k<=i;k++)((p=c.value[k])==null?void 0:p.class[0])==="holiday"&&a--;return a},d=(l,t)=>{C(l,t)&&(y.value=new Date(l,t,1),u.value=y.value.getFullYear(),o.value=y.value.getMonth(),V.value=new Date(l,t+1,1).getMonth(),(r.range==="year"||r.range==="decades")&&s.value===0?M({year:l,month:t,day:1},8):$())};if($(),P(),(I=r.data)!=null&&I.startDate&&(m.value=c.value.findIndex(l=>l.day===y.value.getDate()&&l.month===o.value&&l.year===u.value),m.value!==-1&&(c.value[m.value].class[1]="active")),((j=r.data)==null?void 0:j.endDate)&&r.range==="range"&&(f.value=c.value.findIndex(l=>l.day===N.value.getDate()&&l.month===F.value&&l.year===T.value),f.value!==-1)){c.value[f.value].class[1]="active";for(let l=m.value+1;l<f.value;l++)c.value[l].class[1]="select"}return(l,t)=>(e.openBlock(),e.createElementBlock("div",H,[e.createElementVNode("div",null,[r.range==="decades"||s.value===3?(e.openBlock(),e.createElementBlock("p",J,[e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:t[0]||(t[0]=e.withModifiers(a=>{h.value-=10,d(u.value,o.value)},["prevent"]))},[e.renderSlot(l.$slots,"double-arrow",{},()=>[t[16]||(t[16]=e.createTextVNode("«",-1))])])]),e.createElementVNode("span",K,e.toDisplayString(D.value[0])+" - "+e.toDisplayString(D.value[11]),1),e.createElementVNode("span",null,[e.createElementVNode("button",{class:"sw-revers",onClick:t[1]||(t[1]=e.withModifiers(a=>{h.value+=10,d(u.value,o.value)},["prevent"]))},[e.renderSlot(l.$slots,"double-arrow",{},()=>[t[17]||(t[17]=e.createTextVNode("«",-1))])])])])):(e.openBlock(),e.createElementBlock("p",R,[e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:t[2]||(t[2]=e.withModifiers(a=>d(u.value-1,o.value),["prevent"]))},[e.renderSlot(l.$slots,"double-arrow",{},()=>[t[18]||(t[18]=e.createTextVNode("«",-1))])]),e.createElementVNode("button",{onClick:t[3]||(t[3]=e.withModifiers(a=>{s.value=0,d(u.value,o.value-1)},["prevent"]))},[e.renderSlot(l.$slots,"arrow",{},()=>[t[19]||(t[19]=e.createTextVNode("‹",-1))])])]),e.createElementVNode("span",Z,[e.createElementVNode("button",{onClick:t[4]||(t[4]=e.withModifiers(a=>s.value=3,["prevent"]))},e.toDisplayString(u.value),1),e.createElementVNode("button",{onClick:t[5]||(t[5]=e.withModifiers(a=>s.value=1,["prevent"]))},e.toDisplayString(e.unref(v.L)(y.value.setMonth(o.value),"{F}")),1)]),e.createElementVNode("span",null,[e.createElementVNode("button",{class:"sw-revers",onClick:t[6]||(t[6]=e.withModifiers(a=>{s.value=0,d(u.value,o.value+1)},["prevent"]))},[e.renderSlot(l.$slots,"arrow",{},()=>[t[20]||(t[20]=e.createTextVNode("‹",-1))])]),e.createElementVNode("button",{class:"sw-revers",onClick:t[7]||(t[7]=e.withModifiers(a=>d(u.value+1,o.value),["prevent"]))},[e.renderSlot(l.$slots,"double-arrow",{},()=>[t[21]||(t[21]=e.createTextVNode("«",-1))])])])])),r.range==="year"||r.range==="decades"||s.value===1||s.value===3?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Q,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(7,(a,n)=>e.createElementVNode("button",{key:n,class:"disabled"},e.toDisplayString(e.unref(v.L)(new Date(1970,1,a+e.unref(w)),"{D}")),1)),64))])),s.value!==3&&r.range==="year"||s.value===1?(e.openBlock(),e.createElementBlock("div",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(a,n)=>(e.openBlock(),e.createElementBlock("button",{key:n,onClick:e.withModifiers(i=>{s.value=0,d(u.value,n)},["prevent"]),class:e.normalizeClass(n===o.value?"active":"")},e.toDisplayString(a),11,ee))),128))])):r.range==="decades"||s.value===3?(e.openBlock(),e.createElementBlock("div",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(a,n)=>(e.openBlock(),e.createElementBlock("button",{key:n,onClick:e.withModifiers(i=>{s.value=r.range==="year"?1:0,d(a,o.value)},["prevent"]),class:e.normalizeClass(h.value+n-1===u.value?"active":"")},e.toDisplayString(a),11,ae))),128))])):(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[n<B.value+(7-new Date(u.value,o.value+1,1).getDay()+e.unref(w))%7?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(a.month===o.value&&C(a.year,a.month,a.day)?a.class:"disabled"),onClick:e.withModifiers(()=>{a.month===o.value&&M(a,n)},["prevent"])},e.toDisplayString(a.day),11,ne)):e.createCommentVNode("",!0)],64))),128))]))]),r.range==="range"?(e.openBlock(),e.createElementBlock("div",re,[r.range==="decades"||s.value===4?(e.openBlock(),e.createElementBlock("p",oe,[e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:t[8]||(t[8]=e.withModifiers(a=>{h.value-=10,d(u.value,o.value)},["prevent"]))},[e.renderSlot(l.$slots,"double-arrow",{},()=>[t[22]||(t[22]=e.createTextVNode("«",-1))])])]),e.createElementVNode("span",ue,e.toDisplayString(D.value[0])+" - "+e.toDisplayString(D.value[11]),1),e.createElementVNode("span",null,[e.createElementVNode("button",{class:"sw-revers",onClick:t[9]||(t[9]=e.withModifiers(a=>{h.value+=10,d(u.value,o.value)},["prevent"]))},[e.renderSlot(l.$slots,"double-arrow",{},()=>[t[23]||(t[23]=e.createTextVNode("«",-1))])])])])):(e.openBlock(),e.createElementBlock("p",ce,[e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:t[10]||(t[10]=e.withModifiers(a=>d(u.value-1,o.value),["prevent"]))},[e.renderSlot(l.$slots,"double-arrow",{},()=>[t[24]||(t[24]=e.createTextVNode("«",-1))])]),e.createElementVNode("button",{onClick:t[11]||(t[11]=e.withModifiers(a=>{s.value=0,d(u.value,o.value-1)},["prevent"]))},[e.renderSlot(l.$slots,"arrow",{},()=>[t[25]||(t[25]=e.createTextVNode("‹",-1))])])]),e.createElementVNode("span",se,[e.createElementVNode("button",{onClick:t[12]||(t[12]=e.withModifiers(a=>s.value=4,["prevent"]))},e.toDisplayString(new Date(u.value,o.value+1).getFullYear()),1),e.createElementVNode("button",{onClick:t[13]||(t[13]=e.withModifiers(a=>s.value=2,["prevent"]))},e.toDisplayString(e.unref(v.L)(y.value.setMonth(o.value+1),"{F}")),1)]),e.createElementVNode("span",null,[e.createElementVNode("button",{class:"sw-revers",onClick:t[14]||(t[14]=e.withModifiers(a=>{s.value=0,d(u.value,o.value+1)},["prevent"]))},[e.renderSlot(l.$slots,"arrow",{},()=>[t[26]||(t[26]=e.createTextVNode("‹",-1))])]),e.createElementVNode("button",{class:"sw-revers",onClick:t[15]||(t[15]=e.withModifiers(a=>d(u.value+1,o.value),["prevent"]))},[e.renderSlot(l.$slots,"double-arrow",{},()=>[t[27]||(t[27]=e.createTextVNode("«",-1))])])])])),s.value===2||s.value===4?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(7,(a,n)=>e.createElementVNode("button",{key:n,class:"disabled"},e.toDisplayString(e.unref(v.L)(new Date(1970,1,a+e.unref(w)),"{D}")),1)),64))])),s.value===2?(e.openBlock(),e.createElementBlock("div",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(a,n)=>(e.openBlock(),e.createElementBlock("button",{key:n,onClick:e.withModifiers(i=>{s.value=0,d(u.value,n-1)},["prevent"]),class:e.normalizeClass(n===(o.value+1)%12?"active":"")},e.toDisplayString(a),11,de))),128))])):s.value===4?(e.openBlock(),e.createElementBlock("div",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(a,n)=>(e.openBlock(),e.createElementBlock("button",{key:n,onClick:e.withModifiers(i=>{s.value=0,d(a,o.value)},["prevent"]),class:e.normalizeClass(h.value+n-1===u.value?"active":"")},e.toDisplayString(a),11,ke))),128))])):(e.openBlock(),e.createElementBlock("div",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[n>=B.value-(7+new Date(u.value,o.value+1,1).getDay()-e.unref(w))%7?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(a.month===V.value&&C(a.year,a.month,a.day)?a.class:"disabled"),onClick:e.withModifiers(()=>{a.month===V.value&&M(a,n)},["prevent"])},e.toDisplayString(a.day),11,ye)):e.createCommentVNode("",!0)],64))),128))]))])):e.createCommentVNode("",!0)]))}};exports.default=ge;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),v=require("./VacationTable-DT5FUQ4-.cjs"),H={class:"sw-data-picker"},J={key:0,class:"month_year"},K={class:"text"},R={key:1,class:"month_year"},Z={class:"text"},Q={key:2,class:"week"},X={key:3,class:"year"},ee=["onClick"],te={key:4,class:"year"},ae=["onClick"],le={key:5,class:"month"},ne=["onClick"],re={key:0},oe={key:0,class:"month_year"},ue={class:"text"},ce={key:1,class:"month_year"},se={class:"text"},ie={key:2,class:"week"},ve={key:3,class:"year"},de=["onClick"],me={key:4,class:"year"},ke=["onClick"],pe={key:5,class:"month"},ye=["onClick"],ge={__name:"SwDatePicker",props:{data:Object,limitation:{type:[Boolean,Array],default:()=>!1},range:{type:String,default:"solid"}},emits:["input"],setup(q,{emit:A}){var Y,z,_,I,j;const r=q,b=A,s=e.ref(5),y=e.ref(new Date),N=e.ref(new Date),u=e.ref(new Date().getFullYear()),o=e.ref(new Date().getMonth()),T=e.ref(new Date().getFullYear()),F=e.ref(new Date().getMonth()),V=e.ref(new Date(u.value,o.value+1,1).getMonth()),c=e.ref([]),B=e.ref(0),m=e.ref(-1),f=e.ref(-1),x=e.ref(navigator.language||"ru"),w=/en|zh|ja|he/.test(x.value)?0:1,L=e.computed(()=>Array.from({length:12},(l,t)=>{const a=new Date(2024,t);return new Intl.DateTimeFormat(x.value,{month:"long"}).format(a)})),h=e.ref(Math.floor(u.value/10)*10),D=e.computed(()=>Array.from({length:12},(l,t)=>h.value+t-1));(Y=r.data)!=null&&Y.startDate?(y.value=new Date(v.U(r.data.startDate)),u.value=y.value.getFullYear(),o.value=y.value.getMonth()):(z=r.data)!=null&&z.firstDate&&(u.value=new Date(v.U(r.data.firstDate)).getFullYear(),o.value=new Date(v.U(r.data.firstDate)).getMonth(),V.value=new Date(u.value,o.value+1,1).getMonth()),(_=r.data)!=null&&_.endDate&&r.range==="range"&&(N.value=new Date(v.U(r.data.endDate)),T.value=N.value.getFullYear(),F.value=N.value.getMonth());const $=()=>{c.value=[],B.value=0;const l=new Date(u.value,o.value,0);for(let a=l.getDate()-l.getDay()+w;a<=l.getDate();a++)l.getDay()!==6+w&&(c.value.push({day:a,month:l.getMonth(),year:l.getFullYear(),class:[]}),B.value++);const t=new Date(u.value,o.value+1,0).getDate();for(let a=1;a<=t;a++)c.value.push({day:a,month:o.value,year:u.value,class:[]}),B.value++;if(r.range==="range"){const a=new Date(u.value,o.value+1,1),n=new Date(u.value,o.value+2,0).getDate();for(let i=1;i<=n;i++)c.value.push({day:i,month:a.getMonth(),year:a.getFullYear(),class:[]})}O()},O=()=>{var t;if(!((t=r.data)!=null&&t.holiday))return;const l=(a,n)=>{a.forEach(i=>{const[p,k,g]=i.split("-").map(Number),E=c.value.findIndex(S=>S.year===p&&S.month+1===k&&S.day===g);E!==-1&&(c.value[E].class[0]=n)})};l(r.data.holiday.preholidays,"preholiday"),l(r.data.holiday.holidays,"weekend"),l(r.data.holiday.holiday,"holiday"),l(r.data.holiday.nowork,"nowork")},P=()=>{if(!r.limitation||r.limitation.length<2)return!1;const l=[...r.limitation].sort((t,a)=>new Date(v.U(t.startDate)).getTime()-new Date(v.U(a.startDate)).getTime());for(let t=1;t<l.length;t++){const a=new Date(v.U(l[t-1].endDate));if(new Date(v.U(l[t].startDate))<=a)return console.warn("Warning: Диапазоны пересекаются:",l[t-1],l[t]),!0}return!1},C=(l,t,a)=>{if(!r.limitation||r.limitation.length===0)return!0;const n=new Date(l,t,a).getTime();for(let i of r.limitation){const{startDate:p,endDate:k}=i;if(!p&&k){const g=new Date(v.U(k)).getTime();if(n<=g)return!1}if(p&&!k){const g=new Date(v.U(p)).getTime();if(n>=g)return!1}if(p&&k){const g=new Date(v.U(p)).getTime(),E=new Date(v.U(k)).getTime();if(g<=E){if(n>=g&&n<=E)return!1}else if(n>=g||n<=E)return!1}}return!0},M=(l,t)=>{const a=v.L(new Date(l.year,l.month,l.day),"{dd}.{m}.{Y}");r.range==="range"?f.value!==-1?(W(),m.value=t,c.value[t].class[1]="active"):m.value!==-1?(f.value=t,G(m.value,f.value,a)):(m.value=t,c.value[t].class[1]="active"):(m.value!==-1&&(c.value[m.value].class[1]=""),m.value=t,c.value[t].class[1]="active",b("input",{dateStart:a,count:1}))},W=()=>{c.value.forEach(l=>l.class[1]=""),m.value=-1,f.value=-1},G=(l,t,a)=>{let n=v.L(new Date(c.value[l].year,c.value[l].month,c.value[l].day),"{dd}.{m}.{Y}");if(t>=l){for(let i=l+1;i<t;i++)c.value[i].class[1]="select";b("input",{dateStart:n,dateEnd:a,count:U(l,t)})}else{for(let i=t+1;i<l;i++)c.value[i].class[1]="select";b("input",{dateStart:a,dateEnd:n,count:U(t,l)})}c.value[t].class[1]="active"},U=(l,t)=>{var p;let a=Math.abs(l-t)+1,[n,i]=[Math.min(l,t),Math.max(l,t)];for(let k=n;k<=i;k++)((p=c.value[k])==null?void 0:p.class[0])==="holiday"&&a--;return a},d=(l,t)=>{C(l,t)&&(y.value=new Date(l,t,1),u.value=y.value.getFullYear(),o.value=y.value.getMonth(),V.value=new Date(l,t+1,1).getMonth(),(r.range==="year"||r.range==="decades")&&s.value===0?M({year:l,month:t,day:1},8):$())};if($(),P(),(I=r.data)!=null&&I.startDate&&(m.value=c.value.findIndex(l=>l.day===y.value.getDate()&&l.month===o.value&&l.year===u.value),m.value!==-1&&(c.value[m.value].class[1]="active")),((j=r.data)==null?void 0:j.endDate)&&r.range==="range"&&(f.value=c.value.findIndex(l=>l.day===N.value.getDate()&&l.month===F.value&&l.year===T.value),f.value!==-1)){c.value[f.value].class[1]="active";for(let l=m.value+1;l<f.value;l++)c.value[l].class[1]="select"}return(l,t)=>(e.openBlock(),e.createElementBlock("div",H,[e.createElementVNode("div",null,[r.range==="decades"||s.value===3?(e.openBlock(),e.createElementBlock("p",J,[e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:t[0]||(t[0]=e.withModifiers(a=>{h.value-=10,d(u.value,o.value)},["prevent"]))},[e.renderSlot(l.$slots,"double-arrow",{},()=>[t[16]||(t[16]=e.createTextVNode("«",-1))])])]),e.createElementVNode("span",K,e.toDisplayString(D.value[0])+" - "+e.toDisplayString(D.value[11]),1),e.createElementVNode("span",null,[e.createElementVNode("button",{class:"sw-revers",onClick:t[1]||(t[1]=e.withModifiers(a=>{h.value+=10,d(u.value,o.value)},["prevent"]))},[e.renderSlot(l.$slots,"double-arrow",{},()=>[t[17]||(t[17]=e.createTextVNode("«",-1))])])])])):(e.openBlock(),e.createElementBlock("p",R,[e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:t[2]||(t[2]=e.withModifiers(a=>d(u.value-1,o.value),["prevent"]))},[e.renderSlot(l.$slots,"double-arrow",{},()=>[t[18]||(t[18]=e.createTextVNode("«",-1))])]),e.createElementVNode("button",{onClick:t[3]||(t[3]=e.withModifiers(a=>{s.value=0,d(u.value,o.value-1)},["prevent"]))},[e.renderSlot(l.$slots,"arrow",{},()=>[t[19]||(t[19]=e.createTextVNode("‹",-1))])])]),e.createElementVNode("span",Z,[e.createElementVNode("button",{onClick:t[4]||(t[4]=e.withModifiers(a=>s.value=3,["prevent"]))},e.toDisplayString(u.value),1),e.createElementVNode("button",{onClick:t[5]||(t[5]=e.withModifiers(a=>s.value=1,["prevent"]))},e.toDisplayString(e.unref(v.L)(y.value.setMonth(o.value),"{F}")),1)]),e.createElementVNode("span",null,[e.createElementVNode("button",{class:"sw-revers",onClick:t[6]||(t[6]=e.withModifiers(a=>{s.value=0,d(u.value,o.value+1)},["prevent"]))},[e.renderSlot(l.$slots,"arrow",{},()=>[t[20]||(t[20]=e.createTextVNode("‹",-1))])]),e.createElementVNode("button",{class:"sw-revers",onClick:t[7]||(t[7]=e.withModifiers(a=>d(u.value+1,o.value),["prevent"]))},[e.renderSlot(l.$slots,"double-arrow",{},()=>[t[21]||(t[21]=e.createTextVNode("«",-1))])])])])),r.range==="year"||r.range==="decades"||s.value===1||s.value===3?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Q,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(7,(a,n)=>e.createElementVNode("button",{key:n,class:"disabled"},e.toDisplayString(e.unref(v.L)(new Date(1970,1,a+e.unref(w)),"{D}")),1)),64))])),s.value!==3&&r.range==="year"||s.value===1?(e.openBlock(),e.createElementBlock("div",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(a,n)=>(e.openBlock(),e.createElementBlock("button",{key:n,onClick:e.withModifiers(i=>{s.value=0,d(u.value,n)},["prevent"]),class:e.normalizeClass(n===o.value?"active":"")},e.toDisplayString(a),11,ee))),128))])):r.range==="decades"||s.value===3?(e.openBlock(),e.createElementBlock("div",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(a,n)=>(e.openBlock(),e.createElementBlock("button",{key:n,onClick:e.withModifiers(i=>{s.value=r.range==="year"?1:0,d(a,o.value)},["prevent"]),class:e.normalizeClass(h.value+n-1===u.value?"active":"")},e.toDisplayString(a),11,ae))),128))])):(e.openBlock(),e.createElementBlock("div",le,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[n<B.value+(7-new Date(u.value,o.value+1,1).getDay()+e.unref(w))%7?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(a.month===o.value&&C(a.year,a.month,a.day)?a.class:"disabled"),onClick:e.withModifiers(()=>{a.month===o.value&&M(a,n)},["prevent"])},e.toDisplayString(a.day),11,ne)):e.createCommentVNode("",!0)],64))),128))]))]),r.range==="range"?(e.openBlock(),e.createElementBlock("div",re,[r.range==="decades"||s.value===4?(e.openBlock(),e.createElementBlock("p",oe,[e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:t[8]||(t[8]=e.withModifiers(a=>{h.value-=10,d(u.value,o.value)},["prevent"]))},[e.renderSlot(l.$slots,"double-arrow",{},()=>[t[22]||(t[22]=e.createTextVNode("«",-1))])])]),e.createElementVNode("span",ue,e.toDisplayString(D.value[0])+" - "+e.toDisplayString(D.value[11]),1),e.createElementVNode("span",null,[e.createElementVNode("button",{class:"sw-revers",onClick:t[9]||(t[9]=e.withModifiers(a=>{h.value+=10,d(u.value,o.value)},["prevent"]))},[e.renderSlot(l.$slots,"double-arrow",{},()=>[t[23]||(t[23]=e.createTextVNode("«",-1))])])])])):(e.openBlock(),e.createElementBlock("p",ce,[e.createElementVNode("span",null,[e.createElementVNode("button",{onClick:t[10]||(t[10]=e.withModifiers(a=>d(u.value-1,o.value),["prevent"]))},[e.renderSlot(l.$slots,"double-arrow",{},()=>[t[24]||(t[24]=e.createTextVNode("«",-1))])]),e.createElementVNode("button",{onClick:t[11]||(t[11]=e.withModifiers(a=>{s.value=0,d(u.value,o.value-1)},["prevent"]))},[e.renderSlot(l.$slots,"arrow",{},()=>[t[25]||(t[25]=e.createTextVNode("‹",-1))])])]),e.createElementVNode("span",se,[e.createElementVNode("button",{onClick:t[12]||(t[12]=e.withModifiers(a=>s.value=4,["prevent"]))},e.toDisplayString(new Date(u.value,o.value+1).getFullYear()),1),e.createElementVNode("button",{onClick:t[13]||(t[13]=e.withModifiers(a=>s.value=2,["prevent"]))},e.toDisplayString(e.unref(v.L)(y.value.setMonth(o.value+1),"{F}")),1)]),e.createElementVNode("span",null,[e.createElementVNode("button",{class:"sw-revers",onClick:t[14]||(t[14]=e.withModifiers(a=>{s.value=0,d(u.value,o.value+1)},["prevent"]))},[e.renderSlot(l.$slots,"arrow",{},()=>[t[26]||(t[26]=e.createTextVNode("‹",-1))])]),e.createElementVNode("button",{class:"sw-revers",onClick:t[15]||(t[15]=e.withModifiers(a=>d(u.value+1,o.value),["prevent"]))},[e.renderSlot(l.$slots,"double-arrow",{},()=>[t[27]||(t[27]=e.createTextVNode("«",-1))])])])])),s.value===2||s.value===4?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(7,(a,n)=>e.createElementVNode("button",{key:n,class:"disabled"},e.toDisplayString(e.unref(v.L)(new Date(1970,1,a+e.unref(w)),"{D}")),1)),64))])),s.value===2?(e.openBlock(),e.createElementBlock("div",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L.value,(a,n)=>(e.openBlock(),e.createElementBlock("button",{key:n,onClick:e.withModifiers(i=>{s.value=0,d(u.value,n-1)},["prevent"]),class:e.normalizeClass(n===(o.value+1)%12?"active":"")},e.toDisplayString(a),11,de))),128))])):s.value===4?(e.openBlock(),e.createElementBlock("div",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(D.value,(a,n)=>(e.openBlock(),e.createElementBlock("button",{key:n,onClick:e.withModifiers(i=>{s.value=0,d(a,o.value)},["prevent"]),class:e.normalizeClass(h.value+n-1===u.value?"active":"")},e.toDisplayString(a),11,ke))),128))])):(e.openBlock(),e.createElementBlock("div",pe,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,(a,n)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:n},[n>=B.value-(7+new Date(u.value,o.value+1,1).getDay()-e.unref(w))%7?(e.openBlock(),e.createElementBlock("button",{key:0,class:e.normalizeClass(a.month===V.value&&C(a.year,a.month,a.day)?a.class:"disabled"),onClick:e.withModifiers(()=>{a.month===V.value&&M(a,n)},["prevent"])},e.toDisplayString(a.day),11,ye)):e.createCommentVNode("",!0)],64))),128))]))])):e.createCommentVNode("",!0)]))}};exports.default=ge;
@@ -1,5 +1,5 @@
1
1
  import { ref as D, computed as ee, createElementBlock as s, openBlock as o, createElementVNode as r, createCommentVNode as z, withModifiers as d, renderSlot as m, createTextVNode as p, toDisplayString as h, unref as Y, Fragment as C, renderList as x, normalizeClass as I } from "vue";
2
- import { U as k, L as N } from "./VacationTable-C2EEujIB.js";
2
+ import { U as k, L as N } from "./VacationTable-B0YqgIi2.js";
3
3
  const re = { class: "sw-data-picker" }, se = {
4
4
  key: 0,
5
5
  class: "month_year"
@@ -1,5 +1,5 @@
1
1
  import { computed as n, createElementBlock as r, openBlock as l, normalizeClass as a, createBlock as c, createCommentVNode as p, renderSlot as i } from "vue";
2
- import { g as u } from "./VacationTable-C2EEujIB.js";
2
+ import { g as u } from "./VacationTable-B0YqgIi2.js";
3
3
  const g = {
4
4
  __name: "SwDropdownItem",
5
5
  props: {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./VacationTable-DkgIpYNP.cjs"),r={__name:"SwDropdownItem",props:{class:{type:String,default:""},size:{type:String,default:""},type:{type:String,default:""},iconBefore:{type:String,default:""}},setup(o){const t=o,n=e.computed(()=>{let l=["sw-dropdown-item"];return t.size.length>0&&l.push("sw-"+t.size),t.type.length>0&&l.push("sw-"+t.type),t.class.length>0&&l.push(t.class),l});return(l,c)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(n.value)},[o.iconBefore.length>0?(e.openBlock(),e.createBlock(s.g,{key:0,"icon-class":o.iconBefore},null,8,["icon-class"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")],2))}};exports.default=r;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./VacationTable-DT5FUQ4-.cjs"),r={__name:"SwDropdownItem",props:{class:{type:String,default:""},size:{type:String,default:""},type:{type:String,default:""},iconBefore:{type:String,default:""}},setup(o){const t=o,n=e.computed(()=>{let l=["sw-dropdown-item"];return t.size.length>0&&l.push("sw-"+t.size),t.type.length>0&&l.push("sw-"+t.type),t.class.length>0&&l.push(t.class),l});return(l,c)=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass(n.value)},[o.iconBefore.length>0?(e.openBlock(),e.createBlock(s.g,{key:0,"icon-class":o.iconBefore},null,8,["icon-class"])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default")],2))}};exports.default=r;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),V=require("./SwDropdown-DQGTnnKw-BltvlnsL.cjs"),c=require("./SwButton-jKDKwFV9-DxLmT5Vr.cjs"),x=require("./VacationTable-DkgIpYNP.cjs"),E=["src"],N={__name:"SwGide",props:e.mergeModels({steps:{type:Array,default:()=>[]},iconClose:{type:String,default:""},maxWidth:{type:Number,default:250}},{modelValue:{type:Number,default:0},modelModifiers:{}}),emits:e.mergeModels(["close"],["update:modelValue"]),setup(i,{emit:g}){const s=e.ref(null),m=e.ref(!0),a=e.ref(null),n=e.useModel(i,"modelValue"),y=g,r=i,p=()=>y("close"),v=l=>{const t=n.value+l;t<0?n.value=0:t>=r.steps.length?p():n.value=t};let d=!1;const h=l=>{const t=l.getBoundingClientRect(),o=window.innerHeight;t.top<5?(d=!0,document.documentElement.scrollTop+=t.top-5):t.bottom>o-5&&(d=!0,document.documentElement.scrollTop+=t.bottom-o+5)},u=()=>{if(!a.value||!s.value)return;const l=a.value.getBoundingClientRect(),t=window.pageYOffset||document.documentElement.scrollTop,o=window.pageXOffset||document.documentElement.scrollLeft;s.value.style.gridTemplateRows=`${l.top+t-5}px ${l.height+10}px 1fr`,s.value.style.gridTemplateColumns=`${l.left+o-5}px ${l.width+10}px 1fr`,s.value.style.height=document.documentElement.scrollHeight+"px"};return e.watchEffect(l=>{var w;if(!s.value)return;const t=(w=r.steps[n.value])==null?void 0:w.tag;if(!t||!t.trim()){s.value.style.gridTemplateRows="40% 0 1fr",s.value.style.gridTemplateColumns="1fr 0 1fr",s.value.style.height=document.documentElement.scrollHeight+"px";return}if(a.value=document.querySelector(t),!a.value){console.warn(`[SwGuide] Элемент не найден: ${t}`);return}h(a.value);const o=()=>{if(d){d=!1;return}u()};u();const f=new ResizeObserver(u);f.observe(a.value),window.addEventListener("resize",o),window.addEventListener("scroll",o,{passive:!0}),l(()=>{f.disconnect(),window.removeEventListener("resize",o),window.removeEventListener("scroll",o)})}),e.onMounted(()=>window.onload=()=>{var l;return a.value=document.querySelector((l=r.steps[n.value])==null?void 0:l.tag)}),(l,t)=>(e.openBlock(),e.createElementBlock("div",{class:"sw-gide",ref_key:"swGide",ref:s},[t[6]||(t[6]=e.createElementVNode("div",{class:"overlay0"},null,-1)),t[7]||(t[7]=e.createElementVNode("div",{class:"overlay1"},null,-1)),e.createVNode(V.default,{class:"gide",trigger:"none",placement:r.steps[n.value].placement,modelValue:m.value,"onUpdate:modelValue":t[2]||(t[2]=o=>m.value=o),maxWidth:r.maxWidth},{dropdown:e.withCtx(()=>[e.createElementVNode("header",null,[e.renderSlot(l.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(r.steps[n.value].header)+" ",1),e.createVNode(c.default,{type:"primary",link:"",onClick:p},{default:e.withCtx(()=>[e.createVNode(x.g,{"icon-class":r.iconClose},null,8,["icon-class"])]),_:1})])]),e.renderSlot(l.$slots,"default",{},()=>{var o;return[e.createElementVNode("div",null,e.toDisplayString(r.steps[n.value].text),1),e.createElementVNode("img",{class:e.normalizeClass(/left/.test((o=r.steps[n.value])==null?void 0:o.placement)?"reflect":null),src:r.steps[n.value].img},null,10,E)]}),e.createElementVNode("footer",null,[e.renderSlot(l.$slots,"footer",{},()=>[e.createVNode(c.default,{type:n.value===0?"info":"warning",text:"",link:"",onClick:t[0]||(t[0]=o=>v(-1))},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"arrow",{},()=>[t[3]||(t[3]=e.createTextVNode("‹",-1))])]),_:3},8,["type"]),e.createVNode(c.default,{type:"success",onClick:t[1]||(t[1]=o=>v(1)),text:"",link:"",class:"sw-revers"},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"arrow",{},()=>[t[4]||(t[4]=e.createTextVNode("‹",-1))])]),_:3})])])]),default:e.withCtx(()=>[t[5]||(t[5]=e.createElementVNode("div",{class:"hole"},null,-1))]),_:3},8,["placement","modelValue","maxWidth"]),t[8]||(t[8]=e.createElementVNode("div",{class:"overlay2"},null,-1)),t[9]||(t[9]=e.createElementVNode("div",{class:"overlay3"},null,-1))],512))}};exports.default=N;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),V=require("./SwDropdown-DQGTnnKw-BltvlnsL.cjs"),c=require("./SwButton-jKDKwFV9-DxLmT5Vr.cjs"),x=require("./VacationTable-DT5FUQ4-.cjs"),E=["src"],N={__name:"SwGide",props:e.mergeModels({steps:{type:Array,default:()=>[]},iconClose:{type:String,default:""},maxWidth:{type:Number,default:250}},{modelValue:{type:Number,default:0},modelModifiers:{}}),emits:e.mergeModels(["close"],["update:modelValue"]),setup(i,{emit:g}){const s=e.ref(null),m=e.ref(!0),a=e.ref(null),n=e.useModel(i,"modelValue"),y=g,r=i,p=()=>y("close"),v=l=>{const t=n.value+l;t<0?n.value=0:t>=r.steps.length?p():n.value=t};let d=!1;const h=l=>{const t=l.getBoundingClientRect(),o=window.innerHeight;t.top<5?(d=!0,document.documentElement.scrollTop+=t.top-5):t.bottom>o-5&&(d=!0,document.documentElement.scrollTop+=t.bottom-o+5)},u=()=>{if(!a.value||!s.value)return;const l=a.value.getBoundingClientRect(),t=window.pageYOffset||document.documentElement.scrollTop,o=window.pageXOffset||document.documentElement.scrollLeft;s.value.style.gridTemplateRows=`${l.top+t-5}px ${l.height+10}px 1fr`,s.value.style.gridTemplateColumns=`${l.left+o-5}px ${l.width+10}px 1fr`,s.value.style.height=document.documentElement.scrollHeight+"px"};return e.watchEffect(l=>{var w;if(!s.value)return;const t=(w=r.steps[n.value])==null?void 0:w.tag;if(!t||!t.trim()){s.value.style.gridTemplateRows="40% 0 1fr",s.value.style.gridTemplateColumns="1fr 0 1fr",s.value.style.height=document.documentElement.scrollHeight+"px";return}if(a.value=document.querySelector(t),!a.value){console.warn(`[SwGuide] Элемент не найден: ${t}`);return}h(a.value);const o=()=>{if(d){d=!1;return}u()};u();const f=new ResizeObserver(u);f.observe(a.value),window.addEventListener("resize",o),window.addEventListener("scroll",o,{passive:!0}),l(()=>{f.disconnect(),window.removeEventListener("resize",o),window.removeEventListener("scroll",o)})}),e.onMounted(()=>window.onload=()=>{var l;return a.value=document.querySelector((l=r.steps[n.value])==null?void 0:l.tag)}),(l,t)=>(e.openBlock(),e.createElementBlock("div",{class:"sw-gide",ref_key:"swGide",ref:s},[t[6]||(t[6]=e.createElementVNode("div",{class:"overlay0"},null,-1)),t[7]||(t[7]=e.createElementVNode("div",{class:"overlay1"},null,-1)),e.createVNode(V.default,{class:"gide",trigger:"none",placement:r.steps[n.value].placement,modelValue:m.value,"onUpdate:modelValue":t[2]||(t[2]=o=>m.value=o),maxWidth:r.maxWidth},{dropdown:e.withCtx(()=>[e.createElementVNode("header",null,[e.renderSlot(l.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(r.steps[n.value].header)+" ",1),e.createVNode(c.default,{type:"primary",link:"",onClick:p},{default:e.withCtx(()=>[e.createVNode(x.g,{"icon-class":r.iconClose},null,8,["icon-class"])]),_:1})])]),e.renderSlot(l.$slots,"default",{},()=>{var o;return[e.createElementVNode("div",null,e.toDisplayString(r.steps[n.value].text),1),e.createElementVNode("img",{class:e.normalizeClass(/left/.test((o=r.steps[n.value])==null?void 0:o.placement)?"reflect":null),src:r.steps[n.value].img},null,10,E)]}),e.createElementVNode("footer",null,[e.renderSlot(l.$slots,"footer",{},()=>[e.createVNode(c.default,{type:n.value===0?"info":"warning",text:"",link:"",onClick:t[0]||(t[0]=o=>v(-1))},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"arrow",{},()=>[t[3]||(t[3]=e.createTextVNode("‹",-1))])]),_:3},8,["type"]),e.createVNode(c.default,{type:"success",onClick:t[1]||(t[1]=o=>v(1)),text:"",link:"",class:"sw-revers"},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"arrow",{},()=>[t[4]||(t[4]=e.createTextVNode("‹",-1))])]),_:3})])])]),default:e.withCtx(()=>[t[5]||(t[5]=e.createElementVNode("div",{class:"hole"},null,-1))]),_:3},8,["placement","modelValue","maxWidth"]),t[8]||(t[8]=e.createElementVNode("div",{class:"overlay2"},null,-1)),t[9]||(t[9]=e.createElementVNode("div",{class:"overlay3"},null,-1))],512))}};exports.default=N;
@@ -1,7 +1,7 @@
1
1
  import { mergeModels as $, ref as p, useModel as S, createElementBlock as _, watchEffect as b, onMounted as B, openBlock as L, createElementVNode as r, createVNode as u, withCtx as i, renderSlot as d, createTextVNode as v, toDisplayString as C, normalizeClass as N } from "vue";
2
2
  import R from "./SwDropdown-DQGTnnKw-CJPDuCfV.js";
3
3
  import f from "./SwButton-jKDKwFV9-CXc8MFE5.js";
4
- import { g as z } from "./VacationTable-C2EEujIB.js";
4
+ import { g as z } from "./VacationTable-B0YqgIi2.js";
5
5
  const G = ["src"], O = {
6
6
  __name: "SwGide",
7
7
  props: /* @__PURE__ */ $({
@@ -1,5 +1,5 @@
1
1
  import { mergeModels as p, useModel as k, ref as z, computed as V, createElementBlock as o, watch as q, openBlock as n, normalizeClass as N, createBlock as d, renderSlot as f, createCommentVNode as c, withDirectives as w, createTextVNode as B, toDisplayString as M, createElementVNode as C, mergeProps as D, vModelDynamic as I } from "vue";
2
- import { V as $, g as m } from "./VacationTable-C2EEujIB.js";
2
+ import { V as $, g as m } from "./VacationTable-B0YqgIi2.js";
3
3
  const E = ["for"], _ = {
4
4
  key: 0,
5
5
  title: "Это поле обязательно для заполнения."
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./VacationTable-DkgIpYNP.cjs"),h=["for"],v={key:0,title:"Это поле обязательно для заполнения."},k=["required","placeholder","type","id","name","size","maxlength","minlength","autofocus"],S={__name:"SwInput",props:e.mergeModels({before:{type:String,default:""},after:{type:String,default:""},placeholder:{type:String,default:""},label:{type:String,default:""},name:{type:String,required:!0},class:{type:String,default:""},size:{type:String,default:""},type:{type:String,default:"text"},inputMode:{type:String,default:"text"},required:{type:Boolean,default:!1},maxlength:{type:Number,default:128},minlength:{type:Number,default:1},inputSize:{type:Number,default:60}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["suffix","prefix","focusInput"],["update:modelValue"]),setup(i,{emit:c}){var s;const a=e.useModel(i,"modelValue"),t=i,n=e.ref(null),r=c,p=l=>{r("focusInput"),l.target.setSelectionRange(a.value.length,a.value.length),n.value!==null&&(n.value.style.top="-.6em")},d=l=>{var u;((u=a.value)==null?void 0:u.length)===0&&n.value!==null&&n.value.removeAttribute("style")};((s=a.value)==null?void 0:s.length)>0&&n.value!==null&&(n.value.style.top="-.6em");const m=()=>{r("suffix")},f=()=>{r("prefix")},g=e.computed(()=>{let l=["sw-input"];return t.size.length>0&&l.push("sw-"+t.size),t.class.length>0&&l.push(t.class),l});return e.watch(a,(l,u)=>{t.type==="phone"&&(a.value=o.V(l,u))}),(l,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(g.value)},[t.before.length>0?(e.openBlock(),e.createBlock(o.g,{key:0,"icon-class":t.before,onClick:f},null,8,["icon-class"])):e.renderSlot(l.$slots,"prefix",{key:1}),t.label.length>0?(e.openBlock(),e.createElementBlock("label",{key:2,for:t.name,ref_key:"lab",ref:n},[e.createTextVNode(e.toDisplayString(t.label),1),t.required?(e.openBlock(),e.createElementBlock("span",v,"*")):e.createCommentVNode("",!0)],8,h)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({"onUpdate:modelValue":u[0]||(u[0]=y=>a.value=y),required:t.required,placeholder:t.required&&t.label.length===0?t.placeholder+"*":t.placeholder,type:t.type,id:t.name,name:t.name,size:t.inputSize,onFocus:p,onBlur:d,maxlength:t.maxlength,minlength:t.minlength,autofocus:t.autofocus},l.$attrs),null,16,k),[[e.vModelDynamic,a.value]]),t.after.length>0?(e.openBlock(),e.createBlock(o.g,{key:3,"icon-class":t.after,onClick:m},null,8,["icon-class"])):e.renderSlot(l.$slots,"suffix",{key:4})],2))}};exports.default=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./VacationTable-DT5FUQ4-.cjs"),h=["for"],v={key:0,title:"Это поле обязательно для заполнения."},k=["required","placeholder","type","id","name","size","maxlength","minlength","autofocus"],S={__name:"SwInput",props:e.mergeModels({before:{type:String,default:""},after:{type:String,default:""},placeholder:{type:String,default:""},label:{type:String,default:""},name:{type:String,required:!0},class:{type:String,default:""},size:{type:String,default:""},type:{type:String,default:"text"},inputMode:{type:String,default:"text"},required:{type:Boolean,default:!1},maxlength:{type:Number,default:128},minlength:{type:Number,default:1},inputSize:{type:Number,default:60}},{modelValue:{},modelModifiers:{}}),emits:e.mergeModels(["suffix","prefix","focusInput"],["update:modelValue"]),setup(i,{emit:c}){var s;const a=e.useModel(i,"modelValue"),t=i,n=e.ref(null),r=c,p=l=>{r("focusInput"),l.target.setSelectionRange(a.value.length,a.value.length),n.value!==null&&(n.value.style.top="-.6em")},d=l=>{var u;((u=a.value)==null?void 0:u.length)===0&&n.value!==null&&n.value.removeAttribute("style")};((s=a.value)==null?void 0:s.length)>0&&n.value!==null&&(n.value.style.top="-.6em");const m=()=>{r("suffix")},f=()=>{r("prefix")},g=e.computed(()=>{let l=["sw-input"];return t.size.length>0&&l.push("sw-"+t.size),t.class.length>0&&l.push(t.class),l});return e.watch(a,(l,u)=>{t.type==="phone"&&(a.value=o.V(l,u))}),(l,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(g.value)},[t.before.length>0?(e.openBlock(),e.createBlock(o.g,{key:0,"icon-class":t.before,onClick:f},null,8,["icon-class"])):e.renderSlot(l.$slots,"prefix",{key:1}),t.label.length>0?(e.openBlock(),e.createElementBlock("label",{key:2,for:t.name,ref_key:"lab",ref:n},[e.createTextVNode(e.toDisplayString(t.label),1),t.required?(e.openBlock(),e.createElementBlock("span",v,"*")):e.createCommentVNode("",!0)],8,h)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",e.mergeProps({"onUpdate:modelValue":u[0]||(u[0]=y=>a.value=y),required:t.required,placeholder:t.required&&t.label.length===0?t.placeholder+"*":t.placeholder,type:t.type,id:t.name,name:t.name,size:t.inputSize,onFocus:p,onBlur:d,maxlength:t.maxlength,minlength:t.minlength,autofocus:t.autofocus},l.$attrs),null,16,k),[[e.vModelDynamic,a.value]]),t.after.length>0?(e.openBlock(),e.createBlock(o.g,{key:3,"icon-class":t.after,onClick:m},null,8,["icon-class"])):e.renderSlot(l.$slots,"suffix",{key:4})],2))}};exports.default=S;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./SwButton-jKDKwFV9-DxLmT5Vr.cjs"),d=require("./VacationTable-DkgIpYNP.cjs"),m={key:0},f={__name:"SwMessage",props:e.mergeModels({name:{type:String,default:""},class:{type:String,default:""},iconAfter:{type:String,default:""}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const n=e.useModel(s,"modelValue"),a=s,o=e.ref(null),i=e.useSlots(),r=t=>{if(o.value&&n.value){const l=o.value.getBoundingClientRect();t.clientX>=l.left&&t.clientX<=l.right&&t.clientY>=l.top&&t.clientY<=l.bottom||(n.value=!1)}};return e.watch(()=>n.value,t=>{t?(o.value.showModal(),e.nextTick(),window.addEventListener("click",r,!0)):(o.value.close(),window.removeEventListener("click",r))}),e.onUnmounted(()=>{window.removeEventListener("click",r)}),(t,l)=>{var c;return e.openBlock(),e.createElementBlock("dialog",{class:e.normalizeClass("sw-message "+a.class),ref_key:"messageRef",ref:o},[a.name.length>0||(c=e.unref(i))!=null&&c.header?(e.openBlock(),e.createElementBlock("header",m,[e.renderSlot(t.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(a.name)+" ",1),e.createVNode(u.default,{link:"",type:"primary",onClick:l[0]||(l[0]=g=>n.value=!1)},{default:e.withCtx(()=>[e.createVNode(d.g,{"icon-class":a.iconAfter},null,8,["icon-class"])]),_:1})])])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default"),e.createElementVNode("footer",null,[e.renderSlot(t.$slots,"footer")])],2)}}};exports.default=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./SwButton-jKDKwFV9-DxLmT5Vr.cjs"),d=require("./VacationTable-DT5FUQ4-.cjs"),m={key:0},f={__name:"SwMessage",props:e.mergeModels({name:{type:String,default:""},class:{type:String,default:""},iconAfter:{type:String,default:""}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const n=e.useModel(s,"modelValue"),a=s,o=e.ref(null),i=e.useSlots(),r=t=>{if(o.value&&n.value){const l=o.value.getBoundingClientRect();t.clientX>=l.left&&t.clientX<=l.right&&t.clientY>=l.top&&t.clientY<=l.bottom||(n.value=!1)}};return e.watch(()=>n.value,t=>{t?(o.value.showModal(),e.nextTick(),window.addEventListener("click",r,!0)):(o.value.close(),window.removeEventListener("click",r))}),e.onUnmounted(()=>{window.removeEventListener("click",r)}),(t,l)=>{var c;return e.openBlock(),e.createElementBlock("dialog",{class:e.normalizeClass("sw-message "+a.class),ref_key:"messageRef",ref:o},[a.name.length>0||(c=e.unref(i))!=null&&c.header?(e.openBlock(),e.createElementBlock("header",m,[e.renderSlot(t.$slots,"header",{},()=>[e.createTextVNode(e.toDisplayString(a.name)+" ",1),e.createVNode(u.default,{link:"",type:"primary",onClick:l[0]||(l[0]=g=>n.value=!1)},{default:e.withCtx(()=>[e.createVNode(d.g,{"icon-class":a.iconAfter},null,8,["icon-class"])]),_:1})])])):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"default"),e.createElementVNode("footer",null,[e.renderSlot(t.$slots,"footer")])],2)}}};exports.default=f;
@@ -1,6 +1,6 @@
1
1
  import { mergeModels as f, useModel as p, ref as g, useSlots as v, createElementBlock as c, watch as w, nextTick as k, onUnmounted as h, openBlock as d, normalizeClass as y, createCommentVNode as S, renderSlot as s, createElementVNode as V, unref as x, createTextVNode as C, createVNode as u, toDisplayString as E, withCtx as M } from "vue";
2
2
  import N from "./SwButton-jKDKwFV9-CXc8MFE5.js";
3
- import { g as _ } from "./VacationTable-C2EEujIB.js";
3
+ import { g as _ } from "./VacationTable-B0YqgIi2.js";
4
4
  const B = { key: 0 }, T = {
5
5
  __name: "SwMessage",
6
6
  props: /* @__PURE__ */ f({
@@ -1,5 +1,5 @@
1
1
  import { mergeModels as q, useModel as D, ref as w, computed as d, createElementBlock as E, onMounted as I, onUnmounted as J, openBlock as L, normalizeClass as X, createElementVNode as Y, withModifiers as B, normalizeStyle as V, Fragment as Q, renderList as U, renderSlot as j, createCommentVNode as G, toDisplayString as H } from "vue";
2
- import { J as K } from "./VacationTable-C2EEujIB.js";
2
+ import { J as K } from "./VacationTable-B0YqgIi2.js";
3
3
  const O = ["onMouseenter", "onMouseleave", "onFocus", "onBlur", "onMousedown", "onTouchstart"], Z = {
4
4
  __name: "SwSlider",
5
5
  props: /* @__PURE__ */ q({
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),$=require("./VacationTable-DkgIpYNP.cjs"),X=["onMouseenter","onMouseleave","onFocus","onBlur","onMousedown","onTouchstart"],Y={__name:"SwSlider",props:t.mergeModels({class:{type:String,default:""},size:{type:String,default:""},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},vertical:{type:Boolean,default:!1},showValue:{type:Boolean,default:!1}},{modelValue:{type:[Number,Array],required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(x){const h=t.useModel(x,"modelValue"),n=x,v=t.ref([]),w=t.ref([]),T=t.computed(()=>{let e=["sw-slider"];return n.size.length>0&&e.push("sw-"+n.size),n.class.length>0&&e.push(n.class),n.vertical&&e.push("vertical"),e}),S=e=>{const l=[...v.value];l[e]=!0,v.value=l},b=e=>{const l=[...v.value];l[e]=!1,v.value=l},B=e=>{const l=document.querySelector(".sw-slider");return l?$.J(l,n.vertical):n.vertical?{right:"100%",marginRight:"10px"}:{bottom:"100%",marginBottom:"10px"}},p=t.computed(()=>Array.isArray(h.value)),c=t.computed({get(){return p.value?[...h.value]:[h.value]},set(e){p.value?h.value=[...e].sort((l,a)=>l-a):h.value=e[0]}}),r=t.computed(()=>{const e=n.max-n.min;return c.value.map(l=>e===0?0:(l-n.min)/e*100)}),V=t.computed(()=>{if(n.vertical)if(p.value){const e=r.value[0]||0,l=r.value[r.value.length-1]||0,a=Math.min(e,l);return{height:`${Math.max(e,l)-a}%`,top:`${a}%`,left:"0",width:"100%"}}else return{height:`${r.value[0]||0}%`,top:"0",left:"0",width:"100%"};else if(p.value){const e=r.value[0]||0,l=r.value[r.value.length-1]||0,a=Math.min(e,l);return{width:`${Math.max(e,l)-a}%`,left:`${a}%`,top:"0",height:"100%"}}else return{width:`${r.value[0]||0}%`,left:"0",top:"0",height:"100%"}}),C=t.computed(()=>r.value.map((e,l)=>n.vertical?{top:`${e}%`,zIndex:c.value.length-l}:{left:`${e}%`,zIndex:c.value.length-l}));function N(e){if(p.value)return;const l=e.currentTarget.closest(".sw-slider");if(!l)return;const a=l.getBoundingClientRect(),u=n.vertical?(e.clientY-a.top)/a.height:(e.clientX-a.left)/a.width,o=Math.max(0,Math.min(1,u)),s=n.max-n.min;let i=n.min+o*s;const d=Math.round((i-n.min)/n.step);i=n.min+d*n.step,i=Math.max(n.min,Math.min(n.max,i)),c.value=[i],setTimeout(()=>{const f=[...w.value];f[0]=B(),w.value=f},0)}const E=t.ref(!1),m=t.ref(null),k=t.ref(null);function g(e,l){var u,o,s,i;const a=e.target.closest(".sw-slider");a&&(k.value=a.getBoundingClientRect(),m.value=l,E.value=!0,z(e.clientX||((o=(u=e.touches)==null?void 0:u[0])==null?void 0:o.clientX),e.clientY||((i=(s=e.touches)==null?void 0:s[0])==null?void 0:i.clientY)))}function M(e){var u,o,s,i,d;if(!E.value)return;(u=e.preventDefault)==null||u.call(e);const l=e.clientX||((s=(o=e.touches)==null?void 0:o[0])==null?void 0:s.clientX),a=e.clientY||((d=(i=e.touches)==null?void 0:i[0])==null?void 0:d.clientY);z(l,a)}function y(){E.value=!1,m.value=null}function z(e,l){if(!k.value||m.value===null)return;const a=k.value,u=n.vertical?(l-a.top)/a.height:(e-a.left)/a.width,o=Math.max(0,Math.min(1,u)),s=n.max-n.min;let i=n.min+o*s;const d=Math.round((i-n.min)/n.step);i=n.min+d*n.step,i=Math.max(n.min,Math.min(n.max,i));const f=[...c.value];f[m.value]=i,c.value=f,setTimeout(()=>{const L=[...w.value];L[m.value]=B(m.value),w.value=L},0)}return t.onMounted(()=>{window.addEventListener("mousemove",M),window.addEventListener("mouseup",y),window.addEventListener("touchmove",M,{passive:!1}),window.addEventListener("touchend",y),v.value=new Array(c.value.length).fill(!1)}),t.onUnmounted(()=>{window.removeEventListener("mousemove",M),window.removeEventListener("mouseup",y),window.removeEventListener("touchmove",M),window.removeEventListener("touchend",y)}),(e,l)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(T.value)},[t.createElementVNode("div",{class:"track",onClick:N,onMousedown:l[0]||(l[0]=t.withModifiers(a=>g(a,0),["prevent"])),onTouchstart:l[1]||(l[1]=t.withModifiers(a=>g(a.touches[0],0),["prevent"]))},[t.createElementVNode("div",{class:"fill",style:t.normalizeStyle(V.value)},null,4)],32),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(a,u)=>(t.openBlock(),t.createElementBlock("div",{class:"thumb",key:u,style:t.normalizeStyle(C.value[u]),onMouseenter:o=>S(u),onMouseleave:o=>b(u),onFocus:o=>S(u),onBlur:o=>b(u),onMousedown:t.withModifiers(o=>g(o,u),["prevent"]),onTouchstart:t.withModifiers(o=>g(o.touches[0],u),["prevent"])},[t.renderSlot(e.$slots,"default",{index:u,value:a}),v.value[u]&&x.showValue?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["tooltip",{"tooltip-vertical":n.vertical}]),style:t.normalizeStyle(B())},t.toDisplayString(a),7)):t.createCommentVNode("",!0)],44,X))),128))],2))}};exports.default=Y;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),$=require("./VacationTable-DT5FUQ4-.cjs"),X=["onMouseenter","onMouseleave","onFocus","onBlur","onMousedown","onTouchstart"],Y={__name:"SwSlider",props:t.mergeModels({class:{type:String,default:""},size:{type:String,default:""},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},vertical:{type:Boolean,default:!1},showValue:{type:Boolean,default:!1}},{modelValue:{type:[Number,Array],required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(x){const h=t.useModel(x,"modelValue"),n=x,v=t.ref([]),w=t.ref([]),T=t.computed(()=>{let e=["sw-slider"];return n.size.length>0&&e.push("sw-"+n.size),n.class.length>0&&e.push(n.class),n.vertical&&e.push("vertical"),e}),S=e=>{const l=[...v.value];l[e]=!0,v.value=l},b=e=>{const l=[...v.value];l[e]=!1,v.value=l},B=e=>{const l=document.querySelector(".sw-slider");return l?$.J(l,n.vertical):n.vertical?{right:"100%",marginRight:"10px"}:{bottom:"100%",marginBottom:"10px"}},p=t.computed(()=>Array.isArray(h.value)),c=t.computed({get(){return p.value?[...h.value]:[h.value]},set(e){p.value?h.value=[...e].sort((l,a)=>l-a):h.value=e[0]}}),r=t.computed(()=>{const e=n.max-n.min;return c.value.map(l=>e===0?0:(l-n.min)/e*100)}),V=t.computed(()=>{if(n.vertical)if(p.value){const e=r.value[0]||0,l=r.value[r.value.length-1]||0,a=Math.min(e,l);return{height:`${Math.max(e,l)-a}%`,top:`${a}%`,left:"0",width:"100%"}}else return{height:`${r.value[0]||0}%`,top:"0",left:"0",width:"100%"};else if(p.value){const e=r.value[0]||0,l=r.value[r.value.length-1]||0,a=Math.min(e,l);return{width:`${Math.max(e,l)-a}%`,left:`${a}%`,top:"0",height:"100%"}}else return{width:`${r.value[0]||0}%`,left:"0",top:"0",height:"100%"}}),C=t.computed(()=>r.value.map((e,l)=>n.vertical?{top:`${e}%`,zIndex:c.value.length-l}:{left:`${e}%`,zIndex:c.value.length-l}));function N(e){if(p.value)return;const l=e.currentTarget.closest(".sw-slider");if(!l)return;const a=l.getBoundingClientRect(),u=n.vertical?(e.clientY-a.top)/a.height:(e.clientX-a.left)/a.width,o=Math.max(0,Math.min(1,u)),s=n.max-n.min;let i=n.min+o*s;const d=Math.round((i-n.min)/n.step);i=n.min+d*n.step,i=Math.max(n.min,Math.min(n.max,i)),c.value=[i],setTimeout(()=>{const f=[...w.value];f[0]=B(),w.value=f},0)}const E=t.ref(!1),m=t.ref(null),k=t.ref(null);function g(e,l){var u,o,s,i;const a=e.target.closest(".sw-slider");a&&(k.value=a.getBoundingClientRect(),m.value=l,E.value=!0,z(e.clientX||((o=(u=e.touches)==null?void 0:u[0])==null?void 0:o.clientX),e.clientY||((i=(s=e.touches)==null?void 0:s[0])==null?void 0:i.clientY)))}function M(e){var u,o,s,i,d;if(!E.value)return;(u=e.preventDefault)==null||u.call(e);const l=e.clientX||((s=(o=e.touches)==null?void 0:o[0])==null?void 0:s.clientX),a=e.clientY||((d=(i=e.touches)==null?void 0:i[0])==null?void 0:d.clientY);z(l,a)}function y(){E.value=!1,m.value=null}function z(e,l){if(!k.value||m.value===null)return;const a=k.value,u=n.vertical?(l-a.top)/a.height:(e-a.left)/a.width,o=Math.max(0,Math.min(1,u)),s=n.max-n.min;let i=n.min+o*s;const d=Math.round((i-n.min)/n.step);i=n.min+d*n.step,i=Math.max(n.min,Math.min(n.max,i));const f=[...c.value];f[m.value]=i,c.value=f,setTimeout(()=>{const L=[...w.value];L[m.value]=B(m.value),w.value=L},0)}return t.onMounted(()=>{window.addEventListener("mousemove",M),window.addEventListener("mouseup",y),window.addEventListener("touchmove",M,{passive:!1}),window.addEventListener("touchend",y),v.value=new Array(c.value.length).fill(!1)}),t.onUnmounted(()=>{window.removeEventListener("mousemove",M),window.removeEventListener("mouseup",y),window.removeEventListener("touchmove",M),window.removeEventListener("touchend",y)}),(e,l)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(T.value)},[t.createElementVNode("div",{class:"track",onClick:N,onMousedown:l[0]||(l[0]=t.withModifiers(a=>g(a,0),["prevent"])),onTouchstart:l[1]||(l[1]=t.withModifiers(a=>g(a.touches[0],0),["prevent"]))},[t.createElementVNode("div",{class:"fill",style:t.normalizeStyle(V.value)},null,4)],32),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(a,u)=>(t.openBlock(),t.createElementBlock("div",{class:"thumb",key:u,style:t.normalizeStyle(C.value[u]),onMouseenter:o=>S(u),onMouseleave:o=>b(u),onFocus:o=>S(u),onBlur:o=>b(u),onMousedown:t.withModifiers(o=>g(o,u),["prevent"]),onTouchstart:t.withModifiers(o=>g(o.touches[0],u),["prevent"])},[t.renderSlot(e.$slots,"default",{index:u,value:a}),v.value[u]&&x.showValue?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["tooltip",{"tooltip-vertical":n.vertical}]),style:t.normalizeStyle(B())},t.toDisplayString(a),7)):t.createCommentVNode("",!0)],44,X))),128))],2))}};exports.default=Y;
@@ -1,6 +1,6 @@
1
1
  import { defineAsyncComponent as Ae, createElementBlock as $, unref as n, openBlock as m, mergeProps as fe, createElementVNode as Y, ref as C, onMounted as je, onUnmounted as ze, computed as re, createBlock as D, Transition as Fe, withCtx as s, createCommentVNode as N, normalizeClass as Ge, renderSlot as W, createTextVNode as k, toDisplayString as w, watch as Ue, resolveComponent as he, resolveDirective as Ye, Fragment as G, withDirectives as Pe, createVNode as p, renderList as U } from "vue";
2
2
  import { useI18n as Oe } from "vue-i18n";
3
- import { p as R, b as qe, h as Re } from "./index-BgsOWV25.js";
3
+ import { p as R, b as qe, h as Re } from "./index-DaZTfcYO.js";
4
4
  import { saveAs as He } from "file-saver";
5
5
  import * as Le from "exceljs";
6
6
  import { ElSelect as ne, ElOption as oe, ElButton as I, ElSwitch as ye, ElTable as Se, ElTableColumn as _, ElInput as Je, ElDialog as be, ElForm as Ce, ElFormItem as We } from "element-plus";
@@ -145,7 +145,7 @@ const Qe = ["href"], de = {
145
145
  default: tt
146
146
  }, Symbol.toStringTag, { value: "Module" }));
147
147
  document.querySelector("div.sw-alert-wrapper");
148
- const we = /* @__PURE__ */ Object.assign({ "./components/SwAlert.vue": () => Promise.resolve().then(() => lt), "./components/SwButton.vue": () => import("./SwButton-jKDKwFV9-CXc8MFE5.js"), "./components/SwButtonGroup.vue": () => import("./SwButtonGroup-D9HH5POO-ImB2afuu.js"), "./components/SwCollapse.vue": () => import("./SwCollapse-CuN3EbT6-Bp57Ya_9.js"), "./components/SwDatePicker.vue": () => import("./SwDatePicker-CJjKSM8k-Dz6BUMAi.js"), "./components/SwDropdown.vue": () => import("./SwDropdown-DQGTnnKw-CJPDuCfV.js"), "./components/SwDropdownItem.vue": () => import("./SwDropdownItem-CtlMVgsX-Dhus9MXM.js"), "./components/SwDropdownNew.vue": () => import("./SwDropdownNew-CYfjZFd2-nlDq08DL.js"), "./components/SwFormItem.vue": () => import("./SwFormItem-CaA4jsoa-6C3zw4iZ.js"), "./components/SwGide.vue": () => import("./SwGide-DbSSyZ-y-cGa25fRm.js"), "./components/SwIcon.vue": () => Promise.resolve().then(() => et), "./components/SwInput.vue": () => import("./SwInput-DCV1rrWa-uyVhv0SO.js"), "./components/SwMessage.vue": () => import("./SwMessage-CovKkpf6-BgcDsGln.js"), "./components/SwSection.vue": () => import("./SwSection-D8ooQ21I-DkmOwvIl.js"), "./components/SwSelect.vue": () => import("./SwSelect-C2RKinez-BD70YvFF.js"), "./components/SwSkeleton.vue": () => import("./SwSkeleton-B7ysp8L9-DnocmEnE.js"), "./components/SwSkeletonItem.vue": () => import("./SwSkeletonItem-CU7LvihY-DdKyY6kY.js"), "./components/SwSlider.vue": () => import("./SwSlider-YncjYKPw-C4F8HTBj.js"), "./components/SwSwitch.vue": () => import("./SwSwitch-6rl1IT4p-Cq2vi3fZ.js"), "./components/SwTable.vue": () => import("./SwTable-BKZ5idCi-DEX2rFo2.js"), "./components/SwTableColumn.vue": () => import("./SwTableColumn-BLF5bPuJ-CHI10OyO.js"), "./components/SwTabs.vue": () => import("./SwTabs-DkSI4oAh-VaIFmFrU.js"), "./components/SwTabsPane.vue": () => import("./SwTabsPane-Dwtj8g7T-Dpg9j8nR.js") }), ke = {};
148
+ const we = /* @__PURE__ */ Object.assign({ "./components/SwAlert.vue": () => Promise.resolve().then(() => lt), "./components/SwButton.vue": () => import("./SwButton-jKDKwFV9-CXc8MFE5.js"), "./components/SwButtonGroup.vue": () => import("./SwButtonGroup-D9HH5POO-ImB2afuu.js"), "./components/SwCollapse.vue": () => import("./SwCollapse-CuN3EbT6-Bp57Ya_9.js"), "./components/SwDatePicker.vue": () => import("./SwDatePicker-CJjKSM8k-MaDENLOD.js"), "./components/SwDropdown.vue": () => import("./SwDropdown-DQGTnnKw-CJPDuCfV.js"), "./components/SwDropdownItem.vue": () => import("./SwDropdownItem-CtlMVgsX-B0y_klNq.js"), "./components/SwDropdownNew.vue": () => import("./SwDropdownNew-CYfjZFd2-nlDq08DL.js"), "./components/SwFormItem.vue": () => import("./SwFormItem-CaA4jsoa-6C3zw4iZ.js"), "./components/SwGide.vue": () => import("./SwGide-DbSSyZ-y-CdqOXtTf.js"), "./components/SwIcon.vue": () => Promise.resolve().then(() => et), "./components/SwInput.vue": () => import("./SwInput-DCV1rrWa-RwwuH45g.js"), "./components/SwMessage.vue": () => import("./SwMessage-CovKkpf6-DgzuTa6f.js"), "./components/SwSection.vue": () => import("./SwSection-D8ooQ21I-DkmOwvIl.js"), "./components/SwSelect.vue": () => import("./SwSelect-C2RKinez-BD70YvFF.js"), "./components/SwSkeleton.vue": () => import("./SwSkeleton-B7ysp8L9-DnocmEnE.js"), "./components/SwSkeletonItem.vue": () => import("./SwSkeletonItem-CU7LvihY-DdKyY6kY.js"), "./components/SwSlider.vue": () => import("./SwSlider-YncjYKPw-DWb3SdAc.js"), "./components/SwSwitch.vue": () => import("./SwSwitch-6rl1IT4p-Cq2vi3fZ.js"), "./components/SwTable.vue": () => import("./SwTable-BKZ5idCi-DEX2rFo2.js"), "./components/SwTableColumn.vue": () => import("./SwTableColumn-BLF5bPuJ-CHI10OyO.js"), "./components/SwTabs.vue": () => import("./SwTabs-DkSI4oAh-VaIFmFrU.js"), "./components/SwTabsPane.vue": () => import("./SwTabsPane-Dwtj8g7T-Dpg9j8nR.js") }), ke = {};
149
149
  for (const u in we) {
150
150
  const h = u.split("/").pop().replace(".vue", "").replace(/-(\w)/g, (c, a) => a.toUpperCase());
151
151
  ke[h] = Ae(() => we[u]());
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),ve=require("vue-i18n"),B=require("./index-CP8E7I_f.cjs"),me=require("file-saver"),pe=require("exceljs"),s=require("element-plus"),P=require("@imengyu/vue3-context-menu");function fe(r){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const u in r)if(u!=="default"){const n=Object.getOwnPropertyDescriptor(r,u);Object.defineProperty(f,u,n.get?n:{enumerable:!0,get:()=>r[u]})}}return f.default=r,Object.freeze(f)}const ge=fe(pe);function he(r){return/^(https?:|mailto:|tel:)/.test(r)}function ye(r,f){if(arguments.length===0||!r)return null;const u=f||"{Y}-{m}-{d} {G}:{i}:{s}";let n;typeof r=="object"?n=r:(typeof r=="string"&&(/^[0-9]+$/.test(r)?r=parseInt(r):r=r.replace(new RegExp(/-/gm),"/")),typeof r=="number"&&r.toString().length===10&&(r=r*1e3),n=new Date(r));const x="ru-RU",m={Y:n.getFullYear(),m:(n.getMonth()+1).toString().padStart(2,"0"),d:n.getDate(),dd:n.getDate().toString().padStart(2,"0"),G:n.getHours(),H:n.getHours().toString().padStart(2,"0"),i:n.getMinutes().toString().padStart(2,"0"),s:n.getSeconds().toString().padStart(2,"0"),D:new Intl.DateTimeFormat(x,{weekday:"short"}).format(n),F:new Intl.DateTimeFormat(x,{month:"long"}).format(n),M:new Intl.DateTimeFormat(x,{month:"short"}).format(n)};return u.replace(/{(dd|[YmdGHisDFM])+}/g,(c,V)=>m[V])}function Se(r){let f=r.split(r.match(/\D.*?\D?/));return f[0].length>2?f.join("-")+"T00:00:01":f.reverse().join("-")+"T00:00:01"}function Ce(r,f){if(/^\+[0-9]\s/.test(f)&&r.length===2||/^\+0\s/.test(r))return"";if(typeof r>"u"||r.length===0)return r;const u="+0 (___) ___-__-__";let n=0;const x=u.replace(/\D/g,""),m=r.replace(/\D/g,"");let c=u.replace(/[_\d]/g,b=>n<m.length?m.charAt(n++)||x.charAt(n):b);n=c.indexOf("_"),n!==-1&&(n=n<5?3:n,c=c.slice(0,n));let V=u.slice(0,r.length).replace(/_+/g,b=>`\\d{1,${b.length}}`).replace(/[+()]/g,"\\$&");return V=new RegExp(`^${V}$`),c=c.replace(/[-—]$|(\) )$/g,""),!V.test(r)||r.length<5?c:r}function ke(r,f=!1){const u=r.getBoundingClientRect();return f?u.left>50?{right:"100%",marginRight:"10px"}:{left:"100%",marginLeft:"10px"}:{bottom:"100%",marginBottom:"10px"}}const we=["href"],F={__name:"SwIcon",props:{prefix:{type:String,default:"icon"},iconClass:{type:String,required:!0},className:{type:String,default:""}},setup(r){const f=r,u=he(f.iconClass);return(n,x)=>e.unref(u)?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,style:"mask: url("+f.iconClass+") no-repeat 50% 50%;",class:"sw-external-icon svg-icon"},n.$attrs),null,16)):(e.openBlock(),e.createElementBlock("svg",e.mergeProps({key:1,class:"sw-icon icon-"+(f.className||f.iconClass),"aria-hidden":"true"},n.$attrs),[e.createElementVNode("use",{href:"#"+f.prefix+"-"+f.iconClass},null,8,we)],16))}},be=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"})),xe={__name:"SwAlert",props:{message:{type:String,default:"Default message"},before:{type:String,default:""},class:{type:String,default:""},after:{type:String,default:""},size:{type:String,default:""},duration:{type:Number,default:6e3},type:{type:String,default:"info",validator:r=>["success","warning","error","info"].includes(r)}},emits:["closed"],setup(r,{emit:f}){const u=r,n=f,x=e.ref(!1);let m=null;const c=()=>{document.querySelector(".sw-alert-wrapper").togglePopover(),x.value=!0,document.querySelector(".sw-alert-wrapper").showPopover(),h()},V=()=>{x.value=!1,n("closed")},b=()=>{m&&(clearTimeout(m),m=null)},T=()=>{h()},h=()=>{m=setTimeout(V,u.duration)};e.onMounted(()=>{c()}),e.onUnmounted(()=>{m&&clearTimeout(m)});const D=e.computed(()=>{const g=["sw-alert"];return u.size.length>0&&g.push(`sw-${u.size}`),u.type.length>0&&g.push(`sw-${u.type}`),u.class.length>0&&g.push(u.class),g});return(g,j)=>(e.openBlock(),e.createBlock(e.Transition,{name:"fade"},{default:e.withCtx(()=>[x.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(D.value),onMouseenter:b,onMouseleave:T},[u.before.length>0?(e.openBlock(),e.createBlock(F,{key:0,"icon-class":u.before},null,8,["icon-class"])):e.renderSlot(g.$slots,"prefix",{key:1}),e.renderSlot(g.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(u.message),1)]),u.after.length>0?(e.openBlock(),e.createBlock(F,{key:2,"icon-class":u.after,onClick:V},null,8,["icon-class"])):e.renderSlot(g.$slots,"suffix",{key:3}),e.createElementVNode("footer",null,[e.renderSlot(g.$slots,"footer")])],34)):e.createCommentVNode("",!0)]),_:3}))}},Ee=Object.freeze(Object.defineProperty({__proto__:null,default:xe},Symbol.toStringTag,{value:"Module"}));document.querySelector("div.sw-alert-wrapper");const Q=Object.assign({"./components/SwAlert.vue":()=>Promise.resolve().then(()=>Ee),"./components/SwButton.vue":()=>Promise.resolve().then(()=>require("./SwButton-jKDKwFV9-DxLmT5Vr.cjs")),"./components/SwButtonGroup.vue":()=>Promise.resolve().then(()=>require("./SwButtonGroup-D9HH5POO-kgttQyq1.cjs")),"./components/SwCollapse.vue":()=>Promise.resolve().then(()=>require("./SwCollapse-CuN3EbT6-1y2PMRQ8.cjs")),"./components/SwDatePicker.vue":()=>Promise.resolve().then(()=>require("./SwDatePicker-CJjKSM8k-DcbaIBqf.cjs")),"./components/SwDropdown.vue":()=>Promise.resolve().then(()=>require("./SwDropdown-DQGTnnKw-BltvlnsL.cjs")),"./components/SwDropdownItem.vue":()=>Promise.resolve().then(()=>require("./SwDropdownItem-CtlMVgsX-ZJmmZqlp.cjs")),"./components/SwDropdownNew.vue":()=>Promise.resolve().then(()=>require("./SwDropdownNew-CYfjZFd2-DIv6p-6i.cjs")),"./components/SwFormItem.vue":()=>Promise.resolve().then(()=>require("./SwFormItem-CaA4jsoa-MFTEfPiY.cjs")),"./components/SwGide.vue":()=>Promise.resolve().then(()=>require("./SwGide-DbSSyZ-y-DpAbGOSb.cjs")),"./components/SwIcon.vue":()=>Promise.resolve().then(()=>be),"./components/SwInput.vue":()=>Promise.resolve().then(()=>require("./SwInput-DCV1rrWa-cwMXMtK3.cjs")),"./components/SwMessage.vue":()=>Promise.resolve().then(()=>require("./SwMessage-CovKkpf6-7NQhNWpm.cjs")),"./components/SwSection.vue":()=>Promise.resolve().then(()=>require("./SwSection-D8ooQ21I-Nsa_5V1p.cjs")),"./components/SwSelect.vue":()=>Promise.resolve().then(()=>require("./SwSelect-C2RKinez-KweWYzRe.cjs")),"./components/SwSkeleton.vue":()=>Promise.resolve().then(()=>require("./SwSkeleton-B7ysp8L9-RJwRbv_K.cjs")),"./components/SwSkeletonItem.vue":()=>Promise.resolve().then(()=>require("./SwSkeletonItem-CU7LvihY-BJmW7U8Z.cjs")),"./components/SwSlider.vue":()=>Promise.resolve().then(()=>require("./SwSlider-YncjYKPw-BwGmkWB-.cjs")),"./components/SwSwitch.vue":()=>Promise.resolve().then(()=>require("./SwSwitch-6rl1IT4p-BQTT__wH.cjs")),"./components/SwTable.vue":()=>Promise.resolve().then(()=>require("./SwTable-BKZ5idCi-BMDZ1otG.cjs")),"./components/SwTableColumn.vue":()=>Promise.resolve().then(()=>require("./SwTableColumn-BLF5bPuJ-CbuAoznO.cjs")),"./components/SwTabs.vue":()=>Promise.resolve().then(()=>require("./SwTabs-DkSI4oAh-By6KQ_XO.cjs")),"./components/SwTabsPane.vue":()=>Promise.resolve().then(()=>require("./SwTabsPane-Dwtj8g7T-BUCrffEQ.cjs"))}),ee={};for(const r in Q){const f=r.split("/").pop().replace(".vue","").replace(/-(\w)/g,(u,n)=>n.toUpperCase());ee[f]=e.defineAsyncComponent(()=>Q[r]())}const Ve={class:"nav"},Ne={class:"vacation-calendar"},De={key:0},Be={key:0,class:"controls-container",style:{"margin-top":".5rem"}},Te={key:0},$e={key:1,style:{padding:"0 1rem .5rem"}},_e={style:{padding:".5rem 0 0"}},Pe={__name:"VacationTable",props:{odata:Object,workSchedule:Object,fullName:{type:String,default:"Вы"},query:String,checkEdit:{type:Boolean,default:!1}},setup(r){const{SwDatePicker:f}=ee,u=r,{t:n,d:x}=ve.useI18n(),m=e.ref([]),c=e.ref(new Date().getFullYear()),V=new Date().getMonth()>10?[{value:c.value,label:c.value},{value:c.value+1,label:c.value+1}]:[{value:c.value-1,label:c.value-1},{value:c.value,label:c.value}],b=e.ref([]),T=e.ref("100%"),h=e.ref(1),D=e.ref(!1),g=e.ref(1),j=e.ref(!1),N=e.ref(!1),A=e.ref({zIndex:3,minWidth:230,x:500,y:200}),$=e.ref(!1),q=e.ref({participants:[]}),R=e.ref([]),H=e.ref([]),C=e.ref([]),z=e.ref([{value:"all",label:n("vacationSchedule.all"),key:"all"}]),M=e.ref(!1),G=e.ref(!1),d=e.ref({name:"",length:0,code:""}),O=async()=>{u.odata.getEmployee(c.value-1+"-12-17T23:59:00").then(a=>{var t,i;return C.value.length===0?C.value=[(t=a.find(o=>o.employeeName===u.fullName))==null?void 0:t.divisionName]:C.value=C.value.includes("all")||a.some(o=>C.value.includes(o.divisionName))?C.value:[(i=a.find(o=>o.employeeName===u.fullName))==null?void 0:i.divisionName],a.forEach(o=>{z.value.some(v=>(v==null?void 0:v.value)===o.divisionName)||z.value.push({value:o.divisionName,label:o.divisionName,key:o.divisionName})}),U(),!0})};e.watch(C,async(a,t)=>{a!==t&&(b.value=[],j.value=!1,u.odata.employee.forEach(i=>{(a.includes(i.divisionName)||a.includes("all"))&&(b.value.some(o=>(o==null?void 0:o.activeText)===i.roleName)||b.value.push({val:!0,activeText:i.roleName}))}),U())});const te=(a,t)=>{console.log("event",t),console.log("column",a),a.level===2&&a.no>0&&h.value===2&&(h.value=3,g.value=a.no)},U=()=>{m.value=[];let a=[];u.odata.employee.forEach(t=>{(C.value.includes(t.divisionName)||C.value.includes("all"))&&b.value.some(i=>i.val&&i.activeText===t.roleName)&&(a.push(t.employeeKey),m.value.push({name:t.employeeName,days:[{note:""}],jobTitle:t.roleName,code:t.employeeKey}))}),le(a),D.value=!1},le=a=>{u.workSchedule.getAllVacations({year:c.value}).then(t=>{a.forEach((i,o)=>{m.value[o].days=[{note:""}],t.forEach(v=>{i===v.code&&(typeof m.value[o].days[0].dateStart>"u"?m.value[o].days[0]={dateStart:B.parseTime(v.dateStart,"{dd}.{m}.{Y}"),dateEnd:B.parseTime(v.dateEnd,"{dd}.{m}.{Y}"),note:v.note,count:v.count}:m.value[o].days.push({dateStart:B.parseTime(v.dateStart,"{dd}.{m}.{Y}"),dateEnd:B.parseTime(v.dateEnd,"{dd}.{m}.{Y}"),note:v.note,count:v.count}))})})})},ae=a=>{if(a.columnIndex<3&&S.value[a.rowIndex].key<S.value[a.rowIndex].days.length)return S.value[a.rowIndex].key===0?{rowspan:S.value[a.rowIndex].days.length,colspan:1}:{rowspan:0,colspan:0}},J=(a,t,i,o)=>{var v;if(console.log("coMenu",a,t,i,o),d.value.ids=a.ids,d.value.key=typeof a.key>"u"?m.value[a.ids].days.length:a.key,d.value.startDate=a.dateStart,d.value.endDate=a.dateEnd,d.value.name=h.value>1?a.employee:a.name,d.value.count=a.count,d.value.length=((v=a.days)==null?void 0:v.length)||0,d.value.allCount=()=>a.days.length===0?0:a.days.reduce((l,p,k)=>k!==a.key?l+parseInt(p.count):l,0),d.value.add=d.value.length>0&&a.days[a.days.length-1].count,d.value.level=t.level,d.value.holiday=H.value,A.value.y=o.clientY,A.value.x=o.clientX,h.value===1&&t.level===2&&t.no<4&&(d.value.add||a.days.length>1)&&(N.value=!0),t.level===3&&(N.value=!0),h.value>1&&t.level===2&&t.no>0)if(h.value>2){d.value.firstDate=`${t.no.toString().length===1?"0"+t.no:t.no}-${g.value.toString().length===1?"0"+g.value:g.value}-${c.value}`,console.log("firstDate",d.value.firstDate);const l=new Date(c.value,g.value-1,t.no),p=m.value[d.value.ids];if(p&&p.days)for(let k=0;k<p.days.length;k++){const w=p.days[k];if(w.dateStart&&w.dateEnd){const y=I(w.dateStart),E=I(w.dateEnd);if(y&&E&&l>=y&&l<=E){d.value.startDate=w.dateStart,d.value.endDate=w.dateEnd,d.value.key=k;break}}}N.value=!0}else h.value===2&&a[`m${t.no}`].length>0?(g.value=t.no,h.value=3):(d.value.firstDate=`01-${t.no.toString().length===1?"0"+t.no:t.no}-${c.value}`,N.value=!0)};function I(a){if(!a)return null;const t=a.split(".");if(t.length!==3)return null;const[i,o,v]=t.map(Number);return new Date(v,o-1,i)}function W(a){const t=String(a.getDate()).padStart(2,"0"),i=String(a.getMonth()+1).padStart(2,"0");return`${t}.${i}`}const K=({row:a,columnIndex:t})=>{var o;if(h.value!==3||t===0||((o=a[`m${g.value}`])==null?void 0:o.length)===0)return"";const i=new Date(c.value,g.value,t).getTime()+1e3;for(let v of a[`m${g.value}`]){const l=new Date(c.value,v.text.split("-")[0].split(".")[1],v.text.split("-")[0].split(".")[0]).getTime(),p=new Date(c.value,v.text.split("-")[1].split(".")[1],v.text.split("-")[1].split(".")[0],23,59,59).getTime();if(i>=l&&i<=p)return"vacation"}return""};function ne(a,t){const i=I(a),o=I(t);if(!i||!o||o<i)return[];const v=[];let l=new Date(i);for(;l<=o;){const p=l.getMonth()+1,k=l.getFullYear(),w=new Date(k,l.getMonth()+1,0),y=l<i?i:l,E=w>o?o:w,_=`${W(y)}-${W(E)}`;v.push({month:p,text:_}),l=new Date(k,l.getMonth()+1,1)}return v}const Y=(a,t=!1)=>{let i=m.value[d.value.ids];switch(a){case"add":i.days.push({note:""}),console.log(i.days.length);break;case"delete":t?delete i.days[t]:i.days.pop(),L(d.value.ids);break}N.value=!1},oe=a=>{G.value=a,d.value.count=a.count},re=()=>{G.value&&(m.value[d.value.ids].days[d.value.key]={...G.value,note:""},L(d.value.ids)),N.value=!1},L=a=>{u.workSchedule.rewriteFull({year:c.value,code:m.value[a].code,data:m.value[a].days.map(t=>({dateStart:t.dateStart.split(".").reverse().join("-"),dateEnd:t.dateEnd.split(".").reverse().join("-"),note:t.note,count:t.count}))})},X=a=>{u.workSchedule.sendConfirmMessage({fullname:u.fullName,confirm:a}),u.query=""};function Z(a){return new Date(2025,a-1,1).toLocaleString("ru",{month:"long"})}const S=e.computed(()=>m.value.flatMap((a,t)=>!a.days||a.days.length===0?[{...a,key:0,ids:t}]:a.days.map((i,o)=>({ids:t,key:o,...a,...i})))),ue=e.computed(()=>m.value.map((a,t)=>{const i={employee:B.byInitials(a.name),code:a.code,ids:t};for(let o=1;o<=12;o++)i[`m${o}`]=[];return a.days.forEach(o=>{if(!o.dateStart||!o.dateEnd)return;ne(o.dateStart,o.dateEnd).forEach(l=>{l.month>=1&&l.month<=12&&i[`m${l.month}`].push({text:l.text,count:o.count,dateStart:o.dateStart,dateEnd:o.dateEnd})})}),i})),ie=()=>{u.workSchedule.sendAgreementMessage({users:q.value.participants}),$.value=!1};u.workSchedule.getBoss().then(a=>{R.value=a[0].users}),B.holidays().then(a=>{H.value=a,O()});const de=()=>d.value.length<2?[{dateStart:"01.01."+c.value,dateEnd:"31.12."+c.value}]:[{dateStart:"01.01."+c.value,dateEnd:"31.12."+c.value}],se=async()=>{M.value=!0;const a=new ge.Workbook,t=a.addWorksheet(c.value.toString(),{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0}}),i={vertical:"middle",horizontal:"center"},o={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},v={vertical:"middle",horizontal:"center",wrapText:!0},l={vertical:"middle",horizontal:"right",wrapText:!0};t.mergeCells("D1:G1"),t.mergeCells("D2:G2"),t.mergeCells("D3:G3"),t.mergeCells("D4:G4"),t.mergeCells("A5:G5"),t.mergeCells("A6:G6"),t.mergeCells("A9:G9"),t.mergeCells("A10:A11"),t.mergeCells("B10:B11"),t.mergeCells("C10:C11"),t.mergeCells("D10:F10"),t.mergeCells("G10:G11"),t.getCell("D1").value=n("vacationSchedule.approve"),t.getCell("D2").value=n("vacationSchedule.dateApprove",{year:c.value-1}),t.getCell("D3").value=n("workSchedule.printPlace"),t.getCell("D4").value=n("vacationSchedule.dateApprove",{year:c.value-1}),t.getCell("A5").value=n("workSchedule.firm"),t.getCell("B7").value=n("vacationSchedule.vacationSchedule"),t.getCell("C7").value=n("vacationSchedule.numberDocs"),t.getCell("D7").value=n("vacationSchedule.compilation"),t.getCell("E7").value=n("vacationSchedule.year"),t.getCell("C8").value="",t.getCell("D8").value="",t.getCell("E8").value=c.value,t.getCell("E7").value=n("vacationSchedule.year"),t.getCell("A10").value=n("vacationSchedule.jobTitle"),t.getCell("B10").value=n("vacationSchedule.fullName"),t.getCell("C10").value=n("vacationSchedule.personnelNumber"),t.getCell("D10").value=n("vacationSchedule.vacation"),t.getCell("D11").value=n("vacationSchedule.days"),t.getCell("E11").value=n("vacationSchedule.date"),t.getCell("F11").value=n("vacationSchedule.endDate"),t.getCell("G11").value=n("vacationSchedule.note"),t.getRow(1).height=80,t.getColumn(1).width=28,t.getColumn(2).width=28,t.getColumn(3).width=18,t.getColumn(4).width=18,t.getColumn(5).width=14,t.getColumn(6).width=14,t.getColumn(7).width=14,t.getColumn(1).alignment=v,t.getColumn(2).alignment=v,t.getColumn(3).alignment=v,t.getColumn(4).alignment=v,t.getColumn(5).alignment=v,t.getColumn(6).alignment=v,t.getColumn(7).alignment=v,t.getCell("D1").alignment=l,t.getCell("D2").alignment=l,t.getCell("D4").alignment=l,t.getCell("A5").alignment=i,t.getCell("C7").border=o,t.getCell("D7").border=o,t.getCell("E7").border=o,t.getCell("C8").border=o,t.getCell("D8").border=o,t.getCell("E8").border=o,t.getCell("A10").border=o,t.getCell("B10").border=o,t.getCell("C10").border=o,t.getCell("D10").border=o,t.getCell("G10").border=o,t.getCell("D11").border=o,t.getCell("E11").border=o,t.getCell("F11").border=o;let p=11;for(const y of m.value)if(y.days.length>1)y.days.forEach(E=>{let _=[y.jobTitle,y.name,y.code,E.count,E.dateStart,E.dateEnd,E.note];const ce=t.addRow(_);ce.border=o,p++}),t.mergeCells(`A${p-y.days.length+1}:A${p}`),t.mergeCells(`B${p-y.days.length+1}:B${p}`),t.mergeCells(`C${p-y.days.length+1}:C${p}`);else{let E=[y.jobTitle,y.name,y.code,y.days[0].count,y.days[0].dateStart,y.days[0].dateEnd,y.days[0].note];const _=t.addRow(E);_.border=o,p++}const k="export_"+B.parseTime(Date.now(),"{dd}.{m}.{Y}")+".xlsx",w=await a.xlsx.writeBuffer();me.saveAs(new Blob([w]),k),M.value=!1};return u.group&&(C.value[0]=u.group),O(),(a,t)=>{const i=e.resolveComponent("el-radio-button"),o=e.resolveComponent("el-radio-group"),v=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Ve,[r.checkEdit?(e.openBlock(),e.createBlock(e.unref(s.ElSelect),{key:0,modelValue:C.value,"onUpdate:modelValue":t[0]||(t[0]=l=>C.value=l),multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"Select",style:{width:"240px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,l=>(e.openBlock(),e.createBlock(e.unref(s.ElOption),{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),r.checkEdit?(e.openBlock(),e.createBlock(e.unref(s.ElButton),{key:1,plain:"",onClick:t[1]||(t[1]=l=>D.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("workSchedule.jobTitle")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(s.ElSelect),{modelValue:c.value,"onUpdate:modelValue":t[2]||(t[2]=l=>c.value=l),onChange:O,placeholder:"Year",style:{width:"80px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(V),l=>(e.openBlock(),e.createBlock(e.unref(s.ElOption),{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e.createVNode(o,{modelValue:h.value,"onUpdate:modelValue":t[3]||(t[3]=l=>h.value=l)},{default:e.withCtx(()=>[e.createVNode(i,{label:e.unref(n)("vacationSchedule.currentTable.1"),value:1},null,8,["label"]),e.createVNode(i,{label:e.unref(n)("vacationSchedule.currentTable.2"),value:2},null,8,["label"])]),_:1},8,["modelValue"]),t[19]||(t[19]=e.createElementVNode("div",{class:"expander"},null,-1)),e.createVNode(e.unref(s.ElSwitch),{modelValue:T.value,"onUpdate:modelValue":t[4]||(t[4]=l=>T.value=l),"active-text":a.$t("vacationSchedule.currentHeight"),"active-value":"100%","inactive-value":"calc(100vh - var(--el-component-size)*5 - var(--el-main-padding)*2 - var(--header-height))"},null,8,["modelValue","active-text"])]),e.createElementVNode("div",Ne,[h.value===1?(e.openBlock(),e.createBlock(e.unref(s.ElTable),{key:0,id:"printTable",data:S.value,"span-method":ae,onCellClick:J,border:"",style:{width:"100%"},size:"small","empty-text":e.unref(n)("vacationSchedule.emptyText")},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ElTableColumn),{label:C.value!=="all"?e.unref(n)("vacationSchedule.title",{name:C.value[0]}):e.unref(n)("vacationSchedule.enterprise")+` ${c.value}`,align:"center",height:"34"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ElTableColumn),{label:e.unref(n)("vacationSchedule.jobTitle"),width:"180",align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(S.value[l.$index].jobTitle),1)]),_:1},8,["label"]),e.createVNode(e.unref(s.ElTableColumn),{label:e.unref(n)("vacationSchedule.fullName"),width:"180",align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(S.value[l.$index].name),1)]),_:1},8,["label"]),e.createVNode(e.unref(s.ElTableColumn),{label:e.unref(n)("vacationSchedule.personnelNumber"),align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(S.value[l.$index].code),1)]),_:1},8,["label"]),e.createVNode(e.unref(s.ElTableColumn),{label:e.unref(n)("vacationSchedule.vacation"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ElTableColumn),{label:e.unref(n)("vacationSchedule.days"),align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(S.value[l.$index].count),1)]),_:1},8,["label"]),e.createVNode(e.unref(s.ElTableColumn),{label:e.unref(n)("vacationSchedule.date"),align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(S.value[l.$index].dateStart),1)]),_:1},8,["label"]),e.createVNode(e.unref(s.ElTableColumn),{label:e.unref(n)("vacationSchedule.endDate"),align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(S.value[l.$index].dateEnd),1)]),_:1},8,["label"])]),_:1},8,["label"]),e.createVNode(e.unref(s.ElTableColumn),{label:e.unref(n)("vacationSchedule.note"),align:"center"},{default:e.withCtx(l=>[e.createVNode(e.unref(s.ElInput),{modelValue:m.value[S.value[l.$index].ids].days[S.value[l.$index].key].note,"onUpdate:modelValue":p=>m.value[S.value[l.$index].ids].days[S.value[l.$index].key].note=p,style:{width:"100%"},placeholder:" ",class:"noBorder",onBlur:p=>L(S.value[l.$index].ids)},null,8,["modelValue","onUpdate:modelValue","onBlur"])]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])):(e.openBlock(),e.createBlock(e.unref(s.ElTable),{key:1,data:ue.value,style:{width:"100%"},"max-height":T.value,onHeaderClick:te,onCellClick:J,size:"small","empty-text":e.unref(n)("sheet.emptyText"),"cell-class-name":K,align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ElTableColumn),{label:"Календарь отпусков "+C.value.toString()+" за "+(h.value===3?Z(g.value)+" ":"")+c.value+"г.",align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ElTableColumn),{prop:"employee",label:"Сотрудник",fixed:""}),h.value===2?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(12,l=>e.createVNode(e.unref(s.ElTableColumn),{key:l,label:Z(l),prop:`m${l}`},{default:e.withCtx(({row:p})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p[`m${l}`],(k,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"vacation-item"},e.toDisplayString(k.text),1))),128))]),_:2},1032,["label","prop"])),64)):e.createCommentVNode("",!0),h.value===3?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(new Date(c.value,g.value,0).getDate(),l=>(e.openBlock(),e.createBlock(e.unref(s.ElTableColumn),{key:l,label:l.toString(),align:"center",width:"40"},{default:e.withCtx(({row:p,columnIndex:k})=>[e.createElementVNode("div",null,[K({row:p,columnIndex:l})!==""?(e.openBlock(),e.createElementBlock("span",De,"ОТ")):e.createCommentVNode("",!0)])]),_:2},1032,["label"]))),128)):e.createCommentVNode("",!0)]),_:1},8,["label"])]),_:1},8,["data","max-height","empty-text"]))]),r.checkEdit?(e.openBlock(),e.createElementBlock("div",Be,[j.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(s.ElButton),{key:0,type:"primary",onClick:t[5]||(t[5]=l=>$.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.sendInformation")),1)]),_:1})),r.query==="confirm"?(e.openBlock(),e.createBlock(e.unref(s.ElButton),{key:1,type:"primary",onClick:t[6]||(t[6]=l=>X(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.agreeOn")),1)]),_:1})):e.createCommentVNode("",!0),r.query==="confirm"?(e.openBlock(),e.createBlock(e.unref(s.ElButton),{key:2,type:"primary",onClick:t[7]||(t[7]=l=>X(!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.reject")),1)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(e.unref(s.ElButton),{disabled:M.value,plain:"",onClick:se,style:{"margin-top":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("workSchedule.exportExcel")),1)]),_:1},8,["disabled"])),[[v,M.value]]),e.createVNode(e.unref(s.ElDialog),{title:e.unref(n)("workSchedule.jobTitle"),modelValue:D.value,"onUpdate:modelValue":t[10]||(t[10]=l=>D.value=l),width:"400px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(s.ElButton),{onClick:t[8]||(t[8]=l=>D.value=!1),size:"default"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("workSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(s.ElButton),{size:"default",type:"primary",onClick:t[9]||(t[9]=l=>{U(),D.value=!1})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("workSchedule.select")),1)]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(s.ElForm),{model:b.value,autocomplete:"on"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,l=>(e.openBlock(),e.createBlock(e.unref(s.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(s.ElSwitch),{modelValue:l.val,"onUpdate:modelValue":p=>l.val=p,"active-text":l.activeText},null,8,["modelValue","onUpdate:modelValue","active-text"])]),_:2},1024))),256))]),_:1},8,["model"])]),_:1},8,["title","modelValue"]),e.createVNode(e.unref(s.ElDialog),{title:e.unref(n)("vacationSchedule.pleaseCoordinate"),modelValue:$.value,"onUpdate:modelValue":t[13]||(t[13]=l=>$.value=l),width:"500px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(s.ElButton),{onClick:t[12]||(t[12]=l=>$.value=!1),size:"default"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("workSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(s.ElButton),{size:"default",type:"primary",onClick:ie},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.send")),1)]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(s.ElForm),{model:q.value,autocomplete:"on"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ElSelect),{modelValue:q.value.participants,"onUpdate:modelValue":t[11]||(t[11]=l=>q.value.participants=l),placeholder:e.unref(n)("vacationSchedule.fullName"),multiple:"",size:"default"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,l=>(e.openBlock(),e.createBlock(e.unref(s.ElOption),{key:l,label:l,value:l},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["model"])]),_:1},8,["title","modelValue"]),e.createVNode(e.unref(P.ContextMenu),{show:N.value,"onUpdate:show":t[18]||(t[18]=l=>N.value=l),options:A.value},{default:e.withCtx(()=>[e.createVNode(e.unref(P.ContextMenuItem),{label:h.value.value>1||d.value.level===3&&typeof d.value.count<"u"?d.value.name+" "+d.value.count+" "+e.unref(n)("vacationSchedule.day",d.value.count)+` ${e.unref(n)("vacationSchedule.from")}: ${d.value.allCount()+parseInt(d.value.count)}`:d.value.name,disabled:""},null,8,["label"]),e.createVNode(e.unref(P.ContextMenuSeparator)),d.value.level===2&&h.value===1?(e.openBlock(),e.createElementBlock("div",Te,[d.value.length>1?(e.openBlock(),e.createBlock(e.unref(P.ContextMenuItem),{key:0,label:e.unref(n)("vacationSchedule.deleteLast"),onClick:t[14]||(t[14]=l=>Y("delete",d.value.key))},null,8,["label"])):e.createCommentVNode("",!0),d.value.add?(e.openBlock(),e.createBlock(e.unref(P.ContextMenuItem),{key:1,label:e.unref(n)("vacationSchedule.addVacation"),onClick:t[15]||(t[15]=l=>Y("add"))},null,8,["label"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(e.unref(f),{data:d.value,range:"range",limitation:de(),onInput:oe},null,8,["data","limitation"]),e.createElementVNode("div",_e,[d.value.startDate?(e.openBlock(),e.createBlock(e.unref(s.ElButton),{key:0,onClick:t[16]||(t[16]=l=>Y("delete"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.delete")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(s.ElButton),{onClick:t[17]||(t[17]=l=>N.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(s.ElButton),{onClick:re},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.save")),1)]),_:1})])]))]),_:1},8,["show","options"])],64)}}};exports.J=ke;exports.L=ye;exports.U=Se;exports.V=Ce;exports._sfc_main=Pe;exports.g=F;
1
+ "use strict";const e=require("vue"),ve=require("vue-i18n"),B=require("./index-uKIn9vG1.cjs"),me=require("file-saver"),pe=require("exceljs"),s=require("element-plus"),P=require("@imengyu/vue3-context-menu");function fe(r){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const u in r)if(u!=="default"){const n=Object.getOwnPropertyDescriptor(r,u);Object.defineProperty(f,u,n.get?n:{enumerable:!0,get:()=>r[u]})}}return f.default=r,Object.freeze(f)}const ge=fe(pe);function he(r){return/^(https?:|mailto:|tel:)/.test(r)}function ye(r,f){if(arguments.length===0||!r)return null;const u=f||"{Y}-{m}-{d} {G}:{i}:{s}";let n;typeof r=="object"?n=r:(typeof r=="string"&&(/^[0-9]+$/.test(r)?r=parseInt(r):r=r.replace(new RegExp(/-/gm),"/")),typeof r=="number"&&r.toString().length===10&&(r=r*1e3),n=new Date(r));const x="ru-RU",m={Y:n.getFullYear(),m:(n.getMonth()+1).toString().padStart(2,"0"),d:n.getDate(),dd:n.getDate().toString().padStart(2,"0"),G:n.getHours(),H:n.getHours().toString().padStart(2,"0"),i:n.getMinutes().toString().padStart(2,"0"),s:n.getSeconds().toString().padStart(2,"0"),D:new Intl.DateTimeFormat(x,{weekday:"short"}).format(n),F:new Intl.DateTimeFormat(x,{month:"long"}).format(n),M:new Intl.DateTimeFormat(x,{month:"short"}).format(n)};return u.replace(/{(dd|[YmdGHisDFM])+}/g,(c,V)=>m[V])}function Se(r){let f=r.split(r.match(/\D.*?\D?/));return f[0].length>2?f.join("-")+"T00:00:01":f.reverse().join("-")+"T00:00:01"}function Ce(r,f){if(/^\+[0-9]\s/.test(f)&&r.length===2||/^\+0\s/.test(r))return"";if(typeof r>"u"||r.length===0)return r;const u="+0 (___) ___-__-__";let n=0;const x=u.replace(/\D/g,""),m=r.replace(/\D/g,"");let c=u.replace(/[_\d]/g,b=>n<m.length?m.charAt(n++)||x.charAt(n):b);n=c.indexOf("_"),n!==-1&&(n=n<5?3:n,c=c.slice(0,n));let V=u.slice(0,r.length).replace(/_+/g,b=>`\\d{1,${b.length}}`).replace(/[+()]/g,"\\$&");return V=new RegExp(`^${V}$`),c=c.replace(/[-—]$|(\) )$/g,""),!V.test(r)||r.length<5?c:r}function ke(r,f=!1){const u=r.getBoundingClientRect();return f?u.left>50?{right:"100%",marginRight:"10px"}:{left:"100%",marginLeft:"10px"}:{bottom:"100%",marginBottom:"10px"}}const we=["href"],F={__name:"SwIcon",props:{prefix:{type:String,default:"icon"},iconClass:{type:String,required:!0},className:{type:String,default:""}},setup(r){const f=r,u=he(f.iconClass);return(n,x)=>e.unref(u)?(e.openBlock(),e.createElementBlock("div",e.mergeProps({key:0,style:"mask: url("+f.iconClass+") no-repeat 50% 50%;",class:"sw-external-icon svg-icon"},n.$attrs),null,16)):(e.openBlock(),e.createElementBlock("svg",e.mergeProps({key:1,class:"sw-icon icon-"+(f.className||f.iconClass),"aria-hidden":"true"},n.$attrs),[e.createElementVNode("use",{href:"#"+f.prefix+"-"+f.iconClass},null,8,we)],16))}},be=Object.freeze(Object.defineProperty({__proto__:null,default:F},Symbol.toStringTag,{value:"Module"})),xe={__name:"SwAlert",props:{message:{type:String,default:"Default message"},before:{type:String,default:""},class:{type:String,default:""},after:{type:String,default:""},size:{type:String,default:""},duration:{type:Number,default:6e3},type:{type:String,default:"info",validator:r=>["success","warning","error","info"].includes(r)}},emits:["closed"],setup(r,{emit:f}){const u=r,n=f,x=e.ref(!1);let m=null;const c=()=>{document.querySelector(".sw-alert-wrapper").togglePopover(),x.value=!0,document.querySelector(".sw-alert-wrapper").showPopover(),h()},V=()=>{x.value=!1,n("closed")},b=()=>{m&&(clearTimeout(m),m=null)},T=()=>{h()},h=()=>{m=setTimeout(V,u.duration)};e.onMounted(()=>{c()}),e.onUnmounted(()=>{m&&clearTimeout(m)});const D=e.computed(()=>{const g=["sw-alert"];return u.size.length>0&&g.push(`sw-${u.size}`),u.type.length>0&&g.push(`sw-${u.type}`),u.class.length>0&&g.push(u.class),g});return(g,j)=>(e.openBlock(),e.createBlock(e.Transition,{name:"fade"},{default:e.withCtx(()=>[x.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(D.value),onMouseenter:b,onMouseleave:T},[u.before.length>0?(e.openBlock(),e.createBlock(F,{key:0,"icon-class":u.before},null,8,["icon-class"])):e.renderSlot(g.$slots,"prefix",{key:1}),e.renderSlot(g.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(u.message),1)]),u.after.length>0?(e.openBlock(),e.createBlock(F,{key:2,"icon-class":u.after,onClick:V},null,8,["icon-class"])):e.renderSlot(g.$slots,"suffix",{key:3}),e.createElementVNode("footer",null,[e.renderSlot(g.$slots,"footer")])],34)):e.createCommentVNode("",!0)]),_:3}))}},Ee=Object.freeze(Object.defineProperty({__proto__:null,default:xe},Symbol.toStringTag,{value:"Module"}));document.querySelector("div.sw-alert-wrapper");const Q=Object.assign({"./components/SwAlert.vue":()=>Promise.resolve().then(()=>Ee),"./components/SwButton.vue":()=>Promise.resolve().then(()=>require("./SwButton-jKDKwFV9-DxLmT5Vr.cjs")),"./components/SwButtonGroup.vue":()=>Promise.resolve().then(()=>require("./SwButtonGroup-D9HH5POO-kgttQyq1.cjs")),"./components/SwCollapse.vue":()=>Promise.resolve().then(()=>require("./SwCollapse-CuN3EbT6-1y2PMRQ8.cjs")),"./components/SwDatePicker.vue":()=>Promise.resolve().then(()=>require("./SwDatePicker-CJjKSM8k-BM055u68.cjs")),"./components/SwDropdown.vue":()=>Promise.resolve().then(()=>require("./SwDropdown-DQGTnnKw-BltvlnsL.cjs")),"./components/SwDropdownItem.vue":()=>Promise.resolve().then(()=>require("./SwDropdownItem-CtlMVgsX-DZBTkRCg.cjs")),"./components/SwDropdownNew.vue":()=>Promise.resolve().then(()=>require("./SwDropdownNew-CYfjZFd2-DIv6p-6i.cjs")),"./components/SwFormItem.vue":()=>Promise.resolve().then(()=>require("./SwFormItem-CaA4jsoa-MFTEfPiY.cjs")),"./components/SwGide.vue":()=>Promise.resolve().then(()=>require("./SwGide-DbSSyZ-y-BJOOalKN.cjs")),"./components/SwIcon.vue":()=>Promise.resolve().then(()=>be),"./components/SwInput.vue":()=>Promise.resolve().then(()=>require("./SwInput-DCV1rrWa-VI25fSFi.cjs")),"./components/SwMessage.vue":()=>Promise.resolve().then(()=>require("./SwMessage-CovKkpf6-BldEKjAC.cjs")),"./components/SwSection.vue":()=>Promise.resolve().then(()=>require("./SwSection-D8ooQ21I-Nsa_5V1p.cjs")),"./components/SwSelect.vue":()=>Promise.resolve().then(()=>require("./SwSelect-C2RKinez-KweWYzRe.cjs")),"./components/SwSkeleton.vue":()=>Promise.resolve().then(()=>require("./SwSkeleton-B7ysp8L9-RJwRbv_K.cjs")),"./components/SwSkeletonItem.vue":()=>Promise.resolve().then(()=>require("./SwSkeletonItem-CU7LvihY-BJmW7U8Z.cjs")),"./components/SwSlider.vue":()=>Promise.resolve().then(()=>require("./SwSlider-YncjYKPw-RQiE3xTC.cjs")),"./components/SwSwitch.vue":()=>Promise.resolve().then(()=>require("./SwSwitch-6rl1IT4p-BQTT__wH.cjs")),"./components/SwTable.vue":()=>Promise.resolve().then(()=>require("./SwTable-BKZ5idCi-BMDZ1otG.cjs")),"./components/SwTableColumn.vue":()=>Promise.resolve().then(()=>require("./SwTableColumn-BLF5bPuJ-CbuAoznO.cjs")),"./components/SwTabs.vue":()=>Promise.resolve().then(()=>require("./SwTabs-DkSI4oAh-By6KQ_XO.cjs")),"./components/SwTabsPane.vue":()=>Promise.resolve().then(()=>require("./SwTabsPane-Dwtj8g7T-BUCrffEQ.cjs"))}),ee={};for(const r in Q){const f=r.split("/").pop().replace(".vue","").replace(/-(\w)/g,(u,n)=>n.toUpperCase());ee[f]=e.defineAsyncComponent(()=>Q[r]())}const Ve={class:"nav"},Ne={class:"vacation-calendar"},De={key:0},Be={key:0,class:"controls-container",style:{"margin-top":".5rem"}},Te={key:0},$e={key:1,style:{padding:"0 1rem .5rem"}},_e={style:{padding:".5rem 0 0"}},Pe={__name:"VacationTable",props:{odata:Object,workSchedule:Object,fullName:{type:String,default:"Вы"},query:String,checkEdit:{type:Boolean,default:!1}},setup(r){const{SwDatePicker:f}=ee,u=r,{t:n,d:x}=ve.useI18n(),m=e.ref([]),c=e.ref(new Date().getFullYear()),V=new Date().getMonth()>10?[{value:c.value,label:c.value},{value:c.value+1,label:c.value+1}]:[{value:c.value-1,label:c.value-1},{value:c.value,label:c.value}],b=e.ref([]),T=e.ref("100%"),h=e.ref(1),D=e.ref(!1),g=e.ref(1),j=e.ref(!1),N=e.ref(!1),A=e.ref({zIndex:3,minWidth:230,x:500,y:200}),$=e.ref(!1),q=e.ref({participants:[]}),R=e.ref([]),H=e.ref([]),C=e.ref([]),z=e.ref([{value:"all",label:n("vacationSchedule.all"),key:"all"}]),M=e.ref(!1),G=e.ref(!1),d=e.ref({name:"",length:0,code:""}),O=async()=>{u.odata.getEmployee(c.value-1+"-12-17T23:59:00").then(a=>{var t,i;return C.value.length===0?C.value=[(t=a.find(o=>o.employeeName===u.fullName))==null?void 0:t.divisionName]:C.value=C.value.includes("all")||a.some(o=>C.value.includes(o.divisionName))?C.value:[(i=a.find(o=>o.employeeName===u.fullName))==null?void 0:i.divisionName],a.forEach(o=>{z.value.some(v=>(v==null?void 0:v.value)===o.divisionName)||z.value.push({value:o.divisionName,label:o.divisionName,key:o.divisionName})}),U(),!0})};e.watch(C,async(a,t)=>{a!==t&&(b.value=[],j.value=!1,u.odata.employee.forEach(i=>{(a.includes(i.divisionName)||a.includes("all"))&&(b.value.some(o=>(o==null?void 0:o.activeText)===i.roleName)||b.value.push({val:!0,activeText:i.roleName}))}),U())});const te=(a,t)=>{console.log("event",t),console.log("column",a),a.level===2&&a.no>0&&h.value===2&&(h.value=3,g.value=a.no)},U=()=>{m.value=[];let a=[];u.odata.employee.forEach(t=>{(C.value.includes(t.divisionName)||C.value.includes("all"))&&b.value.some(i=>i.val&&i.activeText===t.roleName)&&(a.push(t.employeeKey),m.value.push({name:t.employeeName,days:[{note:""}],jobTitle:t.roleName,code:t.employeeKey}))}),le(a),D.value=!1},le=a=>{u.workSchedule.getAllVacations({year:c.value}).then(t=>{a.forEach((i,o)=>{m.value[o].days=[{note:""}],t.forEach(v=>{i===v.code&&(typeof m.value[o].days[0].dateStart>"u"?m.value[o].days[0]={dateStart:B.parseTime(v.dateStart,"{dd}.{m}.{Y}"),dateEnd:B.parseTime(v.dateEnd,"{dd}.{m}.{Y}"),note:v.note,count:v.count}:m.value[o].days.push({dateStart:B.parseTime(v.dateStart,"{dd}.{m}.{Y}"),dateEnd:B.parseTime(v.dateEnd,"{dd}.{m}.{Y}"),note:v.note,count:v.count}))})})})},ae=a=>{if(a.columnIndex<3&&S.value[a.rowIndex].key<S.value[a.rowIndex].days.length)return S.value[a.rowIndex].key===0?{rowspan:S.value[a.rowIndex].days.length,colspan:1}:{rowspan:0,colspan:0}},J=(a,t,i,o)=>{var v;if(console.log("coMenu",a,t,i,o),d.value.ids=a.ids,d.value.key=typeof a.key>"u"?m.value[a.ids].days.length:a.key,d.value.startDate=a.dateStart,d.value.endDate=a.dateEnd,d.value.name=h.value>1?a.employee:a.name,d.value.count=a.count,d.value.length=((v=a.days)==null?void 0:v.length)||0,d.value.allCount=()=>a.days.length===0?0:a.days.reduce((l,p,k)=>k!==a.key?l+parseInt(p.count):l,0),d.value.add=d.value.length>0&&a.days[a.days.length-1].count,d.value.level=t.level,d.value.holiday=H.value,A.value.y=o.clientY,A.value.x=o.clientX,h.value===1&&t.level===2&&t.no<4&&(d.value.add||a.days.length>1)&&(N.value=!0),t.level===3&&(N.value=!0),h.value>1&&t.level===2&&t.no>0)if(h.value>2){d.value.firstDate=`${t.no.toString().length===1?"0"+t.no:t.no}-${g.value.toString().length===1?"0"+g.value:g.value}-${c.value}`,console.log("firstDate",d.value.firstDate);const l=new Date(c.value,g.value-1,t.no),p=m.value[d.value.ids];if(p&&p.days)for(let k=0;k<p.days.length;k++){const w=p.days[k];if(w.dateStart&&w.dateEnd){const y=I(w.dateStart),E=I(w.dateEnd);if(y&&E&&l>=y&&l<=E){d.value.startDate=w.dateStart,d.value.endDate=w.dateEnd,d.value.key=k;break}}}N.value=!0}else h.value===2&&a[`m${t.no}`].length>0?(g.value=t.no,h.value=3):(d.value.firstDate=`01-${t.no.toString().length===1?"0"+t.no:t.no}-${c.value}`,N.value=!0)};function I(a){if(!a)return null;const t=a.split(".");if(t.length!==3)return null;const[i,o,v]=t.map(Number);return new Date(v,o-1,i)}function W(a){const t=String(a.getDate()).padStart(2,"0"),i=String(a.getMonth()+1).padStart(2,"0");return`${t}.${i}`}const K=({row:a,columnIndex:t})=>{var o;if(h.value!==3||t===0||((o=a[`m${g.value}`])==null?void 0:o.length)===0)return"";const i=new Date(c.value,g.value,t).getTime()+1e3;for(let v of a[`m${g.value}`]){const l=new Date(c.value,v.text.split("-")[0].split(".")[1],v.text.split("-")[0].split(".")[0]).getTime(),p=new Date(c.value,v.text.split("-")[1].split(".")[1],v.text.split("-")[1].split(".")[0],23,59,59).getTime();if(i>=l&&i<=p)return"vacation"}return""};function ne(a,t){const i=I(a),o=I(t);if(!i||!o||o<i)return[];const v=[];let l=new Date(i);for(;l<=o;){const p=l.getMonth()+1,k=l.getFullYear(),w=new Date(k,l.getMonth()+1,0),y=l<i?i:l,E=w>o?o:w,_=`${W(y)}-${W(E)}`;v.push({month:p,text:_}),l=new Date(k,l.getMonth()+1,1)}return v}const Y=(a,t=!1)=>{let i=m.value[d.value.ids];switch(a){case"add":i.days.push({note:""}),console.log(i.days.length);break;case"delete":t?delete i.days[t]:i.days.pop(),L(d.value.ids);break}N.value=!1},oe=a=>{G.value=a,d.value.count=a.count},re=()=>{G.value&&(m.value[d.value.ids].days[d.value.key]={...G.value,note:""},L(d.value.ids)),N.value=!1},L=a=>{u.workSchedule.rewriteFull({year:c.value,code:m.value[a].code,data:m.value[a].days.map(t=>({dateStart:t.dateStart.split(".").reverse().join("-"),dateEnd:t.dateEnd.split(".").reverse().join("-"),note:t.note,count:t.count}))})},X=a=>{u.workSchedule.sendConfirmMessage({fullname:u.fullName,confirm:a}),u.query=""};function Z(a){return new Date(2025,a-1,1).toLocaleString("ru",{month:"long"})}const S=e.computed(()=>m.value.flatMap((a,t)=>!a.days||a.days.length===0?[{...a,key:0,ids:t}]:a.days.map((i,o)=>({ids:t,key:o,...a,...i})))),ue=e.computed(()=>m.value.map((a,t)=>{const i={employee:B.byInitials(a.name),code:a.code,ids:t};for(let o=1;o<=12;o++)i[`m${o}`]=[];return a.days.forEach(o=>{if(!o.dateStart||!o.dateEnd)return;ne(o.dateStart,o.dateEnd).forEach(l=>{l.month>=1&&l.month<=12&&i[`m${l.month}`].push({text:l.text,count:o.count,dateStart:o.dateStart,dateEnd:o.dateEnd})})}),i})),ie=()=>{u.workSchedule.sendAgreementMessage({users:q.value.participants}),$.value=!1};u.workSchedule.getBoss().then(a=>{R.value=a[0].users}),B.holidays().then(a=>{H.value=a,O()});const de=()=>d.value.length<2?[{dateStart:"01.01."+c.value,dateEnd:"31.12."+c.value}]:[{dateStart:"01.01."+c.value,dateEnd:"31.12."+c.value}],se=async()=>{M.value=!0;const a=new ge.Workbook,t=a.addWorksheet(c.value.toString(),{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0}}),i={vertical:"middle",horizontal:"center"},o={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},v={vertical:"middle",horizontal:"center",wrapText:!0},l={vertical:"middle",horizontal:"right",wrapText:!0};t.mergeCells("D1:G1"),t.mergeCells("D2:G2"),t.mergeCells("D3:G3"),t.mergeCells("D4:G4"),t.mergeCells("A5:G5"),t.mergeCells("A6:G6"),t.mergeCells("A9:G9"),t.mergeCells("A10:A11"),t.mergeCells("B10:B11"),t.mergeCells("C10:C11"),t.mergeCells("D10:F10"),t.mergeCells("G10:G11"),t.getCell("D1").value=n("vacationSchedule.approve"),t.getCell("D2").value=n("vacationSchedule.dateApprove",{year:c.value-1}),t.getCell("D3").value=n("workSchedule.printPlace"),t.getCell("D4").value=n("vacationSchedule.dateApprove",{year:c.value-1}),t.getCell("A5").value=n("workSchedule.firm"),t.getCell("B7").value=n("vacationSchedule.vacationSchedule"),t.getCell("C7").value=n("vacationSchedule.numberDocs"),t.getCell("D7").value=n("vacationSchedule.compilation"),t.getCell("E7").value=n("vacationSchedule.year"),t.getCell("C8").value="",t.getCell("D8").value="",t.getCell("E8").value=c.value,t.getCell("E7").value=n("vacationSchedule.year"),t.getCell("A10").value=n("vacationSchedule.jobTitle"),t.getCell("B10").value=n("vacationSchedule.fullName"),t.getCell("C10").value=n("vacationSchedule.personnelNumber"),t.getCell("D10").value=n("vacationSchedule.vacation"),t.getCell("D11").value=n("vacationSchedule.days"),t.getCell("E11").value=n("vacationSchedule.date"),t.getCell("F11").value=n("vacationSchedule.endDate"),t.getCell("G11").value=n("vacationSchedule.note"),t.getRow(1).height=80,t.getColumn(1).width=28,t.getColumn(2).width=28,t.getColumn(3).width=18,t.getColumn(4).width=18,t.getColumn(5).width=14,t.getColumn(6).width=14,t.getColumn(7).width=14,t.getColumn(1).alignment=v,t.getColumn(2).alignment=v,t.getColumn(3).alignment=v,t.getColumn(4).alignment=v,t.getColumn(5).alignment=v,t.getColumn(6).alignment=v,t.getColumn(7).alignment=v,t.getCell("D1").alignment=l,t.getCell("D2").alignment=l,t.getCell("D4").alignment=l,t.getCell("A5").alignment=i,t.getCell("C7").border=o,t.getCell("D7").border=o,t.getCell("E7").border=o,t.getCell("C8").border=o,t.getCell("D8").border=o,t.getCell("E8").border=o,t.getCell("A10").border=o,t.getCell("B10").border=o,t.getCell("C10").border=o,t.getCell("D10").border=o,t.getCell("G10").border=o,t.getCell("D11").border=o,t.getCell("E11").border=o,t.getCell("F11").border=o;let p=11;for(const y of m.value)if(y.days.length>1)y.days.forEach(E=>{let _=[y.jobTitle,y.name,y.code,E.count,E.dateStart,E.dateEnd,E.note];const ce=t.addRow(_);ce.border=o,p++}),t.mergeCells(`A${p-y.days.length+1}:A${p}`),t.mergeCells(`B${p-y.days.length+1}:B${p}`),t.mergeCells(`C${p-y.days.length+1}:C${p}`);else{let E=[y.jobTitle,y.name,y.code,y.days[0].count,y.days[0].dateStart,y.days[0].dateEnd,y.days[0].note];const _=t.addRow(E);_.border=o,p++}const k="export_"+B.parseTime(Date.now(),"{dd}.{m}.{Y}")+".xlsx",w=await a.xlsx.writeBuffer();me.saveAs(new Blob([w]),k),M.value=!1};return u.group&&(C.value[0]=u.group),O(),(a,t)=>{const i=e.resolveComponent("el-radio-button"),o=e.resolveComponent("el-radio-group"),v=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Ve,[r.checkEdit?(e.openBlock(),e.createBlock(e.unref(s.ElSelect),{key:0,modelValue:C.value,"onUpdate:modelValue":t[0]||(t[0]=l=>C.value=l),multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"Select",style:{width:"240px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.value,l=>(e.openBlock(),e.createBlock(e.unref(s.ElOption),{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),r.checkEdit?(e.openBlock(),e.createBlock(e.unref(s.ElButton),{key:1,plain:"",onClick:t[1]||(t[1]=l=>D.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("workSchedule.jobTitle")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(s.ElSelect),{modelValue:c.value,"onUpdate:modelValue":t[2]||(t[2]=l=>c.value=l),onChange:O,placeholder:"Year",style:{width:"80px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(V),l=>(e.openBlock(),e.createBlock(e.unref(s.ElOption),{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),e.createVNode(o,{modelValue:h.value,"onUpdate:modelValue":t[3]||(t[3]=l=>h.value=l)},{default:e.withCtx(()=>[e.createVNode(i,{label:e.unref(n)("vacationSchedule.currentTable.1"),value:1},null,8,["label"]),e.createVNode(i,{label:e.unref(n)("vacationSchedule.currentTable.2"),value:2},null,8,["label"])]),_:1},8,["modelValue"]),t[19]||(t[19]=e.createElementVNode("div",{class:"expander"},null,-1)),e.createVNode(e.unref(s.ElSwitch),{modelValue:T.value,"onUpdate:modelValue":t[4]||(t[4]=l=>T.value=l),"active-text":a.$t("vacationSchedule.currentHeight"),"active-value":"100%","inactive-value":"calc(100vh - var(--el-component-size)*5 - var(--el-main-padding)*2 - var(--header-height))"},null,8,["modelValue","active-text"])]),e.createElementVNode("div",Ne,[h.value===1?(e.openBlock(),e.createBlock(e.unref(s.ElTable),{key:0,id:"printTable",data:S.value,"span-method":ae,onCellClick:J,border:"",style:{width:"100%"},size:"small","empty-text":e.unref(n)("vacationSchedule.emptyText")},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ElTableColumn),{label:C.value!=="all"?e.unref(n)("vacationSchedule.title",{name:C.value[0]}):e.unref(n)("vacationSchedule.enterprise")+` ${c.value}`,align:"center",height:"34"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ElTableColumn),{label:e.unref(n)("vacationSchedule.jobTitle"),width:"180",align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(S.value[l.$index].jobTitle),1)]),_:1},8,["label"]),e.createVNode(e.unref(s.ElTableColumn),{label:e.unref(n)("vacationSchedule.fullName"),width:"180",align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(S.value[l.$index].name),1)]),_:1},8,["label"]),e.createVNode(e.unref(s.ElTableColumn),{label:e.unref(n)("vacationSchedule.personnelNumber"),align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(S.value[l.$index].code),1)]),_:1},8,["label"]),e.createVNode(e.unref(s.ElTableColumn),{label:e.unref(n)("vacationSchedule.vacation"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ElTableColumn),{label:e.unref(n)("vacationSchedule.days"),align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(S.value[l.$index].count),1)]),_:1},8,["label"]),e.createVNode(e.unref(s.ElTableColumn),{label:e.unref(n)("vacationSchedule.date"),align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(S.value[l.$index].dateStart),1)]),_:1},8,["label"]),e.createVNode(e.unref(s.ElTableColumn),{label:e.unref(n)("vacationSchedule.endDate"),align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(S.value[l.$index].dateEnd),1)]),_:1},8,["label"])]),_:1},8,["label"]),e.createVNode(e.unref(s.ElTableColumn),{label:e.unref(n)("vacationSchedule.note"),align:"center"},{default:e.withCtx(l=>[e.createVNode(e.unref(s.ElInput),{modelValue:m.value[S.value[l.$index].ids].days[S.value[l.$index].key].note,"onUpdate:modelValue":p=>m.value[S.value[l.$index].ids].days[S.value[l.$index].key].note=p,style:{width:"100%"},placeholder:" ",class:"noBorder",onBlur:p=>L(S.value[l.$index].ids)},null,8,["modelValue","onUpdate:modelValue","onBlur"])]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])):(e.openBlock(),e.createBlock(e.unref(s.ElTable),{key:1,data:ue.value,style:{width:"100%"},"max-height":T.value,onHeaderClick:te,onCellClick:J,size:"small","empty-text":e.unref(n)("sheet.emptyText"),"cell-class-name":K,align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ElTableColumn),{label:"Календарь отпусков "+C.value.toString()+" за "+(h.value===3?Z(g.value)+" ":"")+c.value+"г.",align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ElTableColumn),{prop:"employee",label:"Сотрудник",fixed:""}),h.value===2?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(12,l=>e.createVNode(e.unref(s.ElTableColumn),{key:l,label:Z(l),prop:`m${l}`},{default:e.withCtx(({row:p})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p[`m${l}`],(k,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"vacation-item"},e.toDisplayString(k.text),1))),128))]),_:2},1032,["label","prop"])),64)):e.createCommentVNode("",!0),h.value===3?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:1},e.renderList(new Date(c.value,g.value,0).getDate(),l=>(e.openBlock(),e.createBlock(e.unref(s.ElTableColumn),{key:l,label:l.toString(),align:"center",width:"40"},{default:e.withCtx(({row:p,columnIndex:k})=>[e.createElementVNode("div",null,[K({row:p,columnIndex:l})!==""?(e.openBlock(),e.createElementBlock("span",De,"ОТ")):e.createCommentVNode("",!0)])]),_:2},1032,["label"]))),128)):e.createCommentVNode("",!0)]),_:1},8,["label"])]),_:1},8,["data","max-height","empty-text"]))]),r.checkEdit?(e.openBlock(),e.createElementBlock("div",Be,[j.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(s.ElButton),{key:0,type:"primary",onClick:t[5]||(t[5]=l=>$.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.sendInformation")),1)]),_:1})),r.query==="confirm"?(e.openBlock(),e.createBlock(e.unref(s.ElButton),{key:1,type:"primary",onClick:t[6]||(t[6]=l=>X(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.agreeOn")),1)]),_:1})):e.createCommentVNode("",!0),r.query==="confirm"?(e.openBlock(),e.createBlock(e.unref(s.ElButton),{key:2,type:"primary",onClick:t[7]||(t[7]=l=>X(!1))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.reject")),1)]),_:1})):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(e.unref(s.ElButton),{disabled:M.value,plain:"",onClick:se,style:{"margin-top":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("workSchedule.exportExcel")),1)]),_:1},8,["disabled"])),[[v,M.value]]),e.createVNode(e.unref(s.ElDialog),{title:e.unref(n)("workSchedule.jobTitle"),modelValue:D.value,"onUpdate:modelValue":t[10]||(t[10]=l=>D.value=l),width:"400px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(s.ElButton),{onClick:t[8]||(t[8]=l=>D.value=!1),size:"default"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("workSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(s.ElButton),{size:"default",type:"primary",onClick:t[9]||(t[9]=l=>{U(),D.value=!1})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("workSchedule.select")),1)]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(s.ElForm),{model:b.value,autocomplete:"on"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,l=>(e.openBlock(),e.createBlock(e.unref(s.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(s.ElSwitch),{modelValue:l.val,"onUpdate:modelValue":p=>l.val=p,"active-text":l.activeText},null,8,["modelValue","onUpdate:modelValue","active-text"])]),_:2},1024))),256))]),_:1},8,["model"])]),_:1},8,["title","modelValue"]),e.createVNode(e.unref(s.ElDialog),{title:e.unref(n)("vacationSchedule.pleaseCoordinate"),modelValue:$.value,"onUpdate:modelValue":t[13]||(t[13]=l=>$.value=l),width:"500px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(s.ElButton),{onClick:t[12]||(t[12]=l=>$.value=!1),size:"default"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("workSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(s.ElButton),{size:"default",type:"primary",onClick:ie},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.send")),1)]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(s.ElForm),{model:q.value,autocomplete:"on"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.ElSelect),{modelValue:q.value.participants,"onUpdate:modelValue":t[11]||(t[11]=l=>q.value.participants=l),placeholder:e.unref(n)("vacationSchedule.fullName"),multiple:"",size:"default"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(R.value,l=>(e.openBlock(),e.createBlock(e.unref(s.ElOption),{key:l,label:l,value:l},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])]),_:1},8,["model"])]),_:1},8,["title","modelValue"]),e.createVNode(e.unref(P.ContextMenu),{show:N.value,"onUpdate:show":t[18]||(t[18]=l=>N.value=l),options:A.value},{default:e.withCtx(()=>[e.createVNode(e.unref(P.ContextMenuItem),{label:h.value.value>1||d.value.level===3&&typeof d.value.count<"u"?d.value.name+" "+d.value.count+" "+e.unref(n)("vacationSchedule.day",d.value.count)+` ${e.unref(n)("vacationSchedule.from")}: ${d.value.allCount()+parseInt(d.value.count)}`:d.value.name,disabled:""},null,8,["label"]),e.createVNode(e.unref(P.ContextMenuSeparator)),d.value.level===2&&h.value===1?(e.openBlock(),e.createElementBlock("div",Te,[d.value.length>1?(e.openBlock(),e.createBlock(e.unref(P.ContextMenuItem),{key:0,label:e.unref(n)("vacationSchedule.deleteLast"),onClick:t[14]||(t[14]=l=>Y("delete",d.value.key))},null,8,["label"])):e.createCommentVNode("",!0),d.value.add?(e.openBlock(),e.createBlock(e.unref(P.ContextMenuItem),{key:1,label:e.unref(n)("vacationSchedule.addVacation"),onClick:t[15]||(t[15]=l=>Y("add"))},null,8,["label"])):e.createCommentVNode("",!0)])):(e.openBlock(),e.createElementBlock("div",$e,[e.createVNode(e.unref(f),{data:d.value,range:"range",limitation:de(),onInput:oe},null,8,["data","limitation"]),e.createElementVNode("div",_e,[d.value.startDate?(e.openBlock(),e.createBlock(e.unref(s.ElButton),{key:0,onClick:t[16]||(t[16]=l=>Y("delete"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.delete")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(s.ElButton),{onClick:t[17]||(t[17]=l=>N.value=!1)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(s.ElButton),{onClick:re},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)("vacationSchedule.save")),1)]),_:1})])]))]),_:1},8,["show","options"])],64)}}};exports.J=ke;exports.L=ye;exports.U=Se;exports.V=Ce;exports._sfc_main=Pe;exports.g=F;
@@ -1 +1 @@
1
- "use strict";require("vue");require("vue-i18n");require("./index-CP8E7I_f.cjs");const e=require("./VacationTable-DkgIpYNP.cjs");require("file-saver");require("exceljs");require("element-plus");require("@imengyu/vue3-context-menu");module.exports=e._sfc_main;
1
+ "use strict";require("vue");require("vue-i18n");require("./index-uKIn9vG1.cjs");const e=require("./VacationTable-DT5FUQ4-.cjs");require("file-saver");require("exceljs");require("element-plus");require("@imengyu/vue3-context-menu");module.exports=e._sfc_main;
@@ -1,7 +1,7 @@
1
1
  import "vue";
2
2
  import "vue-i18n";
3
- import "./index-BgsOWV25.js";
4
- import { _ as d } from "./VacationTable-C2EEujIB.js";
3
+ import "./index-DaZTfcYO.js";
4
+ import { _ as d } from "./VacationTable-B0YqgIi2.js";
5
5
  import "file-saver";
6
6
  import "exceljs";
7
7
  import "element-plus";
@@ -1,4 +1,4 @@
1
- "use strict";const e=require("vue"),ie=require("file-saver"),de=require("exceljs"),c=require("./index-CP8E7I_f.cjs"),se=require("vue-i18n"),d=require("element-plus"),X=require("@imengyu/vue3-context-menu");function ve(k){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(k){for(const V in k)if(V!=="default"){const m=Object.getOwnPropertyDescriptor(k,V);Object.defineProperty(r,V,m.get?m:{enumerable:!0,get:()=>k[V]})}}return r.default=k,Object.freeze(r)}const ce=ve(de),me={class:"work"},ge={class:"nav"},he={style:{height:"100px",width:"100%",display:"inline-block"}},fe={style:{height:"100px",width:"100%",display:"inline-block"}},pe={key:0,class:"controls-container",style:{"margin-top":".5rem"}},ye={class:"label"},we={key:0,style:{padding:"0.5em 1.5em"}},Ce={key:1,style:{padding:"0.5em 1.5em"}},ke={__name:"WorkTable",props:{checkEdit:{type:Boolean,default:()=>!0},odata:Object,workSchedule:Object,fullName:{type:String,default:"Вы"},group:String,date:String},setup(k){const{t:r,d:V}=se.useI18n(),m=k,I=e.ref(!1),n=e.ref([]),q=e.ref(m.date?new Date(m.date+"T00:00:01").getMonth():new Date().getMonth()),O=e.ref(!1),T=e.ref([]),h=e.ref(new Date(new Date().getFullYear(),new Date().getMonth(),1)),u=e.ref([]),M=e.ref(0),p=e.ref(9),f=e.ref(8),H=e.ref(!1),$=e.ref(!1),P=e.ref("5"),A=e.ref(1),S=e.ref([]),W=e.ref([]),N=e.ref([]),R=e.ref([]),g=e.ref({name:"Имя",length:0,code:""}),z=e.ref(!1),L=e.ref({zIndex:3,minWidth:230,x:500,y:200}),b=e.ref({}),F=e.ref("100%");e.watch(S,async(t,l)=>{t!==l&&(N.value=[],H.value=!1,m.odata.personal.forEach(o=>{t.includes(o.divisionName)&&(N.value.some(s=>(s==null?void 0:s.activeText)===o.roleName)||N.value.push({val:!0,activeText:o.roleName}))}),G())}),e.watch(q,async t=>{let l=new Date().getMonth(),o=t===null?l:t-1;o=l-1<=o?o-l>=11?o-12:o:o+12,h.value=new Date(new Date().getFullYear(),o,1),Z()});const _=(t,l,o,s)=>{g.value.ids=t.ids,g.value.key=t.key,g.value.add=t.days.length>0&&t.days[t.days.length-1].cont,g.value.level=l.level,g.value.day=o.cellIndex,L.value.y=s.clientY,L.value.x=s.clientX,l.level===2&&l.no===0&&m.checkEdit&&(g.value.name=r("workSchedule.autocomplete"),z.value=!0),l.level===3&&o.cellIndex-l.no===1&&m.checkEdit&&(E(o.cellIndex,t.ids),g.value.name=r("workSchedule.modeSelection"),z.value=!0)},ee=({row:t,columnIndex:l})=>{if(!T.value||T.value.length===0||!O.value)return"";const o=new Date(new Date(h.value).getFullYear(),new Date(h.value).getMonth(),l).getTime()+1e3;for(let s of T.value){const{dateStart:v,dateEnd:a,code:y}=s;if(v&&a&&y===t.code&&l!==0&&l<=u.value.length){const x=new Date(c.parseDate(v)).getTime(),w=new Date(c.parseDate(a)).getTime();if(o>=x&&o<=w)return"vacation"}}return""},Z=()=>{var v,a,y,x;const t=new Date(h.value),l=new Date(t.getFullYear(),t.getMonth()+1,0).getDate();let o=[],s=0;for(let w=1;w<=l;w++){const C=c.parseTime(t.setDate(w),"{Y}-{m}-{dd}");s+=(v=b.value.nowork)!=null&&v.includes(C)||b.value.holidays.includes(C)?0:(a=b.value.preholidays)!=null&&a.includes(C)?7:8;const i=(y=b.value.nowork)!=null&&y.includes(C)?"nowork":b.value.holidays.includes(C)?"holiday":(x=b.value.preholidays)!=null&&x.includes(C)?"preholiday":"";o.push({day:w,holidays:i,weekday:V(new Date(t.getFullYear(),t.getMonth(),w),"day")})}M.value=s,u.value=o,m.odata.getPersonal({dismissed:"false"}).then(w=>{var C;S.value.length===0&&(S.value=[(C=w.find(i=>i.employeeName===m.fullName&&i.dismissalDate.length===0))==null?void 0:C.divisionName]),w.forEach((i,B)=>{W.value.some(D=>i.dismissalDate.length>0&&new Date(i.dismissalDate)<new Date(h.value)||(D==null?void 0:D.value)===i.divisionName)||W.value.push({value:i.divisionName,label:i.divisionName,key:B}),S.value.includes(i.divisionName)&&!N.value.some(D=>(D==null?void 0:D.activeText)===i.roleName)&&N.value.push({val:!0,activeText:i.roleName})}),G()})},le=e.computed(()=>!n.value.some(t=>t.contHour!==M.value)),Q=(t,l)=>{var a,y,x;const o=new Date(h.value),s=`${o.getFullYear()}-${(o.getMonth()+1).toString().padStart(2,"0")}-${t.toString().padStart(2,"0")}`,v=(a=n.value[l])==null?void 0:a.days.findIndex(w=>w.day===s);return l===-1||v===-1?"":((y=n.value[l].days[v])==null?void 0:y.tips)+`
1
+ "use strict";const e=require("vue"),ie=require("file-saver"),de=require("exceljs"),c=require("./index-uKIn9vG1.cjs"),se=require("vue-i18n"),d=require("element-plus"),X=require("@imengyu/vue3-context-menu");function ve(k){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(k){for(const V in k)if(V!=="default"){const m=Object.getOwnPropertyDescriptor(k,V);Object.defineProperty(r,V,m.get?m:{enumerable:!0,get:()=>k[V]})}}return r.default=k,Object.freeze(r)}const ce=ve(de),me={class:"work"},ge={class:"nav"},he={style:{height:"100px",width:"100%",display:"inline-block"}},fe={style:{height:"100px",width:"100%",display:"inline-block"}},pe={key:0,class:"controls-container",style:{"margin-top":".5rem"}},ye={class:"label"},we={key:0,style:{padding:"0.5em 1.5em"}},Ce={key:1,style:{padding:"0.5em 1.5em"}},ke={__name:"WorkTable",props:{checkEdit:{type:Boolean,default:()=>!0},odata:Object,workSchedule:Object,fullName:{type:String,default:"Вы"},groups:String,dat:String},setup(k){const{t:r,d:V}=se.useI18n(),m=k,I=e.ref(!1),n=e.ref([]),q=e.ref(m.dat?new Date(m.dat+"T00:00:01").getMonth():new Date().getMonth()),O=e.ref(!1),T=e.ref([]),h=e.ref(new Date(new Date().getFullYear(),new Date().getMonth(),1)),u=e.ref([]),M=e.ref(0),p=e.ref(9),f=e.ref(8),H=e.ref(!1),$=e.ref(!1),P=e.ref("5"),A=e.ref(1),S=e.ref([]),W=e.ref([]),N=e.ref([]),R=e.ref([]),g=e.ref({name:"Имя",length:0,code:""}),z=e.ref(!1),L=e.ref({zIndex:3,minWidth:230,x:500,y:200}),b=e.ref({}),F=e.ref("100%");e.watch(S,async(t,l)=>{t!==l&&(N.value=[],H.value=!1,m.odata.personal.forEach(o=>{t.includes(o.divisionName)&&(N.value.some(s=>(s==null?void 0:s.activeText)===o.roleName)||N.value.push({val:!0,activeText:o.roleName}))}),G())}),e.watch(q,async t=>{let l=new Date().getMonth(),o=t===null?l:t-1;o=l-1<=o?o-l>=11?o-12:o:o+12,h.value=new Date(new Date().getFullYear(),o,1),Z()});const _=(t,l,o,s)=>{g.value.ids=t.ids,g.value.key=t.key,g.value.add=t.days.length>0&&t.days[t.days.length-1].cont,g.value.level=l.level,g.value.day=o.cellIndex,L.value.y=s.clientY,L.value.x=s.clientX,l.level===2&&l.no===0&&m.checkEdit&&(g.value.name=r("workSchedule.autocomplete"),z.value=!0),l.level===3&&o.cellIndex-l.no===1&&m.checkEdit&&(E(o.cellIndex,t.ids),g.value.name=r("workSchedule.modeSelection"),z.value=!0)},ee=({row:t,columnIndex:l})=>{if(!T.value||T.value.length===0||!O.value)return"";const o=new Date(new Date(h.value).getFullYear(),new Date(h.value).getMonth(),l).getTime()+1e3;for(let s of T.value){const{dateStart:v,dateEnd:a,code:y}=s;if(v&&a&&y===t.code&&l!==0&&l<=u.value.length){const x=new Date(c.parseDate(v)).getTime(),w=new Date(c.parseDate(a)).getTime();if(o>=x&&o<=w)return"vacation"}}return""},Z=()=>{var v,a,y,x;const t=new Date(h.value),l=new Date(t.getFullYear(),t.getMonth()+1,0).getDate();let o=[],s=0;for(let w=1;w<=l;w++){const C=c.parseTime(t.setDate(w),"{Y}-{m}-{dd}");s+=(v=b.value.nowork)!=null&&v.includes(C)||b.value.holidays.includes(C)?0:(a=b.value.preholidays)!=null&&a.includes(C)?7:8;const i=(y=b.value.nowork)!=null&&y.includes(C)?"nowork":b.value.holidays.includes(C)?"holiday":(x=b.value.preholidays)!=null&&x.includes(C)?"preholiday":"";o.push({day:w,holidays:i,weekday:V(new Date(t.getFullYear(),t.getMonth(),w),"day")})}M.value=s,u.value=o,m.odata.getPersonal({dismissed:"false"}).then(w=>{var C;S.value.length===0&&(S.value=[(C=w.find(i=>i.employeeName===m.fullName&&i.dismissalDate.length===0))==null?void 0:C.divisionName]),w.forEach((i,B)=>{W.value.some(D=>i.dismissalDate.length>0&&new Date(i.dismissalDate)<new Date(h.value)||(D==null?void 0:D.value)===i.divisionName)||W.value.push({value:i.divisionName,label:i.divisionName,key:B}),S.value.includes(i.divisionName)&&!N.value.some(D=>(D==null?void 0:D.activeText)===i.roleName)&&N.value.push({val:!0,activeText:i.roleName})}),G()})},le=e.computed(()=>!n.value.some(t=>t.contHour!==M.value)),Q=(t,l)=>{var a,y,x;const o=new Date(h.value),s=`${o.getFullYear()}-${(o.getMonth()+1).toString().padStart(2,"0")}-${t.toString().padStart(2,"0")}`,v=(a=n.value[l])==null?void 0:a.days.findIndex(w=>w.day===s);return l===-1||v===-1?"":((y=n.value[l].days[v])==null?void 0:y.tips)+`
2
2
  `+((x=n.value[l].days[v])==null?void 0:x.time)},G=()=>{n.value=[],R.value=[],T.value=[],m.odata.personal.forEach(t=>{if(S.value.includes(t.divisionName)&&N.value.some(l=>l.val&&l.activeText===t.roleName)&&(t.dismissalDate.length===0||new Date(t.dismissalDate)>new Date(h.value))){let l=c.byInitials(t.employeeName);n.value.push({name:l+" ("+t.roleName+")",days:[],contHour:0,code:t.employeeKey,id:!1})}}),n.value.sort((t,l)=>t.name<l.name?-1:t.name>l.name?1:0),n.value.forEach((t,l)=>{t.ids=l,R.value.push(t.code)}),m.workSchedule.getUsersYear({code:R.value,year:new Date(h.value).getFullYear()}).then(t=>{t.forEach(l=>{l.dateStart&&T.value.push({code:l.code,dateStart:l.dateStart,dateEnd:l.dateEnd})}),te(),$.value=!1})},te=()=>{m.workSchedule.getWorkSchedule({code:R.value,date:c.parseTime(new Date(h.value),"{Y}-{m}-{dd}")}).then(t=>{t.forEach((l,o)=>{l!==null&&(n.value[o].days=l.data.days,n.value[o].id=l.id)}),Y()})},Y=()=>{n.value.forEach(t=>{t.contHour=t.days.reduce((l,o)=>l+o.time,0)})},ae=t=>{n.value[t].days=[],Y()},ne=t=>{switch(P.value){case"5":for(let l=A.value;l<=u.value.length;l++)u.value[l-1].holidays===""&&E(l,t,!0),u.value[l-1].holidays==="preholiday"&&(f.value-=1,E(l,t,!0),f.value+=1);break;case"2x2":for(let l=A.value;l<=u.value.length;l+=4)E(l,t,!0),l+1<=u.value.length&&E(l+1,t,!0);break;case"2x5":for(let l=A.value;l<=u.value.length;l+=7)for(let o=l;o<l+5&&o<=u.value.length;o++)u.value[o-1].holidays==="preholiday"?(f.value-=1,E(o,t,!0),f.value+=1):E(o,t,!0);break}},E=(t,l,o=!1)=>{const{date:s,ind:v}=j(t,l);v===-1?(n.value[l].days.push({day:s,time:f.value,tips:`(${p.value}:00 - ${f.value>=22?p.value+f.value+2:p.value+f.value+1}:00)`}),Y()):o||(f.value=n.value[l].days[v].time,p.value=parseInt(n.value[l].days[v].tips.slice(1,-12)))},oe=(t,l)=>{const{ind:o}=j(t,l);n.value[l].days.splice(o,1),Y(),document.querySelector(".app-main").click()},K=(t,l)=>{const{date:o,ind:s}=j(t,l);n.value[l].days[s]={day:o,time:f.value,tips:`(${p.value}:00 - ${f.value>=22?p.value+f.value+2:p.value+f.value+1}:00)`},Y()},j=(t,l)=>{var v;const o=c.parseTime(new Date(h.value).setDate(t),"{Y}-{m}-{dd}"),s=(v=n.value[l])==null?void 0:v.days.findIndex(a=>a.day===o);return{date:o,ind:s}},ue=async()=>{var C;I.value=!0;const t=new ce.Workbook,l=t.addWorksheet(V(h.value,"month"),{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0}}),o={vertical:"middle",horizontal:"center"},s={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},v={vertical:"middle",horizontal:"center",wrapText:!0};l.mergeCells(`A1:${c.cellsDynamically("A1",u.value.length+6)}1`),l.mergeCells(`A2:${c.cellsDynamically("A2",u.value.length+6)}2`),l.mergeCells("A3:A4"),l.mergeCells(`B3:${c.cellsDynamically("B3",u.value.length)}3`),l.mergeCells(`${c.cellsDynamically("B3",u.value.length+1)}3:${c.cellsDynamically("B3",u.value.length+2)}3`),l.mergeCells(`${c.cellsDynamically("B3",u.value.length+3)}3:${c.cellsDynamically("B4",u.value.length+3)}4`),l.mergeCells(`${c.cellsDynamically("B3",u.value.length+4)}3:${c.cellsDynamically("B4",u.value.length+4)}4`),l.mergeCells(`${c.cellsDynamically("B3",u.value.length+5)}3:${c.cellsDynamically("B4",u.value.length+5)}4`),l.getCell("A1").value=r("workSchedule.firm"),l.getCell("A2").value=r("workSchedule.title",{name:S.value[0]})+V(h.value,"month")+` ${new Date(h.value).getFullYear()}`,l.getCell("A3").value=r("workSchedule.month"),l.getCell("B3").value=r("workSchedule.numbersMonth"),l.getCell(3,u.value.length+2).value=r("workSchedule.onSchedule"),l.getCell(3,u.value.length+4).value=r("workSchedule.acquainted"),l.getCell(3,u.value.length+5).value=r("workSchedule.decryption"),l.getCell(3,u.value.length+6).value=r("workSchedule.date"),l.getCell(4,u.value.length+2).value=r("workSchedule.days"),l.getCell(4,u.value.length+3).value=`${r("workSchedule.hours")} (${M.value})`;for(let i=2;i<=u.value.length+1;i++)l.getCell(4,i).value=u.value[i-2].weekday+`
3
- `+(i-1),l.getColumn(i).width=6,l.getColumn(i).alignment=v,l.getCell(4,i).border=s;l.getRow(1).height=40,l.getRow(2).height=30,l.getRow(3).height=20,l.getColumn(1).width=15,l.getColumn(u.value.length+2).width=5,l.getColumn(u.value.length+3).width=6,l.getColumn(u.value.length+4).width=13,l.getColumn(u.value.length+5).width=13,l.getColumn(u.value.length+6).width=13,l.getColumn(1).alignment=v,l.getCell("A2").alignment=o,l.getCell("A3").alignment=o,l.getCell("B3").alignment=o,l.getCell(3,u.value.length+2).alignment=o,l.getColumn(u.value.length+2).alignment=v,l.getColumn(u.value.length+3).alignment=v,l.getColumn(u.value.length+4).alignment=v,l.getColumn(u.value.length+5).alignment=v,l.getColumn(u.value.length+6).alignment=o,l.getCell("A3").border=s,l.getCell("B3").border=s,l.getCell(3,u.value.length+2).border=s,l.getCell(4,u.value.length+2).border=s,l.getCell(3,u.value.length+4).border=s,l.getCell(3,u.value.length+5).border=s,l.getCell(3,u.value.length+6).border=s,l.getCell(4,u.value.length+3).border=s;let a=0;for(const i of n.value){let B=[i.name];for(let U=1;U<=u.value.length;U++){const{ind:J}=j(U,a);J!==-1?B[U]=`${i.days[J].time} ${i.days[J].tips}`:B[U]=" "}B.push(((C=i.days)==null?void 0:C.length)||" ",i.contHour||0);const D=l.addRow(B);D.border=s,a++}let y="Щербина Е. В.";m.odata.personal.forEach(i=>{i.roleName==="Начальник отдела правовой и кадровой работы"&&(i.dismissalDate.length===0||new Date(i.dismissalDate)>new Date(thisMonth.value))&&(y=i.employeeName)}),l.mergeCells(`A${n.value.length+6}:P${n.value.length+6}`),l.mergeCells(`Q${n.value.length+6}:AG${n.value.length+6}`),l.mergeCells(`B${n.value.length+8}:E${n.value.length+8}`),l.mergeCells(`F${n.value.length+8}:L${n.value.length+8}`),l.mergeCells(`M${n.value.length+8}:P${n.value.length+8}`),l.mergeCells(`S${n.value.length+8}:V${n.value.length+8}`),l.mergeCells(`W${n.value.length+8}:AC${n.value.length+8}`),l.mergeCells(`AD${n.value.length+8}:AG${n.value.length+8}`),l.mergeCells(`Z${n.value.length+9}:AA${n.value.length+9}`),l.getCell(`A${n.value.length+6}`).value=r("workSchedule.byInitials"),l.getCell(`Q${n.value.length+6}`).value=r("workSchedule.supervisorHR"),l.getCell(`B${n.value.length+8}`).value=r("workSchedule.compiled")+":",l.getCell(`S${n.value.length+8}`).value=r("workSchedule.approved")+":",l.getCell(`M${n.value.length+8}`).value=c.byInitials(m.fullName),l.getCell(`AD${n.value.length+8}`).value=c.byInitials(y),l.getCell(`Z${n.value.length+9}`).value=r("workSchedule.printPlace"),l.getCell(`A${n.value.length+6}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`Q${n.value.length+6}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`B${n.value.length+8}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`F${n.value.length+8}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`M${n.value.length+8}`).alignment={vertical:"middle",horizontal:"left"},l.getCell(`AD${n.value.length+8}`).alignment={vertical:"middle",horizontal:"left"},l.getCell(`Z${n.value.length+9}`).alignment=o,l.getCell(`F${n.value.length+8}`).border={bottom:{style:"thin"}},l.getCell(`W${n.value.length+8}`).border={bottom:{style:"thin"}};const x="export_"+c.parseTime(Date.now(),"{dd}.{m}.{Y}")+".xlsx",w=await t.xlsx.writeBuffer();ie.saveAs(new Blob([w]),x),I.value=!1},re=async()=>{H.value||m.workSchedule.addWorkSchedule({data:n.value,date:c.parseTime(new Date(h.value),"{Y}-{m}-{dd}"),group:S.value[0]}).then(t=>H.value=t)};return console.log("props.group",m.group),console.log("props.date",m.date),m.group&&(S.value[0]=m.group),m.date&&(h.value=new Date(m.date+"T00:00:01")),c.holidays().then(t=>{b.value=t,Z()}),(t,l)=>{const o=e.resolveComponent("el-date-picker"),s=e.resolveComponent("svg-icon"),v=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",ge,[k.checkEdit?(e.openBlock(),e.createBlock(e.unref(d.ElSelect),{key:0,modelValue:S.value,"onUpdate:modelValue":l[0]||(l[0]=a=>S.value=a),multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"Select",style:{width:"240px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,a=>(e.openBlock(),e.createBlock(e.unref(d.ElOption),{key:a.key,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),k.checkEdit?(e.openBlock(),e.createBlock(e.unref(d.ElButton),{key:1,plain:"",onClick:l[1]||(l[1]=a=>$.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.jobTitle")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(o,{modelValue:q.value,"onUpdate:modelValue":l[2]||(l[2]=a=>q.value=a),type:"month",placeholder:"Выберите месяц",format:"MMM","value-format":"M"},null,8,["modelValue"]),l[21]||(l[21]=e.createElementVNode("div",{class:"expander"},null,-1)),e.createVNode(e.unref(d.ElSwitch),{modelValue:F.value,"onUpdate:modelValue":l[3]||(l[3]=a=>F.value=a),"active-text":t.$t("bids.currentHeight"),"active-value":"100%","inactive-value":"calc(100vh - var(--el-component-size)*5 - var(--el-main-padding)*2 - var(--header-height))"},null,8,["modelValue","active-text"]),e.createVNode(e.unref(d.ElSwitch),{modelValue:O.value,"onUpdate:modelValue":l[4]||(l[4]=a=>O.value=a),"active-text":"Отпуска","active-value":!0,"inactive-value":!1},null,8,["modelValue"])]),e.createVNode(e.unref(d.ElTable),{id:"printTable",data:n.value,style:{width:"100%"},"max-height":F.value,size:"small",align:"center",onCellClick:_,"empty-text":e.unref(r)("workSchedule.emptyText"),"cell-class-name":ee},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(r)("workSchedule.title",{name:S.value[0]})+e.unref(V)(h.value,"month")+` ${new Date(h.value).getFullYear()}`,align:"center",height:"34"},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(r)("workSchedule.month"),width:"180",align:"center",fixed:F.value!=="100%"},{default:e.withCtx(a=>[e.createElementVNode("div",he,e.toDisplayString(n.value[a.$index].name),1)]),_:1},8,["label","fixed"]),e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(r)("workSchedule.numbersMonth"),align:"center"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,a=>(e.openBlock(),e.createBlock(e.unref(d.ElTableColumn),{key:a.day,width:"46","class-name":a.holidays,align:"center",label:a.weekday+`
3
+ `+(i-1),l.getColumn(i).width=6,l.getColumn(i).alignment=v,l.getCell(4,i).border=s;l.getRow(1).height=40,l.getRow(2).height=30,l.getRow(3).height=20,l.getColumn(1).width=15,l.getColumn(u.value.length+2).width=5,l.getColumn(u.value.length+3).width=6,l.getColumn(u.value.length+4).width=13,l.getColumn(u.value.length+5).width=13,l.getColumn(u.value.length+6).width=13,l.getColumn(1).alignment=v,l.getCell("A2").alignment=o,l.getCell("A3").alignment=o,l.getCell("B3").alignment=o,l.getCell(3,u.value.length+2).alignment=o,l.getColumn(u.value.length+2).alignment=v,l.getColumn(u.value.length+3).alignment=v,l.getColumn(u.value.length+4).alignment=v,l.getColumn(u.value.length+5).alignment=v,l.getColumn(u.value.length+6).alignment=o,l.getCell("A3").border=s,l.getCell("B3").border=s,l.getCell(3,u.value.length+2).border=s,l.getCell(4,u.value.length+2).border=s,l.getCell(3,u.value.length+4).border=s,l.getCell(3,u.value.length+5).border=s,l.getCell(3,u.value.length+6).border=s,l.getCell(4,u.value.length+3).border=s;let a=0;for(const i of n.value){let B=[i.name];for(let U=1;U<=u.value.length;U++){const{ind:J}=j(U,a);J!==-1?B[U]=`${i.days[J].time} ${i.days[J].tips}`:B[U]=" "}B.push(((C=i.days)==null?void 0:C.length)||" ",i.contHour||0);const D=l.addRow(B);D.border=s,a++}let y="Щербина Е. В.";m.odata.personal.forEach(i=>{i.roleName==="Начальник отдела правовой и кадровой работы"&&(i.dismissalDate.length===0||new Date(i.dismissalDate)>new Date(thisMonth.value))&&(y=i.employeeName)}),l.mergeCells(`A${n.value.length+6}:P${n.value.length+6}`),l.mergeCells(`Q${n.value.length+6}:AG${n.value.length+6}`),l.mergeCells(`B${n.value.length+8}:E${n.value.length+8}`),l.mergeCells(`F${n.value.length+8}:L${n.value.length+8}`),l.mergeCells(`M${n.value.length+8}:P${n.value.length+8}`),l.mergeCells(`S${n.value.length+8}:V${n.value.length+8}`),l.mergeCells(`W${n.value.length+8}:AC${n.value.length+8}`),l.mergeCells(`AD${n.value.length+8}:AG${n.value.length+8}`),l.mergeCells(`Z${n.value.length+9}:AA${n.value.length+9}`),l.getCell(`A${n.value.length+6}`).value=r("workSchedule.byInitials"),l.getCell(`Q${n.value.length+6}`).value=r("workSchedule.supervisorHR"),l.getCell(`B${n.value.length+8}`).value=r("workSchedule.compiled")+":",l.getCell(`S${n.value.length+8}`).value=r("workSchedule.approved")+":",l.getCell(`M${n.value.length+8}`).value=c.byInitials(m.fullName),l.getCell(`AD${n.value.length+8}`).value=c.byInitials(y),l.getCell(`Z${n.value.length+9}`).value=r("workSchedule.printPlace"),l.getCell(`A${n.value.length+6}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`Q${n.value.length+6}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`B${n.value.length+8}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`F${n.value.length+8}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`M${n.value.length+8}`).alignment={vertical:"middle",horizontal:"left"},l.getCell(`AD${n.value.length+8}`).alignment={vertical:"middle",horizontal:"left"},l.getCell(`Z${n.value.length+9}`).alignment=o,l.getCell(`F${n.value.length+8}`).border={bottom:{style:"thin"}},l.getCell(`W${n.value.length+8}`).border={bottom:{style:"thin"}};const x="export_"+c.parseTime(Date.now(),"{dd}.{m}.{Y}")+".xlsx",w=await t.xlsx.writeBuffer();ie.saveAs(new Blob([w]),x),I.value=!1},re=async()=>{H.value||m.workSchedule.addWorkSchedule({data:n.value,date:c.parseTime(new Date(h.value),"{Y}-{m}-{dd}"),group:S.value[0]}).then(t=>H.value=t)};return console.log("props.groups",m.groups),console.log("props.dat",m.dat),m.groups&&(S.value[0]=m.groups),m.dat&&(h.value=new Date(m.dat+"T00:00:01")),c.holidays().then(t=>{b.value=t,Z()}),(t,l)=>{const o=e.resolveComponent("el-date-picker"),s=e.resolveComponent("svg-icon"),v=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",ge,[k.checkEdit?(e.openBlock(),e.createBlock(e.unref(d.ElSelect),{key:0,modelValue:S.value,"onUpdate:modelValue":l[0]||(l[0]=a=>S.value=a),multiple:"","collapse-tags":"","collapse-tags-tooltip":"",placeholder:"Select",style:{width:"240px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,a=>(e.openBlock(),e.createBlock(e.unref(d.ElOption),{key:a.key,label:a.label,value:a.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),k.checkEdit?(e.openBlock(),e.createBlock(e.unref(d.ElButton),{key:1,plain:"",onClick:l[1]||(l[1]=a=>$.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.jobTitle")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(o,{modelValue:q.value,"onUpdate:modelValue":l[2]||(l[2]=a=>q.value=a),type:"month",placeholder:"Выберите месяц",format:"MMM","value-format":"M"},null,8,["modelValue"]),l[21]||(l[21]=e.createElementVNode("div",{class:"expander"},null,-1)),e.createVNode(e.unref(d.ElSwitch),{modelValue:F.value,"onUpdate:modelValue":l[3]||(l[3]=a=>F.value=a),"active-text":t.$t("bids.currentHeight"),"active-value":"100%","inactive-value":"calc(100vh - var(--el-component-size)*5 - var(--el-main-padding)*2 - var(--header-height))"},null,8,["modelValue","active-text"]),e.createVNode(e.unref(d.ElSwitch),{modelValue:O.value,"onUpdate:modelValue":l[4]||(l[4]=a=>O.value=a),"active-text":"Отпуска","active-value":!0,"inactive-value":!1},null,8,["modelValue"])]),e.createVNode(e.unref(d.ElTable),{id:"printTable",data:n.value,style:{width:"100%"},"max-height":F.value,size:"small",align:"center",onCellClick:_,"empty-text":e.unref(r)("workSchedule.emptyText"),"cell-class-name":ee},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(r)("workSchedule.title",{name:S.value[0]})+e.unref(V)(h.value,"month")+` ${new Date(h.value).getFullYear()}`,align:"center",height:"34"},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(r)("workSchedule.month"),width:"180",align:"center",fixed:F.value!=="100%"},{default:e.withCtx(a=>[e.createElementVNode("div",he,e.toDisplayString(n.value[a.$index].name),1)]),_:1},8,["label","fixed"]),e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(r)("workSchedule.numbersMonth"),align:"center"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,a=>(e.openBlock(),e.createBlock(e.unref(d.ElTableColumn),{key:a.day,width:"46","class-name":a.holidays,align:"center",label:a.weekday+`
4
4
  `+a.day.toString(),prop:"vacation"},{default:e.withCtx(y=>[e.createElementVNode("div",fe,e.toDisplayString(Q(a.day,y.$index)||" "),1)]),_:2},1032,["class-name","label"]))),128))]),_:1},8,["label"]),e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(r)("workSchedule.onSchedule"),align:"center",fixed:F.value!=="100%"?"right":!1},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElTableColumn),{label:e.unref(r)("workSchedule.days"),align:"center"},{default:e.withCtx(a=>[e.createTextVNode(e.toDisplayString(n.value[a.$index].days.length||0),1)]),_:1},8,["label"]),e.createVNode(e.unref(d.ElTableColumn),{label:`${e.unref(r)("workSchedule.hours")} ( ${M.value} )`,align:"center"},{default:e.withCtx(a=>[e.createElementVNode("div",{style:e.normalizeStyle(`color: ${M.value===a.row.contHour?"green":"red"};`)},e.toDisplayString(a.row.contHour),5)]),_:1},8,["label"])]),_:1},8,["label","fixed"])]),_:1},8,["label"])]),_:1},8,["data","max-height","empty-text"]),le.value&&k.checkEdit?(e.openBlock(),e.createElementBlock("div",pe,[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.chartsFilled"))+": ",1),H.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(d.ElButton),{key:0,type:"primary",onClick:re},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.confirm")),1)]),_:1})),l[22]||(l[22]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(k.fullName),1)])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(e.unref(d.ElButton),{disabled:I.value,plain:"",onClick:ue,style:{"margin-top":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.exportExcel")),1)]),_:1},8,["disabled"])),[[v,I.value]]),e.createVNode(e.unref(d.ElDialog),{title:e.unref(r)("workSchedule.jobTitle"),modelValue:$.value,"onUpdate:modelValue":l[7]||(l[7]=a=>$.value=a),width:"400px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(d.ElButton),{onClick:l[5]||(l[5]=a=>$.value=!1),size:"default"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("workSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(d.ElButton),{size:"default",type:"primary",onClick:l[6]||(l[6]=a=>{G(),$.value=!1})},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.$t("workSchedule.select")),1)]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(d.ElForm),{ref:"dialogForm",model:N.value,autocomplete:"on"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(N.value,a=>(e.openBlock(),e.createBlock(e.unref(d.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElSwitch),{modelValue:a.val,"onUpdate:modelValue":y=>a.val=y,"active-text":a.activeText},null,8,["modelValue","onUpdate:modelValue","active-text"])]),_:2},1024))),256))]),_:1},8,["model"])]),_:1},8,["title","modelValue"]),e.createVNode(e.unref(X.ContextMenu),{show:z.value,"onUpdate:show":l[20]||(l[20]=a=>z.value=a),options:L.value},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"mx-context-menu-item",onClick:l[8]||(l[8]=a=>z.value=!1)},[e.createElementVNode("span",ye,e.toDisplayString(g.value.name),1),l[23]||(l[23]=e.createElementVNode("div",{class:"expander"},null,-1)),e.createVNode(s,{"icon-class":"cross"})]),e.createVNode(e.unref(X.ContextMenuSeparator)),g.value.level===2?(e.openBlock(),e.createElementBlock("div",we,[e.createVNode(e.unref(d.ElRadioGroup),{modelValue:P.value,"onUpdate:modelValue":l[9]||(l[9]=a=>P.value=a),size:"small"},{default:e.withCtx(()=>[e.createVNode(e.unref(d.ElRadioButton),{label:e.unref(r)("workSchedule.Days5"),value:"5"},null,8,["label"]),e.createVNode(e.unref(d.ElRadioButton),{label:"2 Х 2",value:"2x2"}),e.createVNode(e.unref(d.ElRadioButton),{label:"2 Х 5",value:"2x5"})]),_:1},8,["modelValue"]),l[24]||(l[24]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.fromDate"))+":",1),e.createVNode(e.unref(d.ElSlider),{modelValue:A.value,"onUpdate:modelValue":l[10]||(l[10]=a=>A.value=a),step:1,min:1,max:u.value.length},null,8,["modelValue","max"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.with"))+":",1),e.createVNode(e.unref(d.ElSlider),{modelValue:p.value,"onUpdate:modelValue":l[11]||(l[11]=a=>p.value=a),step:1,min:0,max:19},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.duration"))+":",1),e.createVNode(e.unref(d.ElSlider),{modelValue:f.value,"onUpdate:modelValue":l[12]||(l[12]=a=>f.value=a),step:1,min:4,max:e.unref(c.clamp)(p.value!==1?23-p.value:21,4,22)},null,8,["modelValue","max"]),e.createVNode(e.unref(d.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:l[13]||(l[13]=a=>ne(g.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.fillOut")),1)]),_:1}),e.createVNode(e.unref(d.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:l[14]||(l[14]=a=>ae(g.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.clearRow")),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",Ce,[e.createElementVNode("div",null,e.toDisplayString(Q(g.value.day,g.value.ids)),1),l[25]||(l[25]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.with"))+":",1),e.createVNode(e.unref(d.ElSlider),{modelValue:p.value,"onUpdate:modelValue":l[15]||(l[15]=a=>p.value=a),step:1,min:0,max:19,onChange:l[16]||(l[16]=a=>K(g.value.day,g.value.ids))},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.duration"))+":",1),e.createVNode(e.unref(d.ElSlider),{modelValue:f.value,"onUpdate:modelValue":l[17]||(l[17]=a=>f.value=a),step:1,min:4,max:e.unref(c.clamp)(p.value!==1?23-p.value:21,4,22),onChange:l[18]||(l[18]=a=>K(g.value.day,g.value.ids))},null,8,["modelValue","max"]),e.createVNode(e.unref(d.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:l[19]||(l[19]=a=>oe(g.value.day,g.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.delete")),1)]),_:1})]))]),_:1},8,["show","options"])])}}};module.exports=ke;