@lee576/vue3-gantt 1.0.2 → 1.0.4
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.
- package/README.en-US.md +147 -138
- package/README.md +145 -141
- package/dist/vue3-gantt.css +1 -1
- package/dist/vue3-gantt.es.js +5140 -4170
- package/dist/vue3-gantt.es.js.map +1 -1
- package/dist/vue3-gantt.umd.js +102 -86
- package/dist/vue3-gantt.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/vue3-gantt.umd.js
CHANGED
|
@@ -1,86 +1,102 @@
|
|
|
1
|
-
(function(ge,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("dayjs"),require("svg.js"),require("interactjs")):typeof define=="function"&&define.amd?define(["exports","vue","dayjs","svg.js","interactjs"],e):(ge=typeof globalThis<"u"?globalThis:ge||self,e(ge.Vue3Gantt={},ge.Vue,ge.dayjs,ge.SVG,ge.interact))})(this,function(ge,e,T,cn,Oe){"use strict";var Ou=Object.defineProperty;var Pu=(ge,e,T)=>e in ge?Ou(ge,e,{enumerable:!0,configurable:!0,writable:!0,value:T}):ge[e]=T;var et=(ge,e,T)=>Pu(ge,typeof e!="symbol"?e+"":e,T);function un(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ot={exports:{}},oo=Ot.exports,Tn;function ao(){return Tn||(Tn=1,function(t,n){(function(o,r){t.exports=r()})(oo,function(){var o={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,i=/\d\d/,a=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,u={},c=function(h){return(h=+h)+(h>68?1900:2e3)},m=function(h){return function(O){this[h]=+O}},y=[/[+-]\d\d:?(\d\d)?|Z/,function(h){(this.zone||(this.zone={})).offset=function(O){if(!O||O==="Z")return 0;var S=O.match(/([+-]|\d\d)/g),D=60*S[1]+(+S[2]||0);return D===0?0:S[0]==="+"?-D:D}(h)}],w=function(h){var O=u[h];return O&&(O.indexOf?O:O.s.concat(O.f))},I=function(h,O){var S,D=u.meridiem;if(D){for(var V=1;V<=24;V+=1)if(h.indexOf(D(V,0,O))>-1){S=V>12;break}}else S=h===(O?"pm":"PM");return S},g={A:[l,function(h){this.afternoon=I(h,!1)}],a:[l,function(h){this.afternoon=I(h,!0)}],Q:[s,function(h){this.month=3*(h-1)+1}],S:[s,function(h){this.milliseconds=100*+h}],SS:[i,function(h){this.milliseconds=10*+h}],SSS:[/\d{3}/,function(h){this.milliseconds=+h}],s:[a,m("seconds")],ss:[a,m("seconds")],m:[a,m("minutes")],mm:[a,m("minutes")],H:[a,m("hours")],h:[a,m("hours")],HH:[a,m("hours")],hh:[a,m("hours")],D:[a,m("day")],DD:[i,m("day")],Do:[l,function(h){var O=u.ordinal,S=h.match(/\d+/);if(this.day=S[0],O)for(var D=1;D<=31;D+=1)O(D).replace(/\[|\]/g,"")===h&&(this.day=D)}],w:[a,m("week")],ww:[i,m("week")],M:[a,m("month")],MM:[i,m("month")],MMM:[l,function(h){var O=w("months"),S=(w("monthsShort")||O.map(function(D){return D.slice(0,3)})).indexOf(h)+1;if(S<1)throw new Error;this.month=S%12||S}],MMMM:[l,function(h){var O=w("months").indexOf(h)+1;if(O<1)throw new Error;this.month=O%12||O}],Y:[/[+-]?\d+/,m("year")],YY:[i,function(h){this.year=c(h)}],YYYY:[/\d{4}/,m("year")],Z:y,ZZ:y};function F(h){var O,S;O=h,S=u&&u.formats;for(var D=(h=O.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,P,H){var ee=H&&H.toUpperCase();return P||S[H]||o[H]||S[ee].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(ke,p,d){return p||d.slice(1)})})).match(r),V=D.length,C=0;C<V;C+=1){var K=D[C],q=g[K],j=q&&q[0],X=q&&q[1];D[C]=X?{regex:j,parser:X}:K.replace(/^\[|\]$/g,"")}return function(A){for(var P={},H=0,ee=0;H<V;H+=1){var ke=D[H];if(typeof ke=="string")ee+=ke.length;else{var p=ke.regex,d=ke.parser,b=A.slice(ee),f=p.exec(b)[0];d.call(P,f),A=A.replace(f,"")}}return function($){var B=$.afternoon;if(B!==void 0){var _=$.hours;B?_<12&&($.hours+=12):_===12&&($.hours=0),delete $.afternoon}}(P),P}}return function(h,O,S){S.p.customParseFormat=!0,h&&h.parseTwoDigitYear&&(c=h.parseTwoDigitYear);var D=O.prototype,V=D.parse;D.parse=function(C){var K=C.date,q=C.utc,j=C.args;this.$u=q;var X=j[1];if(typeof X=="string"){var A=j[2]===!0,P=j[3]===!0,H=A||P,ee=j[2];P&&(ee=j[2]),u=this.$locale(),!A&&ee&&(u=S.Ls[ee]),this.$d=function(b,f,$,B){try{if(["x","X"].indexOf(f)>-1)return new Date((f==="X"?1e3:1)*b);var _=F(f)(b),L=_.year,Z=_.month,G=_.day,W=_.hours,ne=_.minutes,le=_.seconds,re=_.milliseconds,Te=_.zone,E=_.week,M=new Date,ae=G||(L||Z?1:M.getDate()),J=L||M.getFullYear(),k=0;L&&!Z||(k=Z>0?Z-1:M.getMonth());var R,te=W||0,oe=ne||0,Y=le||0,me=re||0;return Te?new Date(Date.UTC(J,k,ae,te,oe,Y,me+60*Te.offset*1e3)):$?new Date(Date.UTC(J,k,ae,te,oe,Y,me)):(R=new Date(J,k,ae,te,oe,Y,me),E&&(R=B(R).week(E).toDate()),R)}catch{return new Date("")}}(K,X,q,S),this.init(),ee&&ee!==!0&&(this.$L=this.locale(ee).$L),H&&K!=this.format(X)&&(this.$d=new Date("")),u={}}else if(X instanceof Array)for(var ke=X.length,p=1;p<=ke;p+=1){j[1]=X[p-1];var d=S.apply(this,j);if(d.isValid()){this.$d=d.$d,this.$L=d.$L,this.init();break}p===ke&&(this.$d=new Date(""))}else V.call(this,C)}}})}(Ot)),Ot.exports}var ro=ao();const so=un(ro);var Pt={exports:{}},io=Pt.exports,vn;function lo(){return vn||(vn=1,function(t,n){(function(o,r){t.exports=r(T)})(io,function(o){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var s=r(o),i={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a,l){return l==="W"?a+"周":a+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(a,l){var u=100*a+l;return u<600?"凌晨":u<900?"早上":u<1100?"上午":u<1300?"中午":u<1800?"下午":"晚上"}};return s.default.locale(i,null,!0),i})}(Pt)),Pt.exports}lo();var xt={exports:{}},co=xt.exports,$n;function uo(){return $n||($n=1,function(t,n){(function(o,r){t.exports=r()})(co,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(o){var r=["th","st","nd","rd"],s=o%100;return"["+o+(r[(s-20)%10]||r[s]||r[0])+"]"}}})}(xt)),xt.exports}uo();var Zt={exports:{}},fo=Zt.exports,Dn;function ho(){return Dn||(Dn=1,function(t,n){(function(o,r){t.exports=r(T)})(fo,function(o){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var s=r(o),i={name:"ja",weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(a){return a+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiem:function(a){return a<12?"午前":"午後"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}};return s.default.locale(i,null,!0),i})}(Zt)),Zt.exports}ho();var Gt={exports:{}},mo=Gt.exports,En;function po(){return En||(En=1,function(t,n){(function(o,r){t.exports=r(T)})(mo,function(o){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var s=r(o),i={name:"ko",weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),ordinal:function(a){return a+"일"},formats:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},meridiem:function(a){return a<12?"오전":"오후"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"}};return s.default.locale(i,null,!0),i})}(Gt)),Gt.exports}po();var Wt={exports:{}},go=Wt.exports,Mn;function yo(){return Mn||(Mn=1,function(t,n){(function(o,r){t.exports=r(T)})(go,function(o){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var s=r(o),i={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(a){return""+a+(a===1?"er":"")}};return s.default.locale(i,null,!0),i})}(Wt)),Wt.exports}yo();var jt={exports:{}},ko=jt.exports,Vn;function bo(){return Vn||(Vn=1,function(t,n){(function(o,r){t.exports=r(T)})(ko,function(o){function r(u){return u&&typeof u=="object"&&"default"in u?u:{default:u}}var s=r(o),i={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function a(u,c,m){var y=i[m];return Array.isArray(y)&&(y=y[c?0:1]),y.replace("%d",u)}var l={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(u){return u+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a}};return s.default.locale(l,null,!0),l})}(jt)),jt.exports}bo();var Ut={exports:{}},wo=Ut.exports,Nn;function Co(){return Nn||(Nn=1,function(t,n){(function(o,r){t.exports=r(T)})(wo,function(o){function r(a){return a&&typeof a=="object"&&"default"in a?a:{default:a}}var s=r(o),i={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return a+"º"}};return s.default.locale(i,null,!0),i})}(Ut)),Ut.exports}Co();var qt={exports:{}},So=qt.exports,_n;function To(){return _n||(_n=1,function(t,n){(function(o,r){t.exports=r(T)})(So,function(o){function r(g){return g&&typeof g=="object"&&"default"in g?g:{default:g}}var s=r(o),i="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),a="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),l="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),u="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),c=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function m(g,F,h){var O,S;return h==="m"?F?"минута":"минуту":g+" "+(O=+g,S={mm:F?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[h].split("_"),O%10==1&&O%100!=11?S[0]:O%10>=2&&O%10<=4&&(O%100<10||O%100>=20)?S[1]:S[2])}var y=function(g,F){return c.test(F)?i[g.month()]:a[g.month()]};y.s=a,y.f=i;var w=function(g,F){return c.test(F)?l[g.month()]:u[g.month()]};w.s=u,w.f=l;var I={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:y,monthsShort:w,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m,mm:m,h:"час",hh:m,d:"день",dd:m,M:"месяц",MM:m,y:"год",yy:m},ordinal:function(g){return g},meridiem:function(g){return g<4?"ночи":g<12?"утра":g<17?"дня":"вечера"}};return s.default.locale(I,null,!0),I})}(qt)),qt.exports}To();const vo=Symbol("SetBarColor"),$o=Symbol("SetTaskType"),Do=Symbol("AddRootTask"),ft={SetBarColorSymbol:vo,SetTaskTypeSymbol:$o,AddRootTaskSymbol:Do};var wt=(t=>(t.TASK="task",t.PROJECT="project",t.MILESTONE="milestone",t))(wt||{}),de=(t=>(t.FINISH_TO_START="finish-to-start",t.START_TO_START="start-to-start",t.FINISH_TO_FINISH="finish-to-finish",t.START_TO_FINISH="start-to-finish",t.PARENT_CHILD="parent-child",t))(de||{}),Ve=(t=>(t.STRAIGHT="straight",t.BEZIER="bezier",t.RIGHT_ANGLE="right-angle",t))(Ve||{});const tt={default:{color:"#3498db",width:2,dashArray:void 0,showArrow:!0,arrowColor:void 0,arrowSize:8,showLabels:!1,labelColor:"#666",labelFontSize:12,cornerRadius:5,pathType:Ve.BEZIER,bezierCurvature:.4,rightAngleOffset:30,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:.8,parentChildStyle:{color:"#95a5a6",width:1,dashArray:"3,3"},linkTypeColors:{finishToStart:"#3498db",startToStart:"#2ecc71",finishToFinish:"#e74c3c",startToFinish:"#f39c12"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}},business:{color:"#2c3e50",width:2,dashArray:void 0,showArrow:!0,arrowColor:"#e74c3c",arrowSize:10,showLabels:!0,labelColor:"#34495e",labelFontSize:11,cornerRadius:8,pathType:Ve.RIGHT_ANGLE,bezierCurvature:.3,rightAngleOffset:40,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:.6,parentChildStyle:{color:"#7f8c8d",width:2,dashArray:"5,2"},linkTypeColors:{finishToStart:"#2c3e50",startToStart:"#27ae60",finishToFinish:"#c0392b",startToFinish:"#d35400"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}},modern:{color:"#00bcd4",width:3,dashArray:void 0,showArrow:!0,arrowColor:"#ff5722",arrowSize:12,showLabels:!1,labelColor:"#607d8b",labelFontSize:12,cornerRadius:10,pathType:Ve.BEZIER,bezierCurvature:.6,rightAngleOffset:50,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:1,parentChildStyle:{color:"#90a4ae",width:2,dashArray:"8,4"},linkTypeColors:{finishToStart:"#00bcd4",startToStart:"#4caf50",finishToFinish:"#f44336",startToFinish:"#ff9800"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}},minimal:{color:"#666",width:1,dashArray:void 0,showArrow:!1,arrowColor:void 0,arrowSize:6,showLabels:!1,labelColor:"#999",labelFontSize:10,cornerRadius:3,pathType:Ve.STRAIGHT,bezierCurvature:.2,rightAngleOffset:20,smoothCorners:!1,enableDashAnimation:!1,dashAnimationSpeed:.8,parentChildStyle:{color:"#ccc",width:1,dashArray:"2,2"},linkTypeColors:{finishToStart:"#666",startToStart:"#888",finishToFinish:"#555",startToFinish:"#777"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}},colorful:{color:"#9c27b0",width:2,dashArray:void 0,showArrow:!0,arrowColor:"#ff9800",arrowSize:9,showLabels:!0,labelColor:"#673ab7",labelFontSize:11,cornerRadius:6,pathType:Ve.RIGHT_ANGLE,bezierCurvature:.5,rightAngleOffset:35,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:1,parentChildStyle:{color:"#4caf50",width:2,dashArray:"4,3"},linkTypeColors:{finishToStart:"#9c27b0",startToStart:"#4caf50",finishToFinish:"#e91e63",startToFinish:"#ff9800"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}}},An={[de.FINISH_TO_START]:{name:"完成-开始",description:"前置任务完成后,后续任务才能开始",color:"#3498db",priority:1},[de.START_TO_START]:{name:"开始-开始",description:"两个任务同时开始",color:"#2ecc71",priority:2},[de.FINISH_TO_FINISH]:{name:"完成-完成",description:"两个任务同时完成",color:"#e74c3c",priority:3},[de.START_TO_FINISH]:{name:"开始-完成",description:"前置任务开始后,后续任务才能完成",color:"#f39c12",priority:4},[de.PARENT_CHILD]:{name:"父子关系",description:"显示任务的层级关系",color:"#95a5a6",priority:0}};function Jt(t){return JSON.parse(JSON.stringify(t))}class Eo{constructor(){et(this,"config");et(this,"STORAGE_KEY","gantt-link-config");this.config=e.reactive(Jt(tt.default)),this.loadFromStorage()}deepMergeConfig(n){if(this.config.linkTypeVisibility||(this.config.linkTypeVisibility=Jt(tt.default.linkTypeVisibility)),this.config.linkTypeColors||(this.config.linkTypeColors=Jt(tt.default.linkTypeColors)),this.config.parentChildStyle||(this.config.parentChildStyle=Jt(tt.default.parentChildStyle)),n.linkTypeVisibility&&this.config.linkTypeVisibility){const a=n.linkTypeVisibility;a.finishToStart!==void 0&&(this.config.linkTypeVisibility.finishToStart=a.finishToStart),a.startToStart!==void 0&&(this.config.linkTypeVisibility.startToStart=a.startToStart),a.finishToFinish!==void 0&&(this.config.linkTypeVisibility.finishToFinish=a.finishToFinish),a.startToFinish!==void 0&&(this.config.linkTypeVisibility.startToFinish=a.startToFinish),a.parentChild!==void 0&&(this.config.linkTypeVisibility.parentChild=a.parentChild)}if(n.linkTypeColors&&this.config.linkTypeColors){const a=n.linkTypeColors;a.finishToStart!==void 0&&(this.config.linkTypeColors.finishToStart=a.finishToStart),a.startToStart!==void 0&&(this.config.linkTypeColors.startToStart=a.startToStart),a.finishToFinish!==void 0&&(this.config.linkTypeColors.finishToFinish=a.finishToFinish),a.startToFinish!==void 0&&(this.config.linkTypeColors.startToFinish=a.startToFinish)}if(n.parentChildStyle&&this.config.parentChildStyle){const a=n.parentChildStyle;a.color!==void 0&&(this.config.parentChildStyle.color=a.color),a.width!==void 0&&(this.config.parentChildStyle.width=a.width),a.dashArray!==void 0&&(this.config.parentChildStyle.dashArray=a.dashArray)}const{linkTypeVisibility:o,linkTypeColors:r,parentChildStyle:s,...i}=n;Object.assign(this.config,i)}loadFromStorage(){try{const n=localStorage.getItem(this.STORAGE_KEY);if(n){const o=JSON.parse(n);this.deepMergeConfig(o)}}catch(n){console.warn("加载连线配置失败,使用默认配置:",n)}}saveToStorage(){try{localStorage.setItem(this.STORAGE_KEY,JSON.stringify(this.config))}catch(n){console.warn("保存连线配置失败:",n)}}getConfig(){return this.config}setTheme(n){this.deepMergeConfig({...tt[n]}),this.saveToStorage()}updateConfig(n){this.deepMergeConfig(n),this.saveToStorage()}reset(){this.deepMergeConfig({...tt.default}),this.saveToStorage()}getLinkStyle(n){const o=An[n];return n===de.PARENT_CHILD?{color:this.config.parentChildStyle.color,width:this.config.parentChildStyle.width,dashArray:this.config.parentChildStyle.dashArray}:{color:o.color,width:this.config.width,dashArray:this.config.dashArray}}exportConfig(){return JSON.stringify(this.config,null,2)}importConfig(n){try{const o=JSON.parse(n);return this.updateConfig(o),!0}catch(o){return console.error("导入配置失败:",o),!1}}clearStorage(){try{localStorage.removeItem(this.STORAGE_KEY),this.reset()}catch(n){console.warn("清除配置失败:",n)}}}const Be=new Eo;function Ct(){return{config:Be.getConfig(),setTheme:Be.setTheme.bind(Be),updateConfig:Be.updateConfig.bind(Be),reset:Be.reset.bind(Be),getLinkStyle:Be.getLinkStyle.bind(Be),exportConfig:Be.exportConfig.bind(Be),importConfig:Be.importConfig.bind(Be),clearStorage:Be.clearStorage.bind(Be),themes:tt,linkTypes:An}}class Mo{constructor(){et(this,"dependencies",e.reactive([]));et(this,"STORAGE_KEY","gantt-link-dependencies");this.loadFromStorage()}loadFromStorage(){try{const n=localStorage.getItem(this.STORAGE_KEY);if(n){const o=JSON.parse(n);this.dependencies.splice(0,this.dependencies.length,...o)}}catch(n){console.warn("加载连线依赖关系失败:",n)}}saveToStorage(){try{localStorage.setItem(this.STORAGE_KEY,JSON.stringify(this.dependencies))}catch(n){console.warn("保存连线依赖关系失败:",n)}}addDependency(n){const o=`link-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;return this.dependencies.push({...n,id:o}),this.saveToStorage(),o}removeDependency(n){const o=this.dependencies.findIndex(r=>r.id===n);return o>-1?(this.dependencies.splice(o,1),this.saveToStorage(),!0):!1}getDependencies(){return this.dependencies}getTaskDependencies(n){return this.dependencies.filter(o=>o.sourceTaskId===n||o.targetTaskId===n)}clear(){this.dependencies.splice(0),this.saveToStorage()}clearStorage(){try{localStorage.removeItem(this.STORAGE_KEY),this.clear()}catch(n){console.warn("清除依赖关系失败:",n)}}wouldCreateCycle(n,o){const r=new Set,s=new Set,i=l=>{if(s.has(l))return!0;if(r.has(l))return!1;r.add(l),s.add(l);const u=this.dependencies.filter(c=>c.sourceTaskId===l);for(const c of u)if(i(c.targetTaskId))return!0;return s.delete(l),!1};this.dependencies.push({id:"temp",sourceTaskId:n,targetTaskId:o,type:de.FINISH_TO_START});const a=i(n);return this.dependencies.pop(),a}}const Kt=new Mo,fn={"zh-CN":{common:{confirm:"确定",cancel:"取消",save:"保存",delete:"删除",edit:"编辑",add:"添加",close:"关闭",export:"导出",import:"导入",config:"配置",settings:"设置",theme:"主题",to:"至",selectDate:"请选择日期"},date:{year:"年",month:"月",day:"日",hour:"时",week:"周",today:"今天",monday:"一",tuesday:"二",wednesday:"三",thursday:"四",friday:"五",saturday:"六",sunday:"日",january:"一月",february:"二月",march:"三月",april:"四月",may:"五月",june:"六月",july:"七月",august:"八月",september:"九月",october:"十月",november:"十一月",december:"十二月"},dateFormat:{full:"YYYY年MM月DD日",short:"YYYY-MM-DD",monthDay:"MM月DD日",yearMonth:"YYYY年MM月"},viewMode:{month:"月",week:"周",day:"日",hour:"时"},task:{addRoot:"添加根任务",addSub:"添加子任务",remove:"删除任务",edit:"编辑任务",name:"任务名称",priority:"优先级",startDate:"开始时间",endDate:"结束时间",duration:"耗时",progress:"进度",serialNumber:"序号",type:"类型",taskType:"任务",projectType:"项目",milestoneType:"里程碑"},link:{legend:"连线图例",parentChild:"父子关系",finishToStart:"完成-开始",startToStart:"开始-开始",finishToFinish:"完成-完成",startToFinish:"开始-完成",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"甘特图配置",themeSettings:"主题设置",linkSettings:"连线设置",languageSettings:"语言设置",currentTheme:"当前",previewTheme:"预览",exportConfig:"导出配置",importConfig:"导入配置",linkConfig:{info:"以下配置用于任务依赖连线(完成-开始、开始-开始等关系)",pathType:"路径类型",straight:"直线",bezier:"贝塞尔",rightAngle:"直角",color:"颜色",width:"线宽",dashStyle:"虚线样式",solid:"实线",shortDash:"短虚线",mediumDash:"中虚线",longDash:"长虚线",dotDash:"点划线",curvature:"弯曲度",offset:"偏移距离",smoothCorners:"平滑转角",cornerRadius:"转角半径",showArrow:"显示箭头",arrowSize:"箭头大小",arrowColor:"箭头颜色",syncColor:"同步",dashAnimation:"虚线流动动画",animationSpeed:"动画速度",showLabels:"显示标签",labelColor:"标签颜色",fontSize:"字体大小",typeColors:"依赖类型颜色",parentChildStyle:"父子关系连线样式",parentChildInfo:"用于显示父任务与子任务之间的层级结构关系"}},theme:{metro:"Metro 金属质感",light:"浅色主题",dark:"深色主题",colorful:"多彩主题",ocean:"海洋主题",apple:"Apple 苹果风格",classic:"经典商务",liquidGlass:"Liquid Glass 液态玻璃",metroDesc:"经典 Windows Metro 风格",lightDesc:"清爽明亮的浅色风格",darkDesc:"优雅专业的深色风格",colorfulDesc:"活力四射的多彩风格",oceanDesc:"沉静舒适的海洋风格",appleDesc:"简约优雅的 macOS 风格",classicDesc:"传统稳重的商务风格",liquidGlassDesc:"iOS 26 液态玻璃效果,半透明流动质感"},datePicker:{selectDate:"请选择日期",clearDate:"清除日期"},columnSettings:{title:"列显示设置",desc:"勾选要显示的列",showAll:"全部显示",hideAll:"全部隐藏",reset:"恢复默认"},tooltip:{addSubTask:"添加子任务",removeTask:"删除当前任务",syncArrowColor:"与线条颜色同步",close:"关闭",columnSettings:"列显示设置"}},"en-US":{common:{confirm:"Confirm",cancel:"Cancel",save:"Save",delete:"Delete",edit:"Edit",add:"Add",close:"Close",export:"Export",import:"Import",config:"Config",settings:"Settings",theme:"Theme",to:"to",selectDate:"Select Date"},date:{year:"Year",month:"Month",day:"Day",hour:"Hour",week:"Week",today:"Today",monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun",january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},dateFormat:{full:"MMMM DD, YYYY",short:"MM/DD/YYYY",monthDay:"MMM DD",yearMonth:"MMMM YYYY"},viewMode:{month:"Month",week:"Week",day:"Day",hour:"Hour"},task:{addRoot:"Add Root Task",addSub:"Add Sub Task",remove:"Delete Task",edit:"Edit Task",name:"Task Name",priority:"Priority",startDate:"Start Date",endDate:"End Date",duration:"Duration",progress:"Progress",serialNumber:"No.",type:"Type",taskType:"Task",projectType:"Project",milestoneType:"Milestone"},link:{legend:"Link Legend",parentChild:"Parent-Child",finishToStart:"Finish-to-Start",startToStart:"Start-to-Start",finishToFinish:"Finish-to-Finish",startToFinish:"Start-to-Finish",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"Gantt Configuration",themeSettings:"Theme Settings",linkSettings:"Link Settings",languageSettings:"Language Settings",currentTheme:"Current",previewTheme:"Preview",exportConfig:"Export Config",importConfig:"Import Config",linkConfig:{info:"Configure task dependency links (Finish-to-Start, Start-to-Start, etc.)",pathType:"Path Type",straight:"Straight",bezier:"Bezier",rightAngle:"Right Angle",color:"Color",width:"Line Width",dashStyle:"Dash Style",solid:"Solid",shortDash:"Short Dash",mediumDash:"Medium Dash",longDash:"Long Dash",dotDash:"Dot Dash",curvature:"Curvature",offset:"Offset Distance",smoothCorners:"Smooth Corners",cornerRadius:"Corner Radius",showArrow:"Show Arrow",arrowSize:"Arrow Size",arrowColor:"Arrow Color",syncColor:"Sync",dashAnimation:"Dash Animation",animationSpeed:"Animation Speed",showLabels:"Show Labels",labelColor:"Label Color",fontSize:"Font Size",typeColors:"Dependency Type Colors",parentChildStyle:"Parent-Child Link Style",parentChildInfo:"Display hierarchical relationship between parent and child tasks"}},theme:{metro:"Metro",light:"Light",dark:"Dark",colorful:"Colorful",ocean:"Ocean",apple:"Apple",classic:"Classic",liquidGlass:"Liquid Glass",metroDesc:"Classic Windows Metro style",lightDesc:"Fresh and bright light style",darkDesc:"Elegant and professional dark style",colorfulDesc:"Vibrant and colorful style",oceanDesc:"Calm and comfortable ocean style",appleDesc:"Minimalist and elegant macOS style",classicDesc:"Traditional and stable business style",liquidGlassDesc:"iOS 26 Liquid Glass effect with translucent fluidity"},datePicker:{selectDate:"Select Date",clearDate:"Clear Date"},columnSettings:{title:"Column Display Settings",desc:"Check columns to display",showAll:"Show All",hideAll:"Hide All",reset:"Reset Default"},tooltip:{addSubTask:"Add Sub Task",removeTask:"Delete Current Task",syncArrowColor:"Sync with line color",close:"Close",columnSettings:"Column Display Settings"}},"ja-JP":{common:{confirm:"確認",cancel:"キャンセル",save:"保存",delete:"削除",edit:"編集",add:"追加",close:"閉じる",export:"エクスポート",import:"インポート",config:"設定",settings:"設定",theme:"テーマ",to:"から",selectDate:"日付を選択"},date:{year:"年",month:"月",day:"日",hour:"時",week:"週",today:"今日",monday:"月",tuesday:"火",wednesday:"水",thursday:"木",friday:"金",saturday:"土",sunday:"日",january:"1月",february:"2月",march:"3月",april:"4月",may:"5月",june:"6月",july:"7月",august:"8月",september:"9月",october:"10月",november:"11月",december:"12月"},dateFormat:{full:"YYYY年MM月DD日",short:"YYYY/MM/DD",monthDay:"MM月DD日",yearMonth:"YYYY年MM月"},viewMode:{month:"月",week:"週",day:"日",hour:"時"},task:{addRoot:"ルートタスクを追加",addSub:"サブタスクを追加",remove:"タスクを削除",edit:"タスクを編集",name:"タスク名",priority:"優先度",startDate:"開始日",endDate:"終了日",duration:"期間",progress:"進捗",serialNumber:"番号",type:"タイプ",taskType:"タスク",projectType:"プロジェクト",milestoneType:"マイルストーン"},link:{legend:"リンク凡例",parentChild:"親子関係",finishToStart:"終了-開始",startToStart:"開始-開始",finishToFinish:"終了-終了",startToFinish:"開始-終了",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"ガントチャート設定",themeSettings:"テーマ設定",linkSettings:"リンク設定",languageSettings:"言語設定",currentTheme:"現在",previewTheme:"プレビュー",exportConfig:"設定をエクスポート",importConfig:"設定をインポート",linkConfig:{info:"タスク依存関係リンク(終了-開始、開始-開始など)を設定",pathType:"パスタイプ",straight:"直線",bezier:"ベジェ曲線",rightAngle:"直角",color:"色",width:"線の太さ",dashStyle:"破線スタイル",solid:"実線",shortDash:"短い破線",mediumDash:"中破線",longDash:"長い破線",dotDash:"点線破線",curvature:"曲率",offset:"オフセット距離",smoothCorners:"滑らかな角",cornerRadius:"角の半径",showArrow:"矢印を表示",arrowSize:"矢印サイズ",arrowColor:"矢印の色",syncColor:"同期",dashAnimation:"破線アニメーション",animationSpeed:"アニメーション速度",showLabels:"ラベルを表示",labelColor:"ラベルの色",fontSize:"フォントサイズ",typeColors:"依存関係タイプの色",parentChildStyle:"親子リンクスタイル",parentChildInfo:"親タスクと子タスクの階層関係を表示"}},theme:{metro:"メトロ",light:"ライト",dark:"ダーク",colorful:"カラフル",ocean:"オーシャン",apple:"Apple",classic:"クラシック",liquidGlass:"リキッドグラス",metroDesc:"クラシックWindowsメトロスタイル",lightDesc:"明るく爽やかなライトスタイル",darkDesc:"エレガントでプロフェッショナルなダークスタイル",colorfulDesc:"活気あるカラフルスタイル",oceanDesc:"落ち着いた快適なオーシャンスタイル",appleDesc:"ミニマルでエレガントなmacOSスタイル",classicDesc:"伝統的で安定感のあるビジネススタイル",liquidGlassDesc:"iOS 26 リキッドグラス効果、半透明で流動的な質感"},datePicker:{selectDate:"日付を選択",clearDate:"日付をクリア"},columnSettings:{title:"列表示設定",desc:"表示する列を選択",showAll:"すべて表示",hideAll:"すべて非表示",reset:"デフォルトに戻す"},tooltip:{addSubTask:"サブタスクを追加",removeTask:"現在のタスクを削除",syncArrowColor:"線の色と同期",close:"閉じる",columnSettings:"列表示設定"}},"ko-KR":{common:{confirm:"확인",cancel:"취소",save:"저장",delete:"삭제",edit:"편집",add:"추가",close:"닫기",export:"내보내기",import:"가져오기",config:"설정",settings:"설정",theme:"테마",to:"에서",selectDate:"날짜 선택"},date:{year:"년",month:"월",day:"일",hour:"시",week:"주",today:"오늘",monday:"월",tuesday:"화",wednesday:"수",thursday:"목",friday:"금",saturday:"토",sunday:"일",january:"1월",february:"2월",march:"3월",april:"4월",may:"5월",june:"6월",july:"7월",august:"8월",september:"9월",october:"10월",november:"11월",december:"12월"},dateFormat:{full:"YYYY년 MM월 DD일",short:"YYYY-MM-DD",monthDay:"MM월 DD일",yearMonth:"YYYY년 MM월"},viewMode:{month:"월",week:"주",day:"일",hour:"시"},task:{addRoot:"루트 작업 추가",addSub:"하위 작업 추가",remove:"작업 삭제",edit:"작업 편집",name:"작업 이름",priority:"우선순위",startDate:"시작일",endDate:"종료일",duration:"기간",progress:"진행률",serialNumber:"번호",type:"유형",taskType:"작업",projectType:"프로젝트",milestoneType:"마일스톤"},link:{legend:"링크 범례",parentChild:"부모-자식",finishToStart:"종료-시작",startToStart:"시작-시작",finishToFinish:"종료-종료",startToFinish:"시작-종료",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"간트 차트 설정",themeSettings:"테마 설정",linkSettings:"링크 설정",languageSettings:"언어 설정",currentTheme:"현재",previewTheme:"미리보기",exportConfig:"설정 내보내기",importConfig:"설정 가져오기",linkConfig:{info:"작업 종속성 링크 설정 (종료-시작, 시작-시작 등)",pathType:"경로 유형",straight:"직선",bezier:"베지어 곡선",rightAngle:"직각",color:"색상",width:"선 두께",dashStyle:"파선 스타일",solid:"실선",shortDash:"짧은 파선",mediumDash:"중간 파선",longDash:"긴 파선",dotDash:"점선 파선",curvature:"곡률",offset:"오프셋 거리",smoothCorners:"부드러운 모서리",cornerRadius:"모서리 반경",showArrow:"화살표 표시",arrowSize:"화살표 크기",arrowColor:"화살표 색상",syncColor:"동기화",dashAnimation:"파선 애니메이션",animationSpeed:"애니메이션 속도",showLabels:"레이블 표시",labelColor:"레이블 색상",fontSize:"글꼴 크기",typeColors:"종속성 유형 색상",parentChildStyle:"부모-자식 링크 스타일",parentChildInfo:"부모 작업과 자식 작업의 계층 관계 표시"}},theme:{metro:"메트로",light:"라이트",dark:"다크",colorful:"컬러풀",ocean:"오션",apple:"Apple",classic:"클래식",liquidGlass:"리퀴드 글래스",metroDesc:"클래식 Windows 메트로 스타일",lightDesc:"밝고 상쾌한 라이트 스타일",darkDesc:"우아하고 전문적인 다크 스타일",colorfulDesc:"활기찬 컬러풀 스타일",oceanDesc:"차분하고 편안한 오션 스타일",appleDesc:"미니멀하고 우아한 macOS 스타일",classicDesc:"전통적이고 안정적인 비즈니스 스타일",liquidGlassDesc:"iOS 26 반투명 유동성을 지닌 리퀴드 글래스 효과"},datePicker:{selectDate:"날짜 선택",clearDate:"날짜 지우기"},columnSettings:{title:"열 표시 설정",desc:"표시할 열 선택",showAll:"모두 표시",hideAll:"모두 숨기기",reset:"기본값 복원"},tooltip:{addSubTask:"하위 작업 추가",removeTask:"현재 작업 삭제",syncArrowColor:"선 색상과 동기화",close:"닫기",columnSettings:"열 표시 설정"}},"fr-FR":{common:{confirm:"Confirmer",cancel:"Annuler",save:"Enregistrer",delete:"Supprimer",edit:"Modifier",add:"Ajouter",close:"Fermer",export:"Exporter",import:"Importer",config:"Configuration",settings:"Paramètres",theme:"Thème",to:"à",selectDate:"Sélectionner la date"},date:{year:"Année",month:"Mois",day:"Jour",hour:"Heure",week:"Semaine",today:"Aujourd'hui",monday:"Lun",tuesday:"Mar",wednesday:"Mer",thursday:"Jeu",friday:"Ven",saturday:"Sam",sunday:"Dim",january:"Janvier",february:"Février",march:"Mars",april:"Avril",may:"Mai",june:"Juin",july:"Juillet",august:"Août",september:"Septembre",october:"Octobre",november:"Novembre",december:"Décembre"},dateFormat:{full:"DD MMMM YYYY",short:"DD/MM/YYYY",monthDay:"DD MMM",yearMonth:"MMMM YYYY"},viewMode:{month:"Mois",week:"Semaine",day:"Jour",hour:"Heure"},task:{addRoot:"Ajouter une tâche racine",addSub:"Ajouter une sous-tâche",remove:"Supprimer la tâche",edit:"Modifier la tâche",name:"Nom de la tâche",priority:"Priorité",startDate:"Date de début",endDate:"Date de fin",duration:"Durée",progress:"Progrès",serialNumber:"N°",type:"Type",taskType:"Tâche",projectType:"Projet",milestoneType:"Jalon"},link:{legend:"Légende des liens",parentChild:"Parent-Enfant",finishToStart:"Fin-Début",startToStart:"Début-Début",finishToFinish:"Fin-Fin",startToFinish:"Début-Fin",fs:"FD",ss:"DD",ff:"FF",sf:"DF",pc:"PE"},configPanel:{title:"Configuration Gantt",themeSettings:"Paramètres du thème",linkSettings:"Paramètres des liens",languageSettings:"Paramètres de langue",currentTheme:"Actuel",previewTheme:"Aperçu",exportConfig:"Exporter la configuration",importConfig:"Importer la configuration",linkConfig:{info:"Configurer les liens de dépendance des tâches (Fin-Début, Début-Début, etc.)",pathType:"Type de chemin",straight:"Droit",bezier:"Bézier",rightAngle:"Angle droit",color:"Couleur",width:"Épaisseur de ligne",dashStyle:"Style de tiret",solid:"Solide",shortDash:"Tiret court",mediumDash:"Tiret moyen",longDash:"Tiret long",dotDash:"Point-tiret",curvature:"Courbure",offset:"Distance de décalage",smoothCorners:"Coins lisses",cornerRadius:"Rayon du coin",showArrow:"Afficher la flèche",arrowSize:"Taille de la flèche",arrowColor:"Couleur de la flèche",syncColor:"Synchroniser",dashAnimation:"Animation de tiret",animationSpeed:"Vitesse d'animation",showLabels:"Afficher les étiquettes",labelColor:"Couleur de l'étiquette",fontSize:"Taille de police",typeColors:"Couleurs des types de dépendance",parentChildStyle:"Style de lien parent-enfant",parentChildInfo:"Afficher la relation hiérarchique entre les tâches parent et enfant"}},theme:{metro:"Metro",light:"Clair",dark:"Sombre",colorful:"Coloré",ocean:"Océan",apple:"Apple",classic:"Classique",liquidGlass:"Verre Liquide",metroDesc:"Style Metro Windows classique",lightDesc:"Style clair frais et lumineux",darkDesc:"Style sombre élégant et professionnel",colorfulDesc:"Style coloré vibrant",oceanDesc:"Style océan calme et confortable",appleDesc:"Style macOS minimaliste et élégant",classicDesc:"Style business traditionnel et stable",liquidGlassDesc:"Effet Verre Liquide iOS 26 avec fluidité translucide"},datePicker:{selectDate:"Sélectionner la date",clearDate:"Effacer la date"},columnSettings:{title:"Paramètres de colonne",desc:"Sélectionner les colonnes à afficher",showAll:"Tout afficher",hideAll:"Tout masquer",reset:"Réinitialiser par défaut"},tooltip:{addSubTask:"Ajouter une sous-tâche",removeTask:"Supprimer la tâche actuelle",syncArrowColor:"Synchroniser avec la couleur de la ligne",close:"Fermer",columnSettings:"Paramètres de colonne"}},"de-DE":{common:{confirm:"Bestätigen",cancel:"Abbrechen",save:"Speichern",delete:"Löschen",edit:"Bearbeiten",add:"Hinzufügen",close:"Schließen",export:"Exportieren",import:"Importieren",config:"Konfiguration",settings:"Einstellungen",theme:"Thema",to:"bis",selectDate:"Datum auswählen"},date:{year:"Jahr",month:"Monat",day:"Tag",hour:"Stunde",week:"Woche",today:"Heute",monday:"Mo",tuesday:"Di",wednesday:"Mi",thursday:"Do",friday:"Fr",saturday:"Sa",sunday:"So",january:"Januar",february:"Februar",march:"März",april:"April",may:"Mai",june:"Juni",july:"Juli",august:"August",september:"September",october:"Oktober",november:"November",december:"Dezember"},dateFormat:{full:"DD. MMMM YYYY",short:"DD.MM.YYYY",monthDay:"DD. MMM",yearMonth:"MMMM YYYY"},viewMode:{month:"Monat",week:"Woche",day:"Tag",hour:"Stunde"},task:{addRoot:"Hauptaufgabe hinzufügen",addSub:"Unteraufgabe hinzufügen",remove:"Aufgabe löschen",edit:"Aufgabe bearbeiten",name:"Aufgabenname",priority:"Priorität",startDate:"Startdatum",endDate:"Enddatum",duration:"Dauer",progress:"Fortschritt",serialNumber:"Nr.",type:"Typ",taskType:"Aufgabe",projectType:"Projekt",milestoneType:"Meilenstein"},link:{legend:"Verknüpfungslegende",parentChild:"Übergeordnet-Untergeordnet",finishToStart:"Ende-Anfang",startToStart:"Anfang-Anfang",finishToFinish:"Ende-Ende",startToFinish:"Anfang-Ende",fs:"EA",ss:"AA",ff:"EE",sf:"AE",pc:"ÜU"},configPanel:{title:"Gantt-Konfiguration",themeSettings:"Themeneinstellungen",linkSettings:"Verknüpfungseinstellungen",languageSettings:"Spracheinstellungen",currentTheme:"Aktuell",previewTheme:"Vorschau",exportConfig:"Konfiguration exportieren",importConfig:"Konfiguration importieren",linkConfig:{info:"Aufgabenabhängigkeitsverknüpfungen konfigurieren (Ende-Anfang, Anfang-Anfang usw.)",pathType:"Pfadtyp",straight:"Gerade",bezier:"Bézier",rightAngle:"Rechter Winkel",color:"Farbe",width:"Linienstärke",dashStyle:"Strichstil",solid:"Durchgezogen",shortDash:"Kurzer Strich",mediumDash:"Mittlerer Strich",longDash:"Langer Strich",dotDash:"Punkt-Strich",curvature:"Krümmung",offset:"Versatzabstand",smoothCorners:"Glatte Ecken",cornerRadius:"Eckenradius",showArrow:"Pfeil anzeigen",arrowSize:"Pfeilgröße",arrowColor:"Pfeilfarbe",syncColor:"Synchronisieren",dashAnimation:"Strich-Animation",animationSpeed:"Animationsgeschwindigkeit",showLabels:"Beschriftungen anzeigen",labelColor:"Beschriftungsfarbe",fontSize:"Schriftgröße",typeColors:"Abhängigkeitstypfarben",parentChildStyle:"Übergeordnet-Untergeordnet-Verknüpfungsstil",parentChildInfo:"Hierarchische Beziehung zwischen übergeordneten und untergeordneten Aufgaben anzeigen"}},theme:{metro:"Metro",light:"Hell",dark:"Dunkel",colorful:"Farbenfroh",ocean:"Ozean",apple:"Apple",classic:"Klassisch",liquidGlass:"Flüssigglas",metroDesc:"Klassischer Windows Metro-Stil",lightDesc:"Frischer und heller Stil",darkDesc:"Eleganter und professioneller dunkler Stil",colorfulDesc:"Lebendiger farbenfroher Stil",oceanDesc:"Ruhiger und komfortabler Ozean-Stil",appleDesc:"Minimalistischer und eleganter macOS-Stil",classicDesc:"Traditioneller und stabiler Geschäftsstil",liquidGlassDesc:"iOS 26 Flüssigglas-Effekt mit durchscheinender Fließfähigkeit"},datePicker:{selectDate:"Datum auswählen",clearDate:"Datum löschen"},columnSettings:{title:"Spalteneinstellungen",desc:"Anzuzeigende Spalten auswählen",showAll:"Alle anzeigen",hideAll:"Alle ausblenden",reset:"Standard wiederherstellen"},tooltip:{addSubTask:"Unteraufgabe hinzufügen",removeTask:"Aktuelle Aufgabe löschen",syncArrowColor:"Mit Linienfarbe synchronisieren",close:"Schließen",columnSettings:"Spalteneinstellungen"}},"es-ES":{common:{confirm:"Confirmar",cancel:"Cancelar",save:"Guardar",delete:"Eliminar",edit:"Editar",add:"Agregar",close:"Cerrar",export:"Exportar",import:"Importar",config:"Configuración",settings:"Ajustes",theme:"Tema",to:"a",selectDate:"Seleccionar fecha"},date:{year:"Año",month:"Mes",day:"Día",hour:"Hora",week:"Semana",today:"Hoy",monday:"Lun",tuesday:"Mar",wednesday:"Mié",thursday:"Jue",friday:"Vie",saturday:"Sáb",sunday:"Dom",january:"Enero",february:"Febrero",march:"Marzo",april:"Abril",may:"Mayo",june:"Junio",july:"Julio",august:"Agosto",september:"Septiembre",october:"Octubre",november:"Noviembre",december:"Diciembre"},dateFormat:{full:"DD [de] MMMM [de] YYYY",short:"DD/MM/YYYY",monthDay:"DD MMM",yearMonth:"MMMM YYYY"},viewMode:{month:"Mes",week:"Semana",day:"Día",hour:"Hora"},task:{addRoot:"Agregar tarea raíz",addSub:"Agregar subtarea",remove:"Eliminar tarea",edit:"Editar tarea",name:"Nombre de tarea",priority:"Prioridad",startDate:"Fecha de inicio",endDate:"Fecha de fin",duration:"Duración",progress:"Progreso",serialNumber:"Nº",type:"Tipo",taskType:"Tarea",projectType:"Proyecto",milestoneType:"Hito"},link:{legend:"Leyenda de enlaces",parentChild:"Padre-Hijo",finishToStart:"Fin-Inicio",startToStart:"Inicio-Inicio",finishToFinish:"Fin-Fin",startToFinish:"Inicio-Fin",fs:"FI",ss:"II",ff:"FF",sf:"IF",pc:"PH"},configPanel:{title:"Configuración Gantt",themeSettings:"Configuración de tema",linkSettings:"Configuración de enlaces",languageSettings:"Configuración de idioma",currentTheme:"Actual",previewTheme:"Vista previa",exportConfig:"Exportar configuración",importConfig:"Importar configuración",linkConfig:{info:"Configurar enlaces de dependencia de tareas (Fin-Inicio, Inicio-Inicio, etc.)",pathType:"Tipo de ruta",straight:"Recta",bezier:"Bézier",rightAngle:"Ángulo recto",color:"Color",width:"Grosor de línea",dashStyle:"Estilo de guión",solid:"Sólido",shortDash:"Guión corto",mediumDash:"Guión medio",longDash:"Guión largo",dotDash:"Punto-guión",curvature:"Curvatura",offset:"Distancia de desplazamiento",smoothCorners:"Esquinas suaves",cornerRadius:"Radio de esquina",showArrow:"Mostrar flecha",arrowSize:"Tamaño de flecha",arrowColor:"Color de flecha",syncColor:"Sincronizar",dashAnimation:"Animación de guión",animationSpeed:"Velocidad de animación",showLabels:"Mostrar etiquetas",labelColor:"Color de etiqueta",fontSize:"Tamaño de fuente",typeColors:"Colores de tipo de dependencia",parentChildStyle:"Estilo de enlace padre-hijo",parentChildInfo:"Mostrar relación jerárquica entre tareas padre e hijo"}},theme:{metro:"Metro",light:"Claro",dark:"Oscuro",colorful:"Colorido",ocean:"Océano",apple:"Apple",classic:"Clásico",liquidGlass:"Cristal Líquido",metroDesc:"Estilo Metro Windows clásico",lightDesc:"Estilo claro fresco y brillante",darkDesc:"Estilo oscuro elegante y profesional",colorfulDesc:"Estilo colorido vibrante",oceanDesc:"Estilo océano tranquilo y cómodo",appleDesc:"Estilo macOS minimalista y elegante",classicDesc:"Estilo empresarial tradicional y estable",liquidGlassDesc:"Efecto de Cristal Líquido iOS 26 con fluidez translúcida"},datePicker:{selectDate:"Seleccionar fecha",clearDate:"Borrar fecha"},columnSettings:{title:"Configuración de columnas",desc:"Seleccionar columnas a mostrar",showAll:"Mostrar todo",hideAll:"Ocultar todo",reset:"Restablecer predeterminado"},tooltip:{addSubTask:"Agregar subtarea",removeTask:"Eliminar tarea actual",syncArrowColor:"Sincronizar con color de línea",close:"Cerrar",columnSettings:"Configuración de columnas"}},"ru-RU":{common:{confirm:"Подтвердить",cancel:"Отмена",save:"Сохранить",delete:"Удалить",edit:"Редактировать",add:"Добавить",close:"Закрыть",export:"Экспорт",import:"Импорт",config:"Конфигурация",settings:"Настройки",theme:"Тема",to:"до",selectDate:"Выбрать дату"},date:{year:"Год",month:"Месяц",day:"День",hour:"Час",week:"Неделя",today:"Сегодня",monday:"Пн",tuesday:"Вт",wednesday:"Ср",thursday:"Чт",friday:"Пт",saturday:"Сб",sunday:"Вс",january:"Январь",february:"Февраль",march:"Март",april:"Апрель",may:"Май",june:"Июнь",july:"Июль",august:"Август",september:"Сентябрь",october:"Октябрь",november:"Ноябрь",december:"Декабрь"},dateFormat:{full:"DD MMMM YYYY г.",short:"DD.MM.YYYY",monthDay:"DD MMM",yearMonth:"MMMM YYYY"},viewMode:{month:"Месяц",week:"Неделя",day:"День",hour:"Час"},task:{addRoot:"Добавить корневую задачу",addSub:"Добавить подзадачу",remove:"Удалить задачу",edit:"Редактировать задачу",name:"Название задачи",priority:"Приоритет",startDate:"Дата начала",endDate:"Дата окончания",duration:"Длительность",progress:"Прогресс",serialNumber:"№",type:"Тип",taskType:"Задача",projectType:"Проект",milestoneType:"Веха"},link:{legend:"Легенда связей",parentChild:"Родитель-Потомок",finishToStart:"Окончание-Начало",startToStart:"Начало-Начало",finishToFinish:"Окончание-Окончание",startToFinish:"Начало-Окончание",fs:"ОН",ss:"НН",ff:"ОО",sf:"НО",pc:"РП"},configPanel:{title:"Конфигурация Gantt",themeSettings:"Настройки темы",linkSettings:"Настройки связей",languageSettings:"Настройки языка",currentTheme:"Текущая",previewTheme:"Предпросмотр",exportConfig:"Экспорт конфигурации",importConfig:"Импорт конфигурации",linkConfig:{info:"Настройка связей зависимостей задач (Окончание-Начало, Начало-Начало и т.д.)",pathType:"Тип пути",straight:"Прямая",bezier:"Безье",rightAngle:"Прямой угол",color:"Цвет",width:"Толщина линии",dashStyle:"Стиль пунктира",solid:"Сплошная",shortDash:"Короткий пунктир",mediumDash:"Средний пунктир",longDash:"Длинный пунктир",dotDash:"Точка-тире",curvature:"Кривизна",offset:"Расстояние смещения",smoothCorners:"Сглаженные углы",cornerRadius:"Радиус угла",showArrow:"Показать стрелку",arrowSize:"Размер стрелки",arrowColor:"Цвет стрелки",syncColor:"Синхронизировать",dashAnimation:"Анимация пунктира",animationSpeed:"Скорость анимации",showLabels:"Показать метки",labelColor:"Цвет метки",fontSize:"Размер шрифта",typeColors:"Цвета типов зависимостей",parentChildStyle:"Стиль связи родитель-потомок",parentChildInfo:"Показать иерархическую связь между родительскими и дочерними задачами"}},theme:{metro:"Метро",light:"Светлая",dark:"Темная",colorful:"Красочная",ocean:"Океан",apple:"Apple",classic:"Классический",liquidGlass:"Жидкое стекло",metroDesc:"Классический стиль Windows Metro",lightDesc:"Свежий и яркий светлый стиль",darkDesc:"Элегантный и профессиональный темный стиль",colorfulDesc:"Яркий красочный стиль",oceanDesc:"Спокойный и комфортный океанский стиль",appleDesc:"Минималистичный и элегантный стиль macOS",classicDesc:"Традиционный и стабильный деловой стиль",liquidGlassDesc:"Эффект жидкого стекла iOS 26 с полупрозрачной текучестью"},datePicker:{selectDate:"Выбрать дату",clearDate:"Очистить дату"},columnSettings:{title:"Настройки столбцов",desc:"Выберите столбцы для отображения",showAll:"Показать все",hideAll:"Скрыть все",reset:"Восстановить по умолчанию"},tooltip:{addSubTask:"Добавить подзадачу",removeTask:"Удалить текущую задачу",syncArrowColor:"Синхронизировать с цветом линии",close:"Закрыть",columnSettings:"Настройки столбцов"}}};function hn(){const t=navigator.language||navigator.userLanguage,n={zh:"zh-CN","zh-CN":"zh-CN","zh-Hans":"zh-CN","zh-Hans-CN":"zh-CN","zh-TW":"zh-CN","zh-HK":"zh-CN",en:"en-US","en-US":"en-US","en-GB":"en-US",ja:"ja-JP","ja-JP":"ja-JP",ko:"ko-KR","ko-KR":"ko-KR",fr:"fr-FR","fr-FR":"fr-FR",de:"de-DE","de-DE":"de-DE",es:"es-ES","es-ES":"es-ES",ru:"ru-RU","ru-RU":"ru-RU"};if(n[t])return n[t];const o=t.split("-")[0];return n[o]?n[o]:"en-US"}const ht=e.ref("zh-CN"),mn=localStorage.getItem("gantt-locale");mn&&fn[mn]?ht.value=mn:ht.value=hn();function Vo(t){const n=t.split(".");let o=fn[ht.value];for(const r of n)if(o&&typeof o=="object")o=o[r];else return t;return typeof o=="string"?o:t}function Bn(t){fn[t]&&(ht.value=t,localStorage.setItem("gantt-locale",t))}function No(){return ht.value}function _o(){return[{value:"zh-CN",label:"🇨🇳 简体中文"},{value:"en-US",label:"🇺🇸 English"},{value:"ja-JP",label:"🇯🇵 日本語"},{value:"ko-KR",label:"🇰🇷 한국어"},{value:"fr-FR",label:"🇫🇷 Français"},{value:"de-DE",label:"🇩🇪 Deutsch"},{value:"es-ES",label:"🇪🇸 Español"},{value:"ru-RU",label:"🇷🇺 Русский"}]}function ze(){return{locale:e.computed(()=>ht.value),t:Vo,setLocale:Bn,getLocale:No,getLocales:_o,detectBrowserLocale:hn}}const He=[{id:"metro",nameKey:"theme.metro",descKey:"theme.metroDesc",preview:"#0078d4",cssVariables:{"--primary":"#0078d4","--primary-dark":"#106ebe","--primary-light":"#1084d8","--secondary":"#0d5aa7","--bg-metal-light":"linear-gradient(145deg, #ffffff, #f5f5f5)","--bg-metal-normal":"linear-gradient(145deg, #f5f5f5, #e8e8e8)","--bg-metal-dark":"linear-gradient(145deg, #e6e6e6, #d0d0d0)","--bg-metal-pressed":"linear-gradient(145deg, #e0e0e0, #f8f8f8)","--bg-active":"linear-gradient(145deg, #0078d4, #106ebe)","--bg-active-hover":"linear-gradient(145deg, #1084d8, #0d5aa7)","--bg-active-pressed":"linear-gradient(145deg, #0d5aa7, #1084d8)","--border":"#d0d0d0","--border-dark":"#b0b0b0","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -1px 0 rgba(0, 0, 0, 0.1)","--shadow-outset":"0 2px 4px rgba(0, 0, 0, 0.1)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.3)","--text-primary":"#333333","--text-secondary":"#666666","--text-muted":"#999999","--text-white":"#ffffff","--bg-primary":"#f8f8f8","--bg-secondary":"#e8e8e8","--bg-content":"#ffffff","--row-hover":"#FFF3A1","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Segoe UI', Tahoma, Geneva, Verdana, sans-serif","--font-size-base":"12px","--font-weight-normal":"500","--font-weight-bold":"600"}},{id:"dark",nameKey:"theme.dark",descKey:"theme.darkDesc",preview:"#00d4ff",cssVariables:{"--primary":"#00d4ff","--primary-dark":"#00b8e6","--primary-light":"#33ddff","--secondary":"#0099cc","--bg-metal-light":"linear-gradient(145deg, #3a3a3a, #2d2d2d)","--bg-metal-normal":"linear-gradient(145deg, #2d2d2d, #1f1f1f)","--bg-metal-dark":"linear-gradient(145deg, #1f1f1f, #0d0d0d)","--bg-metal-pressed":"linear-gradient(145deg, #0d0d0d, #2d2d2d)","--bg-active":"linear-gradient(145deg, #00d4ff, #0099cc)","--bg-active-hover":"linear-gradient(145deg, #33ddff, #00b8e6)","--bg-active-pressed":"linear-gradient(145deg, #00b8e6, #33ddff)","--border":"#404040","--border-dark":"#2d2d2d","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -1px 0 rgba(0, 0, 0, 0.3)","--shadow-outset":"0 2px 8px rgba(0, 0, 0, 0.3)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.5)","--text-primary":"#ffffff","--text-secondary":"#cccccc","--text-muted":"#888888","--text-white":"#ffffff","--bg-primary":"#1a1a1a","--bg-secondary":"#2d2d2d","--bg-content":"#262626","--row-hover":"#3a4a5a","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Segoe UI', Tahoma, Geneva, Verdana, sans-serif","--font-size-base":"12px","--font-weight-normal":"500","--font-weight-bold":"600"}},{id:"modern",nameKey:"theme.light",descKey:"theme.lightDesc",preview:"#6366f1",cssVariables:{"--primary":"#6366f1","--primary-dark":"#4f46e5","--primary-light":"#8b5cf6","--secondary":"#3730a3","--bg-metal-light":"linear-gradient(145deg, #fafafa, #f0f0f0)","--bg-metal-normal":"linear-gradient(145deg, #f0f0f0, #e0e0e0)","--bg-metal-dark":"linear-gradient(145deg, #e0e0e0, #d0d0d0)","--bg-metal-pressed":"linear-gradient(145deg, #d8d8d8, #f0f0f0)","--bg-active":"linear-gradient(145deg, #6366f1, #4f46e5)","--bg-active-hover":"linear-gradient(145deg, #8b5cf6, #6366f1)","--bg-active-pressed":"linear-gradient(145deg, #4f46e5, #8b5cf6)","--border":"#e0e0e0","--border-dark":"#c0c0c0","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(0, 0, 0, 0.05)","--shadow-outset":"0 1px 3px rgba(0, 0, 0, 0.08)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.2)","--text-primary":"#1f2937","--text-secondary":"#6b7280","--text-muted":"#9ca3af","--text-white":"#ffffff","--bg-primary":"#ffffff","--bg-secondary":"#f9fafb","--bg-content":"#ffffff","--row-hover":"#e0e7ff","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Inter', 'Segoe UI', sans-serif","--font-size-base":"12px","--font-weight-normal":"400","--font-weight-bold":"600"}},{id:"classic",nameKey:"theme.classic",descKey:"theme.classicDesc",preview:"#2563eb",cssVariables:{"--primary":"#2563eb","--primary-dark":"#1d4ed8","--primary-light":"#3b82f6","--secondary":"#1e40af","--bg-metal-light":"linear-gradient(145deg, #f8f9fa, #e9ecef)","--bg-metal-normal":"linear-gradient(145deg, #e9ecef, #dee2e6)","--bg-metal-dark":"linear-gradient(145deg, #dee2e6, #ced4da)","--bg-metal-pressed":"linear-gradient(145deg, #ced4da, #e9ecef)","--bg-active":"linear-gradient(145deg, #2563eb, #1d4ed8)","--bg-active-hover":"linear-gradient(145deg, #3b82f6, #2563eb)","--bg-active-pressed":"linear-gradient(145deg, #1d4ed8, #3b82f6)","--border":"#ced4da","--border-dark":"#adb5bd","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.1)","--shadow-outset":"0 2px 4px rgba(0, 0, 0, 0.12)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.25)","--text-primary":"#212529","--text-secondary":"#495057","--text-muted":"#6c757d","--text-white":"#ffffff","--bg-primary":"#ffffff","--bg-secondary":"#f8f9fa","--bg-content":"#ffffff","--row-hover":"#dbeafe","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Times New Roman', serif","--font-size-base":"12px","--font-weight-normal":"400","--font-weight-bold":"700"}},{id:"colorful",nameKey:"theme.colorful",descKey:"theme.colorfulDesc",preview:"#f59e0b",cssVariables:{"--primary":"#f59e0b","--primary-dark":"#d97706","--primary-light":"#fbbf24","--secondary":"#b45309","--bg-metal-light":"linear-gradient(145deg, #fef3c7, #fed7aa)","--bg-metal-normal":"linear-gradient(145deg, #fed7aa, #fdba74)","--bg-metal-dark":"linear-gradient(145deg, #fdba74, #fb923c)","--bg-metal-pressed":"linear-gradient(145deg, #fb923c, #fed7aa)","--bg-active":"linear-gradient(145deg, #f59e0b, #d97706)","--bg-active-hover":"linear-gradient(145deg, #fbbf24, #f59e0b)","--bg-active-pressed":"linear-gradient(145deg, #d97706, #fbbf24)","--border":"#fdba74","--border-dark":"#fb923c","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(0, 0, 0, 0.1)","--shadow-outset":"0 2px 6px rgba(245, 158, 11, 0.2)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.2)","--text-primary":"#92400e","--text-secondary":"#b45309","--text-muted":"#d97706","--text-white":"#ffffff","--bg-primary":"#fffbeb","--bg-secondary":"#fef3c7","--bg-content":"#ffffff","--row-hover":"#fef3c7","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Comic Sans MS', cursive","--font-size-base":"12px","--font-weight-normal":"400","--font-weight-bold":"600"}},{id:"apple",nameKey:"theme.apple",descKey:"theme.appleDesc",preview:"#007aff",cssVariables:{"--primary":"#007aff","--primary-dark":"#0051d5","--primary-light":"#4da3ff","--secondary":"#5856d6","--bg-metal-light":"linear-gradient(145deg, #fafafa, #f2f2f7)","--bg-metal-normal":"linear-gradient(145deg, #f2f2f7, #e5e5ea)","--bg-metal-dark":"linear-gradient(145deg, #e5e5ea, #d1d1d6)","--bg-metal-pressed":"linear-gradient(145deg, #d1d1d6, #f2f2f7)","--bg-active":"linear-gradient(145deg, #007aff, #0051d5)","--bg-active-hover":"linear-gradient(145deg, #4da3ff, #007aff)","--bg-active-pressed":"linear-gradient(145deg, #0051d5, #4da3ff)","--border":"#d1d1d6","--border-dark":"#c7c7cc","--shadow-inset":"inset 0 0.5px 0 rgba(255, 255, 255, 0.9), inset 0 -0.5px 0 rgba(0, 0, 0, 0.08)","--shadow-outset":"0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.2)","--text-primary":"#000000","--text-secondary":"#3c3c43","--text-muted":"#8e8e93","--text-white":"#ffffff","--bg-primary":"#ffffff","--bg-secondary":"#f2f2f7","--bg-content":"#ffffff","--row-hover":"#e8f4fd","--transition-fast":"0.2s cubic-bezier(0.4, 0, 0.2, 1)","--transition-normal":"0.3s cubic-bezier(0.4, 0, 0.2, 1)","--transition-slow":"0.4s cubic-bezier(0.4, 0, 0.2, 1)","--font-family":"'-apple-system', 'BlinkMacSystemFont', 'SF Pro Text', 'Helvetica Neue', sans-serif","--font-size-base":"13px","--font-weight-normal":"400","--font-weight-bold":"600"}},{id:"liquidGlass",nameKey:"theme.liquidGlass",descKey:"theme.liquidGlassDesc",preview:"linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(220,240,255,0.6) 100%)",cssVariables:{"--primary":"#007aff","--primary-dark":"#0051d5","--primary-light":"#4da3ff","--secondary":"#5856d6","--bg-metal-light":"rgba(255, 255, 255, 0.65)","--bg-metal-normal":"rgba(245, 247, 250, 0.55)","--bg-metal-dark":"rgba(230, 235, 241, 0.6)","--bg-metal-pressed":"rgba(220, 228, 238, 0.7)","--bg-active":"rgba(0, 122, 255, 0.75)","--bg-active-hover":"rgba(77, 163, 255, 0.8)","--bg-active-pressed":"rgba(0, 81, 213, 0.85)","--border":"rgba(255, 255, 255, 0.4)","--border-dark":"rgba(200, 210, 220, 0.5)","--shadow-inset":"inset 0 1px 2px rgba(255, 255, 255, 0.95), inset 0 -1px 1px rgba(0, 0, 0, 0.05)","--shadow-outset":"0 8px 32px rgba(0, 122, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 1px rgba(255, 255, 255, 0.8)","--shadow-active":"inset 0 2px 4px rgba(255, 255, 255, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 122, 255, 0.25)","--text-primary":"#1d1d1f","--text-secondary":"#424245","--text-muted":"#86868b","--text-white":"#ffffff","--bg-primary":"rgba(250, 250, 252, 0.85)","--bg-secondary":"rgba(242, 242, 247, 0.75)","--bg-content":"rgba(255, 255, 255, 0.7)","--row-hover":"rgba(232, 244, 253, 0.6)","--transition-fast":"0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94)","--transition-normal":"0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94)","--transition-slow":"0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94)","--font-family":"'-apple-system', 'BlinkMacSystemFont', 'SF Pro Display', 'Helvetica Neue', sans-serif","--font-size-base":"13px","--font-weight-normal":"400","--font-weight-bold":"600","--glass-blur":"12px","--glass-saturation":"180%","--glass-brightness":"105%","--glass-edge-highlight":"rgba(255, 255, 255, 0.9)","--glass-edge-shadow":"rgba(0, 0, 0, 0.1)","--glass-reflection":"linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 100%)"}}],ut=class ut{constructor(){et(this,"currentTheme","metro");et(this,"storageKey","gantt-theme");et(this,"ganttContainer",null)}static getInstance(){return ut.instance||(ut.instance=new ut),ut.instance}setGanttContainer(n){this.ganttContainer=n,this.loadTheme()}getCurrentTheme(){return this.currentTheme}setTheme(n){const o=He.find(r=>r.id===n);if(!o){console.warn(`Theme ${n} not found`);return}this.currentTheme=n,this.applyTheme(o),this.saveTheme()}applyTheme(n){if(!this.ganttContainer){console.warn("No gantt container available for theme application");return}this.ganttContainer.setAttribute("data-gantt-theme",n.id),Object.entries(n.cssVariables).forEach(([o,r])=>{this.ganttContainer.style.setProperty(o,r)})}loadTheme(){try{const n=localStorage.getItem(this.storageKey);n&&He.find(r=>r.id===n)&&(this.currentTheme=n);const o=He.find(r=>r.id===this.currentTheme);o&&this.applyTheme(o)}catch(n){console.warn("Failed to load theme from localStorage:",n)}}saveTheme(){try{localStorage.setItem(this.storageKey,this.currentTheme)}catch(n){console.warn("Failed to save theme to localStorage:",n)}}getThemes(){return He}getThemeInfo(n){return He.find(o=>o.id===n)}previewTheme(n){const o=He.find(r=>r.id===n);o&&this.applyTheme(o)}cancelPreview(){const n=He.find(o=>o.id===this.currentTheme);n&&this.applyTheme(n)}exportThemeConfig(){return JSON.stringify({currentTheme:this.currentTheme,timestamp:new Date().toISOString()},null,2)}importThemeConfig(n){try{const o=JSON.parse(n);return o.currentTheme&&He.find(r=>r.id===o.currentTheme)?(this.setTheme(o.currentTheme),!0):!1}catch(o){return console.error("Failed to import theme config:",o),!1}}};et(ut,"instance");let pn=ut;const Le=pn.getInstance(),Ao=e.defineComponent({props:{date:{type:String,required:!0},minDate:String,maxDate:String},emits:["confirm","clear"],setup(t,{emit:n}){const{t:o,locale:r}=ze(),s=()=>({"zh-CN":"zh-cn","en-US":"en","ja-JP":"ja","ko-KR":"ko","fr-FR":"fr","de-DE":"de","es-ES":"es","ru-RU":"ru"})[r.value]||"en",i=e.computed(()=>{const U=s();return Array.from({length:7},(pe,Ne)=>T().day(Ne+1).locale(U).format("dd"))}),a=U=>T().month(U-1).locale(s()).format("MMMM"),l=e.ref(!1),u=e.ref(!1),c=e.ref(!1),m=e.ref(""),y=e.ref(0),w=e.ref("fadeX_Prev"),I=e.ref(!1),g=e.ref(!1),F=e.ref(null),h=e.ref(null),O=e.ref(null),S=e.ref(null),D=e.ref(0),V=e.ref(0),C=e.ref(Le.getCurrentTheme()),K=e.ref(-1),q=e.ref(-1),j=e.ref({row:-1,col:-1}),X=e.ref(new Date().getFullYear()),A=e.ref(new Date().getMonth()+1),P=e.ref(new Date().getFullYear()),H=e.ref(new Date().getMonth()+1),ee=e.ref(new Date().getDate()),ke=e.ref(1970),p=e.ref(1),d=e.ref(1),b=e.ref(2099),f=e.ref(12),$=e.ref(31),B=U=>{if(!U)return null;const pe=U.split("-");if(pe.length!==3)return null;const Ne=parseInt(pe[0],10),Ie=parseInt(pe[1],10),qe=parseInt(pe[2],10);return isNaN(Ne)||isNaN(Ie)||isNaN(qe)?null:{year:Ne,month:Ie,day:qe}},_=U=>U>9?String(U):`0${U}`,L=e.computed(()=>({year:X.value,month:A.value,monthStr:a(A.value)})),Z=e.computed(()=>({year:P.value,month:H.value,day:ee.value})),G=e.computed(()=>{const U=[];for(let pe=ke.value;pe<=b.value;pe++)U.push(pe);return U}),W=e.computed(()=>Array.from({length:12},(U,pe)=>pe+1)),ne=e.computed(()=>({position:"fixed",top:`${D.value}px`,left:`${V.value}px`,zIndex:100002})),le=()=>X.value<ke.value||X.value===ke.value&&A.value<=p.value,re=()=>X.value>b.value||X.value===b.value&&A.value>=f.value,Te=e.computed(()=>{y.value;const U=X.value,pe=A.value,Ne=new Date(U,pe,0).getDate(),Ie=[];let qe=[];for(let Je=1;Je<=Ne;Je++){const no=new Date(U,pe-1,Je).getDay(),zt=no===0?7:no;if(Je===1&&zt>1)for(let Yt=1;Yt<zt;Yt++)qe.push({value:""});const Yu=U===P.value&&pe===H.value&&Je===ee.value;let Sn=!1;if(U===ke.value&&pe===p.value&&Je<d.value&&(Sn=!0),U===b.value&&pe===f.value&&Je>$.value&&(Sn=!0),qe.push({value:Je,selected:Yu,disabled:Sn}),Je===Ne&&zt<7)for(let Yt=zt;Yt<7;Yt++)qe.push({value:""});(zt===7||Je===Ne)&&(Ie.push(qe),qe=[])}return Ie}),E=()=>{const U=B(t.date);if(U)X.value=U.year,A.value=U.month,P.value=U.year,H.value=U.month,ee.value=U.day;else{const Ie=new Date;X.value=Ie.getFullYear(),A.value=Ie.getMonth()+1,P.value=Ie.getFullYear(),H.value=Ie.getMonth()+1,ee.value=Ie.getDate()}const pe=B(t.minDate||"1970-01-01");pe&&(ke.value=pe.year,p.value=pe.month,d.value=pe.day);const Ne=B(t.maxDate||"2099-12-31");Ne&&(b.value=Ne.year,f.value=Ne.month,$.value=Ne.day),M()},M=()=>{const U=`${P.value}-${_(H.value)}-${_(ee.value)}`,pe=s(),Ne=o("dateFormat.full");m.value=T(U).locale(pe).format(Ne)},ae=U=>{X.value=U,u.value=!1,c.value=!1,y.value++},J=U=>{A.value=U,u.value=!1,c.value=!1,y.value++},k=U=>{if(U.disabled||U.value==="")return;P.value=X.value,H.value=A.value,ee.value=U.value,M(),l.value=!1;const pe=new Date(P.value,H.value-1,ee.value).getDay(),Ne=pe===0?7:pe,Ie=s(),qe=T(`${P.value}-${H.value}-${ee.value}`).locale(Ie).format("dddd");n("confirm",{date:`${P.value}-${_(H.value)}-${_(ee.value)}`,year:P.value,month:H.value,day:ee.value,week:Ne,weekStr:qe,monthStr:a(H.value)})},R=()=>{I.value||le()||(I.value=!0,setTimeout(()=>I.value=!1,300),w.value="fadeX_Prev",A.value<=1?(X.value--,A.value=12):A.value--,y.value++)},te=()=>{g.value||re()||(g.value=!0,setTimeout(()=>g.value=!1,300),w.value="fadeX_Next",A.value>=12?(X.value++,A.value=1):A.value++,y.value++)},oe=()=>{if(u.value=!u.value,c.value=!1,u.value&&O.value){const U=G.value.indexOf(P.value);setTimeout(()=>{O.value&&(O.value.scrollTop=Math.max(0,U-3)*40)},0)}},Y=()=>{if(c.value=!c.value,u.value=!1,c.value&&S.value){const U=H.value-1;setTimeout(()=>{S.value&&(S.value.scrollTop=Math.max(0,U-3)*40)},0)}},me=()=>{u.value=!1},De=()=>{if(h.value){const U=h.value.getBoundingClientRect();D.value=U.bottom+5,V.value=U.left}l.value=!0,setTimeout(()=>{C.value=Le.getCurrentTheme(),be(C.value)},0)},ve=()=>{m.value="",l.value=!1,n("clear")},be=U=>{if(!F.value)return;const pe=Le.getThemeInfo(U);pe&&(F.value.setAttribute("data-gantt-theme",U),Object.entries(pe.cssVariables).forEach(([Ne,Ie])=>{F.value.style.setProperty(Ne,Ie)}))},$e=U=>{F.value&&h.value&&!F.value.contains(U.target)&&!h.value.contains(U.target)&&(l.value=!1)},Ce=U=>K.value===U,he=U=>q.value===U,Me=(U,pe)=>j.value.row===pe&&j.value.col===U,we=U=>K.value=U,_e=()=>K.value=-1,Ue=U=>q.value=U,Rt=()=>q.value=-1,Ru=(U,pe)=>j.value={row:pe,col:U},zu=()=>j.value={row:-1,col:-1};return e.onBeforeMount(()=>E()),e.watch(()=>t.date,()=>E()),e.watch(()=>t.minDate,()=>E()),e.watch(()=>t.maxDate,()=>E()),e.watch(()=>r.value,()=>{m.value&&M(),y.value++}),e.onMounted(()=>{document.addEventListener("click",$e);const U=setInterval(()=>{const pe=Le.getCurrentTheme();pe!==C.value&&(C.value=pe,be(pe))},100);e.onUnmounted(()=>clearInterval(U))}),e.onUnmounted(()=>document.removeEventListener("click",$e)),{t:o,locale:r,getWeekNames:i,getMonthName:a,selectDate:Z,showDate:L,copyMinDate:e.computed(()=>({year:ke.value,month:p.value,day:d.value})),copyMaxDate:e.computed(()=>({year:b.value,month:f.value,day:$.value})),fadeXType:w,nextMonthClick:g,prevMonthClick:I,keepDoubleDigit:_,showYear:u,updateKey:y,yearList:G,rows:Te,yearListRef:O,prevMonth:R,nextMonth:te,selectDay:k,selectYear:ae,openYearList:oe,openMonthList:Y,monthList:W,monthListRef:S,showMonth:c,selectMonth:J,openCalendarList:me,showCalendar:l,openCalendar:De,selectedDateText:m,clearDate:ve,calendarRef:F,inputRef:h,calendarPosition:ne,isYearHovered:Ce,isMonthHovered:he,isDayHovered:Me,handleYearMouseEnter:we,handleYearMouseLeave:_e,handleMonthMouseEnter:Ue,handleMonthMouseLeave:Rt,handleDayMouseEnter:Ru,handleDayMouseLeave:zu}}}),Se=(t,n)=>{const o=t.__vccOpts||t;for(const[r,s]of n)o[r]=s;return o},Bo={class:"date-picker-input-wrapper"},Lo=["placeholder"],Fo={class:"e-date-select"},Io={class:"e-date-year"},Ho={class:"e-date-monthday"},Ro={class:"e-calendar-container"},zo={class:"e-calendar-toolbar"},Yo={key:0,class:"e-calendar-svg-cover"},Oo={class:"e-calendar-toolbar-title"},Po={key:0,class:"e-calendar-svg-cover"},xo={class:"e-calendar-week"},Zo={class:"e-calendar-monthday"},Go=["onClick","onMouseenter"],Wo=["textContent"],jo={key:0,class:"e-calendar-monthday-row-day-cover"},Uo={class:"e-calendar-year",ref:"yearListRef"},qo=["onClick","onMouseenter"],Jo={class:"e-calendar-year",ref:"monthListRef"},Ko=["onClick","onMouseenter"];function Qo(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",Bo,[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":n[0]||(n[0]=a=>t.selectedDateText=a),onClick:n[1]||(n[1]=(...a)=>t.openCalendar&&t.openCalendar(...a)),readonly:"",placeholder:t.t("datePicker.selectDate"),class:"date-picker-input",ref:"inputRef"},null,8,Lo),[[e.vModelText,t.selectedDateText]]),t.selectedDateText?(e.openBlock(),e.createElementBlock("span",{key:0,class:"clear-date-button",onClick:n[2]||(n[2]=(...a)=>t.clearDate&&t.clearDate(...a))},n[12]||(n[12]=[e.createElementVNode("svg",{viewBox:"0 0 24 24"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)]))):e.createCommentVNode("",!0)]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.withDirectives(e.createElementVNode("div",{class:"e-calendar",ref:"calendarRef",style:e.normalizeStyle(t.calendarPosition)},[e.createElementVNode("div",Fo,[e.createElementVNode("div",Io,[e.createVNode(e.Transition,{name:"fadeY"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{key:t.showDate.year,class:e.normalizeClass(["e-date-year-select",{active:t.showYear}]),onClick:n[3]||(n[3]=(...a)=>t.openYearList&&t.openYearList(...a))},e.toDisplayString(t.showDate.year),3))]),_:1})]),e.createElementVNode("div",Ho,[e.createVNode(e.Transition,{name:"fadeY"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{key:t.showDate.year+"-"+t.showDate.month,class:e.normalizeClass(["e-date-monthday-select",{active:!t.showYear}]),onClick:n[5]||(n[5]=(...a)=>t.openCalendarList&&t.openCalendarList(...a))},[e.createElementVNode("span",null,e.toDisplayString(t.keepDoubleDigit(t.showDate.month))+"-"+e.toDisplayString(t.keepDoubleDigit(t.selectDate.day)),1),n[13]||(n[13]=e.createTextVNode(" ")),e.createElementVNode("span",{style:{cursor:"pointer"},onClick:n[4]||(n[4]=(...a)=>t.openMonthList&&t.openMonthList(...a))},e.toDisplayString(t.showDate.monthStr),1)],2))]),_:1})])]),e.withDirectives(e.createElementVNode("div",Ro,[e.createElementVNode("div",zo,[e.createElementVNode("div",{class:"e-calendar-svg",onClick:n[6]||(n[6]=(...a)=>t.prevMonth&&t.prevMonth(...a))},[n[14]||(n[14]=e.createElementVNode("svg",{viewBox:"0 0 24 24",class:"e-calendar-svg-icon"},[e.createElementVNode("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})],-1)),e.createVNode(e.Transition,{name:"e_calendar_svg_btn"},{default:e.withCtx(()=>[t.prevMonthClick?(e.openBlock(),e.createElementBlock("div",Yo)):e.createCommentVNode("",!0)]),_:1})]),e.createElementVNode("div",Oo,[e.createVNode(e.Transition,{name:t.fadeXType},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{key:t.showDate.year+"-"+t.showDate.month,class:"e-calendar-toolbar-title-content"},[e.createElementVNode("strong",null,e.toDisplayString(t.showDate.year),1),n[15]||(n[15]=e.createTextVNode(" ")),e.createElementVNode("span",{style:{cursor:"pointer"},onClick:n[7]||(n[7]=(...a)=>t.openMonthList&&t.openMonthList(...a))},e.toDisplayString(t.showDate.monthStr),1)]))]),_:1},8,["name"])]),e.createElementVNode("div",{class:"e-calendar-svg",onClick:n[8]||(n[8]=(...a)=>t.nextMonth&&t.nextMonth(...a))},[n[16]||(n[16]=e.createElementVNode("svg",{viewBox:"0 0 24 24",class:"e-calendar-svg-icon"},[e.createElementVNode("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})],-1)),e.createVNode(e.Transition,{name:"e_calendar_svg_btn"},{default:e.withCtx(()=>[t.nextMonthClick?(e.openBlock(),e.createElementBlock("div",Po)):e.createCommentVNode("",!0)]),_:1})])]),e.createElementVNode("div",xo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.getWeekNames,(a,l)=>(e.openBlock(),e.createElementBlock("span",{key:l,class:"e-calendar-week-day"},e.toDisplayString(a),1))),128))]),e.createElementVNode("div",Zo,[(e.openBlock(),e.createElementBlock("div",{key:t.updateKey,class:"e-calendar-monthday-wrapper"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.rows,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:l,class:"e-calendar-monthday-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a,(u,c)=>(e.openBlock(),e.createElementBlock("span",{key:c,class:e.normalizeClass(["e-calendar-monthday-row-day",{active:u.selected,disabled:u.disabled,pointer:u.value!=="",hover:t.isDayHovered(c,l)}]),onClick:m=>t.selectDay(u),onMouseenter:m=>t.handleDayMouseEnter(c,l),onMouseleave:n[9]||(n[9]=m=>t.handleDayMouseLeave())},[e.createElementVNode("span",{textContent:e.toDisplayString(u.value),class:"e-calendar-monthday-row-day-value"},null,8,Wo),e.createVNode(e.Transition,{name:"e_calendar_day"},{default:e.withCtx(()=>[u.selected?(e.openBlock(),e.createElementBlock("span",jo)):e.createCommentVNode("",!0)]),_:2},1024)],42,Go))),128))]))),128))]))])],512),[[e.vShow,!t.showYear&&!t.showMonth]]),e.withDirectives(e.createElementVNode("ul",Uo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.yearList,(a,l)=>(e.openBlock(),e.createElementBlock("li",{key:l,class:e.normalizeClass({active:a===t.selectDate.year,hover:t.isYearHovered(l)}),onClick:u=>t.selectYear(a),onMouseenter:u=>t.handleYearMouseEnter(l),onMouseleave:n[10]||(n[10]=u=>t.handleYearMouseLeave())},e.toDisplayString(a),43,qo))),128))],512),[[e.vShow,t.showYear]]),e.withDirectives(e.createElementVNode("ul",Jo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.monthList,(a,l)=>(e.openBlock(),e.createElementBlock("li",{key:l,class:e.normalizeClass({active:a===t.selectDate.month,hover:t.isMonthHovered(l)}),onClick:u=>t.selectMonth(a),onMouseenter:u=>t.handleMonthMouseEnter(l),onMouseleave:n[11]||(n[11]=u=>t.handleMonthMouseLeave())},e.toDisplayString(t.getMonthName(a)),43,Ko))),128))],512),[[e.vShow,t.showMonth]])],4),[[e.vShow,t.showCalendar]])]))])}const Ln=Se(Ao,[["render",Qo],["__scopeId","data-v-225de415"]]),Xo=e.defineComponent({props:{direction:{type:String,default:"row"},min:{type:Number,required:!0},max:{type:Number,required:!0},paneLengthPercent:{type:Number,required:!0},triggerLength:{type:Number,required:!0}},emits:["update:paneLengthPercent"],setup(t,{emit:n}){let o=e.ref(null),r=e.ref(null),s=e.ref(0),i=e.ref("");const a=e.ref(Le.getCurrentTheme()),l=e.computed(()=>t.direction==="row"?"width":"height"),u=e.computed(()=>{var q;const V=a.value,C=t.direction==="row",K={metro:{default:C?"-webkit-gradient(linear,left top,right top,from(#ffffff), to(#d0d0d0))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#ffffff), to(#d0d0d0))",move:C?"-webkit-gradient(linear,left top,right top,from(#1084d8), to(#0078d4))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#1084d8), to(#0078d4))"},dark:{default:C?"-webkit-gradient(linear,left top,right top,from(#3a3a3a), to(#1f1f1f))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#3a3a3a), to(#1f1f1f))",move:C?"-webkit-gradient(linear,left top,right top,from(#33ddff), to(#00d4ff))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#33ddff), to(#00d4ff))"},modern:{default:C?"-webkit-gradient(linear,left top,right top,from(#f8fafc), to(#e2e8f0))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f8fafc), to(#e2e8f0))",move:C?"-webkit-gradient(linear,left top,right top,from(#818cf8), to(#6366f1))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#818cf8), to(#6366f1))"},classic:{default:C?"-webkit-gradient(linear,left top,right top,from(#f0f4f8), to(#cbd5e1))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f0f4f8), to(#cbd5e1))",move:C?"-webkit-gradient(linear,left top,right top,from(#3b82f6), to(#2563eb))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#3b82f6), to(#2563eb))"},colorful:{default:C?"-webkit-gradient(linear,left top,right top,from(#fef3c7), to(#fbbf24))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#fef3c7), to(#fbbf24))",move:C?"-webkit-gradient(linear,left top,right top,from(#f59e0b), to(#d97706))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f59e0b), to(#d97706))"},apple:{default:C?"-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0.95)), to(rgba(242,242,247,0.95)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,0.95)), to(rgba(242,242,247,0.95)))",move:C?"-webkit-gradient(linear,left top,right top,from(#4da6ff), to(#007aff))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#4da6ff), to(#007aff))"},liquidGlass:{default:C?"-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0.6)), to(rgba(215,215,217,0.4)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,0.6)), to(rgba(215,215,217,0.4)))",move:C?"-webkit-gradient(linear,left top,right top,from(rgba(166,212,225,0.8)), to(rgba(37,145,200,0.6)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(166,212,225,0.8)), to(rgba(37,145,200,0.6)))"}};return((q=K[V])==null?void 0:q.default)||K.metro.default}),c=e.computed(()=>{var q;const V=a.value,C=t.direction==="row",K={metro:{default:C?"-webkit-gradient(linear,left top,right top,from(#ffffff), to(#d0d0d0))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#ffffff), to(#d0d0d0))",move:C?"-webkit-gradient(linear,left top,right top,from(#1084d8), to(#0078d4))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#1084d8), to(#0078d4))"},dark:{default:C?"-webkit-gradient(linear,left top,right top,from(#3a3a3a), to(#1f1f1f))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#3a3a3a), to(#1f1f1f))",move:C?"-webkit-gradient(linear,left top,right top,from(#33ddff), to(#00d4ff))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#33ddff), to(#00d4ff))"},modern:{default:C?"-webkit-gradient(linear,left top,right top,from(#f8fafc), to(#e2e8f0))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f8fafc), to(#e2e8f0))",move:C?"-webkit-gradient(linear,left top,right top,from(#818cf8), to(#6366f1))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#818cf8), to(#6366f1))"},classic:{default:C?"-webkit-gradient(linear,left top,right top,from(#f0f4f8), to(#cbd5e1))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f0f4f8), to(#cbd5e1))",move:C?"-webkit-gradient(linear,left top,right top,from(#3b82f6), to(#2563eb))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#3b82f6), to(#2563eb))"},colorful:{default:C?"-webkit-gradient(linear,left top,right top,from(#fef3c7), to(#fbbf24))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#fef3c7), to(#fbbf24))",move:C?"-webkit-gradient(linear,left top,right top,from(#f59e0b), to(#d97706))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f59e0b), to(#d97706))"},apple:{default:C?"-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0.95)), to(rgba(242,242,247,0.95)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,0.95)), to(rgba(242,242,247,0.95)))",move:C?"-webkit-gradient(linear,left top,right top,from(#4da6ff), to(#007aff))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#4da6ff), to(#007aff))"},liquidGlass:{default:C?"-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0.6)), to(rgba(215,215,217,0.4)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,0.6)), to(rgba(215,215,217,0.4)))",move:C?"-webkit-gradient(linear,left top,right top,from(rgba(166,212,225,0.8)), to(rgba(37,145,200,0.6)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(166,212,225,0.8)), to(rgba(37,145,200,0.6)))"}};return((q=K[V])==null?void 0:q.move)||K.metro.move}),m=e.computed(()=>`calc(${t.paneLengthPercent}% - ${t.triggerLength/2}px)`),y=e.computed(()=>`${t.triggerLength}px`),w=e.computed(()=>{const V=a.value,C={metro:"brightness(0.4) opacity(0.5)",dark:"brightness(0) invert(1) opacity(0.9)",modern:"grayscale(0.3) brightness(0.6) opacity(0.4)",classic:"contrast(1.2) brightness(0.5) opacity(0.5)",colorful:"hue-rotate(-30deg) saturate(1.5) brightness(0.7) opacity(0.6)",apple:"brightness(0.5) contrast(1.1) opacity(0.45)",liquidGlass:"opacity(0.6)"};return C[V]||C.metro}),I=e.computed(()=>{const V=a.value,C={metro:"brightness(0.3) opacity(0.8)",dark:"brightness(0) invert(1) opacity(1) drop-shadow(0 0 3px cyan)",modern:"grayscale(0) brightness(0.5) hue-rotate(240deg) opacity(0.8)",classic:"contrast(1.5) brightness(0.4) saturate(1.5) opacity(0.9)",colorful:"hue-rotate(-20deg) saturate(2) brightness(0.6) contrast(1.2) opacity(0.95)",apple:"brightness(0.35) contrast(1.3) saturate(1.2) opacity(0.85)",liquidGlass:"opacity(0.9)"};return C[V]||C.metro});e.onMounted(async()=>{await e.nextTick(),i.value=`background: ${u.value}`});const g=async()=>{await e.nextTick(),i.value=`background: ${u.value}`},F=async()=>{await e.nextTick(),i.value=`background: ${c.value}`},h=V=>{document.addEventListener("mousemove",O),document.addEventListener("mouseup",S),t.direction==="row"?s.value=V.pageX-V.target.getBoundingClientRect().left:s.value=V.pageY-V.target.getBoundingClientRect().top},O=async V=>{if(await e.nextTick(),i.value=`background: ${c.value}`,o.value){const C=o.value.getBoundingClientRect();let K=0;t.direction==="row"?K=(V.pageX-C.left-s.value+t.triggerLength/2)/C.width*100:K=(V.pageY-C.top-s.value+t.triggerLength/2)/C.height*100,K<t.min&&(K=t.min),K>t.max&&(K=t.max),n("update:paneLengthPercent",K)}},S=async()=>{await e.nextTick(),i.value=`background: ${u.value}`,document.removeEventListener("mousemove",O)},D=setInterval(()=>{const V=Le.getCurrentTheme();V!==a.value&&(a.value=V,i.value=`background: ${u.value}`)},100);return e.onUnmounted(()=>{clearInterval(D)}),{splitPane:o,trigger:r,lengthType:l,triggerDefaultColor:u,triggerMoveColor:c,paneLengthValue:m,triggerLengthValue:y,triggerBackGroud:i,iconStyle:w,iconHoverStyle:I,handleMouseLeave:g,handleMouseOver:F,handleMouseDown:h,handleMouseUp:S}}});function ea(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",{ref:"splitPane",class:e.normalizeClass(["split-pane",t.direction]),style:e.normalizeStyle({flexDirection:t.direction})},[e.createElementVNode("div",{class:"pane pane-one",style:e.normalizeStyle(`${t.lengthType}: ${t.paneLengthValue}`)},[e.renderSlot(t.$slots,"one",{},void 0,!0)],4),t.triggerDefaultColor&&t.triggerMoveColor?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"trigger",class:"pane-trigger",style:e.normalizeStyle(`${t.lengthType}: ${t.triggerLengthValue}; ${t.triggerBackGroud}`)},[e.createElementVNode("div",{onClick:n[0]||(n[0]=(...a)=>t.handleMouseOver&&t.handleMouseOver(...a)),onMouseover:n[1]||(n[1]=(...a)=>t.handleMouseOver&&t.handleMouseOver(...a)),onMouseleave:n[2]||(n[2]=(...a)=>t.handleMouseLeave&&t.handleMouseLeave(...a)),onMousedown:n[3]||(n[3]=(...a)=>t.handleMouseDown&&t.handleMouseDown(...a)),class:"icon",style:e.normalizeStyle(`${t.lengthType}: ${t.triggerLengthValue}; filter: ${t.iconStyle}`)},null,36)],4)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"pane pane-two",style:e.normalizeStyle(`${t.lengthType}: calc(${100-t.paneLengthPercent}% - ${t.triggerLength/2}px)`)},[e.renderSlot(t.$slots,"two",{},void 0,!0)],4)],6)}const ta=Se(Xo,[["render",ea],["__scopeId","data-v-7a646dc7"]]),na=e.defineComponent({props:{headers:{type:Array,required:!0}},setup(t){const{t:n}=ze(),o=e.ref(!1),r=e.ref(-1),s=e.ref(0),i=e.ref(0),a=e.ref(null),l=w=>{const g={no:"task.serialNumber",task:"task.name",priority:"task.priority",startdate:"task.startDate",enddate:"task.endDate",takestime:"task.duration",progress:"task.progress",id:"ID",parentId:"Parent ID"}[w.property];return g?g.includes(".")?n(g):g:w.title},u=(w,I)=>{w.preventDefault(),w.stopPropagation(),o.value=!0,r.value=I,s.value=w.clientX,i.value=t.headers[I].width;const g=w.target;a.value=g.closest(".headerCaption"),document.addEventListener("mousemove",m,{passive:!1}),document.addEventListener("mouseup",y),document.body.style.cursor="col-resize",document.body.style.userSelect="none"};let c=null;const m=w=>{!o.value||r.value<0||(w.preventDefault(),c!==null&&cancelAnimationFrame(c),c=requestAnimationFrame(()=>{const I=w.clientX-s.value,g=Math.max(50,i.value+I);a.value&&(a.value.style.width=`${g}px`),document.querySelectorAll(`.cellNo[columnindex="${r.value}"], .cell[columnindex="${r.value}"]`).forEach(h=>{h.style.minWidth=`${g}px`,h.style.maxWidth=`${g}px`}),c=null}))},y=()=>{if(o.value){if(c!==null&&(cancelAnimationFrame(c),c=null),a.value&&r.value>=0){const w=parseInt(a.value.style.width);t.headers[r.value].width=w}o.value=!1,r.value=-1,a.value=null,document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",y),document.body.style.cursor="",document.body.style.userSelect=""}};return{getHeaderTitle:l,startResize:u}}}),oa={class:"header"},aa=["property","columnindex"],ra=["onMousedown"];function sa(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",oa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.headers,(a,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:l,property:a.property,columnindex:l,class:"headerCaption",style:e.normalizeStyle({width:`${a.width}px`})},[e.createElementVNode("span",null,e.toDisplayString(t.getHeaderTitle(a)),1),(a.property==="no"||a.show)&&l<t.headers.length-1?(e.openBlock(),e.createElementBlock("div",{key:0,class:"resize-handle",onMousedown:u=>t.startResize(u,l)},null,40,ra)):e.createCommentVNode("",!0)],12,aa)),[[e.vShow,a.show]])),128))])}const ia=Se(na,[["render",sa],["__scopeId","data-v-ed37aca8"]]),la={monthHeaders:[],weekHeaders:[],dayHeaders:[],hourHeaders:[],tasks:[],taskHeaders:[],mapFields:{},scale:90,timelineCellCount:0,startGanttDate:null,endGanttDate:null,scrollFlag:!0,mode:null,expandRow:{pid:0,expand:!0},collapsedTasks:new Set,rootTask:{},subTask:{},editTask:{},removeTask:{},allowChangeTaskDate:{},barDate:{id:"",startDate:"",endDate:""}};let v=e.reactive(la),ce={setMonthHeaders(t){v.monthHeaders=t},setDayHeaders(t){v.dayHeaders=t},setTasks(t){v.tasks=t},setTaskHeaders(t){v.taskHeaders=t},setWeekHeaders(t){v.weekHeaders=t},setHourHeaders(t){v.hourHeaders=t},setScale(t){v.scale=t},setMapFields(t){v.mapFields=t},setTimelineCellCount(t){v.timelineCellCount=t},setStartGanttDate(t){v.startGanttDate=t},setEndGanttDate(t){v.endGanttDate=t},setScrollFlag(t){v.scrollFlag=t},setMode(t){v.mode=t},setExpandRow(t){v.expandRow=t},toggleTaskCollapse(t){v.collapsedTasks.has(t)?v.collapsedTasks.delete(t):v.collapsedTasks.add(t),v.collapsedTasks=new Set(v.collapsedTasks)},setRootTask(t){v.rootTask=t},setSubTask(t){v.subTask=t},setEditTask(t){v.editTask=t},setRemoveTask(t){v.removeTask=t},setBarDate(t){v.barDate=t},setAllowChangeTaskDate(t){v.allowChangeTaskDate=t}};const Ye=e.reactive({shouldScrollToToday:!1,triggerScrollToToday(){this.shouldScrollToToday=!0},shouldScroll:!1,triggerScroll(){this.shouldScroll=!0},highlightedId:null,triggerHighlight(t){this.highlightedId=t}}),Fn=e.ref(0),In=e.ref(!1),da=t=>{Fn.value=t},ca=t=>{In.value=t},Hn=()=>({scrollTop:Fn,scrollFlag:In,setScrollTop:da,setScrollFlag:ca}),ua=e.defineComponent({props:{headers:{type:Array,default:()=>[]},rowHeight:{type:Number,default:0},row:{type:Object,default:()=>({})}},setup(t){const n=e.ref(!0),o=e.ref(!1),r="添加子任务",s="删除当前任务",i=e.computed(()=>v.mapFields),a=e.computed(()=>v.subTask),l=e.computed(()=>v.collapsedTasks);e.inject("barHover");const u=e.inject("addRootTask"),c=e.computed(()=>{const C=t.row[i.value.id];return v.tasks.some(K=>K[i.value.parentId]===C)}),m=e.computed(()=>{const C=t.row[i.value.id];return l.value.has(C)}),y=e.computed(()=>{const C=t.row[i.value.parentId];if(!C||C==="0")return!1;const K=v.tasks.filter(X=>X[i.value.parentId]===C);if(K.length===0)return!1;const q=t.row[i.value.id];return K[K.length-1][i.value.id]===q}),w=e.computed(()=>{const C=[],K=t.row.treeLevel||0;if(K<=1)return C;const q=K-1,j=[];let X=t.row;for(;X;){j.unshift(X);const A=X[i.value.parentId];if(!A||A==="0")break;const P=v.tasks.find(H=>H[i.value.id]===A);if(!P)break;X=P}for(let A=j.length-2;A>=0;A--){const P=j[A],H=P[i.value.id],ee=P[i.value.parentId],ke=v.tasks.filter(p=>p[i.value.parentId]===ee);if(ke.length>0){if(ke[ke.length-1][i.value.id]===H)break;{const b=P.treeLevel;b&&b>=1&&b!==q&&C.push(b)}}}return C}),I=()=>{const C=t.row[i.value.id];ce.toggleTaskCollapse(C)};e.onMounted(()=>{});const g=ce.setSubTask,F=ce.setEditTask,h=ce.setRemoveTask,O=(C,K)=>i.value[K]?C[i.value[K]]:C[K]?C[K]:null;return e.watch(()=>Ye.highlightedId,C=>{t.row[i.value.id]===C?o.value=!0:o.value=!1}),{showRow:n,hover:o,addTips:r,removeTips:s,mapFields:i,subTask:a,hasChildren:c,isCollapsed:m,isLastChild:y,getAncestorLines:w,toggleCollapse:I,setSubTask:g,setEditTask:F,setRemoveTask:h,checkField:O,hoverActive:()=>{Ye.triggerHighlight(t.row[i.value.id])},hoverInactive:()=>{Ye.triggerHighlight(null)},addRootTask:()=>{u&&u(t.row)}}}}),fa=["columnindex"],ha={class:"no-cell-content"},ma={class:"tree-lines"},pa=["title"],ga={key:1,class:"collapse-placeholder"},ya={class:"no-text"},ka={class:"action-buttons"},ba=["columnindex"];function wa(t,n,o,r,s,i){return t.showRow?(e.openBlock(),e.createElementBlock("div",{key:0,onMouseover:n[4]||(n[4]=a=>t.hoverActive()),onMouseleave:n[5]||(n[5]=a=>t.hoverInactive()),class:e.normalizeClass({active:t.hover})},[e.createElementVNode("div",{class:"row",onDblclick:n[3]||(n[3]=a=>t.setEditTask(t.row)),style:e.normalizeStyle({height:t.rowHeight+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.headers,(a,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a.property==="no"?(e.openBlock(),e.createElementBlock("div",{class:"cellNo",key:l,columnindex:l,style:e.normalizeStyle({minWidth:a.width+"px",maxWidth:a.width+"px",height:t.rowHeight+"px"})},[e.createElementVNode("div",ha,[e.createElementVNode("div",ma,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.getAncestorLines,u=>(e.openBlock(),e.createElementBlock("div",{key:"ancestor-"+u,class:"tree-line-vertical ancestor",style:e.normalizeStyle({left:u*16+8+"px"})},null,4))),128)),t.row.treeLevel===1&&t.hasChildren&&!t.isCollapsed?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tree-line-vertical parent-to-child",style:e.normalizeStyle({left:t.row.treeLevel*16+8+"px"})},null,4)):e.createCommentVNode("",!0),t.row.treeLevel&&t.row.treeLevel>1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",{class:e.normalizeClass(["tree-line-vertical current",{"is-last-child":t.isLastChild}]),style:e.normalizeStyle({left:(t.row.treeLevel-1)*16+8+"px"})},null,6),e.createElementVNode("div",{class:"tree-line-horizontal",style:e.normalizeStyle({left:(t.row.treeLevel-1)*16+8+"px",width:"32px"})},null,4),t.hasChildren&&!t.isCollapsed?(e.openBlock(),e.createElementBlock("div",{key:0,class:"tree-line-vertical parent-to-child",style:e.normalizeStyle({left:t.row.treeLevel*16+8+"px"})},null,4)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{class:"no-left-section",style:e.normalizeStyle({paddingLeft:(t.row.treeLevel||0)*16+"px"})},[t.hasChildren?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[0]||(n[0]=e.withModifiers((...u)=>t.toggleCollapse&&t.toggleCollapse(...u),["stop"])),class:e.normalizeClass(["collapse-btn",{collapsed:t.isCollapsed}]),title:t.isCollapsed?"展开":"折叠"},n[6]||(n[6]=[e.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},[e.createElementVNode("path",{class:"arrow",d:"M5 4 L14 9 L5 14 Z",fill:"currentColor"})],-1)]),10,pa)):(e.openBlock(),e.createElementBlock("span",ga)),e.createElementVNode("span",ya,e.toDisplayString(t.row.no),1)],4),e.createElementVNode("div",ka,[e.createElementVNode("button",{onClick:n[1]||(n[1]=e.withModifiers(u=>t.setSubTask(t.row),["stop"])),class:"action-btn add-btn",title:"添加子任务"},n[7]||(n[7]=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor"},[e.createElementVNode("path",{d:"M8 2a.5.5 0 01.5.5v5h5a.5.5 0 010 1h-5v5a.5.5 0 01-1 0v-5h-5a.5.5 0 010-1h5v-5A.5.5 0 018 2z"})],-1)])),e.createElementVNode("button",{onClick:n[2]||(n[2]=e.withModifiers(u=>t.setRemoveTask(t.row),["stop"])),class:"action-btn delete-btn",title:"删除任务"},n[8]||(n[8]=[e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor"},[e.createElementVNode("path",{d:"M5.5 5.5A.5.5 0 016 6v6a.5.5 0 01-1 0V6a.5.5 0 01.5-.5zm2.5 0a.5.5 0 01.5.5v6a.5.5 0 01-1 0V6a.5.5 0 01.5-.5zm3 .5a.5.5 0 00-1 0v6a.5.5 0 001 0V6z"}),e.createElementVNode("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 01-1 1H13v9a2 2 0 01-2 2H5a2 2 0 01-2-2V4h-.5a1 1 0 01-1-1V2a1 1 0 011-1H6a1 1 0 011-1h2a1 1 0 011 1h3.5a1 1 0 011 1v1zM4.118 4L4 4.059V13a1 1 0 001 1h6a1 1 0 001-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"})],-1)]))])])],12,fa)):e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"cell",key:l+"-header",columnindex:l,style:e.normalizeStyle({minWidth:a.width+"px",maxWidth:a.width+"px",height:t.rowHeight+"px"})},e.toDisplayString(t.checkField(t.row,a.property)),13,ba)),[[e.vShow,a.show]])],64))),256))],36)],34)):e.createCommentVNode("",!0)}const Ca=Se(ua,[["render",wa],["__scopeId","data-v-84b9433f"]]),Sa=e.defineComponent({props:{headers:Array,rowHeight:Number,tasks:Array},components:{TaskRow:Ca},setup(t){const n=e.ref([]),o=e.computed(()=>v.mapFields),r=e.computed(()=>v.collapsedTasks),s=c=>{const m=new Set,y=t.tasks||v.tasks,w=I=>{y.filter(F=>F[o.value.parentId]===I).forEach(F=>{const h=F[o.value.id];m.add(h),w(h)})};return w(c),m},i=e.computed(()=>new Set(n.value.map(c=>c[o.value.id]))),a=e.computed(()=>{const c=i.value,m=v.tasks.filter(w=>!c.has(w[o.value.id])),y=new Set;return r.value.forEach(w=>{s(w).forEach(g=>y.add(g))}),m.filter(w=>!y.has(w[o.value.id]))}),l=e.computed({get:()=>v.expandRow,set:c=>{ce.setExpandRow(c)}});e.watch(l,c=>{n.value=[],u(c.pid)});const u=c=>{let m=t.tasks?t.tasks.filter(y=>y[o.value.parentId]===c):[];if(m&&m.length>0)for(let y=0;y<m.length;y++)l.value.expand===!1&&n.value.push(m[y]),u(m[y][o.value.id])};return{filterTask:a,expandRow:l,recursionRow:u,mapFields:o}}});function Ta(t,n,o,r,s,i){const a=e.resolveComponent("TaskRow");return e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.filterTask,l=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:l.id+"_taskrow"},[t.headers?(e.openBlock(),e.createBlock(a,{key:0,headers:t.headers,rowHeight:t.rowHeight,row:l},null,8,["headers","rowHeight","row"])):e.createCommentVNode("",!0)],64))),128))])}const va=Se(Sa,[["render",Ta]]),$a=e.defineComponent({props:{headers:{type:Array,default:()=>[]},rowHeight:{type:Number,default:0}},components:{TaskRecursionRow:va},setup(t){const n=e.computed(()=>v.tasks),{scrollTop:o,scrollFlag:r,setScrollTop:s,setScrollFlag:i}=Hn(),a=e.ref(null),l=e.computed(()=>v.mapFields),u=e.computed(()=>n.value.length*t.rowHeight),c=()=>n.value.filter(F=>F[l.value.parentId]==="0");e.watch(o,F=>{!r.value&&a.value&&(a.value.scrollTop=F)});let m=null;const y=()=>{m&&cancelAnimationFrame(m),m=requestAnimationFrame(()=>{a.value&&(i(!0),s(a.value.scrollTop)),m=null})},w=()=>{},I=()=>{if(a.value){const F=document.querySelector(".table .content");F&&(F.scrollWidth>F.clientWidth?a.value.style.paddingBottom="20px":a.value.style.paddingBottom="0px")}};e.watch(n,()=>{setTimeout(I,50)});const g=()=>{setTimeout(I,50)};return e.onMounted(()=>{a.value&&(a.value.scrollTop=o.value,setTimeout(I,100),window.addEventListener("resize",g))}),e.onUnmounted(()=>{window.removeEventListener("resize",g)}),{tasks:n,taskContent:a,scrollFlag:r,mapFields:l,setScrollFlag:i,getRootNode:c,scroll:y,mouseover:w,contentHeight:u}}});function Da(t,n,o,r,s,i){const a=e.resolveComponent("TaskRecursionRow");return e.openBlock(),e.createElementBlock("div",{ref:"taskContent",class:"content",onScroll:n[0]||(n[0]=l=>t.scroll()),onMouseover:n[1]||(n[1]=l=>t.mouseover())},[e.createElementVNode("div",{class:"content-inner",style:e.normalizeStyle({minHeight:t.contentHeight+"px"})},[e.createVNode(a,{headers:t.headers,rowHeight:t.rowHeight,tasks:t.tasks},null,8,["headers","rowHeight","tasks"])],4)],544)}const Ea=Se($a,[["render",Da],["__scopeId","data-v-f13dd030"]]),Ma=e.defineComponent({props:{visible:{type:Boolean,default:!1},headers:{type:Array,required:!0}},emits:["close","update:headers"],setup(t,{emit:n}){const{t:o}=ze(),r=e.ref(null),s=e.ref("metro"),i=w=>{if(!r.value)return;const I=Le.getThemeInfo(w);I&&(r.value.setAttribute("data-gantt-theme",w),Object.entries(I.cssVariables).forEach(([g,F])=>{r.value.style.setProperty(g,F)}))};return e.watch(()=>t.visible,w=>{w&&(s.value=Le.getCurrentTheme(),setTimeout(()=>{i(s.value)},0))}),{t:o,panelRef:r,currentTheme:s,getHeaderTitle:w=>{const g={no:"task.serialNumber",task:"task.name",priority:"task.priority",startdate:"task.startDate",enddate:"task.endDate",takestime:"task.duration",progress:"task.progress",id:"ID",parentId:"Parent ID"}[w.property];return g?g.includes(".")?o(g):g:w.title},handleClose:()=>{n("close")},toggleColumn:w=>{const I=[...t.headers];I[w].show=!I[w].show,n("update:headers",I)},showAll:()=>{const w=t.headers.map(I=>({...I,show:!0}));n("update:headers",w)},hideAll:()=>{const w=t.headers.map(I=>({...I,show:!1}));n("update:headers",w)},reset:()=>{const w={no:!0,task:!0,priority:!0,startdate:!0,enddate:!0,takestime:!0,progress:!0,id:!1,parentId:!1},I=t.headers.map(g=>({...g,show:w[g.property]!==void 0?w[g.property]:!0}));n("update:headers",I)}}}}),Va=["data-gantt-theme"],Na=["data-gantt-theme"],_a={class:"panel-header"},Aa=["title"],Ba={class:"panel-desc"},La={class:"action-buttons"},Fa={class:"column-list"},Ia={class:"checkbox-wrapper"},Ha=["checked","onChange"],Ra={class:"column-label"};function za(t,n,o,r,s,i){return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[t.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"column-config-overlay",onClick:n[4]||(n[4]=e.withModifiers((...a)=>t.handleClose&&t.handleClose(...a),["self"])),"data-gantt-theme":t.currentTheme},[e.createElementVNode("div",{class:"column-config-panel",ref:"panelRef","data-gantt-theme":t.currentTheme},[e.createElementVNode("div",_a,[e.createElementVNode("h3",null,e.toDisplayString(t.t("columnSettings.title")),1),e.createElementVNode("button",{class:"close-btn",onClick:n[0]||(n[0]=(...a)=>t.handleClose&&t.handleClose(...a)),title:t.t("tooltip.close")},n[5]||(n[5]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"20",height:"20"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",fill:"currentColor"})],-1)]),8,Aa)]),e.createElementVNode("div",Ba,e.toDisplayString(t.t("columnSettings.desc")),1),e.createElementVNode("div",La,[e.createElementVNode("button",{class:"action-btn",onClick:n[1]||(n[1]=(...a)=>t.showAll&&t.showAll(...a))},[n[6]||(n[6]=e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[e.createElementVNode("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z",fill:"currentColor"})],-1)),e.createTextVNode(" "+e.toDisplayString(t.t("columnSettings.showAll")),1)]),e.createElementVNode("button",{class:"action-btn",onClick:n[2]||(n[2]=(...a)=>t.hideAll&&t.hideAll(...a))},[n[7]||(n[7]=e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[e.createElementVNode("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46A11.804 11.804 0 0 0 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z",fill:"currentColor"})],-1)),e.createTextVNode(" "+e.toDisplayString(t.t("columnSettings.hideAll")),1)]),e.createElementVNode("button",{class:"action-btn",onClick:n[3]||(n[3]=(...a)=>t.reset&&t.reset(...a))},[n[8]||(n[8]=e.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[e.createElementVNode("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z",fill:"currentColor"})],-1)),e.createTextVNode(" "+e.toDisplayString(t.t("columnSettings.reset")),1)])]),e.createElementVNode("div",Fa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.headers,(a,l)=>(e.openBlock(),e.createElementBlock("div",{key:a.property,class:e.normalizeClass(["column-item",{disabled:!a.show}])},[e.createElementVNode("label",Ia,[e.createElementVNode("input",{type:"checkbox",checked:a.show,onChange:u=>t.toggleColumn(l)},null,40,Ha),n[9]||(n[9]=e.createElementVNode("span",{class:"checkbox-custom"},null,-1)),e.createElementVNode("span",Ra,e.toDisplayString(t.getHeaderTitle(a)),1)])],2))),128))])],8,Na)],8,Va)):e.createCommentVNode("",!0)])}const Ya=Se(Ma,[["render",za],["__scopeId","data-v-fd147c82"]]);var Qt={exports:{}},Oa=Qt.exports,Rn;function Pa(){return Rn||(Rn=1,function(t,n){(function(o,r){t.exports=r()})(Oa,function(){return function(o,r,s){r.prototype.isBetween=function(i,a,l,u){var c=s(i),m=s(a),y=(u=u||"()")[0]==="(",w=u[1]===")";return(y?this.isAfter(c,l):!this.isBefore(c,l))&&(w?this.isBefore(m,l):!this.isAfter(m,l))||(y?this.isBefore(c,l):!this.isAfter(c,l))&&(w?this.isAfter(m,l):!this.isBefore(m,l))}}})}(Qt)),Qt.exports}var xa=Pa();const Za=un(xa);T.extend(Za);const Ga=e.defineComponent({props:{headersHeight:{type:Number,default:50},rowHeight:{type:Number,default:0}},components:{TaskHeader:ia,TaskContent:Ea,ColumnConfigPanel:Ya},setup(){const{t}=ze(),n=e.computed(()=>v.tasks),o=e.computed(()=>v.taskHeaders),r=e.computed({get:()=>v.rootTask,set:y=>{ce.setRootTask(y)}}),s=e.computed(()=>v.startGanttDate),i=e.computed(()=>v.endGanttDate),a=e.ref(!1),l=ce.setRootTask;return{t,tasks:n,taskHeaders:o,rootTask:r,startGanttDate:s,endGanttDate:i,setRootTask:l,scrollToToday:()=>{T().isBetween(s.value,i.value)&&Ye.triggerScrollToToday()},columnConfigVisible:a,showColumnConfig:()=>{a.value=!0},updateHeaders:y=>{ce.setTaskHeaders(y)}}}}),Wa={class:"table"},ja=["title"];function Ua(t,n,o,r,s,i){const a=e.resolveComponent("TaskHeader"),l=e.resolveComponent("TaskContent"),u=e.resolveComponent("ColumnConfigPanel");return e.openBlock(),e.createElementBlock("div",Wa,[e.createElementVNode("div",{class:"header",style:e.normalizeStyle({height:`${t.headersHeight}px`})},[(e.openBlock(),e.createElementBlock("svg",{ref:"addTaskSvg",t:"1647915776075",onClick:n[0]||(n[0]=c=>t.setRootTask({})),class:"addRootTask",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3147",width:"28",height:"28"},n[4]||(n[4]=[e.createElementVNode("path",{d:"M864 0H160C70.4 0 0 70.4 0 160v704c0 89.6 70.4 160 160 160h704c89.6 0 160-70.4 160-160V160c0-89.6-70.4-160-160-160z m96 864c0 54.4-41.6 96-96 96H160c-54.4 0-96-41.6-96-96V160c0-54.4 41.6-96 96-96h704c54.4 0 96 41.6 96 96v704z",fill:"currentColor","p-id":"3148"},null,-1),e.createElementVNode("path",{d:"M768 480h-224V256c0-19.2-12.8-32-32-32s-32 12.8-32 32v224H256c-19.2 0-32 12.8-32 32s12.8 32 32 32h224v224c0 19.2 12.8 32 32 32s32-12.8 32-32v-224h224c19.2 0 32-12.8 32-32s-12.8-32-32-32z","p-id":"3149",fill:"currentColor"},null,-1)]),512)),(e.openBlock(),e.createElementBlock("svg",{ref:"jumpTodaySvg",onClick:n[1]||(n[1]=c=>t.scrollToToday()),class:"jumpToToday",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28"},n[5]||(n[5]=[e.createElementVNode("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2z",fill:"currentColor"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"15",r:"2",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M16.5 11.5l2 2-2 2",stroke:"currentColor","stroke-width":"1.5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),e.createElementVNode("path",{d:"M18.5 13.5h-4",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)]),512)),(e.openBlock(),e.createElementBlock("svg",{ref:"columnSettingsSvg",onClick:n[2]||(n[2]=(...c)=>t.showColumnConfig&&t.showColumnConfig(...c)),class:"columnSettings",title:t.t("tooltip.columnSettings"),viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28"},n[6]||(n[6]=[e.createElementVNode("path",{d:"M3 3h8v8H3V3zm10 0h8v8h-8V3zM3 13h8v8H3v-8zm10 0h8v8h-8v-8z",fill:"none",stroke:"currentColor","stroke-width":"1.5"},null,-1),e.createElementVNode("path",{d:"M5 6h4M5 8h4M15 6h4M15 8h4M5 16h4M5 18h4M15 16h4M15 18h4",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),e.createElementVNode("circle",{cx:"20",cy:"4",r:"3",fill:"var(--primary, #0078d4)",stroke:"var(--bg-content, #ffffff)","stroke-width":"1.5"},null,-1)]),8,ja)),e.createVNode(a,{headers:t.taskHeaders},null,8,["headers"])],4),e.createElementVNode("div",{style:e.normalizeStyle({height:`calc(100% - ${t.headersHeight}px)`})},[Array.isArray(t.tasks)&&t.tasks.length>0?(e.openBlock(),e.createBlock(l,{key:0,headers:t.taskHeaders,rowHeight:t.rowHeight},null,8,["headers","rowHeight"])):e.createCommentVNode("",!0)],4),e.createVNode(u,{visible:t.columnConfigVisible,headers:t.taskHeaders,onClose:n[3]||(n[3]=c=>t.columnConfigVisible=!1),"onUpdate:headers":t.updateHeaders},null,8,["visible","headers","onUpdate:headers"])])}const qa=Se(Ga,[["render",Ua],["__scopeId","data-v-d8ceb9cf"]]),Ja=e.defineComponent({props:{weekHeaders:{type:Array,default:()=>[]},dayHeaders:{type:Array,default:()=>[]},monthHeaders:{type:Array,default:()=>[]},hourHeaders:{type:Array,default:()=>[]}},setup(t){const{weekHeaders:n,dayHeaders:o,monthHeaders:r,hourHeaders:s}=e.toRefs(t),{locale:i}=ze();return{weekHeaders:n,dayHeaders:o,monthHeaders:r,hourHeaders:s,isToday:l=>{const c={"zh-CN":"zh-cn","en-US":"en","ja-JP":"ja","ko-KR":"ko","fr-FR":"fr","de-DE":"de","es-ES":"es","ru-RU":"ru"}[i.value]||"en";return l===T().locale(c).format("YYYY-MM-DD")}}}}),Ka={class:"headerContainer"},Qa={key:0,class:"header"},Xa={key:1,class:"header"},er={key:2,class:"header"},tr={key:0,class:"today",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20"},nr={key:3,class:"header"};function or(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",Ka,[t.monthHeaders&&t.monthHeaders.length>0?(e.openBlock(),e.createElementBlock("div",Qa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.monthHeaders,a=>(e.openBlock(),e.createElementBlock("div",{key:a.title,class:"headerCaption",style:e.normalizeStyle([{"border-bottom":"0px"},{width:a.width+"px"}])},[e.createElementVNode("span",{style:e.normalizeStyle({width:a.width+"px"})},e.toDisplayString(a.title),5)],4))),128))])):e.createCommentVNode("",!0),t.weekHeaders&&t.weekHeaders.length>0?(e.openBlock(),e.createElementBlock("div",Xa,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.weekHeaders,a=>(e.openBlock(),e.createElementBlock("div",{key:a.title,class:"headerCaption",style:e.normalizeStyle([{"border-top":"1px"},{width:a.width+"px"}])},[e.createElementVNode("span",{style:e.normalizeStyle({width:a.width+"px"})},e.toDisplayString(a.title),5)],4))),128))])):e.createCommentVNode("",!0),t.dayHeaders&&t.dayHeaders.length>0?(e.openBlock(),e.createElementBlock("div",er,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dayHeaders,a=>(e.openBlock(),e.createElementBlock("div",{key:a.title,class:"headerCaption",style:e.normalizeStyle({width:a.width+"px"})},[e.createElementVNode("span",{style:e.normalizeStyle({width:a.width+"px"})},e.toDisplayString(a.title),5),t.isToday(a.fulldate)?(e.openBlock(),e.createElementBlock("svg",tr,n[0]||(n[0]=[e.createElementVNode("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2z",fill:"currentColor"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"15",r:"2",fill:"currentColor"},null,-1),e.createElementVNode("path",{d:"M8 11l4 4 4-4",stroke:"currentColor","stroke-width":"1.5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):e.createCommentVNode("",!0)],4))),128))])):e.createCommentVNode("",!0),t.hourHeaders&&t.hourHeaders.length>0?(e.openBlock(),e.createElementBlock("div",nr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.hourHeaders,a=>(e.openBlock(),e.createElementBlock("div",{key:a.title,class:"headerCaption",style:e.normalizeStyle({width:a.width+"px",marginTop:"-2px"})},[e.createElementVNode("span",{style:e.normalizeStyle({width:a.width+"px"})},e.toDisplayString(a.title),5)],4))),128))])):e.createCommentVNode("",!0)])}const ar=Se(Ja,[["render",or],["__scopeId","data-v-95fbb3d2"]]);var Xt={exports:{}},rr=Xt.exports,zn;function sr(){return zn||(zn=1,function(t,n){(function(o,r){t.exports=r()})(rr,function(){var o="day";return function(r,s,i){var a=function(c){return c.add(4-c.isoWeekday(),o)},l=s.prototype;l.isoWeekYear=function(){return a(this).year()},l.isoWeek=function(c){if(!this.$utils().u(c))return this.add(7*(c-this.isoWeek()),o);var m,y,w,I,g=a(this),F=(m=this.isoWeekYear(),y=this.$u,w=(y?i.utc:i)().year(m).startOf("year"),I=4-w.isoWeekday(),w.isoWeekday()>4&&(I+=7),w.add(I,o));return g.diff(F,"week")+1},l.isoWeekday=function(c){return this.$utils().u(c)?this.day()||7:this.day(this.day()%7?c:c-7)};var u=l.startOf;l.startOf=function(c,m){var y=this.$utils(),w=!!y.u(m)||m;return y.p(c)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):u.bind(this)(c,m)}}})}(Xt)),Xt.exports}var ir=sr();const Yn=un(ir);T.extend(Yn);const lr=e.defineComponent({name:"Bar",emits:["progress-update"],props:{rowHeight:{type:Number,default:0},row:{type:Object,default:()=>({})},startGanttDate:{type:String},endGanttDate:{type:String}},setup(t,{emit:n}){const o=e.ref(null),r=e.ref(t.rowHeight*.7),s=e.ref(null),i=e.ref(0),a=e.ref(0),l=e.ref(!0),u=e.ref(!1),c=e.ref(""),m=e.ref(!1),y=e.ref(0),w=e.ref(!1),I=e.computed(()=>v.timelineCellCount),g=e.computed(()=>v.scale),F=e.computed(()=>v.mode),h=e.computed(()=>v.mapFields),O=e.computed(()=>{const A=Number(t.row[h.value.progress]);return isNaN(A)?"0.00%":(A*100).toFixed(2)+"%"}),S=e.inject(ft.SetBarColorSymbol),D=A=>{const P={taskId:t.row[h.value.id],oldProgress:Number(t.row[h.value.progress])||0,newProgress:A,task:t.row};n("progress-update",P),window.dispatchEvent(new CustomEvent("taskProgressUpdate",{detail:P})),console.log("Task progress updated:",P)};e.watch(()=>Ye.highlightedId,A=>{u.value=t.row[h.value.id]===A});const V=()=>Ye.triggerHighlight(t.row[h.value.id]),C=()=>Ye.triggerHighlight(null),K=A=>{y.value;let P="#ffffff",H="#f8f8f8";if(o.value){let ee=o.value.parentElement;for(;ee;){if(ee.hasAttribute("data-gantt-theme")){P=getComputedStyle(ee).getPropertyValue("--bg-content").trim()||"#ffffff",H=getComputedStyle(ee).getPropertyValue("--bg-secondary").trim()||"#f8f8f8";break}ee=ee.parentElement}}switch(F.value){case"月":case"日":{let ee=T(t.startGanttDate).add(A,"days");return ee.isoWeekday()===7||ee.isoWeekday()===1?H:P}case"周":case"时":return P}},q=ce.setBarDate,j=ce.setAllowChangeTaskDate,X=A=>{let P=0;switch(F.value){case"月":case"日":{let E=T(t.row[h.value.startdate]).diff(T(t.startGanttDate),"days");P=g.value*E;let M=T(t.row[h.value.enddate]).diff(T(t.row[h.value.startdate]),"days")+1;a.value=M*g.value,t.row[h.value.takestime]=M+"天";break}case"周":{const E=T(t.startGanttDate).startOf("isoWeek"),M=T(t.row[h.value.startdate]).startOf("isoWeek");let ae=M.diff(E,"week");P=g.value*ae;let k=T(t.row[h.value.enddate]).startOf("isoWeek").diff(M,"week")+1;a.value=k*g.value,t.row[h.value.takestime]=k+"周";break}case"时":{let E=T(t.row[h.value.startdate]).diff(T(t.startGanttDate),"hours");P=g.value*E;let M=T(t.row[h.value.enddate]).diff(T(t.row[h.value.startdate]),"hours")+1;a.value=M*g.value,t.row[h.value.takestime]=M+"小时";break}}i.value=P;let H=cn(A);const ee=getComputedStyle(A).getPropertyValue("--border")||"#cecece";A.setAttribute("data-x",P.toString()),A.setAttribute("width",a.value.toString()),A.setAttribute("stroke",ee),A.setAttribute("stroke-width","1px"),A.style.transform=`translate(${P}px, 0px)`;let ke=H.select("pattern").first(),p=H.children().filter(E=>E.type==="g")[0]||H.group(),d=H.select(".innerRect").first(),b=H.select("rect:not(.innerRect):not(.progressHandle)").first(),f=H.select("text").first(),$=H.select(".progressHandle").first();ke||(ke=H.pattern(10,10,E=>{E.path("M10 -5 -10,15M15,0,0,15M0 -5 -20,15").fill("none").stroke({color:"gray",opacity:.4,width:5})})),p||(p=H.group());let B=t.row[h.value.progress]?Number(a.value)*Number(t.row[h.value.progress]):Number(a.value);d?(d.fill({color:c.value,opacity:.4}),d.width(B)):(d=H.rect(B,r.value).radius(10),d.addClass("innerRect"),p.add(d)),b?b.width(a.value):(b=H.rect(a.value,r.value).radius(10).fill(ke).stroke({color:ee,width:1}),b.on("mouseover",()=>b.animate(200).attr({stroke:"#000",strokeWidth:2,opacity:1})),b.on("mouseleave",()=>b.animate(200).attr({stroke:"#0066ff",strokeWidth:10,opacity:.4}))),f?f.text(O.value):f=H.text(O.value).stroke("#faf7ec");const _=f.bbox();f.font({size:15,anchor:"middle",leading:"1em"}).fill("#000").attr("opacity",1).attr("dominant-baseline","middle").center(d.width()/2+_.width/2,d.height()/2);const L=12,Z=8,G=B-L/2,W=r.value-Z/2,ne=B,le=()=>{let E="#f59e0b",M="#d97706",ae="#fbbf24",J=A.parentElement;for(;J;){if(J.hasAttribute("data-gantt-theme")){E=getComputedStyle(J).getPropertyValue("--primary").trim()||E,M=getComputedStyle(J).getPropertyValue("--primary-dark").trim()||M,ae=getComputedStyle(J).getPropertyValue("--primary-light").trim()||ae;break}J=J.parentElement}return{primary:E,primaryDark:M,primaryLight:ae}};let re=A.querySelector(".progressGuideLine");const Te=le();if(!re){const E=document.createElementNS("http://www.w3.org/2000/svg","line");E.setAttribute("class","progressGuideLine"),E.setAttribute("x1",String(ne)),E.setAttribute("y1","0"),E.setAttribute("x2",String(ne)),E.setAttribute("y2",String(W)),E.setAttribute("stroke",Te.primaryDark),E.setAttribute("stroke-width","2"),E.setAttribute("stroke-dasharray","4,3"),E.setAttribute("opacity","0.8"),A.appendChild(E),re=E}if(re.setAttribute("x1",String(ne)),re.setAttribute("x2",String(ne)),re.setAttribute("y2",String(W)),re.setAttribute("stroke",Te.primaryDark),re.setAttribute("opacity","0.8"),$){$.move(G,W);const E=$.node;E.setAttribute("fill",Te.primary),E.setAttribute("stroke",Te.primaryDark)}else{const E=`${L/2},0 0,${Z} ${L},${Z}`;$=H.polygon(E).fill(Te.primary).stroke({color:Te.primaryDark,width:1}).addClass("progressHandle");const M=$.node;M.style.cursor="ew-resize",M.style.pointerEvents="auto",$.move(G,W);let ae=G;M.addEventListener("mouseenter",()=>{if(!w.value){const J=le();M.setAttribute("fill",J.primaryLight),M.setAttribute("stroke",J.primary),M.setAttribute("stroke-width","2"),re.setAttribute("stroke",J.primaryLight),re.setAttribute("stroke-width","2"),re.setAttribute("opacity","1")}}),M.addEventListener("mouseleave",()=>{if(!w.value){const J=le();M.setAttribute("fill",J.primary),M.setAttribute("stroke",J.primaryDark),M.setAttribute("stroke-width","1"),re.setAttribute("stroke",J.primaryDark),re.setAttribute("stroke-width","2"),re.setAttribute("opacity","0.8")}}),Oe(M).draggable({inertia:!1,listeners:{start:()=>{w.value=!0;const J=le();M.setAttribute("fill",J.primaryDark),M.setAttribute("stroke",J.primaryDark),M.setAttribute("stroke-width","2"),re.setAttribute("stroke",J.primaryDark),re.setAttribute("stroke-width","2"),re.setAttribute("opacity","1")},move:J=>{ae+=J.dx,ae=Math.max(-12/2,Math.min(ae,a.value-L/2)),$.move(ae,W);const k=ae+L/2;re.setAttribute("x1",String(k)),re.setAttribute("x2",String(k));const R=Math.min(1,Math.max(0,(ae+L/2)/a.value));d.width(R*a.value),f.text((R*100).toFixed(2)+"%"),f.center(d.width()/2+_.width/2,d.height()/2)},end:()=>{w.value=!1;const J=le();M.setAttribute("fill",J.primary),M.setAttribute("stroke",J.primaryDark),M.setAttribute("stroke-width","1"),re.setAttribute("stroke",J.primaryDark),re.setAttribute("stroke-width","2"),re.setAttribute("opacity","0.8");const k=Math.min(1,Math.max(0,(ae+L/2)/a.value));t.row[h.value.progress]=k,D(k)}}})}q({id:t.row[h.value.id],startDate:t.row[h.value.startdate],endDate:t.row[h.value.enddate]}),Oe(A).draggable({inertia:!1,modifiers:[Oe.modifiers.restrictRect({restriction:"parent",endOnly:!0})],autoScroll:!0,listeners:{start:E=>{w.value||(i.value=Number(E.target.getAttribute("data-x")),a.value=E.target.width.baseVal.value)},move:E=>{if(w.value)return;let M=((parseFloat(E.target.getAttribute("data-x")||"0")||0)+E.dx).toString();Object.assign(E.target.style,{width:`${E.rect.width}px`,height:`${E.rect.height}px`,transform:`translate(${M}px, 0px)`}),E.target.setAttribute("data-x",M),E.target.setAttribute("data-y","0")},end:E=>{if(w.value)return;let M=E.target,ae=parseFloat(M.getAttribute("data-x")||"0")||0,k=Math.round(ae/g.value)*g.value;k<0&&(k=0),k>I.value*g.value&&(k=I.value*g.value);const R=h.value.parentId||"pid",te=t.row[R];if(te&&te!=="0"){const he=v.tasks.find(Me=>String(Me[h.value.id])===String(te));if(he){let Me=0;if(F.value==="月"||F.value==="日")Me=T(he[h.value.startdate]).diff(T(t.startGanttDate),"days")*g.value;else if(F.value==="周"){const we=T(t.startGanttDate).startOf("isoWeek");Me=T(he[h.value.startdate]).startOf("isoWeek").diff(we,"week")*g.value}else F.value==="时"&&(Me=T(he[h.value.startdate]).diff(T(t.startGanttDate),"hours")*g.value);k<Me&&(k=Me)}}M.style.transform=`translate(${k}px, 0px)`,M.setAttribute("data-x",k.toString());const oe=Math.round((k-i.value)/g.value);let Y=0,me=0;if(F.value==="月"||F.value==="日"?Y=oe:F.value==="周"?Y=oe*7:F.value==="时"&&(me=oe),F.value==="时")t.row[h.value.startdate]=T(t.row[h.value.startdate]).add(me,"hours").format("YYYY-MM-DD HH:mm:ss"),t.row[h.value.enddate]=T(t.row[h.value.enddate]).add(me,"hours").format("YYYY-MM-DD HH:mm:ss"),t.row[h.value.takestime]=T(t.row[h.value.enddate]).diff(T(t.row[h.value.startdate]),"hours")+1+"小时";else if(t.row[h.value.startdate]=T(t.row[h.value.startdate]).add(Y,"days").format("YYYY-MM-DD HH:mm:ss"),t.row[h.value.enddate]=T(t.row[h.value.enddate]).add(Y,"days").format("YYYY-MM-DD HH:mm:ss"),F.value==="月"||F.value==="日")t.row[h.value.takestime]=T(t.row[h.value.enddate]).diff(T(t.row[h.value.startdate]),"days")+1+"天";else if(F.value==="周"){const he=T(t.row[h.value.startdate]).startOf("isoWeek"),Me=T(t.row[h.value.enddate]).startOf("isoWeek");t.row[h.value.takestime]=Me.diff(he,"week")+1+"周"}const De=T(t.row[h.value.startdate]),ve=t.row[h.value.id],be=(he,Me)=>{const we=[];for(const _e of Me)String(_e[R])===String(he)&&(we.push(_e),we.push(...be(_e[h.value.id],Me)));return we},$e=be(ve,v.tasks);if((F.value==="时"?me:Y)>0)for(const he of $e)T(he[h.value.startdate]).isBefore(De)&&(F.value==="时"?(he[h.value.startdate]=T(he[h.value.startdate]).add(me,"hours").format("YYYY-MM-DD HH:mm:ss"),he[h.value.enddate]=T(he[h.value.enddate]).add(me,"hours").format("YYYY-MM-DD HH:mm:ss")):(he[h.value.startdate]=T(he[h.value.startdate]).add(Y,"days").format("YYYY-MM-DD HH:mm:ss"),he[h.value.enddate]=T(he[h.value.enddate]).add(Y,"days").format("YYYY-MM-DD HH:mm:ss")),q({id:he[h.value.id],startDate:he[h.value.startdate],endDate:he[h.value.enddate]}));q({id:t.row[h.value.id],startDate:t.row[h.value.startdate],endDate:t.row[h.value.enddate]})}}}),Oe(A).resizable({edges:{left:!0,right:!0,bottom:!1,top:!1},listeners:{start:E=>{i.value=Number(E.target.getAttribute("data-x")),a.value=Number(E.target.getAttribute("width"))},end:E=>{j(t.row);let M=E.target,ae=E.rect.width,J=Math.round(ae/g.value);J<1&&(J=1),ae=J*g.value;let k=i.value;if(E.edges&&E.edges.left){k=i.value+(a.value-ae),k=Math.round(k/g.value)*g.value,k<0&&(k=0);const be=h.value.parentId||"pid",$e=t.row[be];if($e&&$e!=="0"){const Ce=v.tasks.find(he=>String(he[h.value.id])===String($e));if(Ce){let he=0;if(F.value==="月"||F.value==="日")he=T(Ce[h.value.startdate]).diff(T(t.startGanttDate),"days")*g.value;else if(F.value==="周"){const Me=T(t.startGanttDate).startOf("isoWeek");he=T(Ce[h.value.startdate]).startOf("isoWeek").diff(Me,"week")*g.value}else F.value==="时"&&(he=T(Ce[h.value.startdate]).diff(T(t.startGanttDate),"hours")*g.value);k<he&&(k=he,ae=i.value+a.value-k,J=Math.round(ae/g.value),J<1&&(J=1),ae=J*g.value)}}}M.setAttribute("width",ae.toString()),M.style.width=ae+"px",M.style.transform=`translate(${k}px, 0px)`,M.setAttribute("data-x",k.toString());const R=Math.round(k/g.value),te=R+J-1;let oe,Y;if(F.value==="月"||F.value==="日")oe=T(t.startGanttDate).add(R,"days").format("YYYY-MM-DD HH:mm:ss"),Y=T(t.startGanttDate).add(te,"days").format("YYYY-MM-DD HH:mm:ss"),t.row[h.value.takestime]=J+"天";else if(F.value==="周"){const be=T(t.startGanttDate).startOf("isoWeek");oe=be.add(R,"weeks").format("YYYY-MM-DD HH:mm:ss"),Y=be.add(te,"weeks").endOf("isoWeek").format("YYYY-MM-DD HH:mm:ss"),t.row[h.value.takestime]=J+"周"}else oe=T(t.startGanttDate).add(R,"hours").format("YYYY-MM-DD HH:mm:ss"),Y=T(t.startGanttDate).add(te,"hours").format("YYYY-MM-DD HH:mm:ss"),t.row[h.value.takestime]=J+"小时";t.row[h.value.startdate]=oe,t.row[h.value.enddate]=Y;let me=cn(A),De=me.select(".innerRect").first(),ve=me.select("rect:not(.innerRect):not(.progressHandle)").first();if(De){let be=t.row[h.value.progress]?ae*Number(t.row[h.value.progress]):ae;De.width(be)}if(ve&&ve.width(ae),E.edges&&E.edges.left){const be=T(oe),$e=t.row[h.value.id],Ce=h.value.parentId||"pid",he=(we,_e)=>{const Ue=[];for(const Rt of _e)String(Rt[Ce])===String(we)&&(Ue.push(Rt),Ue.push(...he(Rt[h.value.id],_e)));return Ue},Me=he($e,v.tasks);for(const we of Me)if(T(we[h.value.startdate]).isBefore(be)){const _e=be.diff(T(we[h.value.startdate]),F.value==="时"?"hours":"days");F.value==="时"?(we[h.value.startdate]=T(we[h.value.startdate]).add(_e,"hours").format("YYYY-MM-DD HH:mm:ss"),we[h.value.enddate]=T(we[h.value.enddate]).add(_e,"hours").format("YYYY-MM-DD HH:mm:ss")):(we[h.value.startdate]=T(we[h.value.startdate]).add(_e,"days").format("YYYY-MM-DD HH:mm:ss"),we[h.value.enddate]=T(we[h.value.enddate]).add(_e,"days").format("YYYY-MM-DD HH:mm:ss")),q({id:we[h.value.id],startDate:we[h.value.startdate],endDate:we[h.value.enddate]})}}q({id:t.row[h.value.id],startDate:oe,endDate:Y})}},modifiers:[Oe.modifiers.restrictEdges({outer:"parent"}),Oe.modifiers.restrictSize({min:{width:g.value,height:r.value}})],inertia:!1,hold:1})};return e.watch(()=>[t.row[h.value.startdate],t.row[h.value.enddate]],()=>{o.value&&m.value&&X(o.value)},{deep:!1}),e.onMounted(()=>{if(o.value&&!m.value&&(X(o.value),m.value=!0),S&&(c.value=S(t.row),o.value&&X(o.value)),o.value){let A=o.value.parentElement;for(;A&&!A.hasAttribute("data-gantt-theme");)A=A.parentElement;if(A){const P=new MutationObserver(()=>{y.value++});P.observe(A,{attributes:!0,attributeFilter:["data-gantt-theme","style"]}),e.onBeforeUnmount(()=>P.disconnect())}}}),e.onDeactivated(()=>{if(o.value)try{Oe(o.value).unset()}catch{}l.value=!1}),e.onBeforeUnmount(()=>{if(o.value)try{Oe(o.value).unset()}catch{}l.value=!1}),{bar:o,barHeight:r,direction:s,oldBarDataX:i,oldBarWidth:a,showRow:l,hover:u,barColor:c,timelineCellCount:I,scale:g,mode:F,mapFields:h,hoverActive:V,hoverInactive:C,WeekEndColor:K}}}),dr=["data-task-id"],cr=["height"];function ur(t,n,o,r,s,i){return t.showRow?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["barRow",{active:t.hover}]),style:e.normalizeStyle({height:t.rowHeight+"px"}),onMouseover:n[0]||(n[0]=a=>t.hoverActive()),onMouseleave:n[1]||(n[1]=a=>t.hoverInactive()),"data-task-id":t.row[t.mapFields.id]},[t.showRow?(e.openBlock(),e.createElementBlock("svg",{key:"row.no",ref:"bar",class:e.normalizeClass(["bar",{active:t.hover}]),height:t.barHeight+"px",style:{overflow:"visible"}},null,10,cr)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.timelineCellCount,a=>(e.openBlock(),e.createElementBlock("div",{key:a+t.row.id+t.timelineCellCount+t.showRow+"_template",class:"cell",style:e.normalizeStyle({width:t.scale+"px",minWidth:t.scale+"px",maxWidth:t.scale+"px",height:t.rowHeight+"px",background:t.WeekEndColor(a)})},null,4))),128))],46,dr)):e.createCommentVNode("",!0)}const fr=Se(lr,[["render",ur],["__scopeId","data-v-0692589b"]]);T.extend(Yn);const hr=e.defineComponent({name:"Milestone",props:{rowHeight:{type:Number,default:0},row:{type:Object,default:()=>({})},startGanttDate:{type:String},endGanttDate:{type:String}},setup(t){const n=e.ref(null),o=e.ref(t.rowHeight*.6),r=e.ref(!0),s=e.ref(!1),i=e.ref(""),a=e.ref(0),l=e.ref(0),u=e.computed(()=>v.timelineCellCount),c=e.computed(()=>v.scale),m=e.computed(()=>v.mode),y=e.computed(()=>v.mapFields),w=e.inject(ft.SetBarColorSymbol);e.watch(()=>Ye.highlightedId,S=>{s.value=t.row[y.value.id]===S});const I=()=>Ye.triggerHighlight(t.row[y.value.id]),g=()=>Ye.triggerHighlight(null),F=S=>{a.value;let D="#ffffff",V="#f8f8f8";if(n.value){let C=n.value.parentElement;for(;C;){if(C.hasAttribute("data-gantt-theme")){D=getComputedStyle(C).getPropertyValue("--bg-content").trim()||"#ffffff",V=getComputedStyle(C).getPropertyValue("--bg-secondary").trim()||"#f8f8f8";break}C=C.parentElement}}switch(m.value){case"月":case"日":{let C=T(t.startGanttDate).add(S,"days");return C.isoWeekday()===7||C.isoWeekday()===1?V:D}case"周":case"时":return D}},h=ce.setBarDate,O=S=>{let D=0;switch(m.value){case"月":case"日":{let ne=T(t.row[y.value.startdate]).diff(T(t.startGanttDate),"days");D=c.value*ne+c.value/2,t.row[y.value.takestime]="0天",t.row[y.value.enddate]=t.row[y.value.startdate];break}case"周":{const ne=T(t.startGanttDate).startOf("isoWeek");let re=T(t.row[y.value.startdate]).startOf("isoWeek").diff(ne,"week");D=c.value*re+c.value/2,t.row[y.value.takestime]="0周",t.row[y.value.enddate]=t.row[y.value.startdate];break}case"时":{let ne=T(t.row[y.value.startdate]).diff(T(t.startGanttDate),"hours");D=c.value*ne+c.value/2,t.row[y.value.takestime]="0小时",t.row[y.value.enddate]=t.row[y.value.startdate];break}}l.value=D;let V=cn(S);const C=getComputedStyle(S).getPropertyValue("--border")||"#cecece";S.setAttribute("data-x",D.toString()),S.setAttribute("stroke",C),S.setAttribute("stroke-width","2px"),S.style.transform=`translate(${D}px, 0px)`;let K="#f59e0b",q="#333333",j="#ffffff",X=S.parentElement;for(;X;){if(X.hasAttribute("data-gantt-theme")){const ne=getComputedStyle(X);K=ne.getPropertyValue("--primary").trim()||K,q=ne.getPropertyValue("--text-primary").trim()||q,j=ne.getPropertyValue("--bg-content").trim()||j;break}X=X.parentElement}(j.includes("#1")||j.includes("#2")||j.toLowerCase().includes("dark"))&&q==="#333333"&&(q="#ffffff"),V.clear();const A=o.value,P=A/2,H=t.rowHeight/2,ee=P,ke=ee,p=H-P,d=ee+P,b=H,f=ee,$=H+P,B=ee-P,L=`M ${ke},${p} L ${d},${b} L ${f},${$} L ${B},${H} Z`,Z=V.path(L).fill(i.value||K).stroke({color:C,width:2}).attr("opacity",.9);Z.on("mouseover",()=>{Z.animate(200).attr({opacity:1,strokeWidth:3})}),Z.on("mouseleave",()=>{Z.animate(200).attr({opacity:.9,strokeWidth:2})});const G=V.text(t.row[y.value.task]||"Milestone").move(A+5,H-7).fill(q).attr({"font-size":"14px","font-family":"'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif","font-weight":"400","text-anchor":"start","dominant-baseline":"auto"});j.includes("#1")||j.includes("#2")||j.toLowerCase().includes("dark")?G.attr({stroke:"#000000","stroke-width":"0.5px","paint-order":"stroke fill"}):G.attr({stroke:"#ffffff","stroke-width":"0.5px","paint-order":"stroke fill"}),h({id:t.row[y.value.id],startDate:t.row[y.value.startdate],endDate:t.row[y.value.startdate]}),Oe(S).draggable({inertia:!1,modifiers:[Oe.modifiers.restrictRect({restriction:"parent",endOnly:!0})],autoScroll:!0,listeners:{start:ne=>{l.value=Number(ne.target.getAttribute("data-x"))},move:ne=>{let le=((parseFloat(ne.target.getAttribute("data-x")||"0")||0)+ne.dx).toString();ne.target.style.transform=`translate(${le}px, 0px)`,ne.target.setAttribute("data-x",le)},end:ne=>{let le=ne.target,re=parseFloat(le.getAttribute("data-x")||"0")||0,E=Math.round((re-c.value/2)/c.value)*c.value+c.value/2;E<c.value/2&&(E=c.value/2),E>u.value*c.value&&(E=u.value*c.value-c.value/2);const M=y.value.parentId||"pid",ae=t.row[M];if(ae&&ae!=="0"){const te=v.tasks.find(oe=>String(oe[y.value.id])===String(ae));if(te){let oe=0;if(m.value==="月"||m.value==="日")oe=T(te[y.value.startdate]).diff(T(t.startGanttDate),"days")*c.value+c.value/2;else if(m.value==="周"){const Y=T(t.startGanttDate).startOf("isoWeek");oe=T(te[y.value.startdate]).startOf("isoWeek").diff(Y,"week")*c.value+c.value/2}else m.value==="时"&&(oe=T(te[y.value.startdate]).diff(T(t.startGanttDate),"hours")*c.value+c.value/2);E<oe&&(E=oe)}}le.style.transform=`translate(${E}px, 0px)`,le.setAttribute("data-x",E.toString());const J=Math.round((E-l.value)/c.value);let k=0,R=0;m.value==="月"||m.value==="日"?k=J:m.value==="周"?k=J*7:m.value==="时"&&(R=J),m.value==="时"?(t.row[y.value.startdate]=T(t.row[y.value.startdate]).add(R,"hours").format("YYYY-MM-DD HH:mm:ss"),t.row[y.value.enddate]=t.row[y.value.startdate]):(t.row[y.value.startdate]=T(t.row[y.value.startdate]).add(k,"days").format("YYYY-MM-DD HH:mm:ss"),t.row[y.value.enddate]=t.row[y.value.startdate]),h({id:t.row[y.value.id],startDate:t.row[y.value.startdate],endDate:t.row[y.value.startdate]})}}})};return e.watch(()=>[t.row[y.value.startdate]],()=>{n.value&&O(n.value)},{deep:!1}),e.onMounted(()=>{if(n.value&&O(n.value),w&&(i.value=w(t.row),n.value&&O(n.value)),n.value){let S=n.value.parentElement;for(;S&&!S.hasAttribute("data-gantt-theme");)S=S.parentElement;if(S){const D=new MutationObserver(()=>{a.value++});D.observe(S,{attributes:!0,attributeFilter:["data-gantt-theme","style"]}),e.onBeforeUnmount(()=>D.disconnect())}}}),e.onBeforeUnmount(()=>{if(n.value)try{Oe(n.value).unset()}catch{}r.value=!1}),{milestone:n,showRow:r,hover:s,milestoneColor:i,timelineCellCount:u,scale:c,mode:m,mapFields:y,hoverActive:I,hoverInactive:g,WeekEndColor:F}}}),mr=["data-task-id"],pr=["height","width"];function gr(t,n,o,r,s,i){return t.showRow?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["milestoneRow",{active:t.hover}]),style:e.normalizeStyle({height:t.rowHeight+"px"}),onMouseover:n[0]||(n[0]=a=>t.hoverActive()),onMouseleave:n[1]||(n[1]=a=>t.hoverInactive()),"data-task-id":t.row[t.mapFields.id]},[t.showRow?(e.openBlock(),e.createElementBlock("svg",{key:"milestone",ref:"milestone",class:e.normalizeClass(["milestone",{active:t.hover}]),height:t.rowHeight+"px",width:t.rowHeight*.6+200+"px",style:{overflow:"visible"}},null,10,pr)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.timelineCellCount,a=>(e.openBlock(),e.createElementBlock("div",{key:a+t.row.id+"_milestone_template",class:"cell",style:e.normalizeStyle({width:t.scale+"px",minWidth:t.scale+"px",maxWidth:t.scale+"px",height:t.rowHeight+"px",background:t.WeekEndColor(a)})},null,4))),128))],46,mr)):e.createCommentVNode("",!0)}const yr=Se(hr,[["render",gr],["__scopeId","data-v-b49d46f1"]]),kr=e.defineComponent({name:"BarRecursionRow",props:{rowHeight:{type:Number,default:0}},setup(){const t=e.ref([]),n=e.ref(0),o=e.inject(ft.SetTaskTypeSymbol),r=e.computed(()=>v.tasks),s=e.computed(()=>v.timelineCellCount),i=e.computed(()=>v.scale),a=e.computed(()=>v.mode),l=e.computed(()=>v.startGanttDate?v.startGanttDate.toISOString():void 0),u=e.computed(()=>v.endGanttDate?v.endGanttDate.toISOString():void 0),c=e.computed(()=>v.mapFields),m=e.computed(()=>v.collapsedTasks),y=S=>{if(o)return o(S);if(S.type)return S.type;const D=S[c.value.startdate],V=S[c.value.enddate];return D&&V&&D===V?wt.MILESTONE:wt.TASK},w=S=>{const D=new Set,V=C=>{r.value.filter(q=>q[c.value.parentId]===C).forEach(q=>{const j=q[c.value.id];D.add(j),V(j)})};return V(S),D},I=e.computed(()=>new Set(t.value.map(S=>S[c.value.id]))),g=e.computed(()=>{const S=I.value,D=v.tasks.filter(C=>!S.has(C[c.value.id])),V=new Set;return m.value.forEach(C=>{w(C).forEach(q=>V.add(q))}),D.filter(C=>!V.has(C[c.value.id]))}),F=e.computed({get:()=>v.expandRow,set:S=>{ce.setExpandRow(S)}});e.watch(F,S=>{t.value=[],h(S.pid)});const h=S=>{let D=r.value.filter(V=>V[c.value.parentId]===S);if(D&&D.length>0)for(let V=0;V<D.length;V++)F.value.expand===!1&&t.value.push(D[V]),h(D[V][c.value.id])},O=ce.setExpandRow;return{hiddenTask:t,componentKey:n,allTask:r,timelineCellCount:s,scale:i,mode:a,startGanttDate:l,endGanttDate:u,mapFields:c,filterTask:g,expandRow:F,setExpandRow:O,recursionRow:h,getTaskType:y,TaskType:wt}},components:{Bar:fr,Milestone:yr},mounted(){this.$nextTick(()=>{})},activated(){this.componentKey++}});function br(t,n,o,r,s,i){const a=e.resolveComponent("Milestone"),l=e.resolveComponent("Bar");return e.openBlock(),e.createElementBlock("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.filterTask,u=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u.id},[t.getTaskType(u)===t.TaskType.MILESTONE?(e.openBlock(),e.createBlock(a,{key:0,startGanttDate:t.startGanttDate,endGanttDate:t.endGanttDate,row:u,rowHeight:t.rowHeight},null,8,["startGanttDate","endGanttDate","row","rowHeight"])):(e.openBlock(),e.createBlock(l,{key:1,startGanttDate:t.startGanttDate,endGanttDate:t.endGanttDate,row:u,rowHeight:t.rowHeight},null,8,["startGanttDate","endGanttDate","row","rowHeight"]))],64))),128))])}const wr=Se(kr,[["render",br]]),Cr=e.defineComponent({name:"TaskLinks",props:{containerWidth:{type:Number,required:!0},containerHeight:{type:Number,required:!0},linkConfig:{type:Object,default:()=>({color:"#3498db",width:2,dashArray:void 0,showArrow:!0,arrowColor:void 0,arrowSize:8,showLabels:!1,labelColor:"#666",labelFontSize:12,cornerRadius:5,pathType:Ve.BEZIER,bezierCurvature:.4,rightAngleOffset:30,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:.8,parentChildStyle:{color:"#95a5a6",width:1,dashArray:"3,3"}})}},setup(t){const n=e.ref([]),o=p=>{if(!v.tasks.find(ne=>ne[v.mapFields.id]===p))return null;const b=document.querySelector(`[data-task-id="${p}"]`);if(!b)return null;let f=b.querySelector(".bar"),$=!1;if(f||(f=b.querySelector(".milestone"),$=!0),!f)return null;const B=b.closest(".table .content");if(!B)return null;const _=parseFloat(f.getAttribute("data-x")||"0");let L;$?L=b.getBoundingClientRect().height*.6:L=f.width.baseVal.value;const Z=b.getBoundingClientRect(),G=B.getBoundingClientRect(),W=Z.top-G.top;if($){const ne=L/2;return{x:_,y:W,width:L,height:Z.height,centerX:_+ne,centerY:W+Z.height/2,rightX:_+L,leftX:_,topY:W,bottomY:W+Z.height}}else return{x:_,y:W,width:L,height:Z.height,centerX:_+L/2,centerY:W+Z.height/2,rightX:_+L,leftX:_,topY:W,bottomY:W+Z.height}},r=(p,d)=>v.tasks.filter(f=>f[v.mapFields.parentId]===p&&f[v.mapFields.parentId]!=="0").findIndex(f=>f[v.mapFields.id]===d),s=()=>{const p=document.querySelector(".barRow");return p?p.offsetHeight:50},i=p=>{const d=s();return Math.floor(p/d)*d+d/2},a=(p,d)=>{const b=s();return(Math.floor(p/b)+1+d)*b+b/2},l=(p,d,b)=>{const f=s(),B=Math.floor(p/f)*f+f+b;return d>B+f?i(B+f/2):i(B)},u=p=>{const d=t.linkConfig.linkTypeColors;if(!d)return{[de.FINISH_TO_START]:"#3498db",[de.START_TO_START]:"#2ecc71",[de.FINISH_TO_FINISH]:"#e74c3c",[de.START_TO_FINISH]:"#f39c12",[de.PARENT_CHILD]:"#95a5a6"}[p]||t.linkConfig.color;switch(p){case de.FINISH_TO_START:return d.finishToStart||"#3498db";case de.START_TO_START:return d.startToStart||"#2ecc71";case de.FINISH_TO_FINISH:return d.finishToFinish||"#e74c3c";case de.START_TO_FINISH:return d.startToFinish||"#f39c12";default:return t.linkConfig.color}},c=p=>p===de.PARENT_CHILD?{color:t.linkConfig.parentChildStyle.color||"#95a5a6",width:t.linkConfig.parentChildStyle.width,dashArray:t.linkConfig.parentChildStyle.dashArray}:{color:u(p),width:t.linkConfig.width,dashArray:t.linkConfig.dashArray},m=(p,d,b,f="")=>{if(!p||!d)return"";const{pathType:$}=t.linkConfig;switch(b){case de.PARENT_CHILD:return y(p,d,$);case de.FINISH_TO_START:return F(p,d,$);case de.START_TO_START:return h(p,d,$);case de.FINISH_TO_FINISH:return O(p,d,$);case de.START_TO_FINISH:return S(p,d,$);default:return F(p,d,$)}},y=(p,d,b,f)=>{const $=p.id||p.taskId,B=d.id||d.taskId,_=r($,B),L=p.leftX,Z=p.centerY,G=t.linkConfig.arrowSize||8,W=d.leftX-G,ne=d.centerY;return w(L,Z,W,ne,_,b)},w=(p,d,b,f,$,B)=>{const _=b-p,L=f-d;if(Math.abs(_)<30&&Math.abs(L)<15)return`M ${p} ${d} L ${b} ${f}`;switch(B){case Ve.STRAIGHT:return`M ${p} ${d} L ${b} ${f}`;case Ve.BEZIER:return I(p,d,b,f);case Ve.RIGHT_ANGLE:default:return g(p,d,b,f,$)}},I=(p,d,b,f,$)=>{const B=b-p,{bezierCurvature:_}=t.linkConfig;if(B>0){const L=Math.min(Math.abs(B)*_,60),Z=p+L,G=b-L;return`M ${p} ${d} C ${Z} ${d} ${G} ${f} ${b} ${f}`}else{const L=t.linkConfig.rightAngleOffset,Z=l(d,f,L),G=L*_;return`M ${p} ${d}
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
L ${G} ${d}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Q ${le} ${W} ${le} ${W+re}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
L ${
|
|
21
|
-
|
|
22
|
-
L ${
|
|
23
|
-
|
|
24
|
-
L ${
|
|
25
|
-
L ${
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
L ${
|
|
49
|
-
Q ${
|
|
50
|
-
L ${
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
L ${
|
|
59
|
-
|
|
60
|
-
L ${
|
|
61
|
-
L ${
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
L ${
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
L ${E-M} ${
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
L ${b} ${f}`}return`M ${p} ${d} L ${E} ${d} L ${E} ${f} L ${b} ${f}`;default:return`M ${p} ${d} L ${b} ${f}`}},K=(p,d,b=de.FINISH_TO_START)=>{if(!p)return console.warn("子任务位置无效"),"";try{const f=p.leftX,$=p.centerY,B=f-d,_=$-d/2,L=$+d/2;return`${f},${$} ${B},${_} ${B},${L}`}catch(f){return console.error("箭头生成失败:",f),""}},q=(p,d,b,f)=>{if(!p||!d)return"";try{let $,B,_="right";switch(b){case de.FINISH_TO_START:$=d.leftX,B=d.centerY,_="right";break;case de.START_TO_START:$=d.leftX,B=d.centerY,_="right";break;case de.FINISH_TO_FINISH:$=d.rightX,B=d.centerY,_="left";break;case de.START_TO_FINISH:$=d.rightX,B=d.centerY,_="left";break;default:$=d.leftX,B=d.centerY,_="right"}let L,Z,G,W;return _==="right"?(L=$-f,Z=B-f/2,G=$-f,W=B+f/2):(L=$+f,Z=B-f/2,G=$+f,W=B+f/2),`${$},${B} ${L},${Z} ${G},${W}`}catch($){return console.error("依赖箭头生成失败:",$),""}},j=p=>{const d=new Set,b=f=>{v.tasks.filter(B=>B[v.mapFields.parentId]===f).forEach(B=>{const _=B[v.mapFields.id];d.add(_),b(_)})};return b(p),d},X=p=>{for(const d of v.collapsedTasks)if(j(d).has(p))return!0;return!1},A=()=>{const p=[],d=t.linkConfig.linkTypeVisibility||{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0};d.parentChild&&v.tasks.forEach($=>{const B=$[v.mapFields.parentId],_=$[v.mapFields.id];if(B&&B!=="0"){if(X(_))return;const L=o(B),Z=o(_);if(L&&Z){const G=`parent-child-${B}-${_}`,W={...L,id:B,taskId:B},ne={...Z,id:_,taskId:_},le=m(W,ne,de.PARENT_CHILD,G),re=t.linkConfig.showArrow?K(Z,t.linkConfig.arrowSize,de.PARENT_CHILD):"";p.push({id:G,sourceId:B,targetId:_,type:de.PARENT_CHILD,path:le,arrowPoints:re,labelX:Z.centerX,labelY:Z.centerY-10})}}});const b=Kt.getDependencies(),f=$=>{if(typeof $=="number")switch($){case 0:return d.finishToStart;case 1:return d.startToStart;case 2:return d.finishToFinish;case 3:return d.startToFinish;default:return!0}switch($){case de.FINISH_TO_START:return d.finishToStart;case de.START_TO_START:return d.startToStart;case de.FINISH_TO_FINISH:return d.finishToFinish;case de.START_TO_FINISH:return d.startToFinish;case de.PARENT_CHILD:return d.parentChild;default:return!0}};b.forEach($=>{if(!f($.type))return;const B=o($.sourceTaskId),_=o($.targetTaskId);if(B&&_){const L=`dependency-${$.id}`,Z={...B,id:$.sourceTaskId,taskId:$.sourceTaskId},G={..._,id:$.targetTaskId,taskId:$.targetTaskId},W=m(Z,G,$.type,L),ne=t.linkConfig.showArrow?q(Z,G,$.type,t.linkConfig.arrowSize):"",le={[de.FINISH_TO_START]:"FS",[de.START_TO_START]:"SS",[de.FINISH_TO_FINISH]:"FF",[de.START_TO_FINISH]:"SF",[de.PARENT_CHILD]:""};p.push({id:L,sourceId:$.sourceTaskId,targetId:$.targetTaskId,type:$.type,path:W,arrowPoints:ne,label:le[$.type]||"",labelX:(B.centerX+_.centerX)/2,labelY:(B.centerY+_.centerY)/2-10})}}),n.value=p};e.watch(()=>v.tasks,()=>{setTimeout(A,50)},{deep:!0}),e.watch(()=>v.scale,()=>{setTimeout(A,50)}),e.watch(()=>v.mode,()=>{setTimeout(A,200)}),e.watch(()=>v.timelineCellCount,()=>{setTimeout(A,100)}),e.watch(()=>[v.startGanttDate,v.endGanttDate],()=>{setTimeout(A,100)}),e.watch(()=>v.barDate,()=>{requestAnimationFrame(A)},{deep:!0}),e.watch(()=>t.linkConfig.linkTypeVisibility,()=>{setTimeout(A,50)},{deep:!0}),e.watch(()=>v.collapsedTasks,()=>{setTimeout(A,50)},{deep:!0});let P=null,H=null;e.onMounted(()=>{setTimeout(A,100);const p=document.querySelector(".gantt");p&&(P=new ResizeObserver(A),P.observe(p),H=new MutationObserver(d=>{let b=!1;d.forEach(f=>{var B,_;const $=f.target;if(f.type==="attributes"){const L=f.attributeName;(L==="data-x"||L==="width"||L==="style"||L==="transform")&&((B=$.classList)!=null&&B.contains("bar")||(_=$.classList)!=null&&_.contains("barRow")||$.tagName==="svg")&&(b=!0)}}),b&&requestAnimationFrame(A)}),H.observe(p,{attributes:!0,subtree:!0,attributeFilter:["style","data-x","transform","width"]}))}),e.onUnmounted(()=>{P&&P.disconnect(),H&&H.disconnect()});const ee=p=>{const d=c(p);return!!(d.dashArray&&d.dashArray.length>0)};return{links:n,updateLinks:A,getLinkStyle:c,isDashedLine:ee,getDashAnimationStyle:p=>{if(!ee(p.type)||!t.linkConfig.enableDashAnimation)return{};const d=c(p.type),b=t.linkConfig.dashAnimationSpeed||.8,f=p.type===de.PARENT_CHILD?b*.6:b,_=(d.dashArray||"5,5").split(",").map(Number).reduce((L,Z)=>L+Z,0);return{"--animation-duration":`${f}s`,"--dash-length":`${_}px`}}}}}),Sr=["width","height"],Tr=["d","stroke","stroke-width","stroke-dasharray"],vr=["points","fill","stroke"],$r=["x","y","fill","font-size"];function Dr(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("svg",{class:"task-links-layer",width:t.containerWidth,height:t.containerHeight,style:{position:"absolute",top:"0px",left:"0px",pointerEvents:"none",zIndex:50,overflow:"visible"}},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.links,a=>(e.openBlock(),e.createElementBlock("g",{key:a.id},[e.createElementVNode("path",{d:a.path,stroke:t.getLinkStyle(a.type).color,"stroke-width":t.getLinkStyle(a.type).width,"stroke-dasharray":t.getLinkStyle(a.type).dashArray,fill:"none",class:e.normalizeClass(["task-link",a.type,{"dash-animated":t.isDashedLine(a.type)&&t.linkConfig.enableDashAnimation}]),style:e.normalizeStyle(t.getDashAnimationStyle(a))},null,14,Tr),t.linkConfig.showArrow&&a.arrowPoints&&a.arrowPoints.length>0?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:a.arrowPoints,fill:t.getLinkStyle(a.type).color,stroke:t.getLinkStyle(a.type).color,"stroke-width":.5,class:"task-link-arrow"},null,8,vr)):e.createCommentVNode("",!0),a.label&&t.linkConfig.showLabels?(e.openBlock(),e.createElementBlock("text",{key:1,x:a.labelX,y:a.labelY,fill:t.linkConfig.labelColor,"font-size":t.linkConfig.labelFontSize,"text-anchor":"middle",class:"task-link-label"},e.toDisplayString(a.label),9,$r)):e.createCommentVNode("",!0)]))),128))],8,Sr)}const Er=Se(Cr,[["render",Dr],["__scopeId","data-v-dc9db723"]]),Mr=e.defineComponent({props:{rowHeight:{type:Number,required:!0},headers:{type:Array,default:()=>[]}},components:{BarRecursionRow:wr,TaskLinks:Er},setup(t){const n=e.ref(null),{scrollTop:o,scrollFlag:r,setScrollTop:s,setScrollFlag:i}=Hn(),{config:a}=Ct(),l=e.computed(()=>v.tasks),u=e.computed(()=>v.timelineCellCount),c=e.computed(()=>v.scale),m=e.computed(()=>v.mode),y=e.computed(()=>v.startGanttDate),w=e.computed(()=>v.endGanttDate),I=e.computed(()=>v.mapFields),g=e.computed(()=>u.value*c.value),F=e.computed(()=>l.value.length*t.rowHeight);e.watch(o,j=>{r.value&&n.value&&(n.value.scrollTop=j)}),e.onMounted(()=>{n.value&&(n.value.scrollTop=o.value)});const h=()=>l.value.filter(j=>j[I.value.parentId]==="0");let O=null;const S=()=>{O&&cancelAnimationFrame(O),O=requestAnimationFrame(()=>{n.value&&(i(!1),s(n.value.scrollTop)),O=null})},D=()=>{},V=e.ref(!1),C=e.ref(0);return{barContent:n,scrollFlag:r,tasks:l,timelineCellCount:u,scale:c,mode:m,startGanttDate:y,endGanttDate:w,mapFields:I,getRootNode:h,scroll:S,mouseover:D,setScrollFlag:i,containerWidth:g,containerHeight:F,linkConfig:a,showGuideLine:V,guideLineX:C,handleMouseMove:j=>{if(!n.value)return;const X=n.value.getBoundingClientRect(),A=j.clientX-X.left+n.value.scrollLeft,P=c.value,ee=Math.floor(A/P)*P+P/2;C.value=ee,V.value=!0},handleMouseLeave:()=>{V.value=!1}}}});function Vr(t,n,o,r,s,i){const a=e.resolveComponent("BarRecursionRow"),l=e.resolveComponent("TaskLinks");return t.tasks?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"barContent",onScroll:n[0]||(n[0]=u=>t.scroll()),onMousemove:n[1]||(n[1]=(...u)=>t.handleMouseMove&&t.handleMouseMove(...u)),onMouseleave:n[2]||(n[2]=(...u)=>t.handleMouseLeave&&t.handleMouseLeave(...u)),class:"content"},[e.createElementVNode("div",{class:"content-inner",style:e.normalizeStyle({minHeight:t.containerHeight+"px",position:"relative"})},[t.showGuideLine?(e.openBlock(),e.createElementBlock("div",{key:0,class:"column-guide-line",style:e.normalizeStyle({left:t.guideLineX+"px",height:t.containerHeight+"px"})},null,4)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(a,{key:`${t.mode}-${t.scale}-${t.timelineCellCount}`,rowHeight:t.rowHeight,tasks:t.tasks},null,8,["rowHeight","tasks"])),e.createVNode(l,{containerWidth:t.containerWidth,containerHeight:t.containerHeight,linkConfig:t.linkConfig},null,8,["containerWidth","containerHeight","linkConfig"])],4)],544)):e.createCommentVNode("",!0)}const Nr=Se(Mr,[["render",Vr],["__scopeId","data-v-51968539"]]),_r=e.defineComponent({props:{headersHeight:{type:Number,default:50},rowHeight:{type:Number,default:50}},components:{TimelineHeader:ar,TableContent:Nr},setup(t){const n=e.ref(null),o=e.computed(()=>v.dayHeaders),r=e.computed(()=>v.weekHeaders),s=e.computed(()=>v.monthHeaders),i=e.computed(()=>v.hourHeaders),a=e.computed(()=>v.startGanttDate),l=e.computed(()=>v.mode),u=e.computed(()=>v.scale);v.timelineCellCount*u.value+100,v.tasks.length*t.rowHeight+100;const c=()=>{if(n.value)switch(l.value){case"月":case"日":n.value.scrollLeft=Number(T().diff(T(a.value),"day"))*Number(u.value);break;case"周":const m=T().startOf("isoWeek"),y=T(a.value).startOf("isoWeek");n.value.scrollLeft=Number(m.diff(y,"week"))*Number(u.value);break;case"时":n.value.scrollLeft=Number(T().diff(T(a.value),"hour"))*Number(u.value);break}};return e.watch(()=>Ye.shouldScrollToToday,m=>{m&&(c(),Ye.shouldScrollToToday=!1)}),e.onMounted(()=>{}),{tableBar:n,dayHeaders:o,weekHeaders:r,monthHeaders:s,hourHeaders:i,startGanttDate:a,mode:l,scale:u,scrollToToday:c}}}),Ar={ref:"tableBar",class:"table"};function Br(t,n,o,r,s,i){const a=e.resolveComponent("TimelineHeader"),l=e.resolveComponent("TableContent");return e.openBlock(),e.createElementBlock("div",Ar,[e.createElementVNode("div",{class:"header",style:e.normalizeStyle({height:`${t.headersHeight}px`,width:"fit-content"})},[e.createVNode(a,{weekHeaders:t.weekHeaders,hourHeaders:t.hourHeaders,dayHeaders:t.dayHeaders,monthHeaders:t.monthHeaders},null,8,["weekHeaders","hourHeaders","dayHeaders","monthHeaders"])],4),e.createElementVNode("div",{class:"content",style:e.normalizeStyle({height:`calc(100% - ${t.headersHeight}px)`,width:"fit-content",position:"relative"})},[e.createVNode(l,{rowHeight:t.rowHeight},null,8,["rowHeight"])],4)],512)}const Lr=Se(_r,[["render",Br],["__scopeId","data-v-7529d6fb"]]),Fr=e.defineComponent({name:"SliderInput",props:{modelValue:{type:Number,required:!0},min:{type:Number,required:!0},max:{type:Number,required:!0},step:{type:Number,default:1},labelStep:{type:Number,default:void 0},showLabels:{type:Boolean,default:!0}},emits:["update:modelValue","change"],setup(t,{emit:n}){const o=s=>{const i=parseFloat(s.target.value);n("update:modelValue",i)},r=e.computed(()=>{const s=[],i=t.labelStep||t.step;for(let a=t.min;a<=t.max;a=Math.round((a+t.step)*100)/100){const l=Math.abs(a-t.min)<.001||Math.abs(a-t.max)<.001||Math.abs((a-t.min)%i)<.001;s.push({value:a,isMajor:l,showLabel:t.showLabels&&l})}return s});return{handleInput:o,ticks:r}}}),Ir=["value","min","max","step"],Hr={class:"slider-ticks"},Rr={key:0,class:"tick-label"};function zr(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",{class:"slider-wrapper",onMousedown:n[2]||(n[2]=e.withModifiers(()=>{},["stop"])),onPointerdown:n[3]||(n[3]=e.withModifiers(()=>{},["stop"])),onTouchstart:n[4]||(n[4]=e.withModifiers(()=>{},["stop"])),onClick:n[5]||(n[5]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("input",{type:"range",value:t.modelValue,onInput:n[0]||(n[0]=(...a)=>t.handleInput&&t.handleInput(...a)),onChange:n[1]||(n[1]=a=>t.$emit("change")),min:t.min,max:t.max,step:t.step,class:"range-input"},null,40,Ir),e.createElementVNode("div",Hr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.ticks,a=>(e.openBlock(),e.createElementBlock("span",{key:a.value,class:e.normalizeClass(["tick",{major:a.isMajor}])},[n[6]||(n[6]=e.createElementVNode("span",{class:"tick-mark"},null,-1)),a.showLabel?(e.openBlock(),e.createElementBlock("span",Rr,e.toDisplayString(a.value),1)):e.createCommentVNode("",!0)],2))),128))])],32)}const Yr=Se(Fr,[["render",zr],["__scopeId","data-v-9731dbaf"]]),Or=e.defineComponent({name:"ConfigSection",props:{title:{type:String,required:!0},icon:{type:String,default:""}}}),Pr={class:"config-section"},xr={class:"section-title"},Zr={key:0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},Gr={key:1,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},Wr={key:2,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"};function jr(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",Pr,[e.createElementVNode("h4",xr,[e.renderSlot(t.$slots,"icon",{},()=>[t.icon==="language"?(e.openBlock(),e.createElementBlock("svg",Zr,n[0]||(n[0]=[e.createElementVNode("path",{d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"},null,-1)]))):t.icon==="theme"?(e.openBlock(),e.createElementBlock("svg",Gr,n[1]||(n[1]=[e.createElementVNode("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"},null,-1)]))):t.icon==="link"?(e.openBlock(),e.createElementBlock("svg",Wr,n[2]||(n[2]=[e.createElementVNode("path",{d:"M6 9l6 6 6-6"},null,-1),e.createElementVNode("circle",{cx:"4",cy:"9",r:"2"},null,-1),e.createElementVNode("circle",{cx:"20",cy:"9",r:"2"},null,-1),e.createElementVNode("path",{d:"M10 9h4"},null,-1)]))):e.createCommentVNode("",!0)],!0),e.createTextVNode(" "+e.toDisplayString(t.title),1)]),e.renderSlot(t.$slots,"default",{},void 0,!0)])}const Ur=Se(Or,[["render",jr],["__scopeId","data-v-b5157353"]]),qr=e.defineComponent({name:"PathTypeSelector",props:{modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(){const{t}=ze();return{pathTypes:e.computed(()=>[{value:Ve.STRAIGHT,name:t("configPanel.linkConfig.straight"),preview:"M 10 20 L 50 20"},{value:Ve.BEZIER,name:t("configPanel.linkConfig.bezier"),preview:"M 10 25 Q 30 5 50 25"},{value:Ve.RIGHT_ANGLE,name:t("configPanel.linkConfig.rightAngle"),preview:"M 10 15 L 25 15 L 25 25 L 50 25"}])}}}),Jr={class:"path-type-grid"},Kr=["onClick"],Qr={width:"60",height:"35",viewBox:"0 0 60 40"},Xr={key:0,cx:"10",cy:"20",r:"2.5",fill:"currentColor"},es={key:1,cx:"10",cy:"25",r:"2.5",fill:"currentColor"},ts={key:2,cx:"10",cy:"15",r:"2.5",fill:"currentColor"},ns=["d"],os={key:3,d:"M 50 20 L 46 17 M 50 20 L 46 23",stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},as={key:4,d:"M 50 25 L 46 22 M 50 25 L 46 28",stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},rs={key:5,d:"M 50 25 L 46 22 M 50 25 L 46 28",stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},ss={class:"path-name"};function is(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",Jr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pathTypes,a=>(e.openBlock(),e.createElementBlock("div",{key:a.value,class:e.normalizeClass(["path-type-card",{active:t.modelValue===a.value}]),onClick:l=>t.$emit("update:modelValue",a.value)},[(e.openBlock(),e.createElementBlock("svg",Qr,[a.value==="straight"?(e.openBlock(),e.createElementBlock("circle",Xr)):e.createCommentVNode("",!0),a.value==="bezier"?(e.openBlock(),e.createElementBlock("circle",es)):e.createCommentVNode("",!0),a.value==="right-angle"?(e.openBlock(),e.createElementBlock("circle",ts)):e.createCommentVNode("",!0),e.createElementVNode("path",{d:a.preview,stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},null,8,ns),a.value==="straight"?(e.openBlock(),e.createElementBlock("path",os)):e.createCommentVNode("",!0),a.value==="bezier"?(e.openBlock(),e.createElementBlock("path",as)):e.createCommentVNode("",!0),a.value==="right-angle"?(e.openBlock(),e.createElementBlock("path",rs)):e.createCommentVNode("",!0)])),e.createElementVNode("span",ss,e.toDisplayString(a.name),1)],10,Kr))),128))])}const ls=Se(qr,[["render",is],["__scopeId","data-v-34d8d0fd"]]),ds=e.defineComponent({name:"LinkTypeColorConfig",props:{colors:{type:Object,required:!0}},emits:["update:colors","change"],setup(t,{emit:n}){const{t:o}=ze();return{t:o,updateColor:(s,i)=>{const a=i.target,l={...t.colors,[s]:a.value};n("update:colors",l),n("change")}}}}),cs={class:"link-type-colors"},us={class:"color-item"},fs={class:"color-preview"},hs={width:"20",height:"10",viewBox:"0 0 20 10"},ms=["stroke"],ps=["fill"],gs={class:"color-label"},ys={class:"color-desc"},ks=["value"],bs={class:"color-item"},ws={class:"color-preview"},Cs={width:"20",height:"10",viewBox:"0 0 20 10"},Ss=["stroke"],Ts=["fill"],vs={class:"color-label"},$s={class:"color-desc"},Ds=["value"],Es={class:"color-item"},Ms={class:"color-preview"},Vs={width:"20",height:"10",viewBox:"0 0 20 10"},Ns=["stroke"],_s=["fill"],As={class:"color-label"},Bs={class:"color-desc"},Ls=["value"],Fs={class:"color-item"},Is={class:"color-preview"},Hs={width:"20",height:"10",viewBox:"0 0 20 10"},Rs=["stroke"],zs=["fill"],Ys={class:"color-label"},Os={class:"color-desc"},Ps=["value"];function xs(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",cs,[e.createElementVNode("div",us,[e.createElementVNode("div",fs,[(e.openBlock(),e.createElementBlock("svg",hs,[e.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:t.colors.finishToStart,"stroke-width":"2"},null,8,ms),e.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:t.colors.finishToStart},null,8,ps)]))]),e.createElementVNode("span",gs,e.toDisplayString(t.t("link.fs")),1),e.createElementVNode("span",ys,e.toDisplayString(t.t("link.finishToStart")),1),e.createElementVNode("input",{type:"color",value:t.colors.finishToStart,onInput:n[0]||(n[0]=a=>t.updateColor("finishToStart",a)),class:"color-input-small"},null,40,ks)]),e.createElementVNode("div",bs,[e.createElementVNode("div",ws,[(e.openBlock(),e.createElementBlock("svg",Cs,[e.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:t.colors.startToStart,"stroke-width":"2"},null,8,Ss),e.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:t.colors.startToStart},null,8,Ts)]))]),e.createElementVNode("span",vs,e.toDisplayString(t.t("link.ss")),1),e.createElementVNode("span",$s,e.toDisplayString(t.t("link.startToStart")),1),e.createElementVNode("input",{type:"color",value:t.colors.startToStart,onInput:n[1]||(n[1]=a=>t.updateColor("startToStart",a)),class:"color-input-small"},null,40,Ds)]),e.createElementVNode("div",Es,[e.createElementVNode("div",Ms,[(e.openBlock(),e.createElementBlock("svg",Vs,[e.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:t.colors.finishToFinish,"stroke-width":"2"},null,8,Ns),e.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:t.colors.finishToFinish},null,8,_s)]))]),e.createElementVNode("span",As,e.toDisplayString(t.t("link.ff")),1),e.createElementVNode("span",Bs,e.toDisplayString(t.t("link.finishToFinish")),1),e.createElementVNode("input",{type:"color",value:t.colors.finishToFinish,onInput:n[2]||(n[2]=a=>t.updateColor("finishToFinish",a)),class:"color-input-small"},null,40,Ls)]),e.createElementVNode("div",Fs,[e.createElementVNode("div",Is,[(e.openBlock(),e.createElementBlock("svg",Hs,[e.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:t.colors.startToFinish,"stroke-width":"2"},null,8,Rs),e.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:t.colors.startToFinish},null,8,zs)]))]),e.createElementVNode("span",Ys,e.toDisplayString(t.t("link.sf")),1),e.createElementVNode("span",Os,e.toDisplayString(t.t("link.startToFinish")),1),e.createElementVNode("input",{type:"color",value:t.colors.startToFinish,onInput:n[3]||(n[3]=a=>t.updateColor("startToFinish",a)),class:"color-input-small"},null,40,Ps)])])}const Zs=Se(ds,[["render",xs],["__scopeId","data-v-53d6a965"]]),Gs=e.defineComponent({name:"ThemeSelector",props:{modelValue:{type:String,required:!0},themes:{type:Array,required:!0}},emits:["update:modelValue"],setup(){const{t}=ze();return{t}}}),Ws={class:"theme-grid"},js=["onClick"],Us={class:"theme-info"},qs={class:"theme-name"},Js={class:"theme-desc"},Ks={key:0,class:"theme-check"};function Qs(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",Ws,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.themes,a=>(e.openBlock(),e.createElementBlock("div",{key:a.id,class:e.normalizeClass(["theme-card",{active:t.modelValue===a.id}]),onClick:l=>t.$emit("update:modelValue",a.id)},[e.createElementVNode("div",{class:"theme-preview",style:e.normalizeStyle({background:a.preview})},null,4),e.createElementVNode("div",Us,[e.createElementVNode("div",qs,e.toDisplayString(t.t(a.nameKey)),1),e.createElementVNode("div",Js,e.toDisplayString(t.t(a.descKey)),1)]),t.modelValue===a.id?(e.openBlock(),e.createElementBlock("div",Ks,n[0]||(n[0]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})],-1)]))):e.createCommentVNode("",!0)],10,js))),128))])}const Xs=Se(Gs,[["render",Qs],["__scopeId","data-v-a2723aed"]]),ei=e.defineComponent({name:"LanguageSelector",props:{modelValue:{type:String,required:!0},locales:{type:Array,required:!0}},emits:["update:modelValue"]}),ti={class:"language-selector-inline"},ni=["onClick"],oi={class:"lang-label"},ai={key:0,class:"lang-check"};function ri(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",ti,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.locales,a=>(e.openBlock(),e.createElementBlock("div",{key:a.value,class:e.normalizeClass(["language-option",{active:t.modelValue===a.value}]),onClick:l=>t.$emit("update:modelValue",a.value)},[e.createElementVNode("span",oi,e.toDisplayString(a.label),1),t.modelValue===a.value?(e.openBlock(),e.createElementBlock("div",ai,n[0]||(n[0]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})],-1)]))):e.createCommentVNode("",!0)],10,ni))),128))])}const On=Se(ei,[["render",ri],["__scopeId","data-v-359f5b41"]]),si=e.defineComponent({name:"ColorInput",props:{modelValue:{type:String,required:!0},showSync:{type:Boolean,default:!1},syncLabel:{type:String,default:""},syncTitle:{type:String,default:""},inputClass:{type:String,default:""}},emits:["update:modelValue","change","sync"]}),ii=["value"],li=["title"];function di(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["color-input-wrapper",{"with-sync":t.showSync}])},[e.createElementVNode("input",{type:"color",value:t.modelValue,onInput:n[0]||(n[0]=a=>t.$emit("update:modelValue",a.target.value)),onChange:n[1]||(n[1]=a=>t.$emit("change")),class:e.normalizeClass(["color-input",t.inputClass])},null,42,ii),t.showSync?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[2]||(n[2]=a=>t.$emit("sync")),class:"sync-btn",title:t.syncTitle},e.toDisplayString(t.syncLabel),9,li)):e.createCommentVNode("",!0)],2)}const ci=Se(si,[["render",di],["__scopeId","data-v-6e05149c"]]),ui=e.defineComponent({name:"CheckboxConfig",props:{modelValue:{type:Boolean,required:!0},label:{type:String,required:!0}},emits:["update:modelValue","change"]}),fi={class:"config-group"},hi={class:"config-label checkbox-label"},mi=["checked"];function pi(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",fi,[e.createElementVNode("label",hi,[e.createElementVNode("input",{type:"checkbox",checked:t.modelValue,onChange:n[0]||(n[0]=a=>{t.$emit("update:modelValue",a.target.checked),t.$emit("change")})},null,40,mi),e.createTextVNode(" "+e.toDisplayString(t.label),1)])])}const gi=Se(ui,[["render",pi],["__scopeId","data-v-c58f997e"]]),yi=e.defineComponent({name:"GanttConfigPanel",components:{SliderInput:Yr,ConfigSection:Ur,PathTypeSelector:ls,LinkTypeColorConfig:Zs,ThemeSelector:Xs,LanguageSelector:On,ColorInput:ci,CheckboxConfig:gi},setup(){var V,C,K,q,j,X,A,P,H,ee,ke,p;const{t,locale:n,setLocale:o,getLocales:r}=ze(),s=e.ref(!1),i=e.ref(He),a=e.ref("metro"),l=e.ref(null),u=e.computed(()=>n.value),c=e.computed(()=>r()),m=d=>{o(d)},y=e.inject("ganttContainer"),{config:w,updateConfig:I}=Ct(),g=e.ref({pathType:w.pathType||Ve.BEZIER,color:w.color||"#3498db",width:w.width||2,dashArray:w.dashArray,bezierCurvature:w.bezierCurvature||.5,rightAngleOffset:w.rightAngleOffset||40,smoothCorners:w.smoothCorners||!1,cornerRadius:w.cornerRadius||5,showArrow:w.showArrow!==void 0?w.showArrow:!0,arrowSize:w.arrowSize||8,arrowColor:w.arrowColor||"#3498db",enableDashAnimation:w.enableDashAnimation||!1,dashAnimationSpeed:w.dashAnimationSpeed||1,showLabels:w.showLabels||!1,labelColor:w.labelColor||"#333333",labelFontSize:w.labelFontSize||12,parentChildStyle:{color:((V=w.parentChildStyle)==null?void 0:V.color)||"#999999",width:((C=w.parentChildStyle)==null?void 0:C.width)||1.5,dashArray:((K=w.parentChildStyle)==null?void 0:K.dashArray)||"3,3"},linkTypeColors:{finishToStart:((q=w.linkTypeColors)==null?void 0:q.finishToStart)||"#3498db",startToStart:((j=w.linkTypeColors)==null?void 0:j.startToStart)||"#2ecc71",finishToFinish:((X=w.linkTypeColors)==null?void 0:X.finishToFinish)||"#e74c3c",startToFinish:((A=w.linkTypeColors)==null?void 0:A.startToFinish)||"#f39c12"},linkTypeVisibility:{finishToStart:((P=w.linkTypeVisibility)==null?void 0:P.finishToStart)??!0,startToStart:((H=w.linkTypeVisibility)==null?void 0:H.startToStart)??!0,finishToFinish:((ee=w.linkTypeVisibility)==null?void 0:ee.finishToFinish)??!0,startToFinish:((ke=w.linkTypeVisibility)==null?void 0:ke.startToFinish)??!0,parentChild:((p=w.linkTypeVisibility)==null?void 0:p.parentChild)??!0}}),F=()=>{s.value=!s.value,s.value&&setTimeout(()=>{O(a.value)},0)},h=()=>{s.value=!1},O=d=>{if(!l.value)return;const b=Le.getThemeInfo(d);b&&(l.value.setAttribute("data-gantt-theme",d),Object.entries(b.cssVariables).forEach(([f,$])=>{l.value.style.setProperty(f,$)}))},S=d=>{a.value=d,Le.setTheme(d),O(d)},D=()=>{I(g.value)};return e.onMounted(()=>{y!=null&&y.value?Le.setGanttContainer(y.value):console.warn("GanttConfigPanel: ganttContainer not available"),a.value=Le.getCurrentTheme()}),{t,isOpen:s,themes:i,currentTheme:a,linkConfig:g,currentLocale:u,locales:c,togglePanel:F,closePanel:h,selectTheme:S,selectLocale:m,updateLinkConfig:D,configPanelRef:l}}}),ki={class:"config-panel-wrapper"},bi=["title"],wi={class:"btn-content"},Ci={class:"btn-text"},Si=["data-gantt-theme"],Ti=["data-gantt-theme"],vi={class:"panel-header"},$i=["title"],Di={class:"panel-content"},Ei={class:"link-config-content"},Mi={class:"config-info-box"},Vi={width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",style:{"flex-shrink":"0"}},Ni={class:"config-group"},_i={class:"config-label"},Ai={class:"config-group"},Bi={class:"config-label"},Li={class:"config-group"},Fi={class:"config-label"},Ii={class:"config-group"},Hi={class:"config-label"},Ri={value:void 0},zi={value:"3,3"},Yi={value:"5,5"},Oi={value:"8,4"},Pi={value:"2,2,8,2"},xi={key:0,class:"config-group"},Zi={class:"config-label"},Gi={class:"config-group"},Wi={class:"config-label"},ji={key:0,class:"config-group"},Ui={class:"config-label"},qi={class:"config-group"},Ji={class:"config-label"},Ki={class:"config-group"},Qi={class:"config-label"},Xi={key:3,class:"config-group"},el={class:"config-label"},tl={class:"config-group"},nl={class:"config-label"},ol={class:"config-group"},al={class:"config-label"},rl={class:"config-subsection"},sl={class:"subsection-title"},il={width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",style:{"margin-right":"4px"}},ll={class:"config-subsection"},dl={class:"subsection-title"},cl={width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",style:{"margin-right":"4px"}},ul={class:"config-info-box",style:{"margin-bottom":"12px"}},fl={style:{"font-size":"11px"}},hl={class:"config-group"},ml={class:"config-label"},pl={class:"config-group"},gl={class:"config-label"},yl={class:"config-group"},kl={class:"config-label"},bl={value:void 0},wl={value:"3,3"},Cl={value:"5,5"},Sl={value:"8,4"};function Tl(t,n,o,r,s,i){const a=e.resolveComponent("LanguageSelector"),l=e.resolveComponent("ConfigSection"),u=e.resolveComponent("ThemeSelector"),c=e.resolveComponent("PathTypeSelector"),m=e.resolveComponent("ColorInput"),y=e.resolveComponent("SliderInput"),w=e.resolveComponent("CheckboxConfig"),I=e.resolveComponent("LinkTypeColorConfig");return e.openBlock(),e.createElementBlock("div",ki,[e.createElementVNode("button",{class:e.normalizeClass(["config-btn",{active:t.isOpen}]),onClick:n[0]||(n[0]=(...g)=>t.togglePanel&&t.togglePanel(...g)),title:t.t("configPanel.title")},[e.createElementVNode("div",wi,[n[27]||(n[27]=e.createElementVNode("div",{class:"btn-icon"},[e.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z"})])],-1)),e.createElementVNode("span",Ci,e.toDisplayString(t.t("common.config")),1)])],10,bi),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[t.isOpen?(e.openBlock(),e.createElementBlock("div",{key:0,class:"panel-overlay","data-gantt-theme":t.currentTheme},null,8,Si)):e.createCommentVNode("",!0),t.isOpen?(e.openBlock(),e.createElementBlock("div",{key:1,class:"config-panel",ref:"configPanelRef","data-gantt-theme":t.currentTheme},[e.createElementVNode("div",vi,[e.createElementVNode("h3",null,e.toDisplayString(t.t("configPanel.title")),1),e.createElementVNode("button",{class:"close-btn",onClick:n[1]||(n[1]=(...g)=>t.closePanel&&t.closePanel(...g)),title:t.t("common.close")},n[28]||(n[28]=[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)]),8,$i)]),e.createElementVNode("div",Di,[e.createVNode(l,{title:t.t("configPanel.languageSettings"),icon:"language"},{default:e.withCtx(()=>[e.createVNode(a,{modelValue:t.currentLocale,"onUpdate:modelValue":[n[2]||(n[2]=g=>t.currentLocale=g),t.selectLocale],locales:t.locales},null,8,["modelValue","locales","onUpdate:modelValue"])]),_:1},8,["title"]),e.createVNode(l,{title:t.t("configPanel.themeSettings"),icon:"theme"},{default:e.withCtx(()=>[e.createVNode(u,{modelValue:t.currentTheme,"onUpdate:modelValue":[n[3]||(n[3]=g=>t.currentTheme=g),t.selectTheme],themes:t.themes},null,8,["modelValue","themes","onUpdate:modelValue"])]),_:1},8,["title"]),e.createVNode(l,{title:t.t("configPanel.linkSettings"),icon:"link"},{default:e.withCtx(()=>[e.createElementVNode("div",Ei,[e.createElementVNode("div",Mi,[(e.openBlock(),e.createElementBlock("svg",Vi,n[29]||(n[29]=[e.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"},null,-1)]))),e.createElementVNode("span",null,e.toDisplayString(t.t("configPanel.linkConfig.info")),1)]),e.createElementVNode("div",Ni,[e.createElementVNode("label",_i,e.toDisplayString(t.t("configPanel.linkConfig.pathType")),1),e.createVNode(c,{modelValue:t.linkConfig.pathType,"onUpdate:modelValue":[n[4]||(n[4]=g=>t.linkConfig.pathType=g),t.updateLinkConfig]},null,8,["modelValue","onUpdate:modelValue"])]),e.createElementVNode("div",Ai,[e.createElementVNode("label",Bi,e.toDisplayString(t.t("configPanel.linkConfig.color")),1),e.createVNode(m,{modelValue:t.linkConfig.color,"onUpdate:modelValue":n[5]||(n[5]=g=>t.linkConfig.color=g),onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",Li,[e.createElementVNode("label",Fi,e.toDisplayString(t.t("configPanel.linkConfig.width"))+": "+e.toDisplayString(t.linkConfig.width)+"px",1),e.createVNode(y,{modelValue:t.linkConfig.width,"onUpdate:modelValue":n[6]||(n[6]=g=>t.linkConfig.width=g),min:1,max:5,step:.5,"label-step":1,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",Ii,[e.createElementVNode("label",Hi,e.toDisplayString(t.t("configPanel.linkConfig.dashStyle")),1),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":n[7]||(n[7]=g=>t.linkConfig.dashArray=g),onChange:n[8]||(n[8]=(...g)=>t.updateLinkConfig&&t.updateLinkConfig(...g)),class:"select-input"},[e.createElementVNode("option",Ri,e.toDisplayString(t.t("configPanel.linkConfig.solid")),1),e.createElementVNode("option",zi,e.toDisplayString(t.t("configPanel.linkConfig.shortDash")),1),e.createElementVNode("option",Yi,e.toDisplayString(t.t("configPanel.linkConfig.mediumDash")),1),e.createElementVNode("option",Oi,e.toDisplayString(t.t("configPanel.linkConfig.longDash")),1),e.createElementVNode("option",Pi,e.toDisplayString(t.t("configPanel.linkConfig.dotDash")),1)],544),[[e.vModelSelect,t.linkConfig.dashArray]])]),t.linkConfig.pathType==="bezier"?(e.openBlock(),e.createElementBlock("div",xi,[e.createElementVNode("label",Zi,e.toDisplayString(t.t("configPanel.linkConfig.curvature"))+": "+e.toDisplayString(t.linkConfig.bezierCurvature),1),e.createVNode(y,{modelValue:t.linkConfig.bezierCurvature,"onUpdate:modelValue":n[9]||(n[9]=g=>t.linkConfig.bezierCurvature=g),min:.1,max:1,step:.1,"label-step":.3,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])])):e.createCommentVNode("",!0),t.linkConfig.pathType==="right-angle"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createElementVNode("div",Gi,[e.createElementVNode("label",Wi,e.toDisplayString(t.t("configPanel.linkConfig.offset"))+": "+e.toDisplayString(t.linkConfig.rightAngleOffset)+"px",1),e.createVNode(y,{modelValue:t.linkConfig.rightAngleOffset,"onUpdate:modelValue":n[10]||(n[10]=g=>t.linkConfig.rightAngleOffset=g),min:10,max:80,step:5,"label-step":20,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createVNode(w,{modelValue:t.linkConfig.smoothCorners,"onUpdate:modelValue":n[11]||(n[11]=g=>t.linkConfig.smoothCorners=g),label:t.t("configPanel.linkConfig.smoothCorners"),onChange:t.updateLinkConfig},null,8,["modelValue","label","onChange"]),t.linkConfig.smoothCorners?(e.openBlock(),e.createElementBlock("div",ji,[e.createElementVNode("label",Ui,e.toDisplayString(t.t("configPanel.linkConfig.cornerRadius"))+": "+e.toDisplayString(t.linkConfig.cornerRadius)+"px",1),e.createVNode(y,{modelValue:t.linkConfig.cornerRadius,"onUpdate:modelValue":n[12]||(n[12]=g=>t.linkConfig.cornerRadius=g),min:0,max:15,step:1,"label-step":5,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])])):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),e.createVNode(w,{modelValue:t.linkConfig.showArrow,"onUpdate:modelValue":n[13]||(n[13]=g=>t.linkConfig.showArrow=g),label:t.t("configPanel.linkConfig.showArrow"),onChange:t.updateLinkConfig},null,8,["modelValue","label","onChange"]),t.linkConfig.showArrow?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createElementVNode("div",qi,[e.createElementVNode("label",Ji,e.toDisplayString(t.t("configPanel.linkConfig.arrowSize"))+": "+e.toDisplayString(t.linkConfig.arrowSize)+"px",1),e.createVNode(y,{modelValue:t.linkConfig.arrowSize,"onUpdate:modelValue":n[14]||(n[14]=g=>t.linkConfig.arrowSize=g),min:4,max:16,step:1,"label-step":4,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",Ki,[e.createElementVNode("label",Qi,e.toDisplayString(t.t("configPanel.linkConfig.arrowColor")),1),e.createVNode(m,{modelValue:t.linkConfig.arrowColor,"onUpdate:modelValue":n[15]||(n[15]=g=>t.linkConfig.arrowColor=g),"show-sync":!0,"sync-label":t.t("configPanel.linkConfig.syncColor"),"sync-title":t.t("tooltip.syncArrowColor"),onChange:t.updateLinkConfig,onSync:n[16]||(n[16]=g=>{t.linkConfig.arrowColor=t.linkConfig.color,t.updateLinkConfig()})},null,8,["modelValue","sync-label","sync-title","onChange"])])],64)):e.createCommentVNode("",!0),e.createVNode(w,{modelValue:t.linkConfig.enableDashAnimation,"onUpdate:modelValue":n[17]||(n[17]=g=>t.linkConfig.enableDashAnimation=g),label:t.t("configPanel.linkConfig.dashAnimation"),onChange:t.updateLinkConfig},null,8,["modelValue","label","onChange"]),t.linkConfig.enableDashAnimation?(e.openBlock(),e.createElementBlock("div",Xi,[e.createElementVNode("label",el,e.toDisplayString(t.t("configPanel.linkConfig.animationSpeed"))+": "+e.toDisplayString(t.linkConfig.dashAnimationSpeed)+"s",1),e.createVNode(y,{modelValue:t.linkConfig.dashAnimationSpeed,"onUpdate:modelValue":n[18]||(n[18]=g=>t.linkConfig.dashAnimationSpeed=g),min:.2,max:3,step:.2,"label-step":1,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])])):e.createCommentVNode("",!0),e.createVNode(w,{modelValue:t.linkConfig.showLabels,"onUpdate:modelValue":n[19]||(n[19]=g=>t.linkConfig.showLabels=g),label:t.t("configPanel.linkConfig.showLabels"),onChange:t.updateLinkConfig},null,8,["modelValue","label","onChange"]),t.linkConfig.showLabels?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createElementVNode("div",tl,[e.createElementVNode("label",nl,e.toDisplayString(t.t("configPanel.linkConfig.labelColor")),1),e.createVNode(m,{modelValue:t.linkConfig.labelColor,"onUpdate:modelValue":n[20]||(n[20]=g=>t.linkConfig.labelColor=g),onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",ol,[e.createElementVNode("label",al,e.toDisplayString(t.t("configPanel.linkConfig.fontSize"))+": "+e.toDisplayString(t.linkConfig.labelFontSize)+"px",1),e.createVNode(y,{modelValue:t.linkConfig.labelFontSize,"onUpdate:modelValue":n[21]||(n[21]=g=>t.linkConfig.labelFontSize=g),min:8,max:16,step:1,"label-step":2,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",rl,[e.createElementVNode("h5",sl,[(e.openBlock(),e.createElementBlock("svg",il,n[30]||(n[30]=[e.createElementVNode("path",{d:"M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"},null,-1)]))),e.createTextVNode(" "+e.toDisplayString(t.t("configPanel.linkConfig.typeColors")),1)]),e.createVNode(I,{colors:t.linkConfig.linkTypeColors,"onUpdate:colors":n[22]||(n[22]=g=>t.linkConfig.linkTypeColors=g),onChange:t.updateLinkConfig},null,8,["colors","onChange"])]),e.createElementVNode("div",ll,[e.createElementVNode("h5",dl,[(e.openBlock(),e.createElementBlock("svg",cl,n[31]||(n[31]=[e.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"},null,-1)]))),e.createTextVNode(" "+e.toDisplayString(t.t("configPanel.linkConfig.parentChildStyle")),1)]),e.createElementVNode("div",ul,[e.createElementVNode("span",fl,e.toDisplayString(t.t("configPanel.linkConfig.parentChildInfo")),1)]),e.createElementVNode("div",hl,[e.createElementVNode("label",ml,e.toDisplayString(t.t("configPanel.linkConfig.color")),1),e.createVNode(m,{modelValue:t.linkConfig.parentChildStyle.color,"onUpdate:modelValue":n[23]||(n[23]=g=>t.linkConfig.parentChildStyle.color=g),onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",pl,[e.createElementVNode("label",gl,e.toDisplayString(t.t("configPanel.linkConfig.width"))+": "+e.toDisplayString(t.linkConfig.parentChildStyle.width)+"px",1),e.createVNode(y,{modelValue:t.linkConfig.parentChildStyle.width,"onUpdate:modelValue":n[24]||(n[24]=g=>t.linkConfig.parentChildStyle.width=g),min:1,max:3,step:.5,"label-step":1,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",yl,[e.createElementVNode("label",kl,e.toDisplayString(t.t("configPanel.linkConfig.dashStyle")),1),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":n[25]||(n[25]=g=>t.linkConfig.parentChildStyle.dashArray=g),onChange:n[26]||(n[26]=(...g)=>t.updateLinkConfig&&t.updateLinkConfig(...g)),class:"select-input"},[e.createElementVNode("option",bl,e.toDisplayString(t.t("configPanel.linkConfig.solid")),1),e.createElementVNode("option",wl,e.toDisplayString(t.t("configPanel.linkConfig.shortDash")),1),e.createElementVNode("option",Cl,e.toDisplayString(t.t("configPanel.linkConfig.mediumDash")),1),e.createElementVNode("option",Sl,e.toDisplayString(t.t("configPanel.linkConfig.longDash")),1)],544),[[e.vModelSelect,t.linkConfig.parentChildStyle.dashArray]])])])])]),_:1},8,["title"])])],8,Ti)):e.createCommentVNode("",!0)]))])}const Pn=Se(yi,[["render",Tl],["__scopeId","data-v-13485142"]]);var ye;(function(t){t.assertEqual=s=>s;function n(s){}t.assertIs=n;function o(s){throw new Error}t.assertNever=o,t.arrayToEnum=s=>{const i={};for(const a of s)i[a]=a;return i},t.getValidEnumValues=s=>{const i=t.objectKeys(s).filter(l=>typeof s[s[l]]!="number"),a={};for(const l of i)a[l]=s[l];return t.objectValues(a)},t.objectValues=s=>t.objectKeys(s).map(function(i){return s[i]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const a in s)Object.prototype.hasOwnProperty.call(s,a)&&i.push(a);return i},t.find=(s,i)=>{for(const a of s)if(i(a))return a},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(ye||(ye={}));var gn;(function(t){t.mergeShapes=(n,o)=>({...n,...o})})(gn||(gn={}));const x=ye.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Ke=t=>{switch(typeof t){case"undefined":return x.undefined;case"string":return x.string;case"number":return isNaN(t)?x.nan:x.number;case"boolean":return x.boolean;case"function":return x.function;case"bigint":return x.bigint;case"symbol":return x.symbol;case"object":return Array.isArray(t)?x.array:t===null?x.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?x.promise:typeof Map<"u"&&t instanceof Map?x.map:typeof Set<"u"&&t instanceof Set?x.set:typeof Date<"u"&&t instanceof Date?x.date:x.object;default:return x.unknown}},N=ye.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),vl=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Re extends Error{get errors(){return this.issues}constructor(n){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const o=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,o):this.__proto__=o,this.name="ZodError",this.issues=n}format(n){const o=n||function(i){return i.message},r={_errors:[]},s=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(s);else if(a.code==="invalid_return_type")s(a.returnTypeError);else if(a.code==="invalid_arguments")s(a.argumentsError);else if(a.path.length===0)r._errors.push(o(a));else{let l=r,u=0;for(;u<a.path.length;){const c=a.path[u];u===a.path.length-1?(l[c]=l[c]||{_errors:[]},l[c]._errors.push(o(a))):l[c]=l[c]||{_errors:[]},l=l[c],u++}}};return s(this),r}static assert(n){if(!(n instanceof Re))throw new Error(`Not a ZodError: ${n}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ye.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(n=o=>o.message){const o={},r=[];for(const s of this.issues)s.path.length>0?(o[s.path[0]]=o[s.path[0]]||[],o[s.path[0]].push(n(s))):r.push(n(s));return{formErrors:r,fieldErrors:o}}get formErrors(){return this.flatten()}}Re.create=t=>new Re(t);const mt=(t,n)=>{let o;switch(t.code){case N.invalid_type:t.received===x.undefined?o="Required":o=`Expected ${t.expected}, received ${t.received}`;break;case N.invalid_literal:o=`Invalid literal value, expected ${JSON.stringify(t.expected,ye.jsonStringifyReplacer)}`;break;case N.unrecognized_keys:o=`Unrecognized key(s) in object: ${ye.joinValues(t.keys,", ")}`;break;case N.invalid_union:o="Invalid input";break;case N.invalid_union_discriminator:o=`Invalid discriminator value. Expected ${ye.joinValues(t.options)}`;break;case N.invalid_enum_value:o=`Invalid enum value. Expected ${ye.joinValues(t.options)}, received '${t.received}'`;break;case N.invalid_arguments:o="Invalid function arguments";break;case N.invalid_return_type:o="Invalid function return type";break;case N.invalid_date:o="Invalid date";break;case N.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(o=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(o=`${o} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?o=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?o=`Invalid input: must end with "${t.validation.endsWith}"`:ye.assertNever(t.validation):t.validation!=="regex"?o=`Invalid ${t.validation}`:o="Invalid";break;case N.too_small:t.type==="array"?o=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?o=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?o=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?o=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:o="Invalid input";break;case N.too_big:t.type==="array"?o=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?o=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?o=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?o=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?o=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:o="Invalid input";break;case N.custom:o="Invalid input";break;case N.invalid_intersection_types:o="Intersection results could not be merged";break;case N.not_multiple_of:o=`Number must be a multiple of ${t.multipleOf}`;break;case N.not_finite:o="Number must be finite";break;default:o=n.defaultError,ye.assertNever(t)}return{message:o}};let xn=mt;function $l(t){xn=t}function en(){return xn}const tn=t=>{const{data:n,path:o,errorMaps:r,issueData:s}=t,i=[...o,...s.path||[]],a={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let l="";const u=r.filter(c=>!!c).slice().reverse();for(const c of u)l=c(a,{data:n,defaultError:l}).message;return{...s,path:i,message:l}},Dl=[];function z(t,n){const o=en(),r=tn({issueData:n,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,o,o===mt?void 0:mt].filter(s=>!!s)});t.common.issues.push(r)}class Ae{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(n,o){const r=[];for(const s of o){if(s.status==="aborted")return ie;s.status==="dirty"&&n.dirty(),r.push(s.value)}return{status:n.value,value:r}}static async mergeObjectAsync(n,o){const r=[];for(const s of o){const i=await s.key,a=await s.value;r.push({key:i,value:a})}return Ae.mergeObjectSync(n,r)}static mergeObjectSync(n,o){const r={};for(const s of o){const{key:i,value:a}=s;if(i.status==="aborted"||a.status==="aborted")return ie;i.status==="dirty"&&n.dirty(),a.status==="dirty"&&n.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||s.alwaysSet)&&(r[i.value]=a.value)}return{status:n.value,value:r}}}const ie=Object.freeze({status:"aborted"}),pt=t=>({status:"dirty",value:t}),Fe=t=>({status:"valid",value:t}),yn=t=>t.status==="aborted",kn=t=>t.status==="dirty",it=t=>t.status==="valid",St=t=>typeof Promise<"u"&&t instanceof Promise;function nn(t,n,o,r){if(typeof n=="function"?t!==n||!0:!n.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n.get(t)}function Zn(t,n,o,r,s){if(typeof n=="function"?t!==n||!0:!n.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n.set(t,o),o}typeof SuppressedError=="function"&&SuppressedError;var Q;(function(t){t.errToObj=n=>typeof n=="string"?{message:n}:n||{},t.toString=n=>typeof n=="string"?n:n==null?void 0:n.message})(Q||(Q={}));var Tt,vt;class Ge{constructor(n,o,r,s){this._cachedPath=[],this.parent=n,this.data=o,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Gn=(t,n)=>{if(it(n))return{success:!0,data:n.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const o=new Re(t.common.issues);return this._error=o,this._error}}};function ue(t){if(!t)return{};const{errorMap:n,invalid_type_error:o,required_error:r,description:s}=t;if(n&&(o||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return n?{errorMap:n,description:s}:{errorMap:(a,l)=>{var u,c;const{message:m}=t;return a.code==="invalid_enum_value"?{message:m??l.defaultError}:typeof l.data>"u"?{message:(u=m??r)!==null&&u!==void 0?u:l.defaultError}:a.code!=="invalid_type"?{message:l.defaultError}:{message:(c=m??o)!==null&&c!==void 0?c:l.defaultError}},description:s}}class fe{get description(){return this._def.description}_getType(n){return Ke(n.data)}_getOrReturnCtx(n,o){return o||{common:n.parent.common,data:n.data,parsedType:Ke(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}_processInputParams(n){return{status:new Ae,ctx:{common:n.parent.common,data:n.data,parsedType:Ke(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}}_parseSync(n){const o=this._parse(n);if(St(o))throw new Error("Synchronous parse encountered promise.");return o}_parseAsync(n){const o=this._parse(n);return Promise.resolve(o)}parse(n,o){const r=this.safeParse(n,o);if(r.success)return r.data;throw r.error}safeParse(n,o){var r;const s={common:{issues:[],async:(r=o==null?void 0:o.async)!==null&&r!==void 0?r:!1,contextualErrorMap:o==null?void 0:o.errorMap},path:(o==null?void 0:o.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Ke(n)},i=this._parseSync({data:n,path:s.path,parent:s});return Gn(s,i)}"~validate"(n){var o,r;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Ke(n)};if(!this["~standard"].async)try{const i=this._parseSync({data:n,path:[],parent:s});return it(i)?{value:i.value}:{issues:s.common.issues}}catch(i){!((r=(o=i==null?void 0:i.message)===null||o===void 0?void 0:o.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:n,path:[],parent:s}).then(i=>it(i)?{value:i.value}:{issues:s.common.issues})}async parseAsync(n,o){const r=await this.safeParseAsync(n,o);if(r.success)return r.data;throw r.error}async safeParseAsync(n,o){const r={common:{issues:[],contextualErrorMap:o==null?void 0:o.errorMap,async:!0},path:(o==null?void 0:o.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:Ke(n)},s=this._parse({data:n,path:r.path,parent:r}),i=await(St(s)?s:Promise.resolve(s));return Gn(r,i)}refine(n,o){const r=s=>typeof o=="string"||typeof o>"u"?{message:o}:typeof o=="function"?o(s):o;return this._refinement((s,i)=>{const a=n(s),l=()=>i.addIssue({code:N.custom,...r(s)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(l(),!1)):a?!0:(l(),!1)})}refinement(n,o){return this._refinement((r,s)=>n(r)?!0:(s.addIssue(typeof o=="function"?o(r,s):o),!1))}_refinement(n){return new Ze({schema:this,typeName:se.ZodEffects,effect:{type:"refinement",refinement:n}})}superRefine(n){return this._refinement(n)}constructor(n){this.spa=this.safeParseAsync,this._def=n,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:o=>this["~validate"](o)}}optional(){return je.create(this,this._def)}nullable(){return rt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return xe.create(this)}promise(){return bt.create(this,this._def)}or(n){return Mt.create([this,n],this._def)}and(n){return Vt.create(this,n,this._def)}transform(n){return new Ze({...ue(this._def),schema:this,typeName:se.ZodEffects,effect:{type:"transform",transform:n}})}default(n){const o=typeof n=="function"?n:()=>n;return new Lt({...ue(this._def),innerType:this,defaultValue:o,typeName:se.ZodDefault})}brand(){return new Cn({typeName:se.ZodBranded,type:this,...ue(this._def)})}catch(n){const o=typeof n=="function"?n:()=>n;return new Ft({...ue(this._def),innerType:this,catchValue:o,typeName:se.ZodCatch})}describe(n){const o=this.constructor;return new o({...this._def,description:n})}pipe(n){return It.create(this,n)}readonly(){return Ht.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const El=/^c[^\s-]{8,}$/i,Ml=/^[0-9a-z]+$/,Vl=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Nl=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,_l=/^[a-z0-9_-]{21}$/i,Al=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Bl=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ll=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Fl="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let bn;const Il=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Hl=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Rl=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,zl=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Yl=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ol=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Wn="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Pl=new RegExp(`^${Wn}$`);function jn(t){let n="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?n=`${n}\\.\\d{${t.precision}}`:t.precision==null&&(n=`${n}(\\.\\d+)?`),n}function xl(t){return new RegExp(`^${jn(t)}$`)}function Un(t){let n=`${Wn}T${jn(t)}`;const o=[];return o.push(t.local?"Z?":"Z"),t.offset&&o.push("([+-]\\d{2}:?\\d{2})"),n=`${n}(${o.join("|")})`,new RegExp(`^${n}$`)}function Zl(t,n){return!!((n==="v4"||!n)&&Il.test(t)||(n==="v6"||!n)&&Rl.test(t))}function Gl(t,n){if(!Al.test(t))return!1;try{const[o]=t.split("."),r=o.replace(/-/g,"+").replace(/_/g,"/").padEnd(o.length+(4-o.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||!s.typ||!s.alg||n&&s.alg!==n)}catch{return!1}}function Wl(t,n){return!!((n==="v4"||!n)&&Hl.test(t)||(n==="v6"||!n)&&zl.test(t))}class Pe extends fe{_parse(n){if(this._def.coerce&&(n.data=String(n.data)),this._getType(n)!==x.string){const i=this._getOrReturnCtx(n);return z(i,{code:N.invalid_type,expected:x.string,received:i.parsedType}),ie}const r=new Ae;let s;for(const i of this._def.checks)if(i.kind==="min")n.data.length<i.value&&(s=this._getOrReturnCtx(n,s),z(s,{code:N.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")n.data.length>i.value&&(s=this._getOrReturnCtx(n,s),z(s,{code:N.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const a=n.data.length>i.value,l=n.data.length<i.value;(a||l)&&(s=this._getOrReturnCtx(n,s),a?z(s,{code:N.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):l&&z(s,{code:N.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Ll.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"email",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")bn||(bn=new RegExp(Fl,"u")),bn.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"emoji",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Nl.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"uuid",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")_l.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"nanoid",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")El.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"cuid",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Ml.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"cuid2",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Vl.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"ulid",code:N.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(n.data)}catch{s=this._getOrReturnCtx(n,s),z(s,{validation:"url",code:N.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"regex",code:N.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?n.data=n.data.trim():i.kind==="includes"?n.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(n,s),z(s,{code:N.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?n.data=n.data.toLowerCase():i.kind==="toUpperCase"?n.data=n.data.toUpperCase():i.kind==="startsWith"?n.data.startsWith(i.value)||(s=this._getOrReturnCtx(n,s),z(s,{code:N.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?n.data.endsWith(i.value)||(s=this._getOrReturnCtx(n,s),z(s,{code:N.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Un(i).test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{code:N.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Pl.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{code:N.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?xl(i).test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{code:N.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Bl.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"duration",code:N.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?Zl(n.data,i.version)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"ip",code:N.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?Gl(n.data,i.alg)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"jwt",code:N.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?Wl(n.data,i.version)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"cidr",code:N.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Yl.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"base64",code:N.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Ol.test(n.data)||(s=this._getOrReturnCtx(n,s),z(s,{validation:"base64url",code:N.invalid_string,message:i.message}),r.dirty()):ye.assertNever(i);return{status:r.value,value:n.data}}_regex(n,o,r){return this.refinement(s=>n.test(s),{validation:o,code:N.invalid_string,...Q.errToObj(r)})}_addCheck(n){return new Pe({...this._def,checks:[...this._def.checks,n]})}email(n){return this._addCheck({kind:"email",...Q.errToObj(n)})}url(n){return this._addCheck({kind:"url",...Q.errToObj(n)})}emoji(n){return this._addCheck({kind:"emoji",...Q.errToObj(n)})}uuid(n){return this._addCheck({kind:"uuid",...Q.errToObj(n)})}nanoid(n){return this._addCheck({kind:"nanoid",...Q.errToObj(n)})}cuid(n){return this._addCheck({kind:"cuid",...Q.errToObj(n)})}cuid2(n){return this._addCheck({kind:"cuid2",...Q.errToObj(n)})}ulid(n){return this._addCheck({kind:"ulid",...Q.errToObj(n)})}base64(n){return this._addCheck({kind:"base64",...Q.errToObj(n)})}base64url(n){return this._addCheck({kind:"base64url",...Q.errToObj(n)})}jwt(n){return this._addCheck({kind:"jwt",...Q.errToObj(n)})}ip(n){return this._addCheck({kind:"ip",...Q.errToObj(n)})}cidr(n){return this._addCheck({kind:"cidr",...Q.errToObj(n)})}datetime(n){var o,r;return typeof n=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:n}):this._addCheck({kind:"datetime",precision:typeof(n==null?void 0:n.precision)>"u"?null:n==null?void 0:n.precision,offset:(o=n==null?void 0:n.offset)!==null&&o!==void 0?o:!1,local:(r=n==null?void 0:n.local)!==null&&r!==void 0?r:!1,...Q.errToObj(n==null?void 0:n.message)})}date(n){return this._addCheck({kind:"date",message:n})}time(n){return typeof n=="string"?this._addCheck({kind:"time",precision:null,message:n}):this._addCheck({kind:"time",precision:typeof(n==null?void 0:n.precision)>"u"?null:n==null?void 0:n.precision,...Q.errToObj(n==null?void 0:n.message)})}duration(n){return this._addCheck({kind:"duration",...Q.errToObj(n)})}regex(n,o){return this._addCheck({kind:"regex",regex:n,...Q.errToObj(o)})}includes(n,o){return this._addCheck({kind:"includes",value:n,position:o==null?void 0:o.position,...Q.errToObj(o==null?void 0:o.message)})}startsWith(n,o){return this._addCheck({kind:"startsWith",value:n,...Q.errToObj(o)})}endsWith(n,o){return this._addCheck({kind:"endsWith",value:n,...Q.errToObj(o)})}min(n,o){return this._addCheck({kind:"min",value:n,...Q.errToObj(o)})}max(n,o){return this._addCheck({kind:"max",value:n,...Q.errToObj(o)})}length(n,o){return this._addCheck({kind:"length",value:n,...Q.errToObj(o)})}nonempty(n){return this.min(1,Q.errToObj(n))}trim(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Pe({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(n=>n.kind==="datetime")}get isDate(){return!!this._def.checks.find(n=>n.kind==="date")}get isTime(){return!!this._def.checks.find(n=>n.kind==="time")}get isDuration(){return!!this._def.checks.find(n=>n.kind==="duration")}get isEmail(){return!!this._def.checks.find(n=>n.kind==="email")}get isURL(){return!!this._def.checks.find(n=>n.kind==="url")}get isEmoji(){return!!this._def.checks.find(n=>n.kind==="emoji")}get isUUID(){return!!this._def.checks.find(n=>n.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(n=>n.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(n=>n.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(n=>n.kind==="cuid2")}get isULID(){return!!this._def.checks.find(n=>n.kind==="ulid")}get isIP(){return!!this._def.checks.find(n=>n.kind==="ip")}get isCIDR(){return!!this._def.checks.find(n=>n.kind==="cidr")}get isBase64(){return!!this._def.checks.find(n=>n.kind==="base64")}get isBase64url(){return!!this._def.checks.find(n=>n.kind==="base64url")}get minLength(){let n=null;for(const o of this._def.checks)o.kind==="min"&&(n===null||o.value>n)&&(n=o.value);return n}get maxLength(){let n=null;for(const o of this._def.checks)o.kind==="max"&&(n===null||o.value<n)&&(n=o.value);return n}}Pe.create=t=>{var n;return new Pe({checks:[],typeName:se.ZodString,coerce:(n=t==null?void 0:t.coerce)!==null&&n!==void 0?n:!1,...ue(t)})};function jl(t,n){const o=(t.toString().split(".")[1]||"").length,r=(n.toString().split(".")[1]||"").length,s=o>r?o:r,i=parseInt(t.toFixed(s).replace(".","")),a=parseInt(n.toFixed(s).replace(".",""));return i%a/Math.pow(10,s)}class nt extends fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(n){if(this._def.coerce&&(n.data=Number(n.data)),this._getType(n)!==x.number){const i=this._getOrReturnCtx(n);return z(i,{code:N.invalid_type,expected:x.number,received:i.parsedType}),ie}let r;const s=new Ae;for(const i of this._def.checks)i.kind==="int"?ye.isInteger(n.data)||(r=this._getOrReturnCtx(n,r),z(r,{code:N.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?n.data<i.value:n.data<=i.value)&&(r=this._getOrReturnCtx(n,r),z(r,{code:N.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?n.data>i.value:n.data>=i.value)&&(r=this._getOrReturnCtx(n,r),z(r,{code:N.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?jl(n.data,i.value)!==0&&(r=this._getOrReturnCtx(n,r),z(r,{code:N.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(n.data)||(r=this._getOrReturnCtx(n,r),z(r,{code:N.not_finite,message:i.message}),s.dirty()):ye.assertNever(i);return{status:s.value,value:n.data}}gte(n,o){return this.setLimit("min",n,!0,Q.toString(o))}gt(n,o){return this.setLimit("min",n,!1,Q.toString(o))}lte(n,o){return this.setLimit("max",n,!0,Q.toString(o))}lt(n,o){return this.setLimit("max",n,!1,Q.toString(o))}setLimit(n,o,r,s){return new nt({...this._def,checks:[...this._def.checks,{kind:n,value:o,inclusive:r,message:Q.toString(s)}]})}_addCheck(n){return new nt({...this._def,checks:[...this._def.checks,n]})}int(n){return this._addCheck({kind:"int",message:Q.toString(n)})}positive(n){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Q.toString(n)})}negative(n){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Q.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Q.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Q.toString(n)})}multipleOf(n,o){return this._addCheck({kind:"multipleOf",value:n,message:Q.toString(o)})}finite(n){return this._addCheck({kind:"finite",message:Q.toString(n)})}safe(n){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Q.toString(n)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Q.toString(n)})}get minValue(){let n=null;for(const o of this._def.checks)o.kind==="min"&&(n===null||o.value>n)&&(n=o.value);return n}get maxValue(){let n=null;for(const o of this._def.checks)o.kind==="max"&&(n===null||o.value<n)&&(n=o.value);return n}get isInt(){return!!this._def.checks.find(n=>n.kind==="int"||n.kind==="multipleOf"&&ye.isInteger(n.value))}get isFinite(){let n=null,o=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(o===null||r.value>o)&&(o=r.value):r.kind==="max"&&(n===null||r.value<n)&&(n=r.value)}return Number.isFinite(o)&&Number.isFinite(n)}}nt.create=t=>new nt({checks:[],typeName:se.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ue(t)});class ot extends fe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(n){if(this._def.coerce)try{n.data=BigInt(n.data)}catch{return this._getInvalidInput(n)}if(this._getType(n)!==x.bigint)return this._getInvalidInput(n);let r;const s=new Ae;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?n.data<i.value:n.data<=i.value)&&(r=this._getOrReturnCtx(n,r),z(r,{code:N.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?n.data>i.value:n.data>=i.value)&&(r=this._getOrReturnCtx(n,r),z(r,{code:N.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?n.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(n,r),z(r,{code:N.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):ye.assertNever(i);return{status:s.value,value:n.data}}_getInvalidInput(n){const o=this._getOrReturnCtx(n);return z(o,{code:N.invalid_type,expected:x.bigint,received:o.parsedType}),ie}gte(n,o){return this.setLimit("min",n,!0,Q.toString(o))}gt(n,o){return this.setLimit("min",n,!1,Q.toString(o))}lte(n,o){return this.setLimit("max",n,!0,Q.toString(o))}lt(n,o){return this.setLimit("max",n,!1,Q.toString(o))}setLimit(n,o,r,s){return new ot({...this._def,checks:[...this._def.checks,{kind:n,value:o,inclusive:r,message:Q.toString(s)}]})}_addCheck(n){return new ot({...this._def,checks:[...this._def.checks,n]})}positive(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Q.toString(n)})}negative(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Q.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Q.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Q.toString(n)})}multipleOf(n,o){return this._addCheck({kind:"multipleOf",value:n,message:Q.toString(o)})}get minValue(){let n=null;for(const o of this._def.checks)o.kind==="min"&&(n===null||o.value>n)&&(n=o.value);return n}get maxValue(){let n=null;for(const o of this._def.checks)o.kind==="max"&&(n===null||o.value<n)&&(n=o.value);return n}}ot.create=t=>{var n;return new ot({checks:[],typeName:se.ZodBigInt,coerce:(n=t==null?void 0:t.coerce)!==null&&n!==void 0?n:!1,...ue(t)})};class $t extends fe{_parse(n){if(this._def.coerce&&(n.data=!!n.data),this._getType(n)!==x.boolean){const r=this._getOrReturnCtx(n);return z(r,{code:N.invalid_type,expected:x.boolean,received:r.parsedType}),ie}return Fe(n.data)}}$t.create=t=>new $t({typeName:se.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ue(t)});class lt extends fe{_parse(n){if(this._def.coerce&&(n.data=new Date(n.data)),this._getType(n)!==x.date){const i=this._getOrReturnCtx(n);return z(i,{code:N.invalid_type,expected:x.date,received:i.parsedType}),ie}if(isNaN(n.data.getTime())){const i=this._getOrReturnCtx(n);return z(i,{code:N.invalid_date}),ie}const r=new Ae;let s;for(const i of this._def.checks)i.kind==="min"?n.data.getTime()<i.value&&(s=this._getOrReturnCtx(n,s),z(s,{code:N.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?n.data.getTime()>i.value&&(s=this._getOrReturnCtx(n,s),z(s,{code:N.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):ye.assertNever(i);return{status:r.value,value:new Date(n.data.getTime())}}_addCheck(n){return new lt({...this._def,checks:[...this._def.checks,n]})}min(n,o){return this._addCheck({kind:"min",value:n.getTime(),message:Q.toString(o)})}max(n,o){return this._addCheck({kind:"max",value:n.getTime(),message:Q.toString(o)})}get minDate(){let n=null;for(const o of this._def.checks)o.kind==="min"&&(n===null||o.value>n)&&(n=o.value);return n!=null?new Date(n):null}get maxDate(){let n=null;for(const o of this._def.checks)o.kind==="max"&&(n===null||o.value<n)&&(n=o.value);return n!=null?new Date(n):null}}lt.create=t=>new lt({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:se.ZodDate,...ue(t)});class on extends fe{_parse(n){if(this._getType(n)!==x.symbol){const r=this._getOrReturnCtx(n);return z(r,{code:N.invalid_type,expected:x.symbol,received:r.parsedType}),ie}return Fe(n.data)}}on.create=t=>new on({typeName:se.ZodSymbol,...ue(t)});class Dt extends fe{_parse(n){if(this._getType(n)!==x.undefined){const r=this._getOrReturnCtx(n);return z(r,{code:N.invalid_type,expected:x.undefined,received:r.parsedType}),ie}return Fe(n.data)}}Dt.create=t=>new Dt({typeName:se.ZodUndefined,...ue(t)});class Et extends fe{_parse(n){if(this._getType(n)!==x.null){const r=this._getOrReturnCtx(n);return z(r,{code:N.invalid_type,expected:x.null,received:r.parsedType}),ie}return Fe(n.data)}}Et.create=t=>new Et({typeName:se.ZodNull,...ue(t)});class gt extends fe{constructor(){super(...arguments),this._any=!0}_parse(n){return Fe(n.data)}}gt.create=t=>new gt({typeName:se.ZodAny,...ue(t)});class dt extends fe{constructor(){super(...arguments),this._unknown=!0}_parse(n){return Fe(n.data)}}dt.create=t=>new dt({typeName:se.ZodUnknown,...ue(t)});class Qe extends fe{_parse(n){const o=this._getOrReturnCtx(n);return z(o,{code:N.invalid_type,expected:x.never,received:o.parsedType}),ie}}Qe.create=t=>new Qe({typeName:se.ZodNever,...ue(t)});class an extends fe{_parse(n){if(this._getType(n)!==x.undefined){const r=this._getOrReturnCtx(n);return z(r,{code:N.invalid_type,expected:x.void,received:r.parsedType}),ie}return Fe(n.data)}}an.create=t=>new an({typeName:se.ZodVoid,...ue(t)});class xe extends fe{_parse(n){const{ctx:o,status:r}=this._processInputParams(n),s=this._def;if(o.parsedType!==x.array)return z(o,{code:N.invalid_type,expected:x.array,received:o.parsedType}),ie;if(s.exactLength!==null){const a=o.data.length>s.exactLength.value,l=o.data.length<s.exactLength.value;(a||l)&&(z(o,{code:a?N.too_big:N.too_small,minimum:l?s.exactLength.value:void 0,maximum:a?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&o.data.length<s.minLength.value&&(z(o,{code:N.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&o.data.length>s.maxLength.value&&(z(o,{code:N.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),o.common.async)return Promise.all([...o.data].map((a,l)=>s.type._parseAsync(new Ge(o,a,o.path,l)))).then(a=>Ae.mergeArray(r,a));const i=[...o.data].map((a,l)=>s.type._parseSync(new Ge(o,a,o.path,l)));return Ae.mergeArray(r,i)}get element(){return this._def.type}min(n,o){return new xe({...this._def,minLength:{value:n,message:Q.toString(o)}})}max(n,o){return new xe({...this._def,maxLength:{value:n,message:Q.toString(o)}})}length(n,o){return new xe({...this._def,exactLength:{value:n,message:Q.toString(o)}})}nonempty(n){return this.min(1,n)}}xe.create=(t,n)=>new xe({type:t,minLength:null,maxLength:null,exactLength:null,typeName:se.ZodArray,...ue(n)});function yt(t){if(t instanceof Ee){const n={};for(const o in t.shape){const r=t.shape[o];n[o]=je.create(yt(r))}return new Ee({...t._def,shape:()=>n})}else return t instanceof xe?new xe({...t._def,type:yt(t.element)}):t instanceof je?je.create(yt(t.unwrap())):t instanceof rt?rt.create(yt(t.unwrap())):t instanceof We?We.create(t.items.map(n=>yt(n))):t}class Ee extends fe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const n=this._def.shape(),o=ye.objectKeys(n);return this._cached={shape:n,keys:o}}_parse(n){if(this._getType(n)!==x.object){const c=this._getOrReturnCtx(n);return z(c,{code:N.invalid_type,expected:x.object,received:c.parsedType}),ie}const{status:r,ctx:s}=this._processInputParams(n),{shape:i,keys:a}=this._getCached(),l=[];if(!(this._def.catchall instanceof Qe&&this._def.unknownKeys==="strip"))for(const c in s.data)a.includes(c)||l.push(c);const u=[];for(const c of a){const m=i[c],y=s.data[c];u.push({key:{status:"valid",value:c},value:m._parse(new Ge(s,y,s.path,c)),alwaysSet:c in s.data})}if(this._def.catchall instanceof Qe){const c=this._def.unknownKeys;if(c==="passthrough")for(const m of l)u.push({key:{status:"valid",value:m},value:{status:"valid",value:s.data[m]}});else if(c==="strict")l.length>0&&(z(s,{code:N.unrecognized_keys,keys:l}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const m of l){const y=s.data[m];u.push({key:{status:"valid",value:m},value:c._parse(new Ge(s,y,s.path,m)),alwaysSet:m in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const c=[];for(const m of u){const y=await m.key,w=await m.value;c.push({key:y,value:w,alwaysSet:m.alwaysSet})}return c}).then(c=>Ae.mergeObjectSync(r,c)):Ae.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(n){return Q.errToObj,new Ee({...this._def,unknownKeys:"strict",...n!==void 0?{errorMap:(o,r)=>{var s,i,a,l;const u=(a=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,o,r).message)!==null&&a!==void 0?a:r.defaultError;return o.code==="unrecognized_keys"?{message:(l=Q.errToObj(n).message)!==null&&l!==void 0?l:u}:{message:u}}}:{}})}strip(){return new Ee({...this._def,unknownKeys:"strip"})}passthrough(){return new Ee({...this._def,unknownKeys:"passthrough"})}extend(n){return new Ee({...this._def,shape:()=>({...this._def.shape(),...n})})}merge(n){return new Ee({unknownKeys:n._def.unknownKeys,catchall:n._def.catchall,shape:()=>({...this._def.shape(),...n._def.shape()}),typeName:se.ZodObject})}setKey(n,o){return this.augment({[n]:o})}catchall(n){return new Ee({...this._def,catchall:n})}pick(n){const o={};return ye.objectKeys(n).forEach(r=>{n[r]&&this.shape[r]&&(o[r]=this.shape[r])}),new Ee({...this._def,shape:()=>o})}omit(n){const o={};return ye.objectKeys(this.shape).forEach(r=>{n[r]||(o[r]=this.shape[r])}),new Ee({...this._def,shape:()=>o})}deepPartial(){return yt(this)}partial(n){const o={};return ye.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];n&&!n[r]?o[r]=s:o[r]=s.optional()}),new Ee({...this._def,shape:()=>o})}required(n){const o={};return ye.objectKeys(this.shape).forEach(r=>{if(n&&!n[r])o[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof je;)i=i._def.innerType;o[r]=i}}),new Ee({...this._def,shape:()=>o})}keyof(){return qn(ye.objectKeys(this.shape))}}Ee.create=(t,n)=>new Ee({shape:()=>t,unknownKeys:"strip",catchall:Qe.create(),typeName:se.ZodObject,...ue(n)}),Ee.strictCreate=(t,n)=>new Ee({shape:()=>t,unknownKeys:"strict",catchall:Qe.create(),typeName:se.ZodObject,...ue(n)}),Ee.lazycreate=(t,n)=>new Ee({shape:t,unknownKeys:"strip",catchall:Qe.create(),typeName:se.ZodObject,...ue(n)});class Mt extends fe{_parse(n){const{ctx:o}=this._processInputParams(n),r=this._def.options;function s(i){for(const l of i)if(l.result.status==="valid")return l.result;for(const l of i)if(l.result.status==="dirty")return o.common.issues.push(...l.ctx.common.issues),l.result;const a=i.map(l=>new Re(l.ctx.common.issues));return z(o,{code:N.invalid_union,unionErrors:a}),ie}if(o.common.async)return Promise.all(r.map(async i=>{const a={...o,common:{...o.common,issues:[]},parent:null};return{result:await i._parseAsync({data:o.data,path:o.path,parent:a}),ctx:a}})).then(s);{let i;const a=[];for(const u of r){const c={...o,common:{...o.common,issues:[]},parent:null},m=u._parseSync({data:o.data,path:o.path,parent:c});if(m.status==="valid")return m;m.status==="dirty"&&!i&&(i={result:m,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(i)return o.common.issues.push(...i.ctx.common.issues),i.result;const l=a.map(u=>new Re(u));return z(o,{code:N.invalid_union,unionErrors:l}),ie}}get options(){return this._def.options}}Mt.create=(t,n)=>new Mt({options:t,typeName:se.ZodUnion,...ue(n)});const Xe=t=>t instanceof _t?Xe(t.schema):t instanceof Ze?Xe(t.innerType()):t instanceof At?[t.value]:t instanceof at?t.options:t instanceof Bt?ye.objectValues(t.enum):t instanceof Lt?Xe(t._def.innerType):t instanceof Dt?[void 0]:t instanceof Et?[null]:t instanceof je?[void 0,...Xe(t.unwrap())]:t instanceof rt?[null,...Xe(t.unwrap())]:t instanceof Cn||t instanceof Ht?Xe(t.unwrap()):t instanceof Ft?Xe(t._def.innerType):[];class rn extends fe{_parse(n){const{ctx:o}=this._processInputParams(n);if(o.parsedType!==x.object)return z(o,{code:N.invalid_type,expected:x.object,received:o.parsedType}),ie;const r=this.discriminator,s=o.data[r],i=this.optionsMap.get(s);return i?o.common.async?i._parseAsync({data:o.data,path:o.path,parent:o}):i._parseSync({data:o.data,path:o.path,parent:o}):(z(o,{code:N.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ie)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(n,o,r){const s=new Map;for(const i of o){const a=Xe(i.shape[n]);if(!a.length)throw new Error(`A discriminator value for key \`${n}\` could not be extracted from all schema options`);for(const l of a){if(s.has(l))throw new Error(`Discriminator property ${String(n)} has duplicate value ${String(l)}`);s.set(l,i)}}return new rn({typeName:se.ZodDiscriminatedUnion,discriminator:n,options:o,optionsMap:s,...ue(r)})}}function wn(t,n){const o=Ke(t),r=Ke(n);if(t===n)return{valid:!0,data:t};if(o===x.object&&r===x.object){const s=ye.objectKeys(n),i=ye.objectKeys(t).filter(l=>s.indexOf(l)!==-1),a={...t,...n};for(const l of i){const u=wn(t[l],n[l]);if(!u.valid)return{valid:!1};a[l]=u.data}return{valid:!0,data:a}}else if(o===x.array&&r===x.array){if(t.length!==n.length)return{valid:!1};const s=[];for(let i=0;i<t.length;i++){const a=t[i],l=n[i],u=wn(a,l);if(!u.valid)return{valid:!1};s.push(u.data)}return{valid:!0,data:s}}else return o===x.date&&r===x.date&&+t==+n?{valid:!0,data:t}:{valid:!1}}class Vt extends fe{_parse(n){const{status:o,ctx:r}=this._processInputParams(n),s=(i,a)=>{if(yn(i)||yn(a))return ie;const l=wn(i.value,a.value);return l.valid?((kn(i)||kn(a))&&o.dirty(),{status:o.value,value:l.data}):(z(r,{code:N.invalid_intersection_types}),ie)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,a])=>s(i,a)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Vt.create=(t,n,o)=>new Vt({left:t,right:n,typeName:se.ZodIntersection,...ue(o)});class We extends fe{_parse(n){const{status:o,ctx:r}=this._processInputParams(n);if(r.parsedType!==x.array)return z(r,{code:N.invalid_type,expected:x.array,received:r.parsedType}),ie;if(r.data.length<this._def.items.length)return z(r,{code:N.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ie;!this._def.rest&&r.data.length>this._def.items.length&&(z(r,{code:N.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),o.dirty());const i=[...r.data].map((a,l)=>{const u=this._def.items[l]||this._def.rest;return u?u._parse(new Ge(r,a,r.path,l)):null}).filter(a=>!!a);return r.common.async?Promise.all(i).then(a=>Ae.mergeArray(o,a)):Ae.mergeArray(o,i)}get items(){return this._def.items}rest(n){return new We({...this._def,rest:n})}}We.create=(t,n)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new We({items:t,typeName:se.ZodTuple,rest:null,...ue(n)})};class Nt extends fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){const{status:o,ctx:r}=this._processInputParams(n);if(r.parsedType!==x.object)return z(r,{code:N.invalid_type,expected:x.object,received:r.parsedType}),ie;const s=[],i=this._def.keyType,a=this._def.valueType;for(const l in r.data)s.push({key:i._parse(new Ge(r,l,r.path,l)),value:a._parse(new Ge(r,r.data[l],r.path,l)),alwaysSet:l in r.data});return r.common.async?Ae.mergeObjectAsync(o,s):Ae.mergeObjectSync(o,s)}get element(){return this._def.valueType}static create(n,o,r){return o instanceof fe?new Nt({keyType:n,valueType:o,typeName:se.ZodRecord,...ue(r)}):new Nt({keyType:Pe.create(),valueType:n,typeName:se.ZodRecord,...ue(o)})}}class sn extends fe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){const{status:o,ctx:r}=this._processInputParams(n);if(r.parsedType!==x.map)return z(r,{code:N.invalid_type,expected:x.map,received:r.parsedType}),ie;const s=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([l,u],c)=>({key:s._parse(new Ge(r,l,r.path,[c,"key"])),value:i._parse(new Ge(r,u,r.path,[c,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const u of a){const c=await u.key,m=await u.value;if(c.status==="aborted"||m.status==="aborted")return ie;(c.status==="dirty"||m.status==="dirty")&&o.dirty(),l.set(c.value,m.value)}return{status:o.value,value:l}})}else{const l=new Map;for(const u of a){const c=u.key,m=u.value;if(c.status==="aborted"||m.status==="aborted")return ie;(c.status==="dirty"||m.status==="dirty")&&o.dirty(),l.set(c.value,m.value)}return{status:o.value,value:l}}}}sn.create=(t,n,o)=>new sn({valueType:n,keyType:t,typeName:se.ZodMap,...ue(o)});class ct extends fe{_parse(n){const{status:o,ctx:r}=this._processInputParams(n);if(r.parsedType!==x.set)return z(r,{code:N.invalid_type,expected:x.set,received:r.parsedType}),ie;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(z(r,{code:N.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),o.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(z(r,{code:N.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),o.dirty());const i=this._def.valueType;function a(u){const c=new Set;for(const m of u){if(m.status==="aborted")return ie;m.status==="dirty"&&o.dirty(),c.add(m.value)}return{status:o.value,value:c}}const l=[...r.data.values()].map((u,c)=>i._parse(new Ge(r,u,r.path,c)));return r.common.async?Promise.all(l).then(u=>a(u)):a(l)}min(n,o){return new ct({...this._def,minSize:{value:n,message:Q.toString(o)}})}max(n,o){return new ct({...this._def,maxSize:{value:n,message:Q.toString(o)}})}size(n,o){return this.min(n,o).max(n,o)}nonempty(n){return this.min(1,n)}}ct.create=(t,n)=>new ct({valueType:t,minSize:null,maxSize:null,typeName:se.ZodSet,...ue(n)});class kt extends fe{constructor(){super(...arguments),this.validate=this.implement}_parse(n){const{ctx:o}=this._processInputParams(n);if(o.parsedType!==x.function)return z(o,{code:N.invalid_type,expected:x.function,received:o.parsedType}),ie;function r(l,u){return tn({data:l,path:o.path,errorMaps:[o.common.contextualErrorMap,o.schemaErrorMap,en(),mt].filter(c=>!!c),issueData:{code:N.invalid_arguments,argumentsError:u}})}function s(l,u){return tn({data:l,path:o.path,errorMaps:[o.common.contextualErrorMap,o.schemaErrorMap,en(),mt].filter(c=>!!c),issueData:{code:N.invalid_return_type,returnTypeError:u}})}const i={errorMap:o.common.contextualErrorMap},a=o.data;if(this._def.returns instanceof bt){const l=this;return Fe(async function(...u){const c=new Re([]),m=await l._def.args.parseAsync(u,i).catch(I=>{throw c.addIssue(r(u,I)),c}),y=await Reflect.apply(a,this,m);return await l._def.returns._def.type.parseAsync(y,i).catch(I=>{throw c.addIssue(s(y,I)),c})})}else{const l=this;return Fe(function(...u){const c=l._def.args.safeParse(u,i);if(!c.success)throw new Re([r(u,c.error)]);const m=Reflect.apply(a,this,c.data),y=l._def.returns.safeParse(m,i);if(!y.success)throw new Re([s(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...n){return new kt({...this._def,args:We.create(n).rest(dt.create())})}returns(n){return new kt({...this._def,returns:n})}implement(n){return this.parse(n)}strictImplement(n){return this.parse(n)}static create(n,o,r){return new kt({args:n||We.create([]).rest(dt.create()),returns:o||dt.create(),typeName:se.ZodFunction,...ue(r)})}}class _t extends fe{get schema(){return this._def.getter()}_parse(n){const{ctx:o}=this._processInputParams(n);return this._def.getter()._parse({data:o.data,path:o.path,parent:o})}}_t.create=(t,n)=>new _t({getter:t,typeName:se.ZodLazy,...ue(n)});class At extends fe{_parse(n){if(n.data!==this._def.value){const o=this._getOrReturnCtx(n);return z(o,{received:o.data,code:N.invalid_literal,expected:this._def.value}),ie}return{status:"valid",value:n.data}}get value(){return this._def.value}}At.create=(t,n)=>new At({value:t,typeName:se.ZodLiteral,...ue(n)});function qn(t,n){return new at({values:t,typeName:se.ZodEnum,...ue(n)})}class at extends fe{constructor(){super(...arguments),Tt.set(this,void 0)}_parse(n){if(typeof n.data!="string"){const o=this._getOrReturnCtx(n),r=this._def.values;return z(o,{expected:ye.joinValues(r),received:o.parsedType,code:N.invalid_type}),ie}if(nn(this,Tt)||Zn(this,Tt,new Set(this._def.values)),!nn(this,Tt).has(n.data)){const o=this._getOrReturnCtx(n),r=this._def.values;return z(o,{received:o.data,code:N.invalid_enum_value,options:r}),ie}return Fe(n.data)}get options(){return this._def.values}get enum(){const n={};for(const o of this._def.values)n[o]=o;return n}get Values(){const n={};for(const o of this._def.values)n[o]=o;return n}get Enum(){const n={};for(const o of this._def.values)n[o]=o;return n}extract(n,o=this._def){return at.create(n,{...this._def,...o})}exclude(n,o=this._def){return at.create(this.options.filter(r=>!n.includes(r)),{...this._def,...o})}}Tt=new WeakMap,at.create=qn;class Bt extends fe{constructor(){super(...arguments),vt.set(this,void 0)}_parse(n){const o=ye.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(n);if(r.parsedType!==x.string&&r.parsedType!==x.number){const s=ye.objectValues(o);return z(r,{expected:ye.joinValues(s),received:r.parsedType,code:N.invalid_type}),ie}if(nn(this,vt)||Zn(this,vt,new Set(ye.getValidEnumValues(this._def.values))),!nn(this,vt).has(n.data)){const s=ye.objectValues(o);return z(r,{received:r.data,code:N.invalid_enum_value,options:s}),ie}return Fe(n.data)}get enum(){return this._def.values}}vt=new WeakMap,Bt.create=(t,n)=>new Bt({values:t,typeName:se.ZodNativeEnum,...ue(n)});class bt extends fe{unwrap(){return this._def.type}_parse(n){const{ctx:o}=this._processInputParams(n);if(o.parsedType!==x.promise&&o.common.async===!1)return z(o,{code:N.invalid_type,expected:x.promise,received:o.parsedType}),ie;const r=o.parsedType===x.promise?o.data:Promise.resolve(o.data);return Fe(r.then(s=>this._def.type.parseAsync(s,{path:o.path,errorMap:o.common.contextualErrorMap})))}}bt.create=(t,n)=>new bt({type:t,typeName:se.ZodPromise,...ue(n)});class Ze extends fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===se.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(n){const{status:o,ctx:r}=this._processInputParams(n),s=this._def.effect||null,i={addIssue:a=>{z(r,a),a.fatal?o.abort():o.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const a=s.transform(r.data,i);if(r.common.async)return Promise.resolve(a).then(async l=>{if(o.value==="aborted")return ie;const u=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return u.status==="aborted"?ie:u.status==="dirty"||o.value==="dirty"?pt(u.value):u});{if(o.value==="aborted")return ie;const l=this._def.schema._parseSync({data:a,path:r.path,parent:r});return l.status==="aborted"?ie:l.status==="dirty"||o.value==="dirty"?pt(l.value):l}}if(s.type==="refinement"){const a=l=>{const u=s.refinement(l,i);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?ie:(l.status==="dirty"&&o.dirty(),a(l.value),{status:o.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?ie:(l.status==="dirty"&&o.dirty(),a(l.value).then(()=>({status:o.value,value:l.value}))))}if(s.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!it(a))return a;const l=s.transform(a.value,i);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:o.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>it(a)?Promise.resolve(s.transform(a.value,i)).then(l=>({status:o.value,value:l})):a);ye.assertNever(s)}}Ze.create=(t,n,o)=>new Ze({schema:t,typeName:se.ZodEffects,effect:n,...ue(o)}),Ze.createWithPreprocess=(t,n,o)=>new Ze({schema:n,effect:{type:"preprocess",transform:t},typeName:se.ZodEffects,...ue(o)});class je extends fe{_parse(n){return this._getType(n)===x.undefined?Fe(void 0):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}je.create=(t,n)=>new je({innerType:t,typeName:se.ZodOptional,...ue(n)});class rt extends fe{_parse(n){return this._getType(n)===x.null?Fe(null):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}rt.create=(t,n)=>new rt({innerType:t,typeName:se.ZodNullable,...ue(n)});class Lt extends fe{_parse(n){const{ctx:o}=this._processInputParams(n);let r=o.data;return o.parsedType===x.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:o.path,parent:o})}removeDefault(){return this._def.innerType}}Lt.create=(t,n)=>new Lt({innerType:t,typeName:se.ZodDefault,defaultValue:typeof n.default=="function"?n.default:()=>n.default,...ue(n)});class Ft extends fe{_parse(n){const{ctx:o}=this._processInputParams(n),r={...o,common:{...o.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return St(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Re(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Re(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Ft.create=(t,n)=>new Ft({innerType:t,typeName:se.ZodCatch,catchValue:typeof n.catch=="function"?n.catch:()=>n.catch,...ue(n)});class ln extends fe{_parse(n){if(this._getType(n)!==x.nan){const r=this._getOrReturnCtx(n);return z(r,{code:N.invalid_type,expected:x.nan,received:r.parsedType}),ie}return{status:"valid",value:n.data}}}ln.create=t=>new ln({typeName:se.ZodNaN,...ue(t)});const Ul=Symbol("zod_brand");class Cn extends fe{_parse(n){const{ctx:o}=this._processInputParams(n),r=o.data;return this._def.type._parse({data:r,path:o.path,parent:o})}unwrap(){return this._def.type}}class It extends fe{_parse(n){const{status:o,ctx:r}=this._processInputParams(n);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ie:i.status==="dirty"?(o.dirty(),pt(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ie:s.status==="dirty"?(o.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(n,o){return new It({in:n,out:o,typeName:se.ZodPipeline})}}class Ht extends fe{_parse(n){const o=this._def.innerType._parse(n),r=s=>(it(s)&&(s.value=Object.freeze(s.value)),s);return St(o)?o.then(s=>r(s)):r(o)}unwrap(){return this._def.innerType}}Ht.create=(t,n)=>new Ht({innerType:t,typeName:se.ZodReadonly,...ue(n)});function Jn(t,n){const o=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t;return typeof o=="string"?{message:o}:o}function Kn(t,n={},o){return t?gt.create().superRefine((r,s)=>{var i,a;const l=t(r);if(l instanceof Promise)return l.then(u=>{var c,m;if(!u){const y=Jn(n,r),w=(m=(c=y.fatal)!==null&&c!==void 0?c:o)!==null&&m!==void 0?m:!0;s.addIssue({code:"custom",...y,fatal:w})}});if(!l){const u=Jn(n,r),c=(a=(i=u.fatal)!==null&&i!==void 0?i:o)!==null&&a!==void 0?a:!0;s.addIssue({code:"custom",...u,fatal:c})}}):gt.create()}const ql={object:Ee.lazycreate};var se;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(se||(se={}));const Jl=(t,n={message:`Input not instance of ${t.name}`})=>Kn(o=>o instanceof t,n),Qn=Pe.create,Xn=nt.create,Kl=ln.create,Ql=ot.create,eo=$t.create,Xl=lt.create,ed=on.create,td=Dt.create,nd=Et.create,od=gt.create,ad=dt.create,rd=Qe.create,sd=an.create,id=xe.create,ld=Ee.create,dd=Ee.strictCreate,cd=Mt.create,ud=rn.create,fd=Vt.create,hd=We.create,md=Nt.create,pd=sn.create,gd=ct.create,yd=kt.create,kd=_t.create,bd=At.create,wd=at.create,Cd=Bt.create,Sd=bt.create,to=Ze.create,Td=je.create,vd=rt.create,$d=Ze.createWithPreprocess,Dd=It.create;var st=Object.freeze({__proto__:null,defaultErrorMap:mt,setErrorMap:$l,getErrorMap:en,makeIssue:tn,EMPTY_PATH:Dl,addIssueToContext:z,ParseStatus:Ae,INVALID:ie,DIRTY:pt,OK:Fe,isAborted:yn,isDirty:kn,isValid:it,isAsync:St,get util(){return ye},get objectUtil(){return gn},ZodParsedType:x,getParsedType:Ke,ZodType:fe,datetimeRegex:Un,ZodString:Pe,ZodNumber:nt,ZodBigInt:ot,ZodBoolean:$t,ZodDate:lt,ZodSymbol:on,ZodUndefined:Dt,ZodNull:Et,ZodAny:gt,ZodUnknown:dt,ZodNever:Qe,ZodVoid:an,ZodArray:xe,ZodObject:Ee,ZodUnion:Mt,ZodDiscriminatedUnion:rn,ZodIntersection:Vt,ZodTuple:We,ZodRecord:Nt,ZodMap:sn,ZodSet:ct,ZodFunction:kt,ZodLazy:_t,ZodLiteral:At,ZodEnum:at,ZodNativeEnum:Bt,ZodPromise:bt,ZodEffects:Ze,ZodTransformer:Ze,ZodOptional:je,ZodNullable:rt,ZodDefault:Lt,ZodCatch:Ft,ZodNaN:ln,BRAND:Ul,ZodBranded:Cn,ZodPipeline:It,ZodReadonly:Ht,custom:Kn,Schema:fe,ZodSchema:fe,late:ql,get ZodFirstPartyTypeKind(){return se},coerce:{string:t=>Pe.create({...t,coerce:!0}),number:t=>nt.create({...t,coerce:!0}),boolean:t=>$t.create({...t,coerce:!0}),bigint:t=>ot.create({...t,coerce:!0}),date:t=>lt.create({...t,coerce:!0})},any:od,array:id,bigint:Ql,boolean:eo,date:Xl,discriminatedUnion:ud,effect:to,enum:wd,function:yd,instanceof:Jl,intersection:fd,lazy:kd,literal:bd,map:pd,nan:Kl,nativeEnum:Cd,never:rd,null:nd,nullable:vd,number:Xn,object:ld,oboolean:()=>eo().optional(),onumber:()=>Xn().optional(),optional:Td,ostring:()=>Qn().optional(),pipeline:Dd,preprocess:$d,promise:Sd,record:md,set:gd,strictObject:dd,string:Qn,symbol:ed,transformer:to,tuple:hd,undefined:td,union:cd,unknown:ad,void:sd,NEVER:ie,ZodIssueCode:N,quotelessJson:vl,ZodError:Re});st.object({date:st.string().regex(/^\d{4}-\d{2}-\d{2}$/),year:st.number().int(),month:st.number().int().min(1).max(12),week:st.number().int().min(1).max(7),monthStr:st.string(),weekStr:st.string(),day:st.number().int().min(1).max(31)}),T.extend(so);const Ed=e.defineComponent({name:"Gantt",props:{styleConfig:{type:Object,required:!0,default:()=>({headersHeight:100,rowHeight:60}),validator:t=>t.headersHeight>0&&t.rowHeight>0},dataConfig:{type:Object,required:!0,default:()=>({dataSource:[],taskHeaders:[],mapFields:{}}),validator:t=>Array.isArray(t.dataSource)&&Array.isArray(t.taskHeaders)&&typeof t.mapFields=="object"&&t.mapFields!==null},eventConfig:{type:Object,required:!0}},components:{DatePicker:Ln,SplitPane:ta,TaskTable:qa,RightTable:Lr,GanttConfigPanel:Pn},setup(t){const{t:n,locale:o}=ze(),r=()=>({"zh-CN":"zh-cn","en-US":"en","ja-JP":"ja","ko-KR":"ko","fr-FR":"fr","de-DE":"de","es-ES":"es","ru-RU":"ru"})[o.value]||"en",s=e.computed(()=>t.dataConfig.mapFields),i=e.computed(()=>t.dataConfig.dataSource),{config:a,updateConfig:l}=Ct(),u=e.computed(()=>a.linkTypeVisibility||{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}),c=(k,R)=>{l({linkTypeVisibility:{[k]:R}})},m=e.ref([]),y=e.ref(35),w=e.ref(["button is-active","button","button","button"]),I=e.ref("月"),g=e.ref(t.dataConfig.queryStartDate||T().locale(r()).startOf("month").format("YYYY-MM-DD")),F=e.ref(T().locale(r()).add(-5,"y").format("YYYY-MM-DD")),h=e.ref(T().locale(r()).add(5,"y").format("YYYY-MM-DD")),O=e.ref(!1),S=e.ref(g.value),D=e.ref(t.dataConfig.queryEndDate||T().locale(r()).endOf("month").format("YYYY-MM-DD")),V=e.ref(T().locale(r()).add(-5,"y").format("YYYY-MM-DD")),C=e.ref(T(g.value).locale(r()).add(5,"y").format("YYYY-MM-DD")),K=e.ref(!1),q=e.ref(D.value),j=e.ref([]),X=e.ref([]),A=e.ref([]),P=e.ref([]),H=e.ref(0),ee=e.ref(0),ke=e.ref(g.value+" 00:00:00"),p=e.ref(D.value+" 23:59:59"),d=e.ref(""),b=e.ref(),f=e.computed(()=>v.subTask),$=e.computed(()=>v.editTask),B=e.computed(()=>v.removeTask),_=e.computed(()=>v.rootTask),L=e.computed(()=>v.allowChangeTaskDate),Z=k=>{const R=T(S.value),te=T(q.value);if(!(!R.isValid()||!te.isValid()||te.diff(R,"day")<0)){switch(ke.value=S.value+" 00:00:00",p.value=q.value+" 23:59:59",A.value=[],X.value=[],j.value=[],P.value=[],k){case"月":{H.value=80;const Y=[];let me=R.startOf("month");for(;me.isBefore(te)||me.isSame(te,"month");)Y.push(me.format("YYYY-MM-DD")),me=me.add(1,"month");if(Y.some(ve=>T(ve).format("YYYY-MM")===te.format("YYYY-MM"))||Y.push(te.format("YYYY-MM-DD")),Y.length===1){const ve=te.diff(R,"day")+1;j.value.push({title:R.locale(r()).format("MMMM"),width:ve*H.value})}else Y.forEach((ve,be)=>{if(be===0){const $e=R.endOf("month").format("YYYY-MM-DD"),Ce=T($e).diff(R,"day")+1;j.value.push({title:T(ve).locale(r()).format("MMMM"),width:Ce*H.value})}else if(be===Y.length-1){const $e=te.startOf("month").format("YYYY-MM-DD"),Ce=te.diff(T($e),"day")+1;j.value.push({title:T(ve).locale(r()).format("MMMM"),width:Ce*H.value})}else{const $e=T(ve,"YYYY-MM").daysInMonth();j.value.push({title:T(ve).locale(r()).format("MMMM"),width:$e*H.value})}});let De=R;for(;De.isBefore(te)||De.isSame(te,"day");){const be=["zh-CN","ja-JP","ko-KR"].includes(o.value)?De.format("DD")+"日":De.format("DD"),$e=De.format("YYYY-MM-DD"),Ce=De.locale(r()).format("dddd");A.value.push({title:Ce,width:H.value,fulldate:$e}),X.value.push({title:be,width:H.value,fulldate:$e}),De=De.add(1,"day")}ee.value=X.value.length;break}case"周":{H.value=120;let Y=R.startOf("isoWeek");const me=te.endOf("isoWeek"),De=[];let ve=Y.startOf("month");for(;ve.isBefore(me)||ve.isSame(me,"month");)De.push(ve.format("YYYY-MM-DD")),ve=ve.add(1,"month");for(De.forEach((be,$e)=>{const Ce=T(be),he=Ce.endOf("month");let Me=0,we=Y.clone();for(;we.isBefore(me)||we.isSame(me,"week");){const _e=we.startOf("isoWeek"),Ue=we.endOf("isoWeek");(_e.isSame(Ce,"month")||Ue.isSame(Ce,"month")||_e.isBefore(he)&&Ue.isAfter(Ce))&&Me++,we=we.add(1,"week")}if(Me>0){const Ue=["zh-CN","ja-JP","ko-KR"].includes(o.value)?Ce.format("YYYY年MM月"):Ce.locale(r()).format("MMMM YYYY");j.value.push({title:Ue,width:Me*H.value})}});Y.isBefore(me)||Y.isSame(me,"week");){const be=Y.startOf("isoWeek"),$e=Y.endOf("isoWeek"),he=["zh-CN","ja-JP","ko-KR"].includes(o.value)?`第${Y.isoWeek()}周 (${be.format("MM/DD")}-${$e.format("MM/DD")})`:`Week ${Y.isoWeek()} (${be.format("MM/DD")}-${$e.format("MM/DD")})`;A.value.push({title:he,width:H.value,fulldate:be.format("YYYY-MM-DD")}),Y=Y.add(1,"week")}ee.value=A.value.length;break}case"日":{H.value=80;let Y=R;for(;Y.isBefore(te)||Y.isSame(te,"day");){const De=["zh-CN","ja-JP","ko-KR"].includes(o.value)?Y.locale(r()).format("MMMM DD")+"日":Y.locale(r()).format("MMMM DD"),ve=Y.format("YYYY-MM-DD"),be=Y.locale(r()).format("dddd");A.value.push({title:be,width:H.value,fulldate:ve}),X.value.push({title:De,width:H.value,fulldate:ve}),Y=Y.add(1,"day")}ee.value=X.value.length;break}case"时":{H.value=30;let Y=R;const me=te.endOf("day");for(;Y.isBefore(me);){const ve=["zh-CN","ja-JP","ko-KR"].includes(o.value)?Y.locale(r()).format("MMMM DD")+"日":Y.locale(r()).format("MMMM DD"),be=Y.format("YYYY-MM-DD"),$e=Y.locale(r()).format("dddd");A.value.push({title:$e,width:24*H.value,fulldate:be}),X.value.push({title:ve,width:24*H.value,fulldate:be});for(let Ce=0;Ce<=23;Ce++){const he=["zh-CN","ja-JP","ko-KR"].includes(o.value);P.value.push({title:he?Ce+"点":`${Ce}:00`,width:H.value})}Y=Y.add(1,"day")}ee.value=P.value.length;break}}t.eventConfig.queryTask(S.value,q.value,I.value)}},G=(k,R)=>{let te=k.filter(oe=>oe[s.value.id]===R);te&&te.length>0&&(d.value=te[0].index+"."+d.value,G(k,te[0][s.value.parentId]))},W=(k,R,te)=>{let oe=R.filter(Y=>Y[s.value.parentId]===k);if(oe&&oe.length>0){te++;for(let Y=0;Y<oe.length;Y++){oe[Y].treeLevel=te,oe[Y].index=Y+1;let me=m.value.filter(De=>De[s.value.id]===oe[Y][s.value.parentId]);d.value="",me&&me.length>0?(d.value=me[0].index+"."+oe[Y].index,G(m.value,me[0][s.value.parentId]),oe[Y].no=d.value):oe[Y].no=Y+1+"",m.value.push(oe[Y]),W(oe[Y][s.value.id],R,te)}}},ne=k=>{for(let R=0;R<w.value.length;R++)w.value[R]="button";switch(k){case"月":{w.value[0]="button is-active";break}case"周":{w.value[1]="button is-active";break}case"日":{w.value[2]="button is-active";break}case"时":{w.value[3]="button is-active";break}}I.value=k,e.nextTick(()=>{const R=document.querySelector(".table .content");R&&(R.scrollLeft=0)})},le=k=>{T(D.value).diff(T(k.date),"days")<0&&(q.value=k.date,D.value=k.date,ce.setEndGanttDate(T(k.date).toDate())),O.value=!1,S.value=k.date,g.value=k.date,ce.setStartGanttDate(T(k.date).toDate()),V.value=k.date},re=k=>{T(k.date).diff(T(g.value),"days")<0&&(S.value=T(k.date).format("YYYY-MM-DD"),g.value=T(k.date).format("YYYY-MM-DD"),ce.setStartGanttDate(T(k.date).toDate())),K.value=!1,q.value=k.date,D.value=k.date,ce.setEndGanttDate(T(k.date).toDate())};e.watch([I,S,q],([k,R,te],[oe,Y,me])=>{(k!==oe||R!==Y||te!==me)&&Z(k)}),e.watch(o,()=>{Z(I.value)}),e.watch(_,k=>{t.eventConfig.addRootTask(k)}),e.watch(f,k=>{t.eventConfig.addSubTask(k)}),e.watch(B,k=>{t.eventConfig.removeTask(k)}),e.watch($,k=>{t.eventConfig.editTask(k)}),e.watch(L,k=>{t.eventConfig.allowChangeTaskDate(k)}),e.watch(()=>v.barDate,k=>{if(k){const{id:R,startDate:te,endDate:oe}=k;R&&te&&oe&&t.eventConfig.barDate(R,te,oe)}}),e.watch(H,k=>{ce.setScale(k)}),e.watch(()=>t.dataConfig.taskHeaders,k=>{ce.setTaskHeaders(k)}),e.watch([j,X,A,P],([k,R,te,oe])=>{ce.setMonthHeaders(k),ce.setDayHeaders(R),ce.setWeekHeaders(te),ce.setHourHeaders(oe)}),e.watch(I,k=>{ce.setMode(k)}),e.watch(s,k=>{k&&ce.setMapFields(k)}),e.watch(()=>t.dataConfig.queryStartDate,k=>{k&&(ce.setStartGanttDate(T(k).toDate()),ke.value=k,S.value=k,g.value=k)}),e.watch(()=>t.dataConfig.queryEndDate,k=>{k&&(ce.setEndGanttDate(T(k).toDate()),p.value=k,q.value=k,D.value=k)}),e.watch(ee,k=>{k&&ce.setTimelineCellCount(k)}),e.onBeforeMount(()=>{ce.setStartGanttDate(T(g.value).toDate()),ce.setEndGanttDate(T(D.value).toDate()),ce.setMonthHeaders(j.value),ce.setWeekHeaders(A.value),ce.setDayHeaders(X.value),ce.setHourHeaders(P.value),ce.setTaskHeaders(t.dataConfig.taskHeaders),ce.setMapFields(s.value),ce.setTimelineCellCount(ee.value),i.value&&i.value.length>0&&ce.setTasks(i.value)});const Te=k=>{const R=k;t.eventConfig.updateProgress&&t.eventConfig.updateProgress(R.detail)};e.onMounted(()=>{j.value=[],A.value=[],X.value=[],P.value=[],W("0",i.value,0),ce.setTasks(m.value),e.nextTick(()=>{I.value="月",ce.setMode(I.value),Z(I.value)}),window.addEventListener("taskProgressUpdate",Te)});let E=null;e.watch(i,k=>{k&&k.length>0?(E&&clearTimeout(E),E=setTimeout(()=>{m.value=[],W("0",k,0),ce.setTasks(m.value),E=null},100)):k&&k.length===0&&ce.setTasks([])},{immediate:!1}),e.onBeforeUnmount(()=>{window.removeEventListener("taskProgressUpdate",Te)}),e.provide(ft.AddRootTaskSymbol,k=>t.eventConfig.addRootTask(k)),e.provide(ft.SetBarColorSymbol,k=>t.styleConfig.setBarColor(k)),t.styleConfig.setTaskType&&e.provide(ft.SetTaskTypeSymbol,t.styleConfig.setTaskType),e.provide("ganttContainer",b);const M=e.ref("metro");try{const k=localStorage.getItem("gantt-theme");k&&(M.value=k)}catch(k){console.warn("Failed to load theme from localStorage:",k)}e.provide("currentTheme",M),e.watch(()=>t.dataConfig.dependencies,k=>{k&&k.length>0&&(Kt.clear(),k.forEach(R=>{Kt.addDependency(R)}))},{immediate:!0});const ae=k=>{},J=e.computed(()=>{var k,R,te,oe;return{finishToStart:((k=a.linkTypeColors)==null?void 0:k.finishToStart)||"#3498db",startToStart:((R=a.linkTypeColors)==null?void 0:R.startToStart)||"#2ecc71",finishToFinish:((te=a.linkTypeColors)==null?void 0:te.finishToFinish)||"#e74c3c",startToFinish:((oe=a.linkTypeColors)==null?void 0:oe.startToFinish)||"#f39c12"}});return{t:n,subTask:f,editTask:$,removeTask:B,rootTask:_,allowChangeTaskDate:L,paneLengthPercent:y,startDate:g,endDate:D,minStartDate:F,maxStartDate:h,confirmStart:le,minEndDate:V,maxEndDate:C,confirmEnd:re,buttonClass:w,timeMode:ne,onLinkConfigChange:ae,ganttContainer:b,linkTypeColors:J,linkTypeVisibility:u,updateLinkVisibility:c}}}),Md={class:"page gantt-container",ref:"ganttContainer"},Vd={class:"toolbar"},Nd={class:"dateInput"},_d={style:{"margin-right":"20px","margin-left":"20px",color:"#606266"}},Ad={class:"buttonGroup"},Bd={class:"metro-content"},Ld={class:"metro-text"},Fd={class:"metro-content"},Id={class:"metro-text"},Hd={class:"metro-content"},Rd={class:"metro-text"},zd={class:"metro-content"},Yd={class:"metro-text"},Od={class:"link-legend"},Pd={class:"legend-title"},xd={class:"legend-items"},Zd=["checked"],Gd={class:"legend-label"},Wd={class:"legend-desc"},jd=["checked"],Ud={width:"24",height:"12",viewBox:"0 0 24 12"},qd=["stroke"],Jd=["fill"],Kd={class:"legend-label"},Qd={class:"legend-desc"},Xd=["checked"],ec={width:"24",height:"12",viewBox:"0 0 24 12"},tc=["stroke"],nc=["fill"],oc={class:"legend-label"},ac={class:"legend-desc"},rc=["checked"],sc={width:"24",height:"12",viewBox:"0 0 24 12"},ic=["stroke"],lc=["fill"],dc={class:"legend-label"},cc={class:"legend-desc"},uc=["checked"],fc={width:"24",height:"12",viewBox:"0 0 24 12"},hc=["stroke"],mc=["fill"],pc={class:"legend-label"},gc={class:"legend-desc"},yc={class:"config-buttons"},kc={class:"gantt"};function bc(t,n,o,r,s,i){const a=e.resolveComponent("DatePicker"),l=e.resolveComponent("GanttConfigPanel"),u=e.resolveComponent("TaskTable"),c=e.resolveComponent("RightTable"),m=e.resolveComponent("SplitPane");return e.openBlock(),e.createElementBlock("div",Md,[e.createElementVNode("div",Vd,[e.createElementVNode("div",Nd,[e.createVNode(a,{date:t.startDate,"min-date":t.minStartDate,"max-date":t.maxStartDate,onConfirm:t.confirmStart},null,8,["date","min-date","max-date","onConfirm"]),e.createElementVNode("span",_d,e.toDisplayString(t.t("common.to")),1),e.createVNode(a,{date:t.endDate,"min-date":t.minEndDate,"max-date":t.maxEndDate,onConfirm:t.confirmEnd},null,8,["date","min-date","max-date","onConfirm"])]),e.createElementVNode("div",Ad,[e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[0],"metro-btn"]),onClick:n[0]||(n[0]=y=>t.timeMode("月"))},[e.createElementVNode("div",Bd,[n[10]||(n[10]=e.createElementVNode("div",{class:"metro-icon"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"})])],-1)),e.createElementVNode("div",Ld,e.toDisplayString(t.t("viewMode.month")),1)])],2),e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[1],"metro-btn"]),onClick:n[1]||(n[1]=y=>t.timeMode("周"))},[e.createElementVNode("div",Fd,[n[11]||(n[11]=e.createElementVNode("div",{class:"metro-icon"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"})])],-1)),e.createElementVNode("div",Id,e.toDisplayString(t.t("viewMode.week")),1)])],2),e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[2],"metro-btn"]),onClick:n[2]||(n[2]=y=>t.timeMode("日"))},[e.createElementVNode("div",Hd,[n[12]||(n[12]=e.createElementVNode("div",{class:"metro-icon"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 2 2h8c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 18H6V4h8v16z"})])],-1)),e.createElementVNode("div",Rd,e.toDisplayString(t.t("viewMode.day")),1)])],2),e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[3],"metro-btn"]),onClick:n[3]||(n[3]=y=>t.timeMode("时"))},[e.createElementVNode("div",zd,[n[13]||(n[13]=e.createElementVNode("div",{class:"metro-icon"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"})])],-1)),e.createElementVNode("div",Yd,e.toDisplayString(t.t("viewMode.hour")),1)])],2)]),e.createElementVNode("div",Od,[e.createElementVNode("div",Pd,[n[14]||(n[14]=e.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"})],-1)),e.createTextVNode(" "+e.toDisplayString(t.t("link.legend")),1)]),e.createElementVNode("div",xd,[e.createElementVNode("label",{class:e.normalizeClass(["legend-item",{disabled:!t.linkTypeVisibility.parentChild}]),title:"父子关系:显示任务的层级结构"},[e.createElementVNode("input",{type:"checkbox",checked:t.linkTypeVisibility.parentChild,onChange:n[4]||(n[4]=y=>t.updateLinkVisibility("parentChild",y.target.checked))},null,40,Zd),n[15]||(n[15]=e.createElementVNode("svg",{width:"24",height:"12",viewBox:"0 0 24 12"},[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:"#95a5a6","stroke-width":"1.5","stroke-dasharray":"3,3"}),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:"#95a5a6"})],-1)),e.createElementVNode("span",Gd,e.toDisplayString(t.t("link.pc")),1),e.createElementVNode("span",Wd,e.toDisplayString(t.t("link.parentChild")),1)],2),e.createElementVNode("label",{class:e.normalizeClass(["legend-item",{disabled:!t.linkTypeVisibility.finishToStart}]),title:"完成-开始:前置任务完成后,后续任务才能开始"},[e.createElementVNode("input",{type:"checkbox",checked:t.linkTypeVisibility.finishToStart,onChange:n[5]||(n[5]=y=>t.updateLinkVisibility("finishToStart",y.target.checked))},null,40,jd),(e.openBlock(),e.createElementBlock("svg",Ud,[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:t.linkTypeColors.finishToStart,"stroke-width":"2"},null,8,qd),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:t.linkTypeColors.finishToStart},null,8,Jd)])),e.createElementVNode("span",Kd,e.toDisplayString(t.t("link.fs")),1),e.createElementVNode("span",Qd,e.toDisplayString(t.t("link.finishToStart")),1)],2),e.createElementVNode("label",{class:e.normalizeClass(["legend-item",{disabled:!t.linkTypeVisibility.startToStart}]),title:"开始-开始:两个任务同时开始"},[e.createElementVNode("input",{type:"checkbox",checked:t.linkTypeVisibility.startToStart,onChange:n[6]||(n[6]=y=>t.updateLinkVisibility("startToStart",y.target.checked))},null,40,Xd),(e.openBlock(),e.createElementBlock("svg",ec,[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:t.linkTypeColors.startToStart,"stroke-width":"2"},null,8,tc),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:t.linkTypeColors.startToStart},null,8,nc)])),e.createElementVNode("span",oc,e.toDisplayString(t.t("link.ss")),1),e.createElementVNode("span",ac,e.toDisplayString(t.t("link.startToStart")),1)],2),e.createElementVNode("label",{class:e.normalizeClass(["legend-item",{disabled:!t.linkTypeVisibility.finishToFinish}]),title:"完成-完成:两个任务同时完成"},[e.createElementVNode("input",{type:"checkbox",checked:t.linkTypeVisibility.finishToFinish,onChange:n[7]||(n[7]=y=>t.updateLinkVisibility("finishToFinish",y.target.checked))},null,40,rc),(e.openBlock(),e.createElementBlock("svg",sc,[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:t.linkTypeColors.finishToFinish,"stroke-width":"2"},null,8,ic),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:t.linkTypeColors.finishToFinish},null,8,lc)])),e.createElementVNode("span",dc,e.toDisplayString(t.t("link.ff")),1),e.createElementVNode("span",cc,e.toDisplayString(t.t("link.finishToFinish")),1)],2),e.createElementVNode("label",{class:e.normalizeClass(["legend-item",{disabled:!t.linkTypeVisibility.startToFinish}]),title:"开始-完成:前置任务开始后,后续任务才能完成"},[e.createElementVNode("input",{type:"checkbox",checked:t.linkTypeVisibility.startToFinish,onChange:n[8]||(n[8]=y=>t.updateLinkVisibility("startToFinish",y.target.checked))},null,40,uc),(e.openBlock(),e.createElementBlock("svg",fc,[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:t.linkTypeColors.startToFinish,"stroke-width":"2"},null,8,hc),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:t.linkTypeColors.startToFinish},null,8,mc)])),e.createElementVNode("span",pc,e.toDisplayString(t.t("link.sf")),1),e.createElementVNode("span",gc,e.toDisplayString(t.t("link.startToFinish")),1)],2)])]),e.createElementVNode("div",yc,[e.createVNode(l)])]),e.createElementVNode("div",kc,[e.createVNode(m,{direction:"row",min:0,max:100,triggerLength:10,paneLengthPercent:t.paneLengthPercent,"onUpdate:paneLengthPercent":n[9]||(n[9]=y=>t.paneLengthPercent=y)},{one:e.withCtx(()=>[e.createVNode(u,{headersHeight:t.styleConfig.headersHeight,rowHeight:t.styleConfig.rowHeight},null,8,["headersHeight","rowHeight"])]),two:e.withCtx(()=>[e.createVNode(c,{ref:"barContent",headersHeight:t.styleConfig.headersHeight,rowHeight:t.styleConfig.rowHeight},null,8,["headersHeight","rowHeight"])]),_:1},8,["paneLengthPercent"])])],512)}const dn=Se(Ed,[["render",bc],["__scopeId","data-v-9753c43c"]]),wc=e.defineComponent({name:"GanttThemeSelector",setup(){const{t}=ze(),n=e.ref(!1),o=e.inject("currentTheme",e.ref("metro")),r=e.ref(""),s=e.ref(),i=e.ref(He),a=e.inject("ganttContainer"),l=()=>{n.value=!n.value},u=()=>{n.value=!1,y()},c=S=>{o.value=S,r.value="",h(S);let D=null;if(a&&a.value?D=a.value:D=document.querySelector(".gantt-container")||document.querySelector(".page")||document.querySelector('[class*="gantt"]'),D){D.setAttribute("data-gantt-theme",S);const V=document.querySelector(".page");V&&V.setAttribute("data-gantt-theme",S);try{localStorage.setItem("gantt-theme",S)}catch(C){console.warn("Failed to save theme:",C)}setTimeout(()=>{D&&(D.style.display="none",D.offsetHeight,D.style.display="")},50)}u()},m=S=>{S!==o.value&&a&&a.value&&(r.value=S,h(S))},y=()=>{r.value&&a&&a.value&&(r.value="",h(o.value))},w=()=>{const S=Le.exportThemeConfig(),D=new Blob([S],{type:"application/json"}),V=URL.createObjectURL(D),C=document.createElement("a");C.href=V,C.download=`gantt-theme-config-${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(V)},I=()=>{var S;(S=s.value)==null||S.click()},g=S=>{var V;const D=(V=S.target.files)==null?void 0:V[0];if(D){const C=new FileReader;C.onload=K=>{var q;try{const j=(q=K.target)==null?void 0:q.result;Le.importThemeConfig(j)?(o.value=Le.getCurrentTheme(),alert("主题配置导入成功!")):alert("主题配置文件格式错误!")}catch{alert("主题配置文件格式错误!")}},C.readAsText(D)}},F=S=>{S.target.closest(".gantt-theme-selector")||u()},h=S=>{const D=document.getElementById("gantt-theme-styles");D&&D.remove();const V=He.find(j=>j.id===S);if(!V)return;const C=document.createElement("style");C.id="gantt-theme-styles";const K=Object.entries(V.cssVariables).map(([j,X])=>`${j}: ${X};`).join(`
|
|
1
|
+
(function(ve,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("dayjs"),require("svg.js"),require("interactjs")):typeof define=="function"&&define.amd?define(["exports","vue","dayjs","svg.js","interactjs"],t):(ve=typeof globalThis<"u"?globalThis:ve||self,t(ve.Vue3Gantt={},ve.Vue,ve.dayjs,ve.SVG,ve.interact))})(this,function(ve,t,g,$n,nt){"use strict";var uf=Object.defineProperty;var ff=(ve,t,g)=>t in ve?uf(ve,t,{enumerable:!0,configurable:!0,writable:!0,value:g}):ve[t]=g;var ht=(ve,t,g)=>ff(ve,typeof t!="symbol"?t+"":t,g);function en(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var tn={exports:{}},Ca=tn.exports,Rn;function Sa(){return Rn||(Rn=1,function(e,n){(function(a,r){e.exports=r()})(Ca,function(){var a={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,i=/\d\d/,o=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,h={},f=function(d){return(d=+d)+(d>68?1900:2e3)},k=function(d){return function(z){this[d]=+z}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(d){(this.zone||(this.zone={})).offset=function(z){if(!z||z==="Z")return 0;var B=z.match(/([+-]|\d\d)/g),W=60*B[1]+(+B[2]||0);return W===0?0:B[0]==="+"?-W:W}(d)}],v=function(d){var z=h[d];return z&&(z.indexOf?z:z.s.concat(z.f))},H=function(d,z){var B,W=h.meridiem;if(W){for(var R=1;R<=24;R+=1)if(d.indexOf(W(R,0,z))>-1){B=R>12;break}}else B=d===(z?"pm":"PM");return B},b={A:[l,function(d){this.afternoon=H(d,!1)}],a:[l,function(d){this.afternoon=H(d,!0)}],Q:[s,function(d){this.month=3*(d-1)+1}],S:[s,function(d){this.milliseconds=100*+d}],SS:[i,function(d){this.milliseconds=10*+d}],SSS:[/\d{3}/,function(d){this.milliseconds=+d}],s:[o,k("seconds")],ss:[o,k("seconds")],m:[o,k("minutes")],mm:[o,k("minutes")],H:[o,k("hours")],h:[o,k("hours")],HH:[o,k("hours")],hh:[o,k("hours")],D:[o,k("day")],DD:[i,k("day")],Do:[l,function(d){var z=h.ordinal,B=d.match(/\d+/);if(this.day=B[0],z)for(var W=1;W<=31;W+=1)z(W).replace(/\[|\]/g,"")===d&&(this.day=W)}],w:[o,k("week")],ww:[i,k("week")],M:[o,k("month")],MM:[i,k("month")],MMM:[l,function(d){var z=v("months"),B=(v("monthsShort")||z.map(function(W){return W.slice(0,3)})).indexOf(d)+1;if(B<1)throw new Error;this.month=B%12||B}],MMMM:[l,function(d){var z=v("months").indexOf(d)+1;if(z<1)throw new Error;this.month=z%12||z}],Y:[/[+-]?\d+/,k("year")],YY:[i,function(d){this.year=f(d)}],YYYY:[/\d{4}/,k("year")],Z:p,ZZ:p};function $(d){var z,B;z=d,B=h&&h.formats;for(var W=(d=z.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(I,X,le){var L=le&&le.toUpperCase();return X||B[le]||a[le]||B[L].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(O,m,c){return m||c.slice(1)})})).match(r),R=W.length,C=0;C<R;C+=1){var A=W[C],oe=b[A],x=oe&&oe[0],se=oe&&oe[1];W[C]=se?{regex:x,parser:se}:A.replace(/^\[|\]$/g,"")}return function(I){for(var X={},le=0,L=0;le<R;le+=1){var O=W[le];if(typeof O=="string")L+=O.length;else{var m=O.regex,c=O.parser,w=I.slice(L),y=m.exec(w)[0];c.call(X,y),I=I.replace(y,"")}}return function(T){var E=T.afternoon;if(E!==void 0){var M=T.hours;E?M<12&&(T.hours+=12):M===12&&(T.hours=0),delete T.afternoon}}(X),X}}return function(d,z,B){B.p.customParseFormat=!0,d&&d.parseTwoDigitYear&&(f=d.parseTwoDigitYear);var W=z.prototype,R=W.parse;W.parse=function(C){var A=C.date,oe=C.utc,x=C.args;this.$u=oe;var se=x[1];if(typeof se=="string"){var I=x[2]===!0,X=x[3]===!0,le=I||X,L=x[2];X&&(L=x[2]),h=this.$locale(),!I&&L&&(h=B.Ls[L]),this.$d=function(w,y,T,E){try{if(["x","X"].indexOf(y)>-1)return new Date((y==="X"?1e3:1)*w);var M=$(y)(w),V=M.year,Z=M.month,Y=M.day,J=M.hours,pe=M.minutes,ye=M.seconds,Te=M.milliseconds,ce=M.zone,ie=M.week,F=new Date,He=Y||(V||Z?1:F.getDate()),N=V||F.getFullYear(),P=0;V&&!Z||(P=Z>0?Z-1:F.getMonth());var j,G=J||0,ee=pe||0,Ye=ye||0,Ee=Te||0;return ce?new Date(Date.UTC(N,P,He,G,ee,Ye,Ee+60*ce.offset*1e3)):T?new Date(Date.UTC(N,P,He,G,ee,Ye,Ee)):(j=new Date(N,P,He,G,ee,Ye,Ee),ie&&(j=E(j).week(ie).toDate()),j)}catch{return new Date("")}}(A,se,oe,B),this.init(),L&&L!==!0&&(this.$L=this.locale(L).$L),le&&A!=this.format(se)&&(this.$d=new Date("")),h={}}else if(se instanceof Array)for(var O=se.length,m=1;m<=O;m+=1){x[1]=se[m-1];var c=B.apply(this,x);if(c.isValid()){this.$d=c.$d,this.$L=c.$L,this.init();break}m===O&&(this.$d=new Date(""))}else R.call(this,C)}}})}(tn)),tn.exports}var va=Sa();const Da=en(va);var nn={exports:{}},Ta=nn.exports,zn;function Ma(){return zn||(zn=1,function(e,n){(function(a,r){e.exports=r()})(Ta,function(){var a="month",r="quarter";return function(s,i){var o=i.prototype;o.quarter=function(f){return this.$utils().u(f)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(f-1))};var l=o.add;o.add=function(f,k){return f=Number(f),this.$utils().p(k)===r?this.add(3*f,a):l.bind(this)(f,k)};var h=o.startOf;o.startOf=function(f,k){var p=this.$utils(),v=!!p.u(k)||k;if(p.p(f)===r){var H=this.quarter()-1;return v?this.month(3*H).startOf(a).startOf("day"):this.month(3*H+2).endOf(a).endOf("day")}return h.bind(this)(f,k)}}})}(nn)),nn.exports}var $a=Ma();const Ea=en($a);var an={exports:{}},Va=an.exports,On;function Na(){return On||(On=1,function(e,n){(function(a,r){e.exports=r(g)})(Va,function(a){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var s=r(a),i={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(o,l){return l==="W"?o+"周":o+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(o,l){var h=100*o+l;return h<600?"凌晨":h<900?"早上":h<1100?"上午":h<1300?"中午":h<1800?"下午":"晚上"}};return s.default.locale(i,null,!0),i})}(an)),an.exports}Na();var on={exports:{}},_a=on.exports,Pn;function Aa(){return Pn||(Pn=1,function(e,n){(function(a,r){e.exports=r(g)})(_a,function(a){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var s=r(a),i={name:"zh-tw",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(o,l){return l==="W"?o+"週":o+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"},meridiem:function(o,l){var h=100*o+l;return h<600?"凌晨":h<900?"早上":h<1100?"上午":h<1300?"中午":h<1800?"下午":"晚上"}};return s.default.locale(i,null,!0),i})}(on)),on.exports}Aa();var rn={exports:{}},La=rn.exports,xn;function Ba(){return xn||(xn=1,function(e,n){(function(a,r){e.exports=r()})(La,function(){return{name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(a){var r=["th","st","nd","rd"],s=a%100;return"["+a+(r[(s-20)%10]||r[s]||r[0])+"]"}}})}(rn)),rn.exports}Ba();var sn={exports:{}},Ha=sn.exports,Gn;function Ya(){return Gn||(Gn=1,function(e,n){(function(a,r){e.exports=r(g)})(Ha,function(a){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var s=r(a),i={name:"ja",weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(o){return o+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiem:function(o){return o<12?"午前":"午後"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}};return s.default.locale(i,null,!0),i})}(sn)),sn.exports}Ya();var ln={exports:{}},Fa=ln.exports,qn;function Ia(){return qn||(qn=1,function(e,n){(function(a,r){e.exports=r(g)})(Fa,function(a){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var s=r(a),i={name:"ko",weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),ordinal:function(o){return o+"일"},formats:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},meridiem:function(o){return o<12?"오전":"오후"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"}};return s.default.locale(i,null,!0),i})}(ln)),ln.exports}Ia();var dn={exports:{}},Ra=dn.exports,Un;function za(){return Un||(Un=1,function(e,n){(function(a,r){e.exports=r(g)})(Ra,function(a){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var s=r(a),i={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(o){return""+o+(o===1?"er":"")}};return s.default.locale(i,null,!0),i})}(dn)),dn.exports}za();var cn={exports:{}},Oa=cn.exports,Wn;function Pa(){return Wn||(Wn=1,function(e,n){(function(a,r){e.exports=r(g)})(Oa,function(a){function r(h){return h&&typeof h=="object"&&"default"in h?h:{default:h}}var s=r(a),i={s:"ein paar Sekunden",m:["eine Minute","einer Minute"],mm:"%d Minuten",h:["eine Stunde","einer Stunde"],hh:"%d Stunden",d:["ein Tag","einem Tag"],dd:["%d Tage","%d Tagen"],M:["ein Monat","einem Monat"],MM:["%d Monate","%d Monaten"],y:["ein Jahr","einem Jahr"],yy:["%d Jahre","%d Jahren"]};function o(h,f,k){var p=i[k];return Array.isArray(p)&&(p=p[f?0:1]),p.replace("%d",h)}var l={name:"de",weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sept._Okt._Nov._Dez.".split("_"),ordinal:function(h){return h+"."},weekStart:1,yearStart:4,formats:{LTS:"HH:mm:ss",LT:"HH:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"vor %s",s:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o}};return s.default.locale(l,null,!0),l})}(cn)),cn.exports}Pa();var un={exports:{}},xa=un.exports,Zn;function Ga(){return Zn||(Zn=1,function(e,n){(function(a,r){e.exports=r(g)})(xa,function(a){function r(o){return o&&typeof o=="object"&&"default"in o?o:{default:o}}var s=r(a),i={name:"es",monthsShort:"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),weekStart:1,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(o){return o+"º"}};return s.default.locale(i,null,!0),i})}(un)),un.exports}Ga();var fn={exports:{}},qa=fn.exports,Jn;function Ua(){return Jn||(Jn=1,function(e,n){(function(a,r){e.exports=r(g)})(qa,function(a){function r(b){return b&&typeof b=="object"&&"default"in b?b:{default:b}}var s=r(a),i="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),o="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),l="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),h="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),f=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function k(b,$,d){var z,B;return d==="m"?$?"минута":"минуту":b+" "+(z=+b,B={mm:$?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[d].split("_"),z%10==1&&z%100!=11?B[0]:z%10>=2&&z%10<=4&&(z%100<10||z%100>=20)?B[1]:B[2])}var p=function(b,$){return f.test($)?i[b.month()]:o[b.month()]};p.s=o,p.f=i;var v=function(b,$){return f.test($)?l[b.month()]:h[b.month()]};v.s=h,v.f=l;var H={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:p,monthsShort:v,weekStart:1,yearStart:4,formats:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:k,mm:k,h:"час",hh:k,d:"день",dd:k,M:"месяц",MM:k,y:"год",yy:k},ordinal:function(b){return b},meridiem:function(b){return b<4?"ночи":b<12?"утра":b<17?"дня":"вечера"}};return s.default.locale(H,null,!0),H})}(fn)),fn.exports}Ua();const Wa=Symbol("SetBarColor"),Za=Symbol("SetTaskType"),Ja=Symbol("AddRootTask"),Mt={SetBarColorSymbol:Wa,SetTaskTypeSymbol:Za,AddRootTaskSymbol:Ja};var Yt=(e=>(e.TASK="task",e.PROJECT="project",e.MILESTONE="milestone",e))(Yt||{}),me=(e=>(e.FINISH_TO_START="finish-to-start",e.START_TO_START="start-to-start",e.FINISH_TO_FINISH="finish-to-finish",e.START_TO_FINISH="start-to-finish",e.PARENT_CHILD="parent-child",e))(me||{}),Ue=(e=>(e.STRAIGHT="straight",e.BEZIER="bezier",e.RIGHT_ANGLE="right-angle",e))(Ue||{});const gt={default:{color:"#3498db",width:2,dashArray:void 0,showArrow:!0,arrowColor:void 0,arrowSize:8,showLabels:!1,labelColor:"#666",labelFontSize:12,cornerRadius:5,pathType:Ue.BEZIER,bezierCurvature:.4,rightAngleOffset:30,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:.8,parentChildStyle:{color:"#95a5a6",width:1,dashArray:"3,3"},linkTypeColors:{finishToStart:"#3498db",startToStart:"#2ecc71",finishToFinish:"#e74c3c",startToFinish:"#f39c12"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}},business:{color:"#2c3e50",width:2,dashArray:void 0,showArrow:!0,arrowColor:"#e74c3c",arrowSize:10,showLabels:!0,labelColor:"#34495e",labelFontSize:11,cornerRadius:8,pathType:Ue.RIGHT_ANGLE,bezierCurvature:.3,rightAngleOffset:40,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:.6,parentChildStyle:{color:"#7f8c8d",width:2,dashArray:"5,2"},linkTypeColors:{finishToStart:"#2c3e50",startToStart:"#27ae60",finishToFinish:"#c0392b",startToFinish:"#d35400"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}},modern:{color:"#00bcd4",width:3,dashArray:void 0,showArrow:!0,arrowColor:"#ff5722",arrowSize:12,showLabels:!1,labelColor:"#607d8b",labelFontSize:12,cornerRadius:10,pathType:Ue.BEZIER,bezierCurvature:.6,rightAngleOffset:50,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:1,parentChildStyle:{color:"#90a4ae",width:2,dashArray:"8,4"},linkTypeColors:{finishToStart:"#00bcd4",startToStart:"#4caf50",finishToFinish:"#f44336",startToFinish:"#ff9800"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}},minimal:{color:"#666",width:1,dashArray:void 0,showArrow:!1,arrowColor:void 0,arrowSize:6,showLabels:!1,labelColor:"#999",labelFontSize:10,cornerRadius:3,pathType:Ue.STRAIGHT,bezierCurvature:.2,rightAngleOffset:20,smoothCorners:!1,enableDashAnimation:!1,dashAnimationSpeed:.8,parentChildStyle:{color:"#ccc",width:1,dashArray:"2,2"},linkTypeColors:{finishToStart:"#666",startToStart:"#888",finishToFinish:"#555",startToFinish:"#777"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}},colorful:{color:"#9c27b0",width:2,dashArray:void 0,showArrow:!0,arrowColor:"#ff9800",arrowSize:9,showLabels:!0,labelColor:"#673ab7",labelFontSize:11,cornerRadius:6,pathType:Ue.RIGHT_ANGLE,bezierCurvature:.5,rightAngleOffset:35,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:1,parentChildStyle:{color:"#4caf50",width:2,dashArray:"4,3"},linkTypeColors:{finishToStart:"#9c27b0",startToStart:"#4caf50",finishToFinish:"#e91e63",startToFinish:"#ff9800"},linkTypeVisibility:{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}}},jn={[me.FINISH_TO_START]:{name:"完成-开始",description:"前置任务完成后,后续任务才能开始",color:"#3498db",priority:1},[me.START_TO_START]:{name:"开始-开始",description:"两个任务同时开始",color:"#2ecc71",priority:2},[me.FINISH_TO_FINISH]:{name:"完成-完成",description:"两个任务同时完成",color:"#e74c3c",priority:3},[me.START_TO_FINISH]:{name:"开始-完成",description:"前置任务开始后,后续任务才能完成",color:"#f39c12",priority:4},[me.PARENT_CHILD]:{name:"父子关系",description:"显示任务的层级关系",color:"#95a5a6",priority:0}};function mn(e){return JSON.parse(JSON.stringify(e))}class ja{constructor(){ht(this,"config");ht(this,"STORAGE_KEY","gantt-link-config");this.config=t.reactive(mn(gt.default)),this.loadFromStorage()}deepMergeConfig(n){if(this.config.linkTypeVisibility||(this.config.linkTypeVisibility=mn(gt.default.linkTypeVisibility)),this.config.linkTypeColors||(this.config.linkTypeColors=mn(gt.default.linkTypeColors)),this.config.parentChildStyle||(this.config.parentChildStyle=mn(gt.default.parentChildStyle)),n.linkTypeVisibility&&this.config.linkTypeVisibility){const o=n.linkTypeVisibility;o.finishToStart!==void 0&&(this.config.linkTypeVisibility.finishToStart=o.finishToStart),o.startToStart!==void 0&&(this.config.linkTypeVisibility.startToStart=o.startToStart),o.finishToFinish!==void 0&&(this.config.linkTypeVisibility.finishToFinish=o.finishToFinish),o.startToFinish!==void 0&&(this.config.linkTypeVisibility.startToFinish=o.startToFinish),o.parentChild!==void 0&&(this.config.linkTypeVisibility.parentChild=o.parentChild)}if(n.linkTypeColors&&this.config.linkTypeColors){const o=n.linkTypeColors;o.finishToStart!==void 0&&(this.config.linkTypeColors.finishToStart=o.finishToStart),o.startToStart!==void 0&&(this.config.linkTypeColors.startToStart=o.startToStart),o.finishToFinish!==void 0&&(this.config.linkTypeColors.finishToFinish=o.finishToFinish),o.startToFinish!==void 0&&(this.config.linkTypeColors.startToFinish=o.startToFinish)}if(n.parentChildStyle&&this.config.parentChildStyle){const o=n.parentChildStyle;o.color!==void 0&&(this.config.parentChildStyle.color=o.color),o.width!==void 0&&(this.config.parentChildStyle.width=o.width),o.dashArray!==void 0&&(this.config.parentChildStyle.dashArray=o.dashArray)}const{linkTypeVisibility:a,linkTypeColors:r,parentChildStyle:s,...i}=n;Object.assign(this.config,i)}loadFromStorage(){try{const n=localStorage.getItem(this.STORAGE_KEY);if(n){const a=JSON.parse(n);this.deepMergeConfig(a)}}catch(n){console.warn("加载连线配置失败,使用默认配置:",n)}}saveToStorage(){try{localStorage.setItem(this.STORAGE_KEY,JSON.stringify(this.config))}catch(n){console.warn("保存连线配置失败:",n)}}getConfig(){return this.config}setTheme(n){this.deepMergeConfig({...gt[n]}),this.saveToStorage()}updateConfig(n){this.deepMergeConfig(n),this.saveToStorage()}reset(){this.deepMergeConfig({...gt.default}),this.saveToStorage()}getLinkStyle(n){const a=jn[n];return n===me.PARENT_CHILD?{color:this.config.parentChildStyle.color,width:this.config.parentChildStyle.width,dashArray:this.config.parentChildStyle.dashArray}:{color:a.color,width:this.config.width,dashArray:this.config.dashArray}}exportConfig(){return JSON.stringify(this.config,null,2)}importConfig(n){try{const a=JSON.parse(n);return this.updateConfig(a),!0}catch(a){return console.error("导入配置失败:",a),!1}}clearStorage(){try{localStorage.removeItem(this.STORAGE_KEY),this.reset()}catch(n){console.warn("清除配置失败:",n)}}}const Je=new ja;function Ft(){return{config:Je.getConfig(),setTheme:Je.setTheme.bind(Je),updateConfig:Je.updateConfig.bind(Je),reset:Je.reset.bind(Je),getLinkStyle:Je.getLinkStyle.bind(Je),exportConfig:Je.exportConfig.bind(Je),importConfig:Je.importConfig.bind(Je),clearStorage:Je.clearStorage.bind(Je),themes:gt,linkTypes:jn}}class Ka{constructor(){ht(this,"dependencies",t.reactive([]));ht(this,"STORAGE_KEY","gantt-link-dependencies");this.loadFromStorage()}loadFromStorage(){try{const n=localStorage.getItem(this.STORAGE_KEY);if(n){const a=JSON.parse(n);this.dependencies.splice(0,this.dependencies.length,...a)}}catch(n){console.warn("加载连线依赖关系失败:",n)}}saveToStorage(){try{localStorage.setItem(this.STORAGE_KEY,JSON.stringify(this.dependencies))}catch(n){console.warn("保存连线依赖关系失败:",n)}}addDependency(n){const a=`link-${Date.now()}-${Math.random().toString(36).substring(2,11)}`;return this.dependencies.push({...n,id:a}),this.saveToStorage(),a}removeDependency(n){const a=this.dependencies.findIndex(r=>r.id===n);return a>-1?(this.dependencies.splice(a,1),this.saveToStorage(),!0):!1}getDependencies(){return this.dependencies}getTaskDependencies(n){return this.dependencies.filter(a=>a.sourceTaskId===n||a.targetTaskId===n)}clear(){this.dependencies.splice(0),this.saveToStorage()}clearStorage(){try{localStorage.removeItem(this.STORAGE_KEY),this.clear()}catch(n){console.warn("清除依赖关系失败:",n)}}wouldCreateCycle(n,a){const r=new Set,s=new Set,i=l=>{if(s.has(l))return!0;if(r.has(l))return!1;r.add(l),s.add(l);const h=this.dependencies.filter(f=>f.sourceTaskId===l);for(const f of h)if(i(f.targetTaskId))return!0;return s.delete(l),!1};this.dependencies.push({id:"temp",sourceTaskId:n,targetTaskId:a,type:me.FINISH_TO_START});const o=i(n);return this.dependencies.pop(),o}}const hn=new Ka,En={"zh-CN":{common:{confirm:"确定",cancel:"取消",save:"保存",delete:"删除",edit:"编辑",add:"添加",close:"关闭",export:"导出",import:"导入",config:"配置",settings:"设置",theme:"主题",to:"至",selectDate:"请选择日期"},date:{year:"年",month:"月",day:"日",hour:"时",week:"周",today:"今天",monday:"一",tuesday:"二",wednesday:"三",thursday:"四",friday:"五",saturday:"六",sunday:"日",january:"一月",february:"二月",march:"三月",april:"四月",may:"五月",june:"六月",july:"七月",august:"八月",september:"九月",october:"十月",november:"十一月",december:"十二月"},dateFormat:{full:"YYYY年MM月DD日",short:"YYYY-MM-DD",monthDay:"MM月DD日",yearMonth:"YYYY年MM月"},viewMode:{quarter:"季度",month:"月",week:"周",day:"日",hour:"时",daySubMode:"日模式细分",fullDay:"全天",halfDay:"半天","15min":"15分钟","30min":"30分钟"},durationUnit:{quarters:"季度",months:"月",weeks:"周",days:"天",hours:"小时",minutes:"分钟",hoursAndMinutes:"{hours}小时{minutes}分钟"},task:{addRoot:"添加根任务",addSub:"添加子任务",remove:"删除任务",edit:"编辑任务",name:"任务名称",priority:"优先级",startDate:"开始时间",endDate:"结束时间",duration:"耗时",progress:"进度",serialNumber:"序号",type:"类型",taskType:"任务",projectType:"项目",milestoneType:"里程碑"},link:{legend:"连线图例",parentChild:"父子关系",finishToStart:"完成-开始",startToStart:"开始-开始",finishToFinish:"完成-完成",startToFinish:"开始-完成",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"甘特图配置",themeSettings:"主题设置",linkSettings:"连线设置",languageSettings:"语言设置",currentTheme:"当前",previewTheme:"预览",exportConfig:"导出配置",importConfig:"导入配置",linkConfig:{info:"以下配置用于任务依赖连线(完成-开始、开始-开始等关系)",pathType:"路径类型",straight:"直线",bezier:"贝塞尔",rightAngle:"直角",color:"颜色",width:"线宽",dashStyle:"虚线样式",solid:"实线",shortDash:"短虚线",mediumDash:"中虚线",longDash:"长虚线",dotDash:"点划线",curvature:"弯曲度",offset:"偏移距离",smoothCorners:"平滑转角",cornerRadius:"转角半径",showArrow:"显示箭头",arrowSize:"箭头大小",arrowColor:"箭头颜色",syncColor:"同步",dashAnimation:"虚线流动动画",animationSpeed:"动画速度",showLabels:"显示标签",labelColor:"标签颜色",fontSize:"字体大小",typeColors:"依赖类型颜色",parentChildStyle:"父子关系连线样式",parentChildInfo:"用于显示父任务与子任务之间的层级结构关系"}},theme:{metro:"Metro 金属质感",light:"浅色主题",dark:"深色主题",colorful:"多彩主题",ocean:"海洋主题",apple:"Apple 苹果风格",classic:"经典商务",liquidGlass:"Liquid Glass 液态玻璃",metroDesc:"经典 Windows Metro 风格",lightDesc:"清爽明亮的浅色风格",darkDesc:"优雅专业的深色风格",colorfulDesc:"活力四射的多彩风格",oceanDesc:"沉静舒适的海洋风格",appleDesc:"简约优雅的 macOS 风格",classicDesc:"传统稳重的商务风格",liquidGlassDesc:"iOS 26 液态玻璃效果,半透明流动质感"},datePicker:{selectDate:"请选择日期",clearDate:"清除日期"},columnSettings:{title:"列显示设置",desc:"勾选要显示的列",showAll:"全部显示",hideAll:"全部隐藏",reset:"恢复默认"},tooltip:{addSubTask:"添加子任务",removeTask:"删除当前任务",syncArrowColor:"与线条颜色同步",close:"关闭",columnSettings:"列显示设置"}},"zh-TW":{common:{confirm:"確定",cancel:"取消",save:"儲存",delete:"刪除",edit:"編輯",add:"新增",close:"關閉",export:"匯出",import:"匯入",config:"配置",settings:"設定",theme:"主題",to:"至",selectDate:"請選擇日期"},date:{year:"年",month:"月",day:"日",hour:"時",week:"週",today:"今天",monday:"一",tuesday:"二",wednesday:"三",thursday:"四",friday:"五",saturday:"六",sunday:"日",january:"一月",february:"二月",march:"三月",april:"四月",may:"五月",june:"六月",july:"七月",august:"八月",september:"九月",october:"十月",november:"十一月",december:"十二月"},dateFormat:{full:"YYYY年MM月DD日",short:"YYYY-MM-DD",monthDay:"MM月DD日",yearMonth:"YYYY年MM月"},viewMode:{quarter:"季度",month:"月",week:"週",day:"日",hour:"時",daySubMode:"日模式細分",fullDay:"全天",halfDay:"半天","15min":"15分鐘","30min":"30分鐘"},durationUnit:{quarters:"季度",months:"月",weeks:"週",days:"天",hours:"小時",minutes:"分鐘",hoursAndMinutes:"{hours}小時{minutes}分鐘"},task:{addRoot:"新增根任務",addSub:"新增子任務",remove:"刪除任務",edit:"編輯任務",name:"任務名稱",priority:"優先級",startDate:"開始時間",endDate:"結束時間",duration:"耗時",progress:"進度",serialNumber:"序號",type:"類型",taskType:"任務",projectType:"專案",milestoneType:"里程碑"},link:{legend:"連線圖例",parentChild:"父子關係",finishToStart:"完成-開始",startToStart:"開始-開始",finishToFinish:"完成-完成",startToFinish:"開始-完成",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"甘特圖配置",themeSettings:"主題設定",linkSettings:"連線設定",languageSettings:"語言設定",currentTheme:"當前",previewTheme:"預覽",exportConfig:"匯出配置",importConfig:"匯入配置",linkConfig:{info:"以下配置用於任務依賴連線(完成-開始、開始-開始等關係)",pathType:"路徑類型",straight:"直線",bezier:"貝茲曲線",rightAngle:"直角",color:"顏色",width:"線寬",dashStyle:"虛線樣式",solid:"實線",shortDash:"短虛線",mediumDash:"中虛線",longDash:"長虛線",dotDash:"點劃線",curvature:"彎曲度",offset:"偏移距離",smoothCorners:"平滑轉角",cornerRadius:"轉角半徑",showArrow:"顯示箭頭",arrowSize:"箭頭大小",arrowColor:"箭頭顏色",syncColor:"同步",dashAnimation:"虛線流動動畫",animationSpeed:"動畫速度",showLabels:"顯示標籤",labelColor:"標籤顏色",fontSize:"字體大小",typeColors:"依賴類型顏色",parentChildStyle:"父子關係連線樣式",parentChildInfo:"用於顯示父任務與子任務之間的層級結構關係"}},theme:{metro:"Metro 金屬質感",light:"淺色主題",dark:"深色主題",colorful:"多彩主題",ocean:"海洋主題",apple:"Apple 蘋果風格",classic:"經典商務",liquidGlass:"Liquid Glass 液態玻璃",metroDesc:"經典 Windows Metro 風格",lightDesc:"清爽明亮的淺色風格",darkDesc:"優雅專業的深色風格",colorfulDesc:"活力四射的多彩風格",oceanDesc:"沉靜舒適的海洋風格",appleDesc:"簡約優雅的 macOS 風格",classicDesc:"傳統穩重的商務風格",liquidGlassDesc:"iOS 26 液態玻璃效果,半透明流動質感"},datePicker:{selectDate:"請選擇日期",clearDate:"清除日期"},columnSettings:{title:"列顯示設定",desc:"勾選要顯示的列",showAll:"全部顯示",hideAll:"全部隱藏",reset:"恢復預設"},tooltip:{addSubTask:"新增子任務",removeTask:"刪除當前任務",syncArrowColor:"與線條顏色同步",close:"關閉",columnSettings:"列顯示設定"}},"en-US":{common:{confirm:"Confirm",cancel:"Cancel",save:"Save",delete:"Delete",edit:"Edit",add:"Add",close:"Close",export:"Export",import:"Import",config:"Config",settings:"Settings",theme:"Theme",to:"to",selectDate:"Select Date"},date:{year:"Year",month:"Month",day:"Day",hour:"Hour",week:"Week",today:"Today",monday:"Mon",tuesday:"Tue",wednesday:"Wed",thursday:"Thu",friday:"Fri",saturday:"Sat",sunday:"Sun",january:"January",february:"February",march:"March",april:"April",may:"May",june:"June",july:"July",august:"August",september:"September",october:"October",november:"November",december:"December"},dateFormat:{full:"MMMM DD, YYYY",short:"MM/DD/YYYY",monthDay:"MMM DD",yearMonth:"MMMM YYYY"},viewMode:{quarter:"Quarter",month:"Month",week:"Week",day:"Day",hour:"Hour",daySubMode:"Day Sub-Mode",fullDay:"Full Day",halfDay:"Half Day","15min":"15 Minutes","30min":"30 Minutes"},durationUnit:{quarters:"quarters",months:"months",weeks:"weeks",days:"days",hours:"hours",minutes:"minutes",hoursAndMinutes:"{hours}h {minutes}m"},task:{addRoot:"Add Root Task",addSub:"Add Sub Task",remove:"Delete Task",edit:"Edit Task",name:"Task Name",priority:"Priority",startDate:"Start Date",endDate:"End Date",duration:"Duration",progress:"Progress",serialNumber:"No.",type:"Type",taskType:"Task",projectType:"Project",milestoneType:"Milestone"},link:{legend:"Link Legend",parentChild:"Parent-Child",finishToStart:"Finish-to-Start",startToStart:"Start-to-Start",finishToFinish:"Finish-to-Finish",startToFinish:"Start-to-Finish",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"Gantt Configuration",themeSettings:"Theme Settings",linkSettings:"Link Settings",languageSettings:"Language Settings",currentTheme:"Current",previewTheme:"Preview",exportConfig:"Export Config",importConfig:"Import Config",linkConfig:{info:"Configure task dependency links (Finish-to-Start, Start-to-Start, etc.)",pathType:"Path Type",straight:"Straight",bezier:"Bezier",rightAngle:"Right Angle",color:"Color",width:"Line Width",dashStyle:"Dash Style",solid:"Solid",shortDash:"Short Dash",mediumDash:"Medium Dash",longDash:"Long Dash",dotDash:"Dot Dash",curvature:"Curvature",offset:"Offset Distance",smoothCorners:"Smooth Corners",cornerRadius:"Corner Radius",showArrow:"Show Arrow",arrowSize:"Arrow Size",arrowColor:"Arrow Color",syncColor:"Sync",dashAnimation:"Dash Animation",animationSpeed:"Animation Speed",showLabels:"Show Labels",labelColor:"Label Color",fontSize:"Font Size",typeColors:"Dependency Type Colors",parentChildStyle:"Parent-Child Link Style",parentChildInfo:"Display hierarchical relationship between parent and child tasks"}},theme:{metro:"Metro",light:"Light",dark:"Dark",colorful:"Colorful",ocean:"Ocean",apple:"Apple",classic:"Classic",liquidGlass:"Liquid Glass",metroDesc:"Classic Windows Metro style",lightDesc:"Fresh and bright light style",darkDesc:"Elegant and professional dark style",colorfulDesc:"Vibrant and colorful style",oceanDesc:"Calm and comfortable ocean style",appleDesc:"Minimalist and elegant macOS style",classicDesc:"Traditional and stable business style",liquidGlassDesc:"iOS 26 Liquid Glass effect with translucent fluidity"},datePicker:{selectDate:"Select Date",clearDate:"Clear Date"},columnSettings:{title:"Column Display Settings",desc:"Check columns to display",showAll:"Show All",hideAll:"Hide All",reset:"Reset Default"},tooltip:{addSubTask:"Add Sub Task",removeTask:"Delete Current Task",syncArrowColor:"Sync with line color",close:"Close",columnSettings:"Column Display Settings"}},"ja-JP":{common:{confirm:"確認",cancel:"キャンセル",save:"保存",delete:"削除",edit:"編集",add:"追加",close:"閉じる",export:"エクスポート",import:"インポート",config:"設定",settings:"設定",theme:"テーマ",to:"から",selectDate:"日付を選択"},date:{year:"年",month:"月",day:"日",hour:"時",week:"週",today:"今日",monday:"月",tuesday:"火",wednesday:"水",thursday:"木",friday:"金",saturday:"土",sunday:"日",january:"1月",february:"2月",march:"3月",april:"4月",may:"5月",june:"6月",july:"7月",august:"8月",september:"9月",october:"10月",november:"11月",december:"12月"},dateFormat:{full:"YYYY年MM月DD日",short:"YYYY/MM/DD",monthDay:"MM月DD日",yearMonth:"YYYY年MM月"},viewMode:{quarter:"四半期",month:"月",week:"週",day:"日",hour:"時",daySubMode:"日モードサブ",fullDay:"終日",halfDay:"半日","15min":"15分","30min":"30分"},durationUnit:{quarters:"四半期",months:"ヶ月",weeks:"週間",days:"日",hours:"時間",minutes:"分",hoursAndMinutes:"{hours}時間{minutes}分"},task:{addRoot:"ルートタスクを追加",addSub:"サブタスクを追加",remove:"タスクを削除",edit:"タスクを編集",name:"タスク名",priority:"優先度",startDate:"開始日",endDate:"終了日",duration:"期間",progress:"進捗",serialNumber:"番号",type:"タイプ",taskType:"タスク",projectType:"プロジェクト",milestoneType:"マイルストーン"},link:{legend:"リンク凡例",parentChild:"親子関係",finishToStart:"終了-開始",startToStart:"開始-開始",finishToFinish:"終了-終了",startToFinish:"開始-終了",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"ガントチャート設定",themeSettings:"テーマ設定",linkSettings:"リンク設定",languageSettings:"言語設定",currentTheme:"現在",previewTheme:"プレビュー",exportConfig:"設定をエクスポート",importConfig:"設定をインポート",linkConfig:{info:"タスク依存関係リンク(終了-開始、開始-開始など)を設定",pathType:"パスタイプ",straight:"直線",bezier:"ベジェ曲線",rightAngle:"直角",color:"色",width:"線の太さ",dashStyle:"破線スタイル",solid:"実線",shortDash:"短い破線",mediumDash:"中破線",longDash:"長い破線",dotDash:"点線破線",curvature:"曲率",offset:"オフセット距離",smoothCorners:"滑らかな角",cornerRadius:"角の半径",showArrow:"矢印を表示",arrowSize:"矢印サイズ",arrowColor:"矢印の色",syncColor:"同期",dashAnimation:"破線アニメーション",animationSpeed:"アニメーション速度",showLabels:"ラベルを表示",labelColor:"ラベルの色",fontSize:"フォントサイズ",typeColors:"依存関係タイプの色",parentChildStyle:"親子リンクスタイル",parentChildInfo:"親タスクと子タスクの階層関係を表示"}},theme:{metro:"メトロ",light:"ライト",dark:"ダーク",colorful:"カラフル",ocean:"オーシャン",apple:"Apple",classic:"クラシック",liquidGlass:"リキッドグラス",metroDesc:"クラシックWindowsメトロスタイル",lightDesc:"明るく爽やかなライトスタイル",darkDesc:"エレガントでプロフェッショナルなダークスタイル",colorfulDesc:"活気あるカラフルスタイル",oceanDesc:"落ち着いた快適なオーシャンスタイル",appleDesc:"ミニマルでエレガントなmacOSスタイル",classicDesc:"伝統的で安定感のあるビジネススタイル",liquidGlassDesc:"iOS 26 リキッドグラス効果、半透明で流動的な質感"},datePicker:{selectDate:"日付を選択",clearDate:"日付をクリア"},columnSettings:{title:"列表示設定",desc:"表示する列を選択",showAll:"すべて表示",hideAll:"すべて非表示",reset:"デフォルトに戻す"},tooltip:{addSubTask:"サブタスクを追加",removeTask:"現在のタスクを削除",syncArrowColor:"線の色と同期",close:"閉じる",columnSettings:"列表示設定"}},"ko-KR":{common:{confirm:"확인",cancel:"취소",save:"저장",delete:"삭제",edit:"편집",add:"추가",close:"닫기",export:"내보내기",import:"가져오기",config:"설정",settings:"설정",theme:"테마",to:"에서",selectDate:"날짜 선택"},date:{year:"년",month:"월",day:"일",hour:"시",week:"주",today:"오늘",monday:"월",tuesday:"화",wednesday:"수",thursday:"목",friday:"금",saturday:"토",sunday:"일",january:"1월",february:"2월",march:"3월",april:"4월",may:"5월",june:"6월",july:"7월",august:"8월",september:"9월",october:"10월",november:"11월",december:"12월"},dateFormat:{full:"YYYY년 MM월 DD일",short:"YYYY-MM-DD",monthDay:"MM월 DD일",yearMonth:"YYYY년 MM월"},viewMode:{quarter:"분기",month:"월",week:"주",day:"일",hour:"시",daySubMode:"일 하위 모드",fullDay:"하루 종일",halfDay:"반나절","15min":"15분","30min":"30분"},durationUnit:{quarters:"분기",months:"개월",weeks:"주",days:"일",hours:"시간",minutes:"분",hoursAndMinutes:"{hours}시간 {minutes}분"},task:{addRoot:"루트 작업 추가",addSub:"하위 작업 추가",remove:"작업 삭제",edit:"작업 편집",name:"작업 이름",priority:"우선순위",startDate:"시작일",endDate:"종료일",duration:"기간",progress:"진행률",serialNumber:"번호",type:"유형",taskType:"작업",projectType:"프로젝트",milestoneType:"마일스톤"},link:{legend:"링크 범례",parentChild:"부모-자식",finishToStart:"종료-시작",startToStart:"시작-시작",finishToFinish:"종료-종료",startToFinish:"시작-종료",fs:"FS",ss:"SS",ff:"FF",sf:"SF",pc:"PC"},configPanel:{title:"간트 차트 설정",themeSettings:"테마 설정",linkSettings:"링크 설정",languageSettings:"언어 설정",currentTheme:"현재",previewTheme:"미리보기",exportConfig:"설정 내보내기",importConfig:"설정 가져오기",linkConfig:{info:"작업 종속성 링크 설정 (종료-시작, 시작-시작 등)",pathType:"경로 유형",straight:"직선",bezier:"베지어 곡선",rightAngle:"직각",color:"색상",width:"선 두께",dashStyle:"파선 스타일",solid:"실선",shortDash:"짧은 파선",mediumDash:"중간 파선",longDash:"긴 파선",dotDash:"점선 파선",curvature:"곡률",offset:"오프셋 거리",smoothCorners:"부드러운 모서리",cornerRadius:"모서리 반경",showArrow:"화살표 표시",arrowSize:"화살표 크기",arrowColor:"화살표 색상",syncColor:"동기화",dashAnimation:"파선 애니메이션",animationSpeed:"애니메이션 속도",showLabels:"레이블 표시",labelColor:"레이블 색상",fontSize:"글꼴 크기",typeColors:"종속성 유형 색상",parentChildStyle:"부모-자식 링크 스타일",parentChildInfo:"부모 작업과 자식 작업의 계층 관계 표시"}},theme:{metro:"메트로",light:"라이트",dark:"다크",colorful:"컬러풀",ocean:"오션",apple:"Apple",classic:"클래식",liquidGlass:"리퀴드 글래스",metroDesc:"클래식 Windows 메트로 스타일",lightDesc:"밝고 상쾌한 라이트 스타일",darkDesc:"우아하고 전문적인 다크 스타일",colorfulDesc:"활기찬 컬러풀 스타일",oceanDesc:"차분하고 편안한 오션 스타일",appleDesc:"미니멀하고 우아한 macOS 스타일",classicDesc:"전통적이고 안정적인 비즈니스 스타일",liquidGlassDesc:"iOS 26 반투명 유동성을 지닌 리퀴드 글래스 효과"},datePicker:{selectDate:"날짜 선택",clearDate:"날짜 지우기"},columnSettings:{title:"열 표시 설정",desc:"표시할 열 선택",showAll:"모두 표시",hideAll:"모두 숨기기",reset:"기본값 복원"},tooltip:{addSubTask:"하위 작업 추가",removeTask:"현재 작업 삭제",syncArrowColor:"선 색상과 동기화",close:"닫기",columnSettings:"열 표시 설정"}},"fr-FR":{common:{confirm:"Confirmer",cancel:"Annuler",save:"Enregistrer",delete:"Supprimer",edit:"Modifier",add:"Ajouter",close:"Fermer",export:"Exporter",import:"Importer",config:"Configuration",settings:"Paramètres",theme:"Thème",to:"à",selectDate:"Sélectionner la date"},date:{year:"Année",month:"Mois",day:"Jour",hour:"Heure",week:"Semaine",today:"Aujourd'hui",monday:"Lun",tuesday:"Mar",wednesday:"Mer",thursday:"Jeu",friday:"Ven",saturday:"Sam",sunday:"Dim",january:"Janvier",february:"Février",march:"Mars",april:"Avril",may:"Mai",june:"Juin",july:"Juillet",august:"Août",september:"Septembre",october:"Octobre",november:"Novembre",december:"Décembre"},dateFormat:{full:"DD MMMM YYYY",short:"DD/MM/YYYY",monthDay:"DD MMM",yearMonth:"MMMM YYYY"},viewMode:{quarter:"Trimestre",month:"Mois",week:"Semaine",day:"Jour",hour:"Heure",daySubMode:"Sous-mode jour",fullDay:"Journée complète",halfDay:"Demi-journée","15min":"15 minutes","30min":"30 minutes"},durationUnit:{quarters:"trimestres",months:"mois",weeks:"semaines",days:"jours",hours:"heures",minutes:"minutes",hoursAndMinutes:"{hours}h {minutes}min"},task:{addRoot:"Ajouter une tâche racine",addSub:"Ajouter une sous-tâche",remove:"Supprimer la tâche",edit:"Modifier la tâche",name:"Nom de la tâche",priority:"Priorité",startDate:"Date de début",endDate:"Date de fin",duration:"Durée",progress:"Progrès",serialNumber:"N°",type:"Type",taskType:"Tâche",projectType:"Projet",milestoneType:"Jalon"},link:{legend:"Légende des liens",parentChild:"Parent-Enfant",finishToStart:"Fin-Début",startToStart:"Début-Début",finishToFinish:"Fin-Fin",startToFinish:"Début-Fin",fs:"FD",ss:"DD",ff:"FF",sf:"DF",pc:"PE"},configPanel:{title:"Configuration Gantt",themeSettings:"Paramètres du thème",linkSettings:"Paramètres des liens",languageSettings:"Paramètres de langue",currentTheme:"Actuel",previewTheme:"Aperçu",exportConfig:"Exporter la configuration",importConfig:"Importer la configuration",linkConfig:{info:"Configurer les liens de dépendance des tâches (Fin-Début, Début-Début, etc.)",pathType:"Type de chemin",straight:"Droit",bezier:"Bézier",rightAngle:"Angle droit",color:"Couleur",width:"Épaisseur de ligne",dashStyle:"Style de tiret",solid:"Solide",shortDash:"Tiret court",mediumDash:"Tiret moyen",longDash:"Tiret long",dotDash:"Point-tiret",curvature:"Courbure",offset:"Distance de décalage",smoothCorners:"Coins lisses",cornerRadius:"Rayon du coin",showArrow:"Afficher la flèche",arrowSize:"Taille de la flèche",arrowColor:"Couleur de la flèche",syncColor:"Synchroniser",dashAnimation:"Animation de tiret",animationSpeed:"Vitesse d'animation",showLabels:"Afficher les étiquettes",labelColor:"Couleur de l'étiquette",fontSize:"Taille de police",typeColors:"Couleurs des types de dépendance",parentChildStyle:"Style de lien parent-enfant",parentChildInfo:"Afficher la relation hiérarchique entre les tâches parent et enfant"}},theme:{metro:"Metro",light:"Clair",dark:"Sombre",colorful:"Coloré",ocean:"Océan",apple:"Apple",classic:"Classique",liquidGlass:"Verre Liquide",metroDesc:"Style Metro Windows classique",lightDesc:"Style clair frais et lumineux",darkDesc:"Style sombre élégant et professionnel",colorfulDesc:"Style coloré vibrant",oceanDesc:"Style océan calme et confortable",appleDesc:"Style macOS minimaliste et élégant",classicDesc:"Style business traditionnel et stable",liquidGlassDesc:"Effet Verre Liquide iOS 26 avec fluidité translucide"},datePicker:{selectDate:"Sélectionner la date",clearDate:"Effacer la date"},columnSettings:{title:"Paramètres de colonne",desc:"Sélectionner les colonnes à afficher",showAll:"Tout afficher",hideAll:"Tout masquer",reset:"Réinitialiser par défaut"},tooltip:{addSubTask:"Ajouter une sous-tâche",removeTask:"Supprimer la tâche actuelle",syncArrowColor:"Synchroniser avec la couleur de la ligne",close:"Fermer",columnSettings:"Paramètres de colonne"}},"de-DE":{common:{confirm:"Bestätigen",cancel:"Abbrechen",save:"Speichern",delete:"Löschen",edit:"Bearbeiten",add:"Hinzufügen",close:"Schließen",export:"Exportieren",import:"Importieren",config:"Konfiguration",settings:"Einstellungen",theme:"Thema",to:"bis",selectDate:"Datum auswählen"},date:{year:"Jahr",month:"Monat",day:"Tag",hour:"Stunde",week:"Woche",today:"Heute",monday:"Mo",tuesday:"Di",wednesday:"Mi",thursday:"Do",friday:"Fr",saturday:"Sa",sunday:"So",january:"Januar",february:"Februar",march:"März",april:"April",may:"Mai",june:"Juni",july:"Juli",august:"August",september:"September",october:"Oktober",november:"November",december:"Dezember"},dateFormat:{full:"DD. MMMM YYYY",short:"DD.MM.YYYY",monthDay:"DD. MMM",yearMonth:"MMMM YYYY"},viewMode:{quarter:"Quartal",month:"Monat",week:"Woche",day:"Tag",hour:"Stunde",daySubMode:"Tag-Untermodus",fullDay:"Ganzer Tag",halfDay:"Halber Tag","15min":"15 Minuten","30min":"30 Minuten"},durationUnit:{quarters:"Quartale",months:"Monate",weeks:"Wochen",days:"Tage",hours:"Stunden",minutes:"Minuten",hoursAndMinutes:"{hours}Std {minutes}Min"},task:{addRoot:"Hauptaufgabe hinzufügen",addSub:"Unteraufgabe hinzufügen",remove:"Aufgabe löschen",edit:"Aufgabe bearbeiten",name:"Aufgabenname",priority:"Priorität",startDate:"Startdatum",endDate:"Enddatum",duration:"Dauer",progress:"Fortschritt",serialNumber:"Nr.",type:"Typ",taskType:"Aufgabe",projectType:"Projekt",milestoneType:"Meilenstein"},link:{legend:"Verknüpfungslegende",parentChild:"Übergeordnet-Untergeordnet",finishToStart:"Ende-Anfang",startToStart:"Anfang-Anfang",finishToFinish:"Ende-Ende",startToFinish:"Anfang-Ende",fs:"EA",ss:"AA",ff:"EE",sf:"AE",pc:"ÜU"},configPanel:{title:"Gantt-Konfiguration",themeSettings:"Themeneinstellungen",linkSettings:"Verknüpfungseinstellungen",languageSettings:"Spracheinstellungen",currentTheme:"Aktuell",previewTheme:"Vorschau",exportConfig:"Konfiguration exportieren",importConfig:"Konfiguration importieren",linkConfig:{info:"Aufgabenabhängigkeitsverknüpfungen konfigurieren (Ende-Anfang, Anfang-Anfang usw.)",pathType:"Pfadtyp",straight:"Gerade",bezier:"Bézier",rightAngle:"Rechter Winkel",color:"Farbe",width:"Linienstärke",dashStyle:"Strichstil",solid:"Durchgezogen",shortDash:"Kurzer Strich",mediumDash:"Mittlerer Strich",longDash:"Langer Strich",dotDash:"Punkt-Strich",curvature:"Krümmung",offset:"Versatzabstand",smoothCorners:"Glatte Ecken",cornerRadius:"Eckenradius",showArrow:"Pfeil anzeigen",arrowSize:"Pfeilgröße",arrowColor:"Pfeilfarbe",syncColor:"Synchronisieren",dashAnimation:"Strich-Animation",animationSpeed:"Animationsgeschwindigkeit",showLabels:"Beschriftungen anzeigen",labelColor:"Beschriftungsfarbe",fontSize:"Schriftgröße",typeColors:"Abhängigkeitstypfarben",parentChildStyle:"Übergeordnet-Untergeordnet-Verknüpfungsstil",parentChildInfo:"Hierarchische Beziehung zwischen übergeordneten und untergeordneten Aufgaben anzeigen"}},theme:{metro:"Metro",light:"Hell",dark:"Dunkel",colorful:"Farbenfroh",ocean:"Ozean",apple:"Apple",classic:"Klassisch",liquidGlass:"Flüssigglas",metroDesc:"Klassischer Windows Metro-Stil",lightDesc:"Frischer und heller Stil",darkDesc:"Eleganter und professioneller dunkler Stil",colorfulDesc:"Lebendiger farbenfroher Stil",oceanDesc:"Ruhiger und komfortabler Ozean-Stil",appleDesc:"Minimalistischer und eleganter macOS-Stil",classicDesc:"Traditioneller und stabiler Geschäftsstil",liquidGlassDesc:"iOS 26 Flüssigglas-Effekt mit durchscheinender Fließfähigkeit"},datePicker:{selectDate:"Datum auswählen",clearDate:"Datum löschen"},columnSettings:{title:"Spalteneinstellungen",desc:"Anzuzeigende Spalten auswählen",showAll:"Alle anzeigen",hideAll:"Alle ausblenden",reset:"Standard wiederherstellen"},tooltip:{addSubTask:"Unteraufgabe hinzufügen",removeTask:"Aktuelle Aufgabe löschen",syncArrowColor:"Mit Linienfarbe synchronisieren",close:"Schließen",columnSettings:"Spalteneinstellungen"}},"es-ES":{common:{confirm:"Confirmar",cancel:"Cancelar",save:"Guardar",delete:"Eliminar",edit:"Editar",add:"Agregar",close:"Cerrar",export:"Exportar",import:"Importar",config:"Configuración",settings:"Ajustes",theme:"Tema",to:"a",selectDate:"Seleccionar fecha"},date:{year:"Año",month:"Mes",day:"Día",hour:"Hora",week:"Semana",today:"Hoy",monday:"Lun",tuesday:"Mar",wednesday:"Mié",thursday:"Jue",friday:"Vie",saturday:"Sáb",sunday:"Dom",january:"Enero",february:"Febrero",march:"Marzo",april:"Abril",may:"Mayo",june:"Junio",july:"Julio",august:"Agosto",september:"Septiembre",october:"Octubre",november:"Noviembre",december:"Diciembre"},dateFormat:{full:"DD [de] MMMM [de] YYYY",short:"DD/MM/YYYY",monthDay:"DD MMM",yearMonth:"MMMM YYYY"},viewMode:{quarter:"Trimestre",month:"Mes",week:"Semana",day:"Día",hour:"Hora",daySubMode:"Submodo de día",fullDay:"Día completo",halfDay:"Medio día","15min":"15 minutos","30min":"30 minutos"},durationUnit:{quarters:"trimestres",months:"meses",weeks:"semanas",days:"días",hours:"horas",minutes:"minutos",hoursAndMinutes:"{hours}h {minutes}min"},task:{addRoot:"Agregar tarea raíz",addSub:"Agregar subtarea",remove:"Eliminar tarea",edit:"Editar tarea",name:"Nombre de tarea",priority:"Prioridad",startDate:"Fecha de inicio",endDate:"Fecha de fin",duration:"Duración",progress:"Progreso",serialNumber:"Nº",type:"Tipo",taskType:"Tarea",projectType:"Proyecto",milestoneType:"Hito"},link:{legend:"Leyenda de enlaces",parentChild:"Padre-Hijo",finishToStart:"Fin-Inicio",startToStart:"Inicio-Inicio",finishToFinish:"Fin-Fin",startToFinish:"Inicio-Fin",fs:"FI",ss:"II",ff:"FF",sf:"IF",pc:"PH"},configPanel:{title:"Configuración Gantt",themeSettings:"Configuración de tema",linkSettings:"Configuración de enlaces",languageSettings:"Configuración de idioma",currentTheme:"Actual",previewTheme:"Vista previa",exportConfig:"Exportar configuración",importConfig:"Importar configuración",linkConfig:{info:"Configurar enlaces de dependencia de tareas (Fin-Inicio, Inicio-Inicio, etc.)",pathType:"Tipo de ruta",straight:"Recta",bezier:"Bézier",rightAngle:"Ángulo recto",color:"Color",width:"Grosor de línea",dashStyle:"Estilo de guión",solid:"Sólido",shortDash:"Guión corto",mediumDash:"Guión medio",longDash:"Guión largo",dotDash:"Punto-guión",curvature:"Curvatura",offset:"Distancia de desplazamiento",smoothCorners:"Esquinas suaves",cornerRadius:"Radio de esquina",showArrow:"Mostrar flecha",arrowSize:"Tamaño de flecha",arrowColor:"Color de flecha",syncColor:"Sincronizar",dashAnimation:"Animación de guión",animationSpeed:"Velocidad de animación",showLabels:"Mostrar etiquetas",labelColor:"Color de etiqueta",fontSize:"Tamaño de fuente",typeColors:"Colores de tipo de dependencia",parentChildStyle:"Estilo de enlace padre-hijo",parentChildInfo:"Mostrar relación jerárquica entre tareas padre e hijo"}},theme:{metro:"Metro",light:"Claro",dark:"Oscuro",colorful:"Colorido",ocean:"Océano",apple:"Apple",classic:"Clásico",liquidGlass:"Cristal Líquido",metroDesc:"Estilo Metro Windows clásico",lightDesc:"Estilo claro fresco y brillante",darkDesc:"Estilo oscuro elegante y profesional",colorfulDesc:"Estilo colorido vibrante",oceanDesc:"Estilo océano tranquilo y cómodo",appleDesc:"Estilo macOS minimalista y elegante",classicDesc:"Estilo empresarial tradicional y estable",liquidGlassDesc:"Efecto de Cristal Líquido iOS 26 con fluidez translúcida"},datePicker:{selectDate:"Seleccionar fecha",clearDate:"Borrar fecha"},columnSettings:{title:"Configuración de columnas",desc:"Seleccionar columnas a mostrar",showAll:"Mostrar todo",hideAll:"Ocultar todo",reset:"Restablecer predeterminado"},tooltip:{addSubTask:"Agregar subtarea",removeTask:"Eliminar tarea actual",syncArrowColor:"Sincronizar con color de línea",close:"Cerrar",columnSettings:"Configuración de columnas"}},"ru-RU":{common:{confirm:"Подтвердить",cancel:"Отмена",save:"Сохранить",delete:"Удалить",edit:"Редактировать",add:"Добавить",close:"Закрыть",export:"Экспорт",import:"Импорт",config:"Конфигурация",settings:"Настройки",theme:"Тема",to:"до",selectDate:"Выбрать дату"},date:{year:"Год",month:"Месяц",day:"День",hour:"Час",week:"Неделя",today:"Сегодня",monday:"Пн",tuesday:"Вт",wednesday:"Ср",thursday:"Чт",friday:"Пт",saturday:"Сб",sunday:"Вс",january:"Январь",february:"Февраль",march:"Март",april:"Апрель",may:"Май",june:"Июнь",july:"Июль",august:"Август",september:"Сентябрь",october:"Октябрь",november:"Ноябрь",december:"Декабрь"},dateFormat:{full:"DD MMMM YYYY г.",short:"DD.MM.YYYY",monthDay:"DD MMM",yearMonth:"MMMM YYYY"},viewMode:{quarter:"Квартал",month:"Месяц",week:"Неделя",day:"День",hour:"Час",daySubMode:"Подрежим дня",fullDay:"Полный день",halfDay:"Полдня","15min":"15 минут","30min":"30 минут"},durationUnit:{quarters:"кварталов",months:"месяцев",weeks:"недель",days:"дней",hours:"часов",minutes:"минут",hoursAndMinutes:"{hours}ч {minutes}мин"},task:{addRoot:"Добавить корневую задачу",addSub:"Добавить подзадачу",remove:"Удалить задачу",edit:"Редактировать задачу",name:"Название задачи",priority:"Приоритет",startDate:"Дата начала",endDate:"Дата окончания",duration:"Длительность",progress:"Прогресс",serialNumber:"№",type:"Тип",taskType:"Задача",projectType:"Проект",milestoneType:"Веха"},link:{legend:"Легенда связей",parentChild:"Родитель-Потомок",finishToStart:"Окончание-Начало",startToStart:"Начало-Начало",finishToFinish:"Окончание-Окончание",startToFinish:"Начало-Окончание",fs:"ОН",ss:"НН",ff:"ОО",sf:"НО",pc:"РП"},configPanel:{title:"Конфигурация Gantt",themeSettings:"Настройки темы",linkSettings:"Настройки связей",languageSettings:"Настройки языка",currentTheme:"Текущая",previewTheme:"Предпросмотр",exportConfig:"Экспорт конфигурации",importConfig:"Импорт конфигурации",linkConfig:{info:"Настройка связей зависимостей задач (Окончание-Начало, Начало-Начало и т.д.)",pathType:"Тип пути",straight:"Прямая",bezier:"Безье",rightAngle:"Прямой угол",color:"Цвет",width:"Толщина линии",dashStyle:"Стиль пунктира",solid:"Сплошная",shortDash:"Короткий пунктир",mediumDash:"Средний пунктир",longDash:"Длинный пунктир",dotDash:"Точка-тире",curvature:"Кривизна",offset:"Расстояние смещения",smoothCorners:"Сглаженные углы",cornerRadius:"Радиус угла",showArrow:"Показать стрелку",arrowSize:"Размер стрелки",arrowColor:"Цвет стрелки",syncColor:"Синхронизировать",dashAnimation:"Анимация пунктира",animationSpeed:"Скорость анимации",showLabels:"Показать метки",labelColor:"Цвет метки",fontSize:"Размер шрифта",typeColors:"Цвета типов зависимостей",parentChildStyle:"Стиль связи родитель-потомок",parentChildInfo:"Показать иерархическую связь между родительскими и дочерними задачами"}},theme:{metro:"Метро",light:"Светлая",dark:"Темная",colorful:"Красочная",ocean:"Океан",apple:"Apple",classic:"Классический",liquidGlass:"Жидкое стекло",metroDesc:"Классический стиль Windows Metro",lightDesc:"Свежий и яркий светлый стиль",darkDesc:"Элегантный и профессиональный темный стиль",colorfulDesc:"Яркий красочный стиль",oceanDesc:"Спокойный и комфортный океанский стиль",appleDesc:"Минималистичный и элегантный стиль macOS",classicDesc:"Традиционный и стабильный деловой стиль",liquidGlassDesc:"Эффект жидкого стекла iOS 26 с полупрозрачной текучестью"},datePicker:{selectDate:"Выбрать дату",clearDate:"Очистить дату"},columnSettings:{title:"Настройки столбцов",desc:"Выберите столбцы для отображения",showAll:"Показать все",hideAll:"Скрыть все",reset:"Восстановить по умолчанию"},tooltip:{addSubTask:"Добавить подзадачу",removeTask:"Удалить текущую задачу",syncArrowColor:"Синхронизировать с цветом линии",close:"Закрыть",columnSettings:"Настройки столбцов"}}};function Vn(){const e=navigator.language||navigator.userLanguage,n={zh:"zh-CN","zh-CN":"zh-CN","zh-Hans":"zh-CN","zh-Hans-CN":"zh-CN","zh-TW":"zh-TW","zh-Hant":"zh-TW","zh-Hant-TW":"zh-TW","zh-HK":"zh-TW",en:"en-US","en-US":"en-US","en-GB":"en-US",ja:"ja-JP","ja-JP":"ja-JP",ko:"ko-KR","ko-KR":"ko-KR",fr:"fr-FR","fr-FR":"fr-FR",de:"de-DE","de-DE":"de-DE",es:"es-ES","es-ES":"es-ES",ru:"ru-RU","ru-RU":"ru-RU"};if(n[e])return n[e];const a=e.split("-")[0];return n[a]?n[a]:"en-US"}const $t=t.ref("zh-CN"),Nn=localStorage.getItem("gantt-locale");Nn&&En[Nn]?$t.value=Nn:$t.value=Vn();function Ae(e,n){const a=e.split(".");let r=En[$t.value];for(const i of a)if(r&&typeof r=="object")r=r[i];else return e;let s=typeof r=="string"?r:e;return n&&typeof s=="string"&&Object.keys(n).forEach(i=>{const o=`{${i}}`;s=s.replace(new RegExp(o,"g"),String(n[i]))}),s}function Kn(e){En[e]&&($t.value=e,localStorage.setItem("gantt-locale",e))}function Qa(){return $t.value}function Xa(){return[{value:"zh-CN",label:"🇨🇳 简体中文"},{value:"zh-TW",label:"🇹🇼 繁體中文"},{value:"en-US",label:"🇺🇸 English"},{value:"ja-JP",label:"🇯🇵 日本語"},{value:"ko-KR",label:"🇰🇷 한국어"},{value:"fr-FR",label:"🇫🇷 Français"},{value:"de-DE",label:"🇩🇪 Deutsch"},{value:"es-ES",label:"🇪🇸 Español"},{value:"ru-RU",label:"🇷🇺 Русский"}]}function et(){return{locale:t.computed(()=>$t.value),t:Ae,setLocale:Kn,getLocale:Qa,getLocales:Xa,detectBrowserLocale:Vn}}const Qe=[{id:"metro",nameKey:"theme.metro",descKey:"theme.metroDesc",preview:"#0078d4",cssVariables:{"--primary":"#0078d4","--primary-dark":"#106ebe","--primary-light":"#1084d8","--secondary":"#0d5aa7","--bg-metal-light":"linear-gradient(145deg, #ffffff, #f5f5f5)","--bg-metal-normal":"linear-gradient(145deg, #f5f5f5, #e8e8e8)","--bg-metal-dark":"linear-gradient(145deg, #e6e6e6, #d0d0d0)","--bg-metal-pressed":"linear-gradient(145deg, #e0e0e0, #f8f8f8)","--bg-active":"linear-gradient(145deg, #0078d4, #106ebe)","--bg-active-hover":"linear-gradient(145deg, #1084d8, #0d5aa7)","--bg-active-pressed":"linear-gradient(145deg, #0d5aa7, #1084d8)","--border":"#d0d0d0","--border-dark":"#b0b0b0","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -1px 0 rgba(0, 0, 0, 0.1)","--shadow-outset":"0 2px 4px rgba(0, 0, 0, 0.1)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.3)","--text-primary":"#333333","--text-secondary":"#666666","--text-muted":"#999999","--text-white":"#ffffff","--bg-primary":"#f8f8f8","--bg-secondary":"#e8e8e8","--bg-content":"#ffffff","--row-hover":"#FFF3A1","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Segoe UI', Tahoma, Geneva, Verdana, sans-serif","--font-size-base":"12px","--font-weight-normal":"500","--font-weight-bold":"600"}},{id:"dark",nameKey:"theme.dark",descKey:"theme.darkDesc",preview:"#00d4ff",cssVariables:{"--primary":"#00d4ff","--primary-dark":"#00b8e6","--primary-light":"#33ddff","--secondary":"#0099cc","--bg-metal-light":"linear-gradient(145deg, #3a3a3a, #2d2d2d)","--bg-metal-normal":"linear-gradient(145deg, #2d2d2d, #1f1f1f)","--bg-metal-dark":"linear-gradient(145deg, #1f1f1f, #0d0d0d)","--bg-metal-pressed":"linear-gradient(145deg, #0d0d0d, #2d2d2d)","--bg-active":"linear-gradient(145deg, #00d4ff, #0099cc)","--bg-active-hover":"linear-gradient(145deg, #33ddff, #00b8e6)","--bg-active-pressed":"linear-gradient(145deg, #00b8e6, #33ddff)","--border":"#404040","--border-dark":"#2d2d2d","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 -1px 0 rgba(0, 0, 0, 0.3)","--shadow-outset":"0 2px 8px rgba(0, 0, 0, 0.3)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.5)","--text-primary":"#ffffff","--text-secondary":"#cccccc","--text-muted":"#888888","--text-white":"#ffffff","--bg-primary":"#1a1a1a","--bg-secondary":"#2d2d2d","--bg-content":"#262626","--row-hover":"#3a4a5a","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Segoe UI', Tahoma, Geneva, Verdana, sans-serif","--font-size-base":"12px","--font-weight-normal":"500","--font-weight-bold":"600"}},{id:"modern",nameKey:"theme.light",descKey:"theme.lightDesc",preview:"#6366f1",cssVariables:{"--primary":"#6366f1","--primary-dark":"#4f46e5","--primary-light":"#8b5cf6","--secondary":"#3730a3","--bg-metal-light":"linear-gradient(145deg, #fafafa, #f0f0f0)","--bg-metal-normal":"linear-gradient(145deg, #f0f0f0, #e0e0e0)","--bg-metal-dark":"linear-gradient(145deg, #e0e0e0, #d0d0d0)","--bg-metal-pressed":"linear-gradient(145deg, #d8d8d8, #f0f0f0)","--bg-active":"linear-gradient(145deg, #6366f1, #4f46e5)","--bg-active-hover":"linear-gradient(145deg, #8b5cf6, #6366f1)","--bg-active-pressed":"linear-gradient(145deg, #4f46e5, #8b5cf6)","--border":"#e0e0e0","--border-dark":"#c0c0c0","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 -1px 0 rgba(0, 0, 0, 0.05)","--shadow-outset":"0 1px 3px rgba(0, 0, 0, 0.08)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.2)","--text-primary":"#1f2937","--text-secondary":"#6b7280","--text-muted":"#9ca3af","--text-white":"#ffffff","--bg-primary":"#ffffff","--bg-secondary":"#f9fafb","--bg-content":"#ffffff","--row-hover":"#e0e7ff","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Inter', 'Segoe UI', sans-serif","--font-size-base":"12px","--font-weight-normal":"400","--font-weight-bold":"600"}},{id:"classic",nameKey:"theme.classic",descKey:"theme.classicDesc",preview:"#2563eb",cssVariables:{"--primary":"#2563eb","--primary-dark":"#1d4ed8","--primary-light":"#3b82f6","--secondary":"#1e40af","--bg-metal-light":"linear-gradient(145deg, #f8f9fa, #e9ecef)","--bg-metal-normal":"linear-gradient(145deg, #e9ecef, #dee2e6)","--bg-metal-dark":"linear-gradient(145deg, #dee2e6, #ced4da)","--bg-metal-pressed":"linear-gradient(145deg, #ced4da, #e9ecef)","--bg-active":"linear-gradient(145deg, #2563eb, #1d4ed8)","--bg-active-hover":"linear-gradient(145deg, #3b82f6, #2563eb)","--bg-active-pressed":"linear-gradient(145deg, #1d4ed8, #3b82f6)","--border":"#ced4da","--border-dark":"#adb5bd","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -1px 0 rgba(0, 0, 0, 0.1)","--shadow-outset":"0 2px 4px rgba(0, 0, 0, 0.12)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(0, 0, 0, 0.25)","--text-primary":"#212529","--text-secondary":"#495057","--text-muted":"#6c757d","--text-white":"#ffffff","--bg-primary":"#ffffff","--bg-secondary":"#f8f9fa","--bg-content":"#ffffff","--row-hover":"#dbeafe","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Times New Roman', serif","--font-size-base":"12px","--font-weight-normal":"400","--font-weight-bold":"700"}},{id:"colorful",nameKey:"theme.colorful",descKey:"theme.colorfulDesc",preview:"#f59e0b",cssVariables:{"--primary":"#f59e0b","--primary-dark":"#d97706","--primary-light":"#fbbf24","--secondary":"#b45309","--bg-metal-light":"linear-gradient(145deg, #fef3c7, #fed7aa)","--bg-metal-normal":"linear-gradient(145deg, #fed7aa, #fdba74)","--bg-metal-dark":"linear-gradient(145deg, #fdba74, #fb923c)","--bg-metal-pressed":"linear-gradient(145deg, #fb923c, #fed7aa)","--bg-active":"linear-gradient(145deg, #f59e0b, #d97706)","--bg-active-hover":"linear-gradient(145deg, #fbbf24, #f59e0b)","--bg-active-pressed":"linear-gradient(145deg, #d97706, #fbbf24)","--border":"#fdba74","--border-dark":"#fb923c","--shadow-inset":"inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(0, 0, 0, 0.1)","--shadow-outset":"0 2px 6px rgba(245, 158, 11, 0.2)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.3), inset 0 -1px 0 rgba(0, 0, 0, 0.2)","--text-primary":"#92400e","--text-secondary":"#b45309","--text-muted":"#d97706","--text-white":"#ffffff","--bg-primary":"#fffbeb","--bg-secondary":"#fef3c7","--bg-content":"#ffffff","--row-hover":"#fef3c7","--transition-fast":"0.15s ease","--transition-normal":"0.25s ease","--transition-slow":"0.35s ease","--font-family":"'Comic Sans MS', cursive","--font-size-base":"12px","--font-weight-normal":"400","--font-weight-bold":"600"}},{id:"apple",nameKey:"theme.apple",descKey:"theme.appleDesc",preview:"#007aff",cssVariables:{"--primary":"#007aff","--primary-dark":"#0051d5","--primary-light":"#4da3ff","--secondary":"#5856d6","--bg-metal-light":"linear-gradient(145deg, #fafafa, #f2f2f7)","--bg-metal-normal":"linear-gradient(145deg, #f2f2f7, #e5e5ea)","--bg-metal-dark":"linear-gradient(145deg, #e5e5ea, #d1d1d6)","--bg-metal-pressed":"linear-gradient(145deg, #d1d1d6, #f2f2f7)","--bg-active":"linear-gradient(145deg, #007aff, #0051d5)","--bg-active-hover":"linear-gradient(145deg, #4da3ff, #007aff)","--bg-active-pressed":"linear-gradient(145deg, #0051d5, #4da3ff)","--border":"#d1d1d6","--border-dark":"#c7c7cc","--shadow-inset":"inset 0 0.5px 0 rgba(255, 255, 255, 0.9), inset 0 -0.5px 0 rgba(0, 0, 0, 0.08)","--shadow-outset":"0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08)","--shadow-active":"inset 0 1px 0 rgba(255, 255, 255, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.2)","--text-primary":"#000000","--text-secondary":"#3c3c43","--text-muted":"#8e8e93","--text-white":"#ffffff","--bg-primary":"#ffffff","--bg-secondary":"#f2f2f7","--bg-content":"#ffffff","--row-hover":"#e8f4fd","--transition-fast":"0.2s cubic-bezier(0.4, 0, 0.2, 1)","--transition-normal":"0.3s cubic-bezier(0.4, 0, 0.2, 1)","--transition-slow":"0.4s cubic-bezier(0.4, 0, 0.2, 1)","--font-family":"'-apple-system', 'BlinkMacSystemFont', 'SF Pro Text', 'Helvetica Neue', sans-serif","--font-size-base":"13px","--font-weight-normal":"400","--font-weight-bold":"600"}},{id:"liquidGlass",nameKey:"theme.liquidGlass",descKey:"theme.liquidGlassDesc",preview:"linear-gradient(135deg, rgba(255,255,255,0.5) 0%, rgba(220,240,255,0.6) 100%)",cssVariables:{"--primary":"#007aff","--primary-dark":"#0051d5","--primary-light":"#4da3ff","--secondary":"#5856d6","--bg-metal-light":"rgba(255, 255, 255, 0.65)","--bg-metal-normal":"rgba(245, 247, 250, 0.55)","--bg-metal-dark":"rgba(230, 235, 241, 0.6)","--bg-metal-pressed":"rgba(220, 228, 238, 0.7)","--bg-active":"rgba(0, 122, 255, 0.75)","--bg-active-hover":"rgba(77, 163, 255, 0.8)","--bg-active-pressed":"rgba(0, 81, 213, 0.85)","--border":"rgba(255, 255, 255, 0.4)","--border-dark":"rgba(200, 210, 220, 0.5)","--shadow-inset":"inset 0 1px 2px rgba(255, 255, 255, 0.95), inset 0 -1px 1px rgba(0, 0, 0, 0.05)","--shadow-outset":"0 8px 32px rgba(0, 122, 255, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08), 0 0 1px rgba(255, 255, 255, 0.8)","--shadow-active":"inset 0 2px 4px rgba(255, 255, 255, 0.4), inset 0 -2px 4px rgba(0, 0, 0, 0.15), 0 4px 16px rgba(0, 122, 255, 0.25)","--text-primary":"#1d1d1f","--text-secondary":"#424245","--text-muted":"#86868b","--text-white":"#ffffff","--bg-primary":"rgba(250, 250, 252, 0.85)","--bg-secondary":"rgba(242, 242, 247, 0.75)","--bg-content":"rgba(255, 255, 255, 0.7)","--row-hover":"rgba(232, 244, 253, 0.6)","--transition-fast":"0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94)","--transition-normal":"0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94)","--transition-slow":"0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94)","--font-family":"'-apple-system', 'BlinkMacSystemFont', 'SF Pro Display', 'Helvetica Neue', sans-serif","--font-size-base":"13px","--font-weight-normal":"400","--font-weight-bold":"600","--glass-blur":"12px","--glass-saturation":"180%","--glass-brightness":"105%","--glass-edge-highlight":"rgba(255, 255, 255, 0.9)","--glass-edge-shadow":"rgba(0, 0, 0, 0.1)","--glass-reflection":"linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.05) 100%)"}}],Tt=class Tt{constructor(){ht(this,"currentTheme","metro");ht(this,"storageKey","gantt-theme");ht(this,"ganttContainer",null)}static getInstance(){return Tt.instance||(Tt.instance=new Tt),Tt.instance}setGanttContainer(n){this.ganttContainer=n,this.loadTheme()}getCurrentTheme(){return this.currentTheme}setTheme(n){const a=Qe.find(r=>r.id===n);if(!a){console.warn(`Theme ${n} not found`);return}this.currentTheme=n,this.applyTheme(a),this.saveTheme()}applyTheme(n){if(!this.ganttContainer){console.warn("No gantt container available for theme application");return}this.ganttContainer.setAttribute("data-gantt-theme",n.id),Object.entries(n.cssVariables).forEach(([a,r])=>{this.ganttContainer.style.setProperty(a,r)})}loadTheme(){try{const n=localStorage.getItem(this.storageKey);n&&Qe.find(r=>r.id===n)&&(this.currentTheme=n);const a=Qe.find(r=>r.id===this.currentTheme);a&&this.applyTheme(a)}catch(n){console.warn("Failed to load theme from localStorage:",n)}}saveTheme(){try{localStorage.setItem(this.storageKey,this.currentTheme)}catch(n){console.warn("Failed to save theme to localStorage:",n)}}getThemes(){return Qe}getThemeInfo(n){return Qe.find(a=>a.id===n)}previewTheme(n){const a=Qe.find(r=>r.id===n);a&&this.applyTheme(a)}cancelPreview(){const n=Qe.find(a=>a.id===this.currentTheme);n&&this.applyTheme(n)}exportThemeConfig(){return JSON.stringify({currentTheme:this.currentTheme,timestamp:new Date().toISOString()},null,2)}importThemeConfig(n){try{const a=JSON.parse(n);return a.currentTheme&&Qe.find(r=>r.id===a.currentTheme)?(this.setTheme(a.currentTheme),!0):!1}catch(a){return console.error("Failed to import theme config:",a),!1}}};ht(Tt,"instance");let _n=Tt;const je=_n.getInstance(),eo=t.defineComponent({props:{date:{type:String,required:!0},minDate:String,maxDate:String},emits:["confirm","clear"],setup(e,{emit:n}){const{t:a,locale:r}=et(),s=()=>({"zh-CN":"zh-cn","zh-TW":"zh-tw","en-US":"en","ja-JP":"ja","ko-KR":"ko","fr-FR":"fr","de-DE":"de","es-ES":"es","ru-RU":"ru"})[r.value]||"en",i=t.computed(()=>{const u=s();return Array.from({length:7},(D,K)=>g().day(K+1).locale(u).format("dd"))}),o=u=>g().month(u-1).locale(s()).format("MMMM"),l=t.ref(!1),h=t.ref(!1),f=t.ref(!1),k=t.ref(""),p=t.ref(0),v=t.ref("fadeX_Prev"),H=t.ref(!1),b=t.ref(!1),$=t.ref(null),d=t.ref(null),z=t.ref(null),B=t.ref(null),W=t.ref(0),R=t.ref(0),C=t.ref(je.getCurrentTheme()),A=t.ref(-1),oe=t.ref(-1),x=t.ref({row:-1,col:-1}),se=t.ref(new Date().getFullYear()),I=t.ref(new Date().getMonth()+1),X=t.ref(new Date().getFullYear()),le=t.ref(new Date().getMonth()+1),L=t.ref(new Date().getDate()),O=t.ref(1970),m=t.ref(1),c=t.ref(1),w=t.ref(2099),y=t.ref(12),T=t.ref(31),E=u=>{if(!u)return null;const D=u.split("-");if(D.length!==3)return null;const K=parseInt(D[0],10),ae=parseInt(D[1],10),q=parseInt(D[2],10);return isNaN(K)||isNaN(ae)||isNaN(q)?null:{year:K,month:ae,day:q}},M=u=>u>9?String(u):`0${u}`,V=t.computed(()=>({year:se.value,month:I.value,monthStr:o(I.value)})),Z=t.computed(()=>({year:X.value,month:le.value,day:L.value})),Y=t.computed(()=>{const u=[];for(let D=O.value;D<=w.value;D++)u.push(D);return u}),J=t.computed(()=>Array.from({length:12},(u,D)=>D+1)),pe=t.computed(()=>({position:"fixed",top:`${W.value}px`,left:`${R.value}px`,zIndex:100002})),ye=()=>se.value<O.value||se.value===O.value&&I.value<=m.value,Te=()=>se.value>w.value||se.value===w.value&&I.value>=y.value,ce=t.computed(()=>{p.value;const u=se.value,D=I.value,K=new Date(u,D,0).getDate(),ae=[];let q=[];for(let re=1;re<=K;re++){const Se=new Date(u,D-1,re).getDay(),ze=Se===0?7:Se;if(re===1&&ze>1)for(let De=1;De<ze;De++)q.push({value:""});const Ve=u===X.value&&D===le.value&&re===L.value;let ke=!1;if(u===O.value&&D===m.value&&re<c.value&&(ke=!0),u===w.value&&D===y.value&&re>T.value&&(ke=!0),q.push({value:re,selected:Ve,disabled:ke}),re===K&&ze<7)for(let De=ze;De<7;De++)q.push({value:""});(ze===7||re===K)&&(ae.push(q),q=[])}return ae}),ie=()=>{const u=E(e.date);if(u)se.value=u.year,I.value=u.month,X.value=u.year,le.value=u.month,L.value=u.day;else{const ae=new Date;se.value=ae.getFullYear(),I.value=ae.getMonth()+1,X.value=ae.getFullYear(),le.value=ae.getMonth()+1,L.value=ae.getDate()}const D=E(e.minDate||"1970-01-01");D&&(O.value=D.year,m.value=D.month,c.value=D.day);const K=E(e.maxDate||"2099-12-31");K&&(w.value=K.year,y.value=K.month,T.value=K.day),F()},F=()=>{const u=`${X.value}-${M(le.value)}-${M(L.value)}`,D=s(),K=a("dateFormat.full");k.value=g(u).locale(D).format(K)},He=u=>{se.value=u,h.value=!1,f.value=!1,p.value++},N=u=>{I.value=u,h.value=!1,f.value=!1,p.value++},P=u=>{if(u.disabled||u.value==="")return;X.value=se.value,le.value=I.value,L.value=u.value,F(),l.value=!1;const D=new Date(X.value,le.value-1,L.value).getDay(),K=D===0?7:D,ae=s(),q=g(`${X.value}-${le.value}-${L.value}`).locale(ae).format("dddd");n("confirm",{date:`${X.value}-${M(le.value)}-${M(L.value)}`,year:X.value,month:le.value,day:L.value,week:K,weekStr:q,monthStr:o(le.value)})},j=()=>{H.value||ye()||(H.value=!0,setTimeout(()=>H.value=!1,300),v.value="fadeX_Prev",I.value<=1?(se.value--,I.value=12):I.value--,p.value++)},G=()=>{b.value||Te()||(b.value=!0,setTimeout(()=>b.value=!1,300),v.value="fadeX_Next",I.value>=12?(se.value++,I.value=1):I.value++,p.value++)},ee=()=>{if(h.value=!h.value,f.value=!1,h.value&&z.value){const u=Y.value.indexOf(X.value);setTimeout(()=>{z.value&&(z.value.scrollTop=Math.max(0,u-3)*40)},0)}},Ye=()=>{if(f.value=!f.value,h.value=!1,f.value&&B.value){const u=le.value-1;setTimeout(()=>{B.value&&(B.value.scrollTop=Math.max(0,u-3)*40)},0)}},Ee=()=>{h.value=!1},Ne=()=>{if(d.value){const u=d.value.getBoundingClientRect();W.value=u.bottom+5,R.value=u.left}l.value=!0,setTimeout(()=>{C.value=je.getCurrentTheme(),we(C.value)},0)},$e=()=>{k.value="",l.value=!1,n("clear")},we=u=>{if(!$.value)return;const D=je.getThemeInfo(u);D&&($.value.setAttribute("data-gantt-theme",u),Object.entries(D.cssVariables).forEach(([K,ae])=>{$.value.style.setProperty(K,ae)}))},_e=u=>{$.value&&d.value&&!$.value.contains(u.target)&&!d.value.contains(u.target)&&(l.value=!1)},Fe=u=>A.value===u,Pe=u=>oe.value===u,he=(u,D)=>x.value.row===D&&x.value.col===u,Re=u=>A.value=u,Le=()=>A.value=-1,Ce=u=>oe.value=u,Ie=()=>oe.value=-1,te=(u,D)=>x.value={row:D,col:u},Be=()=>x.value={row:-1,col:-1};return t.onBeforeMount(()=>ie()),t.watch(()=>e.date,()=>ie()),t.watch(()=>e.minDate,()=>ie()),t.watch(()=>e.maxDate,()=>ie()),t.watch(()=>r.value,()=>{k.value&&F(),p.value++}),t.onMounted(()=>{document.addEventListener("click",_e);const u=setInterval(()=>{const D=je.getCurrentTheme();D!==C.value&&(C.value=D,we(D))},100);t.onUnmounted(()=>clearInterval(u))}),t.onUnmounted(()=>document.removeEventListener("click",_e)),{t:a,locale:r,getWeekNames:i,getMonthName:o,selectDate:Z,showDate:V,copyMinDate:t.computed(()=>({year:O.value,month:m.value,day:c.value})),copyMaxDate:t.computed(()=>({year:w.value,month:y.value,day:T.value})),fadeXType:v,nextMonthClick:b,prevMonthClick:H,keepDoubleDigit:M,showYear:h,updateKey:p,yearList:Y,rows:ce,yearListRef:z,prevMonth:j,nextMonth:G,selectDay:P,selectYear:He,openYearList:ee,openMonthList:Ye,monthList:J,monthListRef:B,showMonth:f,selectMonth:N,openCalendarList:Ee,showCalendar:l,openCalendar:Ne,selectedDateText:k,clearDate:$e,calendarRef:$,inputRef:d,calendarPosition:pe,isYearHovered:Fe,isMonthHovered:Pe,isDayHovered:he,handleYearMouseEnter:Re,handleYearMouseLeave:Le,handleMonthMouseEnter:Ce,handleMonthMouseLeave:Ie,handleDayMouseEnter:te,handleDayMouseLeave:Be}}}),Oe=(e,n)=>{const a=e.__vccOpts||e;for(const[r,s]of n)a[r]=s;return a},to={class:"date-picker-input-wrapper"},no=["placeholder"],ao={class:"e-date-select"},oo={class:"e-date-year"},ro={class:"e-date-monthday"},so={class:"e-calendar-container"},io={class:"e-calendar-toolbar"},lo={key:0,class:"e-calendar-svg-cover"},co={class:"e-calendar-toolbar-title"},uo={key:0,class:"e-calendar-svg-cover"},fo={class:"e-calendar-week"},mo={class:"e-calendar-monthday"},ho=["onClick","onMouseenter"],go=["textContent"],po={key:0,class:"e-calendar-monthday-row-day-cover"},yo={class:"e-calendar-year",ref:"yearListRef"},ko=["onClick","onMouseenter"],bo={class:"e-calendar-year",ref:"monthListRef"},wo=["onClick","onMouseenter"];function Co(e,n,a,r,s,i){return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",to,[t.withDirectives(t.createElementVNode("input",{type:"text","onUpdate:modelValue":n[0]||(n[0]=o=>e.selectedDateText=o),onClick:n[1]||(n[1]=(...o)=>e.openCalendar&&e.openCalendar(...o)),readonly:"",placeholder:e.t("datePicker.selectDate"),class:"date-picker-input",ref:"inputRef"},null,8,no),[[t.vModelText,e.selectedDateText]]),e.selectedDateText?(t.openBlock(),t.createElementBlock("span",{key:0,class:"clear-date-button",onClick:n[2]||(n[2]=(...o)=>e.clearDate&&e.clearDate(...o))},n[12]||(n[12]=[t.createElementVNode("svg",{viewBox:"0 0 24 24"},[t.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)]))):t.createCommentVNode("",!0)]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.withDirectives(t.createElementVNode("div",{class:"e-calendar",ref:"calendarRef",style:t.normalizeStyle(e.calendarPosition)},[t.createElementVNode("div",ao,[t.createElementVNode("div",oo,[t.createVNode(t.Transition,{name:"fadeY"},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("div",{key:e.showDate.year,class:t.normalizeClass(["e-date-year-select",{active:e.showYear}]),onClick:n[3]||(n[3]=(...o)=>e.openYearList&&e.openYearList(...o))},t.toDisplayString(e.showDate.year),3))]),_:1})]),t.createElementVNode("div",ro,[t.createVNode(t.Transition,{name:"fadeY"},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("div",{key:e.showDate.year+"-"+e.showDate.month,class:t.normalizeClass(["e-date-monthday-select",{active:!e.showYear}]),onClick:n[5]||(n[5]=(...o)=>e.openCalendarList&&e.openCalendarList(...o))},[t.createElementVNode("span",null,t.toDisplayString(e.keepDoubleDigit(e.showDate.month))+"-"+t.toDisplayString(e.keepDoubleDigit(e.selectDate.day)),1),n[13]||(n[13]=t.createTextVNode(" ")),t.createElementVNode("span",{style:{cursor:"pointer"},onClick:n[4]||(n[4]=(...o)=>e.openMonthList&&e.openMonthList(...o))},t.toDisplayString(e.showDate.monthStr),1)],2))]),_:1})])]),t.withDirectives(t.createElementVNode("div",so,[t.createElementVNode("div",io,[t.createElementVNode("div",{class:"e-calendar-svg",onClick:n[6]||(n[6]=(...o)=>e.prevMonth&&e.prevMonth(...o))},[n[14]||(n[14]=t.createElementVNode("svg",{viewBox:"0 0 24 24",class:"e-calendar-svg-icon"},[t.createElementVNode("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})],-1)),t.createVNode(t.Transition,{name:"e_calendar_svg_btn"},{default:t.withCtx(()=>[e.prevMonthClick?(t.openBlock(),t.createElementBlock("div",lo)):t.createCommentVNode("",!0)]),_:1})]),t.createElementVNode("div",co,[t.createVNode(t.Transition,{name:e.fadeXType},{default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("div",{key:e.showDate.year+"-"+e.showDate.month,class:"e-calendar-toolbar-title-content"},[t.createElementVNode("strong",null,t.toDisplayString(e.showDate.year),1),n[15]||(n[15]=t.createTextVNode(" ")),t.createElementVNode("span",{style:{cursor:"pointer"},onClick:n[7]||(n[7]=(...o)=>e.openMonthList&&e.openMonthList(...o))},t.toDisplayString(e.showDate.monthStr),1)]))]),_:1},8,["name"])]),t.createElementVNode("div",{class:"e-calendar-svg",onClick:n[8]||(n[8]=(...o)=>e.nextMonth&&e.nextMonth(...o))},[n[16]||(n[16]=t.createElementVNode("svg",{viewBox:"0 0 24 24",class:"e-calendar-svg-icon"},[t.createElementVNode("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})],-1)),t.createVNode(t.Transition,{name:"e_calendar_svg_btn"},{default:t.withCtx(()=>[e.nextMonthClick?(t.openBlock(),t.createElementBlock("div",uo)):t.createCommentVNode("",!0)]),_:1})])]),t.createElementVNode("div",fo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.getWeekNames,(o,l)=>(t.openBlock(),t.createElementBlock("span",{key:l,class:"e-calendar-week-day"},t.toDisplayString(o),1))),128))]),t.createElementVNode("div",mo,[(t.openBlock(),t.createElementBlock("div",{key:e.updateKey,class:"e-calendar-monthday-wrapper"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.rows,(o,l)=>(t.openBlock(),t.createElementBlock("div",{key:l,class:"e-calendar-monthday-row"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o,(h,f)=>(t.openBlock(),t.createElementBlock("span",{key:f,class:t.normalizeClass(["e-calendar-monthday-row-day",{active:h.selected,disabled:h.disabled,pointer:h.value!=="",hover:e.isDayHovered(f,l)}]),onClick:k=>e.selectDay(h),onMouseenter:k=>e.handleDayMouseEnter(f,l),onMouseleave:n[9]||(n[9]=k=>e.handleDayMouseLeave())},[t.createElementVNode("span",{textContent:t.toDisplayString(h.value),class:"e-calendar-monthday-row-day-value"},null,8,go),t.createVNode(t.Transition,{name:"e_calendar_day"},{default:t.withCtx(()=>[h.selected?(t.openBlock(),t.createElementBlock("span",po)):t.createCommentVNode("",!0)]),_:2},1024)],42,ho))),128))]))),128))]))])],512),[[t.vShow,!e.showYear&&!e.showMonth]]),t.withDirectives(t.createElementVNode("ul",yo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.yearList,(o,l)=>(t.openBlock(),t.createElementBlock("li",{key:l,class:t.normalizeClass({active:o===e.selectDate.year,hover:e.isYearHovered(l)}),onClick:h=>e.selectYear(o),onMouseenter:h=>e.handleYearMouseEnter(l),onMouseleave:n[10]||(n[10]=h=>e.handleYearMouseLeave())},t.toDisplayString(o),43,ko))),128))],512),[[t.vShow,e.showYear]]),t.withDirectives(t.createElementVNode("ul",bo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.monthList,(o,l)=>(t.openBlock(),t.createElementBlock("li",{key:l,class:t.normalizeClass({active:o===e.selectDate.month,hover:e.isMonthHovered(l)}),onClick:h=>e.selectMonth(o),onMouseenter:h=>e.handleMonthMouseEnter(l),onMouseleave:n[11]||(n[11]=h=>e.handleMonthMouseLeave())},t.toDisplayString(e.getMonthName(o)),43,wo))),128))],512),[[t.vShow,e.showMonth]])],4),[[t.vShow,e.showCalendar]])]))])}const Qn=Oe(eo,[["render",Co],["__scopeId","data-v-49f102c9"]]),So=t.defineComponent({props:{direction:{type:String,default:"row"},min:{type:Number,required:!0},max:{type:Number,required:!0},paneLengthPercent:{type:Number,required:!0},triggerLength:{type:Number,required:!0}},emits:["update:paneLengthPercent"],setup(e,{emit:n}){let a=t.ref(null),r=t.ref(null),s=t.ref(0),i=t.ref("");const o=t.ref(je.getCurrentTheme()),l=t.computed(()=>e.direction==="row"?"width":"height"),h=t.computed(()=>{var oe;const R=o.value,C=e.direction==="row",A={metro:{default:C?"-webkit-gradient(linear,left top,right top,from(#ffffff), to(#d0d0d0))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#ffffff), to(#d0d0d0))",move:C?"-webkit-gradient(linear,left top,right top,from(#1084d8), to(#0078d4))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#1084d8), to(#0078d4))"},dark:{default:C?"-webkit-gradient(linear,left top,right top,from(#3a3a3a), to(#1f1f1f))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#3a3a3a), to(#1f1f1f))",move:C?"-webkit-gradient(linear,left top,right top,from(#33ddff), to(#00d4ff))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#33ddff), to(#00d4ff))"},modern:{default:C?"-webkit-gradient(linear,left top,right top,from(#f8fafc), to(#e2e8f0))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f8fafc), to(#e2e8f0))",move:C?"-webkit-gradient(linear,left top,right top,from(#818cf8), to(#6366f1))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#818cf8), to(#6366f1))"},classic:{default:C?"-webkit-gradient(linear,left top,right top,from(#f0f4f8), to(#cbd5e1))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f0f4f8), to(#cbd5e1))",move:C?"-webkit-gradient(linear,left top,right top,from(#3b82f6), to(#2563eb))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#3b82f6), to(#2563eb))"},colorful:{default:C?"-webkit-gradient(linear,left top,right top,from(#fef3c7), to(#fbbf24))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#fef3c7), to(#fbbf24))",move:C?"-webkit-gradient(linear,left top,right top,from(#f59e0b), to(#d97706))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f59e0b), to(#d97706))"},apple:{default:C?"-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0.95)), to(rgba(242,242,247,0.95)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,0.95)), to(rgba(242,242,247,0.95)))",move:C?"-webkit-gradient(linear,left top,right top,from(#4da6ff), to(#007aff))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#4da6ff), to(#007aff))"},liquidGlass:{default:C?"-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0.6)), to(rgba(215,215,217,0.4)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,0.6)), to(rgba(215,215,217,0.4)))",move:C?"-webkit-gradient(linear,left top,right top,from(rgba(166,212,225,0.8)), to(rgba(37,145,200,0.6)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(166,212,225,0.8)), to(rgba(37,145,200,0.6)))"}};return((oe=A[R])==null?void 0:oe.default)||A.metro.default}),f=t.computed(()=>{var oe;const R=o.value,C=e.direction==="row",A={metro:{default:C?"-webkit-gradient(linear,left top,right top,from(#ffffff), to(#d0d0d0))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#ffffff), to(#d0d0d0))",move:C?"-webkit-gradient(linear,left top,right top,from(#1084d8), to(#0078d4))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#1084d8), to(#0078d4))"},dark:{default:C?"-webkit-gradient(linear,left top,right top,from(#3a3a3a), to(#1f1f1f))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#3a3a3a), to(#1f1f1f))",move:C?"-webkit-gradient(linear,left top,right top,from(#33ddff), to(#00d4ff))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#33ddff), to(#00d4ff))"},modern:{default:C?"-webkit-gradient(linear,left top,right top,from(#f8fafc), to(#e2e8f0))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f8fafc), to(#e2e8f0))",move:C?"-webkit-gradient(linear,left top,right top,from(#818cf8), to(#6366f1))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#818cf8), to(#6366f1))"},classic:{default:C?"-webkit-gradient(linear,left top,right top,from(#f0f4f8), to(#cbd5e1))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f0f4f8), to(#cbd5e1))",move:C?"-webkit-gradient(linear,left top,right top,from(#3b82f6), to(#2563eb))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#3b82f6), to(#2563eb))"},colorful:{default:C?"-webkit-gradient(linear,left top,right top,from(#fef3c7), to(#fbbf24))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#fef3c7), to(#fbbf24))",move:C?"-webkit-gradient(linear,left top,right top,from(#f59e0b), to(#d97706))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#f59e0b), to(#d97706))"},apple:{default:C?"-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0.95)), to(rgba(242,242,247,0.95)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,0.95)), to(rgba(242,242,247,0.95)))",move:C?"-webkit-gradient(linear,left top,right top,from(#4da6ff), to(#007aff))":"-webkit-gradient(linear, 0 0, 0 bottom, from(#4da6ff), to(#007aff))"},liquidGlass:{default:C?"-webkit-gradient(linear,left top,right top,from(rgba(255,255,255,0.6)), to(rgba(215,215,217,0.4)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(255,255,255,0.6)), to(rgba(215,215,217,0.4)))",move:C?"-webkit-gradient(linear,left top,right top,from(rgba(166,212,225,0.8)), to(rgba(37,145,200,0.6)))":"-webkit-gradient(linear, 0 0, 0 bottom, from(rgba(166,212,225,0.8)), to(rgba(37,145,200,0.6)))"}};return((oe=A[R])==null?void 0:oe.move)||A.metro.move}),k=t.computed(()=>`calc(${e.paneLengthPercent}% - ${e.triggerLength/2}px)`),p=t.computed(()=>`${e.triggerLength}px`),v=t.computed(()=>{const R=o.value,C={metro:"brightness(0.4) opacity(0.5)",dark:"brightness(0) invert(1) opacity(0.9)",modern:"grayscale(0.3) brightness(0.6) opacity(0.4)",classic:"contrast(1.2) brightness(0.5) opacity(0.5)",colorful:"hue-rotate(-30deg) saturate(1.5) brightness(0.7) opacity(0.6)",apple:"brightness(0.5) contrast(1.1) opacity(0.45)",liquidGlass:"opacity(0.6)"};return C[R]||C.metro}),H=t.computed(()=>{const R=o.value,C={metro:"brightness(0.3) opacity(0.8)",dark:"brightness(0) invert(1) opacity(1) drop-shadow(0 0 3px cyan)",modern:"grayscale(0) brightness(0.5) hue-rotate(240deg) opacity(0.8)",classic:"contrast(1.5) brightness(0.4) saturate(1.5) opacity(0.9)",colorful:"hue-rotate(-20deg) saturate(2) brightness(0.6) contrast(1.2) opacity(0.95)",apple:"brightness(0.35) contrast(1.3) saturate(1.2) opacity(0.85)",liquidGlass:"opacity(0.9)"};return C[R]||C.metro});t.onMounted(async()=>{await t.nextTick(),i.value=`background: ${h.value}`});const b=async()=>{await t.nextTick(),i.value=`background: ${h.value}`},$=async()=>{await t.nextTick(),i.value=`background: ${f.value}`},d=R=>{document.addEventListener("mousemove",z),document.addEventListener("mouseup",B),e.direction==="row"?s.value=R.pageX-R.target.getBoundingClientRect().left:s.value=R.pageY-R.target.getBoundingClientRect().top},z=async R=>{if(await t.nextTick(),i.value=`background: ${f.value}`,a.value){const C=a.value.getBoundingClientRect();let A=0;e.direction==="row"?A=(R.pageX-C.left-s.value+e.triggerLength/2)/C.width*100:A=(R.pageY-C.top-s.value+e.triggerLength/2)/C.height*100,A<e.min&&(A=e.min),A>e.max&&(A=e.max),n("update:paneLengthPercent",A)}},B=async()=>{await t.nextTick(),i.value=`background: ${h.value}`,document.removeEventListener("mousemove",z)},W=setInterval(()=>{const R=je.getCurrentTheme();R!==o.value&&(o.value=R,i.value=`background: ${h.value}`)},100);return t.onUnmounted(()=>{clearInterval(W)}),{splitPane:a,trigger:r,lengthType:l,triggerDefaultColor:h,triggerMoveColor:f,paneLengthValue:k,triggerLengthValue:p,triggerBackGroud:i,iconStyle:v,iconHoverStyle:H,handleMouseLeave:b,handleMouseOver:$,handleMouseDown:d,handleMouseUp:B}}});function vo(e,n,a,r,s,i){return t.openBlock(),t.createElementBlock("div",{ref:"splitPane",class:t.normalizeClass(["split-pane",e.direction]),style:t.normalizeStyle({flexDirection:e.direction})},[t.createElementVNode("div",{class:"pane pane-one",style:t.normalizeStyle(`${e.lengthType}: ${e.paneLengthValue}`)},[t.renderSlot(e.$slots,"one",{},void 0,!0)],4),e.triggerDefaultColor&&e.triggerMoveColor?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"trigger",class:"pane-trigger",style:t.normalizeStyle(`${e.lengthType}: ${e.triggerLengthValue}; ${e.triggerBackGroud}`)},[t.createElementVNode("div",{onClick:n[0]||(n[0]=(...o)=>e.handleMouseOver&&e.handleMouseOver(...o)),onMouseover:n[1]||(n[1]=(...o)=>e.handleMouseOver&&e.handleMouseOver(...o)),onMouseleave:n[2]||(n[2]=(...o)=>e.handleMouseLeave&&e.handleMouseLeave(...o)),onMousedown:n[3]||(n[3]=(...o)=>e.handleMouseDown&&e.handleMouseDown(...o)),class:"icon",style:t.normalizeStyle(`${e.lengthType}: ${e.triggerLengthValue}; filter: ${e.iconStyle}`)},null,36)],4)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"pane pane-two",style:t.normalizeStyle(`${e.lengthType}: calc(${100-e.paneLengthPercent}% - ${e.triggerLength/2}px)`)},[t.renderSlot(e.$slots,"two",{},void 0,!0)],4)],6)}const Do=Oe(So,[["render",vo],["__scopeId","data-v-7a646dc7"]]),To=t.defineComponent({props:{headers:{type:Array,required:!0}},setup(e){const{t:n}=et(),a=t.ref(!1),r=t.ref(-1),s=t.ref(0),i=t.ref(0),o=t.ref(null),l=v=>{const b={no:"task.serialNumber",task:"task.name",priority:"task.priority",startdate:"task.startDate",enddate:"task.endDate",takestime:"task.duration",progress:"task.progress",id:"ID",parentId:"Parent ID"}[v.property];return b?b.includes(".")?n(b):b:v.title},h=(v,H)=>{v.preventDefault(),v.stopPropagation(),a.value=!0,r.value=H,s.value=v.clientX,i.value=e.headers[H].width;const b=v.target;o.value=b.closest(".headerCaption"),document.addEventListener("mousemove",k,{passive:!1}),document.addEventListener("mouseup",p),document.body.style.cursor="col-resize",document.body.style.userSelect="none"};let f=null;const k=v=>{!a.value||r.value<0||(v.preventDefault(),f!==null&&cancelAnimationFrame(f),f=requestAnimationFrame(()=>{const H=v.clientX-s.value,b=Math.max(50,i.value+H);o.value&&(o.value.style.width=`${b}px`),document.querySelectorAll(`.cellNo[columnindex="${r.value}"], .cell[columnindex="${r.value}"]`).forEach(d=>{d.style.minWidth=`${b}px`,d.style.maxWidth=`${b}px`}),f=null}))},p=()=>{if(a.value){if(f!==null&&(cancelAnimationFrame(f),f=null),o.value&&r.value>=0){const v=parseInt(o.value.style.width);e.headers[r.value].width=v}a.value=!1,r.value=-1,o.value=null,document.removeEventListener("mousemove",k),document.removeEventListener("mouseup",p),document.body.style.cursor="",document.body.style.userSelect=""}};return{getHeaderTitle:l,startResize:h}}}),Mo={class:"header"},$o=["property","columnindex"],Eo=["onMousedown"];function Vo(e,n,a,r,s,i){return t.openBlock(),t.createElementBlock("div",Mo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.headers,(o,l)=>t.withDirectives((t.openBlock(),t.createElementBlock("div",{key:l,property:o.property,columnindex:l,class:"headerCaption",style:t.normalizeStyle({width:`${o.width}px`})},[t.createElementVNode("span",null,t.toDisplayString(e.getHeaderTitle(o)),1),(o.property==="no"||o.show)&&l<e.headers.length-1?(t.openBlock(),t.createElementBlock("div",{key:0,class:"resize-handle",onMousedown:h=>e.startResize(h,l)},null,40,Eo)):t.createCommentVNode("",!0)],12,$o)),[[t.vShow,o.show]])),128))])}const No=Oe(To,[["render",Vo],["__scopeId","data-v-65d32e35"]]),_o={monthHeaders:[],weekHeaders:[],dayHeaders:[],hourHeaders:[],tasks:[],taskHeaders:[],mapFields:{},scale:90,timelineCellCount:0,startGanttDate:null,endGanttDate:null,scrollFlag:!0,mode:null,daySubMode:"full",hourSubMode:"60",expandRow:{pid:0,expand:!0},collapsedTasks:new Set,rootTask:{},subTask:{},editTask:{},removeTask:{},allowChangeTaskDate:{},barDate:{id:"",startDate:"",endDate:""}};let S=t.reactive(_o),fe={setMonthHeaders(e){S.monthHeaders=e},setDayHeaders(e){S.dayHeaders=e},setTasks(e){S.tasks=e},setTaskHeaders(e){S.taskHeaders=e},setWeekHeaders(e){S.weekHeaders=e},setHourHeaders(e){S.hourHeaders=e},setScale(e){S.scale=e},setMapFields(e){S.mapFields=e},setTimelineCellCount(e){S.timelineCellCount=e},setStartGanttDate(e){S.startGanttDate=e},setEndGanttDate(e){S.endGanttDate=e},setScrollFlag(e){S.scrollFlag=e},setMode(e){S.mode=e},setDaySubMode(e){S.daySubMode=e},setHourSubMode(e){S.hourSubMode=e},setExpandRow(e){S.expandRow=e},toggleTaskCollapse(e){S.collapsedTasks.has(e)?S.collapsedTasks.delete(e):S.collapsedTasks.add(e),S.collapsedTasks=new Set(S.collapsedTasks)},setRootTask(e){S.rootTask=e},setSubTask(e){S.subTask=e},setEditTask(e){S.editTask=e},setRemoveTask(e){S.removeTask=e},setBarDate(e){S.barDate=e},setAllowChangeTaskDate(e){S.allowChangeTaskDate=e}};const tt=t.reactive({shouldScrollToToday:!1,triggerScrollToToday(){this.shouldScrollToToday=!0},shouldScroll:!1,triggerScroll(){this.shouldScroll=!0},highlightedId:null,triggerHighlight(e){this.highlightedId=e}}),Xn=t.ref(0),ea=t.ref(!1),Ao=e=>{Xn.value=e},Lo=e=>{ea.value=e},ta=()=>({scrollTop:Xn,scrollFlag:ea,setScrollTop:Ao,setScrollFlag:Lo}),Bo=t.defineComponent({props:{headers:{type:Array,default:()=>[]},rowHeight:{type:Number,default:0},row:{type:Object,default:()=>({})}},setup(e){const n=t.ref(!0),a=t.ref(!1),r="添加子任务",s="删除当前任务",i=t.computed(()=>S.mapFields),o=t.computed(()=>S.subTask),l=t.computed(()=>S.collapsedTasks);t.inject("barHover");const h=t.inject("addRootTask"),f=t.computed(()=>{const C=e.row[i.value.id];return S.tasks.some(A=>A[i.value.parentId]===C)}),k=t.computed(()=>{const C=e.row[i.value.id];return l.value.has(C)}),p=t.computed(()=>{const C=e.row[i.value.parentId];if(!C||C==="0")return!1;const A=S.tasks.filter(se=>se[i.value.parentId]===C);if(A.length===0)return!1;const oe=e.row[i.value.id];return A[A.length-1][i.value.id]===oe}),v=t.computed(()=>{const C=[],A=e.row.treeLevel||0;if(A<=1)return C;const oe=A-1,x=[];let se=e.row;for(;se;){x.unshift(se);const I=se[i.value.parentId];if(!I||I==="0")break;const X=S.tasks.find(le=>le[i.value.id]===I);if(!X)break;se=X}for(let I=x.length-2;I>=0;I--){const X=x[I],le=X[i.value.id],L=X[i.value.parentId],O=S.tasks.filter(m=>m[i.value.parentId]===L);if(O.length>0){if(O[O.length-1][i.value.id]===le)break;{const w=X.treeLevel;w&&w>=1&&w!==oe&&C.push(w)}}}return C}),H=()=>{const C=e.row[i.value.id];fe.toggleTaskCollapse(C)};t.onMounted(()=>{});const b=fe.setSubTask,$=fe.setEditTask,d=fe.setRemoveTask,z=(C,A)=>i.value[A]?C[i.value[A]]:C[A]?C[A]:null;return t.watch(()=>tt.highlightedId,C=>{e.row[i.value.id]===C?a.value=!0:a.value=!1}),{showRow:n,hover:a,addTips:r,removeTips:s,mapFields:i,subTask:o,hasChildren:f,isCollapsed:k,isLastChild:p,getAncestorLines:v,toggleCollapse:H,setSubTask:b,setEditTask:$,setRemoveTask:d,checkField:z,hoverActive:()=>{tt.triggerHighlight(e.row[i.value.id])},hoverInactive:()=>{tt.triggerHighlight(null)},addRootTask:()=>{h&&h(e.row)}}}}),Ho=["columnindex"],Yo={class:"no-cell-content"},Fo={class:"tree-lines"},Io=["title"],Ro={key:1,class:"collapse-placeholder"},zo={class:"no-text"},Oo={class:"action-buttons"},Po=["columnindex"];function xo(e,n,a,r,s,i){return e.showRow?(t.openBlock(),t.createElementBlock("div",{key:0,onMouseover:n[4]||(n[4]=o=>e.hoverActive()),onMouseleave:n[5]||(n[5]=o=>e.hoverInactive()),class:t.normalizeClass({active:e.hover})},[t.createElementVNode("div",{class:"row",onDblclick:n[3]||(n[3]=o=>e.setEditTask(e.row)),style:t.normalizeStyle({height:e.rowHeight+"px"})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.headers,(o,l)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[o.property==="no"?(t.openBlock(),t.createElementBlock("div",{class:"cellNo",key:l,columnindex:l,style:t.normalizeStyle({minWidth:o.width+"px",maxWidth:o.width+"px",height:e.rowHeight+"px"})},[t.createElementVNode("div",Yo,[t.createElementVNode("div",Fo,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.getAncestorLines,h=>(t.openBlock(),t.createElementBlock("div",{key:"ancestor-"+h,class:"tree-line-vertical ancestor",style:t.normalizeStyle({left:h*16+8+"px"})},null,4))),128)),e.row.treeLevel===1&&e.hasChildren&&!e.isCollapsed?(t.openBlock(),t.createElementBlock("div",{key:0,class:"tree-line-vertical parent-to-child",style:t.normalizeStyle({left:e.row.treeLevel*16+8+"px"})},null,4)):t.createCommentVNode("",!0),e.row.treeLevel&&e.row.treeLevel>1?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",{class:t.normalizeClass(["tree-line-vertical current",{"is-last-child":e.isLastChild}]),style:t.normalizeStyle({left:(e.row.treeLevel-1)*16+8+"px"})},null,6),t.createElementVNode("div",{class:"tree-line-horizontal",style:t.normalizeStyle({left:(e.row.treeLevel-1)*16+8+"px",width:"32px"})},null,4),e.hasChildren&&!e.isCollapsed?(t.openBlock(),t.createElementBlock("div",{key:0,class:"tree-line-vertical parent-to-child",style:t.normalizeStyle({left:e.row.treeLevel*16+8+"px"})},null,4)):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0)]),t.createElementVNode("div",{class:"no-left-section",style:t.normalizeStyle({paddingLeft:(e.row.treeLevel||0)*16+"px"})},[e.hasChildren?(t.openBlock(),t.createElementBlock("button",{key:0,onClick:n[0]||(n[0]=t.withModifiers((...h)=>e.toggleCollapse&&e.toggleCollapse(...h),["stop"])),class:t.normalizeClass(["collapse-btn",{collapsed:e.isCollapsed}]),title:e.isCollapsed?"展开":"折叠"},n[6]||(n[6]=[t.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},[t.createElementVNode("path",{class:"arrow",d:"M5 4 L14 9 L5 14 Z",fill:"currentColor"})],-1)]),10,Io)):(t.openBlock(),t.createElementBlock("span",Ro)),t.createElementVNode("span",zo,t.toDisplayString(e.row.no),1)],4),t.createElementVNode("div",Oo,[t.createElementVNode("button",{onClick:n[1]||(n[1]=t.withModifiers(h=>e.setSubTask(e.row),["stop"])),class:"action-btn add-btn",title:"添加子任务"},n[7]||(n[7]=[t.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor"},[t.createElementVNode("path",{d:"M8 2a.5.5 0 01.5.5v5h5a.5.5 0 010 1h-5v5a.5.5 0 01-1 0v-5h-5a.5.5 0 010-1h5v-5A.5.5 0 018 2z"})],-1)])),t.createElementVNode("button",{onClick:n[2]||(n[2]=t.withModifiers(h=>e.setRemoveTask(e.row),["stop"])),class:"action-btn delete-btn",title:"删除任务"},n[8]||(n[8]=[t.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"currentColor"},[t.createElementVNode("path",{d:"M5.5 5.5A.5.5 0 016 6v6a.5.5 0 01-1 0V6a.5.5 0 01.5-.5zm2.5 0a.5.5 0 01.5.5v6a.5.5 0 01-1 0V6a.5.5 0 01.5-.5zm3 .5a.5.5 0 00-1 0v6a.5.5 0 001 0V6z"}),t.createElementVNode("path",{"fill-rule":"evenodd",d:"M14.5 3a1 1 0 01-1 1H13v9a2 2 0 01-2 2H5a2 2 0 01-2-2V4h-.5a1 1 0 01-1-1V2a1 1 0 011-1H6a1 1 0 011-1h2a1 1 0 011 1h3.5a1 1 0 011 1v1zM4.118 4L4 4.059V13a1 1 0 001 1h6a1 1 0 001-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z"})],-1)]))])])],12,Ho)):t.withDirectives((t.openBlock(),t.createElementBlock("div",{class:"cell",key:l+"-header",columnindex:l,style:t.normalizeStyle({minWidth:o.width+"px",maxWidth:o.width+"px",height:e.rowHeight+"px"})},t.toDisplayString(e.checkField(e.row,o.property)),13,Po)),[[t.vShow,o.show]])],64))),256))],36)],34)):t.createCommentVNode("",!0)}const Go=Oe(Bo,[["render",xo],["__scopeId","data-v-0fbd050a"]]),qo=t.defineComponent({props:{headers:Array,rowHeight:Number,tasks:Array},components:{TaskRow:Go},setup(e){const n=t.ref([]),a=t.computed(()=>S.mapFields),r=t.computed(()=>S.collapsedTasks),s=f=>{const k=new Set,p=e.tasks||S.tasks,v=H=>{p.filter($=>$[a.value.parentId]===H).forEach($=>{const d=$[a.value.id];k.add(d),v(d)})};return v(f),k},i=t.computed(()=>new Set(n.value.map(f=>f[a.value.id]))),o=t.computed(()=>{const f=i.value,k=S.tasks.filter(v=>!f.has(v[a.value.id])),p=new Set;return r.value.forEach(v=>{s(v).forEach(b=>p.add(b))}),k.filter(v=>!p.has(v[a.value.id]))}),l=t.computed({get:()=>S.expandRow,set:f=>{fe.setExpandRow(f)}});t.watch(l,f=>{n.value=[],h(f.pid)});const h=f=>{let k=e.tasks?e.tasks.filter(p=>p[a.value.parentId]===f):[];if(k&&k.length>0)for(let p=0;p<k.length;p++)l.value.expand===!1&&n.value.push(k[p]),h(k[p][a.value.id])};return{filterTask:o,expandRow:l,recursionRow:h,mapFields:a}}});function Uo(e,n,a,r,s,i){const o=t.resolveComponent("TaskRow");return t.openBlock(),t.createElementBlock("div",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filterTask,l=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:l.id+"_taskrow"},[e.headers?(t.openBlock(),t.createBlock(o,{key:0,headers:e.headers,rowHeight:e.rowHeight,row:l},null,8,["headers","rowHeight","row"])):t.createCommentVNode("",!0)],64))),128))])}const Wo=Oe(qo,[["render",Uo]]),Zo=t.defineComponent({props:{headers:{type:Array,default:()=>[]},rowHeight:{type:Number,default:0}},components:{TaskRecursionRow:Wo},setup(e){const n=t.computed(()=>S.tasks),{scrollTop:a,scrollFlag:r,setScrollTop:s,setScrollFlag:i}=ta(),o=t.ref(null),l=t.computed(()=>S.mapFields),h=t.computed(()=>n.value.length*e.rowHeight),f=()=>n.value.filter($=>$[l.value.parentId]==="0");t.watch(a,$=>{!r.value&&o.value&&(o.value.scrollTop=$)});let k=null;const p=()=>{k&&cancelAnimationFrame(k),k=requestAnimationFrame(()=>{o.value&&(i(!0),s(o.value.scrollTop)),k=null})},v=()=>{},H=()=>{if(o.value){const $=document.querySelector(".table .content");$&&($.scrollWidth>$.clientWidth?o.value.style.paddingBottom="20px":o.value.style.paddingBottom="0px")}};t.watch(n,()=>{setTimeout(H,50)});const b=()=>{setTimeout(H,50)};return t.onMounted(()=>{o.value&&(o.value.scrollTop=a.value,setTimeout(H,100),window.addEventListener("resize",b))}),t.onUnmounted(()=>{window.removeEventListener("resize",b)}),{tasks:n,taskContent:o,scrollFlag:r,mapFields:l,setScrollFlag:i,getRootNode:f,scroll:p,mouseover:v,contentHeight:h}}});function Jo(e,n,a,r,s,i){const o=t.resolveComponent("TaskRecursionRow");return t.openBlock(),t.createElementBlock("div",{ref:"taskContent",class:"content",onScroll:n[0]||(n[0]=l=>e.scroll()),onMouseover:n[1]||(n[1]=l=>e.mouseover())},[t.createElementVNode("div",{class:"content-inner",style:t.normalizeStyle({minHeight:e.contentHeight+"px"})},[t.createVNode(o,{headers:e.headers,rowHeight:e.rowHeight,tasks:e.tasks},null,8,["headers","rowHeight","tasks"])],4)],544)}const jo=Oe(Zo,[["render",Jo],["__scopeId","data-v-f13dd030"]]),Ko=t.defineComponent({props:{visible:{type:Boolean,default:!1},headers:{type:Array,required:!0}},emits:["close","update:headers"],setup(e,{emit:n}){const{t:a}=et(),r=t.ref(null),s=t.ref("metro"),i=v=>{if(!r.value)return;const H=je.getThemeInfo(v);H&&(r.value.setAttribute("data-gantt-theme",v),Object.entries(H.cssVariables).forEach(([b,$])=>{r.value.style.setProperty(b,$)}))};return t.watch(()=>e.visible,v=>{v&&(s.value=je.getCurrentTheme(),setTimeout(()=>{i(s.value)},0))}),{t:a,panelRef:r,currentTheme:s,getHeaderTitle:v=>{const b={no:"task.serialNumber",task:"task.name",priority:"task.priority",startdate:"task.startDate",enddate:"task.endDate",takestime:"task.duration",progress:"task.progress",id:"ID",parentId:"Parent ID"}[v.property];return b?b.includes(".")?a(b):b:v.title},handleClose:()=>{n("close")},toggleColumn:v=>{const H=[...e.headers];H[v].show=!H[v].show,n("update:headers",H)},showAll:()=>{const v=e.headers.map(H=>({...H,show:!0}));n("update:headers",v)},hideAll:()=>{const v=e.headers.map(H=>({...H,show:!1}));n("update:headers",v)},reset:()=>{const v={no:!0,task:!0,priority:!0,startdate:!0,enddate:!0,takestime:!0,progress:!0,id:!1,parentId:!1},H=e.headers.map(b=>({...b,show:v[b.property]!==void 0?v[b.property]:!0}));n("update:headers",H)}}}}),Qo=["data-gantt-theme"],Xo=["data-gantt-theme"],er={class:"panel-header"},tr=["title"],nr={class:"panel-desc"},ar={class:"action-buttons"},or={class:"column-list"},rr={class:"checkbox-wrapper"},sr=["checked","onChange"],ir={class:"column-label"};function lr(e,n,a,r,s,i){return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[e.visible?(t.openBlock(),t.createElementBlock("div",{key:0,class:"column-config-overlay",onClick:n[4]||(n[4]=t.withModifiers((...o)=>e.handleClose&&e.handleClose(...o),["self"])),"data-gantt-theme":e.currentTheme},[t.createElementVNode("div",{class:"column-config-panel",ref:"panelRef","data-gantt-theme":e.currentTheme},[t.createElementVNode("div",er,[t.createElementVNode("h3",null,t.toDisplayString(e.t("columnSettings.title")),1),t.createElementVNode("button",{class:"close-btn",onClick:n[0]||(n[0]=(...o)=>e.handleClose&&e.handleClose(...o)),title:e.t("tooltip.close")},n[5]||(n[5]=[t.createElementVNode("svg",{viewBox:"0 0 24 24",width:"20",height:"20"},[t.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z",fill:"currentColor"})],-1)]),8,tr)]),t.createElementVNode("div",nr,t.toDisplayString(e.t("columnSettings.desc")),1),t.createElementVNode("div",ar,[t.createElementVNode("button",{class:"action-btn",onClick:n[1]||(n[1]=(...o)=>e.showAll&&e.showAll(...o))},[n[6]||(n[6]=t.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[t.createElementVNode("path",{d:"M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z",fill:"currentColor"})],-1)),t.createTextVNode(" "+t.toDisplayString(e.t("columnSettings.showAll")),1)]),t.createElementVNode("button",{class:"action-btn",onClick:n[2]||(n[2]=(...o)=>e.hideAll&&e.hideAll(...o))},[n[7]||(n[7]=t.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[t.createElementVNode("path",{d:"M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46A11.804 11.804 0 0 0 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z",fill:"currentColor"})],-1)),t.createTextVNode(" "+t.toDisplayString(e.t("columnSettings.hideAll")),1)]),t.createElementVNode("button",{class:"action-btn",onClick:n[3]||(n[3]=(...o)=>e.reset&&e.reset(...o))},[n[8]||(n[8]=t.createElementVNode("svg",{viewBox:"0 0 24 24",width:"16",height:"16"},[t.createElementVNode("path",{d:"M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z",fill:"currentColor"})],-1)),t.createTextVNode(" "+t.toDisplayString(e.t("columnSettings.reset")),1)])]),t.createElementVNode("div",or,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.headers,(o,l)=>(t.openBlock(),t.createElementBlock("div",{key:o.property,class:t.normalizeClass(["column-item",{disabled:!o.show}])},[t.createElementVNode("label",rr,[t.createElementVNode("input",{type:"checkbox",checked:o.show,onChange:h=>e.toggleColumn(l)},null,40,sr),n[9]||(n[9]=t.createElementVNode("span",{class:"checkbox-custom"},null,-1)),t.createElementVNode("span",ir,t.toDisplayString(e.getHeaderTitle(o)),1)])],2))),128))])],8,Xo)],8,Qo)):t.createCommentVNode("",!0)])}const dr=Oe(Ko,[["render",lr],["__scopeId","data-v-fd147c82"]]);var gn={exports:{}},cr=gn.exports,na;function ur(){return na||(na=1,function(e,n){(function(a,r){e.exports=r()})(cr,function(){return function(a,r,s){r.prototype.isBetween=function(i,o,l,h){var f=s(i),k=s(o),p=(h=h||"()")[0]==="(",v=h[1]===")";return(p?this.isAfter(f,l):!this.isBefore(f,l))&&(v?this.isBefore(k,l):!this.isAfter(k,l))||(p?this.isBefore(f,l):!this.isAfter(f,l))&&(v?this.isAfter(k,l):!this.isBefore(k,l))}}})}(gn)),gn.exports}var fr=ur();const mr=en(fr);g.extend(mr);const hr=t.defineComponent({props:{headersHeight:{type:Number,default:50},rowHeight:{type:Number,default:0}},components:{TaskHeader:No,TaskContent:jo,ColumnConfigPanel:dr},setup(){const{t:e}=et(),n=t.computed(()=>S.tasks),a=t.computed(()=>S.taskHeaders),r=t.computed({get:()=>S.rootTask,set:p=>{fe.setRootTask(p)}}),s=t.computed(()=>S.startGanttDate),i=t.computed(()=>S.endGanttDate),o=t.ref(!1),l=fe.setRootTask;return{t:e,tasks:n,taskHeaders:a,rootTask:r,startGanttDate:s,endGanttDate:i,setRootTask:l,scrollToToday:()=>{g().isBetween(s.value,i.value)&&tt.triggerScrollToToday()},columnConfigVisible:o,showColumnConfig:()=>{o.value=!0},updateHeaders:p=>{fe.setTaskHeaders(p)}}}}),gr={class:"table"},pr=["title"];function yr(e,n,a,r,s,i){const o=t.resolveComponent("TaskHeader"),l=t.resolveComponent("TaskContent"),h=t.resolveComponent("ColumnConfigPanel");return t.openBlock(),t.createElementBlock("div",gr,[t.createElementVNode("div",{class:"header",style:t.normalizeStyle({height:`${e.headersHeight}px`})},[(t.openBlock(),t.createElementBlock("svg",{ref:"addTaskSvg",t:"1647915776075",onClick:n[0]||(n[0]=f=>e.setRootTask({})),class:"addRootTask",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"3147",width:"28",height:"28"},n[4]||(n[4]=[t.createElementVNode("path",{d:"M864 0H160C70.4 0 0 70.4 0 160v704c0 89.6 70.4 160 160 160h704c89.6 0 160-70.4 160-160V160c0-89.6-70.4-160-160-160z m96 864c0 54.4-41.6 96-96 96H160c-54.4 0-96-41.6-96-96V160c0-54.4 41.6-96 96-96h704c54.4 0 96 41.6 96 96v704z",fill:"currentColor","p-id":"3148"},null,-1),t.createElementVNode("path",{d:"M768 480h-224V256c0-19.2-12.8-32-32-32s-32 12.8-32 32v224H256c-19.2 0-32 12.8-32 32s12.8 32 32 32h224v224c0 19.2 12.8 32 32 32s32-12.8 32-32v-224h224c19.2 0 32-12.8 32-32s-12.8-32-32-32z","p-id":"3149",fill:"currentColor"},null,-1)]),512)),(t.openBlock(),t.createElementBlock("svg",{ref:"jumpTodaySvg",onClick:n[1]||(n[1]=f=>e.scrollToToday()),class:"jumpToToday",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28"},n[5]||(n[5]=[t.createElementVNode("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2z",fill:"currentColor"},null,-1),t.createElementVNode("circle",{cx:"12",cy:"15",r:"2",fill:"currentColor"},null,-1),t.createElementVNode("path",{d:"M16.5 11.5l2 2-2 2",stroke:"currentColor","stroke-width":"1.5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),t.createElementVNode("path",{d:"M18.5 13.5h-4",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1)]),512)),(t.openBlock(),t.createElementBlock("svg",{ref:"columnSettingsSvg",onClick:n[2]||(n[2]=(...f)=>e.showColumnConfig&&e.showColumnConfig(...f)),class:"columnSettings",title:e.t("tooltip.columnSettings"),viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"28",height:"28"},n[6]||(n[6]=[t.createElementVNode("path",{d:"M3 3h8v8H3V3zm10 0h8v8h-8V3zM3 13h8v8H3v-8zm10 0h8v8h-8v-8z",fill:"none",stroke:"currentColor","stroke-width":"1.5"},null,-1),t.createElementVNode("path",{d:"M5 6h4M5 8h4M15 6h4M15 8h4M5 16h4M5 18h4M15 16h4M15 18h4",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round"},null,-1),t.createElementVNode("circle",{cx:"20",cy:"4",r:"3",fill:"var(--primary, #0078d4)",stroke:"var(--bg-content, #ffffff)","stroke-width":"1.5"},null,-1)]),8,pr)),t.createVNode(o,{headers:e.taskHeaders},null,8,["headers"])],4),t.createElementVNode("div",{style:t.normalizeStyle({height:`calc(100% - ${e.headersHeight}px)`})},[Array.isArray(e.tasks)&&e.tasks.length>0?(t.openBlock(),t.createBlock(l,{key:0,headers:e.taskHeaders,rowHeight:e.rowHeight},null,8,["headers","rowHeight"])):t.createCommentVNode("",!0)],4),t.createVNode(h,{visible:e.columnConfigVisible,headers:e.taskHeaders,onClose:n[3]||(n[3]=f=>e.columnConfigVisible=!1),"onUpdate:headers":e.updateHeaders},null,8,["visible","headers","onUpdate:headers"])])}const kr=Oe(hr,[["render",yr],["__scopeId","data-v-7fa4bb80"]]),br=t.defineComponent({props:{weekHeaders:{type:Array,default:()=>[]},dayHeaders:{type:Array,default:()=>[]},monthHeaders:{type:Array,default:()=>[]},hourHeaders:{type:Array,default:()=>[]}},setup(e){const{weekHeaders:n,dayHeaders:a,monthHeaders:r,hourHeaders:s}=t.toRefs(e),{locale:i}=et();return{weekHeaders:n,dayHeaders:a,monthHeaders:r,hourHeaders:s,isToday:l=>{const f={"zh-CN":"zh-cn","en-US":"en","ja-JP":"ja","ko-KR":"ko","fr-FR":"fr","de-DE":"de","es-ES":"es","ru-RU":"ru"}[i.value]||"en";return l===g().locale(f).format("YYYY-MM-DD")}}}}),wr={class:"headerContainer"},Cr={key:0,class:"header"},Sr={key:1,class:"header"},vr={key:2,class:"header"},Dr={key:0,class:"today",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20"},Tr={key:3,class:"header"};function Mr(e,n,a,r,s,i){return t.openBlock(),t.createElementBlock("div",wr,[e.monthHeaders&&e.monthHeaders.length>0?(t.openBlock(),t.createElementBlock("div",Cr,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.monthHeaders,o=>(t.openBlock(),t.createElementBlock("div",{key:o.title,class:"headerCaption",style:t.normalizeStyle([{"border-bottom":"0px"},{width:o.width+"px"}])},[t.createElementVNode("span",{style:t.normalizeStyle({width:o.width+"px"})},t.toDisplayString(o.title),5)],4))),128))])):t.createCommentVNode("",!0),e.weekHeaders&&e.weekHeaders.length>0?(t.openBlock(),t.createElementBlock("div",Sr,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.weekHeaders,o=>(t.openBlock(),t.createElementBlock("div",{key:o.title,class:"headerCaption",style:t.normalizeStyle([{"border-top":"1px"},{width:o.width+"px"}])},[t.createElementVNode("span",{style:t.normalizeStyle({width:o.width+"px"})},t.toDisplayString(o.title),5)],4))),128))])):t.createCommentVNode("",!0),e.dayHeaders&&e.dayHeaders.length>0?(t.openBlock(),t.createElementBlock("div",vr,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.dayHeaders,o=>(t.openBlock(),t.createElementBlock("div",{key:o.title,class:"headerCaption",style:t.normalizeStyle({width:o.width+"px"})},[t.createElementVNode("span",{style:t.normalizeStyle({width:o.width+"px"})},t.toDisplayString(o.title),5),e.isToday(o.fulldate)?(t.openBlock(),t.createElementBlock("svg",Dr,n[0]||(n[0]=[t.createElementVNode("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zm0-12H5V6h14v2z",fill:"currentColor"},null,-1),t.createElementVNode("circle",{cx:"12",cy:"15",r:"2",fill:"currentColor"},null,-1),t.createElementVNode("path",{d:"M8 11l4 4 4-4",stroke:"currentColor","stroke-width":"1.5",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))):t.createCommentVNode("",!0)],4))),128))])):t.createCommentVNode("",!0),e.hourHeaders&&e.hourHeaders.length>0?(t.openBlock(),t.createElementBlock("div",Tr,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.hourHeaders,o=>(t.openBlock(),t.createElementBlock("div",{key:o.title,class:"headerCaption",style:t.normalizeStyle({width:o.width+"px"})},[t.createElementVNode("span",{style:t.normalizeStyle({width:o.width+"px"})},t.toDisplayString(o.title),5)],4))),128))])):t.createCommentVNode("",!0)])}const $r=Oe(br,[["render",Mr],["__scopeId","data-v-5000e18a"]]);var pn={exports:{}},Er=pn.exports,aa;function Vr(){return aa||(aa=1,function(e,n){(function(a,r){e.exports=r()})(Er,function(){var a="day";return function(r,s,i){var o=function(f){return f.add(4-f.isoWeekday(),a)},l=s.prototype;l.isoWeekYear=function(){return o(this).year()},l.isoWeek=function(f){if(!this.$utils().u(f))return this.add(7*(f-this.isoWeek()),a);var k,p,v,H,b=o(this),$=(k=this.isoWeekYear(),p=this.$u,v=(p?i.utc:i)().year(k).startOf("year"),H=4-v.isoWeekday(),v.isoWeekday()>4&&(H+=7),v.add(H,a));return b.diff($,"week")+1},l.isoWeekday=function(f){return this.$utils().u(f)?this.day()||7:this.day(this.day()%7?f:f-7)};var h=l.startOf;l.startOf=function(f,k){var p=this.$utils(),v=!!p.u(k)||k;return p.p(f)==="isoweek"?v?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):h.bind(this)(f,k)}}})}(pn)),pn.exports}var Nr=Vr();const oa=en(Nr);g.extend(oa);const _r=t.defineComponent({name:"Bar",emits:["progress-update"],props:{rowHeight:{type:Number,default:0},row:{type:Object,default:()=>({})},startGanttDate:{type:String},endGanttDate:{type:String}},setup(e,{emit:n}){const a=t.ref(null),r=t.ref(e.rowHeight*.7),s=t.ref(null),i=t.ref(0),o=t.ref(0),l=t.ref(!0),h=t.ref(!1),f=t.ref(""),k=t.ref(!1),p=t.ref(0),v=t.ref(!1),H=t.computed(()=>S.timelineCellCount),b=t.computed(()=>S.scale),$=t.computed(()=>S.mode),d=t.computed(()=>S.mapFields),z=t.computed(()=>{const L=Number(e.row[d.value.progress]);return isNaN(L)?"0.00%":(L*100).toFixed(2)+"%"}),B=t.inject(Mt.SetBarColorSymbol),W=()=>{let L="#ffffff",O="#f8f8f8",m="#cecece";if(a.value){let c=a.value.parentElement;for(;c;){if(c.hasAttribute("data-gantt-theme")){L=getComputedStyle(c).getPropertyValue("--bg-content").trim()||"#ffffff",O=getComputedStyle(c).getPropertyValue("--bg-secondary").trim()||"#f8f8f8",m=getComputedStyle(c).getPropertyValue("--border").trim()||"#cecece";break}c=c.parentElement}}return{bgContent:L,bgSecondary:O,borderColor:m}},R=t.computed(()=>{if($.value!=="日")return[];const L=[],O=S.daySubMode==="half",m=O?2:1;for(let c=0;c<H.value;c++){const w=O?Math.floor(c/m):c,T=g(e.startGanttDate).add(w,"days").isoWeekday();(T===6||T===7)&&L.push(c)}return L}),C=t.computed(()=>{const L=b.value,O=H.value*L,{bgContent:m,bgSecondary:c,borderColor:w}=W();let y=`
|
|
2
|
+
repeating-linear-gradient(
|
|
3
|
+
to right,
|
|
4
|
+
transparent 0px,
|
|
5
|
+
transparent ${L-1}px,
|
|
6
|
+
${w} ${L-1}px,
|
|
7
|
+
${w} ${L}px
|
|
8
|
+
)
|
|
9
|
+
`;if($.value==="日"){const T=R.value;T.length>0&&(y=T.map(M=>{const V=M*L,Z=V+L;return`linear-gradient(to right, transparent ${V}px, ${c} ${V}px, ${c} ${Z}px, transparent ${Z}px)`}).join(", ")+", "+y)}return{height:e.rowHeight+"px",width:O+"px",minWidth:O+"px",background:m,backgroundImage:y,backgroundSize:`${O}px 100%`,borderBottom:`1px solid ${w}`}}),A=L=>{const O={taskId:e.row[d.value.id],oldProgress:Number(e.row[d.value.progress])||0,newProgress:L,task:e.row};n("progress-update",O),window.dispatchEvent(new CustomEvent("taskProgressUpdate",{detail:O})),console.log("Task progress updated:",O)};t.watch(()=>tt.highlightedId,L=>{h.value=e.row[d.value.id]===L});const oe=()=>tt.triggerHighlight(e.row[d.value.id]),x=()=>tt.triggerHighlight(null),se=L=>{p.value;let O="#ffffff",m="#f8f8f8";if(a.value){let c=a.value.parentElement;for(;c;){if(c.hasAttribute("data-gantt-theme")){O=getComputedStyle(c).getPropertyValue("--bg-content").trim()||"#ffffff",m=getComputedStyle(c).getPropertyValue("--bg-secondary").trim()||"#f8f8f8";break}c=c.parentElement}}switch($.value){case"季度":return O;case"月":return g(e.startGanttDate).startOf("month").add(L,"months"),O;case"日":{const w=S.daySubMode==="half"?Math.floor(L/2):L;let y=g(e.startGanttDate).add(w,"days");return y.isoWeekday()===7||y.isoWeekday()===1?m:O}case"周":case"时":return O}},I=fe.setBarDate,X=fe.setAllowChangeTaskDate,le=L=>{let O=0;switch($.value){case"季度":{const N=g(e.startGanttDate).startOf("quarter"),P=g(e.row[d.value.startdate]).startOf("quarter"),j=g(e.row[d.value.enddate]).startOf("quarter");let G=(P.year()-N.year())*4+(P.quarter()-N.quarter());O=b.value*G;let ee=(j.year()-P.year())*4+(j.quarter()-P.quarter())+1;o.value=ee*b.value,e.row[d.value.takestime]=ee+Ae("durationUnit.quarters");break}case"月":{const N=g(e.startGanttDate).startOf("month"),P=g(e.row[d.value.startdate]).startOf("month"),j=g(e.row[d.value.enddate]).startOf("month");let G=(P.year()-N.year())*12+(P.month()-N.month());O=b.value*G;let ee=(j.year()-P.year())*12+(j.month()-P.month())+1;o.value=ee*b.value,e.row[d.value.takestime]=ee+Ae("durationUnit.months");break}case"日":{const N=S.daySubMode==="half",P=N?2:1;let j=g(e.row[d.value.startdate]).diff(g(e.startGanttDate),"days");if(N){const ee=g(e.row[d.value.startdate]).hour(),Ye=g(e.row[d.value.enddate]).hour(),Ee=ee<12,Ne=Ye<12,$e=Ee?0:1,we=Ne?0:1;O=b.value*(j*2+$e);const Fe=g(e.row[d.value.enddate]).diff(g(e.startGanttDate),"days")*2+we,Pe=j*2+$e;o.value=(Fe-Pe+1)*b.value}else O=b.value*j*P;let G=g(e.row[d.value.enddate]).diff(g(e.row[d.value.startdate]),"days")+1;N||(o.value=G*b.value*P),e.row[d.value.takestime]=G+Ae("durationUnit.days");break}case"周":{const N=g(e.startGanttDate).startOf("isoWeek"),P=g(e.row[d.value.startdate]).startOf("isoWeek");let j=P.diff(N,"week");O=b.value*j;let ee=g(e.row[d.value.enddate]).startOf("isoWeek").diff(P,"week")+1;o.value=ee*b.value,e.row[d.value.takestime]=ee+Ae("durationUnit.weeks");break}case"时":{const N=S.hourSubMode||"60",P=parseInt(N);if(P<60){let j=g(e.row[d.value.startdate]).diff(g(e.startGanttDate),"minutes"),G=Math.floor(j/P);O=b.value*G;let ee=g(e.row[d.value.enddate]).diff(g(e.row[d.value.startdate]),"minutes")+P,Ye=Math.ceil(ee/P);o.value=Ye*b.value;const Ee=Math.floor(ee/60),Ne=ee%60;Ee>0&&Ne>0?e.row[d.value.takestime]=Ae("durationUnit.hoursAndMinutes",{hours:Ee,minutes:Ne}):Ee>0?e.row[d.value.takestime]=`${Ee}${Ae("durationUnit.hours")}`:e.row[d.value.takestime]=`${Ne}${Ae("durationUnit.minutes")}`}else{let j=g(e.row[d.value.startdate]).diff(g(e.startGanttDate),"hours");O=b.value*j;let G=g(e.row[d.value.enddate]).diff(g(e.row[d.value.startdate]),"hours")+1;o.value=G*b.value,e.row[d.value.takestime]=G+Ae("durationUnit.hours")}break}}i.value=O;let m=$n(L);const c=getComputedStyle(L).getPropertyValue("--border")||"#cecece";L.setAttribute("data-x",O.toString()),L.setAttribute("width",o.value.toString()),L.setAttribute("stroke",c),L.setAttribute("stroke-width","1px"),L.style.transform=`translate(${O}px, 0px)`;let w=m.select("pattern").first(),y=m.children().filter(N=>N.type==="g")[0]||m.group(),T=m.select(".innerRect").first(),E=m.select("rect:not(.innerRect):not(.progressHandle)").first(),M=m.select("text").first(),V=m.select(".progressHandle").first();w||(w=m.pattern(10,10,N=>{N.path("M10 -5 -10,15M15,0,0,15M0 -5 -20,15").fill("none").stroke({color:"gray",opacity:.4,width:5})})),y||(y=m.group());let Z=e.row[d.value.progress]?Number(o.value)*Number(e.row[d.value.progress]):Number(o.value);T?(T.fill({color:f.value,opacity:.4}),T.width(Z)):(T=m.rect(Z,r.value).radius(10),T.addClass("innerRect"),y.add(T)),E?E.width(o.value):(E=m.rect(o.value,r.value).radius(10).fill(w).stroke({color:c,width:1}),E.on("mouseover",()=>E.animate(200).attr({stroke:"#000",strokeWidth:2,opacity:1})),E.on("mouseleave",()=>E.animate(200).attr({stroke:"#0066ff",strokeWidth:10,opacity:.4}))),M?M.text(z.value):M=m.text(z.value).stroke("#faf7ec");const Y=M.bbox();M.font({size:15,anchor:"middle",leading:"1em"}).fill("#000").attr("opacity",1).attr("dominant-baseline","middle").center(T.width()/2+Y.width/2,T.height()/2);const J=12,pe=8,ye=Z-J/2,Te=r.value-pe/2,ce=Z,ie=()=>{let N="#f59e0b",P="#d97706",j="#fbbf24",G=L.parentElement;for(;G;){if(G.hasAttribute("data-gantt-theme")){N=getComputedStyle(G).getPropertyValue("--primary").trim()||N,P=getComputedStyle(G).getPropertyValue("--primary-dark").trim()||P,j=getComputedStyle(G).getPropertyValue("--primary-light").trim()||j;break}G=G.parentElement}return{primary:N,primaryDark:P,primaryLight:j}};let F=L.querySelector(".progressGuideLine");const He=ie();if(!F){const N=document.createElementNS("http://www.w3.org/2000/svg","line");N.setAttribute("class","progressGuideLine"),N.setAttribute("x1",String(ce)),N.setAttribute("y1","0"),N.setAttribute("x2",String(ce)),N.setAttribute("y2",String(Te)),N.setAttribute("stroke",He.primaryDark),N.setAttribute("stroke-width","2"),N.setAttribute("stroke-dasharray","4,3"),N.setAttribute("opacity","0.8"),L.appendChild(N),F=N}if(F.setAttribute("x1",String(ce)),F.setAttribute("x2",String(ce)),F.setAttribute("y2",String(Te)),F.setAttribute("stroke",He.primaryDark),F.setAttribute("opacity","0.8"),V){V.move(ye,Te);const N=V.node;N.setAttribute("fill",He.primary),N.setAttribute("stroke",He.primaryDark)}else{const N=`${J/2},0 0,${pe} ${J},${pe}`;V=m.polygon(N).fill(He.primary).stroke({color:He.primaryDark,width:1}).addClass("progressHandle");const P=V.node;P.style.cursor="ew-resize",P.style.pointerEvents="auto",V.move(ye,Te);let j=ye;P.addEventListener("mouseenter",()=>{if(!v.value){const G=ie();P.setAttribute("fill",G.primaryLight),P.setAttribute("stroke",G.primary),P.setAttribute("stroke-width","2"),F.setAttribute("stroke",G.primaryLight),F.setAttribute("stroke-width","2"),F.setAttribute("opacity","1")}}),P.addEventListener("mouseleave",()=>{if(!v.value){const G=ie();P.setAttribute("fill",G.primary),P.setAttribute("stroke",G.primaryDark),P.setAttribute("stroke-width","1"),F.setAttribute("stroke",G.primaryDark),F.setAttribute("stroke-width","2"),F.setAttribute("opacity","0.8")}}),nt(P).draggable({inertia:!1,listeners:{start:()=>{v.value=!0;const G=ie();P.setAttribute("fill",G.primaryDark),P.setAttribute("stroke",G.primaryDark),P.setAttribute("stroke-width","2"),F.setAttribute("stroke",G.primaryDark),F.setAttribute("stroke-width","2"),F.setAttribute("opacity","1")},move:G=>{j+=G.dx,j=Math.max(-12/2,Math.min(j,o.value-J/2)),V.move(j,Te);const ee=j+J/2;F.setAttribute("x1",String(ee)),F.setAttribute("x2",String(ee));const Ye=Math.min(1,Math.max(0,(j+J/2)/o.value));T.width(Ye*o.value),M.text((Ye*100).toFixed(2)+"%"),M.center(T.width()/2+Y.width/2,T.height()/2)},end:()=>{v.value=!1;const G=ie();P.setAttribute("fill",G.primary),P.setAttribute("stroke",G.primaryDark),P.setAttribute("stroke-width","1"),F.setAttribute("stroke",G.primaryDark),F.setAttribute("stroke-width","2"),F.setAttribute("opacity","0.8");const ee=Math.min(1,Math.max(0,(j+J/2)/o.value));e.row[d.value.progress]=ee,A(ee)}}})}I({id:e.row[d.value.id],startDate:e.row[d.value.startdate],endDate:e.row[d.value.enddate]}),nt(L).draggable({inertia:!1,modifiers:[nt.modifiers.restrictRect({restriction:"parent",endOnly:!0})],autoScroll:!0,listeners:{start:N=>{v.value||(i.value=Number(N.target.getAttribute("data-x")),o.value=N.target.width.baseVal.value)},move:N=>{if(v.value)return;let P=((parseFloat(N.target.getAttribute("data-x")||"0")||0)+N.dx).toString();Object.assign(N.target.style,{width:`${N.rect.width}px`,height:`${N.rect.height}px`,transform:`translate(${P}px, 0px)`}),N.target.setAttribute("data-x",P),N.target.setAttribute("data-y","0")},end:N=>{if(v.value)return;let P=N.target,j=parseFloat(P.getAttribute("data-x")||"0")||0,ee=Math.round(j/b.value)*b.value;ee<0&&(ee=0),ee>H.value*b.value&&(ee=H.value*b.value);const Ye=d.value.parentId||"pid",Ee=e.row[Ye];if(Ee&&Ee!=="0"){const u=S.tasks.find(D=>String(D[d.value.id])===String(Ee));if(u){let D=0;if($.value==="季度"||$.value==="月"){const K=g(e.startGanttDate).startOf("month"),ae=g(u[d.value.startdate]).startOf("month");D=((ae.year()-K.year())*12+(ae.month()-K.month()))*b.value}else if($.value==="日")D=g(u[d.value.startdate]).diff(g(e.startGanttDate),"days")*b.value;else if($.value==="周"){const K=g(e.startGanttDate).startOf("isoWeek");D=g(u[d.value.startdate]).startOf("isoWeek").diff(K,"week")*b.value}else if($.value==="时"){const K=S.hourSubMode||"60",ae=parseInt(K);if(ae<60){const q=g(u[d.value.startdate]).diff(g(e.startGanttDate),"minutes");D=Math.floor(q/ae)*b.value}else D=g(u[d.value.startdate]).diff(g(e.startGanttDate),"hours")*b.value}ee<D&&(ee=D)}}P.style.transform=`translate(${ee}px, 0px)`,P.setAttribute("data-x",ee.toString());const Ne=Math.round((ee-i.value)/b.value);let $e=0,we=0,_e=0,Fe=0;if($.value==="季度")Fe=Ne;else if($.value==="月")_e=Ne;else if($.value==="日")if(S.daySubMode==="half"){const D=Math.round(ee/b.value),K=Math.round(o.value/b.value),ae=D+K-1,q=Math.floor(D/2),re=D%2===0,Se=g(e.startGanttDate).add(q,"days").hour(re?0:12).minute(0).second(0),ze=Math.floor(ae/2),Ve=ae%2===0,ke=g(e.startGanttDate).add(ze,"days").hour(Ve?11:23).minute(59).second(59);e.row[d.value.startdate]=Se.format("YYYY-MM-DD HH:mm:ss"),e.row[d.value.enddate]=ke.format("YYYY-MM-DD HH:mm:ss"),e.row[d.value.takestime]=ze-q+1+Ae("durationUnit.days")}else $e=Ne;else if($.value==="周")$e=Ne*7;else if($.value==="时"){const u=S.hourSubMode||"60",D=parseInt(u);if(D<60){const K=Math.round(ee/b.value),ae=Math.round(o.value/b.value),q=K+ae-1,re=60/D,Se=24*re,ze=Math.floor(K/Se),Ve=K%Se,ke=Math.floor(Ve/re),De=Ve%re*D,xe=g(e.startGanttDate).add(ze,"days").hour(ke).minute(De).second(0),We=Math.floor(q/Se),qe=q%Se,st=Math.floor(qe/re),mt=qe%re*D+D-1,Bt=g(e.startGanttDate).add(We,"days").hour(st).minute(mt).second(59);e.row[d.value.startdate]=xe.format("YYYY-MM-DD HH:mm:ss"),e.row[d.value.enddate]=Bt.format("YYYY-MM-DD HH:mm:ss");const Mn=Bt.diff(xe,"minutes")+1,Ht=Math.floor(Mn/60),In=Mn%60;Ht>0&&In>0?e.row[d.value.takestime]=Ae("durationUnit.hoursAndMinutes",{hours:Ht,minutes:In}):Ht>0?e.row[d.value.takestime]=`${Ht}${Ae("durationUnit.hours")}`:e.row[d.value.takestime]=`${In}${Ae("durationUnit.minutes")}`}else we=Ne}const Pe=$.value==="日"&&S.daySubMode==="half",he=$.value==="时"&&(S.hourSubMode==="15"||S.hourSubMode==="30");if($.value==="季度"){e.row[d.value.startdate]=g(e.row[d.value.startdate]).add(Fe,"quarters").format("YYYY-MM-DD HH:mm:ss"),e.row[d.value.enddate]=g(e.row[d.value.enddate]).add(Fe,"quarters").format("YYYY-MM-DD HH:mm:ss");const u=g(e.row[d.value.startdate]).startOf("quarter"),D=g(e.row[d.value.enddate]).startOf("quarter"),K=(D.year()-u.year())*4+(D.quarter()-u.quarter())+1;e.row[d.value.takestime]=K+Ae("durationUnit.quarters")}else if($.value==="月"){e.row[d.value.startdate]=g(e.row[d.value.startdate]).add(_e,"months").format("YYYY-MM-DD HH:mm:ss"),e.row[d.value.enddate]=g(e.row[d.value.enddate]).add(_e,"months").format("YYYY-MM-DD HH:mm:ss");const u=g(e.row[d.value.startdate]).startOf("month"),D=g(e.row[d.value.enddate]).startOf("month"),K=(D.year()-u.year())*12+(D.month()-u.month())+1;e.row[d.value.takestime]=K+Ae("durationUnit.months")}else if($.value==="时"&&!he)e.row[d.value.startdate]=g(e.row[d.value.startdate]).add(we,"hours").format("YYYY-MM-DD HH:mm:ss"),e.row[d.value.enddate]=g(e.row[d.value.enddate]).add(we,"hours").format("YYYY-MM-DD HH:mm:ss"),e.row[d.value.takestime]=g(e.row[d.value.enddate]).diff(g(e.row[d.value.startdate]),"hours")+1+Ae("durationUnit.hours");else if(!Pe&&!he){if(e.row[d.value.startdate]=g(e.row[d.value.startdate]).add($e,"days").format("YYYY-MM-DD HH:mm:ss"),e.row[d.value.enddate]=g(e.row[d.value.enddate]).add($e,"days").format("YYYY-MM-DD HH:mm:ss"),$.value==="日")e.row[d.value.takestime]=g(e.row[d.value.enddate]).diff(g(e.row[d.value.startdate]),"days")+1+Ae("durationUnit.days");else if($.value==="周"){const u=g(e.row[d.value.startdate]).startOf("isoWeek"),D=g(e.row[d.value.enddate]).startOf("isoWeek");e.row[d.value.takestime]=D.diff(u,"week")+1+Ae("durationUnit.weeks")}}const Re=g(e.row[d.value.startdate]),Le=e.row[d.value.id],Ce=(u,D)=>{const K=[];for(const ae of D)String(ae[Ye])===String(u)&&(K.push(ae),K.push(...Ce(ae[d.value.id],D)));return K},Ie=Ce(Le,S.tasks),te=$.value==="季度"?Fe:$.value==="月"?_e:$.value==="时"?we:$e;if(Pe||he||te>0){for(const u of Ie)if(g(u[d.value.startdate]).isBefore(Re)){if($.value==="季度")u[d.value.startdate]=g(u[d.value.startdate]).add(Fe,"quarters").format("YYYY-MM-DD HH:mm:ss"),u[d.value.enddate]=g(u[d.value.enddate]).add(Fe,"quarters").format("YYYY-MM-DD HH:mm:ss");else if($.value==="月")u[d.value.startdate]=g(u[d.value.startdate]).add(_e,"months").format("YYYY-MM-DD HH:mm:ss"),u[d.value.enddate]=g(u[d.value.enddate]).add(_e,"months").format("YYYY-MM-DD HH:mm:ss");else if($.value==="时")if(he){const D=Re.diff(g(u[d.value.startdate]),"minutes");u[d.value.startdate]=g(u[d.value.startdate]).add(D,"minutes").format("YYYY-MM-DD HH:mm:ss"),u[d.value.enddate]=g(u[d.value.enddate]).add(D,"minutes").format("YYYY-MM-DD HH:mm:ss")}else u[d.value.startdate]=g(u[d.value.startdate]).add(we,"hours").format("YYYY-MM-DD HH:mm:ss"),u[d.value.enddate]=g(u[d.value.enddate]).add(we,"hours").format("YYYY-MM-DD HH:mm:ss");else if(Pe){const D=Re.diff(g(u[d.value.startdate]),"hours");u[d.value.startdate]=g(u[d.value.startdate]).add(D,"hours").format("YYYY-MM-DD HH:mm:ss"),u[d.value.enddate]=g(u[d.value.enddate]).add(D,"hours").format("YYYY-MM-DD HH:mm:ss")}else u[d.value.startdate]=g(u[d.value.startdate]).add($e,"days").format("YYYY-MM-DD HH:mm:ss"),u[d.value.enddate]=g(u[d.value.enddate]).add($e,"days").format("YYYY-MM-DD HH:mm:ss");I({id:u[d.value.id],startDate:u[d.value.startdate],endDate:u[d.value.enddate]})}}I({id:e.row[d.value.id],startDate:e.row[d.value.startdate],endDate:e.row[d.value.enddate]})}}}),nt(L).resizable({edges:{left:!0,right:!0,bottom:!1,top:!1},listeners:{start:N=>{i.value=Number(N.target.getAttribute("data-x")),o.value=Number(N.target.getAttribute("width"))},end:N=>{X(e.row);let P=N.target,j=N.rect.width,G=Math.round(j/b.value);G<1&&(G=1),j=G*b.value;let ee=i.value;const Ye=N.edges&&N.edges.right&&!N.edges.left;if(N.edges&&N.edges.left){ee=i.value+(o.value-j),ee=Math.round(ee/b.value)*b.value,ee<0&&(ee=0);const he=d.value.parentId||"pid",Re=e.row[he];if(Re&&Re!=="0"){const Le=S.tasks.find(Ce=>String(Ce[d.value.id])===String(Re));if(Le){let Ce=0;if($.value==="季度"){const Ie=g(e.startGanttDate).startOf("quarter"),te=g(Le[d.value.startdate]).startOf("quarter");Ce=((te.year()-Ie.year())*4+(te.quarter()-Ie.quarter()))*b.value}else if($.value==="月"){const Ie=g(e.startGanttDate).startOf("month"),te=g(Le[d.value.startdate]).startOf("month");Ce=((te.year()-Ie.year())*12+(te.month()-Ie.month()))*b.value}else if($.value==="日"){const te=S.daySubMode==="half"?2:1;Ce=g(Le[d.value.startdate]).diff(g(e.startGanttDate),"days")*b.value*te}else if($.value==="周"){const Ie=g(e.startGanttDate).startOf("isoWeek");Ce=g(Le[d.value.startdate]).startOf("isoWeek").diff(Ie,"week")*b.value}else if($.value==="时"){const Ie=S.hourSubMode||"60",te=parseInt(Ie);if(te<60){const Be=g(Le[d.value.startdate]).diff(g(e.startGanttDate),"minutes");Ce=Math.floor(Be/te)*b.value}else Ce=g(Le[d.value.startdate]).diff(g(e.startGanttDate),"hours")*b.value}ee<Ce&&(ee=Ce,j=i.value+o.value-ee,G=Math.round(j/b.value),G<1&&(G=1),j=G*b.value)}}}P.setAttribute("width",j.toString()),P.style.width=j+"px",P.style.transform=`translate(${ee}px, 0px)`,P.setAttribute("data-x",ee.toString());let Ee=Math.round(ee/b.value),Ne=Ee+G-1,$e,we;if($.value==="季度"){const he=g(e.startGanttDate).startOf("quarter");$e=Ye?e.row[d.value.startdate]:he.add(Ee,"quarters").format("YYYY-MM-DD HH:mm:ss"),we=he.add(Ne,"quarters").endOf("quarter").format("YYYY-MM-DD HH:mm:ss"),e.row[d.value.takestime]=G+Ae("durationUnit.quarters")}else if($.value==="月"){const he=g(e.startGanttDate).startOf("month");$e=Ye?e.row[d.value.startdate]:he.add(Ee,"months").format("YYYY-MM-DD HH:mm:ss"),we=he.add(Ne,"months").endOf("month").format("YYYY-MM-DD HH:mm:ss"),e.row[d.value.takestime]=G+Ae("durationUnit.months")}else if($.value==="日"){const he=S.daySubMode==="half",Re=he?2:1,Le=he?Math.floor(Ne/Re):Ne;if(he){const Ce=Ee%2===0,Ie=Ne%2===0,te=Ce?0:12,Be=Ie?11:23;if(Ye){$e=e.row[d.value.startdate];const u=g(e.row[d.value.startdate]).diff(g(e.startGanttDate),"days"),D=Le-u+1;e.row[d.value.takestime]=D+Ae("durationUnit.days")}else{const u=Math.floor(Ee/Re);$e=g(e.startGanttDate).add(u,"days").hour(te).minute(0).second(0).format("YYYY-MM-DD HH:mm:ss");const D=Le-u+1;e.row[d.value.takestime]=D+Ae("durationUnit.days")}we=g(e.startGanttDate).add(Le,"days").hour(Be).minute(59).second(59).format("YYYY-MM-DD HH:mm:ss")}else if(Ye){$e=e.row[d.value.startdate];const Ie=g(e.row[d.value.startdate]).diff(g(e.startGanttDate),"days")+G-1;we=g(e.startGanttDate).add(Ie,"days").hour(23).minute(59).second(59).format("YYYY-MM-DD HH:mm:ss");const te=G;e.row[d.value.takestime]=te+Ae("durationUnit.days")}else{const Ce=Ee;$e=g(e.startGanttDate).add(Ce,"days").format("YYYY-MM-DD HH:mm:ss"),we=g(e.startGanttDate).add(Ne,"days").hour(23).minute(59).second(59).format("YYYY-MM-DD HH:mm:ss");const Ie=Ne-Ce+1;e.row[d.value.takestime]=Ie+Ae("durationUnit.days")}}else if($.value==="周"){const he=g(e.startGanttDate).startOf("isoWeek");$e=Ye?e.row[d.value.startdate]:he.add(Ee,"weeks").format("YYYY-MM-DD HH:mm:ss"),we=he.add(Ne,"weeks").endOf("isoWeek").format("YYYY-MM-DD HH:mm:ss"),e.row[d.value.takestime]=G+Ae("durationUnit.weeks")}else if($.value==="时"){const he=S.hourSubMode||"60",Re=parseInt(he);if(Re<60){const Le=60/Re,Ce=24*Le;if(Ye)$e=e.row[d.value.startdate];else{const q=Math.floor(Ee/Ce),re=Ee%Ce,Se=Math.floor(re/Le),ze=re%Le*Re;$e=g(e.startGanttDate).add(q,"days").hour(Se).minute(ze).second(0).format("YYYY-MM-DD HH:mm:ss")}const Ie=Math.floor(Ne/Ce),te=Ne%Ce,Be=Math.floor(te/Le),u=te%Le*Re+Re-1;we=g(e.startGanttDate).add(Ie,"days").hour(Be).minute(u).second(59).format("YYYY-MM-DD HH:mm:ss");const D=g(we).diff(g($e),"minutes")+1,K=Math.floor(D/60),ae=D%60;K>0&&ae>0?e.row[d.value.takestime]=Ae("durationUnit.hoursAndMinutes",{hours:K,minutes:ae}):K>0?e.row[d.value.takestime]=`${K}${Ae("durationUnit.hours")}`:e.row[d.value.takestime]=`${ae}${Ae("durationUnit.minutes")}`}else{if(Ye){$e=e.row[d.value.startdate];const Ce=g(e.row[d.value.startdate]).diff(g(e.startGanttDate),"hours")+G-1;we=g(e.startGanttDate).add(Ce,"hours").minute(59).second(59).format("YYYY-MM-DD HH:mm:ss")}else $e=g(e.startGanttDate).add(Ee,"hours").format("YYYY-MM-DD HH:mm:ss"),we=g(e.startGanttDate).add(Ne,"hours").minute(59).second(59).format("YYYY-MM-DD HH:mm:ss");e.row[d.value.takestime]=G+Ae("durationUnit.hours")}}else{if(Ye){$e=e.row[d.value.startdate];const Re=g(e.row[d.value.startdate]).diff(g(e.startGanttDate),"hours")+G-1;we=g(e.startGanttDate).add(Re,"hours").minute(59).second(59).format("YYYY-MM-DD HH:mm:ss")}else $e=g(e.startGanttDate).add(Ee,"hours").format("YYYY-MM-DD HH:mm:ss"),we=g(e.startGanttDate).add(Ne,"hours").minute(59).second(59).format("YYYY-MM-DD HH:mm:ss");e.row[d.value.takestime]=G+Ae("durationUnit.hours")}e.row[d.value.startdate]=$e,e.row[d.value.enddate]=we;let _e=$n(L),Fe=_e.select(".innerRect").first(),Pe=_e.select("rect:not(.innerRect):not(.progressHandle)").first();if(Fe){let he=e.row[d.value.progress]?j*Number(e.row[d.value.progress]):j;Fe.width(he)}if(Pe&&Pe.width(j),N.edges&&N.edges.left){const he=g($e),Re=e.row[d.value.id],Le=d.value.parentId||"pid",Ce=(te,Be)=>{const u=[];for(const D of Be)String(D[Le])===String(te)&&(u.push(D),u.push(...Ce(D[d.value.id],Be)));return u},Ie=Ce(Re,S.tasks);for(const te of Ie)if(g(te[d.value.startdate]).isBefore(he)){if($.value==="季度"){const Be=g(te[d.value.startdate]).startOf("quarter"),u=he.startOf("quarter"),D=(u.year()-Be.year())*4+(u.quarter()-Be.quarter());te[d.value.startdate]=g(te[d.value.startdate]).add(D,"quarters").format("YYYY-MM-DD HH:mm:ss"),te[d.value.enddate]=g(te[d.value.enddate]).add(D,"quarters").format("YYYY-MM-DD HH:mm:ss")}else if($.value==="月"){const Be=g(te[d.value.startdate]).startOf("month"),u=he.startOf("month"),D=(u.year()-Be.year())*12+(u.month()-Be.month());te[d.value.startdate]=g(te[d.value.startdate]).add(D,"months").format("YYYY-MM-DD HH:mm:ss"),te[d.value.enddate]=g(te[d.value.enddate]).add(D,"months").format("YYYY-MM-DD HH:mm:ss")}else if($.value==="时"){const Be=S.hourSubMode||"60";if(Be==="15"||Be==="30"){const u=he.diff(g(te[d.value.startdate]),"minutes");te[d.value.startdate]=g(te[d.value.startdate]).add(u,"minutes").format("YYYY-MM-DD HH:mm:ss"),te[d.value.enddate]=g(te[d.value.enddate]).add(u,"minutes").format("YYYY-MM-DD HH:mm:ss")}else{const u=he.diff(g(te[d.value.startdate]),"hours");te[d.value.startdate]=g(te[d.value.startdate]).add(u,"hours").format("YYYY-MM-DD HH:mm:ss"),te[d.value.enddate]=g(te[d.value.enddate]).add(u,"hours").format("YYYY-MM-DD HH:mm:ss")}}else if($.value==="日"&&S.daySubMode==="half"){const Be=he.diff(g(te[d.value.startdate]),"hours");te[d.value.startdate]=g(te[d.value.startdate]).add(Be,"hours").format("YYYY-MM-DD HH:mm:ss"),te[d.value.enddate]=g(te[d.value.enddate]).add(Be,"hours").format("YYYY-MM-DD HH:mm:ss")}else{const Be=he.diff(g(te[d.value.startdate]),"days");te[d.value.startdate]=g(te[d.value.startdate]).add(Be,"days").format("YYYY-MM-DD HH:mm:ss"),te[d.value.enddate]=g(te[d.value.enddate]).add(Be,"days").format("YYYY-MM-DD HH:mm:ss")}I({id:te[d.value.id],startDate:te[d.value.startdate],endDate:te[d.value.enddate]})}}I({id:e.row[d.value.id],startDate:$e,endDate:we})}},modifiers:[nt.modifiers.restrictEdges({outer:"parent"}),nt.modifiers.restrictSize({min:{width:b.value,height:r.value}})],inertia:!1,hold:1})};return t.watch(()=>[e.row[d.value.startdate],e.row[d.value.enddate]],()=>{a.value&&k.value&&le(a.value)},{deep:!1}),t.onMounted(()=>{if(a.value&&!k.value&&(le(a.value),k.value=!0),B&&(f.value=B(e.row),a.value&&le(a.value)),a.value){let L=a.value.parentElement;for(;L&&!L.hasAttribute("data-gantt-theme");)L=L.parentElement;if(L){const O=new MutationObserver(()=>{p.value++});O.observe(L,{attributes:!0,attributeFilter:["data-gantt-theme","style"]}),t.onBeforeUnmount(()=>O.disconnect())}}}),t.onDeactivated(()=>{if(a.value)try{nt(a.value).unset()}catch{}l.value=!1}),t.onBeforeUnmount(()=>{if(a.value)try{nt(a.value).unset()}catch{}l.value=!1}),{bar:a,barHeight:r,direction:s,oldBarDataX:i,oldBarWidth:o,showRow:l,hover:h,barColor:f,timelineCellCount:H,scale:b,mode:$,mapFields:d,hoverActive:oe,hoverInactive:x,WeekEndColor:se,barRowStyle:C}}}),Ar=["data-task-id"],Lr=["height"];function Br(e,n,a,r,s,i){return e.showRow?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["barRow",{active:e.hover}]),style:t.normalizeStyle(e.barRowStyle),onMouseover:n[0]||(n[0]=o=>e.hoverActive()),onMouseleave:n[1]||(n[1]=o=>e.hoverInactive()),"data-task-id":e.row[e.mapFields.id]},[e.showRow?(t.openBlock(),t.createElementBlock("svg",{key:"row.no",ref:"bar",class:t.normalizeClass(["bar",{active:e.hover}]),height:e.barHeight+"px",style:{overflow:"visible"}},null,10,Lr)):t.createCommentVNode("",!0)],46,Ar)):t.createCommentVNode("",!0)}const Hr=Oe(_r,[["render",Br],["__scopeId","data-v-c18ae1bc"]]);g.extend(oa);const Yr=t.defineComponent({name:"Milestone",props:{rowHeight:{type:Number,default:0},row:{type:Object,default:()=>({})},startGanttDate:{type:String},endGanttDate:{type:String}},setup(e){const n=t.ref(null),a=t.ref(e.rowHeight*.6),r=t.ref(!0),s=t.ref(!1),i=t.ref(""),o=t.ref(0),l=t.ref(0),h=t.computed(()=>S.timelineCellCount),f=t.computed(()=>S.scale),k=t.computed(()=>S.mode),p=t.computed(()=>S.mapFields),v=t.inject(Mt.SetBarColorSymbol),H=()=>{let C="#ffffff",A="#f8f8f8",oe="#cecece";if(n.value){let x=n.value.parentElement;for(;x;){if(x.hasAttribute("data-gantt-theme")){C=getComputedStyle(x).getPropertyValue("--bg-content").trim()||"#ffffff",A=getComputedStyle(x).getPropertyValue("--bg-secondary").trim()||"#f8f8f8",oe=getComputedStyle(x).getPropertyValue("--border").trim()||"#cecece";break}x=x.parentElement}}return{bgContent:C,bgSecondary:A,borderColor:oe}},b=t.computed(()=>{if(k.value!=="日")return[];const C=[],A=S.daySubMode==="half",oe=A?2:1;for(let x=0;x<h.value;x++){const se=A?Math.floor(x/oe):x,X=g(e.startGanttDate).add(se,"days").isoWeekday();(X===6||X===7)&&C.push(x)}return C}),$=t.computed(()=>{const C=f.value,A=h.value*C,{bgContent:oe,bgSecondary:x,borderColor:se}=H();let I=`
|
|
10
|
+
repeating-linear-gradient(
|
|
11
|
+
to right,
|
|
12
|
+
transparent 0px,
|
|
13
|
+
transparent ${C-1}px,
|
|
14
|
+
${se} ${C-1}px,
|
|
15
|
+
${se} ${C}px
|
|
16
|
+
)
|
|
17
|
+
`;if(k.value==="日"){const X=b.value;X.length>0&&(I=X.map(L=>{const O=L*C,m=O+C;return`linear-gradient(to right, transparent ${O}px, ${x} ${O}px, ${x} ${m}px, transparent ${m}px)`}).join(", ")+", "+I)}return{height:e.rowHeight+"px",width:A+"px",minWidth:A+"px",background:oe,backgroundImage:I,backgroundSize:`${A}px 100%`,borderBottom:`1px solid ${se}`}});t.watch(()=>tt.highlightedId,C=>{s.value=e.row[p.value.id]===C});const d=()=>tt.triggerHighlight(e.row[p.value.id]),z=()=>tt.triggerHighlight(null),B=C=>{o.value;let A="#ffffff",oe="#f8f8f8";if(n.value){let x=n.value.parentElement;for(;x;){if(x.hasAttribute("data-gantt-theme")){A=getComputedStyle(x).getPropertyValue("--bg-content").trim()||"#ffffff",oe=getComputedStyle(x).getPropertyValue("--bg-secondary").trim()||"#f8f8f8";break}x=x.parentElement}}switch(k.value){case"季度":return A;case"月":return g(e.startGanttDate).startOf("month").add(C,"months"),A;case"日":{const se=S.daySubMode==="half"?Math.floor(C/2):C;let I=g(e.startGanttDate).add(se,"days");return I.isoWeekday()===7||I.isoWeekday()===1?oe:A}case"周":case"时":return A}},W=fe.setBarDate,R=C=>{let A=0;switch(k.value){case"季度":{const ce=g(e.startGanttDate).startOf("quarter"),ie=g(e.row[p.value.startdate]).startOf("quarter");let F=(ie.year()-ce.year())*4+(ie.quarter()-ce.quarter());A=f.value*F+f.value/2,e.row[p.value.takestime]="0季度",e.row[p.value.enddate]=e.row[p.value.startdate];break}case"月":{const ce=g(e.startGanttDate).startOf("month"),ie=g(e.row[p.value.startdate]).startOf("month");let F=(ie.year()-ce.year())*12+(ie.month()-ce.month());A=f.value*F+f.value/2,e.row[p.value.takestime]="0月",e.row[p.value.enddate]=e.row[p.value.startdate];break}case"日":{const ce=S.daySubMode==="half";let ie=g(e.row[p.value.startdate]).diff(g(e.startGanttDate),"days");if(ce){const N=g(e.row[p.value.startdate]).hour()<12?0:1;A=f.value*(ie*2+N)+f.value/2}else A=f.value*ie+f.value/2;e.row[p.value.takestime]="0"+Ae("durationUnit.days"),e.row[p.value.enddate]=e.row[p.value.startdate];break}case"周":{const ce=g(e.startGanttDate).startOf("isoWeek");let F=g(e.row[p.value.startdate]).startOf("isoWeek").diff(ce,"week");A=f.value*F+f.value/2,e.row[p.value.takestime]="0周",e.row[p.value.enddate]=e.row[p.value.startdate];break}case"时":{let ce=g(e.row[p.value.startdate]).diff(g(e.startGanttDate),"hours");A=f.value*ce+f.value/2,e.row[p.value.takestime]="0小时",e.row[p.value.enddate]=e.row[p.value.startdate];break}}l.value=A;let oe=$n(C);const x=getComputedStyle(C).getPropertyValue("--border")||"#cecece";C.setAttribute("data-x",A.toString()),C.setAttribute("stroke",x),C.setAttribute("stroke-width","2px"),C.style.transform=`translate(${A}px, 0px)`;let se="#f59e0b",I="#333333",X="#ffffff",le=C.parentElement;for(;le;){if(le.hasAttribute("data-gantt-theme")){const ce=getComputedStyle(le);se=ce.getPropertyValue("--primary").trim()||se,I=ce.getPropertyValue("--text-primary").trim()||I,X=ce.getPropertyValue("--bg-content").trim()||X;break}le=le.parentElement}(X.includes("#1")||X.includes("#2")||X.toLowerCase().includes("dark"))&&I==="#333333"&&(I="#ffffff"),oe.clear();const L=a.value,O=L/2,m=e.rowHeight/2,c=O,w=c,y=m-O,T=c+O,E=m,M=c,V=m+O,Z=c-O,J=`M ${w},${y} L ${T},${E} L ${M},${V} L ${Z},${m} Z`,pe=oe.path(J).fill(i.value||se).stroke({color:x,width:2}).attr("opacity",.9);pe.on("mouseover",()=>{pe.animate(200).attr({opacity:1,strokeWidth:3})}),pe.on("mouseleave",()=>{pe.animate(200).attr({opacity:.9,strokeWidth:2})});const ye=oe.text(e.row[p.value.task]||"Milestone").move(L+5,m-7).fill(I).attr({"font-size":"14px","font-family":"'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif","font-weight":"400","text-anchor":"start","dominant-baseline":"auto"});X.includes("#1")||X.includes("#2")||X.toLowerCase().includes("dark")?ye.attr({stroke:"#000000","stroke-width":"0.5px","paint-order":"stroke fill"}):ye.attr({stroke:"#ffffff","stroke-width":"0.5px","paint-order":"stroke fill"}),W({id:e.row[p.value.id],startDate:e.row[p.value.startdate],endDate:e.row[p.value.startdate]}),nt(C).draggable({inertia:!1,modifiers:[nt.modifiers.restrictRect({restriction:"parent",endOnly:!0})],autoScroll:!0,listeners:{start:ce=>{l.value=Number(ce.target.getAttribute("data-x"))},move:ce=>{let ie=((parseFloat(ce.target.getAttribute("data-x")||"0")||0)+ce.dx).toString();ce.target.style.transform=`translate(${ie}px, 0px)`,ce.target.setAttribute("data-x",ie)},end:ce=>{let ie=ce.target,F=parseFloat(ie.getAttribute("data-x")||"0")||0,N=Math.round((F-f.value/2)/f.value)*f.value+f.value/2;N<f.value/2&&(N=f.value/2),N>h.value*f.value&&(N=h.value*f.value-f.value/2);const P=p.value.parentId||"pid",j=e.row[P];if(j&&j!=="0"){const we=S.tasks.find(_e=>String(_e[p.value.id])===String(j));if(we){let _e=0;if(k.value==="季度"){const Fe=g(e.startGanttDate).startOf("quarter"),Pe=g(we[p.value.startdate]).startOf("quarter");_e=((Pe.year()-Fe.year())*4+(Pe.quarter()-Fe.quarter()))*f.value+f.value/2}else if(k.value==="月"){const Fe=g(e.startGanttDate).startOf("month"),Pe=g(we[p.value.startdate]).startOf("month");_e=((Pe.year()-Fe.year())*12+(Pe.month()-Fe.month()))*f.value+f.value/2}else if(k.value==="日"){const Pe=S.daySubMode==="half"?2:1;_e=g(we[p.value.startdate]).diff(g(e.startGanttDate),"days")*f.value*Pe+f.value/2}else if(k.value==="周"){const Fe=g(e.startGanttDate).startOf("isoWeek");_e=g(we[p.value.startdate]).startOf("isoWeek").diff(Fe,"week")*f.value+f.value/2}else k.value==="时"&&(_e=g(we[p.value.startdate]).diff(g(e.startGanttDate),"hours")*f.value+f.value/2);N<_e&&(N=_e)}}ie.style.transform=`translate(${N}px, 0px)`,ie.setAttribute("data-x",N.toString());const G=Math.round((N-l.value)/f.value);let ee=0,Ye=0,Ee=0,Ne=0;if(k.value==="季度")Ne=G;else if(k.value==="月")Ee=G;else if(k.value==="日")if(S.daySubMode==="half"){const _e=Math.round((N-f.value/2)/f.value),Fe=Math.floor(_e/2),he=_e%2===0?0:12,Re=g(e.startGanttDate).add(Fe,"days").hour(he).minute(0).second(0);e.row[p.value.startdate]=Re.format("YYYY-MM-DD HH:mm:ss"),e.row[p.value.enddate]=e.row[p.value.startdate]}else ee=G;else if(k.value==="周")ee=G*7;else if(k.value==="时"){const we=S.hourSubMode||"60",_e=parseInt(we);if(_e<60){const Fe=Math.round(N/f.value),Pe=60/_e,he=24*Pe,Re=Math.floor(Fe/he),Le=Fe%he,Ce=Math.floor(Le/Pe),Ie=Le%Pe*_e,te=g(e.startGanttDate).add(Re,"days").hour(Ce).minute(Ie).second(0);e.row[p.value.startdate]=te.format("YYYY-MM-DD HH:mm:ss"),e.row[p.value.enddate]=e.row[p.value.startdate]}else Ye=G}const $e=k.value==="日"&&S.daySubMode==="half";if(k.value==="时"&&(S.hourSubMode==="15"||S.hourSubMode),k.value==="季度")e.row[p.value.startdate]=g(e.row[p.value.startdate]).add(Ne,"quarters").format("YYYY-MM-DD HH:mm:ss"),e.row[p.value.enddate]=e.row[p.value.startdate];else if(k.value==="月")e.row[p.value.startdate]=g(e.row[p.value.startdate]).add(Ee,"months").format("YYYY-MM-DD HH:mm:ss"),e.row[p.value.enddate]=e.row[p.value.startdate];else if(k.value==="时"){const we=Math.round(Ye*60);e.row[p.value.startdate]=g(e.row[p.value.startdate]).add(we,"minutes").format("YYYY-MM-DD HH:mm:ss"),e.row[p.value.enddate]=e.row[p.value.startdate]}else $e||(e.row[p.value.startdate]=g(e.row[p.value.startdate]).add(ee,"days").format("YYYY-MM-DD HH:mm:ss"),e.row[p.value.enddate]=e.row[p.value.startdate]);W({id:e.row[p.value.id],startDate:e.row[p.value.startdate],endDate:e.row[p.value.startdate]})}}})};return t.watch(()=>[e.row[p.value.startdate]],()=>{n.value&&R(n.value)},{deep:!1}),t.onMounted(()=>{if(n.value&&R(n.value),v&&(i.value=v(e.row),n.value&&R(n.value)),n.value){let C=n.value.parentElement;for(;C&&!C.hasAttribute("data-gantt-theme");)C=C.parentElement;if(C){const A=new MutationObserver(()=>{o.value++});A.observe(C,{attributes:!0,attributeFilter:["data-gantt-theme","style"]}),t.onBeforeUnmount(()=>A.disconnect())}}}),t.onBeforeUnmount(()=>{if(n.value)try{nt(n.value).unset()}catch{}r.value=!1}),{milestone:n,showRow:r,hover:s,milestoneColor:i,timelineCellCount:h,scale:f,mode:k,mapFields:p,hoverActive:d,hoverInactive:z,WeekEndColor:B,milestoneRowStyle:$}}}),Fr=["data-task-id"],Ir=["height","width"];function Rr(e,n,a,r,s,i){return e.showRow?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["milestoneRow",{active:e.hover}]),style:t.normalizeStyle(e.milestoneRowStyle),onMouseover:n[0]||(n[0]=o=>e.hoverActive()),onMouseleave:n[1]||(n[1]=o=>e.hoverInactive()),"data-task-id":e.row[e.mapFields.id]},[e.showRow?(t.openBlock(),t.createElementBlock("svg",{key:"milestone",ref:"milestone",class:t.normalizeClass(["milestone",{active:e.hover}]),height:e.rowHeight+"px",width:e.rowHeight*.6+200+"px",style:{overflow:"visible"}},null,10,Ir)):t.createCommentVNode("",!0)],46,Fr)):t.createCommentVNode("",!0)}const zr=Oe(Yr,[["render",Rr],["__scopeId","data-v-5d31c7b1"]]),ra={VIRTUAL_SCROLL_BUFFER:5,VIRTUAL_SCROLL_THRESHOLD:50},Or=t.defineComponent({name:"BarRecursionRow",props:{rowHeight:{type:Number,default:0}},setup(e){const n=t.ref([]),a=t.ref(0),r=t.ref(null),s=t.ref(0),i=t.ref(0),o=t.ref(0),l=t.ref(0),h=t.inject(Mt.SetTaskTypeSymbol),f=t.computed(()=>S.tasks),k=t.computed(()=>S.timelineCellCount),p=t.computed(()=>S.scale),v=t.computed(()=>S.mode),H=t.computed(()=>S.startGanttDate?S.startGanttDate.toISOString():void 0),b=t.computed(()=>S.endGanttDate?S.endGanttDate.toISOString():void 0),$=t.computed(()=>S.mapFields),d=t.computed(()=>S.collapsedTasks),z=t.computed(()=>X.value.length>=ra.VIRTUAL_SCROLL_THRESHOLD),B=t.computed(()=>X.value.length*e.rowHeight),W=t.computed(()=>o.value*e.rowHeight),R=t.computed(()=>{if(!z.value)return[];const m=X.value,c=[];for(let w=o.value;w<=l.value&&w<m.length;w++)c.push({task:m[w],index:w});return c}),C=()=>{if(!r.value||!z.value)return;const m=r.value.closest(".content");if(!m)return;const c=m.scrollTop,w=m.clientHeight,y=ra.VIRTUAL_SCROLL_BUFFER;s.value=c,i.value=w;const T=Math.max(0,Math.floor(c/e.rowHeight)-y),E=Math.ceil(w/e.rowHeight),M=Math.min(X.value.length-1,T+E+y*2);o.value=T,l.value=M};let A=null;const oe=()=>{A||(A=requestAnimationFrame(()=>{C(),A=null}))},x=m=>{if(h)return h(m);if(m.type)return m.type;const c=m[$.value.startdate],w=m[$.value.enddate];return c&&w&&c===w?Yt.MILESTONE:Yt.TASK},se=m=>{const c=new Set,w=y=>{f.value.filter(E=>E[$.value.parentId]===y).forEach(E=>{const M=E[$.value.id];c.add(M),w(M)})};return w(m),c},I=t.computed(()=>new Set(n.value.map(m=>m[$.value.id]))),X=t.computed(()=>{const m=I.value,c=S.tasks.filter(y=>!m.has(y[$.value.id])),w=new Set;return d.value.forEach(y=>{se(y).forEach(E=>w.add(E))}),c.filter(y=>!w.has(y[$.value.id]))}),le=t.computed({get:()=>S.expandRow,set:m=>{fe.setExpandRow(m)}});t.watch(le,m=>{n.value=[],L(m.pid)}),t.watch(()=>X.value.length,()=>{C()});const L=m=>{let c=f.value.filter(w=>w[$.value.parentId]===m);if(c&&c.length>0)for(let w=0;w<c.length;w++)le.value.expand===!1&&n.value.push(c[w]),L(c[w][$.value.id])},O=fe.setExpandRow;return t.onMounted(()=>{if(r.value){const m=r.value.closest(".content");m&&(m.addEventListener("scroll",oe,{passive:!0}),C())}}),t.onUnmounted(()=>{if(r.value){const m=r.value.closest(".content");m&&m.removeEventListener("scroll",oe)}A&&cancelAnimationFrame(A)}),{hiddenTask:n,componentKey:a,containerRef:r,allTask:f,timelineCellCount:k,scale:p,mode:v,startGanttDate:H,endGanttDate:b,mapFields:$,filterTask:X,expandRow:le,setExpandRow:O,recursionRow:L,getTaskType:x,TaskType:Yt,useVirtualScroll:z,totalHeight:B,offsetY:W,visibleTasks:R,startIndex:o,endIndex:l}},components:{Bar:Hr,Milestone:zr},mounted(){this.$nextTick(()=>{})},activated(){this.componentKey++}}),Pr={ref:"containerRef",class:"bar-recursion-container"};function xr(e,n,a,r,s,i){const o=t.resolveComponent("Milestone"),l=t.resolveComponent("Bar");return t.openBlock(),t.createElementBlock("div",Pr,[e.useVirtualScroll?(t.openBlock(),t.createElementBlock("div",{key:0,class:"virtual-scroll-spacer",style:t.normalizeStyle({height:e.totalHeight+"px"})},[t.createElementVNode("div",{class:"virtual-scroll-content",style:t.normalizeStyle({transform:`translateY(${e.offsetY}px)`})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.visibleTasks,h=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:h.task[e.mapFields.id]},[e.getTaskType(h.task)===e.TaskType.MILESTONE?(t.openBlock(),t.createBlock(o,{key:0,startGanttDate:e.startGanttDate,endGanttDate:e.endGanttDate,row:h.task,rowHeight:e.rowHeight},null,8,["startGanttDate","endGanttDate","row","rowHeight"])):(t.openBlock(),t.createBlock(l,{key:1,startGanttDate:e.startGanttDate,endGanttDate:e.endGanttDate,row:h.task,rowHeight:e.rowHeight},null,8,["startGanttDate","endGanttDate","row","rowHeight"]))],64))),128))],4)],4)):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.filterTask,h=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:h[e.mapFields.id]},[e.getTaskType(h)===e.TaskType.MILESTONE?(t.openBlock(),t.createBlock(o,{key:0,startGanttDate:e.startGanttDate,endGanttDate:e.endGanttDate,row:h,rowHeight:e.rowHeight},null,8,["startGanttDate","endGanttDate","row","rowHeight"])):(t.openBlock(),t.createBlock(l,{key:1,startGanttDate:e.startGanttDate,endGanttDate:e.endGanttDate,row:h,rowHeight:e.rowHeight},null,8,["startGanttDate","endGanttDate","row","rowHeight"]))],64))),128))],512)}const Gr=Oe(Or,[["render",xr],["__scopeId","data-v-6a210a0e"]]),qr=t.defineComponent({name:"TaskLinks",props:{containerWidth:{type:Number,required:!0},containerHeight:{type:Number,required:!0},linkConfig:{type:Object,default:()=>({color:"#3498db",width:2,dashArray:void 0,showArrow:!0,arrowColor:void 0,arrowSize:8,showLabels:!1,labelColor:"#666",labelFontSize:12,cornerRadius:5,pathType:Ue.BEZIER,bezierCurvature:.4,rightAngleOffset:30,smoothCorners:!0,enableDashAnimation:!0,dashAnimationSpeed:.8,parentChildStyle:{color:"#95a5a6",width:1,dashArray:"3,3"}})}},setup(e){const n=t.ref([]),a=m=>{if(!S.tasks.find(pe=>pe[S.mapFields.id]===m))return null;const w=document.querySelector(`[data-task-id="${m}"]`);if(!w)return null;let y=w.querySelector(".bar"),T=!1;if(y||(y=w.querySelector(".milestone"),T=!0),!y)return null;const E=w.closest(".table .content");if(!E)return null;const M=parseFloat(y.getAttribute("data-x")||"0");let V;T?V=w.getBoundingClientRect().height*.6:V=y.width.baseVal.value;const Z=w.getBoundingClientRect(),Y=E.getBoundingClientRect(),J=Z.top-Y.top;if(T){const pe=V/2;return{x:M,y:J,width:V,height:Z.height,centerX:M+pe,centerY:J+Z.height/2,rightX:M+V,leftX:M,topY:J,bottomY:J+Z.height}}else return{x:M,y:J,width:V,height:Z.height,centerX:M+V/2,centerY:J+Z.height/2,rightX:M+V,leftX:M,topY:J,bottomY:J+Z.height}},r=(m,c)=>S.tasks.filter(y=>y[S.mapFields.parentId]===m&&y[S.mapFields.parentId]!=="0").findIndex(y=>y[S.mapFields.id]===c),s=()=>{const m=document.querySelector(".barRow");return m?m.offsetHeight:50},i=m=>{const c=s();return Math.floor(m/c)*c+c/2},o=(m,c)=>{const w=s();return(Math.floor(m/w)+1+c)*w+w/2},l=(m,c,w)=>{const y=s(),E=Math.floor(m/y)*y+y+w;return c>E+y?i(E+y/2):i(E)},h=m=>{const c=e.linkConfig.linkTypeColors;if(!c)return{[me.FINISH_TO_START]:"#3498db",[me.START_TO_START]:"#2ecc71",[me.FINISH_TO_FINISH]:"#e74c3c",[me.START_TO_FINISH]:"#f39c12",[me.PARENT_CHILD]:"#95a5a6"}[m]||e.linkConfig.color;switch(m){case me.FINISH_TO_START:return c.finishToStart||"#3498db";case me.START_TO_START:return c.startToStart||"#2ecc71";case me.FINISH_TO_FINISH:return c.finishToFinish||"#e74c3c";case me.START_TO_FINISH:return c.startToFinish||"#f39c12";default:return e.linkConfig.color}},f=m=>m===me.PARENT_CHILD?{color:e.linkConfig.parentChildStyle.color||"#95a5a6",width:e.linkConfig.parentChildStyle.width,dashArray:e.linkConfig.parentChildStyle.dashArray}:{color:h(m),width:e.linkConfig.width,dashArray:e.linkConfig.dashArray},k=(m,c,w,y="")=>{if(!m||!c)return"";const{pathType:T}=e.linkConfig;switch(w){case me.PARENT_CHILD:return p(m,c,T);case me.FINISH_TO_START:return $(m,c,T);case me.START_TO_START:return d(m,c,T);case me.FINISH_TO_FINISH:return z(m,c,T);case me.START_TO_FINISH:return B(m,c,T);default:return $(m,c,T)}},p=(m,c,w,y)=>{const T=m.id||m.taskId,E=c.id||c.taskId,M=r(T,E),V=m.leftX,Z=m.centerY,Y=e.linkConfig.arrowSize||8,J=c.leftX-Y,pe=c.centerY;return v(V,Z,J,pe,M,w)},v=(m,c,w,y,T,E)=>{const M=w-m,V=y-c;if(Math.abs(M)<30&&Math.abs(V)<15)return`M ${m} ${c} L ${w} ${y}`;switch(E){case Ue.STRAIGHT:return`M ${m} ${c} L ${w} ${y}`;case Ue.BEZIER:return H(m,c,w,y);case Ue.RIGHT_ANGLE:default:return b(m,c,w,y,T)}},H=(m,c,w,y,T)=>{const E=w-m,{bezierCurvature:M}=e.linkConfig;if(E>0){const V=Math.min(Math.abs(E)*M,60),Z=m+V,Y=w-V;return`M ${m} ${c} C ${Z} ${c} ${Y} ${y} ${w} ${y}`}else{const V=e.linkConfig.rightAngleOffset,Z=l(c,y,V),Y=V*M;return`M ${m} ${c}
|
|
18
|
+
C ${m+Y} ${c} ${m+Y} ${Z} ${m+V/2} ${Z}
|
|
19
|
+
C ${w-Y} ${Z} ${w-Y} ${y} ${w} ${y}`}},b=(m,c,w,y,T)=>{const E=w-m,{rightAngleOffset:M,smoothCorners:V,cornerRadius:Z}=e.linkConfig;if(o(c,T),E>0){const Y=m+M;if(V&&Z>0){const J=Math.min(Z,Math.abs(y-c)/2,Math.abs(w-Y)/2);return`M ${m} ${c}
|
|
20
|
+
L ${Y-J} ${c}
|
|
21
|
+
Q ${Y} ${c} ${Y} ${c+(y>c?J:-J)}
|
|
22
|
+
L ${Y} ${y-(y>c?J:-J)}
|
|
23
|
+
Q ${Y} ${y} ${Y+J} ${y}
|
|
24
|
+
L ${w} ${y}`}else return`M ${m} ${c}
|
|
25
|
+
L ${Y} ${c}
|
|
26
|
+
L ${Y} ${y}
|
|
27
|
+
L ${w} ${y}`}else{const Y=M,J=l(c,y,Y),pe=m+Y/2,ye=w-Y/2;if(V&&Z>0){const Te=Math.min(Z,Y/4);return`M ${m} ${c}
|
|
28
|
+
L ${pe-Te} ${c}
|
|
29
|
+
Q ${pe} ${c} ${pe} ${c+Te}
|
|
30
|
+
L ${pe} ${J-Te}
|
|
31
|
+
Q ${pe} ${J} ${pe+Te} ${J}
|
|
32
|
+
L ${ye-Te} ${J}
|
|
33
|
+
Q ${ye} ${J} ${ye} ${J+Te}
|
|
34
|
+
L ${ye} ${y-Te}
|
|
35
|
+
Q ${ye} ${y} ${ye+Te} ${y}
|
|
36
|
+
L ${w} ${y}`}else return`M ${m} ${c}
|
|
37
|
+
L ${pe} ${c}
|
|
38
|
+
L ${pe} ${J}
|
|
39
|
+
L ${ye} ${J}
|
|
40
|
+
L ${ye} ${y}
|
|
41
|
+
L ${w} ${y}`}},$=(m,c,w)=>{const y=e.linkConfig.arrowSize||8,T=m.rightX,E=m.centerY,M=c.leftX-y,V=c.centerY;return W(T,E,M,V,w,"horizontal")},d=(m,c,w)=>{const y=e.linkConfig.arrowSize||8,T=m.leftX,E=m.centerY,M=c.leftX-y,V=c.centerY;return W(T,E,M,V,w,"left-u")},z=(m,c,w)=>{const y=e.linkConfig.arrowSize||8,T=m.rightX,E=m.centerY,M=c.rightX+y,V=c.centerY;return W(T,E,M,V,w,"right-u")},B=(m,c,w)=>{const y=e.linkConfig.arrowSize||8,T=m.leftX,E=m.centerY,M=c.rightX+y,V=c.centerY;return W(T,E,M,V,w,"cross")},W=(m,c,w,y,T,E)=>{const{bezierCurvature:M,rightAngleOffset:V,smoothCorners:Z,cornerRadius:Y}=e.linkConfig;switch(T){case Ue.STRAIGHT:return`M ${m} ${c} L ${w} ${y}`;case Ue.BEZIER:return R(m,c,w,y,E,M);case Ue.RIGHT_ANGLE:default:return C(m,c,w,y,E,V,Z,Y)}},R=(m,c,w,y,T,E)=>{const M=w-m,V=y-c;switch(T){case"horizontal":if(M>20&&Math.abs(V)<10)return`M ${m} ${c} L ${w} ${y}`;if(M<20){const G=l(c,y,30),ee=30*E;return`M ${m} ${c}
|
|
42
|
+
C ${m+ee} ${c} ${m+ee} ${G} ${m+30/2} ${G}
|
|
43
|
+
C ${w-ee} ${G} ${w-ee} ${y} ${w} ${y}`}const Z=Math.min(Math.abs(M)*E,60),Y=m+Z,J=w-Z;return`M ${m} ${c} C ${Y} ${c} ${J} ${y} ${w} ${y}`;case"left-u":const pe=25,ye=Math.min(m,w)-pe,Te=pe*E;if(Math.abs(V)>s()){const j=i((c+y)/2);return`M ${m} ${c}
|
|
44
|
+
C ${m-Te} ${c} ${ye} ${c+Te} ${ye} ${j}
|
|
45
|
+
C ${ye} ${y-Te} ${w-Te} ${y} ${w} ${y}`}return`M ${m} ${c} C ${ye} ${c} ${ye} ${y} ${w} ${y}`;case"right-u":const ce=25,ie=Math.max(m,w)+ce,F=ce*E;if(Math.abs(V)>s()){const j=i((c+y)/2);return`M ${m} ${c}
|
|
46
|
+
C ${m+F} ${c} ${ie} ${c+F} ${ie} ${j}
|
|
47
|
+
C ${ie} ${y-F} ${w+F} ${y} ${w} ${y}`}return`M ${m} ${c} C ${ie} ${c} ${ie} ${y} ${w} ${y}`;case"cross":if(M>20&&Math.abs(V)<10)return`M ${m} ${c} L ${w} ${y}`;const He=Math.min(Math.abs(M)*E,60),N=m-He,P=w+He;return`M ${m} ${c} C ${N} ${c} ${P} ${y} ${w} ${y}`;default:return`M ${m} ${c} L ${w} ${y}`}},C=(m,c,w,y,T,E,M,V)=>{const Z=w-m,Y=y-c;switch(T){case"horizontal":if(Z>20&&Math.abs(Y)<10)return`M ${m} ${c} L ${w} ${y}`;if(Z<20){const F=E,He=l(c,y,F),N=m+F/2,P=w-F/2;if(M&&V>0){const j=Math.min(V,F/4);return`M ${m} ${c}
|
|
48
|
+
L ${N-j} ${c}
|
|
49
|
+
Q ${N} ${c} ${N} ${c+j}
|
|
50
|
+
L ${N} ${He-j}
|
|
51
|
+
Q ${N} ${He} ${N+j} ${He}
|
|
52
|
+
L ${P-j} ${He}
|
|
53
|
+
Q ${P} ${He} ${P} ${He+j}
|
|
54
|
+
L ${P} ${y-j}
|
|
55
|
+
Q ${P} ${y} ${P+j} ${y}
|
|
56
|
+
L ${w} ${y}`}return`M ${m} ${c}
|
|
57
|
+
L ${N} ${c}
|
|
58
|
+
L ${N} ${He}
|
|
59
|
+
L ${P} ${He}
|
|
60
|
+
L ${P} ${y}
|
|
61
|
+
L ${w} ${y}`}const J=m+Math.abs(Z)/2;if(M&&V>0){const F=Math.min(V,Math.abs(Z)/4,Math.abs(Y)/2);return Y>0?`M ${m} ${c}
|
|
62
|
+
L ${J-F} ${c}
|
|
63
|
+
Q ${J} ${c} ${J} ${c+F}
|
|
64
|
+
L ${J} ${y-F}
|
|
65
|
+
Q ${J} ${y} ${J+F} ${y}
|
|
66
|
+
L ${w} ${y}`:`M ${m} ${c}
|
|
67
|
+
L ${J-F} ${c}
|
|
68
|
+
Q ${J} ${c} ${J} ${c-F}
|
|
69
|
+
L ${J} ${y+F}
|
|
70
|
+
Q ${J} ${y} ${J+F} ${y}
|
|
71
|
+
L ${w} ${y}`}return`M ${m} ${c} L ${J} ${c} L ${J} ${y} L ${w} ${y}`;case"left-u":const pe=E,ye=Math.min(m,w)-pe;if(M&&V>0){const F=Math.min(V,pe/2,Math.abs(Y)/4);return`M ${m} ${c}
|
|
72
|
+
L ${ye+F} ${c}
|
|
73
|
+
Q ${ye} ${c} ${ye} ${c+(Y>0?F:-F)}
|
|
74
|
+
L ${ye} ${y-(Y>0?F:-F)}
|
|
75
|
+
Q ${ye} ${y} ${ye+F} ${y}
|
|
76
|
+
L ${w} ${y}`}return`M ${m} ${c} L ${ye} ${c} L ${ye} ${y} L ${w} ${y}`;case"right-u":const Te=E,ce=Math.max(m,w)+Te;if(M&&V>0){const F=Math.min(V,Te/2,Math.abs(Y)/4);return`M ${m} ${c}
|
|
77
|
+
L ${ce-F} ${c}
|
|
78
|
+
Q ${ce} ${c} ${ce} ${c+(Y>0?F:-F)}
|
|
79
|
+
L ${ce} ${y-(Y>0?F:-F)}
|
|
80
|
+
Q ${ce} ${y} ${ce-F} ${y}
|
|
81
|
+
L ${w} ${y}`}return`M ${m} ${c} L ${ce} ${c} L ${ce} ${y} L ${w} ${y}`;case"cross":if(Z>20&&Math.abs(Y)<10)return`M ${m} ${c} L ${w} ${y}`;const ie=m+Z/2;if(M&&V>0){const F=Math.min(V,Math.abs(Z)/4,Math.abs(Y)/2);return Y>0?`M ${m} ${c}
|
|
82
|
+
L ${ie-F} ${c}
|
|
83
|
+
Q ${ie} ${c} ${ie} ${c+F}
|
|
84
|
+
L ${ie} ${y-F}
|
|
85
|
+
Q ${ie} ${y} ${ie+F} ${y}
|
|
86
|
+
L ${w} ${y}`:`M ${m} ${c}
|
|
87
|
+
L ${ie-F} ${c}
|
|
88
|
+
Q ${ie} ${c} ${ie} ${c-F}
|
|
89
|
+
L ${ie} ${y+F}
|
|
90
|
+
Q ${ie} ${y} ${ie+F} ${y}
|
|
91
|
+
L ${w} ${y}`}return`M ${m} ${c} L ${ie} ${c} L ${ie} ${y} L ${w} ${y}`;default:return`M ${m} ${c} L ${w} ${y}`}},A=(m,c,w=me.FINISH_TO_START)=>{if(!m)return console.warn("子任务位置无效"),"";try{const y=m.leftX,T=m.centerY,E=y-c,M=T-c/2,V=T+c/2;return`${y},${T} ${E},${M} ${E},${V}`}catch(y){return console.error("箭头生成失败:",y),""}},oe=(m,c,w,y)=>{if(!m||!c)return"";try{let T,E,M="right";switch(w){case me.FINISH_TO_START:T=c.leftX,E=c.centerY,M="right";break;case me.START_TO_START:T=c.leftX,E=c.centerY,M="right";break;case me.FINISH_TO_FINISH:T=c.rightX,E=c.centerY,M="left";break;case me.START_TO_FINISH:T=c.rightX,E=c.centerY,M="left";break;default:T=c.leftX,E=c.centerY,M="right"}let V,Z,Y,J;return M==="right"?(V=T-y,Z=E-y/2,Y=T-y,J=E+y/2):(V=T+y,Z=E-y/2,Y=T+y,J=E+y/2),`${T},${E} ${V},${Z} ${Y},${J}`}catch(T){return console.error("依赖箭头生成失败:",T),""}},x=m=>{const c=new Set,w=y=>{S.tasks.filter(E=>E[S.mapFields.parentId]===y).forEach(E=>{const M=E[S.mapFields.id];c.add(M),w(M)})};return w(m),c},se=m=>{for(const c of S.collapsedTasks)if(x(c).has(m))return!0;return!1},I=()=>{const m=[],c=e.linkConfig.linkTypeVisibility||{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0};c.parentChild&&S.tasks.forEach(T=>{const E=T[S.mapFields.parentId],M=T[S.mapFields.id];if(E&&E!=="0"){if(se(M))return;const V=a(E),Z=a(M);if(V&&Z){const Y=`parent-child-${E}-${M}`,J={...V,id:E,taskId:E},pe={...Z,id:M,taskId:M},ye=k(J,pe,me.PARENT_CHILD,Y),Te=e.linkConfig.showArrow?A(Z,e.linkConfig.arrowSize,me.PARENT_CHILD):"";m.push({id:Y,sourceId:E,targetId:M,type:me.PARENT_CHILD,path:ye,arrowPoints:Te,labelX:Z.centerX,labelY:Z.centerY-10})}}});const w=hn.getDependencies(),y=T=>{if(typeof T=="number")switch(T){case 0:return c.finishToStart;case 1:return c.startToStart;case 2:return c.finishToFinish;case 3:return c.startToFinish;default:return!0}switch(T){case me.FINISH_TO_START:return c.finishToStart;case me.START_TO_START:return c.startToStart;case me.FINISH_TO_FINISH:return c.finishToFinish;case me.START_TO_FINISH:return c.startToFinish;case me.PARENT_CHILD:return c.parentChild;default:return!0}};w.forEach(T=>{if(!y(T.type))return;const E=a(T.sourceTaskId),M=a(T.targetTaskId);if(E&&M){const V=`dependency-${T.id}`,Z={...E,id:T.sourceTaskId,taskId:T.sourceTaskId},Y={...M,id:T.targetTaskId,taskId:T.targetTaskId},J=k(Z,Y,T.type,V),pe=e.linkConfig.showArrow?oe(Z,Y,T.type,e.linkConfig.arrowSize):"",ye={[me.FINISH_TO_START]:"FS",[me.START_TO_START]:"SS",[me.FINISH_TO_FINISH]:"FF",[me.START_TO_FINISH]:"SF",[me.PARENT_CHILD]:""};m.push({id:V,sourceId:T.sourceTaskId,targetId:T.targetTaskId,type:T.type,path:J,arrowPoints:pe,label:ye[T.type]||"",labelX:(E.centerX+M.centerX)/2,labelY:(E.centerY+M.centerY)/2-10})}}),n.value=m};t.watch(()=>S.tasks,()=>{setTimeout(I,50)},{deep:!0}),t.watch(()=>S.scale,()=>{setTimeout(I,50)}),t.watch(()=>S.mode,()=>{setTimeout(I,200)}),t.watch(()=>S.timelineCellCount,()=>{setTimeout(I,100)}),t.watch(()=>[S.startGanttDate,S.endGanttDate],()=>{setTimeout(I,100)}),t.watch(()=>S.barDate,()=>{requestAnimationFrame(I)},{deep:!0}),t.watch(()=>e.linkConfig.linkTypeVisibility,()=>{setTimeout(I,50)},{deep:!0}),t.watch(()=>S.collapsedTasks,()=>{setTimeout(I,50)},{deep:!0});let X=null,le=null;t.onMounted(()=>{setTimeout(I,100);const m=document.querySelector(".gantt");m&&(X=new ResizeObserver(I),X.observe(m),le=new MutationObserver(c=>{let w=!1;c.forEach(y=>{var E,M;const T=y.target;if(y.type==="attributes"){const V=y.attributeName;(V==="data-x"||V==="width"||V==="style"||V==="transform")&&((E=T.classList)!=null&&E.contains("bar")||(M=T.classList)!=null&&M.contains("barRow")||T.tagName==="svg")&&(w=!0)}}),w&&requestAnimationFrame(I)}),le.observe(m,{attributes:!0,subtree:!0,attributeFilter:["style","data-x","transform","width"]}))}),t.onUnmounted(()=>{X&&X.disconnect(),le&&le.disconnect()});const L=m=>{const c=f(m);return!!(c.dashArray&&c.dashArray.length>0)};return{links:n,updateLinks:I,getLinkStyle:f,isDashedLine:L,getDashAnimationStyle:m=>{if(!L(m.type)||!e.linkConfig.enableDashAnimation)return{};const c=f(m.type),w=e.linkConfig.dashAnimationSpeed||.8,y=m.type===me.PARENT_CHILD?w*.6:w,M=(c.dashArray||"5,5").split(",").map(Number).reduce((V,Z)=>V+Z,0);return{"--animation-duration":`${y}s`,"--dash-length":`${M}px`}}}}}),Ur=["width","height"],Wr=["d","stroke","stroke-width","stroke-dasharray"],Zr=["points","fill","stroke"],Jr=["x","y","fill","font-size"];function jr(e,n,a,r,s,i){return t.openBlock(),t.createElementBlock("svg",{class:"task-links-layer",width:e.containerWidth,height:e.containerHeight,style:{position:"absolute",top:"0px",left:"0px",pointerEvents:"none",zIndex:50,overflow:"visible"}},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.links,o=>(t.openBlock(),t.createElementBlock("g",{key:o.id},[t.createElementVNode("path",{d:o.path,stroke:e.getLinkStyle(o.type).color,"stroke-width":e.getLinkStyle(o.type).width,"stroke-dasharray":e.getLinkStyle(o.type).dashArray,fill:"none",class:t.normalizeClass(["task-link",o.type,{"dash-animated":e.isDashedLine(o.type)&&e.linkConfig.enableDashAnimation}]),style:t.normalizeStyle(e.getDashAnimationStyle(o))},null,14,Wr),e.linkConfig.showArrow&&o.arrowPoints&&o.arrowPoints.length>0?(t.openBlock(),t.createElementBlock("polygon",{key:0,points:o.arrowPoints,fill:e.getLinkStyle(o.type).color,stroke:e.getLinkStyle(o.type).color,"stroke-width":.5,class:"task-link-arrow"},null,8,Zr)):t.createCommentVNode("",!0),o.label&&e.linkConfig.showLabels?(t.openBlock(),t.createElementBlock("text",{key:1,x:o.labelX,y:o.labelY,fill:e.linkConfig.labelColor,"font-size":e.linkConfig.labelFontSize,"text-anchor":"middle",class:"task-link-label"},t.toDisplayString(o.label),9,Jr)):t.createCommentVNode("",!0)]))),128))],8,Ur)}const Kr=Oe(qr,[["render",jr],["__scopeId","data-v-dc9db723"]]),Qr=t.defineComponent({props:{rowHeight:{type:Number,required:!0},headers:{type:Array,default:()=>[]}},components:{BarRecursionRow:Gr,TaskLinks:Kr},setup(e){const n=t.ref(null),{scrollTop:a,scrollFlag:r,setScrollTop:s,setScrollFlag:i}=ta(),{config:o}=Ft(),l=t.computed(()=>S.tasks),h=t.computed(()=>S.timelineCellCount),f=t.computed(()=>S.scale),k=t.computed(()=>S.mode),p=t.computed(()=>S.startGanttDate),v=t.computed(()=>S.endGanttDate),H=t.computed(()=>S.mapFields),b=t.computed(()=>h.value*f.value),$=t.computed(()=>l.value.length*e.rowHeight);t.watch(a,x=>{r.value&&n.value&&(n.value.scrollTop=x)}),t.onMounted(()=>{n.value&&(n.value.scrollTop=a.value)});const d=()=>l.value.filter(x=>x[H.value.parentId]==="0");let z=null;const B=()=>{z&&cancelAnimationFrame(z),z=requestAnimationFrame(()=>{n.value&&(i(!1),s(n.value.scrollTop)),z=null})},W=()=>{},R=t.ref(!1),C=t.ref(0);return{barContent:n,scrollFlag:r,tasks:l,timelineCellCount:h,scale:f,mode:k,startGanttDate:p,endGanttDate:v,mapFields:H,getRootNode:d,scroll:B,mouseover:W,setScrollFlag:i,containerWidth:b,containerHeight:$,linkConfig:o,showGuideLine:R,guideLineX:C,handleMouseMove:x=>{if(!n.value)return;const se=n.value.getBoundingClientRect(),I=x.clientX-se.left+n.value.scrollLeft,X=f.value,L=Math.floor(I/X)*X+X/2;C.value=L,R.value=!0},handleMouseLeave:()=>{R.value=!1}}}});function Xr(e,n,a,r,s,i){const o=t.resolveComponent("BarRecursionRow"),l=t.resolveComponent("TaskLinks");return e.tasks?(t.openBlock(),t.createElementBlock("div",{key:0,ref:"barContent",onScroll:n[0]||(n[0]=h=>e.scroll()),onMousemove:n[1]||(n[1]=(...h)=>e.handleMouseMove&&e.handleMouseMove(...h)),onMouseleave:n[2]||(n[2]=(...h)=>e.handleMouseLeave&&e.handleMouseLeave(...h)),class:"content"},[t.createElementVNode("div",{class:"content-inner",style:t.normalizeStyle({minHeight:e.containerHeight+"px",position:"relative"})},[e.showGuideLine?(t.openBlock(),t.createElementBlock("div",{key:0,class:"column-guide-line",style:t.normalizeStyle({left:e.guideLineX+"px",height:e.containerHeight+"px"})},null,4)):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(o,{key:`${e.mode}-${e.scale}-${e.timelineCellCount}`,rowHeight:e.rowHeight,tasks:e.tasks},null,8,["rowHeight","tasks"])),t.createVNode(l,{containerWidth:e.containerWidth,containerHeight:e.containerHeight,linkConfig:e.linkConfig},null,8,["containerWidth","containerHeight","linkConfig"])],4)],544)):t.createCommentVNode("",!0)}const es=Oe(Qr,[["render",Xr],["__scopeId","data-v-51968539"]]),ts=t.defineComponent({props:{headersHeight:{type:Number,default:50},rowHeight:{type:Number,default:50}},components:{TimelineHeader:$r,TableContent:es},setup(e){const n=t.ref(null),a=t.computed(()=>S.dayHeaders),r=t.computed(()=>S.weekHeaders),s=t.computed(()=>S.monthHeaders),i=t.computed(()=>S.hourHeaders),o=t.computed(()=>S.startGanttDate),l=t.computed(()=>S.mode),h=t.computed(()=>S.scale);S.timelineCellCount*h.value+100,S.tasks.length*e.rowHeight+100;const f=()=>{if(n.value)switch(l.value){case"季度":const k=g(o.value).startOf("month"),p=g().startOf("month"),v=(p.year()-k.year())*12+(p.month()-k.month());n.value.scrollLeft=v*Number(h.value);break;case"月":const H=g(o.value).startOf("month"),b=g().startOf("month"),$=(b.year()-H.year())*12+(b.month()-H.month());n.value.scrollLeft=$*Number(h.value);break;case"日":n.value.scrollLeft=Number(g().diff(g(o.value),"day"))*Number(h.value);break;case"周":const d=g().startOf("isoWeek"),z=g(o.value).startOf("isoWeek");n.value.scrollLeft=Number(d.diff(z,"week"))*Number(h.value);break;case"时":n.value.scrollLeft=Number(g().diff(g(o.value),"hour"))*Number(h.value);break}};return t.watch(()=>tt.shouldScrollToToday,k=>{k&&(f(),tt.shouldScrollToToday=!1)}),t.onMounted(()=>{}),{tableBar:n,dayHeaders:a,weekHeaders:r,monthHeaders:s,hourHeaders:i,startGanttDate:o,mode:l,scale:h,scrollToToday:f}}}),ns={ref:"tableBar",class:"table"};function as(e,n,a,r,s,i){const o=t.resolveComponent("TimelineHeader"),l=t.resolveComponent("TableContent");return t.openBlock(),t.createElementBlock("div",ns,[t.createElementVNode("div",{class:"header",style:t.normalizeStyle({height:`${e.headersHeight}px`,width:"fit-content"})},[t.createVNode(o,{weekHeaders:e.weekHeaders,hourHeaders:e.hourHeaders,dayHeaders:e.dayHeaders,monthHeaders:e.monthHeaders},null,8,["weekHeaders","hourHeaders","dayHeaders","monthHeaders"])],4),t.createElementVNode("div",{class:"content",style:t.normalizeStyle({height:`calc(100% - ${e.headersHeight}px)`,width:"fit-content",position:"relative"})},[t.createVNode(l,{rowHeight:e.rowHeight},null,8,["rowHeight"])],4)],512)}const os=Oe(ts,[["render",as],["__scopeId","data-v-6698c76f"]]),rs=t.defineComponent({name:"SliderInput",props:{modelValue:{type:Number,required:!0},min:{type:Number,required:!0},max:{type:Number,required:!0},step:{type:Number,default:1},labelStep:{type:Number,default:void 0},showLabels:{type:Boolean,default:!0}},emits:["update:modelValue","change"],setup(e,{emit:n}){const a=s=>{const i=parseFloat(s.target.value);n("update:modelValue",i)},r=t.computed(()=>{const s=[],i=e.labelStep||e.step;for(let o=e.min;o<=e.max;o=Math.round((o+e.step)*100)/100){const l=Math.abs(o-e.min)<.001||Math.abs(o-e.max)<.001||Math.abs((o-e.min)%i)<.001;s.push({value:o,isMajor:l,showLabel:e.showLabels&&l})}return s});return{handleInput:a,ticks:r}}}),ss=["value","min","max","step"],is={class:"slider-ticks"},ls={key:0,class:"tick-label"};function ds(e,n,a,r,s,i){return t.openBlock(),t.createElementBlock("div",{class:"slider-wrapper",onMousedown:n[2]||(n[2]=t.withModifiers(()=>{},["stop"])),onPointerdown:n[3]||(n[3]=t.withModifiers(()=>{},["stop"])),onTouchstart:n[4]||(n[4]=t.withModifiers(()=>{},["stop"])),onClick:n[5]||(n[5]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("input",{type:"range",value:e.modelValue,onInput:n[0]||(n[0]=(...o)=>e.handleInput&&e.handleInput(...o)),onChange:n[1]||(n[1]=o=>e.$emit("change")),min:e.min,max:e.max,step:e.step,class:"range-input"},null,40,ss),t.createElementVNode("div",is,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.ticks,o=>(t.openBlock(),t.createElementBlock("span",{key:o.value,class:t.normalizeClass(["tick",{major:o.isMajor}])},[n[6]||(n[6]=t.createElementVNode("span",{class:"tick-mark"},null,-1)),o.showLabel?(t.openBlock(),t.createElementBlock("span",ls,t.toDisplayString(o.value),1)):t.createCommentVNode("",!0)],2))),128))])],32)}const cs=Oe(rs,[["render",ds],["__scopeId","data-v-3ba80497"]]),us=t.defineComponent({name:"ConfigSection",props:{title:{type:String,required:!0},icon:{type:String,default:""}}}),fs={class:"config-section"},ms={class:"section-title"},hs={key:0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},gs={key:1,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},ps={key:2,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"};function ys(e,n,a,r,s,i){return t.openBlock(),t.createElementBlock("div",fs,[t.createElementVNode("h4",ms,[t.renderSlot(e.$slots,"icon",{},()=>[e.icon==="language"?(t.openBlock(),t.createElementBlock("svg",hs,n[0]||(n[0]=[t.createElementVNode("path",{d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"},null,-1)]))):e.icon==="theme"?(t.openBlock(),t.createElementBlock("svg",gs,n[1]||(n[1]=[t.createElementVNode("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"},null,-1)]))):e.icon==="link"?(t.openBlock(),t.createElementBlock("svg",ps,n[2]||(n[2]=[t.createElementVNode("path",{d:"M6 9l6 6 6-6"},null,-1),t.createElementVNode("circle",{cx:"4",cy:"9",r:"2"},null,-1),t.createElementVNode("circle",{cx:"20",cy:"9",r:"2"},null,-1),t.createElementVNode("path",{d:"M10 9h4"},null,-1)]))):t.createCommentVNode("",!0)],!0),t.createTextVNode(" "+t.toDisplayString(e.title),1)]),t.renderSlot(e.$slots,"default",{},void 0,!0)])}const ks=Oe(us,[["render",ys],["__scopeId","data-v-b5157353"]]),bs=t.defineComponent({name:"PathTypeSelector",props:{modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(){const{t:e}=et();return{pathTypes:t.computed(()=>[{value:Ue.STRAIGHT,name:e("configPanel.linkConfig.straight"),preview:"M 10 20 L 50 20"},{value:Ue.BEZIER,name:e("configPanel.linkConfig.bezier"),preview:"M 10 25 Q 30 5 50 25"},{value:Ue.RIGHT_ANGLE,name:e("configPanel.linkConfig.rightAngle"),preview:"M 10 15 L 25 15 L 25 25 L 50 25"}])}}}),ws={class:"path-type-grid"},Cs=["onClick"],Ss={width:"60",height:"35",viewBox:"0 0 60 40"},vs={key:0,cx:"10",cy:"20",r:"2.5",fill:"currentColor"},Ds={key:1,cx:"10",cy:"25",r:"2.5",fill:"currentColor"},Ts={key:2,cx:"10",cy:"15",r:"2.5",fill:"currentColor"},Ms=["d"],$s={key:3,d:"M 50 20 L 46 17 M 50 20 L 46 23",stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},Es={key:4,d:"M 50 25 L 46 22 M 50 25 L 46 28",stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},Vs={key:5,d:"M 50 25 L 46 22 M 50 25 L 46 28",stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},Ns={class:"path-name"};function _s(e,n,a,r,s,i){return t.openBlock(),t.createElementBlock("div",ws,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.pathTypes,o=>(t.openBlock(),t.createElementBlock("div",{key:o.value,class:t.normalizeClass(["path-type-card",{active:e.modelValue===o.value}]),onClick:l=>e.$emit("update:modelValue",o.value)},[(t.openBlock(),t.createElementBlock("svg",Ss,[o.value==="straight"?(t.openBlock(),t.createElementBlock("circle",vs)):t.createCommentVNode("",!0),o.value==="bezier"?(t.openBlock(),t.createElementBlock("circle",Ds)):t.createCommentVNode("",!0),o.value==="right-angle"?(t.openBlock(),t.createElementBlock("circle",Ts)):t.createCommentVNode("",!0),t.createElementVNode("path",{d:o.preview,stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},null,8,Ms),o.value==="straight"?(t.openBlock(),t.createElementBlock("path",$s)):t.createCommentVNode("",!0),o.value==="bezier"?(t.openBlock(),t.createElementBlock("path",Es)):t.createCommentVNode("",!0),o.value==="right-angle"?(t.openBlock(),t.createElementBlock("path",Vs)):t.createCommentVNode("",!0)])),t.createElementVNode("span",Ns,t.toDisplayString(o.name),1)],10,Cs))),128))])}const As=Oe(bs,[["render",_s],["__scopeId","data-v-34d8d0fd"]]),Ls=t.defineComponent({name:"LinkTypeColorConfig",props:{colors:{type:Object,required:!0}},emits:["update:colors","change"],setup(e,{emit:n}){const{t:a}=et();return{t:a,updateColor:(s,i)=>{const o=i.target,l={...e.colors,[s]:o.value};n("update:colors",l),n("change")}}}}),Bs={class:"link-type-colors"},Hs={class:"color-item"},Ys={class:"color-preview"},Fs={width:"20",height:"10",viewBox:"0 0 20 10"},Is=["stroke"],Rs=["fill"],zs={class:"color-label"},Os={class:"color-desc"},Ps=["value"],xs={class:"color-item"},Gs={class:"color-preview"},qs={width:"20",height:"10",viewBox:"0 0 20 10"},Us=["stroke"],Ws=["fill"],Zs={class:"color-label"},Js={class:"color-desc"},js=["value"],Ks={class:"color-item"},Qs={class:"color-preview"},Xs={width:"20",height:"10",viewBox:"0 0 20 10"},ei=["stroke"],ti=["fill"],ni={class:"color-label"},ai={class:"color-desc"},oi=["value"],ri={class:"color-item"},si={class:"color-preview"},ii={width:"20",height:"10",viewBox:"0 0 20 10"},li=["stroke"],di=["fill"],ci={class:"color-label"},ui={class:"color-desc"},fi=["value"];function mi(e,n,a,r,s,i){return t.openBlock(),t.createElementBlock("div",Bs,[t.createElementVNode("div",Hs,[t.createElementVNode("div",Ys,[(t.openBlock(),t.createElementBlock("svg",Fs,[t.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:e.colors.finishToStart,"stroke-width":"2"},null,8,Is),t.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:e.colors.finishToStart},null,8,Rs)]))]),t.createElementVNode("span",zs,t.toDisplayString(e.t("link.fs")),1),t.createElementVNode("span",Os,t.toDisplayString(e.t("link.finishToStart")),1),t.createElementVNode("input",{type:"color",value:e.colors.finishToStart,onInput:n[0]||(n[0]=o=>e.updateColor("finishToStart",o)),class:"color-input-small"},null,40,Ps)]),t.createElementVNode("div",xs,[t.createElementVNode("div",Gs,[(t.openBlock(),t.createElementBlock("svg",qs,[t.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:e.colors.startToStart,"stroke-width":"2"},null,8,Us),t.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:e.colors.startToStart},null,8,Ws)]))]),t.createElementVNode("span",Zs,t.toDisplayString(e.t("link.ss")),1),t.createElementVNode("span",Js,t.toDisplayString(e.t("link.startToStart")),1),t.createElementVNode("input",{type:"color",value:e.colors.startToStart,onInput:n[1]||(n[1]=o=>e.updateColor("startToStart",o)),class:"color-input-small"},null,40,js)]),t.createElementVNode("div",Ks,[t.createElementVNode("div",Qs,[(t.openBlock(),t.createElementBlock("svg",Xs,[t.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:e.colors.finishToFinish,"stroke-width":"2"},null,8,ei),t.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:e.colors.finishToFinish},null,8,ti)]))]),t.createElementVNode("span",ni,t.toDisplayString(e.t("link.ff")),1),t.createElementVNode("span",ai,t.toDisplayString(e.t("link.finishToFinish")),1),t.createElementVNode("input",{type:"color",value:e.colors.finishToFinish,onInput:n[2]||(n[2]=o=>e.updateColor("finishToFinish",o)),class:"color-input-small"},null,40,oi)]),t.createElementVNode("div",ri,[t.createElementVNode("div",si,[(t.openBlock(),t.createElementBlock("svg",ii,[t.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:e.colors.startToFinish,"stroke-width":"2"},null,8,li),t.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:e.colors.startToFinish},null,8,di)]))]),t.createElementVNode("span",ci,t.toDisplayString(e.t("link.sf")),1),t.createElementVNode("span",ui,t.toDisplayString(e.t("link.startToFinish")),1),t.createElementVNode("input",{type:"color",value:e.colors.startToFinish,onInput:n[3]||(n[3]=o=>e.updateColor("startToFinish",o)),class:"color-input-small"},null,40,fi)])])}const hi=Oe(Ls,[["render",mi],["__scopeId","data-v-53d6a965"]]),gi=t.defineComponent({name:"ThemeSelector",props:{modelValue:{type:String,required:!0},themes:{type:Array,required:!0}},emits:["update:modelValue"],setup(){const{t:e}=et();return{t:e}}}),pi={class:"theme-grid"},yi=["onClick"],ki={class:"theme-info"},bi={class:"theme-name"},wi={class:"theme-desc"},Ci={key:0,class:"theme-check"};function Si(e,n,a,r,s,i){return t.openBlock(),t.createElementBlock("div",pi,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.themes,o=>(t.openBlock(),t.createElementBlock("div",{key:o.id,class:t.normalizeClass(["theme-card",{active:e.modelValue===o.id}]),onClick:l=>e.$emit("update:modelValue",o.id)},[t.createElementVNode("div",{class:"theme-preview",style:t.normalizeStyle({background:o.preview})},null,4),t.createElementVNode("div",ki,[t.createElementVNode("div",bi,t.toDisplayString(e.t(o.nameKey)),1),t.createElementVNode("div",wi,t.toDisplayString(e.t(o.descKey)),1)]),e.modelValue===o.id?(t.openBlock(),t.createElementBlock("div",Ci,n[0]||(n[0]=[t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[t.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})],-1)]))):t.createCommentVNode("",!0)],10,yi))),128))])}const vi=Oe(gi,[["render",Si],["__scopeId","data-v-a2723aed"]]),Di=t.defineComponent({name:"LanguageSelector",props:{modelValue:{type:String,required:!0},locales:{type:Array,required:!0}},emits:["update:modelValue"]}),Ti={class:"language-selector-inline"},Mi=["onClick"],$i={class:"lang-label"},Ei={key:0,class:"lang-check"};function Vi(e,n,a,r,s,i){return t.openBlock(),t.createElementBlock("div",Ti,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.locales,o=>(t.openBlock(),t.createElementBlock("div",{key:o.value,class:t.normalizeClass(["language-option",{active:e.modelValue===o.value}]),onClick:l=>e.$emit("update:modelValue",o.value)},[t.createElementVNode("span",$i,t.toDisplayString(o.label),1),e.modelValue===o.value?(t.openBlock(),t.createElementBlock("div",Ei,n[0]||(n[0]=[t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[t.createElementVNode("path",{d:"M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"})],-1)]))):t.createCommentVNode("",!0)],10,Mi))),128))])}const sa=Oe(Di,[["render",Vi],["__scopeId","data-v-359f5b41"]]),Ni=t.defineComponent({name:"ColorInput",props:{modelValue:{type:String,required:!0},showSync:{type:Boolean,default:!1},syncLabel:{type:String,default:""},syncTitle:{type:String,default:""},inputClass:{type:String,default:""}},emits:["update:modelValue","change","sync"]}),_i=["value"],Ai=["title"];function Li(e,n,a,r,s,i){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["color-input-wrapper",{"with-sync":e.showSync}])},[t.createElementVNode("input",{type:"color",value:e.modelValue,onInput:n[0]||(n[0]=o=>e.$emit("update:modelValue",o.target.value)),onChange:n[1]||(n[1]=o=>e.$emit("change")),class:t.normalizeClass(["color-input",e.inputClass])},null,42,_i),e.showSync?(t.openBlock(),t.createElementBlock("button",{key:0,onClick:n[2]||(n[2]=o=>e.$emit("sync")),class:"sync-btn",title:e.syncTitle},t.toDisplayString(e.syncLabel),9,Ai)):t.createCommentVNode("",!0)],2)}const Bi=Oe(Ni,[["render",Li],["__scopeId","data-v-6e05149c"]]),Hi=t.defineComponent({name:"CheckboxConfig",props:{modelValue:{type:Boolean,required:!0},label:{type:String,required:!0}},emits:["update:modelValue","change"]}),Yi={class:"config-group"},Fi={class:"config-label checkbox-label"},Ii=["checked"];function Ri(e,n,a,r,s,i){return t.openBlock(),t.createElementBlock("div",Yi,[t.createElementVNode("label",Fi,[t.createElementVNode("input",{type:"checkbox",checked:e.modelValue,onChange:n[0]||(n[0]=o=>{e.$emit("update:modelValue",o.target.checked),e.$emit("change")})},null,40,Ii),t.createTextVNode(" "+t.toDisplayString(e.label),1)])])}const zi=Oe(Hi,[["render",Ri],["__scopeId","data-v-c58f997e"]]),Oi=t.defineComponent({name:"GanttConfigPanel",components:{SliderInput:cs,ConfigSection:ks,PathTypeSelector:As,LinkTypeColorConfig:hi,ThemeSelector:vi,LanguageSelector:sa,ColorInput:Bi,CheckboxConfig:zi},setup(){var R,C,A,oe,x,se,I,X,le,L,O,m;const{t:e,locale:n,setLocale:a,getLocales:r}=et(),s=t.ref(!1),i=t.ref(Qe),o=t.ref("metro"),l=t.ref(null),h=t.computed(()=>n.value),f=t.computed(()=>r()),k=c=>{a(c)},p=t.inject("ganttContainer"),{config:v,updateConfig:H}=Ft(),b=t.ref({pathType:v.pathType||Ue.BEZIER,color:v.color||"#3498db",width:v.width||2,dashArray:v.dashArray,bezierCurvature:v.bezierCurvature||.5,rightAngleOffset:v.rightAngleOffset||40,smoothCorners:v.smoothCorners||!1,cornerRadius:v.cornerRadius||5,showArrow:v.showArrow!==void 0?v.showArrow:!0,arrowSize:v.arrowSize||8,arrowColor:v.arrowColor||"#3498db",enableDashAnimation:v.enableDashAnimation||!1,dashAnimationSpeed:v.dashAnimationSpeed||1,showLabels:v.showLabels||!1,labelColor:v.labelColor||"#333333",labelFontSize:v.labelFontSize||12,parentChildStyle:{color:((R=v.parentChildStyle)==null?void 0:R.color)||"#999999",width:((C=v.parentChildStyle)==null?void 0:C.width)||1.5,dashArray:((A=v.parentChildStyle)==null?void 0:A.dashArray)||"3,3"},linkTypeColors:{finishToStart:((oe=v.linkTypeColors)==null?void 0:oe.finishToStart)||"#3498db",startToStart:((x=v.linkTypeColors)==null?void 0:x.startToStart)||"#2ecc71",finishToFinish:((se=v.linkTypeColors)==null?void 0:se.finishToFinish)||"#e74c3c",startToFinish:((I=v.linkTypeColors)==null?void 0:I.startToFinish)||"#f39c12"},linkTypeVisibility:{finishToStart:((X=v.linkTypeVisibility)==null?void 0:X.finishToStart)??!0,startToStart:((le=v.linkTypeVisibility)==null?void 0:le.startToStart)??!0,finishToFinish:((L=v.linkTypeVisibility)==null?void 0:L.finishToFinish)??!0,startToFinish:((O=v.linkTypeVisibility)==null?void 0:O.startToFinish)??!0,parentChild:((m=v.linkTypeVisibility)==null?void 0:m.parentChild)??!0}}),$=()=>{s.value=!s.value,s.value&&setTimeout(()=>{z(o.value)},0)},d=()=>{s.value=!1},z=c=>{if(!l.value)return;const w=je.getThemeInfo(c);w&&(l.value.setAttribute("data-gantt-theme",c),Object.entries(w.cssVariables).forEach(([y,T])=>{l.value.style.setProperty(y,T)}))},B=c=>{o.value=c,je.setTheme(c),z(c)},W=()=>{H(b.value)};return t.onMounted(()=>{p!=null&&p.value?je.setGanttContainer(p.value):console.warn("GanttConfigPanel: ganttContainer not available"),o.value=je.getCurrentTheme()}),{t:e,isOpen:s,themes:i,currentTheme:o,linkConfig:b,currentLocale:h,locales:f,togglePanel:$,closePanel:d,selectTheme:B,selectLocale:k,updateLinkConfig:W,configPanelRef:l}}}),Pi={class:"config-panel-wrapper"},xi=["title"],Gi={class:"btn-content"},qi={class:"btn-text"},Ui=["data-gantt-theme"],Wi=["data-gantt-theme"],Zi={class:"panel-header"},Ji=["title"],ji={class:"panel-content"},Ki={class:"link-config-content"},Qi={class:"config-info-box"},Xi={width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",style:{"flex-shrink":"0"}},el={class:"config-group"},tl={class:"config-label"},nl={class:"config-group"},al={class:"config-label"},ol={class:"config-group"},rl={class:"config-label"},sl={class:"config-group"},il={class:"config-label"},ll={value:void 0},dl={value:"3,3"},cl={value:"5,5"},ul={value:"8,4"},fl={value:"2,2,8,2"},ml={key:0,class:"config-group"},hl={class:"config-label"},gl={class:"config-group"},pl={class:"config-label"},yl={key:0,class:"config-group"},kl={class:"config-label"},bl={class:"config-group"},wl={class:"config-label"},Cl={class:"config-group"},Sl={class:"config-label"},vl={key:3,class:"config-group"},Dl={class:"config-label"},Tl={class:"config-group"},Ml={class:"config-label"},$l={class:"config-group"},El={class:"config-label"},Vl={class:"config-subsection"},Nl={class:"subsection-title"},_l={width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",style:{"margin-right":"4px"}},Al={class:"config-subsection"},Ll={class:"subsection-title"},Bl={width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",style:{"margin-right":"4px"}},Hl={class:"config-info-box",style:{"margin-bottom":"12px"}},Yl={style:{"font-size":"11px"}},Fl={class:"config-group"},Il={class:"config-label"},Rl={class:"config-group"},zl={class:"config-label"},Ol={class:"config-group"},Pl={class:"config-label"},xl={value:void 0},Gl={value:"3,3"},ql={value:"5,5"},Ul={value:"8,4"};function Wl(e,n,a,r,s,i){const o=t.resolveComponent("LanguageSelector"),l=t.resolveComponent("ConfigSection"),h=t.resolveComponent("ThemeSelector"),f=t.resolveComponent("PathTypeSelector"),k=t.resolveComponent("ColorInput"),p=t.resolveComponent("SliderInput"),v=t.resolveComponent("CheckboxConfig"),H=t.resolveComponent("LinkTypeColorConfig");return t.openBlock(),t.createElementBlock("div",Pi,[t.createElementVNode("button",{class:t.normalizeClass(["config-btn",{active:e.isOpen}]),onClick:n[0]||(n[0]=(...b)=>e.togglePanel&&e.togglePanel(...b)),title:e.t("configPanel.title")},[t.createElementVNode("div",Gi,[n[27]||(n[27]=t.createElementVNode("div",{class:"btn-icon"},[t.createElementVNode("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor"},[t.createElementVNode("path",{d:"M19.14,12.94c0.04-0.3,0.06-0.61,0.06-0.94c0-0.32-0.02-0.64-0.07-0.94l2.03-1.58c0.18-0.14,0.23-0.41,0.12-0.61 l-1.92-3.32c-0.12-0.22-0.37-0.29-0.59-0.22l-2.39,0.96c-0.5-0.38-1.03-0.7-1.62-0.94L14.4,2.81c-0.04-0.24-0.24-0.41-0.48-0.41 h-3.84c-0.24,0-0.43,0.17-0.47,0.41L9.25,5.35C8.66,5.59,8.12,5.92,7.63,6.29L5.24,5.33c-0.22-0.08-0.47,0-0.59,0.22L2.74,8.87 C2.62,9.08,2.66,9.34,2.86,9.48l2.03,1.58C4.84,11.36,4.8,11.69,4.8,12s0.02,0.64,0.07,0.94l-2.03,1.58 c-0.18,0.14-0.23,0.41-0.12,0.61l1.92,3.32c0.12,0.22,0.37,0.29,0.59,0.22l2.39-0.96c0.5,0.38,1.03,0.7,1.62,0.94l0.36,2.54 c0.05,0.24,0.24,0.41,0.48,0.41h3.84c0.24,0,0.44-0.17,0.47-0.41l0.36-2.54c0.59-0.24,1.13-0.56,1.62-0.94l2.39,0.96 c0.22,0.08,0.47,0,0.59-0.22l1.92-3.32c0.12-0.22,0.07-0.47-0.12-0.61L19.14,12.94z M12,15.6c-1.98,0-3.6-1.62-3.6-3.6 s1.62-3.6,3.6-3.6s3.6,1.62,3.6,3.6S13.98,15.6,12,15.6z"})])],-1)),t.createElementVNode("span",qi,t.toDisplayString(e.t("common.config")),1)])],10,xi),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[e.isOpen?(t.openBlock(),t.createElementBlock("div",{key:0,class:"panel-overlay","data-gantt-theme":e.currentTheme},null,8,Ui)):t.createCommentVNode("",!0),e.isOpen?(t.openBlock(),t.createElementBlock("div",{key:1,class:"config-panel",ref:"configPanelRef","data-gantt-theme":e.currentTheme},[t.createElementVNode("div",Zi,[t.createElementVNode("h3",null,t.toDisplayString(e.t("configPanel.title")),1),t.createElementVNode("button",{class:"close-btn",onClick:n[1]||(n[1]=(...b)=>e.closePanel&&e.closePanel(...b)),title:e.t("common.close")},n[28]||(n[28]=[t.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[t.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)]),8,Ji)]),t.createElementVNode("div",ji,[t.createVNode(l,{title:e.t("configPanel.languageSettings"),icon:"language"},{default:t.withCtx(()=>[t.createVNode(o,{modelValue:e.currentLocale,"onUpdate:modelValue":[n[2]||(n[2]=b=>e.currentLocale=b),e.selectLocale],locales:e.locales},null,8,["modelValue","locales","onUpdate:modelValue"])]),_:1},8,["title"]),t.createVNode(l,{title:e.t("configPanel.themeSettings"),icon:"theme"},{default:t.withCtx(()=>[t.createVNode(h,{modelValue:e.currentTheme,"onUpdate:modelValue":[n[3]||(n[3]=b=>e.currentTheme=b),e.selectTheme],themes:e.themes},null,8,["modelValue","themes","onUpdate:modelValue"])]),_:1},8,["title"]),t.createVNode(l,{title:e.t("configPanel.linkSettings"),icon:"link"},{default:t.withCtx(()=>[t.createElementVNode("div",Ki,[t.createElementVNode("div",Qi,[(t.openBlock(),t.createElementBlock("svg",Xi,n[29]||(n[29]=[t.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"},null,-1)]))),t.createElementVNode("span",null,t.toDisplayString(e.t("configPanel.linkConfig.info")),1)]),t.createElementVNode("div",el,[t.createElementVNode("label",tl,t.toDisplayString(e.t("configPanel.linkConfig.pathType")),1),t.createVNode(f,{modelValue:e.linkConfig.pathType,"onUpdate:modelValue":[n[4]||(n[4]=b=>e.linkConfig.pathType=b),e.updateLinkConfig]},null,8,["modelValue","onUpdate:modelValue"])]),t.createElementVNode("div",nl,[t.createElementVNode("label",al,t.toDisplayString(e.t("configPanel.linkConfig.color")),1),t.createVNode(k,{modelValue:e.linkConfig.color,"onUpdate:modelValue":n[5]||(n[5]=b=>e.linkConfig.color=b),onChange:e.updateLinkConfig},null,8,["modelValue","onChange"])]),t.createElementVNode("div",ol,[t.createElementVNode("label",rl,t.toDisplayString(e.t("configPanel.linkConfig.width"))+": "+t.toDisplayString(e.linkConfig.width)+"px",1),t.createVNode(p,{modelValue:e.linkConfig.width,"onUpdate:modelValue":n[6]||(n[6]=b=>e.linkConfig.width=b),min:1,max:5,step:.5,"label-step":1,onChange:e.updateLinkConfig},null,8,["modelValue","onChange"])]),t.createElementVNode("div",sl,[t.createElementVNode("label",il,t.toDisplayString(e.t("configPanel.linkConfig.dashStyle")),1),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":n[7]||(n[7]=b=>e.linkConfig.dashArray=b),onChange:n[8]||(n[8]=(...b)=>e.updateLinkConfig&&e.updateLinkConfig(...b)),class:"select-input"},[t.createElementVNode("option",ll,t.toDisplayString(e.t("configPanel.linkConfig.solid")),1),t.createElementVNode("option",dl,t.toDisplayString(e.t("configPanel.linkConfig.shortDash")),1),t.createElementVNode("option",cl,t.toDisplayString(e.t("configPanel.linkConfig.mediumDash")),1),t.createElementVNode("option",ul,t.toDisplayString(e.t("configPanel.linkConfig.longDash")),1),t.createElementVNode("option",fl,t.toDisplayString(e.t("configPanel.linkConfig.dotDash")),1)],544),[[t.vModelSelect,e.linkConfig.dashArray]])]),e.linkConfig.pathType==="bezier"?(t.openBlock(),t.createElementBlock("div",ml,[t.createElementVNode("label",hl,t.toDisplayString(e.t("configPanel.linkConfig.curvature"))+": "+t.toDisplayString(e.linkConfig.bezierCurvature),1),t.createVNode(p,{modelValue:e.linkConfig.bezierCurvature,"onUpdate:modelValue":n[9]||(n[9]=b=>e.linkConfig.bezierCurvature=b),min:.1,max:1,step:.1,"label-step":.3,onChange:e.updateLinkConfig},null,8,["modelValue","onChange"])])):t.createCommentVNode("",!0),e.linkConfig.pathType==="right-angle"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createElementVNode("div",gl,[t.createElementVNode("label",pl,t.toDisplayString(e.t("configPanel.linkConfig.offset"))+": "+t.toDisplayString(e.linkConfig.rightAngleOffset)+"px",1),t.createVNode(p,{modelValue:e.linkConfig.rightAngleOffset,"onUpdate:modelValue":n[10]||(n[10]=b=>e.linkConfig.rightAngleOffset=b),min:10,max:80,step:5,"label-step":20,onChange:e.updateLinkConfig},null,8,["modelValue","onChange"])]),t.createVNode(v,{modelValue:e.linkConfig.smoothCorners,"onUpdate:modelValue":n[11]||(n[11]=b=>e.linkConfig.smoothCorners=b),label:e.t("configPanel.linkConfig.smoothCorners"),onChange:e.updateLinkConfig},null,8,["modelValue","label","onChange"]),e.linkConfig.smoothCorners?(t.openBlock(),t.createElementBlock("div",yl,[t.createElementVNode("label",kl,t.toDisplayString(e.t("configPanel.linkConfig.cornerRadius"))+": "+t.toDisplayString(e.linkConfig.cornerRadius)+"px",1),t.createVNode(p,{modelValue:e.linkConfig.cornerRadius,"onUpdate:modelValue":n[12]||(n[12]=b=>e.linkConfig.cornerRadius=b),min:0,max:15,step:1,"label-step":5,onChange:e.updateLinkConfig},null,8,["modelValue","onChange"])])):t.createCommentVNode("",!0)],64)):t.createCommentVNode("",!0),t.createVNode(v,{modelValue:e.linkConfig.showArrow,"onUpdate:modelValue":n[13]||(n[13]=b=>e.linkConfig.showArrow=b),label:e.t("configPanel.linkConfig.showArrow"),onChange:e.updateLinkConfig},null,8,["modelValue","label","onChange"]),e.linkConfig.showArrow?(t.openBlock(),t.createElementBlock(t.Fragment,{key:2},[t.createElementVNode("div",bl,[t.createElementVNode("label",wl,t.toDisplayString(e.t("configPanel.linkConfig.arrowSize"))+": "+t.toDisplayString(e.linkConfig.arrowSize)+"px",1),t.createVNode(p,{modelValue:e.linkConfig.arrowSize,"onUpdate:modelValue":n[14]||(n[14]=b=>e.linkConfig.arrowSize=b),min:4,max:16,step:1,"label-step":4,onChange:e.updateLinkConfig},null,8,["modelValue","onChange"])]),t.createElementVNode("div",Cl,[t.createElementVNode("label",Sl,t.toDisplayString(e.t("configPanel.linkConfig.arrowColor")),1),t.createVNode(k,{modelValue:e.linkConfig.arrowColor,"onUpdate:modelValue":n[15]||(n[15]=b=>e.linkConfig.arrowColor=b),"show-sync":!0,"sync-label":e.t("configPanel.linkConfig.syncColor"),"sync-title":e.t("tooltip.syncArrowColor"),onChange:e.updateLinkConfig,onSync:n[16]||(n[16]=b=>{e.linkConfig.arrowColor=e.linkConfig.color,e.updateLinkConfig()})},null,8,["modelValue","sync-label","sync-title","onChange"])])],64)):t.createCommentVNode("",!0),t.createVNode(v,{modelValue:e.linkConfig.enableDashAnimation,"onUpdate:modelValue":n[17]||(n[17]=b=>e.linkConfig.enableDashAnimation=b),label:e.t("configPanel.linkConfig.dashAnimation"),onChange:e.updateLinkConfig},null,8,["modelValue","label","onChange"]),e.linkConfig.enableDashAnimation?(t.openBlock(),t.createElementBlock("div",vl,[t.createElementVNode("label",Dl,t.toDisplayString(e.t("configPanel.linkConfig.animationSpeed"))+": "+t.toDisplayString(e.linkConfig.dashAnimationSpeed)+"s",1),t.createVNode(p,{modelValue:e.linkConfig.dashAnimationSpeed,"onUpdate:modelValue":n[18]||(n[18]=b=>e.linkConfig.dashAnimationSpeed=b),min:.2,max:3,step:.2,"label-step":1,onChange:e.updateLinkConfig},null,8,["modelValue","onChange"])])):t.createCommentVNode("",!0),t.createVNode(v,{modelValue:e.linkConfig.showLabels,"onUpdate:modelValue":n[19]||(n[19]=b=>e.linkConfig.showLabels=b),label:e.t("configPanel.linkConfig.showLabels"),onChange:e.updateLinkConfig},null,8,["modelValue","label","onChange"]),e.linkConfig.showLabels?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createElementVNode("div",Tl,[t.createElementVNode("label",Ml,t.toDisplayString(e.t("configPanel.linkConfig.labelColor")),1),t.createVNode(k,{modelValue:e.linkConfig.labelColor,"onUpdate:modelValue":n[20]||(n[20]=b=>e.linkConfig.labelColor=b),onChange:e.updateLinkConfig},null,8,["modelValue","onChange"])]),t.createElementVNode("div",$l,[t.createElementVNode("label",El,t.toDisplayString(e.t("configPanel.linkConfig.fontSize"))+": "+t.toDisplayString(e.linkConfig.labelFontSize)+"px",1),t.createVNode(p,{modelValue:e.linkConfig.labelFontSize,"onUpdate:modelValue":n[21]||(n[21]=b=>e.linkConfig.labelFontSize=b),min:8,max:16,step:1,"label-step":2,onChange:e.updateLinkConfig},null,8,["modelValue","onChange"])])],64)):t.createCommentVNode("",!0),t.createElementVNode("div",Vl,[t.createElementVNode("h5",Nl,[(t.openBlock(),t.createElementBlock("svg",_l,n[30]||(n[30]=[t.createElementVNode("path",{d:"M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"},null,-1)]))),t.createTextVNode(" "+t.toDisplayString(e.t("configPanel.linkConfig.typeColors")),1)]),t.createVNode(H,{colors:e.linkConfig.linkTypeColors,"onUpdate:colors":n[22]||(n[22]=b=>e.linkConfig.linkTypeColors=b),onChange:e.updateLinkConfig},null,8,["colors","onChange"])]),t.createElementVNode("div",Al,[t.createElementVNode("h5",Ll,[(t.openBlock(),t.createElementBlock("svg",Bl,n[31]||(n[31]=[t.createElementVNode("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"},null,-1)]))),t.createTextVNode(" "+t.toDisplayString(e.t("configPanel.linkConfig.parentChildStyle")),1)]),t.createElementVNode("div",Hl,[t.createElementVNode("span",Yl,t.toDisplayString(e.t("configPanel.linkConfig.parentChildInfo")),1)]),t.createElementVNode("div",Fl,[t.createElementVNode("label",Il,t.toDisplayString(e.t("configPanel.linkConfig.color")),1),t.createVNode(k,{modelValue:e.linkConfig.parentChildStyle.color,"onUpdate:modelValue":n[23]||(n[23]=b=>e.linkConfig.parentChildStyle.color=b),onChange:e.updateLinkConfig},null,8,["modelValue","onChange"])]),t.createElementVNode("div",Rl,[t.createElementVNode("label",zl,t.toDisplayString(e.t("configPanel.linkConfig.width"))+": "+t.toDisplayString(e.linkConfig.parentChildStyle.width)+"px",1),t.createVNode(p,{modelValue:e.linkConfig.parentChildStyle.width,"onUpdate:modelValue":n[24]||(n[24]=b=>e.linkConfig.parentChildStyle.width=b),min:1,max:3,step:.5,"label-step":1,onChange:e.updateLinkConfig},null,8,["modelValue","onChange"])]),t.createElementVNode("div",Ol,[t.createElementVNode("label",Pl,t.toDisplayString(e.t("configPanel.linkConfig.dashStyle")),1),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":n[25]||(n[25]=b=>e.linkConfig.parentChildStyle.dashArray=b),onChange:n[26]||(n[26]=(...b)=>e.updateLinkConfig&&e.updateLinkConfig(...b)),class:"select-input"},[t.createElementVNode("option",xl,t.toDisplayString(e.t("configPanel.linkConfig.solid")),1),t.createElementVNode("option",Gl,t.toDisplayString(e.t("configPanel.linkConfig.shortDash")),1),t.createElementVNode("option",ql,t.toDisplayString(e.t("configPanel.linkConfig.mediumDash")),1),t.createElementVNode("option",Ul,t.toDisplayString(e.t("configPanel.linkConfig.longDash")),1)],544),[[t.vModelSelect,e.linkConfig.parentChildStyle.dashArray]])])])])]),_:1},8,["title"])])],8,Wi)):t.createCommentVNode("",!0)]))])}const ia=Oe(Oi,[["render",Wl],["__scopeId","data-v-13485142"]]);var Me;(function(e){e.assertEqual=s=>s;function n(s){}e.assertIs=n;function a(s){throw new Error}e.assertNever=a,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(l=>typeof s[s[l]]!="number"),o={};for(const l of i)o[l]=s[l];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(Me||(Me={}));var An;(function(e){e.mergeShapes=(n,a)=>({...n,...a})})(An||(An={}));const Q=Me.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ct=e=>{switch(typeof e){case"undefined":return Q.undefined;case"string":return Q.string;case"number":return isNaN(e)?Q.nan:Q.number;case"boolean":return Q.boolean;case"function":return Q.function;case"bigint":return Q.bigint;case"symbol":return Q.symbol;case"object":return Array.isArray(e)?Q.array:e===null?Q.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Q.promise:typeof Map<"u"&&e instanceof Map?Q.map:typeof Set<"u"&&e instanceof Set?Q.set:typeof Date<"u"&&e instanceof Date?Q.date:Q.object;default:return Q.unknown}},_=Me.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Zl=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Xe extends Error{get errors(){return this.issues}constructor(n){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const a=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,a):this.__proto__=a,this.name="ZodError",this.issues=n}format(n){const a=n||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(a(o));else{let l=r,h=0;for(;h<o.path.length;){const f=o.path[h];h===o.path.length-1?(l[f]=l[f]||{_errors:[]},l[f]._errors.push(a(o))):l[f]=l[f]||{_errors:[]},l=l[f],h++}}};return s(this),r}static assert(n){if(!(n instanceof Xe))throw new Error(`Not a ZodError: ${n}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Me.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(n=a=>a.message){const a={},r=[];for(const s of this.issues)s.path.length>0?(a[s.path[0]]=a[s.path[0]]||[],a[s.path[0]].push(n(s))):r.push(n(s));return{formErrors:r,fieldErrors:a}}get formErrors(){return this.flatten()}}Xe.create=e=>new Xe(e);const Et=(e,n)=>{let a;switch(e.code){case _.invalid_type:e.received===Q.undefined?a="Required":a=`Expected ${e.expected}, received ${e.received}`;break;case _.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(e.expected,Me.jsonStringifyReplacer)}`;break;case _.unrecognized_keys:a=`Unrecognized key(s) in object: ${Me.joinValues(e.keys,", ")}`;break;case _.invalid_union:a="Invalid input";break;case _.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${Me.joinValues(e.options)}`;break;case _.invalid_enum_value:a=`Invalid enum value. Expected ${Me.joinValues(e.options)}, received '${e.received}'`;break;case _.invalid_arguments:a="Invalid function arguments";break;case _.invalid_return_type:a="Invalid function return type";break;case _.invalid_date:a="Invalid date";break;case _.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(a=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(a=`${a} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?a=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?a=`Invalid input: must end with "${e.validation.endsWith}"`:Me.assertNever(e.validation):e.validation!=="regex"?a=`Invalid ${e.validation}`:a="Invalid";break;case _.too_small:e.type==="array"?a=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?a=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?a=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?a=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:a="Invalid input";break;case _.too_big:e.type==="array"?a=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?a=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?a=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?a=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?a=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:a="Invalid input";break;case _.custom:a="Invalid input";break;case _.invalid_intersection_types:a="Intersection results could not be merged";break;case _.not_multiple_of:a=`Number must be a multiple of ${e.multipleOf}`;break;case _.not_finite:a="Number must be finite";break;default:a=n.defaultError,Me.assertNever(e)}return{message:a}};let la=Et;function Jl(e){la=e}function yn(){return la}const kn=e=>{const{data:n,path:a,errorMaps:r,issueData:s}=e,i=[...a,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let l="";const h=r.filter(f=>!!f).slice().reverse();for(const f of h)l=f(o,{data:n,defaultError:l}).message;return{...s,path:i,message:l}},jl=[];function U(e,n){const a=yn(),r=kn({issueData:n,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,a,a===Et?void 0:Et].filter(s=>!!s)});e.common.issues.push(r)}class Ze{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(n,a){const r=[];for(const s of a){if(s.status==="aborted")return ue;s.status==="dirty"&&n.dirty(),r.push(s.value)}return{status:n.value,value:r}}static async mergeObjectAsync(n,a){const r=[];for(const s of a){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return Ze.mergeObjectSync(n,r)}static mergeObjectSync(n,a){const r={};for(const s of a){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return ue;i.status==="dirty"&&n.dirty(),o.status==="dirty"&&n.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:n.value,value:r}}}const ue=Object.freeze({status:"aborted"}),Vt=e=>({status:"dirty",value:e}),Ke=e=>({status:"valid",value:e}),Ln=e=>e.status==="aborted",Bn=e=>e.status==="dirty",Ct=e=>e.status==="valid",It=e=>typeof Promise<"u"&&e instanceof Promise;function bn(e,n,a,r){if(typeof n=="function"?e!==n||!0:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n.get(e)}function da(e,n,a,r,s){if(typeof n=="function"?e!==n||!0:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n.set(e,a),a}typeof SuppressedError=="function"&&SuppressedError;var ne;(function(e){e.errToObj=n=>typeof n=="string"?{message:n}:n||{},e.toString=n=>typeof n=="string"?n:n==null?void 0:n.message})(ne||(ne={}));var Rt,zt;class it{constructor(n,a,r,s){this._cachedPath=[],this.parent=n,this.data=a,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ca=(e,n)=>{if(Ct(n))return{success:!0,data:n.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const a=new Xe(e.common.issues);return this._error=a,this._error}}};function ge(e){if(!e)return{};const{errorMap:n,invalid_type_error:a,required_error:r,description:s}=e;if(n&&(a||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return n?{errorMap:n,description:s}:{errorMap:(o,l)=>{var h,f;const{message:k}=e;return o.code==="invalid_enum_value"?{message:k??l.defaultError}:typeof l.data>"u"?{message:(h=k??r)!==null&&h!==void 0?h:l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:(f=k??a)!==null&&f!==void 0?f:l.defaultError}},description:s}}class be{get description(){return this._def.description}_getType(n){return ct(n.data)}_getOrReturnCtx(n,a){return a||{common:n.parent.common,data:n.data,parsedType:ct(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}_processInputParams(n){return{status:new Ze,ctx:{common:n.parent.common,data:n.data,parsedType:ct(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}}_parseSync(n){const a=this._parse(n);if(It(a))throw new Error("Synchronous parse encountered promise.");return a}_parseAsync(n){const a=this._parse(n);return Promise.resolve(a)}parse(n,a){const r=this.safeParse(n,a);if(r.success)return r.data;throw r.error}safeParse(n,a){var r;const s={common:{issues:[],async:(r=a==null?void 0:a.async)!==null&&r!==void 0?r:!1,contextualErrorMap:a==null?void 0:a.errorMap},path:(a==null?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:ct(n)},i=this._parseSync({data:n,path:s.path,parent:s});return ca(s,i)}"~validate"(n){var a,r;const s={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:ct(n)};if(!this["~standard"].async)try{const i=this._parseSync({data:n,path:[],parent:s});return Ct(i)?{value:i.value}:{issues:s.common.issues}}catch(i){!((r=(a=i==null?void 0:i.message)===null||a===void 0?void 0:a.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),s.common={issues:[],async:!0}}return this._parseAsync({data:n,path:[],parent:s}).then(i=>Ct(i)?{value:i.value}:{issues:s.common.issues})}async parseAsync(n,a){const r=await this.safeParseAsync(n,a);if(r.success)return r.data;throw r.error}async safeParseAsync(n,a){const r={common:{issues:[],contextualErrorMap:a==null?void 0:a.errorMap,async:!0},path:(a==null?void 0:a.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:n,parsedType:ct(n)},s=this._parse({data:n,path:r.path,parent:r}),i=await(It(s)?s:Promise.resolve(s));return ca(r,i)}refine(n,a){const r=s=>typeof a=="string"||typeof a>"u"?{message:a}:typeof a=="function"?a(s):a;return this._refinement((s,i)=>{const o=n(s),l=()=>i.addIssue({code:_.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(h=>h?!0:(l(),!1)):o?!0:(l(),!1)})}refinement(n,a){return this._refinement((r,s)=>n(r)?!0:(s.addIssue(typeof a=="function"?a(r,s):a),!1))}_refinement(n){return new rt({schema:this,typeName:de.ZodEffects,effect:{type:"refinement",refinement:n}})}superRefine(n){return this._refinement(n)}constructor(n){this.spa=this.safeParseAsync,this._def=n,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:a=>this["~validate"](a)}}optional(){return dt.create(this,this._def)}nullable(){return bt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ot.create(this)}promise(){return Lt.create(this,this._def)}or(n){return Gt.create([this,n],this._def)}and(n){return qt.create(this,n,this._def)}transform(n){return new rt({...ge(this._def),schema:this,typeName:de.ZodEffects,effect:{type:"transform",transform:n}})}default(n){const a=typeof n=="function"?n:()=>n;return new jt({...ge(this._def),innerType:this,defaultValue:a,typeName:de.ZodDefault})}brand(){return new Fn({typeName:de.ZodBranded,type:this,...ge(this._def)})}catch(n){const a=typeof n=="function"?n:()=>n;return new Kt({...ge(this._def),innerType:this,catchValue:a,typeName:de.ZodCatch})}describe(n){const a=this.constructor;return new a({...this._def,description:n})}pipe(n){return Qt.create(this,n)}readonly(){return Xt.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Kl=/^c[^\s-]{8,}$/i,Ql=/^[0-9a-z]+$/,Xl=/^[0-9A-HJKMNP-TV-Z]{26}$/i,ed=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,td=/^[a-z0-9_-]{21}$/i,nd=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ad=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,od=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rd="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Hn;const sd=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,id=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ld=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,dd=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,cd=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ud=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,ua="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",fd=new RegExp(`^${ua}$`);function fa(e){let n="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?n=`${n}\\.\\d{${e.precision}}`:e.precision==null&&(n=`${n}(\\.\\d+)?`),n}function md(e){return new RegExp(`^${fa(e)}$`)}function ma(e){let n=`${ua}T${fa(e)}`;const a=[];return a.push(e.local?"Z?":"Z"),e.offset&&a.push("([+-]\\d{2}:?\\d{2})"),n=`${n}(${a.join("|")})`,new RegExp(`^${n}$`)}function hd(e,n){return!!((n==="v4"||!n)&&sd.test(e)||(n==="v6"||!n)&&ld.test(e))}function gd(e,n){if(!nd.test(e))return!1;try{const[a]=e.split("."),r=a.replace(/-/g,"+").replace(/_/g,"/").padEnd(a.length+(4-a.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||!s.typ||!s.alg||n&&s.alg!==n)}catch{return!1}}function pd(e,n){return!!((n==="v4"||!n)&&id.test(e)||(n==="v6"||!n)&&dd.test(e))}class at extends be{_parse(n){if(this._def.coerce&&(n.data=String(n.data)),this._getType(n)!==Q.string){const i=this._getOrReturnCtx(n);return U(i,{code:_.invalid_type,expected:Q.string,received:i.parsedType}),ue}const r=new Ze;let s;for(const i of this._def.checks)if(i.kind==="min")n.data.length<i.value&&(s=this._getOrReturnCtx(n,s),U(s,{code:_.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")n.data.length>i.value&&(s=this._getOrReturnCtx(n,s),U(s,{code:_.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=n.data.length>i.value,l=n.data.length<i.value;(o||l)&&(s=this._getOrReturnCtx(n,s),o?U(s,{code:_.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):l&&U(s,{code:_.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")od.test(n.data)||(s=this._getOrReturnCtx(n,s),U(s,{validation:"email",code:_.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Hn||(Hn=new RegExp(rd,"u")),Hn.test(n.data)||(s=this._getOrReturnCtx(n,s),U(s,{validation:"emoji",code:_.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")ed.test(n.data)||(s=this._getOrReturnCtx(n,s),U(s,{validation:"uuid",code:_.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")td.test(n.data)||(s=this._getOrReturnCtx(n,s),U(s,{validation:"nanoid",code:_.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")Kl.test(n.data)||(s=this._getOrReturnCtx(n,s),U(s,{validation:"cuid",code:_.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Ql.test(n.data)||(s=this._getOrReturnCtx(n,s),U(s,{validation:"cuid2",code:_.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Xl.test(n.data)||(s=this._getOrReturnCtx(n,s),U(s,{validation:"ulid",code:_.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(n.data)}catch{s=this._getOrReturnCtx(n,s),U(s,{validation:"url",code:_.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(n.data)||(s=this._getOrReturnCtx(n,s),U(s,{validation:"regex",code:_.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?n.data=n.data.trim():i.kind==="includes"?n.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(n,s),U(s,{code:_.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?n.data=n.data.toLowerCase():i.kind==="toUpperCase"?n.data=n.data.toUpperCase():i.kind==="startsWith"?n.data.startsWith(i.value)||(s=this._getOrReturnCtx(n,s),U(s,{code:_.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?n.data.endsWith(i.value)||(s=this._getOrReturnCtx(n,s),U(s,{code:_.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?ma(i).test(n.data)||(s=this._getOrReturnCtx(n,s),U(s,{code:_.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?fd.test(n.data)||(s=this._getOrReturnCtx(n,s),U(s,{code:_.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?md(i).test(n.data)||(s=this._getOrReturnCtx(n,s),U(s,{code:_.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?ad.test(n.data)||(s=this._getOrReturnCtx(n,s),U(s,{validation:"duration",code:_.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?hd(n.data,i.version)||(s=this._getOrReturnCtx(n,s),U(s,{validation:"ip",code:_.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?gd(n.data,i.alg)||(s=this._getOrReturnCtx(n,s),U(s,{validation:"jwt",code:_.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?pd(n.data,i.version)||(s=this._getOrReturnCtx(n,s),U(s,{validation:"cidr",code:_.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?cd.test(n.data)||(s=this._getOrReturnCtx(n,s),U(s,{validation:"base64",code:_.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?ud.test(n.data)||(s=this._getOrReturnCtx(n,s),U(s,{validation:"base64url",code:_.invalid_string,message:i.message}),r.dirty()):Me.assertNever(i);return{status:r.value,value:n.data}}_regex(n,a,r){return this.refinement(s=>n.test(s),{validation:a,code:_.invalid_string,...ne.errToObj(r)})}_addCheck(n){return new at({...this._def,checks:[...this._def.checks,n]})}email(n){return this._addCheck({kind:"email",...ne.errToObj(n)})}url(n){return this._addCheck({kind:"url",...ne.errToObj(n)})}emoji(n){return this._addCheck({kind:"emoji",...ne.errToObj(n)})}uuid(n){return this._addCheck({kind:"uuid",...ne.errToObj(n)})}nanoid(n){return this._addCheck({kind:"nanoid",...ne.errToObj(n)})}cuid(n){return this._addCheck({kind:"cuid",...ne.errToObj(n)})}cuid2(n){return this._addCheck({kind:"cuid2",...ne.errToObj(n)})}ulid(n){return this._addCheck({kind:"ulid",...ne.errToObj(n)})}base64(n){return this._addCheck({kind:"base64",...ne.errToObj(n)})}base64url(n){return this._addCheck({kind:"base64url",...ne.errToObj(n)})}jwt(n){return this._addCheck({kind:"jwt",...ne.errToObj(n)})}ip(n){return this._addCheck({kind:"ip",...ne.errToObj(n)})}cidr(n){return this._addCheck({kind:"cidr",...ne.errToObj(n)})}datetime(n){var a,r;return typeof n=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:n}):this._addCheck({kind:"datetime",precision:typeof(n==null?void 0:n.precision)>"u"?null:n==null?void 0:n.precision,offset:(a=n==null?void 0:n.offset)!==null&&a!==void 0?a:!1,local:(r=n==null?void 0:n.local)!==null&&r!==void 0?r:!1,...ne.errToObj(n==null?void 0:n.message)})}date(n){return this._addCheck({kind:"date",message:n})}time(n){return typeof n=="string"?this._addCheck({kind:"time",precision:null,message:n}):this._addCheck({kind:"time",precision:typeof(n==null?void 0:n.precision)>"u"?null:n==null?void 0:n.precision,...ne.errToObj(n==null?void 0:n.message)})}duration(n){return this._addCheck({kind:"duration",...ne.errToObj(n)})}regex(n,a){return this._addCheck({kind:"regex",regex:n,...ne.errToObj(a)})}includes(n,a){return this._addCheck({kind:"includes",value:n,position:a==null?void 0:a.position,...ne.errToObj(a==null?void 0:a.message)})}startsWith(n,a){return this._addCheck({kind:"startsWith",value:n,...ne.errToObj(a)})}endsWith(n,a){return this._addCheck({kind:"endsWith",value:n,...ne.errToObj(a)})}min(n,a){return this._addCheck({kind:"min",value:n,...ne.errToObj(a)})}max(n,a){return this._addCheck({kind:"max",value:n,...ne.errToObj(a)})}length(n,a){return this._addCheck({kind:"length",value:n,...ne.errToObj(a)})}nonempty(n){return this.min(1,ne.errToObj(n))}trim(){return new at({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new at({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new at({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(n=>n.kind==="datetime")}get isDate(){return!!this._def.checks.find(n=>n.kind==="date")}get isTime(){return!!this._def.checks.find(n=>n.kind==="time")}get isDuration(){return!!this._def.checks.find(n=>n.kind==="duration")}get isEmail(){return!!this._def.checks.find(n=>n.kind==="email")}get isURL(){return!!this._def.checks.find(n=>n.kind==="url")}get isEmoji(){return!!this._def.checks.find(n=>n.kind==="emoji")}get isUUID(){return!!this._def.checks.find(n=>n.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(n=>n.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(n=>n.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(n=>n.kind==="cuid2")}get isULID(){return!!this._def.checks.find(n=>n.kind==="ulid")}get isIP(){return!!this._def.checks.find(n=>n.kind==="ip")}get isCIDR(){return!!this._def.checks.find(n=>n.kind==="cidr")}get isBase64(){return!!this._def.checks.find(n=>n.kind==="base64")}get isBase64url(){return!!this._def.checks.find(n=>n.kind==="base64url")}get minLength(){let n=null;for(const a of this._def.checks)a.kind==="min"&&(n===null||a.value>n)&&(n=a.value);return n}get maxLength(){let n=null;for(const a of this._def.checks)a.kind==="max"&&(n===null||a.value<n)&&(n=a.value);return n}}at.create=e=>{var n;return new at({checks:[],typeName:de.ZodString,coerce:(n=e==null?void 0:e.coerce)!==null&&n!==void 0?n:!1,...ge(e)})};function yd(e,n){const a=(e.toString().split(".")[1]||"").length,r=(n.toString().split(".")[1]||"").length,s=a>r?a:r,i=parseInt(e.toFixed(s).replace(".","")),o=parseInt(n.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class pt extends be{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(n){if(this._def.coerce&&(n.data=Number(n.data)),this._getType(n)!==Q.number){const i=this._getOrReturnCtx(n);return U(i,{code:_.invalid_type,expected:Q.number,received:i.parsedType}),ue}let r;const s=new Ze;for(const i of this._def.checks)i.kind==="int"?Me.isInteger(n.data)||(r=this._getOrReturnCtx(n,r),U(r,{code:_.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?n.data<i.value:n.data<=i.value)&&(r=this._getOrReturnCtx(n,r),U(r,{code:_.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?n.data>i.value:n.data>=i.value)&&(r=this._getOrReturnCtx(n,r),U(r,{code:_.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?yd(n.data,i.value)!==0&&(r=this._getOrReturnCtx(n,r),U(r,{code:_.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(n.data)||(r=this._getOrReturnCtx(n,r),U(r,{code:_.not_finite,message:i.message}),s.dirty()):Me.assertNever(i);return{status:s.value,value:n.data}}gte(n,a){return this.setLimit("min",n,!0,ne.toString(a))}gt(n,a){return this.setLimit("min",n,!1,ne.toString(a))}lte(n,a){return this.setLimit("max",n,!0,ne.toString(a))}lt(n,a){return this.setLimit("max",n,!1,ne.toString(a))}setLimit(n,a,r,s){return new pt({...this._def,checks:[...this._def.checks,{kind:n,value:a,inclusive:r,message:ne.toString(s)}]})}_addCheck(n){return new pt({...this._def,checks:[...this._def.checks,n]})}int(n){return this._addCheck({kind:"int",message:ne.toString(n)})}positive(n){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ne.toString(n)})}negative(n){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ne.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ne.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ne.toString(n)})}multipleOf(n,a){return this._addCheck({kind:"multipleOf",value:n,message:ne.toString(a)})}finite(n){return this._addCheck({kind:"finite",message:ne.toString(n)})}safe(n){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ne.toString(n)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ne.toString(n)})}get minValue(){let n=null;for(const a of this._def.checks)a.kind==="min"&&(n===null||a.value>n)&&(n=a.value);return n}get maxValue(){let n=null;for(const a of this._def.checks)a.kind==="max"&&(n===null||a.value<n)&&(n=a.value);return n}get isInt(){return!!this._def.checks.find(n=>n.kind==="int"||n.kind==="multipleOf"&&Me.isInteger(n.value))}get isFinite(){let n=null,a=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(a===null||r.value>a)&&(a=r.value):r.kind==="max"&&(n===null||r.value<n)&&(n=r.value)}return Number.isFinite(a)&&Number.isFinite(n)}}pt.create=e=>new pt({checks:[],typeName:de.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ge(e)});class yt extends be{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(n){if(this._def.coerce)try{n.data=BigInt(n.data)}catch{return this._getInvalidInput(n)}if(this._getType(n)!==Q.bigint)return this._getInvalidInput(n);let r;const s=new Ze;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?n.data<i.value:n.data<=i.value)&&(r=this._getOrReturnCtx(n,r),U(r,{code:_.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?n.data>i.value:n.data>=i.value)&&(r=this._getOrReturnCtx(n,r),U(r,{code:_.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?n.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(n,r),U(r,{code:_.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):Me.assertNever(i);return{status:s.value,value:n.data}}_getInvalidInput(n){const a=this._getOrReturnCtx(n);return U(a,{code:_.invalid_type,expected:Q.bigint,received:a.parsedType}),ue}gte(n,a){return this.setLimit("min",n,!0,ne.toString(a))}gt(n,a){return this.setLimit("min",n,!1,ne.toString(a))}lte(n,a){return this.setLimit("max",n,!0,ne.toString(a))}lt(n,a){return this.setLimit("max",n,!1,ne.toString(a))}setLimit(n,a,r,s){return new yt({...this._def,checks:[...this._def.checks,{kind:n,value:a,inclusive:r,message:ne.toString(s)}]})}_addCheck(n){return new yt({...this._def,checks:[...this._def.checks,n]})}positive(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ne.toString(n)})}negative(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ne.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ne.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ne.toString(n)})}multipleOf(n,a){return this._addCheck({kind:"multipleOf",value:n,message:ne.toString(a)})}get minValue(){let n=null;for(const a of this._def.checks)a.kind==="min"&&(n===null||a.value>n)&&(n=a.value);return n}get maxValue(){let n=null;for(const a of this._def.checks)a.kind==="max"&&(n===null||a.value<n)&&(n=a.value);return n}}yt.create=e=>{var n;return new yt({checks:[],typeName:de.ZodBigInt,coerce:(n=e==null?void 0:e.coerce)!==null&&n!==void 0?n:!1,...ge(e)})};class Ot extends be{_parse(n){if(this._def.coerce&&(n.data=!!n.data),this._getType(n)!==Q.boolean){const r=this._getOrReturnCtx(n);return U(r,{code:_.invalid_type,expected:Q.boolean,received:r.parsedType}),ue}return Ke(n.data)}}Ot.create=e=>new Ot({typeName:de.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ge(e)});class St extends be{_parse(n){if(this._def.coerce&&(n.data=new Date(n.data)),this._getType(n)!==Q.date){const i=this._getOrReturnCtx(n);return U(i,{code:_.invalid_type,expected:Q.date,received:i.parsedType}),ue}if(isNaN(n.data.getTime())){const i=this._getOrReturnCtx(n);return U(i,{code:_.invalid_date}),ue}const r=new Ze;let s;for(const i of this._def.checks)i.kind==="min"?n.data.getTime()<i.value&&(s=this._getOrReturnCtx(n,s),U(s,{code:_.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?n.data.getTime()>i.value&&(s=this._getOrReturnCtx(n,s),U(s,{code:_.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):Me.assertNever(i);return{status:r.value,value:new Date(n.data.getTime())}}_addCheck(n){return new St({...this._def,checks:[...this._def.checks,n]})}min(n,a){return this._addCheck({kind:"min",value:n.getTime(),message:ne.toString(a)})}max(n,a){return this._addCheck({kind:"max",value:n.getTime(),message:ne.toString(a)})}get minDate(){let n=null;for(const a of this._def.checks)a.kind==="min"&&(n===null||a.value>n)&&(n=a.value);return n!=null?new Date(n):null}get maxDate(){let n=null;for(const a of this._def.checks)a.kind==="max"&&(n===null||a.value<n)&&(n=a.value);return n!=null?new Date(n):null}}St.create=e=>new St({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:de.ZodDate,...ge(e)});class wn extends be{_parse(n){if(this._getType(n)!==Q.symbol){const r=this._getOrReturnCtx(n);return U(r,{code:_.invalid_type,expected:Q.symbol,received:r.parsedType}),ue}return Ke(n.data)}}wn.create=e=>new wn({typeName:de.ZodSymbol,...ge(e)});class Pt extends be{_parse(n){if(this._getType(n)!==Q.undefined){const r=this._getOrReturnCtx(n);return U(r,{code:_.invalid_type,expected:Q.undefined,received:r.parsedType}),ue}return Ke(n.data)}}Pt.create=e=>new Pt({typeName:de.ZodUndefined,...ge(e)});class xt extends be{_parse(n){if(this._getType(n)!==Q.null){const r=this._getOrReturnCtx(n);return U(r,{code:_.invalid_type,expected:Q.null,received:r.parsedType}),ue}return Ke(n.data)}}xt.create=e=>new xt({typeName:de.ZodNull,...ge(e)});class Nt extends be{constructor(){super(...arguments),this._any=!0}_parse(n){return Ke(n.data)}}Nt.create=e=>new Nt({typeName:de.ZodAny,...ge(e)});class vt extends be{constructor(){super(...arguments),this._unknown=!0}_parse(n){return Ke(n.data)}}vt.create=e=>new vt({typeName:de.ZodUnknown,...ge(e)});class ut extends be{_parse(n){const a=this._getOrReturnCtx(n);return U(a,{code:_.invalid_type,expected:Q.never,received:a.parsedType}),ue}}ut.create=e=>new ut({typeName:de.ZodNever,...ge(e)});class Cn extends be{_parse(n){if(this._getType(n)!==Q.undefined){const r=this._getOrReturnCtx(n);return U(r,{code:_.invalid_type,expected:Q.void,received:r.parsedType}),ue}return Ke(n.data)}}Cn.create=e=>new Cn({typeName:de.ZodVoid,...ge(e)});class ot extends be{_parse(n){const{ctx:a,status:r}=this._processInputParams(n),s=this._def;if(a.parsedType!==Q.array)return U(a,{code:_.invalid_type,expected:Q.array,received:a.parsedType}),ue;if(s.exactLength!==null){const o=a.data.length>s.exactLength.value,l=a.data.length<s.exactLength.value;(o||l)&&(U(a,{code:o?_.too_big:_.too_small,minimum:l?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&a.data.length<s.minLength.value&&(U(a,{code:_.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&a.data.length>s.maxLength.value&&(U(a,{code:_.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),a.common.async)return Promise.all([...a.data].map((o,l)=>s.type._parseAsync(new it(a,o,a.path,l)))).then(o=>Ze.mergeArray(r,o));const i=[...a.data].map((o,l)=>s.type._parseSync(new it(a,o,a.path,l)));return Ze.mergeArray(r,i)}get element(){return this._def.type}min(n,a){return new ot({...this._def,minLength:{value:n,message:ne.toString(a)}})}max(n,a){return new ot({...this._def,maxLength:{value:n,message:ne.toString(a)}})}length(n,a){return new ot({...this._def,exactLength:{value:n,message:ne.toString(a)}})}nonempty(n){return this.min(1,n)}}ot.create=(e,n)=>new ot({type:e,minLength:null,maxLength:null,exactLength:null,typeName:de.ZodArray,...ge(n)});function _t(e){if(e instanceof Ge){const n={};for(const a in e.shape){const r=e.shape[a];n[a]=dt.create(_t(r))}return new Ge({...e._def,shape:()=>n})}else return e instanceof ot?new ot({...e._def,type:_t(e.element)}):e instanceof dt?dt.create(_t(e.unwrap())):e instanceof bt?bt.create(_t(e.unwrap())):e instanceof lt?lt.create(e.items.map(n=>_t(n))):e}class Ge extends be{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const n=this._def.shape(),a=Me.objectKeys(n);return this._cached={shape:n,keys:a}}_parse(n){if(this._getType(n)!==Q.object){const f=this._getOrReturnCtx(n);return U(f,{code:_.invalid_type,expected:Q.object,received:f.parsedType}),ue}const{status:r,ctx:s}=this._processInputParams(n),{shape:i,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof ut&&this._def.unknownKeys==="strip"))for(const f in s.data)o.includes(f)||l.push(f);const h=[];for(const f of o){const k=i[f],p=s.data[f];h.push({key:{status:"valid",value:f},value:k._parse(new it(s,p,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof ut){const f=this._def.unknownKeys;if(f==="passthrough")for(const k of l)h.push({key:{status:"valid",value:k},value:{status:"valid",value:s.data[k]}});else if(f==="strict")l.length>0&&(U(s,{code:_.unrecognized_keys,keys:l}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const k of l){const p=s.data[k];h.push({key:{status:"valid",value:k},value:f._parse(new it(s,p,s.path,k)),alwaysSet:k in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const f=[];for(const k of h){const p=await k.key,v=await k.value;f.push({key:p,value:v,alwaysSet:k.alwaysSet})}return f}).then(f=>Ze.mergeObjectSync(r,f)):Ze.mergeObjectSync(r,h)}get shape(){return this._def.shape()}strict(n){return ne.errToObj,new Ge({...this._def,unknownKeys:"strict",...n!==void 0?{errorMap:(a,r)=>{var s,i,o,l;const h=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,a,r).message)!==null&&o!==void 0?o:r.defaultError;return a.code==="unrecognized_keys"?{message:(l=ne.errToObj(n).message)!==null&&l!==void 0?l:h}:{message:h}}}:{}})}strip(){return new Ge({...this._def,unknownKeys:"strip"})}passthrough(){return new Ge({...this._def,unknownKeys:"passthrough"})}extend(n){return new Ge({...this._def,shape:()=>({...this._def.shape(),...n})})}merge(n){return new Ge({unknownKeys:n._def.unknownKeys,catchall:n._def.catchall,shape:()=>({...this._def.shape(),...n._def.shape()}),typeName:de.ZodObject})}setKey(n,a){return this.augment({[n]:a})}catchall(n){return new Ge({...this._def,catchall:n})}pick(n){const a={};return Me.objectKeys(n).forEach(r=>{n[r]&&this.shape[r]&&(a[r]=this.shape[r])}),new Ge({...this._def,shape:()=>a})}omit(n){const a={};return Me.objectKeys(this.shape).forEach(r=>{n[r]||(a[r]=this.shape[r])}),new Ge({...this._def,shape:()=>a})}deepPartial(){return _t(this)}partial(n){const a={};return Me.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];n&&!n[r]?a[r]=s:a[r]=s.optional()}),new Ge({...this._def,shape:()=>a})}required(n){const a={};return Me.objectKeys(this.shape).forEach(r=>{if(n&&!n[r])a[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof dt;)i=i._def.innerType;a[r]=i}}),new Ge({...this._def,shape:()=>a})}keyof(){return ha(Me.objectKeys(this.shape))}}Ge.create=(e,n)=>new Ge({shape:()=>e,unknownKeys:"strip",catchall:ut.create(),typeName:de.ZodObject,...ge(n)}),Ge.strictCreate=(e,n)=>new Ge({shape:()=>e,unknownKeys:"strict",catchall:ut.create(),typeName:de.ZodObject,...ge(n)}),Ge.lazycreate=(e,n)=>new Ge({shape:e,unknownKeys:"strip",catchall:ut.create(),typeName:de.ZodObject,...ge(n)});class Gt extends be{_parse(n){const{ctx:a}=this._processInputParams(n),r=this._def.options;function s(i){for(const l of i)if(l.result.status==="valid")return l.result;for(const l of i)if(l.result.status==="dirty")return a.common.issues.push(...l.ctx.common.issues),l.result;const o=i.map(l=>new Xe(l.ctx.common.issues));return U(a,{code:_.invalid_union,unionErrors:o}),ue}if(a.common.async)return Promise.all(r.map(async i=>{const o={...a,common:{...a.common,issues:[]},parent:null};return{result:await i._parseAsync({data:a.data,path:a.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const h of r){const f={...a,common:{...a.common,issues:[]},parent:null},k=h._parseSync({data:a.data,path:a.path,parent:f});if(k.status==="valid")return k;k.status==="dirty"&&!i&&(i={result:k,ctx:f}),f.common.issues.length&&o.push(f.common.issues)}if(i)return a.common.issues.push(...i.ctx.common.issues),i.result;const l=o.map(h=>new Xe(h));return U(a,{code:_.invalid_union,unionErrors:l}),ue}}get options(){return this._def.options}}Gt.create=(e,n)=>new Gt({options:e,typeName:de.ZodUnion,...ge(n)});const ft=e=>e instanceof Wt?ft(e.schema):e instanceof rt?ft(e.innerType()):e instanceof Zt?[e.value]:e instanceof kt?e.options:e instanceof Jt?Me.objectValues(e.enum):e instanceof jt?ft(e._def.innerType):e instanceof Pt?[void 0]:e instanceof xt?[null]:e instanceof dt?[void 0,...ft(e.unwrap())]:e instanceof bt?[null,...ft(e.unwrap())]:e instanceof Fn||e instanceof Xt?ft(e.unwrap()):e instanceof Kt?ft(e._def.innerType):[];class Sn extends be{_parse(n){const{ctx:a}=this._processInputParams(n);if(a.parsedType!==Q.object)return U(a,{code:_.invalid_type,expected:Q.object,received:a.parsedType}),ue;const r=this.discriminator,s=a.data[r],i=this.optionsMap.get(s);return i?a.common.async?i._parseAsync({data:a.data,path:a.path,parent:a}):i._parseSync({data:a.data,path:a.path,parent:a}):(U(a,{code:_.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ue)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(n,a,r){const s=new Map;for(const i of a){const o=ft(i.shape[n]);if(!o.length)throw new Error(`A discriminator value for key \`${n}\` could not be extracted from all schema options`);for(const l of o){if(s.has(l))throw new Error(`Discriminator property ${String(n)} has duplicate value ${String(l)}`);s.set(l,i)}}return new Sn({typeName:de.ZodDiscriminatedUnion,discriminator:n,options:a,optionsMap:s,...ge(r)})}}function Yn(e,n){const a=ct(e),r=ct(n);if(e===n)return{valid:!0,data:e};if(a===Q.object&&r===Q.object){const s=Me.objectKeys(n),i=Me.objectKeys(e).filter(l=>s.indexOf(l)!==-1),o={...e,...n};for(const l of i){const h=Yn(e[l],n[l]);if(!h.valid)return{valid:!1};o[l]=h.data}return{valid:!0,data:o}}else if(a===Q.array&&r===Q.array){if(e.length!==n.length)return{valid:!1};const s=[];for(let i=0;i<e.length;i++){const o=e[i],l=n[i],h=Yn(o,l);if(!h.valid)return{valid:!1};s.push(h.data)}return{valid:!0,data:s}}else return a===Q.date&&r===Q.date&&+e==+n?{valid:!0,data:e}:{valid:!1}}class qt extends be{_parse(n){const{status:a,ctx:r}=this._processInputParams(n),s=(i,o)=>{if(Ln(i)||Ln(o))return ue;const l=Yn(i.value,o.value);return l.valid?((Bn(i)||Bn(o))&&a.dirty(),{status:a.value,value:l.data}):(U(r,{code:_.invalid_intersection_types}),ue)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}qt.create=(e,n,a)=>new qt({left:e,right:n,typeName:de.ZodIntersection,...ge(a)});class lt extends be{_parse(n){const{status:a,ctx:r}=this._processInputParams(n);if(r.parsedType!==Q.array)return U(r,{code:_.invalid_type,expected:Q.array,received:r.parsedType}),ue;if(r.data.length<this._def.items.length)return U(r,{code:_.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ue;!this._def.rest&&r.data.length>this._def.items.length&&(U(r,{code:_.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a.dirty());const i=[...r.data].map((o,l)=>{const h=this._def.items[l]||this._def.rest;return h?h._parse(new it(r,o,r.path,l)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>Ze.mergeArray(a,o)):Ze.mergeArray(a,i)}get items(){return this._def.items}rest(n){return new lt({...this._def,rest:n})}}lt.create=(e,n)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new lt({items:e,typeName:de.ZodTuple,rest:null,...ge(n)})};class Ut extends be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){const{status:a,ctx:r}=this._processInputParams(n);if(r.parsedType!==Q.object)return U(r,{code:_.invalid_type,expected:Q.object,received:r.parsedType}),ue;const s=[],i=this._def.keyType,o=this._def.valueType;for(const l in r.data)s.push({key:i._parse(new it(r,l,r.path,l)),value:o._parse(new it(r,r.data[l],r.path,l)),alwaysSet:l in r.data});return r.common.async?Ze.mergeObjectAsync(a,s):Ze.mergeObjectSync(a,s)}get element(){return this._def.valueType}static create(n,a,r){return a instanceof be?new Ut({keyType:n,valueType:a,typeName:de.ZodRecord,...ge(r)}):new Ut({keyType:at.create(),valueType:n,typeName:de.ZodRecord,...ge(a)})}}class vn extends be{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(n){const{status:a,ctx:r}=this._processInputParams(n);if(r.parsedType!==Q.map)return U(r,{code:_.invalid_type,expected:Q.map,received:r.parsedType}),ue;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([l,h],f)=>({key:s._parse(new it(r,l,r.path,[f,"key"])),value:i._parse(new it(r,h,r.path,[f,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const h of o){const f=await h.key,k=await h.value;if(f.status==="aborted"||k.status==="aborted")return ue;(f.status==="dirty"||k.status==="dirty")&&a.dirty(),l.set(f.value,k.value)}return{status:a.value,value:l}})}else{const l=new Map;for(const h of o){const f=h.key,k=h.value;if(f.status==="aborted"||k.status==="aborted")return ue;(f.status==="dirty"||k.status==="dirty")&&a.dirty(),l.set(f.value,k.value)}return{status:a.value,value:l}}}}vn.create=(e,n,a)=>new vn({valueType:n,keyType:e,typeName:de.ZodMap,...ge(a)});class Dt extends be{_parse(n){const{status:a,ctx:r}=this._processInputParams(n);if(r.parsedType!==Q.set)return U(r,{code:_.invalid_type,expected:Q.set,received:r.parsedType}),ue;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(U(r,{code:_.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),a.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(U(r,{code:_.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),a.dirty());const i=this._def.valueType;function o(h){const f=new Set;for(const k of h){if(k.status==="aborted")return ue;k.status==="dirty"&&a.dirty(),f.add(k.value)}return{status:a.value,value:f}}const l=[...r.data.values()].map((h,f)=>i._parse(new it(r,h,r.path,f)));return r.common.async?Promise.all(l).then(h=>o(h)):o(l)}min(n,a){return new Dt({...this._def,minSize:{value:n,message:ne.toString(a)}})}max(n,a){return new Dt({...this._def,maxSize:{value:n,message:ne.toString(a)}})}size(n,a){return this.min(n,a).max(n,a)}nonempty(n){return this.min(1,n)}}Dt.create=(e,n)=>new Dt({valueType:e,minSize:null,maxSize:null,typeName:de.ZodSet,...ge(n)});class At extends be{constructor(){super(...arguments),this.validate=this.implement}_parse(n){const{ctx:a}=this._processInputParams(n);if(a.parsedType!==Q.function)return U(a,{code:_.invalid_type,expected:Q.function,received:a.parsedType}),ue;function r(l,h){return kn({data:l,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,yn(),Et].filter(f=>!!f),issueData:{code:_.invalid_arguments,argumentsError:h}})}function s(l,h){return kn({data:l,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,yn(),Et].filter(f=>!!f),issueData:{code:_.invalid_return_type,returnTypeError:h}})}const i={errorMap:a.common.contextualErrorMap},o=a.data;if(this._def.returns instanceof Lt){const l=this;return Ke(async function(...h){const f=new Xe([]),k=await l._def.args.parseAsync(h,i).catch(H=>{throw f.addIssue(r(h,H)),f}),p=await Reflect.apply(o,this,k);return await l._def.returns._def.type.parseAsync(p,i).catch(H=>{throw f.addIssue(s(p,H)),f})})}else{const l=this;return Ke(function(...h){const f=l._def.args.safeParse(h,i);if(!f.success)throw new Xe([r(h,f.error)]);const k=Reflect.apply(o,this,f.data),p=l._def.returns.safeParse(k,i);if(!p.success)throw new Xe([s(k,p.error)]);return p.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...n){return new At({...this._def,args:lt.create(n).rest(vt.create())})}returns(n){return new At({...this._def,returns:n})}implement(n){return this.parse(n)}strictImplement(n){return this.parse(n)}static create(n,a,r){return new At({args:n||lt.create([]).rest(vt.create()),returns:a||vt.create(),typeName:de.ZodFunction,...ge(r)})}}class Wt extends be{get schema(){return this._def.getter()}_parse(n){const{ctx:a}=this._processInputParams(n);return this._def.getter()._parse({data:a.data,path:a.path,parent:a})}}Wt.create=(e,n)=>new Wt({getter:e,typeName:de.ZodLazy,...ge(n)});class Zt extends be{_parse(n){if(n.data!==this._def.value){const a=this._getOrReturnCtx(n);return U(a,{received:a.data,code:_.invalid_literal,expected:this._def.value}),ue}return{status:"valid",value:n.data}}get value(){return this._def.value}}Zt.create=(e,n)=>new Zt({value:e,typeName:de.ZodLiteral,...ge(n)});function ha(e,n){return new kt({values:e,typeName:de.ZodEnum,...ge(n)})}class kt extends be{constructor(){super(...arguments),Rt.set(this,void 0)}_parse(n){if(typeof n.data!="string"){const a=this._getOrReturnCtx(n),r=this._def.values;return U(a,{expected:Me.joinValues(r),received:a.parsedType,code:_.invalid_type}),ue}if(bn(this,Rt)||da(this,Rt,new Set(this._def.values)),!bn(this,Rt).has(n.data)){const a=this._getOrReturnCtx(n),r=this._def.values;return U(a,{received:a.data,code:_.invalid_enum_value,options:r}),ue}return Ke(n.data)}get options(){return this._def.values}get enum(){const n={};for(const a of this._def.values)n[a]=a;return n}get Values(){const n={};for(const a of this._def.values)n[a]=a;return n}get Enum(){const n={};for(const a of this._def.values)n[a]=a;return n}extract(n,a=this._def){return kt.create(n,{...this._def,...a})}exclude(n,a=this._def){return kt.create(this.options.filter(r=>!n.includes(r)),{...this._def,...a})}}Rt=new WeakMap,kt.create=ha;class Jt extends be{constructor(){super(...arguments),zt.set(this,void 0)}_parse(n){const a=Me.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(n);if(r.parsedType!==Q.string&&r.parsedType!==Q.number){const s=Me.objectValues(a);return U(r,{expected:Me.joinValues(s),received:r.parsedType,code:_.invalid_type}),ue}if(bn(this,zt)||da(this,zt,new Set(Me.getValidEnumValues(this._def.values))),!bn(this,zt).has(n.data)){const s=Me.objectValues(a);return U(r,{received:r.data,code:_.invalid_enum_value,options:s}),ue}return Ke(n.data)}get enum(){return this._def.values}}zt=new WeakMap,Jt.create=(e,n)=>new Jt({values:e,typeName:de.ZodNativeEnum,...ge(n)});class Lt extends be{unwrap(){return this._def.type}_parse(n){const{ctx:a}=this._processInputParams(n);if(a.parsedType!==Q.promise&&a.common.async===!1)return U(a,{code:_.invalid_type,expected:Q.promise,received:a.parsedType}),ue;const r=a.parsedType===Q.promise?a.data:Promise.resolve(a.data);return Ke(r.then(s=>this._def.type.parseAsync(s,{path:a.path,errorMap:a.common.contextualErrorMap})))}}Lt.create=(e,n)=>new Lt({type:e,typeName:de.ZodPromise,...ge(n)});class rt extends be{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===de.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(n){const{status:a,ctx:r}=this._processInputParams(n),s=this._def.effect||null,i={addIssue:o=>{U(r,o),o.fatal?a.abort():a.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async l=>{if(a.value==="aborted")return ue;const h=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return h.status==="aborted"?ue:h.status==="dirty"||a.value==="dirty"?Vt(h.value):h});{if(a.value==="aborted")return ue;const l=this._def.schema._parseSync({data:o,path:r.path,parent:r});return l.status==="aborted"?ue:l.status==="dirty"||a.value==="dirty"?Vt(l.value):l}}if(s.type==="refinement"){const o=l=>{const h=s.refinement(l,i);if(r.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return l};if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return l.status==="aborted"?ue:(l.status==="dirty"&&a.dirty(),o(l.value),{status:a.value,value:l.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=>l.status==="aborted"?ue:(l.status==="dirty"&&a.dirty(),o(l.value).then(()=>({status:a.value,value:l.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Ct(o))return o;const l=s.transform(o.value,i);if(l instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:a.value,value:l}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Ct(o)?Promise.resolve(s.transform(o.value,i)).then(l=>({status:a.value,value:l})):o);Me.assertNever(s)}}rt.create=(e,n,a)=>new rt({schema:e,typeName:de.ZodEffects,effect:n,...ge(a)}),rt.createWithPreprocess=(e,n,a)=>new rt({schema:n,effect:{type:"preprocess",transform:e},typeName:de.ZodEffects,...ge(a)});class dt extends be{_parse(n){return this._getType(n)===Q.undefined?Ke(void 0):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}dt.create=(e,n)=>new dt({innerType:e,typeName:de.ZodOptional,...ge(n)});class bt extends be{_parse(n){return this._getType(n)===Q.null?Ke(null):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}bt.create=(e,n)=>new bt({innerType:e,typeName:de.ZodNullable,...ge(n)});class jt extends be{_parse(n){const{ctx:a}=this._processInputParams(n);let r=a.data;return a.parsedType===Q.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:a.path,parent:a})}removeDefault(){return this._def.innerType}}jt.create=(e,n)=>new jt({innerType:e,typeName:de.ZodDefault,defaultValue:typeof n.default=="function"?n.default:()=>n.default,...ge(n)});class Kt extends be{_parse(n){const{ctx:a}=this._processInputParams(n),r={...a,common:{...a.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return It(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Xe(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Xe(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Kt.create=(e,n)=>new Kt({innerType:e,typeName:de.ZodCatch,catchValue:typeof n.catch=="function"?n.catch:()=>n.catch,...ge(n)});class Dn extends be{_parse(n){if(this._getType(n)!==Q.nan){const r=this._getOrReturnCtx(n);return U(r,{code:_.invalid_type,expected:Q.nan,received:r.parsedType}),ue}return{status:"valid",value:n.data}}}Dn.create=e=>new Dn({typeName:de.ZodNaN,...ge(e)});const kd=Symbol("zod_brand");class Fn extends be{_parse(n){const{ctx:a}=this._processInputParams(n),r=a.data;return this._def.type._parse({data:r,path:a.path,parent:a})}unwrap(){return this._def.type}}class Qt extends be{_parse(n){const{status:a,ctx:r}=this._processInputParams(n);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ue:i.status==="dirty"?(a.dirty(),Vt(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ue:s.status==="dirty"?(a.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(n,a){return new Qt({in:n,out:a,typeName:de.ZodPipeline})}}class Xt extends be{_parse(n){const a=this._def.innerType._parse(n),r=s=>(Ct(s)&&(s.value=Object.freeze(s.value)),s);return It(a)?a.then(s=>r(s)):r(a)}unwrap(){return this._def.innerType}}Xt.create=(e,n)=>new Xt({innerType:e,typeName:de.ZodReadonly,...ge(n)});function ga(e,n){const a=typeof e=="function"?e(n):typeof e=="string"?{message:e}:e;return typeof a=="string"?{message:a}:a}function pa(e,n={},a){return e?Nt.create().superRefine((r,s)=>{var i,o;const l=e(r);if(l instanceof Promise)return l.then(h=>{var f,k;if(!h){const p=ga(n,r),v=(k=(f=p.fatal)!==null&&f!==void 0?f:a)!==null&&k!==void 0?k:!0;s.addIssue({code:"custom",...p,fatal:v})}});if(!l){const h=ga(n,r),f=(o=(i=h.fatal)!==null&&i!==void 0?i:a)!==null&&o!==void 0?o:!0;s.addIssue({code:"custom",...h,fatal:f})}}):Nt.create()}const bd={object:Ge.lazycreate};var de;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(de||(de={}));const wd=(e,n={message:`Input not instance of ${e.name}`})=>pa(a=>a instanceof e,n),ya=at.create,ka=pt.create,Cd=Dn.create,Sd=yt.create,ba=Ot.create,vd=St.create,Dd=wn.create,Td=Pt.create,Md=xt.create,$d=Nt.create,Ed=vt.create,Vd=ut.create,Nd=Cn.create,_d=ot.create,Ad=Ge.create,Ld=Ge.strictCreate,Bd=Gt.create,Hd=Sn.create,Yd=qt.create,Fd=lt.create,Id=Ut.create,Rd=vn.create,zd=Dt.create,Od=At.create,Pd=Wt.create,xd=Zt.create,Gd=kt.create,qd=Jt.create,Ud=Lt.create,wa=rt.create,Wd=dt.create,Zd=bt.create,Jd=rt.createWithPreprocess,jd=Qt.create;var wt=Object.freeze({__proto__:null,defaultErrorMap:Et,setErrorMap:Jl,getErrorMap:yn,makeIssue:kn,EMPTY_PATH:jl,addIssueToContext:U,ParseStatus:Ze,INVALID:ue,DIRTY:Vt,OK:Ke,isAborted:Ln,isDirty:Bn,isValid:Ct,isAsync:It,get util(){return Me},get objectUtil(){return An},ZodParsedType:Q,getParsedType:ct,ZodType:be,datetimeRegex:ma,ZodString:at,ZodNumber:pt,ZodBigInt:yt,ZodBoolean:Ot,ZodDate:St,ZodSymbol:wn,ZodUndefined:Pt,ZodNull:xt,ZodAny:Nt,ZodUnknown:vt,ZodNever:ut,ZodVoid:Cn,ZodArray:ot,ZodObject:Ge,ZodUnion:Gt,ZodDiscriminatedUnion:Sn,ZodIntersection:qt,ZodTuple:lt,ZodRecord:Ut,ZodMap:vn,ZodSet:Dt,ZodFunction:At,ZodLazy:Wt,ZodLiteral:Zt,ZodEnum:kt,ZodNativeEnum:Jt,ZodPromise:Lt,ZodEffects:rt,ZodTransformer:rt,ZodOptional:dt,ZodNullable:bt,ZodDefault:jt,ZodCatch:Kt,ZodNaN:Dn,BRAND:kd,ZodBranded:Fn,ZodPipeline:Qt,ZodReadonly:Xt,custom:pa,Schema:be,ZodSchema:be,late:bd,get ZodFirstPartyTypeKind(){return de},coerce:{string:e=>at.create({...e,coerce:!0}),number:e=>pt.create({...e,coerce:!0}),boolean:e=>Ot.create({...e,coerce:!0}),bigint:e=>yt.create({...e,coerce:!0}),date:e=>St.create({...e,coerce:!0})},any:$d,array:_d,bigint:Sd,boolean:ba,date:vd,discriminatedUnion:Hd,effect:wa,enum:Gd,function:Od,instanceof:wd,intersection:Yd,lazy:Pd,literal:xd,map:Rd,nan:Cd,nativeEnum:qd,never:Vd,null:Md,nullable:Zd,number:ka,object:Ad,oboolean:()=>ba().optional(),onumber:()=>ka().optional(),optional:Wd,ostring:()=>ya().optional(),pipeline:jd,preprocess:Jd,promise:Ud,record:Id,set:zd,strictObject:Ld,string:ya,symbol:Dd,transformer:wa,tuple:Fd,undefined:Td,union:Bd,unknown:Ed,void:Nd,NEVER:ue,ZodIssueCode:_,quotelessJson:Zl,ZodError:Xe});wt.object({date:wt.string().regex(/^\d{4}-\d{2}-\d{2}$/),year:wt.number().int(),month:wt.number().int().min(1).max(12),week:wt.number().int().min(1).max(7),monthStr:wt.string(),weekStr:wt.string(),day:wt.number().int().min(1).max(31)}),g.extend(Da),g.extend(Ea);const Kd=t.defineComponent({name:"Gantt",props:{styleConfig:{type:Object,required:!0,default:()=>({headersHeight:100,rowHeight:60}),validator:e=>e.headersHeight>0&&e.rowHeight>0},dataConfig:{type:Object,required:!0,default:()=>({dataSource:[],taskHeaders:[],mapFields:{}}),validator:e=>Array.isArray(e.dataSource)&&Array.isArray(e.taskHeaders)&&typeof e.mapFields=="object"&&e.mapFields!==null},eventConfig:{type:Object,required:!0}},components:{DatePicker:Qn,SplitPane:Do,TaskTable:kr,RightTable:os,GanttConfigPanel:ia},setup(e){const{t:n,locale:a}=et(),r=()=>({"zh-CN":"zh-cn","zh-TW":"zh-tw","en-US":"en","ja-JP":"ja","ko-KR":"ko","fr-FR":"fr","de-DE":"de","es-ES":"es","ru-RU":"ru"})[a.value]||"en",s=t.computed(()=>e.dataConfig.mapFields),i=t.computed(()=>e.dataConfig.dataSource),{config:o,updateConfig:l}=Ft(),h=t.computed(()=>o.linkTypeVisibility||{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}),f=(u,D)=>{l({linkTypeVisibility:{[u]:D}})},k=t.ref([]),p=t.ref(35),v=t.ref(["button","button","button","button is-active","button"]),H=t.ref("日"),b=t.ref(S.daySubMode),$=t.ref("60"),d=t.ref(!1),z=t.ref(!1),B=t.ref(null),W=t.ref(null),R=t.ref(null),C=t.ref(null),A=t.ref(0),oe=t.ref(0),x=t.ref(0),se=t.ref(0),I=t.ref(e.dataConfig.queryStartDate||g().locale(r()).startOf("month").format("YYYY-MM-DD")),X=t.ref(g().locale(r()).add(-5,"y").format("YYYY-MM-DD")),le=t.ref(g().locale(r()).add(5,"y").format("YYYY-MM-DD")),L=t.ref(!1),O=t.ref(I.value),m=t.ref(e.dataConfig.queryEndDate||g().locale(r()).endOf("month").format("YYYY-MM-DD")),c=t.ref(g().locale(r()).add(-5,"y").format("YYYY-MM-DD")),w=t.ref(g(I.value).locale(r()).add(5,"y").format("YYYY-MM-DD")),y=t.ref(!1),T=t.ref(m.value),E=t.ref([]),M=t.ref([]),V=t.ref([]),Z=t.ref([]),Y=t.ref(0),J=t.ref(0),pe=t.ref(I.value+" 00:00:00"),ye=t.ref(m.value+" 23:59:59"),Te=t.ref(""),ce=t.ref(),ie=t.computed(()=>S.subTask),F=t.computed(()=>S.editTask),He=t.computed(()=>S.removeTask),N=t.computed(()=>S.rootTask),P=t.computed(()=>S.allowChangeTaskDate),j=u=>{const D=g(O.value),K=g(T.value);if(!(!D.isValid()||!K.isValid()||K.diff(D,"day")<0)){switch(pe.value=O.value+" 00:00:00",ye.value=T.value+" 23:59:59",V.value=[],M.value=[],E.value=[],Z.value=[],u){case"季度":{Y.value=200;const q=[];let re=D.startOf("quarter");const Se=K.endOf("quarter");for(;re.isBefore(Se)||re.isSame(Se,"quarter");)q.push(re),re=re.add(1,"quarter");[...new Set(q.map(Ve=>Ve.year()))].forEach(Ve=>{const ke=q.filter(xe=>xe.year()===Ve),De=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value);E.value.push({title:Ve+(De?"年":""),width:ke.length*Y.value})}),q.forEach(Ve=>{const ke=Ve.quarter(),xe=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value)?`第${ke}季度`:`Q${ke}`;M.value.push({title:xe,width:Y.value,fulldate:Ve.format("YYYY-MM-DD")})}),J.value=q.length;break}case"月":{Y.value=120;let q=D.startOf("month");const re=K.endOf("month"),Se=[];let ze=q.startOf("year");for(;ze.isBefore(re)||ze.isSame(re,"year");)Se.push(ze.year()),ze=ze.add(1,"year");for(Se.forEach(Ve=>{g().year(Ve).startOf("year").endOf("year");let De=0,xe=q.clone();for(;xe.isBefore(re)||xe.isSame(re,"month");)xe.year()===Ve&&De++,xe=xe.add(1,"month");if(De>0){const qe=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value)?Ve+"年":Ve.toString();E.value.push({title:qe,width:De*Y.value})}}),q=D.startOf("month");q.isBefore(re)||q.isSame(re,"month");){const Ve=q.locale(r()).format("MMM");V.value.push({title:Ve,width:Y.value,fulldate:q.format("YYYY-MM-DD")}),q=q.add(1,"month")}J.value=V.value.length;break}case"周":{Y.value=120;let q=D.startOf("isoWeek");const re=K.endOf("isoWeek"),Se=[];let ze=q.startOf("month");for(;ze.isBefore(re)||ze.isSame(re,"month");)Se.push(ze.format("YYYY-MM-DD")),ze=ze.add(1,"month");for(Se.forEach((Ve,ke)=>{const De=g(Ve),xe=De.endOf("month");let We=0,qe=q.clone();for(;qe.isBefore(re)||qe.isSame(re,"week");){const st=qe.startOf("isoWeek"),mt=qe.endOf("isoWeek");(st.isSame(De,"month")||mt.isSame(De,"month")||st.isBefore(xe)&&mt.isAfter(De))&&We++,qe=qe.add(1,"week")}if(We>0){const mt=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value)?De.format("YYYY年MM月"):De.locale(r()).format("MMMM YYYY");E.value.push({title:mt,width:We*Y.value})}});q.isBefore(re)||q.isSame(re,"week");){const Ve=q.startOf("isoWeek"),ke=q.endOf("isoWeek"),xe=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value)?`第${q.isoWeek()}周 (${Ve.format("MM/DD")}-${ke.format("MM/DD")})`:`Week ${q.isoWeek()} (${Ve.format("MM/DD")}-${ke.format("MM/DD")})`;V.value.push({title:xe,width:Y.value,fulldate:Ve.format("YYYY-MM-DD")}),q=q.add(1,"week")}J.value=V.value.length;break}case"日":{const q=b.value==="half";Y.value=q?40:80;let re=D;const Se=[];for(;re.isBefore(K)||re.isSame(K,"day");)Se.push(re),re=re.add(1,"day");[...new Set(Se.map(ke=>ke.year()))].forEach(ke=>{const De=Se.filter(qe=>qe.year()===ke),xe=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value),We=q?De.length*2*Y.value:De.length*Y.value;E.value.push({title:ke+(xe?"年":""),width:We})});const Ve=new Map;Se.forEach(ke=>{const De=`${ke.year()}-${ke.month()}`;Ve.has(De)||Ve.set(De,[]),Ve.get(De).push(ke)}),Ve.forEach((ke,De)=>{const xe=ke[0].locale(r()).format("MMM"),We=q?ke.length*2*Y.value:ke.length*Y.value;V.value.push({title:xe,width:We,fulldate:ke[0].format("YYYY-MM-DD")})}),q?(Se.forEach(ke=>{const xe=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value)?ke.format("DD")+"日":ke.format("DD"),We=ke.format("YYYY-MM-DD");M.value.push({title:xe,width:Y.value*2,fulldate:We});const qe=a.value==="zh-CN"||a.value==="zh-TW"?"上午":a.value==="ja-JP"?"午前":a.value==="ko-KR"?"오전":"AM",st=a.value==="zh-CN"||a.value==="zh-TW"?"下午":a.value==="ja-JP"?"午後":a.value==="ko-KR"?"오후":"PM";Z.value.push({title:qe,width:Y.value,fulldate:We+"-AM"}),Z.value.push({title:st,width:Y.value,fulldate:We+"-PM"})}),J.value=Se.length*2):(Se.forEach(ke=>{const xe=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value)?ke.format("DD")+"日":ke.format("DD"),We=ke.format("YYYY-MM-DD");M.value.push({title:xe,width:Y.value,fulldate:We})}),J.value=M.value.length);break}case"时":{const q=parseInt($.value),re=60/q;Y.value=q===60?30:q===30?40:50;let Se=D;const ze=K.endOf("day");for(;Se.isBefore(ze);){const ke=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value)?Se.locale(r()).format("MMMM DD")+"日":Se.locale(r()).format("MMMM DD"),De=Se.format("YYYY-MM-DD"),xe=Se.locale(r()).format("dddd"),We=re*24*Y.value;V.value.push({title:xe,width:We,fulldate:De}),M.value.push({title:ke,width:We,fulldate:De});for(let qe=0;qe<=23;qe++)for(let st=0;st<re;st++){const mt=st*q;let Bt;const Mn=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value);if(q===60)Bt=Mn?qe+"点":`${qe}:00`;else{const Ht=mt.toString().padStart(2,"0");Bt=`${qe}:${Ht}`}Z.value.push({title:Bt,width:Y.value,fulldate:`${De} ${qe.toString().padStart(2,"0")}:${mt.toString().padStart(2,"0")}:00`})}Se=Se.add(1,"day")}J.value=Z.value.length;break}}e.eventConfig.queryTask(O.value,T.value,H.value)}},G=(u,D)=>{let K=u.filter(ae=>ae[s.value.id]===D);K&&K.length>0&&(Te.value=K[0].index+"."+Te.value,G(u,K[0][s.value.parentId]))},ee=(u,D,K)=>{let ae=D.filter(q=>q[s.value.parentId]===u);if(ae&&ae.length>0){K++;for(let q=0;q<ae.length;q++){ae[q].treeLevel=K,ae[q].index=q+1;let re=k.value.filter(Se=>Se[s.value.id]===ae[q][s.value.parentId]);Te.value="",re&&re.length>0?(Te.value=re[0].index+"."+ae[q].index,G(k.value,re[0][s.value.parentId]),ae[q].no=Te.value):ae[q].no=q+1+"",k.value.push(ae[q]),ee(ae[q][s.value.id],D,K)}}},Ye=u=>{for(let D=0;D<v.value.length;D++)v.value[D]="button";switch(u){case"季度":{v.value[0]="button is-active";break}case"月":{v.value[1]="button is-active";break}case"周":{v.value[2]="button is-active";break}case"日":{v.value[3]="button is-active";break}case"时":{v.value[4]="button is-active";break}}H.value=u,t.nextTick(()=>{const D=document.querySelector(".table .content");D&&(D.scrollLeft=0)})},Ee=()=>{fe.setDaySubMode(b.value),j("日")},Ne=t.computed(()=>({position:"fixed",top:`${A.value}px`,left:`${oe.value}px`,zIndex:100002})),$e=t.computed(()=>({position:"fixed",top:`${x.value}px`,left:`${se.value}px`,zIndex:100002})),we=()=>{setTimeout(()=>{(!W.value||!document.querySelector(".day-submenu-popup:hover"))&&(d.value=!1)},100)},_e=()=>{setTimeout(()=>{(!C.value||!document.querySelector(".hour-submenu-popup:hover"))&&(z.value=!1)},100)},Fe=u=>{b.value=u,fe.setDaySubMode(u),j("日"),d.value=!1},Pe=u=>{$.value=u,fe.setHourSubMode(u),j("时"),z.value=!1};t.watch(d,u=>{if(u&&B.value){const D=B.value.getBoundingClientRect();A.value=D.bottom+5,oe.value=D.left}}),t.watch(z,u=>{if(u&&R.value){const D=R.value.getBoundingClientRect();x.value=D.bottom+5,se.value=D.left}});const he=u=>{g(m.value).diff(g(u.date),"days")<0&&(T.value=u.date,m.value=u.date,fe.setEndGanttDate(g(u.date).toDate())),L.value=!1,O.value=u.date,I.value=u.date,fe.setStartGanttDate(g(u.date).toDate()),c.value=u.date},Re=u=>{g(u.date).diff(g(I.value),"days")<0&&(O.value=g(u.date).format("YYYY-MM-DD"),I.value=g(u.date).format("YYYY-MM-DD"),fe.setStartGanttDate(g(u.date).toDate())),y.value=!1,T.value=u.date,m.value=u.date,fe.setEndGanttDate(g(u.date).toDate())};t.watch([H,O,T],([u,D,K],[ae,q,re])=>{(u!==ae||D!==q||K!==re)&&j(u)}),t.watch(a,()=>{j(H.value)}),t.watch(N,u=>{e.eventConfig.addRootTask(u)}),t.watch(ie,u=>{e.eventConfig.addSubTask(u)}),t.watch(He,u=>{e.eventConfig.removeTask(u)}),t.watch(F,u=>{e.eventConfig.editTask(u)}),t.watch(P,u=>{e.eventConfig.allowChangeTaskDate(u)}),t.watch(()=>S.barDate,u=>{if(u){const{id:D,startDate:K,endDate:ae}=u;D&&K&&ae&&e.eventConfig.barDate(D,K,ae)}}),t.watch(Y,u=>{fe.setScale(u)}),t.watch(()=>e.dataConfig.taskHeaders,u=>{fe.setTaskHeaders(u)}),t.watch([E,M,V,Z],([u,D,K,ae])=>{fe.setMonthHeaders(u),fe.setDayHeaders(D),fe.setWeekHeaders(K),fe.setHourHeaders(ae)}),t.watch(H,u=>{fe.setMode(u)}),t.watch(s,u=>{u&&fe.setMapFields(u)}),t.watch(()=>e.dataConfig.queryStartDate,u=>{u&&(fe.setStartGanttDate(g(u).toDate()),pe.value=u,O.value=u,I.value=u)}),t.watch(()=>e.dataConfig.queryEndDate,u=>{u&&(fe.setEndGanttDate(g(u).toDate()),ye.value=u,T.value=u,m.value=u)}),t.watch(J,u=>{u&&fe.setTimelineCellCount(u)}),t.onBeforeMount(()=>{fe.setStartGanttDate(g(I.value).toDate()),fe.setEndGanttDate(g(m.value).toDate()),fe.setMonthHeaders(E.value),fe.setWeekHeaders(V.value),fe.setDayHeaders(M.value),fe.setHourHeaders(Z.value),fe.setTaskHeaders(e.dataConfig.taskHeaders),fe.setMapFields(s.value),fe.setTimelineCellCount(J.value),i.value&&i.value.length>0&&fe.setTasks(i.value)});const Le=u=>{const D=u;e.eventConfig.updateProgress&&e.eventConfig.updateProgress(D.detail)};t.onMounted(()=>{E.value=[],V.value=[],M.value=[],Z.value=[],ee("0",i.value,0),fe.setTasks(k.value),t.nextTick(()=>{fe.setMode(H.value),j(H.value)}),window.addEventListener("taskProgressUpdate",Le)});let Ce=null;t.watch(i,u=>{u&&u.length>0?(Ce&&clearTimeout(Ce),Ce=setTimeout(()=>{k.value=[],ee("0",u,0),fe.setTasks(k.value),Ce=null},100)):u&&u.length===0&&fe.setTasks([])},{immediate:!1}),t.onBeforeUnmount(()=>{window.removeEventListener("taskProgressUpdate",Le)}),t.provide(Mt.AddRootTaskSymbol,u=>e.eventConfig.addRootTask(u)),t.provide(Mt.SetBarColorSymbol,u=>e.styleConfig.setBarColor(u)),e.styleConfig.setTaskType&&t.provide(Mt.SetTaskTypeSymbol,e.styleConfig.setTaskType),t.provide("ganttContainer",ce);const Ie=t.ref("metro");try{const u=localStorage.getItem("gantt-theme");u&&(Ie.value=u)}catch(u){console.warn("Failed to load theme from localStorage:",u)}t.provide("currentTheme",Ie),t.watch(()=>e.dataConfig.dependencies,u=>{u&&u.length>0&&(hn.clear(),u.forEach(D=>{hn.addDependency(D)}))},{immediate:!0});const te=u=>{},Be=t.computed(()=>{var u,D,K,ae;return{finishToStart:((u=o.linkTypeColors)==null?void 0:u.finishToStart)||"#3498db",startToStart:((D=o.linkTypeColors)==null?void 0:D.startToStart)||"#2ecc71",finishToFinish:((K=o.linkTypeColors)==null?void 0:K.finishToFinish)||"#e74c3c",startToFinish:((ae=o.linkTypeColors)==null?void 0:ae.startToFinish)||"#f39c12"}});return{t:n,subTask:ie,editTask:F,removeTask:He,rootTask:N,allowChangeTaskDate:P,paneLengthPercent:p,startDate:I,endDate:m,minStartDate:X,maxStartDate:le,confirmStart:he,minEndDate:c,maxEndDate:w,confirmEnd:Re,buttonClass:v,timeMode:Ye,mode:H,daySubMode:b,hourSubMode:$,showDaySubMenu:d,showHourSubMenu:z,dayButtonRef:B,daySubMenuRef:W,hourButtonRef:R,hourSubMenuRef:C,daySubMenuPosition:Ne,hourSubMenuPosition:$e,handleDayButtonMouseLeave:we,handleHourButtonMouseLeave:_e,selectDaySubMode:Fe,selectHourSubMode:Pe,onDaySubModeChange:Ee,onLinkConfigChange:te,ganttContainer:ce,linkTypeColors:Be,linkTypeVisibility:h,updateLinkVisibility:f}}}),Qd={class:"page gantt-container",ref:"ganttContainer"},Xd={class:"toolbar"},ec={class:"dateInput"},tc={style:{"margin-right":"20px","margin-left":"20px",color:"#606266"}},nc={class:"buttonGroup"},ac={class:"metro-content"},oc={class:"metro-text"},rc={class:"metro-content"},sc={class:"metro-text"},ic={class:"metro-content"},lc={class:"metro-text"},dc={class:"metro-content"},cc={class:"metro-text"},uc={class:"metro-content"},fc={class:"metro-text"},mc={class:"link-legend"},hc={class:"legend-title"},gc={class:"legend-items"},pc=["checked"],yc={class:"legend-label"},kc={class:"legend-desc"},bc=["checked"],wc={width:"24",height:"12",viewBox:"0 0 24 12"},Cc=["stroke"],Sc=["fill"],vc={class:"legend-label"},Dc={class:"legend-desc"},Tc=["checked"],Mc={width:"24",height:"12",viewBox:"0 0 24 12"},$c=["stroke"],Ec=["fill"],Vc={class:"legend-label"},Nc={class:"legend-desc"},_c=["checked"],Ac={width:"24",height:"12",viewBox:"0 0 24 12"},Lc=["stroke"],Bc=["fill"],Hc={class:"legend-label"},Yc={class:"legend-desc"},Fc=["checked"],Ic={width:"24",height:"12",viewBox:"0 0 24 12"},Rc=["stroke"],zc=["fill"],Oc={class:"legend-label"},Pc={class:"legend-desc"},xc={class:"config-buttons"},Gc={class:"gantt"};function qc(e,n,a,r,s,i){const o=t.resolveComponent("DatePicker"),l=t.resolveComponent("GanttConfigPanel"),h=t.resolveComponent("TaskTable"),f=t.resolveComponent("RightTable"),k=t.resolveComponent("SplitPane");return t.openBlock(),t.createElementBlock("div",Qd,[t.createElementVNode("div",Xd,[t.createElementVNode("div",ec,[t.createVNode(o,{date:e.startDate,"min-date":e.minStartDate,"max-date":e.maxStartDate,onConfirm:e.confirmStart},null,8,["date","min-date","max-date","onConfirm"]),t.createElementVNode("span",tc,t.toDisplayString(e.t("common.to")),1),t.createVNode(o,{date:e.endDate,"min-date":e.minEndDate,"max-date":e.maxEndDate,onConfirm:e.confirmEnd},null,8,["date","min-date","max-date","onConfirm"])]),t.createElementVNode("div",nc,[t.createElementVNode("div",{class:t.normalizeClass([e.buttonClass[0],"metro-btn"]),onClick:n[0]||(n[0]=p=>e.timeMode("季度"))},[t.createElementVNode("div",ac,[n[24]||(n[24]=t.createElementVNode("div",{class:"metro-icon"},[t.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[t.createElementVNode("path",{d:"M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10zM9 14H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm-8 4H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2z"})])],-1)),t.createElementVNode("div",oc,t.toDisplayString(e.t("viewMode.quarter")),1)])],2),t.createElementVNode("div",{class:t.normalizeClass([e.buttonClass[1],"metro-btn"]),onClick:n[1]||(n[1]=p=>e.timeMode("月"))},[t.createElementVNode("div",rc,[n[25]||(n[25]=t.createElementVNode("div",{class:"metro-icon"},[t.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[t.createElementVNode("path",{d:"M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"})])],-1)),t.createElementVNode("div",sc,t.toDisplayString(e.t("viewMode.month")),1)])],2),t.createElementVNode("div",{class:t.normalizeClass([e.buttonClass[2],"metro-btn"]),onClick:n[2]||(n[2]=p=>e.timeMode("周"))},[t.createElementVNode("div",ic,[n[26]||(n[26]=t.createElementVNode("div",{class:"metro-icon"},[t.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[t.createElementVNode("path",{d:"M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"})])],-1)),t.createElementVNode("div",lc,t.toDisplayString(e.t("viewMode.week")),1)])],2),t.createElementVNode("div",{class:t.normalizeClass([e.buttonClass[3],"metro-btn"]),onClick:n[3]||(n[3]=p=>e.timeMode("日")),onMouseenter:n[4]||(n[4]=p=>e.showDaySubMenu=!0),onMouseleave:n[5]||(n[5]=(...p)=>e.handleDayButtonMouseLeave&&e.handleDayButtonMouseLeave(...p)),ref:"dayButtonRef"},[t.createElementVNode("div",dc,[n[27]||(n[27]=t.createElementVNode("div",{class:"metro-icon"},[t.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[t.createElementVNode("path",{d:"M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 2 2h8c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 18H6V4h8v16z"})])],-1)),t.createElementVNode("div",cc,t.toDisplayString(e.daySubMode==="half"?e.t("viewMode.halfDay"):e.t("viewMode.day")),1)])],34),t.createElementVNode("div",{class:t.normalizeClass([e.buttonClass[4],"metro-btn"]),onClick:n[6]||(n[6]=p=>e.timeMode("时")),onMouseenter:n[7]||(n[7]=p=>e.showHourSubMenu=!0),onMouseleave:n[8]||(n[8]=(...p)=>e.handleHourButtonMouseLeave&&e.handleHourButtonMouseLeave(...p)),ref:"hourButtonRef"},[t.createElementVNode("div",uc,[n[28]||(n[28]=t.createElementVNode("div",{class:"metro-icon"},[t.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[t.createElementVNode("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"})])],-1)),t.createElementVNode("div",fc,t.toDisplayString(e.hourSubMode==="15"?e.t("viewMode.15min"):e.hourSubMode==="30"?e.t("viewMode.30min"):e.t("viewMode.hour")),1)])],34)]),t.createElementVNode("div",mc,[t.createElementVNode("div",hc,[n[29]||(n[29]=t.createElementVNode("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},[t.createElementVNode("path",{d:"M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"})],-1)),t.createTextVNode(" "+t.toDisplayString(e.t("link.legend")),1)]),t.createElementVNode("div",gc,[t.createElementVNode("label",{class:t.normalizeClass(["legend-item",{disabled:!e.linkTypeVisibility.parentChild}]),title:"父子关系:显示任务的层级结构"},[t.createElementVNode("input",{type:"checkbox",checked:e.linkTypeVisibility.parentChild,onChange:n[9]||(n[9]=p=>e.updateLinkVisibility("parentChild",p.target.checked))},null,40,pc),n[30]||(n[30]=t.createElementVNode("svg",{width:"24",height:"12",viewBox:"0 0 24 12"},[t.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:"#95a5a6","stroke-width":"1.5","stroke-dasharray":"3,3"}),t.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:"#95a5a6"})],-1)),t.createElementVNode("span",yc,t.toDisplayString(e.t("link.pc")),1),t.createElementVNode("span",kc,t.toDisplayString(e.t("link.parentChild")),1)],2),t.createElementVNode("label",{class:t.normalizeClass(["legend-item",{disabled:!e.linkTypeVisibility.finishToStart}]),title:"完成-开始:前置任务完成后,后续任务才能开始"},[t.createElementVNode("input",{type:"checkbox",checked:e.linkTypeVisibility.finishToStart,onChange:n[10]||(n[10]=p=>e.updateLinkVisibility("finishToStart",p.target.checked))},null,40,bc),(t.openBlock(),t.createElementBlock("svg",wc,[t.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:e.linkTypeColors.finishToStart,"stroke-width":"2"},null,8,Cc),t.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:e.linkTypeColors.finishToStart},null,8,Sc)])),t.createElementVNode("span",vc,t.toDisplayString(e.t("link.fs")),1),t.createElementVNode("span",Dc,t.toDisplayString(e.t("link.finishToStart")),1)],2),t.createElementVNode("label",{class:t.normalizeClass(["legend-item",{disabled:!e.linkTypeVisibility.startToStart}]),title:"开始-开始:两个任务同时开始"},[t.createElementVNode("input",{type:"checkbox",checked:e.linkTypeVisibility.startToStart,onChange:n[11]||(n[11]=p=>e.updateLinkVisibility("startToStart",p.target.checked))},null,40,Tc),(t.openBlock(),t.createElementBlock("svg",Mc,[t.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:e.linkTypeColors.startToStart,"stroke-width":"2"},null,8,$c),t.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:e.linkTypeColors.startToStart},null,8,Ec)])),t.createElementVNode("span",Vc,t.toDisplayString(e.t("link.ss")),1),t.createElementVNode("span",Nc,t.toDisplayString(e.t("link.startToStart")),1)],2),t.createElementVNode("label",{class:t.normalizeClass(["legend-item",{disabled:!e.linkTypeVisibility.finishToFinish}]),title:"完成-完成:两个任务同时完成"},[t.createElementVNode("input",{type:"checkbox",checked:e.linkTypeVisibility.finishToFinish,onChange:n[12]||(n[12]=p=>e.updateLinkVisibility("finishToFinish",p.target.checked))},null,40,_c),(t.openBlock(),t.createElementBlock("svg",Ac,[t.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:e.linkTypeColors.finishToFinish,"stroke-width":"2"},null,8,Lc),t.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:e.linkTypeColors.finishToFinish},null,8,Bc)])),t.createElementVNode("span",Hc,t.toDisplayString(e.t("link.ff")),1),t.createElementVNode("span",Yc,t.toDisplayString(e.t("link.finishToFinish")),1)],2),t.createElementVNode("label",{class:t.normalizeClass(["legend-item",{disabled:!e.linkTypeVisibility.startToFinish}]),title:"开始-完成:前置任务开始后,后续任务才能完成"},[t.createElementVNode("input",{type:"checkbox",checked:e.linkTypeVisibility.startToFinish,onChange:n[13]||(n[13]=p=>e.updateLinkVisibility("startToFinish",p.target.checked))},null,40,Fc),(t.openBlock(),t.createElementBlock("svg",Ic,[t.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:e.linkTypeColors.startToFinish,"stroke-width":"2"},null,8,Rc),t.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:e.linkTypeColors.startToFinish},null,8,zc)])),t.createElementVNode("span",Oc,t.toDisplayString(e.t("link.sf")),1),t.createElementVNode("span",Pc,t.toDisplayString(e.t("link.startToFinish")),1)],2)])]),t.createElementVNode("div",xc,[t.createVNode(l)])]),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[e.showDaySubMenu&&e.mode==="日"?(t.openBlock(),t.createElementBlock("div",{key:0,class:"day-submenu-popup",ref:"daySubMenuRef",style:t.normalizeStyle(e.daySubMenuPosition),onMouseenter:n[16]||(n[16]=p=>e.showDaySubMenu=!0),onMouseleave:n[17]||(n[17]=p=>e.showDaySubMenu=!1)},[t.createElementVNode("div",{class:t.normalizeClass(["submenu-item",{active:e.daySubMode==="full"}]),onClick:n[14]||(n[14]=p=>e.selectDaySubMode("full"))},t.toDisplayString(e.t("viewMode.fullDay")),3),t.createElementVNode("div",{class:t.normalizeClass(["submenu-item",{active:e.daySubMode==="half"}]),onClick:n[15]||(n[15]=p=>e.selectDaySubMode("half"))},t.toDisplayString(e.t("viewMode.halfDay")),3)],36)):t.createCommentVNode("",!0)])),(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[e.showHourSubMenu&&e.mode==="时"?(t.openBlock(),t.createElementBlock("div",{key:0,class:"hour-submenu-popup",ref:"hourSubMenuRef",style:t.normalizeStyle(e.hourSubMenuPosition),onMouseenter:n[21]||(n[21]=p=>e.showHourSubMenu=!0),onMouseleave:n[22]||(n[22]=p=>e.showHourSubMenu=!1)},[t.createElementVNode("div",{class:t.normalizeClass(["submenu-item",{active:e.hourSubMode==="60"}]),onClick:n[18]||(n[18]=p=>e.selectHourSubMode("60"))},t.toDisplayString(e.t("viewMode.hour")),3),t.createElementVNode("div",{class:t.normalizeClass(["submenu-item",{active:e.hourSubMode==="30"}]),onClick:n[19]||(n[19]=p=>e.selectHourSubMode("30"))},t.toDisplayString(e.t("viewMode.30min")),3),t.createElementVNode("div",{class:t.normalizeClass(["submenu-item",{active:e.hourSubMode==="15"}]),onClick:n[20]||(n[20]=p=>e.selectHourSubMode("15"))},t.toDisplayString(e.t("viewMode.15min")),3)],36)):t.createCommentVNode("",!0)])),t.createElementVNode("div",Gc,[t.createVNode(k,{direction:"row",min:0,max:100,triggerLength:10,paneLengthPercent:e.paneLengthPercent,"onUpdate:paneLengthPercent":n[23]||(n[23]=p=>e.paneLengthPercent=p)},{one:t.withCtx(()=>[t.createVNode(h,{headersHeight:e.styleConfig.headersHeight,rowHeight:e.styleConfig.rowHeight},null,8,["headersHeight","rowHeight"])]),two:t.withCtx(()=>[t.createVNode(f,{ref:"barContent",headersHeight:e.styleConfig.headersHeight,rowHeight:e.styleConfig.rowHeight},null,8,["headersHeight","rowHeight"])]),_:1},8,["paneLengthPercent"])])],512)}const Tn=Oe(Kd,[["render",qc],["__scopeId","data-v-ed4e563e"]]),Uc=t.defineComponent({name:"GanttThemeSelector",setup(){const{t:e}=et(),n=t.ref(!1),a=t.inject("currentTheme",t.ref("metro")),r=t.ref(""),s=t.ref(),i=t.ref(Qe),o=t.inject("ganttContainer"),l=()=>{n.value=!n.value},h=()=>{n.value=!1,p()},f=B=>{a.value=B,r.value="",d(B);let W=null;if(o&&o.value?W=o.value:W=document.querySelector(".gantt-container")||document.querySelector(".page")||document.querySelector('[class*="gantt"]'),W){W.setAttribute("data-gantt-theme",B);const R=document.querySelector(".page");R&&R.setAttribute("data-gantt-theme",B);try{localStorage.setItem("gantt-theme",B)}catch(C){console.warn("Failed to save theme:",C)}setTimeout(()=>{W&&(W.style.display="none",W.offsetHeight,W.style.display="")},50)}h()},k=B=>{B!==a.value&&o&&o.value&&(r.value=B,d(B))},p=()=>{r.value&&o&&o.value&&(r.value="",d(a.value))},v=()=>{const B=je.exportThemeConfig(),W=new Blob([B],{type:"application/json"}),R=URL.createObjectURL(W),C=document.createElement("a");C.href=R,C.download=`gantt-theme-config-${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(C),C.click(),document.body.removeChild(C),URL.revokeObjectURL(R)},H=()=>{var B;(B=s.value)==null||B.click()},b=B=>{var R;const W=(R=B.target.files)==null?void 0:R[0];if(W){const C=new FileReader;C.onload=A=>{var oe;try{const x=(oe=A.target)==null?void 0:oe.result;je.importThemeConfig(x)?(a.value=je.getCurrentTheme(),alert("主题配置导入成功!")):alert("主题配置文件格式错误!")}catch{alert("主题配置文件格式错误!")}},C.readAsText(W)}},$=B=>{B.target.closest(".gantt-theme-selector")||h()},d=B=>{const W=document.getElementById("gantt-theme-styles");W&&W.remove();const R=Qe.find(x=>x.id===B);if(!R)return;const C=document.createElement("style");C.id="gantt-theme-styles";const A=Object.entries(R.cssVariables).map(([x,se])=>`${x}: ${se};`).join(`
|
|
76
92
|
`);C.textContent=`
|
|
77
|
-
/* 甘特图主题样式 - ${
|
|
93
|
+
/* 甘特图主题样式 - ${B} */
|
|
78
94
|
.page.gantt-container,
|
|
79
95
|
.page.gantt-container *,
|
|
80
96
|
.gantt-container,
|
|
81
97
|
.gantt-container *,
|
|
82
|
-
[data-gantt-theme="${
|
|
83
|
-
[data-gantt-theme="${
|
|
98
|
+
[data-gantt-theme="${B}"],
|
|
99
|
+
[data-gantt-theme="${B}"] *,
|
|
84
100
|
.toolbar,
|
|
85
101
|
.toolbar *,
|
|
86
102
|
.buttonGroup,
|
|
@@ -89,35 +105,35 @@
|
|
|
89
105
|
.metro-btn *,
|
|
90
106
|
.gantt,
|
|
91
107
|
.gantt * {
|
|
92
|
-
${
|
|
108
|
+
${A}
|
|
93
109
|
}
|
|
94
110
|
|
|
95
111
|
/* 根级别变量 */
|
|
96
112
|
:root {
|
|
97
|
-
${
|
|
113
|
+
${A}
|
|
98
114
|
}
|
|
99
115
|
|
|
100
116
|
/* 强制应用到特定元素 */
|
|
101
|
-
.page[data-gantt-theme="${
|
|
117
|
+
.page[data-gantt-theme="${B}"] .toolbar {
|
|
102
118
|
background: var(--bg-metal-normal) !important;
|
|
103
119
|
border-bottom: 1px solid var(--border) !important;
|
|
104
120
|
}
|
|
105
121
|
|
|
106
|
-
.page[data-gantt-theme="${
|
|
122
|
+
.page[data-gantt-theme="${B}"] .buttonGroup {
|
|
107
123
|
background: var(--bg-metal-normal) !important;
|
|
108
124
|
border: 1px solid var(--border) !important;
|
|
109
125
|
}
|
|
110
126
|
|
|
111
|
-
.page[data-gantt-theme="${
|
|
127
|
+
.page[data-gantt-theme="${B}"] .metro-btn {
|
|
112
128
|
background: var(--bg-metal-normal) !important;
|
|
113
129
|
color: var(--text-secondary) !important;
|
|
114
130
|
border-right: 1px solid var(--border) !important;
|
|
115
131
|
}
|
|
116
132
|
|
|
117
|
-
.page[data-gantt-theme="${
|
|
118
|
-
.page[data-gantt-theme="${
|
|
133
|
+
.page[data-gantt-theme="${B}"] .metro-btn.is-active,
|
|
134
|
+
.page[data-gantt-theme="${B}"] .metro-btn.button.is-active {
|
|
119
135
|
background: var(--bg-active) !important;
|
|
120
136
|
color: var(--text-white) !important;
|
|
121
137
|
}
|
|
122
|
-
`,document.head.appendChild(C),console.log("✅ Theme styles injected successfully"),console.log("📊 Injected CSS length:",C.textContent.length,"characters"),document.getElementById("gantt-theme-styles")?console.log("✅ Style element found in DOM"):console.error("❌ Style element not found in DOM")},O=()=>{console.log("🚀 initTheme called"),console.log("📦 ganttContainer:",a),console.log("📦 ganttContainer.value:",a==null?void 0:a.value);try{const D=localStorage.getItem("gantt-theme");D&&He.find(V=>V.id===D)&&(o.value=D,console.log("💾 Loaded theme from localStorage:",D))}catch(D){console.warn("Failed to load theme from localStorage:",D)}console.log("🎨 Current theme:",o.value),h(o.value);let S=null;if(a&&a.value?(S=a.value,console.log("✅ Using injected container reference")):(S=document.querySelector(".gantt-container")||document.querySelector(".page")||document.querySelector('[class*="gantt"]'),console.log("🔍 Using DOM query fallback, found:",S)),S){S.setAttribute("data-gantt-theme",o.value),console.log("✅ Container attribute set to:",o.value);const D=document.querySelector(".page");D&&(D.setAttribute("data-gantt-theme",o.value),console.log("✅ Page element attribute set"))}else console.warn("⚠️ No container found during initialization"),setTimeout(()=>{console.log("🔄 Retrying theme initialization..."),O()},500);console.log("✅ Theme initialization completed")};return e.watchEffect(()=>{a&&a.value&&e.nextTick(()=>{O()})}),e.onMounted(()=>{document.addEventListener("click",F),(!a||!a.value)&&setTimeout(()=>{O()},200)}),e.onUnmounted(()=>{document.removeEventListener("click",F),y()}),{t,availableThemes:i,isOpen:n,currentTheme:o,previewTheme:r,fileInput:s,toggleSelector:l,closeSelector:u,selectTheme:c,onPreviewTheme:m,onCancelPreview:y,exportConfig:w,importConfig:I,handleFileImport:g}}}),Cc={class:"gantt-theme-selector"},Sc={class:"theme-dropdown-header"},Tc={class:"theme-grid"},vc=["onClick","onMouseenter"],$c={class:"theme-preview-content"},Dc={class:"theme-info"},Ec={class:"theme-name"},Mc={class:"theme-description"},Vc={class:"theme-status"},Nc={key:0,class:"status-badge current"},_c={key:1,class:"status-badge preview"},Ac={class:"theme-actions"};function Bc(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",Cc,[e.createElementVNode("div",{class:e.normalizeClass(["theme-selector-trigger",{active:t.isOpen}]),onClick:n[0]||(n[0]=(...a)=>t.toggleSelector&&t.toggleSelector(...a))},[n[8]||(n[8]=e.createElementVNode("div",{class:"theme-icon"},[e.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"})])],-1)),n[9]||(n[9]=e.createElementVNode("span",{class:"theme-text"},"主题",-1)),e.createElementVNode("div",{class:e.normalizeClass(["theme-arrow",{rotated:t.isOpen}])},n[7]||(n[7]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M7 10l5 5 5-5z"})],-1)]),2)],2),e.withDirectives(e.createElementVNode("div",{class:"theme-dropdown",onClick:n[5]||(n[5]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",Sc,[n[11]||(n[11]=e.createElementVNode("h3",null,"选择主题",-1)),e.createElementVNode("button",{class:"close-btn",onClick:n[1]||(n[1]=(...a)=>t.closeSelector&&t.closeSelector(...a))},n[10]||(n[10]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)]))]),e.createElementVNode("div",Tc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.availableThemes,a=>(e.openBlock(),e.createElementBlock("div",{key:a.id,class:e.normalizeClass(["theme-card",{active:t.currentTheme===a.id,preview:t.previewTheme===a.id}]),onClick:l=>t.selectTheme(a.id),onMouseenter:l=>t.onPreviewTheme(a.id),onMouseleave:n[2]||(n[2]=(...l)=>t.onCancelPreview&&t.onCancelPreview(...l))},[e.createElementVNode("div",{class:"theme-preview",style:e.normalizeStyle({backgroundColor:a.preview})},[e.createElementVNode("div",$c,[e.createElementVNode("div",{class:"preview-header",style:e.normalizeStyle({backgroundColor:a.preview})},null,4),n[12]||(n[12]=e.createElementVNode("div",{class:"preview-body"},[e.createElementVNode("div",{class:"preview-bar"}),e.createElementVNode("div",{class:"preview-bar short"}),e.createElementVNode("div",{class:"preview-bar medium"})],-1))])],4),e.createElementVNode("div",Dc,[e.createElementVNode("h4",Ec,e.toDisplayString(t.t(a.nameKey)),1),e.createElementVNode("p",Mc,e.toDisplayString(t.t(a.descKey)),1)]),e.createElementVNode("div",Vc,[t.currentTheme===a.id?(e.openBlock(),e.createElementBlock("div",Nc,"当前")):t.previewTheme===a.id?(e.openBlock(),e.createElementBlock("div",_c,"预览")):e.createCommentVNode("",!0)])],42,vc))),128))]),e.createElementVNode("div",Ac,[e.createElementVNode("button",{class:"action-btn",onClick:n[3]||(n[3]=(...a)=>t.exportConfig&&t.exportConfig(...a))},n[13]||(n[13]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})],-1),e.createTextVNode(" 导出配置 ")])),e.createElementVNode("button",{class:"action-btn",onClick:n[4]||(n[4]=(...a)=>t.importConfig&&t.importConfig(...a))},n[14]||(n[14]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[e.createElementVNode("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})],-1),e.createTextVNode(" 导入配置 ")]))])],512),[[e.vShow,t.isOpen]]),e.createElementVNode("input",{ref:"fileInput",type:"file",accept:".json",style:{display:"none"},onChange:n[6]||(n[6]=(...a)=>t.handleFileImport&&t.handleFileImport(...a))},null,544)])}const Lc=Se(wc,[["render",Bc],["__scopeId","data-v-4b6192d6"]]),Fc=e.defineComponent({name:"LinkConfigPanel",emits:["close","configChange"],setup(t,{emit:n}){const{config:o,setTheme:r,updateConfig:s,reset:i,exportConfig:a,importConfig:l,themes:u}=Ct(),c=e.ref(!1),m=e.ref(""),y=[{value:Ve.STRAIGHT,name:"直线",preview:"M 10 20 L 50 20"},{value:Ve.BEZIER,name:"贝塞尔曲线",preview:"M 10 20 C 25 20 35 20 50 20"},{value:Ve.RIGHT_ANGLE,name:"直角连线",preview:"M 10 20 L 30 20 L 30 30 L 50 30"}],w={default:"默认",business:"商务",modern:"现代",minimal:"简约",colorful:"彩色"};return{config:o,pathTypes:y,themes:u,showImportDialog:c,importText:m,getThemeName:V=>w[V]||V,isCurrentTheme:V=>{const C=u[V];return C?Object.keys(C).every(K=>{const q=C[K],j=o[K];return typeof q=="object"&&typeof j=="object"?JSON.stringify(q)===JSON.stringify(j):q===j}):!1},updateConfig:()=>{s(o),n("configChange",o)},applyTheme:V=>{r(V),n("configChange",o)},resetConfig:()=>{i(),n("configChange",o)},exportConfig:()=>{const V=a();navigator.clipboard.writeText(V).then(()=>{alert("配置已复制到剪贴板")}).catch(()=>{const C=document.createElement("textarea");C.value=V,document.body.appendChild(C),C.select(),document.execCommand("copy"),document.body.removeChild(C),alert("配置已复制到剪贴板")})},importConfig:()=>{try{l(m.value)?(c.value=!1,m.value="",n("configChange",o),alert("配置导入成功")):alert("配置格式错误,请检查JSON格式")}catch(V){alert("配置导入失败:"+V)}}}}}),Ic={class:"link-config-panel"},Hc={class:"panel-header"},Rc={class:"panel-content"},zc={class:"config-section"},Yc={class:"path-type-selector"},Oc=["value","onUpdate:modelValue"],Pc={class:"path-preview"},xc={width:"60",height:"40",viewBox:"0 0 60 40"},Zc=["d"],Gc={class:"config-section"},Wc={class:"config-row"},jc={class:"config-row"},Uc={class:"value"},qc={class:"config-row"},Jc={key:0,class:"config-section"},Kc={class:"config-row"},Qc={class:"value"},Xc={key:1,class:"config-section"},eu={class:"config-row"},tu={class:"value"},nu={class:"config-row"},ou={key:0,class:"config-row"},au={class:"value"},ru={class:"config-section"},su={class:"config-row"},iu={key:0},lu={class:"config-row"},du={class:"value"},cu={class:"config-row"},uu=["placeholder"],fu={class:"config-section"},hu={class:"config-row"},mu={key:0},pu={class:"config-row"},gu={class:"value"},yu={class:"config-section"},ku={class:"config-row"},bu={key:0},wu={class:"config-row"},Cu={class:"config-row"},Su={class:"value"},Tu={class:"config-section"},vu={class:"config-row"},$u={class:"config-row"},Du={class:"value"},Eu={class:"config-row"},Mu={class:"config-section"},Vu={class:"theme-selector"},Nu=["onClick"],_u={class:"config-section"},Au={class:"action-buttons"},Bu={class:"import-actions"};function Lu(t,n,o,r,s,i){return e.openBlock(),e.createElementBlock("div",Ic,[e.createElementVNode("div",Hc,[n[47]||(n[47]=e.createElementVNode("h3",null,"连线配置",-1)),e.createElementVNode("button",{class:"close-btn",onClick:n[0]||(n[0]=a=>t.$emit("close")),title:"关闭"},"×")]),e.createElementVNode("div",Rc,[e.createElementVNode("div",zc,[n[48]||(n[48]=e.createElementVNode("h4",null,"路径类型",-1)),e.createElementVNode("div",Yc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pathTypes,a=>(e.openBlock(),e.createElementBlock("label",{key:a.value,class:e.normalizeClass(["path-type-option",{active:t.config.pathType===a.value}])},[e.withDirectives(e.createElementVNode("input",{type:"radio",value:a.value,"onUpdate:modelValue":l=>t.config.pathType=l,onChange:n[1]||(n[1]=(...l)=>t.updateConfig&&t.updateConfig(...l))},null,40,Oc),[[e.vModelRadio,t.config.pathType]]),e.createElementVNode("div",Pc,[(e.openBlock(),e.createElementBlock("svg",xc,[e.createElementVNode("path",{d:a.preview,stroke:"#3498db","stroke-width":"2",fill:"none"},null,8,Zc)]))]),e.createElementVNode("span",null,e.toDisplayString(a.name),1)],2))),128))])]),e.createElementVNode("div",Gc,[n[53]||(n[53]=e.createElementVNode("h4",null,"基础样式",-1)),e.createElementVNode("div",Wc,[n[49]||(n[49]=e.createElementVNode("label",null,"颜色:",-1)),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[2]||(n[2]=a=>t.config.color=a),onChange:n[3]||(n[3]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"color-input"},null,544),[[e.vModelText,t.config.color]])]),e.createElementVNode("div",jc,[n[50]||(n[50]=e.createElementVNode("label",null,"线宽:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"1",max:"5",step:"0.5","onUpdate:modelValue":n[4]||(n[4]=a=>t.config.width=a),onInput:n[5]||(n[5]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.width,void 0,{number:!0}]]),e.createElementVNode("span",Uc,e.toDisplayString(t.config.width)+"px",1)]),e.createElementVNode("div",qc,[n[52]||(n[52]=e.createElementVNode("label",null,"虚线样式:",-1)),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":n[6]||(n[6]=a=>t.config.dashArray=a),onChange:n[7]||(n[7]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"select-input"},n[51]||(n[51]=[e.createElementVNode("option",{value:void 0},"实线",-1),e.createElementVNode("option",{value:"3,3"},"短虚线",-1),e.createElementVNode("option",{value:"5,5"},"中虚线",-1),e.createElementVNode("option",{value:"8,4"},"长虚线",-1),e.createElementVNode("option",{value:"2,2,8,2"},"点划线",-1)]),544),[[e.vModelSelect,t.config.dashArray]])])]),t.config.pathType==="bezier"?(e.openBlock(),e.createElementBlock("div",Jc,[n[55]||(n[55]=e.createElementVNode("h4",null,"贝塞尔曲线配置",-1)),e.createElementVNode("div",Kc,[n[54]||(n[54]=e.createElementVNode("label",null,"弯曲度:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"0.1",max:"1",step:"0.1","onUpdate:modelValue":n[8]||(n[8]=a=>t.config.bezierCurvature=a),onInput:n[9]||(n[9]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.bezierCurvature,void 0,{number:!0}]]),e.createElementVNode("span",Qc,e.toDisplayString(t.config.bezierCurvature),1)])])):e.createCommentVNode("",!0),t.config.pathType==="right-angle"?(e.openBlock(),e.createElementBlock("div",Xc,[n[59]||(n[59]=e.createElementVNode("h4",null,"直角连线配置",-1)),e.createElementVNode("div",eu,[n[56]||(n[56]=e.createElementVNode("label",null,"偏移距离:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"10",max:"80",step:"5","onUpdate:modelValue":n[10]||(n[10]=a=>t.config.rightAngleOffset=a),onInput:n[11]||(n[11]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.rightAngleOffset,void 0,{number:!0}]]),e.createElementVNode("span",tu,e.toDisplayString(t.config.rightAngleOffset)+"px",1)]),e.createElementVNode("div",nu,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[12]||(n[12]=a=>t.config.smoothCorners=a),onChange:n[13]||(n[13]=(...a)=>t.updateConfig&&t.updateConfig(...a))},null,544),[[e.vModelCheckbox,t.config.smoothCorners]]),n[57]||(n[57]=e.createTextVNode(" 平滑转角 "))])]),t.config.smoothCorners?(e.openBlock(),e.createElementBlock("div",ou,[n[58]||(n[58]=e.createElementVNode("label",null,"转角半径:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"0",max:"15",step:"1","onUpdate:modelValue":n[14]||(n[14]=a=>t.config.cornerRadius=a),onInput:n[15]||(n[15]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.cornerRadius,void 0,{number:!0}]]),e.createElementVNode("span",au,e.toDisplayString(t.config.cornerRadius)+"px",1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",ru,[n[63]||(n[63]=e.createElementVNode("h4",null,"箭头配置",-1)),e.createElementVNode("div",su,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[16]||(n[16]=a=>t.config.showArrow=a),onChange:n[17]||(n[17]=(...a)=>t.updateConfig&&t.updateConfig(...a))},null,544),[[e.vModelCheckbox,t.config.showArrow]]),n[60]||(n[60]=e.createTextVNode(" 显示箭头 "))])]),t.config.showArrow?(e.openBlock(),e.createElementBlock("div",iu,[e.createElementVNode("div",lu,[n[61]||(n[61]=e.createElementVNode("label",null,"箭头大小:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"4",max:"16",step:"1","onUpdate:modelValue":n[18]||(n[18]=a=>t.config.arrowSize=a),onInput:n[19]||(n[19]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.arrowSize,void 0,{number:!0}]]),e.createElementVNode("span",du,e.toDisplayString(t.config.arrowSize)+"px",1)]),e.createElementVNode("div",cu,[n[62]||(n[62]=e.createElementVNode("label",null,"箭头颜色:",-1)),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[20]||(n[20]=a=>t.config.arrowColor=a),onChange:n[21]||(n[21]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"color-input",placeholder:t.config.color},null,40,uu),[[e.vModelText,t.config.arrowColor]]),e.createElementVNode("button",{onClick:n[22]||(n[22]=a=>{t.config.arrowColor=t.config.color,t.updateConfig()}),class:"sync-btn",title:"与线条颜色同步"}," 同步 ")])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",fu,[n[67]||(n[67]=e.createElementVNode("h4",null,"虚线动画",-1)),e.createElementVNode("div",hu,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[23]||(n[23]=a=>t.config.enableDashAnimation=a),onChange:n[24]||(n[24]=(...a)=>t.updateConfig&&t.updateConfig(...a))},null,544),[[e.vModelCheckbox,t.config.enableDashAnimation]]),n[64]||(n[64]=e.createTextVNode(" 启用虚线流动动画 "))])]),t.config.enableDashAnimation?(e.openBlock(),e.createElementBlock("div",mu,[e.createElementVNode("div",pu,[n[65]||(n[65]=e.createElementVNode("label",null,"动画速度:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"0.2",max:"3",step:"0.2","onUpdate:modelValue":n[25]||(n[25]=a=>t.config.dashAnimationSpeed=a),onInput:n[26]||(n[26]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.dashAnimationSpeed,void 0,{number:!0}]]),e.createElementVNode("span",gu,e.toDisplayString(t.config.dashAnimationSpeed)+"s",1)]),n[66]||(n[66]=e.createElementVNode("div",{class:"config-info"},[e.createElementVNode("small",null,"💡 虚线动画只在连线设置为虚线样式时显示")],-1))])):e.createCommentVNode("",!0)]),e.createElementVNode("div",yu,[n[71]||(n[71]=e.createElementVNode("h4",null,"标签配置",-1)),e.createElementVNode("div",ku,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[27]||(n[27]=a=>t.config.showLabels=a),onChange:n[28]||(n[28]=(...a)=>t.updateConfig&&t.updateConfig(...a))},null,544),[[e.vModelCheckbox,t.config.showLabels]]),n[68]||(n[68]=e.createTextVNode(" 显示标签 "))])]),t.config.showLabels?(e.openBlock(),e.createElementBlock("div",bu,[e.createElementVNode("div",wu,[n[69]||(n[69]=e.createElementVNode("label",null,"标签颜色:",-1)),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[29]||(n[29]=a=>t.config.labelColor=a),onChange:n[30]||(n[30]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"color-input"},null,544),[[e.vModelText,t.config.labelColor]])]),e.createElementVNode("div",Cu,[n[70]||(n[70]=e.createElementVNode("label",null,"字体大小:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"8",max:"16",step:"1","onUpdate:modelValue":n[31]||(n[31]=a=>t.config.labelFontSize=a),onInput:n[32]||(n[32]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.labelFontSize,void 0,{number:!0}]]),e.createElementVNode("span",Su,e.toDisplayString(t.config.labelFontSize)+"px",1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Tu,[n[76]||(n[76]=e.createElementVNode("h4",null,"父子关系样式",-1)),e.createElementVNode("div",vu,[n[72]||(n[72]=e.createElementVNode("label",null,"颜色:",-1)),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[33]||(n[33]=a=>t.config.parentChildStyle.color=a),onChange:n[34]||(n[34]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"color-input"},null,544),[[e.vModelText,t.config.parentChildStyle.color]])]),e.createElementVNode("div",$u,[n[73]||(n[73]=e.createElementVNode("label",null,"线宽:",-1)),e.withDirectives(e.createElementVNode("input",{type:"range",min:"1",max:"3",step:"0.5","onUpdate:modelValue":n[35]||(n[35]=a=>t.config.parentChildStyle.width=a),onInput:n[36]||(n[36]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"range-input"},null,544),[[e.vModelText,t.config.parentChildStyle.width,void 0,{number:!0}]]),e.createElementVNode("span",Du,e.toDisplayString(t.config.parentChildStyle.width)+"px",1)]),e.createElementVNode("div",Eu,[n[75]||(n[75]=e.createElementVNode("label",null,"虚线样式:",-1)),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":n[37]||(n[37]=a=>t.config.parentChildStyle.dashArray=a),onChange:n[38]||(n[38]=(...a)=>t.updateConfig&&t.updateConfig(...a)),class:"select-input"},n[74]||(n[74]=[e.createElementVNode("option",{value:void 0},"实线",-1),e.createElementVNode("option",{value:"3,3"},"短虚线",-1),e.createElementVNode("option",{value:"5,5"},"中虚线",-1),e.createElementVNode("option",{value:"8,4"},"长虚线",-1)]),544),[[e.vModelSelect,t.config.parentChildStyle.dashArray]])])]),e.createElementVNode("div",Mu,[n[77]||(n[77]=e.createElementVNode("h4",null,"预设主题",-1)),e.createElementVNode("div",Vu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.themes,(a,l)=>(e.openBlock(),e.createElementBlock("button",{key:l,onClick:u=>t.applyTheme(l),class:e.normalizeClass(["theme-btn",{active:t.isCurrentTheme(l)}])},e.toDisplayString(t.getThemeName(l)),11,Nu))),128))])]),e.createElementVNode("div",_u,[e.createElementVNode("div",Au,[e.createElementVNode("button",{onClick:n[39]||(n[39]=(...a)=>t.resetConfig&&t.resetConfig(...a)),class:"reset-btn"},"重置为默认"),e.createElementVNode("button",{onClick:n[40]||(n[40]=(...a)=>t.exportConfig&&t.exportConfig(...a)),class:"export-btn"},"导出配置"),e.createElementVNode("button",{onClick:n[41]||(n[41]=a=>t.showImportDialog=!0),class:"import-btn"},"导入配置")])])]),t.showImportDialog?(e.openBlock(),e.createElementBlock("div",{key:0,class:"import-dialog-overlay",onClick:n[46]||(n[46]=a=>t.showImportDialog=!1)},[e.createElementVNode("div",{class:"import-dialog",onClick:n[45]||(n[45]=e.withModifiers(()=>{},["stop"]))},[n[78]||(n[78]=e.createElementVNode("h4",null,"导入配置",-1)),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":n[42]||(n[42]=a=>t.importText=a),placeholder:"粘贴配置JSON...",class:"import-textarea"},null,512),[[e.vModelText,t.importText]]),e.createElementVNode("div",Bu,[e.createElementVNode("button",{onClick:n[43]||(n[43]=(...a)=>t.importConfig&&t.importConfig(...a)),class:"confirm-btn"},"导入"),e.createElementVNode("button",{onClick:n[44]||(n[44]=a=>t.showImportDialog=!1),class:"cancel-btn"},"取消")])])])):e.createCommentVNode("",!0)])}const Fu=Se(Fc,[["render",Lu],["__scopeId","data-v-f8062a27"]]),Iu=t=>{t.component("Gantt",dn),t.component("Vue3Gantt",dn)},Hu="1.0.0";ge.DatePicker=Ln,ge.Gantt=dn,ge.GanttConfigPanel=Pn,ge.GanttThemeSelector=Lc,ge.LanguageSelector=On,ge.LinkConfigPanel=Fu,ge.LinkPathType=Ve,ge.LinkThemes=tt,ge.LinkType=de,ge.TaskType=wt,ge.default=dn,ge.detectBrowserLocale=hn,ge.ganttThemes=He,ge.install=Iu,ge.linkDataManager=Kt,ge.mutations=ce,ge.setLocale=Bn,ge.store=v,ge.useI18n=ze,ge.useLinkConfig=Ct,ge.version=Hu,Object.defineProperties(ge,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
138
|
+
`,document.head.appendChild(C),console.log("✅ Theme styles injected successfully"),console.log("📊 Injected CSS length:",C.textContent.length,"characters"),document.getElementById("gantt-theme-styles")?console.log("✅ Style element found in DOM"):console.error("❌ Style element not found in DOM")},z=()=>{console.log("🚀 initTheme called"),console.log("📦 ganttContainer:",o),console.log("📦 ganttContainer.value:",o==null?void 0:o.value);try{const W=localStorage.getItem("gantt-theme");W&&Qe.find(R=>R.id===W)&&(a.value=W,console.log("💾 Loaded theme from localStorage:",W))}catch(W){console.warn("Failed to load theme from localStorage:",W)}console.log("🎨 Current theme:",a.value),d(a.value);let B=null;if(o&&o.value?(B=o.value,console.log("✅ Using injected container reference")):(B=document.querySelector(".gantt-container")||document.querySelector(".page")||document.querySelector('[class*="gantt"]'),console.log("🔍 Using DOM query fallback, found:",B)),B){B.setAttribute("data-gantt-theme",a.value),console.log("✅ Container attribute set to:",a.value);const W=document.querySelector(".page");W&&(W.setAttribute("data-gantt-theme",a.value),console.log("✅ Page element attribute set"))}else console.warn("⚠️ No container found during initialization"),setTimeout(()=>{console.log("🔄 Retrying theme initialization..."),z()},500);console.log("✅ Theme initialization completed")};return t.watchEffect(()=>{o&&o.value&&t.nextTick(()=>{z()})}),t.onMounted(()=>{document.addEventListener("click",$),(!o||!o.value)&&setTimeout(()=>{z()},200)}),t.onUnmounted(()=>{document.removeEventListener("click",$),p()}),{t:e,availableThemes:i,isOpen:n,currentTheme:a,previewTheme:r,fileInput:s,toggleSelector:l,closeSelector:h,selectTheme:f,onPreviewTheme:k,onCancelPreview:p,exportConfig:v,importConfig:H,handleFileImport:b}}}),Wc={class:"gantt-theme-selector"},Zc={class:"theme-dropdown-header"},Jc={class:"theme-grid"},jc=["onClick","onMouseenter"],Kc={class:"theme-preview-content"},Qc={class:"theme-info"},Xc={class:"theme-name"},eu={class:"theme-description"},tu={class:"theme-status"},nu={key:0,class:"status-badge current"},au={key:1,class:"status-badge preview"},ou={class:"theme-actions"};function ru(e,n,a,r,s,i){return t.openBlock(),t.createElementBlock("div",Wc,[t.createElementVNode("div",{class:t.normalizeClass(["theme-selector-trigger",{active:e.isOpen}]),onClick:n[0]||(n[0]=(...o)=>e.toggleSelector&&e.toggleSelector(...o))},[n[8]||(n[8]=t.createElementVNode("div",{class:"theme-icon"},[t.createElementVNode("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor"},[t.createElementVNode("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"})])],-1)),n[9]||(n[9]=t.createElementVNode("span",{class:"theme-text"},"主题",-1)),t.createElementVNode("div",{class:t.normalizeClass(["theme-arrow",{rotated:e.isOpen}])},n[7]||(n[7]=[t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[t.createElementVNode("path",{d:"M7 10l5 5 5-5z"})],-1)]),2)],2),t.withDirectives(t.createElementVNode("div",{class:"theme-dropdown",onClick:n[5]||(n[5]=t.withModifiers(()=>{},["stop"]))},[t.createElementVNode("div",Zc,[n[11]||(n[11]=t.createElementVNode("h3",null,"选择主题",-1)),t.createElementVNode("button",{class:"close-btn",onClick:n[1]||(n[1]=(...o)=>e.closeSelector&&e.closeSelector(...o))},n[10]||(n[10]=[t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[t.createElementVNode("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})],-1)]))]),t.createElementVNode("div",Jc,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.availableThemes,o=>(t.openBlock(),t.createElementBlock("div",{key:o.id,class:t.normalizeClass(["theme-card",{active:e.currentTheme===o.id,preview:e.previewTheme===o.id}]),onClick:l=>e.selectTheme(o.id),onMouseenter:l=>e.onPreviewTheme(o.id),onMouseleave:n[2]||(n[2]=(...l)=>e.onCancelPreview&&e.onCancelPreview(...l))},[t.createElementVNode("div",{class:"theme-preview",style:t.normalizeStyle({backgroundColor:o.preview})},[t.createElementVNode("div",Kc,[t.createElementVNode("div",{class:"preview-header",style:t.normalizeStyle({backgroundColor:o.preview})},null,4),n[12]||(n[12]=t.createElementVNode("div",{class:"preview-body"},[t.createElementVNode("div",{class:"preview-bar"}),t.createElementVNode("div",{class:"preview-bar short"}),t.createElementVNode("div",{class:"preview-bar medium"})],-1))])],4),t.createElementVNode("div",Qc,[t.createElementVNode("h4",Xc,t.toDisplayString(e.t(o.nameKey)),1),t.createElementVNode("p",eu,t.toDisplayString(e.t(o.descKey)),1)]),t.createElementVNode("div",tu,[e.currentTheme===o.id?(t.openBlock(),t.createElementBlock("div",nu,"当前")):e.previewTheme===o.id?(t.openBlock(),t.createElementBlock("div",au,"预览")):t.createCommentVNode("",!0)])],42,jc))),128))]),t.createElementVNode("div",ou,[t.createElementVNode("button",{class:"action-btn",onClick:n[3]||(n[3]=(...o)=>e.exportConfig&&e.exportConfig(...o))},n[13]||(n[13]=[t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[t.createElementVNode("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})],-1),t.createTextVNode(" 导出配置 ")])),t.createElementVNode("button",{class:"action-btn",onClick:n[4]||(n[4]=(...o)=>e.importConfig&&e.importConfig(...o))},n[14]||(n[14]=[t.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},[t.createElementVNode("path",{d:"M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z"})],-1),t.createTextVNode(" 导入配置 ")]))])],512),[[t.vShow,e.isOpen]]),t.createElementVNode("input",{ref:"fileInput",type:"file",accept:".json",style:{display:"none"},onChange:n[6]||(n[6]=(...o)=>e.handleFileImport&&e.handleFileImport(...o))},null,544)])}const su=Oe(Uc,[["render",ru],["__scopeId","data-v-4b6192d6"]]),iu=t.defineComponent({name:"LinkConfigPanel",emits:["close","configChange"],setup(e,{emit:n}){const{config:a,setTheme:r,updateConfig:s,reset:i,exportConfig:o,importConfig:l,themes:h}=Ft(),f=t.ref(!1),k=t.ref(""),p=[{value:Ue.STRAIGHT,name:"直线",preview:"M 10 20 L 50 20"},{value:Ue.BEZIER,name:"贝塞尔曲线",preview:"M 10 20 C 25 20 35 20 50 20"},{value:Ue.RIGHT_ANGLE,name:"直角连线",preview:"M 10 20 L 30 20 L 30 30 L 50 30"}],v={default:"默认",business:"商务",modern:"现代",minimal:"简约",colorful:"彩色"};return{config:a,pathTypes:p,themes:h,showImportDialog:f,importText:k,getThemeName:R=>v[R]||R,isCurrentTheme:R=>{const C=h[R];return C?Object.keys(C).every(A=>{const oe=C[A],x=a[A];return typeof oe=="object"&&typeof x=="object"?JSON.stringify(oe)===JSON.stringify(x):oe===x}):!1},updateConfig:()=>{s(a),n("configChange",a)},applyTheme:R=>{r(R),n("configChange",a)},resetConfig:()=>{i(),n("configChange",a)},exportConfig:()=>{const R=o();navigator.clipboard.writeText(R).then(()=>{alert("配置已复制到剪贴板")}).catch(()=>{const C=document.createElement("textarea");C.value=R,document.body.appendChild(C),C.select(),document.execCommand("copy"),document.body.removeChild(C),alert("配置已复制到剪贴板")})},importConfig:()=>{try{l(k.value)?(f.value=!1,k.value="",n("configChange",a),alert("配置导入成功")):alert("配置格式错误,请检查JSON格式")}catch(R){alert("配置导入失败:"+R)}}}}}),lu={class:"link-config-panel"},du={class:"panel-header"},cu={class:"panel-content"},uu={class:"config-section"},fu={class:"path-type-selector"},mu=["value","onUpdate:modelValue"],hu={class:"path-preview"},gu={width:"60",height:"40",viewBox:"0 0 60 40"},pu=["d"],yu={class:"config-section"},ku={class:"config-row"},bu={class:"config-row"},wu={class:"value"},Cu={class:"config-row"},Su={key:0,class:"config-section"},vu={class:"config-row"},Du={class:"value"},Tu={key:1,class:"config-section"},Mu={class:"config-row"},$u={class:"value"},Eu={class:"config-row"},Vu={key:0,class:"config-row"},Nu={class:"value"},_u={class:"config-section"},Au={class:"config-row"},Lu={key:0},Bu={class:"config-row"},Hu={class:"value"},Yu={class:"config-row"},Fu=["placeholder"],Iu={class:"config-section"},Ru={class:"config-row"},zu={key:0},Ou={class:"config-row"},Pu={class:"value"},xu={class:"config-section"},Gu={class:"config-row"},qu={key:0},Uu={class:"config-row"},Wu={class:"config-row"},Zu={class:"value"},Ju={class:"config-section"},ju={class:"config-row"},Ku={class:"config-row"},Qu={class:"value"},Xu={class:"config-row"},ef={class:"config-section"},tf={class:"theme-selector"},nf=["onClick"],af={class:"config-section"},of={class:"action-buttons"},rf={class:"import-actions"};function sf(e,n,a,r,s,i){return t.openBlock(),t.createElementBlock("div",lu,[t.createElementVNode("div",du,[n[47]||(n[47]=t.createElementVNode("h3",null,"连线配置",-1)),t.createElementVNode("button",{class:"close-btn",onClick:n[0]||(n[0]=o=>e.$emit("close")),title:"关闭"},"×")]),t.createElementVNode("div",cu,[t.createElementVNode("div",uu,[n[48]||(n[48]=t.createElementVNode("h4",null,"路径类型",-1)),t.createElementVNode("div",fu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.pathTypes,o=>(t.openBlock(),t.createElementBlock("label",{key:o.value,class:t.normalizeClass(["path-type-option",{active:e.config.pathType===o.value}])},[t.withDirectives(t.createElementVNode("input",{type:"radio",value:o.value,"onUpdate:modelValue":l=>e.config.pathType=l,onChange:n[1]||(n[1]=(...l)=>e.updateConfig&&e.updateConfig(...l))},null,40,mu),[[t.vModelRadio,e.config.pathType]]),t.createElementVNode("div",hu,[(t.openBlock(),t.createElementBlock("svg",gu,[t.createElementVNode("path",{d:o.preview,stroke:"#3498db","stroke-width":"2",fill:"none"},null,8,pu)]))]),t.createElementVNode("span",null,t.toDisplayString(o.name),1)],2))),128))])]),t.createElementVNode("div",yu,[n[53]||(n[53]=t.createElementVNode("h4",null,"基础样式",-1)),t.createElementVNode("div",ku,[n[49]||(n[49]=t.createElementVNode("label",null,"颜色:",-1)),t.withDirectives(t.createElementVNode("input",{type:"color","onUpdate:modelValue":n[2]||(n[2]=o=>e.config.color=o),onChange:n[3]||(n[3]=(...o)=>e.updateConfig&&e.updateConfig(...o)),class:"color-input"},null,544),[[t.vModelText,e.config.color]])]),t.createElementVNode("div",bu,[n[50]||(n[50]=t.createElementVNode("label",null,"线宽:",-1)),t.withDirectives(t.createElementVNode("input",{type:"range",min:"1",max:"5",step:"0.5","onUpdate:modelValue":n[4]||(n[4]=o=>e.config.width=o),onInput:n[5]||(n[5]=(...o)=>e.updateConfig&&e.updateConfig(...o)),class:"range-input"},null,544),[[t.vModelText,e.config.width,void 0,{number:!0}]]),t.createElementVNode("span",wu,t.toDisplayString(e.config.width)+"px",1)]),t.createElementVNode("div",Cu,[n[52]||(n[52]=t.createElementVNode("label",null,"虚线样式:",-1)),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":n[6]||(n[6]=o=>e.config.dashArray=o),onChange:n[7]||(n[7]=(...o)=>e.updateConfig&&e.updateConfig(...o)),class:"select-input"},n[51]||(n[51]=[t.createElementVNode("option",{value:void 0},"实线",-1),t.createElementVNode("option",{value:"3,3"},"短虚线",-1),t.createElementVNode("option",{value:"5,5"},"中虚线",-1),t.createElementVNode("option",{value:"8,4"},"长虚线",-1),t.createElementVNode("option",{value:"2,2,8,2"},"点划线",-1)]),544),[[t.vModelSelect,e.config.dashArray]])])]),e.config.pathType==="bezier"?(t.openBlock(),t.createElementBlock("div",Su,[n[55]||(n[55]=t.createElementVNode("h4",null,"贝塞尔曲线配置",-1)),t.createElementVNode("div",vu,[n[54]||(n[54]=t.createElementVNode("label",null,"弯曲度:",-1)),t.withDirectives(t.createElementVNode("input",{type:"range",min:"0.1",max:"1",step:"0.1","onUpdate:modelValue":n[8]||(n[8]=o=>e.config.bezierCurvature=o),onInput:n[9]||(n[9]=(...o)=>e.updateConfig&&e.updateConfig(...o)),class:"range-input"},null,544),[[t.vModelText,e.config.bezierCurvature,void 0,{number:!0}]]),t.createElementVNode("span",Du,t.toDisplayString(e.config.bezierCurvature),1)])])):t.createCommentVNode("",!0),e.config.pathType==="right-angle"?(t.openBlock(),t.createElementBlock("div",Tu,[n[59]||(n[59]=t.createElementVNode("h4",null,"直角连线配置",-1)),t.createElementVNode("div",Mu,[n[56]||(n[56]=t.createElementVNode("label",null,"偏移距离:",-1)),t.withDirectives(t.createElementVNode("input",{type:"range",min:"10",max:"80",step:"5","onUpdate:modelValue":n[10]||(n[10]=o=>e.config.rightAngleOffset=o),onInput:n[11]||(n[11]=(...o)=>e.updateConfig&&e.updateConfig(...o)),class:"range-input"},null,544),[[t.vModelText,e.config.rightAngleOffset,void 0,{number:!0}]]),t.createElementVNode("span",$u,t.toDisplayString(e.config.rightAngleOffset)+"px",1)]),t.createElementVNode("div",Eu,[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[12]||(n[12]=o=>e.config.smoothCorners=o),onChange:n[13]||(n[13]=(...o)=>e.updateConfig&&e.updateConfig(...o))},null,544),[[t.vModelCheckbox,e.config.smoothCorners]]),n[57]||(n[57]=t.createTextVNode(" 平滑转角 "))])]),e.config.smoothCorners?(t.openBlock(),t.createElementBlock("div",Vu,[n[58]||(n[58]=t.createElementVNode("label",null,"转角半径:",-1)),t.withDirectives(t.createElementVNode("input",{type:"range",min:"0",max:"15",step:"1","onUpdate:modelValue":n[14]||(n[14]=o=>e.config.cornerRadius=o),onInput:n[15]||(n[15]=(...o)=>e.updateConfig&&e.updateConfig(...o)),class:"range-input"},null,544),[[t.vModelText,e.config.cornerRadius,void 0,{number:!0}]]),t.createElementVNode("span",Nu,t.toDisplayString(e.config.cornerRadius)+"px",1)])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",_u,[n[63]||(n[63]=t.createElementVNode("h4",null,"箭头配置",-1)),t.createElementVNode("div",Au,[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[16]||(n[16]=o=>e.config.showArrow=o),onChange:n[17]||(n[17]=(...o)=>e.updateConfig&&e.updateConfig(...o))},null,544),[[t.vModelCheckbox,e.config.showArrow]]),n[60]||(n[60]=t.createTextVNode(" 显示箭头 "))])]),e.config.showArrow?(t.openBlock(),t.createElementBlock("div",Lu,[t.createElementVNode("div",Bu,[n[61]||(n[61]=t.createElementVNode("label",null,"箭头大小:",-1)),t.withDirectives(t.createElementVNode("input",{type:"range",min:"4",max:"16",step:"1","onUpdate:modelValue":n[18]||(n[18]=o=>e.config.arrowSize=o),onInput:n[19]||(n[19]=(...o)=>e.updateConfig&&e.updateConfig(...o)),class:"range-input"},null,544),[[t.vModelText,e.config.arrowSize,void 0,{number:!0}]]),t.createElementVNode("span",Hu,t.toDisplayString(e.config.arrowSize)+"px",1)]),t.createElementVNode("div",Yu,[n[62]||(n[62]=t.createElementVNode("label",null,"箭头颜色:",-1)),t.withDirectives(t.createElementVNode("input",{type:"color","onUpdate:modelValue":n[20]||(n[20]=o=>e.config.arrowColor=o),onChange:n[21]||(n[21]=(...o)=>e.updateConfig&&e.updateConfig(...o)),class:"color-input",placeholder:e.config.color},null,40,Fu),[[t.vModelText,e.config.arrowColor]]),t.createElementVNode("button",{onClick:n[22]||(n[22]=o=>{e.config.arrowColor=e.config.color,e.updateConfig()}),class:"sync-btn",title:"与线条颜色同步"}," 同步 ")])])):t.createCommentVNode("",!0)]),t.createElementVNode("div",Iu,[n[67]||(n[67]=t.createElementVNode("h4",null,"虚线动画",-1)),t.createElementVNode("div",Ru,[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[23]||(n[23]=o=>e.config.enableDashAnimation=o),onChange:n[24]||(n[24]=(...o)=>e.updateConfig&&e.updateConfig(...o))},null,544),[[t.vModelCheckbox,e.config.enableDashAnimation]]),n[64]||(n[64]=t.createTextVNode(" 启用虚线流动动画 "))])]),e.config.enableDashAnimation?(t.openBlock(),t.createElementBlock("div",zu,[t.createElementVNode("div",Ou,[n[65]||(n[65]=t.createElementVNode("label",null,"动画速度:",-1)),t.withDirectives(t.createElementVNode("input",{type:"range",min:"0.2",max:"3",step:"0.2","onUpdate:modelValue":n[25]||(n[25]=o=>e.config.dashAnimationSpeed=o),onInput:n[26]||(n[26]=(...o)=>e.updateConfig&&e.updateConfig(...o)),class:"range-input"},null,544),[[t.vModelText,e.config.dashAnimationSpeed,void 0,{number:!0}]]),t.createElementVNode("span",Pu,t.toDisplayString(e.config.dashAnimationSpeed)+"s",1)]),n[66]||(n[66]=t.createElementVNode("div",{class:"config-info"},[t.createElementVNode("small",null,"💡 虚线动画只在连线设置为虚线样式时显示")],-1))])):t.createCommentVNode("",!0)]),t.createElementVNode("div",xu,[n[71]||(n[71]=t.createElementVNode("h4",null,"标签配置",-1)),t.createElementVNode("div",Gu,[t.createElementVNode("label",null,[t.withDirectives(t.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[27]||(n[27]=o=>e.config.showLabels=o),onChange:n[28]||(n[28]=(...o)=>e.updateConfig&&e.updateConfig(...o))},null,544),[[t.vModelCheckbox,e.config.showLabels]]),n[68]||(n[68]=t.createTextVNode(" 显示标签 "))])]),e.config.showLabels?(t.openBlock(),t.createElementBlock("div",qu,[t.createElementVNode("div",Uu,[n[69]||(n[69]=t.createElementVNode("label",null,"标签颜色:",-1)),t.withDirectives(t.createElementVNode("input",{type:"color","onUpdate:modelValue":n[29]||(n[29]=o=>e.config.labelColor=o),onChange:n[30]||(n[30]=(...o)=>e.updateConfig&&e.updateConfig(...o)),class:"color-input"},null,544),[[t.vModelText,e.config.labelColor]])]),t.createElementVNode("div",Wu,[n[70]||(n[70]=t.createElementVNode("label",null,"字体大小:",-1)),t.withDirectives(t.createElementVNode("input",{type:"range",min:"8",max:"16",step:"1","onUpdate:modelValue":n[31]||(n[31]=o=>e.config.labelFontSize=o),onInput:n[32]||(n[32]=(...o)=>e.updateConfig&&e.updateConfig(...o)),class:"range-input"},null,544),[[t.vModelText,e.config.labelFontSize,void 0,{number:!0}]]),t.createElementVNode("span",Zu,t.toDisplayString(e.config.labelFontSize)+"px",1)])])):t.createCommentVNode("",!0)]),t.createElementVNode("div",Ju,[n[76]||(n[76]=t.createElementVNode("h4",null,"父子关系样式",-1)),t.createElementVNode("div",ju,[n[72]||(n[72]=t.createElementVNode("label",null,"颜色:",-1)),t.withDirectives(t.createElementVNode("input",{type:"color","onUpdate:modelValue":n[33]||(n[33]=o=>e.config.parentChildStyle.color=o),onChange:n[34]||(n[34]=(...o)=>e.updateConfig&&e.updateConfig(...o)),class:"color-input"},null,544),[[t.vModelText,e.config.parentChildStyle.color]])]),t.createElementVNode("div",Ku,[n[73]||(n[73]=t.createElementVNode("label",null,"线宽:",-1)),t.withDirectives(t.createElementVNode("input",{type:"range",min:"1",max:"3",step:"0.5","onUpdate:modelValue":n[35]||(n[35]=o=>e.config.parentChildStyle.width=o),onInput:n[36]||(n[36]=(...o)=>e.updateConfig&&e.updateConfig(...o)),class:"range-input"},null,544),[[t.vModelText,e.config.parentChildStyle.width,void 0,{number:!0}]]),t.createElementVNode("span",Qu,t.toDisplayString(e.config.parentChildStyle.width)+"px",1)]),t.createElementVNode("div",Xu,[n[75]||(n[75]=t.createElementVNode("label",null,"虚线样式:",-1)),t.withDirectives(t.createElementVNode("select",{"onUpdate:modelValue":n[37]||(n[37]=o=>e.config.parentChildStyle.dashArray=o),onChange:n[38]||(n[38]=(...o)=>e.updateConfig&&e.updateConfig(...o)),class:"select-input"},n[74]||(n[74]=[t.createElementVNode("option",{value:void 0},"实线",-1),t.createElementVNode("option",{value:"3,3"},"短虚线",-1),t.createElementVNode("option",{value:"5,5"},"中虚线",-1),t.createElementVNode("option",{value:"8,4"},"长虚线",-1)]),544),[[t.vModelSelect,e.config.parentChildStyle.dashArray]])])]),t.createElementVNode("div",ef,[n[77]||(n[77]=t.createElementVNode("h4",null,"预设主题",-1)),t.createElementVNode("div",tf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.themes,(o,l)=>(t.openBlock(),t.createElementBlock("button",{key:l,onClick:h=>e.applyTheme(l),class:t.normalizeClass(["theme-btn",{active:e.isCurrentTheme(l)}])},t.toDisplayString(e.getThemeName(l)),11,nf))),128))])]),t.createElementVNode("div",af,[t.createElementVNode("div",of,[t.createElementVNode("button",{onClick:n[39]||(n[39]=(...o)=>e.resetConfig&&e.resetConfig(...o)),class:"reset-btn"},"重置为默认"),t.createElementVNode("button",{onClick:n[40]||(n[40]=(...o)=>e.exportConfig&&e.exportConfig(...o)),class:"export-btn"},"导出配置"),t.createElementVNode("button",{onClick:n[41]||(n[41]=o=>e.showImportDialog=!0),class:"import-btn"},"导入配置")])])]),e.showImportDialog?(t.openBlock(),t.createElementBlock("div",{key:0,class:"import-dialog-overlay",onClick:n[46]||(n[46]=o=>e.showImportDialog=!1)},[t.createElementVNode("div",{class:"import-dialog",onClick:n[45]||(n[45]=t.withModifiers(()=>{},["stop"]))},[n[78]||(n[78]=t.createElementVNode("h4",null,"导入配置",-1)),t.withDirectives(t.createElementVNode("textarea",{"onUpdate:modelValue":n[42]||(n[42]=o=>e.importText=o),placeholder:"粘贴配置JSON...",class:"import-textarea"},null,512),[[t.vModelText,e.importText]]),t.createElementVNode("div",rf,[t.createElementVNode("button",{onClick:n[43]||(n[43]=(...o)=>e.importConfig&&e.importConfig(...o)),class:"confirm-btn"},"导入"),t.createElementVNode("button",{onClick:n[44]||(n[44]=o=>e.showImportDialog=!1),class:"cancel-btn"},"取消")])])])):t.createCommentVNode("",!0)])}const lf=Oe(iu,[["render",sf],["__scopeId","data-v-f8062a27"]]),df=e=>{e.component("Gantt",Tn),e.component("Vue3Gantt",Tn)},cf="1.0.0";ve.DatePicker=Qn,ve.Gantt=Tn,ve.GanttConfigPanel=ia,ve.GanttThemeSelector=su,ve.LanguageSelector=sa,ve.LinkConfigPanel=lf,ve.LinkPathType=Ue,ve.LinkThemes=gt,ve.LinkType=me,ve.TaskType=Yt,ve.default=Tn,ve.detectBrowserLocale=Vn,ve.ganttThemes=Qe,ve.install=df,ve.linkDataManager=hn,ve.mutations=fe,ve.setLocale=Kn,ve.store=S,ve.useI18n=et,ve.useLinkConfig=Ft,ve.version=cf,Object.defineProperties(ve,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
123
139
|
//# sourceMappingURL=vue3-gantt.umd.js.map
|