@lee576/vue3-gantt 1.0.2 → 1.0.3
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 +4769 -4242
- package/dist/vue3-gantt.es.js.map +1 -1
- package/dist/vue3-gantt.umd.js +84 -84
- package/dist/vue3-gantt.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/vue3-gantt.umd.js
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
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
|
-
C ${
|
|
3
|
-
C ${b-
|
|
4
|
-
L ${
|
|
5
|
-
Q ${
|
|
6
|
-
L ${
|
|
7
|
-
Q ${
|
|
8
|
-
L ${b} ${
|
|
9
|
-
L ${
|
|
10
|
-
L ${
|
|
11
|
-
L ${b} ${
|
|
12
|
-
L ${
|
|
13
|
-
Q ${
|
|
14
|
-
L ${
|
|
15
|
-
Q ${
|
|
16
|
-
L ${
|
|
17
|
-
Q ${
|
|
18
|
-
L ${
|
|
19
|
-
Q ${
|
|
20
|
-
L ${b} ${
|
|
21
|
-
L ${
|
|
22
|
-
L ${
|
|
23
|
-
L ${
|
|
24
|
-
L ${
|
|
25
|
-
L ${b} ${
|
|
26
|
-
C ${
|
|
27
|
-
C ${b-
|
|
28
|
-
C ${
|
|
29
|
-
C ${
|
|
30
|
-
C ${
|
|
31
|
-
C ${
|
|
32
|
-
L ${
|
|
33
|
-
Q ${
|
|
34
|
-
L ${
|
|
35
|
-
Q ${
|
|
36
|
-
L ${
|
|
37
|
-
Q ${
|
|
38
|
-
L ${
|
|
39
|
-
Q ${
|
|
40
|
-
L ${b} ${
|
|
41
|
-
L ${
|
|
42
|
-
L ${
|
|
43
|
-
L ${
|
|
44
|
-
L ${
|
|
45
|
-
L ${b} ${
|
|
46
|
-
L ${
|
|
47
|
-
Q ${
|
|
48
|
-
L ${
|
|
49
|
-
Q ${
|
|
50
|
-
L ${b} ${
|
|
51
|
-
L ${
|
|
52
|
-
Q ${
|
|
53
|
-
L ${
|
|
54
|
-
Q ${
|
|
55
|
-
L ${b} ${
|
|
56
|
-
L ${
|
|
57
|
-
Q ${
|
|
58
|
-
L ${
|
|
59
|
-
Q ${
|
|
60
|
-
L ${b} ${
|
|
61
|
-
L ${
|
|
62
|
-
Q ${
|
|
63
|
-
L ${
|
|
64
|
-
Q ${
|
|
65
|
-
L ${b} ${
|
|
66
|
-
L ${
|
|
67
|
-
Q ${
|
|
68
|
-
L ${
|
|
69
|
-
Q ${
|
|
70
|
-
L ${b} ${
|
|
71
|
-
L ${
|
|
72
|
-
Q ${
|
|
73
|
-
L ${
|
|
74
|
-
Q ${
|
|
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(Se,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):(Se=typeof globalThis<"u"?globalThis:Se||self,e(Se.Vue3Gantt={},Se.Vue,Se.dayjs,Se.SVG,Se.interact))})(this,function(Se,e,p,gn,Ze){"use strict";var Xu=Object.defineProperty;var ef=(Se,e,p)=>e in Se?Xu(Se,e,{enumerable:!0,configurable:!0,writable:!0,value:p}):Se[e]=p;var at=(Se,e,p)=>ef(Se,typeof e!="symbol"?e+"":e,p);function qt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Gt={exports:{}},da=Gt.exports,En;function ca(){return En||(En=1,function(t,n){(function(a,r){t.exports=r()})(da,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]+/,f={},d=function(c){return(c=+c)+(c>68?1900:2e3)},g=function(c){return function(O){this[c]=+O}},m=[/[+-]\d\d:?(\d\d)?|Z/,function(c){(this.zone||(this.zone={})).offset=function(O){if(!O||O==="Z")return 0;var v=O.match(/([+-]|\d\d)/g),E=60*v[1]+(+v[2]||0);return E===0?0:v[0]==="+"?-E:E}(c)}],w=function(c){var O=f[c];return O&&(O.indexOf?O:O.s.concat(O.f))},I=function(c,O){var v,E=f.meridiem;if(E){for(var V=1;V<=24;V+=1)if(c.indexOf(E(V,0,O))>-1){v=V>12;break}}else v=c===(O?"pm":"PM");return v},k={A:[l,function(c){this.afternoon=I(c,!1)}],a:[l,function(c){this.afternoon=I(c,!0)}],Q:[s,function(c){this.month=3*(c-1)+1}],S:[s,function(c){this.milliseconds=100*+c}],SS:[i,function(c){this.milliseconds=10*+c}],SSS:[/\d{3}/,function(c){this.milliseconds=+c}],s:[o,g("seconds")],ss:[o,g("seconds")],m:[o,g("minutes")],mm:[o,g("minutes")],H:[o,g("hours")],h:[o,g("hours")],HH:[o,g("hours")],hh:[o,g("hours")],D:[o,g("day")],DD:[i,g("day")],Do:[l,function(c){var O=f.ordinal,v=c.match(/\d+/);if(this.day=v[0],O)for(var E=1;E<=31;E+=1)O(E).replace(/\[|\]/g,"")===c&&(this.day=E)}],w:[o,g("week")],ww:[i,g("week")],M:[o,g("month")],MM:[i,g("month")],MMM:[l,function(c){var O=w("months"),v=(w("monthsShort")||O.map(function(E){return E.slice(0,3)})).indexOf(c)+1;if(v<1)throw new Error;this.month=v%12||v}],MMMM:[l,function(c){var O=w("months").indexOf(c)+1;if(O<1)throw new Error;this.month=O%12||O}],Y:[/[+-]?\d+/,g("year")],YY:[i,function(c){this.year=d(c)}],YYYY:[/\d{4}/,g("year")],Z:m,ZZ:m};function _(c){var O,v;O=c,v=f&&f.formats;for(var E=(c=O.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(Y,q,te){var le=te&&te.toUpperCase();return q||v[te]||a[te]||v[le].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(Ce,y,u){return y||u.slice(1)})})).match(r),V=E.length,C=0;C<V;C+=1){var K=E[C],oe=k[K],Q=oe&&oe[0],se=oe&&oe[1];E[C]=se?{regex:Q,parser:se}:K.replace(/^\[|\]$/g,"")}return function(Y){for(var q={},te=0,le=0;te<V;te+=1){var Ce=E[te];if(typeof Ce=="string")le+=Ce.length;else{var y=Ce.regex,u=Ce.parser,b=Y.slice(le),h=y.exec(b)[0];u.call(q,h),Y=Y.replace(h,"")}}return function(D){var H=D.afternoon;if(H!==void 0){var L=D.hours;H?L<12&&(D.hours+=12):L===12&&(D.hours=0),delete D.afternoon}}(q),q}}return function(c,O,v){v.p.customParseFormat=!0,c&&c.parseTwoDigitYear&&(d=c.parseTwoDigitYear);var E=O.prototype,V=E.parse;E.parse=function(C){var K=C.date,oe=C.utc,Q=C.args;this.$u=oe;var se=Q[1];if(typeof se=="string"){var Y=Q[2]===!0,q=Q[3]===!0,te=Y||q,le=Q[2];q&&(le=Q[2]),f=this.$locale(),!Y&&le&&(f=v.Ls[le]),this.$d=function(b,h,D,H){try{if(["x","X"].indexOf(h)>-1)return new Date((h==="X"?1e3:1)*b);var L=_(h)(b),F=L.year,Z=L.month,U=L.day,j=L.hours,ee=L.minutes,ie=L.seconds,de=L.milliseconds,$e=L.zone,$=L.week,M=new Date,ne=U||(F||Z?1:M.getDate()),P=F||M.getFullYear(),X=0;F&&!Z||(X=Z>0?Z-1:M.getMonth());var ke,Ne=j||0,Te=ee||0,Ve=ie||0,_e=de||0;return $e?new Date(Date.UTC(P,X,ne,Ne,Te,Ve,_e+60*$e.offset*1e3)):D?new Date(Date.UTC(P,X,ne,Ne,Te,Ve,_e)):(ke=new Date(P,X,ne,Ne,Te,Ve,_e),$&&(ke=H(ke).week($).toDate()),ke)}catch{return new Date("")}}(K,se,oe,v),this.init(),le&&le!==!0&&(this.$L=this.locale(le).$L),te&&K!=this.format(se)&&(this.$d=new Date("")),f={}}else if(se instanceof Array)for(var Ce=se.length,y=1;y<=Ce;y+=1){Q[1]=se[y-1];var u=v.apply(this,Q);if(u.isValid()){this.$d=u.$d,this.$L=u.$L,this.init();break}y===Ce&&(this.$d=new Date(""))}else V.call(this,C)}}})}(Gt)),Gt.exports}var ua=ca();const fa=qt(ua);var Wt={exports:{}},ha=Wt.exports,Vn;function ma(){return Vn||(Vn=1,function(t,n){(function(a,r){t.exports=r()})(ha,function(){var a="month",r="quarter";return function(s,i){var o=i.prototype;o.quarter=function(d){return this.$utils().u(d)?Math.ceil((this.month()+1)/3):this.month(this.month()%3+3*(d-1))};var l=o.add;o.add=function(d,g){return d=Number(d),this.$utils().p(g)===r?this.add(3*d,a):l.bind(this)(d,g)};var f=o.startOf;o.startOf=function(d,g){var m=this.$utils(),w=!!m.u(g)||g;if(m.p(d)===r){var I=this.quarter()-1;return w?this.month(3*I).startOf(a).startOf("day"):this.month(3*I+2).endOf(a).endOf("day")}return f.bind(this)(d,g)}}})}(Wt)),Wt.exports}var pa=ma();const ga=qt(pa);var Zt={exports:{}},ya=Zt.exports,Nn;function ka(){return Nn||(Nn=1,function(t,n){(function(a,r){t.exports=r(p)})(ya,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 f=100*o+l;return f<600?"凌晨":f<900?"早上":f<1100?"上午":f<1300?"中午":f<1800?"下午":"晚上"}};return s.default.locale(i,null,!0),i})}(Zt)),Zt.exports}ka();var Ut={exports:{}},ba=Ut.exports,_n;function wa(){return _n||(_n=1,function(t,n){(function(a,r){t.exports=r(p)})(ba,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 f=100*o+l;return f<600?"凌晨":f<900?"早上":f<1100?"上午":f<1300?"中午":f<1800?"下午":"晚上"}};return s.default.locale(i,null,!0),i})}(Ut)),Ut.exports}wa();var jt={exports:{}},Ca=jt.exports,An;function Sa(){return An||(An=1,function(t,n){(function(a,r){t.exports=r()})(Ca,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])+"]"}}})}(jt)),jt.exports}Sa();var Jt={exports:{}},va=Jt.exports,Ln;function Ta(){return Ln||(Ln=1,function(t,n){(function(a,r){t.exports=r(p)})(va,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})}(Jt)),Jt.exports}Ta();var Kt={exports:{}},Da=Kt.exports,Bn;function Ma(){return Bn||(Bn=1,function(t,n){(function(a,r){t.exports=r(p)})(Da,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})}(Kt)),Kt.exports}Ma();var Qt={exports:{}},$a=Qt.exports,Hn;function Ea(){return Hn||(Hn=1,function(t,n){(function(a,r){t.exports=r(p)})($a,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})}(Qt)),Qt.exports}Ea();var Xt={exports:{}},Va=Xt.exports,Yn;function Na(){return Yn||(Yn=1,function(t,n){(function(a,r){t.exports=r(p)})(Va,function(a){function r(f){return f&&typeof f=="object"&&"default"in f?f:{default:f}}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(f,d,g){var m=i[g];return Array.isArray(m)&&(m=m[d?0:1]),m.replace("%d",f)}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(f){return f+"."},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})}(Xt)),Xt.exports}Na();var en={exports:{}},_a=en.exports,Fn;function Aa(){return Fn||(Fn=1,function(t,n){(function(a,r){t.exports=r(p)})(_a,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})}(en)),en.exports}Aa();var tn={exports:{}},La=tn.exports,In;function Ba(){return In||(In=1,function(t,n){(function(a,r){t.exports=r(p)})(La,function(a){function r(k){return k&&typeof k=="object"&&"default"in k?k:{default:k}}var s=r(a),i="января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),o="январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),l="янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),f="янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"),d=/D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;function g(k,_,c){var O,v;return c==="m"?_?"минута":"минуту":k+" "+(O=+k,v={mm:_?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[c].split("_"),O%10==1&&O%100!=11?v[0]:O%10>=2&&O%10<=4&&(O%100<10||O%100>=20)?v[1]:v[2])}var m=function(k,_){return d.test(_)?i[k.month()]:o[k.month()]};m.s=o,m.f=i;var w=function(k,_){return d.test(_)?l[k.month()]:f[k.month()]};w.s=f,w.f=l;var I={name:"ru",weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_сбт".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),months:m,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:g,mm:g,h:"час",hh:g,d:"день",dd:g,M:"месяц",MM:g,y:"год",yy:g},ordinal:function(k){return k},meridiem:function(k){return k<4?"ночи":k<12?"утра":k<17?"дня":"вечера"}};return s.default.locale(I,null,!0),I})}(tn)),tn.exports}Ba();const Ha=Symbol("SetBarColor"),Ya=Symbol("SetTaskType"),Fa=Symbol("AddRootTask"),gt={SetBarColorSymbol:Ha,SetTaskTypeSymbol:Ya,AddRootTaskSymbol:Fa};var Tt=(t=>(t.TASK="task",t.PROJECT="project",t.MILESTONE="milestone",t))(Tt||{}),ge=(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))(ge||{}),Ye=(t=>(t.STRAIGHT="straight",t.BEZIER="bezier",t.RIGHT_ANGLE="right-angle",t))(Ye||{});const ot={default:{color:"#3498db",width:2,dashArray:void 0,showArrow:!0,arrowColor:void 0,arrowSize:8,showLabels:!1,labelColor:"#666",labelFontSize:12,cornerRadius:5,pathType:Ye.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:Ye.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:Ye.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:Ye.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:Ye.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}}},zn={[ge.FINISH_TO_START]:{name:"完成-开始",description:"前置任务完成后,后续任务才能开始",color:"#3498db",priority:1},[ge.START_TO_START]:{name:"开始-开始",description:"两个任务同时开始",color:"#2ecc71",priority:2},[ge.FINISH_TO_FINISH]:{name:"完成-完成",description:"两个任务同时完成",color:"#e74c3c",priority:3},[ge.START_TO_FINISH]:{name:"开始-完成",description:"前置任务开始后,后续任务才能完成",color:"#f39c12",priority:4},[ge.PARENT_CHILD]:{name:"父子关系",description:"显示任务的层级关系",color:"#95a5a6",priority:0}};function nn(t){return JSON.parse(JSON.stringify(t))}class Ia{constructor(){at(this,"config");at(this,"STORAGE_KEY","gantt-link-config");this.config=e.reactive(nn(ot.default)),this.loadFromStorage()}deepMergeConfig(n){if(this.config.linkTypeVisibility||(this.config.linkTypeVisibility=nn(ot.default.linkTypeVisibility)),this.config.linkTypeColors||(this.config.linkTypeColors=nn(ot.default.linkTypeColors)),this.config.parentChildStyle||(this.config.parentChildStyle=nn(ot.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({...ot[n]}),this.saveToStorage()}updateConfig(n){this.deepMergeConfig(n),this.saveToStorage()}reset(){this.deepMergeConfig({...ot.default}),this.saveToStorage()}getLinkStyle(n){const a=zn[n];return n===ge.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 Re=new Ia;function Dt(){return{config:Re.getConfig(),setTheme:Re.setTheme.bind(Re),updateConfig:Re.updateConfig.bind(Re),reset:Re.reset.bind(Re),getLinkStyle:Re.getLinkStyle.bind(Re),exportConfig:Re.exportConfig.bind(Re),importConfig:Re.importConfig.bind(Re),clearStorage:Re.clearStorage.bind(Re),themes:ot,linkTypes:zn}}class za{constructor(){at(this,"dependencies",e.reactive([]));at(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 f=this.dependencies.filter(d=>d.sourceTaskId===l);for(const d of f)if(i(d.targetTaskId))return!0;return s.delete(l),!1};this.dependencies.push({id:"temp",sourceTaskId:n,targetTaskId:a,type:ge.FINISH_TO_START});const o=i(n);return this.dependencies.pop(),o}}const an=new za,yn={"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:"半天"},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:"半天"},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"},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:"半日"},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:"반나절"},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"},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"},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"},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:"Полдня"},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 kn(){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-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[t])return n[t];const a=t.split("-")[0];return n[a]?n[a]:"en-US"}const yt=e.ref("zh-CN"),bn=localStorage.getItem("gantt-locale");bn&&yn[bn]?yt.value=bn:yt.value=kn();function Ra(t){const n=t.split(".");let a=yn[yt.value];for(const r of n)if(a&&typeof a=="object")a=a[r];else return t;return typeof a=="string"?a:t}function Rn(t){yn[t]&&(yt.value=t,localStorage.setItem("gantt-locale",t))}function Oa(){return yt.value}function Pa(){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 Ge(){return{locale:e.computed(()=>yt.value),t:Ra,setLocale:Rn,getLocale:Oa,getLocales:Pa,detectBrowserLocale:kn}}const xe=[{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%)"}}],mt=class mt{constructor(){at(this,"currentTheme","metro");at(this,"storageKey","gantt-theme");at(this,"ganttContainer",null)}static getInstance(){return mt.instance||(mt.instance=new mt),mt.instance}setGanttContainer(n){this.ganttContainer=n,this.loadTheme()}getCurrentTheme(){return this.currentTheme}setTheme(n){const a=xe.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&&xe.find(r=>r.id===n)&&(this.currentTheme=n);const a=xe.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 xe}getThemeInfo(n){return xe.find(a=>a.id===n)}previewTheme(n){const a=xe.find(r=>r.id===n);a&&this.applyTheme(a)}cancelPreview(){const n=xe.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&&xe.find(r=>r.id===a.currentTheme)?(this.setTheme(a.currentTheme),!0):!1}catch(a){return console.error("Failed to import theme config:",a),!1}}};at(mt,"instance");let wn=mt;const Oe=wn.getInstance(),xa=e.defineComponent({props:{date:{type:String,required:!0},minDate:String,maxDate:String},emits:["confirm","clear"],setup(t,{emit:n}){const{t:a,locale:r}=Ge(),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=e.computed(()=>{const N=s();return Array.from({length:7},(G,me)=>p().day(me+1).locale(N).format("dd"))}),o=N=>p().month(N-1).locale(s()).format("MMMM"),l=e.ref(!1),f=e.ref(!1),d=e.ref(!1),g=e.ref(""),m=e.ref(0),w=e.ref("fadeX_Prev"),I=e.ref(!1),k=e.ref(!1),_=e.ref(null),c=e.ref(null),O=e.ref(null),v=e.ref(null),E=e.ref(0),V=e.ref(0),C=e.ref(Oe.getCurrentTheme()),K=e.ref(-1),oe=e.ref(-1),Q=e.ref({row:-1,col:-1}),se=e.ref(new Date().getFullYear()),Y=e.ref(new Date().getMonth()+1),q=e.ref(new Date().getFullYear()),te=e.ref(new Date().getMonth()+1),le=e.ref(new Date().getDate()),Ce=e.ref(1970),y=e.ref(1),u=e.ref(1),b=e.ref(2099),h=e.ref(12),D=e.ref(31),H=N=>{if(!N)return null;const G=N.split("-");if(G.length!==3)return null;const me=parseInt(G[0],10),De=parseInt(G[1],10),Be=parseInt(G[2],10);return isNaN(me)||isNaN(De)||isNaN(Be)?null:{year:me,month:De,day:Be}},L=N=>N>9?String(N):`0${N}`,F=e.computed(()=>({year:se.value,month:Y.value,monthStr:o(Y.value)})),Z=e.computed(()=>({year:q.value,month:te.value,day:le.value})),U=e.computed(()=>{const N=[];for(let G=Ce.value;G<=b.value;G++)N.push(G);return N}),j=e.computed(()=>Array.from({length:12},(N,G)=>G+1)),ee=e.computed(()=>({position:"fixed",top:`${E.value}px`,left:`${V.value}px`,zIndex:100002})),ie=()=>se.value<Ce.value||se.value===Ce.value&&Y.value<=y.value,de=()=>se.value>b.value||se.value===b.value&&Y.value>=h.value,$e=e.computed(()=>{m.value;const N=se.value,G=Y.value,me=new Date(N,G,0).getDate(),De=[];let Be=[];for(let Ie=1;Ie<=me;Ie++){const pt=new Date(N,G-1,Ie).getDay(),Pt=pt===0?7:pt;if(Ie===1&&Pt>1)for(let xt=1;xt<Pt;xt++)Be.push({value:""});const Qu=N===q.value&&G===te.value&&Ie===le.value;let $n=!1;if(N===Ce.value&&G===y.value&&Ie<u.value&&($n=!0),N===b.value&&G===h.value&&Ie>D.value&&($n=!0),Be.push({value:Ie,selected:Qu,disabled:$n}),Ie===me&&Pt<7)for(let xt=Pt;xt<7;xt++)Be.push({value:""});(Pt===7||Ie===me)&&(De.push(Be),Be=[])}return De}),$=()=>{const N=H(t.date);if(N)se.value=N.year,Y.value=N.month,q.value=N.year,te.value=N.month,le.value=N.day;else{const De=new Date;se.value=De.getFullYear(),Y.value=De.getMonth()+1,q.value=De.getFullYear(),te.value=De.getMonth()+1,le.value=De.getDate()}const G=H(t.minDate||"1970-01-01");G&&(Ce.value=G.year,y.value=G.month,u.value=G.day);const me=H(t.maxDate||"2099-12-31");me&&(b.value=me.year,h.value=me.month,D.value=me.day),M()},M=()=>{const N=`${q.value}-${L(te.value)}-${L(le.value)}`,G=s(),me=a("dateFormat.full");g.value=p(N).locale(G).format(me)},ne=N=>{se.value=N,f.value=!1,d.value=!1,m.value++},P=N=>{Y.value=N,f.value=!1,d.value=!1,m.value++},X=N=>{if(N.disabled||N.value==="")return;q.value=se.value,te.value=Y.value,le.value=N.value,M(),l.value=!1;const G=new Date(q.value,te.value-1,le.value).getDay(),me=G===0?7:G,De=s(),Be=p(`${q.value}-${te.value}-${le.value}`).locale(De).format("dddd");n("confirm",{date:`${q.value}-${L(te.value)}-${L(le.value)}`,year:q.value,month:te.value,day:le.value,week:me,weekStr:Be,monthStr:o(te.value)})},ke=()=>{I.value||ie()||(I.value=!0,setTimeout(()=>I.value=!1,300),w.value="fadeX_Prev",Y.value<=1?(se.value--,Y.value=12):Y.value--,m.value++)},Ne=()=>{k.value||de()||(k.value=!0,setTimeout(()=>k.value=!1,300),w.value="fadeX_Next",Y.value>=12?(se.value++,Y.value=1):Y.value++,m.value++)},Te=()=>{if(f.value=!f.value,d.value=!1,f.value&&O.value){const N=U.value.indexOf(q.value);setTimeout(()=>{O.value&&(O.value.scrollTop=Math.max(0,N-3)*40)},0)}},Ve=()=>{if(d.value=!d.value,f.value=!1,d.value&&v.value){const N=te.value-1;setTimeout(()=>{v.value&&(v.value.scrollTop=Math.max(0,N-3)*40)},0)}},_e=()=>{f.value=!1},Ee=()=>{if(c.value){const N=c.value.getBoundingClientRect();E.value=N.bottom+5,V.value=N.left}l.value=!0,setTimeout(()=>{C.value=Oe.getCurrentTheme(),he(C.value)},0)},Le=()=>{g.value="",l.value=!1,n("clear")},he=N=>{if(!_.value)return;const G=Oe.getThemeInfo(N);G&&(_.value.setAttribute("data-gantt-theme",N),Object.entries(G.cssVariables).forEach(([me,De])=>{_.value.style.setProperty(me,De)}))},Fe=N=>{_.value&&c.value&&!_.value.contains(N.target)&&!c.value.contains(N.target)&&(l.value=!1)},T=N=>K.value===N,J=N=>oe.value===N,pe=(N,G)=>Q.value.row===G&&Q.value.col===N,x=N=>K.value=N,z=()=>K.value=-1,B=N=>oe.value=N,re=()=>oe.value=-1,Me=(N,G)=>Q.value={row:G,col:N},be=()=>Q.value={row:-1,col:-1};return e.onBeforeMount(()=>$()),e.watch(()=>t.date,()=>$()),e.watch(()=>t.minDate,()=>$()),e.watch(()=>t.maxDate,()=>$()),e.watch(()=>r.value,()=>{g.value&&M(),m.value++}),e.onMounted(()=>{document.addEventListener("click",Fe);const N=setInterval(()=>{const G=Oe.getCurrentTheme();G!==C.value&&(C.value=G,he(G))},100);e.onUnmounted(()=>clearInterval(N))}),e.onUnmounted(()=>document.removeEventListener("click",Fe)),{t:a,locale:r,getWeekNames:i,getMonthName:o,selectDate:Z,showDate:F,copyMinDate:e.computed(()=>({year:Ce.value,month:y.value,day:u.value})),copyMaxDate:e.computed(()=>({year:b.value,month:h.value,day:D.value})),fadeXType:w,nextMonthClick:k,prevMonthClick:I,keepDoubleDigit:L,showYear:f,updateKey:m,yearList:U,rows:$e,yearListRef:O,prevMonth:ke,nextMonth:Ne,selectDay:X,selectYear:ne,openYearList:Te,openMonthList:Ve,monthList:j,monthListRef:v,showMonth:d,selectMonth:P,openCalendarList:_e,showCalendar:l,openCalendar:Ee,selectedDateText:g,clearDate:Le,calendarRef:_,inputRef:c,calendarPosition:ee,isYearHovered:T,isMonthHovered:J,isDayHovered:pe,handleYearMouseEnter:x,handleYearMouseLeave:z,handleMonthMouseEnter:B,handleMonthMouseLeave:re,handleDayMouseEnter:Me,handleDayMouseLeave:be}}}),Ae=(t,n)=>{const a=t.__vccOpts||t;for(const[r,s]of n)a[r]=s;return a},qa={class:"date-picker-input-wrapper"},Ga=["placeholder"],Wa={class:"e-date-select"},Za={class:"e-date-year"},Ua={class:"e-date-monthday"},ja={class:"e-calendar-container"},Ja={class:"e-calendar-toolbar"},Ka={key:0,class:"e-calendar-svg-cover"},Qa={class:"e-calendar-toolbar-title"},Xa={key:0,class:"e-calendar-svg-cover"},eo={class:"e-calendar-week"},to={class:"e-calendar-monthday"},no=["onClick","onMouseenter"],ao=["textContent"],oo={key:0,class:"e-calendar-monthday-row-day-cover"},ro={class:"e-calendar-year",ref:"yearListRef"},so=["onClick","onMouseenter"],io={class:"e-calendar-year",ref:"monthListRef"},lo=["onClick","onMouseenter"];function co(t,n,a,r,s,i){return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",qa,[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":n[0]||(n[0]=o=>t.selectedDateText=o),onClick:n[1]||(n[1]=(...o)=>t.openCalendar&&t.openCalendar(...o)),readonly:"",placeholder:t.t("datePicker.selectDate"),class:"date-picker-input",ref:"inputRef"},null,8,Ga),[[e.vModelText,t.selectedDateText]]),t.selectedDateText?(e.openBlock(),e.createElementBlock("span",{key:0,class:"clear-date-button",onClick:n[2]||(n[2]=(...o)=>t.clearDate&&t.clearDate(...o))},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",Wa,[e.createElementVNode("div",Za,[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]=(...o)=>t.openYearList&&t.openYearList(...o))},e.toDisplayString(t.showDate.year),3))]),_:1})]),e.createElementVNode("div",Ua,[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]=(...o)=>t.openCalendarList&&t.openCalendarList(...o))},[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]=(...o)=>t.openMonthList&&t.openMonthList(...o))},e.toDisplayString(t.showDate.monthStr),1)],2))]),_:1})])]),e.withDirectives(e.createElementVNode("div",ja,[e.createElementVNode("div",Ja,[e.createElementVNode("div",{class:"e-calendar-svg",onClick:n[6]||(n[6]=(...o)=>t.prevMonth&&t.prevMonth(...o))},[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",Ka)):e.createCommentVNode("",!0)]),_:1})]),e.createElementVNode("div",Qa,[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]=(...o)=>t.openMonthList&&t.openMonthList(...o))},e.toDisplayString(t.showDate.monthStr),1)]))]),_:1},8,["name"])]),e.createElementVNode("div",{class:"e-calendar-svg",onClick:n[8]||(n[8]=(...o)=>t.nextMonth&&t.nextMonth(...o))},[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",Xa)):e.createCommentVNode("",!0)]),_:1})])]),e.createElementVNode("div",eo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.getWeekNames,(o,l)=>(e.openBlock(),e.createElementBlock("span",{key:l,class:"e-calendar-week-day"},e.toDisplayString(o),1))),128))]),e.createElementVNode("div",to,[(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,(o,l)=>(e.openBlock(),e.createElementBlock("div",{key:l,class:"e-calendar-monthday-row"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,(f,d)=>(e.openBlock(),e.createElementBlock("span",{key:d,class:e.normalizeClass(["e-calendar-monthday-row-day",{active:f.selected,disabled:f.disabled,pointer:f.value!=="",hover:t.isDayHovered(d,l)}]),onClick:g=>t.selectDay(f),onMouseenter:g=>t.handleDayMouseEnter(d,l),onMouseleave:n[9]||(n[9]=g=>t.handleDayMouseLeave())},[e.createElementVNode("span",{textContent:e.toDisplayString(f.value),class:"e-calendar-monthday-row-day-value"},null,8,ao),e.createVNode(e.Transition,{name:"e_calendar_day"},{default:e.withCtx(()=>[f.selected?(e.openBlock(),e.createElementBlock("span",oo)):e.createCommentVNode("",!0)]),_:2},1024)],42,no))),128))]))),128))]))])],512),[[e.vShow,!t.showYear&&!t.showMonth]]),e.withDirectives(e.createElementVNode("ul",ro,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.yearList,(o,l)=>(e.openBlock(),e.createElementBlock("li",{key:l,class:e.normalizeClass({active:o===t.selectDate.year,hover:t.isYearHovered(l)}),onClick:f=>t.selectYear(o),onMouseenter:f=>t.handleYearMouseEnter(l),onMouseleave:n[10]||(n[10]=f=>t.handleYearMouseLeave())},e.toDisplayString(o),43,so))),128))],512),[[e.vShow,t.showYear]]),e.withDirectives(e.createElementVNode("ul",io,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.monthList,(o,l)=>(e.openBlock(),e.createElementBlock("li",{key:l,class:e.normalizeClass({active:o===t.selectDate.month,hover:t.isMonthHovered(l)}),onClick:f=>t.selectMonth(o),onMouseenter:f=>t.handleMonthMouseEnter(l),onMouseleave:n[11]||(n[11]=f=>t.handleMonthMouseLeave())},e.toDisplayString(t.getMonthName(o)),43,lo))),128))],512),[[e.vShow,t.showMonth]])],4),[[e.vShow,t.showCalendar]])]))])}const On=Ae(xa,[["render",co],["__scopeId","data-v-49f102c9"]]),uo=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 a=e.ref(null),r=e.ref(null),s=e.ref(0),i=e.ref("");const o=e.ref(Oe.getCurrentTheme()),l=e.computed(()=>t.direction==="row"?"width":"height"),f=e.computed(()=>{var oe;const V=o.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((oe=K[V])==null?void 0:oe.default)||K.metro.default}),d=e.computed(()=>{var oe;const V=o.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((oe=K[V])==null?void 0:oe.move)||K.metro.move}),g=e.computed(()=>`calc(${t.paneLengthPercent}% - ${t.triggerLength/2}px)`),m=e.computed(()=>`${t.triggerLength}px`),w=e.computed(()=>{const V=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[V]||C.metro}),I=e.computed(()=>{const V=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[V]||C.metro});e.onMounted(async()=>{await e.nextTick(),i.value=`background: ${f.value}`});const k=async()=>{await e.nextTick(),i.value=`background: ${f.value}`},_=async()=>{await e.nextTick(),i.value=`background: ${d.value}`},c=V=>{document.addEventListener("mousemove",O),document.addEventListener("mouseup",v),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: ${d.value}`,a.value){const C=a.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)}},v=async()=>{await e.nextTick(),i.value=`background: ${f.value}`,document.removeEventListener("mousemove",O)},E=setInterval(()=>{const V=Oe.getCurrentTheme();V!==o.value&&(o.value=V,i.value=`background: ${f.value}`)},100);return e.onUnmounted(()=>{clearInterval(E)}),{splitPane:a,trigger:r,lengthType:l,triggerDefaultColor:f,triggerMoveColor:d,paneLengthValue:g,triggerLengthValue:m,triggerBackGroud:i,iconStyle:w,iconHoverStyle:I,handleMouseLeave:k,handleMouseOver:_,handleMouseDown:c,handleMouseUp:v}}});function fo(t,n,a,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]=(...o)=>t.handleMouseOver&&t.handleMouseOver(...o)),onMouseover:n[1]||(n[1]=(...o)=>t.handleMouseOver&&t.handleMouseOver(...o)),onMouseleave:n[2]||(n[2]=(...o)=>t.handleMouseLeave&&t.handleMouseLeave(...o)),onMousedown:n[3]||(n[3]=(...o)=>t.handleMouseDown&&t.handleMouseDown(...o)),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 ho=Ae(uo,[["render",fo],["__scopeId","data-v-7a646dc7"]]),mo=e.defineComponent({props:{headers:{type:Array,required:!0}},setup(t){const{t:n}=Ge(),a=e.ref(!1),r=e.ref(-1),s=e.ref(0),i=e.ref(0),o=e.ref(null),l=w=>{const k={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 k?k.includes(".")?n(k):k:w.title},f=(w,I)=>{w.preventDefault(),w.stopPropagation(),a.value=!0,r.value=I,s.value=w.clientX,i.value=t.headers[I].width;const k=w.target;o.value=k.closest(".headerCaption"),document.addEventListener("mousemove",g,{passive:!1}),document.addEventListener("mouseup",m),document.body.style.cursor="col-resize",document.body.style.userSelect="none"};let d=null;const g=w=>{!a.value||r.value<0||(w.preventDefault(),d!==null&&cancelAnimationFrame(d),d=requestAnimationFrame(()=>{const I=w.clientX-s.value,k=Math.max(50,i.value+I);o.value&&(o.value.style.width=`${k}px`),document.querySelectorAll(`.cellNo[columnindex="${r.value}"], .cell[columnindex="${r.value}"]`).forEach(c=>{c.style.minWidth=`${k}px`,c.style.maxWidth=`${k}px`}),d=null}))},m=()=>{if(a.value){if(d!==null&&(cancelAnimationFrame(d),d=null),o.value&&r.value>=0){const w=parseInt(o.value.style.width);t.headers[r.value].width=w}a.value=!1,r.value=-1,o.value=null,document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",m),document.body.style.cursor="",document.body.style.userSelect=""}};return{getHeaderTitle:l,startResize:f}}}),po={class:"header"},go=["property","columnindex"],yo=["onMousedown"];function ko(t,n,a,r,s,i){return e.openBlock(),e.createElementBlock("div",po,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.headers,(o,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{key:l,property:o.property,columnindex:l,class:"headerCaption",style:e.normalizeStyle({width:`${o.width}px`})},[e.createElementVNode("span",null,e.toDisplayString(t.getHeaderTitle(o)),1),(o.property==="no"||o.show)&&l<t.headers.length-1?(e.openBlock(),e.createElementBlock("div",{key:0,class:"resize-handle",onMousedown:f=>t.startResize(f,l)},null,40,yo)):e.createCommentVNode("",!0)],12,go)),[[e.vShow,o.show]])),128))])}const bo=Ae(mo,[["render",ko],["__scopeId","data-v-ed37aca8"]]),wo={monthHeaders:[],weekHeaders:[],dayHeaders:[],hourHeaders:[],tasks:[],taskHeaders:[],mapFields:{},scale:90,timelineCellCount:0,startGanttDate:null,endGanttDate:null,scrollFlag:!0,mode:null,daySubMode:"full",expandRow:{pid:0,expand:!0},collapsedTasks:new Set,rootTask:{},subTask:{},editTask:{},removeTask:{},allowChangeTaskDate:{},barDate:{id:"",startDate:"",endDate:""}};let S=e.reactive(wo),fe={setMonthHeaders(t){S.monthHeaders=t},setDayHeaders(t){S.dayHeaders=t},setTasks(t){S.tasks=t},setTaskHeaders(t){S.taskHeaders=t},setWeekHeaders(t){S.weekHeaders=t},setHourHeaders(t){S.hourHeaders=t},setScale(t){S.scale=t},setMapFields(t){S.mapFields=t},setTimelineCellCount(t){S.timelineCellCount=t},setStartGanttDate(t){S.startGanttDate=t},setEndGanttDate(t){S.endGanttDate=t},setScrollFlag(t){S.scrollFlag=t},setMode(t){S.mode=t},setDaySubMode(t){S.daySubMode=t},setExpandRow(t){S.expandRow=t},toggleTaskCollapse(t){S.collapsedTasks.has(t)?S.collapsedTasks.delete(t):S.collapsedTasks.add(t),S.collapsedTasks=new Set(S.collapsedTasks)},setRootTask(t){S.rootTask=t},setSubTask(t){S.subTask=t},setEditTask(t){S.editTask=t},setRemoveTask(t){S.removeTask=t},setBarDate(t){S.barDate=t},setAllowChangeTaskDate(t){S.allowChangeTaskDate=t}};const We=e.reactive({shouldScrollToToday:!1,triggerScrollToToday(){this.shouldScrollToToday=!0},shouldScroll:!1,triggerScroll(){this.shouldScroll=!0},highlightedId:null,triggerHighlight(t){this.highlightedId=t}}),Pn=e.ref(0),xn=e.ref(!1),Co=t=>{Pn.value=t},So=t=>{xn.value=t},qn=()=>({scrollTop:Pn,scrollFlag:xn,setScrollTop:Co,setScrollFlag:So}),vo=e.defineComponent({props:{headers:{type:Array,default:()=>[]},rowHeight:{type:Number,default:0},row:{type:Object,default:()=>({})}},setup(t){const n=e.ref(!0),a=e.ref(!1),r="添加子任务",s="删除当前任务",i=e.computed(()=>S.mapFields),o=e.computed(()=>S.subTask),l=e.computed(()=>S.collapsedTasks);e.inject("barHover");const f=e.inject("addRootTask"),d=e.computed(()=>{const C=t.row[i.value.id];return S.tasks.some(K=>K[i.value.parentId]===C)}),g=e.computed(()=>{const C=t.row[i.value.id];return l.value.has(C)}),m=e.computed(()=>{const C=t.row[i.value.parentId];if(!C||C==="0")return!1;const K=S.tasks.filter(se=>se[i.value.parentId]===C);if(K.length===0)return!1;const oe=t.row[i.value.id];return K[K.length-1][i.value.id]===oe}),w=e.computed(()=>{const C=[],K=t.row.treeLevel||0;if(K<=1)return C;const oe=K-1,Q=[];let se=t.row;for(;se;){Q.unshift(se);const Y=se[i.value.parentId];if(!Y||Y==="0")break;const q=S.tasks.find(te=>te[i.value.id]===Y);if(!q)break;se=q}for(let Y=Q.length-2;Y>=0;Y--){const q=Q[Y],te=q[i.value.id],le=q[i.value.parentId],Ce=S.tasks.filter(y=>y[i.value.parentId]===le);if(Ce.length>0){if(Ce[Ce.length-1][i.value.id]===te)break;{const b=q.treeLevel;b&&b>=1&&b!==oe&&C.push(b)}}}return C}),I=()=>{const C=t.row[i.value.id];fe.toggleTaskCollapse(C)};e.onMounted(()=>{});const k=fe.setSubTask,_=fe.setEditTask,c=fe.setRemoveTask,O=(C,K)=>i.value[K]?C[i.value[K]]:C[K]?C[K]:null;return e.watch(()=>We.highlightedId,C=>{t.row[i.value.id]===C?a.value=!0:a.value=!1}),{showRow:n,hover:a,addTips:r,removeTips:s,mapFields:i,subTask:o,hasChildren:d,isCollapsed:g,isLastChild:m,getAncestorLines:w,toggleCollapse:I,setSubTask:k,setEditTask:_,setRemoveTask:c,checkField:O,hoverActive:()=>{We.triggerHighlight(t.row[i.value.id])},hoverInactive:()=>{We.triggerHighlight(null)},addRootTask:()=>{f&&f(t.row)}}}}),To=["columnindex"],Do={class:"no-cell-content"},Mo={class:"tree-lines"},$o=["title"],Eo={key:1,class:"collapse-placeholder"},Vo={class:"no-text"},No={class:"action-buttons"},_o=["columnindex"];function Ao(t,n,a,r,s,i){return t.showRow?(e.openBlock(),e.createElementBlock("div",{key:0,onMouseover:n[4]||(n[4]=o=>t.hoverActive()),onMouseleave:n[5]||(n[5]=o=>t.hoverInactive()),class:e.normalizeClass({active:t.hover})},[e.createElementVNode("div",{class:"row",onDblclick:n[3]||(n[3]=o=>t.setEditTask(t.row)),style:e.normalizeStyle({height:t.rowHeight+"px"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.headers,(o,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[o.property==="no"?(e.openBlock(),e.createElementBlock("div",{class:"cellNo",key:l,columnindex:l,style:e.normalizeStyle({minWidth:o.width+"px",maxWidth:o.width+"px",height:t.rowHeight+"px"})},[e.createElementVNode("div",Do,[e.createElementVNode("div",Mo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.getAncestorLines,f=>(e.openBlock(),e.createElementBlock("div",{key:"ancestor-"+f,class:"tree-line-vertical ancestor",style:e.normalizeStyle({left:f*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((...f)=>t.toggleCollapse&&t.toggleCollapse(...f),["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,$o)):(e.openBlock(),e.createElementBlock("span",Eo)),e.createElementVNode("span",Vo,e.toDisplayString(t.row.no),1)],4),e.createElementVNode("div",No,[e.createElementVNode("button",{onClick:n[1]||(n[1]=e.withModifiers(f=>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(f=>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,To)):e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"cell",key:l+"-header",columnindex:l,style:e.normalizeStyle({minWidth:o.width+"px",maxWidth:o.width+"px",height:t.rowHeight+"px"})},e.toDisplayString(t.checkField(t.row,o.property)),13,_o)),[[e.vShow,o.show]])],64))),256))],36)],34)):e.createCommentVNode("",!0)}const Lo=Ae(vo,[["render",Ao],["__scopeId","data-v-84b9433f"]]),Bo=e.defineComponent({props:{headers:Array,rowHeight:Number,tasks:Array},components:{TaskRow:Lo},setup(t){const n=e.ref([]),a=e.computed(()=>S.mapFields),r=e.computed(()=>S.collapsedTasks),s=d=>{const g=new Set,m=t.tasks||S.tasks,w=I=>{m.filter(_=>_[a.value.parentId]===I).forEach(_=>{const c=_[a.value.id];g.add(c),w(c)})};return w(d),g},i=e.computed(()=>new Set(n.value.map(d=>d[a.value.id]))),o=e.computed(()=>{const d=i.value,g=S.tasks.filter(w=>!d.has(w[a.value.id])),m=new Set;return r.value.forEach(w=>{s(w).forEach(k=>m.add(k))}),g.filter(w=>!m.has(w[a.value.id]))}),l=e.computed({get:()=>S.expandRow,set:d=>{fe.setExpandRow(d)}});e.watch(l,d=>{n.value=[],f(d.pid)});const f=d=>{let g=t.tasks?t.tasks.filter(m=>m[a.value.parentId]===d):[];if(g&&g.length>0)for(let m=0;m<g.length;m++)l.value.expand===!1&&n.value.push(g[m]),f(g[m][a.value.id])};return{filterTask:o,expandRow:l,recursionRow:f,mapFields:a}}});function Ho(t,n,a,r,s,i){const o=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(o,{key:0,headers:t.headers,rowHeight:t.rowHeight,row:l},null,8,["headers","rowHeight","row"])):e.createCommentVNode("",!0)],64))),128))])}const Yo=Ae(Bo,[["render",Ho]]),Fo=e.defineComponent({props:{headers:{type:Array,default:()=>[]},rowHeight:{type:Number,default:0}},components:{TaskRecursionRow:Yo},setup(t){const n=e.computed(()=>S.tasks),{scrollTop:a,scrollFlag:r,setScrollTop:s,setScrollFlag:i}=qn(),o=e.ref(null),l=e.computed(()=>S.mapFields),f=e.computed(()=>n.value.length*t.rowHeight),d=()=>n.value.filter(_=>_[l.value.parentId]==="0");e.watch(a,_=>{!r.value&&o.value&&(o.value.scrollTop=_)});let g=null;const m=()=>{g&&cancelAnimationFrame(g),g=requestAnimationFrame(()=>{o.value&&(i(!0),s(o.value.scrollTop)),g=null})},w=()=>{},I=()=>{if(o.value){const _=document.querySelector(".table .content");_&&(_.scrollWidth>_.clientWidth?o.value.style.paddingBottom="20px":o.value.style.paddingBottom="0px")}};e.watch(n,()=>{setTimeout(I,50)});const k=()=>{setTimeout(I,50)};return e.onMounted(()=>{o.value&&(o.value.scrollTop=a.value,setTimeout(I,100),window.addEventListener("resize",k))}),e.onUnmounted(()=>{window.removeEventListener("resize",k)}),{tasks:n,taskContent:o,scrollFlag:r,mapFields:l,setScrollFlag:i,getRootNode:d,scroll:m,mouseover:w,contentHeight:f}}});function Io(t,n,a,r,s,i){const o=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(o,{headers:t.headers,rowHeight:t.rowHeight,tasks:t.tasks},null,8,["headers","rowHeight","tasks"])],4)],544)}const zo=Ae(Fo,[["render",Io],["__scopeId","data-v-f13dd030"]]),Ro=e.defineComponent({props:{visible:{type:Boolean,default:!1},headers:{type:Array,required:!0}},emits:["close","update:headers"],setup(t,{emit:n}){const{t:a}=Ge(),r=e.ref(null),s=e.ref("metro"),i=w=>{if(!r.value)return;const I=Oe.getThemeInfo(w);I&&(r.value.setAttribute("data-gantt-theme",w),Object.entries(I.cssVariables).forEach(([k,_])=>{r.value.style.setProperty(k,_)}))};return e.watch(()=>t.visible,w=>{w&&(s.value=Oe.getCurrentTheme(),setTimeout(()=>{i(s.value)},0))}),{t:a,panelRef:r,currentTheme:s,getHeaderTitle:w=>{const k={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 k?k.includes(".")?a(k):k: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(k=>({...k,show:w[k.property]!==void 0?w[k.property]:!0}));n("update:headers",I)}}}}),Oo=["data-gantt-theme"],Po=["data-gantt-theme"],xo={class:"panel-header"},qo=["title"],Go={class:"panel-desc"},Wo={class:"action-buttons"},Zo={class:"column-list"},Uo={class:"checkbox-wrapper"},jo=["checked","onChange"],Jo={class:"column-label"};function Ko(t,n,a,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((...o)=>t.handleClose&&t.handleClose(...o),["self"])),"data-gantt-theme":t.currentTheme},[e.createElementVNode("div",{class:"column-config-panel",ref:"panelRef","data-gantt-theme":t.currentTheme},[e.createElementVNode("div",xo,[e.createElementVNode("h3",null,e.toDisplayString(t.t("columnSettings.title")),1),e.createElementVNode("button",{class:"close-btn",onClick:n[0]||(n[0]=(...o)=>t.handleClose&&t.handleClose(...o)),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,qo)]),e.createElementVNode("div",Go,e.toDisplayString(t.t("columnSettings.desc")),1),e.createElementVNode("div",Wo,[e.createElementVNode("button",{class:"action-btn",onClick:n[1]||(n[1]=(...o)=>t.showAll&&t.showAll(...o))},[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]=(...o)=>t.hideAll&&t.hideAll(...o))},[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]=(...o)=>t.reset&&t.reset(...o))},[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",Zo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.headers,(o,l)=>(e.openBlock(),e.createElementBlock("div",{key:o.property,class:e.normalizeClass(["column-item",{disabled:!o.show}])},[e.createElementVNode("label",Uo,[e.createElementVNode("input",{type:"checkbox",checked:o.show,onChange:f=>t.toggleColumn(l)},null,40,jo),n[9]||(n[9]=e.createElementVNode("span",{class:"checkbox-custom"},null,-1)),e.createElementVNode("span",Jo,e.toDisplayString(t.getHeaderTitle(o)),1)])],2))),128))])],8,Po)],8,Oo)):e.createCommentVNode("",!0)])}const Qo=Ae(Ro,[["render",Ko],["__scopeId","data-v-fd147c82"]]);var on={exports:{}},Xo=on.exports,Gn;function er(){return Gn||(Gn=1,function(t,n){(function(a,r){t.exports=r()})(Xo,function(){return function(a,r,s){r.prototype.isBetween=function(i,o,l,f){var d=s(i),g=s(o),m=(f=f||"()")[0]==="(",w=f[1]===")";return(m?this.isAfter(d,l):!this.isBefore(d,l))&&(w?this.isBefore(g,l):!this.isAfter(g,l))||(m?this.isBefore(d,l):!this.isAfter(d,l))&&(w?this.isAfter(g,l):!this.isBefore(g,l))}}})}(on)),on.exports}var tr=er();const nr=qt(tr);p.extend(nr);const ar=e.defineComponent({props:{headersHeight:{type:Number,default:50},rowHeight:{type:Number,default:0}},components:{TaskHeader:bo,TaskContent:zo,ColumnConfigPanel:Qo},setup(){const{t}=Ge(),n=e.computed(()=>S.tasks),a=e.computed(()=>S.taskHeaders),r=e.computed({get:()=>S.rootTask,set:m=>{fe.setRootTask(m)}}),s=e.computed(()=>S.startGanttDate),i=e.computed(()=>S.endGanttDate),o=e.ref(!1),l=fe.setRootTask;return{t,tasks:n,taskHeaders:a,rootTask:r,startGanttDate:s,endGanttDate:i,setRootTask:l,scrollToToday:()=>{p().isBetween(s.value,i.value)&&We.triggerScrollToToday()},columnConfigVisible:o,showColumnConfig:()=>{o.value=!0},updateHeaders:m=>{fe.setTaskHeaders(m)}}}}),or={class:"table"},rr=["title"];function sr(t,n,a,r,s,i){const o=e.resolveComponent("TaskHeader"),l=e.resolveComponent("TaskContent"),f=e.resolveComponent("ColumnConfigPanel");return e.openBlock(),e.createElementBlock("div",or,[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]=d=>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]=d=>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]=(...d)=>t.showColumnConfig&&t.showColumnConfig(...d)),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,rr)),e.createVNode(o,{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(f,{visible:t.columnConfigVisible,headers:t.taskHeaders,onClose:n[3]||(n[3]=d=>t.columnConfigVisible=!1),"onUpdate:headers":t.updateHeaders},null,8,["visible","headers","onUpdate:headers"])])}const ir=Ae(ar,[["render",sr],["__scopeId","data-v-d8ceb9cf"]]),lr=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:a,monthHeaders:r,hourHeaders:s}=e.toRefs(t),{locale:i}=Ge();return{weekHeaders:n,dayHeaders:a,monthHeaders:r,hourHeaders:s,isToday:l=>{const d={"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===p().locale(d).format("YYYY-MM-DD")}}}}),dr={class:"headerContainer"},cr={key:0,class:"header"},ur={key:1,class:"header"},fr={key:2,class:"header"},hr={key:0,class:"today",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20"},mr={key:3,class:"header"};function pr(t,n,a,r,s,i){return e.openBlock(),e.createElementBlock("div",dr,[t.monthHeaders&&t.monthHeaders.length>0?(e.openBlock(),e.createElementBlock("div",cr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.monthHeaders,o=>(e.openBlock(),e.createElementBlock("div",{key:o.title,class:"headerCaption",style:e.normalizeStyle([{"border-bottom":"0px"},{width:o.width+"px"}])},[e.createElementVNode("span",{style:e.normalizeStyle({width:o.width+"px"})},e.toDisplayString(o.title),5)],4))),128))])):e.createCommentVNode("",!0),t.weekHeaders&&t.weekHeaders.length>0?(e.openBlock(),e.createElementBlock("div",ur,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.weekHeaders,o=>(e.openBlock(),e.createElementBlock("div",{key:o.title,class:"headerCaption",style:e.normalizeStyle([{"border-top":"1px"},{width:o.width+"px"}])},[e.createElementVNode("span",{style:e.normalizeStyle({width:o.width+"px"})},e.toDisplayString(o.title),5)],4))),128))])):e.createCommentVNode("",!0),t.dayHeaders&&t.dayHeaders.length>0?(e.openBlock(),e.createElementBlock("div",fr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dayHeaders,o=>(e.openBlock(),e.createElementBlock("div",{key:o.title,class:"headerCaption",style:e.normalizeStyle({width:o.width+"px"})},[e.createElementVNode("span",{style:e.normalizeStyle({width:o.width+"px"})},e.toDisplayString(o.title),5),t.isToday(o.fulldate)?(e.openBlock(),e.createElementBlock("svg",hr,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",mr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.hourHeaders,o=>(e.openBlock(),e.createElementBlock("div",{key:o.title,class:"headerCaption",style:e.normalizeStyle({width:o.width+"px"})},[e.createElementVNode("span",{style:e.normalizeStyle({width:o.width+"px"})},e.toDisplayString(o.title),5)],4))),128))])):e.createCommentVNode("",!0)])}const gr=Ae(lr,[["render",pr],["__scopeId","data-v-255f8988"]]);var rn={exports:{}},yr=rn.exports,Wn;function kr(){return Wn||(Wn=1,function(t,n){(function(a,r){t.exports=r()})(yr,function(){var a="day";return function(r,s,i){var o=function(d){return d.add(4-d.isoWeekday(),a)},l=s.prototype;l.isoWeekYear=function(){return o(this).year()},l.isoWeek=function(d){if(!this.$utils().u(d))return this.add(7*(d-this.isoWeek()),a);var g,m,w,I,k=o(this),_=(g=this.isoWeekYear(),m=this.$u,w=(m?i.utc:i)().year(g).startOf("year"),I=4-w.isoWeekday(),w.isoWeekday()>4&&(I+=7),w.add(I,a));return k.diff(_,"week")+1},l.isoWeekday=function(d){return this.$utils().u(d)?this.day()||7:this.day(this.day()%7?d:d-7)};var f=l.startOf;l.startOf=function(d,g){var m=this.$utils(),w=!!m.u(g)||g;return m.p(d)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):f.bind(this)(d,g)}}})}(rn)),rn.exports}var br=kr();const Zn=qt(br);p.extend(Zn);const wr=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 a=e.ref(null),r=e.ref(t.rowHeight*.7),s=e.ref(null),i=e.ref(0),o=e.ref(0),l=e.ref(!0),f=e.ref(!1),d=e.ref(""),g=e.ref(!1),m=e.ref(0),w=e.ref(!1),I=e.computed(()=>S.timelineCellCount),k=e.computed(()=>S.scale),_=e.computed(()=>S.mode),c=e.computed(()=>S.mapFields),O=e.computed(()=>{const Y=Number(t.row[c.value.progress]);return isNaN(Y)?"0.00%":(Y*100).toFixed(2)+"%"}),v=e.inject(gt.SetBarColorSymbol),E=Y=>{const q={taskId:t.row[c.value.id],oldProgress:Number(t.row[c.value.progress])||0,newProgress:Y,task:t.row};n("progress-update",q),window.dispatchEvent(new CustomEvent("taskProgressUpdate",{detail:q})),console.log("Task progress updated:",q)};e.watch(()=>We.highlightedId,Y=>{f.value=t.row[c.value.id]===Y});const V=()=>We.triggerHighlight(t.row[c.value.id]),C=()=>We.triggerHighlight(null),K=Y=>{m.value;let q="#ffffff",te="#f8f8f8";if(a.value){let le=a.value.parentElement;for(;le;){if(le.hasAttribute("data-gantt-theme")){q=getComputedStyle(le).getPropertyValue("--bg-content").trim()||"#ffffff",te=getComputedStyle(le).getPropertyValue("--bg-secondary").trim()||"#f8f8f8";break}le=le.parentElement}}switch(_.value){case"季度":return q;case"月":return p(t.startGanttDate).startOf("month").add(Y,"months"),q;case"日":{const Ce=S.daySubMode==="half"?Math.floor(Y/2):Y;let y=p(t.startGanttDate).add(Ce,"days");return y.isoWeekday()===7||y.isoWeekday()===1?te:q}case"周":case"时":return q}},oe=fe.setBarDate,Q=fe.setAllowChangeTaskDate,se=Y=>{let q=0;switch(_.value){case"季度":{const $=p(t.startGanttDate).startOf("quarter"),M=p(t.row[c.value.startdate]).startOf("quarter"),ne=p(t.row[c.value.enddate]).startOf("quarter");let P=(M.year()-$.year())*4+(M.quarter()-$.quarter());q=k.value*P;let X=(ne.year()-M.year())*4+(ne.quarter()-M.quarter())+1;o.value=X*k.value,t.row[c.value.takestime]=X+"季度";break}case"月":{const $=p(t.startGanttDate).startOf("month"),M=p(t.row[c.value.startdate]).startOf("month"),ne=p(t.row[c.value.enddate]).startOf("month");let P=(M.year()-$.year())*12+(M.month()-$.month());q=k.value*P;let X=(ne.year()-M.year())*12+(ne.month()-M.month())+1;o.value=X*k.value,t.row[c.value.takestime]=X+"月";break}case"日":{const $=S.daySubMode==="half",M=$?2:1;let ne=p(t.row[c.value.startdate]).diff(p(t.startGanttDate),"days");if($){const X=p(t.row[c.value.startdate]).hour(),ke=p(t.row[c.value.enddate]).hour(),Ne=X<12,Te=ke<12,Ve=Ne?0:1,_e=Te?0:1;q=k.value*(ne*2+Ve);const Le=p(t.row[c.value.enddate]).diff(p(t.startGanttDate),"days")*2+_e,he=ne*2+Ve;o.value=(Le-he+1)*k.value}else q=k.value*ne*M;let P=p(t.row[c.value.enddate]).diff(p(t.row[c.value.startdate]),"days")+1;$||(o.value=P*k.value*M),t.row[c.value.takestime]=P+"天";break}case"周":{const $=p(t.startGanttDate).startOf("isoWeek"),M=p(t.row[c.value.startdate]).startOf("isoWeek");let ne=M.diff($,"week");q=k.value*ne;let X=p(t.row[c.value.enddate]).startOf("isoWeek").diff(M,"week")+1;o.value=X*k.value,t.row[c.value.takestime]=X+"周";break}case"时":{let $=p(t.row[c.value.startdate]).diff(p(t.startGanttDate),"hours");q=k.value*$;let M=p(t.row[c.value.enddate]).diff(p(t.row[c.value.startdate]),"hours")+1;o.value=M*k.value,t.row[c.value.takestime]=M+"小时";break}}i.value=q;let te=gn(Y);const le=getComputedStyle(Y).getPropertyValue("--border")||"#cecece";Y.setAttribute("data-x",q.toString()),Y.setAttribute("width",o.value.toString()),Y.setAttribute("stroke",le),Y.setAttribute("stroke-width","1px"),Y.style.transform=`translate(${q}px, 0px)`;let Ce=te.select("pattern").first(),y=te.children().filter($=>$.type==="g")[0]||te.group(),u=te.select(".innerRect").first(),b=te.select("rect:not(.innerRect):not(.progressHandle)").first(),h=te.select("text").first(),D=te.select(".progressHandle").first();Ce||(Ce=te.pattern(10,10,$=>{$.path("M10 -5 -10,15M15,0,0,15M0 -5 -20,15").fill("none").stroke({color:"gray",opacity:.4,width:5})})),y||(y=te.group());let H=t.row[c.value.progress]?Number(o.value)*Number(t.row[c.value.progress]):Number(o.value);u?(u.fill({color:d.value,opacity:.4}),u.width(H)):(u=te.rect(H,r.value).radius(10),u.addClass("innerRect"),y.add(u)),b?b.width(o.value):(b=te.rect(o.value,r.value).radius(10).fill(Ce).stroke({color:le,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}))),h?h.text(O.value):h=te.text(O.value).stroke("#faf7ec");const L=h.bbox();h.font({size:15,anchor:"middle",leading:"1em"}).fill("#000").attr("opacity",1).attr("dominant-baseline","middle").center(u.width()/2+L.width/2,u.height()/2);const F=12,Z=8,U=H-F/2,j=r.value-Z/2,ee=H,ie=()=>{let $="#f59e0b",M="#d97706",ne="#fbbf24",P=Y.parentElement;for(;P;){if(P.hasAttribute("data-gantt-theme")){$=getComputedStyle(P).getPropertyValue("--primary").trim()||$,M=getComputedStyle(P).getPropertyValue("--primary-dark").trim()||M,ne=getComputedStyle(P).getPropertyValue("--primary-light").trim()||ne;break}P=P.parentElement}return{primary:$,primaryDark:M,primaryLight:ne}};let de=Y.querySelector(".progressGuideLine");const $e=ie();if(!de){const $=document.createElementNS("http://www.w3.org/2000/svg","line");$.setAttribute("class","progressGuideLine"),$.setAttribute("x1",String(ee)),$.setAttribute("y1","0"),$.setAttribute("x2",String(ee)),$.setAttribute("y2",String(j)),$.setAttribute("stroke",$e.primaryDark),$.setAttribute("stroke-width","2"),$.setAttribute("stroke-dasharray","4,3"),$.setAttribute("opacity","0.8"),Y.appendChild($),de=$}if(de.setAttribute("x1",String(ee)),de.setAttribute("x2",String(ee)),de.setAttribute("y2",String(j)),de.setAttribute("stroke",$e.primaryDark),de.setAttribute("opacity","0.8"),D){D.move(U,j);const $=D.node;$.setAttribute("fill",$e.primary),$.setAttribute("stroke",$e.primaryDark)}else{const $=`${F/2},0 0,${Z} ${F},${Z}`;D=te.polygon($).fill($e.primary).stroke({color:$e.primaryDark,width:1}).addClass("progressHandle");const M=D.node;M.style.cursor="ew-resize",M.style.pointerEvents="auto",D.move(U,j);let ne=U;M.addEventListener("mouseenter",()=>{if(!w.value){const P=ie();M.setAttribute("fill",P.primaryLight),M.setAttribute("stroke",P.primary),M.setAttribute("stroke-width","2"),de.setAttribute("stroke",P.primaryLight),de.setAttribute("stroke-width","2"),de.setAttribute("opacity","1")}}),M.addEventListener("mouseleave",()=>{if(!w.value){const P=ie();M.setAttribute("fill",P.primary),M.setAttribute("stroke",P.primaryDark),M.setAttribute("stroke-width","1"),de.setAttribute("stroke",P.primaryDark),de.setAttribute("stroke-width","2"),de.setAttribute("opacity","0.8")}}),Ze(M).draggable({inertia:!1,listeners:{start:()=>{w.value=!0;const P=ie();M.setAttribute("fill",P.primaryDark),M.setAttribute("stroke",P.primaryDark),M.setAttribute("stroke-width","2"),de.setAttribute("stroke",P.primaryDark),de.setAttribute("stroke-width","2"),de.setAttribute("opacity","1")},move:P=>{ne+=P.dx,ne=Math.max(-12/2,Math.min(ne,o.value-F/2)),D.move(ne,j);const X=ne+F/2;de.setAttribute("x1",String(X)),de.setAttribute("x2",String(X));const ke=Math.min(1,Math.max(0,(ne+F/2)/o.value));u.width(ke*o.value),h.text((ke*100).toFixed(2)+"%"),h.center(u.width()/2+L.width/2,u.height()/2)},end:()=>{w.value=!1;const P=ie();M.setAttribute("fill",P.primary),M.setAttribute("stroke",P.primaryDark),M.setAttribute("stroke-width","1"),de.setAttribute("stroke",P.primaryDark),de.setAttribute("stroke-width","2"),de.setAttribute("opacity","0.8");const X=Math.min(1,Math.max(0,(ne+F/2)/o.value));t.row[c.value.progress]=X,E(X)}}})}oe({id:t.row[c.value.id],startDate:t.row[c.value.startdate],endDate:t.row[c.value.enddate]}),Ze(Y).draggable({inertia:!1,modifiers:[Ze.modifiers.restrictRect({restriction:"parent",endOnly:!0})],autoScroll:!0,listeners:{start:$=>{w.value||(i.value=Number($.target.getAttribute("data-x")),o.value=$.target.width.baseVal.value)},move:$=>{if(w.value)return;let M=((parseFloat($.target.getAttribute("data-x")||"0")||0)+$.dx).toString();Object.assign($.target.style,{width:`${$.rect.width}px`,height:`${$.rect.height}px`,transform:`translate(${M}px, 0px)`}),$.target.setAttribute("data-x",M),$.target.setAttribute("data-y","0")},end:$=>{if(w.value)return;let M=$.target,ne=parseFloat(M.getAttribute("data-x")||"0")||0,X=Math.round(ne/k.value)*k.value;X<0&&(X=0),X>I.value*k.value&&(X=I.value*k.value);const ke=c.value.parentId||"pid",Ne=t.row[ke];if(Ne&&Ne!=="0"){const B=S.tasks.find(re=>String(re[c.value.id])===String(Ne));if(B){let re=0;if(_.value==="季度"||_.value==="月"){const Me=p(t.startGanttDate).startOf("month"),be=p(B[c.value.startdate]).startOf("month");re=((be.year()-Me.year())*12+(be.month()-Me.month()))*k.value}else if(_.value==="日")re=p(B[c.value.startdate]).diff(p(t.startGanttDate),"days")*k.value;else if(_.value==="周"){const Me=p(t.startGanttDate).startOf("isoWeek");re=p(B[c.value.startdate]).startOf("isoWeek").diff(Me,"week")*k.value}else _.value==="时"&&(re=p(B[c.value.startdate]).diff(p(t.startGanttDate),"hours")*k.value);X<re&&(X=re)}}M.style.transform=`translate(${X}px, 0px)`,M.setAttribute("data-x",X.toString());const Te=Math.round((X-i.value)/k.value);let Ve=0,_e=0,Ee=0,Le=0;if(_.value==="季度")Le=Te;else if(_.value==="月")Ee=Te;else if(_.value==="日")if(S.daySubMode==="half"){const re=Math.round(X/k.value),Me=Math.round(o.value/k.value),be=re+Me-1,N=Math.floor(re/2),G=re%2===0,me=p(t.startGanttDate).add(N,"days").hour(G?0:12).minute(0).second(0),De=Math.floor(be/2),Be=be%2===0,Ie=p(t.startGanttDate).add(De,"days").hour(Be?11:23).minute(59).second(59);t.row[c.value.startdate]=me.format("YYYY-MM-DD HH:mm:ss"),t.row[c.value.enddate]=Ie.format("YYYY-MM-DD HH:mm:ss"),t.row[c.value.takestime]=De-N+1+"天"}else Ve=Te;else _.value==="周"?Ve=Te*7:_.value==="时"&&(_e=Te);const he=_.value==="日"&&S.daySubMode==="half";if(_.value==="季度"){t.row[c.value.startdate]=p(t.row[c.value.startdate]).add(Le,"quarters").format("YYYY-MM-DD HH:mm:ss"),t.row[c.value.enddate]=p(t.row[c.value.enddate]).add(Le,"quarters").format("YYYY-MM-DD HH:mm:ss");const B=p(t.row[c.value.startdate]).startOf("quarter"),re=p(t.row[c.value.enddate]).startOf("quarter"),Me=(re.year()-B.year())*4+(re.quarter()-B.quarter())+1;t.row[c.value.takestime]=Me+"季度"}else if(_.value==="月"){t.row[c.value.startdate]=p(t.row[c.value.startdate]).add(Ee,"months").format("YYYY-MM-DD HH:mm:ss"),t.row[c.value.enddate]=p(t.row[c.value.enddate]).add(Ee,"months").format("YYYY-MM-DD HH:mm:ss");const B=p(t.row[c.value.startdate]).startOf("month"),re=p(t.row[c.value.enddate]).startOf("month"),Me=(re.year()-B.year())*12+(re.month()-B.month())+1;t.row[c.value.takestime]=Me+"月"}else if(_.value==="时")t.row[c.value.startdate]=p(t.row[c.value.startdate]).add(_e,"hours").format("YYYY-MM-DD HH:mm:ss"),t.row[c.value.enddate]=p(t.row[c.value.enddate]).add(_e,"hours").format("YYYY-MM-DD HH:mm:ss"),t.row[c.value.takestime]=p(t.row[c.value.enddate]).diff(p(t.row[c.value.startdate]),"hours")+1+"小时";else if(!he){if(t.row[c.value.startdate]=p(t.row[c.value.startdate]).add(Ve,"days").format("YYYY-MM-DD HH:mm:ss"),t.row[c.value.enddate]=p(t.row[c.value.enddate]).add(Ve,"days").format("YYYY-MM-DD HH:mm:ss"),_.value==="日")t.row[c.value.takestime]=p(t.row[c.value.enddate]).diff(p(t.row[c.value.startdate]),"days")+1+"天";else if(_.value==="周"){const B=p(t.row[c.value.startdate]).startOf("isoWeek"),re=p(t.row[c.value.enddate]).startOf("isoWeek");t.row[c.value.takestime]=re.diff(B,"week")+1+"周"}}const Fe=p(t.row[c.value.startdate]),T=t.row[c.value.id],J=(B,re)=>{const Me=[];for(const be of re)String(be[ke])===String(B)&&(Me.push(be),Me.push(...J(be[c.value.id],re)));return Me},pe=J(T,S.tasks),x=_.value==="季度"?Le:_.value==="月"?Ee:_.value==="时"?_e:Ve;if(he||x>0){for(const B of pe)if(p(B[c.value.startdate]).isBefore(Fe)){if(_.value==="季度")B[c.value.startdate]=p(B[c.value.startdate]).add(Le,"quarters").format("YYYY-MM-DD HH:mm:ss"),B[c.value.enddate]=p(B[c.value.enddate]).add(Le,"quarters").format("YYYY-MM-DD HH:mm:ss");else if(_.value==="月")B[c.value.startdate]=p(B[c.value.startdate]).add(Ee,"months").format("YYYY-MM-DD HH:mm:ss"),B[c.value.enddate]=p(B[c.value.enddate]).add(Ee,"months").format("YYYY-MM-DD HH:mm:ss");else if(_.value==="时")B[c.value.startdate]=p(B[c.value.startdate]).add(_e,"hours").format("YYYY-MM-DD HH:mm:ss"),B[c.value.enddate]=p(B[c.value.enddate]).add(_e,"hours").format("YYYY-MM-DD HH:mm:ss");else if(he){const re=Fe.diff(p(B[c.value.startdate]),"hours");B[c.value.startdate]=p(B[c.value.startdate]).add(re,"hours").format("YYYY-MM-DD HH:mm:ss"),B[c.value.enddate]=p(B[c.value.enddate]).add(re,"hours").format("YYYY-MM-DD HH:mm:ss")}else B[c.value.startdate]=p(B[c.value.startdate]).add(Ve,"days").format("YYYY-MM-DD HH:mm:ss"),B[c.value.enddate]=p(B[c.value.enddate]).add(Ve,"days").format("YYYY-MM-DD HH:mm:ss");oe({id:B[c.value.id],startDate:B[c.value.startdate],endDate:B[c.value.enddate]})}}oe({id:t.row[c.value.id],startDate:t.row[c.value.startdate],endDate:t.row[c.value.enddate]})}}}),Ze(Y).resizable({edges:{left:!0,right:!0,bottom:!1,top:!1},listeners:{start:$=>{i.value=Number($.target.getAttribute("data-x")),o.value=Number($.target.getAttribute("width"))},end:$=>{Q(t.row);let M=$.target,ne=$.rect.width,P=Math.round(ne/k.value);P<1&&(P=1),ne=P*k.value;let X=i.value;if($.edges&&$.edges.left){X=i.value+(o.value-ne),X=Math.round(X/k.value)*k.value,X<0&&(X=0);const he=c.value.parentId||"pid",Fe=t.row[he];if(Fe&&Fe!=="0"){const T=S.tasks.find(J=>String(J[c.value.id])===String(Fe));if(T){let J=0;if(_.value==="季度"){const pe=p(t.startGanttDate).startOf("quarter"),x=p(T[c.value.startdate]).startOf("quarter");J=((x.year()-pe.year())*4+(x.quarter()-pe.quarter()))*k.value}else if(_.value==="月"){const pe=p(t.startGanttDate).startOf("month"),x=p(T[c.value.startdate]).startOf("month");J=((x.year()-pe.year())*12+(x.month()-pe.month()))*k.value}else if(_.value==="日"){const x=S.daySubMode==="half"?2:1;J=p(T[c.value.startdate]).diff(p(t.startGanttDate),"days")*k.value*x}else if(_.value==="周"){const pe=p(t.startGanttDate).startOf("isoWeek");J=p(T[c.value.startdate]).startOf("isoWeek").diff(pe,"week")*k.value}else _.value==="时"&&(J=p(T[c.value.startdate]).diff(p(t.startGanttDate),"hours")*k.value);X<J&&(X=J,ne=i.value+o.value-X,P=Math.round(ne/k.value),P<1&&(P=1),ne=P*k.value)}}}M.setAttribute("width",ne.toString()),M.style.width=ne+"px",M.style.transform=`translate(${X}px, 0px)`,M.setAttribute("data-x",X.toString());const ke=Math.round(X/k.value),Ne=ke+P-1;let Te,Ve;if(_.value==="季度"){const he=p(t.startGanttDate).startOf("quarter");Te=he.add(ke,"quarters").format("YYYY-MM-DD HH:mm:ss"),Ve=he.add(Ne,"quarters").endOf("quarter").format("YYYY-MM-DD HH:mm:ss"),t.row[c.value.takestime]=P+"季度"}else if(_.value==="月"){const he=p(t.startGanttDate).startOf("month");Te=he.add(ke,"months").format("YYYY-MM-DD HH:mm:ss"),Ve=he.add(Ne,"months").endOf("month").format("YYYY-MM-DD HH:mm:ss"),t.row[c.value.takestime]=P+"月"}else if(_.value==="日"){const he=S.daySubMode==="half",Fe=he?2:1,T=he?Math.floor(ke/Fe):ke,J=he?Math.floor(Ne/Fe):Ne;if(he){const x=ke%2===0,z=Ne%2===0,B=x?0:12,re=z?11:23;Te=p(t.startGanttDate).add(T,"days").hour(B).minute(0).second(0).format("YYYY-MM-DD HH:mm:ss"),Ve=p(t.startGanttDate).add(J,"days").hour(re).minute(59).second(59).format("YYYY-MM-DD HH:mm:ss")}else Te=p(t.startGanttDate).add(T,"days").format("YYYY-MM-DD HH:mm:ss"),Ve=p(t.startGanttDate).add(J,"days").format("YYYY-MM-DD HH:mm:ss");const pe=J-T+1;t.row[c.value.takestime]=pe+"天"}else if(_.value==="周"){const he=p(t.startGanttDate).startOf("isoWeek");Te=he.add(ke,"weeks").format("YYYY-MM-DD HH:mm:ss"),Ve=he.add(Ne,"weeks").endOf("isoWeek").format("YYYY-MM-DD HH:mm:ss"),t.row[c.value.takestime]=P+"周"}else Te=p(t.startGanttDate).add(ke,"hours").format("YYYY-MM-DD HH:mm:ss"),Ve=p(t.startGanttDate).add(Ne,"hours").format("YYYY-MM-DD HH:mm:ss"),t.row[c.value.takestime]=P+"小时";t.row[c.value.startdate]=Te,t.row[c.value.enddate]=Ve;let _e=gn(Y),Ee=_e.select(".innerRect").first(),Le=_e.select("rect:not(.innerRect):not(.progressHandle)").first();if(Ee){let he=t.row[c.value.progress]?ne*Number(t.row[c.value.progress]):ne;Ee.width(he)}if(Le&&Le.width(ne),$.edges&&$.edges.left){const he=p(Te),Fe=t.row[c.value.id],T=c.value.parentId||"pid",J=(x,z)=>{const B=[];for(const re of z)String(re[T])===String(x)&&(B.push(re),B.push(...J(re[c.value.id],z)));return B},pe=J(Fe,S.tasks);for(const x of pe)if(p(x[c.value.startdate]).isBefore(he)){if(_.value==="季度"){const z=p(x[c.value.startdate]).startOf("quarter"),B=he.startOf("quarter"),re=(B.year()-z.year())*4+(B.quarter()-z.quarter());x[c.value.startdate]=p(x[c.value.startdate]).add(re,"quarters").format("YYYY-MM-DD HH:mm:ss"),x[c.value.enddate]=p(x[c.value.enddate]).add(re,"quarters").format("YYYY-MM-DD HH:mm:ss")}else if(_.value==="月"){const z=p(x[c.value.startdate]).startOf("month"),B=he.startOf("month"),re=(B.year()-z.year())*12+(B.month()-z.month());x[c.value.startdate]=p(x[c.value.startdate]).add(re,"months").format("YYYY-MM-DD HH:mm:ss"),x[c.value.enddate]=p(x[c.value.enddate]).add(re,"months").format("YYYY-MM-DD HH:mm:ss")}else if(_.value==="时"){const z=he.diff(p(x[c.value.startdate]),"hours");x[c.value.startdate]=p(x[c.value.startdate]).add(z,"hours").format("YYYY-MM-DD HH:mm:ss"),x[c.value.enddate]=p(x[c.value.enddate]).add(z,"hours").format("YYYY-MM-DD HH:mm:ss")}else if(_.value==="日"&&S.daySubMode==="half"){const z=he.diff(p(x[c.value.startdate]),"hours");x[c.value.startdate]=p(x[c.value.startdate]).add(z,"hours").format("YYYY-MM-DD HH:mm:ss"),x[c.value.enddate]=p(x[c.value.enddate]).add(z,"hours").format("YYYY-MM-DD HH:mm:ss")}else{const z=he.diff(p(x[c.value.startdate]),"days");x[c.value.startdate]=p(x[c.value.startdate]).add(z,"days").format("YYYY-MM-DD HH:mm:ss"),x[c.value.enddate]=p(x[c.value.enddate]).add(z,"days").format("YYYY-MM-DD HH:mm:ss")}oe({id:x[c.value.id],startDate:x[c.value.startdate],endDate:x[c.value.enddate]})}}oe({id:t.row[c.value.id],startDate:Te,endDate:Ve})}},modifiers:[Ze.modifiers.restrictEdges({outer:"parent"}),Ze.modifiers.restrictSize({min:{width:k.value,height:r.value}})],inertia:!1,hold:1})};return e.watch(()=>[t.row[c.value.startdate],t.row[c.value.enddate]],()=>{a.value&&g.value&&se(a.value)},{deep:!1}),e.onMounted(()=>{if(a.value&&!g.value&&(se(a.value),g.value=!0),v&&(d.value=v(t.row),a.value&&se(a.value)),a.value){let Y=a.value.parentElement;for(;Y&&!Y.hasAttribute("data-gantt-theme");)Y=Y.parentElement;if(Y){const q=new MutationObserver(()=>{m.value++});q.observe(Y,{attributes:!0,attributeFilter:["data-gantt-theme","style"]}),e.onBeforeUnmount(()=>q.disconnect())}}}),e.onDeactivated(()=>{if(a.value)try{Ze(a.value).unset()}catch{}l.value=!1}),e.onBeforeUnmount(()=>{if(a.value)try{Ze(a.value).unset()}catch{}l.value=!1}),{bar:a,barHeight:r,direction:s,oldBarDataX:i,oldBarWidth:o,showRow:l,hover:f,barColor:d,timelineCellCount:I,scale:k,mode:_,mapFields:c,hoverActive:V,hoverInactive:C,WeekEndColor:K}}}),Cr=["data-task-id"],Sr=["height"];function vr(t,n,a,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]=o=>t.hoverActive()),onMouseleave:n[1]||(n[1]=o=>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,Sr)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.timelineCellCount,o=>(e.openBlock(),e.createElementBlock("div",{key:o+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(o)})},null,4))),128))],46,Cr)):e.createCommentVNode("",!0)}const Tr=Ae(wr,[["render",vr],["__scopeId","data-v-426c2196"]]);p.extend(Zn);const Dr=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),a=e.ref(t.rowHeight*.6),r=e.ref(!0),s=e.ref(!1),i=e.ref(""),o=e.ref(0),l=e.ref(0),f=e.computed(()=>S.timelineCellCount),d=e.computed(()=>S.scale),g=e.computed(()=>S.mode),m=e.computed(()=>S.mapFields),w=e.inject(gt.SetBarColorSymbol);e.watch(()=>We.highlightedId,v=>{s.value=t.row[m.value.id]===v});const I=()=>We.triggerHighlight(t.row[m.value.id]),k=()=>We.triggerHighlight(null),_=v=>{o.value;let E="#ffffff",V="#f8f8f8";if(n.value){let C=n.value.parentElement;for(;C;){if(C.hasAttribute("data-gantt-theme")){E=getComputedStyle(C).getPropertyValue("--bg-content").trim()||"#ffffff",V=getComputedStyle(C).getPropertyValue("--bg-secondary").trim()||"#f8f8f8";break}C=C.parentElement}}switch(g.value){case"季度":return E;case"月":return p(t.startGanttDate).startOf("month").add(v,"months"),E;case"日":{const K=S.daySubMode==="half"?Math.floor(v/2):v;let oe=p(t.startGanttDate).add(K,"days");return oe.isoWeekday()===7||oe.isoWeekday()===1?V:E}case"周":case"时":return E}},c=fe.setBarDate,O=v=>{let E=0;switch(g.value){case"季度":{const ee=p(t.startGanttDate).startOf("quarter"),ie=p(t.row[m.value.startdate]).startOf("quarter");let de=(ie.year()-ee.year())*4+(ie.quarter()-ee.quarter());E=d.value*de+d.value/2,t.row[m.value.takestime]="0季度",t.row[m.value.enddate]=t.row[m.value.startdate];break}case"月":{const ee=p(t.startGanttDate).startOf("month"),ie=p(t.row[m.value.startdate]).startOf("month");let de=(ie.year()-ee.year())*12+(ie.month()-ee.month());E=d.value*de+d.value/2,t.row[m.value.takestime]="0月",t.row[m.value.enddate]=t.row[m.value.startdate];break}case"日":{const ee=S.daySubMode==="half";let ie=p(t.row[m.value.startdate]).diff(p(t.startGanttDate),"days");if(ee){const $=p(t.row[m.value.startdate]).hour()<12?0:1;E=d.value*(ie*2+$)+d.value/2}else E=d.value*ie+d.value/2;t.row[m.value.takestime]="0天",t.row[m.value.enddate]=t.row[m.value.startdate];break}case"周":{const ee=p(t.startGanttDate).startOf("isoWeek");let de=p(t.row[m.value.startdate]).startOf("isoWeek").diff(ee,"week");E=d.value*de+d.value/2,t.row[m.value.takestime]="0周",t.row[m.value.enddate]=t.row[m.value.startdate];break}case"时":{let ee=p(t.row[m.value.startdate]).diff(p(t.startGanttDate),"hours");E=d.value*ee+d.value/2,t.row[m.value.takestime]="0小时",t.row[m.value.enddate]=t.row[m.value.startdate];break}}l.value=E;let V=gn(v);const C=getComputedStyle(v).getPropertyValue("--border")||"#cecece";v.setAttribute("data-x",E.toString()),v.setAttribute("stroke",C),v.setAttribute("stroke-width","2px"),v.style.transform=`translate(${E}px, 0px)`;let K="#f59e0b",oe="#333333",Q="#ffffff",se=v.parentElement;for(;se;){if(se.hasAttribute("data-gantt-theme")){const ee=getComputedStyle(se);K=ee.getPropertyValue("--primary").trim()||K,oe=ee.getPropertyValue("--text-primary").trim()||oe,Q=ee.getPropertyValue("--bg-content").trim()||Q;break}se=se.parentElement}(Q.includes("#1")||Q.includes("#2")||Q.toLowerCase().includes("dark"))&&oe==="#333333"&&(oe="#ffffff"),V.clear();const Y=a.value,q=Y/2,te=t.rowHeight/2,le=q,Ce=le,y=te-q,u=le+q,b=te,h=le,D=te+q,H=le-q,F=`M ${Ce},${y} L ${u},${b} L ${h},${D} L ${H},${te} Z`,Z=V.path(F).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 U=V.text(t.row[m.value.task]||"Milestone").move(Y+5,te-7).fill(oe).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"});Q.includes("#1")||Q.includes("#2")||Q.toLowerCase().includes("dark")?U.attr({stroke:"#000000","stroke-width":"0.5px","paint-order":"stroke fill"}):U.attr({stroke:"#ffffff","stroke-width":"0.5px","paint-order":"stroke fill"}),c({id:t.row[m.value.id],startDate:t.row[m.value.startdate],endDate:t.row[m.value.startdate]}),Ze(v).draggable({inertia:!1,modifiers:[Ze.modifiers.restrictRect({restriction:"parent",endOnly:!0})],autoScroll:!0,listeners:{start:ee=>{l.value=Number(ee.target.getAttribute("data-x"))},move:ee=>{let ie=((parseFloat(ee.target.getAttribute("data-x")||"0")||0)+ee.dx).toString();ee.target.style.transform=`translate(${ie}px, 0px)`,ee.target.setAttribute("data-x",ie)},end:ee=>{let ie=ee.target,de=parseFloat(ie.getAttribute("data-x")||"0")||0,$=Math.round((de-d.value/2)/d.value)*d.value+d.value/2;$<d.value/2&&($=d.value/2),$>f.value*d.value&&($=f.value*d.value-d.value/2);const M=m.value.parentId||"pid",ne=t.row[M];if(ne&&ne!=="0"){const _e=S.tasks.find(Ee=>String(Ee[m.value.id])===String(ne));if(_e){let Ee=0;if(g.value==="季度"){const Le=p(t.startGanttDate).startOf("quarter"),he=p(_e[m.value.startdate]).startOf("quarter");Ee=((he.year()-Le.year())*4+(he.quarter()-Le.quarter()))*d.value+d.value/2}else if(g.value==="月"){const Le=p(t.startGanttDate).startOf("month"),he=p(_e[m.value.startdate]).startOf("month");Ee=((he.year()-Le.year())*12+(he.month()-Le.month()))*d.value+d.value/2}else if(g.value==="日"){const he=S.daySubMode==="half"?2:1;Ee=p(_e[m.value.startdate]).diff(p(t.startGanttDate),"days")*d.value*he+d.value/2}else if(g.value==="周"){const Le=p(t.startGanttDate).startOf("isoWeek");Ee=p(_e[m.value.startdate]).startOf("isoWeek").diff(Le,"week")*d.value+d.value/2}else g.value==="时"&&(Ee=p(_e[m.value.startdate]).diff(p(t.startGanttDate),"hours")*d.value+d.value/2);$<Ee&&($=Ee)}}ie.style.transform=`translate(${$}px, 0px)`,ie.setAttribute("data-x",$.toString());const P=Math.round(($-l.value)/d.value);let X=0,ke=0,Ne=0,Te=0;if(g.value==="季度")Te=P;else if(g.value==="月")Ne=P;else if(g.value==="日")if(S.daySubMode==="half"){const Ee=Math.round(($-d.value/2)/d.value),Le=Math.floor(Ee/2),Fe=Ee%2===0?0:12,T=p(t.startGanttDate).add(Le,"days").hour(Fe).minute(0).second(0);t.row[m.value.startdate]=T.format("YYYY-MM-DD HH:mm:ss"),t.row[m.value.enddate]=t.row[m.value.startdate]}else X=P;else g.value==="周"?X=P*7:g.value==="时"&&(ke=P);const Ve=g.value==="日"&&S.daySubMode==="half";g.value==="季度"?(t.row[m.value.startdate]=p(t.row[m.value.startdate]).add(Te,"quarters").format("YYYY-MM-DD HH:mm:ss"),t.row[m.value.enddate]=t.row[m.value.startdate]):g.value==="月"?(t.row[m.value.startdate]=p(t.row[m.value.startdate]).add(Ne,"months").format("YYYY-MM-DD HH:mm:ss"),t.row[m.value.enddate]=t.row[m.value.startdate]):g.value==="时"?(t.row[m.value.startdate]=p(t.row[m.value.startdate]).add(ke,"hours").format("YYYY-MM-DD HH:mm:ss"),t.row[m.value.enddate]=t.row[m.value.startdate]):Ve||(t.row[m.value.startdate]=p(t.row[m.value.startdate]).add(X,"days").format("YYYY-MM-DD HH:mm:ss"),t.row[m.value.enddate]=t.row[m.value.startdate]),c({id:t.row[m.value.id],startDate:t.row[m.value.startdate],endDate:t.row[m.value.startdate]})}}})};return e.watch(()=>[t.row[m.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 v=n.value.parentElement;for(;v&&!v.hasAttribute("data-gantt-theme");)v=v.parentElement;if(v){const E=new MutationObserver(()=>{o.value++});E.observe(v,{attributes:!0,attributeFilter:["data-gantt-theme","style"]}),e.onBeforeUnmount(()=>E.disconnect())}}}),e.onBeforeUnmount(()=>{if(n.value)try{Ze(n.value).unset()}catch{}r.value=!1}),{milestone:n,showRow:r,hover:s,milestoneColor:i,timelineCellCount:f,scale:d,mode:g,mapFields:m,hoverActive:I,hoverInactive:k,WeekEndColor:_}}}),Mr=["data-task-id"],$r=["height","width"];function Er(t,n,a,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]=o=>t.hoverActive()),onMouseleave:n[1]||(n[1]=o=>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,$r)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.timelineCellCount,o=>(e.openBlock(),e.createElementBlock("div",{key:o+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(o)})},null,4))),128))],46,Mr)):e.createCommentVNode("",!0)}const Vr=Ae(Dr,[["render",Er],["__scopeId","data-v-0de028c6"]]),Nr=e.defineComponent({name:"BarRecursionRow",props:{rowHeight:{type:Number,default:0}},setup(){const t=e.ref([]),n=e.ref(0),a=e.inject(gt.SetTaskTypeSymbol),r=e.computed(()=>S.tasks),s=e.computed(()=>S.timelineCellCount),i=e.computed(()=>S.scale),o=e.computed(()=>S.mode),l=e.computed(()=>S.startGanttDate?S.startGanttDate.toISOString():void 0),f=e.computed(()=>S.endGanttDate?S.endGanttDate.toISOString():void 0),d=e.computed(()=>S.mapFields),g=e.computed(()=>S.collapsedTasks),m=v=>{if(a)return a(v);if(v.type)return v.type;const E=v[d.value.startdate],V=v[d.value.enddate];return E&&V&&E===V?Tt.MILESTONE:Tt.TASK},w=v=>{const E=new Set,V=C=>{r.value.filter(oe=>oe[d.value.parentId]===C).forEach(oe=>{const Q=oe[d.value.id];E.add(Q),V(Q)})};return V(v),E},I=e.computed(()=>new Set(t.value.map(v=>v[d.value.id]))),k=e.computed(()=>{const v=I.value,E=S.tasks.filter(C=>!v.has(C[d.value.id])),V=new Set;return g.value.forEach(C=>{w(C).forEach(oe=>V.add(oe))}),E.filter(C=>!V.has(C[d.value.id]))}),_=e.computed({get:()=>S.expandRow,set:v=>{fe.setExpandRow(v)}});e.watch(_,v=>{t.value=[],c(v.pid)});const c=v=>{let E=r.value.filter(V=>V[d.value.parentId]===v);if(E&&E.length>0)for(let V=0;V<E.length;V++)_.value.expand===!1&&t.value.push(E[V]),c(E[V][d.value.id])},O=fe.setExpandRow;return{hiddenTask:t,componentKey:n,allTask:r,timelineCellCount:s,scale:i,mode:o,startGanttDate:l,endGanttDate:f,mapFields:d,filterTask:k,expandRow:_,setExpandRow:O,recursionRow:c,getTaskType:m,TaskType:Tt}},components:{Bar:Tr,Milestone:Vr},mounted(){this.$nextTick(()=>{})},activated(){this.componentKey++}});function _r(t,n,a,r,s,i){const o=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,f=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:f.id},[t.getTaskType(f)===t.TaskType.MILESTONE?(e.openBlock(),e.createBlock(o,{key:0,startGanttDate:t.startGanttDate,endGanttDate:t.endGanttDate,row:f,rowHeight:t.rowHeight},null,8,["startGanttDate","endGanttDate","row","rowHeight"])):(e.openBlock(),e.createBlock(l,{key:1,startGanttDate:t.startGanttDate,endGanttDate:t.endGanttDate,row:f,rowHeight:t.rowHeight},null,8,["startGanttDate","endGanttDate","row","rowHeight"]))],64))),128))])}const Ar=Ae(Nr,[["render",_r]]),Lr=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:Ye.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([]),a=y=>{if(!S.tasks.find(ee=>ee[S.mapFields.id]===y))return null;const b=document.querySelector(`[data-task-id="${y}"]`);if(!b)return null;let h=b.querySelector(".bar"),D=!1;if(h||(h=b.querySelector(".milestone"),D=!0),!h)return null;const H=b.closest(".table .content");if(!H)return null;const L=parseFloat(h.getAttribute("data-x")||"0");let F;D?F=b.getBoundingClientRect().height*.6:F=h.width.baseVal.value;const Z=b.getBoundingClientRect(),U=H.getBoundingClientRect(),j=Z.top-U.top;if(D){const ee=F/2;return{x:L,y:j,width:F,height:Z.height,centerX:L+ee,centerY:j+Z.height/2,rightX:L+F,leftX:L,topY:j,bottomY:j+Z.height}}else return{x:L,y:j,width:F,height:Z.height,centerX:L+F/2,centerY:j+Z.height/2,rightX:L+F,leftX:L,topY:j,bottomY:j+Z.height}},r=(y,u)=>S.tasks.filter(h=>h[S.mapFields.parentId]===y&&h[S.mapFields.parentId]!=="0").findIndex(h=>h[S.mapFields.id]===u),s=()=>{const y=document.querySelector(".barRow");return y?y.offsetHeight:50},i=y=>{const u=s();return Math.floor(y/u)*u+u/2},o=(y,u)=>{const b=s();return(Math.floor(y/b)+1+u)*b+b/2},l=(y,u,b)=>{const h=s(),H=Math.floor(y/h)*h+h+b;return u>H+h?i(H+h/2):i(H)},f=y=>{const u=t.linkConfig.linkTypeColors;if(!u)return{[ge.FINISH_TO_START]:"#3498db",[ge.START_TO_START]:"#2ecc71",[ge.FINISH_TO_FINISH]:"#e74c3c",[ge.START_TO_FINISH]:"#f39c12",[ge.PARENT_CHILD]:"#95a5a6"}[y]||t.linkConfig.color;switch(y){case ge.FINISH_TO_START:return u.finishToStart||"#3498db";case ge.START_TO_START:return u.startToStart||"#2ecc71";case ge.FINISH_TO_FINISH:return u.finishToFinish||"#e74c3c";case ge.START_TO_FINISH:return u.startToFinish||"#f39c12";default:return t.linkConfig.color}},d=y=>y===ge.PARENT_CHILD?{color:t.linkConfig.parentChildStyle.color||"#95a5a6",width:t.linkConfig.parentChildStyle.width,dashArray:t.linkConfig.parentChildStyle.dashArray}:{color:f(y),width:t.linkConfig.width,dashArray:t.linkConfig.dashArray},g=(y,u,b,h="")=>{if(!y||!u)return"";const{pathType:D}=t.linkConfig;switch(b){case ge.PARENT_CHILD:return m(y,u,D);case ge.FINISH_TO_START:return _(y,u,D);case ge.START_TO_START:return c(y,u,D);case ge.FINISH_TO_FINISH:return O(y,u,D);case ge.START_TO_FINISH:return v(y,u,D);default:return _(y,u,D)}},m=(y,u,b,h)=>{const D=y.id||y.taskId,H=u.id||u.taskId,L=r(D,H),F=y.leftX,Z=y.centerY,U=t.linkConfig.arrowSize||8,j=u.leftX-U,ee=u.centerY;return w(F,Z,j,ee,L,b)},w=(y,u,b,h,D,H)=>{const L=b-y,F=h-u;if(Math.abs(L)<30&&Math.abs(F)<15)return`M ${y} ${u} L ${b} ${h}`;switch(H){case Ye.STRAIGHT:return`M ${y} ${u} L ${b} ${h}`;case Ye.BEZIER:return I(y,u,b,h);case Ye.RIGHT_ANGLE:default:return k(y,u,b,h,D)}},I=(y,u,b,h,D)=>{const H=b-y,{bezierCurvature:L}=t.linkConfig;if(H>0){const F=Math.min(Math.abs(H)*L,60),Z=y+F,U=b-F;return`M ${y} ${u} C ${Z} ${u} ${U} ${h} ${b} ${h}`}else{const F=t.linkConfig.rightAngleOffset,Z=l(u,h,F),U=F*L;return`M ${y} ${u}
|
|
2
|
+
C ${y+U} ${u} ${y+U} ${Z} ${y+F/2} ${Z}
|
|
3
|
+
C ${b-U} ${Z} ${b-U} ${h} ${b} ${h}`}},k=(y,u,b,h,D)=>{const H=b-y,{rightAngleOffset:L,smoothCorners:F,cornerRadius:Z}=t.linkConfig;if(o(u,D),H>0){const U=y+L;if(F&&Z>0){const j=Math.min(Z,Math.abs(h-u)/2,Math.abs(b-U)/2);return`M ${y} ${u}
|
|
4
|
+
L ${U-j} ${u}
|
|
5
|
+
Q ${U} ${u} ${U} ${u+(h>u?j:-j)}
|
|
6
|
+
L ${U} ${h-(h>u?j:-j)}
|
|
7
|
+
Q ${U} ${h} ${U+j} ${h}
|
|
8
|
+
L ${b} ${h}`}else return`M ${y} ${u}
|
|
9
|
+
L ${U} ${u}
|
|
10
|
+
L ${U} ${h}
|
|
11
|
+
L ${b} ${h}`}else{const U=L,j=l(u,h,U),ee=y+U/2,ie=b-U/2;if(F&&Z>0){const de=Math.min(Z,U/4);return`M ${y} ${u}
|
|
12
|
+
L ${ee-de} ${u}
|
|
13
|
+
Q ${ee} ${u} ${ee} ${u+de}
|
|
14
|
+
L ${ee} ${j-de}
|
|
15
|
+
Q ${ee} ${j} ${ee+de} ${j}
|
|
16
|
+
L ${ie-de} ${j}
|
|
17
|
+
Q ${ie} ${j} ${ie} ${j+de}
|
|
18
|
+
L ${ie} ${h-de}
|
|
19
|
+
Q ${ie} ${h} ${ie+de} ${h}
|
|
20
|
+
L ${b} ${h}`}else return`M ${y} ${u}
|
|
21
|
+
L ${ee} ${u}
|
|
22
|
+
L ${ee} ${j}
|
|
23
|
+
L ${ie} ${j}
|
|
24
|
+
L ${ie} ${h}
|
|
25
|
+
L ${b} ${h}`}},_=(y,u,b)=>{const h=t.linkConfig.arrowSize||8,D=y.rightX,H=y.centerY,L=u.leftX-h,F=u.centerY;return E(D,H,L,F,b,"horizontal")},c=(y,u,b)=>{const h=t.linkConfig.arrowSize||8,D=y.leftX,H=y.centerY,L=u.leftX-h,F=u.centerY;return E(D,H,L,F,b,"left-u")},O=(y,u,b)=>{const h=t.linkConfig.arrowSize||8,D=y.rightX,H=y.centerY,L=u.rightX+h,F=u.centerY;return E(D,H,L,F,b,"right-u")},v=(y,u,b)=>{const h=t.linkConfig.arrowSize||8,D=y.leftX,H=y.centerY,L=u.rightX+h,F=u.centerY;return E(D,H,L,F,b,"cross")},E=(y,u,b,h,D,H)=>{const{bezierCurvature:L,rightAngleOffset:F,smoothCorners:Z,cornerRadius:U}=t.linkConfig;switch(D){case Ye.STRAIGHT:return`M ${y} ${u} L ${b} ${h}`;case Ye.BEZIER:return V(y,u,b,h,H,L);case Ye.RIGHT_ANGLE:default:return C(y,u,b,h,H,F,Z,U)}},V=(y,u,b,h,D,H)=>{const L=b-y,F=h-u;switch(D){case"horizontal":if(L>20&&Math.abs(F)<10)return`M ${y} ${u} L ${b} ${h}`;if(L<20){const Ne=l(u,h,30),Te=30*H;return`M ${y} ${u}
|
|
26
|
+
C ${y+Te} ${u} ${y+Te} ${Ne} ${y+30/2} ${Ne}
|
|
27
|
+
C ${b-Te} ${Ne} ${b-Te} ${h} ${b} ${h}`}const Z=Math.min(Math.abs(L)*H,60),U=y+Z,j=b-Z;return`M ${y} ${u} C ${U} ${u} ${j} ${h} ${b} ${h}`;case"left-u":const ee=25,ie=Math.min(y,b)-ee,de=ee*H;if(Math.abs(F)>s()){const ke=i((u+h)/2);return`M ${y} ${u}
|
|
28
|
+
C ${y-de} ${u} ${ie} ${u+de} ${ie} ${ke}
|
|
29
|
+
C ${ie} ${h-de} ${b-de} ${h} ${b} ${h}`}return`M ${y} ${u} C ${ie} ${u} ${ie} ${h} ${b} ${h}`;case"right-u":const $e=25,$=Math.max(y,b)+$e,M=$e*H;if(Math.abs(F)>s()){const ke=i((u+h)/2);return`M ${y} ${u}
|
|
30
|
+
C ${y+M} ${u} ${$} ${u+M} ${$} ${ke}
|
|
31
|
+
C ${$} ${h-M} ${b+M} ${h} ${b} ${h}`}return`M ${y} ${u} C ${$} ${u} ${$} ${h} ${b} ${h}`;case"cross":if(L>20&&Math.abs(F)<10)return`M ${y} ${u} L ${b} ${h}`;const ne=Math.min(Math.abs(L)*H,60),P=y-ne,X=b+ne;return`M ${y} ${u} C ${P} ${u} ${X} ${h} ${b} ${h}`;default:return`M ${y} ${u} L ${b} ${h}`}},C=(y,u,b,h,D,H,L,F)=>{const Z=b-y,U=h-u;switch(D){case"horizontal":if(Z>20&&Math.abs(U)<10)return`M ${y} ${u} L ${b} ${h}`;if(Z<20){const M=H,ne=l(u,h,M),P=y+M/2,X=b-M/2;if(L&&F>0){const ke=Math.min(F,M/4);return`M ${y} ${u}
|
|
32
|
+
L ${P-ke} ${u}
|
|
33
|
+
Q ${P} ${u} ${P} ${u+ke}
|
|
34
|
+
L ${P} ${ne-ke}
|
|
35
|
+
Q ${P} ${ne} ${P+ke} ${ne}
|
|
36
|
+
L ${X-ke} ${ne}
|
|
37
|
+
Q ${X} ${ne} ${X} ${ne+ke}
|
|
38
|
+
L ${X} ${h-ke}
|
|
39
|
+
Q ${X} ${h} ${X+ke} ${h}
|
|
40
|
+
L ${b} ${h}`}return`M ${y} ${u}
|
|
41
|
+
L ${P} ${u}
|
|
42
|
+
L ${P} ${ne}
|
|
43
|
+
L ${X} ${ne}
|
|
44
|
+
L ${X} ${h}
|
|
45
|
+
L ${b} ${h}`}const j=y+Math.abs(Z)/2;if(L&&F>0){const M=Math.min(F,Math.abs(Z)/4,Math.abs(U)/2);return U>0?`M ${y} ${u}
|
|
46
|
+
L ${j-M} ${u}
|
|
47
|
+
Q ${j} ${u} ${j} ${u+M}
|
|
48
|
+
L ${j} ${h-M}
|
|
49
|
+
Q ${j} ${h} ${j+M} ${h}
|
|
50
|
+
L ${b} ${h}`:`M ${y} ${u}
|
|
51
|
+
L ${j-M} ${u}
|
|
52
|
+
Q ${j} ${u} ${j} ${u-M}
|
|
53
|
+
L ${j} ${h+M}
|
|
54
|
+
Q ${j} ${h} ${j+M} ${h}
|
|
55
|
+
L ${b} ${h}`}return`M ${y} ${u} L ${j} ${u} L ${j} ${h} L ${b} ${h}`;case"left-u":const ee=H,ie=Math.min(y,b)-ee;if(L&&F>0){const M=Math.min(F,ee/2,Math.abs(U)/4);return`M ${y} ${u}
|
|
56
|
+
L ${ie+M} ${u}
|
|
57
|
+
Q ${ie} ${u} ${ie} ${u+(U>0?M:-M)}
|
|
58
|
+
L ${ie} ${h-(U>0?M:-M)}
|
|
59
|
+
Q ${ie} ${h} ${ie+M} ${h}
|
|
60
|
+
L ${b} ${h}`}return`M ${y} ${u} L ${ie} ${u} L ${ie} ${h} L ${b} ${h}`;case"right-u":const de=H,$e=Math.max(y,b)+de;if(L&&F>0){const M=Math.min(F,de/2,Math.abs(U)/4);return`M ${y} ${u}
|
|
61
|
+
L ${$e-M} ${u}
|
|
62
|
+
Q ${$e} ${u} ${$e} ${u+(U>0?M:-M)}
|
|
63
|
+
L ${$e} ${h-(U>0?M:-M)}
|
|
64
|
+
Q ${$e} ${h} ${$e-M} ${h}
|
|
65
|
+
L ${b} ${h}`}return`M ${y} ${u} L ${$e} ${u} L ${$e} ${h} L ${b} ${h}`;case"cross":if(Z>20&&Math.abs(U)<10)return`M ${y} ${u} L ${b} ${h}`;const $=y+Z/2;if(L&&F>0){const M=Math.min(F,Math.abs(Z)/4,Math.abs(U)/2);return U>0?`M ${y} ${u}
|
|
66
|
+
L ${$-M} ${u}
|
|
67
|
+
Q ${$} ${u} ${$} ${u+M}
|
|
68
|
+
L ${$} ${h-M}
|
|
69
|
+
Q ${$} ${h} ${$+M} ${h}
|
|
70
|
+
L ${b} ${h}`:`M ${y} ${u}
|
|
71
|
+
L ${$-M} ${u}
|
|
72
|
+
Q ${$} ${u} ${$} ${u-M}
|
|
73
|
+
L ${$} ${h+M}
|
|
74
|
+
Q ${$} ${h} ${$+M} ${h}
|
|
75
|
+
L ${b} ${h}`}return`M ${y} ${u} L ${$} ${u} L ${$} ${h} L ${b} ${h}`;default:return`M ${y} ${u} L ${b} ${h}`}},K=(y,u,b=ge.FINISH_TO_START)=>{if(!y)return console.warn("子任务位置无效"),"";try{const h=y.leftX,D=y.centerY,H=h-u,L=D-u/2,F=D+u/2;return`${h},${D} ${H},${L} ${H},${F}`}catch(h){return console.error("箭头生成失败:",h),""}},oe=(y,u,b,h)=>{if(!y||!u)return"";try{let D,H,L="right";switch(b){case ge.FINISH_TO_START:D=u.leftX,H=u.centerY,L="right";break;case ge.START_TO_START:D=u.leftX,H=u.centerY,L="right";break;case ge.FINISH_TO_FINISH:D=u.rightX,H=u.centerY,L="left";break;case ge.START_TO_FINISH:D=u.rightX,H=u.centerY,L="left";break;default:D=u.leftX,H=u.centerY,L="right"}let F,Z,U,j;return L==="right"?(F=D-h,Z=H-h/2,U=D-h,j=H+h/2):(F=D+h,Z=H-h/2,U=D+h,j=H+h/2),`${D},${H} ${F},${Z} ${U},${j}`}catch(D){return console.error("依赖箭头生成失败:",D),""}},Q=y=>{const u=new Set,b=h=>{S.tasks.filter(H=>H[S.mapFields.parentId]===h).forEach(H=>{const L=H[S.mapFields.id];u.add(L),b(L)})};return b(y),u},se=y=>{for(const u of S.collapsedTasks)if(Q(u).has(y))return!0;return!1},Y=()=>{const y=[],u=t.linkConfig.linkTypeVisibility||{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0};u.parentChild&&S.tasks.forEach(D=>{const H=D[S.mapFields.parentId],L=D[S.mapFields.id];if(H&&H!=="0"){if(se(L))return;const F=a(H),Z=a(L);if(F&&Z){const U=`parent-child-${H}-${L}`,j={...F,id:H,taskId:H},ee={...Z,id:L,taskId:L},ie=g(j,ee,ge.PARENT_CHILD,U),de=t.linkConfig.showArrow?K(Z,t.linkConfig.arrowSize,ge.PARENT_CHILD):"";y.push({id:U,sourceId:H,targetId:L,type:ge.PARENT_CHILD,path:ie,arrowPoints:de,labelX:Z.centerX,labelY:Z.centerY-10})}}});const b=an.getDependencies(),h=D=>{if(typeof D=="number")switch(D){case 0:return u.finishToStart;case 1:return u.startToStart;case 2:return u.finishToFinish;case 3:return u.startToFinish;default:return!0}switch(D){case ge.FINISH_TO_START:return u.finishToStart;case ge.START_TO_START:return u.startToStart;case ge.FINISH_TO_FINISH:return u.finishToFinish;case ge.START_TO_FINISH:return u.startToFinish;case ge.PARENT_CHILD:return u.parentChild;default:return!0}};b.forEach(D=>{if(!h(D.type))return;const H=a(D.sourceTaskId),L=a(D.targetTaskId);if(H&&L){const F=`dependency-${D.id}`,Z={...H,id:D.sourceTaskId,taskId:D.sourceTaskId},U={...L,id:D.targetTaskId,taskId:D.targetTaskId},j=g(Z,U,D.type,F),ee=t.linkConfig.showArrow?oe(Z,U,D.type,t.linkConfig.arrowSize):"",ie={[ge.FINISH_TO_START]:"FS",[ge.START_TO_START]:"SS",[ge.FINISH_TO_FINISH]:"FF",[ge.START_TO_FINISH]:"SF",[ge.PARENT_CHILD]:""};y.push({id:F,sourceId:D.sourceTaskId,targetId:D.targetTaskId,type:D.type,path:j,arrowPoints:ee,label:ie[D.type]||"",labelX:(H.centerX+L.centerX)/2,labelY:(H.centerY+L.centerY)/2-10})}}),n.value=y};e.watch(()=>S.tasks,()=>{setTimeout(Y,50)},{deep:!0}),e.watch(()=>S.scale,()=>{setTimeout(Y,50)}),e.watch(()=>S.mode,()=>{setTimeout(Y,200)}),e.watch(()=>S.timelineCellCount,()=>{setTimeout(Y,100)}),e.watch(()=>[S.startGanttDate,S.endGanttDate],()=>{setTimeout(Y,100)}),e.watch(()=>S.barDate,()=>{requestAnimationFrame(Y)},{deep:!0}),e.watch(()=>t.linkConfig.linkTypeVisibility,()=>{setTimeout(Y,50)},{deep:!0}),e.watch(()=>S.collapsedTasks,()=>{setTimeout(Y,50)},{deep:!0});let q=null,te=null;e.onMounted(()=>{setTimeout(Y,100);const y=document.querySelector(".gantt");y&&(q=new ResizeObserver(Y),q.observe(y),te=new MutationObserver(u=>{let b=!1;u.forEach(h=>{var H,L;const D=h.target;if(h.type==="attributes"){const F=h.attributeName;(F==="data-x"||F==="width"||F==="style"||F==="transform")&&((H=D.classList)!=null&&H.contains("bar")||(L=D.classList)!=null&&L.contains("barRow")||D.tagName==="svg")&&(b=!0)}}),b&&requestAnimationFrame(Y)}),te.observe(y,{attributes:!0,subtree:!0,attributeFilter:["style","data-x","transform","width"]}))}),e.onUnmounted(()=>{q&&q.disconnect(),te&&te.disconnect()});const le=y=>{const u=d(y);return!!(u.dashArray&&u.dashArray.length>0)};return{links:n,updateLinks:Y,getLinkStyle:d,isDashedLine:le,getDashAnimationStyle:y=>{if(!le(y.type)||!t.linkConfig.enableDashAnimation)return{};const u=d(y.type),b=t.linkConfig.dashAnimationSpeed||.8,h=y.type===ge.PARENT_CHILD?b*.6:b,L=(u.dashArray||"5,5").split(",").map(Number).reduce((F,Z)=>F+Z,0);return{"--animation-duration":`${h}s`,"--dash-length":`${L}px`}}}}}),Br=["width","height"],Hr=["d","stroke","stroke-width","stroke-dasharray"],Yr=["points","fill","stroke"],Fr=["x","y","fill","font-size"];function Ir(t,n,a,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,o=>(e.openBlock(),e.createElementBlock("g",{key:o.id},[e.createElementVNode("path",{d:o.path,stroke:t.getLinkStyle(o.type).color,"stroke-width":t.getLinkStyle(o.type).width,"stroke-dasharray":t.getLinkStyle(o.type).dashArray,fill:"none",class:e.normalizeClass(["task-link",o.type,{"dash-animated":t.isDashedLine(o.type)&&t.linkConfig.enableDashAnimation}]),style:e.normalizeStyle(t.getDashAnimationStyle(o))},null,14,Hr),t.linkConfig.showArrow&&o.arrowPoints&&o.arrowPoints.length>0?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:o.arrowPoints,fill:t.getLinkStyle(o.type).color,stroke:t.getLinkStyle(o.type).color,"stroke-width":.5,class:"task-link-arrow"},null,8,Yr)):e.createCommentVNode("",!0),o.label&&t.linkConfig.showLabels?(e.openBlock(),e.createElementBlock("text",{key:1,x:o.labelX,y:o.labelY,fill:t.linkConfig.labelColor,"font-size":t.linkConfig.labelFontSize,"text-anchor":"middle",class:"task-link-label"},e.toDisplayString(o.label),9,Fr)):e.createCommentVNode("",!0)]))),128))],8,Br)}const zr=Ae(Lr,[["render",Ir],["__scopeId","data-v-dc9db723"]]),Rr=e.defineComponent({props:{rowHeight:{type:Number,required:!0},headers:{type:Array,default:()=>[]}},components:{BarRecursionRow:Ar,TaskLinks:zr},setup(t){const n=e.ref(null),{scrollTop:a,scrollFlag:r,setScrollTop:s,setScrollFlag:i}=qn(),{config:o}=Dt(),l=e.computed(()=>S.tasks),f=e.computed(()=>S.timelineCellCount),d=e.computed(()=>S.scale),g=e.computed(()=>S.mode),m=e.computed(()=>S.startGanttDate),w=e.computed(()=>S.endGanttDate),I=e.computed(()=>S.mapFields),k=e.computed(()=>f.value*d.value),_=e.computed(()=>l.value.length*t.rowHeight);e.watch(a,Q=>{r.value&&n.value&&(n.value.scrollTop=Q)}),e.onMounted(()=>{n.value&&(n.value.scrollTop=a.value)});const c=()=>l.value.filter(Q=>Q[I.value.parentId]==="0");let O=null;const v=()=>{O&&cancelAnimationFrame(O),O=requestAnimationFrame(()=>{n.value&&(i(!1),s(n.value.scrollTop)),O=null})},E=()=>{},V=e.ref(!1),C=e.ref(0);return{barContent:n,scrollFlag:r,tasks:l,timelineCellCount:f,scale:d,mode:g,startGanttDate:m,endGanttDate:w,mapFields:I,getRootNode:c,scroll:v,mouseover:E,setScrollFlag:i,containerWidth:k,containerHeight:_,linkConfig:o,showGuideLine:V,guideLineX:C,handleMouseMove:Q=>{if(!n.value)return;const se=n.value.getBoundingClientRect(),Y=Q.clientX-se.left+n.value.scrollLeft,q=d.value,le=Math.floor(Y/q)*q+q/2;C.value=le,V.value=!0},handleMouseLeave:()=>{V.value=!1}}}});function Or(t,n,a,r,s,i){const o=e.resolveComponent("BarRecursionRow"),l=e.resolveComponent("TaskLinks");return t.tasks?(e.openBlock(),e.createElementBlock("div",{key:0,ref:"barContent",onScroll:n[0]||(n[0]=f=>t.scroll()),onMousemove:n[1]||(n[1]=(...f)=>t.handleMouseMove&&t.handleMouseMove(...f)),onMouseleave:n[2]||(n[2]=(...f)=>t.handleMouseLeave&&t.handleMouseLeave(...f)),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(o,{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 Pr=Ae(Rr,[["render",Or],["__scopeId","data-v-51968539"]]),xr=e.defineComponent({props:{headersHeight:{type:Number,default:50},rowHeight:{type:Number,default:50}},components:{TimelineHeader:gr,TableContent:Pr},setup(t){const n=e.ref(null),a=e.computed(()=>S.dayHeaders),r=e.computed(()=>S.weekHeaders),s=e.computed(()=>S.monthHeaders),i=e.computed(()=>S.hourHeaders),o=e.computed(()=>S.startGanttDate),l=e.computed(()=>S.mode),f=e.computed(()=>S.scale);S.timelineCellCount*f.value+100,S.tasks.length*t.rowHeight+100;const d=()=>{if(n.value)switch(l.value){case"季度":const g=p(o.value).startOf("month"),m=p().startOf("month"),w=(m.year()-g.year())*12+(m.month()-g.month());n.value.scrollLeft=w*Number(f.value);break;case"月":const I=p(o.value).startOf("month"),k=p().startOf("month"),_=(k.year()-I.year())*12+(k.month()-I.month());n.value.scrollLeft=_*Number(f.value);break;case"日":n.value.scrollLeft=Number(p().diff(p(o.value),"day"))*Number(f.value);break;case"周":const c=p().startOf("isoWeek"),O=p(o.value).startOf("isoWeek");n.value.scrollLeft=Number(c.diff(O,"week"))*Number(f.value);break;case"时":n.value.scrollLeft=Number(p().diff(p(o.value),"hour"))*Number(f.value);break}};return e.watch(()=>We.shouldScrollToToday,g=>{g&&(d(),We.shouldScrollToToday=!1)}),e.onMounted(()=>{}),{tableBar:n,dayHeaders:a,weekHeaders:r,monthHeaders:s,hourHeaders:i,startGanttDate:o,mode:l,scale:f,scrollToToday:d}}}),qr={ref:"tableBar",class:"table"};function Gr(t,n,a,r,s,i){const o=e.resolveComponent("TimelineHeader"),l=e.resolveComponent("TableContent");return e.openBlock(),e.createElementBlock("div",qr,[e.createElementVNode("div",{class:"header",style:e.normalizeStyle({height:`${t.headersHeight}px`,width:"fit-content"})},[e.createVNode(o,{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 Wr=Ae(xr,[["render",Gr],["__scopeId","data-v-6698c76f"]]),Zr=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 a=s=>{const i=parseFloat(s.target.value);n("update:modelValue",i)},r=e.computed(()=>{const s=[],i=t.labelStep||t.step;for(let o=t.min;o<=t.max;o=Math.round((o+t.step)*100)/100){const l=Math.abs(o-t.min)<.001||Math.abs(o-t.max)<.001||Math.abs((o-t.min)%i)<.001;s.push({value:o,isMajor:l,showLabel:t.showLabels&&l})}return s});return{handleInput:a,ticks:r}}}),Ur=["value","min","max","step"],jr={class:"slider-ticks"},Jr={key:0,class:"tick-label"};function Kr(t,n,a,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]=(...o)=>t.handleInput&&t.handleInput(...o)),onChange:n[1]||(n[1]=o=>t.$emit("change")),min:t.min,max:t.max,step:t.step,class:"range-input"},null,40,Ur),e.createElementVNode("div",jr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.ticks,o=>(e.openBlock(),e.createElementBlock("span",{key:o.value,class:e.normalizeClass(["tick",{major:o.isMajor}])},[n[6]||(n[6]=e.createElementVNode("span",{class:"tick-mark"},null,-1)),o.showLabel?(e.openBlock(),e.createElementBlock("span",Jr,e.toDisplayString(o.value),1)):e.createCommentVNode("",!0)],2))),128))])],32)}const Qr=Ae(Zr,[["render",Kr],["__scopeId","data-v-9731dbaf"]]),Xr=e.defineComponent({name:"ConfigSection",props:{title:{type:String,required:!0},icon:{type:String,default:""}}}),es={class:"config-section"},ts={class:"section-title"},ns={key:0,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},as={key:1,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"},os={key:2,width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor"};function rs(t,n,a,r,s,i){return e.openBlock(),e.createElementBlock("div",es,[e.createElementVNode("h4",ts,[e.renderSlot(t.$slots,"icon",{},()=>[t.icon==="language"?(e.openBlock(),e.createElementBlock("svg",ns,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",as,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",os,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 ss=Ae(Xr,[["render",rs],["__scopeId","data-v-b5157353"]]),is=e.defineComponent({name:"PathTypeSelector",props:{modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(){const{t}=Ge();return{pathTypes:e.computed(()=>[{value:Ye.STRAIGHT,name:t("configPanel.linkConfig.straight"),preview:"M 10 20 L 50 20"},{value:Ye.BEZIER,name:t("configPanel.linkConfig.bezier"),preview:"M 10 25 Q 30 5 50 25"},{value:Ye.RIGHT_ANGLE,name:t("configPanel.linkConfig.rightAngle"),preview:"M 10 15 L 25 15 L 25 25 L 50 25"}])}}}),ls={class:"path-type-grid"},ds=["onClick"],cs={width:"60",height:"35",viewBox:"0 0 60 40"},us={key:0,cx:"10",cy:"20",r:"2.5",fill:"currentColor"},fs={key:1,cx:"10",cy:"25",r:"2.5",fill:"currentColor"},hs={key:2,cx:"10",cy:"15",r:"2.5",fill:"currentColor"},ms=["d"],ps={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"},gs={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"},ys={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"},ks={class:"path-name"};function bs(t,n,a,r,s,i){return e.openBlock(),e.createElementBlock("div",ls,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pathTypes,o=>(e.openBlock(),e.createElementBlock("div",{key:o.value,class:e.normalizeClass(["path-type-card",{active:t.modelValue===o.value}]),onClick:l=>t.$emit("update:modelValue",o.value)},[(e.openBlock(),e.createElementBlock("svg",cs,[o.value==="straight"?(e.openBlock(),e.createElementBlock("circle",us)):e.createCommentVNode("",!0),o.value==="bezier"?(e.openBlock(),e.createElementBlock("circle",fs)):e.createCommentVNode("",!0),o.value==="right-angle"?(e.openBlock(),e.createElementBlock("circle",hs)):e.createCommentVNode("",!0),e.createElementVNode("path",{d:o.preview,stroke:"currentColor","stroke-width":"2.5",fill:"none","stroke-linecap":"round"},null,8,ms),o.value==="straight"?(e.openBlock(),e.createElementBlock("path",ps)):e.createCommentVNode("",!0),o.value==="bezier"?(e.openBlock(),e.createElementBlock("path",gs)):e.createCommentVNode("",!0),o.value==="right-angle"?(e.openBlock(),e.createElementBlock("path",ys)):e.createCommentVNode("",!0)])),e.createElementVNode("span",ks,e.toDisplayString(o.name),1)],10,ds))),128))])}const ws=Ae(is,[["render",bs],["__scopeId","data-v-34d8d0fd"]]),Cs=e.defineComponent({name:"LinkTypeColorConfig",props:{colors:{type:Object,required:!0}},emits:["update:colors","change"],setup(t,{emit:n}){const{t:a}=Ge();return{t:a,updateColor:(s,i)=>{const o=i.target,l={...t.colors,[s]:o.value};n("update:colors",l),n("change")}}}}),Ss={class:"link-type-colors"},vs={class:"color-item"},Ts={class:"color-preview"},Ds={width:"20",height:"10",viewBox:"0 0 20 10"},Ms=["stroke"],$s=["fill"],Es={class:"color-label"},Vs={class:"color-desc"},Ns=["value"],_s={class:"color-item"},As={class:"color-preview"},Ls={width:"20",height:"10",viewBox:"0 0 20 10"},Bs=["stroke"],Hs=["fill"],Ys={class:"color-label"},Fs={class:"color-desc"},Is=["value"],zs={class:"color-item"},Rs={class:"color-preview"},Os={width:"20",height:"10",viewBox:"0 0 20 10"},Ps=["stroke"],xs=["fill"],qs={class:"color-label"},Gs={class:"color-desc"},Ws=["value"],Zs={class:"color-item"},Us={class:"color-preview"},js={width:"20",height:"10",viewBox:"0 0 20 10"},Js=["stroke"],Ks=["fill"],Qs={class:"color-label"},Xs={class:"color-desc"},ei=["value"];function ti(t,n,a,r,s,i){return e.openBlock(),e.createElementBlock("div",Ss,[e.createElementVNode("div",vs,[e.createElementVNode("div",Ts,[(e.openBlock(),e.createElementBlock("svg",Ds,[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,$s)]))]),e.createElementVNode("span",Es,e.toDisplayString(t.t("link.fs")),1),e.createElementVNode("span",Vs,e.toDisplayString(t.t("link.finishToStart")),1),e.createElementVNode("input",{type:"color",value:t.colors.finishToStart,onInput:n[0]||(n[0]=o=>t.updateColor("finishToStart",o)),class:"color-input-small"},null,40,Ns)]),e.createElementVNode("div",_s,[e.createElementVNode("div",As,[(e.openBlock(),e.createElementBlock("svg",Ls,[e.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:t.colors.startToStart,"stroke-width":"2"},null,8,Bs),e.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:t.colors.startToStart},null,8,Hs)]))]),e.createElementVNode("span",Ys,e.toDisplayString(t.t("link.ss")),1),e.createElementVNode("span",Fs,e.toDisplayString(t.t("link.startToStart")),1),e.createElementVNode("input",{type:"color",value:t.colors.startToStart,onInput:n[1]||(n[1]=o=>t.updateColor("startToStart",o)),class:"color-input-small"},null,40,Is)]),e.createElementVNode("div",zs,[e.createElementVNode("div",Rs,[(e.openBlock(),e.createElementBlock("svg",Os,[e.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:t.colors.finishToFinish,"stroke-width":"2"},null,8,Ps),e.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:t.colors.finishToFinish},null,8,xs)]))]),e.createElementVNode("span",qs,e.toDisplayString(t.t("link.ff")),1),e.createElementVNode("span",Gs,e.toDisplayString(t.t("link.finishToFinish")),1),e.createElementVNode("input",{type:"color",value:t.colors.finishToFinish,onInput:n[2]||(n[2]=o=>t.updateColor("finishToFinish",o)),class:"color-input-small"},null,40,Ws)]),e.createElementVNode("div",Zs,[e.createElementVNode("div",Us,[(e.openBlock(),e.createElementBlock("svg",js,[e.createElementVNode("line",{x1:"0",y1:"5",x2:"14",y2:"5",stroke:t.colors.startToFinish,"stroke-width":"2"},null,8,Js),e.createElementVNode("polygon",{points:"20,5 14,2 14,8",fill:t.colors.startToFinish},null,8,Ks)]))]),e.createElementVNode("span",Qs,e.toDisplayString(t.t("link.sf")),1),e.createElementVNode("span",Xs,e.toDisplayString(t.t("link.startToFinish")),1),e.createElementVNode("input",{type:"color",value:t.colors.startToFinish,onInput:n[3]||(n[3]=o=>t.updateColor("startToFinish",o)),class:"color-input-small"},null,40,ei)])])}const ni=Ae(Cs,[["render",ti],["__scopeId","data-v-53d6a965"]]),ai=e.defineComponent({name:"ThemeSelector",props:{modelValue:{type:String,required:!0},themes:{type:Array,required:!0}},emits:["update:modelValue"],setup(){const{t}=Ge();return{t}}}),oi={class:"theme-grid"},ri=["onClick"],si={class:"theme-info"},ii={class:"theme-name"},li={class:"theme-desc"},di={key:0,class:"theme-check"};function ci(t,n,a,r,s,i){return e.openBlock(),e.createElementBlock("div",oi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.themes,o=>(e.openBlock(),e.createElementBlock("div",{key:o.id,class:e.normalizeClass(["theme-card",{active:t.modelValue===o.id}]),onClick:l=>t.$emit("update:modelValue",o.id)},[e.createElementVNode("div",{class:"theme-preview",style:e.normalizeStyle({background:o.preview})},null,4),e.createElementVNode("div",si,[e.createElementVNode("div",ii,e.toDisplayString(t.t(o.nameKey)),1),e.createElementVNode("div",li,e.toDisplayString(t.t(o.descKey)),1)]),t.modelValue===o.id?(e.openBlock(),e.createElementBlock("div",di,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,ri))),128))])}const ui=Ae(ai,[["render",ci],["__scopeId","data-v-a2723aed"]]),fi=e.defineComponent({name:"LanguageSelector",props:{modelValue:{type:String,required:!0},locales:{type:Array,required:!0}},emits:["update:modelValue"]}),hi={class:"language-selector-inline"},mi=["onClick"],pi={class:"lang-label"},gi={key:0,class:"lang-check"};function yi(t,n,a,r,s,i){return e.openBlock(),e.createElementBlock("div",hi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.locales,o=>(e.openBlock(),e.createElementBlock("div",{key:o.value,class:e.normalizeClass(["language-option",{active:t.modelValue===o.value}]),onClick:l=>t.$emit("update:modelValue",o.value)},[e.createElementVNode("span",pi,e.toDisplayString(o.label),1),t.modelValue===o.value?(e.openBlock(),e.createElementBlock("div",gi,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,mi))),128))])}const Un=Ae(fi,[["render",yi],["__scopeId","data-v-359f5b41"]]),ki=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"]}),bi=["value"],wi=["title"];function Ci(t,n,a,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]=o=>t.$emit("update:modelValue",o.target.value)),onChange:n[1]||(n[1]=o=>t.$emit("change")),class:e.normalizeClass(["color-input",t.inputClass])},null,42,bi),t.showSync?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[2]||(n[2]=o=>t.$emit("sync")),class:"sync-btn",title:t.syncTitle},e.toDisplayString(t.syncLabel),9,wi)):e.createCommentVNode("",!0)],2)}const Si=Ae(ki,[["render",Ci],["__scopeId","data-v-6e05149c"]]),vi=e.defineComponent({name:"CheckboxConfig",props:{modelValue:{type:Boolean,required:!0},label:{type:String,required:!0}},emits:["update:modelValue","change"]}),Ti={class:"config-group"},Di={class:"config-label checkbox-label"},Mi=["checked"];function $i(t,n,a,r,s,i){return e.openBlock(),e.createElementBlock("div",Ti,[e.createElementVNode("label",Di,[e.createElementVNode("input",{type:"checkbox",checked:t.modelValue,onChange:n[0]||(n[0]=o=>{t.$emit("update:modelValue",o.target.checked),t.$emit("change")})},null,40,Mi),e.createTextVNode(" "+e.toDisplayString(t.label),1)])])}const Ei=Ae(vi,[["render",$i],["__scopeId","data-v-c58f997e"]]),Vi=e.defineComponent({name:"GanttConfigPanel",components:{SliderInput:Qr,ConfigSection:ss,PathTypeSelector:ws,LinkTypeColorConfig:ni,ThemeSelector:ui,LanguageSelector:Un,ColorInput:Si,CheckboxConfig:Ei},setup(){var V,C,K,oe,Q,se,Y,q,te,le,Ce,y;const{t,locale:n,setLocale:a,getLocales:r}=Ge(),s=e.ref(!1),i=e.ref(xe),o=e.ref("metro"),l=e.ref(null),f=e.computed(()=>n.value),d=e.computed(()=>r()),g=u=>{a(u)},m=e.inject("ganttContainer"),{config:w,updateConfig:I}=Dt(),k=e.ref({pathType:w.pathType||Ye.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:((oe=w.linkTypeColors)==null?void 0:oe.finishToStart)||"#3498db",startToStart:((Q=w.linkTypeColors)==null?void 0:Q.startToStart)||"#2ecc71",finishToFinish:((se=w.linkTypeColors)==null?void 0:se.finishToFinish)||"#e74c3c",startToFinish:((Y=w.linkTypeColors)==null?void 0:Y.startToFinish)||"#f39c12"},linkTypeVisibility:{finishToStart:((q=w.linkTypeVisibility)==null?void 0:q.finishToStart)??!0,startToStart:((te=w.linkTypeVisibility)==null?void 0:te.startToStart)??!0,finishToFinish:((le=w.linkTypeVisibility)==null?void 0:le.finishToFinish)??!0,startToFinish:((Ce=w.linkTypeVisibility)==null?void 0:Ce.startToFinish)??!0,parentChild:((y=w.linkTypeVisibility)==null?void 0:y.parentChild)??!0}}),_=()=>{s.value=!s.value,s.value&&setTimeout(()=>{O(o.value)},0)},c=()=>{s.value=!1},O=u=>{if(!l.value)return;const b=Oe.getThemeInfo(u);b&&(l.value.setAttribute("data-gantt-theme",u),Object.entries(b.cssVariables).forEach(([h,D])=>{l.value.style.setProperty(h,D)}))},v=u=>{o.value=u,Oe.setTheme(u),O(u)},E=()=>{I(k.value)};return e.onMounted(()=>{m!=null&&m.value?Oe.setGanttContainer(m.value):console.warn("GanttConfigPanel: ganttContainer not available"),o.value=Oe.getCurrentTheme()}),{t,isOpen:s,themes:i,currentTheme:o,linkConfig:k,currentLocale:f,locales:d,togglePanel:_,closePanel:c,selectTheme:v,selectLocale:g,updateLinkConfig:E,configPanelRef:l}}}),Ni={class:"config-panel-wrapper"},_i=["title"],Ai={class:"btn-content"},Li={class:"btn-text"},Bi=["data-gantt-theme"],Hi=["data-gantt-theme"],Yi={class:"panel-header"},Fi=["title"],Ii={class:"panel-content"},zi={class:"link-config-content"},Ri={class:"config-info-box"},Oi={width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",style:{"flex-shrink":"0"}},Pi={class:"config-group"},xi={class:"config-label"},qi={class:"config-group"},Gi={class:"config-label"},Wi={class:"config-group"},Zi={class:"config-label"},Ui={class:"config-group"},ji={class:"config-label"},Ji={value:void 0},Ki={value:"3,3"},Qi={value:"5,5"},Xi={value:"8,4"},el={value:"2,2,8,2"},tl={key:0,class:"config-group"},nl={class:"config-label"},al={class:"config-group"},ol={class:"config-label"},rl={key:0,class:"config-group"},sl={class:"config-label"},il={class:"config-group"},ll={class:"config-label"},dl={class:"config-group"},cl={class:"config-label"},ul={key:3,class:"config-group"},fl={class:"config-label"},hl={class:"config-group"},ml={class:"config-label"},pl={class:"config-group"},gl={class:"config-label"},yl={class:"config-subsection"},kl={class:"subsection-title"},bl={width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",style:{"margin-right":"4px"}},wl={class:"config-subsection"},Cl={class:"subsection-title"},Sl={width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",style:{"margin-right":"4px"}},vl={class:"config-info-box",style:{"margin-bottom":"12px"}},Tl={style:{"font-size":"11px"}},Dl={class:"config-group"},Ml={class:"config-label"},$l={class:"config-group"},El={class:"config-label"},Vl={class:"config-group"},Nl={class:"config-label"},_l={value:void 0},Al={value:"3,3"},Ll={value:"5,5"},Bl={value:"8,4"};function Hl(t,n,a,r,s,i){const o=e.resolveComponent("LanguageSelector"),l=e.resolveComponent("ConfigSection"),f=e.resolveComponent("ThemeSelector"),d=e.resolveComponent("PathTypeSelector"),g=e.resolveComponent("ColorInput"),m=e.resolveComponent("SliderInput"),w=e.resolveComponent("CheckboxConfig"),I=e.resolveComponent("LinkTypeColorConfig");return e.openBlock(),e.createElementBlock("div",Ni,[e.createElementVNode("button",{class:e.normalizeClass(["config-btn",{active:t.isOpen}]),onClick:n[0]||(n[0]=(...k)=>t.togglePanel&&t.togglePanel(...k)),title:t.t("configPanel.title")},[e.createElementVNode("div",Ai,[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",Li,e.toDisplayString(t.t("common.config")),1)])],10,_i),(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,Bi)):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",Yi,[e.createElementVNode("h3",null,e.toDisplayString(t.t("configPanel.title")),1),e.createElementVNode("button",{class:"close-btn",onClick:n[1]||(n[1]=(...k)=>t.closePanel&&t.closePanel(...k)),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,Fi)]),e.createElementVNode("div",Ii,[e.createVNode(l,{title:t.t("configPanel.languageSettings"),icon:"language"},{default:e.withCtx(()=>[e.createVNode(o,{modelValue:t.currentLocale,"onUpdate:modelValue":[n[2]||(n[2]=k=>t.currentLocale=k),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(f,{modelValue:t.currentTheme,"onUpdate:modelValue":[n[3]||(n[3]=k=>t.currentTheme=k),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",zi,[e.createElementVNode("div",Ri,[(e.openBlock(),e.createElementBlock("svg",Oi,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",Pi,[e.createElementVNode("label",xi,e.toDisplayString(t.t("configPanel.linkConfig.pathType")),1),e.createVNode(d,{modelValue:t.linkConfig.pathType,"onUpdate:modelValue":[n[4]||(n[4]=k=>t.linkConfig.pathType=k),t.updateLinkConfig]},null,8,["modelValue","onUpdate:modelValue"])]),e.createElementVNode("div",qi,[e.createElementVNode("label",Gi,e.toDisplayString(t.t("configPanel.linkConfig.color")),1),e.createVNode(g,{modelValue:t.linkConfig.color,"onUpdate:modelValue":n[5]||(n[5]=k=>t.linkConfig.color=k),onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",Wi,[e.createElementVNode("label",Zi,e.toDisplayString(t.t("configPanel.linkConfig.width"))+": "+e.toDisplayString(t.linkConfig.width)+"px",1),e.createVNode(m,{modelValue:t.linkConfig.width,"onUpdate:modelValue":n[6]||(n[6]=k=>t.linkConfig.width=k),min:1,max:5,step:.5,"label-step":1,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",Ui,[e.createElementVNode("label",ji,e.toDisplayString(t.t("configPanel.linkConfig.dashStyle")),1),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":n[7]||(n[7]=k=>t.linkConfig.dashArray=k),onChange:n[8]||(n[8]=(...k)=>t.updateLinkConfig&&t.updateLinkConfig(...k)),class:"select-input"},[e.createElementVNode("option",Ji,e.toDisplayString(t.t("configPanel.linkConfig.solid")),1),e.createElementVNode("option",Ki,e.toDisplayString(t.t("configPanel.linkConfig.shortDash")),1),e.createElementVNode("option",Qi,e.toDisplayString(t.t("configPanel.linkConfig.mediumDash")),1),e.createElementVNode("option",Xi,e.toDisplayString(t.t("configPanel.linkConfig.longDash")),1),e.createElementVNode("option",el,e.toDisplayString(t.t("configPanel.linkConfig.dotDash")),1)],544),[[e.vModelSelect,t.linkConfig.dashArray]])]),t.linkConfig.pathType==="bezier"?(e.openBlock(),e.createElementBlock("div",tl,[e.createElementVNode("label",nl,e.toDisplayString(t.t("configPanel.linkConfig.curvature"))+": "+e.toDisplayString(t.linkConfig.bezierCurvature),1),e.createVNode(m,{modelValue:t.linkConfig.bezierCurvature,"onUpdate:modelValue":n[9]||(n[9]=k=>t.linkConfig.bezierCurvature=k),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",al,[e.createElementVNode("label",ol,e.toDisplayString(t.t("configPanel.linkConfig.offset"))+": "+e.toDisplayString(t.linkConfig.rightAngleOffset)+"px",1),e.createVNode(m,{modelValue:t.linkConfig.rightAngleOffset,"onUpdate:modelValue":n[10]||(n[10]=k=>t.linkConfig.rightAngleOffset=k),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]=k=>t.linkConfig.smoothCorners=k),label:t.t("configPanel.linkConfig.smoothCorners"),onChange:t.updateLinkConfig},null,8,["modelValue","label","onChange"]),t.linkConfig.smoothCorners?(e.openBlock(),e.createElementBlock("div",rl,[e.createElementVNode("label",sl,e.toDisplayString(t.t("configPanel.linkConfig.cornerRadius"))+": "+e.toDisplayString(t.linkConfig.cornerRadius)+"px",1),e.createVNode(m,{modelValue:t.linkConfig.cornerRadius,"onUpdate:modelValue":n[12]||(n[12]=k=>t.linkConfig.cornerRadius=k),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]=k=>t.linkConfig.showArrow=k),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",il,[e.createElementVNode("label",ll,e.toDisplayString(t.t("configPanel.linkConfig.arrowSize"))+": "+e.toDisplayString(t.linkConfig.arrowSize)+"px",1),e.createVNode(m,{modelValue:t.linkConfig.arrowSize,"onUpdate:modelValue":n[14]||(n[14]=k=>t.linkConfig.arrowSize=k),min:4,max:16,step:1,"label-step":4,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",dl,[e.createElementVNode("label",cl,e.toDisplayString(t.t("configPanel.linkConfig.arrowColor")),1),e.createVNode(g,{modelValue:t.linkConfig.arrowColor,"onUpdate:modelValue":n[15]||(n[15]=k=>t.linkConfig.arrowColor=k),"show-sync":!0,"sync-label":t.t("configPanel.linkConfig.syncColor"),"sync-title":t.t("tooltip.syncArrowColor"),onChange:t.updateLinkConfig,onSync:n[16]||(n[16]=k=>{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]=k=>t.linkConfig.enableDashAnimation=k),label:t.t("configPanel.linkConfig.dashAnimation"),onChange:t.updateLinkConfig},null,8,["modelValue","label","onChange"]),t.linkConfig.enableDashAnimation?(e.openBlock(),e.createElementBlock("div",ul,[e.createElementVNode("label",fl,e.toDisplayString(t.t("configPanel.linkConfig.animationSpeed"))+": "+e.toDisplayString(t.linkConfig.dashAnimationSpeed)+"s",1),e.createVNode(m,{modelValue:t.linkConfig.dashAnimationSpeed,"onUpdate:modelValue":n[18]||(n[18]=k=>t.linkConfig.dashAnimationSpeed=k),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]=k=>t.linkConfig.showLabels=k),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",hl,[e.createElementVNode("label",ml,e.toDisplayString(t.t("configPanel.linkConfig.labelColor")),1),e.createVNode(g,{modelValue:t.linkConfig.labelColor,"onUpdate:modelValue":n[20]||(n[20]=k=>t.linkConfig.labelColor=k),onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",pl,[e.createElementVNode("label",gl,e.toDisplayString(t.t("configPanel.linkConfig.fontSize"))+": "+e.toDisplayString(t.linkConfig.labelFontSize)+"px",1),e.createVNode(m,{modelValue:t.linkConfig.labelFontSize,"onUpdate:modelValue":n[21]||(n[21]=k=>t.linkConfig.labelFontSize=k),min:8,max:16,step:1,"label-step":2,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])])],64)):e.createCommentVNode("",!0),e.createElementVNode("div",yl,[e.createElementVNode("h5",kl,[(e.openBlock(),e.createElementBlock("svg",bl,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]=k=>t.linkConfig.linkTypeColors=k),onChange:t.updateLinkConfig},null,8,["colors","onChange"])]),e.createElementVNode("div",wl,[e.createElementVNode("h5",Cl,[(e.openBlock(),e.createElementBlock("svg",Sl,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",vl,[e.createElementVNode("span",Tl,e.toDisplayString(t.t("configPanel.linkConfig.parentChildInfo")),1)]),e.createElementVNode("div",Dl,[e.createElementVNode("label",Ml,e.toDisplayString(t.t("configPanel.linkConfig.color")),1),e.createVNode(g,{modelValue:t.linkConfig.parentChildStyle.color,"onUpdate:modelValue":n[23]||(n[23]=k=>t.linkConfig.parentChildStyle.color=k),onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",$l,[e.createElementVNode("label",El,e.toDisplayString(t.t("configPanel.linkConfig.width"))+": "+e.toDisplayString(t.linkConfig.parentChildStyle.width)+"px",1),e.createVNode(m,{modelValue:t.linkConfig.parentChildStyle.width,"onUpdate:modelValue":n[24]||(n[24]=k=>t.linkConfig.parentChildStyle.width=k),min:1,max:3,step:.5,"label-step":1,onChange:t.updateLinkConfig},null,8,["modelValue","onChange"])]),e.createElementVNode("div",Vl,[e.createElementVNode("label",Nl,e.toDisplayString(t.t("configPanel.linkConfig.dashStyle")),1),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":n[25]||(n[25]=k=>t.linkConfig.parentChildStyle.dashArray=k),onChange:n[26]||(n[26]=(...k)=>t.updateLinkConfig&&t.updateLinkConfig(...k)),class:"select-input"},[e.createElementVNode("option",_l,e.toDisplayString(t.t("configPanel.linkConfig.solid")),1),e.createElementVNode("option",Al,e.toDisplayString(t.t("configPanel.linkConfig.shortDash")),1),e.createElementVNode("option",Ll,e.toDisplayString(t.t("configPanel.linkConfig.mediumDash")),1),e.createElementVNode("option",Bl,e.toDisplayString(t.t("configPanel.linkConfig.longDash")),1)],544),[[e.vModelSelect,t.linkConfig.parentChildStyle.dashArray]])])])])]),_:1},8,["title"])])],8,Hi)):e.createCommentVNode("",!0)]))])}const jn=Ae(Vi,[["render",Hl],["__scopeId","data-v-13485142"]]);var ve;(function(t){t.assertEqual=s=>s;function n(s){}t.assertIs=n;function a(s){throw new Error}t.assertNever=a,t.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},t.getValidEnumValues=s=>{const i=t.objectKeys(s).filter(l=>typeof s[s[l]]!="number"),o={};for(const l of i)o[l]=s[l];return t.objectValues(o)},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 o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},t.find=(s,i)=>{for(const o of s)if(i(o))return o},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(o=>typeof o=="string"?`'${o}'`:o).join(i)}t.joinValues=r,t.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(ve||(ve={}));var Cn;(function(t){t.mergeShapes=(n,a)=>({...n,...a})})(Cn||(Cn={}));const W=ve.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),et=t=>{switch(typeof t){case"undefined":return W.undefined;case"string":return W.string;case"number":return isNaN(t)?W.nan:W.number;case"boolean":return W.boolean;case"function":return W.function;case"bigint":return W.bigint;case"symbol":return W.symbol;case"object":return Array.isArray(t)?W.array:t===null?W.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?W.promise:typeof Map<"u"&&t instanceof Map?W.map:typeof Set<"u"&&t instanceof Set?W.set:typeof Date<"u"&&t instanceof Date?W.date:W.object;default:return W.unknown}},A=ve.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"]),Yl=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class qe 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,f=0;for(;f<o.path.length;){const d=o.path[f];f===o.path.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(a(o))):l[d]=l[d]||{_errors:[]},l=l[d],f++}}};return s(this),r}static assert(n){if(!(n instanceof qe))throw new Error(`Not a ZodError: ${n}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ve.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()}}qe.create=t=>new qe(t);const kt=(t,n)=>{let a;switch(t.code){case A.invalid_type:t.received===W.undefined?a="Required":a=`Expected ${t.expected}, received ${t.received}`;break;case A.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(t.expected,ve.jsonStringifyReplacer)}`;break;case A.unrecognized_keys:a=`Unrecognized key(s) in object: ${ve.joinValues(t.keys,", ")}`;break;case A.invalid_union:a="Invalid input";break;case A.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${ve.joinValues(t.options)}`;break;case A.invalid_enum_value:a=`Invalid enum value. Expected ${ve.joinValues(t.options)}, received '${t.received}'`;break;case A.invalid_arguments:a="Invalid function arguments";break;case A.invalid_return_type:a="Invalid function return type";break;case A.invalid_date:a="Invalid date";break;case A.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(a=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(a=`${a} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?a=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?a=`Invalid input: must end with "${t.validation.endsWith}"`:ve.assertNever(t.validation):t.validation!=="regex"?a=`Invalid ${t.validation}`:a="Invalid";break;case A.too_small:t.type==="array"?a=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?a=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?a=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?a=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:a="Invalid input";break;case A.too_big:t.type==="array"?a=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?a=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?a=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?a=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?a=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:a="Invalid input";break;case A.custom:a="Invalid input";break;case A.invalid_intersection_types:a="Intersection results could not be merged";break;case A.not_multiple_of:a=`Number must be a multiple of ${t.multipleOf}`;break;case A.not_finite:a="Number must be finite";break;default:a=n.defaultError,ve.assertNever(t)}return{message:a}};let Jn=kt;function Fl(t){Jn=t}function sn(){return Jn}const ln=t=>{const{data:n,path:a,errorMaps:r,issueData:s}=t,i=[...a,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let l="";const f=r.filter(d=>!!d).slice().reverse();for(const d of f)l=d(o,{data:n,defaultError:l}).message;return{...s,path:i,message:l}},Il=[];function R(t,n){const a=sn(),r=ln({issueData:n,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,a,a===kt?void 0:kt].filter(s=>!!s)});t.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"}),bt=t=>({status:"dirty",value:t}),Pe=t=>({status:"valid",value:t}),Sn=t=>t.status==="aborted",vn=t=>t.status==="dirty",ct=t=>t.status==="valid",Mt=t=>typeof Promise<"u"&&t instanceof Promise;function dn(t,n,a,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 Kn(t,n,a,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,a),a}typeof SuppressedError=="function"&&SuppressedError;var ae;(function(t){t.errToObj=n=>typeof n=="string"?{message:n}:n||{},t.toString=n=>typeof n=="string"?n:n==null?void 0:n.message})(ae||(ae={}));var $t,Et;class Ke{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 Qn=(t,n)=>{if(ct(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 a=new qe(t.common.issues);return this._error=a,this._error}}};function ye(t){if(!t)return{};const{errorMap:n,invalid_type_error:a,required_error:r,description:s}=t;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 f,d;const{message:g}=t;return o.code==="invalid_enum_value"?{message:g??l.defaultError}:typeof l.data>"u"?{message:(f=g??r)!==null&&f!==void 0?f:l.defaultError}:o.code!=="invalid_type"?{message:l.defaultError}:{message:(d=g??a)!==null&&d!==void 0?d:l.defaultError}},description:s}}class we{get description(){return this._def.description}_getType(n){return et(n.data)}_getOrReturnCtx(n,a){return a||{common:n.parent.common,data:n.data,parsedType:et(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:et(n.data),schemaErrorMap:this._def.errorMap,path:n.path,parent:n.parent}}}_parseSync(n){const a=this._parse(n);if(Mt(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:et(n)},i=this._parseSync({data:n,path:s.path,parent:s});return Qn(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:et(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:et(n)},s=this._parse({data:n,path:r.path,parent:r}),i=await(Mt(s)?s:Promise.resolve(s));return Qn(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:A.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(f=>f?!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 Je({schema:this,typeName:ce.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 Xe.create(this,this._def)}nullable(){return lt.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return je.create(this)}promise(){return vt.create(this,this._def)}or(n){return At.create([this,n],this._def)}and(n){return Lt.create(this,n,this._def)}transform(n){return new Je({...ye(this._def),schema:this,typeName:ce.ZodEffects,effect:{type:"transform",transform:n}})}default(n){const a=typeof n=="function"?n:()=>n;return new It({...ye(this._def),innerType:this,defaultValue:a,typeName:ce.ZodDefault})}brand(){return new Mn({typeName:ce.ZodBranded,type:this,...ye(this._def)})}catch(n){const a=typeof n=="function"?n:()=>n;return new zt({...ye(this._def),innerType:this,catchValue:a,typeName:ce.ZodCatch})}describe(n){const a=this.constructor;return new a({...this._def,description:n})}pipe(n){return Rt.create(this,n)}readonly(){return Ot.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const zl=/^c[^\s-]{8,}$/i,Rl=/^[0-9a-z]+$/,Ol=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Pl=/^[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,xl=/^[a-z0-9_-]{21}$/i,ql=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Gl=/^[-+]?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)?)??$/,Wl=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Zl="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Tn;const Ul=/^(?:(?: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])$/,jl=/^(?:(?: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])$/,Jl=/^(([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]))$/,Kl=/^(([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])$/,Ql=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Xl=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Xn="((\\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])))",ed=new RegExp(`^${Xn}$`);function ea(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 td(t){return new RegExp(`^${ea(t)}$`)}function ta(t){let n=`${Xn}T${ea(t)}`;const a=[];return a.push(t.local?"Z?":"Z"),t.offset&&a.push("([+-]\\d{2}:?\\d{2})"),n=`${n}(${a.join("|")})`,new RegExp(`^${n}$`)}function nd(t,n){return!!((n==="v4"||!n)&&Ul.test(t)||(n==="v6"||!n)&&Jl.test(t))}function ad(t,n){if(!ql.test(t))return!1;try{const[a]=t.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 od(t,n){return!!((n==="v4"||!n)&&jl.test(t)||(n==="v6"||!n)&&Kl.test(t))}class Ue extends we{_parse(n){if(this._def.coerce&&(n.data=String(n.data)),this._getType(n)!==W.string){const i=this._getOrReturnCtx(n);return R(i,{code:A.invalid_type,expected:W.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),R(s,{code:A.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),R(s,{code:A.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?R(s,{code:A.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):l&&R(s,{code:A.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")Wl.test(n.data)||(s=this._getOrReturnCtx(n,s),R(s,{validation:"email",code:A.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")Tn||(Tn=new RegExp(Zl,"u")),Tn.test(n.data)||(s=this._getOrReturnCtx(n,s),R(s,{validation:"emoji",code:A.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")Pl.test(n.data)||(s=this._getOrReturnCtx(n,s),R(s,{validation:"uuid",code:A.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")xl.test(n.data)||(s=this._getOrReturnCtx(n,s),R(s,{validation:"nanoid",code:A.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")zl.test(n.data)||(s=this._getOrReturnCtx(n,s),R(s,{validation:"cuid",code:A.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")Rl.test(n.data)||(s=this._getOrReturnCtx(n,s),R(s,{validation:"cuid2",code:A.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")Ol.test(n.data)||(s=this._getOrReturnCtx(n,s),R(s,{validation:"ulid",code:A.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(n.data)}catch{s=this._getOrReturnCtx(n,s),R(s,{validation:"url",code:A.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),R(s,{validation:"regex",code:A.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),R(s,{code:A.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),R(s,{code:A.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?n.data.endsWith(i.value)||(s=this._getOrReturnCtx(n,s),R(s,{code:A.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?ta(i).test(n.data)||(s=this._getOrReturnCtx(n,s),R(s,{code:A.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?ed.test(n.data)||(s=this._getOrReturnCtx(n,s),R(s,{code:A.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?td(i).test(n.data)||(s=this._getOrReturnCtx(n,s),R(s,{code:A.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Gl.test(n.data)||(s=this._getOrReturnCtx(n,s),R(s,{validation:"duration",code:A.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?nd(n.data,i.version)||(s=this._getOrReturnCtx(n,s),R(s,{validation:"ip",code:A.invalid_string,message:i.message}),r.dirty()):i.kind==="jwt"?ad(n.data,i.alg)||(s=this._getOrReturnCtx(n,s),R(s,{validation:"jwt",code:A.invalid_string,message:i.message}),r.dirty()):i.kind==="cidr"?od(n.data,i.version)||(s=this._getOrReturnCtx(n,s),R(s,{validation:"cidr",code:A.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Ql.test(n.data)||(s=this._getOrReturnCtx(n,s),R(s,{validation:"base64",code:A.invalid_string,message:i.message}),r.dirty()):i.kind==="base64url"?Xl.test(n.data)||(s=this._getOrReturnCtx(n,s),R(s,{validation:"base64url",code:A.invalid_string,message:i.message}),r.dirty()):ve.assertNever(i);return{status:r.value,value:n.data}}_regex(n,a,r){return this.refinement(s=>n.test(s),{validation:a,code:A.invalid_string,...ae.errToObj(r)})}_addCheck(n){return new Ue({...this._def,checks:[...this._def.checks,n]})}email(n){return this._addCheck({kind:"email",...ae.errToObj(n)})}url(n){return this._addCheck({kind:"url",...ae.errToObj(n)})}emoji(n){return this._addCheck({kind:"emoji",...ae.errToObj(n)})}uuid(n){return this._addCheck({kind:"uuid",...ae.errToObj(n)})}nanoid(n){return this._addCheck({kind:"nanoid",...ae.errToObj(n)})}cuid(n){return this._addCheck({kind:"cuid",...ae.errToObj(n)})}cuid2(n){return this._addCheck({kind:"cuid2",...ae.errToObj(n)})}ulid(n){return this._addCheck({kind:"ulid",...ae.errToObj(n)})}base64(n){return this._addCheck({kind:"base64",...ae.errToObj(n)})}base64url(n){return this._addCheck({kind:"base64url",...ae.errToObj(n)})}jwt(n){return this._addCheck({kind:"jwt",...ae.errToObj(n)})}ip(n){return this._addCheck({kind:"ip",...ae.errToObj(n)})}cidr(n){return this._addCheck({kind:"cidr",...ae.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,...ae.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,...ae.errToObj(n==null?void 0:n.message)})}duration(n){return this._addCheck({kind:"duration",...ae.errToObj(n)})}regex(n,a){return this._addCheck({kind:"regex",regex:n,...ae.errToObj(a)})}includes(n,a){return this._addCheck({kind:"includes",value:n,position:a==null?void 0:a.position,...ae.errToObj(a==null?void 0:a.message)})}startsWith(n,a){return this._addCheck({kind:"startsWith",value:n,...ae.errToObj(a)})}endsWith(n,a){return this._addCheck({kind:"endsWith",value:n,...ae.errToObj(a)})}min(n,a){return this._addCheck({kind:"min",value:n,...ae.errToObj(a)})}max(n,a){return this._addCheck({kind:"max",value:n,...ae.errToObj(a)})}length(n,a){return this._addCheck({kind:"length",value:n,...ae.errToObj(a)})}nonempty(n){return this.min(1,ae.errToObj(n))}trim(){return new Ue({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ue({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ue({...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}}Ue.create=t=>{var n;return new Ue({checks:[],typeName:ce.ZodString,coerce:(n=t==null?void 0:t.coerce)!==null&&n!==void 0?n:!1,...ye(t)})};function rd(t,n){const a=(t.toString().split(".")[1]||"").length,r=(n.toString().split(".")[1]||"").length,s=a>r?a:r,i=parseInt(t.toFixed(s).replace(".","")),o=parseInt(n.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class rt extends we{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)!==W.number){const i=this._getOrReturnCtx(n);return R(i,{code:A.invalid_type,expected:W.number,received:i.parsedType}),ue}let r;const s=new ze;for(const i of this._def.checks)i.kind==="int"?ve.isInteger(n.data)||(r=this._getOrReturnCtx(n,r),R(r,{code:A.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),R(r,{code:A.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),R(r,{code:A.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?rd(n.data,i.value)!==0&&(r=this._getOrReturnCtx(n,r),R(r,{code:A.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(n.data)||(r=this._getOrReturnCtx(n,r),R(r,{code:A.not_finite,message:i.message}),s.dirty()):ve.assertNever(i);return{status:s.value,value:n.data}}gte(n,a){return this.setLimit("min",n,!0,ae.toString(a))}gt(n,a){return this.setLimit("min",n,!1,ae.toString(a))}lte(n,a){return this.setLimit("max",n,!0,ae.toString(a))}lt(n,a){return this.setLimit("max",n,!1,ae.toString(a))}setLimit(n,a,r,s){return new rt({...this._def,checks:[...this._def.checks,{kind:n,value:a,inclusive:r,message:ae.toString(s)}]})}_addCheck(n){return new rt({...this._def,checks:[...this._def.checks,n]})}int(n){return this._addCheck({kind:"int",message:ae.toString(n)})}positive(n){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ae.toString(n)})}negative(n){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ae.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ae.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ae.toString(n)})}multipleOf(n,a){return this._addCheck({kind:"multipleOf",value:n,message:ae.toString(a)})}finite(n){return this._addCheck({kind:"finite",message:ae.toString(n)})}safe(n){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ae.toString(n)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ae.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"&&ve.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)}}rt.create=t=>new rt({checks:[],typeName:ce.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...ye(t)});class st extends we{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)!==W.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),R(r,{code:A.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),R(r,{code:A.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),R(r,{code:A.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):ve.assertNever(i);return{status:s.value,value:n.data}}_getInvalidInput(n){const a=this._getOrReturnCtx(n);return R(a,{code:A.invalid_type,expected:W.bigint,received:a.parsedType}),ue}gte(n,a){return this.setLimit("min",n,!0,ae.toString(a))}gt(n,a){return this.setLimit("min",n,!1,ae.toString(a))}lte(n,a){return this.setLimit("max",n,!0,ae.toString(a))}lt(n,a){return this.setLimit("max",n,!1,ae.toString(a))}setLimit(n,a,r,s){return new st({...this._def,checks:[...this._def.checks,{kind:n,value:a,inclusive:r,message:ae.toString(s)}]})}_addCheck(n){return new st({...this._def,checks:[...this._def.checks,n]})}positive(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ae.toString(n)})}negative(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ae.toString(n)})}nonpositive(n){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ae.toString(n)})}nonnegative(n){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ae.toString(n)})}multipleOf(n,a){return this._addCheck({kind:"multipleOf",value:n,message:ae.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}}st.create=t=>{var n;return new st({checks:[],typeName:ce.ZodBigInt,coerce:(n=t==null?void 0:t.coerce)!==null&&n!==void 0?n:!1,...ye(t)})};class Vt extends we{_parse(n){if(this._def.coerce&&(n.data=!!n.data),this._getType(n)!==W.boolean){const r=this._getOrReturnCtx(n);return R(r,{code:A.invalid_type,expected:W.boolean,received:r.parsedType}),ue}return Pe(n.data)}}Vt.create=t=>new Vt({typeName:ce.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...ye(t)});class ut extends we{_parse(n){if(this._def.coerce&&(n.data=new Date(n.data)),this._getType(n)!==W.date){const i=this._getOrReturnCtx(n);return R(i,{code:A.invalid_type,expected:W.date,received:i.parsedType}),ue}if(isNaN(n.data.getTime())){const i=this._getOrReturnCtx(n);return R(i,{code:A.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),R(s,{code:A.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),R(s,{code:A.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):ve.assertNever(i);return{status:r.value,value:new Date(n.data.getTime())}}_addCheck(n){return new ut({...this._def,checks:[...this._def.checks,n]})}min(n,a){return this._addCheck({kind:"min",value:n.getTime(),message:ae.toString(a)})}max(n,a){return this._addCheck({kind:"max",value:n.getTime(),message:ae.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}}ut.create=t=>new ut({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ce.ZodDate,...ye(t)});class cn extends we{_parse(n){if(this._getType(n)!==W.symbol){const r=this._getOrReturnCtx(n);return R(r,{code:A.invalid_type,expected:W.symbol,received:r.parsedType}),ue}return Pe(n.data)}}cn.create=t=>new cn({typeName:ce.ZodSymbol,...ye(t)});class Nt extends we{_parse(n){if(this._getType(n)!==W.undefined){const r=this._getOrReturnCtx(n);return R(r,{code:A.invalid_type,expected:W.undefined,received:r.parsedType}),ue}return Pe(n.data)}}Nt.create=t=>new Nt({typeName:ce.ZodUndefined,...ye(t)});class _t extends we{_parse(n){if(this._getType(n)!==W.null){const r=this._getOrReturnCtx(n);return R(r,{code:A.invalid_type,expected:W.null,received:r.parsedType}),ue}return Pe(n.data)}}_t.create=t=>new _t({typeName:ce.ZodNull,...ye(t)});class wt extends we{constructor(){super(...arguments),this._any=!0}_parse(n){return Pe(n.data)}}wt.create=t=>new wt({typeName:ce.ZodAny,...ye(t)});class ft extends we{constructor(){super(...arguments),this._unknown=!0}_parse(n){return Pe(n.data)}}ft.create=t=>new ft({typeName:ce.ZodUnknown,...ye(t)});class tt extends we{_parse(n){const a=this._getOrReturnCtx(n);return R(a,{code:A.invalid_type,expected:W.never,received:a.parsedType}),ue}}tt.create=t=>new tt({typeName:ce.ZodNever,...ye(t)});class un extends we{_parse(n){if(this._getType(n)!==W.undefined){const r=this._getOrReturnCtx(n);return R(r,{code:A.invalid_type,expected:W.void,received:r.parsedType}),ue}return Pe(n.data)}}un.create=t=>new un({typeName:ce.ZodVoid,...ye(t)});class je extends we{_parse(n){const{ctx:a,status:r}=this._processInputParams(n),s=this._def;if(a.parsedType!==W.array)return R(a,{code:A.invalid_type,expected:W.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)&&(R(a,{code:o?A.too_big:A.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&&(R(a,{code:A.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&&(R(a,{code:A.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 Ke(a,o,a.path,l)))).then(o=>ze.mergeArray(r,o));const i=[...a.data].map((o,l)=>s.type._parseSync(new Ke(a,o,a.path,l)));return ze.mergeArray(r,i)}get element(){return this._def.type}min(n,a){return new je({...this._def,minLength:{value:n,message:ae.toString(a)}})}max(n,a){return new je({...this._def,maxLength:{value:n,message:ae.toString(a)}})}length(n,a){return new je({...this._def,exactLength:{value:n,message:ae.toString(a)}})}nonempty(n){return this.min(1,n)}}je.create=(t,n)=>new je({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ce.ZodArray,...ye(n)});function Ct(t){if(t instanceof He){const n={};for(const a in t.shape){const r=t.shape[a];n[a]=Xe.create(Ct(r))}return new He({...t._def,shape:()=>n})}else return t instanceof je?new je({...t._def,type:Ct(t.element)}):t instanceof Xe?Xe.create(Ct(t.unwrap())):t instanceof lt?lt.create(Ct(t.unwrap())):t instanceof Qe?Qe.create(t.items.map(n=>Ct(n))):t}class He extends we{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=ve.objectKeys(n);return this._cached={shape:n,keys:a}}_parse(n){if(this._getType(n)!==W.object){const d=this._getOrReturnCtx(n);return R(d,{code:A.invalid_type,expected:W.object,received:d.parsedType}),ue}const{status:r,ctx:s}=this._processInputParams(n),{shape:i,keys:o}=this._getCached(),l=[];if(!(this._def.catchall instanceof tt&&this._def.unknownKeys==="strip"))for(const d in s.data)o.includes(d)||l.push(d);const f=[];for(const d of o){const g=i[d],m=s.data[d];f.push({key:{status:"valid",value:d},value:g._parse(new Ke(s,m,s.path,d)),alwaysSet:d in s.data})}if(this._def.catchall instanceof tt){const d=this._def.unknownKeys;if(d==="passthrough")for(const g of l)f.push({key:{status:"valid",value:g},value:{status:"valid",value:s.data[g]}});else if(d==="strict")l.length>0&&(R(s,{code:A.unrecognized_keys,keys:l}),r.dirty());else if(d!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const d=this._def.catchall;for(const g of l){const m=s.data[g];f.push({key:{status:"valid",value:g},value:d._parse(new Ke(s,m,s.path,g)),alwaysSet:g in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const d=[];for(const g of f){const m=await g.key,w=await g.value;d.push({key:m,value:w,alwaysSet:g.alwaysSet})}return d}).then(d=>ze.mergeObjectSync(r,d)):ze.mergeObjectSync(r,f)}get shape(){return this._def.shape()}strict(n){return ae.errToObj,new He({...this._def,unknownKeys:"strict",...n!==void 0?{errorMap:(a,r)=>{var s,i,o,l;const f=(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=ae.errToObj(n).message)!==null&&l!==void 0?l:f}:{message:f}}}:{}})}strip(){return new He({...this._def,unknownKeys:"strip"})}passthrough(){return new He({...this._def,unknownKeys:"passthrough"})}extend(n){return new He({...this._def,shape:()=>({...this._def.shape(),...n})})}merge(n){return new He({unknownKeys:n._def.unknownKeys,catchall:n._def.catchall,shape:()=>({...this._def.shape(),...n._def.shape()}),typeName:ce.ZodObject})}setKey(n,a){return this.augment({[n]:a})}catchall(n){return new He({...this._def,catchall:n})}pick(n){const a={};return ve.objectKeys(n).forEach(r=>{n[r]&&this.shape[r]&&(a[r]=this.shape[r])}),new He({...this._def,shape:()=>a})}omit(n){const a={};return ve.objectKeys(this.shape).forEach(r=>{n[r]||(a[r]=this.shape[r])}),new He({...this._def,shape:()=>a})}deepPartial(){return Ct(this)}partial(n){const a={};return ve.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];n&&!n[r]?a[r]=s:a[r]=s.optional()}),new He({...this._def,shape:()=>a})}required(n){const a={};return ve.objectKeys(this.shape).forEach(r=>{if(n&&!n[r])a[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Xe;)i=i._def.innerType;a[r]=i}}),new He({...this._def,shape:()=>a})}keyof(){return na(ve.objectKeys(this.shape))}}He.create=(t,n)=>new He({shape:()=>t,unknownKeys:"strip",catchall:tt.create(),typeName:ce.ZodObject,...ye(n)}),He.strictCreate=(t,n)=>new He({shape:()=>t,unknownKeys:"strict",catchall:tt.create(),typeName:ce.ZodObject,...ye(n)}),He.lazycreate=(t,n)=>new He({shape:t,unknownKeys:"strip",catchall:tt.create(),typeName:ce.ZodObject,...ye(n)});class At extends we{_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 qe(l.ctx.common.issues));return R(a,{code:A.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 f of r){const d={...a,common:{...a.common,issues:[]},parent:null},g=f._parseSync({data:a.data,path:a.path,parent:d});if(g.status==="valid")return g;g.status==="dirty"&&!i&&(i={result:g,ctx:d}),d.common.issues.length&&o.push(d.common.issues)}if(i)return a.common.issues.push(...i.ctx.common.issues),i.result;const l=o.map(f=>new qe(f));return R(a,{code:A.invalid_union,unionErrors:l}),ue}}get options(){return this._def.options}}At.create=(t,n)=>new At({options:t,typeName:ce.ZodUnion,...ye(n)});const nt=t=>t instanceof Ht?nt(t.schema):t instanceof Je?nt(t.innerType()):t instanceof Yt?[t.value]:t instanceof it?t.options:t instanceof Ft?ve.objectValues(t.enum):t instanceof It?nt(t._def.innerType):t instanceof Nt?[void 0]:t instanceof _t?[null]:t instanceof Xe?[void 0,...nt(t.unwrap())]:t instanceof lt?[null,...nt(t.unwrap())]:t instanceof Mn||t instanceof Ot?nt(t.unwrap()):t instanceof zt?nt(t._def.innerType):[];class fn extends we{_parse(n){const{ctx:a}=this._processInputParams(n);if(a.parsedType!==W.object)return R(a,{code:A.invalid_type,expected:W.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}):(R(a,{code:A.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=nt(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 fn({typeName:ce.ZodDiscriminatedUnion,discriminator:n,options:a,optionsMap:s,...ye(r)})}}function Dn(t,n){const a=et(t),r=et(n);if(t===n)return{valid:!0,data:t};if(a===W.object&&r===W.object){const s=ve.objectKeys(n),i=ve.objectKeys(t).filter(l=>s.indexOf(l)!==-1),o={...t,...n};for(const l of i){const f=Dn(t[l],n[l]);if(!f.valid)return{valid:!1};o[l]=f.data}return{valid:!0,data:o}}else if(a===W.array&&r===W.array){if(t.length!==n.length)return{valid:!1};const s=[];for(let i=0;i<t.length;i++){const o=t[i],l=n[i],f=Dn(o,l);if(!f.valid)return{valid:!1};s.push(f.data)}return{valid:!0,data:s}}else return a===W.date&&r===W.date&&+t==+n?{valid:!0,data:t}:{valid:!1}}class Lt extends we{_parse(n){const{status:a,ctx:r}=this._processInputParams(n),s=(i,o)=>{if(Sn(i)||Sn(o))return ue;const l=Dn(i.value,o.value);return l.valid?((vn(i)||vn(o))&&a.dirty(),{status:a.value,value:l.data}):(R(r,{code:A.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}))}}Lt.create=(t,n,a)=>new Lt({left:t,right:n,typeName:ce.ZodIntersection,...ye(a)});class Qe extends we{_parse(n){const{status:a,ctx:r}=this._processInputParams(n);if(r.parsedType!==W.array)return R(r,{code:A.invalid_type,expected:W.array,received:r.parsedType}),ue;if(r.data.length<this._def.items.length)return R(r,{code:A.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ue;!this._def.rest&&r.data.length>this._def.items.length&&(R(r,{code:A.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),a.dirty());const i=[...r.data].map((o,l)=>{const f=this._def.items[l]||this._def.rest;return f?f._parse(new Ke(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 Qe({...this._def,rest:n})}}Qe.create=(t,n)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Qe({items:t,typeName:ce.ZodTuple,rest:null,...ye(n)})};class Bt extends we{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!==W.object)return R(r,{code:A.invalid_type,expected:W.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 Ke(r,l,r.path,l)),value:o._parse(new Ke(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 we?new Bt({keyType:n,valueType:a,typeName:ce.ZodRecord,...ye(r)}):new Bt({keyType:Ue.create(),valueType:n,typeName:ce.ZodRecord,...ye(a)})}}class hn extends we{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!==W.map)return R(r,{code:A.invalid_type,expected:W.map,received:r.parsedType}),ue;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([l,f],d)=>({key:s._parse(new Ke(r,l,r.path,[d,"key"])),value:i._parse(new Ke(r,f,r.path,[d,"value"]))}));if(r.common.async){const l=new Map;return Promise.resolve().then(async()=>{for(const f of o){const d=await f.key,g=await f.value;if(d.status==="aborted"||g.status==="aborted")return ue;(d.status==="dirty"||g.status==="dirty")&&a.dirty(),l.set(d.value,g.value)}return{status:a.value,value:l}})}else{const l=new Map;for(const f of o){const d=f.key,g=f.value;if(d.status==="aborted"||g.status==="aborted")return ue;(d.status==="dirty"||g.status==="dirty")&&a.dirty(),l.set(d.value,g.value)}return{status:a.value,value:l}}}}hn.create=(t,n,a)=>new hn({valueType:n,keyType:t,typeName:ce.ZodMap,...ye(a)});class ht extends we{_parse(n){const{status:a,ctx:r}=this._processInputParams(n);if(r.parsedType!==W.set)return R(r,{code:A.invalid_type,expected:W.set,received:r.parsedType}),ue;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(R(r,{code:A.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&&(R(r,{code:A.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(f){const d=new Set;for(const g of f){if(g.status==="aborted")return ue;g.status==="dirty"&&a.dirty(),d.add(g.value)}return{status:a.value,value:d}}const l=[...r.data.values()].map((f,d)=>i._parse(new Ke(r,f,r.path,d)));return r.common.async?Promise.all(l).then(f=>o(f)):o(l)}min(n,a){return new ht({...this._def,minSize:{value:n,message:ae.toString(a)}})}max(n,a){return new ht({...this._def,maxSize:{value:n,message:ae.toString(a)}})}size(n,a){return this.min(n,a).max(n,a)}nonempty(n){return this.min(1,n)}}ht.create=(t,n)=>new ht({valueType:t,minSize:null,maxSize:null,typeName:ce.ZodSet,...ye(n)});class St extends we{constructor(){super(...arguments),this.validate=this.implement}_parse(n){const{ctx:a}=this._processInputParams(n);if(a.parsedType!==W.function)return R(a,{code:A.invalid_type,expected:W.function,received:a.parsedType}),ue;function r(l,f){return ln({data:l,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,sn(),kt].filter(d=>!!d),issueData:{code:A.invalid_arguments,argumentsError:f}})}function s(l,f){return ln({data:l,path:a.path,errorMaps:[a.common.contextualErrorMap,a.schemaErrorMap,sn(),kt].filter(d=>!!d),issueData:{code:A.invalid_return_type,returnTypeError:f}})}const i={errorMap:a.common.contextualErrorMap},o=a.data;if(this._def.returns instanceof vt){const l=this;return Pe(async function(...f){const d=new qe([]),g=await l._def.args.parseAsync(f,i).catch(I=>{throw d.addIssue(r(f,I)),d}),m=await Reflect.apply(o,this,g);return await l._def.returns._def.type.parseAsync(m,i).catch(I=>{throw d.addIssue(s(m,I)),d})})}else{const l=this;return Pe(function(...f){const d=l._def.args.safeParse(f,i);if(!d.success)throw new qe([r(f,d.error)]);const g=Reflect.apply(o,this,d.data),m=l._def.returns.safeParse(g,i);if(!m.success)throw new qe([s(g,m.error)]);return m.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...n){return new St({...this._def,args:Qe.create(n).rest(ft.create())})}returns(n){return new St({...this._def,returns:n})}implement(n){return this.parse(n)}strictImplement(n){return this.parse(n)}static create(n,a,r){return new St({args:n||Qe.create([]).rest(ft.create()),returns:a||ft.create(),typeName:ce.ZodFunction,...ye(r)})}}class Ht extends we{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})}}Ht.create=(t,n)=>new Ht({getter:t,typeName:ce.ZodLazy,...ye(n)});class Yt extends we{_parse(n){if(n.data!==this._def.value){const a=this._getOrReturnCtx(n);return R(a,{received:a.data,code:A.invalid_literal,expected:this._def.value}),ue}return{status:"valid",value:n.data}}get value(){return this._def.value}}Yt.create=(t,n)=>new Yt({value:t,typeName:ce.ZodLiteral,...ye(n)});function na(t,n){return new it({values:t,typeName:ce.ZodEnum,...ye(n)})}class it extends we{constructor(){super(...arguments),$t.set(this,void 0)}_parse(n){if(typeof n.data!="string"){const a=this._getOrReturnCtx(n),r=this._def.values;return R(a,{expected:ve.joinValues(r),received:a.parsedType,code:A.invalid_type}),ue}if(dn(this,$t)||Kn(this,$t,new Set(this._def.values)),!dn(this,$t).has(n.data)){const a=this._getOrReturnCtx(n),r=this._def.values;return R(a,{received:a.data,code:A.invalid_enum_value,options:r}),ue}return Pe(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 it.create(n,{...this._def,...a})}exclude(n,a=this._def){return it.create(this.options.filter(r=>!n.includes(r)),{...this._def,...a})}}$t=new WeakMap,it.create=na;class Ft extends we{constructor(){super(...arguments),Et.set(this,void 0)}_parse(n){const a=ve.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(n);if(r.parsedType!==W.string&&r.parsedType!==W.number){const s=ve.objectValues(a);return R(r,{expected:ve.joinValues(s),received:r.parsedType,code:A.invalid_type}),ue}if(dn(this,Et)||Kn(this,Et,new Set(ve.getValidEnumValues(this._def.values))),!dn(this,Et).has(n.data)){const s=ve.objectValues(a);return R(r,{received:r.data,code:A.invalid_enum_value,options:s}),ue}return Pe(n.data)}get enum(){return this._def.values}}Et=new WeakMap,Ft.create=(t,n)=>new Ft({values:t,typeName:ce.ZodNativeEnum,...ye(n)});class vt extends we{unwrap(){return this._def.type}_parse(n){const{ctx:a}=this._processInputParams(n);if(a.parsedType!==W.promise&&a.common.async===!1)return R(a,{code:A.invalid_type,expected:W.promise,received:a.parsedType}),ue;const r=a.parsedType===W.promise?a.data:Promise.resolve(a.data);return Pe(r.then(s=>this._def.type.parseAsync(s,{path:a.path,errorMap:a.common.contextualErrorMap})))}}vt.create=(t,n)=>new vt({type:t,typeName:ce.ZodPromise,...ye(n)});class Je extends we{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ce.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=>{R(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 f=await this._def.schema._parseAsync({data:l,path:r.path,parent:r});return f.status==="aborted"?ue:f.status==="dirty"||a.value==="dirty"?bt(f.value):f});{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"?bt(l.value):l}}if(s.type==="refinement"){const o=l=>{const f=s.refinement(l,i);if(r.common.async)return Promise.resolve(f);if(f 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);ve.assertNever(s)}}Je.create=(t,n,a)=>new Je({schema:t,typeName:ce.ZodEffects,effect:n,...ye(a)}),Je.createWithPreprocess=(t,n,a)=>new Je({schema:n,effect:{type:"preprocess",transform:t},typeName:ce.ZodEffects,...ye(a)});class Xe extends we{_parse(n){return this._getType(n)===W.undefined?Pe(void 0):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}Xe.create=(t,n)=>new Xe({innerType:t,typeName:ce.ZodOptional,...ye(n)});class lt extends we{_parse(n){return this._getType(n)===W.null?Pe(null):this._def.innerType._parse(n)}unwrap(){return this._def.innerType}}lt.create=(t,n)=>new lt({innerType:t,typeName:ce.ZodNullable,...ye(n)});class It extends we{_parse(n){const{ctx:a}=this._processInputParams(n);let r=a.data;return a.parsedType===W.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:a.path,parent:a})}removeDefault(){return this._def.innerType}}It.create=(t,n)=>new It({innerType:t,typeName:ce.ZodDefault,defaultValue:typeof n.default=="function"?n.default:()=>n.default,...ye(n)});class zt extends we{_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 Mt(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new qe(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new qe(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}zt.create=(t,n)=>new zt({innerType:t,typeName:ce.ZodCatch,catchValue:typeof n.catch=="function"?n.catch:()=>n.catch,...ye(n)});class mn extends we{_parse(n){if(this._getType(n)!==W.nan){const r=this._getOrReturnCtx(n);return R(r,{code:A.invalid_type,expected:W.nan,received:r.parsedType}),ue}return{status:"valid",value:n.data}}}mn.create=t=>new mn({typeName:ce.ZodNaN,...ye(t)});const sd=Symbol("zod_brand");class Mn extends we{_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 Rt extends we{_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(),bt(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 Rt({in:n,out:a,typeName:ce.ZodPipeline})}}class Ot extends we{_parse(n){const a=this._def.innerType._parse(n),r=s=>(ct(s)&&(s.value=Object.freeze(s.value)),s);return Mt(a)?a.then(s=>r(s)):r(a)}unwrap(){return this._def.innerType}}Ot.create=(t,n)=>new Ot({innerType:t,typeName:ce.ZodReadonly,...ye(n)});function aa(t,n){const a=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t;return typeof a=="string"?{message:a}:a}function oa(t,n={},a){return t?wt.create().superRefine((r,s)=>{var i,o;const l=t(r);if(l instanceof Promise)return l.then(f=>{var d,g;if(!f){const m=aa(n,r),w=(g=(d=m.fatal)!==null&&d!==void 0?d:a)!==null&&g!==void 0?g:!0;s.addIssue({code:"custom",...m,fatal:w})}});if(!l){const f=aa(n,r),d=(o=(i=f.fatal)!==null&&i!==void 0?i:a)!==null&&o!==void 0?o:!0;s.addIssue({code:"custom",...f,fatal:d})}}):wt.create()}const id={object:He.lazycreate};var ce;(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"})(ce||(ce={}));const ld=(t,n={message:`Input not instance of ${t.name}`})=>oa(a=>a instanceof t,n),ra=Ue.create,sa=rt.create,dd=mn.create,cd=st.create,ia=Vt.create,ud=ut.create,fd=cn.create,hd=Nt.create,md=_t.create,pd=wt.create,gd=ft.create,yd=tt.create,kd=un.create,bd=je.create,wd=He.create,Cd=He.strictCreate,Sd=At.create,vd=fn.create,Td=Lt.create,Dd=Qe.create,Md=Bt.create,$d=hn.create,Ed=ht.create,Vd=St.create,Nd=Ht.create,_d=Yt.create,Ad=it.create,Ld=Ft.create,Bd=vt.create,la=Je.create,Hd=Xe.create,Yd=lt.create,Fd=Je.createWithPreprocess,Id=Rt.create;var dt=Object.freeze({__proto__:null,defaultErrorMap:kt,setErrorMap:Fl,getErrorMap:sn,makeIssue:ln,EMPTY_PATH:Il,addIssueToContext:R,ParseStatus:ze,INVALID:ue,DIRTY:bt,OK:Pe,isAborted:Sn,isDirty:vn,isValid:ct,isAsync:Mt,get util(){return ve},get objectUtil(){return Cn},ZodParsedType:W,getParsedType:et,ZodType:we,datetimeRegex:ta,ZodString:Ue,ZodNumber:rt,ZodBigInt:st,ZodBoolean:Vt,ZodDate:ut,ZodSymbol:cn,ZodUndefined:Nt,ZodNull:_t,ZodAny:wt,ZodUnknown:ft,ZodNever:tt,ZodVoid:un,ZodArray:je,ZodObject:He,ZodUnion:At,ZodDiscriminatedUnion:fn,ZodIntersection:Lt,ZodTuple:Qe,ZodRecord:Bt,ZodMap:hn,ZodSet:ht,ZodFunction:St,ZodLazy:Ht,ZodLiteral:Yt,ZodEnum:it,ZodNativeEnum:Ft,ZodPromise:vt,ZodEffects:Je,ZodTransformer:Je,ZodOptional:Xe,ZodNullable:lt,ZodDefault:It,ZodCatch:zt,ZodNaN:mn,BRAND:sd,ZodBranded:Mn,ZodPipeline:Rt,ZodReadonly:Ot,custom:oa,Schema:we,ZodSchema:we,late:id,get ZodFirstPartyTypeKind(){return ce},coerce:{string:t=>Ue.create({...t,coerce:!0}),number:t=>rt.create({...t,coerce:!0}),boolean:t=>Vt.create({...t,coerce:!0}),bigint:t=>st.create({...t,coerce:!0}),date:t=>ut.create({...t,coerce:!0})},any:pd,array:bd,bigint:cd,boolean:ia,date:ud,discriminatedUnion:vd,effect:la,enum:Ad,function:Vd,instanceof:ld,intersection:Td,lazy:Nd,literal:_d,map:$d,nan:dd,nativeEnum:Ld,never:yd,null:md,nullable:Yd,number:sa,object:wd,oboolean:()=>ia().optional(),onumber:()=>sa().optional(),optional:Hd,ostring:()=>ra().optional(),pipeline:Id,preprocess:Fd,promise:Bd,record:Md,set:Ed,strictObject:Cd,string:ra,symbol:fd,transformer:la,tuple:Dd,undefined:hd,union:Sd,unknown:gd,void:kd,NEVER:ue,ZodIssueCode:A,quotelessJson:Yl,ZodError:qe});dt.object({date:dt.string().regex(/^\d{4}-\d{2}-\d{2}$/),year:dt.number().int(),month:dt.number().int().min(1).max(12),week:dt.number().int().min(1).max(7),monthStr:dt.string(),weekStr:dt.string(),day:dt.number().int().min(1).max(31)}),p.extend(fa),p.extend(ga);const zd=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:On,SplitPane:ho,TaskTable:ir,RightTable:Wr,GanttConfigPanel:jn},setup(t){const{t:n,locale:a}=Ge(),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=e.computed(()=>t.dataConfig.mapFields),i=e.computed(()=>t.dataConfig.dataSource),{config:o,updateConfig:l}=Dt(),f=e.computed(()=>o.linkTypeVisibility||{finishToStart:!0,startToStart:!0,finishToFinish:!0,startToFinish:!0,parentChild:!0}),d=(T,J)=>{l({linkTypeVisibility:{[T]:J}})},g=e.ref([]),m=e.ref(35),w=e.ref(["button","button","button","button is-active","button"]),I=e.ref("日"),k=e.ref(S.daySubMode),_=e.ref(!1),c=e.ref(null),O=e.ref(null),v=e.ref(0),E=e.ref(0),V=e.ref(t.dataConfig.queryStartDate||p().locale(r()).startOf("month").format("YYYY-MM-DD")),C=e.ref(p().locale(r()).add(-5,"y").format("YYYY-MM-DD")),K=e.ref(p().locale(r()).add(5,"y").format("YYYY-MM-DD")),oe=e.ref(!1),Q=e.ref(V.value),se=e.ref(t.dataConfig.queryEndDate||p().locale(r()).endOf("month").format("YYYY-MM-DD")),Y=e.ref(p().locale(r()).add(-5,"y").format("YYYY-MM-DD")),q=e.ref(p(V.value).locale(r()).add(5,"y").format("YYYY-MM-DD")),te=e.ref(!1),le=e.ref(se.value),Ce=e.ref([]),y=e.ref([]),u=e.ref([]),b=e.ref([]),h=e.ref(0),D=e.ref(0),H=e.ref(V.value+" 00:00:00"),L=e.ref(se.value+" 23:59:59"),F=e.ref(""),Z=e.ref(),U=e.computed(()=>S.subTask),j=e.computed(()=>S.editTask),ee=e.computed(()=>S.removeTask),ie=e.computed(()=>S.rootTask),de=e.computed(()=>S.allowChangeTaskDate),$e=T=>{const J=p(Q.value),pe=p(le.value);if(!(!J.isValid()||!pe.isValid()||pe.diff(J,"day")<0)){switch(H.value=Q.value+" 00:00:00",L.value=le.value+" 23:59:59",u.value=[],y.value=[],Ce.value=[],b.value=[],T){case"季度":{h.value=200;const z=[];let B=J.startOf("quarter");const re=pe.endOf("quarter");for(;B.isBefore(re)||B.isSame(re,"quarter");)z.push(B),B=B.add(1,"quarter");[...new Set(z.map(be=>be.year()))].forEach(be=>{const N=z.filter(me=>me.year()===be),G=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value);Ce.value.push({title:be+(G?"年":""),width:N.length*h.value})}),z.forEach(be=>{const N=be.quarter(),me=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value)?`第${N}季度`:`Q${N}`;y.value.push({title:me,width:h.value,fulldate:be.format("YYYY-MM-DD")})}),D.value=z.length;break}case"月":{h.value=120;let z=J.startOf("month");const B=pe.endOf("month"),re=[];let Me=z.startOf("year");for(;Me.isBefore(B)||Me.isSame(B,"year");)re.push(Me.year()),Me=Me.add(1,"year");for(re.forEach(be=>{p().year(be).startOf("year").endOf("year");let G=0,me=z.clone();for(;me.isBefore(B)||me.isSame(B,"month");)me.year()===be&&G++,me=me.add(1,"month");if(G>0){const Be=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value)?be+"年":be.toString();Ce.value.push({title:Be,width:G*h.value})}}),z=J.startOf("month");z.isBefore(B)||z.isSame(B,"month");){const be=z.locale(r()).format("MMM");u.value.push({title:be,width:h.value,fulldate:z.format("YYYY-MM-DD")}),z=z.add(1,"month")}D.value=u.value.length;break}case"周":{h.value=120;let z=J.startOf("isoWeek");const B=pe.endOf("isoWeek"),re=[];let Me=z.startOf("month");for(;Me.isBefore(B)||Me.isSame(B,"month");)re.push(Me.format("YYYY-MM-DD")),Me=Me.add(1,"month");for(re.forEach((be,N)=>{const G=p(be),me=G.endOf("month");let De=0,Be=z.clone();for(;Be.isBefore(B)||Be.isSame(B,"week");){const Ie=Be.startOf("isoWeek"),pt=Be.endOf("isoWeek");(Ie.isSame(G,"month")||pt.isSame(G,"month")||Ie.isBefore(me)&&pt.isAfter(G))&&De++,Be=Be.add(1,"week")}if(De>0){const pt=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value)?G.format("YYYY年MM月"):G.locale(r()).format("MMMM YYYY");Ce.value.push({title:pt,width:De*h.value})}});z.isBefore(B)||z.isSame(B,"week");){const be=z.startOf("isoWeek"),N=z.endOf("isoWeek"),me=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value)?`第${z.isoWeek()}周 (${be.format("MM/DD")}-${N.format("MM/DD")})`:`Week ${z.isoWeek()} (${be.format("MM/DD")}-${N.format("MM/DD")})`;u.value.push({title:me,width:h.value,fulldate:be.format("YYYY-MM-DD")}),z=z.add(1,"week")}D.value=u.value.length;break}case"日":{const z=k.value==="half";h.value=z?40:80;let B=J;const re=[];for(;B.isBefore(pe)||B.isSame(pe,"day");)re.push(B),B=B.add(1,"day");[...new Set(re.map(N=>N.year()))].forEach(N=>{const G=re.filter(Be=>Be.year()===N),me=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value),De=z?G.length*2*h.value:G.length*h.value;Ce.value.push({title:N+(me?"年":""),width:De})});const be=new Map;re.forEach(N=>{const G=`${N.year()}-${N.month()}`;be.has(G)||be.set(G,[]),be.get(G).push(N)}),be.forEach((N,G)=>{const me=N[0].locale(r()).format("MMM"),De=z?N.length*2*h.value:N.length*h.value;u.value.push({title:me,width:De,fulldate:N[0].format("YYYY-MM-DD")})}),z?(re.forEach(N=>{const me=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value)?N.format("DD")+"日":N.format("DD"),De=N.format("YYYY-MM-DD");y.value.push({title:me,width:h.value*2,fulldate:De});const Be=a.value==="zh-CN"||a.value==="zh-TW"?"上午":a.value==="ja-JP"?"午前":a.value==="ko-KR"?"오전":"AM",Ie=a.value==="zh-CN"||a.value==="zh-TW"?"下午":a.value==="ja-JP"?"午後":a.value==="ko-KR"?"오후":"PM";b.value.push({title:Be,width:h.value,fulldate:De+"-AM"}),b.value.push({title:Ie,width:h.value,fulldate:De+"-PM"})}),D.value=re.length*2):(re.forEach(N=>{const me=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value)?N.format("DD")+"日":N.format("DD"),De=N.format("YYYY-MM-DD");y.value.push({title:me,width:h.value,fulldate:De})}),D.value=y.value.length);break}case"时":{h.value=30;let z=J;const B=pe.endOf("day");for(;z.isBefore(B);){const Me=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value)?z.locale(r()).format("MMMM DD")+"日":z.locale(r()).format("MMMM DD"),be=z.format("YYYY-MM-DD"),N=z.locale(r()).format("dddd");u.value.push({title:N,width:24*h.value,fulldate:be}),y.value.push({title:Me,width:24*h.value,fulldate:be});for(let G=0;G<=23;G++){const me=["zh-CN","zh-TW","ja-JP","ko-KR"].includes(a.value);b.value.push({title:me?G+"点":`${G}:00`,width:h.value})}z=z.add(1,"day")}D.value=b.value.length;break}}t.eventConfig.queryTask(Q.value,le.value,I.value)}},$=(T,J)=>{let pe=T.filter(x=>x[s.value.id]===J);pe&&pe.length>0&&(F.value=pe[0].index+"."+F.value,$(T,pe[0][s.value.parentId]))},M=(T,J,pe)=>{let x=J.filter(z=>z[s.value.parentId]===T);if(x&&x.length>0){pe++;for(let z=0;z<x.length;z++){x[z].treeLevel=pe,x[z].index=z+1;let B=g.value.filter(re=>re[s.value.id]===x[z][s.value.parentId]);F.value="",B&&B.length>0?(F.value=B[0].index+"."+x[z].index,$(g.value,B[0][s.value.parentId]),x[z].no=F.value):x[z].no=z+1+"",g.value.push(x[z]),M(x[z][s.value.id],J,pe)}}},ne=T=>{for(let J=0;J<w.value.length;J++)w.value[J]="button";switch(T){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}case"时":{w.value[4]="button is-active";break}}I.value=T,e.nextTick(()=>{const J=document.querySelector(".table .content");J&&(J.scrollLeft=0)})},P=()=>{fe.setDaySubMode(k.value),$e("日")},X=e.computed(()=>({position:"fixed",top:`${v.value}px`,left:`${E.value}px`,zIndex:100002})),ke=()=>{setTimeout(()=>{(!O.value||!document.querySelector(".day-submenu-popup:hover"))&&(_.value=!1)},100)},Ne=T=>{k.value=T,fe.setDaySubMode(T),$e("日"),_.value=!1};e.watch(_,T=>{if(T&&c.value){const J=c.value.getBoundingClientRect();v.value=J.bottom+5,E.value=J.left}});const Te=T=>{p(se.value).diff(p(T.date),"days")<0&&(le.value=T.date,se.value=T.date,fe.setEndGanttDate(p(T.date).toDate())),oe.value=!1,Q.value=T.date,V.value=T.date,fe.setStartGanttDate(p(T.date).toDate()),Y.value=T.date},Ve=T=>{p(T.date).diff(p(V.value),"days")<0&&(Q.value=p(T.date).format("YYYY-MM-DD"),V.value=p(T.date).format("YYYY-MM-DD"),fe.setStartGanttDate(p(T.date).toDate())),te.value=!1,le.value=T.date,se.value=T.date,fe.setEndGanttDate(p(T.date).toDate())};e.watch([I,Q,le],([T,J,pe],[x,z,B])=>{(T!==x||J!==z||pe!==B)&&$e(T)}),e.watch(a,()=>{$e(I.value)}),e.watch(ie,T=>{t.eventConfig.addRootTask(T)}),e.watch(U,T=>{t.eventConfig.addSubTask(T)}),e.watch(ee,T=>{t.eventConfig.removeTask(T)}),e.watch(j,T=>{t.eventConfig.editTask(T)}),e.watch(de,T=>{t.eventConfig.allowChangeTaskDate(T)}),e.watch(()=>S.barDate,T=>{if(T){const{id:J,startDate:pe,endDate:x}=T;J&&pe&&x&&t.eventConfig.barDate(J,pe,x)}}),e.watch(h,T=>{fe.setScale(T)}),e.watch(()=>t.dataConfig.taskHeaders,T=>{fe.setTaskHeaders(T)}),e.watch([Ce,y,u,b],([T,J,pe,x])=>{fe.setMonthHeaders(T),fe.setDayHeaders(J),fe.setWeekHeaders(pe),fe.setHourHeaders(x)}),e.watch(I,T=>{fe.setMode(T)}),e.watch(s,T=>{T&&fe.setMapFields(T)}),e.watch(()=>t.dataConfig.queryStartDate,T=>{T&&(fe.setStartGanttDate(p(T).toDate()),H.value=T,Q.value=T,V.value=T)}),e.watch(()=>t.dataConfig.queryEndDate,T=>{T&&(fe.setEndGanttDate(p(T).toDate()),L.value=T,le.value=T,se.value=T)}),e.watch(D,T=>{T&&fe.setTimelineCellCount(T)}),e.onBeforeMount(()=>{fe.setStartGanttDate(p(V.value).toDate()),fe.setEndGanttDate(p(se.value).toDate()),fe.setMonthHeaders(Ce.value),fe.setWeekHeaders(u.value),fe.setDayHeaders(y.value),fe.setHourHeaders(b.value),fe.setTaskHeaders(t.dataConfig.taskHeaders),fe.setMapFields(s.value),fe.setTimelineCellCount(D.value),i.value&&i.value.length>0&&fe.setTasks(i.value)});const _e=T=>{const J=T;t.eventConfig.updateProgress&&t.eventConfig.updateProgress(J.detail)};e.onMounted(()=>{Ce.value=[],u.value=[],y.value=[],b.value=[],M("0",i.value,0),fe.setTasks(g.value),e.nextTick(()=>{fe.setMode(I.value),$e(I.value)}),window.addEventListener("taskProgressUpdate",_e)});let Ee=null;e.watch(i,T=>{T&&T.length>0?(Ee&&clearTimeout(Ee),Ee=setTimeout(()=>{g.value=[],M("0",T,0),fe.setTasks(g.value),Ee=null},100)):T&&T.length===0&&fe.setTasks([])},{immediate:!1}),e.onBeforeUnmount(()=>{window.removeEventListener("taskProgressUpdate",_e)}),e.provide(gt.AddRootTaskSymbol,T=>t.eventConfig.addRootTask(T)),e.provide(gt.SetBarColorSymbol,T=>t.styleConfig.setBarColor(T)),t.styleConfig.setTaskType&&e.provide(gt.SetTaskTypeSymbol,t.styleConfig.setTaskType),e.provide("ganttContainer",Z);const Le=e.ref("metro");try{const T=localStorage.getItem("gantt-theme");T&&(Le.value=T)}catch(T){console.warn("Failed to load theme from localStorage:",T)}e.provide("currentTheme",Le),e.watch(()=>t.dataConfig.dependencies,T=>{T&&T.length>0&&(an.clear(),T.forEach(J=>{an.addDependency(J)}))},{immediate:!0});const he=T=>{},Fe=e.computed(()=>{var T,J,pe,x;return{finishToStart:((T=o.linkTypeColors)==null?void 0:T.finishToStart)||"#3498db",startToStart:((J=o.linkTypeColors)==null?void 0:J.startToStart)||"#2ecc71",finishToFinish:((pe=o.linkTypeColors)==null?void 0:pe.finishToFinish)||"#e74c3c",startToFinish:((x=o.linkTypeColors)==null?void 0:x.startToFinish)||"#f39c12"}});return{t:n,subTask:U,editTask:j,removeTask:ee,rootTask:ie,allowChangeTaskDate:de,paneLengthPercent:m,startDate:V,endDate:se,minStartDate:C,maxStartDate:K,confirmStart:Te,minEndDate:Y,maxEndDate:q,confirmEnd:Ve,buttonClass:w,timeMode:ne,mode:I,daySubMode:k,showDaySubMenu:_,dayButtonRef:c,daySubMenuRef:O,daySubMenuPosition:X,handleDayButtonMouseLeave:ke,selectDaySubMode:Ne,onDaySubModeChange:P,onLinkConfigChange:he,ganttContainer:Z,linkTypeColors:Fe,linkTypeVisibility:f,updateLinkVisibility:d}}}),Rd={class:"page gantt-container",ref:"ganttContainer"},Od={class:"toolbar"},Pd={class:"dateInput"},xd={style:{"margin-right":"20px","margin-left":"20px",color:"#606266"}},qd={class:"buttonGroup"},Gd={class:"metro-content"},Wd={class:"metro-text"},Zd={class:"metro-content"},Ud={class:"metro-text"},jd={class:"metro-content"},Jd={class:"metro-text"},Kd={class:"metro-content"},Qd={class:"metro-text"},Xd={class:"metro-content"},ec={class:"metro-text"},tc={class:"link-legend"},nc={class:"legend-title"},ac={class:"legend-items"},oc=["checked"],rc={class:"legend-label"},sc={class:"legend-desc"},ic=["checked"],lc={width:"24",height:"12",viewBox:"0 0 24 12"},dc=["stroke"],cc=["fill"],uc={class:"legend-label"},fc={class:"legend-desc"},hc=["checked"],mc={width:"24",height:"12",viewBox:"0 0 24 12"},pc=["stroke"],gc=["fill"],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"},Tc={class:"legend-desc"},Dc=["checked"],Mc={width:"24",height:"12",viewBox:"0 0 24 12"},$c=["stroke"],Ec=["fill"],Vc={class:"legend-label"},Nc={class:"legend-desc"},_c={class:"config-buttons"},Ac={class:"gantt"};function Lc(t,n,a,r,s,i){const o=e.resolveComponent("DatePicker"),l=e.resolveComponent("GanttConfigPanel"),f=e.resolveComponent("TaskTable"),d=e.resolveComponent("RightTable"),g=e.resolveComponent("SplitPane");return e.openBlock(),e.createElementBlock("div",Rd,[e.createElementVNode("div",Od,[e.createElementVNode("div",Pd,[e.createVNode(o,{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",xd,e.toDisplayString(t.t("common.to")),1),e.createVNode(o,{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",qd,[e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[0],"metro-btn"]),onClick:n[0]||(n[0]=m=>t.timeMode("季度"))},[e.createElementVNode("div",Gd,[n[17]||(n[17]=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 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)),e.createElementVNode("div",Wd,e.toDisplayString(t.t("viewMode.quarter")),1)])],2),e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[1],"metro-btn"]),onClick:n[1]||(n[1]=m=>t.timeMode("月"))},[e.createElementVNode("div",Zd,[n[18]||(n[18]=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",Ud,e.toDisplayString(t.t("viewMode.month")),1)])],2),e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[2],"metro-btn"]),onClick:n[2]||(n[2]=m=>t.timeMode("周"))},[e.createElementVNode("div",jd,[n[19]||(n[19]=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",Jd,e.toDisplayString(t.t("viewMode.week")),1)])],2),e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[3],"metro-btn"]),onClick:n[3]||(n[3]=m=>t.timeMode("日")),onMouseenter:n[4]||(n[4]=m=>t.showDaySubMenu=!0),onMouseleave:n[5]||(n[5]=(...m)=>t.handleDayButtonMouseLeave&&t.handleDayButtonMouseLeave(...m)),ref:"dayButtonRef"},[e.createElementVNode("div",Kd,[n[20]||(n[20]=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",Qd,e.toDisplayString(t.daySubMode==="half"?t.t("viewMode.halfDay"):t.t("viewMode.day")),1)])],34),e.createElementVNode("div",{class:e.normalizeClass([t.buttonClass[4],"metro-btn"]),onClick:n[6]||(n[6]=m=>t.timeMode("时"))},[e.createElementVNode("div",Xd,[n[21]||(n[21]=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",ec,e.toDisplayString(t.t("viewMode.hour")),1)])],2)]),e.createElementVNode("div",tc,[e.createElementVNode("div",nc,[n[22]||(n[22]=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",ac,[e.createElementVNode("label",{class:e.normalizeClass(["legend-item",{disabled:!t.linkTypeVisibility.parentChild}]),title:"父子关系:显示任务的层级结构"},[e.createElementVNode("input",{type:"checkbox",checked:t.linkTypeVisibility.parentChild,onChange:n[7]||(n[7]=m=>t.updateLinkVisibility("parentChild",m.target.checked))},null,40,oc),n[23]||(n[23]=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",rc,e.toDisplayString(t.t("link.pc")),1),e.createElementVNode("span",sc,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[8]||(n[8]=m=>t.updateLinkVisibility("finishToStart",m.target.checked))},null,40,ic),(e.openBlock(),e.createElementBlock("svg",lc,[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:t.linkTypeColors.finishToStart,"stroke-width":"2"},null,8,dc),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:t.linkTypeColors.finishToStart},null,8,cc)])),e.createElementVNode("span",uc,e.toDisplayString(t.t("link.fs")),1),e.createElementVNode("span",fc,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[9]||(n[9]=m=>t.updateLinkVisibility("startToStart",m.target.checked))},null,40,hc),(e.openBlock(),e.createElementBlock("svg",mc,[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:t.linkTypeColors.startToStart,"stroke-width":"2"},null,8,pc),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:t.linkTypeColors.startToStart},null,8,gc)])),e.createElementVNode("span",yc,e.toDisplayString(t.t("link.ss")),1),e.createElementVNode("span",kc,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[10]||(n[10]=m=>t.updateLinkVisibility("finishToFinish",m.target.checked))},null,40,bc),(e.openBlock(),e.createElementBlock("svg",wc,[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:t.linkTypeColors.finishToFinish,"stroke-width":"2"},null,8,Cc),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:t.linkTypeColors.finishToFinish},null,8,Sc)])),e.createElementVNode("span",vc,e.toDisplayString(t.t("link.ff")),1),e.createElementVNode("span",Tc,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[11]||(n[11]=m=>t.updateLinkVisibility("startToFinish",m.target.checked))},null,40,Dc),(e.openBlock(),e.createElementBlock("svg",Mc,[e.createElementVNode("line",{x1:"0",y1:"6",x2:"18",y2:"6",stroke:t.linkTypeColors.startToFinish,"stroke-width":"2"},null,8,$c),e.createElementVNode("polygon",{points:"24,6 18,3 18,9",fill:t.linkTypeColors.startToFinish},null,8,Ec)])),e.createElementVNode("span",Vc,e.toDisplayString(t.t("link.sf")),1),e.createElementVNode("span",Nc,e.toDisplayString(t.t("link.startToFinish")),1)],2)])]),e.createElementVNode("div",_c,[e.createVNode(l)])]),(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[t.showDaySubMenu&&t.mode==="日"?(e.openBlock(),e.createElementBlock("div",{key:0,class:"day-submenu-popup",ref:"daySubMenuRef",style:e.normalizeStyle(t.daySubMenuPosition),onMouseenter:n[14]||(n[14]=m=>t.showDaySubMenu=!0),onMouseleave:n[15]||(n[15]=m=>t.showDaySubMenu=!1)},[e.createElementVNode("div",{class:e.normalizeClass(["submenu-item",{active:t.daySubMode==="full"}]),onClick:n[12]||(n[12]=m=>t.selectDaySubMode("full"))},e.toDisplayString(t.t("viewMode.fullDay")),3),e.createElementVNode("div",{class:e.normalizeClass(["submenu-item",{active:t.daySubMode==="half"}]),onClick:n[13]||(n[13]=m=>t.selectDaySubMode("half"))},e.toDisplayString(t.t("viewMode.halfDay")),3)],36)):e.createCommentVNode("",!0)])),e.createElementVNode("div",Ac,[e.createVNode(g,{direction:"row",min:0,max:100,triggerLength:10,paneLengthPercent:t.paneLengthPercent,"onUpdate:paneLengthPercent":n[16]||(n[16]=m=>t.paneLengthPercent=m)},{one:e.withCtx(()=>[e.createVNode(f,{headersHeight:t.styleConfig.headersHeight,rowHeight:t.styleConfig.rowHeight},null,8,["headersHeight","rowHeight"])]),two:e.withCtx(()=>[e.createVNode(d,{ref:"barContent",headersHeight:t.styleConfig.headersHeight,rowHeight:t.styleConfig.rowHeight},null,8,["headersHeight","rowHeight"])]),_:1},8,["paneLengthPercent"])])],512)}const pn=Ae(zd,[["render",Lc],["__scopeId","data-v-3daabcfa"]]),Bc=e.defineComponent({name:"GanttThemeSelector",setup(){const{t}=Ge(),n=e.ref(!1),a=e.inject("currentTheme",e.ref("metro")),r=e.ref(""),s=e.ref(),i=e.ref(xe),o=e.inject("ganttContainer"),l=()=>{n.value=!n.value},f=()=>{n.value=!1,m()},d=v=>{a.value=v,r.value="",c(v);let E=null;if(o&&o.value?E=o.value:E=document.querySelector(".gantt-container")||document.querySelector(".page")||document.querySelector('[class*="gantt"]'),E){E.setAttribute("data-gantt-theme",v);const V=document.querySelector(".page");V&&V.setAttribute("data-gantt-theme",v);try{localStorage.setItem("gantt-theme",v)}catch(C){console.warn("Failed to save theme:",C)}setTimeout(()=>{E&&(E.style.display="none",E.offsetHeight,E.style.display="")},50)}f()},g=v=>{v!==a.value&&o&&o.value&&(r.value=v,c(v))},m=()=>{r.value&&o&&o.value&&(r.value="",c(a.value))},w=()=>{const v=Oe.exportThemeConfig(),E=new Blob([v],{type:"application/json"}),V=URL.createObjectURL(E),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 v;(v=s.value)==null||v.click()},k=v=>{var V;const E=(V=v.target.files)==null?void 0:V[0];if(E){const C=new FileReader;C.onload=K=>{var oe;try{const Q=(oe=K.target)==null?void 0:oe.result;Oe.importThemeConfig(Q)?(a.value=Oe.getCurrentTheme(),alert("主题配置导入成功!")):alert("主题配置文件格式错误!")}catch{alert("主题配置文件格式错误!")}},C.readAsText(E)}},_=v=>{v.target.closest(".gantt-theme-selector")||f()},c=v=>{const E=document.getElementById("gantt-theme-styles");E&&E.remove();const V=xe.find(Q=>Q.id===v);if(!V)return;const C=document.createElement("style");C.id="gantt-theme-styles";const K=Object.entries(V.cssVariables).map(([Q,se])=>`${Q}: ${se};`).join(`
|
|
76
76
|
`);C.textContent=`
|
|
77
|
-
/* 甘特图主题样式 - ${
|
|
77
|
+
/* 甘特图主题样式 - ${v} */
|
|
78
78
|
.page.gantt-container,
|
|
79
79
|
.page.gantt-container *,
|
|
80
80
|
.gantt-container,
|
|
81
81
|
.gantt-container *,
|
|
82
|
-
[data-gantt-theme="${
|
|
83
|
-
[data-gantt-theme="${
|
|
82
|
+
[data-gantt-theme="${v}"],
|
|
83
|
+
[data-gantt-theme="${v}"] *,
|
|
84
84
|
.toolbar,
|
|
85
85
|
.toolbar *,
|
|
86
86
|
.buttonGroup,
|
|
@@ -98,26 +98,26 @@
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
/* 强制应用到特定元素 */
|
|
101
|
-
.page[data-gantt-theme="${
|
|
101
|
+
.page[data-gantt-theme="${v}"] .toolbar {
|
|
102
102
|
background: var(--bg-metal-normal) !important;
|
|
103
103
|
border-bottom: 1px solid var(--border) !important;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
.page[data-gantt-theme="${
|
|
106
|
+
.page[data-gantt-theme="${v}"] .buttonGroup {
|
|
107
107
|
background: var(--bg-metal-normal) !important;
|
|
108
108
|
border: 1px solid var(--border) !important;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
.page[data-gantt-theme="${
|
|
111
|
+
.page[data-gantt-theme="${v}"] .metro-btn {
|
|
112
112
|
background: var(--bg-metal-normal) !important;
|
|
113
113
|
color: var(--text-secondary) !important;
|
|
114
114
|
border-right: 1px solid var(--border) !important;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
.page[data-gantt-theme="${
|
|
118
|
-
.page[data-gantt-theme="${
|
|
117
|
+
.page[data-gantt-theme="${v}"] .metro-btn.is-active,
|
|
118
|
+
.page[data-gantt-theme="${v}"] .metro-btn.button.is-active {
|
|
119
119
|
background: var(--bg-active) !important;
|
|
120
120
|
color: var(--text-white) !important;
|
|
121
121
|
}
|
|
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"}})});
|
|
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:",o),console.log("📦 ganttContainer.value:",o==null?void 0:o.value);try{const E=localStorage.getItem("gantt-theme");E&&xe.find(V=>V.id===E)&&(a.value=E,console.log("💾 Loaded theme from localStorage:",E))}catch(E){console.warn("Failed to load theme from localStorage:",E)}console.log("🎨 Current theme:",a.value),c(a.value);let v=null;if(o&&o.value?(v=o.value,console.log("✅ Using injected container reference")):(v=document.querySelector(".gantt-container")||document.querySelector(".page")||document.querySelector('[class*="gantt"]'),console.log("🔍 Using DOM query fallback, found:",v)),v){v.setAttribute("data-gantt-theme",a.value),console.log("✅ Container attribute set to:",a.value);const E=document.querySelector(".page");E&&(E.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..."),O()},500);console.log("✅ Theme initialization completed")};return e.watchEffect(()=>{o&&o.value&&e.nextTick(()=>{O()})}),e.onMounted(()=>{document.addEventListener("click",_),(!o||!o.value)&&setTimeout(()=>{O()},200)}),e.onUnmounted(()=>{document.removeEventListener("click",_),m()}),{t,availableThemes:i,isOpen:n,currentTheme:a,previewTheme:r,fileInput:s,toggleSelector:l,closeSelector:f,selectTheme:d,onPreviewTheme:g,onCancelPreview:m,exportConfig:w,importConfig:I,handleFileImport:k}}}),Hc={class:"gantt-theme-selector"},Yc={class:"theme-dropdown-header"},Fc={class:"theme-grid"},Ic=["onClick","onMouseenter"],zc={class:"theme-preview-content"},Rc={class:"theme-info"},Oc={class:"theme-name"},Pc={class:"theme-description"},xc={class:"theme-status"},qc={key:0,class:"status-badge current"},Gc={key:1,class:"status-badge preview"},Wc={class:"theme-actions"};function Zc(t,n,a,r,s,i){return e.openBlock(),e.createElementBlock("div",Hc,[e.createElementVNode("div",{class:e.normalizeClass(["theme-selector-trigger",{active:t.isOpen}]),onClick:n[0]||(n[0]=(...o)=>t.toggleSelector&&t.toggleSelector(...o))},[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",Yc,[n[11]||(n[11]=e.createElementVNode("h3",null,"选择主题",-1)),e.createElementVNode("button",{class:"close-btn",onClick:n[1]||(n[1]=(...o)=>t.closeSelector&&t.closeSelector(...o))},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",Fc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.availableThemes,o=>(e.openBlock(),e.createElementBlock("div",{key:o.id,class:e.normalizeClass(["theme-card",{active:t.currentTheme===o.id,preview:t.previewTheme===o.id}]),onClick:l=>t.selectTheme(o.id),onMouseenter:l=>t.onPreviewTheme(o.id),onMouseleave:n[2]||(n[2]=(...l)=>t.onCancelPreview&&t.onCancelPreview(...l))},[e.createElementVNode("div",{class:"theme-preview",style:e.normalizeStyle({backgroundColor:o.preview})},[e.createElementVNode("div",zc,[e.createElementVNode("div",{class:"preview-header",style:e.normalizeStyle({backgroundColor:o.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",Rc,[e.createElementVNode("h4",Oc,e.toDisplayString(t.t(o.nameKey)),1),e.createElementVNode("p",Pc,e.toDisplayString(t.t(o.descKey)),1)]),e.createElementVNode("div",xc,[t.currentTheme===o.id?(e.openBlock(),e.createElementBlock("div",qc,"当前")):t.previewTheme===o.id?(e.openBlock(),e.createElementBlock("div",Gc,"预览")):e.createCommentVNode("",!0)])],42,Ic))),128))]),e.createElementVNode("div",Wc,[e.createElementVNode("button",{class:"action-btn",onClick:n[3]||(n[3]=(...o)=>t.exportConfig&&t.exportConfig(...o))},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]=(...o)=>t.importConfig&&t.importConfig(...o))},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]=(...o)=>t.handleFileImport&&t.handleFileImport(...o))},null,544)])}const Uc=Ae(Bc,[["render",Zc],["__scopeId","data-v-4b6192d6"]]),jc=e.defineComponent({name:"LinkConfigPanel",emits:["close","configChange"],setup(t,{emit:n}){const{config:a,setTheme:r,updateConfig:s,reset:i,exportConfig:o,importConfig:l,themes:f}=Dt(),d=e.ref(!1),g=e.ref(""),m=[{value:Ye.STRAIGHT,name:"直线",preview:"M 10 20 L 50 20"},{value:Ye.BEZIER,name:"贝塞尔曲线",preview:"M 10 20 C 25 20 35 20 50 20"},{value:Ye.RIGHT_ANGLE,name:"直角连线",preview:"M 10 20 L 30 20 L 30 30 L 50 30"}],w={default:"默认",business:"商务",modern:"现代",minimal:"简约",colorful:"彩色"};return{config:a,pathTypes:m,themes:f,showImportDialog:d,importText:g,getThemeName:V=>w[V]||V,isCurrentTheme:V=>{const C=f[V];return C?Object.keys(C).every(K=>{const oe=C[K],Q=a[K];return typeof oe=="object"&&typeof Q=="object"?JSON.stringify(oe)===JSON.stringify(Q):oe===Q}):!1},updateConfig:()=>{s(a),n("configChange",a)},applyTheme:V=>{r(V),n("configChange",a)},resetConfig:()=>{i(),n("configChange",a)},exportConfig:()=>{const V=o();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(g.value)?(d.value=!1,g.value="",n("configChange",a),alert("配置导入成功")):alert("配置格式错误,请检查JSON格式")}catch(V){alert("配置导入失败:"+V)}}}}}),Jc={class:"link-config-panel"},Kc={class:"panel-header"},Qc={class:"panel-content"},Xc={class:"config-section"},eu={class:"path-type-selector"},tu=["value","onUpdate:modelValue"],nu={class:"path-preview"},au={width:"60",height:"40",viewBox:"0 0 60 40"},ou=["d"],ru={class:"config-section"},su={class:"config-row"},iu={class:"config-row"},lu={class:"value"},du={class:"config-row"},cu={key:0,class:"config-section"},uu={class:"config-row"},fu={class:"value"},hu={key:1,class:"config-section"},mu={class:"config-row"},pu={class:"value"},gu={class:"config-row"},yu={key:0,class:"config-row"},ku={class:"value"},bu={class:"config-section"},wu={class:"config-row"},Cu={key:0},Su={class:"config-row"},vu={class:"value"},Tu={class:"config-row"},Du=["placeholder"],Mu={class:"config-section"},$u={class:"config-row"},Eu={key:0},Vu={class:"config-row"},Nu={class:"value"},_u={class:"config-section"},Au={class:"config-row"},Lu={key:0},Bu={class:"config-row"},Hu={class:"config-row"},Yu={class:"value"},Fu={class:"config-section"},Iu={class:"config-row"},zu={class:"config-row"},Ru={class:"value"},Ou={class:"config-row"},Pu={class:"config-section"},xu={class:"theme-selector"},qu=["onClick"],Gu={class:"config-section"},Wu={class:"action-buttons"},Zu={class:"import-actions"};function Uu(t,n,a,r,s,i){return e.openBlock(),e.createElementBlock("div",Jc,[e.createElementVNode("div",Kc,[n[47]||(n[47]=e.createElementVNode("h3",null,"连线配置",-1)),e.createElementVNode("button",{class:"close-btn",onClick:n[0]||(n[0]=o=>t.$emit("close")),title:"关闭"},"×")]),e.createElementVNode("div",Qc,[e.createElementVNode("div",Xc,[n[48]||(n[48]=e.createElementVNode("h4",null,"路径类型",-1)),e.createElementVNode("div",eu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.pathTypes,o=>(e.openBlock(),e.createElementBlock("label",{key:o.value,class:e.normalizeClass(["path-type-option",{active:t.config.pathType===o.value}])},[e.withDirectives(e.createElementVNode("input",{type:"radio",value:o.value,"onUpdate:modelValue":l=>t.config.pathType=l,onChange:n[1]||(n[1]=(...l)=>t.updateConfig&&t.updateConfig(...l))},null,40,tu),[[e.vModelRadio,t.config.pathType]]),e.createElementVNode("div",nu,[(e.openBlock(),e.createElementBlock("svg",au,[e.createElementVNode("path",{d:o.preview,stroke:"#3498db","stroke-width":"2",fill:"none"},null,8,ou)]))]),e.createElementVNode("span",null,e.toDisplayString(o.name),1)],2))),128))])]),e.createElementVNode("div",ru,[n[53]||(n[53]=e.createElementVNode("h4",null,"基础样式",-1)),e.createElementVNode("div",su,[n[49]||(n[49]=e.createElementVNode("label",null,"颜色:",-1)),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[2]||(n[2]=o=>t.config.color=o),onChange:n[3]||(n[3]=(...o)=>t.updateConfig&&t.updateConfig(...o)),class:"color-input"},null,544),[[e.vModelText,t.config.color]])]),e.createElementVNode("div",iu,[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]=o=>t.config.width=o),onInput:n[5]||(n[5]=(...o)=>t.updateConfig&&t.updateConfig(...o)),class:"range-input"},null,544),[[e.vModelText,t.config.width,void 0,{number:!0}]]),e.createElementVNode("span",lu,e.toDisplayString(t.config.width)+"px",1)]),e.createElementVNode("div",du,[n[52]||(n[52]=e.createElementVNode("label",null,"虚线样式:",-1)),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":n[6]||(n[6]=o=>t.config.dashArray=o),onChange:n[7]||(n[7]=(...o)=>t.updateConfig&&t.updateConfig(...o)),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",cu,[n[55]||(n[55]=e.createElementVNode("h4",null,"贝塞尔曲线配置",-1)),e.createElementVNode("div",uu,[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]=o=>t.config.bezierCurvature=o),onInput:n[9]||(n[9]=(...o)=>t.updateConfig&&t.updateConfig(...o)),class:"range-input"},null,544),[[e.vModelText,t.config.bezierCurvature,void 0,{number:!0}]]),e.createElementVNode("span",fu,e.toDisplayString(t.config.bezierCurvature),1)])])):e.createCommentVNode("",!0),t.config.pathType==="right-angle"?(e.openBlock(),e.createElementBlock("div",hu,[n[59]||(n[59]=e.createElementVNode("h4",null,"直角连线配置",-1)),e.createElementVNode("div",mu,[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]=o=>t.config.rightAngleOffset=o),onInput:n[11]||(n[11]=(...o)=>t.updateConfig&&t.updateConfig(...o)),class:"range-input"},null,544),[[e.vModelText,t.config.rightAngleOffset,void 0,{number:!0}]]),e.createElementVNode("span",pu,e.toDisplayString(t.config.rightAngleOffset)+"px",1)]),e.createElementVNode("div",gu,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[12]||(n[12]=o=>t.config.smoothCorners=o),onChange:n[13]||(n[13]=(...o)=>t.updateConfig&&t.updateConfig(...o))},null,544),[[e.vModelCheckbox,t.config.smoothCorners]]),n[57]||(n[57]=e.createTextVNode(" 平滑转角 "))])]),t.config.smoothCorners?(e.openBlock(),e.createElementBlock("div",yu,[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]=o=>t.config.cornerRadius=o),onInput:n[15]||(n[15]=(...o)=>t.updateConfig&&t.updateConfig(...o)),class:"range-input"},null,544),[[e.vModelText,t.config.cornerRadius,void 0,{number:!0}]]),e.createElementVNode("span",ku,e.toDisplayString(t.config.cornerRadius)+"px",1)])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",bu,[n[63]||(n[63]=e.createElementVNode("h4",null,"箭头配置",-1)),e.createElementVNode("div",wu,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[16]||(n[16]=o=>t.config.showArrow=o),onChange:n[17]||(n[17]=(...o)=>t.updateConfig&&t.updateConfig(...o))},null,544),[[e.vModelCheckbox,t.config.showArrow]]),n[60]||(n[60]=e.createTextVNode(" 显示箭头 "))])]),t.config.showArrow?(e.openBlock(),e.createElementBlock("div",Cu,[e.createElementVNode("div",Su,[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]=o=>t.config.arrowSize=o),onInput:n[19]||(n[19]=(...o)=>t.updateConfig&&t.updateConfig(...o)),class:"range-input"},null,544),[[e.vModelText,t.config.arrowSize,void 0,{number:!0}]]),e.createElementVNode("span",vu,e.toDisplayString(t.config.arrowSize)+"px",1)]),e.createElementVNode("div",Tu,[n[62]||(n[62]=e.createElementVNode("label",null,"箭头颜色:",-1)),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[20]||(n[20]=o=>t.config.arrowColor=o),onChange:n[21]||(n[21]=(...o)=>t.updateConfig&&t.updateConfig(...o)),class:"color-input",placeholder:t.config.color},null,40,Du),[[e.vModelText,t.config.arrowColor]]),e.createElementVNode("button",{onClick:n[22]||(n[22]=o=>{t.config.arrowColor=t.config.color,t.updateConfig()}),class:"sync-btn",title:"与线条颜色同步"}," 同步 ")])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Mu,[n[67]||(n[67]=e.createElementVNode("h4",null,"虚线动画",-1)),e.createElementVNode("div",$u,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[23]||(n[23]=o=>t.config.enableDashAnimation=o),onChange:n[24]||(n[24]=(...o)=>t.updateConfig&&t.updateConfig(...o))},null,544),[[e.vModelCheckbox,t.config.enableDashAnimation]]),n[64]||(n[64]=e.createTextVNode(" 启用虚线流动动画 "))])]),t.config.enableDashAnimation?(e.openBlock(),e.createElementBlock("div",Eu,[e.createElementVNode("div",Vu,[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]=o=>t.config.dashAnimationSpeed=o),onInput:n[26]||(n[26]=(...o)=>t.updateConfig&&t.updateConfig(...o)),class:"range-input"},null,544),[[e.vModelText,t.config.dashAnimationSpeed,void 0,{number:!0}]]),e.createElementVNode("span",Nu,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",_u,[n[71]||(n[71]=e.createElementVNode("h4",null,"标签配置",-1)),e.createElementVNode("div",Au,[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":n[27]||(n[27]=o=>t.config.showLabels=o),onChange:n[28]||(n[28]=(...o)=>t.updateConfig&&t.updateConfig(...o))},null,544),[[e.vModelCheckbox,t.config.showLabels]]),n[68]||(n[68]=e.createTextVNode(" 显示标签 "))])]),t.config.showLabels?(e.openBlock(),e.createElementBlock("div",Lu,[e.createElementVNode("div",Bu,[n[69]||(n[69]=e.createElementVNode("label",null,"标签颜色:",-1)),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[29]||(n[29]=o=>t.config.labelColor=o),onChange:n[30]||(n[30]=(...o)=>t.updateConfig&&t.updateConfig(...o)),class:"color-input"},null,544),[[e.vModelText,t.config.labelColor]])]),e.createElementVNode("div",Hu,[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]=o=>t.config.labelFontSize=o),onInput:n[32]||(n[32]=(...o)=>t.updateConfig&&t.updateConfig(...o)),class:"range-input"},null,544),[[e.vModelText,t.config.labelFontSize,void 0,{number:!0}]]),e.createElementVNode("span",Yu,e.toDisplayString(t.config.labelFontSize)+"px",1)])])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Fu,[n[76]||(n[76]=e.createElementVNode("h4",null,"父子关系样式",-1)),e.createElementVNode("div",Iu,[n[72]||(n[72]=e.createElementVNode("label",null,"颜色:",-1)),e.withDirectives(e.createElementVNode("input",{type:"color","onUpdate:modelValue":n[33]||(n[33]=o=>t.config.parentChildStyle.color=o),onChange:n[34]||(n[34]=(...o)=>t.updateConfig&&t.updateConfig(...o)),class:"color-input"},null,544),[[e.vModelText,t.config.parentChildStyle.color]])]),e.createElementVNode("div",zu,[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]=o=>t.config.parentChildStyle.width=o),onInput:n[36]||(n[36]=(...o)=>t.updateConfig&&t.updateConfig(...o)),class:"range-input"},null,544),[[e.vModelText,t.config.parentChildStyle.width,void 0,{number:!0}]]),e.createElementVNode("span",Ru,e.toDisplayString(t.config.parentChildStyle.width)+"px",1)]),e.createElementVNode("div",Ou,[n[75]||(n[75]=e.createElementVNode("label",null,"虚线样式:",-1)),e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":n[37]||(n[37]=o=>t.config.parentChildStyle.dashArray=o),onChange:n[38]||(n[38]=(...o)=>t.updateConfig&&t.updateConfig(...o)),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",Pu,[n[77]||(n[77]=e.createElementVNode("h4",null,"预设主题",-1)),e.createElementVNode("div",xu,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.themes,(o,l)=>(e.openBlock(),e.createElementBlock("button",{key:l,onClick:f=>t.applyTheme(l),class:e.normalizeClass(["theme-btn",{active:t.isCurrentTheme(l)}])},e.toDisplayString(t.getThemeName(l)),11,qu))),128))])]),e.createElementVNode("div",Gu,[e.createElementVNode("div",Wu,[e.createElementVNode("button",{onClick:n[39]||(n[39]=(...o)=>t.resetConfig&&t.resetConfig(...o)),class:"reset-btn"},"重置为默认"),e.createElementVNode("button",{onClick:n[40]||(n[40]=(...o)=>t.exportConfig&&t.exportConfig(...o)),class:"export-btn"},"导出配置"),e.createElementVNode("button",{onClick:n[41]||(n[41]=o=>t.showImportDialog=!0),class:"import-btn"},"导入配置")])])]),t.showImportDialog?(e.openBlock(),e.createElementBlock("div",{key:0,class:"import-dialog-overlay",onClick:n[46]||(n[46]=o=>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]=o=>t.importText=o),placeholder:"粘贴配置JSON...",class:"import-textarea"},null,512),[[e.vModelText,t.importText]]),e.createElementVNode("div",Zu,[e.createElementVNode("button",{onClick:n[43]||(n[43]=(...o)=>t.importConfig&&t.importConfig(...o)),class:"confirm-btn"},"导入"),e.createElementVNode("button",{onClick:n[44]||(n[44]=o=>t.showImportDialog=!1),class:"cancel-btn"},"取消")])])])):e.createCommentVNode("",!0)])}const ju=Ae(jc,[["render",Uu],["__scopeId","data-v-f8062a27"]]),Ju=t=>{t.component("Gantt",pn),t.component("Vue3Gantt",pn)},Ku="1.0.0";Se.DatePicker=On,Se.Gantt=pn,Se.GanttConfigPanel=jn,Se.GanttThemeSelector=Uc,Se.LanguageSelector=Un,Se.LinkConfigPanel=ju,Se.LinkPathType=Ye,Se.LinkThemes=ot,Se.LinkType=ge,Se.TaskType=Tt,Se.default=pn,Se.detectBrowserLocale=kn,Se.ganttThemes=xe,Se.install=Ju,Se.linkDataManager=an,Se.mutations=fe,Se.setLocale=Rn,Se.store=S,Se.useI18n=Ge,Se.useLinkConfig=Dt,Se.version=Ku,Object.defineProperties(Se,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
123
123
|
//# sourceMappingURL=vue3-gantt.umd.js.map
|