onchain-uikit 3.9.4-alpha16 → 3.9.4-alpha17

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/dist/index.cjs.js CHANGED
@@ -329,7 +329,7 @@ var e4;function ve(){return e4.apply(null,arguments)}function S$(e){e4=e}functio
329
329
  [`+i+"] ";for(s in arguments[0])ht(arguments[0],s)&&(a+=s+": "+arguments[0][s]+", ");a=a.slice(0,-2)}else a=arguments[i];n.push(a)}r4(e+`
330
330
  Arguments: `+Array.prototype.slice.call(n).join("")+`
331
331
  `+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var sx={};function n4(e,t){ve.deprecationHandler!=null&&ve.deprecationHandler(e,t),sx[e]||(r4(t),sx[e]=!0)}ve.suppressDeprecationWarnings=!1;ve.deprecationHandler=null;function ba(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function E$(e){var t,r;for(r in e)ht(e,r)&&(t=e[r],ba(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function d1(e,t){var r=Ai({},e),n;for(n in t)ht(t,n)&&(_o(e[n])&&_o(t[n])?(r[n]={},Ai(r[n],e[n]),Ai(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)ht(e,n)&&!ht(t,n)&&_o(e[n])&&(r[n]=Ai({},r[n]));return r}function vv(e){e!=null&&this.set(e)}var f1;Object.keys?f1=Object.keys:f1=function(e){var t,r=[];for(t in e)ht(e,t)&&r.push(t);return r};var k$={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function T$(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return ba(n)?n.call(t,r):n}function ma(e,t,r){var n=""+Math.abs(e),a=t-n.length,i=e>=0;return(i?r?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+n}var bv=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,Md=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Qm={},ys={};function Me(e,t,r,n){var a=n;typeof n=="string"&&(a=function(){return this[n]()}),e&&(ys[e]=a),t&&(ys[t[0]]=function(){return ma(a.apply(this,arguments),t[1],t[2])}),r&&(ys[r]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function O$(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function A$(e){var t=e.match(bv),r,n;for(r=0,n=t.length;r<n;r++)ys[t[r]]?t[r]=ys[t[r]]:t[r]=O$(t[r]);return function(a){var i="",s;for(s=0;s<n;s++)i+=ba(t[s])?t[s].call(a,e):t[s];return i}}function pf(e,t){return e.isValid()?(t=a4(t,e.localeData()),Qm[t]=Qm[t]||A$(t),Qm[t](e)):e.localeData().invalidDate()}function a4(e,t){var r=5;function n(a){return t.longDateFormat(a)||a}for(Md.lastIndex=0;r>=0&&Md.test(e);)e=e.replace(Md,n),Md.lastIndex=0,r-=1;return e}var R$={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"};function P$(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(bv).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var D$="Invalid date";function M$(){return this._invalidDate}var F$="%d",N$=/\d{1,2}/;function I$(e){return this._ordinal.replace("%d",e)}var L$={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function j$(e,t,r,n){var a=this._relativeTime[r];return ba(a)?a(e,t,r,n):a.replace(/%d/i,e)}function $$(e,t){var r=this._relativeTime[e>0?"future":"past"];return ba(r)?r(t):r.replace(/%s/i,t)}var ux={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function On(e){return typeof e=="string"?ux[e]||ux[e.toLowerCase()]:void 0}function yv(e){var t={},r,n;for(n in e)ht(e,n)&&(r=On(n),r&&(t[r]=e[n]));return t}var z$={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function B$(e){var t=[],r;for(r in e)ht(e,r)&&t.push({unit:r,priority:z$[r]});return t.sort(function(n,a){return n.priority-a.priority}),t}var i4=/\d/,cn=/\d\d/,o4=/\d{3}/,_v=/\d{4}/,ch=/[+-]?\d{6}/,It=/\d\d?/,s4=/\d\d\d\d?/,u4=/\d\d\d\d\d\d?/,dh=/\d{1,3}/,wv=/\d{1,4}/,fh=/[+-]?\d{1,6}/,Hs=/\d+/,hh=/[+-]?\d+/,H$=/Z|[+-]\d\d:?\d\d/gi,ph=/Z|[+-]\d\d(?::?\d\d)?/gi,U$=/[+-]?\d+(\.\d{1,3})?/,gc=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Us=/^[1-9]\d?/,xv=/^([1-9]\d|\d)/,Nf;Nf={};function Ce(e,t,r){Nf[e]=ba(t)?t:function(n,a){return n&&r?r:t}}function q$(e,t){return ht(Nf,e)?Nf[e](t._strict,t._locale):new RegExp(W$(e))}function W$(e){return ti(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,a,i){return r||n||a||i}))}function ti(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function wn(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ut(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=wn(t)),r}var h1={};function At(e,t){var r,n=t,a;for(typeof e=="string"&&(e=[e]),ni(t)&&(n=function(i,s){s[t]=ut(i)}),a=e.length,r=0;r<a;r++)h1[e[r]]=n}function vc(e,t){At(e,function(r,n,a,i){a._w=a._w||{},t(r,a._w,a,i)})}function V$(e,t,r){t!=null&&ht(h1,e)&&h1[e](t,r._a,r,e)}function mh(e){return e%4===0&&e%100!==0||e%400===0}var wr=0,Ja=1,la=2,nr=3,qn=4,Qa=5,go=6,Y$=7,G$=8;Me("Y",0,0,function(){var e=this.year();return e<=9999?ma(e,4):"+"+e});Me(0,["YY",2],0,function(){return this.year()%100});Me(0,["YYYY",4],0,"year");Me(0,["YYYYY",5],0,"year");Me(0,["YYYYYY",6,!0],0,"year");Ce("Y",hh);Ce("YY",It,cn);Ce("YYYY",wv,_v);Ce("YYYYY",fh,ch);Ce("YYYYYY",fh,ch);At(["YYYYY","YYYYYY"],wr);At("YYYY",function(e,t){t[wr]=e.length===2?ve.parseTwoDigitYear(e):ut(e)});At("YY",function(e,t){t[wr]=ve.parseTwoDigitYear(e)});At("Y",function(e,t){t[wr]=parseInt(e,10)});function Nl(e){return mh(e)?366:365}ve.parseTwoDigitYear=function(e){return ut(e)+(ut(e)>68?1900:2e3)};var l4=qs("FullYear",!0);function K$(){return mh(this.year())}function qs(e,t){return function(r){return r!=null?(c4(this,e,r),ve.updateOffset(this,t),this):Kl(this,e)}}function Kl(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function c4(e,t,r){var n,a,i,s,l;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,a=e._isUTC,t){case"Milliseconds":return void(a?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(a?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(a?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(a?n.setUTCHours(r):n.setHours(r));case"Date":return void(a?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}i=r,s=e.month(),l=e.date(),l=l===29&&s===1&&!mh(i)?28:l,a?n.setUTCFullYear(i,s,l):n.setFullYear(i,s,l)}}function X$(e){return e=On(e),ba(this[e])?this[e]():this}function Z$(e,t){if(typeof e=="object"){e=yv(e);var r=B$(e),n,a=r.length;for(n=0;n<a;n++)this[r[n].unit](e[r[n].unit])}else if(e=On(e),ba(this[e]))return this[e](t);return this}function J$(e,t){return(e%t+t)%t}var Gt;Array.prototype.indexOf?Gt=Array.prototype.indexOf:Gt=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function Sv(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=J$(t,12);return e+=(t-r)/12,r===1?mh(e)?29:28:31-r%7%2}Me("M",["MM",2],"Mo",function(){return this.month()+1});Me("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)});Me("MMMM",0,0,function(e){return this.localeData().months(this,e)});Ce("M",It,Us);Ce("MM",It,cn);Ce("MMM",function(e,t){return t.monthsShortRegex(e)});Ce("MMMM",function(e,t){return t.monthsRegex(e)});At(["M","MM"],function(e,t){t[Ja]=ut(e)-1});At(["MMM","MMMM"],function(e,t,r,n){var a=r._locale.monthsParse(e,n,r._strict);a!=null?t[Ja]=a:Xe(r).invalidMonth=e});var Q$="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),d4="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),f4=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,ez=gc,tz=gc;function rz(e,t){return e?Kn(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||f4).test(t)?"format":"standalone"][e.month()]:Kn(this._months)?this._months:this._months.standalone}function nz(e,t){return e?Kn(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[f4.test(t)?"format":"standalone"][e.month()]:Kn(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function az(e,t,r){var n,a,i,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)i=va([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(i,"").toLocaleLowerCase();return r?t==="MMM"?(a=Gt.call(this._shortMonthsParse,s),a!==-1?a:null):(a=Gt.call(this._longMonthsParse,s),a!==-1?a:null):t==="MMM"?(a=Gt.call(this._shortMonthsParse,s),a!==-1?a:(a=Gt.call(this._longMonthsParse,s),a!==-1?a:null)):(a=Gt.call(this._longMonthsParse,s),a!==-1?a:(a=Gt.call(this._shortMonthsParse,s),a!==-1?a:null))}function iz(e,t,r){var n,a,i;if(this._monthsParseExact)return az.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(a=va([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(a,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(a,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(i="^"+this.months(a,"")+"|^"+this.monthsShort(a,""),this._monthsParse[n]=new RegExp(i.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function h4(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=ut(t);else if(t=e.localeData().monthsParse(t),!ni(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,Sv(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function p4(e){return e!=null?(h4(this,e),ve.updateOffset(this,!0),this):Kl(this,"Month")}function oz(){return Sv(this.year(),this.month())}function sz(e){return this._monthsParseExact?(ht(this,"_monthsRegex")||m4.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(ht(this,"_monthsShortRegex")||(this._monthsShortRegex=ez),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function uz(e){return this._monthsParseExact?(ht(this,"_monthsRegex")||m4.call(this),e?this._monthsStrictRegex:this._monthsRegex):(ht(this,"_monthsRegex")||(this._monthsRegex=tz),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function m4(){function e(u,c){return c.length-u.length}var t=[],r=[],n=[],a,i,s,l;for(a=0;a<12;a++)i=va([2e3,a]),s=ti(this.monthsShort(i,"")),l=ti(this.months(i,"")),t.push(s),r.push(l),n.push(l),n.push(s);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function lz(e,t,r,n,a,i,s){var l;return e<100&&e>=0?(l=new Date(e+400,t,r,n,a,i,s),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,r,n,a,i,s),l}function Xl(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function If(e,t,r){var n=7+t-r,a=(7+Xl(e,0,n).getUTCDay()-t)%7;return-a+n-1}function g4(e,t,r,n,a){var i=(7+r-n)%7,s=If(e,n,a),l=1+7*(t-1)+i+s,u,c;return l<=0?(u=e-1,c=Nl(u)+l):l>Nl(e)?(u=e+1,c=l-Nl(e)):(u=e,c=l),{year:u,dayOfYear:c}}function Zl(e,t,r){var n=If(e.year(),t,r),a=Math.floor((e.dayOfYear()-n-1)/7)+1,i,s;return a<1?(s=e.year()-1,i=a+ri(s,t,r)):a>ri(e.year(),t,r)?(i=a-ri(e.year(),t,r),s=e.year()+1):(s=e.year(),i=a),{week:i,year:s}}function ri(e,t,r){var n=If(e,t,r),a=If(e+1,t,r);return(Nl(e)-n+a)/7}Me("w",["ww",2],"wo","week");Me("W",["WW",2],"Wo","isoWeek");Ce("w",It,Us);Ce("ww",It,cn);Ce("W",It,Us);Ce("WW",It,cn);vc(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=ut(e)});function cz(e){return Zl(e,this._week.dow,this._week.doy).week}var dz={dow:0,doy:6};function fz(){return this._week.dow}function hz(){return this._week.doy}function pz(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function mz(e){var t=Zl(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}Me("d",0,"do","day");Me("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});Me("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});Me("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});Me("e",0,0,"weekday");Me("E",0,0,"isoWeekday");Ce("d",It);Ce("e",It);Ce("E",It);Ce("dd",function(e,t){return t.weekdaysMinRegex(e)});Ce("ddd",function(e,t){return t.weekdaysShortRegex(e)});Ce("dddd",function(e,t){return t.weekdaysRegex(e)});vc(["dd","ddd","dddd"],function(e,t,r,n){var a=r._locale.weekdaysParse(e,n,r._strict);a!=null?t.d=a:Xe(r).invalidWeekday=e});vc(["d","e","E"],function(e,t,r,n){t[n]=ut(e)});function gz(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function vz(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function Cv(e,t){return e.slice(t,7).concat(e.slice(0,t))}var bz="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),v4="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),yz="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),_z=gc,wz=gc,xz=gc;function Sz(e,t){var r=Kn(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?Cv(r,this._week.dow):e?r[e.day()]:r}function Cz(e){return e===!0?Cv(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Ez(e){return e===!0?Cv(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function kz(e,t,r){var n,a,i,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)i=va([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(i,"").toLocaleLowerCase();return r?t==="dddd"?(a=Gt.call(this._weekdaysParse,s),a!==-1?a:null):t==="ddd"?(a=Gt.call(this._shortWeekdaysParse,s),a!==-1?a:null):(a=Gt.call(this._minWeekdaysParse,s),a!==-1?a:null):t==="dddd"?(a=Gt.call(this._weekdaysParse,s),a!==-1||(a=Gt.call(this._shortWeekdaysParse,s),a!==-1)?a:(a=Gt.call(this._minWeekdaysParse,s),a!==-1?a:null)):t==="ddd"?(a=Gt.call(this._shortWeekdaysParse,s),a!==-1||(a=Gt.call(this._weekdaysParse,s),a!==-1)?a:(a=Gt.call(this._minWeekdaysParse,s),a!==-1?a:null)):(a=Gt.call(this._minWeekdaysParse,s),a!==-1||(a=Gt.call(this._weekdaysParse,s),a!==-1)?a:(a=Gt.call(this._shortWeekdaysParse,s),a!==-1?a:null))}function Tz(e,t,r){var n,a,i;if(this._weekdaysParseExact)return kz.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(a=va([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(i="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[n]=new RegExp(i.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function Oz(e){if(!this.isValid())return e!=null?this:NaN;var t=Kl(this,"Day");return e!=null?(e=gz(e,this.localeData()),this.add(e-t,"d")):t}function Az(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function Rz(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=vz(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function Pz(e){return this._weekdaysParseExact?(ht(this,"_weekdaysRegex")||Ev.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(ht(this,"_weekdaysRegex")||(this._weekdaysRegex=_z),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function Dz(e){return this._weekdaysParseExact?(ht(this,"_weekdaysRegex")||Ev.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(ht(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=wz),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Mz(e){return this._weekdaysParseExact?(ht(this,"_weekdaysRegex")||Ev.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(ht(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=xz),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Ev(){function e(m,p){return p.length-m.length}var t=[],r=[],n=[],a=[],i,s,l,u,c;for(i=0;i<7;i++)s=va([2e3,1]).day(i),l=ti(this.weekdaysMin(s,"")),u=ti(this.weekdaysShort(s,"")),c=ti(this.weekdays(s,"")),t.push(l),r.push(u),n.push(c),a.push(l),a.push(u),a.push(c);t.sort(e),r.sort(e),n.sort(e),a.sort(e),this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function kv(){return this.hours()%12||12}function Fz(){return this.hours()||24}Me("H",["HH",2],0,"hour");Me("h",["hh",2],0,kv);Me("k",["kk",2],0,Fz);Me("hmm",0,0,function(){return""+kv.apply(this)+ma(this.minutes(),2)});Me("hmmss",0,0,function(){return""+kv.apply(this)+ma(this.minutes(),2)+ma(this.seconds(),2)});Me("Hmm",0,0,function(){return""+this.hours()+ma(this.minutes(),2)});Me("Hmmss",0,0,function(){return""+this.hours()+ma(this.minutes(),2)+ma(this.seconds(),2)});function b4(e,t){Me(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}b4("a",!0);b4("A",!1);function y4(e,t){return t._meridiemParse}Ce("a",y4);Ce("A",y4);Ce("H",It,xv);Ce("h",It,Us);Ce("k",It,Us);Ce("HH",It,cn);Ce("hh",It,cn);Ce("kk",It,cn);Ce("hmm",s4);Ce("hmmss",u4);Ce("Hmm",s4);Ce("Hmmss",u4);At(["H","HH"],nr);At(["k","kk"],function(e,t,r){var n=ut(e);t[nr]=n===24?0:n});At(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e});At(["h","hh"],function(e,t,r){t[nr]=ut(e),Xe(r).bigHour=!0});At("hmm",function(e,t,r){var n=e.length-2;t[nr]=ut(e.substr(0,n)),t[qn]=ut(e.substr(n)),Xe(r).bigHour=!0});At("hmmss",function(e,t,r){var n=e.length-4,a=e.length-2;t[nr]=ut(e.substr(0,n)),t[qn]=ut(e.substr(n,2)),t[Qa]=ut(e.substr(a)),Xe(r).bigHour=!0});At("Hmm",function(e,t,r){var n=e.length-2;t[nr]=ut(e.substr(0,n)),t[qn]=ut(e.substr(n))});At("Hmmss",function(e,t,r){var n=e.length-4,a=e.length-2;t[nr]=ut(e.substr(0,n)),t[qn]=ut(e.substr(n,2)),t[Qa]=ut(e.substr(a))});function Nz(e){return(e+"").toLowerCase().charAt(0)==="p"}var Iz=/[ap]\.?m?\.?/i,Lz=qs("Hours",!0);function jz(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var _4={calendar:k$,longDateFormat:R$,invalidDate:D$,ordinal:F$,dayOfMonthOrdinalParse:N$,relativeTime:L$,months:Q$,monthsShort:d4,week:dz,weekdays:bz,weekdaysMin:yz,weekdaysShort:v4,meridiemParse:Iz},jt={},fl={},Jl;function $z(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function lx(e){return e&&e.toLowerCase().replace("_","-")}function zz(e){for(var t=0,r,n,a,i;t<e.length;){for(i=lx(e[t]).split("-"),r=i.length,n=lx(e[t+1]),n=n?n.split("-"):null;r>0;){if(a=gh(i.slice(0,r).join("-")),a)return a;if(n&&n.length>=r&&$z(i,n)>=r-1)break;r--}t++}return Jl}function Bz(e){return!!(e&&e.match("^[^/\\\\]*$"))}function gh(e){var t=null,r;if(jt[e]===void 0&&typeof module<"u"&&module&&module.exports&&Bz(e))try{t=Jl._abbr,r=require,r("./locale/"+e),Ni(t)}catch{jt[e]=null}return jt[e]}function Ni(e,t){var r;return e&&(zr(t)?r=ii(e):r=Tv(e,t),r?Jl=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Jl._abbr}function Tv(e,t){if(t!==null){var r,n=_4;if(t.abbr=e,jt[e]!=null)n4("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=jt[e]._config;else if(t.parentLocale!=null)if(jt[t.parentLocale]!=null)n=jt[t.parentLocale]._config;else if(r=gh(t.parentLocale),r!=null)n=r._config;else return fl[t.parentLocale]||(fl[t.parentLocale]=[]),fl[t.parentLocale].push({name:e,config:t}),null;return jt[e]=new vv(d1(n,t)),fl[e]&&fl[e].forEach(function(a){Tv(a.name,a.config)}),Ni(e),jt[e]}else return delete jt[e],null}function Hz(e,t){if(t!=null){var r,n,a=_4;jt[e]!=null&&jt[e].parentLocale!=null?jt[e].set(d1(jt[e]._config,t)):(n=gh(e),n!=null&&(a=n._config),t=d1(a,t),n==null&&(t.abbr=e),r=new vv(t),r.parentLocale=jt[e],jt[e]=r),Ni(e)}else jt[e]!=null&&(jt[e].parentLocale!=null?(jt[e]=jt[e].parentLocale,e===Ni()&&Ni(e)):jt[e]!=null&&delete jt[e]);return jt[e]}function ii(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Jl;if(!Kn(e)){if(t=gh(e),t)return t;e=[e]}return zz(e)}function Uz(){return f1(jt)}function Ov(e){var t,r=e._a;return r&&Xe(e).overflow===-2&&(t=r[Ja]<0||r[Ja]>11?Ja:r[la]<1||r[la]>Sv(r[wr],r[Ja])?la:r[nr]<0||r[nr]>24||r[nr]===24&&(r[qn]!==0||r[Qa]!==0||r[go]!==0)?nr:r[qn]<0||r[qn]>59?qn:r[Qa]<0||r[Qa]>59?Qa:r[go]<0||r[go]>999?go:-1,Xe(e)._overflowDayOfYear&&(t<wr||t>la)&&(t=la),Xe(e)._overflowWeeks&&t===-1&&(t=Y$),Xe(e)._overflowWeekday&&t===-1&&(t=G$),Xe(e).overflow=t),e}var qz=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Wz=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Vz=/Z|[+-]\d\d(?::?\d\d)?/,Fd=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],eg=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Yz=/^\/?Date\((-?\d+)/i,Gz=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Kz={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function w4(e){var t,r,n=e._i,a=qz.exec(n)||Wz.exec(n),i,s,l,u,c=Fd.length,m=eg.length;if(a){for(Xe(e).iso=!0,t=0,r=c;t<r;t++)if(Fd[t][1].exec(a[1])){s=Fd[t][0],i=Fd[t][2]!==!1;break}if(s==null){e._isValid=!1;return}if(a[3]){for(t=0,r=m;t<r;t++)if(eg[t][1].exec(a[3])){l=(a[2]||" ")+eg[t][0];break}if(l==null){e._isValid=!1;return}}if(!i&&l!=null){e._isValid=!1;return}if(a[4])if(Vz.exec(a[4]))u="Z";else{e._isValid=!1;return}e._f=s+(l||"")+(u||""),Rv(e)}else e._isValid=!1}function Xz(e,t,r,n,a,i){var s=[Zz(e),d4.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(a,10)];return i&&s.push(parseInt(i,10)),s}function Zz(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Jz(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Qz(e,t,r){if(e){var n=v4.indexOf(e),a=new Date(t[0],t[1],t[2]).getDay();if(n!==a)return Xe(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function eB(e,t,r){if(e)return Kz[e];if(t)return 0;var n=parseInt(r,10),a=n%100,i=(n-a)/100;return i*60+a}function x4(e){var t=Gz.exec(Jz(e._i)),r;if(t){if(r=Xz(t[4],t[3],t[2],t[5],t[6],t[7]),!Qz(t[1],r,e))return;e._a=r,e._tzm=eB(t[8],t[9],t[10]),e._d=Xl.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Xe(e).rfc2822=!0}else e._isValid=!1}function tB(e){var t=Yz.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(w4(e),e._isValid===!1)delete e._isValid;else return;if(x4(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:ve.createFromInputFallback(e)}ve.createFromInputFallback=Tn("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function is(e,t,r){return e??t??r}function rB(e){var t=new Date(ve.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Av(e){var t,r,n=[],a,i,s;if(!e._d){for(a=rB(e),e._w&&e._a[la]==null&&e._a[Ja]==null&&nB(e),e._dayOfYear!=null&&(s=is(e._a[wr],a[wr]),(e._dayOfYear>Nl(s)||e._dayOfYear===0)&&(Xe(e)._overflowDayOfYear=!0),r=Xl(s,0,e._dayOfYear),e._a[Ja]=r.getUTCMonth(),e._a[la]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=a[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[nr]===24&&e._a[qn]===0&&e._a[Qa]===0&&e._a[go]===0&&(e._nextDay=!0,e._a[nr]=0),e._d=(e._useUTC?Xl:lz).apply(null,n),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[nr]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==i&&(Xe(e).weekdayMismatch=!0)}}function nB(e){var t,r,n,a,i,s,l,u,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(i=1,s=4,r=is(t.GG,e._a[wr],Zl(Nt(),1,4).year),n=is(t.W,1),a=is(t.E,1),(a<1||a>7)&&(u=!0)):(i=e._locale._week.dow,s=e._locale._week.doy,c=Zl(Nt(),i,s),r=is(t.gg,e._a[wr],c.year),n=is(t.w,c.week),t.d!=null?(a=t.d,(a<0||a>6)&&(u=!0)):t.e!=null?(a=t.e+i,(t.e<0||t.e>6)&&(u=!0)):a=i),n<1||n>ri(r,i,s)?Xe(e)._overflowWeeks=!0:u!=null?Xe(e)._overflowWeekday=!0:(l=g4(r,n,a,i,s),e._a[wr]=l.year,e._dayOfYear=l.dayOfYear)}ve.ISO_8601=function(){};ve.RFC_2822=function(){};function Rv(e){if(e._f===ve.ISO_8601){w4(e);return}if(e._f===ve.RFC_2822){x4(e);return}e._a=[],Xe(e).empty=!0;var t=""+e._i,r,n,a,i,s,l=t.length,u=0,c,m;for(a=a4(e._f,e._locale).match(bv)||[],m=a.length,r=0;r<m;r++)i=a[r],n=(t.match(q$(i,e))||[])[0],n&&(s=t.substr(0,t.indexOf(n)),s.length>0&&Xe(e).unusedInput.push(s),t=t.slice(t.indexOf(n)+n.length),u+=n.length),ys[i]?(n?Xe(e).empty=!1:Xe(e).unusedTokens.push(i),V$(i,n,e)):e._strict&&!n&&Xe(e).unusedTokens.push(i);Xe(e).charsLeftOver=l-u,t.length>0&&Xe(e).unusedInput.push(t),e._a[nr]<=12&&Xe(e).bigHour===!0&&e._a[nr]>0&&(Xe(e).bigHour=void 0),Xe(e).parsedDateParts=e._a.slice(0),Xe(e).meridiem=e._meridiem,e._a[nr]=aB(e._locale,e._a[nr],e._meridiem),c=Xe(e).era,c!==null&&(e._a[wr]=e._locale.erasConvertYear(c,e._a[wr])),Av(e),Ov(e)}function aB(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function iB(e){var t,r,n,a,i,s,l=!1,u=e._f.length;if(u===0){Xe(e).invalidFormat=!0,e._d=new Date(NaN);return}for(a=0;a<u;a++)i=0,s=!1,t=gv({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[a],Rv(t),mv(t)&&(s=!0),i+=Xe(t).charsLeftOver,i+=Xe(t).unusedTokens.length*10,Xe(t).score=i,l?i<n&&(n=i,r=t):(n==null||i<n||s)&&(n=i,r=t,s&&(l=!0));Ai(e,r||t)}function oB(e){if(!e._d){var t=yv(e._i),r=t.day===void 0?t.date:t.day;e._a=t4([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),Av(e)}}function sB(e){var t=new mc(Ov(S4(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function S4(e){var t=e._i,r=e._f;return e._locale=e._locale||ii(e._l),t===null||r===void 0&&t===""?lh({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),Xn(t)?new mc(Ov(t)):(pc(t)?e._d=t:Kn(r)?iB(e):r?Rv(e):uB(e),mv(e)||(e._d=null),e))}function uB(e){var t=e._i;zr(t)?e._d=new Date(ve.now()):pc(t)?e._d=new Date(t.valueOf()):typeof t=="string"?tB(e):Kn(t)?(e._a=t4(t.slice(0),function(r){return parseInt(r,10)}),Av(e)):_o(t)?oB(e):ni(t)?e._d=new Date(t):ve.createFromInputFallback(e)}function C4(e,t,r,n,a){var i={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(_o(e)&&pv(e)||Kn(e)&&e.length===0)&&(e=void 0),i._isAMomentObject=!0,i._useUTC=i._isUTC=a,i._l=r,i._i=e,i._f=t,i._strict=n,sB(i)}function Nt(e,t,r,n){return C4(e,t,r,n,!1)}var lB=Tn("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Nt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:lh()}),cB=Tn("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Nt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:lh()});function E4(e,t){var r,n;if(t.length===1&&Kn(t[0])&&(t=t[0]),!t.length)return Nt();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function dB(){var e=[].slice.call(arguments,0);return E4("isBefore",e)}function fB(){var e=[].slice.call(arguments,0);return E4("isAfter",e)}var hB=function(){return Date.now?Date.now():+new Date},hl=["year","quarter","month","week","day","hour","minute","second","millisecond"];function pB(e){var t,r=!1,n,a=hl.length;for(t in e)if(ht(e,t)&&!(Gt.call(hl,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<a;++n)if(e[hl[n]]){if(r)return!1;parseFloat(e[hl[n]])!==ut(e[hl[n]])&&(r=!0)}return!0}function mB(){return this._isValid}function gB(){return Qn(NaN)}function vh(e){var t=yv(e),r=t.year||0,n=t.quarter||0,a=t.month||0,i=t.week||t.isoWeek||0,s=t.day||0,l=t.hour||0,u=t.minute||0,c=t.second||0,m=t.millisecond||0;this._isValid=pB(t),this._milliseconds=+m+c*1e3+u*6e4+l*1e3*60*60,this._days=+s+i*7,this._months=+a+n*3+r*12,this._data={},this._locale=ii(),this._bubble()}function mf(e){return e instanceof vh}function p1(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function vB(e,t,r){var n=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),i=0,s;for(s=0;s<n;s++)ut(e[s])!==ut(t[s])&&i++;return i+a}function k4(e,t){Me(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+ma(~~(r/60),2)+t+ma(~~r%60,2)})}k4("Z",":");k4("ZZ","");Ce("Z",ph);Ce("ZZ",ph);At(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=Pv(ph,e)});var bB=/([\+\-]|\d\d)/gi;function Pv(e,t){var r=(t||"").match(e),n,a,i;return r===null?null:(n=r[r.length-1]||[],a=(n+"").match(bB)||["-",0,0],i=+(a[1]*60)+ut(a[2]),i===0?0:a[0]==="+"?i:-i)}function Dv(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(Xn(e)||pc(e)?e.valueOf():Nt(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),ve.updateOffset(r,!1),r):Nt(e).local()}function m1(e){return-Math.round(e._d.getTimezoneOffset())}ve.updateOffset=function(){};function yB(e,t,r){var n=this._offset||0,a;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=Pv(ph,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(a=m1(this)),this._offset=e,this._isUTC=!0,a!=null&&this.add(a,"m"),n!==e&&(!t||this._changeInProgress?A4(this,Qn(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,ve.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:m1(this)}function _B(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function wB(e){return this.utcOffset(0,e)}function xB(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(m1(this),"m")),this}function SB(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=Pv(H$,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function CB(e){return this.isValid()?(e=e?Nt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function EB(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function kB(){if(!zr(this._isDSTShifted))return this._isDSTShifted;var e={},t;return gv(e,this),e=S4(e),e._a?(t=e._isUTC?va(e._a):Nt(e._a),this._isDSTShifted=this.isValid()&&vB(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function TB(){return this.isValid()?!this._isUTC:!1}function OB(){return this.isValid()?this._isUTC:!1}function T4(){return this.isValid()?this._isUTC&&this._offset===0:!1}var AB=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,RB=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Qn(e,t){var r=e,n=null,a,i,s;return mf(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:ni(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=AB.exec(e))?(a=n[1]==="-"?-1:1,r={y:0,d:ut(n[la])*a,h:ut(n[nr])*a,m:ut(n[qn])*a,s:ut(n[Qa])*a,ms:ut(p1(n[go]*1e3))*a}):(n=RB.exec(e))?(a=n[1]==="-"?-1:1,r={y:no(n[2],a),M:no(n[3],a),w:no(n[4],a),d:no(n[5],a),h:no(n[6],a),m:no(n[7],a),s:no(n[8],a)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(s=PB(Nt(r.from),Nt(r.to)),r={},r.ms=s.milliseconds,r.M=s.months),i=new vh(r),mf(e)&&ht(e,"_locale")&&(i._locale=e._locale),mf(e)&&ht(e,"_isValid")&&(i._isValid=e._isValid),i}Qn.fn=vh.prototype;Qn.invalid=gB;function no(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function cx(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function PB(e,t){var r;return e.isValid()&&t.isValid()?(t=Dv(t,e),e.isBefore(t)?r=cx(e,t):(r=cx(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function O4(e,t){return function(r,n){var a,i;return n!==null&&!isNaN(+n)&&(n4(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=r,r=n,n=i),a=Qn(r,n),A4(this,a,e),this}}function A4(e,t,r,n){var a=t._milliseconds,i=p1(t._days),s=p1(t._months);e.isValid()&&(n=n??!0,s&&h4(e,Kl(e,"Month")+s*r),i&&c4(e,"Date",Kl(e,"Date")+i*r),a&&e._d.setTime(e._d.valueOf()+a*r),n&&ve.updateOffset(e,i||s))}var DB=O4(1,"add"),MB=O4(-1,"subtract");function R4(e){return typeof e=="string"||e instanceof String}function FB(e){return Xn(e)||pc(e)||R4(e)||ni(e)||IB(e)||NB(e)||e===null||e===void 0}function NB(e){var t=_o(e)&&!pv(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a,i,s=n.length;for(a=0;a<s;a+=1)i=n[a],r=r||ht(e,i);return t&&r}function IB(e){var t=Kn(e),r=!1;return t&&(r=e.filter(function(n){return!ni(n)&&R4(e)}).length===0),t&&r}function LB(e){var t=_o(e)&&!pv(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],a,i;for(a=0;a<n.length;a+=1)i=n[a],r=r||ht(e,i);return t&&r}function jB(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function $B(e,t){arguments.length===1&&(arguments[0]?FB(arguments[0])?(e=arguments[0],t=void 0):LB(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||Nt(),n=Dv(r,this).startOf("day"),a=ve.calendarFormat(this,n)||"sameElse",i=t&&(ba(t[a])?t[a].call(this,r):t[a]);return this.format(i||this.localeData().calendar(a,this,Nt(r)))}function zB(){return new mc(this)}function BB(e,t){var r=Xn(e)?e:Nt(e);return this.isValid()&&r.isValid()?(t=On(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function HB(e,t){var r=Xn(e)?e:Nt(e);return this.isValid()&&r.isValid()?(t=On(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function UB(e,t,r,n){var a=Xn(e)?e:Nt(e),i=Xn(t)?t:Nt(t);return this.isValid()&&a.isValid()&&i.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(a,r):!this.isBefore(a,r))&&(n[1]===")"?this.isBefore(i,r):!this.isAfter(i,r))):!1}function qB(e,t){var r=Xn(e)?e:Nt(e),n;return this.isValid()&&r.isValid()?(t=On(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function WB(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function VB(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function YB(e,t,r){var n,a,i;if(!this.isValid())return NaN;if(n=Dv(e,this),!n.isValid())return NaN;switch(a=(n.utcOffset()-this.utcOffset())*6e4,t=On(t),t){case"year":i=gf(this,n)/12;break;case"month":i=gf(this,n);break;case"quarter":i=gf(this,n)/3;break;case"second":i=(this-n)/1e3;break;case"minute":i=(this-n)/6e4;break;case"hour":i=(this-n)/36e5;break;case"day":i=(this-n-a)/864e5;break;case"week":i=(this-n-a)/6048e5;break;default:i=this-n}return r?i:wn(i)}function gf(e,t){if(e.date()<t.date())return-gf(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),a,i;return t-n<0?(a=e.clone().add(r-1,"months"),i=(t-n)/(n-a)):(a=e.clone().add(r+1,"months"),i=(t-n)/(a-n)),-(r+i)||0}ve.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";ve.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function GB(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function KB(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?pf(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ba(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",pf(r,"Z")):pf(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function XB(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,a,i;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a="-MM-DD[T]HH:mm:ss.SSS",i=t+'[")]',this.format(r+n+a+i)}function ZB(e){e||(e=this.isUtc()?ve.defaultFormatUtc:ve.defaultFormat);var t=pf(this,e);return this.localeData().postformat(t)}function JB(e,t){return this.isValid()&&(Xn(e)&&e.isValid()||Nt(e).isValid())?Qn({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function QB(e){return this.from(Nt(),e)}function eH(e,t){return this.isValid()&&(Xn(e)&&e.isValid()||Nt(e).isValid())?Qn({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function tH(e){return this.to(Nt(),e)}function P4(e){var t;return e===void 0?this._locale._abbr:(t=ii(e),t!=null&&(this._locale=t),this)}var D4=Tn("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function M4(){return this._locale}var Lf=1e3,_s=60*Lf,jf=60*_s,F4=(365*400+97)*24*jf;function ws(e,t){return(e%t+t)%t}function N4(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-F4:new Date(e,t,r).valueOf()}function I4(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-F4:Date.UTC(e,t,r)}function rH(e){var t,r;if(e=On(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?I4:N4,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=ws(t+(this._isUTC?0:this.utcOffset()*_s),jf);break;case"minute":t=this._d.valueOf(),t-=ws(t,_s);break;case"second":t=this._d.valueOf(),t-=ws(t,Lf);break}return this._d.setTime(t),ve.updateOffset(this,!0),this}function nH(e){var t,r;if(e=On(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?I4:N4,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=jf-ws(t+(this._isUTC?0:this.utcOffset()*_s),jf)-1;break;case"minute":t=this._d.valueOf(),t+=_s-ws(t,_s)-1;break;case"second":t=this._d.valueOf(),t+=Lf-ws(t,Lf)-1;break}return this._d.setTime(t),ve.updateOffset(this,!0),this}function aH(){return this._d.valueOf()-(this._offset||0)*6e4}function iH(){return Math.floor(this.valueOf()/1e3)}function oH(){return new Date(this.valueOf())}function sH(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function uH(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function lH(){return this.isValid()?this.toISOString():null}function cH(){return mv(this)}function dH(){return Ai({},Xe(this))}function fH(){return Xe(this).overflow}function hH(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}Me("N",0,0,"eraAbbr");Me("NN",0,0,"eraAbbr");Me("NNN",0,0,"eraAbbr");Me("NNNN",0,0,"eraName");Me("NNNNN",0,0,"eraNarrow");Me("y",["y",1],"yo","eraYear");Me("y",["yy",2],0,"eraYear");Me("y",["yyy",3],0,"eraYear");Me("y",["yyyy",4],0,"eraYear");Ce("N",Mv);Ce("NN",Mv);Ce("NNN",Mv);Ce("NNNN",CH);Ce("NNNNN",EH);At(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var a=r._locale.erasParse(e,n,r._strict);a?Xe(r).era=a:Xe(r).invalidEra=e});Ce("y",Hs);Ce("yy",Hs);Ce("yyy",Hs);Ce("yyyy",Hs);Ce("yo",kH);At(["y","yy","yyy","yyyy"],wr);At(["yo"],function(e,t,r,n){var a;r._locale._eraYearOrdinalRegex&&(a=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[wr]=r._locale.eraYearOrdinalParse(e,a):t[wr]=parseInt(e,10)});function pH(e,t){var r,n,a,i=this._eras||ii("en")._eras;for(r=0,n=i.length;r<n;++r){switch(typeof i[r].since){case"string":a=ve(i[r].since).startOf("day"),i[r].since=a.valueOf();break}switch(typeof i[r].until){case"undefined":i[r].until=1/0;break;case"string":a=ve(i[r].until).startOf("day").valueOf(),i[r].until=a.valueOf();break}}return i}function mH(e,t,r){var n,a,i=this.eras(),s,l,u;for(e=e.toUpperCase(),n=0,a=i.length;n<a;++n)if(s=i[n].name.toUpperCase(),l=i[n].abbr.toUpperCase(),u=i[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(l===e)return i[n];break;case"NNNN":if(s===e)return i[n];break;case"NNNNN":if(u===e)return i[n];break}else if([s,l,u].indexOf(e)>=0)return i[n]}function gH(e,t){var r=e.since<=e.until?1:-1;return t===void 0?ve(e.since).year():ve(e.since).year()+(t-e.offset)*r}function vH(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function bH(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function yH(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function _H(){var e,t,r,n,a=this.localeData().eras();for(e=0,t=a.length;e<t;++e)if(r=a[e].since<=a[e].until?1:-1,n=this.clone().startOf("day").valueOf(),a[e].since<=n&&n<=a[e].until||a[e].until<=n&&n<=a[e].since)return(this.year()-ve(a[e].since).year())*r+a[e].offset;return this.year()}function wH(e){return ht(this,"_erasNameRegex")||Fv.call(this),e?this._erasNameRegex:this._erasRegex}function xH(e){return ht(this,"_erasAbbrRegex")||Fv.call(this),e?this._erasAbbrRegex:this._erasRegex}function SH(e){return ht(this,"_erasNarrowRegex")||Fv.call(this),e?this._erasNarrowRegex:this._erasRegex}function Mv(e,t){return t.erasAbbrRegex(e)}function CH(e,t){return t.erasNameRegex(e)}function EH(e,t){return t.erasNarrowRegex(e)}function kH(e,t){return t._eraYearOrdinalRegex||Hs}function Fv(){var e=[],t=[],r=[],n=[],a,i,s,l,u,c=this.eras();for(a=0,i=c.length;a<i;++a)s=ti(c[a].name),l=ti(c[a].abbr),u=ti(c[a].narrow),t.push(s),e.push(l),r.push(u),n.push(s),n.push(l),n.push(u);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}Me(0,["gg",2],0,function(){return this.weekYear()%100});Me(0,["GG",2],0,function(){return this.isoWeekYear()%100});function bh(e,t){Me(0,[e,e.length],0,t)}bh("gggg","weekYear");bh("ggggg","weekYear");bh("GGGG","isoWeekYear");bh("GGGGG","isoWeekYear");Ce("G",hh);Ce("g",hh);Ce("GG",It,cn);Ce("gg",It,cn);Ce("GGGG",wv,_v);Ce("gggg",wv,_v);Ce("GGGGG",fh,ch);Ce("ggggg",fh,ch);vc(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=ut(e)});vc(["gg","GG"],function(e,t,r,n){t[n]=ve.parseTwoDigitYear(e)});function TH(e){return L4.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function OH(e){return L4.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function AH(){return ri(this.year(),1,4)}function RH(){return ri(this.isoWeekYear(),1,4)}function PH(){var e=this.localeData()._week;return ri(this.year(),e.dow,e.doy)}function DH(){var e=this.localeData()._week;return ri(this.weekYear(),e.dow,e.doy)}function L4(e,t,r,n,a){var i;return e==null?Zl(this,n,a).year:(i=ri(e,n,a),t>i&&(t=i),MH.call(this,e,t,r,n,a))}function MH(e,t,r,n,a){var i=g4(e,t,r,n,a),s=Xl(i.year,0,i.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}Me("Q",0,"Qo","quarter");Ce("Q",i4);At("Q",function(e,t){t[Ja]=(ut(e)-1)*3});function FH(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}Me("D",["DD",2],"Do","date");Ce("D",It,Us);Ce("DD",It,cn);Ce("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});At(["D","DD"],la);At("Do",function(e,t){t[la]=ut(e.match(It)[0])});var j4=qs("Date",!0);Me("DDD",["DDDD",3],"DDDo","dayOfYear");Ce("DDD",dh);Ce("DDDD",o4);At(["DDD","DDDD"],function(e,t,r){r._dayOfYear=ut(e)});function NH(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}Me("m",["mm",2],0,"minute");Ce("m",It,xv);Ce("mm",It,cn);At(["m","mm"],qn);var IH=qs("Minutes",!1);Me("s",["ss",2],0,"second");Ce("s",It,xv);Ce("ss",It,cn);At(["s","ss"],Qa);var LH=qs("Seconds",!1);Me("S",0,0,function(){return~~(this.millisecond()/100)});Me(0,["SS",2],0,function(){return~~(this.millisecond()/10)});Me(0,["SSS",3],0,"millisecond");Me(0,["SSSS",4],0,function(){return this.millisecond()*10});Me(0,["SSSSS",5],0,function(){return this.millisecond()*100});Me(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});Me(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});Me(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});Me(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});Ce("S",dh,i4);Ce("SS",dh,cn);Ce("SSS",dh,o4);var Ri,$4;for(Ri="SSSS";Ri.length<=9;Ri+="S")Ce(Ri,Hs);function jH(e,t){t[go]=ut(("0."+e)*1e3)}for(Ri="S";Ri.length<=9;Ri+="S")At(Ri,jH);$4=qs("Milliseconds",!1);Me("z",0,0,"zoneAbbr");Me("zz",0,0,"zoneName");function $H(){return this._isUTC?"UTC":""}function zH(){return this._isUTC?"Coordinated Universal Time":""}var be=mc.prototype;be.add=DB;be.calendar=$B;be.clone=zB;be.diff=YB;be.endOf=nH;be.format=ZB;be.from=JB;be.fromNow=QB;be.to=eH;be.toNow=tH;be.get=X$;be.invalidAt=fH;be.isAfter=BB;be.isBefore=HB;be.isBetween=UB;be.isSame=qB;be.isSameOrAfter=WB;be.isSameOrBefore=VB;be.isValid=cH;be.lang=D4;be.locale=P4;be.localeData=M4;be.max=cB;be.min=lB;be.parsingFlags=dH;be.set=Z$;be.startOf=rH;be.subtract=MB;be.toArray=sH;be.toObject=uH;be.toDate=oH;be.toISOString=KB;be.inspect=XB;typeof Symbol<"u"&&Symbol.for!=null&&(be[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});be.toJSON=lH;be.toString=GB;be.unix=iH;be.valueOf=aH;be.creationData=hH;be.eraName=vH;be.eraNarrow=bH;be.eraAbbr=yH;be.eraYear=_H;be.year=l4;be.isLeapYear=K$;be.weekYear=TH;be.isoWeekYear=OH;be.quarter=be.quarters=FH;be.month=p4;be.daysInMonth=oz;be.week=be.weeks=pz;be.isoWeek=be.isoWeeks=mz;be.weeksInYear=PH;be.weeksInWeekYear=DH;be.isoWeeksInYear=AH;be.isoWeeksInISOWeekYear=RH;be.date=j4;be.day=be.days=Oz;be.weekday=Az;be.isoWeekday=Rz;be.dayOfYear=NH;be.hour=be.hours=Lz;be.minute=be.minutes=IH;be.second=be.seconds=LH;be.millisecond=be.milliseconds=$4;be.utcOffset=yB;be.utc=wB;be.local=xB;be.parseZone=SB;be.hasAlignedHourOffset=CB;be.isDST=EB;be.isLocal=TB;be.isUtcOffset=OB;be.isUtc=T4;be.isUTC=T4;be.zoneAbbr=$H;be.zoneName=zH;be.dates=Tn("dates accessor is deprecated. Use date instead.",j4);be.months=Tn("months accessor is deprecated. Use month instead",p4);be.years=Tn("years accessor is deprecated. Use year instead",l4);be.zone=Tn("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",_B);be.isDSTShifted=Tn("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",kB);function BH(e){return Nt(e*1e3)}function HH(){return Nt.apply(null,arguments).parseZone()}function z4(e){return e}var pt=vv.prototype;pt.calendar=T$;pt.longDateFormat=P$;pt.invalidDate=M$;pt.ordinal=I$;pt.preparse=z4;pt.postformat=z4;pt.relativeTime=j$;pt.pastFuture=$$;pt.set=E$;pt.eras=pH;pt.erasParse=mH;pt.erasConvertYear=gH;pt.erasAbbrRegex=xH;pt.erasNameRegex=wH;pt.erasNarrowRegex=SH;pt.months=rz;pt.monthsShort=nz;pt.monthsParse=iz;pt.monthsRegex=uz;pt.monthsShortRegex=sz;pt.week=cz;pt.firstDayOfYear=hz;pt.firstDayOfWeek=fz;pt.weekdays=Sz;pt.weekdaysMin=Ez;pt.weekdaysShort=Cz;pt.weekdaysParse=Tz;pt.weekdaysRegex=Pz;pt.weekdaysShortRegex=Dz;pt.weekdaysMinRegex=Mz;pt.isPM=Nz;pt.meridiem=jz;function $f(e,t,r,n){var a=ii(),i=va().set(n,t);return a[r](i,e)}function B4(e,t,r){if(ni(e)&&(t=e,e=void 0),e=e||"",t!=null)return $f(e,t,r,"month");var n,a=[];for(n=0;n<12;n++)a[n]=$f(e,n,r,"month");return a}function Nv(e,t,r,n){typeof e=="boolean"?(ni(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,ni(t)&&(r=t,t=void 0),t=t||"");var a=ii(),i=e?a._week.dow:0,s,l=[];if(r!=null)return $f(t,(r+i)%7,n,"day");for(s=0;s<7;s++)l[s]=$f(t,(s+i)%7,n,"day");return l}function UH(e,t){return B4(e,t,"months")}function qH(e,t){return B4(e,t,"monthsShort")}function WH(e,t,r){return Nv(e,t,r,"weekdays")}function VH(e,t,r){return Nv(e,t,r,"weekdaysShort")}function YH(e,t,r){return Nv(e,t,r,"weekdaysMin")}Ni("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=ut(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}});ve.lang=Tn("moment.lang is deprecated. Use moment.locale instead.",Ni);ve.langData=Tn("moment.langData is deprecated. Use moment.localeData instead.",ii);var qa=Math.abs;function GH(){var e=this._data;return this._milliseconds=qa(this._milliseconds),this._days=qa(this._days),this._months=qa(this._months),e.milliseconds=qa(e.milliseconds),e.seconds=qa(e.seconds),e.minutes=qa(e.minutes),e.hours=qa(e.hours),e.months=qa(e.months),e.years=qa(e.years),this}function H4(e,t,r,n){var a=Qn(t,r);return e._milliseconds+=n*a._milliseconds,e._days+=n*a._days,e._months+=n*a._months,e._bubble()}function KH(e,t){return H4(this,e,t,1)}function XH(e,t){return H4(this,e,t,-1)}function dx(e){return e<0?Math.floor(e):Math.ceil(e)}function ZH(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,a,i,s,l,u;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=dx(g1(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,a=wn(e/1e3),n.seconds=a%60,i=wn(a/60),n.minutes=i%60,s=wn(i/60),n.hours=s%24,t+=wn(s/24),u=wn(U4(t)),r+=u,t-=dx(g1(u)),l=wn(r/12),r%=12,n.days=t,n.months=r,n.years=l,this}function U4(e){return e*4800/146097}function g1(e){return e*146097/4800}function JH(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=On(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+U4(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(g1(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function oi(e){return function(){return this.as(e)}}var q4=oi("ms"),QH=oi("s"),eU=oi("m"),tU=oi("h"),rU=oi("d"),nU=oi("w"),aU=oi("M"),iU=oi("Q"),oU=oi("y"),sU=q4;function uU(){return Qn(this)}function lU(e){return e=On(e),this.isValid()?this[e+"s"]():NaN}function Oo(e){return function(){return this.isValid()?this._data[e]:NaN}}var cU=Oo("milliseconds"),dU=Oo("seconds"),fU=Oo("minutes"),hU=Oo("hours"),pU=Oo("days"),mU=Oo("months"),gU=Oo("years");function vU(){return wn(this.days()/7)}var Ga=Math.round,cs={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function bU(e,t,r,n,a){return a.relativeTime(t||1,!!r,e,n)}function yU(e,t,r,n){var a=Qn(e).abs(),i=Ga(a.as("s")),s=Ga(a.as("m")),l=Ga(a.as("h")),u=Ga(a.as("d")),c=Ga(a.as("M")),m=Ga(a.as("w")),p=Ga(a.as("y")),g=i<=r.ss&&["s",i]||i<r.s&&["ss",i]||s<=1&&["m"]||s<r.m&&["mm",s]||l<=1&&["h"]||l<r.h&&["hh",l]||u<=1&&["d"]||u<r.d&&["dd",u];return r.w!=null&&(g=g||m<=1&&["w"]||m<r.w&&["ww",m]),g=g||c<=1&&["M"]||c<r.M&&["MM",c]||p<=1&&["y"]||["yy",p],g[2]=t,g[3]=+e>0,g[4]=n,bU.apply(null,g)}function _U(e){return e===void 0?Ga:typeof e=="function"?(Ga=e,!0):!1}function wU(e,t){return cs[e]===void 0?!1:t===void 0?cs[e]:(cs[e]=t,e==="s"&&(cs.ss=t-1),!0)}function xU(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=cs,a,i;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},cs,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),a=this.localeData(),i=yU(this,!r,n,a),r&&(i=a.pastFuture(+this,i)),a.postformat(i)}var tg=Math.abs;function Ko(e){return(e>0)-(e<0)||+e}function yh(){if(!this.isValid())return this.localeData().invalidDate();var e=tg(this._milliseconds)/1e3,t=tg(this._days),r=tg(this._months),n,a,i,s,l=this.asSeconds(),u,c,m,p;return l?(n=wn(e/60),a=wn(n/60),e%=60,n%=60,i=wn(r/12),r%=12,s=e?e.toFixed(3).replace(/\.?0+$/,""):"",u=l<0?"-":"",c=Ko(this._months)!==Ko(l)?"-":"",m=Ko(this._days)!==Ko(l)?"-":"",p=Ko(this._milliseconds)!==Ko(l)?"-":"",u+"P"+(i?c+i+"Y":"")+(r?c+r+"M":"")+(t?m+t+"D":"")+(a||n||e?"T":"")+(a?p+a+"H":"")+(n?p+n+"M":"")+(e?p+s+"S":"")):"P0D"}var dt=vh.prototype;dt.isValid=mB;dt.abs=GH;dt.add=KH;dt.subtract=XH;dt.as=JH;dt.asMilliseconds=q4;dt.asSeconds=QH;dt.asMinutes=eU;dt.asHours=tU;dt.asDays=rU;dt.asWeeks=nU;dt.asMonths=aU;dt.asQuarters=iU;dt.asYears=oU;dt.valueOf=sU;dt._bubble=ZH;dt.clone=uU;dt.get=lU;dt.milliseconds=cU;dt.seconds=dU;dt.minutes=fU;dt.hours=hU;dt.days=pU;dt.weeks=vU;dt.months=mU;dt.years=gU;dt.humanize=xU;dt.toISOString=yh;dt.toString=yh;dt.toJSON=yh;dt.locale=P4;dt.localeData=M4;dt.toIsoString=Tn("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",yh);dt.lang=D4;Me("X",0,0,"unix");Me("x",0,0,"valueOf");Ce("x",hh);Ce("X",U$);At("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)});At("x",function(e,t,r){r._d=new Date(ut(e))});//! moment.js
332
- ve.version="2.30.1";S$(Nt);ve.fn=be;ve.min=dB;ve.max=fB;ve.now=hB;ve.utc=va;ve.unix=BH;ve.months=UH;ve.isDate=pc;ve.locale=Ni;ve.invalid=lh;ve.duration=Qn;ve.isMoment=Xn;ve.weekdays=WH;ve.parseZone=HH;ve.localeData=ii;ve.isDuration=mf;ve.monthsShort=qH;ve.weekdaysMin=YH;ve.defineLocale=Tv;ve.updateLocale=Hz;ve.locales=Uz;ve.weekdaysShort=VH;ve.normalizeUnits=On;ve.relativeTimeRounding=_U;ve.relativeTimeThreshold=wU;ve.calendarFormat=jB;ve.prototype=be;ve.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const ki=class ki{static getAttrOf(t,r){return t.find(n=>(n.apicode||n.apiCode)==r)}static avoid0TypeConvert(t){return t===0?String(t):t}static generateUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var r=Math.random()*16|0,n=t=="x"?r:r&3|8;return n.toString(16)})}static momentToRawData(t){if(ve.isMoment(t)){const r=t.creationData();return r==null?void 0:r.input}else return t}static tableRowHasChange(t){return t.dataType=="add"||t.dataType=="del"||ki.tableRowHasNewValue(t)}static tableRowHasNewValue(t){return!!t.newVal&&!!Object.values(t.newVal).length}static isAddTableRow(t){return t.dataType=="add"}static isDelTableRow(t){return t.dataType=="del"}static setTableRowAttrValue(t,r){t.newVal?Object.assign(t.newVal,r):t.newVal=r}static isMac(){return/macintosh|mac os x/i.test(navigator.userAgent)}static makeDestructurable(t,r){if(typeof Symbol<"u"){const n={...t};return Object.defineProperty(n,Symbol.iterator,{enumerable:!1,value(){let a=0;return{next:()=>({value:r[a++],done:a>r.length})}}}),n}else return Object.assign([...r],t)}static ArrayAttributeFlat(t,r="children",n){const a=[...t],i=[];for(;a.length;){const s=a.shift(),l=s[r];if(n==null||n(s),i.push(s),l!=null&&l.length)for(let u=l.length-1;u>=0;u--)a.unshift(l[u])}return i}static getTreeRelationNoRecursion({data:t,lookup:r,childrenKey:n="children"}){var m;const a=new Set;let i={parent:void 0,self:void 0,beforeSibling:[],afterSibling:[],index:void 0,stack:Array.from(a)};const s=new Map,l=new Map,u=new Map,c=[...t];for(;c.length;){const p=c.shift(),g=s.get(p)??t.findIndex(T=>T==p),y=l.get(p);y?a.add(y):a.clear();const x=y==null?void 0:y[n],E=r(p,g),k=p[n];if(E){i={parent:y,self:p,beforeSibling:(x||t).slice(0,g),afterSibling:(x||t).slice(g+1),index:g,stack:Array.from(a)};break}else if(k!=null&&k.length)for(let T=k.length-1;T>=0;T--){const w=k[T];c.unshift(k[T]),s.set(w,T),l.set(w,p),T==k.length-1&&u.set(w,()=>{var S;(S=u.get(p))==null||S(),a.delete(p)})}else(m=u.get(p))==null||m()}return i}static judgeParentIcon(t,r){if(t=="10001001")return"bluecube";if(t=="10001002")return"document-cube";if(t=="10001006")return"file-cube";if(Fi.isProject(t))return r||"icon"}};Tt(ki,"getLabelInOptions",t=>{const{value:r,options:n,adaptor:a}=t,i=Object.prototype.toString.call(r);if(!(c=>c!==""&&c!==void 0&&c!==null)(r))return"";let l="";i==="[object Array]"&&(l=[]);const u=c=>{for(let m=0;m<(c||[]).length;m++){const p=c[m][a?a.label:"label"],g=c[m][a?a.value:"value"];i==="[object Array]"?r.includes(g)&&l.push(p):r===g&&(l=p),c[m].children&&c[m].children.length&&u(c[m].children)}};return u(n),l}),Tt(ki,"transformArrayToMap",(t,r,n,a)=>{function i(s,l){return s=="autoGetId"&&(a!=null&&a.useAutoGetId)?As.isCustomAttr(l)?"id":"dataFromId":s}return t==null?void 0:t.reduce((s,l)=>{const u=i(r,l),c=i(n,l);return c?s[l[u]]=l[c]:s[l[u]]=l,s},{})}),Tt(ki,"autoTableHeight",(t=270)=>{var r=0;return window.innerHeight?r=window.innerHeight:document.body&&document.body.clientHeight&&(r=document.body.clientHeight),document.documentElement&&document.documentElement.clientHeight&&(r=document.documentElement.clientHeight),r-t}),Tt(ki,"renderBomTag",t=>{const r=s=>{const l=s.match(/\d+(\.\d+)?/g);return l?l[l.length-1]:""},n=s=>{let l=0;const u=c=>{var m=c.split("");return m.reverse()};for(let c=0;c<u(s).length&&u(s)[c].match(/\d/);c++)l=l+1;return s.substring(0,s.length-l)},a=s=>ie.sortBy(ie.uniq(s.split(",")),l=>Number(r(l))),i=Object.keys(ie.groupBy(a(t),s=>n(s))).map(s=>(u=>{var c=[],m=0;const p=u.sort((g,y)=>Number(r(g))-Number(r(y)));return p.forEach((g,y)=>{y===0?c[0]=[g]:Number(r(g))-Number(r(p[y-1]))===1?c[m].push(g):c[++m]=[g]}),c})(ie.groupBy(a(t),u=>n(u))[s]).map(u=>{if(u.length>1){const c=u.map(m=>Number(r(m)));return`${s}${ie.min(c)}-${ie.max(c)}`}else return u[0]}));return ie.flatten(i).join(",")}),Tt(ki,"tidyBomTag",(t,r)=>{t=t&&t.replace(/,/g,",");const n=t.split(",").map(u=>u.replace(/([^\d]+)(\d+)-\1(\d+)/,"$1$2-$3")).map(u=>{if(u.match(/^\S+\d+-\d+$/)){const c=u.substring(0,u.match(/\d+-\d+$/).index),m=[],p=Number(u.split(c)[1].split("-")[1]),g=p<1e3?p:1e3;for(let y=Number(u.split(c)[1].split("-")[0]);y<=g;y++)m.push(`${c}${y}`);return m.join(",")}else if(u.match(/^\S+\d+-\S+\d+$/)){const c=u.split("-")[0].substring(0,u.match(/\d/).index).toUpperCase(),m=u.split("-")[0].substring(u.match(/\d/).index,u.split("-")[0].length),p=u.split("-")[1].substring(0,u.match(/\d/).index).toUpperCase(),g=u.split("-")[1].substring(u.match(/\d/).index,u.split("-")[0].length);if(c!=p)return u;{const y=[],x=Number(g),E=x<1e3?x:1e3;for(let k=Number(m);k<=E;k++)y.push(`${c}${k}`);return y.join(",")}}else return u}).join(","),a=u=>{const c=u.match(/\d+(\.\d+)?/g);return c?c[c.length-1]:""},i=u=>{let c=0;const m=p=>{var g=p.split("");return g.reverse()};for(let p=0;p<m(u).length&&m(u)[p].match(/\d/);p++)c=c+1;return u.substring(0,u.length-c)},s=u=>ie.sortBy(ie.uniq(u.split(",")),c=>Number(a(c))),l=Object.values(ie.groupBy(s(n.toLocaleUpperCase()),u=>i(u))).map(u=>u.join(","));return l.length>1e3&&(r==null||r()),l.length>1e3?l.slice(0,1e3).join(","):l.join(",")});let vt=ki;const SU="_tableSelection_1xub0_1",CU="_sideBox_1xub0_36",EU="_tableFrame_1xub0_51",rg={tableSelection:SU,sideBox:CU,tableFrame:EU},kU="_sider_item_container_wnrm0_1",Xo={sider_item_container:kU},{TreeNode:fx}=Z.Tree,W4=e=>{const[t,r]=F.useState([]),[n,a]=F.useState([]),[i,s]=F.useState([]);zs(()=>{l()});const l=async()=>{a(e.treeResult||[]);const{result:c}=await e.getAttributeByTab({itemCode:e.itemCode,tabCode:"10002001",notInApiCode:"Unit,ProductModel,Product"}),m=c.records.filter(p=>["Number","Note","LifeCyclePhase","Category"].includes(p.apicode));e.onGetTreeFields&&e.onGetTreeFields(m)};F.useEffect(()=>{e.outIsSelected&&r([])},[e.outIsSelected]);const u=c=>c.map(p=>(p.title=D.jsxs("div",{className:Xo.treeListBox,children:[D.jsxs("div",{className:Xo.titleBox,style:{display:"flex",alignItems:"center"},children:[D.jsx(He,{type:p.icon=="leftbar-folder"?p.children&&p.children.length>0&&ie.includes(i,p.id)?"content-open2":"content-fold":p.icon,style:{fontSize:"16px",color:"#333"}}),D.jsx("div",{className:Xo.name,style:{marginLeft:"2px",whiteSpace:"nowrap"},title:p.name,children:D.jsx("span",{children:p.name})})]}),D.jsx("div",{className:Te(Xo.btnBox,Xo.onHover)})]},p.id),p.children?D.jsx(fx,{title:p.title,dataRef:p,children:u(p.children)},p.id):D.jsx(fx,{title:p.title},p.id)));return D.jsx("div",{className:Xo.sider_item_container,children:D.jsx(Z.Tree,{switcherIcon:D.jsx(He,{type:"xia-mian",style:{color:"#3C3C3C",cursor:"pointer"}}),expandedKeys:i,selectedKeys:t,onExpand:c=>{s(c)},onSelect:(c,m)=>{m.selected&&(r(c),e.onSelected&&e.onSelected(m.node.dataRef))},children:u(n)})})},TU="_main_1qtos_1",OU="_edit_cell_1qtos_23",AU="_update_style_1qtos_28",RU="_updated_style_1qtos_42",PU="_updated_redline_style_1qtos_61",DU="_table_footer_1qtos_349",MU="_loading_1qtos_361",zn={main:TU,edit_cell:OU,update_style:AU,updated_style:RU,updated_redline_style:PU,table_footer:DU,loading:MU},FU=0,ng=1,ag=2,V4=8,Zo=64,Nd=0,Y4=1,v1=typeof Symbol=="function"?Symbol.for("idx"):"$$idx";function NU(){return{vt_state:1,possible_hight_per_tr:-1,computed_h:0,re_computed:0,row_height:[],row_count:0,prev_row_count:0,_offset_top:0,_offset_head:0,_offset_tail:1,WH:0,top:0,left:0,evt:FU,end:!1,final_top:0,f_final_top:Y4,update_count:0}}function IU(e){Object.prototype.hasOwnProperty.call(e,"CLICK~__DIAGNOSIS__")||Object.defineProperty(e,"CLICK~__DIAGNOSIS__",{get(){console.debug("OoOoOoO DIAGNOSIS OoOoOoO");let t=0;for(let a=0;a<e.row_count;++a)t+=e.row_height[a];let r,n;t>e.computed_h?(r="color:rgb(15, 179, 9)",n="lower than expected"):t<e.computed_h?(r="color:rgb(202, 61, 81)",n="higher than expected"):(r="color:rgba(0, 0, 0, 0.85)",n="normal"),console.debug(`%c%d(%d)(${n})`,r,t,e.computed_h-t),console.debug("OoOoOoOoOoOoOOoOoOoOoOoOo")},configurable:!1,enumerable:!1})}function os(e,t){if(e.debug){const r=new Date,n=`${r.toLocaleTimeString()}.${r.getMilliseconds()}`;console.debug(`%c[${e.id}][${n}][${t}]`,"color:#a00",e)}}function LU(e){const t=e.target;return{target:{scrollTop:t.scrollTop,scrollLeft:t.scrollLeft},end:t.scrollHeight-t.clientHeight===Math.round(t.scrollTop),flag:V4}}const jU=ee.forwardRef(function(t,r){return D.jsx("table",{ref:r,...t})});function $U(e){return D.jsx("tbody",{...e})}const zU=ee.forwardRef(function(t,r){const[n,a]=F.useState(!1);return D.jsx("tr",{ref:r,...t})});function BU(e,t){const{row_height:r,row_count:n,overscanRowCount:a}=e;e._scroll_y=e.scroll.y,typeof e._scroll_y=="number"?e._y=e._scroll_y:(typeof e._scroll_y=="string"||console.assert(!1,"VT: did you forget to set `scroll.y`?"),e._y=e.wrap_inst.current.parentElement.offsetHeight),console.assert(e._y>=0);let i=0,s=0,l=0,u=0;if(t===-1&&n>0){for(s=n;s>0&&u<e._y;)u+=r[--s];return[0|s,0|n,0|e.computed_h-u]}for(;s<n&&i<t;++s)i+=r[s];for(l=s;l<n&&u<e._y;++l)u+=r[l];let c=a<0?0:a;for(;s>0&&c--;)i-=r[--s];return l+=a,l>n&&(l=n),[0|s,0|l,0|i]}function G4(e,t,r,n){e._offset_top=0|t,e._offset_head=0|r,e._offset_tail=0|n}function HU(e,t,r,n,a){e.top=t,e.left=r,e.evt=n,e.end=a}function UU(e,t){if(e.WH===t)return;e.WH=t;const r=e.wrap_inst.current.style;r.height=t?(r.maxHeight=t+"px",r.maxHeight):(r.maxHeight="unset",r.maxHeight),e.on_update_wrap_style()}function hx(e,t,r){if(!e.wrap_inst.current)return;const n=e.wrap_inst.current.parentElement;n.scrollTop=t,n.scrollLeft=Math.max(r,n.scrollLeft)}function K4(e,t){const r=()=>{os(e,"REPAINTING"),e.vt_state===4&&e.wrap_inst.current&&UU(e,e.computed_h),e.HND_PAINT=0};return t<0?window.requestAnimationFrame(r):window.setTimeout(r,t)}function ig(e){e.HND_PAINT>0||(e.HND_PAINT=K4(e,-1))}function X4(e,t,r,n){const a=t-r,i=new Array(a).fill(n);e.row_height=e.row_height.concat(i),e.computed_h+=a*n}function qU(e,t,r){if(t===0){e.computed_h=0,e.row_height.length=0,e.top=0;return}const n=e.row_height;let a=0;for(let i=t;i<r;++i)a+=n[i];e.computed_h-=a}function WU(e,t){e.re_computed=t-e.row_count,e.prev_row_count=e.row_count,e.row_count=t}const VU=(e,t)=>{const{style:r,context:n,...a}=e,i=F.useState(0),s=F.useRef(()=>{}),l=F.useMemo(()=>ee.createRef(),[]),u=F.useContext(n);F.useMemo(()=>{Object.assign(u,NU()),u.wrap_inst&&u.wrap_inst.current&&(u.wrap_inst.current.parentElement.onscroll=null),u.wrap_inst=l,u.top=u.initTop,u.on_update_wrap_style=()=>{u._y===0&&`${u._scroll_y}`.length&&g({flag:Zo,target:{scrollTop:u.top,scrollLeft:u.left}})},process.env.NODE_ENV==="development"&&IU(u)},[]);const c=F.useRef([]).current,m=F.useRef(0);let p;const g=F.useCallback(w=>{if(u.vt_state===4){if(w&&(c.push(w),u.f_final_top===Nd))return w.flag=Zo,p(0);c.length&&(m.current&&cancelAnimationFrame(m.current),m.current=requestAnimationFrame(p))}},[]),y=F.useCallback(w=>{g(LU(w))},[]);p=F.useCallback(w=>{if(u.vt_state!==4)return;const S=c;let f;if(!S.length)return;f=S.pop();let h=f.target.scrollTop,v=f.target.scrollLeft;const _=f.flag;os(u,`raf top: ${h}, left: ${v}`);const R=BU(u,u.f_final_top===Nd?u.final_top:h),C=R[0],P=R[1],M=R[2],q=u._offset_head,L=u._offset_tail,N=u._offset_top;let j;switch(_){case ng:os(u,"SCROLLEVT_INIT"),j=!1;break;case Zo:os(u,"SCROLLEVT_BY_HOOK"),C===q&&P===L&&M===N?(u.f_final_top=Y4,u.final_top===-1&&(h=u.computed_h-u._y),j=!0):(u.final_top===-1&&(h=M),j=!1);break;case ag:if(os(u,"SCROLLEVT_RECOMPUTE"),C===q&&P===L&&M===N){m.current=0,S.length&&g(null);return}j=!1;break;case V4:if(os(u,"SCROLLEVT_NATIVE"),m.current=0,S.length=0,u.onScroll&&u.onScroll({top:h,left:v,isEnd:f.end}),C===q&&P===L&&M===N)return;j=f.end;break}G4(u,M,C,P),HU(u,h,v,_,j),i[1](++u.update_count)},[]),F.useImperativeHandle(t,()=>{const w=S=>{u.f_final_top=Nd,u.final_top=S,g({target:{scrollTop:S,scrollLeft:-1},flag:Zo})};return{scrollTo:S=>{s.current=()=>w(S),s.current()},scrollToIndex:S=>{s.current=()=>{S>u.row_count-1&&(S=u.row_count-1),S<0&&(S=0);let f=0;for(let h=0;h<S;++h)f+=u.row_height[h];w(f)},s.current()}}},[]),F.useEffect(()=>{u.wrap_inst.current.parentElement.onscroll=y},[l]),F.useEffect(()=>{g({flag:Zo,target:{scrollLeft:u.left,scrollTop:u.top}})},[u.scroll.y]),F.useEffect(()=>{switch(u.evt){case Zo:u.f_final_top===Nd?s.current():hx(u,u.top,u.left);break;case ng:case ag:hx(u,u.top,u.left),c.length&&p(0);break}},[i[0]]),F.useEffect(()=>{switch(u.vt_state){case 1:break;case 2:u.vt_state=4,g({target:{scrollTop:u.top,scrollLeft:0},flag:ng});break;case 4:u.re_computed!==0&&(u.re_computed=0,g({target:{scrollTop:u.top,scrollLeft:u.left},flag:ag}));break}}),r.position="relative",r.top=u._offset_top;const{width:x,...E}=r,k=F.useMemo(()=>({width:x,minWidth:"100%",position:"relative",transform:"matrix(1, 0, 0, 1, 0, 0)"}),[x]),T=u.components.table;return D.jsx("div",{ref:l,style:k,children:D.jsx(n.Provider,{value:{...u},children:D.jsx(T,{...a,style:E})})})},YU=e=>{const{children:t,ctx:r,...n}=e,a=t[0],i=t[1],s=r.components.body.wrapper;let l=Array.isArray(i)?i.length:0,{_offset_head:u,_offset_tail:c}=r,m=[];switch(r.vt_state){case 1:l>=0&&(console.assert(u===0),console.assert(c===1),Array.isArray(i)?(m=i.slice(u,c),m[0].props.record[v1]=0):m=i,r.re_computed=l,r.prev_row_count=l,r.row_count=l);break;case 4:{if(c>l){const g=c-l;c-=g,u-=g,u<0&&(u=0),c<0&&(c=0),G4(r,r._offset_top,u,c)}r.row_count!==l&&WU(r,l),l=r.row_count;const p=r.prev_row_count;if(l<p)qU(r,l,p);else if(l>p){const g=r.row_height;l-g.length>0?X4(r,l,g.length,r.possible_hight_per_tr):(g.fill(r.possible_hight_per_tr,p,l),r.computed_h+=r.possible_hight_per_tr*(l-p))}if(l){let g=u;m=i.slice(g,c),m.forEach(y=>y.props.record[v1]=g++)}else m=i;r.prev_row_count=r.row_count}break;case 2:console.assert(!1);break}return D.jsxs(s,{...n,children:[a,m]})},GU=e=>{const t=ee.createRef(),{ctx:r,...n}=e,a=e.children,i=r.components.body.row;if(!Array.isArray(a))return D.jsx(i,{...n,children:a});const s=a[0].props,l=s.record[v1],u=F.useRef(l),c=F.useMemo(()=>`.${s.prefixCls}-expanded-row`,[s.prefixCls]);return F.useEffect(()=>(r.vt_state===4?ig(r):(console.assert(r.vt_state===1),r.vt_state=2,r.possible_hight_per_tr=t.current.offsetHeight,X4(r,r.row_count,0,r.possible_hight_per_tr),K4(r,16)),()=>ig(r)),[]),F.useEffect(()=>{const m=t.current;let p=m.offsetHeight,g=m.nextSibling;for(;g&&g.matches(c);)p+=g.offsetHeight,g=g.nextSibling;const y=r.row_height[l],x=r.row_height[u.current];r.computed_h-=y,r.computed_h+=x,r.computed_h+=p-x,r.row_height[l]=p,ig(r)}),D.jsx(i,{...n,ref:t})};function Z4(e,t){const{table:r,body:n,header:a}=t;e.components.body={...e.components.body,...n},n&&n.cell&&(e._vtcomponents.body.cell=n.cell),a&&(e.components.header=a,e._vtcomponents.header=a),r&&(e.components.table=r)}function KU(e,t){const r=F.useRef(ee.createContext({})).current,n=F.useContext(r),a=F.useRef({scrollTo:i=>{},scrollToIndex:i=>{}});return F.useMemo(()=>Object.assign(n,{id:(+new Date).toString(36).slice(4),initTop:0,overscanRowCount:20,debug:!1,ref:a},e()),t),F.useMemo(()=>{const i=ee.forwardRef(VU);n._vtcomponents={table:s=>D.jsx(i,{...s,context:r,ref:n.ref}),body:{wrapper:s=>D.jsx(r.Consumer,{children:()=>D.jsx(YU,{...s,ctx:n})}),row:s=>D.jsx(GU,{...s,ctx:n})}},n.components={},Z4(n,{table:jU,body:{wrapper:$U,row:zU}}),n.vt_state=1},[]),n}const px=1,XU=2;(function(){if((typeof window=="object"&&window instanceof Window?px:XU)&px&&!Object.hasOwnProperty.call(window,"requestAnimationFrame")&&!window.requestAnimationFrame)throw new Error("Please using the modern browers or appropriate polyfill!")})();function ZU(e,t){const r=KU(e,t||[]);return[r._vtcomponents,n=>Z4(r,n),r.ref]}const JU=({hideFooter:e,contentRef:t,tableRef:r,scroll:n,fullScreenMinusHeight:a,scrollUpdate:i,onTableHeightChange:s},l)=>{const[u,c]=F.useState(0),m=xn(n);return F.useEffect(()=>{const p=()=>{var x,E,k;const y=(T=>{for(var w=T.offsetTop,S=T.offsetParent;S!==null;)w+=S.offsetTop,S=S.offsetParent;return w})(t.current);if(r.current){const T=t.current.querySelectorAll(".frontend-table-body")[0].getElementsByTagName("div")[0],w=t.current.querySelectorAll(".frontend-table-body")[0],S=34+(e?0:15);if(T){const f=vt.autoTableHeight(l?S:y+S),h=f-(a||0);n!=null&&n.y?i?i==null||i(l,h):(c(l?h:Number((x=m.current)==null?void 0:x.y)),T.style.minHeight=(l?h:Number((E=m.current)==null?void 0:E.y))-10+"px",w.style.minHeight=(l?h:Number((k=m.current)==null?void 0:k.y))+"px"):(c(l?h:f),T.style.minHeight=(l?h:f)-10+"px",w.style.minHeight=(l?h:f)+"px")}}};return p(),window.addEventListener("resize",p),()=>{window.removeEventListener("resize",p)}},[l,n]),F.useEffect(()=>{s==null||s(u)},[u]),u};var pl={exports:{}},ml={},Id={},mx;function QU(){if(mx)return Id;mx=1,Id.__esModule=!0,Id.cloneElement=l;var e=t(F);function t(u){return u&&u.__esModule?u:{default:u}}function r(u,c){var m=Object.keys(u);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(u);c&&(p=p.filter(function(g){return Object.getOwnPropertyDescriptor(u,g).enumerable})),m.push.apply(m,p)}return m}function n(u){for(var c=1;c<arguments.length;c++){var m=arguments[c]!=null?arguments[c]:{};c%2?r(Object(m),!0).forEach(function(p){a(u,p,m[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(m)):r(Object(m)).forEach(function(p){Object.defineProperty(u,p,Object.getOwnPropertyDescriptor(m,p))})}return u}function a(u,c,m){return c=i(c),c in u?Object.defineProperty(u,c,{value:m,enumerable:!0,configurable:!0,writable:!0}):u[c]=m,u}function i(u){var c=s(u,"string");return typeof c=="symbol"?c:String(c)}function s(u,c){if(typeof u!="object"||u===null)return u;var m=u[Symbol.toPrimitive];if(m!==void 0){var p=m.call(u,c);if(typeof p!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(u)}function l(u,c){return c.style&&u.props.style&&(c.style=n(n({},u.props.style),c.style)),c.className&&u.props.className&&(c.className=u.props.className+" "+c.className),e.default.cloneElement(u,c)}return Id}var gl={},gx;function J4(){if(gx)return gl;gx=1,gl.__esModule=!0,gl.resizableProps=void 0;var e=t(fc());hv();function t(n){return n&&n.__esModule?n:{default:n}}var r={axis:e.default.oneOf(["both","x","y","none"]),className:e.default.string,children:e.default.element.isRequired,draggableOpts:e.default.shape({allowAnyClick:e.default.bool,cancel:e.default.string,children:e.default.node,disabled:e.default.bool,enableUserSelectHack:e.default.bool,offsetParent:e.default.node,grid:e.default.arrayOf(e.default.number),handle:e.default.string,nodeRef:e.default.object,onStart:e.default.func,onDrag:e.default.func,onStop:e.default.func,onMouseDown:e.default.func,scale:e.default.number}),height:function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];var l=i[0];if(l.axis==="both"||l.axis==="y"){var u;return(u=e.default.number).isRequired.apply(u,i)}return e.default.number.apply(e.default,i)},handle:e.default.oneOfType([e.default.node,e.default.func]),handleSize:e.default.arrayOf(e.default.number),lockAspectRatio:e.default.bool,maxConstraints:e.default.arrayOf(e.default.number),minConstraints:e.default.arrayOf(e.default.number),onResizeStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,resizeHandles:e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:e.default.number,width:function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];var l=i[0];if(l.axis==="both"||l.axis==="x"){var u;return(u=e.default.number).isRequired.apply(u,i)}return e.default.number.apply(e.default,i)}};return gl.resizableProps=r,gl}var vx;function Q4(){if(vx)return ml;vx=1,ml.__esModule=!0,ml.default=void 0;var e=s(F),t=hv(),r=QU(),n=J4(),a=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function i(T){if(typeof WeakMap!="function")return null;var w=new WeakMap,S=new WeakMap;return(i=function(h){return h?S:w})(T)}function s(T,w){if(T&&T.__esModule)return T;if(T===null||typeof T!="object"&&typeof T!="function")return{default:T};var S=i(w);if(S&&S.has(T))return S.get(T);var f={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in T)if(v!=="default"&&Object.prototype.hasOwnProperty.call(T,v)){var _=h?Object.getOwnPropertyDescriptor(T,v):null;_&&(_.get||_.set)?Object.defineProperty(f,v,_):f[v]=T[v]}return f.default=T,S&&S.set(T,f),f}function l(){return l=Object.assign?Object.assign.bind():function(T){for(var w=1;w<arguments.length;w++){var S=arguments[w];for(var f in S)Object.prototype.hasOwnProperty.call(S,f)&&(T[f]=S[f])}return T},l.apply(this,arguments)}function u(T,w){if(T==null)return{};var S={},f=Object.keys(T),h,v;for(v=0;v<f.length;v++)h=f[v],!(w.indexOf(h)>=0)&&(S[h]=T[h]);return S}function c(T,w){var S=Object.keys(T);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(T);w&&(f=f.filter(function(h){return Object.getOwnPropertyDescriptor(T,h).enumerable})),S.push.apply(S,f)}return S}function m(T){for(var w=1;w<arguments.length;w++){var S=arguments[w]!=null?arguments[w]:{};w%2?c(Object(S),!0).forEach(function(f){p(T,f,S[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(S)):c(Object(S)).forEach(function(f){Object.defineProperty(T,f,Object.getOwnPropertyDescriptor(S,f))})}return T}function p(T,w,S){return w=g(w),w in T?Object.defineProperty(T,w,{value:S,enumerable:!0,configurable:!0,writable:!0}):T[w]=S,T}function g(T){var w=y(T,"string");return typeof w=="symbol"?w:String(w)}function y(T,w){if(typeof T!="object"||T===null)return T;var S=T[Symbol.toPrimitive];if(S!==void 0){var f=S.call(T,w);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(T)}function x(T,w){T.prototype=Object.create(w.prototype),T.prototype.constructor=T,E(T,w)}function E(T,w){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,h){return f.__proto__=h,f},E(T,w)}var k=function(T){x(w,T);function w(){for(var f,h=arguments.length,v=new Array(h),_=0;_<h;_++)v[_]=arguments[_];return f=T.call.apply(T,[this].concat(v))||this,f.handleRefs={},f.lastHandleRect=null,f.slack=null,f}var S=w.prototype;return S.componentWillUnmount=function(){this.resetData()},S.resetData=function(){this.lastHandleRect=this.slack=null},S.runConstraints=function(h,v){var _=this.props,R=_.minConstraints,C=_.maxConstraints,P=_.lockAspectRatio;if(!R&&!C&&!P)return[h,v];if(P){var M=this.props.width/this.props.height,q=h-this.props.width,L=v-this.props.height;Math.abs(q)>Math.abs(L*M)?v=h/M:h=v*M}var N=h,j=v,O=this.slack||[0,0],I=O[0],z=O[1];return h+=I,v+=z,R&&(h=Math.max(R[0],h),v=Math.max(R[1],v)),C&&(h=Math.min(C[0],h),v=Math.min(C[1],v)),this.slack=[I+(N-h),z+(j-v)],[h,v]},S.resizeHandler=function(h,v){var _=this;return function(R,C){var P=C.node,M=C.deltaX,q=C.deltaY;h==="onResizeStart"&&_.resetData();var L=(_.props.axis==="both"||_.props.axis==="x")&&v!=="n"&&v!=="s",N=(_.props.axis==="both"||_.props.axis==="y")&&v!=="e"&&v!=="w";if(!(!L&&!N)){var j=v[0],O=v[v.length-1],I=P.getBoundingClientRect();if(_.lastHandleRect!=null){if(O==="w"){var z=I.left-_.lastHandleRect.left;M+=z}if(j==="n"){var B=I.top-_.lastHandleRect.top;q+=B}}_.lastHandleRect=I,O==="w"&&(M=-M),j==="n"&&(q=-q);var H=_.props.width+(L?M/_.props.transformScale:0),U=_.props.height+(N?q/_.props.transformScale:0),J=_.runConstraints(H,U);H=J[0],U=J[1];var re=H!==_.props.width||U!==_.props.height,ne=typeof _.props[h]=="function"?_.props[h]:null,se=h==="onResize"&&!re;ne&&!se&&(R.persist==null||R.persist(),ne(R,{node:P,size:{width:H,height:U},handle:v})),h==="onResizeStop"&&_.resetData()}}},S.renderResizeHandle=function(h,v){var _=this.props.handle;if(!_)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+h,ref:v});if(typeof _=="function")return _(h,v);var R=typeof _.type=="string",C=m({ref:v},R?{}:{handleAxis:h});return e.cloneElement(_,C)},S.render=function(){var h=this,v=this.props,_=v.children,R=v.className,C=v.draggableOpts;v.width,v.height,v.handle,v.handleSize,v.lockAspectRatio,v.axis,v.minConstraints,v.maxConstraints,v.onResize,v.onResizeStop,v.onResizeStart;var P=v.resizeHandles;v.transformScale;var M=u(v,a);return(0,r.cloneElement)(_,m(m({},M),{},{className:(R?R+" ":"")+"react-resizable",children:[].concat(_.props.children,P.map(function(q){var L,N=(L=h.handleRefs[q])!=null?L:h.handleRefs[q]=e.createRef();return e.createElement(t.DraggableCore,l({},C,{nodeRef:N,key:"resizableHandle-"+q,onStop:h.resizeHandler("onResizeStop",q),onStart:h.resizeHandler("onResizeStart",q),onDrag:h.resizeHandler("onResize",q)}),h.renderResizeHandle(q,N))}))}))},w}(e.Component);return ml.default=k,k.propTypes=n.resizableProps,k.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},ml}var vl={},bx;function eq(){if(bx)return vl;bx=1,vl.__esModule=!0,vl.default=void 0;var e=l(F),t=i(fc()),r=i(Q4()),n=J4(),a=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function i(w){return w&&w.__esModule?w:{default:w}}function s(w){if(typeof WeakMap!="function")return null;var S=new WeakMap,f=new WeakMap;return(s=function(v){return v?f:S})(w)}function l(w,S){if(w&&w.__esModule)return w;if(w===null||typeof w!="object"&&typeof w!="function")return{default:w};var f=s(S);if(f&&f.has(w))return f.get(w);var h={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in w)if(_!=="default"&&Object.prototype.hasOwnProperty.call(w,_)){var R=v?Object.getOwnPropertyDescriptor(w,_):null;R&&(R.get||R.set)?Object.defineProperty(h,_,R):h[_]=w[_]}return h.default=w,f&&f.set(w,h),h}function u(){return u=Object.assign?Object.assign.bind():function(w){for(var S=1;S<arguments.length;S++){var f=arguments[S];for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(w[h]=f[h])}return w},u.apply(this,arguments)}function c(w,S){var f=Object.keys(w);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(w);S&&(h=h.filter(function(v){return Object.getOwnPropertyDescriptor(w,v).enumerable})),f.push.apply(f,h)}return f}function m(w){for(var S=1;S<arguments.length;S++){var f=arguments[S]!=null?arguments[S]:{};S%2?c(Object(f),!0).forEach(function(h){p(w,h,f[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(f)):c(Object(f)).forEach(function(h){Object.defineProperty(w,h,Object.getOwnPropertyDescriptor(f,h))})}return w}function p(w,S,f){return S=g(S),S in w?Object.defineProperty(w,S,{value:f,enumerable:!0,configurable:!0,writable:!0}):w[S]=f,w}function g(w){var S=y(w,"string");return typeof S=="symbol"?S:String(S)}function y(w,S){if(typeof w!="object"||w===null)return w;var f=w[Symbol.toPrimitive];if(f!==void 0){var h=f.call(w,S);if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(w)}function x(w,S){if(w==null)return{};var f={},h=Object.keys(w),v,_;for(_=0;_<h.length;_++)v=h[_],!(S.indexOf(v)>=0)&&(f[v]=w[v]);return f}function E(w,S){w.prototype=Object.create(S.prototype),w.prototype.constructor=w,k(w,S)}function k(w,S){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,v){return h.__proto__=v,h},k(w,S)}var T=function(w){E(S,w);function S(){for(var h,v=arguments.length,_=new Array(v),R=0;R<v;R++)_[R]=arguments[R];return h=w.call.apply(w,[this].concat(_))||this,h.state={width:h.props.width,height:h.props.height,propsWidth:h.props.width,propsHeight:h.props.height},h.onResize=function(C,P){var M=P.size;h.props.onResize?(C.persist==null||C.persist(),h.setState(M,function(){return h.props.onResize&&h.props.onResize(C,P)})):h.setState(M)},h}S.getDerivedStateFromProps=function(v,_){return _.propsWidth!==v.width||_.propsHeight!==v.height?{width:v.width,height:v.height,propsWidth:v.width,propsHeight:v.height}:null};var f=S.prototype;return f.render=function(){var v=this.props,_=v.handle,R=v.handleSize;v.onResize;var C=v.onResizeStart,P=v.onResizeStop,M=v.draggableOpts,q=v.minConstraints,L=v.maxConstraints,N=v.lockAspectRatio,j=v.axis;v.width,v.height;var O=v.resizeHandles,I=v.style,z=v.transformScale,B=x(v,a);return e.createElement(r.default,{axis:j,draggableOpts:M,handle:_,handleSize:R,height:this.state.height,lockAspectRatio:N,maxConstraints:L,minConstraints:q,onResizeStart:C,onResize:this.onResize,onResizeStop:P,resizeHandles:O,transformScale:z,width:this.state.width},e.createElement("div",u({},B,{style:m(m({},I),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},S}(e.Component);return vl.default=T,T.propTypes=m(m({},n.resizableProps),{},{children:t.default.element}),vl}var yx;function tq(){return yx||(yx=1,pl.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},pl.exports.Resizable=Q4().default,pl.exports.ResizableBox=eq().default),pl.exports}var rq=tq();const nq=e=>{const{onResizeOver:t,onResizeStop:r,trulyHeight:n,onResize:a,width:i,onClick:s,required:l,editable:u,formitem:c,dataIndex:m,...p}=e,g=F.useRef(),y=()=>{const S=u?c&&c.props&&c.props.disabled:!0;if(!S&&l)return{fontStyle:"italic",fontWeight:"400",color:"#000000"};if(S&&l)return{fontWeight:"400"};if(!S&&!l)return{fontStyle:"italic",fontWeight:"400",color:"#000000"};if(S&&!l)return{fontWeight:"400"}},x=Br({resizing:!1}),[E,k]=F.useState(0);F.useEffect(()=>{document.querySelectorAll(".react-resizable .react-resizable-handle").forEach(f=>f.addEventListener("click",h=>!1))},[]);const[T,w]=F.useState(0);return!i||m==="id"?D.jsx("th",{...p,onClick:s,style:{...p.style,...y()},onKeyDown:()=>{},className:`${p.className} ${l?"frontend-table-column-required":""}`}):D.jsx(rq.Resizable,{axis:"x",width:i+T,height:0,handle:D.jsx("span",{onClick:S=>{S.stopPropagation(),S.preventDefault()},className:Te(["react-resizable-handle",T&&"active"])}),onResize:(S,{size:f,...h})=>{const v=document.getElementById("table-resize-handle");if(v){const _=document.getElementById(`table_key_${e.tableKey}`);S.pageX>_.getBoundingClientRect().left+_.getBoundingClientRect().width||S.pageX<_.getBoundingClientRect().left?v.style.width="0px":(v.style.width="1px",v.style.background="#0563B2",v.style.zIndex="9999",v.style.top=`${h.node.getBoundingClientRect().top}px`,v.style.position="fixed",v.style.height=`${n}px`,v.style.left=`${S.pageX}px`)}t(S),x.resizing=!0,w(f.width-i)},onResizeStop:(...S)=>{var f;S[0].stopPropagation(),(f=document.getElementById("table-resize-handle"))==null||f.remove(),r(),w(0),a(...S),setTimeout(()=>{x.resizing=!1})},onResizeStart:S=>{document.getElementById(`table_key_${e.tableKey}`);const f=document.createElement("div");f.id="table-resize-handle",document.body.appendChild(f),x.resizing=!0,S.stopPropagation()},draggableOpts:{enableUserSelectHack:!1},children:D.jsx("th",{ref:g,onClick:(...S)=>{!x.resizing&&s&&s(...S)},...p,style:{...p.style,...y()},onKeyDown:()=>{},className:`${p.className} ${l?"frontend-table-column-required":""}`})})};function Ql(){return Ql=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ql.apply(this,arguments)}function eC(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}var tC=F.createContext({});function aq(){return F.useContext(tC)}var iq=function(t){return F.createElement(tC.Provider,{value:t.refTracker},t.children)};function oq(){var e=new Map;return{on:function(r,n){var a;return e.has(r)?(a=e.get(r))==null||a.add(n):e.set(r,new Set([n])),this},off:function(r,n){return n?e.get(r).delete(n):e.delete(r),this},emit:function(r,n){if(process.env.NODE!=="production"){var a=r;!e.has(r)&&a!==0&&console.error("It seems that the menu you are trying to display is not renderer or you have a menu id mismatch.","You used the menu id: "+r)}return e.has(r)&&e.get(r).forEach(function(i){i(n)}),this}}}var zf=oq();function sq(e){var t=F.useRef();return F.useEffect(function(){t.current=e},[e]),t.current}function uq(){return F.useRef(new Map).current}var _x={show:function(t){var r=t.id,n=t.event,a=t.props,i=t.position;n.preventDefault&&n.preventDefault(),zf.emit(0).emit(r,{event:n.nativeEvent||n,props:a,position:i})},hideAll:function(){zf.emit(0)}};function lq(e){return{show:function(r,n){process.env.NODE_ENV==="development"&&!(e!=null&&e.id)&&!(n!=null&&n.id)&&console.error("You need to provide an id when initializing the hook `useContextMenu({ id: 'your id' })` or when you display the menu `show(e, { id: 'your id' })`. The later is used to override the one defined during initialization."),_x.show({id:(n==null?void 0:n.id)||(e==null?void 0:e.id),props:(n==null?void 0:n.props)||(e==null?void 0:e.props),event:r,position:n==null?void 0:n.position})},hideAll:function(){_x.hideAll()}}}function cq(){var e=new Map,t,r,n,a,i=!1;function s(E){a=E,t=-1,n=!0}function l(){a[t].node.focus()}function u(){return t>=0&&a[t].isSubmenu}function c(){return Array.from(a[t].submenuRefTracker.values())}function m(){return t===-1?(p(),!1):!0}function p(){t+1<a.length?t++:t+1===a.length&&(t=0),i&&x(),l()}function g(){t===-1||t===0?t=a.length-1:t-1<a.length&&t--,i&&x(),l()}function y(){if(m()&&u()){var E=c(),k=a[t].node;return e.set(k,{isRoot:n,focusedIndex:t,parentNode:r||k,items:a}),k.classList.add("react-contexify__submenu--is-open"),r=k,E.length>0?(t=0,a=E):i=!0,n=!1,l(),!0}return!1}function x(){if(m()&&!n){var E=e.get(r),k=E.isRoot,T=E.items,w=E.focusedIndex,S=E.parentNode;r.classList.remove("react-contexify__submenu--is-open"),a=T,r=S,k&&(n=!0,e.clear()),i||(t=w,l())}}return{init:s,moveDown:p,moveUp:g,openSubmenu:y,closeSubmenu:x}}var b1=function(){};function rC(e){return typeof e=="function"}function nC(e){return typeof e=="string"}function dq(e){return e.type==="touchend"}function fq(e,t){return F.Children.map(F.Children.toArray(e).filter(Boolean),function(r){return F.cloneElement(r,t)})}function hq(e){var t={x:0,y:0};return dq(e)&&e.changedTouches&&e.changedTouches.length>0?(t.x=e.changedTouches[0].clientX,t.y=e.changedTouches[0].clientY):(t.x=e.clientX,t.y=e.clientY),(!t.x||t.x<0)&&(t.x=0),(!t.y||t.y<0)&&(t.y=0),t}function wx(e,t){return rC(e)?e(t):e}function pq(e){return!!(e&&(nC(e)||"exit"in e&&e.exit))}function mq(e,t){return rC(t)?Ql({},e,t(e)):Ql({},e,t)}var gq=function(t){var r,n=t.id,a=t.theme,i=t.style,s=t.className,l=t.children,u=t.animation,c=u===void 0?"scale":u,m=t.onHidden,p=m===void 0?b1:m,g=t.onShown,y=g===void 0?b1:g,x=eC(t,["id","theme","style","className","children","animation","onHidden","onShown"]),E=F.useReducer(mq,{x:0,y:0,visible:!1,triggerEvent:{},propsFromTrigger:null,willLeave:!1}),k=E[0],T=E[1],w=F.useRef(null),S=F.useRef(!1),f=sq(k.visible),h=uq(),v=F.useState(function(){return cq()}),_=v[0];F.useEffect(function(){return S.current=!0,zf.on(n,R).on(0,C),function(){zf.off(n,R).off(0,C)}},[n]),F.useEffect(function(){S.current&&k.visible!==f&&(k.visible?y():p())},[k.visible,p,y]),F.useEffect(function(){k.visible?_.init(Array.from(h.values())):h.clear()},[k.visible,_,h]),F.useEffect(function(){if(k.visible){var H=window,U=H.innerWidth,J=H.innerHeight,re=w.current,ne=re.offsetWidth,se=re.offsetHeight,ce=k.x,le=k.y;ce+ne>U&&(ce-=ce+ne-U),le+se>J&&(le-=le+se-J),T({x:ce,y:le})}},[k.visible]),F.useEffect(function(){function H(U){switch(U.preventDefault(),U.key){case"Enter":_.openSubmenu()||C();break;case"Escape":C();break;case"ArrowUp":_.moveUp();break;case"ArrowDown":_.moveDown();break;case"ArrowRight":_.openSubmenu();break;case"ArrowLeft":_.closeSubmenu();break}}return k.visible&&(window.addEventListener("resize",C),window.addEventListener("contextmenu",C),window.addEventListener("click",C),window.addEventListener("scroll",C),window.addEventListener("keydown",H),process.env.NODE_ENV!=="development"&&window.addEventListener("blur",C)),function(){window.removeEventListener("resize",C),window.removeEventListener("contextmenu",C),window.removeEventListener("click",C),window.removeEventListener("scroll",C),window.removeEventListener("keydown",H),process.env.NODE_ENV!=="development"&&window.removeEventListener("blur",C)}},[k.visible,_]);function R(H){var U=H.event,J=H.props,re=H.position;U.stopPropagation();var ne=re||hq(U),se=ne.x,ce=ne.y;setTimeout(function(){T({visible:!0,willLeave:!1,x:se,y:ce,triggerEvent:U,propsFromTrigger:J})},0)}function C(H){var U=H;typeof U<"u"&&(U.button===2||U.ctrlKey===!0)&&U.type!=="contextmenu"||(pq(c)?T(function(J){return{willLeave:J.visible}}):T(function(J){return{visible:J.visible?!1:J.visible}}))}function P(){k.willLeave&&k.visible&&T({visible:!1,willLeave:!1})}function M(){if(!c)return null;if(nC(c)){var H;return bs((H={},H["react-contexify__will-enter--"+c]=c&&q&&!I,H["react-contexify__will-leave--"+c+" react-contexify__will-leave--'disabled'"]=c&&q&&I,H))}else if("enter"in c&&"exit"in c){var U;return bs((U={},U["react-contexify__will-enter--"+c.enter]=c.enter&&q&&!I,U["react-contexify__will-leave--"+c.exit+" react-contexify__will-leave--'disabled'"]=c.exit&&q&&I,U))}return null}var q=k.visible,L=k.triggerEvent,N=k.propsFromTrigger,j=k.x,O=k.y,I=k.willLeave,z=bs("react-contexify",s,(r={},r["react-contexify__theme--"+a]=a,r),M()),B=Ql({},i,{left:j,top:O,opacity:1});return F.createElement(iq,{refTracker:h},q&&F.createElement("div",Object.assign({},x,{className:z,onAnimationEnd:P,style:B,ref:w,role:"menu"}),fq(l,{propsFromTrigger:N,triggerEvent:L})))},xx=function(t){var r,n=t.children,a=t.className,i=t.style,s=t.triggerEvent,l=t.data,u=t.propsFromTrigger,c=t.onClick,m=c===void 0?b1:c,p=t.disabled,g=p===void 0?!1:p,y=t.hidden,x=y===void 0?!1:y,E=eC(t,["children","className","style","triggerEvent","data","propsFromTrigger","onClick","disabled","hidden"]),k=aq(),T={data:l,triggerEvent:s,props:u},w=wx(g,T),S=wx(x,T);function f(R){T.event=R,w?R.stopPropagation():m(T)}function h(R){R&&!w&&k.set(R,{node:R,isSubmenu:!1})}function v(R){R.key==="Enter"&&(T.event=R,m(T))}if(S)return null;var _=bs("react-contexify__item",a,(r={},r["react-contexify__item--disabled"]=w,r));return F.createElement("div",Object.assign({},E,{className:_,style:i,onClick:f,onKeyDown:v,ref:h,tabIndex:-1,role:"menuitem","aria-disabled":w}),F.createElement("div",{className:"react-contexify__item__content"},n))};const vq="_box_1hwl6_2",bq="_transferSearch_1hwl6_2",yq="_searchBtn_1hwl6_10",_q="_shuttle_box_1hwl6_44",wq="_leftSearch_1hwl6_58",xq="_noBeforeAfter_1hwl6_62",Sq="_rightSearch_1hwl6_78",Cq="_transfer_1hwl6_2",Wa={box:vq,transferSearch:bq,searchBtn:yq,shuttle_box:_q,leftSearch:wq,noBeforeAfter:xq,rightSearch:Sq,transfer:Cq},Eq="_content_1tmh1_1",kq={content:Eq},aC=F.forwardRef((e,t)=>{const{panes:r,loading:n,defaultActiveKey:a,onTabClick:i}=e,[s,l]=F.useState(a),{TabPane:u}=Z.Tabs;return n?D.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:D.jsx(Ls,{})}):(F.useImperativeHandle(t,()=>({active:c=>{(i==null?void 0:i(c))!==!1&&l(c)}}),[s]),D.jsx("div",{className:`${kq.content} ${e.className??""}`,children:n?D.jsx("div",{style:{padding:"10px"}}):r.length?D.jsx(Z.Tabs,{animated:!1,activeKey:s,destroyInactiveTabPane:!0,tabBarGutter:30,onTabClick:c=>{(i==null?void 0:i(c))!==!1&&l(c)},children:(r||[]).map((c,m)=>D.jsx(u,{tab:D.jsxs("div",{style:{display:"flex",alignItems:"center",paddingBottom:"2px"},children:[c.icon&&D.jsx(He,{style:{marginRight:"5px",fontSize:"16px"},type:`${c.icon}`}),D.jsx("div",{style:{fontSize:"12px",lineHeight:"18px"},children:c.tab})]}),children:D.jsx("div",{style:{padding:"0px"},children:F.Children.map(e.children,p=>{var g;return((g=p==null?void 0:p.props)==null?void 0:g["data-key"])==c.tabKey?p:null})})},`${c.tabKey}`))}):D.jsx(D.Fragment,{})}))}),Tq=F.forwardRef((e,t)=>{var B;const r=e.defaultValue?Array.isArray(e.defaultValue)?e.defaultValue:[e.defaultValue]:[],n=e.defaultActiveKey||"",[a,i]=F.useState(!1),[s,l]=F.useState(),[u,c]=F.useState(r),[m,p]=F.useState([]),[g,y]=F.useState(n),[x,E]=F.useState({[n]:{left:1,right:1}}),[k,T]=F.useState({[n]:{left:0,right:0}}),[w,S]=F.useState(""),[f,h]=F.useState({right:"",left:""}),[v,_]=F.useState(!1),[R,C]=F.useState({});F.useEffect(()=>{c(r),y(n),E({[n]:{left:1,right:1}})},[e.defaultActiveKey,e.defaultValue]),F.useEffect(()=>{a?j():(c(r),l(void 0),y(n),E({[n]:{left:1,right:1}}),S(""),h({right:"",left:""}),C({}))},[a]);const P=xn(f),M=xn(x),q=xn(g),L=xn(k),N=F.useMemo(()=>{const H=()=>{var U;return s||((U=e.allListOptions)==null?void 0:U[q.current])||[]};return ie.uniqBy([...H(),...m],"id")},[q,g,e.allListOptions,s,m]),j=async H=>{_(!0),await e.getListCodeItem(Object.assign({search:P.current,tabKey:q.current,pageNo:M},ie.omit(H||{},"isPaging"))).then(U=>{U&&(H!=null&&H.isPaging?l([...N,...U]):l([...U]),T(Object.assign({},L.current,{[q.current]:{left:U.total||U.length,right:0}})))}).finally(()=>{_(!1)})};F.useEffect(()=>{p(N.filter(H=>u.includes(H.id)))},[u]);const O=async()=>{var H,U;if(e.mandatory&&!u.length)return Z.message.error(`${Y("sys.mustSelect.mustSelect",{placeholder:"必须选择"})}${(H=e.attr)==null?void 0:H.name}`);(U=R.ok)==null||U.call(R,[...u],g,m),i(!1)};F.useImperativeHandle(t,()=>({open(H){C(()=>H),i(!0)},submit:O,dataSource:N,targetKeys:u,loading:v}),[N,u,v]);const I=H=>{H=="left"?j():S(P.current.right)},z=F.useMemo(()=>{var H;return Array.isArray(e.columns)?e.columns:((H=e.columns)==null?void 0:H[g])||[]},[e.columns,g]);return D.jsx(To,{className:Wa.shuttle_box,modalTitle:e.title,maskClosable:!1,destroyOnClose:!0,okText:Y("project.tab.plan.details.window.save",{placeholder:"保存"}),width:e.modalWidth||650,visible:a,mask:!1,onOk:O,onCancel:()=>{var H;(H=R.cancel)==null||H.call(R),i(!1)},children:D.jsx("div",{className:Wa.transferBox,children:D.jsx(Ls,{spinning:v,children:D.jsx(Z.Transfer,{...e.transfer||{},className:`${Wa.transfer} ${((B=e.transfer)==null?void 0:B.className)??""}`,dataSource:N,targetKeys:u,onChange:(H,U,J)=>{U=="right"?c([...e.isRadio?J:H]):c([...H])},rowKey:H=>H.id,children:H=>{var Le,he,qe,oe,De,Je,Ct,Et;const{direction:U,filteredItems:J,onItemSelectAll:re,onItemSelect:ne,selectedKeys:se,showSearch:ce}=H,le=U=="left",ye=!le,we={onSelectAll(Fe,We){if(e.isRadio)return;const Ne=We.filter(at=>!at.disabled).map(({id:at})=>at),Oe=Fe?ie.difference(Ne,se):ie.difference(se,Ne);re(Oe,Fe)},onSelect({id:Fe},We){e.isRadio&&se.splice(0,1),ne(Fe,We)},getCheckboxProps:Fe=>({disabled:Fe.Number&&!Sn.readPermission(Fe.Number)?!0:le?Fe.disabled:!1}),selectedRowKeys:se,columnWidth:13};(Le=e==null?void 0:e.pager)!=null&&Le[g];const Ee=()=>le?J:J.filter(Fe=>Fe.label.includes(w)||Fe.Description.includes(w));return D.jsxs("div",{className:Wa.box,style:e.scroll?{width:"360px"}:{},children:[le&&e.panes&&((he=e.panes)==null?void 0:he.length)!=1?D.jsx(aC,{panes:e.panes,defaultActiveKey:g,onTabClick:Fe=>{var Ne;y(Fe),(Ne=e.onTabsChange)==null||Ne.call(e,Fe);const We={...f,[U]:""};h(We),M.current[Fe]||E(Object.assign({},M.current,{[Fe]:{left:1,right:1}})),j({tabKey:Fe,search:We})}}):null,ce?D.jsx("div",{style:e.scroll?{padding:"12px",borderLeft:"1px solid #E0E0E0",borderTop:"1px solid #E0E0E0",borderRight:"1px solid #E0E0E0"}:{padding:"0px"},children:D.jsx("div",{className:`${e.scroll?Wa.noBeforeAfter:""} ${Wa.transferSearch} ${le&&((qe=e.panes)!=null&&qe.length)?Wa.leftSearch:(oe=e.panes)!=null&&oe.length?Wa.rightSearch:""}`,style:e.scroll?{margin:"0px"}:{},children:D.jsx(Z.Input.Search,{placeholder:e.placeholder||Y("sys.nameOrDescription.enterNameOrDescription",{placeholder:"请输入名称或描述"}),enterButton:null,value:f[U],onChange:Fe=>{Fe.persist();const We=Fe.target.value;h({...f,[U]:We}),ye&&(We||S(""))},onSearch:I.bind(null,U),suffix:D.jsx("div",{className:Wa.searchBtn,onClick:I.bind(null,U),children:D.jsx(He,{type:"homesearch"})})})})}):null,D.jsx(wh,{rowSelection:{type:"checkbox",fixed:!0,...we},columns:z,showSorterTooltip:!1,hideFooter:!0,pagination:!1,dataSource:Ee(),scroll:{x:((De=e.scroll)==null?void 0:De.x)||300,y:((Je=e.scroll)==null?void 0:Je.y)||(le&&((Ct=e.panes)!=null&&Ct.length)?270:316)},style:{height:"100%"},pageNo:x[g][U],pageSize:le?20:void 0,total:le?(Et=k==null?void 0:k[g])==null?void 0:Et[U]:void 0,size:"small",onScroll:Fe=>{const We={...x,[g]:{...x[g],[U]:Fe}};E(We),le&&j({pageNo:We[g],isPaging:!0})},onRow:({id:Fe,disabled:We,...Ne})=>({onClick:()=>{if(!We&&le){if(e.isRadio&&se.splice(0,1),!Sn.readPermission(Ne.Number))return;ne(Fe,!se.includes(Fe))}},onDoubleClick:()=>{if(Sn.readPermission(Ne.Number)){if(le)We||(e.isRadio?c([Fe]):c([Fe,...u]));else{for(let Oe=0;Oe<u.length;Oe++)if(u[Oe]==Fe){u.splice(Oe,1);break}c([...u])}re([],!1)}}})}),e.showFooter?D.jsxs("div",{style:{marginTop:"4px"},children:[D.jsx("span",{style:{color:"#999999"},children:Y("sys.selected",{placeholder:"已选"})})," ",D.jsx("span",{style:{margin:"0px 2px",color:"#333333"},children:se.length})," ",D.jsx("span",{style:{color:"#999999"},children:Y("project.tab.plan.criticalPath.window.item",{placeholder:"条"})}),",",D.jsx("span",{style:{color:"#999999"},children:Y("project.tab.plan.criticalPath.window.total",{placeholder:"共"})})," ",D.jsx("span",{style:{margin:"0px 2px",color:"#333333"},children:ye?u.length:k[g][U]}),D.jsxs("span",{style:{color:"#999999"},children:[" ",Y("project.tab.plan.criticalPath.window.item",{placeholder:"条"})]})]}):D.jsx(D.Fragment,{})]})}})})})})}),iC=F.forwardRef(({selectProps:e,value:t,onChange:r,readOnly:n},a)=>{var x,E;const i=F.useRef(null),{attr:s,allListOptions:l,popoverTransfer:u}=e,c=yo(()=>{var k;(k=i.current)==null||k.open({ok:(T,w,S)=>{var f,h;["multiple","tags"].includes(e.mode)?r==null||r(T):r==null||r(T[0]),(f=u==null?void 0:u.onSubmit)==null||f.call(u,T,w,v=>p({newVal:T,allOptions:v}),S),(h=e.onBlur)==null||h.call(e)},cancel:()=>{var T;(T=e.onBlur)==null||T.call(e)}})});F.useImperativeHandle(a,()=>({focus:c}),[]);const m=F.useMemo(()=>{var T;const k=((T=u==null?void 0:u.panes)==null?void 0:T.map(w=>w.tabKey))||[String(s==null?void 0:s.listCode)];return Object.entries(l||{}).map(([w,S])=>k.includes(w)?S:[]).flat(1)},[s,l,u==null?void 0:u.panes]),p=yo(({allOptions:k,newVal:T})=>{var f;const w=((f=u==null?void 0:u.panes)==null?void 0:f.map(h=>h.tabKey))||[s==null?void 0:s.listCode];let S=[];return Object.entries(k||l||{}).some(([h,v])=>{if(w.includes(h))return v.some(_=>{if(T&&(T==null?void 0:T.length)>1)return T.includes(_.value)&&!S.includes(h)&&S.push(h),!1;{const R=_.value==((T==null?void 0:T[0])||t);return R&&(S=[h]),R}})}),S.filter(Boolean).join(",")}),g=F.useMemo(()=>{var T;const k=((T=u==null?void 0:u.panes)==null?void 0:T.map(w=>w.tabKey))||[s==null?void 0:s.listCode];return k.length==1?k[0]:p({}).split(",")[0]},[t,l,u==null?void 0:u.panes]),y=F.useMemo(()=>typeof t=="string"?t.split(","):t,[t]);return D.jsxs("div",{children:[D.jsx(ho,{...e,style:Object.assign({},e.style||{},{width:"100%"}),className:` ${e.className}`,value:y,filterOption:(k,T)=>T.label&&T.label.indexOf(k)>=0,showSearch:!0,disabled:n,options:m.map(k=>({...k,label:Sn.readPermission(k.label)?k.label:Y("sys.noPermission",{placeholder:"无权限"})})),allowClear:!0,optionLabelProp:"label",open:!1,onChange:k=>{["multiple","tags"].includes(e.mode)?r==null||r(k):k&&k instanceof Array?r==null||r(k[0]):r==null||r("")},tagRender:({label:k})=>Sn.readPermission(k)?D.jsx(Z.Tag,{color:"#0563B2",children:k}):D.jsx(pa,{}),onDropdownVisibleChange:c,onClear:()=>{["multiple","tags"].includes(e.mode)?r==null||r(""):r==null||r([])}}),D.jsx(Tq,{title:`${Y("project.tab.plan.transfer.title",{placeholder:"选择"})}${s.name}`,...Object.assign(Object.create(null),u),ref:i,attr:s,defaultActiveKey:g||((E=(x=u==null?void 0:u.panes)==null?void 0:x[0])==null?void 0:E.tabKey)||"",defaultValue:y,allListOptions:l})]})}),Oq="_shuttle_box_1962p_1",Aq="_box_1962p_5",Rq="_search_1962p_8",Ld={shuttle_box:Oq,box:Aq,search:Rq};function Sx(e){const t=F.useRef(!1),r=F.useRef({}),n=u=>{if(typeof e=="function"){const c=e();return!u&&(r.current=c),Object.assign(Object.create(null),c)}else{const c=e;return!u&&(r.current=c),Object.assign(Object.create(null),e)}},[a,i]=F.useState(n(!0));F.useEffect(()=>(typeof e=="function"?r.current=e():r.current=e,t.current=!1,()=>{t.current=!0}),[]);const s=u=>{if(!t.current)if(typeof u=="function"){const c=Object.assign(Object.create(null),u(a)||a);r.current=c,i(c)}else{const c=Object.assign(Object.create(null),r.current,u);r.current=c,i(c)}},l=()=>i(n());return vt.makeDestructurable({store:a,setStore:s,resetStore:l,latestStore:r},[a,s,l,r])}const oC=F.forwardRef((e,t)=>{var k,T,w,S;e.defaultValue&&(Array.isArray(e.defaultValue)?e.defaultValue:e.defaultValue);const r=e.rowKey||"id",n=!((k=e.attr)!=null&&k.allowMultiple),a=!!((T=e.attr)!=null&&T.required),{store:i,setStore:s,resetStore:l,latestStore:u}=Sx(()=>({visible:!1,search:"",sorters:"",filters:"",loading:!1,dataSource:[],selectedRows:[],callback:()=>{}})),c=Sx(()=>({pageNo:1,pageSize:50,total:0})),m=async f=>{s({loading:!0});try{const{data:h,total:v}=await e.getDataSource({search:u.current.search,sorters:u.current.sorters,filters:u.current.filters,...c.latestStore.current,record:e.record});s(f?{dataSource:[...i.dataSource,...h]}:{dataSource:h}),c.setStore({total:v})}catch(h){console.log(h)}finally{s({loading:!1})}},p=F.useMemo(()=>i.selectedRows.map(f=>f[r]),[i.selectedRows]);F.useEffect(()=>{i.visible?m().finally(()=>{}):(l(),c.resetStore())},[i.visible]);const g=yo(async f=>{var h,v,_;if(a&&!f&&!i.selectedRows.length){Z.message.error(Y("project.attr.edit.roleOrOwner.msg",{placeholder:"请选择{name}",variate:{name:(h=e.attr)==null?void 0:h.name}}));return}(_=(v=u.current.callback).ok)==null||_.call(v,f?[f[r]]:p),s({visible:!1})});F.useImperativeHandle(t,()=>({open(f){s({callback:f,visible:!0})},submit:g,dataSource:i.dataSource,loading:i.loading}),[i.dataSource,i.loading]);const y=()=>{m()},x={onSelectAll(f,h){n||s({selectedRows:h})},onSelect(f,h){n?h?s({selectedRows:[f]}):a||s({selectedRows:[]}):s(h?{selectedRows:[...i.selectedRows,f]}:{selectedRows:i.selectedRows.filter(v=>v[r]!=f[r])})},getCheckboxProps:f=>({disabled:!1}),selectedRowKeys:p,columnWidth:13},E=F.useMemo(()=>e.generateColumns(u),[e.generateColumns]);return F.useEffect(()=>{const f=ie.debounce(h=>{(h.keyCode||h.which)==13&&u.current.visible&&h.target.dataset.search!="true"&&g()},200);return window.addEventListener("keyup",f),()=>{window.removeEventListener("keyup",f)}},[]),D.jsx(To,{className:Ld.shuttle_box,modalTitle:e.title,maskClosable:!1,destroyOnClose:!0,okText:Y("project.tab.plan.details.window.save",{placeholder:"保存"}),styleUnify:!0,width:e.modalWidth||660,visible:i.visible,mask:!1,onOk:g,onCancel:()=>{var f,h;s({visible:!1}),(h=(f=u.current.callback).cancel)==null||h.call(f)},footer:null,children:D.jsx("div",{onScroll:f=>f.stopPropagation(),onScrollCapture:f=>f.stopPropagation(),children:D.jsx(Ls,{spinning:i.loading,children:D.jsxs("div",{className:Ld.box,children:[D.jsx("div",{children:D.jsx("div",{className:`${Ld.search}`,children:D.jsx(Z.Input.Search,{placeholder:Y("sys.prompt.enterName",{placeholder:"请输入姓名"}),enterButton:null,"data-search":!0,...e.searchProps,suffix:D.jsx("div",{className:Ld.searchBtn,onClick:y,children:D.jsx(He,{type:"homesearch"})}),value:i.search,onChange:f=>s({search:f.target.value}),onSearch:y})})}),D.jsx(wh,{rowSelection:{type:"checkbox",fixed:!0,...x},columns:E,showSorterTooltip:!1,dataSource:i.dataSource,scroll:{x:(w=e.scroll)==null?void 0:w.x,y:((S=e.scroll)==null?void 0:S.y)||300},style:{height:"100%"},...c.store,size:"small",onScroll:f=>{c.setStore({pageNo:f}),m(!0)},onFilterAndSorter:(f,h)=>{s({sorters:f,filters:h}),m()},onRow:(f,...h)=>({onClick:()=>{console.log(f,h,"FFFFFFFFFFFF")},onDoubleClick:()=>{g(f)}})})]})})})})}),sC=F.forwardRef(({selectProps:e,value:t,onChange:r,readOnly:n},a)=>{const i=F.useRef(null),{attr:s,allListOptions:l,selectPopupProps:u,record:c}=e,m=yo(()=>{var y;(y=i.current)==null||y.open({ok:x=>{var E,k,T;["multiple","tags"].includes(e.mode)?(r==null||r(x),(E=e.onChange)==null||E.call(e,x,l[s.listCode]||[])):((k=e.onChange)==null||k.call(e,x[0],l[s.listCode]||[]),r==null||r(x[0])),(T=e.onBlur)==null||T.call(e)},cancel:()=>{var x;(x=e.onBlur)==null||x.call(e)}})});F.useImperativeHandle(a,()=>({focus:m}),[]);const p=F.useMemo(()=>ie.omit(e,["popoverProps","attr","allListOptions"]),[e]),g=F.useMemo(()=>typeof t=="string"?t.split(","):t,[t]);return D.jsxs("div",{children:[D.jsx(ho,{...p,style:Object.assign({},e.style||{},{width:"100%"}),className:` ${e.className}`,value:g,filterOption:(y,x)=>x.label&&x.label.indexOf(y)>=0,showSearch:!0,disabled:n,options:l[s.listCode]||[],allowClear:e.allowClear==null?!0:e.allowClear,optionLabelProp:"label",open:!1,loading:e.loading,onDropdownVisibleChange:m}),D.jsx(oC,{title:`${Y("project.tab.plan.transfer.title",{placeholder:"选择"})}${s.name}`,...Object.assign(Object.create(null),u),ref:i,attr:s,record:c,defaultValue:g})]})}),og=[null,(e,t)=>(e=ve(`${e.format("YYYY-MM-DD")} 00:00:00`),t.valueOf()<e.valueOf()),(e,t)=>(e=ve(`${e.format("YYYY-MM-DD")} 23:59:59`),t.valueOf()<=e.valueOf()),(e,t)=>(e=ve(`${e.format("YYYY-MM-DD")} 23:59:59`),t.valueOf()>e.valueOf()),(e,t)=>(e=ve(`${e.format("YYYY-MM-DD")} 00:00:00`),t.valueOf()>=e.valueOf()),(e,t)=>t.valueOf()==e.valueOf()];function Pq(e,t){const r=n=>{var i;if(!n.date||!n.type)return n.isWorkTime?!n.isWorkTime({date:new Date(t.valueOf())}):!1;const a=ve(n.date);return((i=og[n.type])==null?void 0:i.call(og,a,ve(t)))||(n==null?void 0:n.isWorkTime)&&!n.isWorkTime({date:new Date(t.valueOf())})};return Array.isArray(e)?e.map(a=>r(a)).some(a=>a):r(e)}const Cx={dem:"3Shape DCM (*.dcm)",sat:"ACIS (*.sat;*.asat;*.sab;*.asab)",sab:"ACIS (*.sat;*.asat;*.sab;*.asab)",asab:"ACIS (*.sat;*.asat;*.sab;*.asab)",pd:"Cadds (_pd;*._pd)",zip:"zip",model:"Catia V4 2D (*.model;*.dlv;*.dlv3;*.exp)",dlv:"Catia V4 2D (*.model;*.dlv;*.dlv3;*.exp)",dlv3:"Catia V4 2D (*.model;*.dlv;*.dlv3;*.exp)",exp:"Catia V4 2D (*.model;*.dlv;*.dlv3;*.exp)",CATDrawing:"Catia V5 2D (*.CATDrawing)",CATPart:"Catia V5 3D (*.CATPart;*.CATProduct)",CATProduct:"Catia V5 3D (*.CATPart;*.CATProduct)","3dxml":"Catia V6/3DEXPERIENCE 3D (*.3dxml)",art:"Cercon (*.art)",sdt:"Cerec - Sirona (*.sdt;*.cdt;*.idt)",cdt:"Cerec - Sirona (*.sdt;*.cdt;*.idt)",idt:"Cerec - Sirona (*.sdt;*.cdt;*.idt)",cgr:"CGR (*.cgr)",ol:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",ed:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",edz:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",pvz:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",pvs:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",dwg:"DWG 2D (*.dwg)",dxf:"DWG/DXF 3D (*.dwg;*.dxf)",fbx:"FBX (*.fbx)",f3d:"Fusion 360 (*.f3d)",ifc:"IFC (*.ifc;*.ifcxml;*.ifczip)",ifexml:"IFC (*.ifc;*.ifcxml;*.ifczip)",ifezip:"IFC (*.ifc;*.ifcxml;*.ifczip)",igs:"IGES 3D (*.igs;*.iges)",iges:"IGES 3D (*.igs;*.iges)",jt:"JT (*.jt)",nwd:"Navisworks (*.nwd)",obj:"OBJ (*.obj)",xmt:"PARASOLID (*.x_t;*.x_b;*.xmt_txt;*.xmt_bin)",x_t:"PARASOLID (*.x_t;*.x_b;*.xmt_txt;*.xmt_bin)",x_b:"PARASOLID (*.x_t;*.x_b;*.xmt_txt;*.xmt_bin)",xmt_txt:"PARASOLID (*.x_t;*.x_b;*.xmt_txt;*.xmt_bin)",xmt_bin:"PARASOLID (*.x_t;*.x_b;*.xmt_txt;*.xmt_bin)",plmxml:"PLM XML (*.plmxml)","03s":"Procera (*.c3s)",drw:"ProE/Creo Parametric 2D (*.drw;*.drw.*)",xpr:"ProE/Creo Parametric 3D (*.prt;*.prt.*;*.xpr;*.asm;*.asm.*;*.xas)",asm:"ProE/Creo Parametric 3D (*.prt;*.prt.*;*.xpr;*.asm;*.asm.*;*.xas)",xas:"ProE/Creo Parametric 3D (*.prt;*.prt.*;*.xpr;*.asm;*.asm.*;*.xas)",rvt:"Revit (*.rvt;*.rfa)",rfa:"Revit (*.rvt;*.rfa)","3dm":"Rhino (*.3dm)",rf:"Robface (*.rf)",smg:"SMG (*.smg;*.smggeom)",smggeom:"SMG (*.smg;*.smggeom)",dft:"Solid Edge 2D (*.dft)",par:"Solid Edge 3D (*.par;*.psm;*.asm;*.pwd)",psm:"Solid Edge 3D (*.par;*.psm;*.asm;*.pwd)",pwd:"Solid Edge 3D (*.par;*.psm;*.asm;*.pwd)",slddrw:"SolidWorks 2D (*.slddrw)",sldprt:"SolidWorks 3D (*.sldprt;*.sldasm)",sldasm:"SolidWorks 3D (*.sldprt;*.sldasm)",step:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",stp:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",stpz:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",stpx:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",stpxz:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",stpnc:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",stl:"STL (*.stl)",prt:"UG NX 3D (*.prt)",vda:"VDAFS (*.vda)","03S":"Procera (*.c3s)","3DM":"Rhino (*.3dm)","3DXML":"Catia V6/3DEXPERIENCE 3D (*.3dxml)",ART:"Cercon (*.art)",ASAB:"ACIS (*.sat;*.asat;*.sab;*.asab)",ASM:"ProE/Creo Parametric 3D (*.prt;*.prt.*;*.xpr;*.asm;*.asm.*;*.xas)",CATDRAWING:"Catia V5 2D (*.CATDrawing)",CATPART:"Catia V5 3D (*.CATPart;*.CATProduct)",CATPRODUCT:"Catia V5 3D (*.CATPart;*.CATProduct)",CDT:"Cerec - Sirona (*.sdt;*.cdt;*.idt)",CGR:"CGR (*.cgr)",DEM:"3Shape DCM (*.dcm)",DFT:"Solid Edge 2D (*.dft)",DLV:"Catia V4 2D (*.model;*.dlv;*.dlv3;*.exp)",DLV3:"Catia V4 2D (*.model;*.dlv;*.dlv3;*.exp)",DRW:"ProE/Creo Parametric 2D (*.drw;*.drw.*)",DWG:"DWG 2D (*.dwg)",DXF:"DWG/DXF 3D (*.dwg;*.dxf)",ED:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",EDZ:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",EXP:"Catia V4 2D (*.model;*.dlv;*.dlv3;*.exp)",F3D:"Fusion 360 (*.f3d)",FBX:"FBX (*.fbx)",IDT:"Cerec - Sirona (*.sdt;*.cdt;*.idt)",IFC:"IFC (*.ifc;*.ifcxml;*.ifczip)",IFEXML:"IFC (*.ifc;*.ifcxml;*.ifczip)",IFEZIP:"IFC (*.ifc;*.ifcxml;*.ifczip)",IGES:"IGES 3D (*.igs;*.iges)",IGS:"IGES 3D (*.igs;*.iges)",JT:"JT (*.jt)",MODEL:"Catia V4 2D (*.model;*.dlv;*.dlv3;*.exp)",NWD:"Navisworks (*.nwd)",OBJ:"OBJ (*.obj)",OL:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",PAR:"Solid Edge 3D (*.par;*.psm;*.asm;*.pwd)",PD:"Cadds (_pd;*._pd)",PLMXML:"PLM XML (*.plmxml)",PRT:"UG NX 3D (*.prt)",PSM:"Solid Edge 3D (*.par;*.psm;*.asm;*.pwd)",PVS:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",PVZ:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",PWD:"Solid Edge 3D (*.par;*.psm;*.asm;*.pwd)",RF:"Robface (*.rf)",RFA:"Revit (*.rvt;*.rfa)",RVT:"Revit (*.rvt;*.rfa)",SAB:"ACIS (*.sat;*.asat;*.sab;*.asab)",SAT:"ACIS (*.sat;*.asat;*.sab;*.asab)",SDT:"Cerec - Sirona (*.sdt;*.cdt;*.idt)",SLDASM:"SolidWorks 3D (*.sldprt;*.sldasm)",SLDDRW:"SolidWorks 2D (*.slddrw)",SLDPRT:"SolidWorks 3D (*.sldprt;*.sldasm)",SMG:"SMG (*.smg;*.smggeom)",SMGGEOM:"SMG (*.smg;*.smggeom)",STL:"STL (*.stl)",STEP:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",STP:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",STPNC:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",STPX:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",STPXZ:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",STPZ:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",VDA:"VDAFS (*.vda)",XAS:"ProE/Creo Parametric 3D (*.prt;*.prt.*;*.xpr;*.asm;*.asm.*;*.xas)",XMT:"PARASOLID (*.x_t;*.x_b;*.xmt_txt;*.xmt_bin)",XPR:"ProE/Creo Parametric 3D (*.prt;*.prt.*;*.xpr;*.asm;*.asm.*;*.xas)"},Dq=F.forwardRef((e,t)=>{const r=F.useRef(),n=["Input","Input.TextArea","Number","CompositeForm"],a=["Select","Date","Cascader","TreeSelect","DatePicker.RangePicker","Image","File"],i=e.formprops.type;F.useImperativeHandle(t,()=>({focusFormItem:()=>{var u;i!=="File"&&i!=="Image"&&((u=r.current)==null||u.focus())},blurFormItem:()=>{var u;i!=="File"&&i!=="Image"&&((u=r.current)==null||u.blur())}}));const s=F.useMemo(()=>{var m,p;const u=g=>(g==null?void 0:g.closest(_h))||document.body||document.documentElement;(m=e==null?void 0:e.formprops)!=null&&m.props&&!e.formprops.props.getPopupContainer&&(e.formprops.props.getPopupContainer=u);let c={getPopupContainer:u};return n.includes(i)?c={...e.formprops.props,size:"small",onPressEnter:()=>{e.onSave&&e.onSave()},onBlur:()=>{e.onSave&&e.onSave()}}:a.includes(i)&&(c={...e.formprops.props,size:"small",onChange:((p=e.formprops)==null?void 0:p.props.mode)==="multiple"||e.formprops.props.treeCheckable?void 0:e.onSave,onBlur:e.onSave,onClick:g=>{g.stopPropagation()}}),e.formprops.formatFormProps?e.formprops.formatFormProps(c,e.record,e.apicode):c},[e.record,e.formprops,e.onSave]),l=()=>{var c;let u={...s};if(e.apicode==="NewVersion")return u.options&&u.options[e.record.insId][0]&&!((c=u.options[e.record.insId][0])!=null&&c.value)||u.options&&!u.options[e.record.insId][0]?(u={...u,onPressEnter:()=>{e.onSave&&e.onSave()},onBlur:()=>{e.onSave&&e.onSave()},onChange:void 0},D.jsx(Z.Input,{ref:r,...u})):D.jsx(Z.Select,{ref:r,filterOption:(m,p)=>p.label&&p.label.indexOf(m)>=0,showSearch:!0,allowClear:!0,...ie.assign(u,{options:ie.uniqBy(u.options?u.options[e.record.insId]:[],"value").length===1?ie.uniqBy(u.options[e.record.insId],"value").map(m=>({label:m.label.replace(Y("sys.majorVersion",{placeholder:"大版本"}),"").replace(Y("sys.minorVersion",{placeholder:"小版本"}),""),value:m.value})):ie.uniqBy(u.options&&u.options[e.record.insId]?u.options[e.record.insId]:[],"value")})});switch(i){case"Input":return D.jsx(Z.Input,{ref:r,...u});case"DatePicker.RangePicker":return D.jsx(Z.DatePicker.RangePicker,{...u});case"Select":if(e.apicode==="exchanger"||e.apicode==="NewLifePhase"||e.apicode==="NewVersion"||e.apicode==="ProblemVersion"){if(e.apicode==="NewLifePhase"&&u.options&&u.options[e.record.insId]&&(u.options[e.record.insId]=u.options[e.record.insId].filter(g=>!g.noShow).map(g=>Fi.isChangeInstruction(g.itemcode)?{...g,disabled:g.sort<e.record.lifecycle.sort&&!["10007010","10007006","10007014"].includes(String(e.record.lifecycle.code))||!g.status}:Fi.isStatusChange(g.itemcode)?Fi.isFile(e.record.itemCode)?{...g,disabled:!g.status}:{...g,disabled:g.sort<=e.record.lifecycle.sort&&e.record.lifecycle.apicode!=="Obsolete"||!g.status||e.record.lifecycle.apicode==="Obsolete"&&g.apicode=="Obsolete"}:{...g,disabled:!g.status||g.code==10007022})),e.apicode==="ProblemVersion"&&u.options&&u.options[e.record.insId]&&(u.options[e.record.insId]=u.options[e.record.insId].filter(g=>g.value!="Draft").map(g=>({...g}))),e.apicode==="exchanger"&&u.options&&u.options[Cx[e.record.extension]]){const g=u.options[Cx[e.record.extension]].map(y=>({label:y,value:y}));return D.jsx(Z.Select,{ref:r,filterOption:(y,x)=>x.label&&x.label.indexOf(y)>=0,showSearch:!0,allowClear:!0,...u,options:g})}return D.jsx(Z.Select,{ref:r,filterOption:(g,y)=>y.label&&y.label.indexOf(g)>=0,showSearch:!0,allowClear:!0,...ie.assign(u,{options:ie.uniqBy(u.options?u.options[e.record.insId]:[],"value").length===1?ie.uniqBy(u.options[e.record.insId],"value").map(g=>({label:g.label.replace(Y("sys.majorVersion",{placeholder:"大版本"}),"").replace(Y("sys.minorVersion",{placeholder:"小版本"}),""),value:g.value})):ie.uniqBy(u.options&&u.options[e.record.insId]?u.options[e.record.insId]:[],"value")})})}else{if(e.apicode==="AffectRevision")return u.options&&u.options[e.record.insId]&&(u.options[e.record.insId]=u.options[e.record.insId].filter(g=>g.value.indexOf("(")==-1).map(g=>({...g}))),D.jsx(Z.Select,{ref:r,filterOption:(g,y)=>y.label&&y.label.indexOf(g)>=0,showSearch:!0,allowClear:!0,...ie.assign(u,{options:u.options&&u.options[e.record.insId]?u.options[e.record.insId]:[]})});if(e.apicode==="NewStatus")return u.options.forEach(g=>{var y;!((y=e==null?void 0:e.record)!=null&&y.publishTime)&&(g.apicode==="Disable"||g.apicode==="Scrap")?g.disabled=!0:g.disabled=!1,(g.apicode==="Initial"||g.apicode==="Draft")&&(g.disabled=!0)}),D.jsx(Z.Select,{ref:r,filterOption:(g,y)=>y.label&&y.label.indexOf(g)>=0,showSearch:!0,allowClear:!0,...u});if(u!=null&&u.selectPopupProps)return D.jsx(sC,{ref:r,selectProps:{...u,record:e.record}});if(u!=null&&u.popoverTransfer||u!=null&&u.popoverTable)return D.jsx(iC,{ref:r,selectProps:u})}return D.jsx(Z.Select,{ref:r,filterOption:(g,y)=>y.label&&y.label.indexOf(g)>=0,showSearch:!0,allowClear:!0,...u});case"Cascader":return D.jsx(Z.Cascader,{ref:r,showSearch:{filter:(g,y)=>y.some(x=>x.label&&x.label.toLowerCase().indexOf(g.toLowerCase())>-1),matchInputWidth:!1},...u});case"Date":const m=e.record.forbiddenTime,p=m&&m[e.name];return D.jsx(Z.DatePicker,{ref:r,...u,disabledDate:p?g=>Pq(m[e.name],g):void 0});case"Number":return D.jsx(Z.InputNumber,{ref:r,...u});case"Input.TextArea":return D.jsx(Z.Input.TextArea,{ref:r,...u});case"TreeSelect":return D.jsx(Z.TreeSelect,{ref:r,...u});case"CompositeForm":return D.jsx(hc,{...u});default:return D.jsx(Z.Input,{ref:r,...u})}};return D.jsx(Z.Form.Item,{noStyle:!0,name:e.name,children:l()})}),Mq="_imgOuter_16ygq_1",Fq="_imgInner_16ygq_9",Ex={imgOuter:Mq,imgInner:Fq},uC=e=>D.jsx(Z.Image,{...e,src:e.src}),y1=e=>D.jsx("div",{className:Ex.imgOuter,children:D.jsx(uC,{preview:!1,src:e.src,className:Ex.imgInner,placeholder:D.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:D.jsx(He,{className:"rotate",style:{cursor:"pointer",color:"#0563b2"},type:"loading"})})})}),rt=class rt{static avoid0TypeConvert(t){return vt.avoid0TypeConvert(t)}static isEqual(t,r){function n(a){return ve.isMoment(a)?vt.momentToRawData(a):a??""}return t=n(t),r=n(r),ie.isNil(t)&&ie.isNil(r)||ie.isNaN(t)&&ie.isNaN(r)?!0:t instanceof Object?ie.isEqual(t,r):this.avoid0TypeConvert(t)==this.avoid0TypeConvert(r)}static getCellSignState(t,r){const n=t.optType==="update"||t.optType==="replace",a=t.inProcess&&!ie.isNil(t.inProcess[r])&&!ie.isNil(t.inProcess)&&rt.isEqual(t.inProcess[r],t[r]),i=t.newVal&&!ie.isNil(t.newVal[r])&&!ie.isNil(t.newVal)&&rt.isEqual(t.newVal[r],t[r]);return{hasOptType:n,hasInProcess:a,hasNewValue:i}}static getRowSignState(t,r){const n=t.optType==="update"||t.optType==="replace",a=t.inProcess?Object.keys(t.inProcess):[],i=t.newVal?Object.keys(t.newVal):[],s=a.map(u=>{const c=t.inProcess[u],m=t[u],p=rt.isEqual(c,m);return r==null||r("inProcess",u,p,c,m),p}).some(u=>!u),l=i.map(u=>{const c=t.newVal[u],m=t[u],p=rt.isEqual(c,m);return r==null||r("newVal",u,p,c,m),p}).some(u=>!u);return{hasOptType:n,hasInProcess:s,hasNewValue:l}}static isEmptyValue(t){return typeof t=="number"?!1:ie.isEmpty(t)}static sortAndFilterTable(t){const{tableColumns:r,originTableColumns:n,sortersField:a,tabInfo:i={}}=t;let{sorters:s,filters:l}=t;const u=Fi.isUser(i.itemCode||""),c=i.tab==="Delegate";if(u&&c&&l){const m=r.filter(g=>["ChangeCategory"].includes(g.apicode)).map(g=>g.dataIndex),p=ie.map(l.split("~!~"),g=>ie.split(g,"-")[0]);ie.includes(p,m[0])?l.split("~!~").map(g=>{if(m.includes(g.split("-")[0])){const y=g.split("-")[1].split(",");y&&Array.isArray(y)&&(ie.remove(y,x=>x==""||x==null),r.map(x=>(x.apicode==="Category"&&ie.forEach(x.formitem.props.options,E=>{ie.includes(y,E.itemCode)?E.isHidden=!1:E.isHidden=!0,y.length==0&&(E.isHidden=!1)}),x)))}}):r.map(g=>(g.apicode==="Category"&&ie.forEach(g.formitem.props.options,y=>{y.isHidden=!1}),g))}if(i.tab!=="History"){const m=r.filter(g=>g.dataFrom==="1").map(g=>g.dataIndex),p=r.filter(g=>g.dataFrom==="0"||g.dataFrom==="2").map(g=>g.dataIndex);if(s&&Object.values(FIX_INS_TAbTABLE_COLUMNMAP).includes(s.split("-")[0])){const g=rt.getFixAttrFilterOrSortInfo({filterOrSort:s,attrs:n||r.map(y=>y.attr)});s=(g==null?void 0:g.value)||s}else m.includes(s.split("-")[0])?s=s?`attributes.${s}`:"":p.includes(s.split("-")[0])&&(s=s?`current.${s}`:"");if(l){const g=r.filter(y=>["OldVersion"].includes(y.apicode)).map(y=>y.dataIndex);l=l.split("~!~").map(y=>{if(console.log(y,"item"),g.includes(y.split("-")[0]))return`current.${y.split("-")[0]}-${y.split("-")[1]===Y("sys.label.draft",{placeholder:"草稿"})?"Draft":`${y.split("-")[1]} `}`;if(Object.values(FIX_INS_TAbTABLE_COLUMNMAP).includes(y.split("-")[0])){const x=rt.getFixAttrFilterOrSortInfo({filterOrSort:y,attrs:n||r.map(E=>E.attr)});return(x==null?void 0:x.value)||l}if(m.includes(y.split("-")[0]))return y?`attributes.${y}`:"";if(p.includes(y.split("-")[0]))return y?`current.${y}`:""}).join("~!~")}}if(i.tab==="VersionRecord"&&n){const m=vt.transformArrayToMap(n,"apicode","id");s=s.replace("insVersionOrder",`attributes.${m.Revision}`),l=l.replace("insVersionOrder",`attributes.${m.Revision}`)}return{sorters:s,filters:l,sortersField:a}}static monitoringCol(t,r){var u;const n=()=>{};if(!t)return n;const a=(u=t.querySelector(".frontend-table-header"))==null?void 0:u.querySelector("colgroup");if(!a)return n;const i=a.querySelector(".frontend-table-selection-col"),s=t.querySelector(".frontend-table-body").querySelector("colgroup");let l=null;return i&&(l=new MutationObserver(async(c,m)=>{const[p]=c;if(p.type=="attributes"&&p.attributeName=="style"&&!i.inhibit&&!ie.isNil(r)){i.inhibit=!0;const g=r;if(g!=i.offsetWidth){const y=Number(g)-i.offsetWidth,x=a.children.length-2,E=ie.round(y/x,2);Array.from(a.children,(k,T)=>{const w=s.children[T];if(k==i)k.setAttribute("style",`width:${g}px;max-width:${g}px;`),w.setAttribute("style",`width:${g}px;max-width:${g}px;`);else if(T!=a.children.length-1){const S=k.style.width.replace("px","");k.setAttribute("style",`width:${Number(S)+E}px;`),w.setAttribute("style",`width:${Number(S)}px;`)}})}}else i.inhibit=!1}),l.observe(i,{attributeFilter:["style"]})),()=>{l==null||l.disconnect(),l=null}}static getFixAttrFilterOrSortInfo({filterOrSort:t,attrs:r}){let n,a;const i=t.indexOf("-");if(i!==-1?(n=t.substring(0,i),a=t.substring(i+1)):(n=t,a=""),Object.values(FIX_INS_TAbTABLE_COLUMNMAP).includes(n)){const[s]=Object.entries(FIX_INS_TAbTABLE_COLUMNMAP).find(([l,u])=>n==u)||[];if(s){const l=vt.getAttrOf(r,s);if(l){l.apicode==="Version"&&(a=a===Y("sys.label.draft",{placeholder:"草稿"})?"Draft":`${a} `);const u=As.getAttributesMapId(l),c=As.isQuoteAttr(l)?"attributes":"current";return{apicode:s,id:u,attr:l,filterOrSortValue:a,prefix:c,value:`${c}.${u}-${a}`}}}}}};Tt(rt,"getTrulyHighlight",({formitem:t,highlight:r})=>{const n=["Input","Input.TextArea","Select","SelectTransfer","Date","Cascader","TreeSelect","Number"],i=(()=>{var l;return r&&r[0]?ie.isArray(r[0])&&t?(l=t.props)!=null&&l.treeCheckable||t.props.mode==="multiple"?rt.renderReadonlyItem({value:r[0],formitem:t}).split(","):rt.renderReadonlyItem({value:r[0],formitem:t}):ve.isMoment(r[0])?[ve(r[0]).format("YYYY-MM-DD")]:r:[]})()||[],s=n.includes(t==null?void 0:t.type)||!t;return{trulyHighlight:s?i:r||[],needTransform:s}}),Tt(rt,"wrapperHighLight",({highlight:t,formitem:r,value:n,originValue:a})=>{if(Sn.isMosaic(a))return D.jsx(pa,{});const{trulyHighlight:i,needTransform:s}=rt.getTrulyHighlight({highlight:t,formitem:r});return s?D.jsx(ei,{highlight:i,value:n}):n}),Tt(rt,"renderCacheCell",(t,r,n,a,i)=>{if(t.optType==="update"||t.optType==="replace"){if(t.newVal&&(t.newVal[r]||!ie.isNil(t.newVal[r])))if(rt.isEqual(t.newVal[r],t[r])){if(rt.isEqual(t.newVal[r],t[r]))return D.jsx("div",{style:{width:"100%"},children:D.jsx("div",{className:zn.updated_style,children:a?a({value:t.newVal[r],formitem:n,row:t.newVal}):rt.wrapperHighLight({originValue:t.newVal[r],value:rt.renderReadonlyItem({value:t.newVal[r],formitem:n}),formitem:n,highlight:i==null?void 0:i.highlight})})})}else return D.jsxs("div",{style:{width:"100%"},children:[D.jsx("div",{className:zn.updated_style,children:a?a({value:t.newVal[r],formitem:n,row:t.newVal}):rt.wrapperHighLight({originValue:t.newVal[r],value:rt.renderReadonlyItem({value:t.newVal[r],formitem:n}),formitem:n,highlight:i==null?void 0:i.highlight})}),D.jsx("div",{className:zn.update_style,children:a?a({value:t[r],formitem:n,row:t}):rt.wrapperHighLight({originValue:t[r],value:rt.renderReadonlyItem({value:t[r],formitem:n}),formitem:n,highlight:i==null?void 0:i.highlight})})]});if(t.inProcess&&t.inProcess[r]!==void 0&&t.inProcess!==null&&!rt.isEqual(t.inProcess[r],t[r]))return D.jsxs("div",{style:{width:"100%"},children:[D.jsx("div",{className:zn.updated_redline_style,children:a?a({value:t.inProcess[r],formitem:n,row:t.inProcess}):rt.wrapperHighLight({originValue:t.inProcess[r],value:rt.renderReadonlyItem({value:t.inProcess[r],formitem:n}),formitem:n,highlight:i==null?void 0:i.highlight})}),D.jsx("div",{className:zn.update_style,children:a?a({value:t[r],formitem:n,row:t}):rt.wrapperHighLight({originValue:t[r],value:rt.renderReadonlyItem({value:t[r],formitem:n}),formitem:n,highlight:i==null?void 0:i.highlight})})]})}return t.newVal&&t.newVal[r]!==void 0&&t.newVal!==null&&!rt.isEqual(t.newVal[r],t[r])?D.jsxs("div",{style:{width:"100%"},children:[D.jsx("div",{className:zn.updated_style,children:a?a({value:t.newVal[r],formitem:n,row:t.newVal}):rt.wrapperHighLight({originValue:t.newVal[r],value:rt.renderReadonlyItem({value:t.newVal[r],formitem:n}),formitem:n,highlight:i==null?void 0:i.highlight})}),D.jsx("div",{className:zn.update_style,children:a?a({value:t[r],formitem:n,row:t}):rt.wrapperHighLight({originValue:t[r],value:rt.renderReadonlyItem({value:t[r],formitem:n}),formitem:n,highlight:i==null?void 0:i.highlight})})]}):D.jsx("div",{style:{width:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:a?a({value:t[r],formitem:n,row:t}):rt.wrapperHighLight({originValue:t[r],value:rt.renderReadonlyItem({value:t[r],formitem:n}),formitem:n,highlight:i==null?void 0:i.highlight})})}),Tt(rt,"renderReadonlyItem",({apicode:t,formitem:r,value:n,record:a})=>{var i,s,l,u,c,m;if(!r)return n;if(!r.type)return"";if(["Select","Cascader"].includes(r.type))return r.props.mode==="multiple"?ie.isArray(n)&&n instanceof Array?n.map(p=>vt.getLabelInOptions({value:p,options:(r==null?void 0:r.props.options)||[]})).join(","):n&&typeof n=="string"?n.split(",").map(p=>vt.getLabelInOptions({value:p,options:(r==null?void 0:r.props.options)||[]})).join(","):"":vt.getLabelInOptions({value:n,options:(r==null?void 0:r.props.options)||[]});if(["TreeSelect"].includes(r.type))return(i=r.props)!=null&&i.treeCheckable&&ie.isArray(n)&&n instanceof Array?n.map(p=>vt.getLabelInOptions({value:typeof p!="string"?p.value:p,options:(r==null?void 0:r.props.treeData)||[]})).join(","):vt.getLabelInOptions({value:n,options:(r==null?void 0:r.props.treeData)||[]});if(["Date"].includes(r.type))if(n)if(ve.isMoment(n)){const g=n.creationData();return n.format(((s=r==null?void 0:r.props)==null?void 0:s.format)??g.format)}else return ve(n).format(((l=r==null?void 0:r.props)==null?void 0:l.format)??"YYYY-MM-DD HH:mm:ss");else return"";else return["Image"].includes(r.type)?n&&!ie.isArray(n)?D.jsx(Z.Popover,{placement:"right",content:D.jsx("div",{style:{height:"60px",width:"60px"},children:n?D.jsx(y1,{src:`/api${n}`}):D.jsx(D.Fragment,{})}),trigger:"hover",children:D.jsx("div",{style:{height:"26px",width:"26px"},children:n?D.jsx(y1,{src:`/api${n}`}):D.jsx(D.Fragment,{})})}):"":["CompositeForm"].includes(r.type)?n&&typeof n=="string"?(u=String(n))!=null&&u.includes("~%~")?`${n.split("~%~")[0]||""}${((m=ie.find((c=r.props)==null?void 0:c.options,{id:n.split("~%~")[1]}))==null?void 0:m.name)||""}`:n:"":r.isbomtag&&!ie.isArray(n)&&!(n instanceof Array)?n?vt.renderBomTag(n):"":ie.isArray(n)&&n instanceof Array?n.join(","):n??""}),Tt(rt,"renderRowClassName",t=>{const r=[];let n="";return t.shear&&r.push("shear-row"),t.optType==="add"?n="add-redline-row":t.optType==="del"&&(n="del-row"),t.dataType==="add"?n="add-row":t.dataType==="del"&&(n="del-row"),`${r.join(" ")} ${n}`}),Tt(rt,"renderVersionColumn",(t,r)=>Sn.isMosaic(t)?D.jsx(pa,{}):t==="Draft"||ie.isString(t)&&t.split(" ")[0]==="Draft"?D.jsx(ei,{highlight:r||[],value:Y("sys.label.draft",{placeholder:"草稿"})}):D.jsx(ei,{highlight:r||[],value:ie.isString(t)?t.replace(/[()]/g,"").split(" ")[0]:""}));let Za=rt;const Nq=({title:e,editable:t,children:r,dataIndex:n,record:a,handleSave:i,handleCellSelected:s,handleFill:l,handleDoubleClick:u,renderCacheCell:c,loading:m,required:p,formitem:g,rowKey:y,render:x,tableKey:E,menuId:k,highlight:T,isVersion:w,isUser:S,preRender:f,apicode:h,canselectcell:v,selectedCell:_,fillContextMenu:R,setInitialState:C,...P})=>{var Le,he,qe;const M=F.useContext(Qf),[q,L]=F.useState(!1),N=F.useContext(Iv),j=F.useRef(null),O=["Input","Input.TextArea","Number"];v&&_&&(_==null?void 0:_.dataIndex)===n&&(_==null?void 0:_.record[y])==a[y]&&(_==null?void 0:_.tableKey)==E&&(P.style={...P.style,background:"#ddeffe"}),F.useEffect(()=>{var oe,De;q?(oe=j.current)==null||oe.focusFormItem():(De=j.current)==null||De.blurFormItem()},[q]);const I=oe=>{for(;oe&&oe.nodeName!=="TR";)oe=oe.parentNode;return oe},z=async(oe,De)=>{var Et,Fe,We;const Je=()=>{if(!(!e&&!n)&&De){const Ne=new MouseEvent("dblclick",{bubbles:!0,cancelable:!1});I(De==null?void 0:De.target)&&I(De==null?void 0:De.target).dispatchEvent(Ne)}};if(g&&g.props&&g.props.disabled||!g||g.props&&!g.props){Je();return}if(oe?u&&await u(a):!0){if(await N.validateFields(),oe){let Ne=a.newVal&&!ie.isNil(a.newVal[n])?a.newVal[n]:a.inProcess&&!ie.isNil(a.inProcess[n])?a.inProcess[n]:a[n];if((g==null?void 0:g.type)==="Date"){const Oe=(Et=g.props)==null?void 0:Et.format;Ne=Ne?ve(Ne,typeof Oe=="string"?Oe:"YYYY-MM-DD HH:mm:ss"):null}((g==null?void 0:g.type)==="TreeSelect"&&((Fe=g==null?void 0:g.props)!=null&&Fe.treeCheckable)||(g==null?void 0:g.type)==="Select"&&((We=g==null?void 0:g.props)==null?void 0:We.mode)==="multiple")&&(Ne==""?Ne=[]:typeof Ne=="string"&&(Ne=Ne.split(","))),N.setFieldsValue({[n]:Ne})}L(!q)}else Je()},B=async()=>{try{const oe=await N.validateFields();z(),Object.keys(oe).forEach(De=>{(oe[De]===null||oe[De]===void 0)&&(oe[De]=""),typeof oe[De]=="string"&&(oe[De]=oe[De].trim())}),i({...a,...oe})}catch{}},H=(oe,De)=>c||D.jsx("div",{className:zn.edit_cell,children:D.jsx(ei,{value:Za.renderReadonlyItem({value:oe[De],formitem:g}),highlight:le})}),{show:U}=lq({id:k}),J=()=>{v&&(s(),C&&C(oe=>({...oe,selectedCell:{dataIndex:n,record:a,tableKey:E}})))},re=oe=>{if(n){if(J(),oe.preventDefault(),g&&g.props&&g.props.disabled||!g||g.props&&!g.props)return;U(oe,{props:{key:{dataIndex:n,record:a}}})}};let ne=r;const se=a?a[n]:"",ce=F.Children.map(r,oe=>{var De;if(F.isValidElement(oe)){const Je=(De=oe==null?void 0:oe.props)==null?void 0:De.children;return!Je||!Array.isArray(Je)?null:Je.some(Et=>{const Fe=Et==null?void 0:Et.props;return Fe&&typeof Fe.className=="string"?Fe.className.includes("frontend-table-row-indent"):!1})?Je:null}else return null});if(!Sn.readPermission(se))return D.jsxs("td",{...P,children:[ce,D.jsx(pa,{inLine:!0})]});const{trulyHighlight:le}=Za.getTrulyHighlight({highlight:T,formitem:g});if(S){const oe=(M==null?void 0:M.overrideLinkCom)||"a";ne=D.jsx(oe,{userId:a[n],id:a[n],record:a,content:Za.renderReadonlyItem({value:a[n],formitem:g}),highlight:le})}else if(t){if(g.type==="Date"){const oe=(Le=g.props)==null?void 0:Le.format,De=typeof oe=="string";let Je,Ct;if(ve.isMoment(a[n])){const Et=a[n].creationData();Je=Et==null?void 0:Et.input,Ct=Et==null?void 0:Et.format}a[n]=a[n]?ve(Je||a[n],De?oe:Ct||"YYYY-MM-DD HH:mm:ss"):null}if(((he=g.props)!=null&&he.treeCheckable||((qe=g.props)==null?void 0:qe.mode)==="multiple")&&typeof a[n]=="string"&&(a[n]=a[n]?a[n].split(","):[]),q)ne=D.jsx("div",{onDoubleClick:oe=>{oe.stopPropagation()},children:D.jsx(Z.Form.Item,{validateTrigger:O.includes(g.type)?"blur":"onChange",style:{margin:0},name:n,children:D.jsx(Dq,{name:n,ref:j,onSave:()=>B(),formprops:g,record:a,apicode:h})})});else if(!x){let oe=H(a,n);ne=D.jsxs("div",{onContextMenu:R===!1?void 0:re,title:a.newVal?Za.renderReadonlyItem({value:a.newVal[n],formitem:g}):Za.renderReadonlyItem({value:a[n],formitem:g}),className:"editable-cell-value-wrap",style:{paddingRight:24},children:[ce,oe]})}}else if(n&&!x)return w?D.jsx("td",{...P,title:a&&a[n]?a[n]==="Draft"?Y("sys.label.draft",{placeholder:"草稿"}):a[n]:"",onClick:J,children:D.jsx(ei,{value:a&&a[n]?a[n]==="Draft"?Y("sys.label.draft",{placeholder:"草稿"}):a[n]:"",highlight:le})}):D.jsx("td",{...P,title:a&&a[n]?a[n]:"",onClick:J,children:D.jsx(ei,{value:a?ie.isNil(a[n])?"":a[n]:"",highlight:le})});const ye=ne==null?void 0:ne.toString(),we=Array.isArray(ne)&&ne[0]===void 0,Ee=ye!=null&&ye.includes("[object ")?void 0:we?ye==null?void 0:ye.replace(/^\,/,""):ye;return D.jsx("td",{...P,onDoubleClick:oe=>{oe.stopPropagation(),z(!0,oe)},onClick:()=>{n&&J()},children:D.jsx("div",{title:Ee,style:{width:"100%",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},children:ne})})},Iq=()=>{function e(){return((1+Math.random())*65536|0).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},Lq=e=>D.jsxs(gq,{id:e.menuId,children:[D.jsx(xx,{onClick:t=>{e.onFill&&e.onFill("up",t.props.key)},children:Y("sys.prompt.fillUp",{placeholder:"向上填充"})}),D.jsx(xx,{onClick:t=>{e.onFill&&e.onFill("down",t.props.key)},children:Y("sys.prompt.fillDown",{placeholder:"向下填充"})})]}),jq=e=>{const[t,r]=F.useState({}),[n,a]=F.useState({}),i=F.useRef(null),{Option:s}=Z.Select,l=(g,y)=>{r(g),a(y)};return{getColumnSearchProps:F.useCallback((g,y)=>{const x=()=>{var w,S;return typeof(y==null?void 0:y.title)=="string"?y==null?void 0:y.title:(S=(w=y==null?void 0:y.search)==null?void 0:w.props)==null?void 0:S.placeholder},E=(w,S,f)=>{S()},k=(w,S)=>{w(),S()},T=(w,S,f)=>{var _,R;const h={size:"small",onChange:C=>{C&&C.target?w(C.target.value?[C.target.value]:[]):w(C?[C]:[])},style:{marginBottom:8,display:"block"}},v=D.jsx(Z.Input,{size:"small",ref:i,placeholder:Y("project.create.attr.verify.scheduledDate.input",{placeholder:"请输入{content}",variate:{content:x()}}),value:S[0],onPressEnter:()=>E(S,f),...ie.omit(h,["size"])});if(y.search)switch(y.search.type){case"Input":return v;case"Select":let C=(R=(_=y==null?void 0:y.search)==null?void 0:_.props)==null?void 0:R.options;return y.apicode==="ProblemVersion"&&(C=ie.uniqBy(ie.flatten(Object.values(C||{})),"value")||[],C=C.map(P=>({label:P.label==="Draft"?Y("sys.label.draft",{placeholder:"草稿"}):P.label,value:P.value}))),C=(C||[]).filter(P=>Sn.readPermission(P.label)),D.jsx(Z.Select,{size:"small",onKeyUp:P=>{(P.keyCode===13||P.charCode==13)&&E(S,f)},ref:i,mode:"multiple",placeholder:`${Y("sys.label.selectOption",{placeholder:"请选择"})} ${x()}`,value:S[0],filterOption:(P,M)=>M.label&&M.label.indexOf(P)>=0,...ie.omit(h,["size"]),children:(C||[]).map(P=>{if(!P.isHidden)return F.createElement(s,{...P,value:P.value,disabled:P.disabled,key:P.value,label:P.label},D.jsx("div",{title:P.label,style:{width:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:P.label}))})});case"Date":return D.jsx(Z.DatePicker,{size:"small",value:S[0],...ie.omit(h,["size"])});case"CompositeForm":return D.jsx("div",{className:"compositeFormClass",children:D.jsx(hc,{...y.formitem.props,valueType:y.valueType,value:S[0],size:"small",...ie.omit(h,["size"])})})}else return v};return y.search?{filterIcon:w=>D.jsx(gs,{style:{color:w?"#0563B2":void 0}}),filterDropdown:({setSelectedKeys:w,selectedKeys:S,confirm:f,clearFilters:h})=>D.jsxs("div",{style:{padding:8},children:[D.jsx("div",{style:{marginBottom:"5px"},children:T(w,S,f)}),D.jsxs(Z.Space,{children:[D.jsx(Z.Button,{type:"primary",onClick:()=>E(S,f),icon:D.jsx(gs,{}),size:"small",style:{width:90},children:Y("sys.filter",{placeholder:"筛选"})}),D.jsx(Z.Button,{onClick:()=>k(h,f),size:"small",style:{width:90},children:Y("sys.action.reset",{placeholder:"重置"})})]})]}),onFilterDropdownVisibleChange:w=>{w&&(y.search.type==="Input"||y.search.type==="Select")&&setTimeout(()=>{var S;return(S=i==null?void 0:i.current)==null?void 0:S.focus()},100)}}:{}},[]),setTableFiltered:g=>{l(g.sort(t),g.screen(n))},clearFilters:g=>{l({},{}),e&&e("","","",{},{isFooterRefresh:g==null?void 0:g.isFooterRefresh})},onFiltersChange:(g,y,x,E)=>{a(y),r(x),l(x,y);let k="",T="";ie.isArray(x)?x&&x.length&&(k=x.map(S=>`${S.field}-${S.order}`).join(",")):x.field&&x.order&&(k=`${x.field}-${x.order==="ascend"?"asc":"desc"}`);const w=S=>S.map(f=>Array.isArray(f)?f.join(","):ve.isMoment(f)?f.format("YYYY-MM-DD"):f);T=ie.remove(Object.keys(y).map(S=>y[S]&&typeof y[S][0]=="string"||typeof y[S]!="string"&&y[S]&&y[S][0]?`${S}-${w(y[S]||[]).join(",")}`:null),S=>S!==null).join("~!~"),e&&e(k,T,x.field,y)},sortInfo:t,filterInfo:n}},$q=e=>{var s,l;const t=((s=e.dataSource)==null?void 0:s.length)||0,r=e.total||0,n=e.rowSelection&&e.rowSelection.selectedRowKeys?(l=e.rowSelection.selectedRowKeys)==null?void 0:l.length:0,a={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},i=D.jsx(He,{type:"update",isBackend:!0,style:{fontSize:"12px",marginLeft:"8px",color:"#999999"},onClick:()=>{e.clearFilters&&e.clearFilters({isFooterRefresh:!0})}});return e.hideFooter?D.jsx(D.Fragment,{}):D.jsxs("div",{className:`${zn.table_footer} ${e.className||""}`,children:[e.hideTableCount?D.jsx("div",{}):e.customRender?e.customRender({tableDataLen:t,total:r,selectedLen:n,boxStyles:a,refreshNode:i}):D.jsxs("div",{style:a,children:[Y("project.tab.plan.criticalPath.window.total",{placeholder:"共"}),D.jsxs("span",{children:[" ",t,"/",r," "]}),Y("project.tab.plan.quantityDisplay.select",{placeholder:"条"}),","," ",Y("sys.selected",{placeholder:"已选"}),D.jsx("span",{children:` ${n} `}),Y("project.tab.plan.quantityDisplay.select",{placeholder:"条"}),i]}),e.enterFullscreen&&D.jsx("div",{children:D.jsx(He,{type:"a-front-fitscreen",style:{fontSize:"12px",color:"#999999"},isBackend:!0,onClick:()=>{e.enterFullscreen&&e.enterFullscreen()}})})]})},zq=(e,t,r,n,a,i,s)=>{var f;const[l,u]=F.useState(!1),[c,m]=F.useState(0),[p,g]=F.useState(e.columns||[]),[y,x]=F.useState(null),[E,k]=F.useState(null),T=h=>(v,{size:_})=>{v.stopImmediatePropagation();const R=[...p];R[h]={...R[h],width:_.width},g(R)};F.useEffect(()=>{g(e.columns)},[e.columns]);const w=Number(((f=e==null?void 0:e.scroll)==null?void 0:f.y)||i)+24;return{renderColumns:p?p.filter(h=>h).map((h,v)=>ie.extend({...h,sorter:h.sorter?{}:!1,required:h.editable?h.required:!1,sortOrder:t.field===h.dataIndex&&t.order,filteredValue:r?r[h.dataIndex]||[]:[],onHeaderCell:_=>({dataIndex:h.dataIndex,width:_.width,required:h.required,editable:h.editable,trulyHeight:w,tableKey:e.tableKey,formitem:h.formitem,onResize:T(v),onResizeOver:R=>{m(R.screenX),u(!0)},onResizeStop:R=>{console.log(R),u(!1)}}),onCell:_=>{var P,M;const R=((P=h==null?void 0:h.onCell)==null?void 0:P.call(h,_))||{},C=(typeof e.rowKey=="string"?e.rowKey:(M=e.rowKey)==null?void 0:M.call(e,_))||"id";return{record:_,className:`${h.className??""} ${h.dataIndex==E&&_[C]==y?zn.loading:""}`,editable:h.editable,isVersion:h.isVersion,isUser:h.isUser,apicode:h.apicode,dataIndex:h.dataIndex,title:h.title,formitem:h.formitem,required:h.required,canselectcell:e.canselectcell,rowKey:e.rowKey||"id",tableKey:e.tableKey,menuId:n,render:h.render,highlight:r[h.dataIndex],fillContextMenu:e.fillContextMenu,selectedCell:s,renderCacheCell:Za.renderCacheCell(_,h.dataIndex,h.formitem,void 0,{highlight:r[h.dataIndex]}),handleCellSelected:()=>{e.onSelectCell&&e.onSelectCell()},handleDoubleClick:q=>{if(e.onDoubleClick){const L=e.onDoubleClick(h,q);return L instanceof Promise&&(x(_[C]),k(h.dataIndex),L.finally(()=>{x(null),k(null)})),L}else return!0},handleSave:q=>{e.onSubmit&&e.onSubmit(q,h)},...R}}},a(h.dataIndex,h))):[]}},lC="INPUT_NAMESPACE",Bq=(e,t,r,n)=>{const[a,i]=F.useState();function s(l){const u=l.toString(),c=u.indexOf(".");return c===-1?0:u.slice(c+1).length}return F.useEffect(()=>{async function l(u){var y,x,E,k,T,w,S,f,h,v;if(u.target instanceof HTMLInputElement&&((x=(y=u.target)==null?void 0:y.dataset)==null?void 0:x.type)!=lC||u.target instanceof HTMLTextAreaElement||!u.target.closest(`.${_h}`)){console.log("is Input or TextArea or not Table");return}u.preventDefault();let c=(E=u.clipboardData)==null?void 0:E.getData("text");const m=await Promise.resolve().then(()=>require("./xlsx-DtQJwEPb.js"));if(c&&r&&n){var p=m.read(c,{type:"binary"}),g=p.SheetNames;const _=m.utils.sheet_to_json(p.Sheets[g[0]],{header:1,raw:!1,defval:"",blankrows:!0}),R=n.findIndex(M=>{var q,L,N;return M.dataIndex==r.dataIndex&&M.editable&&(((q=M.formitem)==null?void 0:q.type)=="Input"||((L=M.formitem)==null?void 0:L.type)=="Input.TextArea"||((N=M.formitem)==null?void 0:N.type)=="Number")});let C=n.findIndex((M,q)=>{var L,N,j;return q>R&&(!M.editable||!(((L=M.formitem)==null?void 0:L.type)=="Input"||((N=M.formitem)==null?void 0:N.type)=="Input.TextArea"||((j=M.formitem)==null?void 0:j.type)=="Number"))});C==-1&&(C=n.length);const P=n.slice(R,C);if(P.length>0){const M=_.map(q=>q.filter(L=>q.indexOf(L)<P.length))||[];for(let q=0;q<M.length;q++){const L=M[q]||[];for(let N=0;N<L.length;N++){const j=L[N],O=((k=P[N].formitem)==null?void 0:k.type)=="Number",I=(w=(T=P[N].formitem)==null?void 0:T.props)==null?void 0:w.precision,z=(f=(S=P[N].formitem)==null?void 0:S.props)==null?void 0:f.min,B=(v=(h=P[N].formitem)==null?void 0:h.props)==null?void 0:v.max;if(O){const H=ie.toNumber(j),U=H&&(z?H>=z:!0)&&(B?H<=B:!0)&&(ie.isNumber(I)&&I>0?s(H)<=I:!0);L[N]=U?H:void 0}}}i(M)}}}return document.addEventListener("paste",l),()=>{document.removeEventListener("paste",l)}},[r,n]),{pasteData:a}},Hq=e=>`${e}Key`,sg=e=>e.keyCode==17?"ctrl":e.keyCode==18?"alt":e.keyCode==91?"meta":e.keyCode==16?"shift":e.key,Uq=(e,{shortcuts:t,namespace:r})=>{const n="+",a=(...l)=>`${e}+${l.join(n)}`,i=xn(t),s=xn(ie.fromPairs(i.current.map(([l,u])=>[a(...l),u])));F.useEffect(()=>{console.log("初始化 useShortcutKey");const l=()=>i.current.map(([y])=>y).flat(1),u=y=>{var x,E,k;(!r||((x=y.target)==null?void 0:x.id)==r)&&(c.push(sg(y)),(k=(E=s.current)[c.join(n)])==null||k.call(E,y))},c=[],m={},p=y=>{var x;if(!r||((x=y.target)==null?void 0:x.id)==r){const E=sg(y);y[Hq(e)]&&!m[E]&&(m[E]=!0,l().includes(y.key)&&c.includes(e)&&y.preventDefault(),u(y))}},g=y=>{const x=sg(y);m[x]=!1,c.pop()};return window.addEventListener("keyup",g),window.addEventListener("keydown",p),()=>{window.removeEventListener("keyup",g),window.removeEventListener("keydown",p)}},[])},qq=(e,t)=>{const[r,n]=F.useState(!0),{clipboard:a,dataSource:i=[],rowSelection:s}=e,{selectedRowKeys:l=[]}=s||{},{childKeyName:u="children",isMark:c=!0,initialState:m,setInitialState:p}=a||{},g=String(e.rowKey||"id"),[y,x]=F.useState(!1),E=()=>y&&l.length,k=h=>v=>{E()&&h(v)},T=async(h,v)=>{var R;const _=[];_.type="shear",_.namespace=t,v.forEach(C=>{vt.isDelTableRow(C)||_.push({...C,toShear:()=>C.shear=!0})}),vt.ArrayAttributeFlat(_,u,C=>{C.toShear||(C.shear=!0)}),(!h.onBeforeShear||await h.onBeforeShear(_))&&(_.forEach(C=>{C.toShear(),delete C.toShear}),console.log("剪切",_),p&&p(C=>({...C,clipboard:_})),h.setDataSource("shear",i),(R=h.onAfterShear)==null||R.call(h,_),_.length&&(_.onPasteCallback=async C=>{var L;const P=C==t,M=[...i],q=()=>{p&&p(N=>({...N,clipboard:[]})),[..._].reverse().forEach(N=>{const j=vt.getTreeRelationNoRecursion({data:M,lookup:O=>O[g]==N[g],childrenKey:u});c&&j.self.dataType!=="add"?(j.self.shear=!1,j.self.dataType="del",vt.ArrayAttributeFlat(j.self[u],u,O=>{O.toShear||(O.shear=!1,O.dataType="del")})):j.parent?j.parent[u].splice(j.index,1):M.splice(j.index,1)}),h.setDataSource("shear",M)};return!h.onBeforeDeleteShear||await h.onBeforeDeleteShear({isSameSpace:P,deletes:_})?(q(),(L=h.onAfterDeleteShear)==null||L.call(h,{isSameSpace:P,deletes:_}),Promise.resolve(M)):Promise.reject(Y("sys.operation.cutFailed",{placeholder:"剪切失败"}))}))},w=async(h,v)=>{var R;const _=[];_.type="copy",_.namespace=t,v.forEach(C=>{vt.isDelTableRow(C)||(C.shear=!1,vt.ArrayAttributeFlat(C[u],u,P=>{P.shear=!1}),_.push({...C}))}),(!h.onBeforeCopy||await h.onBeforeCopy(_))&&(console.log("复制",_),p&&p(C=>({...C,clipboard:_})),h.setDataSource("paste",i),(R=h.onAfterCopy)==null||R.call(h,_))},S=async(h,{pasteData:v,pasteTarget:_})=>{var C,P;const R=vt.ArrayAttributeFlat(v,u).every(M=>!_.includes(M[g]));if(console.log({isNonSelf:R}),_.length==1&&v.length&&R){const q=vt.ArrayAttributeFlat(i,u).find(N=>N[g]==_[0]),L=h.pasteInto||"child";if(!h.onBeforePaste||await h.onBeforePaste({target:q,rows:v,type:L}))try{const N=await((C=v.onPasteCallback)==null?void 0:C.call(v,t))||[...i],j=vt.getTreeRelationNoRecursion({data:N,lookup:O=>O[g]==q[g],childrenKey:u});if(c){const O=I=>I.map(z=>Object.assign({...z,shear:!1,dataType:"add",[g]:vt.generateUUID(),primitiveInsId:z.primitiveInsId||z[g]},z[u]?{[u]:O(z[u].filter(B=>!I.some(H=>H[g]==B[g]))||[])}:{}));v=O(v)}if(L=="child"){const O=j.self[u];j.self[u]=[...O,...v]}else j.parent?j.parent[u].splice(j.index+1,0,...v):N.splice(j.index+1,0,...v);h.setDataSource("paste",N),(P=h.onAfterPaste)==null||P.call(h,{target:q,type:L})}catch(N){console.error(N)}}};a&&Uq(vt.isMac()?"meta":"ctrl",{shortcuts:[[["x"],k(async()=>{const h=vt.ArrayAttributeFlat(i,u).filter(v=>l.includes(v[g]));console.log({shearList:h}),T(a,h)})],[["c"],k(async()=>{const h=vt.ArrayAttributeFlat(i,u).filter(v=>l.includes(v[g]));console.log({copyList:h}),w(a,h)})],[["v"],k(async()=>{const h=(m==null?void 0:m.clipboard)||[];S(a,{pasteData:h,pasteTarget:l})})]],namespace:t});const f=F.useRef(null);return F.useEffect(()=>{var h;r||((h=f.current)==null||h.focus(),x(!0))},[l.length,l[0]]),F.useEffect(()=>{n(!1)},[]),{namespace:t,isGainFocus:y,focus:()=>{var v;const h=document.querySelector(":focus");h instanceof HTMLInputElement||h instanceof HTMLTextAreaElement||(v=f.current)==null||v.focus()},shear:T,copy:w,paste:S,FocusDom:D.jsx("input",{ref:f,"data-type":lC,type:"text",id:t,onFocus:()=>x(!0),onBlur:()=>x(!1),readOnly:!0,style:{opacity:0,position:"fixed",left:"-100%",top:"-100%",zIndex:"-10"}})}},Wq=(e,t,r,n)=>{const[a,i]=F.useState();return F.useEffect(()=>{async function s(l){if(r){const u=l.clipboardData,c=r.dataIndex,m=r.record;let p=null;if(m.newVal&&Object.hasOwn(m.newVal,c)?p=m.newVal[c]:p=m[c]||null,p)try{u.setData("text/plain",p),i(p),l.preventDefault()}catch(g){console.error("Failed to write to clipboard: ",g)}}}return document.addEventListener("copy",s),()=>{document.removeEventListener("copy",s)}},[r,n]),{copyData:a}},Iv=F.createContext(null),_h="tableTopBox",wh=F.forwardRef((e,t)=>{var M;F.useImperativeHandle(t,()=>({scrollTo:q=>{i.current.scrollTo(q)},scrollXTo:q=>{if(a.current){const L=a.current.querySelector(".frontend-table-body");L&&(L.scrollLeft=q)}},clearFilters:m,setTableFiltered:y,clipboard:P}));const[r]=F.useState(vt.generateUUID()),n=F.useRef(null),a=F.useRef(null),i=F.useRef(null),[s]=Z.Form.useForm(),l=Iq(),{sortInfo:u,filterInfo:c,clearFilters:m,getColumnSearchProps:p,onFiltersChange:g,setTableFiltered:y}=jq(e.onFilterAndSorter),[x,{toggleFullscreen:E,exitFullscreen:k}]=uS(a,{pageFullscreen:{zIndex:500}}),T=e.tableKey||r;F.useEffect(()=>{const q=L=>{L.key=="Escape"&&x&&k()};return addEventListener("keydown",q),()=>{removeEventListener("keydown",q)}});const w=JU({hideFooter:!!e.hideFooter,contentRef:n,tableRef:a,scroll:e.scroll,fullScreenMinusHeight:e.fullScreenMinusHeight||0,scrollUpdate:e.scrollUpdate,onTableHeightChange:e==null?void 0:e.onTableHeightChange},!!e.isFullscreen||x),[S,f]=ZU(()=>({scroll:{y:1e3},ref:i}),[]),h={header:{cell:nq},body:{cell:Nq}};F.useMemo(()=>f(h),[f]);const{renderColumns:v}=zq({...e,tableKey:T},u,c,l,p,w,e.selectedCell),{pasteData:_}=Bq(a,e.dataSource,e.selectedCell,e.columns);F.useEffect(()=>{var q;if(_&&e.selectedCell){const L=e.dataSource||[],N=String(e.rowKey)||"id",j=L.findIndex(J=>{var re;return J[N]==((re=e.selectedCell)==null?void 0:re.record[N])}),O=e.columns.findIndex(J=>{var re;return J.dataIndex==((re=e.selectedCell)==null?void 0:re.dataIndex)});let I=((q=_[0])==null?void 0:q.length)||0,z=(_==null?void 0:_.length)||0;const B=e.columns.slice(O,O+I),H=L.slice(j,j+z);let U=[];_.forEach((J,re)=>{if(H.length>re){const ne={};J.forEach((se,ce)=>{B.length>ce&&(ne[B[ce].dataIndex]=se,ne[N]=H[re][N])}),U.push(ne)}}),e.onPaste&&e.onPaste(vt.transformArrayToMap(U,N))}},[_]);const{copyData:R}=Wq(a,e.dataSource,e.selectedCell,e.columns);F.useEffect(()=>{R&&e.selectedCell&&e.onCopy&&e.onCopy(R)},[R]);const{run:C}=GF(async q=>{const L=e.pageNo||1,N=e.pageSize||10,j=e.total||0;Math.abs(parseInt(q.target.scrollTop+q.target.clientHeight)-q.target.scrollHeight)<1.5&&!e.loading&&L*N<j&&e.onScroll&&e.onScroll(L+1)},{wait:400}),P=qq(e,r);return D.jsxs("div",{ref:n,id:`table_key_${T}`,className:`${zn.main} ${_h}`,style:{position:"relative",overflow:"hidden"},onClick:q=>P.focus(),onScrollCapture:q=>{q.target.scrollHeight!==24&&q.target.className==="frontend-table-body"&&(e.onBeforeScroll?e.onBeforeScroll()&&C(q):C(q))},children:[D.jsx(Lq,{menuId:l,...ie.pick(e,["onFill"])}),P.FocusDom,D.jsxs(Z.Form,{form:s,component:!1,children:[D.jsx(Iv.Provider,{value:s,children:D.jsx(Z.Table,{className:Te(e.showcheckbox?void 0:"table-checkbox"),ref:a,rowKey:e.rowKey||"id",style:{borderBottom:"1px solid #e4e4e4",borderRight:"1px solid #e4e4e4",background:"#fff"},pagination:!1,components:S,bordered:!0,...ie.omit(e,["columns","scroll","expandable","tableKey"]),tableKey:T,loading:{indicator:D.jsx(lc,{style:{fontSize:32},spin:!0}),spinning:!!e.loading},showSorterTooltip:!1,expandable:{indentSize:18,expandIcon:({expanded:q,onExpand:L,record:N,expandable:j})=>N.children&&N.children.length||N.hasChildren?q?D.jsx(R8,{className:"expand",onClick:O=>{L(N,O)}}):D.jsx(P8,{className:"expand",onClick:O=>{L(N,O)}}):(e.isTree||j!==void 0)&&D.jsx("span",{style:{float:"left",width:"15px",height:"1px"}}),...e.expandable},scroll:{y:w,scrollToFirstRowOnChange:!0,...ie.merge(e.scroll,{x:(M=e.scroll)==null?void 0:M.x})},columns:v,onChange:g})}),D.jsx($q,{...e,className:e.tableFooterClassName,clearFilters:m,enterFullscreen:e==null?void 0:e.toggleFullscreen,customRender:e.tableFooterDateRender})]})]})}),{Option:Jo}=Z.Select,cC=F.forwardRef((e,t)=>{const r=F.useRef("1848553711328477186"),[n,a]=F.useState([]),[i,s]=F.useState([]),[l,u]=F.useState([]),c=Br({pageNo:1,pageSize:50,total:0}),m=Br({sorter:"",filters:"",itemCodes:`${Si.material},${Si.document},${Si.file}`,initialItemCodes:""}),p=Br({loading:!1,searchValue:"",focus:!1,excludeIds:"",objectIds:"",columns:[{title:Y("sys.label.nameRe",{placeholder:"姓名"}),ellipsis:!0,dataIndex:"Name",sorter:!0,width:155},{title:Y("project.attr.owner.edit.window.email",{placeholder:"邮箱"}),ellipsis:!0,dataIndex:"Email",sorter:!0,width:155},{title:Y("sys.label.employeeID",{placeholder:"工号"}),ellipsis:!0,dataIndex:"EmpNo",sorter:!0,width:155}],conditionObject:[],sideChoice:0,columnsHighlight:[]});zs(()=>{var w;let T=[];for(let S of e.columns||p.columns)T.push({...S,render:!S.render&&((w=e.placeholderCode)!=null&&w.includes(S.dataIndex))?f=>D.jsx(ei,{value:f,highlight:g.numberHighLight||[]}):S.render});p.columnsHighlight=T,e.isSelect&&e.allCategories?e.getItems().then(S=>{if(S.code==200){let f=[];for(let v of S.result)v.code!=10001019&&v.code!=10001017&&v.code!=10001018&&f.push({label:v.name,value:v.code});p.conditionObject=f;let h=ie.map(f,"value").join(",");m.itemCodes=h,m.initialItemCodes=ie.cloneDeep(h),x(!0)}}):x(!0)}),F.useEffect(()=>(e.enter&&!p.focus&&l.length>0?y():document.onkeydown=null,()=>{document.onkeydown=null}),[l,p.focus]),F.useImperativeHandle(t,()=>({getLoading:T=>{p.loading=T},backfill:T=>{u(T)}}));const g=Br({numberHighLight:[]}),y=()=>{document.onkeydown=function(T){var w=window.event||T,S=w.keyCode||w.which;if(S==13&&!p.loading){if(e.maxSelect&&l.length+(e.value||[]).length>e.maxSelect){Z.message.error(Y("sys.maxSelect",{placeholder:"至多选择{maxSelect}个",variate:{maxSelect:e.maxSelect}}));return}let f=l.length?ie.map(l,"id").join(","):"";e.onChange&&e.onChange(f),e.handleSubmit&&e.handleSubmit(l)}}},x=async(T=!1,w)=>{p.loading=!0;const{pageNo:S,pageSize:f}=c,{filters:h,sorter:v,itemCodes:_}=m;if({...e.params},p.searchValue&&(e.formate=="1"||e.formate=="2"?e.params.columns.split(",").map(M=>M+"-"+p.searchValue).join("~!~"):p.searchValue),!e.getUrlData){a([]),c.total=0,p.loading=!1;return}const{records:R,total:C}=await e.getUrlData({pageNo:S,pageSize:f,filters:h,sorter:v}),P=R||[];c.total=C,T?(a(P),s(ie.cloneDeep(P)),e.onInit&&e.onInit(P)):(a([...n,...P]),s(ie.cloneDeep([...n,...P])))},E=T=>{T=="0"?m.itemCodes=m.initialItemCodes:m.itemCodes=T,a([]),u([]),c.pageNo=1,p.searchValue="",x(!0,c.pageSize)},k=T=>{u([]),e.searchChange&&e.searchChange(T),p.searchValue=T,g.numberHighLight=T?[T]:[],c.pageNo=1,x(!0)};return D.jsx(To,{width:e.width,forceRender:!0,className:rg.tableSelection,modalTitle:e.title,mask:!1,visible:e.visible,maskClosable:!1,onCancel:()=>{e.onCancel&&e.onCancel()},footer:null,destroyOnClose:!0,onOk:async()=>{e.handleSubmit&&e.handleSubmit(l)},children:D.jsxs("div",{style:e.isBroadside?{display:"flex"}:{},children:[e.isBroadside&&D.jsx("div",{className:rg.sideBox,style:{paddingRight:e.isLibrary?"12px":"0px",minWidth:e.isLibrary?"110px":void 0,overflow:"hidden"},children:e.isLibrary?D.jsx(W4,{itemCode:Si.technology,onGetTreeFields:T=>{},onSelected:T=>{r.current=T.id,c.pageNo=1,x(!0)},outIsSelected:!1,getInstanceMenu:()=>{},getAttributeByTab:()=>{}}):[Y("sys.myCreated",{placeholder:"我创建的"}),Y("sys.label.all",{placeholder:"全部"})].map((T,w)=>D.jsx("div",{onClick:()=>{p.sideChoice=w,c.pageNo=1,x(!0)},style:{marginBottom:"12px",cursor:"pointer",color:w==p.sideChoice?"#0563b2":""},children:T},w))}),D.jsxs("div",{style:{width:(e.isBroadside,"100%"),overflow:"hidden"},children:[!e.noSearch&&D.jsx(Z.Form.Item,{rules:[{required:!1}],children:D.jsxs("div",{style:{display:"flex"},children:[e.isSelect&&D.jsxs(D.Fragment,{children:[e.allCategories&&p.conditionObject.length>0&&D.jsxs(Z.Select,{disabled:p.loading,defaultValue:"0",style:{width:120,marginRight:"10px"},onChange:T=>{E(T)},children:[D.jsx(Jo,{value:"0",children:Y("sys.label.all",{placeholder:"全部"})}),"(",p.conditionObject.map(T=>D.jsx(Jo,{value:T.value,children:T.label})),")"]}),!e.allCategories&&D.jsxs(Z.Select,{disabled:p.loading,defaultValue:"0",style:{width:120,marginRight:"10px"},onChange:T=>{E(T)},children:[D.jsx(Jo,{value:"0",children:Y("sys.label.all",{placeholder:"全部"})}),D.jsx(Jo,{value:Si.material,children:Y("sys.label.material",{placeholder:"物料"})}),D.jsx(Jo,{value:Si.document,children:Y("sys.document.document",{placeholder:"文档"})}),D.jsx(Jo,{value:Si.file,children:Y("sys.label.file",{placeholder:"文件"})})]})]}),D.jsx(Z.Input,{style:{width:240},onBlur:()=>{p.focus=!1},onFocus:()=>{p.focus=!0},allowClear:!0,value:p.searchValue,placeholder:e.placeholder||Y("sys.enterSearch",{placeholder:"请输入搜索内容"}),suffix:D.jsx(He,{type:"content-search",style:{color:"#BABABA"},onClick:()=>{k(p.searchValue)}}),onChange:T=>{p.searchValue=T.target.value,T.target.value||(u([]),e.searchChange&&e.searchChange(""),c.pageNo=1,g.numberHighLight=[],x(!0))},onPressEnter:T=>{k(T.target.value)}})]})}),e.isDownload&&D.jsxs("div",{style:{display:"flex",marginBottom:"12px"},children:[D.jsx(He,{disabled:!l.length,placement:!0,type:"rightbar-download",style:{marginRight:"5px",fontSize:"15px"},onDivClick:()=>{e.handleSubmit&&e.handleSubmit(l,"1")},children:Y("sys.label.download",{placeholder:"下载"})}),D.jsx("span",{style:{marginRight:"24px"}}),D.jsxs(He,{disabled:!l.length,placement:!0,type:"rightbar-download",style:{marginRight:"5px",fontSize:"15px"},onDivClick:()=>{e.handleSubmit&&e.handleSubmit(l,"2")},children:[Y("sys.label.download",{placeholder:"下载"}),"PDF"]})]}),D.jsx("div",{className:rg.tableFrame,style:{display:"flex"},children:D.jsx(wh,{onSelectCell:()=>{u([])},expandable:{expandIconColumnIndex:e.isLibrary?2:void 0},rowSelection:{columnWidth:15,fixed:"left",hideSelectAll:!e.isCheckbox,selectedRowKeys:l.map(T=>T.id),onChange:(T,w)=>{e.isCheckbox?u(w):w.length?u([w.pop()]):u([])},getCheckboxProps:T=>({disabled:T.number==="~#~"||!!(e.convertFun&&ie.includes(T.unique,"-"))})},onRow:T=>({onDoubleClick:()=>{if(T.number!=="~#~")if(l.length>1){if(e.maxSelect&&l.length+(e.value||[]).length>e.maxSelect){Z.message.error(Y("sys.maxSelect",{placeholder:"至多选择{maxSelect}个",variate:{maxSelect:e.maxSelect}}));return}e.onChange&&e.onChange(ie.map(l,"id").join(",")),e.handleSubmit&&e.handleSubmit(l)}else u([T]),e.onChange&&e.onChange(T.id),e.handleSubmit&&e.handleSubmit([T])}}),loading:p.loading,dataSource:n,columns:p.columnsHighlight,...c,scroll:{y:e.height||200},onScroll:T=>{c.pageNo=T,x()},onFilterAndSorter:(T,w,S)=>{if(u([]),e.isBuiltInSort)if(T){let f=ie.orderBy(n,[T.split("-")[0]],[T.split("-")[1]]);a(f)}else a(i);else{if(e.isUseRuleSort){const f=Za.sortAndFilterTable({sorters:T,filters:w,sortersField:S,tableColumns:e.columns});m.sorter=f.sorters,m.filters=f.filters}else m.sorter=T,m.filters=w;c.pageNo=1,x(!0)}}})})]})]})})}),Vq="_selectFrameBox_mktv5_1",Yq={selectFrameBox:Vq},dC=F.forwardRef((e,t)=>{var s;const[r,n]=F.useState(e.value);F.useEffect(()=>{n(e.value)},[e.value]);const a=Br({visible:!1,options:[],enter:!1});F.useEffect(()=>{e.options&&e.options.length&&(a.options=e.options)},[e.options]);const i=()=>{var m;const l=(m=e.params)==null?void 0:m.ids,u=l?l.join(","):"",c=e.isCheckbox?r&&r.join(","):r;return`${u}${c!=null&&c.length&&u?",":""}${c??""}`};return D.jsxs("div",{className:Yq.selectFrameBox,style:e.width?{width:e.width}:void 0,children:[e.disabled&&e.userLink?D.jsx("div",{children:(s=ie.filter(e.options,l=>l.id==r)[0])==null?void 0:s.Name}):D.jsxs("div",{style:{display:"flex",gap:"5px"},children:[D.jsx(Z.Select,{style:{minWidth:"80px"},mode:"multiple",allowClear:!0,open:!1,showSearch:!1,disabled:e.disabled,value:r||void 0,options:a.options,fieldNames:e.fieldNames?e.fieldNames:{label:"label",value:"value"},placeholder:e.placeholder||Y("sys.label.selectOption",{placeholder:"请选择"}),onClick:()=>{e.disabled||(a.visible=!0,a.enter=!0)},onChange:l=>{e.onChange&&e.onChange(l)},tagRender:l=>Sn.readPermission(l.label)?D.jsx(Z.Tag,{color:"blue",closable:!0,style:{borderRadius:"0",border:"none",fontSize:"12px",padding:"2px 7px"},closeIcon:D.jsx(He,{type:"close",style:{fontSize:"12px",cursor:"pointer"},onClick:()=>{const u=r.filter(c=>c!==l.value);n(u),e.onChange&&e.onChange(u)}}),children:l.label},l.value):D.jsx(pa,{})}),e.showButton?D.jsx(Z.Button,{onClick:()=>{a.visible=!0,a.enter=!0},style:{display:"flex",height:"32px",width:"32px",background:"#fafafa",alignItems:"center",justifyContent:"center"},children:D.jsx(He,{type:"content-search",style:{fontSize:"16px"}})}):D.jsx(D.Fragment,{})]}),a.visible&&D.jsx(cC,{visible:a.visible,title:e.title||Y("sys.label.selectOption",{placeholder:"请选择"}),url:e.url,width:e.modalWidth,value:e.value,formate:e.formate,noSearch:e.noSearch,isUseRuleSort:e.isUseRuleSort,params:{...e.params,ids:i()},isLibrary:e.isLibrary,isBroadside:e.isBroadside,height:e.height,enter:a.enter,placeholder:e.searchPlaceholder||Y("sys.enterKeyword.enterKeyword",{placeholder:"请输入关键字"}),placeholderCode:e.placeholderCode||"",columns:e.columns,isCheckbox:e.isCheckbox,maxSelect:e.maxSelect,onChange:l=>{if(e.isCheckbox){let u=ie.compact(ie.concat(r,l.split(",")));e.onChange&&e.onChange(l?u:void 0)}else e.onChange&&e.onChange(l)},handleSubmit:l=>{e.isCheckbox?a.options=ie.concat(a.options,l):a.options=l,e.onSubmit&&e.onSubmit(a.options),a.visible=!1,a.enter=!1},onInit:l=>{a.options=l},onCancel:()=>{a.visible=!1,a.enter=!1}})]})}),Gq="_searchTextTips_daoe4_1",Kq={searchTextTips:Gq};function Xq({fetchOptions:e,debounceTimeout:t=500,...r}){const[n,a]=F.useState(!1),[i,s]=F.useState([]),l=F.useRef(0);F.useEffect(()=>{s(r.options)},[r.options]);const u=F.useMemo(()=>{const c=m=>{l.current+=1;const p=l.current;s([]),a(!0),e(m,r).then(g=>{p===l.current&&(s(g),a(!1))})};return ie.debounce(c,t)},[e,t]);return D.jsx(Z.Select,{...r,labelInValue:!0,showArrow:!0,filterOption:!1,onSearch:u,notFoundContent:n?D.jsx("div",{style:{textAlign:"center"},children:D.jsx(Z.Spin,{size:"small"})}):D.jsx(Z.Empty,{image:Z.Empty.PRESENTED_IMAGE_SIMPLE}),options:i,onBlur:()=>{s(r.options)},url:void 0,ischeckbox:void 0,dropdownRender:c=>D.jsxs(D.Fragment,{children:[c,D.jsx(Z.Divider,{style:{margin:"8px 0"}}),D.jsx("div",{className:Kq.searchTextTips,children:`${Y("sys.resultDisplayLimit",{placeholder:"结果只显示前{count}条",variate:{count:100}})},${Y("sys.input.enterExactQuery",{placeholder:"请输入参数精确查询"})}`})]})})}async function kx(e,t){var i,s;let r,n={pageNo:1,pageSize:100,...t.params};e&&(n.andQuery=`${t.params.andQuery}~!~${t.fieldNames.label}-${e}`),typeof t.url=="function"?r=await t.url(n):r=await t.getPageList(t.url,n,ie.includes(t.url,"opendata"));let a;return(i=t.fieldNames)!=null&&i.label?a=ie.reject((s=r.result)==null?void 0:s.records,l=>{var u;return l[(u=t.fieldNames)==null?void 0:u.label]==="~#~"}):a=r.result.records,a}const Zq=F.forwardRef((e,t)=>{const[r,n]=F.useState(e.value),[a,i]=F.useState([]);return zs(async()=>{i(await kx("",e))}),D.jsx(Xq,{...e,showSearch:!0,mode:e.ischeckbox?"multiple":void 0,value:r,fetchOptions:kx,style:{width:"100%"},options:a,fieldNames:e.fieldNames?e.fieldNames:{label:"label",value:"value"}})}),Jq=e=>D.jsx(D.Fragment,{}),vf=e=>D.jsx(Z.TreeSelect,{...e,showSearch:!0,treeNodeFilterProp:"label",getPopupContainer:t=>t.parentNode||document.body}),fC=F.forwardRef((e,t)=>{const r=F.useContext(Qf),n=(r==null?void 0:r.formItemCom)||{},a=F.useCallback((l,u)=>{var g,y;const{type:c,cannotread:m,props:p}=l;if(m!=="0"){let x=!1;if(typeof e.readOnly=="boolean"?x=e.readOnly:typeof e.readOnly=="function"&&(x=e.readOnly()),c==="Input")return;if(c==="Select")return p!=null&&p.loading?(u="",D.jsx(Z.Form.Item,{noStyle:!0,children:D.jsx(ho,{...p,options:[],loading:!0,value:((y=(g=e==null?void 0:e.content)==null?void 0:g.props)==null?void 0:y.mode)==="multiple"?[]:"",disabled:x||(p==null?void 0:p.disabled)})})):p!=null&&p.options&&p.options.length?typeof u=="string"&&u.split(",").length>1&&(p==null?void 0:p.mode)!=="multiple"?e.readOnly?D.jsx("span",{style:{paddingLeft:"5px"},children:u.split(",").map(E=>D.jsx(Z.Tag,{children:vt.getLabelInOptions({value:E,options:(p==null?void 0:p.options)||[]})},E))}):(p.options=[...p==null?void 0:p.options,{label:u.split(",").map(E=>vt.getLabelInOptions({value:E,options:(p==null?void 0:p.options)||[]})).join(","),disabled:!0,value:u}],D.jsx(ho,{filterOption:(E,k)=>k.label&&k.label.indexOf(E)>=0,...p,showSearch:!0,disabled:x||(p==null?void 0:p.disabled)})):D.jsx(ho,{filterOption:(E,k)=>k.label&&k.label.indexOf(E)>=0,...p,showSearch:!0,disabled:x||(p==null?void 0:p.disabled)}):D.jsx(ho,{...p,showSearch:!0,options:[],disabled:x||(p==null?void 0:p.disabled)});if(c==="PopupSelect")return p.options===void 0||p.options.length>0?D.jsx(dC,{...p,title:e.label,disabled:x||(p==null?void 0:p.disabled)},e.name):"";if(c==="SearchSelect")return D.jsx(Zq,{...p},e.name);if(c==="Checkbox")return D.jsx(Z.Checkbox,{...p,disabled:x||(p==null?void 0:p.disabled)});if(c==="Checkbox.Group")return D.jsx(Z.Checkbox.Group,{...p,disabled:x||(p==null?void 0:p.disabled)});if(c==="Input.TextArea")return x?D.jsx(Z.Input.TextArea,{...p,disabled:!0}):D.jsx(Z.Input.TextArea,{...p});if(c==="Input.Password")return x?D.jsx(Z.Input.Password,{...p,disabled:!0}):D.jsx(Z.Input.Password,{...p});if(c==="Date")return x?D.jsx(Z.DatePicker,{...p,size:"middle",placeholder:"",disabled:x||(p==null?void 0:p.disabled)}):D.jsx(Z.DatePicker,{...p});if(c==="DatePicker.RangePicker")return x?D.jsx(Z.DatePicker.RangePicker,{...p,disabled:x||(p==null?void 0:p.disabled),placeholder:["",""],separator:""}):D.jsx(Z.DatePicker.RangePicker,{...p});if(c==="TimePicker.RangePicker")return x?D.jsx(Z.TimePicker.RangePicker,{...p,disabled:x||(p==null?void 0:p.disabled)}):D.jsx(Z.TimePicker.RangePicker,{...p});if(c==="Switch")return D.jsx(Z.Switch,{...p,disabled:x||(p==null?void 0:p.disabled)});if(c==="Number")return(p==null?void 0:p.apicode)==="FileSize"?D.jsx(K8,{...p,disabled:x||(p==null?void 0:p.disabled)},p.id):x?D.jsx(Z.InputNumber,{...p,placeholder:"",disabled:x||(p==null?void 0:p.disabled)}):D.jsx(Z.InputNumber,{...p});if(c==="Cascader")return x?D.jsx(Z.Cascader,{...p,placeholder:"",disabled:x||(p==null?void 0:p.disabled)}):D.jsx(Z.Cascader,{showSearch:{filter:(E,k)=>k.some(T=>T.label&&T.label.toLowerCase().indexOf(E.toLowerCase())>-1),matchInputWidth:!1},...p});if(c==="TreeSelect")return p.treeData&&p.treeData.length?x?D.jsx(vf,{...p,disabled:x||(p==null?void 0:p.disabled),showSearch:!0,treeNodeFilterProp:"label"}):D.jsx(vf,{...p,showSearch:!0,treeNodeFilterProp:"label"}):D.jsx(vf,{disabled:x||(p==null?void 0:p.disabled)});if(c==="Radio")return x?D.jsx(Z.Radio,{...p,disabled:x||(p==null?void 0:p.disabled)}):D.jsx(Z.Radio,{...p});if(c==="Radio.Group")return x?D.jsx(Z.Radio.Group,{...p,disabled:x||(p==null?void 0:p.disabled)}):D.jsx(Z.Radio.Group,{...p});if(c==="Slider")return D.jsx(Z.Slider,{...p,disabled:x||(p==null?void 0:p.disabled)});if(c==="Markdown")return D.jsx(WS,{...p,readOnly:x||(p==null?void 0:p.disabled)});if(c==="SelectPopup")return D.jsx(sC,{selectProps:p,readOnly:x||(p==null?void 0:p.disabled)});if(c==="SelectTransfer")return D.jsx(iC,{selectProps:p,readOnly:x||(p==null?void 0:p.disabled)});if(c==="CompositeForm")return D.jsx(hc,{...p,readOnly:x||(p==null?void 0:p.disabled)});if(c==="Title")return D.jsx(Jq,{...p,readOnly:x||(p==null?void 0:p.disabled)});if(n[c]){const E=n[c];return D.jsx(E,{type:c,...p,name:e.name,disabled:x||(p==null?void 0:p.disabled)},e.name)}return D.jsx("span",{children:u})}else return D.jsx("div",{style:{width:"28px",height:"10px",backgroundColor:"#d9d9d9"}})},[e.readOnly]),i=F.useMemo(()=>e.ignoreNoWhiteSpaceStart?e.rules:e.content.type==="Input"||e.content.type==="Input.TextArea"?ie.concat(e.NoWhiteSpaceStart,e.rules||[]):e.rules,[e.rules,e.ignoreNoWhiteSpaceStart]),s=e.content.type=="Title";return D.jsx(Z.Form.Item,{colon:!1,...ie.omit(e,["readOnly","content","ignoreNoWhiteSpaceStart"]),className:Te(x$.main,e.className,s?GLOBAL_ATTR_TITLE:"",{readOnly:e.readOnly}),"data-type":e.content.type,validateFirst:!0,validateTrigger:["onBlur","onChange"],rules:i,children:a(e.content,e.name)})}),Qq="_itemsCreated_ow91h_1",eW="_rowBox_ow91h_4",tW="_labelLength_ow91h_8",Qo={itemsCreated:Qq,rowBox:eW,labelLength:tW},rW="_advanced_search_content_775l0_1",nW="_disableBg_775l0_1",aW="_checkboxWidth_775l0_15",iW="_radioWidth_775l0_18",oW="_conditions_head_775l0_21",sW="_head1_775l0_29",uW="_head2_775l0_32",lW="_head3_775l0_35",cW="_head4_775l0_38",dW="_properties_box_775l0_41",fW="_className_tips_775l0_44",hW="_groupHeader_775l0_49",pW="_iconBtn_775l0_52",mW="_properties_item_775l0_61",gW="_left_tips_775l0_84",vW="_state_type_775l0_87",bW="_verification_775l0_100",yW="_verificationBorder_775l0_121",Ie={advanced_search_content:rW,disableBg:nW,checkboxWidth:aW,radioWidth:iW,conditions_head:oW,head1:sW,head2:uW,head3:lW,head4:cW,properties_box:dW,className_tips:fW,groupHeader:hW,iconBtn:pW,properties_item:mW,left_tips:gW,state_type:vW,verification:bW,verificationBorder:yW},_W="_shuttle_box_tufhg_1",wW="_transferBox_tufhg_4",xW="_selectNum_tufhg_7",jd={shuttle_box:_W,transferBox:wW,selectNum:xW},SW=e=>{const t=Br({dataSource:[],targetKeys:[],columns:[]}),r=l=>l&&ie.isString(l)&&l.includes("~#~")?D.jsx("div",{style:{width:"28px",height:"10px",backgroundColor:"#d9d9d9"}}):l;F.useEffect(()=>{t.dataSource=e.dataSource,t.targetKeys=e.targetKeys;let l=[];for(let u of e.columns)l.push({...u,ellipsis:!0,sorter:(c,m)=>{const p=u.dataIndex||"";return c[p]!=null&&m[p]!=null?ie.isString(c[p])&&ie.isString(m[p])?c[p].localeCompare(m[p]):ie.isNumber(c[p])&&ie.isNumber(m[p])?c[p]-m[p]:0:0},render:u.render?u.render:r});t.columns=l},[e.dataSource,e.targetKeys]);const n=({...l})=>D.jsx(Z.Transfer,{...l,rowKey:u=>u.id,children:({direction:u,filteredItems:c,onItemSelectAll:m,onItemSelect:p,selectedKeys:g})=>{const y={onSelectAll(x,E){const k=E.filter(w=>!w.disabled).map(({id:w})=>w),T=x?ie.difference(k,g):ie.difference(g,k);m(T,x)},onSelect({id:x},E){e.isRadio&&g.splice(0,1),p(x,E)},getCheckboxProps:x=>({disabled:x.name=="~#~"||x.number=="~#~"||x.empNo=="~#~"?!0:u=="left"?x.disabled:!1}),selectedRowKeys:g};return D.jsxs(D.Fragment,{children:[D.jsx(Z.Table,{rowSelection:{type:e.isRadio?"radio":"checkbox",...y},columns:t.columns,showSorterTooltip:!1,pagination:!1,dataSource:c,scroll:{y:301},style:{height:"338px"},size:"small",onRow:x=>({onClick:()=>{x.name=="~#~"||x.empNo=="~#~"||!x.disabled&&u==="left"&&(e.isRadio&&g.splice(0,1),p(x.id,!g.includes(x.id)))},onDoubleClick:()=>{if(!(x.name=="~#~"||x.empNo=="~#~")){if(u==="left")x.disabled||(e.isRadio&&(t.targetKeys=[]),t.targetKeys.unshift(x.id));else for(let E=0;E<t.targetKeys.length;E++)if(t.targetKeys[E]==x.id){t.targetKeys.splice(E,1);break}}}})}),u==="left"?D.jsxs("div",{className:jd.selectNum,children:[e.defaultPageSize!==50?`${Y("sys.label.selected",{placeholder:"已选{count}条",variate:{count:g.length}})}`:Y("sys.maxDisplay50",{placeholder:"最多显示50条"})," ",", ",Y("project.tab.plan.criticalPath.window.total",{placeholder:"共"}),c.length,Y("project.tab.plan.quantityDisplay.select",{placeholder:"条"})]}):D.jsxs("div",{className:jd.selectNum,children:[Y("sys.label.selected",{placeholder:"已选{count}条",variate:{count:g.length}}),",",Y("project.tab.plan.criticalPath.window.total",{placeholder:"共"}),c.length,Y("project.tab.plan.quantityDisplay.select",{placeholder:"条"})]})]})}}),a=l=>{e.isRadio?t.targetKeys=[l[0]]:t.targetKeys=l},i=async()=>{let l=[];for(let u=0;u<t.targetKeys.length;u++)for(let c=0;c<t.dataSource.length;c++)if(t.targetKeys[u]==t.dataSource[c].id){l.push(t.dataSource[c]);break}e.onSubmit&&e.onSubmit(l)},s=()=>{if(e.columns.length>0){let l=[Y("project.workflow.status",{placeholder:"状态"}),Y("sys.import.category",{placeholder:"分类"})];return Y("project.create.attr.verify.scheduledDate.input",{placeholder:"请输入{content}",variate:{content:ie.without(ie.map(e.columns,"title"),...l).join("、")}})}return Y("sys.enterSearch",{placeholder:"请输入搜索内容"})};return D.jsx(To,{className:jd.shuttle_box,modalTitle:e.title,okText:Y("project.tab.plan.details.window.save",{placeholder:"保存"}),width:850,visible:e.visible,onOk:()=>{i()},onCancel:()=>{e.onCancel&&e.onCancel()},children:D.jsx("div",{className:jd.transferBox,children:D.jsx(Ls,{spinning:e.loading,children:D.jsx(n,{dataSource:t.dataSource,targetKeys:t.targetKeys,showSearch:!0,locale:{searchPlaceholder:e.searchPlaceholder||s()},showSelectAll:!1,onChange:a,filterOption:(l,u)=>u.Name&&u.Name.indexOf(l)!==-1||u.EmpNo&&u.EmpNo.indexOf(l)!==-1||u.empNo&&u.empNo.indexOf(l)!==-1||u.email&&u.email.indexOf(l)!==-1||u.name&&u.name.indexOf(l)!==-1||u.workflowName&&u.workflowName.indexOf(l)!==-1||u.code&&String(u.code).indexOf(l)!==-1||u.description&&u.description.indexOf(l)!==-1})})})})},{RangePicker:Tx}=Z.DatePicker,{Option:ug}=Z.Select,{TreeNode:Ox}=Z.Tree,{confirm:Eee}=Z.Modal,CW=[{value:"and",label:Y("sys.query.builder.condit.and",{placeholder:"与"})},{value:"or",label:Y("sys.query.builder.condit.or",{placeholder:"或"})}],hC=F.forwardRef((e,t)=>{F.useRef();const r=F.useRef(null),n=F.useRef(null),a="YYYY-MM-DD HH:mm:ss",i={10002011:10001001,10002021:10001002,10002035:10001006,10002053:10001021,10002054:10001023,10002055:10001022},s=Br({1:[{value:"contain",label:Y("sys.condition.contains",{placeholder:"包含"})},{value:"!contain",label:Y("sys.condition.notContains",{placeholder:"不包含"})},{value:"start",label:Y("sys.condition.startsWith",{placeholder:"开始于"})},{value:"!start",label:Y("sys.condition.notStartsWith",{placeholder:"不开始于"})},{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],2:[{value:"contain",label:Y("sys.condition.contains",{placeholder:"包含"})},{value:"!contain",label:Y("sys.condition.notContains",{placeholder:"不包含"})},{value:"start",label:Y("sys.condition.startsWith",{placeholder:"开始于"})},{value:"!start",label:Y("sys.condition.notStartsWith",{placeholder:"不开始于"})},{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],3:[{value:"contain",label:Y("sys.condition.contains",{placeholder:"包含"})},{value:"!contain",label:Y("sys.condition.notContains",{placeholder:"不包含"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],4:[{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"gt",label:Y("sys.condition.greaterThan",{placeholder:"大于"})},{value:"ge",label:Y("sys.condition.greaterThanOrEquals",{placeholder:"大于等于"})},{value:"lt",label:Y("sys.condition.lessThan",{placeholder:"小于"})},{value:"le",label:Y("sys.condition.lessThanOrEquals",{placeholder:"小于等于"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],5:[[{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],[{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"in",label:Y("sys.condition.in",{placeholder:"在"})},{value:"!in",label:Y("sys.condition.notIn",{placeholder:"不在"})},{value:"contain",label:Y("sys.condition.contains",{placeholder:"包含"})},{value:"!contain",label:Y("sys.condition.notContains",{placeholder:"不包含"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],[{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"contain",label:Y("sys.condition.contains",{placeholder:"包含"})},{value:"!contain",label:Y("sys.condition.notContains",{placeholder:"不包含"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],[{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"contain",label:Y("sys.condition.contains",{placeholder:"包含"})},{value:"!contain",label:Y("sys.condition.notContains",{placeholder:"不包含"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}]],6:[{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"between",label:Y("sys.condition.in",{placeholder:"在"})},{value:"gt",label:Y("sys.condition.greaterThan",{placeholder:"大于"})},{value:"ge",label:Y("sys.condition.greaterThanOrEquals",{placeholder:"大于等于"})},{value:"lt",label:Y("sys.condition.lessThan",{placeholder:"小于"})},{value:"le",label:Y("sys.condition.lessThanOrEquals",{placeholder:"小于等于"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],7:[{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"gt",label:Y("sys.condition.greaterThan",{placeholder:"大于"})},{value:"ge",label:Y("sys.condition.greaterThanOrEquals",{placeholder:"大于等于"})},{value:"lt",label:Y("sys.condition.lessThan",{placeholder:"小于"})},{value:"le",label:Y("sys.condition.lessThanOrEquals",{placeholder:"小于等于"})}],8:[{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],9:[{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],10:[{value:"contain",label:Y("sys.condition.contains",{placeholder:"包含"})},{value:"!contain",label:Y("sys.condition.notContains",{placeholder:"不包含"})},{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],12:[{value:"contain",label:Y("sys.condition.contains",{placeholder:"包含"})},{value:"!contain",label:Y("sys.condition.notContains",{placeholder:"不包含"})},{value:"start",label:Y("sys.condition.startsWith",{placeholder:"开始于"})},{value:"!start",label:Y("sys.condition.notStartsWith",{placeholder:"不开始于"})},{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],13:[{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"gt",label:Y("sys.condition.greaterThan",{placeholder:"大于"})},{value:"ge",label:Y("sys.condition.greaterThanOrEquals",{placeholder:"大于等于"})},{value:"lt",label:Y("sys.condition.lessThan",{placeholder:"小于"})},{value:"le",label:Y("sys.condition.lessThanOrEquals",{placeholder:"小于等于"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}]}),l=["ProductRoleList","CategoryList","VersionList","ProductList","LifePhaseList","WorkflowList","WorkflowNodeList"],u=Br({verification:!1,useThrottle:!0,treeChoice:"",verifyRoute:!1,formCofing:{base_item_id:"",base_item_name:"",object_id:"",object_name:"",relations:[{join:"and",isGroup:!1,relation:[{attribute:{id:"",name:"",type:"",tab_code:"",operator:"",value:"",valueKey:[],valueTreeKey:[],attr_join:"and",routineData:[],forbidden:!0}}]}]}}),c=Br({routineData:[],treeData:[],treeDefine:[],treeDefineKey:[],treeIndex1:null,treeIndex2:null,treeLoading:!1,treeVisible:!1,treeCheckable:!1,titleName:"",dataSource:[],loading:!1,visibleTransfer:!1,targetKeys:[],isRadio:!1,isUserCode:"",department:!1,saveSearchVisible:!1,selectedKeys:""});F.useImperativeHandle(t,()=>({getValue:()=>u.formCofing,onVerification:C=>{u.verification=C},setCondition:(C,P)=>{P==0?(u.formCofing.base_item_id=C.value,u.formCofing.base_item_name=C.label):(u.formCofing.object_id=(C==null?void 0:C.value)||"",u.formCofing.object_name=(C==null?void 0:C.label)||"")},emptyCondition:C=>{C&&(u.formCofing.base_item_id="",u.formCofing.base_item_name="",u.formCofing.object_id="",u.formCofing.object_name=""),u.verification=!1,u.formCofing.relations=[{join:"and",isGroup:!1,relation:[{attribute:{id:"",name:"",type:"",tab_code:"",operator:"",value:"",valueKey:[],valueTreeKey:[],attr_join:"and",routineData:[],forbidden:!0}}]}]},setConditionValue:C=>{u.formCofing=C},searchBtn:()=>{m()},defaultValue:()=>{var P;const C=(P=e.typeData[0])==null?void 0:P.children.filter(M=>M.apicode==="Number"||M.apicode==="Name"||M.apicode==="Description")[0];u.formCofing.relations=[{join:"and",isGroup:!1,relation:[{attribute:{id:[e.typeData[0].value,C.id],name:`${e.typeData[0].label}/${C.name}`,lastSelected:C,type:C.valueType||"",rawType:C.valueType||"",tab_code:e.typeData[0].value,dataFrom:C.dataFrom||"",dataFromId:C.dataFromId||"",apicode:C.apicode,operator:"contain",value:"",valueKey:[],valueTreeKey:[],attr_join:"and",routineData:[],forbidden:!0}}]}]}}));const m=C=>{if(u.verification=!1,!u.formCofing.base_item_id){Z.message.warning(Y("sys.import.selectCategory",{placeholder:"请选择分类"}));return}let P=ie.cloneDeep(u.formCofing.relations);P.length==1&&(x(P),P=ie.compact(P));for(let[M,q]of P.entries())for(let L of q.relation){if(!L.attribute.name||!L.attribute.operator||L.attribute.operator!="null"&&L.attribute.operator!="!null"&&!L.attribute.value){u.verification=!0;return}M!=0&&(q.join=P[M-1].relation[P[M-1].relation.length-1].attribute.attr_join)}u.formCofing.base_item_id,u.formCofing.base_item_name,u.formCofing.object_id,u.formCofing.object_name},p=(C,P)=>C=="5"&&P?P.listCode==10005213?s[C][2]:!P.allowMultiple||P.apicode=="LifeCyclePhase"||P.apicode=="Category"?s[C][0]:P.listType=="0"?s[C][1]:P.listType=="2"?s[C][2]:s[C][3]:s[C],g=()=>{u.formCofing.relations[c.treeIndex1].relation[c.treeIndex2].attribute.value=c.treeDefine.join(","),u.formCofing.relations[c.treeIndex1].relation[c.treeIndex2].attribute.valueTreeKey=c.treeDefineKey,c.titleName="",c.treeVisible=!1},y=(C,P)=>P.some(M=>M.label&&M.label.toLowerCase().indexOf(C.toLowerCase())>-1),x=C=>C.map((P,M)=>(P.relation.forEach((q,L)=>{let N=q.attribute;!N.name&&!N.operator&&!N.value&&delete P.relation[L]}),P.relation=ie.compact(P.relation),P.relation.length==0&&delete C[M],P)),E=C=>{let P=[];if(C)for(let M of C)P.push({label:M.showName||M.name,value:M.id,disabled:!M.status});return P},k=C=>C.map(P=>P.children?D.jsx(Ox,{title:c.department?P.title:P.name,children:k(P.children)},P.id):D.jsx(Ox,{title:c.department?P.title:P.name},P.id)),T=(C,P)=>D.jsx(th,{highlightStyle:{color:"#F5325C",backgroundColor:"rgb(0, 0, 0, 0)",padding:"0"},searchWords:[P?P.toString():""],textToHighlight:C?C.toString():""}),w=()=>{n.current&&setTimeout(()=>{n.current.scroll({top:n.current.scrollTop+38,behavior:"smooth"})},100)},S=(C,P,M,q)=>{!M||M&&C.relation.length>1&&q==C.relation.length-1?u.formCofing.relations.splice(P+1,0,{join:"and",isGroup:!1,relation:[{attribute:{id:"",name:"",type:"",tab_code:"",operator:"",value:"",valueKey:[],valueTreeKey:[],attr_join:"and",routineData:[],forbidden:!0}}]}):u.formCofing.relations[P].relation.splice(q+1,0,{attribute:{id:"",name:"",type:"",tab_code:"",operator:"",value:"",valueKey:[],valueTreeKey:[],attr_join:"and",routineData:[],forbidden:!0}}),_(C),w()},f=C=>{u.formCofing.relations.splice(C+1,0,{join:"and",isGroup:!0,relation:[{attribute:{id:"",name:"",type:"",tab_code:"",operator:"",value:"",valueKey:[],valueTreeKey:[],attr_join:"and",routineData:[],forbidden:!0}}]}),w()},h=C=>{u.formCofing.relations.splice(C,1)},v=(C,P,M,q)=>{M&&C.relation.length>1?(C.relation.splice(q,1),_(C)):u.formCofing.relations.splice(P,1)},_=C=>{for(let P=0;P<C.relation.length;P++)C.relation[P].attribute.forbidden=!0,C.relation.length>1&&C.relation.length-1!=P&&(C.relation[P].attribute.forbidden=!1)},R=(C,P,M,q,L)=>{if(M&&(M.apicode=="OrgName"||M.apicode=="CreateUserDepartment"))return D.jsx(Z.Select,{className:`
332
+ ve.version="2.30.1";S$(Nt);ve.fn=be;ve.min=dB;ve.max=fB;ve.now=hB;ve.utc=va;ve.unix=BH;ve.months=UH;ve.isDate=pc;ve.locale=Ni;ve.invalid=lh;ve.duration=Qn;ve.isMoment=Xn;ve.weekdays=WH;ve.parseZone=HH;ve.localeData=ii;ve.isDuration=mf;ve.monthsShort=qH;ve.weekdaysMin=YH;ve.defineLocale=Tv;ve.updateLocale=Hz;ve.locales=Uz;ve.weekdaysShort=VH;ve.normalizeUnits=On;ve.relativeTimeRounding=_U;ve.relativeTimeThreshold=wU;ve.calendarFormat=jB;ve.prototype=be;ve.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const ki=class ki{static getAttrOf(t,r){return t.find(n=>(n.apicode||n.apiCode)==r)}static avoid0TypeConvert(t){return t===0?String(t):t}static generateUUID(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var r=Math.random()*16|0,n=t=="x"?r:r&3|8;return n.toString(16)})}static momentToRawData(t){if(ve.isMoment(t)){const r=t.creationData();return r==null?void 0:r.input}else return t}static tableRowHasChange(t){return t.dataType=="add"||t.dataType=="del"||ki.tableRowHasNewValue(t)}static tableRowHasNewValue(t){return!!t.newVal&&!!Object.values(t.newVal).length}static isAddTableRow(t){return t.dataType=="add"}static isDelTableRow(t){return t.dataType=="del"}static setTableRowAttrValue(t,r){t.newVal?Object.assign(t.newVal,r):t.newVal=r}static isMac(){return/macintosh|mac os x/i.test(navigator.userAgent)}static makeDestructurable(t,r){if(typeof Symbol<"u"){const n={...t};return Object.defineProperty(n,Symbol.iterator,{enumerable:!1,value(){let a=0;return{next:()=>({value:r[a++],done:a>r.length})}}}),n}else return Object.assign([...r],t)}static ArrayAttributeFlat(t,r="children",n){const a=[...t],i=[];for(;a.length;){const s=a.shift(),l=s[r];if(n==null||n(s),i.push(s),l!=null&&l.length)for(let u=l.length-1;u>=0;u--)a.unshift(l[u])}return i}static getTreeRelationNoRecursion({data:t,lookup:r,childrenKey:n="children"}){var m;const a=new Set;let i={parent:void 0,self:void 0,beforeSibling:[],afterSibling:[],index:void 0,stack:Array.from(a)};const s=new Map,l=new Map,u=new Map,c=[...t];for(;c.length;){const p=c.shift(),g=s.get(p)??t.findIndex(T=>T==p),y=l.get(p);y?a.add(y):a.clear();const x=y==null?void 0:y[n],E=r(p,g),k=p[n];if(E){i={parent:y,self:p,beforeSibling:(x||t).slice(0,g),afterSibling:(x||t).slice(g+1),index:g,stack:Array.from(a)};break}else if(k!=null&&k.length)for(let T=k.length-1;T>=0;T--){const w=k[T];c.unshift(k[T]),s.set(w,T),l.set(w,p),T==k.length-1&&u.set(w,()=>{var S;(S=u.get(p))==null||S(),a.delete(p)})}else(m=u.get(p))==null||m()}return i}static judgeParentIcon(t,r){if(t=="10001001")return"bluecube";if(t=="10001002")return"document-cube";if(t=="10001006")return"file-cube";if(Fi.isProject(t))return r||"icon"}};Tt(ki,"getLabelInOptions",t=>{const{value:r,options:n,adaptor:a}=t,i=Object.prototype.toString.call(r);if(!(c=>c!==""&&c!==void 0&&c!==null)(r))return"";let l="";i==="[object Array]"&&(l=[]);const u=c=>{for(let m=0;m<(c||[]).length;m++){const p=c[m][a?a.label:"label"],g=c[m][a?a.value:"value"];i==="[object Array]"?r.includes(g)&&l.push(p):r===g&&(l=p),c[m].children&&c[m].children.length&&u(c[m].children)}};return u(n),l}),Tt(ki,"transformArrayToMap",(t,r,n,a)=>{function i(s,l){return s=="autoGetId"&&(a!=null&&a.useAutoGetId)?As.isCustomAttr(l)?"id":"dataFromId":s}return t==null?void 0:t.reduce((s,l)=>{const u=i(r,l),c=i(n,l);return c?s[l[u]]=l[c]:s[l[u]]=l,s},{})}),Tt(ki,"autoTableHeight",(t=270)=>{var r=0;return window.innerHeight?r=window.innerHeight:document.body&&document.body.clientHeight&&(r=document.body.clientHeight),document.documentElement&&document.documentElement.clientHeight&&(r=document.documentElement.clientHeight),r-t}),Tt(ki,"renderBomTag",t=>{const r=s=>{const l=s.match(/\d+(\.\d+)?/g);return l?l[l.length-1]:""},n=s=>{let l=0;const u=c=>{var m=c.split("");return m.reverse()};for(let c=0;c<u(s).length&&u(s)[c].match(/\d/);c++)l=l+1;return s.substring(0,s.length-l)},a=s=>ie.sortBy(ie.uniq(s.split(",")),l=>Number(r(l))),i=Object.keys(ie.groupBy(a(t),s=>n(s))).map(s=>(u=>{var c=[],m=0;const p=u.sort((g,y)=>Number(r(g))-Number(r(y)));return p.forEach((g,y)=>{y===0?c[0]=[g]:Number(r(g))-Number(r(p[y-1]))===1?c[m].push(g):c[++m]=[g]}),c})(ie.groupBy(a(t),u=>n(u))[s]).map(u=>{if(u.length>1){const c=u.map(m=>Number(r(m)));return`${s}${ie.min(c)}-${ie.max(c)}`}else return u[0]}));return ie.flatten(i).join(",")}),Tt(ki,"tidyBomTag",(t,r)=>{t=t&&t.replace(/,/g,",");const n=t.split(",").map(u=>u.replace(/([^\d]+)(\d+)-\1(\d+)/,"$1$2-$3")).map(u=>{if(u.match(/^\S+\d+-\d+$/)){const c=u.substring(0,u.match(/\d+-\d+$/).index),m=[],p=Number(u.split(c)[1].split("-")[1]),g=p<1e3?p:1e3;for(let y=Number(u.split(c)[1].split("-")[0]);y<=g;y++)m.push(`${c}${y}`);return m.join(",")}else if(u.match(/^\S+\d+-\S+\d+$/)){const c=u.split("-")[0].substring(0,u.match(/\d/).index).toUpperCase(),m=u.split("-")[0].substring(u.match(/\d/).index,u.split("-")[0].length),p=u.split("-")[1].substring(0,u.match(/\d/).index).toUpperCase(),g=u.split("-")[1].substring(u.match(/\d/).index,u.split("-")[0].length);if(c!=p)return u;{const y=[],x=Number(g),E=x<1e3?x:1e3;for(let k=Number(m);k<=E;k++)y.push(`${c}${k}`);return y.join(",")}}else return u}).join(","),a=u=>{const c=u.match(/\d+(\.\d+)?/g);return c?c[c.length-1]:""},i=u=>{let c=0;const m=p=>{var g=p.split("");return g.reverse()};for(let p=0;p<m(u).length&&m(u)[p].match(/\d/);p++)c=c+1;return u.substring(0,u.length-c)},s=u=>ie.sortBy(ie.uniq(u.split(",")),c=>Number(a(c))),l=Object.values(ie.groupBy(s(n.toLocaleUpperCase()),u=>i(u))).map(u=>u.join(","));return l.length>1e3&&(r==null||r()),l.length>1e3?l.slice(0,1e3).join(","):l.join(",")});let vt=ki;const SU="_tableSelection_1xub0_1",CU="_sideBox_1xub0_36",EU="_tableFrame_1xub0_51",rg={tableSelection:SU,sideBox:CU,tableFrame:EU},kU="_sider_item_container_wnrm0_1",Xo={sider_item_container:kU},{TreeNode:fx}=Z.Tree,W4=e=>{const[t,r]=F.useState([]),[n,a]=F.useState([]),[i,s]=F.useState([]);zs(()=>{l()});const l=async()=>{a(e.treeResult||[]);const{result:c}=await e.getAttributeByTab({itemCode:e.itemCode,tabCode:"10002001",notInApiCode:"Unit,ProductModel,Product"}),m=c.records.filter(p=>["Number","Note","LifeCyclePhase","Category"].includes(p.apicode));e.onGetTreeFields&&e.onGetTreeFields(m)};F.useEffect(()=>{e.outIsSelected&&r([])},[e.outIsSelected]);const u=c=>c.map(p=>(p.title=D.jsxs("div",{className:Xo.treeListBox,children:[D.jsxs("div",{className:Xo.titleBox,style:{display:"flex",alignItems:"center"},children:[D.jsx(He,{type:p.icon=="leftbar-folder"?p.children&&p.children.length>0&&ie.includes(i,p.id)?"content-open2":"content-fold":p.icon,style:{fontSize:"16px",color:"#333"}}),D.jsx("div",{className:Xo.name,style:{marginLeft:"2px",whiteSpace:"nowrap"},title:p.name,children:D.jsx("span",{children:p.name})})]}),D.jsx("div",{className:Te(Xo.btnBox,Xo.onHover)})]},p.id),p.children?D.jsx(fx,{title:p.title,dataRef:p,children:u(p.children)},p.id):D.jsx(fx,{title:p.title},p.id)));return D.jsx("div",{className:Xo.sider_item_container,children:D.jsx(Z.Tree,{switcherIcon:D.jsx(He,{type:"xia-mian",style:{color:"#3C3C3C",cursor:"pointer"}}),expandedKeys:i,selectedKeys:t,onExpand:c=>{s(c)},onSelect:(c,m)=>{m.selected&&(r(c),e.onSelected&&e.onSelected(m.node.dataRef))},children:u(n)})})},TU="_main_1qtos_1",OU="_edit_cell_1qtos_23",AU="_update_style_1qtos_28",RU="_updated_style_1qtos_42",PU="_updated_redline_style_1qtos_61",DU="_table_footer_1qtos_349",MU="_loading_1qtos_361",zn={main:TU,edit_cell:OU,update_style:AU,updated_style:RU,updated_redline_style:PU,table_footer:DU,loading:MU},FU=0,ng=1,ag=2,V4=8,Zo=64,Nd=0,Y4=1,v1=typeof Symbol=="function"?Symbol.for("idx"):"$$idx";function NU(){return{vt_state:1,possible_hight_per_tr:-1,computed_h:0,re_computed:0,row_height:[],row_count:0,prev_row_count:0,_offset_top:0,_offset_head:0,_offset_tail:1,WH:0,top:0,left:0,evt:FU,end:!1,final_top:0,f_final_top:Y4,update_count:0}}function IU(e){Object.prototype.hasOwnProperty.call(e,"CLICK~__DIAGNOSIS__")||Object.defineProperty(e,"CLICK~__DIAGNOSIS__",{get(){console.debug("OoOoOoO DIAGNOSIS OoOoOoO");let t=0;for(let a=0;a<e.row_count;++a)t+=e.row_height[a];let r,n;t>e.computed_h?(r="color:rgb(15, 179, 9)",n="lower than expected"):t<e.computed_h?(r="color:rgb(202, 61, 81)",n="higher than expected"):(r="color:rgba(0, 0, 0, 0.85)",n="normal"),console.debug(`%c%d(%d)(${n})`,r,t,e.computed_h-t),console.debug("OoOoOoOoOoOoOOoOoOoOoOoOo")},configurable:!1,enumerable:!1})}function os(e,t){if(e.debug){const r=new Date,n=`${r.toLocaleTimeString()}.${r.getMilliseconds()}`;console.debug(`%c[${e.id}][${n}][${t}]`,"color:#a00",e)}}function LU(e){const t=e.target;return{target:{scrollTop:t.scrollTop,scrollLeft:t.scrollLeft},end:t.scrollHeight-t.clientHeight===Math.round(t.scrollTop),flag:V4}}const jU=ee.forwardRef(function(t,r){return D.jsx("table",{ref:r,...t})});function $U(e){return D.jsx("tbody",{...e})}const zU=ee.forwardRef(function(t,r){const[n,a]=F.useState(!1);return D.jsx("tr",{ref:r,...t})});function BU(e,t){const{row_height:r,row_count:n,overscanRowCount:a}=e;e._scroll_y=e.scroll.y,typeof e._scroll_y=="number"?e._y=e._scroll_y:(typeof e._scroll_y=="string"||console.assert(!1,"VT: did you forget to set `scroll.y`?"),e._y=e.wrap_inst.current.parentElement.offsetHeight),console.assert(e._y>=0);let i=0,s=0,l=0,u=0;if(t===-1&&n>0){for(s=n;s>0&&u<e._y;)u+=r[--s];return[0|s,0|n,0|e.computed_h-u]}for(;s<n&&i<t;++s)i+=r[s];for(l=s;l<n&&u<e._y;++l)u+=r[l];let c=a<0?0:a;for(;s>0&&c--;)i-=r[--s];return l+=a,l>n&&(l=n),[0|s,0|l,0|i]}function G4(e,t,r,n){e._offset_top=0|t,e._offset_head=0|r,e._offset_tail=0|n}function HU(e,t,r,n,a){e.top=t,e.left=r,e.evt=n,e.end=a}function UU(e,t){if(e.WH===t)return;e.WH=t;const r=e.wrap_inst.current.style;r.height=t?(r.maxHeight=t+"px",r.maxHeight):(r.maxHeight="unset",r.maxHeight),e.on_update_wrap_style()}function hx(e,t,r){if(!e.wrap_inst.current)return;const n=e.wrap_inst.current.parentElement;n.scrollTop=t,n.scrollLeft=Math.max(r,n.scrollLeft)}function K4(e,t){const r=()=>{os(e,"REPAINTING"),e.vt_state===4&&e.wrap_inst.current&&UU(e,e.computed_h),e.HND_PAINT=0};return t<0?window.requestAnimationFrame(r):window.setTimeout(r,t)}function ig(e){e.HND_PAINT>0||(e.HND_PAINT=K4(e,-1))}function X4(e,t,r,n){const a=t-r,i=new Array(a).fill(n);e.row_height=e.row_height.concat(i),e.computed_h+=a*n}function qU(e,t,r){if(t===0){e.computed_h=0,e.row_height.length=0,e.top=0;return}const n=e.row_height;let a=0;for(let i=t;i<r;++i)a+=n[i];e.computed_h-=a}function WU(e,t){e.re_computed=t-e.row_count,e.prev_row_count=e.row_count,e.row_count=t}const VU=(e,t)=>{const{style:r,context:n,...a}=e,i=F.useState(0),s=F.useRef(()=>{}),l=F.useMemo(()=>ee.createRef(),[]),u=F.useContext(n);F.useMemo(()=>{Object.assign(u,NU()),u.wrap_inst&&u.wrap_inst.current&&(u.wrap_inst.current.parentElement.onscroll=null),u.wrap_inst=l,u.top=u.initTop,u.on_update_wrap_style=()=>{u._y===0&&`${u._scroll_y}`.length&&g({flag:Zo,target:{scrollTop:u.top,scrollLeft:u.left}})},process.env.NODE_ENV==="development"&&IU(u)},[]);const c=F.useRef([]).current,m=F.useRef(0);let p;const g=F.useCallback(w=>{if(u.vt_state===4){if(w&&(c.push(w),u.f_final_top===Nd))return w.flag=Zo,p(0);c.length&&(m.current&&cancelAnimationFrame(m.current),m.current=requestAnimationFrame(p))}},[]),y=F.useCallback(w=>{g(LU(w))},[]);p=F.useCallback(w=>{if(u.vt_state!==4)return;const S=c;let f;if(!S.length)return;f=S.pop();let h=f.target.scrollTop,v=f.target.scrollLeft;const _=f.flag;os(u,`raf top: ${h}, left: ${v}`);const R=BU(u,u.f_final_top===Nd?u.final_top:h),C=R[0],P=R[1],M=R[2],q=u._offset_head,L=u._offset_tail,N=u._offset_top;let j;switch(_){case ng:os(u,"SCROLLEVT_INIT"),j=!1;break;case Zo:os(u,"SCROLLEVT_BY_HOOK"),C===q&&P===L&&M===N?(u.f_final_top=Y4,u.final_top===-1&&(h=u.computed_h-u._y),j=!0):(u.final_top===-1&&(h=M),j=!1);break;case ag:if(os(u,"SCROLLEVT_RECOMPUTE"),C===q&&P===L&&M===N){m.current=0,S.length&&g(null);return}j=!1;break;case V4:if(os(u,"SCROLLEVT_NATIVE"),m.current=0,S.length=0,u.onScroll&&u.onScroll({top:h,left:v,isEnd:f.end}),C===q&&P===L&&M===N)return;j=f.end;break}G4(u,M,C,P),HU(u,h,v,_,j),i[1](++u.update_count)},[]),F.useImperativeHandle(t,()=>{const w=S=>{u.f_final_top=Nd,u.final_top=S,g({target:{scrollTop:S,scrollLeft:-1},flag:Zo})};return{scrollTo:S=>{s.current=()=>w(S),s.current()},scrollToIndex:S=>{s.current=()=>{S>u.row_count-1&&(S=u.row_count-1),S<0&&(S=0);let f=0;for(let h=0;h<S;++h)f+=u.row_height[h];w(f)},s.current()}}},[]),F.useEffect(()=>{u.wrap_inst.current.parentElement.onscroll=y},[l]),F.useEffect(()=>{g({flag:Zo,target:{scrollLeft:u.left,scrollTop:u.top}})},[u.scroll.y]),F.useEffect(()=>{switch(u.evt){case Zo:u.f_final_top===Nd?s.current():hx(u,u.top,u.left);break;case ng:case ag:hx(u,u.top,u.left),c.length&&p(0);break}},[i[0]]),F.useEffect(()=>{switch(u.vt_state){case 1:break;case 2:u.vt_state=4,g({target:{scrollTop:u.top,scrollLeft:0},flag:ng});break;case 4:u.re_computed!==0&&(u.re_computed=0,g({target:{scrollTop:u.top,scrollLeft:u.left},flag:ag}));break}}),r.position="relative",r.top=u._offset_top;const{width:x,...E}=r,k=F.useMemo(()=>({width:x,minWidth:"100%",position:"relative",transform:"matrix(1, 0, 0, 1, 0, 0)"}),[x]),T=u.components.table;return D.jsx("div",{ref:l,style:k,children:D.jsx(n.Provider,{value:{...u},children:D.jsx(T,{...a,style:E})})})},YU=e=>{const{children:t,ctx:r,...n}=e,a=t[0],i=t[1],s=r.components.body.wrapper;let l=Array.isArray(i)?i.length:0,{_offset_head:u,_offset_tail:c}=r,m=[];switch(r.vt_state){case 1:l>=0&&(console.assert(u===0),console.assert(c===1),Array.isArray(i)?(m=i.slice(u,c),m[0].props.record[v1]=0):m=i,r.re_computed=l,r.prev_row_count=l,r.row_count=l);break;case 4:{if(c>l){const g=c-l;c-=g,u-=g,u<0&&(u=0),c<0&&(c=0),G4(r,r._offset_top,u,c)}r.row_count!==l&&WU(r,l),l=r.row_count;const p=r.prev_row_count;if(l<p)qU(r,l,p);else if(l>p){const g=r.row_height;l-g.length>0?X4(r,l,g.length,r.possible_hight_per_tr):(g.fill(r.possible_hight_per_tr,p,l),r.computed_h+=r.possible_hight_per_tr*(l-p))}if(l){let g=u;m=i.slice(g,c),m.forEach(y=>y.props.record[v1]=g++)}else m=i;r.prev_row_count=r.row_count}break;case 2:console.assert(!1);break}return D.jsxs(s,{...n,children:[a,m]})},GU=e=>{const t=ee.createRef(),{ctx:r,...n}=e,a=e.children,i=r.components.body.row;if(!Array.isArray(a))return D.jsx(i,{...n,children:a});const s=a[0].props,l=s.record[v1],u=F.useRef(l),c=F.useMemo(()=>`.${s.prefixCls}-expanded-row`,[s.prefixCls]);return F.useEffect(()=>(r.vt_state===4?ig(r):(console.assert(r.vt_state===1),r.vt_state=2,r.possible_hight_per_tr=t.current.offsetHeight,X4(r,r.row_count,0,r.possible_hight_per_tr),K4(r,16)),()=>ig(r)),[]),F.useEffect(()=>{const m=t.current;let p=m.offsetHeight,g=m.nextSibling;for(;g&&g.matches(c);)p+=g.offsetHeight,g=g.nextSibling;const y=r.row_height[l],x=r.row_height[u.current];r.computed_h-=y,r.computed_h+=x,r.computed_h+=p-x,r.row_height[l]=p,ig(r)}),D.jsx(i,{...n,ref:t})};function Z4(e,t){const{table:r,body:n,header:a}=t;e.components.body={...e.components.body,...n},n&&n.cell&&(e._vtcomponents.body.cell=n.cell),a&&(e.components.header=a,e._vtcomponents.header=a),r&&(e.components.table=r)}function KU(e,t){const r=F.useRef(ee.createContext({})).current,n=F.useContext(r),a=F.useRef({scrollTo:i=>{},scrollToIndex:i=>{}});return F.useMemo(()=>Object.assign(n,{id:(+new Date).toString(36).slice(4),initTop:0,overscanRowCount:20,debug:!1,ref:a},e()),t),F.useMemo(()=>{const i=ee.forwardRef(VU);n._vtcomponents={table:s=>D.jsx(i,{...s,context:r,ref:n.ref}),body:{wrapper:s=>D.jsx(r.Consumer,{children:()=>D.jsx(YU,{...s,ctx:n})}),row:s=>D.jsx(GU,{...s,ctx:n})}},n.components={},Z4(n,{table:jU,body:{wrapper:$U,row:zU}}),n.vt_state=1},[]),n}const px=1,XU=2;(function(){if((typeof window=="object"&&window instanceof Window?px:XU)&px&&!Object.hasOwnProperty.call(window,"requestAnimationFrame")&&!window.requestAnimationFrame)throw new Error("Please using the modern browers or appropriate polyfill!")})();function ZU(e,t){const r=KU(e,t||[]);return[r._vtcomponents,n=>Z4(r,n),r.ref]}const JU=({hideFooter:e,contentRef:t,tableRef:r,scroll:n,fullScreenMinusHeight:a,scrollUpdate:i,onTableHeightChange:s},l)=>{const[u,c]=F.useState(0),m=xn(n);return F.useEffect(()=>{const p=()=>{var x,E,k;const y=(T=>{for(var w=T.offsetTop,S=T.offsetParent;S!==null;)w+=S.offsetTop,S=S.offsetParent;return w})(t.current);if(r.current){const T=t.current.querySelectorAll(".frontend-table-body")[0].getElementsByTagName("div")[0],w=t.current.querySelectorAll(".frontend-table-body")[0],S=34+(e?0:15);if(T){const f=vt.autoTableHeight(l?S:y+S),h=f-(a||0);n!=null&&n.y?i?i==null||i(l,h):(c(l?h:Number((x=m.current)==null?void 0:x.y)),T.style.minHeight=(l?h:Number((E=m.current)==null?void 0:E.y))-10+"px",w.style.minHeight=(l?h:Number((k=m.current)==null?void 0:k.y))+"px"):(c(l?h:f),T.style.minHeight=(l?h:f)-10+"px",w.style.minHeight=(l?h:f)+"px")}}};return p(),window.addEventListener("resize",p),()=>{window.removeEventListener("resize",p)}},[l,n]),F.useEffect(()=>{s==null||s(u)},[u]),u};var pl={exports:{}},ml={},Id={},mx;function QU(){if(mx)return Id;mx=1,Id.__esModule=!0,Id.cloneElement=l;var e=t(F);function t(u){return u&&u.__esModule?u:{default:u}}function r(u,c){var m=Object.keys(u);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(u);c&&(p=p.filter(function(g){return Object.getOwnPropertyDescriptor(u,g).enumerable})),m.push.apply(m,p)}return m}function n(u){for(var c=1;c<arguments.length;c++){var m=arguments[c]!=null?arguments[c]:{};c%2?r(Object(m),!0).forEach(function(p){a(u,p,m[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(m)):r(Object(m)).forEach(function(p){Object.defineProperty(u,p,Object.getOwnPropertyDescriptor(m,p))})}return u}function a(u,c,m){return c=i(c),c in u?Object.defineProperty(u,c,{value:m,enumerable:!0,configurable:!0,writable:!0}):u[c]=m,u}function i(u){var c=s(u,"string");return typeof c=="symbol"?c:String(c)}function s(u,c){if(typeof u!="object"||u===null)return u;var m=u[Symbol.toPrimitive];if(m!==void 0){var p=m.call(u,c);if(typeof p!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return(c==="string"?String:Number)(u)}function l(u,c){return c.style&&u.props.style&&(c.style=n(n({},u.props.style),c.style)),c.className&&u.props.className&&(c.className=u.props.className+" "+c.className),e.default.cloneElement(u,c)}return Id}var gl={},gx;function J4(){if(gx)return gl;gx=1,gl.__esModule=!0,gl.resizableProps=void 0;var e=t(fc());hv();function t(n){return n&&n.__esModule?n:{default:n}}var r={axis:e.default.oneOf(["both","x","y","none"]),className:e.default.string,children:e.default.element.isRequired,draggableOpts:e.default.shape({allowAnyClick:e.default.bool,cancel:e.default.string,children:e.default.node,disabled:e.default.bool,enableUserSelectHack:e.default.bool,offsetParent:e.default.node,grid:e.default.arrayOf(e.default.number),handle:e.default.string,nodeRef:e.default.object,onStart:e.default.func,onDrag:e.default.func,onStop:e.default.func,onMouseDown:e.default.func,scale:e.default.number}),height:function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];var l=i[0];if(l.axis==="both"||l.axis==="y"){var u;return(u=e.default.number).isRequired.apply(u,i)}return e.default.number.apply(e.default,i)},handle:e.default.oneOfType([e.default.node,e.default.func]),handleSize:e.default.arrayOf(e.default.number),lockAspectRatio:e.default.bool,maxConstraints:e.default.arrayOf(e.default.number),minConstraints:e.default.arrayOf(e.default.number),onResizeStop:e.default.func,onResizeStart:e.default.func,onResize:e.default.func,resizeHandles:e.default.arrayOf(e.default.oneOf(["s","w","e","n","sw","nw","se","ne"])),transformScale:e.default.number,width:function(){for(var a=arguments.length,i=new Array(a),s=0;s<a;s++)i[s]=arguments[s];var l=i[0];if(l.axis==="both"||l.axis==="x"){var u;return(u=e.default.number).isRequired.apply(u,i)}return e.default.number.apply(e.default,i)}};return gl.resizableProps=r,gl}var vx;function Q4(){if(vx)return ml;vx=1,ml.__esModule=!0,ml.default=void 0;var e=s(F),t=hv(),r=QU(),n=J4(),a=["children","className","draggableOpts","width","height","handle","handleSize","lockAspectRatio","axis","minConstraints","maxConstraints","onResize","onResizeStop","onResizeStart","resizeHandles","transformScale"];function i(T){if(typeof WeakMap!="function")return null;var w=new WeakMap,S=new WeakMap;return(i=function(h){return h?S:w})(T)}function s(T,w){if(T&&T.__esModule)return T;if(T===null||typeof T!="object"&&typeof T!="function")return{default:T};var S=i(w);if(S&&S.has(T))return S.get(T);var f={},h=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var v in T)if(v!=="default"&&Object.prototype.hasOwnProperty.call(T,v)){var _=h?Object.getOwnPropertyDescriptor(T,v):null;_&&(_.get||_.set)?Object.defineProperty(f,v,_):f[v]=T[v]}return f.default=T,S&&S.set(T,f),f}function l(){return l=Object.assign?Object.assign.bind():function(T){for(var w=1;w<arguments.length;w++){var S=arguments[w];for(var f in S)Object.prototype.hasOwnProperty.call(S,f)&&(T[f]=S[f])}return T},l.apply(this,arguments)}function u(T,w){if(T==null)return{};var S={},f=Object.keys(T),h,v;for(v=0;v<f.length;v++)h=f[v],!(w.indexOf(h)>=0)&&(S[h]=T[h]);return S}function c(T,w){var S=Object.keys(T);if(Object.getOwnPropertySymbols){var f=Object.getOwnPropertySymbols(T);w&&(f=f.filter(function(h){return Object.getOwnPropertyDescriptor(T,h).enumerable})),S.push.apply(S,f)}return S}function m(T){for(var w=1;w<arguments.length;w++){var S=arguments[w]!=null?arguments[w]:{};w%2?c(Object(S),!0).forEach(function(f){p(T,f,S[f])}):Object.getOwnPropertyDescriptors?Object.defineProperties(T,Object.getOwnPropertyDescriptors(S)):c(Object(S)).forEach(function(f){Object.defineProperty(T,f,Object.getOwnPropertyDescriptor(S,f))})}return T}function p(T,w,S){return w=g(w),w in T?Object.defineProperty(T,w,{value:S,enumerable:!0,configurable:!0,writable:!0}):T[w]=S,T}function g(T){var w=y(T,"string");return typeof w=="symbol"?w:String(w)}function y(T,w){if(typeof T!="object"||T===null)return T;var S=T[Symbol.toPrimitive];if(S!==void 0){var f=S.call(T,w);if(typeof f!="object")return f;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(T)}function x(T,w){T.prototype=Object.create(w.prototype),T.prototype.constructor=T,E(T,w)}function E(T,w){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(f,h){return f.__proto__=h,f},E(T,w)}var k=function(T){x(w,T);function w(){for(var f,h=arguments.length,v=new Array(h),_=0;_<h;_++)v[_]=arguments[_];return f=T.call.apply(T,[this].concat(v))||this,f.handleRefs={},f.lastHandleRect=null,f.slack=null,f}var S=w.prototype;return S.componentWillUnmount=function(){this.resetData()},S.resetData=function(){this.lastHandleRect=this.slack=null},S.runConstraints=function(h,v){var _=this.props,R=_.minConstraints,C=_.maxConstraints,P=_.lockAspectRatio;if(!R&&!C&&!P)return[h,v];if(P){var M=this.props.width/this.props.height,q=h-this.props.width,L=v-this.props.height;Math.abs(q)>Math.abs(L*M)?v=h/M:h=v*M}var N=h,j=v,O=this.slack||[0,0],I=O[0],z=O[1];return h+=I,v+=z,R&&(h=Math.max(R[0],h),v=Math.max(R[1],v)),C&&(h=Math.min(C[0],h),v=Math.min(C[1],v)),this.slack=[I+(N-h),z+(j-v)],[h,v]},S.resizeHandler=function(h,v){var _=this;return function(R,C){var P=C.node,M=C.deltaX,q=C.deltaY;h==="onResizeStart"&&_.resetData();var L=(_.props.axis==="both"||_.props.axis==="x")&&v!=="n"&&v!=="s",N=(_.props.axis==="both"||_.props.axis==="y")&&v!=="e"&&v!=="w";if(!(!L&&!N)){var j=v[0],O=v[v.length-1],I=P.getBoundingClientRect();if(_.lastHandleRect!=null){if(O==="w"){var z=I.left-_.lastHandleRect.left;M+=z}if(j==="n"){var B=I.top-_.lastHandleRect.top;q+=B}}_.lastHandleRect=I,O==="w"&&(M=-M),j==="n"&&(q=-q);var H=_.props.width+(L?M/_.props.transformScale:0),U=_.props.height+(N?q/_.props.transformScale:0),J=_.runConstraints(H,U);H=J[0],U=J[1];var re=H!==_.props.width||U!==_.props.height,ne=typeof _.props[h]=="function"?_.props[h]:null,se=h==="onResize"&&!re;ne&&!se&&(R.persist==null||R.persist(),ne(R,{node:P,size:{width:H,height:U},handle:v})),h==="onResizeStop"&&_.resetData()}}},S.renderResizeHandle=function(h,v){var _=this.props.handle;if(!_)return e.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+h,ref:v});if(typeof _=="function")return _(h,v);var R=typeof _.type=="string",C=m({ref:v},R?{}:{handleAxis:h});return e.cloneElement(_,C)},S.render=function(){var h=this,v=this.props,_=v.children,R=v.className,C=v.draggableOpts;v.width,v.height,v.handle,v.handleSize,v.lockAspectRatio,v.axis,v.minConstraints,v.maxConstraints,v.onResize,v.onResizeStop,v.onResizeStart;var P=v.resizeHandles;v.transformScale;var M=u(v,a);return(0,r.cloneElement)(_,m(m({},M),{},{className:(R?R+" ":"")+"react-resizable",children:[].concat(_.props.children,P.map(function(q){var L,N=(L=h.handleRefs[q])!=null?L:h.handleRefs[q]=e.createRef();return e.createElement(t.DraggableCore,l({},C,{nodeRef:N,key:"resizableHandle-"+q,onStop:h.resizeHandler("onResizeStop",q),onStart:h.resizeHandler("onResizeStart",q),onDrag:h.resizeHandler("onResize",q)}),h.renderResizeHandle(q,N))}))}))},w}(e.Component);return ml.default=k,k.propTypes=n.resizableProps,k.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1},ml}var vl={},bx;function eq(){if(bx)return vl;bx=1,vl.__esModule=!0,vl.default=void 0;var e=l(F),t=i(fc()),r=i(Q4()),n=J4(),a=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function i(w){return w&&w.__esModule?w:{default:w}}function s(w){if(typeof WeakMap!="function")return null;var S=new WeakMap,f=new WeakMap;return(s=function(v){return v?f:S})(w)}function l(w,S){if(w&&w.__esModule)return w;if(w===null||typeof w!="object"&&typeof w!="function")return{default:w};var f=s(S);if(f&&f.has(w))return f.get(w);var h={},v=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var _ in w)if(_!=="default"&&Object.prototype.hasOwnProperty.call(w,_)){var R=v?Object.getOwnPropertyDescriptor(w,_):null;R&&(R.get||R.set)?Object.defineProperty(h,_,R):h[_]=w[_]}return h.default=w,f&&f.set(w,h),h}function u(){return u=Object.assign?Object.assign.bind():function(w){for(var S=1;S<arguments.length;S++){var f=arguments[S];for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&(w[h]=f[h])}return w},u.apply(this,arguments)}function c(w,S){var f=Object.keys(w);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(w);S&&(h=h.filter(function(v){return Object.getOwnPropertyDescriptor(w,v).enumerable})),f.push.apply(f,h)}return f}function m(w){for(var S=1;S<arguments.length;S++){var f=arguments[S]!=null?arguments[S]:{};S%2?c(Object(f),!0).forEach(function(h){p(w,h,f[h])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(f)):c(Object(f)).forEach(function(h){Object.defineProperty(w,h,Object.getOwnPropertyDescriptor(f,h))})}return w}function p(w,S,f){return S=g(S),S in w?Object.defineProperty(w,S,{value:f,enumerable:!0,configurable:!0,writable:!0}):w[S]=f,w}function g(w){var S=y(w,"string");return typeof S=="symbol"?S:String(S)}function y(w,S){if(typeof w!="object"||w===null)return w;var f=w[Symbol.toPrimitive];if(f!==void 0){var h=f.call(w,S);if(typeof h!="object")return h;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(w)}function x(w,S){if(w==null)return{};var f={},h=Object.keys(w),v,_;for(_=0;_<h.length;_++)v=h[_],!(S.indexOf(v)>=0)&&(f[v]=w[v]);return f}function E(w,S){w.prototype=Object.create(S.prototype),w.prototype.constructor=w,k(w,S)}function k(w,S){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(h,v){return h.__proto__=v,h},k(w,S)}var T=function(w){E(S,w);function S(){for(var h,v=arguments.length,_=new Array(v),R=0;R<v;R++)_[R]=arguments[R];return h=w.call.apply(w,[this].concat(_))||this,h.state={width:h.props.width,height:h.props.height,propsWidth:h.props.width,propsHeight:h.props.height},h.onResize=function(C,P){var M=P.size;h.props.onResize?(C.persist==null||C.persist(),h.setState(M,function(){return h.props.onResize&&h.props.onResize(C,P)})):h.setState(M)},h}S.getDerivedStateFromProps=function(v,_){return _.propsWidth!==v.width||_.propsHeight!==v.height?{width:v.width,height:v.height,propsWidth:v.width,propsHeight:v.height}:null};var f=S.prototype;return f.render=function(){var v=this.props,_=v.handle,R=v.handleSize;v.onResize;var C=v.onResizeStart,P=v.onResizeStop,M=v.draggableOpts,q=v.minConstraints,L=v.maxConstraints,N=v.lockAspectRatio,j=v.axis;v.width,v.height;var O=v.resizeHandles,I=v.style,z=v.transformScale,B=x(v,a);return e.createElement(r.default,{axis:j,draggableOpts:M,handle:_,handleSize:R,height:this.state.height,lockAspectRatio:N,maxConstraints:L,minConstraints:q,onResizeStart:C,onResize:this.onResize,onResizeStop:P,resizeHandles:O,transformScale:z,width:this.state.width},e.createElement("div",u({},B,{style:m(m({},I),{},{width:this.state.width+"px",height:this.state.height+"px"})})))},S}(e.Component);return vl.default=T,T.propTypes=m(m({},n.resizableProps),{},{children:t.default.element}),vl}var yx;function tq(){return yx||(yx=1,pl.exports=function(){throw new Error("Don't instantiate Resizable directly! Use require('react-resizable').Resizable")},pl.exports.Resizable=Q4().default,pl.exports.ResizableBox=eq().default),pl.exports}var rq=tq();const nq=e=>{const{onResizeOver:t,onResizeStop:r,trulyHeight:n,onResize:a,width:i,onClick:s,required:l,editable:u,formitem:c,dataIndex:m,...p}=e,g=F.useRef(),y=()=>{const S=u?c&&c.props&&c.props.disabled:!0;if(!S&&l)return{fontStyle:"italic",fontWeight:"400",color:"#000000"};if(S&&l)return{fontWeight:"400"};if(!S&&!l)return{fontStyle:"italic",fontWeight:"400",color:"#000000"};if(S&&!l)return{fontWeight:"400"}},x=Br({resizing:!1}),[E,k]=F.useState(0);F.useEffect(()=>{document.querySelectorAll(".react-resizable .react-resizable-handle").forEach(f=>f.addEventListener("click",h=>!1))},[]);const[T,w]=F.useState(0);return!i||m==="id"?D.jsx("th",{...p,onClick:s,style:{...p.style,...y()},onKeyDown:()=>{},className:`${p.className} ${l?"frontend-table-column-required":""}`}):D.jsx(rq.Resizable,{axis:"x",width:i+T,height:0,handle:D.jsx("span",{onClick:S=>{S.stopPropagation(),S.preventDefault()},className:Te(["react-resizable-handle",T&&"active"])}),onResize:(S,{size:f,...h})=>{const v=document.getElementById("table-resize-handle");if(v){const _=document.getElementById(`table_key_${e.tableKey}`);S.pageX>_.getBoundingClientRect().left+_.getBoundingClientRect().width||S.pageX<_.getBoundingClientRect().left?v.style.width="0px":(v.style.width="1px",v.style.background="#0563B2",v.style.zIndex="9999",v.style.top=`${h.node.getBoundingClientRect().top}px`,v.style.position="fixed",v.style.height=`${n}px`,v.style.left=`${S.pageX}px`)}t(S),x.resizing=!0,w(f.width-i)},onResizeStop:(...S)=>{var f;S[0].stopPropagation(),(f=document.getElementById("table-resize-handle"))==null||f.remove(),r(),w(0),a(...S),setTimeout(()=>{x.resizing=!1})},onResizeStart:S=>{document.getElementById(`table_key_${e.tableKey}`);const f=document.createElement("div");f.id="table-resize-handle",document.body.appendChild(f),x.resizing=!0,S.stopPropagation()},draggableOpts:{enableUserSelectHack:!1},children:D.jsx("th",{ref:g,onClick:(...S)=>{!x.resizing&&s&&s(...S)},...p,style:{...p.style,...y()},onKeyDown:()=>{},className:`${p.className} ${l?"frontend-table-column-required":""}`})})};function Ql(){return Ql=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ql.apply(this,arguments)}function eC(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i<n.length;i++)a=n[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}var tC=F.createContext({});function aq(){return F.useContext(tC)}var iq=function(t){return F.createElement(tC.Provider,{value:t.refTracker},t.children)};function oq(){var e=new Map;return{on:function(r,n){var a;return e.has(r)?(a=e.get(r))==null||a.add(n):e.set(r,new Set([n])),this},off:function(r,n){return n?e.get(r).delete(n):e.delete(r),this},emit:function(r,n){if(process.env.NODE!=="production"){var a=r;!e.has(r)&&a!==0&&console.error("It seems that the menu you are trying to display is not renderer or you have a menu id mismatch.","You used the menu id: "+r)}return e.has(r)&&e.get(r).forEach(function(i){i(n)}),this}}}var zf=oq();function sq(e){var t=F.useRef();return F.useEffect(function(){t.current=e},[e]),t.current}function uq(){return F.useRef(new Map).current}var _x={show:function(t){var r=t.id,n=t.event,a=t.props,i=t.position;n.preventDefault&&n.preventDefault(),zf.emit(0).emit(r,{event:n.nativeEvent||n,props:a,position:i})},hideAll:function(){zf.emit(0)}};function lq(e){return{show:function(r,n){process.env.NODE_ENV==="development"&&!(e!=null&&e.id)&&!(n!=null&&n.id)&&console.error("You need to provide an id when initializing the hook `useContextMenu({ id: 'your id' })` or when you display the menu `show(e, { id: 'your id' })`. The later is used to override the one defined during initialization."),_x.show({id:(n==null?void 0:n.id)||(e==null?void 0:e.id),props:(n==null?void 0:n.props)||(e==null?void 0:e.props),event:r,position:n==null?void 0:n.position})},hideAll:function(){_x.hideAll()}}}function cq(){var e=new Map,t,r,n,a,i=!1;function s(E){a=E,t=-1,n=!0}function l(){a[t].node.focus()}function u(){return t>=0&&a[t].isSubmenu}function c(){return Array.from(a[t].submenuRefTracker.values())}function m(){return t===-1?(p(),!1):!0}function p(){t+1<a.length?t++:t+1===a.length&&(t=0),i&&x(),l()}function g(){t===-1||t===0?t=a.length-1:t-1<a.length&&t--,i&&x(),l()}function y(){if(m()&&u()){var E=c(),k=a[t].node;return e.set(k,{isRoot:n,focusedIndex:t,parentNode:r||k,items:a}),k.classList.add("react-contexify__submenu--is-open"),r=k,E.length>0?(t=0,a=E):i=!0,n=!1,l(),!0}return!1}function x(){if(m()&&!n){var E=e.get(r),k=E.isRoot,T=E.items,w=E.focusedIndex,S=E.parentNode;r.classList.remove("react-contexify__submenu--is-open"),a=T,r=S,k&&(n=!0,e.clear()),i||(t=w,l())}}return{init:s,moveDown:p,moveUp:g,openSubmenu:y,closeSubmenu:x}}var b1=function(){};function rC(e){return typeof e=="function"}function nC(e){return typeof e=="string"}function dq(e){return e.type==="touchend"}function fq(e,t){return F.Children.map(F.Children.toArray(e).filter(Boolean),function(r){return F.cloneElement(r,t)})}function hq(e){var t={x:0,y:0};return dq(e)&&e.changedTouches&&e.changedTouches.length>0?(t.x=e.changedTouches[0].clientX,t.y=e.changedTouches[0].clientY):(t.x=e.clientX,t.y=e.clientY),(!t.x||t.x<0)&&(t.x=0),(!t.y||t.y<0)&&(t.y=0),t}function wx(e,t){return rC(e)?e(t):e}function pq(e){return!!(e&&(nC(e)||"exit"in e&&e.exit))}function mq(e,t){return rC(t)?Ql({},e,t(e)):Ql({},e,t)}var gq=function(t){var r,n=t.id,a=t.theme,i=t.style,s=t.className,l=t.children,u=t.animation,c=u===void 0?"scale":u,m=t.onHidden,p=m===void 0?b1:m,g=t.onShown,y=g===void 0?b1:g,x=eC(t,["id","theme","style","className","children","animation","onHidden","onShown"]),E=F.useReducer(mq,{x:0,y:0,visible:!1,triggerEvent:{},propsFromTrigger:null,willLeave:!1}),k=E[0],T=E[1],w=F.useRef(null),S=F.useRef(!1),f=sq(k.visible),h=uq(),v=F.useState(function(){return cq()}),_=v[0];F.useEffect(function(){return S.current=!0,zf.on(n,R).on(0,C),function(){zf.off(n,R).off(0,C)}},[n]),F.useEffect(function(){S.current&&k.visible!==f&&(k.visible?y():p())},[k.visible,p,y]),F.useEffect(function(){k.visible?_.init(Array.from(h.values())):h.clear()},[k.visible,_,h]),F.useEffect(function(){if(k.visible){var H=window,U=H.innerWidth,J=H.innerHeight,re=w.current,ne=re.offsetWidth,se=re.offsetHeight,ce=k.x,le=k.y;ce+ne>U&&(ce-=ce+ne-U),le+se>J&&(le-=le+se-J),T({x:ce,y:le})}},[k.visible]),F.useEffect(function(){function H(U){switch(U.preventDefault(),U.key){case"Enter":_.openSubmenu()||C();break;case"Escape":C();break;case"ArrowUp":_.moveUp();break;case"ArrowDown":_.moveDown();break;case"ArrowRight":_.openSubmenu();break;case"ArrowLeft":_.closeSubmenu();break}}return k.visible&&(window.addEventListener("resize",C),window.addEventListener("contextmenu",C),window.addEventListener("click",C),window.addEventListener("scroll",C),window.addEventListener("keydown",H),process.env.NODE_ENV!=="development"&&window.addEventListener("blur",C)),function(){window.removeEventListener("resize",C),window.removeEventListener("contextmenu",C),window.removeEventListener("click",C),window.removeEventListener("scroll",C),window.removeEventListener("keydown",H),process.env.NODE_ENV!=="development"&&window.removeEventListener("blur",C)}},[k.visible,_]);function R(H){var U=H.event,J=H.props,re=H.position;U.stopPropagation();var ne=re||hq(U),se=ne.x,ce=ne.y;setTimeout(function(){T({visible:!0,willLeave:!1,x:se,y:ce,triggerEvent:U,propsFromTrigger:J})},0)}function C(H){var U=H;typeof U<"u"&&(U.button===2||U.ctrlKey===!0)&&U.type!=="contextmenu"||(pq(c)?T(function(J){return{willLeave:J.visible}}):T(function(J){return{visible:J.visible?!1:J.visible}}))}function P(){k.willLeave&&k.visible&&T({visible:!1,willLeave:!1})}function M(){if(!c)return null;if(nC(c)){var H;return bs((H={},H["react-contexify__will-enter--"+c]=c&&q&&!I,H["react-contexify__will-leave--"+c+" react-contexify__will-leave--'disabled'"]=c&&q&&I,H))}else if("enter"in c&&"exit"in c){var U;return bs((U={},U["react-contexify__will-enter--"+c.enter]=c.enter&&q&&!I,U["react-contexify__will-leave--"+c.exit+" react-contexify__will-leave--'disabled'"]=c.exit&&q&&I,U))}return null}var q=k.visible,L=k.triggerEvent,N=k.propsFromTrigger,j=k.x,O=k.y,I=k.willLeave,z=bs("react-contexify",s,(r={},r["react-contexify__theme--"+a]=a,r),M()),B=Ql({},i,{left:j,top:O,opacity:1});return F.createElement(iq,{refTracker:h},q&&F.createElement("div",Object.assign({},x,{className:z,onAnimationEnd:P,style:B,ref:w,role:"menu"}),fq(l,{propsFromTrigger:N,triggerEvent:L})))},xx=function(t){var r,n=t.children,a=t.className,i=t.style,s=t.triggerEvent,l=t.data,u=t.propsFromTrigger,c=t.onClick,m=c===void 0?b1:c,p=t.disabled,g=p===void 0?!1:p,y=t.hidden,x=y===void 0?!1:y,E=eC(t,["children","className","style","triggerEvent","data","propsFromTrigger","onClick","disabled","hidden"]),k=aq(),T={data:l,triggerEvent:s,props:u},w=wx(g,T),S=wx(x,T);function f(R){T.event=R,w?R.stopPropagation():m(T)}function h(R){R&&!w&&k.set(R,{node:R,isSubmenu:!1})}function v(R){R.key==="Enter"&&(T.event=R,m(T))}if(S)return null;var _=bs("react-contexify__item",a,(r={},r["react-contexify__item--disabled"]=w,r));return F.createElement("div",Object.assign({},E,{className:_,style:i,onClick:f,onKeyDown:v,ref:h,tabIndex:-1,role:"menuitem","aria-disabled":w}),F.createElement("div",{className:"react-contexify__item__content"},n))};const vq="_box_1hwl6_2",bq="_transferSearch_1hwl6_2",yq="_searchBtn_1hwl6_10",_q="_shuttle_box_1hwl6_44",wq="_leftSearch_1hwl6_58",xq="_noBeforeAfter_1hwl6_62",Sq="_rightSearch_1hwl6_78",Cq="_transfer_1hwl6_2",Wa={box:vq,transferSearch:bq,searchBtn:yq,shuttle_box:_q,leftSearch:wq,noBeforeAfter:xq,rightSearch:Sq,transfer:Cq},Eq="_content_1tmh1_1",kq={content:Eq},aC=F.forwardRef((e,t)=>{const{panes:r,loading:n,defaultActiveKey:a,onTabClick:i}=e,[s,l]=F.useState(a),{TabPane:u}=Z.Tabs;return n?D.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:D.jsx(Ls,{})}):(F.useImperativeHandle(t,()=>({active:c=>{(i==null?void 0:i(c))!==!1&&l(c)}}),[s]),D.jsx("div",{className:`${kq.content} ${e.className??""}`,children:n?D.jsx("div",{style:{padding:"10px"}}):r.length?D.jsx(Z.Tabs,{animated:!1,activeKey:s,destroyInactiveTabPane:!0,tabBarGutter:30,onTabClick:c=>{(i==null?void 0:i(c))!==!1&&l(c)},children:(r||[]).map((c,m)=>D.jsx(u,{tab:D.jsxs("div",{style:{display:"flex",alignItems:"center",paddingBottom:"2px"},children:[c.icon&&D.jsx(He,{style:{marginRight:"5px",fontSize:"16px"},type:`${c.icon}`}),D.jsx("div",{style:{fontSize:"12px",lineHeight:"18px"},children:c.tab})]}),children:D.jsx("div",{style:{padding:"0px"},children:F.Children.map(e.children,p=>{var g;return((g=p==null?void 0:p.props)==null?void 0:g["data-key"])==c.tabKey?p:null})})},`${c.tabKey}`))}):D.jsx(D.Fragment,{})}))}),Tq=F.forwardRef((e,t)=>{var B;const r=e.defaultValue?Array.isArray(e.defaultValue)?e.defaultValue:[e.defaultValue]:[],n=e.defaultActiveKey||"",[a,i]=F.useState(!1),[s,l]=F.useState(),[u,c]=F.useState(r),[m,p]=F.useState([]),[g,y]=F.useState(n),[x,E]=F.useState({[n]:{left:1,right:1}}),[k,T]=F.useState({[n]:{left:0,right:0}}),[w,S]=F.useState(""),[f,h]=F.useState({right:"",left:""}),[v,_]=F.useState(!1),[R,C]=F.useState({});F.useEffect(()=>{c(r),y(n),E({[n]:{left:1,right:1}})},[e.defaultActiveKey,e.defaultValue]),F.useEffect(()=>{a?j():(c(r),l(void 0),y(n),E({[n]:{left:1,right:1}}),S(""),h({right:"",left:""}),C({}))},[a]);const P=xn(f),M=xn(x),q=xn(g),L=xn(k),N=F.useMemo(()=>{const H=()=>{var U;return s||((U=e.allListOptions)==null?void 0:U[q.current])||[]};return ie.uniqBy([...H(),...m],"id")},[q,g,e.allListOptions,s,m]),j=async H=>{_(!0),await e.getListCodeItem(Object.assign({search:P.current,tabKey:q.current,pageNo:M},ie.omit(H||{},"isPaging"))).then(U=>{U&&(H!=null&&H.isPaging?l([...N,...U]):l([...U]),T(Object.assign({},L.current,{[q.current]:{left:U.total||U.length,right:0}})))}).finally(()=>{_(!1)})};F.useEffect(()=>{p(N.filter(H=>u.includes(H.id)))},[u]);const O=async()=>{var H,U;if(e.mandatory&&!u.length)return Z.message.error(`${Y("sys.mustSelect.mustSelect",{placeholder:"必须选择"})}${(H=e.attr)==null?void 0:H.name}`);(U=R.ok)==null||U.call(R,[...u],g,m),i(!1)};F.useImperativeHandle(t,()=>({open(H){C(()=>H),i(!0)},submit:O,dataSource:N,targetKeys:u,loading:v}),[N,u,v]);const I=H=>{H=="left"?j():S(P.current.right)},z=F.useMemo(()=>{var H;return Array.isArray(e.columns)?e.columns:((H=e.columns)==null?void 0:H[g])||[]},[e.columns,g]);return D.jsx(To,{className:Wa.shuttle_box,modalTitle:e.title,maskClosable:!1,destroyOnClose:!0,okText:Y("project.tab.plan.details.window.save",{placeholder:"保存"}),width:e.modalWidth||650,visible:a,mask:!1,onOk:O,onCancel:()=>{var H;(H=R.cancel)==null||H.call(R),i(!1)},children:D.jsx("div",{className:Wa.transferBox,children:D.jsx(Ls,{spinning:v,children:D.jsx(Z.Transfer,{...e.transfer||{},className:`${Wa.transfer} ${((B=e.transfer)==null?void 0:B.className)??""}`,dataSource:N,targetKeys:u,onChange:(H,U,J)=>{U=="right"?c([...e.isRadio?J:H]):c([...H])},rowKey:H=>H.id,children:H=>{var Le,he,qe,oe,De,Je,Ct,Et;const{direction:U,filteredItems:J,onItemSelectAll:re,onItemSelect:ne,selectedKeys:se,showSearch:ce}=H,le=U=="left",ye=!le,we={onSelectAll(Fe,We){if(e.isRadio)return;const Ne=We.filter(at=>!at.disabled).map(({id:at})=>at),Oe=Fe?ie.difference(Ne,se):ie.difference(se,Ne);re(Oe,Fe)},onSelect({id:Fe},We){e.isRadio&&se.splice(0,1),ne(Fe,We)},getCheckboxProps:Fe=>({disabled:Fe.Number&&!Sn.readPermission(Fe.Number)?!0:le?Fe.disabled:!1}),selectedRowKeys:se,columnWidth:13};(Le=e==null?void 0:e.pager)!=null&&Le[g];const Ee=()=>le?J:J.filter(Fe=>Fe.label.includes(w)||Fe.Description.includes(w));return D.jsxs("div",{className:Wa.box,style:e.scroll?{width:"360px"}:{},children:[le&&e.panes&&((he=e.panes)==null?void 0:he.length)!=1?D.jsx(aC,{panes:e.panes,defaultActiveKey:g,onTabClick:Fe=>{var Ne;y(Fe),(Ne=e.onTabsChange)==null||Ne.call(e,Fe);const We={...f,[U]:""};h(We),M.current[Fe]||E(Object.assign({},M.current,{[Fe]:{left:1,right:1}})),j({tabKey:Fe,search:We})}}):null,ce?D.jsx("div",{style:e.scroll?{padding:"12px",borderLeft:"1px solid #E0E0E0",borderTop:"1px solid #E0E0E0",borderRight:"1px solid #E0E0E0"}:{padding:"0px"},children:D.jsx("div",{className:`${e.scroll?Wa.noBeforeAfter:""} ${Wa.transferSearch} ${le&&((qe=e.panes)!=null&&qe.length)?Wa.leftSearch:(oe=e.panes)!=null&&oe.length?Wa.rightSearch:""}`,style:e.scroll?{margin:"0px"}:{},children:D.jsx(Z.Input.Search,{placeholder:e.placeholder||Y("sys.nameOrDescription.enterNameOrDescription",{placeholder:"请输入名称或描述"}),enterButton:null,value:f[U],onChange:Fe=>{Fe.persist();const We=Fe.target.value;h({...f,[U]:We}),ye&&(We||S(""))},onSearch:I.bind(null,U),suffix:D.jsx("div",{className:Wa.searchBtn,onClick:I.bind(null,U),children:D.jsx(He,{type:"homesearch"})})})})}):null,D.jsx(wh,{rowSelection:{type:"checkbox",fixed:!0,...we},columns:z,showSorterTooltip:!1,hideFooter:!0,pagination:!1,dataSource:Ee(),scroll:{x:((De=e.scroll)==null?void 0:De.x)||300,y:((Je=e.scroll)==null?void 0:Je.y)||(le&&((Ct=e.panes)!=null&&Ct.length)?270:316)},style:{height:"100%"},pageNo:x[g][U],pageSize:le?20:void 0,total:le?(Et=k==null?void 0:k[g])==null?void 0:Et[U]:void 0,size:"small",onScroll:Fe=>{const We={...x,[g]:{...x[g],[U]:Fe}};E(We),le&&j({pageNo:We[g],isPaging:!0})},onRow:({id:Fe,disabled:We,...Ne})=>({onClick:()=>{if(!We&&le){if(e.isRadio&&se.splice(0,1),!Sn.readPermission(Ne.Number))return;ne(Fe,!se.includes(Fe))}},onDoubleClick:()=>{if(Sn.readPermission(Ne.Number)){if(le)We||(e.isRadio?c([Fe]):c([Fe,...u]));else{for(let Oe=0;Oe<u.length;Oe++)if(u[Oe]==Fe){u.splice(Oe,1);break}c([...u])}re([],!1)}}})}),e.showFooter?D.jsxs("div",{style:{marginTop:"4px"},children:[D.jsx("span",{style:{color:"#999999"},children:Y("sys.selected",{placeholder:"已选"})})," ",D.jsx("span",{style:{margin:"0px 2px",color:"#333333"},children:se.length})," ",D.jsx("span",{style:{color:"#999999"},children:Y("project.tab.plan.criticalPath.window.item",{placeholder:"条"})}),",",D.jsx("span",{style:{color:"#999999"},children:Y("project.tab.plan.criticalPath.window.total",{placeholder:"共"})})," ",D.jsx("span",{style:{margin:"0px 2px",color:"#333333"},children:ye?u.length:k[g][U]}),D.jsxs("span",{style:{color:"#999999"},children:[" ",Y("project.tab.plan.criticalPath.window.item",{placeholder:"条"})]})]}):D.jsx(D.Fragment,{})]})}})})})})}),iC=F.forwardRef(({selectProps:e,value:t,onChange:r,readOnly:n},a)=>{var x,E;const i=F.useRef(null),{attr:s,allListOptions:l,popoverTransfer:u}=e,c=yo(()=>{var k;(k=i.current)==null||k.open({ok:(T,w,S)=>{var f,h;["multiple","tags"].includes(e.mode)?r==null||r(T):r==null||r(T[0]),(f=u==null?void 0:u.onSubmit)==null||f.call(u,T,w,v=>p({newVal:T,allOptions:v}),S),(h=e.onBlur)==null||h.call(e)},cancel:()=>{var T;(T=e.onBlur)==null||T.call(e)}})});F.useImperativeHandle(a,()=>({focus:c}),[]);const m=F.useMemo(()=>{var T;const k=((T=u==null?void 0:u.panes)==null?void 0:T.map(w=>w.tabKey))||[String(s==null?void 0:s.listCode)];return Object.entries(l||{}).map(([w,S])=>k.includes(w)?S:[]).flat(1)},[s,l,u==null?void 0:u.panes]),p=yo(({allOptions:k,newVal:T})=>{var f;const w=((f=u==null?void 0:u.panes)==null?void 0:f.map(h=>h.tabKey))||[s==null?void 0:s.listCode];let S=[];return Object.entries(k||l||{}).some(([h,v])=>{if(w.includes(h))return v.some(_=>{if(T&&(T==null?void 0:T.length)>1)return T.includes(_.value)&&!S.includes(h)&&S.push(h),!1;{const R=_.value==((T==null?void 0:T[0])||t);return R&&(S=[h]),R}})}),S.filter(Boolean).join(",")}),g=F.useMemo(()=>{var T;const k=((T=u==null?void 0:u.panes)==null?void 0:T.map(w=>w.tabKey))||[s==null?void 0:s.listCode];return k.length==1?k[0]:p({}).split(",")[0]},[t,l,u==null?void 0:u.panes]),y=F.useMemo(()=>typeof t=="string"?t.split(","):t,[t]);return D.jsxs("div",{children:[D.jsx(ho,{...e,style:Object.assign({},e.style||{},{width:"100%"}),className:` ${e.className}`,value:y,filterOption:(k,T)=>T.label&&T.label.indexOf(k)>=0,showSearch:!0,disabled:n,options:m.map(k=>({...k,label:Sn.readPermission(k.label)?k.label:Y("sys.noPermission",{placeholder:"无权限"})})),allowClear:!0,optionLabelProp:"label",open:!1,onChange:k=>{["multiple","tags"].includes(e.mode)?r==null||r(k):k&&k instanceof Array?r==null||r(k[0]):r==null||r("")},tagRender:({label:k})=>Sn.readPermission(k)?D.jsx(Z.Tag,{color:"#0563B2",children:k}):D.jsx(pa,{}),onDropdownVisibleChange:c,onClear:()=>{["multiple","tags"].includes(e.mode)?r==null||r(""):r==null||r([])}}),D.jsx(Tq,{title:`${Y("project.tab.plan.transfer.title",{placeholder:"选择"})}${s.name}`,...Object.assign(Object.create(null),u),ref:i,attr:s,defaultActiveKey:g||((E=(x=u==null?void 0:u.panes)==null?void 0:x[0])==null?void 0:E.tabKey)||"",defaultValue:y,allListOptions:l})]})}),Oq="_shuttle_box_1962p_1",Aq="_box_1962p_5",Rq="_search_1962p_8",Ld={shuttle_box:Oq,box:Aq,search:Rq};function Sx(e){const t=F.useRef(!1),r=F.useRef({}),n=u=>{if(typeof e=="function"){const c=e();return!u&&(r.current=c),Object.assign(Object.create(null),c)}else{const c=e;return!u&&(r.current=c),Object.assign(Object.create(null),e)}},[a,i]=F.useState(n(!0));F.useEffect(()=>(typeof e=="function"?r.current=e():r.current=e,t.current=!1,()=>{t.current=!0}),[]);const s=u=>{if(!t.current)if(typeof u=="function"){const c=Object.assign(Object.create(null),u(a)||a);r.current=c,i(c)}else{const c=Object.assign(Object.create(null),r.current,u);r.current=c,i(c)}},l=()=>i(n());return vt.makeDestructurable({store:a,setStore:s,resetStore:l,latestStore:r},[a,s,l,r])}const oC=F.forwardRef((e,t)=>{var k,T,w,S;e.defaultValue&&(Array.isArray(e.defaultValue)?e.defaultValue:e.defaultValue);const r=e.rowKey||"id",n=!((k=e.attr)!=null&&k.allowMultiple),a=!!((T=e.attr)!=null&&T.required),{store:i,setStore:s,resetStore:l,latestStore:u}=Sx(()=>({visible:!1,search:"",sorters:"",filters:"",loading:!1,dataSource:[],selectedRows:[],callback:()=>{}})),c=Sx(()=>({pageNo:1,pageSize:50,total:0})),m=async f=>{s({loading:!0});try{const{data:h,total:v}=await e.getDataSource({search:u.current.search,sorters:u.current.sorters,filters:u.current.filters,...c.latestStore.current,record:e.record});s(f?{dataSource:[...i.dataSource,...h]}:{dataSource:h}),c.setStore({total:v})}catch(h){console.log(h)}finally{s({loading:!1})}},p=F.useMemo(()=>i.selectedRows.map(f=>f[r]),[i.selectedRows]);F.useEffect(()=>{i.visible?m().finally(()=>{}):(l(),c.resetStore())},[i.visible]);const g=yo(async f=>{var h,v,_;if(a&&!f&&!i.selectedRows.length){Z.message.error(Y("project.attr.edit.roleOrOwner.msg",{placeholder:"请选择{name}",variate:{name:(h=e.attr)==null?void 0:h.name}}));return}(_=(v=u.current.callback).ok)==null||_.call(v,f?[f[r]]:p),s({visible:!1})});F.useImperativeHandle(t,()=>({open(f){s({callback:f,visible:!0})},submit:g,dataSource:i.dataSource,loading:i.loading}),[i.dataSource,i.loading]);const y=()=>{m()},x={onSelectAll(f,h){n||s({selectedRows:h})},onSelect(f,h){n?h?s({selectedRows:[f]}):a||s({selectedRows:[]}):s(h?{selectedRows:[...i.selectedRows,f]}:{selectedRows:i.selectedRows.filter(v=>v[r]!=f[r])})},getCheckboxProps:f=>({disabled:!1}),selectedRowKeys:p,columnWidth:13},E=F.useMemo(()=>e.generateColumns(u),[e.generateColumns]);return F.useEffect(()=>{const f=ie.debounce(h=>{(h.keyCode||h.which)==13&&u.current.visible&&h.target.dataset.search!="true"&&g()},200);return window.addEventListener("keyup",f),()=>{window.removeEventListener("keyup",f)}},[]),D.jsx(To,{className:Ld.shuttle_box,modalTitle:e.title,maskClosable:!1,destroyOnClose:!0,okText:Y("project.tab.plan.details.window.save",{placeholder:"保存"}),styleUnify:!0,width:e.modalWidth||660,visible:i.visible,mask:!1,onOk:g,onCancel:()=>{var f,h;s({visible:!1}),(h=(f=u.current.callback).cancel)==null||h.call(f)},footer:null,children:D.jsx("div",{onScroll:f=>f.stopPropagation(),onScrollCapture:f=>f.stopPropagation(),children:D.jsx(Ls,{spinning:i.loading,children:D.jsxs("div",{className:Ld.box,children:[D.jsx("div",{children:D.jsx("div",{className:`${Ld.search}`,children:D.jsx(Z.Input.Search,{placeholder:Y("sys.prompt.enterName",{placeholder:"请输入姓名"}),enterButton:null,"data-search":!0,...e.searchProps,suffix:D.jsx("div",{className:Ld.searchBtn,onClick:y,children:D.jsx(He,{type:"homesearch"})}),value:i.search,onChange:f=>s({search:f.target.value}),onSearch:y})})}),D.jsx(wh,{rowSelection:{type:"checkbox",fixed:!0,...x},columns:E,showSorterTooltip:!1,dataSource:i.dataSource,scroll:{x:(w=e.scroll)==null?void 0:w.x,y:((S=e.scroll)==null?void 0:S.y)||300},style:{height:"100%"},...c.store,size:"small",onScroll:f=>{c.setStore({pageNo:f}),m(!0)},onFilterAndSorter:(f,h)=>{s({sorters:f,filters:h}),m()},onRow:(f,...h)=>({onClick:()=>{console.log(f,h,"FFFFFFFFFFFF")},onDoubleClick:()=>{g(f)}})})]})})})})}),sC=F.forwardRef(({selectProps:e,value:t,onChange:r,readOnly:n},a)=>{const i=F.useRef(null),{attr:s,allListOptions:l,selectPopupProps:u,record:c}=e,m=yo(()=>{var y;(y=i.current)==null||y.open({ok:x=>{var E,k,T;["multiple","tags"].includes(e.mode)?(r==null||r(x),(E=e.onChange)==null||E.call(e,x,l[s.listCode]||[])):((k=e.onChange)==null||k.call(e,x[0],l[s.listCode]||[]),r==null||r(x[0])),(T=e.onBlur)==null||T.call(e)},cancel:()=>{var x;(x=e.onBlur)==null||x.call(e)}})});F.useImperativeHandle(a,()=>({focus:m}),[]);const p=F.useMemo(()=>ie.omit(e,["popoverProps","attr","allListOptions"]),[e]),g=F.useMemo(()=>typeof t=="string"?t.split(","):t,[t]);return D.jsxs("div",{children:[D.jsx(ho,{...p,style:Object.assign({},e.style||{},{width:"100%"}),className:` ${e.className}`,value:g,filterOption:(y,x)=>x.label&&x.label.indexOf(y)>=0,showSearch:!0,disabled:n,options:l[s.listCode]||[],allowClear:e.allowClear==null?!0:e.allowClear,optionLabelProp:"label",open:!1,loading:e.loading,onDropdownVisibleChange:m}),D.jsx(oC,{title:`${Y("project.tab.plan.transfer.title",{placeholder:"选择"})}${s.name}`,...Object.assign(Object.create(null),u),ref:i,attr:s,record:c,defaultValue:g})]})}),og=[null,(e,t)=>(e=ve(`${e.format("YYYY-MM-DD")} 00:00:00`),t.valueOf()<e.valueOf()),(e,t)=>(e=ve(`${e.format("YYYY-MM-DD")} 23:59:59`),t.valueOf()<=e.valueOf()),(e,t)=>(e=ve(`${e.format("YYYY-MM-DD")} 23:59:59`),t.valueOf()>e.valueOf()),(e,t)=>(e=ve(`${e.format("YYYY-MM-DD")} 00:00:00`),t.valueOf()>=e.valueOf()),(e,t)=>t.valueOf()==e.valueOf()];function Pq(e,t){const r=n=>{var i;if(!n.date||!n.type)return n.isWorkTime?!n.isWorkTime({date:new Date(t.valueOf())}):!1;const a=ve(n.date);return((i=og[n.type])==null?void 0:i.call(og,a,ve(t)))||(n==null?void 0:n.isWorkTime)&&!n.isWorkTime({date:new Date(t.valueOf())})};return Array.isArray(e)?e.map(a=>r(a)).some(a=>a):r(e)}const Cx={dem:"3Shape DCM (*.dcm)",sat:"ACIS (*.sat;*.asat;*.sab;*.asab)",sab:"ACIS (*.sat;*.asat;*.sab;*.asab)",asab:"ACIS (*.sat;*.asat;*.sab;*.asab)",pd:"Cadds (_pd;*._pd)",zip:"zip",model:"Catia V4 2D (*.model;*.dlv;*.dlv3;*.exp)",dlv:"Catia V4 2D (*.model;*.dlv;*.dlv3;*.exp)",dlv3:"Catia V4 2D (*.model;*.dlv;*.dlv3;*.exp)",exp:"Catia V4 2D (*.model;*.dlv;*.dlv3;*.exp)",CATDrawing:"Catia V5 2D (*.CATDrawing)",CATPart:"Catia V5 3D (*.CATPart;*.CATProduct)",CATProduct:"Catia V5 3D (*.CATPart;*.CATProduct)","3dxml":"Catia V6/3DEXPERIENCE 3D (*.3dxml)",art:"Cercon (*.art)",sdt:"Cerec - Sirona (*.sdt;*.cdt;*.idt)",cdt:"Cerec - Sirona (*.sdt;*.cdt;*.idt)",idt:"Cerec - Sirona (*.sdt;*.cdt;*.idt)",cgr:"CGR (*.cgr)",ol:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",ed:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",edz:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",pvz:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",pvs:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",dwg:"DWG 2D (*.dwg)",dxf:"DWG/DXF 3D (*.dwg;*.dxf)",fbx:"FBX (*.fbx)",f3d:"Fusion 360 (*.f3d)",ifc:"IFC (*.ifc;*.ifcxml;*.ifczip)",ifexml:"IFC (*.ifc;*.ifcxml;*.ifczip)",ifezip:"IFC (*.ifc;*.ifcxml;*.ifczip)",igs:"IGES 3D (*.igs;*.iges)",iges:"IGES 3D (*.igs;*.iges)",jt:"JT (*.jt)",nwd:"Navisworks (*.nwd)",obj:"OBJ (*.obj)",xmt:"PARASOLID (*.x_t;*.x_b;*.xmt_txt;*.xmt_bin)",x_t:"PARASOLID (*.x_t;*.x_b;*.xmt_txt;*.xmt_bin)",x_b:"PARASOLID (*.x_t;*.x_b;*.xmt_txt;*.xmt_bin)",xmt_txt:"PARASOLID (*.x_t;*.x_b;*.xmt_txt;*.xmt_bin)",xmt_bin:"PARASOLID (*.x_t;*.x_b;*.xmt_txt;*.xmt_bin)",plmxml:"PLM XML (*.plmxml)","03s":"Procera (*.c3s)",drw:"ProE/Creo Parametric 2D (*.drw;*.drw.*)",xpr:"ProE/Creo Parametric 3D (*.prt;*.prt.*;*.xpr;*.asm;*.asm.*;*.xas)",asm:"ProE/Creo Parametric 3D (*.prt;*.prt.*;*.xpr;*.asm;*.asm.*;*.xas)",xas:"ProE/Creo Parametric 3D (*.prt;*.prt.*;*.xpr;*.asm;*.asm.*;*.xas)",rvt:"Revit (*.rvt;*.rfa)",rfa:"Revit (*.rvt;*.rfa)","3dm":"Rhino (*.3dm)",rf:"Robface (*.rf)",smg:"SMG (*.smg;*.smggeom)",smggeom:"SMG (*.smg;*.smggeom)",dft:"Solid Edge 2D (*.dft)",par:"Solid Edge 3D (*.par;*.psm;*.asm;*.pwd)",psm:"Solid Edge 3D (*.par;*.psm;*.asm;*.pwd)",pwd:"Solid Edge 3D (*.par;*.psm;*.asm;*.pwd)",slddrw:"SolidWorks 2D (*.slddrw)",sldprt:"SolidWorks 3D (*.sldprt;*.sldasm)",sldasm:"SolidWorks 3D (*.sldprt;*.sldasm)",step:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",stp:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",stpz:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",stpx:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",stpxz:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",stpnc:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",stl:"STL (*.stl)",prt:"UG NX 3D (*.prt)",vda:"VDAFS (*.vda)","03S":"Procera (*.c3s)","3DM":"Rhino (*.3dm)","3DXML":"Catia V6/3DEXPERIENCE 3D (*.3dxml)",ART:"Cercon (*.art)",ASAB:"ACIS (*.sat;*.asat;*.sab;*.asab)",ASM:"ProE/Creo Parametric 3D (*.prt;*.prt.*;*.xpr;*.asm;*.asm.*;*.xas)",CATDRAWING:"Catia V5 2D (*.CATDrawing)",CATPART:"Catia V5 3D (*.CATPart;*.CATProduct)",CATPRODUCT:"Catia V5 3D (*.CATPart;*.CATProduct)",CDT:"Cerec - Sirona (*.sdt;*.cdt;*.idt)",CGR:"CGR (*.cgr)",DEM:"3Shape DCM (*.dcm)",DFT:"Solid Edge 2D (*.dft)",DLV:"Catia V4 2D (*.model;*.dlv;*.dlv3;*.exp)",DLV3:"Catia V4 2D (*.model;*.dlv;*.dlv3;*.exp)",DRW:"ProE/Creo Parametric 2D (*.drw;*.drw.*)",DWG:"DWG 2D (*.dwg)",DXF:"DWG/DXF 3D (*.dwg;*.dxf)",ED:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",EDZ:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",EXP:"Catia V4 2D (*.model;*.dlv;*.dlv3;*.exp)",F3D:"Fusion 360 (*.f3d)",FBX:"FBX (*.fbx)",IDT:"Cerec - Sirona (*.sdt;*.cdt;*.idt)",IFC:"IFC (*.ifc;*.ifcxml;*.ifczip)",IFEXML:"IFC (*.ifc;*.ifcxml;*.ifczip)",IFEZIP:"IFC (*.ifc;*.ifcxml;*.ifczip)",IGES:"IGES 3D (*.igs;*.iges)",IGS:"IGES 3D (*.igs;*.iges)",JT:"JT (*.jt)",MODEL:"Catia V4 2D (*.model;*.dlv;*.dlv3;*.exp)",NWD:"Navisworks (*.nwd)",OBJ:"OBJ (*.obj)",OL:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",PAR:"Solid Edge 3D (*.par;*.psm;*.asm;*.pwd)",PD:"Cadds (_pd;*._pd)",PLMXML:"PLM XML (*.plmxml)",PRT:"UG NX 3D (*.prt)",PSM:"Solid Edge 3D (*.par;*.psm;*.asm;*.pwd)",PVS:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",PVZ:"Creo View (*.ol;*.ed;*.edz;*.pvz;*.pvs)",PWD:"Solid Edge 3D (*.par;*.psm;*.asm;*.pwd)",RF:"Robface (*.rf)",RFA:"Revit (*.rvt;*.rfa)",RVT:"Revit (*.rvt;*.rfa)",SAB:"ACIS (*.sat;*.asat;*.sab;*.asab)",SAT:"ACIS (*.sat;*.asat;*.sab;*.asab)",SDT:"Cerec - Sirona (*.sdt;*.cdt;*.idt)",SLDASM:"SolidWorks 3D (*.sldprt;*.sldasm)",SLDDRW:"SolidWorks 2D (*.slddrw)",SLDPRT:"SolidWorks 3D (*.sldprt;*.sldasm)",SMG:"SMG (*.smg;*.smggeom)",SMGGEOM:"SMG (*.smg;*.smggeom)",STL:"STL (*.stl)",STEP:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",STP:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",STPNC:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",STPX:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",STPXZ:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",STPZ:"STEP (*.step;*.stp;*.stpz;*.stpx;*.stpxz;*.stpnc)",VDA:"VDAFS (*.vda)",XAS:"ProE/Creo Parametric 3D (*.prt;*.prt.*;*.xpr;*.asm;*.asm.*;*.xas)",XMT:"PARASOLID (*.x_t;*.x_b;*.xmt_txt;*.xmt_bin)",XPR:"ProE/Creo Parametric 3D (*.prt;*.prt.*;*.xpr;*.asm;*.asm.*;*.xas)"},Dq=F.forwardRef((e,t)=>{const r=F.useRef(),n=["Input","Input.TextArea","Number","CompositeForm"],a=["Select","Date","Cascader","TreeSelect","DatePicker.RangePicker","Image","File"],i=e.formprops.type;F.useImperativeHandle(t,()=>({focusFormItem:()=>{var u;i!=="File"&&i!=="Image"&&((u=r.current)==null||u.focus())},blurFormItem:()=>{var u;i!=="File"&&i!=="Image"&&((u=r.current)==null||u.blur())}}));const s=F.useMemo(()=>{var m,p;const u=g=>(g==null?void 0:g.closest(_h))||document.body||document.documentElement;(m=e==null?void 0:e.formprops)!=null&&m.props&&!e.formprops.props.getPopupContainer&&(e.formprops.props.getPopupContainer=u);let c={getPopupContainer:u};return n.includes(i)?c={...e.formprops.props,size:"small",onPressEnter:()=>{e.onSave&&e.onSave()},onBlur:()=>{e.onSave&&e.onSave()}}:a.includes(i)&&(c={...e.formprops.props,size:"small",onChange:((p=e.formprops)==null?void 0:p.props.mode)==="multiple"||e.formprops.props.treeCheckable?void 0:e.onSave,onBlur:e.onSave,onClick:g=>{g.stopPropagation()}}),e.formprops.formatFormProps?e.formprops.formatFormProps(c,e.record,e.apicode):c},[e.record,e.formprops,e.onSave]),l=()=>{var c;let u={...s};if(e.apicode==="NewVersion")return u.options&&u.options[e.record.insId][0]&&!((c=u.options[e.record.insId][0])!=null&&c.value)||u.options&&!u.options[e.record.insId][0]?(u={...u,onPressEnter:()=>{e.onSave&&e.onSave()},onBlur:()=>{e.onSave&&e.onSave()},onChange:void 0},D.jsx(Z.Input,{ref:r,...u})):D.jsx(Z.Select,{ref:r,filterOption:(m,p)=>p.label&&p.label.indexOf(m)>=0,showSearch:!0,allowClear:!0,...ie.assign(u,{options:ie.uniqBy(u.options?u.options[e.record.insId]:[],"value").length===1?ie.uniqBy(u.options[e.record.insId],"value").map(m=>({label:m.label.replace(Y("sys.majorVersion",{placeholder:"大版本"}),"").replace(Y("sys.minorVersion",{placeholder:"小版本"}),""),value:m.value})):ie.uniqBy(u.options&&u.options[e.record.insId]?u.options[e.record.insId]:[],"value")})});switch(i){case"Input":return D.jsx(Z.Input,{ref:r,...u});case"DatePicker.RangePicker":return D.jsx(Z.DatePicker.RangePicker,{...u});case"Select":if(e.apicode==="exchanger"||e.apicode==="NewLifePhase"||e.apicode==="NewVersion"||e.apicode==="ProblemVersion"){if(e.apicode==="NewLifePhase"&&u.options&&u.options[e.record.insId]&&(u.options[e.record.insId]=u.options[e.record.insId].filter(g=>!g.noShow).map(g=>Fi.isChangeInstruction(g.itemcode)?{...g,disabled:g.sort<e.record.lifecycle.sort&&!["10007010","10007006","10007014"].includes(String(e.record.lifecycle.code))||!g.status}:Fi.isStatusChange(g.itemcode)?Fi.isFile(e.record.itemCode)?{...g,disabled:!g.status}:{...g,disabled:g.sort<=e.record.lifecycle.sort&&e.record.lifecycle.apicode!=="Obsolete"||!g.status||e.record.lifecycle.apicode==="Obsolete"&&g.apicode=="Obsolete"}:{...g,disabled:!g.status||g.code==10007022})),e.apicode==="ProblemVersion"&&u.options&&u.options[e.record.insId]&&(u.options[e.record.insId]=u.options[e.record.insId].filter(g=>g.value!="Draft").map(g=>({...g}))),e.apicode==="exchanger"&&u.options&&u.options[Cx[e.record.extension]]){const g=u.options[Cx[e.record.extension]].map(y=>({label:y,value:y}));return D.jsx(Z.Select,{ref:r,filterOption:(y,x)=>x.label&&x.label.indexOf(y)>=0,showSearch:!0,allowClear:!0,...u,options:g})}return D.jsx(Z.Select,{ref:r,filterOption:(g,y)=>y.label&&y.label.indexOf(g)>=0,showSearch:!0,allowClear:!0,...ie.assign(u,{options:ie.uniqBy(u.options?u.options[e.record.insId]:[],"value").length===1?ie.uniqBy(u.options[e.record.insId],"value").map(g=>({label:g.label.replace(Y("sys.majorVersion",{placeholder:"大版本"}),"").replace(Y("sys.minorVersion",{placeholder:"小版本"}),""),value:g.value})):ie.uniqBy(u.options&&u.options[e.record.insId]?u.options[e.record.insId]:[],"value")})})}else{if(e.apicode==="AffectRevision")return u.options&&u.options[e.record.insId]&&(u.options[e.record.insId]=u.options[e.record.insId].filter(g=>g.value.indexOf("(")==-1).map(g=>({...g}))),D.jsx(Z.Select,{ref:r,filterOption:(g,y)=>y.label&&y.label.indexOf(g)>=0,showSearch:!0,allowClear:!0,...ie.assign(u,{options:u.options&&u.options[e.record.insId]?u.options[e.record.insId]:[]})});if(e.apicode==="NewStatus")return u.options.forEach(g=>{var y;!((y=e==null?void 0:e.record)!=null&&y.publishTime)&&(g.apicode==="Disable"||g.apicode==="Scrap")?g.disabled=!0:g.disabled=!1,(g.apicode==="Initial"||g.apicode==="Draft")&&(g.disabled=!0)}),D.jsx(Z.Select,{ref:r,filterOption:(g,y)=>y.label&&y.label.indexOf(g)>=0,showSearch:!0,allowClear:!0,...u});if(u!=null&&u.selectPopupProps)return D.jsx(sC,{ref:r,selectProps:{...u,record:e.record}});if(u!=null&&u.popoverTransfer||u!=null&&u.popoverTable)return D.jsx(iC,{ref:r,selectProps:u})}return D.jsx(Z.Select,{ref:r,filterOption:(g,y)=>y.label&&y.label.indexOf(g)>=0,showSearch:!0,allowClear:!0,...u});case"Cascader":return D.jsx(Z.Cascader,{ref:r,showSearch:{filter:(g,y)=>y.some(x=>x.label&&x.label.toLowerCase().indexOf(g.toLowerCase())>-1),matchInputWidth:!1},...u});case"Date":const m=e.record.forbiddenTime,p=m&&m[e.name];return D.jsx(Z.DatePicker,{ref:r,...u,disabledDate:p?g=>Pq(m[e.name],g):void 0});case"Number":return D.jsx(Z.InputNumber,{ref:r,...u});case"Input.TextArea":return D.jsx(Z.Input.TextArea,{ref:r,...u});case"TreeSelect":return D.jsx(Z.TreeSelect,{ref:r,...u});case"CompositeForm":return D.jsx(hc,{...u});default:return D.jsx(Z.Input,{ref:r,...u})}};return D.jsx(Z.Form.Item,{noStyle:!0,name:e.name,children:l()})}),Mq="_imgOuter_16ygq_1",Fq="_imgInner_16ygq_9",Ex={imgOuter:Mq,imgInner:Fq},uC=e=>D.jsx(Z.Image,{...e,src:e.src}),y1=e=>D.jsx("div",{className:Ex.imgOuter,children:D.jsx(uC,{preview:!1,src:e.src,className:Ex.imgInner,placeholder:D.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center"},children:D.jsx(He,{className:"rotate",style:{cursor:"pointer",color:"#0563b2"},type:"loading"})})})}),rt=class rt{static avoid0TypeConvert(t){return vt.avoid0TypeConvert(t)}static isEqual(t,r){function n(a){return ve.isMoment(a)?vt.momentToRawData(a):a??""}return t=n(t),r=n(r),ie.isNil(t)&&ie.isNil(r)||ie.isNaN(t)&&ie.isNaN(r)?!0:t instanceof Object?ie.isEqual(t,r):this.avoid0TypeConvert(t)==this.avoid0TypeConvert(r)}static getCellSignState(t,r){const n=t.optType==="update"||t.optType==="replace",a=t.inProcess&&!ie.isNil(t.inProcess[r])&&!ie.isNil(t.inProcess)&&rt.isEqual(t.inProcess[r],t[r]),i=t.newVal&&!ie.isNil(t.newVal[r])&&!ie.isNil(t.newVal)&&rt.isEqual(t.newVal[r],t[r]);return{hasOptType:n,hasInProcess:a,hasNewValue:i}}static getRowSignState(t,r){const n=t.optType==="update"||t.optType==="replace",a=t.inProcess?Object.keys(t.inProcess):[],i=t.newVal?Object.keys(t.newVal):[],s=a.map(u=>{const c=t.inProcess[u],m=t[u],p=rt.isEqual(c,m);return r==null||r("inProcess",u,p,c,m),p}).some(u=>!u),l=i.map(u=>{const c=t.newVal[u],m=t[u],p=rt.isEqual(c,m);return r==null||r("newVal",u,p,c,m),p}).some(u=>!u);return{hasOptType:n,hasInProcess:s,hasNewValue:l}}static isEmptyValue(t){return typeof t=="number"?!1:ie.isEmpty(t)}static sortAndFilterTable(t){const{tableColumns:r,originTableColumns:n,sortersField:a,tabInfo:i={}}=t;let{sorters:s,filters:l}=t;const u=Fi.isUser(i.itemCode||""),c=i.tab==="Delegate";if(u&&c&&l){const m=r.filter(g=>["ChangeCategory"].includes(g.apicode)).map(g=>g.dataIndex),p=ie.map(l.split("~!~"),g=>ie.split(g,"-")[0]);ie.includes(p,m[0])?l.split("~!~").map(g=>{if(m.includes(g.split("-")[0])){const y=g.split("-")[1].split(",");y&&Array.isArray(y)&&(ie.remove(y,x=>x==""||x==null),r.map(x=>(x.apicode==="Category"&&ie.forEach(x.formitem.props.options,E=>{ie.includes(y,E.itemCode)?E.isHidden=!1:E.isHidden=!0,y.length==0&&(E.isHidden=!1)}),x)))}}):r.map(g=>(g.apicode==="Category"&&ie.forEach(g.formitem.props.options,y=>{y.isHidden=!1}),g))}if(i.tab!=="History"){const m=r.filter(g=>g.dataFrom==="1").map(g=>g.dataIndex),p=r.filter(g=>g.dataFrom==="0"||g.dataFrom==="2").map(g=>g.dataIndex);if(s&&Object.values(FIX_INS_TAbTABLE_COLUMNMAP).includes(s.split("-")[0])){const g=rt.getFixAttrFilterOrSortInfo({filterOrSort:s,attrs:n||r.map(y=>y.attr)});s=(g==null?void 0:g.value)||s}else m.includes(s.split("-")[0])?s=s?`attributes.${s}`:"":p.includes(s.split("-")[0])&&(s=s?`current.${s}`:"");if(l){const g=r.filter(y=>["OldVersion"].includes(y.apicode)).map(y=>y.dataIndex);l=l.split("~!~").map(y=>{if(console.log(y,"item"),g.includes(y.split("-")[0]))return`current.${y.split("-")[0]}-${y.split("-")[1]===Y("sys.label.draft",{placeholder:"草稿"})?"Draft":`${y.split("-")[1]} `}`;if(Object.values(FIX_INS_TAbTABLE_COLUMNMAP).includes(y.split("-")[0])){const x=rt.getFixAttrFilterOrSortInfo({filterOrSort:y,attrs:n||r.map(E=>E.attr)});return(x==null?void 0:x.value)||l}if(m.includes(y.split("-")[0]))return y?`attributes.${y}`:"";if(p.includes(y.split("-")[0]))return y?`current.${y}`:""}).join("~!~")}}if(i.tab==="VersionRecord"&&n){const m=vt.transformArrayToMap(n,"apicode","id");s=s.replace("insVersionOrder",`attributes.${m.Revision}`),l=l.replace("insVersionOrder",`attributes.${m.Revision}`)}return{sorters:s,filters:l,sortersField:a}}static monitoringCol(t,r){var u;const n=()=>{};if(!t)return n;const a=(u=t.querySelector(".frontend-table-header"))==null?void 0:u.querySelector("colgroup");if(!a)return n;const i=a.querySelector(".frontend-table-selection-col"),s=t.querySelector(".frontend-table-body").querySelector("colgroup");let l=null;return i&&(l=new MutationObserver(async(c,m)=>{const[p]=c;if(p.type=="attributes"&&p.attributeName=="style"&&!i.inhibit&&!ie.isNil(r)){i.inhibit=!0;const g=r;if(g!=i.offsetWidth){const y=Number(g)-i.offsetWidth,x=a.children.length-2,E=ie.round(y/x,2);Array.from(a.children,(k,T)=>{const w=s.children[T];if(k==i)k.setAttribute("style",`width:${g}px;max-width:${g}px;`),w.setAttribute("style",`width:${g}px;max-width:${g}px;`);else if(T!=a.children.length-1){const S=k.style.width.replace("px","");k.setAttribute("style",`width:${Number(S)+E}px;`),w.setAttribute("style",`width:${Number(S)}px;`)}})}}else i.inhibit=!1}),l.observe(i,{attributeFilter:["style"]})),()=>{l==null||l.disconnect(),l=null}}static getFixAttrFilterOrSortInfo({filterOrSort:t,attrs:r}){let n,a;const i=t.indexOf("-");if(i!==-1?(n=t.substring(0,i),a=t.substring(i+1)):(n=t,a=""),Object.values(FIX_INS_TAbTABLE_COLUMNMAP).includes(n)){const[s]=Object.entries(FIX_INS_TAbTABLE_COLUMNMAP).find(([l,u])=>n==u)||[];if(s){const l=vt.getAttrOf(r,s);if(l){l.apicode==="Version"&&(a=a===Y("sys.label.draft",{placeholder:"草稿"})?"Draft":`${a} `);const u=As.getAttributesMapId(l),c=As.isQuoteAttr(l)?"attributes":"current";return{apicode:s,id:u,attr:l,filterOrSortValue:a,prefix:c,value:`${c}.${u}-${a}`}}}}}};Tt(rt,"getTrulyHighlight",({formitem:t,highlight:r})=>{const n=["Input","Input.TextArea","Select","SelectTransfer","Date","Cascader","TreeSelect","Number"],i=(()=>{var l;return r&&r[0]?ie.isArray(r[0])&&t?(l=t.props)!=null&&l.treeCheckable||t.props.mode==="multiple"?rt.renderReadonlyItem({value:r[0],formitem:t}).split(","):rt.renderReadonlyItem({value:r[0],formitem:t}):ve.isMoment(r[0])?[ve(r[0]).format("YYYY-MM-DD")]:r:[]})()||[],s=n.includes(t==null?void 0:t.type)||!t;return{trulyHighlight:s?i:r||[],needTransform:s}}),Tt(rt,"wrapperHighLight",({highlight:t,formitem:r,value:n,originValue:a})=>{if(Sn.isMosaic(a))return D.jsx(pa,{});const{trulyHighlight:i,needTransform:s}=rt.getTrulyHighlight({highlight:t,formitem:r});return s?D.jsx(ei,{highlight:i,value:n}):n}),Tt(rt,"renderCacheCell",(t,r,n,a,i)=>{if(t.optType==="update"||t.optType==="replace"){if(t.newVal&&(t.newVal[r]||!ie.isNil(t.newVal[r])))if(rt.isEqual(t.newVal[r],t[r])){if(rt.isEqual(t.newVal[r],t[r]))return D.jsx("div",{style:{width:"100%"},children:D.jsx("div",{className:zn.updated_style,children:a?a({value:t.newVal[r],formitem:n,row:t.newVal}):rt.wrapperHighLight({originValue:t.newVal[r],value:rt.renderReadonlyItem({value:t.newVal[r],formitem:n}),formitem:n,highlight:i==null?void 0:i.highlight})})})}else return D.jsxs("div",{style:{width:"100%"},children:[D.jsx("div",{className:zn.updated_style,children:a?a({value:t.newVal[r],formitem:n,row:t.newVal}):rt.wrapperHighLight({originValue:t.newVal[r],value:rt.renderReadonlyItem({value:t.newVal[r],formitem:n}),formitem:n,highlight:i==null?void 0:i.highlight})}),D.jsx("div",{className:zn.update_style,children:a?a({value:t[r],formitem:n,row:t}):rt.wrapperHighLight({originValue:t[r],value:rt.renderReadonlyItem({value:t[r],formitem:n}),formitem:n,highlight:i==null?void 0:i.highlight})})]});if(t.inProcess&&t.inProcess[r]!==void 0&&t.inProcess!==null&&!rt.isEqual(t.inProcess[r],t[r]))return D.jsxs("div",{style:{width:"100%"},children:[D.jsx("div",{className:zn.updated_redline_style,children:a?a({value:t.inProcess[r],formitem:n,row:t.inProcess}):rt.wrapperHighLight({originValue:t.inProcess[r],value:rt.renderReadonlyItem({value:t.inProcess[r],formitem:n}),formitem:n,highlight:i==null?void 0:i.highlight})}),D.jsx("div",{className:zn.update_style,children:a?a({value:t[r],formitem:n,row:t}):rt.wrapperHighLight({originValue:t[r],value:rt.renderReadonlyItem({value:t[r],formitem:n}),formitem:n,highlight:i==null?void 0:i.highlight})})]})}return t.newVal&&t.newVal[r]!==void 0&&t.newVal!==null&&!rt.isEqual(t.newVal[r],t[r])?D.jsxs("div",{style:{width:"100%"},children:[D.jsx("div",{className:zn.updated_style,children:a?a({value:t.newVal[r],formitem:n,row:t.newVal}):rt.wrapperHighLight({originValue:t.newVal[r],value:rt.renderReadonlyItem({value:t.newVal[r],formitem:n}),formitem:n,highlight:i==null?void 0:i.highlight})}),D.jsx("div",{className:zn.update_style,children:a?a({value:t[r],formitem:n,row:t}):rt.wrapperHighLight({originValue:t[r],value:rt.renderReadonlyItem({value:t[r],formitem:n}),formitem:n,highlight:i==null?void 0:i.highlight})})]}):D.jsx("div",{style:{width:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:a?a({value:t[r],formitem:n,row:t}):rt.wrapperHighLight({originValue:t[r],value:rt.renderReadonlyItem({value:t[r],formitem:n}),formitem:n,highlight:i==null?void 0:i.highlight})})}),Tt(rt,"renderReadonlyItem",({apicode:t,formitem:r,value:n,record:a})=>{var i,s,l,u,c,m;if(!r)return n;if(!r.type)return"";if(["Select","Cascader"].includes(r.type))return r.props.mode==="multiple"?ie.isArray(n)&&n instanceof Array?n.map(p=>vt.getLabelInOptions({value:p,options:(r==null?void 0:r.props.options)||[]})).join(","):n&&typeof n=="string"?n.split(",").map(p=>vt.getLabelInOptions({value:p,options:(r==null?void 0:r.props.options)||[]})).join(","):"":vt.getLabelInOptions({value:n,options:(r==null?void 0:r.props.options)||[]});if(["TreeSelect"].includes(r.type))return(i=r.props)!=null&&i.treeCheckable&&ie.isArray(n)&&n instanceof Array?n.map(p=>vt.getLabelInOptions({value:typeof p!="string"?p.value:p,options:(r==null?void 0:r.props.treeData)||[]})).join(","):vt.getLabelInOptions({value:n,options:(r==null?void 0:r.props.treeData)||[]});if(["Date"].includes(r.type))if(n)if(ve.isMoment(n)){const g=n.creationData();return n.format(((s=r==null?void 0:r.props)==null?void 0:s.format)??g.format)}else return ve(n).format(((l=r==null?void 0:r.props)==null?void 0:l.format)??"YYYY-MM-DD HH:mm:ss");else return"";else return["Image"].includes(r.type)?n&&!ie.isArray(n)?D.jsx(Z.Popover,{placement:"right",content:D.jsx("div",{style:{height:"60px",width:"60px"},children:n?D.jsx(y1,{src:`/api${n}`}):D.jsx(D.Fragment,{})}),trigger:"hover",children:D.jsx("div",{style:{height:"26px",width:"26px"},children:n?D.jsx(y1,{src:`/api${n}`}):D.jsx(D.Fragment,{})})}):"":["CompositeForm"].includes(r.type)?n&&typeof n=="string"?(u=String(n))!=null&&u.includes("~%~")?`${n.split("~%~")[0]||""}${((m=ie.find((c=r.props)==null?void 0:c.options,{id:n.split("~%~")[1]}))==null?void 0:m.name)||""}`:n:"":r.isbomtag&&!ie.isArray(n)&&!(n instanceof Array)?n?vt.renderBomTag(n):"":ie.isArray(n)&&n instanceof Array?n.join(","):n??""}),Tt(rt,"renderRowClassName",t=>{const r=[];let n="";return t.shear&&r.push("shear-row"),t.optType==="add"?n="add-redline-row":t.optType==="del"&&(n="del-row"),t.dataType==="add"?n="add-row":t.dataType==="del"&&(n="del-row"),`${r.join(" ")} ${n}`}),Tt(rt,"renderVersionColumn",(t,r)=>Sn.isMosaic(t)?D.jsx(pa,{}):t==="Draft"||ie.isString(t)&&t.split(" ")[0]==="Draft"?D.jsx(ei,{highlight:r||[],value:Y("sys.label.draft",{placeholder:"草稿"})}):D.jsx(ei,{highlight:r||[],value:ie.isString(t)?t.replace(/[()]/g,"").split(" ")[0]:""}));let Za=rt;const Nq=({title:e,editable:t,children:r,dataIndex:n,record:a,handleSave:i,handleCellSelected:s,handleFill:l,handleDoubleClick:u,renderCacheCell:c,loading:m,required:p,formitem:g,rowKey:y,render:x,tableKey:E,menuId:k,highlight:T,isVersion:w,isUser:S,preRender:f,apicode:h,canselectcell:v,selectedCell:_,fillContextMenu:R,setInitialState:C,...P})=>{var Le,he,qe;const M=F.useContext(Qf),[q,L]=F.useState(!1),N=F.useContext(Iv),j=F.useRef(null),O=["Input","Input.TextArea","Number"];v&&_&&(_==null?void 0:_.dataIndex)===n&&(_==null?void 0:_.record[y])==a[y]&&(_==null?void 0:_.tableKey)==E&&(P.style={...P.style,background:"#ddeffe"}),F.useEffect(()=>{var oe,De;q?(oe=j.current)==null||oe.focusFormItem():(De=j.current)==null||De.blurFormItem()},[q]);const I=oe=>{for(;oe&&oe.nodeName!=="TR";)oe=oe.parentNode;return oe},z=async(oe,De)=>{var Et,Fe,We;const Je=()=>{if(!(!e&&!n)&&De){const Ne=new MouseEvent("dblclick",{bubbles:!0,cancelable:!1});I(De==null?void 0:De.target)&&I(De==null?void 0:De.target).dispatchEvent(Ne)}};if(g&&g.props&&g.props.disabled||!g||g.props&&!g.props){Je();return}if(oe?u&&await u(a):!0){if(await N.validateFields(),oe){let Ne=a.newVal&&!ie.isNil(a.newVal[n])?a.newVal[n]:a.inProcess&&!ie.isNil(a.inProcess[n])?a.inProcess[n]:a[n];if((g==null?void 0:g.type)==="Date"){const Oe=(Et=g.props)==null?void 0:Et.format;Ne=Ne?ve(Ne,typeof Oe=="string"?Oe:"YYYY-MM-DD HH:mm:ss"):null}((g==null?void 0:g.type)==="TreeSelect"&&((Fe=g==null?void 0:g.props)!=null&&Fe.treeCheckable)||(g==null?void 0:g.type)==="Select"&&((We=g==null?void 0:g.props)==null?void 0:We.mode)==="multiple")&&(Ne==""?Ne=[]:typeof Ne=="string"&&(Ne=Ne.split(","))),N.setFieldsValue({[n]:Ne})}L(!q)}else Je()},B=async()=>{try{const oe=await N.validateFields();z(),Object.keys(oe).forEach(De=>{(oe[De]===null||oe[De]===void 0)&&(oe[De]=""),typeof oe[De]=="string"&&(oe[De]=oe[De].trim())}),i({...a,...oe})}catch{}},H=(oe,De)=>c||D.jsx("div",{className:zn.edit_cell,children:D.jsx(ei,{value:Za.renderReadonlyItem({value:oe[De],formitem:g}),highlight:le})}),{show:U}=lq({id:k}),J=()=>{v&&(s(),C&&C(oe=>({...oe,selectedCell:{dataIndex:n,record:a,tableKey:E}})))},re=oe=>{if(n){if(J(),oe.preventDefault(),g&&g.props&&g.props.disabled||!g||g.props&&!g.props)return;U(oe,{props:{key:{dataIndex:n,record:a}}})}};let ne=r;const se=a?a[n]:"",ce=F.Children.map(r,oe=>{var De;if(F.isValidElement(oe)){const Je=(De=oe==null?void 0:oe.props)==null?void 0:De.children;return!Je||!Array.isArray(Je)?null:Je.some(Et=>{const Fe=Et==null?void 0:Et.props;return Fe&&typeof Fe.className=="string"?Fe.className.includes("frontend-table-row-indent"):!1})?Je:null}else return null});if(!Sn.readPermission(se))return D.jsxs("td",{...P,children:[ce,D.jsx(pa,{inLine:!0})]});const{trulyHighlight:le}=Za.getTrulyHighlight({highlight:T,formitem:g});if(S){const oe=(M==null?void 0:M.overrideLinkCom)||"a";ne=D.jsx(oe,{userId:a[n],id:a[n],record:a,content:Za.renderReadonlyItem({value:a[n],formitem:g}),highlight:le})}else if(t){if(g.type==="Date"){const oe=(Le=g.props)==null?void 0:Le.format,De=typeof oe=="string";let Je,Ct;if(ve.isMoment(a[n])){const Et=a[n].creationData();Je=Et==null?void 0:Et.input,Ct=Et==null?void 0:Et.format}a[n]=a[n]?ve(Je||a[n],De?oe:Ct||"YYYY-MM-DD HH:mm:ss"):null}if(((he=g.props)!=null&&he.treeCheckable||((qe=g.props)==null?void 0:qe.mode)==="multiple")&&typeof a[n]=="string"&&(a[n]=a[n]?a[n].split(","):[]),q)ne=D.jsx("div",{onDoubleClick:oe=>{oe.stopPropagation()},children:D.jsx(Z.Form.Item,{validateTrigger:O.includes(g.type)?"blur":"onChange",style:{margin:0},name:n,children:D.jsx(Dq,{name:n,ref:j,onSave:()=>B(),formprops:g,record:a,apicode:h})})});else if(!x){let oe=H(a,n);ne=D.jsxs("div",{onContextMenu:R===!1?void 0:re,title:a.newVal?Za.renderReadonlyItem({value:a.newVal[n],formitem:g}):Za.renderReadonlyItem({value:a[n],formitem:g}),className:"editable-cell-value-wrap",style:{paddingRight:24},children:[ce,oe]})}}else if(n&&!x)return w?D.jsx("td",{...P,title:a&&a[n]?a[n]==="Draft"?Y("sys.label.draft",{placeholder:"草稿"}):a[n]:"",onClick:J,children:D.jsx(ei,{value:a&&a[n]?a[n]==="Draft"?Y("sys.label.draft",{placeholder:"草稿"}):a[n]:"",highlight:le})}):D.jsx("td",{...P,title:a&&a[n]?a[n]:"",onClick:J,children:D.jsx(ei,{value:a?ie.isNil(a[n])?"":a[n]:"",highlight:le})});const ye=ne==null?void 0:ne.toString(),we=Array.isArray(ne)&&ne[0]===void 0,Ee=ye!=null&&ye.includes("[object ")?void 0:we?ye==null?void 0:ye.replace(/^\,/,""):ye;return D.jsx("td",{...P,onDoubleClick:oe=>{oe.stopPropagation(),z(!0,oe)},onClick:()=>{n&&J()},children:D.jsx("div",{title:Ee,style:{width:"100%",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"},children:ne})})},Iq=()=>{function e(){return((1+Math.random())*65536|0).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()},Lq=e=>D.jsxs(gq,{id:e.menuId,children:[D.jsx(xx,{onClick:t=>{e.onFill&&e.onFill("up",t.props.key)},children:Y("sys.prompt.fillUp",{placeholder:"向上填充"})}),D.jsx(xx,{onClick:t=>{e.onFill&&e.onFill("down",t.props.key)},children:Y("sys.prompt.fillDown",{placeholder:"向下填充"})})]}),jq=e=>{const[t,r]=F.useState({}),[n,a]=F.useState({}),i=F.useRef(null),{Option:s}=Z.Select,l=(g,y)=>{r(g),a(y)};return{getColumnSearchProps:F.useCallback((g,y)=>{const x=()=>{var w,S;return typeof(y==null?void 0:y.title)=="string"?y==null?void 0:y.title:(S=(w=y==null?void 0:y.search)==null?void 0:w.props)==null?void 0:S.placeholder},E=(w,S,f)=>{S()},k=(w,S)=>{w(),S()},T=(w,S,f)=>{var _,R;const h={size:"small",onChange:C=>{C&&C.target?w(C.target.value?[C.target.value]:[]):w(C?[C]:[])},style:{marginBottom:8,display:"block"}},v=D.jsx(Z.Input,{size:"small",ref:i,placeholder:Y("project.create.attr.verify.scheduledDate.input",{placeholder:"请输入{content}",variate:{content:x()}}),value:S[0],onPressEnter:()=>E(S,f),...ie.omit(h,["size"])});if(y.search)switch(y.search.type){case"Input":return v;case"Select":let C=(R=(_=y==null?void 0:y.search)==null?void 0:_.props)==null?void 0:R.options;return y.apicode==="ProblemVersion"&&(C=ie.uniqBy(ie.flatten(Object.values(C||{})),"value")||[],C=C.map(P=>({label:P.label==="Draft"?Y("sys.label.draft",{placeholder:"草稿"}):P.label,value:P.value}))),C=(C||[]).filter(P=>Sn.readPermission(P.label)),D.jsx(Z.Select,{size:"small",onKeyUp:P=>{(P.keyCode===13||P.charCode==13)&&E(S,f)},ref:i,mode:"multiple",placeholder:`${Y("sys.label.selectOption",{placeholder:"请选择"})} ${x()}`,value:S[0],filterOption:(P,M)=>M.label&&M.label.indexOf(P)>=0,...ie.omit(h,["size"]),children:(C||[]).map(P=>{if(!P.isHidden)return F.createElement(s,{...P,value:P.value,disabled:P.disabled,key:P.value,label:P.label},D.jsx("div",{title:P.label,style:{width:"100%",overflow:"hidden",textOverflow:"ellipsis"},children:P.label}))})});case"Date":return D.jsx(Z.DatePicker,{size:"small",value:S[0],...ie.omit(h,["size"])});case"CompositeForm":return D.jsx("div",{className:"compositeFormClass",children:D.jsx(hc,{...y.formitem.props,valueType:y.valueType,value:S[0],size:"small",...ie.omit(h,["size"])})})}else return v};return y.search?{filterIcon:w=>D.jsx(gs,{style:{color:w?"#0563B2":void 0}}),filterDropdown:({setSelectedKeys:w,selectedKeys:S,confirm:f,clearFilters:h})=>D.jsxs("div",{style:{padding:8},children:[D.jsx("div",{style:{marginBottom:"5px"},children:T(w,S,f)}),D.jsxs(Z.Space,{children:[D.jsx(Z.Button,{type:"primary",onClick:()=>E(S,f),icon:D.jsx(gs,{}),size:"small",style:{width:90},children:Y("sys.filter",{placeholder:"筛选"})}),D.jsx(Z.Button,{onClick:()=>k(h,f),size:"small",style:{width:90},children:Y("sys.action.reset",{placeholder:"重置"})})]})]}),onFilterDropdownVisibleChange:w=>{w&&(y.search.type==="Input"||y.search.type==="Select")&&setTimeout(()=>{var S;return(S=i==null?void 0:i.current)==null?void 0:S.focus()},100)}}:{}},[]),setTableFiltered:g=>{l(g.sort(t),g.screen(n))},clearFilters:g=>{l({},{}),e&&e("","","",{},{isFooterRefresh:g==null?void 0:g.isFooterRefresh})},onFiltersChange:(g,y,x,E)=>{a(y),r(x),l(x,y);let k="",T="";ie.isArray(x)?x&&x.length&&(k=x.map(S=>`${S.field}-${S.order}`).join(",")):x.field&&x.order&&(k=`${x.field}-${x.order==="ascend"?"asc":"desc"}`);const w=S=>S.map(f=>Array.isArray(f)?f.join(","):ve.isMoment(f)?f.format("YYYY-MM-DD"):f);T=ie.remove(Object.keys(y).map(S=>y[S]&&typeof y[S][0]=="string"||typeof y[S]!="string"&&y[S]&&y[S][0]?`${S}-${w(y[S]||[]).join(",")}`:null),S=>S!==null).join("~!~"),e&&e(k,T,x.field,y)},sortInfo:t,filterInfo:n}},$q=e=>{var s,l;const t=((s=e.dataSource)==null?void 0:s.length)||0,r=e.total||0,n=e.rowSelection&&e.rowSelection.selectedRowKeys?(l=e.rowSelection.selectedRowKeys)==null?void 0:l.length:0,a={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},i=D.jsx(He,{type:"update",isBackend:!0,style:{fontSize:"12px",marginLeft:"8px",color:"#999999"},onClick:()=>{e.clearFilters&&e.clearFilters({isFooterRefresh:!0})}});return e.hideFooter?D.jsx(D.Fragment,{}):D.jsxs("div",{className:`${zn.table_footer} ${e.className||""}`,children:[e.hideTableCount?D.jsx("div",{}):e.customRender?e.customRender({tableDataLen:t,total:r,selectedLen:n,boxStyles:a,refreshNode:i}):D.jsxs("div",{style:a,children:[Y("project.tab.plan.criticalPath.window.total",{placeholder:"共"}),D.jsxs("span",{children:[" ",t,"/",r," "]}),Y("project.tab.plan.quantityDisplay.select",{placeholder:"条"}),","," ",Y("sys.selected",{placeholder:"已选"}),D.jsx("span",{children:` ${n} `}),Y("project.tab.plan.quantityDisplay.select",{placeholder:"条"}),i]}),e.enterFullscreen&&D.jsx("div",{children:D.jsx(He,{type:"a-front-fitscreen",style:{fontSize:"12px",color:"#999999"},isBackend:!0,onClick:()=>{e.enterFullscreen&&e.enterFullscreen()}})})]})},zq=(e,t,r,n,a,i,s)=>{var f;const[l,u]=F.useState(!1),[c,m]=F.useState(0),[p,g]=F.useState(e.columns||[]),[y,x]=F.useState(null),[E,k]=F.useState(null),T=h=>(v,{size:_})=>{v.stopImmediatePropagation();const R=[...p];R[h]={...R[h],width:_.width},g(R)};F.useEffect(()=>{g(e.columns)},[e.columns]);const w=Number(((f=e==null?void 0:e.scroll)==null?void 0:f.y)||i)+24;return{renderColumns:p?p.filter(h=>h).map((h,v)=>ie.extend({...h,sorter:h.sorter?{}:!1,required:h.editable?h.required:!1,sortOrder:t.field===h.dataIndex&&t.order,filteredValue:r?r[h.dataIndex]||[]:[],onHeaderCell:_=>({dataIndex:h.dataIndex,width:_.width,required:h.required,editable:h.editable,trulyHeight:w,tableKey:e.tableKey,formitem:h.formitem,onResize:T(v),onResizeOver:R=>{m(R.screenX),u(!0)},onResizeStop:R=>{console.log(R),u(!1)}}),onCell:_=>{var P,M;const R=((P=h==null?void 0:h.onCell)==null?void 0:P.call(h,_))||{},C=(typeof e.rowKey=="string"?e.rowKey:(M=e.rowKey)==null?void 0:M.call(e,_))||"id";return{record:_,className:`${h.className??""} ${h.dataIndex==E&&_[C]==y?zn.loading:""}`,editable:h.editable,isVersion:h.isVersion,isUser:h.isUser,apicode:h.apicode,dataIndex:h.dataIndex,title:h.title,formitem:h.formitem,required:h.required,canselectcell:e.canselectcell,rowKey:e.rowKey||"id",tableKey:e.tableKey,menuId:n,render:h.render,highlight:r[h.dataIndex],fillContextMenu:e.fillContextMenu,selectedCell:s,renderCacheCell:Za.renderCacheCell(_,h.dataIndex,h.formitem,void 0,{highlight:r[h.dataIndex]}),handleCellSelected:()=>{e.onSelectCell&&e.onSelectCell()},handleDoubleClick:q=>{if(e.onDoubleClick){const L=e.onDoubleClick(h,q);return L instanceof Promise&&(x(_[C]),k(h.dataIndex),L.finally(()=>{x(null),k(null)})),L}else return!0},handleSave:q=>{e.onSubmit&&e.onSubmit(q,h)},...R}}},a(h.dataIndex,h))):[]}},lC="INPUT_NAMESPACE",Bq=(e,t,r,n)=>{const[a,i]=F.useState();function s(l){const u=l.toString(),c=u.indexOf(".");return c===-1?0:u.slice(c+1).length}return F.useEffect(()=>{async function l(u){var y,x,E,k,T,w,S,f,h,v;if(u.target instanceof HTMLInputElement&&((x=(y=u.target)==null?void 0:y.dataset)==null?void 0:x.type)!=lC||u.target instanceof HTMLTextAreaElement||!u.target.closest(`.${_h}`)){console.log("is Input or TextArea or not Table");return}u.preventDefault();let c=(E=u.clipboardData)==null?void 0:E.getData("text");const m=await Promise.resolve().then(()=>require("./xlsx-DtQJwEPb.js"));if(c&&r&&n){var p=m.read(c,{type:"binary"}),g=p.SheetNames;const _=m.utils.sheet_to_json(p.Sheets[g[0]],{header:1,raw:!1,defval:"",blankrows:!0}),R=n.findIndex(M=>{var q,L,N;return M.dataIndex==r.dataIndex&&M.editable&&(((q=M.formitem)==null?void 0:q.type)=="Input"||((L=M.formitem)==null?void 0:L.type)=="Input.TextArea"||((N=M.formitem)==null?void 0:N.type)=="Number")});let C=n.findIndex((M,q)=>{var L,N,j;return q>R&&(!M.editable||!(((L=M.formitem)==null?void 0:L.type)=="Input"||((N=M.formitem)==null?void 0:N.type)=="Input.TextArea"||((j=M.formitem)==null?void 0:j.type)=="Number"))});C==-1&&(C=n.length);const P=n.slice(R,C);if(P.length>0){const M=_.map(q=>q.filter(L=>q.indexOf(L)<P.length))||[];for(let q=0;q<M.length;q++){const L=M[q]||[];for(let N=0;N<L.length;N++){const j=L[N],O=((k=P[N].formitem)==null?void 0:k.type)=="Number",I=(w=(T=P[N].formitem)==null?void 0:T.props)==null?void 0:w.precision,z=(f=(S=P[N].formitem)==null?void 0:S.props)==null?void 0:f.min,B=(v=(h=P[N].formitem)==null?void 0:h.props)==null?void 0:v.max;if(O){const H=ie.toNumber(j),U=H&&(z?H>=z:!0)&&(B?H<=B:!0)&&(ie.isNumber(I)&&I>0?s(H)<=I:!0);L[N]=U?H:void 0}}}i(M)}}}return document.addEventListener("paste",l),()=>{document.removeEventListener("paste",l)}},[r,n]),{pasteData:a}},Hq=e=>`${e}Key`,sg=e=>e.keyCode==17?"ctrl":e.keyCode==18?"alt":e.keyCode==91?"meta":e.keyCode==16?"shift":e.key,Uq=(e,{shortcuts:t,namespace:r})=>{const n="+",a=(...l)=>`${e}+${l.join(n)}`,i=xn(t),s=xn(ie.fromPairs(i.current.map(([l,u])=>[a(...l),u])));F.useEffect(()=>{console.log("初始化 useShortcutKey");const l=()=>i.current.map(([y])=>y).flat(1),u=y=>{var x,E,k;(!r||((x=y.target)==null?void 0:x.id)==r)&&(c.push(sg(y)),(k=(E=s.current)[c.join(n)])==null||k.call(E,y))},c=[],m={},p=y=>{var x;if(!r||((x=y.target)==null?void 0:x.id)==r){const E=sg(y);y[Hq(e)]&&!m[E]&&(m[E]=!0,l().includes(y.key)&&c.includes(e)&&y.preventDefault(),u(y))}},g=y=>{const x=sg(y);m[x]=!1,c.pop()};return window.addEventListener("keyup",g),window.addEventListener("keydown",p),()=>{window.removeEventListener("keyup",g),window.removeEventListener("keydown",p)}},[])},qq=(e,t)=>{const[r,n]=F.useState(!0),{clipboard:a,dataSource:i=[],rowSelection:s}=e,{selectedRowKeys:l=[]}=s||{},{childKeyName:u="children",isMark:c=!0,initialState:m,setInitialState:p}=a||{},g=String(e.rowKey||"id"),[y,x]=F.useState(!1),E=()=>y&&l.length,k=h=>v=>{E()&&h(v)},T=async(h,v)=>{var R;const _=[];_.type="shear",_.namespace=t,v.forEach(C=>{vt.isDelTableRow(C)||_.push({...C,toShear:()=>C.shear=!0})}),vt.ArrayAttributeFlat(_,u,C=>{C.toShear||(C.shear=!0)}),(!h.onBeforeShear||await h.onBeforeShear(_))&&(_.forEach(C=>{C.toShear(),delete C.toShear}),console.log("剪切",_),p&&p(C=>({...C,clipboard:_})),h.setDataSource("shear",i),(R=h.onAfterShear)==null||R.call(h,_),_.length&&(_.onPasteCallback=async C=>{var L;const P=C==t,M=[...i],q=()=>{p&&p(N=>({...N,clipboard:[]})),[..._].reverse().forEach(N=>{const j=vt.getTreeRelationNoRecursion({data:M,lookup:O=>O[g]==N[g],childrenKey:u});c&&j.self.dataType!=="add"?(j.self.shear=!1,j.self.dataType="del",vt.ArrayAttributeFlat(j.self[u],u,O=>{O.toShear||(O.shear=!1,O.dataType="del")})):j.parent?j.parent[u].splice(j.index,1):M.splice(j.index,1)}),h.setDataSource("shear",M)};return!h.onBeforeDeleteShear||await h.onBeforeDeleteShear({isSameSpace:P,deletes:_})?(q(),(L=h.onAfterDeleteShear)==null||L.call(h,{isSameSpace:P,deletes:_}),Promise.resolve(M)):Promise.reject(Y("sys.operation.cutFailed",{placeholder:"剪切失败"}))}))},w=async(h,v)=>{var R;const _=[];_.type="copy",_.namespace=t,v.forEach(C=>{vt.isDelTableRow(C)||(C.shear=!1,vt.ArrayAttributeFlat(C[u],u,P=>{P.shear=!1}),_.push({...C}))}),(!h.onBeforeCopy||await h.onBeforeCopy(_))&&(console.log("复制",_),p&&p(C=>({...C,clipboard:_})),h.setDataSource("paste",i),(R=h.onAfterCopy)==null||R.call(h,_))},S=async(h,{pasteData:v,pasteTarget:_})=>{var C,P;const R=vt.ArrayAttributeFlat(v,u).every(M=>!_.includes(M[g]));if(console.log({isNonSelf:R}),_.length==1&&v.length&&R){const q=vt.ArrayAttributeFlat(i,u).find(N=>N[g]==_[0]),L=h.pasteInto||"child";if(!h.onBeforePaste||await h.onBeforePaste({target:q,rows:v,type:L}))try{const N=await((C=v.onPasteCallback)==null?void 0:C.call(v,t))||[...i],j=vt.getTreeRelationNoRecursion({data:N,lookup:O=>O[g]==q[g],childrenKey:u});if(c){const O=I=>I.map(z=>Object.assign({...z,shear:!1,dataType:"add",[g]:vt.generateUUID(),primitiveInsId:z.primitiveInsId||z[g]},z[u]?{[u]:O(z[u].filter(B=>!I.some(H=>H[g]==B[g]))||[])}:{}));v=O(v)}if(L=="child"){const O=j.self[u];j.self[u]=[...O,...v]}else j.parent?j.parent[u].splice(j.index+1,0,...v):N.splice(j.index+1,0,...v);h.setDataSource("paste",N),(P=h.onAfterPaste)==null||P.call(h,{target:q,type:L})}catch(N){console.error(N)}}};a&&Uq(vt.isMac()?"meta":"ctrl",{shortcuts:[[["x"],k(async()=>{const h=vt.ArrayAttributeFlat(i,u).filter(v=>l.includes(v[g]));console.log({shearList:h}),T(a,h)})],[["c"],k(async()=>{const h=vt.ArrayAttributeFlat(i,u).filter(v=>l.includes(v[g]));console.log({copyList:h}),w(a,h)})],[["v"],k(async()=>{const h=(m==null?void 0:m.clipboard)||[];S(a,{pasteData:h,pasteTarget:l})})]],namespace:t});const f=F.useRef(null);return F.useEffect(()=>{var h;r||((h=f.current)==null||h.focus(),x(!0))},[l.length,l[0]]),F.useEffect(()=>{n(!1)},[]),{namespace:t,isGainFocus:y,focus:()=>{var v;const h=document.querySelector(":focus");h instanceof HTMLInputElement||h instanceof HTMLTextAreaElement||(v=f.current)==null||v.focus()},shear:T,copy:w,paste:S,FocusDom:D.jsx("input",{ref:f,"data-type":lC,type:"text",id:t,onFocus:()=>x(!0),onBlur:()=>x(!1),readOnly:!0,style:{opacity:0,position:"fixed",left:"-100%",top:"-100%",zIndex:"-10"}})}},Wq=(e,t,r,n)=>{const[a,i]=F.useState();return F.useEffect(()=>{async function s(l){if(r){const u=l.clipboardData,c=r.dataIndex,m=r.record;let p=null;if(m.newVal&&Object.hasOwn(m.newVal,c)?p=m.newVal[c]:p=m[c]||null,p)try{u.setData("text/plain",p),i(p),l.preventDefault()}catch(g){console.error("Failed to write to clipboard: ",g)}}}return document.addEventListener("copy",s),()=>{document.removeEventListener("copy",s)}},[r,n]),{copyData:a}},Iv=F.createContext(null),_h="tableTopBox",wh=F.forwardRef((e,t)=>{var M;F.useImperativeHandle(t,()=>({scrollTo:q=>{i.current.scrollTo(q)},scrollXTo:q=>{if(a.current){const L=a.current.querySelector(".frontend-table-body");L&&(L.scrollLeft=q)}},clearFilters:m,setTableFiltered:y,clipboard:P}));const[r]=F.useState(vt.generateUUID()),n=F.useRef(null),a=F.useRef(null),i=F.useRef(null),[s]=Z.Form.useForm(),l=Iq(),{sortInfo:u,filterInfo:c,clearFilters:m,getColumnSearchProps:p,onFiltersChange:g,setTableFiltered:y}=jq(e.onFilterAndSorter),[x,{toggleFullscreen:E,exitFullscreen:k}]=uS(a,{pageFullscreen:{zIndex:500}}),T=e.tableKey||r;F.useEffect(()=>{const q=L=>{L.key=="Escape"&&x&&k()};return addEventListener("keydown",q),()=>{removeEventListener("keydown",q)}});const w=JU({hideFooter:!!e.hideFooter,contentRef:n,tableRef:a,scroll:e.scroll,fullScreenMinusHeight:e.fullScreenMinusHeight||0,scrollUpdate:e.scrollUpdate,onTableHeightChange:e==null?void 0:e.onTableHeightChange},!!e.isFullscreen||x),[S,f]=ZU(()=>({scroll:{y:1e3},ref:i}),[]),h={header:{cell:nq},body:{cell:Nq}};F.useMemo(()=>f(h),[f]);const{renderColumns:v}=zq({...e,tableKey:T},u,c,l,p,w,e.selectedCell),{pasteData:_}=Bq(a,e.dataSource,e.selectedCell,e.columns);F.useEffect(()=>{var q;if(_&&e.selectedCell){const L=e.dataSource||[],N=String(e.rowKey)||"id",j=L.findIndex(J=>{var re;return J[N]==((re=e.selectedCell)==null?void 0:re.record[N])}),O=e.columns.findIndex(J=>{var re;return J.dataIndex==((re=e.selectedCell)==null?void 0:re.dataIndex)});let I=((q=_[0])==null?void 0:q.length)||0,z=(_==null?void 0:_.length)||0;const B=e.columns.slice(O,O+I),H=L.slice(j,j+z);let U=[];_.forEach((J,re)=>{if(H.length>re){const ne={};J.forEach((se,ce)=>{B.length>ce&&(ne[B[ce].dataIndex]=se,ne[N]=H[re][N])}),U.push(ne)}}),e.onPaste&&e.onPaste(vt.transformArrayToMap(U,N))}},[_]);const{copyData:R}=Wq(a,e.dataSource,e.selectedCell,e.columns);F.useEffect(()=>{R&&e.selectedCell&&e.onCopy&&e.onCopy(R)},[R]);const{run:C}=GF(async q=>{const L=e.pageNo||1,N=e.pageSize||10,j=e.total||0;Math.abs(parseInt(q.target.scrollTop+q.target.clientHeight)-q.target.scrollHeight)<1.5&&!e.loading&&L*N<j&&e.onScroll&&e.onScroll(L+1)},{wait:400}),P=qq(e,r);return D.jsxs("div",{ref:n,id:`table_key_${T}`,className:`${zn.main} ${_h}`,style:{position:"relative",overflow:"hidden"},onClick:q=>P.focus(),onScrollCapture:q=>{q.target.scrollHeight!==24&&q.target.className==="frontend-table-body"&&(e.onBeforeScroll?e.onBeforeScroll()&&C(q):C(q))},children:[D.jsx(Lq,{menuId:l,...ie.pick(e,["onFill"])}),P.FocusDom,D.jsxs(Z.Form,{form:s,component:!1,children:[D.jsx(Iv.Provider,{value:s,children:D.jsx(Z.Table,{className:Te(e.showcheckbox?void 0:"table-checkbox"),ref:a,rowKey:e.rowKey||"id",style:{borderBottom:"1px solid #e4e4e4",borderRight:"1px solid #e4e4e4",background:"#fff"},pagination:!1,components:S,bordered:!0,...ie.omit(e,["columns","scroll","expandable","tableKey"]),tableKey:T,loading:{indicator:D.jsx(lc,{style:{fontSize:32},spin:!0}),spinning:!!e.loading},showSorterTooltip:!1,expandable:{indentSize:18,expandIcon:({expanded:q,onExpand:L,record:N,expandable:j})=>N.children&&N.children.length||N.hasChildren?q?D.jsx(R8,{className:"expand",onClick:O=>{L(N,O)}}):D.jsx(P8,{className:"expand",onClick:O=>{L(N,O)}}):(e.isTree||j!==void 0)&&D.jsx("span",{style:{float:"left",width:"15px",height:"1px"}}),...e.expandable},scroll:{y:w,scrollToFirstRowOnChange:!0,...ie.merge(e.scroll,{x:(M=e.scroll)==null?void 0:M.x})},columns:v,onChange:g})}),D.jsx($q,{...e,className:e.tableFooterClassName,clearFilters:m,enterFullscreen:e==null?void 0:e.toggleFullscreen,customRender:e.tableFooterDateRender})]})]})}),{Option:Jo}=Z.Select,cC=F.forwardRef((e,t)=>{const r=F.useRef("1848553711328477186"),[n,a]=F.useState([]),[i,s]=F.useState([]),[l,u]=F.useState([]),c=Br({pageNo:1,pageSize:50,total:0}),m=Br({sorter:"",filters:"",itemCodes:`${Si.material},${Si.document},${Si.file}`,initialItemCodes:""}),p=Br({loading:!1,searchValue:"",focus:!1,excludeIds:"",objectIds:"",columns:[{title:Y("sys.label.nameRe",{placeholder:"姓名"}),ellipsis:!0,dataIndex:"Name",sorter:!0,width:155},{title:Y("project.attr.owner.edit.window.email",{placeholder:"邮箱"}),ellipsis:!0,dataIndex:"Email",sorter:!0,width:155},{title:Y("sys.label.employeeID",{placeholder:"工号"}),ellipsis:!0,dataIndex:"EmpNo",sorter:!0,width:155}],conditionObject:[],sideChoice:0,columnsHighlight:[]});zs(()=>{var w;let T=[];for(let S of e.columns||p.columns)T.push({...S,render:!S.render&&((w=e.placeholderCode)!=null&&w.includes(S.dataIndex))?f=>D.jsx(ei,{value:f,highlight:g.numberHighLight||[]}):S.render});p.columnsHighlight=T,e.isSelect&&e.allCategories?e.getItems().then(S=>{if(S.code==200){let f=[];for(let v of S.result)v.code!=10001019&&v.code!=10001017&&v.code!=10001018&&f.push({label:v.name,value:v.code});p.conditionObject=f;let h=ie.map(f,"value").join(",");m.itemCodes=h,m.initialItemCodes=ie.cloneDeep(h),x(!0)}}):x(!0)}),F.useEffect(()=>(e.enter&&!p.focus&&l.length>0?y():document.onkeydown=null,()=>{document.onkeydown=null}),[l,p.focus]),F.useImperativeHandle(t,()=>({getLoading:T=>{p.loading=T},backfill:T=>{u(T)}}));const g=Br({numberHighLight:[]}),y=()=>{document.onkeydown=function(T){var w=window.event||T,S=w.keyCode||w.which;if(S==13&&!p.loading){if(e.maxSelect&&l.length+(e.value||[]).length>e.maxSelect){Z.message.error(Y("sys.maxSelect",{placeholder:"至多选择{maxSelect}个",variate:{maxSelect:e.maxSelect}}));return}let f=l.length?ie.map(l,"id").join(","):"";e.onChange&&e.onChange(f),e.handleSubmit&&e.handleSubmit(l)}}},x=async(T=!1,w)=>{p.loading=!0;const{pageNo:S,pageSize:f}=c,{filters:h,sorter:v,itemCodes:_}=m;if({...e.params},p.searchValue&&(e.formate=="1"||e.formate=="2"?e.params.columns.split(",").map(M=>M+"-"+p.searchValue).join("~!~"):p.searchValue),!e.getUrlData){a([]),c.total=0,p.loading=!1;return}const{records:R,total:C}=await e.getUrlData({pageNo:S,pageSize:f,filters:h,sorter:v,refreshSize:w});p.loading=!1;const P=R||[];c.total=C,T?(a(P),s(ie.cloneDeep(P)),e.onInit&&e.onInit(P)):(a([...n,...P]),s(ie.cloneDeep([...n,...P])))},E=T=>{T=="0"?m.itemCodes=m.initialItemCodes:m.itemCodes=T,a([]),u([]),c.pageNo=1,p.searchValue="",x(!0,c.pageSize)},k=T=>{u([]),e.searchChange&&e.searchChange(T),p.searchValue=T,g.numberHighLight=T?[T]:[],c.pageNo=1,x(!0)};return D.jsx(To,{width:e.width,forceRender:!0,className:rg.tableSelection,modalTitle:e.title,mask:!1,visible:e.visible,maskClosable:!1,onCancel:()=>{e.onCancel&&e.onCancel()},footer:null,destroyOnClose:!0,onOk:async()=>{e.handleSubmit&&e.handleSubmit(l)},children:D.jsxs("div",{style:e.isBroadside?{display:"flex"}:{},children:[e.isBroadside&&D.jsx("div",{className:rg.sideBox,style:{paddingRight:e.isLibrary?"12px":"0px",minWidth:e.isLibrary?"110px":void 0,overflow:"hidden"},children:e.isLibrary?D.jsx(W4,{itemCode:Si.technology,onGetTreeFields:T=>{},onSelected:T=>{r.current=T.id,c.pageNo=1,x(!0)},outIsSelected:!1,getInstanceMenu:()=>{},getAttributeByTab:()=>{}}):[Y("sys.myCreated",{placeholder:"我创建的"}),Y("sys.label.all",{placeholder:"全部"})].map((T,w)=>D.jsx("div",{onClick:()=>{p.sideChoice=w,c.pageNo=1,x(!0)},style:{marginBottom:"12px",cursor:"pointer",color:w==p.sideChoice?"#0563b2":""},children:T},w))}),D.jsxs("div",{style:{width:(e.isBroadside,"100%"),overflow:"hidden"},children:[!e.noSearch&&D.jsx(Z.Form.Item,{rules:[{required:!1}],children:D.jsxs("div",{style:{display:"flex"},children:[e.isSelect&&D.jsxs(D.Fragment,{children:[e.allCategories&&p.conditionObject.length>0&&D.jsxs(Z.Select,{disabled:p.loading,defaultValue:"0",style:{width:120,marginRight:"10px"},onChange:T=>{E(T)},children:[D.jsx(Jo,{value:"0",children:Y("sys.label.all",{placeholder:"全部"})}),"(",p.conditionObject.map(T=>D.jsx(Jo,{value:T.value,children:T.label})),")"]}),!e.allCategories&&D.jsxs(Z.Select,{disabled:p.loading,defaultValue:"0",style:{width:120,marginRight:"10px"},onChange:T=>{E(T)},children:[D.jsx(Jo,{value:"0",children:Y("sys.label.all",{placeholder:"全部"})}),D.jsx(Jo,{value:Si.material,children:Y("sys.label.material",{placeholder:"物料"})}),D.jsx(Jo,{value:Si.document,children:Y("sys.document.document",{placeholder:"文档"})}),D.jsx(Jo,{value:Si.file,children:Y("sys.label.file",{placeholder:"文件"})})]})]}),D.jsx(Z.Input,{style:{width:240},onBlur:()=>{p.focus=!1},onFocus:()=>{p.focus=!0},allowClear:!0,value:p.searchValue,placeholder:e.placeholder||Y("sys.enterSearch",{placeholder:"请输入搜索内容"}),suffix:D.jsx(He,{type:"content-search",style:{color:"#BABABA"},onClick:()=>{k(p.searchValue)}}),onChange:T=>{p.searchValue=T.target.value,T.target.value||(u([]),e.searchChange&&e.searchChange(""),c.pageNo=1,g.numberHighLight=[],x(!0))},onPressEnter:T=>{k(T.target.value)}})]})}),e.isDownload&&D.jsxs("div",{style:{display:"flex",marginBottom:"12px"},children:[D.jsx(He,{disabled:!l.length,placement:!0,type:"rightbar-download",style:{marginRight:"5px",fontSize:"15px"},onDivClick:()=>{e.handleSubmit&&e.handleSubmit(l,"1")},children:Y("sys.label.download",{placeholder:"下载"})}),D.jsx("span",{style:{marginRight:"24px"}}),D.jsxs(He,{disabled:!l.length,placement:!0,type:"rightbar-download",style:{marginRight:"5px",fontSize:"15px"},onDivClick:()=>{e.handleSubmit&&e.handleSubmit(l,"2")},children:[Y("sys.label.download",{placeholder:"下载"}),"PDF"]})]}),D.jsx("div",{className:rg.tableFrame,style:{display:"flex"},children:D.jsx(wh,{onSelectCell:()=>{u([])},expandable:{expandIconColumnIndex:e.isLibrary?2:void 0},rowSelection:{columnWidth:15,fixed:"left",hideSelectAll:!e.isCheckbox,selectedRowKeys:l.map(T=>T.id),onChange:(T,w)=>{e.isCheckbox?u(w):w.length?u([w.pop()]):u([])},getCheckboxProps:T=>({disabled:T.number==="~#~"||!!(e.convertFun&&ie.includes(T.unique,"-"))})},onRow:T=>({onDoubleClick:()=>{if(T.number!=="~#~")if(l.length>1){if(e.maxSelect&&l.length+(e.value||[]).length>e.maxSelect){Z.message.error(Y("sys.maxSelect",{placeholder:"至多选择{maxSelect}个",variate:{maxSelect:e.maxSelect}}));return}e.onChange&&e.onChange(ie.map(l,"id").join(",")),e.handleSubmit&&e.handleSubmit(l)}else u([T]),e.onChange&&e.onChange(T.id),e.handleSubmit&&e.handleSubmit([T])}}),loading:p.loading,dataSource:n,columns:p.columnsHighlight,...c,scroll:{y:e.height||200},onScroll:T=>{c.pageNo=T,x()},onFilterAndSorter:(T,w,S)=>{if(u([]),e.isBuiltInSort)if(T){let f=ie.orderBy(n,[T.split("-")[0]],[T.split("-")[1]]);a(f)}else a(i);else{if(e.isUseRuleSort){const f=Za.sortAndFilterTable({sorters:T,filters:w,sortersField:S,tableColumns:e.columns});m.sorter=f.sorters,m.filters=f.filters}else m.sorter=T,m.filters=w;c.pageNo=1,x(!0)}}})})]})]})})}),Vq="_selectFrameBox_mktv5_1",Yq={selectFrameBox:Vq},dC=F.forwardRef((e,t)=>{var s;const[r,n]=F.useState(e.value);F.useEffect(()=>{n(e.value)},[e.value]);const a=Br({visible:!1,options:[],enter:!1});F.useEffect(()=>{e.options&&e.options.length&&(a.options=e.options)},[e.options]);const i=()=>{var m;const l=(m=e.params)==null?void 0:m.ids,u=l?l.join(","):"",c=e.isCheckbox?r&&r.join(","):r;return`${u}${c!=null&&c.length&&u?",":""}${c??""}`};return D.jsxs("div",{className:Yq.selectFrameBox,style:e.width?{width:e.width}:void 0,children:[e.disabled&&e.userLink?D.jsx("div",{children:(s=ie.filter(e.options,l=>l.id==r)[0])==null?void 0:s.Name}):D.jsxs("div",{style:{display:"flex",gap:"5px"},children:[D.jsx(Z.Select,{style:{minWidth:"80px"},mode:"multiple",allowClear:!0,open:!1,showSearch:!1,disabled:e.disabled,value:r||void 0,options:a.options,fieldNames:e.fieldNames?e.fieldNames:{label:"label",value:"value"},placeholder:e.placeholder||Y("sys.label.selectOption",{placeholder:"请选择"}),onClick:()=>{e.disabled||(a.visible=!0,a.enter=!0)},onChange:l=>{e.onChange&&e.onChange(l)},tagRender:l=>Sn.readPermission(l.label)?D.jsx(Z.Tag,{color:"blue",closable:!0,style:{borderRadius:"0",border:"none",fontSize:"12px",padding:"2px 7px"},closeIcon:D.jsx(He,{type:"close",style:{fontSize:"12px",cursor:"pointer"},onClick:()=>{const u=r.filter(c=>c!==l.value);n(u),e.onChange&&e.onChange(u)}}),children:l.label},l.value):D.jsx(pa,{})}),e.showButton?D.jsx(Z.Button,{onClick:()=>{a.visible=!0,a.enter=!0},style:{display:"flex",height:"32px",width:"32px",background:"#fafafa",alignItems:"center",justifyContent:"center"},children:D.jsx(He,{type:"content-search",style:{fontSize:"16px"}})}):D.jsx(D.Fragment,{})]}),a.visible&&D.jsx(cC,{visible:a.visible,title:e.title||Y("sys.label.selectOption",{placeholder:"请选择"}),url:e.url,width:e.modalWidth,value:e.value,formate:e.formate,noSearch:e.noSearch,isUseRuleSort:e.isUseRuleSort,params:{...e.params,ids:i()},isLibrary:e.isLibrary,isBroadside:e.isBroadside,height:e.height,enter:a.enter,placeholder:e.searchPlaceholder||Y("sys.enterKeyword.enterKeyword",{placeholder:"请输入关键字"}),placeholderCode:e.placeholderCode||"",columns:e.columns,isCheckbox:e.isCheckbox,maxSelect:e.maxSelect,onChange:l=>{if(e.isCheckbox){let u=ie.compact(ie.concat(r,l.split(",")));e.onChange&&e.onChange(l?u:void 0)}else e.onChange&&e.onChange(l)},handleSubmit:l=>{e.isCheckbox?a.options=ie.concat(a.options,l):a.options=l,e.onSubmit&&e.onSubmit(a.options),a.visible=!1,a.enter=!1},onInit:l=>{a.options=l},onCancel:()=>{a.visible=!1,a.enter=!1}})]})}),Gq="_searchTextTips_daoe4_1",Kq={searchTextTips:Gq};function Xq({fetchOptions:e,debounceTimeout:t=500,...r}){const[n,a]=F.useState(!1),[i,s]=F.useState([]),l=F.useRef(0);F.useEffect(()=>{s(r.options)},[r.options]);const u=F.useMemo(()=>{const c=m=>{l.current+=1;const p=l.current;s([]),a(!0),e(m,r).then(g=>{p===l.current&&(s(g),a(!1))})};return ie.debounce(c,t)},[e,t]);return D.jsx(Z.Select,{...r,labelInValue:!0,showArrow:!0,filterOption:!1,onSearch:u,notFoundContent:n?D.jsx("div",{style:{textAlign:"center"},children:D.jsx(Z.Spin,{size:"small"})}):D.jsx(Z.Empty,{image:Z.Empty.PRESENTED_IMAGE_SIMPLE}),options:i,onBlur:()=>{s(r.options)},url:void 0,ischeckbox:void 0,dropdownRender:c=>D.jsxs(D.Fragment,{children:[c,D.jsx(Z.Divider,{style:{margin:"8px 0"}}),D.jsx("div",{className:Kq.searchTextTips,children:`${Y("sys.resultDisplayLimit",{placeholder:"结果只显示前{count}条",variate:{count:100}})},${Y("sys.input.enterExactQuery",{placeholder:"请输入参数精确查询"})}`})]})})}async function kx(e,t){var i,s;let r,n={pageNo:1,pageSize:100,...t.params};e&&(n.andQuery=`${t.params.andQuery}~!~${t.fieldNames.label}-${e}`),typeof t.url=="function"?r=await t.url(n):r=await t.getPageList(t.url,n,ie.includes(t.url,"opendata"));let a;return(i=t.fieldNames)!=null&&i.label?a=ie.reject((s=r.result)==null?void 0:s.records,l=>{var u;return l[(u=t.fieldNames)==null?void 0:u.label]==="~#~"}):a=r.result.records,a}const Zq=F.forwardRef((e,t)=>{const[r,n]=F.useState(e.value),[a,i]=F.useState([]);return zs(async()=>{i(await kx("",e))}),D.jsx(Xq,{...e,showSearch:!0,mode:e.ischeckbox?"multiple":void 0,value:r,fetchOptions:kx,style:{width:"100%"},options:a,fieldNames:e.fieldNames?e.fieldNames:{label:"label",value:"value"}})}),Jq=e=>D.jsx(D.Fragment,{}),vf=e=>D.jsx(Z.TreeSelect,{...e,showSearch:!0,treeNodeFilterProp:"label",getPopupContainer:t=>t.parentNode||document.body}),fC=F.forwardRef((e,t)=>{const r=F.useContext(Qf),n=(r==null?void 0:r.formItemCom)||{},a=F.useCallback((l,u)=>{var g,y;const{type:c,cannotread:m,props:p}=l;if(m!=="0"){let x=!1;if(typeof e.readOnly=="boolean"?x=e.readOnly:typeof e.readOnly=="function"&&(x=e.readOnly()),c==="Input")return;if(c==="Select")return p!=null&&p.loading?(u="",D.jsx(Z.Form.Item,{noStyle:!0,children:D.jsx(ho,{...p,options:[],loading:!0,value:((y=(g=e==null?void 0:e.content)==null?void 0:g.props)==null?void 0:y.mode)==="multiple"?[]:"",disabled:x||(p==null?void 0:p.disabled)})})):p!=null&&p.options&&p.options.length?typeof u=="string"&&u.split(",").length>1&&(p==null?void 0:p.mode)!=="multiple"?e.readOnly?D.jsx("span",{style:{paddingLeft:"5px"},children:u.split(",").map(E=>D.jsx(Z.Tag,{children:vt.getLabelInOptions({value:E,options:(p==null?void 0:p.options)||[]})},E))}):(p.options=[...p==null?void 0:p.options,{label:u.split(",").map(E=>vt.getLabelInOptions({value:E,options:(p==null?void 0:p.options)||[]})).join(","),disabled:!0,value:u}],D.jsx(ho,{filterOption:(E,k)=>k.label&&k.label.indexOf(E)>=0,...p,showSearch:!0,disabled:x||(p==null?void 0:p.disabled)})):D.jsx(ho,{filterOption:(E,k)=>k.label&&k.label.indexOf(E)>=0,...p,showSearch:!0,disabled:x||(p==null?void 0:p.disabled)}):D.jsx(ho,{...p,showSearch:!0,options:[],disabled:x||(p==null?void 0:p.disabled)});if(c==="PopupSelect")return p.options===void 0||p.options.length>0?D.jsx(dC,{...p,title:e.label,disabled:x||(p==null?void 0:p.disabled)},e.name):"";if(c==="SearchSelect")return D.jsx(Zq,{...p},e.name);if(c==="Checkbox")return D.jsx(Z.Checkbox,{...p,disabled:x||(p==null?void 0:p.disabled)});if(c==="Checkbox.Group")return D.jsx(Z.Checkbox.Group,{...p,disabled:x||(p==null?void 0:p.disabled)});if(c==="Input.TextArea")return x?D.jsx(Z.Input.TextArea,{...p,disabled:!0}):D.jsx(Z.Input.TextArea,{...p});if(c==="Input.Password")return x?D.jsx(Z.Input.Password,{...p,disabled:!0}):D.jsx(Z.Input.Password,{...p});if(c==="Date")return x?D.jsx(Z.DatePicker,{...p,size:"middle",placeholder:"",disabled:x||(p==null?void 0:p.disabled)}):D.jsx(Z.DatePicker,{...p});if(c==="DatePicker.RangePicker")return x?D.jsx(Z.DatePicker.RangePicker,{...p,disabled:x||(p==null?void 0:p.disabled),placeholder:["",""],separator:""}):D.jsx(Z.DatePicker.RangePicker,{...p});if(c==="TimePicker.RangePicker")return x?D.jsx(Z.TimePicker.RangePicker,{...p,disabled:x||(p==null?void 0:p.disabled)}):D.jsx(Z.TimePicker.RangePicker,{...p});if(c==="Switch")return D.jsx(Z.Switch,{...p,disabled:x||(p==null?void 0:p.disabled)});if(c==="Number")return(p==null?void 0:p.apicode)==="FileSize"?D.jsx(K8,{...p,disabled:x||(p==null?void 0:p.disabled)},p.id):x?D.jsx(Z.InputNumber,{...p,placeholder:"",disabled:x||(p==null?void 0:p.disabled)}):D.jsx(Z.InputNumber,{...p});if(c==="Cascader")return x?D.jsx(Z.Cascader,{...p,placeholder:"",disabled:x||(p==null?void 0:p.disabled)}):D.jsx(Z.Cascader,{showSearch:{filter:(E,k)=>k.some(T=>T.label&&T.label.toLowerCase().indexOf(E.toLowerCase())>-1),matchInputWidth:!1},...p});if(c==="TreeSelect")return p.treeData&&p.treeData.length?x?D.jsx(vf,{...p,disabled:x||(p==null?void 0:p.disabled),showSearch:!0,treeNodeFilterProp:"label"}):D.jsx(vf,{...p,showSearch:!0,treeNodeFilterProp:"label"}):D.jsx(vf,{disabled:x||(p==null?void 0:p.disabled)});if(c==="Radio")return x?D.jsx(Z.Radio,{...p,disabled:x||(p==null?void 0:p.disabled)}):D.jsx(Z.Radio,{...p});if(c==="Radio.Group")return x?D.jsx(Z.Radio.Group,{...p,disabled:x||(p==null?void 0:p.disabled)}):D.jsx(Z.Radio.Group,{...p});if(c==="Slider")return D.jsx(Z.Slider,{...p,disabled:x||(p==null?void 0:p.disabled)});if(c==="Markdown")return D.jsx(WS,{...p,readOnly:x||(p==null?void 0:p.disabled)});if(c==="SelectPopup")return D.jsx(sC,{selectProps:p,readOnly:x||(p==null?void 0:p.disabled)});if(c==="SelectTransfer")return D.jsx(iC,{selectProps:p,readOnly:x||(p==null?void 0:p.disabled)});if(c==="CompositeForm")return D.jsx(hc,{...p,readOnly:x||(p==null?void 0:p.disabled)});if(c==="Title")return D.jsx(Jq,{...p,readOnly:x||(p==null?void 0:p.disabled)});if(n[c]){const E=n[c];return D.jsx(E,{type:c,...p,name:e.name,disabled:x||(p==null?void 0:p.disabled)},e.name)}return D.jsx("span",{children:u})}else return D.jsx("div",{style:{width:"28px",height:"10px",backgroundColor:"#d9d9d9"}})},[e.readOnly]),i=F.useMemo(()=>e.ignoreNoWhiteSpaceStart?e.rules:e.content.type==="Input"||e.content.type==="Input.TextArea"?ie.concat(e.NoWhiteSpaceStart,e.rules||[]):e.rules,[e.rules,e.ignoreNoWhiteSpaceStart]),s=e.content.type=="Title";return D.jsx(Z.Form.Item,{colon:!1,...ie.omit(e,["readOnly","content","ignoreNoWhiteSpaceStart"]),className:Te(x$.main,e.className,s?GLOBAL_ATTR_TITLE:"",{readOnly:e.readOnly}),"data-type":e.content.type,validateFirst:!0,validateTrigger:["onBlur","onChange"],rules:i,children:a(e.content,e.name)})}),Qq="_itemsCreated_ow91h_1",eW="_rowBox_ow91h_4",tW="_labelLength_ow91h_8",Qo={itemsCreated:Qq,rowBox:eW,labelLength:tW},rW="_advanced_search_content_775l0_1",nW="_disableBg_775l0_1",aW="_checkboxWidth_775l0_15",iW="_radioWidth_775l0_18",oW="_conditions_head_775l0_21",sW="_head1_775l0_29",uW="_head2_775l0_32",lW="_head3_775l0_35",cW="_head4_775l0_38",dW="_properties_box_775l0_41",fW="_className_tips_775l0_44",hW="_groupHeader_775l0_49",pW="_iconBtn_775l0_52",mW="_properties_item_775l0_61",gW="_left_tips_775l0_84",vW="_state_type_775l0_87",bW="_verification_775l0_100",yW="_verificationBorder_775l0_121",Ie={advanced_search_content:rW,disableBg:nW,checkboxWidth:aW,radioWidth:iW,conditions_head:oW,head1:sW,head2:uW,head3:lW,head4:cW,properties_box:dW,className_tips:fW,groupHeader:hW,iconBtn:pW,properties_item:mW,left_tips:gW,state_type:vW,verification:bW,verificationBorder:yW},_W="_shuttle_box_tufhg_1",wW="_transferBox_tufhg_4",xW="_selectNum_tufhg_7",jd={shuttle_box:_W,transferBox:wW,selectNum:xW},SW=e=>{const t=Br({dataSource:[],targetKeys:[],columns:[]}),r=l=>l&&ie.isString(l)&&l.includes("~#~")?D.jsx("div",{style:{width:"28px",height:"10px",backgroundColor:"#d9d9d9"}}):l;F.useEffect(()=>{t.dataSource=e.dataSource,t.targetKeys=e.targetKeys;let l=[];for(let u of e.columns)l.push({...u,ellipsis:!0,sorter:(c,m)=>{const p=u.dataIndex||"";return c[p]!=null&&m[p]!=null?ie.isString(c[p])&&ie.isString(m[p])?c[p].localeCompare(m[p]):ie.isNumber(c[p])&&ie.isNumber(m[p])?c[p]-m[p]:0:0},render:u.render?u.render:r});t.columns=l},[e.dataSource,e.targetKeys]);const n=({...l})=>D.jsx(Z.Transfer,{...l,rowKey:u=>u.id,children:({direction:u,filteredItems:c,onItemSelectAll:m,onItemSelect:p,selectedKeys:g})=>{const y={onSelectAll(x,E){const k=E.filter(w=>!w.disabled).map(({id:w})=>w),T=x?ie.difference(k,g):ie.difference(g,k);m(T,x)},onSelect({id:x},E){e.isRadio&&g.splice(0,1),p(x,E)},getCheckboxProps:x=>({disabled:x.name=="~#~"||x.number=="~#~"||x.empNo=="~#~"?!0:u=="left"?x.disabled:!1}),selectedRowKeys:g};return D.jsxs(D.Fragment,{children:[D.jsx(Z.Table,{rowSelection:{type:e.isRadio?"radio":"checkbox",...y},columns:t.columns,showSorterTooltip:!1,pagination:!1,dataSource:c,scroll:{y:301},style:{height:"338px"},size:"small",onRow:x=>({onClick:()=>{x.name=="~#~"||x.empNo=="~#~"||!x.disabled&&u==="left"&&(e.isRadio&&g.splice(0,1),p(x.id,!g.includes(x.id)))},onDoubleClick:()=>{if(!(x.name=="~#~"||x.empNo=="~#~")){if(u==="left")x.disabled||(e.isRadio&&(t.targetKeys=[]),t.targetKeys.unshift(x.id));else for(let E=0;E<t.targetKeys.length;E++)if(t.targetKeys[E]==x.id){t.targetKeys.splice(E,1);break}}}})}),u==="left"?D.jsxs("div",{className:jd.selectNum,children:[e.defaultPageSize!==50?`${Y("sys.label.selected",{placeholder:"已选{count}条",variate:{count:g.length}})}`:Y("sys.maxDisplay50",{placeholder:"最多显示50条"})," ",", ",Y("project.tab.plan.criticalPath.window.total",{placeholder:"共"}),c.length,Y("project.tab.plan.quantityDisplay.select",{placeholder:"条"})]}):D.jsxs("div",{className:jd.selectNum,children:[Y("sys.label.selected",{placeholder:"已选{count}条",variate:{count:g.length}}),",",Y("project.tab.plan.criticalPath.window.total",{placeholder:"共"}),c.length,Y("project.tab.plan.quantityDisplay.select",{placeholder:"条"})]})]})}}),a=l=>{e.isRadio?t.targetKeys=[l[0]]:t.targetKeys=l},i=async()=>{let l=[];for(let u=0;u<t.targetKeys.length;u++)for(let c=0;c<t.dataSource.length;c++)if(t.targetKeys[u]==t.dataSource[c].id){l.push(t.dataSource[c]);break}e.onSubmit&&e.onSubmit(l)},s=()=>{if(e.columns.length>0){let l=[Y("project.workflow.status",{placeholder:"状态"}),Y("sys.import.category",{placeholder:"分类"})];return Y("project.create.attr.verify.scheduledDate.input",{placeholder:"请输入{content}",variate:{content:ie.without(ie.map(e.columns,"title"),...l).join("、")}})}return Y("sys.enterSearch",{placeholder:"请输入搜索内容"})};return D.jsx(To,{className:jd.shuttle_box,modalTitle:e.title,okText:Y("project.tab.plan.details.window.save",{placeholder:"保存"}),width:850,visible:e.visible,onOk:()=>{i()},onCancel:()=>{e.onCancel&&e.onCancel()},children:D.jsx("div",{className:jd.transferBox,children:D.jsx(Ls,{spinning:e.loading,children:D.jsx(n,{dataSource:t.dataSource,targetKeys:t.targetKeys,showSearch:!0,locale:{searchPlaceholder:e.searchPlaceholder||s()},showSelectAll:!1,onChange:a,filterOption:(l,u)=>u.Name&&u.Name.indexOf(l)!==-1||u.EmpNo&&u.EmpNo.indexOf(l)!==-1||u.empNo&&u.empNo.indexOf(l)!==-1||u.email&&u.email.indexOf(l)!==-1||u.name&&u.name.indexOf(l)!==-1||u.workflowName&&u.workflowName.indexOf(l)!==-1||u.code&&String(u.code).indexOf(l)!==-1||u.description&&u.description.indexOf(l)!==-1})})})})},{RangePicker:Tx}=Z.DatePicker,{Option:ug}=Z.Select,{TreeNode:Ox}=Z.Tree,{confirm:Eee}=Z.Modal,CW=[{value:"and",label:Y("sys.query.builder.condit.and",{placeholder:"与"})},{value:"or",label:Y("sys.query.builder.condit.or",{placeholder:"或"})}],hC=F.forwardRef((e,t)=>{F.useRef();const r=F.useRef(null),n=F.useRef(null),a="YYYY-MM-DD HH:mm:ss",i={10002011:10001001,10002021:10001002,10002035:10001006,10002053:10001021,10002054:10001023,10002055:10001022},s=Br({1:[{value:"contain",label:Y("sys.condition.contains",{placeholder:"包含"})},{value:"!contain",label:Y("sys.condition.notContains",{placeholder:"不包含"})},{value:"start",label:Y("sys.condition.startsWith",{placeholder:"开始于"})},{value:"!start",label:Y("sys.condition.notStartsWith",{placeholder:"不开始于"})},{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],2:[{value:"contain",label:Y("sys.condition.contains",{placeholder:"包含"})},{value:"!contain",label:Y("sys.condition.notContains",{placeholder:"不包含"})},{value:"start",label:Y("sys.condition.startsWith",{placeholder:"开始于"})},{value:"!start",label:Y("sys.condition.notStartsWith",{placeholder:"不开始于"})},{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],3:[{value:"contain",label:Y("sys.condition.contains",{placeholder:"包含"})},{value:"!contain",label:Y("sys.condition.notContains",{placeholder:"不包含"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],4:[{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"gt",label:Y("sys.condition.greaterThan",{placeholder:"大于"})},{value:"ge",label:Y("sys.condition.greaterThanOrEquals",{placeholder:"大于等于"})},{value:"lt",label:Y("sys.condition.lessThan",{placeholder:"小于"})},{value:"le",label:Y("sys.condition.lessThanOrEquals",{placeholder:"小于等于"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],5:[[{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],[{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"in",label:Y("sys.condition.in",{placeholder:"在"})},{value:"!in",label:Y("sys.condition.notIn",{placeholder:"不在"})},{value:"contain",label:Y("sys.condition.contains",{placeholder:"包含"})},{value:"!contain",label:Y("sys.condition.notContains",{placeholder:"不包含"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],[{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"contain",label:Y("sys.condition.contains",{placeholder:"包含"})},{value:"!contain",label:Y("sys.condition.notContains",{placeholder:"不包含"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],[{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"contain",label:Y("sys.condition.contains",{placeholder:"包含"})},{value:"!contain",label:Y("sys.condition.notContains",{placeholder:"不包含"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}]],6:[{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"between",label:Y("sys.condition.in",{placeholder:"在"})},{value:"gt",label:Y("sys.condition.greaterThan",{placeholder:"大于"})},{value:"ge",label:Y("sys.condition.greaterThanOrEquals",{placeholder:"大于等于"})},{value:"lt",label:Y("sys.condition.lessThan",{placeholder:"小于"})},{value:"le",label:Y("sys.condition.lessThanOrEquals",{placeholder:"小于等于"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],7:[{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"gt",label:Y("sys.condition.greaterThan",{placeholder:"大于"})},{value:"ge",label:Y("sys.condition.greaterThanOrEquals",{placeholder:"大于等于"})},{value:"lt",label:Y("sys.condition.lessThan",{placeholder:"小于"})},{value:"le",label:Y("sys.condition.lessThanOrEquals",{placeholder:"小于等于"})}],8:[{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],9:[{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],10:[{value:"contain",label:Y("sys.condition.contains",{placeholder:"包含"})},{value:"!contain",label:Y("sys.condition.notContains",{placeholder:"不包含"})},{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],12:[{value:"contain",label:Y("sys.condition.contains",{placeholder:"包含"})},{value:"!contain",label:Y("sys.condition.notContains",{placeholder:"不包含"})},{value:"start",label:Y("sys.condition.startsWith",{placeholder:"开始于"})},{value:"!start",label:Y("sys.condition.notStartsWith",{placeholder:"不开始于"})},{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}],13:[{value:"eq",label:Y("sys.condition.equals",{placeholder:"等于"})},{value:"ne",label:Y("sys.condition.notEquals",{placeholder:"不等于"})},{value:"gt",label:Y("sys.condition.greaterThan",{placeholder:"大于"})},{value:"ge",label:Y("sys.condition.greaterThanOrEquals",{placeholder:"大于等于"})},{value:"lt",label:Y("sys.condition.lessThan",{placeholder:"小于"})},{value:"le",label:Y("sys.condition.lessThanOrEquals",{placeholder:"小于等于"})},{value:"null",label:Y("sys.condition.isEmpty",{placeholder:"为空"})},{value:"!null",label:Y("sys.condition.isNotEmpty",{placeholder:"不为空"})}]}),l=["ProductRoleList","CategoryList","VersionList","ProductList","LifePhaseList","WorkflowList","WorkflowNodeList"],u=Br({verification:!1,useThrottle:!0,treeChoice:"",verifyRoute:!1,formCofing:{base_item_id:"",base_item_name:"",object_id:"",object_name:"",relations:[{join:"and",isGroup:!1,relation:[{attribute:{id:"",name:"",type:"",tab_code:"",operator:"",value:"",valueKey:[],valueTreeKey:[],attr_join:"and",routineData:[],forbidden:!0}}]}]}}),c=Br({routineData:[],treeData:[],treeDefine:[],treeDefineKey:[],treeIndex1:null,treeIndex2:null,treeLoading:!1,treeVisible:!1,treeCheckable:!1,titleName:"",dataSource:[],loading:!1,visibleTransfer:!1,targetKeys:[],isRadio:!1,isUserCode:"",department:!1,saveSearchVisible:!1,selectedKeys:""});F.useImperativeHandle(t,()=>({getValue:()=>u.formCofing,onVerification:C=>{u.verification=C},setCondition:(C,P)=>{P==0?(u.formCofing.base_item_id=C.value,u.formCofing.base_item_name=C.label):(u.formCofing.object_id=(C==null?void 0:C.value)||"",u.formCofing.object_name=(C==null?void 0:C.label)||"")},emptyCondition:C=>{C&&(u.formCofing.base_item_id="",u.formCofing.base_item_name="",u.formCofing.object_id="",u.formCofing.object_name=""),u.verification=!1,u.formCofing.relations=[{join:"and",isGroup:!1,relation:[{attribute:{id:"",name:"",type:"",tab_code:"",operator:"",value:"",valueKey:[],valueTreeKey:[],attr_join:"and",routineData:[],forbidden:!0}}]}]},setConditionValue:C=>{u.formCofing=C},searchBtn:()=>{m()},defaultValue:()=>{var P;const C=(P=e.typeData[0])==null?void 0:P.children.filter(M=>M.apicode==="Number"||M.apicode==="Name"||M.apicode==="Description")[0];u.formCofing.relations=[{join:"and",isGroup:!1,relation:[{attribute:{id:[e.typeData[0].value,C.id],name:`${e.typeData[0].label}/${C.name}`,lastSelected:C,type:C.valueType||"",rawType:C.valueType||"",tab_code:e.typeData[0].value,dataFrom:C.dataFrom||"",dataFromId:C.dataFromId||"",apicode:C.apicode,operator:"contain",value:"",valueKey:[],valueTreeKey:[],attr_join:"and",routineData:[],forbidden:!0}}]}]}}));const m=C=>{if(u.verification=!1,!u.formCofing.base_item_id){Z.message.warning(Y("sys.import.selectCategory",{placeholder:"请选择分类"}));return}let P=ie.cloneDeep(u.formCofing.relations);P.length==1&&(x(P),P=ie.compact(P));for(let[M,q]of P.entries())for(let L of q.relation){if(!L.attribute.name||!L.attribute.operator||L.attribute.operator!="null"&&L.attribute.operator!="!null"&&!L.attribute.value){u.verification=!0;return}M!=0&&(q.join=P[M-1].relation[P[M-1].relation.length-1].attribute.attr_join)}u.formCofing.base_item_id,u.formCofing.base_item_name,u.formCofing.object_id,u.formCofing.object_name},p=(C,P)=>C=="5"&&P?P.listCode==10005213?s[C][2]:!P.allowMultiple||P.apicode=="LifeCyclePhase"||P.apicode=="Category"?s[C][0]:P.listType=="0"?s[C][1]:P.listType=="2"?s[C][2]:s[C][3]:s[C],g=()=>{u.formCofing.relations[c.treeIndex1].relation[c.treeIndex2].attribute.value=c.treeDefine.join(","),u.formCofing.relations[c.treeIndex1].relation[c.treeIndex2].attribute.valueTreeKey=c.treeDefineKey,c.titleName="",c.treeVisible=!1},y=(C,P)=>P.some(M=>M.label&&M.label.toLowerCase().indexOf(C.toLowerCase())>-1),x=C=>C.map((P,M)=>(P.relation.forEach((q,L)=>{let N=q.attribute;!N.name&&!N.operator&&!N.value&&delete P.relation[L]}),P.relation=ie.compact(P.relation),P.relation.length==0&&delete C[M],P)),E=C=>{let P=[];if(C)for(let M of C)P.push({label:M.showName||M.name,value:M.id,disabled:!M.status});return P},k=C=>C.map(P=>P.children?D.jsx(Ox,{title:c.department?P.title:P.name,children:k(P.children)},P.id):D.jsx(Ox,{title:c.department?P.title:P.name},P.id)),T=(C,P)=>D.jsx(th,{highlightStyle:{color:"#F5325C",backgroundColor:"rgb(0, 0, 0, 0)",padding:"0"},searchWords:[P?P.toString():""],textToHighlight:C?C.toString():""}),w=()=>{n.current&&setTimeout(()=>{n.current.scroll({top:n.current.scrollTop+38,behavior:"smooth"})},100)},S=(C,P,M,q)=>{!M||M&&C.relation.length>1&&q==C.relation.length-1?u.formCofing.relations.splice(P+1,0,{join:"and",isGroup:!1,relation:[{attribute:{id:"",name:"",type:"",tab_code:"",operator:"",value:"",valueKey:[],valueTreeKey:[],attr_join:"and",routineData:[],forbidden:!0}}]}):u.formCofing.relations[P].relation.splice(q+1,0,{attribute:{id:"",name:"",type:"",tab_code:"",operator:"",value:"",valueKey:[],valueTreeKey:[],attr_join:"and",routineData:[],forbidden:!0}}),_(C),w()},f=C=>{u.formCofing.relations.splice(C+1,0,{join:"and",isGroup:!0,relation:[{attribute:{id:"",name:"",type:"",tab_code:"",operator:"",value:"",valueKey:[],valueTreeKey:[],attr_join:"and",routineData:[],forbidden:!0}}]}),w()},h=C=>{u.formCofing.relations.splice(C,1)},v=(C,P,M,q)=>{M&&C.relation.length>1?(C.relation.splice(q,1),_(C)):u.formCofing.relations.splice(P,1)},_=C=>{for(let P=0;P<C.relation.length;P++)C.relation[P].attribute.forbidden=!0,C.relation.length>1&&C.relation.length-1!=P&&(C.relation[P].attribute.forbidden=!1)},R=(C,P,M,q,L)=>{if(M&&(M.apicode=="OrgName"||M.apicode=="CreateUserDepartment"))return D.jsx(Z.Select,{className:`
333
333
  ${u.verification&&!C.attribute.value&&C.attribute.operator!="null"&&C.attribute.operator!="!null"&&Ie.verification}
334
334
  ${(C.attribute.operator=="null"||C.attribute.operator=="!null")&&Ie.disableBg}
335
335
  ${Ie.radioWidth}